From 9d66dca950e8e736a2b1db54f4354926b0a48f92 Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Tue, 14 Jun 2016 22:39:06 +0100 Subject: [PATCH 01/67] Add NRF52 and NRF52_TARGETS. --- hal/targets.json | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/hal/targets.json b/hal/targets.json index 883f27ab4e..ba147f4ca9 100644 --- a/hal/targets.json +++ b/hal/targets.json @@ -1734,5 +1734,36 @@ "progen_target": "samg55j19", "device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH"], "default_build": "standard" + }, + "MCU_NRF52": { + "inherits": ["Target"], + "core": "Cortex-M4F", + "macros": ["NRF52", "TARGET_NRF52832"], + "extra_labels": ["NORDIC", "MCU_NRF52", "MCU_NRF52832"], + "OUTPUT_EXT": "hex", + "is_disk_virtual": true, + "supported_toolchains": ["ARM", "GCC_ARM"], + "public": false, + "detect_code": ["1070"], + "program_cycle_s": 6, + "MERGE_SOFT_DEVICE": true, + "EXPECTED_SOFTDEVICES_WITH_OFFSETS": [ + { + "boot": "", + "name": "s132_nrf52_2.0.0_softdevice.hex", + "offset": 114688 + } + ], + "post_binary_hook": { + "function": "MCU_NRF51Code.binary_hook", + "toolchains": ["ARM_STD", "GCC_ARM"] + }, + "MERGE_BOOTLOADER": false + }, + "NRF52_DK": { + "supported_form_factors": ["ARDUINO"], + "inherits": ["MCU_NRF52"], + "progen": {"target": "nrf52-dk"}, + "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"] } -} \ No newline at end of file +} From 9d85bfda25d8821ca3914b772fb0d5453223f3a3 Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Tue, 14 Jun 2016 22:39:45 +0100 Subject: [PATCH 02/67] Implementation of nrf52 target (draft). --- .../TOOLCHAIN_GCC_ARM/NRF52832.ld | 186 + .../TOOLCHAIN_GCC_ARM/startup_NRF52832.S | 458 + .../TARGET_NORDIC/TARGET_MCU_NRF52832/cmsis.h | 24 + .../TARGET_MCU_NRF52832/cmsis_nvic.c | 57 + .../TARGET_MCU_NRF52832/cmsis_nvic.h | 53 + .../compiler_abstraction.h | 128 + .../TARGET_NORDIC/TARGET_MCU_NRF52832/nrf.h | 67 + .../TARGET_MCU_NRF52832/nrf51_to_nrf52.h | 936 + .../TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52.h | 2156 +++ .../TARGET_MCU_NRF52832/nrf52_bitfields.h | 14863 ++++++++++++++++ .../TARGET_MCU_NRF52832/nrf52_name_change.h | 71 + .../TARGET_MCU_NRF52832/nrf_delay.c | 46 + .../TARGET_MCU_NRF52832/nrf_delay.h | 280 + .../TARGET_MCU_NRF52832/system_nrf52.c | 317 + .../TARGET_MCU_NRF52832/system_nrf52.h | 71 + .../TARGET_MCU_NRF52832/PeripheralNames.h | 58 + .../TARGET_MCU_NRF52832/PortNames.h | 30 + .../TARGET_NRF52_DK/PinNames.h | 179 + .../TARGET_NRF52_DK/device.h | 59 + .../TARGET_MCU_NRF52832/analogin_api.c | 82 + .../TARGET_MCU_NRF52832/gpio_api.c | 58 + .../TARGET_MCU_NRF52832/gpio_irq_api.c | 127 + .../TARGET_MCU_NRF52832/gpio_object.h | 56 + .../TARGET_MCU_NRF52832/i2c_api.c | 311 + .../TARGET_MCU_NRF52832/objects.h | 89 + .../TARGET_MCU_NRF52832/pinmap.c | 35 + .../TARGET_MCU_NRF52832/port_api.c | 85 + .../TARGET_MCU_NRF52832/pwmout_api.c | 349 + .../TARGET_MCU_NRF52832/serial_api.c | 305 + .../TARGET_NORDIC/TARGET_MCU_NRF52832/sleep.c | 32 + .../TARGET_MCU_NRF52832/spi_api.c | 243 + .../TARGET_MCU_NRF52832/us_ticker.c | 277 + 32 files changed, 22088 insertions(+) create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/NRF52832.ld create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/startup_NRF52832.S create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/cmsis.h create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/cmsis_nvic.c create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/cmsis_nvic.h create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/compiler_abstraction.h create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf.h create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf51_to_nrf52.h create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52.h create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52_bitfields.h create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52_name_change.h create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf_delay.c create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf_delay.h create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/system_nrf52.c create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/system_nrf52.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/PeripheralNames.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/PortNames.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/TARGET_NRF52_DK/PinNames.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/TARGET_NRF52_DK/device.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/analogin_api.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/gpio_api.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/gpio_irq_api.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/gpio_object.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/i2c_api.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/objects.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/pinmap.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/port_api.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/pwmout_api.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/serial_api.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/sleep.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/spi_api.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/us_ticker.c diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/NRF52832.ld b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/NRF52832.ld new file mode 100644 index 0000000000..833502ee09 --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/NRF52832.ld @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2015 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Linker script to configure memory regions. */ + +MEMORY +{ + FLASH (rx) : ORIGIN = 0x1C000, LENGTH = 0x64000 + RAM (rwx) : ORIGIN = 0x20002ef8, LENGTH = 0xd108 +} + + +OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") + +/* Linker script to place sections and symbol values. Should be used together + * with the other linker script that defines memory regions FLASH and RAM. + * It references the following symbols that must be defined in code: + * Reset_Handler : Entry of reset handler + * + * It defines the following symbols that the code can use without definition: + * __exidx_start + * __exidx_end + * __etext + * __data_start__ + * __preinit_array_start + * __preinit_array_end + * __init_array_start + * __init_array_end + * __fini_array_start + * __fini_array_end + * __data_end__ + * __bss_start__ + * __bss_end__ + * __end__ + * end + * __HeapLimit + * __StackLimit + * __StackTop + * __stack + */ +ENTRY(Reset_Handler) + + +SECTIONS +{ + .text : + { + KEEP(*(.Vectors)) + *(.text*) + + KEEP(*(.init)) + KEEP(*(.fini)) + + /* .ctors */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + + /* .dtors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.rodata*) + + KEEP(*(.eh_frame*)) + } > FLASH + + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + . = ALIGN(4); + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + . = ALIGN(4); + } > FLASH + __exidx_end = .; + + __etext = .; + + .data : AT (__etext) + { + __data_start__ = .; + *(vtable) + *(.data*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE_HIDDEN (__fini_array_end = .); + + *(.jcr) + . = ALIGN(4); + /* All data end */ + __data_end__ = .; + + } > RAM + + __edata = .; + + .fs_data : + { + PROVIDE(__start_fs_data = .); + KEEP(*(.fs_data)) + PROVIDE(__stop_fs_data = .); + } > RAM + + .bss : + { + . = ALIGN(4); + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (NOLOAD): + { + __end__ = .; + end = __end__; + *(.heap*); + + /* Expand the heap to reach the stack boundary. */ + ASSERT(. <= (ORIGIN(RAM) + LENGTH(RAM) - 0x800), "heap region overflowed into stack"); + . += (ORIGIN(RAM) + LENGTH(RAM) - 0x800) - .; + } > RAM + PROVIDE(__heap_start = ADDR(.heap)); + PROVIDE(__heap_size = SIZEOF(.heap)); + PROVIDE(__mbed_sbrk_start = ADDR(.heap)); + PROVIDE(__mbed_krbs_start = ADDR(.heap) + SIZEOF(.heap)); + + /* .stack_dummy section does not contain any symbols. It is only + * used for the linker script to calculate the size of stack sections + * and assign values to stack symbols later. */ + .stack (NOLOAD): + { + __StackLimit = .; + *(.stack*) + . += (ORIGIN(RAM) + LENGTH(RAM) - .); + } > RAM + + /* Set the stack top to the end of RAM and move down the stack limit by + * the size of the stack_dummy section. */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackLimit = __StackTop - SIZEOF(.stack); + PROVIDE(__stack = __StackTop); +} diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/startup_NRF52832.S b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/startup_NRF52832.S new file mode 100644 index 0000000000..fa2e4bd3f4 --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/startup_NRF52832.S @@ -0,0 +1,458 @@ +/* +Copyright (c) 2013, 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. +*/ + +/* +NOTE: Template files (including this one) are application specific and therefore +expected to be copied into the application project folder prior to its use! +*/ + + .syntax unified + .arch armv7e-m + + .section .Vectors + .align 2 + .globl __Vectors +__Vectors: + .long __StackTop /* Top of Stack */ + .long Reset_Handler + .long NMI_Handler + .long HardFault_Handler + .long MemoryManagement_Handler + .long BusFault_Handler + .long UsageFault_Handler + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long SVC_Handler + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long PendSV_Handler + .long SysTick_Handler + + /* External Interrupts */ + .long POWER_CLOCK_IRQHandler + .long RADIO_IRQHandler + .long UARTE0_UART0_IRQHandler + .long SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler + .long SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler + .long NFCT_IRQHandler + .long GPIOTE_IRQHandler + .long SAADC_IRQHandler + .long TIMER0_IRQHandler + .long TIMER1_IRQHandler + .long TIMER2_IRQHandler + .long RTC0_IRQHandler + .long TEMP_IRQHandler + .long RNG_IRQHandler + .long ECB_IRQHandler + .long CCM_AAR_IRQHandler + .long WDT_IRQHandler + .long RTC1_IRQHandler + .long QDEC_IRQHandler + .long COMP_LPCOMP_IRQHandler + .long SWI0_EGU0_IRQHandler + .long SWI1_EGU1_IRQHandler + .long SWI2_EGU2_IRQHandler + .long SWI3_EGU3_IRQHandler + .long SWI4_EGU4_IRQHandler + .long SWI5_EGU5_IRQHandler + .long TIMER3_IRQHandler + .long TIMER4_IRQHandler + .long PWM0_IRQHandler + .long PDM_IRQHandler + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long MWU_IRQHandler + .long PWM1_IRQHandler + .long PWM2_IRQHandler + .long SPIM2_SPIS2_SPI2_IRQHandler + .long RTC2_IRQHandler + .long I2S_IRQHandler + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + .long 0 /*Reserved */ + + .size __Vectors, . - __Vectors + +/* Reset Handler */ + + .text + .thumb + .thumb_func + .align 1 + .globl Reset_Handler + .type Reset_Handler, %function +Reset_Handler: + .fnstart + + +/* Loop to copy data from read only memory to RAM. The ranges + * of copy from/to are specified by following symbols evaluated in + * linker script. + * __etext: End of code section, i.e., begin of data sections to copy from. + * __data_start__/__data_end__: RAM address range that data should be + * copied to. Both must be aligned to 4 bytes boundary. */ + + ldr r1, =__etext + ldr r2, =__data_start__ + ldr r3, =__data_end__ + + subs r3, r2 + ble .LC0 + +.LC1: + subs r3, 4 + ldr r0, [r1,r3] + str r0, [r2,r3] + bgt .LC1 +.LC0: + + LDR R0, =SystemInit + BLX R0 + LDR R0, =_start + BX R0 + + .pool + .cantunwind + .fnend + .size Reset_Handler,.-Reset_Handler + + .section ".text" + + +/* Dummy Exception Handlers (infinite loops which can be modified) */ + + .weak NMI_Handler + .type NMI_Handler, %function +NMI_Handler: + B . + .size NMI_Handler, . - NMI_Handler + + + .weak HardFault_Handler + .type HardFault_Handler, %function +HardFault_Handler: + B . + .size HardFault_Handler, . - HardFault_Handler + + + .weak MemoryManagement_Handler + .type MemoryManagement_Handler, %function +MemoryManagement_Handler: + B . + .size MemoryManagement_Handler, . - MemoryManagement_Handler + + + .weak BusFault_Handler + .type BusFault_Handler, %function +BusFault_Handler: + B . + .size BusFault_Handler, . - BusFault_Handler + + + .weak UsageFault_Handler + .type UsageFault_Handler, %function +UsageFault_Handler: + B . + .size UsageFault_Handler, . - UsageFault_Handler + + + .weak SVC_Handler + .type SVC_Handler, %function +SVC_Handler: + B . + .size SVC_Handler, . - SVC_Handler + + + .weak PendSV_Handler + .type PendSV_Handler, %function +PendSV_Handler: + B . + .size PendSV_Handler, . - PendSV_Handler + + + .weak SysTick_Handler + .type SysTick_Handler, %function +SysTick_Handler: + B . + .size SysTick_Handler, . - SysTick_Handler + + +/* IRQ Handlers */ + + .globl Default_Handler + .type Default_Handler, %function +Default_Handler: + B . + .size Default_Handler, . - Default_Handler + + .macro IRQ handler + .weak \handler + .set \handler, Default_Handler + .endm + + IRQ POWER_CLOCK_IRQHandler + IRQ RADIO_IRQHandler + IRQ UARTE0_UART0_IRQHandler + IRQ SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler + IRQ SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler + IRQ NFCT_IRQHandler + IRQ GPIOTE_IRQHandler + IRQ SAADC_IRQHandler + IRQ TIMER0_IRQHandler + IRQ TIMER1_IRQHandler + IRQ TIMER2_IRQHandler + IRQ RTC0_IRQHandler + IRQ TEMP_IRQHandler + IRQ RNG_IRQHandler + IRQ ECB_IRQHandler + IRQ CCM_AAR_IRQHandler + IRQ WDT_IRQHandler + IRQ RTC1_IRQHandler + IRQ QDEC_IRQHandler + IRQ COMP_LPCOMP_IRQHandler + IRQ SWI0_EGU0_IRQHandler + IRQ SWI1_EGU1_IRQHandler + IRQ SWI2_EGU2_IRQHandler + IRQ SWI3_EGU3_IRQHandler + IRQ SWI4_EGU4_IRQHandler + IRQ SWI5_EGU5_IRQHandler + IRQ TIMER3_IRQHandler + IRQ TIMER4_IRQHandler + IRQ PWM0_IRQHandler + IRQ PDM_IRQHandler + IRQ MWU_IRQHandler + IRQ PWM1_IRQHandler + IRQ PWM2_IRQHandler + IRQ SPIM2_SPIS2_SPI2_IRQHandler + IRQ RTC2_IRQHandler + IRQ I2S_IRQHandler + + .end diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/cmsis.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/cmsis.h new file mode 100644 index 0000000000..214885742d --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/cmsis.h @@ -0,0 +1,24 @@ +/* + * PackageLicenseDeclared: Apache-2.0 + * Copyright (c) 2016 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef MBED_CMSIS_H +#define MBED_CMSIS_H + +#include "nrf.h" +#include "cmsis_nvic.h" + +#endif diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/cmsis_nvic.c b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/cmsis_nvic.c new file mode 100644 index 0000000000..02f85b1d79 --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/cmsis_nvic.c @@ -0,0 +1,57 @@ +/* mbed Microcontroller Library + * CMSIS-style functionality to support dynamic vectors + ******************************************************************************* + * Copyright (c) 2016 ARM Limited. All rights reserved. + * 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 ARM Limited 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. + ******************************************************************************* + */ +#include "cmsis_nvic.h" + +#define NVIC_RAM_VECTOR_ADDRESS (0x10000000) // Vectors positioned at start of SRAM2 +#define NVIC_FLASH_VECTOR_ADDRESS (0x0) // Initial vector position in flash + +void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ + uint32_t *vectors = (uint32_t *) SCB->VTOR; + uint32_t i; + + /* Copy and switch to dynamic vectors if the first time called */ + if (SCB->VTOR != NVIC_RAM_VECTOR_ADDRESS) { + uint32_t *old_vectors = (uint32_t *) NVIC_FLASH_VECTOR_ADDRESS; + vectors = (uint32_t *) NVIC_RAM_VECTOR_ADDRESS; + for (i = 0; i < NVIC_NUM_VECTORS; i++) { + vectors[i] = old_vectors[i]; + } + SCB->VTOR = (uint32_t) NVIC_RAM_VECTOR_ADDRESS; + } + vectors[IRQn + NVIC_USER_IRQ_OFFSET] = vector; +} + +uint32_t NVIC_GetVector(IRQn_Type IRQn) +{ + uint32_t *vectors = (uint32_t *) SCB->VTOR; + return vectors[IRQn + NVIC_USER_IRQ_OFFSET]; +} diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/cmsis_nvic.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/cmsis_nvic.h new file mode 100644 index 0000000000..0837075c40 --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/cmsis_nvic.h @@ -0,0 +1,53 @@ +/* mbed Microcontroller Library + * CMSIS-style functionality to support dynamic vectors + ******************************************************************************* + * Copyright (c) 2016 ARM Limited. All rights reserved. + * 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 ARM Limited 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. + ******************************************************************************* + */ + +#ifndef MBED_CMSIS_NVIC_H +#define MBED_CMSIS_NVIC_H + +#define NVIC_NUM_VECTORS (16 + 38) // CORE + MCU Peripherals +#define NVIC_USER_IRQ_OFFSET 16 + +#include "nrf52.h" +#include "cmsis.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector); +uint32_t NVIC_GetVector(IRQn_Type IRQn); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/compiler_abstraction.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/compiler_abstraction.h new file mode 100644 index 0000000000..34ebeabb51 --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/compiler_abstraction.h @@ -0,0 +1,128 @@ +/* + * 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 _COMPILER_ABSTRACTION_H +#define _COMPILER_ABSTRACTION_H + +/*lint ++flb "Enter library region" */ + +#if defined ( __CC_ARM ) + + #ifndef __ASM + #define __ASM __asm + #endif + + #ifndef __INLINE + #define __INLINE __inline + #endif + + #ifndef __WEAK + #define __WEAK __weak + #endif + + #ifndef __ALIGN + #define __ALIGN(n) __align(n) + #endif + + #define GET_SP() __current_sp() + +#elif defined ( __ICCARM__ ) + + #ifndef __ASM + #define __ASM __asm + #endif + + #ifndef __INLINE + #define __INLINE inline + #endif + + #ifndef __WEAK + #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) + #endif + + #define GET_SP() __get_SP() + +#elif defined ( __GNUC__ ) + + #ifndef __ASM + #define __ASM __asm + #endif + + #ifndef __INLINE + #define __INLINE inline + #endif + + #ifndef __WEAK + #define __WEAK __attribute__((weak)) + #endif + + #ifndef __ALIGN + #define __ALIGN(n) __attribute__((aligned(n))) + #endif + + #define GET_SP() gcc_current_sp() + + static inline unsigned int gcc_current_sp(void) + { + register unsigned sp __ASM("sp"); + return sp; + } + +#elif defined ( __TASKING__ ) + + #ifndef __ASM + #define __ASM __asm + #endif + + #ifndef __INLINE + #define __INLINE inline + #endif + + #ifndef __WEAK + #define __WEAK __attribute__((weak)) + #endif + + #ifndef __ALIGN + #define __ALIGN(n) __align(n) + #endif + + #define GET_SP() __get_MSP() + +#endif + +/*lint --flb "Leave library region" */ + +#endif diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf.h new file mode 100644 index 0000000000..06cbcc41df --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf.h @@ -0,0 +1,67 @@ +/* + * 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_H +#define NRF_H + +/* MDK version */ +#define MDK_MAJOR_VERSION 8 +#define MDK_MINOR_VERSION 5 +#define MDK_MICRO_VERSION 0 + +#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 */ +#elif defined(__APPLE__) + /* Do not include nrf51 specific files when building for PC host */ +#else + + /* Family selection for family includes. */ + #if defined (NRF51) + #include "nrf51.h" + #include "nrf51_bitfields.h" + #include "nrf51_deprecated.h" + #elif defined (NRF52) + #include "nrf52.h" + #include "nrf52_bitfields.h" + #include "nrf51_to_nrf52.h" + #include "nrf52_name_change.h" + #else + #error "Device family must be defined. See nrf.h." + #endif /* NRF51, NRF52 */ + + #include "compiler_abstraction.h" + +#endif /* _WIN32 || __unix || __APPLE__ */ + +#endif /* NRF_H */ diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf51_to_nrf52.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf51_to_nrf52.h new file mode 100644 index 0000000000..41e3ee4063 --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf51_to_nrf52.h @@ -0,0 +1,936 @@ +/* + * 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 NRF51_TO_NRF52_H +#define NRF51_TO_NRF52_H + +/*lint ++flb "Enter library region */ + +/* 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 + * from the nrf51_deprecated.h file. */ + + +/* IRQ */ +/* Several peripherals have been added to several indexes. Names of IRQ handlers and IRQ numbers have changed. */ +#define UART0_IRQHandler UARTE0_UART0_IRQHandler +#define SPI0_TWI0_IRQHandler SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler +#define SPI1_TWI1_IRQHandler SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler +#define ADC_IRQHandler SAADC_IRQHandler +#define LPCOMP_IRQHandler COMP_LPCOMP_IRQHandler +#define SWI0_IRQHandler SWI0_EGU0_IRQHandler +#define SWI1_IRQHandler SWI1_EGU1_IRQHandler +#define SWI2_IRQHandler SWI2_EGU2_IRQHandler +#define SWI3_IRQHandler SWI3_EGU3_IRQHandler +#define SWI4_IRQHandler SWI4_EGU4_IRQHandler +#define SWI5_IRQHandler SWI5_EGU5_IRQHandler + +#define UART0_IRQn UARTE0_UART0_IRQn +#define SPI0_TWI0_IRQn SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQn +#define SPI1_TWI1_IRQn SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn +#define ADC_IRQn SAADC_IRQn +#define LPCOMP_IRQn COMP_LPCOMP_IRQn +#define SWI0_IRQn SWI0_EGU0_IRQn +#define SWI1_IRQn SWI1_EGU1_IRQn +#define SWI2_IRQn SWI2_EGU2_IRQn +#define SWI3_IRQn SWI3_EGU3_IRQn +#define SWI4_IRQn SWI4_EGU4_IRQn +#define SWI5_IRQn SWI5_EGU5_IRQn + + +/* UICR */ +/* Register RBPCONF was renamed to APPROTECT. */ +#define RBPCONF APPROTECT + +#define UICR_RBPCONF_PALL_Pos UICR_APPROTECT_PALL_Pos +#define UICR_RBPCONF_PALL_Msk UICR_APPROTECT_PALL_Msk +#define UICR_RBPCONF_PALL_Enabled UICR_APPROTECT_PALL_Enabled +#define UICR_RBPCONF_PALL_Disabled UICR_APPROTECT_PALL_Disabled + + +/* GPIO */ +/* GPIO port was renamed to P0. */ +#define NRF_GPIO NRF_P0 +#define NRF_GPIO_BASE NRF_P0_BASE + + +/* SPIS */ +/* The registers PSELSCK, PSELMISO, PSELMOSI, PSELCSN were restructured into a struct. */ +#define PSELSCK PSEL.SCK +#define PSELMISO PSEL.MISO +#define PSELMOSI PSEL.MOSI +#define PSELCSN PSEL.CSN + +/* The registers RXDPTR, MAXRX, AMOUNTRX were restructured into a struct */ +#define RXDPTR RXD.PTR +#define MAXRX RXD.MAXCNT +#define AMOUNTRX RXD.AMOUNT + +#define SPIS_MAXRX_MAXRX_Pos SPIS_RXD_MAXCNT_MAXCNT_Pos +#define SPIS_MAXRX_MAXRX_Msk SPIS_RXD_MAXCNT_MAXCNT_Msk + +#define SPIS_AMOUNTRX_AMOUNTRX_Pos SPIS_RXD_AMOUNT_AMOUNT_Pos +#define SPIS_AMOUNTRX_AMOUNTRX_Msk SPIS_RXD_AMOUNT_AMOUNT_Msk + +/* The registers TXDPTR, MAXTX, AMOUNTTX were restructured into a struct */ +#define TXDPTR TXD.PTR +#define MAXTX TXD.MAXCNT +#define AMOUNTTX TXD.AMOUNT + +#define SPIS_MAXTX_MAXTX_Pos SPIS_TXD_MAXCNT_MAXCNT_Pos +#define SPIS_MAXTX_MAXTX_Msk SPIS_TXD_MAXCNT_MAXCNT_Msk + +#define SPIS_AMOUNTTX_AMOUNTTX_Pos SPIS_TXD_AMOUNT_AMOUNT_Pos +#define SPIS_AMOUNTTX_AMOUNTTX_Msk SPIS_TXD_AMOUNT_AMOUNT_Msk + + +/* MPU */ +/* Part of MPU module was renamed BPROT, while the rest was eliminated. */ +#define NRF_MPU NRF_BPROT + +/* Register DISABLEINDEBUG macros were affected. */ +#define MPU_DISABLEINDEBUG_DISABLEINDEBUG_Pos BPROT_DISABLEINDEBUG_DISABLEINDEBUG_Pos +#define MPU_DISABLEINDEBUG_DISABLEINDEBUG_Msk BPROT_DISABLEINDEBUG_DISABLEINDEBUG_Msk +#define MPU_DISABLEINDEBUG_DISABLEINDEBUG_Enabled BPROT_DISABLEINDEBUG_DISABLEINDEBUG_Enabled +#define MPU_DISABLEINDEBUG_DISABLEINDEBUG_Disabled BPROT_DISABLEINDEBUG_DISABLEINDEBUG_Disabled + +/* Registers PROTENSET0 and PROTENSET1 were affected and renamed as CONFIG0 and CONFIG1. */ +#define PROTENSET0 CONFIG0 +#define PROTENSET1 CONFIG1 + +#define MPU_PROTENSET1_PROTREG63_Pos BPROT_CONFIG1_REGION63_Pos +#define MPU_PROTENSET1_PROTREG63_Msk BPROT_CONFIG1_REGION63_Msk +#define MPU_PROTENSET1_PROTREG63_Disabled BPROT_CONFIG1_REGION63_Disabled +#define MPU_PROTENSET1_PROTREG63_Enabled BPROT_CONFIG1_REGION63_Enabled +#define MPU_PROTENSET1_PROTREG63_Set BPROT_CONFIG1_REGION63_Enabled + +#define MPU_PROTENSET1_PROTREG62_Pos BPROT_CONFIG1_REGION62_Pos +#define MPU_PROTENSET1_PROTREG62_Msk BPROT_CONFIG1_REGION62_Msk +#define MPU_PROTENSET1_PROTREG62_Disabled BPROT_CONFIG1_REGION62_Disabled +#define MPU_PROTENSET1_PROTREG62_Enabled BPROT_CONFIG1_REGION62_Enabled +#define MPU_PROTENSET1_PROTREG62_Set BPROT_CONFIG1_REGION62_Enabled + +#define MPU_PROTENSET1_PROTREG61_Pos BPROT_CONFIG1_REGION61_Pos +#define MPU_PROTENSET1_PROTREG61_Msk BPROT_CONFIG1_REGION61_Msk +#define MPU_PROTENSET1_PROTREG61_Disabled BPROT_CONFIG1_REGION61_Disabled +#define MPU_PROTENSET1_PROTREG61_Enabled BPROT_CONFIG1_REGION61_Enabled +#define MPU_PROTENSET1_PROTREG61_Set BPROT_CONFIG1_REGION61_Enabled + +#define MPU_PROTENSET1_PROTREG60_Pos BPROT_CONFIG1_REGION60_Pos +#define MPU_PROTENSET1_PROTREG60_Msk BPROT_CONFIG1_REGION60_Msk +#define MPU_PROTENSET1_PROTREG60_Disabled BPROT_CONFIG1_REGION60_Disabled +#define MPU_PROTENSET1_PROTREG60_Enabled BPROT_CONFIG1_REGION60_Enabled +#define MPU_PROTENSET1_PROTREG60_Set BPROT_CONFIG1_REGION60_Enabled + +#define MPU_PROTENSET1_PROTREG59_Pos BPROT_CONFIG1_REGION59_Pos +#define MPU_PROTENSET1_PROTREG59_Msk BPROT_CONFIG1_REGION59_Msk +#define MPU_PROTENSET1_PROTREG59_Disabled BPROT_CONFIG1_REGION59_Disabled +#define MPU_PROTENSET1_PROTREG59_Enabled BPROT_CONFIG1_REGION59_Enabled +#define MPU_PROTENSET1_PROTREG59_Set BPROT_CONFIG1_REGION59_Enabled + +#define MPU_PROTENSET1_PROTREG58_Pos BPROT_CONFIG1_REGION58_Pos +#define MPU_PROTENSET1_PROTREG58_Msk BPROT_CONFIG1_REGION58_Msk +#define MPU_PROTENSET1_PROTREG58_Disabled BPROT_CONFIG1_REGION58_Disabled +#define MPU_PROTENSET1_PROTREG58_Enabled BPROT_CONFIG1_REGION58_Enabled +#define MPU_PROTENSET1_PROTREG58_Set BPROT_CONFIG1_REGION58_Enabled + +#define MPU_PROTENSET1_PROTREG57_Pos BPROT_CONFIG1_REGION57_Pos +#define MPU_PROTENSET1_PROTREG57_Msk BPROT_CONFIG1_REGION57_Msk +#define MPU_PROTENSET1_PROTREG57_Disabled BPROT_CONFIG1_REGION57_Disabled +#define MPU_PROTENSET1_PROTREG57_Enabled BPROT_CONFIG1_REGION57_Enabled +#define MPU_PROTENSET1_PROTREG57_Set BPROT_CONFIG1_REGION57_Enabled + +#define MPU_PROTENSET1_PROTREG56_Pos BPROT_CONFIG1_REGION56_Pos +#define MPU_PROTENSET1_PROTREG56_Msk BPROT_CONFIG1_REGION56_Msk +#define MPU_PROTENSET1_PROTREG56_Disabled BPROT_CONFIG1_REGION56_Disabled +#define MPU_PROTENSET1_PROTREG56_Enabled BPROT_CONFIG1_REGION56_Enabled +#define MPU_PROTENSET1_PROTREG56_Set BPROT_CONFIG1_REGION56_Enabled + +#define MPU_PROTENSET1_PROTREG55_Pos BPROT_CONFIG1_REGION55_Pos +#define MPU_PROTENSET1_PROTREG55_Msk BPROT_CONFIG1_REGION55_Msk +#define MPU_PROTENSET1_PROTREG55_Disabled BPROT_CONFIG1_REGION55_Disabled +#define MPU_PROTENSET1_PROTREG55_Enabled BPROT_CONFIG1_REGION55_Enabled +#define MPU_PROTENSET1_PROTREG55_Set BPROT_CONFIG1_REGION55_Enabled + +#define MPU_PROTENSET1_PROTREG54_Pos BPROT_CONFIG1_REGION54_Pos +#define MPU_PROTENSET1_PROTREG54_Msk BPROT_CONFIG1_REGION54_Msk +#define MPU_PROTENSET1_PROTREG54_Disabled BPROT_CONFIG1_REGION54_Disabled +#define MPU_PROTENSET1_PROTREG54_Enabled BPROT_CONFIG1_REGION54_Enabled +#define MPU_PROTENSET1_PROTREG54_Set BPROT_CONFIG1_REGION54_Enabled + +#define MPU_PROTENSET1_PROTREG53_Pos BPROT_CONFIG1_REGION53_Pos +#define MPU_PROTENSET1_PROTREG53_Msk BPROT_CONFIG1_REGION53_Msk +#define MPU_PROTENSET1_PROTREG53_Disabled BPROT_CONFIG1_REGION53_Disabled +#define MPU_PROTENSET1_PROTREG53_Enabled BPROT_CONFIG1_REGION53_Enabled +#define MPU_PROTENSET1_PROTREG53_Set BPROT_CONFIG1_REGION53_Enabled + +#define MPU_PROTENSET1_PROTREG52_Pos BPROT_CONFIG1_REGION52_Pos +#define MPU_PROTENSET1_PROTREG52_Msk BPROT_CONFIG1_REGION52_Msk +#define MPU_PROTENSET1_PROTREG52_Disabled BPROT_CONFIG1_REGION52_Disabled +#define MPU_PROTENSET1_PROTREG52_Enabled BPROT_CONFIG1_REGION52_Enabled +#define MPU_PROTENSET1_PROTREG52_Set BPROT_CONFIG1_REGION52_Enabled + +#define MPU_PROTENSET1_PROTREG51_Pos BPROT_CONFIG1_REGION51_Pos +#define MPU_PROTENSET1_PROTREG51_Msk BPROT_CONFIG1_REGION51_Msk +#define MPU_PROTENSET1_PROTREG51_Disabled BPROT_CONFIG1_REGION51_Disabled +#define MPU_PROTENSET1_PROTREG51_Enabled BPROT_CONFIG1_REGION51_Enabled +#define MPU_PROTENSET1_PROTREG51_Set BPROT_CONFIG1_REGION51_Enabled + +#define MPU_PROTENSET1_PROTREG50_Pos BPROT_CONFIG1_REGION50_Pos +#define MPU_PROTENSET1_PROTREG50_Msk BPROT_CONFIG1_REGION50_Msk +#define MPU_PROTENSET1_PROTREG50_Disabled BPROT_CONFIG1_REGION50_Disabled +#define MPU_PROTENSET1_PROTREG50_Enabled BPROT_CONFIG1_REGION50_Enabled +#define MPU_PROTENSET1_PROTREG50_Set BPROT_CONFIG1_REGION50_Enabled + +#define MPU_PROTENSET1_PROTREG49_Pos BPROT_CONFIG1_REGION49_Pos +#define MPU_PROTENSET1_PROTREG49_Msk BPROT_CONFIG1_REGION49_Msk +#define MPU_PROTENSET1_PROTREG49_Disabled BPROT_CONFIG1_REGION49_Disabled +#define MPU_PROTENSET1_PROTREG49_Enabled BPROT_CONFIG1_REGION49_Enabled +#define MPU_PROTENSET1_PROTREG49_Set BPROT_CONFIG1_REGION49_Enabled + +#define MPU_PROTENSET1_PROTREG48_Pos BPROT_CONFIG1_REGION48_Pos +#define MPU_PROTENSET1_PROTREG48_Msk BPROT_CONFIG1_REGION48_Msk +#define MPU_PROTENSET1_PROTREG48_Disabled BPROT_CONFIG1_REGION48_Disabled +#define MPU_PROTENSET1_PROTREG48_Enabled BPROT_CONFIG1_REGION48_Enabled +#define MPU_PROTENSET1_PROTREG48_Set BPROT_CONFIG1_REGION48_Enabled + +#define MPU_PROTENSET1_PROTREG47_Pos BPROT_CONFIG1_REGION47_Pos +#define MPU_PROTENSET1_PROTREG47_Msk BPROT_CONFIG1_REGION47_Msk +#define MPU_PROTENSET1_PROTREG47_Disabled BPROT_CONFIG1_REGION47_Disabled +#define MPU_PROTENSET1_PROTREG47_Enabled BPROT_CONFIG1_REGION47_Enabled +#define MPU_PROTENSET1_PROTREG47_Set BPROT_CONFIG1_REGION47_Enabled + +#define MPU_PROTENSET1_PROTREG46_Pos BPROT_CONFIG1_REGION46_Pos +#define MPU_PROTENSET1_PROTREG46_Msk BPROT_CONFIG1_REGION46_Msk +#define MPU_PROTENSET1_PROTREG46_Disabled BPROT_CONFIG1_REGION46_Disabled +#define MPU_PROTENSET1_PROTREG46_Enabled BPROT_CONFIG1_REGION46_Enabled +#define MPU_PROTENSET1_PROTREG46_Set BPROT_CONFIG1_REGION46_Enabled + +#define MPU_PROTENSET1_PROTREG45_Pos BPROT_CONFIG1_REGION45_Pos +#define MPU_PROTENSET1_PROTREG45_Msk BPROT_CONFIG1_REGION45_Msk +#define MPU_PROTENSET1_PROTREG45_Disabled BPROT_CONFIG1_REGION45_Disabled +#define MPU_PROTENSET1_PROTREG45_Enabled BPROT_CONFIG1_REGION45_Enabled +#define MPU_PROTENSET1_PROTREG45_Set BPROT_CONFIG1_REGION45_Enabled + +#define MPU_PROTENSET1_PROTREG44_Pos BPROT_CONFIG1_REGION44_Pos +#define MPU_PROTENSET1_PROTREG44_Msk BPROT_CONFIG1_REGION44_Msk +#define MPU_PROTENSET1_PROTREG44_Disabled BPROT_CONFIG1_REGION44_Disabled +#define MPU_PROTENSET1_PROTREG44_Enabled BPROT_CONFIG1_REGION44_Enabled +#define MPU_PROTENSET1_PROTREG44_Set BPROT_CONFIG1_REGION44_Enabled + +#define MPU_PROTENSET1_PROTREG43_Pos BPROT_CONFIG1_REGION43_Pos +#define MPU_PROTENSET1_PROTREG43_Msk BPROT_CONFIG1_REGION43_Msk +#define MPU_PROTENSET1_PROTREG43_Disabled BPROT_CONFIG1_REGION43_Disabled +#define MPU_PROTENSET1_PROTREG43_Enabled BPROT_CONFIG1_REGION43_Enabled +#define MPU_PROTENSET1_PROTREG43_Set BPROT_CONFIG1_REGION43_Enabled + +#define MPU_PROTENSET1_PROTREG42_Pos BPROT_CONFIG1_REGION42_Pos +#define MPU_PROTENSET1_PROTREG42_Msk BPROT_CONFIG1_REGION42_Msk +#define MPU_PROTENSET1_PROTREG42_Disabled BPROT_CONFIG1_REGION42_Disabled +#define MPU_PROTENSET1_PROTREG42_Enabled BPROT_CONFIG1_REGION42_Enabled +#define MPU_PROTENSET1_PROTREG42_Set BPROT_CONFIG1_REGION42_Enabled + +#define MPU_PROTENSET1_PROTREG41_Pos BPROT_CONFIG1_REGION41_Pos +#define MPU_PROTENSET1_PROTREG41_Msk BPROT_CONFIG1_REGION41_Msk +#define MPU_PROTENSET1_PROTREG41_Disabled BPROT_CONFIG1_REGION41_Disabled +#define MPU_PROTENSET1_PROTREG41_Enabled BPROT_CONFIG1_REGION41_Enabled +#define MPU_PROTENSET1_PROTREG41_Set BPROT_CONFIG1_REGION41_Enabled + +#define MPU_PROTENSET1_PROTREG40_Pos BPROT_CONFIG1_REGION40_Pos +#define MPU_PROTENSET1_PROTREG40_Msk BPROT_CONFIG1_REGION40_Msk +#define MPU_PROTENSET1_PROTREG40_Disabled BPROT_CONFIG1_REGION40_Disabled +#define MPU_PROTENSET1_PROTREG40_Enabled BPROT_CONFIG1_REGION40_Enabled +#define MPU_PROTENSET1_PROTREG40_Set BPROT_CONFIG1_REGION40_Enabled + +#define MPU_PROTENSET1_PROTREG39_Pos BPROT_CONFIG1_REGION39_Pos +#define MPU_PROTENSET1_PROTREG39_Msk BPROT_CONFIG1_REGION39_Msk +#define MPU_PROTENSET1_PROTREG39_Disabled BPROT_CONFIG1_REGION39_Disabled +#define MPU_PROTENSET1_PROTREG39_Enabled BPROT_CONFIG1_REGION39_Enabled +#define MPU_PROTENSET1_PROTREG39_Set BPROT_CONFIG1_REGION39_Enabled + +#define MPU_PROTENSET1_PROTREG38_Pos BPROT_CONFIG1_REGION38_Pos +#define MPU_PROTENSET1_PROTREG38_Msk BPROT_CONFIG1_REGION38_Msk +#define MPU_PROTENSET1_PROTREG38_Disabled BPROT_CONFIG1_REGION38_Disabled +#define MPU_PROTENSET1_PROTREG38_Enabled BPROT_CONFIG1_REGION38_Enabled +#define MPU_PROTENSET1_PROTREG38_Set BPROT_CONFIG1_REGION38_Enabled + +#define MPU_PROTENSET1_PROTREG37_Pos BPROT_CONFIG1_REGION37_Pos +#define MPU_PROTENSET1_PROTREG37_Msk BPROT_CONFIG1_REGION37_Msk +#define MPU_PROTENSET1_PROTREG37_Disabled BPROT_CONFIG1_REGION37_Disabled +#define MPU_PROTENSET1_PROTREG37_Enabled BPROT_CONFIG1_REGION37_Enabled +#define MPU_PROTENSET1_PROTREG37_Set BPROT_CONFIG1_REGION37_Enabled + +#define MPU_PROTENSET1_PROTREG36_Pos BPROT_CONFIG1_REGION36_Pos +#define MPU_PROTENSET1_PROTREG36_Msk BPROT_CONFIG1_REGION36_Msk +#define MPU_PROTENSET1_PROTREG36_Disabled BPROT_CONFIG1_REGION36_Disabled +#define MPU_PROTENSET1_PROTREG36_Enabled BPROT_CONFIG1_REGION36_Enabled +#define MPU_PROTENSET1_PROTREG36_Set BPROT_CONFIG1_REGION36_Enabled + +#define MPU_PROTENSET1_PROTREG35_Pos BPROT_CONFIG1_REGION35_Pos +#define MPU_PROTENSET1_PROTREG35_Msk BPROT_CONFIG1_REGION35_Msk +#define MPU_PROTENSET1_PROTREG35_Disabled BPROT_CONFIG1_REGION35_Disabled +#define MPU_PROTENSET1_PROTREG35_Enabled BPROT_CONFIG1_REGION35_Enabled +#define MPU_PROTENSET1_PROTREG35_Set BPROT_CONFIG1_REGION35_Enabled + +#define MPU_PROTENSET1_PROTREG34_Pos BPROT_CONFIG1_REGION34_Pos +#define MPU_PROTENSET1_PROTREG34_Msk BPROT_CONFIG1_REGION34_Msk +#define MPU_PROTENSET1_PROTREG34_Disabled BPROT_CONFIG1_REGION34_Disabled +#define MPU_PROTENSET1_PROTREG34_Enabled BPROT_CONFIG1_REGION34_Enabled +#define MPU_PROTENSET1_PROTREG34_Set BPROT_CONFIG1_REGION34_Enabled + +#define MPU_PROTENSET1_PROTREG33_Pos BPROT_CONFIG1_REGION33_Pos +#define MPU_PROTENSET1_PROTREG33_Msk BPROT_CONFIG1_REGION33_Msk +#define MPU_PROTENSET1_PROTREG33_Disabled BPROT_CONFIG1_REGION33_Disabled +#define MPU_PROTENSET1_PROTREG33_Enabled BPROT_CONFIG1_REGION33_Enabled +#define MPU_PROTENSET1_PROTREG33_Set BPROT_CONFIG1_REGION33_Enabled + +#define MPU_PROTENSET1_PROTREG32_Pos BPROT_CONFIG1_REGION32_Pos +#define MPU_PROTENSET1_PROTREG32_Msk BPROT_CONFIG1_REGION32_Msk +#define MPU_PROTENSET1_PROTREG32_Disabled BPROT_CONFIG1_REGION32_Disabled +#define MPU_PROTENSET1_PROTREG32_Enabled BPROT_CONFIG1_REGION32_Enabled +#define MPU_PROTENSET1_PROTREG32_Set BPROT_CONFIG1_REGION32_Enabled + +#define MPU_PROTENSET0_PROTREG31_Pos BPROT_CONFIG0_REGION31_Pos +#define MPU_PROTENSET0_PROTREG31_Msk BPROT_CONFIG0_REGION31_Msk +#define MPU_PROTENSET0_PROTREG31_Disabled BPROT_CONFIG0_REGION31_Disabled +#define MPU_PROTENSET0_PROTREG31_Enabled BPROT_CONFIG0_REGION31_Enabled +#define MPU_PROTENSET0_PROTREG31_Set BPROT_CONFIG0_REGION31_Enabled + +#define MPU_PROTENSET0_PROTREG30_Pos BPROT_CONFIG0_REGION30_Pos +#define MPU_PROTENSET0_PROTREG30_Msk BPROT_CONFIG0_REGION30_Msk +#define MPU_PROTENSET0_PROTREG30_Disabled BPROT_CONFIG0_REGION30_Disabled +#define MPU_PROTENSET0_PROTREG30_Enabled BPROT_CONFIG0_REGION30_Enabled +#define MPU_PROTENSET0_PROTREG30_Set BPROT_CONFIG0_REGION30_Enabled + +#define MPU_PROTENSET0_PROTREG29_Pos BPROT_CONFIG0_REGION29_Pos +#define MPU_PROTENSET0_PROTREG29_Msk BPROT_CONFIG0_REGION29_Msk +#define MPU_PROTENSET0_PROTREG29_Disabled BPROT_CONFIG0_REGION29_Disabled +#define MPU_PROTENSET0_PROTREG29_Enabled BPROT_CONFIG0_REGION29_Enabled +#define MPU_PROTENSET0_PROTREG29_Set BPROT_CONFIG0_REGION29_Enabled + +#define MPU_PROTENSET0_PROTREG28_Pos BPROT_CONFIG0_REGION28_Pos +#define MPU_PROTENSET0_PROTREG28_Msk BPROT_CONFIG0_REGION28_Msk +#define MPU_PROTENSET0_PROTREG28_Disabled BPROT_CONFIG0_REGION28_Disabled +#define MPU_PROTENSET0_PROTREG28_Enabled BPROT_CONFIG0_REGION28_Enabled +#define MPU_PROTENSET0_PROTREG28_Set BPROT_CONFIG0_REGION28_Enabled + +#define MPU_PROTENSET0_PROTREG27_Pos BPROT_CONFIG0_REGION27_Pos +#define MPU_PROTENSET0_PROTREG27_Msk BPROT_CONFIG0_REGION27_Msk +#define MPU_PROTENSET0_PROTREG27_Disabled BPROT_CONFIG0_REGION27_Disabled +#define MPU_PROTENSET0_PROTREG27_Enabled BPROT_CONFIG0_REGION27_Enabled +#define MPU_PROTENSET0_PROTREG27_Set BPROT_CONFIG0_REGION27_Enabled + +#define MPU_PROTENSET0_PROTREG26_Pos BPROT_CONFIG0_REGION26_Pos +#define MPU_PROTENSET0_PROTREG26_Msk BPROT_CONFIG0_REGION26_Msk +#define MPU_PROTENSET0_PROTREG26_Disabled BPROT_CONFIG0_REGION26_Disabled +#define MPU_PROTENSET0_PROTREG26_Enabled BPROT_CONFIG0_REGION26_Enabled +#define MPU_PROTENSET0_PROTREG26_Set BPROT_CONFIG0_REGION26_Enabled + +#define MPU_PROTENSET0_PROTREG25_Pos BPROT_CONFIG0_REGION25_Pos +#define MPU_PROTENSET0_PROTREG25_Msk BPROT_CONFIG0_REGION25_Msk +#define MPU_PROTENSET0_PROTREG25_Disabled BPROT_CONFIG0_REGION25_Disabled +#define MPU_PROTENSET0_PROTREG25_Enabled BPROT_CONFIG0_REGION25_Enabled +#define MPU_PROTENSET0_PROTREG25_Set BPROT_CONFIG0_REGION25_Enabled + +#define MPU_PROTENSET0_PROTREG24_Pos BPROT_CONFIG0_REGION24_Pos +#define MPU_PROTENSET0_PROTREG24_Msk BPROT_CONFIG0_REGION24_Msk +#define MPU_PROTENSET0_PROTREG24_Disabled BPROT_CONFIG0_REGION24_Disabled +#define MPU_PROTENSET0_PROTREG24_Enabled BPROT_CONFIG0_REGION24_Enabled +#define MPU_PROTENSET0_PROTREG24_Set BPROT_CONFIG0_REGION24_Enabled + +#define MPU_PROTENSET0_PROTREG23_Pos BPROT_CONFIG0_REGION23_Pos +#define MPU_PROTENSET0_PROTREG23_Msk BPROT_CONFIG0_REGION23_Msk +#define MPU_PROTENSET0_PROTREG23_Disabled BPROT_CONFIG0_REGION23_Disabled +#define MPU_PROTENSET0_PROTREG23_Enabled BPROT_CONFIG0_REGION23_Enabled +#define MPU_PROTENSET0_PROTREG23_Set BPROT_CONFIG0_REGION23_Enabled + +#define MPU_PROTENSET0_PROTREG22_Pos BPROT_CONFIG0_REGION22_Pos +#define MPU_PROTENSET0_PROTREG22_Msk BPROT_CONFIG0_REGION22_Msk +#define MPU_PROTENSET0_PROTREG22_Disabled BPROT_CONFIG0_REGION22_Disabled +#define MPU_PROTENSET0_PROTREG22_Enabled BPROT_CONFIG0_REGION22_Enabled +#define MPU_PROTENSET0_PROTREG22_Set BPROT_CONFIG0_REGION22_Enabled + +#define MPU_PROTENSET0_PROTREG21_Pos BPROT_CONFIG0_REGION21_Pos +#define MPU_PROTENSET0_PROTREG21_Msk BPROT_CONFIG0_REGION21_Msk +#define MPU_PROTENSET0_PROTREG21_Disabled BPROT_CONFIG0_REGION21_Disabled +#define MPU_PROTENSET0_PROTREG21_Enabled BPROT_CONFIG0_REGION21_Enabled +#define MPU_PROTENSET0_PROTREG21_Set BPROT_CONFIG0_REGION21_Enabled + +#define MPU_PROTENSET0_PROTREG20_Pos BPROT_CONFIG0_REGION20_Pos +#define MPU_PROTENSET0_PROTREG20_Msk BPROT_CONFIG0_REGION20_Msk +#define MPU_PROTENSET0_PROTREG20_Disabled BPROT_CONFIG0_REGION20_Disabled +#define MPU_PROTENSET0_PROTREG20_Enabled BPROT_CONFIG0_REGION20_Enabled +#define MPU_PROTENSET0_PROTREG20_Set BPROT_CONFIG0_REGION20_Enabled + +#define MPU_PROTENSET0_PROTREG19_Pos BPROT_CONFIG0_REGION19_Pos +#define MPU_PROTENSET0_PROTREG19_Msk BPROT_CONFIG0_REGION19_Msk +#define MPU_PROTENSET0_PROTREG19_Disabled BPROT_CONFIG0_REGION19_Disabled +#define MPU_PROTENSET0_PROTREG19_Enabled BPROT_CONFIG0_REGION19_Enabled +#define MPU_PROTENSET0_PROTREG19_Set BPROT_CONFIG0_REGION19_Enabled + +#define MPU_PROTENSET0_PROTREG18_Pos BPROT_CONFIG0_REGION18_Pos +#define MPU_PROTENSET0_PROTREG18_Msk BPROT_CONFIG0_REGION18_Msk +#define MPU_PROTENSET0_PROTREG18_Disabled BPROT_CONFIG0_REGION18_Disabled +#define MPU_PROTENSET0_PROTREG18_Enabled BPROT_CONFIG0_REGION18_Enabled +#define MPU_PROTENSET0_PROTREG18_Set BPROT_CONFIG0_REGION18_Enabled + +#define MPU_PROTENSET0_PROTREG17_Pos BPROT_CONFIG0_REGION17_Pos +#define MPU_PROTENSET0_PROTREG17_Msk BPROT_CONFIG0_REGION17_Msk +#define MPU_PROTENSET0_PROTREG17_Disabled BPROT_CONFIG0_REGION17_Disabled +#define MPU_PROTENSET0_PROTREG17_Enabled BPROT_CONFIG0_REGION17_Enabled +#define MPU_PROTENSET0_PROTREG17_Set BPROT_CONFIG0_REGION17_Enabled + +#define MPU_PROTENSET0_PROTREG16_Pos BPROT_CONFIG0_REGION16_Pos +#define MPU_PROTENSET0_PROTREG16_Msk BPROT_CONFIG0_REGION16_Msk +#define MPU_PROTENSET0_PROTREG16_Disabled BPROT_CONFIG0_REGION16_Disabled +#define MPU_PROTENSET0_PROTREG16_Enabled BPROT_CONFIG0_REGION16_Enabled +#define MPU_PROTENSET0_PROTREG16_Set BPROT_CONFIG0_REGION16_Enabled + +#define MPU_PROTENSET0_PROTREG15_Pos BPROT_CONFIG0_REGION15_Pos +#define MPU_PROTENSET0_PROTREG15_Msk BPROT_CONFIG0_REGION15_Msk +#define MPU_PROTENSET0_PROTREG15_Disabled BPROT_CONFIG0_REGION15_Disabled +#define MPU_PROTENSET0_PROTREG15_Enabled BPROT_CONFIG0_REGION15_Enabled +#define MPU_PROTENSET0_PROTREG15_Set BPROT_CONFIG0_REGION15_Enabled + +#define MPU_PROTENSET0_PROTREG14_Pos BPROT_CONFIG0_REGION14_Pos +#define MPU_PROTENSET0_PROTREG14_Msk BPROT_CONFIG0_REGION14_Msk +#define MPU_PROTENSET0_PROTREG14_Disabled BPROT_CONFIG0_REGION14_Disabled +#define MPU_PROTENSET0_PROTREG14_Enabled BPROT_CONFIG0_REGION14_Enabled +#define MPU_PROTENSET0_PROTREG14_Set BPROT_CONFIG0_REGION14_Enabled + +#define MPU_PROTENSET0_PROTREG13_Pos BPROT_CONFIG0_REGION13_Pos +#define MPU_PROTENSET0_PROTREG13_Msk BPROT_CONFIG0_REGION13_Msk +#define MPU_PROTENSET0_PROTREG13_Disabled BPROT_CONFIG0_REGION13_Disabled +#define MPU_PROTENSET0_PROTREG13_Enabled BPROT_CONFIG0_REGION13_Enabled +#define MPU_PROTENSET0_PROTREG13_Set BPROT_CONFIG0_REGION13_Enabled + +#define MPU_PROTENSET0_PROTREG12_Pos BPROT_CONFIG0_REGION12_Pos +#define MPU_PROTENSET0_PROTREG12_Msk BPROT_CONFIG0_REGION12_Msk +#define MPU_PROTENSET0_PROTREG12_Disabled BPROT_CONFIG0_REGION12_Disabled +#define MPU_PROTENSET0_PROTREG12_Enabled BPROT_CONFIG0_REGION12_Enabled +#define MPU_PROTENSET0_PROTREG12_Set BPROT_CONFIG0_REGION12_Enabled + +#define MPU_PROTENSET0_PROTREG11_Pos BPROT_CONFIG0_REGION11_Pos +#define MPU_PROTENSET0_PROTREG11_Msk BPROT_CONFIG0_REGION11_Msk +#define MPU_PROTENSET0_PROTREG11_Disabled BPROT_CONFIG0_REGION11_Disabled +#define MPU_PROTENSET0_PROTREG11_Enabled BPROT_CONFIG0_REGION11_Enabled +#define MPU_PROTENSET0_PROTREG11_Set BPROT_CONFIG0_REGION11_Enabled + +#define MPU_PROTENSET0_PROTREG10_Pos BPROT_CONFIG0_REGION10_Pos +#define MPU_PROTENSET0_PROTREG10_Msk BPROT_CONFIG0_REGION10_Msk +#define MPU_PROTENSET0_PROTREG10_Disabled BPROT_CONFIG0_REGION10_Disabled +#define MPU_PROTENSET0_PROTREG10_Enabled BPROT_CONFIG0_REGION10_Enabled +#define MPU_PROTENSET0_PROTREG10_Set BPROT_CONFIG0_REGION10_Enabled + +#define MPU_PROTENSET0_PROTREG9_Pos BPROT_CONFIG0_REGION9_Pos +#define MPU_PROTENSET0_PROTREG9_Msk BPROT_CONFIG0_REGION9_Msk +#define MPU_PROTENSET0_PROTREG9_Disabled BPROT_CONFIG0_REGION9_Disabled +#define MPU_PROTENSET0_PROTREG9_Enabled BPROT_CONFIG0_REGION9_Enabled +#define MPU_PROTENSET0_PROTREG9_Set BPROT_CONFIG0_REGION9_Enabled + +#define MPU_PROTENSET0_PROTREG8_Pos BPROT_CONFIG0_REGION8_Pos +#define MPU_PROTENSET0_PROTREG8_Msk BPROT_CONFIG0_REGION8_Msk +#define MPU_PROTENSET0_PROTREG8_Disabled BPROT_CONFIG0_REGION8_Disabled +#define MPU_PROTENSET0_PROTREG8_Enabled BPROT_CONFIG0_REGION8_Enabled +#define MPU_PROTENSET0_PROTREG8_Set BPROT_CONFIG0_REGION8_Enabled + +#define MPU_PROTENSET0_PROTREG7_Pos BPROT_CONFIG0_REGION7_Pos +#define MPU_PROTENSET0_PROTREG7_Msk BPROT_CONFIG0_REGION7_Msk +#define MPU_PROTENSET0_PROTREG7_Disabled BPROT_CONFIG0_REGION7_Disabled +#define MPU_PROTENSET0_PROTREG7_Enabled BPROT_CONFIG0_REGION7_Enabled +#define MPU_PROTENSET0_PROTREG7_Set BPROT_CONFIG0_REGION7_Enabled + +#define MPU_PROTENSET0_PROTREG6_Pos BPROT_CONFIG0_REGION6_Pos +#define MPU_PROTENSET0_PROTREG6_Msk BPROT_CONFIG0_REGION6_Msk +#define MPU_PROTENSET0_PROTREG6_Disabled BPROT_CONFIG0_REGION6_Disabled +#define MPU_PROTENSET0_PROTREG6_Enabled BPROT_CONFIG0_REGION6_Enabled +#define MPU_PROTENSET0_PROTREG6_Set BPROT_CONFIG0_REGION6_Enabled + +#define MPU_PROTENSET0_PROTREG5_Pos BPROT_CONFIG0_REGION5_Pos +#define MPU_PROTENSET0_PROTREG5_Msk BPROT_CONFIG0_REGION5_Msk +#define MPU_PROTENSET0_PROTREG5_Disabled BPROT_CONFIG0_REGION5_Disabled +#define MPU_PROTENSET0_PROTREG5_Enabled BPROT_CONFIG0_REGION5_Enabled +#define MPU_PROTENSET0_PROTREG5_Set BPROT_CONFIG0_REGION5_Enabled + +#define MPU_PROTENSET0_PROTREG4_Pos BPROT_CONFIG0_REGION4_Pos +#define MPU_PROTENSET0_PROTREG4_Msk BPROT_CONFIG0_REGION4_Msk +#define MPU_PROTENSET0_PROTREG4_Disabled BPROT_CONFIG0_REGION4_Disabled +#define MPU_PROTENSET0_PROTREG4_Enabled BPROT_CONFIG0_REGION4_Enabled +#define MPU_PROTENSET0_PROTREG4_Set BPROT_CONFIG0_REGION4_Enabled + +#define MPU_PROTENSET0_PROTREG3_Pos BPROT_CONFIG0_REGION3_Pos +#define MPU_PROTENSET0_PROTREG3_Msk BPROT_CONFIG0_REGION3_Msk +#define MPU_PROTENSET0_PROTREG3_Disabled BPROT_CONFIG0_REGION3_Disabled +#define MPU_PROTENSET0_PROTREG3_Enabled BPROT_CONFIG0_REGION3_Enabled +#define MPU_PROTENSET0_PROTREG3_Set BPROT_CONFIG0_REGION3_Enabled + +#define MPU_PROTENSET0_PROTREG2_Pos BPROT_CONFIG0_REGION2_Pos +#define MPU_PROTENSET0_PROTREG2_Msk BPROT_CONFIG0_REGION2_Msk +#define MPU_PROTENSET0_PROTREG2_Disabled BPROT_CONFIG0_REGION2_Disabled +#define MPU_PROTENSET0_PROTREG2_Enabled BPROT_CONFIG0_REGION2_Enabled +#define MPU_PROTENSET0_PROTREG2_Set BPROT_CONFIG0_REGION2_Enabled + +#define MPU_PROTENSET0_PROTREG1_Pos BPROT_CONFIG0_REGION1_Pos +#define MPU_PROTENSET0_PROTREG1_Msk BPROT_CONFIG0_REGION1_Msk +#define MPU_PROTENSET0_PROTREG1_Disabled BPROT_CONFIG0_REGION1_Disabled +#define MPU_PROTENSET0_PROTREG1_Enabled BPROT_CONFIG0_REGION1_Enabled +#define MPU_PROTENSET0_PROTREG1_Set BPROT_CONFIG0_REGION1_Enabled + +#define MPU_PROTENSET0_PROTREG0_Pos BPROT_CONFIG0_REGION0_Pos +#define MPU_PROTENSET0_PROTREG0_Msk BPROT_CONFIG0_REGION0_Msk +#define MPU_PROTENSET0_PROTREG0_Disabled BPROT_CONFIG0_REGION0_Disabled +#define MPU_PROTENSET0_PROTREG0_Enabled BPROT_CONFIG0_REGION0_Enabled +#define MPU_PROTENSET0_PROTREG0_Set BPROT_CONFIG0_REGION0_Enabled + + +/* From nrf51_deprecated.h */ + +/* NVMC */ +/* The register ERASEPROTECTEDPAGE changed name to ERASEPCR0 in the documentation. */ +#define ERASEPROTECTEDPAGE ERASEPCR0 + + +/* IRQ */ +/* COMP module was eliminated. Adapted to nrf52 headers. */ +#define LPCOMP_COMP_IRQHandler COMP_LPCOMP_IRQHandler +#define LPCOMP_COMP_IRQn COMP_LPCOMP_IRQn + + +/* RADIO */ +/* The name of the field SKIPADDR was corrected. Old macros added for compatibility. */ +#define RADIO_CRCCNF_SKIP_ADDR_Pos RADIO_CRCCNF_SKIPADDR_Pos +#define RADIO_CRCCNF_SKIP_ADDR_Msk RADIO_CRCCNF_SKIPADDR_Msk +#define RADIO_CRCCNF_SKIP_ADDR_Include RADIO_CRCCNF_SKIPADDR_Include +#define RADIO_CRCCNF_SKIP_ADDR_Skip RADIO_CRCCNF_SKIPADDR_Skip + + +/* FICR */ +/* The registers FICR.DEVICEID0 and FICR.DEVICEID1 were renamed into an array. */ +#define DEVICEID0 DEVICEID[0] +#define DEVICEID1 DEVICEID[1] + +/* The registers FICR.ER0, FICR.ER1, FICR.ER2 and FICR.ER3 were renamed into an array. */ +#define ER0 ER[0] +#define ER1 ER[1] +#define ER2 ER[2] +#define ER3 ER[3] + +/* The registers FICR.IR0, FICR.IR1, FICR.IR2 and FICR.IR3 were renamed into an array. */ +#define IR0 IR[0] +#define IR1 IR[1] +#define IR2 IR[2] +#define IR3 IR[3] + +/* The registers FICR.DEVICEADDR0 and FICR.DEVICEADDR1 were renamed into an array. */ +#define DEVICEADDR0 DEVICEADDR[0] +#define DEVICEADDR1 DEVICEADDR[1] + + +/* PPI */ +/* The tasks PPI.TASKS_CHGxEN and PPI.TASKS_CHGxDIS were renamed into an array of structs. */ +#define TASKS_CHG0EN TASKS_CHG[0].EN +#define TASKS_CHG0DIS TASKS_CHG[0].DIS +#define TASKS_CHG1EN TASKS_CHG[1].EN +#define TASKS_CHG1DIS TASKS_CHG[1].DIS +#define TASKS_CHG2EN TASKS_CHG[2].EN +#define TASKS_CHG2DIS TASKS_CHG[2].DIS +#define TASKS_CHG3EN TASKS_CHG[3].EN +#define TASKS_CHG3DIS TASKS_CHG[3].DIS + +/* The registers PPI.CHx_EEP and PPI.CHx_TEP were renamed into an array of structs. */ +#define CH0_EEP CH[0].EEP +#define CH0_TEP CH[0].TEP +#define CH1_EEP CH[1].EEP +#define CH1_TEP CH[1].TEP +#define CH2_EEP CH[2].EEP +#define CH2_TEP CH[2].TEP +#define CH3_EEP CH[3].EEP +#define CH3_TEP CH[3].TEP +#define CH4_EEP CH[4].EEP +#define CH4_TEP CH[4].TEP +#define CH5_EEP CH[5].EEP +#define CH5_TEP CH[5].TEP +#define CH6_EEP CH[6].EEP +#define CH6_TEP CH[6].TEP +#define CH7_EEP CH[7].EEP +#define CH7_TEP CH[7].TEP +#define CH8_EEP CH[8].EEP +#define CH8_TEP CH[8].TEP +#define CH9_EEP CH[9].EEP +#define CH9_TEP CH[9].TEP +#define CH10_EEP CH[10].EEP +#define CH10_TEP CH[10].TEP +#define CH11_EEP CH[11].EEP +#define CH11_TEP CH[11].TEP +#define CH12_EEP CH[12].EEP +#define CH12_TEP CH[12].TEP +#define CH13_EEP CH[13].EEP +#define CH13_TEP CH[13].TEP +#define CH14_EEP CH[14].EEP +#define CH14_TEP CH[14].TEP +#define CH15_EEP CH[15].EEP +#define CH15_TEP CH[15].TEP + +/* The registers PPI.CHG0, PPI.CHG1, PPI.CHG2 and PPI.CHG3 were renamed into an array. */ +#define CHG0 CHG[0] +#define CHG1 CHG[1] +#define CHG2 CHG[2] +#define CHG3 CHG[3] + +/* All bitfield macros for the CHGx registers therefore changed name. */ +#define PPI_CHG0_CH15_Pos PPI_CHG_CH15_Pos +#define PPI_CHG0_CH15_Msk PPI_CHG_CH15_Msk +#define PPI_CHG0_CH15_Excluded PPI_CHG_CH15_Excluded +#define PPI_CHG0_CH15_Included PPI_CHG_CH15_Included + +#define PPI_CHG0_CH14_Pos PPI_CHG_CH14_Pos +#define PPI_CHG0_CH14_Msk PPI_CHG_CH14_Msk +#define PPI_CHG0_CH14_Excluded PPI_CHG_CH14_Excluded +#define PPI_CHG0_CH14_Included PPI_CHG_CH14_Included + +#define PPI_CHG0_CH13_Pos PPI_CHG_CH13_Pos +#define PPI_CHG0_CH13_Msk PPI_CHG_CH13_Msk +#define PPI_CHG0_CH13_Excluded PPI_CHG_CH13_Excluded +#define PPI_CHG0_CH13_Included PPI_CHG_CH13_Included + +#define PPI_CHG0_CH12_Pos PPI_CHG_CH12_Pos +#define PPI_CHG0_CH12_Msk PPI_CHG_CH12_Msk +#define PPI_CHG0_CH12_Excluded PPI_CHG_CH12_Excluded +#define PPI_CHG0_CH12_Included PPI_CHG_CH12_Included + +#define PPI_CHG0_CH11_Pos PPI_CHG_CH11_Pos +#define PPI_CHG0_CH11_Msk PPI_CHG_CH11_Msk +#define PPI_CHG0_CH11_Excluded PPI_CHG_CH11_Excluded +#define PPI_CHG0_CH11_Included PPI_CHG_CH11_Included + +#define PPI_CHG0_CH10_Pos PPI_CHG_CH10_Pos +#define PPI_CHG0_CH10_Msk PPI_CHG_CH10_Msk +#define PPI_CHG0_CH10_Excluded PPI_CHG_CH10_Excluded +#define PPI_CHG0_CH10_Included PPI_CHG_CH10_Included + +#define PPI_CHG0_CH9_Pos PPI_CHG_CH9_Pos +#define PPI_CHG0_CH9_Msk PPI_CHG_CH9_Msk +#define PPI_CHG0_CH9_Excluded PPI_CHG_CH9_Excluded +#define PPI_CHG0_CH9_Included PPI_CHG_CH9_Included + +#define PPI_CHG0_CH8_Pos PPI_CHG_CH8_Pos +#define PPI_CHG0_CH8_Msk PPI_CHG_CH8_Msk +#define PPI_CHG0_CH8_Excluded PPI_CHG_CH8_Excluded +#define PPI_CHG0_CH8_Included PPI_CHG_CH8_Included + +#define PPI_CHG0_CH7_Pos PPI_CHG_CH7_Pos +#define PPI_CHG0_CH7_Msk PPI_CHG_CH7_Msk +#define PPI_CHG0_CH7_Excluded PPI_CHG_CH7_Excluded +#define PPI_CHG0_CH7_Included PPI_CHG_CH7_Included + +#define PPI_CHG0_CH6_Pos PPI_CHG_CH6_Pos +#define PPI_CHG0_CH6_Msk PPI_CHG_CH6_Msk +#define PPI_CHG0_CH6_Excluded PPI_CHG_CH6_Excluded +#define PPI_CHG0_CH6_Included PPI_CHG_CH6_Included + +#define PPI_CHG0_CH5_Pos PPI_CHG_CH5_Pos +#define PPI_CHG0_CH5_Msk PPI_CHG_CH5_Msk +#define PPI_CHG0_CH5_Excluded PPI_CHG_CH5_Excluded +#define PPI_CHG0_CH5_Included PPI_CHG_CH5_Included + +#define PPI_CHG0_CH4_Pos PPI_CHG_CH4_Pos +#define PPI_CHG0_CH4_Msk PPI_CHG_CH4_Msk +#define PPI_CHG0_CH4_Excluded PPI_CHG_CH4_Excluded +#define PPI_CHG0_CH4_Included PPI_CHG_CH4_Included + +#define PPI_CHG0_CH3_Pos PPI_CHG_CH3_Pos +#define PPI_CHG0_CH3_Msk PPI_CHG_CH3_Msk +#define PPI_CHG0_CH3_Excluded PPI_CHG_CH3_Excluded +#define PPI_CHG0_CH3_Included PPI_CHG_CH3_Included + +#define PPI_CHG0_CH2_Pos PPI_CHG_CH2_Pos +#define PPI_CHG0_CH2_Msk PPI_CHG_CH2_Msk +#define PPI_CHG0_CH2_Excluded PPI_CHG_CH2_Excluded +#define PPI_CHG0_CH2_Included PPI_CHG_CH2_Included + +#define PPI_CHG0_CH1_Pos PPI_CHG_CH1_Pos +#define PPI_CHG0_CH1_Msk PPI_CHG_CH1_Msk +#define PPI_CHG0_CH1_Excluded PPI_CHG_CH1_Excluded +#define PPI_CHG0_CH1_Included PPI_CHG_CH1_Included + +#define PPI_CHG0_CH0_Pos PPI_CHG_CH0_Pos +#define PPI_CHG0_CH0_Msk PPI_CHG_CH0_Msk +#define PPI_CHG0_CH0_Excluded PPI_CHG_CH0_Excluded +#define PPI_CHG0_CH0_Included PPI_CHG_CH0_Included + +#define PPI_CHG1_CH15_Pos PPI_CHG_CH15_Pos +#define PPI_CHG1_CH15_Msk PPI_CHG_CH15_Msk +#define PPI_CHG1_CH15_Excluded PPI_CHG_CH15_Excluded +#define PPI_CHG1_CH15_Included PPI_CHG_CH15_Included + +#define PPI_CHG1_CH14_Pos PPI_CHG_CH14_Pos +#define PPI_CHG1_CH14_Msk PPI_CHG_CH14_Msk +#define PPI_CHG1_CH14_Excluded PPI_CHG_CH14_Excluded +#define PPI_CHG1_CH14_Included PPI_CHG_CH14_Included + +#define PPI_CHG1_CH13_Pos PPI_CHG_CH13_Pos +#define PPI_CHG1_CH13_Msk PPI_CHG_CH13_Msk +#define PPI_CHG1_CH13_Excluded PPI_CHG_CH13_Excluded +#define PPI_CHG1_CH13_Included PPI_CHG_CH13_Included + +#define PPI_CHG1_CH12_Pos PPI_CHG_CH12_Pos +#define PPI_CHG1_CH12_Msk PPI_CHG_CH12_Msk +#define PPI_CHG1_CH12_Excluded PPI_CHG_CH12_Excluded +#define PPI_CHG1_CH12_Included PPI_CHG_CH12_Included + +#define PPI_CHG1_CH11_Pos PPI_CHG_CH11_Pos +#define PPI_CHG1_CH11_Msk PPI_CHG_CH11_Msk +#define PPI_CHG1_CH11_Excluded PPI_CHG_CH11_Excluded +#define PPI_CHG1_CH11_Included PPI_CHG_CH11_Included + +#define PPI_CHG1_CH10_Pos PPI_CHG_CH10_Pos +#define PPI_CHG1_CH10_Msk PPI_CHG_CH10_Msk +#define PPI_CHG1_CH10_Excluded PPI_CHG_CH10_Excluded +#define PPI_CHG1_CH10_Included PPI_CHG_CH10_Included + +#define PPI_CHG1_CH9_Pos PPI_CHG_CH9_Pos +#define PPI_CHG1_CH9_Msk PPI_CHG_CH9_Msk +#define PPI_CHG1_CH9_Excluded PPI_CHG_CH9_Excluded +#define PPI_CHG1_CH9_Included PPI_CHG_CH9_Included + +#define PPI_CHG1_CH8_Pos PPI_CHG_CH8_Pos +#define PPI_CHG1_CH8_Msk PPI_CHG_CH8_Msk +#define PPI_CHG1_CH8_Excluded PPI_CHG_CH8_Excluded +#define PPI_CHG1_CH8_Included PPI_CHG_CH8_Included + +#define PPI_CHG1_CH7_Pos PPI_CHG_CH7_Pos +#define PPI_CHG1_CH7_Msk PPI_CHG_CH7_Msk +#define PPI_CHG1_CH7_Excluded PPI_CHG_CH7_Excluded +#define PPI_CHG1_CH7_Included PPI_CHG_CH7_Included + +#define PPI_CHG1_CH6_Pos PPI_CHG_CH6_Pos +#define PPI_CHG1_CH6_Msk PPI_CHG_CH6_Msk +#define PPI_CHG1_CH6_Excluded PPI_CHG_CH6_Excluded +#define PPI_CHG1_CH6_Included PPI_CHG_CH6_Included + +#define PPI_CHG1_CH5_Pos PPI_CHG_CH5_Pos +#define PPI_CHG1_CH5_Msk PPI_CHG_CH5_Msk +#define PPI_CHG1_CH5_Excluded PPI_CHG_CH5_Excluded +#define PPI_CHG1_CH5_Included PPI_CHG_CH5_Included + +#define PPI_CHG1_CH4_Pos PPI_CHG_CH4_Pos +#define PPI_CHG1_CH4_Msk PPI_CHG_CH4_Msk +#define PPI_CHG1_CH4_Excluded PPI_CHG_CH4_Excluded +#define PPI_CHG1_CH4_Included PPI_CHG_CH4_Included + +#define PPI_CHG1_CH3_Pos PPI_CHG_CH3_Pos +#define PPI_CHG1_CH3_Msk PPI_CHG_CH3_Msk +#define PPI_CHG1_CH3_Excluded PPI_CHG_CH3_Excluded +#define PPI_CHG1_CH3_Included PPI_CHG_CH3_Included + +#define PPI_CHG1_CH2_Pos PPI_CHG_CH2_Pos +#define PPI_CHG1_CH2_Msk PPI_CHG_CH2_Msk +#define PPI_CHG1_CH2_Excluded PPI_CHG_CH2_Excluded +#define PPI_CHG1_CH2_Included PPI_CHG_CH2_Included + +#define PPI_CHG1_CH1_Pos PPI_CHG_CH1_Pos +#define PPI_CHG1_CH1_Msk PPI_CHG_CH1_Msk +#define PPI_CHG1_CH1_Excluded PPI_CHG_CH1_Excluded +#define PPI_CHG1_CH1_Included PPI_CHG_CH1_Included + +#define PPI_CHG1_CH0_Pos PPI_CHG_CH0_Pos +#define PPI_CHG1_CH0_Msk PPI_CHG_CH0_Msk +#define PPI_CHG1_CH0_Excluded PPI_CHG_CH0_Excluded +#define PPI_CHG1_CH0_Included PPI_CHG_CH0_Included + +#define PPI_CHG2_CH15_Pos PPI_CHG_CH15_Pos +#define PPI_CHG2_CH15_Msk PPI_CHG_CH15_Msk +#define PPI_CHG2_CH15_Excluded PPI_CHG_CH15_Excluded +#define PPI_CHG2_CH15_Included PPI_CHG_CH15_Included + +#define PPI_CHG2_CH14_Pos PPI_CHG_CH14_Pos +#define PPI_CHG2_CH14_Msk PPI_CHG_CH14_Msk +#define PPI_CHG2_CH14_Excluded PPI_CHG_CH14_Excluded +#define PPI_CHG2_CH14_Included PPI_CHG_CH14_Included + +#define PPI_CHG2_CH13_Pos PPI_CHG_CH13_Pos +#define PPI_CHG2_CH13_Msk PPI_CHG_CH13_Msk +#define PPI_CHG2_CH13_Excluded PPI_CHG_CH13_Excluded +#define PPI_CHG2_CH13_Included PPI_CHG_CH13_Included + +#define PPI_CHG2_CH12_Pos PPI_CHG_CH12_Pos +#define PPI_CHG2_CH12_Msk PPI_CHG_CH12_Msk +#define PPI_CHG2_CH12_Excluded PPI_CHG_CH12_Excluded +#define PPI_CHG2_CH12_Included PPI_CHG_CH12_Included + +#define PPI_CHG2_CH11_Pos PPI_CHG_CH11_Pos +#define PPI_CHG2_CH11_Msk PPI_CHG_CH11_Msk +#define PPI_CHG2_CH11_Excluded PPI_CHG_CH11_Excluded +#define PPI_CHG2_CH11_Included PPI_CHG_CH11_Included + +#define PPI_CHG2_CH10_Pos PPI_CHG_CH10_Pos +#define PPI_CHG2_CH10_Msk PPI_CHG_CH10_Msk +#define PPI_CHG2_CH10_Excluded PPI_CHG_CH10_Excluded +#define PPI_CHG2_CH10_Included PPI_CHG_CH10_Included + +#define PPI_CHG2_CH9_Pos PPI_CHG_CH9_Pos +#define PPI_CHG2_CH9_Msk PPI_CHG_CH9_Msk +#define PPI_CHG2_CH9_Excluded PPI_CHG_CH9_Excluded +#define PPI_CHG2_CH9_Included PPI_CHG_CH9_Included + +#define PPI_CHG2_CH8_Pos PPI_CHG_CH8_Pos +#define PPI_CHG2_CH8_Msk PPI_CHG_CH8_Msk +#define PPI_CHG2_CH8_Excluded PPI_CHG_CH8_Excluded +#define PPI_CHG2_CH8_Included PPI_CHG_CH8_Included + +#define PPI_CHG2_CH7_Pos PPI_CHG_CH7_Pos +#define PPI_CHG2_CH7_Msk PPI_CHG_CH7_Msk +#define PPI_CHG2_CH7_Excluded PPI_CHG_CH7_Excluded +#define PPI_CHG2_CH7_Included PPI_CHG_CH7_Included + +#define PPI_CHG2_CH6_Pos PPI_CHG_CH6_Pos +#define PPI_CHG2_CH6_Msk PPI_CHG_CH6_Msk +#define PPI_CHG2_CH6_Excluded PPI_CHG_CH6_Excluded +#define PPI_CHG2_CH6_Included PPI_CHG_CH6_Included + +#define PPI_CHG2_CH5_Pos PPI_CHG_CH5_Pos +#define PPI_CHG2_CH5_Msk PPI_CHG_CH5_Msk +#define PPI_CHG2_CH5_Excluded PPI_CHG_CH5_Excluded +#define PPI_CHG2_CH5_Included PPI_CHG_CH5_Included + +#define PPI_CHG2_CH4_Pos PPI_CHG_CH4_Pos +#define PPI_CHG2_CH4_Msk PPI_CHG_CH4_Msk +#define PPI_CHG2_CH4_Excluded PPI_CHG_CH4_Excluded +#define PPI_CHG2_CH4_Included PPI_CHG_CH4_Included + +#define PPI_CHG2_CH3_Pos PPI_CHG_CH3_Pos +#define PPI_CHG2_CH3_Msk PPI_CHG_CH3_Msk +#define PPI_CHG2_CH3_Excluded PPI_CHG_CH3_Excluded +#define PPI_CHG2_CH3_Included PPI_CHG_CH3_Included + +#define PPI_CHG2_CH2_Pos PPI_CHG_CH2_Pos +#define PPI_CHG2_CH2_Msk PPI_CHG_CH2_Msk +#define PPI_CHG2_CH2_Excluded PPI_CHG_CH2_Excluded +#define PPI_CHG2_CH2_Included PPI_CHG_CH2_Included + +#define PPI_CHG2_CH1_Pos PPI_CHG_CH1_Pos +#define PPI_CHG2_CH1_Msk PPI_CHG_CH1_Msk +#define PPI_CHG2_CH1_Excluded PPI_CHG_CH1_Excluded +#define PPI_CHG2_CH1_Included PPI_CHG_CH1_Included + +#define PPI_CHG2_CH0_Pos PPI_CHG_CH0_Pos +#define PPI_CHG2_CH0_Msk PPI_CHG_CH0_Msk +#define PPI_CHG2_CH0_Excluded PPI_CHG_CH0_Excluded +#define PPI_CHG2_CH0_Included PPI_CHG_CH0_Included + +#define PPI_CHG3_CH15_Pos PPI_CHG_CH15_Pos +#define PPI_CHG3_CH15_Msk PPI_CHG_CH15_Msk +#define PPI_CHG3_CH15_Excluded PPI_CHG_CH15_Excluded +#define PPI_CHG3_CH15_Included PPI_CHG_CH15_Included + +#define PPI_CHG3_CH14_Pos PPI_CHG_CH14_Pos +#define PPI_CHG3_CH14_Msk PPI_CHG_CH14_Msk +#define PPI_CHG3_CH14_Excluded PPI_CHG_CH14_Excluded +#define PPI_CHG3_CH14_Included PPI_CHG_CH14_Included + +#define PPI_CHG3_CH13_Pos PPI_CHG_CH13_Pos +#define PPI_CHG3_CH13_Msk PPI_CHG_CH13_Msk +#define PPI_CHG3_CH13_Excluded PPI_CHG_CH13_Excluded +#define PPI_CHG3_CH13_Included PPI_CHG_CH13_Included + +#define PPI_CHG3_CH12_Pos PPI_CHG_CH12_Pos +#define PPI_CHG3_CH12_Msk PPI_CHG_CH12_Msk +#define PPI_CHG3_CH12_Excluded PPI_CHG_CH12_Excluded +#define PPI_CHG3_CH12_Included PPI_CHG_CH12_Included + +#define PPI_CHG3_CH11_Pos PPI_CHG_CH11_Pos +#define PPI_CHG3_CH11_Msk PPI_CHG_CH11_Msk +#define PPI_CHG3_CH11_Excluded PPI_CHG_CH11_Excluded +#define PPI_CHG3_CH11_Included PPI_CHG_CH11_Included + +#define PPI_CHG3_CH10_Pos PPI_CHG_CH10_Pos +#define PPI_CHG3_CH10_Msk PPI_CHG_CH10_Msk +#define PPI_CHG3_CH10_Excluded PPI_CHG_CH10_Excluded +#define PPI_CHG3_CH10_Included PPI_CHG_CH10_Included + +#define PPI_CHG3_CH9_Pos PPI_CHG_CH9_Pos +#define PPI_CHG3_CH9_Msk PPI_CHG_CH9_Msk +#define PPI_CHG3_CH9_Excluded PPI_CHG_CH9_Excluded +#define PPI_CHG3_CH9_Included PPI_CHG_CH9_Included + +#define PPI_CHG3_CH8_Pos PPI_CHG_CH8_Pos +#define PPI_CHG3_CH8_Msk PPI_CHG_CH8_Msk +#define PPI_CHG3_CH8_Excluded PPI_CHG_CH8_Excluded +#define PPI_CHG3_CH8_Included PPI_CHG_CH8_Included + +#define PPI_CHG3_CH7_Pos PPI_CHG_CH7_Pos +#define PPI_CHG3_CH7_Msk PPI_CHG_CH7_Msk +#define PPI_CHG3_CH7_Excluded PPI_CHG_CH7_Excluded +#define PPI_CHG3_CH7_Included PPI_CHG_CH7_Included + +#define PPI_CHG3_CH6_Pos PPI_CHG_CH6_Pos +#define PPI_CHG3_CH6_Msk PPI_CHG_CH6_Msk +#define PPI_CHG3_CH6_Excluded PPI_CHG_CH6_Excluded +#define PPI_CHG3_CH6_Included PPI_CHG_CH6_Included + +#define PPI_CHG3_CH5_Pos PPI_CHG_CH5_Pos +#define PPI_CHG3_CH5_Msk PPI_CHG_CH5_Msk +#define PPI_CHG3_CH5_Excluded PPI_CHG_CH5_Excluded +#define PPI_CHG3_CH5_Included PPI_CHG_CH5_Included + +#define PPI_CHG3_CH4_Pos PPI_CHG_CH4_Pos +#define PPI_CHG3_CH4_Msk PPI_CHG_CH4_Msk +#define PPI_CHG3_CH4_Excluded PPI_CHG_CH4_Excluded +#define PPI_CHG3_CH4_Included PPI_CHG_CH4_Included + +#define PPI_CHG3_CH3_Pos PPI_CHG_CH3_Pos +#define PPI_CHG3_CH3_Msk PPI_CHG_CH3_Msk +#define PPI_CHG3_CH3_Excluded PPI_CHG_CH3_Excluded +#define PPI_CHG3_CH3_Included PPI_CHG_CH3_Included + +#define PPI_CHG3_CH2_Pos PPI_CHG_CH2_Pos +#define PPI_CHG3_CH2_Msk PPI_CHG_CH2_Msk +#define PPI_CHG3_CH2_Excluded PPI_CHG_CH2_Excluded +#define PPI_CHG3_CH2_Included PPI_CHG_CH2_Included + +#define PPI_CHG3_CH1_Pos PPI_CHG_CH1_Pos +#define PPI_CHG3_CH1_Msk PPI_CHG_CH1_Msk +#define PPI_CHG3_CH1_Excluded PPI_CHG_CH1_Excluded +#define PPI_CHG3_CH1_Included PPI_CHG_CH1_Included + +#define PPI_CHG3_CH0_Pos PPI_CHG_CH0_Pos +#define PPI_CHG3_CH0_Msk PPI_CHG_CH0_Msk +#define PPI_CHG3_CH0_Excluded PPI_CHG_CH0_Excluded +#define PPI_CHG3_CH0_Included PPI_CHG_CH0_Included + + + + +/*lint --flb "Leave library region" */ + +#endif /* NRF51_TO_NRF52_H */ diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52.h new file mode 100644 index 0000000000..a5ad4a47fe --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52.h @@ -0,0 +1,2156 @@ +/* + * 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. + * + */ + + +/****************************************************************************************************//** + * @file nrf52.h + * + * @brief CMSIS Cortex-M4 Peripheral Access Layer Header File for + * nrf52 from Nordic Semiconductor. + * + * @version V1 + * @date 23. February 2016 + * + * @note Generated with SVDConv V2.81d + * from CMSIS SVD File 'nrf52.svd' Version 1, + * + * @par 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. + * + * + *******************************************************************************************************/ + + + +/** @addtogroup Nordic Semiconductor + * @{ + */ + +/** @addtogroup nrf52 + * @{ + */ + +#ifndef NRF52_H +#define NRF52_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* ------------------------- Interrupt Number Definition ------------------------ */ + +typedef enum { +/* ------------------- Cortex-M4 Processor Exceptions Numbers ------------------- */ + Reset_IRQn = -15, /*!< 1 Reset Vector, invoked on Power up and warm reset */ + NonMaskableInt_IRQn = -14, /*!< 2 Non maskable Interrupt, cannot be stopped or preempted */ + HardFault_IRQn = -13, /*!< 3 Hard Fault, all classes of Fault */ + MemoryManagement_IRQn = -12, /*!< 4 Memory Management, MPU mismatch, including Access Violation + and No Match */ + BusFault_IRQn = -11, /*!< 5 Bus Fault, Pre-Fetch-, Memory Access Fault, other address/memory + related Fault */ + UsageFault_IRQn = -10, /*!< 6 Usage Fault, i.e. Undef Instruction, Illegal State Transition */ + SVCall_IRQn = -5, /*!< 11 System Service Call via SVC instruction */ + DebugMonitor_IRQn = -4, /*!< 12 Debug Monitor */ + PendSV_IRQn = -2, /*!< 14 Pendable request for system service */ + SysTick_IRQn = -1, /*!< 15 System Tick Timer */ +/* ---------------------- nrf52 Specific Interrupt Numbers ---------------------- */ + POWER_CLOCK_IRQn = 0, /*!< 0 POWER_CLOCK */ + RADIO_IRQn = 1, /*!< 1 RADIO */ + UARTE0_UART0_IRQn = 2, /*!< 2 UARTE0_UART0 */ + SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQn= 3, /*!< 3 SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0 */ + SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn= 4, /*!< 4 SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1 */ + NFCT_IRQn = 5, /*!< 5 NFCT */ + GPIOTE_IRQn = 6, /*!< 6 GPIOTE */ + SAADC_IRQn = 7, /*!< 7 SAADC */ + TIMER0_IRQn = 8, /*!< 8 TIMER0 */ + TIMER1_IRQn = 9, /*!< 9 TIMER1 */ + TIMER2_IRQn = 10, /*!< 10 TIMER2 */ + RTC0_IRQn = 11, /*!< 11 RTC0 */ + TEMP_IRQn = 12, /*!< 12 TEMP */ + RNG_IRQn = 13, /*!< 13 RNG */ + ECB_IRQn = 14, /*!< 14 ECB */ + CCM_AAR_IRQn = 15, /*!< 15 CCM_AAR */ + WDT_IRQn = 16, /*!< 16 WDT */ + RTC1_IRQn = 17, /*!< 17 RTC1 */ + QDEC_IRQn = 18, /*!< 18 QDEC */ + COMP_LPCOMP_IRQn = 19, /*!< 19 COMP_LPCOMP */ + SWI0_EGU0_IRQn = 20, /*!< 20 SWI0_EGU0 */ + SWI1_EGU1_IRQn = 21, /*!< 21 SWI1_EGU1 */ + SWI2_EGU2_IRQn = 22, /*!< 22 SWI2_EGU2 */ + SWI3_EGU3_IRQn = 23, /*!< 23 SWI3_EGU3 */ + SWI4_EGU4_IRQn = 24, /*!< 24 SWI4_EGU4 */ + SWI5_EGU5_IRQn = 25, /*!< 25 SWI5_EGU5 */ + TIMER3_IRQn = 26, /*!< 26 TIMER3 */ + TIMER4_IRQn = 27, /*!< 27 TIMER4 */ + PWM0_IRQn = 28, /*!< 28 PWM0 */ + PDM_IRQn = 29, /*!< 29 PDM */ + MWU_IRQn = 32, /*!< 32 MWU */ + PWM1_IRQn = 33, /*!< 33 PWM1 */ + PWM2_IRQn = 34, /*!< 34 PWM2 */ + SPIM2_SPIS2_SPI2_IRQn = 35, /*!< 35 SPIM2_SPIS2_SPI2 */ + RTC2_IRQn = 36, /*!< 36 RTC2 */ + I2S_IRQn = 37, /*!< 37 I2S */ + FPU_IRQn = 38 /*!< 38 FPU */ +} IRQn_Type; + + +/** @addtogroup Configuration_of_CMSIS + * @{ + */ + + +/* ================================================================================ */ +/* ================ Processor and Core Peripheral Section ================ */ +/* ================================================================================ */ + +/* ----------------Configuration of the Cortex-M4 Processor and Core Peripherals---------------- */ +#define __CM4_REV 0x0001 /*!< Cortex-M4 Core Revision */ +#define __MPU_PRESENT 1 /*!< MPU present or not */ +#define __NVIC_PRIO_BITS 3 /*!< Number of Bits used for Priority Levels */ +#define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */ +#define __FPU_PRESENT 1 /*!< FPU present or not */ +/** @} */ /* End of group Configuration_of_CMSIS */ + +#include "core_cm4.h" /*!< Cortex-M4 processor and core peripherals */ +#include "system_nrf52.h" /*!< nrf52 System */ + + +/* ================================================================================ */ +/* ================ Device Specific Peripheral Section ================ */ +/* ================================================================================ */ + + +/** @addtogroup Device_Peripheral_Registers + * @{ + */ + + +/* ------------------- Start of section using anonymous unions ------------------ */ +#if defined(__CC_ARM) + #pragma push + #pragma anon_unions +#elif defined(__ICCARM__) + #pragma language=extended +#elif defined(__GNUC__) + /* anonymous unions are enabled by default */ +#elif defined(__TMS470__) +/* anonymous unions are enabled by default */ +#elif defined(__TASKING__) + #pragma warning 586 +#else + #warning Not supported compiler type +#endif + + +typedef struct { + __I uint32_t PART; /*!< Part code */ + __I uint32_t VARIANT; /*!< Part Variant, Hardware version and Production configuration */ + __I uint32_t PACKAGE; /*!< Package option */ + __I uint32_t RAM; /*!< RAM variant */ + __I uint32_t FLASH; /*!< Flash variant */ + __IO uint32_t UNUSED0[3]; /*!< Description collection[0]: Unspecified */ +} FICR_INFO_Type; + +typedef struct { + __I uint32_t A0; /*!< Slope definition A0. */ + __I uint32_t A1; /*!< Slope definition A1. */ + __I uint32_t A2; /*!< Slope definition A2. */ + __I uint32_t A3; /*!< Slope definition A3. */ + __I uint32_t A4; /*!< Slope definition A4. */ + __I uint32_t A5; /*!< Slope definition A5. */ + __I uint32_t B0; /*!< y-intercept B0. */ + __I uint32_t B1; /*!< y-intercept B1. */ + __I uint32_t B2; /*!< y-intercept B2. */ + __I uint32_t B3; /*!< y-intercept B3. */ + __I uint32_t B4; /*!< y-intercept B4. */ + __I uint32_t B5; /*!< y-intercept B5. */ + __I uint32_t T0; /*!< Segment end T0. */ + __I uint32_t T1; /*!< Segment end T1. */ + __I uint32_t T2; /*!< Segment end T2. */ + __I uint32_t T3; /*!< Segment end T3. */ + __I uint32_t T4; /*!< Segment end T4. */ +} FICR_TEMP_Type; + +typedef struct { + __I uint32_t TAGHEADER0; /*!< Default header for NFC Tag. Software can read these values to + populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. */ + __I uint32_t TAGHEADER1; /*!< Default header for NFC Tag. Software can read these values to + populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. */ + __I uint32_t TAGHEADER2; /*!< Default header for NFC Tag. Software can read these values to + populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. */ + __I uint32_t TAGHEADER3; /*!< Default header for NFC Tag. Software can read these values to + populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. */ +} FICR_NFC_Type; + +typedef struct { + __IO uint32_t POWER; /*!< Description cluster[0]: RAM0 power control register */ + __O uint32_t POWERSET; /*!< Description cluster[0]: RAM0 power control set register */ + __O uint32_t POWERCLR; /*!< Description cluster[0]: RAM0 power control clear register */ + __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 */ + __IO uint32_t CTS; /*!< Pin select for CTS signal */ + __IO uint32_t RXD; /*!< Pin select for RXD signal */ +} UARTE_PSEL_Type; + +typedef struct { + __IO uint32_t PTR; /*!< Data pointer */ + __IO uint32_t MAXCNT; /*!< Maximum number of bytes in receive buffer */ + __I uint32_t AMOUNT; /*!< Number of bytes transferred in the last transaction */ +} UARTE_RXD_Type; + +typedef struct { + __IO uint32_t PTR; /*!< Data pointer */ + __IO uint32_t MAXCNT; /*!< Maximum number of bytes in transmit buffer */ + __I uint32_t AMOUNT; /*!< Number of bytes transferred in the last transaction */ +} UARTE_TXD_Type; + +typedef struct { + __IO uint32_t SCK; /*!< Pin select for SCK */ + __IO uint32_t MOSI; /*!< Pin select for MOSI signal */ + __IO uint32_t MISO; /*!< Pin select for MISO signal */ +} SPIM_PSEL_Type; + +typedef struct { + __IO uint32_t PTR; /*!< Data pointer */ + __IO uint32_t MAXCNT; /*!< Maximum number of bytes in receive buffer */ + __I uint32_t AMOUNT; /*!< Number of bytes transferred in the last transaction */ + __IO uint32_t LIST; /*!< EasyDMA list type */ +} SPIM_RXD_Type; + +typedef struct { + __IO uint32_t PTR; /*!< Data pointer */ + __IO uint32_t MAXCNT; /*!< Maximum number of bytes in transmit buffer */ + __I uint32_t AMOUNT; /*!< Number of bytes transferred in the last transaction */ + __IO uint32_t LIST; /*!< EasyDMA list type */ +} SPIM_TXD_Type; + +typedef struct { + __IO uint32_t SCK; /*!< Pin select for SCK */ + __IO uint32_t MISO; /*!< Pin select for MISO signal */ + __IO uint32_t MOSI; /*!< Pin select for MOSI signal */ + __IO uint32_t CSN; /*!< Pin select for CSN signal */ +} SPIS_PSEL_Type; + +typedef struct { + __IO uint32_t PTR; /*!< RXD data pointer */ + __IO uint32_t MAXCNT; /*!< Maximum number of bytes in receive buffer */ + __I uint32_t AMOUNT; /*!< Number of bytes received in last granted transaction */ +} SPIS_RXD_Type; + +typedef struct { + __IO uint32_t PTR; /*!< TXD data pointer */ + __IO uint32_t MAXCNT; /*!< Maximum number of bytes in transmit buffer */ + __I uint32_t AMOUNT; /*!< Number of bytes transmitted in last granted transaction */ +} SPIS_TXD_Type; + +typedef struct { + __IO uint32_t SCL; /*!< Pin select for SCL signal */ + __IO uint32_t SDA; /*!< Pin select for SDA signal */ +} TWIM_PSEL_Type; + +typedef struct { + __IO uint32_t PTR; /*!< Data pointer */ + __IO uint32_t MAXCNT; /*!< Maximum number of bytes in receive buffer */ + __I uint32_t AMOUNT; /*!< Number of bytes transferred in the last transaction */ + __IO uint32_t LIST; /*!< EasyDMA list type */ +} TWIM_RXD_Type; + +typedef struct { + __IO uint32_t PTR; /*!< Data pointer */ + __IO uint32_t MAXCNT; /*!< Maximum number of bytes in transmit buffer */ + __I uint32_t AMOUNT; /*!< Number of bytes transferred in the last transaction */ + __IO uint32_t LIST; /*!< EasyDMA list type */ +} TWIM_TXD_Type; + +typedef struct { + __IO uint32_t SCL; /*!< Pin select for SCL signal */ + __IO uint32_t SDA; /*!< Pin select for SDA signal */ +} TWIS_PSEL_Type; + +typedef struct { + __IO uint32_t PTR; /*!< RXD Data pointer */ + __IO uint32_t MAXCNT; /*!< Maximum number of bytes in RXD buffer */ + __I uint32_t AMOUNT; /*!< Number of bytes transferred in the last RXD transaction */ +} TWIS_RXD_Type; + +typedef struct { + __IO uint32_t PTR; /*!< TXD Data pointer */ + __IO uint32_t MAXCNT; /*!< Maximum number of bytes in TXD buffer */ + __I uint32_t AMOUNT; /*!< Number of bytes transferred in the last TXD transaction */ +} TWIS_TXD_Type; + +typedef struct { + __IO uint32_t SCK; /*!< Pin select for SCK */ + __IO uint32_t MOSI; /*!< Pin select for MOSI */ + __IO uint32_t MISO; /*!< Pin select for MISO */ +} SPI_PSEL_Type; + +typedef struct { + __IO uint32_t RX; /*!< Result of last incoming frames */ +} NFCT_FRAMESTATUS_Type; + +typedef struct { + __IO uint32_t FRAMECONFIG; /*!< Configuration of outgoing frames */ + __IO uint32_t AMOUNT; /*!< Size of outgoing frame */ +} NFCT_TXD_Type; + +typedef struct { + __IO uint32_t FRAMECONFIG; /*!< Configuration of incoming frames */ + __I uint32_t AMOUNT; /*!< Size of last incoming frame */ +} NFCT_RXD_Type; + +typedef struct { + __IO uint32_t LIMITH; /*!< Description cluster[0]: Last results is equal or above CH[0].LIMIT.HIGH */ + __IO uint32_t LIMITL; /*!< Description cluster[0]: Last results is equal or below CH[0].LIMIT.LOW */ +} SAADC_EVENTS_CH_Type; + +typedef struct { + __IO uint32_t PSELP; /*!< Description cluster[0]: Input positive pin selection for CH[0] */ + __IO uint32_t PSELN; /*!< Description cluster[0]: Input negative pin selection for CH[0] */ + __IO uint32_t CONFIG; /*!< Description cluster[0]: Input configuration for CH[0] */ + __IO uint32_t LIMIT; /*!< Description cluster[0]: High/low limits for event monitoring + a channel */ +} SAADC_CH_Type; + +typedef struct { + __IO uint32_t PTR; /*!< Data pointer */ + __IO uint32_t MAXCNT; /*!< Maximum number of buffer words to transfer */ + __I uint32_t AMOUNT; /*!< Number of buffer words transferred since last START */ +} SAADC_RESULT_Type; + +typedef struct { + __IO uint32_t LED; /*!< Pin select for LED signal */ + __IO uint32_t A; /*!< Pin select for A signal */ + __IO uint32_t B; /*!< Pin select for B signal */ +} 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 REFRESH; /*!< Description cluster[0]: Amount of additional PWM periods between + samples loaded to compare register (load every CNT+1 PWM periods) */ + __IO uint32_t ENDDELAY; /*!< Description cluster[0]: Time added after the sequence */ + __I uint32_t RESERVED1[4]; +} PWM_SEQ_Type; + +typedef struct { + __IO uint32_t OUT[4]; /*!< Description collection[0]: Output pin select for PWM channel + 0 */ +} PWM_PSEL_Type; + +typedef struct { + __IO uint32_t CLK; /*!< Pin number configuration for PDM CLK signal */ + __IO uint32_t DIN; /*!< Pin number configuration for PDM DIN signal */ +} PDM_PSEL_Type; + +typedef struct { + __IO uint32_t PTR; /*!< RAM address pointer to write samples to with EasyDMA */ + __IO uint32_t MAXCNT; /*!< Number of samples to allocate memory for in EasyDMA mode */ +} PDM_SAMPLE_Type; + +typedef struct { + __O uint32_t EN; /*!< Description cluster[0]: Enable channel group 0 */ + __O uint32_t DIS; /*!< Description cluster[0]: Disable channel group 0 */ +} PPI_TASKS_CHG_Type; + +typedef struct { + __IO uint32_t EEP; /*!< Description cluster[0]: Channel 0 event end-point */ + __IO uint32_t TEP; /*!< Description cluster[0]: Channel 0 task end-point */ +} PPI_CH_Type; + +typedef struct { + __IO uint32_t TEP; /*!< Description cluster[0]: Channel 0 task end-point */ +} PPI_FORK_Type; + +typedef struct { + __IO uint32_t WA; /*!< Description cluster[0]: Write access to region 0 detected */ + __IO uint32_t RA; /*!< Description cluster[0]: Read access to region 0 detected */ +} MWU_EVENTS_REGION_Type; + +typedef struct { + __IO uint32_t WA; /*!< Description cluster[0]: Write access to peripheral region 0 + detected */ + __IO uint32_t RA; /*!< Description cluster[0]: Read access to peripheral region 0 detected */ +} MWU_EVENTS_PREGION_Type; + +typedef struct { + __IO uint32_t SUBSTATWA; /*!< Description cluster[0]: Source of event/interrupt in region + 0, write access detected while corresponding subregion was enabled + for watching */ + __IO uint32_t SUBSTATRA; /*!< Description cluster[0]: Source of event/interrupt in region + 0, read access detected while corresponding subregion was enabled + for watching */ +} MWU_PERREGION_Type; + +typedef struct { + __IO uint32_t START; /*!< Description cluster[0]: Start address for region 0 */ + __IO uint32_t END; /*!< Description cluster[0]: End address of region 0 */ + __I uint32_t RESERVED2[2]; +} MWU_REGION_Type; + +typedef struct { + __I uint32_t START; /*!< Description cluster[0]: Reserved for future use */ + __I uint32_t END; /*!< Description cluster[0]: Reserved for future use */ + __IO uint32_t SUBS; /*!< Description cluster[0]: Subregions of region 0 */ + __I uint32_t RESERVED3; +} MWU_PREGION_Type; + +typedef struct { + __IO uint32_t MODE; /*!< I2S mode. */ + __IO uint32_t RXEN; /*!< Reception (RX) enable. */ + __IO uint32_t TXEN; /*!< Transmission (TX) enable. */ + __IO uint32_t MCKEN; /*!< Master clock generator enable. */ + __IO uint32_t MCKFREQ; /*!< Master clock generator frequency. */ + __IO uint32_t RATIO; /*!< MCK / LRCK ratio. */ + __IO uint32_t SWIDTH; /*!< Sample width. */ + __IO uint32_t ALIGN; /*!< Alignment of sample within a frame. */ + __IO uint32_t FORMAT; /*!< Frame format. */ + __IO uint32_t CHANNELS; /*!< Enable channels. */ +} I2S_CONFIG_Type; + +typedef struct { + __IO uint32_t PTR; /*!< Receive buffer RAM start address. */ +} I2S_RXD_Type; + +typedef struct { + __IO uint32_t PTR; /*!< Transmit buffer RAM start address. */ +} I2S_TXD_Type; + +typedef struct { + __IO uint32_t MAXCNT; /*!< Size of RXD and TXD buffers. */ +} I2S_RXTXD_Type; + +typedef struct { + __IO uint32_t MCK; /*!< Pin select for MCK signal. */ + __IO uint32_t SCK; /*!< Pin select for SCK signal. */ + __IO uint32_t LRCK; /*!< Pin select for LRCK signal. */ + __IO uint32_t SDIN; /*!< Pin select for SDIN signal. */ + __IO uint32_t SDOUT; /*!< Pin select for SDOUT signal. */ +} I2S_PSEL_Type; + + +/* ================================================================================ */ +/* ================ FICR ================ */ +/* ================================================================================ */ + + +/** + * @brief Factory Information Configuration Registers (FICR) + */ + +typedef struct { /*!< FICR Structure */ + __I uint32_t RESERVED0[4]; + __I uint32_t CODEPAGESIZE; /*!< Code memory page size */ + __I uint32_t CODESIZE; /*!< Code memory size */ + __I uint32_t RESERVED1[18]; + __I uint32_t DEVICEID[2]; /*!< Description collection[0]: Device identifier */ + __I uint32_t RESERVED2[6]; + __I uint32_t ER[4]; /*!< Description collection[0]: Encryption Root, word 0 */ + __I uint32_t IR[4]; /*!< Description collection[0]: Identity Root, word 0 */ + __I uint32_t DEVICEADDRTYPE; /*!< Device address type */ + __I uint32_t DEVICEADDR[2]; /*!< Description collection[0]: Device address 0 */ + __I uint32_t RESERVED3[21]; + FICR_INFO_Type INFO; /*!< Device info */ + __I uint32_t RESERVED4[185]; + FICR_TEMP_Type TEMP; /*!< Registers storing factory TEMP module linearization coefficients */ + __I uint32_t RESERVED5[2]; + FICR_NFC_Type NFC; /*!< Unspecified */ +} NRF_FICR_Type; + + +/* ================================================================================ */ +/* ================ UICR ================ */ +/* ================================================================================ */ + + +/** + * @brief User Information Configuration Registers (UICR) + */ + +typedef struct { /*!< UICR Structure */ + __IO uint32_t UNUSED0; /*!< Unspecified */ + __IO uint32_t UNUSED1; /*!< Unspecified */ + __IO uint32_t UNUSED2; /*!< Unspecified */ + __I uint32_t RESERVED0; + __IO uint32_t UNUSED3; /*!< Unspecified */ + __IO uint32_t NRFFW[15]; /*!< Description collection[0]: Reserved for Nordic firmware design */ + __IO uint32_t NRFHW[12]; /*!< Description collection[0]: Reserved for Nordic hardware design */ + __IO uint32_t CUSTOMER[32]; /*!< Description collection[0]: Reserved for customer */ + __I uint32_t RESERVED1[64]; + __IO uint32_t PSELRESET[2]; /*!< Description collection[0]: Mapping of the nRESET function (see + POWER chapter for details) */ + __IO uint32_t APPROTECT; /*!< Access Port protection */ + __IO uint32_t NFCPINS; /*!< Setting of pins dedicated to NFC functionality: NFC antenna + or GPIO */ +} NRF_UICR_Type; + + +/* ================================================================================ */ +/* ================ BPROT ================ */ +/* ================================================================================ */ + + +/** + * @brief Block Protect (BPROT) + */ + +typedef struct { /*!< BPROT Structure */ + __I uint32_t RESERVED0[384]; + __IO uint32_t CONFIG0; /*!< Block protect configuration register 0 */ + __IO uint32_t CONFIG1; /*!< Block protect configuration register 1 */ + __IO uint32_t DISABLEINDEBUG; /*!< Disable protection mechanism in debug interface mode */ + __IO uint32_t UNUSED0; /*!< Unspecified */ + __IO uint32_t CONFIG2; /*!< Block protect configuration register 2 */ + __IO uint32_t CONFIG3; /*!< Block protect configuration register 3 */ +} NRF_BPROT_Type; + + +/* ================================================================================ */ +/* ================ POWER ================ */ +/* ================================================================================ */ + + +/** + * @brief Power control (POWER) + */ + +typedef struct { /*!< POWER Structure */ + __I uint32_t RESERVED0[30]; + __O uint32_t TASKS_CONSTLAT; /*!< Enable constant latency mode */ + __O uint32_t TASKS_LOWPWR; /*!< Enable low power mode (variable latency) */ + __I uint32_t RESERVED1[34]; + __IO uint32_t EVENTS_POFWARN; /*!< Power failure warning */ + __I uint32_t RESERVED2[2]; + __IO uint32_t EVENTS_SLEEPENTER; /*!< CPU entered WFI/WFE sleep */ + __IO uint32_t EVENTS_SLEEPEXIT; /*!< CPU exited WFI/WFE sleep */ + __I uint32_t RESERVED3[122]; + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED4[61]; + __IO uint32_t RESETREAS; /*!< Reset reason */ + __I uint32_t RESERVED5[9]; + __I uint32_t RAMSTATUS; /*!< Deprecated register - RAM status register */ + __I uint32_t RESERVED6[53]; + __O uint32_t SYSTEMOFF; /*!< System OFF register */ + __I uint32_t RESERVED7[3]; + __IO uint32_t POFCON; /*!< Power failure comparator configuration */ + __I uint32_t RESERVED8[2]; + __IO uint32_t GPREGRET; /*!< General purpose retention register */ + __IO uint32_t GPREGRET2; /*!< General purpose retention register */ + __IO uint32_t RAMON; /*!< Deprecated register - RAM on/off register (this register is + retained) */ + __I uint32_t RESERVED9[11]; + __IO uint32_t RAMONB; /*!< Deprecated register - RAM on/off register (this register is + retained) */ + __I uint32_t RESERVED10[8]; + __IO uint32_t DCDCEN; /*!< DC/DC enable register */ + __I uint32_t RESERVED11[225]; + POWER_RAM_Type RAM[8]; /*!< Unspecified */ +} NRF_POWER_Type; + + +/* ================================================================================ */ +/* ================ CLOCK ================ */ +/* ================================================================================ */ + + +/** + * @brief Clock control (CLOCK) + */ + +typedef struct { /*!< CLOCK Structure */ + __O uint32_t TASKS_HFCLKSTART; /*!< Start HFCLK crystal oscillator */ + __O uint32_t TASKS_HFCLKSTOP; /*!< Stop HFCLK crystal oscillator */ + __O uint32_t TASKS_LFCLKSTART; /*!< Start LFCLK source */ + __O uint32_t TASKS_LFCLKSTOP; /*!< Stop LFCLK source */ + __O uint32_t TASKS_CAL; /*!< Start calibration of LFRC oscillator */ + __O uint32_t TASKS_CTSTART; /*!< Start calibration timer */ + __O uint32_t TASKS_CTSTOP; /*!< Stop calibration timer */ + __I uint32_t RESERVED0[57]; + __IO uint32_t EVENTS_HFCLKSTARTED; /*!< HFCLK oscillator started */ + __IO uint32_t EVENTS_LFCLKSTARTED; /*!< LFCLK started */ + __I uint32_t RESERVED1; + __IO uint32_t EVENTS_DONE; /*!< Calibration of LFCLK RC oscillator complete event */ + __IO uint32_t EVENTS_CTTO; /*!< Calibration timer timeout */ + __I uint32_t RESERVED2[124]; + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED3[63]; + __I uint32_t HFCLKRUN; /*!< Status indicating that HFCLKSTART task has been triggered */ + __I uint32_t HFCLKSTAT; /*!< HFCLK status */ + __I uint32_t RESERVED4; + __I uint32_t LFCLKRUN; /*!< Status indicating that LFCLKSTART task has been triggered */ + __I uint32_t LFCLKSTAT; /*!< LFCLK status */ + __I uint32_t LFCLKSRCCOPY; /*!< Copy of LFCLKSRC register, set when LFCLKSTART task was triggered */ + __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) */ + __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 ================ */ +/* ================================================================================ */ + + +/** + * @brief 2.4 GHz Radio (RADIO) + */ + +typedef struct { /*!< RADIO Structure */ + __O uint32_t TASKS_TXEN; /*!< Enable RADIO in TX mode */ + __O uint32_t TASKS_RXEN; /*!< Enable RADIO in RX mode */ + __O uint32_t TASKS_START; /*!< Start RADIO */ + __O uint32_t TASKS_STOP; /*!< Stop RADIO */ + __O uint32_t TASKS_DISABLE; /*!< Disable RADIO */ + __O uint32_t TASKS_RSSISTART; /*!< Start the RSSI and take one single sample of the receive signal + strength. */ + __O uint32_t TASKS_RSSISTOP; /*!< Stop the RSSI measurement */ + __O uint32_t TASKS_BCSTART; /*!< Start the bit counter */ + __O uint32_t TASKS_BCSTOP; /*!< Stop the bit counter */ + __I uint32_t RESERVED0[55]; + __IO uint32_t EVENTS_READY; /*!< RADIO has ramped up and is ready to be started */ + __IO uint32_t EVENTS_ADDRESS; /*!< Address sent or received */ + __IO uint32_t EVENTS_PAYLOAD; /*!< Packet payload sent or received */ + __IO uint32_t EVENTS_END; /*!< Packet sent or received */ + __IO uint32_t EVENTS_DISABLED; /*!< RADIO has been disabled */ + __IO uint32_t EVENTS_DEVMATCH; /*!< A device address match occurred on the last received packet */ + __IO uint32_t EVENTS_DEVMISS; /*!< No device address match occurred on the last received packet */ + __IO uint32_t EVENTS_RSSIEND; /*!< Sampling of receive signal strength complete. */ + __I uint32_t RESERVED1[2]; + __IO uint32_t EVENTS_BCMATCH; /*!< Bit counter reached bit count value. */ + __I uint32_t RESERVED2; + __IO uint32_t EVENTS_CRCOK; /*!< Packet received with CRC ok */ + __IO uint32_t EVENTS_CRCERROR; /*!< Packet received with CRC error */ + __I uint32_t RESERVED3[50]; + __IO uint32_t SHORTS; /*!< Shortcut register */ + __I uint32_t RESERVED4[64]; + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED5[61]; + __I uint32_t CRCSTATUS; /*!< CRC status */ + __I uint32_t RESERVED6; + __I uint32_t RXMATCH; /*!< Received address */ + __I uint32_t RXCRC; /*!< CRC field of previously received packet */ + __I uint32_t DAI; /*!< Device address match index */ + __I uint32_t RESERVED7[60]; + __IO uint32_t PACKETPTR; /*!< Packet pointer */ + __IO uint32_t FREQUENCY; /*!< Frequency */ + __IO uint32_t TXPOWER; /*!< Output power */ + __IO uint32_t MODE; /*!< Data rate and modulation */ + __IO uint32_t PCNF0; /*!< Packet configuration register 0 */ + __IO uint32_t PCNF1; /*!< Packet configuration register 1 */ + __IO uint32_t BASE0; /*!< Base address 0 */ + __IO uint32_t BASE1; /*!< Base address 1 */ + __IO uint32_t PREFIX0; /*!< Prefixes bytes for logical addresses 0-3 */ + __IO uint32_t PREFIX1; /*!< Prefixes bytes for logical addresses 4-7 */ + __IO uint32_t TXADDRESS; /*!< Transmit address select */ + __IO uint32_t RXADDRESSES; /*!< Receive address select */ + __IO uint32_t CRCCNF; /*!< CRC configuration */ + __IO uint32_t CRCPOLY; /*!< CRC polynomial */ + __IO uint32_t CRCINIT; /*!< CRC initial value */ + __IO uint32_t UNUSED0; /*!< Unspecified */ + __IO uint32_t TIFS; /*!< Inter Frame Spacing in us */ + __I uint32_t RSSISAMPLE; /*!< RSSI sample */ + __I uint32_t RESERVED8; + __I uint32_t STATE; /*!< Current radio state */ + __IO uint32_t DATAWHITEIV; /*!< Data whitening initial value */ + __I uint32_t RESERVED9[2]; + __IO uint32_t BCC; /*!< Bit counter compare */ + __I uint32_t RESERVED10[39]; + __IO uint32_t DAB[8]; /*!< Description collection[0]: Device address base segment 0 */ + __IO uint32_t DAP[8]; /*!< Description collection[0]: Device address prefix 0 */ + __IO uint32_t DACNF; /*!< Device address match configuration */ + __I uint32_t RESERVED11[3]; + __IO uint32_t MODECNF0; /*!< Radio mode configuration register 0 */ + __I uint32_t RESERVED12[618]; + __IO uint32_t POWER; /*!< Peripheral power control */ +} NRF_RADIO_Type; + + +/* ================================================================================ */ +/* ================ UARTE ================ */ +/* ================================================================================ */ + + +/** + * @brief UART with EasyDMA (UARTE) + */ + +typedef struct { /*!< UARTE Structure */ + __O uint32_t TASKS_STARTRX; /*!< Start UART receiver */ + __O uint32_t TASKS_STOPRX; /*!< Stop UART receiver */ + __O uint32_t TASKS_STARTTX; /*!< Start UART transmitter */ + __O uint32_t TASKS_STOPTX; /*!< Stop UART transmitter */ + __I uint32_t RESERVED0[7]; + __O uint32_t TASKS_FLUSHRX; /*!< Flush RX FIFO into RX buffer */ + __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_ENDRX; /*!< Receive buffer is filled up */ + __I uint32_t RESERVED3[3]; + __IO uint32_t EVENTS_ENDTX; /*!< Last TX byte transmitted */ + __IO uint32_t EVENTS_ERROR; /*!< Error detected */ + __I uint32_t RESERVED4[7]; + __IO uint32_t EVENTS_RXTO; /*!< Receiver timeout */ + __I uint32_t RESERVED5; + __IO uint32_t EVENTS_RXSTARTED; /*!< UART receiver has started */ + __IO uint32_t EVENTS_TXSTARTED; /*!< UART transmitter has started */ + __I uint32_t RESERVED6; + __IO uint32_t EVENTS_TXSTOPPED; /*!< Transmitter stopped */ + __I uint32_t RESERVED7[41]; + __IO uint32_t SHORTS; /*!< Shortcut register */ + __I uint32_t RESERVED8[63]; + __IO uint32_t INTEN; /*!< Enable or disable interrupt */ + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED9[93]; + __IO uint32_t ERRORSRC; /*!< Error source */ + __I uint32_t RESERVED10[31]; + __IO uint32_t ENABLE; /*!< Enable UART */ + __I uint32_t RESERVED11; + UARTE_PSEL_Type PSEL; /*!< Unspecified */ + __I uint32_t RESERVED12[3]; + __IO uint32_t BAUDRATE; /*!< Baud rate */ + __I uint32_t RESERVED13[3]; + UARTE_RXD_Type RXD; /*!< RXD EasyDMA channel */ + __I uint32_t RESERVED14; + UARTE_TXD_Type TXD; /*!< TXD EasyDMA channel */ + __I uint32_t RESERVED15[7]; + __IO uint32_t CONFIG; /*!< Configuration of parity and hardware flow control */ +} NRF_UARTE_Type; + + +/* ================================================================================ */ +/* ================ UART ================ */ +/* ================================================================================ */ + + +/** + * @brief Universal Asynchronous Receiver/Transmitter (UART) + */ + +typedef struct { /*!< UART Structure */ + __O uint32_t TASKS_STARTRX; /*!< Start UART receiver */ + __O uint32_t TASKS_STOPRX; /*!< Stop UART receiver */ + __O uint32_t TASKS_STARTTX; /*!< Start UART transmitter */ + __O uint32_t TASKS_STOPTX; /*!< Stop UART transmitter */ + __I uint32_t RESERVED0[3]; + __O uint32_t TASKS_SUSPEND; /*!< Suspend UART */ + __I uint32_t RESERVED1[56]; + __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. */ + __IO uint32_t EVENTS_RXDRDY; /*!< Data received in RXD */ + __I uint32_t RESERVED2[4]; + __IO uint32_t EVENTS_TXDRDY; /*!< Data sent from TXD */ + __I uint32_t RESERVED3; + __IO uint32_t EVENTS_ERROR; /*!< Error detected */ + __I uint32_t RESERVED4[7]; + __IO uint32_t EVENTS_RXTO; /*!< Receiver timeout */ + __I uint32_t RESERVED5[46]; + __IO uint32_t SHORTS; /*!< Shortcut register */ + __I uint32_t RESERVED6[64]; + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED7[93]; + __IO uint32_t ERRORSRC; /*!< Error source */ + __I uint32_t RESERVED8[31]; + __IO uint32_t ENABLE; /*!< Enable UART */ + __I uint32_t RESERVED9; + __IO uint32_t PSELRTS; /*!< Pin select for RTS */ + __IO uint32_t PSELTXD; /*!< Pin select for TXD */ + __IO uint32_t PSELCTS; /*!< Pin select for CTS */ + __IO uint32_t PSELRXD; /*!< Pin select for RXD */ + __I uint32_t RXD; /*!< RXD register */ + __O uint32_t TXD; /*!< TXD register */ + __I uint32_t RESERVED10; + __IO uint32_t BAUDRATE; /*!< Baud rate */ + __I uint32_t RESERVED11[17]; + __IO uint32_t CONFIG; /*!< Configuration of parity and hardware flow control */ +} NRF_UART_Type; + + +/* ================================================================================ */ +/* ================ SPIM ================ */ +/* ================================================================================ */ + + +/** + * @brief Serial Peripheral Interface Master with EasyDMA 0 (SPIM) + */ + +typedef struct { /*!< SPIM Structure */ + __I uint32_t RESERVED0[4]; + __O uint32_t TASKS_START; /*!< Start SPI transaction */ + __O uint32_t TASKS_STOP; /*!< Stop SPI transaction */ + __I uint32_t RESERVED1; + __O uint32_t TASKS_SUSPEND; /*!< Suspend SPI transaction */ + __O uint32_t TASKS_RESUME; /*!< Resume SPI transaction */ + __I uint32_t RESERVED2[56]; + __IO uint32_t EVENTS_STOPPED; /*!< SPI transaction has stopped */ + __I uint32_t RESERVED3[2]; + __IO uint32_t EVENTS_ENDRX; /*!< End of RXD buffer reached */ + __I uint32_t RESERVED4; + __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 */ + __I uint32_t RESERVED6[10]; + __IO uint32_t EVENTS_STARTED; /*!< Transaction started */ + __I uint32_t RESERVED7[44]; + __IO uint32_t SHORTS; /*!< Shortcut register */ + __I uint32_t RESERVED8[64]; + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED9[125]; + __IO uint32_t ENABLE; /*!< Enable SPIM */ + __I uint32_t RESERVED10; + SPIM_PSEL_Type PSEL; /*!< Unspecified */ + __I uint32_t RESERVED11[4]; + __IO uint32_t FREQUENCY; /*!< SPI frequency */ + __I uint32_t RESERVED12[3]; + SPIM_RXD_Type RXD; /*!< RXD EasyDMA channel */ + SPIM_TXD_Type TXD; /*!< TXD EasyDMA channel */ + __IO uint32_t CONFIG; /*!< Configuration register */ + __I uint32_t RESERVED13[26]; + __IO uint32_t ORC; /*!< Over-read character. Character clocked out in case and over-read + of the TXD buffer. */ +} NRF_SPIM_Type; + + +/* ================================================================================ */ +/* ================ SPIS ================ */ +/* ================================================================================ */ + + +/** + * @brief SPI Slave 0 (SPIS) + */ + +typedef struct { /*!< SPIS Structure */ + __I uint32_t RESERVED0[9]; + __O uint32_t TASKS_ACQUIRE; /*!< Acquire SPI semaphore */ + __O uint32_t TASKS_RELEASE; /*!< Release SPI semaphore, enabling the SPI slave to acquire it */ + __I uint32_t RESERVED1[54]; + __IO uint32_t EVENTS_END; /*!< Granted transaction completed */ + __I uint32_t RESERVED2[2]; + __IO uint32_t EVENTS_ENDRX; /*!< End of RXD buffer reached */ + __I uint32_t RESERVED3[5]; + __IO uint32_t EVENTS_ACQUIRED; /*!< Semaphore acquired */ + __I uint32_t RESERVED4[53]; + __IO uint32_t SHORTS; /*!< Shortcut register */ + __I uint32_t RESERVED5[64]; + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED6[61]; + __I uint32_t SEMSTAT; /*!< Semaphore status register */ + __I uint32_t RESERVED7[15]; + __IO uint32_t STATUS; /*!< Status from last transaction */ + __I uint32_t RESERVED8[47]; + __IO uint32_t ENABLE; /*!< Enable SPI slave */ + __I uint32_t RESERVED9; + SPIS_PSEL_Type PSEL; /*!< Unspecified */ + __I uint32_t RESERVED10[7]; + SPIS_RXD_Type RXD; /*!< Unspecified */ + __I uint32_t RESERVED11; + SPIS_TXD_Type TXD; /*!< Unspecified */ + __I uint32_t RESERVED12; + __IO uint32_t CONFIG; /*!< Configuration register */ + __I uint32_t RESERVED13; + __IO uint32_t DEF; /*!< Default character. Character clocked out in case of an ignored + transaction. */ + __I uint32_t RESERVED14[24]; + __IO uint32_t ORC; /*!< Over-read character */ +} NRF_SPIS_Type; + + +/* ================================================================================ */ +/* ================ TWIM ================ */ +/* ================================================================================ */ + + +/** + * @brief I2C compatible Two-Wire Master Interface with EasyDMA 0 (TWIM) + */ + +typedef struct { /*!< TWIM Structure */ + __O uint32_t TASKS_STARTRX; /*!< Start TWI receive sequence */ + __I uint32_t RESERVED0; + __O uint32_t TASKS_STARTTX; /*!< Start TWI transmit sequence */ + __I uint32_t RESERVED1[2]; + __O uint32_t TASKS_STOP; /*!< Stop TWI transaction. Must be issued while the TWI master is + not suspended. */ + __I uint32_t RESERVED2; + __O uint32_t TASKS_SUSPEND; /*!< Suspend TWI transaction */ + __O uint32_t TASKS_RESUME; /*!< Resume TWI transaction */ + __I uint32_t RESERVED3[56]; + __IO uint32_t EVENTS_STOPPED; /*!< TWI stopped */ + __I uint32_t RESERVED4[7]; + __IO uint32_t EVENTS_ERROR; /*!< TWI error */ + __I uint32_t RESERVED5[8]; + __IO uint32_t EVENTS_SUSPENDED; /*!< Last byte has been sent out after the SUSPEND task has been + issued, TWI traffic is now suspended. */ + __IO uint32_t EVENTS_RXSTARTED; /*!< Receive sequence started */ + __IO uint32_t EVENTS_TXSTARTED; /*!< Transmit sequence started */ + __I uint32_t RESERVED6[2]; + __IO uint32_t EVENTS_LASTRX; /*!< Byte boundary, starting to receive the last byte */ + __IO uint32_t EVENTS_LASTTX; /*!< Byte boundary, starting to transmit the last byte */ + __I uint32_t RESERVED7[39]; + __IO uint32_t SHORTS; /*!< Shortcut register */ + __I uint32_t RESERVED8[63]; + __IO uint32_t INTEN; /*!< Enable or disable interrupt */ + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED9[110]; + __IO uint32_t ERRORSRC; /*!< Error source */ + __I uint32_t RESERVED10[14]; + __IO uint32_t ENABLE; /*!< Enable TWIM */ + __I uint32_t RESERVED11; + TWIM_PSEL_Type PSEL; /*!< Unspecified */ + __I uint32_t RESERVED12[5]; + __IO uint32_t FREQUENCY; /*!< TWI frequency */ + __I uint32_t RESERVED13[3]; + TWIM_RXD_Type RXD; /*!< RXD EasyDMA channel */ + TWIM_TXD_Type TXD; /*!< TXD EasyDMA channel */ + __I uint32_t RESERVED14[13]; + __IO uint32_t ADDRESS; /*!< Address used in the TWI transfer */ +} NRF_TWIM_Type; + + +/* ================================================================================ */ +/* ================ TWIS ================ */ +/* ================================================================================ */ + + +/** + * @brief I2C compatible Two-Wire Slave Interface with EasyDMA 0 (TWIS) + */ + +typedef struct { /*!< TWIS Structure */ + __I uint32_t RESERVED0[5]; + __O uint32_t TASKS_STOP; /*!< Stop TWI transaction */ + __I uint32_t RESERVED1; + __O uint32_t TASKS_SUSPEND; /*!< Suspend TWI transaction */ + __O uint32_t TASKS_RESUME; /*!< Resume TWI transaction */ + __I uint32_t RESERVED2[3]; + __O uint32_t TASKS_PREPARERX; /*!< Prepare the TWI slave to respond to a write command */ + __O uint32_t TASKS_PREPARETX; /*!< Prepare the TWI slave to respond to a read command */ + __I uint32_t RESERVED3[51]; + __IO uint32_t EVENTS_STOPPED; /*!< TWI stopped */ + __I uint32_t RESERVED4[7]; + __IO uint32_t EVENTS_ERROR; /*!< TWI error */ + __I uint32_t RESERVED5[9]; + __IO uint32_t EVENTS_RXSTARTED; /*!< Receive sequence started */ + __IO uint32_t EVENTS_TXSTARTED; /*!< Transmit sequence started */ + __I uint32_t RESERVED6[4]; + __IO uint32_t EVENTS_WRITE; /*!< Write command received */ + __IO uint32_t EVENTS_READ; /*!< Read command received */ + __I uint32_t RESERVED7[37]; + __IO uint32_t SHORTS; /*!< Shortcut register */ + __I uint32_t RESERVED8[63]; + __IO uint32_t INTEN; /*!< Enable or disable interrupt */ + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED9[113]; + __IO uint32_t ERRORSRC; /*!< Error source */ + __I uint32_t MATCH; /*!< Status register indicating which address had a match */ + __I uint32_t RESERVED10[10]; + __IO uint32_t ENABLE; /*!< Enable TWIS */ + __I uint32_t RESERVED11; + TWIS_PSEL_Type PSEL; /*!< Unspecified */ + __I uint32_t RESERVED12[9]; + TWIS_RXD_Type RXD; /*!< RXD EasyDMA channel */ + __I uint32_t RESERVED13; + TWIS_TXD_Type TXD; /*!< TXD EasyDMA channel */ + __I uint32_t RESERVED14[14]; + __IO uint32_t ADDRESS[2]; /*!< Description collection[0]: TWI slave address 0 */ + __I uint32_t RESERVED15; + __IO uint32_t CONFIG; /*!< Configuration register for the address match mechanism */ + __I uint32_t RESERVED16[10]; + __IO uint32_t ORC; /*!< Over-read character. Character sent out in case of an over-read + of the transmit buffer. */ +} NRF_TWIS_Type; + + +/* ================================================================================ */ +/* ================ SPI ================ */ +/* ================================================================================ */ + + +/** + * @brief Serial Peripheral Interface 0 (SPI) + */ + +typedef struct { /*!< SPI Structure */ + __I uint32_t RESERVED0[66]; + __IO uint32_t EVENTS_READY; /*!< TXD byte sent and RXD byte received */ + __I uint32_t RESERVED1[126]; + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED2[125]; + __IO uint32_t ENABLE; /*!< Enable SPI */ + __I uint32_t RESERVED3; + SPI_PSEL_Type PSEL; /*!< Unspecified */ + __I uint32_t RESERVED4; + __I uint32_t RXD; /*!< RXD register */ + __IO uint32_t TXD; /*!< TXD register */ + __I uint32_t RESERVED5; + __IO uint32_t FREQUENCY; /*!< SPI frequency */ + __I uint32_t RESERVED6[11]; + __IO uint32_t CONFIG; /*!< Configuration register */ +} NRF_SPI_Type; + + +/* ================================================================================ */ +/* ================ TWI ================ */ +/* ================================================================================ */ + + +/** + * @brief I2C compatible Two-Wire Interface 0 (TWI) + */ + +typedef struct { /*!< TWI Structure */ + __O uint32_t TASKS_STARTRX; /*!< Start TWI receive sequence */ + __I uint32_t RESERVED0; + __O uint32_t TASKS_STARTTX; /*!< Start TWI transmit sequence */ + __I uint32_t RESERVED1[2]; + __O uint32_t TASKS_STOP; /*!< Stop TWI transaction */ + __I uint32_t RESERVED2; + __O uint32_t TASKS_SUSPEND; /*!< Suspend TWI transaction */ + __O uint32_t TASKS_RESUME; /*!< Resume TWI transaction */ + __I uint32_t RESERVED3[56]; + __IO uint32_t EVENTS_STOPPED; /*!< TWI stopped */ + __IO uint32_t EVENTS_RXDREADY; /*!< TWI RXD byte received */ + __I uint32_t RESERVED4[4]; + __IO uint32_t EVENTS_TXDSENT; /*!< TWI TXD byte sent */ + __I uint32_t RESERVED5; + __IO uint32_t EVENTS_ERROR; /*!< TWI error */ + __I uint32_t RESERVED6[4]; + __IO uint32_t EVENTS_BB; /*!< TWI byte boundary, generated before each byte that is sent or + received */ + __I uint32_t RESERVED7[3]; + __IO uint32_t EVENTS_SUSPENDED; /*!< TWI entered the suspended state */ + __I uint32_t RESERVED8[45]; + __IO uint32_t SHORTS; /*!< Shortcut register */ + __I uint32_t RESERVED9[64]; + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED10[110]; + __IO uint32_t ERRORSRC; /*!< Error source */ + __I uint32_t RESERVED11[14]; + __IO uint32_t ENABLE; /*!< Enable TWI */ + __I uint32_t RESERVED12; + __IO uint32_t PSELSCL; /*!< Pin select for SCL */ + __IO uint32_t PSELSDA; /*!< Pin select for SDA */ + __I uint32_t RESERVED13[2]; + __I uint32_t RXD; /*!< RXD register */ + __IO uint32_t TXD; /*!< TXD register */ + __I uint32_t RESERVED14; + __IO uint32_t FREQUENCY; /*!< TWI frequency */ + __I uint32_t RESERVED15[24]; + __IO uint32_t ADDRESS; /*!< Address used in the TWI transfer */ +} NRF_TWI_Type; + + +/* ================================================================================ */ +/* ================ NFCT ================ */ +/* ================================================================================ */ + + +/** + * @brief NFC-A compatible radio (NFCT) + */ + +typedef struct { /*!< NFCT Structure */ + __O uint32_t TASKS_ACTIVATE; /*!< Activate NFC peripheral for incoming and outgoing frames, change + state to activated */ + __O uint32_t TASKS_DISABLE; /*!< Disable NFC peripheral */ + __O uint32_t TASKS_SENSE; /*!< Enable NFC sense field mode, change state to sense mode */ + __O uint32_t TASKS_STARTTX; /*!< Start transmission of a outgoing frame, change state to transmit */ + __I uint32_t RESERVED0[3]; + __O uint32_t TASKS_ENABLERXDATA; /*!< Initializes the EasyDMA for receive. */ + __I uint32_t RESERVED1; + __O uint32_t TASKS_GOIDLE; /*!< Force state machine to IDLE state */ + __O uint32_t TASKS_GOSLEEP; /*!< Force state machine to SLEEP_A state */ + __I uint32_t RESERVED2[53]; + __IO uint32_t EVENTS_READY; /*!< The NFC peripheral is ready to receive and send frames */ + __IO uint32_t EVENTS_FIELDDETECTED; /*!< Remote NFC field detected */ + __IO uint32_t EVENTS_FIELDLOST; /*!< Remote NFC field lost */ + __IO uint32_t EVENTS_TXFRAMESTART; /*!< Marks the start of the first symbol of a transmitted frame */ + __IO uint32_t EVENTS_TXFRAMEEND; /*!< Marks the end of the last transmitted on-air symbol of a frame */ + __IO uint32_t EVENTS_RXFRAMESTART; /*!< Marks the end of the first symbol of a received frame */ + __IO uint32_t EVENTS_RXFRAMEEND; /*!< Received data have been checked (CRC, parity) and transferred + to RAM, and EasyDMA has ended accessing the RX buffer */ + __IO uint32_t EVENTS_ERROR; /*!< NFC error reported. The ERRORSTATUS register contains details + on the source of the error. */ + __I uint32_t RESERVED3[2]; + __IO uint32_t EVENTS_RXERROR; /*!< NFC RX frame error reported. The FRAMESTATUS.RX register contains + details on the source of the error. */ + __IO uint32_t EVENTS_ENDRX; /*!< RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full. */ + __IO uint32_t EVENTS_ENDTX; /*!< Transmission of data in RAM has ended, and EasyDMA has ended + accessing the TX buffer */ + __I uint32_t RESERVED4; + __IO uint32_t EVENTS_AUTOCOLRESSTARTED; /*!< Auto collision resolution process has started */ + __I uint32_t RESERVED5[3]; + __IO uint32_t EVENTS_COLLISION; /*!< NFC Auto collision resolution error reported. */ + __IO uint32_t EVENTS_SELECTED; /*!< NFC Auto collision resolution successfully completed */ + __IO uint32_t EVENTS_STARTED; /*!< EasyDMA is ready to receive or send frames. */ + __I uint32_t RESERVED6[43]; + __IO uint32_t SHORTS; /*!< Shortcut register */ + __I uint32_t RESERVED7[63]; + __IO uint32_t INTEN; /*!< Enable or disable interrupt */ + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED8[62]; + __IO uint32_t ERRORSTATUS; /*!< NFC Error Status register */ + __I uint32_t RESERVED9; + NFCT_FRAMESTATUS_Type FRAMESTATUS; /*!< Unspecified */ + __I uint32_t RESERVED10[8]; + __I uint32_t CURRENTLOADCTRL; /*!< Current value driven to the NFC Load Control */ + __I uint32_t RESERVED11[2]; + __I uint32_t FIELDPRESENT; /*!< Indicates the presence or not of a valid field */ + __I uint32_t RESERVED12[49]; + __IO uint32_t FRAMEDELAYMIN; /*!< Minimum frame delay */ + __IO uint32_t FRAMEDELAYMAX; /*!< Maximum frame delay */ + __IO uint32_t FRAMEDELAYMODE; /*!< Configuration register for the Frame Delay Timer */ + __IO uint32_t PACKETPTR; /*!< Packet pointer for TXD and RXD data storage in Data RAM */ + __IO uint32_t MAXLEN; /*!< Size of allocated for TXD and RXD data storage buffer in Data + RAM */ + NFCT_TXD_Type TXD; /*!< Unspecified */ + NFCT_RXD_Type RXD; /*!< Unspecified */ + __I uint32_t RESERVED13[26]; + __IO uint32_t NFCID1_LAST; /*!< Last NFCID1 part (4, 7 or 10 bytes ID) */ + __IO uint32_t NFCID1_2ND_LAST; /*!< Second last NFCID1 part (7 or 10 bytes ID) */ + __IO uint32_t NFCID1_3RD_LAST; /*!< Third last NFCID1 part (10 bytes ID) */ + __I uint32_t RESERVED14; + __IO uint32_t SENSRES; /*!< NFC-A SENS_RES auto-response settings */ + __IO uint32_t SELRES; /*!< NFC-A SEL_RES auto-response settings */ +} NRF_NFCT_Type; + + +/* ================================================================================ */ +/* ================ GPIOTE ================ */ +/* ================================================================================ */ + + +/** + * @brief GPIO Tasks and Events (GPIOTE) + */ + +typedef struct { /*!< GPIOTE Structure */ + __O uint32_t TASKS_OUT[8]; /*!< Description collection[0]: Task for writing to pin specified + in CONFIG[0].PSEL. Action on pin is configured in CONFIG[0].POLARITY. */ + __I uint32_t RESERVED0[4]; + __O uint32_t TASKS_SET[8]; /*!< Description collection[0]: Task for writing to pin specified + in CONFIG[0].PSEL. Action on pin is to set it high. */ + __I uint32_t RESERVED1[4]; + __O uint32_t TASKS_CLR[8]; /*!< Description collection[0]: Task for writing to pin specified + in CONFIG[0].PSEL. Action on pin is to set it low. */ + __I uint32_t RESERVED2[32]; + __IO uint32_t EVENTS_IN[8]; /*!< Description collection[0]: Event generated from pin specified + in CONFIG[0].PSEL */ + __I uint32_t RESERVED3[23]; + __IO uint32_t EVENTS_PORT; /*!< Event generated from multiple input GPIO pins with SENSE mechanism + enabled */ + __I uint32_t RESERVED4[97]; + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED5[129]; + __IO uint32_t CONFIG[8]; /*!< Description collection[0]: Configuration for OUT[n], SET[n] + and CLR[n] tasks and IN[n] event */ +} NRF_GPIOTE_Type; + + +/* ================================================================================ */ +/* ================ SAADC ================ */ +/* ================================================================================ */ + + +/** + * @brief Analog to Digital Converter (SAADC) + */ + +typedef struct { /*!< SAADC Structure */ + __O uint32_t TASKS_START; /*!< Start the ADC and prepare the result buffer in RAM */ + __O uint32_t TASKS_SAMPLE; /*!< Take one ADC sample, if scan is enabled all channels are sampled */ + __O uint32_t TASKS_STOP; /*!< Stop the ADC and terminate any on-going conversion */ + __O uint32_t TASKS_CALIBRATEOFFSET; /*!< Starts offset auto-calibration */ + __I uint32_t RESERVED0[60]; + __IO uint32_t EVENTS_STARTED; /*!< The ADC has started */ + __IO uint32_t EVENTS_END; /*!< The ADC has filled up the Result buffer */ + __IO uint32_t EVENTS_DONE; /*!< A conversion task has been completed. Depending on the mode, + multiple conversions might be needed for a result to be transferred + to RAM. */ + __IO uint32_t EVENTS_RESULTDONE; /*!< A result is ready to get transferred to RAM. */ + __IO uint32_t EVENTS_CALIBRATEDONE; /*!< Calibration is complete */ + __IO uint32_t EVENTS_STOPPED; /*!< The ADC has stopped */ + SAADC_EVENTS_CH_Type EVENTS_CH[8]; /*!< Unspecified */ + __I uint32_t RESERVED1[106]; + __IO uint32_t INTEN; /*!< Enable or disable interrupt */ + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED2[61]; + __I uint32_t STATUS; /*!< Status */ + __I uint32_t RESERVED3[63]; + __IO uint32_t ENABLE; /*!< Enable or disable ADC */ + __I uint32_t RESERVED4[3]; + SAADC_CH_Type CH[8]; /*!< Unspecified */ + __I uint32_t RESERVED5[24]; + __IO uint32_t RESOLUTION; /*!< Resolution configuration */ + __IO uint32_t OVERSAMPLE; /*!< Oversampling configuration. OVERSAMPLE should not be combined + with SCAN. The RESOLUTION is applied before averaging, thus + for high OVERSAMPLE a higher RESOLUTION should be used. */ + __IO uint32_t SAMPLERATE; /*!< Controls normal or continuous sample rate */ + __I uint32_t RESERVED6[12]; + SAADC_RESULT_Type RESULT; /*!< RESULT EasyDMA channel */ +} NRF_SAADC_Type; + + +/* ================================================================================ */ +/* ================ TIMER ================ */ +/* ================================================================================ */ + + +/** + * @brief Timer/Counter 0 (TIMER) + */ + +typedef struct { /*!< TIMER Structure */ + __O uint32_t TASKS_START; /*!< Start Timer */ + __O uint32_t TASKS_STOP; /*!< Stop Timer */ + __O uint32_t TASKS_COUNT; /*!< Increment Timer (Counter mode only) */ + __O uint32_t TASKS_CLEAR; /*!< Clear time */ + __O uint32_t TASKS_SHUTDOWN; /*!< Deprecated register - Shut down timer */ + __I uint32_t RESERVED0[11]; + __O uint32_t TASKS_CAPTURE[6]; /*!< Description collection[0]: Capture Timer value to CC[0] register */ + __I uint32_t RESERVED1[58]; + __IO uint32_t EVENTS_COMPARE[6]; /*!< Description collection[0]: Compare event on CC[0] match */ + __I uint32_t RESERVED2[42]; + __IO uint32_t SHORTS; /*!< Shortcut register */ + __I uint32_t RESERVED3[64]; + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED4[126]; + __IO uint32_t MODE; /*!< Timer mode selection */ + __IO uint32_t BITMODE; /*!< Configure the number of bits used by the TIMER */ + __I uint32_t RESERVED5; + __IO uint32_t PRESCALER; /*!< Timer prescaler register */ + __I uint32_t RESERVED6[11]; + __IO uint32_t CC[6]; /*!< Description collection[0]: Capture/Compare register 0 */ +} NRF_TIMER_Type; + + +/* ================================================================================ */ +/* ================ RTC ================ */ +/* ================================================================================ */ + + +/** + * @brief Real time counter 0 (RTC) + */ + +typedef struct { /*!< RTC Structure */ + __O uint32_t TASKS_START; /*!< Start RTC COUNTER */ + __O uint32_t TASKS_STOP; /*!< Stop RTC COUNTER */ + __O uint32_t TASKS_CLEAR; /*!< Clear RTC COUNTER */ + __O uint32_t TASKS_TRIGOVRFLW; /*!< Set COUNTER to 0xFFFFF0 */ + __I uint32_t RESERVED0[60]; + __IO uint32_t EVENTS_TICK; /*!< Event on COUNTER increment */ + __IO uint32_t EVENTS_OVRFLW; /*!< Event on COUNTER overflow */ + __I uint32_t RESERVED1[14]; + __IO uint32_t EVENTS_COMPARE[4]; /*!< Description collection[0]: Compare event on CC[0] match */ + __I uint32_t RESERVED2[109]; + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED3[13]; + __IO uint32_t EVTEN; /*!< Enable or disable event routing */ + __IO uint32_t EVTENSET; /*!< Enable event routing */ + __IO uint32_t EVTENCLR; /*!< Disable event routing */ + __I uint32_t RESERVED4[110]; + __I uint32_t COUNTER; /*!< Current COUNTER value */ + __IO uint32_t PRESCALER; /*!< 12 bit prescaler for COUNTER frequency (32768/(PRESCALER+1)).Must + be written when RTC is stopped */ + __I uint32_t RESERVED5[13]; + __IO uint32_t CC[4]; /*!< Description collection[0]: Compare register 0 */ +} NRF_RTC_Type; + + +/* ================================================================================ */ +/* ================ TEMP ================ */ +/* ================================================================================ */ + + +/** + * @brief Temperature Sensor (TEMP) + */ + +typedef struct { /*!< TEMP Structure */ + __O uint32_t TASKS_START; /*!< Start temperature measurement */ + __O uint32_t TASKS_STOP; /*!< Stop temperature measurement */ + __I uint32_t RESERVED0[62]; + __IO uint32_t EVENTS_DATARDY; /*!< Temperature measurement complete, data ready */ + __I uint32_t RESERVED1[128]; + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED2[127]; + __I int32_t TEMP; /*!< Temperature in degC (0.25deg steps) */ + __I uint32_t RESERVED3[5]; + __IO uint32_t A0; /*!< Slope of 1st piece wise linear function */ + __IO uint32_t A1; /*!< Slope of 2nd piece wise linear function */ + __IO uint32_t A2; /*!< Slope of 3rd piece wise linear function */ + __IO uint32_t A3; /*!< Slope of 4th piece wise linear function */ + __IO uint32_t A4; /*!< Slope of 5th piece wise linear function */ + __IO uint32_t A5; /*!< Slope of 6th piece wise linear function */ + __I uint32_t RESERVED4[2]; + __IO uint32_t B0; /*!< y-intercept of 1st piece wise linear function */ + __IO uint32_t B1; /*!< y-intercept of 2nd piece wise linear function */ + __IO uint32_t B2; /*!< y-intercept of 3rd piece wise linear function */ + __IO uint32_t B3; /*!< y-intercept of 4th piece wise linear function */ + __IO uint32_t B4; /*!< y-intercept of 5th piece wise linear function */ + __IO uint32_t B5; /*!< y-intercept of 6th piece wise linear function */ + __I uint32_t RESERVED5[2]; + __IO uint32_t T0; /*!< End point of 1st piece wise linear function */ + __IO uint32_t T1; /*!< End point of 2nd piece wise linear function */ + __IO uint32_t T2; /*!< End point of 3rd piece wise linear function */ + __IO uint32_t T3; /*!< End point of 4th piece wise linear function */ + __IO uint32_t T4; /*!< End point of 5th piece wise linear function */ +} NRF_TEMP_Type; + + +/* ================================================================================ */ +/* ================ RNG ================ */ +/* ================================================================================ */ + + +/** + * @brief Random Number Generator (RNG) + */ + +typedef struct { /*!< RNG Structure */ + __O uint32_t TASKS_START; /*!< Task starting the random number generator */ + __O uint32_t TASKS_STOP; /*!< Task stopping the random number generator */ + __I uint32_t RESERVED0[62]; + __IO uint32_t EVENTS_VALRDY; /*!< Event being generated for every new random number written to + the VALUE register */ + __I uint32_t RESERVED1[63]; + __IO uint32_t SHORTS; /*!< Shortcut register */ + __I uint32_t RESERVED2[64]; + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED3[126]; + __IO uint32_t CONFIG; /*!< Configuration register */ + __I uint32_t VALUE; /*!< Output random number */ +} NRF_RNG_Type; + + +/* ================================================================================ */ +/* ================ ECB ================ */ +/* ================================================================================ */ + + +/** + * @brief AES ECB Mode Encryption (ECB) + */ + +typedef struct { /*!< ECB Structure */ + __O uint32_t TASKS_STARTECB; /*!< Start ECB block encrypt */ + __O uint32_t TASKS_STOPECB; /*!< Abort a possible executing ECB operation */ + __I uint32_t RESERVED0[62]; + __IO uint32_t EVENTS_ENDECB; /*!< ECB block encrypt complete */ + __IO uint32_t EVENTS_ERRORECB; /*!< ECB block encrypt aborted because of a STOPECB task or due to + an error */ + __I uint32_t RESERVED1[127]; + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED2[126]; + __IO uint32_t ECBDATAPTR; /*!< ECB block encrypt memory pointers */ +} NRF_ECB_Type; + + +/* ================================================================================ */ +/* ================ CCM ================ */ +/* ================================================================================ */ + + +/** + * @brief AES CCM Mode Encryption (CCM) + */ + +typedef struct { /*!< CCM Structure */ + __O uint32_t TASKS_KSGEN; /*!< Start generation of key-stream. This operation will stop by + itself when completed. */ + __O uint32_t TASKS_CRYPT; /*!< Start encryption/decryption. This operation will stop by itself + when completed. */ + __O uint32_t TASKS_STOP; /*!< Stop encryption/decryption */ + __I uint32_t RESERVED0[61]; + __IO uint32_t EVENTS_ENDKSGEN; /*!< Key-stream generation complete */ + __IO uint32_t EVENTS_ENDCRYPT; /*!< Encrypt/decrypt complete */ + __IO uint32_t EVENTS_ERROR; /*!< CCM error event */ + __I uint32_t RESERVED1[61]; + __IO uint32_t SHORTS; /*!< Shortcut register */ + __I uint32_t RESERVED2[64]; + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED3[61]; + __I uint32_t MICSTATUS; /*!< MIC check result */ + __I uint32_t RESERVED4[63]; + __IO uint32_t ENABLE; /*!< Enable */ + __IO uint32_t MODE; /*!< Operation mode */ + __IO uint32_t CNFPTR; /*!< Pointer to data structure holding AES key and NONCE vector */ + __IO uint32_t INPTR; /*!< Input pointer */ + __IO uint32_t OUTPTR; /*!< Output pointer */ + __IO uint32_t SCRATCHPTR; /*!< Pointer to data area used for temporary storage */ +} NRF_CCM_Type; + + +/* ================================================================================ */ +/* ================ AAR ================ */ +/* ================================================================================ */ + + +/** + * @brief Accelerated Address Resolver (AAR) + */ + +typedef struct { /*!< AAR Structure */ + __O uint32_t TASKS_START; /*!< Start resolving addresses based on IRKs specified in the IRK + data structure */ + __I uint32_t RESERVED0; + __O uint32_t TASKS_STOP; /*!< Stop resolving addresses */ + __I uint32_t RESERVED1[61]; + __IO uint32_t EVENTS_END; /*!< Address resolution procedure complete */ + __IO uint32_t EVENTS_RESOLVED; /*!< Address resolved */ + __IO uint32_t EVENTS_NOTRESOLVED; /*!< Address not resolved */ + __I uint32_t RESERVED2[126]; + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED3[61]; + __I uint32_t STATUS; /*!< Resolution status */ + __I uint32_t RESERVED4[63]; + __IO uint32_t ENABLE; /*!< Enable AAR */ + __IO uint32_t NIRK; /*!< Number of IRKs */ + __IO uint32_t IRKPTR; /*!< Pointer to IRK data structure */ + __I uint32_t RESERVED5; + __IO uint32_t ADDRPTR; /*!< Pointer to the resolvable address */ + __IO uint32_t SCRATCHPTR; /*!< Pointer to data area used for temporary storage */ +} NRF_AAR_Type; + + +/* ================================================================================ */ +/* ================ WDT ================ */ +/* ================================================================================ */ + + +/** + * @brief Watchdog Timer (WDT) + */ + +typedef struct { /*!< WDT Structure */ + __O uint32_t TASKS_START; /*!< Start the watchdog */ + __I uint32_t RESERVED0[63]; + __IO uint32_t EVENTS_TIMEOUT; /*!< Watchdog timeout */ + __I uint32_t RESERVED1[128]; + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED2[61]; + __I uint32_t RUNSTATUS; /*!< Run status */ + __I uint32_t REQSTATUS; /*!< Request status */ + __I uint32_t RESERVED3[63]; + __IO uint32_t CRV; /*!< Counter reload value */ + __IO uint32_t RREN; /*!< Enable register for reload request registers */ + __IO uint32_t CONFIG; /*!< Configuration register */ + __I uint32_t RESERVED4[60]; + __O uint32_t RR[8]; /*!< Description collection[0]: Reload request 0 */ +} NRF_WDT_Type; + + +/* ================================================================================ */ +/* ================ QDEC ================ */ +/* ================================================================================ */ + + +/** + * @brief Quadrature Decoder (QDEC) + */ + +typedef struct { /*!< QDEC Structure */ + __O uint32_t TASKS_START; /*!< Task starting the quadrature decoder */ + __O uint32_t TASKS_STOP; /*!< Task stopping the quadrature decoder */ + __O uint32_t TASKS_READCLRACC; /*!< Read and clear ACC and ACCDBL */ + __O uint32_t TASKS_RDCLRACC; /*!< Read and clear ACC */ + __O uint32_t TASKS_RDCLRDBL; /*!< Read and clear ACCDBL */ + __I uint32_t RESERVED0[59]; + __IO uint32_t EVENTS_SAMPLERDY; /*!< Event being generated for every new sample value written to + the SAMPLE register */ + __IO uint32_t EVENTS_REPORTRDY; /*!< Non-null report ready */ + __IO uint32_t EVENTS_ACCOF; /*!< ACC or ACCDBL register overflow */ + __IO uint32_t EVENTS_DBLRDY; /*!< Double displacement(s) detected */ + __IO uint32_t EVENTS_STOPPED; /*!< QDEC has been stopped */ + __I uint32_t RESERVED1[59]; + __IO uint32_t SHORTS; /*!< Shortcut register */ + __I uint32_t RESERVED2[64]; + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED3[125]; + __IO uint32_t ENABLE; /*!< Enable the quadrature decoder */ + __IO uint32_t LEDPOL; /*!< LED output pin polarity */ + __IO uint32_t SAMPLEPER; /*!< Sample period */ + __I int32_t SAMPLE; /*!< Motion sample value */ + __IO uint32_t REPORTPER; /*!< Number of samples to be taken before REPORTRDY and DBLRDY events + can be generated */ + __I int32_t ACC; /*!< Register accumulating the valid transitions */ + __I int32_t ACCREAD; /*!< Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC + task */ + QDEC_PSEL_Type PSEL; /*!< Unspecified */ + __IO uint32_t DBFEN; /*!< Enable input debounce filters */ + __I uint32_t RESERVED4[5]; + __IO uint32_t LEDPRE; /*!< Time period the LED is switched ON prior to sampling */ + __I uint32_t ACCDBL; /*!< Register accumulating the number of detected double transitions */ + __I uint32_t ACCDBLREAD; /*!< Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL + task */ +} NRF_QDEC_Type; + + +/* ================================================================================ */ +/* ================ COMP ================ */ +/* ================================================================================ */ + + +/** + * @brief Comparator (COMP) + */ + +typedef struct { /*!< COMP Structure */ + __O uint32_t TASKS_START; /*!< Start comparator */ + __O uint32_t TASKS_STOP; /*!< Stop comparator */ + __O uint32_t TASKS_SAMPLE; /*!< Sample comparator value */ + __I uint32_t RESERVED0[61]; + __IO uint32_t EVENTS_READY; /*!< COMP is ready and output is valid */ + __IO uint32_t EVENTS_DOWN; /*!< Downward crossing */ + __IO uint32_t EVENTS_UP; /*!< Upward crossing */ + __IO uint32_t EVENTS_CROSS; /*!< Downward or upward crossing */ + __I uint32_t RESERVED1[60]; + __IO uint32_t SHORTS; /*!< Shortcut register */ + __I uint32_t RESERVED2[63]; + __IO uint32_t INTEN; /*!< Enable or disable interrupt */ + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED3[61]; + __I uint32_t RESULT; /*!< Compare result */ + __I uint32_t RESERVED4[63]; + __IO uint32_t ENABLE; /*!< COMP enable */ + __IO uint32_t PSEL; /*!< Pin select */ + __IO uint32_t REFSEL; /*!< Reference source select */ + __IO uint32_t EXTREFSEL; /*!< External reference select */ + __I uint32_t RESERVED5[8]; + __IO uint32_t TH; /*!< Threshold configuration for hysteresis unit */ + __IO uint32_t MODE; /*!< Mode configuration */ + __IO uint32_t HYST; /*!< Comparator hysteresis enable */ + __IO uint32_t ISOURCE; /*!< Current source select on analog input */ +} NRF_COMP_Type; + + +/* ================================================================================ */ +/* ================ LPCOMP ================ */ +/* ================================================================================ */ + + +/** + * @brief Low Power Comparator (LPCOMP) + */ + +typedef struct { /*!< LPCOMP Structure */ + __O uint32_t TASKS_START; /*!< Start comparator */ + __O uint32_t TASKS_STOP; /*!< Stop comparator */ + __O uint32_t TASKS_SAMPLE; /*!< Sample comparator value */ + __I uint32_t RESERVED0[61]; + __IO uint32_t EVENTS_READY; /*!< LPCOMP is ready and output is valid */ + __IO uint32_t EVENTS_DOWN; /*!< Downward crossing */ + __IO uint32_t EVENTS_UP; /*!< Upward crossing */ + __IO uint32_t EVENTS_CROSS; /*!< Downward or upward crossing */ + __I uint32_t RESERVED1[60]; + __IO uint32_t SHORTS; /*!< Shortcut register */ + __I uint32_t RESERVED2[64]; + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED3[61]; + __I uint32_t RESULT; /*!< Compare result */ + __I uint32_t RESERVED4[63]; + __IO uint32_t ENABLE; /*!< Enable LPCOMP */ + __IO uint32_t PSEL; /*!< Input pin select */ + __IO uint32_t REFSEL; /*!< Reference select */ + __IO uint32_t EXTREFSEL; /*!< External reference select */ + __I uint32_t RESERVED5[4]; + __IO uint32_t ANADETECT; /*!< Analog detect configuration */ + __I uint32_t RESERVED6[5]; + __IO uint32_t HYST; /*!< Comparator hysteresis enable */ +} NRF_LPCOMP_Type; + + +/* ================================================================================ */ +/* ================ SWI ================ */ +/* ================================================================================ */ + + +/** + * @brief Software interrupt 0 (SWI) + */ + +typedef struct { /*!< SWI Structure */ + __I uint32_t UNUSED; /*!< Unused. */ +} NRF_SWI_Type; + + +/* ================================================================================ */ +/* ================ EGU ================ */ +/* ================================================================================ */ + + +/** + * @brief Event Generator Unit 0 (EGU) + */ + +typedef struct { /*!< EGU Structure */ + __O uint32_t TASKS_TRIGGER[16]; /*!< Description collection[0]: Trigger 0 for triggering the corresponding + TRIGGERED[0] event */ + __I uint32_t RESERVED0[48]; + __IO uint32_t EVENTS_TRIGGERED[16]; /*!< Description collection[0]: Event number 0 generated by triggering + the corresponding TRIGGER[0] task */ + __I uint32_t RESERVED1[112]; + __IO uint32_t INTEN; /*!< Enable or disable interrupt */ + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ +} NRF_EGU_Type; + + +/* ================================================================================ */ +/* ================ PWM ================ */ +/* ================================================================================ */ + + +/** + * @brief Pulse Width Modulation Unit 0 (PWM) + */ + +typedef struct { /*!< PWM Structure */ + __I uint32_t RESERVED0; + __O uint32_t TASKS_STOP; /*!< Stops PWM pulse generation on all channels at the end of current + PWM period, and stops sequence playback */ + __O uint32_t TASKS_SEQSTART[2]; /*!< Description collection[0]: Loads the first PWM value on all + enabled channels from sequence 0, and starts playing that sequence + at the rate defined in SEQ[0]REFRESH and/or DECODER.MODE. Causes + PWM generation to start it was not running. */ + __O uint32_t TASKS_NEXTSTEP; /*!< Steps by one value in the current sequence on all enabled channels + if DECODER.MODE=NextStep. Does not cause PWM generation to start + it was not running. */ + __I uint32_t RESERVED1[60]; + __IO uint32_t EVENTS_STOPPED; /*!< Response to STOP task, emitted when PWM pulses are no longer + generated */ + __IO uint32_t EVENTS_SEQSTARTED[2]; /*!< Description collection[0]: First PWM period started on sequence + 0 */ + __IO uint32_t EVENTS_SEQEND[2]; /*!< Description collection[0]: Emitted at end of every sequence + 0, when last value from RAM has been applied to wave counter */ + __IO uint32_t EVENTS_PWMPERIODEND; /*!< Emitted at the end of each PWM period */ + __IO uint32_t EVENTS_LOOPSDONE; /*!< Concatenated sequences have been played the amount of times + defined in LOOP.CNT */ + __I uint32_t RESERVED2[56]; + __IO uint32_t SHORTS; /*!< Shortcut register */ + __I uint32_t RESERVED3[63]; + __IO uint32_t INTEN; /*!< Enable or disable interrupt */ + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED4[125]; + __IO uint32_t ENABLE; /*!< PWM module enable register */ + __IO uint32_t MODE; /*!< Selects operating mode of the wave counter */ + __IO uint32_t COUNTERTOP; /*!< Value up to which the pulse generator counter counts */ + __IO uint32_t PRESCALER; /*!< Configuration for PWM_CLK */ + __IO uint32_t DECODER; /*!< Configuration of the decoder */ + __IO uint32_t LOOP; /*!< Amount of playback of a loop */ + __I uint32_t RESERVED5[2]; + PWM_SEQ_Type SEQ[2]; /*!< Unspecified */ + PWM_PSEL_Type PSEL; /*!< Unspecified */ +} NRF_PWM_Type; + + +/* ================================================================================ */ +/* ================ PDM ================ */ +/* ================================================================================ */ + + +/** + * @brief Pulse Density Modulation (Digital Microphone) Interface (PDM) + */ + +typedef struct { /*!< PDM Structure */ + __O uint32_t TASKS_START; /*!< Starts continuous PDM transfer */ + __O uint32_t TASKS_STOP; /*!< Stops PDM transfer */ + __I uint32_t RESERVED0[62]; + __IO uint32_t EVENTS_STARTED; /*!< PDM transfer has started */ + __IO uint32_t EVENTS_STOPPED; /*!< PDM transfer has finished */ + __IO uint32_t EVENTS_END; /*!< The PDM has written the last sample specified by SAMPLE.MAXCNT + (or the last sample after a STOP task has been received) to + Data RAM */ + __I uint32_t RESERVED1[125]; + __IO uint32_t INTEN; /*!< Enable or disable interrupt */ + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED2[125]; + __IO uint32_t ENABLE; /*!< PDM module enable register */ + __IO uint32_t PDMCLKCTRL; /*!< PDM clock generator control */ + __IO uint32_t MODE; /*!< Defines the routing of the connected PDM microphones' signals */ + __I uint32_t RESERVED3[3]; + __IO uint32_t GAINL; /*!< Left output gain adjustment */ + __IO uint32_t GAINR; /*!< Right output gain adjustment */ + __I uint32_t RESERVED4[8]; + PDM_PSEL_Type PSEL; /*!< Unspecified */ + __I uint32_t RESERVED5[6]; + PDM_SAMPLE_Type SAMPLE; /*!< Unspecified */ +} NRF_PDM_Type; + + +/* ================================================================================ */ +/* ================ NVMC ================ */ +/* ================================================================================ */ + + +/** + * @brief Non Volatile Memory Controller (NVMC) + */ + +typedef struct { /*!< NVMC Structure */ + __I uint32_t RESERVED0[256]; + __I uint32_t READY; /*!< Ready flag */ + __I uint32_t RESERVED1[64]; + __IO uint32_t CONFIG; /*!< Configuration register */ + + union { + __IO uint32_t ERASEPCR1; /*!< Deprecated register - Register for erasing a page in Code area. + Equivalent to ERASEPAGE. */ + __IO uint32_t ERASEPAGE; /*!< Register for erasing a page in Code area */ + }; + __IO uint32_t ERASEALL; /*!< Register for erasing all non-volatile user memory */ + __IO uint32_t ERASEPCR0; /*!< Deprecated register - Register for erasing a page in Code area. + Equivalent to ERASEPAGE. */ + __IO uint32_t ERASEUICR; /*!< Register for erasing User Information Configuration Registers */ + __I uint32_t RESERVED2[10]; + __IO uint32_t ICACHECNF; /*!< I-Code cache configuration register. */ + __I uint32_t RESERVED3; + __IO uint32_t IHIT; /*!< I-Code cache hit counter. */ + __IO uint32_t IMISS; /*!< I-Code cache miss counter. */ +} NRF_NVMC_Type; + + +/* ================================================================================ */ +/* ================ PPI ================ */ +/* ================================================================================ */ + + +/** + * @brief Programmable Peripheral Interconnect (PPI) + */ + +typedef struct { /*!< PPI Structure */ + PPI_TASKS_CHG_Type TASKS_CHG[6]; /*!< Channel group tasks */ + __I uint32_t RESERVED0[308]; + __IO uint32_t CHEN; /*!< Channel enable register */ + __IO uint32_t CHENSET; /*!< Channel enable set register */ + __IO uint32_t CHENCLR; /*!< Channel enable clear register */ + __I uint32_t RESERVED1; + PPI_CH_Type CH[20]; /*!< PPI Channel */ + __I uint32_t RESERVED2[148]; + __IO uint32_t CHG[6]; /*!< Description collection[0]: Channel group 0 */ + __I uint32_t RESERVED3[62]; + PPI_FORK_Type FORK[32]; /*!< Fork */ +} NRF_PPI_Type; + + +/* ================================================================================ */ +/* ================ MWU ================ */ +/* ================================================================================ */ + + +/** + * @brief Memory Watch Unit (MWU) + */ + +typedef struct { /*!< MWU Structure */ + __I uint32_t RESERVED0[64]; + MWU_EVENTS_REGION_Type EVENTS_REGION[4]; /*!< Unspecified */ + __I uint32_t RESERVED1[16]; + MWU_EVENTS_PREGION_Type EVENTS_PREGION[2]; /*!< Unspecified */ + __I uint32_t RESERVED2[100]; + __IO uint32_t INTEN; /*!< Enable or disable interrupt */ + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED3[5]; + __IO uint32_t NMIEN; /*!< Enable or disable non-maskable interrupt */ + __IO uint32_t NMIENSET; /*!< Enable non-maskable interrupt */ + __IO uint32_t NMIENCLR; /*!< Disable non-maskable interrupt */ + __I uint32_t RESERVED4[53]; + MWU_PERREGION_Type PERREGION[2]; /*!< Unspecified */ + __I uint32_t RESERVED5[64]; + __IO uint32_t REGIONEN; /*!< Enable/disable regions watch */ + __IO uint32_t REGIONENSET; /*!< Enable regions watch */ + __IO uint32_t REGIONENCLR; /*!< Disable regions watch */ + __I uint32_t RESERVED6[57]; + MWU_REGION_Type REGION[4]; /*!< Unspecified */ + __I uint32_t RESERVED7[32]; + MWU_PREGION_Type PREGION[2]; /*!< Unspecified */ +} NRF_MWU_Type; + + +/* ================================================================================ */ +/* ================ I2S ================ */ +/* ================================================================================ */ + + +/** + * @brief Inter-IC Sound (I2S) + */ + +typedef struct { /*!< I2S Structure */ + __O uint32_t TASKS_START; /*!< Starts continuous I2S transfer. Also starts MCK generator when + this is enabled. */ + __O uint32_t TASKS_STOP; /*!< Stops I2S transfer. Also stops MCK generator. Triggering this + task will cause the {event:STOPPED} event to be generated. */ + __I uint32_t RESERVED0[63]; + __IO uint32_t EVENTS_RXPTRUPD; /*!< The RXD.PTR register has been copied to internal double-buffers. + When the I2S module is started and RX is enabled, this event + will be generated for every RXTXD.MAXCNT words that are received + on the SDIN pin. */ + __IO uint32_t EVENTS_STOPPED; /*!< I2S transfer stopped. */ + __I uint32_t RESERVED1[2]; + __IO uint32_t EVENTS_TXPTRUPD; /*!< The TDX.PTR register has been copied to internal double-buffers. + When the I2S module is started and TX is enabled, this event + will be generated for every RXTXD.MAXCNT words that are sent + on the SDOUT pin. */ + __I uint32_t RESERVED2[122]; + __IO uint32_t INTEN; /*!< Enable or disable interrupt */ + __IO uint32_t INTENSET; /*!< Enable interrupt */ + __IO uint32_t INTENCLR; /*!< Disable interrupt */ + __I uint32_t RESERVED3[125]; + __IO uint32_t ENABLE; /*!< Enable I2S module. */ + I2S_CONFIG_Type CONFIG; /*!< Unspecified */ + __I uint32_t RESERVED4[3]; + I2S_RXD_Type RXD; /*!< Unspecified */ + __I uint32_t RESERVED5; + I2S_TXD_Type TXD; /*!< Unspecified */ + __I uint32_t RESERVED6[3]; + I2S_RXTXD_Type RXTXD; /*!< Unspecified */ + __I uint32_t RESERVED7[3]; + I2S_PSEL_Type PSEL; /*!< Unspecified */ +} NRF_I2S_Type; + + +/* ================================================================================ */ +/* ================ FPU ================ */ +/* ================================================================================ */ + + +/** + * @brief FPU (FPU) + */ + +typedef struct { /*!< FPU Structure */ + __I uint32_t UNUSED; /*!< Unused. */ +} NRF_FPU_Type; + + +/* ================================================================================ */ +/* ================ GPIO ================ */ +/* ================================================================================ */ + + +/** + * @brief GPIO Port 1 (GPIO) + */ + +typedef struct { /*!< GPIO Structure */ + __I uint32_t RESERVED0[321]; + __IO uint32_t OUT; /*!< Write GPIO port */ + __IO uint32_t OUTSET; /*!< Set individual bits in GPIO port */ + __IO uint32_t OUTCLR; /*!< Clear individual bits in GPIO port */ + __I uint32_t IN; /*!< Read GPIO port */ + __IO uint32_t DIR; /*!< Direction of GPIO pins */ + __IO uint32_t DIRSET; /*!< DIR set register */ + __IO uint32_t DIRCLR; /*!< DIR clear register */ + __IO uint32_t LATCH; /*!< Latch register indicating what GPIO pins that have met the criteria + set in the PIN_CNF[n].SENSE registers */ + __IO uint32_t DETECTMODE; /*!< Select between default DETECT signal behaviour and LDETECT mode */ + __I uint32_t RESERVED1[118]; + __IO uint32_t PIN_CNF[32]; /*!< Description collection[0]: Configuration of GPIO pins */ +} NRF_GPIO_Type; + + +/* -------------------- End of section using anonymous unions ------------------- */ +#if defined(__CC_ARM) + #pragma pop +#elif defined(__ICCARM__) + /* leave anonymous unions enabled */ +#elif defined(__GNUC__) + /* anonymous unions are enabled by default */ +#elif defined(__TMS470__) + /* anonymous unions are enabled by default */ +#elif defined(__TASKING__) + #pragma warning restore +#else + #warning Not supported compiler type +#endif + + + + +/* ================================================================================ */ +/* ================ Peripheral memory map ================ */ +/* ================================================================================ */ + +#define NRF_FICR_BASE 0x10000000UL +#define NRF_UICR_BASE 0x10001000UL +#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 +#define NRF_SPIM0_BASE 0x40003000UL +#define NRF_SPIS0_BASE 0x40003000UL +#define NRF_TWIM0_BASE 0x40003000UL +#define NRF_TWIS0_BASE 0x40003000UL +#define NRF_SPI0_BASE 0x40003000UL +#define NRF_TWI0_BASE 0x40003000UL +#define NRF_SPIM1_BASE 0x40004000UL +#define NRF_SPIS1_BASE 0x40004000UL +#define NRF_TWIM1_BASE 0x40004000UL +#define NRF_TWIS1_BASE 0x40004000UL +#define NRF_SPI1_BASE 0x40004000UL +#define NRF_TWI1_BASE 0x40004000UL +#define NRF_NFCT_BASE 0x40005000UL +#define NRF_GPIOTE_BASE 0x40006000UL +#define NRF_SAADC_BASE 0x40007000UL +#define NRF_TIMER0_BASE 0x40008000UL +#define NRF_TIMER1_BASE 0x40009000UL +#define NRF_TIMER2_BASE 0x4000A000UL +#define NRF_RTC0_BASE 0x4000B000UL +#define NRF_TEMP_BASE 0x4000C000UL +#define NRF_RNG_BASE 0x4000D000UL +#define NRF_ECB_BASE 0x4000E000UL +#define NRF_CCM_BASE 0x4000F000UL +#define NRF_AAR_BASE 0x4000F000UL +#define NRF_WDT_BASE 0x40010000UL +#define NRF_RTC1_BASE 0x40011000UL +#define NRF_QDEC_BASE 0x40012000UL +#define NRF_COMP_BASE 0x40013000UL +#define NRF_LPCOMP_BASE 0x40013000UL +#define NRF_SWI0_BASE 0x40014000UL +#define NRF_EGU0_BASE 0x40014000UL +#define NRF_SWI1_BASE 0x40015000UL +#define NRF_EGU1_BASE 0x40015000UL +#define NRF_SWI2_BASE 0x40016000UL +#define NRF_EGU2_BASE 0x40016000UL +#define NRF_SWI3_BASE 0x40017000UL +#define NRF_EGU3_BASE 0x40017000UL +#define NRF_SWI4_BASE 0x40018000UL +#define NRF_EGU4_BASE 0x40018000UL +#define NRF_SWI5_BASE 0x40019000UL +#define NRF_EGU5_BASE 0x40019000UL +#define NRF_TIMER3_BASE 0x4001A000UL +#define NRF_TIMER4_BASE 0x4001B000UL +#define NRF_PWM0_BASE 0x4001C000UL +#define NRF_PDM_BASE 0x4001D000UL +#define NRF_NVMC_BASE 0x4001E000UL +#define NRF_PPI_BASE 0x4001F000UL +#define NRF_MWU_BASE 0x40020000UL +#define NRF_PWM1_BASE 0x40021000UL +#define NRF_PWM2_BASE 0x40022000UL +#define NRF_SPIM2_BASE 0x40023000UL +#define NRF_SPIS2_BASE 0x40023000UL +#define NRF_SPI2_BASE 0x40023000UL +#define NRF_RTC2_BASE 0x40024000UL +#define NRF_I2S_BASE 0x40025000UL +#define NRF_FPU_BASE 0x40026000UL +#define NRF_P0_BASE 0x50000000UL + + +/* ================================================================================ */ +/* ================ Peripheral declaration ================ */ +/* ================================================================================ */ + +#define NRF_FICR ((NRF_FICR_Type *) NRF_FICR_BASE) +#define NRF_UICR ((NRF_UICR_Type *) NRF_UICR_BASE) +#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) +#define NRF_SPIM0 ((NRF_SPIM_Type *) NRF_SPIM0_BASE) +#define NRF_SPIS0 ((NRF_SPIS_Type *) NRF_SPIS0_BASE) +#define NRF_TWIM0 ((NRF_TWIM_Type *) NRF_TWIM0_BASE) +#define NRF_TWIS0 ((NRF_TWIS_Type *) NRF_TWIS0_BASE) +#define NRF_SPI0 ((NRF_SPI_Type *) NRF_SPI0_BASE) +#define NRF_TWI0 ((NRF_TWI_Type *) NRF_TWI0_BASE) +#define NRF_SPIM1 ((NRF_SPIM_Type *) NRF_SPIM1_BASE) +#define NRF_SPIS1 ((NRF_SPIS_Type *) NRF_SPIS1_BASE) +#define NRF_TWIM1 ((NRF_TWIM_Type *) NRF_TWIM1_BASE) +#define NRF_TWIS1 ((NRF_TWIS_Type *) NRF_TWIS1_BASE) +#define NRF_SPI1 ((NRF_SPI_Type *) NRF_SPI1_BASE) +#define NRF_TWI1 ((NRF_TWI_Type *) NRF_TWI1_BASE) +#define NRF_NFCT ((NRF_NFCT_Type *) NRF_NFCT_BASE) +#define NRF_GPIOTE ((NRF_GPIOTE_Type *) NRF_GPIOTE_BASE) +#define NRF_SAADC ((NRF_SAADC_Type *) NRF_SAADC_BASE) +#define NRF_TIMER0 ((NRF_TIMER_Type *) NRF_TIMER0_BASE) +#define NRF_TIMER1 ((NRF_TIMER_Type *) NRF_TIMER1_BASE) +#define NRF_TIMER2 ((NRF_TIMER_Type *) NRF_TIMER2_BASE) +#define NRF_RTC0 ((NRF_RTC_Type *) NRF_RTC0_BASE) +#define NRF_TEMP ((NRF_TEMP_Type *) NRF_TEMP_BASE) +#define NRF_RNG ((NRF_RNG_Type *) NRF_RNG_BASE) +#define NRF_ECB ((NRF_ECB_Type *) NRF_ECB_BASE) +#define NRF_CCM ((NRF_CCM_Type *) NRF_CCM_BASE) +#define NRF_AAR ((NRF_AAR_Type *) NRF_AAR_BASE) +#define NRF_WDT ((NRF_WDT_Type *) NRF_WDT_BASE) +#define NRF_RTC1 ((NRF_RTC_Type *) NRF_RTC1_BASE) +#define NRF_QDEC ((NRF_QDEC_Type *) NRF_QDEC_BASE) +#define NRF_COMP ((NRF_COMP_Type *) NRF_COMP_BASE) +#define NRF_LPCOMP ((NRF_LPCOMP_Type *) NRF_LPCOMP_BASE) +#define NRF_SWI0 ((NRF_SWI_Type *) NRF_SWI0_BASE) +#define NRF_EGU0 ((NRF_EGU_Type *) NRF_EGU0_BASE) +#define NRF_SWI1 ((NRF_SWI_Type *) NRF_SWI1_BASE) +#define NRF_EGU1 ((NRF_EGU_Type *) NRF_EGU1_BASE) +#define NRF_SWI2 ((NRF_SWI_Type *) NRF_SWI2_BASE) +#define NRF_EGU2 ((NRF_EGU_Type *) NRF_EGU2_BASE) +#define NRF_SWI3 ((NRF_SWI_Type *) NRF_SWI3_BASE) +#define NRF_EGU3 ((NRF_EGU_Type *) NRF_EGU3_BASE) +#define NRF_SWI4 ((NRF_SWI_Type *) NRF_SWI4_BASE) +#define NRF_EGU4 ((NRF_EGU_Type *) NRF_EGU4_BASE) +#define NRF_SWI5 ((NRF_SWI_Type *) NRF_SWI5_BASE) +#define NRF_EGU5 ((NRF_EGU_Type *) NRF_EGU5_BASE) +#define NRF_TIMER3 ((NRF_TIMER_Type *) NRF_TIMER3_BASE) +#define NRF_TIMER4 ((NRF_TIMER_Type *) NRF_TIMER4_BASE) +#define NRF_PWM0 ((NRF_PWM_Type *) NRF_PWM0_BASE) +#define NRF_PDM ((NRF_PDM_Type *) NRF_PDM_BASE) +#define NRF_NVMC ((NRF_NVMC_Type *) NRF_NVMC_BASE) +#define NRF_PPI ((NRF_PPI_Type *) NRF_PPI_BASE) +#define NRF_MWU ((NRF_MWU_Type *) NRF_MWU_BASE) +#define NRF_PWM1 ((NRF_PWM_Type *) NRF_PWM1_BASE) +#define NRF_PWM2 ((NRF_PWM_Type *) NRF_PWM2_BASE) +#define NRF_SPIM2 ((NRF_SPIM_Type *) NRF_SPIM2_BASE) +#define NRF_SPIS2 ((NRF_SPIS_Type *) NRF_SPIS2_BASE) +#define NRF_SPI2 ((NRF_SPI_Type *) NRF_SPI2_BASE) +#define NRF_RTC2 ((NRF_RTC_Type *) NRF_RTC2_BASE) +#define NRF_I2S ((NRF_I2S_Type *) NRF_I2S_BASE) +#define NRF_FPU ((NRF_FPU_Type *) NRF_FPU_BASE) +#define NRF_P0 ((NRF_GPIO_Type *) NRF_P0_BASE) + + +/** @} */ /* End of group Device_Peripheral_Registers */ +/** @} */ /* End of group nrf52 */ +/** @} */ /* End of group Nordic Semiconductor */ + +#ifdef __cplusplus +} +#endif + + +#endif /* nrf52_H */ diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52_bitfields.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52_bitfields.h new file mode 100644 index 0000000000..24b62da867 --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52_bitfields.h @@ -0,0 +1,14863 @@ +/* + * 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 __NRF52_BITS_H +#define __NRF52_BITS_H + +/*lint ++flb "Enter library region" */ + +/* Peripheral: AAR */ +/* Description: Accelerated Address Resolver */ + +/* Register: AAR_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 2 : Write '1' to Enable interrupt for NOTRESOLVED event */ +#define AAR_INTENSET_NOTRESOLVED_Pos (2UL) /*!< Position of NOTRESOLVED field. */ +#define AAR_INTENSET_NOTRESOLVED_Msk (0x1UL << AAR_INTENSET_NOTRESOLVED_Pos) /*!< Bit mask of NOTRESOLVED field. */ +#define AAR_INTENSET_NOTRESOLVED_Disabled (0UL) /*!< Read: Disabled */ +#define AAR_INTENSET_NOTRESOLVED_Enabled (1UL) /*!< Read: Enabled */ +#define AAR_INTENSET_NOTRESOLVED_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for RESOLVED event */ +#define AAR_INTENSET_RESOLVED_Pos (1UL) /*!< Position of RESOLVED field. */ +#define AAR_INTENSET_RESOLVED_Msk (0x1UL << AAR_INTENSET_RESOLVED_Pos) /*!< Bit mask of RESOLVED field. */ +#define AAR_INTENSET_RESOLVED_Disabled (0UL) /*!< Read: Disabled */ +#define AAR_INTENSET_RESOLVED_Enabled (1UL) /*!< Read: Enabled */ +#define AAR_INTENSET_RESOLVED_Set (1UL) /*!< Enable */ + +/* Bit 0 : Write '1' to Enable interrupt for END event */ +#define AAR_INTENSET_END_Pos (0UL) /*!< Position of END field. */ +#define AAR_INTENSET_END_Msk (0x1UL << AAR_INTENSET_END_Pos) /*!< Bit mask of END field. */ +#define AAR_INTENSET_END_Disabled (0UL) /*!< Read: Disabled */ +#define AAR_INTENSET_END_Enabled (1UL) /*!< Read: Enabled */ +#define AAR_INTENSET_END_Set (1UL) /*!< Enable */ + +/* Register: AAR_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 2 : Write '1' to Disable interrupt for NOTRESOLVED event */ +#define AAR_INTENCLR_NOTRESOLVED_Pos (2UL) /*!< Position of NOTRESOLVED field. */ +#define AAR_INTENCLR_NOTRESOLVED_Msk (0x1UL << AAR_INTENCLR_NOTRESOLVED_Pos) /*!< Bit mask of NOTRESOLVED field. */ +#define AAR_INTENCLR_NOTRESOLVED_Disabled (0UL) /*!< Read: Disabled */ +#define AAR_INTENCLR_NOTRESOLVED_Enabled (1UL) /*!< Read: Enabled */ +#define AAR_INTENCLR_NOTRESOLVED_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for RESOLVED event */ +#define AAR_INTENCLR_RESOLVED_Pos (1UL) /*!< Position of RESOLVED field. */ +#define AAR_INTENCLR_RESOLVED_Msk (0x1UL << AAR_INTENCLR_RESOLVED_Pos) /*!< Bit mask of RESOLVED field. */ +#define AAR_INTENCLR_RESOLVED_Disabled (0UL) /*!< Read: Disabled */ +#define AAR_INTENCLR_RESOLVED_Enabled (1UL) /*!< Read: Enabled */ +#define AAR_INTENCLR_RESOLVED_Clear (1UL) /*!< Disable */ + +/* Bit 0 : Write '1' to Disable interrupt for END event */ +#define AAR_INTENCLR_END_Pos (0UL) /*!< Position of END field. */ +#define AAR_INTENCLR_END_Msk (0x1UL << AAR_INTENCLR_END_Pos) /*!< Bit mask of END field. */ +#define AAR_INTENCLR_END_Disabled (0UL) /*!< Read: Disabled */ +#define AAR_INTENCLR_END_Enabled (1UL) /*!< Read: Enabled */ +#define AAR_INTENCLR_END_Clear (1UL) /*!< Disable */ + +/* Register: AAR_STATUS */ +/* Description: Resolution status */ + +/* Bits 3..0 : The IRK that was used last time an address was resolved */ +#define AAR_STATUS_STATUS_Pos (0UL) /*!< Position of STATUS field. */ +#define AAR_STATUS_STATUS_Msk (0xFUL << AAR_STATUS_STATUS_Pos) /*!< Bit mask of STATUS field. */ + +/* Register: AAR_ENABLE */ +/* Description: Enable AAR */ + +/* Bits 1..0 : Enable or disable AAR */ +#define AAR_ENABLE_ENABLE_Pos (0UL) /*!< Position of ENABLE field. */ +#define AAR_ENABLE_ENABLE_Msk (0x3UL << AAR_ENABLE_ENABLE_Pos) /*!< Bit mask of ENABLE field. */ +#define AAR_ENABLE_ENABLE_Disabled (0UL) /*!< Disable */ +#define AAR_ENABLE_ENABLE_Enabled (3UL) /*!< Enable */ + +/* Register: AAR_NIRK */ +/* Description: Number of IRKs */ + +/* Bits 4..0 : Number of Identity root keys available in the IRK data structure */ +#define AAR_NIRK_NIRK_Pos (0UL) /*!< Position of NIRK field. */ +#define AAR_NIRK_NIRK_Msk (0x1FUL << AAR_NIRK_NIRK_Pos) /*!< Bit mask of NIRK field. */ + +/* Register: AAR_IRKPTR */ +/* Description: Pointer to IRK data structure */ + +/* Bits 31..0 : Pointer to the IRK data structure */ +#define AAR_IRKPTR_IRKPTR_Pos (0UL) /*!< Position of IRKPTR field. */ +#define AAR_IRKPTR_IRKPTR_Msk (0xFFFFFFFFUL << AAR_IRKPTR_IRKPTR_Pos) /*!< Bit mask of IRKPTR field. */ + +/* Register: AAR_ADDRPTR */ +/* Description: Pointer to the resolvable address */ + +/* Bits 31..0 : Pointer to the resolvable address (6-bytes) */ +#define AAR_ADDRPTR_ADDRPTR_Pos (0UL) /*!< Position of ADDRPTR field. */ +#define AAR_ADDRPTR_ADDRPTR_Msk (0xFFFFFFFFUL << AAR_ADDRPTR_ADDRPTR_Pos) /*!< Bit mask of ADDRPTR field. */ + +/* Register: AAR_SCRATCHPTR */ +/* Description: Pointer to data area used for temporary storage */ + +/* Bits 31..0 : Pointer to a scratch data area used for temporary storage during resolution.A space of minimum 3 bytes must be reserved. */ +#define AAR_SCRATCHPTR_SCRATCHPTR_Pos (0UL) /*!< Position of SCRATCHPTR field. */ +#define AAR_SCRATCHPTR_SCRATCHPTR_Msk (0xFFFFFFFFUL << AAR_SCRATCHPTR_SCRATCHPTR_Pos) /*!< Bit mask of SCRATCHPTR field. */ + + +/* Peripheral: AMLI */ +/* Description: AHB Multi-Layer Interface */ + +/* Register: AMLI_RAMPRI_CPU0 */ +/* Description: AHB bus master priority register for CPU0 */ + +/* Bits 31..28 : Priority register for RAM AHB slave 7 */ +#define AMLI_RAMPRI_CPU0_RAM7_Pos (28UL) /*!< Position of RAM7 field. */ +#define AMLI_RAMPRI_CPU0_RAM7_Msk (0xFUL << AMLI_RAMPRI_CPU0_RAM7_Pos) /*!< Bit mask of RAM7 field. */ +#define AMLI_RAMPRI_CPU0_RAM7_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_CPU0_RAM7_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_CPU0_RAM7_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_CPU0_RAM7_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_CPU0_RAM7_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_CPU0_RAM7_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_CPU0_RAM7_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_CPU0_RAM7_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_CPU0_RAM7_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_CPU0_RAM7_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_CPU0_RAM7_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_CPU0_RAM7_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_CPU0_RAM7_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_CPU0_RAM7_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_CPU0_RAM7_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_CPU0_RAM7_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 27..24 : Priority register for RAM AHB slave 6 */ +#define AMLI_RAMPRI_CPU0_RAM6_Pos (24UL) /*!< Position of RAM6 field. */ +#define AMLI_RAMPRI_CPU0_RAM6_Msk (0xFUL << AMLI_RAMPRI_CPU0_RAM6_Pos) /*!< Bit mask of RAM6 field. */ +#define AMLI_RAMPRI_CPU0_RAM6_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_CPU0_RAM6_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_CPU0_RAM6_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_CPU0_RAM6_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_CPU0_RAM6_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_CPU0_RAM6_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_CPU0_RAM6_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_CPU0_RAM6_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_CPU0_RAM6_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_CPU0_RAM6_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_CPU0_RAM6_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_CPU0_RAM6_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_CPU0_RAM6_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_CPU0_RAM6_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_CPU0_RAM6_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_CPU0_RAM6_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 23..20 : Priority register for RAM AHB slave 5 */ +#define AMLI_RAMPRI_CPU0_RAM5_Pos (20UL) /*!< Position of RAM5 field. */ +#define AMLI_RAMPRI_CPU0_RAM5_Msk (0xFUL << AMLI_RAMPRI_CPU0_RAM5_Pos) /*!< Bit mask of RAM5 field. */ +#define AMLI_RAMPRI_CPU0_RAM5_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_CPU0_RAM5_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_CPU0_RAM5_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_CPU0_RAM5_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_CPU0_RAM5_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_CPU0_RAM5_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_CPU0_RAM5_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_CPU0_RAM5_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_CPU0_RAM5_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_CPU0_RAM5_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_CPU0_RAM5_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_CPU0_RAM5_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_CPU0_RAM5_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_CPU0_RAM5_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_CPU0_RAM5_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_CPU0_RAM5_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 19..16 : Priority register for RAM AHB slave 4 */ +#define AMLI_RAMPRI_CPU0_RAM4_Pos (16UL) /*!< Position of RAM4 field. */ +#define AMLI_RAMPRI_CPU0_RAM4_Msk (0xFUL << AMLI_RAMPRI_CPU0_RAM4_Pos) /*!< Bit mask of RAM4 field. */ +#define AMLI_RAMPRI_CPU0_RAM4_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_CPU0_RAM4_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_CPU0_RAM4_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_CPU0_RAM4_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_CPU0_RAM4_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_CPU0_RAM4_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_CPU0_RAM4_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_CPU0_RAM4_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_CPU0_RAM4_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_CPU0_RAM4_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_CPU0_RAM4_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_CPU0_RAM4_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_CPU0_RAM4_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_CPU0_RAM4_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_CPU0_RAM4_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_CPU0_RAM4_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 15..12 : Priority register for RAM AHB slave 3 */ +#define AMLI_RAMPRI_CPU0_RAM3_Pos (12UL) /*!< Position of RAM3 field. */ +#define AMLI_RAMPRI_CPU0_RAM3_Msk (0xFUL << AMLI_RAMPRI_CPU0_RAM3_Pos) /*!< Bit mask of RAM3 field. */ +#define AMLI_RAMPRI_CPU0_RAM3_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_CPU0_RAM3_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_CPU0_RAM3_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_CPU0_RAM3_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_CPU0_RAM3_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_CPU0_RAM3_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_CPU0_RAM3_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_CPU0_RAM3_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_CPU0_RAM3_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_CPU0_RAM3_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_CPU0_RAM3_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_CPU0_RAM3_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_CPU0_RAM3_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_CPU0_RAM3_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_CPU0_RAM3_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_CPU0_RAM3_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 11..8 : Priority register for RAM AHB slave 2 */ +#define AMLI_RAMPRI_CPU0_RAM2_Pos (8UL) /*!< Position of RAM2 field. */ +#define AMLI_RAMPRI_CPU0_RAM2_Msk (0xFUL << AMLI_RAMPRI_CPU0_RAM2_Pos) /*!< Bit mask of RAM2 field. */ +#define AMLI_RAMPRI_CPU0_RAM2_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_CPU0_RAM2_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_CPU0_RAM2_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_CPU0_RAM2_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_CPU0_RAM2_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_CPU0_RAM2_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_CPU0_RAM2_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_CPU0_RAM2_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_CPU0_RAM2_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_CPU0_RAM2_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_CPU0_RAM2_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_CPU0_RAM2_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_CPU0_RAM2_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_CPU0_RAM2_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_CPU0_RAM2_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_CPU0_RAM2_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 7..4 : Priority register for RAM AHB slave 1 */ +#define AMLI_RAMPRI_CPU0_RAM1_Pos (4UL) /*!< Position of RAM1 field. */ +#define AMLI_RAMPRI_CPU0_RAM1_Msk (0xFUL << AMLI_RAMPRI_CPU0_RAM1_Pos) /*!< Bit mask of RAM1 field. */ +#define AMLI_RAMPRI_CPU0_RAM1_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_CPU0_RAM1_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_CPU0_RAM1_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_CPU0_RAM1_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_CPU0_RAM1_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_CPU0_RAM1_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_CPU0_RAM1_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_CPU0_RAM1_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_CPU0_RAM1_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_CPU0_RAM1_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_CPU0_RAM1_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_CPU0_RAM1_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_CPU0_RAM1_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_CPU0_RAM1_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_CPU0_RAM1_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_CPU0_RAM1_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 3..0 : Priority register for RAM AHB slave 0 */ +#define AMLI_RAMPRI_CPU0_RAM0_Pos (0UL) /*!< Position of RAM0 field. */ +#define AMLI_RAMPRI_CPU0_RAM0_Msk (0xFUL << AMLI_RAMPRI_CPU0_RAM0_Pos) /*!< Bit mask of RAM0 field. */ +#define AMLI_RAMPRI_CPU0_RAM0_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_CPU0_RAM0_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_CPU0_RAM0_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_CPU0_RAM0_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_CPU0_RAM0_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_CPU0_RAM0_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_CPU0_RAM0_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_CPU0_RAM0_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_CPU0_RAM0_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_CPU0_RAM0_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_CPU0_RAM0_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_CPU0_RAM0_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_CPU0_RAM0_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_CPU0_RAM0_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_CPU0_RAM0_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_CPU0_RAM0_Pri15 (15UL) /*!< Priority 15 */ + +/* Register: AMLI_RAMPRI_SPIS1 */ +/* Description: AHB bus master priority register for SPIM1, SPIS1, TWIM1 and TWIS1 */ + +/* Bits 31..28 : Priority register for RAM AHB slave 7 */ +#define AMLI_RAMPRI_SPIS1_RAM7_Pos (28UL) /*!< Position of RAM7 field. */ +#define AMLI_RAMPRI_SPIS1_RAM7_Msk (0xFUL << AMLI_RAMPRI_SPIS1_RAM7_Pos) /*!< Bit mask of RAM7 field. */ +#define AMLI_RAMPRI_SPIS1_RAM7_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SPIS1_RAM7_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SPIS1_RAM7_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SPIS1_RAM7_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SPIS1_RAM7_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SPIS1_RAM7_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SPIS1_RAM7_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SPIS1_RAM7_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SPIS1_RAM7_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SPIS1_RAM7_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SPIS1_RAM7_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SPIS1_RAM7_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SPIS1_RAM7_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SPIS1_RAM7_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SPIS1_RAM7_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SPIS1_RAM7_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 27..24 : Priority register for RAM AHB slave 6 */ +#define AMLI_RAMPRI_SPIS1_RAM6_Pos (24UL) /*!< Position of RAM6 field. */ +#define AMLI_RAMPRI_SPIS1_RAM6_Msk (0xFUL << AMLI_RAMPRI_SPIS1_RAM6_Pos) /*!< Bit mask of RAM6 field. */ +#define AMLI_RAMPRI_SPIS1_RAM6_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SPIS1_RAM6_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SPIS1_RAM6_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SPIS1_RAM6_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SPIS1_RAM6_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SPIS1_RAM6_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SPIS1_RAM6_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SPIS1_RAM6_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SPIS1_RAM6_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SPIS1_RAM6_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SPIS1_RAM6_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SPIS1_RAM6_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SPIS1_RAM6_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SPIS1_RAM6_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SPIS1_RAM6_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SPIS1_RAM6_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 23..20 : Priority register for RAM AHB slave 5 */ +#define AMLI_RAMPRI_SPIS1_RAM5_Pos (20UL) /*!< Position of RAM5 field. */ +#define AMLI_RAMPRI_SPIS1_RAM5_Msk (0xFUL << AMLI_RAMPRI_SPIS1_RAM5_Pos) /*!< Bit mask of RAM5 field. */ +#define AMLI_RAMPRI_SPIS1_RAM5_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SPIS1_RAM5_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SPIS1_RAM5_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SPIS1_RAM5_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SPIS1_RAM5_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SPIS1_RAM5_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SPIS1_RAM5_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SPIS1_RAM5_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SPIS1_RAM5_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SPIS1_RAM5_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SPIS1_RAM5_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SPIS1_RAM5_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SPIS1_RAM5_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SPIS1_RAM5_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SPIS1_RAM5_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SPIS1_RAM5_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 19..16 : Priority register for RAM AHB slave 4 */ +#define AMLI_RAMPRI_SPIS1_RAM4_Pos (16UL) /*!< Position of RAM4 field. */ +#define AMLI_RAMPRI_SPIS1_RAM4_Msk (0xFUL << AMLI_RAMPRI_SPIS1_RAM4_Pos) /*!< Bit mask of RAM4 field. */ +#define AMLI_RAMPRI_SPIS1_RAM4_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SPIS1_RAM4_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SPIS1_RAM4_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SPIS1_RAM4_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SPIS1_RAM4_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SPIS1_RAM4_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SPIS1_RAM4_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SPIS1_RAM4_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SPIS1_RAM4_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SPIS1_RAM4_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SPIS1_RAM4_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SPIS1_RAM4_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SPIS1_RAM4_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SPIS1_RAM4_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SPIS1_RAM4_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SPIS1_RAM4_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 15..12 : Priority register for RAM AHB slave 3 */ +#define AMLI_RAMPRI_SPIS1_RAM3_Pos (12UL) /*!< Position of RAM3 field. */ +#define AMLI_RAMPRI_SPIS1_RAM3_Msk (0xFUL << AMLI_RAMPRI_SPIS1_RAM3_Pos) /*!< Bit mask of RAM3 field. */ +#define AMLI_RAMPRI_SPIS1_RAM3_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SPIS1_RAM3_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SPIS1_RAM3_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SPIS1_RAM3_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SPIS1_RAM3_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SPIS1_RAM3_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SPIS1_RAM3_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SPIS1_RAM3_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SPIS1_RAM3_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SPIS1_RAM3_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SPIS1_RAM3_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SPIS1_RAM3_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SPIS1_RAM3_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SPIS1_RAM3_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SPIS1_RAM3_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SPIS1_RAM3_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 11..8 : Priority register for RAM AHB slave 2 */ +#define AMLI_RAMPRI_SPIS1_RAM2_Pos (8UL) /*!< Position of RAM2 field. */ +#define AMLI_RAMPRI_SPIS1_RAM2_Msk (0xFUL << AMLI_RAMPRI_SPIS1_RAM2_Pos) /*!< Bit mask of RAM2 field. */ +#define AMLI_RAMPRI_SPIS1_RAM2_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SPIS1_RAM2_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SPIS1_RAM2_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SPIS1_RAM2_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SPIS1_RAM2_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SPIS1_RAM2_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SPIS1_RAM2_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SPIS1_RAM2_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SPIS1_RAM2_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SPIS1_RAM2_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SPIS1_RAM2_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SPIS1_RAM2_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SPIS1_RAM2_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SPIS1_RAM2_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SPIS1_RAM2_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SPIS1_RAM2_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 7..4 : Priority register for RAM AHB slave 1 */ +#define AMLI_RAMPRI_SPIS1_RAM1_Pos (4UL) /*!< Position of RAM1 field. */ +#define AMLI_RAMPRI_SPIS1_RAM1_Msk (0xFUL << AMLI_RAMPRI_SPIS1_RAM1_Pos) /*!< Bit mask of RAM1 field. */ +#define AMLI_RAMPRI_SPIS1_RAM1_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SPIS1_RAM1_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SPIS1_RAM1_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SPIS1_RAM1_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SPIS1_RAM1_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SPIS1_RAM1_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SPIS1_RAM1_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SPIS1_RAM1_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SPIS1_RAM1_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SPIS1_RAM1_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SPIS1_RAM1_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SPIS1_RAM1_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SPIS1_RAM1_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SPIS1_RAM1_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SPIS1_RAM1_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SPIS1_RAM1_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 3..0 : Priority register for RAM AHB slave 0 */ +#define AMLI_RAMPRI_SPIS1_RAM0_Pos (0UL) /*!< Position of RAM0 field. */ +#define AMLI_RAMPRI_SPIS1_RAM0_Msk (0xFUL << AMLI_RAMPRI_SPIS1_RAM0_Pos) /*!< Bit mask of RAM0 field. */ +#define AMLI_RAMPRI_SPIS1_RAM0_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SPIS1_RAM0_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SPIS1_RAM0_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SPIS1_RAM0_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SPIS1_RAM0_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SPIS1_RAM0_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SPIS1_RAM0_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SPIS1_RAM0_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SPIS1_RAM0_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SPIS1_RAM0_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SPIS1_RAM0_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SPIS1_RAM0_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SPIS1_RAM0_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SPIS1_RAM0_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SPIS1_RAM0_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SPIS1_RAM0_Pri15 (15UL) /*!< Priority 15 */ + +/* Register: AMLI_RAMPRI_RADIO */ +/* Description: AHB bus master priority register for RADIO */ + +/* Bits 31..28 : Priority register for RAM AHB slave 7 */ +#define AMLI_RAMPRI_RADIO_RAM7_Pos (28UL) /*!< Position of RAM7 field. */ +#define AMLI_RAMPRI_RADIO_RAM7_Msk (0xFUL << AMLI_RAMPRI_RADIO_RAM7_Pos) /*!< Bit mask of RAM7 field. */ +#define AMLI_RAMPRI_RADIO_RAM7_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_RADIO_RAM7_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_RADIO_RAM7_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_RADIO_RAM7_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_RADIO_RAM7_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_RADIO_RAM7_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_RADIO_RAM7_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_RADIO_RAM7_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_RADIO_RAM7_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_RADIO_RAM7_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_RADIO_RAM7_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_RADIO_RAM7_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_RADIO_RAM7_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_RADIO_RAM7_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_RADIO_RAM7_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_RADIO_RAM7_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 27..24 : Priority register for RAM AHB slave 6 */ +#define AMLI_RAMPRI_RADIO_RAM6_Pos (24UL) /*!< Position of RAM6 field. */ +#define AMLI_RAMPRI_RADIO_RAM6_Msk (0xFUL << AMLI_RAMPRI_RADIO_RAM6_Pos) /*!< Bit mask of RAM6 field. */ +#define AMLI_RAMPRI_RADIO_RAM6_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_RADIO_RAM6_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_RADIO_RAM6_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_RADIO_RAM6_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_RADIO_RAM6_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_RADIO_RAM6_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_RADIO_RAM6_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_RADIO_RAM6_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_RADIO_RAM6_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_RADIO_RAM6_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_RADIO_RAM6_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_RADIO_RAM6_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_RADIO_RAM6_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_RADIO_RAM6_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_RADIO_RAM6_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_RADIO_RAM6_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 23..20 : Priority register for RAM AHB slave 5 */ +#define AMLI_RAMPRI_RADIO_RAM5_Pos (20UL) /*!< Position of RAM5 field. */ +#define AMLI_RAMPRI_RADIO_RAM5_Msk (0xFUL << AMLI_RAMPRI_RADIO_RAM5_Pos) /*!< Bit mask of RAM5 field. */ +#define AMLI_RAMPRI_RADIO_RAM5_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_RADIO_RAM5_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_RADIO_RAM5_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_RADIO_RAM5_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_RADIO_RAM5_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_RADIO_RAM5_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_RADIO_RAM5_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_RADIO_RAM5_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_RADIO_RAM5_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_RADIO_RAM5_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_RADIO_RAM5_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_RADIO_RAM5_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_RADIO_RAM5_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_RADIO_RAM5_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_RADIO_RAM5_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_RADIO_RAM5_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 19..16 : Priority register for RAM AHB slave 4 */ +#define AMLI_RAMPRI_RADIO_RAM4_Pos (16UL) /*!< Position of RAM4 field. */ +#define AMLI_RAMPRI_RADIO_RAM4_Msk (0xFUL << AMLI_RAMPRI_RADIO_RAM4_Pos) /*!< Bit mask of RAM4 field. */ +#define AMLI_RAMPRI_RADIO_RAM4_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_RADIO_RAM4_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_RADIO_RAM4_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_RADIO_RAM4_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_RADIO_RAM4_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_RADIO_RAM4_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_RADIO_RAM4_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_RADIO_RAM4_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_RADIO_RAM4_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_RADIO_RAM4_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_RADIO_RAM4_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_RADIO_RAM4_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_RADIO_RAM4_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_RADIO_RAM4_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_RADIO_RAM4_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_RADIO_RAM4_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 15..12 : Priority register for RAM AHB slave 3 */ +#define AMLI_RAMPRI_RADIO_RAM3_Pos (12UL) /*!< Position of RAM3 field. */ +#define AMLI_RAMPRI_RADIO_RAM3_Msk (0xFUL << AMLI_RAMPRI_RADIO_RAM3_Pos) /*!< Bit mask of RAM3 field. */ +#define AMLI_RAMPRI_RADIO_RAM3_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_RADIO_RAM3_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_RADIO_RAM3_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_RADIO_RAM3_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_RADIO_RAM3_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_RADIO_RAM3_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_RADIO_RAM3_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_RADIO_RAM3_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_RADIO_RAM3_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_RADIO_RAM3_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_RADIO_RAM3_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_RADIO_RAM3_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_RADIO_RAM3_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_RADIO_RAM3_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_RADIO_RAM3_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_RADIO_RAM3_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 11..8 : Priority register for RAM AHB slave 2 */ +#define AMLI_RAMPRI_RADIO_RAM2_Pos (8UL) /*!< Position of RAM2 field. */ +#define AMLI_RAMPRI_RADIO_RAM2_Msk (0xFUL << AMLI_RAMPRI_RADIO_RAM2_Pos) /*!< Bit mask of RAM2 field. */ +#define AMLI_RAMPRI_RADIO_RAM2_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_RADIO_RAM2_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_RADIO_RAM2_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_RADIO_RAM2_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_RADIO_RAM2_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_RADIO_RAM2_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_RADIO_RAM2_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_RADIO_RAM2_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_RADIO_RAM2_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_RADIO_RAM2_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_RADIO_RAM2_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_RADIO_RAM2_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_RADIO_RAM2_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_RADIO_RAM2_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_RADIO_RAM2_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_RADIO_RAM2_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 7..4 : Priority register for RAM AHB slave 1 */ +#define AMLI_RAMPRI_RADIO_RAM1_Pos (4UL) /*!< Position of RAM1 field. */ +#define AMLI_RAMPRI_RADIO_RAM1_Msk (0xFUL << AMLI_RAMPRI_RADIO_RAM1_Pos) /*!< Bit mask of RAM1 field. */ +#define AMLI_RAMPRI_RADIO_RAM1_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_RADIO_RAM1_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_RADIO_RAM1_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_RADIO_RAM1_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_RADIO_RAM1_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_RADIO_RAM1_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_RADIO_RAM1_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_RADIO_RAM1_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_RADIO_RAM1_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_RADIO_RAM1_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_RADIO_RAM1_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_RADIO_RAM1_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_RADIO_RAM1_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_RADIO_RAM1_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_RADIO_RAM1_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_RADIO_RAM1_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 3..0 : Priority register for RAM AHB slave 0 */ +#define AMLI_RAMPRI_RADIO_RAM0_Pos (0UL) /*!< Position of RAM0 field. */ +#define AMLI_RAMPRI_RADIO_RAM0_Msk (0xFUL << AMLI_RAMPRI_RADIO_RAM0_Pos) /*!< Bit mask of RAM0 field. */ +#define AMLI_RAMPRI_RADIO_RAM0_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_RADIO_RAM0_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_RADIO_RAM0_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_RADIO_RAM0_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_RADIO_RAM0_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_RADIO_RAM0_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_RADIO_RAM0_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_RADIO_RAM0_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_RADIO_RAM0_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_RADIO_RAM0_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_RADIO_RAM0_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_RADIO_RAM0_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_RADIO_RAM0_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_RADIO_RAM0_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_RADIO_RAM0_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_RADIO_RAM0_Pri15 (15UL) /*!< Priority 15 */ + +/* Register: AMLI_RAMPRI_ECB */ +/* Description: AHB bus master priority register for ECB */ + +/* Bits 31..28 : Priority register for RAM AHB slave 7 */ +#define AMLI_RAMPRI_ECB_RAM7_Pos (28UL) /*!< Position of RAM7 field. */ +#define AMLI_RAMPRI_ECB_RAM7_Msk (0xFUL << AMLI_RAMPRI_ECB_RAM7_Pos) /*!< Bit mask of RAM7 field. */ +#define AMLI_RAMPRI_ECB_RAM7_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_ECB_RAM7_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_ECB_RAM7_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_ECB_RAM7_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_ECB_RAM7_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_ECB_RAM7_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_ECB_RAM7_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_ECB_RAM7_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_ECB_RAM7_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_ECB_RAM7_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_ECB_RAM7_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_ECB_RAM7_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_ECB_RAM7_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_ECB_RAM7_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_ECB_RAM7_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_ECB_RAM7_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 27..24 : Priority register for RAM AHB slave 6 */ +#define AMLI_RAMPRI_ECB_RAM6_Pos (24UL) /*!< Position of RAM6 field. */ +#define AMLI_RAMPRI_ECB_RAM6_Msk (0xFUL << AMLI_RAMPRI_ECB_RAM6_Pos) /*!< Bit mask of RAM6 field. */ +#define AMLI_RAMPRI_ECB_RAM6_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_ECB_RAM6_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_ECB_RAM6_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_ECB_RAM6_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_ECB_RAM6_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_ECB_RAM6_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_ECB_RAM6_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_ECB_RAM6_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_ECB_RAM6_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_ECB_RAM6_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_ECB_RAM6_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_ECB_RAM6_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_ECB_RAM6_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_ECB_RAM6_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_ECB_RAM6_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_ECB_RAM6_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 23..20 : Priority register for RAM AHB slave 5 */ +#define AMLI_RAMPRI_ECB_RAM5_Pos (20UL) /*!< Position of RAM5 field. */ +#define AMLI_RAMPRI_ECB_RAM5_Msk (0xFUL << AMLI_RAMPRI_ECB_RAM5_Pos) /*!< Bit mask of RAM5 field. */ +#define AMLI_RAMPRI_ECB_RAM5_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_ECB_RAM5_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_ECB_RAM5_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_ECB_RAM5_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_ECB_RAM5_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_ECB_RAM5_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_ECB_RAM5_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_ECB_RAM5_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_ECB_RAM5_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_ECB_RAM5_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_ECB_RAM5_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_ECB_RAM5_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_ECB_RAM5_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_ECB_RAM5_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_ECB_RAM5_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_ECB_RAM5_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 19..16 : Priority register for RAM AHB slave 4 */ +#define AMLI_RAMPRI_ECB_RAM4_Pos (16UL) /*!< Position of RAM4 field. */ +#define AMLI_RAMPRI_ECB_RAM4_Msk (0xFUL << AMLI_RAMPRI_ECB_RAM4_Pos) /*!< Bit mask of RAM4 field. */ +#define AMLI_RAMPRI_ECB_RAM4_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_ECB_RAM4_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_ECB_RAM4_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_ECB_RAM4_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_ECB_RAM4_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_ECB_RAM4_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_ECB_RAM4_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_ECB_RAM4_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_ECB_RAM4_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_ECB_RAM4_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_ECB_RAM4_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_ECB_RAM4_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_ECB_RAM4_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_ECB_RAM4_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_ECB_RAM4_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_ECB_RAM4_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 15..12 : Priority register for RAM AHB slave 3 */ +#define AMLI_RAMPRI_ECB_RAM3_Pos (12UL) /*!< Position of RAM3 field. */ +#define AMLI_RAMPRI_ECB_RAM3_Msk (0xFUL << AMLI_RAMPRI_ECB_RAM3_Pos) /*!< Bit mask of RAM3 field. */ +#define AMLI_RAMPRI_ECB_RAM3_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_ECB_RAM3_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_ECB_RAM3_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_ECB_RAM3_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_ECB_RAM3_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_ECB_RAM3_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_ECB_RAM3_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_ECB_RAM3_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_ECB_RAM3_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_ECB_RAM3_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_ECB_RAM3_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_ECB_RAM3_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_ECB_RAM3_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_ECB_RAM3_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_ECB_RAM3_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_ECB_RAM3_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 11..8 : Priority register for RAM AHB slave 2 */ +#define AMLI_RAMPRI_ECB_RAM2_Pos (8UL) /*!< Position of RAM2 field. */ +#define AMLI_RAMPRI_ECB_RAM2_Msk (0xFUL << AMLI_RAMPRI_ECB_RAM2_Pos) /*!< Bit mask of RAM2 field. */ +#define AMLI_RAMPRI_ECB_RAM2_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_ECB_RAM2_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_ECB_RAM2_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_ECB_RAM2_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_ECB_RAM2_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_ECB_RAM2_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_ECB_RAM2_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_ECB_RAM2_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_ECB_RAM2_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_ECB_RAM2_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_ECB_RAM2_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_ECB_RAM2_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_ECB_RAM2_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_ECB_RAM2_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_ECB_RAM2_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_ECB_RAM2_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 7..4 : Priority register for RAM AHB slave 1 */ +#define AMLI_RAMPRI_ECB_RAM1_Pos (4UL) /*!< Position of RAM1 field. */ +#define AMLI_RAMPRI_ECB_RAM1_Msk (0xFUL << AMLI_RAMPRI_ECB_RAM1_Pos) /*!< Bit mask of RAM1 field. */ +#define AMLI_RAMPRI_ECB_RAM1_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_ECB_RAM1_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_ECB_RAM1_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_ECB_RAM1_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_ECB_RAM1_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_ECB_RAM1_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_ECB_RAM1_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_ECB_RAM1_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_ECB_RAM1_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_ECB_RAM1_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_ECB_RAM1_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_ECB_RAM1_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_ECB_RAM1_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_ECB_RAM1_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_ECB_RAM1_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_ECB_RAM1_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 3..0 : Priority register for RAM AHB slave 0 */ +#define AMLI_RAMPRI_ECB_RAM0_Pos (0UL) /*!< Position of RAM0 field. */ +#define AMLI_RAMPRI_ECB_RAM0_Msk (0xFUL << AMLI_RAMPRI_ECB_RAM0_Pos) /*!< Bit mask of RAM0 field. */ +#define AMLI_RAMPRI_ECB_RAM0_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_ECB_RAM0_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_ECB_RAM0_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_ECB_RAM0_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_ECB_RAM0_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_ECB_RAM0_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_ECB_RAM0_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_ECB_RAM0_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_ECB_RAM0_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_ECB_RAM0_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_ECB_RAM0_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_ECB_RAM0_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_ECB_RAM0_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_ECB_RAM0_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_ECB_RAM0_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_ECB_RAM0_Pri15 (15UL) /*!< Priority 15 */ + +/* Register: AMLI_RAMPRI_CCM */ +/* Description: AHB bus master priority register for CCM */ + +/* Bits 31..28 : Priority register for RAM AHB slave 7 */ +#define AMLI_RAMPRI_CCM_RAM7_Pos (28UL) /*!< Position of RAM7 field. */ +#define AMLI_RAMPRI_CCM_RAM7_Msk (0xFUL << AMLI_RAMPRI_CCM_RAM7_Pos) /*!< Bit mask of RAM7 field. */ +#define AMLI_RAMPRI_CCM_RAM7_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_CCM_RAM7_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_CCM_RAM7_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_CCM_RAM7_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_CCM_RAM7_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_CCM_RAM7_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_CCM_RAM7_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_CCM_RAM7_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_CCM_RAM7_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_CCM_RAM7_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_CCM_RAM7_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_CCM_RAM7_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_CCM_RAM7_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_CCM_RAM7_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_CCM_RAM7_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_CCM_RAM7_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 27..24 : Priority register for RAM AHB slave 6 */ +#define AMLI_RAMPRI_CCM_RAM6_Pos (24UL) /*!< Position of RAM6 field. */ +#define AMLI_RAMPRI_CCM_RAM6_Msk (0xFUL << AMLI_RAMPRI_CCM_RAM6_Pos) /*!< Bit mask of RAM6 field. */ +#define AMLI_RAMPRI_CCM_RAM6_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_CCM_RAM6_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_CCM_RAM6_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_CCM_RAM6_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_CCM_RAM6_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_CCM_RAM6_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_CCM_RAM6_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_CCM_RAM6_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_CCM_RAM6_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_CCM_RAM6_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_CCM_RAM6_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_CCM_RAM6_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_CCM_RAM6_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_CCM_RAM6_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_CCM_RAM6_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_CCM_RAM6_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 23..20 : Priority register for RAM AHB slave 5 */ +#define AMLI_RAMPRI_CCM_RAM5_Pos (20UL) /*!< Position of RAM5 field. */ +#define AMLI_RAMPRI_CCM_RAM5_Msk (0xFUL << AMLI_RAMPRI_CCM_RAM5_Pos) /*!< Bit mask of RAM5 field. */ +#define AMLI_RAMPRI_CCM_RAM5_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_CCM_RAM5_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_CCM_RAM5_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_CCM_RAM5_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_CCM_RAM5_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_CCM_RAM5_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_CCM_RAM5_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_CCM_RAM5_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_CCM_RAM5_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_CCM_RAM5_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_CCM_RAM5_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_CCM_RAM5_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_CCM_RAM5_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_CCM_RAM5_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_CCM_RAM5_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_CCM_RAM5_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 19..16 : Priority register for RAM AHB slave 4 */ +#define AMLI_RAMPRI_CCM_RAM4_Pos (16UL) /*!< Position of RAM4 field. */ +#define AMLI_RAMPRI_CCM_RAM4_Msk (0xFUL << AMLI_RAMPRI_CCM_RAM4_Pos) /*!< Bit mask of RAM4 field. */ +#define AMLI_RAMPRI_CCM_RAM4_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_CCM_RAM4_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_CCM_RAM4_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_CCM_RAM4_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_CCM_RAM4_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_CCM_RAM4_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_CCM_RAM4_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_CCM_RAM4_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_CCM_RAM4_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_CCM_RAM4_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_CCM_RAM4_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_CCM_RAM4_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_CCM_RAM4_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_CCM_RAM4_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_CCM_RAM4_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_CCM_RAM4_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 15..12 : Priority register for RAM AHB slave 3 */ +#define AMLI_RAMPRI_CCM_RAM3_Pos (12UL) /*!< Position of RAM3 field. */ +#define AMLI_RAMPRI_CCM_RAM3_Msk (0xFUL << AMLI_RAMPRI_CCM_RAM3_Pos) /*!< Bit mask of RAM3 field. */ +#define AMLI_RAMPRI_CCM_RAM3_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_CCM_RAM3_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_CCM_RAM3_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_CCM_RAM3_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_CCM_RAM3_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_CCM_RAM3_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_CCM_RAM3_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_CCM_RAM3_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_CCM_RAM3_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_CCM_RAM3_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_CCM_RAM3_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_CCM_RAM3_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_CCM_RAM3_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_CCM_RAM3_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_CCM_RAM3_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_CCM_RAM3_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 11..8 : Priority register for RAM AHB slave 2 */ +#define AMLI_RAMPRI_CCM_RAM2_Pos (8UL) /*!< Position of RAM2 field. */ +#define AMLI_RAMPRI_CCM_RAM2_Msk (0xFUL << AMLI_RAMPRI_CCM_RAM2_Pos) /*!< Bit mask of RAM2 field. */ +#define AMLI_RAMPRI_CCM_RAM2_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_CCM_RAM2_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_CCM_RAM2_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_CCM_RAM2_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_CCM_RAM2_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_CCM_RAM2_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_CCM_RAM2_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_CCM_RAM2_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_CCM_RAM2_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_CCM_RAM2_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_CCM_RAM2_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_CCM_RAM2_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_CCM_RAM2_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_CCM_RAM2_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_CCM_RAM2_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_CCM_RAM2_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 7..4 : Priority register for RAM AHB slave 1 */ +#define AMLI_RAMPRI_CCM_RAM1_Pos (4UL) /*!< Position of RAM1 field. */ +#define AMLI_RAMPRI_CCM_RAM1_Msk (0xFUL << AMLI_RAMPRI_CCM_RAM1_Pos) /*!< Bit mask of RAM1 field. */ +#define AMLI_RAMPRI_CCM_RAM1_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_CCM_RAM1_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_CCM_RAM1_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_CCM_RAM1_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_CCM_RAM1_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_CCM_RAM1_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_CCM_RAM1_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_CCM_RAM1_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_CCM_RAM1_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_CCM_RAM1_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_CCM_RAM1_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_CCM_RAM1_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_CCM_RAM1_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_CCM_RAM1_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_CCM_RAM1_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_CCM_RAM1_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 3..0 : Priority register for RAM AHB slave 0 */ +#define AMLI_RAMPRI_CCM_RAM0_Pos (0UL) /*!< Position of RAM0 field. */ +#define AMLI_RAMPRI_CCM_RAM0_Msk (0xFUL << AMLI_RAMPRI_CCM_RAM0_Pos) /*!< Bit mask of RAM0 field. */ +#define AMLI_RAMPRI_CCM_RAM0_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_CCM_RAM0_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_CCM_RAM0_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_CCM_RAM0_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_CCM_RAM0_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_CCM_RAM0_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_CCM_RAM0_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_CCM_RAM0_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_CCM_RAM0_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_CCM_RAM0_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_CCM_RAM0_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_CCM_RAM0_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_CCM_RAM0_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_CCM_RAM0_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_CCM_RAM0_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_CCM_RAM0_Pri15 (15UL) /*!< Priority 15 */ + +/* Register: AMLI_RAMPRI_AAR */ +/* Description: AHB bus master priority register for AAR */ + +/* Bits 31..28 : Priority register for RAM AHB slave 7 */ +#define AMLI_RAMPRI_AAR_RAM7_Pos (28UL) /*!< Position of RAM7 field. */ +#define AMLI_RAMPRI_AAR_RAM7_Msk (0xFUL << AMLI_RAMPRI_AAR_RAM7_Pos) /*!< Bit mask of RAM7 field. */ +#define AMLI_RAMPRI_AAR_RAM7_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_AAR_RAM7_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_AAR_RAM7_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_AAR_RAM7_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_AAR_RAM7_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_AAR_RAM7_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_AAR_RAM7_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_AAR_RAM7_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_AAR_RAM7_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_AAR_RAM7_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_AAR_RAM7_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_AAR_RAM7_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_AAR_RAM7_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_AAR_RAM7_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_AAR_RAM7_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_AAR_RAM7_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 27..24 : Priority register for RAM AHB slave 6 */ +#define AMLI_RAMPRI_AAR_RAM6_Pos (24UL) /*!< Position of RAM6 field. */ +#define AMLI_RAMPRI_AAR_RAM6_Msk (0xFUL << AMLI_RAMPRI_AAR_RAM6_Pos) /*!< Bit mask of RAM6 field. */ +#define AMLI_RAMPRI_AAR_RAM6_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_AAR_RAM6_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_AAR_RAM6_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_AAR_RAM6_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_AAR_RAM6_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_AAR_RAM6_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_AAR_RAM6_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_AAR_RAM6_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_AAR_RAM6_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_AAR_RAM6_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_AAR_RAM6_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_AAR_RAM6_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_AAR_RAM6_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_AAR_RAM6_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_AAR_RAM6_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_AAR_RAM6_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 23..20 : Priority register for RAM AHB slave 5 */ +#define AMLI_RAMPRI_AAR_RAM5_Pos (20UL) /*!< Position of RAM5 field. */ +#define AMLI_RAMPRI_AAR_RAM5_Msk (0xFUL << AMLI_RAMPRI_AAR_RAM5_Pos) /*!< Bit mask of RAM5 field. */ +#define AMLI_RAMPRI_AAR_RAM5_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_AAR_RAM5_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_AAR_RAM5_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_AAR_RAM5_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_AAR_RAM5_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_AAR_RAM5_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_AAR_RAM5_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_AAR_RAM5_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_AAR_RAM5_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_AAR_RAM5_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_AAR_RAM5_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_AAR_RAM5_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_AAR_RAM5_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_AAR_RAM5_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_AAR_RAM5_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_AAR_RAM5_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 19..16 : Priority register for RAM AHB slave 4 */ +#define AMLI_RAMPRI_AAR_RAM4_Pos (16UL) /*!< Position of RAM4 field. */ +#define AMLI_RAMPRI_AAR_RAM4_Msk (0xFUL << AMLI_RAMPRI_AAR_RAM4_Pos) /*!< Bit mask of RAM4 field. */ +#define AMLI_RAMPRI_AAR_RAM4_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_AAR_RAM4_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_AAR_RAM4_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_AAR_RAM4_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_AAR_RAM4_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_AAR_RAM4_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_AAR_RAM4_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_AAR_RAM4_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_AAR_RAM4_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_AAR_RAM4_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_AAR_RAM4_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_AAR_RAM4_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_AAR_RAM4_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_AAR_RAM4_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_AAR_RAM4_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_AAR_RAM4_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 15..12 : Priority register for RAM AHB slave 3 */ +#define AMLI_RAMPRI_AAR_RAM3_Pos (12UL) /*!< Position of RAM3 field. */ +#define AMLI_RAMPRI_AAR_RAM3_Msk (0xFUL << AMLI_RAMPRI_AAR_RAM3_Pos) /*!< Bit mask of RAM3 field. */ +#define AMLI_RAMPRI_AAR_RAM3_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_AAR_RAM3_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_AAR_RAM3_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_AAR_RAM3_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_AAR_RAM3_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_AAR_RAM3_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_AAR_RAM3_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_AAR_RAM3_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_AAR_RAM3_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_AAR_RAM3_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_AAR_RAM3_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_AAR_RAM3_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_AAR_RAM3_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_AAR_RAM3_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_AAR_RAM3_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_AAR_RAM3_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 11..8 : Priority register for RAM AHB slave 2 */ +#define AMLI_RAMPRI_AAR_RAM2_Pos (8UL) /*!< Position of RAM2 field. */ +#define AMLI_RAMPRI_AAR_RAM2_Msk (0xFUL << AMLI_RAMPRI_AAR_RAM2_Pos) /*!< Bit mask of RAM2 field. */ +#define AMLI_RAMPRI_AAR_RAM2_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_AAR_RAM2_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_AAR_RAM2_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_AAR_RAM2_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_AAR_RAM2_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_AAR_RAM2_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_AAR_RAM2_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_AAR_RAM2_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_AAR_RAM2_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_AAR_RAM2_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_AAR_RAM2_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_AAR_RAM2_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_AAR_RAM2_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_AAR_RAM2_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_AAR_RAM2_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_AAR_RAM2_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 7..4 : Priority register for RAM AHB slave 1 */ +#define AMLI_RAMPRI_AAR_RAM1_Pos (4UL) /*!< Position of RAM1 field. */ +#define AMLI_RAMPRI_AAR_RAM1_Msk (0xFUL << AMLI_RAMPRI_AAR_RAM1_Pos) /*!< Bit mask of RAM1 field. */ +#define AMLI_RAMPRI_AAR_RAM1_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_AAR_RAM1_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_AAR_RAM1_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_AAR_RAM1_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_AAR_RAM1_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_AAR_RAM1_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_AAR_RAM1_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_AAR_RAM1_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_AAR_RAM1_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_AAR_RAM1_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_AAR_RAM1_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_AAR_RAM1_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_AAR_RAM1_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_AAR_RAM1_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_AAR_RAM1_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_AAR_RAM1_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 3..0 : Priority register for RAM AHB slave 0 */ +#define AMLI_RAMPRI_AAR_RAM0_Pos (0UL) /*!< Position of RAM0 field. */ +#define AMLI_RAMPRI_AAR_RAM0_Msk (0xFUL << AMLI_RAMPRI_AAR_RAM0_Pos) /*!< Bit mask of RAM0 field. */ +#define AMLI_RAMPRI_AAR_RAM0_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_AAR_RAM0_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_AAR_RAM0_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_AAR_RAM0_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_AAR_RAM0_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_AAR_RAM0_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_AAR_RAM0_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_AAR_RAM0_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_AAR_RAM0_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_AAR_RAM0_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_AAR_RAM0_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_AAR_RAM0_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_AAR_RAM0_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_AAR_RAM0_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_AAR_RAM0_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_AAR_RAM0_Pri15 (15UL) /*!< Priority 15 */ + +/* Register: AMLI_RAMPRI_SAADC */ +/* Description: AHB bus master priority register for SAADC */ + +/* Bits 31..28 : Priority register for RAM AHB slave 7 */ +#define AMLI_RAMPRI_SAADC_RAM7_Pos (28UL) /*!< Position of RAM7 field. */ +#define AMLI_RAMPRI_SAADC_RAM7_Msk (0xFUL << AMLI_RAMPRI_SAADC_RAM7_Pos) /*!< Bit mask of RAM7 field. */ +#define AMLI_RAMPRI_SAADC_RAM7_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SAADC_RAM7_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SAADC_RAM7_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SAADC_RAM7_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SAADC_RAM7_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SAADC_RAM7_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SAADC_RAM7_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SAADC_RAM7_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SAADC_RAM7_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SAADC_RAM7_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SAADC_RAM7_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SAADC_RAM7_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SAADC_RAM7_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SAADC_RAM7_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SAADC_RAM7_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SAADC_RAM7_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 27..24 : Priority register for RAM AHB slave 6 */ +#define AMLI_RAMPRI_SAADC_RAM6_Pos (24UL) /*!< Position of RAM6 field. */ +#define AMLI_RAMPRI_SAADC_RAM6_Msk (0xFUL << AMLI_RAMPRI_SAADC_RAM6_Pos) /*!< Bit mask of RAM6 field. */ +#define AMLI_RAMPRI_SAADC_RAM6_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SAADC_RAM6_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SAADC_RAM6_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SAADC_RAM6_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SAADC_RAM6_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SAADC_RAM6_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SAADC_RAM6_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SAADC_RAM6_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SAADC_RAM6_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SAADC_RAM6_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SAADC_RAM6_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SAADC_RAM6_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SAADC_RAM6_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SAADC_RAM6_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SAADC_RAM6_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SAADC_RAM6_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 23..20 : Priority register for RAM AHB slave 5 */ +#define AMLI_RAMPRI_SAADC_RAM5_Pos (20UL) /*!< Position of RAM5 field. */ +#define AMLI_RAMPRI_SAADC_RAM5_Msk (0xFUL << AMLI_RAMPRI_SAADC_RAM5_Pos) /*!< Bit mask of RAM5 field. */ +#define AMLI_RAMPRI_SAADC_RAM5_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SAADC_RAM5_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SAADC_RAM5_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SAADC_RAM5_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SAADC_RAM5_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SAADC_RAM5_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SAADC_RAM5_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SAADC_RAM5_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SAADC_RAM5_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SAADC_RAM5_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SAADC_RAM5_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SAADC_RAM5_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SAADC_RAM5_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SAADC_RAM5_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SAADC_RAM5_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SAADC_RAM5_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 19..16 : Priority register for RAM AHB slave 4 */ +#define AMLI_RAMPRI_SAADC_RAM4_Pos (16UL) /*!< Position of RAM4 field. */ +#define AMLI_RAMPRI_SAADC_RAM4_Msk (0xFUL << AMLI_RAMPRI_SAADC_RAM4_Pos) /*!< Bit mask of RAM4 field. */ +#define AMLI_RAMPRI_SAADC_RAM4_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SAADC_RAM4_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SAADC_RAM4_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SAADC_RAM4_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SAADC_RAM4_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SAADC_RAM4_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SAADC_RAM4_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SAADC_RAM4_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SAADC_RAM4_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SAADC_RAM4_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SAADC_RAM4_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SAADC_RAM4_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SAADC_RAM4_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SAADC_RAM4_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SAADC_RAM4_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SAADC_RAM4_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 15..12 : Priority register for RAM AHB slave 3 */ +#define AMLI_RAMPRI_SAADC_RAM3_Pos (12UL) /*!< Position of RAM3 field. */ +#define AMLI_RAMPRI_SAADC_RAM3_Msk (0xFUL << AMLI_RAMPRI_SAADC_RAM3_Pos) /*!< Bit mask of RAM3 field. */ +#define AMLI_RAMPRI_SAADC_RAM3_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SAADC_RAM3_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SAADC_RAM3_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SAADC_RAM3_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SAADC_RAM3_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SAADC_RAM3_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SAADC_RAM3_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SAADC_RAM3_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SAADC_RAM3_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SAADC_RAM3_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SAADC_RAM3_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SAADC_RAM3_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SAADC_RAM3_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SAADC_RAM3_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SAADC_RAM3_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SAADC_RAM3_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 11..8 : Priority register for RAM AHB slave 2 */ +#define AMLI_RAMPRI_SAADC_RAM2_Pos (8UL) /*!< Position of RAM2 field. */ +#define AMLI_RAMPRI_SAADC_RAM2_Msk (0xFUL << AMLI_RAMPRI_SAADC_RAM2_Pos) /*!< Bit mask of RAM2 field. */ +#define AMLI_RAMPRI_SAADC_RAM2_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SAADC_RAM2_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SAADC_RAM2_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SAADC_RAM2_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SAADC_RAM2_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SAADC_RAM2_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SAADC_RAM2_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SAADC_RAM2_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SAADC_RAM2_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SAADC_RAM2_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SAADC_RAM2_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SAADC_RAM2_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SAADC_RAM2_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SAADC_RAM2_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SAADC_RAM2_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SAADC_RAM2_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 7..4 : Priority register for RAM AHB slave 1 */ +#define AMLI_RAMPRI_SAADC_RAM1_Pos (4UL) /*!< Position of RAM1 field. */ +#define AMLI_RAMPRI_SAADC_RAM1_Msk (0xFUL << AMLI_RAMPRI_SAADC_RAM1_Pos) /*!< Bit mask of RAM1 field. */ +#define AMLI_RAMPRI_SAADC_RAM1_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SAADC_RAM1_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SAADC_RAM1_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SAADC_RAM1_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SAADC_RAM1_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SAADC_RAM1_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SAADC_RAM1_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SAADC_RAM1_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SAADC_RAM1_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SAADC_RAM1_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SAADC_RAM1_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SAADC_RAM1_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SAADC_RAM1_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SAADC_RAM1_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SAADC_RAM1_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SAADC_RAM1_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 3..0 : Priority register for RAM AHB slave 0 */ +#define AMLI_RAMPRI_SAADC_RAM0_Pos (0UL) /*!< Position of RAM0 field. */ +#define AMLI_RAMPRI_SAADC_RAM0_Msk (0xFUL << AMLI_RAMPRI_SAADC_RAM0_Pos) /*!< Bit mask of RAM0 field. */ +#define AMLI_RAMPRI_SAADC_RAM0_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SAADC_RAM0_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SAADC_RAM0_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SAADC_RAM0_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SAADC_RAM0_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SAADC_RAM0_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SAADC_RAM0_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SAADC_RAM0_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SAADC_RAM0_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SAADC_RAM0_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SAADC_RAM0_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SAADC_RAM0_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SAADC_RAM0_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SAADC_RAM0_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SAADC_RAM0_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SAADC_RAM0_Pri15 (15UL) /*!< Priority 15 */ + +/* Register: AMLI_RAMPRI_UARTE */ +/* Description: AHB bus master priority register for UARTE */ + +/* Bits 31..28 : Priority register for RAM AHB slave 7 */ +#define AMLI_RAMPRI_UARTE_RAM7_Pos (28UL) /*!< Position of RAM7 field. */ +#define AMLI_RAMPRI_UARTE_RAM7_Msk (0xFUL << AMLI_RAMPRI_UARTE_RAM7_Pos) /*!< Bit mask of RAM7 field. */ +#define AMLI_RAMPRI_UARTE_RAM7_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_UARTE_RAM7_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_UARTE_RAM7_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_UARTE_RAM7_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_UARTE_RAM7_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_UARTE_RAM7_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_UARTE_RAM7_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_UARTE_RAM7_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_UARTE_RAM7_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_UARTE_RAM7_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_UARTE_RAM7_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_UARTE_RAM7_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_UARTE_RAM7_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_UARTE_RAM7_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_UARTE_RAM7_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_UARTE_RAM7_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 27..24 : Priority register for RAM AHB slave 6 */ +#define AMLI_RAMPRI_UARTE_RAM6_Pos (24UL) /*!< Position of RAM6 field. */ +#define AMLI_RAMPRI_UARTE_RAM6_Msk (0xFUL << AMLI_RAMPRI_UARTE_RAM6_Pos) /*!< Bit mask of RAM6 field. */ +#define AMLI_RAMPRI_UARTE_RAM6_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_UARTE_RAM6_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_UARTE_RAM6_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_UARTE_RAM6_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_UARTE_RAM6_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_UARTE_RAM6_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_UARTE_RAM6_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_UARTE_RAM6_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_UARTE_RAM6_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_UARTE_RAM6_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_UARTE_RAM6_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_UARTE_RAM6_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_UARTE_RAM6_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_UARTE_RAM6_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_UARTE_RAM6_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_UARTE_RAM6_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 23..20 : Priority register for RAM AHB slave 5 */ +#define AMLI_RAMPRI_UARTE_RAM5_Pos (20UL) /*!< Position of RAM5 field. */ +#define AMLI_RAMPRI_UARTE_RAM5_Msk (0xFUL << AMLI_RAMPRI_UARTE_RAM5_Pos) /*!< Bit mask of RAM5 field. */ +#define AMLI_RAMPRI_UARTE_RAM5_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_UARTE_RAM5_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_UARTE_RAM5_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_UARTE_RAM5_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_UARTE_RAM5_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_UARTE_RAM5_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_UARTE_RAM5_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_UARTE_RAM5_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_UARTE_RAM5_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_UARTE_RAM5_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_UARTE_RAM5_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_UARTE_RAM5_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_UARTE_RAM5_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_UARTE_RAM5_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_UARTE_RAM5_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_UARTE_RAM5_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 19..16 : Priority register for RAM AHB slave 4 */ +#define AMLI_RAMPRI_UARTE_RAM4_Pos (16UL) /*!< Position of RAM4 field. */ +#define AMLI_RAMPRI_UARTE_RAM4_Msk (0xFUL << AMLI_RAMPRI_UARTE_RAM4_Pos) /*!< Bit mask of RAM4 field. */ +#define AMLI_RAMPRI_UARTE_RAM4_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_UARTE_RAM4_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_UARTE_RAM4_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_UARTE_RAM4_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_UARTE_RAM4_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_UARTE_RAM4_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_UARTE_RAM4_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_UARTE_RAM4_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_UARTE_RAM4_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_UARTE_RAM4_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_UARTE_RAM4_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_UARTE_RAM4_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_UARTE_RAM4_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_UARTE_RAM4_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_UARTE_RAM4_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_UARTE_RAM4_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 15..12 : Priority register for RAM AHB slave 3 */ +#define AMLI_RAMPRI_UARTE_RAM3_Pos (12UL) /*!< Position of RAM3 field. */ +#define AMLI_RAMPRI_UARTE_RAM3_Msk (0xFUL << AMLI_RAMPRI_UARTE_RAM3_Pos) /*!< Bit mask of RAM3 field. */ +#define AMLI_RAMPRI_UARTE_RAM3_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_UARTE_RAM3_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_UARTE_RAM3_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_UARTE_RAM3_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_UARTE_RAM3_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_UARTE_RAM3_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_UARTE_RAM3_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_UARTE_RAM3_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_UARTE_RAM3_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_UARTE_RAM3_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_UARTE_RAM3_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_UARTE_RAM3_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_UARTE_RAM3_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_UARTE_RAM3_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_UARTE_RAM3_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_UARTE_RAM3_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 11..8 : Priority register for RAM AHB slave 2 */ +#define AMLI_RAMPRI_UARTE_RAM2_Pos (8UL) /*!< Position of RAM2 field. */ +#define AMLI_RAMPRI_UARTE_RAM2_Msk (0xFUL << AMLI_RAMPRI_UARTE_RAM2_Pos) /*!< Bit mask of RAM2 field. */ +#define AMLI_RAMPRI_UARTE_RAM2_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_UARTE_RAM2_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_UARTE_RAM2_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_UARTE_RAM2_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_UARTE_RAM2_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_UARTE_RAM2_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_UARTE_RAM2_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_UARTE_RAM2_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_UARTE_RAM2_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_UARTE_RAM2_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_UARTE_RAM2_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_UARTE_RAM2_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_UARTE_RAM2_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_UARTE_RAM2_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_UARTE_RAM2_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_UARTE_RAM2_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 7..4 : Priority register for RAM AHB slave 1 */ +#define AMLI_RAMPRI_UARTE_RAM1_Pos (4UL) /*!< Position of RAM1 field. */ +#define AMLI_RAMPRI_UARTE_RAM1_Msk (0xFUL << AMLI_RAMPRI_UARTE_RAM1_Pos) /*!< Bit mask of RAM1 field. */ +#define AMLI_RAMPRI_UARTE_RAM1_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_UARTE_RAM1_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_UARTE_RAM1_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_UARTE_RAM1_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_UARTE_RAM1_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_UARTE_RAM1_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_UARTE_RAM1_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_UARTE_RAM1_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_UARTE_RAM1_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_UARTE_RAM1_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_UARTE_RAM1_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_UARTE_RAM1_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_UARTE_RAM1_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_UARTE_RAM1_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_UARTE_RAM1_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_UARTE_RAM1_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 3..0 : Priority register for RAM AHB slave 0 */ +#define AMLI_RAMPRI_UARTE_RAM0_Pos (0UL) /*!< Position of RAM0 field. */ +#define AMLI_RAMPRI_UARTE_RAM0_Msk (0xFUL << AMLI_RAMPRI_UARTE_RAM0_Pos) /*!< Bit mask of RAM0 field. */ +#define AMLI_RAMPRI_UARTE_RAM0_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_UARTE_RAM0_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_UARTE_RAM0_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_UARTE_RAM0_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_UARTE_RAM0_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_UARTE_RAM0_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_UARTE_RAM0_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_UARTE_RAM0_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_UARTE_RAM0_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_UARTE_RAM0_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_UARTE_RAM0_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_UARTE_RAM0_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_UARTE_RAM0_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_UARTE_RAM0_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_UARTE_RAM0_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_UARTE_RAM0_Pri15 (15UL) /*!< Priority 15 */ + +/* Register: AMLI_RAMPRI_SERIAL0 */ +/* Description: AHB bus master priority register for SPIM0, SPIS0, TWIM0 and TWIS0 */ + +/* Bits 31..28 : Priority register for RAM AHB slave 7 */ +#define AMLI_RAMPRI_SERIAL0_RAM7_Pos (28UL) /*!< Position of RAM7 field. */ +#define AMLI_RAMPRI_SERIAL0_RAM7_Msk (0xFUL << AMLI_RAMPRI_SERIAL0_RAM7_Pos) /*!< Bit mask of RAM7 field. */ +#define AMLI_RAMPRI_SERIAL0_RAM7_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SERIAL0_RAM7_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SERIAL0_RAM7_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SERIAL0_RAM7_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SERIAL0_RAM7_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SERIAL0_RAM7_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SERIAL0_RAM7_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SERIAL0_RAM7_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SERIAL0_RAM7_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SERIAL0_RAM7_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SERIAL0_RAM7_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SERIAL0_RAM7_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SERIAL0_RAM7_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SERIAL0_RAM7_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SERIAL0_RAM7_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SERIAL0_RAM7_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 27..24 : Priority register for RAM AHB slave 6 */ +#define AMLI_RAMPRI_SERIAL0_RAM6_Pos (24UL) /*!< Position of RAM6 field. */ +#define AMLI_RAMPRI_SERIAL0_RAM6_Msk (0xFUL << AMLI_RAMPRI_SERIAL0_RAM6_Pos) /*!< Bit mask of RAM6 field. */ +#define AMLI_RAMPRI_SERIAL0_RAM6_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SERIAL0_RAM6_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SERIAL0_RAM6_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SERIAL0_RAM6_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SERIAL0_RAM6_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SERIAL0_RAM6_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SERIAL0_RAM6_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SERIAL0_RAM6_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SERIAL0_RAM6_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SERIAL0_RAM6_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SERIAL0_RAM6_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SERIAL0_RAM6_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SERIAL0_RAM6_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SERIAL0_RAM6_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SERIAL0_RAM6_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SERIAL0_RAM6_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 23..20 : Priority register for RAM AHB slave 5 */ +#define AMLI_RAMPRI_SERIAL0_RAM5_Pos (20UL) /*!< Position of RAM5 field. */ +#define AMLI_RAMPRI_SERIAL0_RAM5_Msk (0xFUL << AMLI_RAMPRI_SERIAL0_RAM5_Pos) /*!< Bit mask of RAM5 field. */ +#define AMLI_RAMPRI_SERIAL0_RAM5_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SERIAL0_RAM5_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SERIAL0_RAM5_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SERIAL0_RAM5_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SERIAL0_RAM5_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SERIAL0_RAM5_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SERIAL0_RAM5_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SERIAL0_RAM5_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SERIAL0_RAM5_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SERIAL0_RAM5_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SERIAL0_RAM5_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SERIAL0_RAM5_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SERIAL0_RAM5_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SERIAL0_RAM5_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SERIAL0_RAM5_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SERIAL0_RAM5_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 19..16 : Priority register for RAM AHB slave 4 */ +#define AMLI_RAMPRI_SERIAL0_RAM4_Pos (16UL) /*!< Position of RAM4 field. */ +#define AMLI_RAMPRI_SERIAL0_RAM4_Msk (0xFUL << AMLI_RAMPRI_SERIAL0_RAM4_Pos) /*!< Bit mask of RAM4 field. */ +#define AMLI_RAMPRI_SERIAL0_RAM4_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SERIAL0_RAM4_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SERIAL0_RAM4_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SERIAL0_RAM4_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SERIAL0_RAM4_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SERIAL0_RAM4_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SERIAL0_RAM4_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SERIAL0_RAM4_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SERIAL0_RAM4_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SERIAL0_RAM4_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SERIAL0_RAM4_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SERIAL0_RAM4_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SERIAL0_RAM4_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SERIAL0_RAM4_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SERIAL0_RAM4_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SERIAL0_RAM4_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 15..12 : Priority register for RAM AHB slave 3 */ +#define AMLI_RAMPRI_SERIAL0_RAM3_Pos (12UL) /*!< Position of RAM3 field. */ +#define AMLI_RAMPRI_SERIAL0_RAM3_Msk (0xFUL << AMLI_RAMPRI_SERIAL0_RAM3_Pos) /*!< Bit mask of RAM3 field. */ +#define AMLI_RAMPRI_SERIAL0_RAM3_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SERIAL0_RAM3_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SERIAL0_RAM3_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SERIAL0_RAM3_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SERIAL0_RAM3_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SERIAL0_RAM3_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SERIAL0_RAM3_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SERIAL0_RAM3_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SERIAL0_RAM3_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SERIAL0_RAM3_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SERIAL0_RAM3_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SERIAL0_RAM3_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SERIAL0_RAM3_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SERIAL0_RAM3_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SERIAL0_RAM3_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SERIAL0_RAM3_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 11..8 : Priority register for RAM AHB slave 2 */ +#define AMLI_RAMPRI_SERIAL0_RAM2_Pos (8UL) /*!< Position of RAM2 field. */ +#define AMLI_RAMPRI_SERIAL0_RAM2_Msk (0xFUL << AMLI_RAMPRI_SERIAL0_RAM2_Pos) /*!< Bit mask of RAM2 field. */ +#define AMLI_RAMPRI_SERIAL0_RAM2_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SERIAL0_RAM2_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SERIAL0_RAM2_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SERIAL0_RAM2_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SERIAL0_RAM2_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SERIAL0_RAM2_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SERIAL0_RAM2_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SERIAL0_RAM2_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SERIAL0_RAM2_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SERIAL0_RAM2_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SERIAL0_RAM2_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SERIAL0_RAM2_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SERIAL0_RAM2_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SERIAL0_RAM2_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SERIAL0_RAM2_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SERIAL0_RAM2_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 7..4 : Priority register for RAM AHB slave 1 */ +#define AMLI_RAMPRI_SERIAL0_RAM1_Pos (4UL) /*!< Position of RAM1 field. */ +#define AMLI_RAMPRI_SERIAL0_RAM1_Msk (0xFUL << AMLI_RAMPRI_SERIAL0_RAM1_Pos) /*!< Bit mask of RAM1 field. */ +#define AMLI_RAMPRI_SERIAL0_RAM1_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SERIAL0_RAM1_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SERIAL0_RAM1_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SERIAL0_RAM1_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SERIAL0_RAM1_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SERIAL0_RAM1_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SERIAL0_RAM1_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SERIAL0_RAM1_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SERIAL0_RAM1_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SERIAL0_RAM1_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SERIAL0_RAM1_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SERIAL0_RAM1_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SERIAL0_RAM1_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SERIAL0_RAM1_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SERIAL0_RAM1_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SERIAL0_RAM1_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 3..0 : Priority register for RAM AHB slave 0 */ +#define AMLI_RAMPRI_SERIAL0_RAM0_Pos (0UL) /*!< Position of RAM0 field. */ +#define AMLI_RAMPRI_SERIAL0_RAM0_Msk (0xFUL << AMLI_RAMPRI_SERIAL0_RAM0_Pos) /*!< Bit mask of RAM0 field. */ +#define AMLI_RAMPRI_SERIAL0_RAM0_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SERIAL0_RAM0_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SERIAL0_RAM0_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SERIAL0_RAM0_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SERIAL0_RAM0_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SERIAL0_RAM0_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SERIAL0_RAM0_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SERIAL0_RAM0_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SERIAL0_RAM0_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SERIAL0_RAM0_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SERIAL0_RAM0_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SERIAL0_RAM0_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SERIAL0_RAM0_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SERIAL0_RAM0_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SERIAL0_RAM0_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SERIAL0_RAM0_Pri15 (15UL) /*!< Priority 15 */ + +/* Register: AMLI_RAMPRI_SERIAL2 */ +/* Description: AHB bus master priority register for SPIM2 and SPIS2 */ + +/* Bits 31..28 : Priority register for RAM AHB slave 7 */ +#define AMLI_RAMPRI_SERIAL2_RAM7_Pos (28UL) /*!< Position of RAM7 field. */ +#define AMLI_RAMPRI_SERIAL2_RAM7_Msk (0xFUL << AMLI_RAMPRI_SERIAL2_RAM7_Pos) /*!< Bit mask of RAM7 field. */ +#define AMLI_RAMPRI_SERIAL2_RAM7_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SERIAL2_RAM7_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SERIAL2_RAM7_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SERIAL2_RAM7_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SERIAL2_RAM7_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SERIAL2_RAM7_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SERIAL2_RAM7_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SERIAL2_RAM7_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SERIAL2_RAM7_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SERIAL2_RAM7_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SERIAL2_RAM7_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SERIAL2_RAM7_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SERIAL2_RAM7_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SERIAL2_RAM7_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SERIAL2_RAM7_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SERIAL2_RAM7_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 27..24 : Priority register for RAM AHB slave 6 */ +#define AMLI_RAMPRI_SERIAL2_RAM6_Pos (24UL) /*!< Position of RAM6 field. */ +#define AMLI_RAMPRI_SERIAL2_RAM6_Msk (0xFUL << AMLI_RAMPRI_SERIAL2_RAM6_Pos) /*!< Bit mask of RAM6 field. */ +#define AMLI_RAMPRI_SERIAL2_RAM6_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SERIAL2_RAM6_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SERIAL2_RAM6_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SERIAL2_RAM6_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SERIAL2_RAM6_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SERIAL2_RAM6_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SERIAL2_RAM6_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SERIAL2_RAM6_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SERIAL2_RAM6_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SERIAL2_RAM6_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SERIAL2_RAM6_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SERIAL2_RAM6_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SERIAL2_RAM6_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SERIAL2_RAM6_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SERIAL2_RAM6_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SERIAL2_RAM6_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 23..20 : Priority register for RAM AHB slave 5 */ +#define AMLI_RAMPRI_SERIAL2_RAM5_Pos (20UL) /*!< Position of RAM5 field. */ +#define AMLI_RAMPRI_SERIAL2_RAM5_Msk (0xFUL << AMLI_RAMPRI_SERIAL2_RAM5_Pos) /*!< Bit mask of RAM5 field. */ +#define AMLI_RAMPRI_SERIAL2_RAM5_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SERIAL2_RAM5_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SERIAL2_RAM5_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SERIAL2_RAM5_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SERIAL2_RAM5_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SERIAL2_RAM5_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SERIAL2_RAM5_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SERIAL2_RAM5_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SERIAL2_RAM5_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SERIAL2_RAM5_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SERIAL2_RAM5_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SERIAL2_RAM5_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SERIAL2_RAM5_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SERIAL2_RAM5_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SERIAL2_RAM5_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SERIAL2_RAM5_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 19..16 : Priority register for RAM AHB slave 4 */ +#define AMLI_RAMPRI_SERIAL2_RAM4_Pos (16UL) /*!< Position of RAM4 field. */ +#define AMLI_RAMPRI_SERIAL2_RAM4_Msk (0xFUL << AMLI_RAMPRI_SERIAL2_RAM4_Pos) /*!< Bit mask of RAM4 field. */ +#define AMLI_RAMPRI_SERIAL2_RAM4_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SERIAL2_RAM4_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SERIAL2_RAM4_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SERIAL2_RAM4_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SERIAL2_RAM4_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SERIAL2_RAM4_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SERIAL2_RAM4_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SERIAL2_RAM4_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SERIAL2_RAM4_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SERIAL2_RAM4_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SERIAL2_RAM4_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SERIAL2_RAM4_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SERIAL2_RAM4_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SERIAL2_RAM4_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SERIAL2_RAM4_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SERIAL2_RAM4_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 15..12 : Priority register for RAM AHB slave 3 */ +#define AMLI_RAMPRI_SERIAL2_RAM3_Pos (12UL) /*!< Position of RAM3 field. */ +#define AMLI_RAMPRI_SERIAL2_RAM3_Msk (0xFUL << AMLI_RAMPRI_SERIAL2_RAM3_Pos) /*!< Bit mask of RAM3 field. */ +#define AMLI_RAMPRI_SERIAL2_RAM3_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SERIAL2_RAM3_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SERIAL2_RAM3_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SERIAL2_RAM3_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SERIAL2_RAM3_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SERIAL2_RAM3_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SERIAL2_RAM3_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SERIAL2_RAM3_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SERIAL2_RAM3_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SERIAL2_RAM3_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SERIAL2_RAM3_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SERIAL2_RAM3_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SERIAL2_RAM3_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SERIAL2_RAM3_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SERIAL2_RAM3_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SERIAL2_RAM3_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 11..8 : Priority register for RAM AHB slave 2 */ +#define AMLI_RAMPRI_SERIAL2_RAM2_Pos (8UL) /*!< Position of RAM2 field. */ +#define AMLI_RAMPRI_SERIAL2_RAM2_Msk (0xFUL << AMLI_RAMPRI_SERIAL2_RAM2_Pos) /*!< Bit mask of RAM2 field. */ +#define AMLI_RAMPRI_SERIAL2_RAM2_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SERIAL2_RAM2_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SERIAL2_RAM2_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SERIAL2_RAM2_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SERIAL2_RAM2_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SERIAL2_RAM2_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SERIAL2_RAM2_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SERIAL2_RAM2_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SERIAL2_RAM2_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SERIAL2_RAM2_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SERIAL2_RAM2_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SERIAL2_RAM2_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SERIAL2_RAM2_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SERIAL2_RAM2_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SERIAL2_RAM2_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SERIAL2_RAM2_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 7..4 : Priority register for RAM AHB slave 1 */ +#define AMLI_RAMPRI_SERIAL2_RAM1_Pos (4UL) /*!< Position of RAM1 field. */ +#define AMLI_RAMPRI_SERIAL2_RAM1_Msk (0xFUL << AMLI_RAMPRI_SERIAL2_RAM1_Pos) /*!< Bit mask of RAM1 field. */ +#define AMLI_RAMPRI_SERIAL2_RAM1_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SERIAL2_RAM1_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SERIAL2_RAM1_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SERIAL2_RAM1_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SERIAL2_RAM1_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SERIAL2_RAM1_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SERIAL2_RAM1_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SERIAL2_RAM1_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SERIAL2_RAM1_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SERIAL2_RAM1_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SERIAL2_RAM1_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SERIAL2_RAM1_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SERIAL2_RAM1_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SERIAL2_RAM1_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SERIAL2_RAM1_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SERIAL2_RAM1_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 3..0 : Priority register for RAM AHB slave 0 */ +#define AMLI_RAMPRI_SERIAL2_RAM0_Pos (0UL) /*!< Position of RAM0 field. */ +#define AMLI_RAMPRI_SERIAL2_RAM0_Msk (0xFUL << AMLI_RAMPRI_SERIAL2_RAM0_Pos) /*!< Bit mask of RAM0 field. */ +#define AMLI_RAMPRI_SERIAL2_RAM0_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_SERIAL2_RAM0_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_SERIAL2_RAM0_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_SERIAL2_RAM0_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_SERIAL2_RAM0_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_SERIAL2_RAM0_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_SERIAL2_RAM0_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_SERIAL2_RAM0_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_SERIAL2_RAM0_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_SERIAL2_RAM0_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_SERIAL2_RAM0_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_SERIAL2_RAM0_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_SERIAL2_RAM0_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_SERIAL2_RAM0_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_SERIAL2_RAM0_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_SERIAL2_RAM0_Pri15 (15UL) /*!< Priority 15 */ + +/* Register: AMLI_RAMPRI_NFCT */ +/* Description: AHB bus master priority register for NFCT */ + +/* Bits 31..28 : Priority register for RAM AHB slave 7 */ +#define AMLI_RAMPRI_NFCT_RAM7_Pos (28UL) /*!< Position of RAM7 field. */ +#define AMLI_RAMPRI_NFCT_RAM7_Msk (0xFUL << AMLI_RAMPRI_NFCT_RAM7_Pos) /*!< Bit mask of RAM7 field. */ +#define AMLI_RAMPRI_NFCT_RAM7_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_NFCT_RAM7_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_NFCT_RAM7_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_NFCT_RAM7_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_NFCT_RAM7_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_NFCT_RAM7_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_NFCT_RAM7_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_NFCT_RAM7_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_NFCT_RAM7_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_NFCT_RAM7_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_NFCT_RAM7_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_NFCT_RAM7_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_NFCT_RAM7_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_NFCT_RAM7_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_NFCT_RAM7_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_NFCT_RAM7_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 27..24 : Priority register for RAM AHB slave 6 */ +#define AMLI_RAMPRI_NFCT_RAM6_Pos (24UL) /*!< Position of RAM6 field. */ +#define AMLI_RAMPRI_NFCT_RAM6_Msk (0xFUL << AMLI_RAMPRI_NFCT_RAM6_Pos) /*!< Bit mask of RAM6 field. */ +#define AMLI_RAMPRI_NFCT_RAM6_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_NFCT_RAM6_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_NFCT_RAM6_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_NFCT_RAM6_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_NFCT_RAM6_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_NFCT_RAM6_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_NFCT_RAM6_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_NFCT_RAM6_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_NFCT_RAM6_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_NFCT_RAM6_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_NFCT_RAM6_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_NFCT_RAM6_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_NFCT_RAM6_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_NFCT_RAM6_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_NFCT_RAM6_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_NFCT_RAM6_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 23..20 : Priority register for RAM AHB slave 5 */ +#define AMLI_RAMPRI_NFCT_RAM5_Pos (20UL) /*!< Position of RAM5 field. */ +#define AMLI_RAMPRI_NFCT_RAM5_Msk (0xFUL << AMLI_RAMPRI_NFCT_RAM5_Pos) /*!< Bit mask of RAM5 field. */ +#define AMLI_RAMPRI_NFCT_RAM5_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_NFCT_RAM5_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_NFCT_RAM5_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_NFCT_RAM5_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_NFCT_RAM5_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_NFCT_RAM5_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_NFCT_RAM5_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_NFCT_RAM5_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_NFCT_RAM5_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_NFCT_RAM5_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_NFCT_RAM5_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_NFCT_RAM5_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_NFCT_RAM5_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_NFCT_RAM5_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_NFCT_RAM5_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_NFCT_RAM5_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 19..16 : Priority register for RAM AHB slave 4 */ +#define AMLI_RAMPRI_NFCT_RAM4_Pos (16UL) /*!< Position of RAM4 field. */ +#define AMLI_RAMPRI_NFCT_RAM4_Msk (0xFUL << AMLI_RAMPRI_NFCT_RAM4_Pos) /*!< Bit mask of RAM4 field. */ +#define AMLI_RAMPRI_NFCT_RAM4_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_NFCT_RAM4_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_NFCT_RAM4_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_NFCT_RAM4_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_NFCT_RAM4_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_NFCT_RAM4_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_NFCT_RAM4_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_NFCT_RAM4_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_NFCT_RAM4_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_NFCT_RAM4_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_NFCT_RAM4_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_NFCT_RAM4_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_NFCT_RAM4_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_NFCT_RAM4_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_NFCT_RAM4_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_NFCT_RAM4_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 15..12 : Priority register for RAM AHB slave 3 */ +#define AMLI_RAMPRI_NFCT_RAM3_Pos (12UL) /*!< Position of RAM3 field. */ +#define AMLI_RAMPRI_NFCT_RAM3_Msk (0xFUL << AMLI_RAMPRI_NFCT_RAM3_Pos) /*!< Bit mask of RAM3 field. */ +#define AMLI_RAMPRI_NFCT_RAM3_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_NFCT_RAM3_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_NFCT_RAM3_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_NFCT_RAM3_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_NFCT_RAM3_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_NFCT_RAM3_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_NFCT_RAM3_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_NFCT_RAM3_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_NFCT_RAM3_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_NFCT_RAM3_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_NFCT_RAM3_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_NFCT_RAM3_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_NFCT_RAM3_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_NFCT_RAM3_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_NFCT_RAM3_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_NFCT_RAM3_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 11..8 : Priority register for RAM AHB slave 2 */ +#define AMLI_RAMPRI_NFCT_RAM2_Pos (8UL) /*!< Position of RAM2 field. */ +#define AMLI_RAMPRI_NFCT_RAM2_Msk (0xFUL << AMLI_RAMPRI_NFCT_RAM2_Pos) /*!< Bit mask of RAM2 field. */ +#define AMLI_RAMPRI_NFCT_RAM2_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_NFCT_RAM2_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_NFCT_RAM2_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_NFCT_RAM2_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_NFCT_RAM2_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_NFCT_RAM2_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_NFCT_RAM2_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_NFCT_RAM2_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_NFCT_RAM2_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_NFCT_RAM2_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_NFCT_RAM2_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_NFCT_RAM2_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_NFCT_RAM2_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_NFCT_RAM2_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_NFCT_RAM2_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_NFCT_RAM2_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 7..4 : Priority register for RAM AHB slave 1 */ +#define AMLI_RAMPRI_NFCT_RAM1_Pos (4UL) /*!< Position of RAM1 field. */ +#define AMLI_RAMPRI_NFCT_RAM1_Msk (0xFUL << AMLI_RAMPRI_NFCT_RAM1_Pos) /*!< Bit mask of RAM1 field. */ +#define AMLI_RAMPRI_NFCT_RAM1_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_NFCT_RAM1_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_NFCT_RAM1_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_NFCT_RAM1_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_NFCT_RAM1_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_NFCT_RAM1_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_NFCT_RAM1_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_NFCT_RAM1_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_NFCT_RAM1_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_NFCT_RAM1_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_NFCT_RAM1_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_NFCT_RAM1_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_NFCT_RAM1_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_NFCT_RAM1_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_NFCT_RAM1_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_NFCT_RAM1_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 3..0 : Priority register for RAM AHB slave 0 */ +#define AMLI_RAMPRI_NFCT_RAM0_Pos (0UL) /*!< Position of RAM0 field. */ +#define AMLI_RAMPRI_NFCT_RAM0_Msk (0xFUL << AMLI_RAMPRI_NFCT_RAM0_Pos) /*!< Bit mask of RAM0 field. */ +#define AMLI_RAMPRI_NFCT_RAM0_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_NFCT_RAM0_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_NFCT_RAM0_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_NFCT_RAM0_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_NFCT_RAM0_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_NFCT_RAM0_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_NFCT_RAM0_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_NFCT_RAM0_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_NFCT_RAM0_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_NFCT_RAM0_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_NFCT_RAM0_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_NFCT_RAM0_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_NFCT_RAM0_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_NFCT_RAM0_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_NFCT_RAM0_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_NFCT_RAM0_Pri15 (15UL) /*!< Priority 15 */ + +/* Register: AMLI_RAMPRI_I2S */ +/* Description: AHB bus master priority register for I2S */ + +/* Bits 31..28 : Priority register for RAM AHB slave 7 */ +#define AMLI_RAMPRI_I2S_RAM7_Pos (28UL) /*!< Position of RAM7 field. */ +#define AMLI_RAMPRI_I2S_RAM7_Msk (0xFUL << AMLI_RAMPRI_I2S_RAM7_Pos) /*!< Bit mask of RAM7 field. */ +#define AMLI_RAMPRI_I2S_RAM7_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_I2S_RAM7_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_I2S_RAM7_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_I2S_RAM7_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_I2S_RAM7_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_I2S_RAM7_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_I2S_RAM7_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_I2S_RAM7_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_I2S_RAM7_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_I2S_RAM7_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_I2S_RAM7_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_I2S_RAM7_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_I2S_RAM7_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_I2S_RAM7_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_I2S_RAM7_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_I2S_RAM7_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 27..24 : Priority register for RAM AHB slave 6 */ +#define AMLI_RAMPRI_I2S_RAM6_Pos (24UL) /*!< Position of RAM6 field. */ +#define AMLI_RAMPRI_I2S_RAM6_Msk (0xFUL << AMLI_RAMPRI_I2S_RAM6_Pos) /*!< Bit mask of RAM6 field. */ +#define AMLI_RAMPRI_I2S_RAM6_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_I2S_RAM6_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_I2S_RAM6_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_I2S_RAM6_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_I2S_RAM6_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_I2S_RAM6_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_I2S_RAM6_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_I2S_RAM6_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_I2S_RAM6_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_I2S_RAM6_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_I2S_RAM6_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_I2S_RAM6_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_I2S_RAM6_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_I2S_RAM6_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_I2S_RAM6_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_I2S_RAM6_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 23..20 : Priority register for RAM AHB slave 5 */ +#define AMLI_RAMPRI_I2S_RAM5_Pos (20UL) /*!< Position of RAM5 field. */ +#define AMLI_RAMPRI_I2S_RAM5_Msk (0xFUL << AMLI_RAMPRI_I2S_RAM5_Pos) /*!< Bit mask of RAM5 field. */ +#define AMLI_RAMPRI_I2S_RAM5_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_I2S_RAM5_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_I2S_RAM5_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_I2S_RAM5_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_I2S_RAM5_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_I2S_RAM5_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_I2S_RAM5_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_I2S_RAM5_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_I2S_RAM5_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_I2S_RAM5_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_I2S_RAM5_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_I2S_RAM5_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_I2S_RAM5_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_I2S_RAM5_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_I2S_RAM5_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_I2S_RAM5_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 19..16 : Priority register for RAM AHB slave 4 */ +#define AMLI_RAMPRI_I2S_RAM4_Pos (16UL) /*!< Position of RAM4 field. */ +#define AMLI_RAMPRI_I2S_RAM4_Msk (0xFUL << AMLI_RAMPRI_I2S_RAM4_Pos) /*!< Bit mask of RAM4 field. */ +#define AMLI_RAMPRI_I2S_RAM4_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_I2S_RAM4_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_I2S_RAM4_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_I2S_RAM4_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_I2S_RAM4_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_I2S_RAM4_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_I2S_RAM4_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_I2S_RAM4_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_I2S_RAM4_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_I2S_RAM4_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_I2S_RAM4_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_I2S_RAM4_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_I2S_RAM4_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_I2S_RAM4_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_I2S_RAM4_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_I2S_RAM4_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 15..12 : Priority register for RAM AHB slave 3 */ +#define AMLI_RAMPRI_I2S_RAM3_Pos (12UL) /*!< Position of RAM3 field. */ +#define AMLI_RAMPRI_I2S_RAM3_Msk (0xFUL << AMLI_RAMPRI_I2S_RAM3_Pos) /*!< Bit mask of RAM3 field. */ +#define AMLI_RAMPRI_I2S_RAM3_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_I2S_RAM3_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_I2S_RAM3_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_I2S_RAM3_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_I2S_RAM3_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_I2S_RAM3_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_I2S_RAM3_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_I2S_RAM3_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_I2S_RAM3_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_I2S_RAM3_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_I2S_RAM3_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_I2S_RAM3_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_I2S_RAM3_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_I2S_RAM3_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_I2S_RAM3_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_I2S_RAM3_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 11..8 : Priority register for RAM AHB slave 2 */ +#define AMLI_RAMPRI_I2S_RAM2_Pos (8UL) /*!< Position of RAM2 field. */ +#define AMLI_RAMPRI_I2S_RAM2_Msk (0xFUL << AMLI_RAMPRI_I2S_RAM2_Pos) /*!< Bit mask of RAM2 field. */ +#define AMLI_RAMPRI_I2S_RAM2_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_I2S_RAM2_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_I2S_RAM2_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_I2S_RAM2_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_I2S_RAM2_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_I2S_RAM2_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_I2S_RAM2_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_I2S_RAM2_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_I2S_RAM2_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_I2S_RAM2_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_I2S_RAM2_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_I2S_RAM2_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_I2S_RAM2_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_I2S_RAM2_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_I2S_RAM2_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_I2S_RAM2_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 7..4 : Priority register for RAM AHB slave 1 */ +#define AMLI_RAMPRI_I2S_RAM1_Pos (4UL) /*!< Position of RAM1 field. */ +#define AMLI_RAMPRI_I2S_RAM1_Msk (0xFUL << AMLI_RAMPRI_I2S_RAM1_Pos) /*!< Bit mask of RAM1 field. */ +#define AMLI_RAMPRI_I2S_RAM1_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_I2S_RAM1_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_I2S_RAM1_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_I2S_RAM1_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_I2S_RAM1_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_I2S_RAM1_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_I2S_RAM1_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_I2S_RAM1_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_I2S_RAM1_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_I2S_RAM1_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_I2S_RAM1_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_I2S_RAM1_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_I2S_RAM1_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_I2S_RAM1_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_I2S_RAM1_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_I2S_RAM1_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 3..0 : Priority register for RAM AHB slave 0 */ +#define AMLI_RAMPRI_I2S_RAM0_Pos (0UL) /*!< Position of RAM0 field. */ +#define AMLI_RAMPRI_I2S_RAM0_Msk (0xFUL << AMLI_RAMPRI_I2S_RAM0_Pos) /*!< Bit mask of RAM0 field. */ +#define AMLI_RAMPRI_I2S_RAM0_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_I2S_RAM0_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_I2S_RAM0_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_I2S_RAM0_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_I2S_RAM0_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_I2S_RAM0_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_I2S_RAM0_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_I2S_RAM0_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_I2S_RAM0_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_I2S_RAM0_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_I2S_RAM0_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_I2S_RAM0_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_I2S_RAM0_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_I2S_RAM0_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_I2S_RAM0_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_I2S_RAM0_Pri15 (15UL) /*!< Priority 15 */ + +/* Register: AMLI_RAMPRI_PDM */ +/* Description: AHB bus master priority register for PDM */ + +/* Bits 31..28 : Priority register for RAM AHB slave 7 */ +#define AMLI_RAMPRI_PDM_RAM7_Pos (28UL) /*!< Position of RAM7 field. */ +#define AMLI_RAMPRI_PDM_RAM7_Msk (0xFUL << AMLI_RAMPRI_PDM_RAM7_Pos) /*!< Bit mask of RAM7 field. */ +#define AMLI_RAMPRI_PDM_RAM7_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_PDM_RAM7_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_PDM_RAM7_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_PDM_RAM7_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_PDM_RAM7_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_PDM_RAM7_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_PDM_RAM7_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_PDM_RAM7_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_PDM_RAM7_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_PDM_RAM7_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_PDM_RAM7_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_PDM_RAM7_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_PDM_RAM7_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_PDM_RAM7_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_PDM_RAM7_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_PDM_RAM7_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 27..24 : Priority register for RAM AHB slave 6 */ +#define AMLI_RAMPRI_PDM_RAM6_Pos (24UL) /*!< Position of RAM6 field. */ +#define AMLI_RAMPRI_PDM_RAM6_Msk (0xFUL << AMLI_RAMPRI_PDM_RAM6_Pos) /*!< Bit mask of RAM6 field. */ +#define AMLI_RAMPRI_PDM_RAM6_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_PDM_RAM6_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_PDM_RAM6_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_PDM_RAM6_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_PDM_RAM6_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_PDM_RAM6_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_PDM_RAM6_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_PDM_RAM6_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_PDM_RAM6_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_PDM_RAM6_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_PDM_RAM6_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_PDM_RAM6_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_PDM_RAM6_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_PDM_RAM6_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_PDM_RAM6_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_PDM_RAM6_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 23..20 : Priority register for RAM AHB slave 5 */ +#define AMLI_RAMPRI_PDM_RAM5_Pos (20UL) /*!< Position of RAM5 field. */ +#define AMLI_RAMPRI_PDM_RAM5_Msk (0xFUL << AMLI_RAMPRI_PDM_RAM5_Pos) /*!< Bit mask of RAM5 field. */ +#define AMLI_RAMPRI_PDM_RAM5_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_PDM_RAM5_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_PDM_RAM5_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_PDM_RAM5_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_PDM_RAM5_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_PDM_RAM5_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_PDM_RAM5_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_PDM_RAM5_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_PDM_RAM5_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_PDM_RAM5_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_PDM_RAM5_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_PDM_RAM5_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_PDM_RAM5_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_PDM_RAM5_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_PDM_RAM5_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_PDM_RAM5_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 19..16 : Priority register for RAM AHB slave 4 */ +#define AMLI_RAMPRI_PDM_RAM4_Pos (16UL) /*!< Position of RAM4 field. */ +#define AMLI_RAMPRI_PDM_RAM4_Msk (0xFUL << AMLI_RAMPRI_PDM_RAM4_Pos) /*!< Bit mask of RAM4 field. */ +#define AMLI_RAMPRI_PDM_RAM4_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_PDM_RAM4_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_PDM_RAM4_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_PDM_RAM4_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_PDM_RAM4_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_PDM_RAM4_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_PDM_RAM4_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_PDM_RAM4_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_PDM_RAM4_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_PDM_RAM4_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_PDM_RAM4_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_PDM_RAM4_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_PDM_RAM4_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_PDM_RAM4_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_PDM_RAM4_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_PDM_RAM4_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 15..12 : Priority register for RAM AHB slave 3 */ +#define AMLI_RAMPRI_PDM_RAM3_Pos (12UL) /*!< Position of RAM3 field. */ +#define AMLI_RAMPRI_PDM_RAM3_Msk (0xFUL << AMLI_RAMPRI_PDM_RAM3_Pos) /*!< Bit mask of RAM3 field. */ +#define AMLI_RAMPRI_PDM_RAM3_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_PDM_RAM3_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_PDM_RAM3_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_PDM_RAM3_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_PDM_RAM3_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_PDM_RAM3_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_PDM_RAM3_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_PDM_RAM3_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_PDM_RAM3_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_PDM_RAM3_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_PDM_RAM3_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_PDM_RAM3_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_PDM_RAM3_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_PDM_RAM3_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_PDM_RAM3_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_PDM_RAM3_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 11..8 : Priority register for RAM AHB slave 2 */ +#define AMLI_RAMPRI_PDM_RAM2_Pos (8UL) /*!< Position of RAM2 field. */ +#define AMLI_RAMPRI_PDM_RAM2_Msk (0xFUL << AMLI_RAMPRI_PDM_RAM2_Pos) /*!< Bit mask of RAM2 field. */ +#define AMLI_RAMPRI_PDM_RAM2_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_PDM_RAM2_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_PDM_RAM2_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_PDM_RAM2_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_PDM_RAM2_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_PDM_RAM2_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_PDM_RAM2_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_PDM_RAM2_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_PDM_RAM2_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_PDM_RAM2_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_PDM_RAM2_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_PDM_RAM2_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_PDM_RAM2_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_PDM_RAM2_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_PDM_RAM2_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_PDM_RAM2_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 7..4 : Priority register for RAM AHB slave 1 */ +#define AMLI_RAMPRI_PDM_RAM1_Pos (4UL) /*!< Position of RAM1 field. */ +#define AMLI_RAMPRI_PDM_RAM1_Msk (0xFUL << AMLI_RAMPRI_PDM_RAM1_Pos) /*!< Bit mask of RAM1 field. */ +#define AMLI_RAMPRI_PDM_RAM1_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_PDM_RAM1_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_PDM_RAM1_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_PDM_RAM1_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_PDM_RAM1_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_PDM_RAM1_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_PDM_RAM1_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_PDM_RAM1_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_PDM_RAM1_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_PDM_RAM1_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_PDM_RAM1_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_PDM_RAM1_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_PDM_RAM1_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_PDM_RAM1_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_PDM_RAM1_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_PDM_RAM1_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 3..0 : Priority register for RAM AHB slave 0 */ +#define AMLI_RAMPRI_PDM_RAM0_Pos (0UL) /*!< Position of RAM0 field. */ +#define AMLI_RAMPRI_PDM_RAM0_Msk (0xFUL << AMLI_RAMPRI_PDM_RAM0_Pos) /*!< Bit mask of RAM0 field. */ +#define AMLI_RAMPRI_PDM_RAM0_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_PDM_RAM0_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_PDM_RAM0_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_PDM_RAM0_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_PDM_RAM0_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_PDM_RAM0_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_PDM_RAM0_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_PDM_RAM0_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_PDM_RAM0_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_PDM_RAM0_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_PDM_RAM0_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_PDM_RAM0_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_PDM_RAM0_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_PDM_RAM0_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_PDM_RAM0_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_PDM_RAM0_Pri15 (15UL) /*!< Priority 15 */ + +/* Register: AMLI_RAMPRI_PWM */ +/* Description: AHB bus master priority register for PWM0, PWM1 and PWM2 */ + +/* Bits 31..28 : Priority register for RAM AHB slave 7 */ +#define AMLI_RAMPRI_PWM_RAM7_Pos (28UL) /*!< Position of RAM7 field. */ +#define AMLI_RAMPRI_PWM_RAM7_Msk (0xFUL << AMLI_RAMPRI_PWM_RAM7_Pos) /*!< Bit mask of RAM7 field. */ +#define AMLI_RAMPRI_PWM_RAM7_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_PWM_RAM7_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_PWM_RAM7_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_PWM_RAM7_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_PWM_RAM7_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_PWM_RAM7_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_PWM_RAM7_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_PWM_RAM7_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_PWM_RAM7_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_PWM_RAM7_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_PWM_RAM7_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_PWM_RAM7_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_PWM_RAM7_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_PWM_RAM7_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_PWM_RAM7_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_PWM_RAM7_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 27..24 : Priority register for RAM AHB slave 6 */ +#define AMLI_RAMPRI_PWM_RAM6_Pos (24UL) /*!< Position of RAM6 field. */ +#define AMLI_RAMPRI_PWM_RAM6_Msk (0xFUL << AMLI_RAMPRI_PWM_RAM6_Pos) /*!< Bit mask of RAM6 field. */ +#define AMLI_RAMPRI_PWM_RAM6_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_PWM_RAM6_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_PWM_RAM6_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_PWM_RAM6_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_PWM_RAM6_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_PWM_RAM6_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_PWM_RAM6_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_PWM_RAM6_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_PWM_RAM6_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_PWM_RAM6_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_PWM_RAM6_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_PWM_RAM6_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_PWM_RAM6_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_PWM_RAM6_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_PWM_RAM6_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_PWM_RAM6_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 23..20 : Priority register for RAM AHB slave 5 */ +#define AMLI_RAMPRI_PWM_RAM5_Pos (20UL) /*!< Position of RAM5 field. */ +#define AMLI_RAMPRI_PWM_RAM5_Msk (0xFUL << AMLI_RAMPRI_PWM_RAM5_Pos) /*!< Bit mask of RAM5 field. */ +#define AMLI_RAMPRI_PWM_RAM5_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_PWM_RAM5_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_PWM_RAM5_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_PWM_RAM5_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_PWM_RAM5_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_PWM_RAM5_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_PWM_RAM5_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_PWM_RAM5_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_PWM_RAM5_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_PWM_RAM5_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_PWM_RAM5_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_PWM_RAM5_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_PWM_RAM5_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_PWM_RAM5_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_PWM_RAM5_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_PWM_RAM5_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 19..16 : Priority register for RAM AHB slave 4 */ +#define AMLI_RAMPRI_PWM_RAM4_Pos (16UL) /*!< Position of RAM4 field. */ +#define AMLI_RAMPRI_PWM_RAM4_Msk (0xFUL << AMLI_RAMPRI_PWM_RAM4_Pos) /*!< Bit mask of RAM4 field. */ +#define AMLI_RAMPRI_PWM_RAM4_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_PWM_RAM4_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_PWM_RAM4_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_PWM_RAM4_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_PWM_RAM4_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_PWM_RAM4_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_PWM_RAM4_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_PWM_RAM4_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_PWM_RAM4_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_PWM_RAM4_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_PWM_RAM4_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_PWM_RAM4_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_PWM_RAM4_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_PWM_RAM4_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_PWM_RAM4_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_PWM_RAM4_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 15..12 : Priority register for RAM AHB slave 3 */ +#define AMLI_RAMPRI_PWM_RAM3_Pos (12UL) /*!< Position of RAM3 field. */ +#define AMLI_RAMPRI_PWM_RAM3_Msk (0xFUL << AMLI_RAMPRI_PWM_RAM3_Pos) /*!< Bit mask of RAM3 field. */ +#define AMLI_RAMPRI_PWM_RAM3_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_PWM_RAM3_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_PWM_RAM3_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_PWM_RAM3_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_PWM_RAM3_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_PWM_RAM3_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_PWM_RAM3_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_PWM_RAM3_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_PWM_RAM3_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_PWM_RAM3_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_PWM_RAM3_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_PWM_RAM3_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_PWM_RAM3_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_PWM_RAM3_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_PWM_RAM3_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_PWM_RAM3_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 11..8 : Priority register for RAM AHB slave 2 */ +#define AMLI_RAMPRI_PWM_RAM2_Pos (8UL) /*!< Position of RAM2 field. */ +#define AMLI_RAMPRI_PWM_RAM2_Msk (0xFUL << AMLI_RAMPRI_PWM_RAM2_Pos) /*!< Bit mask of RAM2 field. */ +#define AMLI_RAMPRI_PWM_RAM2_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_PWM_RAM2_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_PWM_RAM2_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_PWM_RAM2_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_PWM_RAM2_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_PWM_RAM2_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_PWM_RAM2_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_PWM_RAM2_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_PWM_RAM2_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_PWM_RAM2_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_PWM_RAM2_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_PWM_RAM2_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_PWM_RAM2_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_PWM_RAM2_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_PWM_RAM2_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_PWM_RAM2_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 7..4 : Priority register for RAM AHB slave 1 */ +#define AMLI_RAMPRI_PWM_RAM1_Pos (4UL) /*!< Position of RAM1 field. */ +#define AMLI_RAMPRI_PWM_RAM1_Msk (0xFUL << AMLI_RAMPRI_PWM_RAM1_Pos) /*!< Bit mask of RAM1 field. */ +#define AMLI_RAMPRI_PWM_RAM1_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_PWM_RAM1_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_PWM_RAM1_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_PWM_RAM1_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_PWM_RAM1_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_PWM_RAM1_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_PWM_RAM1_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_PWM_RAM1_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_PWM_RAM1_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_PWM_RAM1_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_PWM_RAM1_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_PWM_RAM1_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_PWM_RAM1_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_PWM_RAM1_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_PWM_RAM1_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_PWM_RAM1_Pri15 (15UL) /*!< Priority 15 */ + +/* Bits 3..0 : Priority register for RAM AHB slave 0 */ +#define AMLI_RAMPRI_PWM_RAM0_Pos (0UL) /*!< Position of RAM0 field. */ +#define AMLI_RAMPRI_PWM_RAM0_Msk (0xFUL << AMLI_RAMPRI_PWM_RAM0_Pos) /*!< Bit mask of RAM0 field. */ +#define AMLI_RAMPRI_PWM_RAM0_Pri0 (0UL) /*!< Priority 0 */ +#define AMLI_RAMPRI_PWM_RAM0_Pri1 (1UL) /*!< Priority 1 */ +#define AMLI_RAMPRI_PWM_RAM0_Pri2 (2UL) /*!< Priority 2 */ +#define AMLI_RAMPRI_PWM_RAM0_Pri3 (3UL) /*!< Priority 3 */ +#define AMLI_RAMPRI_PWM_RAM0_Pri4 (4UL) /*!< Priority 4 */ +#define AMLI_RAMPRI_PWM_RAM0_Pri5 (5UL) /*!< Priority 5 */ +#define AMLI_RAMPRI_PWM_RAM0_Pri6 (6UL) /*!< Priority 6 */ +#define AMLI_RAMPRI_PWM_RAM0_Pri7 (7UL) /*!< Priority 7 */ +#define AMLI_RAMPRI_PWM_RAM0_Pri8 (8UL) /*!< Priority 8 */ +#define AMLI_RAMPRI_PWM_RAM0_Pri9 (9UL) /*!< Priority 9 */ +#define AMLI_RAMPRI_PWM_RAM0_Pri10 (10UL) /*!< Priority 10 */ +#define AMLI_RAMPRI_PWM_RAM0_Pri11 (11UL) /*!< Priority 11 */ +#define AMLI_RAMPRI_PWM_RAM0_Pri12 (12UL) /*!< Priority 12 */ +#define AMLI_RAMPRI_PWM_RAM0_Pri13 (13UL) /*!< Priority 13 */ +#define AMLI_RAMPRI_PWM_RAM0_Pri14 (14UL) /*!< Priority 14 */ +#define AMLI_RAMPRI_PWM_RAM0_Pri15 (15UL) /*!< Priority 15 */ + + +/* Peripheral: BPROT */ +/* Description: Block Protect */ + +/* Register: BPROT_CONFIG0 */ +/* Description: Block protect configuration register 0 */ + +/* Bit 31 : Enable protection for region 31. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION31_Pos (31UL) /*!< Position of REGION31 field. */ +#define BPROT_CONFIG0_REGION31_Msk (0x1UL << BPROT_CONFIG0_REGION31_Pos) /*!< Bit mask of REGION31 field. */ +#define BPROT_CONFIG0_REGION31_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION31_Enabled (1UL) /*!< Protection enable */ + +/* Bit 30 : Enable protection for region 30. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION30_Pos (30UL) /*!< Position of REGION30 field. */ +#define BPROT_CONFIG0_REGION30_Msk (0x1UL << BPROT_CONFIG0_REGION30_Pos) /*!< Bit mask of REGION30 field. */ +#define BPROT_CONFIG0_REGION30_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION30_Enabled (1UL) /*!< Protection enable */ + +/* Bit 29 : Enable protection for region 29. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION29_Pos (29UL) /*!< Position of REGION29 field. */ +#define BPROT_CONFIG0_REGION29_Msk (0x1UL << BPROT_CONFIG0_REGION29_Pos) /*!< Bit mask of REGION29 field. */ +#define BPROT_CONFIG0_REGION29_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION29_Enabled (1UL) /*!< Protection enable */ + +/* Bit 28 : Enable protection for region 28. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION28_Pos (28UL) /*!< Position of REGION28 field. */ +#define BPROT_CONFIG0_REGION28_Msk (0x1UL << BPROT_CONFIG0_REGION28_Pos) /*!< Bit mask of REGION28 field. */ +#define BPROT_CONFIG0_REGION28_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION28_Enabled (1UL) /*!< Protection enable */ + +/* Bit 27 : Enable protection for region 27. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION27_Pos (27UL) /*!< Position of REGION27 field. */ +#define BPROT_CONFIG0_REGION27_Msk (0x1UL << BPROT_CONFIG0_REGION27_Pos) /*!< Bit mask of REGION27 field. */ +#define BPROT_CONFIG0_REGION27_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION27_Enabled (1UL) /*!< Protection enable */ + +/* Bit 26 : Enable protection for region 26. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION26_Pos (26UL) /*!< Position of REGION26 field. */ +#define BPROT_CONFIG0_REGION26_Msk (0x1UL << BPROT_CONFIG0_REGION26_Pos) /*!< Bit mask of REGION26 field. */ +#define BPROT_CONFIG0_REGION26_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION26_Enabled (1UL) /*!< Protection enable */ + +/* Bit 25 : Enable protection for region 25. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION25_Pos (25UL) /*!< Position of REGION25 field. */ +#define BPROT_CONFIG0_REGION25_Msk (0x1UL << BPROT_CONFIG0_REGION25_Pos) /*!< Bit mask of REGION25 field. */ +#define BPROT_CONFIG0_REGION25_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION25_Enabled (1UL) /*!< Protection enable */ + +/* Bit 24 : Enable protection for region 24. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION24_Pos (24UL) /*!< Position of REGION24 field. */ +#define BPROT_CONFIG0_REGION24_Msk (0x1UL << BPROT_CONFIG0_REGION24_Pos) /*!< Bit mask of REGION24 field. */ +#define BPROT_CONFIG0_REGION24_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION24_Enabled (1UL) /*!< Protection enable */ + +/* Bit 23 : Enable protection for region 23. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION23_Pos (23UL) /*!< Position of REGION23 field. */ +#define BPROT_CONFIG0_REGION23_Msk (0x1UL << BPROT_CONFIG0_REGION23_Pos) /*!< Bit mask of REGION23 field. */ +#define BPROT_CONFIG0_REGION23_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION23_Enabled (1UL) /*!< Protection enable */ + +/* Bit 22 : Enable protection for region 22. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION22_Pos (22UL) /*!< Position of REGION22 field. */ +#define BPROT_CONFIG0_REGION22_Msk (0x1UL << BPROT_CONFIG0_REGION22_Pos) /*!< Bit mask of REGION22 field. */ +#define BPROT_CONFIG0_REGION22_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION22_Enabled (1UL) /*!< Protection enable */ + +/* Bit 21 : Enable protection for region 21. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION21_Pos (21UL) /*!< Position of REGION21 field. */ +#define BPROT_CONFIG0_REGION21_Msk (0x1UL << BPROT_CONFIG0_REGION21_Pos) /*!< Bit mask of REGION21 field. */ +#define BPROT_CONFIG0_REGION21_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION21_Enabled (1UL) /*!< Protection enable */ + +/* Bit 20 : Enable protection for region 20. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION20_Pos (20UL) /*!< Position of REGION20 field. */ +#define BPROT_CONFIG0_REGION20_Msk (0x1UL << BPROT_CONFIG0_REGION20_Pos) /*!< Bit mask of REGION20 field. */ +#define BPROT_CONFIG0_REGION20_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION20_Enabled (1UL) /*!< Protection enable */ + +/* Bit 19 : Enable protection for region 19. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION19_Pos (19UL) /*!< Position of REGION19 field. */ +#define BPROT_CONFIG0_REGION19_Msk (0x1UL << BPROT_CONFIG0_REGION19_Pos) /*!< Bit mask of REGION19 field. */ +#define BPROT_CONFIG0_REGION19_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION19_Enabled (1UL) /*!< Protection enable */ + +/* Bit 18 : Enable protection for region 18. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION18_Pos (18UL) /*!< Position of REGION18 field. */ +#define BPROT_CONFIG0_REGION18_Msk (0x1UL << BPROT_CONFIG0_REGION18_Pos) /*!< Bit mask of REGION18 field. */ +#define BPROT_CONFIG0_REGION18_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION18_Enabled (1UL) /*!< Protection enable */ + +/* Bit 17 : Enable protection for region 17. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION17_Pos (17UL) /*!< Position of REGION17 field. */ +#define BPROT_CONFIG0_REGION17_Msk (0x1UL << BPROT_CONFIG0_REGION17_Pos) /*!< Bit mask of REGION17 field. */ +#define BPROT_CONFIG0_REGION17_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION17_Enabled (1UL) /*!< Protection enable */ + +/* Bit 16 : Enable protection for region 16. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION16_Pos (16UL) /*!< Position of REGION16 field. */ +#define BPROT_CONFIG0_REGION16_Msk (0x1UL << BPROT_CONFIG0_REGION16_Pos) /*!< Bit mask of REGION16 field. */ +#define BPROT_CONFIG0_REGION16_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION16_Enabled (1UL) /*!< Protection enable */ + +/* Bit 15 : Enable protection for region 15. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION15_Pos (15UL) /*!< Position of REGION15 field. */ +#define BPROT_CONFIG0_REGION15_Msk (0x1UL << BPROT_CONFIG0_REGION15_Pos) /*!< Bit mask of REGION15 field. */ +#define BPROT_CONFIG0_REGION15_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION15_Enabled (1UL) /*!< Protection enable */ + +/* Bit 14 : Enable protection for region 14. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION14_Pos (14UL) /*!< Position of REGION14 field. */ +#define BPROT_CONFIG0_REGION14_Msk (0x1UL << BPROT_CONFIG0_REGION14_Pos) /*!< Bit mask of REGION14 field. */ +#define BPROT_CONFIG0_REGION14_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION14_Enabled (1UL) /*!< Protection enable */ + +/* Bit 13 : Enable protection for region 13. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION13_Pos (13UL) /*!< Position of REGION13 field. */ +#define BPROT_CONFIG0_REGION13_Msk (0x1UL << BPROT_CONFIG0_REGION13_Pos) /*!< Bit mask of REGION13 field. */ +#define BPROT_CONFIG0_REGION13_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION13_Enabled (1UL) /*!< Protection enable */ + +/* Bit 12 : Enable protection for region 12. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION12_Pos (12UL) /*!< Position of REGION12 field. */ +#define BPROT_CONFIG0_REGION12_Msk (0x1UL << BPROT_CONFIG0_REGION12_Pos) /*!< Bit mask of REGION12 field. */ +#define BPROT_CONFIG0_REGION12_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION12_Enabled (1UL) /*!< Protection enable */ + +/* Bit 11 : Enable protection for region 11. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION11_Pos (11UL) /*!< Position of REGION11 field. */ +#define BPROT_CONFIG0_REGION11_Msk (0x1UL << BPROT_CONFIG0_REGION11_Pos) /*!< Bit mask of REGION11 field. */ +#define BPROT_CONFIG0_REGION11_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION11_Enabled (1UL) /*!< Protection enable */ + +/* Bit 10 : Enable protection for region 10. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION10_Pos (10UL) /*!< Position of REGION10 field. */ +#define BPROT_CONFIG0_REGION10_Msk (0x1UL << BPROT_CONFIG0_REGION10_Pos) /*!< Bit mask of REGION10 field. */ +#define BPROT_CONFIG0_REGION10_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION10_Enabled (1UL) /*!< Protection enable */ + +/* Bit 9 : Enable protection for region 9. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION9_Pos (9UL) /*!< Position of REGION9 field. */ +#define BPROT_CONFIG0_REGION9_Msk (0x1UL << BPROT_CONFIG0_REGION9_Pos) /*!< Bit mask of REGION9 field. */ +#define BPROT_CONFIG0_REGION9_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION9_Enabled (1UL) /*!< Protection enable */ + +/* Bit 8 : Enable protection for region 8. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION8_Pos (8UL) /*!< Position of REGION8 field. */ +#define BPROT_CONFIG0_REGION8_Msk (0x1UL << BPROT_CONFIG0_REGION8_Pos) /*!< Bit mask of REGION8 field. */ +#define BPROT_CONFIG0_REGION8_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION8_Enabled (1UL) /*!< Protection enable */ + +/* Bit 7 : Enable protection for region 7. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION7_Pos (7UL) /*!< Position of REGION7 field. */ +#define BPROT_CONFIG0_REGION7_Msk (0x1UL << BPROT_CONFIG0_REGION7_Pos) /*!< Bit mask of REGION7 field. */ +#define BPROT_CONFIG0_REGION7_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION7_Enabled (1UL) /*!< Protection enable */ + +/* Bit 6 : Enable protection for region 6. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION6_Pos (6UL) /*!< Position of REGION6 field. */ +#define BPROT_CONFIG0_REGION6_Msk (0x1UL << BPROT_CONFIG0_REGION6_Pos) /*!< Bit mask of REGION6 field. */ +#define BPROT_CONFIG0_REGION6_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION6_Enabled (1UL) /*!< Protection enable */ + +/* Bit 5 : Enable protection for region 5. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION5_Pos (5UL) /*!< Position of REGION5 field. */ +#define BPROT_CONFIG0_REGION5_Msk (0x1UL << BPROT_CONFIG0_REGION5_Pos) /*!< Bit mask of REGION5 field. */ +#define BPROT_CONFIG0_REGION5_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION5_Enabled (1UL) /*!< Protection enable */ + +/* Bit 4 : Enable protection for region 4. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION4_Pos (4UL) /*!< Position of REGION4 field. */ +#define BPROT_CONFIG0_REGION4_Msk (0x1UL << BPROT_CONFIG0_REGION4_Pos) /*!< Bit mask of REGION4 field. */ +#define BPROT_CONFIG0_REGION4_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION4_Enabled (1UL) /*!< Protection enable */ + +/* Bit 3 : Enable protection for region 3. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION3_Pos (3UL) /*!< Position of REGION3 field. */ +#define BPROT_CONFIG0_REGION3_Msk (0x1UL << BPROT_CONFIG0_REGION3_Pos) /*!< Bit mask of REGION3 field. */ +#define BPROT_CONFIG0_REGION3_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION3_Enabled (1UL) /*!< Protection enable */ + +/* Bit 2 : Enable protection for region 2. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION2_Pos (2UL) /*!< Position of REGION2 field. */ +#define BPROT_CONFIG0_REGION2_Msk (0x1UL << BPROT_CONFIG0_REGION2_Pos) /*!< Bit mask of REGION2 field. */ +#define BPROT_CONFIG0_REGION2_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION2_Enabled (1UL) /*!< Protection enable */ + +/* Bit 1 : Enable protection for region 1. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION1_Pos (1UL) /*!< Position of REGION1 field. */ +#define BPROT_CONFIG0_REGION1_Msk (0x1UL << BPROT_CONFIG0_REGION1_Pos) /*!< Bit mask of REGION1 field. */ +#define BPROT_CONFIG0_REGION1_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION1_Enabled (1UL) /*!< Protection enable */ + +/* Bit 0 : Enable protection for region 0. Write '0' has no effect. */ +#define BPROT_CONFIG0_REGION0_Pos (0UL) /*!< Position of REGION0 field. */ +#define BPROT_CONFIG0_REGION0_Msk (0x1UL << BPROT_CONFIG0_REGION0_Pos) /*!< Bit mask of REGION0 field. */ +#define BPROT_CONFIG0_REGION0_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG0_REGION0_Enabled (1UL) /*!< Protection enable */ + +/* Register: BPROT_CONFIG1 */ +/* Description: Block protect configuration register 1 */ + +/* Bit 31 : Enable protection for region 63. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION63_Pos (31UL) /*!< Position of REGION63 field. */ +#define BPROT_CONFIG1_REGION63_Msk (0x1UL << BPROT_CONFIG1_REGION63_Pos) /*!< Bit mask of REGION63 field. */ +#define BPROT_CONFIG1_REGION63_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION63_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 30 : Enable protection for region 62. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION62_Pos (30UL) /*!< Position of REGION62 field. */ +#define BPROT_CONFIG1_REGION62_Msk (0x1UL << BPROT_CONFIG1_REGION62_Pos) /*!< Bit mask of REGION62 field. */ +#define BPROT_CONFIG1_REGION62_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION62_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 29 : Enable protection for region 61. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION61_Pos (29UL) /*!< Position of REGION61 field. */ +#define BPROT_CONFIG1_REGION61_Msk (0x1UL << BPROT_CONFIG1_REGION61_Pos) /*!< Bit mask of REGION61 field. */ +#define BPROT_CONFIG1_REGION61_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION61_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 28 : Enable protection for region 60. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION60_Pos (28UL) /*!< Position of REGION60 field. */ +#define BPROT_CONFIG1_REGION60_Msk (0x1UL << BPROT_CONFIG1_REGION60_Pos) /*!< Bit mask of REGION60 field. */ +#define BPROT_CONFIG1_REGION60_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION60_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 27 : Enable protection for region 59. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION59_Pos (27UL) /*!< Position of REGION59 field. */ +#define BPROT_CONFIG1_REGION59_Msk (0x1UL << BPROT_CONFIG1_REGION59_Pos) /*!< Bit mask of REGION59 field. */ +#define BPROT_CONFIG1_REGION59_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION59_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 26 : Enable protection for region 58. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION58_Pos (26UL) /*!< Position of REGION58 field. */ +#define BPROT_CONFIG1_REGION58_Msk (0x1UL << BPROT_CONFIG1_REGION58_Pos) /*!< Bit mask of REGION58 field. */ +#define BPROT_CONFIG1_REGION58_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION58_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 25 : Enable protection for region 57. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION57_Pos (25UL) /*!< Position of REGION57 field. */ +#define BPROT_CONFIG1_REGION57_Msk (0x1UL << BPROT_CONFIG1_REGION57_Pos) /*!< Bit mask of REGION57 field. */ +#define BPROT_CONFIG1_REGION57_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION57_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 24 : Enable protection for region 56. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION56_Pos (24UL) /*!< Position of REGION56 field. */ +#define BPROT_CONFIG1_REGION56_Msk (0x1UL << BPROT_CONFIG1_REGION56_Pos) /*!< Bit mask of REGION56 field. */ +#define BPROT_CONFIG1_REGION56_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION56_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 23 : Enable protection for region 55. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION55_Pos (23UL) /*!< Position of REGION55 field. */ +#define BPROT_CONFIG1_REGION55_Msk (0x1UL << BPROT_CONFIG1_REGION55_Pos) /*!< Bit mask of REGION55 field. */ +#define BPROT_CONFIG1_REGION55_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION55_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 22 : Enable protection for region 54. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION54_Pos (22UL) /*!< Position of REGION54 field. */ +#define BPROT_CONFIG1_REGION54_Msk (0x1UL << BPROT_CONFIG1_REGION54_Pos) /*!< Bit mask of REGION54 field. */ +#define BPROT_CONFIG1_REGION54_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION54_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 21 : Enable protection for region 53. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION53_Pos (21UL) /*!< Position of REGION53 field. */ +#define BPROT_CONFIG1_REGION53_Msk (0x1UL << BPROT_CONFIG1_REGION53_Pos) /*!< Bit mask of REGION53 field. */ +#define BPROT_CONFIG1_REGION53_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION53_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 20 : Enable protection for region 52. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION52_Pos (20UL) /*!< Position of REGION52 field. */ +#define BPROT_CONFIG1_REGION52_Msk (0x1UL << BPROT_CONFIG1_REGION52_Pos) /*!< Bit mask of REGION52 field. */ +#define BPROT_CONFIG1_REGION52_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION52_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 19 : Enable protection for region 51. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION51_Pos (19UL) /*!< Position of REGION51 field. */ +#define BPROT_CONFIG1_REGION51_Msk (0x1UL << BPROT_CONFIG1_REGION51_Pos) /*!< Bit mask of REGION51 field. */ +#define BPROT_CONFIG1_REGION51_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION51_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 18 : Enable protection for region 50. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION50_Pos (18UL) /*!< Position of REGION50 field. */ +#define BPROT_CONFIG1_REGION50_Msk (0x1UL << BPROT_CONFIG1_REGION50_Pos) /*!< Bit mask of REGION50 field. */ +#define BPROT_CONFIG1_REGION50_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION50_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 17 : Enable protection for region 49. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION49_Pos (17UL) /*!< Position of REGION49 field. */ +#define BPROT_CONFIG1_REGION49_Msk (0x1UL << BPROT_CONFIG1_REGION49_Pos) /*!< Bit mask of REGION49 field. */ +#define BPROT_CONFIG1_REGION49_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION49_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 16 : Enable protection for region 48. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION48_Pos (16UL) /*!< Position of REGION48 field. */ +#define BPROT_CONFIG1_REGION48_Msk (0x1UL << BPROT_CONFIG1_REGION48_Pos) /*!< Bit mask of REGION48 field. */ +#define BPROT_CONFIG1_REGION48_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION48_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 15 : Enable protection for region 47. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION47_Pos (15UL) /*!< Position of REGION47 field. */ +#define BPROT_CONFIG1_REGION47_Msk (0x1UL << BPROT_CONFIG1_REGION47_Pos) /*!< Bit mask of REGION47 field. */ +#define BPROT_CONFIG1_REGION47_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION47_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 14 : Enable protection for region 46. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION46_Pos (14UL) /*!< Position of REGION46 field. */ +#define BPROT_CONFIG1_REGION46_Msk (0x1UL << BPROT_CONFIG1_REGION46_Pos) /*!< Bit mask of REGION46 field. */ +#define BPROT_CONFIG1_REGION46_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION46_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 13 : Enable protection for region 45. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION45_Pos (13UL) /*!< Position of REGION45 field. */ +#define BPROT_CONFIG1_REGION45_Msk (0x1UL << BPROT_CONFIG1_REGION45_Pos) /*!< Bit mask of REGION45 field. */ +#define BPROT_CONFIG1_REGION45_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION45_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 12 : Enable protection for region 44. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION44_Pos (12UL) /*!< Position of REGION44 field. */ +#define BPROT_CONFIG1_REGION44_Msk (0x1UL << BPROT_CONFIG1_REGION44_Pos) /*!< Bit mask of REGION44 field. */ +#define BPROT_CONFIG1_REGION44_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION44_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 11 : Enable protection for region 43. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION43_Pos (11UL) /*!< Position of REGION43 field. */ +#define BPROT_CONFIG1_REGION43_Msk (0x1UL << BPROT_CONFIG1_REGION43_Pos) /*!< Bit mask of REGION43 field. */ +#define BPROT_CONFIG1_REGION43_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION43_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 10 : Enable protection for region 42. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION42_Pos (10UL) /*!< Position of REGION42 field. */ +#define BPROT_CONFIG1_REGION42_Msk (0x1UL << BPROT_CONFIG1_REGION42_Pos) /*!< Bit mask of REGION42 field. */ +#define BPROT_CONFIG1_REGION42_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION42_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 9 : Enable protection for region 41. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION41_Pos (9UL) /*!< Position of REGION41 field. */ +#define BPROT_CONFIG1_REGION41_Msk (0x1UL << BPROT_CONFIG1_REGION41_Pos) /*!< Bit mask of REGION41 field. */ +#define BPROT_CONFIG1_REGION41_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION41_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 8 : Enable protection for region 40. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION40_Pos (8UL) /*!< Position of REGION40 field. */ +#define BPROT_CONFIG1_REGION40_Msk (0x1UL << BPROT_CONFIG1_REGION40_Pos) /*!< Bit mask of REGION40 field. */ +#define BPROT_CONFIG1_REGION40_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION40_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 7 : Enable protection for region 39. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION39_Pos (7UL) /*!< Position of REGION39 field. */ +#define BPROT_CONFIG1_REGION39_Msk (0x1UL << BPROT_CONFIG1_REGION39_Pos) /*!< Bit mask of REGION39 field. */ +#define BPROT_CONFIG1_REGION39_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION39_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 6 : Enable protection for region 38. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION38_Pos (6UL) /*!< Position of REGION38 field. */ +#define BPROT_CONFIG1_REGION38_Msk (0x1UL << BPROT_CONFIG1_REGION38_Pos) /*!< Bit mask of REGION38 field. */ +#define BPROT_CONFIG1_REGION38_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION38_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 5 : Enable protection for region 37. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION37_Pos (5UL) /*!< Position of REGION37 field. */ +#define BPROT_CONFIG1_REGION37_Msk (0x1UL << BPROT_CONFIG1_REGION37_Pos) /*!< Bit mask of REGION37 field. */ +#define BPROT_CONFIG1_REGION37_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION37_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 4 : Enable protection for region 36. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION36_Pos (4UL) /*!< Position of REGION36 field. */ +#define BPROT_CONFIG1_REGION36_Msk (0x1UL << BPROT_CONFIG1_REGION36_Pos) /*!< Bit mask of REGION36 field. */ +#define BPROT_CONFIG1_REGION36_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION36_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 3 : Enable protection for region 35. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION35_Pos (3UL) /*!< Position of REGION35 field. */ +#define BPROT_CONFIG1_REGION35_Msk (0x1UL << BPROT_CONFIG1_REGION35_Pos) /*!< Bit mask of REGION35 field. */ +#define BPROT_CONFIG1_REGION35_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION35_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 2 : Enable protection for region 34. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION34_Pos (2UL) /*!< Position of REGION34 field. */ +#define BPROT_CONFIG1_REGION34_Msk (0x1UL << BPROT_CONFIG1_REGION34_Pos) /*!< Bit mask of REGION34 field. */ +#define BPROT_CONFIG1_REGION34_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION34_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 1 : Enable protection for region 33. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION33_Pos (1UL) /*!< Position of REGION33 field. */ +#define BPROT_CONFIG1_REGION33_Msk (0x1UL << BPROT_CONFIG1_REGION33_Pos) /*!< Bit mask of REGION33 field. */ +#define BPROT_CONFIG1_REGION33_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION33_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 0 : Enable protection for region 32. Write '0' has no effect. */ +#define BPROT_CONFIG1_REGION32_Pos (0UL) /*!< Position of REGION32 field. */ +#define BPROT_CONFIG1_REGION32_Msk (0x1UL << BPROT_CONFIG1_REGION32_Pos) /*!< Bit mask of REGION32 field. */ +#define BPROT_CONFIG1_REGION32_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG1_REGION32_Enabled (1UL) /*!< Protection enabled */ + +/* Register: BPROT_DISABLEINDEBUG */ +/* Description: Disable protection mechanism in debug interface mode */ + +/* Bit 0 : Disable the protection mechanism for NVM regions while in debug interface mode. This register will only disable the protection mechanism if the device is in debug interface mode. */ +#define BPROT_DISABLEINDEBUG_DISABLEINDEBUG_Pos (0UL) /*!< Position of DISABLEINDEBUG field. */ +#define BPROT_DISABLEINDEBUG_DISABLEINDEBUG_Msk (0x1UL << BPROT_DISABLEINDEBUG_DISABLEINDEBUG_Pos) /*!< Bit mask of DISABLEINDEBUG field. */ +#define BPROT_DISABLEINDEBUG_DISABLEINDEBUG_Enabled (0UL) /*!< Enable in debug */ +#define BPROT_DISABLEINDEBUG_DISABLEINDEBUG_Disabled (1UL) /*!< Disable in debug */ + +/* Register: BPROT_CONFIG2 */ +/* Description: Block protect configuration register 2 */ + +/* Bit 31 : Enable protection for region 95. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION95_Pos (31UL) /*!< Position of REGION95 field. */ +#define BPROT_CONFIG2_REGION95_Msk (0x1UL << BPROT_CONFIG2_REGION95_Pos) /*!< Bit mask of REGION95 field. */ +#define BPROT_CONFIG2_REGION95_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION95_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 30 : Enable protection for region 94. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION94_Pos (30UL) /*!< Position of REGION94 field. */ +#define BPROT_CONFIG2_REGION94_Msk (0x1UL << BPROT_CONFIG2_REGION94_Pos) /*!< Bit mask of REGION94 field. */ +#define BPROT_CONFIG2_REGION94_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION94_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 29 : Enable protection for region 93. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION93_Pos (29UL) /*!< Position of REGION93 field. */ +#define BPROT_CONFIG2_REGION93_Msk (0x1UL << BPROT_CONFIG2_REGION93_Pos) /*!< Bit mask of REGION93 field. */ +#define BPROT_CONFIG2_REGION93_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION93_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 28 : Enable protection for region 92. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION92_Pos (28UL) /*!< Position of REGION92 field. */ +#define BPROT_CONFIG2_REGION92_Msk (0x1UL << BPROT_CONFIG2_REGION92_Pos) /*!< Bit mask of REGION92 field. */ +#define BPROT_CONFIG2_REGION92_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION92_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 27 : Enable protection for region 91. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION91_Pos (27UL) /*!< Position of REGION91 field. */ +#define BPROT_CONFIG2_REGION91_Msk (0x1UL << BPROT_CONFIG2_REGION91_Pos) /*!< Bit mask of REGION91 field. */ +#define BPROT_CONFIG2_REGION91_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION91_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 26 : Enable protection for region 90. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION90_Pos (26UL) /*!< Position of REGION90 field. */ +#define BPROT_CONFIG2_REGION90_Msk (0x1UL << BPROT_CONFIG2_REGION90_Pos) /*!< Bit mask of REGION90 field. */ +#define BPROT_CONFIG2_REGION90_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION90_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 25 : Enable protection for region 89. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION89_Pos (25UL) /*!< Position of REGION89 field. */ +#define BPROT_CONFIG2_REGION89_Msk (0x1UL << BPROT_CONFIG2_REGION89_Pos) /*!< Bit mask of REGION89 field. */ +#define BPROT_CONFIG2_REGION89_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION89_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 24 : Enable protection for region 88. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION88_Pos (24UL) /*!< Position of REGION88 field. */ +#define BPROT_CONFIG2_REGION88_Msk (0x1UL << BPROT_CONFIG2_REGION88_Pos) /*!< Bit mask of REGION88 field. */ +#define BPROT_CONFIG2_REGION88_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION88_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 23 : Enable protection for region 87. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION87_Pos (23UL) /*!< Position of REGION87 field. */ +#define BPROT_CONFIG2_REGION87_Msk (0x1UL << BPROT_CONFIG2_REGION87_Pos) /*!< Bit mask of REGION87 field. */ +#define BPROT_CONFIG2_REGION87_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION87_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 22 : Enable protection for region 86. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION86_Pos (22UL) /*!< Position of REGION86 field. */ +#define BPROT_CONFIG2_REGION86_Msk (0x1UL << BPROT_CONFIG2_REGION86_Pos) /*!< Bit mask of REGION86 field. */ +#define BPROT_CONFIG2_REGION86_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION86_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 21 : Enable protection for region 85. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION85_Pos (21UL) /*!< Position of REGION85 field. */ +#define BPROT_CONFIG2_REGION85_Msk (0x1UL << BPROT_CONFIG2_REGION85_Pos) /*!< Bit mask of REGION85 field. */ +#define BPROT_CONFIG2_REGION85_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION85_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 20 : Enable protection for region 84. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION84_Pos (20UL) /*!< Position of REGION84 field. */ +#define BPROT_CONFIG2_REGION84_Msk (0x1UL << BPROT_CONFIG2_REGION84_Pos) /*!< Bit mask of REGION84 field. */ +#define BPROT_CONFIG2_REGION84_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION84_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 19 : Enable protection for region 83. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION83_Pos (19UL) /*!< Position of REGION83 field. */ +#define BPROT_CONFIG2_REGION83_Msk (0x1UL << BPROT_CONFIG2_REGION83_Pos) /*!< Bit mask of REGION83 field. */ +#define BPROT_CONFIG2_REGION83_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION83_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 18 : Enable protection for region 82. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION82_Pos (18UL) /*!< Position of REGION82 field. */ +#define BPROT_CONFIG2_REGION82_Msk (0x1UL << BPROT_CONFIG2_REGION82_Pos) /*!< Bit mask of REGION82 field. */ +#define BPROT_CONFIG2_REGION82_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION82_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 17 : Enable protection for region 81. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION81_Pos (17UL) /*!< Position of REGION81 field. */ +#define BPROT_CONFIG2_REGION81_Msk (0x1UL << BPROT_CONFIG2_REGION81_Pos) /*!< Bit mask of REGION81 field. */ +#define BPROT_CONFIG2_REGION81_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION81_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 16 : Enable protection for region 80. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION80_Pos (16UL) /*!< Position of REGION80 field. */ +#define BPROT_CONFIG2_REGION80_Msk (0x1UL << BPROT_CONFIG2_REGION80_Pos) /*!< Bit mask of REGION80 field. */ +#define BPROT_CONFIG2_REGION80_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION80_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 15 : Enable protection for region 79. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION79_Pos (15UL) /*!< Position of REGION79 field. */ +#define BPROT_CONFIG2_REGION79_Msk (0x1UL << BPROT_CONFIG2_REGION79_Pos) /*!< Bit mask of REGION79 field. */ +#define BPROT_CONFIG2_REGION79_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION79_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 14 : Enable protection for region 78. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION78_Pos (14UL) /*!< Position of REGION78 field. */ +#define BPROT_CONFIG2_REGION78_Msk (0x1UL << BPROT_CONFIG2_REGION78_Pos) /*!< Bit mask of REGION78 field. */ +#define BPROT_CONFIG2_REGION78_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION78_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 13 : Enable protection for region 77. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION77_Pos (13UL) /*!< Position of REGION77 field. */ +#define BPROT_CONFIG2_REGION77_Msk (0x1UL << BPROT_CONFIG2_REGION77_Pos) /*!< Bit mask of REGION77 field. */ +#define BPROT_CONFIG2_REGION77_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION77_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 12 : Enable protection for region 76. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION76_Pos (12UL) /*!< Position of REGION76 field. */ +#define BPROT_CONFIG2_REGION76_Msk (0x1UL << BPROT_CONFIG2_REGION76_Pos) /*!< Bit mask of REGION76 field. */ +#define BPROT_CONFIG2_REGION76_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION76_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 11 : Enable protection for region 75. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION75_Pos (11UL) /*!< Position of REGION75 field. */ +#define BPROT_CONFIG2_REGION75_Msk (0x1UL << BPROT_CONFIG2_REGION75_Pos) /*!< Bit mask of REGION75 field. */ +#define BPROT_CONFIG2_REGION75_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION75_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 10 : Enable protection for region 74. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION74_Pos (10UL) /*!< Position of REGION74 field. */ +#define BPROT_CONFIG2_REGION74_Msk (0x1UL << BPROT_CONFIG2_REGION74_Pos) /*!< Bit mask of REGION74 field. */ +#define BPROT_CONFIG2_REGION74_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION74_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 9 : Enable protection for region 73. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION73_Pos (9UL) /*!< Position of REGION73 field. */ +#define BPROT_CONFIG2_REGION73_Msk (0x1UL << BPROT_CONFIG2_REGION73_Pos) /*!< Bit mask of REGION73 field. */ +#define BPROT_CONFIG2_REGION73_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION73_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 8 : Enable protection for region 72. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION72_Pos (8UL) /*!< Position of REGION72 field. */ +#define BPROT_CONFIG2_REGION72_Msk (0x1UL << BPROT_CONFIG2_REGION72_Pos) /*!< Bit mask of REGION72 field. */ +#define BPROT_CONFIG2_REGION72_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION72_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 7 : Enable protection for region 71. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION71_Pos (7UL) /*!< Position of REGION71 field. */ +#define BPROT_CONFIG2_REGION71_Msk (0x1UL << BPROT_CONFIG2_REGION71_Pos) /*!< Bit mask of REGION71 field. */ +#define BPROT_CONFIG2_REGION71_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION71_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 6 : Enable protection for region 70. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION70_Pos (6UL) /*!< Position of REGION70 field. */ +#define BPROT_CONFIG2_REGION70_Msk (0x1UL << BPROT_CONFIG2_REGION70_Pos) /*!< Bit mask of REGION70 field. */ +#define BPROT_CONFIG2_REGION70_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION70_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 5 : Enable protection for region 69. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION69_Pos (5UL) /*!< Position of REGION69 field. */ +#define BPROT_CONFIG2_REGION69_Msk (0x1UL << BPROT_CONFIG2_REGION69_Pos) /*!< Bit mask of REGION69 field. */ +#define BPROT_CONFIG2_REGION69_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION69_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 4 : Enable protection for region 68. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION68_Pos (4UL) /*!< Position of REGION68 field. */ +#define BPROT_CONFIG2_REGION68_Msk (0x1UL << BPROT_CONFIG2_REGION68_Pos) /*!< Bit mask of REGION68 field. */ +#define BPROT_CONFIG2_REGION68_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION68_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 3 : Enable protection for region 67. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION67_Pos (3UL) /*!< Position of REGION67 field. */ +#define BPROT_CONFIG2_REGION67_Msk (0x1UL << BPROT_CONFIG2_REGION67_Pos) /*!< Bit mask of REGION67 field. */ +#define BPROT_CONFIG2_REGION67_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION67_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 2 : Enable protection for region 66. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION66_Pos (2UL) /*!< Position of REGION66 field. */ +#define BPROT_CONFIG2_REGION66_Msk (0x1UL << BPROT_CONFIG2_REGION66_Pos) /*!< Bit mask of REGION66 field. */ +#define BPROT_CONFIG2_REGION66_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION66_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 1 : Enable protection for region 65. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION65_Pos (1UL) /*!< Position of REGION65 field. */ +#define BPROT_CONFIG2_REGION65_Msk (0x1UL << BPROT_CONFIG2_REGION65_Pos) /*!< Bit mask of REGION65 field. */ +#define BPROT_CONFIG2_REGION65_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION65_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 0 : Enable protection for region 64. Write '0' has no effect. */ +#define BPROT_CONFIG2_REGION64_Pos (0UL) /*!< Position of REGION64 field. */ +#define BPROT_CONFIG2_REGION64_Msk (0x1UL << BPROT_CONFIG2_REGION64_Pos) /*!< Bit mask of REGION64 field. */ +#define BPROT_CONFIG2_REGION64_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG2_REGION64_Enabled (1UL) /*!< Protection enabled */ + +/* Register: BPROT_CONFIG3 */ +/* Description: Block protect configuration register 3 */ + +/* Bit 31 : Enable protection for region 127. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION127_Pos (31UL) /*!< Position of REGION127 field. */ +#define BPROT_CONFIG3_REGION127_Msk (0x1UL << BPROT_CONFIG3_REGION127_Pos) /*!< Bit mask of REGION127 field. */ +#define BPROT_CONFIG3_REGION127_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION127_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 30 : Enable protection for region 126. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION126_Pos (30UL) /*!< Position of REGION126 field. */ +#define BPROT_CONFIG3_REGION126_Msk (0x1UL << BPROT_CONFIG3_REGION126_Pos) /*!< Bit mask of REGION126 field. */ +#define BPROT_CONFIG3_REGION126_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION126_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 29 : Enable protection for region 125. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION125_Pos (29UL) /*!< Position of REGION125 field. */ +#define BPROT_CONFIG3_REGION125_Msk (0x1UL << BPROT_CONFIG3_REGION125_Pos) /*!< Bit mask of REGION125 field. */ +#define BPROT_CONFIG3_REGION125_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION125_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 28 : Enable protection for region 124. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION124_Pos (28UL) /*!< Position of REGION124 field. */ +#define BPROT_CONFIG3_REGION124_Msk (0x1UL << BPROT_CONFIG3_REGION124_Pos) /*!< Bit mask of REGION124 field. */ +#define BPROT_CONFIG3_REGION124_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION124_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 27 : Enable protection for region 123. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION123_Pos (27UL) /*!< Position of REGION123 field. */ +#define BPROT_CONFIG3_REGION123_Msk (0x1UL << BPROT_CONFIG3_REGION123_Pos) /*!< Bit mask of REGION123 field. */ +#define BPROT_CONFIG3_REGION123_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION123_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 26 : Enable protection for region 122. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION122_Pos (26UL) /*!< Position of REGION122 field. */ +#define BPROT_CONFIG3_REGION122_Msk (0x1UL << BPROT_CONFIG3_REGION122_Pos) /*!< Bit mask of REGION122 field. */ +#define BPROT_CONFIG3_REGION122_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION122_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 25 : Enable protection for region 121. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION121_Pos (25UL) /*!< Position of REGION121 field. */ +#define BPROT_CONFIG3_REGION121_Msk (0x1UL << BPROT_CONFIG3_REGION121_Pos) /*!< Bit mask of REGION121 field. */ +#define BPROT_CONFIG3_REGION121_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION121_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 24 : Enable protection for region 120. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION120_Pos (24UL) /*!< Position of REGION120 field. */ +#define BPROT_CONFIG3_REGION120_Msk (0x1UL << BPROT_CONFIG3_REGION120_Pos) /*!< Bit mask of REGION120 field. */ +#define BPROT_CONFIG3_REGION120_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION120_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 23 : Enable protection for region 119. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION119_Pos (23UL) /*!< Position of REGION119 field. */ +#define BPROT_CONFIG3_REGION119_Msk (0x1UL << BPROT_CONFIG3_REGION119_Pos) /*!< Bit mask of REGION119 field. */ +#define BPROT_CONFIG3_REGION119_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION119_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 22 : Enable protection for region 118. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION118_Pos (22UL) /*!< Position of REGION118 field. */ +#define BPROT_CONFIG3_REGION118_Msk (0x1UL << BPROT_CONFIG3_REGION118_Pos) /*!< Bit mask of REGION118 field. */ +#define BPROT_CONFIG3_REGION118_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION118_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 21 : Enable protection for region 117. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION117_Pos (21UL) /*!< Position of REGION117 field. */ +#define BPROT_CONFIG3_REGION117_Msk (0x1UL << BPROT_CONFIG3_REGION117_Pos) /*!< Bit mask of REGION117 field. */ +#define BPROT_CONFIG3_REGION117_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION117_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 20 : Enable protection for region 116. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION116_Pos (20UL) /*!< Position of REGION116 field. */ +#define BPROT_CONFIG3_REGION116_Msk (0x1UL << BPROT_CONFIG3_REGION116_Pos) /*!< Bit mask of REGION116 field. */ +#define BPROT_CONFIG3_REGION116_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION116_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 19 : Enable protection for region 115. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION115_Pos (19UL) /*!< Position of REGION115 field. */ +#define BPROT_CONFIG3_REGION115_Msk (0x1UL << BPROT_CONFIG3_REGION115_Pos) /*!< Bit mask of REGION115 field. */ +#define BPROT_CONFIG3_REGION115_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION115_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 18 : Enable protection for region 114. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION114_Pos (18UL) /*!< Position of REGION114 field. */ +#define BPROT_CONFIG3_REGION114_Msk (0x1UL << BPROT_CONFIG3_REGION114_Pos) /*!< Bit mask of REGION114 field. */ +#define BPROT_CONFIG3_REGION114_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION114_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 17 : Enable protection for region 113. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION113_Pos (17UL) /*!< Position of REGION113 field. */ +#define BPROT_CONFIG3_REGION113_Msk (0x1UL << BPROT_CONFIG3_REGION113_Pos) /*!< Bit mask of REGION113 field. */ +#define BPROT_CONFIG3_REGION113_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION113_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 16 : Enable protection for region 112. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION112_Pos (16UL) /*!< Position of REGION112 field. */ +#define BPROT_CONFIG3_REGION112_Msk (0x1UL << BPROT_CONFIG3_REGION112_Pos) /*!< Bit mask of REGION112 field. */ +#define BPROT_CONFIG3_REGION112_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION112_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 15 : Enable protection for region 111. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION111_Pos (15UL) /*!< Position of REGION111 field. */ +#define BPROT_CONFIG3_REGION111_Msk (0x1UL << BPROT_CONFIG3_REGION111_Pos) /*!< Bit mask of REGION111 field. */ +#define BPROT_CONFIG3_REGION111_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION111_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 14 : Enable protection for region 110. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION110_Pos (14UL) /*!< Position of REGION110 field. */ +#define BPROT_CONFIG3_REGION110_Msk (0x1UL << BPROT_CONFIG3_REGION110_Pos) /*!< Bit mask of REGION110 field. */ +#define BPROT_CONFIG3_REGION110_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION110_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 13 : Enable protection for region 109. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION109_Pos (13UL) /*!< Position of REGION109 field. */ +#define BPROT_CONFIG3_REGION109_Msk (0x1UL << BPROT_CONFIG3_REGION109_Pos) /*!< Bit mask of REGION109 field. */ +#define BPROT_CONFIG3_REGION109_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION109_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 12 : Enable protection for region 108. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION108_Pos (12UL) /*!< Position of REGION108 field. */ +#define BPROT_CONFIG3_REGION108_Msk (0x1UL << BPROT_CONFIG3_REGION108_Pos) /*!< Bit mask of REGION108 field. */ +#define BPROT_CONFIG3_REGION108_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION108_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 11 : Enable protection for region 107. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION107_Pos (11UL) /*!< Position of REGION107 field. */ +#define BPROT_CONFIG3_REGION107_Msk (0x1UL << BPROT_CONFIG3_REGION107_Pos) /*!< Bit mask of REGION107 field. */ +#define BPROT_CONFIG3_REGION107_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION107_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 10 : Enable protection for region 106. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION106_Pos (10UL) /*!< Position of REGION106 field. */ +#define BPROT_CONFIG3_REGION106_Msk (0x1UL << BPROT_CONFIG3_REGION106_Pos) /*!< Bit mask of REGION106 field. */ +#define BPROT_CONFIG3_REGION106_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION106_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 9 : Enable protection for region 105. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION105_Pos (9UL) /*!< Position of REGION105 field. */ +#define BPROT_CONFIG3_REGION105_Msk (0x1UL << BPROT_CONFIG3_REGION105_Pos) /*!< Bit mask of REGION105 field. */ +#define BPROT_CONFIG3_REGION105_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION105_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 8 : Enable protection for region 104. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION104_Pos (8UL) /*!< Position of REGION104 field. */ +#define BPROT_CONFIG3_REGION104_Msk (0x1UL << BPROT_CONFIG3_REGION104_Pos) /*!< Bit mask of REGION104 field. */ +#define BPROT_CONFIG3_REGION104_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION104_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 7 : Enable protection for region 103. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION103_Pos (7UL) /*!< Position of REGION103 field. */ +#define BPROT_CONFIG3_REGION103_Msk (0x1UL << BPROT_CONFIG3_REGION103_Pos) /*!< Bit mask of REGION103 field. */ +#define BPROT_CONFIG3_REGION103_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION103_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 6 : Enable protection for region 102. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION102_Pos (6UL) /*!< Position of REGION102 field. */ +#define BPROT_CONFIG3_REGION102_Msk (0x1UL << BPROT_CONFIG3_REGION102_Pos) /*!< Bit mask of REGION102 field. */ +#define BPROT_CONFIG3_REGION102_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION102_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 5 : Enable protection for region 101. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION101_Pos (5UL) /*!< Position of REGION101 field. */ +#define BPROT_CONFIG3_REGION101_Msk (0x1UL << BPROT_CONFIG3_REGION101_Pos) /*!< Bit mask of REGION101 field. */ +#define BPROT_CONFIG3_REGION101_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION101_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 4 : Enable protection for region 100. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION100_Pos (4UL) /*!< Position of REGION100 field. */ +#define BPROT_CONFIG3_REGION100_Msk (0x1UL << BPROT_CONFIG3_REGION100_Pos) /*!< Bit mask of REGION100 field. */ +#define BPROT_CONFIG3_REGION100_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION100_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 3 : Enable protection for region 99. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION99_Pos (3UL) /*!< Position of REGION99 field. */ +#define BPROT_CONFIG3_REGION99_Msk (0x1UL << BPROT_CONFIG3_REGION99_Pos) /*!< Bit mask of REGION99 field. */ +#define BPROT_CONFIG3_REGION99_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION99_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 2 : Enable protection for region 98. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION98_Pos (2UL) /*!< Position of REGION98 field. */ +#define BPROT_CONFIG3_REGION98_Msk (0x1UL << BPROT_CONFIG3_REGION98_Pos) /*!< Bit mask of REGION98 field. */ +#define BPROT_CONFIG3_REGION98_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION98_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 1 : Enable protection for region 97. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION97_Pos (1UL) /*!< Position of REGION97 field. */ +#define BPROT_CONFIG3_REGION97_Msk (0x1UL << BPROT_CONFIG3_REGION97_Pos) /*!< Bit mask of REGION97 field. */ +#define BPROT_CONFIG3_REGION97_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION97_Enabled (1UL) /*!< Protection enabled */ + +/* Bit 0 : Enable protection for region 96. Write '0' has no effect. */ +#define BPROT_CONFIG3_REGION96_Pos (0UL) /*!< Position of REGION96 field. */ +#define BPROT_CONFIG3_REGION96_Msk (0x1UL << BPROT_CONFIG3_REGION96_Pos) /*!< Bit mask of REGION96 field. */ +#define BPROT_CONFIG3_REGION96_Disabled (0UL) /*!< Protection disabled */ +#define BPROT_CONFIG3_REGION96_Enabled (1UL) /*!< Protection enabled */ + + +/* Peripheral: CCM */ +/* Description: AES CCM Mode Encryption */ + +/* Register: CCM_SHORTS */ +/* Description: Shortcut register */ + +/* Bit 0 : Shortcut between ENDKSGEN event and CRYPT task */ +#define CCM_SHORTS_ENDKSGEN_CRYPT_Pos (0UL) /*!< Position of ENDKSGEN_CRYPT field. */ +#define CCM_SHORTS_ENDKSGEN_CRYPT_Msk (0x1UL << CCM_SHORTS_ENDKSGEN_CRYPT_Pos) /*!< Bit mask of ENDKSGEN_CRYPT field. */ +#define CCM_SHORTS_ENDKSGEN_CRYPT_Disabled (0UL) /*!< Disable shortcut */ +#define CCM_SHORTS_ENDKSGEN_CRYPT_Enabled (1UL) /*!< Enable shortcut */ + +/* Register: CCM_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 2 : Write '1' to Enable interrupt for ERROR event */ +#define CCM_INTENSET_ERROR_Pos (2UL) /*!< Position of ERROR field. */ +#define CCM_INTENSET_ERROR_Msk (0x1UL << CCM_INTENSET_ERROR_Pos) /*!< Bit mask of ERROR field. */ +#define CCM_INTENSET_ERROR_Disabled (0UL) /*!< Read: Disabled */ +#define CCM_INTENSET_ERROR_Enabled (1UL) /*!< Read: Enabled */ +#define CCM_INTENSET_ERROR_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for ENDCRYPT event */ +#define CCM_INTENSET_ENDCRYPT_Pos (1UL) /*!< Position of ENDCRYPT field. */ +#define CCM_INTENSET_ENDCRYPT_Msk (0x1UL << CCM_INTENSET_ENDCRYPT_Pos) /*!< Bit mask of ENDCRYPT field. */ +#define CCM_INTENSET_ENDCRYPT_Disabled (0UL) /*!< Read: Disabled */ +#define CCM_INTENSET_ENDCRYPT_Enabled (1UL) /*!< Read: Enabled */ +#define CCM_INTENSET_ENDCRYPT_Set (1UL) /*!< Enable */ + +/* Bit 0 : Write '1' to Enable interrupt for ENDKSGEN event */ +#define CCM_INTENSET_ENDKSGEN_Pos (0UL) /*!< Position of ENDKSGEN field. */ +#define CCM_INTENSET_ENDKSGEN_Msk (0x1UL << CCM_INTENSET_ENDKSGEN_Pos) /*!< Bit mask of ENDKSGEN field. */ +#define CCM_INTENSET_ENDKSGEN_Disabled (0UL) /*!< Read: Disabled */ +#define CCM_INTENSET_ENDKSGEN_Enabled (1UL) /*!< Read: Enabled */ +#define CCM_INTENSET_ENDKSGEN_Set (1UL) /*!< Enable */ + +/* Register: CCM_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 2 : Write '1' to Disable interrupt for ERROR event */ +#define CCM_INTENCLR_ERROR_Pos (2UL) /*!< Position of ERROR field. */ +#define CCM_INTENCLR_ERROR_Msk (0x1UL << CCM_INTENCLR_ERROR_Pos) /*!< Bit mask of ERROR field. */ +#define CCM_INTENCLR_ERROR_Disabled (0UL) /*!< Read: Disabled */ +#define CCM_INTENCLR_ERROR_Enabled (1UL) /*!< Read: Enabled */ +#define CCM_INTENCLR_ERROR_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for ENDCRYPT event */ +#define CCM_INTENCLR_ENDCRYPT_Pos (1UL) /*!< Position of ENDCRYPT field. */ +#define CCM_INTENCLR_ENDCRYPT_Msk (0x1UL << CCM_INTENCLR_ENDCRYPT_Pos) /*!< Bit mask of ENDCRYPT field. */ +#define CCM_INTENCLR_ENDCRYPT_Disabled (0UL) /*!< Read: Disabled */ +#define CCM_INTENCLR_ENDCRYPT_Enabled (1UL) /*!< Read: Enabled */ +#define CCM_INTENCLR_ENDCRYPT_Clear (1UL) /*!< Disable */ + +/* Bit 0 : Write '1' to Disable interrupt for ENDKSGEN event */ +#define CCM_INTENCLR_ENDKSGEN_Pos (0UL) /*!< Position of ENDKSGEN field. */ +#define CCM_INTENCLR_ENDKSGEN_Msk (0x1UL << CCM_INTENCLR_ENDKSGEN_Pos) /*!< Bit mask of ENDKSGEN field. */ +#define CCM_INTENCLR_ENDKSGEN_Disabled (0UL) /*!< Read: Disabled */ +#define CCM_INTENCLR_ENDKSGEN_Enabled (1UL) /*!< Read: Enabled */ +#define CCM_INTENCLR_ENDKSGEN_Clear (1UL) /*!< Disable */ + +/* Register: CCM_MICSTATUS */ +/* Description: MIC check result */ + +/* Bit 0 : The result of the MIC check performed during the previous decryption operation */ +#define CCM_MICSTATUS_MICSTATUS_Pos (0UL) /*!< Position of MICSTATUS field. */ +#define CCM_MICSTATUS_MICSTATUS_Msk (0x1UL << CCM_MICSTATUS_MICSTATUS_Pos) /*!< Bit mask of MICSTATUS field. */ +#define CCM_MICSTATUS_MICSTATUS_CheckFailed (0UL) /*!< MIC check failed */ +#define CCM_MICSTATUS_MICSTATUS_CheckPassed (1UL) /*!< MIC check passed */ + +/* Register: CCM_ENABLE */ +/* Description: Enable */ + +/* Bits 1..0 : Enable or disable CCM */ +#define CCM_ENABLE_ENABLE_Pos (0UL) /*!< Position of ENABLE field. */ +#define CCM_ENABLE_ENABLE_Msk (0x3UL << CCM_ENABLE_ENABLE_Pos) /*!< Bit mask of ENABLE field. */ +#define CCM_ENABLE_ENABLE_Disabled (0UL) /*!< Disable */ +#define CCM_ENABLE_ENABLE_Enabled (2UL) /*!< Enable */ + +/* Register: CCM_MODE */ +/* Description: Operation mode */ + +/* Bit 24 : Packet length configuration */ +#define CCM_MODE_LENGTH_Pos (24UL) /*!< Position of LENGTH field. */ +#define CCM_MODE_LENGTH_Msk (0x1UL << CCM_MODE_LENGTH_Pos) /*!< Bit mask of LENGTH field. */ +#define CCM_MODE_LENGTH_Default (0UL) /*!< Default length. Effective length of LENGTH field is 5-bit */ +#define CCM_MODE_LENGTH_Extended (1UL) /*!< Extended length. Effective length of LENGTH field is 8-bit */ + +/* Bit 16 : Data rate that the CCM shall run in synch with */ +#define CCM_MODE_DATARATE_Pos (16UL) /*!< Position of DATARATE field. */ +#define CCM_MODE_DATARATE_Msk (0x1UL << CCM_MODE_DATARATE_Pos) /*!< Bit mask of DATARATE field. */ +#define CCM_MODE_DATARATE_1Mbit (0UL) /*!< In synch with 1 Mbit data rate */ +#define CCM_MODE_DATARATE_2Mbit (1UL) /*!< In synch with 2 Mbit data rate */ + +/* Bit 0 : The mode of operation to be used */ +#define CCM_MODE_MODE_Pos (0UL) /*!< Position of MODE field. */ +#define CCM_MODE_MODE_Msk (0x1UL << CCM_MODE_MODE_Pos) /*!< Bit mask of MODE field. */ +#define CCM_MODE_MODE_Encryption (0UL) /*!< AES CCM packet encryption mode */ +#define CCM_MODE_MODE_Decryption (1UL) /*!< AES CCM packet decryption mode */ + +/* Register: CCM_CNFPTR */ +/* Description: Pointer to data structure holding AES key and NONCE vector */ + +/* Bits 31..0 : Pointer to the data structure holding the AES key and the CCM NONCE vector (see Table 1 CCM data structure overview) */ +#define CCM_CNFPTR_CNFPTR_Pos (0UL) /*!< Position of CNFPTR field. */ +#define CCM_CNFPTR_CNFPTR_Msk (0xFFFFFFFFUL << CCM_CNFPTR_CNFPTR_Pos) /*!< Bit mask of CNFPTR field. */ + +/* Register: CCM_INPTR */ +/* Description: Input pointer */ + +/* Bits 31..0 : Input pointer */ +#define CCM_INPTR_INPTR_Pos (0UL) /*!< Position of INPTR field. */ +#define CCM_INPTR_INPTR_Msk (0xFFFFFFFFUL << CCM_INPTR_INPTR_Pos) /*!< Bit mask of INPTR field. */ + +/* Register: CCM_OUTPTR */ +/* Description: Output pointer */ + +/* Bits 31..0 : Output pointer */ +#define CCM_OUTPTR_OUTPTR_Pos (0UL) /*!< Position of OUTPTR field. */ +#define CCM_OUTPTR_OUTPTR_Msk (0xFFFFFFFFUL << CCM_OUTPTR_OUTPTR_Pos) /*!< Bit mask of OUTPTR field. */ + +/* Register: CCM_SCRATCHPTR */ +/* Description: Pointer to data area used for temporary storage */ + +/* Bits 31..0 : Pointer to a scratch data area used for temporary storage during key-stream generation, MIC generation and encryption/decryption. */ +#define CCM_SCRATCHPTR_SCRATCHPTR_Pos (0UL) /*!< Position of SCRATCHPTR field. */ +#define CCM_SCRATCHPTR_SCRATCHPTR_Msk (0xFFFFFFFFUL << CCM_SCRATCHPTR_SCRATCHPTR_Pos) /*!< Bit mask of SCRATCHPTR field. */ + + +/* Peripheral: CLOCK */ +/* Description: Clock control */ + +/* Register: CLOCK_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 4 : Write '1' to Enable interrupt for CTTO event */ +#define CLOCK_INTENSET_CTTO_Pos (4UL) /*!< Position of CTTO field. */ +#define CLOCK_INTENSET_CTTO_Msk (0x1UL << CLOCK_INTENSET_CTTO_Pos) /*!< Bit mask of CTTO field. */ +#define CLOCK_INTENSET_CTTO_Disabled (0UL) /*!< Read: Disabled */ +#define CLOCK_INTENSET_CTTO_Enabled (1UL) /*!< Read: Enabled */ +#define CLOCK_INTENSET_CTTO_Set (1UL) /*!< Enable */ + +/* Bit 3 : Write '1' to Enable interrupt for DONE event */ +#define CLOCK_INTENSET_DONE_Pos (3UL) /*!< Position of DONE field. */ +#define CLOCK_INTENSET_DONE_Msk (0x1UL << CLOCK_INTENSET_DONE_Pos) /*!< Bit mask of DONE field. */ +#define CLOCK_INTENSET_DONE_Disabled (0UL) /*!< Read: Disabled */ +#define CLOCK_INTENSET_DONE_Enabled (1UL) /*!< Read: Enabled */ +#define CLOCK_INTENSET_DONE_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for LFCLKSTARTED event */ +#define CLOCK_INTENSET_LFCLKSTARTED_Pos (1UL) /*!< Position of LFCLKSTARTED field. */ +#define CLOCK_INTENSET_LFCLKSTARTED_Msk (0x1UL << CLOCK_INTENSET_LFCLKSTARTED_Pos) /*!< Bit mask of LFCLKSTARTED field. */ +#define CLOCK_INTENSET_LFCLKSTARTED_Disabled (0UL) /*!< Read: Disabled */ +#define CLOCK_INTENSET_LFCLKSTARTED_Enabled (1UL) /*!< Read: Enabled */ +#define CLOCK_INTENSET_LFCLKSTARTED_Set (1UL) /*!< Enable */ + +/* Bit 0 : Write '1' to Enable interrupt for HFCLKSTARTED event */ +#define CLOCK_INTENSET_HFCLKSTARTED_Pos (0UL) /*!< Position of HFCLKSTARTED field. */ +#define CLOCK_INTENSET_HFCLKSTARTED_Msk (0x1UL << CLOCK_INTENSET_HFCLKSTARTED_Pos) /*!< Bit mask of HFCLKSTARTED field. */ +#define CLOCK_INTENSET_HFCLKSTARTED_Disabled (0UL) /*!< Read: Disabled */ +#define CLOCK_INTENSET_HFCLKSTARTED_Enabled (1UL) /*!< Read: Enabled */ +#define CLOCK_INTENSET_HFCLKSTARTED_Set (1UL) /*!< Enable */ + +/* Register: CLOCK_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 4 : Write '1' to Disable interrupt for CTTO event */ +#define CLOCK_INTENCLR_CTTO_Pos (4UL) /*!< Position of CTTO field. */ +#define CLOCK_INTENCLR_CTTO_Msk (0x1UL << CLOCK_INTENCLR_CTTO_Pos) /*!< Bit mask of CTTO field. */ +#define CLOCK_INTENCLR_CTTO_Disabled (0UL) /*!< Read: Disabled */ +#define CLOCK_INTENCLR_CTTO_Enabled (1UL) /*!< Read: Enabled */ +#define CLOCK_INTENCLR_CTTO_Clear (1UL) /*!< Disable */ + +/* Bit 3 : Write '1' to Disable interrupt for DONE event */ +#define CLOCK_INTENCLR_DONE_Pos (3UL) /*!< Position of DONE field. */ +#define CLOCK_INTENCLR_DONE_Msk (0x1UL << CLOCK_INTENCLR_DONE_Pos) /*!< Bit mask of DONE field. */ +#define CLOCK_INTENCLR_DONE_Disabled (0UL) /*!< Read: Disabled */ +#define CLOCK_INTENCLR_DONE_Enabled (1UL) /*!< Read: Enabled */ +#define CLOCK_INTENCLR_DONE_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for LFCLKSTARTED event */ +#define CLOCK_INTENCLR_LFCLKSTARTED_Pos (1UL) /*!< Position of LFCLKSTARTED field. */ +#define CLOCK_INTENCLR_LFCLKSTARTED_Msk (0x1UL << CLOCK_INTENCLR_LFCLKSTARTED_Pos) /*!< Bit mask of LFCLKSTARTED field. */ +#define CLOCK_INTENCLR_LFCLKSTARTED_Disabled (0UL) /*!< Read: Disabled */ +#define CLOCK_INTENCLR_LFCLKSTARTED_Enabled (1UL) /*!< Read: Enabled */ +#define CLOCK_INTENCLR_LFCLKSTARTED_Clear (1UL) /*!< Disable */ + +/* Bit 0 : Write '1' to Disable interrupt for HFCLKSTARTED event */ +#define CLOCK_INTENCLR_HFCLKSTARTED_Pos (0UL) /*!< Position of HFCLKSTARTED field. */ +#define CLOCK_INTENCLR_HFCLKSTARTED_Msk (0x1UL << CLOCK_INTENCLR_HFCLKSTARTED_Pos) /*!< Bit mask of HFCLKSTARTED field. */ +#define CLOCK_INTENCLR_HFCLKSTARTED_Disabled (0UL) /*!< Read: Disabled */ +#define CLOCK_INTENCLR_HFCLKSTARTED_Enabled (1UL) /*!< Read: Enabled */ +#define CLOCK_INTENCLR_HFCLKSTARTED_Clear (1UL) /*!< Disable */ + +/* Register: CLOCK_HFCLKRUN */ +/* Description: Status indicating that HFCLKSTART task has been triggered */ + +/* Bit 0 : HFCLKSTART task triggered or not */ +#define CLOCK_HFCLKRUN_STATUS_Pos (0UL) /*!< Position of STATUS field. */ +#define CLOCK_HFCLKRUN_STATUS_Msk (0x1UL << CLOCK_HFCLKRUN_STATUS_Pos) /*!< Bit mask of STATUS field. */ +#define CLOCK_HFCLKRUN_STATUS_NotTriggered (0UL) /*!< Task not triggered */ +#define CLOCK_HFCLKRUN_STATUS_Triggered (1UL) /*!< Task triggered */ + +/* Register: CLOCK_HFCLKSTAT */ +/* Description: HFCLK status */ + +/* Bit 16 : HFCLK state */ +#define CLOCK_HFCLKSTAT_STATE_Pos (16UL) /*!< Position of STATE field. */ +#define CLOCK_HFCLKSTAT_STATE_Msk (0x1UL << CLOCK_HFCLKSTAT_STATE_Pos) /*!< Bit mask of STATE field. */ +#define CLOCK_HFCLKSTAT_STATE_NotRunning (0UL) /*!< HFCLK not running */ +#define CLOCK_HFCLKSTAT_STATE_Running (1UL) /*!< HFCLK running */ + +/* Bit 0 : Source of HFCLK */ +#define CLOCK_HFCLKSTAT_SRC_Pos (0UL) /*!< Position of SRC field. */ +#define CLOCK_HFCLKSTAT_SRC_Msk (0x1UL << CLOCK_HFCLKSTAT_SRC_Pos) /*!< Bit mask of SRC field. */ +#define CLOCK_HFCLKSTAT_SRC_RC (0UL) /*!< 64 MHz internal oscillator (HFINT) */ +#define CLOCK_HFCLKSTAT_SRC_Xtal (1UL) /*!< 64 MHz crystal oscillator (HFXO) */ + +/* Register: CLOCK_LFCLKRUN */ +/* Description: Status indicating that LFCLKSTART task has been triggered */ + +/* Bit 0 : LFCLKSTART task triggered or not */ +#define CLOCK_LFCLKRUN_STATUS_Pos (0UL) /*!< Position of STATUS field. */ +#define CLOCK_LFCLKRUN_STATUS_Msk (0x1UL << CLOCK_LFCLKRUN_STATUS_Pos) /*!< Bit mask of STATUS field. */ +#define CLOCK_LFCLKRUN_STATUS_NotTriggered (0UL) /*!< Task not triggered */ +#define CLOCK_LFCLKRUN_STATUS_Triggered (1UL) /*!< Task triggered */ + +/* Register: CLOCK_LFCLKSTAT */ +/* Description: LFCLK status */ + +/* Bit 16 : LFCLK state */ +#define CLOCK_LFCLKSTAT_STATE_Pos (16UL) /*!< Position of STATE field. */ +#define CLOCK_LFCLKSTAT_STATE_Msk (0x1UL << CLOCK_LFCLKSTAT_STATE_Pos) /*!< Bit mask of STATE field. */ +#define CLOCK_LFCLKSTAT_STATE_NotRunning (0UL) /*!< LFCLK not running */ +#define CLOCK_LFCLKSTAT_STATE_Running (1UL) /*!< LFCLK running */ + +/* Bits 1..0 : Source of LFCLK */ +#define CLOCK_LFCLKSTAT_SRC_Pos (0UL) /*!< Position of SRC field. */ +#define CLOCK_LFCLKSTAT_SRC_Msk (0x3UL << CLOCK_LFCLKSTAT_SRC_Pos) /*!< Bit mask of SRC field. */ +#define CLOCK_LFCLKSTAT_SRC_RC (0UL) /*!< 32.768 kHz RC oscillator */ +#define CLOCK_LFCLKSTAT_SRC_Xtal (1UL) /*!< 32.768 kHz crystal oscillator */ +#define CLOCK_LFCLKSTAT_SRC_Synth (2UL) /*!< 32.768 kHz synthesized from HFCLK */ + +/* Register: CLOCK_LFCLKSRCCOPY */ +/* Description: Copy of LFCLKSRC register, set when LFCLKSTART task was triggered */ + +/* Bits 1..0 : Clock source */ +#define CLOCK_LFCLKSRCCOPY_SRC_Pos (0UL) /*!< Position of SRC field. */ +#define CLOCK_LFCLKSRCCOPY_SRC_Msk (0x3UL << CLOCK_LFCLKSRCCOPY_SRC_Pos) /*!< Bit mask of SRC field. */ +#define CLOCK_LFCLKSRCCOPY_SRC_RC (0UL) /*!< 32.768 kHz RC oscillator */ +#define CLOCK_LFCLKSRCCOPY_SRC_Xtal (1UL) /*!< 32.768 kHz crystal oscillator */ +#define CLOCK_LFCLKSRCCOPY_SRC_Synth (2UL) /*!< 32.768 kHz synthesized from HFCLK */ + +/* Register: CLOCK_LFCLKSRC */ +/* Description: Clock source for the LFCLK */ + +/* Bits 1..0 : Clock source */ +#define CLOCK_LFCLKSRC_SRC_Pos (0UL) /*!< Position of SRC field. */ +#define CLOCK_LFCLKSRC_SRC_Msk (0x3UL << CLOCK_LFCLKSRC_SRC_Pos) /*!< Bit mask of SRC field. */ +#define CLOCK_LFCLKSRC_SRC_RC (0UL) /*!< 32.768 kHz RC oscillator */ +#define CLOCK_LFCLKSRC_SRC_Xtal (1UL) /*!< 32.768 kHz crystal oscillator */ +#define CLOCK_LFCLKSRC_SRC_Synth (2UL) /*!< 32.768 kHz synthesized from HFCLK */ + +/* Register: CLOCK_CTIV */ +/* Description: Calibration timer interval (retained register, same reset behaviour as RESETREAS) */ + +/* Bits 6..0 : Calibration timer interval in multiple of 0.25 seconds. Range: 0.25 seconds to 31.75 seconds. */ +#define CLOCK_CTIV_CTIV_Pos (0UL) /*!< Position of CTIV field. */ +#define CLOCK_CTIV_CTIV_Msk (0x7FUL << CLOCK_CTIV_CTIV_Pos) /*!< Bit mask of CTIV field. */ + +/* Register: CLOCK_TRACECONFIG */ +/* Description: Clocking options for the Trace Port debug interface */ + +/* Bits 17..16 : Pin multiplexing of trace signals. */ +#define CLOCK_TRACECONFIG_TRACEMUX_Pos (16UL) /*!< Position of TRACEMUX field. */ +#define CLOCK_TRACECONFIG_TRACEMUX_Msk (0x3UL << CLOCK_TRACECONFIG_TRACEMUX_Pos) /*!< Bit mask of TRACEMUX field. */ +#define CLOCK_TRACECONFIG_TRACEMUX_GPIO (0UL) /*!< GPIOs multiplexed onto all trace-pins */ +#define CLOCK_TRACECONFIG_TRACEMUX_Serial (1UL) /*!< SWO multiplexed onto P0.18, GPIO multiplexed onto other trace pins */ +#define CLOCK_TRACECONFIG_TRACEMUX_Parallel (2UL) /*!< TRACECLK and TRACEDATA multiplexed onto P0.20, P0.18, P0.16, P0.15 and P0.14. */ + +/* Bits 1..0 : Speed of Trace Port clock. Note that the TRACECLK pin will output this clock divided by two. */ +#define CLOCK_TRACECONFIG_TRACEPORTSPEED_Pos (0UL) /*!< Position of TRACEPORTSPEED field. */ +#define CLOCK_TRACECONFIG_TRACEPORTSPEED_Msk (0x3UL << CLOCK_TRACECONFIG_TRACEPORTSPEED_Pos) /*!< Bit mask of TRACEPORTSPEED field. */ +#define CLOCK_TRACECONFIG_TRACEPORTSPEED_32MHz (0UL) /*!< 32 MHz Trace Port clock (TRACECLK = 16 MHz) */ +#define CLOCK_TRACECONFIG_TRACEPORTSPEED_16MHz (1UL) /*!< 16 MHz Trace Port clock (TRACECLK = 8 MHz) */ +#define CLOCK_TRACECONFIG_TRACEPORTSPEED_8MHz (2UL) /*!< 8 MHz Trace Port clock (TRACECLK = 4 MHz) */ +#define CLOCK_TRACECONFIG_TRACEPORTSPEED_4MHz (3UL) /*!< 4 MHz Trace Port clock (TRACECLK = 2 MHz) */ + + +/* Peripheral: COMP */ +/* Description: Comparator */ + +/* Register: COMP_SHORTS */ +/* Description: Shortcut register */ + +/* Bit 4 : Shortcut between CROSS event and STOP task */ +#define COMP_SHORTS_CROSS_STOP_Pos (4UL) /*!< Position of CROSS_STOP field. */ +#define COMP_SHORTS_CROSS_STOP_Msk (0x1UL << COMP_SHORTS_CROSS_STOP_Pos) /*!< Bit mask of CROSS_STOP field. */ +#define COMP_SHORTS_CROSS_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define COMP_SHORTS_CROSS_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 3 : Shortcut between UP event and STOP task */ +#define COMP_SHORTS_UP_STOP_Pos (3UL) /*!< Position of UP_STOP field. */ +#define COMP_SHORTS_UP_STOP_Msk (0x1UL << COMP_SHORTS_UP_STOP_Pos) /*!< Bit mask of UP_STOP field. */ +#define COMP_SHORTS_UP_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define COMP_SHORTS_UP_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 2 : Shortcut between DOWN event and STOP task */ +#define COMP_SHORTS_DOWN_STOP_Pos (2UL) /*!< Position of DOWN_STOP field. */ +#define COMP_SHORTS_DOWN_STOP_Msk (0x1UL << COMP_SHORTS_DOWN_STOP_Pos) /*!< Bit mask of DOWN_STOP field. */ +#define COMP_SHORTS_DOWN_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define COMP_SHORTS_DOWN_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 1 : Shortcut between READY event and STOP task */ +#define COMP_SHORTS_READY_STOP_Pos (1UL) /*!< Position of READY_STOP field. */ +#define COMP_SHORTS_READY_STOP_Msk (0x1UL << COMP_SHORTS_READY_STOP_Pos) /*!< Bit mask of READY_STOP field. */ +#define COMP_SHORTS_READY_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define COMP_SHORTS_READY_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 0 : Shortcut between READY event and SAMPLE task */ +#define COMP_SHORTS_READY_SAMPLE_Pos (0UL) /*!< Position of READY_SAMPLE field. */ +#define COMP_SHORTS_READY_SAMPLE_Msk (0x1UL << COMP_SHORTS_READY_SAMPLE_Pos) /*!< Bit mask of READY_SAMPLE field. */ +#define COMP_SHORTS_READY_SAMPLE_Disabled (0UL) /*!< Disable shortcut */ +#define COMP_SHORTS_READY_SAMPLE_Enabled (1UL) /*!< Enable shortcut */ + +/* Register: COMP_INTEN */ +/* Description: Enable or disable interrupt */ + +/* Bit 3 : Enable or disable interrupt for CROSS event */ +#define COMP_INTEN_CROSS_Pos (3UL) /*!< Position of CROSS field. */ +#define COMP_INTEN_CROSS_Msk (0x1UL << COMP_INTEN_CROSS_Pos) /*!< Bit mask of CROSS field. */ +#define COMP_INTEN_CROSS_Disabled (0UL) /*!< Disable */ +#define COMP_INTEN_CROSS_Enabled (1UL) /*!< Enable */ + +/* Bit 2 : Enable or disable interrupt for UP event */ +#define COMP_INTEN_UP_Pos (2UL) /*!< Position of UP field. */ +#define COMP_INTEN_UP_Msk (0x1UL << COMP_INTEN_UP_Pos) /*!< Bit mask of UP field. */ +#define COMP_INTEN_UP_Disabled (0UL) /*!< Disable */ +#define COMP_INTEN_UP_Enabled (1UL) /*!< Enable */ + +/* Bit 1 : Enable or disable interrupt for DOWN event */ +#define COMP_INTEN_DOWN_Pos (1UL) /*!< Position of DOWN field. */ +#define COMP_INTEN_DOWN_Msk (0x1UL << COMP_INTEN_DOWN_Pos) /*!< Bit mask of DOWN field. */ +#define COMP_INTEN_DOWN_Disabled (0UL) /*!< Disable */ +#define COMP_INTEN_DOWN_Enabled (1UL) /*!< Enable */ + +/* Bit 0 : Enable or disable interrupt for READY event */ +#define COMP_INTEN_READY_Pos (0UL) /*!< Position of READY field. */ +#define COMP_INTEN_READY_Msk (0x1UL << COMP_INTEN_READY_Pos) /*!< Bit mask of READY field. */ +#define COMP_INTEN_READY_Disabled (0UL) /*!< Disable */ +#define COMP_INTEN_READY_Enabled (1UL) /*!< Enable */ + +/* Register: COMP_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 3 : Write '1' to Enable interrupt for CROSS event */ +#define COMP_INTENSET_CROSS_Pos (3UL) /*!< Position of CROSS field. */ +#define COMP_INTENSET_CROSS_Msk (0x1UL << COMP_INTENSET_CROSS_Pos) /*!< Bit mask of CROSS field. */ +#define COMP_INTENSET_CROSS_Disabled (0UL) /*!< Read: Disabled */ +#define COMP_INTENSET_CROSS_Enabled (1UL) /*!< Read: Enabled */ +#define COMP_INTENSET_CROSS_Set (1UL) /*!< Enable */ + +/* Bit 2 : Write '1' to Enable interrupt for UP event */ +#define COMP_INTENSET_UP_Pos (2UL) /*!< Position of UP field. */ +#define COMP_INTENSET_UP_Msk (0x1UL << COMP_INTENSET_UP_Pos) /*!< Bit mask of UP field. */ +#define COMP_INTENSET_UP_Disabled (0UL) /*!< Read: Disabled */ +#define COMP_INTENSET_UP_Enabled (1UL) /*!< Read: Enabled */ +#define COMP_INTENSET_UP_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for DOWN event */ +#define COMP_INTENSET_DOWN_Pos (1UL) /*!< Position of DOWN field. */ +#define COMP_INTENSET_DOWN_Msk (0x1UL << COMP_INTENSET_DOWN_Pos) /*!< Bit mask of DOWN field. */ +#define COMP_INTENSET_DOWN_Disabled (0UL) /*!< Read: Disabled */ +#define COMP_INTENSET_DOWN_Enabled (1UL) /*!< Read: Enabled */ +#define COMP_INTENSET_DOWN_Set (1UL) /*!< Enable */ + +/* Bit 0 : Write '1' to Enable interrupt for READY event */ +#define COMP_INTENSET_READY_Pos (0UL) /*!< Position of READY field. */ +#define COMP_INTENSET_READY_Msk (0x1UL << COMP_INTENSET_READY_Pos) /*!< Bit mask of READY field. */ +#define COMP_INTENSET_READY_Disabled (0UL) /*!< Read: Disabled */ +#define COMP_INTENSET_READY_Enabled (1UL) /*!< Read: Enabled */ +#define COMP_INTENSET_READY_Set (1UL) /*!< Enable */ + +/* Register: COMP_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 3 : Write '1' to Disable interrupt for CROSS event */ +#define COMP_INTENCLR_CROSS_Pos (3UL) /*!< Position of CROSS field. */ +#define COMP_INTENCLR_CROSS_Msk (0x1UL << COMP_INTENCLR_CROSS_Pos) /*!< Bit mask of CROSS field. */ +#define COMP_INTENCLR_CROSS_Disabled (0UL) /*!< Read: Disabled */ +#define COMP_INTENCLR_CROSS_Enabled (1UL) /*!< Read: Enabled */ +#define COMP_INTENCLR_CROSS_Clear (1UL) /*!< Disable */ + +/* Bit 2 : Write '1' to Disable interrupt for UP event */ +#define COMP_INTENCLR_UP_Pos (2UL) /*!< Position of UP field. */ +#define COMP_INTENCLR_UP_Msk (0x1UL << COMP_INTENCLR_UP_Pos) /*!< Bit mask of UP field. */ +#define COMP_INTENCLR_UP_Disabled (0UL) /*!< Read: Disabled */ +#define COMP_INTENCLR_UP_Enabled (1UL) /*!< Read: Enabled */ +#define COMP_INTENCLR_UP_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for DOWN event */ +#define COMP_INTENCLR_DOWN_Pos (1UL) /*!< Position of DOWN field. */ +#define COMP_INTENCLR_DOWN_Msk (0x1UL << COMP_INTENCLR_DOWN_Pos) /*!< Bit mask of DOWN field. */ +#define COMP_INTENCLR_DOWN_Disabled (0UL) /*!< Read: Disabled */ +#define COMP_INTENCLR_DOWN_Enabled (1UL) /*!< Read: Enabled */ +#define COMP_INTENCLR_DOWN_Clear (1UL) /*!< Disable */ + +/* Bit 0 : Write '1' to Disable interrupt for READY event */ +#define COMP_INTENCLR_READY_Pos (0UL) /*!< Position of READY field. */ +#define COMP_INTENCLR_READY_Msk (0x1UL << COMP_INTENCLR_READY_Pos) /*!< Bit mask of READY field. */ +#define COMP_INTENCLR_READY_Disabled (0UL) /*!< Read: Disabled */ +#define COMP_INTENCLR_READY_Enabled (1UL) /*!< Read: Enabled */ +#define COMP_INTENCLR_READY_Clear (1UL) /*!< Disable */ + +/* Register: COMP_RESULT */ +/* Description: Compare result */ + +/* Bit 0 : Result of last compare. Decision point SAMPLE task. */ +#define COMP_RESULT_RESULT_Pos (0UL) /*!< Position of RESULT field. */ +#define COMP_RESULT_RESULT_Msk (0x1UL << COMP_RESULT_RESULT_Pos) /*!< Bit mask of RESULT field. */ +#define COMP_RESULT_RESULT_Below (0UL) /*!< Input voltage is below the threshold (VIN+ < VIN-) */ +#define COMP_RESULT_RESULT_Above (1UL) /*!< Input voltage is above the threshold (VIN+ > VIN-) */ + +/* Register: COMP_ENABLE */ +/* Description: COMP enable */ + +/* Bits 1..0 : Enable or disable COMP */ +#define COMP_ENABLE_ENABLE_Pos (0UL) /*!< Position of ENABLE field. */ +#define COMP_ENABLE_ENABLE_Msk (0x3UL << COMP_ENABLE_ENABLE_Pos) /*!< Bit mask of ENABLE field. */ +#define COMP_ENABLE_ENABLE_Disabled (0UL) /*!< Disable */ +#define COMP_ENABLE_ENABLE_Enabled (2UL) /*!< Enable */ + +/* Register: COMP_PSEL */ +/* Description: Pin select */ + +/* Bits 2..0 : Analog pin select */ +#define COMP_PSEL_PSEL_Pos (0UL) /*!< Position of PSEL field. */ +#define COMP_PSEL_PSEL_Msk (0x7UL << COMP_PSEL_PSEL_Pos) /*!< Bit mask of PSEL field. */ +#define COMP_PSEL_PSEL_AnalogInput0 (0UL) /*!< AIN0 selected as analog input */ +#define COMP_PSEL_PSEL_AnalogInput1 (1UL) /*!< AIN1 selected as analog input */ +#define COMP_PSEL_PSEL_AnalogInput2 (2UL) /*!< AIN2 selected as analog input */ +#define COMP_PSEL_PSEL_AnalogInput3 (3UL) /*!< AIN3 selected as analog input */ +#define COMP_PSEL_PSEL_AnalogInput4 (4UL) /*!< AIN4 selected as analog input */ +#define COMP_PSEL_PSEL_AnalogInput5 (5UL) /*!< AIN5 selected as analog input */ +#define COMP_PSEL_PSEL_AnalogInput6 (6UL) /*!< AIN6 selected as analog input */ +#define COMP_PSEL_PSEL_AnalogInput7 (7UL) /*!< AIN7 selected as analog input */ + +/* Register: COMP_REFSEL */ +/* Description: Reference source select */ + +/* Bits 2..0 : Reference select */ +#define COMP_REFSEL_REFSEL_Pos (0UL) /*!< Position of REFSEL field. */ +#define COMP_REFSEL_REFSEL_Msk (0x7UL << COMP_REFSEL_REFSEL_Pos) /*!< Bit mask of REFSEL field. */ +#define COMP_REFSEL_REFSEL_Int1V2 (0UL) /*!< VREF = internal 1.2 V reference (VDD >= 1.7 V) */ +#define COMP_REFSEL_REFSEL_Int1V8 (1UL) /*!< VREF = internal 1.8 V reference (VDD >= VREF + 0.2 V) */ +#define COMP_REFSEL_REFSEL_Int2V4 (2UL) /*!< VREF = internal 2.4 V reference (VDD >= VREF + 0.2 V) */ +#define COMP_REFSEL_REFSEL_VDD (4UL) /*!< VREF = VDD */ +#define COMP_REFSEL_REFSEL_ARef (7UL) /*!< VREF = AREF (VDD >= VREF >= AREFMIN) */ + +/* Register: COMP_EXTREFSEL */ +/* Description: External reference select */ + +/* Bit 0 : External analog reference select */ +#define COMP_EXTREFSEL_EXTREFSEL_Pos (0UL) /*!< Position of EXTREFSEL field. */ +#define COMP_EXTREFSEL_EXTREFSEL_Msk (0x1UL << COMP_EXTREFSEL_EXTREFSEL_Pos) /*!< Bit mask of EXTREFSEL field. */ +#define COMP_EXTREFSEL_EXTREFSEL_AnalogReference0 (0UL) /*!< Use AIN0 as external analog reference */ +#define COMP_EXTREFSEL_EXTREFSEL_AnalogReference1 (1UL) /*!< Use AIN1 as external analog reference */ + +/* Register: COMP_TH */ +/* Description: Threshold configuration for hysteresis unit */ + +/* Bits 13..8 : VUP = (THUP+1)/64*VREF */ +#define COMP_TH_THUP_Pos (8UL) /*!< Position of THUP field. */ +#define COMP_TH_THUP_Msk (0x3FUL << COMP_TH_THUP_Pos) /*!< Bit mask of THUP field. */ + +/* Bits 5..0 : VDOWN = (THDOWN+1)/64*VREF */ +#define COMP_TH_THDOWN_Pos (0UL) /*!< Position of THDOWN field. */ +#define COMP_TH_THDOWN_Msk (0x3FUL << COMP_TH_THDOWN_Pos) /*!< Bit mask of THDOWN field. */ + +/* Register: COMP_MODE */ +/* Description: Mode configuration */ + +/* Bit 8 : Main operation mode */ +#define COMP_MODE_MAIN_Pos (8UL) /*!< Position of MAIN field. */ +#define COMP_MODE_MAIN_Msk (0x1UL << COMP_MODE_MAIN_Pos) /*!< Bit mask of MAIN field. */ +#define COMP_MODE_MAIN_SE (0UL) /*!< Single ended mode */ +#define COMP_MODE_MAIN_Diff (1UL) /*!< Differential mode */ + +/* Bits 1..0 : Speed and power mode */ +#define COMP_MODE_SP_Pos (0UL) /*!< Position of SP field. */ +#define COMP_MODE_SP_Msk (0x3UL << COMP_MODE_SP_Pos) /*!< Bit mask of SP field. */ +#define COMP_MODE_SP_Low (0UL) /*!< Low power mode */ +#define COMP_MODE_SP_Normal (1UL) /*!< Normal mode */ +#define COMP_MODE_SP_High (2UL) /*!< High speed mode */ + +/* Register: COMP_HYST */ +/* Description: Comparator hysteresis enable */ + +/* Bit 0 : Comparator hysteresis */ +#define COMP_HYST_HYST_Pos (0UL) /*!< Position of HYST field. */ +#define COMP_HYST_HYST_Msk (0x1UL << COMP_HYST_HYST_Pos) /*!< Bit mask of HYST field. */ +#define COMP_HYST_HYST_NoHyst (0UL) /*!< Comparator hysteresis disabled */ +#define COMP_HYST_HYST_Hyst50mV (1UL) /*!< Comparator hysteresis enabled */ + +/* Register: COMP_ISOURCE */ +/* Description: Current source select on analog input */ + +/* Bits 1..0 : Comparator hysteresis */ +#define COMP_ISOURCE_ISOURCE_Pos (0UL) /*!< Position of ISOURCE field. */ +#define COMP_ISOURCE_ISOURCE_Msk (0x3UL << COMP_ISOURCE_ISOURCE_Pos) /*!< Bit mask of ISOURCE field. */ +#define COMP_ISOURCE_ISOURCE_Off (0UL) /*!< Current source disabled */ +#define COMP_ISOURCE_ISOURCE_Ien2mA5 (1UL) /*!< Current source enabled (+/- 2.5 uA) */ +#define COMP_ISOURCE_ISOURCE_Ien5mA (2UL) /*!< Current source enabled (+/- 5 uA) */ +#define COMP_ISOURCE_ISOURCE_Ien10mA (3UL) /*!< Current source enabled (+/- 10 uA) */ + + +/* Peripheral: ECB */ +/* Description: AES ECB Mode Encryption */ + +/* Register: ECB_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 1 : Write '1' to Enable interrupt for ERRORECB event */ +#define ECB_INTENSET_ERRORECB_Pos (1UL) /*!< Position of ERRORECB field. */ +#define ECB_INTENSET_ERRORECB_Msk (0x1UL << ECB_INTENSET_ERRORECB_Pos) /*!< Bit mask of ERRORECB field. */ +#define ECB_INTENSET_ERRORECB_Disabled (0UL) /*!< Read: Disabled */ +#define ECB_INTENSET_ERRORECB_Enabled (1UL) /*!< Read: Enabled */ +#define ECB_INTENSET_ERRORECB_Set (1UL) /*!< Enable */ + +/* Bit 0 : Write '1' to Enable interrupt for ENDECB event */ +#define ECB_INTENSET_ENDECB_Pos (0UL) /*!< Position of ENDECB field. */ +#define ECB_INTENSET_ENDECB_Msk (0x1UL << ECB_INTENSET_ENDECB_Pos) /*!< Bit mask of ENDECB field. */ +#define ECB_INTENSET_ENDECB_Disabled (0UL) /*!< Read: Disabled */ +#define ECB_INTENSET_ENDECB_Enabled (1UL) /*!< Read: Enabled */ +#define ECB_INTENSET_ENDECB_Set (1UL) /*!< Enable */ + +/* Register: ECB_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 1 : Write '1' to Disable interrupt for ERRORECB event */ +#define ECB_INTENCLR_ERRORECB_Pos (1UL) /*!< Position of ERRORECB field. */ +#define ECB_INTENCLR_ERRORECB_Msk (0x1UL << ECB_INTENCLR_ERRORECB_Pos) /*!< Bit mask of ERRORECB field. */ +#define ECB_INTENCLR_ERRORECB_Disabled (0UL) /*!< Read: Disabled */ +#define ECB_INTENCLR_ERRORECB_Enabled (1UL) /*!< Read: Enabled */ +#define ECB_INTENCLR_ERRORECB_Clear (1UL) /*!< Disable */ + +/* Bit 0 : Write '1' to Disable interrupt for ENDECB event */ +#define ECB_INTENCLR_ENDECB_Pos (0UL) /*!< Position of ENDECB field. */ +#define ECB_INTENCLR_ENDECB_Msk (0x1UL << ECB_INTENCLR_ENDECB_Pos) /*!< Bit mask of ENDECB field. */ +#define ECB_INTENCLR_ENDECB_Disabled (0UL) /*!< Read: Disabled */ +#define ECB_INTENCLR_ENDECB_Enabled (1UL) /*!< Read: Enabled */ +#define ECB_INTENCLR_ENDECB_Clear (1UL) /*!< Disable */ + +/* Register: ECB_ECBDATAPTR */ +/* Description: ECB block encrypt memory pointers */ + +/* Bits 31..0 : Pointer to the ECB data structure (see Table 1 ECB data structure overview) */ +#define ECB_ECBDATAPTR_ECBDATAPTR_Pos (0UL) /*!< Position of ECBDATAPTR field. */ +#define ECB_ECBDATAPTR_ECBDATAPTR_Msk (0xFFFFFFFFUL << ECB_ECBDATAPTR_ECBDATAPTR_Pos) /*!< Bit mask of ECBDATAPTR field. */ + + +/* Peripheral: EGU */ +/* Description: Event Generator Unit 0 */ + +/* Register: EGU_INTEN */ +/* Description: Enable or disable interrupt */ + +/* Bit 15 : Enable or disable interrupt for TRIGGERED[15] event */ +#define EGU_INTEN_TRIGGERED15_Pos (15UL) /*!< Position of TRIGGERED15 field. */ +#define EGU_INTEN_TRIGGERED15_Msk (0x1UL << EGU_INTEN_TRIGGERED15_Pos) /*!< Bit mask of TRIGGERED15 field. */ +#define EGU_INTEN_TRIGGERED15_Disabled (0UL) /*!< Disable */ +#define EGU_INTEN_TRIGGERED15_Enabled (1UL) /*!< Enable */ + +/* Bit 14 : Enable or disable interrupt for TRIGGERED[14] event */ +#define EGU_INTEN_TRIGGERED14_Pos (14UL) /*!< Position of TRIGGERED14 field. */ +#define EGU_INTEN_TRIGGERED14_Msk (0x1UL << EGU_INTEN_TRIGGERED14_Pos) /*!< Bit mask of TRIGGERED14 field. */ +#define EGU_INTEN_TRIGGERED14_Disabled (0UL) /*!< Disable */ +#define EGU_INTEN_TRIGGERED14_Enabled (1UL) /*!< Enable */ + +/* Bit 13 : Enable or disable interrupt for TRIGGERED[13] event */ +#define EGU_INTEN_TRIGGERED13_Pos (13UL) /*!< Position of TRIGGERED13 field. */ +#define EGU_INTEN_TRIGGERED13_Msk (0x1UL << EGU_INTEN_TRIGGERED13_Pos) /*!< Bit mask of TRIGGERED13 field. */ +#define EGU_INTEN_TRIGGERED13_Disabled (0UL) /*!< Disable */ +#define EGU_INTEN_TRIGGERED13_Enabled (1UL) /*!< Enable */ + +/* Bit 12 : Enable or disable interrupt for TRIGGERED[12] event */ +#define EGU_INTEN_TRIGGERED12_Pos (12UL) /*!< Position of TRIGGERED12 field. */ +#define EGU_INTEN_TRIGGERED12_Msk (0x1UL << EGU_INTEN_TRIGGERED12_Pos) /*!< Bit mask of TRIGGERED12 field. */ +#define EGU_INTEN_TRIGGERED12_Disabled (0UL) /*!< Disable */ +#define EGU_INTEN_TRIGGERED12_Enabled (1UL) /*!< Enable */ + +/* Bit 11 : Enable or disable interrupt for TRIGGERED[11] event */ +#define EGU_INTEN_TRIGGERED11_Pos (11UL) /*!< Position of TRIGGERED11 field. */ +#define EGU_INTEN_TRIGGERED11_Msk (0x1UL << EGU_INTEN_TRIGGERED11_Pos) /*!< Bit mask of TRIGGERED11 field. */ +#define EGU_INTEN_TRIGGERED11_Disabled (0UL) /*!< Disable */ +#define EGU_INTEN_TRIGGERED11_Enabled (1UL) /*!< Enable */ + +/* Bit 10 : Enable or disable interrupt for TRIGGERED[10] event */ +#define EGU_INTEN_TRIGGERED10_Pos (10UL) /*!< Position of TRIGGERED10 field. */ +#define EGU_INTEN_TRIGGERED10_Msk (0x1UL << EGU_INTEN_TRIGGERED10_Pos) /*!< Bit mask of TRIGGERED10 field. */ +#define EGU_INTEN_TRIGGERED10_Disabled (0UL) /*!< Disable */ +#define EGU_INTEN_TRIGGERED10_Enabled (1UL) /*!< Enable */ + +/* Bit 9 : Enable or disable interrupt for TRIGGERED[9] event */ +#define EGU_INTEN_TRIGGERED9_Pos (9UL) /*!< Position of TRIGGERED9 field. */ +#define EGU_INTEN_TRIGGERED9_Msk (0x1UL << EGU_INTEN_TRIGGERED9_Pos) /*!< Bit mask of TRIGGERED9 field. */ +#define EGU_INTEN_TRIGGERED9_Disabled (0UL) /*!< Disable */ +#define EGU_INTEN_TRIGGERED9_Enabled (1UL) /*!< Enable */ + +/* Bit 8 : Enable or disable interrupt for TRIGGERED[8] event */ +#define EGU_INTEN_TRIGGERED8_Pos (8UL) /*!< Position of TRIGGERED8 field. */ +#define EGU_INTEN_TRIGGERED8_Msk (0x1UL << EGU_INTEN_TRIGGERED8_Pos) /*!< Bit mask of TRIGGERED8 field. */ +#define EGU_INTEN_TRIGGERED8_Disabled (0UL) /*!< Disable */ +#define EGU_INTEN_TRIGGERED8_Enabled (1UL) /*!< Enable */ + +/* Bit 7 : Enable or disable interrupt for TRIGGERED[7] event */ +#define EGU_INTEN_TRIGGERED7_Pos (7UL) /*!< Position of TRIGGERED7 field. */ +#define EGU_INTEN_TRIGGERED7_Msk (0x1UL << EGU_INTEN_TRIGGERED7_Pos) /*!< Bit mask of TRIGGERED7 field. */ +#define EGU_INTEN_TRIGGERED7_Disabled (0UL) /*!< Disable */ +#define EGU_INTEN_TRIGGERED7_Enabled (1UL) /*!< Enable */ + +/* Bit 6 : Enable or disable interrupt for TRIGGERED[6] event */ +#define EGU_INTEN_TRIGGERED6_Pos (6UL) /*!< Position of TRIGGERED6 field. */ +#define EGU_INTEN_TRIGGERED6_Msk (0x1UL << EGU_INTEN_TRIGGERED6_Pos) /*!< Bit mask of TRIGGERED6 field. */ +#define EGU_INTEN_TRIGGERED6_Disabled (0UL) /*!< Disable */ +#define EGU_INTEN_TRIGGERED6_Enabled (1UL) /*!< Enable */ + +/* Bit 5 : Enable or disable interrupt for TRIGGERED[5] event */ +#define EGU_INTEN_TRIGGERED5_Pos (5UL) /*!< Position of TRIGGERED5 field. */ +#define EGU_INTEN_TRIGGERED5_Msk (0x1UL << EGU_INTEN_TRIGGERED5_Pos) /*!< Bit mask of TRIGGERED5 field. */ +#define EGU_INTEN_TRIGGERED5_Disabled (0UL) /*!< Disable */ +#define EGU_INTEN_TRIGGERED5_Enabled (1UL) /*!< Enable */ + +/* Bit 4 : Enable or disable interrupt for TRIGGERED[4] event */ +#define EGU_INTEN_TRIGGERED4_Pos (4UL) /*!< Position of TRIGGERED4 field. */ +#define EGU_INTEN_TRIGGERED4_Msk (0x1UL << EGU_INTEN_TRIGGERED4_Pos) /*!< Bit mask of TRIGGERED4 field. */ +#define EGU_INTEN_TRIGGERED4_Disabled (0UL) /*!< Disable */ +#define EGU_INTEN_TRIGGERED4_Enabled (1UL) /*!< Enable */ + +/* Bit 3 : Enable or disable interrupt for TRIGGERED[3] event */ +#define EGU_INTEN_TRIGGERED3_Pos (3UL) /*!< Position of TRIGGERED3 field. */ +#define EGU_INTEN_TRIGGERED3_Msk (0x1UL << EGU_INTEN_TRIGGERED3_Pos) /*!< Bit mask of TRIGGERED3 field. */ +#define EGU_INTEN_TRIGGERED3_Disabled (0UL) /*!< Disable */ +#define EGU_INTEN_TRIGGERED3_Enabled (1UL) /*!< Enable */ + +/* Bit 2 : Enable or disable interrupt for TRIGGERED[2] event */ +#define EGU_INTEN_TRIGGERED2_Pos (2UL) /*!< Position of TRIGGERED2 field. */ +#define EGU_INTEN_TRIGGERED2_Msk (0x1UL << EGU_INTEN_TRIGGERED2_Pos) /*!< Bit mask of TRIGGERED2 field. */ +#define EGU_INTEN_TRIGGERED2_Disabled (0UL) /*!< Disable */ +#define EGU_INTEN_TRIGGERED2_Enabled (1UL) /*!< Enable */ + +/* Bit 1 : Enable or disable interrupt for TRIGGERED[1] event */ +#define EGU_INTEN_TRIGGERED1_Pos (1UL) /*!< Position of TRIGGERED1 field. */ +#define EGU_INTEN_TRIGGERED1_Msk (0x1UL << EGU_INTEN_TRIGGERED1_Pos) /*!< Bit mask of TRIGGERED1 field. */ +#define EGU_INTEN_TRIGGERED1_Disabled (0UL) /*!< Disable */ +#define EGU_INTEN_TRIGGERED1_Enabled (1UL) /*!< Enable */ + +/* Bit 0 : Enable or disable interrupt for TRIGGERED[0] event */ +#define EGU_INTEN_TRIGGERED0_Pos (0UL) /*!< Position of TRIGGERED0 field. */ +#define EGU_INTEN_TRIGGERED0_Msk (0x1UL << EGU_INTEN_TRIGGERED0_Pos) /*!< Bit mask of TRIGGERED0 field. */ +#define EGU_INTEN_TRIGGERED0_Disabled (0UL) /*!< Disable */ +#define EGU_INTEN_TRIGGERED0_Enabled (1UL) /*!< Enable */ + +/* Register: EGU_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 15 : Write '1' to Enable interrupt for TRIGGERED[15] event */ +#define EGU_INTENSET_TRIGGERED15_Pos (15UL) /*!< Position of TRIGGERED15 field. */ +#define EGU_INTENSET_TRIGGERED15_Msk (0x1UL << EGU_INTENSET_TRIGGERED15_Pos) /*!< Bit mask of TRIGGERED15 field. */ +#define EGU_INTENSET_TRIGGERED15_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENSET_TRIGGERED15_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENSET_TRIGGERED15_Set (1UL) /*!< Enable */ + +/* Bit 14 : Write '1' to Enable interrupt for TRIGGERED[14] event */ +#define EGU_INTENSET_TRIGGERED14_Pos (14UL) /*!< Position of TRIGGERED14 field. */ +#define EGU_INTENSET_TRIGGERED14_Msk (0x1UL << EGU_INTENSET_TRIGGERED14_Pos) /*!< Bit mask of TRIGGERED14 field. */ +#define EGU_INTENSET_TRIGGERED14_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENSET_TRIGGERED14_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENSET_TRIGGERED14_Set (1UL) /*!< Enable */ + +/* Bit 13 : Write '1' to Enable interrupt for TRIGGERED[13] event */ +#define EGU_INTENSET_TRIGGERED13_Pos (13UL) /*!< Position of TRIGGERED13 field. */ +#define EGU_INTENSET_TRIGGERED13_Msk (0x1UL << EGU_INTENSET_TRIGGERED13_Pos) /*!< Bit mask of TRIGGERED13 field. */ +#define EGU_INTENSET_TRIGGERED13_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENSET_TRIGGERED13_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENSET_TRIGGERED13_Set (1UL) /*!< Enable */ + +/* Bit 12 : Write '1' to Enable interrupt for TRIGGERED[12] event */ +#define EGU_INTENSET_TRIGGERED12_Pos (12UL) /*!< Position of TRIGGERED12 field. */ +#define EGU_INTENSET_TRIGGERED12_Msk (0x1UL << EGU_INTENSET_TRIGGERED12_Pos) /*!< Bit mask of TRIGGERED12 field. */ +#define EGU_INTENSET_TRIGGERED12_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENSET_TRIGGERED12_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENSET_TRIGGERED12_Set (1UL) /*!< Enable */ + +/* Bit 11 : Write '1' to Enable interrupt for TRIGGERED[11] event */ +#define EGU_INTENSET_TRIGGERED11_Pos (11UL) /*!< Position of TRIGGERED11 field. */ +#define EGU_INTENSET_TRIGGERED11_Msk (0x1UL << EGU_INTENSET_TRIGGERED11_Pos) /*!< Bit mask of TRIGGERED11 field. */ +#define EGU_INTENSET_TRIGGERED11_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENSET_TRIGGERED11_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENSET_TRIGGERED11_Set (1UL) /*!< Enable */ + +/* Bit 10 : Write '1' to Enable interrupt for TRIGGERED[10] event */ +#define EGU_INTENSET_TRIGGERED10_Pos (10UL) /*!< Position of TRIGGERED10 field. */ +#define EGU_INTENSET_TRIGGERED10_Msk (0x1UL << EGU_INTENSET_TRIGGERED10_Pos) /*!< Bit mask of TRIGGERED10 field. */ +#define EGU_INTENSET_TRIGGERED10_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENSET_TRIGGERED10_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENSET_TRIGGERED10_Set (1UL) /*!< Enable */ + +/* Bit 9 : Write '1' to Enable interrupt for TRIGGERED[9] event */ +#define EGU_INTENSET_TRIGGERED9_Pos (9UL) /*!< Position of TRIGGERED9 field. */ +#define EGU_INTENSET_TRIGGERED9_Msk (0x1UL << EGU_INTENSET_TRIGGERED9_Pos) /*!< Bit mask of TRIGGERED9 field. */ +#define EGU_INTENSET_TRIGGERED9_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENSET_TRIGGERED9_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENSET_TRIGGERED9_Set (1UL) /*!< Enable */ + +/* Bit 8 : Write '1' to Enable interrupt for TRIGGERED[8] event */ +#define EGU_INTENSET_TRIGGERED8_Pos (8UL) /*!< Position of TRIGGERED8 field. */ +#define EGU_INTENSET_TRIGGERED8_Msk (0x1UL << EGU_INTENSET_TRIGGERED8_Pos) /*!< Bit mask of TRIGGERED8 field. */ +#define EGU_INTENSET_TRIGGERED8_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENSET_TRIGGERED8_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENSET_TRIGGERED8_Set (1UL) /*!< Enable */ + +/* Bit 7 : Write '1' to Enable interrupt for TRIGGERED[7] event */ +#define EGU_INTENSET_TRIGGERED7_Pos (7UL) /*!< Position of TRIGGERED7 field. */ +#define EGU_INTENSET_TRIGGERED7_Msk (0x1UL << EGU_INTENSET_TRIGGERED7_Pos) /*!< Bit mask of TRIGGERED7 field. */ +#define EGU_INTENSET_TRIGGERED7_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENSET_TRIGGERED7_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENSET_TRIGGERED7_Set (1UL) /*!< Enable */ + +/* Bit 6 : Write '1' to Enable interrupt for TRIGGERED[6] event */ +#define EGU_INTENSET_TRIGGERED6_Pos (6UL) /*!< Position of TRIGGERED6 field. */ +#define EGU_INTENSET_TRIGGERED6_Msk (0x1UL << EGU_INTENSET_TRIGGERED6_Pos) /*!< Bit mask of TRIGGERED6 field. */ +#define EGU_INTENSET_TRIGGERED6_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENSET_TRIGGERED6_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENSET_TRIGGERED6_Set (1UL) /*!< Enable */ + +/* Bit 5 : Write '1' to Enable interrupt for TRIGGERED[5] event */ +#define EGU_INTENSET_TRIGGERED5_Pos (5UL) /*!< Position of TRIGGERED5 field. */ +#define EGU_INTENSET_TRIGGERED5_Msk (0x1UL << EGU_INTENSET_TRIGGERED5_Pos) /*!< Bit mask of TRIGGERED5 field. */ +#define EGU_INTENSET_TRIGGERED5_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENSET_TRIGGERED5_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENSET_TRIGGERED5_Set (1UL) /*!< Enable */ + +/* Bit 4 : Write '1' to Enable interrupt for TRIGGERED[4] event */ +#define EGU_INTENSET_TRIGGERED4_Pos (4UL) /*!< Position of TRIGGERED4 field. */ +#define EGU_INTENSET_TRIGGERED4_Msk (0x1UL << EGU_INTENSET_TRIGGERED4_Pos) /*!< Bit mask of TRIGGERED4 field. */ +#define EGU_INTENSET_TRIGGERED4_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENSET_TRIGGERED4_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENSET_TRIGGERED4_Set (1UL) /*!< Enable */ + +/* Bit 3 : Write '1' to Enable interrupt for TRIGGERED[3] event */ +#define EGU_INTENSET_TRIGGERED3_Pos (3UL) /*!< Position of TRIGGERED3 field. */ +#define EGU_INTENSET_TRIGGERED3_Msk (0x1UL << EGU_INTENSET_TRIGGERED3_Pos) /*!< Bit mask of TRIGGERED3 field. */ +#define EGU_INTENSET_TRIGGERED3_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENSET_TRIGGERED3_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENSET_TRIGGERED3_Set (1UL) /*!< Enable */ + +/* Bit 2 : Write '1' to Enable interrupt for TRIGGERED[2] event */ +#define EGU_INTENSET_TRIGGERED2_Pos (2UL) /*!< Position of TRIGGERED2 field. */ +#define EGU_INTENSET_TRIGGERED2_Msk (0x1UL << EGU_INTENSET_TRIGGERED2_Pos) /*!< Bit mask of TRIGGERED2 field. */ +#define EGU_INTENSET_TRIGGERED2_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENSET_TRIGGERED2_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENSET_TRIGGERED2_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for TRIGGERED[1] event */ +#define EGU_INTENSET_TRIGGERED1_Pos (1UL) /*!< Position of TRIGGERED1 field. */ +#define EGU_INTENSET_TRIGGERED1_Msk (0x1UL << EGU_INTENSET_TRIGGERED1_Pos) /*!< Bit mask of TRIGGERED1 field. */ +#define EGU_INTENSET_TRIGGERED1_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENSET_TRIGGERED1_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENSET_TRIGGERED1_Set (1UL) /*!< Enable */ + +/* Bit 0 : Write '1' to Enable interrupt for TRIGGERED[0] event */ +#define EGU_INTENSET_TRIGGERED0_Pos (0UL) /*!< Position of TRIGGERED0 field. */ +#define EGU_INTENSET_TRIGGERED0_Msk (0x1UL << EGU_INTENSET_TRIGGERED0_Pos) /*!< Bit mask of TRIGGERED0 field. */ +#define EGU_INTENSET_TRIGGERED0_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENSET_TRIGGERED0_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENSET_TRIGGERED0_Set (1UL) /*!< Enable */ + +/* Register: EGU_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 15 : Write '1' to Disable interrupt for TRIGGERED[15] event */ +#define EGU_INTENCLR_TRIGGERED15_Pos (15UL) /*!< Position of TRIGGERED15 field. */ +#define EGU_INTENCLR_TRIGGERED15_Msk (0x1UL << EGU_INTENCLR_TRIGGERED15_Pos) /*!< Bit mask of TRIGGERED15 field. */ +#define EGU_INTENCLR_TRIGGERED15_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENCLR_TRIGGERED15_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENCLR_TRIGGERED15_Clear (1UL) /*!< Disable */ + +/* Bit 14 : Write '1' to Disable interrupt for TRIGGERED[14] event */ +#define EGU_INTENCLR_TRIGGERED14_Pos (14UL) /*!< Position of TRIGGERED14 field. */ +#define EGU_INTENCLR_TRIGGERED14_Msk (0x1UL << EGU_INTENCLR_TRIGGERED14_Pos) /*!< Bit mask of TRIGGERED14 field. */ +#define EGU_INTENCLR_TRIGGERED14_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENCLR_TRIGGERED14_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENCLR_TRIGGERED14_Clear (1UL) /*!< Disable */ + +/* Bit 13 : Write '1' to Disable interrupt for TRIGGERED[13] event */ +#define EGU_INTENCLR_TRIGGERED13_Pos (13UL) /*!< Position of TRIGGERED13 field. */ +#define EGU_INTENCLR_TRIGGERED13_Msk (0x1UL << EGU_INTENCLR_TRIGGERED13_Pos) /*!< Bit mask of TRIGGERED13 field. */ +#define EGU_INTENCLR_TRIGGERED13_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENCLR_TRIGGERED13_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENCLR_TRIGGERED13_Clear (1UL) /*!< Disable */ + +/* Bit 12 : Write '1' to Disable interrupt for TRIGGERED[12] event */ +#define EGU_INTENCLR_TRIGGERED12_Pos (12UL) /*!< Position of TRIGGERED12 field. */ +#define EGU_INTENCLR_TRIGGERED12_Msk (0x1UL << EGU_INTENCLR_TRIGGERED12_Pos) /*!< Bit mask of TRIGGERED12 field. */ +#define EGU_INTENCLR_TRIGGERED12_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENCLR_TRIGGERED12_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENCLR_TRIGGERED12_Clear (1UL) /*!< Disable */ + +/* Bit 11 : Write '1' to Disable interrupt for TRIGGERED[11] event */ +#define EGU_INTENCLR_TRIGGERED11_Pos (11UL) /*!< Position of TRIGGERED11 field. */ +#define EGU_INTENCLR_TRIGGERED11_Msk (0x1UL << EGU_INTENCLR_TRIGGERED11_Pos) /*!< Bit mask of TRIGGERED11 field. */ +#define EGU_INTENCLR_TRIGGERED11_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENCLR_TRIGGERED11_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENCLR_TRIGGERED11_Clear (1UL) /*!< Disable */ + +/* Bit 10 : Write '1' to Disable interrupt for TRIGGERED[10] event */ +#define EGU_INTENCLR_TRIGGERED10_Pos (10UL) /*!< Position of TRIGGERED10 field. */ +#define EGU_INTENCLR_TRIGGERED10_Msk (0x1UL << EGU_INTENCLR_TRIGGERED10_Pos) /*!< Bit mask of TRIGGERED10 field. */ +#define EGU_INTENCLR_TRIGGERED10_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENCLR_TRIGGERED10_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENCLR_TRIGGERED10_Clear (1UL) /*!< Disable */ + +/* Bit 9 : Write '1' to Disable interrupt for TRIGGERED[9] event */ +#define EGU_INTENCLR_TRIGGERED9_Pos (9UL) /*!< Position of TRIGGERED9 field. */ +#define EGU_INTENCLR_TRIGGERED9_Msk (0x1UL << EGU_INTENCLR_TRIGGERED9_Pos) /*!< Bit mask of TRIGGERED9 field. */ +#define EGU_INTENCLR_TRIGGERED9_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENCLR_TRIGGERED9_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENCLR_TRIGGERED9_Clear (1UL) /*!< Disable */ + +/* Bit 8 : Write '1' to Disable interrupt for TRIGGERED[8] event */ +#define EGU_INTENCLR_TRIGGERED8_Pos (8UL) /*!< Position of TRIGGERED8 field. */ +#define EGU_INTENCLR_TRIGGERED8_Msk (0x1UL << EGU_INTENCLR_TRIGGERED8_Pos) /*!< Bit mask of TRIGGERED8 field. */ +#define EGU_INTENCLR_TRIGGERED8_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENCLR_TRIGGERED8_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENCLR_TRIGGERED8_Clear (1UL) /*!< Disable */ + +/* Bit 7 : Write '1' to Disable interrupt for TRIGGERED[7] event */ +#define EGU_INTENCLR_TRIGGERED7_Pos (7UL) /*!< Position of TRIGGERED7 field. */ +#define EGU_INTENCLR_TRIGGERED7_Msk (0x1UL << EGU_INTENCLR_TRIGGERED7_Pos) /*!< Bit mask of TRIGGERED7 field. */ +#define EGU_INTENCLR_TRIGGERED7_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENCLR_TRIGGERED7_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENCLR_TRIGGERED7_Clear (1UL) /*!< Disable */ + +/* Bit 6 : Write '1' to Disable interrupt for TRIGGERED[6] event */ +#define EGU_INTENCLR_TRIGGERED6_Pos (6UL) /*!< Position of TRIGGERED6 field. */ +#define EGU_INTENCLR_TRIGGERED6_Msk (0x1UL << EGU_INTENCLR_TRIGGERED6_Pos) /*!< Bit mask of TRIGGERED6 field. */ +#define EGU_INTENCLR_TRIGGERED6_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENCLR_TRIGGERED6_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENCLR_TRIGGERED6_Clear (1UL) /*!< Disable */ + +/* Bit 5 : Write '1' to Disable interrupt for TRIGGERED[5] event */ +#define EGU_INTENCLR_TRIGGERED5_Pos (5UL) /*!< Position of TRIGGERED5 field. */ +#define EGU_INTENCLR_TRIGGERED5_Msk (0x1UL << EGU_INTENCLR_TRIGGERED5_Pos) /*!< Bit mask of TRIGGERED5 field. */ +#define EGU_INTENCLR_TRIGGERED5_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENCLR_TRIGGERED5_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENCLR_TRIGGERED5_Clear (1UL) /*!< Disable */ + +/* Bit 4 : Write '1' to Disable interrupt for TRIGGERED[4] event */ +#define EGU_INTENCLR_TRIGGERED4_Pos (4UL) /*!< Position of TRIGGERED4 field. */ +#define EGU_INTENCLR_TRIGGERED4_Msk (0x1UL << EGU_INTENCLR_TRIGGERED4_Pos) /*!< Bit mask of TRIGGERED4 field. */ +#define EGU_INTENCLR_TRIGGERED4_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENCLR_TRIGGERED4_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENCLR_TRIGGERED4_Clear (1UL) /*!< Disable */ + +/* Bit 3 : Write '1' to Disable interrupt for TRIGGERED[3] event */ +#define EGU_INTENCLR_TRIGGERED3_Pos (3UL) /*!< Position of TRIGGERED3 field. */ +#define EGU_INTENCLR_TRIGGERED3_Msk (0x1UL << EGU_INTENCLR_TRIGGERED3_Pos) /*!< Bit mask of TRIGGERED3 field. */ +#define EGU_INTENCLR_TRIGGERED3_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENCLR_TRIGGERED3_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENCLR_TRIGGERED3_Clear (1UL) /*!< Disable */ + +/* Bit 2 : Write '1' to Disable interrupt for TRIGGERED[2] event */ +#define EGU_INTENCLR_TRIGGERED2_Pos (2UL) /*!< Position of TRIGGERED2 field. */ +#define EGU_INTENCLR_TRIGGERED2_Msk (0x1UL << EGU_INTENCLR_TRIGGERED2_Pos) /*!< Bit mask of TRIGGERED2 field. */ +#define EGU_INTENCLR_TRIGGERED2_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENCLR_TRIGGERED2_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENCLR_TRIGGERED2_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for TRIGGERED[1] event */ +#define EGU_INTENCLR_TRIGGERED1_Pos (1UL) /*!< Position of TRIGGERED1 field. */ +#define EGU_INTENCLR_TRIGGERED1_Msk (0x1UL << EGU_INTENCLR_TRIGGERED1_Pos) /*!< Bit mask of TRIGGERED1 field. */ +#define EGU_INTENCLR_TRIGGERED1_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENCLR_TRIGGERED1_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENCLR_TRIGGERED1_Clear (1UL) /*!< Disable */ + +/* Bit 0 : Write '1' to Disable interrupt for TRIGGERED[0] event */ +#define EGU_INTENCLR_TRIGGERED0_Pos (0UL) /*!< Position of TRIGGERED0 field. */ +#define EGU_INTENCLR_TRIGGERED0_Msk (0x1UL << EGU_INTENCLR_TRIGGERED0_Pos) /*!< Bit mask of TRIGGERED0 field. */ +#define EGU_INTENCLR_TRIGGERED0_Disabled (0UL) /*!< Read: Disabled */ +#define EGU_INTENCLR_TRIGGERED0_Enabled (1UL) /*!< Read: Enabled */ +#define EGU_INTENCLR_TRIGGERED0_Clear (1UL) /*!< Disable */ + + +/* Peripheral: FICR */ +/* Description: Factory Information Configuration Registers */ + +/* Register: FICR_CODEPAGESIZE */ +/* Description: Code memory page size */ + +/* Bits 31..0 : Code memory page size */ +#define FICR_CODEPAGESIZE_CODEPAGESIZE_Pos (0UL) /*!< Position of CODEPAGESIZE field. */ +#define FICR_CODEPAGESIZE_CODEPAGESIZE_Msk (0xFFFFFFFFUL << FICR_CODEPAGESIZE_CODEPAGESIZE_Pos) /*!< Bit mask of CODEPAGESIZE field. */ + +/* Register: FICR_CODESIZE */ +/* Description: Code memory size */ + +/* Bits 31..0 : Code memory size in number of pages */ +#define FICR_CODESIZE_CODESIZE_Pos (0UL) /*!< Position of CODESIZE field. */ +#define FICR_CODESIZE_CODESIZE_Msk (0xFFFFFFFFUL << FICR_CODESIZE_CODESIZE_Pos) /*!< Bit mask of CODESIZE field. */ + +/* Register: FICR_DEVICEID */ +/* Description: Description collection[0]: Device identifier */ + +/* Bits 31..0 : 64 bit unique device identifier */ +#define FICR_DEVICEID_DEVICEID_Pos (0UL) /*!< Position of DEVICEID field. */ +#define FICR_DEVICEID_DEVICEID_Msk (0xFFFFFFFFUL << FICR_DEVICEID_DEVICEID_Pos) /*!< Bit mask of DEVICEID field. */ + +/* Register: FICR_ER */ +/* Description: Description collection[0]: Encryption Root, word 0 */ + +/* Bits 31..0 : Encryption Root, word n */ +#define FICR_ER_ER_Pos (0UL) /*!< Position of ER field. */ +#define FICR_ER_ER_Msk (0xFFFFFFFFUL << FICR_ER_ER_Pos) /*!< Bit mask of ER field. */ + +/* Register: FICR_IR */ +/* Description: Description collection[0]: Identity Root, word 0 */ + +/* Bits 31..0 : Identity Root, word n */ +#define FICR_IR_IR_Pos (0UL) /*!< Position of IR field. */ +#define FICR_IR_IR_Msk (0xFFFFFFFFUL << FICR_IR_IR_Pos) /*!< Bit mask of IR field. */ + +/* Register: FICR_DEVICEADDRTYPE */ +/* Description: Device address type */ + +/* Bit 0 : Device address type */ +#define FICR_DEVICEADDRTYPE_DEVICEADDRTYPE_Pos (0UL) /*!< Position of DEVICEADDRTYPE field. */ +#define FICR_DEVICEADDRTYPE_DEVICEADDRTYPE_Msk (0x1UL << FICR_DEVICEADDRTYPE_DEVICEADDRTYPE_Pos) /*!< Bit mask of DEVICEADDRTYPE field. */ +#define FICR_DEVICEADDRTYPE_DEVICEADDRTYPE_Public (0UL) /*!< Public address */ +#define FICR_DEVICEADDRTYPE_DEVICEADDRTYPE_Random (1UL) /*!< Random address */ + +/* Register: FICR_DEVICEADDR */ +/* Description: Description collection[0]: Device address 0 */ + +/* Bits 31..0 : 48 bit device address */ +#define FICR_DEVICEADDR_DEVICEADDR_Pos (0UL) /*!< Position of DEVICEADDR field. */ +#define FICR_DEVICEADDR_DEVICEADDR_Msk (0xFFFFFFFFUL << FICR_DEVICEADDR_DEVICEADDR_Pos) /*!< Bit mask of DEVICEADDR field. */ + +/* Register: FICR_INFO_PART */ +/* Description: Part code */ + +/* Bits 31..0 : Part code */ +#define FICR_INFO_PART_PART_Pos (0UL) /*!< Position of PART field. */ +#define FICR_INFO_PART_PART_Msk (0xFFFFFFFFUL << FICR_INFO_PART_PART_Pos) /*!< Bit mask of PART field. */ +#define FICR_INFO_PART_PART_N52832 (0x52832UL) /*!< nRF52832 */ +#define FICR_INFO_PART_PART_Unspecified (0xFFFFFFFFUL) /*!< Unspecified */ + +/* Register: FICR_INFO_VARIANT */ +/* Description: Part Variant, Hardware version and Production configuration */ + +/* Bits 31..0 : Part Variant, Hardware version and Production configuration, encoded as ASCII */ +#define FICR_INFO_VARIANT_VARIANT_Pos (0UL) /*!< Position of VARIANT field. */ +#define FICR_INFO_VARIANT_VARIANT_Msk (0xFFFFFFFFUL << FICR_INFO_VARIANT_VARIANT_Pos) /*!< Bit mask of VARIANT field. */ +#define FICR_INFO_VARIANT_VARIANT_AAAA (0x41414141UL) /*!< AAAA */ +#define FICR_INFO_VARIANT_VARIANT_AAAB (0x41414142UL) /*!< AAAB */ +#define FICR_INFO_VARIANT_VARIANT_AABA (0x41414241UL) /*!< AABA */ +#define FICR_INFO_VARIANT_VARIANT_AABB (0x41414242UL) /*!< AABB */ +#define FICR_INFO_VARIANT_VARIANT_Unspecified (0xFFFFFFFFUL) /*!< Unspecified */ + +/* Register: FICR_INFO_PACKAGE */ +/* Description: Package option */ + +/* Bits 31..0 : Package option */ +#define FICR_INFO_PACKAGE_PACKAGE_Pos (0UL) /*!< Position of PACKAGE field. */ +#define FICR_INFO_PACKAGE_PACKAGE_Msk (0xFFFFFFFFUL << FICR_INFO_PACKAGE_PACKAGE_Pos) /*!< Bit mask of PACKAGE field. */ +#define FICR_INFO_PACKAGE_PACKAGE_QF (0x2000UL) /*!< QFxx - 48-pin QFN */ +#define FICR_INFO_PACKAGE_PACKAGE_CH (0x2001UL) /*!< CHxx - 7x8 WLCSP 56 balls */ +#define FICR_INFO_PACKAGE_PACKAGE_Unspecified (0xFFFFFFFFUL) /*!< Unspecified */ + +/* Register: FICR_INFO_RAM */ +/* Description: RAM variant */ + +/* Bits 31..0 : RAM variant */ +#define FICR_INFO_RAM_RAM_Pos (0UL) /*!< Position of RAM field. */ +#define FICR_INFO_RAM_RAM_Msk (0xFFFFFFFFUL << FICR_INFO_RAM_RAM_Pos) /*!< Bit mask of RAM field. */ +#define FICR_INFO_RAM_RAM_K16 (0x10UL) /*!< 16 kByte RAM */ +#define FICR_INFO_RAM_RAM_K32 (0x20UL) /*!< 32 kByte RAM */ +#define FICR_INFO_RAM_RAM_K64 (0x40UL) /*!< 64 kByte RAM */ +#define FICR_INFO_RAM_RAM_Unspecified (0xFFFFFFFFUL) /*!< Unspecified */ + +/* Register: FICR_INFO_FLASH */ +/* Description: Flash variant */ + +/* Bits 31..0 : Flash variant */ +#define FICR_INFO_FLASH_FLASH_Pos (0UL) /*!< Position of FLASH field. */ +#define FICR_INFO_FLASH_FLASH_Msk (0xFFFFFFFFUL << FICR_INFO_FLASH_FLASH_Pos) /*!< Bit mask of FLASH field. */ +#define FICR_INFO_FLASH_FLASH_K128 (0x80UL) /*!< 128 kByte FLASH */ +#define FICR_INFO_FLASH_FLASH_K256 (0x100UL) /*!< 256 kByte FLASH */ +#define FICR_INFO_FLASH_FLASH_K512 (0x200UL) /*!< 512 kByte FLASH */ +#define FICR_INFO_FLASH_FLASH_Unspecified (0xFFFFFFFFUL) /*!< Unspecified */ + +/* Register: FICR_TEMP_A0 */ +/* Description: Slope definition A0. */ + +/* Bits 11..0 : A (slope definition) register. */ +#define FICR_TEMP_A0_A_Pos (0UL) /*!< Position of A field. */ +#define FICR_TEMP_A0_A_Msk (0xFFFUL << FICR_TEMP_A0_A_Pos) /*!< Bit mask of A field. */ + +/* Register: FICR_TEMP_A1 */ +/* Description: Slope definition A1. */ + +/* Bits 11..0 : A (slope definition) register. */ +#define FICR_TEMP_A1_A_Pos (0UL) /*!< Position of A field. */ +#define FICR_TEMP_A1_A_Msk (0xFFFUL << FICR_TEMP_A1_A_Pos) /*!< Bit mask of A field. */ + +/* Register: FICR_TEMP_A2 */ +/* Description: Slope definition A2. */ + +/* Bits 11..0 : A (slope definition) register. */ +#define FICR_TEMP_A2_A_Pos (0UL) /*!< Position of A field. */ +#define FICR_TEMP_A2_A_Msk (0xFFFUL << FICR_TEMP_A2_A_Pos) /*!< Bit mask of A field. */ + +/* Register: FICR_TEMP_A3 */ +/* Description: Slope definition A3. */ + +/* Bits 11..0 : A (slope definition) register. */ +#define FICR_TEMP_A3_A_Pos (0UL) /*!< Position of A field. */ +#define FICR_TEMP_A3_A_Msk (0xFFFUL << FICR_TEMP_A3_A_Pos) /*!< Bit mask of A field. */ + +/* Register: FICR_TEMP_A4 */ +/* Description: Slope definition A4. */ + +/* Bits 11..0 : A (slope definition) register. */ +#define FICR_TEMP_A4_A_Pos (0UL) /*!< Position of A field. */ +#define FICR_TEMP_A4_A_Msk (0xFFFUL << FICR_TEMP_A4_A_Pos) /*!< Bit mask of A field. */ + +/* Register: FICR_TEMP_A5 */ +/* Description: Slope definition A5. */ + +/* Bits 11..0 : A (slope definition) register. */ +#define FICR_TEMP_A5_A_Pos (0UL) /*!< Position of A field. */ +#define FICR_TEMP_A5_A_Msk (0xFFFUL << FICR_TEMP_A5_A_Pos) /*!< Bit mask of A field. */ + +/* Register: FICR_TEMP_B0 */ +/* Description: y-intercept B0. */ + +/* Bits 13..0 : B (y-intercept) */ +#define FICR_TEMP_B0_B_Pos (0UL) /*!< Position of B field. */ +#define FICR_TEMP_B0_B_Msk (0x3FFFUL << FICR_TEMP_B0_B_Pos) /*!< Bit mask of B field. */ + +/* Register: FICR_TEMP_B1 */ +/* Description: y-intercept B1. */ + +/* Bits 13..0 : B (y-intercept) */ +#define FICR_TEMP_B1_B_Pos (0UL) /*!< Position of B field. */ +#define FICR_TEMP_B1_B_Msk (0x3FFFUL << FICR_TEMP_B1_B_Pos) /*!< Bit mask of B field. */ + +/* Register: FICR_TEMP_B2 */ +/* Description: y-intercept B2. */ + +/* Bits 13..0 : B (y-intercept) */ +#define FICR_TEMP_B2_B_Pos (0UL) /*!< Position of B field. */ +#define FICR_TEMP_B2_B_Msk (0x3FFFUL << FICR_TEMP_B2_B_Pos) /*!< Bit mask of B field. */ + +/* Register: FICR_TEMP_B3 */ +/* Description: y-intercept B3. */ + +/* Bits 13..0 : B (y-intercept) */ +#define FICR_TEMP_B3_B_Pos (0UL) /*!< Position of B field. */ +#define FICR_TEMP_B3_B_Msk (0x3FFFUL << FICR_TEMP_B3_B_Pos) /*!< Bit mask of B field. */ + +/* Register: FICR_TEMP_B4 */ +/* Description: y-intercept B4. */ + +/* Bits 13..0 : B (y-intercept) */ +#define FICR_TEMP_B4_B_Pos (0UL) /*!< Position of B field. */ +#define FICR_TEMP_B4_B_Msk (0x3FFFUL << FICR_TEMP_B4_B_Pos) /*!< Bit mask of B field. */ + +/* Register: FICR_TEMP_B5 */ +/* Description: y-intercept B5. */ + +/* Bits 13..0 : B (y-intercept) */ +#define FICR_TEMP_B5_B_Pos (0UL) /*!< Position of B field. */ +#define FICR_TEMP_B5_B_Msk (0x3FFFUL << FICR_TEMP_B5_B_Pos) /*!< Bit mask of B field. */ + +/* Register: FICR_TEMP_T0 */ +/* Description: Segment end T0. */ + +/* Bits 7..0 : T (segment end)register. */ +#define FICR_TEMP_T0_T_Pos (0UL) /*!< Position of T field. */ +#define FICR_TEMP_T0_T_Msk (0xFFUL << FICR_TEMP_T0_T_Pos) /*!< Bit mask of T field. */ + +/* Register: FICR_TEMP_T1 */ +/* Description: Segment end T1. */ + +/* Bits 7..0 : T (segment end)register. */ +#define FICR_TEMP_T1_T_Pos (0UL) /*!< Position of T field. */ +#define FICR_TEMP_T1_T_Msk (0xFFUL << FICR_TEMP_T1_T_Pos) /*!< Bit mask of T field. */ + +/* Register: FICR_TEMP_T2 */ +/* Description: Segment end T2. */ + +/* Bits 7..0 : T (segment end)register. */ +#define FICR_TEMP_T2_T_Pos (0UL) /*!< Position of T field. */ +#define FICR_TEMP_T2_T_Msk (0xFFUL << FICR_TEMP_T2_T_Pos) /*!< Bit mask of T field. */ + +/* Register: FICR_TEMP_T3 */ +/* Description: Segment end T3. */ + +/* Bits 7..0 : T (segment end)register. */ +#define FICR_TEMP_T3_T_Pos (0UL) /*!< Position of T field. */ +#define FICR_TEMP_T3_T_Msk (0xFFUL << FICR_TEMP_T3_T_Pos) /*!< Bit mask of T field. */ + +/* Register: FICR_TEMP_T4 */ +/* Description: Segment end T4. */ + +/* Bits 7..0 : T (segment end)register. */ +#define FICR_TEMP_T4_T_Pos (0UL) /*!< Position of T field. */ +#define FICR_TEMP_T4_T_Msk (0xFFUL << FICR_TEMP_T4_T_Pos) /*!< Bit mask of T field. */ + +/* Register: FICR_NFC_TAGHEADER0 */ +/* Description: Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. */ + +/* Bits 31..24 : Unique identifier byte 3 */ +#define FICR_NFC_TAGHEADER0_UD3_Pos (24UL) /*!< Position of UD3 field. */ +#define FICR_NFC_TAGHEADER0_UD3_Msk (0xFFUL << FICR_NFC_TAGHEADER0_UD3_Pos) /*!< Bit mask of UD3 field. */ + +/* Bits 23..16 : Unique identifier byte 2 */ +#define FICR_NFC_TAGHEADER0_UD2_Pos (16UL) /*!< Position of UD2 field. */ +#define FICR_NFC_TAGHEADER0_UD2_Msk (0xFFUL << FICR_NFC_TAGHEADER0_UD2_Pos) /*!< Bit mask of UD2 field. */ + +/* Bits 15..8 : Unique identifier byte 1 */ +#define FICR_NFC_TAGHEADER0_UD1_Pos (8UL) /*!< Position of UD1 field. */ +#define FICR_NFC_TAGHEADER0_UD1_Msk (0xFFUL << FICR_NFC_TAGHEADER0_UD1_Pos) /*!< Bit mask of UD1 field. */ + +/* Bits 7..0 : Default Manufacturer ID: Nordic Semiconductor ASA has ICM 0x5F */ +#define FICR_NFC_TAGHEADER0_MFGID_Pos (0UL) /*!< Position of MFGID field. */ +#define FICR_NFC_TAGHEADER0_MFGID_Msk (0xFFUL << FICR_NFC_TAGHEADER0_MFGID_Pos) /*!< Bit mask of MFGID field. */ + +/* Register: FICR_NFC_TAGHEADER1 */ +/* Description: Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. */ + +/* Bits 31..24 : Unique identifier byte 7 */ +#define FICR_NFC_TAGHEADER1_UD7_Pos (24UL) /*!< Position of UD7 field. */ +#define FICR_NFC_TAGHEADER1_UD7_Msk (0xFFUL << FICR_NFC_TAGHEADER1_UD7_Pos) /*!< Bit mask of UD7 field. */ + +/* Bits 23..16 : Unique identifier byte 6 */ +#define FICR_NFC_TAGHEADER1_UD6_Pos (16UL) /*!< Position of UD6 field. */ +#define FICR_NFC_TAGHEADER1_UD6_Msk (0xFFUL << FICR_NFC_TAGHEADER1_UD6_Pos) /*!< Bit mask of UD6 field. */ + +/* Bits 15..8 : Unique identifier byte 5 */ +#define FICR_NFC_TAGHEADER1_UD5_Pos (8UL) /*!< Position of UD5 field. */ +#define FICR_NFC_TAGHEADER1_UD5_Msk (0xFFUL << FICR_NFC_TAGHEADER1_UD5_Pos) /*!< Bit mask of UD5 field. */ + +/* Bits 7..0 : Unique identifier byte 4 */ +#define FICR_NFC_TAGHEADER1_UD4_Pos (0UL) /*!< Position of UD4 field. */ +#define FICR_NFC_TAGHEADER1_UD4_Msk (0xFFUL << FICR_NFC_TAGHEADER1_UD4_Pos) /*!< Bit mask of UD4 field. */ + +/* Register: FICR_NFC_TAGHEADER2 */ +/* Description: Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. */ + +/* Bits 31..24 : Unique identifier byte 11 */ +#define FICR_NFC_TAGHEADER2_UD11_Pos (24UL) /*!< Position of UD11 field. */ +#define FICR_NFC_TAGHEADER2_UD11_Msk (0xFFUL << FICR_NFC_TAGHEADER2_UD11_Pos) /*!< Bit mask of UD11 field. */ + +/* Bits 23..16 : Unique identifier byte 10 */ +#define FICR_NFC_TAGHEADER2_UD10_Pos (16UL) /*!< Position of UD10 field. */ +#define FICR_NFC_TAGHEADER2_UD10_Msk (0xFFUL << FICR_NFC_TAGHEADER2_UD10_Pos) /*!< Bit mask of UD10 field. */ + +/* Bits 15..8 : Unique identifier byte 9 */ +#define FICR_NFC_TAGHEADER2_UD9_Pos (8UL) /*!< Position of UD9 field. */ +#define FICR_NFC_TAGHEADER2_UD9_Msk (0xFFUL << FICR_NFC_TAGHEADER2_UD9_Pos) /*!< Bit mask of UD9 field. */ + +/* Bits 7..0 : Unique identifier byte 8 */ +#define FICR_NFC_TAGHEADER2_UD8_Pos (0UL) /*!< Position of UD8 field. */ +#define FICR_NFC_TAGHEADER2_UD8_Msk (0xFFUL << FICR_NFC_TAGHEADER2_UD8_Pos) /*!< Bit mask of UD8 field. */ + +/* Register: FICR_NFC_TAGHEADER3 */ +/* Description: Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. */ + +/* Bits 31..24 : Unique identifier byte 15 */ +#define FICR_NFC_TAGHEADER3_UD15_Pos (24UL) /*!< Position of UD15 field. */ +#define FICR_NFC_TAGHEADER3_UD15_Msk (0xFFUL << FICR_NFC_TAGHEADER3_UD15_Pos) /*!< Bit mask of UD15 field. */ + +/* Bits 23..16 : Unique identifier byte 14 */ +#define FICR_NFC_TAGHEADER3_UD14_Pos (16UL) /*!< Position of UD14 field. */ +#define FICR_NFC_TAGHEADER3_UD14_Msk (0xFFUL << FICR_NFC_TAGHEADER3_UD14_Pos) /*!< Bit mask of UD14 field. */ + +/* Bits 15..8 : Unique identifier byte 13 */ +#define FICR_NFC_TAGHEADER3_UD13_Pos (8UL) /*!< Position of UD13 field. */ +#define FICR_NFC_TAGHEADER3_UD13_Msk (0xFFUL << FICR_NFC_TAGHEADER3_UD13_Pos) /*!< Bit mask of UD13 field. */ + +/* Bits 7..0 : Unique identifier byte 12 */ +#define FICR_NFC_TAGHEADER3_UD12_Pos (0UL) /*!< Position of UD12 field. */ +#define FICR_NFC_TAGHEADER3_UD12_Msk (0xFFUL << FICR_NFC_TAGHEADER3_UD12_Pos) /*!< Bit mask of UD12 field. */ + + +/* Peripheral: GPIOTE */ +/* Description: GPIO Tasks and Events */ + +/* Register: GPIOTE_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 31 : Write '1' to Enable interrupt for PORT event */ +#define GPIOTE_INTENSET_PORT_Pos (31UL) /*!< Position of PORT field. */ +#define GPIOTE_INTENSET_PORT_Msk (0x1UL << GPIOTE_INTENSET_PORT_Pos) /*!< Bit mask of PORT field. */ +#define GPIOTE_INTENSET_PORT_Disabled (0UL) /*!< Read: Disabled */ +#define GPIOTE_INTENSET_PORT_Enabled (1UL) /*!< Read: Enabled */ +#define GPIOTE_INTENSET_PORT_Set (1UL) /*!< Enable */ + +/* Bit 7 : Write '1' to Enable interrupt for IN[7] event */ +#define GPIOTE_INTENSET_IN7_Pos (7UL) /*!< Position of IN7 field. */ +#define GPIOTE_INTENSET_IN7_Msk (0x1UL << GPIOTE_INTENSET_IN7_Pos) /*!< Bit mask of IN7 field. */ +#define GPIOTE_INTENSET_IN7_Disabled (0UL) /*!< Read: Disabled */ +#define GPIOTE_INTENSET_IN7_Enabled (1UL) /*!< Read: Enabled */ +#define GPIOTE_INTENSET_IN7_Set (1UL) /*!< Enable */ + +/* Bit 6 : Write '1' to Enable interrupt for IN[6] event */ +#define GPIOTE_INTENSET_IN6_Pos (6UL) /*!< Position of IN6 field. */ +#define GPIOTE_INTENSET_IN6_Msk (0x1UL << GPIOTE_INTENSET_IN6_Pos) /*!< Bit mask of IN6 field. */ +#define GPIOTE_INTENSET_IN6_Disabled (0UL) /*!< Read: Disabled */ +#define GPIOTE_INTENSET_IN6_Enabled (1UL) /*!< Read: Enabled */ +#define GPIOTE_INTENSET_IN6_Set (1UL) /*!< Enable */ + +/* Bit 5 : Write '1' to Enable interrupt for IN[5] event */ +#define GPIOTE_INTENSET_IN5_Pos (5UL) /*!< Position of IN5 field. */ +#define GPIOTE_INTENSET_IN5_Msk (0x1UL << GPIOTE_INTENSET_IN5_Pos) /*!< Bit mask of IN5 field. */ +#define GPIOTE_INTENSET_IN5_Disabled (0UL) /*!< Read: Disabled */ +#define GPIOTE_INTENSET_IN5_Enabled (1UL) /*!< Read: Enabled */ +#define GPIOTE_INTENSET_IN5_Set (1UL) /*!< Enable */ + +/* Bit 4 : Write '1' to Enable interrupt for IN[4] event */ +#define GPIOTE_INTENSET_IN4_Pos (4UL) /*!< Position of IN4 field. */ +#define GPIOTE_INTENSET_IN4_Msk (0x1UL << GPIOTE_INTENSET_IN4_Pos) /*!< Bit mask of IN4 field. */ +#define GPIOTE_INTENSET_IN4_Disabled (0UL) /*!< Read: Disabled */ +#define GPIOTE_INTENSET_IN4_Enabled (1UL) /*!< Read: Enabled */ +#define GPIOTE_INTENSET_IN4_Set (1UL) /*!< Enable */ + +/* Bit 3 : Write '1' to Enable interrupt for IN[3] event */ +#define GPIOTE_INTENSET_IN3_Pos (3UL) /*!< Position of IN3 field. */ +#define GPIOTE_INTENSET_IN3_Msk (0x1UL << GPIOTE_INTENSET_IN3_Pos) /*!< Bit mask of IN3 field. */ +#define GPIOTE_INTENSET_IN3_Disabled (0UL) /*!< Read: Disabled */ +#define GPIOTE_INTENSET_IN3_Enabled (1UL) /*!< Read: Enabled */ +#define GPIOTE_INTENSET_IN3_Set (1UL) /*!< Enable */ + +/* Bit 2 : Write '1' to Enable interrupt for IN[2] event */ +#define GPIOTE_INTENSET_IN2_Pos (2UL) /*!< Position of IN2 field. */ +#define GPIOTE_INTENSET_IN2_Msk (0x1UL << GPIOTE_INTENSET_IN2_Pos) /*!< Bit mask of IN2 field. */ +#define GPIOTE_INTENSET_IN2_Disabled (0UL) /*!< Read: Disabled */ +#define GPIOTE_INTENSET_IN2_Enabled (1UL) /*!< Read: Enabled */ +#define GPIOTE_INTENSET_IN2_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for IN[1] event */ +#define GPIOTE_INTENSET_IN1_Pos (1UL) /*!< Position of IN1 field. */ +#define GPIOTE_INTENSET_IN1_Msk (0x1UL << GPIOTE_INTENSET_IN1_Pos) /*!< Bit mask of IN1 field. */ +#define GPIOTE_INTENSET_IN1_Disabled (0UL) /*!< Read: Disabled */ +#define GPIOTE_INTENSET_IN1_Enabled (1UL) /*!< Read: Enabled */ +#define GPIOTE_INTENSET_IN1_Set (1UL) /*!< Enable */ + +/* Bit 0 : Write '1' to Enable interrupt for IN[0] event */ +#define GPIOTE_INTENSET_IN0_Pos (0UL) /*!< Position of IN0 field. */ +#define GPIOTE_INTENSET_IN0_Msk (0x1UL << GPIOTE_INTENSET_IN0_Pos) /*!< Bit mask of IN0 field. */ +#define GPIOTE_INTENSET_IN0_Disabled (0UL) /*!< Read: Disabled */ +#define GPIOTE_INTENSET_IN0_Enabled (1UL) /*!< Read: Enabled */ +#define GPIOTE_INTENSET_IN0_Set (1UL) /*!< Enable */ + +/* Register: GPIOTE_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 31 : Write '1' to Disable interrupt for PORT event */ +#define GPIOTE_INTENCLR_PORT_Pos (31UL) /*!< Position of PORT field. */ +#define GPIOTE_INTENCLR_PORT_Msk (0x1UL << GPIOTE_INTENCLR_PORT_Pos) /*!< Bit mask of PORT field. */ +#define GPIOTE_INTENCLR_PORT_Disabled (0UL) /*!< Read: Disabled */ +#define GPIOTE_INTENCLR_PORT_Enabled (1UL) /*!< Read: Enabled */ +#define GPIOTE_INTENCLR_PORT_Clear (1UL) /*!< Disable */ + +/* Bit 7 : Write '1' to Disable interrupt for IN[7] event */ +#define GPIOTE_INTENCLR_IN7_Pos (7UL) /*!< Position of IN7 field. */ +#define GPIOTE_INTENCLR_IN7_Msk (0x1UL << GPIOTE_INTENCLR_IN7_Pos) /*!< Bit mask of IN7 field. */ +#define GPIOTE_INTENCLR_IN7_Disabled (0UL) /*!< Read: Disabled */ +#define GPIOTE_INTENCLR_IN7_Enabled (1UL) /*!< Read: Enabled */ +#define GPIOTE_INTENCLR_IN7_Clear (1UL) /*!< Disable */ + +/* Bit 6 : Write '1' to Disable interrupt for IN[6] event */ +#define GPIOTE_INTENCLR_IN6_Pos (6UL) /*!< Position of IN6 field. */ +#define GPIOTE_INTENCLR_IN6_Msk (0x1UL << GPIOTE_INTENCLR_IN6_Pos) /*!< Bit mask of IN6 field. */ +#define GPIOTE_INTENCLR_IN6_Disabled (0UL) /*!< Read: Disabled */ +#define GPIOTE_INTENCLR_IN6_Enabled (1UL) /*!< Read: Enabled */ +#define GPIOTE_INTENCLR_IN6_Clear (1UL) /*!< Disable */ + +/* Bit 5 : Write '1' to Disable interrupt for IN[5] event */ +#define GPIOTE_INTENCLR_IN5_Pos (5UL) /*!< Position of IN5 field. */ +#define GPIOTE_INTENCLR_IN5_Msk (0x1UL << GPIOTE_INTENCLR_IN5_Pos) /*!< Bit mask of IN5 field. */ +#define GPIOTE_INTENCLR_IN5_Disabled (0UL) /*!< Read: Disabled */ +#define GPIOTE_INTENCLR_IN5_Enabled (1UL) /*!< Read: Enabled */ +#define GPIOTE_INTENCLR_IN5_Clear (1UL) /*!< Disable */ + +/* Bit 4 : Write '1' to Disable interrupt for IN[4] event */ +#define GPIOTE_INTENCLR_IN4_Pos (4UL) /*!< Position of IN4 field. */ +#define GPIOTE_INTENCLR_IN4_Msk (0x1UL << GPIOTE_INTENCLR_IN4_Pos) /*!< Bit mask of IN4 field. */ +#define GPIOTE_INTENCLR_IN4_Disabled (0UL) /*!< Read: Disabled */ +#define GPIOTE_INTENCLR_IN4_Enabled (1UL) /*!< Read: Enabled */ +#define GPIOTE_INTENCLR_IN4_Clear (1UL) /*!< Disable */ + +/* Bit 3 : Write '1' to Disable interrupt for IN[3] event */ +#define GPIOTE_INTENCLR_IN3_Pos (3UL) /*!< Position of IN3 field. */ +#define GPIOTE_INTENCLR_IN3_Msk (0x1UL << GPIOTE_INTENCLR_IN3_Pos) /*!< Bit mask of IN3 field. */ +#define GPIOTE_INTENCLR_IN3_Disabled (0UL) /*!< Read: Disabled */ +#define GPIOTE_INTENCLR_IN3_Enabled (1UL) /*!< Read: Enabled */ +#define GPIOTE_INTENCLR_IN3_Clear (1UL) /*!< Disable */ + +/* Bit 2 : Write '1' to Disable interrupt for IN[2] event */ +#define GPIOTE_INTENCLR_IN2_Pos (2UL) /*!< Position of IN2 field. */ +#define GPIOTE_INTENCLR_IN2_Msk (0x1UL << GPIOTE_INTENCLR_IN2_Pos) /*!< Bit mask of IN2 field. */ +#define GPIOTE_INTENCLR_IN2_Disabled (0UL) /*!< Read: Disabled */ +#define GPIOTE_INTENCLR_IN2_Enabled (1UL) /*!< Read: Enabled */ +#define GPIOTE_INTENCLR_IN2_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for IN[1] event */ +#define GPIOTE_INTENCLR_IN1_Pos (1UL) /*!< Position of IN1 field. */ +#define GPIOTE_INTENCLR_IN1_Msk (0x1UL << GPIOTE_INTENCLR_IN1_Pos) /*!< Bit mask of IN1 field. */ +#define GPIOTE_INTENCLR_IN1_Disabled (0UL) /*!< Read: Disabled */ +#define GPIOTE_INTENCLR_IN1_Enabled (1UL) /*!< Read: Enabled */ +#define GPIOTE_INTENCLR_IN1_Clear (1UL) /*!< Disable */ + +/* Bit 0 : Write '1' to Disable interrupt for IN[0] event */ +#define GPIOTE_INTENCLR_IN0_Pos (0UL) /*!< Position of IN0 field. */ +#define GPIOTE_INTENCLR_IN0_Msk (0x1UL << GPIOTE_INTENCLR_IN0_Pos) /*!< Bit mask of IN0 field. */ +#define GPIOTE_INTENCLR_IN0_Disabled (0UL) /*!< Read: Disabled */ +#define GPIOTE_INTENCLR_IN0_Enabled (1UL) /*!< Read: Enabled */ +#define GPIOTE_INTENCLR_IN0_Clear (1UL) /*!< Disable */ + +/* Register: GPIOTE_CONFIG */ +/* Description: Description collection[0]: Configuration for OUT[n], SET[n] and CLR[n] tasks and IN[n] event */ + +/* Bit 20 : When in task mode: Initial value of the output when the GPIOTE channel is configured. When in event mode: No effect. */ +#define GPIOTE_CONFIG_OUTINIT_Pos (20UL) /*!< Position of OUTINIT field. */ +#define GPIOTE_CONFIG_OUTINIT_Msk (0x1UL << GPIOTE_CONFIG_OUTINIT_Pos) /*!< Bit mask of OUTINIT field. */ +#define GPIOTE_CONFIG_OUTINIT_Low (0UL) /*!< Task mode: Initial value of pin before task triggering is low */ +#define GPIOTE_CONFIG_OUTINIT_High (1UL) /*!< Task mode: Initial value of pin before task triggering is high */ + +/* Bits 17..16 : When In task mode: Operation to be performed on output when OUT[n] task is triggered. When In event mode: Operation on input that shall trigger IN[n] event. */ +#define GPIOTE_CONFIG_POLARITY_Pos (16UL) /*!< Position of POLARITY field. */ +#define GPIOTE_CONFIG_POLARITY_Msk (0x3UL << GPIOTE_CONFIG_POLARITY_Pos) /*!< Bit mask of POLARITY field. */ +#define GPIOTE_CONFIG_POLARITY_None (0UL) /*!< Task mode: No effect on pin from OUT[n] task. Event mode: no IN[n] event generated on pin activity. */ +#define GPIOTE_CONFIG_POLARITY_LoToHi (1UL) /*!< Task mode: Set pin from OUT[n] task. Event mode: Generate IN[n] event when rising edge on pin. */ +#define GPIOTE_CONFIG_POLARITY_HiToLo (2UL) /*!< Task mode: Clear pin from OUT[n] task. Event mode: Generate IN[n] event when falling edge on pin. */ +#define GPIOTE_CONFIG_POLARITY_Toggle (3UL) /*!< Task mode: Toggle pin from OUT[n]. Event mode: Generate IN[n] when any change on pin. */ + +/* Bits 12..8 : GPIO number associated with SET[n], CLR[n] and OUT[n] tasks and IN[n] event */ +#define GPIOTE_CONFIG_PSEL_Pos (8UL) /*!< Position of PSEL field. */ +#define GPIOTE_CONFIG_PSEL_Msk (0x1FUL << GPIOTE_CONFIG_PSEL_Pos) /*!< Bit mask of PSEL field. */ + +/* Bits 1..0 : Mode */ +#define GPIOTE_CONFIG_MODE_Pos (0UL) /*!< Position of MODE field. */ +#define GPIOTE_CONFIG_MODE_Msk (0x3UL << GPIOTE_CONFIG_MODE_Pos) /*!< Bit mask of MODE field. */ +#define GPIOTE_CONFIG_MODE_Disabled (0UL) /*!< Disabled. Pin specified by PSEL will not be acquired by the GPIOTE module. */ +#define GPIOTE_CONFIG_MODE_Event (1UL) /*!< Event mode */ +#define GPIOTE_CONFIG_MODE_Task (3UL) /*!< Task mode */ + + +/* Peripheral: I2S */ +/* Description: Inter-IC Sound */ + +/* Register: I2S_INTEN */ +/* Description: Enable or disable interrupt */ + +/* Bit 5 : Enable or disable interrupt for TXPTRUPD event */ +#define I2S_INTEN_TXPTRUPD_Pos (5UL) /*!< Position of TXPTRUPD field. */ +#define I2S_INTEN_TXPTRUPD_Msk (0x1UL << I2S_INTEN_TXPTRUPD_Pos) /*!< Bit mask of TXPTRUPD field. */ +#define I2S_INTEN_TXPTRUPD_Disabled (0UL) /*!< Disable */ +#define I2S_INTEN_TXPTRUPD_Enabled (1UL) /*!< Enable */ + +/* Bit 2 : Enable or disable interrupt for STOPPED event */ +#define I2S_INTEN_STOPPED_Pos (2UL) /*!< Position of STOPPED field. */ +#define I2S_INTEN_STOPPED_Msk (0x1UL << I2S_INTEN_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define I2S_INTEN_STOPPED_Disabled (0UL) /*!< Disable */ +#define I2S_INTEN_STOPPED_Enabled (1UL) /*!< Enable */ + +/* Bit 1 : Enable or disable interrupt for RXPTRUPD event */ +#define I2S_INTEN_RXPTRUPD_Pos (1UL) /*!< Position of RXPTRUPD field. */ +#define I2S_INTEN_RXPTRUPD_Msk (0x1UL << I2S_INTEN_RXPTRUPD_Pos) /*!< Bit mask of RXPTRUPD field. */ +#define I2S_INTEN_RXPTRUPD_Disabled (0UL) /*!< Disable */ +#define I2S_INTEN_RXPTRUPD_Enabled (1UL) /*!< Enable */ + +/* Register: I2S_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 5 : Write '1' to Enable interrupt for TXPTRUPD event */ +#define I2S_INTENSET_TXPTRUPD_Pos (5UL) /*!< Position of TXPTRUPD field. */ +#define I2S_INTENSET_TXPTRUPD_Msk (0x1UL << I2S_INTENSET_TXPTRUPD_Pos) /*!< Bit mask of TXPTRUPD field. */ +#define I2S_INTENSET_TXPTRUPD_Disabled (0UL) /*!< Read: Disabled */ +#define I2S_INTENSET_TXPTRUPD_Enabled (1UL) /*!< Read: Enabled */ +#define I2S_INTENSET_TXPTRUPD_Set (1UL) /*!< Enable */ + +/* Bit 2 : Write '1' to Enable interrupt for STOPPED event */ +#define I2S_INTENSET_STOPPED_Pos (2UL) /*!< Position of STOPPED field. */ +#define I2S_INTENSET_STOPPED_Msk (0x1UL << I2S_INTENSET_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define I2S_INTENSET_STOPPED_Disabled (0UL) /*!< Read: Disabled */ +#define I2S_INTENSET_STOPPED_Enabled (1UL) /*!< Read: Enabled */ +#define I2S_INTENSET_STOPPED_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for RXPTRUPD event */ +#define I2S_INTENSET_RXPTRUPD_Pos (1UL) /*!< Position of RXPTRUPD field. */ +#define I2S_INTENSET_RXPTRUPD_Msk (0x1UL << I2S_INTENSET_RXPTRUPD_Pos) /*!< Bit mask of RXPTRUPD field. */ +#define I2S_INTENSET_RXPTRUPD_Disabled (0UL) /*!< Read: Disabled */ +#define I2S_INTENSET_RXPTRUPD_Enabled (1UL) /*!< Read: Enabled */ +#define I2S_INTENSET_RXPTRUPD_Set (1UL) /*!< Enable */ + +/* Register: I2S_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 5 : Write '1' to Disable interrupt for TXPTRUPD event */ +#define I2S_INTENCLR_TXPTRUPD_Pos (5UL) /*!< Position of TXPTRUPD field. */ +#define I2S_INTENCLR_TXPTRUPD_Msk (0x1UL << I2S_INTENCLR_TXPTRUPD_Pos) /*!< Bit mask of TXPTRUPD field. */ +#define I2S_INTENCLR_TXPTRUPD_Disabled (0UL) /*!< Read: Disabled */ +#define I2S_INTENCLR_TXPTRUPD_Enabled (1UL) /*!< Read: Enabled */ +#define I2S_INTENCLR_TXPTRUPD_Clear (1UL) /*!< Disable */ + +/* Bit 2 : Write '1' to Disable interrupt for STOPPED event */ +#define I2S_INTENCLR_STOPPED_Pos (2UL) /*!< Position of STOPPED field. */ +#define I2S_INTENCLR_STOPPED_Msk (0x1UL << I2S_INTENCLR_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define I2S_INTENCLR_STOPPED_Disabled (0UL) /*!< Read: Disabled */ +#define I2S_INTENCLR_STOPPED_Enabled (1UL) /*!< Read: Enabled */ +#define I2S_INTENCLR_STOPPED_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for RXPTRUPD event */ +#define I2S_INTENCLR_RXPTRUPD_Pos (1UL) /*!< Position of RXPTRUPD field. */ +#define I2S_INTENCLR_RXPTRUPD_Msk (0x1UL << I2S_INTENCLR_RXPTRUPD_Pos) /*!< Bit mask of RXPTRUPD field. */ +#define I2S_INTENCLR_RXPTRUPD_Disabled (0UL) /*!< Read: Disabled */ +#define I2S_INTENCLR_RXPTRUPD_Enabled (1UL) /*!< Read: Enabled */ +#define I2S_INTENCLR_RXPTRUPD_Clear (1UL) /*!< Disable */ + +/* Register: I2S_ENABLE */ +/* Description: Enable I2S module. */ + +/* Bit 0 : Enable I2S module. */ +#define I2S_ENABLE_ENABLE_Pos (0UL) /*!< Position of ENABLE field. */ +#define I2S_ENABLE_ENABLE_Msk (0x1UL << I2S_ENABLE_ENABLE_Pos) /*!< Bit mask of ENABLE field. */ +#define I2S_ENABLE_ENABLE_Disabled (0UL) /*!< Disable */ +#define I2S_ENABLE_ENABLE_Enabled (1UL) /*!< Enable */ + +/* Register: I2S_CONFIG_MODE */ +/* Description: I2S mode. */ + +/* Bit 0 : I2S mode. */ +#define I2S_CONFIG_MODE_MODE_Pos (0UL) /*!< Position of MODE field. */ +#define I2S_CONFIG_MODE_MODE_Msk (0x1UL << I2S_CONFIG_MODE_MODE_Pos) /*!< Bit mask of MODE field. */ +#define I2S_CONFIG_MODE_MODE_Master (0UL) /*!< Master mode. SCK and LRCK generated from internal master clcok (MCK) and output on pins defined by PSEL.xxx. */ +#define I2S_CONFIG_MODE_MODE_Slave (1UL) /*!< Slave mode. SCK and LRCK generated by external master and received on pins defined by PSEL.xxx */ + +/* Register: I2S_CONFIG_RXEN */ +/* Description: Reception (RX) enable. */ + +/* Bit 0 : Reception (RX) enable. */ +#define I2S_CONFIG_RXEN_RXEN_Pos (0UL) /*!< Position of RXEN field. */ +#define I2S_CONFIG_RXEN_RXEN_Msk (0x1UL << I2S_CONFIG_RXEN_RXEN_Pos) /*!< Bit mask of RXEN field. */ +#define I2S_CONFIG_RXEN_RXEN_Disabled (0UL) /*!< Reception disabled and now data will be written to the RXD.PTR address. */ +#define I2S_CONFIG_RXEN_RXEN_Enabled (1UL) /*!< Reception enabled. */ + +/* Register: I2S_CONFIG_TXEN */ +/* Description: Transmission (TX) enable. */ + +/* Bit 0 : Transmission (TX) enable. */ +#define I2S_CONFIG_TXEN_TXEN_Pos (0UL) /*!< Position of TXEN field. */ +#define I2S_CONFIG_TXEN_TXEN_Msk (0x1UL << I2S_CONFIG_TXEN_TXEN_Pos) /*!< Bit mask of TXEN field. */ +#define I2S_CONFIG_TXEN_TXEN_Disabled (0UL) /*!< Transmission disabled and now data will be read from the RXD.TXD address. */ +#define I2S_CONFIG_TXEN_TXEN_Enabled (1UL) /*!< Transmission enabled. */ + +/* Register: I2S_CONFIG_MCKEN */ +/* Description: Master clock generator enable. */ + +/* Bit 0 : Master clock generator enable. */ +#define I2S_CONFIG_MCKEN_MCKEN_Pos (0UL) /*!< Position of MCKEN field. */ +#define I2S_CONFIG_MCKEN_MCKEN_Msk (0x1UL << I2S_CONFIG_MCKEN_MCKEN_Pos) /*!< Bit mask of MCKEN field. */ +#define I2S_CONFIG_MCKEN_MCKEN_Disabled (0UL) /*!< Master clock generator disabled and PSEL.MCK not connected(available as GPIO). */ +#define I2S_CONFIG_MCKEN_MCKEN_Enabled (1UL) /*!< Master clock generator running and MCK output on PSEL.MCK. */ + +/* Register: I2S_CONFIG_MCKFREQ */ +/* Description: Master clock generator frequency. */ + +/* Bits 31..0 : Master clock generator frequency. */ +#define I2S_CONFIG_MCKFREQ_MCKFREQ_Pos (0UL) /*!< Position of MCKFREQ field. */ +#define I2S_CONFIG_MCKFREQ_MCKFREQ_Msk (0xFFFFFFFFUL << I2S_CONFIG_MCKFREQ_MCKFREQ_Pos) /*!< Bit mask of MCKFREQ field. */ +#define I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV125 (0x020C0000UL) /*!< 32 MHz / 125 = 0.256 MHz */ +#define I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV63 (0x04100000UL) /*!< 32 MHz / 63 = 0.5079365 MHz */ +#define I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV42 (0x06000000UL) /*!< 32 MHz / 42 = 0.7619048 MHz */ +#define I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV32 (0x08000000UL) /*!< 32 MHz / 32 = 1.0 MHz */ +#define I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV31 (0x08400000UL) /*!< 32 MHz / 31 = 1.0322581 MHz */ +#define I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV30 (0x08800000UL) /*!< 32 MHz / 30 = 1.0666667 MHz */ +#define I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV23 (0x0B000000UL) /*!< 32 MHz / 23 = 1.3913043 MHz */ +#define I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV21 (0x0C000000UL) /*!< 32 MHz / 21 = 1.5238095 */ +#define I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV16 (0x10000000UL) /*!< 32 MHz / 16 = 2.0 MHz */ +#define I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV15 (0x11000000UL) /*!< 32 MHz / 15 = 2.1333333 MHz */ +#define I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV11 (0x16000000UL) /*!< 32 MHz / 11 = 2.9090909 MHz */ +#define I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV10 (0x18000000UL) /*!< 32 MHz / 10 = 3.2 MHz */ +#define I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV8 (0x20000000UL) /*!< 32 MHz / 8 = 4.0 MHz */ +#define I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV6 (0x28000000UL) /*!< 32 MHz / 6 = 5.3333333 MHz */ +#define I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV5 (0x30000000UL) /*!< 32 MHz / 5 = 6.4 MHz */ +#define I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV4 (0x40000000UL) /*!< 32 MHz / 4 = 8.0 MHz */ +#define I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV3 (0x50000000UL) /*!< 32 MHz / 3 = 10.6666667 MHz */ +#define I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV2 (0x80000000UL) /*!< 32 MHz / 2 = 16.0 MHz */ + +/* Register: I2S_CONFIG_RATIO */ +/* Description: MCK / LRCK ratio. */ + +/* Bits 3..0 : MCK / LRCK ratio. */ +#define I2S_CONFIG_RATIO_RATIO_Pos (0UL) /*!< Position of RATIO field. */ +#define I2S_CONFIG_RATIO_RATIO_Msk (0xFUL << I2S_CONFIG_RATIO_RATIO_Pos) /*!< Bit mask of RATIO field. */ +#define I2S_CONFIG_RATIO_RATIO_32X (0UL) /*!< LRCK = MCK / 32 */ +#define I2S_CONFIG_RATIO_RATIO_48X (1UL) /*!< LRCK = MCK / 48 */ +#define I2S_CONFIG_RATIO_RATIO_64X (2UL) /*!< LRCK = MCK / 64 */ +#define I2S_CONFIG_RATIO_RATIO_96X (3UL) /*!< LRCK = MCK / 96 */ +#define I2S_CONFIG_RATIO_RATIO_128X (4UL) /*!< LRCK = MCK / 128 */ +#define I2S_CONFIG_RATIO_RATIO_192X (5UL) /*!< LRCK = MCK / 192 */ +#define I2S_CONFIG_RATIO_RATIO_256X (6UL) /*!< LRCK = MCK / 256 */ +#define I2S_CONFIG_RATIO_RATIO_384X (7UL) /*!< LRCK = MCK / 384 */ +#define I2S_CONFIG_RATIO_RATIO_512X (8UL) /*!< LRCK = MCK / 512 */ + +/* Register: I2S_CONFIG_SWIDTH */ +/* Description: Sample width. */ + +/* Bits 1..0 : Sample width. */ +#define I2S_CONFIG_SWIDTH_SWIDTH_Pos (0UL) /*!< Position of SWIDTH field. */ +#define I2S_CONFIG_SWIDTH_SWIDTH_Msk (0x3UL << I2S_CONFIG_SWIDTH_SWIDTH_Pos) /*!< Bit mask of SWIDTH field. */ +#define I2S_CONFIG_SWIDTH_SWIDTH_8Bit (0UL) /*!< 8 bit. */ +#define I2S_CONFIG_SWIDTH_SWIDTH_16Bit (1UL) /*!< 16 bit. */ +#define I2S_CONFIG_SWIDTH_SWIDTH_24Bit (2UL) /*!< 24 bit. */ + +/* Register: I2S_CONFIG_ALIGN */ +/* Description: Alignment of sample within a frame. */ + +/* Bit 0 : Alignment of sample within a frame. */ +#define I2S_CONFIG_ALIGN_ALIGN_Pos (0UL) /*!< Position of ALIGN field. */ +#define I2S_CONFIG_ALIGN_ALIGN_Msk (0x1UL << I2S_CONFIG_ALIGN_ALIGN_Pos) /*!< Bit mask of ALIGN field. */ +#define I2S_CONFIG_ALIGN_ALIGN_Left (0UL) /*!< Left-aligned. */ +#define I2S_CONFIG_ALIGN_ALIGN_Right (1UL) /*!< Right-aligned. */ + +/* Register: I2S_CONFIG_FORMAT */ +/* Description: Frame format. */ + +/* Bit 0 : Frame format. */ +#define I2S_CONFIG_FORMAT_FORMAT_Pos (0UL) /*!< Position of FORMAT field. */ +#define I2S_CONFIG_FORMAT_FORMAT_Msk (0x1UL << I2S_CONFIG_FORMAT_FORMAT_Pos) /*!< Bit mask of FORMAT field. */ +#define I2S_CONFIG_FORMAT_FORMAT_I2S (0UL) /*!< Original I2S format. */ +#define I2S_CONFIG_FORMAT_FORMAT_Aligned (1UL) /*!< Alternate (left- or right-aligned) format. */ + +/* Register: I2S_CONFIG_CHANNELS */ +/* Description: Enable channels. */ + +/* Bits 1..0 : Enable channels. */ +#define I2S_CONFIG_CHANNELS_CHANNELS_Pos (0UL) /*!< Position of CHANNELS field. */ +#define I2S_CONFIG_CHANNELS_CHANNELS_Msk (0x3UL << I2S_CONFIG_CHANNELS_CHANNELS_Pos) /*!< Bit mask of CHANNELS field. */ +#define I2S_CONFIG_CHANNELS_CHANNELS_Stereo (0UL) /*!< Stereo. */ +#define I2S_CONFIG_CHANNELS_CHANNELS_Left (1UL) /*!< Left only. */ +#define I2S_CONFIG_CHANNELS_CHANNELS_Right (2UL) /*!< Right only. */ + +/* Register: I2S_RXD_PTR */ +/* Description: Receive buffer RAM start address. */ + +/* Bits 31..0 : Receive buffer Data RAM start address. When receiving, words containing samples will be written to this address. This address is a word aligned Data RAM address. */ +#define I2S_RXD_PTR_PTR_Pos (0UL) /*!< Position of PTR field. */ +#define I2S_RXD_PTR_PTR_Msk (0xFFFFFFFFUL << I2S_RXD_PTR_PTR_Pos) /*!< Bit mask of PTR field. */ + +/* Register: I2S_TXD_PTR */ +/* Description: Transmit buffer RAM start address. */ + +/* Bits 31..0 : Transmit buffer Data RAM start address. When transmitting, words containing samples will be fetched from this address. This address is a word aligned Data RAM address. */ +#define I2S_TXD_PTR_PTR_Pos (0UL) /*!< Position of PTR field. */ +#define I2S_TXD_PTR_PTR_Msk (0xFFFFFFFFUL << I2S_TXD_PTR_PTR_Pos) /*!< Bit mask of PTR field. */ + +/* Register: I2S_RXTXD_MAXCNT */ +/* Description: Size of RXD and TXD buffers. */ + +/* Bits 13..0 : Size of RXD and TXD buffers in number of 32 bit words. */ +#define I2S_RXTXD_MAXCNT_MAXCNT_Pos (0UL) /*!< Position of MAXCNT field. */ +#define I2S_RXTXD_MAXCNT_MAXCNT_Msk (0x3FFFUL << I2S_RXTXD_MAXCNT_MAXCNT_Pos) /*!< Bit mask of MAXCNT field. */ + +/* Register: I2S_PSEL_MCK */ +/* Description: Pin select for MCK signal. */ + +/* Bit 31 : Connection */ +#define I2S_PSEL_MCK_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define I2S_PSEL_MCK_CONNECT_Msk (0x1UL << I2S_PSEL_MCK_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define I2S_PSEL_MCK_CONNECT_Connected (0UL) /*!< Connect */ +#define I2S_PSEL_MCK_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define I2S_PSEL_MCK_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define I2S_PSEL_MCK_PIN_Msk (0x1FUL << I2S_PSEL_MCK_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: I2S_PSEL_SCK */ +/* Description: Pin select for SCK signal. */ + +/* Bit 31 : Connection */ +#define I2S_PSEL_SCK_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define I2S_PSEL_SCK_CONNECT_Msk (0x1UL << I2S_PSEL_SCK_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define I2S_PSEL_SCK_CONNECT_Connected (0UL) /*!< Connect */ +#define I2S_PSEL_SCK_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define I2S_PSEL_SCK_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define I2S_PSEL_SCK_PIN_Msk (0x1FUL << I2S_PSEL_SCK_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: I2S_PSEL_LRCK */ +/* Description: Pin select for LRCK signal. */ + +/* Bit 31 : Connection */ +#define I2S_PSEL_LRCK_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define I2S_PSEL_LRCK_CONNECT_Msk (0x1UL << I2S_PSEL_LRCK_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define I2S_PSEL_LRCK_CONNECT_Connected (0UL) /*!< Connect */ +#define I2S_PSEL_LRCK_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define I2S_PSEL_LRCK_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define I2S_PSEL_LRCK_PIN_Msk (0x1FUL << I2S_PSEL_LRCK_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: I2S_PSEL_SDIN */ +/* Description: Pin select for SDIN signal. */ + +/* Bit 31 : Connection */ +#define I2S_PSEL_SDIN_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define I2S_PSEL_SDIN_CONNECT_Msk (0x1UL << I2S_PSEL_SDIN_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define I2S_PSEL_SDIN_CONNECT_Connected (0UL) /*!< Connect */ +#define I2S_PSEL_SDIN_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define I2S_PSEL_SDIN_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define I2S_PSEL_SDIN_PIN_Msk (0x1FUL << I2S_PSEL_SDIN_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: I2S_PSEL_SDOUT */ +/* Description: Pin select for SDOUT signal. */ + +/* Bit 31 : Connection */ +#define I2S_PSEL_SDOUT_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define I2S_PSEL_SDOUT_CONNECT_Msk (0x1UL << I2S_PSEL_SDOUT_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define I2S_PSEL_SDOUT_CONNECT_Connected (0UL) /*!< Connect */ +#define I2S_PSEL_SDOUT_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define I2S_PSEL_SDOUT_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define I2S_PSEL_SDOUT_PIN_Msk (0x1FUL << I2S_PSEL_SDOUT_PIN_Pos) /*!< Bit mask of PIN field. */ + + +/* Peripheral: LPCOMP */ +/* Description: Low Power Comparator */ + +/* Register: LPCOMP_SHORTS */ +/* Description: Shortcut register */ + +/* Bit 4 : Shortcut between CROSS event and STOP task */ +#define LPCOMP_SHORTS_CROSS_STOP_Pos (4UL) /*!< Position of CROSS_STOP field. */ +#define LPCOMP_SHORTS_CROSS_STOP_Msk (0x1UL << LPCOMP_SHORTS_CROSS_STOP_Pos) /*!< Bit mask of CROSS_STOP field. */ +#define LPCOMP_SHORTS_CROSS_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define LPCOMP_SHORTS_CROSS_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 3 : Shortcut between UP event and STOP task */ +#define LPCOMP_SHORTS_UP_STOP_Pos (3UL) /*!< Position of UP_STOP field. */ +#define LPCOMP_SHORTS_UP_STOP_Msk (0x1UL << LPCOMP_SHORTS_UP_STOP_Pos) /*!< Bit mask of UP_STOP field. */ +#define LPCOMP_SHORTS_UP_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define LPCOMP_SHORTS_UP_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 2 : Shortcut between DOWN event and STOP task */ +#define LPCOMP_SHORTS_DOWN_STOP_Pos (2UL) /*!< Position of DOWN_STOP field. */ +#define LPCOMP_SHORTS_DOWN_STOP_Msk (0x1UL << LPCOMP_SHORTS_DOWN_STOP_Pos) /*!< Bit mask of DOWN_STOP field. */ +#define LPCOMP_SHORTS_DOWN_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define LPCOMP_SHORTS_DOWN_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 1 : Shortcut between READY event and STOP task */ +#define LPCOMP_SHORTS_READY_STOP_Pos (1UL) /*!< Position of READY_STOP field. */ +#define LPCOMP_SHORTS_READY_STOP_Msk (0x1UL << LPCOMP_SHORTS_READY_STOP_Pos) /*!< Bit mask of READY_STOP field. */ +#define LPCOMP_SHORTS_READY_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define LPCOMP_SHORTS_READY_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 0 : Shortcut between READY event and SAMPLE task */ +#define LPCOMP_SHORTS_READY_SAMPLE_Pos (0UL) /*!< Position of READY_SAMPLE field. */ +#define LPCOMP_SHORTS_READY_SAMPLE_Msk (0x1UL << LPCOMP_SHORTS_READY_SAMPLE_Pos) /*!< Bit mask of READY_SAMPLE field. */ +#define LPCOMP_SHORTS_READY_SAMPLE_Disabled (0UL) /*!< Disable shortcut */ +#define LPCOMP_SHORTS_READY_SAMPLE_Enabled (1UL) /*!< Enable shortcut */ + +/* Register: LPCOMP_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 3 : Write '1' to Enable interrupt for CROSS event */ +#define LPCOMP_INTENSET_CROSS_Pos (3UL) /*!< Position of CROSS field. */ +#define LPCOMP_INTENSET_CROSS_Msk (0x1UL << LPCOMP_INTENSET_CROSS_Pos) /*!< Bit mask of CROSS field. */ +#define LPCOMP_INTENSET_CROSS_Disabled (0UL) /*!< Read: Disabled */ +#define LPCOMP_INTENSET_CROSS_Enabled (1UL) /*!< Read: Enabled */ +#define LPCOMP_INTENSET_CROSS_Set (1UL) /*!< Enable */ + +/* Bit 2 : Write '1' to Enable interrupt for UP event */ +#define LPCOMP_INTENSET_UP_Pos (2UL) /*!< Position of UP field. */ +#define LPCOMP_INTENSET_UP_Msk (0x1UL << LPCOMP_INTENSET_UP_Pos) /*!< Bit mask of UP field. */ +#define LPCOMP_INTENSET_UP_Disabled (0UL) /*!< Read: Disabled */ +#define LPCOMP_INTENSET_UP_Enabled (1UL) /*!< Read: Enabled */ +#define LPCOMP_INTENSET_UP_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for DOWN event */ +#define LPCOMP_INTENSET_DOWN_Pos (1UL) /*!< Position of DOWN field. */ +#define LPCOMP_INTENSET_DOWN_Msk (0x1UL << LPCOMP_INTENSET_DOWN_Pos) /*!< Bit mask of DOWN field. */ +#define LPCOMP_INTENSET_DOWN_Disabled (0UL) /*!< Read: Disabled */ +#define LPCOMP_INTENSET_DOWN_Enabled (1UL) /*!< Read: Enabled */ +#define LPCOMP_INTENSET_DOWN_Set (1UL) /*!< Enable */ + +/* Bit 0 : Write '1' to Enable interrupt for READY event */ +#define LPCOMP_INTENSET_READY_Pos (0UL) /*!< Position of READY field. */ +#define LPCOMP_INTENSET_READY_Msk (0x1UL << LPCOMP_INTENSET_READY_Pos) /*!< Bit mask of READY field. */ +#define LPCOMP_INTENSET_READY_Disabled (0UL) /*!< Read: Disabled */ +#define LPCOMP_INTENSET_READY_Enabled (1UL) /*!< Read: Enabled */ +#define LPCOMP_INTENSET_READY_Set (1UL) /*!< Enable */ + +/* Register: LPCOMP_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 3 : Write '1' to Disable interrupt for CROSS event */ +#define LPCOMP_INTENCLR_CROSS_Pos (3UL) /*!< Position of CROSS field. */ +#define LPCOMP_INTENCLR_CROSS_Msk (0x1UL << LPCOMP_INTENCLR_CROSS_Pos) /*!< Bit mask of CROSS field. */ +#define LPCOMP_INTENCLR_CROSS_Disabled (0UL) /*!< Read: Disabled */ +#define LPCOMP_INTENCLR_CROSS_Enabled (1UL) /*!< Read: Enabled */ +#define LPCOMP_INTENCLR_CROSS_Clear (1UL) /*!< Disable */ + +/* Bit 2 : Write '1' to Disable interrupt for UP event */ +#define LPCOMP_INTENCLR_UP_Pos (2UL) /*!< Position of UP field. */ +#define LPCOMP_INTENCLR_UP_Msk (0x1UL << LPCOMP_INTENCLR_UP_Pos) /*!< Bit mask of UP field. */ +#define LPCOMP_INTENCLR_UP_Disabled (0UL) /*!< Read: Disabled */ +#define LPCOMP_INTENCLR_UP_Enabled (1UL) /*!< Read: Enabled */ +#define LPCOMP_INTENCLR_UP_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for DOWN event */ +#define LPCOMP_INTENCLR_DOWN_Pos (1UL) /*!< Position of DOWN field. */ +#define LPCOMP_INTENCLR_DOWN_Msk (0x1UL << LPCOMP_INTENCLR_DOWN_Pos) /*!< Bit mask of DOWN field. */ +#define LPCOMP_INTENCLR_DOWN_Disabled (0UL) /*!< Read: Disabled */ +#define LPCOMP_INTENCLR_DOWN_Enabled (1UL) /*!< Read: Enabled */ +#define LPCOMP_INTENCLR_DOWN_Clear (1UL) /*!< Disable */ + +/* Bit 0 : Write '1' to Disable interrupt for READY event */ +#define LPCOMP_INTENCLR_READY_Pos (0UL) /*!< Position of READY field. */ +#define LPCOMP_INTENCLR_READY_Msk (0x1UL << LPCOMP_INTENCLR_READY_Pos) /*!< Bit mask of READY field. */ +#define LPCOMP_INTENCLR_READY_Disabled (0UL) /*!< Read: Disabled */ +#define LPCOMP_INTENCLR_READY_Enabled (1UL) /*!< Read: Enabled */ +#define LPCOMP_INTENCLR_READY_Clear (1UL) /*!< Disable */ + +/* Register: LPCOMP_RESULT */ +/* Description: Compare result */ + +/* Bit 0 : Result of last compare. Decision point SAMPLE task. */ +#define LPCOMP_RESULT_RESULT_Pos (0UL) /*!< Position of RESULT field. */ +#define LPCOMP_RESULT_RESULT_Msk (0x1UL << LPCOMP_RESULT_RESULT_Pos) /*!< Bit mask of RESULT field. */ +#define LPCOMP_RESULT_RESULT_Bellow (0UL) /*!< Input voltage is below the reference threshold (VIN+ < VIN-). */ +#define LPCOMP_RESULT_RESULT_Above (1UL) /*!< Input voltage is above the reference threshold (VIN+ > VIN-). */ + +/* Register: LPCOMP_ENABLE */ +/* Description: Enable LPCOMP */ + +/* Bits 1..0 : Enable or disable LPCOMP */ +#define LPCOMP_ENABLE_ENABLE_Pos (0UL) /*!< Position of ENABLE field. */ +#define LPCOMP_ENABLE_ENABLE_Msk (0x3UL << LPCOMP_ENABLE_ENABLE_Pos) /*!< Bit mask of ENABLE field. */ +#define LPCOMP_ENABLE_ENABLE_Disabled (0UL) /*!< Disable */ +#define LPCOMP_ENABLE_ENABLE_Enabled (1UL) /*!< Enable */ + +/* Register: LPCOMP_PSEL */ +/* Description: Input pin select */ + +/* Bits 2..0 : Analog pin select */ +#define LPCOMP_PSEL_PSEL_Pos (0UL) /*!< Position of PSEL field. */ +#define LPCOMP_PSEL_PSEL_Msk (0x7UL << LPCOMP_PSEL_PSEL_Pos) /*!< Bit mask of PSEL field. */ +#define LPCOMP_PSEL_PSEL_AnalogInput0 (0UL) /*!< AIN0 selected as analog input */ +#define LPCOMP_PSEL_PSEL_AnalogInput1 (1UL) /*!< AIN1 selected as analog input */ +#define LPCOMP_PSEL_PSEL_AnalogInput2 (2UL) /*!< AIN2 selected as analog input */ +#define LPCOMP_PSEL_PSEL_AnalogInput3 (3UL) /*!< AIN3 selected as analog input */ +#define LPCOMP_PSEL_PSEL_AnalogInput4 (4UL) /*!< AIN4 selected as analog input */ +#define LPCOMP_PSEL_PSEL_AnalogInput5 (5UL) /*!< AIN5 selected as analog input */ +#define LPCOMP_PSEL_PSEL_AnalogInput6 (6UL) /*!< AIN6 selected as analog input */ +#define LPCOMP_PSEL_PSEL_AnalogInput7 (7UL) /*!< AIN7 selected as analog input */ + +/* Register: LPCOMP_REFSEL */ +/* Description: Reference select */ + +/* Bits 3..0 : Reference select */ +#define LPCOMP_REFSEL_REFSEL_Pos (0UL) /*!< Position of REFSEL field. */ +#define LPCOMP_REFSEL_REFSEL_Msk (0xFUL << LPCOMP_REFSEL_REFSEL_Pos) /*!< Bit mask of REFSEL field. */ +#define LPCOMP_REFSEL_REFSEL_Ref1_8Vdd (0UL) /*!< VDD * 1/8 selected as reference */ +#define LPCOMP_REFSEL_REFSEL_Ref2_8Vdd (1UL) /*!< VDD * 2/8 selected as reference */ +#define LPCOMP_REFSEL_REFSEL_Ref3_8Vdd (2UL) /*!< VDD * 3/8 selected as reference */ +#define LPCOMP_REFSEL_REFSEL_Ref4_8Vdd (3UL) /*!< VDD * 4/8 selected as reference */ +#define LPCOMP_REFSEL_REFSEL_Ref5_8Vdd (4UL) /*!< VDD * 5/8 selected as reference */ +#define LPCOMP_REFSEL_REFSEL_Ref6_8Vdd (5UL) /*!< VDD * 6/8 selected as reference */ +#define LPCOMP_REFSEL_REFSEL_Ref7_8Vdd (6UL) /*!< VDD * 7/8 selected as reference */ +#define LPCOMP_REFSEL_REFSEL_ARef (7UL) /*!< External analog reference selected */ +#define LPCOMP_REFSEL_REFSEL_Ref1_16Vdd (8UL) /*!< VDD * 1/16 selected as reference */ +#define LPCOMP_REFSEL_REFSEL_Ref3_16Vdd (9UL) /*!< VDD * 3/16 selected as reference */ +#define LPCOMP_REFSEL_REFSEL_Ref5_16Vdd (10UL) /*!< VDD * 5/16 selected as reference */ +#define LPCOMP_REFSEL_REFSEL_Ref7_16Vdd (11UL) /*!< VDD * 7/16 selected as reference */ +#define LPCOMP_REFSEL_REFSEL_Ref9_16Vdd (12UL) /*!< VDD * 9/16 selected as reference */ +#define LPCOMP_REFSEL_REFSEL_Ref11_16Vdd (13UL) /*!< VDD * 11/16 selected as reference */ +#define LPCOMP_REFSEL_REFSEL_Ref13_16Vdd (14UL) /*!< VDD * 13/16 selected as reference */ +#define LPCOMP_REFSEL_REFSEL_Ref15_16Vdd (15UL) /*!< VDD * 15/16 selected as reference */ + +/* Register: LPCOMP_EXTREFSEL */ +/* Description: External reference select */ + +/* Bit 0 : External analog reference select */ +#define LPCOMP_EXTREFSEL_EXTREFSEL_Pos (0UL) /*!< Position of EXTREFSEL field. */ +#define LPCOMP_EXTREFSEL_EXTREFSEL_Msk (0x1UL << LPCOMP_EXTREFSEL_EXTREFSEL_Pos) /*!< Bit mask of EXTREFSEL field. */ +#define LPCOMP_EXTREFSEL_EXTREFSEL_AnalogReference0 (0UL) /*!< Use AIN0 as external analog reference */ +#define LPCOMP_EXTREFSEL_EXTREFSEL_AnalogReference1 (1UL) /*!< Use AIN1 as external analog reference */ + +/* Register: LPCOMP_ANADETECT */ +/* Description: Analog detect configuration */ + +/* Bits 1..0 : Analog detect configuration */ +#define LPCOMP_ANADETECT_ANADETECT_Pos (0UL) /*!< Position of ANADETECT field. */ +#define LPCOMP_ANADETECT_ANADETECT_Msk (0x3UL << LPCOMP_ANADETECT_ANADETECT_Pos) /*!< Bit mask of ANADETECT field. */ +#define LPCOMP_ANADETECT_ANADETECT_Cross (0UL) /*!< Generate ANADETECT on crossing, both upward crossing and downward crossing */ +#define LPCOMP_ANADETECT_ANADETECT_Up (1UL) /*!< Generate ANADETECT on upward crossing only */ +#define LPCOMP_ANADETECT_ANADETECT_Down (2UL) /*!< Generate ANADETECT on downward crossing only */ + +/* Register: LPCOMP_HYST */ +/* Description: Comparator hysteresis enable */ + +/* Bit 0 : Comparator hysteresis enable */ +#define LPCOMP_HYST_HYST_Pos (0UL) /*!< Position of HYST field. */ +#define LPCOMP_HYST_HYST_Msk (0x1UL << LPCOMP_HYST_HYST_Pos) /*!< Bit mask of HYST field. */ +#define LPCOMP_HYST_HYST_NoHyst (0UL) /*!< Comparator hysteresis disabled */ +#define LPCOMP_HYST_HYST_Hyst50mV (1UL) /*!< Comparator hysteresis disabled (typ. 50 mV) */ + + +/* Peripheral: MWU */ +/* Description: Memory Watch Unit */ + +/* Register: MWU_INTEN */ +/* Description: Enable or disable interrupt */ + +/* Bit 27 : Enable or disable interrupt for PREGION[1].RA event */ +#define MWU_INTEN_PREGION1RA_Pos (27UL) /*!< Position of PREGION1RA field. */ +#define MWU_INTEN_PREGION1RA_Msk (0x1UL << MWU_INTEN_PREGION1RA_Pos) /*!< Bit mask of PREGION1RA field. */ +#define MWU_INTEN_PREGION1RA_Disabled (0UL) /*!< Disable */ +#define MWU_INTEN_PREGION1RA_Enabled (1UL) /*!< Enable */ + +/* Bit 26 : Enable or disable interrupt for PREGION[1].WA event */ +#define MWU_INTEN_PREGION1WA_Pos (26UL) /*!< Position of PREGION1WA field. */ +#define MWU_INTEN_PREGION1WA_Msk (0x1UL << MWU_INTEN_PREGION1WA_Pos) /*!< Bit mask of PREGION1WA field. */ +#define MWU_INTEN_PREGION1WA_Disabled (0UL) /*!< Disable */ +#define MWU_INTEN_PREGION1WA_Enabled (1UL) /*!< Enable */ + +/* Bit 25 : Enable or disable interrupt for PREGION[0].RA event */ +#define MWU_INTEN_PREGION0RA_Pos (25UL) /*!< Position of PREGION0RA field. */ +#define MWU_INTEN_PREGION0RA_Msk (0x1UL << MWU_INTEN_PREGION0RA_Pos) /*!< Bit mask of PREGION0RA field. */ +#define MWU_INTEN_PREGION0RA_Disabled (0UL) /*!< Disable */ +#define MWU_INTEN_PREGION0RA_Enabled (1UL) /*!< Enable */ + +/* Bit 24 : Enable or disable interrupt for PREGION[0].WA event */ +#define MWU_INTEN_PREGION0WA_Pos (24UL) /*!< Position of PREGION0WA field. */ +#define MWU_INTEN_PREGION0WA_Msk (0x1UL << MWU_INTEN_PREGION0WA_Pos) /*!< Bit mask of PREGION0WA field. */ +#define MWU_INTEN_PREGION0WA_Disabled (0UL) /*!< Disable */ +#define MWU_INTEN_PREGION0WA_Enabled (1UL) /*!< Enable */ + +/* Bit 7 : Enable or disable interrupt for REGION[3].RA event */ +#define MWU_INTEN_REGION3RA_Pos (7UL) /*!< Position of REGION3RA field. */ +#define MWU_INTEN_REGION3RA_Msk (0x1UL << MWU_INTEN_REGION3RA_Pos) /*!< Bit mask of REGION3RA field. */ +#define MWU_INTEN_REGION3RA_Disabled (0UL) /*!< Disable */ +#define MWU_INTEN_REGION3RA_Enabled (1UL) /*!< Enable */ + +/* Bit 6 : Enable or disable interrupt for REGION[3].WA event */ +#define MWU_INTEN_REGION3WA_Pos (6UL) /*!< Position of REGION3WA field. */ +#define MWU_INTEN_REGION3WA_Msk (0x1UL << MWU_INTEN_REGION3WA_Pos) /*!< Bit mask of REGION3WA field. */ +#define MWU_INTEN_REGION3WA_Disabled (0UL) /*!< Disable */ +#define MWU_INTEN_REGION3WA_Enabled (1UL) /*!< Enable */ + +/* Bit 5 : Enable or disable interrupt for REGION[2].RA event */ +#define MWU_INTEN_REGION2RA_Pos (5UL) /*!< Position of REGION2RA field. */ +#define MWU_INTEN_REGION2RA_Msk (0x1UL << MWU_INTEN_REGION2RA_Pos) /*!< Bit mask of REGION2RA field. */ +#define MWU_INTEN_REGION2RA_Disabled (0UL) /*!< Disable */ +#define MWU_INTEN_REGION2RA_Enabled (1UL) /*!< Enable */ + +/* Bit 4 : Enable or disable interrupt for REGION[2].WA event */ +#define MWU_INTEN_REGION2WA_Pos (4UL) /*!< Position of REGION2WA field. */ +#define MWU_INTEN_REGION2WA_Msk (0x1UL << MWU_INTEN_REGION2WA_Pos) /*!< Bit mask of REGION2WA field. */ +#define MWU_INTEN_REGION2WA_Disabled (0UL) /*!< Disable */ +#define MWU_INTEN_REGION2WA_Enabled (1UL) /*!< Enable */ + +/* Bit 3 : Enable or disable interrupt for REGION[1].RA event */ +#define MWU_INTEN_REGION1RA_Pos (3UL) /*!< Position of REGION1RA field. */ +#define MWU_INTEN_REGION1RA_Msk (0x1UL << MWU_INTEN_REGION1RA_Pos) /*!< Bit mask of REGION1RA field. */ +#define MWU_INTEN_REGION1RA_Disabled (0UL) /*!< Disable */ +#define MWU_INTEN_REGION1RA_Enabled (1UL) /*!< Enable */ + +/* Bit 2 : Enable or disable interrupt for REGION[1].WA event */ +#define MWU_INTEN_REGION1WA_Pos (2UL) /*!< Position of REGION1WA field. */ +#define MWU_INTEN_REGION1WA_Msk (0x1UL << MWU_INTEN_REGION1WA_Pos) /*!< Bit mask of REGION1WA field. */ +#define MWU_INTEN_REGION1WA_Disabled (0UL) /*!< Disable */ +#define MWU_INTEN_REGION1WA_Enabled (1UL) /*!< Enable */ + +/* Bit 1 : Enable or disable interrupt for REGION[0].RA event */ +#define MWU_INTEN_REGION0RA_Pos (1UL) /*!< Position of REGION0RA field. */ +#define MWU_INTEN_REGION0RA_Msk (0x1UL << MWU_INTEN_REGION0RA_Pos) /*!< Bit mask of REGION0RA field. */ +#define MWU_INTEN_REGION0RA_Disabled (0UL) /*!< Disable */ +#define MWU_INTEN_REGION0RA_Enabled (1UL) /*!< Enable */ + +/* Bit 0 : Enable or disable interrupt for REGION[0].WA event */ +#define MWU_INTEN_REGION0WA_Pos (0UL) /*!< Position of REGION0WA field. */ +#define MWU_INTEN_REGION0WA_Msk (0x1UL << MWU_INTEN_REGION0WA_Pos) /*!< Bit mask of REGION0WA field. */ +#define MWU_INTEN_REGION0WA_Disabled (0UL) /*!< Disable */ +#define MWU_INTEN_REGION0WA_Enabled (1UL) /*!< Enable */ + +/* Register: MWU_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 27 : Write '1' to Enable interrupt for PREGION[1].RA event */ +#define MWU_INTENSET_PREGION1RA_Pos (27UL) /*!< Position of PREGION1RA field. */ +#define MWU_INTENSET_PREGION1RA_Msk (0x1UL << MWU_INTENSET_PREGION1RA_Pos) /*!< Bit mask of PREGION1RA field. */ +#define MWU_INTENSET_PREGION1RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENSET_PREGION1RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENSET_PREGION1RA_Set (1UL) /*!< Enable */ + +/* Bit 26 : Write '1' to Enable interrupt for PREGION[1].WA event */ +#define MWU_INTENSET_PREGION1WA_Pos (26UL) /*!< Position of PREGION1WA field. */ +#define MWU_INTENSET_PREGION1WA_Msk (0x1UL << MWU_INTENSET_PREGION1WA_Pos) /*!< Bit mask of PREGION1WA field. */ +#define MWU_INTENSET_PREGION1WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENSET_PREGION1WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENSET_PREGION1WA_Set (1UL) /*!< Enable */ + +/* Bit 25 : Write '1' to Enable interrupt for PREGION[0].RA event */ +#define MWU_INTENSET_PREGION0RA_Pos (25UL) /*!< Position of PREGION0RA field. */ +#define MWU_INTENSET_PREGION0RA_Msk (0x1UL << MWU_INTENSET_PREGION0RA_Pos) /*!< Bit mask of PREGION0RA field. */ +#define MWU_INTENSET_PREGION0RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENSET_PREGION0RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENSET_PREGION0RA_Set (1UL) /*!< Enable */ + +/* Bit 24 : Write '1' to Enable interrupt for PREGION[0].WA event */ +#define MWU_INTENSET_PREGION0WA_Pos (24UL) /*!< Position of PREGION0WA field. */ +#define MWU_INTENSET_PREGION0WA_Msk (0x1UL << MWU_INTENSET_PREGION0WA_Pos) /*!< Bit mask of PREGION0WA field. */ +#define MWU_INTENSET_PREGION0WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENSET_PREGION0WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENSET_PREGION0WA_Set (1UL) /*!< Enable */ + +/* Bit 7 : Write '1' to Enable interrupt for REGION[3].RA event */ +#define MWU_INTENSET_REGION3RA_Pos (7UL) /*!< Position of REGION3RA field. */ +#define MWU_INTENSET_REGION3RA_Msk (0x1UL << MWU_INTENSET_REGION3RA_Pos) /*!< Bit mask of REGION3RA field. */ +#define MWU_INTENSET_REGION3RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENSET_REGION3RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENSET_REGION3RA_Set (1UL) /*!< Enable */ + +/* Bit 6 : Write '1' to Enable interrupt for REGION[3].WA event */ +#define MWU_INTENSET_REGION3WA_Pos (6UL) /*!< Position of REGION3WA field. */ +#define MWU_INTENSET_REGION3WA_Msk (0x1UL << MWU_INTENSET_REGION3WA_Pos) /*!< Bit mask of REGION3WA field. */ +#define MWU_INTENSET_REGION3WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENSET_REGION3WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENSET_REGION3WA_Set (1UL) /*!< Enable */ + +/* Bit 5 : Write '1' to Enable interrupt for REGION[2].RA event */ +#define MWU_INTENSET_REGION2RA_Pos (5UL) /*!< Position of REGION2RA field. */ +#define MWU_INTENSET_REGION2RA_Msk (0x1UL << MWU_INTENSET_REGION2RA_Pos) /*!< Bit mask of REGION2RA field. */ +#define MWU_INTENSET_REGION2RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENSET_REGION2RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENSET_REGION2RA_Set (1UL) /*!< Enable */ + +/* Bit 4 : Write '1' to Enable interrupt for REGION[2].WA event */ +#define MWU_INTENSET_REGION2WA_Pos (4UL) /*!< Position of REGION2WA field. */ +#define MWU_INTENSET_REGION2WA_Msk (0x1UL << MWU_INTENSET_REGION2WA_Pos) /*!< Bit mask of REGION2WA field. */ +#define MWU_INTENSET_REGION2WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENSET_REGION2WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENSET_REGION2WA_Set (1UL) /*!< Enable */ + +/* Bit 3 : Write '1' to Enable interrupt for REGION[1].RA event */ +#define MWU_INTENSET_REGION1RA_Pos (3UL) /*!< Position of REGION1RA field. */ +#define MWU_INTENSET_REGION1RA_Msk (0x1UL << MWU_INTENSET_REGION1RA_Pos) /*!< Bit mask of REGION1RA field. */ +#define MWU_INTENSET_REGION1RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENSET_REGION1RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENSET_REGION1RA_Set (1UL) /*!< Enable */ + +/* Bit 2 : Write '1' to Enable interrupt for REGION[1].WA event */ +#define MWU_INTENSET_REGION1WA_Pos (2UL) /*!< Position of REGION1WA field. */ +#define MWU_INTENSET_REGION1WA_Msk (0x1UL << MWU_INTENSET_REGION1WA_Pos) /*!< Bit mask of REGION1WA field. */ +#define MWU_INTENSET_REGION1WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENSET_REGION1WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENSET_REGION1WA_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for REGION[0].RA event */ +#define MWU_INTENSET_REGION0RA_Pos (1UL) /*!< Position of REGION0RA field. */ +#define MWU_INTENSET_REGION0RA_Msk (0x1UL << MWU_INTENSET_REGION0RA_Pos) /*!< Bit mask of REGION0RA field. */ +#define MWU_INTENSET_REGION0RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENSET_REGION0RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENSET_REGION0RA_Set (1UL) /*!< Enable */ + +/* Bit 0 : Write '1' to Enable interrupt for REGION[0].WA event */ +#define MWU_INTENSET_REGION0WA_Pos (0UL) /*!< Position of REGION0WA field. */ +#define MWU_INTENSET_REGION0WA_Msk (0x1UL << MWU_INTENSET_REGION0WA_Pos) /*!< Bit mask of REGION0WA field. */ +#define MWU_INTENSET_REGION0WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENSET_REGION0WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENSET_REGION0WA_Set (1UL) /*!< Enable */ + +/* Register: MWU_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 27 : Write '1' to Disable interrupt for PREGION[1].RA event */ +#define MWU_INTENCLR_PREGION1RA_Pos (27UL) /*!< Position of PREGION1RA field. */ +#define MWU_INTENCLR_PREGION1RA_Msk (0x1UL << MWU_INTENCLR_PREGION1RA_Pos) /*!< Bit mask of PREGION1RA field. */ +#define MWU_INTENCLR_PREGION1RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENCLR_PREGION1RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENCLR_PREGION1RA_Clear (1UL) /*!< Disable */ + +/* Bit 26 : Write '1' to Disable interrupt for PREGION[1].WA event */ +#define MWU_INTENCLR_PREGION1WA_Pos (26UL) /*!< Position of PREGION1WA field. */ +#define MWU_INTENCLR_PREGION1WA_Msk (0x1UL << MWU_INTENCLR_PREGION1WA_Pos) /*!< Bit mask of PREGION1WA field. */ +#define MWU_INTENCLR_PREGION1WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENCLR_PREGION1WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENCLR_PREGION1WA_Clear (1UL) /*!< Disable */ + +/* Bit 25 : Write '1' to Disable interrupt for PREGION[0].RA event */ +#define MWU_INTENCLR_PREGION0RA_Pos (25UL) /*!< Position of PREGION0RA field. */ +#define MWU_INTENCLR_PREGION0RA_Msk (0x1UL << MWU_INTENCLR_PREGION0RA_Pos) /*!< Bit mask of PREGION0RA field. */ +#define MWU_INTENCLR_PREGION0RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENCLR_PREGION0RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENCLR_PREGION0RA_Clear (1UL) /*!< Disable */ + +/* Bit 24 : Write '1' to Disable interrupt for PREGION[0].WA event */ +#define MWU_INTENCLR_PREGION0WA_Pos (24UL) /*!< Position of PREGION0WA field. */ +#define MWU_INTENCLR_PREGION0WA_Msk (0x1UL << MWU_INTENCLR_PREGION0WA_Pos) /*!< Bit mask of PREGION0WA field. */ +#define MWU_INTENCLR_PREGION0WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENCLR_PREGION0WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENCLR_PREGION0WA_Clear (1UL) /*!< Disable */ + +/* Bit 7 : Write '1' to Disable interrupt for REGION[3].RA event */ +#define MWU_INTENCLR_REGION3RA_Pos (7UL) /*!< Position of REGION3RA field. */ +#define MWU_INTENCLR_REGION3RA_Msk (0x1UL << MWU_INTENCLR_REGION3RA_Pos) /*!< Bit mask of REGION3RA field. */ +#define MWU_INTENCLR_REGION3RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENCLR_REGION3RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENCLR_REGION3RA_Clear (1UL) /*!< Disable */ + +/* Bit 6 : Write '1' to Disable interrupt for REGION[3].WA event */ +#define MWU_INTENCLR_REGION3WA_Pos (6UL) /*!< Position of REGION3WA field. */ +#define MWU_INTENCLR_REGION3WA_Msk (0x1UL << MWU_INTENCLR_REGION3WA_Pos) /*!< Bit mask of REGION3WA field. */ +#define MWU_INTENCLR_REGION3WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENCLR_REGION3WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENCLR_REGION3WA_Clear (1UL) /*!< Disable */ + +/* Bit 5 : Write '1' to Disable interrupt for REGION[2].RA event */ +#define MWU_INTENCLR_REGION2RA_Pos (5UL) /*!< Position of REGION2RA field. */ +#define MWU_INTENCLR_REGION2RA_Msk (0x1UL << MWU_INTENCLR_REGION2RA_Pos) /*!< Bit mask of REGION2RA field. */ +#define MWU_INTENCLR_REGION2RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENCLR_REGION2RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENCLR_REGION2RA_Clear (1UL) /*!< Disable */ + +/* Bit 4 : Write '1' to Disable interrupt for REGION[2].WA event */ +#define MWU_INTENCLR_REGION2WA_Pos (4UL) /*!< Position of REGION2WA field. */ +#define MWU_INTENCLR_REGION2WA_Msk (0x1UL << MWU_INTENCLR_REGION2WA_Pos) /*!< Bit mask of REGION2WA field. */ +#define MWU_INTENCLR_REGION2WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENCLR_REGION2WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENCLR_REGION2WA_Clear (1UL) /*!< Disable */ + +/* Bit 3 : Write '1' to Disable interrupt for REGION[1].RA event */ +#define MWU_INTENCLR_REGION1RA_Pos (3UL) /*!< Position of REGION1RA field. */ +#define MWU_INTENCLR_REGION1RA_Msk (0x1UL << MWU_INTENCLR_REGION1RA_Pos) /*!< Bit mask of REGION1RA field. */ +#define MWU_INTENCLR_REGION1RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENCLR_REGION1RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENCLR_REGION1RA_Clear (1UL) /*!< Disable */ + +/* Bit 2 : Write '1' to Disable interrupt for REGION[1].WA event */ +#define MWU_INTENCLR_REGION1WA_Pos (2UL) /*!< Position of REGION1WA field. */ +#define MWU_INTENCLR_REGION1WA_Msk (0x1UL << MWU_INTENCLR_REGION1WA_Pos) /*!< Bit mask of REGION1WA field. */ +#define MWU_INTENCLR_REGION1WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENCLR_REGION1WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENCLR_REGION1WA_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for REGION[0].RA event */ +#define MWU_INTENCLR_REGION0RA_Pos (1UL) /*!< Position of REGION0RA field. */ +#define MWU_INTENCLR_REGION0RA_Msk (0x1UL << MWU_INTENCLR_REGION0RA_Pos) /*!< Bit mask of REGION0RA field. */ +#define MWU_INTENCLR_REGION0RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENCLR_REGION0RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENCLR_REGION0RA_Clear (1UL) /*!< Disable */ + +/* Bit 0 : Write '1' to Disable interrupt for REGION[0].WA event */ +#define MWU_INTENCLR_REGION0WA_Pos (0UL) /*!< Position of REGION0WA field. */ +#define MWU_INTENCLR_REGION0WA_Msk (0x1UL << MWU_INTENCLR_REGION0WA_Pos) /*!< Bit mask of REGION0WA field. */ +#define MWU_INTENCLR_REGION0WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_INTENCLR_REGION0WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_INTENCLR_REGION0WA_Clear (1UL) /*!< Disable */ + +/* Register: MWU_NMIEN */ +/* Description: Enable or disable non-maskable interrupt */ + +/* Bit 27 : Enable or disable non-maskable interrupt for PREGION[1].RA event */ +#define MWU_NMIEN_PREGION1RA_Pos (27UL) /*!< Position of PREGION1RA field. */ +#define MWU_NMIEN_PREGION1RA_Msk (0x1UL << MWU_NMIEN_PREGION1RA_Pos) /*!< Bit mask of PREGION1RA field. */ +#define MWU_NMIEN_PREGION1RA_Disabled (0UL) /*!< Disable */ +#define MWU_NMIEN_PREGION1RA_Enabled (1UL) /*!< Enable */ + +/* Bit 26 : Enable or disable non-maskable interrupt for PREGION[1].WA event */ +#define MWU_NMIEN_PREGION1WA_Pos (26UL) /*!< Position of PREGION1WA field. */ +#define MWU_NMIEN_PREGION1WA_Msk (0x1UL << MWU_NMIEN_PREGION1WA_Pos) /*!< Bit mask of PREGION1WA field. */ +#define MWU_NMIEN_PREGION1WA_Disabled (0UL) /*!< Disable */ +#define MWU_NMIEN_PREGION1WA_Enabled (1UL) /*!< Enable */ + +/* Bit 25 : Enable or disable non-maskable interrupt for PREGION[0].RA event */ +#define MWU_NMIEN_PREGION0RA_Pos (25UL) /*!< Position of PREGION0RA field. */ +#define MWU_NMIEN_PREGION0RA_Msk (0x1UL << MWU_NMIEN_PREGION0RA_Pos) /*!< Bit mask of PREGION0RA field. */ +#define MWU_NMIEN_PREGION0RA_Disabled (0UL) /*!< Disable */ +#define MWU_NMIEN_PREGION0RA_Enabled (1UL) /*!< Enable */ + +/* Bit 24 : Enable or disable non-maskable interrupt for PREGION[0].WA event */ +#define MWU_NMIEN_PREGION0WA_Pos (24UL) /*!< Position of PREGION0WA field. */ +#define MWU_NMIEN_PREGION0WA_Msk (0x1UL << MWU_NMIEN_PREGION0WA_Pos) /*!< Bit mask of PREGION0WA field. */ +#define MWU_NMIEN_PREGION0WA_Disabled (0UL) /*!< Disable */ +#define MWU_NMIEN_PREGION0WA_Enabled (1UL) /*!< Enable */ + +/* Bit 7 : Enable or disable non-maskable interrupt for REGION[3].RA event */ +#define MWU_NMIEN_REGION3RA_Pos (7UL) /*!< Position of REGION3RA field. */ +#define MWU_NMIEN_REGION3RA_Msk (0x1UL << MWU_NMIEN_REGION3RA_Pos) /*!< Bit mask of REGION3RA field. */ +#define MWU_NMIEN_REGION3RA_Disabled (0UL) /*!< Disable */ +#define MWU_NMIEN_REGION3RA_Enabled (1UL) /*!< Enable */ + +/* Bit 6 : Enable or disable non-maskable interrupt for REGION[3].WA event */ +#define MWU_NMIEN_REGION3WA_Pos (6UL) /*!< Position of REGION3WA field. */ +#define MWU_NMIEN_REGION3WA_Msk (0x1UL << MWU_NMIEN_REGION3WA_Pos) /*!< Bit mask of REGION3WA field. */ +#define MWU_NMIEN_REGION3WA_Disabled (0UL) /*!< Disable */ +#define MWU_NMIEN_REGION3WA_Enabled (1UL) /*!< Enable */ + +/* Bit 5 : Enable or disable non-maskable interrupt for REGION[2].RA event */ +#define MWU_NMIEN_REGION2RA_Pos (5UL) /*!< Position of REGION2RA field. */ +#define MWU_NMIEN_REGION2RA_Msk (0x1UL << MWU_NMIEN_REGION2RA_Pos) /*!< Bit mask of REGION2RA field. */ +#define MWU_NMIEN_REGION2RA_Disabled (0UL) /*!< Disable */ +#define MWU_NMIEN_REGION2RA_Enabled (1UL) /*!< Enable */ + +/* Bit 4 : Enable or disable non-maskable interrupt for REGION[2].WA event */ +#define MWU_NMIEN_REGION2WA_Pos (4UL) /*!< Position of REGION2WA field. */ +#define MWU_NMIEN_REGION2WA_Msk (0x1UL << MWU_NMIEN_REGION2WA_Pos) /*!< Bit mask of REGION2WA field. */ +#define MWU_NMIEN_REGION2WA_Disabled (0UL) /*!< Disable */ +#define MWU_NMIEN_REGION2WA_Enabled (1UL) /*!< Enable */ + +/* Bit 3 : Enable or disable non-maskable interrupt for REGION[1].RA event */ +#define MWU_NMIEN_REGION1RA_Pos (3UL) /*!< Position of REGION1RA field. */ +#define MWU_NMIEN_REGION1RA_Msk (0x1UL << MWU_NMIEN_REGION1RA_Pos) /*!< Bit mask of REGION1RA field. */ +#define MWU_NMIEN_REGION1RA_Disabled (0UL) /*!< Disable */ +#define MWU_NMIEN_REGION1RA_Enabled (1UL) /*!< Enable */ + +/* Bit 2 : Enable or disable non-maskable interrupt for REGION[1].WA event */ +#define MWU_NMIEN_REGION1WA_Pos (2UL) /*!< Position of REGION1WA field. */ +#define MWU_NMIEN_REGION1WA_Msk (0x1UL << MWU_NMIEN_REGION1WA_Pos) /*!< Bit mask of REGION1WA field. */ +#define MWU_NMIEN_REGION1WA_Disabled (0UL) /*!< Disable */ +#define MWU_NMIEN_REGION1WA_Enabled (1UL) /*!< Enable */ + +/* Bit 1 : Enable or disable non-maskable interrupt for REGION[0].RA event */ +#define MWU_NMIEN_REGION0RA_Pos (1UL) /*!< Position of REGION0RA field. */ +#define MWU_NMIEN_REGION0RA_Msk (0x1UL << MWU_NMIEN_REGION0RA_Pos) /*!< Bit mask of REGION0RA field. */ +#define MWU_NMIEN_REGION0RA_Disabled (0UL) /*!< Disable */ +#define MWU_NMIEN_REGION0RA_Enabled (1UL) /*!< Enable */ + +/* Bit 0 : Enable or disable non-maskable interrupt for REGION[0].WA event */ +#define MWU_NMIEN_REGION0WA_Pos (0UL) /*!< Position of REGION0WA field. */ +#define MWU_NMIEN_REGION0WA_Msk (0x1UL << MWU_NMIEN_REGION0WA_Pos) /*!< Bit mask of REGION0WA field. */ +#define MWU_NMIEN_REGION0WA_Disabled (0UL) /*!< Disable */ +#define MWU_NMIEN_REGION0WA_Enabled (1UL) /*!< Enable */ + +/* Register: MWU_NMIENSET */ +/* Description: Enable non-maskable interrupt */ + +/* Bit 27 : Write '1' to Enable non-maskable interrupt for PREGION[1].RA event */ +#define MWU_NMIENSET_PREGION1RA_Pos (27UL) /*!< Position of PREGION1RA field. */ +#define MWU_NMIENSET_PREGION1RA_Msk (0x1UL << MWU_NMIENSET_PREGION1RA_Pos) /*!< Bit mask of PREGION1RA field. */ +#define MWU_NMIENSET_PREGION1RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENSET_PREGION1RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENSET_PREGION1RA_Set (1UL) /*!< Enable */ + +/* Bit 26 : Write '1' to Enable non-maskable interrupt for PREGION[1].WA event */ +#define MWU_NMIENSET_PREGION1WA_Pos (26UL) /*!< Position of PREGION1WA field. */ +#define MWU_NMIENSET_PREGION1WA_Msk (0x1UL << MWU_NMIENSET_PREGION1WA_Pos) /*!< Bit mask of PREGION1WA field. */ +#define MWU_NMIENSET_PREGION1WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENSET_PREGION1WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENSET_PREGION1WA_Set (1UL) /*!< Enable */ + +/* Bit 25 : Write '1' to Enable non-maskable interrupt for PREGION[0].RA event */ +#define MWU_NMIENSET_PREGION0RA_Pos (25UL) /*!< Position of PREGION0RA field. */ +#define MWU_NMIENSET_PREGION0RA_Msk (0x1UL << MWU_NMIENSET_PREGION0RA_Pos) /*!< Bit mask of PREGION0RA field. */ +#define MWU_NMIENSET_PREGION0RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENSET_PREGION0RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENSET_PREGION0RA_Set (1UL) /*!< Enable */ + +/* Bit 24 : Write '1' to Enable non-maskable interrupt for PREGION[0].WA event */ +#define MWU_NMIENSET_PREGION0WA_Pos (24UL) /*!< Position of PREGION0WA field. */ +#define MWU_NMIENSET_PREGION0WA_Msk (0x1UL << MWU_NMIENSET_PREGION0WA_Pos) /*!< Bit mask of PREGION0WA field. */ +#define MWU_NMIENSET_PREGION0WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENSET_PREGION0WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENSET_PREGION0WA_Set (1UL) /*!< Enable */ + +/* Bit 7 : Write '1' to Enable non-maskable interrupt for REGION[3].RA event */ +#define MWU_NMIENSET_REGION3RA_Pos (7UL) /*!< Position of REGION3RA field. */ +#define MWU_NMIENSET_REGION3RA_Msk (0x1UL << MWU_NMIENSET_REGION3RA_Pos) /*!< Bit mask of REGION3RA field. */ +#define MWU_NMIENSET_REGION3RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENSET_REGION3RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENSET_REGION3RA_Set (1UL) /*!< Enable */ + +/* Bit 6 : Write '1' to Enable non-maskable interrupt for REGION[3].WA event */ +#define MWU_NMIENSET_REGION3WA_Pos (6UL) /*!< Position of REGION3WA field. */ +#define MWU_NMIENSET_REGION3WA_Msk (0x1UL << MWU_NMIENSET_REGION3WA_Pos) /*!< Bit mask of REGION3WA field. */ +#define MWU_NMIENSET_REGION3WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENSET_REGION3WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENSET_REGION3WA_Set (1UL) /*!< Enable */ + +/* Bit 5 : Write '1' to Enable non-maskable interrupt for REGION[2].RA event */ +#define MWU_NMIENSET_REGION2RA_Pos (5UL) /*!< Position of REGION2RA field. */ +#define MWU_NMIENSET_REGION2RA_Msk (0x1UL << MWU_NMIENSET_REGION2RA_Pos) /*!< Bit mask of REGION2RA field. */ +#define MWU_NMIENSET_REGION2RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENSET_REGION2RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENSET_REGION2RA_Set (1UL) /*!< Enable */ + +/* Bit 4 : Write '1' to Enable non-maskable interrupt for REGION[2].WA event */ +#define MWU_NMIENSET_REGION2WA_Pos (4UL) /*!< Position of REGION2WA field. */ +#define MWU_NMIENSET_REGION2WA_Msk (0x1UL << MWU_NMIENSET_REGION2WA_Pos) /*!< Bit mask of REGION2WA field. */ +#define MWU_NMIENSET_REGION2WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENSET_REGION2WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENSET_REGION2WA_Set (1UL) /*!< Enable */ + +/* Bit 3 : Write '1' to Enable non-maskable interrupt for REGION[1].RA event */ +#define MWU_NMIENSET_REGION1RA_Pos (3UL) /*!< Position of REGION1RA field. */ +#define MWU_NMIENSET_REGION1RA_Msk (0x1UL << MWU_NMIENSET_REGION1RA_Pos) /*!< Bit mask of REGION1RA field. */ +#define MWU_NMIENSET_REGION1RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENSET_REGION1RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENSET_REGION1RA_Set (1UL) /*!< Enable */ + +/* Bit 2 : Write '1' to Enable non-maskable interrupt for REGION[1].WA event */ +#define MWU_NMIENSET_REGION1WA_Pos (2UL) /*!< Position of REGION1WA field. */ +#define MWU_NMIENSET_REGION1WA_Msk (0x1UL << MWU_NMIENSET_REGION1WA_Pos) /*!< Bit mask of REGION1WA field. */ +#define MWU_NMIENSET_REGION1WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENSET_REGION1WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENSET_REGION1WA_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable non-maskable interrupt for REGION[0].RA event */ +#define MWU_NMIENSET_REGION0RA_Pos (1UL) /*!< Position of REGION0RA field. */ +#define MWU_NMIENSET_REGION0RA_Msk (0x1UL << MWU_NMIENSET_REGION0RA_Pos) /*!< Bit mask of REGION0RA field. */ +#define MWU_NMIENSET_REGION0RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENSET_REGION0RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENSET_REGION0RA_Set (1UL) /*!< Enable */ + +/* Bit 0 : Write '1' to Enable non-maskable interrupt for REGION[0].WA event */ +#define MWU_NMIENSET_REGION0WA_Pos (0UL) /*!< Position of REGION0WA field. */ +#define MWU_NMIENSET_REGION0WA_Msk (0x1UL << MWU_NMIENSET_REGION0WA_Pos) /*!< Bit mask of REGION0WA field. */ +#define MWU_NMIENSET_REGION0WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENSET_REGION0WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENSET_REGION0WA_Set (1UL) /*!< Enable */ + +/* Register: MWU_NMIENCLR */ +/* Description: Disable non-maskable interrupt */ + +/* Bit 27 : Write '1' to Disable non-maskable interrupt for PREGION[1].RA event */ +#define MWU_NMIENCLR_PREGION1RA_Pos (27UL) /*!< Position of PREGION1RA field. */ +#define MWU_NMIENCLR_PREGION1RA_Msk (0x1UL << MWU_NMIENCLR_PREGION1RA_Pos) /*!< Bit mask of PREGION1RA field. */ +#define MWU_NMIENCLR_PREGION1RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENCLR_PREGION1RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENCLR_PREGION1RA_Clear (1UL) /*!< Disable */ + +/* Bit 26 : Write '1' to Disable non-maskable interrupt for PREGION[1].WA event */ +#define MWU_NMIENCLR_PREGION1WA_Pos (26UL) /*!< Position of PREGION1WA field. */ +#define MWU_NMIENCLR_PREGION1WA_Msk (0x1UL << MWU_NMIENCLR_PREGION1WA_Pos) /*!< Bit mask of PREGION1WA field. */ +#define MWU_NMIENCLR_PREGION1WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENCLR_PREGION1WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENCLR_PREGION1WA_Clear (1UL) /*!< Disable */ + +/* Bit 25 : Write '1' to Disable non-maskable interrupt for PREGION[0].RA event */ +#define MWU_NMIENCLR_PREGION0RA_Pos (25UL) /*!< Position of PREGION0RA field. */ +#define MWU_NMIENCLR_PREGION0RA_Msk (0x1UL << MWU_NMIENCLR_PREGION0RA_Pos) /*!< Bit mask of PREGION0RA field. */ +#define MWU_NMIENCLR_PREGION0RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENCLR_PREGION0RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENCLR_PREGION0RA_Clear (1UL) /*!< Disable */ + +/* Bit 24 : Write '1' to Disable non-maskable interrupt for PREGION[0].WA event */ +#define MWU_NMIENCLR_PREGION0WA_Pos (24UL) /*!< Position of PREGION0WA field. */ +#define MWU_NMIENCLR_PREGION0WA_Msk (0x1UL << MWU_NMIENCLR_PREGION0WA_Pos) /*!< Bit mask of PREGION0WA field. */ +#define MWU_NMIENCLR_PREGION0WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENCLR_PREGION0WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENCLR_PREGION0WA_Clear (1UL) /*!< Disable */ + +/* Bit 7 : Write '1' to Disable non-maskable interrupt for REGION[3].RA event */ +#define MWU_NMIENCLR_REGION3RA_Pos (7UL) /*!< Position of REGION3RA field. */ +#define MWU_NMIENCLR_REGION3RA_Msk (0x1UL << MWU_NMIENCLR_REGION3RA_Pos) /*!< Bit mask of REGION3RA field. */ +#define MWU_NMIENCLR_REGION3RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENCLR_REGION3RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENCLR_REGION3RA_Clear (1UL) /*!< Disable */ + +/* Bit 6 : Write '1' to Disable non-maskable interrupt for REGION[3].WA event */ +#define MWU_NMIENCLR_REGION3WA_Pos (6UL) /*!< Position of REGION3WA field. */ +#define MWU_NMIENCLR_REGION3WA_Msk (0x1UL << MWU_NMIENCLR_REGION3WA_Pos) /*!< Bit mask of REGION3WA field. */ +#define MWU_NMIENCLR_REGION3WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENCLR_REGION3WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENCLR_REGION3WA_Clear (1UL) /*!< Disable */ + +/* Bit 5 : Write '1' to Disable non-maskable interrupt for REGION[2].RA event */ +#define MWU_NMIENCLR_REGION2RA_Pos (5UL) /*!< Position of REGION2RA field. */ +#define MWU_NMIENCLR_REGION2RA_Msk (0x1UL << MWU_NMIENCLR_REGION2RA_Pos) /*!< Bit mask of REGION2RA field. */ +#define MWU_NMIENCLR_REGION2RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENCLR_REGION2RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENCLR_REGION2RA_Clear (1UL) /*!< Disable */ + +/* Bit 4 : Write '1' to Disable non-maskable interrupt for REGION[2].WA event */ +#define MWU_NMIENCLR_REGION2WA_Pos (4UL) /*!< Position of REGION2WA field. */ +#define MWU_NMIENCLR_REGION2WA_Msk (0x1UL << MWU_NMIENCLR_REGION2WA_Pos) /*!< Bit mask of REGION2WA field. */ +#define MWU_NMIENCLR_REGION2WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENCLR_REGION2WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENCLR_REGION2WA_Clear (1UL) /*!< Disable */ + +/* Bit 3 : Write '1' to Disable non-maskable interrupt for REGION[1].RA event */ +#define MWU_NMIENCLR_REGION1RA_Pos (3UL) /*!< Position of REGION1RA field. */ +#define MWU_NMIENCLR_REGION1RA_Msk (0x1UL << MWU_NMIENCLR_REGION1RA_Pos) /*!< Bit mask of REGION1RA field. */ +#define MWU_NMIENCLR_REGION1RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENCLR_REGION1RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENCLR_REGION1RA_Clear (1UL) /*!< Disable */ + +/* Bit 2 : Write '1' to Disable non-maskable interrupt for REGION[1].WA event */ +#define MWU_NMIENCLR_REGION1WA_Pos (2UL) /*!< Position of REGION1WA field. */ +#define MWU_NMIENCLR_REGION1WA_Msk (0x1UL << MWU_NMIENCLR_REGION1WA_Pos) /*!< Bit mask of REGION1WA field. */ +#define MWU_NMIENCLR_REGION1WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENCLR_REGION1WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENCLR_REGION1WA_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable non-maskable interrupt for REGION[0].RA event */ +#define MWU_NMIENCLR_REGION0RA_Pos (1UL) /*!< Position of REGION0RA field. */ +#define MWU_NMIENCLR_REGION0RA_Msk (0x1UL << MWU_NMIENCLR_REGION0RA_Pos) /*!< Bit mask of REGION0RA field. */ +#define MWU_NMIENCLR_REGION0RA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENCLR_REGION0RA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENCLR_REGION0RA_Clear (1UL) /*!< Disable */ + +/* Bit 0 : Write '1' to Disable non-maskable interrupt for REGION[0].WA event */ +#define MWU_NMIENCLR_REGION0WA_Pos (0UL) /*!< Position of REGION0WA field. */ +#define MWU_NMIENCLR_REGION0WA_Msk (0x1UL << MWU_NMIENCLR_REGION0WA_Pos) /*!< Bit mask of REGION0WA field. */ +#define MWU_NMIENCLR_REGION0WA_Disabled (0UL) /*!< Read: Disabled */ +#define MWU_NMIENCLR_REGION0WA_Enabled (1UL) /*!< Read: Enabled */ +#define MWU_NMIENCLR_REGION0WA_Clear (1UL) /*!< Disable */ + +/* Register: MWU_PERREGION_SUBSTATWA */ +/* Description: Description cluster[0]: Source of event/interrupt in region 0, write access detected while corresponding subregion was enabled for watching */ + +/* Bit 31 : Subregion 31 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR31_Pos (31UL) /*!< Position of SR31 field. */ +#define MWU_PERREGION_SUBSTATWA_SR31_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR31_Pos) /*!< Bit mask of SR31 field. */ +#define MWU_PERREGION_SUBSTATWA_SR31_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR31_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 30 : Subregion 30 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR30_Pos (30UL) /*!< Position of SR30 field. */ +#define MWU_PERREGION_SUBSTATWA_SR30_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR30_Pos) /*!< Bit mask of SR30 field. */ +#define MWU_PERREGION_SUBSTATWA_SR30_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR30_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 29 : Subregion 29 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR29_Pos (29UL) /*!< Position of SR29 field. */ +#define MWU_PERREGION_SUBSTATWA_SR29_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR29_Pos) /*!< Bit mask of SR29 field. */ +#define MWU_PERREGION_SUBSTATWA_SR29_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR29_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 28 : Subregion 28 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR28_Pos (28UL) /*!< Position of SR28 field. */ +#define MWU_PERREGION_SUBSTATWA_SR28_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR28_Pos) /*!< Bit mask of SR28 field. */ +#define MWU_PERREGION_SUBSTATWA_SR28_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR28_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 27 : Subregion 27 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR27_Pos (27UL) /*!< Position of SR27 field. */ +#define MWU_PERREGION_SUBSTATWA_SR27_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR27_Pos) /*!< Bit mask of SR27 field. */ +#define MWU_PERREGION_SUBSTATWA_SR27_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR27_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 26 : Subregion 26 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR26_Pos (26UL) /*!< Position of SR26 field. */ +#define MWU_PERREGION_SUBSTATWA_SR26_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR26_Pos) /*!< Bit mask of SR26 field. */ +#define MWU_PERREGION_SUBSTATWA_SR26_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR26_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 25 : Subregion 25 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR25_Pos (25UL) /*!< Position of SR25 field. */ +#define MWU_PERREGION_SUBSTATWA_SR25_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR25_Pos) /*!< Bit mask of SR25 field. */ +#define MWU_PERREGION_SUBSTATWA_SR25_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR25_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 24 : Subregion 24 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR24_Pos (24UL) /*!< Position of SR24 field. */ +#define MWU_PERREGION_SUBSTATWA_SR24_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR24_Pos) /*!< Bit mask of SR24 field. */ +#define MWU_PERREGION_SUBSTATWA_SR24_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR24_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 23 : Subregion 23 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR23_Pos (23UL) /*!< Position of SR23 field. */ +#define MWU_PERREGION_SUBSTATWA_SR23_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR23_Pos) /*!< Bit mask of SR23 field. */ +#define MWU_PERREGION_SUBSTATWA_SR23_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR23_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 22 : Subregion 22 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR22_Pos (22UL) /*!< Position of SR22 field. */ +#define MWU_PERREGION_SUBSTATWA_SR22_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR22_Pos) /*!< Bit mask of SR22 field. */ +#define MWU_PERREGION_SUBSTATWA_SR22_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR22_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 21 : Subregion 21 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR21_Pos (21UL) /*!< Position of SR21 field. */ +#define MWU_PERREGION_SUBSTATWA_SR21_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR21_Pos) /*!< Bit mask of SR21 field. */ +#define MWU_PERREGION_SUBSTATWA_SR21_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR21_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 20 : Subregion 20 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR20_Pos (20UL) /*!< Position of SR20 field. */ +#define MWU_PERREGION_SUBSTATWA_SR20_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR20_Pos) /*!< Bit mask of SR20 field. */ +#define MWU_PERREGION_SUBSTATWA_SR20_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR20_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 19 : Subregion 19 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR19_Pos (19UL) /*!< Position of SR19 field. */ +#define MWU_PERREGION_SUBSTATWA_SR19_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR19_Pos) /*!< Bit mask of SR19 field. */ +#define MWU_PERREGION_SUBSTATWA_SR19_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR19_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 18 : Subregion 18 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR18_Pos (18UL) /*!< Position of SR18 field. */ +#define MWU_PERREGION_SUBSTATWA_SR18_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR18_Pos) /*!< Bit mask of SR18 field. */ +#define MWU_PERREGION_SUBSTATWA_SR18_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR18_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 17 : Subregion 17 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR17_Pos (17UL) /*!< Position of SR17 field. */ +#define MWU_PERREGION_SUBSTATWA_SR17_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR17_Pos) /*!< Bit mask of SR17 field. */ +#define MWU_PERREGION_SUBSTATWA_SR17_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR17_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 16 : Subregion 16 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR16_Pos (16UL) /*!< Position of SR16 field. */ +#define MWU_PERREGION_SUBSTATWA_SR16_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR16_Pos) /*!< Bit mask of SR16 field. */ +#define MWU_PERREGION_SUBSTATWA_SR16_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR16_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 15 : Subregion 15 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR15_Pos (15UL) /*!< Position of SR15 field. */ +#define MWU_PERREGION_SUBSTATWA_SR15_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR15_Pos) /*!< Bit mask of SR15 field. */ +#define MWU_PERREGION_SUBSTATWA_SR15_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR15_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 14 : Subregion 14 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR14_Pos (14UL) /*!< Position of SR14 field. */ +#define MWU_PERREGION_SUBSTATWA_SR14_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR14_Pos) /*!< Bit mask of SR14 field. */ +#define MWU_PERREGION_SUBSTATWA_SR14_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR14_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 13 : Subregion 13 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR13_Pos (13UL) /*!< Position of SR13 field. */ +#define MWU_PERREGION_SUBSTATWA_SR13_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR13_Pos) /*!< Bit mask of SR13 field. */ +#define MWU_PERREGION_SUBSTATWA_SR13_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR13_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 12 : Subregion 12 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR12_Pos (12UL) /*!< Position of SR12 field. */ +#define MWU_PERREGION_SUBSTATWA_SR12_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR12_Pos) /*!< Bit mask of SR12 field. */ +#define MWU_PERREGION_SUBSTATWA_SR12_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR12_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 11 : Subregion 11 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR11_Pos (11UL) /*!< Position of SR11 field. */ +#define MWU_PERREGION_SUBSTATWA_SR11_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR11_Pos) /*!< Bit mask of SR11 field. */ +#define MWU_PERREGION_SUBSTATWA_SR11_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR11_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 10 : Subregion 10 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR10_Pos (10UL) /*!< Position of SR10 field. */ +#define MWU_PERREGION_SUBSTATWA_SR10_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR10_Pos) /*!< Bit mask of SR10 field. */ +#define MWU_PERREGION_SUBSTATWA_SR10_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR10_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 9 : Subregion 9 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR9_Pos (9UL) /*!< Position of SR9 field. */ +#define MWU_PERREGION_SUBSTATWA_SR9_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR9_Pos) /*!< Bit mask of SR9 field. */ +#define MWU_PERREGION_SUBSTATWA_SR9_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR9_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 8 : Subregion 8 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR8_Pos (8UL) /*!< Position of SR8 field. */ +#define MWU_PERREGION_SUBSTATWA_SR8_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR8_Pos) /*!< Bit mask of SR8 field. */ +#define MWU_PERREGION_SUBSTATWA_SR8_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR8_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 7 : Subregion 7 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR7_Pos (7UL) /*!< Position of SR7 field. */ +#define MWU_PERREGION_SUBSTATWA_SR7_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR7_Pos) /*!< Bit mask of SR7 field. */ +#define MWU_PERREGION_SUBSTATWA_SR7_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR7_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 6 : Subregion 6 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR6_Pos (6UL) /*!< Position of SR6 field. */ +#define MWU_PERREGION_SUBSTATWA_SR6_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR6_Pos) /*!< Bit mask of SR6 field. */ +#define MWU_PERREGION_SUBSTATWA_SR6_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR6_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 5 : Subregion 5 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR5_Pos (5UL) /*!< Position of SR5 field. */ +#define MWU_PERREGION_SUBSTATWA_SR5_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR5_Pos) /*!< Bit mask of SR5 field. */ +#define MWU_PERREGION_SUBSTATWA_SR5_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR5_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 4 : Subregion 4 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR4_Pos (4UL) /*!< Position of SR4 field. */ +#define MWU_PERREGION_SUBSTATWA_SR4_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR4_Pos) /*!< Bit mask of SR4 field. */ +#define MWU_PERREGION_SUBSTATWA_SR4_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR4_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 3 : Subregion 3 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR3_Pos (3UL) /*!< Position of SR3 field. */ +#define MWU_PERREGION_SUBSTATWA_SR3_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR3_Pos) /*!< Bit mask of SR3 field. */ +#define MWU_PERREGION_SUBSTATWA_SR3_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR3_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 2 : Subregion 2 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR2_Pos (2UL) /*!< Position of SR2 field. */ +#define MWU_PERREGION_SUBSTATWA_SR2_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR2_Pos) /*!< Bit mask of SR2 field. */ +#define MWU_PERREGION_SUBSTATWA_SR2_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR2_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 1 : Subregion 1 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR1_Pos (1UL) /*!< Position of SR1 field. */ +#define MWU_PERREGION_SUBSTATWA_SR1_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR1_Pos) /*!< Bit mask of SR1 field. */ +#define MWU_PERREGION_SUBSTATWA_SR1_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR1_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Bit 0 : Subregion 0 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATWA_SR0_Pos (0UL) /*!< Position of SR0 field. */ +#define MWU_PERREGION_SUBSTATWA_SR0_Msk (0x1UL << MWU_PERREGION_SUBSTATWA_SR0_Pos) /*!< Bit mask of SR0 field. */ +#define MWU_PERREGION_SUBSTATWA_SR0_NoAccess (0UL) /*!< No write access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATWA_SR0_Access (1UL) /*!< Write access(es) occurred in this subregion */ + +/* Register: MWU_PERREGION_SUBSTATRA */ +/* Description: Description cluster[0]: Source of event/interrupt in region 0, read access detected while corresponding subregion was enabled for watching */ + +/* Bit 31 : Subregion 31 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR31_Pos (31UL) /*!< Position of SR31 field. */ +#define MWU_PERREGION_SUBSTATRA_SR31_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR31_Pos) /*!< Bit mask of SR31 field. */ +#define MWU_PERREGION_SUBSTATRA_SR31_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR31_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 30 : Subregion 30 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR30_Pos (30UL) /*!< Position of SR30 field. */ +#define MWU_PERREGION_SUBSTATRA_SR30_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR30_Pos) /*!< Bit mask of SR30 field. */ +#define MWU_PERREGION_SUBSTATRA_SR30_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR30_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 29 : Subregion 29 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR29_Pos (29UL) /*!< Position of SR29 field. */ +#define MWU_PERREGION_SUBSTATRA_SR29_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR29_Pos) /*!< Bit mask of SR29 field. */ +#define MWU_PERREGION_SUBSTATRA_SR29_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR29_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 28 : Subregion 28 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR28_Pos (28UL) /*!< Position of SR28 field. */ +#define MWU_PERREGION_SUBSTATRA_SR28_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR28_Pos) /*!< Bit mask of SR28 field. */ +#define MWU_PERREGION_SUBSTATRA_SR28_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR28_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 27 : Subregion 27 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR27_Pos (27UL) /*!< Position of SR27 field. */ +#define MWU_PERREGION_SUBSTATRA_SR27_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR27_Pos) /*!< Bit mask of SR27 field. */ +#define MWU_PERREGION_SUBSTATRA_SR27_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR27_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 26 : Subregion 26 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR26_Pos (26UL) /*!< Position of SR26 field. */ +#define MWU_PERREGION_SUBSTATRA_SR26_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR26_Pos) /*!< Bit mask of SR26 field. */ +#define MWU_PERREGION_SUBSTATRA_SR26_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR26_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 25 : Subregion 25 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR25_Pos (25UL) /*!< Position of SR25 field. */ +#define MWU_PERREGION_SUBSTATRA_SR25_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR25_Pos) /*!< Bit mask of SR25 field. */ +#define MWU_PERREGION_SUBSTATRA_SR25_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR25_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 24 : Subregion 24 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR24_Pos (24UL) /*!< Position of SR24 field. */ +#define MWU_PERREGION_SUBSTATRA_SR24_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR24_Pos) /*!< Bit mask of SR24 field. */ +#define MWU_PERREGION_SUBSTATRA_SR24_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR24_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 23 : Subregion 23 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR23_Pos (23UL) /*!< Position of SR23 field. */ +#define MWU_PERREGION_SUBSTATRA_SR23_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR23_Pos) /*!< Bit mask of SR23 field. */ +#define MWU_PERREGION_SUBSTATRA_SR23_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR23_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 22 : Subregion 22 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR22_Pos (22UL) /*!< Position of SR22 field. */ +#define MWU_PERREGION_SUBSTATRA_SR22_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR22_Pos) /*!< Bit mask of SR22 field. */ +#define MWU_PERREGION_SUBSTATRA_SR22_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR22_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 21 : Subregion 21 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR21_Pos (21UL) /*!< Position of SR21 field. */ +#define MWU_PERREGION_SUBSTATRA_SR21_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR21_Pos) /*!< Bit mask of SR21 field. */ +#define MWU_PERREGION_SUBSTATRA_SR21_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR21_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 20 : Subregion 20 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR20_Pos (20UL) /*!< Position of SR20 field. */ +#define MWU_PERREGION_SUBSTATRA_SR20_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR20_Pos) /*!< Bit mask of SR20 field. */ +#define MWU_PERREGION_SUBSTATRA_SR20_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR20_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 19 : Subregion 19 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR19_Pos (19UL) /*!< Position of SR19 field. */ +#define MWU_PERREGION_SUBSTATRA_SR19_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR19_Pos) /*!< Bit mask of SR19 field. */ +#define MWU_PERREGION_SUBSTATRA_SR19_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR19_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 18 : Subregion 18 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR18_Pos (18UL) /*!< Position of SR18 field. */ +#define MWU_PERREGION_SUBSTATRA_SR18_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR18_Pos) /*!< Bit mask of SR18 field. */ +#define MWU_PERREGION_SUBSTATRA_SR18_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR18_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 17 : Subregion 17 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR17_Pos (17UL) /*!< Position of SR17 field. */ +#define MWU_PERREGION_SUBSTATRA_SR17_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR17_Pos) /*!< Bit mask of SR17 field. */ +#define MWU_PERREGION_SUBSTATRA_SR17_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR17_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 16 : Subregion 16 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR16_Pos (16UL) /*!< Position of SR16 field. */ +#define MWU_PERREGION_SUBSTATRA_SR16_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR16_Pos) /*!< Bit mask of SR16 field. */ +#define MWU_PERREGION_SUBSTATRA_SR16_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR16_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 15 : Subregion 15 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR15_Pos (15UL) /*!< Position of SR15 field. */ +#define MWU_PERREGION_SUBSTATRA_SR15_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR15_Pos) /*!< Bit mask of SR15 field. */ +#define MWU_PERREGION_SUBSTATRA_SR15_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR15_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 14 : Subregion 14 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR14_Pos (14UL) /*!< Position of SR14 field. */ +#define MWU_PERREGION_SUBSTATRA_SR14_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR14_Pos) /*!< Bit mask of SR14 field. */ +#define MWU_PERREGION_SUBSTATRA_SR14_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR14_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 13 : Subregion 13 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR13_Pos (13UL) /*!< Position of SR13 field. */ +#define MWU_PERREGION_SUBSTATRA_SR13_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR13_Pos) /*!< Bit mask of SR13 field. */ +#define MWU_PERREGION_SUBSTATRA_SR13_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR13_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 12 : Subregion 12 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR12_Pos (12UL) /*!< Position of SR12 field. */ +#define MWU_PERREGION_SUBSTATRA_SR12_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR12_Pos) /*!< Bit mask of SR12 field. */ +#define MWU_PERREGION_SUBSTATRA_SR12_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR12_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 11 : Subregion 11 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR11_Pos (11UL) /*!< Position of SR11 field. */ +#define MWU_PERREGION_SUBSTATRA_SR11_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR11_Pos) /*!< Bit mask of SR11 field. */ +#define MWU_PERREGION_SUBSTATRA_SR11_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR11_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 10 : Subregion 10 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR10_Pos (10UL) /*!< Position of SR10 field. */ +#define MWU_PERREGION_SUBSTATRA_SR10_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR10_Pos) /*!< Bit mask of SR10 field. */ +#define MWU_PERREGION_SUBSTATRA_SR10_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR10_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 9 : Subregion 9 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR9_Pos (9UL) /*!< Position of SR9 field. */ +#define MWU_PERREGION_SUBSTATRA_SR9_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR9_Pos) /*!< Bit mask of SR9 field. */ +#define MWU_PERREGION_SUBSTATRA_SR9_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR9_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 8 : Subregion 8 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR8_Pos (8UL) /*!< Position of SR8 field. */ +#define MWU_PERREGION_SUBSTATRA_SR8_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR8_Pos) /*!< Bit mask of SR8 field. */ +#define MWU_PERREGION_SUBSTATRA_SR8_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR8_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 7 : Subregion 7 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR7_Pos (7UL) /*!< Position of SR7 field. */ +#define MWU_PERREGION_SUBSTATRA_SR7_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR7_Pos) /*!< Bit mask of SR7 field. */ +#define MWU_PERREGION_SUBSTATRA_SR7_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR7_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 6 : Subregion 6 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR6_Pos (6UL) /*!< Position of SR6 field. */ +#define MWU_PERREGION_SUBSTATRA_SR6_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR6_Pos) /*!< Bit mask of SR6 field. */ +#define MWU_PERREGION_SUBSTATRA_SR6_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR6_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 5 : Subregion 5 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR5_Pos (5UL) /*!< Position of SR5 field. */ +#define MWU_PERREGION_SUBSTATRA_SR5_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR5_Pos) /*!< Bit mask of SR5 field. */ +#define MWU_PERREGION_SUBSTATRA_SR5_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR5_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 4 : Subregion 4 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR4_Pos (4UL) /*!< Position of SR4 field. */ +#define MWU_PERREGION_SUBSTATRA_SR4_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR4_Pos) /*!< Bit mask of SR4 field. */ +#define MWU_PERREGION_SUBSTATRA_SR4_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR4_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 3 : Subregion 3 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR3_Pos (3UL) /*!< Position of SR3 field. */ +#define MWU_PERREGION_SUBSTATRA_SR3_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR3_Pos) /*!< Bit mask of SR3 field. */ +#define MWU_PERREGION_SUBSTATRA_SR3_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR3_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 2 : Subregion 2 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR2_Pos (2UL) /*!< Position of SR2 field. */ +#define MWU_PERREGION_SUBSTATRA_SR2_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR2_Pos) /*!< Bit mask of SR2 field. */ +#define MWU_PERREGION_SUBSTATRA_SR2_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR2_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 1 : Subregion 1 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR1_Pos (1UL) /*!< Position of SR1 field. */ +#define MWU_PERREGION_SUBSTATRA_SR1_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR1_Pos) /*!< Bit mask of SR1 field. */ +#define MWU_PERREGION_SUBSTATRA_SR1_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR1_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Bit 0 : Subregion 0 in region 0 (write '1' to clear) */ +#define MWU_PERREGION_SUBSTATRA_SR0_Pos (0UL) /*!< Position of SR0 field. */ +#define MWU_PERREGION_SUBSTATRA_SR0_Msk (0x1UL << MWU_PERREGION_SUBSTATRA_SR0_Pos) /*!< Bit mask of SR0 field. */ +#define MWU_PERREGION_SUBSTATRA_SR0_NoAccess (0UL) /*!< No read access occurred in this subregion */ +#define MWU_PERREGION_SUBSTATRA_SR0_Access (1UL) /*!< Read access(es) occurred in this subregion */ + +/* Register: MWU_REGIONEN */ +/* Description: Enable/disable regions watch */ + +/* Bit 27 : Enable/disable read access watch in PREGION[1] */ +#define MWU_REGIONEN_PRGN1RA_Pos (27UL) /*!< Position of PRGN1RA field. */ +#define MWU_REGIONEN_PRGN1RA_Msk (0x1UL << MWU_REGIONEN_PRGN1RA_Pos) /*!< Bit mask of PRGN1RA field. */ +#define MWU_REGIONEN_PRGN1RA_Disable (0UL) /*!< Disable read access watch in this PREGION */ +#define MWU_REGIONEN_PRGN1RA_Enable (1UL) /*!< Enable read access watch in this PREGION */ + +/* Bit 26 : Enable/disable write access watch in PREGION[1] */ +#define MWU_REGIONEN_PRGN1WA_Pos (26UL) /*!< Position of PRGN1WA field. */ +#define MWU_REGIONEN_PRGN1WA_Msk (0x1UL << MWU_REGIONEN_PRGN1WA_Pos) /*!< Bit mask of PRGN1WA field. */ +#define MWU_REGIONEN_PRGN1WA_Disable (0UL) /*!< Disable write access watch in this PREGION */ +#define MWU_REGIONEN_PRGN1WA_Enable (1UL) /*!< Enable write access watch in this PREGION */ + +/* Bit 25 : Enable/disable read access watch in PREGION[0] */ +#define MWU_REGIONEN_PRGN0RA_Pos (25UL) /*!< Position of PRGN0RA field. */ +#define MWU_REGIONEN_PRGN0RA_Msk (0x1UL << MWU_REGIONEN_PRGN0RA_Pos) /*!< Bit mask of PRGN0RA field. */ +#define MWU_REGIONEN_PRGN0RA_Disable (0UL) /*!< Disable read access watch in this PREGION */ +#define MWU_REGIONEN_PRGN0RA_Enable (1UL) /*!< Enable read access watch in this PREGION */ + +/* Bit 24 : Enable/disable write access watch in PREGION[0] */ +#define MWU_REGIONEN_PRGN0WA_Pos (24UL) /*!< Position of PRGN0WA field. */ +#define MWU_REGIONEN_PRGN0WA_Msk (0x1UL << MWU_REGIONEN_PRGN0WA_Pos) /*!< Bit mask of PRGN0WA field. */ +#define MWU_REGIONEN_PRGN0WA_Disable (0UL) /*!< Disable write access watch in this PREGION */ +#define MWU_REGIONEN_PRGN0WA_Enable (1UL) /*!< Enable write access watch in this PREGION */ + +/* Bit 7 : Enable/disable read access watch in region[3] */ +#define MWU_REGIONEN_RGN3RA_Pos (7UL) /*!< Position of RGN3RA field. */ +#define MWU_REGIONEN_RGN3RA_Msk (0x1UL << MWU_REGIONEN_RGN3RA_Pos) /*!< Bit mask of RGN3RA field. */ +#define MWU_REGIONEN_RGN3RA_Disable (0UL) /*!< Disable read access watch in this region */ +#define MWU_REGIONEN_RGN3RA_Enable (1UL) /*!< Enable read access watch in this region */ + +/* Bit 6 : Enable/disable write access watch in region[3] */ +#define MWU_REGIONEN_RGN3WA_Pos (6UL) /*!< Position of RGN3WA field. */ +#define MWU_REGIONEN_RGN3WA_Msk (0x1UL << MWU_REGIONEN_RGN3WA_Pos) /*!< Bit mask of RGN3WA field. */ +#define MWU_REGIONEN_RGN3WA_Disable (0UL) /*!< Disable write access watch in this region */ +#define MWU_REGIONEN_RGN3WA_Enable (1UL) /*!< Enable write access watch in this region */ + +/* Bit 5 : Enable/disable read access watch in region[2] */ +#define MWU_REGIONEN_RGN2RA_Pos (5UL) /*!< Position of RGN2RA field. */ +#define MWU_REGIONEN_RGN2RA_Msk (0x1UL << MWU_REGIONEN_RGN2RA_Pos) /*!< Bit mask of RGN2RA field. */ +#define MWU_REGIONEN_RGN2RA_Disable (0UL) /*!< Disable read access watch in this region */ +#define MWU_REGIONEN_RGN2RA_Enable (1UL) /*!< Enable read access watch in this region */ + +/* Bit 4 : Enable/disable write access watch in region[2] */ +#define MWU_REGIONEN_RGN2WA_Pos (4UL) /*!< Position of RGN2WA field. */ +#define MWU_REGIONEN_RGN2WA_Msk (0x1UL << MWU_REGIONEN_RGN2WA_Pos) /*!< Bit mask of RGN2WA field. */ +#define MWU_REGIONEN_RGN2WA_Disable (0UL) /*!< Disable write access watch in this region */ +#define MWU_REGIONEN_RGN2WA_Enable (1UL) /*!< Enable write access watch in this region */ + +/* Bit 3 : Enable/disable read access watch in region[1] */ +#define MWU_REGIONEN_RGN1RA_Pos (3UL) /*!< Position of RGN1RA field. */ +#define MWU_REGIONEN_RGN1RA_Msk (0x1UL << MWU_REGIONEN_RGN1RA_Pos) /*!< Bit mask of RGN1RA field. */ +#define MWU_REGIONEN_RGN1RA_Disable (0UL) /*!< Disable read access watch in this region */ +#define MWU_REGIONEN_RGN1RA_Enable (1UL) /*!< Enable read access watch in this region */ + +/* Bit 2 : Enable/disable write access watch in region[1] */ +#define MWU_REGIONEN_RGN1WA_Pos (2UL) /*!< Position of RGN1WA field. */ +#define MWU_REGIONEN_RGN1WA_Msk (0x1UL << MWU_REGIONEN_RGN1WA_Pos) /*!< Bit mask of RGN1WA field. */ +#define MWU_REGIONEN_RGN1WA_Disable (0UL) /*!< Disable write access watch in this region */ +#define MWU_REGIONEN_RGN1WA_Enable (1UL) /*!< Enable write access watch in this region */ + +/* Bit 1 : Enable/disable read access watch in region[0] */ +#define MWU_REGIONEN_RGN0RA_Pos (1UL) /*!< Position of RGN0RA field. */ +#define MWU_REGIONEN_RGN0RA_Msk (0x1UL << MWU_REGIONEN_RGN0RA_Pos) /*!< Bit mask of RGN0RA field. */ +#define MWU_REGIONEN_RGN0RA_Disable (0UL) /*!< Disable read access watch in this region */ +#define MWU_REGIONEN_RGN0RA_Enable (1UL) /*!< Enable read access watch in this region */ + +/* Bit 0 : Enable/disable write access watch in region[0] */ +#define MWU_REGIONEN_RGN0WA_Pos (0UL) /*!< Position of RGN0WA field. */ +#define MWU_REGIONEN_RGN0WA_Msk (0x1UL << MWU_REGIONEN_RGN0WA_Pos) /*!< Bit mask of RGN0WA field. */ +#define MWU_REGIONEN_RGN0WA_Disable (0UL) /*!< Disable write access watch in this region */ +#define MWU_REGIONEN_RGN0WA_Enable (1UL) /*!< Enable write access watch in this region */ + +/* Register: MWU_REGIONENSET */ +/* Description: Enable regions watch */ + +/* Bit 27 : Enable read access watch in PREGION[1] */ +#define MWU_REGIONENSET_PRGN1RA_Pos (27UL) /*!< Position of PRGN1RA field. */ +#define MWU_REGIONENSET_PRGN1RA_Msk (0x1UL << MWU_REGIONENSET_PRGN1RA_Pos) /*!< Bit mask of PRGN1RA field. */ +#define MWU_REGIONENSET_PRGN1RA_Disabled (0UL) /*!< Read access watch in this PREGION is disabled */ +#define MWU_REGIONENSET_PRGN1RA_Enabled (1UL) /*!< Read access watch in this PREGION is enabled */ +#define MWU_REGIONENSET_PRGN1RA_Set (1UL) /*!< Enable read access watch in this PREGION */ + +/* Bit 26 : Enable write access watch in PREGION[1] */ +#define MWU_REGIONENSET_PRGN1WA_Pos (26UL) /*!< Position of PRGN1WA field. */ +#define MWU_REGIONENSET_PRGN1WA_Msk (0x1UL << MWU_REGIONENSET_PRGN1WA_Pos) /*!< Bit mask of PRGN1WA field. */ +#define MWU_REGIONENSET_PRGN1WA_Disabled (0UL) /*!< Write access watch in this PREGION is disabled */ +#define MWU_REGIONENSET_PRGN1WA_Enabled (1UL) /*!< Write access watch in this PREGION is enabled */ +#define MWU_REGIONENSET_PRGN1WA_Set (1UL) /*!< Enable write access watch in this PREGION */ + +/* Bit 25 : Enable read access watch in PREGION[0] */ +#define MWU_REGIONENSET_PRGN0RA_Pos (25UL) /*!< Position of PRGN0RA field. */ +#define MWU_REGIONENSET_PRGN0RA_Msk (0x1UL << MWU_REGIONENSET_PRGN0RA_Pos) /*!< Bit mask of PRGN0RA field. */ +#define MWU_REGIONENSET_PRGN0RA_Disabled (0UL) /*!< Read access watch in this PREGION is disabled */ +#define MWU_REGIONENSET_PRGN0RA_Enabled (1UL) /*!< Read access watch in this PREGION is enabled */ +#define MWU_REGIONENSET_PRGN0RA_Set (1UL) /*!< Enable read access watch in this PREGION */ + +/* Bit 24 : Enable write access watch in PREGION[0] */ +#define MWU_REGIONENSET_PRGN0WA_Pos (24UL) /*!< Position of PRGN0WA field. */ +#define MWU_REGIONENSET_PRGN0WA_Msk (0x1UL << MWU_REGIONENSET_PRGN0WA_Pos) /*!< Bit mask of PRGN0WA field. */ +#define MWU_REGIONENSET_PRGN0WA_Disabled (0UL) /*!< Write access watch in this PREGION is disabled */ +#define MWU_REGIONENSET_PRGN0WA_Enabled (1UL) /*!< Write access watch in this PREGION is enabled */ +#define MWU_REGIONENSET_PRGN0WA_Set (1UL) /*!< Enable write access watch in this PREGION */ + +/* Bit 7 : Enable read access watch in region[3] */ +#define MWU_REGIONENSET_RGN3RA_Pos (7UL) /*!< Position of RGN3RA field. */ +#define MWU_REGIONENSET_RGN3RA_Msk (0x1UL << MWU_REGIONENSET_RGN3RA_Pos) /*!< Bit mask of RGN3RA field. */ +#define MWU_REGIONENSET_RGN3RA_Disabled (0UL) /*!< Read access watch in this region is disabled */ +#define MWU_REGIONENSET_RGN3RA_Enabled (1UL) /*!< Read access watch in this region is enabled */ +#define MWU_REGIONENSET_RGN3RA_Set (1UL) /*!< Enable read access watch in this region */ + +/* Bit 6 : Enable write access watch in region[3] */ +#define MWU_REGIONENSET_RGN3WA_Pos (6UL) /*!< Position of RGN3WA field. */ +#define MWU_REGIONENSET_RGN3WA_Msk (0x1UL << MWU_REGIONENSET_RGN3WA_Pos) /*!< Bit mask of RGN3WA field. */ +#define MWU_REGIONENSET_RGN3WA_Disabled (0UL) /*!< Write access watch in this region is disabled */ +#define MWU_REGIONENSET_RGN3WA_Enabled (1UL) /*!< Write access watch in this region is enabled */ +#define MWU_REGIONENSET_RGN3WA_Set (1UL) /*!< Enable write access watch in this region */ + +/* Bit 5 : Enable read access watch in region[2] */ +#define MWU_REGIONENSET_RGN2RA_Pos (5UL) /*!< Position of RGN2RA field. */ +#define MWU_REGIONENSET_RGN2RA_Msk (0x1UL << MWU_REGIONENSET_RGN2RA_Pos) /*!< Bit mask of RGN2RA field. */ +#define MWU_REGIONENSET_RGN2RA_Disabled (0UL) /*!< Read access watch in this region is disabled */ +#define MWU_REGIONENSET_RGN2RA_Enabled (1UL) /*!< Read access watch in this region is enabled */ +#define MWU_REGIONENSET_RGN2RA_Set (1UL) /*!< Enable read access watch in this region */ + +/* Bit 4 : Enable write access watch in region[2] */ +#define MWU_REGIONENSET_RGN2WA_Pos (4UL) /*!< Position of RGN2WA field. */ +#define MWU_REGIONENSET_RGN2WA_Msk (0x1UL << MWU_REGIONENSET_RGN2WA_Pos) /*!< Bit mask of RGN2WA field. */ +#define MWU_REGIONENSET_RGN2WA_Disabled (0UL) /*!< Write access watch in this region is disabled */ +#define MWU_REGIONENSET_RGN2WA_Enabled (1UL) /*!< Write access watch in this region is enabled */ +#define MWU_REGIONENSET_RGN2WA_Set (1UL) /*!< Enable write access watch in this region */ + +/* Bit 3 : Enable read access watch in region[1] */ +#define MWU_REGIONENSET_RGN1RA_Pos (3UL) /*!< Position of RGN1RA field. */ +#define MWU_REGIONENSET_RGN1RA_Msk (0x1UL << MWU_REGIONENSET_RGN1RA_Pos) /*!< Bit mask of RGN1RA field. */ +#define MWU_REGIONENSET_RGN1RA_Disabled (0UL) /*!< Read access watch in this region is disabled */ +#define MWU_REGIONENSET_RGN1RA_Enabled (1UL) /*!< Read access watch in this region is enabled */ +#define MWU_REGIONENSET_RGN1RA_Set (1UL) /*!< Enable read access watch in this region */ + +/* Bit 2 : Enable write access watch in region[1] */ +#define MWU_REGIONENSET_RGN1WA_Pos (2UL) /*!< Position of RGN1WA field. */ +#define MWU_REGIONENSET_RGN1WA_Msk (0x1UL << MWU_REGIONENSET_RGN1WA_Pos) /*!< Bit mask of RGN1WA field. */ +#define MWU_REGIONENSET_RGN1WA_Disabled (0UL) /*!< Write access watch in this region is disabled */ +#define MWU_REGIONENSET_RGN1WA_Enabled (1UL) /*!< Write access watch in this region is enabled */ +#define MWU_REGIONENSET_RGN1WA_Set (1UL) /*!< Enable write access watch in this region */ + +/* Bit 1 : Enable read access watch in region[0] */ +#define MWU_REGIONENSET_RGN0RA_Pos (1UL) /*!< Position of RGN0RA field. */ +#define MWU_REGIONENSET_RGN0RA_Msk (0x1UL << MWU_REGIONENSET_RGN0RA_Pos) /*!< Bit mask of RGN0RA field. */ +#define MWU_REGIONENSET_RGN0RA_Disabled (0UL) /*!< Read access watch in this region is disabled */ +#define MWU_REGIONENSET_RGN0RA_Enabled (1UL) /*!< Read access watch in this region is enabled */ +#define MWU_REGIONENSET_RGN0RA_Set (1UL) /*!< Enable read access watch in this region */ + +/* Bit 0 : Enable write access watch in region[0] */ +#define MWU_REGIONENSET_RGN0WA_Pos (0UL) /*!< Position of RGN0WA field. */ +#define MWU_REGIONENSET_RGN0WA_Msk (0x1UL << MWU_REGIONENSET_RGN0WA_Pos) /*!< Bit mask of RGN0WA field. */ +#define MWU_REGIONENSET_RGN0WA_Disabled (0UL) /*!< Write access watch in this region is disabled */ +#define MWU_REGIONENSET_RGN0WA_Enabled (1UL) /*!< Write access watch in this region is enabled */ +#define MWU_REGIONENSET_RGN0WA_Set (1UL) /*!< Enable write access watch in this region */ + +/* Register: MWU_REGIONENCLR */ +/* Description: Disable regions watch */ + +/* Bit 27 : Disable read access watch in PREGION[1] */ +#define MWU_REGIONENCLR_PRGN1RA_Pos (27UL) /*!< Position of PRGN1RA field. */ +#define MWU_REGIONENCLR_PRGN1RA_Msk (0x1UL << MWU_REGIONENCLR_PRGN1RA_Pos) /*!< Bit mask of PRGN1RA field. */ +#define MWU_REGIONENCLR_PRGN1RA_Disabled (0UL) /*!< Read access watch in this PREGION is disabled */ +#define MWU_REGIONENCLR_PRGN1RA_Enabled (1UL) /*!< Read access watch in this PREGION is enabled */ +#define MWU_REGIONENCLR_PRGN1RA_Clear (1UL) /*!< Disable read access watch in this PREGION */ + +/* Bit 26 : Disable write access watch in PREGION[1] */ +#define MWU_REGIONENCLR_PRGN1WA_Pos (26UL) /*!< Position of PRGN1WA field. */ +#define MWU_REGIONENCLR_PRGN1WA_Msk (0x1UL << MWU_REGIONENCLR_PRGN1WA_Pos) /*!< Bit mask of PRGN1WA field. */ +#define MWU_REGIONENCLR_PRGN1WA_Disabled (0UL) /*!< Write access watch in this PREGION is disabled */ +#define MWU_REGIONENCLR_PRGN1WA_Enabled (1UL) /*!< Write access watch in this PREGION is enabled */ +#define MWU_REGIONENCLR_PRGN1WA_Clear (1UL) /*!< Disable write access watch in this PREGION */ + +/* Bit 25 : Disable read access watch in PREGION[0] */ +#define MWU_REGIONENCLR_PRGN0RA_Pos (25UL) /*!< Position of PRGN0RA field. */ +#define MWU_REGIONENCLR_PRGN0RA_Msk (0x1UL << MWU_REGIONENCLR_PRGN0RA_Pos) /*!< Bit mask of PRGN0RA field. */ +#define MWU_REGIONENCLR_PRGN0RA_Disabled (0UL) /*!< Read access watch in this PREGION is disabled */ +#define MWU_REGIONENCLR_PRGN0RA_Enabled (1UL) /*!< Read access watch in this PREGION is enabled */ +#define MWU_REGIONENCLR_PRGN0RA_Clear (1UL) /*!< Disable read access watch in this PREGION */ + +/* Bit 24 : Disable write access watch in PREGION[0] */ +#define MWU_REGIONENCLR_PRGN0WA_Pos (24UL) /*!< Position of PRGN0WA field. */ +#define MWU_REGIONENCLR_PRGN0WA_Msk (0x1UL << MWU_REGIONENCLR_PRGN0WA_Pos) /*!< Bit mask of PRGN0WA field. */ +#define MWU_REGIONENCLR_PRGN0WA_Disabled (0UL) /*!< Write access watch in this PREGION is disabled */ +#define MWU_REGIONENCLR_PRGN0WA_Enabled (1UL) /*!< Write access watch in this PREGION is enabled */ +#define MWU_REGIONENCLR_PRGN0WA_Clear (1UL) /*!< Disable write access watch in this PREGION */ + +/* Bit 7 : Disable read access watch in region[3] */ +#define MWU_REGIONENCLR_RGN3RA_Pos (7UL) /*!< Position of RGN3RA field. */ +#define MWU_REGIONENCLR_RGN3RA_Msk (0x1UL << MWU_REGIONENCLR_RGN3RA_Pos) /*!< Bit mask of RGN3RA field. */ +#define MWU_REGIONENCLR_RGN3RA_Disabled (0UL) /*!< Read access watch in this region is disabled */ +#define MWU_REGIONENCLR_RGN3RA_Enabled (1UL) /*!< Read access watch in this region is enabled */ +#define MWU_REGIONENCLR_RGN3RA_Clear (1UL) /*!< Disable read access watch in this region */ + +/* Bit 6 : Disable write access watch in region[3] */ +#define MWU_REGIONENCLR_RGN3WA_Pos (6UL) /*!< Position of RGN3WA field. */ +#define MWU_REGIONENCLR_RGN3WA_Msk (0x1UL << MWU_REGIONENCLR_RGN3WA_Pos) /*!< Bit mask of RGN3WA field. */ +#define MWU_REGIONENCLR_RGN3WA_Disabled (0UL) /*!< Write access watch in this region is disabled */ +#define MWU_REGIONENCLR_RGN3WA_Enabled (1UL) /*!< Write access watch in this region is enabled */ +#define MWU_REGIONENCLR_RGN3WA_Clear (1UL) /*!< Disable write access watch in this region */ + +/* Bit 5 : Disable read access watch in region[2] */ +#define MWU_REGIONENCLR_RGN2RA_Pos (5UL) /*!< Position of RGN2RA field. */ +#define MWU_REGIONENCLR_RGN2RA_Msk (0x1UL << MWU_REGIONENCLR_RGN2RA_Pos) /*!< Bit mask of RGN2RA field. */ +#define MWU_REGIONENCLR_RGN2RA_Disabled (0UL) /*!< Read access watch in this region is disabled */ +#define MWU_REGIONENCLR_RGN2RA_Enabled (1UL) /*!< Read access watch in this region is enabled */ +#define MWU_REGIONENCLR_RGN2RA_Clear (1UL) /*!< Disable read access watch in this region */ + +/* Bit 4 : Disable write access watch in region[2] */ +#define MWU_REGIONENCLR_RGN2WA_Pos (4UL) /*!< Position of RGN2WA field. */ +#define MWU_REGIONENCLR_RGN2WA_Msk (0x1UL << MWU_REGIONENCLR_RGN2WA_Pos) /*!< Bit mask of RGN2WA field. */ +#define MWU_REGIONENCLR_RGN2WA_Disabled (0UL) /*!< Write access watch in this region is disabled */ +#define MWU_REGIONENCLR_RGN2WA_Enabled (1UL) /*!< Write access watch in this region is enabled */ +#define MWU_REGIONENCLR_RGN2WA_Clear (1UL) /*!< Disable write access watch in this region */ + +/* Bit 3 : Disable read access watch in region[1] */ +#define MWU_REGIONENCLR_RGN1RA_Pos (3UL) /*!< Position of RGN1RA field. */ +#define MWU_REGIONENCLR_RGN1RA_Msk (0x1UL << MWU_REGIONENCLR_RGN1RA_Pos) /*!< Bit mask of RGN1RA field. */ +#define MWU_REGIONENCLR_RGN1RA_Disabled (0UL) /*!< Read access watch in this region is disabled */ +#define MWU_REGIONENCLR_RGN1RA_Enabled (1UL) /*!< Read access watch in this region is enabled */ +#define MWU_REGIONENCLR_RGN1RA_Clear (1UL) /*!< Disable read access watch in this region */ + +/* Bit 2 : Disable write access watch in region[1] */ +#define MWU_REGIONENCLR_RGN1WA_Pos (2UL) /*!< Position of RGN1WA field. */ +#define MWU_REGIONENCLR_RGN1WA_Msk (0x1UL << MWU_REGIONENCLR_RGN1WA_Pos) /*!< Bit mask of RGN1WA field. */ +#define MWU_REGIONENCLR_RGN1WA_Disabled (0UL) /*!< Write access watch in this region is disabled */ +#define MWU_REGIONENCLR_RGN1WA_Enabled (1UL) /*!< Write access watch in this region is enabled */ +#define MWU_REGIONENCLR_RGN1WA_Clear (1UL) /*!< Disable write access watch in this region */ + +/* Bit 1 : Disable read access watch in region[0] */ +#define MWU_REGIONENCLR_RGN0RA_Pos (1UL) /*!< Position of RGN0RA field. */ +#define MWU_REGIONENCLR_RGN0RA_Msk (0x1UL << MWU_REGIONENCLR_RGN0RA_Pos) /*!< Bit mask of RGN0RA field. */ +#define MWU_REGIONENCLR_RGN0RA_Disabled (0UL) /*!< Read access watch in this region is disabled */ +#define MWU_REGIONENCLR_RGN0RA_Enabled (1UL) /*!< Read access watch in this region is enabled */ +#define MWU_REGIONENCLR_RGN0RA_Clear (1UL) /*!< Disable read access watch in this region */ + +/* Bit 0 : Disable write access watch in region[0] */ +#define MWU_REGIONENCLR_RGN0WA_Pos (0UL) /*!< Position of RGN0WA field. */ +#define MWU_REGIONENCLR_RGN0WA_Msk (0x1UL << MWU_REGIONENCLR_RGN0WA_Pos) /*!< Bit mask of RGN0WA field. */ +#define MWU_REGIONENCLR_RGN0WA_Disabled (0UL) /*!< Write access watch in this region is disabled */ +#define MWU_REGIONENCLR_RGN0WA_Enabled (1UL) /*!< Write access watch in this region is enabled */ +#define MWU_REGIONENCLR_RGN0WA_Clear (1UL) /*!< Disable write access watch in this region */ + +/* Register: MWU_REGION_START */ +/* Description: Description cluster[0]: Start address for region 0 */ + +/* Bits 31..0 : Start address for region */ +#define MWU_REGION_START_START_Pos (0UL) /*!< Position of START field. */ +#define MWU_REGION_START_START_Msk (0xFFFFFFFFUL << MWU_REGION_START_START_Pos) /*!< Bit mask of START field. */ + +/* Register: MWU_REGION_END */ +/* Description: Description cluster[0]: End address of region 0 */ + +/* Bits 31..0 : End address of region. */ +#define MWU_REGION_END_END_Pos (0UL) /*!< Position of END field. */ +#define MWU_REGION_END_END_Msk (0xFFFFFFFFUL << MWU_REGION_END_END_Pos) /*!< Bit mask of END field. */ + +/* Register: MWU_PREGION_START */ +/* Description: Description cluster[0]: Reserved for future use */ + +/* Bits 31..0 : Reserved for future use */ +#define MWU_PREGION_START_START_Pos (0UL) /*!< Position of START field. */ +#define MWU_PREGION_START_START_Msk (0xFFFFFFFFUL << MWU_PREGION_START_START_Pos) /*!< Bit mask of START field. */ + +/* Register: MWU_PREGION_END */ +/* Description: Description cluster[0]: Reserved for future use */ + +/* Bits 31..0 : Reserved for future use */ +#define MWU_PREGION_END_END_Pos (0UL) /*!< Position of END field. */ +#define MWU_PREGION_END_END_Msk (0xFFFFFFFFUL << MWU_PREGION_END_END_Pos) /*!< Bit mask of END field. */ + +/* Register: MWU_PREGION_SUBS */ +/* Description: Description cluster[0]: Subregions of region 0 */ + +/* Bit 31 : Include or exclude subregion 31 in region */ +#define MWU_PREGION_SUBS_SR31_Pos (31UL) /*!< Position of SR31 field. */ +#define MWU_PREGION_SUBS_SR31_Msk (0x1UL << MWU_PREGION_SUBS_SR31_Pos) /*!< Bit mask of SR31 field. */ +#define MWU_PREGION_SUBS_SR31_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR31_Include (1UL) /*!< Include */ + +/* Bit 30 : Include or exclude subregion 30 in region */ +#define MWU_PREGION_SUBS_SR30_Pos (30UL) /*!< Position of SR30 field. */ +#define MWU_PREGION_SUBS_SR30_Msk (0x1UL << MWU_PREGION_SUBS_SR30_Pos) /*!< Bit mask of SR30 field. */ +#define MWU_PREGION_SUBS_SR30_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR30_Include (1UL) /*!< Include */ + +/* Bit 29 : Include or exclude subregion 29 in region */ +#define MWU_PREGION_SUBS_SR29_Pos (29UL) /*!< Position of SR29 field. */ +#define MWU_PREGION_SUBS_SR29_Msk (0x1UL << MWU_PREGION_SUBS_SR29_Pos) /*!< Bit mask of SR29 field. */ +#define MWU_PREGION_SUBS_SR29_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR29_Include (1UL) /*!< Include */ + +/* Bit 28 : Include or exclude subregion 28 in region */ +#define MWU_PREGION_SUBS_SR28_Pos (28UL) /*!< Position of SR28 field. */ +#define MWU_PREGION_SUBS_SR28_Msk (0x1UL << MWU_PREGION_SUBS_SR28_Pos) /*!< Bit mask of SR28 field. */ +#define MWU_PREGION_SUBS_SR28_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR28_Include (1UL) /*!< Include */ + +/* Bit 27 : Include or exclude subregion 27 in region */ +#define MWU_PREGION_SUBS_SR27_Pos (27UL) /*!< Position of SR27 field. */ +#define MWU_PREGION_SUBS_SR27_Msk (0x1UL << MWU_PREGION_SUBS_SR27_Pos) /*!< Bit mask of SR27 field. */ +#define MWU_PREGION_SUBS_SR27_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR27_Include (1UL) /*!< Include */ + +/* Bit 26 : Include or exclude subregion 26 in region */ +#define MWU_PREGION_SUBS_SR26_Pos (26UL) /*!< Position of SR26 field. */ +#define MWU_PREGION_SUBS_SR26_Msk (0x1UL << MWU_PREGION_SUBS_SR26_Pos) /*!< Bit mask of SR26 field. */ +#define MWU_PREGION_SUBS_SR26_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR26_Include (1UL) /*!< Include */ + +/* Bit 25 : Include or exclude subregion 25 in region */ +#define MWU_PREGION_SUBS_SR25_Pos (25UL) /*!< Position of SR25 field. */ +#define MWU_PREGION_SUBS_SR25_Msk (0x1UL << MWU_PREGION_SUBS_SR25_Pos) /*!< Bit mask of SR25 field. */ +#define MWU_PREGION_SUBS_SR25_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR25_Include (1UL) /*!< Include */ + +/* Bit 24 : Include or exclude subregion 24 in region */ +#define MWU_PREGION_SUBS_SR24_Pos (24UL) /*!< Position of SR24 field. */ +#define MWU_PREGION_SUBS_SR24_Msk (0x1UL << MWU_PREGION_SUBS_SR24_Pos) /*!< Bit mask of SR24 field. */ +#define MWU_PREGION_SUBS_SR24_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR24_Include (1UL) /*!< Include */ + +/* Bit 23 : Include or exclude subregion 23 in region */ +#define MWU_PREGION_SUBS_SR23_Pos (23UL) /*!< Position of SR23 field. */ +#define MWU_PREGION_SUBS_SR23_Msk (0x1UL << MWU_PREGION_SUBS_SR23_Pos) /*!< Bit mask of SR23 field. */ +#define MWU_PREGION_SUBS_SR23_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR23_Include (1UL) /*!< Include */ + +/* Bit 22 : Include or exclude subregion 22 in region */ +#define MWU_PREGION_SUBS_SR22_Pos (22UL) /*!< Position of SR22 field. */ +#define MWU_PREGION_SUBS_SR22_Msk (0x1UL << MWU_PREGION_SUBS_SR22_Pos) /*!< Bit mask of SR22 field. */ +#define MWU_PREGION_SUBS_SR22_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR22_Include (1UL) /*!< Include */ + +/* Bit 21 : Include or exclude subregion 21 in region */ +#define MWU_PREGION_SUBS_SR21_Pos (21UL) /*!< Position of SR21 field. */ +#define MWU_PREGION_SUBS_SR21_Msk (0x1UL << MWU_PREGION_SUBS_SR21_Pos) /*!< Bit mask of SR21 field. */ +#define MWU_PREGION_SUBS_SR21_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR21_Include (1UL) /*!< Include */ + +/* Bit 20 : Include or exclude subregion 20 in region */ +#define MWU_PREGION_SUBS_SR20_Pos (20UL) /*!< Position of SR20 field. */ +#define MWU_PREGION_SUBS_SR20_Msk (0x1UL << MWU_PREGION_SUBS_SR20_Pos) /*!< Bit mask of SR20 field. */ +#define MWU_PREGION_SUBS_SR20_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR20_Include (1UL) /*!< Include */ + +/* Bit 19 : Include or exclude subregion 19 in region */ +#define MWU_PREGION_SUBS_SR19_Pos (19UL) /*!< Position of SR19 field. */ +#define MWU_PREGION_SUBS_SR19_Msk (0x1UL << MWU_PREGION_SUBS_SR19_Pos) /*!< Bit mask of SR19 field. */ +#define MWU_PREGION_SUBS_SR19_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR19_Include (1UL) /*!< Include */ + +/* Bit 18 : Include or exclude subregion 18 in region */ +#define MWU_PREGION_SUBS_SR18_Pos (18UL) /*!< Position of SR18 field. */ +#define MWU_PREGION_SUBS_SR18_Msk (0x1UL << MWU_PREGION_SUBS_SR18_Pos) /*!< Bit mask of SR18 field. */ +#define MWU_PREGION_SUBS_SR18_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR18_Include (1UL) /*!< Include */ + +/* Bit 17 : Include or exclude subregion 17 in region */ +#define MWU_PREGION_SUBS_SR17_Pos (17UL) /*!< Position of SR17 field. */ +#define MWU_PREGION_SUBS_SR17_Msk (0x1UL << MWU_PREGION_SUBS_SR17_Pos) /*!< Bit mask of SR17 field. */ +#define MWU_PREGION_SUBS_SR17_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR17_Include (1UL) /*!< Include */ + +/* Bit 16 : Include or exclude subregion 16 in region */ +#define MWU_PREGION_SUBS_SR16_Pos (16UL) /*!< Position of SR16 field. */ +#define MWU_PREGION_SUBS_SR16_Msk (0x1UL << MWU_PREGION_SUBS_SR16_Pos) /*!< Bit mask of SR16 field. */ +#define MWU_PREGION_SUBS_SR16_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR16_Include (1UL) /*!< Include */ + +/* Bit 15 : Include or exclude subregion 15 in region */ +#define MWU_PREGION_SUBS_SR15_Pos (15UL) /*!< Position of SR15 field. */ +#define MWU_PREGION_SUBS_SR15_Msk (0x1UL << MWU_PREGION_SUBS_SR15_Pos) /*!< Bit mask of SR15 field. */ +#define MWU_PREGION_SUBS_SR15_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR15_Include (1UL) /*!< Include */ + +/* Bit 14 : Include or exclude subregion 14 in region */ +#define MWU_PREGION_SUBS_SR14_Pos (14UL) /*!< Position of SR14 field. */ +#define MWU_PREGION_SUBS_SR14_Msk (0x1UL << MWU_PREGION_SUBS_SR14_Pos) /*!< Bit mask of SR14 field. */ +#define MWU_PREGION_SUBS_SR14_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR14_Include (1UL) /*!< Include */ + +/* Bit 13 : Include or exclude subregion 13 in region */ +#define MWU_PREGION_SUBS_SR13_Pos (13UL) /*!< Position of SR13 field. */ +#define MWU_PREGION_SUBS_SR13_Msk (0x1UL << MWU_PREGION_SUBS_SR13_Pos) /*!< Bit mask of SR13 field. */ +#define MWU_PREGION_SUBS_SR13_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR13_Include (1UL) /*!< Include */ + +/* Bit 12 : Include or exclude subregion 12 in region */ +#define MWU_PREGION_SUBS_SR12_Pos (12UL) /*!< Position of SR12 field. */ +#define MWU_PREGION_SUBS_SR12_Msk (0x1UL << MWU_PREGION_SUBS_SR12_Pos) /*!< Bit mask of SR12 field. */ +#define MWU_PREGION_SUBS_SR12_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR12_Include (1UL) /*!< Include */ + +/* Bit 11 : Include or exclude subregion 11 in region */ +#define MWU_PREGION_SUBS_SR11_Pos (11UL) /*!< Position of SR11 field. */ +#define MWU_PREGION_SUBS_SR11_Msk (0x1UL << MWU_PREGION_SUBS_SR11_Pos) /*!< Bit mask of SR11 field. */ +#define MWU_PREGION_SUBS_SR11_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR11_Include (1UL) /*!< Include */ + +/* Bit 10 : Include or exclude subregion 10 in region */ +#define MWU_PREGION_SUBS_SR10_Pos (10UL) /*!< Position of SR10 field. */ +#define MWU_PREGION_SUBS_SR10_Msk (0x1UL << MWU_PREGION_SUBS_SR10_Pos) /*!< Bit mask of SR10 field. */ +#define MWU_PREGION_SUBS_SR10_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR10_Include (1UL) /*!< Include */ + +/* Bit 9 : Include or exclude subregion 9 in region */ +#define MWU_PREGION_SUBS_SR9_Pos (9UL) /*!< Position of SR9 field. */ +#define MWU_PREGION_SUBS_SR9_Msk (0x1UL << MWU_PREGION_SUBS_SR9_Pos) /*!< Bit mask of SR9 field. */ +#define MWU_PREGION_SUBS_SR9_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR9_Include (1UL) /*!< Include */ + +/* Bit 8 : Include or exclude subregion 8 in region */ +#define MWU_PREGION_SUBS_SR8_Pos (8UL) /*!< Position of SR8 field. */ +#define MWU_PREGION_SUBS_SR8_Msk (0x1UL << MWU_PREGION_SUBS_SR8_Pos) /*!< Bit mask of SR8 field. */ +#define MWU_PREGION_SUBS_SR8_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR8_Include (1UL) /*!< Include */ + +/* Bit 7 : Include or exclude subregion 7 in region */ +#define MWU_PREGION_SUBS_SR7_Pos (7UL) /*!< Position of SR7 field. */ +#define MWU_PREGION_SUBS_SR7_Msk (0x1UL << MWU_PREGION_SUBS_SR7_Pos) /*!< Bit mask of SR7 field. */ +#define MWU_PREGION_SUBS_SR7_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR7_Include (1UL) /*!< Include */ + +/* Bit 6 : Include or exclude subregion 6 in region */ +#define MWU_PREGION_SUBS_SR6_Pos (6UL) /*!< Position of SR6 field. */ +#define MWU_PREGION_SUBS_SR6_Msk (0x1UL << MWU_PREGION_SUBS_SR6_Pos) /*!< Bit mask of SR6 field. */ +#define MWU_PREGION_SUBS_SR6_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR6_Include (1UL) /*!< Include */ + +/* Bit 5 : Include or exclude subregion 5 in region */ +#define MWU_PREGION_SUBS_SR5_Pos (5UL) /*!< Position of SR5 field. */ +#define MWU_PREGION_SUBS_SR5_Msk (0x1UL << MWU_PREGION_SUBS_SR5_Pos) /*!< Bit mask of SR5 field. */ +#define MWU_PREGION_SUBS_SR5_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR5_Include (1UL) /*!< Include */ + +/* Bit 4 : Include or exclude subregion 4 in region */ +#define MWU_PREGION_SUBS_SR4_Pos (4UL) /*!< Position of SR4 field. */ +#define MWU_PREGION_SUBS_SR4_Msk (0x1UL << MWU_PREGION_SUBS_SR4_Pos) /*!< Bit mask of SR4 field. */ +#define MWU_PREGION_SUBS_SR4_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR4_Include (1UL) /*!< Include */ + +/* Bit 3 : Include or exclude subregion 3 in region */ +#define MWU_PREGION_SUBS_SR3_Pos (3UL) /*!< Position of SR3 field. */ +#define MWU_PREGION_SUBS_SR3_Msk (0x1UL << MWU_PREGION_SUBS_SR3_Pos) /*!< Bit mask of SR3 field. */ +#define MWU_PREGION_SUBS_SR3_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR3_Include (1UL) /*!< Include */ + +/* Bit 2 : Include or exclude subregion 2 in region */ +#define MWU_PREGION_SUBS_SR2_Pos (2UL) /*!< Position of SR2 field. */ +#define MWU_PREGION_SUBS_SR2_Msk (0x1UL << MWU_PREGION_SUBS_SR2_Pos) /*!< Bit mask of SR2 field. */ +#define MWU_PREGION_SUBS_SR2_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR2_Include (1UL) /*!< Include */ + +/* Bit 1 : Include or exclude subregion 1 in region */ +#define MWU_PREGION_SUBS_SR1_Pos (1UL) /*!< Position of SR1 field. */ +#define MWU_PREGION_SUBS_SR1_Msk (0x1UL << MWU_PREGION_SUBS_SR1_Pos) /*!< Bit mask of SR1 field. */ +#define MWU_PREGION_SUBS_SR1_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR1_Include (1UL) /*!< Include */ + +/* Bit 0 : Include or exclude subregion 0 in region */ +#define MWU_PREGION_SUBS_SR0_Pos (0UL) /*!< Position of SR0 field. */ +#define MWU_PREGION_SUBS_SR0_Msk (0x1UL << MWU_PREGION_SUBS_SR0_Pos) /*!< Bit mask of SR0 field. */ +#define MWU_PREGION_SUBS_SR0_Exclude (0UL) /*!< Exclude */ +#define MWU_PREGION_SUBS_SR0_Include (1UL) /*!< Include */ + + +/* Peripheral: NFCT */ +/* Description: NFC-A compatible radio */ + +/* Register: NFCT_SHORTS */ +/* Description: Shortcut register */ + +/* Bit 1 : Shortcut between FIELDLOST event and SENSE task */ +#define NFCT_SHORTS_FIELDLOST_SENSE_Pos (1UL) /*!< Position of FIELDLOST_SENSE field. */ +#define NFCT_SHORTS_FIELDLOST_SENSE_Msk (0x1UL << NFCT_SHORTS_FIELDLOST_SENSE_Pos) /*!< Bit mask of FIELDLOST_SENSE field. */ +#define NFCT_SHORTS_FIELDLOST_SENSE_Disabled (0UL) /*!< Disable shortcut */ +#define NFCT_SHORTS_FIELDLOST_SENSE_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 0 : Shortcut between FIELDDETECTED event and ACTIVATE task */ +#define NFCT_SHORTS_FIELDDETECTED_ACTIVATE_Pos (0UL) /*!< Position of FIELDDETECTED_ACTIVATE field. */ +#define NFCT_SHORTS_FIELDDETECTED_ACTIVATE_Msk (0x1UL << NFCT_SHORTS_FIELDDETECTED_ACTIVATE_Pos) /*!< Bit mask of FIELDDETECTED_ACTIVATE field. */ +#define NFCT_SHORTS_FIELDDETECTED_ACTIVATE_Disabled (0UL) /*!< Disable shortcut */ +#define NFCT_SHORTS_FIELDDETECTED_ACTIVATE_Enabled (1UL) /*!< Enable shortcut */ + +/* Register: NFCT_INTEN */ +/* Description: Enable or disable interrupt */ + +/* Bit 20 : Enable or disable interrupt for STARTED event */ +#define NFCT_INTEN_STARTED_Pos (20UL) /*!< Position of STARTED field. */ +#define NFCT_INTEN_STARTED_Msk (0x1UL << NFCT_INTEN_STARTED_Pos) /*!< Bit mask of STARTED field. */ +#define NFCT_INTEN_STARTED_Disabled (0UL) /*!< Disable */ +#define NFCT_INTEN_STARTED_Enabled (1UL) /*!< Enable */ + +/* Bit 19 : Enable or disable interrupt for SELECTED event */ +#define NFCT_INTEN_SELECTED_Pos (19UL) /*!< Position of SELECTED field. */ +#define NFCT_INTEN_SELECTED_Msk (0x1UL << NFCT_INTEN_SELECTED_Pos) /*!< Bit mask of SELECTED field. */ +#define NFCT_INTEN_SELECTED_Disabled (0UL) /*!< Disable */ +#define NFCT_INTEN_SELECTED_Enabled (1UL) /*!< Enable */ + +/* Bit 18 : Enable or disable interrupt for COLLISION event */ +#define NFCT_INTEN_COLLISION_Pos (18UL) /*!< Position of COLLISION field. */ +#define NFCT_INTEN_COLLISION_Msk (0x1UL << NFCT_INTEN_COLLISION_Pos) /*!< Bit mask of COLLISION field. */ +#define NFCT_INTEN_COLLISION_Disabled (0UL) /*!< Disable */ +#define NFCT_INTEN_COLLISION_Enabled (1UL) /*!< Enable */ + +/* Bit 14 : Enable or disable interrupt for AUTOCOLRESSTARTED event */ +#define NFCT_INTEN_AUTOCOLRESSTARTED_Pos (14UL) /*!< Position of AUTOCOLRESSTARTED field. */ +#define NFCT_INTEN_AUTOCOLRESSTARTED_Msk (0x1UL << NFCT_INTEN_AUTOCOLRESSTARTED_Pos) /*!< Bit mask of AUTOCOLRESSTARTED field. */ +#define NFCT_INTEN_AUTOCOLRESSTARTED_Disabled (0UL) /*!< Disable */ +#define NFCT_INTEN_AUTOCOLRESSTARTED_Enabled (1UL) /*!< Enable */ + +/* Bit 12 : Enable or disable interrupt for ENDTX event */ +#define NFCT_INTEN_ENDTX_Pos (12UL) /*!< Position of ENDTX field. */ +#define NFCT_INTEN_ENDTX_Msk (0x1UL << NFCT_INTEN_ENDTX_Pos) /*!< Bit mask of ENDTX field. */ +#define NFCT_INTEN_ENDTX_Disabled (0UL) /*!< Disable */ +#define NFCT_INTEN_ENDTX_Enabled (1UL) /*!< Enable */ + +/* Bit 11 : Enable or disable interrupt for ENDRX event */ +#define NFCT_INTEN_ENDRX_Pos (11UL) /*!< Position of ENDRX field. */ +#define NFCT_INTEN_ENDRX_Msk (0x1UL << NFCT_INTEN_ENDRX_Pos) /*!< Bit mask of ENDRX field. */ +#define NFCT_INTEN_ENDRX_Disabled (0UL) /*!< Disable */ +#define NFCT_INTEN_ENDRX_Enabled (1UL) /*!< Enable */ + +/* Bit 10 : Enable or disable interrupt for RXERROR event */ +#define NFCT_INTEN_RXERROR_Pos (10UL) /*!< Position of RXERROR field. */ +#define NFCT_INTEN_RXERROR_Msk (0x1UL << NFCT_INTEN_RXERROR_Pos) /*!< Bit mask of RXERROR field. */ +#define NFCT_INTEN_RXERROR_Disabled (0UL) /*!< Disable */ +#define NFCT_INTEN_RXERROR_Enabled (1UL) /*!< Enable */ + +/* Bit 7 : Enable or disable interrupt for ERROR event */ +#define NFCT_INTEN_ERROR_Pos (7UL) /*!< Position of ERROR field. */ +#define NFCT_INTEN_ERROR_Msk (0x1UL << NFCT_INTEN_ERROR_Pos) /*!< Bit mask of ERROR field. */ +#define NFCT_INTEN_ERROR_Disabled (0UL) /*!< Disable */ +#define NFCT_INTEN_ERROR_Enabled (1UL) /*!< Enable */ + +/* Bit 6 : Enable or disable interrupt for RXFRAMEEND event */ +#define NFCT_INTEN_RXFRAMEEND_Pos (6UL) /*!< Position of RXFRAMEEND field. */ +#define NFCT_INTEN_RXFRAMEEND_Msk (0x1UL << NFCT_INTEN_RXFRAMEEND_Pos) /*!< Bit mask of RXFRAMEEND field. */ +#define NFCT_INTEN_RXFRAMEEND_Disabled (0UL) /*!< Disable */ +#define NFCT_INTEN_RXFRAMEEND_Enabled (1UL) /*!< Enable */ + +/* Bit 5 : Enable or disable interrupt for RXFRAMESTART event */ +#define NFCT_INTEN_RXFRAMESTART_Pos (5UL) /*!< Position of RXFRAMESTART field. */ +#define NFCT_INTEN_RXFRAMESTART_Msk (0x1UL << NFCT_INTEN_RXFRAMESTART_Pos) /*!< Bit mask of RXFRAMESTART field. */ +#define NFCT_INTEN_RXFRAMESTART_Disabled (0UL) /*!< Disable */ +#define NFCT_INTEN_RXFRAMESTART_Enabled (1UL) /*!< Enable */ + +/* Bit 4 : Enable or disable interrupt for TXFRAMEEND event */ +#define NFCT_INTEN_TXFRAMEEND_Pos (4UL) /*!< Position of TXFRAMEEND field. */ +#define NFCT_INTEN_TXFRAMEEND_Msk (0x1UL << NFCT_INTEN_TXFRAMEEND_Pos) /*!< Bit mask of TXFRAMEEND field. */ +#define NFCT_INTEN_TXFRAMEEND_Disabled (0UL) /*!< Disable */ +#define NFCT_INTEN_TXFRAMEEND_Enabled (1UL) /*!< Enable */ + +/* Bit 3 : Enable or disable interrupt for TXFRAMESTART event */ +#define NFCT_INTEN_TXFRAMESTART_Pos (3UL) /*!< Position of TXFRAMESTART field. */ +#define NFCT_INTEN_TXFRAMESTART_Msk (0x1UL << NFCT_INTEN_TXFRAMESTART_Pos) /*!< Bit mask of TXFRAMESTART field. */ +#define NFCT_INTEN_TXFRAMESTART_Disabled (0UL) /*!< Disable */ +#define NFCT_INTEN_TXFRAMESTART_Enabled (1UL) /*!< Enable */ + +/* Bit 2 : Enable or disable interrupt for FIELDLOST event */ +#define NFCT_INTEN_FIELDLOST_Pos (2UL) /*!< Position of FIELDLOST field. */ +#define NFCT_INTEN_FIELDLOST_Msk (0x1UL << NFCT_INTEN_FIELDLOST_Pos) /*!< Bit mask of FIELDLOST field. */ +#define NFCT_INTEN_FIELDLOST_Disabled (0UL) /*!< Disable */ +#define NFCT_INTEN_FIELDLOST_Enabled (1UL) /*!< Enable */ + +/* Bit 1 : Enable or disable interrupt for FIELDDETECTED event */ +#define NFCT_INTEN_FIELDDETECTED_Pos (1UL) /*!< Position of FIELDDETECTED field. */ +#define NFCT_INTEN_FIELDDETECTED_Msk (0x1UL << NFCT_INTEN_FIELDDETECTED_Pos) /*!< Bit mask of FIELDDETECTED field. */ +#define NFCT_INTEN_FIELDDETECTED_Disabled (0UL) /*!< Disable */ +#define NFCT_INTEN_FIELDDETECTED_Enabled (1UL) /*!< Enable */ + +/* Bit 0 : Enable or disable interrupt for READY event */ +#define NFCT_INTEN_READY_Pos (0UL) /*!< Position of READY field. */ +#define NFCT_INTEN_READY_Msk (0x1UL << NFCT_INTEN_READY_Pos) /*!< Bit mask of READY field. */ +#define NFCT_INTEN_READY_Disabled (0UL) /*!< Disable */ +#define NFCT_INTEN_READY_Enabled (1UL) /*!< Enable */ + +/* Register: NFCT_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 20 : Write '1' to Enable interrupt for STARTED event */ +#define NFCT_INTENSET_STARTED_Pos (20UL) /*!< Position of STARTED field. */ +#define NFCT_INTENSET_STARTED_Msk (0x1UL << NFCT_INTENSET_STARTED_Pos) /*!< Bit mask of STARTED field. */ +#define NFCT_INTENSET_STARTED_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENSET_STARTED_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENSET_STARTED_Set (1UL) /*!< Enable */ + +/* Bit 19 : Write '1' to Enable interrupt for SELECTED event */ +#define NFCT_INTENSET_SELECTED_Pos (19UL) /*!< Position of SELECTED field. */ +#define NFCT_INTENSET_SELECTED_Msk (0x1UL << NFCT_INTENSET_SELECTED_Pos) /*!< Bit mask of SELECTED field. */ +#define NFCT_INTENSET_SELECTED_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENSET_SELECTED_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENSET_SELECTED_Set (1UL) /*!< Enable */ + +/* Bit 18 : Write '1' to Enable interrupt for COLLISION event */ +#define NFCT_INTENSET_COLLISION_Pos (18UL) /*!< Position of COLLISION field. */ +#define NFCT_INTENSET_COLLISION_Msk (0x1UL << NFCT_INTENSET_COLLISION_Pos) /*!< Bit mask of COLLISION field. */ +#define NFCT_INTENSET_COLLISION_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENSET_COLLISION_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENSET_COLLISION_Set (1UL) /*!< Enable */ + +/* Bit 14 : Write '1' to Enable interrupt for AUTOCOLRESSTARTED event */ +#define NFCT_INTENSET_AUTOCOLRESSTARTED_Pos (14UL) /*!< Position of AUTOCOLRESSTARTED field. */ +#define NFCT_INTENSET_AUTOCOLRESSTARTED_Msk (0x1UL << NFCT_INTENSET_AUTOCOLRESSTARTED_Pos) /*!< Bit mask of AUTOCOLRESSTARTED field. */ +#define NFCT_INTENSET_AUTOCOLRESSTARTED_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENSET_AUTOCOLRESSTARTED_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENSET_AUTOCOLRESSTARTED_Set (1UL) /*!< Enable */ + +/* Bit 12 : Write '1' to Enable interrupt for ENDTX event */ +#define NFCT_INTENSET_ENDTX_Pos (12UL) /*!< Position of ENDTX field. */ +#define NFCT_INTENSET_ENDTX_Msk (0x1UL << NFCT_INTENSET_ENDTX_Pos) /*!< Bit mask of ENDTX field. */ +#define NFCT_INTENSET_ENDTX_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENSET_ENDTX_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENSET_ENDTX_Set (1UL) /*!< Enable */ + +/* Bit 11 : Write '1' to Enable interrupt for ENDRX event */ +#define NFCT_INTENSET_ENDRX_Pos (11UL) /*!< Position of ENDRX field. */ +#define NFCT_INTENSET_ENDRX_Msk (0x1UL << NFCT_INTENSET_ENDRX_Pos) /*!< Bit mask of ENDRX field. */ +#define NFCT_INTENSET_ENDRX_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENSET_ENDRX_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENSET_ENDRX_Set (1UL) /*!< Enable */ + +/* Bit 10 : Write '1' to Enable interrupt for RXERROR event */ +#define NFCT_INTENSET_RXERROR_Pos (10UL) /*!< Position of RXERROR field. */ +#define NFCT_INTENSET_RXERROR_Msk (0x1UL << NFCT_INTENSET_RXERROR_Pos) /*!< Bit mask of RXERROR field. */ +#define NFCT_INTENSET_RXERROR_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENSET_RXERROR_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENSET_RXERROR_Set (1UL) /*!< Enable */ + +/* Bit 7 : Write '1' to Enable interrupt for ERROR event */ +#define NFCT_INTENSET_ERROR_Pos (7UL) /*!< Position of ERROR field. */ +#define NFCT_INTENSET_ERROR_Msk (0x1UL << NFCT_INTENSET_ERROR_Pos) /*!< Bit mask of ERROR field. */ +#define NFCT_INTENSET_ERROR_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENSET_ERROR_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENSET_ERROR_Set (1UL) /*!< Enable */ + +/* Bit 6 : Write '1' to Enable interrupt for RXFRAMEEND event */ +#define NFCT_INTENSET_RXFRAMEEND_Pos (6UL) /*!< Position of RXFRAMEEND field. */ +#define NFCT_INTENSET_RXFRAMEEND_Msk (0x1UL << NFCT_INTENSET_RXFRAMEEND_Pos) /*!< Bit mask of RXFRAMEEND field. */ +#define NFCT_INTENSET_RXFRAMEEND_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENSET_RXFRAMEEND_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENSET_RXFRAMEEND_Set (1UL) /*!< Enable */ + +/* Bit 5 : Write '1' to Enable interrupt for RXFRAMESTART event */ +#define NFCT_INTENSET_RXFRAMESTART_Pos (5UL) /*!< Position of RXFRAMESTART field. */ +#define NFCT_INTENSET_RXFRAMESTART_Msk (0x1UL << NFCT_INTENSET_RXFRAMESTART_Pos) /*!< Bit mask of RXFRAMESTART field. */ +#define NFCT_INTENSET_RXFRAMESTART_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENSET_RXFRAMESTART_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENSET_RXFRAMESTART_Set (1UL) /*!< Enable */ + +/* Bit 4 : Write '1' to Enable interrupt for TXFRAMEEND event */ +#define NFCT_INTENSET_TXFRAMEEND_Pos (4UL) /*!< Position of TXFRAMEEND field. */ +#define NFCT_INTENSET_TXFRAMEEND_Msk (0x1UL << NFCT_INTENSET_TXFRAMEEND_Pos) /*!< Bit mask of TXFRAMEEND field. */ +#define NFCT_INTENSET_TXFRAMEEND_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENSET_TXFRAMEEND_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENSET_TXFRAMEEND_Set (1UL) /*!< Enable */ + +/* Bit 3 : Write '1' to Enable interrupt for TXFRAMESTART event */ +#define NFCT_INTENSET_TXFRAMESTART_Pos (3UL) /*!< Position of TXFRAMESTART field. */ +#define NFCT_INTENSET_TXFRAMESTART_Msk (0x1UL << NFCT_INTENSET_TXFRAMESTART_Pos) /*!< Bit mask of TXFRAMESTART field. */ +#define NFCT_INTENSET_TXFRAMESTART_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENSET_TXFRAMESTART_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENSET_TXFRAMESTART_Set (1UL) /*!< Enable */ + +/* Bit 2 : Write '1' to Enable interrupt for FIELDLOST event */ +#define NFCT_INTENSET_FIELDLOST_Pos (2UL) /*!< Position of FIELDLOST field. */ +#define NFCT_INTENSET_FIELDLOST_Msk (0x1UL << NFCT_INTENSET_FIELDLOST_Pos) /*!< Bit mask of FIELDLOST field. */ +#define NFCT_INTENSET_FIELDLOST_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENSET_FIELDLOST_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENSET_FIELDLOST_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for FIELDDETECTED event */ +#define NFCT_INTENSET_FIELDDETECTED_Pos (1UL) /*!< Position of FIELDDETECTED field. */ +#define NFCT_INTENSET_FIELDDETECTED_Msk (0x1UL << NFCT_INTENSET_FIELDDETECTED_Pos) /*!< Bit mask of FIELDDETECTED field. */ +#define NFCT_INTENSET_FIELDDETECTED_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENSET_FIELDDETECTED_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENSET_FIELDDETECTED_Set (1UL) /*!< Enable */ + +/* Bit 0 : Write '1' to Enable interrupt for READY event */ +#define NFCT_INTENSET_READY_Pos (0UL) /*!< Position of READY field. */ +#define NFCT_INTENSET_READY_Msk (0x1UL << NFCT_INTENSET_READY_Pos) /*!< Bit mask of READY field. */ +#define NFCT_INTENSET_READY_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENSET_READY_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENSET_READY_Set (1UL) /*!< Enable */ + +/* Register: NFCT_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 20 : Write '1' to Disable interrupt for STARTED event */ +#define NFCT_INTENCLR_STARTED_Pos (20UL) /*!< Position of STARTED field. */ +#define NFCT_INTENCLR_STARTED_Msk (0x1UL << NFCT_INTENCLR_STARTED_Pos) /*!< Bit mask of STARTED field. */ +#define NFCT_INTENCLR_STARTED_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENCLR_STARTED_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENCLR_STARTED_Clear (1UL) /*!< Disable */ + +/* Bit 19 : Write '1' to Disable interrupt for SELECTED event */ +#define NFCT_INTENCLR_SELECTED_Pos (19UL) /*!< Position of SELECTED field. */ +#define NFCT_INTENCLR_SELECTED_Msk (0x1UL << NFCT_INTENCLR_SELECTED_Pos) /*!< Bit mask of SELECTED field. */ +#define NFCT_INTENCLR_SELECTED_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENCLR_SELECTED_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENCLR_SELECTED_Clear (1UL) /*!< Disable */ + +/* Bit 18 : Write '1' to Disable interrupt for COLLISION event */ +#define NFCT_INTENCLR_COLLISION_Pos (18UL) /*!< Position of COLLISION field. */ +#define NFCT_INTENCLR_COLLISION_Msk (0x1UL << NFCT_INTENCLR_COLLISION_Pos) /*!< Bit mask of COLLISION field. */ +#define NFCT_INTENCLR_COLLISION_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENCLR_COLLISION_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENCLR_COLLISION_Clear (1UL) /*!< Disable */ + +/* Bit 14 : Write '1' to Disable interrupt for AUTOCOLRESSTARTED event */ +#define NFCT_INTENCLR_AUTOCOLRESSTARTED_Pos (14UL) /*!< Position of AUTOCOLRESSTARTED field. */ +#define NFCT_INTENCLR_AUTOCOLRESSTARTED_Msk (0x1UL << NFCT_INTENCLR_AUTOCOLRESSTARTED_Pos) /*!< Bit mask of AUTOCOLRESSTARTED field. */ +#define NFCT_INTENCLR_AUTOCOLRESSTARTED_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENCLR_AUTOCOLRESSTARTED_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENCLR_AUTOCOLRESSTARTED_Clear (1UL) /*!< Disable */ + +/* Bit 12 : Write '1' to Disable interrupt for ENDTX event */ +#define NFCT_INTENCLR_ENDTX_Pos (12UL) /*!< Position of ENDTX field. */ +#define NFCT_INTENCLR_ENDTX_Msk (0x1UL << NFCT_INTENCLR_ENDTX_Pos) /*!< Bit mask of ENDTX field. */ +#define NFCT_INTENCLR_ENDTX_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENCLR_ENDTX_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENCLR_ENDTX_Clear (1UL) /*!< Disable */ + +/* Bit 11 : Write '1' to Disable interrupt for ENDRX event */ +#define NFCT_INTENCLR_ENDRX_Pos (11UL) /*!< Position of ENDRX field. */ +#define NFCT_INTENCLR_ENDRX_Msk (0x1UL << NFCT_INTENCLR_ENDRX_Pos) /*!< Bit mask of ENDRX field. */ +#define NFCT_INTENCLR_ENDRX_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENCLR_ENDRX_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENCLR_ENDRX_Clear (1UL) /*!< Disable */ + +/* Bit 10 : Write '1' to Disable interrupt for RXERROR event */ +#define NFCT_INTENCLR_RXERROR_Pos (10UL) /*!< Position of RXERROR field. */ +#define NFCT_INTENCLR_RXERROR_Msk (0x1UL << NFCT_INTENCLR_RXERROR_Pos) /*!< Bit mask of RXERROR field. */ +#define NFCT_INTENCLR_RXERROR_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENCLR_RXERROR_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENCLR_RXERROR_Clear (1UL) /*!< Disable */ + +/* Bit 7 : Write '1' to Disable interrupt for ERROR event */ +#define NFCT_INTENCLR_ERROR_Pos (7UL) /*!< Position of ERROR field. */ +#define NFCT_INTENCLR_ERROR_Msk (0x1UL << NFCT_INTENCLR_ERROR_Pos) /*!< Bit mask of ERROR field. */ +#define NFCT_INTENCLR_ERROR_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENCLR_ERROR_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENCLR_ERROR_Clear (1UL) /*!< Disable */ + +/* Bit 6 : Write '1' to Disable interrupt for RXFRAMEEND event */ +#define NFCT_INTENCLR_RXFRAMEEND_Pos (6UL) /*!< Position of RXFRAMEEND field. */ +#define NFCT_INTENCLR_RXFRAMEEND_Msk (0x1UL << NFCT_INTENCLR_RXFRAMEEND_Pos) /*!< Bit mask of RXFRAMEEND field. */ +#define NFCT_INTENCLR_RXFRAMEEND_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENCLR_RXFRAMEEND_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENCLR_RXFRAMEEND_Clear (1UL) /*!< Disable */ + +/* Bit 5 : Write '1' to Disable interrupt for RXFRAMESTART event */ +#define NFCT_INTENCLR_RXFRAMESTART_Pos (5UL) /*!< Position of RXFRAMESTART field. */ +#define NFCT_INTENCLR_RXFRAMESTART_Msk (0x1UL << NFCT_INTENCLR_RXFRAMESTART_Pos) /*!< Bit mask of RXFRAMESTART field. */ +#define NFCT_INTENCLR_RXFRAMESTART_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENCLR_RXFRAMESTART_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENCLR_RXFRAMESTART_Clear (1UL) /*!< Disable */ + +/* Bit 4 : Write '1' to Disable interrupt for TXFRAMEEND event */ +#define NFCT_INTENCLR_TXFRAMEEND_Pos (4UL) /*!< Position of TXFRAMEEND field. */ +#define NFCT_INTENCLR_TXFRAMEEND_Msk (0x1UL << NFCT_INTENCLR_TXFRAMEEND_Pos) /*!< Bit mask of TXFRAMEEND field. */ +#define NFCT_INTENCLR_TXFRAMEEND_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENCLR_TXFRAMEEND_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENCLR_TXFRAMEEND_Clear (1UL) /*!< Disable */ + +/* Bit 3 : Write '1' to Disable interrupt for TXFRAMESTART event */ +#define NFCT_INTENCLR_TXFRAMESTART_Pos (3UL) /*!< Position of TXFRAMESTART field. */ +#define NFCT_INTENCLR_TXFRAMESTART_Msk (0x1UL << NFCT_INTENCLR_TXFRAMESTART_Pos) /*!< Bit mask of TXFRAMESTART field. */ +#define NFCT_INTENCLR_TXFRAMESTART_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENCLR_TXFRAMESTART_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENCLR_TXFRAMESTART_Clear (1UL) /*!< Disable */ + +/* Bit 2 : Write '1' to Disable interrupt for FIELDLOST event */ +#define NFCT_INTENCLR_FIELDLOST_Pos (2UL) /*!< Position of FIELDLOST field. */ +#define NFCT_INTENCLR_FIELDLOST_Msk (0x1UL << NFCT_INTENCLR_FIELDLOST_Pos) /*!< Bit mask of FIELDLOST field. */ +#define NFCT_INTENCLR_FIELDLOST_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENCLR_FIELDLOST_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENCLR_FIELDLOST_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for FIELDDETECTED event */ +#define NFCT_INTENCLR_FIELDDETECTED_Pos (1UL) /*!< Position of FIELDDETECTED field. */ +#define NFCT_INTENCLR_FIELDDETECTED_Msk (0x1UL << NFCT_INTENCLR_FIELDDETECTED_Pos) /*!< Bit mask of FIELDDETECTED field. */ +#define NFCT_INTENCLR_FIELDDETECTED_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENCLR_FIELDDETECTED_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENCLR_FIELDDETECTED_Clear (1UL) /*!< Disable */ + +/* Bit 0 : Write '1' to Disable interrupt for READY event */ +#define NFCT_INTENCLR_READY_Pos (0UL) /*!< Position of READY field. */ +#define NFCT_INTENCLR_READY_Msk (0x1UL << NFCT_INTENCLR_READY_Pos) /*!< Bit mask of READY field. */ +#define NFCT_INTENCLR_READY_Disabled (0UL) /*!< Read: Disabled */ +#define NFCT_INTENCLR_READY_Enabled (1UL) /*!< Read: Enabled */ +#define NFCT_INTENCLR_READY_Clear (1UL) /*!< Disable */ + +/* Register: NFCT_ERRORSTATUS */ +/* Description: NFC Error Status register */ + +/* Bit 3 : Field level is too low at min load resistance */ +#define NFCT_ERRORSTATUS_NFCFIELDTOOWEAK_Pos (3UL) /*!< Position of NFCFIELDTOOWEAK field. */ +#define NFCT_ERRORSTATUS_NFCFIELDTOOWEAK_Msk (0x1UL << NFCT_ERRORSTATUS_NFCFIELDTOOWEAK_Pos) /*!< Bit mask of NFCFIELDTOOWEAK field. */ + +/* Bit 2 : Field level is too high at max load resistance */ +#define NFCT_ERRORSTATUS_NFCFIELDTOOSTRONG_Pos (2UL) /*!< Position of NFCFIELDTOOSTRONG field. */ +#define NFCT_ERRORSTATUS_NFCFIELDTOOSTRONG_Msk (0x1UL << NFCT_ERRORSTATUS_NFCFIELDTOOSTRONG_Pos) /*!< Bit mask of NFCFIELDTOOSTRONG field. */ + +/* Bit 0 : No STARTTX task triggered before expiration of the time set in FRAMEDELAYMAX */ +#define NFCT_ERRORSTATUS_FRAMEDELAYTIMEOUT_Pos (0UL) /*!< Position of FRAMEDELAYTIMEOUT field. */ +#define NFCT_ERRORSTATUS_FRAMEDELAYTIMEOUT_Msk (0x1UL << NFCT_ERRORSTATUS_FRAMEDELAYTIMEOUT_Pos) /*!< Bit mask of FRAMEDELAYTIMEOUT field. */ + +/* Register: NFCT_FRAMESTATUS_RX */ +/* Description: Result of last incoming frames */ + +/* Bit 3 : Overrun detected */ +#define NFCT_FRAMESTATUS_RX_OVERRUN_Pos (3UL) /*!< Position of OVERRUN field. */ +#define NFCT_FRAMESTATUS_RX_OVERRUN_Msk (0x1UL << NFCT_FRAMESTATUS_RX_OVERRUN_Pos) /*!< Bit mask of OVERRUN field. */ +#define NFCT_FRAMESTATUS_RX_OVERRUN_NoOverrun (0UL) /*!< No overrun detected */ +#define NFCT_FRAMESTATUS_RX_OVERRUN_Overrun (1UL) /*!< Overrun error */ + +/* Bit 2 : Parity status of received frame */ +#define NFCT_FRAMESTATUS_RX_PARITYSTATUS_Pos (2UL) /*!< Position of PARITYSTATUS field. */ +#define NFCT_FRAMESTATUS_RX_PARITYSTATUS_Msk (0x1UL << NFCT_FRAMESTATUS_RX_PARITYSTATUS_Pos) /*!< Bit mask of PARITYSTATUS field. */ +#define NFCT_FRAMESTATUS_RX_PARITYSTATUS_ParityOK (0UL) /*!< Frame received with parity OK */ +#define NFCT_FRAMESTATUS_RX_PARITYSTATUS_ParityError (1UL) /*!< Frame received with parity error */ + +/* Bit 0 : No valid End of Frame detected */ +#define NFCT_FRAMESTATUS_RX_CRCERROR_Pos (0UL) /*!< Position of CRCERROR field. */ +#define NFCT_FRAMESTATUS_RX_CRCERROR_Msk (0x1UL << NFCT_FRAMESTATUS_RX_CRCERROR_Pos) /*!< Bit mask of CRCERROR field. */ +#define NFCT_FRAMESTATUS_RX_CRCERROR_CRCCorrect (0UL) /*!< Valid CRC detected */ +#define NFCT_FRAMESTATUS_RX_CRCERROR_CRCError (1UL) /*!< CRC received does not match local check */ + +/* Register: NFCT_CURRENTLOADCTRL */ +/* Description: Current value driven to the NFC Load Control */ + +/* Bits 5..0 : Current value driven to the NFC Load Control */ +#define NFCT_CURRENTLOADCTRL_CURRENTLOADCTRL_Pos (0UL) /*!< Position of CURRENTLOADCTRL field. */ +#define NFCT_CURRENTLOADCTRL_CURRENTLOADCTRL_Msk (0x3FUL << NFCT_CURRENTLOADCTRL_CURRENTLOADCTRL_Pos) /*!< Bit mask of CURRENTLOADCTRL field. */ + +/* Register: NFCT_FIELDPRESENT */ +/* Description: Indicates the presence or not of a valid field */ + +/* Bit 1 : Indicates if the low level has locked to the field */ +#define NFCT_FIELDPRESENT_LOCKDETECT_Pos (1UL) /*!< Position of LOCKDETECT field. */ +#define NFCT_FIELDPRESENT_LOCKDETECT_Msk (0x1UL << NFCT_FIELDPRESENT_LOCKDETECT_Pos) /*!< Bit mask of LOCKDETECT field. */ +#define NFCT_FIELDPRESENT_LOCKDETECT_NotLocked (0UL) /*!< Not locked to field */ +#define NFCT_FIELDPRESENT_LOCKDETECT_Locked (1UL) /*!< Locked to field */ + +/* Bit 0 : Indicates the presence or not of a valid field. Available only in the activated state. */ +#define NFCT_FIELDPRESENT_FIELDPRESENT_Pos (0UL) /*!< Position of FIELDPRESENT field. */ +#define NFCT_FIELDPRESENT_FIELDPRESENT_Msk (0x1UL << NFCT_FIELDPRESENT_FIELDPRESENT_Pos) /*!< Bit mask of FIELDPRESENT field. */ +#define NFCT_FIELDPRESENT_FIELDPRESENT_NoField (0UL) /*!< No valid field detected */ +#define NFCT_FIELDPRESENT_FIELDPRESENT_FieldPresent (1UL) /*!< Valid field detected */ + +/* Register: NFCT_FRAMEDELAYMIN */ +/* Description: Minimum frame delay */ + +/* Bits 15..0 : Minimum frame delay in number of 13.56 MHz clocks */ +#define NFCT_FRAMEDELAYMIN_FRAMEDELAYMIN_Pos (0UL) /*!< Position of FRAMEDELAYMIN field. */ +#define NFCT_FRAMEDELAYMIN_FRAMEDELAYMIN_Msk (0xFFFFUL << NFCT_FRAMEDELAYMIN_FRAMEDELAYMIN_Pos) /*!< Bit mask of FRAMEDELAYMIN field. */ + +/* Register: NFCT_FRAMEDELAYMAX */ +/* Description: Maximum frame delay */ + +/* Bits 15..0 : Maximum frame delay in number of 13.56 MHz clocks */ +#define NFCT_FRAMEDELAYMAX_FRAMEDELAYMAX_Pos (0UL) /*!< Position of FRAMEDELAYMAX field. */ +#define NFCT_FRAMEDELAYMAX_FRAMEDELAYMAX_Msk (0xFFFFUL << NFCT_FRAMEDELAYMAX_FRAMEDELAYMAX_Pos) /*!< Bit mask of FRAMEDELAYMAX field. */ + +/* Register: NFCT_FRAMEDELAYMODE */ +/* Description: Configuration register for the Frame Delay Timer */ + +/* Bits 1..0 : Configuration register for the Frame Delay Timer */ +#define NFCT_FRAMEDELAYMODE_FRAMEDELAYMODE_Pos (0UL) /*!< Position of FRAMEDELAYMODE field. */ +#define NFCT_FRAMEDELAYMODE_FRAMEDELAYMODE_Msk (0x3UL << NFCT_FRAMEDELAYMODE_FRAMEDELAYMODE_Pos) /*!< Bit mask of FRAMEDELAYMODE field. */ +#define NFCT_FRAMEDELAYMODE_FRAMEDELAYMODE_FreeRun (0UL) /*!< Transmission is independent of frame timer and will start when the STARTTX task is triggered. No timeout. */ +#define NFCT_FRAMEDELAYMODE_FRAMEDELAYMODE_Window (1UL) /*!< Frame is transmitted between FRAMEDELAYMIN and FRAMEDELAYMAX */ +#define NFCT_FRAMEDELAYMODE_FRAMEDELAYMODE_ExactVal (2UL) /*!< Frame is transmitted exactly at FRAMEDELAYMAX */ +#define NFCT_FRAMEDELAYMODE_FRAMEDELAYMODE_WindowGrid (3UL) /*!< Frame is transmitted on a bit grid between FRAMEDELAYMIN and FRAMEDELAYMAX */ + +/* Register: NFCT_PACKETPTR */ +/* Description: Packet pointer for TXD and RXD data storage in Data RAM */ + +/* Bits 31..0 : Packet pointer for TXD and RXD data storage in Data RAM. This address is a byte aligned RAM address. */ +#define NFCT_PACKETPTR_PTR_Pos (0UL) /*!< Position of PTR field. */ +#define NFCT_PACKETPTR_PTR_Msk (0xFFFFFFFFUL << NFCT_PACKETPTR_PTR_Pos) /*!< Bit mask of PTR field. */ + +/* Register: NFCT_MAXLEN */ +/* Description: Size of allocated for TXD and RXD data storage buffer in Data RAM */ + +/* Bits 8..0 : Size of allocated for TXD and RXD data storage buffer in Data RAM */ +#define NFCT_MAXLEN_MAXLEN_Pos (0UL) /*!< Position of MAXLEN field. */ +#define NFCT_MAXLEN_MAXLEN_Msk (0x1FFUL << NFCT_MAXLEN_MAXLEN_Pos) /*!< Bit mask of MAXLEN field. */ + +/* Register: NFCT_TXD_FRAMECONFIG */ +/* Description: Configuration of outgoing frames */ + +/* Bit 4 : CRC mode for outgoing frames */ +#define NFCT_TXD_FRAMECONFIG_CRCMODETX_Pos (4UL) /*!< Position of CRCMODETX field. */ +#define NFCT_TXD_FRAMECONFIG_CRCMODETX_Msk (0x1UL << NFCT_TXD_FRAMECONFIG_CRCMODETX_Pos) /*!< Bit mask of CRCMODETX field. */ +#define NFCT_TXD_FRAMECONFIG_CRCMODETX_NoCRCTX (0UL) /*!< CRC is not added to the frame */ +#define NFCT_TXD_FRAMECONFIG_CRCMODETX_CRC16TX (1UL) /*!< 16 bit CRC added to the frame based on all the data read from RAM that is used in the frame */ + +/* Bit 2 : Adding SoF or not in TX frames */ +#define NFCT_TXD_FRAMECONFIG_SOF_Pos (2UL) /*!< Position of SOF field. */ +#define NFCT_TXD_FRAMECONFIG_SOF_Msk (0x1UL << NFCT_TXD_FRAMECONFIG_SOF_Pos) /*!< Bit mask of SOF field. */ +#define NFCT_TXD_FRAMECONFIG_SOF_NoSoF (0UL) /*!< Start of Frame symbol not added */ +#define NFCT_TXD_FRAMECONFIG_SOF_SoF (1UL) /*!< Start of Frame symbol added */ + +/* Bit 1 : Discarding unused bits in start or at end of a Frame */ +#define NFCT_TXD_FRAMECONFIG_DISCARDMODE_Pos (1UL) /*!< Position of DISCARDMODE field. */ +#define NFCT_TXD_FRAMECONFIG_DISCARDMODE_Msk (0x1UL << NFCT_TXD_FRAMECONFIG_DISCARDMODE_Pos) /*!< Bit mask of DISCARDMODE field. */ +#define NFCT_TXD_FRAMECONFIG_DISCARDMODE_DiscardEnd (0UL) /*!< Unused bits is discarded at end of frame */ +#define NFCT_TXD_FRAMECONFIG_DISCARDMODE_DiscardStart (1UL) /*!< Unused bits is discarded at start of frame */ + +/* Bit 0 : Adding parity or not in the frame */ +#define NFCT_TXD_FRAMECONFIG_PARITY_Pos (0UL) /*!< Position of PARITY field. */ +#define NFCT_TXD_FRAMECONFIG_PARITY_Msk (0x1UL << NFCT_TXD_FRAMECONFIG_PARITY_Pos) /*!< Bit mask of PARITY field. */ +#define NFCT_TXD_FRAMECONFIG_PARITY_NoParity (0UL) /*!< Parity is not added in TX frames */ +#define NFCT_TXD_FRAMECONFIG_PARITY_Parity (1UL) /*!< Parity is added TX frames */ + +/* Register: NFCT_TXD_AMOUNT */ +/* Description: Size of outgoing frame */ + +/* Bits 11..3 : Number of complete bytes that shall be included in the frame, excluding CRC, parity and framing */ +#define NFCT_TXD_AMOUNT_TXDATABYTES_Pos (3UL) /*!< Position of TXDATABYTES field. */ +#define NFCT_TXD_AMOUNT_TXDATABYTES_Msk (0x1FFUL << NFCT_TXD_AMOUNT_TXDATABYTES_Pos) /*!< Bit mask of TXDATABYTES field. */ + +/* Bits 2..0 : Number of bits in the last or first byte read from RAM that shall be included in the frame (excluding parity bit). */ +#define NFCT_TXD_AMOUNT_TXDATABITS_Pos (0UL) /*!< Position of TXDATABITS field. */ +#define NFCT_TXD_AMOUNT_TXDATABITS_Msk (0x7UL << NFCT_TXD_AMOUNT_TXDATABITS_Pos) /*!< Bit mask of TXDATABITS field. */ + +/* Register: NFCT_RXD_FRAMECONFIG */ +/* Description: Configuration of incoming frames */ + +/* Bit 4 : CRC mode for incoming frames */ +#define NFCT_RXD_FRAMECONFIG_CRCMODERX_Pos (4UL) /*!< Position of CRCMODERX field. */ +#define NFCT_RXD_FRAMECONFIG_CRCMODERX_Msk (0x1UL << NFCT_RXD_FRAMECONFIG_CRCMODERX_Pos) /*!< Bit mask of CRCMODERX field. */ +#define NFCT_RXD_FRAMECONFIG_CRCMODERX_NoCRCRX (0UL) /*!< CRC is not expected in RX frames */ +#define NFCT_RXD_FRAMECONFIG_CRCMODERX_CRC16RX (1UL) /*!< Last 16 bits in RX frame is CRC, CRC is checked and CRCSTATUS updated */ + +/* Bit 2 : SoF expected or not in RX frames */ +#define NFCT_RXD_FRAMECONFIG_SOF_Pos (2UL) /*!< Position of SOF field. */ +#define NFCT_RXD_FRAMECONFIG_SOF_Msk (0x1UL << NFCT_RXD_FRAMECONFIG_SOF_Pos) /*!< Bit mask of SOF field. */ +#define NFCT_RXD_FRAMECONFIG_SOF_NoSoF (0UL) /*!< Start of Frame symbol is not expected in RX frames */ +#define NFCT_RXD_FRAMECONFIG_SOF_SoF (1UL) /*!< Start of Frame symbol is expected in RX frames */ + +/* Bit 0 : Parity expected or not in RX frame */ +#define NFCT_RXD_FRAMECONFIG_PARITY_Pos (0UL) /*!< Position of PARITY field. */ +#define NFCT_RXD_FRAMECONFIG_PARITY_Msk (0x1UL << NFCT_RXD_FRAMECONFIG_PARITY_Pos) /*!< Bit mask of PARITY field. */ +#define NFCT_RXD_FRAMECONFIG_PARITY_NoParity (0UL) /*!< Parity is not expected in RX frames */ +#define NFCT_RXD_FRAMECONFIG_PARITY_Parity (1UL) /*!< Parity is expected in RX frames */ + +/* Register: NFCT_RXD_AMOUNT */ +/* Description: Size of last incoming frame */ + +/* Bits 11..3 : Number of complete bytes received in the frame (including CRC, but excluding parity and SoF/EoF framing) */ +#define NFCT_RXD_AMOUNT_RXDATABYTES_Pos (3UL) /*!< Position of RXDATABYTES field. */ +#define NFCT_RXD_AMOUNT_RXDATABYTES_Msk (0x1FFUL << NFCT_RXD_AMOUNT_RXDATABYTES_Pos) /*!< Bit mask of RXDATABYTES field. */ + +/* Bits 2..0 : Number of bits in the last byte in the frame, if less than 8 (including CRC, but excluding parity and SoF/EoF framing). */ +#define NFCT_RXD_AMOUNT_RXDATABITS_Pos (0UL) /*!< Position of RXDATABITS field. */ +#define NFCT_RXD_AMOUNT_RXDATABITS_Msk (0x7UL << NFCT_RXD_AMOUNT_RXDATABITS_Pos) /*!< Bit mask of RXDATABITS field. */ + +/* Register: NFCT_NFCID1_LAST */ +/* Description: Last NFCID1 part (4, 7 or 10 bytes ID) */ + +/* Bits 31..24 : NFCID1 byte W */ +#define NFCT_NFCID1_LAST_NFCID1_W_Pos (24UL) /*!< Position of NFCID1_W field. */ +#define NFCT_NFCID1_LAST_NFCID1_W_Msk (0xFFUL << NFCT_NFCID1_LAST_NFCID1_W_Pos) /*!< Bit mask of NFCID1_W field. */ + +/* Bits 23..16 : NFCID1 byte X */ +#define NFCT_NFCID1_LAST_NFCID1_X_Pos (16UL) /*!< Position of NFCID1_X field. */ +#define NFCT_NFCID1_LAST_NFCID1_X_Msk (0xFFUL << NFCT_NFCID1_LAST_NFCID1_X_Pos) /*!< Bit mask of NFCID1_X field. */ + +/* Bits 15..8 : NFCID1 byte Y */ +#define NFCT_NFCID1_LAST_NFCID1_Y_Pos (8UL) /*!< Position of NFCID1_Y field. */ +#define NFCT_NFCID1_LAST_NFCID1_Y_Msk (0xFFUL << NFCT_NFCID1_LAST_NFCID1_Y_Pos) /*!< Bit mask of NFCID1_Y field. */ + +/* Bits 7..0 : NFCID1 byte Z (very last byte sent) */ +#define NFCT_NFCID1_LAST_NFCID1_Z_Pos (0UL) /*!< Position of NFCID1_Z field. */ +#define NFCT_NFCID1_LAST_NFCID1_Z_Msk (0xFFUL << NFCT_NFCID1_LAST_NFCID1_Z_Pos) /*!< Bit mask of NFCID1_Z field. */ + +/* Register: NFCT_NFCID1_2ND_LAST */ +/* Description: Second last NFCID1 part (7 or 10 bytes ID) */ + +/* Bits 23..16 : NFCID1 byte T */ +#define NFCT_NFCID1_2ND_LAST_NFCID1_T_Pos (16UL) /*!< Position of NFCID1_T field. */ +#define NFCT_NFCID1_2ND_LAST_NFCID1_T_Msk (0xFFUL << NFCT_NFCID1_2ND_LAST_NFCID1_T_Pos) /*!< Bit mask of NFCID1_T field. */ + +/* Bits 15..8 : NFCID1 byte U */ +#define NFCT_NFCID1_2ND_LAST_NFCID1_U_Pos (8UL) /*!< Position of NFCID1_U field. */ +#define NFCT_NFCID1_2ND_LAST_NFCID1_U_Msk (0xFFUL << NFCT_NFCID1_2ND_LAST_NFCID1_U_Pos) /*!< Bit mask of NFCID1_U field. */ + +/* Bits 7..0 : NFCID1 byte V */ +#define NFCT_NFCID1_2ND_LAST_NFCID1_V_Pos (0UL) /*!< Position of NFCID1_V field. */ +#define NFCT_NFCID1_2ND_LAST_NFCID1_V_Msk (0xFFUL << NFCT_NFCID1_2ND_LAST_NFCID1_V_Pos) /*!< Bit mask of NFCID1_V field. */ + +/* Register: NFCT_NFCID1_3RD_LAST */ +/* Description: Third last NFCID1 part (10 bytes ID) */ + +/* Bits 23..16 : NFCID1 byte Q */ +#define NFCT_NFCID1_3RD_LAST_NFCID1_Q_Pos (16UL) /*!< Position of NFCID1_Q field. */ +#define NFCT_NFCID1_3RD_LAST_NFCID1_Q_Msk (0xFFUL << NFCT_NFCID1_3RD_LAST_NFCID1_Q_Pos) /*!< Bit mask of NFCID1_Q field. */ + +/* Bits 15..8 : NFCID1 byte R */ +#define NFCT_NFCID1_3RD_LAST_NFCID1_R_Pos (8UL) /*!< Position of NFCID1_R field. */ +#define NFCT_NFCID1_3RD_LAST_NFCID1_R_Msk (0xFFUL << NFCT_NFCID1_3RD_LAST_NFCID1_R_Pos) /*!< Bit mask of NFCID1_R field. */ + +/* Bits 7..0 : NFCID1 byte S */ +#define NFCT_NFCID1_3RD_LAST_NFCID1_S_Pos (0UL) /*!< Position of NFCID1_S field. */ +#define NFCT_NFCID1_3RD_LAST_NFCID1_S_Msk (0xFFUL << NFCT_NFCID1_3RD_LAST_NFCID1_S_Pos) /*!< Bit mask of NFCID1_S field. */ + +/* Register: NFCT_SENSRES */ +/* Description: NFC-A SENS_RES auto-response settings */ + +/* Bits 15..12 : Reserved for future use. Shall be 0. */ +#define NFCT_SENSRES_RFU74_Pos (12UL) /*!< Position of RFU74 field. */ +#define NFCT_SENSRES_RFU74_Msk (0xFUL << NFCT_SENSRES_RFU74_Pos) /*!< Bit mask of RFU74 field. */ + +/* Bits 11..8 : Tag platform configuration as defined by the b4:b1 of byte 2 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification */ +#define NFCT_SENSRES_PLATFCONFIG_Pos (8UL) /*!< Position of PLATFCONFIG field. */ +#define NFCT_SENSRES_PLATFCONFIG_Msk (0xFUL << NFCT_SENSRES_PLATFCONFIG_Pos) /*!< Bit mask of PLATFCONFIG field. */ + +/* Bits 7..6 : NFCID1 size. This value is used by the Auto collision resolution engine. */ +#define NFCT_SENSRES_NFCIDSIZE_Pos (6UL) /*!< Position of NFCIDSIZE field. */ +#define NFCT_SENSRES_NFCIDSIZE_Msk (0x3UL << NFCT_SENSRES_NFCIDSIZE_Pos) /*!< Bit mask of NFCIDSIZE field. */ +#define NFCT_SENSRES_NFCIDSIZE_NFCID1Single (0UL) /*!< NFCID1 size: single (4 bytes) */ +#define NFCT_SENSRES_NFCIDSIZE_NFCID1Double (1UL) /*!< NFCID1 size: double (7 bytes) */ +#define NFCT_SENSRES_NFCIDSIZE_NFCID1Triple (2UL) /*!< NFCID1 size: triple (10 bytes) */ + +/* Bit 5 : Reserved for future use. Shall be 0. */ +#define NFCT_SENSRES_RFU5_Pos (5UL) /*!< Position of RFU5 field. */ +#define NFCT_SENSRES_RFU5_Msk (0x1UL << NFCT_SENSRES_RFU5_Pos) /*!< Bit mask of RFU5 field. */ + +/* Bits 4..0 : Bit frame SDD as defined by the b5:b1 of byte 1 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification */ +#define NFCT_SENSRES_BITFRAMESDD_Pos (0UL) /*!< Position of BITFRAMESDD field. */ +#define NFCT_SENSRES_BITFRAMESDD_Msk (0x1FUL << NFCT_SENSRES_BITFRAMESDD_Pos) /*!< Bit mask of BITFRAMESDD field. */ +#define NFCT_SENSRES_BITFRAMESDD_SDD00000 (0UL) /*!< SDD pattern 00000 */ +#define NFCT_SENSRES_BITFRAMESDD_SDD00001 (1UL) /*!< SDD pattern 00001 */ +#define NFCT_SENSRES_BITFRAMESDD_SDD00010 (2UL) /*!< SDD pattern 00010 */ +#define NFCT_SENSRES_BITFRAMESDD_SDD00100 (4UL) /*!< SDD pattern 00100 */ +#define NFCT_SENSRES_BITFRAMESDD_SDD01000 (8UL) /*!< SDD pattern 01000 */ +#define NFCT_SENSRES_BITFRAMESDD_SDD10000 (16UL) /*!< SDD pattern 10000 */ + +/* Register: NFCT_SELRES */ +/* Description: NFC-A SEL_RES auto-response settings */ + +/* Bit 7 : Reserved for future use. Shall be 0. */ +#define NFCT_SELRES_RFU7_Pos (7UL) /*!< Position of RFU7 field. */ +#define NFCT_SELRES_RFU7_Msk (0x1UL << NFCT_SELRES_RFU7_Pos) /*!< Bit mask of RFU7 field. */ + +/* Bits 6..5 : Protocol as defined by the b7:b6 of SEL_RES response in the NFC Forum, NFC Digital Protocol Technical Specification */ +#define NFCT_SELRES_PROTOCOL_Pos (5UL) /*!< Position of PROTOCOL field. */ +#define NFCT_SELRES_PROTOCOL_Msk (0x3UL << NFCT_SELRES_PROTOCOL_Pos) /*!< Bit mask of PROTOCOL field. */ + +/* Bits 4..3 : Reserved for future use. Shall be 0. */ +#define NFCT_SELRES_RFU43_Pos (3UL) /*!< Position of RFU43 field. */ +#define NFCT_SELRES_RFU43_Msk (0x3UL << NFCT_SELRES_RFU43_Pos) /*!< Bit mask of RFU43 field. */ + +/* Bit 2 : Cascade bit (controlled by hardware, write has no effect) */ +#define NFCT_SELRES_CASCADE_Pos (2UL) /*!< Position of CASCADE field. */ +#define NFCT_SELRES_CASCADE_Msk (0x1UL << NFCT_SELRES_CASCADE_Pos) /*!< Bit mask of CASCADE field. */ +#define NFCT_SELRES_CASCADE_Complete (0UL) /*!< NFCID1 complete */ +#define NFCT_SELRES_CASCADE_NotComplete (1UL) /*!< NFCID1 not complete */ + +/* Bits 1..0 : Reserved for future use. Shall be 0. */ +#define NFCT_SELRES_RFU10_Pos (0UL) /*!< Position of RFU10 field. */ +#define NFCT_SELRES_RFU10_Msk (0x3UL << NFCT_SELRES_RFU10_Pos) /*!< Bit mask of RFU10 field. */ + + +/* Peripheral: NVMC */ +/* Description: Non Volatile Memory Controller */ + +/* Register: NVMC_READY */ +/* Description: Ready flag */ + +/* Bit 0 : NVMC is ready or busy */ +#define NVMC_READY_READY_Pos (0UL) /*!< Position of READY field. */ +#define NVMC_READY_READY_Msk (0x1UL << NVMC_READY_READY_Pos) /*!< Bit mask of READY field. */ +#define NVMC_READY_READY_Busy (0UL) /*!< NVMC is busy (on-going write or erase operation) */ +#define NVMC_READY_READY_Ready (1UL) /*!< NVMC is ready */ + +/* Register: NVMC_CONFIG */ +/* Description: Configuration register */ + +/* Bits 1..0 : Program memory access mode. It is strongly recommended to only activate erase and write modes when they are actively used. Enabling write or erase will invalidate the cache and keep it invalidated. */ +#define NVMC_CONFIG_WEN_Pos (0UL) /*!< Position of WEN field. */ +#define NVMC_CONFIG_WEN_Msk (0x3UL << NVMC_CONFIG_WEN_Pos) /*!< Bit mask of WEN field. */ +#define NVMC_CONFIG_WEN_Ren (0UL) /*!< Read only access */ +#define NVMC_CONFIG_WEN_Wen (1UL) /*!< Write Enabled */ +#define NVMC_CONFIG_WEN_Een (2UL) /*!< Erase enabled */ + +/* Register: NVMC_ERASEPAGE */ +/* Description: Register for erasing a page in Code area */ + +/* Bits 31..0 : Register for starting erase of a page in Code area */ +#define NVMC_ERASEPAGE_ERASEPAGE_Pos (0UL) /*!< Position of ERASEPAGE field. */ +#define NVMC_ERASEPAGE_ERASEPAGE_Msk (0xFFFFFFFFUL << NVMC_ERASEPAGE_ERASEPAGE_Pos) /*!< Bit mask of ERASEPAGE field. */ + +/* Register: NVMC_ERASEPCR1 */ +/* Description: Deprecated register - Register for erasing a page in Code area. Equivalent to ERASEPAGE. */ + +/* Bits 31..0 : Register for erasing a page in Code area. Equivalent to ERASEPAGE. */ +#define NVMC_ERASEPCR1_ERASEPCR1_Pos (0UL) /*!< Position of ERASEPCR1 field. */ +#define NVMC_ERASEPCR1_ERASEPCR1_Msk (0xFFFFFFFFUL << NVMC_ERASEPCR1_ERASEPCR1_Pos) /*!< Bit mask of ERASEPCR1 field. */ + +/* Register: NVMC_ERASEALL */ +/* Description: Register for erasing all non-volatile user memory */ + +/* Bit 0 : Erase all non-volatile memory including UICR registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased. */ +#define NVMC_ERASEALL_ERASEALL_Pos (0UL) /*!< Position of ERASEALL field. */ +#define NVMC_ERASEALL_ERASEALL_Msk (0x1UL << NVMC_ERASEALL_ERASEALL_Pos) /*!< Bit mask of ERASEALL field. */ +#define NVMC_ERASEALL_ERASEALL_NoOperation (0UL) /*!< No operation */ +#define NVMC_ERASEALL_ERASEALL_Erase (1UL) /*!< Start chip erase */ + +/* Register: NVMC_ERASEPCR0 */ +/* Description: Deprecated register - Register for erasing a page in Code area. Equivalent to ERASEPAGE. */ + +/* Bits 31..0 : Register for starting erase of a page in Code area. Equivalent to ERASEPAGE. */ +#define NVMC_ERASEPCR0_ERASEPCR0_Pos (0UL) /*!< Position of ERASEPCR0 field. */ +#define NVMC_ERASEPCR0_ERASEPCR0_Msk (0xFFFFFFFFUL << NVMC_ERASEPCR0_ERASEPCR0_Pos) /*!< Bit mask of ERASEPCR0 field. */ + +/* Register: NVMC_ERASEUICR */ +/* Description: Register for erasing User Information Configuration Registers */ + +/* Bit 0 : Register starting erase of all User Information Configuration Registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased. */ +#define NVMC_ERASEUICR_ERASEUICR_Pos (0UL) /*!< Position of ERASEUICR field. */ +#define NVMC_ERASEUICR_ERASEUICR_Msk (0x1UL << NVMC_ERASEUICR_ERASEUICR_Pos) /*!< Bit mask of ERASEUICR field. */ +#define NVMC_ERASEUICR_ERASEUICR_NoOperation (0UL) /*!< No operation */ +#define NVMC_ERASEUICR_ERASEUICR_Erase (1UL) /*!< Start erase of UICR */ + +/* Register: NVMC_ICACHECNF */ +/* Description: I-Code cache configuration register. */ + +/* Bit 8 : Cache profiling enable */ +#define NVMC_ICACHECNF_CACHEPROFEN_Pos (8UL) /*!< Position of CACHEPROFEN field. */ +#define NVMC_ICACHECNF_CACHEPROFEN_Msk (0x1UL << NVMC_ICACHECNF_CACHEPROFEN_Pos) /*!< Bit mask of CACHEPROFEN field. */ +#define NVMC_ICACHECNF_CACHEPROFEN_Disabled (0UL) /*!< Disable cache profiling */ +#define NVMC_ICACHECNF_CACHEPROFEN_Enabled (1UL) /*!< Enable cache profiling */ + +/* Bit 0 : Cache enable */ +#define NVMC_ICACHECNF_CACHEEN_Pos (0UL) /*!< Position of CACHEEN field. */ +#define NVMC_ICACHECNF_CACHEEN_Msk (0x1UL << NVMC_ICACHECNF_CACHEEN_Pos) /*!< Bit mask of CACHEEN field. */ +#define NVMC_ICACHECNF_CACHEEN_Disabled (0UL) /*!< Disable cache. Invalidates all cache entries. */ +#define NVMC_ICACHECNF_CACHEEN_Enabled (1UL) /*!< Enable cache */ + +/* Register: NVMC_IHIT */ +/* Description: I-Code cache hit counter. */ + +/* Bits 31..0 : Number of cache hits */ +#define NVMC_IHIT_HITS_Pos (0UL) /*!< Position of HITS field. */ +#define NVMC_IHIT_HITS_Msk (0xFFFFFFFFUL << NVMC_IHIT_HITS_Pos) /*!< Bit mask of HITS field. */ + +/* Register: NVMC_IMISS */ +/* Description: I-Code cache miss counter. */ + +/* Bits 31..0 : Number of cache misses */ +#define NVMC_IMISS_MISSES_Pos (0UL) /*!< Position of MISSES field. */ +#define NVMC_IMISS_MISSES_Msk (0xFFFFFFFFUL << NVMC_IMISS_MISSES_Pos) /*!< Bit mask of MISSES field. */ + + +/* Peripheral: GPIO */ +/* Description: GPIO Port 1 */ + +/* Register: GPIO_OUT */ +/* Description: Write GPIO port */ + +/* Bit 31 : P0.31 pin */ +#define GPIO_OUT_PIN31_Pos (31UL) /*!< Position of PIN31 field. */ +#define GPIO_OUT_PIN31_Msk (0x1UL << GPIO_OUT_PIN31_Pos) /*!< Bit mask of PIN31 field. */ +#define GPIO_OUT_PIN31_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN31_High (1UL) /*!< Pin driver is high */ + +/* Bit 30 : P0.30 pin */ +#define GPIO_OUT_PIN30_Pos (30UL) /*!< Position of PIN30 field. */ +#define GPIO_OUT_PIN30_Msk (0x1UL << GPIO_OUT_PIN30_Pos) /*!< Bit mask of PIN30 field. */ +#define GPIO_OUT_PIN30_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN30_High (1UL) /*!< Pin driver is high */ + +/* Bit 29 : P0.29 pin */ +#define GPIO_OUT_PIN29_Pos (29UL) /*!< Position of PIN29 field. */ +#define GPIO_OUT_PIN29_Msk (0x1UL << GPIO_OUT_PIN29_Pos) /*!< Bit mask of PIN29 field. */ +#define GPIO_OUT_PIN29_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN29_High (1UL) /*!< Pin driver is high */ + +/* Bit 28 : P0.28 pin */ +#define GPIO_OUT_PIN28_Pos (28UL) /*!< Position of PIN28 field. */ +#define GPIO_OUT_PIN28_Msk (0x1UL << GPIO_OUT_PIN28_Pos) /*!< Bit mask of PIN28 field. */ +#define GPIO_OUT_PIN28_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN28_High (1UL) /*!< Pin driver is high */ + +/* Bit 27 : P0.27 pin */ +#define GPIO_OUT_PIN27_Pos (27UL) /*!< Position of PIN27 field. */ +#define GPIO_OUT_PIN27_Msk (0x1UL << GPIO_OUT_PIN27_Pos) /*!< Bit mask of PIN27 field. */ +#define GPIO_OUT_PIN27_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN27_High (1UL) /*!< Pin driver is high */ + +/* Bit 26 : P0.26 pin */ +#define GPIO_OUT_PIN26_Pos (26UL) /*!< Position of PIN26 field. */ +#define GPIO_OUT_PIN26_Msk (0x1UL << GPIO_OUT_PIN26_Pos) /*!< Bit mask of PIN26 field. */ +#define GPIO_OUT_PIN26_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN26_High (1UL) /*!< Pin driver is high */ + +/* Bit 25 : P0.25 pin */ +#define GPIO_OUT_PIN25_Pos (25UL) /*!< Position of PIN25 field. */ +#define GPIO_OUT_PIN25_Msk (0x1UL << GPIO_OUT_PIN25_Pos) /*!< Bit mask of PIN25 field. */ +#define GPIO_OUT_PIN25_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN25_High (1UL) /*!< Pin driver is high */ + +/* Bit 24 : P0.24 pin */ +#define GPIO_OUT_PIN24_Pos (24UL) /*!< Position of PIN24 field. */ +#define GPIO_OUT_PIN24_Msk (0x1UL << GPIO_OUT_PIN24_Pos) /*!< Bit mask of PIN24 field. */ +#define GPIO_OUT_PIN24_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN24_High (1UL) /*!< Pin driver is high */ + +/* Bit 23 : P0.23 pin */ +#define GPIO_OUT_PIN23_Pos (23UL) /*!< Position of PIN23 field. */ +#define GPIO_OUT_PIN23_Msk (0x1UL << GPIO_OUT_PIN23_Pos) /*!< Bit mask of PIN23 field. */ +#define GPIO_OUT_PIN23_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN23_High (1UL) /*!< Pin driver is high */ + +/* Bit 22 : P0.22 pin */ +#define GPIO_OUT_PIN22_Pos (22UL) /*!< Position of PIN22 field. */ +#define GPIO_OUT_PIN22_Msk (0x1UL << GPIO_OUT_PIN22_Pos) /*!< Bit mask of PIN22 field. */ +#define GPIO_OUT_PIN22_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN22_High (1UL) /*!< Pin driver is high */ + +/* Bit 21 : P0.21 pin */ +#define GPIO_OUT_PIN21_Pos (21UL) /*!< Position of PIN21 field. */ +#define GPIO_OUT_PIN21_Msk (0x1UL << GPIO_OUT_PIN21_Pos) /*!< Bit mask of PIN21 field. */ +#define GPIO_OUT_PIN21_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN21_High (1UL) /*!< Pin driver is high */ + +/* Bit 20 : P0.20 pin */ +#define GPIO_OUT_PIN20_Pos (20UL) /*!< Position of PIN20 field. */ +#define GPIO_OUT_PIN20_Msk (0x1UL << GPIO_OUT_PIN20_Pos) /*!< Bit mask of PIN20 field. */ +#define GPIO_OUT_PIN20_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN20_High (1UL) /*!< Pin driver is high */ + +/* Bit 19 : P0.19 pin */ +#define GPIO_OUT_PIN19_Pos (19UL) /*!< Position of PIN19 field. */ +#define GPIO_OUT_PIN19_Msk (0x1UL << GPIO_OUT_PIN19_Pos) /*!< Bit mask of PIN19 field. */ +#define GPIO_OUT_PIN19_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN19_High (1UL) /*!< Pin driver is high */ + +/* Bit 18 : P0.18 pin */ +#define GPIO_OUT_PIN18_Pos (18UL) /*!< Position of PIN18 field. */ +#define GPIO_OUT_PIN18_Msk (0x1UL << GPIO_OUT_PIN18_Pos) /*!< Bit mask of PIN18 field. */ +#define GPIO_OUT_PIN18_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN18_High (1UL) /*!< Pin driver is high */ + +/* Bit 17 : P0.17 pin */ +#define GPIO_OUT_PIN17_Pos (17UL) /*!< Position of PIN17 field. */ +#define GPIO_OUT_PIN17_Msk (0x1UL << GPIO_OUT_PIN17_Pos) /*!< Bit mask of PIN17 field. */ +#define GPIO_OUT_PIN17_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN17_High (1UL) /*!< Pin driver is high */ + +/* Bit 16 : P0.16 pin */ +#define GPIO_OUT_PIN16_Pos (16UL) /*!< Position of PIN16 field. */ +#define GPIO_OUT_PIN16_Msk (0x1UL << GPIO_OUT_PIN16_Pos) /*!< Bit mask of PIN16 field. */ +#define GPIO_OUT_PIN16_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN16_High (1UL) /*!< Pin driver is high */ + +/* Bit 15 : P0.15 pin */ +#define GPIO_OUT_PIN15_Pos (15UL) /*!< Position of PIN15 field. */ +#define GPIO_OUT_PIN15_Msk (0x1UL << GPIO_OUT_PIN15_Pos) /*!< Bit mask of PIN15 field. */ +#define GPIO_OUT_PIN15_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN15_High (1UL) /*!< Pin driver is high */ + +/* Bit 14 : P0.14 pin */ +#define GPIO_OUT_PIN14_Pos (14UL) /*!< Position of PIN14 field. */ +#define GPIO_OUT_PIN14_Msk (0x1UL << GPIO_OUT_PIN14_Pos) /*!< Bit mask of PIN14 field. */ +#define GPIO_OUT_PIN14_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN14_High (1UL) /*!< Pin driver is high */ + +/* Bit 13 : P0.13 pin */ +#define GPIO_OUT_PIN13_Pos (13UL) /*!< Position of PIN13 field. */ +#define GPIO_OUT_PIN13_Msk (0x1UL << GPIO_OUT_PIN13_Pos) /*!< Bit mask of PIN13 field. */ +#define GPIO_OUT_PIN13_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN13_High (1UL) /*!< Pin driver is high */ + +/* Bit 12 : P0.12 pin */ +#define GPIO_OUT_PIN12_Pos (12UL) /*!< Position of PIN12 field. */ +#define GPIO_OUT_PIN12_Msk (0x1UL << GPIO_OUT_PIN12_Pos) /*!< Bit mask of PIN12 field. */ +#define GPIO_OUT_PIN12_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN12_High (1UL) /*!< Pin driver is high */ + +/* Bit 11 : P0.11 pin */ +#define GPIO_OUT_PIN11_Pos (11UL) /*!< Position of PIN11 field. */ +#define GPIO_OUT_PIN11_Msk (0x1UL << GPIO_OUT_PIN11_Pos) /*!< Bit mask of PIN11 field. */ +#define GPIO_OUT_PIN11_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN11_High (1UL) /*!< Pin driver is high */ + +/* Bit 10 : P0.10 pin */ +#define GPIO_OUT_PIN10_Pos (10UL) /*!< Position of PIN10 field. */ +#define GPIO_OUT_PIN10_Msk (0x1UL << GPIO_OUT_PIN10_Pos) /*!< Bit mask of PIN10 field. */ +#define GPIO_OUT_PIN10_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN10_High (1UL) /*!< Pin driver is high */ + +/* Bit 9 : P0.9 pin */ +#define GPIO_OUT_PIN9_Pos (9UL) /*!< Position of PIN9 field. */ +#define GPIO_OUT_PIN9_Msk (0x1UL << GPIO_OUT_PIN9_Pos) /*!< Bit mask of PIN9 field. */ +#define GPIO_OUT_PIN9_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN9_High (1UL) /*!< Pin driver is high */ + +/* Bit 8 : P0.8 pin */ +#define GPIO_OUT_PIN8_Pos (8UL) /*!< Position of PIN8 field. */ +#define GPIO_OUT_PIN8_Msk (0x1UL << GPIO_OUT_PIN8_Pos) /*!< Bit mask of PIN8 field. */ +#define GPIO_OUT_PIN8_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN8_High (1UL) /*!< Pin driver is high */ + +/* Bit 7 : P0.7 pin */ +#define GPIO_OUT_PIN7_Pos (7UL) /*!< Position of PIN7 field. */ +#define GPIO_OUT_PIN7_Msk (0x1UL << GPIO_OUT_PIN7_Pos) /*!< Bit mask of PIN7 field. */ +#define GPIO_OUT_PIN7_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN7_High (1UL) /*!< Pin driver is high */ + +/* Bit 6 : P0.6 pin */ +#define GPIO_OUT_PIN6_Pos (6UL) /*!< Position of PIN6 field. */ +#define GPIO_OUT_PIN6_Msk (0x1UL << GPIO_OUT_PIN6_Pos) /*!< Bit mask of PIN6 field. */ +#define GPIO_OUT_PIN6_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN6_High (1UL) /*!< Pin driver is high */ + +/* Bit 5 : P0.5 pin */ +#define GPIO_OUT_PIN5_Pos (5UL) /*!< Position of PIN5 field. */ +#define GPIO_OUT_PIN5_Msk (0x1UL << GPIO_OUT_PIN5_Pos) /*!< Bit mask of PIN5 field. */ +#define GPIO_OUT_PIN5_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN5_High (1UL) /*!< Pin driver is high */ + +/* Bit 4 : P0.4 pin */ +#define GPIO_OUT_PIN4_Pos (4UL) /*!< Position of PIN4 field. */ +#define GPIO_OUT_PIN4_Msk (0x1UL << GPIO_OUT_PIN4_Pos) /*!< Bit mask of PIN4 field. */ +#define GPIO_OUT_PIN4_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN4_High (1UL) /*!< Pin driver is high */ + +/* Bit 3 : P0.3 pin */ +#define GPIO_OUT_PIN3_Pos (3UL) /*!< Position of PIN3 field. */ +#define GPIO_OUT_PIN3_Msk (0x1UL << GPIO_OUT_PIN3_Pos) /*!< Bit mask of PIN3 field. */ +#define GPIO_OUT_PIN3_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN3_High (1UL) /*!< Pin driver is high */ + +/* Bit 2 : P0.2 pin */ +#define GPIO_OUT_PIN2_Pos (2UL) /*!< Position of PIN2 field. */ +#define GPIO_OUT_PIN2_Msk (0x1UL << GPIO_OUT_PIN2_Pos) /*!< Bit mask of PIN2 field. */ +#define GPIO_OUT_PIN2_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN2_High (1UL) /*!< Pin driver is high */ + +/* Bit 1 : P0.1 pin */ +#define GPIO_OUT_PIN1_Pos (1UL) /*!< Position of PIN1 field. */ +#define GPIO_OUT_PIN1_Msk (0x1UL << GPIO_OUT_PIN1_Pos) /*!< Bit mask of PIN1 field. */ +#define GPIO_OUT_PIN1_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN1_High (1UL) /*!< Pin driver is high */ + +/* Bit 0 : P0.0 pin */ +#define GPIO_OUT_PIN0_Pos (0UL) /*!< Position of PIN0 field. */ +#define GPIO_OUT_PIN0_Msk (0x1UL << GPIO_OUT_PIN0_Pos) /*!< Bit mask of PIN0 field. */ +#define GPIO_OUT_PIN0_Low (0UL) /*!< Pin driver is low */ +#define GPIO_OUT_PIN0_High (1UL) /*!< Pin driver is high */ + +/* Register: GPIO_OUTSET */ +/* Description: Set individual bits in GPIO port */ + +/* Bit 31 : P0.31 pin */ +#define GPIO_OUTSET_PIN31_Pos (31UL) /*!< Position of PIN31 field. */ +#define GPIO_OUTSET_PIN31_Msk (0x1UL << GPIO_OUTSET_PIN31_Pos) /*!< Bit mask of PIN31 field. */ +#define GPIO_OUTSET_PIN31_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN31_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN31_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 30 : P0.30 pin */ +#define GPIO_OUTSET_PIN30_Pos (30UL) /*!< Position of PIN30 field. */ +#define GPIO_OUTSET_PIN30_Msk (0x1UL << GPIO_OUTSET_PIN30_Pos) /*!< Bit mask of PIN30 field. */ +#define GPIO_OUTSET_PIN30_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN30_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN30_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 29 : P0.29 pin */ +#define GPIO_OUTSET_PIN29_Pos (29UL) /*!< Position of PIN29 field. */ +#define GPIO_OUTSET_PIN29_Msk (0x1UL << GPIO_OUTSET_PIN29_Pos) /*!< Bit mask of PIN29 field. */ +#define GPIO_OUTSET_PIN29_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN29_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN29_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 28 : P0.28 pin */ +#define GPIO_OUTSET_PIN28_Pos (28UL) /*!< Position of PIN28 field. */ +#define GPIO_OUTSET_PIN28_Msk (0x1UL << GPIO_OUTSET_PIN28_Pos) /*!< Bit mask of PIN28 field. */ +#define GPIO_OUTSET_PIN28_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN28_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN28_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 27 : P0.27 pin */ +#define GPIO_OUTSET_PIN27_Pos (27UL) /*!< Position of PIN27 field. */ +#define GPIO_OUTSET_PIN27_Msk (0x1UL << GPIO_OUTSET_PIN27_Pos) /*!< Bit mask of PIN27 field. */ +#define GPIO_OUTSET_PIN27_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN27_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN27_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 26 : P0.26 pin */ +#define GPIO_OUTSET_PIN26_Pos (26UL) /*!< Position of PIN26 field. */ +#define GPIO_OUTSET_PIN26_Msk (0x1UL << GPIO_OUTSET_PIN26_Pos) /*!< Bit mask of PIN26 field. */ +#define GPIO_OUTSET_PIN26_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN26_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN26_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 25 : P0.25 pin */ +#define GPIO_OUTSET_PIN25_Pos (25UL) /*!< Position of PIN25 field. */ +#define GPIO_OUTSET_PIN25_Msk (0x1UL << GPIO_OUTSET_PIN25_Pos) /*!< Bit mask of PIN25 field. */ +#define GPIO_OUTSET_PIN25_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN25_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN25_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 24 : P0.24 pin */ +#define GPIO_OUTSET_PIN24_Pos (24UL) /*!< Position of PIN24 field. */ +#define GPIO_OUTSET_PIN24_Msk (0x1UL << GPIO_OUTSET_PIN24_Pos) /*!< Bit mask of PIN24 field. */ +#define GPIO_OUTSET_PIN24_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN24_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN24_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 23 : P0.23 pin */ +#define GPIO_OUTSET_PIN23_Pos (23UL) /*!< Position of PIN23 field. */ +#define GPIO_OUTSET_PIN23_Msk (0x1UL << GPIO_OUTSET_PIN23_Pos) /*!< Bit mask of PIN23 field. */ +#define GPIO_OUTSET_PIN23_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN23_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN23_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 22 : P0.22 pin */ +#define GPIO_OUTSET_PIN22_Pos (22UL) /*!< Position of PIN22 field. */ +#define GPIO_OUTSET_PIN22_Msk (0x1UL << GPIO_OUTSET_PIN22_Pos) /*!< Bit mask of PIN22 field. */ +#define GPIO_OUTSET_PIN22_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN22_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN22_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 21 : P0.21 pin */ +#define GPIO_OUTSET_PIN21_Pos (21UL) /*!< Position of PIN21 field. */ +#define GPIO_OUTSET_PIN21_Msk (0x1UL << GPIO_OUTSET_PIN21_Pos) /*!< Bit mask of PIN21 field. */ +#define GPIO_OUTSET_PIN21_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN21_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN21_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 20 : P0.20 pin */ +#define GPIO_OUTSET_PIN20_Pos (20UL) /*!< Position of PIN20 field. */ +#define GPIO_OUTSET_PIN20_Msk (0x1UL << GPIO_OUTSET_PIN20_Pos) /*!< Bit mask of PIN20 field. */ +#define GPIO_OUTSET_PIN20_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN20_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN20_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 19 : P0.19 pin */ +#define GPIO_OUTSET_PIN19_Pos (19UL) /*!< Position of PIN19 field. */ +#define GPIO_OUTSET_PIN19_Msk (0x1UL << GPIO_OUTSET_PIN19_Pos) /*!< Bit mask of PIN19 field. */ +#define GPIO_OUTSET_PIN19_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN19_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN19_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 18 : P0.18 pin */ +#define GPIO_OUTSET_PIN18_Pos (18UL) /*!< Position of PIN18 field. */ +#define GPIO_OUTSET_PIN18_Msk (0x1UL << GPIO_OUTSET_PIN18_Pos) /*!< Bit mask of PIN18 field. */ +#define GPIO_OUTSET_PIN18_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN18_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN18_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 17 : P0.17 pin */ +#define GPIO_OUTSET_PIN17_Pos (17UL) /*!< Position of PIN17 field. */ +#define GPIO_OUTSET_PIN17_Msk (0x1UL << GPIO_OUTSET_PIN17_Pos) /*!< Bit mask of PIN17 field. */ +#define GPIO_OUTSET_PIN17_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN17_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN17_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 16 : P0.16 pin */ +#define GPIO_OUTSET_PIN16_Pos (16UL) /*!< Position of PIN16 field. */ +#define GPIO_OUTSET_PIN16_Msk (0x1UL << GPIO_OUTSET_PIN16_Pos) /*!< Bit mask of PIN16 field. */ +#define GPIO_OUTSET_PIN16_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN16_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN16_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 15 : P0.15 pin */ +#define GPIO_OUTSET_PIN15_Pos (15UL) /*!< Position of PIN15 field. */ +#define GPIO_OUTSET_PIN15_Msk (0x1UL << GPIO_OUTSET_PIN15_Pos) /*!< Bit mask of PIN15 field. */ +#define GPIO_OUTSET_PIN15_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN15_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN15_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 14 : P0.14 pin */ +#define GPIO_OUTSET_PIN14_Pos (14UL) /*!< Position of PIN14 field. */ +#define GPIO_OUTSET_PIN14_Msk (0x1UL << GPIO_OUTSET_PIN14_Pos) /*!< Bit mask of PIN14 field. */ +#define GPIO_OUTSET_PIN14_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN14_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN14_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 13 : P0.13 pin */ +#define GPIO_OUTSET_PIN13_Pos (13UL) /*!< Position of PIN13 field. */ +#define GPIO_OUTSET_PIN13_Msk (0x1UL << GPIO_OUTSET_PIN13_Pos) /*!< Bit mask of PIN13 field. */ +#define GPIO_OUTSET_PIN13_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN13_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN13_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 12 : P0.12 pin */ +#define GPIO_OUTSET_PIN12_Pos (12UL) /*!< Position of PIN12 field. */ +#define GPIO_OUTSET_PIN12_Msk (0x1UL << GPIO_OUTSET_PIN12_Pos) /*!< Bit mask of PIN12 field. */ +#define GPIO_OUTSET_PIN12_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN12_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN12_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 11 : P0.11 pin */ +#define GPIO_OUTSET_PIN11_Pos (11UL) /*!< Position of PIN11 field. */ +#define GPIO_OUTSET_PIN11_Msk (0x1UL << GPIO_OUTSET_PIN11_Pos) /*!< Bit mask of PIN11 field. */ +#define GPIO_OUTSET_PIN11_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN11_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN11_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 10 : P0.10 pin */ +#define GPIO_OUTSET_PIN10_Pos (10UL) /*!< Position of PIN10 field. */ +#define GPIO_OUTSET_PIN10_Msk (0x1UL << GPIO_OUTSET_PIN10_Pos) /*!< Bit mask of PIN10 field. */ +#define GPIO_OUTSET_PIN10_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN10_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN10_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 9 : P0.9 pin */ +#define GPIO_OUTSET_PIN9_Pos (9UL) /*!< Position of PIN9 field. */ +#define GPIO_OUTSET_PIN9_Msk (0x1UL << GPIO_OUTSET_PIN9_Pos) /*!< Bit mask of PIN9 field. */ +#define GPIO_OUTSET_PIN9_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN9_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN9_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 8 : P0.8 pin */ +#define GPIO_OUTSET_PIN8_Pos (8UL) /*!< Position of PIN8 field. */ +#define GPIO_OUTSET_PIN8_Msk (0x1UL << GPIO_OUTSET_PIN8_Pos) /*!< Bit mask of PIN8 field. */ +#define GPIO_OUTSET_PIN8_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN8_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN8_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 7 : P0.7 pin */ +#define GPIO_OUTSET_PIN7_Pos (7UL) /*!< Position of PIN7 field. */ +#define GPIO_OUTSET_PIN7_Msk (0x1UL << GPIO_OUTSET_PIN7_Pos) /*!< Bit mask of PIN7 field. */ +#define GPIO_OUTSET_PIN7_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN7_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN7_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 6 : P0.6 pin */ +#define GPIO_OUTSET_PIN6_Pos (6UL) /*!< Position of PIN6 field. */ +#define GPIO_OUTSET_PIN6_Msk (0x1UL << GPIO_OUTSET_PIN6_Pos) /*!< Bit mask of PIN6 field. */ +#define GPIO_OUTSET_PIN6_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN6_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN6_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 5 : P0.5 pin */ +#define GPIO_OUTSET_PIN5_Pos (5UL) /*!< Position of PIN5 field. */ +#define GPIO_OUTSET_PIN5_Msk (0x1UL << GPIO_OUTSET_PIN5_Pos) /*!< Bit mask of PIN5 field. */ +#define GPIO_OUTSET_PIN5_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN5_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN5_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 4 : P0.4 pin */ +#define GPIO_OUTSET_PIN4_Pos (4UL) /*!< Position of PIN4 field. */ +#define GPIO_OUTSET_PIN4_Msk (0x1UL << GPIO_OUTSET_PIN4_Pos) /*!< Bit mask of PIN4 field. */ +#define GPIO_OUTSET_PIN4_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN4_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN4_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 3 : P0.3 pin */ +#define GPIO_OUTSET_PIN3_Pos (3UL) /*!< Position of PIN3 field. */ +#define GPIO_OUTSET_PIN3_Msk (0x1UL << GPIO_OUTSET_PIN3_Pos) /*!< Bit mask of PIN3 field. */ +#define GPIO_OUTSET_PIN3_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN3_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN3_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 2 : P0.2 pin */ +#define GPIO_OUTSET_PIN2_Pos (2UL) /*!< Position of PIN2 field. */ +#define GPIO_OUTSET_PIN2_Msk (0x1UL << GPIO_OUTSET_PIN2_Pos) /*!< Bit mask of PIN2 field. */ +#define GPIO_OUTSET_PIN2_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN2_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN2_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 1 : P0.1 pin */ +#define GPIO_OUTSET_PIN1_Pos (1UL) /*!< Position of PIN1 field. */ +#define GPIO_OUTSET_PIN1_Msk (0x1UL << GPIO_OUTSET_PIN1_Pos) /*!< Bit mask of PIN1 field. */ +#define GPIO_OUTSET_PIN1_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN1_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN1_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Bit 0 : P0.0 pin */ +#define GPIO_OUTSET_PIN0_Pos (0UL) /*!< Position of PIN0 field. */ +#define GPIO_OUTSET_PIN0_Msk (0x1UL << GPIO_OUTSET_PIN0_Pos) /*!< Bit mask of PIN0 field. */ +#define GPIO_OUTSET_PIN0_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTSET_PIN0_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTSET_PIN0_Set (1UL) /*!< Write: writing a '1' sets the pin high; writing a '0' has no effect */ + +/* Register: GPIO_OUTCLR */ +/* Description: Clear individual bits in GPIO port */ + +/* Bit 31 : P0.31 pin */ +#define GPIO_OUTCLR_PIN31_Pos (31UL) /*!< Position of PIN31 field. */ +#define GPIO_OUTCLR_PIN31_Msk (0x1UL << GPIO_OUTCLR_PIN31_Pos) /*!< Bit mask of PIN31 field. */ +#define GPIO_OUTCLR_PIN31_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN31_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN31_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 30 : P0.30 pin */ +#define GPIO_OUTCLR_PIN30_Pos (30UL) /*!< Position of PIN30 field. */ +#define GPIO_OUTCLR_PIN30_Msk (0x1UL << GPIO_OUTCLR_PIN30_Pos) /*!< Bit mask of PIN30 field. */ +#define GPIO_OUTCLR_PIN30_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN30_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN30_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 29 : P0.29 pin */ +#define GPIO_OUTCLR_PIN29_Pos (29UL) /*!< Position of PIN29 field. */ +#define GPIO_OUTCLR_PIN29_Msk (0x1UL << GPIO_OUTCLR_PIN29_Pos) /*!< Bit mask of PIN29 field. */ +#define GPIO_OUTCLR_PIN29_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN29_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN29_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 28 : P0.28 pin */ +#define GPIO_OUTCLR_PIN28_Pos (28UL) /*!< Position of PIN28 field. */ +#define GPIO_OUTCLR_PIN28_Msk (0x1UL << GPIO_OUTCLR_PIN28_Pos) /*!< Bit mask of PIN28 field. */ +#define GPIO_OUTCLR_PIN28_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN28_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN28_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 27 : P0.27 pin */ +#define GPIO_OUTCLR_PIN27_Pos (27UL) /*!< Position of PIN27 field. */ +#define GPIO_OUTCLR_PIN27_Msk (0x1UL << GPIO_OUTCLR_PIN27_Pos) /*!< Bit mask of PIN27 field. */ +#define GPIO_OUTCLR_PIN27_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN27_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN27_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 26 : P0.26 pin */ +#define GPIO_OUTCLR_PIN26_Pos (26UL) /*!< Position of PIN26 field. */ +#define GPIO_OUTCLR_PIN26_Msk (0x1UL << GPIO_OUTCLR_PIN26_Pos) /*!< Bit mask of PIN26 field. */ +#define GPIO_OUTCLR_PIN26_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN26_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN26_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 25 : P0.25 pin */ +#define GPIO_OUTCLR_PIN25_Pos (25UL) /*!< Position of PIN25 field. */ +#define GPIO_OUTCLR_PIN25_Msk (0x1UL << GPIO_OUTCLR_PIN25_Pos) /*!< Bit mask of PIN25 field. */ +#define GPIO_OUTCLR_PIN25_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN25_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN25_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 24 : P0.24 pin */ +#define GPIO_OUTCLR_PIN24_Pos (24UL) /*!< Position of PIN24 field. */ +#define GPIO_OUTCLR_PIN24_Msk (0x1UL << GPIO_OUTCLR_PIN24_Pos) /*!< Bit mask of PIN24 field. */ +#define GPIO_OUTCLR_PIN24_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN24_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN24_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 23 : P0.23 pin */ +#define GPIO_OUTCLR_PIN23_Pos (23UL) /*!< Position of PIN23 field. */ +#define GPIO_OUTCLR_PIN23_Msk (0x1UL << GPIO_OUTCLR_PIN23_Pos) /*!< Bit mask of PIN23 field. */ +#define GPIO_OUTCLR_PIN23_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN23_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN23_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 22 : P0.22 pin */ +#define GPIO_OUTCLR_PIN22_Pos (22UL) /*!< Position of PIN22 field. */ +#define GPIO_OUTCLR_PIN22_Msk (0x1UL << GPIO_OUTCLR_PIN22_Pos) /*!< Bit mask of PIN22 field. */ +#define GPIO_OUTCLR_PIN22_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN22_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN22_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 21 : P0.21 pin */ +#define GPIO_OUTCLR_PIN21_Pos (21UL) /*!< Position of PIN21 field. */ +#define GPIO_OUTCLR_PIN21_Msk (0x1UL << GPIO_OUTCLR_PIN21_Pos) /*!< Bit mask of PIN21 field. */ +#define GPIO_OUTCLR_PIN21_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN21_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN21_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 20 : P0.20 pin */ +#define GPIO_OUTCLR_PIN20_Pos (20UL) /*!< Position of PIN20 field. */ +#define GPIO_OUTCLR_PIN20_Msk (0x1UL << GPIO_OUTCLR_PIN20_Pos) /*!< Bit mask of PIN20 field. */ +#define GPIO_OUTCLR_PIN20_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN20_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN20_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 19 : P0.19 pin */ +#define GPIO_OUTCLR_PIN19_Pos (19UL) /*!< Position of PIN19 field. */ +#define GPIO_OUTCLR_PIN19_Msk (0x1UL << GPIO_OUTCLR_PIN19_Pos) /*!< Bit mask of PIN19 field. */ +#define GPIO_OUTCLR_PIN19_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN19_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN19_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 18 : P0.18 pin */ +#define GPIO_OUTCLR_PIN18_Pos (18UL) /*!< Position of PIN18 field. */ +#define GPIO_OUTCLR_PIN18_Msk (0x1UL << GPIO_OUTCLR_PIN18_Pos) /*!< Bit mask of PIN18 field. */ +#define GPIO_OUTCLR_PIN18_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN18_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN18_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 17 : P0.17 pin */ +#define GPIO_OUTCLR_PIN17_Pos (17UL) /*!< Position of PIN17 field. */ +#define GPIO_OUTCLR_PIN17_Msk (0x1UL << GPIO_OUTCLR_PIN17_Pos) /*!< Bit mask of PIN17 field. */ +#define GPIO_OUTCLR_PIN17_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN17_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN17_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 16 : P0.16 pin */ +#define GPIO_OUTCLR_PIN16_Pos (16UL) /*!< Position of PIN16 field. */ +#define GPIO_OUTCLR_PIN16_Msk (0x1UL << GPIO_OUTCLR_PIN16_Pos) /*!< Bit mask of PIN16 field. */ +#define GPIO_OUTCLR_PIN16_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN16_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN16_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 15 : P0.15 pin */ +#define GPIO_OUTCLR_PIN15_Pos (15UL) /*!< Position of PIN15 field. */ +#define GPIO_OUTCLR_PIN15_Msk (0x1UL << GPIO_OUTCLR_PIN15_Pos) /*!< Bit mask of PIN15 field. */ +#define GPIO_OUTCLR_PIN15_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN15_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN15_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 14 : P0.14 pin */ +#define GPIO_OUTCLR_PIN14_Pos (14UL) /*!< Position of PIN14 field. */ +#define GPIO_OUTCLR_PIN14_Msk (0x1UL << GPIO_OUTCLR_PIN14_Pos) /*!< Bit mask of PIN14 field. */ +#define GPIO_OUTCLR_PIN14_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN14_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN14_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 13 : P0.13 pin */ +#define GPIO_OUTCLR_PIN13_Pos (13UL) /*!< Position of PIN13 field. */ +#define GPIO_OUTCLR_PIN13_Msk (0x1UL << GPIO_OUTCLR_PIN13_Pos) /*!< Bit mask of PIN13 field. */ +#define GPIO_OUTCLR_PIN13_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN13_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN13_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 12 : P0.12 pin */ +#define GPIO_OUTCLR_PIN12_Pos (12UL) /*!< Position of PIN12 field. */ +#define GPIO_OUTCLR_PIN12_Msk (0x1UL << GPIO_OUTCLR_PIN12_Pos) /*!< Bit mask of PIN12 field. */ +#define GPIO_OUTCLR_PIN12_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN12_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN12_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 11 : P0.11 pin */ +#define GPIO_OUTCLR_PIN11_Pos (11UL) /*!< Position of PIN11 field. */ +#define GPIO_OUTCLR_PIN11_Msk (0x1UL << GPIO_OUTCLR_PIN11_Pos) /*!< Bit mask of PIN11 field. */ +#define GPIO_OUTCLR_PIN11_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN11_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN11_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 10 : P0.10 pin */ +#define GPIO_OUTCLR_PIN10_Pos (10UL) /*!< Position of PIN10 field. */ +#define GPIO_OUTCLR_PIN10_Msk (0x1UL << GPIO_OUTCLR_PIN10_Pos) /*!< Bit mask of PIN10 field. */ +#define GPIO_OUTCLR_PIN10_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN10_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN10_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 9 : P0.9 pin */ +#define GPIO_OUTCLR_PIN9_Pos (9UL) /*!< Position of PIN9 field. */ +#define GPIO_OUTCLR_PIN9_Msk (0x1UL << GPIO_OUTCLR_PIN9_Pos) /*!< Bit mask of PIN9 field. */ +#define GPIO_OUTCLR_PIN9_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN9_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN9_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 8 : P0.8 pin */ +#define GPIO_OUTCLR_PIN8_Pos (8UL) /*!< Position of PIN8 field. */ +#define GPIO_OUTCLR_PIN8_Msk (0x1UL << GPIO_OUTCLR_PIN8_Pos) /*!< Bit mask of PIN8 field. */ +#define GPIO_OUTCLR_PIN8_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN8_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN8_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 7 : P0.7 pin */ +#define GPIO_OUTCLR_PIN7_Pos (7UL) /*!< Position of PIN7 field. */ +#define GPIO_OUTCLR_PIN7_Msk (0x1UL << GPIO_OUTCLR_PIN7_Pos) /*!< Bit mask of PIN7 field. */ +#define GPIO_OUTCLR_PIN7_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN7_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN7_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 6 : P0.6 pin */ +#define GPIO_OUTCLR_PIN6_Pos (6UL) /*!< Position of PIN6 field. */ +#define GPIO_OUTCLR_PIN6_Msk (0x1UL << GPIO_OUTCLR_PIN6_Pos) /*!< Bit mask of PIN6 field. */ +#define GPIO_OUTCLR_PIN6_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN6_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN6_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 5 : P0.5 pin */ +#define GPIO_OUTCLR_PIN5_Pos (5UL) /*!< Position of PIN5 field. */ +#define GPIO_OUTCLR_PIN5_Msk (0x1UL << GPIO_OUTCLR_PIN5_Pos) /*!< Bit mask of PIN5 field. */ +#define GPIO_OUTCLR_PIN5_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN5_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN5_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 4 : P0.4 pin */ +#define GPIO_OUTCLR_PIN4_Pos (4UL) /*!< Position of PIN4 field. */ +#define GPIO_OUTCLR_PIN4_Msk (0x1UL << GPIO_OUTCLR_PIN4_Pos) /*!< Bit mask of PIN4 field. */ +#define GPIO_OUTCLR_PIN4_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN4_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN4_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 3 : P0.3 pin */ +#define GPIO_OUTCLR_PIN3_Pos (3UL) /*!< Position of PIN3 field. */ +#define GPIO_OUTCLR_PIN3_Msk (0x1UL << GPIO_OUTCLR_PIN3_Pos) /*!< Bit mask of PIN3 field. */ +#define GPIO_OUTCLR_PIN3_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN3_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN3_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 2 : P0.2 pin */ +#define GPIO_OUTCLR_PIN2_Pos (2UL) /*!< Position of PIN2 field. */ +#define GPIO_OUTCLR_PIN2_Msk (0x1UL << GPIO_OUTCLR_PIN2_Pos) /*!< Bit mask of PIN2 field. */ +#define GPIO_OUTCLR_PIN2_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN2_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN2_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 1 : P0.1 pin */ +#define GPIO_OUTCLR_PIN1_Pos (1UL) /*!< Position of PIN1 field. */ +#define GPIO_OUTCLR_PIN1_Msk (0x1UL << GPIO_OUTCLR_PIN1_Pos) /*!< Bit mask of PIN1 field. */ +#define GPIO_OUTCLR_PIN1_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN1_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN1_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Bit 0 : P0.0 pin */ +#define GPIO_OUTCLR_PIN0_Pos (0UL) /*!< Position of PIN0 field. */ +#define GPIO_OUTCLR_PIN0_Msk (0x1UL << GPIO_OUTCLR_PIN0_Pos) /*!< Bit mask of PIN0 field. */ +#define GPIO_OUTCLR_PIN0_Low (0UL) /*!< Read: pin driver is low */ +#define GPIO_OUTCLR_PIN0_High (1UL) /*!< Read: pin driver is high */ +#define GPIO_OUTCLR_PIN0_Clear (1UL) /*!< Write: writing a '1' sets the pin low; writing a '0' has no effect */ + +/* Register: GPIO_IN */ +/* Description: Read GPIO port */ + +/* Bit 31 : P0.31 pin */ +#define GPIO_IN_PIN31_Pos (31UL) /*!< Position of PIN31 field. */ +#define GPIO_IN_PIN31_Msk (0x1UL << GPIO_IN_PIN31_Pos) /*!< Bit mask of PIN31 field. */ +#define GPIO_IN_PIN31_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN31_High (1UL) /*!< Pin input is high */ + +/* Bit 30 : P0.30 pin */ +#define GPIO_IN_PIN30_Pos (30UL) /*!< Position of PIN30 field. */ +#define GPIO_IN_PIN30_Msk (0x1UL << GPIO_IN_PIN30_Pos) /*!< Bit mask of PIN30 field. */ +#define GPIO_IN_PIN30_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN30_High (1UL) /*!< Pin input is high */ + +/* Bit 29 : P0.29 pin */ +#define GPIO_IN_PIN29_Pos (29UL) /*!< Position of PIN29 field. */ +#define GPIO_IN_PIN29_Msk (0x1UL << GPIO_IN_PIN29_Pos) /*!< Bit mask of PIN29 field. */ +#define GPIO_IN_PIN29_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN29_High (1UL) /*!< Pin input is high */ + +/* Bit 28 : P0.28 pin */ +#define GPIO_IN_PIN28_Pos (28UL) /*!< Position of PIN28 field. */ +#define GPIO_IN_PIN28_Msk (0x1UL << GPIO_IN_PIN28_Pos) /*!< Bit mask of PIN28 field. */ +#define GPIO_IN_PIN28_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN28_High (1UL) /*!< Pin input is high */ + +/* Bit 27 : P0.27 pin */ +#define GPIO_IN_PIN27_Pos (27UL) /*!< Position of PIN27 field. */ +#define GPIO_IN_PIN27_Msk (0x1UL << GPIO_IN_PIN27_Pos) /*!< Bit mask of PIN27 field. */ +#define GPIO_IN_PIN27_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN27_High (1UL) /*!< Pin input is high */ + +/* Bit 26 : P0.26 pin */ +#define GPIO_IN_PIN26_Pos (26UL) /*!< Position of PIN26 field. */ +#define GPIO_IN_PIN26_Msk (0x1UL << GPIO_IN_PIN26_Pos) /*!< Bit mask of PIN26 field. */ +#define GPIO_IN_PIN26_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN26_High (1UL) /*!< Pin input is high */ + +/* Bit 25 : P0.25 pin */ +#define GPIO_IN_PIN25_Pos (25UL) /*!< Position of PIN25 field. */ +#define GPIO_IN_PIN25_Msk (0x1UL << GPIO_IN_PIN25_Pos) /*!< Bit mask of PIN25 field. */ +#define GPIO_IN_PIN25_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN25_High (1UL) /*!< Pin input is high */ + +/* Bit 24 : P0.24 pin */ +#define GPIO_IN_PIN24_Pos (24UL) /*!< Position of PIN24 field. */ +#define GPIO_IN_PIN24_Msk (0x1UL << GPIO_IN_PIN24_Pos) /*!< Bit mask of PIN24 field. */ +#define GPIO_IN_PIN24_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN24_High (1UL) /*!< Pin input is high */ + +/* Bit 23 : P0.23 pin */ +#define GPIO_IN_PIN23_Pos (23UL) /*!< Position of PIN23 field. */ +#define GPIO_IN_PIN23_Msk (0x1UL << GPIO_IN_PIN23_Pos) /*!< Bit mask of PIN23 field. */ +#define GPIO_IN_PIN23_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN23_High (1UL) /*!< Pin input is high */ + +/* Bit 22 : P0.22 pin */ +#define GPIO_IN_PIN22_Pos (22UL) /*!< Position of PIN22 field. */ +#define GPIO_IN_PIN22_Msk (0x1UL << GPIO_IN_PIN22_Pos) /*!< Bit mask of PIN22 field. */ +#define GPIO_IN_PIN22_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN22_High (1UL) /*!< Pin input is high */ + +/* Bit 21 : P0.21 pin */ +#define GPIO_IN_PIN21_Pos (21UL) /*!< Position of PIN21 field. */ +#define GPIO_IN_PIN21_Msk (0x1UL << GPIO_IN_PIN21_Pos) /*!< Bit mask of PIN21 field. */ +#define GPIO_IN_PIN21_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN21_High (1UL) /*!< Pin input is high */ + +/* Bit 20 : P0.20 pin */ +#define GPIO_IN_PIN20_Pos (20UL) /*!< Position of PIN20 field. */ +#define GPIO_IN_PIN20_Msk (0x1UL << GPIO_IN_PIN20_Pos) /*!< Bit mask of PIN20 field. */ +#define GPIO_IN_PIN20_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN20_High (1UL) /*!< Pin input is high */ + +/* Bit 19 : P0.19 pin */ +#define GPIO_IN_PIN19_Pos (19UL) /*!< Position of PIN19 field. */ +#define GPIO_IN_PIN19_Msk (0x1UL << GPIO_IN_PIN19_Pos) /*!< Bit mask of PIN19 field. */ +#define GPIO_IN_PIN19_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN19_High (1UL) /*!< Pin input is high */ + +/* Bit 18 : P0.18 pin */ +#define GPIO_IN_PIN18_Pos (18UL) /*!< Position of PIN18 field. */ +#define GPIO_IN_PIN18_Msk (0x1UL << GPIO_IN_PIN18_Pos) /*!< Bit mask of PIN18 field. */ +#define GPIO_IN_PIN18_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN18_High (1UL) /*!< Pin input is high */ + +/* Bit 17 : P0.17 pin */ +#define GPIO_IN_PIN17_Pos (17UL) /*!< Position of PIN17 field. */ +#define GPIO_IN_PIN17_Msk (0x1UL << GPIO_IN_PIN17_Pos) /*!< Bit mask of PIN17 field. */ +#define GPIO_IN_PIN17_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN17_High (1UL) /*!< Pin input is high */ + +/* Bit 16 : P0.16 pin */ +#define GPIO_IN_PIN16_Pos (16UL) /*!< Position of PIN16 field. */ +#define GPIO_IN_PIN16_Msk (0x1UL << GPIO_IN_PIN16_Pos) /*!< Bit mask of PIN16 field. */ +#define GPIO_IN_PIN16_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN16_High (1UL) /*!< Pin input is high */ + +/* Bit 15 : P0.15 pin */ +#define GPIO_IN_PIN15_Pos (15UL) /*!< Position of PIN15 field. */ +#define GPIO_IN_PIN15_Msk (0x1UL << GPIO_IN_PIN15_Pos) /*!< Bit mask of PIN15 field. */ +#define GPIO_IN_PIN15_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN15_High (1UL) /*!< Pin input is high */ + +/* Bit 14 : P0.14 pin */ +#define GPIO_IN_PIN14_Pos (14UL) /*!< Position of PIN14 field. */ +#define GPIO_IN_PIN14_Msk (0x1UL << GPIO_IN_PIN14_Pos) /*!< Bit mask of PIN14 field. */ +#define GPIO_IN_PIN14_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN14_High (1UL) /*!< Pin input is high */ + +/* Bit 13 : P0.13 pin */ +#define GPIO_IN_PIN13_Pos (13UL) /*!< Position of PIN13 field. */ +#define GPIO_IN_PIN13_Msk (0x1UL << GPIO_IN_PIN13_Pos) /*!< Bit mask of PIN13 field. */ +#define GPIO_IN_PIN13_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN13_High (1UL) /*!< Pin input is high */ + +/* Bit 12 : P0.12 pin */ +#define GPIO_IN_PIN12_Pos (12UL) /*!< Position of PIN12 field. */ +#define GPIO_IN_PIN12_Msk (0x1UL << GPIO_IN_PIN12_Pos) /*!< Bit mask of PIN12 field. */ +#define GPIO_IN_PIN12_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN12_High (1UL) /*!< Pin input is high */ + +/* Bit 11 : P0.11 pin */ +#define GPIO_IN_PIN11_Pos (11UL) /*!< Position of PIN11 field. */ +#define GPIO_IN_PIN11_Msk (0x1UL << GPIO_IN_PIN11_Pos) /*!< Bit mask of PIN11 field. */ +#define GPIO_IN_PIN11_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN11_High (1UL) /*!< Pin input is high */ + +/* Bit 10 : P0.10 pin */ +#define GPIO_IN_PIN10_Pos (10UL) /*!< Position of PIN10 field. */ +#define GPIO_IN_PIN10_Msk (0x1UL << GPIO_IN_PIN10_Pos) /*!< Bit mask of PIN10 field. */ +#define GPIO_IN_PIN10_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN10_High (1UL) /*!< Pin input is high */ + +/* Bit 9 : P0.9 pin */ +#define GPIO_IN_PIN9_Pos (9UL) /*!< Position of PIN9 field. */ +#define GPIO_IN_PIN9_Msk (0x1UL << GPIO_IN_PIN9_Pos) /*!< Bit mask of PIN9 field. */ +#define GPIO_IN_PIN9_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN9_High (1UL) /*!< Pin input is high */ + +/* Bit 8 : P0.8 pin */ +#define GPIO_IN_PIN8_Pos (8UL) /*!< Position of PIN8 field. */ +#define GPIO_IN_PIN8_Msk (0x1UL << GPIO_IN_PIN8_Pos) /*!< Bit mask of PIN8 field. */ +#define GPIO_IN_PIN8_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN8_High (1UL) /*!< Pin input is high */ + +/* Bit 7 : P0.7 pin */ +#define GPIO_IN_PIN7_Pos (7UL) /*!< Position of PIN7 field. */ +#define GPIO_IN_PIN7_Msk (0x1UL << GPIO_IN_PIN7_Pos) /*!< Bit mask of PIN7 field. */ +#define GPIO_IN_PIN7_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN7_High (1UL) /*!< Pin input is high */ + +/* Bit 6 : P0.6 pin */ +#define GPIO_IN_PIN6_Pos (6UL) /*!< Position of PIN6 field. */ +#define GPIO_IN_PIN6_Msk (0x1UL << GPIO_IN_PIN6_Pos) /*!< Bit mask of PIN6 field. */ +#define GPIO_IN_PIN6_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN6_High (1UL) /*!< Pin input is high */ + +/* Bit 5 : P0.5 pin */ +#define GPIO_IN_PIN5_Pos (5UL) /*!< Position of PIN5 field. */ +#define GPIO_IN_PIN5_Msk (0x1UL << GPIO_IN_PIN5_Pos) /*!< Bit mask of PIN5 field. */ +#define GPIO_IN_PIN5_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN5_High (1UL) /*!< Pin input is high */ + +/* Bit 4 : P0.4 pin */ +#define GPIO_IN_PIN4_Pos (4UL) /*!< Position of PIN4 field. */ +#define GPIO_IN_PIN4_Msk (0x1UL << GPIO_IN_PIN4_Pos) /*!< Bit mask of PIN4 field. */ +#define GPIO_IN_PIN4_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN4_High (1UL) /*!< Pin input is high */ + +/* Bit 3 : P0.3 pin */ +#define GPIO_IN_PIN3_Pos (3UL) /*!< Position of PIN3 field. */ +#define GPIO_IN_PIN3_Msk (0x1UL << GPIO_IN_PIN3_Pos) /*!< Bit mask of PIN3 field. */ +#define GPIO_IN_PIN3_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN3_High (1UL) /*!< Pin input is high */ + +/* Bit 2 : P0.2 pin */ +#define GPIO_IN_PIN2_Pos (2UL) /*!< Position of PIN2 field. */ +#define GPIO_IN_PIN2_Msk (0x1UL << GPIO_IN_PIN2_Pos) /*!< Bit mask of PIN2 field. */ +#define GPIO_IN_PIN2_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN2_High (1UL) /*!< Pin input is high */ + +/* Bit 1 : P0.1 pin */ +#define GPIO_IN_PIN1_Pos (1UL) /*!< Position of PIN1 field. */ +#define GPIO_IN_PIN1_Msk (0x1UL << GPIO_IN_PIN1_Pos) /*!< Bit mask of PIN1 field. */ +#define GPIO_IN_PIN1_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN1_High (1UL) /*!< Pin input is high */ + +/* Bit 0 : P0.0 pin */ +#define GPIO_IN_PIN0_Pos (0UL) /*!< Position of PIN0 field. */ +#define GPIO_IN_PIN0_Msk (0x1UL << GPIO_IN_PIN0_Pos) /*!< Bit mask of PIN0 field. */ +#define GPIO_IN_PIN0_Low (0UL) /*!< Pin input is low */ +#define GPIO_IN_PIN0_High (1UL) /*!< Pin input is high */ + +/* Register: GPIO_DIR */ +/* Description: Direction of GPIO pins */ + +/* Bit 31 : P0.31 pin */ +#define GPIO_DIR_PIN31_Pos (31UL) /*!< Position of PIN31 field. */ +#define GPIO_DIR_PIN31_Msk (0x1UL << GPIO_DIR_PIN31_Pos) /*!< Bit mask of PIN31 field. */ +#define GPIO_DIR_PIN31_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN31_Output (1UL) /*!< Pin set as output */ + +/* Bit 30 : P0.30 pin */ +#define GPIO_DIR_PIN30_Pos (30UL) /*!< Position of PIN30 field. */ +#define GPIO_DIR_PIN30_Msk (0x1UL << GPIO_DIR_PIN30_Pos) /*!< Bit mask of PIN30 field. */ +#define GPIO_DIR_PIN30_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN30_Output (1UL) /*!< Pin set as output */ + +/* Bit 29 : P0.29 pin */ +#define GPIO_DIR_PIN29_Pos (29UL) /*!< Position of PIN29 field. */ +#define GPIO_DIR_PIN29_Msk (0x1UL << GPIO_DIR_PIN29_Pos) /*!< Bit mask of PIN29 field. */ +#define GPIO_DIR_PIN29_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN29_Output (1UL) /*!< Pin set as output */ + +/* Bit 28 : P0.28 pin */ +#define GPIO_DIR_PIN28_Pos (28UL) /*!< Position of PIN28 field. */ +#define GPIO_DIR_PIN28_Msk (0x1UL << GPIO_DIR_PIN28_Pos) /*!< Bit mask of PIN28 field. */ +#define GPIO_DIR_PIN28_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN28_Output (1UL) /*!< Pin set as output */ + +/* Bit 27 : P0.27 pin */ +#define GPIO_DIR_PIN27_Pos (27UL) /*!< Position of PIN27 field. */ +#define GPIO_DIR_PIN27_Msk (0x1UL << GPIO_DIR_PIN27_Pos) /*!< Bit mask of PIN27 field. */ +#define GPIO_DIR_PIN27_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN27_Output (1UL) /*!< Pin set as output */ + +/* Bit 26 : P0.26 pin */ +#define GPIO_DIR_PIN26_Pos (26UL) /*!< Position of PIN26 field. */ +#define GPIO_DIR_PIN26_Msk (0x1UL << GPIO_DIR_PIN26_Pos) /*!< Bit mask of PIN26 field. */ +#define GPIO_DIR_PIN26_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN26_Output (1UL) /*!< Pin set as output */ + +/* Bit 25 : P0.25 pin */ +#define GPIO_DIR_PIN25_Pos (25UL) /*!< Position of PIN25 field. */ +#define GPIO_DIR_PIN25_Msk (0x1UL << GPIO_DIR_PIN25_Pos) /*!< Bit mask of PIN25 field. */ +#define GPIO_DIR_PIN25_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN25_Output (1UL) /*!< Pin set as output */ + +/* Bit 24 : P0.24 pin */ +#define GPIO_DIR_PIN24_Pos (24UL) /*!< Position of PIN24 field. */ +#define GPIO_DIR_PIN24_Msk (0x1UL << GPIO_DIR_PIN24_Pos) /*!< Bit mask of PIN24 field. */ +#define GPIO_DIR_PIN24_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN24_Output (1UL) /*!< Pin set as output */ + +/* Bit 23 : P0.23 pin */ +#define GPIO_DIR_PIN23_Pos (23UL) /*!< Position of PIN23 field. */ +#define GPIO_DIR_PIN23_Msk (0x1UL << GPIO_DIR_PIN23_Pos) /*!< Bit mask of PIN23 field. */ +#define GPIO_DIR_PIN23_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN23_Output (1UL) /*!< Pin set as output */ + +/* Bit 22 : P0.22 pin */ +#define GPIO_DIR_PIN22_Pos (22UL) /*!< Position of PIN22 field. */ +#define GPIO_DIR_PIN22_Msk (0x1UL << GPIO_DIR_PIN22_Pos) /*!< Bit mask of PIN22 field. */ +#define GPIO_DIR_PIN22_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN22_Output (1UL) /*!< Pin set as output */ + +/* Bit 21 : P0.21 pin */ +#define GPIO_DIR_PIN21_Pos (21UL) /*!< Position of PIN21 field. */ +#define GPIO_DIR_PIN21_Msk (0x1UL << GPIO_DIR_PIN21_Pos) /*!< Bit mask of PIN21 field. */ +#define GPIO_DIR_PIN21_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN21_Output (1UL) /*!< Pin set as output */ + +/* Bit 20 : P0.20 pin */ +#define GPIO_DIR_PIN20_Pos (20UL) /*!< Position of PIN20 field. */ +#define GPIO_DIR_PIN20_Msk (0x1UL << GPIO_DIR_PIN20_Pos) /*!< Bit mask of PIN20 field. */ +#define GPIO_DIR_PIN20_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN20_Output (1UL) /*!< Pin set as output */ + +/* Bit 19 : P0.19 pin */ +#define GPIO_DIR_PIN19_Pos (19UL) /*!< Position of PIN19 field. */ +#define GPIO_DIR_PIN19_Msk (0x1UL << GPIO_DIR_PIN19_Pos) /*!< Bit mask of PIN19 field. */ +#define GPIO_DIR_PIN19_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN19_Output (1UL) /*!< Pin set as output */ + +/* Bit 18 : P0.18 pin */ +#define GPIO_DIR_PIN18_Pos (18UL) /*!< Position of PIN18 field. */ +#define GPIO_DIR_PIN18_Msk (0x1UL << GPIO_DIR_PIN18_Pos) /*!< Bit mask of PIN18 field. */ +#define GPIO_DIR_PIN18_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN18_Output (1UL) /*!< Pin set as output */ + +/* Bit 17 : P0.17 pin */ +#define GPIO_DIR_PIN17_Pos (17UL) /*!< Position of PIN17 field. */ +#define GPIO_DIR_PIN17_Msk (0x1UL << GPIO_DIR_PIN17_Pos) /*!< Bit mask of PIN17 field. */ +#define GPIO_DIR_PIN17_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN17_Output (1UL) /*!< Pin set as output */ + +/* Bit 16 : P0.16 pin */ +#define GPIO_DIR_PIN16_Pos (16UL) /*!< Position of PIN16 field. */ +#define GPIO_DIR_PIN16_Msk (0x1UL << GPIO_DIR_PIN16_Pos) /*!< Bit mask of PIN16 field. */ +#define GPIO_DIR_PIN16_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN16_Output (1UL) /*!< Pin set as output */ + +/* Bit 15 : P0.15 pin */ +#define GPIO_DIR_PIN15_Pos (15UL) /*!< Position of PIN15 field. */ +#define GPIO_DIR_PIN15_Msk (0x1UL << GPIO_DIR_PIN15_Pos) /*!< Bit mask of PIN15 field. */ +#define GPIO_DIR_PIN15_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN15_Output (1UL) /*!< Pin set as output */ + +/* Bit 14 : P0.14 pin */ +#define GPIO_DIR_PIN14_Pos (14UL) /*!< Position of PIN14 field. */ +#define GPIO_DIR_PIN14_Msk (0x1UL << GPIO_DIR_PIN14_Pos) /*!< Bit mask of PIN14 field. */ +#define GPIO_DIR_PIN14_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN14_Output (1UL) /*!< Pin set as output */ + +/* Bit 13 : P0.13 pin */ +#define GPIO_DIR_PIN13_Pos (13UL) /*!< Position of PIN13 field. */ +#define GPIO_DIR_PIN13_Msk (0x1UL << GPIO_DIR_PIN13_Pos) /*!< Bit mask of PIN13 field. */ +#define GPIO_DIR_PIN13_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN13_Output (1UL) /*!< Pin set as output */ + +/* Bit 12 : P0.12 pin */ +#define GPIO_DIR_PIN12_Pos (12UL) /*!< Position of PIN12 field. */ +#define GPIO_DIR_PIN12_Msk (0x1UL << GPIO_DIR_PIN12_Pos) /*!< Bit mask of PIN12 field. */ +#define GPIO_DIR_PIN12_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN12_Output (1UL) /*!< Pin set as output */ + +/* Bit 11 : P0.11 pin */ +#define GPIO_DIR_PIN11_Pos (11UL) /*!< Position of PIN11 field. */ +#define GPIO_DIR_PIN11_Msk (0x1UL << GPIO_DIR_PIN11_Pos) /*!< Bit mask of PIN11 field. */ +#define GPIO_DIR_PIN11_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN11_Output (1UL) /*!< Pin set as output */ + +/* Bit 10 : P0.10 pin */ +#define GPIO_DIR_PIN10_Pos (10UL) /*!< Position of PIN10 field. */ +#define GPIO_DIR_PIN10_Msk (0x1UL << GPIO_DIR_PIN10_Pos) /*!< Bit mask of PIN10 field. */ +#define GPIO_DIR_PIN10_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN10_Output (1UL) /*!< Pin set as output */ + +/* Bit 9 : P0.9 pin */ +#define GPIO_DIR_PIN9_Pos (9UL) /*!< Position of PIN9 field. */ +#define GPIO_DIR_PIN9_Msk (0x1UL << GPIO_DIR_PIN9_Pos) /*!< Bit mask of PIN9 field. */ +#define GPIO_DIR_PIN9_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN9_Output (1UL) /*!< Pin set as output */ + +/* Bit 8 : P0.8 pin */ +#define GPIO_DIR_PIN8_Pos (8UL) /*!< Position of PIN8 field. */ +#define GPIO_DIR_PIN8_Msk (0x1UL << GPIO_DIR_PIN8_Pos) /*!< Bit mask of PIN8 field. */ +#define GPIO_DIR_PIN8_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN8_Output (1UL) /*!< Pin set as output */ + +/* Bit 7 : P0.7 pin */ +#define GPIO_DIR_PIN7_Pos (7UL) /*!< Position of PIN7 field. */ +#define GPIO_DIR_PIN7_Msk (0x1UL << GPIO_DIR_PIN7_Pos) /*!< Bit mask of PIN7 field. */ +#define GPIO_DIR_PIN7_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN7_Output (1UL) /*!< Pin set as output */ + +/* Bit 6 : P0.6 pin */ +#define GPIO_DIR_PIN6_Pos (6UL) /*!< Position of PIN6 field. */ +#define GPIO_DIR_PIN6_Msk (0x1UL << GPIO_DIR_PIN6_Pos) /*!< Bit mask of PIN6 field. */ +#define GPIO_DIR_PIN6_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN6_Output (1UL) /*!< Pin set as output */ + +/* Bit 5 : P0.5 pin */ +#define GPIO_DIR_PIN5_Pos (5UL) /*!< Position of PIN5 field. */ +#define GPIO_DIR_PIN5_Msk (0x1UL << GPIO_DIR_PIN5_Pos) /*!< Bit mask of PIN5 field. */ +#define GPIO_DIR_PIN5_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN5_Output (1UL) /*!< Pin set as output */ + +/* Bit 4 : P0.4 pin */ +#define GPIO_DIR_PIN4_Pos (4UL) /*!< Position of PIN4 field. */ +#define GPIO_DIR_PIN4_Msk (0x1UL << GPIO_DIR_PIN4_Pos) /*!< Bit mask of PIN4 field. */ +#define GPIO_DIR_PIN4_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN4_Output (1UL) /*!< Pin set as output */ + +/* Bit 3 : P0.3 pin */ +#define GPIO_DIR_PIN3_Pos (3UL) /*!< Position of PIN3 field. */ +#define GPIO_DIR_PIN3_Msk (0x1UL << GPIO_DIR_PIN3_Pos) /*!< Bit mask of PIN3 field. */ +#define GPIO_DIR_PIN3_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN3_Output (1UL) /*!< Pin set as output */ + +/* Bit 2 : P0.2 pin */ +#define GPIO_DIR_PIN2_Pos (2UL) /*!< Position of PIN2 field. */ +#define GPIO_DIR_PIN2_Msk (0x1UL << GPIO_DIR_PIN2_Pos) /*!< Bit mask of PIN2 field. */ +#define GPIO_DIR_PIN2_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN2_Output (1UL) /*!< Pin set as output */ + +/* Bit 1 : P0.1 pin */ +#define GPIO_DIR_PIN1_Pos (1UL) /*!< Position of PIN1 field. */ +#define GPIO_DIR_PIN1_Msk (0x1UL << GPIO_DIR_PIN1_Pos) /*!< Bit mask of PIN1 field. */ +#define GPIO_DIR_PIN1_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN1_Output (1UL) /*!< Pin set as output */ + +/* Bit 0 : P0.0 pin */ +#define GPIO_DIR_PIN0_Pos (0UL) /*!< Position of PIN0 field. */ +#define GPIO_DIR_PIN0_Msk (0x1UL << GPIO_DIR_PIN0_Pos) /*!< Bit mask of PIN0 field. */ +#define GPIO_DIR_PIN0_Input (0UL) /*!< Pin set as input */ +#define GPIO_DIR_PIN0_Output (1UL) /*!< Pin set as output */ + +/* Register: GPIO_DIRSET */ +/* Description: DIR set register */ + +/* Bit 31 : Set as output pin 31 */ +#define GPIO_DIRSET_PIN31_Pos (31UL) /*!< Position of PIN31 field. */ +#define GPIO_DIRSET_PIN31_Msk (0x1UL << GPIO_DIRSET_PIN31_Pos) /*!< Bit mask of PIN31 field. */ +#define GPIO_DIRSET_PIN31_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN31_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN31_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 30 : Set as output pin 30 */ +#define GPIO_DIRSET_PIN30_Pos (30UL) /*!< Position of PIN30 field. */ +#define GPIO_DIRSET_PIN30_Msk (0x1UL << GPIO_DIRSET_PIN30_Pos) /*!< Bit mask of PIN30 field. */ +#define GPIO_DIRSET_PIN30_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN30_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN30_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 29 : Set as output pin 29 */ +#define GPIO_DIRSET_PIN29_Pos (29UL) /*!< Position of PIN29 field. */ +#define GPIO_DIRSET_PIN29_Msk (0x1UL << GPIO_DIRSET_PIN29_Pos) /*!< Bit mask of PIN29 field. */ +#define GPIO_DIRSET_PIN29_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN29_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN29_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 28 : Set as output pin 28 */ +#define GPIO_DIRSET_PIN28_Pos (28UL) /*!< Position of PIN28 field. */ +#define GPIO_DIRSET_PIN28_Msk (0x1UL << GPIO_DIRSET_PIN28_Pos) /*!< Bit mask of PIN28 field. */ +#define GPIO_DIRSET_PIN28_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN28_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN28_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 27 : Set as output pin 27 */ +#define GPIO_DIRSET_PIN27_Pos (27UL) /*!< Position of PIN27 field. */ +#define GPIO_DIRSET_PIN27_Msk (0x1UL << GPIO_DIRSET_PIN27_Pos) /*!< Bit mask of PIN27 field. */ +#define GPIO_DIRSET_PIN27_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN27_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN27_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 26 : Set as output pin 26 */ +#define GPIO_DIRSET_PIN26_Pos (26UL) /*!< Position of PIN26 field. */ +#define GPIO_DIRSET_PIN26_Msk (0x1UL << GPIO_DIRSET_PIN26_Pos) /*!< Bit mask of PIN26 field. */ +#define GPIO_DIRSET_PIN26_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN26_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN26_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 25 : Set as output pin 25 */ +#define GPIO_DIRSET_PIN25_Pos (25UL) /*!< Position of PIN25 field. */ +#define GPIO_DIRSET_PIN25_Msk (0x1UL << GPIO_DIRSET_PIN25_Pos) /*!< Bit mask of PIN25 field. */ +#define GPIO_DIRSET_PIN25_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN25_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN25_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 24 : Set as output pin 24 */ +#define GPIO_DIRSET_PIN24_Pos (24UL) /*!< Position of PIN24 field. */ +#define GPIO_DIRSET_PIN24_Msk (0x1UL << GPIO_DIRSET_PIN24_Pos) /*!< Bit mask of PIN24 field. */ +#define GPIO_DIRSET_PIN24_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN24_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN24_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 23 : Set as output pin 23 */ +#define GPIO_DIRSET_PIN23_Pos (23UL) /*!< Position of PIN23 field. */ +#define GPIO_DIRSET_PIN23_Msk (0x1UL << GPIO_DIRSET_PIN23_Pos) /*!< Bit mask of PIN23 field. */ +#define GPIO_DIRSET_PIN23_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN23_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN23_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 22 : Set as output pin 22 */ +#define GPIO_DIRSET_PIN22_Pos (22UL) /*!< Position of PIN22 field. */ +#define GPIO_DIRSET_PIN22_Msk (0x1UL << GPIO_DIRSET_PIN22_Pos) /*!< Bit mask of PIN22 field. */ +#define GPIO_DIRSET_PIN22_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN22_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN22_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 21 : Set as output pin 21 */ +#define GPIO_DIRSET_PIN21_Pos (21UL) /*!< Position of PIN21 field. */ +#define GPIO_DIRSET_PIN21_Msk (0x1UL << GPIO_DIRSET_PIN21_Pos) /*!< Bit mask of PIN21 field. */ +#define GPIO_DIRSET_PIN21_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN21_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN21_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 20 : Set as output pin 20 */ +#define GPIO_DIRSET_PIN20_Pos (20UL) /*!< Position of PIN20 field. */ +#define GPIO_DIRSET_PIN20_Msk (0x1UL << GPIO_DIRSET_PIN20_Pos) /*!< Bit mask of PIN20 field. */ +#define GPIO_DIRSET_PIN20_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN20_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN20_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 19 : Set as output pin 19 */ +#define GPIO_DIRSET_PIN19_Pos (19UL) /*!< Position of PIN19 field. */ +#define GPIO_DIRSET_PIN19_Msk (0x1UL << GPIO_DIRSET_PIN19_Pos) /*!< Bit mask of PIN19 field. */ +#define GPIO_DIRSET_PIN19_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN19_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN19_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 18 : Set as output pin 18 */ +#define GPIO_DIRSET_PIN18_Pos (18UL) /*!< Position of PIN18 field. */ +#define GPIO_DIRSET_PIN18_Msk (0x1UL << GPIO_DIRSET_PIN18_Pos) /*!< Bit mask of PIN18 field. */ +#define GPIO_DIRSET_PIN18_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN18_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN18_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 17 : Set as output pin 17 */ +#define GPIO_DIRSET_PIN17_Pos (17UL) /*!< Position of PIN17 field. */ +#define GPIO_DIRSET_PIN17_Msk (0x1UL << GPIO_DIRSET_PIN17_Pos) /*!< Bit mask of PIN17 field. */ +#define GPIO_DIRSET_PIN17_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN17_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN17_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 16 : Set as output pin 16 */ +#define GPIO_DIRSET_PIN16_Pos (16UL) /*!< Position of PIN16 field. */ +#define GPIO_DIRSET_PIN16_Msk (0x1UL << GPIO_DIRSET_PIN16_Pos) /*!< Bit mask of PIN16 field. */ +#define GPIO_DIRSET_PIN16_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN16_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN16_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 15 : Set as output pin 15 */ +#define GPIO_DIRSET_PIN15_Pos (15UL) /*!< Position of PIN15 field. */ +#define GPIO_DIRSET_PIN15_Msk (0x1UL << GPIO_DIRSET_PIN15_Pos) /*!< Bit mask of PIN15 field. */ +#define GPIO_DIRSET_PIN15_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN15_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN15_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 14 : Set as output pin 14 */ +#define GPIO_DIRSET_PIN14_Pos (14UL) /*!< Position of PIN14 field. */ +#define GPIO_DIRSET_PIN14_Msk (0x1UL << GPIO_DIRSET_PIN14_Pos) /*!< Bit mask of PIN14 field. */ +#define GPIO_DIRSET_PIN14_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN14_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN14_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 13 : Set as output pin 13 */ +#define GPIO_DIRSET_PIN13_Pos (13UL) /*!< Position of PIN13 field. */ +#define GPIO_DIRSET_PIN13_Msk (0x1UL << GPIO_DIRSET_PIN13_Pos) /*!< Bit mask of PIN13 field. */ +#define GPIO_DIRSET_PIN13_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN13_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN13_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 12 : Set as output pin 12 */ +#define GPIO_DIRSET_PIN12_Pos (12UL) /*!< Position of PIN12 field. */ +#define GPIO_DIRSET_PIN12_Msk (0x1UL << GPIO_DIRSET_PIN12_Pos) /*!< Bit mask of PIN12 field. */ +#define GPIO_DIRSET_PIN12_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN12_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN12_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 11 : Set as output pin 11 */ +#define GPIO_DIRSET_PIN11_Pos (11UL) /*!< Position of PIN11 field. */ +#define GPIO_DIRSET_PIN11_Msk (0x1UL << GPIO_DIRSET_PIN11_Pos) /*!< Bit mask of PIN11 field. */ +#define GPIO_DIRSET_PIN11_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN11_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN11_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 10 : Set as output pin 10 */ +#define GPIO_DIRSET_PIN10_Pos (10UL) /*!< Position of PIN10 field. */ +#define GPIO_DIRSET_PIN10_Msk (0x1UL << GPIO_DIRSET_PIN10_Pos) /*!< Bit mask of PIN10 field. */ +#define GPIO_DIRSET_PIN10_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN10_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN10_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 9 : Set as output pin 9 */ +#define GPIO_DIRSET_PIN9_Pos (9UL) /*!< Position of PIN9 field. */ +#define GPIO_DIRSET_PIN9_Msk (0x1UL << GPIO_DIRSET_PIN9_Pos) /*!< Bit mask of PIN9 field. */ +#define GPIO_DIRSET_PIN9_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN9_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN9_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 8 : Set as output pin 8 */ +#define GPIO_DIRSET_PIN8_Pos (8UL) /*!< Position of PIN8 field. */ +#define GPIO_DIRSET_PIN8_Msk (0x1UL << GPIO_DIRSET_PIN8_Pos) /*!< Bit mask of PIN8 field. */ +#define GPIO_DIRSET_PIN8_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN8_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN8_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 7 : Set as output pin 7 */ +#define GPIO_DIRSET_PIN7_Pos (7UL) /*!< Position of PIN7 field. */ +#define GPIO_DIRSET_PIN7_Msk (0x1UL << GPIO_DIRSET_PIN7_Pos) /*!< Bit mask of PIN7 field. */ +#define GPIO_DIRSET_PIN7_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN7_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN7_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 6 : Set as output pin 6 */ +#define GPIO_DIRSET_PIN6_Pos (6UL) /*!< Position of PIN6 field. */ +#define GPIO_DIRSET_PIN6_Msk (0x1UL << GPIO_DIRSET_PIN6_Pos) /*!< Bit mask of PIN6 field. */ +#define GPIO_DIRSET_PIN6_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN6_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN6_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 5 : Set as output pin 5 */ +#define GPIO_DIRSET_PIN5_Pos (5UL) /*!< Position of PIN5 field. */ +#define GPIO_DIRSET_PIN5_Msk (0x1UL << GPIO_DIRSET_PIN5_Pos) /*!< Bit mask of PIN5 field. */ +#define GPIO_DIRSET_PIN5_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN5_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN5_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 4 : Set as output pin 4 */ +#define GPIO_DIRSET_PIN4_Pos (4UL) /*!< Position of PIN4 field. */ +#define GPIO_DIRSET_PIN4_Msk (0x1UL << GPIO_DIRSET_PIN4_Pos) /*!< Bit mask of PIN4 field. */ +#define GPIO_DIRSET_PIN4_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN4_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN4_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 3 : Set as output pin 3 */ +#define GPIO_DIRSET_PIN3_Pos (3UL) /*!< Position of PIN3 field. */ +#define GPIO_DIRSET_PIN3_Msk (0x1UL << GPIO_DIRSET_PIN3_Pos) /*!< Bit mask of PIN3 field. */ +#define GPIO_DIRSET_PIN3_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN3_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN3_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 2 : Set as output pin 2 */ +#define GPIO_DIRSET_PIN2_Pos (2UL) /*!< Position of PIN2 field. */ +#define GPIO_DIRSET_PIN2_Msk (0x1UL << GPIO_DIRSET_PIN2_Pos) /*!< Bit mask of PIN2 field. */ +#define GPIO_DIRSET_PIN2_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN2_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN2_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 1 : Set as output pin 1 */ +#define GPIO_DIRSET_PIN1_Pos (1UL) /*!< Position of PIN1 field. */ +#define GPIO_DIRSET_PIN1_Msk (0x1UL << GPIO_DIRSET_PIN1_Pos) /*!< Bit mask of PIN1 field. */ +#define GPIO_DIRSET_PIN1_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN1_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN1_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Bit 0 : Set as output pin 0 */ +#define GPIO_DIRSET_PIN0_Pos (0UL) /*!< Position of PIN0 field. */ +#define GPIO_DIRSET_PIN0_Msk (0x1UL << GPIO_DIRSET_PIN0_Pos) /*!< Bit mask of PIN0 field. */ +#define GPIO_DIRSET_PIN0_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRSET_PIN0_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRSET_PIN0_Set (1UL) /*!< Write: writing a '1' sets pin to output; writing a '0' has no effect */ + +/* Register: GPIO_DIRCLR */ +/* Description: DIR clear register */ + +/* Bit 31 : Set as input pin 31 */ +#define GPIO_DIRCLR_PIN31_Pos (31UL) /*!< Position of PIN31 field. */ +#define GPIO_DIRCLR_PIN31_Msk (0x1UL << GPIO_DIRCLR_PIN31_Pos) /*!< Bit mask of PIN31 field. */ +#define GPIO_DIRCLR_PIN31_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN31_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN31_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 30 : Set as input pin 30 */ +#define GPIO_DIRCLR_PIN30_Pos (30UL) /*!< Position of PIN30 field. */ +#define GPIO_DIRCLR_PIN30_Msk (0x1UL << GPIO_DIRCLR_PIN30_Pos) /*!< Bit mask of PIN30 field. */ +#define GPIO_DIRCLR_PIN30_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN30_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN30_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 29 : Set as input pin 29 */ +#define GPIO_DIRCLR_PIN29_Pos (29UL) /*!< Position of PIN29 field. */ +#define GPIO_DIRCLR_PIN29_Msk (0x1UL << GPIO_DIRCLR_PIN29_Pos) /*!< Bit mask of PIN29 field. */ +#define GPIO_DIRCLR_PIN29_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN29_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN29_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 28 : Set as input pin 28 */ +#define GPIO_DIRCLR_PIN28_Pos (28UL) /*!< Position of PIN28 field. */ +#define GPIO_DIRCLR_PIN28_Msk (0x1UL << GPIO_DIRCLR_PIN28_Pos) /*!< Bit mask of PIN28 field. */ +#define GPIO_DIRCLR_PIN28_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN28_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN28_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 27 : Set as input pin 27 */ +#define GPIO_DIRCLR_PIN27_Pos (27UL) /*!< Position of PIN27 field. */ +#define GPIO_DIRCLR_PIN27_Msk (0x1UL << GPIO_DIRCLR_PIN27_Pos) /*!< Bit mask of PIN27 field. */ +#define GPIO_DIRCLR_PIN27_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN27_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN27_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 26 : Set as input pin 26 */ +#define GPIO_DIRCLR_PIN26_Pos (26UL) /*!< Position of PIN26 field. */ +#define GPIO_DIRCLR_PIN26_Msk (0x1UL << GPIO_DIRCLR_PIN26_Pos) /*!< Bit mask of PIN26 field. */ +#define GPIO_DIRCLR_PIN26_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN26_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN26_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 25 : Set as input pin 25 */ +#define GPIO_DIRCLR_PIN25_Pos (25UL) /*!< Position of PIN25 field. */ +#define GPIO_DIRCLR_PIN25_Msk (0x1UL << GPIO_DIRCLR_PIN25_Pos) /*!< Bit mask of PIN25 field. */ +#define GPIO_DIRCLR_PIN25_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN25_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN25_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 24 : Set as input pin 24 */ +#define GPIO_DIRCLR_PIN24_Pos (24UL) /*!< Position of PIN24 field. */ +#define GPIO_DIRCLR_PIN24_Msk (0x1UL << GPIO_DIRCLR_PIN24_Pos) /*!< Bit mask of PIN24 field. */ +#define GPIO_DIRCLR_PIN24_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN24_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN24_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 23 : Set as input pin 23 */ +#define GPIO_DIRCLR_PIN23_Pos (23UL) /*!< Position of PIN23 field. */ +#define GPIO_DIRCLR_PIN23_Msk (0x1UL << GPIO_DIRCLR_PIN23_Pos) /*!< Bit mask of PIN23 field. */ +#define GPIO_DIRCLR_PIN23_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN23_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN23_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 22 : Set as input pin 22 */ +#define GPIO_DIRCLR_PIN22_Pos (22UL) /*!< Position of PIN22 field. */ +#define GPIO_DIRCLR_PIN22_Msk (0x1UL << GPIO_DIRCLR_PIN22_Pos) /*!< Bit mask of PIN22 field. */ +#define GPIO_DIRCLR_PIN22_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN22_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN22_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 21 : Set as input pin 21 */ +#define GPIO_DIRCLR_PIN21_Pos (21UL) /*!< Position of PIN21 field. */ +#define GPIO_DIRCLR_PIN21_Msk (0x1UL << GPIO_DIRCLR_PIN21_Pos) /*!< Bit mask of PIN21 field. */ +#define GPIO_DIRCLR_PIN21_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN21_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN21_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 20 : Set as input pin 20 */ +#define GPIO_DIRCLR_PIN20_Pos (20UL) /*!< Position of PIN20 field. */ +#define GPIO_DIRCLR_PIN20_Msk (0x1UL << GPIO_DIRCLR_PIN20_Pos) /*!< Bit mask of PIN20 field. */ +#define GPIO_DIRCLR_PIN20_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN20_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN20_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 19 : Set as input pin 19 */ +#define GPIO_DIRCLR_PIN19_Pos (19UL) /*!< Position of PIN19 field. */ +#define GPIO_DIRCLR_PIN19_Msk (0x1UL << GPIO_DIRCLR_PIN19_Pos) /*!< Bit mask of PIN19 field. */ +#define GPIO_DIRCLR_PIN19_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN19_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN19_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 18 : Set as input pin 18 */ +#define GPIO_DIRCLR_PIN18_Pos (18UL) /*!< Position of PIN18 field. */ +#define GPIO_DIRCLR_PIN18_Msk (0x1UL << GPIO_DIRCLR_PIN18_Pos) /*!< Bit mask of PIN18 field. */ +#define GPIO_DIRCLR_PIN18_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN18_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN18_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 17 : Set as input pin 17 */ +#define GPIO_DIRCLR_PIN17_Pos (17UL) /*!< Position of PIN17 field. */ +#define GPIO_DIRCLR_PIN17_Msk (0x1UL << GPIO_DIRCLR_PIN17_Pos) /*!< Bit mask of PIN17 field. */ +#define GPIO_DIRCLR_PIN17_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN17_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN17_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 16 : Set as input pin 16 */ +#define GPIO_DIRCLR_PIN16_Pos (16UL) /*!< Position of PIN16 field. */ +#define GPIO_DIRCLR_PIN16_Msk (0x1UL << GPIO_DIRCLR_PIN16_Pos) /*!< Bit mask of PIN16 field. */ +#define GPIO_DIRCLR_PIN16_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN16_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN16_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 15 : Set as input pin 15 */ +#define GPIO_DIRCLR_PIN15_Pos (15UL) /*!< Position of PIN15 field. */ +#define GPIO_DIRCLR_PIN15_Msk (0x1UL << GPIO_DIRCLR_PIN15_Pos) /*!< Bit mask of PIN15 field. */ +#define GPIO_DIRCLR_PIN15_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN15_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN15_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 14 : Set as input pin 14 */ +#define GPIO_DIRCLR_PIN14_Pos (14UL) /*!< Position of PIN14 field. */ +#define GPIO_DIRCLR_PIN14_Msk (0x1UL << GPIO_DIRCLR_PIN14_Pos) /*!< Bit mask of PIN14 field. */ +#define GPIO_DIRCLR_PIN14_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN14_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN14_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 13 : Set as input pin 13 */ +#define GPIO_DIRCLR_PIN13_Pos (13UL) /*!< Position of PIN13 field. */ +#define GPIO_DIRCLR_PIN13_Msk (0x1UL << GPIO_DIRCLR_PIN13_Pos) /*!< Bit mask of PIN13 field. */ +#define GPIO_DIRCLR_PIN13_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN13_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN13_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 12 : Set as input pin 12 */ +#define GPIO_DIRCLR_PIN12_Pos (12UL) /*!< Position of PIN12 field. */ +#define GPIO_DIRCLR_PIN12_Msk (0x1UL << GPIO_DIRCLR_PIN12_Pos) /*!< Bit mask of PIN12 field. */ +#define GPIO_DIRCLR_PIN12_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN12_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN12_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 11 : Set as input pin 11 */ +#define GPIO_DIRCLR_PIN11_Pos (11UL) /*!< Position of PIN11 field. */ +#define GPIO_DIRCLR_PIN11_Msk (0x1UL << GPIO_DIRCLR_PIN11_Pos) /*!< Bit mask of PIN11 field. */ +#define GPIO_DIRCLR_PIN11_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN11_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN11_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 10 : Set as input pin 10 */ +#define GPIO_DIRCLR_PIN10_Pos (10UL) /*!< Position of PIN10 field. */ +#define GPIO_DIRCLR_PIN10_Msk (0x1UL << GPIO_DIRCLR_PIN10_Pos) /*!< Bit mask of PIN10 field. */ +#define GPIO_DIRCLR_PIN10_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN10_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN10_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 9 : Set as input pin 9 */ +#define GPIO_DIRCLR_PIN9_Pos (9UL) /*!< Position of PIN9 field. */ +#define GPIO_DIRCLR_PIN9_Msk (0x1UL << GPIO_DIRCLR_PIN9_Pos) /*!< Bit mask of PIN9 field. */ +#define GPIO_DIRCLR_PIN9_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN9_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN9_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 8 : Set as input pin 8 */ +#define GPIO_DIRCLR_PIN8_Pos (8UL) /*!< Position of PIN8 field. */ +#define GPIO_DIRCLR_PIN8_Msk (0x1UL << GPIO_DIRCLR_PIN8_Pos) /*!< Bit mask of PIN8 field. */ +#define GPIO_DIRCLR_PIN8_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN8_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN8_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 7 : Set as input pin 7 */ +#define GPIO_DIRCLR_PIN7_Pos (7UL) /*!< Position of PIN7 field. */ +#define GPIO_DIRCLR_PIN7_Msk (0x1UL << GPIO_DIRCLR_PIN7_Pos) /*!< Bit mask of PIN7 field. */ +#define GPIO_DIRCLR_PIN7_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN7_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN7_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 6 : Set as input pin 6 */ +#define GPIO_DIRCLR_PIN6_Pos (6UL) /*!< Position of PIN6 field. */ +#define GPIO_DIRCLR_PIN6_Msk (0x1UL << GPIO_DIRCLR_PIN6_Pos) /*!< Bit mask of PIN6 field. */ +#define GPIO_DIRCLR_PIN6_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN6_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN6_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 5 : Set as input pin 5 */ +#define GPIO_DIRCLR_PIN5_Pos (5UL) /*!< Position of PIN5 field. */ +#define GPIO_DIRCLR_PIN5_Msk (0x1UL << GPIO_DIRCLR_PIN5_Pos) /*!< Bit mask of PIN5 field. */ +#define GPIO_DIRCLR_PIN5_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN5_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN5_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 4 : Set as input pin 4 */ +#define GPIO_DIRCLR_PIN4_Pos (4UL) /*!< Position of PIN4 field. */ +#define GPIO_DIRCLR_PIN4_Msk (0x1UL << GPIO_DIRCLR_PIN4_Pos) /*!< Bit mask of PIN4 field. */ +#define GPIO_DIRCLR_PIN4_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN4_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN4_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 3 : Set as input pin 3 */ +#define GPIO_DIRCLR_PIN3_Pos (3UL) /*!< Position of PIN3 field. */ +#define GPIO_DIRCLR_PIN3_Msk (0x1UL << GPIO_DIRCLR_PIN3_Pos) /*!< Bit mask of PIN3 field. */ +#define GPIO_DIRCLR_PIN3_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN3_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN3_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 2 : Set as input pin 2 */ +#define GPIO_DIRCLR_PIN2_Pos (2UL) /*!< Position of PIN2 field. */ +#define GPIO_DIRCLR_PIN2_Msk (0x1UL << GPIO_DIRCLR_PIN2_Pos) /*!< Bit mask of PIN2 field. */ +#define GPIO_DIRCLR_PIN2_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN2_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN2_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 1 : Set as input pin 1 */ +#define GPIO_DIRCLR_PIN1_Pos (1UL) /*!< Position of PIN1 field. */ +#define GPIO_DIRCLR_PIN1_Msk (0x1UL << GPIO_DIRCLR_PIN1_Pos) /*!< Bit mask of PIN1 field. */ +#define GPIO_DIRCLR_PIN1_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN1_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN1_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Bit 0 : Set as input pin 0 */ +#define GPIO_DIRCLR_PIN0_Pos (0UL) /*!< Position of PIN0 field. */ +#define GPIO_DIRCLR_PIN0_Msk (0x1UL << GPIO_DIRCLR_PIN0_Pos) /*!< Bit mask of PIN0 field. */ +#define GPIO_DIRCLR_PIN0_Input (0UL) /*!< Read: pin set as input */ +#define GPIO_DIRCLR_PIN0_Output (1UL) /*!< Read: pin set as output */ +#define GPIO_DIRCLR_PIN0_Clear (1UL) /*!< Write: writing a '1' sets pin to input; writing a '0' has no effect */ + +/* Register: GPIO_LATCH */ +/* Description: Latch register indicating what GPIO pins that have met the criteria set in the PIN_CNF[n].SENSE registers */ + +/* Bit 31 : Status on whether PIN31 has met criteria set in PIN_CNF31.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN31_Pos (31UL) /*!< Position of PIN31 field. */ +#define GPIO_LATCH_PIN31_Msk (0x1UL << GPIO_LATCH_PIN31_Pos) /*!< Bit mask of PIN31 field. */ +#define GPIO_LATCH_PIN31_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN31_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 30 : Status on whether PIN30 has met criteria set in PIN_CNF30.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN30_Pos (30UL) /*!< Position of PIN30 field. */ +#define GPIO_LATCH_PIN30_Msk (0x1UL << GPIO_LATCH_PIN30_Pos) /*!< Bit mask of PIN30 field. */ +#define GPIO_LATCH_PIN30_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN30_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 29 : Status on whether PIN29 has met criteria set in PIN_CNF29.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN29_Pos (29UL) /*!< Position of PIN29 field. */ +#define GPIO_LATCH_PIN29_Msk (0x1UL << GPIO_LATCH_PIN29_Pos) /*!< Bit mask of PIN29 field. */ +#define GPIO_LATCH_PIN29_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN29_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 28 : Status on whether PIN28 has met criteria set in PIN_CNF28.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN28_Pos (28UL) /*!< Position of PIN28 field. */ +#define GPIO_LATCH_PIN28_Msk (0x1UL << GPIO_LATCH_PIN28_Pos) /*!< Bit mask of PIN28 field. */ +#define GPIO_LATCH_PIN28_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN28_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 27 : Status on whether PIN27 has met criteria set in PIN_CNF27.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN27_Pos (27UL) /*!< Position of PIN27 field. */ +#define GPIO_LATCH_PIN27_Msk (0x1UL << GPIO_LATCH_PIN27_Pos) /*!< Bit mask of PIN27 field. */ +#define GPIO_LATCH_PIN27_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN27_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 26 : Status on whether PIN26 has met criteria set in PIN_CNF26.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN26_Pos (26UL) /*!< Position of PIN26 field. */ +#define GPIO_LATCH_PIN26_Msk (0x1UL << GPIO_LATCH_PIN26_Pos) /*!< Bit mask of PIN26 field. */ +#define GPIO_LATCH_PIN26_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN26_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 25 : Status on whether PIN25 has met criteria set in PIN_CNF25.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN25_Pos (25UL) /*!< Position of PIN25 field. */ +#define GPIO_LATCH_PIN25_Msk (0x1UL << GPIO_LATCH_PIN25_Pos) /*!< Bit mask of PIN25 field. */ +#define GPIO_LATCH_PIN25_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN25_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 24 : Status on whether PIN24 has met criteria set in PIN_CNF24.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN24_Pos (24UL) /*!< Position of PIN24 field. */ +#define GPIO_LATCH_PIN24_Msk (0x1UL << GPIO_LATCH_PIN24_Pos) /*!< Bit mask of PIN24 field. */ +#define GPIO_LATCH_PIN24_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN24_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 23 : Status on whether PIN23 has met criteria set in PIN_CNF23.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN23_Pos (23UL) /*!< Position of PIN23 field. */ +#define GPIO_LATCH_PIN23_Msk (0x1UL << GPIO_LATCH_PIN23_Pos) /*!< Bit mask of PIN23 field. */ +#define GPIO_LATCH_PIN23_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN23_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 22 : Status on whether PIN22 has met criteria set in PIN_CNF22.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN22_Pos (22UL) /*!< Position of PIN22 field. */ +#define GPIO_LATCH_PIN22_Msk (0x1UL << GPIO_LATCH_PIN22_Pos) /*!< Bit mask of PIN22 field. */ +#define GPIO_LATCH_PIN22_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN22_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 21 : Status on whether PIN21 has met criteria set in PIN_CNF21.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN21_Pos (21UL) /*!< Position of PIN21 field. */ +#define GPIO_LATCH_PIN21_Msk (0x1UL << GPIO_LATCH_PIN21_Pos) /*!< Bit mask of PIN21 field. */ +#define GPIO_LATCH_PIN21_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN21_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 20 : Status on whether PIN20 has met criteria set in PIN_CNF20.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN20_Pos (20UL) /*!< Position of PIN20 field. */ +#define GPIO_LATCH_PIN20_Msk (0x1UL << GPIO_LATCH_PIN20_Pos) /*!< Bit mask of PIN20 field. */ +#define GPIO_LATCH_PIN20_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN20_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 19 : Status on whether PIN19 has met criteria set in PIN_CNF19.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN19_Pos (19UL) /*!< Position of PIN19 field. */ +#define GPIO_LATCH_PIN19_Msk (0x1UL << GPIO_LATCH_PIN19_Pos) /*!< Bit mask of PIN19 field. */ +#define GPIO_LATCH_PIN19_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN19_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 18 : Status on whether PIN18 has met criteria set in PIN_CNF18.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN18_Pos (18UL) /*!< Position of PIN18 field. */ +#define GPIO_LATCH_PIN18_Msk (0x1UL << GPIO_LATCH_PIN18_Pos) /*!< Bit mask of PIN18 field. */ +#define GPIO_LATCH_PIN18_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN18_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 17 : Status on whether PIN17 has met criteria set in PIN_CNF17.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN17_Pos (17UL) /*!< Position of PIN17 field. */ +#define GPIO_LATCH_PIN17_Msk (0x1UL << GPIO_LATCH_PIN17_Pos) /*!< Bit mask of PIN17 field. */ +#define GPIO_LATCH_PIN17_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN17_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 16 : Status on whether PIN16 has met criteria set in PIN_CNF16.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN16_Pos (16UL) /*!< Position of PIN16 field. */ +#define GPIO_LATCH_PIN16_Msk (0x1UL << GPIO_LATCH_PIN16_Pos) /*!< Bit mask of PIN16 field. */ +#define GPIO_LATCH_PIN16_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN16_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 15 : Status on whether PIN15 has met criteria set in PIN_CNF15.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN15_Pos (15UL) /*!< Position of PIN15 field. */ +#define GPIO_LATCH_PIN15_Msk (0x1UL << GPIO_LATCH_PIN15_Pos) /*!< Bit mask of PIN15 field. */ +#define GPIO_LATCH_PIN15_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN15_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 14 : Status on whether PIN14 has met criteria set in PIN_CNF14.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN14_Pos (14UL) /*!< Position of PIN14 field. */ +#define GPIO_LATCH_PIN14_Msk (0x1UL << GPIO_LATCH_PIN14_Pos) /*!< Bit mask of PIN14 field. */ +#define GPIO_LATCH_PIN14_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN14_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 13 : Status on whether PIN13 has met criteria set in PIN_CNF13.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN13_Pos (13UL) /*!< Position of PIN13 field. */ +#define GPIO_LATCH_PIN13_Msk (0x1UL << GPIO_LATCH_PIN13_Pos) /*!< Bit mask of PIN13 field. */ +#define GPIO_LATCH_PIN13_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN13_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 12 : Status on whether PIN12 has met criteria set in PIN_CNF12.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN12_Pos (12UL) /*!< Position of PIN12 field. */ +#define GPIO_LATCH_PIN12_Msk (0x1UL << GPIO_LATCH_PIN12_Pos) /*!< Bit mask of PIN12 field. */ +#define GPIO_LATCH_PIN12_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN12_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 11 : Status on whether PIN11 has met criteria set in PIN_CNF11.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN11_Pos (11UL) /*!< Position of PIN11 field. */ +#define GPIO_LATCH_PIN11_Msk (0x1UL << GPIO_LATCH_PIN11_Pos) /*!< Bit mask of PIN11 field. */ +#define GPIO_LATCH_PIN11_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN11_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 10 : Status on whether PIN10 has met criteria set in PIN_CNF10.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN10_Pos (10UL) /*!< Position of PIN10 field. */ +#define GPIO_LATCH_PIN10_Msk (0x1UL << GPIO_LATCH_PIN10_Pos) /*!< Bit mask of PIN10 field. */ +#define GPIO_LATCH_PIN10_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN10_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 9 : Status on whether PIN9 has met criteria set in PIN_CNF9.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN9_Pos (9UL) /*!< Position of PIN9 field. */ +#define GPIO_LATCH_PIN9_Msk (0x1UL << GPIO_LATCH_PIN9_Pos) /*!< Bit mask of PIN9 field. */ +#define GPIO_LATCH_PIN9_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN9_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 8 : Status on whether PIN8 has met criteria set in PIN_CNF8.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN8_Pos (8UL) /*!< Position of PIN8 field. */ +#define GPIO_LATCH_PIN8_Msk (0x1UL << GPIO_LATCH_PIN8_Pos) /*!< Bit mask of PIN8 field. */ +#define GPIO_LATCH_PIN8_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN8_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 7 : Status on whether PIN7 has met criteria set in PIN_CNF7.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN7_Pos (7UL) /*!< Position of PIN7 field. */ +#define GPIO_LATCH_PIN7_Msk (0x1UL << GPIO_LATCH_PIN7_Pos) /*!< Bit mask of PIN7 field. */ +#define GPIO_LATCH_PIN7_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN7_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 6 : Status on whether PIN6 has met criteria set in PIN_CNF6.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN6_Pos (6UL) /*!< Position of PIN6 field. */ +#define GPIO_LATCH_PIN6_Msk (0x1UL << GPIO_LATCH_PIN6_Pos) /*!< Bit mask of PIN6 field. */ +#define GPIO_LATCH_PIN6_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN6_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 5 : Status on whether PIN5 has met criteria set in PIN_CNF5.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN5_Pos (5UL) /*!< Position of PIN5 field. */ +#define GPIO_LATCH_PIN5_Msk (0x1UL << GPIO_LATCH_PIN5_Pos) /*!< Bit mask of PIN5 field. */ +#define GPIO_LATCH_PIN5_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN5_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 4 : Status on whether PIN4 has met criteria set in PIN_CNF4.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN4_Pos (4UL) /*!< Position of PIN4 field. */ +#define GPIO_LATCH_PIN4_Msk (0x1UL << GPIO_LATCH_PIN4_Pos) /*!< Bit mask of PIN4 field. */ +#define GPIO_LATCH_PIN4_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN4_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 3 : Status on whether PIN3 has met criteria set in PIN_CNF3.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN3_Pos (3UL) /*!< Position of PIN3 field. */ +#define GPIO_LATCH_PIN3_Msk (0x1UL << GPIO_LATCH_PIN3_Pos) /*!< Bit mask of PIN3 field. */ +#define GPIO_LATCH_PIN3_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN3_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 2 : Status on whether PIN2 has met criteria set in PIN_CNF2.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN2_Pos (2UL) /*!< Position of PIN2 field. */ +#define GPIO_LATCH_PIN2_Msk (0x1UL << GPIO_LATCH_PIN2_Pos) /*!< Bit mask of PIN2 field. */ +#define GPIO_LATCH_PIN2_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN2_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 1 : Status on whether PIN1 has met criteria set in PIN_CNF1.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN1_Pos (1UL) /*!< Position of PIN1 field. */ +#define GPIO_LATCH_PIN1_Msk (0x1UL << GPIO_LATCH_PIN1_Pos) /*!< Bit mask of PIN1 field. */ +#define GPIO_LATCH_PIN1_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN1_Latched (1UL) /*!< Criteria has been met */ + +/* Bit 0 : Status on whether PIN0 has met criteria set in PIN_CNF0.SENSE register. Write '1' to clear. */ +#define GPIO_LATCH_PIN0_Pos (0UL) /*!< Position of PIN0 field. */ +#define GPIO_LATCH_PIN0_Msk (0x1UL << GPIO_LATCH_PIN0_Pos) /*!< Bit mask of PIN0 field. */ +#define GPIO_LATCH_PIN0_NotLatched (0UL) /*!< Criteria has not been met */ +#define GPIO_LATCH_PIN0_Latched (1UL) /*!< Criteria has been met */ + +/* Register: GPIO_DETECTMODE */ +/* Description: Select between default DETECT signal behaviour and LDETECT mode */ + +/* Bit 0 : Select between default DETECT signal behaviour and LDETECT mode */ +#define GPIO_DETECTMODE_DETECTMODE_Pos (0UL) /*!< Position of DETECTMODE field. */ +#define GPIO_DETECTMODE_DETECTMODE_Msk (0x1UL << GPIO_DETECTMODE_DETECTMODE_Pos) /*!< Bit mask of DETECTMODE field. */ +#define GPIO_DETECTMODE_DETECTMODE_Default (0UL) /*!< DETECT directly connected to PIN DETECT signals */ +#define GPIO_DETECTMODE_DETECTMODE_LDETECT (1UL) /*!< Use the latched LDETECT behaviour */ + +/* Register: GPIO_PIN_CNF */ +/* Description: Description collection[0]: Configuration of GPIO pins */ + +/* Bits 17..16 : Pin sensing mechanism */ +#define GPIO_PIN_CNF_SENSE_Pos (16UL) /*!< Position of SENSE field. */ +#define GPIO_PIN_CNF_SENSE_Msk (0x3UL << GPIO_PIN_CNF_SENSE_Pos) /*!< Bit mask of SENSE field. */ +#define GPIO_PIN_CNF_SENSE_Disabled (0UL) /*!< Disabled */ +#define GPIO_PIN_CNF_SENSE_High (2UL) /*!< Sense for high level */ +#define GPIO_PIN_CNF_SENSE_Low (3UL) /*!< Sense for low level */ + +/* Bits 10..8 : Drive configuration */ +#define GPIO_PIN_CNF_DRIVE_Pos (8UL) /*!< Position of DRIVE field. */ +#define GPIO_PIN_CNF_DRIVE_Msk (0x7UL << GPIO_PIN_CNF_DRIVE_Pos) /*!< Bit mask of DRIVE field. */ +#define GPIO_PIN_CNF_DRIVE_S0S1 (0UL) /*!< Standard '0', standard '1' */ +#define GPIO_PIN_CNF_DRIVE_H0S1 (1UL) /*!< High drive '0', standard '1' */ +#define GPIO_PIN_CNF_DRIVE_S0H1 (2UL) /*!< Standard '0', high drive '1' */ +#define GPIO_PIN_CNF_DRIVE_H0H1 (3UL) /*!< High drive '0', high 'drive '1'' */ +#define GPIO_PIN_CNF_DRIVE_D0S1 (4UL) /*!< Disconnect '0' standard '1' (normally used for wired-or connections) */ +#define GPIO_PIN_CNF_DRIVE_D0H1 (5UL) /*!< Disconnect '0', high drive '1' (normally used for wired-or connections) */ +#define GPIO_PIN_CNF_DRIVE_S0D1 (6UL) /*!< Standard '0'. disconnect '1' (normally used for wired-and connections) */ +#define GPIO_PIN_CNF_DRIVE_H0D1 (7UL) /*!< High drive '0', disconnect '1' (normally used for wired-and connections) */ + +/* Bits 3..2 : Pull configuration */ +#define GPIO_PIN_CNF_PULL_Pos (2UL) /*!< Position of PULL field. */ +#define GPIO_PIN_CNF_PULL_Msk (0x3UL << GPIO_PIN_CNF_PULL_Pos) /*!< Bit mask of PULL field. */ +#define GPIO_PIN_CNF_PULL_Disabled (0UL) /*!< No pull */ +#define GPIO_PIN_CNF_PULL_Pulldown (1UL) /*!< Pull down on pin */ +#define GPIO_PIN_CNF_PULL_Pullup (3UL) /*!< Pull up on pin */ + +/* Bit 1 : Connect or disconnect input buffer */ +#define GPIO_PIN_CNF_INPUT_Pos (1UL) /*!< Position of INPUT field. */ +#define GPIO_PIN_CNF_INPUT_Msk (0x1UL << GPIO_PIN_CNF_INPUT_Pos) /*!< Bit mask of INPUT field. */ +#define GPIO_PIN_CNF_INPUT_Connect (0UL) /*!< Connect input buffer */ +#define GPIO_PIN_CNF_INPUT_Disconnect (1UL) /*!< Disconnect input buffer */ + +/* Bit 0 : Pin direction. Same physical register as DIR register */ +#define GPIO_PIN_CNF_DIR_Pos (0UL) /*!< Position of DIR field. */ +#define GPIO_PIN_CNF_DIR_Msk (0x1UL << GPIO_PIN_CNF_DIR_Pos) /*!< Bit mask of DIR field. */ +#define GPIO_PIN_CNF_DIR_Input (0UL) /*!< Configure pin as an input pin */ +#define GPIO_PIN_CNF_DIR_Output (1UL) /*!< Configure pin as an output pin */ + + +/* Peripheral: PDM */ +/* Description: Pulse Density Modulation (Digital Microphone) Interface */ + +/* Register: PDM_INTEN */ +/* Description: Enable or disable interrupt */ + +/* Bit 2 : Enable or disable interrupt for END event */ +#define PDM_INTEN_END_Pos (2UL) /*!< Position of END field. */ +#define PDM_INTEN_END_Msk (0x1UL << PDM_INTEN_END_Pos) /*!< Bit mask of END field. */ +#define PDM_INTEN_END_Disabled (0UL) /*!< Disable */ +#define PDM_INTEN_END_Enabled (1UL) /*!< Enable */ + +/* Bit 1 : Enable or disable interrupt for STOPPED event */ +#define PDM_INTEN_STOPPED_Pos (1UL) /*!< Position of STOPPED field. */ +#define PDM_INTEN_STOPPED_Msk (0x1UL << PDM_INTEN_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define PDM_INTEN_STOPPED_Disabled (0UL) /*!< Disable */ +#define PDM_INTEN_STOPPED_Enabled (1UL) /*!< Enable */ + +/* Bit 0 : Enable or disable interrupt for STARTED event */ +#define PDM_INTEN_STARTED_Pos (0UL) /*!< Position of STARTED field. */ +#define PDM_INTEN_STARTED_Msk (0x1UL << PDM_INTEN_STARTED_Pos) /*!< Bit mask of STARTED field. */ +#define PDM_INTEN_STARTED_Disabled (0UL) /*!< Disable */ +#define PDM_INTEN_STARTED_Enabled (1UL) /*!< Enable */ + +/* Register: PDM_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 2 : Write '1' to Enable interrupt for END event */ +#define PDM_INTENSET_END_Pos (2UL) /*!< Position of END field. */ +#define PDM_INTENSET_END_Msk (0x1UL << PDM_INTENSET_END_Pos) /*!< Bit mask of END field. */ +#define PDM_INTENSET_END_Disabled (0UL) /*!< Read: Disabled */ +#define PDM_INTENSET_END_Enabled (1UL) /*!< Read: Enabled */ +#define PDM_INTENSET_END_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for STOPPED event */ +#define PDM_INTENSET_STOPPED_Pos (1UL) /*!< Position of STOPPED field. */ +#define PDM_INTENSET_STOPPED_Msk (0x1UL << PDM_INTENSET_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define PDM_INTENSET_STOPPED_Disabled (0UL) /*!< Read: Disabled */ +#define PDM_INTENSET_STOPPED_Enabled (1UL) /*!< Read: Enabled */ +#define PDM_INTENSET_STOPPED_Set (1UL) /*!< Enable */ + +/* Bit 0 : Write '1' to Enable interrupt for STARTED event */ +#define PDM_INTENSET_STARTED_Pos (0UL) /*!< Position of STARTED field. */ +#define PDM_INTENSET_STARTED_Msk (0x1UL << PDM_INTENSET_STARTED_Pos) /*!< Bit mask of STARTED field. */ +#define PDM_INTENSET_STARTED_Disabled (0UL) /*!< Read: Disabled */ +#define PDM_INTENSET_STARTED_Enabled (1UL) /*!< Read: Enabled */ +#define PDM_INTENSET_STARTED_Set (1UL) /*!< Enable */ + +/* Register: PDM_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 2 : Write '1' to Disable interrupt for END event */ +#define PDM_INTENCLR_END_Pos (2UL) /*!< Position of END field. */ +#define PDM_INTENCLR_END_Msk (0x1UL << PDM_INTENCLR_END_Pos) /*!< Bit mask of END field. */ +#define PDM_INTENCLR_END_Disabled (0UL) /*!< Read: Disabled */ +#define PDM_INTENCLR_END_Enabled (1UL) /*!< Read: Enabled */ +#define PDM_INTENCLR_END_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for STOPPED event */ +#define PDM_INTENCLR_STOPPED_Pos (1UL) /*!< Position of STOPPED field. */ +#define PDM_INTENCLR_STOPPED_Msk (0x1UL << PDM_INTENCLR_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define PDM_INTENCLR_STOPPED_Disabled (0UL) /*!< Read: Disabled */ +#define PDM_INTENCLR_STOPPED_Enabled (1UL) /*!< Read: Enabled */ +#define PDM_INTENCLR_STOPPED_Clear (1UL) /*!< Disable */ + +/* Bit 0 : Write '1' to Disable interrupt for STARTED event */ +#define PDM_INTENCLR_STARTED_Pos (0UL) /*!< Position of STARTED field. */ +#define PDM_INTENCLR_STARTED_Msk (0x1UL << PDM_INTENCLR_STARTED_Pos) /*!< Bit mask of STARTED field. */ +#define PDM_INTENCLR_STARTED_Disabled (0UL) /*!< Read: Disabled */ +#define PDM_INTENCLR_STARTED_Enabled (1UL) /*!< Read: Enabled */ +#define PDM_INTENCLR_STARTED_Clear (1UL) /*!< Disable */ + +/* Register: PDM_ENABLE */ +/* Description: PDM module enable register */ + +/* Bit 0 : Enable or disable PDM module */ +#define PDM_ENABLE_ENABLE_Pos (0UL) /*!< Position of ENABLE field. */ +#define PDM_ENABLE_ENABLE_Msk (0x1UL << PDM_ENABLE_ENABLE_Pos) /*!< Bit mask of ENABLE field. */ +#define PDM_ENABLE_ENABLE_Disabled (0UL) /*!< Disable */ +#define PDM_ENABLE_ENABLE_Enabled (1UL) /*!< Enable */ + +/* Register: PDM_PDMCLKCTRL */ +/* Description: PDM clock generator control */ + +/* Bits 31..0 : PDM_CLK frequency */ +#define PDM_PDMCLKCTRL_FREQ_Pos (0UL) /*!< Position of FREQ field. */ +#define PDM_PDMCLKCTRL_FREQ_Msk (0xFFFFFFFFUL << PDM_PDMCLKCTRL_FREQ_Pos) /*!< Bit mask of FREQ field. */ +#define PDM_PDMCLKCTRL_FREQ_1000K (0x08000000UL) /*!< PDM_CLK = 32 MHz / 32 = 1.000 MHz */ +#define PDM_PDMCLKCTRL_FREQ_Default (0x08400000UL) /*!< PDM_CLK = 32 MHz / 31 = 1.032 MHz */ +#define PDM_PDMCLKCTRL_FREQ_1067K (0x08800000UL) /*!< PDM_CLK = 32 MHz / 30 = 1.067 MHz */ + +/* Register: PDM_MODE */ +/* Description: Defines the routing of the connected PDM microphones' signals */ + +/* Bit 1 : Defines on which PDM_CLK edge Left (or mono) is sampled */ +#define PDM_MODE_EDGE_Pos (1UL) /*!< Position of EDGE field. */ +#define PDM_MODE_EDGE_Msk (0x1UL << PDM_MODE_EDGE_Pos) /*!< Bit mask of EDGE field. */ +#define PDM_MODE_EDGE_LeftFalling (0UL) /*!< Left (or mono) is sampled on falling edge of PDM_CLK */ +#define PDM_MODE_EDGE_LeftRising (1UL) /*!< Left (or mono) is sampled on rising edge of PDM_CLK */ + +/* Bit 0 : Mono or stereo operation */ +#define PDM_MODE_OPERATION_Pos (0UL) /*!< Position of OPERATION field. */ +#define PDM_MODE_OPERATION_Msk (0x1UL << PDM_MODE_OPERATION_Pos) /*!< Bit mask of OPERATION field. */ +#define PDM_MODE_OPERATION_Stereo (0UL) /*!< Sample and store one pair (Left + Right) of 16bit samples per RAM word R=[31:16]; L=[15:0] */ +#define PDM_MODE_OPERATION_Mono (1UL) /*!< Sample and store two successive Left samples (16 bit each) per RAM word L1=[31:16]; L0=[15:0] */ + +/* Register: PDM_GAINL */ +/* Description: Left output gain adjustment */ + +/* Bits 6..0 : Left output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters) 0x00 -20 dB gain adjust 0x01 -19.5 dB gain adjust (...) 0x27 -0.5 dB gain adjust 0x28 0 dB gain adjust 0x29 +0.5 dB gain adjust (...) 0x4F +19.5 dB gain adjust 0x50 +20 dB gain adjust */ +#define PDM_GAINL_GAINL_Pos (0UL) /*!< Position of GAINL field. */ +#define PDM_GAINL_GAINL_Msk (0x7FUL << PDM_GAINL_GAINL_Pos) /*!< Bit mask of GAINL field. */ +#define PDM_GAINL_GAINL_MinGain (0x00UL) /*!< -20dB gain adjustment (minimum) */ +#define PDM_GAINL_GAINL_DefaultGain (0x28UL) /*!< 0dB gain adjustment ('2500 RMS' requirement) */ +#define PDM_GAINL_GAINL_MaxGain (0x50UL) /*!< +20dB gain adjustment (maximum) */ + +/* Register: PDM_GAINR */ +/* Description: Right output gain adjustment */ + +/* Bits 7..0 : Right output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters) */ +#define PDM_GAINR_GAINR_Pos (0UL) /*!< Position of GAINR field. */ +#define PDM_GAINR_GAINR_Msk (0xFFUL << PDM_GAINR_GAINR_Pos) /*!< Bit mask of GAINR field. */ +#define PDM_GAINR_GAINR_MinGain (0x00UL) /*!< -20dB gain adjustment (minimum) */ +#define PDM_GAINR_GAINR_DefaultGain (0x28UL) /*!< 0dB gain adjustment ('2500 RMS' requirement) */ +#define PDM_GAINR_GAINR_MaxGain (0x50UL) /*!< +20dB gain adjustment (maximum) */ + +/* Register: PDM_PSEL_CLK */ +/* Description: Pin number configuration for PDM CLK signal */ + +/* Bit 31 : Connection */ +#define PDM_PSEL_CLK_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define PDM_PSEL_CLK_CONNECT_Msk (0x1UL << PDM_PSEL_CLK_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define PDM_PSEL_CLK_CONNECT_Connected (0UL) /*!< Connect */ +#define PDM_PSEL_CLK_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define PDM_PSEL_CLK_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define PDM_PSEL_CLK_PIN_Msk (0x1FUL << PDM_PSEL_CLK_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: PDM_PSEL_DIN */ +/* Description: Pin number configuration for PDM DIN signal */ + +/* Bit 31 : Connection */ +#define PDM_PSEL_DIN_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define PDM_PSEL_DIN_CONNECT_Msk (0x1UL << PDM_PSEL_DIN_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define PDM_PSEL_DIN_CONNECT_Connected (0UL) /*!< Connect */ +#define PDM_PSEL_DIN_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define PDM_PSEL_DIN_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define PDM_PSEL_DIN_PIN_Msk (0x1FUL << PDM_PSEL_DIN_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: PDM_SAMPLE_PTR */ +/* Description: RAM address pointer to write samples to with EasyDMA */ + +/* Bits 31..0 : Address to write PDM samples to over DMA */ +#define PDM_SAMPLE_PTR_SAMPLEPTR_Pos (0UL) /*!< Position of SAMPLEPTR field. */ +#define PDM_SAMPLE_PTR_SAMPLEPTR_Msk (0xFFFFFFFFUL << PDM_SAMPLE_PTR_SAMPLEPTR_Pos) /*!< Bit mask of SAMPLEPTR field. */ + +/* Register: PDM_SAMPLE_MAXCNT */ +/* Description: Number of samples to allocate memory for in EasyDMA mode */ + +/* Bits 14..0 : Length of DMA RAM allocation in number of samples */ +#define PDM_SAMPLE_MAXCNT_BUFFSIZE_Pos (0UL) /*!< Position of BUFFSIZE field. */ +#define PDM_SAMPLE_MAXCNT_BUFFSIZE_Msk (0x7FFFUL << PDM_SAMPLE_MAXCNT_BUFFSIZE_Pos) /*!< Bit mask of BUFFSIZE field. */ + + +/* Peripheral: POWER */ +/* Description: Power control */ + +/* Register: POWER_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 6 : Write '1' to Enable interrupt for SLEEPEXIT event */ +#define POWER_INTENSET_SLEEPEXIT_Pos (6UL) /*!< Position of SLEEPEXIT field. */ +#define POWER_INTENSET_SLEEPEXIT_Msk (0x1UL << POWER_INTENSET_SLEEPEXIT_Pos) /*!< Bit mask of SLEEPEXIT field. */ +#define POWER_INTENSET_SLEEPEXIT_Disabled (0UL) /*!< Read: Disabled */ +#define POWER_INTENSET_SLEEPEXIT_Enabled (1UL) /*!< Read: Enabled */ +#define POWER_INTENSET_SLEEPEXIT_Set (1UL) /*!< Enable */ + +/* Bit 5 : Write '1' to Enable interrupt for SLEEPENTER event */ +#define POWER_INTENSET_SLEEPENTER_Pos (5UL) /*!< Position of SLEEPENTER field. */ +#define POWER_INTENSET_SLEEPENTER_Msk (0x1UL << POWER_INTENSET_SLEEPENTER_Pos) /*!< Bit mask of SLEEPENTER field. */ +#define POWER_INTENSET_SLEEPENTER_Disabled (0UL) /*!< Read: Disabled */ +#define POWER_INTENSET_SLEEPENTER_Enabled (1UL) /*!< Read: Enabled */ +#define POWER_INTENSET_SLEEPENTER_Set (1UL) /*!< Enable */ + +/* Bit 2 : Write '1' to Enable interrupt for POFWARN event */ +#define POWER_INTENSET_POFWARN_Pos (2UL) /*!< Position of POFWARN field. */ +#define POWER_INTENSET_POFWARN_Msk (0x1UL << POWER_INTENSET_POFWARN_Pos) /*!< Bit mask of POFWARN field. */ +#define POWER_INTENSET_POFWARN_Disabled (0UL) /*!< Read: Disabled */ +#define POWER_INTENSET_POFWARN_Enabled (1UL) /*!< Read: Enabled */ +#define POWER_INTENSET_POFWARN_Set (1UL) /*!< Enable */ + +/* Register: POWER_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 6 : Write '1' to Disable interrupt for SLEEPEXIT event */ +#define POWER_INTENCLR_SLEEPEXIT_Pos (6UL) /*!< Position of SLEEPEXIT field. */ +#define POWER_INTENCLR_SLEEPEXIT_Msk (0x1UL << POWER_INTENCLR_SLEEPEXIT_Pos) /*!< Bit mask of SLEEPEXIT field. */ +#define POWER_INTENCLR_SLEEPEXIT_Disabled (0UL) /*!< Read: Disabled */ +#define POWER_INTENCLR_SLEEPEXIT_Enabled (1UL) /*!< Read: Enabled */ +#define POWER_INTENCLR_SLEEPEXIT_Clear (1UL) /*!< Disable */ + +/* Bit 5 : Write '1' to Disable interrupt for SLEEPENTER event */ +#define POWER_INTENCLR_SLEEPENTER_Pos (5UL) /*!< Position of SLEEPENTER field. */ +#define POWER_INTENCLR_SLEEPENTER_Msk (0x1UL << POWER_INTENCLR_SLEEPENTER_Pos) /*!< Bit mask of SLEEPENTER field. */ +#define POWER_INTENCLR_SLEEPENTER_Disabled (0UL) /*!< Read: Disabled */ +#define POWER_INTENCLR_SLEEPENTER_Enabled (1UL) /*!< Read: Enabled */ +#define POWER_INTENCLR_SLEEPENTER_Clear (1UL) /*!< Disable */ + +/* Bit 2 : Write '1' to Disable interrupt for POFWARN event */ +#define POWER_INTENCLR_POFWARN_Pos (2UL) /*!< Position of POFWARN field. */ +#define POWER_INTENCLR_POFWARN_Msk (0x1UL << POWER_INTENCLR_POFWARN_Pos) /*!< Bit mask of POFWARN field. */ +#define POWER_INTENCLR_POFWARN_Disabled (0UL) /*!< Read: Disabled */ +#define POWER_INTENCLR_POFWARN_Enabled (1UL) /*!< Read: Enabled */ +#define POWER_INTENCLR_POFWARN_Clear (1UL) /*!< Disable */ + +/* Register: POWER_RESETREAS */ +/* Description: Reset reason */ + +/* Bit 19 : Reset due to wake up from System OFF mode by NFC field detect */ +#define POWER_RESETREAS_NFC_Pos (19UL) /*!< Position of NFC field. */ +#define POWER_RESETREAS_NFC_Msk (0x1UL << POWER_RESETREAS_NFC_Pos) /*!< Bit mask of NFC field. */ +#define POWER_RESETREAS_NFC_NotDetected (0UL) /*!< Not detected */ +#define POWER_RESETREAS_NFC_Detected (1UL) /*!< Detected */ + +/* Bit 18 : Reset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode */ +#define POWER_RESETREAS_DIF_Pos (18UL) /*!< Position of DIF field. */ +#define POWER_RESETREAS_DIF_Msk (0x1UL << POWER_RESETREAS_DIF_Pos) /*!< Bit mask of DIF field. */ +#define POWER_RESETREAS_DIF_NotDetected (0UL) /*!< Not detected */ +#define POWER_RESETREAS_DIF_Detected (1UL) /*!< Detected */ + +/* Bit 17 : Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP */ +#define POWER_RESETREAS_LPCOMP_Pos (17UL) /*!< Position of LPCOMP field. */ +#define POWER_RESETREAS_LPCOMP_Msk (0x1UL << POWER_RESETREAS_LPCOMP_Pos) /*!< Bit mask of LPCOMP field. */ +#define POWER_RESETREAS_LPCOMP_NotDetected (0UL) /*!< Not detected */ +#define POWER_RESETREAS_LPCOMP_Detected (1UL) /*!< Detected */ + +/* Bit 16 : Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO */ +#define POWER_RESETREAS_OFF_Pos (16UL) /*!< Position of OFF field. */ +#define POWER_RESETREAS_OFF_Msk (0x1UL << POWER_RESETREAS_OFF_Pos) /*!< Bit mask of OFF field. */ +#define POWER_RESETREAS_OFF_NotDetected (0UL) /*!< Not detected */ +#define POWER_RESETREAS_OFF_Detected (1UL) /*!< Detected */ + +/* Bit 3 : Reset from CPU lock-up detected */ +#define POWER_RESETREAS_LOCKUP_Pos (3UL) /*!< Position of LOCKUP field. */ +#define POWER_RESETREAS_LOCKUP_Msk (0x1UL << POWER_RESETREAS_LOCKUP_Pos) /*!< Bit mask of LOCKUP field. */ +#define POWER_RESETREAS_LOCKUP_NotDetected (0UL) /*!< Not detected */ +#define POWER_RESETREAS_LOCKUP_Detected (1UL) /*!< Detected */ + +/* Bit 2 : Reset from soft reset detected */ +#define POWER_RESETREAS_SREQ_Pos (2UL) /*!< Position of SREQ field. */ +#define POWER_RESETREAS_SREQ_Msk (0x1UL << POWER_RESETREAS_SREQ_Pos) /*!< Bit mask of SREQ field. */ +#define POWER_RESETREAS_SREQ_NotDetected (0UL) /*!< Not detected */ +#define POWER_RESETREAS_SREQ_Detected (1UL) /*!< Detected */ + +/* Bit 1 : Reset from watchdog detected */ +#define POWER_RESETREAS_DOG_Pos (1UL) /*!< Position of DOG field. */ +#define POWER_RESETREAS_DOG_Msk (0x1UL << POWER_RESETREAS_DOG_Pos) /*!< Bit mask of DOG field. */ +#define POWER_RESETREAS_DOG_NotDetected (0UL) /*!< Not detected */ +#define POWER_RESETREAS_DOG_Detected (1UL) /*!< Detected */ + +/* Bit 0 : Reset from pin-reset detected */ +#define POWER_RESETREAS_RESETPIN_Pos (0UL) /*!< Position of RESETPIN field. */ +#define POWER_RESETREAS_RESETPIN_Msk (0x1UL << POWER_RESETREAS_RESETPIN_Pos) /*!< Bit mask of RESETPIN field. */ +#define POWER_RESETREAS_RESETPIN_NotDetected (0UL) /*!< Not detected */ +#define POWER_RESETREAS_RESETPIN_Detected (1UL) /*!< Detected */ + +/* Register: POWER_RAMSTATUS */ +/* Description: Deprecated register - RAM status register */ + +/* Bit 3 : RAM block 3 is on or off/powering up */ +#define POWER_RAMSTATUS_RAMBLOCK3_Pos (3UL) /*!< Position of RAMBLOCK3 field. */ +#define POWER_RAMSTATUS_RAMBLOCK3_Msk (0x1UL << POWER_RAMSTATUS_RAMBLOCK3_Pos) /*!< Bit mask of RAMBLOCK3 field. */ +#define POWER_RAMSTATUS_RAMBLOCK3_Off (0UL) /*!< Off */ +#define POWER_RAMSTATUS_RAMBLOCK3_On (1UL) /*!< On */ + +/* Bit 2 : RAM block 2 is on or off/powering up */ +#define POWER_RAMSTATUS_RAMBLOCK2_Pos (2UL) /*!< Position of RAMBLOCK2 field. */ +#define POWER_RAMSTATUS_RAMBLOCK2_Msk (0x1UL << POWER_RAMSTATUS_RAMBLOCK2_Pos) /*!< Bit mask of RAMBLOCK2 field. */ +#define POWER_RAMSTATUS_RAMBLOCK2_Off (0UL) /*!< Off */ +#define POWER_RAMSTATUS_RAMBLOCK2_On (1UL) /*!< On */ + +/* Bit 1 : RAM block 1 is on or off/powering up */ +#define POWER_RAMSTATUS_RAMBLOCK1_Pos (1UL) /*!< Position of RAMBLOCK1 field. */ +#define POWER_RAMSTATUS_RAMBLOCK1_Msk (0x1UL << POWER_RAMSTATUS_RAMBLOCK1_Pos) /*!< Bit mask of RAMBLOCK1 field. */ +#define POWER_RAMSTATUS_RAMBLOCK1_Off (0UL) /*!< Off */ +#define POWER_RAMSTATUS_RAMBLOCK1_On (1UL) /*!< On */ + +/* Bit 0 : RAM block 0 is on or off/powering up */ +#define POWER_RAMSTATUS_RAMBLOCK0_Pos (0UL) /*!< Position of RAMBLOCK0 field. */ +#define POWER_RAMSTATUS_RAMBLOCK0_Msk (0x1UL << POWER_RAMSTATUS_RAMBLOCK0_Pos) /*!< Bit mask of RAMBLOCK0 field. */ +#define POWER_RAMSTATUS_RAMBLOCK0_Off (0UL) /*!< Off */ +#define POWER_RAMSTATUS_RAMBLOCK0_On (1UL) /*!< On */ + +/* Register: POWER_SYSTEMOFF */ +/* Description: System OFF register */ + +/* Bit 0 : Enable System OFF mode */ +#define POWER_SYSTEMOFF_SYSTEMOFF_Pos (0UL) /*!< Position of SYSTEMOFF field. */ +#define POWER_SYSTEMOFF_SYSTEMOFF_Msk (0x1UL << POWER_SYSTEMOFF_SYSTEMOFF_Pos) /*!< Bit mask of SYSTEMOFF field. */ +#define POWER_SYSTEMOFF_SYSTEMOFF_Enter (1UL) /*!< Enable System OFF mode */ + +/* Register: POWER_POFCON */ +/* Description: Power failure comparator configuration */ + +/* Bits 4..1 : Power failure comparator threshold setting */ +#define POWER_POFCON_THRESHOLD_Pos (1UL) /*!< Position of THRESHOLD field. */ +#define POWER_POFCON_THRESHOLD_Msk (0xFUL << POWER_POFCON_THRESHOLD_Pos) /*!< Bit mask of THRESHOLD field. */ +#define POWER_POFCON_THRESHOLD_V17 (4UL) /*!< Set threshold to 1.7 V */ +#define POWER_POFCON_THRESHOLD_V18 (5UL) /*!< Set threshold to 1.8 V */ +#define POWER_POFCON_THRESHOLD_V19 (6UL) /*!< Set threshold to 1.9 V */ +#define POWER_POFCON_THRESHOLD_V20 (7UL) /*!< Set threshold to 2.0 V */ +#define POWER_POFCON_THRESHOLD_V21 (8UL) /*!< Set threshold to 2.1 V */ +#define POWER_POFCON_THRESHOLD_V22 (9UL) /*!< Set threshold to 2.2 V */ +#define POWER_POFCON_THRESHOLD_V23 (10UL) /*!< Set threshold to 2.3 V */ +#define POWER_POFCON_THRESHOLD_V24 (11UL) /*!< Set threshold to 2.4 V */ +#define POWER_POFCON_THRESHOLD_V25 (12UL) /*!< Set threshold to 2.5 V */ +#define POWER_POFCON_THRESHOLD_V26 (13UL) /*!< Set threshold to 2.6 V */ +#define POWER_POFCON_THRESHOLD_V27 (14UL) /*!< Set threshold to 2.7 V */ +#define POWER_POFCON_THRESHOLD_V28 (15UL) /*!< Set threshold to 2.8 V */ + +/* Bit 0 : Enable or disable power failure comparator */ +#define POWER_POFCON_POF_Pos (0UL) /*!< Position of POF field. */ +#define POWER_POFCON_POF_Msk (0x1UL << POWER_POFCON_POF_Pos) /*!< Bit mask of POF field. */ +#define POWER_POFCON_POF_Disabled (0UL) /*!< Disable */ +#define POWER_POFCON_POF_Enabled (1UL) /*!< Enable */ + +/* Register: POWER_GPREGRET */ +/* Description: General purpose retention register */ + +/* Bits 7..0 : General purpose retention register */ +#define POWER_GPREGRET_GPREGRET_Pos (0UL) /*!< Position of GPREGRET field. */ +#define POWER_GPREGRET_GPREGRET_Msk (0xFFUL << POWER_GPREGRET_GPREGRET_Pos) /*!< Bit mask of GPREGRET field. */ + +/* Register: POWER_GPREGRET2 */ +/* Description: General purpose retention register */ + +/* Bits 7..0 : General purpose retention register */ +#define POWER_GPREGRET2_GPREGRET_Pos (0UL) /*!< Position of GPREGRET field. */ +#define POWER_GPREGRET2_GPREGRET_Msk (0xFFUL << POWER_GPREGRET2_GPREGRET_Pos) /*!< Bit mask of GPREGRET field. */ + +/* Register: POWER_RAMON */ +/* Description: Deprecated register - RAM on/off register (this register is retained) */ + +/* Bit 17 : Keep retention on RAM block 1 when RAM block is switched off */ +#define POWER_RAMON_OFFRAM1_Pos (17UL) /*!< Position of OFFRAM1 field. */ +#define POWER_RAMON_OFFRAM1_Msk (0x1UL << POWER_RAMON_OFFRAM1_Pos) /*!< Bit mask of OFFRAM1 field. */ +#define POWER_RAMON_OFFRAM1_RAM1Off (0UL) /*!< Off */ +#define POWER_RAMON_OFFRAM1_RAM1On (1UL) /*!< On */ + +/* Bit 16 : Keep retention on RAM block 0 when RAM block is switched off */ +#define POWER_RAMON_OFFRAM0_Pos (16UL) /*!< Position of OFFRAM0 field. */ +#define POWER_RAMON_OFFRAM0_Msk (0x1UL << POWER_RAMON_OFFRAM0_Pos) /*!< Bit mask of OFFRAM0 field. */ +#define POWER_RAMON_OFFRAM0_RAM0Off (0UL) /*!< Off */ +#define POWER_RAMON_OFFRAM0_RAM0On (1UL) /*!< On */ + +/* Bit 1 : Keep RAM block 1 on or off in system ON Mode */ +#define POWER_RAMON_ONRAM1_Pos (1UL) /*!< Position of ONRAM1 field. */ +#define POWER_RAMON_ONRAM1_Msk (0x1UL << POWER_RAMON_ONRAM1_Pos) /*!< Bit mask of ONRAM1 field. */ +#define POWER_RAMON_ONRAM1_RAM1Off (0UL) /*!< Off */ +#define POWER_RAMON_ONRAM1_RAM1On (1UL) /*!< On */ + +/* Bit 0 : Keep RAM block 0 on or off in system ON Mode */ +#define POWER_RAMON_ONRAM0_Pos (0UL) /*!< Position of ONRAM0 field. */ +#define POWER_RAMON_ONRAM0_Msk (0x1UL << POWER_RAMON_ONRAM0_Pos) /*!< Bit mask of ONRAM0 field. */ +#define POWER_RAMON_ONRAM0_RAM0Off (0UL) /*!< Off */ +#define POWER_RAMON_ONRAM0_RAM0On (1UL) /*!< On */ + +/* Register: POWER_RAMONB */ +/* Description: Deprecated register - RAM on/off register (this register is retained) */ + +/* Bit 17 : Keep retention on RAM block 3 when RAM block is switched off */ +#define POWER_RAMONB_OFFRAM3_Pos (17UL) /*!< Position of OFFRAM3 field. */ +#define POWER_RAMONB_OFFRAM3_Msk (0x1UL << POWER_RAMONB_OFFRAM3_Pos) /*!< Bit mask of OFFRAM3 field. */ +#define POWER_RAMONB_OFFRAM3_RAM3Off (0UL) /*!< Off */ +#define POWER_RAMONB_OFFRAM3_RAM3On (1UL) /*!< On */ + +/* Bit 16 : Keep retention on RAM block 2 when RAM block is switched off */ +#define POWER_RAMONB_OFFRAM2_Pos (16UL) /*!< Position of OFFRAM2 field. */ +#define POWER_RAMONB_OFFRAM2_Msk (0x1UL << POWER_RAMONB_OFFRAM2_Pos) /*!< Bit mask of OFFRAM2 field. */ +#define POWER_RAMONB_OFFRAM2_RAM2Off (0UL) /*!< Off */ +#define POWER_RAMONB_OFFRAM2_RAM2On (1UL) /*!< On */ + +/* Bit 1 : Keep RAM block 3 on or off in system ON Mode */ +#define POWER_RAMONB_ONRAM3_Pos (1UL) /*!< Position of ONRAM3 field. */ +#define POWER_RAMONB_ONRAM3_Msk (0x1UL << POWER_RAMONB_ONRAM3_Pos) /*!< Bit mask of ONRAM3 field. */ +#define POWER_RAMONB_ONRAM3_RAM3Off (0UL) /*!< Off */ +#define POWER_RAMONB_ONRAM3_RAM3On (1UL) /*!< On */ + +/* Bit 0 : Keep RAM block 2 on or off in system ON Mode */ +#define POWER_RAMONB_ONRAM2_Pos (0UL) /*!< Position of ONRAM2 field. */ +#define POWER_RAMONB_ONRAM2_Msk (0x1UL << POWER_RAMONB_ONRAM2_Pos) /*!< Bit mask of ONRAM2 field. */ +#define POWER_RAMONB_ONRAM2_RAM2Off (0UL) /*!< Off */ +#define POWER_RAMONB_ONRAM2_RAM2On (1UL) /*!< On */ + +/* Register: POWER_DCDCEN */ +/* Description: DC/DC enable register */ + +/* Bit 0 : Enable or disable DC/DC converter */ +#define POWER_DCDCEN_DCDCEN_Pos (0UL) /*!< Position of DCDCEN field. */ +#define POWER_DCDCEN_DCDCEN_Msk (0x1UL << POWER_DCDCEN_DCDCEN_Pos) /*!< Bit mask of DCDCEN field. */ +#define POWER_DCDCEN_DCDCEN_Disabled (0UL) /*!< Disable */ +#define POWER_DCDCEN_DCDCEN_Enabled (1UL) /*!< Enable */ + +/* Register: POWER_RAM_POWER */ +/* Description: Description cluster[0]: RAM0 power control register */ + +/* Bit 17 : Keep retention on RAM section S1 when RAM section is in OFF */ +#define POWER_RAM_POWER_S1RETENTION_Pos (17UL) /*!< Position of S1RETENTION field. */ +#define POWER_RAM_POWER_S1RETENTION_Msk (0x1UL << POWER_RAM_POWER_S1RETENTION_Pos) /*!< Bit mask of S1RETENTION field. */ +#define POWER_RAM_POWER_S1RETENTION_Off (0UL) /*!< Off */ +#define POWER_RAM_POWER_S1RETENTION_On (1UL) /*!< On */ + +/* Bit 16 : Keep retention on RAM section S0 when RAM section is in OFF */ +#define POWER_RAM_POWER_S0RETENTION_Pos (16UL) /*!< Position of S0RETENTION field. */ +#define POWER_RAM_POWER_S0RETENTION_Msk (0x1UL << POWER_RAM_POWER_S0RETENTION_Pos) /*!< Bit mask of S0RETENTION field. */ +#define POWER_RAM_POWER_S0RETENTION_Off (0UL) /*!< Off */ +#define POWER_RAM_POWER_S0RETENTION_On (1UL) /*!< On */ + +/* Bit 1 : Keep RAM section S1 ON or OFF in System ON mode. */ +#define POWER_RAM_POWER_S1POWER_Pos (1UL) /*!< Position of S1POWER field. */ +#define POWER_RAM_POWER_S1POWER_Msk (0x1UL << POWER_RAM_POWER_S1POWER_Pos) /*!< Bit mask of S1POWER field. */ +#define POWER_RAM_POWER_S1POWER_Off (0UL) /*!< Off */ +#define POWER_RAM_POWER_S1POWER_On (1UL) /*!< On */ + +/* Bit 0 : Keep RAM section S0 ON or OFF in System ON mode. */ +#define POWER_RAM_POWER_S0POWER_Pos (0UL) /*!< Position of S0POWER field. */ +#define POWER_RAM_POWER_S0POWER_Msk (0x1UL << POWER_RAM_POWER_S0POWER_Pos) /*!< Bit mask of S0POWER field. */ +#define POWER_RAM_POWER_S0POWER_Off (0UL) /*!< Off */ +#define POWER_RAM_POWER_S0POWER_On (1UL) /*!< On */ + +/* Register: POWER_RAM_POWERSET */ +/* Description: Description cluster[0]: RAM0 power control set register */ + +/* Bit 17 : Keep retention on RAM section S1 when RAM section is switched off */ +#define POWER_RAM_POWERSET_S1RETENTION_Pos (17UL) /*!< Position of S1RETENTION field. */ +#define POWER_RAM_POWERSET_S1RETENTION_Msk (0x1UL << POWER_RAM_POWERSET_S1RETENTION_Pos) /*!< Bit mask of S1RETENTION field. */ +#define POWER_RAM_POWERSET_S1RETENTION_On (1UL) /*!< On */ + +/* Bit 16 : Keep retention on RAM section S0 when RAM section is switched off */ +#define POWER_RAM_POWERSET_S0RETENTION_Pos (16UL) /*!< Position of S0RETENTION field. */ +#define POWER_RAM_POWERSET_S0RETENTION_Msk (0x1UL << POWER_RAM_POWERSET_S0RETENTION_Pos) /*!< Bit mask of S0RETENTION field. */ +#define POWER_RAM_POWERSET_S0RETENTION_On (1UL) /*!< On */ + +/* Bit 1 : Keep RAM section S1 of RAM0 on or off in System ON mode */ +#define POWER_RAM_POWERSET_S1POWER_Pos (1UL) /*!< Position of S1POWER field. */ +#define POWER_RAM_POWERSET_S1POWER_Msk (0x1UL << POWER_RAM_POWERSET_S1POWER_Pos) /*!< Bit mask of S1POWER field. */ +#define POWER_RAM_POWERSET_S1POWER_On (1UL) /*!< On */ + +/* Bit 0 : Keep RAM section S0 of RAM0 on or off in System ON mode */ +#define POWER_RAM_POWERSET_S0POWER_Pos (0UL) /*!< Position of S0POWER field. */ +#define POWER_RAM_POWERSET_S0POWER_Msk (0x1UL << POWER_RAM_POWERSET_S0POWER_Pos) /*!< Bit mask of S0POWER field. */ +#define POWER_RAM_POWERSET_S0POWER_On (1UL) /*!< On */ + +/* Register: POWER_RAM_POWERCLR */ +/* Description: Description cluster[0]: RAM0 power control clear register */ + +/* Bit 17 : Keep retention on RAM section S1 when RAM section is switched off */ +#define POWER_RAM_POWERCLR_S1RETENTION_Pos (17UL) /*!< Position of S1RETENTION field. */ +#define POWER_RAM_POWERCLR_S1RETENTION_Msk (0x1UL << POWER_RAM_POWERCLR_S1RETENTION_Pos) /*!< Bit mask of S1RETENTION field. */ +#define POWER_RAM_POWERCLR_S1RETENTION_Off (1UL) /*!< Off */ + +/* Bit 16 : Keep retention on RAM section S0 when RAM section is switched off */ +#define POWER_RAM_POWERCLR_S0RETENTION_Pos (16UL) /*!< Position of S0RETENTION field. */ +#define POWER_RAM_POWERCLR_S0RETENTION_Msk (0x1UL << POWER_RAM_POWERCLR_S0RETENTION_Pos) /*!< Bit mask of S0RETENTION field. */ +#define POWER_RAM_POWERCLR_S0RETENTION_Off (1UL) /*!< Off */ + +/* Bit 1 : Keep RAM section S1 of RAM0 on or off in System ON mode */ +#define POWER_RAM_POWERCLR_S1POWER_Pos (1UL) /*!< Position of S1POWER field. */ +#define POWER_RAM_POWERCLR_S1POWER_Msk (0x1UL << POWER_RAM_POWERCLR_S1POWER_Pos) /*!< Bit mask of S1POWER field. */ +#define POWER_RAM_POWERCLR_S1POWER_Off (1UL) /*!< Off */ + +/* Bit 0 : Keep RAM section S0 of RAM0 on or off in System ON mode */ +#define POWER_RAM_POWERCLR_S0POWER_Pos (0UL) /*!< Position of S0POWER field. */ +#define POWER_RAM_POWERCLR_S0POWER_Msk (0x1UL << POWER_RAM_POWERCLR_S0POWER_Pos) /*!< Bit mask of S0POWER field. */ +#define POWER_RAM_POWERCLR_S0POWER_Off (1UL) /*!< Off */ + + +/* Peripheral: PPI */ +/* Description: Programmable Peripheral Interconnect */ + +/* Register: PPI_CHEN */ +/* Description: Channel enable register */ + +/* Bit 31 : Enable or disable channel 31 */ +#define PPI_CHEN_CH31_Pos (31UL) /*!< Position of CH31 field. */ +#define PPI_CHEN_CH31_Msk (0x1UL << PPI_CHEN_CH31_Pos) /*!< Bit mask of CH31 field. */ +#define PPI_CHEN_CH31_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH31_Enabled (1UL) /*!< Enable channel */ + +/* Bit 30 : Enable or disable channel 30 */ +#define PPI_CHEN_CH30_Pos (30UL) /*!< Position of CH30 field. */ +#define PPI_CHEN_CH30_Msk (0x1UL << PPI_CHEN_CH30_Pos) /*!< Bit mask of CH30 field. */ +#define PPI_CHEN_CH30_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH30_Enabled (1UL) /*!< Enable channel */ + +/* Bit 29 : Enable or disable channel 29 */ +#define PPI_CHEN_CH29_Pos (29UL) /*!< Position of CH29 field. */ +#define PPI_CHEN_CH29_Msk (0x1UL << PPI_CHEN_CH29_Pos) /*!< Bit mask of CH29 field. */ +#define PPI_CHEN_CH29_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH29_Enabled (1UL) /*!< Enable channel */ + +/* Bit 28 : Enable or disable channel 28 */ +#define PPI_CHEN_CH28_Pos (28UL) /*!< Position of CH28 field. */ +#define PPI_CHEN_CH28_Msk (0x1UL << PPI_CHEN_CH28_Pos) /*!< Bit mask of CH28 field. */ +#define PPI_CHEN_CH28_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH28_Enabled (1UL) /*!< Enable channel */ + +/* Bit 27 : Enable or disable channel 27 */ +#define PPI_CHEN_CH27_Pos (27UL) /*!< Position of CH27 field. */ +#define PPI_CHEN_CH27_Msk (0x1UL << PPI_CHEN_CH27_Pos) /*!< Bit mask of CH27 field. */ +#define PPI_CHEN_CH27_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH27_Enabled (1UL) /*!< Enable channel */ + +/* Bit 26 : Enable or disable channel 26 */ +#define PPI_CHEN_CH26_Pos (26UL) /*!< Position of CH26 field. */ +#define PPI_CHEN_CH26_Msk (0x1UL << PPI_CHEN_CH26_Pos) /*!< Bit mask of CH26 field. */ +#define PPI_CHEN_CH26_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH26_Enabled (1UL) /*!< Enable channel */ + +/* Bit 25 : Enable or disable channel 25 */ +#define PPI_CHEN_CH25_Pos (25UL) /*!< Position of CH25 field. */ +#define PPI_CHEN_CH25_Msk (0x1UL << PPI_CHEN_CH25_Pos) /*!< Bit mask of CH25 field. */ +#define PPI_CHEN_CH25_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH25_Enabled (1UL) /*!< Enable channel */ + +/* Bit 24 : Enable or disable channel 24 */ +#define PPI_CHEN_CH24_Pos (24UL) /*!< Position of CH24 field. */ +#define PPI_CHEN_CH24_Msk (0x1UL << PPI_CHEN_CH24_Pos) /*!< Bit mask of CH24 field. */ +#define PPI_CHEN_CH24_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH24_Enabled (1UL) /*!< Enable channel */ + +/* Bit 23 : Enable or disable channel 23 */ +#define PPI_CHEN_CH23_Pos (23UL) /*!< Position of CH23 field. */ +#define PPI_CHEN_CH23_Msk (0x1UL << PPI_CHEN_CH23_Pos) /*!< Bit mask of CH23 field. */ +#define PPI_CHEN_CH23_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH23_Enabled (1UL) /*!< Enable channel */ + +/* Bit 22 : Enable or disable channel 22 */ +#define PPI_CHEN_CH22_Pos (22UL) /*!< Position of CH22 field. */ +#define PPI_CHEN_CH22_Msk (0x1UL << PPI_CHEN_CH22_Pos) /*!< Bit mask of CH22 field. */ +#define PPI_CHEN_CH22_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH22_Enabled (1UL) /*!< Enable channel */ + +/* Bit 21 : Enable or disable channel 21 */ +#define PPI_CHEN_CH21_Pos (21UL) /*!< Position of CH21 field. */ +#define PPI_CHEN_CH21_Msk (0x1UL << PPI_CHEN_CH21_Pos) /*!< Bit mask of CH21 field. */ +#define PPI_CHEN_CH21_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH21_Enabled (1UL) /*!< Enable channel */ + +/* Bit 20 : Enable or disable channel 20 */ +#define PPI_CHEN_CH20_Pos (20UL) /*!< Position of CH20 field. */ +#define PPI_CHEN_CH20_Msk (0x1UL << PPI_CHEN_CH20_Pos) /*!< Bit mask of CH20 field. */ +#define PPI_CHEN_CH20_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH20_Enabled (1UL) /*!< Enable channel */ + +/* Bit 19 : Enable or disable channel 19 */ +#define PPI_CHEN_CH19_Pos (19UL) /*!< Position of CH19 field. */ +#define PPI_CHEN_CH19_Msk (0x1UL << PPI_CHEN_CH19_Pos) /*!< Bit mask of CH19 field. */ +#define PPI_CHEN_CH19_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH19_Enabled (1UL) /*!< Enable channel */ + +/* Bit 18 : Enable or disable channel 18 */ +#define PPI_CHEN_CH18_Pos (18UL) /*!< Position of CH18 field. */ +#define PPI_CHEN_CH18_Msk (0x1UL << PPI_CHEN_CH18_Pos) /*!< Bit mask of CH18 field. */ +#define PPI_CHEN_CH18_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH18_Enabled (1UL) /*!< Enable channel */ + +/* Bit 17 : Enable or disable channel 17 */ +#define PPI_CHEN_CH17_Pos (17UL) /*!< Position of CH17 field. */ +#define PPI_CHEN_CH17_Msk (0x1UL << PPI_CHEN_CH17_Pos) /*!< Bit mask of CH17 field. */ +#define PPI_CHEN_CH17_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH17_Enabled (1UL) /*!< Enable channel */ + +/* Bit 16 : Enable or disable channel 16 */ +#define PPI_CHEN_CH16_Pos (16UL) /*!< Position of CH16 field. */ +#define PPI_CHEN_CH16_Msk (0x1UL << PPI_CHEN_CH16_Pos) /*!< Bit mask of CH16 field. */ +#define PPI_CHEN_CH16_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH16_Enabled (1UL) /*!< Enable channel */ + +/* Bit 15 : Enable or disable channel 15 */ +#define PPI_CHEN_CH15_Pos (15UL) /*!< Position of CH15 field. */ +#define PPI_CHEN_CH15_Msk (0x1UL << PPI_CHEN_CH15_Pos) /*!< Bit mask of CH15 field. */ +#define PPI_CHEN_CH15_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH15_Enabled (1UL) /*!< Enable channel */ + +/* Bit 14 : Enable or disable channel 14 */ +#define PPI_CHEN_CH14_Pos (14UL) /*!< Position of CH14 field. */ +#define PPI_CHEN_CH14_Msk (0x1UL << PPI_CHEN_CH14_Pos) /*!< Bit mask of CH14 field. */ +#define PPI_CHEN_CH14_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH14_Enabled (1UL) /*!< Enable channel */ + +/* Bit 13 : Enable or disable channel 13 */ +#define PPI_CHEN_CH13_Pos (13UL) /*!< Position of CH13 field. */ +#define PPI_CHEN_CH13_Msk (0x1UL << PPI_CHEN_CH13_Pos) /*!< Bit mask of CH13 field. */ +#define PPI_CHEN_CH13_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH13_Enabled (1UL) /*!< Enable channel */ + +/* Bit 12 : Enable or disable channel 12 */ +#define PPI_CHEN_CH12_Pos (12UL) /*!< Position of CH12 field. */ +#define PPI_CHEN_CH12_Msk (0x1UL << PPI_CHEN_CH12_Pos) /*!< Bit mask of CH12 field. */ +#define PPI_CHEN_CH12_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH12_Enabled (1UL) /*!< Enable channel */ + +/* Bit 11 : Enable or disable channel 11 */ +#define PPI_CHEN_CH11_Pos (11UL) /*!< Position of CH11 field. */ +#define PPI_CHEN_CH11_Msk (0x1UL << PPI_CHEN_CH11_Pos) /*!< Bit mask of CH11 field. */ +#define PPI_CHEN_CH11_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH11_Enabled (1UL) /*!< Enable channel */ + +/* Bit 10 : Enable or disable channel 10 */ +#define PPI_CHEN_CH10_Pos (10UL) /*!< Position of CH10 field. */ +#define PPI_CHEN_CH10_Msk (0x1UL << PPI_CHEN_CH10_Pos) /*!< Bit mask of CH10 field. */ +#define PPI_CHEN_CH10_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH10_Enabled (1UL) /*!< Enable channel */ + +/* Bit 9 : Enable or disable channel 9 */ +#define PPI_CHEN_CH9_Pos (9UL) /*!< Position of CH9 field. */ +#define PPI_CHEN_CH9_Msk (0x1UL << PPI_CHEN_CH9_Pos) /*!< Bit mask of CH9 field. */ +#define PPI_CHEN_CH9_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH9_Enabled (1UL) /*!< Enable channel */ + +/* Bit 8 : Enable or disable channel 8 */ +#define PPI_CHEN_CH8_Pos (8UL) /*!< Position of CH8 field. */ +#define PPI_CHEN_CH8_Msk (0x1UL << PPI_CHEN_CH8_Pos) /*!< Bit mask of CH8 field. */ +#define PPI_CHEN_CH8_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH8_Enabled (1UL) /*!< Enable channel */ + +/* Bit 7 : Enable or disable channel 7 */ +#define PPI_CHEN_CH7_Pos (7UL) /*!< Position of CH7 field. */ +#define PPI_CHEN_CH7_Msk (0x1UL << PPI_CHEN_CH7_Pos) /*!< Bit mask of CH7 field. */ +#define PPI_CHEN_CH7_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH7_Enabled (1UL) /*!< Enable channel */ + +/* Bit 6 : Enable or disable channel 6 */ +#define PPI_CHEN_CH6_Pos (6UL) /*!< Position of CH6 field. */ +#define PPI_CHEN_CH6_Msk (0x1UL << PPI_CHEN_CH6_Pos) /*!< Bit mask of CH6 field. */ +#define PPI_CHEN_CH6_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH6_Enabled (1UL) /*!< Enable channel */ + +/* Bit 5 : Enable or disable channel 5 */ +#define PPI_CHEN_CH5_Pos (5UL) /*!< Position of CH5 field. */ +#define PPI_CHEN_CH5_Msk (0x1UL << PPI_CHEN_CH5_Pos) /*!< Bit mask of CH5 field. */ +#define PPI_CHEN_CH5_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH5_Enabled (1UL) /*!< Enable channel */ + +/* Bit 4 : Enable or disable channel 4 */ +#define PPI_CHEN_CH4_Pos (4UL) /*!< Position of CH4 field. */ +#define PPI_CHEN_CH4_Msk (0x1UL << PPI_CHEN_CH4_Pos) /*!< Bit mask of CH4 field. */ +#define PPI_CHEN_CH4_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH4_Enabled (1UL) /*!< Enable channel */ + +/* Bit 3 : Enable or disable channel 3 */ +#define PPI_CHEN_CH3_Pos (3UL) /*!< Position of CH3 field. */ +#define PPI_CHEN_CH3_Msk (0x1UL << PPI_CHEN_CH3_Pos) /*!< Bit mask of CH3 field. */ +#define PPI_CHEN_CH3_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH3_Enabled (1UL) /*!< Enable channel */ + +/* Bit 2 : Enable or disable channel 2 */ +#define PPI_CHEN_CH2_Pos (2UL) /*!< Position of CH2 field. */ +#define PPI_CHEN_CH2_Msk (0x1UL << PPI_CHEN_CH2_Pos) /*!< Bit mask of CH2 field. */ +#define PPI_CHEN_CH2_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH2_Enabled (1UL) /*!< Enable channel */ + +/* Bit 1 : Enable or disable channel 1 */ +#define PPI_CHEN_CH1_Pos (1UL) /*!< Position of CH1 field. */ +#define PPI_CHEN_CH1_Msk (0x1UL << PPI_CHEN_CH1_Pos) /*!< Bit mask of CH1 field. */ +#define PPI_CHEN_CH1_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH1_Enabled (1UL) /*!< Enable channel */ + +/* Bit 0 : Enable or disable channel 0 */ +#define PPI_CHEN_CH0_Pos (0UL) /*!< Position of CH0 field. */ +#define PPI_CHEN_CH0_Msk (0x1UL << PPI_CHEN_CH0_Pos) /*!< Bit mask of CH0 field. */ +#define PPI_CHEN_CH0_Disabled (0UL) /*!< Disable channel */ +#define PPI_CHEN_CH0_Enabled (1UL) /*!< Enable channel */ + +/* Register: PPI_CHENSET */ +/* Description: Channel enable set register */ + +/* Bit 31 : Channel 31 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH31_Pos (31UL) /*!< Position of CH31 field. */ +#define PPI_CHENSET_CH31_Msk (0x1UL << PPI_CHENSET_CH31_Pos) /*!< Bit mask of CH31 field. */ +#define PPI_CHENSET_CH31_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH31_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH31_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 30 : Channel 30 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH30_Pos (30UL) /*!< Position of CH30 field. */ +#define PPI_CHENSET_CH30_Msk (0x1UL << PPI_CHENSET_CH30_Pos) /*!< Bit mask of CH30 field. */ +#define PPI_CHENSET_CH30_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH30_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH30_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 29 : Channel 29 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH29_Pos (29UL) /*!< Position of CH29 field. */ +#define PPI_CHENSET_CH29_Msk (0x1UL << PPI_CHENSET_CH29_Pos) /*!< Bit mask of CH29 field. */ +#define PPI_CHENSET_CH29_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH29_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH29_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 28 : Channel 28 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH28_Pos (28UL) /*!< Position of CH28 field. */ +#define PPI_CHENSET_CH28_Msk (0x1UL << PPI_CHENSET_CH28_Pos) /*!< Bit mask of CH28 field. */ +#define PPI_CHENSET_CH28_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH28_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH28_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 27 : Channel 27 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH27_Pos (27UL) /*!< Position of CH27 field. */ +#define PPI_CHENSET_CH27_Msk (0x1UL << PPI_CHENSET_CH27_Pos) /*!< Bit mask of CH27 field. */ +#define PPI_CHENSET_CH27_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH27_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH27_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 26 : Channel 26 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH26_Pos (26UL) /*!< Position of CH26 field. */ +#define PPI_CHENSET_CH26_Msk (0x1UL << PPI_CHENSET_CH26_Pos) /*!< Bit mask of CH26 field. */ +#define PPI_CHENSET_CH26_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH26_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH26_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 25 : Channel 25 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH25_Pos (25UL) /*!< Position of CH25 field. */ +#define PPI_CHENSET_CH25_Msk (0x1UL << PPI_CHENSET_CH25_Pos) /*!< Bit mask of CH25 field. */ +#define PPI_CHENSET_CH25_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH25_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH25_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 24 : Channel 24 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH24_Pos (24UL) /*!< Position of CH24 field. */ +#define PPI_CHENSET_CH24_Msk (0x1UL << PPI_CHENSET_CH24_Pos) /*!< Bit mask of CH24 field. */ +#define PPI_CHENSET_CH24_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH24_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH24_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 23 : Channel 23 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH23_Pos (23UL) /*!< Position of CH23 field. */ +#define PPI_CHENSET_CH23_Msk (0x1UL << PPI_CHENSET_CH23_Pos) /*!< Bit mask of CH23 field. */ +#define PPI_CHENSET_CH23_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH23_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH23_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 22 : Channel 22 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH22_Pos (22UL) /*!< Position of CH22 field. */ +#define PPI_CHENSET_CH22_Msk (0x1UL << PPI_CHENSET_CH22_Pos) /*!< Bit mask of CH22 field. */ +#define PPI_CHENSET_CH22_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH22_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH22_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 21 : Channel 21 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH21_Pos (21UL) /*!< Position of CH21 field. */ +#define PPI_CHENSET_CH21_Msk (0x1UL << PPI_CHENSET_CH21_Pos) /*!< Bit mask of CH21 field. */ +#define PPI_CHENSET_CH21_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH21_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH21_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 20 : Channel 20 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH20_Pos (20UL) /*!< Position of CH20 field. */ +#define PPI_CHENSET_CH20_Msk (0x1UL << PPI_CHENSET_CH20_Pos) /*!< Bit mask of CH20 field. */ +#define PPI_CHENSET_CH20_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH20_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH20_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 19 : Channel 19 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH19_Pos (19UL) /*!< Position of CH19 field. */ +#define PPI_CHENSET_CH19_Msk (0x1UL << PPI_CHENSET_CH19_Pos) /*!< Bit mask of CH19 field. */ +#define PPI_CHENSET_CH19_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH19_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH19_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 18 : Channel 18 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH18_Pos (18UL) /*!< Position of CH18 field. */ +#define PPI_CHENSET_CH18_Msk (0x1UL << PPI_CHENSET_CH18_Pos) /*!< Bit mask of CH18 field. */ +#define PPI_CHENSET_CH18_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH18_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH18_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 17 : Channel 17 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH17_Pos (17UL) /*!< Position of CH17 field. */ +#define PPI_CHENSET_CH17_Msk (0x1UL << PPI_CHENSET_CH17_Pos) /*!< Bit mask of CH17 field. */ +#define PPI_CHENSET_CH17_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH17_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH17_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 16 : Channel 16 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH16_Pos (16UL) /*!< Position of CH16 field. */ +#define PPI_CHENSET_CH16_Msk (0x1UL << PPI_CHENSET_CH16_Pos) /*!< Bit mask of CH16 field. */ +#define PPI_CHENSET_CH16_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH16_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH16_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 15 : Channel 15 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH15_Pos (15UL) /*!< Position of CH15 field. */ +#define PPI_CHENSET_CH15_Msk (0x1UL << PPI_CHENSET_CH15_Pos) /*!< Bit mask of CH15 field. */ +#define PPI_CHENSET_CH15_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH15_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH15_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 14 : Channel 14 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH14_Pos (14UL) /*!< Position of CH14 field. */ +#define PPI_CHENSET_CH14_Msk (0x1UL << PPI_CHENSET_CH14_Pos) /*!< Bit mask of CH14 field. */ +#define PPI_CHENSET_CH14_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH14_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH14_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 13 : Channel 13 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH13_Pos (13UL) /*!< Position of CH13 field. */ +#define PPI_CHENSET_CH13_Msk (0x1UL << PPI_CHENSET_CH13_Pos) /*!< Bit mask of CH13 field. */ +#define PPI_CHENSET_CH13_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH13_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH13_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 12 : Channel 12 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH12_Pos (12UL) /*!< Position of CH12 field. */ +#define PPI_CHENSET_CH12_Msk (0x1UL << PPI_CHENSET_CH12_Pos) /*!< Bit mask of CH12 field. */ +#define PPI_CHENSET_CH12_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH12_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH12_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 11 : Channel 11 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH11_Pos (11UL) /*!< Position of CH11 field. */ +#define PPI_CHENSET_CH11_Msk (0x1UL << PPI_CHENSET_CH11_Pos) /*!< Bit mask of CH11 field. */ +#define PPI_CHENSET_CH11_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH11_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH11_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 10 : Channel 10 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH10_Pos (10UL) /*!< Position of CH10 field. */ +#define PPI_CHENSET_CH10_Msk (0x1UL << PPI_CHENSET_CH10_Pos) /*!< Bit mask of CH10 field. */ +#define PPI_CHENSET_CH10_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH10_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH10_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 9 : Channel 9 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH9_Pos (9UL) /*!< Position of CH9 field. */ +#define PPI_CHENSET_CH9_Msk (0x1UL << PPI_CHENSET_CH9_Pos) /*!< Bit mask of CH9 field. */ +#define PPI_CHENSET_CH9_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH9_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH9_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 8 : Channel 8 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH8_Pos (8UL) /*!< Position of CH8 field. */ +#define PPI_CHENSET_CH8_Msk (0x1UL << PPI_CHENSET_CH8_Pos) /*!< Bit mask of CH8 field. */ +#define PPI_CHENSET_CH8_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH8_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH8_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 7 : Channel 7 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH7_Pos (7UL) /*!< Position of CH7 field. */ +#define PPI_CHENSET_CH7_Msk (0x1UL << PPI_CHENSET_CH7_Pos) /*!< Bit mask of CH7 field. */ +#define PPI_CHENSET_CH7_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH7_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH7_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 6 : Channel 6 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH6_Pos (6UL) /*!< Position of CH6 field. */ +#define PPI_CHENSET_CH6_Msk (0x1UL << PPI_CHENSET_CH6_Pos) /*!< Bit mask of CH6 field. */ +#define PPI_CHENSET_CH6_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH6_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH6_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 5 : Channel 5 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH5_Pos (5UL) /*!< Position of CH5 field. */ +#define PPI_CHENSET_CH5_Msk (0x1UL << PPI_CHENSET_CH5_Pos) /*!< Bit mask of CH5 field. */ +#define PPI_CHENSET_CH5_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH5_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH5_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 4 : Channel 4 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH4_Pos (4UL) /*!< Position of CH4 field. */ +#define PPI_CHENSET_CH4_Msk (0x1UL << PPI_CHENSET_CH4_Pos) /*!< Bit mask of CH4 field. */ +#define PPI_CHENSET_CH4_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH4_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH4_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 3 : Channel 3 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH3_Pos (3UL) /*!< Position of CH3 field. */ +#define PPI_CHENSET_CH3_Msk (0x1UL << PPI_CHENSET_CH3_Pos) /*!< Bit mask of CH3 field. */ +#define PPI_CHENSET_CH3_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH3_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH3_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 2 : Channel 2 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH2_Pos (2UL) /*!< Position of CH2 field. */ +#define PPI_CHENSET_CH2_Msk (0x1UL << PPI_CHENSET_CH2_Pos) /*!< Bit mask of CH2 field. */ +#define PPI_CHENSET_CH2_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH2_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH2_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 1 : Channel 1 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH1_Pos (1UL) /*!< Position of CH1 field. */ +#define PPI_CHENSET_CH1_Msk (0x1UL << PPI_CHENSET_CH1_Pos) /*!< Bit mask of CH1 field. */ +#define PPI_CHENSET_CH1_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH1_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH1_Set (1UL) /*!< Write: Enable channel */ + +/* Bit 0 : Channel 0 enable set register. Writing '0' has no effect */ +#define PPI_CHENSET_CH0_Pos (0UL) /*!< Position of CH0 field. */ +#define PPI_CHENSET_CH0_Msk (0x1UL << PPI_CHENSET_CH0_Pos) /*!< Bit mask of CH0 field. */ +#define PPI_CHENSET_CH0_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENSET_CH0_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENSET_CH0_Set (1UL) /*!< Write: Enable channel */ + +/* Register: PPI_CHENCLR */ +/* Description: Channel enable clear register */ + +/* Bit 31 : Channel 31 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH31_Pos (31UL) /*!< Position of CH31 field. */ +#define PPI_CHENCLR_CH31_Msk (0x1UL << PPI_CHENCLR_CH31_Pos) /*!< Bit mask of CH31 field. */ +#define PPI_CHENCLR_CH31_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH31_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH31_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 30 : Channel 30 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH30_Pos (30UL) /*!< Position of CH30 field. */ +#define PPI_CHENCLR_CH30_Msk (0x1UL << PPI_CHENCLR_CH30_Pos) /*!< Bit mask of CH30 field. */ +#define PPI_CHENCLR_CH30_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH30_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH30_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 29 : Channel 29 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH29_Pos (29UL) /*!< Position of CH29 field. */ +#define PPI_CHENCLR_CH29_Msk (0x1UL << PPI_CHENCLR_CH29_Pos) /*!< Bit mask of CH29 field. */ +#define PPI_CHENCLR_CH29_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH29_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH29_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 28 : Channel 28 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH28_Pos (28UL) /*!< Position of CH28 field. */ +#define PPI_CHENCLR_CH28_Msk (0x1UL << PPI_CHENCLR_CH28_Pos) /*!< Bit mask of CH28 field. */ +#define PPI_CHENCLR_CH28_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH28_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH28_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 27 : Channel 27 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH27_Pos (27UL) /*!< Position of CH27 field. */ +#define PPI_CHENCLR_CH27_Msk (0x1UL << PPI_CHENCLR_CH27_Pos) /*!< Bit mask of CH27 field. */ +#define PPI_CHENCLR_CH27_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH27_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH27_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 26 : Channel 26 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH26_Pos (26UL) /*!< Position of CH26 field. */ +#define PPI_CHENCLR_CH26_Msk (0x1UL << PPI_CHENCLR_CH26_Pos) /*!< Bit mask of CH26 field. */ +#define PPI_CHENCLR_CH26_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH26_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH26_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 25 : Channel 25 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH25_Pos (25UL) /*!< Position of CH25 field. */ +#define PPI_CHENCLR_CH25_Msk (0x1UL << PPI_CHENCLR_CH25_Pos) /*!< Bit mask of CH25 field. */ +#define PPI_CHENCLR_CH25_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH25_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH25_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 24 : Channel 24 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH24_Pos (24UL) /*!< Position of CH24 field. */ +#define PPI_CHENCLR_CH24_Msk (0x1UL << PPI_CHENCLR_CH24_Pos) /*!< Bit mask of CH24 field. */ +#define PPI_CHENCLR_CH24_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH24_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH24_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 23 : Channel 23 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH23_Pos (23UL) /*!< Position of CH23 field. */ +#define PPI_CHENCLR_CH23_Msk (0x1UL << PPI_CHENCLR_CH23_Pos) /*!< Bit mask of CH23 field. */ +#define PPI_CHENCLR_CH23_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH23_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH23_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 22 : Channel 22 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH22_Pos (22UL) /*!< Position of CH22 field. */ +#define PPI_CHENCLR_CH22_Msk (0x1UL << PPI_CHENCLR_CH22_Pos) /*!< Bit mask of CH22 field. */ +#define PPI_CHENCLR_CH22_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH22_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH22_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 21 : Channel 21 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH21_Pos (21UL) /*!< Position of CH21 field. */ +#define PPI_CHENCLR_CH21_Msk (0x1UL << PPI_CHENCLR_CH21_Pos) /*!< Bit mask of CH21 field. */ +#define PPI_CHENCLR_CH21_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH21_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH21_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 20 : Channel 20 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH20_Pos (20UL) /*!< Position of CH20 field. */ +#define PPI_CHENCLR_CH20_Msk (0x1UL << PPI_CHENCLR_CH20_Pos) /*!< Bit mask of CH20 field. */ +#define PPI_CHENCLR_CH20_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH20_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH20_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 19 : Channel 19 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH19_Pos (19UL) /*!< Position of CH19 field. */ +#define PPI_CHENCLR_CH19_Msk (0x1UL << PPI_CHENCLR_CH19_Pos) /*!< Bit mask of CH19 field. */ +#define PPI_CHENCLR_CH19_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH19_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH19_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 18 : Channel 18 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH18_Pos (18UL) /*!< Position of CH18 field. */ +#define PPI_CHENCLR_CH18_Msk (0x1UL << PPI_CHENCLR_CH18_Pos) /*!< Bit mask of CH18 field. */ +#define PPI_CHENCLR_CH18_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH18_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH18_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 17 : Channel 17 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH17_Pos (17UL) /*!< Position of CH17 field. */ +#define PPI_CHENCLR_CH17_Msk (0x1UL << PPI_CHENCLR_CH17_Pos) /*!< Bit mask of CH17 field. */ +#define PPI_CHENCLR_CH17_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH17_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH17_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 16 : Channel 16 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH16_Pos (16UL) /*!< Position of CH16 field. */ +#define PPI_CHENCLR_CH16_Msk (0x1UL << PPI_CHENCLR_CH16_Pos) /*!< Bit mask of CH16 field. */ +#define PPI_CHENCLR_CH16_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH16_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH16_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 15 : Channel 15 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH15_Pos (15UL) /*!< Position of CH15 field. */ +#define PPI_CHENCLR_CH15_Msk (0x1UL << PPI_CHENCLR_CH15_Pos) /*!< Bit mask of CH15 field. */ +#define PPI_CHENCLR_CH15_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH15_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH15_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 14 : Channel 14 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH14_Pos (14UL) /*!< Position of CH14 field. */ +#define PPI_CHENCLR_CH14_Msk (0x1UL << PPI_CHENCLR_CH14_Pos) /*!< Bit mask of CH14 field. */ +#define PPI_CHENCLR_CH14_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH14_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH14_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 13 : Channel 13 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH13_Pos (13UL) /*!< Position of CH13 field. */ +#define PPI_CHENCLR_CH13_Msk (0x1UL << PPI_CHENCLR_CH13_Pos) /*!< Bit mask of CH13 field. */ +#define PPI_CHENCLR_CH13_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH13_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH13_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 12 : Channel 12 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH12_Pos (12UL) /*!< Position of CH12 field. */ +#define PPI_CHENCLR_CH12_Msk (0x1UL << PPI_CHENCLR_CH12_Pos) /*!< Bit mask of CH12 field. */ +#define PPI_CHENCLR_CH12_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH12_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH12_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 11 : Channel 11 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH11_Pos (11UL) /*!< Position of CH11 field. */ +#define PPI_CHENCLR_CH11_Msk (0x1UL << PPI_CHENCLR_CH11_Pos) /*!< Bit mask of CH11 field. */ +#define PPI_CHENCLR_CH11_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH11_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH11_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 10 : Channel 10 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH10_Pos (10UL) /*!< Position of CH10 field. */ +#define PPI_CHENCLR_CH10_Msk (0x1UL << PPI_CHENCLR_CH10_Pos) /*!< Bit mask of CH10 field. */ +#define PPI_CHENCLR_CH10_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH10_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH10_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 9 : Channel 9 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH9_Pos (9UL) /*!< Position of CH9 field. */ +#define PPI_CHENCLR_CH9_Msk (0x1UL << PPI_CHENCLR_CH9_Pos) /*!< Bit mask of CH9 field. */ +#define PPI_CHENCLR_CH9_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH9_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH9_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 8 : Channel 8 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH8_Pos (8UL) /*!< Position of CH8 field. */ +#define PPI_CHENCLR_CH8_Msk (0x1UL << PPI_CHENCLR_CH8_Pos) /*!< Bit mask of CH8 field. */ +#define PPI_CHENCLR_CH8_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH8_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH8_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 7 : Channel 7 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH7_Pos (7UL) /*!< Position of CH7 field. */ +#define PPI_CHENCLR_CH7_Msk (0x1UL << PPI_CHENCLR_CH7_Pos) /*!< Bit mask of CH7 field. */ +#define PPI_CHENCLR_CH7_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH7_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH7_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 6 : Channel 6 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH6_Pos (6UL) /*!< Position of CH6 field. */ +#define PPI_CHENCLR_CH6_Msk (0x1UL << PPI_CHENCLR_CH6_Pos) /*!< Bit mask of CH6 field. */ +#define PPI_CHENCLR_CH6_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH6_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH6_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 5 : Channel 5 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH5_Pos (5UL) /*!< Position of CH5 field. */ +#define PPI_CHENCLR_CH5_Msk (0x1UL << PPI_CHENCLR_CH5_Pos) /*!< Bit mask of CH5 field. */ +#define PPI_CHENCLR_CH5_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH5_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH5_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 4 : Channel 4 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH4_Pos (4UL) /*!< Position of CH4 field. */ +#define PPI_CHENCLR_CH4_Msk (0x1UL << PPI_CHENCLR_CH4_Pos) /*!< Bit mask of CH4 field. */ +#define PPI_CHENCLR_CH4_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH4_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH4_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 3 : Channel 3 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH3_Pos (3UL) /*!< Position of CH3 field. */ +#define PPI_CHENCLR_CH3_Msk (0x1UL << PPI_CHENCLR_CH3_Pos) /*!< Bit mask of CH3 field. */ +#define PPI_CHENCLR_CH3_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH3_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH3_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 2 : Channel 2 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH2_Pos (2UL) /*!< Position of CH2 field. */ +#define PPI_CHENCLR_CH2_Msk (0x1UL << PPI_CHENCLR_CH2_Pos) /*!< Bit mask of CH2 field. */ +#define PPI_CHENCLR_CH2_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH2_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH2_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 1 : Channel 1 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH1_Pos (1UL) /*!< Position of CH1 field. */ +#define PPI_CHENCLR_CH1_Msk (0x1UL << PPI_CHENCLR_CH1_Pos) /*!< Bit mask of CH1 field. */ +#define PPI_CHENCLR_CH1_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH1_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH1_Clear (1UL) /*!< Write: disable channel */ + +/* Bit 0 : Channel 0 enable clear register. Writing '0' has no effect */ +#define PPI_CHENCLR_CH0_Pos (0UL) /*!< Position of CH0 field. */ +#define PPI_CHENCLR_CH0_Msk (0x1UL << PPI_CHENCLR_CH0_Pos) /*!< Bit mask of CH0 field. */ +#define PPI_CHENCLR_CH0_Disabled (0UL) /*!< Read: channel disabled */ +#define PPI_CHENCLR_CH0_Enabled (1UL) /*!< Read: channel enabled */ +#define PPI_CHENCLR_CH0_Clear (1UL) /*!< Write: disable channel */ + +/* Register: PPI_CH_EEP */ +/* Description: Description cluster[0]: Channel 0 event end-point */ + +/* Bits 31..0 : Pointer to event register. Accepts only addresses to registers from the Event group. */ +#define PPI_CH_EEP_EEP_Pos (0UL) /*!< Position of EEP field. */ +#define PPI_CH_EEP_EEP_Msk (0xFFFFFFFFUL << PPI_CH_EEP_EEP_Pos) /*!< Bit mask of EEP field. */ + +/* Register: PPI_CH_TEP */ +/* Description: Description cluster[0]: Channel 0 task end-point */ + +/* Bits 31..0 : Pointer to task register. Accepts only addresses to registers from the Task group. */ +#define PPI_CH_TEP_TEP_Pos (0UL) /*!< Position of TEP field. */ +#define PPI_CH_TEP_TEP_Msk (0xFFFFFFFFUL << PPI_CH_TEP_TEP_Pos) /*!< Bit mask of TEP field. */ + +/* Register: PPI_CHG */ +/* Description: Description collection[0]: Channel group 0 */ + +/* Bit 31 : Include or exclude channel 31 */ +#define PPI_CHG_CH31_Pos (31UL) /*!< Position of CH31 field. */ +#define PPI_CHG_CH31_Msk (0x1UL << PPI_CHG_CH31_Pos) /*!< Bit mask of CH31 field. */ +#define PPI_CHG_CH31_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH31_Included (1UL) /*!< Include */ + +/* Bit 30 : Include or exclude channel 30 */ +#define PPI_CHG_CH30_Pos (30UL) /*!< Position of CH30 field. */ +#define PPI_CHG_CH30_Msk (0x1UL << PPI_CHG_CH30_Pos) /*!< Bit mask of CH30 field. */ +#define PPI_CHG_CH30_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH30_Included (1UL) /*!< Include */ + +/* Bit 29 : Include or exclude channel 29 */ +#define PPI_CHG_CH29_Pos (29UL) /*!< Position of CH29 field. */ +#define PPI_CHG_CH29_Msk (0x1UL << PPI_CHG_CH29_Pos) /*!< Bit mask of CH29 field. */ +#define PPI_CHG_CH29_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH29_Included (1UL) /*!< Include */ + +/* Bit 28 : Include or exclude channel 28 */ +#define PPI_CHG_CH28_Pos (28UL) /*!< Position of CH28 field. */ +#define PPI_CHG_CH28_Msk (0x1UL << PPI_CHG_CH28_Pos) /*!< Bit mask of CH28 field. */ +#define PPI_CHG_CH28_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH28_Included (1UL) /*!< Include */ + +/* Bit 27 : Include or exclude channel 27 */ +#define PPI_CHG_CH27_Pos (27UL) /*!< Position of CH27 field. */ +#define PPI_CHG_CH27_Msk (0x1UL << PPI_CHG_CH27_Pos) /*!< Bit mask of CH27 field. */ +#define PPI_CHG_CH27_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH27_Included (1UL) /*!< Include */ + +/* Bit 26 : Include or exclude channel 26 */ +#define PPI_CHG_CH26_Pos (26UL) /*!< Position of CH26 field. */ +#define PPI_CHG_CH26_Msk (0x1UL << PPI_CHG_CH26_Pos) /*!< Bit mask of CH26 field. */ +#define PPI_CHG_CH26_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH26_Included (1UL) /*!< Include */ + +/* Bit 25 : Include or exclude channel 25 */ +#define PPI_CHG_CH25_Pos (25UL) /*!< Position of CH25 field. */ +#define PPI_CHG_CH25_Msk (0x1UL << PPI_CHG_CH25_Pos) /*!< Bit mask of CH25 field. */ +#define PPI_CHG_CH25_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH25_Included (1UL) /*!< Include */ + +/* Bit 24 : Include or exclude channel 24 */ +#define PPI_CHG_CH24_Pos (24UL) /*!< Position of CH24 field. */ +#define PPI_CHG_CH24_Msk (0x1UL << PPI_CHG_CH24_Pos) /*!< Bit mask of CH24 field. */ +#define PPI_CHG_CH24_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH24_Included (1UL) /*!< Include */ + +/* Bit 23 : Include or exclude channel 23 */ +#define PPI_CHG_CH23_Pos (23UL) /*!< Position of CH23 field. */ +#define PPI_CHG_CH23_Msk (0x1UL << PPI_CHG_CH23_Pos) /*!< Bit mask of CH23 field. */ +#define PPI_CHG_CH23_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH23_Included (1UL) /*!< Include */ + +/* Bit 22 : Include or exclude channel 22 */ +#define PPI_CHG_CH22_Pos (22UL) /*!< Position of CH22 field. */ +#define PPI_CHG_CH22_Msk (0x1UL << PPI_CHG_CH22_Pos) /*!< Bit mask of CH22 field. */ +#define PPI_CHG_CH22_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH22_Included (1UL) /*!< Include */ + +/* Bit 21 : Include or exclude channel 21 */ +#define PPI_CHG_CH21_Pos (21UL) /*!< Position of CH21 field. */ +#define PPI_CHG_CH21_Msk (0x1UL << PPI_CHG_CH21_Pos) /*!< Bit mask of CH21 field. */ +#define PPI_CHG_CH21_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH21_Included (1UL) /*!< Include */ + +/* Bit 20 : Include or exclude channel 20 */ +#define PPI_CHG_CH20_Pos (20UL) /*!< Position of CH20 field. */ +#define PPI_CHG_CH20_Msk (0x1UL << PPI_CHG_CH20_Pos) /*!< Bit mask of CH20 field. */ +#define PPI_CHG_CH20_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH20_Included (1UL) /*!< Include */ + +/* Bit 19 : Include or exclude channel 19 */ +#define PPI_CHG_CH19_Pos (19UL) /*!< Position of CH19 field. */ +#define PPI_CHG_CH19_Msk (0x1UL << PPI_CHG_CH19_Pos) /*!< Bit mask of CH19 field. */ +#define PPI_CHG_CH19_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH19_Included (1UL) /*!< Include */ + +/* Bit 18 : Include or exclude channel 18 */ +#define PPI_CHG_CH18_Pos (18UL) /*!< Position of CH18 field. */ +#define PPI_CHG_CH18_Msk (0x1UL << PPI_CHG_CH18_Pos) /*!< Bit mask of CH18 field. */ +#define PPI_CHG_CH18_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH18_Included (1UL) /*!< Include */ + +/* Bit 17 : Include or exclude channel 17 */ +#define PPI_CHG_CH17_Pos (17UL) /*!< Position of CH17 field. */ +#define PPI_CHG_CH17_Msk (0x1UL << PPI_CHG_CH17_Pos) /*!< Bit mask of CH17 field. */ +#define PPI_CHG_CH17_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH17_Included (1UL) /*!< Include */ + +/* Bit 16 : Include or exclude channel 16 */ +#define PPI_CHG_CH16_Pos (16UL) /*!< Position of CH16 field. */ +#define PPI_CHG_CH16_Msk (0x1UL << PPI_CHG_CH16_Pos) /*!< Bit mask of CH16 field. */ +#define PPI_CHG_CH16_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH16_Included (1UL) /*!< Include */ + +/* Bit 15 : Include or exclude channel 15 */ +#define PPI_CHG_CH15_Pos (15UL) /*!< Position of CH15 field. */ +#define PPI_CHG_CH15_Msk (0x1UL << PPI_CHG_CH15_Pos) /*!< Bit mask of CH15 field. */ +#define PPI_CHG_CH15_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH15_Included (1UL) /*!< Include */ + +/* Bit 14 : Include or exclude channel 14 */ +#define PPI_CHG_CH14_Pos (14UL) /*!< Position of CH14 field. */ +#define PPI_CHG_CH14_Msk (0x1UL << PPI_CHG_CH14_Pos) /*!< Bit mask of CH14 field. */ +#define PPI_CHG_CH14_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH14_Included (1UL) /*!< Include */ + +/* Bit 13 : Include or exclude channel 13 */ +#define PPI_CHG_CH13_Pos (13UL) /*!< Position of CH13 field. */ +#define PPI_CHG_CH13_Msk (0x1UL << PPI_CHG_CH13_Pos) /*!< Bit mask of CH13 field. */ +#define PPI_CHG_CH13_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH13_Included (1UL) /*!< Include */ + +/* Bit 12 : Include or exclude channel 12 */ +#define PPI_CHG_CH12_Pos (12UL) /*!< Position of CH12 field. */ +#define PPI_CHG_CH12_Msk (0x1UL << PPI_CHG_CH12_Pos) /*!< Bit mask of CH12 field. */ +#define PPI_CHG_CH12_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH12_Included (1UL) /*!< Include */ + +/* Bit 11 : Include or exclude channel 11 */ +#define PPI_CHG_CH11_Pos (11UL) /*!< Position of CH11 field. */ +#define PPI_CHG_CH11_Msk (0x1UL << PPI_CHG_CH11_Pos) /*!< Bit mask of CH11 field. */ +#define PPI_CHG_CH11_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH11_Included (1UL) /*!< Include */ + +/* Bit 10 : Include or exclude channel 10 */ +#define PPI_CHG_CH10_Pos (10UL) /*!< Position of CH10 field. */ +#define PPI_CHG_CH10_Msk (0x1UL << PPI_CHG_CH10_Pos) /*!< Bit mask of CH10 field. */ +#define PPI_CHG_CH10_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH10_Included (1UL) /*!< Include */ + +/* Bit 9 : Include or exclude channel 9 */ +#define PPI_CHG_CH9_Pos (9UL) /*!< Position of CH9 field. */ +#define PPI_CHG_CH9_Msk (0x1UL << PPI_CHG_CH9_Pos) /*!< Bit mask of CH9 field. */ +#define PPI_CHG_CH9_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH9_Included (1UL) /*!< Include */ + +/* Bit 8 : Include or exclude channel 8 */ +#define PPI_CHG_CH8_Pos (8UL) /*!< Position of CH8 field. */ +#define PPI_CHG_CH8_Msk (0x1UL << PPI_CHG_CH8_Pos) /*!< Bit mask of CH8 field. */ +#define PPI_CHG_CH8_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH8_Included (1UL) /*!< Include */ + +/* Bit 7 : Include or exclude channel 7 */ +#define PPI_CHG_CH7_Pos (7UL) /*!< Position of CH7 field. */ +#define PPI_CHG_CH7_Msk (0x1UL << PPI_CHG_CH7_Pos) /*!< Bit mask of CH7 field. */ +#define PPI_CHG_CH7_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH7_Included (1UL) /*!< Include */ + +/* Bit 6 : Include or exclude channel 6 */ +#define PPI_CHG_CH6_Pos (6UL) /*!< Position of CH6 field. */ +#define PPI_CHG_CH6_Msk (0x1UL << PPI_CHG_CH6_Pos) /*!< Bit mask of CH6 field. */ +#define PPI_CHG_CH6_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH6_Included (1UL) /*!< Include */ + +/* Bit 5 : Include or exclude channel 5 */ +#define PPI_CHG_CH5_Pos (5UL) /*!< Position of CH5 field. */ +#define PPI_CHG_CH5_Msk (0x1UL << PPI_CHG_CH5_Pos) /*!< Bit mask of CH5 field. */ +#define PPI_CHG_CH5_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH5_Included (1UL) /*!< Include */ + +/* Bit 4 : Include or exclude channel 4 */ +#define PPI_CHG_CH4_Pos (4UL) /*!< Position of CH4 field. */ +#define PPI_CHG_CH4_Msk (0x1UL << PPI_CHG_CH4_Pos) /*!< Bit mask of CH4 field. */ +#define PPI_CHG_CH4_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH4_Included (1UL) /*!< Include */ + +/* Bit 3 : Include or exclude channel 3 */ +#define PPI_CHG_CH3_Pos (3UL) /*!< Position of CH3 field. */ +#define PPI_CHG_CH3_Msk (0x1UL << PPI_CHG_CH3_Pos) /*!< Bit mask of CH3 field. */ +#define PPI_CHG_CH3_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH3_Included (1UL) /*!< Include */ + +/* Bit 2 : Include or exclude channel 2 */ +#define PPI_CHG_CH2_Pos (2UL) /*!< Position of CH2 field. */ +#define PPI_CHG_CH2_Msk (0x1UL << PPI_CHG_CH2_Pos) /*!< Bit mask of CH2 field. */ +#define PPI_CHG_CH2_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH2_Included (1UL) /*!< Include */ + +/* Bit 1 : Include or exclude channel 1 */ +#define PPI_CHG_CH1_Pos (1UL) /*!< Position of CH1 field. */ +#define PPI_CHG_CH1_Msk (0x1UL << PPI_CHG_CH1_Pos) /*!< Bit mask of CH1 field. */ +#define PPI_CHG_CH1_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH1_Included (1UL) /*!< Include */ + +/* Bit 0 : Include or exclude channel 0 */ +#define PPI_CHG_CH0_Pos (0UL) /*!< Position of CH0 field. */ +#define PPI_CHG_CH0_Msk (0x1UL << PPI_CHG_CH0_Pos) /*!< Bit mask of CH0 field. */ +#define PPI_CHG_CH0_Excluded (0UL) /*!< Exclude */ +#define PPI_CHG_CH0_Included (1UL) /*!< Include */ + +/* Register: PPI_FORK_TEP */ +/* Description: Description cluster[0]: Channel 0 task end-point */ + +/* Bits 31..0 : Pointer to task register */ +#define PPI_FORK_TEP_TEP_Pos (0UL) /*!< Position of TEP field. */ +#define PPI_FORK_TEP_TEP_Msk (0xFFFFFFFFUL << PPI_FORK_TEP_TEP_Pos) /*!< Bit mask of TEP field. */ + + +/* Peripheral: PWM */ +/* Description: Pulse Width Modulation Unit 0 */ + +/* Register: PWM_SHORTS */ +/* Description: Shortcut register */ + +/* Bit 4 : Shortcut between LOOPSDONE event and STOP task */ +#define PWM_SHORTS_LOOPSDONE_STOP_Pos (4UL) /*!< Position of LOOPSDONE_STOP field. */ +#define PWM_SHORTS_LOOPSDONE_STOP_Msk (0x1UL << PWM_SHORTS_LOOPSDONE_STOP_Pos) /*!< Bit mask of LOOPSDONE_STOP field. */ +#define PWM_SHORTS_LOOPSDONE_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define PWM_SHORTS_LOOPSDONE_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 3 : Shortcut between LOOPSDONE event and SEQSTART[1] task */ +#define PWM_SHORTS_LOOPSDONE_SEQSTART1_Pos (3UL) /*!< Position of LOOPSDONE_SEQSTART1 field. */ +#define PWM_SHORTS_LOOPSDONE_SEQSTART1_Msk (0x1UL << PWM_SHORTS_LOOPSDONE_SEQSTART1_Pos) /*!< Bit mask of LOOPSDONE_SEQSTART1 field. */ +#define PWM_SHORTS_LOOPSDONE_SEQSTART1_Disabled (0UL) /*!< Disable shortcut */ +#define PWM_SHORTS_LOOPSDONE_SEQSTART1_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 2 : Shortcut between LOOPSDONE event and SEQSTART[0] task */ +#define PWM_SHORTS_LOOPSDONE_SEQSTART0_Pos (2UL) /*!< Position of LOOPSDONE_SEQSTART0 field. */ +#define PWM_SHORTS_LOOPSDONE_SEQSTART0_Msk (0x1UL << PWM_SHORTS_LOOPSDONE_SEQSTART0_Pos) /*!< Bit mask of LOOPSDONE_SEQSTART0 field. */ +#define PWM_SHORTS_LOOPSDONE_SEQSTART0_Disabled (0UL) /*!< Disable shortcut */ +#define PWM_SHORTS_LOOPSDONE_SEQSTART0_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 1 : Shortcut between SEQEND[1] event and STOP task */ +#define PWM_SHORTS_SEQEND1_STOP_Pos (1UL) /*!< Position of SEQEND1_STOP field. */ +#define PWM_SHORTS_SEQEND1_STOP_Msk (0x1UL << PWM_SHORTS_SEQEND1_STOP_Pos) /*!< Bit mask of SEQEND1_STOP field. */ +#define PWM_SHORTS_SEQEND1_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define PWM_SHORTS_SEQEND1_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 0 : Shortcut between SEQEND[0] event and STOP task */ +#define PWM_SHORTS_SEQEND0_STOP_Pos (0UL) /*!< Position of SEQEND0_STOP field. */ +#define PWM_SHORTS_SEQEND0_STOP_Msk (0x1UL << PWM_SHORTS_SEQEND0_STOP_Pos) /*!< Bit mask of SEQEND0_STOP field. */ +#define PWM_SHORTS_SEQEND0_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define PWM_SHORTS_SEQEND0_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Register: PWM_INTEN */ +/* Description: Enable or disable interrupt */ + +/* Bit 7 : Enable or disable interrupt for LOOPSDONE event */ +#define PWM_INTEN_LOOPSDONE_Pos (7UL) /*!< Position of LOOPSDONE field. */ +#define PWM_INTEN_LOOPSDONE_Msk (0x1UL << PWM_INTEN_LOOPSDONE_Pos) /*!< Bit mask of LOOPSDONE field. */ +#define PWM_INTEN_LOOPSDONE_Disabled (0UL) /*!< Disable */ +#define PWM_INTEN_LOOPSDONE_Enabled (1UL) /*!< Enable */ + +/* Bit 6 : Enable or disable interrupt for PWMPERIODEND event */ +#define PWM_INTEN_PWMPERIODEND_Pos (6UL) /*!< Position of PWMPERIODEND field. */ +#define PWM_INTEN_PWMPERIODEND_Msk (0x1UL << PWM_INTEN_PWMPERIODEND_Pos) /*!< Bit mask of PWMPERIODEND field. */ +#define PWM_INTEN_PWMPERIODEND_Disabled (0UL) /*!< Disable */ +#define PWM_INTEN_PWMPERIODEND_Enabled (1UL) /*!< Enable */ + +/* Bit 5 : Enable or disable interrupt for SEQEND[1] event */ +#define PWM_INTEN_SEQEND1_Pos (5UL) /*!< Position of SEQEND1 field. */ +#define PWM_INTEN_SEQEND1_Msk (0x1UL << PWM_INTEN_SEQEND1_Pos) /*!< Bit mask of SEQEND1 field. */ +#define PWM_INTEN_SEQEND1_Disabled (0UL) /*!< Disable */ +#define PWM_INTEN_SEQEND1_Enabled (1UL) /*!< Enable */ + +/* Bit 4 : Enable or disable interrupt for SEQEND[0] event */ +#define PWM_INTEN_SEQEND0_Pos (4UL) /*!< Position of SEQEND0 field. */ +#define PWM_INTEN_SEQEND0_Msk (0x1UL << PWM_INTEN_SEQEND0_Pos) /*!< Bit mask of SEQEND0 field. */ +#define PWM_INTEN_SEQEND0_Disabled (0UL) /*!< Disable */ +#define PWM_INTEN_SEQEND0_Enabled (1UL) /*!< Enable */ + +/* Bit 3 : Enable or disable interrupt for SEQSTARTED[1] event */ +#define PWM_INTEN_SEQSTARTED1_Pos (3UL) /*!< Position of SEQSTARTED1 field. */ +#define PWM_INTEN_SEQSTARTED1_Msk (0x1UL << PWM_INTEN_SEQSTARTED1_Pos) /*!< Bit mask of SEQSTARTED1 field. */ +#define PWM_INTEN_SEQSTARTED1_Disabled (0UL) /*!< Disable */ +#define PWM_INTEN_SEQSTARTED1_Enabled (1UL) /*!< Enable */ + +/* Bit 2 : Enable or disable interrupt for SEQSTARTED[0] event */ +#define PWM_INTEN_SEQSTARTED0_Pos (2UL) /*!< Position of SEQSTARTED0 field. */ +#define PWM_INTEN_SEQSTARTED0_Msk (0x1UL << PWM_INTEN_SEQSTARTED0_Pos) /*!< Bit mask of SEQSTARTED0 field. */ +#define PWM_INTEN_SEQSTARTED0_Disabled (0UL) /*!< Disable */ +#define PWM_INTEN_SEQSTARTED0_Enabled (1UL) /*!< Enable */ + +/* Bit 1 : Enable or disable interrupt for STOPPED event */ +#define PWM_INTEN_STOPPED_Pos (1UL) /*!< Position of STOPPED field. */ +#define PWM_INTEN_STOPPED_Msk (0x1UL << PWM_INTEN_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define PWM_INTEN_STOPPED_Disabled (0UL) /*!< Disable */ +#define PWM_INTEN_STOPPED_Enabled (1UL) /*!< Enable */ + +/* Register: PWM_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 7 : Write '1' to Enable interrupt for LOOPSDONE event */ +#define PWM_INTENSET_LOOPSDONE_Pos (7UL) /*!< Position of LOOPSDONE field. */ +#define PWM_INTENSET_LOOPSDONE_Msk (0x1UL << PWM_INTENSET_LOOPSDONE_Pos) /*!< Bit mask of LOOPSDONE field. */ +#define PWM_INTENSET_LOOPSDONE_Disabled (0UL) /*!< Read: Disabled */ +#define PWM_INTENSET_LOOPSDONE_Enabled (1UL) /*!< Read: Enabled */ +#define PWM_INTENSET_LOOPSDONE_Set (1UL) /*!< Enable */ + +/* Bit 6 : Write '1' to Enable interrupt for PWMPERIODEND event */ +#define PWM_INTENSET_PWMPERIODEND_Pos (6UL) /*!< Position of PWMPERIODEND field. */ +#define PWM_INTENSET_PWMPERIODEND_Msk (0x1UL << PWM_INTENSET_PWMPERIODEND_Pos) /*!< Bit mask of PWMPERIODEND field. */ +#define PWM_INTENSET_PWMPERIODEND_Disabled (0UL) /*!< Read: Disabled */ +#define PWM_INTENSET_PWMPERIODEND_Enabled (1UL) /*!< Read: Enabled */ +#define PWM_INTENSET_PWMPERIODEND_Set (1UL) /*!< Enable */ + +/* Bit 5 : Write '1' to Enable interrupt for SEQEND[1] event */ +#define PWM_INTENSET_SEQEND1_Pos (5UL) /*!< Position of SEQEND1 field. */ +#define PWM_INTENSET_SEQEND1_Msk (0x1UL << PWM_INTENSET_SEQEND1_Pos) /*!< Bit mask of SEQEND1 field. */ +#define PWM_INTENSET_SEQEND1_Disabled (0UL) /*!< Read: Disabled */ +#define PWM_INTENSET_SEQEND1_Enabled (1UL) /*!< Read: Enabled */ +#define PWM_INTENSET_SEQEND1_Set (1UL) /*!< Enable */ + +/* Bit 4 : Write '1' to Enable interrupt for SEQEND[0] event */ +#define PWM_INTENSET_SEQEND0_Pos (4UL) /*!< Position of SEQEND0 field. */ +#define PWM_INTENSET_SEQEND0_Msk (0x1UL << PWM_INTENSET_SEQEND0_Pos) /*!< Bit mask of SEQEND0 field. */ +#define PWM_INTENSET_SEQEND0_Disabled (0UL) /*!< Read: Disabled */ +#define PWM_INTENSET_SEQEND0_Enabled (1UL) /*!< Read: Enabled */ +#define PWM_INTENSET_SEQEND0_Set (1UL) /*!< Enable */ + +/* Bit 3 : Write '1' to Enable interrupt for SEQSTARTED[1] event */ +#define PWM_INTENSET_SEQSTARTED1_Pos (3UL) /*!< Position of SEQSTARTED1 field. */ +#define PWM_INTENSET_SEQSTARTED1_Msk (0x1UL << PWM_INTENSET_SEQSTARTED1_Pos) /*!< Bit mask of SEQSTARTED1 field. */ +#define PWM_INTENSET_SEQSTARTED1_Disabled (0UL) /*!< Read: Disabled */ +#define PWM_INTENSET_SEQSTARTED1_Enabled (1UL) /*!< Read: Enabled */ +#define PWM_INTENSET_SEQSTARTED1_Set (1UL) /*!< Enable */ + +/* Bit 2 : Write '1' to Enable interrupt for SEQSTARTED[0] event */ +#define PWM_INTENSET_SEQSTARTED0_Pos (2UL) /*!< Position of SEQSTARTED0 field. */ +#define PWM_INTENSET_SEQSTARTED0_Msk (0x1UL << PWM_INTENSET_SEQSTARTED0_Pos) /*!< Bit mask of SEQSTARTED0 field. */ +#define PWM_INTENSET_SEQSTARTED0_Disabled (0UL) /*!< Read: Disabled */ +#define PWM_INTENSET_SEQSTARTED0_Enabled (1UL) /*!< Read: Enabled */ +#define PWM_INTENSET_SEQSTARTED0_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for STOPPED event */ +#define PWM_INTENSET_STOPPED_Pos (1UL) /*!< Position of STOPPED field. */ +#define PWM_INTENSET_STOPPED_Msk (0x1UL << PWM_INTENSET_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define PWM_INTENSET_STOPPED_Disabled (0UL) /*!< Read: Disabled */ +#define PWM_INTENSET_STOPPED_Enabled (1UL) /*!< Read: Enabled */ +#define PWM_INTENSET_STOPPED_Set (1UL) /*!< Enable */ + +/* Register: PWM_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 7 : Write '1' to Disable interrupt for LOOPSDONE event */ +#define PWM_INTENCLR_LOOPSDONE_Pos (7UL) /*!< Position of LOOPSDONE field. */ +#define PWM_INTENCLR_LOOPSDONE_Msk (0x1UL << PWM_INTENCLR_LOOPSDONE_Pos) /*!< Bit mask of LOOPSDONE field. */ +#define PWM_INTENCLR_LOOPSDONE_Disabled (0UL) /*!< Read: Disabled */ +#define PWM_INTENCLR_LOOPSDONE_Enabled (1UL) /*!< Read: Enabled */ +#define PWM_INTENCLR_LOOPSDONE_Clear (1UL) /*!< Disable */ + +/* Bit 6 : Write '1' to Disable interrupt for PWMPERIODEND event */ +#define PWM_INTENCLR_PWMPERIODEND_Pos (6UL) /*!< Position of PWMPERIODEND field. */ +#define PWM_INTENCLR_PWMPERIODEND_Msk (0x1UL << PWM_INTENCLR_PWMPERIODEND_Pos) /*!< Bit mask of PWMPERIODEND field. */ +#define PWM_INTENCLR_PWMPERIODEND_Disabled (0UL) /*!< Read: Disabled */ +#define PWM_INTENCLR_PWMPERIODEND_Enabled (1UL) /*!< Read: Enabled */ +#define PWM_INTENCLR_PWMPERIODEND_Clear (1UL) /*!< Disable */ + +/* Bit 5 : Write '1' to Disable interrupt for SEQEND[1] event */ +#define PWM_INTENCLR_SEQEND1_Pos (5UL) /*!< Position of SEQEND1 field. */ +#define PWM_INTENCLR_SEQEND1_Msk (0x1UL << PWM_INTENCLR_SEQEND1_Pos) /*!< Bit mask of SEQEND1 field. */ +#define PWM_INTENCLR_SEQEND1_Disabled (0UL) /*!< Read: Disabled */ +#define PWM_INTENCLR_SEQEND1_Enabled (1UL) /*!< Read: Enabled */ +#define PWM_INTENCLR_SEQEND1_Clear (1UL) /*!< Disable */ + +/* Bit 4 : Write '1' to Disable interrupt for SEQEND[0] event */ +#define PWM_INTENCLR_SEQEND0_Pos (4UL) /*!< Position of SEQEND0 field. */ +#define PWM_INTENCLR_SEQEND0_Msk (0x1UL << PWM_INTENCLR_SEQEND0_Pos) /*!< Bit mask of SEQEND0 field. */ +#define PWM_INTENCLR_SEQEND0_Disabled (0UL) /*!< Read: Disabled */ +#define PWM_INTENCLR_SEQEND0_Enabled (1UL) /*!< Read: Enabled */ +#define PWM_INTENCLR_SEQEND0_Clear (1UL) /*!< Disable */ + +/* Bit 3 : Write '1' to Disable interrupt for SEQSTARTED[1] event */ +#define PWM_INTENCLR_SEQSTARTED1_Pos (3UL) /*!< Position of SEQSTARTED1 field. */ +#define PWM_INTENCLR_SEQSTARTED1_Msk (0x1UL << PWM_INTENCLR_SEQSTARTED1_Pos) /*!< Bit mask of SEQSTARTED1 field. */ +#define PWM_INTENCLR_SEQSTARTED1_Disabled (0UL) /*!< Read: Disabled */ +#define PWM_INTENCLR_SEQSTARTED1_Enabled (1UL) /*!< Read: Enabled */ +#define PWM_INTENCLR_SEQSTARTED1_Clear (1UL) /*!< Disable */ + +/* Bit 2 : Write '1' to Disable interrupt for SEQSTARTED[0] event */ +#define PWM_INTENCLR_SEQSTARTED0_Pos (2UL) /*!< Position of SEQSTARTED0 field. */ +#define PWM_INTENCLR_SEQSTARTED0_Msk (0x1UL << PWM_INTENCLR_SEQSTARTED0_Pos) /*!< Bit mask of SEQSTARTED0 field. */ +#define PWM_INTENCLR_SEQSTARTED0_Disabled (0UL) /*!< Read: Disabled */ +#define PWM_INTENCLR_SEQSTARTED0_Enabled (1UL) /*!< Read: Enabled */ +#define PWM_INTENCLR_SEQSTARTED0_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for STOPPED event */ +#define PWM_INTENCLR_STOPPED_Pos (1UL) /*!< Position of STOPPED field. */ +#define PWM_INTENCLR_STOPPED_Msk (0x1UL << PWM_INTENCLR_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define PWM_INTENCLR_STOPPED_Disabled (0UL) /*!< Read: Disabled */ +#define PWM_INTENCLR_STOPPED_Enabled (1UL) /*!< Read: Enabled */ +#define PWM_INTENCLR_STOPPED_Clear (1UL) /*!< Disable */ + +/* Register: PWM_ENABLE */ +/* Description: PWM module enable register */ + +/* Bit 0 : Enable or disable PWM module */ +#define PWM_ENABLE_ENABLE_Pos (0UL) /*!< Position of ENABLE field. */ +#define PWM_ENABLE_ENABLE_Msk (0x1UL << PWM_ENABLE_ENABLE_Pos) /*!< Bit mask of ENABLE field. */ +#define PWM_ENABLE_ENABLE_Disabled (0UL) /*!< Disabled */ +#define PWM_ENABLE_ENABLE_Enabled (1UL) /*!< Enable */ + +/* Register: PWM_MODE */ +/* Description: Selects operating mode of the wave counter */ + +/* Bit 0 : Selects up or up and down as wave counter mode */ +#define PWM_MODE_UPDOWN_Pos (0UL) /*!< Position of UPDOWN field. */ +#define PWM_MODE_UPDOWN_Msk (0x1UL << PWM_MODE_UPDOWN_Pos) /*!< Bit mask of UPDOWN field. */ +#define PWM_MODE_UPDOWN_Up (0UL) /*!< Up counter - edge aligned PWM duty-cycle */ +#define PWM_MODE_UPDOWN_UpAndDown (1UL) /*!< Up and down counter - center aligned PWM duty cycle */ + +/* Register: PWM_COUNTERTOP */ +/* Description: Value up to which the pulse generator counter counts */ + +/* Bits 14..0 : Value up to which the pulse generator counter counts. This register is ignored when DECODER.MODE=WaveForm and only values from RAM will be used. */ +#define PWM_COUNTERTOP_COUNTERTOP_Pos (0UL) /*!< Position of COUNTERTOP field. */ +#define PWM_COUNTERTOP_COUNTERTOP_Msk (0x7FFFUL << PWM_COUNTERTOP_COUNTERTOP_Pos) /*!< Bit mask of COUNTERTOP field. */ + +/* Register: PWM_PRESCALER */ +/* Description: Configuration for PWM_CLK */ + +/* Bits 2..0 : Pre-scaler of PWM_CLK */ +#define PWM_PRESCALER_PRESCALER_Pos (0UL) /*!< Position of PRESCALER field. */ +#define PWM_PRESCALER_PRESCALER_Msk (0x7UL << PWM_PRESCALER_PRESCALER_Pos) /*!< Bit mask of PRESCALER field. */ +#define PWM_PRESCALER_PRESCALER_DIV_1 (0UL) /*!< Divide by 1 (16MHz) */ +#define PWM_PRESCALER_PRESCALER_DIV_2 (1UL) /*!< Divide by 2 ( 8MHz) */ +#define PWM_PRESCALER_PRESCALER_DIV_4 (2UL) /*!< Divide by 4 ( 4MHz) */ +#define PWM_PRESCALER_PRESCALER_DIV_8 (3UL) /*!< Divide by 8 ( 2MHz) */ +#define PWM_PRESCALER_PRESCALER_DIV_16 (4UL) /*!< Divide by 16 ( 1MHz) */ +#define PWM_PRESCALER_PRESCALER_DIV_32 (5UL) /*!< Divide by 32 ( 500kHz) */ +#define PWM_PRESCALER_PRESCALER_DIV_64 (6UL) /*!< Divide by 64 ( 250kHz) */ +#define PWM_PRESCALER_PRESCALER_DIV_128 (7UL) /*!< Divide by 128 ( 125kHz) */ + +/* Register: PWM_DECODER */ +/* Description: Configuration of the decoder */ + +/* Bit 8 : Selects source for advancing the active sequence */ +#define PWM_DECODER_MODE_Pos (8UL) /*!< Position of MODE field. */ +#define PWM_DECODER_MODE_Msk (0x1UL << PWM_DECODER_MODE_Pos) /*!< Bit mask of MODE field. */ +#define PWM_DECODER_MODE_RefreshCount (0UL) /*!< SEQ[n].REFRESH is used to determine loading internal compare registers */ +#define PWM_DECODER_MODE_NextStep (1UL) /*!< NEXTSTEP task causes a new value to be loaded to internal compare registers */ + +/* Bits 2..0 : How a sequence is read from RAM and spread to the compare register */ +#define PWM_DECODER_LOAD_Pos (0UL) /*!< Position of LOAD field. */ +#define PWM_DECODER_LOAD_Msk (0x7UL << PWM_DECODER_LOAD_Pos) /*!< Bit mask of LOAD field. */ +#define PWM_DECODER_LOAD_Common (0UL) /*!< 1st half word (16-bit) used in all PWM channels 0..3 */ +#define PWM_DECODER_LOAD_Grouped (1UL) /*!< 1st half word (16-bit) used in channel 0..1; 2nd word in channel 2..3 */ +#define PWM_DECODER_LOAD_Individual (2UL) /*!< 1st half word (16-bit) in ch.0; 2nd in ch.1; ...; 4th in ch.3 */ +#define PWM_DECODER_LOAD_WaveForm (3UL) /*!< 1st half word (16-bit) in ch.0; 2nd in ch.1; ...; 4th in COUNTERTOP */ + +/* Register: PWM_LOOP */ +/* Description: Amount of playback of a loop */ + +/* Bits 15..0 : Amount of playback of pattern cycles */ +#define PWM_LOOP_CNT_Pos (0UL) /*!< Position of CNT field. */ +#define PWM_LOOP_CNT_Msk (0xFFFFUL << PWM_LOOP_CNT_Pos) /*!< Bit mask of CNT field. */ +#define PWM_LOOP_CNT_Disabled (0UL) /*!< Looping disabled (stop at the end of the sequence) */ + +/* Register: PWM_SEQ_PTR */ +/* Description: Description cluster[0]: Beginning address in Data RAM of sequence A */ + +/* Bits 31..0 : Beginning address in Data RAM of sequence A */ +#define PWM_SEQ_PTR_PTR_Pos (0UL) /*!< Position of PTR field. */ +#define PWM_SEQ_PTR_PTR_Msk (0xFFFFFFFFUL << PWM_SEQ_PTR_PTR_Pos) /*!< Bit mask of PTR field. */ + +/* Register: PWM_SEQ_CNT */ +/* Description: Description cluster[0]: Amount of values (duty cycles) in sequence A */ + +/* Bits 14..0 : Amount of values (duty cycles) in sequence A */ +#define PWM_SEQ_CNT_CNT_Pos (0UL) /*!< Position of CNT field. */ +#define PWM_SEQ_CNT_CNT_Msk (0x7FFFUL << PWM_SEQ_CNT_CNT_Pos) /*!< Bit mask of CNT field. */ +#define PWM_SEQ_CNT_CNT_Disabled (0UL) /*!< Sequence is disabled, and shall not be started as it is empty */ + +/* Register: PWM_SEQ_REFRESH */ +/* Description: Description cluster[0]: Amount of additional PWM periods between samples loaded to compare register (load every CNT+1 PWM periods) */ + +/* Bits 23..0 : Amount of additional PWM periods between samples loaded to compare register (load every CNT+1 PWM periods) */ +#define PWM_SEQ_REFRESH_CNT_Pos (0UL) /*!< Position of CNT field. */ +#define PWM_SEQ_REFRESH_CNT_Msk (0xFFFFFFUL << PWM_SEQ_REFRESH_CNT_Pos) /*!< Bit mask of CNT field. */ +#define PWM_SEQ_REFRESH_CNT_Continuous (0UL) /*!< Update every PWM period */ + +/* Register: PWM_SEQ_ENDDELAY */ +/* Description: Description cluster[0]: Time added after the sequence */ + +/* Bits 23..0 : Time added after the sequence in PWM periods */ +#define PWM_SEQ_ENDDELAY_CNT_Pos (0UL) /*!< Position of CNT field. */ +#define PWM_SEQ_ENDDELAY_CNT_Msk (0xFFFFFFUL << PWM_SEQ_ENDDELAY_CNT_Pos) /*!< Bit mask of CNT field. */ + +/* Register: PWM_PSEL_OUT */ +/* Description: Description collection[0]: Output pin select for PWM channel 0 */ + +/* Bit 31 : Connection */ +#define PWM_PSEL_OUT_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define PWM_PSEL_OUT_CONNECT_Msk (0x1UL << PWM_PSEL_OUT_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define PWM_PSEL_OUT_CONNECT_Connected (0UL) /*!< Connect */ +#define PWM_PSEL_OUT_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define PWM_PSEL_OUT_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define PWM_PSEL_OUT_PIN_Msk (0x1FUL << PWM_PSEL_OUT_PIN_Pos) /*!< Bit mask of PIN field. */ + + +/* Peripheral: QDEC */ +/* Description: Quadrature Decoder */ + +/* Register: QDEC_SHORTS */ +/* Description: Shortcut register */ + +/* Bit 6 : Shortcut between SAMPLERDY event and READCLRACC task */ +#define QDEC_SHORTS_SAMPLERDY_READCLRACC_Pos (6UL) /*!< Position of SAMPLERDY_READCLRACC field. */ +#define QDEC_SHORTS_SAMPLERDY_READCLRACC_Msk (0x1UL << QDEC_SHORTS_SAMPLERDY_READCLRACC_Pos) /*!< Bit mask of SAMPLERDY_READCLRACC field. */ +#define QDEC_SHORTS_SAMPLERDY_READCLRACC_Disabled (0UL) /*!< Disable shortcut */ +#define QDEC_SHORTS_SAMPLERDY_READCLRACC_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 5 : Shortcut between DBLRDY event and STOP task */ +#define QDEC_SHORTS_DBLRDY_STOP_Pos (5UL) /*!< Position of DBLRDY_STOP field. */ +#define QDEC_SHORTS_DBLRDY_STOP_Msk (0x1UL << QDEC_SHORTS_DBLRDY_STOP_Pos) /*!< Bit mask of DBLRDY_STOP field. */ +#define QDEC_SHORTS_DBLRDY_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define QDEC_SHORTS_DBLRDY_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 4 : Shortcut between DBLRDY event and RDCLRDBL task */ +#define QDEC_SHORTS_DBLRDY_RDCLRDBL_Pos (4UL) /*!< Position of DBLRDY_RDCLRDBL field. */ +#define QDEC_SHORTS_DBLRDY_RDCLRDBL_Msk (0x1UL << QDEC_SHORTS_DBLRDY_RDCLRDBL_Pos) /*!< Bit mask of DBLRDY_RDCLRDBL field. */ +#define QDEC_SHORTS_DBLRDY_RDCLRDBL_Disabled (0UL) /*!< Disable shortcut */ +#define QDEC_SHORTS_DBLRDY_RDCLRDBL_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 3 : Shortcut between REPORTRDY event and STOP task */ +#define QDEC_SHORTS_REPORTRDY_STOP_Pos (3UL) /*!< Position of REPORTRDY_STOP field. */ +#define QDEC_SHORTS_REPORTRDY_STOP_Msk (0x1UL << QDEC_SHORTS_REPORTRDY_STOP_Pos) /*!< Bit mask of REPORTRDY_STOP field. */ +#define QDEC_SHORTS_REPORTRDY_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define QDEC_SHORTS_REPORTRDY_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 2 : Shortcut between REPORTRDY event and RDCLRACC task */ +#define QDEC_SHORTS_REPORTRDY_RDCLRACC_Pos (2UL) /*!< Position of REPORTRDY_RDCLRACC field. */ +#define QDEC_SHORTS_REPORTRDY_RDCLRACC_Msk (0x1UL << QDEC_SHORTS_REPORTRDY_RDCLRACC_Pos) /*!< Bit mask of REPORTRDY_RDCLRACC field. */ +#define QDEC_SHORTS_REPORTRDY_RDCLRACC_Disabled (0UL) /*!< Disable shortcut */ +#define QDEC_SHORTS_REPORTRDY_RDCLRACC_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 1 : Shortcut between SAMPLERDY event and STOP task */ +#define QDEC_SHORTS_SAMPLERDY_STOP_Pos (1UL) /*!< Position of SAMPLERDY_STOP field. */ +#define QDEC_SHORTS_SAMPLERDY_STOP_Msk (0x1UL << QDEC_SHORTS_SAMPLERDY_STOP_Pos) /*!< Bit mask of SAMPLERDY_STOP field. */ +#define QDEC_SHORTS_SAMPLERDY_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define QDEC_SHORTS_SAMPLERDY_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 0 : Shortcut between REPORTRDY event and READCLRACC task */ +#define QDEC_SHORTS_REPORTRDY_READCLRACC_Pos (0UL) /*!< Position of REPORTRDY_READCLRACC field. */ +#define QDEC_SHORTS_REPORTRDY_READCLRACC_Msk (0x1UL << QDEC_SHORTS_REPORTRDY_READCLRACC_Pos) /*!< Bit mask of REPORTRDY_READCLRACC field. */ +#define QDEC_SHORTS_REPORTRDY_READCLRACC_Disabled (0UL) /*!< Disable shortcut */ +#define QDEC_SHORTS_REPORTRDY_READCLRACC_Enabled (1UL) /*!< Enable shortcut */ + +/* Register: QDEC_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 4 : Write '1' to Enable interrupt for STOPPED event */ +#define QDEC_INTENSET_STOPPED_Pos (4UL) /*!< Position of STOPPED field. */ +#define QDEC_INTENSET_STOPPED_Msk (0x1UL << QDEC_INTENSET_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define QDEC_INTENSET_STOPPED_Disabled (0UL) /*!< Read: Disabled */ +#define QDEC_INTENSET_STOPPED_Enabled (1UL) /*!< Read: Enabled */ +#define QDEC_INTENSET_STOPPED_Set (1UL) /*!< Enable */ + +/* Bit 3 : Write '1' to Enable interrupt for DBLRDY event */ +#define QDEC_INTENSET_DBLRDY_Pos (3UL) /*!< Position of DBLRDY field. */ +#define QDEC_INTENSET_DBLRDY_Msk (0x1UL << QDEC_INTENSET_DBLRDY_Pos) /*!< Bit mask of DBLRDY field. */ +#define QDEC_INTENSET_DBLRDY_Disabled (0UL) /*!< Read: Disabled */ +#define QDEC_INTENSET_DBLRDY_Enabled (1UL) /*!< Read: Enabled */ +#define QDEC_INTENSET_DBLRDY_Set (1UL) /*!< Enable */ + +/* Bit 2 : Write '1' to Enable interrupt for ACCOF event */ +#define QDEC_INTENSET_ACCOF_Pos (2UL) /*!< Position of ACCOF field. */ +#define QDEC_INTENSET_ACCOF_Msk (0x1UL << QDEC_INTENSET_ACCOF_Pos) /*!< Bit mask of ACCOF field. */ +#define QDEC_INTENSET_ACCOF_Disabled (0UL) /*!< Read: Disabled */ +#define QDEC_INTENSET_ACCOF_Enabled (1UL) /*!< Read: Enabled */ +#define QDEC_INTENSET_ACCOF_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for REPORTRDY event */ +#define QDEC_INTENSET_REPORTRDY_Pos (1UL) /*!< Position of REPORTRDY field. */ +#define QDEC_INTENSET_REPORTRDY_Msk (0x1UL << QDEC_INTENSET_REPORTRDY_Pos) /*!< Bit mask of REPORTRDY field. */ +#define QDEC_INTENSET_REPORTRDY_Disabled (0UL) /*!< Read: Disabled */ +#define QDEC_INTENSET_REPORTRDY_Enabled (1UL) /*!< Read: Enabled */ +#define QDEC_INTENSET_REPORTRDY_Set (1UL) /*!< Enable */ + +/* Bit 0 : Write '1' to Enable interrupt for SAMPLERDY event */ +#define QDEC_INTENSET_SAMPLERDY_Pos (0UL) /*!< Position of SAMPLERDY field. */ +#define QDEC_INTENSET_SAMPLERDY_Msk (0x1UL << QDEC_INTENSET_SAMPLERDY_Pos) /*!< Bit mask of SAMPLERDY field. */ +#define QDEC_INTENSET_SAMPLERDY_Disabled (0UL) /*!< Read: Disabled */ +#define QDEC_INTENSET_SAMPLERDY_Enabled (1UL) /*!< Read: Enabled */ +#define QDEC_INTENSET_SAMPLERDY_Set (1UL) /*!< Enable */ + +/* Register: QDEC_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 4 : Write '1' to Disable interrupt for STOPPED event */ +#define QDEC_INTENCLR_STOPPED_Pos (4UL) /*!< Position of STOPPED field. */ +#define QDEC_INTENCLR_STOPPED_Msk (0x1UL << QDEC_INTENCLR_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define QDEC_INTENCLR_STOPPED_Disabled (0UL) /*!< Read: Disabled */ +#define QDEC_INTENCLR_STOPPED_Enabled (1UL) /*!< Read: Enabled */ +#define QDEC_INTENCLR_STOPPED_Clear (1UL) /*!< Disable */ + +/* Bit 3 : Write '1' to Disable interrupt for DBLRDY event */ +#define QDEC_INTENCLR_DBLRDY_Pos (3UL) /*!< Position of DBLRDY field. */ +#define QDEC_INTENCLR_DBLRDY_Msk (0x1UL << QDEC_INTENCLR_DBLRDY_Pos) /*!< Bit mask of DBLRDY field. */ +#define QDEC_INTENCLR_DBLRDY_Disabled (0UL) /*!< Read: Disabled */ +#define QDEC_INTENCLR_DBLRDY_Enabled (1UL) /*!< Read: Enabled */ +#define QDEC_INTENCLR_DBLRDY_Clear (1UL) /*!< Disable */ + +/* Bit 2 : Write '1' to Disable interrupt for ACCOF event */ +#define QDEC_INTENCLR_ACCOF_Pos (2UL) /*!< Position of ACCOF field. */ +#define QDEC_INTENCLR_ACCOF_Msk (0x1UL << QDEC_INTENCLR_ACCOF_Pos) /*!< Bit mask of ACCOF field. */ +#define QDEC_INTENCLR_ACCOF_Disabled (0UL) /*!< Read: Disabled */ +#define QDEC_INTENCLR_ACCOF_Enabled (1UL) /*!< Read: Enabled */ +#define QDEC_INTENCLR_ACCOF_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for REPORTRDY event */ +#define QDEC_INTENCLR_REPORTRDY_Pos (1UL) /*!< Position of REPORTRDY field. */ +#define QDEC_INTENCLR_REPORTRDY_Msk (0x1UL << QDEC_INTENCLR_REPORTRDY_Pos) /*!< Bit mask of REPORTRDY field. */ +#define QDEC_INTENCLR_REPORTRDY_Disabled (0UL) /*!< Read: Disabled */ +#define QDEC_INTENCLR_REPORTRDY_Enabled (1UL) /*!< Read: Enabled */ +#define QDEC_INTENCLR_REPORTRDY_Clear (1UL) /*!< Disable */ + +/* Bit 0 : Write '1' to Disable interrupt for SAMPLERDY event */ +#define QDEC_INTENCLR_SAMPLERDY_Pos (0UL) /*!< Position of SAMPLERDY field. */ +#define QDEC_INTENCLR_SAMPLERDY_Msk (0x1UL << QDEC_INTENCLR_SAMPLERDY_Pos) /*!< Bit mask of SAMPLERDY field. */ +#define QDEC_INTENCLR_SAMPLERDY_Disabled (0UL) /*!< Read: Disabled */ +#define QDEC_INTENCLR_SAMPLERDY_Enabled (1UL) /*!< Read: Enabled */ +#define QDEC_INTENCLR_SAMPLERDY_Clear (1UL) /*!< Disable */ + +/* Register: QDEC_ENABLE */ +/* Description: Enable the quadrature decoder */ + +/* Bit 0 : Enable or disable the quadrature decoder */ +#define QDEC_ENABLE_ENABLE_Pos (0UL) /*!< Position of ENABLE field. */ +#define QDEC_ENABLE_ENABLE_Msk (0x1UL << QDEC_ENABLE_ENABLE_Pos) /*!< Bit mask of ENABLE field. */ +#define QDEC_ENABLE_ENABLE_Disabled (0UL) /*!< Disable */ +#define QDEC_ENABLE_ENABLE_Enabled (1UL) /*!< Enable */ + +/* Register: QDEC_LEDPOL */ +/* Description: LED output pin polarity */ + +/* Bit 0 : LED output pin polarity */ +#define QDEC_LEDPOL_LEDPOL_Pos (0UL) /*!< Position of LEDPOL field. */ +#define QDEC_LEDPOL_LEDPOL_Msk (0x1UL << QDEC_LEDPOL_LEDPOL_Pos) /*!< Bit mask of LEDPOL field. */ +#define QDEC_LEDPOL_LEDPOL_ActiveLow (0UL) /*!< Led active on output pin low */ +#define QDEC_LEDPOL_LEDPOL_ActiveHigh (1UL) /*!< Led active on output pin high */ + +/* Register: QDEC_SAMPLEPER */ +/* Description: Sample period */ + +/* Bits 3..0 : Sample period. The SAMPLE register will be updated for every new sample */ +#define QDEC_SAMPLEPER_SAMPLEPER_Pos (0UL) /*!< Position of SAMPLEPER field. */ +#define QDEC_SAMPLEPER_SAMPLEPER_Msk (0xFUL << QDEC_SAMPLEPER_SAMPLEPER_Pos) /*!< Bit mask of SAMPLEPER field. */ +#define QDEC_SAMPLEPER_SAMPLEPER_128us (0UL) /*!< 128 us */ +#define QDEC_SAMPLEPER_SAMPLEPER_256us (1UL) /*!< 256 us */ +#define QDEC_SAMPLEPER_SAMPLEPER_512us (2UL) /*!< 512 us */ +#define QDEC_SAMPLEPER_SAMPLEPER_1024us (3UL) /*!< 1024 us */ +#define QDEC_SAMPLEPER_SAMPLEPER_2048us (4UL) /*!< 2048 us */ +#define QDEC_SAMPLEPER_SAMPLEPER_4096us (5UL) /*!< 4096 us */ +#define QDEC_SAMPLEPER_SAMPLEPER_8192us (6UL) /*!< 8192 us */ +#define QDEC_SAMPLEPER_SAMPLEPER_16384us (7UL) /*!< 16384 us */ +#define QDEC_SAMPLEPER_SAMPLEPER_32ms (8UL) /*!< 32768 us */ +#define QDEC_SAMPLEPER_SAMPLEPER_65ms (9UL) /*!< 65536 us */ +#define QDEC_SAMPLEPER_SAMPLEPER_131ms (10UL) /*!< 131072 us */ + +/* Register: QDEC_SAMPLE */ +/* Description: Motion sample value */ + +/* Bits 31..0 : Last motion sample */ +#define QDEC_SAMPLE_SAMPLE_Pos (0UL) /*!< Position of SAMPLE field. */ +#define QDEC_SAMPLE_SAMPLE_Msk (0xFFFFFFFFUL << QDEC_SAMPLE_SAMPLE_Pos) /*!< Bit mask of SAMPLE field. */ + +/* Register: QDEC_REPORTPER */ +/* Description: Number of samples to be taken before REPORTRDY and DBLRDY events can be generated */ + +/* Bits 3..0 : Specifies the number of samples to be accumulated in the ACC register before the REPORTRDY and DBLRDY events can be generated */ +#define QDEC_REPORTPER_REPORTPER_Pos (0UL) /*!< Position of REPORTPER field. */ +#define QDEC_REPORTPER_REPORTPER_Msk (0xFUL << QDEC_REPORTPER_REPORTPER_Pos) /*!< Bit mask of REPORTPER field. */ +#define QDEC_REPORTPER_REPORTPER_10Smpl (0UL) /*!< 10 samples / report */ +#define QDEC_REPORTPER_REPORTPER_40Smpl (1UL) /*!< 40 samples / report */ +#define QDEC_REPORTPER_REPORTPER_80Smpl (2UL) /*!< 80 samples / report */ +#define QDEC_REPORTPER_REPORTPER_120Smpl (3UL) /*!< 120 samples / report */ +#define QDEC_REPORTPER_REPORTPER_160Smpl (4UL) /*!< 160 samples / report */ +#define QDEC_REPORTPER_REPORTPER_200Smpl (5UL) /*!< 200 samples / report */ +#define QDEC_REPORTPER_REPORTPER_240Smpl (6UL) /*!< 240 samples / report */ +#define QDEC_REPORTPER_REPORTPER_280Smpl (7UL) /*!< 280 samples / report */ +#define QDEC_REPORTPER_REPORTPER_1Smpl (8UL) /*!< 1 sample / report */ + +/* Register: QDEC_ACC */ +/* Description: Register accumulating the valid transitions */ + +/* Bits 31..0 : Register accumulating all valid samples (not double transition) read from the SAMPLE register */ +#define QDEC_ACC_ACC_Pos (0UL) /*!< Position of ACC field. */ +#define QDEC_ACC_ACC_Msk (0xFFFFFFFFUL << QDEC_ACC_ACC_Pos) /*!< Bit mask of ACC field. */ + +/* Register: QDEC_ACCREAD */ +/* Description: Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC task */ + +/* Bits 31..0 : Snapshot of the ACC register. */ +#define QDEC_ACCREAD_ACCREAD_Pos (0UL) /*!< Position of ACCREAD field. */ +#define QDEC_ACCREAD_ACCREAD_Msk (0xFFFFFFFFUL << QDEC_ACCREAD_ACCREAD_Pos) /*!< Bit mask of ACCREAD field. */ + +/* Register: QDEC_PSEL_LED */ +/* Description: Pin select for LED signal */ + +/* Bit 31 : Connection */ +#define QDEC_PSEL_LED_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define QDEC_PSEL_LED_CONNECT_Msk (0x1UL << QDEC_PSEL_LED_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define QDEC_PSEL_LED_CONNECT_Connected (0UL) /*!< Connect */ +#define QDEC_PSEL_LED_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define QDEC_PSEL_LED_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define QDEC_PSEL_LED_PIN_Msk (0x1FUL << QDEC_PSEL_LED_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: QDEC_PSEL_A */ +/* Description: Pin select for A signal */ + +/* Bit 31 : Connection */ +#define QDEC_PSEL_A_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define QDEC_PSEL_A_CONNECT_Msk (0x1UL << QDEC_PSEL_A_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define QDEC_PSEL_A_CONNECT_Connected (0UL) /*!< Connect */ +#define QDEC_PSEL_A_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define QDEC_PSEL_A_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define QDEC_PSEL_A_PIN_Msk (0x1FUL << QDEC_PSEL_A_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: QDEC_PSEL_B */ +/* Description: Pin select for B signal */ + +/* Bit 31 : Connection */ +#define QDEC_PSEL_B_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define QDEC_PSEL_B_CONNECT_Msk (0x1UL << QDEC_PSEL_B_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define QDEC_PSEL_B_CONNECT_Connected (0UL) /*!< Connect */ +#define QDEC_PSEL_B_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define QDEC_PSEL_B_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define QDEC_PSEL_B_PIN_Msk (0x1FUL << QDEC_PSEL_B_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: QDEC_DBFEN */ +/* Description: Enable input debounce filters */ + +/* Bit 0 : Enable input debounce filters */ +#define QDEC_DBFEN_DBFEN_Pos (0UL) /*!< Position of DBFEN field. */ +#define QDEC_DBFEN_DBFEN_Msk (0x1UL << QDEC_DBFEN_DBFEN_Pos) /*!< Bit mask of DBFEN field. */ +#define QDEC_DBFEN_DBFEN_Disabled (0UL) /*!< Debounce input filters disabled */ +#define QDEC_DBFEN_DBFEN_Enabled (1UL) /*!< Debounce input filters enabled */ + +/* Register: QDEC_LEDPRE */ +/* Description: Time period the LED is switched ON prior to sampling */ + +/* Bits 8..0 : Period in us the LED is switched on prior to sampling */ +#define QDEC_LEDPRE_LEDPRE_Pos (0UL) /*!< Position of LEDPRE field. */ +#define QDEC_LEDPRE_LEDPRE_Msk (0x1FFUL << QDEC_LEDPRE_LEDPRE_Pos) /*!< Bit mask of LEDPRE field. */ + +/* Register: QDEC_ACCDBL */ +/* Description: Register accumulating the number of detected double transitions */ + +/* Bits 3..0 : Register accumulating the number of detected double or illegal transitions. ( SAMPLE = 2 ). */ +#define QDEC_ACCDBL_ACCDBL_Pos (0UL) /*!< Position of ACCDBL field. */ +#define QDEC_ACCDBL_ACCDBL_Msk (0xFUL << QDEC_ACCDBL_ACCDBL_Pos) /*!< Bit mask of ACCDBL field. */ + +/* Register: QDEC_ACCDBLREAD */ +/* Description: Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL task */ + +/* Bits 3..0 : Snapshot of the ACCDBL register. This field is updated when the READCLRACC or RDCLRDBL task is triggered. */ +#define QDEC_ACCDBLREAD_ACCDBLREAD_Pos (0UL) /*!< Position of ACCDBLREAD field. */ +#define QDEC_ACCDBLREAD_ACCDBLREAD_Msk (0xFUL << QDEC_ACCDBLREAD_ACCDBLREAD_Pos) /*!< Bit mask of ACCDBLREAD field. */ + + +/* Peripheral: RADIO */ +/* Description: 2.4 GHz Radio */ + +/* Register: RADIO_SHORTS */ +/* Description: Shortcut register */ + +/* Bit 8 : Shortcut between DISABLED event and RSSISTOP task */ +#define RADIO_SHORTS_DISABLED_RSSISTOP_Pos (8UL) /*!< Position of DISABLED_RSSISTOP field. */ +#define RADIO_SHORTS_DISABLED_RSSISTOP_Msk (0x1UL << RADIO_SHORTS_DISABLED_RSSISTOP_Pos) /*!< Bit mask of DISABLED_RSSISTOP field. */ +#define RADIO_SHORTS_DISABLED_RSSISTOP_Disabled (0UL) /*!< Disable shortcut */ +#define RADIO_SHORTS_DISABLED_RSSISTOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 6 : Shortcut between ADDRESS event and BCSTART task */ +#define RADIO_SHORTS_ADDRESS_BCSTART_Pos (6UL) /*!< Position of ADDRESS_BCSTART field. */ +#define RADIO_SHORTS_ADDRESS_BCSTART_Msk (0x1UL << RADIO_SHORTS_ADDRESS_BCSTART_Pos) /*!< Bit mask of ADDRESS_BCSTART field. */ +#define RADIO_SHORTS_ADDRESS_BCSTART_Disabled (0UL) /*!< Disable shortcut */ +#define RADIO_SHORTS_ADDRESS_BCSTART_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 5 : Shortcut between END event and START task */ +#define RADIO_SHORTS_END_START_Pos (5UL) /*!< Position of END_START field. */ +#define RADIO_SHORTS_END_START_Msk (0x1UL << RADIO_SHORTS_END_START_Pos) /*!< Bit mask of END_START field. */ +#define RADIO_SHORTS_END_START_Disabled (0UL) /*!< Disable shortcut */ +#define RADIO_SHORTS_END_START_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 4 : Shortcut between ADDRESS event and RSSISTART task */ +#define RADIO_SHORTS_ADDRESS_RSSISTART_Pos (4UL) /*!< Position of ADDRESS_RSSISTART field. */ +#define RADIO_SHORTS_ADDRESS_RSSISTART_Msk (0x1UL << RADIO_SHORTS_ADDRESS_RSSISTART_Pos) /*!< Bit mask of ADDRESS_RSSISTART field. */ +#define RADIO_SHORTS_ADDRESS_RSSISTART_Disabled (0UL) /*!< Disable shortcut */ +#define RADIO_SHORTS_ADDRESS_RSSISTART_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 3 : Shortcut between DISABLED event and RXEN task */ +#define RADIO_SHORTS_DISABLED_RXEN_Pos (3UL) /*!< Position of DISABLED_RXEN field. */ +#define RADIO_SHORTS_DISABLED_RXEN_Msk (0x1UL << RADIO_SHORTS_DISABLED_RXEN_Pos) /*!< Bit mask of DISABLED_RXEN field. */ +#define RADIO_SHORTS_DISABLED_RXEN_Disabled (0UL) /*!< Disable shortcut */ +#define RADIO_SHORTS_DISABLED_RXEN_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 2 : Shortcut between DISABLED event and TXEN task */ +#define RADIO_SHORTS_DISABLED_TXEN_Pos (2UL) /*!< Position of DISABLED_TXEN field. */ +#define RADIO_SHORTS_DISABLED_TXEN_Msk (0x1UL << RADIO_SHORTS_DISABLED_TXEN_Pos) /*!< Bit mask of DISABLED_TXEN field. */ +#define RADIO_SHORTS_DISABLED_TXEN_Disabled (0UL) /*!< Disable shortcut */ +#define RADIO_SHORTS_DISABLED_TXEN_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 1 : Shortcut between END event and DISABLE task */ +#define RADIO_SHORTS_END_DISABLE_Pos (1UL) /*!< Position of END_DISABLE field. */ +#define RADIO_SHORTS_END_DISABLE_Msk (0x1UL << RADIO_SHORTS_END_DISABLE_Pos) /*!< Bit mask of END_DISABLE field. */ +#define RADIO_SHORTS_END_DISABLE_Disabled (0UL) /*!< Disable shortcut */ +#define RADIO_SHORTS_END_DISABLE_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 0 : Shortcut between READY event and START task */ +#define RADIO_SHORTS_READY_START_Pos (0UL) /*!< Position of READY_START field. */ +#define RADIO_SHORTS_READY_START_Msk (0x1UL << RADIO_SHORTS_READY_START_Pos) /*!< Bit mask of READY_START field. */ +#define RADIO_SHORTS_READY_START_Disabled (0UL) /*!< Disable shortcut */ +#define RADIO_SHORTS_READY_START_Enabled (1UL) /*!< Enable shortcut */ + +/* Register: RADIO_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 13 : Write '1' to Enable interrupt for CRCERROR event */ +#define RADIO_INTENSET_CRCERROR_Pos (13UL) /*!< Position of CRCERROR field. */ +#define RADIO_INTENSET_CRCERROR_Msk (0x1UL << RADIO_INTENSET_CRCERROR_Pos) /*!< Bit mask of CRCERROR field. */ +#define RADIO_INTENSET_CRCERROR_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENSET_CRCERROR_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENSET_CRCERROR_Set (1UL) /*!< Enable */ + +/* Bit 12 : Write '1' to Enable interrupt for CRCOK event */ +#define RADIO_INTENSET_CRCOK_Pos (12UL) /*!< Position of CRCOK field. */ +#define RADIO_INTENSET_CRCOK_Msk (0x1UL << RADIO_INTENSET_CRCOK_Pos) /*!< Bit mask of CRCOK field. */ +#define RADIO_INTENSET_CRCOK_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENSET_CRCOK_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENSET_CRCOK_Set (1UL) /*!< Enable */ + +/* Bit 10 : Write '1' to Enable interrupt for BCMATCH event */ +#define RADIO_INTENSET_BCMATCH_Pos (10UL) /*!< Position of BCMATCH field. */ +#define RADIO_INTENSET_BCMATCH_Msk (0x1UL << RADIO_INTENSET_BCMATCH_Pos) /*!< Bit mask of BCMATCH field. */ +#define RADIO_INTENSET_BCMATCH_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENSET_BCMATCH_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENSET_BCMATCH_Set (1UL) /*!< Enable */ + +/* Bit 7 : Write '1' to Enable interrupt for RSSIEND event */ +#define RADIO_INTENSET_RSSIEND_Pos (7UL) /*!< Position of RSSIEND field. */ +#define RADIO_INTENSET_RSSIEND_Msk (0x1UL << RADIO_INTENSET_RSSIEND_Pos) /*!< Bit mask of RSSIEND field. */ +#define RADIO_INTENSET_RSSIEND_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENSET_RSSIEND_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENSET_RSSIEND_Set (1UL) /*!< Enable */ + +/* Bit 6 : Write '1' to Enable interrupt for DEVMISS event */ +#define RADIO_INTENSET_DEVMISS_Pos (6UL) /*!< Position of DEVMISS field. */ +#define RADIO_INTENSET_DEVMISS_Msk (0x1UL << RADIO_INTENSET_DEVMISS_Pos) /*!< Bit mask of DEVMISS field. */ +#define RADIO_INTENSET_DEVMISS_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENSET_DEVMISS_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENSET_DEVMISS_Set (1UL) /*!< Enable */ + +/* Bit 5 : Write '1' to Enable interrupt for DEVMATCH event */ +#define RADIO_INTENSET_DEVMATCH_Pos (5UL) /*!< Position of DEVMATCH field. */ +#define RADIO_INTENSET_DEVMATCH_Msk (0x1UL << RADIO_INTENSET_DEVMATCH_Pos) /*!< Bit mask of DEVMATCH field. */ +#define RADIO_INTENSET_DEVMATCH_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENSET_DEVMATCH_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENSET_DEVMATCH_Set (1UL) /*!< Enable */ + +/* Bit 4 : Write '1' to Enable interrupt for DISABLED event */ +#define RADIO_INTENSET_DISABLED_Pos (4UL) /*!< Position of DISABLED field. */ +#define RADIO_INTENSET_DISABLED_Msk (0x1UL << RADIO_INTENSET_DISABLED_Pos) /*!< Bit mask of DISABLED field. */ +#define RADIO_INTENSET_DISABLED_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENSET_DISABLED_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENSET_DISABLED_Set (1UL) /*!< Enable */ + +/* Bit 3 : Write '1' to Enable interrupt for END event */ +#define RADIO_INTENSET_END_Pos (3UL) /*!< Position of END field. */ +#define RADIO_INTENSET_END_Msk (0x1UL << RADIO_INTENSET_END_Pos) /*!< Bit mask of END field. */ +#define RADIO_INTENSET_END_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENSET_END_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENSET_END_Set (1UL) /*!< Enable */ + +/* Bit 2 : Write '1' to Enable interrupt for PAYLOAD event */ +#define RADIO_INTENSET_PAYLOAD_Pos (2UL) /*!< Position of PAYLOAD field. */ +#define RADIO_INTENSET_PAYLOAD_Msk (0x1UL << RADIO_INTENSET_PAYLOAD_Pos) /*!< Bit mask of PAYLOAD field. */ +#define RADIO_INTENSET_PAYLOAD_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENSET_PAYLOAD_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENSET_PAYLOAD_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for ADDRESS event */ +#define RADIO_INTENSET_ADDRESS_Pos (1UL) /*!< Position of ADDRESS field. */ +#define RADIO_INTENSET_ADDRESS_Msk (0x1UL << RADIO_INTENSET_ADDRESS_Pos) /*!< Bit mask of ADDRESS field. */ +#define RADIO_INTENSET_ADDRESS_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENSET_ADDRESS_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENSET_ADDRESS_Set (1UL) /*!< Enable */ + +/* Bit 0 : Write '1' to Enable interrupt for READY event */ +#define RADIO_INTENSET_READY_Pos (0UL) /*!< Position of READY field. */ +#define RADIO_INTENSET_READY_Msk (0x1UL << RADIO_INTENSET_READY_Pos) /*!< Bit mask of READY field. */ +#define RADIO_INTENSET_READY_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENSET_READY_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENSET_READY_Set (1UL) /*!< Enable */ + +/* Register: RADIO_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 13 : Write '1' to Disable interrupt for CRCERROR event */ +#define RADIO_INTENCLR_CRCERROR_Pos (13UL) /*!< Position of CRCERROR field. */ +#define RADIO_INTENCLR_CRCERROR_Msk (0x1UL << RADIO_INTENCLR_CRCERROR_Pos) /*!< Bit mask of CRCERROR field. */ +#define RADIO_INTENCLR_CRCERROR_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENCLR_CRCERROR_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENCLR_CRCERROR_Clear (1UL) /*!< Disable */ + +/* Bit 12 : Write '1' to Disable interrupt for CRCOK event */ +#define RADIO_INTENCLR_CRCOK_Pos (12UL) /*!< Position of CRCOK field. */ +#define RADIO_INTENCLR_CRCOK_Msk (0x1UL << RADIO_INTENCLR_CRCOK_Pos) /*!< Bit mask of CRCOK field. */ +#define RADIO_INTENCLR_CRCOK_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENCLR_CRCOK_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENCLR_CRCOK_Clear (1UL) /*!< Disable */ + +/* Bit 10 : Write '1' to Disable interrupt for BCMATCH event */ +#define RADIO_INTENCLR_BCMATCH_Pos (10UL) /*!< Position of BCMATCH field. */ +#define RADIO_INTENCLR_BCMATCH_Msk (0x1UL << RADIO_INTENCLR_BCMATCH_Pos) /*!< Bit mask of BCMATCH field. */ +#define RADIO_INTENCLR_BCMATCH_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENCLR_BCMATCH_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENCLR_BCMATCH_Clear (1UL) /*!< Disable */ + +/* Bit 7 : Write '1' to Disable interrupt for RSSIEND event */ +#define RADIO_INTENCLR_RSSIEND_Pos (7UL) /*!< Position of RSSIEND field. */ +#define RADIO_INTENCLR_RSSIEND_Msk (0x1UL << RADIO_INTENCLR_RSSIEND_Pos) /*!< Bit mask of RSSIEND field. */ +#define RADIO_INTENCLR_RSSIEND_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENCLR_RSSIEND_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENCLR_RSSIEND_Clear (1UL) /*!< Disable */ + +/* Bit 6 : Write '1' to Disable interrupt for DEVMISS event */ +#define RADIO_INTENCLR_DEVMISS_Pos (6UL) /*!< Position of DEVMISS field. */ +#define RADIO_INTENCLR_DEVMISS_Msk (0x1UL << RADIO_INTENCLR_DEVMISS_Pos) /*!< Bit mask of DEVMISS field. */ +#define RADIO_INTENCLR_DEVMISS_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENCLR_DEVMISS_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENCLR_DEVMISS_Clear (1UL) /*!< Disable */ + +/* Bit 5 : Write '1' to Disable interrupt for DEVMATCH event */ +#define RADIO_INTENCLR_DEVMATCH_Pos (5UL) /*!< Position of DEVMATCH field. */ +#define RADIO_INTENCLR_DEVMATCH_Msk (0x1UL << RADIO_INTENCLR_DEVMATCH_Pos) /*!< Bit mask of DEVMATCH field. */ +#define RADIO_INTENCLR_DEVMATCH_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENCLR_DEVMATCH_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENCLR_DEVMATCH_Clear (1UL) /*!< Disable */ + +/* Bit 4 : Write '1' to Disable interrupt for DISABLED event */ +#define RADIO_INTENCLR_DISABLED_Pos (4UL) /*!< Position of DISABLED field. */ +#define RADIO_INTENCLR_DISABLED_Msk (0x1UL << RADIO_INTENCLR_DISABLED_Pos) /*!< Bit mask of DISABLED field. */ +#define RADIO_INTENCLR_DISABLED_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENCLR_DISABLED_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENCLR_DISABLED_Clear (1UL) /*!< Disable */ + +/* Bit 3 : Write '1' to Disable interrupt for END event */ +#define RADIO_INTENCLR_END_Pos (3UL) /*!< Position of END field. */ +#define RADIO_INTENCLR_END_Msk (0x1UL << RADIO_INTENCLR_END_Pos) /*!< Bit mask of END field. */ +#define RADIO_INTENCLR_END_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENCLR_END_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENCLR_END_Clear (1UL) /*!< Disable */ + +/* Bit 2 : Write '1' to Disable interrupt for PAYLOAD event */ +#define RADIO_INTENCLR_PAYLOAD_Pos (2UL) /*!< Position of PAYLOAD field. */ +#define RADIO_INTENCLR_PAYLOAD_Msk (0x1UL << RADIO_INTENCLR_PAYLOAD_Pos) /*!< Bit mask of PAYLOAD field. */ +#define RADIO_INTENCLR_PAYLOAD_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENCLR_PAYLOAD_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENCLR_PAYLOAD_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for ADDRESS event */ +#define RADIO_INTENCLR_ADDRESS_Pos (1UL) /*!< Position of ADDRESS field. */ +#define RADIO_INTENCLR_ADDRESS_Msk (0x1UL << RADIO_INTENCLR_ADDRESS_Pos) /*!< Bit mask of ADDRESS field. */ +#define RADIO_INTENCLR_ADDRESS_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENCLR_ADDRESS_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENCLR_ADDRESS_Clear (1UL) /*!< Disable */ + +/* Bit 0 : Write '1' to Disable interrupt for READY event */ +#define RADIO_INTENCLR_READY_Pos (0UL) /*!< Position of READY field. */ +#define RADIO_INTENCLR_READY_Msk (0x1UL << RADIO_INTENCLR_READY_Pos) /*!< Bit mask of READY field. */ +#define RADIO_INTENCLR_READY_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENCLR_READY_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENCLR_READY_Clear (1UL) /*!< Disable */ + +/* Register: RADIO_CRCSTATUS */ +/* Description: CRC status */ + +/* Bit 0 : CRC status of packet received */ +#define RADIO_CRCSTATUS_CRCSTATUS_Pos (0UL) /*!< Position of CRCSTATUS field. */ +#define RADIO_CRCSTATUS_CRCSTATUS_Msk (0x1UL << RADIO_CRCSTATUS_CRCSTATUS_Pos) /*!< Bit mask of CRCSTATUS field. */ +#define RADIO_CRCSTATUS_CRCSTATUS_CRCError (0UL) /*!< Packet received with CRC error */ +#define RADIO_CRCSTATUS_CRCSTATUS_CRCOk (1UL) /*!< Packet received with CRC ok */ + +/* Register: RADIO_RXMATCH */ +/* Description: Received address */ + +/* Bits 2..0 : Received address */ +#define RADIO_RXMATCH_RXMATCH_Pos (0UL) /*!< Position of RXMATCH field. */ +#define RADIO_RXMATCH_RXMATCH_Msk (0x7UL << RADIO_RXMATCH_RXMATCH_Pos) /*!< Bit mask of RXMATCH field. */ + +/* Register: RADIO_RXCRC */ +/* Description: CRC field of previously received packet */ + +/* Bits 23..0 : CRC field of previously received packet */ +#define RADIO_RXCRC_RXCRC_Pos (0UL) /*!< Position of RXCRC field. */ +#define RADIO_RXCRC_RXCRC_Msk (0xFFFFFFUL << RADIO_RXCRC_RXCRC_Pos) /*!< Bit mask of RXCRC field. */ + +/* Register: RADIO_DAI */ +/* Description: Device address match index */ + +/* Bits 2..0 : Device address match index */ +#define RADIO_DAI_DAI_Pos (0UL) /*!< Position of DAI field. */ +#define RADIO_DAI_DAI_Msk (0x7UL << RADIO_DAI_DAI_Pos) /*!< Bit mask of DAI field. */ + +/* Register: RADIO_PACKETPTR */ +/* Description: Packet pointer */ + +/* Bits 31..0 : Packet pointer */ +#define RADIO_PACKETPTR_PACKETPTR_Pos (0UL) /*!< Position of PACKETPTR field. */ +#define RADIO_PACKETPTR_PACKETPTR_Msk (0xFFFFFFFFUL << RADIO_PACKETPTR_PACKETPTR_Pos) /*!< Bit mask of PACKETPTR field. */ + +/* Register: RADIO_FREQUENCY */ +/* Description: Frequency */ + +/* Bit 8 : Channel map selection. */ +#define RADIO_FREQUENCY_MAP_Pos (8UL) /*!< Position of MAP field. */ +#define RADIO_FREQUENCY_MAP_Msk (0x1UL << RADIO_FREQUENCY_MAP_Pos) /*!< Bit mask of MAP field. */ +#define RADIO_FREQUENCY_MAP_Default (0UL) /*!< Channel map between 2400 MHZ .. 2500 MHz */ +#define RADIO_FREQUENCY_MAP_Low (1UL) /*!< Channel map between 2360 MHZ .. 2460 MHz */ + +/* Bits 6..0 : Radio channel frequency */ +#define RADIO_FREQUENCY_FREQUENCY_Pos (0UL) /*!< Position of FREQUENCY field. */ +#define RADIO_FREQUENCY_FREQUENCY_Msk (0x7FUL << RADIO_FREQUENCY_FREQUENCY_Pos) /*!< Bit mask of FREQUENCY field. */ + +/* Register: RADIO_TXPOWER */ +/* Description: Output power */ + +/* Bits 7..0 : RADIO output power. */ +#define RADIO_TXPOWER_TXPOWER_Pos (0UL) /*!< Position of TXPOWER field. */ +#define RADIO_TXPOWER_TXPOWER_Msk (0xFFUL << RADIO_TXPOWER_TXPOWER_Pos) /*!< Bit mask of TXPOWER field. */ +#define RADIO_TXPOWER_TXPOWER_0dBm (0x00UL) /*!< 0 dBm */ +#define RADIO_TXPOWER_TXPOWER_Pos3dBm (0x03UL) /*!< +3 dBm */ +#define RADIO_TXPOWER_TXPOWER_Pos4dBm (0x04UL) /*!< +4 dBm */ +#define RADIO_TXPOWER_TXPOWER_Neg30dBm (0xD8UL) /*!< Deprecated enumerator - -40 dBm */ +#define RADIO_TXPOWER_TXPOWER_Neg40dBm (0xD8UL) /*!< -40 dBm */ +#define RADIO_TXPOWER_TXPOWER_Neg20dBm (0xECUL) /*!< -20 dBm */ +#define RADIO_TXPOWER_TXPOWER_Neg16dBm (0xF0UL) /*!< -16 dBm */ +#define RADIO_TXPOWER_TXPOWER_Neg12dBm (0xF4UL) /*!< -12 dBm */ +#define RADIO_TXPOWER_TXPOWER_Neg8dBm (0xF8UL) /*!< -8 dBm */ +#define RADIO_TXPOWER_TXPOWER_Neg4dBm (0xFCUL) /*!< -4 dBm */ + +/* Register: RADIO_MODE */ +/* Description: Data rate and modulation */ + +/* Bits 3..0 : Radio data rate and modulation setting. The radio supports Frequency-shift Keying (FSK) modulation. */ +#define RADIO_MODE_MODE_Pos (0UL) /*!< Position of MODE field. */ +#define RADIO_MODE_MODE_Msk (0xFUL << RADIO_MODE_MODE_Pos) /*!< Bit mask of MODE field. */ +#define RADIO_MODE_MODE_Nrf_1Mbit (0UL) /*!< 1 Mbit/s Nordic proprietary radio mode */ +#define RADIO_MODE_MODE_Nrf_2Mbit (1UL) /*!< 2 Mbit/s Nordic proprietary radio mode */ +#define RADIO_MODE_MODE_Nrf_250Kbit (2UL) /*!< Deprecated enumerator - 250 kbit/s Nordic proprietary radio mode */ +#define RADIO_MODE_MODE_Ble_1Mbit (3UL) /*!< 1 Mbit/s Bluetooth Low Energy */ + +/* Register: RADIO_PCNF0 */ +/* Description: Packet configuration register 0 */ + +/* Bit 24 : Length of preamble on air. Decision point: TASKS_START task */ +#define RADIO_PCNF0_PLEN_Pos (24UL) /*!< Position of PLEN field. */ +#define RADIO_PCNF0_PLEN_Msk (0x1UL << RADIO_PCNF0_PLEN_Pos) /*!< Bit mask of PLEN field. */ +#define RADIO_PCNF0_PLEN_8bit (0UL) /*!< 8-bit preamble */ +#define RADIO_PCNF0_PLEN_16bit (1UL) /*!< 16-bit preamble */ + +/* Bit 20 : Include or exclude S1 field in RAM */ +#define RADIO_PCNF0_S1INCL_Pos (20UL) /*!< Position of S1INCL field. */ +#define RADIO_PCNF0_S1INCL_Msk (0x1UL << RADIO_PCNF0_S1INCL_Pos) /*!< Bit mask of S1INCL field. */ +#define RADIO_PCNF0_S1INCL_Automatic (0UL) /*!< Include S1 field in RAM only if S1LEN > 0 */ +#define RADIO_PCNF0_S1INCL_Include (1UL) /*!< Always include S1 field in RAM independent of S1LEN */ + +/* Bits 19..16 : Length on air of S1 field in number of bits. */ +#define RADIO_PCNF0_S1LEN_Pos (16UL) /*!< Position of S1LEN field. */ +#define RADIO_PCNF0_S1LEN_Msk (0xFUL << RADIO_PCNF0_S1LEN_Pos) /*!< Bit mask of S1LEN field. */ + +/* Bit 8 : Length on air of S0 field in number of bytes. */ +#define RADIO_PCNF0_S0LEN_Pos (8UL) /*!< Position of S0LEN field. */ +#define RADIO_PCNF0_S0LEN_Msk (0x1UL << RADIO_PCNF0_S0LEN_Pos) /*!< Bit mask of S0LEN field. */ + +/* Bits 3..0 : Length on air of LENGTH field in number of bits. */ +#define RADIO_PCNF0_LFLEN_Pos (0UL) /*!< Position of LFLEN field. */ +#define RADIO_PCNF0_LFLEN_Msk (0xFUL << RADIO_PCNF0_LFLEN_Pos) /*!< Bit mask of LFLEN field. */ + +/* Register: RADIO_PCNF1 */ +/* Description: Packet configuration register 1 */ + +/* Bit 25 : Enable or disable packet whitening */ +#define RADIO_PCNF1_WHITEEN_Pos (25UL) /*!< Position of WHITEEN field. */ +#define RADIO_PCNF1_WHITEEN_Msk (0x1UL << RADIO_PCNF1_WHITEEN_Pos) /*!< Bit mask of WHITEEN field. */ +#define RADIO_PCNF1_WHITEEN_Disabled (0UL) /*!< Disable */ +#define RADIO_PCNF1_WHITEEN_Enabled (1UL) /*!< Enable */ + +/* Bit 24 : On air endianness of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields. */ +#define RADIO_PCNF1_ENDIAN_Pos (24UL) /*!< Position of ENDIAN field. */ +#define RADIO_PCNF1_ENDIAN_Msk (0x1UL << RADIO_PCNF1_ENDIAN_Pos) /*!< Bit mask of ENDIAN field. */ +#define RADIO_PCNF1_ENDIAN_Little (0UL) /*!< Least Significant bit on air first */ +#define RADIO_PCNF1_ENDIAN_Big (1UL) /*!< Most significant bit on air first */ + +/* Bits 18..16 : Base address length in number of bytes */ +#define RADIO_PCNF1_BALEN_Pos (16UL) /*!< Position of BALEN field. */ +#define RADIO_PCNF1_BALEN_Msk (0x7UL << RADIO_PCNF1_BALEN_Pos) /*!< Bit mask of BALEN field. */ + +/* Bits 15..8 : Static length in number of bytes */ +#define RADIO_PCNF1_STATLEN_Pos (8UL) /*!< Position of STATLEN field. */ +#define RADIO_PCNF1_STATLEN_Msk (0xFFUL << RADIO_PCNF1_STATLEN_Pos) /*!< Bit mask of STATLEN field. */ + +/* Bits 7..0 : Maximum length of packet payload. If the packet payload is larger than MAXLEN, the radio will truncate the payload to MAXLEN. */ +#define RADIO_PCNF1_MAXLEN_Pos (0UL) /*!< Position of MAXLEN field. */ +#define RADIO_PCNF1_MAXLEN_Msk (0xFFUL << RADIO_PCNF1_MAXLEN_Pos) /*!< Bit mask of MAXLEN field. */ + +/* Register: RADIO_BASE0 */ +/* Description: Base address 0 */ + +/* Bits 31..0 : Base address 0 */ +#define RADIO_BASE0_BASE0_Pos (0UL) /*!< Position of BASE0 field. */ +#define RADIO_BASE0_BASE0_Msk (0xFFFFFFFFUL << RADIO_BASE0_BASE0_Pos) /*!< Bit mask of BASE0 field. */ + +/* Register: RADIO_BASE1 */ +/* Description: Base address 1 */ + +/* Bits 31..0 : Base address 1 */ +#define RADIO_BASE1_BASE1_Pos (0UL) /*!< Position of BASE1 field. */ +#define RADIO_BASE1_BASE1_Msk (0xFFFFFFFFUL << RADIO_BASE1_BASE1_Pos) /*!< Bit mask of BASE1 field. */ + +/* Register: RADIO_PREFIX0 */ +/* Description: Prefixes bytes for logical addresses 0-3 */ + +/* Bits 31..24 : Address prefix 3. */ +#define RADIO_PREFIX0_AP3_Pos (24UL) /*!< Position of AP3 field. */ +#define RADIO_PREFIX0_AP3_Msk (0xFFUL << RADIO_PREFIX0_AP3_Pos) /*!< Bit mask of AP3 field. */ + +/* Bits 23..16 : Address prefix 2. */ +#define RADIO_PREFIX0_AP2_Pos (16UL) /*!< Position of AP2 field. */ +#define RADIO_PREFIX0_AP2_Msk (0xFFUL << RADIO_PREFIX0_AP2_Pos) /*!< Bit mask of AP2 field. */ + +/* Bits 15..8 : Address prefix 1. */ +#define RADIO_PREFIX0_AP1_Pos (8UL) /*!< Position of AP1 field. */ +#define RADIO_PREFIX0_AP1_Msk (0xFFUL << RADIO_PREFIX0_AP1_Pos) /*!< Bit mask of AP1 field. */ + +/* Bits 7..0 : Address prefix 0. */ +#define RADIO_PREFIX0_AP0_Pos (0UL) /*!< Position of AP0 field. */ +#define RADIO_PREFIX0_AP0_Msk (0xFFUL << RADIO_PREFIX0_AP0_Pos) /*!< Bit mask of AP0 field. */ + +/* Register: RADIO_PREFIX1 */ +/* Description: Prefixes bytes for logical addresses 4-7 */ + +/* Bits 31..24 : Address prefix 7. */ +#define RADIO_PREFIX1_AP7_Pos (24UL) /*!< Position of AP7 field. */ +#define RADIO_PREFIX1_AP7_Msk (0xFFUL << RADIO_PREFIX1_AP7_Pos) /*!< Bit mask of AP7 field. */ + +/* Bits 23..16 : Address prefix 6. */ +#define RADIO_PREFIX1_AP6_Pos (16UL) /*!< Position of AP6 field. */ +#define RADIO_PREFIX1_AP6_Msk (0xFFUL << RADIO_PREFIX1_AP6_Pos) /*!< Bit mask of AP6 field. */ + +/* Bits 15..8 : Address prefix 5. */ +#define RADIO_PREFIX1_AP5_Pos (8UL) /*!< Position of AP5 field. */ +#define RADIO_PREFIX1_AP5_Msk (0xFFUL << RADIO_PREFIX1_AP5_Pos) /*!< Bit mask of AP5 field. */ + +/* Bits 7..0 : Address prefix 4. */ +#define RADIO_PREFIX1_AP4_Pos (0UL) /*!< Position of AP4 field. */ +#define RADIO_PREFIX1_AP4_Msk (0xFFUL << RADIO_PREFIX1_AP4_Pos) /*!< Bit mask of AP4 field. */ + +/* Register: RADIO_TXADDRESS */ +/* Description: Transmit address select */ + +/* Bits 2..0 : Transmit address select */ +#define RADIO_TXADDRESS_TXADDRESS_Pos (0UL) /*!< Position of TXADDRESS field. */ +#define RADIO_TXADDRESS_TXADDRESS_Msk (0x7UL << RADIO_TXADDRESS_TXADDRESS_Pos) /*!< Bit mask of TXADDRESS field. */ + +/* Register: RADIO_RXADDRESSES */ +/* Description: Receive address select */ + +/* Bit 7 : Enable or disable reception on logical address 7. */ +#define RADIO_RXADDRESSES_ADDR7_Pos (7UL) /*!< Position of ADDR7 field. */ +#define RADIO_RXADDRESSES_ADDR7_Msk (0x1UL << RADIO_RXADDRESSES_ADDR7_Pos) /*!< Bit mask of ADDR7 field. */ +#define RADIO_RXADDRESSES_ADDR7_Disabled (0UL) /*!< Disable */ +#define RADIO_RXADDRESSES_ADDR7_Enabled (1UL) /*!< Enable */ + +/* Bit 6 : Enable or disable reception on logical address 6. */ +#define RADIO_RXADDRESSES_ADDR6_Pos (6UL) /*!< Position of ADDR6 field. */ +#define RADIO_RXADDRESSES_ADDR6_Msk (0x1UL << RADIO_RXADDRESSES_ADDR6_Pos) /*!< Bit mask of ADDR6 field. */ +#define RADIO_RXADDRESSES_ADDR6_Disabled (0UL) /*!< Disable */ +#define RADIO_RXADDRESSES_ADDR6_Enabled (1UL) /*!< Enable */ + +/* Bit 5 : Enable or disable reception on logical address 5. */ +#define RADIO_RXADDRESSES_ADDR5_Pos (5UL) /*!< Position of ADDR5 field. */ +#define RADIO_RXADDRESSES_ADDR5_Msk (0x1UL << RADIO_RXADDRESSES_ADDR5_Pos) /*!< Bit mask of ADDR5 field. */ +#define RADIO_RXADDRESSES_ADDR5_Disabled (0UL) /*!< Disable */ +#define RADIO_RXADDRESSES_ADDR5_Enabled (1UL) /*!< Enable */ + +/* Bit 4 : Enable or disable reception on logical address 4. */ +#define RADIO_RXADDRESSES_ADDR4_Pos (4UL) /*!< Position of ADDR4 field. */ +#define RADIO_RXADDRESSES_ADDR4_Msk (0x1UL << RADIO_RXADDRESSES_ADDR4_Pos) /*!< Bit mask of ADDR4 field. */ +#define RADIO_RXADDRESSES_ADDR4_Disabled (0UL) /*!< Disable */ +#define RADIO_RXADDRESSES_ADDR4_Enabled (1UL) /*!< Enable */ + +/* Bit 3 : Enable or disable reception on logical address 3. */ +#define RADIO_RXADDRESSES_ADDR3_Pos (3UL) /*!< Position of ADDR3 field. */ +#define RADIO_RXADDRESSES_ADDR3_Msk (0x1UL << RADIO_RXADDRESSES_ADDR3_Pos) /*!< Bit mask of ADDR3 field. */ +#define RADIO_RXADDRESSES_ADDR3_Disabled (0UL) /*!< Disable */ +#define RADIO_RXADDRESSES_ADDR3_Enabled (1UL) /*!< Enable */ + +/* Bit 2 : Enable or disable reception on logical address 2. */ +#define RADIO_RXADDRESSES_ADDR2_Pos (2UL) /*!< Position of ADDR2 field. */ +#define RADIO_RXADDRESSES_ADDR2_Msk (0x1UL << RADIO_RXADDRESSES_ADDR2_Pos) /*!< Bit mask of ADDR2 field. */ +#define RADIO_RXADDRESSES_ADDR2_Disabled (0UL) /*!< Disable */ +#define RADIO_RXADDRESSES_ADDR2_Enabled (1UL) /*!< Enable */ + +/* Bit 1 : Enable or disable reception on logical address 1. */ +#define RADIO_RXADDRESSES_ADDR1_Pos (1UL) /*!< Position of ADDR1 field. */ +#define RADIO_RXADDRESSES_ADDR1_Msk (0x1UL << RADIO_RXADDRESSES_ADDR1_Pos) /*!< Bit mask of ADDR1 field. */ +#define RADIO_RXADDRESSES_ADDR1_Disabled (0UL) /*!< Disable */ +#define RADIO_RXADDRESSES_ADDR1_Enabled (1UL) /*!< Enable */ + +/* Bit 0 : Enable or disable reception on logical address 0. */ +#define RADIO_RXADDRESSES_ADDR0_Pos (0UL) /*!< Position of ADDR0 field. */ +#define RADIO_RXADDRESSES_ADDR0_Msk (0x1UL << RADIO_RXADDRESSES_ADDR0_Pos) /*!< Bit mask of ADDR0 field. */ +#define RADIO_RXADDRESSES_ADDR0_Disabled (0UL) /*!< Disable */ +#define RADIO_RXADDRESSES_ADDR0_Enabled (1UL) /*!< Enable */ + +/* Register: RADIO_CRCCNF */ +/* Description: CRC configuration */ + +/* Bit 8 : Include or exclude packet address field out of CRC calculation. */ +#define RADIO_CRCCNF_SKIPADDR_Pos (8UL) /*!< Position of SKIPADDR field. */ +#define RADIO_CRCCNF_SKIPADDR_Msk (0x1UL << RADIO_CRCCNF_SKIPADDR_Pos) /*!< Bit mask of SKIPADDR field. */ +#define RADIO_CRCCNF_SKIPADDR_Include (0UL) /*!< CRC calculation includes address field */ +#define RADIO_CRCCNF_SKIPADDR_Skip (1UL) /*!< CRC calculation does not include address field. The CRC calculation will start at the first byte after the address. */ + +/* Bits 1..0 : CRC length in number of bytes. */ +#define RADIO_CRCCNF_LEN_Pos (0UL) /*!< Position of LEN field. */ +#define RADIO_CRCCNF_LEN_Msk (0x3UL << RADIO_CRCCNF_LEN_Pos) /*!< Bit mask of LEN field. */ +#define RADIO_CRCCNF_LEN_Disabled (0UL) /*!< CRC length is zero and CRC calculation is disabled */ +#define RADIO_CRCCNF_LEN_One (1UL) /*!< CRC length is one byte and CRC calculation is enabled */ +#define RADIO_CRCCNF_LEN_Two (2UL) /*!< CRC length is two bytes and CRC calculation is enabled */ +#define RADIO_CRCCNF_LEN_Three (3UL) /*!< CRC length is three bytes and CRC calculation is enabled */ + +/* Register: RADIO_CRCPOLY */ +/* Description: CRC polynomial */ + +/* Bits 23..0 : CRC polynomial */ +#define RADIO_CRCPOLY_CRCPOLY_Pos (0UL) /*!< Position of CRCPOLY field. */ +#define RADIO_CRCPOLY_CRCPOLY_Msk (0xFFFFFFUL << RADIO_CRCPOLY_CRCPOLY_Pos) /*!< Bit mask of CRCPOLY field. */ + +/* Register: RADIO_CRCINIT */ +/* Description: CRC initial value */ + +/* Bits 23..0 : CRC initial value */ +#define RADIO_CRCINIT_CRCINIT_Pos (0UL) /*!< Position of CRCINIT field. */ +#define RADIO_CRCINIT_CRCINIT_Msk (0xFFFFFFUL << RADIO_CRCINIT_CRCINIT_Pos) /*!< Bit mask of CRCINIT field. */ + +/* Register: RADIO_TIFS */ +/* Description: Inter Frame Spacing in us */ + +/* Bits 7..0 : Inter Frame Spacing in us */ +#define RADIO_TIFS_TIFS_Pos (0UL) /*!< Position of TIFS field. */ +#define RADIO_TIFS_TIFS_Msk (0xFFUL << RADIO_TIFS_TIFS_Pos) /*!< Bit mask of TIFS field. */ + +/* Register: RADIO_RSSISAMPLE */ +/* Description: RSSI sample */ + +/* Bits 6..0 : RSSI sample */ +#define RADIO_RSSISAMPLE_RSSISAMPLE_Pos (0UL) /*!< Position of RSSISAMPLE field. */ +#define RADIO_RSSISAMPLE_RSSISAMPLE_Msk (0x7FUL << RADIO_RSSISAMPLE_RSSISAMPLE_Pos) /*!< Bit mask of RSSISAMPLE field. */ + +/* Register: RADIO_STATE */ +/* Description: Current radio state */ + +/* Bits 3..0 : Current radio state */ +#define RADIO_STATE_STATE_Pos (0UL) /*!< Position of STATE field. */ +#define RADIO_STATE_STATE_Msk (0xFUL << RADIO_STATE_STATE_Pos) /*!< Bit mask of STATE field. */ +#define RADIO_STATE_STATE_Disabled (0UL) /*!< RADIO is in the Disabled state */ +#define RADIO_STATE_STATE_RxRu (1UL) /*!< RADIO is in the RXRU state */ +#define RADIO_STATE_STATE_RxIdle (2UL) /*!< RADIO is in the RXIDLE state */ +#define RADIO_STATE_STATE_Rx (3UL) /*!< RADIO is in the RX state */ +#define RADIO_STATE_STATE_RxDisable (4UL) /*!< RADIO is in the RXDISABLED state */ +#define RADIO_STATE_STATE_TxRu (9UL) /*!< RADIO is in the TXRU state */ +#define RADIO_STATE_STATE_TxIdle (10UL) /*!< RADIO is in the TXIDLE state */ +#define RADIO_STATE_STATE_Tx (11UL) /*!< RADIO is in the TX state */ +#define RADIO_STATE_STATE_TxDisable (12UL) /*!< RADIO is in the TXDISABLED state */ + +/* Register: RADIO_DATAWHITEIV */ +/* Description: Data whitening initial value */ + +/* Bits 6..0 : Data whitening initial value. Bit 6 is hard-wired to '1', writing '0' to it has no effect, and it will always be read back and used by the device as '1'. */ +#define RADIO_DATAWHITEIV_DATAWHITEIV_Pos (0UL) /*!< Position of DATAWHITEIV field. */ +#define RADIO_DATAWHITEIV_DATAWHITEIV_Msk (0x7FUL << RADIO_DATAWHITEIV_DATAWHITEIV_Pos) /*!< Bit mask of DATAWHITEIV field. */ + +/* Register: RADIO_BCC */ +/* Description: Bit counter compare */ + +/* Bits 31..0 : Bit counter compare */ +#define RADIO_BCC_BCC_Pos (0UL) /*!< Position of BCC field. */ +#define RADIO_BCC_BCC_Msk (0xFFFFFFFFUL << RADIO_BCC_BCC_Pos) /*!< Bit mask of BCC field. */ + +/* Register: RADIO_DAB */ +/* Description: Description collection[0]: Device address base segment 0 */ + +/* Bits 31..0 : Device address base segment 0 */ +#define RADIO_DAB_DAB_Pos (0UL) /*!< Position of DAB field. */ +#define RADIO_DAB_DAB_Msk (0xFFFFFFFFUL << RADIO_DAB_DAB_Pos) /*!< Bit mask of DAB field. */ + +/* Register: RADIO_DAP */ +/* Description: Description collection[0]: Device address prefix 0 */ + +/* Bits 15..0 : Device address prefix 0 */ +#define RADIO_DAP_DAP_Pos (0UL) /*!< Position of DAP field. */ +#define RADIO_DAP_DAP_Msk (0xFFFFUL << RADIO_DAP_DAP_Pos) /*!< Bit mask of DAP field. */ + +/* Register: RADIO_DACNF */ +/* Description: Device address match configuration */ + +/* Bit 15 : TxAdd for device address 7 */ +#define RADIO_DACNF_TXADD7_Pos (15UL) /*!< Position of TXADD7 field. */ +#define RADIO_DACNF_TXADD7_Msk (0x1UL << RADIO_DACNF_TXADD7_Pos) /*!< Bit mask of TXADD7 field. */ + +/* Bit 14 : TxAdd for device address 6 */ +#define RADIO_DACNF_TXADD6_Pos (14UL) /*!< Position of TXADD6 field. */ +#define RADIO_DACNF_TXADD6_Msk (0x1UL << RADIO_DACNF_TXADD6_Pos) /*!< Bit mask of TXADD6 field. */ + +/* Bit 13 : TxAdd for device address 5 */ +#define RADIO_DACNF_TXADD5_Pos (13UL) /*!< Position of TXADD5 field. */ +#define RADIO_DACNF_TXADD5_Msk (0x1UL << RADIO_DACNF_TXADD5_Pos) /*!< Bit mask of TXADD5 field. */ + +/* Bit 12 : TxAdd for device address 4 */ +#define RADIO_DACNF_TXADD4_Pos (12UL) /*!< Position of TXADD4 field. */ +#define RADIO_DACNF_TXADD4_Msk (0x1UL << RADIO_DACNF_TXADD4_Pos) /*!< Bit mask of TXADD4 field. */ + +/* Bit 11 : TxAdd for device address 3 */ +#define RADIO_DACNF_TXADD3_Pos (11UL) /*!< Position of TXADD3 field. */ +#define RADIO_DACNF_TXADD3_Msk (0x1UL << RADIO_DACNF_TXADD3_Pos) /*!< Bit mask of TXADD3 field. */ + +/* Bit 10 : TxAdd for device address 2 */ +#define RADIO_DACNF_TXADD2_Pos (10UL) /*!< Position of TXADD2 field. */ +#define RADIO_DACNF_TXADD2_Msk (0x1UL << RADIO_DACNF_TXADD2_Pos) /*!< Bit mask of TXADD2 field. */ + +/* Bit 9 : TxAdd for device address 1 */ +#define RADIO_DACNF_TXADD1_Pos (9UL) /*!< Position of TXADD1 field. */ +#define RADIO_DACNF_TXADD1_Msk (0x1UL << RADIO_DACNF_TXADD1_Pos) /*!< Bit mask of TXADD1 field. */ + +/* Bit 8 : TxAdd for device address 0 */ +#define RADIO_DACNF_TXADD0_Pos (8UL) /*!< Position of TXADD0 field. */ +#define RADIO_DACNF_TXADD0_Msk (0x1UL << RADIO_DACNF_TXADD0_Pos) /*!< Bit mask of TXADD0 field. */ + +/* Bit 7 : Enable or disable device address matching using device address 7 */ +#define RADIO_DACNF_ENA7_Pos (7UL) /*!< Position of ENA7 field. */ +#define RADIO_DACNF_ENA7_Msk (0x1UL << RADIO_DACNF_ENA7_Pos) /*!< Bit mask of ENA7 field. */ +#define RADIO_DACNF_ENA7_Disabled (0UL) /*!< Disabled */ +#define RADIO_DACNF_ENA7_Enabled (1UL) /*!< Enabled */ + +/* Bit 6 : Enable or disable device address matching using device address 6 */ +#define RADIO_DACNF_ENA6_Pos (6UL) /*!< Position of ENA6 field. */ +#define RADIO_DACNF_ENA6_Msk (0x1UL << RADIO_DACNF_ENA6_Pos) /*!< Bit mask of ENA6 field. */ +#define RADIO_DACNF_ENA6_Disabled (0UL) /*!< Disabled */ +#define RADIO_DACNF_ENA6_Enabled (1UL) /*!< Enabled */ + +/* Bit 5 : Enable or disable device address matching using device address 5 */ +#define RADIO_DACNF_ENA5_Pos (5UL) /*!< Position of ENA5 field. */ +#define RADIO_DACNF_ENA5_Msk (0x1UL << RADIO_DACNF_ENA5_Pos) /*!< Bit mask of ENA5 field. */ +#define RADIO_DACNF_ENA5_Disabled (0UL) /*!< Disabled */ +#define RADIO_DACNF_ENA5_Enabled (1UL) /*!< Enabled */ + +/* Bit 4 : Enable or disable device address matching using device address 4 */ +#define RADIO_DACNF_ENA4_Pos (4UL) /*!< Position of ENA4 field. */ +#define RADIO_DACNF_ENA4_Msk (0x1UL << RADIO_DACNF_ENA4_Pos) /*!< Bit mask of ENA4 field. */ +#define RADIO_DACNF_ENA4_Disabled (0UL) /*!< Disabled */ +#define RADIO_DACNF_ENA4_Enabled (1UL) /*!< Enabled */ + +/* Bit 3 : Enable or disable device address matching using device address 3 */ +#define RADIO_DACNF_ENA3_Pos (3UL) /*!< Position of ENA3 field. */ +#define RADIO_DACNF_ENA3_Msk (0x1UL << RADIO_DACNF_ENA3_Pos) /*!< Bit mask of ENA3 field. */ +#define RADIO_DACNF_ENA3_Disabled (0UL) /*!< Disabled */ +#define RADIO_DACNF_ENA3_Enabled (1UL) /*!< Enabled */ + +/* Bit 2 : Enable or disable device address matching using device address 2 */ +#define RADIO_DACNF_ENA2_Pos (2UL) /*!< Position of ENA2 field. */ +#define RADIO_DACNF_ENA2_Msk (0x1UL << RADIO_DACNF_ENA2_Pos) /*!< Bit mask of ENA2 field. */ +#define RADIO_DACNF_ENA2_Disabled (0UL) /*!< Disabled */ +#define RADIO_DACNF_ENA2_Enabled (1UL) /*!< Enabled */ + +/* Bit 1 : Enable or disable device address matching using device address 1 */ +#define RADIO_DACNF_ENA1_Pos (1UL) /*!< Position of ENA1 field. */ +#define RADIO_DACNF_ENA1_Msk (0x1UL << RADIO_DACNF_ENA1_Pos) /*!< Bit mask of ENA1 field. */ +#define RADIO_DACNF_ENA1_Disabled (0UL) /*!< Disabled */ +#define RADIO_DACNF_ENA1_Enabled (1UL) /*!< Enabled */ + +/* Bit 0 : Enable or disable device address matching using device address 0 */ +#define RADIO_DACNF_ENA0_Pos (0UL) /*!< Position of ENA0 field. */ +#define RADIO_DACNF_ENA0_Msk (0x1UL << RADIO_DACNF_ENA0_Pos) /*!< Bit mask of ENA0 field. */ +#define RADIO_DACNF_ENA0_Disabled (0UL) /*!< Disabled */ +#define RADIO_DACNF_ENA0_Enabled (1UL) /*!< Enabled */ + +/* Register: RADIO_MODECNF0 */ +/* Description: Radio mode configuration register 0 */ + +/* Bits 9..8 : Default TX value */ +#define RADIO_MODECNF0_DTX_Pos (8UL) /*!< Position of DTX field. */ +#define RADIO_MODECNF0_DTX_Msk (0x3UL << RADIO_MODECNF0_DTX_Pos) /*!< Bit mask of DTX field. */ +#define RADIO_MODECNF0_DTX_B1 (0UL) /*!< Transmit '1' */ +#define RADIO_MODECNF0_DTX_B0 (1UL) /*!< Transmit '0' */ +#define RADIO_MODECNF0_DTX_Center (2UL) /*!< Transmit center frequency */ + +/* Bit 0 : Radio ramp-up time */ +#define RADIO_MODECNF0_RU_Pos (0UL) /*!< Position of RU field. */ +#define RADIO_MODECNF0_RU_Msk (0x1UL << RADIO_MODECNF0_RU_Pos) /*!< Bit mask of RU field. */ +#define RADIO_MODECNF0_RU_Default (0UL) /*!< Default ramp-up time (tRXEN), compatible with firmware written for nRF51 */ +#define RADIO_MODECNF0_RU_Fast (1UL) /*!< Fast ramp-up (tRXEN,FAST), see electrical specification for more information */ + +/* Register: RADIO_POWER */ +/* Description: Peripheral power control */ + +/* Bit 0 : Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again. */ +#define RADIO_POWER_POWER_Pos (0UL) /*!< Position of POWER field. */ +#define RADIO_POWER_POWER_Msk (0x1UL << RADIO_POWER_POWER_Pos) /*!< Bit mask of POWER field. */ +#define RADIO_POWER_POWER_Disabled (0UL) /*!< Peripheral is powered off */ +#define RADIO_POWER_POWER_Enabled (1UL) /*!< Peripheral is powered on */ + + +/* Peripheral: RNG */ +/* Description: Random Number Generator */ + +/* Register: RNG_SHORTS */ +/* Description: Shortcut register */ + +/* Bit 0 : Shortcut between VALRDY event and STOP task */ +#define RNG_SHORTS_VALRDY_STOP_Pos (0UL) /*!< Position of VALRDY_STOP field. */ +#define RNG_SHORTS_VALRDY_STOP_Msk (0x1UL << RNG_SHORTS_VALRDY_STOP_Pos) /*!< Bit mask of VALRDY_STOP field. */ +#define RNG_SHORTS_VALRDY_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define RNG_SHORTS_VALRDY_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Register: RNG_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 0 : Write '1' to Enable interrupt for VALRDY event */ +#define RNG_INTENSET_VALRDY_Pos (0UL) /*!< Position of VALRDY field. */ +#define RNG_INTENSET_VALRDY_Msk (0x1UL << RNG_INTENSET_VALRDY_Pos) /*!< Bit mask of VALRDY field. */ +#define RNG_INTENSET_VALRDY_Disabled (0UL) /*!< Read: Disabled */ +#define RNG_INTENSET_VALRDY_Enabled (1UL) /*!< Read: Enabled */ +#define RNG_INTENSET_VALRDY_Set (1UL) /*!< Enable */ + +/* Register: RNG_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 0 : Write '1' to Disable interrupt for VALRDY event */ +#define RNG_INTENCLR_VALRDY_Pos (0UL) /*!< Position of VALRDY field. */ +#define RNG_INTENCLR_VALRDY_Msk (0x1UL << RNG_INTENCLR_VALRDY_Pos) /*!< Bit mask of VALRDY field. */ +#define RNG_INTENCLR_VALRDY_Disabled (0UL) /*!< Read: Disabled */ +#define RNG_INTENCLR_VALRDY_Enabled (1UL) /*!< Read: Enabled */ +#define RNG_INTENCLR_VALRDY_Clear (1UL) /*!< Disable */ + +/* Register: RNG_CONFIG */ +/* Description: Configuration register */ + +/* Bit 0 : Bias correction */ +#define RNG_CONFIG_DERCEN_Pos (0UL) /*!< Position of DERCEN field. */ +#define RNG_CONFIG_DERCEN_Msk (0x1UL << RNG_CONFIG_DERCEN_Pos) /*!< Bit mask of DERCEN field. */ +#define RNG_CONFIG_DERCEN_Disabled (0UL) /*!< Disabled */ +#define RNG_CONFIG_DERCEN_Enabled (1UL) /*!< Enabled */ + +/* Register: RNG_VALUE */ +/* Description: Output random number */ + +/* Bits 7..0 : Generated random number */ +#define RNG_VALUE_VALUE_Pos (0UL) /*!< Position of VALUE field. */ +#define RNG_VALUE_VALUE_Msk (0xFFUL << RNG_VALUE_VALUE_Pos) /*!< Bit mask of VALUE field. */ + + +/* Peripheral: RTC */ +/* Description: Real time counter 0 */ + +/* Register: RTC_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 19 : Write '1' to Enable interrupt for COMPARE[3] event */ +#define RTC_INTENSET_COMPARE3_Pos (19UL) /*!< Position of COMPARE3 field. */ +#define RTC_INTENSET_COMPARE3_Msk (0x1UL << RTC_INTENSET_COMPARE3_Pos) /*!< Bit mask of COMPARE3 field. */ +#define RTC_INTENSET_COMPARE3_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_INTENSET_COMPARE3_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_INTENSET_COMPARE3_Set (1UL) /*!< Enable */ + +/* Bit 18 : Write '1' to Enable interrupt for COMPARE[2] event */ +#define RTC_INTENSET_COMPARE2_Pos (18UL) /*!< Position of COMPARE2 field. */ +#define RTC_INTENSET_COMPARE2_Msk (0x1UL << RTC_INTENSET_COMPARE2_Pos) /*!< Bit mask of COMPARE2 field. */ +#define RTC_INTENSET_COMPARE2_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_INTENSET_COMPARE2_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_INTENSET_COMPARE2_Set (1UL) /*!< Enable */ + +/* Bit 17 : Write '1' to Enable interrupt for COMPARE[1] event */ +#define RTC_INTENSET_COMPARE1_Pos (17UL) /*!< Position of COMPARE1 field. */ +#define RTC_INTENSET_COMPARE1_Msk (0x1UL << RTC_INTENSET_COMPARE1_Pos) /*!< Bit mask of COMPARE1 field. */ +#define RTC_INTENSET_COMPARE1_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_INTENSET_COMPARE1_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_INTENSET_COMPARE1_Set (1UL) /*!< Enable */ + +/* Bit 16 : Write '1' to Enable interrupt for COMPARE[0] event */ +#define RTC_INTENSET_COMPARE0_Pos (16UL) /*!< Position of COMPARE0 field. */ +#define RTC_INTENSET_COMPARE0_Msk (0x1UL << RTC_INTENSET_COMPARE0_Pos) /*!< Bit mask of COMPARE0 field. */ +#define RTC_INTENSET_COMPARE0_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_INTENSET_COMPARE0_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_INTENSET_COMPARE0_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for OVRFLW event */ +#define RTC_INTENSET_OVRFLW_Pos (1UL) /*!< Position of OVRFLW field. */ +#define RTC_INTENSET_OVRFLW_Msk (0x1UL << RTC_INTENSET_OVRFLW_Pos) /*!< Bit mask of OVRFLW field. */ +#define RTC_INTENSET_OVRFLW_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_INTENSET_OVRFLW_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_INTENSET_OVRFLW_Set (1UL) /*!< Enable */ + +/* Bit 0 : Write '1' to Enable interrupt for TICK event */ +#define RTC_INTENSET_TICK_Pos (0UL) /*!< Position of TICK field. */ +#define RTC_INTENSET_TICK_Msk (0x1UL << RTC_INTENSET_TICK_Pos) /*!< Bit mask of TICK field. */ +#define RTC_INTENSET_TICK_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_INTENSET_TICK_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_INTENSET_TICK_Set (1UL) /*!< Enable */ + +/* Register: RTC_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 19 : Write '1' to Disable interrupt for COMPARE[3] event */ +#define RTC_INTENCLR_COMPARE3_Pos (19UL) /*!< Position of COMPARE3 field. */ +#define RTC_INTENCLR_COMPARE3_Msk (0x1UL << RTC_INTENCLR_COMPARE3_Pos) /*!< Bit mask of COMPARE3 field. */ +#define RTC_INTENCLR_COMPARE3_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_INTENCLR_COMPARE3_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_INTENCLR_COMPARE3_Clear (1UL) /*!< Disable */ + +/* Bit 18 : Write '1' to Disable interrupt for COMPARE[2] event */ +#define RTC_INTENCLR_COMPARE2_Pos (18UL) /*!< Position of COMPARE2 field. */ +#define RTC_INTENCLR_COMPARE2_Msk (0x1UL << RTC_INTENCLR_COMPARE2_Pos) /*!< Bit mask of COMPARE2 field. */ +#define RTC_INTENCLR_COMPARE2_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_INTENCLR_COMPARE2_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_INTENCLR_COMPARE2_Clear (1UL) /*!< Disable */ + +/* Bit 17 : Write '1' to Disable interrupt for COMPARE[1] event */ +#define RTC_INTENCLR_COMPARE1_Pos (17UL) /*!< Position of COMPARE1 field. */ +#define RTC_INTENCLR_COMPARE1_Msk (0x1UL << RTC_INTENCLR_COMPARE1_Pos) /*!< Bit mask of COMPARE1 field. */ +#define RTC_INTENCLR_COMPARE1_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_INTENCLR_COMPARE1_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_INTENCLR_COMPARE1_Clear (1UL) /*!< Disable */ + +/* Bit 16 : Write '1' to Disable interrupt for COMPARE[0] event */ +#define RTC_INTENCLR_COMPARE0_Pos (16UL) /*!< Position of COMPARE0 field. */ +#define RTC_INTENCLR_COMPARE0_Msk (0x1UL << RTC_INTENCLR_COMPARE0_Pos) /*!< Bit mask of COMPARE0 field. */ +#define RTC_INTENCLR_COMPARE0_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_INTENCLR_COMPARE0_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_INTENCLR_COMPARE0_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for OVRFLW event */ +#define RTC_INTENCLR_OVRFLW_Pos (1UL) /*!< Position of OVRFLW field. */ +#define RTC_INTENCLR_OVRFLW_Msk (0x1UL << RTC_INTENCLR_OVRFLW_Pos) /*!< Bit mask of OVRFLW field. */ +#define RTC_INTENCLR_OVRFLW_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_INTENCLR_OVRFLW_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_INTENCLR_OVRFLW_Clear (1UL) /*!< Disable */ + +/* Bit 0 : Write '1' to Disable interrupt for TICK event */ +#define RTC_INTENCLR_TICK_Pos (0UL) /*!< Position of TICK field. */ +#define RTC_INTENCLR_TICK_Msk (0x1UL << RTC_INTENCLR_TICK_Pos) /*!< Bit mask of TICK field. */ +#define RTC_INTENCLR_TICK_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_INTENCLR_TICK_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_INTENCLR_TICK_Clear (1UL) /*!< Disable */ + +/* Register: RTC_EVTEN */ +/* Description: Enable or disable event routing */ + +/* Bit 19 : Enable or disable event routing for COMPARE[3] event */ +#define RTC_EVTEN_COMPARE3_Pos (19UL) /*!< Position of COMPARE3 field. */ +#define RTC_EVTEN_COMPARE3_Msk (0x1UL << RTC_EVTEN_COMPARE3_Pos) /*!< Bit mask of COMPARE3 field. */ +#define RTC_EVTEN_COMPARE3_Disabled (0UL) /*!< Disable */ +#define RTC_EVTEN_COMPARE3_Enabled (1UL) /*!< Enable */ + +/* Bit 18 : Enable or disable event routing for COMPARE[2] event */ +#define RTC_EVTEN_COMPARE2_Pos (18UL) /*!< Position of COMPARE2 field. */ +#define RTC_EVTEN_COMPARE2_Msk (0x1UL << RTC_EVTEN_COMPARE2_Pos) /*!< Bit mask of COMPARE2 field. */ +#define RTC_EVTEN_COMPARE2_Disabled (0UL) /*!< Disable */ +#define RTC_EVTEN_COMPARE2_Enabled (1UL) /*!< Enable */ + +/* Bit 17 : Enable or disable event routing for COMPARE[1] event */ +#define RTC_EVTEN_COMPARE1_Pos (17UL) /*!< Position of COMPARE1 field. */ +#define RTC_EVTEN_COMPARE1_Msk (0x1UL << RTC_EVTEN_COMPARE1_Pos) /*!< Bit mask of COMPARE1 field. */ +#define RTC_EVTEN_COMPARE1_Disabled (0UL) /*!< Disable */ +#define RTC_EVTEN_COMPARE1_Enabled (1UL) /*!< Enable */ + +/* Bit 16 : Enable or disable event routing for COMPARE[0] event */ +#define RTC_EVTEN_COMPARE0_Pos (16UL) /*!< Position of COMPARE0 field. */ +#define RTC_EVTEN_COMPARE0_Msk (0x1UL << RTC_EVTEN_COMPARE0_Pos) /*!< Bit mask of COMPARE0 field. */ +#define RTC_EVTEN_COMPARE0_Disabled (0UL) /*!< Disable */ +#define RTC_EVTEN_COMPARE0_Enabled (1UL) /*!< Enable */ + +/* Bit 1 : Enable or disable event routing for OVRFLW event */ +#define RTC_EVTEN_OVRFLW_Pos (1UL) /*!< Position of OVRFLW field. */ +#define RTC_EVTEN_OVRFLW_Msk (0x1UL << RTC_EVTEN_OVRFLW_Pos) /*!< Bit mask of OVRFLW field. */ +#define RTC_EVTEN_OVRFLW_Disabled (0UL) /*!< Disable */ +#define RTC_EVTEN_OVRFLW_Enabled (1UL) /*!< Enable */ + +/* Bit 0 : Enable or disable event routing for TICK event */ +#define RTC_EVTEN_TICK_Pos (0UL) /*!< Position of TICK field. */ +#define RTC_EVTEN_TICK_Msk (0x1UL << RTC_EVTEN_TICK_Pos) /*!< Bit mask of TICK field. */ +#define RTC_EVTEN_TICK_Disabled (0UL) /*!< Disable */ +#define RTC_EVTEN_TICK_Enabled (1UL) /*!< Enable */ + +/* Register: RTC_EVTENSET */ +/* Description: Enable event routing */ + +/* Bit 19 : Write '1' to Enable event routing for COMPARE[3] event */ +#define RTC_EVTENSET_COMPARE3_Pos (19UL) /*!< Position of COMPARE3 field. */ +#define RTC_EVTENSET_COMPARE3_Msk (0x1UL << RTC_EVTENSET_COMPARE3_Pos) /*!< Bit mask of COMPARE3 field. */ +#define RTC_EVTENSET_COMPARE3_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_EVTENSET_COMPARE3_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_EVTENSET_COMPARE3_Set (1UL) /*!< Enable */ + +/* Bit 18 : Write '1' to Enable event routing for COMPARE[2] event */ +#define RTC_EVTENSET_COMPARE2_Pos (18UL) /*!< Position of COMPARE2 field. */ +#define RTC_EVTENSET_COMPARE2_Msk (0x1UL << RTC_EVTENSET_COMPARE2_Pos) /*!< Bit mask of COMPARE2 field. */ +#define RTC_EVTENSET_COMPARE2_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_EVTENSET_COMPARE2_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_EVTENSET_COMPARE2_Set (1UL) /*!< Enable */ + +/* Bit 17 : Write '1' to Enable event routing for COMPARE[1] event */ +#define RTC_EVTENSET_COMPARE1_Pos (17UL) /*!< Position of COMPARE1 field. */ +#define RTC_EVTENSET_COMPARE1_Msk (0x1UL << RTC_EVTENSET_COMPARE1_Pos) /*!< Bit mask of COMPARE1 field. */ +#define RTC_EVTENSET_COMPARE1_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_EVTENSET_COMPARE1_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_EVTENSET_COMPARE1_Set (1UL) /*!< Enable */ + +/* Bit 16 : Write '1' to Enable event routing for COMPARE[0] event */ +#define RTC_EVTENSET_COMPARE0_Pos (16UL) /*!< Position of COMPARE0 field. */ +#define RTC_EVTENSET_COMPARE0_Msk (0x1UL << RTC_EVTENSET_COMPARE0_Pos) /*!< Bit mask of COMPARE0 field. */ +#define RTC_EVTENSET_COMPARE0_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_EVTENSET_COMPARE0_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_EVTENSET_COMPARE0_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable event routing for OVRFLW event */ +#define RTC_EVTENSET_OVRFLW_Pos (1UL) /*!< Position of OVRFLW field. */ +#define RTC_EVTENSET_OVRFLW_Msk (0x1UL << RTC_EVTENSET_OVRFLW_Pos) /*!< Bit mask of OVRFLW field. */ +#define RTC_EVTENSET_OVRFLW_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_EVTENSET_OVRFLW_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_EVTENSET_OVRFLW_Set (1UL) /*!< Enable */ + +/* Bit 0 : Write '1' to Enable event routing for TICK event */ +#define RTC_EVTENSET_TICK_Pos (0UL) /*!< Position of TICK field. */ +#define RTC_EVTENSET_TICK_Msk (0x1UL << RTC_EVTENSET_TICK_Pos) /*!< Bit mask of TICK field. */ +#define RTC_EVTENSET_TICK_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_EVTENSET_TICK_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_EVTENSET_TICK_Set (1UL) /*!< Enable */ + +/* Register: RTC_EVTENCLR */ +/* Description: Disable event routing */ + +/* Bit 19 : Write '1' to Disable event routing for COMPARE[3] event */ +#define RTC_EVTENCLR_COMPARE3_Pos (19UL) /*!< Position of COMPARE3 field. */ +#define RTC_EVTENCLR_COMPARE3_Msk (0x1UL << RTC_EVTENCLR_COMPARE3_Pos) /*!< Bit mask of COMPARE3 field. */ +#define RTC_EVTENCLR_COMPARE3_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_EVTENCLR_COMPARE3_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_EVTENCLR_COMPARE3_Clear (1UL) /*!< Disable */ + +/* Bit 18 : Write '1' to Disable event routing for COMPARE[2] event */ +#define RTC_EVTENCLR_COMPARE2_Pos (18UL) /*!< Position of COMPARE2 field. */ +#define RTC_EVTENCLR_COMPARE2_Msk (0x1UL << RTC_EVTENCLR_COMPARE2_Pos) /*!< Bit mask of COMPARE2 field. */ +#define RTC_EVTENCLR_COMPARE2_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_EVTENCLR_COMPARE2_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_EVTENCLR_COMPARE2_Clear (1UL) /*!< Disable */ + +/* Bit 17 : Write '1' to Disable event routing for COMPARE[1] event */ +#define RTC_EVTENCLR_COMPARE1_Pos (17UL) /*!< Position of COMPARE1 field. */ +#define RTC_EVTENCLR_COMPARE1_Msk (0x1UL << RTC_EVTENCLR_COMPARE1_Pos) /*!< Bit mask of COMPARE1 field. */ +#define RTC_EVTENCLR_COMPARE1_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_EVTENCLR_COMPARE1_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_EVTENCLR_COMPARE1_Clear (1UL) /*!< Disable */ + +/* Bit 16 : Write '1' to Disable event routing for COMPARE[0] event */ +#define RTC_EVTENCLR_COMPARE0_Pos (16UL) /*!< Position of COMPARE0 field. */ +#define RTC_EVTENCLR_COMPARE0_Msk (0x1UL << RTC_EVTENCLR_COMPARE0_Pos) /*!< Bit mask of COMPARE0 field. */ +#define RTC_EVTENCLR_COMPARE0_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_EVTENCLR_COMPARE0_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_EVTENCLR_COMPARE0_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable event routing for OVRFLW event */ +#define RTC_EVTENCLR_OVRFLW_Pos (1UL) /*!< Position of OVRFLW field. */ +#define RTC_EVTENCLR_OVRFLW_Msk (0x1UL << RTC_EVTENCLR_OVRFLW_Pos) /*!< Bit mask of OVRFLW field. */ +#define RTC_EVTENCLR_OVRFLW_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_EVTENCLR_OVRFLW_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_EVTENCLR_OVRFLW_Clear (1UL) /*!< Disable */ + +/* Bit 0 : Write '1' to Disable event routing for TICK event */ +#define RTC_EVTENCLR_TICK_Pos (0UL) /*!< Position of TICK field. */ +#define RTC_EVTENCLR_TICK_Msk (0x1UL << RTC_EVTENCLR_TICK_Pos) /*!< Bit mask of TICK field. */ +#define RTC_EVTENCLR_TICK_Disabled (0UL) /*!< Read: Disabled */ +#define RTC_EVTENCLR_TICK_Enabled (1UL) /*!< Read: Enabled */ +#define RTC_EVTENCLR_TICK_Clear (1UL) /*!< Disable */ + +/* Register: RTC_COUNTER */ +/* Description: Current COUNTER value */ + +/* Bits 23..0 : Counter value */ +#define RTC_COUNTER_COUNTER_Pos (0UL) /*!< Position of COUNTER field. */ +#define RTC_COUNTER_COUNTER_Msk (0xFFFFFFUL << RTC_COUNTER_COUNTER_Pos) /*!< Bit mask of COUNTER field. */ + +/* Register: RTC_PRESCALER */ +/* Description: 12 bit prescaler for COUNTER frequency (32768/(PRESCALER+1)).Must be written when RTC is stopped */ + +/* Bits 11..0 : Prescaler value */ +#define RTC_PRESCALER_PRESCALER_Pos (0UL) /*!< Position of PRESCALER field. */ +#define RTC_PRESCALER_PRESCALER_Msk (0xFFFUL << RTC_PRESCALER_PRESCALER_Pos) /*!< Bit mask of PRESCALER field. */ + +/* Register: RTC_CC */ +/* Description: Description collection[0]: Compare register 0 */ + +/* Bits 23..0 : Compare value */ +#define RTC_CC_COMPARE_Pos (0UL) /*!< Position of COMPARE field. */ +#define RTC_CC_COMPARE_Msk (0xFFFFFFUL << RTC_CC_COMPARE_Pos) /*!< Bit mask of COMPARE field. */ + + +/* Peripheral: SAADC */ +/* Description: Analog to Digital Converter */ + +/* Register: SAADC_INTEN */ +/* Description: Enable or disable interrupt */ + +/* Bit 21 : Enable or disable interrupt for CH[7].LIMITL event */ +#define SAADC_INTEN_CH7LIMITL_Pos (21UL) /*!< Position of CH7LIMITL field. */ +#define SAADC_INTEN_CH7LIMITL_Msk (0x1UL << SAADC_INTEN_CH7LIMITL_Pos) /*!< Bit mask of CH7LIMITL field. */ +#define SAADC_INTEN_CH7LIMITL_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_CH7LIMITL_Enabled (1UL) /*!< Enable */ + +/* Bit 20 : Enable or disable interrupt for CH[7].LIMITH event */ +#define SAADC_INTEN_CH7LIMITH_Pos (20UL) /*!< Position of CH7LIMITH field. */ +#define SAADC_INTEN_CH7LIMITH_Msk (0x1UL << SAADC_INTEN_CH7LIMITH_Pos) /*!< Bit mask of CH7LIMITH field. */ +#define SAADC_INTEN_CH7LIMITH_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_CH7LIMITH_Enabled (1UL) /*!< Enable */ + +/* Bit 19 : Enable or disable interrupt for CH[6].LIMITL event */ +#define SAADC_INTEN_CH6LIMITL_Pos (19UL) /*!< Position of CH6LIMITL field. */ +#define SAADC_INTEN_CH6LIMITL_Msk (0x1UL << SAADC_INTEN_CH6LIMITL_Pos) /*!< Bit mask of CH6LIMITL field. */ +#define SAADC_INTEN_CH6LIMITL_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_CH6LIMITL_Enabled (1UL) /*!< Enable */ + +/* Bit 18 : Enable or disable interrupt for CH[6].LIMITH event */ +#define SAADC_INTEN_CH6LIMITH_Pos (18UL) /*!< Position of CH6LIMITH field. */ +#define SAADC_INTEN_CH6LIMITH_Msk (0x1UL << SAADC_INTEN_CH6LIMITH_Pos) /*!< Bit mask of CH6LIMITH field. */ +#define SAADC_INTEN_CH6LIMITH_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_CH6LIMITH_Enabled (1UL) /*!< Enable */ + +/* Bit 17 : Enable or disable interrupt for CH[5].LIMITL event */ +#define SAADC_INTEN_CH5LIMITL_Pos (17UL) /*!< Position of CH5LIMITL field. */ +#define SAADC_INTEN_CH5LIMITL_Msk (0x1UL << SAADC_INTEN_CH5LIMITL_Pos) /*!< Bit mask of CH5LIMITL field. */ +#define SAADC_INTEN_CH5LIMITL_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_CH5LIMITL_Enabled (1UL) /*!< Enable */ + +/* Bit 16 : Enable or disable interrupt for CH[5].LIMITH event */ +#define SAADC_INTEN_CH5LIMITH_Pos (16UL) /*!< Position of CH5LIMITH field. */ +#define SAADC_INTEN_CH5LIMITH_Msk (0x1UL << SAADC_INTEN_CH5LIMITH_Pos) /*!< Bit mask of CH5LIMITH field. */ +#define SAADC_INTEN_CH5LIMITH_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_CH5LIMITH_Enabled (1UL) /*!< Enable */ + +/* Bit 15 : Enable or disable interrupt for CH[4].LIMITL event */ +#define SAADC_INTEN_CH4LIMITL_Pos (15UL) /*!< Position of CH4LIMITL field. */ +#define SAADC_INTEN_CH4LIMITL_Msk (0x1UL << SAADC_INTEN_CH4LIMITL_Pos) /*!< Bit mask of CH4LIMITL field. */ +#define SAADC_INTEN_CH4LIMITL_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_CH4LIMITL_Enabled (1UL) /*!< Enable */ + +/* Bit 14 : Enable or disable interrupt for CH[4].LIMITH event */ +#define SAADC_INTEN_CH4LIMITH_Pos (14UL) /*!< Position of CH4LIMITH field. */ +#define SAADC_INTEN_CH4LIMITH_Msk (0x1UL << SAADC_INTEN_CH4LIMITH_Pos) /*!< Bit mask of CH4LIMITH field. */ +#define SAADC_INTEN_CH4LIMITH_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_CH4LIMITH_Enabled (1UL) /*!< Enable */ + +/* Bit 13 : Enable or disable interrupt for CH[3].LIMITL event */ +#define SAADC_INTEN_CH3LIMITL_Pos (13UL) /*!< Position of CH3LIMITL field. */ +#define SAADC_INTEN_CH3LIMITL_Msk (0x1UL << SAADC_INTEN_CH3LIMITL_Pos) /*!< Bit mask of CH3LIMITL field. */ +#define SAADC_INTEN_CH3LIMITL_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_CH3LIMITL_Enabled (1UL) /*!< Enable */ + +/* Bit 12 : Enable or disable interrupt for CH[3].LIMITH event */ +#define SAADC_INTEN_CH3LIMITH_Pos (12UL) /*!< Position of CH3LIMITH field. */ +#define SAADC_INTEN_CH3LIMITH_Msk (0x1UL << SAADC_INTEN_CH3LIMITH_Pos) /*!< Bit mask of CH3LIMITH field. */ +#define SAADC_INTEN_CH3LIMITH_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_CH3LIMITH_Enabled (1UL) /*!< Enable */ + +/* Bit 11 : Enable or disable interrupt for CH[2].LIMITL event */ +#define SAADC_INTEN_CH2LIMITL_Pos (11UL) /*!< Position of CH2LIMITL field. */ +#define SAADC_INTEN_CH2LIMITL_Msk (0x1UL << SAADC_INTEN_CH2LIMITL_Pos) /*!< Bit mask of CH2LIMITL field. */ +#define SAADC_INTEN_CH2LIMITL_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_CH2LIMITL_Enabled (1UL) /*!< Enable */ + +/* Bit 10 : Enable or disable interrupt for CH[2].LIMITH event */ +#define SAADC_INTEN_CH2LIMITH_Pos (10UL) /*!< Position of CH2LIMITH field. */ +#define SAADC_INTEN_CH2LIMITH_Msk (0x1UL << SAADC_INTEN_CH2LIMITH_Pos) /*!< Bit mask of CH2LIMITH field. */ +#define SAADC_INTEN_CH2LIMITH_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_CH2LIMITH_Enabled (1UL) /*!< Enable */ + +/* Bit 9 : Enable or disable interrupt for CH[1].LIMITL event */ +#define SAADC_INTEN_CH1LIMITL_Pos (9UL) /*!< Position of CH1LIMITL field. */ +#define SAADC_INTEN_CH1LIMITL_Msk (0x1UL << SAADC_INTEN_CH1LIMITL_Pos) /*!< Bit mask of CH1LIMITL field. */ +#define SAADC_INTEN_CH1LIMITL_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_CH1LIMITL_Enabled (1UL) /*!< Enable */ + +/* Bit 8 : Enable or disable interrupt for CH[1].LIMITH event */ +#define SAADC_INTEN_CH1LIMITH_Pos (8UL) /*!< Position of CH1LIMITH field. */ +#define SAADC_INTEN_CH1LIMITH_Msk (0x1UL << SAADC_INTEN_CH1LIMITH_Pos) /*!< Bit mask of CH1LIMITH field. */ +#define SAADC_INTEN_CH1LIMITH_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_CH1LIMITH_Enabled (1UL) /*!< Enable */ + +/* Bit 7 : Enable or disable interrupt for CH[0].LIMITL event */ +#define SAADC_INTEN_CH0LIMITL_Pos (7UL) /*!< Position of CH0LIMITL field. */ +#define SAADC_INTEN_CH0LIMITL_Msk (0x1UL << SAADC_INTEN_CH0LIMITL_Pos) /*!< Bit mask of CH0LIMITL field. */ +#define SAADC_INTEN_CH0LIMITL_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_CH0LIMITL_Enabled (1UL) /*!< Enable */ + +/* Bit 6 : Enable or disable interrupt for CH[0].LIMITH event */ +#define SAADC_INTEN_CH0LIMITH_Pos (6UL) /*!< Position of CH0LIMITH field. */ +#define SAADC_INTEN_CH0LIMITH_Msk (0x1UL << SAADC_INTEN_CH0LIMITH_Pos) /*!< Bit mask of CH0LIMITH field. */ +#define SAADC_INTEN_CH0LIMITH_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_CH0LIMITH_Enabled (1UL) /*!< Enable */ + +/* Bit 5 : Enable or disable interrupt for STOPPED event */ +#define SAADC_INTEN_STOPPED_Pos (5UL) /*!< Position of STOPPED field. */ +#define SAADC_INTEN_STOPPED_Msk (0x1UL << SAADC_INTEN_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define SAADC_INTEN_STOPPED_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_STOPPED_Enabled (1UL) /*!< Enable */ + +/* Bit 4 : Enable or disable interrupt for CALIBRATEDONE event */ +#define SAADC_INTEN_CALIBRATEDONE_Pos (4UL) /*!< Position of CALIBRATEDONE field. */ +#define SAADC_INTEN_CALIBRATEDONE_Msk (0x1UL << SAADC_INTEN_CALIBRATEDONE_Pos) /*!< Bit mask of CALIBRATEDONE field. */ +#define SAADC_INTEN_CALIBRATEDONE_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_CALIBRATEDONE_Enabled (1UL) /*!< Enable */ + +/* Bit 3 : Enable or disable interrupt for RESULTDONE event */ +#define SAADC_INTEN_RESULTDONE_Pos (3UL) /*!< Position of RESULTDONE field. */ +#define SAADC_INTEN_RESULTDONE_Msk (0x1UL << SAADC_INTEN_RESULTDONE_Pos) /*!< Bit mask of RESULTDONE field. */ +#define SAADC_INTEN_RESULTDONE_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_RESULTDONE_Enabled (1UL) /*!< Enable */ + +/* Bit 2 : Enable or disable interrupt for DONE event */ +#define SAADC_INTEN_DONE_Pos (2UL) /*!< Position of DONE field. */ +#define SAADC_INTEN_DONE_Msk (0x1UL << SAADC_INTEN_DONE_Pos) /*!< Bit mask of DONE field. */ +#define SAADC_INTEN_DONE_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_DONE_Enabled (1UL) /*!< Enable */ + +/* Bit 1 : Enable or disable interrupt for END event */ +#define SAADC_INTEN_END_Pos (1UL) /*!< Position of END field. */ +#define SAADC_INTEN_END_Msk (0x1UL << SAADC_INTEN_END_Pos) /*!< Bit mask of END field. */ +#define SAADC_INTEN_END_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_END_Enabled (1UL) /*!< Enable */ + +/* Bit 0 : Enable or disable interrupt for STARTED event */ +#define SAADC_INTEN_STARTED_Pos (0UL) /*!< Position of STARTED field. */ +#define SAADC_INTEN_STARTED_Msk (0x1UL << SAADC_INTEN_STARTED_Pos) /*!< Bit mask of STARTED field. */ +#define SAADC_INTEN_STARTED_Disabled (0UL) /*!< Disable */ +#define SAADC_INTEN_STARTED_Enabled (1UL) /*!< Enable */ + +/* Register: SAADC_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 21 : Write '1' to Enable interrupt for CH[7].LIMITL event */ +#define SAADC_INTENSET_CH7LIMITL_Pos (21UL) /*!< Position of CH7LIMITL field. */ +#define SAADC_INTENSET_CH7LIMITL_Msk (0x1UL << SAADC_INTENSET_CH7LIMITL_Pos) /*!< Bit mask of CH7LIMITL field. */ +#define SAADC_INTENSET_CH7LIMITL_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_CH7LIMITL_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_CH7LIMITL_Set (1UL) /*!< Enable */ + +/* Bit 20 : Write '1' to Enable interrupt for CH[7].LIMITH event */ +#define SAADC_INTENSET_CH7LIMITH_Pos (20UL) /*!< Position of CH7LIMITH field. */ +#define SAADC_INTENSET_CH7LIMITH_Msk (0x1UL << SAADC_INTENSET_CH7LIMITH_Pos) /*!< Bit mask of CH7LIMITH field. */ +#define SAADC_INTENSET_CH7LIMITH_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_CH7LIMITH_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_CH7LIMITH_Set (1UL) /*!< Enable */ + +/* Bit 19 : Write '1' to Enable interrupt for CH[6].LIMITL event */ +#define SAADC_INTENSET_CH6LIMITL_Pos (19UL) /*!< Position of CH6LIMITL field. */ +#define SAADC_INTENSET_CH6LIMITL_Msk (0x1UL << SAADC_INTENSET_CH6LIMITL_Pos) /*!< Bit mask of CH6LIMITL field. */ +#define SAADC_INTENSET_CH6LIMITL_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_CH6LIMITL_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_CH6LIMITL_Set (1UL) /*!< Enable */ + +/* Bit 18 : Write '1' to Enable interrupt for CH[6].LIMITH event */ +#define SAADC_INTENSET_CH6LIMITH_Pos (18UL) /*!< Position of CH6LIMITH field. */ +#define SAADC_INTENSET_CH6LIMITH_Msk (0x1UL << SAADC_INTENSET_CH6LIMITH_Pos) /*!< Bit mask of CH6LIMITH field. */ +#define SAADC_INTENSET_CH6LIMITH_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_CH6LIMITH_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_CH6LIMITH_Set (1UL) /*!< Enable */ + +/* Bit 17 : Write '1' to Enable interrupt for CH[5].LIMITL event */ +#define SAADC_INTENSET_CH5LIMITL_Pos (17UL) /*!< Position of CH5LIMITL field. */ +#define SAADC_INTENSET_CH5LIMITL_Msk (0x1UL << SAADC_INTENSET_CH5LIMITL_Pos) /*!< Bit mask of CH5LIMITL field. */ +#define SAADC_INTENSET_CH5LIMITL_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_CH5LIMITL_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_CH5LIMITL_Set (1UL) /*!< Enable */ + +/* Bit 16 : Write '1' to Enable interrupt for CH[5].LIMITH event */ +#define SAADC_INTENSET_CH5LIMITH_Pos (16UL) /*!< Position of CH5LIMITH field. */ +#define SAADC_INTENSET_CH5LIMITH_Msk (0x1UL << SAADC_INTENSET_CH5LIMITH_Pos) /*!< Bit mask of CH5LIMITH field. */ +#define SAADC_INTENSET_CH5LIMITH_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_CH5LIMITH_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_CH5LIMITH_Set (1UL) /*!< Enable */ + +/* Bit 15 : Write '1' to Enable interrupt for CH[4].LIMITL event */ +#define SAADC_INTENSET_CH4LIMITL_Pos (15UL) /*!< Position of CH4LIMITL field. */ +#define SAADC_INTENSET_CH4LIMITL_Msk (0x1UL << SAADC_INTENSET_CH4LIMITL_Pos) /*!< Bit mask of CH4LIMITL field. */ +#define SAADC_INTENSET_CH4LIMITL_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_CH4LIMITL_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_CH4LIMITL_Set (1UL) /*!< Enable */ + +/* Bit 14 : Write '1' to Enable interrupt for CH[4].LIMITH event */ +#define SAADC_INTENSET_CH4LIMITH_Pos (14UL) /*!< Position of CH4LIMITH field. */ +#define SAADC_INTENSET_CH4LIMITH_Msk (0x1UL << SAADC_INTENSET_CH4LIMITH_Pos) /*!< Bit mask of CH4LIMITH field. */ +#define SAADC_INTENSET_CH4LIMITH_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_CH4LIMITH_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_CH4LIMITH_Set (1UL) /*!< Enable */ + +/* Bit 13 : Write '1' to Enable interrupt for CH[3].LIMITL event */ +#define SAADC_INTENSET_CH3LIMITL_Pos (13UL) /*!< Position of CH3LIMITL field. */ +#define SAADC_INTENSET_CH3LIMITL_Msk (0x1UL << SAADC_INTENSET_CH3LIMITL_Pos) /*!< Bit mask of CH3LIMITL field. */ +#define SAADC_INTENSET_CH3LIMITL_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_CH3LIMITL_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_CH3LIMITL_Set (1UL) /*!< Enable */ + +/* Bit 12 : Write '1' to Enable interrupt for CH[3].LIMITH event */ +#define SAADC_INTENSET_CH3LIMITH_Pos (12UL) /*!< Position of CH3LIMITH field. */ +#define SAADC_INTENSET_CH3LIMITH_Msk (0x1UL << SAADC_INTENSET_CH3LIMITH_Pos) /*!< Bit mask of CH3LIMITH field. */ +#define SAADC_INTENSET_CH3LIMITH_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_CH3LIMITH_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_CH3LIMITH_Set (1UL) /*!< Enable */ + +/* Bit 11 : Write '1' to Enable interrupt for CH[2].LIMITL event */ +#define SAADC_INTENSET_CH2LIMITL_Pos (11UL) /*!< Position of CH2LIMITL field. */ +#define SAADC_INTENSET_CH2LIMITL_Msk (0x1UL << SAADC_INTENSET_CH2LIMITL_Pos) /*!< Bit mask of CH2LIMITL field. */ +#define SAADC_INTENSET_CH2LIMITL_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_CH2LIMITL_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_CH2LIMITL_Set (1UL) /*!< Enable */ + +/* Bit 10 : Write '1' to Enable interrupt for CH[2].LIMITH event */ +#define SAADC_INTENSET_CH2LIMITH_Pos (10UL) /*!< Position of CH2LIMITH field. */ +#define SAADC_INTENSET_CH2LIMITH_Msk (0x1UL << SAADC_INTENSET_CH2LIMITH_Pos) /*!< Bit mask of CH2LIMITH field. */ +#define SAADC_INTENSET_CH2LIMITH_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_CH2LIMITH_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_CH2LIMITH_Set (1UL) /*!< Enable */ + +/* Bit 9 : Write '1' to Enable interrupt for CH[1].LIMITL event */ +#define SAADC_INTENSET_CH1LIMITL_Pos (9UL) /*!< Position of CH1LIMITL field. */ +#define SAADC_INTENSET_CH1LIMITL_Msk (0x1UL << SAADC_INTENSET_CH1LIMITL_Pos) /*!< Bit mask of CH1LIMITL field. */ +#define SAADC_INTENSET_CH1LIMITL_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_CH1LIMITL_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_CH1LIMITL_Set (1UL) /*!< Enable */ + +/* Bit 8 : Write '1' to Enable interrupt for CH[1].LIMITH event */ +#define SAADC_INTENSET_CH1LIMITH_Pos (8UL) /*!< Position of CH1LIMITH field. */ +#define SAADC_INTENSET_CH1LIMITH_Msk (0x1UL << SAADC_INTENSET_CH1LIMITH_Pos) /*!< Bit mask of CH1LIMITH field. */ +#define SAADC_INTENSET_CH1LIMITH_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_CH1LIMITH_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_CH1LIMITH_Set (1UL) /*!< Enable */ + +/* Bit 7 : Write '1' to Enable interrupt for CH[0].LIMITL event */ +#define SAADC_INTENSET_CH0LIMITL_Pos (7UL) /*!< Position of CH0LIMITL field. */ +#define SAADC_INTENSET_CH0LIMITL_Msk (0x1UL << SAADC_INTENSET_CH0LIMITL_Pos) /*!< Bit mask of CH0LIMITL field. */ +#define SAADC_INTENSET_CH0LIMITL_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_CH0LIMITL_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_CH0LIMITL_Set (1UL) /*!< Enable */ + +/* Bit 6 : Write '1' to Enable interrupt for CH[0].LIMITH event */ +#define SAADC_INTENSET_CH0LIMITH_Pos (6UL) /*!< Position of CH0LIMITH field. */ +#define SAADC_INTENSET_CH0LIMITH_Msk (0x1UL << SAADC_INTENSET_CH0LIMITH_Pos) /*!< Bit mask of CH0LIMITH field. */ +#define SAADC_INTENSET_CH0LIMITH_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_CH0LIMITH_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_CH0LIMITH_Set (1UL) /*!< Enable */ + +/* Bit 5 : Write '1' to Enable interrupt for STOPPED event */ +#define SAADC_INTENSET_STOPPED_Pos (5UL) /*!< Position of STOPPED field. */ +#define SAADC_INTENSET_STOPPED_Msk (0x1UL << SAADC_INTENSET_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define SAADC_INTENSET_STOPPED_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_STOPPED_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_STOPPED_Set (1UL) /*!< Enable */ + +/* Bit 4 : Write '1' to Enable interrupt for CALIBRATEDONE event */ +#define SAADC_INTENSET_CALIBRATEDONE_Pos (4UL) /*!< Position of CALIBRATEDONE field. */ +#define SAADC_INTENSET_CALIBRATEDONE_Msk (0x1UL << SAADC_INTENSET_CALIBRATEDONE_Pos) /*!< Bit mask of CALIBRATEDONE field. */ +#define SAADC_INTENSET_CALIBRATEDONE_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_CALIBRATEDONE_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_CALIBRATEDONE_Set (1UL) /*!< Enable */ + +/* Bit 3 : Write '1' to Enable interrupt for RESULTDONE event */ +#define SAADC_INTENSET_RESULTDONE_Pos (3UL) /*!< Position of RESULTDONE field. */ +#define SAADC_INTENSET_RESULTDONE_Msk (0x1UL << SAADC_INTENSET_RESULTDONE_Pos) /*!< Bit mask of RESULTDONE field. */ +#define SAADC_INTENSET_RESULTDONE_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_RESULTDONE_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_RESULTDONE_Set (1UL) /*!< Enable */ + +/* Bit 2 : Write '1' to Enable interrupt for DONE event */ +#define SAADC_INTENSET_DONE_Pos (2UL) /*!< Position of DONE field. */ +#define SAADC_INTENSET_DONE_Msk (0x1UL << SAADC_INTENSET_DONE_Pos) /*!< Bit mask of DONE field. */ +#define SAADC_INTENSET_DONE_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_DONE_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_DONE_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for END event */ +#define SAADC_INTENSET_END_Pos (1UL) /*!< Position of END field. */ +#define SAADC_INTENSET_END_Msk (0x1UL << SAADC_INTENSET_END_Pos) /*!< Bit mask of END field. */ +#define SAADC_INTENSET_END_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_END_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_END_Set (1UL) /*!< Enable */ + +/* Bit 0 : Write '1' to Enable interrupt for STARTED event */ +#define SAADC_INTENSET_STARTED_Pos (0UL) /*!< Position of STARTED field. */ +#define SAADC_INTENSET_STARTED_Msk (0x1UL << SAADC_INTENSET_STARTED_Pos) /*!< Bit mask of STARTED field. */ +#define SAADC_INTENSET_STARTED_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENSET_STARTED_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENSET_STARTED_Set (1UL) /*!< Enable */ + +/* Register: SAADC_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 21 : Write '1' to Disable interrupt for CH[7].LIMITL event */ +#define SAADC_INTENCLR_CH7LIMITL_Pos (21UL) /*!< Position of CH7LIMITL field. */ +#define SAADC_INTENCLR_CH7LIMITL_Msk (0x1UL << SAADC_INTENCLR_CH7LIMITL_Pos) /*!< Bit mask of CH7LIMITL field. */ +#define SAADC_INTENCLR_CH7LIMITL_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_CH7LIMITL_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_CH7LIMITL_Clear (1UL) /*!< Disable */ + +/* Bit 20 : Write '1' to Disable interrupt for CH[7].LIMITH event */ +#define SAADC_INTENCLR_CH7LIMITH_Pos (20UL) /*!< Position of CH7LIMITH field. */ +#define SAADC_INTENCLR_CH7LIMITH_Msk (0x1UL << SAADC_INTENCLR_CH7LIMITH_Pos) /*!< Bit mask of CH7LIMITH field. */ +#define SAADC_INTENCLR_CH7LIMITH_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_CH7LIMITH_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_CH7LIMITH_Clear (1UL) /*!< Disable */ + +/* Bit 19 : Write '1' to Disable interrupt for CH[6].LIMITL event */ +#define SAADC_INTENCLR_CH6LIMITL_Pos (19UL) /*!< Position of CH6LIMITL field. */ +#define SAADC_INTENCLR_CH6LIMITL_Msk (0x1UL << SAADC_INTENCLR_CH6LIMITL_Pos) /*!< Bit mask of CH6LIMITL field. */ +#define SAADC_INTENCLR_CH6LIMITL_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_CH6LIMITL_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_CH6LIMITL_Clear (1UL) /*!< Disable */ + +/* Bit 18 : Write '1' to Disable interrupt for CH[6].LIMITH event */ +#define SAADC_INTENCLR_CH6LIMITH_Pos (18UL) /*!< Position of CH6LIMITH field. */ +#define SAADC_INTENCLR_CH6LIMITH_Msk (0x1UL << SAADC_INTENCLR_CH6LIMITH_Pos) /*!< Bit mask of CH6LIMITH field. */ +#define SAADC_INTENCLR_CH6LIMITH_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_CH6LIMITH_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_CH6LIMITH_Clear (1UL) /*!< Disable */ + +/* Bit 17 : Write '1' to Disable interrupt for CH[5].LIMITL event */ +#define SAADC_INTENCLR_CH5LIMITL_Pos (17UL) /*!< Position of CH5LIMITL field. */ +#define SAADC_INTENCLR_CH5LIMITL_Msk (0x1UL << SAADC_INTENCLR_CH5LIMITL_Pos) /*!< Bit mask of CH5LIMITL field. */ +#define SAADC_INTENCLR_CH5LIMITL_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_CH5LIMITL_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_CH5LIMITL_Clear (1UL) /*!< Disable */ + +/* Bit 16 : Write '1' to Disable interrupt for CH[5].LIMITH event */ +#define SAADC_INTENCLR_CH5LIMITH_Pos (16UL) /*!< Position of CH5LIMITH field. */ +#define SAADC_INTENCLR_CH5LIMITH_Msk (0x1UL << SAADC_INTENCLR_CH5LIMITH_Pos) /*!< Bit mask of CH5LIMITH field. */ +#define SAADC_INTENCLR_CH5LIMITH_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_CH5LIMITH_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_CH5LIMITH_Clear (1UL) /*!< Disable */ + +/* Bit 15 : Write '1' to Disable interrupt for CH[4].LIMITL event */ +#define SAADC_INTENCLR_CH4LIMITL_Pos (15UL) /*!< Position of CH4LIMITL field. */ +#define SAADC_INTENCLR_CH4LIMITL_Msk (0x1UL << SAADC_INTENCLR_CH4LIMITL_Pos) /*!< Bit mask of CH4LIMITL field. */ +#define SAADC_INTENCLR_CH4LIMITL_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_CH4LIMITL_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_CH4LIMITL_Clear (1UL) /*!< Disable */ + +/* Bit 14 : Write '1' to Disable interrupt for CH[4].LIMITH event */ +#define SAADC_INTENCLR_CH4LIMITH_Pos (14UL) /*!< Position of CH4LIMITH field. */ +#define SAADC_INTENCLR_CH4LIMITH_Msk (0x1UL << SAADC_INTENCLR_CH4LIMITH_Pos) /*!< Bit mask of CH4LIMITH field. */ +#define SAADC_INTENCLR_CH4LIMITH_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_CH4LIMITH_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_CH4LIMITH_Clear (1UL) /*!< Disable */ + +/* Bit 13 : Write '1' to Disable interrupt for CH[3].LIMITL event */ +#define SAADC_INTENCLR_CH3LIMITL_Pos (13UL) /*!< Position of CH3LIMITL field. */ +#define SAADC_INTENCLR_CH3LIMITL_Msk (0x1UL << SAADC_INTENCLR_CH3LIMITL_Pos) /*!< Bit mask of CH3LIMITL field. */ +#define SAADC_INTENCLR_CH3LIMITL_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_CH3LIMITL_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_CH3LIMITL_Clear (1UL) /*!< Disable */ + +/* Bit 12 : Write '1' to Disable interrupt for CH[3].LIMITH event */ +#define SAADC_INTENCLR_CH3LIMITH_Pos (12UL) /*!< Position of CH3LIMITH field. */ +#define SAADC_INTENCLR_CH3LIMITH_Msk (0x1UL << SAADC_INTENCLR_CH3LIMITH_Pos) /*!< Bit mask of CH3LIMITH field. */ +#define SAADC_INTENCLR_CH3LIMITH_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_CH3LIMITH_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_CH3LIMITH_Clear (1UL) /*!< Disable */ + +/* Bit 11 : Write '1' to Disable interrupt for CH[2].LIMITL event */ +#define SAADC_INTENCLR_CH2LIMITL_Pos (11UL) /*!< Position of CH2LIMITL field. */ +#define SAADC_INTENCLR_CH2LIMITL_Msk (0x1UL << SAADC_INTENCLR_CH2LIMITL_Pos) /*!< Bit mask of CH2LIMITL field. */ +#define SAADC_INTENCLR_CH2LIMITL_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_CH2LIMITL_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_CH2LIMITL_Clear (1UL) /*!< Disable */ + +/* Bit 10 : Write '1' to Disable interrupt for CH[2].LIMITH event */ +#define SAADC_INTENCLR_CH2LIMITH_Pos (10UL) /*!< Position of CH2LIMITH field. */ +#define SAADC_INTENCLR_CH2LIMITH_Msk (0x1UL << SAADC_INTENCLR_CH2LIMITH_Pos) /*!< Bit mask of CH2LIMITH field. */ +#define SAADC_INTENCLR_CH2LIMITH_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_CH2LIMITH_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_CH2LIMITH_Clear (1UL) /*!< Disable */ + +/* Bit 9 : Write '1' to Disable interrupt for CH[1].LIMITL event */ +#define SAADC_INTENCLR_CH1LIMITL_Pos (9UL) /*!< Position of CH1LIMITL field. */ +#define SAADC_INTENCLR_CH1LIMITL_Msk (0x1UL << SAADC_INTENCLR_CH1LIMITL_Pos) /*!< Bit mask of CH1LIMITL field. */ +#define SAADC_INTENCLR_CH1LIMITL_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_CH1LIMITL_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_CH1LIMITL_Clear (1UL) /*!< Disable */ + +/* Bit 8 : Write '1' to Disable interrupt for CH[1].LIMITH event */ +#define SAADC_INTENCLR_CH1LIMITH_Pos (8UL) /*!< Position of CH1LIMITH field. */ +#define SAADC_INTENCLR_CH1LIMITH_Msk (0x1UL << SAADC_INTENCLR_CH1LIMITH_Pos) /*!< Bit mask of CH1LIMITH field. */ +#define SAADC_INTENCLR_CH1LIMITH_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_CH1LIMITH_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_CH1LIMITH_Clear (1UL) /*!< Disable */ + +/* Bit 7 : Write '1' to Disable interrupt for CH[0].LIMITL event */ +#define SAADC_INTENCLR_CH0LIMITL_Pos (7UL) /*!< Position of CH0LIMITL field. */ +#define SAADC_INTENCLR_CH0LIMITL_Msk (0x1UL << SAADC_INTENCLR_CH0LIMITL_Pos) /*!< Bit mask of CH0LIMITL field. */ +#define SAADC_INTENCLR_CH0LIMITL_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_CH0LIMITL_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_CH0LIMITL_Clear (1UL) /*!< Disable */ + +/* Bit 6 : Write '1' to Disable interrupt for CH[0].LIMITH event */ +#define SAADC_INTENCLR_CH0LIMITH_Pos (6UL) /*!< Position of CH0LIMITH field. */ +#define SAADC_INTENCLR_CH0LIMITH_Msk (0x1UL << SAADC_INTENCLR_CH0LIMITH_Pos) /*!< Bit mask of CH0LIMITH field. */ +#define SAADC_INTENCLR_CH0LIMITH_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_CH0LIMITH_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_CH0LIMITH_Clear (1UL) /*!< Disable */ + +/* Bit 5 : Write '1' to Disable interrupt for STOPPED event */ +#define SAADC_INTENCLR_STOPPED_Pos (5UL) /*!< Position of STOPPED field. */ +#define SAADC_INTENCLR_STOPPED_Msk (0x1UL << SAADC_INTENCLR_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define SAADC_INTENCLR_STOPPED_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_STOPPED_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_STOPPED_Clear (1UL) /*!< Disable */ + +/* Bit 4 : Write '1' to Disable interrupt for CALIBRATEDONE event */ +#define SAADC_INTENCLR_CALIBRATEDONE_Pos (4UL) /*!< Position of CALIBRATEDONE field. */ +#define SAADC_INTENCLR_CALIBRATEDONE_Msk (0x1UL << SAADC_INTENCLR_CALIBRATEDONE_Pos) /*!< Bit mask of CALIBRATEDONE field. */ +#define SAADC_INTENCLR_CALIBRATEDONE_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_CALIBRATEDONE_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_CALIBRATEDONE_Clear (1UL) /*!< Disable */ + +/* Bit 3 : Write '1' to Disable interrupt for RESULTDONE event */ +#define SAADC_INTENCLR_RESULTDONE_Pos (3UL) /*!< Position of RESULTDONE field. */ +#define SAADC_INTENCLR_RESULTDONE_Msk (0x1UL << SAADC_INTENCLR_RESULTDONE_Pos) /*!< Bit mask of RESULTDONE field. */ +#define SAADC_INTENCLR_RESULTDONE_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_RESULTDONE_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_RESULTDONE_Clear (1UL) /*!< Disable */ + +/* Bit 2 : Write '1' to Disable interrupt for DONE event */ +#define SAADC_INTENCLR_DONE_Pos (2UL) /*!< Position of DONE field. */ +#define SAADC_INTENCLR_DONE_Msk (0x1UL << SAADC_INTENCLR_DONE_Pos) /*!< Bit mask of DONE field. */ +#define SAADC_INTENCLR_DONE_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_DONE_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_DONE_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for END event */ +#define SAADC_INTENCLR_END_Pos (1UL) /*!< Position of END field. */ +#define SAADC_INTENCLR_END_Msk (0x1UL << SAADC_INTENCLR_END_Pos) /*!< Bit mask of END field. */ +#define SAADC_INTENCLR_END_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_END_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_END_Clear (1UL) /*!< Disable */ + +/* Bit 0 : Write '1' to Disable interrupt for STARTED event */ +#define SAADC_INTENCLR_STARTED_Pos (0UL) /*!< Position of STARTED field. */ +#define SAADC_INTENCLR_STARTED_Msk (0x1UL << SAADC_INTENCLR_STARTED_Pos) /*!< Bit mask of STARTED field. */ +#define SAADC_INTENCLR_STARTED_Disabled (0UL) /*!< Read: Disabled */ +#define SAADC_INTENCLR_STARTED_Enabled (1UL) /*!< Read: Enabled */ +#define SAADC_INTENCLR_STARTED_Clear (1UL) /*!< Disable */ + +/* Register: SAADC_STATUS */ +/* Description: Status */ + +/* Bit 0 : Status */ +#define SAADC_STATUS_STATUS_Pos (0UL) /*!< Position of STATUS field. */ +#define SAADC_STATUS_STATUS_Msk (0x1UL << SAADC_STATUS_STATUS_Pos) /*!< Bit mask of STATUS field. */ +#define SAADC_STATUS_STATUS_Ready (0UL) /*!< ADC is ready. No on-going conversion. */ +#define SAADC_STATUS_STATUS_Busy (1UL) /*!< ADC is busy. Conversion in progress. */ + +/* Register: SAADC_ENABLE */ +/* Description: Enable or disable ADC */ + +/* Bit 0 : Enable or disable ADC */ +#define SAADC_ENABLE_ENABLE_Pos (0UL) /*!< Position of ENABLE field. */ +#define SAADC_ENABLE_ENABLE_Msk (0x1UL << SAADC_ENABLE_ENABLE_Pos) /*!< Bit mask of ENABLE field. */ +#define SAADC_ENABLE_ENABLE_Disabled (0UL) /*!< Disable ADC */ +#define SAADC_ENABLE_ENABLE_Enabled (1UL) /*!< Enable ADC */ + +/* Register: SAADC_CH_PSELP */ +/* Description: Description cluster[0]: Input positive pin selection for CH[0] */ + +/* Bits 4..0 : Analog positive input channel */ +#define SAADC_CH_PSELP_PSELP_Pos (0UL) /*!< Position of PSELP field. */ +#define SAADC_CH_PSELP_PSELP_Msk (0x1FUL << SAADC_CH_PSELP_PSELP_Pos) /*!< Bit mask of PSELP field. */ +#define SAADC_CH_PSELP_PSELP_NC (0UL) /*!< Not connected */ +#define SAADC_CH_PSELP_PSELP_AnalogInput0 (1UL) /*!< AIN0 */ +#define SAADC_CH_PSELP_PSELP_AnalogInput1 (2UL) /*!< AIN1 */ +#define SAADC_CH_PSELP_PSELP_AnalogInput2 (3UL) /*!< AIN2 */ +#define SAADC_CH_PSELP_PSELP_AnalogInput3 (4UL) /*!< AIN3 */ +#define SAADC_CH_PSELP_PSELP_AnalogInput4 (5UL) /*!< AIN4 */ +#define SAADC_CH_PSELP_PSELP_AnalogInput5 (6UL) /*!< AIN5 */ +#define SAADC_CH_PSELP_PSELP_AnalogInput6 (7UL) /*!< AIN6 */ +#define SAADC_CH_PSELP_PSELP_AnalogInput7 (8UL) /*!< AIN7 */ +#define SAADC_CH_PSELP_PSELP_VDD (9UL) /*!< VDD */ + +/* Register: SAADC_CH_PSELN */ +/* Description: Description cluster[0]: Input negative pin selection for CH[0] */ + +/* Bits 4..0 : Analog negative input, enables differential channel */ +#define SAADC_CH_PSELN_PSELN_Pos (0UL) /*!< Position of PSELN field. */ +#define SAADC_CH_PSELN_PSELN_Msk (0x1FUL << SAADC_CH_PSELN_PSELN_Pos) /*!< Bit mask of PSELN field. */ +#define SAADC_CH_PSELN_PSELN_NC (0UL) /*!< Not connected */ +#define SAADC_CH_PSELN_PSELN_AnalogInput0 (1UL) /*!< AIN0 */ +#define SAADC_CH_PSELN_PSELN_AnalogInput1 (2UL) /*!< AIN1 */ +#define SAADC_CH_PSELN_PSELN_AnalogInput2 (3UL) /*!< AIN2 */ +#define SAADC_CH_PSELN_PSELN_AnalogInput3 (4UL) /*!< AIN3 */ +#define SAADC_CH_PSELN_PSELN_AnalogInput4 (5UL) /*!< AIN4 */ +#define SAADC_CH_PSELN_PSELN_AnalogInput5 (6UL) /*!< AIN5 */ +#define SAADC_CH_PSELN_PSELN_AnalogInput6 (7UL) /*!< AIN6 */ +#define SAADC_CH_PSELN_PSELN_AnalogInput7 (8UL) /*!< AIN7 */ +#define SAADC_CH_PSELN_PSELN_VDD (9UL) /*!< VDD */ + +/* Register: SAADC_CH_CONFIG */ +/* Description: Description cluster[0]: Input configuration for CH[0] */ + +/* Bit 24 : Enable burst mode */ +#define SAADC_CH_CONFIG_BURST_Pos (24UL) /*!< Position of BURST field. */ +#define SAADC_CH_CONFIG_BURST_Msk (0x1UL << SAADC_CH_CONFIG_BURST_Pos) /*!< Bit mask of BURST field. */ +#define SAADC_CH_CONFIG_BURST_Disabled (0UL) /*!< Burst mode is disabled (normal operation) */ +#define SAADC_CH_CONFIG_BURST_Enabled (1UL) /*!< Burst mode is enabled. SAADC takes 2^OVERSAMPLE number of samples as fast as it can, and sends the average to Data RAM. */ + +/* Bit 20 : Enable differential mode */ +#define SAADC_CH_CONFIG_MODE_Pos (20UL) /*!< Position of MODE field. */ +#define SAADC_CH_CONFIG_MODE_Msk (0x1UL << SAADC_CH_CONFIG_MODE_Pos) /*!< Bit mask of MODE field. */ +#define SAADC_CH_CONFIG_MODE_SE (0UL) /*!< Single ended, PSELN will be ignored, negative input to ADC shorted to GND */ +#define SAADC_CH_CONFIG_MODE_Diff (1UL) /*!< Differential */ + +/* Bits 18..16 : Acquisition time, the time the ADC uses to sample the input voltage */ +#define SAADC_CH_CONFIG_TACQ_Pos (16UL) /*!< Position of TACQ field. */ +#define SAADC_CH_CONFIG_TACQ_Msk (0x7UL << SAADC_CH_CONFIG_TACQ_Pos) /*!< Bit mask of TACQ field. */ +#define SAADC_CH_CONFIG_TACQ_3us (0UL) /*!< 3 us */ +#define SAADC_CH_CONFIG_TACQ_5us (1UL) /*!< 5 us */ +#define SAADC_CH_CONFIG_TACQ_10us (2UL) /*!< 10 us */ +#define SAADC_CH_CONFIG_TACQ_15us (3UL) /*!< 15 us */ +#define SAADC_CH_CONFIG_TACQ_20us (4UL) /*!< 20 us */ +#define SAADC_CH_CONFIG_TACQ_40us (5UL) /*!< 40 us */ + +/* Bit 12 : Reference control */ +#define SAADC_CH_CONFIG_REFSEL_Pos (12UL) /*!< Position of REFSEL field. */ +#define SAADC_CH_CONFIG_REFSEL_Msk (0x1UL << SAADC_CH_CONFIG_REFSEL_Pos) /*!< Bit mask of REFSEL field. */ +#define SAADC_CH_CONFIG_REFSEL_Internal (0UL) /*!< Internal reference (0.6 V) */ +#define SAADC_CH_CONFIG_REFSEL_VDD1_4 (1UL) /*!< VDD/4 as reference */ + +/* Bits 10..8 : Gain control */ +#define SAADC_CH_CONFIG_GAIN_Pos (8UL) /*!< Position of GAIN field. */ +#define SAADC_CH_CONFIG_GAIN_Msk (0x7UL << SAADC_CH_CONFIG_GAIN_Pos) /*!< Bit mask of GAIN field. */ +#define SAADC_CH_CONFIG_GAIN_Gain1_6 (0UL) /*!< 1/6 */ +#define SAADC_CH_CONFIG_GAIN_Gain1_5 (1UL) /*!< 1/5 */ +#define SAADC_CH_CONFIG_GAIN_Gain1_4 (2UL) /*!< 1/4 */ +#define SAADC_CH_CONFIG_GAIN_Gain1_3 (3UL) /*!< 1/3 */ +#define SAADC_CH_CONFIG_GAIN_Gain1_2 (4UL) /*!< 1/2 */ +#define SAADC_CH_CONFIG_GAIN_Gain1 (5UL) /*!< 1 */ +#define SAADC_CH_CONFIG_GAIN_Gain2 (6UL) /*!< 2 */ +#define SAADC_CH_CONFIG_GAIN_Gain4 (7UL) /*!< 4 */ + +/* Bits 5..4 : Negative channel resistor control */ +#define SAADC_CH_CONFIG_RESN_Pos (4UL) /*!< Position of RESN field. */ +#define SAADC_CH_CONFIG_RESN_Msk (0x3UL << SAADC_CH_CONFIG_RESN_Pos) /*!< Bit mask of RESN field. */ +#define SAADC_CH_CONFIG_RESN_Bypass (0UL) /*!< Bypass resistor ladder */ +#define SAADC_CH_CONFIG_RESN_Pulldown (1UL) /*!< Pull-down to GND */ +#define SAADC_CH_CONFIG_RESN_Pullup (2UL) /*!< Pull-up to VDD */ +#define SAADC_CH_CONFIG_RESN_VDD1_2 (3UL) /*!< Set input at VDD/2 */ + +/* Bits 1..0 : Positive channel resistor control */ +#define SAADC_CH_CONFIG_RESP_Pos (0UL) /*!< Position of RESP field. */ +#define SAADC_CH_CONFIG_RESP_Msk (0x3UL << SAADC_CH_CONFIG_RESP_Pos) /*!< Bit mask of RESP field. */ +#define SAADC_CH_CONFIG_RESP_Bypass (0UL) /*!< Bypass resistor ladder */ +#define SAADC_CH_CONFIG_RESP_Pulldown (1UL) /*!< Pull-down to GND */ +#define SAADC_CH_CONFIG_RESP_Pullup (2UL) /*!< Pull-up to VDD */ +#define SAADC_CH_CONFIG_RESP_VDD1_2 (3UL) /*!< Set input at VDD/2 */ + +/* Register: SAADC_CH_LIMIT */ +/* Description: Description cluster[0]: High/low limits for event monitoring a channel */ + +/* Bits 31..16 : High level limit */ +#define SAADC_CH_LIMIT_HIGH_Pos (16UL) /*!< Position of HIGH field. */ +#define SAADC_CH_LIMIT_HIGH_Msk (0xFFFFUL << SAADC_CH_LIMIT_HIGH_Pos) /*!< Bit mask of HIGH field. */ + +/* Bits 15..0 : Low level limit */ +#define SAADC_CH_LIMIT_LOW_Pos (0UL) /*!< Position of LOW field. */ +#define SAADC_CH_LIMIT_LOW_Msk (0xFFFFUL << SAADC_CH_LIMIT_LOW_Pos) /*!< Bit mask of LOW field. */ + +/* Register: SAADC_RESOLUTION */ +/* Description: Resolution configuration */ + +/* Bits 2..0 : Set the resolution */ +#define SAADC_RESOLUTION_VAL_Pos (0UL) /*!< Position of VAL field. */ +#define SAADC_RESOLUTION_VAL_Msk (0x7UL << SAADC_RESOLUTION_VAL_Pos) /*!< Bit mask of VAL field. */ +#define SAADC_RESOLUTION_VAL_8bit (0UL) /*!< 8 bit */ +#define SAADC_RESOLUTION_VAL_10bit (1UL) /*!< 10 bit */ +#define SAADC_RESOLUTION_VAL_12bit (2UL) /*!< 12 bit */ +#define SAADC_RESOLUTION_VAL_14bit (3UL) /*!< 14 bit */ + +/* Register: SAADC_OVERSAMPLE */ +/* Description: Oversampling configuration. OVERSAMPLE should not be combined with SCAN. The RESOLUTION is applied before averaging, thus for high OVERSAMPLE a higher RESOLUTION should be used. */ + +/* Bits 3..0 : Oversample control */ +#define SAADC_OVERSAMPLE_OVERSAMPLE_Pos (0UL) /*!< Position of OVERSAMPLE field. */ +#define SAADC_OVERSAMPLE_OVERSAMPLE_Msk (0xFUL << SAADC_OVERSAMPLE_OVERSAMPLE_Pos) /*!< Bit mask of OVERSAMPLE field. */ +#define SAADC_OVERSAMPLE_OVERSAMPLE_Bypass (0UL) /*!< Bypass oversampling */ +#define SAADC_OVERSAMPLE_OVERSAMPLE_Over2x (1UL) /*!< Oversample 2x */ +#define SAADC_OVERSAMPLE_OVERSAMPLE_Over4x (2UL) /*!< Oversample 4x */ +#define SAADC_OVERSAMPLE_OVERSAMPLE_Over8x (3UL) /*!< Oversample 8x */ +#define SAADC_OVERSAMPLE_OVERSAMPLE_Over16x (4UL) /*!< Oversample 16x */ +#define SAADC_OVERSAMPLE_OVERSAMPLE_Over32x (5UL) /*!< Oversample 32x */ +#define SAADC_OVERSAMPLE_OVERSAMPLE_Over64x (6UL) /*!< Oversample 64x */ +#define SAADC_OVERSAMPLE_OVERSAMPLE_Over128x (7UL) /*!< Oversample 128x */ +#define SAADC_OVERSAMPLE_OVERSAMPLE_Over256x (8UL) /*!< Oversample 256x */ + +/* Register: SAADC_SAMPLERATE */ +/* Description: Controls normal or continuous sample rate */ + +/* Bit 12 : Select mode for sample rate control */ +#define SAADC_SAMPLERATE_MODE_Pos (12UL) /*!< Position of MODE field. */ +#define SAADC_SAMPLERATE_MODE_Msk (0x1UL << SAADC_SAMPLERATE_MODE_Pos) /*!< Bit mask of MODE field. */ +#define SAADC_SAMPLERATE_MODE_Task (0UL) /*!< Rate is controlled from SAMPLE task */ +#define SAADC_SAMPLERATE_MODE_Timers (1UL) /*!< Rate is controlled from local timer (use CC to control the rate) */ + +/* Bits 10..0 : Capture and compare value. Sample rate is 16 MHz/CC */ +#define SAADC_SAMPLERATE_CC_Pos (0UL) /*!< Position of CC field. */ +#define SAADC_SAMPLERATE_CC_Msk (0x7FFUL << SAADC_SAMPLERATE_CC_Pos) /*!< Bit mask of CC field. */ + +/* Register: SAADC_RESULT_PTR */ +/* Description: Data pointer */ + +/* Bits 31..0 : Data pointer */ +#define SAADC_RESULT_PTR_PTR_Pos (0UL) /*!< Position of PTR field. */ +#define SAADC_RESULT_PTR_PTR_Msk (0xFFFFFFFFUL << SAADC_RESULT_PTR_PTR_Pos) /*!< Bit mask of PTR field. */ + +/* Register: SAADC_RESULT_MAXCNT */ +/* Description: Maximum number of buffer words to transfer */ + +/* Bits 14..0 : Maximum number of buffer words to transfer */ +#define SAADC_RESULT_MAXCNT_MAXCNT_Pos (0UL) /*!< Position of MAXCNT field. */ +#define SAADC_RESULT_MAXCNT_MAXCNT_Msk (0x7FFFUL << SAADC_RESULT_MAXCNT_MAXCNT_Pos) /*!< Bit mask of MAXCNT field. */ + +/* Register: SAADC_RESULT_AMOUNT */ +/* Description: Number of buffer words transferred since last START */ + +/* Bits 14..0 : Number of buffer words transferred since last START. This register can be read after an END or STOPPED event. */ +#define SAADC_RESULT_AMOUNT_AMOUNT_Pos (0UL) /*!< Position of AMOUNT field. */ +#define SAADC_RESULT_AMOUNT_AMOUNT_Msk (0x7FFFUL << SAADC_RESULT_AMOUNT_AMOUNT_Pos) /*!< Bit mask of AMOUNT field. */ + + +/* Peripheral: SPI */ +/* Description: Serial Peripheral Interface 0 */ + +/* Register: SPI_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 2 : Write '1' to Enable interrupt for READY event */ +#define SPI_INTENSET_READY_Pos (2UL) /*!< Position of READY field. */ +#define SPI_INTENSET_READY_Msk (0x1UL << SPI_INTENSET_READY_Pos) /*!< Bit mask of READY field. */ +#define SPI_INTENSET_READY_Disabled (0UL) /*!< Read: Disabled */ +#define SPI_INTENSET_READY_Enabled (1UL) /*!< Read: Enabled */ +#define SPI_INTENSET_READY_Set (1UL) /*!< Enable */ + +/* Register: SPI_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 2 : Write '1' to Disable interrupt for READY event */ +#define SPI_INTENCLR_READY_Pos (2UL) /*!< Position of READY field. */ +#define SPI_INTENCLR_READY_Msk (0x1UL << SPI_INTENCLR_READY_Pos) /*!< Bit mask of READY field. */ +#define SPI_INTENCLR_READY_Disabled (0UL) /*!< Read: Disabled */ +#define SPI_INTENCLR_READY_Enabled (1UL) /*!< Read: Enabled */ +#define SPI_INTENCLR_READY_Clear (1UL) /*!< Disable */ + +/* Register: SPI_ENABLE */ +/* Description: Enable SPI */ + +/* Bits 3..0 : Enable or disable SPI */ +#define SPI_ENABLE_ENABLE_Pos (0UL) /*!< Position of ENABLE field. */ +#define SPI_ENABLE_ENABLE_Msk (0xFUL << SPI_ENABLE_ENABLE_Pos) /*!< Bit mask of ENABLE field. */ +#define SPI_ENABLE_ENABLE_Disabled (0UL) /*!< Disable SPI */ +#define SPI_ENABLE_ENABLE_Enabled (1UL) /*!< Enable SPI */ + +/* Register: SPI_PSEL_SCK */ +/* Description: Pin select for SCK */ + +/* Bits 31..0 : Pin number configuration for SPI SCK signal */ +#define SPI_PSEL_SCK_PSELSCK_Pos (0UL) /*!< Position of PSELSCK field. */ +#define SPI_PSEL_SCK_PSELSCK_Msk (0xFFFFFFFFUL << SPI_PSEL_SCK_PSELSCK_Pos) /*!< Bit mask of PSELSCK field. */ +#define SPI_PSEL_SCK_PSELSCK_Disconnected (0xFFFFFFFFUL) /*!< Disconnect */ + +/* Register: SPI_PSEL_MOSI */ +/* Description: Pin select for MOSI */ + +/* Bits 31..0 : Pin number configuration for SPI MOSI signal */ +#define SPI_PSEL_MOSI_PSELMOSI_Pos (0UL) /*!< Position of PSELMOSI field. */ +#define SPI_PSEL_MOSI_PSELMOSI_Msk (0xFFFFFFFFUL << SPI_PSEL_MOSI_PSELMOSI_Pos) /*!< Bit mask of PSELMOSI field. */ +#define SPI_PSEL_MOSI_PSELMOSI_Disconnected (0xFFFFFFFFUL) /*!< Disconnect */ + +/* Register: SPI_PSEL_MISO */ +/* Description: Pin select for MISO */ + +/* Bits 31..0 : Pin number configuration for SPI MISO signal */ +#define SPI_PSEL_MISO_PSELMISO_Pos (0UL) /*!< Position of PSELMISO field. */ +#define SPI_PSEL_MISO_PSELMISO_Msk (0xFFFFFFFFUL << SPI_PSEL_MISO_PSELMISO_Pos) /*!< Bit mask of PSELMISO field. */ +#define SPI_PSEL_MISO_PSELMISO_Disconnected (0xFFFFFFFFUL) /*!< Disconnect */ + +/* Register: SPI_RXD */ +/* Description: RXD register */ + +/* Bits 7..0 : RX data received. Double buffered */ +#define SPI_RXD_RXD_Pos (0UL) /*!< Position of RXD field. */ +#define SPI_RXD_RXD_Msk (0xFFUL << SPI_RXD_RXD_Pos) /*!< Bit mask of RXD field. */ + +/* Register: SPI_TXD */ +/* Description: TXD register */ + +/* Bits 7..0 : TX data to send. Double buffered */ +#define SPI_TXD_TXD_Pos (0UL) /*!< Position of TXD field. */ +#define SPI_TXD_TXD_Msk (0xFFUL << SPI_TXD_TXD_Pos) /*!< Bit mask of TXD field. */ + +/* Register: SPI_FREQUENCY */ +/* Description: SPI frequency */ + +/* Bits 31..0 : SPI master data rate */ +#define SPI_FREQUENCY_FREQUENCY_Pos (0UL) /*!< Position of FREQUENCY field. */ +#define SPI_FREQUENCY_FREQUENCY_Msk (0xFFFFFFFFUL << SPI_FREQUENCY_FREQUENCY_Pos) /*!< Bit mask of FREQUENCY field. */ +#define SPI_FREQUENCY_FREQUENCY_K125 (0x02000000UL) /*!< 125 kbps */ +#define SPI_FREQUENCY_FREQUENCY_K250 (0x04000000UL) /*!< 250 kbps */ +#define SPI_FREQUENCY_FREQUENCY_K500 (0x08000000UL) /*!< 500 kbps */ +#define SPI_FREQUENCY_FREQUENCY_M1 (0x10000000UL) /*!< 1 Mbps */ +#define SPI_FREQUENCY_FREQUENCY_M2 (0x20000000UL) /*!< 2 Mbps */ +#define SPI_FREQUENCY_FREQUENCY_M4 (0x40000000UL) /*!< 4 Mbps */ +#define SPI_FREQUENCY_FREQUENCY_M8 (0x80000000UL) /*!< 8 Mbps */ + +/* Register: SPI_CONFIG */ +/* Description: Configuration register */ + +/* Bit 2 : Serial clock (SCK) polarity */ +#define SPI_CONFIG_CPOL_Pos (2UL) /*!< Position of CPOL field. */ +#define SPI_CONFIG_CPOL_Msk (0x1UL << SPI_CONFIG_CPOL_Pos) /*!< Bit mask of CPOL field. */ +#define SPI_CONFIG_CPOL_ActiveHigh (0UL) /*!< Active high */ +#define SPI_CONFIG_CPOL_ActiveLow (1UL) /*!< Active low */ + +/* Bit 1 : Serial clock (SCK) phase */ +#define SPI_CONFIG_CPHA_Pos (1UL) /*!< Position of CPHA field. */ +#define SPI_CONFIG_CPHA_Msk (0x1UL << SPI_CONFIG_CPHA_Pos) /*!< Bit mask of CPHA field. */ +#define SPI_CONFIG_CPHA_Leading (0UL) /*!< Sample on leading edge of clock, shift serial data on trailing edge */ +#define SPI_CONFIG_CPHA_Trailing (1UL) /*!< Sample on trailing edge of clock, shift serial data on leading edge */ + +/* Bit 0 : Bit order */ +#define SPI_CONFIG_ORDER_Pos (0UL) /*!< Position of ORDER field. */ +#define SPI_CONFIG_ORDER_Msk (0x1UL << SPI_CONFIG_ORDER_Pos) /*!< Bit mask of ORDER field. */ +#define SPI_CONFIG_ORDER_MsbFirst (0UL) /*!< Most significant bit shifted out first */ +#define SPI_CONFIG_ORDER_LsbFirst (1UL) /*!< Least significant bit shifted out first */ + + +/* Peripheral: SPIM */ +/* Description: Serial Peripheral Interface Master with EasyDMA 0 */ + +/* Register: SPIM_SHORTS */ +/* Description: Shortcut register */ + +/* 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) /*!< Disable shortcut */ +#define SPIM_SHORTS_END_START_Enabled (1UL) /*!< Enable shortcut */ + +/* Register: SPIM_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 19 : Write '1' to Enable interrupt for STARTED event */ +#define SPIM_INTENSET_STARTED_Pos (19UL) /*!< Position of STARTED field. */ +#define SPIM_INTENSET_STARTED_Msk (0x1UL << SPIM_INTENSET_STARTED_Pos) /*!< Bit mask of STARTED field. */ +#define SPIM_INTENSET_STARTED_Disabled (0UL) /*!< Read: Disabled */ +#define SPIM_INTENSET_STARTED_Enabled (1UL) /*!< Read: Enabled */ +#define SPIM_INTENSET_STARTED_Set (1UL) /*!< Enable */ + +/* Bit 8 : Write '1' to Enable interrupt for ENDTX event */ +#define SPIM_INTENSET_ENDTX_Pos (8UL) /*!< Position of ENDTX field. */ +#define SPIM_INTENSET_ENDTX_Msk (0x1UL << SPIM_INTENSET_ENDTX_Pos) /*!< Bit mask of ENDTX field. */ +#define SPIM_INTENSET_ENDTX_Disabled (0UL) /*!< Read: Disabled */ +#define SPIM_INTENSET_ENDTX_Enabled (1UL) /*!< Read: Enabled */ +#define SPIM_INTENSET_ENDTX_Set (1UL) /*!< Enable */ + +/* Bit 6 : Write '1' to Enable interrupt for 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) /*!< Read: Disabled */ +#define SPIM_INTENSET_END_Enabled (1UL) /*!< Read: Enabled */ +#define SPIM_INTENSET_END_Set (1UL) /*!< Enable */ + +/* Bit 4 : Write '1' to Enable interrupt for ENDRX event */ +#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_Disabled (0UL) /*!< Read: Disabled */ +#define SPIM_INTENSET_ENDRX_Enabled (1UL) /*!< Read: Enabled */ +#define SPIM_INTENSET_ENDRX_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for STOPPED event */ +#define SPIM_INTENSET_STOPPED_Pos (1UL) /*!< Position of STOPPED field. */ +#define SPIM_INTENSET_STOPPED_Msk (0x1UL << SPIM_INTENSET_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define SPIM_INTENSET_STOPPED_Disabled (0UL) /*!< Read: Disabled */ +#define SPIM_INTENSET_STOPPED_Enabled (1UL) /*!< Read: Enabled */ +#define SPIM_INTENSET_STOPPED_Set (1UL) /*!< Enable */ + +/* Register: SPIM_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 19 : Write '1' to Disable interrupt for STARTED event */ +#define SPIM_INTENCLR_STARTED_Pos (19UL) /*!< Position of STARTED field. */ +#define SPIM_INTENCLR_STARTED_Msk (0x1UL << SPIM_INTENCLR_STARTED_Pos) /*!< Bit mask of STARTED field. */ +#define SPIM_INTENCLR_STARTED_Disabled (0UL) /*!< Read: Disabled */ +#define SPIM_INTENCLR_STARTED_Enabled (1UL) /*!< Read: Enabled */ +#define SPIM_INTENCLR_STARTED_Clear (1UL) /*!< Disable */ + +/* Bit 8 : Write '1' to Disable interrupt for ENDTX event */ +#define SPIM_INTENCLR_ENDTX_Pos (8UL) /*!< Position of ENDTX field. */ +#define SPIM_INTENCLR_ENDTX_Msk (0x1UL << SPIM_INTENCLR_ENDTX_Pos) /*!< Bit mask of ENDTX field. */ +#define SPIM_INTENCLR_ENDTX_Disabled (0UL) /*!< Read: Disabled */ +#define SPIM_INTENCLR_ENDTX_Enabled (1UL) /*!< Read: Enabled */ +#define SPIM_INTENCLR_ENDTX_Clear (1UL) /*!< Disable */ + +/* Bit 6 : Write '1' to Disable interrupt for 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) /*!< Read: Disabled */ +#define SPIM_INTENCLR_END_Enabled (1UL) /*!< Read: Enabled */ +#define SPIM_INTENCLR_END_Clear (1UL) /*!< Disable */ + +/* Bit 4 : Write '1' to Disable interrupt for ENDRX event */ +#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_Disabled (0UL) /*!< Read: Disabled */ +#define SPIM_INTENCLR_ENDRX_Enabled (1UL) /*!< Read: Enabled */ +#define SPIM_INTENCLR_ENDRX_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for STOPPED event */ +#define SPIM_INTENCLR_STOPPED_Pos (1UL) /*!< Position of STOPPED field. */ +#define SPIM_INTENCLR_STOPPED_Msk (0x1UL << SPIM_INTENCLR_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define SPIM_INTENCLR_STOPPED_Disabled (0UL) /*!< Read: Disabled */ +#define SPIM_INTENCLR_STOPPED_Enabled (1UL) /*!< Read: Enabled */ +#define SPIM_INTENCLR_STOPPED_Clear (1UL) /*!< Disable */ + +/* Register: SPIM_ENABLE */ +/* Description: Enable SPIM */ + +/* Bits 3..0 : Enable or disable SPIM */ +#define SPIM_ENABLE_ENABLE_Pos (0UL) /*!< Position of ENABLE field. */ +#define SPIM_ENABLE_ENABLE_Msk (0xFUL << SPIM_ENABLE_ENABLE_Pos) /*!< Bit mask of ENABLE field. */ +#define SPIM_ENABLE_ENABLE_Disabled (0UL) /*!< Disable SPIM */ +#define SPIM_ENABLE_ENABLE_Enabled (7UL) /*!< Enable SPIM */ + +/* Register: SPIM_PSEL_SCK */ +/* Description: Pin select for SCK */ + +/* Bit 31 : Connection */ +#define SPIM_PSEL_SCK_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define SPIM_PSEL_SCK_CONNECT_Msk (0x1UL << SPIM_PSEL_SCK_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define SPIM_PSEL_SCK_CONNECT_Connected (0UL) /*!< Connect */ +#define SPIM_PSEL_SCK_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define SPIM_PSEL_SCK_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define SPIM_PSEL_SCK_PIN_Msk (0x1FUL << SPIM_PSEL_SCK_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: SPIM_PSEL_MOSI */ +/* Description: Pin select for MOSI signal */ + +/* Bit 31 : Connection */ +#define SPIM_PSEL_MOSI_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define SPIM_PSEL_MOSI_CONNECT_Msk (0x1UL << SPIM_PSEL_MOSI_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define SPIM_PSEL_MOSI_CONNECT_Connected (0UL) /*!< Connect */ +#define SPIM_PSEL_MOSI_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define SPIM_PSEL_MOSI_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define SPIM_PSEL_MOSI_PIN_Msk (0x1FUL << SPIM_PSEL_MOSI_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: SPIM_PSEL_MISO */ +/* Description: Pin select for MISO signal */ + +/* Bit 31 : Connection */ +#define SPIM_PSEL_MISO_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define SPIM_PSEL_MISO_CONNECT_Msk (0x1UL << SPIM_PSEL_MISO_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define SPIM_PSEL_MISO_CONNECT_Connected (0UL) /*!< Connect */ +#define SPIM_PSEL_MISO_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define SPIM_PSEL_MISO_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define SPIM_PSEL_MISO_PIN_Msk (0x1FUL << SPIM_PSEL_MISO_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: SPIM_FREQUENCY */ +/* Description: SPI frequency */ + +/* Bits 31..0 : SPI master data rate */ +#define SPIM_FREQUENCY_FREQUENCY_Pos (0UL) /*!< Position of FREQUENCY field. */ +#define SPIM_FREQUENCY_FREQUENCY_Msk (0xFFFFFFFFUL << SPIM_FREQUENCY_FREQUENCY_Pos) /*!< Bit mask of FREQUENCY field. */ +#define SPIM_FREQUENCY_FREQUENCY_K125 (0x02000000UL) /*!< 125 kbps */ +#define SPIM_FREQUENCY_FREQUENCY_K250 (0x04000000UL) /*!< 250 kbps */ +#define SPIM_FREQUENCY_FREQUENCY_K500 (0x08000000UL) /*!< 500 kbps */ +#define SPIM_FREQUENCY_FREQUENCY_M1 (0x10000000UL) /*!< 1 Mbps */ +#define SPIM_FREQUENCY_FREQUENCY_M2 (0x20000000UL) /*!< 2 Mbps */ +#define SPIM_FREQUENCY_FREQUENCY_M4 (0x40000000UL) /*!< 4 Mbps */ +#define SPIM_FREQUENCY_FREQUENCY_M8 (0x80000000UL) /*!< 8 Mbps */ + +/* Register: SPIM_RXD_PTR */ +/* Description: Data pointer */ + +/* Bits 31..0 : Data pointer */ +#define SPIM_RXD_PTR_PTR_Pos (0UL) /*!< Position of PTR field. */ +#define SPIM_RXD_PTR_PTR_Msk (0xFFFFFFFFUL << SPIM_RXD_PTR_PTR_Pos) /*!< Bit mask of PTR field. */ + +/* Register: SPIM_RXD_MAXCNT */ +/* Description: Maximum number of bytes in receive buffer */ + +/* Bits 7..0 : Maximum number of bytes in receive buffer */ +#define SPIM_RXD_MAXCNT_MAXCNT_Pos (0UL) /*!< Position of MAXCNT field. */ +#define SPIM_RXD_MAXCNT_MAXCNT_Msk (0xFFUL << SPIM_RXD_MAXCNT_MAXCNT_Pos) /*!< Bit mask of MAXCNT field. */ + +/* Register: SPIM_RXD_AMOUNT */ +/* Description: Number of bytes transferred in the last transaction */ + +/* Bits 7..0 : Number of bytes transferred in the last transaction */ +#define SPIM_RXD_AMOUNT_AMOUNT_Pos (0UL) /*!< Position of AMOUNT field. */ +#define SPIM_RXD_AMOUNT_AMOUNT_Msk (0xFFUL << SPIM_RXD_AMOUNT_AMOUNT_Pos) /*!< Bit mask of AMOUNT field. */ + +/* Register: SPIM_RXD_LIST */ +/* Description: EasyDMA list type */ + +/* Bits 2..0 : List type */ +#define SPIM_RXD_LIST_LIST_Pos (0UL) /*!< Position of LIST field. */ +#define SPIM_RXD_LIST_LIST_Msk (0x7UL << SPIM_RXD_LIST_LIST_Pos) /*!< Bit mask of LIST field. */ +#define SPIM_RXD_LIST_LIST_Disabled (0UL) /*!< Disable EasyDMA list */ +#define SPIM_RXD_LIST_LIST_ArrayList (1UL) /*!< Use array list */ + +/* Register: SPIM_TXD_PTR */ +/* Description: Data pointer */ + +/* Bits 31..0 : Data pointer */ +#define SPIM_TXD_PTR_PTR_Pos (0UL) /*!< Position of PTR field. */ +#define SPIM_TXD_PTR_PTR_Msk (0xFFFFFFFFUL << SPIM_TXD_PTR_PTR_Pos) /*!< Bit mask of PTR field. */ + +/* Register: SPIM_TXD_MAXCNT */ +/* Description: Maximum number of bytes in transmit buffer */ + +/* Bits 7..0 : Maximum number of bytes in transmit buffer */ +#define SPIM_TXD_MAXCNT_MAXCNT_Pos (0UL) /*!< Position of MAXCNT field. */ +#define SPIM_TXD_MAXCNT_MAXCNT_Msk (0xFFUL << SPIM_TXD_MAXCNT_MAXCNT_Pos) /*!< Bit mask of MAXCNT field. */ + +/* Register: SPIM_TXD_AMOUNT */ +/* Description: Number of bytes transferred in the last transaction */ + +/* Bits 7..0 : Number of bytes transferred in the last transaction */ +#define SPIM_TXD_AMOUNT_AMOUNT_Pos (0UL) /*!< Position of AMOUNT field. */ +#define SPIM_TXD_AMOUNT_AMOUNT_Msk (0xFFUL << SPIM_TXD_AMOUNT_AMOUNT_Pos) /*!< Bit mask of AMOUNT field. */ + +/* Register: SPIM_TXD_LIST */ +/* Description: EasyDMA list type */ + +/* Bits 2..0 : List type */ +#define SPIM_TXD_LIST_LIST_Pos (0UL) /*!< Position of LIST field. */ +#define SPIM_TXD_LIST_LIST_Msk (0x7UL << SPIM_TXD_LIST_LIST_Pos) /*!< Bit mask of LIST field. */ +#define SPIM_TXD_LIST_LIST_Disabled (0UL) /*!< Disable EasyDMA list */ +#define SPIM_TXD_LIST_LIST_ArrayList (1UL) /*!< Use array list */ + +/* Register: SPIM_CONFIG */ +/* Description: Configuration register */ + +/* Bit 2 : Serial clock (SCK) polarity */ +#define SPIM_CONFIG_CPOL_Pos (2UL) /*!< Position of CPOL field. */ +#define SPIM_CONFIG_CPOL_Msk (0x1UL << SPIM_CONFIG_CPOL_Pos) /*!< Bit mask of CPOL field. */ +#define SPIM_CONFIG_CPOL_ActiveHigh (0UL) /*!< Active high */ +#define SPIM_CONFIG_CPOL_ActiveLow (1UL) /*!< Active low */ + +/* Bit 1 : Serial clock (SCK) phase */ +#define SPIM_CONFIG_CPHA_Pos (1UL) /*!< Position of CPHA field. */ +#define SPIM_CONFIG_CPHA_Msk (0x1UL << SPIM_CONFIG_CPHA_Pos) /*!< Bit mask of CPHA field. */ +#define SPIM_CONFIG_CPHA_Leading (0UL) /*!< Sample on leading edge of clock, shift serial data on trailing edge */ +#define SPIM_CONFIG_CPHA_Trailing (1UL) /*!< Sample on trailing edge of clock, shift serial data on leading edge */ + +/* Bit 0 : Bit order */ +#define SPIM_CONFIG_ORDER_Pos (0UL) /*!< Position of ORDER field. */ +#define SPIM_CONFIG_ORDER_Msk (0x1UL << SPIM_CONFIG_ORDER_Pos) /*!< Bit mask of ORDER field. */ +#define SPIM_CONFIG_ORDER_MsbFirst (0UL) /*!< Most significant bit shifted out first */ +#define SPIM_CONFIG_ORDER_LsbFirst (1UL) /*!< Least significant bit shifted out first */ + +/* Register: SPIM_ORC */ +/* Description: Over-read character. Character clocked out in case and over-read of the TXD buffer. */ + +/* Bits 7..0 : Over-read character. Character clocked out in case and over-read of the TXD buffer. */ +#define SPIM_ORC_ORC_Pos (0UL) /*!< Position of ORC field. */ +#define SPIM_ORC_ORC_Msk (0xFFUL << SPIM_ORC_ORC_Pos) /*!< Bit mask of ORC field. */ + + +/* Peripheral: SPIS */ +/* Description: SPI Slave 0 */ + +/* Register: SPIS_SHORTS */ +/* Description: Shortcut register */ + +/* Bit 2 : Shortcut between END event and ACQUIRE task */ +#define SPIS_SHORTS_END_ACQUIRE_Pos (2UL) /*!< Position of END_ACQUIRE field. */ +#define SPIS_SHORTS_END_ACQUIRE_Msk (0x1UL << SPIS_SHORTS_END_ACQUIRE_Pos) /*!< Bit mask of END_ACQUIRE field. */ +#define SPIS_SHORTS_END_ACQUIRE_Disabled (0UL) /*!< Disable shortcut */ +#define SPIS_SHORTS_END_ACQUIRE_Enabled (1UL) /*!< Enable shortcut */ + +/* Register: SPIS_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 10 : Write '1' to Enable interrupt for ACQUIRED event */ +#define SPIS_INTENSET_ACQUIRED_Pos (10UL) /*!< Position of ACQUIRED field. */ +#define SPIS_INTENSET_ACQUIRED_Msk (0x1UL << SPIS_INTENSET_ACQUIRED_Pos) /*!< Bit mask of ACQUIRED field. */ +#define SPIS_INTENSET_ACQUIRED_Disabled (0UL) /*!< Read: Disabled */ +#define SPIS_INTENSET_ACQUIRED_Enabled (1UL) /*!< Read: Enabled */ +#define SPIS_INTENSET_ACQUIRED_Set (1UL) /*!< Enable */ + +/* Bit 4 : Write '1' to Enable interrupt for ENDRX event */ +#define SPIS_INTENSET_ENDRX_Pos (4UL) /*!< Position of ENDRX field. */ +#define SPIS_INTENSET_ENDRX_Msk (0x1UL << SPIS_INTENSET_ENDRX_Pos) /*!< Bit mask of ENDRX field. */ +#define SPIS_INTENSET_ENDRX_Disabled (0UL) /*!< Read: Disabled */ +#define SPIS_INTENSET_ENDRX_Enabled (1UL) /*!< Read: Enabled */ +#define SPIS_INTENSET_ENDRX_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for END event */ +#define SPIS_INTENSET_END_Pos (1UL) /*!< Position of END field. */ +#define SPIS_INTENSET_END_Msk (0x1UL << SPIS_INTENSET_END_Pos) /*!< Bit mask of END field. */ +#define SPIS_INTENSET_END_Disabled (0UL) /*!< Read: Disabled */ +#define SPIS_INTENSET_END_Enabled (1UL) /*!< Read: Enabled */ +#define SPIS_INTENSET_END_Set (1UL) /*!< Enable */ + +/* Register: SPIS_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 10 : Write '1' to Disable interrupt for ACQUIRED event */ +#define SPIS_INTENCLR_ACQUIRED_Pos (10UL) /*!< Position of ACQUIRED field. */ +#define SPIS_INTENCLR_ACQUIRED_Msk (0x1UL << SPIS_INTENCLR_ACQUIRED_Pos) /*!< Bit mask of ACQUIRED field. */ +#define SPIS_INTENCLR_ACQUIRED_Disabled (0UL) /*!< Read: Disabled */ +#define SPIS_INTENCLR_ACQUIRED_Enabled (1UL) /*!< Read: Enabled */ +#define SPIS_INTENCLR_ACQUIRED_Clear (1UL) /*!< Disable */ + +/* Bit 4 : Write '1' to Disable interrupt for ENDRX event */ +#define SPIS_INTENCLR_ENDRX_Pos (4UL) /*!< Position of ENDRX field. */ +#define SPIS_INTENCLR_ENDRX_Msk (0x1UL << SPIS_INTENCLR_ENDRX_Pos) /*!< Bit mask of ENDRX field. */ +#define SPIS_INTENCLR_ENDRX_Disabled (0UL) /*!< Read: Disabled */ +#define SPIS_INTENCLR_ENDRX_Enabled (1UL) /*!< Read: Enabled */ +#define SPIS_INTENCLR_ENDRX_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for END event */ +#define SPIS_INTENCLR_END_Pos (1UL) /*!< Position of END field. */ +#define SPIS_INTENCLR_END_Msk (0x1UL << SPIS_INTENCLR_END_Pos) /*!< Bit mask of END field. */ +#define SPIS_INTENCLR_END_Disabled (0UL) /*!< Read: Disabled */ +#define SPIS_INTENCLR_END_Enabled (1UL) /*!< Read: Enabled */ +#define SPIS_INTENCLR_END_Clear (1UL) /*!< Disable */ + +/* Register: SPIS_SEMSTAT */ +/* Description: Semaphore status register */ + +/* Bits 1..0 : Semaphore status */ +#define SPIS_SEMSTAT_SEMSTAT_Pos (0UL) /*!< Position of SEMSTAT field. */ +#define SPIS_SEMSTAT_SEMSTAT_Msk (0x3UL << SPIS_SEMSTAT_SEMSTAT_Pos) /*!< Bit mask of SEMSTAT field. */ +#define SPIS_SEMSTAT_SEMSTAT_Free (0UL) /*!< Semaphore is free */ +#define SPIS_SEMSTAT_SEMSTAT_CPU (1UL) /*!< Semaphore is assigned to CPU */ +#define SPIS_SEMSTAT_SEMSTAT_SPIS (2UL) /*!< Semaphore is assigned to SPI slave */ +#define SPIS_SEMSTAT_SEMSTAT_CPUPending (3UL) /*!< Semaphore is assigned to SPI but a handover to the CPU is pending */ + +/* Register: SPIS_STATUS */ +/* Description: Status from last transaction */ + +/* Bit 1 : RX buffer overflow detected, and prevented */ +#define SPIS_STATUS_OVERFLOW_Pos (1UL) /*!< Position of OVERFLOW field. */ +#define SPIS_STATUS_OVERFLOW_Msk (0x1UL << SPIS_STATUS_OVERFLOW_Pos) /*!< Bit mask of OVERFLOW field. */ +#define SPIS_STATUS_OVERFLOW_NotPresent (0UL) /*!< Read: error not present */ +#define SPIS_STATUS_OVERFLOW_Present (1UL) /*!< Read: error present */ +#define SPIS_STATUS_OVERFLOW_Clear (1UL) /*!< Write: clear error on writing '1' */ + +/* Bit 0 : TX buffer over-read detected, and prevented */ +#define SPIS_STATUS_OVERREAD_Pos (0UL) /*!< Position of OVERREAD field. */ +#define SPIS_STATUS_OVERREAD_Msk (0x1UL << SPIS_STATUS_OVERREAD_Pos) /*!< Bit mask of OVERREAD field. */ +#define SPIS_STATUS_OVERREAD_NotPresent (0UL) /*!< Read: error not present */ +#define SPIS_STATUS_OVERREAD_Present (1UL) /*!< Read: error present */ +#define SPIS_STATUS_OVERREAD_Clear (1UL) /*!< Write: clear error on writing '1' */ + +/* Register: SPIS_ENABLE */ +/* Description: Enable SPI slave */ + +/* Bits 3..0 : Enable or disable SPI slave */ +#define SPIS_ENABLE_ENABLE_Pos (0UL) /*!< Position of ENABLE field. */ +#define SPIS_ENABLE_ENABLE_Msk (0xFUL << SPIS_ENABLE_ENABLE_Pos) /*!< Bit mask of ENABLE field. */ +#define SPIS_ENABLE_ENABLE_Disabled (0UL) /*!< Disable SPI slave */ +#define SPIS_ENABLE_ENABLE_Enabled (2UL) /*!< Enable SPI slave */ + +/* Register: SPIS_PSEL_SCK */ +/* Description: Pin select for SCK */ + +/* Bit 31 : Connection */ +#define SPIS_PSEL_SCK_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define SPIS_PSEL_SCK_CONNECT_Msk (0x1UL << SPIS_PSEL_SCK_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define SPIS_PSEL_SCK_CONNECT_Connected (0UL) /*!< Connect */ +#define SPIS_PSEL_SCK_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define SPIS_PSEL_SCK_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define SPIS_PSEL_SCK_PIN_Msk (0x1FUL << SPIS_PSEL_SCK_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: SPIS_PSEL_MISO */ +/* Description: Pin select for MISO signal */ + +/* Bit 31 : Connection */ +#define SPIS_PSEL_MISO_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define SPIS_PSEL_MISO_CONNECT_Msk (0x1UL << SPIS_PSEL_MISO_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define SPIS_PSEL_MISO_CONNECT_Connected (0UL) /*!< Connect */ +#define SPIS_PSEL_MISO_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define SPIS_PSEL_MISO_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define SPIS_PSEL_MISO_PIN_Msk (0x1FUL << SPIS_PSEL_MISO_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: SPIS_PSEL_MOSI */ +/* Description: Pin select for MOSI signal */ + +/* Bit 31 : Connection */ +#define SPIS_PSEL_MOSI_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define SPIS_PSEL_MOSI_CONNECT_Msk (0x1UL << SPIS_PSEL_MOSI_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define SPIS_PSEL_MOSI_CONNECT_Connected (0UL) /*!< Connect */ +#define SPIS_PSEL_MOSI_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define SPIS_PSEL_MOSI_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define SPIS_PSEL_MOSI_PIN_Msk (0x1FUL << SPIS_PSEL_MOSI_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: SPIS_PSEL_CSN */ +/* Description: Pin select for CSN signal */ + +/* Bit 31 : Connection */ +#define SPIS_PSEL_CSN_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define SPIS_PSEL_CSN_CONNECT_Msk (0x1UL << SPIS_PSEL_CSN_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define SPIS_PSEL_CSN_CONNECT_Connected (0UL) /*!< Connect */ +#define SPIS_PSEL_CSN_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define SPIS_PSEL_CSN_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define SPIS_PSEL_CSN_PIN_Msk (0x1FUL << SPIS_PSEL_CSN_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: SPIS_RXD_PTR */ +/* Description: RXD data pointer */ + +/* Bits 31..0 : RXD data pointer */ +#define SPIS_RXD_PTR_PTR_Pos (0UL) /*!< Position of PTR field. */ +#define SPIS_RXD_PTR_PTR_Msk (0xFFFFFFFFUL << SPIS_RXD_PTR_PTR_Pos) /*!< Bit mask of PTR field. */ + +/* Register: SPIS_RXD_MAXCNT */ +/* Description: Maximum number of bytes in receive buffer */ + +/* Bits 7..0 : Maximum number of bytes in receive buffer */ +#define SPIS_RXD_MAXCNT_MAXCNT_Pos (0UL) /*!< Position of MAXCNT field. */ +#define SPIS_RXD_MAXCNT_MAXCNT_Msk (0xFFUL << SPIS_RXD_MAXCNT_MAXCNT_Pos) /*!< Bit mask of MAXCNT field. */ + +/* Register: SPIS_RXD_AMOUNT */ +/* Description: Number of bytes received in last granted transaction */ + +/* Bits 7..0 : Number of bytes received in the last granted transaction */ +#define SPIS_RXD_AMOUNT_AMOUNT_Pos (0UL) /*!< Position of AMOUNT field. */ +#define SPIS_RXD_AMOUNT_AMOUNT_Msk (0xFFUL << SPIS_RXD_AMOUNT_AMOUNT_Pos) /*!< Bit mask of AMOUNT field. */ + +/* Register: SPIS_TXD_PTR */ +/* Description: TXD data pointer */ + +/* Bits 31..0 : TXD data pointer */ +#define SPIS_TXD_PTR_PTR_Pos (0UL) /*!< Position of PTR field. */ +#define SPIS_TXD_PTR_PTR_Msk (0xFFFFFFFFUL << SPIS_TXD_PTR_PTR_Pos) /*!< Bit mask of PTR field. */ + +/* Register: SPIS_TXD_MAXCNT */ +/* Description: Maximum number of bytes in transmit buffer */ + +/* Bits 7..0 : Maximum number of bytes in transmit buffer */ +#define SPIS_TXD_MAXCNT_MAXCNT_Pos (0UL) /*!< Position of MAXCNT field. */ +#define SPIS_TXD_MAXCNT_MAXCNT_Msk (0xFFUL << SPIS_TXD_MAXCNT_MAXCNT_Pos) /*!< Bit mask of MAXCNT field. */ + +/* Register: SPIS_TXD_AMOUNT */ +/* Description: Number of bytes transmitted in last granted transaction */ + +/* Bits 7..0 : Number of bytes transmitted in last granted transaction */ +#define SPIS_TXD_AMOUNT_AMOUNT_Pos (0UL) /*!< Position of AMOUNT field. */ +#define SPIS_TXD_AMOUNT_AMOUNT_Msk (0xFFUL << SPIS_TXD_AMOUNT_AMOUNT_Pos) /*!< Bit mask of AMOUNT field. */ + +/* Register: SPIS_CONFIG */ +/* Description: Configuration register */ + +/* Bit 2 : Serial clock (SCK) polarity */ +#define SPIS_CONFIG_CPOL_Pos (2UL) /*!< Position of CPOL field. */ +#define SPIS_CONFIG_CPOL_Msk (0x1UL << SPIS_CONFIG_CPOL_Pos) /*!< Bit mask of CPOL field. */ +#define SPIS_CONFIG_CPOL_ActiveHigh (0UL) /*!< Active high */ +#define SPIS_CONFIG_CPOL_ActiveLow (1UL) /*!< Active low */ + +/* Bit 1 : Serial clock (SCK) phase */ +#define SPIS_CONFIG_CPHA_Pos (1UL) /*!< Position of CPHA field. */ +#define SPIS_CONFIG_CPHA_Msk (0x1UL << SPIS_CONFIG_CPHA_Pos) /*!< Bit mask of CPHA field. */ +#define SPIS_CONFIG_CPHA_Leading (0UL) /*!< Sample on leading edge of clock, shift serial data on trailing edge */ +#define SPIS_CONFIG_CPHA_Trailing (1UL) /*!< Sample on trailing edge of clock, shift serial data on leading edge */ + +/* Bit 0 : Bit order */ +#define SPIS_CONFIG_ORDER_Pos (0UL) /*!< Position of ORDER field. */ +#define SPIS_CONFIG_ORDER_Msk (0x1UL << SPIS_CONFIG_ORDER_Pos) /*!< Bit mask of ORDER field. */ +#define SPIS_CONFIG_ORDER_MsbFirst (0UL) /*!< Most significant bit shifted out first */ +#define SPIS_CONFIG_ORDER_LsbFirst (1UL) /*!< Least significant bit shifted out first */ + +/* Register: SPIS_DEF */ +/* Description: Default character. Character clocked out in case of an ignored transaction. */ + +/* Bits 7..0 : Default character. Character clocked out in case of an ignored transaction. */ +#define SPIS_DEF_DEF_Pos (0UL) /*!< Position of DEF field. */ +#define SPIS_DEF_DEF_Msk (0xFFUL << SPIS_DEF_DEF_Pos) /*!< Bit mask of DEF field. */ + +/* Register: SPIS_ORC */ +/* Description: Over-read character */ + +/* Bits 7..0 : Over-read character. Character clocked out after an over-read of the transmit buffer. */ +#define SPIS_ORC_ORC_Pos (0UL) /*!< Position of ORC field. */ +#define SPIS_ORC_ORC_Msk (0xFFUL << SPIS_ORC_ORC_Pos) /*!< Bit mask of ORC field. */ + + +/* Peripheral: TEMP */ +/* Description: Temperature Sensor */ + +/* Register: TEMP_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 0 : Write '1' to Enable interrupt for DATARDY event */ +#define TEMP_INTENSET_DATARDY_Pos (0UL) /*!< Position of DATARDY field. */ +#define TEMP_INTENSET_DATARDY_Msk (0x1UL << TEMP_INTENSET_DATARDY_Pos) /*!< Bit mask of DATARDY field. */ +#define TEMP_INTENSET_DATARDY_Disabled (0UL) /*!< Read: Disabled */ +#define TEMP_INTENSET_DATARDY_Enabled (1UL) /*!< Read: Enabled */ +#define TEMP_INTENSET_DATARDY_Set (1UL) /*!< Enable */ + +/* Register: TEMP_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 0 : Write '1' to Disable interrupt for DATARDY event */ +#define TEMP_INTENCLR_DATARDY_Pos (0UL) /*!< Position of DATARDY field. */ +#define TEMP_INTENCLR_DATARDY_Msk (0x1UL << TEMP_INTENCLR_DATARDY_Pos) /*!< Bit mask of DATARDY field. */ +#define TEMP_INTENCLR_DATARDY_Disabled (0UL) /*!< Read: Disabled */ +#define TEMP_INTENCLR_DATARDY_Enabled (1UL) /*!< Read: Enabled */ +#define TEMP_INTENCLR_DATARDY_Clear (1UL) /*!< Disable */ + +/* Register: TEMP_TEMP */ +/* Description: Temperature in degC (0.25deg steps) */ + +/* Bits 31..0 : Temperature in degC (0.25deg steps) */ +#define TEMP_TEMP_TEMP_Pos (0UL) /*!< Position of TEMP field. */ +#define TEMP_TEMP_TEMP_Msk (0xFFFFFFFFUL << TEMP_TEMP_TEMP_Pos) /*!< Bit mask of TEMP field. */ + +/* Register: TEMP_A0 */ +/* Description: Slope of 1st piece wise linear function */ + +/* Bits 11..0 : Slope of 1st piece wise linear function */ +#define TEMP_A0_A0_Pos (0UL) /*!< Position of A0 field. */ +#define TEMP_A0_A0_Msk (0xFFFUL << TEMP_A0_A0_Pos) /*!< Bit mask of A0 field. */ + +/* Register: TEMP_A1 */ +/* Description: Slope of 2nd piece wise linear function */ + +/* Bits 11..0 : Slope of 2nd piece wise linear function */ +#define TEMP_A1_A1_Pos (0UL) /*!< Position of A1 field. */ +#define TEMP_A1_A1_Msk (0xFFFUL << TEMP_A1_A1_Pos) /*!< Bit mask of A1 field. */ + +/* Register: TEMP_A2 */ +/* Description: Slope of 3rd piece wise linear function */ + +/* Bits 11..0 : Slope of 3rd piece wise linear function */ +#define TEMP_A2_A2_Pos (0UL) /*!< Position of A2 field. */ +#define TEMP_A2_A2_Msk (0xFFFUL << TEMP_A2_A2_Pos) /*!< Bit mask of A2 field. */ + +/* Register: TEMP_A3 */ +/* Description: Slope of 4th piece wise linear function */ + +/* Bits 11..0 : Slope of 4th piece wise linear function */ +#define TEMP_A3_A3_Pos (0UL) /*!< Position of A3 field. */ +#define TEMP_A3_A3_Msk (0xFFFUL << TEMP_A3_A3_Pos) /*!< Bit mask of A3 field. */ + +/* Register: TEMP_A4 */ +/* Description: Slope of 5th piece wise linear function */ + +/* Bits 11..0 : Slope of 5th piece wise linear function */ +#define TEMP_A4_A4_Pos (0UL) /*!< Position of A4 field. */ +#define TEMP_A4_A4_Msk (0xFFFUL << TEMP_A4_A4_Pos) /*!< Bit mask of A4 field. */ + +/* Register: TEMP_A5 */ +/* Description: Slope of 6th piece wise linear function */ + +/* Bits 11..0 : Slope of 6th piece wise linear function */ +#define TEMP_A5_A5_Pos (0UL) /*!< Position of A5 field. */ +#define TEMP_A5_A5_Msk (0xFFFUL << TEMP_A5_A5_Pos) /*!< Bit mask of A5 field. */ + +/* Register: TEMP_B0 */ +/* Description: y-intercept of 1st piece wise linear function */ + +/* Bits 13..0 : y-intercept of 1st piece wise linear function */ +#define TEMP_B0_B0_Pos (0UL) /*!< Position of B0 field. */ +#define TEMP_B0_B0_Msk (0x3FFFUL << TEMP_B0_B0_Pos) /*!< Bit mask of B0 field. */ + +/* Register: TEMP_B1 */ +/* Description: y-intercept of 2nd piece wise linear function */ + +/* Bits 13..0 : y-intercept of 2nd piece wise linear function */ +#define TEMP_B1_B1_Pos (0UL) /*!< Position of B1 field. */ +#define TEMP_B1_B1_Msk (0x3FFFUL << TEMP_B1_B1_Pos) /*!< Bit mask of B1 field. */ + +/* Register: TEMP_B2 */ +/* Description: y-intercept of 3rd piece wise linear function */ + +/* Bits 13..0 : y-intercept of 3rd piece wise linear function */ +#define TEMP_B2_B2_Pos (0UL) /*!< Position of B2 field. */ +#define TEMP_B2_B2_Msk (0x3FFFUL << TEMP_B2_B2_Pos) /*!< Bit mask of B2 field. */ + +/* Register: TEMP_B3 */ +/* Description: y-intercept of 4th piece wise linear function */ + +/* Bits 13..0 : y-intercept of 4th piece wise linear function */ +#define TEMP_B3_B3_Pos (0UL) /*!< Position of B3 field. */ +#define TEMP_B3_B3_Msk (0x3FFFUL << TEMP_B3_B3_Pos) /*!< Bit mask of B3 field. */ + +/* Register: TEMP_B4 */ +/* Description: y-intercept of 5th piece wise linear function */ + +/* Bits 13..0 : y-intercept of 5th piece wise linear function */ +#define TEMP_B4_B4_Pos (0UL) /*!< Position of B4 field. */ +#define TEMP_B4_B4_Msk (0x3FFFUL << TEMP_B4_B4_Pos) /*!< Bit mask of B4 field. */ + +/* Register: TEMP_B5 */ +/* Description: y-intercept of 6th piece wise linear function */ + +/* Bits 13..0 : y-intercept of 6th piece wise linear function */ +#define TEMP_B5_B5_Pos (0UL) /*!< Position of B5 field. */ +#define TEMP_B5_B5_Msk (0x3FFFUL << TEMP_B5_B5_Pos) /*!< Bit mask of B5 field. */ + +/* Register: TEMP_T0 */ +/* Description: End point of 1st piece wise linear function */ + +/* Bits 7..0 : End point of 1st piece wise linear function */ +#define TEMP_T0_T0_Pos (0UL) /*!< Position of T0 field. */ +#define TEMP_T0_T0_Msk (0xFFUL << TEMP_T0_T0_Pos) /*!< Bit mask of T0 field. */ + +/* Register: TEMP_T1 */ +/* Description: End point of 2nd piece wise linear function */ + +/* Bits 7..0 : End point of 2nd piece wise linear function */ +#define TEMP_T1_T1_Pos (0UL) /*!< Position of T1 field. */ +#define TEMP_T1_T1_Msk (0xFFUL << TEMP_T1_T1_Pos) /*!< Bit mask of T1 field. */ + +/* Register: TEMP_T2 */ +/* Description: End point of 3rd piece wise linear function */ + +/* Bits 7..0 : End point of 3rd piece wise linear function */ +#define TEMP_T2_T2_Pos (0UL) /*!< Position of T2 field. */ +#define TEMP_T2_T2_Msk (0xFFUL << TEMP_T2_T2_Pos) /*!< Bit mask of T2 field. */ + +/* Register: TEMP_T3 */ +/* Description: End point of 4th piece wise linear function */ + +/* Bits 7..0 : End point of 4th piece wise linear function */ +#define TEMP_T3_T3_Pos (0UL) /*!< Position of T3 field. */ +#define TEMP_T3_T3_Msk (0xFFUL << TEMP_T3_T3_Pos) /*!< Bit mask of T3 field. */ + +/* Register: TEMP_T4 */ +/* Description: End point of 5th piece wise linear function */ + +/* Bits 7..0 : End point of 5th piece wise linear function */ +#define TEMP_T4_T4_Pos (0UL) /*!< Position of T4 field. */ +#define TEMP_T4_T4_Msk (0xFFUL << TEMP_T4_T4_Pos) /*!< Bit mask of T4 field. */ + + +/* Peripheral: TIMER */ +/* Description: Timer/Counter 0 */ + +/* Register: TIMER_SHORTS */ +/* Description: Shortcut register */ + +/* Bit 13 : Shortcut between COMPARE[5] event and STOP task */ +#define TIMER_SHORTS_COMPARE5_STOP_Pos (13UL) /*!< Position of COMPARE5_STOP field. */ +#define TIMER_SHORTS_COMPARE5_STOP_Msk (0x1UL << TIMER_SHORTS_COMPARE5_STOP_Pos) /*!< Bit mask of COMPARE5_STOP field. */ +#define TIMER_SHORTS_COMPARE5_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define TIMER_SHORTS_COMPARE5_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 12 : Shortcut between COMPARE[4] event and STOP task */ +#define TIMER_SHORTS_COMPARE4_STOP_Pos (12UL) /*!< Position of COMPARE4_STOP field. */ +#define TIMER_SHORTS_COMPARE4_STOP_Msk (0x1UL << TIMER_SHORTS_COMPARE4_STOP_Pos) /*!< Bit mask of COMPARE4_STOP field. */ +#define TIMER_SHORTS_COMPARE4_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define TIMER_SHORTS_COMPARE4_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 11 : Shortcut between COMPARE[3] event and STOP task */ +#define TIMER_SHORTS_COMPARE3_STOP_Pos (11UL) /*!< Position of COMPARE3_STOP field. */ +#define TIMER_SHORTS_COMPARE3_STOP_Msk (0x1UL << TIMER_SHORTS_COMPARE3_STOP_Pos) /*!< Bit mask of COMPARE3_STOP field. */ +#define TIMER_SHORTS_COMPARE3_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define TIMER_SHORTS_COMPARE3_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 10 : Shortcut between COMPARE[2] event and STOP task */ +#define TIMER_SHORTS_COMPARE2_STOP_Pos (10UL) /*!< Position of COMPARE2_STOP field. */ +#define TIMER_SHORTS_COMPARE2_STOP_Msk (0x1UL << TIMER_SHORTS_COMPARE2_STOP_Pos) /*!< Bit mask of COMPARE2_STOP field. */ +#define TIMER_SHORTS_COMPARE2_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define TIMER_SHORTS_COMPARE2_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 9 : Shortcut between COMPARE[1] event and STOP task */ +#define TIMER_SHORTS_COMPARE1_STOP_Pos (9UL) /*!< Position of COMPARE1_STOP field. */ +#define TIMER_SHORTS_COMPARE1_STOP_Msk (0x1UL << TIMER_SHORTS_COMPARE1_STOP_Pos) /*!< Bit mask of COMPARE1_STOP field. */ +#define TIMER_SHORTS_COMPARE1_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define TIMER_SHORTS_COMPARE1_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 8 : Shortcut between COMPARE[0] event and STOP task */ +#define TIMER_SHORTS_COMPARE0_STOP_Pos (8UL) /*!< Position of COMPARE0_STOP field. */ +#define TIMER_SHORTS_COMPARE0_STOP_Msk (0x1UL << TIMER_SHORTS_COMPARE0_STOP_Pos) /*!< Bit mask of COMPARE0_STOP field. */ +#define TIMER_SHORTS_COMPARE0_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define TIMER_SHORTS_COMPARE0_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 5 : Shortcut between COMPARE[5] event and CLEAR task */ +#define TIMER_SHORTS_COMPARE5_CLEAR_Pos (5UL) /*!< Position of COMPARE5_CLEAR field. */ +#define TIMER_SHORTS_COMPARE5_CLEAR_Msk (0x1UL << TIMER_SHORTS_COMPARE5_CLEAR_Pos) /*!< Bit mask of COMPARE5_CLEAR field. */ +#define TIMER_SHORTS_COMPARE5_CLEAR_Disabled (0UL) /*!< Disable shortcut */ +#define TIMER_SHORTS_COMPARE5_CLEAR_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 4 : Shortcut between COMPARE[4] event and CLEAR task */ +#define TIMER_SHORTS_COMPARE4_CLEAR_Pos (4UL) /*!< Position of COMPARE4_CLEAR field. */ +#define TIMER_SHORTS_COMPARE4_CLEAR_Msk (0x1UL << TIMER_SHORTS_COMPARE4_CLEAR_Pos) /*!< Bit mask of COMPARE4_CLEAR field. */ +#define TIMER_SHORTS_COMPARE4_CLEAR_Disabled (0UL) /*!< Disable shortcut */ +#define TIMER_SHORTS_COMPARE4_CLEAR_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 3 : Shortcut between COMPARE[3] event and CLEAR task */ +#define TIMER_SHORTS_COMPARE3_CLEAR_Pos (3UL) /*!< Position of COMPARE3_CLEAR field. */ +#define TIMER_SHORTS_COMPARE3_CLEAR_Msk (0x1UL << TIMER_SHORTS_COMPARE3_CLEAR_Pos) /*!< Bit mask of COMPARE3_CLEAR field. */ +#define TIMER_SHORTS_COMPARE3_CLEAR_Disabled (0UL) /*!< Disable shortcut */ +#define TIMER_SHORTS_COMPARE3_CLEAR_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 2 : Shortcut between COMPARE[2] event and CLEAR task */ +#define TIMER_SHORTS_COMPARE2_CLEAR_Pos (2UL) /*!< Position of COMPARE2_CLEAR field. */ +#define TIMER_SHORTS_COMPARE2_CLEAR_Msk (0x1UL << TIMER_SHORTS_COMPARE2_CLEAR_Pos) /*!< Bit mask of COMPARE2_CLEAR field. */ +#define TIMER_SHORTS_COMPARE2_CLEAR_Disabled (0UL) /*!< Disable shortcut */ +#define TIMER_SHORTS_COMPARE2_CLEAR_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 1 : Shortcut between COMPARE[1] event and CLEAR task */ +#define TIMER_SHORTS_COMPARE1_CLEAR_Pos (1UL) /*!< Position of COMPARE1_CLEAR field. */ +#define TIMER_SHORTS_COMPARE1_CLEAR_Msk (0x1UL << TIMER_SHORTS_COMPARE1_CLEAR_Pos) /*!< Bit mask of COMPARE1_CLEAR field. */ +#define TIMER_SHORTS_COMPARE1_CLEAR_Disabled (0UL) /*!< Disable shortcut */ +#define TIMER_SHORTS_COMPARE1_CLEAR_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 0 : Shortcut between COMPARE[0] event and CLEAR task */ +#define TIMER_SHORTS_COMPARE0_CLEAR_Pos (0UL) /*!< Position of COMPARE0_CLEAR field. */ +#define TIMER_SHORTS_COMPARE0_CLEAR_Msk (0x1UL << TIMER_SHORTS_COMPARE0_CLEAR_Pos) /*!< Bit mask of COMPARE0_CLEAR field. */ +#define TIMER_SHORTS_COMPARE0_CLEAR_Disabled (0UL) /*!< Disable shortcut */ +#define TIMER_SHORTS_COMPARE0_CLEAR_Enabled (1UL) /*!< Enable shortcut */ + +/* Register: TIMER_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 21 : Write '1' to Enable interrupt for COMPARE[5] event */ +#define TIMER_INTENSET_COMPARE5_Pos (21UL) /*!< Position of COMPARE5 field. */ +#define TIMER_INTENSET_COMPARE5_Msk (0x1UL << TIMER_INTENSET_COMPARE5_Pos) /*!< Bit mask of COMPARE5 field. */ +#define TIMER_INTENSET_COMPARE5_Disabled (0UL) /*!< Read: Disabled */ +#define TIMER_INTENSET_COMPARE5_Enabled (1UL) /*!< Read: Enabled */ +#define TIMER_INTENSET_COMPARE5_Set (1UL) /*!< Enable */ + +/* Bit 20 : Write '1' to Enable interrupt for COMPARE[4] event */ +#define TIMER_INTENSET_COMPARE4_Pos (20UL) /*!< Position of COMPARE4 field. */ +#define TIMER_INTENSET_COMPARE4_Msk (0x1UL << TIMER_INTENSET_COMPARE4_Pos) /*!< Bit mask of COMPARE4 field. */ +#define TIMER_INTENSET_COMPARE4_Disabled (0UL) /*!< Read: Disabled */ +#define TIMER_INTENSET_COMPARE4_Enabled (1UL) /*!< Read: Enabled */ +#define TIMER_INTENSET_COMPARE4_Set (1UL) /*!< Enable */ + +/* Bit 19 : Write '1' to Enable interrupt for COMPARE[3] event */ +#define TIMER_INTENSET_COMPARE3_Pos (19UL) /*!< Position of COMPARE3 field. */ +#define TIMER_INTENSET_COMPARE3_Msk (0x1UL << TIMER_INTENSET_COMPARE3_Pos) /*!< Bit mask of COMPARE3 field. */ +#define TIMER_INTENSET_COMPARE3_Disabled (0UL) /*!< Read: Disabled */ +#define TIMER_INTENSET_COMPARE3_Enabled (1UL) /*!< Read: Enabled */ +#define TIMER_INTENSET_COMPARE3_Set (1UL) /*!< Enable */ + +/* Bit 18 : Write '1' to Enable interrupt for COMPARE[2] event */ +#define TIMER_INTENSET_COMPARE2_Pos (18UL) /*!< Position of COMPARE2 field. */ +#define TIMER_INTENSET_COMPARE2_Msk (0x1UL << TIMER_INTENSET_COMPARE2_Pos) /*!< Bit mask of COMPARE2 field. */ +#define TIMER_INTENSET_COMPARE2_Disabled (0UL) /*!< Read: Disabled */ +#define TIMER_INTENSET_COMPARE2_Enabled (1UL) /*!< Read: Enabled */ +#define TIMER_INTENSET_COMPARE2_Set (1UL) /*!< Enable */ + +/* Bit 17 : Write '1' to Enable interrupt for COMPARE[1] event */ +#define TIMER_INTENSET_COMPARE1_Pos (17UL) /*!< Position of COMPARE1 field. */ +#define TIMER_INTENSET_COMPARE1_Msk (0x1UL << TIMER_INTENSET_COMPARE1_Pos) /*!< Bit mask of COMPARE1 field. */ +#define TIMER_INTENSET_COMPARE1_Disabled (0UL) /*!< Read: Disabled */ +#define TIMER_INTENSET_COMPARE1_Enabled (1UL) /*!< Read: Enabled */ +#define TIMER_INTENSET_COMPARE1_Set (1UL) /*!< Enable */ + +/* Bit 16 : Write '1' to Enable interrupt for COMPARE[0] event */ +#define TIMER_INTENSET_COMPARE0_Pos (16UL) /*!< Position of COMPARE0 field. */ +#define TIMER_INTENSET_COMPARE0_Msk (0x1UL << TIMER_INTENSET_COMPARE0_Pos) /*!< Bit mask of COMPARE0 field. */ +#define TIMER_INTENSET_COMPARE0_Disabled (0UL) /*!< Read: Disabled */ +#define TIMER_INTENSET_COMPARE0_Enabled (1UL) /*!< Read: Enabled */ +#define TIMER_INTENSET_COMPARE0_Set (1UL) /*!< Enable */ + +/* Register: TIMER_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 21 : Write '1' to Disable interrupt for COMPARE[5] event */ +#define TIMER_INTENCLR_COMPARE5_Pos (21UL) /*!< Position of COMPARE5 field. */ +#define TIMER_INTENCLR_COMPARE5_Msk (0x1UL << TIMER_INTENCLR_COMPARE5_Pos) /*!< Bit mask of COMPARE5 field. */ +#define TIMER_INTENCLR_COMPARE5_Disabled (0UL) /*!< Read: Disabled */ +#define TIMER_INTENCLR_COMPARE5_Enabled (1UL) /*!< Read: Enabled */ +#define TIMER_INTENCLR_COMPARE5_Clear (1UL) /*!< Disable */ + +/* Bit 20 : Write '1' to Disable interrupt for COMPARE[4] event */ +#define TIMER_INTENCLR_COMPARE4_Pos (20UL) /*!< Position of COMPARE4 field. */ +#define TIMER_INTENCLR_COMPARE4_Msk (0x1UL << TIMER_INTENCLR_COMPARE4_Pos) /*!< Bit mask of COMPARE4 field. */ +#define TIMER_INTENCLR_COMPARE4_Disabled (0UL) /*!< Read: Disabled */ +#define TIMER_INTENCLR_COMPARE4_Enabled (1UL) /*!< Read: Enabled */ +#define TIMER_INTENCLR_COMPARE4_Clear (1UL) /*!< Disable */ + +/* Bit 19 : Write '1' to Disable interrupt for COMPARE[3] event */ +#define TIMER_INTENCLR_COMPARE3_Pos (19UL) /*!< Position of COMPARE3 field. */ +#define TIMER_INTENCLR_COMPARE3_Msk (0x1UL << TIMER_INTENCLR_COMPARE3_Pos) /*!< Bit mask of COMPARE3 field. */ +#define TIMER_INTENCLR_COMPARE3_Disabled (0UL) /*!< Read: Disabled */ +#define TIMER_INTENCLR_COMPARE3_Enabled (1UL) /*!< Read: Enabled */ +#define TIMER_INTENCLR_COMPARE3_Clear (1UL) /*!< Disable */ + +/* Bit 18 : Write '1' to Disable interrupt for COMPARE[2] event */ +#define TIMER_INTENCLR_COMPARE2_Pos (18UL) /*!< Position of COMPARE2 field. */ +#define TIMER_INTENCLR_COMPARE2_Msk (0x1UL << TIMER_INTENCLR_COMPARE2_Pos) /*!< Bit mask of COMPARE2 field. */ +#define TIMER_INTENCLR_COMPARE2_Disabled (0UL) /*!< Read: Disabled */ +#define TIMER_INTENCLR_COMPARE2_Enabled (1UL) /*!< Read: Enabled */ +#define TIMER_INTENCLR_COMPARE2_Clear (1UL) /*!< Disable */ + +/* Bit 17 : Write '1' to Disable interrupt for COMPARE[1] event */ +#define TIMER_INTENCLR_COMPARE1_Pos (17UL) /*!< Position of COMPARE1 field. */ +#define TIMER_INTENCLR_COMPARE1_Msk (0x1UL << TIMER_INTENCLR_COMPARE1_Pos) /*!< Bit mask of COMPARE1 field. */ +#define TIMER_INTENCLR_COMPARE1_Disabled (0UL) /*!< Read: Disabled */ +#define TIMER_INTENCLR_COMPARE1_Enabled (1UL) /*!< Read: Enabled */ +#define TIMER_INTENCLR_COMPARE1_Clear (1UL) /*!< Disable */ + +/* Bit 16 : Write '1' to Disable interrupt for COMPARE[0] event */ +#define TIMER_INTENCLR_COMPARE0_Pos (16UL) /*!< Position of COMPARE0 field. */ +#define TIMER_INTENCLR_COMPARE0_Msk (0x1UL << TIMER_INTENCLR_COMPARE0_Pos) /*!< Bit mask of COMPARE0 field. */ +#define TIMER_INTENCLR_COMPARE0_Disabled (0UL) /*!< Read: Disabled */ +#define TIMER_INTENCLR_COMPARE0_Enabled (1UL) /*!< Read: Enabled */ +#define TIMER_INTENCLR_COMPARE0_Clear (1UL) /*!< Disable */ + +/* Register: TIMER_MODE */ +/* Description: Timer mode selection */ + +/* Bits 1..0 : Timer mode */ +#define TIMER_MODE_MODE_Pos (0UL) /*!< Position of MODE field. */ +#define TIMER_MODE_MODE_Msk (0x3UL << TIMER_MODE_MODE_Pos) /*!< Bit mask of MODE field. */ +#define TIMER_MODE_MODE_Timer (0UL) /*!< Select Timer mode */ +#define TIMER_MODE_MODE_Counter (1UL) /*!< Deprecated enumerator - Select Counter mode */ +#define TIMER_MODE_MODE_LowPowerCounter (2UL) /*!< Select Low Power Counter mode */ + +/* Register: TIMER_BITMODE */ +/* Description: Configure the number of bits used by the TIMER */ + +/* Bits 1..0 : Timer bit width */ +#define TIMER_BITMODE_BITMODE_Pos (0UL) /*!< Position of BITMODE field. */ +#define TIMER_BITMODE_BITMODE_Msk (0x3UL << TIMER_BITMODE_BITMODE_Pos) /*!< Bit mask of BITMODE field. */ +#define TIMER_BITMODE_BITMODE_16Bit (0UL) /*!< 16 bit timer bit width */ +#define TIMER_BITMODE_BITMODE_08Bit (1UL) /*!< 8 bit timer bit width */ +#define TIMER_BITMODE_BITMODE_24Bit (2UL) /*!< 24 bit timer bit width */ +#define TIMER_BITMODE_BITMODE_32Bit (3UL) /*!< 32 bit timer bit width */ + +/* Register: TIMER_PRESCALER */ +/* Description: Timer prescaler register */ + +/* Bits 3..0 : Prescaler value */ +#define TIMER_PRESCALER_PRESCALER_Pos (0UL) /*!< Position of PRESCALER field. */ +#define TIMER_PRESCALER_PRESCALER_Msk (0xFUL << TIMER_PRESCALER_PRESCALER_Pos) /*!< Bit mask of PRESCALER field. */ + +/* Register: TIMER_CC */ +/* Description: Description collection[0]: Capture/Compare register 0 */ + +/* Bits 31..0 : Capture/Compare value */ +#define TIMER_CC_CC_Pos (0UL) /*!< Position of CC field. */ +#define TIMER_CC_CC_Msk (0xFFFFFFFFUL << TIMER_CC_CC_Pos) /*!< Bit mask of CC field. */ + + +/* Peripheral: TWI */ +/* Description: I2C compatible Two-Wire Interface 0 */ + +/* Register: TWI_SHORTS */ +/* Description: Shortcut register */ + +/* Bit 1 : Shortcut between BB event and STOP task */ +#define TWI_SHORTS_BB_STOP_Pos (1UL) /*!< Position of BB_STOP field. */ +#define TWI_SHORTS_BB_STOP_Msk (0x1UL << TWI_SHORTS_BB_STOP_Pos) /*!< Bit mask of BB_STOP field. */ +#define TWI_SHORTS_BB_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define TWI_SHORTS_BB_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 0 : Shortcut between BB event and SUSPEND task */ +#define TWI_SHORTS_BB_SUSPEND_Pos (0UL) /*!< Position of BB_SUSPEND field. */ +#define TWI_SHORTS_BB_SUSPEND_Msk (0x1UL << TWI_SHORTS_BB_SUSPEND_Pos) /*!< Bit mask of BB_SUSPEND field. */ +#define TWI_SHORTS_BB_SUSPEND_Disabled (0UL) /*!< Disable shortcut */ +#define TWI_SHORTS_BB_SUSPEND_Enabled (1UL) /*!< Enable shortcut */ + +/* Register: TWI_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 18 : Write '1' to Enable interrupt for SUSPENDED event */ +#define TWI_INTENSET_SUSPENDED_Pos (18UL) /*!< Position of SUSPENDED field. */ +#define TWI_INTENSET_SUSPENDED_Msk (0x1UL << TWI_INTENSET_SUSPENDED_Pos) /*!< Bit mask of SUSPENDED field. */ +#define TWI_INTENSET_SUSPENDED_Disabled (0UL) /*!< Read: Disabled */ +#define TWI_INTENSET_SUSPENDED_Enabled (1UL) /*!< Read: Enabled */ +#define TWI_INTENSET_SUSPENDED_Set (1UL) /*!< Enable */ + +/* Bit 14 : Write '1' to Enable interrupt for BB event */ +#define TWI_INTENSET_BB_Pos (14UL) /*!< Position of BB field. */ +#define TWI_INTENSET_BB_Msk (0x1UL << TWI_INTENSET_BB_Pos) /*!< Bit mask of BB field. */ +#define TWI_INTENSET_BB_Disabled (0UL) /*!< Read: Disabled */ +#define TWI_INTENSET_BB_Enabled (1UL) /*!< Read: Enabled */ +#define TWI_INTENSET_BB_Set (1UL) /*!< Enable */ + +/* Bit 9 : Write '1' to Enable interrupt for ERROR event */ +#define TWI_INTENSET_ERROR_Pos (9UL) /*!< Position of ERROR field. */ +#define TWI_INTENSET_ERROR_Msk (0x1UL << TWI_INTENSET_ERROR_Pos) /*!< Bit mask of ERROR field. */ +#define TWI_INTENSET_ERROR_Disabled (0UL) /*!< Read: Disabled */ +#define TWI_INTENSET_ERROR_Enabled (1UL) /*!< Read: Enabled */ +#define TWI_INTENSET_ERROR_Set (1UL) /*!< Enable */ + +/* Bit 7 : Write '1' to Enable interrupt for TXDSENT event */ +#define TWI_INTENSET_TXDSENT_Pos (7UL) /*!< Position of TXDSENT field. */ +#define TWI_INTENSET_TXDSENT_Msk (0x1UL << TWI_INTENSET_TXDSENT_Pos) /*!< Bit mask of TXDSENT field. */ +#define TWI_INTENSET_TXDSENT_Disabled (0UL) /*!< Read: Disabled */ +#define TWI_INTENSET_TXDSENT_Enabled (1UL) /*!< Read: Enabled */ +#define TWI_INTENSET_TXDSENT_Set (1UL) /*!< Enable */ + +/* Bit 2 : Write '1' to Enable interrupt for RXDREADY event */ +#define TWI_INTENSET_RXDREADY_Pos (2UL) /*!< Position of RXDREADY field. */ +#define TWI_INTENSET_RXDREADY_Msk (0x1UL << TWI_INTENSET_RXDREADY_Pos) /*!< Bit mask of RXDREADY field. */ +#define TWI_INTENSET_RXDREADY_Disabled (0UL) /*!< Read: Disabled */ +#define TWI_INTENSET_RXDREADY_Enabled (1UL) /*!< Read: Enabled */ +#define TWI_INTENSET_RXDREADY_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for STOPPED event */ +#define TWI_INTENSET_STOPPED_Pos (1UL) /*!< Position of STOPPED field. */ +#define TWI_INTENSET_STOPPED_Msk (0x1UL << TWI_INTENSET_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define TWI_INTENSET_STOPPED_Disabled (0UL) /*!< Read: Disabled */ +#define TWI_INTENSET_STOPPED_Enabled (1UL) /*!< Read: Enabled */ +#define TWI_INTENSET_STOPPED_Set (1UL) /*!< Enable */ + +/* Register: TWI_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 18 : Write '1' to Disable interrupt for SUSPENDED event */ +#define TWI_INTENCLR_SUSPENDED_Pos (18UL) /*!< Position of SUSPENDED field. */ +#define TWI_INTENCLR_SUSPENDED_Msk (0x1UL << TWI_INTENCLR_SUSPENDED_Pos) /*!< Bit mask of SUSPENDED field. */ +#define TWI_INTENCLR_SUSPENDED_Disabled (0UL) /*!< Read: Disabled */ +#define TWI_INTENCLR_SUSPENDED_Enabled (1UL) /*!< Read: Enabled */ +#define TWI_INTENCLR_SUSPENDED_Clear (1UL) /*!< Disable */ + +/* Bit 14 : Write '1' to Disable interrupt for BB event */ +#define TWI_INTENCLR_BB_Pos (14UL) /*!< Position of BB field. */ +#define TWI_INTENCLR_BB_Msk (0x1UL << TWI_INTENCLR_BB_Pos) /*!< Bit mask of BB field. */ +#define TWI_INTENCLR_BB_Disabled (0UL) /*!< Read: Disabled */ +#define TWI_INTENCLR_BB_Enabled (1UL) /*!< Read: Enabled */ +#define TWI_INTENCLR_BB_Clear (1UL) /*!< Disable */ + +/* Bit 9 : Write '1' to Disable interrupt for ERROR event */ +#define TWI_INTENCLR_ERROR_Pos (9UL) /*!< Position of ERROR field. */ +#define TWI_INTENCLR_ERROR_Msk (0x1UL << TWI_INTENCLR_ERROR_Pos) /*!< Bit mask of ERROR field. */ +#define TWI_INTENCLR_ERROR_Disabled (0UL) /*!< Read: Disabled */ +#define TWI_INTENCLR_ERROR_Enabled (1UL) /*!< Read: Enabled */ +#define TWI_INTENCLR_ERROR_Clear (1UL) /*!< Disable */ + +/* Bit 7 : Write '1' to Disable interrupt for TXDSENT event */ +#define TWI_INTENCLR_TXDSENT_Pos (7UL) /*!< Position of TXDSENT field. */ +#define TWI_INTENCLR_TXDSENT_Msk (0x1UL << TWI_INTENCLR_TXDSENT_Pos) /*!< Bit mask of TXDSENT field. */ +#define TWI_INTENCLR_TXDSENT_Disabled (0UL) /*!< Read: Disabled */ +#define TWI_INTENCLR_TXDSENT_Enabled (1UL) /*!< Read: Enabled */ +#define TWI_INTENCLR_TXDSENT_Clear (1UL) /*!< Disable */ + +/* Bit 2 : Write '1' to Disable interrupt for RXDREADY event */ +#define TWI_INTENCLR_RXDREADY_Pos (2UL) /*!< Position of RXDREADY field. */ +#define TWI_INTENCLR_RXDREADY_Msk (0x1UL << TWI_INTENCLR_RXDREADY_Pos) /*!< Bit mask of RXDREADY field. */ +#define TWI_INTENCLR_RXDREADY_Disabled (0UL) /*!< Read: Disabled */ +#define TWI_INTENCLR_RXDREADY_Enabled (1UL) /*!< Read: Enabled */ +#define TWI_INTENCLR_RXDREADY_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for STOPPED event */ +#define TWI_INTENCLR_STOPPED_Pos (1UL) /*!< Position of STOPPED field. */ +#define TWI_INTENCLR_STOPPED_Msk (0x1UL << TWI_INTENCLR_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define TWI_INTENCLR_STOPPED_Disabled (0UL) /*!< Read: Disabled */ +#define TWI_INTENCLR_STOPPED_Enabled (1UL) /*!< Read: Enabled */ +#define TWI_INTENCLR_STOPPED_Clear (1UL) /*!< Disable */ + +/* Register: TWI_ERRORSRC */ +/* Description: Error source */ + +/* Bit 2 : NACK received after sending a data byte (write '1' to clear) */ +#define TWI_ERRORSRC_DNACK_Pos (2UL) /*!< Position of DNACK field. */ +#define TWI_ERRORSRC_DNACK_Msk (0x1UL << TWI_ERRORSRC_DNACK_Pos) /*!< Bit mask of DNACK field. */ +#define TWI_ERRORSRC_DNACK_NotPresent (0UL) /*!< Read: error not present */ +#define TWI_ERRORSRC_DNACK_Present (1UL) /*!< Read: error present */ + +/* Bit 1 : NACK received after sending the address (write '1' to clear) */ +#define TWI_ERRORSRC_ANACK_Pos (1UL) /*!< Position of ANACK field. */ +#define TWI_ERRORSRC_ANACK_Msk (0x1UL << TWI_ERRORSRC_ANACK_Pos) /*!< Bit mask of ANACK field. */ +#define TWI_ERRORSRC_ANACK_NotPresent (0UL) /*!< Read: error not present */ +#define TWI_ERRORSRC_ANACK_Present (1UL) /*!< Read: error present */ + +/* Bit 0 : Overrun error */ +#define TWI_ERRORSRC_OVERRUN_Pos (0UL) /*!< Position of OVERRUN field. */ +#define TWI_ERRORSRC_OVERRUN_Msk (0x1UL << TWI_ERRORSRC_OVERRUN_Pos) /*!< Bit mask of OVERRUN field. */ +#define TWI_ERRORSRC_OVERRUN_NotPresent (0UL) /*!< Read: no overrun occured */ +#define TWI_ERRORSRC_OVERRUN_Present (1UL) /*!< Read: overrun occured */ + +/* Register: TWI_ENABLE */ +/* Description: Enable TWI */ + +/* Bits 3..0 : Enable or disable TWI */ +#define TWI_ENABLE_ENABLE_Pos (0UL) /*!< Position of ENABLE field. */ +#define TWI_ENABLE_ENABLE_Msk (0xFUL << TWI_ENABLE_ENABLE_Pos) /*!< Bit mask of ENABLE field. */ +#define TWI_ENABLE_ENABLE_Disabled (0UL) /*!< Disable TWI */ +#define TWI_ENABLE_ENABLE_Enabled (5UL) /*!< Enable TWI */ + +/* Register: TWI_PSELSCL */ +/* Description: Pin select for SCL */ + +/* Bits 31..0 : Pin number configuration for TWI SCL signal */ +#define TWI_PSELSCL_PSELSCL_Pos (0UL) /*!< Position of PSELSCL field. */ +#define TWI_PSELSCL_PSELSCL_Msk (0xFFFFFFFFUL << TWI_PSELSCL_PSELSCL_Pos) /*!< Bit mask of PSELSCL field. */ +#define TWI_PSELSCL_PSELSCL_Disconnected (0xFFFFFFFFUL) /*!< Disconnect */ + +/* Register: TWI_PSELSDA */ +/* Description: Pin select for SDA */ + +/* Bits 31..0 : Pin number configuration for TWI SDA signal */ +#define TWI_PSELSDA_PSELSDA_Pos (0UL) /*!< Position of PSELSDA field. */ +#define TWI_PSELSDA_PSELSDA_Msk (0xFFFFFFFFUL << TWI_PSELSDA_PSELSDA_Pos) /*!< Bit mask of PSELSDA field. */ +#define TWI_PSELSDA_PSELSDA_Disconnected (0xFFFFFFFFUL) /*!< Disconnect */ + +/* Register: TWI_RXD */ +/* Description: RXD register */ + +/* Bits 7..0 : RXD register */ +#define TWI_RXD_RXD_Pos (0UL) /*!< Position of RXD field. */ +#define TWI_RXD_RXD_Msk (0xFFUL << TWI_RXD_RXD_Pos) /*!< Bit mask of RXD field. */ + +/* Register: TWI_TXD */ +/* Description: TXD register */ + +/* Bits 7..0 : TXD register */ +#define TWI_TXD_TXD_Pos (0UL) /*!< Position of TXD field. */ +#define TWI_TXD_TXD_Msk (0xFFUL << TWI_TXD_TXD_Pos) /*!< Bit mask of TXD field. */ + +/* Register: TWI_FREQUENCY */ +/* Description: TWI frequency */ + +/* Bits 31..0 : TWI master clock frequency */ +#define TWI_FREQUENCY_FREQUENCY_Pos (0UL) /*!< Position of FREQUENCY field. */ +#define TWI_FREQUENCY_FREQUENCY_Msk (0xFFFFFFFFUL << TWI_FREQUENCY_FREQUENCY_Pos) /*!< Bit mask of FREQUENCY field. */ +#define TWI_FREQUENCY_FREQUENCY_K100 (0x01980000UL) /*!< 100 kbps */ +#define TWI_FREQUENCY_FREQUENCY_K250 (0x04000000UL) /*!< 250 kbps */ +#define TWI_FREQUENCY_FREQUENCY_K400 (0x06680000UL) /*!< 400 kbps (actual rate 410.256 kbps) */ + +/* Register: TWI_ADDRESS */ +/* Description: Address used in the TWI transfer */ + +/* Bits 6..0 : Address used in the TWI transfer */ +#define TWI_ADDRESS_ADDRESS_Pos (0UL) /*!< Position of ADDRESS field. */ +#define TWI_ADDRESS_ADDRESS_Msk (0x7FUL << TWI_ADDRESS_ADDRESS_Pos) /*!< Bit mask of ADDRESS field. */ + + +/* Peripheral: TWIM */ +/* Description: I2C compatible Two-Wire Master Interface with EasyDMA 0 */ + +/* Register: TWIM_SHORTS */ +/* Description: Shortcut register */ + +/* Bit 12 : Shortcut between LASTRX event and STOP task */ +#define TWIM_SHORTS_LASTRX_STOP_Pos (12UL) /*!< Position of LASTRX_STOP field. */ +#define TWIM_SHORTS_LASTRX_STOP_Msk (0x1UL << TWIM_SHORTS_LASTRX_STOP_Pos) /*!< Bit mask of LASTRX_STOP field. */ +#define TWIM_SHORTS_LASTRX_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define TWIM_SHORTS_LASTRX_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 10 : Shortcut between LASTRX event and STARTTX task */ +#define TWIM_SHORTS_LASTRX_STARTTX_Pos (10UL) /*!< Position of LASTRX_STARTTX field. */ +#define TWIM_SHORTS_LASTRX_STARTTX_Msk (0x1UL << TWIM_SHORTS_LASTRX_STARTTX_Pos) /*!< Bit mask of LASTRX_STARTTX field. */ +#define TWIM_SHORTS_LASTRX_STARTTX_Disabled (0UL) /*!< Disable shortcut */ +#define TWIM_SHORTS_LASTRX_STARTTX_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 9 : Shortcut between LASTTX event and STOP task */ +#define TWIM_SHORTS_LASTTX_STOP_Pos (9UL) /*!< Position of LASTTX_STOP field. */ +#define TWIM_SHORTS_LASTTX_STOP_Msk (0x1UL << TWIM_SHORTS_LASTTX_STOP_Pos) /*!< Bit mask of LASTTX_STOP field. */ +#define TWIM_SHORTS_LASTTX_STOP_Disabled (0UL) /*!< Disable shortcut */ +#define TWIM_SHORTS_LASTTX_STOP_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 8 : Shortcut between LASTTX event and SUSPEND task */ +#define TWIM_SHORTS_LASTTX_SUSPEND_Pos (8UL) /*!< Position of LASTTX_SUSPEND field. */ +#define TWIM_SHORTS_LASTTX_SUSPEND_Msk (0x1UL << TWIM_SHORTS_LASTTX_SUSPEND_Pos) /*!< Bit mask of LASTTX_SUSPEND field. */ +#define TWIM_SHORTS_LASTTX_SUSPEND_Disabled (0UL) /*!< Disable shortcut */ +#define TWIM_SHORTS_LASTTX_SUSPEND_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 7 : Shortcut between LASTTX event and STARTRX task */ +#define TWIM_SHORTS_LASTTX_STARTRX_Pos (7UL) /*!< Position of LASTTX_STARTRX field. */ +#define TWIM_SHORTS_LASTTX_STARTRX_Msk (0x1UL << TWIM_SHORTS_LASTTX_STARTRX_Pos) /*!< Bit mask of LASTTX_STARTRX field. */ +#define TWIM_SHORTS_LASTTX_STARTRX_Disabled (0UL) /*!< Disable shortcut */ +#define TWIM_SHORTS_LASTTX_STARTRX_Enabled (1UL) /*!< Enable shortcut */ + +/* Register: TWIM_INTEN */ +/* Description: Enable or disable interrupt */ + +/* Bit 24 : Enable or disable interrupt for LASTTX event */ +#define TWIM_INTEN_LASTTX_Pos (24UL) /*!< Position of LASTTX field. */ +#define TWIM_INTEN_LASTTX_Msk (0x1UL << TWIM_INTEN_LASTTX_Pos) /*!< Bit mask of LASTTX field. */ +#define TWIM_INTEN_LASTTX_Disabled (0UL) /*!< Disable */ +#define TWIM_INTEN_LASTTX_Enabled (1UL) /*!< Enable */ + +/* Bit 23 : Enable or disable interrupt for LASTRX event */ +#define TWIM_INTEN_LASTRX_Pos (23UL) /*!< Position of LASTRX field. */ +#define TWIM_INTEN_LASTRX_Msk (0x1UL << TWIM_INTEN_LASTRX_Pos) /*!< Bit mask of LASTRX field. */ +#define TWIM_INTEN_LASTRX_Disabled (0UL) /*!< Disable */ +#define TWIM_INTEN_LASTRX_Enabled (1UL) /*!< Enable */ + +/* Bit 20 : Enable or disable interrupt for TXSTARTED event */ +#define TWIM_INTEN_TXSTARTED_Pos (20UL) /*!< Position of TXSTARTED field. */ +#define TWIM_INTEN_TXSTARTED_Msk (0x1UL << TWIM_INTEN_TXSTARTED_Pos) /*!< Bit mask of TXSTARTED field. */ +#define TWIM_INTEN_TXSTARTED_Disabled (0UL) /*!< Disable */ +#define TWIM_INTEN_TXSTARTED_Enabled (1UL) /*!< Enable */ + +/* Bit 19 : Enable or disable interrupt for RXSTARTED event */ +#define TWIM_INTEN_RXSTARTED_Pos (19UL) /*!< Position of RXSTARTED field. */ +#define TWIM_INTEN_RXSTARTED_Msk (0x1UL << TWIM_INTEN_RXSTARTED_Pos) /*!< Bit mask of RXSTARTED field. */ +#define TWIM_INTEN_RXSTARTED_Disabled (0UL) /*!< Disable */ +#define TWIM_INTEN_RXSTARTED_Enabled (1UL) /*!< Enable */ + +/* Bit 18 : Enable or disable interrupt for SUSPENDED event */ +#define TWIM_INTEN_SUSPENDED_Pos (18UL) /*!< Position of SUSPENDED field. */ +#define TWIM_INTEN_SUSPENDED_Msk (0x1UL << TWIM_INTEN_SUSPENDED_Pos) /*!< Bit mask of SUSPENDED field. */ +#define TWIM_INTEN_SUSPENDED_Disabled (0UL) /*!< Disable */ +#define TWIM_INTEN_SUSPENDED_Enabled (1UL) /*!< Enable */ + +/* Bit 9 : Enable or disable interrupt for ERROR event */ +#define TWIM_INTEN_ERROR_Pos (9UL) /*!< Position of ERROR field. */ +#define TWIM_INTEN_ERROR_Msk (0x1UL << TWIM_INTEN_ERROR_Pos) /*!< Bit mask of ERROR field. */ +#define TWIM_INTEN_ERROR_Disabled (0UL) /*!< Disable */ +#define TWIM_INTEN_ERROR_Enabled (1UL) /*!< Enable */ + +/* Bit 1 : Enable or disable interrupt for STOPPED event */ +#define TWIM_INTEN_STOPPED_Pos (1UL) /*!< Position of STOPPED field. */ +#define TWIM_INTEN_STOPPED_Msk (0x1UL << TWIM_INTEN_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define TWIM_INTEN_STOPPED_Disabled (0UL) /*!< Disable */ +#define TWIM_INTEN_STOPPED_Enabled (1UL) /*!< Enable */ + +/* Register: TWIM_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 24 : Write '1' to Enable interrupt for LASTTX event */ +#define TWIM_INTENSET_LASTTX_Pos (24UL) /*!< Position of LASTTX field. */ +#define TWIM_INTENSET_LASTTX_Msk (0x1UL << TWIM_INTENSET_LASTTX_Pos) /*!< Bit mask of LASTTX field. */ +#define TWIM_INTENSET_LASTTX_Disabled (0UL) /*!< Read: Disabled */ +#define TWIM_INTENSET_LASTTX_Enabled (1UL) /*!< Read: Enabled */ +#define TWIM_INTENSET_LASTTX_Set (1UL) /*!< Enable */ + +/* Bit 23 : Write '1' to Enable interrupt for LASTRX event */ +#define TWIM_INTENSET_LASTRX_Pos (23UL) /*!< Position of LASTRX field. */ +#define TWIM_INTENSET_LASTRX_Msk (0x1UL << TWIM_INTENSET_LASTRX_Pos) /*!< Bit mask of LASTRX field. */ +#define TWIM_INTENSET_LASTRX_Disabled (0UL) /*!< Read: Disabled */ +#define TWIM_INTENSET_LASTRX_Enabled (1UL) /*!< Read: Enabled */ +#define TWIM_INTENSET_LASTRX_Set (1UL) /*!< Enable */ + +/* Bit 20 : Write '1' to Enable interrupt for TXSTARTED event */ +#define TWIM_INTENSET_TXSTARTED_Pos (20UL) /*!< Position of TXSTARTED field. */ +#define TWIM_INTENSET_TXSTARTED_Msk (0x1UL << TWIM_INTENSET_TXSTARTED_Pos) /*!< Bit mask of TXSTARTED field. */ +#define TWIM_INTENSET_TXSTARTED_Disabled (0UL) /*!< Read: Disabled */ +#define TWIM_INTENSET_TXSTARTED_Enabled (1UL) /*!< Read: Enabled */ +#define TWIM_INTENSET_TXSTARTED_Set (1UL) /*!< Enable */ + +/* Bit 19 : Write '1' to Enable interrupt for RXSTARTED event */ +#define TWIM_INTENSET_RXSTARTED_Pos (19UL) /*!< Position of RXSTARTED field. */ +#define TWIM_INTENSET_RXSTARTED_Msk (0x1UL << TWIM_INTENSET_RXSTARTED_Pos) /*!< Bit mask of RXSTARTED field. */ +#define TWIM_INTENSET_RXSTARTED_Disabled (0UL) /*!< Read: Disabled */ +#define TWIM_INTENSET_RXSTARTED_Enabled (1UL) /*!< Read: Enabled */ +#define TWIM_INTENSET_RXSTARTED_Set (1UL) /*!< Enable */ + +/* Bit 18 : Write '1' to Enable interrupt for SUSPENDED event */ +#define TWIM_INTENSET_SUSPENDED_Pos (18UL) /*!< Position of SUSPENDED field. */ +#define TWIM_INTENSET_SUSPENDED_Msk (0x1UL << TWIM_INTENSET_SUSPENDED_Pos) /*!< Bit mask of SUSPENDED field. */ +#define TWIM_INTENSET_SUSPENDED_Disabled (0UL) /*!< Read: Disabled */ +#define TWIM_INTENSET_SUSPENDED_Enabled (1UL) /*!< Read: Enabled */ +#define TWIM_INTENSET_SUSPENDED_Set (1UL) /*!< Enable */ + +/* Bit 9 : Write '1' to Enable interrupt for ERROR event */ +#define TWIM_INTENSET_ERROR_Pos (9UL) /*!< Position of ERROR field. */ +#define TWIM_INTENSET_ERROR_Msk (0x1UL << TWIM_INTENSET_ERROR_Pos) /*!< Bit mask of ERROR field. */ +#define TWIM_INTENSET_ERROR_Disabled (0UL) /*!< Read: Disabled */ +#define TWIM_INTENSET_ERROR_Enabled (1UL) /*!< Read: Enabled */ +#define TWIM_INTENSET_ERROR_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for STOPPED event */ +#define TWIM_INTENSET_STOPPED_Pos (1UL) /*!< Position of STOPPED field. */ +#define TWIM_INTENSET_STOPPED_Msk (0x1UL << TWIM_INTENSET_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define TWIM_INTENSET_STOPPED_Disabled (0UL) /*!< Read: Disabled */ +#define TWIM_INTENSET_STOPPED_Enabled (1UL) /*!< Read: Enabled */ +#define TWIM_INTENSET_STOPPED_Set (1UL) /*!< Enable */ + +/* Register: TWIM_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 24 : Write '1' to Disable interrupt for LASTTX event */ +#define TWIM_INTENCLR_LASTTX_Pos (24UL) /*!< Position of LASTTX field. */ +#define TWIM_INTENCLR_LASTTX_Msk (0x1UL << TWIM_INTENCLR_LASTTX_Pos) /*!< Bit mask of LASTTX field. */ +#define TWIM_INTENCLR_LASTTX_Disabled (0UL) /*!< Read: Disabled */ +#define TWIM_INTENCLR_LASTTX_Enabled (1UL) /*!< Read: Enabled */ +#define TWIM_INTENCLR_LASTTX_Clear (1UL) /*!< Disable */ + +/* Bit 23 : Write '1' to Disable interrupt for LASTRX event */ +#define TWIM_INTENCLR_LASTRX_Pos (23UL) /*!< Position of LASTRX field. */ +#define TWIM_INTENCLR_LASTRX_Msk (0x1UL << TWIM_INTENCLR_LASTRX_Pos) /*!< Bit mask of LASTRX field. */ +#define TWIM_INTENCLR_LASTRX_Disabled (0UL) /*!< Read: Disabled */ +#define TWIM_INTENCLR_LASTRX_Enabled (1UL) /*!< Read: Enabled */ +#define TWIM_INTENCLR_LASTRX_Clear (1UL) /*!< Disable */ + +/* Bit 20 : Write '1' to Disable interrupt for TXSTARTED event */ +#define TWIM_INTENCLR_TXSTARTED_Pos (20UL) /*!< Position of TXSTARTED field. */ +#define TWIM_INTENCLR_TXSTARTED_Msk (0x1UL << TWIM_INTENCLR_TXSTARTED_Pos) /*!< Bit mask of TXSTARTED field. */ +#define TWIM_INTENCLR_TXSTARTED_Disabled (0UL) /*!< Read: Disabled */ +#define TWIM_INTENCLR_TXSTARTED_Enabled (1UL) /*!< Read: Enabled */ +#define TWIM_INTENCLR_TXSTARTED_Clear (1UL) /*!< Disable */ + +/* Bit 19 : Write '1' to Disable interrupt for RXSTARTED event */ +#define TWIM_INTENCLR_RXSTARTED_Pos (19UL) /*!< Position of RXSTARTED field. */ +#define TWIM_INTENCLR_RXSTARTED_Msk (0x1UL << TWIM_INTENCLR_RXSTARTED_Pos) /*!< Bit mask of RXSTARTED field. */ +#define TWIM_INTENCLR_RXSTARTED_Disabled (0UL) /*!< Read: Disabled */ +#define TWIM_INTENCLR_RXSTARTED_Enabled (1UL) /*!< Read: Enabled */ +#define TWIM_INTENCLR_RXSTARTED_Clear (1UL) /*!< Disable */ + +/* Bit 18 : Write '1' to Disable interrupt for SUSPENDED event */ +#define TWIM_INTENCLR_SUSPENDED_Pos (18UL) /*!< Position of SUSPENDED field. */ +#define TWIM_INTENCLR_SUSPENDED_Msk (0x1UL << TWIM_INTENCLR_SUSPENDED_Pos) /*!< Bit mask of SUSPENDED field. */ +#define TWIM_INTENCLR_SUSPENDED_Disabled (0UL) /*!< Read: Disabled */ +#define TWIM_INTENCLR_SUSPENDED_Enabled (1UL) /*!< Read: Enabled */ +#define TWIM_INTENCLR_SUSPENDED_Clear (1UL) /*!< Disable */ + +/* Bit 9 : Write '1' to Disable interrupt for ERROR event */ +#define TWIM_INTENCLR_ERROR_Pos (9UL) /*!< Position of ERROR field. */ +#define TWIM_INTENCLR_ERROR_Msk (0x1UL << TWIM_INTENCLR_ERROR_Pos) /*!< Bit mask of ERROR field. */ +#define TWIM_INTENCLR_ERROR_Disabled (0UL) /*!< Read: Disabled */ +#define TWIM_INTENCLR_ERROR_Enabled (1UL) /*!< Read: Enabled */ +#define TWIM_INTENCLR_ERROR_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for STOPPED event */ +#define TWIM_INTENCLR_STOPPED_Pos (1UL) /*!< Position of STOPPED field. */ +#define TWIM_INTENCLR_STOPPED_Msk (0x1UL << TWIM_INTENCLR_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define TWIM_INTENCLR_STOPPED_Disabled (0UL) /*!< Read: Disabled */ +#define TWIM_INTENCLR_STOPPED_Enabled (1UL) /*!< Read: Enabled */ +#define TWIM_INTENCLR_STOPPED_Clear (1UL) /*!< Disable */ + +/* Register: TWIM_ERRORSRC */ +/* Description: Error source */ + +/* Bit 2 : NACK received after sending a data byte (write '1' to clear) */ +#define TWIM_ERRORSRC_DNACK_Pos (2UL) /*!< Position of DNACK field. */ +#define TWIM_ERRORSRC_DNACK_Msk (0x1UL << TWIM_ERRORSRC_DNACK_Pos) /*!< Bit mask of DNACK field. */ +#define TWIM_ERRORSRC_DNACK_NotReceived (0UL) /*!< Error did not occur */ +#define TWIM_ERRORSRC_DNACK_Received (1UL) /*!< Error occurred */ + +/* Bit 1 : NACK received after sending the address (write '1' to clear) */ +#define TWIM_ERRORSRC_ANACK_Pos (1UL) /*!< Position of ANACK field. */ +#define TWIM_ERRORSRC_ANACK_Msk (0x1UL << TWIM_ERRORSRC_ANACK_Pos) /*!< Bit mask of ANACK field. */ +#define TWIM_ERRORSRC_ANACK_NotReceived (0UL) /*!< Error did not occur */ +#define TWIM_ERRORSRC_ANACK_Received (1UL) /*!< Error occurred */ + +/* Register: TWIM_ENABLE */ +/* Description: Enable TWIM */ + +/* Bits 3..0 : Enable or disable TWIM */ +#define TWIM_ENABLE_ENABLE_Pos (0UL) /*!< Position of ENABLE field. */ +#define TWIM_ENABLE_ENABLE_Msk (0xFUL << TWIM_ENABLE_ENABLE_Pos) /*!< Bit mask of ENABLE field. */ +#define TWIM_ENABLE_ENABLE_Disabled (0UL) /*!< Disable TWIM */ +#define TWIM_ENABLE_ENABLE_Enabled (6UL) /*!< Enable TWIM */ + +/* Register: TWIM_PSEL_SCL */ +/* Description: Pin select for SCL signal */ + +/* Bit 31 : Connection */ +#define TWIM_PSEL_SCL_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define TWIM_PSEL_SCL_CONNECT_Msk (0x1UL << TWIM_PSEL_SCL_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define TWIM_PSEL_SCL_CONNECT_Connected (0UL) /*!< Connect */ +#define TWIM_PSEL_SCL_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define TWIM_PSEL_SCL_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define TWIM_PSEL_SCL_PIN_Msk (0x1FUL << TWIM_PSEL_SCL_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: TWIM_PSEL_SDA */ +/* Description: Pin select for SDA signal */ + +/* Bit 31 : Connection */ +#define TWIM_PSEL_SDA_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define TWIM_PSEL_SDA_CONNECT_Msk (0x1UL << TWIM_PSEL_SDA_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define TWIM_PSEL_SDA_CONNECT_Connected (0UL) /*!< Connect */ +#define TWIM_PSEL_SDA_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define TWIM_PSEL_SDA_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define TWIM_PSEL_SDA_PIN_Msk (0x1FUL << TWIM_PSEL_SDA_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: TWIM_FREQUENCY */ +/* Description: TWI frequency */ + +/* Bits 31..0 : TWI master clock frequency */ +#define TWIM_FREQUENCY_FREQUENCY_Pos (0UL) /*!< Position of FREQUENCY field. */ +#define TWIM_FREQUENCY_FREQUENCY_Msk (0xFFFFFFFFUL << TWIM_FREQUENCY_FREQUENCY_Pos) /*!< Bit mask of FREQUENCY field. */ +#define TWIM_FREQUENCY_FREQUENCY_K100 (0x01980000UL) /*!< 100 kbps */ +#define TWIM_FREQUENCY_FREQUENCY_K250 (0x04000000UL) /*!< 250 kbps */ +#define TWIM_FREQUENCY_FREQUENCY_K400 (0x06400000UL) /*!< 400 kbps */ + +/* Register: TWIM_RXD_PTR */ +/* Description: Data pointer */ + +/* Bits 31..0 : Data pointer */ +#define TWIM_RXD_PTR_PTR_Pos (0UL) /*!< Position of PTR field. */ +#define TWIM_RXD_PTR_PTR_Msk (0xFFFFFFFFUL << TWIM_RXD_PTR_PTR_Pos) /*!< Bit mask of PTR field. */ + +/* Register: TWIM_RXD_MAXCNT */ +/* Description: Maximum number of bytes in receive buffer */ + +/* Bits 7..0 : Maximum number of bytes in receive buffer */ +#define TWIM_RXD_MAXCNT_MAXCNT_Pos (0UL) /*!< Position of MAXCNT field. */ +#define TWIM_RXD_MAXCNT_MAXCNT_Msk (0xFFUL << TWIM_RXD_MAXCNT_MAXCNT_Pos) /*!< Bit mask of MAXCNT field. */ + +/* Register: TWIM_RXD_AMOUNT */ +/* Description: Number of bytes transferred in the last transaction */ + +/* Bits 7..0 : Number of bytes transferred in the last transaction. In case of NACK error, includes the NACK'ed byte. */ +#define TWIM_RXD_AMOUNT_AMOUNT_Pos (0UL) /*!< Position of AMOUNT field. */ +#define TWIM_RXD_AMOUNT_AMOUNT_Msk (0xFFUL << TWIM_RXD_AMOUNT_AMOUNT_Pos) /*!< Bit mask of AMOUNT field. */ + +/* Register: TWIM_RXD_LIST */ +/* Description: EasyDMA list type */ + +/* Bits 2..0 : List type */ +#define TWIM_RXD_LIST_LIST_Pos (0UL) /*!< Position of LIST field. */ +#define TWIM_RXD_LIST_LIST_Msk (0x7UL << TWIM_RXD_LIST_LIST_Pos) /*!< Bit mask of LIST field. */ +#define TWIM_RXD_LIST_LIST_Disabled (0UL) /*!< Disable EasyDMA list */ +#define TWIM_RXD_LIST_LIST_ArrayList (1UL) /*!< Use array list */ + +/* Register: TWIM_TXD_PTR */ +/* Description: Data pointer */ + +/* Bits 31..0 : Data pointer */ +#define TWIM_TXD_PTR_PTR_Pos (0UL) /*!< Position of PTR field. */ +#define TWIM_TXD_PTR_PTR_Msk (0xFFFFFFFFUL << TWIM_TXD_PTR_PTR_Pos) /*!< Bit mask of PTR field. */ + +/* Register: TWIM_TXD_MAXCNT */ +/* Description: Maximum number of bytes in transmit buffer */ + +/* Bits 7..0 : Maximum number of bytes in transmit buffer */ +#define TWIM_TXD_MAXCNT_MAXCNT_Pos (0UL) /*!< Position of MAXCNT field. */ +#define TWIM_TXD_MAXCNT_MAXCNT_Msk (0xFFUL << TWIM_TXD_MAXCNT_MAXCNT_Pos) /*!< Bit mask of MAXCNT field. */ + +/* Register: TWIM_TXD_AMOUNT */ +/* Description: Number of bytes transferred in the last transaction */ + +/* Bits 7..0 : Number of bytes transferred in the last transaction. In case of NACK error, includes the NACK'ed byte. */ +#define TWIM_TXD_AMOUNT_AMOUNT_Pos (0UL) /*!< Position of AMOUNT field. */ +#define TWIM_TXD_AMOUNT_AMOUNT_Msk (0xFFUL << TWIM_TXD_AMOUNT_AMOUNT_Pos) /*!< Bit mask of AMOUNT field. */ + +/* Register: TWIM_TXD_LIST */ +/* Description: EasyDMA list type */ + +/* Bits 2..0 : List type */ +#define TWIM_TXD_LIST_LIST_Pos (0UL) /*!< Position of LIST field. */ +#define TWIM_TXD_LIST_LIST_Msk (0x7UL << TWIM_TXD_LIST_LIST_Pos) /*!< Bit mask of LIST field. */ +#define TWIM_TXD_LIST_LIST_Disabled (0UL) /*!< Disable EasyDMA list */ +#define TWIM_TXD_LIST_LIST_ArrayList (1UL) /*!< Use array list */ + +/* Register: TWIM_ADDRESS */ +/* Description: Address used in the TWI transfer */ + +/* Bits 6..0 : Address used in the TWI transfer */ +#define TWIM_ADDRESS_ADDRESS_Pos (0UL) /*!< Position of ADDRESS field. */ +#define TWIM_ADDRESS_ADDRESS_Msk (0x7FUL << TWIM_ADDRESS_ADDRESS_Pos) /*!< Bit mask of ADDRESS field. */ + + +/* Peripheral: TWIS */ +/* Description: I2C compatible Two-Wire Slave Interface with EasyDMA 0 */ + +/* Register: TWIS_SHORTS */ +/* Description: Shortcut register */ + +/* Bit 14 : Shortcut between READ event and SUSPEND task */ +#define TWIS_SHORTS_READ_SUSPEND_Pos (14UL) /*!< Position of READ_SUSPEND field. */ +#define TWIS_SHORTS_READ_SUSPEND_Msk (0x1UL << TWIS_SHORTS_READ_SUSPEND_Pos) /*!< Bit mask of READ_SUSPEND field. */ +#define TWIS_SHORTS_READ_SUSPEND_Disabled (0UL) /*!< Disable shortcut */ +#define TWIS_SHORTS_READ_SUSPEND_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 13 : Shortcut between WRITE event and SUSPEND task */ +#define TWIS_SHORTS_WRITE_SUSPEND_Pos (13UL) /*!< Position of WRITE_SUSPEND field. */ +#define TWIS_SHORTS_WRITE_SUSPEND_Msk (0x1UL << TWIS_SHORTS_WRITE_SUSPEND_Pos) /*!< Bit mask of WRITE_SUSPEND field. */ +#define TWIS_SHORTS_WRITE_SUSPEND_Disabled (0UL) /*!< Disable shortcut */ +#define TWIS_SHORTS_WRITE_SUSPEND_Enabled (1UL) /*!< Enable shortcut */ + +/* Register: TWIS_INTEN */ +/* Description: Enable or disable interrupt */ + +/* Bit 26 : Enable or disable interrupt for READ event */ +#define TWIS_INTEN_READ_Pos (26UL) /*!< Position of READ field. */ +#define TWIS_INTEN_READ_Msk (0x1UL << TWIS_INTEN_READ_Pos) /*!< Bit mask of READ field. */ +#define TWIS_INTEN_READ_Disabled (0UL) /*!< Disable */ +#define TWIS_INTEN_READ_Enabled (1UL) /*!< Enable */ + +/* Bit 25 : Enable or disable interrupt for WRITE event */ +#define TWIS_INTEN_WRITE_Pos (25UL) /*!< Position of WRITE field. */ +#define TWIS_INTEN_WRITE_Msk (0x1UL << TWIS_INTEN_WRITE_Pos) /*!< Bit mask of WRITE field. */ +#define TWIS_INTEN_WRITE_Disabled (0UL) /*!< Disable */ +#define TWIS_INTEN_WRITE_Enabled (1UL) /*!< Enable */ + +/* Bit 20 : Enable or disable interrupt for TXSTARTED event */ +#define TWIS_INTEN_TXSTARTED_Pos (20UL) /*!< Position of TXSTARTED field. */ +#define TWIS_INTEN_TXSTARTED_Msk (0x1UL << TWIS_INTEN_TXSTARTED_Pos) /*!< Bit mask of TXSTARTED field. */ +#define TWIS_INTEN_TXSTARTED_Disabled (0UL) /*!< Disable */ +#define TWIS_INTEN_TXSTARTED_Enabled (1UL) /*!< Enable */ + +/* Bit 19 : Enable or disable interrupt for RXSTARTED event */ +#define TWIS_INTEN_RXSTARTED_Pos (19UL) /*!< Position of RXSTARTED field. */ +#define TWIS_INTEN_RXSTARTED_Msk (0x1UL << TWIS_INTEN_RXSTARTED_Pos) /*!< Bit mask of RXSTARTED field. */ +#define TWIS_INTEN_RXSTARTED_Disabled (0UL) /*!< Disable */ +#define TWIS_INTEN_RXSTARTED_Enabled (1UL) /*!< Enable */ + +/* Bit 9 : Enable or disable interrupt for ERROR event */ +#define TWIS_INTEN_ERROR_Pos (9UL) /*!< Position of ERROR field. */ +#define TWIS_INTEN_ERROR_Msk (0x1UL << TWIS_INTEN_ERROR_Pos) /*!< Bit mask of ERROR field. */ +#define TWIS_INTEN_ERROR_Disabled (0UL) /*!< Disable */ +#define TWIS_INTEN_ERROR_Enabled (1UL) /*!< Enable */ + +/* Bit 1 : Enable or disable interrupt for STOPPED event */ +#define TWIS_INTEN_STOPPED_Pos (1UL) /*!< Position of STOPPED field. */ +#define TWIS_INTEN_STOPPED_Msk (0x1UL << TWIS_INTEN_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define TWIS_INTEN_STOPPED_Disabled (0UL) /*!< Disable */ +#define TWIS_INTEN_STOPPED_Enabled (1UL) /*!< Enable */ + +/* Register: TWIS_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 26 : Write '1' to Enable interrupt for READ event */ +#define TWIS_INTENSET_READ_Pos (26UL) /*!< Position of READ field. */ +#define TWIS_INTENSET_READ_Msk (0x1UL << TWIS_INTENSET_READ_Pos) /*!< Bit mask of READ field. */ +#define TWIS_INTENSET_READ_Disabled (0UL) /*!< Read: Disabled */ +#define TWIS_INTENSET_READ_Enabled (1UL) /*!< Read: Enabled */ +#define TWIS_INTENSET_READ_Set (1UL) /*!< Enable */ + +/* Bit 25 : Write '1' to Enable interrupt for WRITE event */ +#define TWIS_INTENSET_WRITE_Pos (25UL) /*!< Position of WRITE field. */ +#define TWIS_INTENSET_WRITE_Msk (0x1UL << TWIS_INTENSET_WRITE_Pos) /*!< Bit mask of WRITE field. */ +#define TWIS_INTENSET_WRITE_Disabled (0UL) /*!< Read: Disabled */ +#define TWIS_INTENSET_WRITE_Enabled (1UL) /*!< Read: Enabled */ +#define TWIS_INTENSET_WRITE_Set (1UL) /*!< Enable */ + +/* Bit 20 : Write '1' to Enable interrupt for TXSTARTED event */ +#define TWIS_INTENSET_TXSTARTED_Pos (20UL) /*!< Position of TXSTARTED field. */ +#define TWIS_INTENSET_TXSTARTED_Msk (0x1UL << TWIS_INTENSET_TXSTARTED_Pos) /*!< Bit mask of TXSTARTED field. */ +#define TWIS_INTENSET_TXSTARTED_Disabled (0UL) /*!< Read: Disabled */ +#define TWIS_INTENSET_TXSTARTED_Enabled (1UL) /*!< Read: Enabled */ +#define TWIS_INTENSET_TXSTARTED_Set (1UL) /*!< Enable */ + +/* Bit 19 : Write '1' to Enable interrupt for RXSTARTED event */ +#define TWIS_INTENSET_RXSTARTED_Pos (19UL) /*!< Position of RXSTARTED field. */ +#define TWIS_INTENSET_RXSTARTED_Msk (0x1UL << TWIS_INTENSET_RXSTARTED_Pos) /*!< Bit mask of RXSTARTED field. */ +#define TWIS_INTENSET_RXSTARTED_Disabled (0UL) /*!< Read: Disabled */ +#define TWIS_INTENSET_RXSTARTED_Enabled (1UL) /*!< Read: Enabled */ +#define TWIS_INTENSET_RXSTARTED_Set (1UL) /*!< Enable */ + +/* Bit 9 : Write '1' to Enable interrupt for ERROR event */ +#define TWIS_INTENSET_ERROR_Pos (9UL) /*!< Position of ERROR field. */ +#define TWIS_INTENSET_ERROR_Msk (0x1UL << TWIS_INTENSET_ERROR_Pos) /*!< Bit mask of ERROR field. */ +#define TWIS_INTENSET_ERROR_Disabled (0UL) /*!< Read: Disabled */ +#define TWIS_INTENSET_ERROR_Enabled (1UL) /*!< Read: Enabled */ +#define TWIS_INTENSET_ERROR_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for STOPPED event */ +#define TWIS_INTENSET_STOPPED_Pos (1UL) /*!< Position of STOPPED field. */ +#define TWIS_INTENSET_STOPPED_Msk (0x1UL << TWIS_INTENSET_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define TWIS_INTENSET_STOPPED_Disabled (0UL) /*!< Read: Disabled */ +#define TWIS_INTENSET_STOPPED_Enabled (1UL) /*!< Read: Enabled */ +#define TWIS_INTENSET_STOPPED_Set (1UL) /*!< Enable */ + +/* Register: TWIS_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 26 : Write '1' to Disable interrupt for READ event */ +#define TWIS_INTENCLR_READ_Pos (26UL) /*!< Position of READ field. */ +#define TWIS_INTENCLR_READ_Msk (0x1UL << TWIS_INTENCLR_READ_Pos) /*!< Bit mask of READ field. */ +#define TWIS_INTENCLR_READ_Disabled (0UL) /*!< Read: Disabled */ +#define TWIS_INTENCLR_READ_Enabled (1UL) /*!< Read: Enabled */ +#define TWIS_INTENCLR_READ_Clear (1UL) /*!< Disable */ + +/* Bit 25 : Write '1' to Disable interrupt for WRITE event */ +#define TWIS_INTENCLR_WRITE_Pos (25UL) /*!< Position of WRITE field. */ +#define TWIS_INTENCLR_WRITE_Msk (0x1UL << TWIS_INTENCLR_WRITE_Pos) /*!< Bit mask of WRITE field. */ +#define TWIS_INTENCLR_WRITE_Disabled (0UL) /*!< Read: Disabled */ +#define TWIS_INTENCLR_WRITE_Enabled (1UL) /*!< Read: Enabled */ +#define TWIS_INTENCLR_WRITE_Clear (1UL) /*!< Disable */ + +/* Bit 20 : Write '1' to Disable interrupt for TXSTARTED event */ +#define TWIS_INTENCLR_TXSTARTED_Pos (20UL) /*!< Position of TXSTARTED field. */ +#define TWIS_INTENCLR_TXSTARTED_Msk (0x1UL << TWIS_INTENCLR_TXSTARTED_Pos) /*!< Bit mask of TXSTARTED field. */ +#define TWIS_INTENCLR_TXSTARTED_Disabled (0UL) /*!< Read: Disabled */ +#define TWIS_INTENCLR_TXSTARTED_Enabled (1UL) /*!< Read: Enabled */ +#define TWIS_INTENCLR_TXSTARTED_Clear (1UL) /*!< Disable */ + +/* Bit 19 : Write '1' to Disable interrupt for RXSTARTED event */ +#define TWIS_INTENCLR_RXSTARTED_Pos (19UL) /*!< Position of RXSTARTED field. */ +#define TWIS_INTENCLR_RXSTARTED_Msk (0x1UL << TWIS_INTENCLR_RXSTARTED_Pos) /*!< Bit mask of RXSTARTED field. */ +#define TWIS_INTENCLR_RXSTARTED_Disabled (0UL) /*!< Read: Disabled */ +#define TWIS_INTENCLR_RXSTARTED_Enabled (1UL) /*!< Read: Enabled */ +#define TWIS_INTENCLR_RXSTARTED_Clear (1UL) /*!< Disable */ + +/* Bit 9 : Write '1' to Disable interrupt for ERROR event */ +#define TWIS_INTENCLR_ERROR_Pos (9UL) /*!< Position of ERROR field. */ +#define TWIS_INTENCLR_ERROR_Msk (0x1UL << TWIS_INTENCLR_ERROR_Pos) /*!< Bit mask of ERROR field. */ +#define TWIS_INTENCLR_ERROR_Disabled (0UL) /*!< Read: Disabled */ +#define TWIS_INTENCLR_ERROR_Enabled (1UL) /*!< Read: Enabled */ +#define TWIS_INTENCLR_ERROR_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for STOPPED event */ +#define TWIS_INTENCLR_STOPPED_Pos (1UL) /*!< Position of STOPPED field. */ +#define TWIS_INTENCLR_STOPPED_Msk (0x1UL << TWIS_INTENCLR_STOPPED_Pos) /*!< Bit mask of STOPPED field. */ +#define TWIS_INTENCLR_STOPPED_Disabled (0UL) /*!< Read: Disabled */ +#define TWIS_INTENCLR_STOPPED_Enabled (1UL) /*!< Read: Enabled */ +#define TWIS_INTENCLR_STOPPED_Clear (1UL) /*!< Disable */ + +/* Register: TWIS_ERRORSRC */ +/* Description: Error source */ + +/* Bit 3 : TX buffer over-read detected, and prevented */ +#define TWIS_ERRORSRC_OVERREAD_Pos (3UL) /*!< Position of OVERREAD field. */ +#define TWIS_ERRORSRC_OVERREAD_Msk (0x1UL << TWIS_ERRORSRC_OVERREAD_Pos) /*!< Bit mask of OVERREAD field. */ +#define TWIS_ERRORSRC_OVERREAD_NotDetected (0UL) /*!< Error did not occur */ +#define TWIS_ERRORSRC_OVERREAD_Detected (1UL) /*!< Error occurred */ + +/* Bit 2 : NACK sent after receiving a data byte */ +#define TWIS_ERRORSRC_DNACK_Pos (2UL) /*!< Position of DNACK field. */ +#define TWIS_ERRORSRC_DNACK_Msk (0x1UL << TWIS_ERRORSRC_DNACK_Pos) /*!< Bit mask of DNACK field. */ +#define TWIS_ERRORSRC_DNACK_NotReceived (0UL) /*!< Error did not occur */ +#define TWIS_ERRORSRC_DNACK_Received (1UL) /*!< Error occurred */ + +/* Bit 0 : RX buffer overflow detected, and prevented */ +#define TWIS_ERRORSRC_OVERFLOW_Pos (0UL) /*!< Position of OVERFLOW field. */ +#define TWIS_ERRORSRC_OVERFLOW_Msk (0x1UL << TWIS_ERRORSRC_OVERFLOW_Pos) /*!< Bit mask of OVERFLOW field. */ +#define TWIS_ERRORSRC_OVERFLOW_NotDetected (0UL) /*!< Error did not occur */ +#define TWIS_ERRORSRC_OVERFLOW_Detected (1UL) /*!< Error occurred */ + +/* Register: TWIS_MATCH */ +/* Description: Status register indicating which address had a match */ + +/* Bit 0 : Which of the addresses in {ADDRESS} matched the incoming address */ +#define TWIS_MATCH_MATCH_Pos (0UL) /*!< Position of MATCH field. */ +#define TWIS_MATCH_MATCH_Msk (0x1UL << TWIS_MATCH_MATCH_Pos) /*!< Bit mask of MATCH field. */ + +/* Register: TWIS_ENABLE */ +/* Description: Enable TWIS */ + +/* Bits 3..0 : Enable or disable TWIS */ +#define TWIS_ENABLE_ENABLE_Pos (0UL) /*!< Position of ENABLE field. */ +#define TWIS_ENABLE_ENABLE_Msk (0xFUL << TWIS_ENABLE_ENABLE_Pos) /*!< Bit mask of ENABLE field. */ +#define TWIS_ENABLE_ENABLE_Disabled (0UL) /*!< Disable TWIS */ +#define TWIS_ENABLE_ENABLE_Enabled (9UL) /*!< Enable TWIS */ + +/* Register: TWIS_PSEL_SCL */ +/* Description: Pin select for SCL signal */ + +/* Bit 31 : Connection */ +#define TWIS_PSEL_SCL_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define TWIS_PSEL_SCL_CONNECT_Msk (0x1UL << TWIS_PSEL_SCL_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define TWIS_PSEL_SCL_CONNECT_Connected (0UL) /*!< Connect */ +#define TWIS_PSEL_SCL_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define TWIS_PSEL_SCL_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define TWIS_PSEL_SCL_PIN_Msk (0x1FUL << TWIS_PSEL_SCL_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: TWIS_PSEL_SDA */ +/* Description: Pin select for SDA signal */ + +/* Bit 31 : Connection */ +#define TWIS_PSEL_SDA_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define TWIS_PSEL_SDA_CONNECT_Msk (0x1UL << TWIS_PSEL_SDA_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define TWIS_PSEL_SDA_CONNECT_Connected (0UL) /*!< Connect */ +#define TWIS_PSEL_SDA_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define TWIS_PSEL_SDA_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define TWIS_PSEL_SDA_PIN_Msk (0x1FUL << TWIS_PSEL_SDA_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: TWIS_RXD_PTR */ +/* Description: RXD Data pointer */ + +/* Bits 31..0 : RXD Data pointer */ +#define TWIS_RXD_PTR_PTR_Pos (0UL) /*!< Position of PTR field. */ +#define TWIS_RXD_PTR_PTR_Msk (0xFFFFFFFFUL << TWIS_RXD_PTR_PTR_Pos) /*!< Bit mask of PTR field. */ + +/* Register: TWIS_RXD_MAXCNT */ +/* Description: Maximum number of bytes in RXD buffer */ + +/* Bits 7..0 : Maximum number of bytes in RXD buffer */ +#define TWIS_RXD_MAXCNT_MAXCNT_Pos (0UL) /*!< Position of MAXCNT field. */ +#define TWIS_RXD_MAXCNT_MAXCNT_Msk (0xFFUL << TWIS_RXD_MAXCNT_MAXCNT_Pos) /*!< Bit mask of MAXCNT field. */ + +/* Register: TWIS_RXD_AMOUNT */ +/* Description: Number of bytes transferred in the last RXD transaction */ + +/* Bits 7..0 : Number of bytes transferred in the last RXD transaction */ +#define TWIS_RXD_AMOUNT_AMOUNT_Pos (0UL) /*!< Position of AMOUNT field. */ +#define TWIS_RXD_AMOUNT_AMOUNT_Msk (0xFFUL << TWIS_RXD_AMOUNT_AMOUNT_Pos) /*!< Bit mask of AMOUNT field. */ + +/* Register: TWIS_TXD_PTR */ +/* Description: TXD Data pointer */ + +/* Bits 31..0 : TXD Data pointer */ +#define TWIS_TXD_PTR_PTR_Pos (0UL) /*!< Position of PTR field. */ +#define TWIS_TXD_PTR_PTR_Msk (0xFFFFFFFFUL << TWIS_TXD_PTR_PTR_Pos) /*!< Bit mask of PTR field. */ + +/* Register: TWIS_TXD_MAXCNT */ +/* Description: Maximum number of bytes in TXD buffer */ + +/* Bits 7..0 : Maximum number of bytes in TXD buffer */ +#define TWIS_TXD_MAXCNT_MAXCNT_Pos (0UL) /*!< Position of MAXCNT field. */ +#define TWIS_TXD_MAXCNT_MAXCNT_Msk (0xFFUL << TWIS_TXD_MAXCNT_MAXCNT_Pos) /*!< Bit mask of MAXCNT field. */ + +/* Register: TWIS_TXD_AMOUNT */ +/* Description: Number of bytes transferred in the last TXD transaction */ + +/* Bits 7..0 : Number of bytes transferred in the last TXD transaction */ +#define TWIS_TXD_AMOUNT_AMOUNT_Pos (0UL) /*!< Position of AMOUNT field. */ +#define TWIS_TXD_AMOUNT_AMOUNT_Msk (0xFFUL << TWIS_TXD_AMOUNT_AMOUNT_Pos) /*!< Bit mask of AMOUNT field. */ + +/* Register: TWIS_ADDRESS */ +/* Description: Description collection[0]: TWI slave address 0 */ + +/* Bits 6..0 : TWI slave address */ +#define TWIS_ADDRESS_ADDRESS_Pos (0UL) /*!< Position of ADDRESS field. */ +#define TWIS_ADDRESS_ADDRESS_Msk (0x7FUL << TWIS_ADDRESS_ADDRESS_Pos) /*!< Bit mask of ADDRESS field. */ + +/* Register: TWIS_CONFIG */ +/* Description: Configuration register for the address match mechanism */ + +/* Bit 1 : Enable or disable address matching on ADDRESS[1] */ +#define TWIS_CONFIG_ADDRESS1_Pos (1UL) /*!< Position of ADDRESS1 field. */ +#define TWIS_CONFIG_ADDRESS1_Msk (0x1UL << TWIS_CONFIG_ADDRESS1_Pos) /*!< Bit mask of ADDRESS1 field. */ +#define TWIS_CONFIG_ADDRESS1_Disabled (0UL) /*!< Disabled */ +#define TWIS_CONFIG_ADDRESS1_Enabled (1UL) /*!< Enabled */ + +/* Bit 0 : Enable or disable address matching on ADDRESS[0] */ +#define TWIS_CONFIG_ADDRESS0_Pos (0UL) /*!< Position of ADDRESS0 field. */ +#define TWIS_CONFIG_ADDRESS0_Msk (0x1UL << TWIS_CONFIG_ADDRESS0_Pos) /*!< Bit mask of ADDRESS0 field. */ +#define TWIS_CONFIG_ADDRESS0_Disabled (0UL) /*!< Disabled */ +#define TWIS_CONFIG_ADDRESS0_Enabled (1UL) /*!< Enabled */ + +/* Register: TWIS_ORC */ +/* Description: Over-read character. Character sent out in case of an over-read of the transmit buffer. */ + +/* Bits 7..0 : Over-read character. Character sent out in case of an over-read of the transmit buffer. */ +#define TWIS_ORC_ORC_Pos (0UL) /*!< Position of ORC field. */ +#define TWIS_ORC_ORC_Msk (0xFFUL << TWIS_ORC_ORC_Pos) /*!< Bit mask of ORC field. */ + + +/* Peripheral: UART */ +/* Description: Universal Asynchronous Receiver/Transmitter */ + +/* Register: UART_SHORTS */ +/* Description: Shortcut register */ + +/* 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) /*!< Disable shortcut */ +#define UART_SHORTS_NCTS_STOPRX_Enabled (1UL) /*!< Enable shortcut */ + +/* 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) /*!< Disable shortcut */ +#define UART_SHORTS_CTS_STARTRX_Enabled (1UL) /*!< Enable shortcut */ + +/* Register: UART_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 17 : Write '1' to Enable interrupt for RXTO event */ +#define UART_INTENSET_RXTO_Pos (17UL) /*!< Position of RXTO field. */ +#define UART_INTENSET_RXTO_Msk (0x1UL << UART_INTENSET_RXTO_Pos) /*!< Bit mask of RXTO field. */ +#define UART_INTENSET_RXTO_Disabled (0UL) /*!< Read: Disabled */ +#define UART_INTENSET_RXTO_Enabled (1UL) /*!< Read: Enabled */ +#define UART_INTENSET_RXTO_Set (1UL) /*!< Enable */ + +/* Bit 9 : Write '1' to Enable interrupt for ERROR event */ +#define UART_INTENSET_ERROR_Pos (9UL) /*!< Position of ERROR field. */ +#define UART_INTENSET_ERROR_Msk (0x1UL << UART_INTENSET_ERROR_Pos) /*!< Bit mask of ERROR field. */ +#define UART_INTENSET_ERROR_Disabled (0UL) /*!< Read: Disabled */ +#define UART_INTENSET_ERROR_Enabled (1UL) /*!< Read: Enabled */ +#define UART_INTENSET_ERROR_Set (1UL) /*!< Enable */ + +/* Bit 7 : Write '1' to Enable interrupt for TXDRDY event */ +#define UART_INTENSET_TXDRDY_Pos (7UL) /*!< Position of TXDRDY field. */ +#define UART_INTENSET_TXDRDY_Msk (0x1UL << UART_INTENSET_TXDRDY_Pos) /*!< Bit mask of TXDRDY field. */ +#define UART_INTENSET_TXDRDY_Disabled (0UL) /*!< Read: Disabled */ +#define UART_INTENSET_TXDRDY_Enabled (1UL) /*!< Read: Enabled */ +#define UART_INTENSET_TXDRDY_Set (1UL) /*!< Enable */ + +/* Bit 2 : Write '1' to Enable interrupt for RXDRDY event */ +#define UART_INTENSET_RXDRDY_Pos (2UL) /*!< Position of RXDRDY field. */ +#define UART_INTENSET_RXDRDY_Msk (0x1UL << UART_INTENSET_RXDRDY_Pos) /*!< Bit mask of RXDRDY field. */ +#define UART_INTENSET_RXDRDY_Disabled (0UL) /*!< Read: Disabled */ +#define UART_INTENSET_RXDRDY_Enabled (1UL) /*!< Read: Enabled */ +#define UART_INTENSET_RXDRDY_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for NCTS event */ +#define UART_INTENSET_NCTS_Pos (1UL) /*!< Position of NCTS field. */ +#define UART_INTENSET_NCTS_Msk (0x1UL << UART_INTENSET_NCTS_Pos) /*!< Bit mask of NCTS field. */ +#define UART_INTENSET_NCTS_Disabled (0UL) /*!< Read: Disabled */ +#define UART_INTENSET_NCTS_Enabled (1UL) /*!< Read: Enabled */ +#define UART_INTENSET_NCTS_Set (1UL) /*!< Enable */ + +/* Bit 0 : Write '1' to Enable interrupt for CTS event */ +#define UART_INTENSET_CTS_Pos (0UL) /*!< Position of CTS field. */ +#define UART_INTENSET_CTS_Msk (0x1UL << UART_INTENSET_CTS_Pos) /*!< Bit mask of CTS field. */ +#define UART_INTENSET_CTS_Disabled (0UL) /*!< Read: Disabled */ +#define UART_INTENSET_CTS_Enabled (1UL) /*!< Read: Enabled */ +#define UART_INTENSET_CTS_Set (1UL) /*!< Enable */ + +/* Register: UART_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 17 : Write '1' to Disable interrupt for RXTO event */ +#define UART_INTENCLR_RXTO_Pos (17UL) /*!< Position of RXTO field. */ +#define UART_INTENCLR_RXTO_Msk (0x1UL << UART_INTENCLR_RXTO_Pos) /*!< Bit mask of RXTO field. */ +#define UART_INTENCLR_RXTO_Disabled (0UL) /*!< Read: Disabled */ +#define UART_INTENCLR_RXTO_Enabled (1UL) /*!< Read: Enabled */ +#define UART_INTENCLR_RXTO_Clear (1UL) /*!< Disable */ + +/* Bit 9 : Write '1' to Disable interrupt for ERROR event */ +#define UART_INTENCLR_ERROR_Pos (9UL) /*!< Position of ERROR field. */ +#define UART_INTENCLR_ERROR_Msk (0x1UL << UART_INTENCLR_ERROR_Pos) /*!< Bit mask of ERROR field. */ +#define UART_INTENCLR_ERROR_Disabled (0UL) /*!< Read: Disabled */ +#define UART_INTENCLR_ERROR_Enabled (1UL) /*!< Read: Enabled */ +#define UART_INTENCLR_ERROR_Clear (1UL) /*!< Disable */ + +/* Bit 7 : Write '1' to Disable interrupt for TXDRDY event */ +#define UART_INTENCLR_TXDRDY_Pos (7UL) /*!< Position of TXDRDY field. */ +#define UART_INTENCLR_TXDRDY_Msk (0x1UL << UART_INTENCLR_TXDRDY_Pos) /*!< Bit mask of TXDRDY field. */ +#define UART_INTENCLR_TXDRDY_Disabled (0UL) /*!< Read: Disabled */ +#define UART_INTENCLR_TXDRDY_Enabled (1UL) /*!< Read: Enabled */ +#define UART_INTENCLR_TXDRDY_Clear (1UL) /*!< Disable */ + +/* Bit 2 : Write '1' to Disable interrupt for RXDRDY event */ +#define UART_INTENCLR_RXDRDY_Pos (2UL) /*!< Position of RXDRDY field. */ +#define UART_INTENCLR_RXDRDY_Msk (0x1UL << UART_INTENCLR_RXDRDY_Pos) /*!< Bit mask of RXDRDY field. */ +#define UART_INTENCLR_RXDRDY_Disabled (0UL) /*!< Read: Disabled */ +#define UART_INTENCLR_RXDRDY_Enabled (1UL) /*!< Read: Enabled */ +#define UART_INTENCLR_RXDRDY_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for NCTS event */ +#define UART_INTENCLR_NCTS_Pos (1UL) /*!< Position of NCTS field. */ +#define UART_INTENCLR_NCTS_Msk (0x1UL << UART_INTENCLR_NCTS_Pos) /*!< Bit mask of NCTS field. */ +#define UART_INTENCLR_NCTS_Disabled (0UL) /*!< Read: Disabled */ +#define UART_INTENCLR_NCTS_Enabled (1UL) /*!< Read: Enabled */ +#define UART_INTENCLR_NCTS_Clear (1UL) /*!< Disable */ + +/* Bit 0 : Write '1' to Disable interrupt for CTS event */ +#define UART_INTENCLR_CTS_Pos (0UL) /*!< Position of CTS field. */ +#define UART_INTENCLR_CTS_Msk (0x1UL << UART_INTENCLR_CTS_Pos) /*!< Bit mask of CTS field. */ +#define UART_INTENCLR_CTS_Disabled (0UL) /*!< Read: Disabled */ +#define UART_INTENCLR_CTS_Enabled (1UL) /*!< Read: Enabled */ +#define UART_INTENCLR_CTS_Clear (1UL) /*!< Disable */ + +/* Register: UART_ERRORSRC */ +/* Description: Error source */ + +/* Bit 3 : Break condition */ +#define UART_ERRORSRC_BREAK_Pos (3UL) /*!< Position of BREAK field. */ +#define UART_ERRORSRC_BREAK_Msk (0x1UL << UART_ERRORSRC_BREAK_Pos) /*!< Bit mask of BREAK field. */ +#define UART_ERRORSRC_BREAK_NotPresent (0UL) /*!< Read: error not present */ +#define UART_ERRORSRC_BREAK_Present (1UL) /*!< Read: error present */ + +/* Bit 2 : Framing error occurred */ +#define UART_ERRORSRC_FRAMING_Pos (2UL) /*!< Position of FRAMING field. */ +#define UART_ERRORSRC_FRAMING_Msk (0x1UL << UART_ERRORSRC_FRAMING_Pos) /*!< Bit mask of FRAMING field. */ +#define UART_ERRORSRC_FRAMING_NotPresent (0UL) /*!< Read: error not present */ +#define UART_ERRORSRC_FRAMING_Present (1UL) /*!< Read: error present */ + +/* Bit 1 : Parity error */ +#define UART_ERRORSRC_PARITY_Pos (1UL) /*!< Position of PARITY field. */ +#define UART_ERRORSRC_PARITY_Msk (0x1UL << UART_ERRORSRC_PARITY_Pos) /*!< Bit mask of PARITY field. */ +#define UART_ERRORSRC_PARITY_NotPresent (0UL) /*!< Read: error not present */ +#define UART_ERRORSRC_PARITY_Present (1UL) /*!< Read: error present */ + +/* Bit 0 : Overrun error */ +#define UART_ERRORSRC_OVERRUN_Pos (0UL) /*!< Position of OVERRUN field. */ +#define UART_ERRORSRC_OVERRUN_Msk (0x1UL << UART_ERRORSRC_OVERRUN_Pos) /*!< Bit mask of OVERRUN field. */ +#define UART_ERRORSRC_OVERRUN_NotPresent (0UL) /*!< Read: error not present */ +#define UART_ERRORSRC_OVERRUN_Present (1UL) /*!< Read: error present */ + +/* Register: UART_ENABLE */ +/* Description: Enable UART */ + +/* Bits 3..0 : Enable or disable UART */ +#define UART_ENABLE_ENABLE_Pos (0UL) /*!< Position of ENABLE field. */ +#define UART_ENABLE_ENABLE_Msk (0xFUL << UART_ENABLE_ENABLE_Pos) /*!< Bit mask of ENABLE field. */ +#define UART_ENABLE_ENABLE_Disabled (0UL) /*!< Disable UART */ +#define UART_ENABLE_ENABLE_Enabled (4UL) /*!< Enable UART */ + +/* Register: UART_PSELRTS */ +/* Description: Pin select for RTS */ + +/* Bits 31..0 : Pin number configuration for UART RTS signal */ +#define UART_PSELRTS_PSELRTS_Pos (0UL) /*!< Position of PSELRTS field. */ +#define UART_PSELRTS_PSELRTS_Msk (0xFFFFFFFFUL << UART_PSELRTS_PSELRTS_Pos) /*!< Bit mask of PSELRTS field. */ +#define UART_PSELRTS_PSELRTS_Disconnected (0xFFFFFFFFUL) /*!< Disconnect */ + +/* Register: UART_PSELTXD */ +/* Description: Pin select for TXD */ + +/* Bits 31..0 : Pin number configuration for UART TXD signal */ +#define UART_PSELTXD_PSELTXD_Pos (0UL) /*!< Position of PSELTXD field. */ +#define UART_PSELTXD_PSELTXD_Msk (0xFFFFFFFFUL << UART_PSELTXD_PSELTXD_Pos) /*!< Bit mask of PSELTXD field. */ +#define UART_PSELTXD_PSELTXD_Disconnected (0xFFFFFFFFUL) /*!< Disconnect */ + +/* Register: UART_PSELCTS */ +/* Description: Pin select for CTS */ + +/* Bits 31..0 : Pin number configuration for UART CTS signal */ +#define UART_PSELCTS_PSELCTS_Pos (0UL) /*!< Position of PSELCTS field. */ +#define UART_PSELCTS_PSELCTS_Msk (0xFFFFFFFFUL << UART_PSELCTS_PSELCTS_Pos) /*!< Bit mask of PSELCTS field. */ +#define UART_PSELCTS_PSELCTS_Disconnected (0xFFFFFFFFUL) /*!< Disconnect */ + +/* Register: UART_PSELRXD */ +/* Description: Pin select for RXD */ + +/* Bits 31..0 : Pin number configuration for UART RXD signal */ +#define UART_PSELRXD_PSELRXD_Pos (0UL) /*!< Position of PSELRXD field. */ +#define UART_PSELRXD_PSELRXD_Msk (0xFFFFFFFFUL << UART_PSELRXD_PSELRXD_Pos) /*!< Bit mask of PSELRXD field. */ +#define UART_PSELRXD_PSELRXD_Disconnected (0xFFFFFFFFUL) /*!< Disconnect */ + +/* Register: UART_RXD */ +/* Description: RXD register */ + +/* Bits 7..0 : RX data received in previous transfers, double buffered */ +#define UART_RXD_RXD_Pos (0UL) /*!< Position of RXD field. */ +#define UART_RXD_RXD_Msk (0xFFUL << UART_RXD_RXD_Pos) /*!< Bit mask of RXD field. */ + +/* Register: UART_TXD */ +/* Description: TXD register */ + +/* Bits 7..0 : TX data to be transferred */ +#define UART_TXD_TXD_Pos (0UL) /*!< Position of TXD field. */ +#define UART_TXD_TXD_Msk (0xFFUL << UART_TXD_TXD_Pos) /*!< Bit mask of TXD field. */ + +/* Register: UART_BAUDRATE */ +/* Description: Baud rate */ + +/* Bits 31..0 : Baud-rate */ +#define UART_BAUDRATE_BAUDRATE_Pos (0UL) /*!< Position of BAUDRATE field. */ +#define UART_BAUDRATE_BAUDRATE_Msk (0xFFFFFFFFUL << UART_BAUDRATE_BAUDRATE_Pos) /*!< Bit mask of BAUDRATE field. */ +#define UART_BAUDRATE_BAUDRATE_Baud1200 (0x0004F000UL) /*!< 1200 baud (actual rate: 1205) */ +#define UART_BAUDRATE_BAUDRATE_Baud2400 (0x0009D000UL) /*!< 2400 baud (actual rate: 2396) */ +#define UART_BAUDRATE_BAUDRATE_Baud4800 (0x0013B000UL) /*!< 4800 baud (actual rate: 4808) */ +#define UART_BAUDRATE_BAUDRATE_Baud9600 (0x00275000UL) /*!< 9600 baud (actual rate: 9598) */ +#define UART_BAUDRATE_BAUDRATE_Baud14400 (0x003B0000UL) /*!< 14400 baud (actual rate: 14414) */ +#define UART_BAUDRATE_BAUDRATE_Baud19200 (0x004EA000UL) /*!< 19200 baud (actual rate: 19208) */ +#define UART_BAUDRATE_BAUDRATE_Baud28800 (0x0075F000UL) /*!< 28800 baud (actual rate: 28829) */ +#define UART_BAUDRATE_BAUDRATE_Baud38400 (0x009D5000UL) /*!< 38400 baud (actual rate: 38462) */ +#define UART_BAUDRATE_BAUDRATE_Baud57600 (0x00EBF000UL) /*!< 57600 baud (actual rate: 57762) */ +#define UART_BAUDRATE_BAUDRATE_Baud76800 (0x013A9000UL) /*!< 76800 baud (actual rate: 76923) */ +#define UART_BAUDRATE_BAUDRATE_Baud115200 (0x01D7E000UL) /*!< 115200 baud (actual rate: 115942) */ +#define UART_BAUDRATE_BAUDRATE_Baud230400 (0x03AFB000UL) /*!< 230400 baud (actual rate: 231884) */ +#define UART_BAUDRATE_BAUDRATE_Baud250000 (0x04000000UL) /*!< 250000 baud */ +#define UART_BAUDRATE_BAUDRATE_Baud460800 (0x075F7000UL) /*!< 460800 baud (actual rate: 470588) */ +#define UART_BAUDRATE_BAUDRATE_Baud921600 (0x0EBED000UL) /*!< 921600 baud (actual rate: 941176) */ +#define UART_BAUDRATE_BAUDRATE_Baud1M (0x10000000UL) /*!< 1Mega baud */ + +/* Register: UART_CONFIG */ +/* Description: Configuration of parity and hardware flow control */ + +/* Bits 3..1 : Parity */ +#define UART_CONFIG_PARITY_Pos (1UL) /*!< Position of PARITY field. */ +#define UART_CONFIG_PARITY_Msk (0x7UL << UART_CONFIG_PARITY_Pos) /*!< Bit mask of PARITY field. */ +#define UART_CONFIG_PARITY_Excluded (0x0UL) /*!< Exclude parity bit */ +#define UART_CONFIG_PARITY_Included (0x7UL) /*!< Include parity bit */ + +/* Bit 0 : Hardware flow control */ +#define UART_CONFIG_HWFC_Pos (0UL) /*!< Position of HWFC field. */ +#define UART_CONFIG_HWFC_Msk (0x1UL << UART_CONFIG_HWFC_Pos) /*!< Bit mask of HWFC field. */ +#define UART_CONFIG_HWFC_Disabled (0UL) /*!< Disabled */ +#define UART_CONFIG_HWFC_Enabled (1UL) /*!< Enabled */ + + +/* Peripheral: UARTE */ +/* Description: UART with EasyDMA */ + +/* Register: UARTE_SHORTS */ +/* Description: Shortcut register */ + +/* Bit 6 : Shortcut between ENDRX event and STOPRX task */ +#define UARTE_SHORTS_ENDRX_STOPRX_Pos (6UL) /*!< Position of ENDRX_STOPRX field. */ +#define UARTE_SHORTS_ENDRX_STOPRX_Msk (0x1UL << UARTE_SHORTS_ENDRX_STOPRX_Pos) /*!< Bit mask of ENDRX_STOPRX field. */ +#define UARTE_SHORTS_ENDRX_STOPRX_Disabled (0UL) /*!< Disable shortcut */ +#define UARTE_SHORTS_ENDRX_STOPRX_Enabled (1UL) /*!< Enable shortcut */ + +/* Bit 5 : Shortcut between ENDRX event and STARTRX task */ +#define UARTE_SHORTS_ENDRX_STARTRX_Pos (5UL) /*!< Position of ENDRX_STARTRX field. */ +#define UARTE_SHORTS_ENDRX_STARTRX_Msk (0x1UL << UARTE_SHORTS_ENDRX_STARTRX_Pos) /*!< Bit mask of ENDRX_STARTRX field. */ +#define UARTE_SHORTS_ENDRX_STARTRX_Disabled (0UL) /*!< Disable shortcut */ +#define UARTE_SHORTS_ENDRX_STARTRX_Enabled (1UL) /*!< Enable shortcut */ + +/* Register: UARTE_INTEN */ +/* Description: Enable or disable interrupt */ + +/* Bit 22 : Enable or disable interrupt for TXSTOPPED event */ +#define UARTE_INTEN_TXSTOPPED_Pos (22UL) /*!< Position of TXSTOPPED field. */ +#define UARTE_INTEN_TXSTOPPED_Msk (0x1UL << UARTE_INTEN_TXSTOPPED_Pos) /*!< Bit mask of TXSTOPPED field. */ +#define UARTE_INTEN_TXSTOPPED_Disabled (0UL) /*!< Disable */ +#define UARTE_INTEN_TXSTOPPED_Enabled (1UL) /*!< Enable */ + +/* Bit 20 : Enable or disable interrupt for TXSTARTED event */ +#define UARTE_INTEN_TXSTARTED_Pos (20UL) /*!< Position of TXSTARTED field. */ +#define UARTE_INTEN_TXSTARTED_Msk (0x1UL << UARTE_INTEN_TXSTARTED_Pos) /*!< Bit mask of TXSTARTED field. */ +#define UARTE_INTEN_TXSTARTED_Disabled (0UL) /*!< Disable */ +#define UARTE_INTEN_TXSTARTED_Enabled (1UL) /*!< Enable */ + +/* Bit 19 : Enable or disable interrupt for RXSTARTED event */ +#define UARTE_INTEN_RXSTARTED_Pos (19UL) /*!< Position of RXSTARTED field. */ +#define UARTE_INTEN_RXSTARTED_Msk (0x1UL << UARTE_INTEN_RXSTARTED_Pos) /*!< Bit mask of RXSTARTED field. */ +#define UARTE_INTEN_RXSTARTED_Disabled (0UL) /*!< Disable */ +#define UARTE_INTEN_RXSTARTED_Enabled (1UL) /*!< Enable */ + +/* Bit 17 : Enable or disable interrupt for RXTO event */ +#define UARTE_INTEN_RXTO_Pos (17UL) /*!< Position of RXTO field. */ +#define UARTE_INTEN_RXTO_Msk (0x1UL << UARTE_INTEN_RXTO_Pos) /*!< Bit mask of RXTO field. */ +#define UARTE_INTEN_RXTO_Disabled (0UL) /*!< Disable */ +#define UARTE_INTEN_RXTO_Enabled (1UL) /*!< Enable */ + +/* Bit 9 : Enable or disable interrupt for ERROR event */ +#define UARTE_INTEN_ERROR_Pos (9UL) /*!< Position of ERROR field. */ +#define UARTE_INTEN_ERROR_Msk (0x1UL << UARTE_INTEN_ERROR_Pos) /*!< Bit mask of ERROR field. */ +#define UARTE_INTEN_ERROR_Disabled (0UL) /*!< Disable */ +#define UARTE_INTEN_ERROR_Enabled (1UL) /*!< Enable */ + +/* Bit 8 : Enable or disable interrupt for ENDTX event */ +#define UARTE_INTEN_ENDTX_Pos (8UL) /*!< Position of ENDTX field. */ +#define UARTE_INTEN_ENDTX_Msk (0x1UL << UARTE_INTEN_ENDTX_Pos) /*!< Bit mask of ENDTX field. */ +#define UARTE_INTEN_ENDTX_Disabled (0UL) /*!< Disable */ +#define UARTE_INTEN_ENDTX_Enabled (1UL) /*!< Enable */ + +/* Bit 4 : Enable or disable interrupt for ENDRX event */ +#define UARTE_INTEN_ENDRX_Pos (4UL) /*!< Position of ENDRX field. */ +#define UARTE_INTEN_ENDRX_Msk (0x1UL << UARTE_INTEN_ENDRX_Pos) /*!< Bit mask of ENDRX field. */ +#define UARTE_INTEN_ENDRX_Disabled (0UL) /*!< Disable */ +#define UARTE_INTEN_ENDRX_Enabled (1UL) /*!< Enable */ + +/* Bit 1 : Enable or disable interrupt for NCTS event */ +#define UARTE_INTEN_NCTS_Pos (1UL) /*!< Position of NCTS field. */ +#define UARTE_INTEN_NCTS_Msk (0x1UL << UARTE_INTEN_NCTS_Pos) /*!< Bit mask of NCTS field. */ +#define UARTE_INTEN_NCTS_Disabled (0UL) /*!< Disable */ +#define UARTE_INTEN_NCTS_Enabled (1UL) /*!< Enable */ + +/* Bit 0 : Enable or disable interrupt for CTS event */ +#define UARTE_INTEN_CTS_Pos (0UL) /*!< Position of CTS field. */ +#define UARTE_INTEN_CTS_Msk (0x1UL << UARTE_INTEN_CTS_Pos) /*!< Bit mask of CTS field. */ +#define UARTE_INTEN_CTS_Disabled (0UL) /*!< Disable */ +#define UARTE_INTEN_CTS_Enabled (1UL) /*!< Enable */ + +/* Register: UARTE_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 22 : Write '1' to Enable interrupt for TXSTOPPED event */ +#define UARTE_INTENSET_TXSTOPPED_Pos (22UL) /*!< Position of TXSTOPPED field. */ +#define UARTE_INTENSET_TXSTOPPED_Msk (0x1UL << UARTE_INTENSET_TXSTOPPED_Pos) /*!< Bit mask of TXSTOPPED field. */ +#define UARTE_INTENSET_TXSTOPPED_Disabled (0UL) /*!< Read: Disabled */ +#define UARTE_INTENSET_TXSTOPPED_Enabled (1UL) /*!< Read: Enabled */ +#define UARTE_INTENSET_TXSTOPPED_Set (1UL) /*!< Enable */ + +/* Bit 20 : Write '1' to Enable interrupt for TXSTARTED event */ +#define UARTE_INTENSET_TXSTARTED_Pos (20UL) /*!< Position of TXSTARTED field. */ +#define UARTE_INTENSET_TXSTARTED_Msk (0x1UL << UARTE_INTENSET_TXSTARTED_Pos) /*!< Bit mask of TXSTARTED field. */ +#define UARTE_INTENSET_TXSTARTED_Disabled (0UL) /*!< Read: Disabled */ +#define UARTE_INTENSET_TXSTARTED_Enabled (1UL) /*!< Read: Enabled */ +#define UARTE_INTENSET_TXSTARTED_Set (1UL) /*!< Enable */ + +/* Bit 19 : Write '1' to Enable interrupt for RXSTARTED event */ +#define UARTE_INTENSET_RXSTARTED_Pos (19UL) /*!< Position of RXSTARTED field. */ +#define UARTE_INTENSET_RXSTARTED_Msk (0x1UL << UARTE_INTENSET_RXSTARTED_Pos) /*!< Bit mask of RXSTARTED field. */ +#define UARTE_INTENSET_RXSTARTED_Disabled (0UL) /*!< Read: Disabled */ +#define UARTE_INTENSET_RXSTARTED_Enabled (1UL) /*!< Read: Enabled */ +#define UARTE_INTENSET_RXSTARTED_Set (1UL) /*!< Enable */ + +/* Bit 17 : Write '1' to Enable interrupt for RXTO event */ +#define UARTE_INTENSET_RXTO_Pos (17UL) /*!< Position of RXTO field. */ +#define UARTE_INTENSET_RXTO_Msk (0x1UL << UARTE_INTENSET_RXTO_Pos) /*!< Bit mask of RXTO field. */ +#define UARTE_INTENSET_RXTO_Disabled (0UL) /*!< Read: Disabled */ +#define UARTE_INTENSET_RXTO_Enabled (1UL) /*!< Read: Enabled */ +#define UARTE_INTENSET_RXTO_Set (1UL) /*!< Enable */ + +/* Bit 9 : Write '1' to Enable interrupt for ERROR event */ +#define UARTE_INTENSET_ERROR_Pos (9UL) /*!< Position of ERROR field. */ +#define UARTE_INTENSET_ERROR_Msk (0x1UL << UARTE_INTENSET_ERROR_Pos) /*!< Bit mask of ERROR field. */ +#define UARTE_INTENSET_ERROR_Disabled (0UL) /*!< Read: Disabled */ +#define UARTE_INTENSET_ERROR_Enabled (1UL) /*!< Read: Enabled */ +#define UARTE_INTENSET_ERROR_Set (1UL) /*!< Enable */ + +/* Bit 8 : Write '1' to Enable interrupt for ENDTX event */ +#define UARTE_INTENSET_ENDTX_Pos (8UL) /*!< Position of ENDTX field. */ +#define UARTE_INTENSET_ENDTX_Msk (0x1UL << UARTE_INTENSET_ENDTX_Pos) /*!< Bit mask of ENDTX field. */ +#define UARTE_INTENSET_ENDTX_Disabled (0UL) /*!< Read: Disabled */ +#define UARTE_INTENSET_ENDTX_Enabled (1UL) /*!< Read: Enabled */ +#define UARTE_INTENSET_ENDTX_Set (1UL) /*!< Enable */ + +/* Bit 4 : Write '1' to Enable interrupt for ENDRX event */ +#define UARTE_INTENSET_ENDRX_Pos (4UL) /*!< Position of ENDRX field. */ +#define UARTE_INTENSET_ENDRX_Msk (0x1UL << UARTE_INTENSET_ENDRX_Pos) /*!< Bit mask of ENDRX field. */ +#define UARTE_INTENSET_ENDRX_Disabled (0UL) /*!< Read: Disabled */ +#define UARTE_INTENSET_ENDRX_Enabled (1UL) /*!< Read: Enabled */ +#define UARTE_INTENSET_ENDRX_Set (1UL) /*!< Enable */ + +/* Bit 1 : Write '1' to Enable interrupt for NCTS event */ +#define UARTE_INTENSET_NCTS_Pos (1UL) /*!< Position of NCTS field. */ +#define UARTE_INTENSET_NCTS_Msk (0x1UL << UARTE_INTENSET_NCTS_Pos) /*!< Bit mask of NCTS field. */ +#define UARTE_INTENSET_NCTS_Disabled (0UL) /*!< Read: Disabled */ +#define UARTE_INTENSET_NCTS_Enabled (1UL) /*!< Read: Enabled */ +#define UARTE_INTENSET_NCTS_Set (1UL) /*!< Enable */ + +/* Bit 0 : Write '1' to Enable interrupt for CTS event */ +#define UARTE_INTENSET_CTS_Pos (0UL) /*!< Position of CTS field. */ +#define UARTE_INTENSET_CTS_Msk (0x1UL << UARTE_INTENSET_CTS_Pos) /*!< Bit mask of CTS field. */ +#define UARTE_INTENSET_CTS_Disabled (0UL) /*!< Read: Disabled */ +#define UARTE_INTENSET_CTS_Enabled (1UL) /*!< Read: Enabled */ +#define UARTE_INTENSET_CTS_Set (1UL) /*!< Enable */ + +/* Register: UARTE_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 22 : Write '1' to Disable interrupt for TXSTOPPED event */ +#define UARTE_INTENCLR_TXSTOPPED_Pos (22UL) /*!< Position of TXSTOPPED field. */ +#define UARTE_INTENCLR_TXSTOPPED_Msk (0x1UL << UARTE_INTENCLR_TXSTOPPED_Pos) /*!< Bit mask of TXSTOPPED field. */ +#define UARTE_INTENCLR_TXSTOPPED_Disabled (0UL) /*!< Read: Disabled */ +#define UARTE_INTENCLR_TXSTOPPED_Enabled (1UL) /*!< Read: Enabled */ +#define UARTE_INTENCLR_TXSTOPPED_Clear (1UL) /*!< Disable */ + +/* Bit 20 : Write '1' to Disable interrupt for TXSTARTED event */ +#define UARTE_INTENCLR_TXSTARTED_Pos (20UL) /*!< Position of TXSTARTED field. */ +#define UARTE_INTENCLR_TXSTARTED_Msk (0x1UL << UARTE_INTENCLR_TXSTARTED_Pos) /*!< Bit mask of TXSTARTED field. */ +#define UARTE_INTENCLR_TXSTARTED_Disabled (0UL) /*!< Read: Disabled */ +#define UARTE_INTENCLR_TXSTARTED_Enabled (1UL) /*!< Read: Enabled */ +#define UARTE_INTENCLR_TXSTARTED_Clear (1UL) /*!< Disable */ + +/* Bit 19 : Write '1' to Disable interrupt for RXSTARTED event */ +#define UARTE_INTENCLR_RXSTARTED_Pos (19UL) /*!< Position of RXSTARTED field. */ +#define UARTE_INTENCLR_RXSTARTED_Msk (0x1UL << UARTE_INTENCLR_RXSTARTED_Pos) /*!< Bit mask of RXSTARTED field. */ +#define UARTE_INTENCLR_RXSTARTED_Disabled (0UL) /*!< Read: Disabled */ +#define UARTE_INTENCLR_RXSTARTED_Enabled (1UL) /*!< Read: Enabled */ +#define UARTE_INTENCLR_RXSTARTED_Clear (1UL) /*!< Disable */ + +/* Bit 17 : Write '1' to Disable interrupt for RXTO event */ +#define UARTE_INTENCLR_RXTO_Pos (17UL) /*!< Position of RXTO field. */ +#define UARTE_INTENCLR_RXTO_Msk (0x1UL << UARTE_INTENCLR_RXTO_Pos) /*!< Bit mask of RXTO field. */ +#define UARTE_INTENCLR_RXTO_Disabled (0UL) /*!< Read: Disabled */ +#define UARTE_INTENCLR_RXTO_Enabled (1UL) /*!< Read: Enabled */ +#define UARTE_INTENCLR_RXTO_Clear (1UL) /*!< Disable */ + +/* Bit 9 : Write '1' to Disable interrupt for ERROR event */ +#define UARTE_INTENCLR_ERROR_Pos (9UL) /*!< Position of ERROR field. */ +#define UARTE_INTENCLR_ERROR_Msk (0x1UL << UARTE_INTENCLR_ERROR_Pos) /*!< Bit mask of ERROR field. */ +#define UARTE_INTENCLR_ERROR_Disabled (0UL) /*!< Read: Disabled */ +#define UARTE_INTENCLR_ERROR_Enabled (1UL) /*!< Read: Enabled */ +#define UARTE_INTENCLR_ERROR_Clear (1UL) /*!< Disable */ + +/* Bit 8 : Write '1' to Disable interrupt for ENDTX event */ +#define UARTE_INTENCLR_ENDTX_Pos (8UL) /*!< Position of ENDTX field. */ +#define UARTE_INTENCLR_ENDTX_Msk (0x1UL << UARTE_INTENCLR_ENDTX_Pos) /*!< Bit mask of ENDTX field. */ +#define UARTE_INTENCLR_ENDTX_Disabled (0UL) /*!< Read: Disabled */ +#define UARTE_INTENCLR_ENDTX_Enabled (1UL) /*!< Read: Enabled */ +#define UARTE_INTENCLR_ENDTX_Clear (1UL) /*!< Disable */ + +/* Bit 4 : Write '1' to Disable interrupt for ENDRX event */ +#define UARTE_INTENCLR_ENDRX_Pos (4UL) /*!< Position of ENDRX field. */ +#define UARTE_INTENCLR_ENDRX_Msk (0x1UL << UARTE_INTENCLR_ENDRX_Pos) /*!< Bit mask of ENDRX field. */ +#define UARTE_INTENCLR_ENDRX_Disabled (0UL) /*!< Read: Disabled */ +#define UARTE_INTENCLR_ENDRX_Enabled (1UL) /*!< Read: Enabled */ +#define UARTE_INTENCLR_ENDRX_Clear (1UL) /*!< Disable */ + +/* Bit 1 : Write '1' to Disable interrupt for NCTS event */ +#define UARTE_INTENCLR_NCTS_Pos (1UL) /*!< Position of NCTS field. */ +#define UARTE_INTENCLR_NCTS_Msk (0x1UL << UARTE_INTENCLR_NCTS_Pos) /*!< Bit mask of NCTS field. */ +#define UARTE_INTENCLR_NCTS_Disabled (0UL) /*!< Read: Disabled */ +#define UARTE_INTENCLR_NCTS_Enabled (1UL) /*!< Read: Enabled */ +#define UARTE_INTENCLR_NCTS_Clear (1UL) /*!< Disable */ + +/* Bit 0 : Write '1' to Disable interrupt for CTS event */ +#define UARTE_INTENCLR_CTS_Pos (0UL) /*!< Position of CTS field. */ +#define UARTE_INTENCLR_CTS_Msk (0x1UL << UARTE_INTENCLR_CTS_Pos) /*!< Bit mask of CTS field. */ +#define UARTE_INTENCLR_CTS_Disabled (0UL) /*!< Read: Disabled */ +#define UARTE_INTENCLR_CTS_Enabled (1UL) /*!< Read: Enabled */ +#define UARTE_INTENCLR_CTS_Clear (1UL) /*!< Disable */ + +/* Register: UARTE_ERRORSRC */ +/* Description: Error source */ + +/* Bit 3 : Break condition */ +#define UARTE_ERRORSRC_BREAK_Pos (3UL) /*!< Position of BREAK field. */ +#define UARTE_ERRORSRC_BREAK_Msk (0x1UL << UARTE_ERRORSRC_BREAK_Pos) /*!< Bit mask of BREAK field. */ +#define UARTE_ERRORSRC_BREAK_NotPresent (0UL) /*!< Read: error not present */ +#define UARTE_ERRORSRC_BREAK_Present (1UL) /*!< Read: error present */ + +/* Bit 2 : Framing error occurred */ +#define UARTE_ERRORSRC_FRAMING_Pos (2UL) /*!< Position of FRAMING field. */ +#define UARTE_ERRORSRC_FRAMING_Msk (0x1UL << UARTE_ERRORSRC_FRAMING_Pos) /*!< Bit mask of FRAMING field. */ +#define UARTE_ERRORSRC_FRAMING_NotPresent (0UL) /*!< Read: error not present */ +#define UARTE_ERRORSRC_FRAMING_Present (1UL) /*!< Read: error present */ + +/* Bit 1 : Parity error */ +#define UARTE_ERRORSRC_PARITY_Pos (1UL) /*!< Position of PARITY field. */ +#define UARTE_ERRORSRC_PARITY_Msk (0x1UL << UARTE_ERRORSRC_PARITY_Pos) /*!< Bit mask of PARITY field. */ +#define UARTE_ERRORSRC_PARITY_NotPresent (0UL) /*!< Read: error not present */ +#define UARTE_ERRORSRC_PARITY_Present (1UL) /*!< Read: error present */ + +/* Bit 0 : Overrun error */ +#define UARTE_ERRORSRC_OVERRUN_Pos (0UL) /*!< Position of OVERRUN field. */ +#define UARTE_ERRORSRC_OVERRUN_Msk (0x1UL << UARTE_ERRORSRC_OVERRUN_Pos) /*!< Bit mask of OVERRUN field. */ +#define UARTE_ERRORSRC_OVERRUN_NotPresent (0UL) /*!< Read: error not present */ +#define UARTE_ERRORSRC_OVERRUN_Present (1UL) /*!< Read: error present */ + +/* Register: UARTE_ENABLE */ +/* Description: Enable UART */ + +/* Bits 3..0 : Enable or disable UARTE */ +#define UARTE_ENABLE_ENABLE_Pos (0UL) /*!< Position of ENABLE field. */ +#define UARTE_ENABLE_ENABLE_Msk (0xFUL << UARTE_ENABLE_ENABLE_Pos) /*!< Bit mask of ENABLE field. */ +#define UARTE_ENABLE_ENABLE_Disabled (0UL) /*!< Disable UARTE */ +#define UARTE_ENABLE_ENABLE_Enabled (8UL) /*!< Enable UARTE */ + +/* Register: UARTE_PSEL_RTS */ +/* Description: Pin select for RTS signal */ + +/* Bit 31 : Connection */ +#define UARTE_PSEL_RTS_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define UARTE_PSEL_RTS_CONNECT_Msk (0x1UL << UARTE_PSEL_RTS_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define UARTE_PSEL_RTS_CONNECT_Connected (0UL) /*!< Connect */ +#define UARTE_PSEL_RTS_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define UARTE_PSEL_RTS_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define UARTE_PSEL_RTS_PIN_Msk (0x1FUL << UARTE_PSEL_RTS_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: UARTE_PSEL_TXD */ +/* Description: Pin select for TXD signal */ + +/* Bit 31 : Connection */ +#define UARTE_PSEL_TXD_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define UARTE_PSEL_TXD_CONNECT_Msk (0x1UL << UARTE_PSEL_TXD_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define UARTE_PSEL_TXD_CONNECT_Connected (0UL) /*!< Connect */ +#define UARTE_PSEL_TXD_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define UARTE_PSEL_TXD_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define UARTE_PSEL_TXD_PIN_Msk (0x1FUL << UARTE_PSEL_TXD_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: UARTE_PSEL_CTS */ +/* Description: Pin select for CTS signal */ + +/* Bit 31 : Connection */ +#define UARTE_PSEL_CTS_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define UARTE_PSEL_CTS_CONNECT_Msk (0x1UL << UARTE_PSEL_CTS_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define UARTE_PSEL_CTS_CONNECT_Connected (0UL) /*!< Connect */ +#define UARTE_PSEL_CTS_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define UARTE_PSEL_CTS_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define UARTE_PSEL_CTS_PIN_Msk (0x1FUL << UARTE_PSEL_CTS_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: UARTE_PSEL_RXD */ +/* Description: Pin select for RXD signal */ + +/* Bit 31 : Connection */ +#define UARTE_PSEL_RXD_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define UARTE_PSEL_RXD_CONNECT_Msk (0x1UL << UARTE_PSEL_RXD_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define UARTE_PSEL_RXD_CONNECT_Connected (0UL) /*!< Connect */ +#define UARTE_PSEL_RXD_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : Pin number */ +#define UARTE_PSEL_RXD_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define UARTE_PSEL_RXD_PIN_Msk (0x1FUL << UARTE_PSEL_RXD_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: UARTE_BAUDRATE */ +/* Description: Baud rate */ + +/* Bits 31..0 : Baud-rate */ +#define UARTE_BAUDRATE_BAUDRATE_Pos (0UL) /*!< Position of BAUDRATE field. */ +#define UARTE_BAUDRATE_BAUDRATE_Msk (0xFFFFFFFFUL << UARTE_BAUDRATE_BAUDRATE_Pos) /*!< Bit mask of BAUDRATE field. */ +#define UARTE_BAUDRATE_BAUDRATE_Baud1200 (0x0004F000UL) /*!< 1200 baud (actual rate: 1205) */ +#define UARTE_BAUDRATE_BAUDRATE_Baud2400 (0x0009D000UL) /*!< 2400 baud (actual rate: 2396) */ +#define UARTE_BAUDRATE_BAUDRATE_Baud4800 (0x0013B000UL) /*!< 4800 baud (actual rate: 4808) */ +#define UARTE_BAUDRATE_BAUDRATE_Baud9600 (0x00275000UL) /*!< 9600 baud (actual rate: 9598) */ +#define UARTE_BAUDRATE_BAUDRATE_Baud14400 (0x003AF000UL) /*!< 14400 baud (actual rate: 14401) */ +#define UARTE_BAUDRATE_BAUDRATE_Baud19200 (0x004EA000UL) /*!< 19200 baud (actual rate: 19208) */ +#define UARTE_BAUDRATE_BAUDRATE_Baud28800 (0x0075C000UL) /*!< 28800 baud (actual rate: 28777) */ +#define UARTE_BAUDRATE_BAUDRATE_Baud38400 (0x009D0000UL) /*!< 38400 baud (actual rate: 38369) */ +#define UARTE_BAUDRATE_BAUDRATE_Baud57600 (0x00EB0000UL) /*!< 57600 baud (actual rate: 57554) */ +#define UARTE_BAUDRATE_BAUDRATE_Baud76800 (0x013A9000UL) /*!< 76800 baud (actual rate: 76923) */ +#define UARTE_BAUDRATE_BAUDRATE_Baud115200 (0x01D60000UL) /*!< 115200 baud (actual rate: 115108) */ +#define UARTE_BAUDRATE_BAUDRATE_Baud230400 (0x03B00000UL) /*!< 230400 baud (actual rate: 231884) */ +#define UARTE_BAUDRATE_BAUDRATE_Baud250000 (0x04000000UL) /*!< 250000 baud */ +#define UARTE_BAUDRATE_BAUDRATE_Baud460800 (0x07400000UL) /*!< 460800 baud (actual rate: 457143) */ +#define UARTE_BAUDRATE_BAUDRATE_Baud921600 (0x0F000000UL) /*!< 921600 baud (actual rate: 941176) */ +#define UARTE_BAUDRATE_BAUDRATE_Baud1M (0x10000000UL) /*!< 1Mega baud */ + +/* Register: UARTE_RXD_PTR */ +/* Description: Data pointer */ + +/* Bits 31..0 : Data pointer */ +#define UARTE_RXD_PTR_PTR_Pos (0UL) /*!< Position of PTR field. */ +#define UARTE_RXD_PTR_PTR_Msk (0xFFFFFFFFUL << UARTE_RXD_PTR_PTR_Pos) /*!< Bit mask of PTR field. */ + +/* Register: UARTE_RXD_MAXCNT */ +/* Description: Maximum number of bytes in receive buffer */ + +/* Bits 7..0 : Maximum number of bytes in receive buffer */ +#define UARTE_RXD_MAXCNT_MAXCNT_Pos (0UL) /*!< Position of MAXCNT field. */ +#define UARTE_RXD_MAXCNT_MAXCNT_Msk (0xFFUL << UARTE_RXD_MAXCNT_MAXCNT_Pos) /*!< Bit mask of MAXCNT field. */ + +/* Register: UARTE_RXD_AMOUNT */ +/* Description: Number of bytes transferred in the last transaction */ + +/* Bits 7..0 : Number of bytes transferred in the last transaction */ +#define UARTE_RXD_AMOUNT_AMOUNT_Pos (0UL) /*!< Position of AMOUNT field. */ +#define UARTE_RXD_AMOUNT_AMOUNT_Msk (0xFFUL << UARTE_RXD_AMOUNT_AMOUNT_Pos) /*!< Bit mask of AMOUNT field. */ + +/* Register: UARTE_TXD_PTR */ +/* Description: Data pointer */ + +/* Bits 31..0 : Data pointer */ +#define UARTE_TXD_PTR_PTR_Pos (0UL) /*!< Position of PTR field. */ +#define UARTE_TXD_PTR_PTR_Msk (0xFFFFFFFFUL << UARTE_TXD_PTR_PTR_Pos) /*!< Bit mask of PTR field. */ + +/* Register: UARTE_TXD_MAXCNT */ +/* Description: Maximum number of bytes in transmit buffer */ + +/* Bits 7..0 : Maximum number of bytes in transmit buffer */ +#define UARTE_TXD_MAXCNT_MAXCNT_Pos (0UL) /*!< Position of MAXCNT field. */ +#define UARTE_TXD_MAXCNT_MAXCNT_Msk (0xFFUL << UARTE_TXD_MAXCNT_MAXCNT_Pos) /*!< Bit mask of MAXCNT field. */ + +/* Register: UARTE_TXD_AMOUNT */ +/* Description: Number of bytes transferred in the last transaction */ + +/* Bits 7..0 : Number of bytes transferred in the last transaction */ +#define UARTE_TXD_AMOUNT_AMOUNT_Pos (0UL) /*!< Position of AMOUNT field. */ +#define UARTE_TXD_AMOUNT_AMOUNT_Msk (0xFFUL << UARTE_TXD_AMOUNT_AMOUNT_Pos) /*!< Bit mask of AMOUNT field. */ + +/* Register: UARTE_CONFIG */ +/* Description: Configuration of parity and hardware flow control */ + +/* Bits 3..1 : Parity */ +#define UARTE_CONFIG_PARITY_Pos (1UL) /*!< Position of PARITY field. */ +#define UARTE_CONFIG_PARITY_Msk (0x7UL << UARTE_CONFIG_PARITY_Pos) /*!< Bit mask of PARITY field. */ +#define UARTE_CONFIG_PARITY_Excluded (0x0UL) /*!< Exclude parity bit */ +#define UARTE_CONFIG_PARITY_Included (0x7UL) /*!< Include parity bit */ + +/* Bit 0 : Hardware flow control */ +#define UARTE_CONFIG_HWFC_Pos (0UL) /*!< Position of HWFC field. */ +#define UARTE_CONFIG_HWFC_Msk (0x1UL << UARTE_CONFIG_HWFC_Pos) /*!< Bit mask of HWFC field. */ +#define UARTE_CONFIG_HWFC_Disabled (0UL) /*!< Disabled */ +#define UARTE_CONFIG_HWFC_Enabled (1UL) /*!< Enabled */ + + +/* Peripheral: UICR */ +/* Description: User Information Configuration Registers */ + +/* Register: UICR_NRFFW */ +/* Description: Description collection[0]: Reserved for Nordic firmware design */ + +/* Bits 31..0 : Reserved for Nordic firmware design */ +#define UICR_NRFFW_NRFFW_Pos (0UL) /*!< Position of NRFFW field. */ +#define UICR_NRFFW_NRFFW_Msk (0xFFFFFFFFUL << UICR_NRFFW_NRFFW_Pos) /*!< Bit mask of NRFFW field. */ + +/* Register: UICR_NRFHW */ +/* Description: Description collection[0]: Reserved for Nordic hardware design */ + +/* Bits 31..0 : Reserved for Nordic hardware design */ +#define UICR_NRFHW_NRFHW_Pos (0UL) /*!< Position of NRFHW field. */ +#define UICR_NRFHW_NRFHW_Msk (0xFFFFFFFFUL << UICR_NRFHW_NRFHW_Pos) /*!< Bit mask of NRFHW field. */ + +/* Register: UICR_CUSTOMER */ +/* Description: Description collection[0]: Reserved for customer */ + +/* Bits 31..0 : Reserved for customer */ +#define UICR_CUSTOMER_CUSTOMER_Pos (0UL) /*!< Position of CUSTOMER field. */ +#define UICR_CUSTOMER_CUSTOMER_Msk (0xFFFFFFFFUL << UICR_CUSTOMER_CUSTOMER_Pos) /*!< Bit mask of CUSTOMER field. */ + +/* Register: UICR_PSELRESET */ +/* Description: Description collection[0]: Mapping of the nRESET function (see POWER chapter for details) */ + +/* Bit 31 : Connection */ +#define UICR_PSELRESET_CONNECT_Pos (31UL) /*!< Position of CONNECT field. */ +#define UICR_PSELRESET_CONNECT_Msk (0x1UL << UICR_PSELRESET_CONNECT_Pos) /*!< Bit mask of CONNECT field. */ +#define UICR_PSELRESET_CONNECT_Connected (0UL) /*!< Connect */ +#define UICR_PSELRESET_CONNECT_Disconnected (1UL) /*!< Disconnect */ + +/* Bits 4..0 : GPIO number P0.n onto which Reset is exposed */ +#define UICR_PSELRESET_PIN_Pos (0UL) /*!< Position of PIN field. */ +#define UICR_PSELRESET_PIN_Msk (0x1FUL << UICR_PSELRESET_PIN_Pos) /*!< Bit mask of PIN field. */ + +/* Register: UICR_APPROTECT */ +/* Description: Access Port protection */ + +/* Bits 7..0 : Enable or disable Access Port protection. */ +#define UICR_APPROTECT_PALL_Pos (0UL) /*!< Position of PALL field. */ +#define UICR_APPROTECT_PALL_Msk (0xFFUL << UICR_APPROTECT_PALL_Pos) /*!< Bit mask of PALL field. */ +#define UICR_APPROTECT_PALL_Enabled (0x00UL) /*!< Enable */ +#define UICR_APPROTECT_PALL_Disabled (0xFFUL) /*!< Disable */ + +/* Register: UICR_NFCPINS */ +/* Description: Setting of pins dedicated to NFC functionality: NFC antenna or GPIO */ + +/* Bit 0 : Setting of pins dedicated to NFC functionality */ +#define UICR_NFCPINS_PROTECT_Pos (0UL) /*!< Position of PROTECT field. */ +#define UICR_NFCPINS_PROTECT_Msk (0x1UL << UICR_NFCPINS_PROTECT_Pos) /*!< Bit mask of PROTECT field. */ +#define UICR_NFCPINS_PROTECT_Disabled (0UL) /*!< Operation as GPIO pins. Same protection as normal GPIO pins */ +#define UICR_NFCPINS_PROTECT_NFC (1UL) /*!< Operation as NFC antenna pins. Configures the protection for NFC operation */ + + +/* Peripheral: WDT */ +/* Description: Watchdog Timer */ + +/* Register: WDT_INTENSET */ +/* Description: Enable interrupt */ + +/* Bit 0 : Write '1' to Enable interrupt for TIMEOUT event */ +#define WDT_INTENSET_TIMEOUT_Pos (0UL) /*!< Position of TIMEOUT field. */ +#define WDT_INTENSET_TIMEOUT_Msk (0x1UL << WDT_INTENSET_TIMEOUT_Pos) /*!< Bit mask of TIMEOUT field. */ +#define WDT_INTENSET_TIMEOUT_Disabled (0UL) /*!< Read: Disabled */ +#define WDT_INTENSET_TIMEOUT_Enabled (1UL) /*!< Read: Enabled */ +#define WDT_INTENSET_TIMEOUT_Set (1UL) /*!< Enable */ + +/* Register: WDT_INTENCLR */ +/* Description: Disable interrupt */ + +/* Bit 0 : Write '1' to Disable interrupt for TIMEOUT event */ +#define WDT_INTENCLR_TIMEOUT_Pos (0UL) /*!< Position of TIMEOUT field. */ +#define WDT_INTENCLR_TIMEOUT_Msk (0x1UL << WDT_INTENCLR_TIMEOUT_Pos) /*!< Bit mask of TIMEOUT field. */ +#define WDT_INTENCLR_TIMEOUT_Disabled (0UL) /*!< Read: Disabled */ +#define WDT_INTENCLR_TIMEOUT_Enabled (1UL) /*!< Read: Enabled */ +#define WDT_INTENCLR_TIMEOUT_Clear (1UL) /*!< Disable */ + +/* Register: WDT_RUNSTATUS */ +/* Description: Run status */ + +/* Bit 0 : Indicates whether or not the watchdog is running */ +#define WDT_RUNSTATUS_RUNSTATUS_Pos (0UL) /*!< Position of RUNSTATUS field. */ +#define WDT_RUNSTATUS_RUNSTATUS_Msk (0x1UL << WDT_RUNSTATUS_RUNSTATUS_Pos) /*!< Bit mask of RUNSTATUS field. */ +#define WDT_RUNSTATUS_RUNSTATUS_NotRunning (0UL) /*!< Watchdog not running */ +#define WDT_RUNSTATUS_RUNSTATUS_Running (1UL) /*!< Watchdog is running */ + +/* Register: WDT_REQSTATUS */ +/* Description: Request status */ + +/* Bit 7 : Request status for RR[7] register */ +#define WDT_REQSTATUS_RR7_Pos (7UL) /*!< Position of RR7 field. */ +#define WDT_REQSTATUS_RR7_Msk (0x1UL << WDT_REQSTATUS_RR7_Pos) /*!< Bit mask of RR7 field. */ +#define WDT_REQSTATUS_RR7_DisabledOrRequested (0UL) /*!< RR[7] register is not enabled, or are already requesting reload */ +#define WDT_REQSTATUS_RR7_EnabledAndUnrequested (1UL) /*!< RR[7] register is enabled, and are not yet requesting reload */ + +/* Bit 6 : Request status for RR[6] register */ +#define WDT_REQSTATUS_RR6_Pos (6UL) /*!< Position of RR6 field. */ +#define WDT_REQSTATUS_RR6_Msk (0x1UL << WDT_REQSTATUS_RR6_Pos) /*!< Bit mask of RR6 field. */ +#define WDT_REQSTATUS_RR6_DisabledOrRequested (0UL) /*!< RR[6] register is not enabled, or are already requesting reload */ +#define WDT_REQSTATUS_RR6_EnabledAndUnrequested (1UL) /*!< RR[6] register is enabled, and are not yet requesting reload */ + +/* Bit 5 : Request status for RR[5] register */ +#define WDT_REQSTATUS_RR5_Pos (5UL) /*!< Position of RR5 field. */ +#define WDT_REQSTATUS_RR5_Msk (0x1UL << WDT_REQSTATUS_RR5_Pos) /*!< Bit mask of RR5 field. */ +#define WDT_REQSTATUS_RR5_DisabledOrRequested (0UL) /*!< RR[5] register is not enabled, or are already requesting reload */ +#define WDT_REQSTATUS_RR5_EnabledAndUnrequested (1UL) /*!< RR[5] register is enabled, and are not yet requesting reload */ + +/* Bit 4 : Request status for RR[4] register */ +#define WDT_REQSTATUS_RR4_Pos (4UL) /*!< Position of RR4 field. */ +#define WDT_REQSTATUS_RR4_Msk (0x1UL << WDT_REQSTATUS_RR4_Pos) /*!< Bit mask of RR4 field. */ +#define WDT_REQSTATUS_RR4_DisabledOrRequested (0UL) /*!< RR[4] register is not enabled, or are already requesting reload */ +#define WDT_REQSTATUS_RR4_EnabledAndUnrequested (1UL) /*!< RR[4] register is enabled, and are not yet requesting reload */ + +/* Bit 3 : Request status for RR[3] register */ +#define WDT_REQSTATUS_RR3_Pos (3UL) /*!< Position of RR3 field. */ +#define WDT_REQSTATUS_RR3_Msk (0x1UL << WDT_REQSTATUS_RR3_Pos) /*!< Bit mask of RR3 field. */ +#define WDT_REQSTATUS_RR3_DisabledOrRequested (0UL) /*!< RR[3] register is not enabled, or are already requesting reload */ +#define WDT_REQSTATUS_RR3_EnabledAndUnrequested (1UL) /*!< RR[3] register is enabled, and are not yet requesting reload */ + +/* Bit 2 : Request status for RR[2] register */ +#define WDT_REQSTATUS_RR2_Pos (2UL) /*!< Position of RR2 field. */ +#define WDT_REQSTATUS_RR2_Msk (0x1UL << WDT_REQSTATUS_RR2_Pos) /*!< Bit mask of RR2 field. */ +#define WDT_REQSTATUS_RR2_DisabledOrRequested (0UL) /*!< RR[2] register is not enabled, or are already requesting reload */ +#define WDT_REQSTATUS_RR2_EnabledAndUnrequested (1UL) /*!< RR[2] register is enabled, and are not yet requesting reload */ + +/* Bit 1 : Request status for RR[1] register */ +#define WDT_REQSTATUS_RR1_Pos (1UL) /*!< Position of RR1 field. */ +#define WDT_REQSTATUS_RR1_Msk (0x1UL << WDT_REQSTATUS_RR1_Pos) /*!< Bit mask of RR1 field. */ +#define WDT_REQSTATUS_RR1_DisabledOrRequested (0UL) /*!< RR[1] register is not enabled, or are already requesting reload */ +#define WDT_REQSTATUS_RR1_EnabledAndUnrequested (1UL) /*!< RR[1] register is enabled, and are not yet requesting reload */ + +/* Bit 0 : Request status for RR[0] register */ +#define WDT_REQSTATUS_RR0_Pos (0UL) /*!< Position of RR0 field. */ +#define WDT_REQSTATUS_RR0_Msk (0x1UL << WDT_REQSTATUS_RR0_Pos) /*!< Bit mask of RR0 field. */ +#define WDT_REQSTATUS_RR0_DisabledOrRequested (0UL) /*!< RR[0] register is not enabled, or are already requesting reload */ +#define WDT_REQSTATUS_RR0_EnabledAndUnrequested (1UL) /*!< RR[0] register is enabled, and are not yet requesting reload */ + +/* Register: WDT_CRV */ +/* Description: Counter reload value */ + +/* Bits 31..0 : Counter reload value in number of cycles of the 32.768 kHz clock */ +#define WDT_CRV_CRV_Pos (0UL) /*!< Position of CRV field. */ +#define WDT_CRV_CRV_Msk (0xFFFFFFFFUL << WDT_CRV_CRV_Pos) /*!< Bit mask of CRV field. */ + +/* Register: WDT_RREN */ +/* Description: Enable register for reload request registers */ + +/* Bit 7 : Enable or disable RR[7] register */ +#define WDT_RREN_RR7_Pos (7UL) /*!< Position of RR7 field. */ +#define WDT_RREN_RR7_Msk (0x1UL << WDT_RREN_RR7_Pos) /*!< Bit mask of RR7 field. */ +#define WDT_RREN_RR7_Disabled (0UL) /*!< Disable RR[7] register */ +#define WDT_RREN_RR7_Enabled (1UL) /*!< Enable RR[7] register */ + +/* Bit 6 : Enable or disable RR[6] register */ +#define WDT_RREN_RR6_Pos (6UL) /*!< Position of RR6 field. */ +#define WDT_RREN_RR6_Msk (0x1UL << WDT_RREN_RR6_Pos) /*!< Bit mask of RR6 field. */ +#define WDT_RREN_RR6_Disabled (0UL) /*!< Disable RR[6] register */ +#define WDT_RREN_RR6_Enabled (1UL) /*!< Enable RR[6] register */ + +/* Bit 5 : Enable or disable RR[5] register */ +#define WDT_RREN_RR5_Pos (5UL) /*!< Position of RR5 field. */ +#define WDT_RREN_RR5_Msk (0x1UL << WDT_RREN_RR5_Pos) /*!< Bit mask of RR5 field. */ +#define WDT_RREN_RR5_Disabled (0UL) /*!< Disable RR[5] register */ +#define WDT_RREN_RR5_Enabled (1UL) /*!< Enable RR[5] register */ + +/* Bit 4 : Enable or disable RR[4] register */ +#define WDT_RREN_RR4_Pos (4UL) /*!< Position of RR4 field. */ +#define WDT_RREN_RR4_Msk (0x1UL << WDT_RREN_RR4_Pos) /*!< Bit mask of RR4 field. */ +#define WDT_RREN_RR4_Disabled (0UL) /*!< Disable RR[4] register */ +#define WDT_RREN_RR4_Enabled (1UL) /*!< Enable RR[4] register */ + +/* Bit 3 : Enable or disable RR[3] register */ +#define WDT_RREN_RR3_Pos (3UL) /*!< Position of RR3 field. */ +#define WDT_RREN_RR3_Msk (0x1UL << WDT_RREN_RR3_Pos) /*!< Bit mask of RR3 field. */ +#define WDT_RREN_RR3_Disabled (0UL) /*!< Disable RR[3] register */ +#define WDT_RREN_RR3_Enabled (1UL) /*!< Enable RR[3] register */ + +/* Bit 2 : Enable or disable RR[2] register */ +#define WDT_RREN_RR2_Pos (2UL) /*!< Position of RR2 field. */ +#define WDT_RREN_RR2_Msk (0x1UL << WDT_RREN_RR2_Pos) /*!< Bit mask of RR2 field. */ +#define WDT_RREN_RR2_Disabled (0UL) /*!< Disable RR[2] register */ +#define WDT_RREN_RR2_Enabled (1UL) /*!< Enable RR[2] register */ + +/* Bit 1 : Enable or disable RR[1] register */ +#define WDT_RREN_RR1_Pos (1UL) /*!< Position of RR1 field. */ +#define WDT_RREN_RR1_Msk (0x1UL << WDT_RREN_RR1_Pos) /*!< Bit mask of RR1 field. */ +#define WDT_RREN_RR1_Disabled (0UL) /*!< Disable RR[1] register */ +#define WDT_RREN_RR1_Enabled (1UL) /*!< Enable RR[1] register */ + +/* Bit 0 : Enable or disable RR[0] register */ +#define WDT_RREN_RR0_Pos (0UL) /*!< Position of RR0 field. */ +#define WDT_RREN_RR0_Msk (0x1UL << WDT_RREN_RR0_Pos) /*!< Bit mask of RR0 field. */ +#define WDT_RREN_RR0_Disabled (0UL) /*!< Disable RR[0] register */ +#define WDT_RREN_RR0_Enabled (1UL) /*!< Enable RR[0] register */ + +/* Register: WDT_CONFIG */ +/* Description: Configuration register */ + +/* Bit 3 : Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger */ +#define WDT_CONFIG_HALT_Pos (3UL) /*!< Position of HALT field. */ +#define WDT_CONFIG_HALT_Msk (0x1UL << WDT_CONFIG_HALT_Pos) /*!< Bit mask of HALT field. */ +#define WDT_CONFIG_HALT_Pause (0UL) /*!< Pause watchdog while the CPU is halted by the debugger */ +#define WDT_CONFIG_HALT_Run (1UL) /*!< Keep the watchdog running while the CPU is halted by the debugger */ + +/* Bit 0 : Configure the watchdog to either be paused, or kept running, while the CPU is sleeping */ +#define WDT_CONFIG_SLEEP_Pos (0UL) /*!< Position of SLEEP field. */ +#define WDT_CONFIG_SLEEP_Msk (0x1UL << WDT_CONFIG_SLEEP_Pos) /*!< Bit mask of SLEEP field. */ +#define WDT_CONFIG_SLEEP_Pause (0UL) /*!< Pause watchdog while the CPU is sleeping */ +#define WDT_CONFIG_SLEEP_Run (1UL) /*!< Keep the watchdog running while the CPU is sleeping */ + +/* Register: WDT_RR */ +/* Description: Description collection[0]: Reload request 0 */ + +/* Bits 31..0 : Reload request register */ +#define WDT_RR_RR_Pos (0UL) /*!< Position of RR field. */ +#define WDT_RR_RR_Msk (0xFFFFFFFFUL << WDT_RR_RR_Pos) /*!< Bit mask of RR field. */ +#define WDT_RR_RR_Reload (0x6E524635UL) /*!< Value to request a reload of the watchdog timer */ + + +/*lint --flb "Leave library region" */ +#endif diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52_name_change.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52_name_change.h new file mode 100644 index 0000000000..c15fbc6f66 --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52_name_change.h @@ -0,0 +1,71 @@ +/* + * 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 NRF52_NAME_CHANGE_H +#define NRF52_NAME_CHANGE_H + +/*lint ++flb "Enter library region */ + +/* This file is given to prevent your SW from not compiling with the updates made to nrf52.h and + * nrf52_bitfields.h. The macros defined in this file were available previously. Do not use these + * macros on purpose. Use the ones defined in nrf52.h and nrf52_bitfields.h instead. + */ + +/* I2S */ +/* Several enumerations changed case. Adding old macros to keep compilation compatibility. */ +#define I2S_ENABLE_ENABLE_DISABLE I2S_ENABLE_ENABLE_Disabled +#define I2S_ENABLE_ENABLE_ENABLE I2S_ENABLE_ENABLE_Enabled +#define I2S_CONFIG_MODE_MODE_MASTER I2S_CONFIG_MODE_MODE_Master +#define I2S_CONFIG_MODE_MODE_SLAVE I2S_CONFIG_MODE_MODE_Slave +#define I2S_CONFIG_RXEN_RXEN_DISABLE I2S_CONFIG_RXEN_RXEN_Disabled +#define I2S_CONFIG_RXEN_RXEN_ENABLE I2S_CONFIG_RXEN_RXEN_Enabled +#define I2S_CONFIG_TXEN_TXEN_DISABLE I2S_CONFIG_TXEN_TXEN_Disabled +#define I2S_CONFIG_TXEN_TXEN_ENABLE I2S_CONFIG_TXEN_TXEN_Enabled +#define I2S_CONFIG_MCKEN_MCKEN_DISABLE I2S_CONFIG_MCKEN_MCKEN_Disabled +#define I2S_CONFIG_MCKEN_MCKEN_ENABLE I2S_CONFIG_MCKEN_MCKEN_Enabled +#define I2S_CONFIG_SWIDTH_SWIDTH_8BIT I2S_CONFIG_SWIDTH_SWIDTH_8Bit +#define I2S_CONFIG_SWIDTH_SWIDTH_16BIT I2S_CONFIG_SWIDTH_SWIDTH_16Bit +#define I2S_CONFIG_SWIDTH_SWIDTH_24BIT I2S_CONFIG_SWIDTH_SWIDTH_24Bit +#define I2S_CONFIG_ALIGN_ALIGN_LEFT I2S_CONFIG_ALIGN_ALIGN_Left +#define I2S_CONFIG_ALIGN_ALIGN_RIGHT I2S_CONFIG_ALIGN_ALIGN_Right +#define I2S_CONFIG_FORMAT_FORMAT_ALIGNED I2S_CONFIG_FORMAT_FORMAT_Aligned +#define I2S_CONFIG_CHANNELS_CHANNELS_STEREO I2S_CONFIG_CHANNELS_CHANNELS_Stereo +#define I2S_CONFIG_CHANNELS_CHANNELS_LEFT I2S_CONFIG_CHANNELS_CHANNELS_Left +#define I2S_CONFIG_CHANNELS_CHANNELS_RIGHT I2S_CONFIG_CHANNELS_CHANNELS_Right + + + + + +/*lint --flb "Leave library region" */ + +#endif /* NRF52_NAME_CHANGE_H */ diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf_delay.c b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf_delay.c new file mode 100644 index 0000000000..9756e7b7d9 --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf_delay.c @@ -0,0 +1,46 @@ +/* + * 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 +#include "compiler_abstraction.h" +#include "nrf.h" +#include "nrf_delay.h" + +/*lint --e{438} "Variable not used" */ +void nrf_delay_ms(uint32_t volatile number_of_ms) +{ + while(number_of_ms != 0) + { + number_of_ms--; + nrf_delay_us(999); + } +} diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf_delay.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf_delay.h new file mode 100644 index 0000000000..be65762455 --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf_delay.h @@ -0,0 +1,280 @@ +/* + * 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 +#define _NRF_DELAY_H + +#include "nrf.h" + +#ifdef __cplusplus +extern "C" { +#endif +/** + * @brief Function for delaying execution for number of microseconds. + * + * @note NRF52 has instruction cache and because of that delay is not precise. + * + * @param number_of_ms + */ +/*lint --e{438, 522} "Variable not used" "Function lacks side-effects" */ +#if defined ( __CC_ARM ) + +static __ASM void __INLINE nrf_delay_us(uint32_t volatile number_of_us) +{ +loop + SUBS R0, R0, #1 + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP +#ifdef NRF52 + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP +#endif + BNE loop + BX LR +} + +#elif defined ( __ICCARM__ ) + +static void __INLINE nrf_delay_us(uint32_t volatile number_of_us) +{ +__ASM ( +"loop:\n\t" + " SUBS R0, R0, #1\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" +#ifdef NRF52 + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" + " NOP\n\t" +#endif + " BNE.n loop\n\t"); +} + +#elif defined ( _WIN32 ) || defined ( __unix ) || defined( __APPLE__ ) + +__STATIC_INLINE void nrf_delay_us(uint32_t volatile number_of_us); + +#ifndef CUSTOM_NRF_DELAY_US +__STATIC_INLINE void nrf_delay_us(uint32_t volatile number_of_us) +{} +#endif + +#elif defined ( __GNUC__ ) + +__STATIC_INLINE void nrf_delay_us(uint32_t volatile number_of_us) __attribute__((always_inline)); +__STATIC_INLINE void nrf_delay_us(uint32_t volatile number_of_us) +{ +register uint32_t delay __ASM ("r0") = number_of_us; +__ASM volatile ( +#ifdef NRF51 + ".syntax unified\n" +#endif + "1:\n" + " SUBS %0, %0, #1\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" +#ifdef NRF52 + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" + " NOP\n" +#endif + " BNE 1b\n" +#ifdef NRF51 + ".syntax divided\n" +#endif + : "+r" (delay)); +} +#endif + +void nrf_delay_ms(uint32_t volatile number_of_ms); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/system_nrf52.c b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/system_nrf52.c new file mode 100644 index 0000000000..d5f076f1e4 --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/system_nrf52.c @@ -0,0 +1,317 @@ +/* + * 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 +#include +#include "nrf.h" +#include "system_nrf52.h" + +/*lint ++flb "Enter library region" */ + +#define __SYSTEM_CLOCK_64M (64000000UL) + +static bool errata_16(void); +static bool errata_31(void); +static bool errata_32(void); +static bool errata_36(void); +static bool errata_37(void); +static bool errata_57(void); +static bool errata_66(void); + + +#if defined ( __CC_ARM ) + uint32_t SystemCoreClock __attribute__((used)) = __SYSTEM_CLOCK_64M; +#elif defined ( __ICCARM__ ) + __root uint32_t SystemCoreClock = __SYSTEM_CLOCK_64M; +#elif defined ( __GNUC__ ) + uint32_t SystemCoreClock __attribute__((used)) = __SYSTEM_CLOCK_64M; +#endif + +void SystemCoreClockUpdate(void) +{ + SystemCoreClock = __SYSTEM_CLOCK_64M; +} + +void SystemInit(void) +{ + /* Workaround for Errata 16 "System: RAM may be corrupt on wakeup from CPU IDLE" found at the Errata document + for your device located at https://infocenter.nordicsemi.com/ */ + if (errata_16()){ + *(volatile uint32_t *)0x4007C074 = 3131961357ul; + } + + /* Workaround for Errata 31 "CLOCK: Calibration values are not correctly loaded from FICR at reset" found at the Errata document + for your device located at https://infocenter.nordicsemi.com/ */ + if (errata_31()){ + *(volatile uint32_t *)0x4000053C = ((*(volatile uint32_t *)0x10000244) & 0x0000E000) >> 13; + } + + /* Workaround for Errata 32 "DIF: Debug session automatically enables TracePort pins" found at the Errata document + for your device located at https://infocenter.nordicsemi.com/ */ + if (errata_32()){ + CoreDebug->DEMCR &= ~CoreDebug_DEMCR_TRCENA_Msk; + } + + /* Workaround for Errata 36 "CLOCK: Some registers are not reset when expected" found at the Errata document + for your device located at https://infocenter.nordicsemi.com/ */ + if (errata_36()){ + NRF_CLOCK->EVENTS_DONE = 0; + NRF_CLOCK->EVENTS_CTTO = 0; + NRF_CLOCK->CTIV = 0; + } + + /* Workaround for Errata 37 "RADIO: Encryption engine is slow by default" found at the Errata document + for your device located at https://infocenter.nordicsemi.com/ */ + if (errata_37()){ + *(volatile uint32_t *)0x400005A0 = 0x3; + } + + /* Workaround for Errata 57 "NFCT: NFC Modulation amplitude" found at the Errata document + for your device located at https://infocenter.nordicsemi.com/ */ + if (errata_57()){ + *(volatile uint32_t *)0x40005610 = 0x00000005; + *(volatile uint32_t *)0x40005688 = 0x00000001; + *(volatile uint32_t *)0x40005618 = 0x00000000; + *(volatile uint32_t *)0x40005614 = 0x0000003F; + } + + /* Workaround for Errata 66 "TEMP: Linearity specification not met with default settings" found at the Errata document + for your device located at https://infocenter.nordicsemi.com/ */ + if (errata_66()){ + NRF_TEMP->A0 = NRF_FICR->TEMP.A0; + NRF_TEMP->A1 = NRF_FICR->TEMP.A1; + NRF_TEMP->A2 = NRF_FICR->TEMP.A2; + NRF_TEMP->A3 = NRF_FICR->TEMP.A3; + NRF_TEMP->A4 = NRF_FICR->TEMP.A4; + NRF_TEMP->A5 = NRF_FICR->TEMP.A5; + NRF_TEMP->B0 = NRF_FICR->TEMP.B0; + NRF_TEMP->B1 = NRF_FICR->TEMP.B1; + NRF_TEMP->B2 = NRF_FICR->TEMP.B2; + NRF_TEMP->B3 = NRF_FICR->TEMP.B3; + NRF_TEMP->B4 = NRF_FICR->TEMP.B4; + NRF_TEMP->B5 = NRF_FICR->TEMP.B5; + NRF_TEMP->T0 = NRF_FICR->TEMP.T0; + NRF_TEMP->T1 = NRF_FICR->TEMP.T1; + NRF_TEMP->T2 = NRF_FICR->TEMP.T2; + NRF_TEMP->T3 = NRF_FICR->TEMP.T3; + NRF_TEMP->T4 = NRF_FICR->TEMP.T4; + } + + /* Enable the FPU if the compiler used floating point unit instructions. __FPU_USED is a MACRO defined by the + * compiler. Since the FPU consumes energy, remember to disable FPU use in the compiler if floating point unit + * operations are not used in your code. */ + #if (__FPU_USED == 1) + SCB->CPACR |= (3UL << 20) | (3UL << 22); + __DSB(); + __ISB(); + #endif + + /* Configure NFCT pins as GPIOs if NFCT is not to be used in your code. If CONFIG_NFCT_PINS_AS_GPIOS is not defined, + two GPIOs (see Product Specification to see which ones) will be reserved for NFC and will not be available as + normal GPIOs. */ + #if defined (CONFIG_NFCT_PINS_AS_GPIOS) + if ((NRF_UICR->NFCPINS & UICR_NFCPINS_PROTECT_Msk) == (UICR_NFCPINS_PROTECT_NFC << UICR_NFCPINS_PROTECT_Pos)){ + NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos; + while (NRF_NVMC->READY == NVMC_READY_READY_Busy){} + NRF_UICR->NFCPINS &= ~UICR_NFCPINS_PROTECT_Msk; + while (NRF_NVMC->READY == NVMC_READY_READY_Busy){} + NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos; + while (NRF_NVMC->READY == NVMC_READY_READY_Busy){} + NVIC_SystemReset(); + } + #endif + + /* Configure GPIO pads as pPin Reset pin if Pin Reset capabilities desired. If CONFIG_GPIO_AS_PINRESET is not + defined, pin reset will not be available. One GPIO (see Product Specification to see which one) will then be + reserved for PinReset and not available as normal GPIO. */ + #if defined (CONFIG_GPIO_AS_PINRESET) + if (((NRF_UICR->PSELRESET[0] & UICR_PSELRESET_CONNECT_Msk) != (UICR_PSELRESET_CONNECT_Connected << UICR_PSELRESET_CONNECT_Pos)) || + ((NRF_UICR->PSELRESET[1] & UICR_PSELRESET_CONNECT_Msk) != (UICR_PSELRESET_CONNECT_Connected << UICR_PSELRESET_CONNECT_Pos))){ + NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos; + while (NRF_NVMC->READY == NVMC_READY_READY_Busy){} + NRF_UICR->PSELRESET[0] = 21; + while (NRF_NVMC->READY == NVMC_READY_READY_Busy){} + NRF_UICR->PSELRESET[1] = 21; + while (NRF_NVMC->READY == NVMC_READY_READY_Busy){} + NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos; + while (NRF_NVMC->READY == NVMC_READY_READY_Busy){} + NVIC_SystemReset(); + } + #endif + + /* Enable SWO trace functionality. If ENABLE_SWO is not defined, SWO pin will be used as GPIO (see Product + Specification to see which one). */ + #if defined (ENABLE_SWO) + CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk; + NRF_CLOCK->TRACECONFIG |= CLOCK_TRACECONFIG_TRACEMUX_Serial << CLOCK_TRACECONFIG_TRACEMUX_Pos; + NRF_P0->PIN_CNF[18] = (GPIO_PIN_CNF_DRIVE_H0H1 << GPIO_PIN_CNF_DRIVE_Pos) | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); + #endif + + /* Enable Trace functionality. If ENABLE_TRACE is not defined, TRACE pins will be used as GPIOs (see Product + Specification to see which ones). */ + #if defined (ENABLE_TRACE) + CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk; + NRF_CLOCK->TRACECONFIG |= CLOCK_TRACECONFIG_TRACEMUX_Parallel << CLOCK_TRACECONFIG_TRACEMUX_Pos; + NRF_P0->PIN_CNF[14] = (GPIO_PIN_CNF_DRIVE_H0H1 << GPIO_PIN_CNF_DRIVE_Pos) | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); + NRF_P0->PIN_CNF[15] = (GPIO_PIN_CNF_DRIVE_H0H1 << GPIO_PIN_CNF_DRIVE_Pos) | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); + NRF_P0->PIN_CNF[16] = (GPIO_PIN_CNF_DRIVE_H0H1 << GPIO_PIN_CNF_DRIVE_Pos) | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); + NRF_P0->PIN_CNF[18] = (GPIO_PIN_CNF_DRIVE_H0H1 << GPIO_PIN_CNF_DRIVE_Pos) | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); + NRF_P0->PIN_CNF[20] = (GPIO_PIN_CNF_DRIVE_H0H1 << GPIO_PIN_CNF_DRIVE_Pos) | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); + #endif + + SystemCoreClockUpdate(); + + // Start the external 32khz crystal oscillator. +#if defined(TARGET_NRF_LFCLK_RC) + NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_RC << CLOCK_LFCLKSRC_SRC_Pos); +#else + NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos); +#endif + 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. + } +} + + +static bool errata_16(void) +{ + if ((((*(uint32_t *)0xF0000FE0) & 0x000000FF) == 0x6) && (((*(uint32_t *)0xF0000FE4) & 0x0000000F) == 0x0)) + { + if (((*(uint32_t *)0xF0000FE8) & 0x000000F0) == 0x30) + { + return true; + } + } + + return false; +} + +static bool errata_31(void) +{ + if ((((*(uint32_t *)0xF0000FE0) & 0x000000FF) == 0x6) && (((*(uint32_t *)0xF0000FE4) & 0x0000000F) == 0x0)) + { + if (((*(uint32_t *)0xF0000FE8) & 0x000000F0) == 0x30) + { + return true; + } + if (((*(uint32_t *)0xF0000FE8) & 0x000000F0) == 0x40) + { + return true; + } + if (((*(uint32_t *)0xF0000FE8) & 0x000000F0) == 0x50) + { + return true; + } + } + + return false; +} + +static bool errata_32(void) +{ + if ((((*(uint32_t *)0xF0000FE0) & 0x000000FF) == 0x6) && (((*(uint32_t *)0xF0000FE4) & 0x0000000F) == 0x0)) + { + if (((*(uint32_t *)0xF0000FE8) & 0x000000F0) == 0x30) + { + return true; + } + } + + return false; +} + +static bool errata_36(void) +{ + if ((((*(uint32_t *)0xF0000FE0) & 0x000000FF) == 0x6) && (((*(uint32_t *)0xF0000FE4) & 0x0000000F) == 0x0)) + { + if (((*(uint32_t *)0xF0000FE8) & 0x000000F0) == 0x30) + { + return true; + } + if (((*(uint32_t *)0xF0000FE8) & 0x000000F0) == 0x40) + { + return true; + } + if (((*(uint32_t *)0xF0000FE8) & 0x000000F0) == 0x50) + { + return true; + } + } + + return false; +} + +static bool errata_37(void) +{ + if ((((*(uint32_t *)0xF0000FE0) & 0x000000FF) == 0x6) && (((*(uint32_t *)0xF0000FE4) & 0x0000000F) == 0x0)) + { + if (((*(uint32_t *)0xF0000FE8) & 0x000000F0) == 0x30) + { + return true; + } + } + + return false; +} + +static bool errata_57(void) +{ + if ((((*(uint32_t *)0xF0000FE0) & 0x000000FF) == 0x6) && (((*(uint32_t *)0xF0000FE4) & 0x0000000F) == 0x0)) + { + if (((*(uint32_t *)0xF0000FE8) & 0x000000F0) == 0x30) + { + return true; + } + } + + return false; +} + +static bool errata_66(void) +{ + if ((((*(uint32_t *)0xF0000FE0) & 0x000000FF) == 0x6) && (((*(uint32_t *)0xF0000FE4) & 0x0000000F) == 0x0)) + { + if (((*(uint32_t *)0xF0000FE8) & 0x000000F0) == 0x50) + { + return true; + } + } + + return false; +} + + +/*lint --flb "Leave library region" */ diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/system_nrf52.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/system_nrf52.h new file mode 100644 index 0000000000..02d260738a --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/system_nrf52.h @@ -0,0 +1,71 @@ +/* + * 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 SYSTEM_NRF52_H +#define SYSTEM_NRF52_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + + +extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ + +/** + * Initialize the system + * + * @param none + * @return none + * + * @brief Setup the microcontroller system. + * Initialize the System and update the SystemCoreClock variable. + */ +extern void SystemInit (void); + +/** + * Update SystemCoreClock variable + * + * @param none + * @return none + * + * @brief Updates the SystemCoreClock with current core Clock + * retrieved from cpu registers. + */ +extern void SystemCoreClockUpdate (void); + +#ifdef __cplusplus +} +#endif + +#endif /* SYSTEM_NRF52_H */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/PeripheralNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/PeripheralNames.h new file mode 100644 index 0000000000..3058e99f9c --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/PeripheralNames.h @@ -0,0 +1,58 @@ +/* mbed Microcontroller Library + * Copyright (c) 2013 Nordic Semiconductor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef MBED_PERIPHERALNAMES_H +#define MBED_PERIPHERALNAMES_H + +#include "cmsis.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define STDIO_UART_TX TX_PIN_NUMBER +#define STDIO_UART_RX RX_PIN_NUMBER +#define STDIO_UART UART_0 + +typedef enum { + UART_0 = (int)NRF_UART0_BASE +} UARTName; + + +typedef enum { + SPI_0 = (int)NRF_SPI0_BASE, + SPI_1 = (int)NRF_SPI1_BASE, + SPIS = (int)NRF_SPIS1_BASE +} SPIName; + +typedef enum { + PWM_1 = 0, + PWM_2 +} PWMName; + +typedef enum { + I2C_0 = (int)NRF_TWI0_BASE, + I2C_1 = (int)NRF_TWI1_BASE +} I2CName; + +typedef enum { + ADC0_0 = (int)0 +} ADCName; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/PortNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/PortNames.h new file mode 100644 index 0000000000..9196c20d8a --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/PortNames.h @@ -0,0 +1,30 @@ +/* mbed Microcontroller Library + * Copyright (c) 2013 Nordic Semiconductor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef MBED_PORTNAMES_H +#define MBED_PORTNAMES_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum { + Port0 = 0 //GPIO pins 0-31 +} PortName; + +#ifdef __cplusplus +} +#endif +#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/TARGET_NRF52_DK/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/TARGET_NRF52_DK/PinNames.h new file mode 100644 index 0000000000..27aa95162a --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/TARGET_NRF52_DK/PinNames.h @@ -0,0 +1,179 @@ +/* mbed Microcontroller Library + * Copyright (c) 2016 Nordic Semiconductor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef MBED_PINNAMES_H +#define MBED_PINNAMES_H + +#include "cmsis.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum { + PIN_INPUT, + PIN_OUTPUT +} PinDirection; + +#define PORT_SHIFT 3 + +typedef enum { + p0 = 0, + p1 = 1, + p2 = 2, + p3 = 3, + p4 = 4, + p5 = 5, + p6 = 6, + p7 = 7, + p8 = 8, + p9 = 9, + p10 = 10, + p11 = 11, + p12 = 12, + p13 = 13, + p14 = 14, + p15 = 15, + p16 = 16, + p17 = 17, + p18 = 18, + p19 = 19, + p20 = 20, + p21 = 21, + p22 = 22, + p23 = 23, + p24 = 24, + p25 = 25, + p26 = 26, + p27 = 27, + p28 = 28, + p29 = 29, + p30 = 30, + p31 = 31, + + P0_0 = p0, + P0_1 = p1, + P0_2 = p2, + P0_3 = p3, + P0_4 = p4, + P0_5 = p5, + P0_6 = p6, + P0_7 = p7, + + P0_8 = p8, + P0_9 = p9, + P0_10 = p10, + P0_11 = p11, + P0_12 = p12, + P0_13 = p13, + P0_14 = p14, + P0_15 = p15, + + P0_16 = p16, + P0_17 = p17, + P0_18 = p18, + P0_19 = p19, + P0_20 = p20, + P0_21 = p21, + P0_22 = p22, + P0_23 = p23, + + P0_24 = p24, + P0_25 = p25, + P0_26 = p26, + P0_27 = p27, + P0_28 = p28, + P0_29 = p29, + P0_30 = p30, + + LED1 = p17, + LED2 = p18, + LED3 = p19, + LED4 = p20, + + BUTTON1 = p13, + BUTTON2 = p14, + BUTTON3 = p15, + BUTTON4 = p16, + + RX_PIN_NUMBER = p8, + TX_PIN_NUMBER = p6, + CTS_PIN_NUMBER = p7, + RTS_PIN_NUMBER = p5, + + // mBed interface Pins + USBTX = TX_PIN_NUMBER, + USBRX = RX_PIN_NUMBER, + + SPI_PSELMOSI0 = p23, + SPI_PSELMISO0 = p24, + SPI_PSELSS0 = p22, + SPI_PSELSCK0 = p25, + + SPI_PSELMOSI1 = p12, + SPI_PSELMISO1 = p13, + SPI_PSELSS1 = p11, + SPI_PSELSCK1 = p14, + + SPIS_PSELMOSI = p12, + SPIS_PSELMISO = p13, + SPIS_PSELSS = p11, + SPIS_PSELSCK = p14, + + I2C_SDA0 = p26, + I2C_SCL0 = p27, + + D0 = p11, + D1 = p12, + D2 = p13, + D3 = p14, + D4 = p15, + D5 = p16, + D6 = p17, + D7 = p18, + + D8 = p19, + D9 = p20, + D10 = p22, + D11 = p23, + D12 = p24, + D13 = p25, + + D14 = p26, + D15 = p27, + + A0 = p3, + A1 = p4, + A2 = p28, + A3 = p29, + A4 = p30, + A5 = p31, + + // Not connected + NC = (int)0xFFFFFFFF +} PinName; + +typedef enum { + PullNone = 0, + PullDown = 1, + PullUp = 3, + PullDefault = PullUp +} PinMode; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/TARGET_NRF52_DK/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/TARGET_NRF52_DK/device.h new file mode 100644 index 0000000000..8a2fd55d6b --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/TARGET_NRF52_DK/device.h @@ -0,0 +1,59 @@ +/* mbed Microcontroller Library + * Copyright (c) 2006-2013 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef MBED_DEVICE_H +#define MBED_DEVICE_H + +#define DEVICE_PORTIN 1 +#define DEVICE_PORTOUT 1 +#define DEVICE_PORTINOUT 1 + +#define DEVICE_INTERRUPTIN 1 + +#define DEVICE_ANALOGIN 1 +#define DEVICE_ANALOGOUT 0 + +#define DEVICE_SERIAL 1 + +#define DEVICE_I2C 1 +#define DEVICE_I2CSLAVE 0 + +#define DEVICE_SPI 1 +#define DEVICE_SPISLAVE 1 + +#define DEVICE_CAN 0 + +#define DEVICE_RTC 0 + +#define DEVICE_ETHERNET 0 + +#define DEVICE_PWMOUT 1 + +#define DEVICE_SEMIHOST 0 +#define DEVICE_LOCALFILESYSTEM 0 + +#define DEVICE_SLEEP 1 + +#define DEVICE_DEBUG_AWARENESS 0 + +#define DEVICE_STDIO_MESSAGES 0 + +#define DEVICE_ERROR_PATTERN 1 + +#define DEVICE_LOWPOWERTIMER 1 + +#include "objects.h" + +#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/analogin_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/analogin_api.c new file mode 100644 index 0000000000..c97ed15857 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/analogin_api.c @@ -0,0 +1,82 @@ +/* mbed Microcontroller Library + * Copyright (c) 2006-2013 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "mbed_assert.h" +#include "analogin_api.h" +#include "cmsis.h" +#include "pinmap.h" + +#define ANALOGIN_MEDIAN_FILTER 1 +#define ADC_10BIT_RANGE 0x3FF +#define ADC_RANGE ADC_10BIT_RANGE + +static const PinMap PinMap_ADC[] = { + {p1, ADC0_0, 4}, + {p2, ADC0_0, 8}, + {p3, ADC0_0, 16}, + {p4, ADC0_0, 32}, + {p5, ADC0_0, 64}, + {p6, ADC0_0, 128}, + {NC, NC, 0} +}; + +void analogin_init(analogin_t *obj, PinName pin) +{ + // TODO: usage on nrf52 ? +#if 0 + int analogInputPin = 0; + const PinMap *map = PinMap_ADC; + + obj->adc = (ADCName)pinmap_peripheral(pin, PinMap_ADC); //(NRF_ADC_Type *) + MBED_ASSERT(obj->adc != (ADCName)NC); + + while (map->pin != NC) { + if (map->pin == pin) { + analogInputPin = map->function; + break; + } + map++; + } + obj->adc_pin = (uint8_t)analogInputPin; + + NRF_ADC->ENABLE = ADC_ENABLE_ENABLE_Enabled; + NRF_ADC->CONFIG = (ADC_CONFIG_RES_10bit << ADC_CONFIG_RES_Pos) | + (ADC_CONFIG_INPSEL_AnalogInputOneThirdPrescaling << ADC_CONFIG_INPSEL_Pos) | + (ADC_CONFIG_REFSEL_SupplyOneThirdPrescaling << ADC_CONFIG_REFSEL_Pos) | + (analogInputPin << ADC_CONFIG_PSEL_Pos) | + (ADC_CONFIG_EXTREFSEL_None << ADC_CONFIG_EXTREFSEL_Pos); +#endif +} + +uint16_t analogin_read_u16(analogin_t *obj) +{ + // TODO: usage on nrf52 ? +#if 0 + NRF_ADC->CONFIG &= ~ADC_CONFIG_PSEL_Msk; + NRF_ADC->CONFIG |= obj->adc_pin << ADC_CONFIG_PSEL_Pos; + NRF_ADC->TASKS_START = 1; + while (((NRF_ADC->BUSY & ADC_BUSY_BUSY_Msk) >> ADC_BUSY_BUSY_Pos) == ADC_BUSY_BUSY_Busy) { + } + + return (uint16_t)NRF_ADC->RESULT; // 10 bit +#endif + return 0; +} + +float analogin_read(analogin_t *obj) +{ + uint16_t value = analogin_read_u16(obj); + return (float)value * (1.0f / (float)ADC_RANGE); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/gpio_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/gpio_api.c new file mode 100644 index 0000000000..eb077c9f10 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/gpio_api.c @@ -0,0 +1,58 @@ +/* mbed Microcontroller Library + * Copyright (c) 2006-2013 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "mbed_assert.h" +#include "gpio_api.h" +#include "pinmap.h" + +void gpio_init(gpio_t *obj, PinName pin) +{ + obj->pin = pin; + if (pin == (PinName)NC) { + return; + } + + obj->mask = (1ul << pin); + + obj->reg_set = &NRF_GPIO->OUTSET; + obj->reg_clr = &NRF_GPIO->OUTCLR; + obj->reg_in = &NRF_GPIO->IN; + obj->reg_dir = &NRF_GPIO->DIR; +} + +void gpio_mode(gpio_t *obj, PinMode mode) +{ + pin_mode(obj->pin, mode); +} + +void gpio_dir(gpio_t *obj, PinDirection direction) +{ + MBED_ASSERT(obj->pin != (PinName)NC); + switch (direction) { + case PIN_INPUT: + NRF_GPIO->PIN_CNF[obj->pin] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) + | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) + | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) + | (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos); + break; + case PIN_OUTPUT: + NRF_GPIO->PIN_CNF[obj->pin] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) + | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) + | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) + | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) + | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); + break; + } +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/gpio_irq_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/gpio_irq_api.c new file mode 100644 index 0000000000..9d2fcad2c4 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/gpio_irq_api.c @@ -0,0 +1,127 @@ +/* mbed Microcontroller Library + * Copyright (c) 2013 Nordic Semiconductor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include "cmsis.h" + +#include "gpio_irq_api.h" +#include "mbed_error.h" + +#define CHANNEL_NUM 31 + +static uint32_t channel_ids[CHANNEL_NUM] = {0}; //each pin will be given an id, if id is 0 the pin can be ignored. +static uint8_t channel_enabled[CHANNEL_NUM] = {0}; +static uint32_t portRISE = 0; +static uint32_t portFALL = 0; +static gpio_irq_handler irq_handler; + +#ifdef __cplusplus +extern "C" { +#endif +void GPIOTE_IRQHandler(void) +{ + volatile uint32_t newVal = NRF_GPIO->IN; + + if ((NRF_GPIOTE->EVENTS_PORT != 0) && ((NRF_GPIOTE->INTENSET & GPIOTE_INTENSET_PORT_Msk) != 0)) { + NRF_GPIOTE->EVENTS_PORT = 0; + + for (uint8_t i = 0; i<31; i++) { + if (channel_ids[i]>0) { + if (channel_enabled[i]) { + if( ((newVal>>i)&1) && ( ( (NRF_GPIO->PIN_CNF[i] >>GPIO_PIN_CNF_SENSE_Pos) & GPIO_PIN_CNF_SENSE_Low) != GPIO_PIN_CNF_SENSE_Low) && ( (portRISE>>i)&1) ){ + irq_handler(channel_ids[i], IRQ_RISE); + } else if ((((newVal >> i) & 1) == 0) && + (((NRF_GPIO->PIN_CNF[i] >> GPIO_PIN_CNF_SENSE_Pos) & GPIO_PIN_CNF_SENSE_Low) == GPIO_PIN_CNF_SENSE_Low) && + ((portFALL >> i) & 1)) { + irq_handler(channel_ids[i], IRQ_FALL); + } + } + + if (NRF_GPIO->PIN_CNF[i] & GPIO_PIN_CNF_SENSE_Msk) { + NRF_GPIO->PIN_CNF[i] &= ~(GPIO_PIN_CNF_SENSE_Msk); + + if (newVal >> i & 1) { + NRF_GPIO->PIN_CNF[i] |= (GPIO_PIN_CNF_SENSE_Low << GPIO_PIN_CNF_SENSE_Pos); + } else { + NRF_GPIO->PIN_CNF[i] |= (GPIO_PIN_CNF_SENSE_High << GPIO_PIN_CNF_SENSE_Pos); + } + } + } + } + } +} + +#ifdef __cplusplus +} +#endif + +int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32_t id) +{ + if (pin == NC) { + return -1; + } + + irq_handler = handler; + obj->ch = pin; + NRF_GPIOTE->EVENTS_PORT = 0; + channel_ids[pin] = id; + channel_enabled[pin] = 1; + NRF_GPIOTE->INTENSET = GPIOTE_INTENSET_PORT_Set << GPIOTE_INTENSET_PORT_Pos; + + NVIC_SetPriority(GPIOTE_IRQn, 3); + NVIC_EnableIRQ (GPIOTE_IRQn); + return 0; +} + +void gpio_irq_free(gpio_irq_t *obj) +{ + channel_ids[obj->ch] = 0; +} + +void gpio_irq_set(gpio_irq_t *obj, gpio_irq_event event, uint32_t enable) +{ + NRF_GPIO->PIN_CNF[obj->ch] &= ~(GPIO_PIN_CNF_SENSE_Msk); + if (enable) { + if (event == IRQ_RISE) { + portRISE |= (1 << obj->ch); + } else if (event == IRQ_FALL) { + portFALL |= (1 << obj->ch); + } + } else { + if (event == IRQ_RISE) { + portRISE &= ~(1 << obj->ch); + } else if (event == IRQ_FALL) { + portFALL &= ~(1 << obj->ch); + } + } + + if (((portRISE >> obj->ch) & 1) || ((portFALL >> obj->ch) & 1)) { + if ((NRF_GPIO->IN >> obj->ch) & 1) { + NRF_GPIO->PIN_CNF[obj->ch] |= (GPIO_PIN_CNF_SENSE_Low << GPIO_PIN_CNF_SENSE_Pos); // | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos); + } else { + NRF_GPIO->PIN_CNF[obj->ch] |= (GPIO_PIN_CNF_SENSE_High << GPIO_PIN_CNF_SENSE_Pos); //| (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos); + } + } +} + +void gpio_irq_enable(gpio_irq_t *obj) +{ + channel_enabled[obj->ch] = 1; +} + +void gpio_irq_disable(gpio_irq_t *obj) +{ + channel_enabled[obj->ch] = 0; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/gpio_object.h b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/gpio_object.h new file mode 100644 index 0000000000..fe6d6c1e05 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/gpio_object.h @@ -0,0 +1,56 @@ +/* mbed Microcontroller Library + * Copyright (c) 2006-2013 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef MBED_GPIO_OBJECT_H +#define MBED_GPIO_OBJECT_H + +#include "mbed_assert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct { + PinName pin; + uint32_t mask; + + __IO uint32_t *reg_dir; + __IO uint32_t *reg_set; + __IO uint32_t *reg_clr; + __I uint32_t *reg_in; +} gpio_t; + +static inline void gpio_write(gpio_t *obj, int value) { + MBED_ASSERT(obj->pin != (PinName)NC); + if (value) + *obj->reg_set = obj->mask; + else + *obj->reg_clr = obj->mask; +} + +static inline int gpio_read(gpio_t *obj) { + MBED_ASSERT(obj->pin != (PinName)NC); + return ((*obj->reg_in & obj->mask) ? 1 : 0); +} + +static inline int gpio_is_connected(const gpio_t *obj) { + return obj->pin != (PinName)NC; +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/i2c_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/i2c_api.c new file mode 100644 index 0000000000..17989f3d0a --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/i2c_api.c @@ -0,0 +1,311 @@ +/* mbed Microcontroller Library + * Copyright (c) 2013 Nordic Semiconductor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "mbed_assert.h" +#include "mbed_error.h" +#include "i2c_api.h" +#include "cmsis.h" +#include "pinmap.h" + +// nRF51822's I2C_0 and SPI_0 (I2C_1, SPI_1 and SPIS1) share the same address. +// They can't be used at the same time. So we use two global variable to track the usage. +// See nRF51822 address information at nRF51822_PS v2.0.pdf - Table 15 Peripheral instance reference +volatile i2c_spi_peripheral_t i2c0_spi0_peripheral = {0, 0, 0, 0}; +volatile i2c_spi_peripheral_t i2c1_spi1_peripheral = {0, 0, 0, 0}; + +void i2c_interface_enable(i2c_t *obj) +{ + obj->i2c->ENABLE = (TWI_ENABLE_ENABLE_Enabled << TWI_ENABLE_ENABLE_Pos); +} + +void twi_master_init(i2c_t *obj, PinName sda, PinName scl, int frequency) +{ + NRF_GPIO->PIN_CNF[scl] = ((GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos) | + (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) | + (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) | + (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) | + (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos)); + + NRF_GPIO->PIN_CNF[sda] = ((GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos) | + (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) | + (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) | + (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) | + (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos)); + + obj->i2c->PSELSCL = scl; + obj->i2c->PSELSDA = sda; + // set default frequency at 100k + i2c_frequency(obj, frequency); + i2c_interface_enable(obj); +} + +void i2c_init(i2c_t *obj, PinName sda, PinName scl) +{ + // Initialize variable to avoid compiler warnings + NRF_TWI_Type *i2c = (NRF_TWI_Type *)I2C_0; + + if (i2c0_spi0_peripheral.usage == I2C_SPI_PERIPHERAL_FOR_I2C && + i2c0_spi0_peripheral.sda_mosi == (uint8_t)sda && + i2c0_spi0_peripheral.scl_miso == (uint8_t)scl) { + // The I2C with the same pins is already initialized + i2c = (NRF_TWI_Type *)I2C_0; + obj->peripheral = 0x1; + } else if (i2c1_spi1_peripheral.usage == I2C_SPI_PERIPHERAL_FOR_I2C && + i2c1_spi1_peripheral.sda_mosi == (uint8_t)sda && + i2c1_spi1_peripheral.scl_miso == (uint8_t)scl) { + // The I2C with the same pins is already initialized + i2c = (NRF_TWI_Type *)I2C_1; + obj->peripheral = 0x2; + } else if (i2c0_spi0_peripheral.usage == 0) { + i2c0_spi0_peripheral.usage = I2C_SPI_PERIPHERAL_FOR_I2C; + i2c0_spi0_peripheral.sda_mosi = (uint8_t)sda; + i2c0_spi0_peripheral.scl_miso = (uint8_t)scl; + + i2c = (NRF_TWI_Type *)I2C_0; + obj->peripheral = 0x1; + } else if (i2c1_spi1_peripheral.usage == 0) { + i2c1_spi1_peripheral.usage = I2C_SPI_PERIPHERAL_FOR_I2C; + i2c1_spi1_peripheral.sda_mosi = (uint8_t)sda; + i2c1_spi1_peripheral.scl_miso = (uint8_t)scl; + + i2c = (NRF_TWI_Type *)I2C_1; + obj->peripheral = 0x2; + } else { + // No available peripheral + error("No available I2C"); + } + + obj->i2c = i2c; + obj->scl = scl; + obj->sda = sda; + obj->i2c->EVENTS_ERROR = 0; + obj->i2c->ENABLE = TWI_ENABLE_ENABLE_Disabled << TWI_ENABLE_ENABLE_Pos; +// TODO: usage on nrf52 ? +// obj->i2c->POWER = 0; + + for (int i = 0; i<100; i++) { + } + +// TODO: usage on nrf52 ? +// obj->i2c->POWER = 1; + twi_master_init(obj, sda, scl, 100000); +} + +void i2c_reset(i2c_t *obj) +{ + obj->i2c->EVENTS_ERROR = 0; + obj->i2c->ENABLE = TWI_ENABLE_ENABLE_Disabled << TWI_ENABLE_ENABLE_Pos; +// TODO: usage on nrf52 ? +// obj->i2c->POWER = 0; + for (int i = 0; i<100; i++) { + } + +// TODO: usage on nrf52 ? +// obj->i2c->POWER = 1; + twi_master_init(obj, obj->sda, obj->scl, obj->freq); +} + +int i2c_start(i2c_t *obj) +{ + int status = 0; + i2c_reset(obj); + obj->address_set = 0; + return status; +} + +int i2c_stop(i2c_t *obj) +{ + int timeOut = 100000; + obj->i2c->EVENTS_STOPPED = 0; + // write the stop bit + obj->i2c->TASKS_STOP = 1; + while (!obj->i2c->EVENTS_STOPPED) { + timeOut--; + if (timeOut<0) { + return 1; + } + } + obj->address_set = 0; + i2c_reset(obj); + return 0; +} + +int i2c_do_write(i2c_t *obj, int value) +{ + int timeOut = 100000; + obj->i2c->TXD = value; + while (!obj->i2c->EVENTS_TXDSENT) { + timeOut--; + if (timeOut<0) { + return 1; + } + } + obj->i2c->EVENTS_TXDSENT = 0; + return 0; +} + +int i2c_do_read(i2c_t *obj, char *data, int last) +{ + int timeOut = 100000; + + if (last) { + // To trigger stop task when a byte is received, + // must be set before resume task. + obj->i2c->SHORTS = 2; + } + + obj->i2c->TASKS_RESUME = 1; + + while (!obj->i2c->EVENTS_RXDREADY) { + timeOut--; + if (timeOut<0) { + return 1; + } + } + obj->i2c->EVENTS_RXDREADY = 0; + *data = obj->i2c->RXD; + + return 0; +} + +void i2c_frequency(i2c_t *obj, int hz) +{ + if (hz<250000) { + obj->freq = 100000; + obj->i2c->FREQUENCY = (TWI_FREQUENCY_FREQUENCY_K100 << TWI_FREQUENCY_FREQUENCY_Pos); + } else if (hz<400000) { + obj->freq = 250000; + obj->i2c->FREQUENCY = (TWI_FREQUENCY_FREQUENCY_K250 << TWI_FREQUENCY_FREQUENCY_Pos); + } else { + obj->freq = 400000; + obj->i2c->FREQUENCY = (TWI_FREQUENCY_FREQUENCY_K400 << TWI_FREQUENCY_FREQUENCY_Pos); + } +} + +int checkError(i2c_t *obj) +{ + if (obj->i2c->EVENTS_ERROR == 1) { + if (obj->i2c->ERRORSRC & TWI_ERRORSRC_ANACK_Msk) { + obj->i2c->EVENTS_ERROR = 0; + obj->i2c->TASKS_STOP = 1; + return I2C_ERROR_BUS_BUSY; + } + + obj->i2c->EVENTS_ERROR = 0; + obj->i2c->TASKS_STOP = 1; + return I2C_ERROR_NO_SLAVE; + } + return 0; +} + +int i2c_read(i2c_t *obj, int address, char *data, int length, int stop) +{ + int status, count, errorResult; + obj->i2c->ADDRESS = (address >> 1); + obj->i2c->SHORTS = 1; // to trigger suspend task when a byte is received + obj->i2c->EVENTS_RXDREADY = 0; + obj->i2c->TASKS_STARTRX = 1; + + // Read in all except last byte + for (count = 0; count < (length - 1); count++) { + status = i2c_do_read(obj, &data[count], 0); + if (status) { + errorResult = checkError(obj); + i2c_reset(obj); + if (errorResult<0) { + return errorResult; + } + return count; + } + } + + // read in last byte + status = i2c_do_read(obj, &data[length - 1], 1); + if (status) { + i2c_reset(obj); + return length - 1; + } + // If not repeated start, send stop. + if (stop) { + while (!obj->i2c->EVENTS_STOPPED) { + } + obj->i2c->EVENTS_STOPPED = 0; + } + return length; +} + +int i2c_write(i2c_t *obj, int address, const char *data, int length, int stop) +{ + int status, errorResult; + obj->i2c->ADDRESS = (address >> 1); + obj->i2c->SHORTS = 0; + obj->i2c->TASKS_STARTTX = 1; + + for (int i = 0; iaddress_set) { + obj->address_set = 1; + obj->i2c->ADDRESS = (data >> 1); + + if (data & 1) { + obj->i2c->EVENTS_RXDREADY = 0; + obj->i2c->SHORTS = 1; + obj->i2c->TASKS_STARTRX = 1; + } else { + obj->i2c->SHORTS = 0; + obj->i2c->TASKS_STARTTX = 1; + } + } else { + status = i2c_do_write(obj, data); + if (status) { + i2c_reset(obj); + } + } + return (1 - status); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/objects.h b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/objects.h new file mode 100644 index 0000000000..3c2a093dd4 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/objects.h @@ -0,0 +1,89 @@ +/* mbed Microcontroller Library + * Copyright (c) 2013 Nordic Semiconductor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef MBED_OBJECTS_H +#define MBED_OBJECTS_H + +#include "cmsis.h" +#include "PortNames.h" +#include "PeripheralNames.h" +#include "PinNames.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define I2C_SPI_PERIPHERAL_FOR_I2C 1 +#define I2C_SPI_PERIPHERAL_FOR_SPI 2 + +typedef struct { + uint8_t usage; // I2C: 1, SPI: 2 + uint8_t sda_mosi; + uint8_t scl_miso; + uint8_t sclk; +} i2c_spi_peripheral_t; + +struct serial_s { + NRF_UART_Type *uart; + int index; +}; + +struct spi_s { + NRF_SPI_Type *spi; + NRF_SPIS_Type *spis; + uint8_t peripheral; +}; + +struct port_s { + __IO uint32_t *reg_cnf; + __IO uint32_t *reg_out; + __I uint32_t *reg_in; + PortName port; + uint32_t mask; +}; + +struct pwmout_s { + PWMName pwm; + PinName pin; +}; + +struct i2c_s { + NRF_TWI_Type *i2c; + PinName sda; + PinName scl; + int freq; + uint8_t address_set; + uint8_t peripheral; +}; + +struct analogin_s { + ADCName adc; + uint8_t adc_pin; +}; + +struct gpio_irq_s { + uint32_t ch; +}; + +struct sleep_s { +}; + +#include "gpio_object.h" + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/pinmap.c b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/pinmap.c new file mode 100644 index 0000000000..989fbf209b --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/pinmap.c @@ -0,0 +1,35 @@ +/* mbed Microcontroller Library + * Copyright (c) 2006-2013 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "mbed_assert.h" +#include "mbed_error.h" +#include "pinmap.h" + +void pin_function(PinName pin, int function) +{ + /* Avoid compiler warnings */ + (void) pin; + (void) function; +} + +void pin_mode(PinName pin, PinMode mode) +{ + MBED_ASSERT(pin != (PinName)NC); + + uint32_t pin_number = (uint32_t)pin; + + NRF_GPIO->PIN_CNF[pin_number] &= ~GPIO_PIN_CNF_PULL_Msk; + NRF_GPIO->PIN_CNF[pin_number] |= (mode << GPIO_PIN_CNF_PULL_Pos); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/port_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/port_api.c new file mode 100644 index 0000000000..13c1ada97e --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/port_api.c @@ -0,0 +1,85 @@ +/* mbed Microcontroller Library + * Copyright (c) 2013 Nordic Semiconductor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "port_api.h" +#include "pinmap.h" +#include "gpio_api.h" + +PinName port_pin(PortName port, int pin_n) +{ + (void) port; + return (PinName)(pin_n); +} + +void port_init(port_t *obj, PortName port, int mask, PinDirection dir) +{ + obj->port = port; + obj->mask = mask; + + obj->reg_out = &NRF_GPIO->OUT; + obj->reg_in = &NRF_GPIO->IN; + obj->reg_cnf = NRF_GPIO->PIN_CNF; + + port_dir(obj, dir); +} + +void port_mode(port_t *obj, PinMode mode) +{ + uint32_t i; + // The mode is set per pin: reuse pinmap logic + for (i = 0; i<31; i++) { + if (obj->mask & (1 << i)) { + pin_mode(port_pin(obj->port, i), mode); + } + } +} + +void port_dir(port_t *obj, PinDirection dir) +{ + int i; + switch (dir) { + case PIN_INPUT: + for (i = 0; i<31; i++) { + if (obj->mask & (1 << i)) { + obj->reg_cnf[i] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) + | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) + | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) + | (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos); + } + } + break; + case PIN_OUTPUT: + for (i = 0; i<31; i++) { + if (obj->mask & (1 << i)) { + obj->reg_cnf[i] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) + | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) + | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) + | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) + | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); + } + } + break; + } +} + +void port_write(port_t *obj, int value) +{ + *obj->reg_out = value; +} + +int port_read(port_t *obj) +{ + return (*obj->reg_in); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/pwmout_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/pwmout_api.c new file mode 100644 index 0000000000..6d5883f141 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/pwmout_api.c @@ -0,0 +1,349 @@ +/* mbed Microcontroller Library + * Copyright (c) 2013 Nordic Semiconductor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "mbed_assert.h" +#include "mbed_error.h" +#include "pwmout_api.h" +#include "cmsis.h" +#include "pinmap.h" + +#define NO_PWMS 3 +#define TIMER_PRECISION 4 //4us ticks +#define TIMER_PRESCALER 6 //4us ticks = 16Mhz/(2**6) +static const PinMap PinMap_PWM[] = { + {p0, PWM_1, 1}, + {p1, PWM_1, 1}, + {p2, PWM_1, 1}, + {p3, PWM_1, 1}, + {p4, PWM_1, 1}, + {p5, PWM_1, 1}, + {p6, PWM_1, 1}, + {p7, PWM_1, 1}, + {p8, PWM_1, 1}, + {p9, PWM_1, 1}, + {p10, PWM_1, 1}, + {p11, PWM_1, 1}, + {p12, PWM_1, 1}, + {p13, PWM_1, 1}, + {p14, PWM_1, 1}, + {p15, PWM_1, 1}, + {p16, PWM_1, 1}, + {p17, PWM_1, 1}, + {p18, PWM_1, 1}, + {p19, PWM_1, 1}, + {p20, PWM_1, 1}, + {p21, PWM_1, 1}, + {p22, PWM_1, 1}, + {p23, PWM_1, 1}, + {p24, PWM_1, 1}, + {p25, PWM_1, 1}, + {p28, PWM_1, 1}, + {p29, PWM_1, 1}, + {p30, PWM_1, 1}, + {NC, NC, 0} +}; + +static NRF_TIMER_Type *Timers[1] = { + NRF_TIMER2 +}; + +uint16_t PERIOD = 20000 / TIMER_PRECISION; //20ms +uint8_t PWM_taken[NO_PWMS] = {0, 0, 0}; +uint16_t PULSE_WIDTH[NO_PWMS] = {1, 1, 1}; //set to 1 instead of 0 +uint16_t ACTUAL_PULSE[NO_PWMS] = {0, 0, 0}; + + +/** @brief Function for handling timer 2 peripheral interrupts. + */ +#ifdef __cplusplus +extern "C" { +#endif +void TIMER2_IRQHandler(void) +{ + NRF_TIMER2->EVENTS_COMPARE[3] = 0; + NRF_TIMER2->CC[3] = PERIOD; + + if (PWM_taken[0]) { + NRF_TIMER2->CC[0] = PULSE_WIDTH[0]; + } + if (PWM_taken[1]) { + NRF_TIMER2->CC[1] = PULSE_WIDTH[1]; + } + if (PWM_taken[2]) { + NRF_TIMER2->CC[2] = PULSE_WIDTH[2]; + } + + NRF_TIMER2->TASKS_START = 1; +} + +#ifdef __cplusplus +} +#endif +/** @brief Function for initializing the Timer peripherals. + */ +void timer_init(uint8_t pwmChoice) +{ + NRF_TIMER_Type *timer = Timers[0]; + timer->TASKS_STOP = 0; + + if (pwmChoice == 0) { +// TODO: understand this for nrf52 +// timer->POWER = 0; +// timer->POWER = 1; + timer->MODE = TIMER_MODE_MODE_Timer; + timer->BITMODE = TIMER_BITMODE_BITMODE_16Bit << TIMER_BITMODE_BITMODE_Pos; + timer->PRESCALER = TIMER_PRESCALER; + timer->CC[3] = PERIOD; + } + + timer->CC[pwmChoice] = PULSE_WIDTH[pwmChoice]; + + //high priority application interrupt + NVIC_SetPriority(TIMER2_IRQn, 1); + NVIC_EnableIRQ(TIMER2_IRQn); + + timer->TASKS_START = 0x01; +} + +/** @brief Function for initializing the GPIO Tasks/Events peripheral. + */ +void gpiote_init(PinName pin, uint8_t channel_number) +{ + // Connect GPIO input buffers and configure PWM_OUTPUT_PIN_NUMBER as an output. + NRF_GPIO->PIN_CNF[pin] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) + | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) + | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) + | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) + | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); + NRF_GPIO->OUTCLR = (1UL << pin); + // Configure GPIOTE channel 0 to toggle the PWM pin state + // @note Only one GPIOTE task can be connected to an output pin. + /* Configure channel to Pin31, not connected to the pin, and configure as a tasks that will set it to proper level */ + NRF_GPIOTE->CONFIG[channel_number] = (GPIOTE_CONFIG_MODE_Task << GPIOTE_CONFIG_MODE_Pos) | + (31UL << GPIOTE_CONFIG_PSEL_Pos) | + (GPIOTE_CONFIG_POLARITY_HiToLo << GPIOTE_CONFIG_POLARITY_Pos); + /* Three NOPs are required to make sure configuration is written before setting tasks or getting events */ + __NOP(); + __NOP(); + __NOP(); + /* Launch the task to take the GPIOTE channel output to the desired level */ + NRF_GPIOTE->TASKS_OUT[channel_number] = 1; + + /* Finally configure the channel as the caller expects. If OUTINIT works, the channel is configured properly. + If it does not, the channel output inheritance sets the proper level. */ + NRF_GPIOTE->CONFIG[channel_number] = (GPIOTE_CONFIG_MODE_Task << GPIOTE_CONFIG_MODE_Pos) | + ((uint32_t)pin << GPIOTE_CONFIG_PSEL_Pos) | + ((uint32_t)GPIOTE_CONFIG_POLARITY_Toggle << GPIOTE_CONFIG_POLARITY_Pos) | + ((uint32_t)GPIOTE_CONFIG_OUTINIT_Low << GPIOTE_CONFIG_OUTINIT_Pos); // ((uint32_t)GPIOTE_CONFIG_OUTINIT_High << + // GPIOTE_CONFIG_OUTINIT_Pos);// + + /* Three NOPs are required to make sure configuration is written before setting tasks or getting events */ + __NOP(); + __NOP(); + __NOP(); +} + +/** @brief Function for initializing the Programmable Peripheral Interconnect peripheral. + */ +static void ppi_init(uint8_t pwm) +{ + //using ppi channels 0-7 (only 0-7 are available) + uint8_t channel_number = 2 * pwm; + NRF_TIMER_Type *timer = Timers[0]; + + // Configure PPI channel 0 to toggle ADVERTISING_LED_PIN_NO on every TIMER1 COMPARE[0] match + NRF_PPI->CH[channel_number].TEP = (uint32_t)&NRF_GPIOTE->TASKS_OUT[pwm]; + NRF_PPI->CH[channel_number + 1].TEP = (uint32_t)&NRF_GPIOTE->TASKS_OUT[pwm]; + NRF_PPI->CH[channel_number].EEP = (uint32_t)&timer->EVENTS_COMPARE[pwm]; + NRF_PPI->CH[channel_number + 1].EEP = (uint32_t)&timer->EVENTS_COMPARE[3]; + + // Enable PPI channels. + NRF_PPI->CHEN |= (1 << channel_number) | + (1 << (channel_number + 1)); +} + +void setModulation(pwmout_t *obj, uint8_t toggle, uint8_t high) +{ + if (high) { + NRF_GPIOTE->CONFIG[obj->pwm] |= ((uint32_t)GPIOTE_CONFIG_OUTINIT_High << GPIOTE_CONFIG_OUTINIT_Pos); + if (toggle) { + NRF_GPIOTE->CONFIG[obj->pwm] |= (GPIOTE_CONFIG_MODE_Task << GPIOTE_CONFIG_MODE_Pos) | + ((uint32_t)GPIOTE_CONFIG_POLARITY_Toggle << GPIOTE_CONFIG_POLARITY_Pos); + } else { + NRF_GPIOTE->CONFIG[obj->pwm] &= ~((uint32_t)GPIOTE_CONFIG_POLARITY_Toggle << GPIOTE_CONFIG_POLARITY_Pos); + NRF_GPIOTE->CONFIG[obj->pwm] |= ((uint32_t)GPIOTE_CONFIG_POLARITY_LoToHi << GPIOTE_CONFIG_POLARITY_Pos); + } + } else { + NRF_GPIOTE->CONFIG[obj->pwm] &= ~((uint32_t)GPIOTE_CONFIG_OUTINIT_High << GPIOTE_CONFIG_OUTINIT_Pos); + + if (toggle) { + NRF_GPIOTE->CONFIG[obj->pwm] |= (GPIOTE_CONFIG_MODE_Task << GPIOTE_CONFIG_MODE_Pos) | + ((uint32_t)GPIOTE_CONFIG_POLARITY_Toggle << GPIOTE_CONFIG_POLARITY_Pos); + } else { + NRF_GPIOTE->CONFIG[obj->pwm] &= ~((uint32_t)GPIOTE_CONFIG_POLARITY_Toggle << GPIOTE_CONFIG_POLARITY_Pos); + NRF_GPIOTE->CONFIG[obj->pwm] |= ((uint32_t)GPIOTE_CONFIG_POLARITY_HiToLo << GPIOTE_CONFIG_POLARITY_Pos); + } + } +} + +void pwmout_init(pwmout_t *obj, PinName pin) +{ + // determine the channel + uint8_t pwmOutSuccess = 0; + PWMName pwm = (PWMName)pinmap_peripheral(pin, PinMap_PWM); + + MBED_ASSERT(pwm != (PWMName)NC); + + if (PWM_taken[(uint8_t)pwm]) { + for (uint8_t i = 1; !pwmOutSuccess && (ipwm = pwm; + obj->pin = pin; + + gpiote_init(pin, (uint8_t)pwm); + ppi_init((uint8_t)pwm); + + if (pwm == 0) { + NRF_POWER->TASKS_CONSTLAT = 1; + } + + timer_init((uint8_t)pwm); + + //default to 20ms: standard for servos, and fine for e.g. brightness control + pwmout_period_ms(obj, 20); + pwmout_write (obj, 0); +} + +void pwmout_free(pwmout_t *obj) +{ + MBED_ASSERT(obj->pwm != (PWMName)NC); + PWM_taken[obj->pwm] = 0; + pwmout_write(obj, 0); +} + +void pwmout_write(pwmout_t *obj, float value) +{ + uint16_t oldPulseWidth; + + NRF_TIMER2->EVENTS_COMPARE[3] = 0; + NRF_TIMER2->TASKS_STOP = 1; + + if (value < 0.0f) { + value = 0.0; + } else if (value > 1.0f) { + value = 1.0; + } + + oldPulseWidth = ACTUAL_PULSE[obj->pwm]; + ACTUAL_PULSE[obj->pwm] = PULSE_WIDTH[obj->pwm] = value * PERIOD; + + if (PULSE_WIDTH[obj->pwm] == 0) { + PULSE_WIDTH[obj->pwm] = 1; + setModulation(obj, 0, 0); + } else if (PULSE_WIDTH[obj->pwm] == PERIOD) { + PULSE_WIDTH[obj->pwm] = PERIOD - 1; + setModulation(obj, 0, 1); + } else if ((oldPulseWidth == 0) || (oldPulseWidth == PERIOD)) { + setModulation(obj, 1, oldPulseWidth == PERIOD); + } + + NRF_TIMER2->INTENSET = TIMER_INTENSET_COMPARE3_Msk; + NRF_TIMER2->SHORTS = TIMER_SHORTS_COMPARE3_CLEAR_Msk | TIMER_SHORTS_COMPARE3_STOP_Msk; + NRF_TIMER2->TASKS_START = 1; +} + +float pwmout_read(pwmout_t *obj) +{ + return ((float)PULSE_WIDTH[obj->pwm] / (float)PERIOD); +} + +void pwmout_period(pwmout_t *obj, float seconds) +{ + pwmout_period_us(obj, seconds * 1000000.0f); +} + +void pwmout_period_ms(pwmout_t *obj, int ms) +{ + pwmout_period_us(obj, ms * 1000); +} + +// Set the PWM period, keeping the duty cycle the same. +void pwmout_period_us(pwmout_t *obj, int us) +{ + (void) obj; // Avoid compiler warnings + uint32_t periodInTicks = us / TIMER_PRECISION; + + NRF_TIMER2->EVENTS_COMPARE[3] = 0; + NRF_TIMER2->TASKS_STOP = 1; + + if (periodInTicks>((1 << 16) - 1)) { + PERIOD = (1 << 16) - 1; //131ms + } else if (periodInTicks<5) { + PERIOD = 5; + } else { + PERIOD = periodInTicks; + } + NRF_TIMER2->INTENSET = TIMER_INTENSET_COMPARE3_Msk; + NRF_TIMER2->SHORTS = TIMER_SHORTS_COMPARE3_CLEAR_Msk | TIMER_SHORTS_COMPARE3_STOP_Msk; + NRF_TIMER2->TASKS_START = 1; +} + +void pwmout_pulsewidth(pwmout_t *obj, float seconds) +{ + pwmout_pulsewidth_us(obj, seconds * 1000000.0f); +} + +void pwmout_pulsewidth_ms(pwmout_t *obj, int ms) +{ + pwmout_pulsewidth_us(obj, ms * 1000); +} + +void pwmout_pulsewidth_us(pwmout_t *obj, int us) +{ + uint32_t pulseInTicks = us / TIMER_PRECISION; + uint16_t oldPulseWidth = ACTUAL_PULSE[obj->pwm]; + + NRF_TIMER2->EVENTS_COMPARE[3] = 0; + NRF_TIMER2->TASKS_STOP = 1; + + ACTUAL_PULSE[obj->pwm] = PULSE_WIDTH[obj->pwm] = pulseInTicks; + + if (PULSE_WIDTH[obj->pwm] == 0) { + PULSE_WIDTH[obj->pwm] = 1; + setModulation(obj, 0, 0); + } else if (PULSE_WIDTH[obj->pwm] == PERIOD) { + PULSE_WIDTH[obj->pwm] = PERIOD - 1; + setModulation(obj, 0, 1); + } else if ((oldPulseWidth == 0) || (oldPulseWidth == PERIOD)) { + setModulation(obj, 1, oldPulseWidth == PERIOD); + } + NRF_TIMER2->INTENSET = TIMER_INTENSET_COMPARE3_Msk; + NRF_TIMER2->SHORTS = TIMER_SHORTS_COMPARE3_CLEAR_Msk | TIMER_SHORTS_COMPARE3_STOP_Msk; + NRF_TIMER2->TASKS_START = 1; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/serial_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/serial_api.c new file mode 100644 index 0000000000..7abccc2e45 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/serial_api.c @@ -0,0 +1,305 @@ +/* mbed Microcontroller Library + * Copyright (c) 2013 Nordic Semiconductor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// math.h required for floating point operations for baud rate calculation +//#include +#include + +#include "mbed_assert.h" +#include "serial_api.h" +#include "cmsis.h" +#include "pinmap.h" + +/****************************************************************************** + * INITIALIZATION + ******************************************************************************/ +#define UART_NUM 1 + +static uint32_t serial_irq_ids[UART_NUM] = {0}; +static uart_irq_handler irq_handler; +static const uint32_t acceptedSpeeds[17][2] = { + {1200, UART_BAUDRATE_BAUDRATE_Baud1200}, + {2400, UART_BAUDRATE_BAUDRATE_Baud2400}, + {4800, UART_BAUDRATE_BAUDRATE_Baud4800}, + {9600, UART_BAUDRATE_BAUDRATE_Baud9600}, + {14400, UART_BAUDRATE_BAUDRATE_Baud14400}, + {19200, UART_BAUDRATE_BAUDRATE_Baud19200}, + {28800, UART_BAUDRATE_BAUDRATE_Baud28800}, + {31250, (0x00800000UL) /* 31250 baud */}, + {38400, UART_BAUDRATE_BAUDRATE_Baud38400}, + {57600, UART_BAUDRATE_BAUDRATE_Baud57600}, + {76800, UART_BAUDRATE_BAUDRATE_Baud76800}, + {115200, UART_BAUDRATE_BAUDRATE_Baud115200}, + {230400, UART_BAUDRATE_BAUDRATE_Baud230400}, + {250000, UART_BAUDRATE_BAUDRATE_Baud250000}, + {460800, UART_BAUDRATE_BAUDRATE_Baud460800}, + {921600, UART_BAUDRATE_BAUDRATE_Baud921600}, + {1000000, UART_BAUDRATE_BAUDRATE_Baud1M} +}; + +int stdio_uart_inited = 0; +serial_t stdio_uart; + +void serial_init(serial_t *obj, PinName tx, PinName rx) { + UARTName uart = UART_0; + obj->uart = (NRF_UART_Type *)uart; + + //pin configurations -- + NRF_GPIO->DIR |= (1 << tx); //TX_PIN_NUMBER); + NRF_GPIO->DIR |= (1 << RTS_PIN_NUMBER); + + NRF_GPIO->DIR &= ~(1 << rx); //RX_PIN_NUMBER); + NRF_GPIO->DIR &= ~(1 << CTS_PIN_NUMBER); + + + // set default baud rate and format + serial_baud (obj, 9600); + serial_format(obj, 8, ParityNone, 1); + + obj->uart->ENABLE = (UART_ENABLE_ENABLE_Enabled << UART_ENABLE_ENABLE_Pos); + obj->uart->TASKS_STARTTX = 1; + obj->uart->TASKS_STARTRX = 1; + obj->uart->EVENTS_RXDRDY = 0; + // dummy write needed or TXDRDY trails write rather than leads write. + // pins are disconnected so nothing is physically transmitted on the wire + obj->uart->TXD = 0; + + obj->index = 0; + + obj->uart->PSELRTS = RTS_PIN_NUMBER; + obj->uart->PSELTXD = tx; //TX_PIN_NUMBER; + obj->uart->PSELCTS = CTS_PIN_NUMBER; + obj->uart->PSELRXD = rx; //RX_PIN_NUMBER; + + // set rx/tx pins in PullUp mode + if (tx != NC) { + pin_mode(tx, PullUp); + } + if (rx != NC) { + pin_mode(rx, PullUp); + } + + if (uart == STDIO_UART) { + stdio_uart_inited = 1; + memcpy(&stdio_uart, obj, sizeof(serial_t)); + } +} + +void serial_free(serial_t *obj) +{ + serial_irq_ids[obj->index] = 0; +} + +// serial_baud +// set the baud rate, taking in to account the current SystemFrequency +void serial_baud(serial_t *obj, int baudrate) +{ + if (baudrate<=1200) { + obj->uart->BAUDRATE = UART_BAUDRATE_BAUDRATE_Baud1200; + return; + } + + for (int i = 1; i<17; i++) { + if (baudrateuart->BAUDRATE = acceptedSpeeds[i - 1][1]; + return; + } + } + obj->uart->BAUDRATE = UART_BAUDRATE_BAUDRATE_Baud1M; +} + +void serial_format(serial_t *obj, int data_bits, SerialParity parity, int stop_bits) +{ + /* Avoid compiler warnings */ + (void) data_bits; + (void) stop_bits; + + // 0: 1 stop bits, 1: 2 stop bits + // int parity_enable, parity_select; + switch (parity) { + case ParityNone: + obj->uart->CONFIG = 0; + break; + default: + obj->uart->CONFIG = (UART_CONFIG_PARITY_Included << UART_CONFIG_PARITY_Pos); + return; + } + //no Flow Control +} + +//****************************************************************************** +// * INTERRUPT HANDLING +//****************************************************************************** +static inline void uart_irq(uint32_t iir, uint32_t index) +{ + SerialIrq irq_type; + switch (iir) { + case 1: + irq_type = TxIrq; + break; + case 2: + irq_type = RxIrq; + break; + + default: + return; + } + + if (serial_irq_ids[index] != 0) { + irq_handler(serial_irq_ids[index], irq_type); + } +} + +#ifdef __cplusplus +extern "C" { +#endif +void UART0_IRQHandler() +{ + uint32_t irtype = 0; + + if((NRF_UART0->INTENSET & 0x80) && NRF_UART0->EVENTS_TXDRDY) { + irtype = 1; + } else if((NRF_UART0->INTENSET & 0x04) && NRF_UART0->EVENTS_RXDRDY) { + irtype = 2; + } + uart_irq(irtype, 0); +} + +#ifdef __cplusplus +} +#endif +void serial_irq_handler(serial_t *obj, uart_irq_handler handler, uint32_t id) +{ + irq_handler = handler; + serial_irq_ids[obj->index] = id; +} + +void serial_irq_set(serial_t *obj, SerialIrq irq, uint32_t enable) +{ + IRQn_Type irq_n = (IRQn_Type)0; + + switch ((int)obj->uart) { + case UART_0: + irq_n = UART0_IRQn; + break; + } + + if (enable) { + switch (irq) { + case RxIrq: + obj->uart->INTENSET = (UART_INTENSET_RXDRDY_Msk); + break; + case TxIrq: + obj->uart->INTENSET = (UART_INTENSET_TXDRDY_Msk); + break; + } + NVIC_SetPriority(irq_n, 3); + NVIC_EnableIRQ(irq_n); + } else { // disable + // maseked writes to INTENSET dont disable and masked writes to + // INTENCLR seemed to clear the entire register, not bits. + // Added INTEN to memory map and seems to allow set and clearing of specific bits as desired + int all_disabled = 0; + switch (irq) { + case RxIrq: + obj->uart->INTENCLR = (UART_INTENCLR_RXDRDY_Msk); + all_disabled = (obj->uart->INTENCLR & (UART_INTENCLR_TXDRDY_Msk)) == 0; + break; + case TxIrq: + obj->uart->INTENCLR = (UART_INTENCLR_TXDRDY_Msk); + all_disabled = (obj->uart->INTENCLR & (UART_INTENCLR_RXDRDY_Msk)) == 0; + break; + } + + if (all_disabled) { + NVIC_DisableIRQ(irq_n); + } + } +} + +//****************************************************************************** +//* READ/WRITE +//****************************************************************************** +int serial_getc(serial_t *obj) +{ + while (!serial_readable(obj)) { + } + + obj->uart->EVENTS_RXDRDY = 0; + + return (uint8_t)obj->uart->RXD; +} + +void serial_putc(serial_t *obj, int c) +{ + while (!serial_writable(obj)) { + } + + obj->uart->EVENTS_TXDRDY = 0; + obj->uart->TXD = (uint8_t)c; +} + +int serial_readable(serial_t *obj) +{ + return (obj->uart->EVENTS_RXDRDY == 1); +} + +int serial_writable(serial_t *obj) +{ + return (obj->uart->EVENTS_TXDRDY == 1); +} + +void serial_break_set(serial_t *obj) +{ + obj->uart->TASKS_SUSPEND = 1; +} + +void serial_break_clear(serial_t *obj) +{ + obj->uart->TASKS_STARTTX = 1; + obj->uart->TASKS_STARTRX = 1; +} + +void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, PinName txflow) +{ + + if (type == FlowControlRTSCTS || type == FlowControlRTS) { + NRF_GPIO->DIR |= (1<uart->PSELRTS = rxflow; + + obj->uart->CONFIG |= 0x01; // Enable HWFC + } + + if (type == FlowControlRTSCTS || type == FlowControlCTS) { + NRF_GPIO->DIR &= ~(1<uart->PSELCTS = txflow; + + obj->uart->CONFIG |= 0x01; // Enable HWFC; + } + + if (type == FlowControlNone) { + obj->uart->PSELRTS = 0xFFFFFFFF; // Disable RTS + obj->uart->PSELCTS = 0xFFFFFFFF; // Disable CTS + + obj->uart->CONFIG &= ~0x01; // Enable HWFC; + } +} + +void serial_clear(serial_t *obj) { + /* Avoid compiler warnings */ + (void) obj; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/sleep.c b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/sleep.c new file mode 100644 index 0000000000..44aa8ae59c --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/sleep.c @@ -0,0 +1,32 @@ +/* mbed Microcontroller Library + * Copyright (c) 2006-2015 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "sleep_api.h" +#include "cmsis.h" +#include "mbed_interface.h" + +void sleep(void) +{ + // ensure debug is disconnected if semihost is enabled.... + NRF_POWER->TASKS_LOWPWR = 1; + // wait for interrupt + __WFE(); +} + +void deepsleep(void) +{ + sleep(); + // NRF_POWER->SYSTEMOFF=1; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/spi_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/spi_api.c new file mode 100644 index 0000000000..c26590587d --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/spi_api.c @@ -0,0 +1,243 @@ +/* mbed Microcontroller Library + * Copyright (c) 2013 Nordic Semiconductor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +//#include +#include "mbed_assert.h" +#include "mbed_error.h" +#include "spi_api.h" +#include "cmsis.h" +#include "pinmap.h" + +#define SPIS_MESSAGE_SIZE 1 +volatile uint8_t m_tx_buf[SPIS_MESSAGE_SIZE] = {0}; +volatile uint8_t m_rx_buf[SPIS_MESSAGE_SIZE] = {0}; + +// nRF51822's I2C_0 and SPI_0 (I2C_1, SPI_1 and SPIS1) share the same address. +// They can't be used at the same time. So we use two global variable to track the usage. +// See nRF51822 address information at nRF51822_PS v2.0.pdf - Table 15 Peripheral instance reference +extern volatile i2c_spi_peripheral_t i2c0_spi0_peripheral; // from i2c_api.c +extern volatile i2c_spi_peripheral_t i2c1_spi1_peripheral; + +void spi_init(spi_t *obj, PinName mosi, PinName miso, PinName sclk, PinName ssel) +{ + SPIName spi = SPI_0; // Initialize to avoid compiler warnings + + if (ssel == NC && i2c0_spi0_peripheral.usage == I2C_SPI_PERIPHERAL_FOR_SPI && + i2c0_spi0_peripheral.sda_mosi == (uint8_t)mosi && + i2c0_spi0_peripheral.scl_miso == (uint8_t)miso && + i2c0_spi0_peripheral.sclk == (uint8_t)sclk) { + // The SPI with the same pins is already initialized + spi = SPI_0; + obj->peripheral = 0x1; + } else if (ssel == NC && i2c1_spi1_peripheral.usage == I2C_SPI_PERIPHERAL_FOR_SPI && + i2c1_spi1_peripheral.sda_mosi == (uint8_t)mosi && + i2c1_spi1_peripheral.scl_miso == (uint8_t)miso && + i2c1_spi1_peripheral.sclk == (uint8_t)sclk) { + // The SPI with the same pins is already initialized + spi = SPI_1; + obj->peripheral = 0x2; + } else if (i2c1_spi1_peripheral.usage == 0) { + i2c1_spi1_peripheral.usage = I2C_SPI_PERIPHERAL_FOR_SPI; + i2c1_spi1_peripheral.sda_mosi = (uint8_t)mosi; + i2c1_spi1_peripheral.scl_miso = (uint8_t)miso; + i2c1_spi1_peripheral.sclk = (uint8_t)sclk; + + spi = SPI_1; + obj->peripheral = 0x2; + } else if (i2c0_spi0_peripheral.usage == 0) { + i2c0_spi0_peripheral.usage = I2C_SPI_PERIPHERAL_FOR_SPI; + i2c0_spi0_peripheral.sda_mosi = (uint8_t)mosi; + i2c0_spi0_peripheral.scl_miso = (uint8_t)miso; + i2c0_spi0_peripheral.sclk = (uint8_t)sclk; + + spi = SPI_0; + obj->peripheral = 0x1; + } else { + // No available peripheral + error("No available SPI"); + } + + if (ssel==NC) { + obj->spi = (NRF_SPI_Type *)spi; + obj->spis = (NRF_SPIS_Type *)NC; + } else { + obj->spi = (NRF_SPI_Type *)NC; + obj->spis = (NRF_SPIS_Type *)spi; + } + + //master +// TODO: understand implication of this on nrf52 +// obj->spi->POWER = 0; +// obj->spi->POWER = 1; + + //NRF_GPIO->DIR |= (1<PIN_CNF[mosi] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) + | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) + | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) + | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) + | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); + obj->spi->PSELMOSI = mosi; + + NRF_GPIO->PIN_CNF[sclk] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) + | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) + | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) + | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) + | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); + obj->spi->PSELSCK = sclk; + + //NRF_GPIO->DIR &= ~(1<PIN_CNF[miso] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) + | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) + | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) + | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) + | (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos); + + obj->spi->PSELMISO = miso; + + obj->spi->EVENTS_READY = 0U; + +// spi_format(obj, 8, 0, SPI_MSB); // 8 bits, mode 0, master + spi_frequency(obj, 1000000); +} + +void spi_free(spi_t *obj) +{ + (void) obj; // Avoid compiler warnings +} + +static inline void spi_disable(spi_t *obj, int slave) +{ + obj->spi->ENABLE = (SPI_ENABLE_ENABLE_Disabled << SPI_ENABLE_ENABLE_Pos); +} + +static inline void spi_enable(spi_t *obj, int slave) +{ + obj->spi->ENABLE = (SPI_ENABLE_ENABLE_Enabled << SPI_ENABLE_ENABLE_Pos); +} + +void spi_format(spi_t *obj, int bits, int mode, int slave) +{ + uint32_t config_mode = 0; + spi_disable(obj, slave); + + if (bits != 8) { + error("Only 8bits SPI supported"); + } + + switch (mode) { + case 0: + config_mode = (SPI_CONFIG_CPHA_Leading << SPI_CONFIG_CPHA_Pos) | (SPI_CONFIG_CPOL_ActiveHigh << SPI_CONFIG_CPOL_Pos); + break; + case 1: + config_mode = (SPI_CONFIG_CPHA_Trailing << SPI_CONFIG_CPHA_Pos) | (SPI_CONFIG_CPOL_ActiveHigh << SPI_CONFIG_CPOL_Pos); + break; + case 2: + config_mode = (SPI_CONFIG_CPHA_Leading << SPI_CONFIG_CPHA_Pos) | (SPI_CONFIG_CPOL_ActiveLow << SPI_CONFIG_CPOL_Pos); + break; + case 3: + config_mode = (SPI_CONFIG_CPHA_Trailing << SPI_CONFIG_CPHA_Pos) | (SPI_CONFIG_CPOL_ActiveLow << SPI_CONFIG_CPOL_Pos); + break; + default: + error("SPI format error"); + break; + } + + //obj->spi->CONFIG = (config_mode | (((order == SPI_MSB) ? SPI_CONFIG_ORDER_MsbFirst : SPI_CONFIG_ORDER_LsbFirst) << SPI_CONFIG_ORDER_Pos)); + + //default to msb first + if (slave) { + obj->spis->CONFIG = (config_mode | (SPI_CONFIG_ORDER_MsbFirst << SPI_CONFIG_ORDER_Pos)); + } else { + obj->spi->CONFIG = (config_mode | (SPI_CONFIG_ORDER_MsbFirst << SPI_CONFIG_ORDER_Pos)); + } + + spi_enable(obj, slave); +} + +void spi_frequency(spi_t *obj, int hz) +{ + if ((int)obj->spi==NC) { + return; + } + spi_disable(obj, 0); + + if (hz<250000) { //125Kbps + obj->spi->FREQUENCY = (uint32_t) SPI_FREQUENCY_FREQUENCY_K125; + } else if (hz<500000) { //250Kbps + obj->spi->FREQUENCY = (uint32_t) SPI_FREQUENCY_FREQUENCY_K250; + } else if (hz<1000000) { //500Kbps + obj->spi->FREQUENCY = (uint32_t) SPI_FREQUENCY_FREQUENCY_K500; + } else if (hz<2000000) { //1Mbps + obj->spi->FREQUENCY = (uint32_t) SPI_FREQUENCY_FREQUENCY_M1; + } else if (hz<4000000) { //2Mbps + obj->spi->FREQUENCY = (uint32_t) SPI_FREQUENCY_FREQUENCY_M2; + } else if (hz<8000000) { //4Mbps + obj->spi->FREQUENCY = (uint32_t) SPI_FREQUENCY_FREQUENCY_M4; + } else { //8Mbps + obj->spi->FREQUENCY = (uint32_t) SPI_FREQUENCY_FREQUENCY_M8; + } + + spi_enable(obj, 0); +} + +static inline int spi_readable(spi_t *obj) +{ + return (obj->spi->EVENTS_READY == 1); +} + +static inline int spi_writeable(spi_t *obj) +{ + return (obj->spi->EVENTS_READY == 0); +} + +static inline int spi_read(spi_t *obj) +{ + while (!spi_readable(obj)) { + } + + obj->spi->EVENTS_READY = 0; + return (int)obj->spi->RXD; +} + +int spi_master_write(spi_t *obj, int value) +{ + while (!spi_writeable(obj)) { + } + obj->spi->TXD = (uint32_t)value; + return spi_read(obj); +} + +//static inline int spis_writeable(spi_t *obj) { +// return (obj->spis->EVENTS_ACQUIRED==1); +//} + +int spi_slave_receive(spi_t *obj) +{ + return obj->spis->EVENTS_END; +} + +int spi_slave_read(spi_t *obj) +{ + (void) obj; // Avoid compiler warnings + return m_rx_buf[0]; +} + +void spi_slave_write(spi_t *obj, int value) +{ + m_tx_buf[0] = value & 0xFF; + obj->spis->TASKS_RELEASE = 1; + obj->spis->EVENTS_ACQUIRED = 0; + obj->spis->EVENTS_END = 0; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/us_ticker.c b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/us_ticker.c new file mode 100644 index 0000000000..db558a7883 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/us_ticker.c @@ -0,0 +1,277 @@ +/* mbed Microcontroller Library + * Copyright (c) 2013 Nordic Semiconductor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include "us_ticker_api.h" +#include "cmsis.h" +#include "PeripheralNames.h" +#include "nrf_delay.h" + +/* + * Note: The micro-second timer API on the nRF51 platform is implemented using + * the RTC counter run at 32kHz (sourced from an external oscillator). This is + * a trade-off between precision and power. Running a normal 32-bit MCU counter + * at high frequency causes the average power consumption to rise to a few + * hundred micro-amps, which is prohibitive for typical low-power BLE + * applications. + * A 32kHz clock doesn't offer the precision needed for keeping u-second time, + * but we're assuming that this will not be a problem for the average user. + */ + +#define MAX_RTC_COUNTER_VAL 0x00FFFFFF /**< Maximum value of the RTC counter. */ +#define RTC_CLOCK_FREQ (uint32_t)(32768) +#define RTC1_IRQ_PRI 3 /**< Priority of the RTC1 interrupt (used + * for checking for timeouts and executing + * timeout handlers). This must be the same + * as APP_IRQ_PRIORITY_LOW; taken from the + * Nordic SDK. */ +#define MAX_RTC_TASKS_DELAY 47 /**< Maximum delay until an RTC task is executed. */ + +#define FUZZY_RTC_TICKS 2 /* RTC COMPARE occurs when a CC register is N and the RTC + * COUNTER value transitions from N-1 to N. If we're trying to + * setup a callback for a time which will arrive very shortly, + * there are limits to how short the callback interval may be for us + * to rely upon the RTC Compare trigger. If the COUNTER is N, + * writing N+2 to a CC register is guaranteed to trigger a COMPARE + * event at N+2. */ + +#define RTC_UNITS_TO_MICROSECONDS(RTC_UNITS) (((RTC_UNITS) * (uint64_t)1000000) / RTC_CLOCK_FREQ) +#define MICROSECONDS_TO_RTC_UNITS(MICROS) ((((uint64_t)(MICROS) * RTC_CLOCK_FREQ) + 999999) / 1000000) + +static bool us_ticker_inited = false; +static volatile bool us_ticker_callbackPending = false; +static uint32_t us_ticker_callbackTimestamp; +volatile uint32_t overflowCount; /**< The number of times the 24-bit RTC counter has overflowed. */ + +static inline void rtc1_enableCompareInterrupt(void) +{ + NRF_RTC1->EVTENCLR = RTC_EVTEN_COMPARE0_Msk; + NRF_RTC1->INTENSET = RTC_INTENSET_COMPARE0_Msk; +} + +static inline void rtc1_disableCompareInterrupt(void) +{ + NRF_RTC1->INTENCLR = RTC_INTENSET_COMPARE0_Msk; + NRF_RTC1->EVTENCLR = RTC_EVTEN_COMPARE0_Msk; +} + +static inline void rtc1_enableOverflowInterrupt(void) +{ + NRF_RTC1->EVTENCLR = RTC_EVTEN_OVRFLW_Msk; + NRF_RTC1->INTENSET = RTC_INTENSET_OVRFLW_Msk; +} + +static inline void rtc1_disableOverflowInterrupt(void) +{ + NRF_RTC1->INTENCLR = RTC_INTENSET_OVRFLW_Msk; + NRF_RTC1->EVTENCLR = RTC_EVTEN_OVRFLW_Msk; +} + +static inline void invokeCallback(void) +{ + us_ticker_callbackPending = false; + rtc1_disableCompareInterrupt(); + us_ticker_irq_handler(); +} + +/** + * @brief Function for starting the RTC1 timer. The RTC timer is expected to + * keep running--some interrupts may be disabled temporarily. + */ +static void rtc1_start() +{ + NRF_RTC1->PRESCALER = 0; /* for no pre-scaling. */ + + rtc1_enableOverflowInterrupt(); + + NVIC_SetPriority(RTC1_IRQn, RTC1_IRQ_PRI); + NVIC_ClearPendingIRQ(RTC1_IRQn); + NVIC_EnableIRQ(RTC1_IRQn); + + NRF_RTC1->TASKS_START = 1; + nrf_delay_us(MAX_RTC_TASKS_DELAY); +} + +/** + * @brief Function for stopping the RTC1 timer. We don't expect to call this. + */ +void rtc1_stop(void) +{ + NVIC_DisableIRQ(RTC1_IRQn); + rtc1_disableCompareInterrupt(); + rtc1_disableOverflowInterrupt(); + + NRF_RTC1->TASKS_STOP = 1; + nrf_delay_us(MAX_RTC_TASKS_DELAY); + + NRF_RTC1->TASKS_CLEAR = 1; + nrf_delay_us(MAX_RTC_TASKS_DELAY); +} + +/** + * @brief Function for returning the current value of the RTC1 counter. + * + * @return Current RTC1 counter as a 64-bit value with 56-bit precision (even + * though the underlying counter is 24-bit) + */ +static inline uint64_t rtc1_getCounter64(void) +{ + if (NRF_RTC1->EVENTS_OVRFLW) { + overflowCount++; + NRF_RTC1->EVENTS_OVRFLW = 0; + NRF_RTC1->EVTENCLR = RTC_EVTEN_OVRFLW_Msk; + } + return ((uint64_t)overflowCount << 24) | NRF_RTC1->COUNTER; +} + +/** + * @brief Function for returning the current value of the RTC1 counter. + * + * @return Current RTC1 counter as a 32-bit value (even though the underlying counter is 24-bit) + */ +uint32_t rtc1_getCounter(void) +{ + return rtc1_getCounter64(); +} + +/** + * @brief Function for handling the RTC1 interrupt. + * + * @details Checks for timeouts, and executes timeout handlers for expired timers. + */ +void RTC1_IRQHandler(void) +{ + if (NRF_RTC1->EVENTS_OVRFLW) { + overflowCount++; + NRF_RTC1->EVENTS_OVRFLW = 0; + NRF_RTC1->EVTENCLR = RTC_EVTEN_OVRFLW_Msk; + } + if (NRF_RTC1->EVENTS_COMPARE[0] && us_ticker_callbackPending && ((int)(us_ticker_callbackTimestamp - rtc1_getCounter()) <= 0)) { + NRF_RTC1->EVENTS_COMPARE[0] = 0; + NRF_RTC1->EVTENCLR = RTC_EVTEN_COMPARE0_Msk; + invokeCallback(); + } + if (NRF_RTC1->EVENTS_COMPARE[1]) { + // Compare[1] used by lp ticker + NRF_RTC1->EVENTS_COMPARE[1] = 0; + NRF_RTC1->EVTENCLR = RTC_EVTEN_COMPARE1_Msk; + } +} + +void us_ticker_init(void) +{ + if (us_ticker_inited) { + return; + } + + rtc1_start(); + us_ticker_inited = true; +} + +uint32_t us_ticker_read() +{ + if (!us_ticker_inited) { + us_ticker_init(); + } + + /* Return a pseudo microsecond counter value. This is only as precise as the + * 32khz low-freq clock source, but could be adequate.*/ + return RTC_UNITS_TO_MICROSECONDS(rtc1_getCounter64()); +} + +/** + * Setup the us_ticker callback interrupt to go at the given timestamp. + * + * @Note: Only one callback is pending at any time. + * + * @Note: If a callback is pending, and this function is called again, the new + * callback-time overrides the existing callback setting. It is the caller's + * responsibility to ensure that this function is called to setup a callback for + * the earliest timeout. + * + * @Note: If this function is used to setup an interrupt which is immediately + * pending--such as for 'now' or a time in the past,--then the callback is + * invoked a few ticks later. + */ +void us_ticker_set_interrupt(timestamp_t timestamp) +{ + if (!us_ticker_inited) { + us_ticker_init(); + } + + /* + * The argument to this function is a 32-bit microsecond timestamp for when + * a callback should be invoked. On the nRF51, we use an RTC timer running + * at 32kHz to implement a low-power us-ticker. This results in a problem + * based on the fact that 1000000 is not a multiple of 32768. + * + * Going from a micro-second based timestamp to a 32kHz based RTC-time is a + * linear mapping; but this mapping doesn't preserve wraparounds--i.e. when + * the 32-bit micro-second timestamp wraps around unfortunately the + * underlying RTC counter doesn't. The result is that timestamp expiry + * checks on micro-second timestamps don't yield the same result when + * applied on the corresponding RTC timestamp values. + * + * One solution is to translate the incoming 32-bit timestamp into a virtual + * 64-bit timestamp based on the knowledge of system-uptime, and then use + * this wraparound-free 64-bit value to do a linear mapping to RTC time. + * System uptime on an nRF is maintained using the 24-bit RTC counter. We + * track the overflow count to extend the 24-bit hardware counter by an + * additional 32 bits. RTC_UNITS_TO_MICROSECONDS() converts this into + * microsecond units (in 64-bits). + */ + const uint64_t currentTime64 = RTC_UNITS_TO_MICROSECONDS(rtc1_getCounter64()); + uint64_t timestamp64 = (currentTime64 & ~(uint64_t)0xFFFFFFFFULL) + timestamp; + if (((uint32_t)currentTime64 > 0x80000000) && (timestamp < 0x80000000)) { + timestamp64 += (uint64_t)0x100000000ULL; + } + uint32_t newCallbackTime = MICROSECONDS_TO_RTC_UNITS(timestamp64); + + /* Check for repeat setup of an existing callback. This is actually not + * important; the following code should work even without this check. */ + if (us_ticker_callbackPending && (newCallbackTime == us_ticker_callbackTimestamp)) { + return; + } + + /* Check for callbacks which are immediately (or will *very* shortly become) pending. + * Even if they are immediately pending, they are scheduled to trigger a few + * ticks later. This keeps things simple by invoking the callback from an + * independent interrupt context. */ + if ((int)(newCallbackTime - rtc1_getCounter()) <= (int)FUZZY_RTC_TICKS) { + newCallbackTime = rtc1_getCounter() + FUZZY_RTC_TICKS; + } + + NRF_RTC1->CC[0] = newCallbackTime & MAX_RTC_COUNTER_VAL; + us_ticker_callbackTimestamp = newCallbackTime; + if (!us_ticker_callbackPending) { + us_ticker_callbackPending = true; + rtc1_enableCompareInterrupt(); + } +} + +void us_ticker_disable_interrupt(void) +{ + if (us_ticker_callbackPending) { + rtc1_disableCompareInterrupt(); + us_ticker_callbackPending = false; + } +} + +void us_ticker_clear_interrupt(void) +{ + NRF_RTC1->EVENTS_OVRFLW = 0; + NRF_RTC1->EVENTS_COMPARE[0] = 0; +} From aa19a973cd570eb26a1b91d47050e4c7eaa11e07 Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Tue, 14 Jun 2016 22:40:15 +0100 Subject: [PATCH 03/67] RTX port for nrf52 based targets. --- rtos/rtx/TARGET_CORTEX_M/RTX_CM_lib.h | 3 +++ rtos/rtx/TARGET_CORTEX_M/RTX_Conf_CM.c | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/rtos/rtx/TARGET_CORTEX_M/RTX_CM_lib.h b/rtos/rtx/TARGET_CORTEX_M/RTX_CM_lib.h index 2f6b7574c5..79504d4d68 100755 --- a/rtos/rtx/TARGET_CORTEX_M/RTX_CM_lib.h +++ b/rtos/rtx/TARGET_CORTEX_M/RTX_CM_lib.h @@ -510,6 +510,9 @@ osThreadDef_t os_thread_def_main = {(os_pthread)pre_main, osPriorityNormal, 1U, #elif defined(TARGET_MCU_NORDIC_16K) #define INITIAL_SP (0x20004000UL) +#elif defined(TARGET_MCU_NRF52832) +#define INITIAL_SP (0x20010000UL) + #else #error "no target defined" diff --git a/rtos/rtx/TARGET_CORTEX_M/RTX_Conf_CM.c b/rtos/rtx/TARGET_CORTEX_M/RTX_Conf_CM.c index 09526f1859..3838f0e3dd 100755 --- a/rtos/rtx/TARGET_CORTEX_M/RTX_Conf_CM.c +++ b/rtos/rtx/TARGET_CORTEX_M/RTX_Conf_CM.c @@ -64,7 +64,7 @@ || defined(TARGET_STM32F103RB) || defined(TARGET_LPC824) || defined(TARGET_STM32F302R8) || defined(TARGET_STM32F334R8) || defined(TARGET_STM32F334C8) \ || defined(TARGET_STM32L031K6) || defined(TARGET_STM32L053R8) || defined(TARGET_STM32L053C8) || defined(TARGET_STM32L073RZ) || defined(TARGET_STM32F072RB) || defined(TARGET_STM32F091RC) || defined(TARGET_NZ32_SC151) \ || defined(TARGET_SSCI824) || defined(TARGET_STM32F030R8) || defined(TARGET_STM32F070RB) \ - || defined(TARGET_EFM32HG_STK3400) || defined(TARGET_MCU_NRF51822) || defined(TARGET_BEETLE) + || defined(TARGET_EFM32HG_STK3400) || defined(TARGET_MCU_NRF51822) || defined(TARGET_BEETLE) || defined(TARGET_MCU_NRF52832) # define OS_TASKCNT 6 # else # error "no target defined" @@ -104,7 +104,7 @@ || defined(TARGET_STM32L031K6) || defined(TARGET_STM32L053R8) || defined(TARGET_STM32L053C8) || defined(TARGET_STM32L073RZ) \ || defined(TARGET_EFM32HG_STK3400) || defined(TARGET_BEETLE) # define OS_MAINSTKSIZE 112 -# elif defined(TARGET_MCU_NRF51822) +# elif defined(TARGET_MCU_NRF51822) || defined(TARGET_MCU_NRF52832) # define OS_MAINSTKSIZE 512 # else # error "no target defined" @@ -264,6 +264,9 @@ #elif defined(TARGET_MCU_NRF51822) # define OS_CLOCK 32768 +#elif defined(TARGET_MCU_NRF52832) +# define OS_CLOCK 64000000 + # else # error "no target defined" # endif From a3b9c78df6f8dcddea1e924bfb10ca4ee59c1852 Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Wed, 15 Jun 2016 11:26:53 +0100 Subject: [PATCH 04/67] Update detection code for NRF52. --- hal/targets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hal/targets.json b/hal/targets.json index ba147f4ca9..271f65a4de 100644 --- a/hal/targets.json +++ b/hal/targets.json @@ -1744,7 +1744,7 @@ "is_disk_virtual": true, "supported_toolchains": ["ARM", "GCC_ARM"], "public": false, - "detect_code": ["1070"], + "detect_code": ["1101"], "program_cycle_s": 6, "MERGE_SOFT_DEVICE": true, "EXPECTED_SOFTDEVICES_WITH_OFFSETS": [ From 70ffeb61be06a95c3c4f5a814540f3984530bad0 Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Wed, 15 Jun 2016 11:27:44 +0100 Subject: [PATCH 05/67] Add softdevice S132 binary for nrf52 targets. --- .../s132_nrf52_2.0.0_softdevice.hex | 6918 +++++++++++++++++ 1 file changed, 6918 insertions(+) create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/Lib/s132_nrf52_2_0_0/s132_nrf52_2.0.0_softdevice.hex diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/Lib/s132_nrf52_2_0_0/s132_nrf52_2.0.0_softdevice.hex b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/Lib/s132_nrf52_2_0_0/s132_nrf52_2.0.0_softdevice.hex new file mode 100644 index 0000000000..a61b7c914c --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/Lib/s132_nrf52_2_0_0/s132_nrf52_2.0.0_softdevice.hex @@ -0,0 +1,6918 @@ +:020000040000FA +:1000000000040020E508000079050000C508000094 +:10001000830500008D05000097050000000000002A +:1000200000000000000000000000000009090000BE +:10003000A105000000000000AB050000B5050000B0 +:10004000BF050000C9050000D3050000DD05000064 +:10005000E7050000F1050000FB05000005060000B3 +:100060000F06000019060000230600002D06000000 +:1000700037060000410600004B0600005506000050 +:100080005F06000069060000730600007D060000A0 +:1000900087060000910600009B060000A5060000F0 +:1000A000AF060000B9060000C3060000CD06000040 +:1000B000D7060000E1060000EB060000F506000090 +:1000C000FF06000009070000130700001D070000DD +:1000D00027070000310700003B070000450700002C +:1000E0004F07000059070000630700006D0700007C +:1000F00077070000810700008B07000095070000CC +:100100009F0700001FB500F003F88DE80F001FBD2A +:1001100000F0DEBB1FB56FF00100009040100390AF +:10012000029001904FF010208069000B420900F00E +:100130001F045DF822300120A04083434DF8223097 +:10014000684600F044F91FBDF0B54FF6FF734FF459 +:10015000B4751A466E1E11E0A94201D3344600E080 +:100160000C46091B30F8027B641E3B441A44F9D14B +:100170009CB204EB134394B204EB12420029EBD17E +:1001800098B200EB134002EB124140EA0140F0BD8F +:10019000DD4992B00446D1E90001CDE91001FF220A +:1001A0004021684600F03AFB94E80F008DE80F000C +:1001B000684610A902E004C841F8042D8842FAD12B +:1001C00010216846FFF7C0FF1090AA208DF8440068 +:1001D000FFF7A0FF00F0F2F84FF01024A069102202 +:1001E0006946803000F001F9A069082210A900F0EA +:1001F000FCF800F0D7F84FF080510A6949690068AF +:100200004A43824201D8102070470020704710B541 +:10021000D0E900214FF0805002EB8103026944696C +:100220006243934209D84FF01022536903EB8103D4 +:100230000169406941438B4201D9092010BD5069D1 +:10024000401C01D0002010BD0F2010BD70B501680A +:100250000446AE4D4FF01020062951D2DFE801F0E0 +:10026000320318283B1DD4E90265646829463046EC +:1002700000F0CDF82A462146304600F0B6F8AA0034 +:100280002146304600F09EFA002800D0032070BDC1 +:1002900000F050FB4FF4805007E0201DFFF7ABFF4C +:1002A0000028F4D100F046FB60682860002070BD93 +:1002B000241D94E80700920000F084FA0028F6D08C +:1002C0000E2070BD8069401C12D0201DFFF79FFFDB +:1002D0000028F6D109E08069401C09D0201DFFF7F5 +:1002E0008AFF0028EDD1606820B12046FFF750FF5B +:1002F000042070BDFFF70EFF00F060F800F052F828 +:10030000072070BD10B50C46182802D001200860E7 +:1003100010BD2068FFF79AFF206010BD4FF0102439 +:10032000A069401C05D0A569A66980353079AA2846 +:1003300008D06069401C2DD060690068401C29D03D +:1003400060692CE010212846FFF7FEFE31688142EB +:100350001CD1A16901F18002C03105E030B108CAA9 +:1003600051F8040D984201D1012000E000208A429A +:10037000F4D158B1286810B1042803D0FEE728460C +:1003800000F057F861496868086008E000F016F866 +:1003900000F008F84FF480500168491C01D000F0CB +:1003A000A3FAFEE7BFF34F8F59480168594A01F499 +:1003B000E06111430160BFF34F8FFEE74FF0102063 +:1003C0008169491C02D0806900F0ADB87047524A7B +:1003D00001681160121D416811604F4A8168103236 +:1003E0001160111DC068086070472DE9F041174683 +:1003F0000D460646002406E03046296800F0A6F8BF +:10040000641C2D1D361DBC42F6D3BDE8F08170B5CD +:100410000C4605464FF4806608E0284600F083F855 +:10042000B44205D3A4F5806405F58055002CF4D1C1 +:1004300070BD4168044609B1012500E000254FF078 +:1004400010267069A268920000F0BCF9C8B120467D +:1004500000F01AF89DB17669A56864684FF4002031 +:1004600084420AD2854208D229463046FFF7CFFFA0 +:100470002A4621463046FFF7B8FFFFF79FFFFFF7F8 +:1004800091FFFFF747FEF8E72DE9FF414FF01024F9 +:10049000616980680D0B01EB800000F6FF70010BB5 +:1004A00000200090019002900246039068460123CC +:1004B0000BE0560902F01F0C50F8267003FA0CFCF2 +:1004C00047EA0C0740F82670521CAA42F1D30AE012 +:1004D0004A0901F01F0650F8225003FA06F6354388 +:1004E00040F82250491C8029F2D3A169090B4A091E +:1004F00001F01F0150F822408B409C4340F82240FD +:10050000FFF765FFBDE8FF815809000000000020EB +:100510000CED00E00400FA050006004014480168F4 +:100520000029FCD07047134A0221116010490B6862 +:10053000002BFCD00F4B1B1D186008680028FCD056 +:100540000020106008680028FCD07047094B10B5E7 +:1005500001221A60064A1468002CFCD00160106861 +:100560000028FCD00020186010680028FCD010BDC6 +:1005700000E4014004E5014008208F49096809585A +:10058000084710208C4909680958084714208A49EF +:100590000968095808471820874909680958084711 +:1005A0003020854909680958084738208249096878 +:1005B000095808473C2080490968095808474020E5 +:1005C0007D4909680958084744207B49096809584A +:1005D0000847482078490968095808474C20764957 +:1005E000096809580847502073490968095808479D +:1005F0005420714909680958084758206E4909680C +:10060000095808475C206C49096809580847602068 +:100610006949096809580847642067490968095801 +:100620000847682064490968095808476C206249EE +:1006300009680958084770205F4909680958084740 +:1006400074205D4909680958084778205A490968A3 +:10065000095808477C2058490968095808478020EC +:1006600055490968095808478420534909680958B9 +:100670000847882050490968095808478C204E4986 +:1006800009680958084790204B49096809580847E4 +:10069000942049490968095808479820464909683B +:1006A000095808479C204449096809580847A02070 +:1006B0004149096809580847A4203F490968095871 +:1006C0000847A8203C49096809580847AC203A491E +:1006D000096809580847B020374909680958084788 +:1006E000B4203549096809580847B82032490968D3 +:1006F00009580847BC203049096809580847C020F4 +:100700002D49096809580847C4202B490968095828 +:100710000847C8202849096809580847CC202649B5 +:10072000096809580847D02023490968095808472B +:10073000D4202149096809580847D8201E4909686A +:1007400009580847DC201C49096809580847E02077 +:100750001949096809580847E420174909680958E0 +:100760000847E8201449096809580847EC2012494D +:10077000096809580847F0200F49096809580847CF +:10078000F4200D49096809580847F8200A49096802 +:1007900009580847FC2008490968095808475FF4C8 +:1007A0008070054909680958084700000348044952 +:1007B000024A034B70470000000000206809000057 +:1007C0006809000040EA010310B59B070FD1042A15 +:1007D0000DD310C808C9121F9C42F8D020BA19BA0C +:1007E000884201D9012010BD4FF0FF3010BD1AB171 +:1007F000D30703D0521C07E0002010BD10F8013BC6 +:1008000011F8014B1B1B07D110F8013B11F8014BEC +:100810001B1B01D1921EF1D1184610BD02F0FF033F +:1008200043EA032242EA024200F005B870477047EB +:1008300070474FF000020429C0F0128010F0030C42 +:1008400000F01B80CCF1040CBCF1020F18BF00F8C3 +:10085000012BA8BF20F8022BA1EB0C0100F00DB872 +:100860005FEAC17C24BF00F8012B00F8012B48BFD0 +:1008700000F8012B70474FF0000200B51346944674 +:100880009646203922BFA0E80C50A0E80C50B1F1E8 +:100890002001BFF4F7AF090728BFA0E80C5048BFFC +:1008A0000CC05DF804EB890028BF40F8042B08BF9A +:1008B000704748BF20F8022B11F0804F18BF00F896 +:1008C000012B7047014B1B68DB68184700000020B4 +:1008D00009480A497047FFF7FBFFFFF713FC00BD0B +:1008E00020BFFDE7064B1847064A1060016881F3F8 +:1008F0000888406800470000680900006809000097 +:100900001D030000000000201EF0040F0CBFEFF3D9 +:100910000881EFF30981886902380078182803D12B +:1009200000E00000074A1047074A12682C3212689C +:100930001047000000B5054B1B68054A9B589847B7 +:1009400000BD000005030000000000205409000065 +:1009500004000000001000000000000000FFFFFF86 +:040960000090D00330 +:10100000881100207DB0010079960000CDAF01006D +:1010100079960000799600007996000000000000A3 +:10102000000000000000000000000000D9B0010036 +:101030007996000000000000799600007996000083 +:1010400041B1010047B10100799600007996000096 +:101050007996000079960000799600007996000054 +:101060004DB10100799600007996000053B101005E +:101070007996000059B101005FB1010065B101002E +:101080007996000079960000799600007996000024 +:101090007996000079960000799600007996000014 +:1010A0006BB1010071B101007996000079960000E2 +:1010B00079960000799600007996000079960000F4 +:1010C00077B10100799600007996000079960000CA +:1010D00079960000799600007996000079960000D4 +:1010E00079960000799600007996000079960000C4 +:1010F00079960000799600007996000079960000B4 +:10110000799600007996000000F002F819F093FF3C +:101110000AA090E8000C82448344AAF10107DA4552 +:1011200001D119F088FFAFF2090EBAE80F0013F0F1 +:10113000010F18BFFB1A43F00103184734A5010043 +:1011400054A501000A4410F8014B14F00F0508BF24 +:1011500010F8015B240908BF10F8014B6D1E05D083 +:1011600010F8013B6D1E01F8013BF9D1641E03D05C +:10117000641E01F8015BFBD19142E4D3704700008B +:101180000023002400250026103A28BF78C1FBD890 +:10119000520728BF30C148BF0B6070471FB500F031 +:1011A0003DF88DE80F001FBD1EF0040F0CBFEFF3DC +:1011B0000880EFF30980014A10470000CB9400003B +:1011C0008269034981614FF00100104470470000BB +:1011D000D511000001B41EB400B510F085F901B4BA +:1011E0000198864601BC01B01EBD0000F0B4404627 +:1011F000494652465B460FB402A0013001B506488D +:10120000004700BF01BC86460FBC80468946924617 +:101210009B46F0BC704700000911000019F008BFA0 +:1012200070B51C4C054608202070A01C00F065F825 +:101230005920A08029462046BDE8704006F067BBD3 +:1012400010B506F06FFB13490020891E087010BD11 +:1012500070B50C460F49891E097829B1A0F16001CB +:10126000532906D3012011E0602802D043F2010087 +:101270000CE020CC084E94E80E0006EB8000A0F5B0 +:101280008050241FD0F8806E2846B047206070BD83 +:10129000012070470A000020BCB1010010B50446CF +:1012A0000021012000F03FF80021182000F03BF859 +:1012B00000210B2000F037F80421192000F033F84A +:1012C00004210D2000F02FF804210E2000F02BF84F +:1012D00004210F2000F027F80421C84300F023F870 +:1012E0000721162000F01FF80721152000F01BF839 +:1012F0002046FFF795FF002010BD81210180704737 +:10130000FFF79EBF10487047104A10B514680F4B86 +:101310000F4A08331A60FFF79BFF0C48001D04605A +:1013200010BD704770474907090E002806DA00F023 +:101330000F0000F1E02080F8141D704700F1E0205C +:1013400080F800147047000003F9004310050240C4 +:101350000100000130B5FB4D044610280AD0112CC5 +:1013600006D02846122C817806D0132C08D0FFDF37 +:10137000AC7030BDFFDFFBE71129F9D0FFDFF7E7E5 +:101380001129F5D0FFDFF3E770B50EF03CF9044604 +:101390000FF072FE201AC4B206200CF0F9FA0546CE +:1013A00006200CF0FDFA2E1A07200CF0F1FA054683 +:1013B00007200CF0F5FAE349281A32188878122829 +:1013C0000DD000231A4413280BD0002002440878C3 +:1013D000022808D000201044201AC0B270BD01239A +:1013E000F0E70120F2E70120F5E7D64810B5C17813 +:1013F00094B0A9B15FF017018DF800104168CDF8E5 +:1014000002100089ADF8060009A968460AF0D1F873 +:101410000446112801D004B1FFDF14B0204610BDEE +:101420003221E9E702210CF008BB2DE9F04194B02C +:101430001D4690460E460746FFF7F4FF04000BD00A +:101440002078222804D3A07FC0F34010A84206D100 +:10145000082014B0BDE8F08143F20200F9E737201C +:101460008DF80000ADF802703DB101208DF8040048 +:101470008DF805608DF8068002E000208DF80400EC +:1014800009A968460AF095F8A07F65F34510A07792 +:101490000020DEE730B50446A1F120000D460A2801 +:1014A0004AD2DFE800F005070C1C2328353A3F44F8 +:1014B000FFDF42E0207820283FD1FFDF3DE0A14858 +:1014C0000178032939D08078132836D02078242851 +:1014D00033D0252831D023282FD0FFDF2DE02078EE +:1014E00022282AD0232828D8FFDF26E020782228A7 +:1014F00023D0FFDF21E0207822281ED024281CD012 +:1015000026281AD0272818D0292816D0FFDF14E063 +:101510002078252811D0FFDF0FE0207825280CD077 +:10152000FFDF0AE02078252807D0FFDF05E02078DC +:10153000282802D0FFDF00E0FFDF257030BD30B586 +:101540000B8840F67B444FF6FF72022801D093428D +:1015500004D09D1FA54224D2022802D04D88954276 +:1015600003D04D88AD1FA5421BD24C88A34218D88A +:101570008B88B3F5FA7F14D2022802D0C888904233 +:1015800005D0C88840F677450A38A84209D2C888ED +:10159000904208D0944206D05B1C6343B3EB800FAB +:1015A00001DB072030BD002030BD70B5044610F0CF +:1015B00003FA60BB207930B1082802D8217B0829C2 +:1015C00005D9072070BD217B0029FAD0F6E718B1B4 +:1015D000206810F0F1F9D0B9207B18B1A06810F0A4 +:1015E000EBF9A0B9002507E0206850F8250010F0BD +:1015F000E3F960B96D1CEDB22079A842F4D800255A +:1016000009E0A06850F8250010F0D6F908B11020C4 +:1016100070BD6D1CEDB2207BA842F2D8002070BDD9 +:1016200010B5028943F6FD73111F994212D2418908 +:1016300004290FD3B1F5804F0CD891420AD8017814 +:10164000890705D5406818B1FFF7AFFF002800D122 +:10165000002010BD072010BDF0B50024059D10B17D +:10166000A94203D851E009B90020F0BD0920F0BD1E +:10167000055D8DB107197E78112E3FD00FDC0A2E43 +:101680003CD2DFE806F03B1624242A2A2C2C3333E4 +:10169000025D72BB641CE4B28C42F9D3E4E71D2EF8 +:1016A0002CDAA6F11206042E28D2DFE806F027274E +:1016B0001018022DDAD1BD781D70072D01D26D07EB +:1016C00001D40A20F0BD157845F0010515E0EE4380 +:1016D000F60707E0012D07D010E00620F0BD2E0729 +:1016E000A6F18056002EF5D06046F0BD1578AE0705 +:1016F00001D50B20F0BD45F002051570055D641C99 +:101700002C44E4B28C4202D9B0E74FF4485C8C42DE +:10171000AED3A9E710B504784CB1012243F20223FD +:10172000012C07D0022C0FD0032C17D112E000227D +:101730000A7015E00A7082790324B4EB921F0DD170 +:101740000EE00000A80100200A708479B2EB941F1B +:1017500004D105E00A708279920901D0184610BDC3 +:1017600050F8012F41F8012F80888880002010BD9B +:1017700008B538B1FEA06B4600680090487903EBCD +:10178000901000781070086842F8010F88889080E7 +:1017900008BD30B50C46097895B0222902D2082040 +:1017A00015B030BD28218DF80010ADF80200132AC5 +:1017B00003D03B2A01D00720F2E78DF8042009A9C5 +:1017C000684609F0F6FE050003D121212046FFF707 +:1017D00061FE2846E4E700B595B023218DF800109E +:1017E000ADF802001088ADF804005088ADF806008E +:1017F000D088ADF80A009088ADF808000020ADF858 +:101800000C00ADF80E0009A9684609F0D2FE15B02B +:1018100000BD70B50E46050003D00021092010F070 +:1018200088F8D44C0120022EE0701CD0032E00D08A +:10183000FFDF0621201D0FF071FD607A20F0C0004F +:1018400084F80900FFF7D1FD608A00280AD0002D36 +:1018500008D083000122002109200FF0CDFF0928C4 +:1018600000D0FFDF70BD0321E01D0FF057FD607A4F +:1018700020F0C00040F040006072E01C02F03BFC31 +:10188000E0E72DE9FF410220BA4E8DF80400002761 +:10189000F08AADF80600B84655E001A80CF037F81C +:1018A000050006D0F08AB0B3A6F81680ADF8068021 +:1018B00047E0039C2078212843D0A07F01072BD547 +:1018C00004F123000090A28EBDF80800214604F127 +:1018D000360301F02BFD050003D011282AD0FFDFCD +:1018E00028E0A07F20F00800A077E07F810861F366 +:1018F0000000C10861F34100E07794F8210000F096 +:101900001F0084F820002078282824D1292120468F +:10191000FFF7C0FD1FE01CE0400712D5BDF808002E +:10192000214604F10E02FFF756FF050004D01128EE +:1019300000D0FFDF00250EE0A07F20F00400A0779C +:1019400009E07F1CFFB202200CF022F8401CB842D4 +:10195000A3D8052D07D0BDF80600F082052D04D0D0 +:10196000284604B076E5A6F816800020F9E72DE9B0 +:10197000F047040000D1FFDF20787E4E20F00F00FA +:10198000801C20F0F0007030207060680178091F22 +:1019900011290BD2DFE801F0F1090A4FF00A0CF02F +:1019A000F0360A0A0A0AF174F100FFDFBDE8F08799 +:1019B00087883846FFF736FD050000D1FFDF6078E5 +:1019C000212140F008006070307D40F00400307547 +:1019D0002846FFF75FFD384606F089FD384603F0DC +:1019E00021FC384604F03BFC394602200FF0A1FFF1 +:1019F000A87F20F01000A877FFF743FF0028D5D07C +:101A0000FFDFD3E785882846FFF70CFD00B9FFDF2D +:101A100060688078012800D0FFDF606881792846FF +:101A200006F0D8FE0028C1D0617841F0080161704D +:101A30006168C880BAE786883046FFF7F3FC050086 +:101A400000D1FFDF6078314640F0080060706068C8 +:101A5000C088288160680089688160684089A881A1 +:101A600002200FF066FF0020A875A87F00F0030099 +:101A700002289BD1FFF705FF002897D0FFDF95E7ED +:101A800080783C2803D0002502280AD000E00125F8 +:101A9000002720B13C2802D0022800D0FFDF17B178 +:101AA0007EE00127F5E7607840F008006070307D47 +:101AB00040F008003075EDBB606802218788384629 +:101AC0000BF0B2FF0546032138460BF0ADFF82460E +:101AD000052138460BF0A8FF8146042138460BF05B +:101AE000A3FF804605B9FFDFBAF1000F00D1FFDF89 +:101AF000B9F1000F00D1FFDFB8F1000F00D1FFDF17 +:101B000022212846FFF7C6FC60688079012837D07B +:101B10004FF00208A87F68F30100A8776068C08AC8 +:101B200028816068008B68816068408BA88160684C +:101B3000C07900E027E0E87560688168A961808964 +:101B4000A8836068807B6870606850F80F1FC5F8D4 +:101B500002108088E880A87F00F00301384606F074 +:101B6000B8FCB8F1010F0ED0B8F1020F18D005E0A3 +:101B70000302FF01A80100201FE023E0FFDF15E7BB +:101B80004FF00108C6E73078032800D0FFDF0021BE +:101B900008460FF0CEFEBDE8F047012000F087BFF9 +:101BA000B078132800D0FFDF002107200FF0C1FE1E +:101BB000BDE8F0471120FFF7CDBB2046BDE8F04758 +:101BC00001F08CBE607840F008006070EEE62DE910 +:101BD000F0470546007800270009DFF894A69146F3 +:101BE0000C463E46012871D0BC464FF6FF710228D4 +:101BF0006DD0072809D00A286AD0FFDFA9F8006055 +:101C00000CB1278066800020D0E6686804F10802E5 +:101C100003780D2B40D006DC042B7DD0072B44D05D +:101C20000A2B7AD106E0122B46D0132B51D0142B5D +:101C3000F7D1C0E011270926002C6FD0B0F804803E +:101C4000A4F804806868807920729AF814104046DD +:101C500021F004018AF8141004210BF000FF052183 +:101C600040460BF0FCFE002140460BF0F8FE01213F +:101C700040460BF0F4FE032140460BF0F0FE02213B +:101C800040460BF0ECFE062140460BF0E8FE072133 +:101C900040460BF0E4FEB1E701270926002CCCD02A +:101CA0008088A080686880790EE0122710268088DE +:101CB000214600F01EFFA1E71C270926002CBCD0FE +:101CC0004088A08068680079207297E78AE0B3E0D6 +:101CD00082E081783C2938D010272026002CACD017 +:101CE0008088A0806868C08A60836868C08A208312 +:101CF0006868008BA0836868408BE0836868417FD8 +:101D0000E07D61F30000E0756968497F490861F38F +:101D10004700E075696802E022E05CE08BE0C8798A +:101D20000831FFF725FD696804F10F0201F10F008A +:101D30008B7B01461846FFF71BFD6868807910B160 +:101D40000120A07507E00220FBE71B270926002CD5 +:101D500071D084F808C09AF8141021F008018CE0C2 +:101D60001D273026002C66D0A1806868411D0079AF +:101D7000FFF7FEFC686890F82B00E0736868C07895 +:101D80000428207C14D020F00100207469681F22F0 +:101D9000C97861F3420020746968C97A61F3C700A9 +:101DA0002074696804F111000C3119F043F825E73B +:101DB00040F00100E9E720271026E4B3A18068681D +:101DC00004F10902407A20726968CB1C88781946B0 +:101DD000FFF7CEFC12E74A4621462846BDE8F04709 +:101DE00001F001BF287E012803D0022813D0FFDFB5 +:101DF00004E71F271026F4B16888A080688B208133 +:101E0000A88B6081E88BA081288CE0819AF814105F +:101E100021F0200131E012271026688800F069FEC9 +:101E20004CB1687800F007000328C0D19AF814106C +:101E300021F0020121E027E0287E062822D2DFE8F7 +:101E400000F0040F0F030303C5E71B270926DCB1CD +:101E5000A18084F808C09AF8141021F001010CE068 +:101E60001B27092684B1A180287E012808D00320E1 +:101E700020729AF8141021F010018AF81410BDE6AF +:101E80000220F5E7FFDFB9E6A9F80060BBE610B570 +:101E9000F74894B08078132802D0082014B010BD01 +:101EA00022208DF8000009A9684609F082FB04464B +:101EB000002107200FF03DFD2046EFE700B5EC487C +:101EC00095B08078122801D00820A0E41E208DF85B +:101ED000000000208DF802008DF8030009A9684673 +:101EE00009F067FB0028F0D1002107200FF021FD49 +:101EF0001120FFF72FFA002089E400B5DC4895B0E7 +:101F00000078022803D0032801D008207FE41B209A +:101F10008DF8000000208DF8020009A9684609F03C +:101F200048FB0028F2D1002108460FF002FD0120F5 +:101F300000F0BDFD00206AE42DE9F0410027CC4C03 +:101F40000A287CD2DFE800F0057B1C7B7B7B7B448E +:101F50003B6AFFF7D2FF002831D105F01FFC0028B3 +:101F60002DD0017821F00F01891C21F0F0012031E2 +:101F70000170077605F0F0FB207D40F001001DE0C8 +:101F80008EB23046FFF74EFA050000D1FFDF287809 +:101F9000212814D005F002FC98B1017821F00F013E +:101FA000891C21F0F0011031017002210176468078 +:101FB000AF7505F0D1FB207D40F002002075BDE833 +:101FC000F08129463046BDE8F0411322FFF7E1BB1E +:101FD000A578122D03D0132D04D0FFDFEFE7FFF714 +:101FE0006DFF01E0FFF753FF0028E8D105F0D6FBB5 +:101FF0000028E4D0017821F00F01891C21F0F001C4 +:1020000020310170122D07D00221017605F0A4FBCA +:10201000207D40F01000D1E70121F6E7607A012130 +:10202000B1EB901F02D1022104E008E0800900D04A +:10203000FFDF0321BDE8F0410020FFF7EABBFFDF2F +:10204000BDE72DE9F04114460D00074600D1FFDF42 +:102050002878012803D0022821D0FFDFAFE73846D7 +:10206000FFF7E0F9060000D1FFDF0220B07520780D +:1020700020F00F00801C20F0F000103020706078FD +:1020800040F0080060702868A0616868E0612889F5 +:1020900020847748017D41F0200101758FE73846A3 +:1020A000FFF7C0F9060000D1FFDF69884FF6FF7027 +:1020B000814209D1AA88824206D131463846BDE81C +:1020C000F0411322FFF765BB814201D1A88898B186 +:1020D000207820F00F00801C20F0F00010302070DD +:1020E000607840F0080060702868A0616868E0616E +:1020F00028892084002006E0782300223946022027 +:102100000FF07AFB0120B07559E730B5054695B060 +:102110000C4608460FF050FC78BB00200121203D02 +:10212000062D5FD2DFE805F0032540444A57002121 +:1021300008200FF0D7FB10B1112015B030BD2420BE +:102140008DF80000D4F80200CDF80200A0798DF8D7 +:10215000060009A9684609F02CFA05002CD10823CD +:102160000022114618460FF047FB082824D0FFDF55 +:1021700022E060680FF062FC08B11020DDE73C202F +:102180008DF800002088ADF802006088ADF80400EA +:1021900009A9684609F00DFA05000DD1606858B12B +:1021A000BDF82810018007E0206801F0E2FF02E09E +:1021B000204600F0B1FC05462846BEE73D220BE074 +:1021C0008DF8021002E000BF8DF8020009A96846F0 +:1021D00009F0EFF9EFE734228DF800202278D207DA +:1021E000F2D0EDE70720A8E730B5054695B00C46DC +:1021F00008460FF005FC70BB203D052D35D2DFE809 +:1022000005F00323232523002088FFF70BF920B1D5 +:102210000078222804D208208FE743F202008CE7DE +:1022200025208DF800002088ADF8020009A9684635 +:1022300009F0BFF9002880D1DDF82A10C4F8021097 +:102240009DF82E10A17178E7062076E7206838B156 +:102250000FF0F4FB08B110206FE7206801F07DFF5C +:102260000348408AA080002067E7072065E7000058 +:10227000A8010020FE487047FD4810B518210A3813 +:1022800018F04FFE012000F012FC1120FFF762F859 +:10229000F74C00200A3C211D60744FF4617060828D +:1022A000E01C05F043FBD4F80300C4F80A00B4F8BE +:1022B0000700E081607A2074FFF797F800B1FFDF34 +:1022C00000F09CFCBDE8104001F0C2BA10B50C460D +:1022D0003E21204618F025FEA07F20F00300A077C5 +:1022E000202020700020A07584F8220010BD7047C7 +:1022F0002DE9FC4105460E4608460FF05DFB10B186 +:102300001020BDE8FC81DA4C0A3C15B1012D38D112 +:102310002CE0D4F803000090B4F80700ADF80400F6 +:102320008046677A8DF80670E11C3046FFF7F2F9B7 +:102330000028E6D1FFF759F830B10099C4F803102E +:10234000A4F807806772DCE7307808B1012808D16B +:10235000D4F80300C4F80A00B4F80700E081607AFA +:102360002074002109200FF0E4FA0FE0317841B128 +:10237000012906D0022906D0032904D043F2022005 +:10238000BFE70720BDE70120FFF743FA657400208F +:10239000B7E710B504460FF033FB08B1102010BDAD +:1023A000B34922460A39C878091DFFF7E1F9002030 +:1023B00010BD2DE9F0419AB0054600208DF85C0073 +:1023C0008DF858008DF828008DF860001E461446E0 +:1023D000884628460FF03BFB18B920460FF037FB24 +:1023E00010B110201AB0EAE555EA040018D01F27F2 +:1023F0000AAB17AA414628460097FFF72DF9002897 +:10240000F0D118AB16AA314620460097FFF724F901 +:102410000028E7D19DF85800C00703D00A20E1E763 +:102420000720DFE701AF7DB11A208DF804008DF899 +:10243000068042462946F81C18F0FCFC0BA901A8AE +:1024400009F0B7F80028CDD17CB120208DF8040028 +:102450008DF8066032462146F81C18F0EBFC0BA9FB +:1024600001A809F0A6F80028BCD181499DF82800F0 +:102470000A3948700020B5E770B506460A200C46B8 +:10248000087015461146204609F093F830B93821F6 +:1024900021702046294609F08CF820B1082801D186 +:1024A00043F2032070BD2A462146304600F05BFB14 +:1024B0000446082800D1FFDF204670BD2DE9F04119 +:1024C0006CA196B00446D1E90001CDE914010027C2 +:1024D00020460FF071FA30B92078012806D16068E3 +:1024E0000FF06AFA10B1102016B068E5604D0A3D91 +:1024F0002878012801D00820F6E707200BF050FAD1 +:1025000018B9207848B1012807D0FEF73DFF30B157 +:10251000287D10F00C0F09D103E01220E4E713200E +:10252000E2E7C10702D1A846800701D51120DBE709 +:10253000208A43F6E172A0F120019142217807D36D +:10254000012942D1002840D1618A00293DD10FE004 +:10255000022901D0032901D1A02836D3012907D0AF +:1025600098F80110C90703D0618A71B3B4292CD837 +:10257000217831B1012908D0022904D0032924D1BE +:1025800015E0002516E0022514E008B9608A60B164 +:1025900004256068007868B101280AD0022808D0B4 +:1025A000032806D043F202209EE70125F1E7032528 +:1025B00000E00127207A30B1012807D0022807D097 +:1025C00003286AD106E0002605E066E0012602E065 +:1025D000022600E003260DB1022D13D196B1E0686A +:1025E00018B1FEF7E2FF002886D198F801008007B5 +:1025F00002D043F2012077E7022D03D1022E4CD006 +:10260000032E4AD018208DF82C00208AADF82E0019 +:10261000208AADF830008DF8325098F80310002071 +:102620004FF0010811B1012968D102E08DF83300A3 +:1026300001E08DF833808DF834702178012925D0A0 +:10264000CDF83500ADF839008DF83C60207DC0F341 +:102650004002014662F35F01C0F3800041EA80005E +:1026600014A9085C8DF83B00B8B169460BA805E0D9 +:10267000B2010020070605040302010008F099FFDB +:10268000002891D15DB1022D09D011E0606850F8A9 +:10269000011FCDF835108088D4E7072024E73EB12C +:1026A000E06828B16A460BA9FFF7E6FE0028A2D130 +:1026B0001B208DF82C008DF82E8069460BA808F0A1 +:1026C00078FF002897D19DF801001B2816D1052D11 +:1026D00009D2DFE805F0030305050300032000E04D +:1026E000022000F0E4F9012D0AD0608A40B10022F6 +:1026F0008300114610460FF07FF808B10320F3E67F +:102700000020F1E62DE9FC4107460D460326084668 +:102710000FF09DF9002863D13846FEF783FE0400D0 +:1027200004D02078222804D20820EAE543F20200EF +:10273000E7E5A07F00F0030C2DB129466046FEF7C7 +:10274000FEFE0600F1D1F948BCF1010F05D0BCF145 +:10275000020F17D0FFDF3046D3E5A27D2946012ABC +:1027600002D0007D800701D51120CAE529B968464D +:1027700000F0FDFA0028D8D16946384605F0A7FFD9 +:102780000646E8E7A17D022914D1007D800611D418 +:1027900025B1A07F40070BD4002100E0012138467D +:1027A00005F0E0FF0600D6D1A075002DD3D002E0E1 +:1027B0001126D0E7A5B12A4621463846FFF70BF887 +:1027C00006461128C7D1A07F4107C4D4296844F820 +:1027D0000E1F6968616040F0040020740026BAE7AB +:1027E00010208EE570B50C460546FEF71BFE010075 +:1027F00005D022462846BDE87040FEF7CABF43F226 +:10280000020070BD00B595B031218DF800108DF833 +:10281000020009A9684608F0CCFE15B000BD0123EE +:10282000FEF703BE00231A461946FEF7FEBD70B53B +:1028300094B004460FF0C0F810B1102014B070BD71 +:102840002046FEF7EDFE0028F8D1B84DA8781128F3 +:1028500001D00820F2E7FEF797FD20B1287DC006E1 +:1028600003D51120EAE71320E8E71D208DF80000CA +:10287000207800F001008DF802002089ADF80400F6 +:102880006089ADF806002078C0F340008DF809009B +:10289000E8780025012618B1012804D00320CDE7EF +:1028A0008DF8085001E08DF8086009A9684608F025 +:1028B00080FE0028C2D12078800707D5606828B143 +:1028C00009AA6946FFF7D8FD0028B7D11E208DF868 +:1028D00000008DF802608DF8035009A9684608F0E1 +:1028E00068FE0028AAD1A08900F0F5F80400A5D15F +:1028F0001220FEF72FFD2046A0E7F0B595B0154653 +:102900000C4607460FF0A3F838B920460FF054F8EC +:1029100018B928460FF050F810B1102015B0F0BDCE +:10292000824E307D10F0180F01D1400701D51120E3 +:10293000F4E72046FEF774FE0028EFD12078C0F3BC +:102940004001394302D0800702D50FB10720E5E7E7 +:1029500029460220FEF7F3FD0028DFD1B0781128C8 +:1029600003D0122801D00820D8E706200BF018F871 +:1029700018B1B078122802D005E01220CEE7FFF798 +:102980009DFA0028CAD1FEF7FFFC022801D21320CD +:10299000C4E72078800707D5606828B109AA69468E +:1029A000FFF76AFD0028B9D121208DF800002089A9 +:1029B000ADF802006089ADF8040020784FF0010105 +:1029C000C0F340008DF80600207882074FF0000029 +:1029D00015D43A7842B1012A09D0022A07D0032A35 +:1029E00005D043F2022099E78DF8070001E08DF849 +:1029F000071057F8012F0292BA88ADF80C20F27830 +:102A00001AB1012A04D0032088E78DF80E0001E0F6 +:102A10008DF80E102988ADF810106988ADF81210E5 +:102A2000A988ADF81410E988ADF81800ADF81610B3 +:102A3000ADF81A0009A9684608F0BBFD002886D148 +:102A4000A08900F048F804008ED11320FEF782FC24 +:102A5000204663E730B5054695B00C4608460EF0B3 +:102A6000CFFF10B1102015B030BD2846FEF7DAFCBC +:102A700038B10178222902D3807F800604D408204F +:102A8000F1E743F20200EEE713208DF80000ADF805 +:102A9000025009A9684608F08CFD0028E3D19DF991 +:102AA0002A107F2901D02170DDE70520DBE730B552 +:102AB0001E4D040008D0012C04D0022C06D0032C9B +:102AC00004D0FFDF2C7030BDFFDFFBE72878012842 +:102AD000F8D0FFDFF6E710B548B1830000221146B9 +:102AE00007200EF089FE072801D0032010BD00202A +:102AF00010BD70B50C0006460DD0FEF793FC050026 +:102B000000D1FFDFA680288920812889608168891B +:102B1000A081A889E08170BD10B50446006840B16D +:102B20000EF095FF20B1102010BD0000A80100207C +:102B3000206801F005FBA0882F4C6082607C012892 +:102B40000FD1002109200EF0CDFE00B10120617AE5 +:102B50000122B2EB911F01D1022100E00321FEF717 +:102B600058FE0020E0E72DE9F047002592460C468C +:102B70000646A8464FF001090B2721E0306850F8BF +:102B80002500007820B1012805D00720BDE8F08796 +:102B900084F8028001E084F80290306850F8250043 +:102BA00050F8011FC4F803108088A4F807002770AC +:102BB0005146204608F0FDFC0028E7D16D1CEDB21F +:102BC0003079A842DAD8002539270FE0B068102202 +:102BD00050F82510A01C18F02DF9277051462046FA +:102BE00008F0E7FC0028D1D16D1CEDB2307BA84283 +:102BF000ECD80020CAE70000A8010020E848002126 +:102C00000160818070472DE9FF41804692B01C46EB +:102C10000E4618460EF0D0FE18B1102016B0BDE8D2 +:102C2000F08121460120FEF78AFC0028F6D101251B +:102C30008DF842504FF4C050ADF84000002210A96A +:102C4000284603F0AAFD0028E8D18DF842504FF441 +:102C50002850ADF8400000271C216846099718F05D +:102C600082F99DF82400ADF8346020F00F00401C7C +:102C700020F0F00010308DF824009DF82500ADF80C +:102C8000367020F0FF008DF825009DF8260007AA79 +:102C900020F00600801C40F001008DF826009DF811 +:102CA00000000BA940F002008DF800001F20ADF8D5 +:102CB000380009A80C9010A80B90CDF83C8068460D +:102CC00003F06EFB0028A9D1B54EBDF81C0007AA81 +:102CD00030808DF8425042F60120ADF840009DF85A +:102CE00026000BA920F00600801C20F001008DF8C2 +:102CF00026000220ADF83400ADF8380014A80F907B +:102D0000684603F04DFB002888D1BDF81C00708098 +:102D1000311D204600F0ECF880E73EB5044608205F +:102D2000ADF8000020460EF047FE08B110203EBD71 +:102D300021460120FEF703FC0028F8D12088ADF8D9 +:102D400004006088ADF80600A088ADF80800E088AF +:102D5000ADF80A00924801AB6A468088002103F072 +:102D600009FFBDF800100829E1D003203EBD1FB5C2 +:102D70000446002002900820ADF80800CDF80CD0E1 +:102D800020460EF019FE10B1102004B010BD84488A +:102D900002AA81884FF6FF7004F07BF80028F4D176 +:102DA000BDF80810082901D00320EEE7BDF8001097 +:102DB0002180BDF802106180BDF80410A180BDF82B +:102DC0000610E180E1E701B582B00220ADF8000015 +:102DD000734802AB6A464088002103F0CBFEBDF881 +:102DE0000010022900D003200EBD1CB50021009167 +:102DF0000221ADF8001001900EF002FE08B1102083 +:102E00001CBD67486A4641884FF6FF7004F041F8E0 +:102E1000BDF800100229F3D003201CBDFEB5074603 +:102E200014460E4608460EF0C7FD08B11020FEBD40 +:102E30001F2C01D90C20FEBD38460EF0BDFD584DAB +:102E400018BB288801A903F021F80028F3D13878AD +:102E50008DF80500288801A903F06DFE0028EAD14D +:102E600000909DF800009DF8051040F002008DF8DC +:102E70000000090703D040F008008DF80000288802 +:102E8000694603F0FBFD0028D5D1ADF8084028883D +:102E9000334602AA002103F06DFEBDF80810A142DE +:102EA000C9D00320FEBD7CB50546002000900190EE +:102EB0000888ADF800000C46284601950EF0BEFDCE +:102EC00018B920460EF09CFD08B110207CBD15B14C +:102ED000BDF8000050B132486A4601884FF6FF70D5 +:102EE00003F0D7FFBDF8001021807CBD0C207CBD15 +:102EF00030B593B0044600200D460090142101A87F +:102F000018F031F81C2108A818F02DF89DF80000E1 +:102F1000CDF808D020F00F00401C20F0F000103059 +:102F20008DF800009DF8010006AA20F0FF008DF842 +:102F300001009DF8200001A940F002008DF820005A +:102F400001208DF8460042F60420ADF8440011A897 +:102F500001902088ADF83C006088ADF83E00A08864 +:102F6000ADF84000E088ADF842009DF8020020F086 +:102F70000600801C20F001008DF802000820ADF84A +:102F80000C00ADF810000FA8059008A803F008FA8F +:102F9000002803D1BDF818002880002013B030BDF0 +:102FA00010000020094810B504680A490848086064 +:102FB0000DF08AFB0848046010BD08490020086035 +:102FC0004FF0E0210220C1F8800270471005024056 +:102FD000010000011805024014050240FC1F0040DA +:102FE00070B50C46054606F0BFFE21462846BDE8F2 +:102FF000704007F09CBE704770477047704770473D +:1030000010FFFFFFDBE5B15100C001008100FFFFB1 +:1030100010B504460EF0D0FC08B1102010BD207889 +:10302000C0F30210042807D86078072804D3A178D9 +:10303000102901D8814201D2072010BDE078410754 +:1030400006D421794A0703D4000701D4080701D523 +:10305000062010BD002010BD10B513785C08C37F9A +:1030600064F30003C3771478A40864F34103C377BF +:103070001078C309887863F34100887013781C09BD +:103080004B7864F347134B701378DB0863F300004D +:1030900088705078487110BD10B5C4780B7864F30F +:1030A00000030B70C478640864F341030B70C478A8 +:1030B000A40864F382030B70C478E40864F3C303C8 +:1030C0000B700379117863F30001117003795B08C9 +:1030D00063F34101117003799B0863F3820111705E +:1030E0000079C00860F3C301117010BD70B51446BB +:1030F0000D46064604F052FB80B10178142221F0FF +:103100000F01891C21F0F001A03100F8181B2146A5 +:1031100017F0D5FEBDE8704004F01EBB29463046CE +:10312000BDE870401322FEF734BB70B514460E465E +:10313000054604F033FB70B1017821F00F01891CC2 +:1031400021F0F00120310170458021688161BDE8E6 +:10315000704004F001BB31462846BDE870401322A0 +:10316000FEF717BB10B5FE4C94F8300000280CD1C8 +:1031700004F120014FF6FF72A1F110000CF0B9F834 +:1031800000B1FFDF012084F8300010BD2DE9F047C9 +:10319000064608A8894690E830041F469046142148 +:1031A000284617F0E0FE0021CAF80010B8F1000F21 +:1031B00003D0B9F1000F03D114E03878C00711D063 +:1031C00020680EF01DFCE8BBB8F1000F07D12068A5 +:1031D000123028602068143068602068A860216878 +:1031E000CAF800103878800727D560680EF026FCF2 +:1031F00040BBB9F1000F2CD0FFF73CF80168C6F8CE +:10320000B4118188A6F8B811807986F8BA01FFF761 +:10321000A9FFDFF84C8308F12008C5F80C8062682C +:103220005AB196F8B40106F2B5111032FEF7A0FAC1 +:1032300010224146606817F0FDFD3878400712D52E +:10324000A06800E002E00EF0DBFB50B11020BDE80A +:10325000F08760680028F9D0E8606068C6F8B001BF +:10326000EBE7A06828610020F1E730B50546087853 +:103270000C4620F00F00401C20F0F00110312170AE +:103280000020607095F8220030B104280FD0052886 +:1032900011D0062814D0FFDF20780121B1EB101FD8 +:1032A00004D295F8200000F01F00607030BD21F0BE +:1032B000F000203002E021F0F00030302070EBE729 +:1032C00021F0F0004030F9E710B510B190F8A940B6 +:1032D00044B1A34890F8354000205CB1086010600C +:1032E000186010BD00F1A8040C6000F1D001F830A6 +:1032F0001160F5E79A4C34340C60F0E700B58BB000 +:103300000823CDE902128DF8013001919449002380 +:1033100064310591099301468DF8103068460BF031 +:10332000C0FF002800D0FFDF0BB000BD30B595B066 +:103330000C462C2518998DF80050ADF80200B3B159 +:103340001868019058680290ADF80C2010220DF119 +:103350000E0017F06FFD09A9684608F02AF9002849 +:1033600003D1A17F41F01001A17715B030BD00203D +:103370000190E8E72DE9F0470646008A8AB080B25E +:103380000D468146FEF74EF80446754F3078283FCB +:10339000DFF8CC814FF0000A122873D2DFE800F08A +:1033A00072E9350936777E98A8F3E7E6E5E4DF5B56 +:1033B000DFDFA07F00F00300012806D0002148468F +:1033C0000AF03BFB050003D101E00121F7E7FFDF35 +:1033D00098F85C10090602D5D8F860000BE00321CC +:1033E00005F121000DF09AFFD5F821005D49B0FBF1 +:1033F000F1F201FB1200C5F8210070686866B06840 +:10340000A8662078252800D0FFDFECE0A07F00F040 +:103410000300012806D0002148460AF00EFB0600F2 +:1034200003D101E00121F7E7FFDF7078810702D5C2 +:103430002178252904D040F0010070700AB006E719 +:103440000220287096F82000287106F121003136FC +:10345000C5E90206F2E7A07F00F00300012806D0CC +:10346000002148460AF0E9FA040003D101E00121F5 +:10347000F7E7FFDF6078C10605D5142028704134D6 +:103480006C60DBE7E2E140F008006070D6E73448AA +:10349000082128380DF042FF032016E02A208DF87D +:1034A000000010220DF10200716817F0C3FC102219 +:1034B0000DF11200B16817F0BDFC294968462C399E +:1034C00008F077F800B1FFDF042028706F60B5E7DF +:1034D000E07FC00600D5FFDFB0680090B388062209 +:1034E0000321484605F063F80028A7D0FFDFA5E7D1 +:1034F00004B9FFDF716821B1102204F1230017F035 +:1035000099FC28212046FDF7C5FFA07F00F00300AD +:1035100002280ED104F12300002300901A46214610 +:103520004846FFF703FF112807D029212046FDF761 +:10353000B1FF307A84F8200080E7A07F000700D533 +:10354000FFDF14F81E0F40F008002070A4F816A04A +:10355000C4F818A0C4F81CA0617808460AE034E05A +:103560005C02002040420F006CE19AE090E062E0D3 +:1035700009E03FE061F38200410861F3C30060703D +:10358000307AE0705AE7A07F00F00300012806D0EF +:10359000002148460AF051FA040003D101E001215C +:1035A000F7E7FFDF022104F175000DF0B7FE1120EF +:1035B000287004F5DA706860B4F875002882FD4858 +:1035C0006C346C61C5E9028038E7A07F00F003002D +:1035D000012805D0002148460AF02FFA18B901E069 +:1035E0000121F8E7FFDF0AB0324621464846BDE830 +:1035F000F0477BE504B9FFDF207821289CD930799A +:10360000012802D002280AD103E0E07F40F0100038 +:10361000E07798F85C1041F0010188F85C103246C0 +:1036200021464846FFF762FD0AB02046BDE8F04754 +:103630002321FDF72FBF327901230321484604F0EF +:10364000B7FD98B1122005F8040B327925F8042B48 +:10365000281DA91E0095CDE901100023032148462D +:1036600004F023FE00288DD0FFDFE7E6A07F00F006 +:103670000300012806D0002148460AF0DEF90400C4 +:1036800003D101E00121F7E7FFDF30792070D5E6B3 +:103690000321484605F02DF9002895D11320287004 +:1036A000CCE6A07F00F00300012806D000214846A8 +:1036B0000AF0C3F9050003D101E00121F7E7FFDFBC +:1036C00095F8740000F00300012878D1A07F00F085 +:1036D0000307E07FC0F3400616B1012F04D02BE0B2 +:1036E00095F89000C0072AD0D5F8AC0118B395F82A +:1036F0007320017C62F387010174E27FD5F8AC018D +:1037000062F341010174D5F8AC0166F30001017464 +:10371000AEB1D5F8AC01102204F12301783517F0D1 +:1037200089FB287E40F001002876287820F00100EF +:1037300005F8780900E016B1022F04D02CE095F8C6 +:103740007800C00726D0D5F8A80118B395F87320E3 +:10375000017C62F387010174E27FD5F8A80162F36E +:1037600041010174D5F8A80166F3000101748EB11E +:10377000D5F8A801102204F12301783517F05AFB7F +:10378000287840F0010005F8180B287820F0010097 +:1037900005F89009022F51D05FF0000000EB4000C7 +:1037A00005EBC00090F87800800708D5D5F8B02167 +:1037B00095F86C0005F16D011032FDF7D9FF052079 +:1037C00060F3070815F8740F00F0030060F30F288A +:1037D000287960F31748287F60F31F687548AC3874 +:1037E000027822F00F02921C22F0F00220320270C6 +:1037F000427822F00702D21C4270A0F80290C0F872 +:10380000188004F033F92078252805D0212807D026 +:10381000FFDF2078222803D922212046FDF73AFE37 +:10382000A07F00F0030001280AD0002148460AF0DA +:1038300016F900283FF40EAEFFDFFFE50120ADE7EB +:103840000121F3E7716881F801A0F7E5FFDFF5E5F5 +:1038500070B5584C0025103C14F85C0F20F0800027 +:10386000207065600BF0E7FC5249A1F1100004F0F4 +:103870008FF804F82C5C072060724E487C30206181 +:103880005030A0611030E06170BD70B50D46FDF79D +:10389000C9FD040000D1FFDF4FF4DE71284617F0A8 +:1038A00062FB44485430686104F123002861A07F22 +:1038B00000F00300012809D05FF0020105F59070C7 +:1038C0000BF0BAFC002800D0FFDF70BD0121F5E746 +:1038D0000A46014602F590700BF0CCBC70B5054667 +:1038E00040689AB0017808290DD00B2903D00C2923 +:1038F00036D101218171686886883046FDF792FDD6 +:10390000040035D133E046883046FDF78BFD0400D6 +:1039100000D1FFDF2078212822D0282822D1686812 +:1039200002210C3001F09CF9E0B168680821001D0B +:1039300001F096F9B0B12D208DF80000ADF80260CD +:10394000102204F1230101A817F074FA09A96846AE +:1039500007F02FFE00B1FFDF29212046FDF79AFD79 +:103960001AB070BD687840F008006870F8E7FFDFB3 +:10397000A07F00F00301022902D120F01000A077FF +:10398000207821280AD06868817909B1807898B1B7 +:10399000A07F00F0030002285BD0FFDFA07F00F0D3 +:1039A00003000228DCD1FDF76CFF0028D8D0FFDF30 +:1039B000D6E700006C020020687840F008006870CC +:1039C000E07FC10720D0800701D5062000E0052058 +:1039D00084F822002078292818D02428DED1314606 +:1039E00006200DF0A6FF22212046FDF753FDA07F03 +:1039F00000F0030001282AD0002130460AF02FF8F9 +:103A00000028CBD0FFDFC9E70420E1E7A07F00F06A +:103A10000300012806D0002130460AF00EF8050008 +:103A200003D101E00121F7E7FFDF25212046FDF763 +:103A300031FD10208DF8500014A905F590700BF0A1 +:103A400010FC0228AAD00028A8D0FFDFA6E7012199 +:103A5000D3E7687840F0080068709FE72DE9F047E9 +:103A60008CB01D46904689460646DDF850A0FDF70D +:103A7000D9FC040052D0207822284FD323284DD0DF +:103A8000E07FC0064AD4A07F00F00300012806D0E2 +:103A90000021304609F0D1FF070002D00BE00121E0 +:103AA000F7E7A07F00F00300012804D10121304690 +:103AB00009F0BAFF074601AB02AA03A93846FFF78F +:103AC00003FC039800B9FFDF4FB1039807F5907727 +:103AD00087612078222806D0242804D007E00399A3 +:103AE0000020886103E025212046FDF7D3FC0398E0 +:103AF0000C2141704662A0F80480C0F80890A0F83C +:103B000006A0C560029901610199416104A90BF009 +:103B1000C8FB022802D0002800D0FFDF0CB0BDE8AF +:103B2000F08730B589B00546FDF77CFC0178222985 +:103B300033D9807F00F00300012806D000212846F9 +:103B400009F07BFF040003D101E00121F7E7FFDF6B +:103B5000227801230321284604F02AFB00281CD0E8 +:103B600012208DF80C00227806A8811F05ABCDE944 +:103B700000310290ADF8102000230321284604F004 +:103B800094FB00B1FFDF03A904F590700BF069FB13 +:103B9000022802D0002800D0FFDF09B030BD10B5E8 +:103BA00086B00446FDF73EFC0178222919D9807FB2 +:103BB00000F00300012806D00021204609F03DFF57 +:103BC000040003D101E00121F7E7FFDF13208DF8A6 +:103BD0000000694604F590700BF043FB002800D00C +:103BE000FFDF06B010BD2DE9F05F05460C4600274B +:103BF0000078904601093E46BB4604F1080A0229B6 +:103C00007ED0072902D00A2909D141E068680178ED +:103C1000082905D00B292BD00C2929D0FFDFC5E1BD +:103C200014271C26002C6CD04088A080FDF7FAFBDE +:103C30005FEA000900D1FFDF99F81700524609F149 +:103C40001801FDF795FD68688089208269684868D9 +:103C5000C4F812008868C4F81600A07E20F00600A0 +:103C600040F00100A07699F81E0040F040014DE0C0 +:103C70001A270A26002CD6D08088A080FDF7D2FB18 +:103C8000050000D1FFDF51462846FFF7EEFA8DE12F +:103C90000CB1288DA080287E0E287CD006DC01285F +:103CA0007AD0022808D0032804D135E0102874D037 +:103CB000112873D0FFDF79E11E270926002CB2D02E +:103CC000A088FDF7AFFB5FEA000900D1FFDF287F86 +:103CD00000F003000128207A1BD020F001002072A0 +:103CE000297F890861F341002072297FC90861F3A7 +:103CF00082002072297F090961F3C300207201E06C +:103D000049E116E199F81E0040F0800189F81E1083 +:103D10004CE140F00100E2E713270D26002CAAD069 +:103D2000A088FDF77FFB8146807F00F0030001281B +:103D300006D00021A08809F080FE050003D101E033 +:103D40000121F7E7FFDF99F81E0000F00302012AC6 +:103D500059D0A86E817801F003010129217A54D04D +:103D600021F00101217283789B0863F341012172E4 +:103D70008378DB0863F38201217283781B0963F384 +:103D8000C3012172037863F306112172437863F350 +:103D9000C711217203E060E0A6E08EE09EE084F8A7 +:103DA00009B0C178A172012A32D04279E17A62F376 +:103DB0000001E1724279520862F34101E1724279F5 +:103DC000920862F38201E1724279D20862F3C30180 +:103DD000E1720279217B62F30001217302795208BA +:103DE00062F3410121730279920862F38201217327 +:103DF0000079C00860F3C301217399F800002328FB +:103E00005AD9262168E0686EA4E741F00101A9E7CC +:103E10000279E17A62F30001E1720279520862F3F9 +:103E20004101E1720279920862F38201E172027942 +:103E3000D20862F3C301E1724279217B62F300018F +:103E400021734279520862F3410121734279920849 +:103E500062F3820121734079CBE718271026002CEA +:103E600067D0A088FDF7DEFA8246807F00F003006D +:103E7000012807D00021A08809F0DFFD5FEA0009D2 +:103E800003D101E00121F6E7FFDFE869A06099F8BE +:103E9000010040F0040189F8011099F80200800740 +:103EA00008D5012020739AF8000023287ED9272105 +:103EB000504663E084F80CB078E015270F26C4B3B1 +:103EC000A088FDF7AFFA814606225146E86907F05F +:103ED000D6FB0120A073AEE048464FE01627092626 +:103EE0003CB3287F207261E0287FFE4902280CD075 +:103EF00019270E26ECB101280DD003281AD004286A +:103F00001BD0052819D0FFDF23E01B270926BCB3EF +:103F10000120207205E001202072607A20F0030069 +:103F2000607211F85C0F4208520062F306000870DC +:103F30000FE02BE00220207207E0697F052801F0E6 +:103F40000F0141F0800121721BD0607A20F0030044 +:103F50006072A088FDF766FA05460078212825D012 +:103F6000232800D0FFDFA87F00F00300012810D035 +:103F70000021A08809F073FD22212846FDF78AFA66 +:103F800014E0607A20F00300401CE1E7A8F800602C +:103F900011E00121EDE70CB16888A080287E03289C +:103FA0002BD004280AD005284BD0FFDFA8F80060EA +:103FB0000CB1278066800020BDE8F09F15270F26F2 +:103FC000002CE3D0A088FDF72DFA807F00F00300DD +:103FD000012806D00021A08809F02FFD050003D19B +:103FE00001E00121F7E7FFDFD5F821000622514665 +:103FF00007F045FB84F80EB0D8E717270926002CF8 +:10400000C4D0A088FDF70EFA8146807F00F003003F +:10401000012806D00021A08809F00FFD050003D17A +:1040200001E00121F7E7FFDFA878800701D5022032 +:1040300000E00120207299F800002328B6D927213A +:104040004AE719270E26002CA0D0A088FDF7EAF930 +:104050005FEA000900D1FFDFC4F808B0A4F80CB093 +:1040600084F808B0A07A40F00300A07299F81F10FD +:1040700061F38200A07299F81F1001EA510161F307 +:10408000C300A072687E00F0030001288ED1607A20 +:1040900040F00400607299F81E0000F0030001284F +:1040A00014D0E97E607B61F300006073AA7E217BFF +:1040B00062F300012173EA7E520862F341006073EB +:1040C000A87E400860F3410121736FE7E87E217B01 +:1040D00060F300012173AA7E607B62F300006073CD +:1040E000EA7E520862F341012173A97E490861F317 +:1040F000410060735AE730B504468079012591B0DC +:10410000B5EB901F00D0FFDFFFF72CF84FF6FF70E4 +:10411000099074488DF8015020300190201D0290C4 +:10412000601C0B900AA968460BF0BBF800B1FFDFDA +:104130000B980188A4F801108078E07011B030BDB0 +:1041400010B5684C30B10146102204F1200016F081 +:1041500071FE012084F8300010BD10B50446FFF751 +:1041600001F8604920461022BDE81040203116F0C9 +:1041700061BE70B55B4C06004FF0000514D00DF029 +:104180001BFC08B110250DE00621304607F05EFA51 +:10419000411C06D0206614F85C0F40F080002070AF +:1041A00000E00725284670BD14F85C0F20F0800061 +:1041B000F5E72DE9F041804688B00D460027084616 +:1041C0000DF045FCA8B94046FDF72CF9040003D0DA +:1041D0002078222815D104E043F2020008B0BDE89F +:1041E000F08145B9A07F010603D500F00300022845 +:1041F00001D01020F2E7A07FC10601D4010702D54B +:104200000DB10820EAE7374991F85C10C90701D0E1 +:104210001120E3E7E17FC90601D50D20DEE700F0BC +:104220000300022805D125B12846FEF7F1FE07005C +:10423000D4D1A07F00F00300012806D00021404621 +:1042400009F0FBFB060002D00CE00121F7E7A07F9C +:1042500000F0030001280BD00021404609F0E4FBE8 +:10426000060007D0A07F00F00300022804D009E078 +:104270000121F2E70420B1E725B12A463146204664 +:10428000FEF7EAFE07AB1A4669463046FFF71CF810 +:10429000009800B9FFDF00990D20487006F5907076 +:1042A000C1F82480486100200881A07F00F003004D +:1042B00001282BD0F5B302200871301D8861707879 +:1042C00040090877B078C0F340004877287800F0BC +:1042D0000102887F62F301008877E27F62F3820047 +:1042E000887701E05C020020E27F520862F3C3009D +:1042F0008877B27862F304108877A878C87701F1DC +:10430000210228462031FEF7C7FE22E00120087175 +:10431000287800F00102087E62F3010008762A780E +:10432000520862F3820008762A78920862F3C3008A +:10433000087600E009E02A78D20862F304100876D3 +:1043400024212046FDF7A6F80BE003200871052084 +:10435000087625212046FDF79DF8A07F20F08000FB +:10436000A07701A900980AF09CFF022801D000B1B3 +:10437000FFDF384632E72DE9FF4FF94A0D4699B085 +:104380009A4607CA14AB002783E807001998FDF77F +:1043900049F8060006D03078262806D008201DB03F +:1043A000BDE8F08F43F20200F9E7B07F00F00309A7 +:1043B000B9F1010F03D0B9F1020F07D008E03DB900 +:1043C0001B98FEF725FE0028E9D101E01B9878BB79 +:1043D000B07F00F00300012806D00021199809F0F1 +:1043E0002CFB040003D101E00121F7E7FFDF852D5D +:1043F00025D007DCD5B1812D1BD0822D1BD0832D7C +:1044000008D11AE0862D1CD0882D1CD0892D1CD0F7 +:104410008A2D1CD00F2020710F281AD001208DF872 +:104420003400201D0E902079A8B158E10020F2E759 +:104430000FE00120EFE70220EDE70320EBE7052086 +:10444000E9E70620E7E70820E5E70920E3E70A2097 +:10445000E1E70720A3E7B9F1010F17D0D4E919501C +:1044600080460220019001200090A87898F8021060 +:10447000C0F3C000C1F3C00108405FEA000B5DD08B +:1044800050460DF099FA00286CD12DE0D4E9198539 +:104490000120019002200090214630461B9AFEF731 +:1044A000DBFD1B98007800F00101A87861F30100A2 +:1044B000A870F17F61F38200A870F17F490861F371 +:1044C000C300A870A17861F30410A8706078400957 +:1044D0002870A078C0F3400068701B988078E8705E +:1044E000002068712871C0E7DAF80C000DF064FA5A +:1044F000C0BBDAF81C000DF05FFA98BBDAF80C00CC +:10450000A060DAF81C00E06098F80100A17800F0E3 +:10451000010041EA4000A07098F80210C0B2C1F357 +:104520000011891E0840A070002084F82000009926 +:1045300006F1170002290BD001210AE098F80110BA +:10454000A07801F00101FD2242EA41010840E2E7C2 +:10455000002104EB810188610199701C022902D0BD +:10456000012101E028E0002104EB81018861A878A5 +:1045700000F00300012849D198F8020000F0030080 +:10458000012843D1B9F1010F04D12A1D691D1B98DF +:10459000FEF782FD297998F8040001408DF82C106F +:1045A000687998F8052010408DF8300001432DD02F +:1045B00050460DF001FA08B11020F0E60AF11000A3 +:1045C00004F5D47104F17C020490B9F1020F3CD0DF +:1045D0000090CDE9012100210BAB5A462046FEF7A1 +:1045E000D5FD0028E9D104F5D67104F19402B9F1A2 +:1045F000010F30D004980090CDE9012100210CABCF +:104600005A462046FEF7C2FD0028D6D1A078800782 +:1046100040D4A87898F80210C0F38000C1F380015C +:10462000084337D0297898F8000014AAB9F1010F8F +:1046300017D032F810204B00DA4012F0030718D0E0 +:10464000012F1ED0022F12D11DE0CDF800A0CDE920 +:1046500001210121C0E7CDF800A0CDE90121012110 +:10466000CDE732F811204300DA4002F00307032FB0 +:1046700007D0BBF1000F0DD0012906D0042904D0CA +:1046800008E00227F5E70127F3E7012801D0042815 +:1046900000D10427F07F40F001006BF34100F07778 +:1046A000A07881074FF003000CD5A071BBF1000F7B +:1046B00015D100BF8DF85C0017AA31461998FEF796 +:1046C00034FD0CE00221022F18D0012F18D0042F46 +:1046D00022D00020A071F07F20F00100F07725218A +:1046E0003046FCF7D7FE0DA904F590700AF0B9FD2D +:1046F00010B1022800D0FFDF002050E6A171D9E7F9 +:10470000A1710D2104F1240016F02DFC607840F019 +:10471000020060700420CDE70120A071DFE72DE9E1 +:10472000F04387B0914688460446FCF77BFE0700BD +:1047300006D03878272806D0082007B0BDE8F083D7 +:1047400043F20200F9E7B87F00F00300012809D026 +:104750000021204609F071F9040006D104E00000B0 +:1047600008B301000121F4E7FFDFA679012E08D08C +:10477000B8F1000F0FD048460DF01EF9B8B1102067 +:10478000DBE7B9F1000F25D1B8F1000F09D0B8F17E +:10479000010F1FD120E0022E05D0032E05D0FFDF30 +:1047A00028E00C2526E0012524E0022522E0B8F1CE +:1047B000020F03D0B8F1010F0AD00BE0032E09D18C +:1047C00000251022494604F1210016F033FB11E0C8 +:1047D000022E01D00720B0E70025102104F12100AE +:1047E00016F09FFB5FEA090004D0062106F02EFFB9 +:1047F000C4F82100607840F002006070C10713D057 +:1048000020F00100607002208DF8000004F121000A +:1048100002908DF804506946FF300AF022FD02280C +:1048200004D018B1FFDF01E084F82050252138467C +:10483000FCF730FE002080E730B587B00D46044617 +:10484000FCF7F0FD88B1807F00F0030001280FD055 +:104850000021204609F0F1F804000ED028460DF0A2 +:10486000ABF838B1102007B030BD43F20200FAE7D0 +:104870000121EEE76078400701D40820F3E72946DC +:1048800004F141002022054616F0D4FA607840F089 +:104890001000607001070FD520F008006070142030 +:1048A0008DF80000694604F5907001950AF0D9FC76 +:1048B000022801D000B1FFDF0020D4E770B594B02A +:1048C0000D460646FCF7AEFD18B10178272944D104 +:1048D00003E043F2020014B070BD807F00F00300DB +:1048E000012806D00021304609F0A7F8040003D1C2 +:1048F00001E00121F7E7FFDFA07902282DD1A078A0 +:10490000C0072AD0002302220321304603F050FCC6 +:1049100028B30D208DF80D0007A80222811FADF8E5 +:10492000142006ABCDE900310C9604F5907402908A +:10493000089400230321304603F0B7FC00B1FFDFE9 +:1049400004208DF810008DF824500DA903A80AF05A +:10495000A8FC00B1FFDF0020BDE70820BBE7112065 +:10496000B9E770B5064686B014460D4608460DF008 +:1049700023F818B920460DF043F810B1102006B006 +:1049800070BDA6F57F40FF380DD03046FCF74AFDDC +:1049900030B14378811C22461846FCF7E9FE07E057 +:1049A00043F20200EBE72046FDF7F3FC0028E6D1D6 +:1049B0001021E01D0CF0B2FCE21D29466846FEF70E +:1049C0009DFC102204F11700019916F033FA002023 +:1049D000D5E72DE9F04104468CB0154688460027FE +:1049E00008460DF034F818B928460DF030F818B123 +:1049F00010200CB0BDE8F0812046FCF713FD060046 +:104A000003D03078272818D102E043F20200F0E703 +:104A1000B07F00F00300012806D00021204609F0F5 +:104A20000CF8040003D101E00121F7E7FFDF607813 +:104A3000400702D5A078800701D40820D9E7B07FCD +:104A400000F00300012818D0D4E91901407800B122 +:104A5000B5B1487810B1B8F1000F11D0C5B1EA1D59 +:104A600006A8E168FEF74AFC102205F11700079935 +:104A700016F0B4F930B104270AE0D4E91910E5E7DB +:104A80000720B6E71022E91D04F1310016F0D2F933 +:104A9000B8F1000F06D0102208F1070104F121003F +:104AA00016F0C8F9607840F002006070C10715D0B8 +:104AB00020F00100607002208DF8000004F1210058 +:104AC0000290103003908DF804706946EF300AF0C0 +:104AD000C8FB022804D018B1FFDF01E084F8207081 +:104AE00025213046FCF7D6FC002082E7F8B51546B4 +:104AF0000E460746FCF796FC040004D020782228D6 +:104B000004D00820F8BD43F20200F8BDA07F00F0F9 +:104B10000300022802D043F20500F8BD30460CF035 +:104B20004BFF18B928460CF047FF08B11020F8BD1C +:104B300000953288B31C21463846FEF7F7FB112852 +:104B400014D00028F3D1297C4A08E17F62F30001E8 +:104B5000E1772A7C62F34101E177297C890884F8B6 +:104B60002010A17F21F08001A177F8BDA17F090766 +:104B7000FBD4D6F80200C4F83600D6F80600C4F814 +:104B80003A003088A0861022294604F1230016F04E +:104B900051F9287C4108E07F61F38200E077297CAD +:104BA00061F3C300E077287C800884F82100A07FAF +:104BB00040F00800A0770020D3E770B594B00D4610 +:104BC00006460BB1072086E6FCF72CFC040007D054 +:104BD0002078222802D3A07F400604D408207AE659 +:104BE00043F2020077E6C5B12D208DF80000ADF844 +:104BF00002601022294601A816F01CF9287C410801 +:104C0000E07F61F30000E077297C61F34100E07709 +:104C1000287C800884F8200004E02E208DF8000015 +:104C2000ADF8026009A9684606F0C3FCA17F21F037 +:104C30004001A1774FE670B50D46FCF7F3FB040089 +:104C400005D028460CF0DCFE20B1102070BD43F2E8 +:104C5000020070BD29462046FEF707FB002070BD0C +:104C600005E000BF10F8012B0AB100207047491E73 +:104C700089B2F7D20120704770B50D4600780499CB +:104C80001446042803D0052832D0FFDF70BDA88B5E +:104C90000E2200EB400002EB400018803320088019 +:104CA000002CF3D0A88BA081002613E0A87F012858 +:104CB00014D006EBC60005EB400106EB460204EB00 +:104CC0004202088CD0811020223110320AF08AFB77 +:104CD000761CB6B2A089B042E8D870BD05EB86015B +:104CE00006EB460204EB4202088CD0810220EBE77F +:104CF000A88B102200EBC00002EB4000188034208B +:104D00000880A87F012808D0022806D0FFDF002CE9 +:104D1000E3D0A88BA081002613E0A073F7E7A87F5B +:104D2000012812D006EBC60005EB400104EB400061 +:104D30000A8C028210221230223116F07BF8761C87 +:104D4000B6B2A089B042EAD870BD05EB860106EB89 +:104D5000C602088C04EB4202223110820220123279 +:104D60000AF040FBEBE72DE9F04105780E20DDF875 +:104D700018C001F1200402F10E074FF00008022DC7 +:104D800006D0032D2DD0062D6AD0FFDFBDE8F081BF +:104D9000CD8B05EB850600EB460018803120ACF882 +:104DA0000000002AF2D0087F9581801FC6B214E06F +:104DB00061682088388031F8020BF88031F8020BE6 +:104DC0003881BA1C30460AF00DFB06B118B187F8DD +:104DD0000480A7F8028008340A376D1EADB2E7D20E +:104DE000D4E7CD8B05EB850600EB4600188032201A +:104DF000ACF80000002AC9D0087F9581401FC6B2D8 +:104E00002AE06168228811F8010BFA803A79430898 +:104E100060F3000263F34102830863F38202C30874 +:104E200063F3C302030963F30412430963F34512F6 +:104E3000830963F386123A71C009787131F8020B65 +:104E400038813A4630460AF0CDFA18B187F8028028 +:104E5000A7F8008008340A376D1EADB2D1D295E7AD +:104E6000087FCD8B801E86B206F1080068431030A3 +:104E700018803520ACF80000002A87D0958102F117 +:104E80001007D68107EBC5080BE020883880C7F8EB +:104E9000048032464046616815F0CCFF0834B044C7 +:104EA00008376D1EADB2F0D270E72DE9F0471D4610 +:104EB000089E0C4681462AB1607E00F58070D08045 +:104EC000E08B108199F800000E274FF000084FF09A +:104ED000100A0C287ED2DFE800F096061521293151 +:104EE0003F4E636B6B6B207F9146082802D00328EE +:104EF00000D0FFDF2F8030200BE000BFA9F80C802E +:104F0000BDE8F087207F9146042800D0FFDF2F8086 +:104F100031203080B9F1000FF0D1F1E7207F9146C8 +:104F2000042800D0FFDF2F803220F2E7207F914657 +:104F3000022800D0FFDF2F803320EAE7207F1746CA +:104F4000022800D0FFDF3420A5F800A03080002F19 +:104F5000D6D0A7F80C80D3E7207F1746042800D0CE +:104F6000FFDF3520A5F800A03080002FC8D04046D4 +:104F7000A7F80C8012E0207F1746052802D00628EB +:104F800000D0FFDF1220288036203080002FB7D0DD +:104F9000E08BB881A7F81080B9F80200F881AFE77C +:104FA000207F9146072800D0FFDF2F803720B0E711 +:104FB0004FF0140018804FF03800170030809FD059 +:104FC000E08BB881A7F8128099F80000092807D073 +:104FD0000A2800E017E009D00B280DD0FFDF8FE78B +:104FE000207F0C2800D0FFDF01200AE0207F0D2861 +:104FF00000D0FFDF042004E0207F0E2800D0FFDF78 +:105000000520B8737CE7FFDF7AE770B50C460546EC +:10501000FCF708FA20B10078222804D2082070BDDD +:1050200043F2020070BD0521284608F006FD20600D +:1050300008B1002070BD032070BDFFB585B00746E4 +:105040001720ADF80C00089814460D46022628B922 +:1050500008A93846FFF7D9FF00283ED15DB10023EB +:10506000BDF80C203146384603F0A2F8B8B30898D2 +:105070000078A0BB05E02078092822D00F282FD087 +:10508000FFDF002004A9CDE9001003460290BDF81F +:105090000C203146384603F008F900281DD1089845 +:1050A00003A9801DC4E901072046049A04F017FBF8 +:1050B00060B3072828D2DFE800F01E1C2727252030 +:1050C000220007260023BDF80C203146384603F0A5 +:1050D0006FF80028D5D143F2040009B0F0BD08E014 +:1050E0000023BDF80C203146384603F061F8002853 +:1050F000C7D11120F1E70020EFE70820EDE743F2E8 +:105100000300EAE70720E8E70320E6E704980090B9 +:10511000BDF80C3004223146384603F048FA002826 +:10512000DBD1002DD9D008990D70D6E710B588B025 +:105130001C46AAB104238DF800301388ADF80C305A +:105140005288ADF80E208A788DF812200988ADF8C3 +:10515000101000236A462146FFF76FFF08B010BD0C +:105160001020FBE72DE9F041074600780C46122895 +:1051700039D2DFE800F0383434141036090909094F +:10518000090909090909090904B9FFDF607840F034 +:105190000800607028E0002CF8D1FFDFF6E7B8883F +:1051A000052186B2304608F048FC054604B1FFDF11 +:1051B00005B9FFDF3146A81D04F08AFA02F0EEFAC5 +:1051C000040007D0607840F008006070668002F04C +:1051D000C3FA0AE013213046FDF704FB16E0FFDFB7 +:1051E00002E0FFDF00E0FFDF84B1607800070DD54B +:1051F0002078582220F00F00C01C20F0F0009030E2 +:105200002070394604F1180015F059FE0020BDE564 +:1052100000200870881D04F058BA0A460146901D07 +:1052200004F05CBA70B50546052108F006FC0400E0 +:1052300000D1FFDF2946A01DBDE8704004F048BA48 +:105240002DE9FE4F4FF00009ADF80890ADF804903D +:1052500047880C46054693460521384608F0EDFB85 +:10526000060000D1FFDF24B1A780A4F80690A4F8BF +:105270000890297E04F112003827C91E4FF001085A +:105280004FF0360A00900F2970D2DFE801F0F9FAEA +:105290006F6108AD6A70812CB6C9E59595003078CC +:1052A000012800D0FFDFA88B0E2101EBC001ADF873 +:1052B00004103021ADF80810002C13D0A08100207C +:1052C0000DE004EBC00132790A747288CA8105EBE3 +:1052D0008002401CD38B4B82128C8A8280B2A189BF +:1052E0008142EED8E8E03078012800D0FFDFE88B7B +:1052F0000E2101EBC001ADF804103021ADF808100B +:10530000297F091FC9B20091002CEBD0A081002792 +:105310001AE000BF05EBC70A04EBC70808F10E024C +:10532000DAF8241000980AF05DF818B188F81090A7 +:10533000A8F80E90BAF82010A8F81210BAF82210A7 +:105340007F1CA8F81410BFB2A089B842E2D8B3E01D +:1053500002A8009001AB224629463046FFF78CFC9C +:10536000AAE03078072806D0FFDF04E0A3E0307819 +:10537000072800D0FFDFE88BADF808A01230ADF8A9 +:105380000400002C38D0A98BA1817188E18123E031 +:105390003078082800D0FFDFA88B00F10E01ADF8AF +:1053A00004103721ADF80810002C25D0A081AA8B5D +:1053B00004F10E00296A4CE0E88B123080B23921EA +:1053C000ADF80400ADF80810F4B3A98BA181287ED4 +:1053D000102807D00221A173E98B2182EA8B296A68 +:1053E000009836E00121F6E702A8009001AB2246C2 +:1053F00029463046FFF7B7FC5EE03078092800D038 +:10540000FFDF1420ADF80400ADF808701CB3A98BC1 +:10541000A181A4F81290A4F8109084F80E804BE0BB +:1054200030780A2800D0FFDF288CADF808701430DF +:10543000ADF804007CB10421A173A98BA181E98B93 +:105440002182298C618200E032E02A8C04F1140070 +:10545000696A15F0EFFC2FE030780B2800D0FFDFF1 +:105460001420ADF80400ADF8087004B30521A17351 +:10547000A4F80C90A4F81090A4F812901CE000E09E +:1054800008E002A8009001AB224629463046FFF70B +:105490000CFD11E00D203A21ADF80400ADF8081024 +:1054A00034B1A4F80680A4F8089084F80C9003E0C6 +:1054B000ABF8000014E0FFDFBDF80400ABF800001B +:1054C00074B1BDF808002080BDF804006080287E1B +:1054D000032805D0102803D0112801D086F80090A9 +:1054E0000020BDE8FE8F2DE9F84356880F46804620 +:1054F00015460521304608F0A0FA040000D1FFDF70 +:10550000A41D33462A4639464046009404F064FA06 +:10551000BDE8F8832DE9F0438DB00D461446814671 +:1055200007A9FFF772FD002814D14FF6FF76012777 +:105530004FF420588CB103208DF800001020ADF8F6 +:10554000140008A802460690204605A909F069FF44 +:1055500078B107200DB0BDE8F0830820ADF80C50FD +:105560008DF812708DF80000ADF80E60ADF8108067 +:105570000CE00798A1780171218841808DF81270A4 +:10558000ADF80C50ADF81080ADF80E606A46012100 +:105590004846079BFFF751FDDCE708B501228DF86F +:1055A000022042F60202ADF800200A4602236946B4 +:1055B000FFF7BCFD08BD08B501228DF8022042F6B8 +:1055C0000302ADF800200A4603236946FFF7AEFD4B +:1055D00008BD00B587B079B102228DF800200A8895 +:1055E000ADF80C204988ADF80E1000236A4604215E +:1055F000FFF723FD07B000BD1020FBE709B106232C +:1056000094E50720704770B588B00D4614460646ED +:1056100007A9FFF7FAFC00280ED17CB10620ADF8EF +:105620000C508DF80000ADF80E40079B6A4607212C +:105630005C803046FFF701FD08B070BD05208DF895 +:105640000000ADF80C50F0E700B587B059B1072362 +:105650008DF80030ADF80C20049100236A46082133 +:10566000FFF7EBFCC6E71020C4E770B5002488B054 +:10567000172391B10A78062A20D2DFE802F01F042E +:10568000041503171523DB1E9DB2CB880BB18E6862 +:105690001EB1AB4203D90C20CEE71020CCE7042A80 +:1056A00004D08B8853B901E00620C5E7012A13D046 +:1056B000022A05D0042A1CD0052A2AD00720BBE7DD +:1056C00009228DF800204A88ADF80C20CA88ADF870 +:1056D0000E208968049123E00C228DF800204A886E +:1056E000ADF80C20CA88ADF80E2089680924049111 +:1056F00016E00D228DF800204A88ADF80C208A882B +:10570000ADF80E20CA88ADF8102089680A240591EA +:1057100006E00E228DF8002049788DF80C100B243D +:1057200000236A462146FFF788FC85E700B587B06D +:105730000F228DF80020ADF80C1000236A461946A0 +:10574000FFF77BFC56E700B587B071B102228DF8F8 +:1057500000200A88ADF80C204988ADF80E1000230F +:105760006A460521FFF769FC44E7102042E7000084 +:1057700018B1817801293CD101E0102070470188DF +:1057800042F60213C81A4FF48072994233D01CDCDF +:1057900042F60103A1EB030099422CD00CDCF9B1D5 +:1057A000B1F5C05F27D06FF4C050081823D0A0F522 +:1057B0007060FF381DD11EE001281CD002281AD0CD +:1057C000FF2818D0904214D115E0904213D008DC85 +:1057D000012810D002280ED0FE280CD0FF2808D1B6 +:1057E00009E0A0F58070013805D0012803D0022817 +:1057F00001D0002070470F2070470B2826D008DC0E +:105800001BD2DFE800F01C2025251A252923252797 +:105810001E0011281CD008DC0C2817D00D281DD024 +:105820000F2815D0102808D110E0822809D084282C +:1058300010D0852810D0872812D003207047002070 +:1058400070470520704743F20300704707207047F8 +:105850000F20704704207047062070470C207047C7 +:105860004FF45050704707280DD2DFE800F00406CF +:10587000040C0C080A000020704711207047072014 +:1058800070470820704703207047007810F00F021F +:1058900004D0012A05D0022A0CD110E0000909D158 +:1058A0000AE00009012807D0022805D0032803D008 +:1058B000042801D007207047087000207047062098 +:1058C000704705282AD2DFE800F003070F171F00F2 +:1058D000087820F0FF001EE0087820F00F00401C40 +:1058E00020F0F000103016E0087820F00F00401C87 +:1058F00020F0F00020300EE0087820F00F00401C6F +:1059000020F0F000303006E0087820F00F00401C56 +:1059100020F0F000403008700020704707207047EA +:1059200038B50C46050041D06946FFF7AEFF0028A8 +:1059300019D19DF80010607861F30200607069462B +:10594000681CFFF7A2FF00280DD19DF800106078B9 +:1059500061F3C5006070A978C1F34101012903D04A +:10596000022905D0072038BD217821F0200102E06E +:10597000217841F020012170410704D0A978C9089D +:1059800061F386106070607810F0380F07D0A97846 +:10599000090961F3C710607010F0380F02D1607808 +:1059A000400603D5207840F040002070002038BD2C +:1059B00070B504460020088015466068FFF7B0FF08 +:1059C000002816D12089A189884211D86068807882 +:1059D000C0070AD0B1F5007F0AD840F20120B1FB20 +:1059E000F0F200FB1210288007E0B1F5FF7F01D92B +:1059F0000C2070BD01F201212980002070BD10B57E +:105A00000478137864F3000313700478640864F373 +:105A1000410313700478A40864F3820313700478BC +:105A2000E40864F3C30313700478240964F30413D3 +:105A300013700478640964F34513137000788009C7 +:105A400060F38613137031B10878C10701D1800764 +:105A500001D5012000E0002060F3C713137010BDD2 +:105A60004278530702D002F0070306E012F0380F25 +:105A700002D0C2F3C20300E001234A7863F30202BA +:105A80004A70407810F0380F02D0C0F3C20005E031 +:105A9000430702D000F0070000E0012060F3C502D8 +:105AA0004A7070472DE9F04792B00D00804613D040 +:105AB000B8F1000F14D01221284615F032FA03AACB +:105AC000FF21012005F0D3FB0024264637464FF482 +:105AD00020596FF4205A6DE0102012B0BDE8F08715 +:105AE0000720FAE79DF8160001280AD1BDF8140036 +:105AF00048450BD010EB0A000AD001280CD0022830 +:105B00000CD0042C0ED0052C0FD10DE0012400E0A8 +:105B10000224BDF8126008E0032406E00424BDF866 +:105B2000127002E0052400E00624BDF81210414581 +:105B300040D12C7486B34FF007090DF134080EAA3A +:105B4000CDF80090CDE9012810230022FF21304636 +:105B500005F029FCF0B9BDF834002A46C0B20EA900 +:105B600009F040FCB0B9AE81B7B108AECDF80090F5 +:105B7000CDE9016813230022FF21384605F013FC0C +:105B800040B9BDF83400F11CC01EC0B22A1D09F096 +:105B900029FC10B10320A0E70AE0BDF82100E8814C +:105BA000062C05D19DF81600A872BDF814002881B6 +:105BB000002092E703A805F062FB002892D0FFF7CF +:105BC0001CFE8AE72DE9F0438BB00E46DDE9129802 +:105BD00005461C461746142103A815F0C4F90120F8 +:105BE0008DF810008DF80C008DF81180ADF8147050 +:105BF00064B1A178C90709D08DF81600E088ADF826 +:105C00001A00A088ADF81800A068079001F0C6FD42 +:105C1000040025D06580002009A9CDE900101722D5 +:105C2000034601460290ADF82020284602F03DFBD5 +:105C3000002812D108368DE8700008AA494603A84A +:105C4000099B04F042FE06466078000701D501F08A +:105C500083FD5EB13046FFF706FE0BB0BDE8F08372 +:105C600013212846FCF7BEFD0320F6E709980090B3 +:105C7000BDF8203004220021284602F098FCECE711 +:105C800070B506468AB000200D46059007240490A2 +:105C9000069003A900940790CDE901010246102364 +:105CA0002946304605F07FFB68B904A9009108A891 +:105CB000CDE90140BDF80C3000222946304605F000 +:105CC00081F9002801D0FFF798FD0AB070BD05F0FA +:105CD0003CB82DE9FC470546002700780C46B8463D +:105CE000B9460C2873D2DFE800F0B8060D2FCE5F5E +:105CF0005F7F96B49AA504B1FFDF288980B201F0D6 +:105D0000BFFEABE0A888042180B2814607F095FE73 +:105D1000064604B1FFDF06B9FFDF494606F1080079 +:105D200004F03CFA01F03AFD040008D0607840F03D +:105D300008006070A4F8029001F00EFD8FE01321BE +:105D40004846FCF74FFD9EE004B9FFDF6088042160 +:105D500007F073FE060000D1FFDFA6F800900020D8 +:105D600029791EE005EBC0029268D3B25FEA037C9A +:105D700007D5DB0605D505EBC10030F8020C3080F5 +:105D800007E0120A52060AD5307105EBC000C08840 +:105D900070806078022740F0080060705EE0401C70 +:105DA000C0B28142DED859E0E888ADF8000004B9FD +:105DB000FFDF9DF80100000604D52878062807D0EB +:105DC00005282AD0607840F00800607046E044E082 +:105DD0006088042107F031FE060000D1FFDF86F85D +:105DE0000490A888708018E004B9FFDF608804215F +:105DF00007F023FE060000D1FFDF06F1080004F0E3 +:105E0000F8FF90F0010F02D1E879000626D56088EE +:105E10000227F080D6E704B9FFDF0227D2E704B9F2 +:105E2000FFDF022761880122204601F06DFE4FF05E +:105E30000108C7E7A88986B204B1FFDF686800904F +:105E40002889ADF8040001226946304601F077FE4A +:105E500004E0002CB6D1FFDFB4E7FFDF9CB160782F +:105E6000000710D5B8F1000F0DD12078582220F08E +:105E70000F00001D20F0F00080302070294604F152 +:105E8000180015F01CF83846BDE8FC873EB50C003C +:105E900008D06B4601AA002105F0F2FA20B1FFF705 +:105EA000ACFC3EBD10203EBD00202080A0709DF8BF +:105EB000050002A900F00700FFF703FD50B99DF8A7 +:105EC000080020709DF8050002A9C0F3C200FFF78A +:105ED000F8FC08B103203EBD9DF8080060709DF8F5 +:105EE0000500C109A07861F30410A0709DF80510A9 +:105EF000890961F3C300A0709DF80410890601D5DB +:105F0000022100E0012161F342009DF8001061F3DD +:105F10000000A07000203EBD70B5144606460D4638 +:105F200051EA040005D075B108460BF087FD78B939 +:105F300001E0072070BD2946304605F0FCFA10B19B +:105F4000BDE8704059E454B120460BF077FD08B12C +:105F5000102070BD21463046BDE8704096E7002015 +:105F600070BD2DE9FE4F05460C46007E0A310091BA +:105F700004F108010027029190460C31821E3E4632 +:105F8000BB464FF0010A0191082A7CD2DFE802F0FB +:105F9000F7047B32327EBCF86888042107F04DFD9F +:105FA0005FEA000900D1FFDFB9F8000010B1522705 +:105FB0000726ECE051271026002C7CD06888A080B2 +:105FC00084F806A099F80400002205EBC0000099AF +:105FD000C08BFFF7A1FF00286ED199F8040005EBF4 +:105FE000C000C08B208199F8040005EBC000408CF4 +:105FF000E081E6E0B5F82290062822D1E87F00068D +:106000001FD5512709F1140086B2002CD5D0A88BDA +:1060100000220099FFF780FF002873D16888A080D4 +:106020000220A071A88B208184F80EA0288C2082E9 +:10603000A4F812904A46696ADDF8040014F0FAFEEA +:10604000BFE0502709F1120086B2002C33D0A88B94 +:1060500000220299FFF760FF002853D16888A080D2 +:10606000A88BE080287E06280ED002202073288C82 +:10607000E081E87F4A46C0096073A4F8109004F1FB +:106080001200696ADAE79BE00120EFE768880421E3 +:1060900007F0D3FCB5F822A05FEA000900D1FFDFCA +:1060A00009F1080004F0A5FE90F0010F02D1E87F8D +:1060B000000626D501E076E024E00AF1140051271D +:1060C00086B2002C70D06888A080A88B002200992E +:1060D000FFF722FF002815D10220A071A88B208194 +:1060E0000420A073288C2082A4F812A05246696A6A +:1060F000019814F09FFE89F804B0A98BA9F802104A +:106100005FE00320BDE8FE8F6888FBF78BF98246CD +:106110006888042107F091FC8146BAF1000F00D194 +:10612000FFDFB9F1000F00D1FFDFB9F80600A0F5DD +:106130007F41FF3902D05127142601E05027122653 +:106140008CB36888A080502F06D00220A071287FD1 +:10615000029901F016F934E0287FA11D01F011F930 +:106160009AF82210CDE9001BB9F8022068880023B4 +:106170004946FFF727FD0028C4D122E000E016E0E1 +:10618000FE49A88BC988814205D15427062654B1FF +:106190006888A08015E05327082624B16888A0806D +:1061A000A88BE0800DE0FFE7A8F800600EE055271F +:1061B0000726002CF8D0A88BA08084F806B000E059 +:1061C000FFDFA8F800600CB127806680002099E707 +:1061D000EA4900200870704730B587B00C4607F0D8 +:1061E000F5FB0546FF2800D1FFDF0020208020714D +:1061F00060804FF6FF70E080294604F1080003F04C +:10620000BFFF02AA2946012005F031F81AE000BFBD +:106210009DF80B00000715D5BDF80E002946FFF7C5 +:106220002FFD9DF80B00FF2340F010008DF80B00B0 +:10623000BDF80B00ADF80400BDF80E002946019A28 +:1062400005F047F902A805F01AF80028E0D007B0D9 +:1062500030BD0A46014602F1080003F0A5BF70B543 +:106260000546042107F0E9FB040000D1FFDF2946C1 +:1062700004F10800BDE8704003F090BF2DE9F04143 +:106280008AB00D468046FBF7CDF8060006D0307880 +:10629000222806D208200AB0BDE8F08143F20200AD +:1062A000F9E70421404607F0C8FB07460DB1A8886E +:1062B00078B101208DF8140002208DF81800002418 +:1062C0008DF819403DB1A888ADF8200028680790E6 +:1062D00004E00920DFE7ADF82040079401F05EFA02 +:1062E000050026D0A5F8028004A8CDE900041722F5 +:1062F0000023ADF80C2019464046029401F0D5FF6A +:106300000028C8D107F108000095CDE9018096F872 +:10631000221003AA05A8049B04F0D7FA0446687863 +:10632000000701D501F018FA4CB12046FFF79BFA9F +:10633000B1E713214046FCF755FA0320ABE7049878 +:106340000090BDF80C3004220021404602F02FF9E5 +:106350004FF6FF71F9809EE72DE9FF5F83460E9EA1 +:106360009846914677888A463846FBF75BF805469B +:106370000421384607F061FB044605B9FFDF04B984 +:10638000FFDF0834CDE90274CDE9008695F82210CC +:106390004B465246584603F037FF04B0BDE8F09F25 +:1063A0002DE9F04F99B004464FF000087348ADF85E +:1063B0004C80ADF82480ADF84880A0F80480ADF89A +:1063C0000C80ADF81080ADF81880ADF8148000781E +:1063D00016460D464746012809D0022807D0032853 +:1063E00005D0042803D0082019B0BDE8F08F20465E +:1063F0000BF0E2FAD0BB28460BF0DEFAB0BB6068C7 +:106400000BF025FB90BB606848B160892189884208 +:1064100002D8B1F5007F01D90C20E5E7804608AA33 +:1064200004A92846FFF7C4FA0028DDD168688078FF +:10643000C0F34100022808D19DF8110010F0380F78 +:1064400003D028690BF0FAFA80B903A92069FFF795 +:1064500067FA0028C8D1206950B1607880079DF89C +:106460000D0000F0380002D5E8B301E011E0D0BB28 +:106470009DF80C0080060ED59DF80D0010F0380F29 +:1064800003D060680BF0DAFA18B960680BF0DFFA35 +:1064900008B11020A8E705A96069FFF741FA0028B4 +:1064A000A2D1606940B19DF8150000F007010129F3 +:1064B0003BD110F0380F38D006A9A069FFF730FAA9 +:1064C000002891D19DF8140080062ED49DF8180064 +:1064D00080062AD4A06950B19DF8190000F0070188 +:1064E000012922D100E020E010F0380F1DD0E06833 +:1064F00018B10078C8B11C2817D20CAA611C20461C +:10650000FFF77DFA0120B94660F30F27BA46074628 +:106510008DF8460042F60300ADF844000DF1330259 +:1065200015A9286808F07DFF08B107205CE79DF8F1 +:10653000540014A9CDF80090C01CCDE9019100F0E1 +:10654000FF0B00230BF20122514611A804F0D7FDE6 +:10655000E8BBBDF850000B9008492A892869091D3D +:106560000092CDE901016B89BDF8202028680499CB +:1065700004F0C5FD01007CD1207801E05803002023 +:10658000C1064FF0020A01D480062BD5ADF81C904D +:10659000606950B905A904A8FFF762FA9DF81500D3 +:1065A00020F00700401C8DF815009DF814008DF8B0 +:1065B000467040F0C8008DF8140042F60210ADF8A5 +:1065C000440009A907AA0023CDF800A000E01CE0C0 +:1065D000CDE9012140F2032211A8059904F08FFDB5 +:1065E000010046D1F8484D464FF007098088ADF8C4 +:1065F00031000CA9CDE900195B4600220295FF216C +:10660000BDF8500004F0DEFC10B1FFF7F6F8EBE641 +:106610009DF83000000625D52946012060F30F21A2 +:106620008DF846704FF42450ADF84400ADF8285072 +:1066300062789DF82800002362F300008DF828009E +:106640006278520862F341008DF828000AAACDF85A +:1066500000A0CDE9012540F2032211A804F04FFD6E +:10666000010006D1606850B3206970B903A904A87D +:1066700000E07DE0FFF7F4F96078800705D49DF82D +:106680000D0020F038008DF80D008DF8467042F6B0 +:106690000110ADF84400208940F20121B0FBF1F275 +:1066A00001FB1202606812ABCDF80080CDE9010356 +:1066B000002311A8039904F022FD010058D120788D +:1066C000C00729D0ADF81C50A06950B906A904A88C +:1066D000FFF7C6F99DF8190020F00700401C8DF85F +:1066E00019009DF818008DF8467040F040008DF8B4 +:1066F000180042F60310ADF8440013A907AACDF81C +:1067000000A0CDE90121002340F2032211A806993F +:1067100004F0F5FC01002BD1E06868B329460120A4 +:1067200060F30F218DF8467042F60410ADF8440076 +:10673000E068002302788DF8582040788DF85900E1 +:10674000E06816AA4088ADF85A00E06800798DF834 +:106750005C00E068C088ADF85D00CDF80090CDE940 +:1067600001254FF4027211A804F0C9FC010003D006 +:106770000B9800F019FE37E693480321017056B1DB +:1067800080883080BDF848007080BDF82400B0805B +:10679000BDF84C00F080002026E670B501258AB0D7 +:1067A00016460B46012802D0022816D104E08DF8C7 +:1067B0000E504FF4205003E08DF80E5042F60100C9 +:1067C000ADF80C0063B10024601C60F30F2404AA30 +:1067D00008A9184608F025FE20B107200AB070BDB0 +:1067E0001020FBE704A99DF820207748CDE900217F +:1067F000801C02900023214603A802F2012204F02B +:106800007EFC10B1FEF7F9FFE8E76F480EB1418852 +:10681000318005700020E1E770B594B00446012690 +:106820008DF83E6041F60100ADF83C0012AA0FA9B8 +:106830003046FFF7B2FF002848D12078624CC007ED +:106840004FF0000544D01C2102A814F08CFB9DF8E9 +:1068500008008DF83E6040F020008DF8080042F6F8 +:106860000520ADF83C000E959DF83A00119520F0FA +:106870000600801C8DF83A009DF838006A4620F02A +:10688000FF008DF838009DF8390009A920F0FF00BD +:106890008DF839000420ADF82C00ADF830000EA8BA +:1068A0000A9011A80D900FA80990ADF82E5002A8DB +:1068B000FFF776FD002809D1BDF80000E080BDF8A3 +:1068C00004002081401C60812570002014B070BD40 +:1068D000E5802581BDF84800F4E72DE9F74F8B46A8 +:1068E000394900269EB00A78012A04D0022A02D033 +:1068F000082021B079E54A88824201D00620F8E7D5 +:1069000089465A4501D10720F3E701214FF00008DD +:106910008DF86610ADF8401042464FF6FF71531CDB +:1069200063F30F220492ADF84210ADF84A10FF2035 +:1069300042F6020A8DF86A801AAA8DF84800ADF86E +:1069400064A0ADF868801192CDF84C8010A804F0D6 +:10695000BDFC0024254627460BAA072110A804F0F9 +:10696000B8FC78B1822857D184B37DB3ADF85C40D0 +:106970009DF85600ADF85E508DF80C8017AC0128DC +:106980005ED065E09DF832000FB3012853D1BDF809 +:10699000301051451DD116AA07A907208DE8070020 +:1069A000BDF82E0010230022FF2104F0FCFC98BB50 +:1069B000BDF85800042801D0062847D1BDF81C10A6 +:1069C000594538D10F2094E75803002036E00128BC +:1069D00031D1BDF83000B0F5205F03D042F601019F +:1069E000884228D1B9F80210BDF82E00814201D1A9 +:1069F000012700E0002704B17DB158451BD116AB3B +:106A000007AA07218DE80E00044610230022FF216B +:106A100004F0C9FC00B902E02DE035460BE0BDF8FA +:106A20005800022801D0102810D1C0B215AA07A919 +:106A300008F0D8FC50B9BDF82E608DE7052058E766 +:106A400003A915A8221D08F0ECFC08B1032050E7AB +:106A50009DF80C000023001DC2B220988DF80C2078 +:106A60000092CDE9014019A8049904F048FB10B93F +:106A7000022289F80020FEF7C0FE3AE710B50B4667 +:106A8000401E86B084B203AA00211846FEF7B7FF65 +:106A900004AA072103A88DE8070001230022FF2193 +:106AA000204604F08FFA0446BDF81000012800D0FB +:106AB000FFDF2046FEF7A1FE06B010BDF0B5FC4F8B +:106AC000044687B038780E46032804D0042802D044 +:106AD000082007B0F0BD04AA03A92046FEF768FF0E +:106AE0000500F6D160688078C0F3410002280AD121 +:106AF0009DF80D0010F0380F05D020690AF09EFFB8 +:106B000008B11020E5E7208905AA21698DE8070072 +:106B10006389BDF810202068039904F0F0FA10B1E1 +:106B2000FEF76BFED5E716B1BDF8140030800420E7 +:106B300038702846CDE738B50C00054609D000234B +:106B40006A46FF2104F09CFC28B100BFFEF755FE09 +:106B500038BD102038BD69462046FEF7E1FE00280A +:106B6000F8D1A078FF2100F001032846009A04F034 +:106B7000B0FCEBE77FB5144603AA07250292CDE9E6 +:106B800000350A462388FF2104F01CFABDF80C10DA +:106B90002180FEF732FE04B070BD2DE9F04192B0C5 +:106BA0004FF000050C000746ADF8105019D0E06812 +:106BB00028B1A068A8B10188ADF81010058038464A +:106BC000FAF730FC88B1007822286AD3384606F0FC +:106BD000FDFE80460421384606F02FFF060008D14E +:106BE00006E0102012B0BDE8F08143F20200F9E7A0 +:106BF000FFDFA078012803D0022801D00720F1E7A9 +:106C0000208838B1401C80B206AA414604F02FFB10 +:106C100038BB02E043F20300E4E706A804F02FFBD0 +:106C20009DF822204FF45051012A09D1BDF82020AF +:106C3000A2F52453023B03D1822801D088B901E098 +:106C40000846CFE7E06898B1072204A9CDE9000221 +:106C50000291A2882088BDF81030FF2104F0B2F91B +:106C600010B1FEF7CAFDBDE7A168BDF810000880AD +:106C70009DF81B00C00602D543F20140B2E70A9816 +:106C800018B1BDF82400022801D00320AAE717227A +:106C90000A98ADF80C20A1780078012903D080076C +:106CA00010D408209EE7C007FBD0002307213846F8 +:106CB00001F07EFA18B14FF00708022005E043F218 +:106CC00004008FE74FF0010803208DF83000208882 +:106CD000ADF834000BA8CDE9000500230295BDF8FE +:106CE0000C204146384601F0E0FA002887D1CDE972 +:106CF00000570836029603AA07210CA80B9B03F045 +:106D0000E4FD10B1FEF7AFFD6CE70B980090BDF805 +:106D10000C3004224146384601F049FC62E770B568 +:106D2000064615460C460846FEF722FD002805D10A +:106D30002A4621463046BDE870402EE570BDCCE5C0 +:106D400070B51E4614460D0009D044B1616831B1DA +:106D500038B157494988814203D0072070BD1020BF +:106D600070BD2068FEF704FD0028F9D132462146A7 +:106D70002846BDE87040FFF713BB70B515460C0000 +:106D800006D038B14A498988814203D0072070BDB6 +:106D9000102070BD2068FEF7EBFC0028F9D12946D1 +:106DA0002046BDE8704089E670B5054686B00E46BF +:106DB000144610460AF024FEF0BB60680AF047FE55 +:106DC000D0BBA5F57F40FF3803D02846FAF72AFB51 +:106DD000A0B1284606F0FAFD054630466946FEF7A2 +:106DE00061FE00280CD19DF810100F20082936D222 +:106DF000DFE801F008060606060A0A0843F2020068 +:106E000006B070BD0320FBE79DF80210012908D1F0 +:106E1000BDF80010B1F5C05FF2D06FF4C052D1429E +:106E2000EED09DF80610012905D1BDF80410A1F59A +:106E300028510529E4D900E022E09DF80A10012933 +:106E40000ED1BDF80810B1F5245FD9D0A1F52451B9 +:106E50000239D5D00129D3D0022901D1D0E7FFDFF3 +:106E6000606878B9002305AA2946304604F008FB7B +:106E700010B1FEF7C2FCC3E79DF81400800601D4F0 +:106E80001020BDE76188224630466368FFF772FE36 +:106E9000B6E72DE9F043074685B08946144610460B +:106EA0000AF0AEFD30B1102005B0BDE8F08300005F +:106EB00058030020384606F089FD4FF6FF76054658 +:106EC000B74201D0FF2D0AD00146002304AA48464C +:106ED00004F0D6FA30B100BFFEF78FFCE4E743F2CE +:106EE0000200E1E79DF81000C00602D543F2014020 +:106EF000DAE74FF0070803A90027CDF80080CDE9B5 +:106F00000171628833462946484604F04CFA06006F +:106F100012D160680AF074FD58B96068CDF800803D +:106F2000CDE90107238862882946484604F03BFAE8 +:106F30000646BDF80C0020803046CDE739B1FD4B48 +:106F40000A881B899A4202D843F20300704724E65C +:106F500010B586B0F74C0423ADF81430E3883BB18C +:106F600024898C4201D2914204D943F20300A3E563 +:106F70000620A1E5ADF81010002100910191ADF8B7 +:106F8000003002218DF8021005A9029104A9039195 +:106F9000ADF812206946FFF700FE8DE52DE9FC47AC +:106FA00081460F4608460AF007FDD0BB4846FAF76F +:106FB00039FA5FEA000811D098F80000222832D38D +:106FC000002317221946484601F0F2F850B1042177 +:106FD000484606F032FD060007D105E043F2020004 +:106FE000BDE8FC871120FBE7FFDF06F1080003F096 +:106FF000F1F805463878012803D0022804D007208C +:10700000EEE7A8070FD502E015F0340F0BD0B879E2 +:107010003C1DC00709D0E08838B1A0680AF0CCFC5C +:1070200018B11020DCE70820DAE73A782088002140 +:1070300028B3A0F201130721112B18D20CD2DFE8DC +:1070400003F00B090D0B1D0B121D100B0B1D1D1D4D +:107050001D0B1D00022A11D10846C1E7012AFBD0F1 +:107060000CE0EA0600E0AA06002AF5DA06E0A0F540 +:10707000C0721F2A02D97D3A022AEDD8C1B298F80F +:107080002200CDE900017288234631464846FEF7CA +:1070900099FDA5E72DE9FF4F89B01E4615460C4620 +:1070A0004FF000080F460998FAF7BCF930B10078A4 +:1070B000222806D208200DB0BDE8F08F43F202006E +:1070C000F9E7B00801D00720F5E7032E00D100262C +:1070D000099806F07BFC83464FF6FF7ACCB1022D6F +:1070E0006AD320460AF0B3FC30B904EB0509A9F1D4 +:1070F00001000AF0ACFC08B11020DCE7AD1EAAB21A +:107100002146504604F0CCFA39F8021C884253D18B +:10711000ADB28848B10702D50189491C00E00121C0 +:107120001FFA81F9F10701D0068900E0564603AA4B +:107130005946484604F09BF84FF0070A0BE0788860 +:10714000102839D808F1040108441FFA80F8A8452E +:1071500032D804EB08078FB339884945EFD34DE0A7 +:107160009DF80F100A0749D54CB304EB080908F144 +:107170000402B9F8023097B2102B1DD8DA19AA42CE +:107180001AD8B9F80020904216D1C80618D5E119CE +:10719000CDE9001A08AA0292B9F800000022594667 +:1071A00003F010FF10B1FEF728FB84E7B9F80200E6 +:1071B000BDF82010884203D00B207CE71EE005E0DC +:1071C000B9F8020038441FFA80F806E0C90604D571 +:1071D0005946FEF755FD00288FD19DF80F00FF237B +:1071E00020F010008DF80F00BDF80F00ADF8000082 +:1071F000BDF812005946009A04F06BF903A804F098 +:107200003EF818B9BDF81200B042A9D90421099876 +:1072100006F013FC040000D1FFDF22885AB10025DC +:10722000CDE900A52B4621460998FEF7CBFC0028A6 +:10723000BBD125803FE700203DE72DE9F04F89B025 +:107240001E4617000D464FF000041BD0B10802D0B7 +:10725000072009B030E7032E00D1002606F0B6FB68 +:107260008046FF2805D07DB128460AF0E7FB48B9E3 +:1072700002E043F20200ECE73988681E08440AF095 +:10728000DDFB08B11020E4E72A49B00701D54889A1 +:1072900000E00120F2074FF6FF7902D04989491E2C +:1072A00000E049468EB204AA414603F0E0FF4FF0E9 +:1072B000070A0DF10C0B33E09DF8131009072FD5C9 +:1072C0000023CDE900A3CDF808B04B46002241468B +:1072D00004F069F8E8B9F5B1BDF80C103A8821441A +:1072E0002819091D8A4231D3BDF8162020F8022B37 +:1072F000BDF80C2020F8022BCDE900A0CDF808B095 +:10730000BDF81600BDF80C300022414604F04BF8E1 +:1073100008B103209DE7BDF80C002044001D84B295 +:1073200004A803F0ACFF38B1822809D0FEF765FA53 +:107330008FE7000058030020BDF81600B042BBD90B +:1073400034B175B13988A01C814203D20C2080E78A +:1073500005207EE722462946484604F0A1F929196E +:107360000880A41C3C80002073E710B504460AF096 +:1073700047FB08B1102010BD114840892080002033 +:1073800010BD70B50C4605460E21204613F0C9FD10 +:10739000002020802DB1012D01D0FFDF70BD06201F +:1073A00000E00520A07170BD10B50C4603F02EFF63 +:1073B00000B1FFDF2046BDE81040FEF71EBA000016 +:1073C000580300204FF0E0224FF400410020C2F8A3 +:1073D000801120490870204990020860704730B53C +:1073E0001C4D04462878A04218BF002C02D000286B +:1073F00018BFFFDF2878A04208BF30BD2C701749A6 +:10740000154A0020ECB1164DDFF858C0131F012CAF +:107410000DD0022C1CBFFFDF30BD086003200860C8 +:10742000CCF800504FF400001060186030BD0860C8 +:1074300002200860CCF800504FF0407010601860D7 +:1074400030BD086008604FF06070106030BD00B55E +:10745000FFDF00BD1600002008F5014000F50040E8 +:107460006403002014F5004010B50446007894B081 +:10747000022805D0012803D043F2050014B010BD46 +:10748000A07828B1032803D8607808B1032801D96F +:107490000720F3E73F208DF800002078022801D074 +:1074A000012000E000208DF80200607800F095FDDA +:1074B000C01D8DF80300A078012800D1022000F043 +:1074C0008CFD8DF80400607800F087FD8DF80500D4 +:1074D000A07800F082FD8DF806002078012804D104 +:1074E0009DF80300401C8DF8030009A9684604F0CC +:1074F00060F800B1FFDF0020C0E72DE9FF4F8DB03D +:10750000FA49DDE91AB90600D1E902010396CDE98D +:107510000901507A117A9A4608441546C7B20DD02F +:107520000024F01D20F00700B04200D0FFDF2888C3 +:107530000399401C1FFA80F814B107E00124F0E71A +:1075400008F0FF0007F0F4FE00B1FFDF03993A46B0 +:1075500001EB0810C01C20F00301D5F81080039146 +:107560003CB9002008701FFA88F003F0F2FC00B16B +:10757000FFDF0399234601EB08000390A87A297ADC +:107580003A460844C1B203A800F071FD0398C01C3C +:1075900020F003000390697A00912B7AAA7A04B153 +:1075A000002001A906F025F900B1FFDFBDF80410A5 +:1075B0000398CDE900B90844C01C20F003001C99D1 +:1075C000CDE902103A4604B10020534605A906F061 +:1075D0009BFA00B1FFDFBDF8141003980844C01DEA +:1075E00020F007000E99821B03900A60002C35D111 +:1075F000C04ABF491160111D401E086001232C22A2 +:107600000BA9BD4806F076F800F0F1FC00211E221F +:10761000084602F053F8FAF72FFE00F034FFFEF7A9 +:10762000D7FD09AB00220521B4A0FBF7ECFA00B1AD +:10763000FFDF05F10C00FFF7EFF800B1FFDF4FF4BB +:107640007F71B04813F08FFCAE48012180F8F91328 +:10765000022180F8FA13062180F8FB1311B0BDE86F +:10766000F08F10B5A74CA078092800D3FFDF207851 +:10767000C0EBC00004EB001010F8041F21F0FF0164 +:107680000170417821F00701C91C21F018014170F7 +:107690000121E17010BD2DE9F04105460C4600279F +:1076A0000078052190463E46B1EB101F00D0FFDF69 +:1076B000287E58B1012810D0FFDF00BFA8F8006075 +:1076C0000CB1278066800020BDE8F08102270926E2 +:1076D0007CB1A88BA080A87F09E00327142644B1C1 +:1076E0006888A080286AE060A88C2082287F2072A9 +:1076F000E4E7A8F80060E6E700B5017895B001F08E +:1077000001018DF80210417801F001018DF803109C +:107710000178C1F340018DF804104178C1F34001B4 +:107720008DF80510017889088DF8061041788908D0 +:107730008DF8071081788DF80810C1788DF8091040 +:1077400000798DF80A003E208DF8000009A96846EE +:1077500003F02FFF15B000BD70B56A4CE07800282B +:107760001BD020780025C0EBC00004EB001040794E +:1077700000F00700011991F8F803401E81F8F803A2 +:107780002078401CC0B22070092800D12570A07854 +:10779000401CA07009F0B1FCE57070BD594890F82C +:1077A000FB03002800D05CE770472DE9F043554DFE +:1077B0009BB00026D5F8F40368B1FFF7EFFF00286F +:1077C00075D07022D5F8F41313F079FBFFF7C4FFDE +:1077D000C5F8F463EEE795F8F903002867D0FFF7E2 +:1077E00040FF0446444805F0B6FF606000B9FFDF83 +:1077F000606803F029FF88B12046FAF7B8F860788E +:10780000010706D520F00700401C6070FFF7A4FFB9 +:10781000D0E73948616805F0A7FFCBE736486168D3 +:1078200005F0A2FF01A800F05BFC00286CD1032149 +:10783000BDF8040006F001F98046BDF8040006F02A +:1078400062FA0746B8F1000F00D1FFDFD8F8040054 +:1078500010B10078FF2857D0FFF703FF04463846E1 +:10786000211D05F0B0FE00B9FFDFD4F8049089F8BF +:107870000060BDF804006080204600F0EAFE384653 +:1078800005F0CDFE00B9FFDF3B208DF81000BDF8FC +:107890000400ADF8120004A805F050FB0EA804F097 +:1078A0003CF96078010703D4C00607D409E02BE057 +:1078B00020F00700801C6070FFF74EFFC8F80490AE +:1078C00078E7D8F8040038B10178491C11F0FF01BD +:1078D00001709DD1FFDF6DE700221146384600F0B0 +:1078E0007AFB002894D1FFDF64E7000014B30100A5 +:1078F0000000002000060240B40700206E5246350A +:1079000078000000B80300201BB0BDE8F08310B57C +:10791000FC4CA0600868E060AFF2711001F031FE2D +:10792000607010BDF74900200870704730B50546FB +:107930004FF080500C46D0F8A41095B0491C05D1EA +:10794000D0F8A810C9430904090C08D050F8A01FAA +:1079500001F0010129704168216080680EE02B2050 +:107960008DF8000009A9684603F023FE00B1FFDF8F +:10797000012028700A982060BDF82C00A08028788B +:10798000002803D0607940F0C000607115B030BDB0 +:10799000F0B54FF080540746D4F8800095B00D46FE +:1079A0002B26401C0BD1D4F88400401C07D1D4F8FE +:1079B0008800401C03D1D4F88C00401C0BD0D4F8B4 +:1079C00080003860D4F884007860D4F88800B8600B +:1079D000D4F88C0016E08DF82C6069460BA803F0F3 +:1079E000E8FD00B1FFDF01983860029878608DF8FB +:1079F0002C6069460BA803F0DCFD00B1FFDF0198A5 +:107A0000B8600298F860D4F89000401C0BD1D4F80C +:107A10009400401C07D1D4F89800401C03D1D4F83E +:107A20009C00401C08D054F8900F28606068686083 +:107A3000A068A860E06816E08DF8006009A96846B3 +:107A400003F0B7FD00B1FFDF0A9828600B9868606B +:107A50008DF8006009A9684603F0ABFD00B1FFDFB7 +:107A60000A98A8600B98E86015B0F0BD30B5A64C38 +:107A70000546D4F8F40300B1FFDFC4F8F45330BD79 +:107A80003EB50546032105F0D8FF0446284606F01A +:107A90003AF9054604B9FFDF606818B10078FF289D +:107AA00000D1FFDF01AA6946284600F094FA60B9C8 +:107AB000FFDF0AE0002202A9284600F08CFA00B994 +:107AC000FFDF9DF8080000B1FFDF9DF80000411EB8 +:107AD0008DF80010EED260680199884201D1002033 +:107AE0006060894C94F8FA03022800D3FFDF94F811 +:107AF000FA03401CC0B284F8FA03012803D181487C +:107B0000407801F05DFD3EBD70B50446A1F57F40B3 +:107B100016460D46FF3800D1FFDF012E01D0FFDFF2 +:107B200070BD207820F00F00401D20F0F000503094 +:107B3000207000202076A5830120A07770BD70B54D +:107B400015460C460646FFF729FE90B1017821F054 +:107B50000F01491D21F0F0015031017046800121D3 +:107B6000017621680162A18881840577BDE87040B3 +:107B7000F2E53046BDE870401321FAF733BE70B528 +:107B800005460C46084609F03BFF08B1102070BDC1 +:107B90002846F9F747FC28B1284600F09DFE2070E2 +:107BA000002070BD43F2020070BD2DE9F04F87B098 +:107BB00005460020059053488946017811B10820F8 +:107BC00007B04CE54F4851494160284609F018FF7D +:107BD000002868D1484609F013FF002863D16F7A66 +:107BE0002B7AF818FF2870D82888FE286DD800B99D +:107BF0000A202880296909B94FF4B06129616A68AF +:107C0000B2B15478907804EB440420441478167987 +:107C100004EB440400EB44005479D27804EB4404B0 +:107C200006EB4606344402EB420204EB420406E053 +:107C300007EB470003EB430200EB42042046C7EB8F +:107C4000C7021044C3EBC3021044184486B206EBCB +:107C5000C60000EB400A04EBC40000EB40000090BB +:107C6000D82901D20920ABE7A87AB8422DD84FF025 +:107C70001208082F0DD8012B0BD807F0C4FC0746BB +:107C800009F0FAF93A1A297A687A521E0B189A42C0 +:107C900001DA404694E76F6883468846BFB13846AC +:107CA00009F0D5FE08B110208AE7B9787878014448 +:107CB00038780A180BEB0800904206D179793A79A6 +:107CC0001144FA781144884201D0072078E70098DF +:107CD0001FFA8AF387B20097CDE901642A4603A907 +:107CE0000020FFF70AFCDFF81C800399D9F8002078 +:107CF000D8F80400014491420AD90420C9F80010C0 +:107D00005EE7000018000020B80300208812002061 +:107D10000097CDE901641FFA8AF32A4604A9FFF708 +:107D2000ECFBDDE90301884200D0FFDF0498D8F8BE +:107D300004100844C8F80400C9F80000FF490120F5 +:107D400088F80000087005983AE72DE9F0470746E3 +:107D50000C46084609F054FE40B9384609F06EFE5C +:107D600020B9F81C20F00300B84202D01020BDE872 +:107D7000F087F3484FF00008817899B14178824646 +:107D8000C1EBC10100EB0115B4F8009015F8040F28 +:107D9000234600F00F000022294600F0F0F906000B +:107DA00004D013E0A4F800800520E0E797B1218813 +:107DB000494501D90C260DE02878234600F00F0034 +:107DC0003A46294600F0DBF9060005D00C2E01D01A +:107DD000A4F800803046CAE79AF801005446401CD7 +:107DE000C0B28AF80100092801D184F80180A07886 +:107DF000401EA070687800F0070101290BD002290D +:107E000003D0032918D0FFDFE4E7C006E2D4688876 +:107E1000FFF736FEDEE7CB48696805F0A5FC94F86D +:107E2000F903401CC0B284F8F9030128D2D1C64836 +:107E3000407801F0C5FBCDE794F8FB03401C8AF8BD +:107E4000FB03C7E770B50D46044609F0B5FD18B948 +:107E5000284609F0D5FD08B1102070BD29462046FE +:107E6000BDE8704007F09BBA70B5044615460E4653 +:107E7000084609F0A1FD18B9284609F0C1FD08B16E +:107E8000102070BD022C03D0102C01D0092070BD31 +:107E90002A463146204607F0A5FA0028F7D00520EB +:107EA00070BD70B514460D46064609F085FD38B91B +:107EB000284609F0A5FD18B9204609F0BFFD08B114 +:107EC000102070BD22462946304607F0AAFA002845 +:107ED000F7D0072070BD10B594B0044609F090FDAE +:107EE00010B1102014B010BD0F208DF8000009A9AA +:107EF000684603F05EFB0028F4D19DF82C0020704A +:107F0000BDF82E006080BDF83000A0800020E9E7B9 +:107F100070B505460C46084609F090FD20B93CB105 +:107F2000206809F06DFD08B1102070BDA08828B14F +:107F300021462846BDE87040FEF7A0B9092070BD73 +:107F400070B504460D46084609F036FD30B9601E8E +:107F50001E2814D8284609F02FFD08B1102070BD46 +:107F6000022C01D9072070BD04B9FFDF774800EB70 +:107F7000840050F8041C2846BDE870400847A4F16E +:107F800020001F28EED829462046BDE87040FAF7A9 +:107F9000BCB870B504460D46084609F031FD30B94D +:107FA000601E1E280DD8284609F006FD08B11020D5 +:107FB00070BD012C01D0022C01D1062070BD07201C +:107FC00070BDA4F120001F28F9D829462046BDE83D +:107FD0007040FAF709B905F099B9032803D00228CF +:107FE00003D001207047062070470320704710B56A +:107FF00094B003F0CFFA54484178806803F0C0FC95 +:10800000514801240C300178012916D130218DF816 +:108010000010C0788DF8020010B1012803D005E0EF +:108020008DF8024002E000208DF80200684604F05E +:1080300085FF10B109A803F070FD02208DF824001F +:108040008DF825008DF8260009A8FFF70DFA00B17C +:10805000FFDF8DF8244003208DF825008DF82600E1 +:1080600009A8FFF701FA002800D0FFDF3AE72DE961 +:10807000F0410646022012B101EB4200401DC7B29A +:108080003068C01C20F0030232601BBB2C483B460A +:108090000A21283809F081FB002408E00A2C11D2BB +:1080A000DFE804F005070509090B0B05050528485D +:1080B00004E0284802E0284800E0284809F08CFB4A +:1080C000054600E0FFDFA54200D0FFDF641CE4B2FC +:1080D0000A2CE3D3306800EB07103060BDE8F08174 +:1080E0002DE9F04395B081463A208DF82C00694681 +:1080F0000BA803F05EFA00B1FFDF43F20406002490 +:108100006D46DFF83C8032E02F19B87DC10706D0FC +:10811000400704D405EB4400C08800F0CEFB98F87B +:10812000FA0310B3B87D80071FD505EB4400C08863 +:1081300000F055FAC8B105EB440011E0080000203A +:10814000B8030020B40700201800002014B3010079 +:10815000391F0000F7840000E12F0000E9F0000063 +:10816000C188A9F80010002605E0641CE4B29DF85F +:108170000400A042C8D815B03046BDE8F0832DE910 +:10818000F041044600201880601E1D4616460F462A +:10819000052800D3FFDF05482A4600EB840031465E +:1081A00050F8043C3846BDE8F041184724B30100BC +:1081B0002DE9F0478A46984615460646032105F004 +:1081C0003CFC0446304605F0B0FD0C35AFB200254E +:1081D00081462E4604B9FFDFB9F1000F00D1FFDF61 +:1081E00004EB8A000189B94200D30125218CB942F0 +:1081F00002D2BAF1060F00D3012638EA050104D0F5 +:10820000817A41F0020181720BE038EA060108D060 +:10821000817A41F00401817214F8220F40F00400C9 +:10822000207005EA0600BDE8F0872DE9F047824698 +:10823000DDE90854174605F10C0099460E461FFA71 +:1082400080F800232A4639465046FFF7B1FF60B157 +:10825000B07800061BD424F8045C24F8029C504635 +:1082600005F063FD040008D106E0072F01D01120BE +:10827000D9E743F20400D6E7FFDF2D1D2046A9B25F +:1082800004F047FF00B9FFDF504603F0E5FA06EBC4 +:108290008700062F0289A2EB0801018103D2318CED +:1082A000A1EB080030840020BDE72DE9F04385B044 +:1082B0001E46DDE90D5491460F46DDF8308005F08D +:1082C00034FD60B309F10402694692B204F0BBFECA +:1082D00050B300980770BDF80800042800D2FFDFF3 +:1082E000002701983A46394607808770019803F0C5 +:1082F00075FB1EB1BDF80800001F3080B8F1000FFB +:1083000003D00198C01DC8F8000015B1BDF81000D9 +:1083100028808CB1288870B1039820600CE043F26B +:10832000020005B0BDE8F083072F01D01120F8E767 +:1083300043F20400F5E727600020F2E72DE9F04F53 +:108340000F46054687B016465088032105F075FB99 +:10835000040000D1FFDF4FF000098DF80C90A078E9 +:10836000400600D1FFDF042F53D3297841F30000EA +:10837000401C06D162786B789A424AD12278120763 +:1083800047D04FF0010B4FF00208142939DA4FF6AD +:10839000FF7A012933D0122902D0132931D11CE0F0 +:1083A0000C2F2ED1A17801F07F01012929D020784E +:1083B00020F00F00401C2070687860708DF80CB0C1 +:1083C000A888ADF80E00E888ADF810002889ADF84F +:1083D00012006889ADF8140016E0062F11D120783C +:1083E00020F00F0020707188012009F0A2FA8DF8AA +:1083F0000C80ADF80EA0A888ADF8100004E0062FA0 +:108400000AD09DF80C10B9B17088324603A9F9F76B +:1084100018FE07B0BDE8F08F207820F00F00207024 +:108420007188012009F085FA8DF80C80A888ADF8D4 +:108430000E00ADF810A0E7E70028EAD0768806A87D +:10844000CDE9000927464C46002306220421304688 +:10845000CDF80890FFF729FF00B1FFDF069805234C +:10846000042280F800B069784170A0F8028084800E +:108470000621CDE9001039463046FFF7D6FE002828 +:10848000C7D0FFDFC5E70020FE49024621F81020D3 +:10849000401C0828FAD3704770B50C46897821F043 +:1084A000FF01A170217821F00F012170012161707D +:1084B0000021616005F039FC050000D1FFDF28468E +:1084C00004F0BFFDF53820852046BDE8704000F07F +:1084D00010BB70B50D46032105F0AFFA040000D1C2 +:1084E000FFDFA07865F30600A07070BD70470146FD +:1084F000012009F01EBA3EB58DB20321284605F0D1 +:108500009CFA040000D1FFDF2078002220F00F0049 +:10851000207002208DF800004FF6FF70ADF80200C9 +:10852000ADF8040069462846F9F78BFD3EBD2DE9FC +:10853000F04705460C4600784FF0000901219246AD +:108540004F46B1EB101F00D0FFDF287E032809D073 +:10855000FFDF00BFAAF8007014B1A4F80090678094 +:10856000002060E6AE8B4FF0700906F10A0087B27A +:10857000D4B16888A080688B2081E680A889A9682A +:10858000001F80B28046024604F10A00C91D12F0A5 +:1085900051FC4645DED904EB0800A6EB08020A3080 +:1085A000296912F047FCD5E7AAF80070D8E72DE951 +:1085B000FC410F461C46164680460321089D05F0E7 +:1085C0003CFA010008D033463A464046CDE9004522 +:1085D000FFF72BFEBDE8FC8143F20200FAE770B51D +:1085E0000546A0F57F4086B0FF3811D0284605F03B +:1085F0008AFB040000D1FFDF2046694604F0E3FF58 +:1086000000B9FFDF019CB4F80500E41C052802D086 +:10861000012006B070BD2E460321284605F00DFA54 +:10862000050000D1FFDF2079122807D120880C280F +:1086300004D1A87800F07F00022806D0002306228B +:1086400004213046FFF7B4FDE3E7002306220521AD +:10865000F7E7F8B5024680689489938A30F8031FDB +:108660001C444588241F8C421ED1042D1DD0052D8D +:1086700029D0062D1ED0402D16D30E46144628466E +:1086800000F0D7F908280FD0207820F00F00401C08 +:1086900020F0F00010302070032020766583A68340 +:1086A000607840F008006070F8BDBDE8F840001D3B +:1086B00000F0CBB90093548813690A46011D204687 +:1086C000FBF7CCF9F8BDBDE8F840001D36E67FB5F4 +:1086D0000D460646032105F0B0F904003DD0207890 +:1086E00000F00F0001283BD0002003A9CDE90010C5 +:1086F000034602900C2205213046FFF7D6FD0028E4 +:1087000029D1039812210523017061781A46891C2A +:10871000417008214180298881806988C180A988A9 +:108720000181E98841810C21CDE9001021463046C4 +:10873000FFF77BFD00B1FFDFF0230022314601206F +:1087400009F05AF8207820F00F00401C2070607863 +:10875000801C6070002004B070BD43F20200FAE794 +:108760001120F8E77FB50D460646032105F065F9AF +:10877000040006D0207800F00F00012804D0082063 +:10878000E9E743F20200E6E7002003A9CDE9001083 +:1087900003460290062205213046FFF786FD002899 +:1087A000D9D103981321052301706178417002210A +:1087B000418085800621CDE900101A4621463046C9 +:1087C000FFF733FD00B1FFDF207820F00F002070AD +:1087D0000020C0E72DE9F84F0F468346032105F03E +:1087E0002CF90546584605F0A0FA80464FF0000ADD +:1087F00005B9FFDFB8F1000F56D1FFDF54E0404666 +:108800006946002204F082FD9DF800408146082C54 +:1088100000D3FFDF05EB840609F108003189062C3F +:108820000144318102D2298C08442884072C03D1C9 +:108830000AF1010000F0FF0AB07AC0070CD021460F +:10884000284600F0DDF838B9B07A032C20F001009A +:10885000B07258462ED0FFDFB07A810706D520F0DF +:108860000200B0722146584600F0DAF8062C1BD8F8 +:1088700095F82200410717D520F0040085F8220062 +:10888000002401E0E407002005EB8401887A420718 +:1088900006D520F0040088722146584600F0C0F842 +:1088A000641CE4B2062CECD37F1EFFB2A7D2504664 +:1088B000BDE8F88FFBF773F9CEE710B5032105F09B +:1088C000BCF8040000D1FFDF204600F012F9A078C8 +:1088D00040F08000A07010BD10B5032105F0ADF888 +:1088E000040000D1FFDF208D2321B0FBF1F0C0B2E6 +:1088F00010BD70B50D46032105F09FF8040000D1AE +:10890000FFDF062D00D9FFDF2946204600F078F86A +:10891000002805D004EB85018A7A42F001028A72B0 +:1089200070BD10B50446402801D2072010BD00F0EC +:1089300080F8082802D04FF4445010BD0021774839 +:1089400002E0491C082903D230F81120002AF8D18E +:10895000082903D020F81140002010BD042010BDCC +:1089600010B5402801D2072010BD00F062F8082899 +:1089700005D06A4A002122F81010084610BD0520D3 +:1089800010BD70B588B015460C00064606D02DB156 +:108990006088402804D2072008B070BD1020FBE793 +:1089A000218849B300F045F8082827D003AA06A972 +:1089B00005A88DE80700228804AB07213046FFF7A1 +:1089C00074FC0028E8D1BDF810202946059812F063 +:1089D00031FA2088BDF81010884204D9421A29447F +:1089E000039812F027FA05980090238862880721DF +:1089F0003046FFF7DCFDCFE70C20CDE70520CBE7C5 +:108A0000072903D0464A32F8112000E0028D00EB1E +:108A100081000089904201D20120704700207047F8 +:108A200010B5032901D0FFDF10BDBDE81040FBF7F2 +:108A300078B801460020394A02E0401C082803D2D9 +:108A400032F810308B42F8D170472DE9F0410F46D3 +:108A50008046014686B014463846FCF744FDC0B255 +:108A600008283CD10025ADF81450039560880321F7 +:108A700004F0E3FF060000D1FFDF00213046FFF7DE +:108A8000BFFF68B91722ADF8142003A8CDE900058F +:108A90000295002360881946FFF707FC00B1FFDF4D +:108AA000009405AA41463846039BFDF755FCC0B229 +:108AB00005281CD2DFE800F0031B13161300BDF8D5 +:108AC000140000280BD003990423CDE9000160882D +:108AD00000223146FFF7A9FB002800D0FFDF06B0D7 +:108AE000BDE8F081607840F010006070F7E7FFDFCC +:108AF000F5E710B504462021083012F034FA084892 +:108B0000002100BF30F8112004EB8103491C1A81B9 +:108B10000629F7D9208DA08410BD0000E4070020AD +:108B20003CB3010030B44FF0E02001234FF4006C5F +:108B30000021C0F880C11D02C0F880511C06C0F899 +:108B40008041E54A82F80014D21E82F80014E34AFC +:108B500082F80014E24A53609360C2F84011C2F8F0 +:108B60004411C2F84811C0F880C2C0F88052C0F861 +:108B70008042C0F800C1C0F80041136030BC7047AB +:108B800070B401204FF0E023C6024FF0000CC3F890 +:108B900080610402C3F880410506C3F88051D04AC1 +:108BA00050609060CF4801680029FCD1C2F840C1F4 +:108BB000C2F844C1C2F848C1C3F88062C3F8804219 +:108BC000C3F8805270BC70474FF0E0204FF4006152 +:108BD000C0F88012C910C0F880127047002804BF86 +:108BE000C1487047012804BFC0487047022804BF2D +:108BF000BF48704700B5FFDF002000BD08B5B84989 +:108C0000002298B101282FD002281CBFFFDF08BD29 +:108C10004FF48020C1F80803C1F84803B54802604A +:108C2000C1F84821B2480068009008BD4FF4803078 +:108C3000C1F80803C1F84803AF4B1A60C1F84021DE +:108C4000AE4BC1031960AE49C1F808034FF0E023F1 +:108C50000012C3F88001AB480260C1F84021C1F89E +:108C60000022A948027008BD4FF40030C1F8080383 +:108C7000C1F84803A5480260C1F844219B48006838 +:108C8000009008BD70B5DFF858C204260024012505 +:108C900058B1012840D002281CBFFFDF70BD9C4A9C +:108CA0004FF48020012B3CD144E0881E20F07F410E +:108CB0004FF48030CCF80803CCF84041CCF84403A2 +:108CC000CCF84015012B14BF002101218E4B5970A7 +:108CD0008B490D61DFF83CC2CCF800408E4C4FF060 +:108CE000020CC4F800C0DFF834C2CCF80060DFF832 +:108CF00014C23D32CCF80020C1F800524FF0E02CF5 +:108D00008A15CCF88022C1F80403CCF800210804AD +:108D1000834908601D7070BD824A4FF40030012BFA +:108D200008D0CCF80803C2F84041CCF84403C2F89C +:108D3000401570BDC2F84041CCF80403CCF84403A0 +:108D4000C2F8401570BD67480068704770B5764836 +:108D50000568774975480860614CD4F840010026E1 +:108D600001280AD1D4F8080310F4803F05D04FF44D +:108D70008030C4F80803C4F84061D4F844010128E5 +:108D80000DD1D4F8080310F4003F08D04FF40030A0 +:108D9000C4F80803C4F84461012007F0BEFBD4F80E +:108DA000480101280DD1D4F8080310F4802F08D011 +:108DB0004FF48020C4F80803C4F84861022007F08B +:108DC000ACFB5C48056070BD574810B50468584955 +:108DD000564808604C490878002808BF03201AD07C +:108DE000464A4FF000401060454AC00BC2F80803E5 +:108DF00003124FF0E02C0020CCF88031414B18607A +:108E0000C2F84001C2F8000208704A78002A1CBF6C +:108E10004870002001D007F080FB4648046010BD78 +:108E20004FF0E0214FF08070C1F8000270474FF022 +:108E3000E0214FF08070C1F8800270474FF0E021D0 +:108E40004FF40010C1F8000270474FF0E0214FF4DA +:108E50000010C1F8800270472949012008614FF0D5 +:108E6000E0210002C1F880027047410A43F609522E +:108E70005143C0F3080010FB02F000F5807001EBD5 +:108E800050207047430B48F2376C03FB0CF31B0C6C +:108E90004FEA432CC1F800C0DFF89CC003FB0C0371 +:108EA00026484CF2F72C5843400D10FB0CFC0CEB01 +:108EB000432303F580735B1213700A681044086043 +:108EC0007047194810B5046819491848086007F038 +:108ED00011FC1848046010BD0BE000E018E000E051 +:108EE00000B0004004B500404081004044B1004063 +:108EF00048B1004048B5004040B5004008F5014089 +:108F000000800040408500402800002044B500401B +:108F100008B00040048500400885004010850040EE +:108F200004F5014004B000401005024001000001BA +:108F30001805024014050240F7C2FFFF6F0C010044 +:108F400010B5EFF3108000F0010472B6EC484178E0 +:108F5000491C41704078012801D108F0EDF8002C3F +:108F600000D162B610BD70B5E54CE07848B9012576 +:108F7000E570FFF7E5FF08F0E7F820B1002008F002 +:108F8000C3F8002070BD4FF080406571C0F80453F5 +:108F9000F7E770B5EFF3108000F0010572B6D84C1A +:108FA000607800B9FFDF6078401E6070607808B9B3 +:108FB00008F0C6F8002D00D162B670BDD04810B5DB +:108FC000C17821B100214171C170FFF7E2FF00209B +:108FD00010BD10B5044608F0B7F8C949C978084073 +:108FE00000D001202060002010BD2DE9F05FDFF8E7 +:108FF00010934278817889F80620002589F80710B7 +:10900000064689F8085000782F4620B101280FD075 +:1090100002280FD0FFDF08F0A4F898B108F0A8F8F4 +:10902000A8420FD1284608F0A7F80028FAD047E058 +:109030000125F0E7FFF784FF08F086F80028FBD051 +:109040000225E8E701208407E060C4F80471AD4917 +:109050000D600107D1F84412AA4AC1F3423124320B +:109060001160A8494FF0020B34310860C4F804B312 +:10907000A060DFF894A2DAF80010C94341F30011B0 +:1090800001F10108DAF8001041F01001CAF80010EF +:1090900000E020BFD4F804010028FAD0284608F0E8 +:1090A0006BF80028FAD0B8F1000F05D1DAF80010FB +:1090B00021F01001CAF80010C4F808B3C4F8047114 +:1090C00099F807004C4670B1307860B908F03CF868 +:1090D000064608F027FA6FF0004116B1C4E9031004 +:1090E00001E0C4E9030115B12771BDE8F09F01203B +:1090F0002071BDE8F05F00F0E1B810B5040000D1C8 +:10910000FFDF4FF080414FF0FF30C1F8080300222D +:10911000C1F80021C1F80421C1F80C21C1F81021C7 +:1091200008F018F828B176490120C8704878401C2A +:1091300048702046BDE8104057E72DE9F041012571 +:10914000AF077D616E4CE079F0B1012803D0217A40 +:10915000401E814218DA07F0F7FF064608F0E2F9F0 +:10916000E179012902D9217A491C21720EB12169C4 +:1091700000E0E168411A022902DA11F1020F0EDC67 +:109180000EB1206100E0E060FFF7DAFE07F0DCFFDF +:1091900010B13D61A57000E0257000202072BDE88F +:1091A000F0812DE9F05F5948D0F800B0574A58498E +:1091B000083211608406D4F8080110B14FF001089C +:1091C00001E04FF00008D4F8000100B10120814611 +:1091D000D4F8040108B1012600E00026D4F80C01FF +:1091E00000B101208246D4F8100108B1012700E047 +:1091F000002748EA090126EA010020EA0A00B843EC +:1092000000D0FFDF0025B8F1000F04D0C4F80851EA +:10921000012007F079FFDFF8E880B9F1000F13D0E3 +:10922000C4F8005198F8050020B188F805500020D6 +:1092300007F06AFF98F8000030B107F085FF18B119 +:10924000012088F8020020610EB1C4F80451BAF17F +:10925000000F0AD0C4F80C5198F80200464600B935 +:10926000FFDFB5703570FFF794FE37B1C4F81051C9 +:1092700098F8040008B1FFF760FF2449091DC1F800 +:1092800000B032E770B51E4DE87808B907F058FF16 +:1092900001208407A061A87858B100BFD4F80C0160 +:1092A00020B9002007F068FF0028F7D10020C4F89B +:1092B0000C014FF0FF30C4F8080370BD2DE9F041F8 +:1092C0001926B507C5F808630124AC610020C5F86C +:1092D0000001C5F80C01C5F8100107F035FF084F73 +:1092E00010B1BC702C6100E03C70FFF729FE05490D +:1092F000B87920310860C5F804636C614FE700005D +:109300002C0000201805004010ED00E01005024080 +:109310000100000110B50D2000F06FF8C4B26FF02D +:10932000040000F06AF8C0B2844200D0FFDF3A497E +:109330000120086010BD70B50D2000F048F8374CD2 +:109340000020C4F800010125C4F804530D2000F0EA +:1093500049F825604FF0E0216014C1F8000170BDAC +:1093600010B50D2000F033F82C4801214160002198 +:10937000C0F80011BDE810400D2000F033B82848B7 +:1093800010B5046826492748083108602349D1F8F8 +:109390000001012804D0FFDF2148001D046010BD3A +:1093A0001D48001D00680022C0B2C1F8002107F06E +:1093B000D4FFF1E710B51948D0F800110029FBD00F +:1093C000FFF7DDFFBDE810400D2000F00BB800F006 +:1093D0001F02012191404009800000F1E020C0F807 +:1093E0008011704700F01F02012191404009800068 +:1093F00000F1E020C0F880127047002806DA00F083 +:109400000F0000F1E02090F8140D03E000F1E020DF +:1094100090F800044009704704D5004000D0004097 +:10942000100502400100000110B5202000F075F881 +:10943000202000F07DF84449202081F800044349B1 +:1094400000060860091D42480860F7F75BFF3F49C6 +:10945000C83108603F48D0F8041341F00101C0F85A +:109460000413D0F8041341F08071C0F80413364996 +:1094700001201C39C1F8000110BD10B5202000F0FA +:109480004CF8324800210160001D01602F4A481E3F +:10949000E83A10602F4AC2F808032C4BC833196011 +:1094A000C2F80001C2F860012B490860BDE8104015 +:1094B000202000F03DB825492848EC390860704765 +:1094C00022492648E8390860704770B51F4A80690C +:1094D000E83A224911601F49D1F800610023204D6C +:1094E0001D4A5C1E1EB1A84206D300210FE0D1F830 +:1094F000606186B1A84209D2C1F80031C1F860317B +:109500001460BDE87040202000F012B81168BDE87A +:10951000704011F05ABDFFDF70BD00F01F02012145 +:1095200091404009800000F1E020C0F880117047B0 +:1095300000F01F02012191404009800000F1E0206D +:10954000C0F880127047000020E000E000060240F2 +:1095500084120020000002400004024001000001CB +:1095600000C001004FF0E0214FF00070C1F8800111 +:10957000C1F88002384B802283F80024C1F8000132 +:10958000704700B502460420344903E001EBC003F4 +:109590001B792BB1401EC0B2F8D2FFDFFF2000BD07 +:1095A00041F8302001EBC00100224A718A7101228A +:1095B0000A7100BD294A002102EBC0000171704709 +:1095C00010B50446042800D3FFDF244800EBC40490 +:1095D0002079012800D0FFDF6079A179401CC0B25A +:1095E000814200D060714FF0E0214FF00070C1F86F +:1095F000000210BD2DE9F0411948056818491948C5 +:10960000083108601448042690F80004134F4009FC +:10961000154C042818D0FFDF16E0217807EBC100B5 +:109620000279012A08D1427983799A4204D0427999 +:10963000827157F8310080472078401CC0B22070FA +:10964000042801D300202070761EF6B2E5D204482B +:10965000001D0560BDE8F08119E000E0F40700207E +:109660001005024001000001400000200F4A12686E +:109670000D498A420CD118470C4A12680A4B9A428B +:1096800006D101B507F022FFFFF715FFBDE8014045 +:10969000074909680958084706480749054A064B1B +:1096A0007047000000000000BEBAFECA980000200B +:1096B000040000208811002088110020F84B586019 +:1096C00019721A80C90011F04EBC00210180704748 +:1096D0004FF6FF720280032008F02BB970472DE986 +:1096E000F04F0E46017804464FF0010A0AFA01F0E5 +:1096F00047F2FF1100EA01086168154697B0088833 +:10970000A0F57F42FF3A06D0B8F1000F07D047F22C +:10971000FE12104203D0012017B0BDE8F08F40EADE +:10972000080008804FF00009A5B185F80090237863 +:109730000027052003220221DFF864B3102B75D225 +:10974000DFE803F0740D131C2F4A515A31A5A1759F +:10975000A9F1F0EF20780B28E9D00420DCE729708C +:10976000A089A5F8010032801DE104212970A1899A +:10977000A5F80110E189A5F8031082E00620287001 +:10978000A089A5F80100E089A5F80300208AA5F8C2 +:109790000500A28AE81DA16911F04CFBA08AC01D3A +:1097A0006FE0082129702178082901D11021297042 +:1097B000A189A5F80110E189A5F8031030806A1D80 +:1097C000694604F1100005F02CFE00287ED1308897 +:1097D0009DF80010084454E00A202870A089A5F8DC +:1097E00001003280AAE00C212970A189A5F801109E +:1097F000E189A5F80310B7E0A2890AEB420081B223 +:109800003088884262D3052960D30E20287000205A +:1098100008E0236905EB400C33F81030401CACF82D +:10982000013080B29042F4D33180BCE0CAE09BF8B2 +:1098300009005A46002873D0401E5072227BDBF884 +:109840000400236900EBC205AA882868D3F800C089 +:109850000244A2F1080042F808CC5A6842608DF830 +:1098600000108DF8019028680290A888ADF80400D7 +:1098700000216846FBF776FCA5F80490002E01D085 +:10988000484630808FE0287840F0800129702878A1 +:1098900040F040012970287820F03F0012302870F5 +:1098A000A189A5F80110E289E81C216911F0C2FA2A +:1098B000E089C01C3080287841063FD5000672D56B +:1098C0008DF800A08DF80190308800E026E0001DA2 +:1098D000ADF804000295E189E81C08440390001DDE +:1098E00004909BF808008DF8140000216846FBF7EF +:1098F00039FC074630880C303080022F01D007B386 +:1099000063E09DF81420DBF804109BF808305846FB +:1099100001EBC2019A4201D28A882AB1042754E09D +:1099200030E02BE022E00DE0427A521C8BF8092057 +:109930000D6030888880A6F8009046E06168A089B4 +:10994000888030E0287820F03F0016302870A08909 +:10995000A5F80100E089A5F80300228A681D616965 +:1099600011F068FA208A401D3080E7E7287820F05F +:109970003F0018302870207B687055E760680188C8 +:10998000090401D4052720E0C088A189884201D0BC +:1099900006271AE01E202870A6F800A0606801883B +:1099A00021F400410180B8F1000F0ED0BBF8000097 +:1099B000002283000320A16807F01EFF6168207861 +:1099C000887007E0A6F8009003276068018821EA04 +:1099D0000801018038469FE62DE9FF4F97B00C46FD +:1099E000249E70B117280CD83288A2F57F43FF3B24 +:1099F00007D02278530601D4120604D508201BB0E4 +:109A00008BE60720FBE74FF000098DF800908DF8FA +:109A100001902278831E02F03F0CA0F1010A611C24 +:109A20004D461FFA8AF702AABCF1200F79D2DFE86F +:109A30000CF089107861786C78AA78CD78F778FC8A +:109A400078F478F378F2787878F178F078EF78EE47 +:109A50007889052876D104208DF80000B0788DF83B +:109A600004006088ADF8060020798DF80100607868 +:109A700000F03F000C282BD00ADCA0F102000928DE +:109A800060D2DFE800F0145F175F1C5F1F5F2200E9 +:109A9000122826D006DC0E281DD01028DAD11DE0B1 +:109AA0001408002016281FD01828D3D11FE03078C2 +:109AB000800701E030784007002843DA37E130784A +:109AC0000007F9E73078C006F6E730788006F3E75C +:109AD00030784006F0E730780006EDE73088C005C2 +:109AE000EAE73088C004E7E730888004E4E730889C +:109AF0004004E1E73178890724D50328AAD105205D +:109B00008DF80000B4F80100D2E031784907F3D5B0 +:109B1000062817D3617898B2012903D0022999D178 +:109B200002E01FE1022700E0102706218DF8001057 +:109B300061788DF80610ADF80490A11C904607F1ED +:109B400002091BE097E000BF31F8022BA0F1020AE6 +:109B5000A8F800208B463A4608F1020011F06AF995 +:109B600008EB070202F10208BDF80420AAEB070087 +:109B7000521C0BEB070180B2ADF804208145E3D9FC +:109B8000002878D1D3E03078000774D507208DF80D +:109B900000001FFA8AF1ADF80490601C0DF1060276 +:109BA0000FE000BF30F8023B22F8023B30F8023BE6 +:109BB00022F8023B091FBDF8043089B25B1CADF8E6 +:109BC00004300429EED2002955D1B0E03178C9061D +:109BD00051D502284FD308208DF80000ADF806902B +:109BE00061789BB28DF80410A01C0CE0078822F865 +:109BF000047B871C80C25B1ABDF8067008447F1C7A +:109C00009BB2ADF806709942F0D9A3BB8FE070E02B +:109C100075E065E04FE042E01DE012E005E0FFE79F +:109C20003078800627D5092003E03078400622D519 +:109C30000A208DF80000B088ADF80400ADF8067079 +:109C400007E03078000616D50B208DF80000ADF83F +:109C5000047002916BE03188C9050CD502287FD3CE +:109C60000C208DF8000099B2ADF8069063788DF85D +:109C70000430A01C10E073E0078822F8027B4788BC +:109C800022F8027B071D80C2C91ABDF8067018446D +:109C90007F1C89B2ADF806708B42EDD993E731880D +:109CA000C9045DD501285BD10D208DF80000B08876 +:109CB000ADF804003BE03188890451D505284FD325 +:109CC0000E218DF80010B188ADF80410B4F803101F +:109CD000401FADF80800601DADF80610039026E0A7 +:109CE000318849043CD501283AD10F208DF8000075 +:109CF0001DE03188090433D4B4F80110F180032841 +:109D00002ED3217801F03F011B2925D011218DF898 +:109D10000010318841F40041A6F80010B4F8011099 +:109D2000ADF80410C01EADF80600E01C02902078CB +:109D300000F03F001B2809D01D2807D003201A99E6 +:109D400007F0F7FD308800F400403080684619992C +:109D5000FBF708FA284652E610218DF80010DDE7DF +:109D60000725F7E70825F5E700B597B0032806D1E2 +:109D70008DF80000019100216846FBF7F3F917B058 +:109D800000BD00002DE9FF4F8DB09346DDE91A5666 +:109D9000DDF8749004464FF0000A082A06D0E06906 +:109DA00001F02CF858B110203070BCE0288809214F +:109DB00040F01000288089F80010022717E0E169C0 +:109DC00001208871E2694FF420519180E169887225 +:109DD000E06942F601010181E16900208873288869 +:109DE00040F020002880112089F8000004273078F6 +:109DF00009900A20307004F1180009F102080225C8 +:109E00000B9001F063FA002066E000BFBBF1100F79 +:109E100006D1022D04D0A8EB0A00BDF80C20428028 +:109E2000BDF80E001099884203D9F649097A0E91BF +:109E300004E003D1099909B131701FE0A8F80000CE +:109E40001C980088A0EB0500A0EB070083B2C7F1C7 +:109E5000FF00984200D203460E980AAA08EB0701B9 +:109E60008DE8070094F82010BDF80E00002201F0E4 +:109E70009AFA307030B1C0B2832858D0BDF80E00C5 +:109E800020833DE0089828B1DE48006800790A2860 +:109E90002BD335E0BDF82800C11901F0FF0A022DCF +:109EA0000ED099F80110514503D1BDF81820824217 +:109EB00008D0D4488A4600680178032908D021E0F8 +:109EC00089F801A0CF4800680178042906D008E08D +:109ED00000790A2816D20120089006E0BDF80E107D +:109EE000818005EB0A00D04485B203AA0E990B9835 +:109EF00001F0EFF920B91C980088401BB84285DAC0 +:109F0000022D0BD0BBF1100F04D1A8EB0A01BDF854 +:109F10000C0048801C98058000203070B94800680B +:109F20000078032803D0002011B0BDE8F08F022094 +:109F3000FAE72DE9F0410546406B1346002758B378 +:109F4000491F8EB2698FA1F57F42FF3A05D04218B2 +:109F500092881144891D8CB200E00024A1192A8F37 +:109F60000831914216D82044B3F8011020F8021BA2 +:109F7000B3F8031020F8021B324620F8026B591D7B +:109F800010F058FF6C87696B00202144B61D3144E6 +:109F9000088002E0092700E083273846BDE8F08109 +:109FA00010B50B88048F9C420CD9446BE0180488D0 +:109FB00044B1848824F40044A41D23440B80106021 +:109FC000002010BD822010BD2DE9F04788B000258B +:109FD000904689468246ADF81050072745E0039821 +:109FE00006888088000440D4A8F8006005A800977F +:109FF000CDE901504FF4007300224946304601F08C +:10A00000D2F9040038D1BDF81000ADF8180003985B +:10A0100004888188B44214D10A0412D4CDE90057CF +:10A0200021F40041029541F480434288494620468C +:10A0300000F0C8FF04000BD10398818841F400416F +:10A04000818003AA06A95046FFF7AAFF0400DED0CC +:10A05000CDE9005703980295BDF81430008800221E +:10A06000494600F0AFFF822C06D103AA04A950464E +:10A07000FFF796FF0400B2D0ADF8105004E003984B +:10A08000818821F40041818003AA04A95046FFF78A +:10A0900087FF0028F3D0822C03D0204608B0BDE80B +:10A0A000F0870020FAE730B50446406B97B00025F2 +:10A0B00070B10B208DF80000208FADF80800606BA8 +:10A0C0000391019000216846FBF703FE8DF80050D4 +:10A0D0004FF6FF7065636087258717B030BD2DE9A7 +:10A0E000F041044686B00E46616B00200C9D174679 +:10A0F00000292AD0012B28D12A4631462046FFF7D5 +:10A1000063FF002821D1002F1FD0A046344600262F +:10A11000ADF8106007270EE00398008828800398A8 +:10A120000296811DCDE90017838842880088214668 +:10A1300000F048FF30B903AA04A94046FFF730FFFA +:10A140000028E9D0822800D1002006B026E72DE9BA +:10A15000F0411546DDE906644A1D378892B2974200 +:10A1600001D206201AE73280172204F8012B0A4692 +:10A17000208065801946201D10F05CFE00200DE750 +:10A1800000220280C262831D0263C36142634FF6F4 +:10A19000FF734387028780F8201070474FF6FF72E5 +:10A1A0000280042007F0C5BB30B597B00D460446C9 +:10A1B000FFF779FF208E48B101208DF80000E06A9A +:10A1C000CDE9010500216846FBF783FD0020E06230 +:10A1D000206382E70146002009880A0700D5012094 +:10A1E00011F0F00F01D040F00200CA0501D540F097 +:10A1F00004008A0501D540F01000490501D540F062 +:10A2000020007047200800202DE9FF4FA7B01F460F +:10A21000349E299D379C5FEA000817D028784106B4 +:10A2200010D400F03F011E290AD0218811F4FE6FDE +:10A230000CD13A88172A09D3A1F57F42FF3A05D0FD +:10A24000010606D500F03F00122802D004202BB0F2 +:10A250006BE6FE4928984FF0000908728DF81090BF +:10A260008DF834900DAA0A60359A4A60ADF81490C2 +:10A27000ADF890902878032200F03F038646711CC9 +:10A2800004F1180CCB464FF0040AA8F10500CDF8F4 +:10A2900098C01F2B7DD2DFE803F07C7C107C1C7CF7 +:10A2A000867CEF7CEE7CED7CEC7CEF7CEB7C7C7C3C +:10A2B000EA7CE97C7C7C7C7CE800B8F1030F02D06E +:10A2C0008DF810A0EFE232701720A6F801003A8056 +:10A2D000BEE2B8F1050FF3D1B5F801002083ADF867 +:10A2E0001400B5F80310618300287DD088427BD824 +:10A2F00084F808B0A4F806B04FF6FF706084269882 +:10A3000000F0E4FF05203070B01C00904FF0020A0E +:10A3100008AA2899269800F0DCFF00287ED19DF835 +:10A320002600012803D002207070102002E00120D6 +:10A33000707002208346002201A909A805F071F877 +:10A3400030BB9DF80400834522D13A88801CA2EBE3 +:10A350000A0181421CDB0098BDF822100AF1020AB2 +:10A360000180009909A8891C0A46009101A905F0FD +:10A3700058F89DF80400009908AA014450441FFAB7 +:10A3800080FA00912899269800F0A3FF0028D2D0E7 +:10A3900000E069E2BAF1020F40D0A7F800A057E24E +:10A3A0008DF8100054E2B8F1070F89D3B5F8010019 +:10A3B0002083ADF81400B5F803106183A0B1884282 +:10A3C00012D84FF0010A84F808A0B5F80500E08023 +:10A3D00000202073E06900F011FD90B9E16981F877 +:10A3E00006A04FF4205100E078E0E26942F6010057 +:10A3F0009180E16981F80AA0E1690881E1690020A2 +:10A400008873A8F107006084E81D6062269800F058 +:10A410005DFF0720307006F1010A00E06FE00020C8 +:10A420004FF0010BADF8220018E000BFBBF1010FA7 +:10A430000CD0E069807901281FD03AF8021C00BFD7 +:10A440000BF102002AF8021B1FFA80FBBDF8221054 +:10A450000BF102002AF8021B1FFA80FB08AA2899B8 +:10A46000269800F036FF58B10FE0DAE16BE10AE11F +:10A47000AEE0D2E17BE05AE01EE0BDF82010DFE75D +:10A480003988A1EB0B000428D0DABBF1010F36D0DC +:10A49000E069807901280CD0BDF82010A1F57F403B +:10A4A000FF3806D03AF8021CAAF800100BF102009F +:10A4B000B1E1BDF82010F7E7B8F1070F03D0B8F10C +:10A4C000150F7FF4FDAEB5F801102183ADF814101F +:10A4D000B5F80320628309B1914201D901205FE7F9 +:10A4E00001212172A4F806B084F80CB0B8F1050F70 +:10A4F00007D0C0B2691DE26904F074FF08B10A20F8 +:10A500004EE74FF6FF70608404A824A9CDE900103F +:10A51000CDE902762878002300F03F0220462899F2 +:10A52000FFF730FC8146208BADF8140090E1B8F1C4 +:10A53000030FC6D14020ADF89000B5F8010020838C +:10A54000ADF81400289ACDE900210AAB02933988AE +:10A550000022491E8BB294F8201000F024FF8DF8E1 +:10A56000100058BB0B203070BDF828002EE0B8F169 +:10A57000050FA6D18020ADF89000B5F8010020832A +:10A58000B5F803206284ADF81400B2F5007F01D95C +:10A59000072005E742F47C426284289BCDE9003124 +:10A5A0000DF12C0CCDF808C03988491E8BB294F8F7 +:10A5B000201000F0F8FE8DF8100018B18328B5D1F6 +:10A5C0000220BEE00D203070BDF82C00401C22E1BE +:10A5D0004FEADE1000EB400002EB8000404505D959 +:10A5E0005FEA4E607FF56CAE584614E1B5F801C0E5 +:10A5F000ADF814C02978490608D505218DF8341026 +:10A600002978090605D58DF834B031E106218DF899 +:10A610003410E91C289BA8EB000ACDE90013CDF803 +:10A6200008B009911FFA8AF394F8201000226046BE +:10A6300000F0C8FC8DF810008DF834B02978490678 +:10A6400010D52088C00509D5208B01E02008002006 +:10A65000BDF81410884201D1C4F824B058468DF8D2 +:10A6600010B0D8E0832801D14FF002094FF4807078 +:10A67000ADF89000BDF814002083A4F822A009983A +:10A6800060621320C5E0B8F1050FFFF419AEB5F80C +:10A6900001C0ADF814C0218F41B3A1F57F42FE3A4D +:10A6A00024D007218DF83410289A6B1DCDE9003293 +:10A6B00080B2CDF808B040F40043DA46B5F8032084 +:10A6C00094F82010604600F07DFC4FF400718DF886 +:10A6D00010008DF834A0ADF89010832810D0E8B1A8 +:10A6E000218FA1F57F40FE3807D0DCE00A218DF8EC +:10A6F00034104FF6FE712187D6E7A4F838A0A7E002 +:10A700002A4641462046FFF714FC8DF8100008B198 +:10A71000832848D1BDF81400208351E72A464146DA +:10A720002046FFF706FC8DF81000E0BB618F606BE0 +:10A73000CDE9007643185A88998833F8060BFFF75D +:10A7400006FD814684E095F801A0B8F1020F7CD1A6 +:10A750005FEA0A0002D0BAF1010F76D108208DF825 +:10A76000340005A800908DF838A094F820105346C6 +:10A7700000222046FFF7B3FC8DF839008DF83AB07F +:10A7800050B9BAF1010F12D0BAF1000F04D1218FE4 +:10A79000A1F57F40FF380AD0208F40B18DF834B04A +:10A7A0004FF4806000E053E0ADF890000DE00DA89C +:10A7B0003599FBF78EFA81464FF480608DF834B0FE +:10A7C000ADF89000B9F1020F06D0FD48006880791D +:10A7D00028B18DF8100043E0A4F818A038E0B9F1D2 +:10A7E000000F03D081208DF8100043E005A80090F1 +:10A7F00094F82010534601222046FFF770FC8DF894 +:10A80000100020463699FFF74EFC9DF81000F8B96D +:10A8100019203070012038801AE006208DF81000D1 +:10A8200041E02078000723D5B8F1010F20D109209D +:10A830008DF83400A088ADF838000420369907F070 +:10A8400078F80820ADF8900000E011E0A7F800B01B +:10A850009DF8340020B10DA83599FBF73AFA8146EE +:10A86000B9F1000F1CD005E05FEA4E607FF528AD1E +:10A870004FF004092088BDF8901008432080BDF8EF +:10A88000900080050AD5218FA1F57F40FE3805D1C3 +:10A890002998E062A4F830804FF003094846D6E4D6 +:10A8A0009DF8100058B10120307028787070BDF804 +:10A8B000140070809DF810003071052038802088C9 +:10A8C000BDF8901088432080E8E72DE9FF4F01781C +:10A8D000A5B080464FF0010B0BFA01F04FF60901CD +:10A8E000349C0840ADF86C0021884FF00009A1F5B8 +:10A8F0007F42FF3A02D028B1080703D5012029B0D2 +:10A90000BDE8F08F289F4FF0000A04A887F800A048 +:10A910002799269A55460988ADF87C10A8498DF8E4 +:10A9200068A00A728DF810A008603298486098F804 +:10A930000000012830D0022809D0032876D13878C9 +:10A9400020F03F001D303870B8F80400A08098F85F +:10A950000000022804D1387820F03F001B30387006 +:10A9600021AAF91C07208DE80700BDF87C0094F8A7 +:10A970002010C01E83B2B8F80400002200F013FDBE +:10A980000028DBD1B8F80400A7F80100BDF8840066 +:10A99000C01CADF87C005FE198F805108DF86810D8 +:10A9A00098F804004FF40079012802D00228C5D19C +:10A9B00033E1208808F1080600F4FE60ADF86C0071 +:10A9C00010F0F00F1BD010F0C00F05D03088228B94 +:10A9D000904201D005257DE189B9B078C0070ED03D +:10A9E000B2680720CDE90020CDF808A0F388B2882E +:10A9F00094F82010308800F0E5FA00286FD12899EB +:10AA0000BDF86C00491C802845D006DC10280ED00B +:10AA100020280CD0402891D122E0B0F5807F5FD073 +:10AA200048457DD0B0F5806F88D1CBE029E1C006E4 +:10AA300001D5082000E0102081460420ADF814A0C4 +:10AA40001BAA8DF8100000921FA81AA90397CDE940 +:10AA5000011033884A4607212046FFF793F992E018 +:10AA60009DF868004FF00A09002894D121AA072018 +:10AA70008DE80700BDF87C0094F82010401E83B2DA +:10AA8000208B002200F08FFC8DF868000B203870BE +:10AA9000BDF8840019E09DF868004FF00C0900280B +:10AAA0001CD123AA07208DE80700BDF87C00628C2A +:10AAB000401E83B294F82010208B00F074FC8DF8B7 +:10AAC00068000D203870BDF88C00401CADF87C008B +:10AAD00004208DF81000208BADF81400BCE057E086 +:10AAE0003188208B814253D19DF868104FF01209B4 +:10AAF000002918D1616A81B1B178C90748D0B3681B +:10AB00000722CDE90032CDF808A0F388B28894F886 +:10AB1000201000F057FA8DF868001320387000E01C +:10AB200002E0ADF87CB097E0B6F800C0208B844519 +:10AB30002ED19DF868004FF016090028606B08D0F0 +:10AB4000E0B34FF6FF7000215646ADF808A0019023 +:10AB500027E060B1B178C9071AD1618F43181FA8E7 +:10AB6000CDE900075A88998833F8060B09E0B078D8 +:10AB7000C0070DD01FA8CDE90007B288F188604654 +:10AB8000B368FFF7E4FA050066D0062D7AD03FE0FF +:10AB900005253DE0019021AA02A92046FFF700FA11 +:10ABA0000146628FBDF80800824201D00029F1D031 +:10ABB000608F616B08440680019860874CE000005C +:10ABC000200800209DF868004FF0180940B1208B44 +:10ABD000C8B13088208320463399FFF764FA3BE000 +:10ABE00004F118000090237E94F8201001222046E2 +:10ABF000FFF775FA8DF868000028ECD1192038703D +:10AC0000ADF87CB0E7E7052520463399FFF74BFA0E +:10AC10009DF81000032857D05CE0208800F40070F5 +:10AC2000ADF86C0048452CD1208FA0F57F41FE394E +:10AC30007FF4D0AED8F808004FF0160948B1606331 +:10AC4000B8F80C1021874FF6FF716187A0F800A0BB +:10AC500002E04FF6FF702087BDF86C0030F4FE6113 +:10AC600016D0782300220420339906F0C5FD98F809 +:10AC70000000A0702088BDF86C10084320800AE016 +:10AC800000E006252088BDF86C108843208021E074 +:10AC90002188814321809DF8100028B15F484168D8 +:10ACA00004A8FBF716F805469DF8680090B187F8F0 +:10ACB000019087F800B0208B78809DF8680038718B +:10ACC0000520ADF87C0005E05448416804A8FBF776 +:10ACD00000F80546208810F4FE6F22D1208E00B3C4 +:10ACE0002799289B01AD0988ADF87C10DDE9321267 +:10ACF000009385E816001FABE26A2699FFF784FAF5 +:10AD0000054603280DD08DF810B0E06A0590339801 +:10AD10000690002104A8FAF7DCFF00B10546A4F86C +:10AD200030A02798BDF87C1001802846E7E500B5E3 +:10AD300097B0042807D102208DF80000019100216E +:10AD40006846FAF7C6FF17B000BD70B5334C0378FC +:10AD500000222168012B02D0022B44D129E00B787C +:10AD60000BB1042B03D10A712268032111702168F1 +:10AD7000062582880B7905EBC303CA522168082394 +:10AD80000A250A7903EBC2021144C2880A802168AD +:10AD900002890B7905EBC303CA52418920680C2351 +:10ADA000027903EBC202815220680179491C0171CA +:10ADB0001DE00A7482888A802168C288CA8022685D +:10ADC00001891181226841895181C1682068C1606F +:10ADD0006168FAF77EFF0146022806D02068007CF1 +:10ADE000002801D119B1812070BD832070BD0020E1 +:10ADF00070BD406B002800D0012070478178012988 +:10AE000009D10088B0F5205F03D042F601018842E5 +:10AE100001D1002070470620704700002008002064 +:10AE200010B58B7883B102789A4205D10B885BB15B +:10AE300002E08B79091D4BB18B789A42F9D1B0F8B9 +:10AE400001300C88A342F4D1002010BD812010BD38 +:10AE500007282BD012B1012A2CD103E0497801F048 +:10AE6000070102E04978C1F3C201052922D2DFE8D7 +:10AE700001F0031D081017000AB1032070470220DB +:10AE80007047042812D0052810D006280ED058B1DB +:10AE90000EE005280AD0062808D0022808D003E0D2 +:10AEA000062803D0032803D00520704700207047F0 +:10AEB0000F2070478120704710B513880B800B78E6 +:10AEC0001C061FD5FE4CA47A844204D843F010001F +:10AED0000870002010BD94682478C44064F3041303 +:10AEE0000B701378D17803F0030341EA032140F299 +:10AEF0000123B1FBF3F403FB1411926800FB012062 +:10AF0000401C10BD906810BD37B5BDF8041011800D +:10AF10009DF8045029061BD5E94901239468897AD4 +:10AF2000814209D8FE280FD1E80602D58B405B1E6E +:10AF300000E00023237007E0217883409943C5F3A4 +:10AF40000013834019432170107820F01000107016 +:10AF50003EBD2DE9F0410746C81C0E4620F0030017 +:10AF6000B04202D08620BDE8F081082A01D90E2027 +:10AF7000F9E7D34D002034462E60AF802881AA72B5 +:10AF8000E8801AE0E988491CE980810614D4E17858 +:10AF900000F0030041EA002040F20121B0FBF1F291 +:10AFA00001FB1201206800F0E3FA2989084480B20D +:10AFB0002881381A3044A0600C3420784107E1D44D +:10AFC0000020D0E72DE9FF4F85B01546DDE912B628 +:10AFD0008046994623F4404700F0BAFA04000BD0AB +:10AFE000207800060AD5B648817A0698814205D8AD +:10AFF000872009B0BDE8F08F0120FAE722466946B4 +:10B000000698FFF759FF824600208DF80400072EAE +:10B0100018D0012221463046FFF71AFF0028E8D158 +:10B02000207840060ED502208DF80400ADF8088087 +:10B03000BDF80000ADF80C50ADF80A00ADF80E7088 +:10B04000CDF810B05FEA094004D500273D46B84668 +:10B0500001260CE02178E07801F0030140EA0120AC +:10B0600040F20121B0FBF1F2804601FB12865FEA5B +:10B07000494009D5B04507D1A178207901F00301F5 +:10B0800040EA0120A84201D3B54201D90720B0E728 +:10B0900078191FFA80F9B14501D90D20A9E79DF86B +:10B0A000040020B101A8FAF712FE0028A1D1B04592 +:10B0B00007D1A0784FEA192161F30100A07084F84C +:10B0C0000490149800B10780BBF1000F15D00AEB73 +:10B0D00005003A4659460FF0ADFE224669460698ED +:10B0E000FFF7EAFE9DF80000224620F010008DF8E0 +:10B0F000000000990698FFF707FF002079E72DE987 +:10B10000FF4FDFF8BC9182461746B9F80610D9F810 +:10B11000000001EB410100EB810440F20120B2FB91 +:10B12000F0F183B000FB11764D46DDF844803146E6 +:10B13000049800F01DFA29682A898B46611A0C319F +:10B1400001441144AB8889B28B4202D8842007B0F5 +:10B1500050E70499CDB2290603D5A90601D585206B +:10B16000F5E7B9F806C00CF1010C1FFA8CFCA9F840 +:10B1700006C0129909B1A1F800C0A90602D5C4F809 +:10B18000088007E0104480B2A9F80800191A01EB02 +:10B190000B00A0602246FE200499FFF7B5FEE77081 +:10B1A00026712078390A61F30100320AA17840F053 +:10B1B000040062F30101A17020709AF8020060712E +:10B1C000BAF80000E08000262673280602D599F818 +:10B1D0000A7000E00127A80601D54FF000084D468F +:10B1E00000244FF007090DE0CDF80080CDE901966D +:10B1F000E8882146109B069AFFF7E4FE0028A6D1B6 +:10B20000641CE4B2BC42EFD30020A0E72DE9F04774 +:10B21000804600F09DF9070005D000264446284DE1 +:10B2200040F2012916E00120BDE8F087204600F039 +:10B230008FF90278C17802F0030241EA0222B2FBE0 +:10B24000F9F309FB1321006800F092F93044641C03 +:10B2500086B2A4B2E988601E8142E7DCA8F1010051 +:10B26000E8802889801B288100203870DCE720B125 +:10B27000401E10809170002070470120704710B56B +:10B280000F4904460088CA88904201D3822010BD2D +:10B29000096800EB400001EB80025079A072D08871 +:10B2A00020819178107901F0030140EA0120A0810A +:10B2B000A078E11CFFF700FE20612088401C01E01F +:10B2C0002C0800202080E080002010BD0121018298 +:10B2D00070472DE9FC474FF6FF780546A2F800803D +:10B2E000406817468A4680788DF8020068680088B2 +:10B2F000ADF8000000208DF80600288A2C88A042B6 +:10B3000000D304462C822DE0288A401C2882701D20 +:10B310006968FFF785FD18BB3988414501D1601E7A +:10B3200038806888A04222D3B178307901F00301D7 +:10B3300040EA01296946701DFFF772FD80B96989ED +:10B34000414519D0002231465046FFF781FD38B9FA +:10B350006A894A4504D1E968B0680FF03FFD58B1E9 +:10B36000641CA4B2204600F0F3F80600CCD1641EA1 +:10B370002C828220BDE8FC877C807079B871F088CF +:10B38000B8803178F07801F0030140EA012078813B +:10B39000A7F80C90287A324607F10801FFF78CFDD8 +:10B3A00038610020E6E72DE9F04F85B01D46904654 +:10B3B0000F468346DDF838A0DDF8409000F0C8F86D +:10B3C000040009D02078000608D57148807AB84278 +:10B3D00004D8872005B00DE60120FBE7C8F3090675 +:10B3E000224669463846FFF767FD07465046BAF1E0 +:10B3F000070F1AD000222146FFF72AFD0028E9D1C5 +:10B400002078400611D501208DF80400ADF808B071 +:10B41000BDF80000ADF80A00ADF80C60ADF80E50B4 +:10B4200001A8FAF754FC0028D4D12178E07801F083 +:10B43000030140EA0121A278207902F0030240EAE8 +:10B440000220464507D0B1F5007F04D9691E81422C +:10B4500001DD0B20BEE7864201D90720BAE7801B39 +:10B4600082B2AA4200D92A46B9F1000F01D0A9F848 +:10B4700000200F9810B1B9190FF0DCFC0020A9E7EB +:10B480002DE9F0411D4617460E4600F061F8040014 +:10B4900008D02078000607D53D48807AB04203D80E +:10B4A000872060E501205EE5224639463046FFF7F9 +:10B4B00003FD65B12178E07801F0030140EA012045 +:10B4C000B0F5007F01D8012000E0002028700020A6 +:10B4D00049E52DE9F0411D4617460E4600F038F8C3 +:10B4E000040008D02078000607D52948807AB042A9 +:10B4F00003D8872037E5012035E522463946304616 +:10B50000FFF702FDFF2D14D02178E07801F003024F +:10B5100040EA022040F20122B0FBF2F302FB1300EA +:10B5200015B900F2012080B2E070000A60F3010159 +:10B530002170002017E510B50C4600F009F828B17D +:10B54000C18821804079A070002010BD012010BD6D +:10B550000F49CA88824209D340B1096800EB400014 +:10B560006FF00B0202EB8000084470470020704728 +:10B57000C0B2820609D4000605D50548807A484342 +:10B58000401C80B27047084670470020704700009A +:10B590002C08002010B506F08BFB05F026FEFBF70B +:10B5A00011FF0EF04FFB06F083FABDE8104006F0E5 +:10B5B0000FBB10B50C4601F0C1FC80B3204600F073 +:10B5C000ACFA68B322780E2A09D00F2A07D0022AD3 +:10B5D00005D0032A03D0102A2ED0FFDF1DE0A0786B +:10B5E0001E282BD00FDC0C2824D008DC092825D2FB +:10B5F000DFE800F013241724241E1E1A1C00122852 +:10B600001CD1072010BD302818DDA0F13A00032816 +:10B6100014D2DFE800F011130B00002010BD11E080 +:10B620000EE043F20200F9E70420F7E70D20F5E70A +:10B630000F20F3E70820F1E71120EFE70320EDE703 +:10B64000FFDFEAE7FFDFE8E700F067BA70B503461F +:10B65000002002466FF02F050EE09C5CA4F130063E +:10B660000A2E02D34FF0FF3070BD00EB800005EBD7 +:10B670004000521C2044D2B28A42EED370BD30B595 +:10B680000A240AE0B0FBF4F304FB13008D183030F9 +:10B6900005F8010C521E1846D2B2002AF2D130BD74 +:10B6A00030B500234FF6FF7510E0040A44EA00208D +:10B6B00084B2C85C6040C0F30314604005EA003403 +:10B6C0004440E0B25B1C84EA40109BB29342ECD34E +:10B6D00030BD000010B509F0DBFB042803D009F0F1 +:10B6E000D7FB052802D108F0D4F950B909F05CFC69 +:10B6F000032803D009F05EFC032804D107F0AEFA5A +:10B7000008B1012010BD002010BD70B50C460546E3 +:10B71000062102F092F9606008B1002006E00721DE +:10B72000284602F08AF9606018B1012020700020DC +:10B7300070BD022070BD2DE9FC470C4606466946E7 +:10B74000FFF7E3FF00287DD19DF8000058B107F016 +:10B75000E7F9B0427ED00022214630460BF0F9FCDA +:10B76000002874D116E007F042FFB04272D00022E8 +:10B77000214630460BF0E0F8002868D1019D95F88D +:10B780009800303518B9687E08B1012000E000202B +:10B79000804603E0019D95F8498030354FF0010A5D +:10B7A00095F82D004FF00009A0B195F82E00800704 +:10B7B00010D584F8019084F800A084F80290A68047 +:10B7C00095F82F10A171298E2181698E618185F8EC +:10B7D0002D903CE0304602F0A8FA070000D1FFDFD0 +:10B7E000384601F049FD10F0FF0008D084F80190C0 +:10B7F0000D212170A680E08084F802A027E0304669 +:10B8000002F081FA070000D1FFDFB8F1000F21D06C +:10B81000384601F0BCFDA8B19DF8000038B9019888 +:10B82000D0F8BC004188B14201D180F80090304688 +:10B8300007F0DBF884F801900A21217084F8029067 +:10B84000A68000E006E0A97EA17185F8199001208C +:10B85000BDE8FC870020FBE71CB56946FFF755FFF4 +:10B8600000B1FFDF684601F0B1FBFD4900208968A7 +:10B87000A1F89A001CBD2DE9FC4104460E460620A5 +:10B8800002F086F80546072002F082F82844C7B285 +:10B890000025A8463E4417E02088401C80B2208046 +:10B8A000B04202D34046A4F8008080B2B84204D32C +:10B8B000B04202D20020BDE8FC816946FFF725FFB7 +:10B8C0000028F8D06D1CEDB2AE42E5D84FF6FF70FF +:10B8D00020801220EFE738B54FF6FF70ADF800007A +:10B8E0000DE00621BDF8000002F0B9F8044607217A +:10B8F000BDF8000002F0B3F80CB100B1FFDF002189 +:10B900006846FFF7B8FF0028EBD038BD2DE9F041BD +:10B91000D4A0D64C06790025076884F8425001F07F +:10B920004EFB84F8435004202087102060874FF698 +:10B93000FF70A4F80A0184F80C51A4F80E0184F8F1 +:10B94000315004F8EE5BC94804F8C05C04F8BA5CF6 +:10B950008030A57340F87D7FC4490671FD31481ED3 +:10B960000BF095F80A20207503206075A075E0752E +:10B970000E20207606206076A076E076BDE8F08185 +:10B980002DE9F041B64C0D466060217007F015F8C6 +:10B99000FFF7A1FFFFF7BAFF207809F01CF8B349C1 +:10B9A000C431A1F181000F46064607F041FF6068EF +:10B9B0000BF038F820780CF0C9FB284609F0C1FEDE +:10B9C0003946304607F0E8F860680BF04DFC01F0AE +:10B9D000F6FAA649002081F84300CFE710B501240C +:10B9E0000AB1002010BD21B1012903D00024204656 +:10B9F00010BD02210DF096FBF9E72DE9F047040098 +:10BA000000D1FFDF994D002695F8310058B16670DE +:10BA10001020207095F83200A07095F83300E07087 +:10BA200085F831606AE0287840B12C22A91C2046B4 +:10BA30000FF000FA0E2020702E705FE095F82E00B7 +:10BA400060B10120E07095F82F00A07095F83000EB +:10BA500060700F20207085F82E604FE0844802212E +:10BA60008246FFF708FF00B1FFDFB5F80E91062010 +:10BA700001F08EFF0746072001F08AFF3844C7B265 +:10BA8000781C00F0FF0800BFB5F80E01B84213D1D2 +:10BA90000021204607F05EFD58BB95F8340080B3C6 +:10BAA0006670132020701C21A01C0FF03AFA0220AF +:10BAB000A07085F8346021E040451BD1002120466C +:10BAC00007F000F8E8B12078132817D1A0783C28B7 +:10BAD00014D1A088072101F0B0FF050000D1FFDFDD +:10BAE000288806F082FFA088072101F0B8FF00B186 +:10BAF000FFDF03E02146FFF71EFE10B10120BDE885 +:10BB0000F087FFE702215046FFF7B5FE18B9B5F8F8 +:10BB10000E114945B8D10020F1E76EE710B508F0E5 +:10BB2000C8FE00B1FFDF0AF07BFF00B1FFDF07F0C6 +:10BB300035FE09F0EFFD00B1FFDF0BF093FB00B124 +:10BB4000FFDF06F0F7FF00B1FFDF0CF0F9FA00B1FC +:10BB5000FFDFFFF7C0FEFFF7D9FE06F017FF02F088 +:10BB6000C1F801F02CFA4148002180F8431001711E +:10BB7000012141710222C270017010BD10B53B4C11 +:10BB8000207828B10A21BDE810400E2001F0E4B968 +:10BB9000FFF7A0FD08B10C2002E001F010FA002030 +:10BBA0002071012060710A21E170207010BD70B514 +:10BBB0002E4C0546207828B1BDE8704039210E2072 +:10BBC00001F0CAB9FFF786FD08B10C2012E094F825 +:10BBD000430008280DD204EB0010102229464430FF +:10BBE00001F0C7F994F84300401C84F8430000209A +:10BBF00000E007202071012060713921E170207080 +:10BC000070BD70B5194C0546207828B1BDE870406C +:10BC10000B210E2001F0A0B9287818B1012801D01D +:10BC2000122016E094F8C400082823D2FFF752FD32 +:10BC300008B10C200DE00E482B7894F8C4106A1C53 +:10BC4000463806F01AF994F8C400401C84F8C40081 +:10BC500000202071012060710B21E170207070BD07 +:10BC600044000020FFFFFFFF1F00000038080020F5 +:10BC7000460900200720ECE710B5FE4C207828B1DB +:10BC80003821BDE810400E2001F066B9FFF722FD13 +:10BC900008B10C2002E0002084F84300207101204C +:10BCA00060713821E170207010BDF248017819B13F +:10BCB0000F210E2001F050B9002101710E21817079 +:10BCC0000F21C170FF2181714FF6FF710181EA4997 +:10BCD00049680A7882728A8882814988C1810121F3 +:10BCE000417101707047E3490A781AB13B210E2077 +:10BCF00001F032B90088A1F80A01012081F80C0195 +:10BD000000220A7148713B22CA700870704710B552 +:10BD1000D84C207828B12B21BDE810400E2001F02E +:10BD20001BB90821A01D05F0F9FA0020207101209F +:10BD300060712B21E170207010BD70B5CD4C217861 +:10BD400029B1BDE8704031210E2001F005B990F90C +:10BD50000000042814D098B1011D11D010F1080F73 +:10BD60000ED010F10C0F0BD010F1100F08D010F105 +:10BD7000140F05D010F1280F02D01220207103E01B +:10BD8000002506F0BBF825713120E07001206071BC +:10BD9000207064E730B5B74D04468DB0287828B1DF +:10BDA0002A210E2001F0D8F80DB030BD1022214616 +:10BDB000684601F0DEF8102204F1100104A801F039 +:10BDC000D8F868460DF0D6FF10222C46A81D08A909 +:10BDD00001F0CFF8002020710E20A0702A20E07022 +:10BDE000012060712070DFE72DE9FF41A14C207830 +:10BDF00028B13A210E2001F0AFF8BDE8FF814FF0E5 +:10BE0000000884F80680B4F80A01ADF8040002A91D +:10BE1000FFF77BFC20B1002101A8FFF72CFDE8BB58 +:10BE2000BDF80400ADF8000002A980B2FFF76DFC78 +:10BE300000B1FFDFBDF8000001F077FF050000D181 +:10BE4000FFDF2846039F01F0A9FA80F0010697F86A +:10BE50004950BDF8000001F056FF070000D1FFDF98 +:10BE6000384601F094FA80F0010255EA020019D038 +:10BE7000A179BDF8000004EB410108817D49A37957 +:10BE80001831585C65F300005854A37962F34100FF +:10BE90005854A27966F38200505400E00DE0A07976 +:10BEA000401CA07100216846FFF7E5FC28B9BDF8E9 +:10BEB0000000BDF804108842B6D1012084F8048047 +:10BEC00060713A21E170207097E770B5694C0546C2 +:10BED000207828B1BDE8704034210E2001F03CB834 +:10BEE00008F0D6FF052804D0284608F061FD0020A0 +:10BEF00000E00C202071012060713421E17020707D +:10BF0000ADE65C48017819B10E21084601F024B86D +:10BF10005949CA68C0F80620098A41810021017187 +:10BF2000012141710E22C2700170704770B5514CF1 +:10BF30000646251D207828B1BDE8704032210E202C +:10BF400001F00AB83146002006F00EFF287058B9FB +:10BF500000213246084607F053FD287020B94648B4 +:10BF60003168C160B1880182012060713221E170C5 +:10BF7000207074E670B53F4C0546207828B1BDE8C6 +:10BF8000704030210E2000F0E7BF08F0C4FD10B96A +:10BF900009F064FE68B1287809F034FC287807F0CD +:10BFA000A7FD00202071012060713021E170207018 +:10BFB00055E60C20F6E72DE9F0412E4C0646251DEE +:10BFC000207828B1BDE8F04117210E2000F0C4BF51 +:10BFD0003146012006F0C8FE2870012768B93246B4 +:10BFE0000121002007F00CFD287030B93068E063B3 +:10BFF000B088A4F8400084F8427067711720E070A0 +:10C000002770BBE438B51B4D0446287828B1BDE83D +:10C01000384030210E2000F09FBF227961798A429A +:10C0200015D0A079E379984211D01F2A0FD81F2983 +:10C030000DD8002211460EF03DF940B90022E079FA +:10C0400011460EF037F910B9207A072801D91220CD +:10C050001BE04FF6FF70ADF8000008F0A5FFD8B95F +:10C0600008F0A8FFC0B908F013FFA8B9002168467E +:10C0700004E000003808002044000020FFF7FBFB2C +:10C0800050B1204605F032FE002028710120687171 +:10C090003E21E970287038BD0C20F6E72DE9FC47F9 +:10C0A000FE4C054694F82E0028B128210F2000F000 +:10C0B00053FFBDE8FC87282084F83000012184F874 +:10C0C0002E10A8784FF000091A2825D00EDC16286B +:10C0D00031D2DFE800F030303030302130303030D5 +:10C0E0003030303030303030302121212A2822D0F9 +:10C0F0000BDCA0F11E000C281DD2DFE800F01C1C98 +:10C100001C1C1C1C1C1C1C1C1C0D3A38042812D2A4 +:10C11000DFE800F0110211022888B0F5706F0AD232 +:10C120001F20884684F82F0028886946FFF7EDFA1B +:10C1300018B1022019E0122017E09DF80000019FBD +:10C14000002806D007F1CE07019E05D106F1B506FD +:10C1500004E007F1B407F7E706F1CF06684600F000 +:10C1600023FF08B1387818B10C2084F82F00A0E71D +:10C1700087F80080A878307084F82F90684600F027 +:10C1800025FF96E77CB5C54C0546207820B12521D2 +:10C190000E2000F0E1FE7CBD28886946FFF7B5FA65 +:10C1A000002168B102202071BC4881600173E180E8 +:10C1B0000E20A0702520E0700120607120707CBDF1 +:10C1C000019A104612F1300282F836108368A3609B +:10C1D000037B237392F83630002BF5D12888E0805A +:10C1E000E6E72DE9FC41AD4C064694F82E0028B157 +:10C1F00010210F2000F0B0FEBDE8FC811F2084F864 +:10C200002F00102084F83000012784F82E70308829 +:10C210006946FFF77AFA70B9684600F0C5FE50B17A +:10C22000019D9DF8000030350028019805D0E230CE +:10C23000017841B904E0022006E0D0F8BC00F7E73D +:10C2400095F82D1019B13A2084F82F00D4E795F80D +:10C250002E1089070CD1042101709DF8000020B92F +:10C2600001993088D1F8BC104880684600F0AEFED5 +:10C27000002084F82F0085F82D70BDE72DE9F047E8 +:10C28000864D0646287828B1BDE8F0471D210E20CE +:10C2900000F062BE4FF01F0985F80490012068711C +:10C2A0001D21E970287008F0F3FD0C2704284ED0FA +:10C2B00005284CD0B0791224012800D0E8B9307894 +:10C2C00008B1012819D1F07908B1012815D1708879 +:10C2D00043F6FD71021F30248A420ED2B288121F2B +:10C2E0008A420AD22887B0886887B0794FF0000860 +:10C2F0004446012803D050B111E02C710CE495F8AC +:10C30000420020B3654A3C320121084602E0644AFB +:10C310000021012007F074FB040000D0FFDFF0795A +:10C32000012800D010B907F093FB044614B185F83A +:10C330000490E3E73078012801D018B109E000212A +:10C34000022001E00021012007F097FB08B12F71C6 +:10C35000D4E785F80480D1E770B5504C217829B135 +:10C36000BDE870401E210E2000F0F6BD1F21217196 +:10C37000012161711E22E270217002781221012ACE +:10C3800000D01AB9407818B1012801D0217166E4B3 +:10C3900000260C25012A08D008F07AFD052802D0D5 +:10C3A00008F034FA30B1257159E4618F208F08F01C +:10C3B000BFFBF7E7267152E42DE9FE4F0546AFF2C9 +:10C3C0005C71D1E90001354E01908A4696F82E0045 +:10C3D00030B103B02121BDE8F04F0F2000F0BCBD0B +:10C3E0001F2086F82F00212086F830004FF001082A +:10C3F00086F82E80298843F6FD730A1F30209A4262 +:10C400007ED26A88141F9C42FAD28A4278D8EA897E +:10C4100040F67B43911F9942F2D2298A8C1F9C429D +:10C42000EED28A42F2D86A8AB2F5FA7FE8D2AA8AB4 +:10C4300040F67744A2F10A03A342E1D2B2EBD10F56 +:10C440005ED9E98A2A8B9142E0D82979122011B16C +:10C45000012955D102E069790029F9D1297B09B177 +:10C460000129F6D108F014FD4FF00C0905286ED013 +:10C4700008F00EFD0428FAD096F83400002866D1A2 +:10C4800007F0B5F8A0F57F41FF39F8D1062102A8E1 +:10C4900001F0A4FA040050D0032103E03808002082 +:10C4A000500000200CF02CFB96F8030100901B229A +:10C4B00096F802312088114601F070FB04283ED026 +:10C4C00000B1FFDF208806F08FFA04F10D07B4F801 +:10C4D00000B00421384604F021FF594638460CF0DC +:10C4E00004FCFDA03F1D006800900321684604F095 +:10C4F000A0FE002069460A5C3A54401CC0B200E02D +:10C500006FE00328F7D3288A6080688AA080A88A11 +:10C51000E08096F8051196F8040108F0C8FA014683 +:10C52000204608F0F0FA002784F8367084F8377057 +:10C53000687968B101280FD10CE0092051E020880A +:10C54000062101F08CFA00B1FFDF072049E071E01D +:10C55000677601E084F81980D5F80600C4F81A005F +:10C560006889E0830198A06084F80CA084F8C480F6 +:10C570008DF800700121684604F05BFE9DF8000014 +:10C5800000F00701C0F3C1021144C0F34010084499 +:10C590008DF80000401D2076092801D20830207651 +:10C5A000002120460CF0ACFA287B18B1012805D0F8 +:10C5B000FFDF24E00021C94A012005E096F842008F +:10C5C00098B10121C64A084607F01AFAB8B1208886 +:10C5D00006F00BFA2088062101F041FA00B1FFDFD6 +:10C5E0001F2086F82F00BDE8FE8F208806F0FDF999 +:10C5F0002088062101F033FAE0B1FFDF1AE0287944 +:10C60000012800D010B907F023FA50B921460320C1 +:10C6100007F033FA28B96A882988204608F005FA15 +:10C6200058B1208806F0E1F92088062101F017FAB8 +:10C6300000B1FFDF86F82F90D5E784F8B87086F850 +:10C640002F70D0E738B5A64C3C3C207820B1222191 +:10C650000E2000F081FC38BD1F202071012565717E +:10C660002220E070257008F013FC052802D00C2071 +:10C67000207138BD00202071684608F090FA00282B +:10C68000F7D10098008806F0B0F9009806210088DC +:10C6900001F0E5F900B1FFDF904884F834500C3820 +:10C6A0000078FCF78DFF38BD2DE9F0418C4D044634 +:10C6B0003C3D95F82E0028B1BDE8F04123210F2024 +:10C6C00000F04ABC1F2085F82F00232085F8300099 +:10C6D000012085F82E00618840F67B438A1F3020B8 +:10C6E0009A4251D2A288961F9E424DD291424BD877 +:10C6F000E188B1F5FA7F47D2218940F67746A1F16A +:10C700000A03B34240D2B1EBD20F3DD96189A2896D +:10C71000914239D84FF000082088062101F08DF9A8 +:10C7200006004FF0020707D000F030FC20B1D6F829 +:10C73000BC00017839B902E085F82F7061E4D6F8C1 +:10C74000D010097809B13A201EE005218171D6F890 +:10C75000BC004146A0F80880D6F8BC20A0885081D3 +:10C76000D6F8BC20E0889081D6F8BC202089D08102 +:10C77000D6F8BC00028943899A4204D88279082AF3 +:10C7800001D89A4203D3122085F82F0039E4228879 +:10C790004280D6F8BC00077085F82F1031E42DE9EF +:10C7A000FE434F4C06463C3C207830B103B0242178 +:10C7B000BDE8F0430E2000F0CFBB012565712420B9 +:10C7C000E070257030460CF0B2FA08B1002000E0AD +:10C7D0001220207100282DD1414884F8FC504430AB +:10C7E000316840F87D1F317901714FF0000884F8FD +:10C7F000FC806946062001F0ACF800B1FFDF684616 +:10C8000001F085F8A0B9BDF8047000BFBDF80400C0 +:10C81000062101F012F9060000D1FFDF86F8C450AE +:10C82000684601F074F818B9BDF80400B842EDD1BB +:10C8300084F80480BDE8FE8370B5294D06463C3D72 +:10C8400095F82E0028B1BDE8704026210F2000F099 +:10C8500083BB1F2085F82F00262085F8300001209B +:10C8600085F82E003088062101F0E7F8040007D093 +:10C8700000F08CFB20B1D4F8BC00017831B901E0A4 +:10C8800002200CE0D4F8D010097809B13A2006E073 +:10C8900005210170D4F8BC1030884880002085F84C +:10C8A0002F0074E50E483C38017819B106210E209E +:10C8B00000F052BB002101710E2282700622C2706C +:10C8C000C0F80610C0F80A10817941F001018171A9 +:10C8D0000121417101707047112233005000002086 +:10C8E0007408002070B5F84E054696F82E0028B161 +:10C8F000BDE870402C210F2000F02EBB1F2086F8D1 +:10C900002F002C2086F83000012086F82E00288881 +:10C91000062101F092F8040007D000F037FB20B1A7 +:10C92000D4F8BC00017831B901E0022020E0D4F84D +:10C93000D010097809B13A201AE094F86410D1B106 +:10C94000D5F802104160D5F80610816054F8BC0F8C +:10C95000698910228181206805F10C010E300EF0EA +:10C9600069FA21680320087021682888488000201F +:10C9700086F82F000BE50C20FAE770B5D24E04467E +:10C980000C25307828B1BDE8704018210E2000F049 +:10C99000E3BA08F009FB032852D008F00BFB032888 +:10C9A0004ED0607908B1012829D1A07908B10128B9 +:10C9B00025D1A07B28B1012803D0022801D003286B +:10C9C0001DD1607BD8B1C00819D162884FF4804076 +:10C9D000824202D82188814203D9207901280ED1D0 +:10C9E00018E0207930B1012814D0022805D003289E +:10C9F00005D102E0202A0BD30CE0A0290AD220792D +:10CA0000042805D12088202802D36188884201D9D2 +:10CA1000122515E0207986F83600607910B10128DA +:10CA200004D00DE0A94A0021204606E096F8420015 +:10CA300030B1A54A01213C32204606F016F90546E0 +:10CA40000120357170711821F17030709FE410B5BC +:10CA50009D4C217829B11A21BDE810400E2000F02C +:10CA60007BBA01781F2902D91220207106E000212B +:10CA700021710278411C104606F0A8F9012060716E +:10CA80001A21E170207010BD10B58F4C217829B1AA +:10CA90002021BDE810400E2000F05EBA01781F2969 +:10CAA00002D91220207106E0002121710278411C78 +:10CAB000104606F07AF9012060712021E1702070A3 +:10CAC00010BD2DE9FC41804C217829B1BDE8FC4125 +:10CAD0001B210E2000F040BA012767710C21217143 +:10CAE00000780026012803D000286AD012205CE0DC +:10CAF00006F085F800287ED094F83600A0B1012811 +:10CB000012D0042810D008F055FA002873D108F08C +:10CB10004BFA18B108F048FA02286CD1002008F04E +:10CB200074FEE0B3FFDF4AE008F03EFA002862D16D +:10CB300008F040FA00285ED105F0F2FFA0F57F4131 +:10CB4000FF3958D1072101A800F048FF5F49054689 +:10CB50000C398860280000D1FFDF032128460BF044 +:10CB60001DFF284606F0FCF994F8091194F8080115 +:10CB700008F023FA0146284608F04BFA94F807011A +:10CB800000901B2294F806312888114601F006F81F +:10CB900068B1042800D0FFDF2888072100E00EE0FC +:10CBA00000F05DFF00B1FFDF0720207123E028883F +:10CBB00005F01AFF284608F028FE00B1FFDF2671B5 +:10CBC00019E008F0F1F9032803D008F0F3F903287D +:10CBD00011D108F0ECF90546002008F027FD50B906 +:10CBE000267145B1288805F000FF2888072100F04C +:10CBF00036FF00B1FFDF1B20E0702770BDE8FC812D +:10CC00002DE9F041304C0646207828B1BDE8F041CE +:10CC10002D210E2000F0A0B93088072100F00DFF73 +:10CC200005004FF0010720D095F8D10040B995F8E4 +:10CC30003C000F2801D0102802D195F8040150B112 +:10CC40000C2020710E20A0702D20E0703088E08034 +:10CC50006771277072E51022B11C05F1D2000EF049 +:10CC6000E9F885F8D1700020EBE70220E9E770B51C +:10CC7000154C0546207828B1BDE870402E210E20C5 +:10CC800000F06AB92888072100F0D7FE022178B1A8 +:10CC900090F8D1202AB990F83C200F2A04D0102A0D +:10CCA00002D00C20207104E080F8D1100020F9E7B8 +:10CCB00021710E20A0702E20E0702888E0800120D5 +:10CCC00060712070EDE50000380800205000002061 +:10CCD0007CB5C54C0546207820B137210E2000F0E8 +:10CCE0003BF97CBD28886946FEF70FFD38B102206C +:10CCF0002071012060713721E17020707CBD0198A6 +:10CD00007F22014680F8382080F83920002280F800 +:10CD10003A20A87801F8280FE878487028798870B8 +:10CD20002271E6E71CB5B04C217821B113210E2009 +:10CD300000F012F91CBD00886946FEF7E6FC08B158 +:10CD4000022005E0019890F82810012902D00C205B +:10CD5000207106E0382100222271095C21720088CE +:10CD6000E080012060711321E1700E21A17020701C +:10CD70001CBD2DE9F0419C4C0546207828B1BDE84A +:10CD8000F04135210E2000F0E7B8A87808B101285D +:10CD900003D1A888B0F5FA7F01D912202071288824 +:10CDA000072100F04AFE0126A0B1002780F8C870D4 +:10CDB000A988A0F8CA1080F8A460A978012900D039 +:10CDC000002180F8C81090F8A50008B108F01CFEFA +:10CDD000277101E00220207166713520E070267015 +:10CDE000ACE42DE9F041804C0546207828B1BDE83F +:10CDF000F0413C210E2000F0AFB82888072100F058 +:10CE00001CFE012358B382886D88C688418803EBD5 +:10CE10004207BD4217D342F210777E43BF107943D9 +:10CE2000B6FBF1F1491E89B24FF4FA76B14200D94E +:10CE300031468D4200D22946491C521CB1FBF2F109 +:10CE40005143491E8AB290F8F01001B90284E28081 +:10CE50000020207163713C20E07023706EE402209A +:10CE6000F7E770B5604C0546207828B1BDE8704002 +:10CE700033210E2000F070B808F096F808B10C20AD +:10CE800017E0297889B10A290FD014290DD01E295D +:10CE90000BD0282909D0322907D04B2905D0642985 +:10CEA00003D0FF2901D0122003E0284608F04FFDEF +:10CEB00000202071012060713321E1702070F0E4C6 +:10CEC00049490A781AB13F210E2000F045B80022E6 +:10CED0000A710278454B4AB1012A0CD01220087120 +:10CEE000012048713F22CA700870F4E4D0F80100B4 +:10CEF000C3F80200F4E7D0F80100C3F80600EFE73A +:10CF000070B5394C0546207828B1BDE870403D2108 +:10CF10000E2000F021B808F047F810B908F04AF8E0 +:10CF200008B10C2003E0287805F060FF0020207194 +:10CF3000012060713D21E1702070B2E410B50178EC +:10CF4000402907D22A4A52F8211019B1801C88477B +:10CF5000012010BD002010BD234A92F83130002B73 +:10CF600006D182F8320082F83310012082F83100B5 +:10CF7000B1E430B5134606E0CC18D51A14F8014CCC +:10CF80005B1E4455DBB2002BF6D130BD90F8491042 +:10CF900041B990F8981029B190F89800042801D070 +:10CFA000012098E4002096E40178406821B190F8CF +:10CFB000490010B100208EE4E8E701208BE40A4824 +:10CFC0000021C0F8F81080F8C41084E40178012929 +:10CFD00009D1406890F8A510002904D0002180F8FC +:10CFE000A51008F011BD76E43808002038090020AB +:10CFF0004CB301003D3070470844C01D424301F16D +:10D000003D00104480B2704770B51C460546A0181C +:10D01000049BC01D00FB03F204F13D00104486B2E6 +:10D02000B14238BFFFDF1C2128460DF07AFFA6F180 +:10D030001C0080B22C752880B0F5004F88BFFFDF40 +:10D0400070BD008870472DE9F04F0E468188044678 +:10D0500000F11C0AC088154620F4004221F4004368 +:10D06000002721F4004820F400499A4208D100F436 +:10D07000004001F4004188421CBF0020BDE8F08F51 +:10D08000C14517D9207DA9EB0801091AC91F8D4296 +:10D0900027DCC11D0AEB08000144C91E71603581FF +:10D0A000F7603782011D3160058047800120A07440 +:10D0B000BDE8F08F2088217DA0EB0800401AB0F178 +:10D0C000070B0ED4BBF11B0FB8BFFFDF5D45D4BF0C +:10D0D00028461FFA8BF0291A0A04120C18BF4A4579 +:10D0E00003DDA7740020BDE8F08F217DCB1D0AEB86 +:10D0F00008010B44DB1E7360308104F11C03F360F4 +:10D1000032820B1D336008804A800120A074BDE884 +:10D11000F08F2DE9F041044600F11C02808820F4D4 +:10D120000043A07C002808BFBDE8F081D018028829 +:10D13000438813448B423CBF0020BDE8F0810027A8 +:10D1400091429CBF0180478013D9891A0D042D0C90 +:10D1500045800ED0A088261D20F40040854288BF5F +:10D16000FFDF30884FF4004121EA0000284330807F +:10D1700008E0217D0088CB1D184481B22288201D43 +:10D1800000F09AFAA7740120BDE8F08130B4B0F83D +:10D1900002C08488034600F11C052CF4004028449A +:10D1A000A44503D10020D88130BC7047B3F80AC031 +:10D1B0000488A44509D34088ACEB040CA0EB0C0018 +:10D1C00084B20CEB0500C01E06E0A4EB0C041D7D30 +:10D1D000A4B2AC446044001DB1F800C0A44588BFAF +:10D1E0000C80B3F80AC0BCF1000F0CBF4FF0010C6B +:10D1F0004FF0000C82F800C00988D98130BC70471C +:10D200002DE9F041044600F11C01408820F4004063 +:10D210004518E089002808BFBDE8F081618908440D +:10D2200080B2608129886A881144814238BFFFDF5B +:10D2300028886D88628941190027914218D175B1FB +:10D240006088A61C20F40040A84238BFFFDF308869 +:10D250004FF4004121EA00002843308007E0217D9F +:10D260002288CB1D184481B2A01C00F025FA6781EA +:10D27000E7810120BDE8F0812DE9F0470189B0F890 +:10D2800002800027044600F11C0A414518BF4FF4F4 +:10D29000004938D021F400400AEB00014E886EB1FD +:10D2A000208904F1080520F40040B04238BFFFDFB8 +:10D2B000288829EA0000304328801FE0207D238948 +:10D2C000C21D088823F4004510442188284480B2F8 +:10D2D00004F1080C88420AD2091A89B21B32914221 +:10D2E0002CBF03F4004129EA030004D204E0401AF1 +:10D2F00080B229EA03010843ACF80000781C2189B8 +:10D3000087B24145C6D13846BDE8F0872DE9F047E0 +:10D31000B0F806800B46044600F11C01B0F80890F6 +:10D32000408828F4004C01EB0C05804504BF002028 +:10D33000BDE8F087002A1CBF281D106023B1227DA4 +:10D34000291D18460DF076FD2F886D8885B1E819E6 +:10D3500087B2E088A61D20F40040A84238BFFFDF56 +:10D3600030884FF4004121EA00002843308007E074 +:10D37000207D2288C31DD81981B2A01D00F09CF920 +:10D38000C84504BFE08820813846BDE8F087418861 +:10D39000808881420CBF0120002070474188C088EE +:10D3A00088420CBF01200020704730B44488828836 +:10D3B00000F11C0324F4004C22F400416344944225 +:10D3C0001BD04289C48915191C885A88A3189D420C +:10D3D00016D312B18A4210D212E0037D0CF1070C71 +:10D3E0001A196244008892B2801A80B2223398429D +:10D3F00001D211B104E08A4202D130BC0020704752 +:10D4000030BC012070472DE9F0078588C48800F101 +:10D410001C06024625F4004C24F4004925F4004A79 +:10D42000002024F4004306EB0C074FF00108D1451F +:10D430000AD104F4004405F40045AC4204D0108243 +:10D44000BDE8F00700207047634506D9147DA3EBC3 +:10D450000C031B1BDD1F002305E01488157DA4EBC6 +:10D460000C04641BE51F002DE9DB94895CB13C884A +:10D470007F8847B1DB1BD0748B42E0DB908930445E +:10D48000001BC01E12E02D1BD0748D4206DB107DE8 +:10D490009389C01D60443344184406E08B42CEDBC0 +:10D4A00082F8138090893044001BC01E1182BDE8B1 +:10D4B000F00770472DE9F05F044600F11C088088F2 +:10D4C000924620F4004B208A894608EB0B0608B1EF +:10D4D000484502D20020BDE8F09FA089002804BF83 +:10D4E00000273D4605D0378875887919884218BFCE +:10D4F000FFDFE07C50EA050101D078B338E0A08975 +:10D5000050B1217D4044C91D59440844B4F8151058 +:10D5100020F8031DE17D8170A18907EB09004944D2 +:10D52000A181308000257580207DBAF1000F09D0DF +:10D53000C31D30882288184481B2201D00F0BCF839 +:10D54000A5813AE0A189C01D58444144084430F8FF +:10D55000031DA4F815108078E0752EE0FFE7A08980 +:10D56000B4F815104044C01B20F8031DE17D817004 +:10D5700005EB090085B2A089BAF1000F4844A081EB +:10D580003780758010D0A088261D20F40040A84266 +:10D5900038BFFFDF30884FF4004121EA0000284304 +:10D5A00030800020A08108E0A0894044C01B30F8F2 +:10D5B000031DA4F815108078E07500202082A07467 +:10D5C0000120BDE8F09F10B4B0F802C0848800F1DB +:10D5D0001C022CF400431344A44504D0B0F80AC044 +:10D5E000BCF1000F02D010BC0020704703F1040C06 +:10D5F000C1F800C0007D00F1070C0CEB0300C01E59 +:10D60000486018880881CA605B880B8220B9D01EE8 +:10D6100048600B810020088210BC0120704770B563 +:10D62000044600F11C018288408820F4004319441C +:10D63000904205D06289002A04BFE289002A01D005 +:10D64000002070BD0A884D8885B1A61C20F40040DA +:10D65000A84238BFFFDF30884FF4004121EA0000C4 +:10D66000284330800020E081012070BD207DC31D53 +:10D67000981881B22288A01C00F01EF8F2E7002161 +:10D680008181C1740182817470478289002A04BF3C +:10D6900000207047828800F11C0322F400421A44E3 +:10D6A000B2F800C0BCF1000F1DBF037D121D1A446B +:10D6B000DA1E4A608089704710B4B0F800C02CF4BC +:10D6C0000044214489B24FF4004491420AD2521AD4 +:10D6D00092B21B339A422CBF0CF4004224EA0C0194 +:10D6E00004D204E0891A89B224EA0C0211430180B1 +:10D6F00010BC70472DE9F04188464FF6FC7102F1ED +:10D7000003021E46040002EA010509D00027E01CBE +:10D7100020F00300A04200D0FFDF201D01210CE01B +:10D720000127F4E7024628442FB9B14201D203464B +:10D7300000E000231360491CC9B2B142F2D9011BB9 +:10D74000C8F80010002F04D10EB1201D00E0002009 +:10D750002060BDE8F081024600201168002902D057 +:10D76000084609681160704702680A6001607047E6 +:10D770004FF6FC73C91C1940101A001F90FBF1F002 +:10D78000C0B270474FF6FC73C91C1940001D01FB65 +:10D7900002007047F8B5D24D04460E46A878A04264 +:10D7A00000D8FFDF05EB8607B86A50F8240000B107 +:10D7B000FFDFB868FFF7CFFF05000DD0B86A062E6F +:10D7C00040F824500AD0082E00D3FFDFC548294670 +:10D7D00050F82620204690472846F8BDC048C24B46 +:10D7E0007A30A0F12E0200902946204609F08FF8E9 +:10D7F000F2E72DE9F84F8046DDF828901E4603EB4E +:10D80000090093468A46C4B25FEA080707D000259C +:10D81000FF2800D9FFDFBAF1000F03D101E0012595 +:10D82000F6E7FFDF08F1030020F00301414500D0D7 +:10D83000FFDFCB4500D9FFDF65B9A94A00204C3294 +:10D840004FF6FF7110705180A74A1070A44A7A32C7 +:10D8500010705180A24880F800B046708470C47087 +:10D860000471447180F80690DFF878B2C671002622 +:10D870000BF1400B8146FF1C27F003000746002DEB +:10D8800002D109EB860188603BF8162019F80630B2 +:10D8900001D04FF000006946FFF72CFF0098761C7E +:10D8A000F6B20744082EE6D3FF1C27F003002346F8 +:10D8B000064675B1002002226946FFF71BFF00985B +:10D8C0003118002003464E46C91C21F003021DB149 +:10D8D00010E0C9F84800EEE706EB80070021BA62C5 +:10D8E00006E000BFD7F828C04CF82130491CC9B267 +:10D8F000A142F7D3401CC0B202EB84010828E3D355 +:10D90000A1EB0800AAF800000020BDE8F88F10B5D0 +:10D91000044604F075F808B1102010BD2078704A54 +:10D92000618802EB800092780EE0836A53F8213020 +:10D9300043B14A1C6280A180806A50F82100A06037 +:10D94000002010BD491C89B28A42EED861800520B2 +:10D9500010BD70B505460C46084604F051F808B1F4 +:10D96000102070BD082D01D3072070BD2570002048 +:10D97000608070BD0EB56946FFF7EBFF00B1FFDFB9 +:10D980006846FFF7C4FF08B100200EBD01200EBDA0 +:10D9900010B50446082800D3FFDF5148005D10BDD4 +:10D9A0003EB5054600246946FFF7D3FF18B1FFDFF7 +:10D9B00001E0641CE4B26846FFF7A9FF0028F8D034 +:10D9C0002846FFF7E5FF001BC0B23EBD44498978F9 +:10D9D000814201D9C0B27047FF2070472DE9F04164 +:10D9E0000C460546062901D0072C10D13C4FB86CD7 +:10D9F000FFF7B1FE02004FF6FF7604D00221B86CAB +:10DA0000FFF7B6FE00E030462880B04202D1002089 +:10DA1000BDE8F0812146FFF7BDFE040002D1288851 +:10DA200000F050F82046F3E7A0F57F42FF3A01D01E +:10DA3000082901D300207047ACE6A0F57F42FF3AE9 +:10DA40000BD0082909D2264A9378834205D902EBE4 +:10DA50008101896A51F820007047002070472DE944 +:10DA6000F04104460D46A4F57F4143F20200FF3920 +:10DA7000CED0082D01D30720CAE719494FF000087E +:10DA80008A78A242C4D901EB85072146BA6A52F8C6 +:10DA90002460002EBCD0134A08462032314652F88A +:10DAA00025209047B96A062D41F8248001D0072D22 +:10DAB00002D1204600F006F83146B868FFF754FE60 +:10DAC0000020A5E710B5064CC2B20221A06CFFF7FA +:10DAD00059FE0146A06CBDE81040FFF745BE0000AE +:10DAE000480900204CB40100560000200146A0481F +:10DAF000002200680260037A00EB830040F80C2FDC +:10DB00008180114600F025B92DE9F05F9846DDF8D7 +:10DB100030B0DDF828A01546894604004FF0000615 +:10DB200025D00027E01C20F00300A04200D0FFDF3A +:10DB30007DB30120FFF75EFA00FB05620AEBCB0024 +:10DB4000104486B20120FFF755FA00FB05620B99DD +:10DB500008EBC100104405EB450100EB4100143017 +:10DB600000EB850000EB850086B217B111E00127BC +:10DB7000D8E7A6EB85000C3887B27D48A900046081 +:10DB8000257204F10C0060600DF0EDF93846FFF7E6 +:10DB9000ADFFA9F800600020BDE8F09F2DE9FF4F20 +:10DBA000734C814681B020689A468B4600B9FFDFEE +:10DBB0002068027A4A4503D9426852F8291021B1F7 +:10DBC00043F2020005B0BDE8F08F006800B9FFDF46 +:10DBD00001210E9A0398FFF70FFAC61C4FF6FC7549 +:10DBE0002E40584601215246FFF706FAC01C00EAB3 +:10DBF000050808EB0600001D85B25D480027006897 +:10DC0000046801E027460446206838B1A188A9428B +:10DC1000F8D13946204600F0A4F813E005F10800D9 +:10DC2000A18880B2814229D33946204600F099F874 +:10DC3000A0880022411B601902608180394600F0F3 +:10DC400088F8A580A08860802680251D0E9F01236E +:10DC5000039A314628460097FFF7D6F920884146B7 +:10DC600028445A460123CDF800A0FFF7CDF94048DB +:10DC700000684168002041F82940A3E70420A1E79B +:10DC800070B53B4C0546206800B9FFDF2068017A7B +:10DC9000A94210D9426852F8250060B1418800239A +:10DCA00042F8253003608180194600F052F821685F +:10DCB00000200A7A08E043F2020070BD4B6853F876 +:10DCC00020306BB9401CC0B28242F7D8002002E07D +:10DCD0008A88104480B209680029F9D1FFF706FF4D +:10DCE000002070BD70B5224D286800280AD000249D +:10DCF00004E02046FFF7C4FF641CE4B22868007A01 +:10DD0000A042F6D870BD70B5194E054600243068A3 +:10DD100000B9FFDF3068017AA94204D9406850F8A1 +:10DD2000250000B1041D204670BD70B5104E05469B +:10DD30000024306800B9FFDF3068017AA94206D9B3 +:10DD4000406850F8251011B131F8040B44182046F2 +:10DD500070BD19B10A68026008607047044909681B +:10DD6000F8E7006809B10860704701490968FAE7F7 +:10DD70005C00002070B5044600780E4601281AD0D9 +:10DD8000072802D00C281AD115E0A068216905786F +:10DD90000B2D0CD0052003F0CCFD052D0FD07823E2 +:10DDA00000220520D4F8101003F026FD07E07823A8 +:10DDB00000220620F8E70520216903F0BAFD31466C +:10DDC0002046BDE8704001F0BDB910B500F1390240 +:10DDD000C3799478411D64F003042340C371DB07C9 +:10DDE0000DD04B79547923404B710B791279134044 +:10DDF0000B718278C9788A4200D9817010BD0022E7 +:10DE00004A710A71F5E74178012900D00C210170AF +:10DE100070472DE9F74F86B000208C698DF800001F +:10DE20000878012617460D464FF0070B4FF01109F1 +:10DE30004FF00A0A2A2878D2DFE810F02A001A03E5 +:10DE400058036D03A703B603D203FF03160440046F +:10DE500068048704A004DD04EE04110519053905E2 +:10DE60005E058905AC05D705F505FF0521063206D7 +:10DE7000440676069806EA0621072F075A077A070E +:10DE80008E079F07D80710083C08F807FC07020810 +:10DE900014B120781D2829D0D5F808805FEA080041 +:10DEA00043D001208DF80000686A049003208DF8AB +:10DEB00004008DF805A0286A0290A8880028EFD0F9 +:10DEC00098F8001091B10F2910D27DD2DFE801F04F +:10DED0007C144BDCFEFDFCFBFAF9F8089EF7F6001B +:10DEE000022822D124B120780C2801D0002676E324 +:10DEF00002208DF80000B7E10620696A03F019FDE1 +:10DF0000A8880728EDD1204601F017F9022809D08A +:10DF1000204601F012F9032808D9204601F00DF936 +:10DF2000072803D20120207005E016E2002CB7D0AC +:10DF300020780128D5D198F80400C11F0A2902D3FE +:10DF400085F81CA093E2A070D8F80010A163B8F87F +:10DF50000410A18798F8060084F83E00012028707C +:10DF60000320207046E00728BBD1002C98D02078F1 +:10DF70000D28B6D198F8031094F83B20C1F3C000E7 +:10DF8000C2F3C002104201D00E2000E00F2089072A +:10DF900007D198F805100142D2D198F80610014235 +:10DFA000CED194F83D2098F8051020EA02021142E3 +:10DFB000C6D194F83E2098F8061090430142BFD194 +:10DFC00098F80400C11F00E04FE20A29B8D2617F2F +:10DFD000814201D90620C9E3D8F800106160B8F881 +:10DFE0000410218198F80600A072012028700E20EC +:10DFF000207003208DF80000686A049004F1390055 +:10E000000190601D029017300390E1E0B5F806B072 +:10E0100041288FD1204601F090F8042802D1E07801 +:10E02000C00704D1204601F088F80F289CD1CBF11D +:10E030004002164608F10101606A0CF0FBFE606ABE +:10E040005A463044E9680CF0F5FE0E208DF80000C9 +:10E05000686A0490606A019000216846FFF78AFEB2 +:10E060002078042808D0A07F48B1012807D00328D1 +:10E0700008D010202070A2E00520207015E284F85E +:10E08000009033E71220F5E71128C2D1204601F0B5 +:10E0900054F8042802D1E078C00719D0204601F0D6 +:10E0A0004CF8062805D1E078C00711D1A07F0228DE +:10E0B0000ED0204601F041F8112808E0B9E089E0CF +:10E0C000A1E178E158E110E1EFE0D5E01DE0A0D159 +:10E0D000102208F1010104F148000CF0ABFE607859 +:10E0E000012809D012202070E078C0076BD0A07FF3 +:10E0F000A0B3012863D066E0607FA17888423FF634 +:10E1000069AF00BF84F800B059E011288ED12046D5 +:10E1100001F013F8082804D0204601F00EF8132867 +:10E1200084D12869D8B16869C8B104F17800102297 +:10E1300008F1010106460CF07DFE2078082812D077 +:10E1400014202070E078C0070FD0A07F022818D0DC +:10E150006178022912D0032831D034E02FE000206A +:10E160008DF80000F9E00920EBE70B202870296901 +:10E1700002204870206CC1E9010695E208B101282F +:10E1800079D10B202870296908204870606A48609E +:10E19000206AC1E902067BE2206CE2780068C2F3E3 +:10E1A0004402521ED04000F0010040F0800000E028 +:10E1B00000200874E06A48617FE20646FEE304201E +:10E1C00028700520EBE185F800A08DF800A0B9E3E8 +:10E1D0003946F4E31128C5D1204600F0AEFF0A28E5 +:10E1E00002D1E078C00704D1204600F0A6FF152830 +:10E1F000B8D1102208F1010104F148000CF01AFE18 +:10E2000020780A2810D01620207012202870296942 +:10E2100004F1580081F801A048602030886010386F +:10E22000C860206C0861AFE30B202070E1E2287029 +:10E23000D4E1022896D1204600F07FFF042804D3C1 +:10E24000204600F07AFF082809D3204600F075FF29 +:10E250000E2887D3204600F070FF12287DD2A07FC1 +:10E260000228B8D18DF80090686A049098F80100EF +:10E270008DF80400FEE367E20228ACD1204600F0EE +:10E280005CFF002869D0204600F057FF0128F9D034 +:10E29000204600F052FF0C28F4D005208DF8040031 +:10E2A00098F801008DF805005CE71128FCD1002CDE +:10E2B000FAD020781728F7D16178E06A022912D0C5 +:10E2C0005FF0000101EB4101182606EBC1011022AD +:10E2D000405808F101010CF0ADFD0520696A00F01D +:10E2E0001FFF267002E60121ECE70B28DCD1002C91 +:10E2F000DAD020781828D7D16178E06A02292DD0A9 +:10E300005FF0000101EB4101102202EBC101415815 +:10E31000B8F8010008806078E16A022821D0002066 +:10E3200000EB4002142000EBC2000958404650F8B0 +:10E33000032F0A60406848600520696A00F0F0FE1B +:10E340006078022810D04FF000002044407A20F07E +:10E3500001010CD14FF001000BE0D3E14FF00101BE +:10E36000D0E74FF00100DBE74FF00100EDE74FF0A1 +:10E3700000002044417281E3112895D1002C93D0F4 +:10E380002078192890D16178E06A022911D0002103 +:10E3900001EB41011C2202EBC1011022405808F19F +:10E3A00001010CF047FD0520696A00F0B9FE1A2052 +:10E3B000E9E00121ECE7082898D1002C98D02078DA +:10E3C0001A2893D1E16A98F801000870E16AD8F838 +:10E3D000022041F8012FB8F8060088800520696AFC +:10E3E00000F09EFE6078022807D04FF00000204425 +:10E3F000407A20F002002CD034E04FF00100F6E724 +:10E40000214448723AE31128B7D1002CB7D02078C4 +:10E410001B28B2D16178E06A02291DD05FF00001AB +:10E4200001EB4101202202EBC1011022405808F10A +:10E4300001010CF0FFFC0520696A00F071FE6078B4 +:10E4400002280CD04FF000002044407A20F0040055 +:10E4500008D14FF00101D3E74FF00101E0E74FF0A1 +:10E460000100F1E74FF00001CAE785F81CB0F4E3C2 +:10E470003878012886D11C2204F11C0079680CF040 +:10E480001EFDE079C10894F83B0001EAD001E07874 +:10E4900061F30000E070217F09B1297732E1217832 +:10E4A00003290AD0C0073FF4E6AD032028708DF899 +:10E4B00000A0686A04904120A7E302262671E17952 +:10E4C000204621F0E001E171617A21F0F0016172F2 +:10E4D000A17A21F0F001A172FFF777FC2E708DF880 +:10E4E00000A0686A04908DF804B071E638781228AC +:10E4F000D4D18DF800B0696A049191680291ADF8A9 +:10E5000004B008466168016021898180A17A817127 +:10E5100004202070AEE23878B7F806801228BDD10A +:10E520008DF800B0686A0490381D01AB07C883E815 +:10E5300007004120ADF8040008460C2100F8011B3B +:10E54000C8F140063246216A0CF074FC206A42464B +:10E550008119F8680CF06EFC00216846FFF70AFC90 +:10E56000E07820F03E00801CE0702078052801D083 +:10E570000F2008E0A07F00283FF4C4AD0128FBD0A5 +:10E58000032870D108202070B0E43878032885D1A2 +:10E5900078680168A1664068E066052028708DF8FB +:10E5A0000000686A049013E638780328A0D17868E0 +:10E5B0000168216740686067206C68B9A07F28B156 +:10E5C000012803D0062028700420E8E785F800B071 +:10E5D000FE482064606401E085F800B00326F0E3A3 +:10E5E0003878022884D13879E0BBA07F02280BD08C +:10E5F0000328F1D1607801280BD0A07994F83A1063 +:10E6000001280AD0F1480BE0B86800287AD02064CD +:10E6100011E0A17994F83A00F2E7B8680028F5D043 +:10E620002064E078C00701D0012901D0E74802E06A +:10E63000F8680028EAD06064CEE78DF800A0696A27 +:10E640000491E1785046C90709D06178022903D1C5 +:10E65000A17F29B1012903D0A17F032900D008207F +:10E66000287046E101E1BFE0387812288FD1B86800 +:10E67000286209202870E0782969C0070DD0082099 +:10E680004870206A4860606A886004F16800C86069 +:10E69000A07F02287FF48CAD7EE502204870206CBC +:10E6A000486004F16800886004F13800C860201DEB +:10E6B0000861206B4861606B88612EE2E1783878F0 +:10E6C000C90701D0072100E00B2188428AD12078B8 +:10E6D000072818D084F800908DF800B0686A04907C +:10E6E000286A0290ADF80490032100F8011B5168DC +:10E6F00010220CF09FFB00216846FFF73BFB002037 +:10E700002862BEE44CE208202070E5E73878122841 +:10E71000ACD18DF800B0686A049090680290ADF8B2 +:10E720000490042100F8011B102204F168010CF090 +:10E7300081FB00216846FFF71DFB2078092801D0E6 +:10E74000132020E784F800A016E0E1783878C907A4 +:10E7500001D0072100E00B21884287D1102204F16B +:10E76000480079680CF03AFB10B104202877B1E337 +:10E77000207809283FF4BFAC0C2058E5E078C107A9 +:10E7800037D0A17F012902D002291BD02EE00D2015 +:10E79000287029690B2048706078012809D0206A08 +:10E7A0004860606A886004F16800C86010300861E1 +:10E7B00000E5606A4860206A886004F17800C860FB +:10E7C0001038F4E7C0F3440114290FD24FF0006170 +:10E7D00001EBB0104FEAB060E0706078012803D020 +:10E7E00010202070042061E10620CCE6607801282A +:10E7F00087D00E201BE538780A2889D185F800A03B +:10E8000010208DF80000686A049050680190002183 +:10E810006846FFF7AFFAE9E7E078C0070AD0A07FC3 +:10E82000012803D10F202870042041E11020287016 +:10E830000F203DE115202870296903204870206CC5 +:10E8400048606078012805D004F1780088601038AD +:10E85000C86062E104F1680088601030F8E7387839 +:10E860000228CAD138790028E0D0287730E33878F8 +:10E870001428FBD185F80090296909204870786830 +:10E880004860607801280DD004F16800886010307D +:10E89000C860206B0861606B486104F158008861B2 +:10E8A000A06A22E004F1780088601038F0E7387838 +:10E8B0000828DBD16078012801D0132043E2A17839 +:10E8C000A06A0844C1F110010CF02BFB1220287043 +:10E8D000296904F1580081F801A04860203088605F +:10E8E0001038C860206C086147E0C861E06A0862BF +:10E8F00013E18DF80490DFE038780928B6D11022B2 +:10E9000004F1480079680CF069FA08B10B202DE792 +:10E9100020780B2812D02046FFF757FAA178A06A7A +:10E920000844C1F110010CF0FCFA162028700820F0 +:10E930008DF80000686A049000206FE013202870B2 +:10E940008DF800A0686A04908DF8049040E438784F +:10E9500012288BD1B868286214202870296904F124 +:10E96000580081F801A04860103088601030C860FD +:10E97000606C08616078012806D004F139004861B4 +:10E98000206B8861606BB0E7601D4861606B8861D7 +:10E99000206BAAE7387809288BD18DF800B0686A17 +:10E9A0000490286A0290ADF804900D2100F8011B34 +:10E9B000102279680CF03EFA002101E077E27CE059 +:10E9C0006846FFF7D7F90020286201E06AB5010028 +:10E9D0006178012901D01520D5E51621297008217B +:10E9E0008DF80010696A049118E038780C2885D1F8 +:10E9F000162028706078022802D12046FFF7E5F93A +:10EA0000A07879680A18C0F1100110460CF089FA54 +:10EA100008208DF80000686A049078680190A0785A +:10EA20008DF8080061E53878102892D1E079C007A8 +:10EA300079D01720287009203AE03878112888D139 +:10EA40001422391D04F11C000CF039FAE16A208D02 +:10EA5000A1F80900E16AA078C871E179E26A01F0E1 +:10EA600003011172E16A627A0A73E16AA07A81F89D +:10EA7000240000E045E26078012876D0B4E16078B7 +:10EA8000022801D0012000E000202044407AC00785 +:10EA900004D0E078C00701D1192054E11E206CE6B3 +:10EAA000387812287CD1B86828621A20287005208E +:10EAB0008DF80000686A049011466846FFF75AF91D +:10EAC000FFF77BBB387803286AD16078E16A0228B7 +:10EAD00001D0012000E0002000EB4002142000EBF8 +:10EAE000C20289587A6813680B6052684A601B2119 +:10EAF0002970D5E9041206234B70636A4B6066786F +:10EB0000E36A022E01D0012600E0002606EB46064D +:10EB100000EBC6001858C1E90202686A486206980C +:10EB200000F027FBCCE788E138780F2838D16078EF +:10EB3000E26A022801D0012000E0002000EB400042 +:10EB4000102101EBC00002231058093279680AF045 +:10EB50006DFC1C202870296905204870206A4860D7 +:10EB6000E06A09308860FA4872E65BE138780E287E +:10EB700016D16178E06A022901D0012100E000216C +:10EB800001EB4101182606EBC101A27840587968D3 +:10EB90000CF050F96178E06A022902D0012101E00D +:10EBA000B8E0002101EB410106EBC1014158A0781A +:10EBB0000A18C0F1100110460CF0B3F98DF800B03E +:10EBC000686A0490286A0290ADF8049006210170EA +:10EBD0006278E16A022A01D0012200E0002202EB01 +:10EBE000420206EBC202401C895810220CF022F9A6 +:10EBF00000216846FFF7BEF8002028621D2028701B +:10EC00008DF800A0686A04900B208DF804006CE475 +:10EC1000387812287ED18DF800B0686A0490906828 +:10EC200002900B20ADF80400029880F800B06278E2 +:10EC3000E16A022A01D0012200E0002202EB420236 +:10EC4000102303EBC20289580988A0F801106178EB +:10EC5000E26A022902D0012101E03BE1002101EB3F +:10EC60004103142101EBC30151580A6840F8032FF6 +:10EC70004968416000216846FFF77CF80EE760783C +:10EC8000022801D0012000E000202044407A8007C3 +:10EC900001D51F2057E021206FE53878122839D19F +:10ECA0008DF800B0686A0490B8680290ADF80490DE +:10ECB000082606706278E16A022A01D0012200E08B +:10ECC000002202EB42021C2303EBC202401C8958C3 +:10ECD00010220CF0AFF800216846FFF74BF8202017 +:10ECE00028708DF800A0686A04908DF804605AE4DA +:10ECF000387812280ED18DF800B0686A04909068B8 +:10ED000002900820ADF80400029809210170E16921 +:10ED1000097800E093E04170E16951F8012FC0F8F3 +:10ED200002208988C18000216846FFF723F8B2E7F6 +:10ED30006078022801D0012100E000212144497AB5 +:10ED4000490706D5222028708DF800A0686A049033 +:10ED5000CFE5012848D067E0387812286FD1B8682D +:10ED6000286223202870296905204870206A48609D +:10ED7000E06A0930886077486AE538780E285ED105 +:10ED80006178E06A022901D0012100E0002101EB55 +:10ED90004101202606EBC1014058516810220CF0B9 +:10EDA00049F88DF800B0686A0490286A0290ADF8BE +:10EDB000049080F800A06278E16A022A02D0012261 +:10EDC00001E0A4E0002202EB420206EBC202401C7A +:10EDD000895810220CF02EF800216846FEF7CAFF71 +:10EDE000002028626078B4E72420C6E46078022816 +:10EDF0000BD000202044407AC10702D0E178C90737 +:10EE000005D0810705D519209BE40120F2E71720E2 +:10EE100097E4400701D51B2093E41C202070607804 +:10EE2000012801D01820A8E42720A6E42820287073 +:10EE30000B203DE6387813284AD129209DE40CE0C8 +:10EE40002078012844D00C2842D02046FEF7DBFF72 +:10EE50000C208DF80000686A049039E038784FF093 +:10EE60002608122805D013201070032685F800808C +:10EE70004DE08DF800B0686A0490B86802900220F6 +:10EE8000ADF80400029805210170297F417000212E +:10EE90006846FEF76FFF0B208DF80000686A04904B +:10EEA00039466846FEF766FF064685F80080012E63 +:10EEB0000ED02CE001208DF80000686A0490042038 +:10EEC0008DF80400287F8DF805000020287712E0D7 +:10EED000287F80B11D202070252028708DF800A08B +:10EEE000686A049002208DF8040039466846FEF7EF +:10EEF00041FF06460BE00CB1FE2020709DF800009B +:10EF000028B100216846FEF735FFFEF7EFBF09B0D4 +:10EF10003046BDE8F08F2DE9F04F0C4601274E69D1 +:10EF2000097885B09046BA464FF00209072021B112 +:10EF300001294FD0022920D1C9E0217901290BD024 +:10EF4000022916D0032911D0042916D11CE0000093 +:10EF500062B501009CB40100707801280CD1062034 +:10EF6000616A02F0BFFC002807D11AE01D20307052 +:10EF700017E07178022901D0052796E031780C2935 +:10EF800027D18DF804000EE03078011F042902D348 +:10EF90000E3803281DD2B07F02281AD120890228FA +:10EFA00017D38DF8049084F800A020899DF80410F0 +:10EFB000884203D20A208DF800003FE01221083475 +:10EFC00088F8001094E80E00C8E901120327C8F879 +:10EFD0000C306AE098F80010122966D18DF8000014 +:10EFE000616A0491D8F80850029521794FF00B0B13 +:10EFF000012906D0022929D0032911D0042954D18E +:10F000005AE0ADF8049085F800B0207E4F4600F03D +:10F010001F00687000216846FEF7ACFE377043E0C1 +:10F02000ADF8049005202870207E68704E460021BF +:10F030006846FEF79FFE26708DF800B0606A049067 +:10F0400041466846FEF796FE07462EE0ADF80400FE +:10F0500085F800A0207F6870607F00F00100A87034 +:10F06000A07F00F01F00E870E17F2971C0071FD06A +:10F0700094F8200000F00F00687194F8210000F06F +:10F080000F00A87100216846FEF774FE2868B0637F +:10F09000A888B087A87986F83E00A0694078707784 +:10F0A0002879B0700D2030700027384605B030E761 +:10F0B0000020A8716871E5E7ADF804900E20287073 +:10F0C000207E687000216846FEF754FEECE7FE20C3 +:10F0D00030708DF800A0606A049004208DF8040060 +:10F0E000207E8DF80500EDE700B50023012285B0F4 +:10F0F00005280FD006280BD102208DF8002004919E +:10F100008DF804008DF8053000216846FEF732FEC8 +:10F1100005B000BD8DF8002004918DF80420F1E7C2 +:10F1200070B50C46054602F004FC21462846BDE8B1 +:10F1300070407823002202F05FBB08B1007870476E +:10F140000C20704770B50C0005784FF000010CD012 +:10F1500021702146F4F70EF973482178405D88420A +:10F1600001D1032070BD022070BDF4F703F9002027 +:10F1700070BD027B032A05D000220A704B780C2B4D +:10F1800002D003E0042070470A770A62027B9300F2 +:10F19000521C0273C15003207047F0B585B00F4672 +:10F1A00005460124287B05EB800050F8046C70783C +:10F1B000411E0D290AD25C493A46123101EB80000A +:10F1C000314650F8043C2846984704460CB1012CBF +:10F1D00011D1287B401E10F0FF00287301D00324BA +:10F1E000E0E70D208DF80000706A04900021019680 +:10F1F0006846FFF7A7FF032CD4D005B02046F0BD2A +:10F2000070B515460A46044629461046FFF7C5FF65 +:10F21000064674B12078FE280BD1207E30B1002044 +:10F220002870294604F10C00FFF7B7FF2046FEF7CF +:10F23000EAFD304670BD704770B50D460446882122 +:10F240000BF091FE012D03D0022D03D0052070BDDF +:10F25000012000E0022060702046FEF7D4FD00206F +:10F2600070BD28B1027E1AB10A4600F10C01C7E751 +:10F270000120704730B5044687B00D46062002F0E5 +:10F2800058FB2946052002F054FB2078FE2806D0C2 +:10F2900000208DF8000069462046FFF7E2FF07B026 +:10F2A00030BD7FB50E4600218DF80C1041780C2939 +:10F2B00003D00D2903D0002405E0846900E04469EF +:10F2C0000CB1217E91B16D4601462846FFF751FFF2 +:10F2D000032809D1324629462046FFF791FF9DF8C1 +:10F2E0000C10002900D0042004B070BD04F10C05FE +:10F2F000EAE710B590B00C4607900B480521801E38 +:10F3000008900A488DF8191009900F92694606A8CE +:10F31000FFF7C7FF002805D11022204601990BF006 +:10F3200089FD002010B010BDA2B4010062B501003B +:10F3300070B50D46040011D085B1210128460BF0AF +:10F34000F0FD10224E4928460BF074FD4C48012177 +:10F350000838018044804560002070BD012070BDE8 +:10F3600070B5474E00240546083E10E07068AA7B41 +:10F3700000EB0410817B914208D1C17BEA7B914272 +:10F3800004D10C2229460BF029FD30B1641C3088D1 +:10F390008442EBDB4FF0FF3070BD204670BD70B58E +:10F3A0000D46060006D02DB1FFF7DAFF002803DB7B +:10F3B000401C14E0102070BD314C083C208862884D +:10F3C000411C914201D9042070BD6168102201EBFB +:10F3D000001031460BF02EFD2088401C2080287044 +:10F3E000002070BD70B514460D0018D0BCB10021CE +:10F3F000A170022802D0102811D105E0288870B130 +:10F400000121A170108008E02846FFF7A9FF00281D +:10F4100005DB401CA070A8892080002070BD012061 +:10F4200070BD70B5054614460E000BD0002030703C +:10F43000A878012808D005D91149A1F108010A8846 +:10F4400090420AD9012070BD24B128782070288804 +:10F45000000A5070022008700FE064B14968102261 +:10F4600001EB0011204610390BF0E4FC28782073E2 +:10F470002888000A607310203070002070BD0000E2 +:10F48000680000202DE9F041FE4C207EE17D88429D +:10F4900008BFBDE8F0810126FB4D0027E07D215C1F +:10F4A00001EB810205EB8200037C052B10D0037C6D +:10F4B000062B1BD0037C072B27D0437C012B18BFC6 +:10F4C000FFDF30D0207EE17D8842E7D1BDE8F081CA +:10F4D0000674E07D16281ABFE07D401C0020E07510 +:10F4E000481CC0B255F8222002210CE00674E07DD1 +:10F4F00016281ABFE07D401C0020E075481C55F816 +:10F500002220C0B203219047DCE70674E07D162874 +:10F510001ABFE07D401C0020E075481CC0B255F8C1 +:10F5200022200821EFE74774E07D16280EBF002057 +:10F53000E07D401CE075481CC0B255F82220072130 +:10F54000E1E770B5D14E00240C2086F82900A6F51D +:10F550003B70254680F8CD4180F8CC4100F5F47031 +:10F560000476C47506F12C000AF0B2FDA6F58E7083 +:10F57000057586F82B50601EB06086F8255086F819 +:10F58000225086F8235086F8245086F82150C0482F +:10F5900005704570A6F1E80004EB840100EB8101E1 +:10F5A0000D74611CCCB20B2CF6D30120F9F726FBAD +:10F5B0000020F9F723FB012086F82600F9F7D2FF97 +:10F5C000B448F9F7DEFFB44C2070B448F9F7D9FF1E +:10F5D0006070BDE87040F9F7A5BA10B5F9F7D0FA38 +:10F5E000AD4C2078F9F7E6FF6078F9F7E3FFA74C18 +:10F5F00094F82800002808BF10BDF9F7CAFC0020C5 +:10F6000084F8280010BD0B20704770B5F9F79BFBFC +:10F610009E4C054694F8260000281CBFFFDF70BDF5 +:10F6200094F82B00002808BFFFDF6FF07F4260696D +:10F630000026291AB1F5800F24BF431BB3F5800FB4 +:10F640000DD38A4203D2101A2844411C07E09A4283 +:10F6500028BFFFDF05D2511B0844401C414200294E +:10F6600000DBFFDF012584F8265084F82B6094F836 +:10F6700029100420844A01EB810102EB8101087406 +:10F68000A068B0F1FF3F04D0A81EA0600120F9F7E8 +:10F69000B5FA0020F9F7B2FAF9F796FA0AF0A6FEE1 +:10F6A000F9F7DAFB7E48066006604FF0E0214FF480 +:10F6B0000040C1F88002F3F780FC7548007802280A +:10F6C00004D0032805D194F8230010B184F8225007 +:10F6D00001E084F82260BDE87040F9F7A1BB034661 +:10F6E00069490B2000EB800201EB820212F8042C26 +:10F6F00022B1401E10F0FF00F4D1704700EB8002F1 +:10F7000001EB8201012241F8143C01F8042C7047FE +:10F71000012804D0032808BF002926D000E021B327 +:10F720005A4B4FF0000C83F821C0594A00289070C2 +:10F7300014BF022882F803C00BD0072915D2DFE8D6 +:10F7400001F01404060C0E1012001B2000E03A20F9 +:10F75000D070012083F8210070475820F8E7772007 +:10F76000F6E79620F4E7B520F2E700207047484816 +:10F7700010B54078F9F779FB80B210BD421E10B584 +:10F78000414900EB800001EB80040A2A02D814F8FA +:10F79000040C00B9FFDF14F8040C012818BFFFDFC8 +:10F7A000002004F8040C10BD70B53E4C94F8CD0157 +:10F7B00094F8CC1188420CBF01250025F9F7C3FA53 +:10F7C000F9F753FB94F8CD1194F8CC2191420CBF7A +:10F7D00001210021A942E9D170BD2DE9F05F8046E9 +:10F7E0004B1E1746DCB2284804EB840200EB82056E +:10F7F0002E1D287CDFF88C9007282DD199F8170052 +:10F80000002299F818C0844524D000BF19F800C020 +:10F81000A44508BF012200D04AB116280CBF4FF002 +:10F82000000C00F1010C19F80CC009F800C01628F2 +:10F830000CBF0020401CC0B299F818C08445E5D127 +:10F8400042B199F818204846002A0EBF1622027EBF +:10F85000521E0276012028740A2B10D80A4801EBA8 +:10F86000810100EB810010F8040C40B1287C0128D4 +:10F8700006D0287C012802D0B87A012816D0FFDFF4 +:10F88000B87A11E0BC0B0020D80B0020C00C00207F +:10F890007A000020A51601007800002085F4000001 +:10F8A00000F50040D409002001284AD1FE49287CF7 +:10F8B000022816D099F8180016284AD099F818008E +:10F8C00099F81710401C884200D1FFDF01206874AE +:10F8D00099F8180009F8004099F8180016283DD04A +:10F8E0003EE0DFF8C8C39CF829000246A04207D0DA +:10F8F000024600EB820001EB8000807CA042F7D141 +:10F900009CF8293083420CD19CF8292002EB82021A +:10F9100001EB8202927C8CF8292001228CF82A20AB +:10F9200009E000EB800301EB830302EB820201EBB1 +:10F9300082029B7C937400EB800001EB80000C2220 +:10F940008274387A062825D2DFE800F012211E1BC7 +:10F95000181599F817000028B8D1B6E7002002E082 +:10F9600099F81800401C89F818000020BDE8F09FA5 +:10F970004FF0000A11E04FF0B40A0EE04FF0730AA6 +:10F980000BE04FF0320A08E04FF00A0A05E04FF0B2 +:10F99000060A02E0FFDF4FF0000A3868A0EB0A0019 +:10F9A0003060397A00290CBF04210221401A20F06E +:10F9B0007F423260D7E90001084420F07F40706048 +:10F9C000B87A022818BF387B7ED1387A00280CBF5D +:10F9D0000420022000EB0A037868591D00EB010B9C +:10F9E000B3484078504503D9B04991F8231011B17C +:10F9F0000BF1060003E0A0EB0A005844801DAB4960 +:10FA000091F829C0BCF10C0F24D08E4691F8291032 +:10FA100001EB810CA44901EB8C0CDCF804C06245BD +:10FA200018D0DFF890C29EF8292002EB820201EB89 +:10FA300082014A688968A2EB080222F07F42A1EBAA +:10FA4000080121F07F41904298BFB2F5800F49D262 +:10FA50008C4547D34044A0EB0B0020F07F41316040 +:10FA60001944F86821F07F410A1A6FF07F43B2F51C +:10FA7000800F24BFA0EB010CBCF5800F0DD3934287 +:10FA800003D2181A0844421C07E0634528BFFFDF71 +:10FA90001FD2591A0844401C4242002A19DD052091 +:10FAA000287499F8180016282DD099F8180099F89C +:10FAB0001710401C884200D1FFDF99F8180009F8A0 +:10FAC000004099F8180000E00BE016287FF448AFDA +:10FAD00044E73068ABF10501084420F07F407060D6 +:10FAE000002030727068401D20F07F407060787A8E +:10FAF000B072387A0627707203280DD260B101F017 +:10FB000023FB28B108E099F817000028D5D1D3E7E6 +:10FB1000CAF138074FF0320A65480178012918BF49 +:10FB200003290AD14078504507D9604991F823103C +:10FB3000002904BFA0EB0A0007445E4B3068A0EB2D +:10FB40000802706822F07F41A0EB080020F07F4C93 +:10FB50008F4298BFB1F5800F1CD263451AD3534929 +:10FB600091F829300C2B32D091F829704FF00C0B02 +:10FB70004FEA0B0A4C4907EB870301EB8303D3F8E9 +:10FB800008C0ACEB080C944531D8BB469F7C0C2FC9 +:10FB9000F0D199E00520287499F81800162811D0A2 +:10FBA00099F8180099F81710401C884200D1FFDF1F +:10FBB00099F8180009F8004099F8180016287FF401 +:10FBC000CFAECBE699F817000028F1D1EFE702207D +:10FBD000287491F829000C2818BF91F82900A874FE +:10FBE00081F82940012081F82A00BDE8F09F0C2F00 +:10FBF0001CBFBA46002267D00AEB8A0301EB8303DD +:10FC0000D3F804C0ACEB080C844528D29A7B96F854 +:10FC10000AC094451CD30520287499F818001628AA +:10FC200011D099F8180099F81710401C884200D19B +:10FC3000FFDF99F8180009F8004099F81800162815 +:10FC40007FF48EAE8AE699F817000028F1D1EFE72D +:10FC500093F812A00122BAF10C0FCDD103E0002AD3 +:10FC600008BFBA4630D03E460F4806EB860200EB8E +:10FC70008208062188F8101099F81800162836D046 +:10FC800099F8180099F81710401C884200D1FFDF3E +:10FC900099F8180009F8006099F8180016280CBFA8 +:10FCA000002099F8180007E0D80B0020C00C0020B5 +:10FCB0007A000020FFFF3F0018BF401C89F81800A1 +:10FCC00098F81260B245CFD10220FE4E287406F19A +:10FCD000E80090F82910B9420ED185F812A080F8FA +:10FCE0002940012180F82A100120BDE8F09F99F8F1 +:10FCF00017000028CCD1CAE70C2F0BD0BBF10C0F9A +:10FD000008BFFFDF0BEB8B0006EB8000847485F8E7 +:10FD100012A0E9E7BBF10C0F08BFFFDF0BEB8B0074 +:10FD200006EB800084740C20A874DDE730B50D4626 +:10FD3000E54A44190021101A71EB010038BFFFDFBA +:10FD4000E2488542C8BFFFDFE1488542B8BFFFDF18 +:10FD5000E0488442A8BFE04804DA002CAABF20464D +:10FD6000DC4830BD201830BD401E70B5C0B200EB7D +:10FD70008001D44800EB8104607B062810D2DFE8C4 +:10FD800000F0030D0B090705002033E0B4200BE061 +:10FD9000732009E0322007E00A2005E0062003E096 +:10FDA000FFDF617B002029B3022108446168084419 +:10FDB00020F07F40F9F759F894F90C50C24A4419E1 +:10FDC0000021101A71EB010038BFFFDFBF488542E8 +:10FDD000C8BFFFDFBE488542B8BFFFDFBD488442D1 +:10FDE000A8BFBD4804DA002CAABF2046B94870BDA0 +:10FDF000201870BD0421D8E72DE9F04F0646B7481A +:10FE000085B00068C005C00D11D0103840B2002880 +:10FE1000B8BF00F00F0000F1E020B4BF90F8140D5F +:10FE200090F80004400908BF4FF0010A01D04FF0DC +:10FE3000000A3078002817BF01283079002005B06B +:10FE400018BFBDE8F08F062810D2DFE800F0030DE0 +:10FE50000B090705002015E0B4200BE0732009E032 +:10FE6000322007E00A2005E0062003E0FFDF3179B9 +:10FE7000002039B15FF0020100EB0109BAF1000F77 +:10FE800006D101E00421F7E79549002081F8270019 +:10FE90006C4602AA2146B068F8F7F4FF9DF90820E5 +:10FEA000F068211D10440122C01C1F28B8BF019218 +:10FEB00008DB03AAF8F7E6FF9DF80C0010B10198E3 +:10FEC000401C0190DDE900100844401D20F07F40F7 +:10FED0000190A1EB090020F07F40009070798DF82F +:10FEE0000A0000980390F8F72EFF0099019B091A69 +:10FEF000181A7C4A21F07F4120F07F40B1F5800F35 +:10FF000010D282420ED3764890F82950009CAB461E +:10FF1000191B21F07F486FF07F41091BA0F1E80712 +:10FF2000049101E0002080E00C2D26D005EB850037 +:10FF300007EB80026FF07F435068011BB1F5800F23 +:10FF400010D3A4EB000CBCF5800F0BD38B4203D273 +:10FF500004990844411C05E063450DD2181A204459 +:10FF6000401C4142002908DA5D48AB46957C90F878 +:10FF700027000028D8D04CE0FFDF5D4525D00BEBF3 +:10FF80008B0007EB80036FF07F429968081BB0F588 +:10FF9000800F12D3A4EB010CBCF5800F0DD382426D +:10FFA00003D204980844401C07E0624528BFFFDFE5 +:10FFB0000BD2521A1019401C4042002805DD9DF852 +:10FFC0000A009A7B904228BF0C460C2D1CBF9DF85E +:10FFD0000A10434A14D000BF05EB850007EB8000F0 +:10FFE00043681B1B23F07F43434509D2837B99421F +:10FFF00028BF8468857C92F8270050B90C2DEBD17E +:020000040001F9 +:100000000098A04205D004EB080020F07F40009447 +:10001000019000990398814206D001EB090020F07D +:100020007F40F8F722FFB06001202D4991F827109A +:10003000002904BF05B0BDE8F08FBAF1000F3FF40E +:1000400023AF05B0BDE8F08F2DE9F04F814687B0B2 +:100050000C4625480AF044F8244901274FF00008CF +:1000600001EB090500287DD0A1F5887898F81400E7 +:10007000002818BFFFDF2078012800F0238200BF8E +:1000800088F810902078022808BFFFDF184E2079EA +:1000900006F10C023072607970723146A068F8F790 +:1000A000F1FE96F90C000F2804DD1F38307330681C +:1000B000401C306096F90C00E168351D0844C01CF6 +:1000C0001F2817E0D80B0020FF7F841E0020A10707 +:1000D00000E05EF80080841E00807BE104ED00E01B +:1000E000C00C0020FFFF3F00EC0C0020B40C0020EF +:1000F000A40B0020B8BF2F6009DB6A462946F8F739 +:10010000C1FE9DF8000010B12868401C28602078CE +:10011000B07288F81470F64D95F8CD0195F8CC11B1 +:10012000884204BF07B0BDE8F08FF24890F829403C +:100130000C2C00F0CF81F8F706FEEF4904EB8402A7 +:1001400001EB82010A7C042A19BF0A7C032A07B04A +:10015000BDE8F08FE94B4A688968121A22F07F42A5 +:10016000081A00E01BE020F07F40062A3CBF07B0E1 +:10017000BDE8F08FB2F5800F24BF07B0BDE8F08F67 +:1001800083423CBF07B0BDE8F08F95F8CD0195F8EC +:10019000CC11884240F0A78107B0BDE8F08FD44E63 +:1001A00096F8CD01162855D096F8CD0196F8CC11C9 +:1001B000401C884200D1FFDF207801284FD0CC4876 +:1001C00090F8CD1101EB810100EB810080F81090D7 +:1001D000207802284BD0C64890F8CD1101EB810160 +:1001E00000EB8105207928726079687205F10C02B4 +:1001F0002946A068F8F746FE95F90C000F2804DDA3 +:100200001F3828732868401C286095F90C00E168A5 +:100210002E1D0844C01C1F28B8BF376009DB6A4682 +:100220003146F8F72FFE9DF8000010B13068401CF1 +:1002300030602078A872AE4991F8CD0116280EBF23 +:10024000002091F8CD01401C81F8CD01AC4809F0A7 +:100250005DFF60E796F8CC010028ADD1ABE715F85B +:10026000010C002818BFFFDF05F8017CA7E7A548AF +:100270000068C005C00D0FD0103840B20028B8BFCC +:1002800000F00F0000F1E020ACBF90F8000490F8FF +:10029000140D400908BFFFDF954890F8CD1101AA61 +:1002A00001EB810100EB8106E068CDF800808DF85C +:1002B00004806946F8F7E6FD9DF904000F28CCBFDD +:1002C000012000200099351D084401900220B072E1 +:1002D0002079307260797072A068C01C1F28B8BF86 +:1002E0002F6009DB6A462946F8F7CCFD9DF800002F +:1002F00010B12868401C2860307A062810D2DFE848 +:1003000000F0030D0B09070500200BE0B42009E005 +:10031000732007E0322005E00A2003E0062001E018 +:10032000FFDF0020217900290CBF042102210844AD +:1003300002907168401D08440199009001440298A0 +:10034000081A05906B4C002084F82700F8F7FBFC96 +:10035000804630600198404420F07F40F06094F87F +:1003600029000C287ED0204690F8291001EB81024C +:10037000A0F1E80101EB82025468009A274622446A +:1003800022F07F42039296F809B090F82950121B90 +:1003900022F07F4A6FF07F42121BA94604920C2D77 +:1003A00027D0554805EB850100EB81036FF07F42B4 +:1003B0005868011BB1F5800F24BFA4EB000CBCF5FD +:1003C000800F0BD38A4203D204990844411C05E0F4 +:1003D00062450DD2111A0819401C4142002908DA61 +:1003E0004448A9469D7C90F827000028D7D04DE0CE +:1003F000FFDF4D4525D0404809EB890100EB810125 +:100400006FF07F438868021B8146B2F5800F24BFDE +:10041000A4EB000CBCF5800F0DD3934203D2049AD9 +:100420001044421C07E0634528BFFFDF09D21A1AB7 +:100430001019401C4242002A03DD887B834528BFF7 +:100440004C460C2D1CBF2B4BA3F1E80116D000BF6E +:1004500005EB850001EB80025068001B20F07F4017 +:10046000504500E026E009D2907B834528BF946880 +:10047000957C93F8270048B90C2DE9D1A74205D007 +:1004800004EB0A0020F07F4027460390039AA7EB75 +:10049000080121F07F41A2EB0802059822F07F427B +:1004A000B1F5800F06D2904204D30298384420F070 +:1004B0007F4030600F4890F8270000287FF442AF5B +:1004C000B9E600BF15F8010C002818BFFFDF05F8DA +:1004D000017CD5E595F8CD0195F8CC11884204BF93 +:1004E00007B0BDE8F08F07B0BDE8F04FF8F798BC53 +:1004F000D4090020C00C0020D80B0020FFFF3F00D3 +:10050000EC0C002004ED00E00020F8F767BB0120B0 +:10051000F8F764BBFD48007870472DE9F0410546C7 +:1005200002282DD0FA4C94F829000C2808BFFFDFD0 +:10053000002784F82670012684F82B6094F829108F +:100540000320DFF8D08301EB810108EB81010874FF +:10055000F8F76DFCD5B1012D39D0032D1CBFFFDF9D +:10056000BDE8F08194F8290094F82910401CC0B22D +:1005700001EB810158F82120BDE8F0410521104729 +:10058000E2480078BDE8F041F9F71AB8207F00286A +:1005900018BFFFDF84F8256000202760F8F72EFBE6 +:1005A000A168B1F1FF3F04D0012300221846F8F7FB +:1005B00069FB94F8290094F82910401CC0B201EBA3 +:1005C000810158F82120BDE8F041012110470120A8 +:1005D000F8F714FB94F8250000281CBFA068B0F1C0 +:1005E000FF3F0DD094F8290094F82910401CC0B2A8 +:1005F00001EB810158F82120BDE8F04106211047A8 +:10060000207F012815D002281FD0032833D00428CA +:100610001CBFFFDFBDE8F08194F820106068012363 +:10062000411A00221846F8F72DFB94F82800B8BBB1 +:1006300037E094F8240028B184F82470F8F7FEFB22 +:1006400084F823602777BDE8F08194F8280018B972 +:10065000F8F776FC84F8286094F8290094F82910BB +:10066000401CC0B201EB810158F8212000219047C5 +:100670002777BDE8F081217B60680123411A0022C1 +:100680001846F8F7FFFA94F8240028B184F824708B +:10069000F8F7D4FB84F8236002202077BDE8F081CE +:1006A00003E0F8F74DFC84F8286094F8290094F8EA +:1006B0002910401CC0B201EB810158F82120002113 +:1006C00090472677BDE8F08110B5914C94F8290049 +:1006D0000C2808BFFFDF94F8290094F82910401C6B +:1006E000C0B28C4A01EB810152F82120BDE81040D4 +:1006F000042110472DE9F05FF8F725FB844C814673 +:100700004FF00C0B94F829000026A4F1E8084FF0F4 +:10071000010A0C282CD094F82910204601EB810105 +:1007200008EB8101097C042922D090F8291001EB03 +:10073000810108EB8101097C032908BFBDE8F09F16 +:10074000754922696069A2EB090222F07F42A0EBA1 +:10075000090020F07F40062A38BFBDE8F09FB2F5BF +:10076000800F28BFBDE8F09F814238BFBDE8F09FF1 +:10077000A068B0F1FF3F18BFFFDF84F8256094F850 +:100780002900664F0C2806D194F8210018B1F8789A +:100790007870B87838705E4890F829000C281ED020 +:1007A0005B4890F8291001EB810108EB8101097C7D +:1007B000042914D190F829B090F8291001EB810197 +:1007C00008EB810181F810A090F8291001EB81015C +:1007D00008EB8101897C80F8291080F82AA0504C10 +:1007E00094F8CD0194F8CC1104F2DF2588424ED064 +:1007F00094F8CC0100EB800004EB8000007C405DAD +:10080000012894F8CC0100EB800004EB800004D0B8 +:10081000007C405D022878D018E0807A01280DD055 +:1008200094F8CC11022001EB810104EB8101097CD9 +:10083000485594F8CC01162820D01BE094F8CC0140 +:1008400000EB800004EB8000007C465594F8CC015E +:1008500000EB800004EB800294F8CC0100EB8000F8 +:1008600004EB8000017C4846FEF7B7FF94F8CC010A +:10087000162803D094F8CC01401C00E0002084F836 +:10088000CC0194F8CD0194F8CC118842B0D1254C1C +:10089000207D70B1207C415D012966D0405D022839 +:1008A0006BD0207D28B1217C1E4A4846FEF795FF7B +:1008B0002675BBF10C0F06D00BEB8B0008EB80000C +:1008C000017C012961D0124C94F829000C2800F019 +:1008D000388194F82A00002800F0428184F82A60C8 +:1008E00094F8290000EB800008EB8003A4F53B702E +:1008F000D3E90112DB68C0F80433C0E9BF12607E9F +:1009000000280CBF042502250EE01CE07800002022 +:10091000C00C0020D80B0020FFFF3F007A00002011 +:10092000D4090020A40B002094F82900C34600EB52 +:10093000800108EB8100407B06284DD2DFE800F003 +:10094000404A4846444294F8CC0100EB800004EB56 +:100950008000807A012818BFFFDF94F8CC0100EBFB +:10096000800004EB8000867268E7A17A01291DBF30 +:10097000022141552675465593E7A07A012818BFF4 +:10098000FFDFA672207C46558BE707210174FE4CE1 +:10099000207E162810D0207EE17D401C884200D1A8 +:1009A000FFDF207E04F800B0207E16280EBF002056 +:1009B000207E401C207686E7E07D0028F1D1EFE71D +:1009C00000200BE0B42009E0732007E0322005E0AE +:1009D0000A2003E0062001E0FFDF00202073617E93 +:1009E000022918BF012911D121690144A1EB090293 +:1009F00022F07F42382A09D903206076A1F1320023 +:100A000020F07F4020613220207309E0322807D295 +:100A100094F8280058B9F8F793FA84F828A006E06B +:100A200094F8280018B1F8F7B4FA84F828607978B7 +:100A300084F8201038780622012818BF032806D130 +:100A400084F824A0207B814284BF081A821D94F878 +:100A50002230002B18BF921C94F82400002808BFF5 +:100A6000002B6AD0D4F810806069A8EB0908DFF881 +:100A70001CC328F07F48A0EB090020F07F404245CE +:100A800098BFB8F5800F41D284453FD3207B884280 +:100A900015D22369A1EB0002A3EB020222F07F42F0 +:100AA0001144294421F07F412261616000280CBF7C +:100AB00001200320207710F0FF0F36D114E00AD96F +:100AC000226900291044284420F07F4060600CBF58 +:100AD00002200420EEE7002B08BFFFDF2069284436 +:100AE00020F07F40606026770120F8F787F800BF8C +:100AF00094F82900012300EB80010BEB8100616871 +:100B000090F90C200020F8F7BDF829E084F8246063 +:100B100084F82260207B0028E0D021690844284422 +:100B200020F07F4060600220207720690123411976 +:100B300000221846F8F7A6F8DAE7207B0028ECD167 +:100B4000CCE70120F8F75AF80020F8F757F8F8F743 +:100B50003BF894F8280018B1F8F71BFA84F82860DD +:100B600094F8220028B1F8F769F984F8236084F832 +:100B7000226094F8210018B1F8787870B87838704D +:100B800094F8240030B184F823603878002808BF36 +:100B900084F824607C48017EC07D814203D07C487B +:100BA0004078F8F70DFD84F827A0BDE8F09F70B5F8 +:100BB000784C054682B094F829000C2808BFFFDF66 +:100BC00094F8290000EB8000734E06EB8000007C57 +:100BD000032818BFFFDFA068B0F1FF3F18BFFFDF99 +:100BE00094F82900002100EB800006EB800001AAA8 +:100BF00090F90C0000918DF8041028446946F8F72C +:100C000041F99DF904000F28CCBF01200020009974 +:100C100008446168084420F07F41A16094F82500F1 +:100C2000002804BF02B070BD012302B00022BDE85D +:100C300070401846F8F726B8584A0B1A02F1010C12 +:100C4000B3EB9C0F3CBF1846704710B5441AB4EB89 +:100C50009C0F3CBF184610BD9A4203D2101A08449C +:100C6000401C10BD94429EBFFFDF002010BD511AF2 +:100C70000844401C404210BD0123002201460220CE +:100C8000F8F700B80220F7F7B9BFF8F75CB8F0B58D +:100C9000404C054683B094F82B00002808BFFFDFC6 +:100CA000642D50D33E490020491B80414BD33D4821 +:100CB00090F8CD1190F8CC01814244D13A48007DA2 +:100CC000002840D194F82900334F00EB800007EB57 +:100CD0008006206801AA28446946F8F7D3F89DF9F0 +:100CE0000400002802DD0098401C0090B2680099C2 +:100CF00073685018C01A20F07F40B0F5800F22D2E0 +:100D0000B07C0C2809D000EB800007EB8000406825 +:100D1000801A20F07F40884215D3A068B0F1FF3FD1 +:100D200005D00120F7F76AFF4FF0FF30A060206880 +:100D300028442060B0680099084420F07F4060613A +:100D400003B00120F0BD03B00020F0BD2DE9F0415B +:100D50000646401EC5B2104805EB850100EB810434 +:100D6000207C002808BFFFDF0E4A92F8CC1192F8D1 +:100D7000CD01814221D000BF01EB810302EB83034F +:100D80001B7CB34220D011E0BC0B0020FFFF3F00D2 +:100D900078000020C00C0020D80B0020FF7F841EAC +:100DA000FF1FA107D4090020A40B002016290CBFA7 +:100DB0000021491CC9B28142DED13A48017D002997 +:100DC00062D0007CB0425FD10020BDE8F081217C80 +:100DD00005291FBF217C0629217C07292CD12774D6 +:100DE000C27D0023017E914218BF014624D000BF7E +:100DF00011F80280A84508BF012300D04BB1162A84 +:100E00000CBF4FF0000802F1010811F8088001F84A +:100E10000280162A0CBF0022521CD2B291F8188010 +:100E20009045E5D143B10A7E002A08BF81F818C079 +:100E300002D00A7E521E0A76617C21B36674C27D9E +:100E40000021037E934224D0835CAB4208BF012182 +:100E500000D029B1162A0CBF0023531CC35C835455 +:100E6000162A0CBF0022521CD2B2037E9342EBD151 +:100E700049B1027E0146002A08BF81F818C008D097 +:100E80000A7E521E0A7604E00127074800264FF02A +:100E9000160C217C012904BF617C002997D1012017 +:100EA000BDE8F081A40B0020BC0B0020F0B5734A14 +:100EB000D2F80032724D002401212E7856B9714EBD +:100EC0003460704F03263F1D3E606E4F04260C3782 +:100ED0003E602970C2F80042D1601160694C48340C +:100EE000D16425688542FBD35160D160C2F80032DD +:100EF000F0BD2DE9F041044680074FF000054FF0AA +:100F0000010604D560480560066024F00204E00490 +:100F10004FF0FF3705D55D484660C0F8087324F4EC +:100F20008054600003D55A48056024F08044E005F1 +:100F30000FD55248C0F80052C0F8087351490D60EF +:100F4000091D0D604F4A04210C321160066124F422 +:100F50008074A00409D54F484660C0F80052C0F81C +:100F600008734D48056024F40054C4F38030C4F382 +:100F7000C031884200D0FFDF14F4404F14D04748FE +:100F80004660C0F8087346488660C0F80052C0F852 +:100F9000087344490D600A1D16608660C0F8087326 +:100FA0000D60166024F4404420050AD53E48466092 +:100FB0008660C0F80873C0F848733C48056024F4A4 +:100FC000006409F0EDF93A48044200D0FFDFBDE8C3 +:100FD000F08170B5202500224FEA020320FA02F1C9 +:100FE000C90719D051B201F01F060124B4404E09BF +:100FF000B60006F1E026C6F88041C6F88042002916 +:1010000006DA01F00F0101F1E02181F8143D03E05F +:1010100001F1E02181F80034521CAA42DED370BDF8 +:1010200070B5174C0D466060FFF763FF6068FFF70F +:10103000D0FF2846F8F761F808F004FE00F0D5F874 +:1010400009F0AEF909F0FBF8F8F78CFABDE870404A +:1010500008F09ABE10B50A4C6068FFF74AFF606856 +:10106000FFF7B7FF09F09CF9F8F70CF90020606072 +:1010700010BD034840687047022070470080004060 +:101080008000002004850040FC1F004000C000409C +:1010900004E5014000D0004004D5004000E00040DD +:1010A00000F0004000F5004000B0004008B50040EE +:1010B000FEFF0FFC70B51F490A68BAB100231D4638 +:1010C00001244A68521C4A60092A00D34D600E79F7 +:1010D00004FA06F20E6816420AD072B60B68934301 +:1010E0000B6062B649680160002070BD052070BDCC +:1010F0005B1C092BE5D3FFDFF8E74FF0E0214FF44D +:101100008000C1F800027047EFF3108111F0010F69 +:1011100072B64FF0010202FA00F20648036842EA92 +:101120000302026000D162B6E7E7024800210160D5 +:1011300041607047880000200120810708607047E7 +:10114000012081074860704712480068C00700D03E +:10115000012070470F48001F0068C00700D0012021 +:1011600070470C4808300068C00700D00120704765 +:10117000084810300068704706490C310A68D203ED +:1011800006D5096801F00301814201D101207047B1 +:10119000002070470C040040C84911F8210F49781D +:1011A000884201D3401A02E0C1F121010844C0B2D3 +:1011B0007047C249233111F8210F4978884201D381 +:1011C000401A02E0C1F121010844C0B27047BB4996 +:1011D000463111F8210F4978884201D3401A02E0C4 +:1011E000C1F121010844C0B27047B54910B5802053 +:1011F00081F80004B1490020233101F8210F487023 +:10120000AE4901F8210F4870AC49463101F8210F71 +:101210004870AC4808F05CFFAA48401C08F058FF32 +:10122000F8F778F8BDE8104000F03DB9202070478D +:10123000B2E770B50C4605460026FFF7ADFF014644 +:101240009E48A14212D30022641EE4B20DD390F84E +:101250002210435C491CC9B205F8013B80F82210FA +:101260002129F1D180F82220EEE7012600F01BF9B8 +:10127000304670BD202070479BE770B50C46054690 +:101280000026FFF796FF01468C482330A14212D377 +:101290000022641EE4B20DD390F82210435C491C76 +:1012A000C9B205F8013B80F822102129F1D180F85C +:1012B0002220EEE7012600F0F6F8304670BD20212E +:1012C00001700020704710B50446FFF780FF2070C2 +:1012D000002010BD70B50C460546FFF778FF0146AB +:1012E00076484630A14213D30022641EE4B20DD3E7 +:1012F00090F82210435C491CC9B205F8013B80F804 +:1013000022102129F1D180F82220EEE7002401E00B +:1013100042F2070400F0C7F8204670BD70B50C46D5 +:101320000546212900D9FFDF67480068103840B220 +:1013300000F0A0F8C6B20D2000F09CF8C0B28642C2 +:1013400004D2FFDF02E000BFF8F734F82146284658 +:10135000FFF76FFF0028F7D070BD2DE9F047DFF8E9 +:101360006481564CA8F101080746233498F8000020 +:10137000DFF84891002604F1230A38B994F82210C6 +:1013800094F82100212200F084F890B14D4699F89C +:10139000221099F82100212200F07BF8B8B15546BF +:1013A0009AF822109AF82100212200F072F848B32E +:1013B00035E094F82100275494F82100401CC0B275 +:1013C00084F8210021282AD184F8216027E095F8AB +:1013D00021002F5495F82100401CC0B285F821004F +:1013E000212801D185F8216098F800004746B0B166 +:1013F00095F8221095F82100212200F04AF870B1EA +:101400003E700CE095F821002F5495F82100401C07 +:10141000C0B285F82100212801D185F8216094F817 +:10142000221094F82100212200F033F800281FD068 +:1014300099F8221099F82100212200F02AF80028BA +:1014400016D09AF822109AF82100212200F021F8F3 +:1014500000280DD0F7F784FF1A4808F041FEB0F5D8 +:10146000005F00D0FFDFBDE8F047164808F04EBE31 +:10147000BDE8F087002806DA00F00F0000F1E02058 +:1014800090F8140D03E000F1E02090F8000440090A +:101490007047401C884204D0904200D109B100201E +:1014A00070470120704710B5064808F019FE002863 +:1014B00003D1BDE81040F7F73EBF10BDF00C00208F +:1014C0000DE000E09100002004ED00E013490878F1 +:1014D0004A78401CC0B2904205D0114B01221A60DC +:1014E000BFF34F8F0870704770B54FF0E0250B4C7D +:1014F000F7F7E6FF20BF40BF20BF6078217861701A +:10150000D5F8001229B9D5F8041211B92178814211 +:10151000EED0F7F7D0FF002070BD00009300002050 +:10152000180502402DE9F041012528034FF0E02184 +:101530000026C1F880011E4CC4F800610C2000F0A8 +:101540002CF81C4801680268C94341F3001142F0BD +:1015500010020260C4F804532560491C00E020BF5B +:10156000D4F80021002AFAD019B9016821F010013D +:101570000160114807686560C4F80853C4F8006149 +:101580000C2000F00AF83846BDE8F08110B504469A +:10159000FFF7C8FF2060002010BD00F01F020121EE +:1015A00091404009800000F1E020C0F880127047AF +:1015B00000C0004010ED00E008C500402DE9F047F4 +:1015C000F84C0646FF21606800EB06121170217886 +:1015D000FF2916D04FF0080909EB011109EB061796 +:1015E0004158C059491E21F07F4100F0DDF918B182 +:1015F00094F80080454614E06168207801EB0611FC +:1016000008702670BDE8F087626809EB0510D159B3 +:10161000105800F0C9F930B96068A84600EB08100E +:101620000578FF2DF0D1606800EB061100EB081083 +:101630000D700670E6E7F0B5DA4B04460020012590 +:101640005A680C261B7A0BE005EB0017D75DA74202 +:1016500004D106EB0017D7598F4204D0401CC0B20A +:101660008342F1D8FF20F0BD70B5FFF70EFBCD4CE3 +:10167000014608252278606805EB0212805800F0C8 +:1016800093F9012808D92178606805EB01114058C9 +:10169000BDE87040FFF7F0BAFEF73CFFBDE87040D0 +:1016A000F7F78EBF2DE9F041BE4C2578FFF7EDFA34 +:1016B0000146FF2D6FD04FF00808626808EB051651 +:1016C000905900F071F90228606801D980595EE0F4 +:1016D00000EB051109782170022101EB0511425C34 +:1016E0005AB1521E4254815901F5000121F07F4147 +:1016F00081512846FFF762FF34E00423012203EB07 +:10170000051302EB051250F803C0875CBCF1000F13 +:1017100010D0BCF5806F10D9CCF3090250F806C088 +:101720000CEB423C2CF07F4C40F806C0C3589A1A90 +:10173000920A09E0FF2181540AE0825902EB4C32FF +:1017400022F07F428251002242542846FFF736FFA2 +:101750000C21606801EB05114158E06850F8272022 +:10176000384690472078FF2815D0FFF78EFA0146BB +:101770002278606808EB02124546805800F014F9A0 +:10178000012891D92178606805EB01114058BDE826 +:10179000F041FFF771BABDE8F081F0B51D4614467F +:1017A0000E460746FF2B00D3FFDFA00700D0FFDF68 +:1017B0007C48FF210022C7604460057206740170F6 +:1017C00042701046012204E002EB0013401CE15479 +:1017D000C0B2A842F8D3F0BD70B5724C0646657829 +:1017E000207C854200D3FFDFE06840F82560607808 +:1017F000401C6070284670BD2DE9FF5F1D468B467A +:101800000746FF24FFF741FADFF89891064699F85A +:101810000100B84200D8FFDF00214FF001084FF06F +:101820000C0A99F80820D9F804000EE008EB01131F +:10183000C35CFF2B27D0BB4205D10AEB011350F844 +:1018400003C0DC4521D0491CC9B28A42EED8FF2C26 +:101850001BD008EB04110AEB0412475440F802B005 +:101860000421029B0022012B01EB041111D04250F4 +:101870004FF4806808234FF0020C454519D9A9059B +:10188000890D08D008E00C46DDE7FF2004B0BDE874 +:10189000F09F4550ECE7414606EB413203EB041361 +:1018A00022F07F42C250691A0CEB0412890A81545B +:1018B0000BE005B9012506EB453103EB041321F0DC +:1018C0007F41C1500CEB0411425499F8005020465E +:1018D000FFF774FE99F80000A84201D0FFF7C4FE9C +:1018E0003846D3E770B50C460546FFF7CEF90646F5 +:1018F00021462846FFF79FFE0446FF2817D0294DB2 +:10190000082101EB041168684058314600F04CF89A +:1019100000F58050400B02216A6801EB0411515C14 +:1019200009B100EB8120002800D1012070BD00200A +:1019300070BD2DE9F0410F468046FFF77CFEFF2881 +:101940001BD0184E357871682A462C4605E0844233 +:1019500006D0254601EB05131C78FF2CF7D10CE0CF +:10196000FF2C0AD0A5420CD101EB02100078307098 +:10197000FF2804D0FFF778FE03E000200BE7FFF715 +:1019800081F939464046FFF7ADFFFF220123716818 +:1019900003EB0413CA5401EB041201EB0511127896 +:1019A0000A70F8E65C0D0020401A20F07F40B0F588 +:1019B000000F00D90020704770B50446A0F5000064 +:1019C0002C4EB0F1786F02D23444A4F500042A48BA +:1019D000844201D2012500E0002500F041F830B139 +:1019E000B4420BD32548006804E0284370BDB442DC +:1019F00004D32348844201D20120F6E70020F4E713 +:101A000010B50446A0F50000B0F1786F03D2194874 +:101A10000444A4F5000400F023F84FF0804130B1F5 +:101A20001648006804E08C4204D2012003E0144808 +:101A30008442F8D2002080F0010010BD10B520B122 +:101A4000FFF7DEFF08B1012010BD002010BD10B56A +:101A500020B1FFF7B1FF08B1012010BD002010BD7B +:101A6000084809490068884201D1012070470020D8 +:101A7000704700000000002000C001001C00002092 +:101A80000800002098000020BEBAFECA0548064A99 +:101A90000168914201D100210160044901200860E0 +:101AA0007047000098000020BEBAFECA40E5014021 +:101AB000404800210170417010218170704770B55D +:101AC000054616460C460220F5F789FC39490120E7 +:101AD00008703949F01E086038480560001F04602E +:101AE00070BD10B50220F5F77AFC3249012008706C +:101AF00033480021C0F80011C0F80411C0F80811E3 +:101B000030494FF40000086010BD2A480178C9B17F +:101B10002D4A4FF4000111602949D1F8003100220B +:101B2000002B1CBFD1F80431002B02D0D1F80811D2 +:101B300011B14270102103E001214170234909686D +:101B4000817002700020F5F74ABC1A48017800291C +:101B500004BF407870471A48D0F80011002904BF2C +:101B600002207047D0F8001100291CBFD0F80411E2 +:101B7000002905D0D0F80801002804BF01207047D3 +:101B8000002070470B480178002904BF8078704717 +:101B90000B48D0F8001100291CBFD0F8041100290F +:101BA00002D0D0F8080108B110207047074800683B +:101BB000C0B270479C00002010F5004008F50040BE +:101BC00000F0004004F5014008F5014000F4004039 +:101BD0003148002101704170704770B506461446C7 +:101BE0000D460120F5F7FBFB2B49012008702B481F +:101BF0000660001D0460001D056070BD2DE9F04108 +:101C000004460120F5F7EBFB234901200870244925 +:101C10000C60244D0026C5F8046123494FF040773D +:101C20000F60A1F1040844B1012C18BFFFDFC5F813 +:101C30000062C8F80070BDE8F081C5F800024FF0FE +:101C40008070C8F80000BDE8F0811348017879B1D0 +:101C5000154A4FF0407111601249D1F8042100215A +:101C6000002A08BF417002D0104A12684270017009 +:101C70000020F5F7B4BB08480178002904BF40787C +:101C800070470848D0F80401002808BF704707488B +:101C90000068C0B2704700009F00002008F50040B7 +:101CA00004F5004000F0004008F5014000F4004059 +:101CB00070B5FE4C002501266570257025626572A1 +:101CC000A572E67284F82950256304F13C00A563EF +:101CD00008F0FEF9002818BFFFDF84F82450F4480C +:101CE00009F062FAF3480660657770BD30B4EF49D9 +:101CF0000268DFF8C8C34A6142688A61007A0877DF +:101D00000A7DED4BACF1040401204AB10A7E00FAD1 +:101D100002F21A608D7D002D0CBF2260CCF80020ED +:101D20004A7D002A04BF30BC70474A7E904018604C +:101D3000C97D00290CBF2060CCF8000030BC704782 +:101D4000DF4900B50A1D40B101281CBFFFDF00BDFF +:101D5000DC480860DC48106000BDDC480860DC48F6 +:101D6000F9E7F0B502264FF0E02701240025C7F877 +:101D70008061D8490D600C60D7490A6822F077026B +:101D800042F0880242F000420A60CD490A1DD0B1FB +:101D9000012818BFFFDF1AD0D04940F25B6008600D +:101DA000091F40F203100860081F0460CC4903209B +:101DB0000860CC4996200860BC4C94F9240010F0CF +:101DC000030F09D033E0C1480860C14802E0BD48B4 +:101DD0000860BD481060DFE780100A300C2826D26A +:101DE000DFE800F021252525251D1915110D0A060E +:101DF000BD49042008601BE0BB48056018E0BA49F3 +:101E0000FC20086014E0B849F820086010E0B649EA +:101E1000F42008600CE0B449F020086008E0B24902 +:101E2000EC20086004E0B049D820086000E0FFDF43 +:101E3000607F002814BF4FF4C020AC48AC49086054 +:101E4000AD49AC480860091FAC480860C7F880621B +:101E5000AB491020C1F80403F0BD944A0368C2F8EE +:101E600002308088D08011727047904890F8290025 +:101E700070478E4A517010707047F0B50D46044699 +:101E800004EB4501908808841078D2F801100127EE +:101E900040EA012044F8250005F1080007FA00F6A1 +:101EA000002B04BF206BB04304D0012B18BFFFDF11 +:101EB000206B304307FA05F108432063F0BD30B5CD +:101EC0000D460446082988BFFFDF0022002D11D9E6 +:101ED00054F82210900000F1804000F58050C0F8C6 +:101EE000001604EB4201098CC0F82016501CC2B247 +:101EF0009542EDD8206B8349086030BD10B504468B +:101F000010F0030F2BD1A0100A300C2827D2DFE8E5 +:101F100000F022262626261E1A16120E0A067249DE +:101F2000042008601CE070490020086018E06E4939 +:101F3000FC20086014E06C49F820086010E06A4951 +:101F4000F42008600CE06849F020086008E0664969 +:101F5000EC20086004E06449D820086000E0FFDF5E +:101F6000524880F8244010BD504890F83400704723 +:101F7000654AC178116000686449000208607047D2 +:101F8000252808BF02210ED0262808BF1A210AD012 +:101F9000272808BF502106D00A2894BF0422062211 +:101FA00002EB4001C9B25A4A11605A4908607047B1 +:101FB0003E49086270473D498A7A012A49D0022A7F +:101FC00018BF70474B7D002B08BF7047DFF848C132 +:101FD000012A42D0CA7D4B7E002A18BF01227D30E3 +:101FE000CCF80000DFF834C10020CCF84C01180216 +:101FF00082F0010240EA025040F00312087F8300A1 +:1020000003F1804303F5C043C3F81025444A02EBB3 +:102010008002887EC30003F1804303F5F833C3F8E0 +:102020001425DFF800C1C3F810C5C97ECB0003F149 +:10203000804303F5F833C3F81425304AC3F810255C +:10204000012202FA00F002FA01F108433649086061 +:1020500070470B7D002BB9D170478A7D0B7E002A1B +:1020600018BF01227E30BBE72DE9F84F00280CBFD6 +:10207000012002200D4C224D0322A072C5F800223F +:10208000627F002A14BF4FF4C022184A264F3A60DC +:102090004FF00108002976D0012973D002291CBF16 +:1020A000FFDFBDE8F88F206A00283FE0700D0020B8 +:1020B000840D0020A0050040180500500C050050BC +:1020C00014150040050103001F0003020601020071 +:1020D00025000302FC1F00403C170040381500405B +:1020E00010150040441500400C1500400000040489 +:1020F00008F5014040800040A4F501401011004067 +:102100000010004040160040241500401C150040FF +:1021100008150040541500404C85004000800040E8 +:10212000006000404C81004004F5014008BFFFDF23 +:10213000216A206B0844FB490860FC49FA480860A2 +:10214000A17AFB4801290EBF0560FA490160A06B26 +:1021500040F40020A063D5F800924FF0100AC5F8B3 +:1021600008A30026C5F80062F3484FF4802BC0F89E +:1021700000B0FF208DF80000C5F81061C5F8108090 +:102180003DE000E01CE0012813D0C5F804800228DF +:1021900018BFBDE8F88F607D002808BFBDE8F88F44 +:1021A000E648C0F84C80E6480068BDE8F84F0A30C1 +:1021B00001E7C5F80080207D0028F1D1BDE8F88F47 +:1021C000E0490128896B07D0022818BFFFDF09D03A +:1021D000BDE8F84F0A20EEE641F48010A0634FF40A +:1021E000801004E041F40010A0634FF40010386048 +:1021F000EEE700BF9DF80000401E8DF800009DF83E +:10220000000018B1D5F810010028F3D09DF80000A7 +:10221000002808BFFFDFC5F80C61C5F81061C5F8DC +:102220000461C5F81461C5F81861C5F82861C6488D +:1022300000680090C5F80092C7F800B0C5F804A384 +:102240004FF400203860216A206BBDE8F84F084445 +:102250000A30B0E62DE9F847BC4CD4F8000220F073 +:102260000309D4F804034FF0100AC0F30018C4F8AF +:1022700008A30026C4F80062B24D687F002814BF8E +:102280004FF4C020B248AC490860A87A0127012861 +:1022900002D0022803D014E0287D10B911E0687D37 +:1022A00078B1A87EEA7E07FA00F007FA02F210433E +:1022B0000860287F800000F1804000F5C040C0F831 +:1022C0001065FF208DF80000C4F81061276104E05C +:1022D0009DF80000401E8DF800009DF8000018B128 +:1022E000D4F810010028F3D09DF80000002808BFA2 +:1022F000FFDFC4F81061C4F828616E72AE72EF722D +:10230000C4F80092B8F1000F18BFC4F804A3BDE8E8 +:10231000F88700688F4920F07F40086070474FF0D1 +:10232000E0200221C0F88011C0F8801270474FF001 +:10233000E0210220C1F8000170478749087070470A +:1023400010B5864807F0CCFE002818BFFFDF10BD8F +:10235000824807F0DBBE82490860704730B5794C8F +:102360000546206BA84228BFFFDF012020732561AE +:10237000607F40B1A81C20617448D0F8001241F081 +:102380004001C0F800126D490020C1F844017549B0 +:1023900020690860A06B744940F48000A0634FF48A +:1023A0008000086030BD674802210173CA210161C5 +:1023B000417F41B1CC2101616449D1F8002242F052 +:1023C0004002C1F800225D4A0021C2F844110269AE +:1023D000016B1144634A1160816B41F48001816398 +:1023E00061494FF4800008607047564901204877E2 +:1023F0005E49022008605F495D480860091F5E4829 +:10240000086070474F490020487770474A494FF4A9 +:10241000800008604B48816B21F4800181630021BA +:1024200001737047454801214160C1600021C0F837 +:1024300044114C480160434801637047414800B56E +:10244000407F002818BFFFDF4020484908603F4810 +:10245000D0F8001241F04001C0F8001200BD394828 +:1024600000B5407F002818BFFFDF3848D0F80012C1 +:1024700021F04001C0F800123C490020086000BD76 +:102480003248D0F8001221F01001C0F800120121EA +:10249000816170472D480021C0F81C11D0F800124E +:1024A00041F01001C0F800127047284981B0D1F8FE +:1024B0001C21012A1EBF002001B070472F4A12685C +:1024C00002F07F02524202700020C1F81C012C4829 +:1024D00000680090012001B0704730B50C0005463F +:1024E00008BFFFDF14F0010F1CBF012CFFDF002D20 +:1024F0000CBF01200220134901284872CC721349F5 +:1025000004BFD1F8000240F0040007D0022807BF42 +:10251000D1F8000240F00800FFDF30BDC1F8000232 +:1025200030BD00004885004048810040A8F50140CA +:10253000ACF501400410004008F501400080004067 +:102540004C850040700D0020181100400010004024 +:10255000000004043C150040A1000020AC0D002048 +:10256000041500404485004004F50140601500401A +:10257000448000409CF5014028110040481500406F +:102580001C11004070B5EB4C0022E17A11F0020FF3 +:1025900018BF10F0040F16D111F0100F1CBF94F8E3 +:1025A0003530002B02D094F8363063B111F0080FAB +:1025B0001CBF94F82830002B05D111F0040F03D074 +:1025C00094F8291001B90122657ADB4900234FF004 +:1025D000010C35B100F00200104314D0BDE870408A +:1025E00038E6607F002814BF4FF4C020D348D44A97 +:1025F0001060D1F8000220F00300C1F80002A372BD +:1026000084F80BC070BD012D14D0022D18BFFFDF60 +:102610001CD0A07A01280CBFCA48CB484FF47A716D +:1026200000F2E730B0FBF1F0216BBDE87040081A12 +:102630008C30C0E4D1F8000220F00400C1F80002A0 +:10264000637284F80BC084F80AC0E2E7D1F8000294 +:1026500020F00800C1F80002637284F80BC0022069 +:10266000A072D6E72DE9F84FB84FD7F84C21B14CFE +:10267000B3494FF00108A07A0026CAB1012802D060 +:10268000022803D014E0227D12B911E0627D7AB1F4 +:10269000A27EE37E08FA02F208FA03F31A430A6004 +:1026A000227F920002F1804202F5C042C2F810651A +:1026B000A26B0A60A663217B19B1D7F844110129E6 +:1026C00000D000219C4DD5F81021012A0CBF4022DA +:1026D0000022012805BFD5F80C31012B002320234F +:1026E0001A43012805BFD5F80431012B002310231C +:1026F0001343974A022804BFD2F800C0BCF1010F6F +:1027000007D1D5F80CC1BCF1010F08BF4FF0080C80 +:1027100001D04FF0000C4CEA0303022804BF1268FA +:10272000002A05D1D5F80C21012A08BF042200D0C7 +:1027300000221A43022803D1002918BF022100D128 +:1027400000211143022804BFD5F80401012805D156 +:10275000D7F84401012818BF012000D1002040EA29 +:1027600001097C48016811F0FF0F03D0D5F814115E +:10277000012900D0002184F83410006810F0FF0F08 +:1027800003D0D5F81801012800D0002084F83500C6 +:102790007148006818B1FFF7D8F9012800D000206F +:1027A00084F83600C5F80C61C5F81061C5F80461FD +:1027B000C5F81461C5F81861C5F828616748006854 +:1027C0000090C7F84461664800684D46DFF8949170 +:1027D0000090D9F80000E062617F00291CBF801ED4 +:1027E000E062614800682063A07ADFF880A10228D7 +:1027F0000CD1607850B1DAF80010097808402178DF +:1028000031EA000008BF84F8288001D084F82860ED +:10281000DFF85C8115F0010F16D098F80010554ACA +:102820004908E06A52F821108847012198F80020F1 +:10283000514B5208206B53F82220904798F8000023 +:1028400010F0010F0BD01FE015F0200F18BF022170 +:10285000ECD115F0020F18BF0021E7D1EEE7DAF84E +:102860000000062200F10901A01C08F0B7FA40B9E7 +:10287000207ADAF800100978B0EBD11F08BF0120E8 +:1028800000D0002084F829002846FFF77BFE15F0D1 +:10289000020F05D0394898F8001050F82100804701 +:1028A00015F00C0F07D0364898F8001050F821109A +:1028B000C5F3C000884715F0200F05D0314898F8BF +:1028C000001050F82100804798F80000022805D138 +:1028D00005F06E00402806D101F00EF998F80000CE +:1028E000042828BFFFDFA07A022818BFBDE8F88FB0 +:1028F000207B002808BFBDE8F88FC7F84461022894 +:1029000014D0012818BFFFDF216B2069884298BFCF +:10291000FFDF2069C9F80000A06B1B4940F480006C +:10292000A0634FF480000860BDE8F88F2169206B38 +:102930000844EFE7700D0020001000400000040480 +:1029400008F50140F0FE0100B0F8010000800040F1 +:10295000001400404016004060150040181100406F +:1029600044810040448500404085004004150040FB +:10297000A1000020E8B40100F0B40100F8B40100A7 +:1029800008B5010018B5010004F5014010B54A482A +:1029900006F0C5FB0021484806F0F6FB0121464839 +:1029A00006F0C0FB4549002081F822004FF6FF7079 +:1029B000888443490880488010BD10B53E4806F021 +:1029C000AEFB00213C4806F0DFFB01213A4806F04F +:1029D000A9FB3A49002081F822004FF6FF70888455 +:1029E00037490880488010BD704734498A8C82423C +:1029F00018BF7047002081F822004FF6FF708884CE +:102A000070472D49016070472D49088070472B4958 +:102A10008A8CA2F57F43FF3B03D00021016008466A +:102A2000704791F822202549012A1ABF0160012030 +:102A300000207047214901F1220091F82220012A4B +:102A400004BF00207047012202701D48008888845E +:102A5000104670471A49488070471849184B8A8CAD +:102A60005B889A4206D191F82220002A1EBF01609D +:102A700001207047002070471048114A818C52880D +:102A8000914209D14FF6FF71818410F8221F19B1CC +:102A90000021017001207047002070470748084A54 +:102AA000818C5288914205D190F8220000281CBFE9 +:102AB0000020704701207047D60D0020B00D002087 +:102AC000A200002070B5FF4E044696F88400002551 +:102AD000012807D096F8660001281CBF002070BDB1 +:102AE000E1B90EE0D1B9657014202070D6F88500E8 +:102AF000C4F80200D6F88900C4F8060086F88450AD +:102B00000CE06570132020701C2206F16801A01CE7 +:102B100008F090F90120A07186F86650012070BD80 +:102B2000E84890F86610002914BFB0F86A004FF624 +:102B3000FF70704770B5E4480178002918BF0C2673 +:102B400001D0304670BDDF4C0026354684F8546015 +:102B500084F8556084F8566084F8576084F85860AB +:102B600084F8596084F84D6084F82D6084F86460BE +:102B70007F21817094F85A0028B1FFF770FCFEF7AE +:102B8000C4FF84F85A5084F86650D04806F074F9AF +:102B9000CF4806F071F9D4E770B5CB4A002515701F +:102BA000C84CC4E91701107800281CBFFFDF70BDB6 +:102BB00084F8545084F8555084F8565084F857508F +:102BC00084F8585084F8595084F84D5084F82D50AA +:102BD00084F864507F20907094F85A0028B1FFF771 +:102BE0003EFCFEF792FF84F85A5084F86650B748CE +:102BF00006F042F9BDE87040B54806F03DB9B1486D +:102C000090F854007047AF4900B591F84F0091F823 +:102C10004E10C0F38002C0F340031A4400F00100DC +:102C20001044052910D2DFE801F00B070B0309005F +:102C3000A84931F8100000BDA74800BDA74900E031 +:102C4000A74931F8100000BDFFDF002000BD9D48FE +:102C500040F27121B0F8500048437047994890F80D +:102C60006500002818BF0120704770B5954C437B64 +:102C7000002584F84F30037984F84E30012B0EBFC5 +:102C8000A4F85050B0F800C0A4F850C090F80EC09E +:102C900084F865C021701168C4F801109188A4F807 +:102CA000051081796173D0F80710C4F80710B0F8E7 +:102CB0000B00A4F80B0094F84D000126002818BF63 +:102CC00084F8556094F82D00002818BF84F85660E9 +:102CD000052B2CD2DFE803F0030821260800002191 +:102CE0007A4806F0CCF823E00121784806F0C7F8CE +:102CF000E11D764806F0F4F8607B20B1012818BF8A +:102D0000FFDF05D014E00021704806F0FDF80FE069 +:102D100001216E4806F0F8F80AE006216B4806F03B +:102D2000AEF805E00221694806F0A9F800E0FFDFEF +:102D300084F8575084F85850611C644806F0C2F873 +:102D40002178624806F0D3F80421614806F097F82C +:102D5000611C5F4806F0B6F821785D4806F0C7F8B8 +:102D600084F85460002070BD564A012382F8583020 +:102D700092F866C0BCF1000F1CBF3A20704710B437 +:102D800014784FF0000C844218BF82F858C009D163 +:102D900082F857C00868C2F801008888A2F80500C8 +:102DA00082F8573010BC0020704770B5454C05467E +:102DB000002084F856002A4604F10E0008F03AF884 +:102DC00084F82D50012084F8560070BD10B53D4C9C +:102DD000002284F8552084F84D00024604F12E00AC +:102DE00008F028F8012084F8550010BD354981F815 +:102DF0006400704770B5344E3078A0BB314C94F805 +:102E0000540080B3FFF79CFA002584F8525084F8F0 +:102E1000535075702846FFF790FA0020FEF7A1FF87 +:102E20003048FFF7A5F83048FFF773FAFFF7BBFA11 +:102E300094F84F0010F0010F04D094F8521011F0E4 +:102E4000010F13D010F0020F04D094F8521011F0BB +:102E5000020F18D010F0040F2CD094F8520010F08C +:102E6000040F1BD026E0FFE70C2070BD2520FFF7E4 +:102E700087F80020FEF764FF94F8520040F001004C +:102E800084F8520016E02620FFF77AF80020FEF7BB +:102E900057FF94F8520040F0020009E02720FFF7A6 +:102EA0006FF80020FEF74CFF94F8520040F0040049 +:102EB00084F85200FFF73BFA01210020FFF7D4F815 +:102EC0000F2113E0F80D0020A8000020880E00203C +:102ED000B00E002038B501009189130040B5010003 +:102EE00030B501002BB5010028B501000520FEF723 +:102EF000C0FF2178601CFEF7B0FF94F84E00012857 +:102F00001EBF042894F85500002808D094F84D20DE +:102F100004F12E01FE4806F012F884F8555094F89A +:102F2000560040B194F82D2004F10E01F94806F046 +:102F300032F884F85650206E017819B110F8041B4D +:102F4000FEF7BDFFE06D017831B1F34A401CFEF79A +:102F5000B6FD012084F85A00FFF7FAF9002070BD91 +:102F6000EE494860704770B5ED4C05003BD02046F7 +:102F700094F84F1090F8520011F0010F02D010F0A9 +:102F8000010F0CD011F0020F02D010F0020F11D07F +:102F900011F0040F27D010F0040F18D023E02520E3 +:102FA000FEF7EEFF0020FEF7CBFE94F8520040F053 +:102FB000010009E02620FEF7E3FF0020FEF7C0FE37 +:102FC00094F8520040F0020084F852000BE02720F1 +:102FD000FEF7D6FF0020FEF7B3FE94F8520040F053 +:102FE000040084F8520094F8530040B194F84E0065 +:102FF000012808BFFFDFBDE8704000F054BA1DB1E2 +:1030000002210020FFF730F894F85700002558B14E +:10301000611CBF4805F056FF611CBE4805F052FF19 +:1030200084F8575084F85850B948FFF794F994F849 +:103030004E00052809D2DFE800F00303030903006E +:1030400001210846FFF749FA00E0FFDF94F84F003E +:1030500094F8521030EA01014FF0010002D0AF495C +:10306000087070BD94F84E10012914BF84F8530005 +:1030700084F85250F3E710B5FFF762F9A7480078DB +:1030800040B9A74890F8540020B10020FFF76BFF2B +:10309000002010BDFFF7C6F9FFF7B8F9FFF7DAF81F +:1030A000FFF73DF9FFF754F90C2010BD9B490120B3 +:1030B000487070479A4981F85900704770B50025EB +:1030C00002F07BFC68B14FF49670FEF771FF934EEF +:1030D0003078012809D0022801D003282ED0FFDF44 +:1030E00070BDBDE8704000F0DEB98D4C94F84E0024 +:1030F000032823D094F85A0018B1FEF7F2FCFFF72A +:103100009DF98848FFF727F994F84E00012818BF69 +:1031100004280AD094F86500012814BF032810255C +:1031200045F00E010020FFF7D8F994F8640001285B +:1031300008BFFFF7AFF90220307070BDBDE87040E6 +:10314000012010E770B5764C744D94F864000128A6 +:1031500020D000BF94F85A0018B1FFF780F9FEF7AD +:10316000D4FC02F02AFCF8B12878022818BFFFDF4F +:1031700094F84E00012804BF4FF41970FEF718FFB1 +:103180000120FFF7F0FE287800281EBF28780128CC +:10319000FFDF70BD6448FFF788F9002804BF7F2077 +:1031A000A870FFF76DF9D5E7BDE8704000F07BB976 +:1031B0002DE9F05F82460027FEF7D6FE574D814687 +:1031C000B8462878022818BFFFDF554C4FF07F0B18 +:1031D00094F86400012825D0524805F06FFE064699 +:1031E000BAF1000F6FD04F4805F065FF00286AD094 +:1031F000FEF73BFE002866D094F85A00002818BF5E +:103200004FF028081ED000BFA8F1010000F0FF0811 +:10321000FEF79BFC02280FD0012808BF4FF00108E1 +:1032200010D00DE04048FFF740F9002808BF85F8AE +:1032300002B0FFF725F9CFE7B8F1000FE4D1FFDFC7 +:103240004FF0000837484FF0010A062E3BD2DFE866 +:1032500006F083838303833B94F84E10012918BF43 +:10326000042979D059EA080105D194F8651000299C +:1032700018BF022970D194F86410012904BF94F892 +:103280008410002905D02348FFF765F80320287033 +:1032900063E084F884A0007804F18C06C0F3801009 +:1032A00084F88500D4F8E300C4F88600B4F8E70099 +:1032B000A4F88A00A8787F2808BFFFDFA8783070BC +:1032C00085F802B0DFE747E0C178E27991421BD18F +:1032D0000179227A914217D14179627A914213D1D0 +:1032E0008179A27A91420FD1C179E27A91420BD1D0 +:1032F000017A227B914207D10178627BC1F3801170 +:10330000914208BF012200D0002294F84E100DE037 +:10331000880E0020B00E0020DB0E0020A800002048 +:10332000F80D0020D80E0020AA000020012918BFA7 +:10333000042900D14AB979B959EA080105D194F8AC +:103340006510002918BF012906D194F8581019B941 +:1033500094F85910A346C9B1012794F85A0018B13E +:10336000FFF77DF8FEF7D1FB002F1CBF0120FFF710 +:10337000FAFD287800281ABF28780128BDE8F09FB8 +:103380002878032818BFFFDFBDE8F09F06466A686B +:10339000DBF8EF10C2F80D1000786B49C0F3801015 +:1033A0005076DBF8E300C2F81A00BBF8E700D083E0 +:1033B000BBF8F300A2F811009BF8F500D074B07DC3 +:1033C0001075B6F81700D082B6F819005080B6F81C +:1033D0001B009080B6F81D00D08002F1080007F0B5 +:1033E000E8FE96F8240000F01F016868017696F860 +:1033F0002410490980F8CC109BF86600002818BFFB +:10340000FFDF00268BF8686068680188ABF86A10F7 +:10341000417E8BF86D10D0F81A10CBF86E10C18B6E +:10342000ABF872109BF800108BF87410DBF80110E9 +:10343000CBF87510BBF80510ABF879104188ABF8E4 +:103440007C108188ABF87E10C188ABF8801090F8B2 +:10345000CC008BF882009BF88300B8F1000F04BF0A +:1034600020F001008BF883000BD040F001008BF8B6 +:103470008300FEF787FB9BF8831060F347018BF80E +:1034800083108BF866A02E70FEF7CCFFFEF7BEFF10 +:10349000FEF7E0FEFEF743FFFEF75AFF01206968E2 +:1034A00002F06AFB59E770B5FEF7BCFFFEF7AEFF0E +:1034B000FEF7D0FEFEF733FF244C002694F85A00A6 +:1034C00028B1FEF7CCFFFEF720FB84F85A60204DB0 +:1034D0002E70FEF73DFF94F84E004FF000010128DA +:1034E00004D0BDE87040002002F046BB022002F08C +:1034F00043FB94F86600002818BFFFDF68780028B7 +:1035000008BF70BD607B84F86D00207884F874007B +:10351000D4F80700C4F86E00B4F80B00A4F87200E9 +:10352000D4F80100C4F87500B4F80500A4F87900D7 +:103530003C2084F8680068680088A4F86A000120CC +:1035400084F866006E7070BDF70E0020F80D002044 +:10355000A80000202DE9F041FF4F044600207A78B2 +:10356000FE4D4FF00108064612B1012A08D00DE0C9 +:1035700095F8492052B1002908BF87F8018004E07E +:10358000AA7F1AB1002908BF7E7001207A782B2308 +:1035900012FB03F22A44937F184312D021BB02F19D +:1035A0001F012A22A01C07F045FC66700420207031 +:1035B00084F8028078782B2110FB01F0284486776C +:1035C00012E0287801281CBF0020BDE8F08159B91D +:1035D0006670132020701C22A91CA01C07F02AFC76 +:1035E000A6712E7085F89F600120BDE8F081DB4850 +:1035F0000178002914BF80884FF6FF7070472DE9CD +:10360000F041D64C0546A07F002818BFBDE8F081E8 +:10361000284605F053FC00210126072834D2DFE8B4 +:1036200000F004070C3333330E0084F8201009E057 +:1036300084F8206084F828100BE0032000E00220CA +:1036400084F8200004F12901284605F08EFC84F856 +:103650002800284605F054FC84F8210004F12201DA +:10366000284605F036FCBC4D04F1480728787F2831 +:1036700008BFFFDF287838707F202870A677BDE864 +:10368000F041032001F023BB84F82810BDE8F0814D +:1036900010B5002001F0ACFAB04CA0B1FEF747FE27 +:1036A00000210120FEF7E0FC04F1B800FEF753FE14 +:1036B000D4F8A800FEF752FE94F88400032818BF3F +:1036C00002281FD022E0FEF7ADFEFEF79FFEFEF7B8 +:1036D000C1FDFEF724FE94F8A10030B1FEF7BFFE55 +:1036E000FEF713FA002084F8A100012084F8AC0052 +:1036F000022084F8A300FEF72BFEBDE81040002056 +:1037000001F0E5BA01210020FEF7E7FEFEF7C2FE58 +:1037100094F8A10018B1FEF7E4F9FEF78FFE03203C +:1037200084F8A30010BD8D490028B1F8AE202CD03C +:10373000FF2A0BD24FF6FF7000EA4200A1F8AE005C +:10374000FF2888BFFF2001D9A1F8AE008248426857 +:10375000012A12BF002A0D224260D243C2EBC203EB +:1037600003EB021291F8AD30DB4303EB830CCCEB9F +:1037700083131A444260900CB1F8AE20B0FBF2F310 +:1037800002FB130081F8AD007047012ADED9500812 +:10379000A1F8AE0008BF0120D8D1D5E770B56F4CB5 +:1037A00094F8A300022819BF94F8A3000128002070 +:1037B00005461CBF0C2070BD2B2101FB00418D77FD +:1037C000401CC0B20228F7D3257094F8A10028B19C +:1037D000FEF745FEFEF799F984F8A15084F89D5054 +:1037E00084F89E5084F89F5084F8A050012084F8FB +:1037F0007E0084F8845084F8A25084F87B0084F81A +:103800007C0084F87D00606FA16FE26FD4F8803097 +:10381000C4F88800C4F88C10C4F89020C4F8943020 +:10382000D4F88400C4F8980084F89C50002070BD3F +:103830004A4A10B5002382F8A330C2E92C010120C6 +:1038400082F8A300FFF7AAFF002818BFFFDF10BD12 +:103850002DE9F047414C81460C2794F8A30001283C +:103860001FBF94F8A30002280C20BDE8F087FEF7E4 +:1038700067FD0020FEF775FA94F89C004FF00108F0 +:10388000002844D0D4F88800D4F88C10D4F89020C4 +:10389000D4F894306067A167E267C4F88030D4F848 +:1038A0009800C4F88400002684F89D6084F89E6027 +:1038B00094F87B00002801BF94F87C00002894F85D +:1038C0007D0000281ABF94F8A000002884F89C60AE +:1038D00023D094F88400032802D0022805D008E001 +:1038E00005211F4800F0F3FC03E003211C4800F011 +:1038F000EEFC94F87A1004F17400FEF7AEFA00279B +:1039000084F89C6094F8A300012815D10FE094F886 +:10391000A300022808BF0027F4D094F8A3000228CF +:1039200002BF84F8A3800C20BDE8F08704E084F88F +:10393000AC80022084F8A300D4F8B400017819B157 +:1039400010F8041BFEF7BBFAD4F8B000017879B187 +:10395000044A401C08E00000B0000020000F0020D6 +:10396000E00F0020BB0F0020FEF7A9F884F8A1802B +:10397000FD48C4F8A890FEF7CCFCFEF7E9FC3846F9 +:10398000BDE8F08770B5FEF7DBFCF84C94F8A300B7 +:10399000022803D0FEF7DCFC0C2070BD012084F867 +:1039A000AD00A4F8AE000220FEF7C7FCF048FEF719 +:1039B000DFFAF04B002004F17B0200BF94F8A21064 +:1039C000491CA3FB015C4FEA5C0CACEB8C0C614422 +:1039D000C9B284F8A210895C012907D0401CC0B28A +:1039E0000328EBD3FFF754FE002070BD94F8A2002B +:1039F000E149085CFEF7C4FA0020FEF7A1F9F1E7FF +:103A0000DA4B10B44FF0010C83F89EC093F89F403E +:103A1000002C1EBF3A2010BC7047002418B993F840 +:103A20008E0088420FD183F88E1083F89D40106875 +:103A3000C3F888009088A3F88C0083F89DC083F8B1 +:103A4000A0C083F89CC083F89E4010BC0020704743 +:103A50000300C6494FF000004FF0010208BF81F893 +:103A6000922005D0012B16BF122081F892007047DA +:103A700081F89C2081F899307047BC4A032808BF20 +:103A8000C2F8941082F89800012082F89C0000206F +:103A90007047B64890F89C1029B190F8990000281A +:103AA00008BF704704E090F88500002808BF704701 +:103AB0000120704710B5FEF7B5FCFEF7A7FCFEF736 +:103AC000C9FBFEF72CFCA94C94F8A10030B1FEF71D +:103AD000C6FCFEF71AF8002084F8A100012084F843 +:103AE000AC00022084F8A300FEF732FC002010BDD9 +:103AF0009E4981F8A400704710B5FEF793FCFEF7CD +:103B000085FCFEF7A7FBFEF70AFC984C94F8A10091 +:103B100030B1FEF7A4FCFDF7F8FF002084F8A10007 +:103B2000012084F8AC00022084F8A300FEF710FC0A +:103B3000BDE81040002001F0CAB82DE9F05F002672 +:103B4000DFF83882894C7F2780B104F1B80005F096 +:103B500082FA20B904F1B80005F09DFA30B194F86A +:103B6000840003280DD194F89E0050B194F8A3006E +:103B7000052828BFBDE8F09FDFE800F0BABABAF523 +:103B8000F40094F8A3007E4D4FF0010A052880F060 +:103B90005D82DFE800F0FBFBFB03FA00784805F0EC +:103BA0008DF97649887094F87E0030B9FEF7DCF91B +:103BB000002808BF4FF0000801D04FF0010894F82A +:103BC000A100002818BF4FF0280915D0A9F1010065 +:103BD00000F0FF09FDF7B9FF8346022803D1B9F1D0 +:103BE000000FF3D1FFDFB8F1000F14D1BBF1010FCB +:103BF00018BF4FF000080ED0DFF880914FF0020B95 +:103C000099F80200072880F08281DFE800F073F75E +:103C100007F6F6F625004FF00108EDE794F8A1004D +:103C200018B1FEF71CFCFDF770FF5448FEF73DFC91 +:103C3000002808BF89F80070FEF722FCB8F1000FD9 +:103C400000F05F8194F88400012818BF022840F03A +:103C50005881FEF7FFFAEBE094F8A10018B1FEF7E7 +:103C6000FEFBFDF752FF4548FEF71FFC002808BF8A +:103C700089F80070FEF704FCB8F1000F00F04181F4 +:103C800094F88400022803D001287DD000F039B9CF +:103C90003B48FFF7B4FC012000F0AAFF58B13949B6 +:103CA000A1F1280005F039F93648FEF754FB94F8E5 +:103CB0009D00A0B190E0FEF7B5FBFEF7A7FBFEF775 +:103CC000C9FAFEF72CFB94F8A100002870D000BFC1 +:103CD000FEF7C5FBFDF719FF84F8A1609DE0012107 +:103CE0000846FEF7FAFBFEF75EFB052084F8A3000A +:103CF000BDE8F09F94F8A10018B1FEF7B0FBFDF706 +:103D000004FF1E48FEF7D1FB002808BF89F80070A9 +:103D1000FEF7B6FBB8F1000F71D094F884000228CA +:103D200047D0012830D003281CBFFFDFBDE8F09F3B +:103D3000E978D4F88000827E914231D12979C27E1F +:103D400091422DD16979027F914229D1A979427F8F +:103D5000914225D1E979827F914221D1297AC27F8E +:103D6000914214E08BE174E148B50100000F00209E +:103D70004EB50100ABAAAAAA4BB50100B0000020C5 +:103D8000B80F0020E00F002052E0CFE05EE107D145 +:103D90002978427EC1F38011914208BF012100D0F1 +:103DA000002194F88520012A48D0002927D0A0E0DE +:103DB00033E0FE48FFF723FC012000F019FFF8B1C3 +:103DC000FB49A1F1280005F0A8F8F948FEF7C3FA6D +:103DD00094F89D00002882D0D4F888006067B4F879 +:103DE0008C00A4F8780004F17401F14805F06AF839 +:103DF00084F89D6084F89E6071E788E02CE07FE0A5 +:103E0000FEF710FBFEF702FBFEF724FAFEF787FA37 +:103E100094F8A10000287FF45BAF84F8ACA084F88C +:103E2000A3B0FEF795FABDE8F05F002000F04FBFA9 +:103E3000DE48FFF7E4FBBDE8F05F29E4F1BB00BF1B +:103E400000F11A01D94805F044F8D84805F058F8AF +:103E5000D4F8801048764CE094F8A10018B1FEF731 +:103E6000FEFAFDF752FED348FEF71FFB002808BFFD +:103E700089F80070FEF704FBB8F1000F41D0FDF7A0 +:103E8000F4FFE8B394F88400032808D0C748FFF78C +:103E9000B6FBFEF7DFF9BDE8F05FFFF7F9BBD4F83A +:103EA0008000E978827E91421DD12979C27E9142BB +:103EB00019D16979027F914215D100E019E0A97901 +:103EC000427F91420FD1E979827F91420BD1297AC9 +:103ED000C27F914207D12978427EC1F3801191427D +:103EE00008BF012100D0002194F88520012A04D0C8 +:103EF00031B1BDE8F05F00F08FB90029F9D19FE73B +:103F0000FFE7FEF7A7F9BDE8F05FFFF7C1BB94F844 +:103F1000A10018B1FEF7A3FAFDF7F7FDA548FEF7DB +:103F2000C4FA002808BF89F80070A0E09F4804F098 +:103F3000C5FF88F802009E48E978427A91421CD178 +:103F40002979827A914218D16979C27A914214D141 +:103F5000A979027B914210D1E979427B91420CD13F +:103F6000297A827B914208D129780078C1F38011A7 +:103F7000B1EBD01F08BF012500D00025FEF76AF97C +:103F800098F8020004284BD1F5B38A48FEF78DFA61 +:103F9000002808BF88F80070FEF772FA94F8AC00A9 +:103FA00000281CBF0020FFF7BEFB84F8ACA07F4DAB +:103FB00094F8490018B1BDE8F05FFFF769BB042031 +:103FC00084F84B00284604F09BFF002808BF84F8C3 +:103FD0004C6003D0012808BF84F84CA004F14D01C7 +:103FE000284604F076FF04F15401284604F0E9FF66 +:103FF00084F853001F2884BF1F2084F8530004F165 +:10400000730598F8000000E00AE07F2808BFFFDF92 +:1040100098F80000287088F8007084F849A0CAE772 +:104020006448FEF742FA002808BF88F80070FEF7DF +:1040300027FA94F8AC00002804BF0120FFF773FBB7 +:1040400084F8AC60BDE8F05FFFF722BBFFDFBDE89E +:10405000F09F94F8A10018B1FEF701FAFDF755FDA5 +:104060005448FEF722FA002808BF88F80070FEF7CF +:1040700007FAFEF7EFF8BDE8F05FFFF709BB4D4820 +:10408000FEF713FA002808BF88F80070FEF7F8F969 +:1040900094F8AC00002804BF0120FFF744FB84F82B +:1040A000AC60FEF7D7F8BDE8F05FFFF7F1BA70B586 +:1040B000414C94F8A30007285ED2DFE800F05D5D74 +:1040C0005D5D5D040D003948FEF745F9FEF7E2F944 +:1040D000042084F8A30070BDFEF7A4F9FEF796F95A +:1040E000FEF7B8F8FEF71BF9012584F8AC50022062 +:1040F00084F8A300FEF72CF92078002818BFFFDF12 +:104100000020A070D4F880000188A180417EE17178 +:10411000D0F81A10A160C18BA1814188E182818809 +:104120002183C088608394F8A400207794F87A00F3 +:10413000A073606FC4F80F00B4F87800A4F81300FF +:1041400094F8A10018B1FDF700FD012809D0607FA7 +:1041500020F0010060772570BDE87040022000F07B +:10416000B6BD607F40F001006077FDF70BFD617F19 +:1041700060F347016177EEE7FFDF70BD70B50E4C6D +:1041800094F8A3000025052828BF70BDDFE800F0E3 +:104190004343432503000748FEF787F910B9054953 +:1041A0007F200870FEF76CF908E00000B80F0020CF +:1041B000E00F0020B0000020000F002094F8AC00B9 +:1041C000002804BF0120FFF7AEFA84F8AC50FEF7D8 +:1041D00041F8BDE87040FFF75BBAFEF723F9FEF740 +:1041E00015F9FEF737F8FEF79AF894F8A10028B110 +:1041F000FEF735F9FDF789FC84F8A150012084F819 +:10420000AC00022084F8A300FEF7A2F8BDE87040DD +:10421000002000F05CBD70BD70B5022000F0E8FC2D +:104220000025604C0126A0B3012000F050FD04F1F0 +:10423000E001A1F1280004F070FED4F88000C18AEA +:1042400004F1E00004F0E9FED4F88000017D04F1FF +:10425000E00004F0E6FE04F1E000FEF77CF894F8DC +:104260009D0080B1D4F888006067B4F88C00A4F891 +:10427000780004F1740104F1E00004F023FE84F8F6 +:104280009D5084F89E5084F89F60062084F8A30017 +:1042900070BDFFE7FEF7C6F8FEF7B8F8FDF7DAFFE6 +:1042A000FEF73DF894F8A10028B1FEF7D8F8FDF725 +:1042B0002CFC84F8A15084F8AC60022084F8A300A0 +:1042C000FEF746F8BDE87040002000F000BD70B574 +:1042D000344C0546032952D0052918BF70BD04F09F +:1042E000CBFD0521284604F0CAFD94F87A10284633 +:1042F00004F0FDFD04F17401284604F0E3FDD4F858 +:10430000800000F10D01284604F071FED4F8800011 +:1043100000F11101284604F06EFED4F88000017D02 +:10432000284604F07EFED4F88000C18A284604F0B6 +:1043300074FED4F880004188284604F062FED4F868 +:1043400080008188284604F060FED4F88000C1888F +:10435000284604F05EFED4F8800000F108012846EB +:1043600004F076FED4F88000017E284604F05BFE5F +:1043700094F8A4102846BDE8704004F05EBE04F036 +:104380007BFD0321284604F07AFD94F87A10284634 +:1043900004F0ADFD04F174012846BDE8704004F05E +:1043A00091BD0000000F00202DE9F047744E054636 +:1043B00084B096F800040C46DFF8C8A140099AF8CA +:1043C00000144909884218BFFFDF96F8000440092D +:1043D0006D4991F800144909884218BFFFDFDFF8E2 +:1043E000AC816E1E08F13809002709EB4505092C40 +:1043F00080F0C280DFE804F005323C3C37C0C0C02A +:1044000070000B2EA8BFFFDF35F8020C0621F9F76C +:1044100014FB040008BFFFDF0B2EA8BFFFDF35F839 +:10442000020C2188884218BFFFDF94F8980000280A +:1044300008BFFFDFC8F8047088F80170C8F80C7076 +:10444000606AB0F5717F88BFA0F237372046C8F8A0 +:10445000087004B0BDE8F04702F0D5B904B0BDE87B +:10446000F04702F02CBA04B0BDE8F047FEF7FAB806 +:104470009AF8140D4649400991F8001449098842F8 +:1044800018BFFFDF0B2EA8BFFFDF35F8020C062197 +:10449000F9F7D3FA040008BFFFDF0B2EA8BFFFDF38 +:1044A00035F8020C2188884218BFFFDF204602F051 +:1044B000BCFA002818BFFFDF00222146684600F042 +:1044C000EAFC94F8A2006946FBF7BEFD208E401C72 +:1044D000208604B0BDE8F0870B2EA8BFFFDF35F8BB +:1044E000020C0621F9F7A9FA040008BFFFDF0B2E22 +:1044F000A8BFFFDF35F8020C2188884218BFFFDF14 +:1045000094F89800042818BFFFDF84F8987094F896 +:10451000A2504FF6FF76681E0B28A8BFFFDF09EBFD +:10452000450020F8026C94F8A200FBF727F984F804 +:10453000A270D4F8A800002804BFD4F8A400C8F8DA +:10454000100008D0D4E92B12114482691144816112 +:10455000D4E92901C860D4F8A400002819BFD4F810 +:10456000A8100161D4F8A80087610A48007804B057 +:10457000BDE8F047F5F724B8FFDF04B0BDE8F087E9 +:1045800001E000E00BE000E018E000E0081000208F +:1045900019E000E0B80000202DE9F047FD4E074685 +:1045A0000024F08B401C80B2F0833278A046002AB1 +:1045B00008BFFFDF09D0F74B042AA3F114095D6897 +:1045C00013D0052A18BFFFDF44D021463069FBF71E +:1045D000ADFB306187F8008001213971B860B068A7 +:1045E00000F22710F860BDE8F0870A282CBF0220EF +:1045F0000320787100297BD0D6F810A0D9F810409C +:1046000034B3A146E468002CFBD1B9F1000F1FD0F0 +:1046100099F80000002808BFFFDFD9F81410D9F876 +:10462000040001445046FCF707FB002807DA291A6A +:104630004A1E92FBF5F202FB0504294604E090FBBA +:10464000F5F202FB150429468C4288BFFFDFBCE768 +:104650004446BAE702207871002953D0D6F818A052 +:10466000BAF1000F08BFFFDF0025DAF8AC20D9F857 +:1046700010402846691E5CB1A069904228BF814263 +:1046800084BF014625462046E468002CF4D105B9D4 +:1046900005460AF19804CAF8A850002D04BFC4F8D2 +:1046A0000C80C9F8104005D0E868EC60E060002894 +:1046B00018BF0461D4F81090C4F81880B9F1000F45 +:1046C0000ED0D9F8180048B1D4F814A0504538BF1E +:1046D000FFDFD9F81800A0EB0A00A061C9F8188024 +:1046E000002D08BFC6F8208009D02878002800E0F7 +:1046F00008E008BFFFDF696968680844306240F677 +:10470000B83462E72C4660E72DE9F041A24C8046C0 +:1047100084B094F800040E46A04F410997F80004B5 +:104720004009814218BFFFDF94F8000440099C490A +:1047300091F800144909884218BFFFDF00250122C3 +:10474000092E944C5ED2DFE806F0051B3636315D4B +:104750005D184C0062732273607800281CBF04B09F +:10476000BDE8F0818F484560C5602573A068CD38ED +:10477000FFF76EF8002818BFFFDF04B0BDE8F08136 +:10478000607850B1207B002808BFFFF793F965736C +:1047900004B0BDE8F041FAF738BFA273FFF7F2F8B2 +:1047A000002818BFFFDF04B0BDE8F08104B0BDE809 +:1047B000F041FDF757BF97F8140D7B49400991F878 +:1047C00000144909884218BFFFDF01220021684612 +:1047D000FFF7E2FE69464046FBF736FC04B0BDE851 +:1047E000F0812078052818BFFFDF207F002808BF50 +:1047F000FFDF25772570207DFAF7C0FF257504B00F +:10480000BDE8F081FFDF04B0BDE8F0812DE9F041A3 +:10481000604C84B00025207804281FBF207805282C +:104820000C2004B018BFBDE8F08101276770607BE1 +:10483000002690B172B6607B00281CBFA07B0028C8 +:1048400005D0FFF737F96673A673FAF7DEFE62B696 +:10485000207DFCF77BFAD0B913E094F81480032094 +:104860008DF804008DF80500FAF79EFF02904FF0D6 +:10487000FF3003908DF8007069464046FBF7E4FB7B +:10488000E6E720BF207DFCF761FA0028F9D0207F01 +:1048900028B126772078052818BFFFDF0C25667021 +:1048A0002670207DFAF76AFF267504B02846BDE819 +:1048B000F0812DE9F047374884B00078002818BF10 +:1048C000FFF7A4FF0120374E307069460620F9F744 +:1048D00040F8002818BFFFDF00254FF6FF7718E0EB +:1048E000029800281CBF90F89810002911D0008869 +:1048F000B84218BFDFF8B48045D00621F9F79DF81B +:10490000040008BFFFDF94F8A200FCF71FFA68B9A3 +:1049100005E06846F8F7FBFF0028E1D033E020BF50 +:1049200094F8A200FCF712FA0028F8D084F8985006 +:1049300094F8A2904FF6FF7AA9F101000B28A8BFC6 +:10494000FFDF08EB490020F802AC94F8A200FAF768 +:1049500015FF84F8A25069460620F8F7FAFF0028F0 +:1049600018BFFFDF0AE0029800281CBF90F89810DB +:10497000002903D00088B842BFD104E06846F8F7A8 +:10498000C6FF0028EFD03570356104B00020BDE8C7 +:10499000F08700001C10002001E000E00BE000E0C8 +:1049A00018E000E00810002019E000E040100020AE +:1049B00010B50078FE4C60B101280CBF40F6C41061 +:1049C000FFDF06D0A06841F66A01884228BFFFDFFA +:1049D00010BDA060F6E710B5F54C00232070F54837 +:1049E00003704370037703734373837383610375A9 +:1049F00024304FF6FF7101800522418020F8041F0A +:104A0000521EFAD1180008BFA36005D0002B0EBFBC +:104A1000FFDF40F6C410A060A06841F66A0188423A +:104A200028BFFFDFBDE8104043E770B5E14C0E46FC +:104A300084B02178154600291EBF0C2004B070BD3B +:104A4000416A01F29731C0F8AC10A06190F898006B +:104A5000002818BFFFDF40F2712006FB00F1684319 +:104A60000A30C4E90110A1F53D71884288BF0846AB +:104A7000A060D1490020C8600521217060702077B6 +:104A8000E083CE48FAF72BFE2075002808BFFFDF31 +:104A9000FAF78AFE2061002201216846FFF77CFDBB +:104AA000207D6946FBF7D0FA04B0002070BD884233 +:104AB00034BF012200220244D2B2814234BF01201D +:104AC00000200844C1B28A4234BF08461046831A07 +:104AD000A0EB010C114401EBC102634402EB411154 +:104AE00003EB83031B0100EB400203EBC10102EB6C +:104AF000001201EBC201C0EBC00202EB401001EB5F +:104B00008000983870474FF44B72B1F54B7F38BF37 +:104B1000114641627047A748007800281CBF00205A +:104B2000704710B50620F8F725FF80F0010010BD92 +:104B300010B5A04C84B02278002A1EBF0C2004B00F +:104B400010BD40F27122424340F2712048430A30C6 +:104B5000C4E90120A2F53D71884298BF01460020BA +:104B6000A160607004212170E0839448FAF7B7FDDA +:104B70002075002808BFFFDFFAF716FE40F6B831AF +:104B8000FBF7D4F82061002201216846FFF704FDFD +:104B9000207D6946FBF758FA04B0002010BD70B5BF +:104BA000844CA1690160FFF731FE002308B1A361C5 +:104BB00070BDA169D1F8A8205AB1D1E92BC5AC4488 +:104BC0009569AC44C2F818C0D1E9292CCCF80C2066 +:104BD00005E0DFF8E4C1D1F8A420CCF81020D1F82A +:104BE000A420D1F8A810002A14BF11618B61DEE760 +:104BF000714910B54968002801F1980408BF04F50F +:104C0000BC7409D0012808BF04F5317404D002280F +:104C100014BFFFDF04F5B07466488068A0428CBF03 +:104C20000120002010BD6448D0E90112914204D255 +:104C30000078002804BF012070470020704730B57D +:104C40005B4D85B0042221B3012908BF03211CD08C +:104C5000022908BF80F8982023D003291EBFFFDF58 +:104C600005B030BD418840F2E2425143544A1160E0 +:104C7000D0F8BC100A89C2828A7902754A894280BA +:104C80008A898280C989C180022180F8981005B084 +:104C900030BD044648480078002818BF84F89820A2 +:104CA00007D0FAF7B2FC287805B0BDE83040F4F739 +:104CB00087BC01222146684600F0EDF894F8A20076 +:104CC0006946FBF7C1F9208E401C2086E9E72DE9F3 +:104CD000F041374F0100374C387884B04FF0000571 +:104CE0000ED001291CD0022976D003291EBFFFDF78 +:104CF00004B0BDE8F08104B0BDE8F041F4F760BC59 +:104D0000E583F4F75DFC6078002875D10022114638 +:104D10006846FFF741FC207D6946FBF795F96BE09B +:104D2000DFF89480206940F2E243D8F80410084488 +:104D3000A16900F251604A88983102FB03F5D8F866 +:104D400010208A4208BF002614D0216AFBF774FFA6 +:104D5000002807DA291A4A1E92FBF5F202FB050623 +:104D6000294604E090FBF5F202FB150629468E4227 +:104D700088BFFFDFB868864208D2A06940F271227E +:104D80004188C1824A4306EB420605E040F2E24018 +:104D9000B6FBF0F0A169C882A06905210175C08A3F +:104DA0006FF41C71484306EB400040F635410AE0C1 +:104DB000B80000201C100020081000200947010046 +:104DC000BC00002008E0C8F80C00B0EB410F28BF81 +:104DD000FFDF04B0BDE8F081E583F4F7F1FB0120CB +:104DE0002077A0692169C0F89C1080F8985021783C +:104DF000052918BFFFDF06D0FAF707FC6573A57316 +:104E000004B0BDE8F081002808BFFFDFA06990F87A +:104E10009800002818BFFFDFA06990F8A2000028C2 +:104E200018BFFFDF5B48FAF75AFCA169064681F814 +:104E3000A2000F88401E0B28A8BFFFDF564800EBDA +:104E4000460020F8027CA06990F8A200002808BF64 +:104E5000FFDF01226846A16900F01DF8A0696946DC +:104E600090F8A200FBF7F0F8A561C5E7704700B520 +:104E70004A4A59B1012908BF401E07D002291CBF68 +:104E8000FFDF00BD5178491C5170C01F506000BD4C +:104E90004348007870472DE9F05F06460C46488885 +:104EA00040F2E24141439046E08A40F2E24200FB98 +:104EB00002FA94F898200025384F4FF0030B4FF07A +:104EC000010952B13846012A40682DD0022A16D075 +:104ED000032A18BFFFDF27D036E0B8F1000F08BF64 +:104EE000FFDF7868002808BFFFDF7868F968C01D19 +:104EF00008440AF25D41451884F8989023E0A8F12F +:104F00000101084308BFFFDF2648B8F1000F006821 +:104F100000EB0A0505D0786800F20F30A84288BF80 +:104F2000FFDF84F898B00EE00D46B8F1000F0AD00C +:104F300018B97878002818BFFFDF786800F20F30C2 +:104F4000A84288BFFFDF05B9FFDF2946D4F89C00DF +:104F5000FAF7ECFEC4F89C000020307086F804904C +:104F6000D4F89C00B060204601F095FD002818BFE1 +:104F700086F8059005D0606A00F5E570F060BDE840 +:104F8000F09F94F89800012806BF0220707186F8FF +:104F900005B0F0E7A94301004010002008100020F0 +:104FA0001C100020BC000020FE48C07E7047FE4858 +:104FB00040687047FD48C07E7047884234BF012278 +:104FC00000220244D2B2814234BF012000200844B2 +:104FD000C1B28A4234BF08461046831AA0EB010CC6 +:104FE000114401EBC102634402EB411103EB830363 +:104FF0001B0100EB400203EBC10102EB001201EBCD +:10500000C201C0EBC00202EB401001EB80009C38F3 +:1050100070474FF44A72B1F54A7F38BF114641627A +:1050200070472DE9FF4FDF4E83B08846706A3468C1 +:105030005FEA03090568D4F804B0306A0190298E4C +:105040000598A0EB010080B2009019BF04F1380769 +:1050500004F1480A371D05F1A80A032038710398A6 +:10506000002832D0012800F0DF8002287DD00328FC +:1050700018BFFFDF00F00C81B9F1000F1EBF3879B7 +:105080000328FFDFA16A7069FAF750FEB860D4E91F +:10509000081081428EBFCAF800000846CAF8001006 +:1050A000696A084400F24F10F860B5F89810059846 +:1050B000081A00B2002840F349810398022818BF5B +:1050C000032040F0448100F041B9306A002808BF55 +:1050D000FFDFE98A40F27120484340F2E24101EBF0 +:1050E00040010020B8F1000F06D0B14808FB01F1E3 +:1050F000B1FBF0F000F10100A061698840F2E242EA +:1051000001FB02F24FF0000106D0A94908FB02F2B0 +:10511000B2FBF1F101F10101E161316A40F2712369 +:1051200001F10101A162EA8A02FB03F2C0EB420233 +:1051300002F237421144A1622A7D40F2E24312FB9F +:1051400003F202EB400000F2151020626062306A48 +:10515000A1EB00009749A0F1010009188CD2B0F52D +:10516000387F98BFFFDF5CE0FFE7E98A40F27122F9 +:10517000E068514300EB41010020B8F1000F06D078 +:105180008B4808FB01F1B1FBF0F000F10100A061D8 +:10519000688840F2E24100FB01F14FF0000006D0C8 +:1051A000834808FB01F1B1FBF0F000F10100E06180 +:1051B000306A002808BFFFDFB5F8AE00E98A002892 +:1051C00040F27122E06801FB02F100EB4100A169AD +:1051D000A0EB010003D13168D33849680844A062CC +:1051E0002269A168A06901FB0200297D40F2E24228 +:1051F00011FB02F101EB400000F2131020626988FC +:105200005210E0695143C0EB4100A0F54770606265 +:10521000A06A316A401AA0F5AA7167484018BFF425 +:105220002BAF0120387127E7B5F8AE00002808BF82 +:10523000FFDF306A002808BFFFDF698840F2712273 +:10524000E0695143C0EB4101A162B5F8AE3022697B +:10525000D4F818C0D4F808809B1A08FB02C203FBDC +:1052600000202A7D40F2E24312FB03F202EB4000F1 +:1052700000F213102062A1F547706062306A081ACC +:10528000A0F5AA714C484018BFF4F6AEC9E700BFBC +:10529000B9F1000F1CBF94F83400002803D007B008 +:1052A0000220BDE8F08F698840F27122E069514325 +:1052B000C0EB410100984843A062B5F8AE0030B39E +:1052C000BBF1000F18BFFFDFB5F8AE100098002249 +:1052D0000844E169484302EB400000F213102062E9 +:1052E000688840F271225043C1EB4000A0F547703E +:1052F000606232484068B0B1A26A01990120511A37 +:10530000A1F5AA722C49891838BF3871B4E6BBF1EF +:10531000000F1ABF01980028FFDFABF1D301A06A8C +:105320000844A062D0E7FAF73FFA726901461046D6 +:10533000FBF782FCA16A081AA0F24F111E48401820 +:105340003EBF012007B0BDE8F08F95E600207871E0 +:105350001098C8B1B5F8C01000290CBF0020B5F8EE +:10536000C200A5F8C20095F8C420401C50438842F2 +:105370000AD27879401E002806DD01207871B5F840 +:10538000C200401CA5F8C20087F80090B9F1000FD8 +:105390001CBF94F83400002881D189F0010084F802 +:1053A00035000DE058100020DC00002080100020A7 +:1053B00040420F00DBF7FFFFF4F8FFFFCC000020B6 +:1053C000307FF27E3946B37E9A4202D0FAF73CFE35 +:1053D00004E00020F076B0763060706207B0002004 +:1053E000BDE8F08F70B5FD4D0929D5E900326FD2C7 +:1053F000DFE801F0055B73816F9494589000002002 +:105400001062D17E04294ED2DFE801F04D4D0245F5 +:10541000516A0C681168087011684860106890F84B +:10542000350040B9FAF7C0F969680968096CFBF7FB +:1054300003FC002818DC686801684A8E218E8A42C5 +:1054400006D1B4F89C20511AA4F89E10228605E0DB +:10545000511AA4F89E100168498E21860268C1681D +:105460001164C168416111E068680168098E228E8B +:10547000891AA4F89E100168098E218601680A6CB9 +:10548000C2600A6C4261886CC4F8A8002046BDE87E +:10549000704002F01DBAD0685061FDF7ABFC0028E7 +:1054A00018BFFFDF70BDFFDF70BDD07E04280DD2B6 +:1054B000DFE800F00C0C0206BDE8704002F0D8BA3C +:1054C000FDF7D9FD002818BFFFDF70BDFFDF70BDFD +:1054D00024E0BDE87040FDF7C5B8D87E022804D0AE +:1054E000D87E032818BFFFDF0CE0BD48007D0128EF +:1054F00008BFFFDF0AE0D87E022807D0D87E032845 +:1055000018BFFFDFBDE8704000F0B5BBBDE87040DC +:1055100000F0FCBBBDE87040FAF730B9FFDF70BDAA +:105520002DE9F047AD4D0024AE4E82460F464FF0B8 +:10553000010809294ED2DFE801F0053B46463B4D04 +:105540004D4646006868DFF89C92002818BFFFDFD0 +:1055500039465046C5F80490FFF744FFF07E022814 +:1055600018BFBDE8F08768680568406A0768FAF701 +:10557000FEF87A8840F27123E9695A43C1EB42018F +:10558000AB39B72898BFB72000F54A70081A796A76 +:10559000A0F20130B1F5717F88BFA1F5717484422A +:1055A00038BF2046E862306880F83480BDE8F08774 +:1055B0005046FFF717FFF07E022804BF306880F8DE +:1055C0003480BDE8F08750462E60FFF70BFF2C605B +:1055D000BDE8F087FFDFBDE8F0872DE9F0417F4CA3 +:1055E00007460D4609291ED2DFE801F00510141404 +:1055F000101D1D14140060687B4E002818BFFFDFCB +:10560000294638466660BDE8F041EBE63846BDE81D +:10561000F041E7E6744820603846FFF7E3FE0020DB +:105620002060BDE8F081FFDFBDE8F081F0B56D4995 +:1056300085B00026CA7E694C032A03D02831CA7E71 +:10564000032A64D10025216000B3012806BF03208E +:105650008876FFDF0AD02068002E0560456225604D +:1056600055D06248456005B00020F0BD2068C17E7D +:1056700029B1C17E827E914208BF20BFF6D0C17E93 +:1056800000290CBF012600268576E4E700260327C3 +:1056900008468F76C97E032904D0C07E002808BF43 +:1056A000012631E00120FDF705FD2068007F00287C +:1056B00008BFFFDF2068067F8DF804708DF8057045 +:1056C000FAF772F802904FF4FA70039001208DF807 +:1056D000000069463046FAF7B7FC2068007FFBF708 +:1056E00035FB30B920BF2068007FFBF72FFB002877 +:1056F000F8D02068007FFAF741F820680577C57672 +:10570000857605600126456220688576A3E705B0A9 +:105710000C20F0BD10B5334800F076FB324800F0A5 +:1057200073FB2F4900200875304948702D494861A6 +:1057300001F1280250618876907628494860086017 +:1057400010BD2DE9F0412A4C064694F80004294D7D +:10575000400995F800144909884218BFFFDF94F802 +:1057600000044009244991F800144909884218BFEF +:10577000FFDF95F8140D4009204991F800144909FC +:10578000884218BFFFDF1E48164D00240670EC76D5 +:10579000AC7605F12806F476B4761030012101715B +:1057A00004606C6274622C6000F108073460284663 +:1057B0007C6000F029FB05F1280000F025FB05F1D5 +:1057C000500004757C706C617461AC76B476A7F19E +:1057D000100044600460BDE8F0810000CC000020AF +:1057E000A81000205810002080100020DC000020AD +:1057F00001E000E00BE000E018E000E019E000E06C +:10580000C4000020F849087170472DE9F843F749B2 +:105810000546CA7EF64C01F12800002A04BFC27E6C +:10582000002A73D0C97E022907BFC17E00290C203F +:10583000BDE8F8832060EF48F9F751FF2168087749 +:10584000ED4845602168086014384862ADB1012117 +:1058500005F1C400FBF762FD0620F8F799F806464B +:105860000720F8F795F895F8C4103044B1FBF0F232 +:1058700000FB1210401C85F8C4002068007F00283F +:1058800008BFFFDFF9F773FFDC49091838BF40F2A2 +:10589000F65000F26B1087B220680326C676FDF73B +:1058A000B2F921680861FDF7D2F94FF0010800252F +:1058B00058B3FDF7CCF921684A6A106008680121E5 +:1058C00080F800806846FBF7B4FC9DF8000042F2C7 +:1058D00010710002B0FBF1F201FB1208F9F764FF4E +:1058E00007EB0801FAF722FA2168C86022681672ED +:1058F00056721571107FD37E111D92F81AC0634540 +:1059000018D0FAF7A1FB19E000E006E0BC482160DE +:10591000F9F7E5FE2168087792E7F9F745FF394680 +:10592000FAF704FA2168C86008680570086880F80A +:105930000180DBE7D5769576156055622068058392 +:105940000020FDF7B7FB00202560BDE8F883704715 +:10595000F8B5A64EF17E19B906F12801C97E09B144 +:105960000C20F8BD0221F1769F4FA64D776235607D +:10597000002438602C750094A3493A7990F8CC0043 +:10598000234631F8122031F81000104481B222462B +:105990002046FFF746FB002818BFFFDF2C610120DF +:1059A000AC6028756C862C8685F836403868018E88 +:1059B000491E018634830020F8BD8D4810B540682B +:1059C0000124817E032908BF002409D00168497899 +:1059D00031B1006A8D49884284BF0024FDF766FB1F +:1059E000204610BD8248406801680A78521C0A703F +:1059F000016A0068C26A914204D8007D01281CBF78 +:105A000001207047002070472DE9F843784C774813 +:105A100000262060416A00680D6880F8346095F8BF +:105A2000A610002904BF007D032850D1F9F7BCFE61 +:105A30002268526901461046FBF7FEF8002846DD51 +:105A4000216840F271274A6A13680A685B88D2F8B5 +:105A50001CC07B43CCEB4303B0FBF3F02B8E401C0C +:105A6000184410860A68B5F89C00118E401A00B2DE +:105A700000282CDD012082F83600B5F84E00B5F87C +:105A80004C10DFF88481401A298E401E084487B2EA +:105A900016E0496A097938F811100096028E95F8D7 +:105AA000CC30007D38F81330194489B20123FFF758 +:105AB000B8FA60B101280DD0022818BFFFDF06D068 +:105AC00021680868028EBA1A12B2002AE1DA26604A +:105AD000BDE8F88320680068018E491C0186EFE765 +:105AE00070B5434E00240628756843D2DFE800F005 +:105AF0001820030E240D002000F0C3F9EC76AC76DC +:105B00002C606C62706888B1746070BD4048356804 +:105B10000078F3F755FDEC76AC762C606C6270BDC6 +:105B2000012000F0AEF970680028EDD1FFDFEBE74F +:105B300029680320087570BD686A29680068CA6909 +:105B40008A60418840F2E24251432A68D160B0F84D +:105B5000E810C18290F8E6100175B0F8EA104180B3 +:105B6000B0F8EC108180B0F8EE10C18029680220F6 +:105B7000087570BDFFDF70BD70B51D4D002470B19C +:105B8000012812D002281CBFFFDF70BD00F0D5F93C +:105B90006868C47684760460446220B93BE000F013 +:105BA000CCF96868B0B36C6070BD686801684C700F +:105BB000C4768476104E046044620021706802F05E +:105BC000EDFE706880F8E24080F8E340FFF7C0FE29 +:105BD000002818BFFFDFF9F718FD0D486C6000784A +:105BE000F3F7EEFC6C6070BDD4000020581000206C +:105BF000CC000020DB550100DC0000200AFAFFFF8A +:105C000021550100A810002052B50100CF821300D9 +:105C1000C4000020FFE7FFDFC5E7E7494968CA7E07 +:105C2000022A18BF70470A681378002B18BF704704 +:105C300050600968CA6A10442838C8627047DE4A52 +:105C400000B5526841B1012908BF401E04D00229A5 +:105C500016BFFFDFC01F00BD106200BDD748C07E69 +:105C600000281CBF0020704710B50720F7F782FE00 +:105C700080F0010010BD38B5CF4C2068016849782C +:105C8000012932D001216846FBF7D3FA9DF80000C4 +:105C900042F210710002B0FBF1F201FB1201206828 +:105CA000426AC06812681144FAF740F82168C86077 +:105CB000C249226803208A4205D0118B0A2924BFD9 +:105CC0000221517203D2118B491C11835072107240 +:105CD00000231371107F92F81BC0111D947EA44500 +:105CE0000FD0BDE83840FAF7AFB9C0684FF47A7109 +:105CF000FAF71CF82168C860FCF785FF2168086185 +:105D0000D6E7D37693761360536238BD2DE9F84316 +:105D1000A94E3068416A04680D6894F8351031B1B5 +:105D2000618E2A8E914202BF407A0028FFDFF9F788 +:105D30003BFD3268526901461046FAF77DFF336831 +:105D40004FF000090028596A096808BF48460AD080 +:105D50001A68498840F2712CD26901FB0CF1C2EB40 +:105D60004101B0FBF1F02A8E618E02EB000C61451F +:105D7000AEBF481C401C1044608694F8360030B911 +:105D8000608EB5F89C10884204BF401C6086188B5A +:105D90008B4F401C1883B5F84E00B5F84C10401AD4 +:105DA000298E401E08441FFA80F818E03068406AC7 +:105DB000007937F81000CDF8009095F8CC1037F83E +:105DC0001110084481B2207D0023FFF72AF9002832 +:105DD00008BFBDE8F883012818BFFFDF10D0628E2E +:105DE000A8EB020000B20028E0DA082085F84A009B +:105DF000012085F849002846BDE8F84301F037BA8C +:105E0000608E401C6086EAE72DE9F047DFF8B48138 +:105E1000694C05464FF01F090027EE7E042E23D261 +:105E2000DFE806F02922021D454518BFFFDF0220EA +:105E30002560A8762168C87E28B1C87E8A7E9042F7 +:105E400008BF20BFF6D0C87E8F7600281CBF4FF059 +:105E50000C0927600CD10F604F6227600BE0012016 +:105E6000FFF7E4FB814600E0FFDFB9F1000F02D04D +:105E7000E87EB042D1D1E87E002818BFFFDFBDE840 +:105E8000F087F8B54C4D002601286A68516A0C6805 +:105E900044D108794A4B33F81010106890F814C0B8 +:105EA0000127BCF1030F06D0027D022A12D0007D2B +:105EB000012823D032E0066110688660009794F8CC +:105EC000CC00B4F89C2033F810000023084481B2C1 +:105ED00003201EE0B4F8AE200261009794F8CC00D5 +:105EE000B4F89C2033F810000023084481B202204B +:105EF000FFF797F8696809680F750CE0009794F848 +:105F0000CC00B4F89C2033F810000023084481B280 +:105F10000120FFF786F8002818BFFFDFF9F775FBAF +:105F200029480078F3F74CFB686806830268218EE5 +:105F30005186006880F83660F8BD38B51E4C0020E8 +:105F40000546616809684A78002A18BF4D702AD151 +:105F5000097861B101216846FBF78FF99DF80000CF +:105F600042F210710002B0FBF1F201FB1200626814 +:105F7000516A09680144D068F9F7D8FE6268D060B8 +:105F8000157103205072107FD37E111D92F81AC034 +:105F9000634502D0FAF758F803E0D5769576156098 +:105FA000556260680583F9F730FB07480078BDE863 +:105FB0003840F3F705BB0000CC0000208010002023 +:105FC00052B5010058100020C400002010B584B064 +:105FD00004466846FCF71BFD002808BFFFDF009859 +:105FE00003F09DF80321009803F0B3F800980178BE +:105FF00021F010010170214603F00EF90D2C7CD226 +:10600000DFE804F03122075CABABAC159AABACAC6B +:106010008100FE48806890F8B510009803F07BF985 +:10602000FCF708FD00281CBF04B010BD81E0F74854 +:10603000806890F89110009803F0BDF9FCF7FAFC25 +:10604000002808BFFFDFA6E0F0488068D0F8C00055 +:10605000411C009803F050F9FCF7ECFC00281CBF31 +:1060600004B010BD65E0E94CA068D0F8BC008179AF +:10607000009803F015F9A068D0F8BC0001890098D9 +:1060800003F007F9A068D0F8BC004189009803F03C +:10609000EBF8A068D0F8BC008189009803F0EBF819 +:1060A000A068D0F8BC00C189009803F0EBF8FCF7B9 +:1060B000C1FC00281CBF04B010BD3AE0D34CA0685E +:1060C000D0F8BC00011D009803F029F9A068D0F8B1 +:1060D000BC0000F10C01009803F02BF9A068D0F887 +:1060E000BC0000F11E01009803F029F9A06800F13E +:1060F0008801009803F031F900E02EE0FCF79AFCEB +:1061000000283CD145E0C14C60690178009803F05B +:106110003CF960698188009803F039F96069418829 +:10612000009803F038F9FCF785FC00281CBF04B088 +:1061300010BDFFDF04B010BD0020029003909DF859 +:10614000080002A940F001008DF80800009803F053 +:1061500034F9FCF76FFC90B91BE0FFDFFCF76AFC39 +:10616000002808BFFFDF0C2C04BF04B010BD072CB3 +:1061700011D0012C19BF002C022C04B010BD00213D +:10618000A2488068A0F85210012180F8561004B08F +:1061900010BDFFDFF3E79D4900208968A1F8580092 +:1061A00004B010BD2DE9F843984D04464FF00006A9 +:1061B0006878084368702846A988806811F0200F25 +:1061C00018BFA0F84C6004D1B0F84C20521CA0F8C5 +:1061D0004C2011F0600F4FF0010707D090F83E10EF +:1061E00021B980F83E700121FEF729FD4FF0080823 +:1061F000002C40F018826878002840F01681287939 +:1062000010F0040F0DD0A86890F83B00052808BFD7 +:10621000FFDFA86890F83D10022904BF2F7080F8B6 +:106220003D60287910F0020F00F0CD8068780028DA +:1062300040F0C980E868C0780D2880F0C380DFE8AE +:1062400000F04333076FC1C1851823C15264900029 +:10625000A8680023012190F83D20303002F0C3FDF2 +:1062600000283FD1A868032180F83D1080F85660CF +:106270008DE0A8680023194690F83C20303002F0E9 +:10628000B2FD00287ED19EE0A8680023194690F850 +:106290003B20303002F0A7FD002808BFFFDF0920B7 +:1062A000A96881F83B008EE0A8680023194690F8A1 +:1062B0003B20303002F097FD002808BFFFDF0720A9 +:1062C000A96881F83B007EE0A8680023194690F891 +:1062D0003B20303002F087FD002808BFFFDFA868B0 +:1062E00080F83B806FE0A8680023194690F83B20B7 +:1062F000303002F078FD002808BFFFDFA8680A21CF +:1063000080F85B7080F83B105DE0A86890F83B0077 +:106310000D2818BFFFDFA8680C2180F85C7012E020 +:10632000A8680023194690F83B20303002F05BFD4E +:1063300028B9A86890F85C00002808BFFFDFA868AB +:106340000E2180F85B7080F83B103CE0A86890F864 +:106350003B00132818BFFFDF1520A96881F83B0018 +:1063600031E0A868D0F8BC1003884A889A4204BF7C +:10637000097804290ED0A8680023194690F83C201B +:10638000303000E002E002F02EFDE0B1A86880F8B5 +:106390005A6018E090F83B2000231946303002F094 +:1063A00022FD002808BFFFDFA86890F85E1011F0FA +:1063B000020F0FBF80F83B7080F85660D0F8BC0029 +:1063C0000670D8E7FFDF287910F0080F0AD0687848 +:1063D00040B9A86890F83D10032903D10221297023 +:1063E00080F83D6000F0E2FBA87810F0080F19D0AB +:1063F000A8680023052190F83B20303002F0F3FC20 +:1064000070B185F80180A86802E00000E400002077 +:10641000D0F8D01008780B2808BF0020087001E0E1 +:1064200002F029F8A86800F046FB6846FCF7EFFA8E +:10643000002800F0F8806878002840F0F480A86810 +:106440000023012190F83D20303002F0CCFC0028E0 +:1064500040F0E980A86890F8B410002918BF022025 +:1064600026D190F83B200C2A0ED00D2A08BF0B2015 +:106470001ED0132A08BF06201AD000230421303072 +:1064800002F0B1FCB8B1CEE0FAF7F6FE0C284DD31D +:10649000A8680821D0F8BC001E30FAF7EEFE28B13B +:1064A000A86804218830FAF7E8FE00B9FFDF03206E +:1064B000FFF78CFDB7E0A86890F83C10012927D0C1 +:1064C000052920D0D0F8BC100A7882B34988028808 +:1064D000914261D190F83B2000231946303002F000 +:1064E00082FC20B3A868D0F8BC100978022908BF44 +:1064F000002026D003291BD004293AD0052908BF43 +:1065000008201ED048E00720FFF760FDA8680BE0D8 +:106510000C20FFF75BFDA868A0F8586090F85E10AB +:1065200041F0010180F85E1080F83C607BE033E0D0 +:1065300090F83F1041B190F84000002808BFFFDFFD +:106540000A20FFF743FD27E0FAF796FE0C2823D335 +:10655000A8680821D0F8BC001E30FAF78EFE28B1DA +:10656000A86804218830FAF788FE00B9FFDF03200D +:10657000E7E790F85E0010F0030F0DD10C20FFF755 +:1065800025FDA868A0F8526080F8567090F85E105B +:1065900041F0010180F85E106846FCF738FAE0B37C +:1065A000A8680023194690F83B20303002F01BFC0D +:1065B00098B3A86890F8C41079B3A969097861BB49 +:1065C000018E0A292FD900F108010522E86904F09B +:1065D00005FC0028A86808BF80F8C46023D0D0F864 +:1065E000C000017851B1411C0522E86904F0F6FBB6 +:1065F00098B9A868D0F8C000007830B9A868E969EF +:10660000D0F8C000401C04F0D4FDA868D0F8C00049 +:106610000178491C0170012000E004E0FFF7D6FC7E +:10662000A86880F8C460A868A14600F1300490F81A +:10663000B40030B9627B00230121204602F0D3FB75 +:1066400010B1208C401C20843D21B9F1000F18D1DD +:106650002878022808BF16200ED0012804BFA86899 +:1066600090F8B60008D06878B0B110F0140F1CBFD5 +:106670001E20A07602D005E0A07603E010F0080FFF +:1066800002D0A17667763AE010F0030F08BFFFDF73 +:106690002A20A076677632E094F8260028B1608C34 +:1066A000411C6184A18C884213D294F82A0028B13D +:1066B000208D411C2185A18C88420AD2208CE18B3F +:1066C000884203D3AA6892F8B42012B9A28C9042EF +:1066D00003D32220A076677611E0A07B0028A08B50 +:1066E00005D0884228BF84F81A80CBD205E006285E +:1066F00003D33E20A076677601E0607E40B1E6726B +:106700002673A673A868BDE8F8430221FEF797BA7E +:10671000A868BDE8F8430021FEF791BAFE494A781F +:106720008B781A430ED101280AD0087910F0040F93 +:1067300004D0886890F83D00022803D001207047FB +:10674000FEF771BA0020704770B5F34C05460E464F +:10675000A0882843A08015F0020F04D015F0010F87 +:1067600018BFFFDFE66015F0010F18BF266115F0B6 +:10677000020F13D0304602F075FD062802D00B2818 +:1067800030D00BE0A06890F83B10132906D100210F +:10679000C0E91C115FF0010180F8401015F0800F76 +:1067A0001CBF0820A07015F4806F08BF70BDA168E1 +:1067B000088E89880844801D85B2304602F052FD5B +:1067C000012817D0304602F04DFD002818BF70BDDB +:1067D000A0682946D0F8BC0085803046BDE87040EE +:1067E00002F062BDA06890F83B100D2908BF00219F +:1067F000D4D1D1E7A0682946A0F8C6503046BDE8FC +:10680000704002F081BDF8B5C34C00260546A0607B +:10681000A6806670A67026700088FCF7F5F8A06860 +:106820000088FCF717F9B5F8A000A168401C82B2F7 +:1068300001F1300002F0FDF9002818BFFFDFA5F8D4 +:10684000A060A06890F8561031B1B0F85210B0F8BE +:106850005420914228BFF8BD90F85A1031B1B0F8D9 +:106860005810B0F85420914228BFF8BDB0F850201D +:10687000B0F84E108A4228BFF8BD90F83E20B0F81C +:106880004C00CAB1884228BFF8BDA4480090A44B70 +:10689000A44A2946304601F066FCA0680023052181 +:1068A00090F83B20303002F09EFA002808BFF8BD77 +:1068B000BDE8F84001F053BC0628E6D3F8BD964881 +:1068C000806890F8561029B1B0F85210B0F85420F2 +:1068D000914219D290F85A1029B1B0F85810B0F876 +:1068E0005420914210D2B0F85020B0F84E108A4295 +:1068F0000AD290F83E20B0F84C001AB1884203D278 +:1069000001F08BBD0628FBD3002001464AE42DE9A7 +:10691000F0410C4607461D461646D8212046DDF8B4 +:10692000188004F020FB2780C4F8D080C4E92F65CC +:10693000BDE8F081F7F7A4B970B50C4615460621FD +:10694000F7F77BF8002808BF70BDD0F8D0100A78A0 +:106950000021072A1ED00C2A2FD00B2A3BD0062A52 +:1069600049D090F8C820002A04BF002070BD617093 +:106970001222227090F8C82052B100BF80F8C810CF +:10698000D0F8CA20C4F8022090F8C820002AF5D117 +:10699000012070BD002DFBD1617007222270D0F85C +:1069A000D0205368C4F802309368C4F80630928946 +:1069B0006281D0F8D0000170EAE7002DE8D1617063 +:1069C0000C222270D0F8D0205268C4F80220D0F8EF +:1069D000D0000170DCE7002DDAD161700B2222704B +:1069E000D0F8D0205368C4F802301289E280D0F881 +:1069F000D0000170CCE7002DCAD161700622227050 +:106A0000D0F8D0205368D2F808C0D268C4F8023059 +:106A1000C4F806C0C4F80A20D0F8D0000170B7E767 +:106A2000002070473C494861704710B50446B0F8F3 +:106A3000A000401CA4F8A000B4F84C00401CA4F82E +:106A40004C0094F8560020B1B4F85200401CA4F851 +:106A5000520094F85A0020B1B4F85800401CA4F831 +:106A6000580094F8B40040B994F83D200023012167 +:106A700004F1300002F0B7F920B1B4F85000401C26 +:106A8000A4F85000204600F016F8002010BD224A5D +:106A9000C2E906017047B0F84C1090F83E20091D7D +:106AA0002AB1B0F84E00814203D301207047062975 +:106AB000FBD20020704770B5044690F83B000025DB +:106AC000072821D1208EB4F8C610401C884218BF78 +:106AD00070BDD4F8C000411C04F1080004F069FB4B +:106AE0000221204602F00CF884F83B50012084F883 +:106AF0006600D4F8C0000078002808BFFFDFD4F893 +:106B0000C0000178491E017094F83B00082818BFA6 +:106B100070BD208E08E00000E4000020A5610100A7 +:106B20001D67010049670100D4F8BC10401C89882A +:106B3000884218BF70BDD4F8D0000178002918BF72 +:106B4000FFDF1ED12188C180D4F8BC00D4F8D0105A +:106B500040890881D4F8BC00D4F8D01080894881DD +:106B6000D4F8BC00D4F8D010C0898881D4F8D00003 +:106B70000571D4F8D01007200870D4F8D010208800 +:106B800048800121204601F0BBFF03212046FEF78B +:106B900056F8D4F8BC0021884088884218BFFFDF2F +:106BA000D4F8BC00057084F83B5070BDF0B5FF4CC4 +:106BB0008DB0207910F0010F04BF0DB0F0BD206939 +:106BC00000230521C578A06890F83B20303002F002 +:106BD0000AF9002818BF022D0CD00B2D18BF042D68 +:106BE00008D0052D1CBF062D0D2D03D0607840F078 +:106BF00008006070607800281CBF0DB0F0BD2069EF +:106C0000C078801E0C2880F0D881DFE800F006FDF7 +:106C10002B4BD2FCFDFBFD21FA96A068002301213D +:106C200090F83D20303002F0DEF8002840F0E3819B +:106C3000206902F072FBA16881F8B600022081F899 +:106C40003D00002081F85A0081F8560000F0D3B9C9 +:106C5000A06890F83B100A2929D1002180F83F1044 +:106C60000D2166E0A06890F83B100E291FD1D0F8E6 +:106C7000BC1000884988814218BFFFDFA068D0F8A7 +:106C8000BC0000F12601206902F074FBA06800F14D +:106C90008C01206902F076FBA168112081F83B008D +:106CA00000F0A9B9A66896F83B00112803D002208D +:106CB000607000F0A0B9D6F8BC10102501F10E0CE0 +:106CC00000210DF1FF3208206B1A6344401E13F8B7 +:106CD000017C577013F8023C02F8023F01F10201F7 +:106CE000F2D1D6F8BC10102601F11E0300210822B3 +:106CF0000DF10F00A6EB010C9C44891C1CF8015CF3 +:106D000045701CF802CC00F802CF521EF2D1684642 +:106D100003F030F808ADA06895E80E1000F1780592 +:106D200085E80E100021C0E91A11012180F83F10FA +:106D3000132180F83B1000F05EB9A16891F83B0088 +:106D4000112812BF0E2891F85C000028AFD12069ED +:106D500002F02FFBA168002581F8900081F85B50BC +:106D600081F85650D1F8BC0009884088884218BF85 +:106D7000FFDFA068D0F8BC100D70D0F8D0100A78F2 +:106D8000002A18BFFFDF40F014810288CA80D0F8C3 +:106D9000D02090F890101171D0F8D0100D72D0F86A +:106DA000D0200B2111700188D0F8D000418000F074 +:106DB00000B9A06890F83B10152918BF022040F0D8 +:106DC0000981002580F85B5080F85650D0F8BC103F +:106DD00000884988814218BFFFDFA068D0F8BC1046 +:106DE0000D70D0F8D0100A78002A18BFFFDF40F0ED +:106DF000E08090F85C20A2B180F85C500288CA80E4 +:106E000003E020E08BE089E0D7E0D0F8D0100D71EE +:106E1000D0F8D0200C2111700188D0F8D00041802A +:106E2000C7E00288CA80D0F8D0100D71D0F8D02009 +:106E300001211172D0F8D0200B2111700188D0F8F7 +:106E4000D0004180B5E0A0680023194690F83C20AE +:106E5000303001F0C8FF48B9A0680023072190F83E +:106E60003B20303001F0BFFF00287DD06078002843 +:106E700054D1A06890F85E0010F0020F17D120697D +:106E800002F08DFAA16881F85F00206902F089FAAA +:106E9000A168A1F86000206902F086FAA168A1F853 +:106EA000620091F85E0040F0020081F85E00A06888 +:106EB00090F85E1011F0010F15D190F83C200023DE +:106EC0001946303001F08FFF002808BFFFDF012195 +:106ED000A068042280F83C1080F8B82080F85A108E +:106EE0000021A0F85810A06890F83B10012904D1A7 +:106EF000002180F83B1080F85610D0F8BC200388A1 +:106F00005188994204BF1178042974D1002111706D +:106F100090F83B20002A08BF80F856106BE0A0686C +:106F20000023062190F83B20303001F05CFFD8B1FF +:106F3000607800285FD16946206902F04DFA9DF81B +:106F4000000010F001008DF8000014BF01200020A7 +:106F5000A168002581F86400A06880F85650D0F838 +:106F6000BC100088498800E033E0814218BFFFDF91 +:106F7000A068D0F8BC100D70D0F8D0100A78002AA4 +:106F800018BFFFDF15D10288CA80D0F8D0100D716C +:106F9000DDE90013D0F8D0209160D360D0F8D02084 +:106FA000062111700188D0F8D00001E0E400002033 +:106FB0004180A06880F83B501DE0A068002319467E +:106FC00090F83C20303001F00EFF10B1607818B11D +:106FD00011E0012060700EE0206902F043F9A16821 +:106FE00081F89100052081F83C000020A1F85800AC +:106FF000012081F85A00A068D0E91C12491C42F116 +:107000000002C0E91C120DB0F0BD000030B585B023 +:1070100004466846FBF7FBFC002808BFFFDF00982A +:1070200002F07DF80321009802F093F800980178AF +:1070300021F010010170214602F0EEF8A01E0C288C +:1070400051D2DFE800F006501E5151165042505107 +:10705000312CFD48C06890F8651021B106210098D8 +:1070600002F059F940E090F8CF10009802F053F97F +:107070003AE0F548C06890F89110009802F09BF94A +:1070800032E0F14DE86800F1B801009802F06DF9C6 +:10709000E86800F18C01009802F071F924E0062103 +:1070A000009802F084F91FE0E74DA8680178009885 +:1070B00002F06BF9A8688188009802F068F9A86866 +:1070C0004188009802F067F90EE0002002900390DA +:1070D0009DF8080002A940F001008DF80800009812 +:1070E00002F075F900E0FFDFFBF7A4FC002808BF01 +:1070F000FFDF0C2C04BF05B030BD072C0DD0022CD7 +:1071000004BF05B030BD0021CF48C068A0F85810BA +:10711000012180F85A1005B030BDCB490020C96864 +:10712000A1F8580005B030BD70B50C4605464FF4C7 +:107130009071204603F017FF2580002084F8F000AE +:1071400084F8FC0084F8040184F8120170BDF6F79D +:1071500097BD70B50C4615460721F6F76EFC002862 +:1071600008BF70BD90F8F0200021DAB1002D77D172 +:1071700061700722227090F8F0208AB1018480F8B3 +:10718000F010D0F8F220C4F80220D0F8F620C4F8AD +:107190000620B0F8FA20628190F8F020002AEDD1A4 +:1071A000A1705DE090F8FC2002B3002D58D190F85A +:1071B000FC200B2A0CD00C2A18BFFFDF50D16170C5 +:1071C0000C22227090F8FE20A2700288A2800AE0B1 +:1071D00061700B22227090F8FE20A2700288A280BB +:1071E00090F80221A27180F8FC1039E090F8042197 +:1071F0008AB17DB961700822227002886280D0F85D +:107200000821D0F80C316260A360B0F81021A2818F +:1072100080F8041124E090F812214AB105BB617096 +:1072200011222270B0F81421628080F8121117E048 +:1072300090F81621002A04BF002070BD85B9617046 +:107240001222227090F8162152B100BF80F8161158 +:10725000D0F81821C4F8022090F81621002AF5D1A0 +:10726000012070BD00207047774988607047002179 +:1072700080F83B1080F83C1080F83E1090F8A60093 +:1072800010B10220FEF72CBC0320FEF729BC2DE92B +:10729000F04F6D4C07468DB0E0680D460088F6F75C +:1072A00044FD5FEA000B08BFFFDF60782843607091 +:1072B000A188E06811F0200F4FF000051CBFA0F876 +:1072C0004C5080F8AC5004D1B0F84C20521CA0F8BF +:1072D0004C2011F0600F4FF002084FF0010613D060 +:1072E000E06890F83E1011B1032907D00CE080F857 +:1072F0003E6000210120FEF7F3FB05E080F83E80B0 +:1073000000210120FEF7ECFBE06890F83E10012917 +:1073100005D1A18811F4807F18BF80F83E80002F2E +:1073200040F09B81A18811F4007F18BFA0F8C050E5 +:1073300004D1B0F8C010491CA0F8C01000F09AFBAE +:107340000CA8FBF764FB002800F0E88060780028B8 +:1073500040F0E480E0680123194690F83D20303089 +:1073600001F041FD002849D1D4F80CC09CF8CE00B2 +:1073700038B1ACF850508CF865500220FFF746FE4B +:10738000CCE09CF83C200B2A08BF0B201AD00ADC6A +:10739000012A7BD0052A08BF072013D0092A08BF7D +:1073A00009200FD005E00F2A0FD0102A20D0162A6E +:1073B0007CD0012304210CF1300001F014FD0028E1 +:1073C0001CD187E0FFF722FEA8E0F9F755FF0C2853 +:1073D00014D3E0680821B830F9F74FFF28B1E0680E +:1073E00004218C30F9F749FF00B9FFDF0420E9E7F9 +:1073F0009CF8D100012802D0022849D08EE09CF8E8 +:10740000FC00002841D100220CF1D2094FF01008F5 +:1074100008210DF1FF3000BFA8EB02034B44491EC9 +:1074200013F801AC80F801A013F8023C00F8023F09 +:1074300002F10202F0D10CF1B00800204FF0100C64 +:107440000DF10F01082201E004010020ACEB000364 +:107450004344801C13F8019C81F8019013F8023C0E +:1074600001F8023F521EEED1684602F083FC0DF196 +:107470002008E06898E80E10783080E80E100520AB +:10748000FFF7C4FDE06880F8D15047E015E00DE05B +:107490009CF85C0000281ABF8CF8656002200D2063 +:1074A000FFF7B4FDE06880F8D15037E00620FFF721 +:1074B000ADFDE06880F85A5030E00C20FFF7A6FDE3 +:1074C000E068A0F8585090F85E1041F0010180F893 +:1074D0005E1023E0E06890F83B2090F8E210E9B1FC +:1074E00001230021303001F07EFCB8B1E06890F853 +:1074F000E210042904BF90F85E0010F0030F0DD1D4 +:107500000C20FFF783FDE068A0F8525080F8566029 +:1075100090F85E1041F0010180F85E1000F0A1FFCC +:107520000028E06818BFA0F8A05004D1B0F8A0105F +:10753000491CA0F8A01000F097FF40B1E06890F857 +:10754000AC1002299CBF491C80F8AC1004D8E0683C +:1075500090F8AC00022806D9E068A0F8A050A0F886 +:10756000A25080F8AC50E0680123002190F83C2044 +:10757000303001F038FC20B9E06890F83C00072872 +:1075800056D1E0680123002190F83B20303001F013 +:107590002AFCE8B3E0680123002190F83D20303058 +:1075A00001F021FCA0B3E06890F83E10022904BF6E +:1075B00090F8AC0000283BD15846F5F7E8FE38B308 +:1075C000FBF76CFA20B3E068B0F89A1001292FD9C4 +:1075D00080F8A560B0F84E10B0F84C208B1E9A428F +:1075E000AFBF0121891A491E89B2B0F8A030E288E4 +:1075F00093422FBF0122D21A521C92B2914288BFED +:107600001146012908BF80F8A55090F8C82000E075 +:107610000EE08AB1B0F8A220B0F8CA0082422FBFB3 +:107620000120801A401C80B2814288BF014603E0DD +:10763000E068012180F8A550E068028E114489B20B +:10764000A0F89C1090F83E30002B18BF012B1DD0E5 +:10765000022B1CBF032BFFDF09D0A088C0F3402002 +:107660000028E06818BFA0F8AE5022D11AE090F8C8 +:107670003D30032B0DD090F83C20082A06D0B0F8FE +:107680004E20B0F84C30D21A921E1144A0F8981037 +:10769000E3E7B0F84C30032BF8D3B0F84E101144A8 +:1076A000491CF3E7B0F8AE10B0F89E201144A0F8E2 +:1076B000AE10E06890F8CE1039B990F83D20012363 +:1076C0001946303001F08FFB38B1E068B0F8501047 +:1076D000B0F89E201144A0F850103D212FB1E06871 +:1076E00080F84A1080F8496069E02078022810D0BC +:1076F00001281AD0607800B310F0140F14BF1E21B7 +:1077000010F0080FEBD110F0030F08BFFFDF2A21A4 +:10771000E5E7E06890F86510002914BF06211621FE +:1077200080F84A1080F8496049E0E06890F8D0108D +:1077300080F84A1080F8496041E0E06890F85610FF +:1077400041B1B0F852104A1CA0F85220B0F85420B1 +:10775000914214D290F85A1041B1B0F858104A1C16 +:10776000A0F85820B0F85420914208D2B0F8502028 +:10777000B0F84E108A4208D390F8CE202AB12221C8 +:1077800080F84A1080F8496019E090F83E204AB12C +:10779000B0F84C208A420FD3082180F84A1080F8B4 +:1077A00049600CE0B0F84C10062905D33E2180F862 +:1077B0004A1080F8496002E090F8490088B1E0681A +:1077C00080F83B5080F83C5080F83E5090F8A6007E +:1077D0004FF00001002814BF02200320FEF780F9BB +:1077E00003E000210846FEF77BF9E06880F8A65028 +:1077F0000DB0BDE8F08FFE494A788B781A430DD161 +:1078000050B1087910F0080F04D0C86890F83D0016 +:10781000032803D001207047FEF7E4B8002070472A +:107820002DE9F041F24C05460E46A0882843A08081 +:1078300015F0020F04D015F0010F18BFFFDF26610D +:1078400015F0010F4FF000084FF001071CD0304633 +:10785000666101F007FD062802D00B280BD013E06B +:10786000E06890F83C1012290ED10021C0E91A11ED +:1078700080F83F7008E0E06890F83C100C2904BFE5 +:1078800080F83F8080F85C7015F0020F19D02069F5 +:1078900001F0E8FC052802D00B280BD011E0E068CD +:1078A00090F83C1010290CD10021C0E91C1180F87F +:1078B000407006E0E06890F83C100B2908BF80F8A3 +:1078C000408015F0800F1CBF0820A070BDE8F0813B +:1078D0002DE9F043C64C83B00127216900250191B1 +:1078E000A5806570A5702570E06067F307080646FF +:1078F00080F8A6700088F6F718FA5FEA000908BF5A +:10790000FFDFE0680088FBF77FF8E0680088FBF79E +:10791000A1F8E068B0F89A00D0B101A8FBF777F8B9 +:10792000B0B1E06890F8CE1091B190F83D200123FD +:107930001946303001F057FA50B9E068A0F85050BD +:1079400080F865500220FFF761FBE06880F8A550E1 +:10795000E26892F8F00028B9108C9188884288BFBC +:10796000E08001D89088E080B2F89E00B2F8A010C4 +:10797000401E80B2014489B2A2F8A01092F8A4304F +:10798000002B1CBFA2F8A25082F8A45004D1B2F878 +:10799000A2300344A2F8A230B2F84C300344A2F85B +:1079A0004C30B2F89A30012B9CBF5B1CA2F89A3085 +:1079B000002818BF82F8AC5092F8A50000281CBF20 +:1079C000E08881420FD24846F5F7E1FC58B1E06803 +:1079D00090F8C81039B1B0F8A210B0F8CA008142CE +:1079E00028BF00F044FDE06880F8A55090F83C10F6 +:1079F000062918BF072916D1018EB0F8E420891A8C +:107A000009B200290FDB00F1E601083003F0D1FBD9 +:107A10000221E06800F0C2FFE06880F8E35080F8DF +:107A20003C5080F86670E16801F13000B1F89E20AA +:107A300001F0FFF8E06890F8C810002918BFA0F81E +:107A4000A2506C4800906C4B6C4A3146404600F0A6 +:107A50008AFBE0680123052190F83C20303001F0DA +:107A6000C2F9002818BF00F07AFB03B0BDE8F0832C +:107A700000F0D3BC2DE9F0415D4C4FF002074FF010 +:107A80000005207910F0080F13D0607888B9E068FD +:107A900090F83C10142905D180F85B5080F85A50BA +:107AA00080F83C5090F83D10032904BF277080F8FF +:107AB0003D5000F043F9A1884FF0010611F0040F8A +:107AC00014D0607890B9E06890F83C20062A08BF8E +:107AD00080F8E36003D0082A08BF80F8E37090F8CC +:107AE0003D20022A04BF267080F83D5011F0020F9D +:107AF0004FF0030754D06078002851D12069C07836 +:107B0000801E0C287CD2DFE800F006B636415718FC +:107B1000B622B6298B4CE0680123194690F83D2027 +:107B2000303001F060F900283AD1E06880F83D700B +:107B300080F8565080F85A509EE0E06890F83C007B +:107B4000052818BFFFDFE06880F83C50F2E7E068E6 +:107B500090F83C00092818BFFFDF6FE0E06890F85C +:107B60003C000B2818BFFFDFE0680C2180F85B6049 +:107B700080F83C1080E0E06890F83C000F2818BFC7 +:107B8000FFDFE068102180F85B60F1E7E06890F8C3 +:107B90003C00102818BFFFDF1220E16881F83C008C +:107BA0006AE0E06890F83C00102818BFFFDF14205E +:107BB000E16881F83C005FE0E06890F83C0016283E +:107BC00018BFFFDFE06880F85B5080F85A5090F8EB +:107BD000FC00002818BFFFDFE06890F85C1091B14E +:107BE00080F85C500188A0F8001180F8FE5008E091 +:107BF000040100208F720100F77701002178010055 +:107C000039E00C2107E00188A0F8001180F8FE504F +:107C100080F802610B2180F8FC1080F83C502BE0CA +:107C2000E06890F8E21004290ED0E06801230721F3 +:107C300090F83C20303001F0D6F8E8B1E06880F8E8 +:107C40005A5080F83C5017E090F83B200123002167 +:107C5000303001F0C8F8002808BFFFDFE06890F876 +:107C60005E1011F0020F0EBF80F83B6080F8565096 +:107C700080F8E250D9E7FFDF207910F0100F09D02B +:107C8000607838B9E06890F83C10062904BF0721F5 +:107C900080F83C10A07810F0080F10D0E0680123A5 +:107CA000052190F83C20303001F09DF828B10820E3 +:107CB0006070E06880F8FC5001E000F0DCFBE068F8 +:107CC00090F83C10082918BFBDE8F081018EB0F88B +:107CD000E420491C914206BF61780029BDE8F0818B +:107CE000B0F8EA104288914209D1B0F8EC208388BC +:107CF0009A4204D1B0F8EE20C3889A420ED002888E +:107D0000A0F8F420A0F8F610B0F8EC10A0F8F810E5 +:107D1000B0F8EE10A0F8FA1080F8F060012100F041 +:107D20003DFE00210420FDF7DBFEE06880F8E35013 +:107D300080F83C5080F83E70BDE8F08130B5FF4CD3 +:107D400083B0207910F0010F04BF03B030BD60692B +:107D500001230521C578E06890F83C20303001F01F +:107D600042F8002818BF022D0BD00A2D18BF0B2D8A +:107D700007D0032D18BF062D03D0607840F008000F +:107D80006070607800281CBF03B030BD6069C078A7 +:107D90000D2880F0AB81DFE800F0462207C8FEFE28 +:107DA000FDDBFCFEA3C0FB00E0680123194690F850 +:107DB0003D20303001F017F8002840F0B4816069B0 +:107DC00001F0ABFAE16881F8D000022081F83D00B3 +:107DD000002081F85A0081F8560000F0A4B9E0684C +:107DE0000123002190F83C20303000F0FCFF0028F7 +:107DF00075D06078002840F09681606901F088FABB +:107E0000E168A1F8E4000A8E801A00B247F6FE721B +:107E10008242A8BF00285ADDE631606901F06FFA9E +:107E20000620E1683FE0E0680123002190F83C2053 +:107E3000303000F0D8FF00285FD06078002840F094 +:107E40007281606901F037FA88B3606901F030FA35 +:107E5000E168A1F8E4000A8E801A00B247F6FE72CB +:107E60008242A8BF002832DD606901F01BFAE16898 +:107E700081F8E600606901F010FAE168A1F8E80015 +:107E8000606901F0F5F9E168A1F8EA00606901F0C4 +:107E9000F6F9E168A1F8EC00606901F0F7F9E16832 +:107EA000A1F8EE00082081F83C0000F03CB9FFE7A3 +:107EB000E0680123002190F83C20303000F093FF6F +:107EC00068B16078002800F01F8100F02CB92820EC +:107ED00081F84A00012081F8490000F024B90CE043 +:107EE000E0680123002190F83C20303000F07BFF57 +:107EF00018B1607828B100F016B90120607000F068 +:107F000012B9E0680021A0F85810012180F85A1039 +:107F10000B2180F83C1000F006B9E06890F83C10A6 +:107F20000C2908BF0D214CD143E0E068012300215A +:107F300090F83C20303000F056FF20B9E06890F80F +:107F40005C0000287ED06078002801D101E06070DC +:107F5000E9E0E06800210125A0F8581080F85A50A7 +:107F600000F1B001606901F0F1F9E06800F1880109 +:107F7000606901F0F6F9E06890F80401002818BF84 +:107F8000FFDFE0680188A0F8061100F5847103E0C6 +:107F90001EE087E010E0A9E0606901F0C5F9E06843 +:107FA00000F58871606901F0C7F9E06880F8045154 +:107FB0000F2180F83C10B6E0E06890F83C101229E0 +:107FC00001D00220C3E7002180F85A101621F0E703 +:107FD000E0680123002190F83C20303000F003FFDE +:107FE00048B9E0680123072190F83B20303000F0C9 +:107FF000FAFE002826D06078002852D1E06890F878 +:108000005E0010F0020F17D1606901F0C8F9E16855 +:1080100081F85F00606901F0C4F9E168A1F86000CF +:10802000606901F0C1F9E168A1F8620091F85E00B1 +:1080300040F0020081F85E00E06890F85E1011F0F8 +:10804000010F00E05EE015D190F83C2001230021F3 +:10805000303000F0C8FE002808BFFFDF0121E068D3 +:10806000042280F83C1080F8E32080F85A100021A8 +:10807000A0F85810E06890F83B10012904D10021C5 +:1080800080F83B1080F8561090F8E21004294AD18D +:10809000002180F8E21090F83B20002A08BF80F809 +:1080A000561040E0E0680123002190F83C20303079 +:1080B00000F099FE30B3607818BB6946606901F042 +:1080C00081F99DF8000010F001008DF8000014BF48 +:1080D00001200020E16881F86400E0680021A0F838 +:1080E0005810012180F85A10092162E7E068012345 +:1080F000002190F83C20303000F075FE10B160781F +:1081000010B110E0012022E7606901F0ABF8E168EE +:1081100081F89100052081F83C000020A1F858006A +:10812000012081F85A00E068D0E91C21521C41F17D +:108130000001C0E91C2103B030BD00000401002093 +:10814000F9480078002818BF0C20704730B5F64C6D +:1081500005462078002818BFFFDF657230BDF24960 +:108160000120087270472DE9F047EF4C8146DDF899 +:10817000208020781E4617460D4628B9002F1CBFC8 +:10818000002EB8F1000F00D1FFDFC4F81C80C4E955 +:108190000C95C4E9057600202072E0712071E07032 +:1081A0006071A071E14EA070608130784FF00108DD +:1081B00005F130072888F5F7B8FDA0622888F5F7A3 +:1081C000A2FDE062FAF7BCF80120F9F7CAFDFAF760 +:1081D0000CF905F11100FAF79CF805F10D00F9F71B +:1081E000C7FE307800280CBF03200120FAF7A5F85D +:1081F000387EF9F7C5FE0120F9F7A2FDFAF797F8E6 +:10820000397CCB48002914BFCA49CB49016030787A +:108210004FF0010170B10120F9F726FF7068D0F826 +:10822000A800FAF79BF800BF84F80080BDE8F0478B +:10823000FAF78EB80020F9F717FFF5E72DE9F047B8 +:10824000DFF8E89282B0484600264068012700F136 +:1082500030041B20ADF8000060794FF00208A9F14E +:10826000300570B301285AD002285CD0032818BF0B +:10827000FFDF62D0286A0823017821F0080101702D +:10828000A27903EAC202114321F004010170E279EC +:10829000042303EA8202114321F01001017094F8D3 +:1082A00005A0A86AF5F781F80646FAF7F7FBBAF1D8 +:1082B000020F49D0BAF1010F49D0BAF1030F49D0EA +:1082C0004BE0FFE79D48FAF7C8FB40B1296AAF7061 +:1082D0006A694FF48060904703206071CAE701AA81 +:1082E0006946A86AF4F752FF286210B194F82B107F +:1082F00021B19248FAF785FB6771BBE79DF804103E +:1083000021B906808670012100F023FFBDF800002E +:10831000C1B2286A01F065F884F80580AAE78748A9 +:10832000FAF76FFBA6E701AA6946A86AF4F72EFFE1 +:108330002862002808BFFFDF9CE78048FAF78DFB22 +:10834000002808BFFFDF95E7B04306D103E0B04344 +:1083500003D100E00EB1012100E00021286A02787B +:1083600042EA01110170E17B00291CBF61790129FA +:1083700026D004F14801724891E80E1000F1480639 +:1083800086E80E10A16DC0F86110E16DC0F86510AF +:108390002230F9F7E0FF99F8000000280CBF012116 +:1083A000002168480176D4E90E12C0E90412A0F158 +:1083B00026012A6AF9F711FC0020F9F71FFC03E0F7 +:1083C000F9F7C9FFF9F741FC99F8000028B1286ACC +:1083D000007810F0100F05D00CE001210846FAF7E4 +:1083E0007CF80AE05848007810F0100F04BF287994 +:1083F000002802D0A8780028EFD06879002804BFB0 +:108400006F71F9F7D0FF286A0188A9818078A87375 +:1084100085F8008002B0BDE8F087434810B50078C9 +:10842000012818BFFFDFF9F78BFF40480178446847 +:1084300011B9FFF703FF01E000F0BCF994F8280040 +:10844000012818BF10BDBDE81040FAF723B8364820 +:1084500010B50078032818BFFFDFBDE8104000F01A +:10846000F4B93148407970472F48007970472E4958 +:108470000120887170472DE9F0412C482A4D0126D2 +:1084800001784068002700F13004686A417801F003 +:108490001F08E96A02F09AF868B1012821D0022881 +:1084A00034D003281CBFFFDFBDE8F081E86ABDE8D7 +:1084B000F041F5F7E4B801224146E86AF4F7FAFF23 +:1084C000D4E91010491C40F10000C4E91010E07913 +:1084D000012814BFE671E771687ABDE8F041F1F751 +:1084E0006FB800224146E86AF4F7E4FFD4E91001CE +:1084F000401C41F10001C4E91001E079012802D1DA +:10850000E771BDE8F081E671BDE8F081E86AF5F752 +:10851000B6F8D4E91010491C40F10000C4E910106D +:10852000E0790128EFD1EBE71C0100204C0100208D +:10853000181500401F0003021B0003023C0100202D +:10854000F8100020401100202B0100202DE9F041FF +:10855000F04F4FF000083846A7F13004406801267C +:1085600000F130052078022818BFFFDFA87850B14D +:1085700085F80280A67062694146042090473878E9 +:10858000002818BF2E71206A0321007831EA00000C +:1085900004BFE878002805D1EE70216AA6706269F0 +:1085A000022090470121002000F072F918B1BDE8C7 +:1085B000F04100F04AB9BDE8F04100F0FBB82DE908 +:1085C000F05FD44E82463046A6F1300540684FF049 +:1085D000000800F1300928780127032818BFFFDFC1 +:1085E0006889BAF1000F40F40070688104BF40F060 +:1085F0004000688100F0CE80F9F73DFB98B999F80A +:10860000100080B1686A417811F01F0F0BD000781C +:1086100099F80710C0F3C000884204D1EF70BDE89C +:10862000F05F00F012B9686A0188A5F80F10807831 +:108630006874688940F02000688185F8048070685B +:1086400000F1300B044690F82800012813D1F9F707 +:1086500017FF5946204600F09BFB60B13078002898 +:1086600070680CBFC83000F58B70218841809BF882 +:10867000081001710770686A99F806100078C0F355 +:108680008000884233D0706800F1300490F83500E3 +:1086900048B3022844D000BF84F80580307838B150 +:1086A0002079414620B12171AF706A69102090474E +:1086B000E07890B184F80380FAF7DEF9002808BF6B +:1086C000FFDF0820AF706A6900219047D4E90E10DF +:1086D000491C40F10000C4E90E10A07901280CBF2C +:1086E00084F80680A771688940F480706881686AA0 +:1086F00099F807300178C1F3C0029A424AD17268F2 +:1087000001F0030102F13004012918BF02292ED023 +:1087100003291CBFE87940F0040012D0E87139E069 +:10872000A86AF4F76DFD002808BFFFDFD4E90E103A +:10873000491C40F10000C4E90E10687AF0F740FFD0 +:10874000AAE700F02AFD70B1A770696AAF706A6984 +:1087500038469047E079012803D100BF84F80780AC +:1087600018E0E77116E0E87940F01000D6E74078AD +:1087700010F01F0F17D0697861B900F01F001B2897 +:10878000F1D8287A20B180206A690021904701E061 +:10879000FFF771FE5146012000F07AF838B1BDE8CC +:1087A000F05F00F052B8E0790128DAD1D6E7BDE8F1 +:1087B000F05F43E570B5584C1B21E06AF4F723FEE7 +:1087C000002101226062002811BF6170627053486D +:1087D0006062504E3078706800F1300590F84000CB +:1087E00038B305F148014D4891E80E1000F1480EEC +:1087F0008EE80E10A96DC0F86110E96DC0F8651023 +:108800002230F9F7A8FD307800280CBF01200020A5 +:1088100080F0010142480176D5E91012C0E9041246 +:10882000A0F12602616AF9F7D8F90120F9F7E6F913 +:1088300004E0606AF9F78FFDF9F707FA01210020DB +:10884000F9F74BFE0320207070BD70B5314900254B +:108850004C68F9F7E7FDF9F7D9FDF9F7FBFCF9F7F3 +:108860005EFDF9F7F2F9F9F7CDFDF9F771FD94F82E +:108870002800012808BFF9F703FE274C0021626990 +:1088800060899047E269E179E0789047257070BD92 +:1088900070B5214C0546002908BF012D05D120796E +:1088A000401CC0B22071012831D8A16928468847F0 +:1088B00000282CD0A1791B4841B1012D01BF41787E +:1088C00011F01F0F017811F0100F20D0E179F1B9EC +:1088D00010490978002918BF002102D0294304D08B +:1088E00013E0012D18BF0121F8D10F49097811F0CB +:1088F000100F04BF007810F0100F08D0A07830B926 +:10890000607810B111F0100F01D0002070BD01206F +:1089100070BD00004C0100201C010020F810002058 +:10892000401100202B0100202801002010B50A7BF7 +:1089300002F01F020A73002282758B181B7A03F063 +:10894000010C5B0803F00104A4445B0803F001047C +:10895000A4445B0803F00104A4445B0803F0010491 +:1089600064444FEA530C0CF0010323444FEA5C0CBF +:108970000CF00104234403EB5C0300EB020C521CDB +:108980008CF8113090F816C0D2B263448375052A72 +:10899000D3D3D8B2252888BFFFDF10BD0A4610B454 +:1089A0000021032A0DD04FF4FA4C002A60D0012A8E +:1089B0007ED0022A1CBF10BC7047014610BC30306C +:1089C000B4E7018680F8361080F8371080F83B1045 +:1089D00080F83C1080F83D1080F83E1080F832108E +:1089E00080F8331080F8341080F8351080F8491082 +:1089F000A0F84C10A0F8521080F85610A0F85810AB +:108A000080F85A1080F8471080F8481080F83F101E +:108A100080F8401080F85B1080F85C1080F85E10E1 +:108A2000012280F86420A0F8501080F86610A0F8A9 +:108A30009810A0F89A10A0F89C10A0F89E10A0F82A +:108A4000A010A0F8A21080F8A510A0F8AE1080F831 +:108A5000AC10A0F8C010A0F8C21080F82810018453 +:108A600080F8C81080F8CE1080F8D11010BC704784 +:108A7000A0F8AE1080F8A6104288C488A0F84C1068 +:108A8000B0F8501000F13003514391FBF2F1A0F81F +:108A90005010E100B1FBF2F1491C89B201FB02F474 +:108AA000A0F84E10B4F5C84FC4BF491ED98300E0EA +:108AB00004E0BCFBF2F1491C99847EE7A0F8AE10FB +:108AC00000F130024488B0F8EA30B0F8EE0091834B +:108AD000118CC0006143B0FBF3F091FBF3F1401C3B +:108AE000118480B200FB03F1D083B1F5C84FC4BF3D +:108AF000401ED083BCFBF3F0401C908410BC704738 +:108B00000A4610B40021032A0DD04FF4FA4C002A73 +:108B10004FD0012A6DD0022A1CBF10BC70470146FD +:108B200010BC303002E7018680F8361080F837102C +:108B300080F83B1080F83C1080F83D1080F83E1023 +:108B400080F8321080F8331080F8341080F8351037 +:108B500080F84910A0F84C10A0F8521080F8561078 +:108B6000A0F8581080F85A1080F8471080F8481084 +:108B700080F83F1080F8401080F85B1080F85C109F +:108B800080F85E10012280F86420A0F8501080F870 +:108B90006610A0F8A01080F8A21080F89810C0F815 +:108BA0009C1080F8281080F8B41080F8C41010BC15 +:108BB00070474288C488A0F84C10B0F8501000F1FB +:108BC0003003514391FBF2F1A0F85010E100B1FBEA +:108BD000F2F1491C89B201FB02F4A0F84E10B4F581 +:108BE000C84FC4BF491ED983BCFBF2F1491C99840C +:108BF00095E7D0F8BC4000F1300243886089E489F1 +:108C00009183118C594391FBF0F11184E100B1FB88 +:108C1000F0F1491C89B201FB00F3D183B3F5C84FD1 +:108C2000C4BF491ED183BCFBF0F0401C908410BC33 +:108C30007047837D0BB1252B01D912207047002A84 +:108C400004BF0020704770B490F817C00C7E894DA7 +:108C500004FB02C22C464FF0000CE2FB054C4FEA2D +:108C60001C1C6FF024040CFB0422D2B201EBD20CCA +:108C7000C27502F007059CF808C0012404FA05F546 +:108C80001CEA050F18BF02762CD1B2FBF3FC03FBE4 +:108C90001C22521CD2B24FF0000C00BF00EB0C03A0 +:108CA0005B7C93423CBFD21AD2B20ED301EB0C05CF +:108CB00000232D7A04FA03F635421CBF521ED2B2AD +:108CC0006AB15B1CDBB2082BF4D30CF1010303F097 +:108CD000FF0CBCF1050FE1D370BC1F20704703EB04 +:108CE000CC01017670BC0020704730B50D460446BB +:108CF000072988BFFFDFE07805F0070100F050008A +:108D0000084340F08800E070A07800F0A70040F031 +:108D10001800A070607800F05E0040F020006070E5 +:108D2000207800F0BC0040F04000207030BD017998 +:108D300031F01F0113BF002000221146704710B40C +:108D4000435C491C03F0010C5B0803F00104A444DC +:108D50005B0803F00104A4445B0803F00104A4448D +:108D60005B0803F00104A4445B0803F001045B0802 +:108D7000A44403F00104A4440CEB53031A44D2B2FC +:108D80000529DDDB012A8CBF0120002010BC7047C3 +:108D900038B505460C466846F9F787FB002808BF3A +:108DA00038BD9DF90020227294F909100020511A53 +:108DB00048BF494295F829308B42C8BF38BDFF2BC8 +:108DC00008BF38BDA17A491CC9B2A17295F82A30F2 +:108DD000994203D8617A7F2918BF38BD627200209A +:108DE000A072012038BD10B4A2F10B0C08293AD2B0 +:108DF000DFE801F004060B10131D333782B332E0B5 +:108E0000022A18BF032A31D02DE0072A18BF062AEC +:108E10002CD028E0082A29D025E01BB1BCF10B0F8B +:108E200024D920E0A2F10A000B281FD91BE01BB1B6 +:108E3000BCF10B0F1AD916E00D2A18BF0C2A15D059 +:108E400090F82C0020B10D2A0DD3152A0ED90AE076 +:108E5000112A08D3152A09D905E0092A06D002E00B +:108E600004E0012A02D010BC0020704710BC012091 +:108E70007047000053E4B36E282102F052B830B5B9 +:108E80000546007801F00F0220F00F001043287013 +:108E900007290BD2DFE801F00406040604080400E9 +:108EA000062405E00C2403E0222401E00024FFDF77 +:108EB000687820F03F002043687030BD007800F0F3 +:108EC0000F0070470A68C0F803208988A0F80710CF +:108ED0007047D0F803200A60B0F807008880704718 +:108EE0000A68C0F809208988A0F80D107047027838 +:108EF000402322F0400203EA8111114301707047C0 +:108F00000078C0F3801070470278802322F080023E +:108F100003EAC111114301707047D0F80320C1F872 +:108F20000920B0F80720A1F80D200A7822F080026D +:108F30000A700078800942EAC0100870704770B566 +:108F400015460E4604461F2A88BFFFDF2A463146D3 +:108F500004F1090001F06EFF6078A91D20F03F00C8 +:108F600001F03F010843607070BD70B50546407860 +:108F70000E4600F03F04062C38BFFFDFA01FC4B22E +:108F80001F2C88BF1F24224605F10901304601F03D +:108F900051FF204670BD70B515460E4604461F2A87 +:108FA00088BFFFDF2A46314604F1090001F042FF85 +:108FB0006078A91D20F03F0001F03F010843607078 +:108FC00070BD70B5054640780E4600F03F04062C93 +:108FD00038BFFFDFA01FC4B21F2C88BFFFDF2246AF +:108FE00005F10901304601F025FF204670BD0968F2 +:108FF000C0F80F1070470A88A0F8132089784175CF +:1090000070474176090A81767047C176090A01776F +:1090100070474177090A81777047C175090A01765F +:1090200070478175704790F8242001F01F0122F0ED +:109030001F02114380F82410704790F82420E02389 +:1090400022F0E00203EA4111114380F82410704736 +:109050001F3002F0AEB84178007801F03F0110F007 +:109060000F0006D0012808D0022809D006280BD00E +:109070000FE0881F1F280AD90BE00C2909D106E050 +:10908000881F1F2803D904E0881F1F2801D801204A +:109090007047002070474178007801F03F0100F0F0 +:1090A0000F00042805D1062903D325299CBF0120E0 +:1090B00070470020704710B4017801F00F010329B8 +:1090C00022D0052925D14478B0F81910B0F81BC07A +:1090D000B0F81730827D04F03F04222C19D1062904 +:1090E00017D3B1F5486F98BFBCF5FA7F11D282B1A2 +:1090F000082A98BF8A420CD28B429CBFB0F81D0050 +:10910000B0F5486F05D807E0407800F03F000C2824 +:1091100002D010BC0020704710BC012070472221F3 +:1091200001F0FFBE00B5027801F0030322F0030254 +:109130001A4302704278012922F01F02427014BFC4 +:10914000022900BD032912BFFFDF42F00101417077 +:1091500000BD01F0030300B5027822F003021A43B8 +:1091600002704278012922F01F02427014BF0229C6 +:1091700000BD032912BFFFDF42F00101417000BDB5 +:10918000007800F0030070470278102322F01002EC +:1091900003EA01111143017070474178C07801F072 +:1091A0001F010E2832D2DFE800F0070A0D10131657 +:1091B000191C1F2225282B2E0C2929D02AE008292A +:1091C00026D027E0022923D024E0172920D021E04F +:1091D0000D291DD01EE001291AD01BE0012917D04E +:1091E00018E0022914D015E0092911D012E009294C +:1091F0000ED00FE001290BD00CE0012908D009E0C6 +:10920000062905D006E0022902D003E01B2901D877 +:10921000012070470020704730B50546C1700E2907 +:1092200018D2DFE801F007090B0D0F11110B131312 +:109230001111150B0C240FE008240DE002240BE0A3 +:10924000172409E00D2407E0012405E0092403E0C8 +:10925000062401E00024FFDF687820F01F0020438F +:10926000687030BDC0787047C171090A01727047DB +:10927000B0F8070070474172090A81727047B0F870 +:1092800009007047C172090A01737047B0F80B00FA +:1092900070474171090A81717047B0F80500704745 +:1092A00001717047007970474173090A81737047F3 +:1092B000B0F80D00704730B4B0F80720504DB0F84A +:1092C00009C0B0F805300179941F2D1998BFBCF57D +:1092D000FA7F0ED269B1082998BF914209D2934210 +:1092E0009FBFB0F80B00B0F5486F012030BC98BFAD +:1092F0007047002030BC7047001D01F05ABF021DAE +:109300000846114601F055BF4172090A8172704743 +:10931000B0F80900704701717047007970470A681A +:10932000426049688160704742680A6080684860AE +:1093300070470988818170478089088070470A6872 +:10934000C0F80E204968C0F812107047D0F80E20FF +:109350000A60D0F81200486070470968C0F816101B +:109360007047D0F81600086070470A684260496884 +:109370008160704742680A60806848607047096889 +:10938000C1607047C06808607047017170474171E3 +:10939000090A81717047C171090A01727047007929 +:1093A0007047B0F805007047B0F8070070470171CA +:1093B000704700797047017170470A6842604968D8 +:1093C0008160704742680A608068486070470A6838 +:1093D000426049688160704742680A6080684860FE +:1093E000704730B50C4605461B2988BFFFDF6878FB +:1093F00004F01F0120F01F000843687030BD00001A +:1094000086F3FFFF70B50446C2F11005281901F07C +:1094100011FD15F0FF0108D0491EC9B2802060542B +:109420002046BDE8704001F07CBD70BD30B505E060 +:109430005B1EDBB2CC5CD55C6C40C454002BF7D116 +:1094400030BD10B5002409E00B78521E44EA4303F6 +:1094500000F8013B11F8013BD2B2DC09002AF3D13C +:1094600010BD30B50C46097889B01546012049B1C8 +:10947000012905D12978042902D105201070002086 +:1094800009B030BD60680590CDF818D00D210DF100 +:10949000030001F046FDA0680188ADF80010807857 +:1094A0008DF802000120207006208DF81000606AFF +:1094B0000890294604A8F5F745FEE1E72DE9F041BB +:1094C0000C46097892B0154601204FF0020CFE4F71 +:1094D00006264FF0040869B101291ED0022946D0A2 +:1094E000032904D12978042901D11670002012B073 +:1094F000BDE8F081606850B1CDE90107012020701E +:109500008DF80060606A04901146684665E084F852 +:1095100000C085F80080576027E029780429E6D14B +:10952000696810222069FFF78CFF6868C07B00061D +:1095300006D5E54A2069102310320146FFF776FF71 +:10954000D4E904101022FFF77CFF2069C07B0006DD +:1095500006D5DD4A6069102310320146FFF766FF29 +:1095600084F800C085F800806F600320BFE7297889 +:109570000429BCD1A08910280CD9A0F1100080B218 +:10958000A081A1684FF01003014468466A68FFF7A4 +:109590004DFF18E004D14FF010032269A16807E0E5 +:1095A000C2B20DA8A168FFF72DFF626910230DA9B3 +:1095B00009A8FFF73BFF102309A968466A68FFF76F +:1095C00035FF0320207060680590CDF818D08DF825 +:1095D0001060606A0890294604A8F5F7B3FD86E795 +:1095E0002DE9F04107460D4601200B7807213BB1DC +:1095F000012B04D11378062B01D11170002077E7DD +:109600006C69012620226170E8686060686A6062A7 +:10961000A168287C0870A681A068A968401C01F098 +:1096200009FCA08920222030A081A068696821302F +:1096300001F000FCA08921462030A0812E70384620 +:10964000BDE8F041F5F795BD2DE9F05F0D46834685 +:1096500001200978174606464FF00708D1B1DFF818 +:1096600068A24FF00009AAF1080A012923D00229B3 +:109670007ED003290CD13978062909D179681022C6 +:10968000E86901F0D7FB08203870183500207D60AC +:10969000BDE8F09F2C6A8C48202284F8018020309D +:1096A00060602020A081686A60626968A06801F03B +:1096B000C1FB2E70D4E039780629E9D12C6A84F8F0 +:1096C0000180686A606251681022E86901F0B2FBAB +:1096D000E8696060A0684F4680F80090A681A068A5 +:1096E0004670A089401C80B2A081A16808446969C5 +:1096F00051F8012F026089888180A089801D80B285 +:10970000A0816969A268097801F001011154A0895A +:10971000401C80B2A081A1680844296951F8012F3A +:10972000026089888180A089801D80B2A08129691A +:10973000A268097801F001011154A0891022401C8F +:1097400080B2A081A1680844E96801F073FBA08998 +:109750001022103080B2A081A1680844A96801F0ED +:1097600069FBA089103080B2A081A168014400E0AB +:109770000DE0DAF804000860A089001D80B2A08125 +:10978000A1680F54A089401CA081022067E03978AD +:10979000062992D151681022A86901F04BFB2C6A6E +:1097A00084F80180E8696060686A6062A16881F895 +:1097B0000090A681A0684670A089401C80B2A0815C +:1097C000A1680844696951F8012F02608988818085 +:1097D000A089801D80B2A0816969A268097801F022 +:1097E00001011154A089401C80B2A081A1680844E5 +:1097F000296951F8012F026089888180A089801D24 +:1098000080B2A0812969A268097801F00101115490 +:10981000A0891022401C80B2A081A1680844E96898 +:1098200001F008FBA0891022103080B2A081A1684D +:109830000844A96801F0FEFAA089103080B2A08126 +:10984000A1680144DAF804000860A089001D80B214 +:10985000A081A1680E54A089401CA081032028701B +:1098600021465846BDE8F05FF5F783BC70B50D465C +:1098700006460978012041B1012905D11178062950 +:1098800002D109201070002070BD2C6A0720607082 +:1098900068686060686A6062E969A06851F8012FD1 +:1098A0000260898881800620A081E869A16800782B +:1098B00000F001008871A089401C80B2A081A168DD +:1098C0000844A96902E000006AB5010051F8012FBF +:1098D000026089888180A089801D80B2A081A969E9 +:1098E000A268097801F001011154A089401C80B2DE +:1098F000A081A168084469690A880280897881701A +:10990000A0891022C01C80B2A081A16808442969E6 +:1099100001F090FAA0891022103080B2A081A168D5 +:109920000844E96801F086FAA0891022103080B25C +:10993000A081A1680844A96801F07CFAA0892146A9 +:109940001030A081012028703046BDE87040F5F746 +:1099500010BC70B50D4606460978012059B10129A1 +:1099600008D11178062905D10A20107050680068C6 +:109970005060002070BD6C69072010226070E8689C +:109980006060686A60622969A06801F053FA10207B +:10999000A081A06820221030A96801F04BFAA089AC +:1099A0002022203080B2A081A1680844696801F0BB +:1099B00041FAA08921462030A0810120287030463C +:1099C000BDE87040F5F7D5BB70B50C4601200978AD +:1099D0008EB01546062659B1012934D0022905D189 +:1099E0002978042902D10B20107000200EB070BD20 +:1099F000606910236A46007800F001008DF80000CD +:109A0000A069007800F001008DF80100E0680168AD +:109A1000CDF802108188ADF8061080798DF8080025 +:109A200020690168CDF809108188ADF80D108079A2 +:109A30008DF80F006068059009A80690A168FFF7EF +:109A4000F5FC01201DE029780429CFD1A06910235D +:109A50006A4650F8011F00918088ADF804006069E3 +:109A600050F8011FCDF806108088ADF80A000020DC +:109A700003906068059009A806906968FFF7D6FC16 +:109A8000022020708DF81060606A0890294604A8B2 +:109A9000F5F758FBAAE700B50B7889B001204BB168 +:109AA000012B05D11178042902D10C20107000205F +:109AB00009B000BD4868019005A80290C868036815 +:109AC000059340680690886803680793406808908B +:109AD0000120087006208DF80000486A04901146A5 +:109AE0006846F5F72FFBE3E700B50B7889B0012056 +:109AF00043B1012BDCD111780429D9D10D2010708C +:109B00000020D5E74868019005A80290886803689E +:109B10000593406806900020079008900120087087 +:109B200006208DF80000486A049011466846F5F753 +:109B300009FBBDE700B50B7889B0012043B1012BCB +:109B4000B6D111780429B3D10E2010700020AFE7F0 +:109B500048680590CDF818D088680088ADF80000F6 +:109B6000C8680088ADF802000020019002900390C0 +:109B70000120087006208DF81000486A08901146F0 +:109B800004A8F5F7DFFA93E730B403460C78012018 +:109B90005CB1012C15D0022C05D111780D2902D110 +:109BA0000F201070002030BC704701200870C8687A +:109BB000052242704A6842600B4A8260921EC2606F +:109BC0000BE014780E2CEED102200870C868042433 +:109BD0004470526842608A688260496A4162014604 +:109BE00030BC1846F5F7C5BA64B501002DE9F0415F +:109BF0000C4611490D68104A104908321160A0F155 +:109C00002001342901D301200CE0482810D040CC99 +:109C10000B4F94E80E0007EB8000241F50F8807C67 +:109C20003046B84720600448001D0560BDE8F0815B +:109C30002046E7F7C5FAF5E71005024001000001EC +:109C40009CB5010010B54C4800F042FA00B1FFDFAE +:109C50004948401C00F03CFA002800D0FFDF10BD4E +:109C60002DE9F05F454D8246D5F800900126424827 +:109C700000F036FA404C18B90026601C00F046FA95 +:109C80003F494FF0000E4FF0010B00BFC1F804B088 +:109C9000C1F800E1C1F804E1C5F800A0C1F800B0C6 +:109CA000384A4FF480434FF0E0274FF0030C1AE09E +:109CB0001068C00617D5C7F88032EFF3108010F097 +:109CC000010072B600D00120C1F804C3D1F80081B0 +:109CD000B8F1000F05D1D1F80481B8F1000F00D11F +:109CE00020BF00B962B6D1F8000118B9D1F804015B +:109CF0000028DDD0D1F804010028C7D12EB1C5F865 +:109D00000090601C00F0ECF907E0601C00F0E8F93E +:109D10000028B2D1184800F0F9F90020BDE8F09F02 +:109D20002DE9F0438DB00D46064600240DF11009D3 +:109D30000DF1200818E000BF04EB4407102255F88D +:109D40002710684601F076F805EB87071022484691 +:109D5000796801F06FF86846FFF782FF10224146EC +:109D6000B86801F067F8641CB442E5DB0DB0002070 +:109D7000BDE8F08374E700005401002004E50040D2 +:109D800000E0004010ED00E0C74800210170817044 +:109D9000704770B5C54D01232B60C54B1C68002C66 +:109DA000FCD0002407E00E6806601E68002EFCD080 +:109DB000001D091D641C9442F5D30020286018681A +:109DC0000028FCD070BD70B5B74E0446B94D307850 +:109DD000022800D0FFDFAC4200D3FFDF7169B64834 +:109DE000012903D847F23052944201DD0322427127 +:109DF000491C7161291BC160AF497078BDE8704092 +:109E0000F6F722B970B5A84C0D466178884200D0AB +:109E1000FFDFA84E092D4FD2DFE805F04E052231B5 +:109E20004E4E4E4E3C002078022800D0FFDF03202B +:109E30002070A078022802D0012804D008E0A06891 +:109E400000F0F4FB04E004F1080007C8FFF7A1FFED +:109E5000052020700020A070BDE87040F5F7D5BB4C +:109E6000F5F7A2FC01466068F6F7E6FEB04202D2C2 +:109E7000616902290BD30320F7F746F912E0F5F7E1 +:109E800093FC01466068F6F7D7FEB042F3D2BDE816 +:109E9000704098E7207802280AD0052806D0FFDF16 +:109EA00004202070BDE8704000F0F4B8022000E00B +:109EB0000320F7F729F9F3E7FFDF70BD70B505461A +:109EC000F5F772FC784C60602078012800D0FFDF45 +:109ED00079490220087000220A718D6004224A71BB +:109EE000744ACA6020706078BDE87040F6F7ACB87C +:109EF00010B56D4CA07808B9207808B1112010BDBC +:109F00006E48F5F7ECFB6070607820B1012020709E +:109F10000020606110BD032010BD0246010B01202E +:109F2000B2F5003F02D2884000F014BFB2F5802F96 +:109F300003D22039884000F015BFB2F5C02F03D2FC +:109F40004039884000F017BFB2F5002F03D26039C6 +:109F5000884000F019BF002070472DE9F0411446F9 +:109F600000EB84070E4605463F1F00F072FB4FF0E2 +:109F700080510A69504306EB8402121FB24201D29B +:109F8000012200E000221CB10969B4EB910F02D953 +:109F90000920BDE8F0814A498D4216D3AF4214D35F +:109FA000854205D2874203D245EA0600800701D0E8 +:109FB0001020EEE78E4208D33AB92846FFF7ADFFEE +:109FC00018B93846FFF7A9FF08B10F20E1E73D486F +:109FD0003D490068884205D0224631462846FFF7B1 +:109FE000D8FE10E0FFF784FF0028D2D12E480121CF +:109FF0008560C0E9036481704FF4A97104FB01F02E +:10A000001830FFF75BFF0020C3E770B54FF08055B5 +:10A01000044628692A49B1FBF0F084420AD300F0D3 +:10A0200018FBA04201D8102070BD28696043FFF7DB +:10A0300074FF08B10F2070BD224823490068884290 +:10A0400004D02869604300F0F1FA0CE0FFF750FFFC +:10A050000028F0D129691448614381600221817090 +:10A060001A48FFF72BFF002070BD1548010B012097 +:10A070008840401E704770B50D460446FFF7F5FF57 +:10A08000204201D00F2070BD29462046BDE8704017 +:10A0900000F083BE10B5044C6078F5F76FFB00202C +:10A0A0002070A07010BD00005801002004E50140A0 +:10A0B00000E40140105C0C0068110020059E0100C6 +:10A0C00000C0010098000020BEBAFECA7C5E0100FC +:10A0D0000021017008467047014600200870704753 +:10A0E000EFF3108101F0010172B60278012A01D06C +:10A0F000012200E000220123037001B962B60AB117 +:10A10000002070474FF400507047E9E7EFF31081EB +:10A1100011F0010F72B64FF00002027000D162B66A +:10A1200000207047F2E700004C49096801600020F8 +:10A1300070474A4908600020704701218A0720B112 +:10A14000012804D042F204007047916700E0D16713 +:10A150000020704742490120086042F20600704723 +:10A1600008B504233E4A1907103230B1C1F8043350 +:10A17000106840F0010010600BE0106820F0010052 +:10A180001060C1F808330020C1F8080135480068A4 +:10A190000090002008BD3249103140B101280AD09A +:10A1A00002280FD0032812D042F205007047086839 +:10A1B00020F01E0003E0086820F01E00801C0860EC +:10A1C00000207047086820F01E00001DF7E70868AF +:10A1D00020F01E00801DF2E7214924310A68024365 +:10A1E0000A60002070471E4924310A6882430A60D1 +:10A1F000002070471A492431096801600020704727 +:10A2000017491C310A6802430A600020704714494C +:10A210001C310A6882430A600020704710491C31D3 +:10A22000096801600020704702000F494FF00000EC +:10A2300003D0012A01D0072070470A6070474FF011 +:10A2400080410020C1F808014FF0E020802180F813 +:10A2500000140121C0F80011704700000004004004 +:10A260000005004008010040780500406249634B4A +:10A270000A6863499A42096801D1C1F3100101607B +:10A28000002070475C495D4B0A685D49091D9A4290 +:10A2900001D1C0F310000860002070475649574BA9 +:10A2A0000A68574908319A4201D1C0F3100008608A +:10A2B0000020704730B5504B504D1C6842F20803E7 +:10A2C000AC4202D0142802D203E0112801D3184670 +:10A2D00030BDC3004B481844C0F81015C0F8142511 +:10A2E000002030BD4449454B0A6842F209019A42B8 +:10A2F00002D0062802D203E0042801D308467047A2 +:10A30000404A012142F83010002070473A493B4B47 +:10A310000A6842F209019A4202D0062802D203E0FA +:10A32000042801D308467047364A012102EBC000D9 +:10A3300041600020704770B52F4A304E314C15688F +:10A3400042F2090304EB8002B54204D0062804D28D +:10A35000C2F8001807E0042801D3184670BDC1F305 +:10A360001000C2F80008002070BD70B5224A234ECC +:10A37000244C156842F2090304EB8002B54204D074 +:10A38000062804D2D2F8000807E0042801D31846B2 +:10A3900070BDD2F80008C0F310000860002070BD46 +:10A3A000174910B50831184808601120154A0021D6 +:10A3B00002EBC003C3F81015C3F81415401C142891 +:10A3C000F6D3002006E0042804D302EB8003C3F890 +:10A3D000001807E002EB8003D3F80048C4F3100430 +:10A3E000C3F80048401C0628EDD310BD04490648B8 +:10A3F000083108607047000098000020BEBAFECA0D +:10A4000000F5014000F001400000FEFF10B572B6FB +:10A4100000F0C2F850B1E6F773FFF5F7DEF8F6F793 +:10A4200019FEEFF72AF861490020086062B60020A3 +:10A4300010BD2DE9F0410F46044672B600F0ACF8AD +:10A4400018B162B60820BDE8F081E6F7CFFEE6F766 +:10A4500059FF064600256909890001F1E02105F050 +:10A460001F00D1F80011C140C80717D0202D03D21A +:10A4700026FA05F0C00716D168B2002806DA00F007 +:10A480000F0000F1E02090F8140D03E000F1E0204F +:10A4900090F80004400900F0E5F820B16D1C642D2F +:10A4A000D9D324B104E062B641F20100CBE7404CBD +:10A4B0002078022803D962B64FF48050C3E73D49A3 +:10A4C000802081F8140DEEF7AFFF20780028607827 +:10A4D00001D058B908E048B1202807D8A078212831 +:10A4E00004D8012802D003E0A07808B10720AAE729 +:10A4F0002E493148086031480760E6F703FF2146DE +:10A50000F6F78EFDF5F71DF800F0F4F9FFF73CFCC7 +:10A510002046E6F7C3FE040062B603D0FFF776FFDD +:10A52000204690E700208EE710B5044600F034F88E +:10A5300000B101202070002010BD214908600020DA +:10A54000704770B50C461F490D681E491E4E0831F4 +:10A550000E60102807D011280CD012280FD0132815 +:10A5600011D0012013E0D4E90001FFF762FF354666 +:10A5700020600DE0FFF74AFF0025206008E020681A +:10A58000FFF7D2FF03E00E4920680860002020603A +:10A590000C48001D056070BD0448074900688842EA +:10A5A00001D1012070470020704700009800002072 +:10A5B0006CB601000BE000E0BEBAFECA70010020DC +:10A5C000040000201005024001000001F0B585B034 +:10A5D0000F460646FEF7D4FD04467078694600F043 +:10A5E0001F053846F3F751F8C0B1012C07BF019998 +:10A5F000B1F80310032005B018BFF0BD091D89B2E2 +:10A600002844884238BF012008BF00209CBF05B005 +:10A61000F0BD00BF05B04FF00200F0BD022CF9D133 +:10A62000042D28BFB6F80310F4D3E7E70B4A022144 +:10A6300011600B490B68002BFCD0084B1B1D1860E8 +:10A6400008680028FCD00020106008680028FCD0B2 +:10A6500070474FF0805040697047000004E50140AA +:10A6600000E40140082808D238B1042805D00128A8 +:10A6700003D0052801D0012070470020704710B595 +:10A68000044600F0F5F880B1204600F0E2F8FFF74C +:10A69000E9FF68B17D4A04F01F010120137888406A +:10A6A0004BB15168084350600BE042F2010010BD0D +:10A6B00042F2020010BD6109890001F1E021C1F8F8 +:10A6C0000001002010BD10B5044600F0D1F850B1D3 +:10A6D0006E4A04F01F0101201378884033B151689D +:10A6E0008143516008E042F2010010BD6109890018 +:10A6F00001F1E021C1F88001002010BD70B50D46C8 +:10A70000044600F0B5F878B16009800000F1E0205F +:10A71000D0F8000204F01F0201219140084000D04F +:10A7200001202860002070BD42F2010070BD10B50C +:10A73000044600F09DF858B104F01F010120884044 +:10A740006109890001F1E021C1F80002002010BD7B +:10A7500042F2010010BD10B5044600F089F858B16E +:10A7600004F01F01012088406109890001F1E02106 +:10A77000C1F88002002010BD42F2010010BD70B58A +:10A780000D46044600F074F870B12846FFF76AFFE2 +:10A7900068B16807000E002C0CDA04F00F0101F11B +:10A7A000E02181F8140D09E042F2010070BD42F28F +:10A7B000020070BD04F1E02484F80004002070BDA4 +:10A7C00070B50C46054600F053F830B1284600F04D +:10A7D00040F8C0B22060002070BD42F2010070BDA0 +:10A7E000BFF34F8F2A4801682A4A01F4E061114300 +:10A7F0000160BFF34F8FFEE770B50546F7F700F92C +:10A8000008B1072070BD214C0120217889B9207042 +:10A8100072B6F6F72EFC4FF0E026D6F8801106F55A +:10A82000C07681436160F6F724FCC043306062B6B5 +:10A8300000202870002070BD14490A783AB130B960 +:10A840004FF0E0224868C2F80001002008700020A4 +:10A850007047002806DA00F00F0000F1E02090F8C1 +:10A86000140D03E000F1E02090F800044009704767 +:10A8700010B50446642807DAF6F7FBFB0121A14076 +:10A88000084201D1012010BD002010BD740100203C +:10A890000CED00E00400FA0510B54FF000040B4683 +:10A8A0000200204621461ED0012A04D0022A04D0EC +:10A8B000032A1DD103E0012002E0022013E003205F +:10A8C000072B15D2DFE803F0140406080A0C0E006B +:10A8D000012108E0022106E0032104E0042102E056 +:10A8E000052100E00621F4F713FF08B1204610BD52 +:10A8F0000724FBE7FE4805218170002101704170AB +:10A90000C17081607047FB490A78022A06D0CA6884 +:10A910001044C860C8683238F6F749B98A681044EC +:10A9200088608868F7E70378F349F44A13B1012B8C +:10A930000ED011E00379012B00D06BB943790BB134 +:10A94000012B09D18368643B8B4205D2C0680EE0BD +:10A950000379012B02D00BB10020704743790BB172 +:10A96000012BF9D1C368643B8B42F5D280689042D9 +:10A97000F2D8012070472DE9F04704460226F5F78A +:10A98000C6FD006800B1FFDFD94D01273CB120783A +:10A99000B0B1012805D0022810D0032813D02F71A0 +:10A9A0000CE06068C82807D3F6F771F920B1606839 +:10A9B000FFF7A9FF012603E0002601E000F0AFF950 +:10A9C0003046BDE8F08728780028F7D16068FFF7A7 +:10A9D000AAFF0028E3D06068DFF81883007810B37E +:10A9E000A878042800D0FFDF0020474688F8000040 +:10A9F00060680079C0B30020387160684079A0B306 +:10AA00000420787160688168E868F5F78FF9B860AC +:10AA10006068C0683230F8600320A870B549E878F3 +:10AA2000F5F712FBCAE74FF00209404688F800909C +:10AA300061680979D1B10021017161684979B9B1C1 +:10AA40000421417161688968323181606168C96837 +:10AA5000C160C068A64C14346060F4F7A5FE2060A5 +:10AA60006F7085F80290A9E704E005E00321E3E7B1 +:10AA70000321E6E70120BFE70320C2E72DE9F04705 +:10AA80009B4C8846E178884200D0FFDFDFF8609277 +:10AA900000250127974E09F11409B8F1090F76D264 +:10AAA000DFE808F0050D2A3D646A769E7E00A078F6 +:10AAB000032886D0A078022883D0FFDF81E7A07822 +:10AAC000032803D0A078022800D0FFDF0420A07064 +:10AAD0002571207800285FD1FFF715FF3078022814 +:10AAE00006D0B068E06000F06CF92061002048E01A +:10AAF000E078F5F739F9F5E7A078032803D0A078D6 +:10AB0000022800D0FFDF207878BBA078032812D17C +:10AB1000042026E00420F6F7F7FAA57051E7A078A4 +:10AB2000032803D0A078022800D0FFDF2078E0B906 +:10AB3000A078032814D0F4F737FE01464F46D9F821 +:10AB40000000F6F779F80028E4DB79688142E1DB60 +:10AB5000081AF0606749E078BDE8F047F5F774BA85 +:10AB60000520F6F7D1FAA7702BE724E0A078042897 +:10AB700000D0FFDF022004E0A078042800D0FFDF2F +:10AB80000120A1688847FFF7F6FE05462EE027E082 +:10AB9000A078042800D0FFDFBDE8F04700F0BFB880 +:10ABA000A078042805D0607810B1A078022800D0E1 +:10ABB000FFDF207818B1BDE8F04700F0B9B8207980 +:10ABC00020B10620F6F7A0FA2571CCE7607828B10D +:10ABD0004849E078F5F738FA6570F2E60720C0E7F3 +:10ABE000FFDFEEE63DB1012D03D0FFDF022DF9D1ED +:10ABF000E7E60420C5E70320C3E770B5050005D0EC +:10AC00003B4CA078052803D0112070BD102070BDEA +:10AC10003B48F4F764FDE070E07818B1A5600020CF +:10AC2000A07070BD032070BD314810B5017809B126 +:10AC3000112010BD817805290CD0817801290BD015 +:10AC4000817849B1012101708178012904D080788F +:10AC500010B103E00F2010BD00F06AF8002010BD15 +:10AC60002DE9F041224E0446B07808B101280AD1FE +:10AC700064B12046FFF757FE50B120781D4D48B112 +:10AC8000B078012822D00F20BDE8F0811020FBE72A +:10AC90000720F9E702272F70207998B1002028714A +:10ACA000607988B104206871A0683230A860E068DB +:10ACB000E860E8680E4C14346060F4F775FD2060BD +:10ACC000B77022E00320EAE70320ECE700202870B9 +:10ACD000207900B3002028716079F0B104206871F8 +:10ACE000A168F068F5F722F8A860E068323009E062 +:10ACF0007C010020781100203D860100FF1FA10784 +:10AD00007DAA0100E8600320B0701049F078F5F7E3 +:10AD10009BF90020B8E70320DDE70320DFE70C48BC +:10AD200010B5006900F045F8BDE81040F4F76DBCBF +:10AD300010B5074CE078F4F721FD0820F6F7E4F9A8 +:10AD40000520A07000202070607010BD78110020D8 +:10AD50007C0100201F490968014201D00120704791 +:10AD6000002070471B49091D0968014201D00120DC +:10AD7000704700207047174910310968014201D01F +:10AD800001207047002070471249143109680142C0 +:10AD900001D0012070470020704710B50D4C206095 +:10ADA000201D01600B4810300260001D0360002070 +:10ADB00010BD09490A6848F202139A4302430A6027 +:10ADC0007047054A116848F2021301EA03009943EB +:10ADD0001160704700060040C806024040EA0103C7 +:10ADE00010B59B070FD1042A0DD310C808C9121F34 +:10ADF0009C42F8D020BA19BA884201D9012010BD6E +:10AE00004FF0FF3010BD1AB1D30703D0521C07E03A +:10AE1000002010BD10F8013B11F8014B1B1B07D19E +:10AE200010F8013B11F8014B1B1B01D1921EF1D10F +:10AE3000184610BD032A40F2308010F0030C00F0D9 +:10AE4000158011F8013BBCF1020F624498BF11F864 +:10AE500001CB00F8013B38BF11F8013BA2F104021D +:10AE600098BF00F801CB38BF00F8013B11F0030395 +:10AE700000F02580083AC0F0088051F8043B083AF9 +:10AE800051F804CBA0E80810F5E7121D5CBF51F89B +:10AE9000043B40F8043BAFF30080D20724BF11F815 +:10AEA000013B11F801CB48BF11F8012B24BF00F87A +:10AEB000013B00F801CB48BF00F8012B704710B5EB +:10AEC000203AC0F00B80B1E81850203AA0E81850A2 +:10AED000B1E81850A0E81850BFF4F5AF5FEA027C63 +:10AEE00024BFB1E81850A0E8185044BF18C918C0D2 +:10AEF000BDE810405FEA827C24BF51F8043B40F873 +:10AF0000043B08BF7047D20728BF31F8023B48BF57 +:10AF100011F8012B28BF20F8023B48BF00F8012B95 +:10AF200070474FF000020429C0F0128010F0030CAB +:10AF300000F01B80CCF1040CBCF1020F18BF00F82C +:10AF4000012BA8BF20F8022BA1EB0C0100F00DB8DB +:10AF50005FEAC17C24BF00F8012B00F8012B48BF39 +:10AF600000F8012B70474FF0000200B513469446DD +:10AF70009646203922BFA0E80C50A0E80C50B1F151 +:10AF80002001BFF4F7AF090728BFA0E80C5048BF65 +:10AF90000CC05DF804EB890028BF40F8042B08BF03 +:10AFA000704748BF20F8022B11F0804F18BF00F8FF +:10AFB000012B70477047704770477047164B1860F9 +:10AFC000164B1960164B1A607047FEDF042071465D +:10AFD00008421BD10699134A914217DC069902399F +:10AFE0004878DF2812D10878FE2808D0FF280DD134 +:10AFF0004FF001004FF000020B4B1B68184741F265 +:10B0000001000099019A084B1B681847069805999A +:10B01000064B1B68DB6818479C010020A00100203C +:10B02000A401002000C001007001002004000020E5 +:10B03000204821497047FFF7FBFFE6F7AFF800BD56 +:10B0400001200007C06AC0B2FF2806D14FF0FF30D0 +:10B050004FF010210968884203D018484FF00801CA +:10B0600001604FF4805016490968884203D1154A9F +:10B0700013605B68184700BD20BFFDE74FF48050A8 +:10B080000F490968884210D10F4B18684FF0FF3103 +:10B090008842F1D080F308884FF02021884204DDF7 +:10B0A0000A48026802210A430260094880470948A9 +:10B0B0008047FFDF88110020881100202C05004008 +:10B0C000000000200400002000C001002405004012 +:10B0D0008D1A010041B0010004207146084202D0DF +:10B0E000EFF3098101E0EFF3088188690238007805 +:10B0F000102813DB20280FDB2B280BDB0A4A1268F1 +:10B100000A4B9A4203D1602804DB094A1047022007 +:10B1100008607047074A1047074A1047074A1268F5 +:10B120002C3212681047000098000020BEBAFECAF8 +:10B1300009130000ED9B010043A50100040000205D +:10B140000E4B0F4908470F4B0D4908470E4B0C4952 +:10B1500008470E4B0A4908470D4B094908470D4B54 +:10B16000074908470C4B064908470C4B0449084758 +:10B170000B4B034908470B4B01490847A3910000BB +:10B180006D960000A52F0000C98D00004D8D0000B8 +:10B190007F930000251300004F740000C38E000051 +:10B1A000F5950000A91100000021016041600172C5 +:10B1B00070470A6802600B7903717047AB7B00002F +:10B1C0004B7D00007F7B0000457E0000697E000013 +:10B1D000A37E0000D77E0000117F0000417F0000A9 +:10B1E000937F000091120000911200009112000064 +:10B1F000911200009112000091120000F122000053 +:10B2000093230000B3230000BD240000FB1E0000B8 +:10B2100005270000E527000005280000C72D0000D5 +:10B22000EB2D00001B2D00006F2D00001D2E0000D7 +:10B23000A72E0000B3410000774300001F47000025 +:10B2400039480000BD48000063490000D3490000B0 +:10B25000ED4A0000BB4B0000374C00001F280000E7 +:10B26000252800002F280000BD1E0000FB2800003C +:10B270008F1E0000552A0000911200001555000095 +:10B280009B550000B7550000D355000047570000FC +:10B29000FD55000007560000495600006B5600009F +:10B2A0002D57000091120000911200009112000031 +:10B2B0009112000091120000911200001F6D000019 +:10B2C0003F6D0000416D00007B6D0000A96D000026 +:10B2D000936E00003D6F0000516F00009D6F0000F5 +:10B2E000957000003B7200006B730000195F000056 +:10B2F00091120000911200009112000023890000B9 +:10B300006189000083890000100110013A020000E9 +:10B310001A02000069740000F9760000FFFFFFFFC9 +:10B320000000FFFF2F850000CF1B000041520000EE +:10B33000635F0000977600000000000023002300F8 +:10B3400046004D0023002300F5000000000000002F +:10B35000000000001DBB0000000000000000000015 +:10B3600000000000A5C80000000000000000000070 +:10B37000000000007DBB000003BC000000000000D6 +:10B380000000000003BF0000ABBC0000E3C10000F0 +:10B39000000000000000000025CD000000000000BB +:10B3A0000000000000000000B7BF00007BC90000E3 +:10B3B000000000004FCA0000C3CA000000000000E7 +:10B3C0007DC2000059C300000000000089CA0000CF +:10B3D000B9C3000045C60000A9C600009FC7000011 +:10B3E00085C1000039C80000000000009DC00000B9 +:10B3F0000000000095BD00000FBD0000E5C8000082 +:10B4000001CC00006FCC00000000000075BF000000 +:10B410003BBD00002DBF000063CE0000CBBE00008E +:10B4200073CD000000000000D1CC000079BC00000A +:10B43000AFBB0000E9BD0000E7BC0000E3CD0000A9 +:10B4400001CF000005C00000C1CE00008B38000015 +:10B450008B380000CD22000099840000D9610000E3 +:10B46000115200000000000029710100D1380000D5 +:10B47000D1380000EF220000ED840000536200008C +:10B480001B520000356901004F710100BC01BC0175 +:10B490003E002C0044000E00D800200101000000F6 +:10B4A000010000000001020304001011121300004B +:10B4B0000014000063940100C9990100979A0100EB +:10B4C000E99A0100359B0100899B0100BD940100B0 +:10B4D000E1950100499601006D9801005399010022 +:10B4E00013DE000017EF00001B5C01006D4E010031 +:10B4F0003F5C01006F4E0100453101004F840100A7 +:10B500007D4101004F840100B1310100BF85010080 +:10B510003B3B0100BF850100BD3001004D850100AE +:10B52000AF4001004D850100555555D6BE898E00AE +:10B5300000006606F30C801300000A033B066C094A +:10B5400000005604D308500D555555252627D6BE64 +:10B55000898EF401FA00960064004B0032001E0050 +:10B56000140000000300656C74620000000000001D +:10B570000000000000000000000087000000000044 +:10B5800000000000000000000000BE83605ADB0BDA +:10B59000376038A5F5AA9183886C00006DA2010080 +:10B5A00085A201009DA20100B5A20100E5A2010053 +:10B5B0000DA3010037A301006BA301000BA0010044 +:10B5C0005B9F010077A00100D1A00100E1A0010074 +:10B5D0000DA101007FA60100C7A60100FDA6010084 +:10B5E0002FA7010057A701007FA70100C1A70100F5 +:10B5F000E1A70100F9A7010039A80100BF1201006D +:10B60000C7120100D51201003BA1010055A10100A4 +:10B6100029A1010033A1010061A1010097A101004E +:10B62000D9A10100E7A10100F5A1010001A20100DB +:10B630000FA201001DA2010029A2010000000000CC +:10B64000678F0000BD8F0000D38F000099A8010014 +:10B65000619C0100219D0100FBAB010029AC0100B0 +:10B6600061AC0100B51001008D1501000010020051 +:10B6700090B6010008000020A00100004411000065 +:10B68000B4B60100A8010020E00F00008011000006 +:10B6900001593601000100683720FB349B5F8004AC +:10B6A0001F800010022001337F0102E429E4BDAFB6 +:04B6B0000100000095 +:00000001FF From f2c4b770fd7be1de00b7550abbe70b694f4e7643 Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Wed, 15 Jun 2016 12:30:04 +0100 Subject: [PATCH 06/67] Factorization of NRF51 and NRF52 targets. A new wbase target has been added (NRF5). In this target, commonalities between 51 and 52 will be shared. --- hal/targets.json | 4 +- .../components/libraries/crc16/crc16.h | 0 .../libraries/scheduler/app_scheduler.h | 0 .../components/libraries/util/app_error.h | 0 .../components/libraries/util/app_util.h | 0 .../s110_nrf51822_8.0.0_licence_agreement.txt | 0 .../s110_nrf51822_8.0.0_softdevice.hex | 0 .../s130_nrf51_1.0.0_licence_agreement.txt | 0 .../s130_nrf51_1.0.0_softdevice.hex | 13722 ++++++++-------- .../TARGET_MCU_NRF51822/PeripheralNames.h | 0 .../TARGET_MCU_NRF51822/PortNames.h | 0 .../TARGET_ARCH_BLE/PinNames.h | 0 .../TARGET_ARCH_BLE/device.h | 0 .../TARGET_DELTA_DFCM_NNN40/PinNames.h | 0 .../TARGET_DELTA_DFCM_NNN40/device.h | 0 .../TARGET_DELTA_DFCM_NNN40/mbed_overrides.c | 0 .../TARGET_DELTA_DFCM_NNN40/rtc_api.c | 0 .../TARGET_HRM1017/PinNames.h | 0 .../TARGET_HRM1017/device.h | 0 .../TARGET_NRF51822_MKIT/PinNames.h | 0 .../TARGET_NRF51822_MKIT/device.h | 0 .../TARGET_NRF51822_SBKIT/PinNames.h | 0 .../TARGET_NRF51822_SBKIT/device.h | 0 .../TARGET_NRF51822_Y5_MBUG/PinNames.h | 0 .../TARGET_NRF51822_Y5_MBUG/device.h | 0 .../TARGET_NRF51_DK/PinNames.h | 0 .../TARGET_NRF51_DK/device.h | 0 .../TARGET_NRF51_DONGLE/PinNames.h | 0 .../TARGET_NRF51_DONGLE/device.h | 0 .../TARGET_NRF51_MICROBIT/PinNames.h | 0 .../TARGET_NRF51_MICROBIT/device.h | 0 .../TARGET_RBLAB_BLENANO/PinNames.h | 0 .../TARGET_RBLAB_BLENANO/device.h | 0 .../TARGET_RBLAB_NRF51822/PinNames.h | 0 .../TARGET_RBLAB_NRF51822/device.h | 0 .../TARGET_SEEED_TINY_BLE/PinNames.h | 0 .../TARGET_SEEED_TINY_BLE/device.h | 0 .../TARGET_TY51822R3/PinNames.h | 0 .../TARGET_TY51822R3/device.h | 0 .../TARGET_WALLBOT_BLE/PinNames.h | 0 .../TARGET_WALLBOT_BLE/device.h | 0 .../TARGET_MCU_NRF51822/analogin_api.c | 0 .../TARGET_MCU_NRF51822/gpio_api.c | 0 .../TARGET_MCU_NRF51822/gpio_irq_api.c | 0 .../TARGET_MCU_NRF51822/gpio_object.h | 0 .../TARGET_MCU_NRF51822/i2c_api.c | 0 .../TARGET_MCU_NRF51822/objects.h | 0 .../TARGET_MCU_NRF51822/pinmap.c | 0 .../TARGET_MCU_NRF51822/port_api.c | 0 .../TARGET_MCU_NRF51822/pwmout_api.c | 0 .../TARGET_MCU_NRF51822/serial_api.c | 0 .../TARGET_MCU_NRF51822/sleep.c | 0 .../TARGET_MCU_NRF51822/spi_api.c | 0 .../TARGET_MCU_NRF51822/twi_config.h | 0 .../TARGET_MCU_NRF51822/twi_master.c | 0 .../TARGET_MCU_NRF51822/twi_master.h | 0 .../TARGET_MCU_NRF51822/us_ticker.c | 0 .../s132_nrf52_2.0.0_softdevice.hex | 0 .../TARGET_MCU_NRF52832/PeripheralNames.h | 0 .../TARGET_MCU_NRF52832/PortNames.h | 0 .../TARGET_NRF52_DK/PinNames.h | 0 .../TARGET_NRF52_DK/device.h | 0 .../TARGET_MCU_NRF52832/analogin_api.c | 0 .../TARGET_MCU_NRF52832/gpio_api.c | 0 .../TARGET_MCU_NRF52832/gpio_irq_api.c | 0 .../TARGET_MCU_NRF52832/gpio_object.h | 0 .../TARGET_MCU_NRF52832/i2c_api.c | 0 .../TARGET_MCU_NRF52832/objects.h | 0 .../TARGET_MCU_NRF52832/pinmap.c | 0 .../TARGET_MCU_NRF52832/port_api.c | 0 .../TARGET_MCU_NRF52832/pwmout_api.c | 0 .../TARGET_MCU_NRF52832/serial_api.c | 0 .../TARGET_MCU_NRF52832/sleep.c | 0 .../TARGET_MCU_NRF52832/spi_api.c | 0 .../TARGET_MCU_NRF52832/us_ticker.c | 0 75 files changed, 6863 insertions(+), 6863 deletions(-) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/crc16/crc16.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/scheduler/app_scheduler.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/util/app_error.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/util/app_util.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/Lib/s110_nrf51822_8_0_0/s110_nrf51822_8.0.0_licence_agreement.txt (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/Lib/s110_nrf51822_8_0_0/s110_nrf51822_8.0.0_softdevice.hex (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_licence_agreement.txt (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_softdevice.hex (97%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/PeripheralNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/PortNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_ARCH_BLE/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_ARCH_BLE/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/mbed_overrides.c (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/rtc_api.c (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_HRM1017/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_HRM1017/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_NRF51822_MKIT/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_NRF51822_MKIT/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_NRF51822_SBKIT/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_NRF51822_SBKIT/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_NRF51822_Y5_MBUG/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_NRF51822_Y5_MBUG/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_NRF51_DK/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_NRF51_DK/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_NRF51_DONGLE/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_NRF51_DONGLE/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_NRF51_MICROBIT/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_NRF51_MICROBIT/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_SEEED_TINY_BLE/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_SEEED_TINY_BLE/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_TY51822R3/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_TY51822R3/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_WALLBOT_BLE/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TARGET_WALLBOT_BLE/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/analogin_api.c (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/gpio_api.c (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/gpio_irq_api.c (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/gpio_object.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/i2c_api.c (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/objects.h (100%) mode change 100755 => 100644 rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/pinmap.c (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/port_api.c (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/pwmout_api.c (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/serial_api.c (100%) mode change 100755 => 100644 rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/sleep.c (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/spi_api.c (100%) mode change 100755 => 100644 rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/twi_config.h (100%) mode change 100755 => 100644 rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/twi_master.c (100%) mode change 100755 => 100644 rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/twi_master.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/us_ticker.c (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/Lib/s132_nrf52_2_0_0/s132_nrf52_2.0.0_softdevice.hex (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/PeripheralNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/PortNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/TARGET_NRF52_DK/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/TARGET_NRF52_DK/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/analogin_api.c (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/gpio_api.c (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/gpio_irq_api.c (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/gpio_object.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/i2c_api.c (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/objects.h (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/pinmap.c (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/port_api.c (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/pwmout_api.c (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/serial_api.c (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/sleep.c (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/spi_api.c (100%) rename hal/targets/hal/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/us_ticker.c (100%) diff --git a/hal/targets.json b/hal/targets.json index 271f65a4de..4beaec92bc 100644 --- a/hal/targets.json +++ b/hal/targets.json @@ -1102,7 +1102,7 @@ "OVERRIDE_BOOTLOADER_FILENAME": "nrf51822_bootloader.hex", "macros": ["NRF51", "TARGET_NRF51822"], "MERGE_BOOTLOADER": false, - "extra_labels": ["NORDIC", "MCU_NRF51", "MCU_NRF51822"], + "extra_labels": ["NORDIC", "MCU_NRF51", "MCU_NRF51822", "NRF5"], "OUTPUT_EXT": "hex", "is_disk_virtual": true, "supported_toolchains": ["ARM", "GCC_ARM"], @@ -1739,7 +1739,7 @@ "inherits": ["Target"], "core": "Cortex-M4F", "macros": ["NRF52", "TARGET_NRF52832"], - "extra_labels": ["NORDIC", "MCU_NRF52", "MCU_NRF52832"], + "extra_labels": ["NORDIC", "MCU_NRF52", "MCU_NRF52832", "NRF5"], "OUTPUT_EXT": "hex", "is_disk_virtual": true, "supported_toolchains": ["ARM", "GCC_ARM"], diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/crc16/crc16.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/crc16/crc16.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/crc16/crc16.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/crc16/crc16.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/scheduler/app_scheduler.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/scheduler/app_scheduler.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/scheduler/app_scheduler.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/scheduler/app_scheduler.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/util/app_error.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/util/app_error.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/util/app_error.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/util/app_error.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/util/app_util.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/util/app_util.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/util/app_util.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/util/app_util.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s110_nrf51822_8_0_0/s110_nrf51822_8.0.0_licence_agreement.txt b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s110_nrf51822_8_0_0/s110_nrf51822_8.0.0_licence_agreement.txt similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s110_nrf51822_8_0_0/s110_nrf51822_8.0.0_licence_agreement.txt rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s110_nrf51822_8_0_0/s110_nrf51822_8.0.0_licence_agreement.txt diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s110_nrf51822_8_0_0/s110_nrf51822_8.0.0_softdevice.hex b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s110_nrf51822_8_0_0/s110_nrf51822_8.0.0_softdevice.hex similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s110_nrf51822_8_0_0/s110_nrf51822_8.0.0_softdevice.hex rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s110_nrf51822_8_0_0/s110_nrf51822_8.0.0_softdevice.hex diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_licence_agreement.txt b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_licence_agreement.txt similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_licence_agreement.txt rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_licence_agreement.txt diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_softdevice.hex b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_softdevice.hex similarity index 97% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_softdevice.hex rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_softdevice.hex index 39d4e59629..d6fe985b4b 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_softdevice.hex +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_softdevice.hex @@ -1,6861 +1,6861 @@ -:020000040000FA -:10000000C0070000D1060000D1000000B1060000CA -:1000100000000000000000000000000000000000E0 -:100020000000000000000000000000005107000078 -:100030000000000000000000DB000000E500000000 -:10004000EF000000F9000000030100000D010000B6 -:1000500017010000210100002B0100003501000004 -:100060003F01000049010000530100005D01000054 -:1000700067010000710100007B01000085010000A4 -:100080008F01000099010000A3010000AD010000F4 -:10009000B7010000C1010000CB010000D501000044 -:1000A000DF010000E9010000F3010000FD01000094 -:1000B00007020000110200001B02000025020000E0 -:1000C0001FB5C046C04600F0EFFA04B00FB41FBD24 -:1000D00008205A49096809580847382057490968CB -:1000E000095808473C2055490968095808474020E5 -:1000F0005249096809580847442050490968095875 -:10010000084748204D490968095808474C204B4981 -:10011000096809580847502048490968095808479C -:100120005420464909680958084758204349096836 -:10013000095808475C204149096809580847602068 -:100140003E4909680958084764203C49096809582C -:100150000847682039490968095808476C20374919 -:100160000968095808477020344909680958084740 -:100170007420324909680958084778202F490968CE -:10018000095808477C202D490968095808478020EC -:100190002A490968095808478420284909680958E4 -:1001A0000847882025490968095808478C202349B1 -:1001B00009680958084790202049096809580847E4 -:1001C00094201E4909680958084798201B49096866 -:1001D000095808479C201949096809580847A02070 -:1001E0001649096809580847A4201449096809589C -:1001F0000847A8201149096809580847AC200F4949 -:10020000096809580847B0200C4909680958084787 -:10021000B4200A49096809580847B82007490968FD -:1002200009580847BC2005490968095808470000D3 -:1002300003480449024A034B7047000000000020B5 -:10024000C0070000C00700000122D84B5A6000BF61 -:10025000D74A1268002AFBD0016000BFD44A126856 -:10026000002AFBD00022D14B5A6000BFD04A12684E -:10027000002AFBD07047F0B505460E46174600240D -:1002800006E0A200B158A2005019FFF7DDFF641C80 -:10029000BC42F6D30020F0BD0120C043C549086030 -:1002A000401048607047014601229204086890425D -:1002B00001D9102070470020FCE7F0B505460C4638 -:1002C0001646002706E028462168FFF7BDFF2D1DD2 -:1002D000241D7F1CB742F6D3F0BD70B505460C4611 -:1002E0002E460BE0304600F075F9FF2C01D80024B3 -:1002F00001E0FF3C013C012080023618002CF1D1C6 -:1003000070BD0146012212044868904201D90920BB -:100310007047A9484069401C01D10F20F8E7002030 -:10032000F6E7FEB504462068030000F037FA05043E -:100330002B4249598B00201DFFF7E3FF0546002D96 -:1003400001D02846FEBDFFF7A7FF0120C00200F044 -:1003500041F9042221469948FFF78DFF002801D07A -:100360000320EFE708222146944800F06DF90028A9 -:1003700006D1002192480068FFF766FF00F00CF9F3 -:100380000320DFE7A768E6686068019031463846D9 -:10039000FFF7A3FF324638460199FFF78EFFB20000 -:1003A0003846019900F050F9002800D1CAE703202F -:1003B000C8E700F0E3F9834800688349086041E03A -:1003C00060680190E668A0680090B200009901980A -:1003D00000F03AF90746002F00D1B3E70E20B1E74D -:1003E000201DFFF760FF0546002D01D02846A9E734 -:1003F0006068002807D1FFF74FFF0320800200F05C -:10040000E9F800F0C9F8FFF747FF0120C00200F04B -:10041000E1F8042221466948FFF72DFF002801D0AA -:1004200003208FE708222146644800F00DF90028D8 -:1004300006D1002162480068FFF706FF00F0ACF823 -:1004400003207FE700BF00207CE770B505460C461F -:10045000182D04D12068FFF764FF206002E001201E -:10046000206000BF00BF70BDF0B589B05248406940 -:1004700003905248806881000398081802900398FE -:10048000000B01900121090302984018401E000B47 -:1004900000900124002520462946019A00F0C4F866 -:1004A0000022401E91410791069001260027304608 -:1004B0003946009A00F0B8F80022401E914105919B -:1004C0000490049BDB43059AD2430698184307998E -:1004D00011430791069037490698086007984860CD -:1004E00009B0F0BD70B53448446934488568466841 -:1004F000AA003146204600F0A7F8002801D00020CD -:1005000070BD0120FCE72D484068002801D0012083 -:1005100000E000200546FFF7E5FF002807D0FFF7C1 -:10052000BBFE0320800200F055F800F035F8FFF71D -:100530009BFF002D0ED020484669204884684768FC -:1005400021463046FFF7C9FE224639463046FFF7BE -:10055000B4FE00BF00F020F810B5184844681A48EF -:100560000460204600F0DCF810BD15480068006803 -:10057000401C01D100BFFEE710480068002802D0EF -:10058000042806D101E0FFF7BEFFFFF7E5FF00BF3B -:10059000FEE700BF00BFFEE7BFF34F8F0B480C49DB -:1005A000C860BFF34F8F00BFFEE7000000E50140C9 -:1005B00000E40140000600400010001000080000A8 -:1005C000B8070000BC070000000000200400FA0586 -:1005D00000ED00E010B50146104B1A6808460223F2 -:1005E0000F4C636000BF0F4B1B68002BFBD0531CEC -:1005F00004D0904202D20A4B186101E0084B986087 -:1006000000BF084B1B68002BFBD00023044C636029 -:1006100000BF044B1B68002BFBD010BD0010001066 -:1006200000E5014000E4014010B5202A04DB01464A -:10063000203A9140002010BD914020239C1A03468F -:10064000E3401943904010BD034610B50B439B0790 -:100650000FD1042A0DD308C810C9121FA342F8D025 -:1006600018BA21BA884201D9012010BD0020C04328 -:1006700010BD002A03D0D30703D0521C07E000208E -:1006800010BD03780C78401C491C1B1B07D1037854 -:100690000C78401C491C1B1B01D1921EF1D118463D -:1006A00010BD70477047704710B500F007F810BDD7 -:1006B000014B1B68DB6818470000002019481A49E5 -:1006C0007047FFF7FBFFFFF7FBFC00BD20BFFDE716 -:1006D0001649174C24688C420BD1164B1B68994263 -:1006E0000CD1154B154A1360186810498842EDD09B -:1006F0000AE0134880F30888124B18470F4A13602A -:1007000018680A498842E1D080F308880E49884277 -:1007100004DD0E48026802210A4302605B68184744 -:100720000346DFE7C0070000C0070000FFFFFFFF30 -:10073000000C000014100010001000000000002049 -:10074000000400206B05000000200020240500406C -:100750000D48704502D1EFF3098101E0EFF3088104 -:10076000886902380078182802D1C046074A104725 -:10077000074A12682C3212681047000000B5054B7A -:10078000054A9B58984700BDFDFFFFFF4B04000042 -:1007900000000020001000000400000030B4744687 -:1007A000641E2578641CAB4204D3635D5B00E318D0 -:1007B00030BC18471D46F8E7000C00000010000090 -:10100000F0210020FDB101005D22000063B101006C -:1010100000000000000000000000000000000000D0 -:101020000000000000000000000000006DB20100A0 -:1010300000000000000000005D2200005D220000B2 -:10104000D9B20100DFB201005D2200005D22000084 -:101050005D2200005D2200005D2200005D22000094 -:10106000E5B201005D2200005D220000EBB201004C -:101070005D220000F1B20100F7B20100FDB20100F3 -:101080005D2200005D2200005D2200005D22000064 -:101090005D2200005D2200005D2200005D22000054 -:1010A00003B3010009B301005D2200005D220000CE -:1010B0005D2200005D2200005D2200005D22000034 -:1010C00000F002F81AF07BF80CA030C80838241899 -:1010D0002D18A246671EAB4654465D46AC4201D170 -:1010E0001AF06DF87E460F3E0FCCB646012633420D -:1010F00000D0FB1AA246AB46334318477CA301003D -:10110000ACA30100103A02D378C878C1FAD85207CC -:1011100001D330C830C101D504680C6070470000AD -:101120000023002400250026103A01D378C1FBD803 -:10113000520700D330C100D50B6070471FB5C046C1 -:10114000C04619F0DEFF04B00FB41FBDF0B4404636 -:10115000494652465B460FB402A0013001B506482D -:10116000004700BF01BC86460FBC804689469246B8 -:101170009B46F0BC70470000C11000008269024924 -:101180008161024810447047911100000100000085 -:1011900001B41EB400B501F000FF01B40198864609 -:1011A00001BC01B01EBD0000401E00BF00BF00BF5B -:1011B00000BF00BF00BF00BF00BF00BF00BF00BF37 -:1011C00000BFF1D17047000070B505460C461646C9 -:1011D00002E00FCC0FC5103E102EFAD2082E02D31B -:1011E00003CC03C5083E042E07D301CC01C5361F2E -:1011F00003E021782970641C6D1C761EF9D270BD45 -:101200008307FF22DB0E9A408907090E99400028C8 -:101210000BDA0007000F0838830828489B001818CD -:10122000C36993430B43C3617047830824489B0001 -:101230001B181868904308431860704710B504469F -:1012400000210120FFF7DCFF00211820FFF7D8FF65 -:1012500000210B20FFF7D4FF02211920FFF7D0FF58 -:1012600002210D20FFF7CCFF02210E20FFF7C8FF5F -:1012700002210F20FFF7C4FF0221C81FFFF7C0FFA4 -:1012800003211620FFF7BCFF03211520FFF7B8FF4D -:10129000204600F019F8002010BD6721018070473A -:1012A00010B500F020F810BD0648704710B500F0EA -:1012B00022F810BD704770477047000000ED00E055 -:1012C00000E400E003F9004370B505462D4C08200A -:1012D0002070A01CFFF7E1FF5920A080294620467E -:1012E00000F0B3FB70BD10B500F0B8FB254900203D -:1012F000891E087010BDF8B5224E0446B61E30781F -:1013000001270D46002807D0204660380B2808D852 -:10131000204600F059FF2BE0602CF9D01A480860F5 -:10132000F8BD20466C38032803D8204600F08DFF16 -:101330001EE0204670381F2803D8204600F047F9E9 -:1013400016E0204690380F2803D8204600F0EAF82F -:101350000EE02046A0380F2803D8204600F076F88B -:1013600006E02046B0380F2804D8204600F0E2F905 -:10137000286000E02F60602CD2D128680028CFD1EF -:101380003770F8BD1A000020013000000120254907 -:10139000C003086024490020087007202349C005C5 -:1013A0008860704770B5204D04462878A04207D069 -:1013B000002C05D0002803D01DA14D2019F0CBFE34 -:1013C0002878A0420ED000211E4A18482C70002C0C -:1013D0001BD01D4B012C06D0022C0DD014A168206F -:1013E00019F0B9FE70BD1160022111605361032133 -:1013F00009068160416070BD116003211160536175 -:101400000121C9058160416070BD11601160072133 -:10141000C905816070BD10B505A1712019F09BFE52 -:1014200010BD000080E100E02000002000F5014038 -:101430007372635C68616C5F63636D5F6161722E80 -:101440006300000000F500408401002010B5A038C2 -:10145000030019F0A1FF0B070E172028313A414B6A -:10146000525C65004B6808788A68194603F0D9F920 -:1014700010BD88888A6883B20888194680B203F054 -:10148000DFF910BD08884C68CB688A6880B22146B5 -:1014900003F0DAF910BD08884B688A6880B21946F3 -:1014A00003F0EEF910BD88888A6883B2088819466F -:1014B00080B203F0FAF910BD88888A6883B2088880 -:1014C000194680B203F034FA10BD08884A6880B229 -:1014D000114603F073FA10BD088982B2888883B27E -:1014E0000888194680B203F074FA10BD08884A686B -:1014F00080B2114603F091FA10BD08894C6882B29F -:101500000888CB6880B2214603F00AFB10BD08882A -:101510004C68CB688A6880B2214603F01BFC10BD82 -:10152000012010BD10B59038030019F035FF0906F1 -:101530000F161D242C363F464E0088888A6883B2D9 -:101540000888194680B204F01DF910BD08884A6861 -:1015500080B2114604F051F910BD08884A6880B283 -:10156000114604F056F910BD08884A6880B2114649 -:1015700004F05CF910BD08884B688A6880B219468F -:1015800004F067F910BD088982B2888883B20888A0 -:10159000194680B204F066F910BD08894B6882B222 -:1015A0000888194680B204F07CF910BD08884A68A2 -:1015B00080B2114604F087F910BD888882B208888D -:1015C000114680B204F0DBF910BD012010BD10B54A -:1015D0007038030019F0E0FE1B0F15192125282F84 -:1015E000363B4044484C53585F68707881889095EA -:1015F000999CA2A5AC004A680878114607F019FC2E -:1016000010BD086807F066FC10BD0C790B7B8A687A -:101610000868214607F06FFC10BD086807F000FD60 -:1016200010BD07F08CF910BD08884A6880B21146D9 -:1016300007F034FE10BD0A790888114680B207F021 -:10164000C4FE10BD087840B207F0CDFE10BD08887A -:1016500080B207F0E1FE10BD086807F0EFFE10BD94 -:10166000086801F0ECFB10BD086801F016FC10BD25 -:10167000088982B209C9194607F0F8FE10BD05C9EC -:10168000114607F042FF10BD08884A6880B2114633 -:1016900009F0FAF910BD0C790888CB688A6880B225 -:1016A000214609F0CDFA10BD0B7908888A6880B20E -:1016B000194609F07DFC10BD08884B688A6880B225 -:1016C000194609F0EEFC10BD08884C68CB688A68A2 -:1016D00080B2214609F053FD10BD08884A6880B2E7 -:1016E000114609F08CFD10BD0B7908880A7A80B28A -:1016F000194607F02DFF10BD088880B207F02DFFB6 -:1017000010BD086807F030FF10BD07F0FCF810BDF1 -:101710008A6809C9194607F08CFF10BD07F0DCF88C -:1017200010BD08884A6880B2114608F05BF810BD09 -:10173000012010BD10B5B02805D0B12808D0B228BE -:101740000BD0012010BD088880B20AF056F910BDF8 -:10175000088880B20AF070F910BD08884B688A6862 -:1017600080B219460AF079F910BD000010B50300E7 -:1017700019F012FE0A0609060C0C0F0F06060612D7 -:1017800007F005F910BD09F027FF10BD01F042FA7E -:1017900010BD06F075FA10BDFAA1FE4819F0DBFC89 -:1017A00010BD7FB5FC49054603C901900291132085 -:1017B000800169468881F94A0F2310460A2128389A -:1017C0000AF043FE0024F6480AF05DFE641CE4B211 -:1017D0000A2CF8D304200090F04801231A4603A9EC -:1017E000F0300AF05DFA002804D0FF20E5A1533064 -:1017F00019F0B1FC686800F024FC00211E220846A4 -:1018000004F040F907F0C6FA02222421E54801F06D -:101810007FFBE44801222C214C3001F079FBE149A7 -:101820000B20B03901F000FA002804D0FF20D5A128 -:10183000673019F090FC09F09FFE02F075F901ABDA -:1018400000220821D8A007F085F9002804D0FF2045 -:10185000CCA16D3019F07FFC284602F0C2FC0028B4 -:1018600004D0FF20C7A16F3019F075FCDB2189007F -:10187000D04819F045FBCF48012141710221817107 -:101880000621C1717FBD10B5CA4CA078092804D3C8 -:10189000FF20BCA1A73019F05EFC207860214843EE -:1018A000001900210173417BF722C908C900C91C36 -:1018B0001140EF22114041730121E1700C3010BD45 -:1018C00070B50E4600211C4619801546030019F01C -:1018D00063FD0723050B1711231D2300224629460C -:1018E000304609F096FE70BD22462946304606F085 -:1018F00098FE70BD22462946304601F0C2FF70BDF9 -:1019000022462946304603F0C0FD70BD22462946D6 -:10191000304600F010FC70BD9E489AA1D53819F0F1 -:101920001AFC032070BD70B5A24CE078002818D0D6 -:101930002078602148430019407B00254007400F74 -:1019400001190879401E08712078401CC0B220702F -:10195000092800D12570A078401CA0700AF01DFF56 -:10196000E57070BD9348C079002800D08BE77047C0 -:1019700070B5904DA86800280CD0FFF7F3FF002841 -:1019800062D06022A968FFF71FFCFFF7CCFF0020A0 -:10199000A860EFE76879002856D0FFF774FF044687 -:1019A00080484C3001F0C4FA6060002804D1C9209E -:1019B00074A1800019F0CFFB60680AF0EAF80028F3 -:1019C0000DD0204606F011FD6078010703D5C00850 -:1019D000C000401C2BE0734861684C302DE071481A -:1019E00061684C3001F0ADFA00F05AFB00282BD1B1 -:1019F000FFF749FF04466B4801F09AFA606000283F -:101A000004D164485FA16D3019F0A5FB60680AF04D -:101A1000C4F8002814D0606800886080204609F06F -:101A20002BFE6078010706D5C008C000801C6070DE -:101A3000FFF779FF9EE75B48616801F082FA99E75A -:101A40005848616801F07DFA70BD10B55A4CE160EC -:101A5000A0605A4800F034FC607010BD5649002068 -:101A60000870704770B5564E0546706A94B00C46C3 -:101A7000401C04D1B06AC0430004000C0BD0306A93 -:101A8000C007C00F2870706A19F03CFAB06A207164 -:101A9000000A607114E02B206946087009A96846A5 -:101AA0000AF04BF8002804D0972036A1800019F0E6 -:101AB00052FB0120287006220AA9204619F0C1F91C -:101AC0002878002803D06079C0210843607114B0E1 -:101AD00070BDF0B53A4C0646206895B00D463746C5 -:101AE0000837401C08D16068401C05D1A068401C24 -:101AF00002D1E068401C11D02068314619F002FA8A -:101B00006068311D19F0FEF9A068394619F0FAF93C -:101B1000E06831460C3119F0F5F925E02B206946D3 -:101B2000087009A968460AF008F8002804D0194886 -:101B300014A1553819F00FFB08220AA9304619F0F4 -:101B400080F92B206946087009A9684609F0F5FF5D -:101B5000002804D0A3200BA1800019F0FCFA082271 -:101B60000AA9384619F06DF920692E460836401C3E -:101B700029D16069401C26D1A069401C23D1E069AD -:101B8000401C1FE07372635C686F73745F636F72F5 -:101B9000652E6300DA020000B4B30100D801002012 -:101BA0006D170000A40B00206E52463531383232DA -:101BB00000000000880700202400002071190000A8 -:101BC0008000001012D02069294619F09BF9606945 -:101BD000291D19F097F9A069314619F093F9E069C8 -:101BE00029460C3119F08EF915B0F0BD2B2468464A -:101BF000047009A909F0A1FF002803D0F649F748AD -:101C000019F0A9FA082209AF28460AA919F019F90A -:101C10006846047009A909F090FF002804D0EF4835 -:101C2000ED49C01D19F097FA0822391D304619F008 -:101C300008F9D9E770B5EA4C0546A068002804D039 -:101C40000320E549000219F086FAA56070BD10B5C1 -:101C50000146E44801F075F9E1498879401CC0B2B9 -:101C60008871012803D1E048407800F04DFB10BD99 -:101C700070B50446DD4816460D46814204D1D7486A -:101C8000D549CB3019F067FA012E05D0E120D249B1 -:101C9000800019F060FA70BD66202070002020726C -:101CA000A5810120A07370BD70B515460C4606468F -:101CB000FFF758FE00280CD06621017046800121F4 -:101CC000017221680161A18881820573FFF72BFEF3 -:101CD00070BD1321304607F078FB70BDC2494968DA -:101CE000884201D210207047032101700020704704 -:101CF00070B5BD4C05462078002694B0002801D070 -:101D00000820E4E6BA4A6260954201D21020DEE67D -:101D10006868002809D00921D82804D3C31C9B086F -:101D20009B00834205D00846D1E60320400268604C -:101D30000EE0012109074B6B896B4B43AD49511AEA -:101D40000122591AD202891A814201D20421EAE7FA -:101D500000F052FF6178A0680CF04EFBE068401E76 -:101D600007280BD8302269460A70887068460DF043 -:101D700088FF002802D009A80CF0FBFC2846FFF7DA -:101D800010FD012020703046A1E6F8B504469648C3 -:101D90000F464068814208D3002C01D0844204D30E -:101DA000E01C80088000A04201D01020F8BD8C48C3 -:101DB0008178002911D039880091417860225143FF -:101DC0000D18287B0C350007000F3B4600222946E2 -:101DD000FFF776FD060004D015E0002038800520CE -:101DE000F8BD002C13D039880098814201D90C2607 -:101DF0000DE028783B460007000F22462946FFF7F2 -:101E00005FFD060005D00C2E01D000203880304642 -:101E1000F8BD734C6078401CC0B26070092801D1D5 -:101E200000206070A078401EA07068784107490FBC -:101E300001290ED0022906D003291AD066496E481E -:101E400019F089F9E3E7C006E1D46868FFF7FFFEFF -:101E5000DDE7644869684C3001F073F86079401C34 -:101E6000C0B260710128D2D15F48407800F04CFACE -:101E7000CDE7E079401CE071C9E7604A10B59042B7 -:101E800009D3594A0124A4045268A04201D39042C4 -:101E900001D3914201D2102010BD00F0FEFE10BD12 -:101EA000564B10B5994209D34F4B0124A4045B68EB -:101EB000A14201D3994201D39A4201D2102010BD10 -:101EC000022803D0102801D0092010BD00F00BFF1C -:101ED0000028FAD0052010BD484B10B598420DD30C -:101EE000414B0124A4045B68A04201D3984205D36E -:101EF000994203D3002A03D09A4201D2102010BD88 -:101F000000F017FF0028FAD0072010BD10B50446D6 -:101F1000354894B04068844202D2102014B010BDFD -:101F20000F2008A9087369460BA809F006FE0028CF -:101F3000F4D16846007A207068464089608068461F -:101F40008089A0800020E9E710B500290BD0264A3F -:101F50005268914202D30B68934201D2102010BD07 -:101F60008A88002A02D001F037FE10BD092010BD7A -:101F700010B5224A94B091420ED31B4A01239B0410 -:101F80005268994201D3914206D3441E1E2C41D877 -:101F9000994203D3914201D21020BFE7012837D1E3 -:101FA00008780024C007C00F002803D0032069462A -:101FB000887001E06846847038206946087009A975 -:101FC000684609F0BAFD002804D004480CA18B38FB -:101FD00019F0C1F82046A1E7841B0000AA02000006 -:101FE00088070020A40B002024000020FFFF000031 -:101FF00000220020000000202104000000C0010099 -:102000007372635C686F73745F636F72652E6300D5 -:10201000072083E70246203A1F2AF9D806F001FE7E -:102020007CE710B5604A5268914201D2102010BD81 -:102030000246203A1F2A02D806F068FE10BD07208B -:1020400010BD70B50546594C002020702046461939 -:1020500055484660E01C80088000A04204D0FF2064 -:102060005349293019F077F801200007C06AC043AE -:102070000006000E03D14F480068401C03D04E48B4 -:102080004E49301AC862A8B20422214604F00DF964 -:10209000002804D0FF204649393019F05CF870BDA3 -:1020A000F0B595B03B2008A9087369460BA809F064 -:1020B00044FD002804D0FF203D49813019F04BF841 -:1020C0003F4E00246D4630E02F19B87DC10706D081 -:1020D000400704D460004019C08809F0E9FB394882 -:1020E000807900281FD0B87D80071CD5600040197A -:1020F000C0880022062109F0F7FB002813D03C21FC -:1021000008A8017360004019C1886846C185694606 -:102110000BA809F012FD06000BD0FF2024499630D1 -:1021200019F019F805E0641CE4B268460079A04291 -:10213000CAD8304658E5F7B50546007800270009AB -:102140000C463E46062804D0FF201949BF3019F03E -:1021500002F8287A00280ED0012814D0FF20144954 -:10216000E03018F0F8FF0298002C068001D027809C -:1021700066800020FEBD02270926002C10D0A88909 -:10218000A080A87B0AE003271426002C08D06888CA -:10219000A0802869E060A88A2082287B2072E2E77C -:1021A00002980680E5E700002400002000220020BD -:1021B000002000000010001000000020000500407A -:1021C000043000008807002010B56038030019F0C3 -:1021D000E3F80A060A0F13181F252930353A086854 -:1021E000FFF786FD10BD05C91146FFF7CEFD10BDF6 -:1021F0000868FFF773FD10BD05C91146FFF73DFEE6 -:1022000010BD4B6808788A681946FFF749FE10BD73 -:102210008A6809C91946FFF75FFE10BD0868FFF715 -:1022200075FE10BD08884A6880B21146FFF78CFE23 -:1022300010BD05C91146FFF79BFE10BD05C911462B -:10224000FFF7EFFE10BD012010BD01207047000018 -:102250000E4A12680C498A420AD118470B4A126882 -:10226000094B9A4204D101B500F08EFE03BC8E46A4 -:10227000074909680958084706480749054A064BAF -:102280007047000000000000BEBAFECA64000020D3 -:1022900004000020F0210020F021002001203F490F -:1022A000400608603E4908603E490A68FF231B0259 -:1022B0009A4383121A430A6038498039086070478C -:1022C00010B502460420384904E0C3005B181B79AE -:1022D000002B0AD00346401EC0B2002BF5D133A11B -:1022E000432018F038FFFF2010BDC300CA50002261 -:1022F00059184A718A7101220A7110BD2A4A0021B7 -:10230000C00080180171704710B50446042803D33B -:1023100026A1522018F01FFF2348E1000C18207955 -:10232000012803D021A1532018F015FF6079A1796D -:10233000401CC0B2814200D06071012017494006A4 -:102340008031086010BD70B5164804250068164E2F -:102350000004800F1B4C02281AD014A1692018F029 -:10236000FAFE15E02078C10088190279012A07D108 -:10237000427983799A4203D04279827170588047BA -:102380002078401CC0B22070042801D300202070A7 -:1023900028466D1EEDB20028E4D170BD80E100E05A -:1023A00080E200E018E400E0200C00207372635C1F -:1023B000736F635F7369676E616C6C696E672E63C0 -:1023C000000000003400002010B5EFF31080C407B7 -:1023D000E40F72B6D2484178491C41704078012818 -:1023E00001D10AF0FFF9002C00D162B610BD70B522 -:1023F000CB4CE07800280AD10125E570FFF7E4FF17 -:102400000AF0F8F9002804D000200AF0CBF90020E7 -:1024100070BDC44865714560F9E770B5EFF3108091 -:10242000C507ED0F72B6BE4C6078002803D1BEA17F -:102430008F2018F090FE6078401E60706078002851 -:1024400001D10AF0D3F9002D00D162B670BD10B5EC -:10245000B348C178002904D000214171C170FFF751 -:10246000DCFF002010BD10B504460AF0C3F9AC49EA -:10247000C978084000D001202060002010BDF8B5C8 -:102480000246A74C0026A67108200421012510272A -:10249000130018F081FF0D080A0C0E101214161EFE -:1024A000262123252800257122E0022001E0217148 -:1024B0001EE020711CE027711AE02020F9E70126B8 -:1024C00016E0FFF781FF0AF095F90028FBD00226FD -:1024D0000EE02171A5710BE02771FBE7202000E0E1 -:1024E00040202071F6E7FF208FA1763018F033FEF0 -:1024F0000AF08CF9002809D00AF08EF9B04205D113 -:1025000030460AF08CF90028FAD02CE00120800730 -:10251000C560894900224A60884A9661814B02223F -:102520005A60856086480269D243D206D51702698F -:1025300010231A4302610F466D1C00E020BF78682B -:102540000028FBD030460AF06AF90028FAD0002DA6 -:1025500004D17B48026910218A430261714902203B -:10256000886000207860A07900280CD00AF042F939 -:1025700005460AF09FF8734A002D02D0A260E06081 -:1025800001E0E260A060002E01D100F0A5F8F8BDE6 -:1025900010B504460AF034F9002805D0604901203E -:1025A000C8704A78521C4A702046FFF768FF10BD79 -:1025B000F8B5614DA8680026012802D1AE600AF086 -:1025C000F1F86868012800D16E6028680127544C32 -:1025D000012812D12E606079002803D000200AF073 -:1025E000E1F866712078002807D00AF003F9002886 -:1025F00003D0012080070761A770286901282AD12C -:102600002E6100F05FF8012080074761A079002863 -:1026100015D00AF0EFF800900AF04CF80099002964 -:1026200001D0E16800E0A168411A022901DA8A1CA0 -:1026300011DC0099002901D0E06000E0A060FFF704 -:10264000C3FE0AF0D7F8002804D0012080070761F4 -:10265000A77000E02770E868012812D100F032F876 -:1026600000F030F800F02EF8A078002804D1FF2008 -:102670002DA1033018F06FFDEE60A6702670FFF7F5 -:10268000CCFEF8BD10B5264CE078002801D10AF048 -:10269000ADF801208107886100F014F8A0780028C7 -:1026A0000BD0254CE068002803D10AF0B8F80028C8 -:1026B000F8D10020E06000F005F800201949C0437F -:1026C000886010BD08B55020694608806A461088A9 -:1026D000411E1180FAD208BDF8B51248192787604B -:1026E000154900200860C8600AF084F8BE0701247C -:1026F0000B4D002802D03461AC7000E02C70FFF765 -:1027000063FE084847600D4928798863FFF7DAFFC0 -:10271000B461FFF7D7FF0849002008617461F8BD74 -:1027200038000020000300407372635C736F635FC6 -:10273000636C6F636B2E6300000100400005004076 -:1027400000ED00E0FFFFFF7F8107C90E002808DAD7 -:102750000007000F083880082E4A80008018C069E2 -:1027600004E080082C4A800080180068C8400006F9 -:10277000800F704710B50D20FFF7E6FFC4B20420AC -:10278000C043FFF7E1FFC0B2844203D023A11A2067 -:1027900018F0E1FC26490120486010BD0121254ABE -:1027A00048031060244B00221A60244A5160244AD6 -:1027B0001060244A11601F49803908607047012168 -:1027C0001C4A480310601F4A51601B4A00211160D7 -:1027D0001B490860704710B517490868012804D0E4 -:1027E0000EA1572018F0B7FC10BD114880680022D8 -:1027F000C0B20A6009F0BEFC10BD10B50E480168F9 -:102800000029FCD0FFF7E7FF01200D4940030860D5 -:1028100010BD000000ED00E000E400E07372635CB6 -:10282000736F635F68616C5F726E672E6300000098 -:1028300000D5004080E100E000D1004000D300401E -:1028400080E200E000D0004030B40121BC48C90261 -:102850000160CD1005604A030260BA4803681B029C -:102860001B0A036004680023240A24020460B6489B -:102870000468240A24020460B4480124446084608B -:10288000B34C23606360A360B24B19601D601A6093 -:10289000B14B19601A600121016030BC704710B45F -:1028A0000121A748CA0202600B0203600C06046003 -:1028B000A64841608160A94841680029FCD1A4492B -:1028C0000020086048608860A248026003600460DD -:1028D00010BC704701219F48C9020160C910016006 -:1028E0007047002805D0012805D0022805D19C4852 -:1028F00070479C4870479C48704710B59BA18B203F -:1029000018F029FC002010BD70B500219E4C9F4D91 -:102910009F4A8F4B002808D001281DD0022822D0C2 -:1029200092A1B32018F017FC70BD01200004A06034 -:10293000A86011601960974BC2039A60964A906034 -:102940007F4A0012106095480160864801609448F3 -:1029500001609448017070BD01204004A060A8602F -:102960005160596070BD01208004A060A860916032 -:10297000996070BDF8B59446834A8B4F834D00240F -:102980000126002808D0012832D0022840D077A1A3 -:10299000E82018F0E0FBF8BD891E0902090A0120B1 -:1029A000000490603C6468606C4A1164012B1DD087 -:1029B00000217C4A7D4B51706146DC63DE637C4BB9 -:1029C0005C6002249C6004241C61744B3D311960DE -:1029D00073490E605F4B891519606F4B58605E48F4 -:1029E00001606C49C00548601670F8BD0121E0E740 -:1029F0000120704E4004704F012B04D134645060AC -:102A000068603964F8BD9060346468603964F8BD0A -:102A100001206A4E80046A4F012BF4D1EEE74F4843 -:102A20004068704770B54A4D28680026564C01280A -:102A300006D1A068C00303D501200004A0602E6069 -:102A40006868012809D1A068800306D501204004E8 -:102A5000A0606E6001200AF0B9FEA868012809D1C3 -:102A6000A068400306D501208004A060AE6002206B -:102A70000AF0ACFE70BD10B54A490878002818D09D -:102A80000120444AC0079060434AC00B90602C4A22 -:102A900000121060414A00201060324A1060404A23 -:102AA000106008704A78002A02D048700AF08EFE42 -:102AB00010BD0320FAE70120424900060860704774 -:102AC0000120244900060860704701203D49400567 -:102AD0000860704701201F4940050860704733496E -:102AE0000020C86388151B4908607047410A364AB0 -:102AF000C005C00D5043801C5143400A0818704760 -:102B000010B4324C430B63431B0C5C020C602E4C24 -:102B10006343C31A2E485C0258432B4B400D43437A -:102B2000E31A0124DB0324041B191B1613700A6823 -:102B30001018086010BC704710B50AF01BFF10BDDC -:102B400080E100E008E400E018E400E000B00040AC -:102B500040B1004080E200E000E100E000B500404C -:102B600048B100404081004044B100407372635C52 -:102B700072656D5F68616C5F6576656E745F7469C0 -:102B80006D65722E6300000000B3004040B300404A -:102B900040B5004000F50140008300404085004002 -:102BA000008200404800002000B10040C08F00407B -:102BB0000085004004B1004004B5004008B1004069 -:102BC00008B5004000E200E0093D00003786000043 -:102BD0006F0C010010B50AF0B9FE10BD00200449C9 -:102BE000C863012001218140024A116000BF704783 -:102BF000C01F004080E200E010B50DF05DF909F063 -:102C0000F7F9FEF7C3FB0FF0F5FA0DF08FFF0DF0AB -:102C10001BFF10BD70B50C46054603F0A7FA214610 -:102C200028460EF0C2FF70BD70B50D46040012D0EC -:102C3000002D10D02101284618F060F910225449C7 -:102C4000284618F0FEF852480121083801804480D7 -:102C50004560002070BD012070BD70B54C4E002451 -:102C60000546083E11E0716820014018817BAA7B6F -:102C7000914209D1C17BEA7B914205D10C222946C0 -:102C800018F0B2F8002806D0641C30888442EADBD1 -:102C90000020C04370BD204670BD70B50D460600D3 -:102CA0000AD0002D08D03A4C083C20886188401C8E -:102CB000884203D9042070BD102070BD3046FFF754 -:102CC000CCFF002801DB401C0AE02088616800017D -:102CD00040181022314618F0B4F82088401C20809B -:102CE0002870002070BD70B514460D001FD0002C58 -:102CF0001DD00021A170022802D0102817D108E0B1 -:102D0000687829780002084311D00121A170108051 -:102D10000BE02846FFF7A1FF002808DB401CA0704D -:102D2000687B297B000208432080002070BD0120C1 -:102D300070BD70B5054614460E000AD000203070F4 -:102D4000A878012807D004D9114908390A88904287 -:102D50000BD9012070BD002C04D028782070288861 -:102D6000000A50700220087010E0002C0CD0496856 -:102D70000001411810222046103918F062F8287816 -:102D800020732888000A607310203070002070BD06 -:102D9000540000205A4910B5884207D30121890404 -:102DA000884205D357490968884201D2102010BDD6 -:102DB0000146012005F0CBF810BD30B5044693B0B4 -:102DC00000200D46079014210BA818F099F81C213B -:102DD000684618F095F86A46112010770020507761 -:102DE000107802210843107007A80C90012008AA4F -:102DF000907245486A4610850AA80B902088108476 -:102E000060885084A0889084E088D084907FF921E5 -:102E10000840801C4008400090770820908610876A -:102E200008A80F9010AA0BA9684600F05CFF0028C4 -:102E300003D110A800882880002013B030BD3EB513 -:102E400004460820694608802D48844207D30120A3 -:102E50008004844205D32B480068844201D21020AC -:102E60003EBD2146012005F072F80028F8D12088E7 -:102E7000694688806088C880A0880881E088488189 -:102E800005F065FE01AB6A46002101F0BBFB694617 -:102E900009880829E4D003203EBD1FB50446002060 -:102EA000029008206946088115480391844207D39F -:102EB00001208004844206D312480068844202D272 -:102EC000102004B010BD05F042FE014602AA0F48D2 -:102ED00001F02EFD0028F4D169460989082901D0A6 -:102EE0000320EEE7694609882180694649886180A8 -:102EF00069468988A1806946C988E180E1E70000C8 -:102F000000C0010028000020042A0000FFFF00008C -:102F100010B5031D03600020521E04E05C181C6005 -:102F2000401C2346C0B29042F8DB0020186010BD60 -:102F300001460A680020002A02D0104612680A6082 -:102F4000704702680A6001607047000010B50146D2 -:102F50002022094817F075FF07490020C877084666 -:102F600010BD0649012048610548064A01689142A2 -:102F700001D1002101607047B00E00200005004023 -:102F800064000020BEBAFECA0C4908784A78401C8A -:102F9000C0B2904200D008707047094A074820BF6D -:102FA00040BF20BF4178037843701368002B02D1E3 -:102FB00003788B42F3D00020704700006B000020A4 -:102FC00000E200E00A4A022151600A490B68002B26 -:102FD000FCD0906008680028FCD000205060086891 -:102FE0000028FCD0704701200007406970470000AE -:102FF00000E5014000E401407047704770477047AA -:1030000010FFFFFFDBE5B15100C001006700FFFFCB -:1030100003B40148019001BD09000020002803D03D -:103020008178012939D101E0102070470188FE4ADA -:10303000881A914233D01BDCFC4A881A91422ED068 -:103040000BDC00292BD00320C002081A27D001284E -:1030500025D001210903401A07E001281FD00228CA -:103060001DD0FF281BD0FF380138002815D116E0ED -:10307000FF220132811A904211D008DC01280ED0C3 -:1030800002280CD0FE280AD0FF2806D107E001292B -:1030900005D0022903D0032901D0002070470F205A -:1030A000704700B50B2826D009DC030018F074F92E -:1030B0000B1D2125251B25292325271F1B00112832 -:1030C0001BD008DC0C2816D00D281CD00F2814D0DB -:1030D000102808D10FE0822809D084280FD0852835 -:1030E0000FD0872811D0032000BD002000BD05208F -:1030F00000BDCF4800BD072000BD0F2000BD04204B -:1031000000BD062000BD0C2000BD0D20800200BDCA -:1031100070B500290BD0CB1FFA3B81241E46CDB2DF -:10312000112B1BD2012805D0022806D009E000206F -:1031300010701DE0FF20043001E0FF2003308142C9 -:1031400018D0330018F028F9111613131613161699 -:103150001316161613131313161316000846FF380A -:1031600081381F2803D9FF39FE39022902D815708A -:10317000002070BD1470072070BD00B5030018F06A -:103180000BF9060406040C080A0C002000BD1120EF -:1031900000BD072000BD082000BD032000BD007851 -:1031A0000207120F04D0012A05D0022A0AD10EE02C -:1031B000000907D108E00009012805D0022803D042 -:1031C000032801D0072070470870002070470620B0 -:1031D0007047002807D0012807D0022807D003280D -:1031E00007D007207047002004E0112002E02120D2 -:1031F00000E0312008700020704738B50C4605000B -:103200004FD06946FFF7CBFF002822D12088032149 -:1032100089028843694609788907090D0843208097 -:103220006946681CFFF7BBFF002812D121880320E4 -:1032300000038143684600788007800C01432180A9 -:10324000A8784007820F2020012A03D0022A03D049 -:10325000072038BD814300E00143218088B2010589 -:10326000890F08D0012189038843A9780907C90F6C -:1032700089030843208080B28104890F0AD0A9788D -:103280004004C906C90F400CC903084320808004CC -:10329000800F02D12088400403D5208840210843B4 -:1032A0002080002038BD70B50446002008801546F7 -:1032B0006068FFF7A2FF002815D12189A08981420B -:1032C00010D861688978C90708D00121490288426D -:1032D00008D8491C17F01EFE298009E0FF21FF31A4 -:1032E000884201D90C2070BDFF30FF3003302880A8 -:1032F000002070BD10B5137804785B08E4075B000C -:10330000E40F23431370FD2423400478A407E40F43 -:10331000640023431370FB24234004786407E40F04 -:10332000A40023431370F724234004782407E40FF8 -:10333000E40023431370EF2423400478E406E40FF1 -:10334000240123431370DF2423400478A406E40FF0 -:103350006401234313700078BF244006C00F23404C -:10336000800103431370002906D00878C10701D1FA -:10337000800701D5012000E00020C0015906490E58 -:103380000843107010BD30B50A8803239B020488DF -:103390009A4323059D0F02D1A3049C0F01D09B0FDC -:1033A00000E001239B021A4303230A801B039A4374 -:1033B00003889804840F02D11805830F01D0800F71 -:1033C00000E00120000302430A8030BDF3B593B052 -:1033D0000D000FD0139800280FD01221284617F0A7 -:1033E0008DFD03AAFF21012003F0D5F80024264615 -:1033F00037467AE0102015B0F0BD0720FBE768469D -:10340000807D01280BD16846818A0520C002081AF8 -:1034100010D0012810D0022812D0032812D0042C7A -:1034200014D0052C15D113E002290000012800005A -:1034300003300000012400E002246846468A08E0C8 -:10344000032406E068460424478A02E0052400E0DD -:1034500006246846418A1398814246D12C74002E76 -:1034600041D00DAA0EA905200292019100901023CF -:103470000022FF21304603F02FF9002823D16846AF -:10348000808E2A46C0B20EA9FFF72DFC00281AD163 -:10349000AE81002F27D00DA9052008AE0291009023 -:1034A000132300220196FF21384603F015F9002866 -:1034B00009D16846808EF11CC01EC0B22A1DFFF7DC -:1034C00012FC002801D0032095E708A881784278F3 -:1034D00008021043E881062C05D16846807DA87259 -:1034E0006846808A2881002085E703A803F05CF8FD -:1034F000002884D0FFF7D5FD7DE7002805D0FE4ADF -:10350000012903D0022903D003207047518800E02D -:103510009188814201D1002070470720704770B523 -:103520000C4605461C21204617F0E8FC00202080B0 -:10353000002D08D0012D04D0F0A1F54817F00BFEA6 -:1035400070BD062000E00520A07070BD70B592B07F -:103550001546064601206A461071107453740846D9 -:1035600008300395029048889082FEF7FBF904002A -:1035700019D06580172069468883203600940AABED -:103580007178023307AA01A80EF017F90646607891 -:10359000000701D5FEF7C7F9002E0AD03046FFF725 -:1035A000ECFD12B070BD1321284605F00EFF03207C -:1035B000F7E708A800906846838B0422012128467B -:1035C00007F0B3FEEDE770B506468AB000200D4661 -:1035D00007900590069003A90490052402460291E5 -:1035E0000190102300942946304603F075F8002816 -:1035F0000DD108A804A9009102900194684683891E -:1036000000222946304602F083FE002801D0FFF751 -:1036100048FD0AB070BD10B50EF0D5FA10BDF0B57A -:1036200089B000260546059600780C460827030059 -:1036300017F0B2FE0CFD070C390B75759BBEFCD361 -:10364000E3FD68680A38FEF702FB07E1A88800225C -:1036500080B20421009008F067FB0290002C04D097 -:10366000AB48A6A16E3017F076FD0298002804D171 -:10367000A748A2A16F3017F06EFD0298009908309C -:103680000DF0D0FCFEF76EF9040007D060783843E7 -:10369000607000986080FEF746F9E1E01321009821 -:1036A00005F093FEEAE0002C04D1BD2093A1800038 -:1036B00017F051FD60880022042108F035FB0090CE -:1036C000002804D192488DA1883017F044FD00995C -:1036D000002008802A7994461EE0C3005B199B688D -:1036E00007936B469B8B1A0708D5DA0606D560460A -:1036F000C20050194038C08F088006E05B0409D52D -:103700000871C2005019C0884880607838436070E2 -:103710000226A3E0401CC0B28445DED89EE0E888C3 -:10372000694608800090002C04D1794873A1983034 -:1037300017F011FD2878062813D10098C00B10D07F -:1037400060880022042108F0EFFA060004D17048D6 -:103750006AA1A23017F0FFFC00203071A8887080A9 -:1037600039E060783843607078E0002C04D1684814 -:1037700062A1B43017F0EFFC60880022042108F049 -:10378000D3FA0090002804D161485CA1B73017F04B -:10379000E2FC009808300EF068FA0121484002D19E -:1037A000E888C00B5AD0009861880226C180D8E70B -:1037B000002C04D1564851A1D03017F0CCFC6088C1 -:1037C0000022042108F0B0FA002804D150484BA18F -:1037D000D33017F0C0FC0226C3E7002C04D14C48BC -:1037E00046A1DC3017F0B7FC022661880122204692 -:1037F000FEF73EFA01200590B3E7A889002280B2C7 -:103800000421009008F090FA0746002C04D04048AC -:103810003AA1EE3017F09FFC002F04D13C4837A1AD -:10382000EF3017F098FC6868029001E009E010E0C2 -:10383000288969468881012202A90098FEF734FA96 -:103840000CE0002C8DD16D202CA1C00017F083FC62 -:1038500087E72F4829A1FE3017F07DFC002C0DD002 -:10386000607800070AD50598002807D184202070C9 -:103870002046582229460830FDF7A6FC304609B0FC -:10388000F0BDF7B50C460546007A224688B00A32EC -:103890000492921C01920027811E16323E4602922B -:1038A0000B0017F079FD08F405F348488ED0F2F3C9 -:1038B00068880022042108F037FA0190002803D11B -:1038C0000EA1144817F047FC01980088002802D088 -:1038D0005227072600E151271E26002C70D0688849 -:1038E000A0800120A071019804990079C0004019BE -:1038F000C089FFF76BFD0FE0400C00207372635C22 -:1039000067617474735F636F72652E6300000000FB -:103910006F0200008603000000287DD10198007925 -:10392000C0004019C089208101980079C000401969 -:10393000408AA083F0E0698A0091062820D1E889B6 -:10394000C00B1DD008462230512786B2002CC5D0AE -:10395000A8890199FFF73AFD002872D16888A080F4 -:103960000220A071A88920810120A072288AE0830A -:10397000009820846969009A029817F062FACBE0F7 -:1039800008462030502786B2002CA7D0A889049979 -:10399000FFF71CFD002854D16888A080A889E0802A -:1039A000287A06280AD002202072288AA08300984C -:1039B000E083204669692030009ADEE70120F3E7C2 -:1039C0008FE068880022042108F0AEF90690688A2A -:1039D00000900698002803D1FD49FE4817F0BBFB74 -:1039E000069808300EF041F90121484002D1E889DB -:1039F000C00B25D000985127223086B2002C7AD0F7 -:103A00006888A080A8890199FFF7E0FC002818D1F8 -:103A10000220A071A88900E013E020810420A07298 -:103A2000288AE083009820846969009A029817F038 -:103A300008FA0699002008710698A98941806BE070 -:103A400003200BB0F0BD688804F0DDF900906888B1 -:103A50000022042108F068F901900098002804D1A0 -:103A6000DC48DB492C3017F076FB0198002804D1A4 -:103A7000D848D7492D3017F06EFB0198D649C08839 -:103A8000884205D05127222604E01EE03FE035E0C1 -:103A900050272026002C2ED06888A080502F07D0D9 -:103AA0000220A0712146287B0831FFF738FD33E062 -:103AB000287BA11DFFF733FD6A8800230199009838 -:103AC000FFF744FD0028BCD126E0C449A889C98875 -:103AD000814207D154270626002C0CD06888A0808C -:103AE0001AE008E053270826002C04D06888A0803C -:103AF000A889E08010E00A98068013E05527072681 -:103B0000002CF8D0A889A0800020A07104E08D20AE -:103B1000AF49C00017F01FFB0A98002C068001D0A7 -:103B20002780668000208CE7AC4900200870704731 -:103B300030B585B00C4601F0DBF90546FF2804D10D -:103B4000A448A349953017F006FB0020208020717F -:103B50006080401EE0802046294608300DF056FA6D -:103B60006A462946012002F016FD102412E068463C -:103B7000808800070ED56846C0882946FFF723FDD8 -:103B800068468188FF2321438180C0882946019AA5 -:103B900002F02CFE684602F007FD0028E7D005B0D1 -:103BA00030BD0A46014610B5104608300DF042FA05 -:103BB00010BD70B505460022042108F0B5F80400D8 -:103BC00004D184488249B73017F0C5FA2046294607 -:103BD00008300DF027FA70BDF0B591B00C460746DD -:103BE00004F011F9050005D02878222804D2082015 -:103BF00011B0F0BD7A48FBE700220421384608F0F6 -:103C000093F80646002C02D0A08800280CD0012092 -:103C1000694608710220087400204874002C05D001 -:103C2000A0880883206802E00920E1E70883059066 -:103C30003046083003970290FDF794FE040018D038 -:103C40006780172069468883203500940AAB69781D -:103C5000023307AA01A80DF0B0FD05466078000701 -:103C600001D5FDF760FE002D09D02846FFF785FA43 -:103C7000BEE71321384605F0A8FB0320B8E708A8E3 -:103C800000906846838B04220121384607F04DFBE3 -:103C90000021C943F180ABE7FFB585B00E9E778860 -:103CA000384604F0B0F8054600220421384608F0F2 -:103CB0003BF80446002D03D145494A4817F04BFA1A -:103CC000002C04D147484249401C17F044FA0834FC -:103CD000089869460394C1C105A80DC820356978C4 -:103CE0000DF0DAF9CBE5F0B50446002099B00D46A9 -:103CF00001460D9010A88181164601818180374AC6 -:103D000068469180018510A80180684601878185F9 -:103D100081841078012808D0022806D0032804D016 -:103D2000042802D0082019B0F0BD2F4A944273D362 -:103D30002E4F0121890438688C4201D3844278D304 -:103D4000294A954275D3012189048D4201D38542C8 -:103D50006FD36168002913D0234A914269D30122AD -:103D60009204914201D3814263D3608921898842C0 -:103D700003D801225202914201D90C20D3E70D90C1 -:103D800016AA0EA92846FFF78EFA0028CBD168683C -:103D900080784007800F02280AD16846008F80048F -:103DA000800F05D02869002802D03968884240D3A6 -:103DB0000AA92069FFF721FA0028B4D12069002858 -:103DC0001CD0607880076846008D14D580040FE011 -:103DD000FC380000EE030000FFFF0000400C002054 -:103DE000023000000C05000000C001002800002087 -:103DF000800F68D002E08004800F64D16846008D97 -:103E0000810618D58004800F606806D0002812D083 -:103E1000396888420DD302E00BE000280BD0FE4940 -:103E2000884206D301218904884204D33968884234 -:103E300001D2102077E709A96069FFF7DEF90028B1 -:103E40009CD16069002808D06846808C0105890FE4 -:103E5000012938D18004800F35D00BA9A069FFF764 -:103E6000CCF900288AD16846808C80062BD468461D -:103E7000808D810627D4A169002906D00105890F0C -:103E8000012920D18004800F1DD0E068002804D0D3 -:103E90000078002817D01C2815D204AA611C2046DF -:103EA000FFF728FA0121890210A80180012768463E -:103EB0008773DA49818104AA033217A92868FEF7BB -:103EC00038FF002801D007202DE710A8007F15A992 -:103ED000C01CC2B200200C920190FF320090034639 -:103EE0000291FF3203A80332109902F0ACFA0028C5 -:103EF00026D110A9888A0F902A892969C84801917A -:103F00000092029010A90A8B6B8928680E9902F022 -:103F10009AFA01007ED1C2480025001F81886846B8 -:103F20004174090A8174052104A86A4623C210A8B5 -:103F30002A46FF21808A0C9B02F0EAF9002802D071 -:103F4000FFF7AFF8EFE66846007C0322C1090020C6 -:103F5000920290430122920280181490002928D0E6 -:103F6000014610A8018068462921877309028181D2 -:103F7000058608A8007C0023410860784900C00736 -:103F8000C00F014308A80174FD2001406078A54AD4 -:103F90008007C00F4000014308A801740CA902204B -:103FA00001910090029503A8109902F04CFA0100CB -:103FB00030D16068002828D0206900280DD10AA9D6 -:103FC0000EA8FFF7E0F96078800706D46946088DEF -:103FD0000321090388436946088590496846877329 -:103FE000FE3181818F492089891E16F093FF626816 -:103FF0000D9811AB0192009002930A46002303A88A -:104000000A9902F020FA010004D12078C10603D4F5 -:10401000800600E085E02AD56846058660690028AC -:104020000DD109A90EA8FFF7AEF96846818C0320CF -:104030008002814301208002091868468184694614 -:10404000888CC82108436946888474488F73FF3080 -:10405000888112AA0CA902200292019100900023EB -:10406000704A03A8099902F0EEF9010059D12078AD -:10407000C00729D068460586A06900280DD10BA984 -:104080000EA8FFF780F96846818D032080028143E6 -:10409000012080020918684681856846818D40208C -:1040A00001436846818587735F49818113AA0CA902 -:1040B000022002920191009000235A4A03A80B9912 -:1040C00002F0C1F901002CD1E06800282DD010A821 -:1040D00014990180544968468773491C8181E168BD -:1040E00008A80A78027449784174E068412241883E -:1040F00068464186E0680023017908A80175E068F8 -:10410000D200C18808A84175090A81750CA8072149 -:1041100001900091029503A8109902F094F9010012 -:1041200003D00F9800F0E8FEFDE53D480321001F95 -:104130000170002E0AD08088308010A8808870809E -:1041400010A80089B08010A88089F0800020EAE5DE -:1041500030B501248BB015460B46012802D0022849 -:104160001CD104E0684605218473C90203E02B4991 -:1041700068468473891E8181002B12D003210020A0 -:10418000890288430121890240186946888405AA6A -:1041900004A91846FEF7CDFD002804D007200BB077 -:1041A00030BD1020FBE76A46127C1D480092801E3D -:1041B00005A9FF3201910290FF32002303A80332C8 -:1041C000099902F040F9002802D0FEF76AFFE6E7FD -:1041D0001348001F002D01D0418829800470002061 -:1041E000DDE770B592B00446012608A886700F4935 -:1041F0006846018410AA08A93046FFF7A9FF0028E5 -:104200004ED12078064DC00700242D1F002849D02C -:104210001C2168460CE0000000C0010003280000DB -:10422000440C0020030200000329000001180000D4 -:1042300016F066FE6846017820200143684601704A -:1042400008A88670F9496846018411940794817F13 -:10425000F92001406846891C8177002001466846A4 -:104260000177002001466846417704218185C48595 -:10427000018607A80A9011A80D9008A809900EAA17 -:1042800009A96846FFF72FFD002809D16846008F6D -:10429000E8806846808F2881401C68812C7000204F -:1042A00012B070BDEC802C8110A80088F4E7F7B53F -:1042B000DF4900260A789EB0012A04D0022A02D0E3 -:1042C000082021B0F0BD4A88824201D00620F8E7DC -:1042D0001F98824201D10720F3E7012210A98A75B5 -:1042E000D4488882002003239B020146994393020D -:1042F000CB1810A90B8669468A81CF4ACA8118A9B2 -:10430000887110A9888419A904916946CA82069007 -:10431000FF20087503A802F06AF900242546274605 -:1043200008AA052103A802F065F9002810D0822808 -:104330006FD1002C6FD0002D6DD010A88480C58067 -:104340000021017418A8807B11AC012865D06DE0B4 -:1043500008A88079002F21D0012857D16846818C88 -:10436000B44881421CD113AA0DA905206B4607C38E -:104370006846408C10230022FF2102F0ADF900288E -:1043800068D110A88089042801D006284CD168463D -:10439000818E1F98814239D10F2092E7012835D1B3 -:1043A0006846808C0521C902884202D0491C884297 -:1043B0002CD19F4841886846408C814201D1012719 -:1043C00000E00027002C01D0002D10D01F9988425A -:1043D0001CD113AB0DAA05216E460EC60446102350 -:1043E0000022FF2102F078F9002833D101E03546A0 -:1043F0000CE010A88089022801D0102814D1C0B286 -:104400001BAA0DA9FEF76FFC00280DD16846468C4B -:1044100086E71FE0FFE7052053E714A91BA8221D2C -:10442000FEF787FC002801D003204AE710A8007C93 -:104430000023001DC2B210A80274209802900194BB -:10444000009215A81C9901F0FEFF002802D17849BE -:1044500002220A70FEF725FE33E710B50B46401E18 -:1044600086B084B203AA00211846FEF743FF04AACF -:10447000052103A802920191009001230022FF214F -:10448000204601F045FF04466846008A012804D012 -:104490006D206A49000116F05EFE2046FEF701FE1F -:1044A00006B010BDF0B5624F0446387887B00E46AE -:1044B000032804D0042802D0082007B0F0BD04AAC5 -:1044C00003A92046FEF7EFFE0500F6D1606880786C -:1044D0004007800F02280DD1684680898004800F34 -:1044E00008D02069002805D055490968884201D2C2 -:1044F0001020E2E7208905AA6B46216907C36946B7 -:104500000A8A63892068039901F09DFF002802D080 -:10451000FEF7C7FDD1E7002E02D06846808A3080C2 -:10452000042038702846C8E738B50C00054609D085 -:1045300000236A46FF2102F031F9002804D0FEF77B -:10454000B0FD38BD102038BD69462046FEF755FE47 -:104550000028F8D1A078FF21C307DB0F2846009A76 -:1045600002F044F9EBE73EB50C0009D002AB6A4615 -:10457000FF2102F013F9002804D0FEF792FD3EBDA2 -:1045800010203EBD0321204616F0B8FC6846008886 -:1045900001A90005800FFEF71CFE00280BD168461C -:1045A000007920706846008801A98004800FFEF71A -:1045B00010FE002801D003203EBD684600796070DF -:1045C000A278EF20024068460088C10B09010A4327 -:1045D000F7210A404104C90FC9000A43A270F9211A -:1045E0000A40800601D5022000E001204000694613 -:1045F0000243097A50084000C907C90F0843A07058 -:1046000000203EBD7FB514460522019203AD029500 -:1046100000930A462388FF2101F07AFE69468989C2 -:104620002180FEF73EFD04B070BD0000052A0000A9 -:10463000400C002002280000FFFF0000FC380000B2 -:1046400028000020F3B5002799B068460C4607877C -:104650003D4600291DD0E068002806D0A06800284B -:1046600017D001886A4611870780199803F0CBFBA1 -:10467000002811D0007822287ED3199800F038FC49 -:10468000009000220421199807F04EFB060009D182 -:1046900004E010201BB0F0BDFC48FBE7FC49FD48DE -:1046A00016F059FDA078012803D0022801D0072078 -:1046B000F0E72088002808D0401E80B203AA0099A5 -:1046C00001F069FF002859D11DE0F048401CE1E7E6 -:1046D0006946498A228891420BD26846807D00252E -:1046E000012810D16846808AEB4988420BD1012508 -:1046F00009E0914203D1002D2AD06D1C01E0022D6A -:104700000BD0032D04D203A801F04EFF0028DFD008 -:1047100082281BD0002831D11DE06946897D0129FE -:10472000F1D16946DC4B8A8A5B1ED11A9A420FD0BE -:1047300005DCDA48101A0BD00128E4D108E0012981 -:1047400006D0FF390129DED10325E1E7022D15D17D -:104750000D2080029EE7E068002816D00EA90522F1 -:1047600002910192009069460B8FA2882088FF2158 -:1047700001F0CEFD002800E01DE002D0FEF791FC24 -:1047800088E76846A168008F08806846008AC006EE -:1047900001D5C3487EE70798002803D06846008B00 -:1047A000022801D0032075E70798A1780078012935 -:1047B00003D0800710D408206CE7C007FBD000228C -:1047C0000721199807F090F8002802D00725022049 -:1047D00004E0AE48801C5DE70225032008A90870AC -:1047E000218868468185199808360A90099617210C -:1047F0006846818712AB02330FAA052108A80097EB -:104800000CF0DBFF002802D0FEF7B7FC42E710A84F -:1048100000906846838F04222946199806F085FD8A -:1048200038E770B5064615460C460846FEF7F6FB17 -:10483000002804D12A4621463046FFF789FCF3E6DA -:1048400010B5FFF734FD10BD70B51E4614460D00BF -:1048500014D0002C12D0616800290FD00121FEF77E -:104860004CFE002809D12068FEF7D8FB002804D1AF -:10487000324621462846FFF736FAD5E61020D3E621 -:1048800070B515460C000ED00221FEF736FE00284A -:1048900008D12068FEF7C2FB002803D12946204634 -:1048A000FFF700FEC0E61020BEE6F8B506467D48DC -:1048B0000D46016814468A4231D36068002808D04A -:1048C000794A90422BD301229204904201D388422C -:1048D00025D37648864204D0304603F094FA002867 -:1048E0000CD0304600F004FB0646284600F0BDFA26 -:1048F000002804D16068002802D012E06348F8BDA7 -:1049000000236A463146284601F048FF002802D0BD -:10491000FEF7C7FBF8BD68460088800601D410206A -:10492000F8BD6188224628466368FFF76BFEF8BD34 -:10493000F7B55C4E0746306886B01446824202D214 -:10494000102009B0F0BD384600F0D2FA05465748AD -:10495000874201D0FF2D08D0002304AA29460798DA -:1049600001F01CFF002826D101E04848E9E768462D -:10497000008AC00601D54A48E3E703A90020029156 -:104980000527019000976288484B2946079801F057 -:10499000A3FE00280FD161683268914208D30191CB -:1049A00002900097238862882946079801F094FEB8 -:1049B000694689892180FEF774FBC2E7002907D088 -:1049C0003B4B0A881B899A4202D83048401C7047EA -:1049D00038E610B586B004236C46A382344BDC88DD -:1049E000002C07D01B898B4201D2914204D9274861 -:1049F000401C55E5062053E56B4619825A8200217A -:104A0000009101911C800221997005A9029104A9CD -:104A100003916946FFF716FE42E5F3B50C4685B0F3 -:104A2000812069460873002C1AD0059803F0EBF931 -:104A3000070017D03878222868D3059800F058FA74 -:104A4000049000220121059806F04EFF00280BD0AB -:104A500000220421059807F067F905000AD105E056 -:104A600010202AE5094828E5112026E508491148C3 -:104A700016F071FB284608300CF0F6FA064620784E -:104A8000012819D0022838D0072016E5023000008E -:104A9000FC380000E10800000328000000280000A6 -:104AA000013400002800002000C00100FFFF0000CA -:104AB000400C0020840A0000A18803AAFEF728FB0E -:104AC0000028CED1B00721D56846007B00281FD131 -:104AD000A079C0071CD0E068002205216B4607C3FF -:104AE000638922896888049901F012FC6946087379 -:104AF00000280DD0FEF7D5FADFE4A18803AAFEF75F -:104B000007FB0028ADD13420064201D10820D4E4AF -:104B10006846037B29463846059AFEF717FDCCE424 -:104B2000FFB597B0002001901F4615460C460E4673 -:104B3000179803F068F9002804D00078222803D2DF -:104B40000820A7E5F348A5E5B80801D00720A1E5AE -:104B5000032F00D10027179800F0CAF90890002C05 -:104B60001BD0022D77D3EC48006884427CD36119B6 -:104B70000091012902D0491E814275D3AD1EAAB20F -:104B80002146E6480DF0F0F800991E394A7F0B7F68 -:104B900011021943884267D1ADB2E148B90702D585 -:104BA0000189491C00E0012189B20091F90701D077 -:104BB000078900E0D94F03AA0899009801F0EBFC9F -:104BC0000DE0F078B1780002084310284CD8019924 -:104BD000091D401880B20190A84245D82618002E21 -:104BE00060D0707831780002084300998842E8D399 -:104BF00058E06946098A0A0754D5002C3FD0019A2B -:104C0000A618121D92B20992F278B37812021A43D2 -:104C10009446102A28D8099A6244AA4224D8727865 -:104C2000337812021A4390421ED1C8061ED5099845 -:104C30000AAA052120186B4607C370783178000254 -:104C4000084363460022089901F062FB002803D064 -:104C5000FEF727FA1EE507E0F078B1780002084376 -:104C60006946098D884201D00B2013E5F078B178B0 -:104C7000000208430999401880B2019006E0C90675 -:104C800004D50899FEF79FFC0028E3D16946088AFD -:104C90001021884369460882488AFF23049A0899AC -:104CA00001F0A4FD03A801F07FFC002803D16846B1 -:104CB000408AB8429DD900220421179807F034F8A1 -:104CC000040003D19749984816F045FA2088002837 -:104CD000C0D0012108A80170017300264673218805 -:104CE0006846018620460830099017980A90FCF71C -:104CF00039FE05001BD01798688017206946888008 -:104D000010AB023301AA052108A800950CF055FD4F -:104D100007466878000704D583488249223016F098 -:104D20001AFA002F09D03846FEF727FAB2E4132109 -:104D3000179804F04AFB0320ACE40EA800906846E4 -:104D4000838804220121179806F0EFFA00288CD1FD -:104D500026809FE4F0B500248DB01F4615460E4610 -:104D6000002A04D0B90804D007200DB0F0BD1020EF -:104D7000FBE7032F00D1002700F0BAF80390FF28CB -:104D800004D06749B80703D5488902E06148ECE7D9 -:104D90000120FA0702D04989491E00E05F4906AAAE -:104DA0008FB2039901F0F7FB38E06946898B090758 -:104DB00034D504AB05210022029300910192574B98 -:104DC000039901F089FC002821D1002E21D06A46E8 -:104DD000128A2988A2183019121D914234D36946CB -:104DE000CA8B0270120A42700A8A8270120AC2705A -:104DF00004A90522001D0092029101906946C88B0A -:104E00000B8A0022039901F067FC002801D00320DF -:104E1000ABE76846008A2018001D84B206A801F09E -:104E2000C3FB002804D0822806D0FEF73AF99CE79D -:104E30006846C08BB842B8D9002C07D0002E10D0DD -:104E40002988A01C814203D20C208EE705208CE724 -:104E50002246314631480CF087FF31190870000AAC -:104E60004870A41C2C8000207FE700B585B06946FF -:104E7000FEF7ACFA00280AD16846007C030016F061 -:104E80008BFA08052F2F2F2F08080531032005B0B6 -:104E900000BD68468078012807D168460088032154 -:104EA000C902401A1CD001281AD06846807901280E -:104EB00006D16846808815214902401A05280FD975 -:104EC0006846807A012811D16846018929200002AC -:104ED000081A05D0022803D0032801D0042805D1E0 -:104EE0000F20D4E711A1164816F035F90020CEE7BF -:104EF00010B506F00FFF10BD10B50C4601F01EFBFB -:104F0000002803D009A10F4816F025F92046FEF726 -:104F1000C8F810BD0230000028000020FFFF00008C -:104F2000400C0020FC3800003F0B00007372635CF3 -:104F300067617474735F636F72652E6300000000B5 -:104F400022020000BB060000F8B500780C461646A9 -:104F500010340E36069F022809D0032836D00528C3 -:104F60007ED0FF20F6A1E53016F0F5F8F8BDCD892A -:104F70000A2068430E30188031203880002AF5D08E -:104F8000087B9581801FC7B21AE020886168308055 -:104F900048780A7800021043F080C8788A780002C6 -:104FA00010433081B21C3846091DFDF79CFE002FCE -:104FB00001D0002802D000203071708008340A36F9 -:104FC00028466D1EADB20028DFD1F8BDCD890A207C -:104FD00068430E30188032203880002AF5D0087BD4 -:104FE0009581401FC7B243E0616822880878F2804B -:104FF0003279C30752085200DB0F1A43FD231A40CF -:105000008307DB0F5B001A43FB231A404307DB0FC8 -:105010009B001A43F7231A400307DB0FDB001A43F8 -:10502000EF231A40C306DB0F1B011A43DF231A408C -:105030008306DB0F5B011A43BF231A404306DB0FD5 -:105040009B011A433271C00970718A784B78100243 -:105050001843308132463846C91CFDF744FE00E053 -:105060000CE0002802D00020B070308008340A36EE -:1050700028466D1EADB20028B6D1F8BD087BCD899B -:10508000801E86B2304608306843103018803420C5 -:105090003880002AF1D0174695811037E800D68174 -:1050A000C01900900DE02088388000987860324662 -:1050B0006168009815F0C5FE00980834801908371B -:1050C000009028466D1EADB20028ECD1F8BDFFB5AA -:1050D00081B00A9D1E460C46002A05D0607AFF303A -:1050E0000130D080E089108101980E2700780300FC -:1050F00016F052F90B7E0719293541536C787878F0 -:105100007E000092087B082805D0032803D091A1D7 -:10511000954816F020F8378030200FE000990020E5 -:10512000888105B0F0BD0092087B042804D08E4829 -:1051300088A1143016F00FF83780312028800098AD -:105140000028EBD1EDE70092087B042804D09320DF -:1051500080A1800015F0FFFF37803220EEE700923B -:10516000087B022804D080487AA13A3015F0F3FF7A -:1051700037803320E2E7087B1746042804D07A48BA -:1051800074A14C3015F0E7FF1020308034202880C7 -:10519000002FC6D00020B88116E0207B17460528D6 -:1051A00006D0062804D070486AA1603015F0D3FFFD -:1051B0001220308035202880002FB2D0E089B881BD -:1051C0000020388201984088F881AAE70092087B85 -:1051D000072804D064485FA1713015F0BCFF378008 -:1051E0003620ABE733460095019800F00AFC98E7BB -:1051F0002F2053A1000115F0AEFF92E770B50C46C9 -:10520000054602F000FE002804D00078222803D2D0 -:10521000082070BD554870BD00220521284606F0C3 -:1052200083FD2060002801D0002070BD032070BDE8 -:10523000FFB58BB00D4607461720694608850E98C6 -:1052400003261446002805D10EA93846FFF7D6FFDD -:10525000002834D1002D0BD000220321384606F05F -:1052600043FB002834D00E980078002830D108E0A5 -:105270002078092819D00F2823D031A13C4815F0F7 -:105280006AFF0E98A760801D03AA606002320AA917 -:10529000204600F00CFC002827D0030016F07CF814 -:1052A000071A182323211C1E23000726002231463B -:1052B000384606F019FB0028E3D12C48801C0FB0BB -:1052C000F0BD00220321384606F00EFB0028D8D19D -:1052D0001120F4E70020F2E70820F0E72348401C03 -:1052E000EDE70720EBE70320E9E701A80090684617 -:1052F000038D04223146384606F017F80028DED127 -:10530000002DDCD00E990D70D9E730B587B01D4661 -:105310000C46002A11D0042369460B7013888B8138 -:105320005288CA81A2788A7422880A8200236A4637 -:105330002946FFF77DFF07B030BD1020FBE70000D6 -:105340007372635C67617474635F636F72652E630D -:10535000000000007372635C67617474635F636F65 -:1053600072652E630000000025020000023000007C -:105370004F030000F3B581B001980C460078082671 -:10538000030016F009F8125E46461B134A0A0A0A81 -:105390000A0A0A0A0A0A0A0A0A5E002C02D1F64917 -:1053A000F64808E06078304360703BE0002CF9D1AB -:1053B000F248F149083015F0CEFEF3E701980022DB -:1053C0008088052187B2384606F0AEFC0546002CE1 -:1053D00004D07520E849C00015F0BDFE002D04D1B1 -:1053E000E648E549143015F0B6FE3946A81D00F030 -:1053F00055FBFCF7B7FA040006D0607830436070C4 -:105400006780FCF790FA0FE01321384603F0DDFFC8 -:1054100015E0DA48D849283002E0D848D6492D307E -:1054200015F099FE002C0AD06078000707D593206C -:1054300020702046582208300199FBF7C5FE002055 -:10544000FEBDCE48CC493130EAE710B500210170ED -:10545000801D00F020FB10BD0A4610B50146901DCE -:1054600000F024FB10BD70B505460022052106F0B2 -:105470005BFC040004D1F920BF49800015F06BFEED -:105480002946A01D00F00AFB70BDF7B5054684B0A3 -:105490000C4600206946088188806F8802460521F5 -:1054A000384606F041FC060004D1FD20B2498000D8 -:1054B00015F051FE002C03D0A7800020E080208151 -:1054C000297A20461230C91E142700900B0015F0CF -:1054D00063FF0FFDFCFB3809A95E657A2FB2C9E9AD -:1054E0009191FB003078012804D0A3497020143139 -:1054F00015F031FEA9896A46C8000E309080302030 -:105500001081002C13D0A18100200DE0C100327960 -:1055100009190A747288CA8182005319DA894A8289 -:105520001A8A401C8A8280B2A1898142EED8F1E0B9 -:1055300002A8009001AB22462946304600F02AFA24 -:10554000E8E03078042804D08B49BD20143115F0F0 -:1055500002FEA8890622014650436A460E3090801A -:1055600033201081002CE2D0A18100200BE0062125 -:1055700041434F190919FA89CA81BA7C8A743A8A57 -:10558000401C0A8280B2A1898142F0D8C2E0307802 -:1055900006280BD078491431D72005E0307806284A -:1055A00004D07549EB20143115F0D5FDE889694622 -:1055B0001230888035200881002CB8D0A989A181BB -:1055C0007188E18126E03078072804D06A49FF20FD -:1055D000143115F0C0FDA8896A4601460E3090804E -:1055E00036201081002CA2D0A1812046AA890E303D -:1055F000296954E0E8896946123080B238228880EF -:105600000A81002C7ED0A989A181287A102807D090 -:105610000221A173E9892182EA89296900983EE083 -:105620000121F6E702A8009001AB22462946304648 -:10563000FFF78AFC6EE03078082805D04E49FF203D -:105640001431EE3015F087FD6846372187800181DF -:10565000002C5FD0A989A1810020608220820120D6 -:10566000A07357E03078092805D04349FF20143152 -:10567000FF3015F070FD288A694614308880372085 -:105680000881002C46D00421A173A989A181E98950 -:105690002182298A618220462A8A1430696915F09C -:1056A000D0FB37E030780A2804D03349344814312D -:1056B00015F051FD6846372187800181002C29D0E3 -:1056C0000521A173002002E01FE004E00DE0A081AD -:1056D000208260821EE002A8009001AB224629468B -:1056E0003046FFF7F4FC15E00CE00D206946392246 -:1056F00088800A81002C05D00120E08000202081D4 -:10570000207307E00699088019E01C481A49A43064 -:1057100015F021FD6846069980880880002C0ED07F -:10572000684600892080684680886080287A03283F -:1057300005D0102803D0112801D00020307000209F -:1057400007B0F0BDF7B5568815460F4682B0002267 -:105750000521304606F0E8FA040004D1074806495E -:10576000C43015F0F8FCA41D33462A46394600948F -:10577000029800F022FBD4E440530000950300009F -:1057800013020000F7B58CB00D46144607A90C981B -:10579000FFF734FD002812D1B64E0127002C0FD0A0 -:1057A0000321684601701021818208A802460690F4 -:1057B000204605A9FDF7BDFA00280BD007207EE59D -:1057C0000821684601708581C68105218774C90258 -:1057D00001820BE00798A178017121884180684619 -:1057E00005218774C90201828581C6810246012193 -:1057F000079B0C98FFF71CFD61E508B501236A467D -:1058000093709D4B13800A4602236946FFF77DFD86 -:1058100008BD08B501236A469370974B5B1C138043 -:105820000A4603236946FFF770FD08BD00B587B03F -:1058300000290CD002236A4613700B889381498893 -:10584000D18100230421FFF7F3FC07B000BD102035 -:10585000FBE710B5002903D00523FFF756FD10BD67 -:10586000072010BD70B588B00D461446064607A93E -:10587000FFF7C4FC00280DD1002C0DD0062168468E -:1058800001708581C481079B02465C8006213046F9 -:10589000FFF7CEFC08B070BD052168460170858118 -:1058A000F1E710B588B000290BD007246B461C70B7 -:1058B0009A81049100236A462146FFF7B9FC08B09B -:1058C00010BD1020FBE770B50024172288B0002916 -:1058D00014D00D782B0015F05FFD06230505190483 -:1058E0001B231522D21E93B2CA88002A02D08E68CA -:1058F000002E03D09A4203D90C20CBE71020C9E731 -:10590000042D05D08A88002A0AD101E00620C1E7CB -:10591000012D11D0022D05D0042D18D0052D23D036 -:105920000720B7E709236A4613704B889381CB8819 -:10593000D381896804911DE00C236A4613704B885B -:105940009381CB88D38189680824049112E00D23C8 -:105950006A4613704B8893818B88D381CB881382DE -:1059600089680924059105E00E236A461370497879 -:1059700011730A2400232146FFF75AFC8AE700B579 -:1059800087B00F236A461370918100231946FFF7F1 -:105990004FFC5AE7FEB50078089D1C4616460F4698 -:1059A000012803D03549912015F0D5FBF889C000B6 -:1059B0000E30208030202880387B001FC0B201903C -:1059C000002E1DD0F889B081002516E0E80084196A -:1059D000C0190090224641690E320198FDF783F903 -:1059E000002802D000202074E08100986D1C008AFD -:1059F00060820098ADB2408AA082B089A842E5D802 -:105A0000FEBD70B514461425049A1D8037231380FB -:105A1000002C0ED0CA89A281002262820078082858 -:105A200008D0092810D00A2819D01449144815F0B4 -:105A300092FB70BD087B0C2804D011480F490C382C -:105A400015F089FB012008E0087B0D2804D00C48E4 -:105A50000A49083815F07FFB0420A07370BD087B4D -:105A60000E2804D006480549001F15F074FB0520D8 -:105A7000F3E70000FFFF000002280000545300007D -:105A8000BB02000010B5FE4B586019721A80C900A5 -:105A900015F036FA10BD00210180704710B50022C4 -:105AA000D2430280032006F0A8FD10BD7047F0B578 -:105AB0000E460446017801208840F24999B008401A -:105AC0000090616815460888EF4A904206D0009A17 -:105AD000002A06D0EB4A521E104202D0012019B013 -:105AE000F0BD009A10430880002D12D000202870CD -:105AF0002178EA1C0027681C01920B0015F04CFC71 -:105B000010F30E16233A59616F3CB4B08AB8F2F123 -:105B1000F0F320780B28EBD00420E0E70221297075 -:105B2000A1890170090A4170032097E004212970BE -:105B3000A1890170090A41700198E1890170090A7F -:105B4000417005208AE006212970A1890170090AA7 -:105B500041700199E2890A70120A4A70218A017122 -:105B6000090A4171A28AE81DA16915F06AF9A08AA3 -:105B7000C01D73E0082129702178082901D1102166 -:105B80002970A1890170090A41700198E1890170A9 -:105B9000090A41700520308020466A1D02A9103094 -:105BA000FDF7C7F800287DD169463088097A40188A -:105BB00054E00A212970A1890170090A417003206B -:105BC0000BE00C212970A1890170090A417001982C -:105BD000E1890170090A4170052030809CE0A089AC -:105BE00084464000401C81B2308888425AD305293F -:105BF00058D30E202870002008E0236942009B5AE9 -:105C0000521953701B0A401C937080B26045F4D344 -:105C10003180B9E09A48417A002973D0491E417217 -:105C2000217B4068C9004518A988286808224018C7 -:105C30000838216915F005F9022168460171002133 -:105C4000417128680390A98868460181002101A854 -:105C5000FFF790FB0020A880002E00D0308093E05A -:105C60002978802211432970297840221143297014 -:105C700029788909890112312970A1890170090ADD -:105C80004170E289E81C216915F0DBF8E089C01C4D -:105C90003080287841063FD5C00975D0012168467B -:105CA000017200E02CE0002141723188091D8181E0 -:105CB0000495E189019808180590001D0690704828 -:105CC000017A68460177002102A8FFF753FB0746D7 -:105CD00030880C303080022F06D0002F54D065E081 -:105CE0003DE033E01CE05EE065486946097F4268BC -:105CF000CB00D218037A994202D29188002902D0AF -:105D0000042753E02FE0417A491C41721560308826 -:105D100090800020308049E06168A089888033E06D -:105D200029788909890116312970A1890170090A28 -:105D300041700198E1890170090A4170228A681D49 -:105D4000616915F07EF8208A401D46E728788009B1 -:105D5000800118302870207B687002207EE7606820 -:105D60000188090401D4052720E0C088A189884260 -:105D700001D006271AE01E202870012030806068BC -:105D800001884904490C0180009800280ED03C4845 -:105D900000220088A1688300032006F087FB616869 -:105DA0002078887007E00020308003276068009921 -:105DB00002888A430280384691E6FFB59FB0289D4D -:105DC0000E46002805D0172803D82A882E4B9A4261 -:105DD00002D1072023B0F0BD3278530601D4D20996 -:105DE00001D00820F6E700226B461A715A7114465A -:105DF0003278431E1D939BB2189303AB1A939706F8 -:105E0000CB1CBF0E1B93821E711C3B0015F0C4FA05 -:105E1000209011EE66EE74EEB0EED4EEEDEEECEE08 -:105E2000EBEEEAEEE9EEEEEEE8EEE7EEE6EEE5EEBC -:105E300090EE05287CD1042168460171A978017291 -:105E4000F078B2780102114368464181317941719D -:105E500070788006800E0C282ED009DC801E03008E -:105E600015F09AFA0919661C6621662466276600F1 -:105E700012282AD00ADC0E2821D01028DAD121E0FD -:105E80004C0C0020FF710000FFFF000016281FD0FF -:105E90001828CFD11FE02878800701E02878400734 -:105EA000002845DA45E128780007F9E72878C00698 -:105EB000F6E728788006F3E728784006F0E72878A8 -:105EC0000006EDE72888C005EAE72888C004E7E770 -:105ED00028888004E4E728884004E1E72A789207CC -:105EE00026D50328A6D105206A461071487809787E -:105EF0000002084310811CE129784907F0D50628E3 -:105F000016D3717890B2012902D0022992D101E012 -:105F1000022100E01021189106216A46117100212A -:105F2000118102AF189AB11C0237921C1B921AE021 -:105F3000B3E04A780B7812021A433A80801E891C1B -:105F40001790BA1C1A911898FCF7CDFE1A99189858 -:105F5000189A091817986B46801A1A8980B2521C31 -:105F60001A811B9ABF1D8242E3D9002886D1E0E046 -:105F700028780007B4D51D98694682B207200871B9 -:105F800000200881701C0A3111E0437807781B0259 -:105F90003B430B80C37887781B023B434B806F46A3 -:105FA0003B89121F5B1C001D92B23B81091D042A14 -:105FB000EBD2002A71D1BCE02978C9066DD5022840 -:105FC0006BD30820694608710020488170780872F8 -:105FD000844692B2B01C1A9919E089E090E07EE004 -:105FE00067E05BE030E025E019E013E0BCE04378D7 -:105FF00007781B023B430B80831C4B606346D21A1D -:106000006F467B8960445B1C92B27B81083194456A -:10601000EDD9CEE7287880063FD5092203E028781D -:1060200040063AD50A2268460271AA880281189A67 -:10603000428107E0287800062FD50B206A461071B0 -:1060400018981081039174E02988C90525D5022884 -:1060500023D30C20694608710020488170780872AB -:10606000844692B2B01C1A9914E0437807781B0258 -:106070003B430B80C37887781B023B434B80031D57 -:106080004B606346D21A6F467B8960445B1C92B2B8 -:106090007B8108319445E8D98BE763E02988C904FE -:1060A00060D501285ED10D2168460171A988018162 -:1060B0003FE02988890455D5052853D30E22694627 -:1060C0000A71AA880A811B99401F4A78097812022E -:1060D0000A4369464A818881701D049029E0298815 -:1060E00049043FD501283DD10F206946087120E0C1 -:1060F0002A88120436D44A780B7812021A43EA80AE -:1061000003282FD332789206920E1B2A26D0112212 -:106110006B461A712A880123DB031A432A804A78C6 -:10612000097812020A4369460A81C01E48811B98F9 -:10613000039030788006800E1B2809D01D2807D0D8 -:106140000320229906F059FA2888C00BC003288042 -:1061500001A82199FFF70EF920463BE610226B4675 -:106160001A71DCE70724F7E70824F5E700B597B0D4 -:10617000032806D16A461070019100216846FFF796 -:10618000F9F817B000BD000010B58B78002B11D0C6 -:1061900082789A4207D10B88002B0BD003E08B79D1 -:1061A000091D002B08D08B789A42F8D103880C88FF -:1061B000A342F4D1002010BD812010BD052826D0B7 -:1061C000002A02D0012A0DD102E00988090501E068 -:1061D00009888904890F07D0012918D0022909D01C -:1061E00003290ED081207047002A01D00320704778 -:1061F0000220704703280AD0042808D0002804D0C1 -:1062000007E0042803D0022803D0052070470020AF -:1062100070470F20704770B51388054614460B80F1 -:1062200018061DD5FE481022807AA84203D81343D1 -:106230000B80002070BDA06893430078E840C00741 -:10624000C00E03430B802078A1788007800D08439F -:10625000F44914F05FFEA06869430818401C70BD43 -:10626000906870BD37B569468B88138019061BD5B9 -:10627000EB4C0125A47A9168844209D8FE280FD1FD -:10628000D80602D5A5406D1E00E000250D7007E080 -:1062900085400C78DB06DB0FAC4383401C430C705D -:1062A00010881021884310803EBDF8B50746C81CF1 -:1062B00080080E468000B04201D08620F8BD082A32 -:1062C00001D90E20F8BDD64D00202E60AF80288168 -:1062D000AA723446E88016E0E988491CE980810604 -:1062E00010D48007A178800D0843CE4914F012FE27 -:1062F000206800F0BAFA2989401880B22881381A3B -:106300008019A0600C3420884107E5D40020F8BD36 -:10631000FFB589B09F041646139DBF0C01930998E1 -:1063200000F095FA04000AD02078000609D5BC4890 -:10633000817A0A98814204D887200DB0F0BD0120EF -:10634000FBE7224669460A98FFF765FF06900020A2 -:1063500069460872052D14D0012221462846FFF710 -:106360002DFF0028E9D1207840060AD50221684691 -:106370000172099981810188C18106824782129840 -:1063800005900198000404D500273E460125079793 -:1063900009E02078A1788007800D0843A149079083 -:1063A00014F0B8FD0D46019840040AD50798A8429C -:1063B00007D12088E1788005800F00020843B042B1 -:1063C00001D3AE4201D90720B7E7B81980B20190D6 -:1063D000A84201D90D20B0E76846007A002804D011 -:1063E00002A8FDF718F90028A7D10798A8420BD1F9 -:1063F000208803210902884301998905890F090230 -:10640000084320800198E0701498002800D007808D -:106410001298002815D006983A468019129914F05F -:1064200010FD224669460A98FFF7F5FE694608887E -:106430001021884369460880224600990A98FFF790 -:1064400011FF002079E7FFB5754D0C22E888296817 -:10645000504383B00C180D9F7249059814F05AFDF3 -:106460000091049800F001FA29682A898E46611A81 -:106470000C310918944651188AB2A988914202D861 -:10648000842007B0F0BD6A46168A320603D5B206EC -:1064900001D58520F5E7EA88521C92B2EA800E9B6E -:1064A000002B00D01A80B20601D5A76006E0604438 -:1064B00080B22881091A70460818A0602246FE2082 -:1064C0000499FFF7CFFE0598A0700098E07020882F -:1064D0000599800889058000890F08430321090276 -:1064E000884300998905890F09020843042108435C -:1064F000208003988078A07103980088A0800020F5 -:106500002073310601D5AC7A00E00124B10600D534 -:10651000002700260EE0052100200191029000973F -:10652000E88831460C9B069AFFF7F2FE0028A8D1B6 -:10653000761CF6B2A642EED30020A2E7F1B5009891 -:1065400000F085F9060002D00025009C14E001202F -:10655000F8BD204600F07BF90746007831498007F6 -:10656000820DB878104314F0D5FC386800F07DF93E -:106570004019641C85B2A4B22948C188601E8142BA -:10658000E7DC00992648491EC1800189491B018129 -:1065900000203070F8BD002804D0401E108091709B -:1065A000002070470120704710B5044601881C4840 -:1065B000C288914201D3822010BD00680C22514351 -:1065C00042189079A072908820811088D178800537 -:1065D000800F00020843A081A078211DFFF71BFE59 -:1065E00020612088401C2080E080002010BD012117 -:1065F00001827047F7B50546002084B0C043108083 -:1066000068681746817868468170686801886846BE -:10661000018000218171288A2C88A04205D303E0E3 -:10662000580C00200102000004462C8235E0288A24 -:10663000401C2882301D6968FFF7A6FD00282AD17A -:1066400039889248814201D1601E38806888A04212 -:1066500028D33088F1788005800F0002084302902B -:106660006946301DFFF790FD002814D169898748DD -:1066700081421BD0002231460598FFF79FFD00287C -:1066800009D16A890298824205D1E968B06814F09C -:10669000ABFB00280AD0641CA4B2204600F0D7F857 -:1066A0000600C4D1641E2C828220EAE67C80B07988 -:1066B000B871B088B8803078B1788007800D084311 -:1066C00078810298B8813946287A32460831FFF736 -:1066D000A2FD38610020D4E6FFB585B01C460F4608 -:1066E000059800F0B4F8050009D02878000608D510 -:1066F0006748807AB84204D8872009B0F0BD0120ED -:10670000FBE707982A468605B60D69463846FFF727 -:1067100082FD07460E98052816D000222946FFF76D -:106720004DFD0028E9D1287840060DD501216846A5 -:10673000017105990181018841818681C48101A887 -:10674000FCF769FF0028D8D12888AA788107890D2D -:1067500011438005800FEA7800021043079A9642A1 -:1067600007D04C4A914204D3611E814201DD0B20C7 -:10677000C3E7864201D90720BFE7801B82B2A2424D -:1067800000D922461098002800D002800F980028D7 -:1067900002D0B91914F055FB0020AEE7F8B51D463C -:1067A00017460E4600F053F8040008D02078000683 -:1067B00007D53748807AB04203D88720F8BD01203A -:1067C000F8BD224639463046FFF725FD002D0BD097 -:1067D0002078A1788007800D08432E49884201D295 -:1067E000012000E0002028700020F8BDF8B51E460A -:1067F00017460D4600F02BF8040008D0207800065C -:1068000007D52348807AA84203D88720F8BD012005 -:10681000F8BD224639462846FFF724FDFF2E14D046 -:106820002588A178A807800D08431A4914F072FB47 -:10683000002E03D1FF31FF31033189B2A170A808C6 -:1068400080008905890F084320800020F8BD104989 -:10685000CA88824207D3002805D00C220968504319 -:106860000C38081870470020704703B50846694681 -:1068700009888A0607D4090604D50549897A41435F -:10688000491C88B20CBD00200CBD0000FFFF0000B9 -:10689000580C002001020000F8B507780D460446A8 -:1068A000012F19D0072F02D00C2F19D114E0A068A6 -:1068B000216906780B2E0BD0052005F09EFE052ED3 -:1068C0000ED0782300220520216905F0EFFD07E0B6 -:1068D000782300220620F8E70520216905F08DFEC7 -:1068E000002D0ED0002028702946204603F0E2F942 -:1068F000FE482978C05D884201D10320F8BD0220FE -:10690000F8BD0021204603F0D5F90020F8BD70B590 -:106910000E460C462036317901208AB015460029F2 -:1069200009D0012905D12978042902D10520107048 -:1069300000200AB070BD6068019005A802900D218A -:10694000C01C14F0DBFA032205A8A16814F079FA40 -:1069500001203071062069460870206A049029469B -:106960006846FFF799FFE4E770B50C4615462031FD -:106970000A790120062686B0002A2CD0012A28D1C7 -:106980002978042925D169681022A06801F0B5F999 -:106990006868C07B000606D5D44AA0681023103A68 -:1069A000014601F09FF91022A168E06801F0A5F905 -:1069B000A068C07B000606D5CC4AE0681023103AD8 -:1069C000014601F08FF92E70A0686860E068A86049 -:1069D000002006B070BD60680190C4482038029065 -:1069E0000120087168460670206A049029466846AE -:1069F000FFF752FFEDE7027B032A06D00022242393 -:106A00005A540B78092B02D003E0042070470A7611 -:106A1000CA61027B9300521C0273C150032070476D -:106A2000F0B50E4615460C46203602463179012057 -:106A3000072393B000290CD0012924D002292ED09D -:106A4000032904D12978042901D12B70002013B027 -:106A5000F0BD01203071606800280DD0A1690B7075 -:106A600060684860206988606069C860206A086260 -:106A70001046FFF7C0FFEAE706202870206968602B -:106A80006069A86009E029780629E0D10220307108 -:106A9000042028709548203868600320D7E72978BB -:106AA0000429D4D1A08910280AD9103880B2A08135 -:106AB000A1681023091805A86A6801F013F923E0FA -:106AC00010282FD0C2B21020801AA1680DAF1190EB -:106AD000C01914F0B6F911980006000E06D0401E39 -:106AE000C1B280207854384614F008FA6269102345 -:106AF0000DA909A801F0F6F8102309A905A86A68EC -:106B000001F0F0F8032030716068019005A8029050 -:106B1000062069460870206A049029466846FFF7F7 -:106B2000BBFE94E710232269A168E2E7F0B50E46A8 -:106B30000C4620363179012006278FB015460029F2 -:106B40000BD0012932D0022905D12978042902D19C -:106B50000820107000200FB0F0BD217D08A8CA07E2 -:106B6000D20F02718807C10F08A801716846027030 -:106B700041700722801CE16814F063F902A8072223 -:106B80000130216914F05DF9606805900AA806904B -:106B900010236A46A16801F0A5F80120307168460B -:106BA0000774206A0890294604A820E0297804295F -:106BB000D1D1062205A8E16914F043F906A80622FE -:106BC0000230A16914F03DF900200890606801903E -:106BD00009A80290102305AA696801F083F8022031 -:106BE000307168460770206A049029466846FFF7AE -:106BF00053FEB0E770B50D460C46203529790120CB -:106C00008CB01646002909D0012905D13178042914 -:106C100002D10920107000200CB070BD6068019096 -:106C200006A802900822E16814F00BF9082208A8CF -:106C3000A16814F006F90120287106206946087041 -:106C4000206A049031466846FFF726FEE4E770B5F7 -:106C50000D460C462035297901208CB016460029B6 -:106C600008D00129D8D131780429D5D10A20107053 -:106C70000020D1E76068019006A802900822A16870 -:106C800014F0DFF8002008900990012028710620F8 -:106C900069460870206A049031466846FFF7FCFD9B -:106CA000BAE730B50B4620331C7901208BB0002C9D -:106CB00009D0012C05D11178042902D10B201070C4 -:106CC00000200BB030BD4868019005A802908C6888 -:106CD00068462578057564784475CC68257885758F -:106CE0006478C47500200690079001E0E4B30100C9 -:106CF000089001201871062368460370086A049002 -:106D000011466846FFF7C8FDDBE770B50C46203436 -:106D1000034625790120002D0AD0012D14D0022D23 -:106D200005D111780A2902D10C201070002070BD05 -:106D300001202071C868052202704A684260F84A42 -:106D40008260921CC2600BE015780B2DEFD10220FF -:106D50002071C86804240470526842608A688260A6 -:106D6000096A016201461846FFF745FE70BD30B55D -:106D7000011D02463132947803258379ED432C437B -:106D800023408371DB070DD04B79547923404B713D -:106D90000B79127913400B718278C9788A4200D935 -:106DA000817030BD00224A710A71F5E7F7B50C46D3 -:106DB00086B00020694626460870203631790127C2 -:106DC0001E2015461F2977D24B007B449B885B0011 -:106DD0009F441E0017023E025602690288029A0270 -:106DE000D102F5022E03590371037F03AE03C303DF -:106DF000CC03F7031A0464049A04AB04DF04FE0412 -:106E000010052A0565059B05C605830587058B05C5 -:106E10006069002802D0007813287DD0A068059012 -:106E2000002849D0012168460170206A049003219E -:106E3000684601710A214171E069029020790028B9 -:106E4000EFD0059909780029E7D00C2964D20B000E -:106E500014F0A2FA0CFD1A4B90B5E8FCFBFAF9F815 -:106E600007FD022828D16069002802D00078082890 -:106E700052D1022168460170206A04900598417839 -:106E8000684601710021B9E20620216A05F0B5FBD0 -:106E900020790728E6D1606900F051FF02280CD064 -:106EA000606900F04CFF042807D060690028B8D062 -:106EB00000780128D6D103E01BE261690120087047 -:106EC00005980079C11F0A2901D30A2050E06169A1 -:106ED0000722887060690599303013F0B2FF0120F5 -:106EE000307161690320087034E00728BAD1606905 -:106EF000002896D001780929B4D10599C978890765 -:106F000007D1059949790029DFD1059989790029A7 -:106F1000DBD105994A7900E04EE2014620314B7DF4 -:106F20009A43D2D1059A8B7D92799A43CDD1059A15 -:106F30001279D31F0A2BC8D20979914236D8072279 -:106F4000C01C059913F07DFF0120307161690A2092 -:106F50000870032069460870206A04906069313027 -:106F600001906069001D029060691C300390A1E2ED -:106F70002076F2E311288DD1606900F0E0FE04284C -:106F800004D0606900F0DBFE0B2893D1606905999D -:106F900010223730491C13F054FF6069017804292E -:106FA0007CD12421095C8278914201D90620DFE757 -:106FB000052101700320307168460170E2E3112859 -:106FC00094D1606900F0BBFE062804D0606900F02F -:106FD000B6FE0C288AD1E068002813D0206900286A -:106FE00010D060690178062910D00D210170606908 -:106FF000059910225730491C13F023FF6069573060 -:1070000009218CE100206946087072E107210170B6 -:107010006069059910224730491C13F012FF60691E -:107020004730EDE70228F0D1606900F088FE0028C3 -:10703000EBD0606900F083FE0128E6D0606900F0C3 -:107040007EFE05E0B1E08DE06CE02AE00AE0D6E0EB -:107050000828DAD00521684601710598417868460C -:10706000417146E11128D0D160690028CDD0017866 -:107070000E29CAD1C16A4078022810D000201422FB -:1070800050431430085805991022491C13F0D9FEBA -:107090000520216A00F041FE0F205EE0F1E10120B1 -:1070A000EDE70B28B1D160690028AED001780F2937 -:1070B000ABD1C16A4078022826D000201422504368 -:1070C0000C300958059842780A70807848706069D9 -:1070D000C16A4078022819D0002014225043103091 -:1070E000085805990822C91C13F0ABFE0520216A37 -:1070F00000F013FE60694178022909D000220832AD -:10710000825C5208520073E00120D7E70120E4E7D7 -:107110000122F4E7012100E0002108314254BCE3E0 -:10712000BEB3010011289CD16069002899D0017874 -:10713000102996D1C16A4078022811D0002014226B -:1071400050431830085805991022491C13F079FE55 -:107150000520216A00F0E1FD112061690870B4E3A7 -:107160000120ECE7082884D1606900289DD00178CF -:10717000112997D10599C06A49780170606905990C -:10718000C06A0622401C891C13F05BFE0520216AA0 -:1071900000F0C3FD60694178022904D00022083262 -:1071A000825CFD2323E00122F9E71128BBD160694D -:1071B0000028BBD001781229B5D1C16A40780228D5 -:1071C00019D00020142250431C3008580599102271 -:1071D000491C13F036FE0520216A00F09EFD60690F -:1071E0004178022909D000220832825CFB231A4030 -:1071F000022991D18EE70120E4E70122F4E707207C -:10720000B6E6287801288ED16069696814221C309E -:10721000F9F7DAFF6069017F002901D02176ACE33C -:107220000178032901D0032037E00227C770817954 -:107230004907490F8171017A4907490F0172417A63 -:107240004907490F41726069FFF791FD377196E276 -:1072500028780F28E3D1072069460870216A049135 -:10726000916802916946087161690722C91C0298F8 -:1072700013F0E7FD61690420087000203071BBE065 -:1072800028780328CBD1606901780529696807D07F -:107290000822473013F0D5FD0420307105206FE23D -:1072A00008225730F6E728780328B8D160690178BA -:1072B0000529696811D008224F3013F0C2FD05205E -:1072C00030716069006A00280AD00220287000200E -:1072D00028716069006AA860F9E008225F30ECE775 -:1072E00004204DE22878022899D12879002801D07D -:1072F000207642E36069A96801626069002901D1D2 -:10730000F949016206200BE228780F2887D1A86886 -:10731000E0616069017805292BD047300721317180 -:10732000E16802220A706269126A4A6088606069D4 -:107330003030C8606069C01C08616269087D926A6B -:10734000400812784000D207D20F104308756269D6 -:10735000926A521C8A61FD2210406269D26A1278D8 -:10736000D207920F104308756069C06A401CC8615B -:1073700053E25730D2E728780828BAD160690178FB -:1073800005291AD00B210170072069460870206A70 -:107390000490E069029011200871029803210170A5 -:1073A00051681022401C13F04CFD00216846FFF785 -:1073B00073FA00203071E06187E20621E3E7287864 -:1073C0000F2896D1072069460870206A0490A868A3 -:1073D00002901120087102980421017061690A78F5 -:1073E000072A0ED0002232710C220A706169102225 -:1073F000401C473113F025FD00216846FFF74CFA89 -:1074000063E21022401C573113F01BFD0021684637 -:10741000FFF742FA0A203071E168032008706069C2 -:10742000006A486060695730886060694730F3E1FE -:1074300028780828A1D1606969681022373013F0D4 -:10744000D3FC002801D0042092E560690078072869 -:1074500017D00A203071E168032008706069006A63 -:10746000486060695730886060694730C860206A4A -:1074700008620698FFF7BFFA07466069FFF777FCD6 -:107480006BE208207AE1287809289AD10B20307124 -:1074900061696868897810224018511A13F02EFD2E -:1074A000082069460870206A049068680190606945 -:1074B0008078087268E129780D29BBD161698979E2 -:1074C000C90703D00C20307109203EE0307103273A -:1074D00070E228780E28ADD160691422291D1C3075 -:1074E000F9F772FE6069018DC06A4172090A817202 -:1074F00060698178C06AC1716169CA6A081D117AC0 -:10750000C909C90111724379626919438378D26A42 -:107510009B079B0F012B00D0002300799B01C0002B -:1075200003431943117260694078012876D0B4E1B1 -:1075300060694178022901D0012100E00021083171 -:10754000405CC00707D00E20EAE069460870206A58 -:107550001146049019E11320B8E728780F2894D138 -:10756000A868E0610F2030710520EEE72878032835 -:107570008BD16069C16A4078022801D0012000E007 -:10758000002014225043103008580822696813F074 -:1075900058FC10203071E16806202269087060698B -:1075A000406A48606069C36A4078022801D00120BF -:1075B00000E000201427784310301858CA60886013 -:1075C0002BE128780C2886D16069C26A40780228AD -:1075D00001D0012000E00020142148430C30105855 -:1075E00002230932696800F07DFB11203071E168E7 -:1075F000052008706069006A48606069C06A0930E7 -:1076000088603948001F07E128780B28A7D16169F5 -:107610004878CA6A022802D0012001E059E100201E -:1076200014235843143010588A78696813F009FC01 -:1076300060694178C26A022901D0012100E000217D -:107640001423594314315258817850181022511A7A -:1076500013F054FC072069460870206A0490E06922 -:107660000290112008710298062101706169CA6AAE -:107670004978022901D0012100E000211423594357 -:10768000143151581022401C13F0DBFB00216846D6 -:10769000FFF702F90020E06112206FE028780F2840 -:1076A00091D1072168460170206A04909068029089 -:1076B0000B2268460271029801706169CA6A4978B2 -:1076C000022901D0012100E00021142359430C318B -:1076D00051580A784270497881706169CA6A49785C -:1076E000022903D0012102E0C4B3010000211423C8 -:1076F0005943103151580822C01C13F0A2FB00213D -:107700006846FFF7C9F826E760694178022901D089 -:10771000012100E000210831405C800703D51420DE -:1077200030710A2011E71620D0E628780F287AD188 -:10773000A868E061072069460870206A0490E06943 -:107740000290112008710298082101706169CA6ACB -:107750004978022902D0012101E011E1002114231E -:107760005943183151581022401C13F06AFB002174 -:107770006846FFF791F80020E061152030710A207B -:1077800069460870206A049029466846FFF784F825 -:107790002BE028780F2846D1072069460870206A18 -:1077A00004909068029008200871029809210170E5 -:1077B00061690622C969097841706169801CC969DB -:1077C000491C13F03EFB00216846FFF765F8AAE765 -:1077D00060694178022901D0012200E000220832CC -:1077E000805C400703D51720C8E70746B5E00129AC -:1077F00053D070E028780F2815D1A868E0611820D0 -:107800003071E168052008706069006A486060694D -:10781000C06A09308860F848C860206A0862069823 -:10782000FFF7E9F8E1E76FE028780B286CD1606991 -:10783000C16A4078022801D0012000E00020142213 -:1078400050431C3008581022696813F0FAFA0720D8 -:1078500069460870206A0490E0690290112008715E -:1078600002980A2101706169CA6A4978022901D027 -:10787000012100E00021142359431C3151581022EA -:10788000401C13F0DEFA00216846FFF705F80020DF -:10789000E0616069407801281DD1192016E6606911 -:1078A0004278022A09D000210831411809780029BC -:1078B0000DD0CA0703D00E2106E00121F4E78907A5 -:1078C00001D5102100E012210170002772E0012A89 -:1078D00001D00D20FAE51C20F8E51D2030710B20A9 -:1078E00033E62978102948D1F0E56069017801294B -:1078F00043D0082941D00021317100F01AFA0C2040 -:1079000069460870206A049037E028780F2805D06F -:107910001020107003271B2030714BE007216846B0 -:107920000170206A0490A8680290022168460171E3 -:10793000029805210170217E417000216846FEF702 -:10794000ABFF0B2168460170206A04902946684607 -:10795000FEF7A2FF07461B203071012F0DD029E052 -:10796000012168460170206A049004216846017173 -:10797000217E41710020207612E0207E00280FD069 -:107980006169132008701A2030710A206946087056 -:10799000206A049029466846FEF77EFF074609E004 -:1079A0006069002801D01421017068460078002821 -:1079B00000D021E5384609B0F0BDF7B50F462037B5 -:1079C0003879012686B00C46002804D0012828D03A -:1079D00002281CD197E02079012804D0022811D078 -:1079E000032814D10AE0A068407801280ED10620AF -:1079F000216A04F0DCFD00287FD10CE0A16813208F -:107A0000087008E0A0684178022901D0052674E0DA -:107A10000078082871D1012038710A206946087061 -:107A200033E0089800780F2867D107216846017075 -:107A3000206A049008988568029522790220012A1C -:107A400004D0022A29D0032A57D10FE006466846FF -:107A500006710B202870207B00214007400F6870C2 -:107A60006846FEF719FFA068067045E006466846BE -:107A7000067105202870207B687000216846FEF79B -:107A80000BFF3E710B2168460170206A0490684626 -:107A90000899FEF701FF06462FE0684601710120B4 -:107AA0002870207C6870607CC007C00FA870A07C24 -:107AB0004007400FE870E17C2971C0071FD0207D8E -:107AC0004007400F6871607D4007400FA87100219A -:107AD0006846FEF7E1FEA06807222946303013F021 -:107AE000B0F9E068017AA06820300171A1682879B6 -:107AF0008870A16809200870002630465BE70020E6 -:107B0000A8716871E3E7A168142008700121684634 -:107B10000170206A0490042168460171217B417143 -:107B20000021FEF7B9FEE7E7F0B585B00F46054640 -:107B30000124287B800040198038C66F3078411EB0 -:107B40000A290AD22C498000323140188038C36F8C -:107B50003A463146284698470446002C01D0012C6D -:107B600011D1287B401E0006000E287301D003248B -:107B7000DFE70D2069460870306A04900021019605 -:107B80006846FEF789FE032CD3D0204605B0F0BD31 -:107B900070B515460A46044629461046FFF7C4FF4D -:107BA0000646002C0FD0207814280CD1207E002807 -:107BB00006D000202870204629460C30FFF7B4FF7D -:107BC000204600F0B6F8304670BD704710B5012968 -:107BD00003D0022901D0052010BD417000F0A9F8A2 -:107BE000002010BD002809D0027E002A06D00A46D7 -:107BF00001460C31CCE70000C2B301000120704700 -:107C000030B5044687B00D46062004F0F6FC294640 -:107C1000052004F0F2FC2078142805D000206946E5 -:107C200008702046FFF7DEFF07B030BD7FB50E4677 -:107C300000216A4611730178092903D00A2903D06B -:107C4000002407E0446900E08468002C02D0217E13 -:107C5000002912D0154601462846FEF7CCFE03281F -:107C600009D1324629462046FFF792FF6946097B33 -:107C7000002900D0042004B070BD25460C35EAE789 -:107C800000B50023012285B005280CD0062808D1B4 -:107C90006846027004910221017143710021FEF7D0 -:107CA000FBFD05B000BD6846027004910271F4E767 -:107CB00010B590B00C4605216B4619700190234811 -:107CC00002900892001D03900AA96846FFF7AEFFD4 -:107CD000002805D1102220460B9913F0B2F800209D -:107CE00010B010BD30B505E05B1EDBB2CC5CD55CDE -:107CF0006C40C454002BF7D130BD10B5002409E00E -:107D00000B78521E5B00234303700B78401CDC0988 -:107D1000D2B2491C002AF3D110BD70B50C460546FD -:107D200004F06BFC782300222146284604F0BEFBB9 -:107D300070BD4178012900D00821017070470028EA -:107D400001D000787047082070470000BCB30100E4 -:107D500070B5F84D040008D0012C10D0022C07D0CB -:107D6000032C05D0F4A1752007E0F3A16C2004E0FA -:107D70002878012803D0F0A1722013F0ECF92C70C0 -:107D800070BD70B5EB4D044610280AD0112C16D0EA -:107D900028468178122C07D0132C0AD0E6A1A42003 -:107DA0000BE0E5A1992008E0112908D0E2A19E206E -:107DB00003E0112903D0E0A1A12013F0CCF9AC70AD -:107DC00070BD10B5DB4894B0007B002819D0172097 -:107DD00069460870D74900A806220D31023013F019 -:107DE00030F809A9684603F0A8FE0446112805D01A -:107DF000002C03D0D0A1C02013F0ADF9204614B060 -:107E000010BD3220E4E710B50022022103F08CFF00 -:107E100010BDFFB595B01D460E460746FFF7F3FFB0 -:107E200004000AD02078222804D3A07F8006C00F47 -:107E3000A84204D1082019B0F0BDC348FBE73721A0 -:107E4000684601704780002D05D0012101714671FF -:107E50001799817102E000206946087109A96846F6 -:107E600003F06BFEA07FDF21084069010843A07783 -:107E70000020E0E770B50446084620380D460300B0 -:107E800013F08AFA0A060A11232C3342495057612B -:107E9000FF20A9A10D3052E02078202851D1FF20E9 -:107EA000A5A110304BE0A3480178032949D0807880 -:107EB000132846D02078242843D0252841D02328D1 -:107EC0003FD0FF209CA1133039E02078222838D001 -:107ED000232836D8FF2098A11A3030E020782228B5 -:107EE0002FD0FF2094A11E3029E02078222828D00E -:107EF000242826D0262824D0272822D0292820D07C -:107F0000FF208DA121301AE02078252819D0FF20EC -:107F100089A1283013E02078252812D0FF2086A1DF -:107F20002B300CE0207825280BD0FF2082A12E30AA -:107F300005E02078282804D0FF207FA1313013F0FD -:107F40000AF9257070BDFF207BA13430F7E730B50A -:107F50007E4C0B887E4A022801D0934204D09D1F9C -:107F6000A54225D2022802D04D88954203D04D88E3 -:107F7000AD1FA5421CD24C88A34219D88B88FF257F -:107F8000F435AB4214D8022802D0C888904205D0FC -:107F9000C8886E4D0A382D1FA84209D2C888904261 -:107FA00008D0944206D05B1C63438000834201DB0F -:107FB000072030BD002030BDF0B56649884245D36A -:107FC000654A0125AD041368A84201D398423DD308 -:107FD0000279002A06D0082A02D8067B082E05D985 -:107FE0000720F0BD047B002CFAD0F6E7002A06D06B -:107FF00004688C422AD3AC4201D39C4226D3002E83 -:1080000006D084688C4221D3AC4201D39C421DD35C -:1080100000240CE00568A700ED598D4216D3012716 -:10802000BF04BD4201D39D4210D3641CE4B2A242FE -:10803000F0D800220125AD040CE084689700E459D3 -:108040008C4203D3AC4203D39C4201D21020F0BD3A -:10805000521CD2B29642F0D80020F0BD10B5028971 -:108060003E4B111F994213D24189042910D3DB1CC6 -:1080700099420DD891420BD80178890706D54068FE -:10808000002803D0FFF798FF002800D1002010BD82 -:10809000072010BDFFB50022099B002802D099429D -:1080A00005DC6EE0002902D1002004B0F0BD0920FB -:1080B000FBE7845C002C12D087187D78112D59D0F5 -:1080C00010DC2B0013F068F90A561726262C2C2EEC -:1080D0002E4C4C56835C002B46D1521CD2B28A42A5 -:1080E000F8DBE1E71C2D45DA123D2B0013F054F9C3 -:1080F000044242121A42022CD9D1BB78039C072BAE -:10810000237001D25B0701D40A20CEE7029B012431 -:108110001B782CE0E343DB0708E0012C08D029E0C2 -:108120000620C2E70F2523072D075B19002BF4D08B -:108130003046BAE7640C00207372635C6761705F5D -:10814000636F72652E630000023000007B0C00003C -:10815000FFFF000000C0010028000020FD3F0000DC -:10816000029B1B789C0701D50B209EE7022423432A -:10817000029C2370835C521C9A18D2B28A4202DDA0 -:1081800095E7192676028A4293DB8DE710B50478CD -:108190000B46002C08D00121F94A012C07D0022CF3 -:1081A0000BD0032C13D10EE00021197011E01970CF -:1081B0008179890903290AD10BE01970817989092C -:1081C000012904D105E019708179890901D010468F -:1081D00010BD411C0622581C12F033FE002010BDB9 -:1081E00008B51346002806D0E6A00068009048793C -:1081F0006A468009105C18700622581C12F021FE95 -:1082000008BD30B50C46097895B0222902D2082065 -:1082100015B030BD282369460B704880132A03D05F -:108220003B2A01D00720F3E708460A7109A903F0A9 -:1082300084FC050003D121212046FFF71BFE2846C0 -:10824000E6E700B595B0232369460B704880108897 -:1082500088805088C880D088488190880881002014 -:108260008881C88109A9684603F067FC15B000BD84 -:1082700070B50C00064610D0FFF7C5FD050003D110 -:10828000C149C24812F067FFA6802889E08028898A -:10829000208168896081A889A08170BD70B50E4673 -:1082A000050003D00021092004F0A7F90120B84CF3 -:1082B000022E207324D0032E04D0D320B249800094 -:1082C00012F049FFB24806210D3003F02DFFA07CCB -:1082D0008006800EA074FFF774FDA08B00280ED0DE -:1082E000002D0CD0830001220021092004F0DEF8CB -:1082F000092804D0A548A449283012F02CFF70BDED -:10830000A3480321103003F00FFFA07C402180061A -:10831000800E0843A0749E480C3002F04EFBDAE752 -:108320007FB501A9022003F06EFD002851D09748C7 -:108330009549673012F00FFF4BE0029C207821280E -:1083400047D0A07F01072BD52046223000906846F9 -:108350002346628E80882146343301F084FC050078 -:1083600005D011282ED089488749843028E0A07F85 -:10837000F7210840A077E17F480889074000C90F2E -:1083800008432021095D4007400FC9000843E077FA -:108390002078282824D129212046FFF76BFD1FE0F3 -:1083A000400716D568462246808821460E32FFF7E0 -:1083B00048FF050008D0112804D074487249933052 -:1083C00012F0C9FE00250BE0A07FFB210840A0773A -:1083D00006E001A803F025FD0500AED0052D02D072 -:1083E000284604B070BD0020FBE7F8B5040004D1B6 -:1083F00066486549A13012F0AEFE722020706068B8 -:1084000008260178091F0B0012F0C6FF11FD0A466D -:1084100068FC460EFCFC4746464646FD92FD46007B -:108420007B205949C00035E087883846FFF7EBFCD0 -:10843000050004D11F205449400112F08CFE6078E1 -:10844000042130436070524CA07F0843A077212163 -:108450002846FFF70FFDA87F8007800F012801D174 -:10846000801EA080384603F0B1F83846FCF7FBFFC9 -:108470003846FBF79EFB3946022004F0BEF8A87F81 -:10848000EF210840A877FFF74BFF002804D03F48B2 -:108490003D49C93012F05FFEF8BD85882846FFF7D8 -:1084A000B2FC002804D139483749D33012F053FECA -:1084B00060688078012804D034483349D53012F000 -:1084C0004AFE60688179284603F09CF90028E3D0D1 -:1084D0006178314361706168C880F8BD878838462B -:1084E000FFF791FC050004D128482749E63012F037 -:1084F00032FE60783946304360706068C0882881F9 -:1085000060680089688160684089A881022004F061 -:1085100074F80020A875A87F8007800F0228DCD19E -:10852000FFF7FEFE0028D8D0212017494001B1E70F -:1085300080783C2803D00025022814D000E00125D3 -:108540000027002808D03C2806D0022804D00F4875 -:108550000D49FF3012F0FFFD002F06D002263046F5 -:1085600001F06CF9F8BD0127EBE7607830436070EB -:108570000748817F31438177002D0BD00126EEE73C -:10858000023200000302FF01388100002E030000C8 -:10859000640C002060688788384601F07BF9054646 -:1085A00060688079012832D00226A87F06228008E0 -:1085B00080003043A8776068C08A28816068008B9B -:1085C00068816068408BA8816068C079E8756168DF -:1085D00028461830083112F034FC60680622807B8F -:1085E00068706168A81C0F3112F02BFCA87F81070E -:1085F000890F384602F0D4FFA87F8007800F01283A -:10860000ADD101E005E008E0FE488780A7E701263C -:10861000CBE7204601F01EFEF8BD60783043607065 -:10862000F8BDF7B505460078002700090C463E4620 -:1086300001287DD00022F44902287AD0072804D0EE -:108640000A2877D0F149F24839E1686803780D2BA0 -:1086500035D006DC042B6ED0072B3AD00A2B69D11B -:1086600006E0122B3CD0132B44D0142BF7D1BEE0E4 -:1086700011270726002C7CD08088A0806968FB2306 -:108680008979A171DF4905468A7F1A408A770421DA -:1086900003F071FB0521284603F06DFB00212846FD -:1086A00003F069FB0121284603F065FB03212846FE -:1086B00003F061FB0221284603F05DFB01E1012785 -:1086C0000926002CD7D08088A08068688079207225 -:1086D000F7E012270E2680882146FFF7C9FDF0E05B -:1086E0001A270726002CC6D04088A0806868007929 -:1086F000A071E6E081783C293ED010271E26002C90 -:10870000B9D08088A0806868C08A20836868C08AE1 -:10871000E0826868008B60836868408BA08369682A -:10872000607D497F40084000C907C90F084303E046 -:108730006CE097E0BAE029E060756968C007497F9E -:10874000C00F49084900084360756968A21DC879CF -:108750000831FFF745FD69682246887B0D320F31ED -:10876000FFF73EFD68688079002803D0012020755E -:1087700007E076E00220FAE719270726002C70D0E0 -:10878000A271A048F722817F11407DE01B272E2691 -:10879000002C66D0A1806968A21D0879491DFFF7E9 -:1087A0001FFD68682030C07A60736868C07804284C -:1087B000A07B19D040084000A073F92108406968E7 -:1087C0001F22C9788907490F0843A07369684007C9 -:1087D000C97A400FC9000843A073696820460F306A -:1087E0000C3112F02EFB6CE001210843E4E71E2758 -:1087F0000E26002C6DD0A1806868E21D407AA07121 -:1088000069688878C91CFFF7EBFC5AE0287A0128D0 -:1088100005D0022815D07E487C4932384FE01D270C -:108820000E26002C55D06888A080A889E080E889B1 -:108830002081288A6081688AA0817248DF22817F36 -:10884000A2E712270E266888FFF712FD002C40D001 -:1088500068784007400F032833D16A48FD22817FA2 -:1088600092E736E0287A030012F096FD0604101015 -:108870002020202619270726002C2AD0A180614815 -:10888000A271817F4908490081771AE019270726DC -:10889000002C1ED0A180287A012805D00320A071C9 -:1088A0005848EF22817F6FE70220F8E721462846EB -:1088B000029A01F068FEFEBD55485449801F12F02F -:1088C0004AFC0298002C068001D027806680002098 -:1088D000FEBD02980680FAE710B54A4894B0807849 -:1088E000132802D0082014B010BD22206946087059 -:1088F00009A9684603F021F904460021072003F086 -:108900007CFE2046EFE700B53E4895B080781228FF -:1089100001D00820AAE41E21684601700021817060 -:10892000C17009A903F009F90028F3D1002107203B -:1089300003F063FE1120FFF724FA002096E400B54F -:10894000304895B00078022801D0032818D11B21A7 -:1089500008A801730021817369460BA803F0EDF8A4 -:10896000002804D1684640781B2801D003207DE40C -:108970000021084603F041FE68468078002801D0B7 -:10898000082073E40120FFF7E3F900206EE4F8B556 -:108990001C4C030012F000FD0A06791779797979E9 -:1089A00044356779FFF7CBFF00282AD1F8F7DAFFC3 -:1089B000002826D02221017000210172F8F7B3FFB0 -:1089C000A07F01214BE08EB23046FFF71CFA050074 -:1089D00004D10F480D492E3012F0BDFB2878212814 -:1089E0000FD0F8F7BFFF002814D012210170022722 -:1089F000077246800020A875F8F795FFA07F3843DE -:108A0000A077F8BD640C0020FFFF00003881000053 -:108A10005F050000132229463046FFF7F2FBF0E71E -:108A2000A578122D06D0132D07D0F849F84812F07A -:108A300092FBE6E7FFF767FF01E0FFF74DFF002835 -:108A4000DFD1F8F78FFF0028DBD022210170122D33 -:108A500007D002210172F8F766FFA07F10210843BA -:108A6000CEE70121F6E7A07C810901290BD080091E -:108A700004D0E748E549223012F06DFB03210020C5 -:108A8000FFF70CFCBDE70221F9E7E148DF49293097 -:108A9000CDE7F7B514460D0004D1DD48DB49313090 -:108AA00012F059FB28780827012807D002281FD088 -:108AB000D748D649623012F04EFBFEBD0098FFF752 -:108AC000A2F9060004D1D248D049383012F043FB55 -:108AD0000220B0751030207060783843607007CD88 -:108AE000083407C4CB482022817F11438177FEBD23 -:108AF0000098FFF788F9060004D1C548C3494630FD -:108B000012F029FBA988C448814208D1EA88824230 -:108B100005D1132231460098FFF773FBFEBD814259 -:108B200002D1E888002809D01220207060783843EC -:108B3000607007CD083407C4002006E078230022C7 -:108B40000220009903F0B2FC0120B075FEBDB148CF -:108B500040897047FFB591B01498FAF71BF90028C7 -:108B60005DD10124684603218471C90281800022FD -:108B700001A92046FBF7ECFA002850D168461521E0 -:108B800084714902818000261C2102A8009612F0FF -:108B9000B7F90120014668461031017000200146F6 -:108BA000684641708178F9273940891C21438170DA -:108BB000017A02252943017212998186C6861F21F6 -:108BC00001870C9011980F9001A80B9009AA0BA98E -:108BD00002A8FBF788F8002821D168468D4E808CCA -:108BE000F080684684718D498180807809AA384078 -:108BF000801C41084900684681708586058713A856 -:108C00000F900BA902A8FBF76EF8002807D1684661 -:108C1000808C308131460A311498FAF7CEF815B0BD -:108C2000F0BD30B50C467E4995B08C423CD37D49B1 -:108C3000012292040968944201D38C4234D3203833 -:108C400000220125030012F0A7FB06042A44484E27 -:108C5000575F0021082003F0AAFC002802D0112051 -:108C600015B030BD24206946087000A80522A11C5B -:108C7000023012F0E6F809A9684602F05EFF05002E -:108C80002FD1082300221146184603F00FFC0828B4 -:108C900027D05F485D49D63012F05DFA21E0606868 -:108CA000002803D0884201D21020D9E73D21684630 -:108CB0000170218841806188818009A902F03DFF0F -:108CC00005000ED1606800280BD06946098D01802F -:108CD00007E0206801F0B2FE02E0204600F024FE2A -:108CE00005462846BCE73E2007E0857000E082701C -:108CF00009A902F022FFF3E73420694608702078C2 -:108D0000C0076846F3D0F0E70720A9E730B50C4666 -:108D1000444995B009688C4201D21020A0E7203860 -:108D2000030012F039FB05042121232132002088A1 -:108D3000FFF769F8002804D00078222803D2082021 -:108D40008EE739488CE725216846017021884180EB -:108D500009A902F0F2FE050015D10AA90522023187 -:108D6000A01C12F06EF80EE006250CE0206800282A -:108D700005D0884201D2102505E001F055FE2548B6 -:108D80000025808BA08028466AE7072068E72148F5 -:108D90001330704710B520211E4812F0AFF80120A3 -:108DA000FEF7D6FF1120FEF7ECFF00211948C9435A -:108DB000818000218176E1218900818301460C3088 -:108DC0000D310446F8F74EFE1248072221461330B3 -:108DD00012F037F8FEF7F5FF002803D00B491348CF -:108DE00012F0B9F901F0E5F910BD10B504463C21C7 -:108DF00012F084F8A07F80088000A07720202070E7 -:108E00000020A0752034607010BD00003881000083 -:108E1000B5050000640C0020FFFF0000012A0000DF -:108E200000C0010028000020023000001C070000E4 -:108E30007047FEB50546FF480C46814207D3012026 -:108E40008004844205D3FC480068844201D210208B -:108E5000FEBD002D02D0012D32D126E0F7490822B7 -:108E60000F46684611F0EDFF39462046FFF78EF9B0 -:108E70000028EDD1FEF7A5FF060006D007226946BF -:108E8000384611F0DEFF3046FEBD2078002801D0C4 -:108E9000012805D1E94807223946C01D11F0D1FF4C -:108EA0000021092003F0A9FB0FE00978002907D071 -:108EB000012905D0022905D0032903D0E048FEBDD1 -:108EC0000720FEBD0120FFF7E9F9DC480C38857664 -:108ED0000020FEBD10B5D8490968884201D2102093 -:108EE00092E7D64902460C390B7B0D311846FFF745 -:108EF00077F9002088E7FFB599B00546002008A95A -:108F000008746946087108A908730875CA481446A8 -:108F10000121C84A890400681E46002D05D09542EB -:108F20000BD38D4201D3854207D3002C08D0944245 -:108F300003D38C4204D3844202D210201DB0F0BD72 -:108F40002846204318D01F270BAB0CAA00972846B1 -:108F50001A99FFF79FF80028F0D10DAB01AA31460E -:108F600020460097FFF796F80028E7D16846007979 -:108F7000C00703D00A20E1E70720DFE702AF002D9A -:108F80000FD01A20694608721A9888722946F81C70 -:108F90001A9A11F056FF0EA902A802F0CEFD002881 -:108FA000CCD1002C0ED02021684601728672324648 -:108FB0002146F81C11F045FF0EA902A802F0BDFDE4 -:108FC0000028BBD19D4908A8007B0C3948700020BF -:108FD000B4E770B506460A200C46087015461146DF -:108FE000204602F0AAFD002807D139212170204631 -:108FF000294602F0A2FD002804D0082801D190489B -:10900000401C70BD2A462146304600F0B9FC04469B -:10901000082803D18B498C4812F09DF8204670BD7A -:10902000F0B5044689A003C897B0824D002715917A -:109030001490AC4211D380480121890403688C420A -:1090400001D39C4209D32078012809D16268AA4241 -:1090500003D38A4204D39A4202D2102017B0F0BD43 -:1090600076490C390A78012A0CD18A88794B9A42C0 -:1090700003D0002806D0012804D08A7F13079B0F55 -:1090800006D101E00820E9E7D30701D1910701D516 -:109090001120E3E7218A704B0A46203A9A4207D30F -:1090A000012877D1002975D1628A002A72D111E096 -:1090B000022801D0032801D1A0296BD3012809D0AF -:1090C0005E4A0C3A5278D20704D0628A002A61D0F4 -:1090D000B42A5FD8002806D0012808D0022804D07E -:1090E000032857D117E0002518E0022516E00029D3 -:1090F00002D1608A00280CD004256068007800281E -:109100000CD0012809D0022807D0032805D04C48EC -:10911000A4E70125F1E7032500E00127207A0028D4 -:1091200006D0012806D0022806D0032867D105E022 -:10913000002604E0012602E0022600E00326002DBE -:1091400001D0022D16D1002E14D0E068002803D0E3 -:10915000FEF732FF002881D138480C38407880076C -:1091600002D03748401E79E7022D03D1022E46D0A7 -:10917000032E44D0182168460170218A4180218A3B -:10918000818085712D480C38007B002803D0012890 -:109190006FD104E033E000216846C17102E0012094 -:1091A0006946C8716846077221780930012920D0C4 -:1091B000062111F0A3FE69460E74207D8207C107C7 -:1091C000D20F4007C90F5200C00F11438000014366 -:1091D00014A8405C6946C873002810D009A96846E5 -:1091E00002F0ABFC002893D1002D0AD0022D08D04C -:1091F00012E061680622491C11F023FEDBE707201C -:109200002CE7002E08D0E068002805D009AA69469E -:10921000FFF7DFFE0028A6D11B2069460870012059 -:10922000887009A9684602F088FC00289BD108A82C -:10923000407913E000C0010028000020700C0020DD -:1092400002320000388100002708000007060504EC -:1092500003020100FFFF0000E13F00001B2819D1BD -:109260002B0012F099F80504040707040A000320F4 -:1092700001E00FE00220FEF76BFD012D0CD0608AAB -:10928000002809D0002283001146104603F00EF991 -:10929000002801D00320E1E60020DFE6F3B5032635 -:1092A00087B00D4600290AD0FE4885426FD30120C1 -:1092B0008004854203D3FC480068854267D3079841 -:1092C000FEF7A1FD040005D02078222804D2082052 -:1092D00009B0F0BDF548FBE7A07F8707BF0F002D61 -:1092E00005D029463846FEF732FE0600F0D1394651 -:1092F0000027EF48012907D0022931D0ED49EE4877 -:1093000011F029FF3046E3E7A27D2946012A02D069 -:10931000827F920701D51120DAE700291BD10821AD -:109320006A46049711820592418904AAE348FBF733 -:10933000FFFA0028CCD16846008A082801D0032013 -:10934000C6E7684601880181418841818188818121 -:10935000C188C18102A9079802F0E7F90646D1E762 -:10936000A17D022916D1807F800613D4002D04D060 -:10937000A07F40070CD4002100E00121079802F0F3 -:1093800014FA0600BED1A775002DBBD004E01AE088 -:109390001126B7E7002D16D02A4621460798FEF77A -:1093A00050FF06461128ADD1A07F4007AAD4204621 -:1093B000082229460E3011F044FDA07F0421084305 -:1093C000A07700269EE7102082E770B50C46054680 -:1093D000FEF719FD010004D022462846FEF711FFD2 -:1093E00070BDB24870BD00B50146143195B0192961 -:1093F00001D2810707D001461E3104D00A3102D0C4 -:10940000072015B000BD312269460A70887009A98D -:10941000684602F092FBF4E701B582B0022069468B -:109420000880A34802AB00896A460021FBF7EAF8EE -:1094300069460988022900D003200EBD1CB5002111 -:10944000009102216A46118097490190096888427B -:1094500001D210201CBD964801899848FBF768FA94 -:10946000694609880229F5D003201CBDF0B50E46D7 -:109470008C4985B0174605468E4207D38A4801229B -:1094800092040068964204D3864202D2102005B0AE -:10949000F0BD1F2F01D90C20F9E7854C8D4226D352 -:1094A000954201D3854222D3E08803A9FBF75BF8FC -:1094B0000028ECD1287869464873E08803A9FBF7B7 -:1094C00033F80028E3D16946009008780221084368 -:1094D00069460870497B090703D00821084369469B -:1094E0000870E0886946FAF7B8FF0028CFD16946CE -:1094F0008F80E088334601AA0021FBF783F8694694 -:109500008988B942C3D00320C1E71CB50C460021AD -:1095100000910191228869460A8063490190096897 -:10952000002801D0884201D38C4201D210201CBDFA -:10953000002801D0002A09D05D486A46C1885F48EA -:10954000FBF7F6F96946098821801CBD0C201CBD7B -:1095500010B50123FEF75DFC56E4002310B51A4652 -:109560001946FEF756FC4FE470B504464D4894B0DA -:10957000844207D301208004844206D34A4800680D -:10958000844202D2102014B070BD2046FEF766FD62 -:109590000028F8D146488178112901D00820F2E747 -:1095A000817FC90601D51120EDE71D2269460A70A9 -:1095B00021780025CA07D20F69468A7022898A80DD -:1095C0006289CA80217801268907CA0F69464A72D2 -:1095D000007B002803D0012804D00320D3E70846ED -:1095E0000D7201E008460E7209A902F0A6FA0028E1 -:1095F000C9D12078800708D56068002805D009AA5D -:109600006946FFF7E6FC0028BDD11E2168460170BF -:109610008670C57009A902F090FA0028B3D1A0891C -:1096200000F073F90400AED11220FEF7AAFB204629 -:10963000A9E7F0B516461C4A0C4605001948204912 -:10964000126899B005D085420FD38D4201D395425F -:109650000BD3844209D38C4201D3944205D3864272 -:1096600003D38E4204D3964202D2102019B0F0BD2B -:109670000F4FB87FC106890F01D1400701D51120D6 -:10968000F4E72046FEF7EAFC0028EFD120788107B6 -:10969000C90F294303D0800714D5002D12D007200D -:1096A000E4E7000000C001002800002002300000B4 -:1096B000640C002038810000F3090000FFFF000067 -:1096C0000000040031460220FEF741FC0028CDD105 -:1096D000C9488078112803D0122801D00820C5E796 -:1096E0000220002714A9189002F08DFB00280DD04D -:1096F000C2A1C64811F02FFD08E01598807F8107B0 -:109700001898890F814201D17F1CFFB214A802F082 -:1097100088FB0028F1D0032F01D30420A6E7B64828 -:109720008078122803D1FFF7EEF800289ED1207828 -:10973000800708D56068002805D009AA6946FFF7A8 -:1097400048FC002892D1212168460170218941807E -:1097500061898180207800278007C10F6846817168 -:1097600020788007002815DB2878002807D00128FA -:1097700008D0022806D0032804D0A54876E768461A -:10978000C77102E001206946C8710622691C02A85F -:1097900011F057FB9848007B002803D0012804D023 -:1097A000032063E76846877302E0012069468873F7 -:1097B00031886846018271884182B1888182F1884E -:1097C000C1820783478309A902F0B7F9002886D12F -:1097D000A08900F09AF80400A0D11320FEF7D1FA76 -:1097E000204643E730B505468A4895B000680C46E8 -:1097F000814202D2102015B030BD2846FEF703FB8F -:10980000002807D00178222902D3807F800603D464 -:109810000820F0E78048EEE7132168460170458094 -:1098200009A902F08AF90028E5D108AA0A215156AF -:109830007F2901D02170DEE70520DCE710B56E49F5 -:10984000012807D0022815D0FF206CA14D3011F05F -:1098500082FC81E60878032804D0FF2067A143300A -:1098600011F079FC0021084602F0C7FE0120FEF746 -:109870006FFA71E68878132804D0FF205FA1483082 -:1098800011F069FC0021072002F0B7FE1120FEF75D -:1098900078FA61E6F8B504460122022102F044FAA2 -:1098A000074601220321204602F03EFA0646012225 -:1098B0000521204602F038FA0546012204212046FF -:1098C00002F032FA0446002F04D1AF204BA18000F1 -:1098D00011F041FC002E04D14C4848A11A3811F077 -:1098E0003AFC002D04D1494844A1193811F033FC49 -:1098F000002C04D1454841A1183811F02CFC22213C -:109900003846FEF7B7FA3846F8BD10B5002809D03A -:10991000830000221146072002F0C8FD072801D06D -:10992000032019E6002017E610B504460068002859 -:109930000CD03A49884207D301218904884205D3D3 -:1099400034490968884201D2102005E601F060F828 -:10995000A088294CA083A07E01280DD100210920D8 -:1099600002F025FE002800D00120A17C89090129F0 -:1099700004D00321FEF792FC0020EDE50221F9E777 -:10998000F7B500260C4605460B271AE02968B000FB -:1099900009580978002903D0012901D00720FEBD0C -:1099A000A170296806220958E01C491C11F049FAE7 -:1099B00027702046029902F0C0F80028EFD1761CEB -:1099C000F6B22879B042E1D800263A270FE0A8681D -:1099D000B10041581022A01C11F033FA2770204624 -:1099E000029902F0AAF80028D9D1761CF6B2287B99 -:1099F000B042ECD80020FEBD640C00207372635CA2 -:109A00006761705F636F72652E630000D7020000AC -:109A100002320000280000200230000000C00100D7 -:109A200030B5FE4B9A4207D301239B049A4205D3DB -:109A3000FB4B1B689A4201D2102030BD1578EB0613 -:109A40005B0F042B07D85478072C04D39378102B82 -:109A500001D8A34201D2072030BDD3785B0702D4DE -:109A600013795B0701D5062030BDC37FAC075B08C7 -:109A70005B00E40F2343C3770878EF231840137883 -:109A80009B06DB0F1B0118430870F1231840137865 -:109A9000DB065B0F5B0018430870507808730020EA -:109AA00030BD30B500240C70C378DB07DB0F0B70C2 -:109AB000C578AD07ED0F6D002B430B70C5786D07B2 -:109AC000ED0FAD002B430B7014700179C907C90F5E -:109AD000117003799B07DB0F5B001943117000794C -:109AE0004007C00F80000143117030BD70B51446AF -:109AF0000D460646F7F736FF002809D0A22101706F -:109B0000142221460830F7F75FFBF7F70CFF70BD12 -:109B1000132229463046FEF774FB70BD70B514461B -:109B20000E460546F7F71EFF002809D022210170D6 -:109B300045802178017261784172F7F7F4FE70BDBB -:109B4000132231462846FEF75CFB70BD10B5B54CBC -:109B5000207C00280DD12046B34A21461038FEF75C -:109B6000A7F8002803D0B1A1F12011F0F4FA0120E8 -:109B7000207410BDFFB581B00A9D06461C461746ED -:109B80001421284611F0BCF90B9800210160F80758 -:109B90000ED0A34920680968884239D31230286062 -:109BA0002068143068602068A8600B982168016004 -:109BB000B80726D56068002803D09949096888420B -:109BC00026D3029900290AD0FC3600280ED031464F -:109BD0001030FEF7DBFA00281BD1606810E0002887 -:109BE00016D0E86080366068B0670AE0FFF7CFF80B -:109BF00001460722304611F024F9FFF7A7FF8948F4 -:109C0000E860780708D58649A0680968884202D2CA -:109C1000102005B0F0BD28610020FAE770B50546B8 -:109C200011200C460870002161702121495D002936 -:109C300008D003290ED0042910D0FF207BA1523078 -:109C400011F089FA20780009012802D9E87FC008BC -:109C5000607070BD0007000F203002E00007000FA9 -:109C600030302070EEE770B594B015460C462C22CB -:109C70006946189E0A704880002B17D008221946A2 -:109C800001A811F0DEF868468581102231460E30B9 -:109C900011F0D7F809A9684601F04FFF002803D159 -:109CA000A17F10221143A17714B070BD0020019054 -:109CB0000290E8E7F0B50646008A97B080B20D46FC -:109CC0000190FEF7A0F804465648317848385B4FBB -:109CD00009900B0011F060FB0EFEFD43084A7283F1 -:109CE000B8D9FCFBFAF9F8FEA07F8007800F0128A5 -:109CF00007D000210022019802F016F8050007D1D4 -:109D000001E00121F6E7FF2048A1943011F023FA89 -:109D1000387CC00904D049484038406DA86112E041 -:109D20002B20694608720BA902A801F006FF002843 -:109D300004D0FF203DA19F3011F00DFA40490C984E -:109D400011F0E8F8A9617068A862B068E86220784C -:109D5000252804D0FF2035A1A53011F0FCF93246AA -:109D600021460198FFF7C2FE17B0F0BDA07F800723 -:109D7000800F012807D000210022019801F0D4FFB4 -:109D8000060007D101E00121F6E7FF2027A1AF304F -:109D900011F0E1F92078252804D03078012108431A -:109DA0003070E1E702202870B068A860B068002831 -:109DB00002D000202871D7E70120FBE72B2069465D -:109DC0000870184968464C3901F0B7FE002804D0E5 -:109DD000FF2016A1CE3011F0BEF903201BE02A208F -:109DE0006946087000A810220230716811F029F845 -:109DF00004A810220230B16811F023F8094968461E -:109E00004C3901F09AFE002804D0FF2007A1DF3072 -:109E100011F0A1F904202870099813E000C0010096 -:109E200028000020300D0020FFFF00007372635CEB -:109E30006761705F7365632E63000000500E002041 -:109E400040420F0068608FE7B068002804D1FF200F -:109E5000F649EB3011F07FF9E07F400704D5FF2091 -:109E6000F249EC3011F077F9B06806220A38009018 -:109E700033790421019801F058FA002891D0FF208D -:109E8000EA49F13011F067F96EE7002C04D1FF20A8 -:109E9000E649F93011F05FF92046223010220546DC -:109EA000716810F0CEFF28212046FDF7E3FFA07F68 -:109EB0008007800F022814D100231A4621460095FE -:109EC0000198FFF7D0FE06E055E1B6E0ACE089E08E -:109ED0002CE065E069E111280BD029212046FDF72F -:109EE000C9FFE07F317A4007400FC9000843E0779F -:109EF0003AE7A07F000703D5CC49CD4811F02BF9F4 -:109F0000A07F08210843A0770020608620463430D7 -:109F100010F0F4FFE07FFD220146C9071040890FD1 -:109F20000843E077307A203420701DE7A07F800757 -:109F3000800F012807D000210022019801F0F4FED3 -:109F4000040007D101E00121F6E7B948B7491D3007 -:109F500011F001F92B2069460872B64902A801F0F8 -:109F6000ECFD002804D0B248B049223011F0F3F8DB -:109F7000B0488188204621300176090A41760E21B9 -:109F800029702146FC316960017E2974407E687425 -:109F9000A8482C30A860103030346C61E860E3E6EB -:109FA000002C04D1A248A149363011F0D4F8207811 -:109FB00021289DD93079012802D0022808D103E058 -:109FC000E07F04210843E077387C0121084338749E -:109FD000324621460198FFF789FD23212046FDF7EF -:109FE00049FFC1E601220421019801F07DFC00280F -:109FF0009BD0A07F8007800F012807D0002100227E -:10A00000019801F091FE040007D101E00121F6E77B -:10A0100087488649543011F09EF80F202870172089 -:10A0200028716E34AC609FE60421019801F0ABFC0E -:10A030000028B4D11020287096E6A07F8007800FFA -:10A04000012807D000210022019801F06DFE0500D3 -:10A0500007D101E00121F6E7754874496D3011F030 -:10A060007AF82E462036307E41064DD5A17F8F07E7 -:10A07000BF0FC00713D02A468032516F00290ED07F -:10A08000087CF37DC007C00F5B0018430874516F54 -:10A09000E27F40084000D207D20F10430874307EA0 -:10A0A000000713D528468030026F002A0ED0117C9D -:10A0B000F37DC907C90F5B0019431174E27F49089A -:10A0C0004900D207006FD20F11430174307E800720 -:10A0D0000BD5F8204259002A07D0012F05D0294678 -:10A0E000307C31311032FEF77BF8307EC0060BD564 -:10A0F000F8204259002A07D0012F05D12946307C8B -:10A1000031311032FEF76CF8052368460370357E56 -:10A110004570484822226038019902704278D2087E -:10A12000D200D21C4270418003724572F7F782FD63 -:10A130002078252809D021280BD0AD203B4980006C -:10A1400011F009F82078222803D922212046FDF7B2 -:10A1500091FEA07F8007800F01280AD0002101987E -:10A1600001F009FE002800D1FEE5AF202F49800054 -:10A1700088E60121F3E774682E4D207860350928C0 -:10A1800002D00A28F0D10BE0E168002902D028466D -:10A19000F8F7D7FE2169002902D02846F8F7D1FE4A -:10A1A00021462846F8F7CDFEDEE521481F49DC3080 -:10A1B00068E6204810B5072228216030F8F7A8FE8D -:10A1C0001D480024017C4906490E0174403844654D -:10A1D000FDF7FBFC17493C3108461038F7F779FCCE -:10A1E00014484C30047410BD70B50D46FDF70BFEDD -:10A1F000040004D103200D49000210F0ACFFFF2140 -:10A200000531284610F07CFEA07F8007800F0128D2 -:10A2100016D0022128468830FDF7D8FC002803D04C -:10A220000249064810F097FF70BD00002C9E000008 -:10A2300005020000E40C0020500E00200503000081 -:10A240000121E7E70A46014610B510468830FDF7C0 -:10A25000D7FC10BDF0B505464068082601789BB0D4 -:10A2600008290DD00B2903D00C293FD10121817180 -:10A27000686887883846FDF7C6FD040041D13BE099 -:10A2800047883846FDF7BFFD040003D1FD49FE486D -:10A2900010F061FF2078212828D0282828D168686C -:10A2A00002210C3000F0BEFF002821D06868082190 -:10A2B000001D00F0B7FF00281AD02D21684601705C -:10A2C000478021461022223101A810F0BAFD0FA9C3 -:10A2D000684601F032FC002804D0CB20E949800018 -:10A2E00010F039FF29212046FDF7C4FD1BB0F0BD59 -:10A2F000687830436870F9E7E348E2492D3010F0A0 -:10A300002AFFA07F8107890F022902D1EF2108408F -:10A31000A0772078212810D068688179002902D0A0 -:10A320008078002818D0A07F8007800F022864D092 -:10A330000720D449C00110F00EFFA07F8007800FD6 -:10A340000228D3D1FDF7ECFF0028CFD0CE48CD496D -:10A35000733010F000FFC9E7687830436870E07F21 -:10A36000C00701D0042100E00321212001552078FD -:10A37000292818D02428E0D13946062002F03DF9DA -:10A3800022212046FDF776FDA07F8007800F01285F -:10A3900031D00021384601F0EEFC0028CDD0BA487B -:10A3A000B8495830C7E7A07F8007800F012807D041 -:10A3B00000210022384601F0B7FC050007D101E07A -:10A3C0000121F6E71B20AF49400110F0C4FE252112 -:10A3D0002046FDF74FFD0D2008A90871284609A960 -:10A3E0008830FDF7FFFB0228A7D00028A5D0A6489B -:10A3F000A4494D309FE70121CCE76878304368706D -:10A400009BE7F7B58AB00A98FDF7FDFC050056D02A -:10A410002878222853D3232851D0E87F40074ED4F0 -:10A42000A87F8007800F01280ED0002201280DD0C0 -:10A4300000210A9801F078FC064694480290F8F74B -:10A4400077FD040009D103E00122EFE70121F0E7E5 -:10A4500075208C49C00010F07EFE002E0FD088368B -:10A4600066610298F8F764FD07460298F8F760FD08 -:10A4700006462878222807D0242805D008E00020A6 -:10A4800007460646606103E025212846FDF7F2FCF9 -:10A49000092020700A9820620C9820710B98E760C0 -:10A4A0002661A06004A92046FDF7C0FB022806D063 -:10A4B000002804D074487349AF3010F04CFE0DB042 -:10A4C000F0BD30B587B00446FDF79DFC0546807FA2 -:10A4D0008007800F01280BD000210022204601F0C8 -:10A4E00023FC0446287822281ED9002C07D101E03D -:10A4F0000121F2E764486349BB3010F02CFE0F21C4 -:10A50000684601701721017120466E30029069463D -:10A510001A30FDF767FB022806D0002804D05A48FD -:10A520005849C03010F017FE07B030BD30B587B0C5 -:10A530000446FDF768FC0546807F8007800F0128F0 -:10A540000BD000210022204601F0EEFB04462878C3 -:10A550002228E9D9002C07D101E00121F2E74A487D -:10A560004849CD3010F0F7FD1020694608702046AC -:10A570008830FDF737FB0028D6D043484149D0301A -:10A5800010F0E9FDD0E7F7B505460078002700098F -:10A5900082B00C463E4602287CD0072802D00A280A -:10A5A00049D149E068680178082906D00B292FD0E5 -:10A5B0000C292DD03349364865E114271A26002C82 -:10A5C00069D04088A080FDF71EFC0090002804D1CF -:10A5D0002F482C49243810F0BEFD00980099C07D0A -:10A5E000A21D1831FDF7FCFD686808228089E08112 -:10A5F000696820461030091D10F023FC207E0121DF -:10A600000843F9210840207600984021807F50E0DF -:10A6100018270826002CD3D08088A080FDF7F3FBF4 -:10A62000050004D11A481749401F10F094FDA11DE0 -:10A630002846FFF7F3FA28E1002C01D0288BA080F0 -:10A64000287A01287ED0022805D0032838D0104867 -:10A650000C49853017E11C270726002CB0D0A088B4 -:10A66000FDF7D1FB0090002804D1094805491330BB -:10A6700010F071FD287B8007800F0128A0791CD085 -:10A68000400809E02C9E00001A030000440D002041 -:10A6900027040000E9E0E3E04000A071FD2108404C -:10A6A000297B4907C90F49000843A0710098802100 -:10A6B000807F084300998877E7E001210843ECE7B1 -:10A6C00013270B26002CA6D0A088FDF79CFB00903A -:10A6D000807F8007800F012807D00021A0880022FA -:10A6E00001F022FB050006D101E00121F6E7FB495C -:10A6F000FB4810F030FD0098807F8007800F012814 -:10A7000050D0E86A81788907890F0129A1794BD057 -:10A7100049084900A1718278FD255207D20F2940CE -:10A7200052001143A171E322114002785207D20E68 -:10A730001143A171DF2211404278D207920E1143DA -:10A74000A17100E033E00021E171C178217242790A -:10A750000179607AD30740084000DB0F1843930764 -:10A76000DB0F28405B0018435207FB23D20F184031 -:10A77000920010436072A07ACA0740084000D20FCE -:10A7800010438A07D20F2840520049071043C90FCF -:10A79000184089000843A07200980078232874D9D3 -:10A7A0002621C4E0A86AADE701221143B2E7297B64 -:10A7B000CC48022911D017270C26002C50D0012993 -:10A7C00012D003291FD0042920D005291ED09320A0 -:10A7D000C249C00010F0BFFC23E019270726002C57 -:10A7E00053D00121A17105E00121A171E17989080E -:10A7F0008900E171017CCA094906D201890E49002C -:10A800000A4302740DE00220A07106E0687B000795 -:10A81000000F8030A07105291DD0E07980088000EC -:10A82000E071A088FDF7EFFA0546007821282CD0CA -:10A83000232804D0AA48A949573010F08CFCA87FDF -:10A840008007800F01280ED00021A08801F093FA24 -:10A85000222128466CE0E07980088000401CDFE778 -:10A860000498068017E00121EFE7002C01D06888EA -:10A87000A080287A032832D004280FD005285AD087 -:10A8800097489649B03010F066FC0498002C06807A -:10A8900001D027806680002005B0F0BD15270C266A -:10A8A000002CDDD0A088FDF7AEFA807F8007800FF6 -:10A8B000012807D00021A088002201F035FA050008 -:10A8C00007D101E00121F6E785488449763010F090 -:10A8D00042FC0622A11DA86907F036FAD5E7162723 -:10A8E0000726002CBCD0A088FDF78DFA0090807F51 -:10A8F0008007800F012807D00021A088002201F0E6 -:10A9000013FA050007D101E00121F6E77448734905 -:10A91000843010F020FC2878C00601D5022000E029 -:10A920000120A071009800782328AED92721009833 -:10A93000FDF7A0FAA9E717270C26002C90D0A088D5 -:10A94000FDF761FA00906D7A002804D164486349EC -:10A95000973010F000FC0621A01D10F0CFFA002067 -:10A96000A071207A032108432072FB21084000993E -:10A97000C97FC907490F08432072680685D5E07969 -:10A9800004210843E071A07AE90740084000C90F9C -:10A990000843E17A2A0749084900D20F1143FD22F2 -:10A9A000AB07DB0F10405B001843A072E806C00F36 -:10A9B000114040000143E17267E710B50446807919 -:10A9C00090B08009012804D045484449C93010F0AE -:10A9D000C2FBFFF7BBF801206946087042480890A7 -:10A9E00042480190201D0290601C0B900AA9684605 -:10A9F000FDF71CF9002804D039483849D43010F04C -:10AA0000AAFB0322601C0B9910F01BFA10B010BDBA -:10AA100010B5364C002805D001461022204610F013 -:10AA200010FA0120207410BD10B50446FFF78EF80F -:10AA300010222E49204610F004FA10BD70B50025F2 -:10AA4000284C00281CD02A49884207D301218904B8 -:10AA5000884205D327490968884201D210250DE0B4 -:10AA6000062107F05BF9411C07D01E4940394865B3 -:10AA7000207C80210843207400E00725284670BD13 -:10AA8000207C4006400EF6E7F3B5002089B00D4665 -:10AA9000029000290AD0164885421CD30120800468 -:10AAA000854203D313480068854214D30998FDF703 -:10AAB000AAF9060003D03078222826D102E00E48F9 -:10AAC0000BB0F0BD002D19D1B07FC10903D08007B4 -:10AAD000800F022812D01020F2E700002C9E000008 -:10AAE0004D040000500E0020FFFF0000300D00203C -:10AAF00000C001002800002002300000B07FC10625 -:10AB000001D4010703D5002D01D00820D8E7FE4964 -:10AB1000097CC90717D1F17F490701D50D20CFE77F -:10AB20008007800F01280CD000210122099801F034 -:10AB3000FBF8070007D0B07F8007800F022804D001 -:10AB40000DE00121F1E71120BAE7002D07D02A46D8 -:10AB500039463046FEF764FF02900028B0D1EB483A -:10AB6000F8F7E6F9040003D1E949EA4810F0F3FAEE -:10AB70000A2020700998206238468830A060B07F93 -:10AB8000FB218007800F012829D0002D3DD0022015 -:10AB90002071381DE06038780007400F2074387845 -:10ABA000C006C00F6074A07C2A788008D20780009D -:10ABB000D20F1043A0740840F17F01AAC907490FC2 -:10ABC0000843A074A878E07469462846FEF769FF38 -:10ABD00068460079207568460078607519E00120A4 -:10ABE0002071207B2A788008D2078000D20F104382 -:10ABF0002073084029788907C90F8900084320730A -:10AC000024213046FDF736F90BE0032020710520A2 -:10AC1000207325213046FDF72DF9B07F4006400E08 -:10AC2000B07703A92046FDF701F8022806D00028D6 -:10AC300004D0B848B6492B3010F08DFA02983FE79F -:10AC4000FFB5B54A0E4607CA97B002AB07C3002747 -:10AC500001970C971798FDF7D6F8050005D02878CE -:10AC6000262804D008201BB0F0BDAC48FBE7A87F25 -:10AC70008007800F012807D000210022179801F0DB -:10AC800053F8040007D101E00121F6E7A148A049EB -:10AC9000623010F060FAA87F8007800F16900128BC -:10ACA00014D0022824D09B4899497B3010F053FAE5 -:10ACB00001210022852E31D01EDC002E26D0812ECF -:10ACC00026D0822E26D0832E1ED125E0002EEFD155 -:10ACD00021462846199AFEF7A3FE0028C3D11998E9 -:10ACE0008078019019980078C007C00F0C90DFE7BA -:10ACF0001998002808D1DBE7862E11D0882E11D0B4 -:10AD0000892E11D08A2E11D00720ACE710460EE014 -:10AD100008460CE002200AE0032008E0052006E0D7 -:10AD2000062004E0082002E0092000E00A200022BA -:10AD3000227101216A461176211D0791002801D058 -:10AD400020710BE1169801280CD0A66AE06A022255 -:10AD5000012111900020A0602846173002291AD046 -:10AD6000012119E0E66AA06A119003203070207872 -:10AD7000FB23C006C00F7070B07801221840019B01 -:10AD8000F37080080C9B800018430221B0700020F3 -:10AD900070713071DEE70021890009190861681CB3 -:10ADA000022A01D0012100E000218900091908616F -:10ADB000B0788007800F01285ED1119880788007D5 -:10ADC000800F012858D1119800790190119840798D -:10ADD0000090169801281DD0317908A80174717966 -:10ADE000017508A8027C01980099024008A8007D1E -:10ADF0000840149010433FD049491A98884207D31D -:10AE000001218904884215D346490968884211D234 -:10AE1000102028E70CAA0DA91998FEF742FE08A8F1 -:10AE2000007C01990840307108A8007D0099084015 -:10AE30007071D6E720463C3021460090F0311698DC -:10AE40000191022834D000211A9B20460C33FEF7D2 -:10AE500091FE0028DDD12046503021460090F4318B -:10AE600016980191012825D0002120461A9B149A9A -:10AE7000FEF780FE0028CCD111988078400702D4DC -:10AE8000E87FC0072BD0169902A8012914D0119988 -:10AE900009784900405A21780907490F4900C840FC -:10AEA0008707BF0F2AD0012F14D0022F0FD113E034 -:10AEB0000121C9E70121D8E721780907490F490095 -:10AEC000405A119909784900C8408707BF0F032FDE -:10AED00004D004E0022711E001270FE002271698B2 -:10AEE00001280BD1B078FB210840E97FC907490F41 -:10AEF0000843B07020780007400F30702078400879 -:10AF00004000207011990FE0500E0020440D0020E9 -:10AF10002C9E0000A90500001CB4010002300000B6 -:10AF200000C001002800002049781022C907C90E7E -:10AF3000D243114308402070C00622D4022F20D0F3 -:10AF4000012F20D00020A061E061206260622046D5 -:10AF50001830A060E87F40084000E877204606A946 -:10AF60008830FCF73FFE002805D0022803D0B44902 -:10AF7000B44810F0F0F825212846FCF77BFF0020AC -:10AF800071E6032008E020460D211B300FF0B6FFCC -:10AF900020461830A060042069460875E87F01212A -:10AFA0000843E87705AA29461798FEF7B7FDD5E7C5 -:10AFB000F0B587B015460F0004460DD0A248854273 -:10AFC00007D301208004854206D3A048006885424B -:10AFD00002D2102007B0F0BD2046FCF714FF060097 -:10AFE00004D03078272803D00820F3E79848F1E709 -:10AFF000B07F8007800F012807D000210022204663 -:10B0000000F092FE040007D101E00121F6E78D482F -:10B010008B491F3010F09FF80020002F05D0022F21 -:10B0200008D0012F11D00720D4E701216A46117101 -:10B03000A06018E0234618336946A3600871102207 -:10B04000294618460FF0FDFE0DE021461831A1609B -:10B0500069460871A061E0612062606206212846AD -:10B0600006F05CFEA0612078C10714D040084000C3 -:10B070002070022069460870204618300290703017 -:10B08000FCF7B0FD022806D0002804D06D486C49BA -:10B09000423010F060F825213046FCF7EBFE00202E -:10B0A00098E7F8B515460E460746FCF7ACFE0400D7 -:10B0B00004D02078222803D00820F8BD6448F8BDC9 -:10B0C000A07F8007800F022802D06148C01CF8BD15 -:10B0D0005D4886420ED3012189045C4A8E4202D328 -:10B0E00013689E4206D3854204D38D4204D3106870 -:10B0F000854201D21020F8BD00953288B31C21464C -:10B100003846FEF7B0FD112816D00028F3D1E17FB4 -:10B110002A7C4908D2074900D20F1143E1772A7CE3 -:10B1200049079206490FD20ED2001143E177A17F61 -:10B130004906490EA177F8BDA17F0907FBD4204637 -:10B140000822B11C34300FF07CFE30886086204627 -:10B150001022294622300FF074FEE07FFD210840C6 -:10B16000297CC907890F0843E077287C4108202003 -:10B170000155A07F08210843A0770020D7E770B5CC -:10B1800094B00D460646002B02D0072014B070BDC7 -:10B19000FCF739FE040007D02078222802D3A07FD4 -:10B1A000400603D40820F1E72948EFE7002D19D025 -:10B1B0002D216846017046801022294601A80FF013 -:10B1C00040FEE07F297C4008C9074000C90F0843C2 -:10B1D000E077297C40078906400FC90EC900084363 -:10B1E000E07703E02E2168460170468009A9684691 -:10B1F00000F0A3FCA17FBF221140A177C6E710B5E4 -:10B200000C46FCF700FE002805D0104909688C4266 -:10B2100003D2102010BD0E4810BD2146FEF7FEFCE3 -:10B22000002010BD05E00278401C002A01D000205B -:10B2300070470A46491E89B2002AF4D1012070479E -:10B240002C9E0000ED06000000C001002800002038 -:10B250000230000030B50346072903D00620DA7813 -:10B260001C7916E00320FAE707290BD05500ED18EA -:10B270006D79072D01D0401EC0B2521CD2B2092AEE -:10B2800007D105E05500ED186D79072DF3D0F4E7EF -:10B2900000222546641EE4B2002DE5D130BDFFB585 -:10B2A00081B00C461646114620460A9F0B9DFFF7BB -:10B2B000D1FF00280AD02079092803D3FEA1A020BD -:10B2C0000FF049FFA078C00907D019E0072E02D07F -:10B2D000112005B0F0BDFD48FBE701982880381D1E -:10B2E0006880002068712871EF80049828812846C2 -:10B2F00000F04BFC002803D1EFA1AD200FF02BFF95 -:10B30000E07821794018491CC0B22171092801D385 -:10B310000938C0B24000001946718179F12249080C -:10B320004900114081710020D3E7FFB583B0164674 -:10B330000F461C46002203210C9D039800F0F4FCEC -:10B34000010008D033463A46019500940398FFF770 -:10B35000A6FF07B0F0BDDD48801EFAE7F0B5054650 -:10B3600016460F4650888DB00022032100F0DCFC09 -:10B37000040003D1D0A1DF200FF0EDFE00206946CC -:10B380000871A078400603D1CBA1E3200FF0E3FEC3 -:10B39000042F5ED32A78D007C017401C06D16178ED -:10B3A0006B78994255D12178090752D00121142A8E -:10B3B00046DA012A42D0122A02D0132A40D128E0CC -:10B3C0000C2F3DD1A2785206520E012A38D0207897 -:10B3D00000090001401C20706878607068460171A7 -:10B3E00068792A790102114368460181E879AA79CE -:10B3F0000102114368464181687A2A7A01021143A9 -:10B4000068468181E87AAA7A010211436846C181BF -:10B410001AE0062F14D120780009000120707188ED -:10B42000012001F0EAF8022168460171C91E01817C -:10B4300068792A790102114368461FE0062F0AD075 -:10B440006A461279002A1BD07088324601A9FDF79E -:10B4500020FB0DB0F0BD207800090001207071883C -:10B46000012001F0CAF802216846017168792A7941 -:10B4700001021143684601810021C9434181E3E78C -:10B480000028E6D07488684681766978C176022102 -:10B4900081830021C18304A8052200900623114660 -:10B4A0002046FFF742FF0028D3D089A1D6200FF015 -:10B4B00052FECEE7F7B58CB015460C990D98FAF709 -:10B4C00041F9C0B2082850D10020694688856888B3 -:10B4D0000022032100F028FC040004D1FF2076A103 -:10B4E00063300FF038FE01230021E07822790BE071 -:10B4F0004600361976799E4201D1491CC9B2401CDA -:10B50000C0B2092800D100201646521ED2B2002E29 -:10B51000EED1002902D117206946888504AB023399 -:10B520000BAA00950C990D98F8F7B6FB0006000ED3 -:10B5300007D002281BD0032817D0FF205EA1893036 -:10B5400011E06846808D00280FD002A9019100907B -:10B550006888042301222146FFF7A1FE002804D0B9 -:10B56000FF2055A176300FF0F6FD0FB0F0BD6878E2 -:10B57000102108436870F8E700205A49024643004A -:10B58000401CCA520828FAD3704700218170017804 -:10B5900009090901017000214170C17001717047F2 -:10B5A00070B50D460022032100F0BEFB040004D15B -:10B5B000FF2041A1CF300FF0CEFDA0786906C00971 -:10B5C000C001490E0843A07070BD704710B5014618 -:10B5D000012001F012F810BD3EB58DB2002203210A -:10B5E000284600F0A1FB040004D1FF2032A1E43082 -:10B5F0000FF0B1FD2078694600090001207002209B -:10B60000087039488880C88000222846FDF741FA32 -:10B610003EBDF7B505460078002700090C463E46BA -:10B62000012804D0FF2024A1F3300FF094FD287AE4 -:10B6300003280CD0412020A1C0000FF08CFD0298FF -:10B64000002C068001D0278066800020FEBDEA899C -:10B65000702710460A3086B2002C0AD06888A08075 -:10B66000A8892081E28020460A3029690FF0E9FB91 -:10B67000E5E702980680E8E7F8B543680246D9791D -:10B680009C79090221435C7A1E7A25025C88981D08 -:10B690003543241FA14238D11B79022B35D1042D0B -:10B6A00034D0052D3DD0062D34D0402D2DD3061D90 -:10B6B0000F461446284619E07372635C6C3263616E -:10B6C000705F636F72652E6300000000043000003D -:10B6D0007372635C6C326361705F636F72652E635B -:10B6E00000000000680E0020FFFF000000F0E3F9FA -:10B6F00008280AD01120207003202072A581E7813C -:10B7000026616078082108436070F8BD001DFFF7CE -:10B71000D1FEF8BD031D50880A461946FEF771FE9A -:10B72000F8BD001DFFF71AFEF8BD70B50D468CB0D0 -:10B7300006460022032100F0F7FA040031D02078F9 -:10B740000007000F01282ED0122069468874607807 -:10B750000523801CC874082088822888C8826888CD -:10B760000883A8884883E888888302A90C2001916F -:10B7700000901A4621463046FFF791FD00280ED171 -:10B78000F02300223146012000F090FE20780009CD -:10B790000001401C20706078801C607000200CB09C -:10B7A00070BDCB48FBE71120F9E770B50D468CB0B2 -:10B7B00006460022032100F0B7FA040006D02078E4 -:10B7C0000007000F012803D00820E8E7C048E6E79B -:10B7D0001321684681746178C17402218182C58217 -:10B7E00002A906200523019100901A462146304601 -:10B7F000FFF755FD0028D2D1207800090001207004 -:10B800000020CCE7F3B581B00D460022032101985A -:10B8100000F08AFA00260446002803D1AD49AE485C -:10B820000FF099FC2079A8423BD2AB48A949401CB3 -:10B830000FF091FC35E0E07841000F19401C797958 -:10B84000C0B20091E070092801D10020E070207999 -:10B85000401E2071B879C00708D0009801990428CB -:10B8600015D09C49822018310FF075FCB87900077B -:10B87000410F08D0400F019904280CD095498F2022 -:10B8800018310FF068FC009807280AD107E0084635 -:10B89000FEF74CFEEAE70846FEF713FEF3E7761CD8 -:10B8A000F6B228466D1EEDB20028C4D13046FEBD6A -:10B8B00010B50022032100F037FA040004D1B520AE -:10B8C000844980000FF047FCE07821794018C0B22D -:10B8D000E070092801D30938E07000202071A078B9 -:10B8E00080210843A07010BDF8B517460D46002210 -:10B8F000032100F019FA040005D0002D0CD0002F10 -:10B9000007D0062006E0072D01D00620F8BD032051 -:10B91000F8BD0820A84204D86F486E4942300FF0A5 -:10B920001AFC29462046FFF795FC0646002F28D032 -:10B93000002E26D1E07821791CE0420012195379BB -:10B94000072B03D093791B075B0F04D0401CC0B2B8 -:10B9500009280CD00CE0400000198079F123184030 -:10B960006B071B0F1843907100290AD104E00020D7 -:10B97000491EC9B20029E0D1574856495A300FF044 -:10B98000EAFB3046F8BDF8B50D460022032100F071 -:10B99000CBF9040004D150484E4968300FF0DBFB6E -:10B9A000681E052804D34C484A4969300FF0D3FB80 -:10B9B0000921E2782079002310E0560036197779C2 -:10B9C000AF4206D1B17949084900B1715B1CDBB2C5 -:10B9D0001146521CD2B2092A00D100220646401E4E -:10B9E000C0B2002EE9D1092905D248000019817999 -:10B9F0000122114381711846F8BD10B50446402854 -:10BA000001D2072010BD00F056F8082802D03120DE -:10BA1000000210BD0021314802E0491C082903D270 -:10BA20004A00825A002AF8D1082903D0490044521A -:10BA3000002010BD042010BD10B5402801D2072001 -:10BA400010BD00F038F8082805D00021234A400036 -:10BA50001152084610BD052010BDF0B58BB016463A -:10BA60000C00074607D0002E05D06188402904D27B -:10BA700007200BB0F0BD1020FBE72088002801D084 -:10BA8000172801D90C20F4E7084600F014F808281C -:10BA90000FD0258803A82A46314602300FF0D1F98D -:10BAA00001A8009062882B4607213846FFF73DFC2D -:10BAB000DFE70520DDE701460020084A02E0401CE0 -:10BAC000082803D24300D35A8B42F8D170470000B4 -:10BAD00002300000B8B60000AD020000680E002081 -:10BAE00000B51E2827D00FDC0C2820D008DC03006E -:10BAF0000FF052FC0913211521211B1B17192100DE -:10BB0000122818D1072000BD302814DD3A38030070 -:10BB10000FF042FC030F11091100002000BD214865 -:10BB200000BD042000BD0D2000BD0F2000BD082079 -:10BB300000BD112000BD032000BD10B50C4604F06F -:10BB4000A0F800281ED0204602F013FE002816D0D0 -:10BB500022780E2A0DD00F2A0BD0022A09D0032AF0 -:10BB600007D0102A09D010A17E200FF0F4FA00208F -:10BB700010BDA078FFF7B4FF10BD112010BD0AA1C1 -:10BB80008420F2E708A18A20EFE710B502F0A2FCBA -:10BB900010BD10B502F0EDFD10BD10B502F01AFD9C -:10BBA00010BD0000023000007372635C686F737434 -:10BBB0005F6863692E630000F8B5054606ACC1CC2A -:10BBC000E44C21706270A370E070681C4208277119 -:10BBD0005200E14B66710021880000198446026220 -:10BBE000605C40008218002D0AD0002005E0664607 -:10BBF0004700366A401CF353C0B2665C8642F6D8F2 -:10BC0000491CC9B20629E7D30026D21C9708B00008 -:10BC1000BF0000198760304600F02AF9A15D761C4C -:10BC20004843C219F6B2062EEFD3501B80B2F8BDBE -:10BC3000F0B504468C46C7490020A500FF23024604 -:10BC40006D18C54E0C5D0BE02F6A5100795AB14258 -:10BC500004D1401CC0B2FF2B00D11346521CD2B2FB -:10BC60009442F1D8002801D061460B70F0BD70B548 -:10BC7000B84C0023655CA678B54200D10346890024 -:10BC800009199D420AD90C6A5E00A45B844202D164 -:10BC90001370012070BD5B1C9BB2F2E7002070BDE9 -:10BCA000FFB583B00C9C1F460D46060009D0002D41 -:10BCB00007D0F01C80088000B04204D0102007B0EC -:10BCC000F0BD0E20FBE70598A04201D8A74201D99C -:10BCD0000720F4E701460094019423463A460020E9 -:10BCE0000294FFF769FF2988814207D0814201D27F -:10BCF000042100E0092128800846E0E7009401942F -:10BD000023463A46029430460599FFF755FF2880AE -:10BD10000020D4E710B5044600F0B4F8002801D0A4 -:10BD2000E0B210BDFF2010BDF8B505468A481646A2 -:10BD30000C46854201D0062C01D30020F8BD002717 -:10BD400069460F7028466A462146FFF790FF002893 -:10BD50000DD068460178204600F09CF8002EEDD00A -:10BD60000028EBD12146284600F0A0F8F8BD38465F -:10BD7000002EF7D1F8BDF8B505460C460020764EEA -:10BD80006946764F0870B5423BD0062C01D3072098 -:10BD9000F8BD0A4621462846FFF769FF002830D043 -:10BDA00068460178204600F075F823000FF0F4FA99 -:10BDB000060404090C11161B01462846FEF742FA38 -:10BDC00015E0FDF735F812E001462846FFF7FDFBC8 -:10BDD0000DE001462846F7F7E4FE08E00146284654 -:10BDE000F9F73AFB03E05EA17C200FF0B4F9594A61 -:10BDF0006846A10000788918096A40000E520020A8 -:10BE0000F8BD3846F8BD5A4A1268914201D2102056 -:10BE10007047062801D30720704708720020487237 -:10BE20007047F8B5044652480068844201D2102099 -:10BE3000F8BD207A474A83009B18617A464D125C10 -:10BE400011E01E6A4F00F65BAE420AD04A1C6272D5 -:10BE50001A6A4B00D25A228000F01CF86060002061 -:10BE6000F8BD491CC9B28A42EBD861720520F8BD01 -:10BE70000EB5404B40000ECB0091029301926946F3 -:10BE8000085A0EBD33498978814201D90120704793 -:10BE90000020704770B50C460546FFF7E9FF2D4AB4 -:10BEA000A900891889686043401870BDF8B5044638 -:10BEB0000E4600206946087005462046FFF7E2FF5F -:10BEC000002803D126A1F3200FF045F92148214B8A -:10BED000815D8278B000C718914209D1E0B269460D -:10BEE0000870396A4000085A1B49884206D02EE083 -:10BEF00069463046FFF79CFE002828D06846007847 -:10BF0000396A40000C52684601783046FFF7C2FF9C -:10BF1000054633000FF040FA060404090C0F14170D -:10BF200029462046FEF760F911E0FCF75EFF0EE0BF -:10BF3000FFF72BFB0BE029462046F7F7F9FD06E05B -:10BF4000F9F783FA03E006A162200FF004F928460E -:10BF5000F8BD0000780E0020FFFF00000230000056 -:10BF60007372635C686F73745F636D2E63000000AF -:10BF70002800002028B401008107C90E002808DA33 -:10BF80000007000F08388008C24A80008018C06986 -:10BF900004E08008C04A800080180068C84000069D -:10BFA000800F7047BD4948788978884201D3401A8C -:10BFB00002E02122511A0818C0B27047B749233154 -:10BFC00048788978884201D3401A02E02122511A28 -:10BFD0000818C0B27047B14946314878897888421C -:10BFE00001D3401A02E02122511A0818C0B270474A -:10BFF000A94910B50C310868FF22120290430122B2 -:10C00000D20310430860A54900202331487088708E -:10C01000233948708870463148708870A04806F00F -:10C02000BCF89F48401C06F0B8F8F6F7A3FB00F0F8 -:10C0300028F910BD20207047B4E770B50C460546BE -:10C040000026FFF7AFFF9549A04214D30A46203AD5 -:10C0500000232046641EE4B200280BD08878105CD0 -:10C06000287088786D1C401CC0B288702128F0D1DF -:10C070008B70EEE7012600F004F9304670BD2020F9 -:10C0800070479BE770B50C4605460026FFF796FF04 -:10C0900082492331A04214D30A46203A0023204685 -:10C0A000641EE4B200280BD08878105C2870887871 -:10C0B0006D1C401CC0B288702128F0D18B70EEE757 -:10C0C000012600F0DEF8304670BD2021017000200E -:10C0D000704710B50446FFF77EFF2070002010BDAA -:10C0E00070B50C460546FFF776FF6C494631A04215 -:10C0F00015D30A46203A00232046641EE4B20028E5 -:10C100000BD08878105C287088786D1C401CC0B2F9 -:10C1100088702128F0D18B70EEE7002400E0614C9C -:10C1200000F0AFF8204670BD70B50C4605462129D9 -:10C1300004D9FF205CA147300FF00DF85548406846 -:10C14000103840B2FFF718FFC6B20D20FFF714FFFA -:10C15000C0B2864207D2FF2053A14D300EF0FBFF44 -:10C1600001E0F6F74AFB21462846FFF766FF002864 -:10C17000F7D070BDF8B507464948484C401E474EB9 -:10C180000078254646362335002806D1A9786878F8 -:10C19000212200F06BF800280ED0A17860782122CF -:10C1A00000F064F8002814D0B1787078212200F0F3 -:10C1B0005DF8002828D033E038496878C91C0F544E -:10C1C0006878401CC0B26870212829D100206870AE -:10C1D00026E03249607820390F546078401CC0B2A4 -:10C1E0006070212801D1002060702D4F7F1E3878AB -:10C1F000002815D0A1786078212200F037F80028B7 -:10C200000ED0002038700BE02449707826310F548E -:10C210007078401CC0B27070212801D1002070706D -:10C22000A9786878212200F021F800281DD0A17893 -:10C230006078212200F01AF8002816D0B1787078C2 -:10C24000212200F013F800280FD0F6F7B8FA1448AE -:10C2500005F0ABFF01214903884203D016A1C1209C -:10C260000EF079FF0E4805F0B8FFF8BD401C88427B -:10C2700005D0904201D1002901D000207047012053 -:10C28000704710B5064805F090FF002801D1F6F779 -:10C2900085FA10BD00ED00E000E400E0F00E0020A3 -:10C2A00069000020072000007372635C736F635F96 -:10C2B00072616E642E6300007372635C736F635F00 -:10C2C00072616E642E630000FEB5F54C074660682F -:10C2D000FF213E0181552178FF2913D00901083142 -:10C2E00041583246491E083209020192090A805813 -:10C2F00000F0CCF9002802D02478254615E06168CA -:10C30000207888552770FEBDE5484268019811588D -:10C31000280100900830105800F0B8F9002806D124 -:10C32000DF482C46416800980D5CFF2DECD1DC48BD -:10C330002101406885554754FEBD70B5D84A044672 -:10C340000020157A53680AE00201561C9E5DA64241 -:10C3500003D10C329A588A4204D0401CC0B28542A4 -:10C36000F2D8FF2070BDF8B5CD4F3E7801F00AFE3F -:10C370000146FF2E68D034012546786808354059BB -:10C3800000F084F9022802D9786840595AE0C4497B -:10C390004868025D0A70A11C425C002A0CD0521E43 -:10C3A000425441590122D20589180902090A415112 -:10C3B0003046FFF789FF30E0631CC25C0092221D0B -:10C3C00094468258002A10D001239B029A420FD92A -:10C3D0009205920D43595703DB191B021B0A435167 -:10C3E0006346C3589A1A920A09E0FF21C1540AE031 -:10C3F000435952039A181202120A4251002242541F -:10C400003046FFF761FFA6480C344168C2680098C7 -:10C4100009598000125800989047A14C2078FF28B5 -:10C4200012D001F0AFFD01462078626800010830AB -:10C43000105800F02BF9012896D920786168000186 -:10C440000830085801F091FDF8BDF8B51C461546B6 -:10C450000E460746FF2B03D392A1D3200EF07BFE9E -:10C460008F48FF21C7604560047206740170002286 -:10C470004270104604E00201521C401CA954C0B294 -:10C48000A042F8D3F8BD70B5854C06466578207C8F -:10C49000854203D383A1E6200EF05DFEE068A9008B -:10C4A00046506078401C6070284670BDFFB581B072 -:10C4B0001D46FF2401F066FD794F06467978019804 -:10C4C000814203D877A1F4200EF045FE7448002184 -:10C4D000037A406810E00A019446521C825CFF2AED -:10C4E00024D0019FBA4205D162460C328758029A85 -:10C4F00097421DD0491CC9B28B42ECD8FF2C17D0F3 -:10C5000021014B1C019AC2540B33029AC250039B67 -:10C51000634F0022012B0ED00B1DC25001239B0242 -:10C520009D4216D9AA05920D08D008E00C46E1E715 -:10C53000FF2005B0F0BD0B1DC550EFE71A465303B1 -:10C540009B190E461B0208361B0AAA1A8351920A2F -:10C5500009E0002D00D101256B039B191D022D0A56 -:10C560000B460833C550891C42543D463E78204650 -:10C57000FFF7AAFE2878B04217D001F003FD01466C -:10C5800028786A6800010830105800F07FF8012808 -:10C5900007D92878696800010830085801F0E5FCDF -:10C5A00003E001F010F9F5F7AFFE0198C1E770B5AF -:10C5B0000C46054601F0E6FC064621462846FFF7F4 -:10C5C000BCFEFF2817D0364D0401204669680830AC -:10C5D0000858314600F05AF80121090340186968EB -:10C5E000A41C095D400B002901D08902081800280D -:10C5F00000D1012070BD002070BDF3B581B00F46A1 -:10C600000198FFF79AFEFF282AD0254D2E786968F9 -:10C610003246344604E0844205D026462301CC5CF1 -:10C62000FF2CF8D11CE0FF2C1AD0A64221D110011A -:10C63000085C2870FF281AD001F0A4FC2A78014673 -:10C64000120168680832805800F020F8012809D9E2 -:10C650002878696800010830085801F086FC08E075 -:10C660000020FEBD01F0AFF8F5F74EFE01E001F04D -:10C6700084FC39460198FFF79AFF22016968FF237D -:10C68000541C0B558A5C3301CA54FEBD401A00028B -:10C690000121000AC905884200D900207047000026 -:10C6A0003C0F00207372635C736F635F74696D6528 -:10C6B000722E6300F0B500241C4A01211C4B0803B4 -:10C6C000546018601B4B1C601B4C20601B480469A5 -:10C6D000E443E406E617046910252C430461184C72 -:10C6E0006160184D2960761C00E020BF1F68002F94 -:10C6F000FBD0002E03D107691026B743076190686D -:10C700008005906801D5104A10436960A16000213E -:10C7100019600121084A09031160F0BD10B50446F3 -:10C72000FFF7C8FF2060002010BD000000C50040DA -:10C7300080E100E000C1004080E200E000ED00E0A8 -:10C7400000C3004000C0004000FCFFFF70B51F495F -:10C750000A68002A17D000231D4601244A68521C8B -:10C760004A60092A00D34D600E792246B2400E6815 -:10C7700016420AD072B60B6893430B6062B64968E2 -:10C780000160002070BD052070BD5B1C092BE5D346 -:10C790000FA136200EF0DFFCF5E7012010498005DF -:10C7A00008607047EFF31081CA07D20F72B60121FB -:10C7B00081400648036819430160002A00D162B62F -:10C7C000EBE70248002101604160704770000020E3 -:10C7D0007372635C736F635F6576742E6300000031 -:10C7E00000E200E001208107086070470120810716 -:10C7F000486070471048C068C00700D001207047EB -:10C800000D488068C00700D0012070470A48406981 -:10C81000C00700D0012070470748C069704706492B -:10C820008A69D20306D589698907890F814201D1B6 -:10C83000012070470020704700040040F8B5F74C15 -:10C84000207EE17D88421CD00126F54D0027E07D49 -:10C85000215C14200A4642435019037C052B11D059 -:10C86000037C062B1CD0037C072B28D0437C012B98 -:10C8700033D0ECA1EE480EF06EFC207EE17D8842C4 -:10C88000E5D1F8BD0674E07D162807D0E07D401C98 -:10C89000E075491CC8B2AA5802210CE00020F7E755 -:10C8A0000674E07D162808D0E07D401CE075491C28 -:10C8B000C8B2AA5803219047DFE70020F6E70674C4 -:10C8C000E07D162807D0E07D401CE075491CC8B209 -:10C8D000AA580821EFE70020F7E74774E07D162803 -:10C8E00007D0E07D401CE075491CC8B2AA5807215A -:10C8F000E1E70020F7E770B50024CE4E0C207072FF -:10C90000CD4825464473047328300476C475CB485B -:10C9100005F043FCCA480575F572CA49601E886077 -:10C920007571B570F57035717570C748E839057067 -:10C9300045701420604340180574641CE4B20B2C4D -:10C94000F7D30120F5F7E0FF0020F5F7DDFF012028 -:10C95000B071F5F7A3FCBD48F5F7B2FCBC4C2070F4 -:10C96000BC48F5F7ADFC6070F5F76EFF70BD10B513 -:10C97000F5F795FFB64C2078F5F7C0FC6078F5F731 -:10C98000BDFCAC4C207A002803D0F5F746FD002012 -:10C99000207210BD70B5A74CA079002804D0A1A1C9 -:10C9A000AD480EF0D8FB70BDE07A002803D19DA100 -:10C9B000AA480EF0D0FB0126A6710025E572607A28 -:10C9C000042114225043964A801801749D488168BE -:10C9D000491C04D0691E81600120F5F795FF0020F5 -:10C9E000F5F792FFF5F776FF05F018FDF6F777F803 -:10C9F0009B480560056001209A49C0030860F6F76E -:10CA0000EDF891480078022804D0032804D1E0789A -:10CA1000002801D0A67000E0A570F6F74CF870BDB4 -:10CA200003467F490B20142242435218203A127FBA -:10CA3000002A04D0401E0006000EF4D170471422D4 -:10CA4000424351180A46803AD366012220390A77B8 -:10CA50007047012805D0032805D1002903D1002003 -:10CA600070470029FBD010B4724C00236370764AE3 -:10CA7000002890700CD002280AD007291AD208008A -:10CA800078440079001887441505070D0F1113002D -:10CA9000D37003E01B2000E03A20D07001206070CA -:10CAA00010BC70475820F8E77720F6E79620F4E7A7 -:10CAB000B520F2E710BC0020704710B562484078FE -:10CAC000F6F714F880B210BD411E1422504310B581 -:10CAD000534A8418203C0A2902D8207F002803D119 -:10CAE00050A161480EF037FB207F012804D0B3200D -:10CAF0004CA180000EF02FFB0020207710BD70B5F8 -:10CB00004D4C607B217B884201D1012500E000254E -:10CB1000F5F785FFF5F7EAFF617B227B914201D1B2 -:10CB2000012100E00021A942EBD170BDF7B5064616 -:10CB3000481E84468EB0C0B2142205905043384A35 -:10CB400085180495287C2D1D07282AD1334C0027F1 -:10CB5000E07D227E824221D0235C059A934201D15E -:10CB6000012701E0002F04D0162811D0421CA25C3E -:10CB7000225416280ED0401C227EC0B28242EBD135 -:10CB8000002F0BD0207E002806D0207E401E04E01F -:10CB90000022ECE70020EFE716202076049801221F -:10CBA00002746046234C0A2813D8142041431C48C1 -:10CBB00008182038007F00280BD00498007C01283A -:10CBC0000BD00498007C012803D01098807A0128AB -:10CBD00007D014A125480EF0BEFA1098807A0128DB -:10CBE0006DD104980E4B007C022843D00B4C207E64 -:10CBF000162870D0207EE17D401C884203D109A117 -:10CC00001B480EF0A8FA049901204874217E05986B -:10CC10006054207E162862D063E0000038110020A6 -:10CC2000541100207372635C72656D2E6300000006 -:10CC3000D40500005C1200201011002068120020B2 -:10CC4000201100203C1200207A00002067C3000061 -:10CC5000780000203DC800007D0200005E02000058 -:10CC600000F5004080E200E0CB0200001503000068 -:10CC700022030000607A059A0146904206D00146E0 -:10CC800014277843C018807C9042F8D1627A82429F -:10CC900008D1617A14225143C918897C617201213B -:10CCA000A17207E014224243D21814277943927CE0 -:10CCB000C9188A7414220C215043C018817410982A -:10CCC000007A06281DD201007944097949188F4459 -:10CCD0000C161412100EE07D002890D093E700206F -:10CCE00001E0207E401C2076B5E000210FE0B42159 -:10CCF0000DE073210BE0322109E00A2107E0062153 -:10CD000005E0FF20FDA1E0300EF025FA002110988B -:10CD100002910068401A28601099097A002912D0FF -:10CD20000221401A0102090A29601098026840682D -:10CD300010180002000A68601098807A0228109883 -:10CD400003D0007B71E00421EBE7007A002812D0C9 -:10CD500002220298121810984368104610301818D2 -:10CD60000A90E948029B4078984202D9E378002B68 -:10CD700003D00A9805E00422EBE7029BC31A0A9845 -:10CD80001818637A10300C2B1CD0637A14277B435D -:10CD9000DE4FDB195B68994214D0DD4F617ABC46E7 -:10CDA00014235943D94BC9184B6889689B1B891BAD -:10CDB0001B0209021B0A090A984237D8634535D875 -:10CDC000614533D831180A980123081A0002000A75 -:10CDD000286010998018C9680002000A471ACD4AD5 -:10CDE0009B05BC469F4201D2384610E00F1A9F4275 -:10CDF00001D260460BE0944503D9511A0818401C33 -:10CE000005E0974206D9101A4018401C40420028FD -:10CE10005FDC03E0B9A1C0480EF09DF929680A98CB -:10CE200008180002000A686000202872686810274D -:10CE300010300002000A68601098407AA8721098BA -:10CE4000007A687203280ED200280CD0FFF7D2FCBB -:10CE5000002803D007E0002011B0F0BD0298422165 -:10CE60000F1A32200290A8490878012801D003281F -:10CE700009D148780299884205D9E178002902D180 -:10CE80000299401AC7196B6828689B1B801B9C4637 -:10CE900001021B029E4A090A1B0A8F4219D8174633 -:10CEA000914216D8BB4214D8617A0C2915D0677A02 -:10CEB00061460C22039200921422944B7A43D218BA -:10CEC00093689B1B834216D80397977C0C2FF3D152 -:10CED00073E0059801F04CF9BDE70498022205992A -:10CEE0000274627A0C2A00D0627A82746172012024 -:10CEF000A07211B0F0BD0C2F5FD0002238469446CE -:10CF00001422824B4243D21853689B1B8B4225D27A -:10CF1000907BAB7A98421BD804980521059D01743B -:10CF20007E4C207E16280FD0207EE17D401C88425A -:10CF300003D172A17A480EF00EF9207E2554207E8E -:10CF4000162800D0CDE6CAE6E07D0028F1D0F4E74F -:10CF500001208446907C0C28D2D102E06146002951 -:10CF60002AD03D46009014202A46424367480621B5 -:10CF7000161831741C38007E1628684816D0017EB9 -:10CF8000C07D491C814203D15CA166480EF0E3F8E4 -:10CF90006248017E4554017E16290BD0017E491C52 -:10CFA0000176B57C0098A842DDD106E0C07D00285E -:10CFB000EAD0EDE70021F3E7009704990220534DF2 -:10CFC0000874607AB84207D104990098887405986B -:10CFD00060720120A07221E003980C2F0FD00C2862 -:10CFE00003D146A150480EF0B6F8039814225043DE -:10CFF0004019059981740499009888740EE00C28F2 -:10D0000003D13EA149480EF0A6F8039814225043DC -:10D0100040190599817404990C208874012011B07D -:10D02000F0BD70B50D46424A441900210B46101A56 -:10D030008B4103D231A13F480EF08DF83E48854226 -:10D0400003DD2EA13D480EF086F83D48854203DA07 -:10D050002AA13C480EF07FF83B48844205DA002CB8 -:10D0600001DB204670BD384800E03848201870BD0C -:10D07000401E70B5C0B21421484324494418607B57 -:10D08000062813D201007944097949188F44020C0B -:10D090000A080604002067E0B42010E073200EE0C8 -:10D0A00032200CE00A200AE0062008E0FF2013A14D -:10D0B000E0300EF050F8617B0020002954D00221AE -:10D0C0004018616840180002000AF5F70FFD0C25B2 -:10D0D0006557174A441900210B46101A8B4103D299 -:10D0E00006A114480EF037F81348854203DD03A16A -:10D0F00012480EF030F81248854229E07372635CE2 -:10D1000072656D2E630000007A000020541100202B -:10D11000FFFF3F00FFFFFF00130700003811002052 -:10D1200007020000C5030000DD030000E303000068 -:10D13000FF7F841EF50300000020A107F603000016 -:10D1400000E05EF8F70300000080841E00807BE1B1 -:10D1500003DAF749F7480DF0FEFFF748844207DA93 -:10D16000002C03DB204670BD0421A9E7F24800E053 -:10D17000F248201870BDF0B5064683B0F048019023 -:10D18000457A029534687068001B0702ED483F0A33 -:10D19000001B00900C2D2DD0142029464143EA4855 -:10D1A0000122081884464168E64892058646081B15 -:10D1B000904210D3631A93420DD3024670467245D3 -:10D1C00003D900984018401C05E073450ED9411A58 -:10D1D0000819401C404200280CDA60460295857C04 -:10D1E0000198C0790028D5D003B0F0BDD049D74808 -:10D1F0000DF0B1FF0298854226D014214843D24950 -:10D200000123401802908068CE499B058C46011B83 -:10D210008646994210D3221A9A420DD3634661453D -:10D2200003D900997144491C06E0194662452DD97D -:10D23000091A0819401C4142002905DD0298B17AFB -:10D24000807B814200D374460C2D15D0BE4914203A -:10D25000454368184268121B1202120ABA420BD2E6 -:10D26000B37A827B934200D38468857C0198C0792D -:10D270000028B9D10C2DEAD13068A042B4D0E01911 -:10D280000002000A3460706003B0F0BDA849AF48E6 -:10D290000DF061FFD8E7F0B5AD490446486885B0A8 -:10D2A000C005C00D1CD0103840B200280CDA0207AF -:10D2B000120F083A920892005118C9698007C00EEF -:10D2C000C1400806800F09E08108A24A8900891838 -:10D2D00009688007C00EC1400806800F002808D0EA -:10D2E00000272078002806D0012804D0002005B0AF -:10D2F000F0BD0127F5E72079062813D20100794413 -:10D30000097949188F44020C0A080604002018E025 -:10D31000B42010E073200EE032200CE00A200AE076 -:10D32000062008E0FF208249E0300DF014FF21794B -:10D330000020002905D002214618814D002F02D07F -:10D3400003E00421F8E70020E871694602AAA0681A -:10D35000F5F7D6FB694608228A56E06801A98018CD -:10D360000122C01C1F2801DA019209E003AAF5F787 -:10D37000C7FB6846007B002802D00198401C019042 -:10D3800000990198401810300002000A0190881B93 -:10D390000002000A00906079694688720098039044 -:10D3A000F5F73DFB009A019B121A181A6A491202FE -:10D3B0000002120A000A8A4216D8884214D8684627 -:10D3C000FFF7D9FE00990398814205D08819000221 -:10D3D000000AF5F78BFBA0600120E979002986D0CF -:10D3E000002FB0D005B0F0BD0020F6E7F3B58FB048 -:10D3F0005A480C460B9004F0D8FE594A0F99504FEA -:10D400005618584D203E00280BD05748007D002864 -:10D4100003D056A158480DF09EFE207801287CD0FC -:10D420005AE1687B16280CD0687B297B401C884217 -:10D4300003D14EA151480DF08EFE2078012804D072 -:10D440000CE0287B0028F4D0F7E7F07F002803D019 -:10D4500046A14B480DF07FFE0120F077697B0F98C5 -:10D460001422484E5143891908742078022822D08A -:10D47000687B142148438619207930726079707274 -:10D4800032460C323146A068F5F73AFB0C20305694 -:10D490000F2804DD1F3830733068401C30600C21C9 -:10D4A0007156301DE26801905018C01C1F283EDAEA -:10D4B00001200199F7E026494868C005C00D21D038 -:10D4C000103840B200280CDA0207120F083A92080E -:10D4D00092005118C9698007C00EC1400806800F2C -:10D4E00009E081081B4A8900891809688007C00E75 -:10D4F000C1400806800F002804D105201BA10002AE -:10D500000DF029FE687B1421484386190021E0684C -:10D510006A460691117006A900E0D3E0F5F7F0FA2B -:10D520006A46002010560F282EDD01202DE0AEE0C7 -:10D53000FCD00000F70300000080841E00807BE127 -:10D540005C120020FFFFFF005411002013070000B1 -:10D5500000ED00E000E400E0FFFF3F006812002063 -:10D560003012002010110020201100207372635C23 -:10D5700072656D2E6300000011050000EF040000CD -:10D58000F4040000500F0020002006994018079076 -:10D590000220B0722079307260797072A068311DFB -:10D5A000C01C06911F2801DA012009E0F5F7A8FA4E -:10D5B00068460078002804D0069806990068401C48 -:10D5C0000860307A062813D2010079440979491895 -:10D5D0008F44020C0A08060400200FE0B4200DE07E -:10D5E00073200BE0322009E00A2007E0062005E066 -:10D5F000FF20FE49E0300DF0AEFD0020217900292A -:10D6000043D002214018069071681030081807991D -:10D61000089009180698081A0C900020F871F5F780 -:10D62000FEF904463060079820180002000AF060F6 -:10D63000787A0C2825D0797A14204143EC480818D0 -:10D6400040680899029040180002000A0390707A1E -:10D650006946887402A8FFF78EFD0299039A091B98 -:10D66000121B09021202E34B090A120A0C98994292 -:10D6700007D8824205D80299069808180002000AC5 -:10D680003060F8790028C8D110E00421BAE704AA74 -:10D690000199F5F735FA6846007C002804D0019816 -:10D6A00001990068401C08602078B072687B1628D9 -:10D6B00006D0687B401C68730B9804F08EFD47E031 -:10D6C0000020F8E7F07F002804D0A320CAA1C00002 -:10D6D0000DF041FD0120F077CA490F9808742078B9 -:10D6E000022803D1C4A1C8480DF035FDC54E2079EC -:10D6F00030726079707232460C323146A068F5F7AC -:10D70000FFF90C2030560F2804DD1F3830733068C5 -:10D71000401C30600C22B256301DE1680190881820 -:10D72000C01C1F2802DA012001990BE003AA01990D -:10D73000F5F7E6F96846007B002804D001980199C6 -:10D740000068401C08602078B072AE49012008755E -:10D75000687B297B884224D07C7A0C2C23D0F5F777 -:10D760005EF914214C43A24961180A7C042A18D09E -:10D770000A7C032A15D04B6889681B1A081A1B02F9 -:10D7800000029C4A1B0A000A102B0AD3114693423E -:10D7900007D8884205D8687B297B884201D0F5F7F5 -:10D7A0008AF911B0F0BD687B297B8842F7D111B0AE -:10D7B000F0BD10B50020F5F794F810BD10B50120AC -:10D7C000F5F78FF810BD914800787047F1B50098D3 -:10D7D00002281ED08E4C607A0C2803D186A18D4879 -:10D7E0000DF0B9FC0026A6710125E572607A0321CF -:10D7F00014227F4F5043C0190174F5F761F9009866 -:10D8000000280BD001282AD003287AD07AA1824898 -:10D8100045E07E480078F4F777FDF8BD7F48007F4B -:10D82000002804D02B2074A140010DF094FC6571F8 -:10D830007A4D00202E60F5F767F8A968481C04D0DF -:10D84000012300221846F5F795F8607A617A401CAA -:10D85000C0B2142251437A5801219047F8BD0120EB -:10D86000F5F752F8607900280DD06C488068401CAC -:10D8700009D0607A617A401CC0B2142251437A58B0 -:10D8800006219047F8BD6548007F01280AD002288C -:10D8900012D0032822D0042834D057A160480DF0BC -:10D8A0005AFCF8BD2079002803D02671F5F70DF950 -:10D8B000E5705A480677F8BD207A002802D1F4F7BF -:10D8C00083FD2572607A617A401CC0B214225143F4 -:10D8D0007A580021904751480677F8BD4F4F0123F1 -:10D8E000397B78680022411A1846F5F743F8207909 -:10D8F000002803D02671F5F7E8F8E57002203877A4 -:10D90000F8BD19E0454E217870680123411A0022C4 -:10D910001846F5F72FF8207A002802D1F4F754FDC5 -:10D920002572607A617A401CC0B2142251437A5841 -:10D93000002190473577F8BD607A617A401CC0B20B -:10D94000142251437A5805219047F8BD10B5304C48 -:10D95000607A0C2803D128A132480DF0FCFB607AD4 -:10D96000617A401CC0B214225143214A525804210A -:10D97000904710BDF0B583B00C200290F5F74FF83A -:10D98000234C0090617A284801900C2920D0617ABC -:10D990001420414316480918097C042918D0617ADB -:10D9A000142251430818007C032879D0019900986B -:10D9B0000B6849681B1A081A1B0200020D4A1B0A51 -:10D9C000000A102B6CD31146934269D8884267D85D -:10D9D00012488068401C03D007A114480DF0BBFB1F -:10D9E00000206071607A0C282AD121E0FCD0000070 -:10D9F00054110020FFFF3F007372635C72656D2E4F -:10DA000063000000201100201E05000078000020A7 -:10DA10005C12002054050000A70500003C12002005 -:10DA20009B050000AE0500004C120020EA05000036 -:10DA30006078002804D0FE48C17841708178017078 -:10DA4000607A0C2815D0607A1421FA4A484380186D -:10DA5000007C04280DD1607A0290607A01211423A1 -:10DA6000584380180174607A58438018807C607233 -:10DA7000A172F14D687B297BF04F884233D0F04E84 -:10DA8000287B142148438019007CC05D0128287B35 -:10DA900007D048438019007CC05D02282FD044E0A5 -:10DAA000FCE1142148438019807A01280AD0287BA0 -:10DAB0000221142250438019007CC155287B16286E -:10DAC00008D009E0287B0021142250438019007CF3 -:10DAD000C1552AE0002001E0287B401C2873687BA8 -:10DAE000297B8842CCD1D74D287D00284DD0287C79 -:10DAF000C15D012928D0C05D022830D03BE0287BE1 -:10DB0000142148438019807A012803D0CEA1D1483E -:10DB10000DF021FB297B00201422514389198872C2 -:10DB2000297B51438919097CC855287B1421484316 -:10DB30008219287B48438019017C0098FEF7F6FF84 -:10DB4000287B1628C8D1C5E7A97A012904D002216B -:10DB5000C155002028750EE00021C1550BE0A87AC0 -:10DB6000012804D0C520B8A1C0000DF0F4FA0020AF -:10DB7000A872297CC855287D002806D0297CB14A86 -:10DB80000098FEF7D3FF0020287502980C281ED0BD -:10DB900014214843A7494018017C012917D10721C6 -:10DBA0000174AD4D287E16283CD0287EE97D401CAE -:10DBB000884203D1A4A1A9480DF0CDFA297E02988C -:10DBC0006854287E162831D0287E401C2876607A3A -:10DBD0000C287DD0A07A00287BD00020A072617A2A -:10DBE0001420414393480E189D49B56873680A464E -:10DBF000F6687C32CB67966055609A4D697E002945 -:10DC000016D00226617A14228A4851430818407BB4 -:10DC100006281BD201007944097949188F440A1457 -:10DC200012100E0CE87D0028C4D0C7E70020CDE715 -:10DC30000426E7E700210FE0B4210DE073210BE09B -:10DC4000322109E00A2107E0062105E0FF2086498C -:10DC5000E0300DF080FA00212973687E022801D09F -:10DC6000012810D12869009A4018821A1202120A5B -:10DC7000422A08D93238032100026976000A286155 -:10DC80003220287308E0322906D2207A00280AD1EF -:10DC9000F4F79AFB012005E0207A002803D0F4F77E -:10DCA000BCFB00202072624910224878207009785D -:10DCB000012901D0032906D101212171297B884244 -:10DCC00001D9421A1032A378002B00D0921C01E037 -:10DCD0008DE09BE02179002901D1002B5DD0944695 -:10DCE000624A00990092019A176852687F1A511A85 -:10DCF0003F0209023F0A090ABC451BD85B4A97420A -:10DD000018D8009A914215D8297B884223D92B69CB -:10DD1000421A9A1A1202120A101880190002000AF6 -:10DD20002A616860002914D0032028770006000EBD -:10DD30003ED14CE000202071A070297B002925D025 -:10DD40002869401880190002000A686002202877BC -:10DD50002EE00120E9E781420BD92A69511889197F -:10DD60000902090A6960002801D00420DDE70220C9 -:10DD7000DBE7002B03D134A13D480DF0ECF9286915 -:10DD800080190002000A6860002004E029698919EE -:10DD90000902090A6960287719E0287B00280FD05A -:10DDA0002969081880190002000A68600220287793 -:10DDB00028690123811900221846F4F7DBFD09E0E8 -:10DDC000286980190002000A686000202877012075 -:10DDD000F4F79AFD607A1421484316490C22401842 -:10DDE0008256012300206968F4F7C4FD0EE001208B -:10DDF000F4F78AFD0020F4F787FDF4F76BFD207A35 -:10DE0000002803D0F4F709FB00202072A078002836 -:10DE100004D0F4F75AFE0020E070A070607800286B -:10DE200004D00348C178417081780170207921E0E5 -:10DE30007A00002054110020101100202F12002021 -:10DE4000500F0020201100207372635C72656D2EEC -:10DE5000630000000C060000381100203A060000A4 -:10DE6000D01100203C120020FCD00000FFFF3F003A -:10DE70008C060000002806D00020CF49E070097809 -:10DE8000002900D12071CD48017EC07D814203D0A0 -:10DE9000CB484078F4F738FA0120E07103B0F0BDC8 -:10DEA000F0B5C84C0746607A83B00C2803D1C6A1F0 -:10DEB000C8480DF050F9607A1421C74E48438019C4 -:10DEC000007C032804D06F20BFA100010DF043F9AE -:10DED000C24DA868401C03D0BBA1C1480DF03BF95E -:10DEE000607A1421484381190C20085600216A46A3 -:10DEF00000911171C01901AA6946F4F701FE6A4642 -:10DF0000042010560F2801DD012000E000200099B8 -:10DF10004018696840180102090AA9606079002860 -:10DF200004D0012300221846F4F724FD03B0F0BD0D -:10DF300070B5AD4CAB4A0B1AA34214D3451AA54297 -:10DF400011D3934203D9101A43185B1C0BE095427E -:10DF500004D9511A0818401C434204E0A349A448BC -:10DF60000DF0F9F80023184670BD10B501460123E5 -:10DF700000220220F4F7FEFC10BD10B50220F4F7D9 -:10DF8000C3FC10BD10B5F4F74AFD10BDF0B58D4DC2 -:10DF90000446E87A83B0002803D18BA195480DF0A0 -:10DFA000DAF8642C4DD3944900200246091B8241C3 -:10DFB00047D39248417B007B814242D19048007D0B -:10DFC00000283ED1687A1421834F4843834EC519F7 -:10DFD000306801AA00196946F4F792FD69460420E9 -:10DFE0000856002802DD0098401C0090A96800989F -:10DFF0006B680A18D21A1202824B120A9A4220D86F -:10E00000AA7C0C2A08D014235A43D2195268511AF8 -:10E010000902090A814214D3B068401C05D00120CE -:10E02000F4F772FC0020C043B06030680019306023 -:10E03000A868009940180002000A7061012003B02E -:10E04000F0BD002003B0F0BDF8B50646401EC5B2D5 -:10E050001420614968434418207C002803D15AA148 -:10E0600069480DF078F86548017B407B81420CD00F -:10E07000664A14234B439B181B7CB3420CD01629D1 -:10E080000CD0491CC9B28142F3D15D48017D002901 -:10E0900064D0007CB04261D10020F8BD0021F1E7DE -:10E0A000217C052905D0217C062902D0217C072965 -:10E0B00028D101212174C17D0023027E8A4221D012 -:10E0C0000246565CAE4201D1012301E0002B04D090 -:10E0D000162911D04E1C965D565416290ED0491C97 -:10E0E000167EC9B28E42ECD1002B0BD0117E0029D6 -:10E0F00006D0117E491E04E00026ECE70021EFE780 -:10E1000016211176617C00292AD06774C17D002315 -:10E11000027E8A4224D0425CAA4201D1012301E05E -:10E12000002B04D0162912D04A1C825C42541629B6 -:10E130000FD0491C027EC9B28A42ECD1002B0FD00D -:10E14000027E0146002A06D00A7E521E04E000220A -:10E15000EBE70021EEE716220A7601E017480027D8 -:10E16000217C01299CD1617C002999D10120F8BD35 -:10E1700070B505461420184A0521684380180174BB -:10E180000E4C207E162811D0207EE17D401C884256 -:10E1900003D116491E480CF0DEFF207E2554207E58 -:10E1A000162807D0207E401C207670BDE07D002818 -:10E1B000EFD0F2E70020F7E77A00002038110020C6 -:10E1C000780000205C1200207372635C72656D2E13 -:10E1D00063000000EF060000541100203C120020F4 -:10E1E000F1060000FF7F841E0020A107FCD0000084 -:10E1F0001307000032070000FF1FA10710110020C5 -:10E2000020110020FFFF3F006F070000500F00208B -:10E210000702000010B509F063FC042803D009F0E0 -:10E220005FFC052803D106F0D1FE00280BD104F0D5 -:10E2300007F9032803D004F009F9032805D109F0F0 -:10E24000B0FD002801D0012010BD002010BDF0B5A8 -:10E2500085B00746002668460D4606726946384670 -:10E2600005F05CFA00287DD16846007800280BD0C4 -:10E2700009F009FDB84275D00022294638460AF057 -:10E28000CCFE00283ED120E006F077FCB842F2D068 -:10E2900000222946384608F01DF900287DD1019C4E -:10E2A0009020005D2834002804D1607E002801D031 -:10E2B000012000E000200490204660300390807828 -:10E2C00006F08AFB002804D008E0019C2834607E18 -:10E2D000F1E7FF20FDA1DA300CF03DFF20462030B1 -:10E2E000417B00290FD0817B89070CD56E700121FD -:10E2F0002970AE70AF80C17BA971218E2981618E9A -:10E300006981467349E0039802A9807806F030FAE3 -:10E31000002804D1FF20EDA1EE300CF01CFF684670 -:10E32000007A002809D06E700D202870AF806846F2 -:10E33000007AE8800120A8702FE0049800282FD0F0 -:10E3400006F0B5FB00282BD068460078002806D1DF -:10E3500001988030406A4188B94200D10670039824 -:10E36000807800E01CE006F0CAF8002803D1D7A1AD -:10E37000DA480CF0F0FE6E700A202870AE70AF80A4 -:10E38000A07EA8716676684605F07EFA002804D063 -:10E39000D248CEA10E300CF0DEFE012005B0F0BD5B -:10E3A0000020FBE77CB5CEA103C9CF4D002401912D -:10E3B0000090AC7001F067FD2946EC7004204039F4 -:10E3C000088710204887C81DC84AF9304280047168 -:10E3D000C280E03844740C7084730475C0300477D4 -:10E3E0001D300522694604460CF02BFD28462146C7 -:10E3F000BC3008F0F7F97CBDF8B5BD4C0D46606047 -:10E40000217006F057F805F0D1F8FFF7CBFF207820 -:10E4100009F03AF9B4498431084681380F46064676 -:10E4200006F08CFC606808F0D8F8284604F06EFC12 -:10E430003946304609F057FC60680AF08AFE01F060 -:10E4400022FDA9480021C170F8BDFEB50E461D464B -:10E45000144601A905F062F9002839D102988030EC -:10E46000807A06F079F800280CD0684606F087F824 -:10E47000002806D0002C03D006F01DF8A04206D2DA -:10E480000020FEBD91A19B480CF065FEF8E70098C6 -:10E4900005F0AAFB3146009805F0ABFBE2B2294635 -:10E4A000009805F063FD06F08FF8002804D191482C -:10E4B00086A11E300CF04FFE68460079012807D176 -:10E4C00001A801F0E7FC8A48002180688030418281 -:10E4D0000120FEBD30B40179002904D0012907D004 -:10E4E00030BC00207047831D42880488022103E06D -:10E4F00042880488831D0121204630BCA5E7FFB572 -:10E50000794C85B00E460746C0346088694608805D -:10E51000154602A905F002F9002811D0002168462D -:10E5200005F059F9002823D1684602A9008805F0B2 -:10E53000F5F8002804D06F4864A13C300CF00BFEC5 -:10E5400068460088388068460088608066480021F8 -:10E55000C23005F040F9002802D00020C04360809E -:10E5600003988030807A06F037FA002803D007E05D -:10E57000002009B0F0BD5F4854A156300CF0EBFD0F -:10E5800004A806F03CFA0028F3D0049805F068FBD4 -:10E590003070022807D0012805D056484BA17230B0 -:10E5A0000CF0D9FDE4E70899049805F0F6FC288002 -:10E5B000002804D14F4845A165300CF0CCFD06F091 -:10E5C00045FA002804D1E92040A180000CF0C3FDE9 -:10E5D0000120CEE73EB50446831D02AA694601A884 -:10E5E000FFF78DFF002813D068468088208068469A -:10E5F000008960800020607168460078012808D09A -:10E60000022806D03B4831A192380CF0A4FD01202D -:10E610003EBD2071FBE7FEB5040004D135482BA1B7 -:10E620007E380CF098FD304D0026203D687C002897 -:10E6300008D0667010202070A87CA070E87CE07084 -:10E640006E7430E0284F403F3878002808D02C22E4 -:10E65000B91C20460CF0F5FB0E2020703E7022E025 -:10E66000A87B002809D00120E070E87BA070287CFE -:10E6700060700F202070AE7315E01B480221C63079 -:10E68000029005F0A8F8002871D1174FC037F8881C -:10E690000190F888042808D0052831D02146FFF7DA -:10E6A000D6FD002859D00120FEBD0021204606F0ED -:10E6B00019FA0028F7D1287D00284ED06670132063 -:10E6C00020701C21A01C0CF019FC15E07372635C17 -:10E6D0006C6C5F6374726C2E630000000D020000AE -:10E6E000FFFFFFFF1F000000AC120020FFFF000033 -:10E6F00080000020390300000220A0702E75D2E7B0 -:10E700000021204609F098FA002826D02078132806 -:10E71000C9D1A0783C28C6D1A088694604F07CFF06 -:10E72000002803D0FD49FE480CF015FD009880300C -:10E73000807A05F0E4FE002804D1F948F749001D6D -:10E740000CF009FD009804F09FFF0028ABD0F448BE -:10E75000F24908300CF0FFFCA5E70221029805F011 -:10E760003AF8002803D1F9880198814291D100201C -:10E77000FEBD50E710B508F011FF002804D0E848AE -:10E78000E649BE300CF0E7FC07F01FFF06F09AFAEE -:10E7900004F07AFA002804D07920E049C0000CF097 -:10E7A000DAFC0AF0CEFC002804D03D20DB49000151 -:10E7B0000CF0D1FC09F070FA002804D0F520D749FC -:10E7C00080000CF0C8FCFFF7EDFD04F0ABFE002864 -:10E7D00004D0F720D14980000CF0BDFC05F01CFEF0 -:10E7E00001F051FBCF480021C17040380171012177 -:10E7F00041710222C270017010BD10B5C94C403C7D -:10E800002078002804D00A210E2001F002FB10BD60 -:10E81000FFF700FD002801D00C2002E001F033FBDF -:10E8200000202071012060710A21E170207010BD6C -:10E8300070B5BC4C0646403C2078002804D03A21F4 -:10E840000E2001F0E6FA70BDFFF7E4FC002801D0CD -:10E850000C2010E0B34DE87808280BD20001001915 -:10E8600010223146443001F0DEFAE878401CE870AE -:10E87000002000E007202071012060713A21E17042 -:10E88000207070BD70B5A74C0646403C207800282B -:10E8900004D00B210E2001F0BCFA70BD30780028A6 -:10E8A00003D0012801D0122015E09E4D8035287933 -:10E8B000082817D2FFF7AEFC002801D00C200AE090 -:10E8C000984833782979721C883001F098FB2879B0 -:10E8D000401C287100202071012060710B21E17023 -:10E8E000207070BD0720F6E710B58E4C403C2078B4 -:10E8F000002804D039210E2001F08BFA10BDFFF75B -:10E9000089FC002801D00C2002E086490020C87054 -:10E910002071012060713921E170207010BD8148A3 -:10E9200010B540380178002904D00F210E2001F0E5 -:10E9300070FA10BD002101710E2181700F21C1708C -:10E94000FF2181710021C9430181774949680A7813 -:10E9500082728A8882814988C18101214171017056 -:10E9600010BD704910B540390A78002A04D03C2106 -:10E970000E2001F04EFA10BD6A4A0088C032508065 -:10E980000120107100220A7148713C22CA7008707F -:10E9900010BD10B5634C403C2078002804D02B21DA -:10E9A0000E2001F036FA10BD0821A01DFDF7BCFBBA -:10E9B00000202071012060712B21E170207010BDBA -:10E9C00010B5584C403C2078002804D005210E207A -:10E9D00001F01FFA10BD05F06EFDE08005F0C6FEE7 -:10E9E000207200202071012060710521E1702070EB -:10E9F00010BD10B54B4C403C2178002904D031218A -:10EA00000E2001F006FA10BD00214156042911D054 -:10EA100000290FD0081D0DD0001D0BD0001D09D0FE -:10EA2000001D07D0001D05D00A3003D00A3001D0E8 -:10EA3000122003E0084601F033FB00202071312052 -:10EA4000E07001206071207010BD30B5354D044676 -:10EA5000403D28788DB0002805D02A210E2001F0F5 -:10EA6000D8F90DB030BD10222146684601F0DBF91F -:10EA70001022A11804A801F0D6F9684603F00BFC97 -:10EA800010222C46A81D08A901F0CDF90020207104 -:10EA90000E20A0702A20E070012060712070E0E755 -:10EAA000F0B5204C85B0403C2078002804D03B21B4 -:10EAB0000E2001F0AEF971E40020A07119486946FA -:10EAC000C0304088888002A904F028FE002805D0C4 -:10EAD000002101A804F07FFE002865D16846114D91 -:10EAE00081880180283D684602A9008804F016FE4E -:10EAF000002803D009490D480CF02DFB039E04A902 -:10EB000037468837B878283605F04BFE002804D100 -:10EB100006480249401D0CF01EFB09E0CCE600004F -:10EB2000FF020000AC12002080000020140500004D -:10EB3000767EB87805F050FF002803D1FB49FC48E9 -:10EB40000CF009FB05F0B3FF0121484031460143B9 -:10EB50001FD06A461188A279FD2352001219118133 -:10EB6000A2794000515D4908490031435155A279CD -:10EB70001940014351556A46107C002802D00420F8 -:10EB8000014301E0FB200140A0794155A079401CE0 -:10EB9000A0710021684604F01EFE002804D16846DA -:10EBA0000188808881429ED10020207101206071FF -:10EBB0003B21E17020707EE770B5DE4C0546207881 -:10EBC000002804D034210E2001F023F970BD08F094 -:10EBD00087FF052804D0284608F03FFD002000E00C -:10EBE0000C202071012060713421E170207070BD13 -:10EBF00010B5D04C2078002804D00E21084601F032 -:10EC000008F910BD0622CC49A01D0CF01AF900200D -:10EC10002071012060710E21E170207010BD70B56F -:10EC2000C44C06462078251D002804D032210E2031 -:10EC300001F0EFF870BD3146002009F032F928707C -:10EC400000280CD100213246084606F080F92870D1 -:10EC5000002804D106223146B7480CF0F2F8012012 -:10EC600060713221E170207070BD70B5B14C054605 -:10EC70002078002804D030210E2001F0CAF870BDA1 -:10EC800008F073FD002803D104F0DEFA00280DD04F -:10EC9000287804F08AF8287806F0C0F9002020715E -:10ECA000012060713021E170207070BD0C20F6E70A -:10ECB000F8B5A04C06462078251D002804D0172161 -:10ECC0000E2001F0A6F8F8BD3146012009F0E9F860 -:10ECD0000127287000280FD13246012106F037F9AC -:10ECE0002870002808D19348062231463C300CF0A9 -:10ECF000A8F890484030877067711720E07027703F -:10ED0000F8BDFEB58B4C05462034A07B002804D00E -:10ED100028210F2001F07DF8FEBDA8781A2824D004 -:10ED20000EDC03000CF038FB16333333333321335E -:10ED300033333333333333333333333321212133D9 -:10ED40002A2824D00ADC1E3803000CF025FB0C20F6 -:10ED5000202020202020202020200E203A380300D0 -:10ED60000CF01AFB04150315031528887349884213 -:10ED70000DD81F21E173282121740120A073288858 -:10ED8000694604F0CBFC002803D0022014E01220D6 -:10ED900012E068460078019F00280FD0C637019E18 -:10EDA00000280DD0C736684601F05CF8002802D074 -:10EDB0003878002806D00C20E073FEBD9C37EEE7C3 -:10EDC0009D36F0E701203870A87830700020E0739D -:10EDD000684601F05FF8FEBDF0B5564C0746207856 -:10EDE00085B0002804D025210E2001F012F862E63B -:10EDF000388802A904F092FC4E4E00210836002803 -:10EE00000CD00220207131603171E1800E20A070A1 -:10EE10002520E0700120607120704CE6039D28469B -:10EE20000A30483501900020A87505223046019926 -:10EE30000CF007F8A87D0028F5D13888E080E5E7D8 -:10EE4000FEB53C4C06462034A07B002804D010219F -:10EE50000F2000F0DEFFFEBD1F20E07310202074A5 -:10EE60000127A7733088694604F058FC002810D1A8 -:10EE7000684600F0F7FF00280BD06846019D007837 -:10EE800028350028019806D0CA300178002909D118 -:10EE900004E0022007E08030406AF6E72035697B15 -:10EEA000002902D03A20E073FEBDA97B89070DD16D -:10EEB0000621017068460078002804D10198318845 -:10EEC0008030406A4180684600F0E4FF0020E07333 -:10EED0006F73FEBD70B5174D04462878002804D026 -:10EEE00038210E2000F095FF70BD1F2028710120F1 -:10EEF00068713821E97028702078002808D001282E -:10EF000006D0022804D0032802D01220287170BD38 -:10EF1000002606F051F8207807F061FC207808F010 -:10EF2000E6FF20780AF0ABFA2E7170BDCCE6000047 -:10EF30001F0500006C1200208C000020FF0E000056 -:10EF4000F8B5FE4D06462878002804D01D210E2075 -:10EF500000F05FFFF8BD1F202871012068711D219E -:10EF6000E970287008F0BCFD0C27042857D005284C -:10EF700055D0B0791224012801D000281DD1307855 -:10EF8000002801D0012818D1F079002801D00128EB -:10EF900013D17088EA49021F30248A420DD2B28808 -:10EFA000121F8A4209D22887B0886887B079002466 -:10EFB000012804D000280CD016E02C71F8BDDF48E1 -:10EFC0004030807800282AD0DC4A3C3201210846B3 -:10EFD00002E0DC4A0021012005F0B9FF040003D063 -:10EFE000D949DA480CF0B7F8F079012801D00028A7 -:10EFF00002D105F0C8FF0446002C01D01F2011E00B -:10F000003078012802D0002803D00AE00021022035 -:10F0100001E00021012005F0C6FF002801D02F717A -:10F02000F8BD00202871F8BD70B5C44C21780029C6 -:10F0300004D01E210E2000F0ECFE76E71F21217186 -:10F04000012161711E22E270217002781221012AD1 -:10F0500001D0002A04D14078002803D0012801D033 -:10F06000217162E700260C25012A09D008F038FD3D -:10F07000052803D008F042FA002806D0257154E78D -:10F08000618F208F08F083FBF6E726714DE7F0B51E -:10F09000AD490446143103C987B0A84D0591203508 -:10F0A0000490A87B002805D021210F2000F0B1FE9C -:10F0B00007B0F0BD1F20E873212028740126AE732D -:10F0C00022889F4B111F3020994243D261880F1F25 -:10F0D0009F42FAD291423DD8E2899D4B911F9942BD -:10F0E000F3D2218A8F1F9F42EFD28A42F3D8628ADD -:10F0F000FF23F4339A42EED8A28A954F13460A3B77 -:10F100003F1FBB42E1D2C9088A4223D9E18A228B40 -:10F110009142E0D821791220002902D0012919D189 -:10F1200002E061790029F9D1217B002901D0012970 -:10F13000F5D108F0D5FC05280BD008F0D1FC042847 -:10F1400007D0287D002804D105F017FD81498842A9 -:10F1500001D00C20BDE0684604F0AEFA002801D0D2 -:10F160000920B6E001220321009804F0E6FF009F89 -:10F17000042178880F3703903846FCF7D5FF3846CE -:10F18000039905F0C2F874A0009F0068069003215F -:10F1900006A81337FCF751FF002006A90A5C3A5471 -:10F1A000401CC0B20328F9D30098218A8180618A6B -:10F1B000C180A18A01810146002720318F73CF735E -:10F1C0006179002902D0012903D101E0C77600E06E -:10F1D000C6760622A11D1C300BF033FE00980522D6 -:10F1E00004A90A300BF02DFE0098A0300673694682 -:10F1F0000F71012101A8FCF720FF6946087941073A -:10F20000C206490F920F80068918C00F0818694678 -:10F210000871401D009B0928987601D20830987625 -:10F2200001220021184604F088FF00988A3005F07A -:10F2300044F9002804D145484349FC300BF08BFFCA -:10F24000207B002806D0012808D03F4943480BF016 -:10F2500082FF40E000213B4A012008E0374840306F -:10F26000807800280FD0354A01213C32084605F04D -:10F270006EFE00282FD000988030807A05F03FF98C -:10F28000002816D01AE000988030807A05F037F90F -:10F29000002804D131482C490D380BF05CFF009850 -:10F2A00004F0DAFA002800D153E72C48264909383F -:10F2B00041E02A482449C01D0BF04DFF009804F09E -:10F2C000CBFA002804D025481F490B300BF043FF30 -:10F2D0001F20E873ECE62079012801D0002803D133 -:10F2E00005F051FE00280CD10320009905F05BFECB -:10F2F000002806D162882188009808F0F5F90028D6 -:10F3000007D000988030807A05F0F9F8002805D001 -:10F3100009E00098A0300770EF73C9E60F480A496A -:10F3200031300BF018FF009804F096FA0028BBD09B -:10F330000A48054935300BF00EFF0AE76C12002031 -:10F34000FD3F00008C000020CCE600000607000016 -:10F350007B0C0000FFFF0000112233001C0800009E -:10F3600038B5F94C2078002804D022210E2000F076 -:10F3700050FD38BD1F202071012565712220E070ED -:10F38000257008F0ADFB052802D00C20207138BD97 -:10F3900000202071684608F059FA0028F7D100983B -:10F3A0008030807A05F0ABF8002803D1E749E848BF -:10F3B0000BF0D1FE009804F04FFA002804D0E44886 -:10F3C000E249001D0BF0C7FEDF4820300575E1481B -:10F3D0000078F2F799FF38BDF8B5DB4D04462035CB -:10F3E000A87B002804D023210F2000F012FDF8BDD7 -:10F3F0001F20E873232028740120A8736288D64B4D -:10F40000911F302099424CD2A1888E1F9E4248D233 -:10F410008A4246D8E288FF23F4339A4241D82289AF -:10F42000CD4E13460A3B361FB3423AD2C9088A4230 -:10F4300037D96189A289914233D80026208869464C -:10F4400004F05EF9022700280BD1009800F0F8FCC8 -:10F45000002806D000988030416A0A78002A06D138 -:10F4600001E0EF73F8BD826B1278002A01D03A20D8 -:10F4700017E005228A71416A0E81426AA188518192 -:10F48000426AE1889181426A2189D181406A018979 -:10F490004289914204D88179082901D8914202D346 -:10F4A0001220E873F8BD2188418000988030406ABE -:10F4B0000770EE73F8BDFEB5A34C06462078002811 -:10F4C00004D024210E2000F0A4FCFEBD01256571AE -:10F4D0002420E0702570304604F039FF002801D068 -:10F4E000002000E0122020710028EED1964F052266 -:10F4F000E03738463D7731461D300BF0A2FC002640 -:10F500003E77701E69460880684604F031F900288D -:10F5100019D168460788684601A9008804F0F0F808 -:10F52000002804D08A4889498F300BF014FE0198D6 -:10F53000A0300573684604F01BF9002803D1684623 -:10F5400000888742E7D12671FEBD38B57E4C05465E -:10F550002034A07B002804D026210F2000F059FC85 -:10F5600038BD1F20E073262020740120A073288856 -:10F57000694604F0C5F800280BD1009800F060FC43 -:10F58000002806D000988030416A0A78002A06D107 -:10F5900001E002200DE0806B0078002801D03A20C5 -:10F5A00007E007200870009829888030406A418071 -:10F5B0000020E07338BD10B5634C2078002804D0DB -:10F5C00006210E2000F025FC10BD002020710E2029 -:10F5D000A0700620E0700821A01D0BF08FFCA1791F -:10F5E00001200143A1716071207010BD38B5564CE7 -:10F5F00005462034A07B002804D02C210F2000F0E9 -:10F6000008FC38BD1F20E0732C2020740120A0735B -:10F610002888694604F074F800280CD1009800F09E -:10F620000FFC002807D00098014680314B6A1A78F9 -:10F63000002A06D101E0022025E0896B0978002923 -:10F6400001D03A201FE04030007F00281DD0082262 -:10F65000A91C181D0BF0F5FB00986A898030416ADF -:10F660008A81406A294610220C310E300BF0E9FBEA -:10F67000009803218030406A01700098298880300A -:10F68000406A41800020E07338BD0C20FBE770B574 -:10F690002D4E044630780C25002804D018210E2069 -:10F6A00000F0B7FB41E402F0CBFE032865D002F086 -:10F6B000CDFE032861D06079002801D001282DD12A -:10F6C000A079002801D0012828D1A07B002805D0EE -:10F6D000012803D0022801D003281FD1607B002815 -:10F6E0001CD0C0081AD1628801208003824202D84F -:10F6F0002188814203D9207901280FD119E020798E -:10F70000002806D0012814D0022805D0032805D1EE -:10F7100002E0202A0BD30CE0A0290AD22079042889 -:10F7200005D12088202802D36188884201D912257A -:10F7300023E00548217920308175607900280DD0BB -:10F7400001280FD019E000006C120020CCE6000068 -:10F750007F080000800000207B0C0000FA4A002196 -:10F76000204607E0F9488078002806D0F74A0121B2 -:10F77000121F204608F01BFB0546012035717071F1 -:10F780001821F170307058E410B5F04C403C2178ED -:10F79000002904D01A210E2000F03BFB10BD017897 -:10F7A0001F2902D91220207106E000212171027860 -:10F7B000411C104608F09EFB012060711A21E17087 -:10F7C000207010BD10B5E14C403C2178002904D0D8 -:10F7D00020210E2000F01DFB10BD01781F2902D949 -:10F7E0001220207106E0002121710278411C104690 -:10F7F00008F06FFB012060712021E170207010BDC6 -:10F80000F8B5D24C403C2178002904D01B210E20B1 -:10F8100000F0FFFAF8BD012666710C212171007815 -:10F820000025012804D000285CD01220207188E037 -:10F8300002F006FE002835D102F008FE002831D182 -:10F8400008F021FAC24988422CD108F07AFA00283F -:10F8500077D0684603F0C6FEBB4A00990C3A916027 -:10F86000002803D0BB49BC480BF075FC01220321E2 -:10F87000009804F008FC009808F0CDFB00988A304E -:10F8800004F01BFE002804D1B348B24908300BF045 -:10F8900062FC009803F08CFA002851D0AE48AD49C4 -:10F8A0000C301CE002F0CCFD02284AD102F0CEFD63 -:10F8B000002846D1A5482038807D002841D0012865 -:10F8C0003FD004283DD008F03CFA002839D0002071 -:10F8D00003F06EFA002833D09F489E4924300BF085 -:10F8E0003AFC2DE002F0ACFD032804D002F0AEFD9E -:10F8F000032820D025E002F0A6FD0090002003F0B0 -:10F900004FF900281DD1257100988030807A04F0CD -:10F91000F6FD002804D190488E493E300BF01BFCC8 -:10F92000009803F0B1FE00280BD08B488949423083 -:10F930000BF011FC05E0002003F032F9002800D1A3 -:10F9400025711B20E0702670F8BD38B57F4C054648 -:10F95000403C2078002804D02D210E2000F059FAD8 -:10F9600038BD2888694603F057FE002801D00220E0 -:10F970000FE00098CA21095C002909D13321095CF4 -:10F980000F2901D0102903D1FC21095C00290BD0DB -:10F990000C2020710E20A0702D20E0702888E080BF -:10F9A00001206071207038BD1022A91CD8300BF0E6 -:10F9B00048FA00980421C03081720020E9E738B588 -:10F9C000624C0546403C2078002804D02E210E20B1 -:10F9D00000F01FFA38BD2888694603F01DFE002894 -:10F9E00001D002200CE000980146C030827A002A43 -:10F9F00005D12031C97C0F290DD010290BD00C2046 -:10FA000020710E20A0702E20E0702888E080012058 -:10FA10006071207038BD052181720020F0E77CB54F -:10FA20004A4C0546403C2078002804D037210E205F -:10FA300000F0EFF97CBD2888694603F06FFE0028CE -:10FA400007D002202071012060713721E170207001 -:10FA50007CBD01987F22014628300272427200224A -:10FA60008272A87822318870E878C8702879087185 -:10FA70002271E8E71CB5354C403C2178002904D0C0 -:10FA800013210E2000F0C5F91CBD0088694603F063 -:10FA900045FE002801D0022006E001982421095CDF -:10FAA000801C012902D00C20207107E0002201995E -:10FAB00022712831097A21720088E080012060716A -:10FAC0001321E1700E21A17020701CBDF8B51F4CF0 -:10FAD0000546403C2078002804D035210E2000F057 -:10FAE00098F9F8BDA878002801D0012804D1A88889 -:10FAF000FF21F531884201D91220207128886946FA -:10FB000003F08AFD0126002806D0022020716671CC -:10FB10003520E0702670F8BD009800270246C030FE -:10FB20000770AB8801464380104680300677AA787C -:10FB3000012A00D000220A70407F002801D003F083 -:10FB400027FA2771E3E700008C000020AC120020A8 -:10FB5000FFFF0000CCE600002D0A0000F8B5D44EEF -:10FB600004463078002804D03D210E2000F051F9E1 -:10FB7000F8BD2088694603F04FFD002801D002201F -:10FB800027E0009F6488FD883A896800B988401C96 -:10FB9000844217D3C7484143800050430BF0BAF961 -:10FBA000401EFF2180B2F531884200D908468442C8 -:10FBB00000D22046691C401C0BF0ACF96D1C684358 -:10FBC000401E85B2E820C05D002800D17D84F5800C -:10FBD00000203071012070713D21F1703070F8BD4E -:10FBE00070B5B34C05462078002804D033210E2090 -:10FBF00000F00FF956E502F023FC002801D00C209C -:10FC000018E02978002911D00A290FD014290DD025 -:10FC10001E290BD0282909D0322907D04B2905D01D -:10FC2000642903D0FF2901D0122003E0284603F005 -:10FC30004BF900202071012060713321E1702070A8 -:10FC400030E570B59A4C05462078002804D03E2156 -:10FC50000E2000F0DEF825E502F0F2FB002803D1CB -:10FC600002F0F4FB002801D00C2003E0287808F013 -:10FC70004DF900202071012060713E21E17020705B -:10FC800010E510B5017801240B000BF085FB3FBF98 -:10FC9000BF21BFBF4C94BFBFBF2427BFBF464F612A -:10FCA000BFBF59BFBFBF2B97BF9B9FBF797DBFA36E -:10FCB0008185888C6590BF5DBF555275A7ABBF37F6 -:10FCC0002F33BB6DAFBF71423F3B4969B3B7C00033 -:10FCD000FEF750FD9BE0FEF790FD98E0801CFEF7DC -:10FCE000D1FD94E0801CFEF7E3FF90E0801CFEF75E -:10FCF00080FE8CE0801CFEF792FF88E0801CFEF7FF -:10FD0000B4FF84E0801CFEF793FD80E0FEF7ECFD7D -:10FD10007DE0801CFFF7DEF879E0FEF769FF76E012 -:10FD2000FEF7BEFE73E0FEF74BFE70E0FEF7F7FD58 -:10FD30006DE0FEF72EFE6AE0801CFEF786FE66E0B0 -:10FD4000801CFFF797FE62E0801CFEF7DAFF5EE0A2 -:10FD5000801CFFF775F85AE0801CFFF73DF856E06D -:10FD6000801CFEF7FEFD52E0801CFEF725FF4EE0F2 -:10FD7000801CFFF754FE4AE0801CFFF737FC46E08A -:10FD8000801CFFF7DDF842E0801CFFF74DF93EE0F4 -:10FD9000801CFFF77CF93AE0FFF7E2FA37E0801CBD -:10FDA000FFF71AFB33E0801CFFF785FB2FE0801C78 -:10FDB000FFF7CBFB2BE0FFF7FEFB28E0801CFFF7F3 -:10FDC00066FC24E0801CFFF7DFFC20E0801CFFF7CE -:10FDD00017FD1CE0801CFFF7F5FC18E0801CFFF706 -:10FDE000B4FD14E0801CFFF7EAFD10E0801CFFF773 -:10FDF0006DFE0CE0801CFFF7B1FE08E0801CFFF7F1 -:10FE000020FF04E0801CFFF7EBFE00E0002420460A -:10FE100010BD274A2032537C002B03D19074D1743B -:10FE200001205074704730B5134606E0CC18203CD2 -:10FE3000D51AE47F5B1E4455DBB2002BF6D130BDF2 -:10FE4000017800290CD14121095C002908D18030BA -:10FE5000017C002904D0007C042801D001207047D7 -:10FE60000020704701784068002903D001780029FC -:10FE700005D100E0E4E740304078002801D00020C0 -:10FE80007047012070470A4900208031886740315F -:10FE90000871704710B50178012908D14068803099 -:10FEA000417F002903D00021417703F071F810BD94 -:10FEB0006C120020C409000070B5FC4D00246C7069 -:10FEC0002C70AC616C72AC720120E872F84844701E -:10FED000C473AC62F7482C6302F05FF9002804D0C9 -:10FEE000FF20F5A14F300BF036F92C7770BDF8B537 -:10FEF000F54902250D60F5490026CE630127CF6341 -:10FF0000F349C96A09070DD4F24AD36AF2494B6230 -:10FF1000136B8B62536BCB62936B0B63D26BCB0512 -:10FF20001A434A63ED4C002823D0012825D0FF2036 -:10FF3000E1A1A2300BF00FF9E948A063FF200430E3 -:10FF40006063276303202061E64996204860D74913 -:10FF50001C2008560B22D243811A904237D011DC64 -:10FF60001C313AD00A2938D0142934D0182911D19B -:10FF70002FE0DD486061DD4802E0DD486061DD487A -:10FF8000A061D9E708301FD004281BD0082817D05B -:10FF90000C2812D0FF20D8A176300BF0DCF8DB491A -:10FFA000D9488860DB48DA494160DB490160DB48B9 -:10FFB0000560DB4910204860F8BD0420E060EEE7F2 -:10FFC000E660ECE7FC2000E0F820E060E7E7F420E2 -:10FFD000FBE7F020F9E7EC20F7E7D820F5E710B5CC -:10FFE0000C460146CF480BF0B2F9B048047210BD80 -:10FFF000AF4840787047AD4A517010707047F8B5FF -:020000040001F9 -:1000000004460D4650791179000208436900091928 -:100010000884501C01460E78012730464E7836027F -:1000200030438E78C9783604304309060843117886 -:1000300000020843A9006050284608303E4686402A -:10004000002B0CD0012B04D0FF209BA1E9300BF03A -:1000500082F8206B3043AF4038432063F8BD206BFB -:10006000B043F8E770B50D460446082904D9FF20CF -:1000700091A1FA300BF06FF80022002D0CD9AA489C -:100080009100635809180B6053001B191B8C0B62FD -:10009000521CD2B2AA42F3D3206BA449086070BDAF -:1000A00010B504460B22D2430C308C49944223D025 -:1000B00008DC1C3026D00A2824D0142820D0182888 -:1000C00009D11BE02046083014D0042810D008289D -:1000D0000BD00C2807D0FF2087A176300BF03BF81F -:1000E0007248047710BD042000E00020C860F7E7E4 -:1000F000FC20FBE7F820F9E7F420F7E7F020F5E72C -:10010000EC20F3E7D820F1E76948007B704773499A -:10011000C2784A6202461378184653781B02184385 -:100120009378D2781B041843120610430002C8616A -:100130007047252808D0262808D0272808D0410055 -:100140000A2807D8091D06E0022105E01A2103E06C -:10015000502101E0891DC9B2604A9160614948613E -:10016000704752498861704770B5002816D0022246 -:100170004E4C6F4BA27203201860644D6248686059 -:1001800000200126207500290AD001290FD002295C -:100190001DD049A167480AF0DEFF70BD0122E7E7E4 -:1001A0006548012A01D0466070BD066070BD3F48B9 -:1001B000012A006B05D001214905084320636960CD -:1001C00070BD0121090508432063696070BDA06905 -:1001D000002804D1492038A1C0000AF0BCFFA16961 -:1001E000A06A4018554988604A4855498160554978 -:1001F000C1600120216BC0030143216368602C486A -:10020000C67370BDF8B54A4801688F084449BF00FD -:100210004A68D206D60F10228A60002404603B4848 -:10022000394981600C2069460870474D2C6142496C -:10023000012008610BE000BF00BF00BF00BF00BF8E -:1002400000BF00BF00BF69460878401E08706846BE -:100250000078002802D028690028ECD06846007891 -:10026000002804D14D2024A1C0000AF074FF2C61A5 -:100270000E48012144728472C1722D480760002E1D -:1002800002D0274910204860F8BD01460A78104680 -:100290004A78120210438A78C9781204104309067A -:1002A000084300020D49000AC86370477413002018 -:1002B00094130020A81300207372635C68616C5F64 -:1002C0007263732E6300000080E100E0C01F0040F5 -:1002D00080000010C0000010001700400015004012 -:1002E0005B060000401500400601020025000302E5 -:1002F000050103001F0003027372635C68616C5F99 -:100300007263732E630000000040000400F501409A -:100310004080004080F501401011004080E200E084 -:1003200000130040761300200016004040160040E5 -:1003300000120040550200000010004040850040BF -:10034000488100401010004000110040FB4902208D -:100350000860FB4908607047FA490220086070474E -:10036000F9490870704710B5F84801F01EFF0028E1 -:1003700003D0F749F7480AF0EEFE10BD10B5F34878 -:1003800001F02BFF10BDF4494860704770B5F34C85 -:100390000546A06AA84203D3ED49F1480AF0DBFE06 -:1003A00001202073EF49002025614860EE48456038 -:1003B0000120216B800501432163EC49486070BD39 -:1003C000E64802210173C6210161E64A002151601D -:1003D000816AE54AC63151600121026B89050A43F1 -:1003E0000263E248416070470121E048890581606D -:1003F000DA48026B8A430021026301737047DC48CC -:1004000001214160C160D74900204860D649486059 -:10041000D24988627047D74940200862D6490A68A5 -:1004200002430A607047D44801684022914301604A -:10043000D049002008627047CF48016810229143DC -:100440000160CE49012088617047CD490020C86114 -:10045000C94801681022114301607047C849CA6940 -:10046000012A01D000207047C24A92685206520EFB -:10047000524202700020C8610120704770B50C0024 -:10048000054604D1D920B24980000AF064FEE00795 -:1004900005D0012C03D0AE49BA480AF05CFE002D0D -:1004A0000DD00221AD4801294172C472B24808D072 -:1004B00002290BD0A649B4480AF04DFE70BD0121B7 -:1004C000F0E7016804221143016070BD0168082251 -:1004D0001143016070BDF8B5A04C0025E27A910788 -:1004E00001D5410713D4D306A849002B05DA4B7B6D -:1004F000002B02D08B7B002B09D0130702D50B7881 -:10050000002B04D1520703D54978002900D10125D9 -:10051000677A002201239849002F1BD00226304021 -:10052000284348D0084601688E089949B6004D68AE -:10053000ED06ED0F10278F60002101608B4A954872 -:1005400090600C206A4610708D4F39618B490120F4 -:10055000086114E0854D8F48A86008688008800015 -:100560000860A272E372F8BD00BF00BF00BF00BF09 -:1005700000BF00BF00BF00BF1078401E1070107891 -:10058000002802D038690028EED01078002804D165 -:100590004D208149C0000AF0DEFD00203861607204 -:1005A000A0720120E07274480660002DDBD078480C -:1005B00010214160F8BD012F06D0022F0CD06449F4 -:1005C00076480AF0C8FDF8BD08680425A84308600D -:1005D0006272E372A372F8BD08680825A843086038 -:1005E0006272E372A672F8BD5C4908757047F8B58F -:1005F000664D5A49EC7B086B002C58D001245B4AAD -:10060000E4039460A04308635B480768604C1021D2 -:10061000A16000210160001490600C206A461070F7 -:10062000574C21615548012606610AE000BF00BF12 -:1006300000BF00BF00BF00BF00BF00BF1078401E5A -:1006400010701078002802D020690028EED01078B1 -:10065000002804D14D205049C0000AF07CFD002044 -:10066000E060206160606061A061434807603F49CD -:1006700000144860464910204860384CA07A012890 -:100680000FD0022810D0444945480AF064FD0020EC -:10069000E873207D022803D1424801688907FCD510 -:1006A000F8BD36480660F2E734484660EFE72F4A67 -:1006B000906000200863087B2A4E002802D07068F2 -:1006C000012809D000222E4C2069012806D00023E1 -:1006D000887A012804D006E00122F4E74023F7E7F6 -:1006E000E768012F04D000271F43012802D004E04F -:1006F0002027F9E76368012B05D000233B432A4FED -:10070000022802D007E01023F8E73968012902D156 -:10071000E168012904D000211943022802D007E032 -:100720000821F9E73B68002B02D1E368012B3DD09B -:1007300000230B4302283BD03EE0000080E100E0B4 -:1007400080E200E000E100E092000020A813002019 -:10075000B8020100A202000000150040741300203E -:10076000B3020000408100404085004000F5014098 -:100770000080004040150040001200400010004082 -:1007800000110040690300007E0300009413002064 -:100790000013004000400004F8020100CF030000F5 -:1007A0005E03000000E200E0001400400423C0E704 -:1007B000002A01D0022100E000211943022807D1BC -:1007C0006068012804D17068012801D0012700E089 -:1007D000002790480F4301680906090E02D061699D -:1007E000012900D00021297300680006000E02D004 -:1007F000A069012800D0002068738748006A00289B -:1008000003D000F0DCF9012800D00020A8730020FC -:10081000E060206160606061A06180494860804E56 -:100820008049307548683C4670620968B1620B4681 -:10083000B17A022909D17178002906D07A4A526822 -:1008400012780A40317891430ED000212970774FF9 -:10085000E10710D03978032908D0022906D002F028 -:10086000D1FC0121B06A20E00121EFE707F022F975 -:100870000121B06A27E0A0060ED53878032806D0FB -:10088000022804D00221184602F0CBFC0FE002211E -:10089000184607F010F90AE0A00708D538780328B1 -:1008A0000FD002280DD00021184602F0BAFC5E4895 -:1008B00041680622B01C09310AF096FA002805D0DA -:1008C0000DE00021184607F0F6F8F0E75648317AB7 -:1008D00040680078C009814201D1012000E0002079 -:1008E00068702046FFF7F7FD387800280DD0012802 -:1008F0001ED002282FD003284AD04D494D480AF077 -:100900002AFCB07A022856D075E0A00701D507F07E -:10091000C6FC200702D5012007F0FDFC600702D5C8 -:10092000002007F0F8FCA006EBD507F059FCE8E73B -:10093000A00701D508F0E8FF200702D5012008F044 -:100940004DFE600702D5002008F048FEA006D8D56D -:1009500008F098FDD5E7A007BF25002802DA2C4053 -:1009600004F022FF200703D52C40012004F05DFB9A -:10097000600703D52C40002004F057FBA00602D5E9 -:100980002C4004F061FE6006BBD504F04AFBB8E7DA -:10099000A00701D506F0F0F8200702D5012005F0E8 -:1009A000B1FF600702D5002005F0ACFFA006A8D576 -:1009B00005F01CFFA5E7307B00281CD0174900225A -:1009C0004A60022820D0012803D019491A480AF0A9 -:1009D000C2FBB16A3069884203D8154917480AF04A -:1009E000BAFB1048316941600120316B8005014339 -:1009F000316313494860307D012800D050E611482A -:100A000001688907FCD5F8BD3169B06A411805480D -:100A10004160E9E740160040401500404081004039 -:100A20007413002040850040001500409200002013 -:100A3000B8020100FD0400001205000013050000CB -:100A400000F5014000E200E02E48002101704170F5 -:100A5000704770B5064614460D460120F0F7A2FC1B -:100A600028490120284B08709E60DC601D6170BD24 -:100A7000F8B504460120F0F795FC224901200870E2 -:100A800021494C60214900264E600321204D090672 -:100A9000A960204F002C0AD0012C03D01EA14120B8 -:100AA0000AF059FB3E60032000066860F8BD38601C -:100AB00001200006F9E710B51248017800290ED090 -:100AC0000321134A0906916010494A680021002A4F -:100AD00003D0154A1268427000E041700170002096 -:100AE000F0F760FC10BD07480178002907D00748DF -:100AF0004068002802D00C480068C0B270474078B7 -:100B0000704700009300002000F5004000F1004015 -:100B100000F5014000F200407372635C68616C5F35 -:100B200063636D2E6300000000F400403B48002129 -:100B30000170417010218170704770B506461446EF -:100B40000D460220F0F72EFC01203449344A08708B -:100B5000E41E14619660556070BD10B50220F0F778 -:100B600021FC2E49012008702E48002101604160BF -:100B7000816001202C49C005486010BD10B5274890 -:100B80000178002917D00121274AC905916025491C -:100B90000B680022002B05D04B68002B02D089681F -:100BA000002902D04270102103E0012141701F4949 -:100BB0000968817002700020F0F7F4FB10BD17483F -:100BC0000178002912D01748016800290AD001686D -:100BD000002905D04168002902D08068002803D090 -:100BE000002070470220704701207047407870470E -:100BF0000A48017800290FD00A480168002905D069 -:100C00004168002902D08068002801D01020704778 -:100C100006480068C0B27047807870479500002091 -:100C200000F5004000F1004000F5014000F40040F4 -:100C3000FFB593B0044600201D9E049015981C9D9E -:100C40001027082806D0E06901F014F8002809D020 -:100C50003770CCE028880921384328801F98022764 -:100C6000017016E0E169012088710521E269C9027D -:100C70009180E1698872E169F9480881E1690020A1 -:100C80008873288820210843288011211F98042771 -:100C900001701F980225801C0390307810900A2064 -:100CA0003070204618301190F5F7A1FC00206FE05D -:100CB0001598102809D1022D07D06846828A049918 -:100CC0000398401A8270110AC1706846C08A16994A -:100CD000884203D9E349097A149106E0884204D195 -:100CE0001099002901D0317021E003990870000AA1 -:100CF00048701E980088401BC01B83B2FF20C01B99 -:100D0000984200D203460398149AC0190CA9009285 -:100D1000019002912020015D6846C08A0022F5F70B -:100D2000DBFC3070002806D0C0B2832862D0684651 -:100D3000C08A208345E00F98002805D0C948006884 -:100D400000790A2830D33CE06846008EC119C9B248 -:100D50000491022D0FD01F99049A4978914203D132 -:100D60006A46128C824209D0BE480491006801781C -:100D7000032909D027E008461F994870B948006840 -:100D80000178042906D008E000790A281BD2012046 -:100D90000F9009E06946C98A818003990498081870 -:100DA00003900498281885B205AA14991198F5F7AC -:100DB00021FC002805D11E980088401BB84200DBAA -:100DC00076E7022D0ED01598102807D1049A0399C2 -:100DD0006846808A891A8870000AC8701E98058043 -:100DE000002030709F4800680078032802D000205F -:100DF00017B0F0BD0220FBE7F8B50446406B0026B3 -:100E0000134600282BD0491F8DB2618F2A46083225 -:100E1000278F8A18BA4221D89A7840185F78110231 -:100E200039430170090A41701A79DF781102394398 -:100E30008170090AC1700571290A41712A46591D3C -:100E4000801D09F0FEFF608FAD1D401980B26087E4 -:100E5000626B002110180170417000E009263046D5 -:100E6000F8BD30B50B88048F9C4212D9446BE01852 -:100E70004478057824022C430BD044790579240268 -:100E80002C436404640CA41D1B190B80106000200B -:100E900030BD822030BDF7B588B000256846058298 -:100EA00005275DE00398417802780E0216434179E8 -:100EB000027908021043000452D40A9801230680E4 -:100EC00005A802905B02002200970195304609991F -:100ED000F5F702FC04004AD16846018A01830398B1 -:100EE0004179027909021143437802781C021443C4 -:100EF000B4421ED10A041CD44B0401215B0C8903AB -:100F000000950B4301970295C17880780A0202434D -:100F100020460999F5F7FCF9040011D103994879A5 -:100F20000A79000210430122D20310430871000A1B -:100F3000487103AA06A90898FFF793FF0400CED0D2 -:100F400003990095019702954878097800020843B3 -:100F500069468B8A00220999F5F7DAF9822C06D1C5 -:100F600003AA04A90898FFF77CFF04009AD06846FA -:100F7000058209E003984179027909021143490485 -:100F8000490C0171090A417103AA04A90898FFF7E5 -:100F900068FF0028EED0822C02D020460BB0F0BDB6 -:100FA0000020FBE730B50446406B002597B00028D1 -:100FB0000DD00B2268460270228F0281606B039174 -:100FC000019000216846F2F72AFB684605706563C8 -:100FD0006587258717B030BDF8B50F460546696BA4 -:100FE0000020069E144600290FD0012B0DD1324659 -:100FF00039462846FFF74FFF002806D1002C04D0C1 -:1010000032463946284600F044FEF8BD00220280F0 -:10101000C262831D0263C36142634287028720303C -:101020000170704710B50022D24302800420FBF704 -:10103000E4FA10BD10B596B00446FFF7B3FF208E5A -:10104000002808D0012069460870E06A019000215C -:101050006846F2F7E4FA0020E062206316B010BDA3 -:1010600001280000AC1300200146098800200A076F -:1010700000D501200A06120F01D002221043CA0532 -:1010800001D5042210438A0501D5102210434905D9 -:1010900001D5202108437047FFB5A9B00600329D55 -:1010A000359C2B981F46229016D0007841060FD40D -:1010B0008106890E1E2909D021884A05520E0BD1BE -:1010C0003A88172A08D3FE4A914205D0C10906D0B2 -:1010D0008006800E122802D003202DB0F0BD2046DD -:1010E0002C302690F7492A980872002018AA0390FD -:1010F00010726A46107404AA0A60339A4A6020AAE1 -:10110000908090812298007801908106681C1C9044 -:10111000701F1D902B98890EC21C249222462032EB -:101120001B92083A401C02920B000AF035F91FFD91 -:10113000FD11FD1FFD8EFDFCFDFBFDFAFDF9FDFC23 -:10114000FDF8FDFDFDF7FDF6FDFDFDFDFDF5FD00E6 -:10115000032E76D102E018A9087219E30320287043 -:101160001C9917220A7000224A70CFE2052EF0D196 -:101170004178027808021043208320A98880249AAD -:101180005178127809021143618300287ED0884289 -:101190007CD800202072E080401E60840298F5F721 -:1011A00026FA05202870A81C0190022000901BAA96 -:1011B0002A990298F5F71EFA002868D118A8807CB1 -:1011C000012803D002206870102002E0012068701E -:1011D00002202490002225A91CA8F1F7AAFD0028CE -:1011E0002BD120A8007D2499814226D13A880099EC -:1011F000801C511A814220DB10A8C18D019801701A -:10120000090A417001991CA8891C01910099019A51 -:10121000891C009125A9F1F78CFD20A8007D01997A -:101220001BAA091801910099081880B200902A9908 -:101230000298F5F7DFF90028CCD00098022826D0D4 -:1012400064E272E018A9087261E2072E6DD341785A -:101250000346027808021043208320A98880249A3C -:101260005178127809021143618300280ED0884218 -:101270000CD8012020725879197900020843E080C7 -:1012800000202073E06900F0F5FC01E098E0A9E09F -:1012900000280ED1E169012088710521E269C902A7 -:1012A0009180E1698872E16987480881E1690020DD -:1012B0008873F01F60842298C01D60620298F5F761 -:1012C00096F907202870681C0090012001900020EA -:1012D00010A9C8852FE00198012814D0E069807911 -:1012E000012830D000981E38417F007F0902014359 -:1012F00000980170090A41700098801C00900198C4 -:10130000801C80B2019010A8C18D00980170090A5C -:1013100041700098801C09E00AE296E13BE1DFE0C1 -:1013200004E29BE077E036E016E2AFE0009001983F -:10133000801C80B201901BAA2A990298F5F75AF9ED -:10134000002803D007E010A8818DD1E739880198E3 -:10135000081A0428BFDA0198012843D0E06980798F -:10136000012804D010A8818D5548814206D110A8CB -:10137000818D00980170090A417009E000981E38BB -:10138000417F027F0802009910430870000A4870EC -:101390000198801CBAE1072E01D0152E76D1417834 -:1013A000027808021043208320A98880249A51786B -:1013B0001278090211436183002801D0884201D9C3 -:1013C00001203FE7012020720020E0802073052EDD -:1013D0000AD01D982299E269C0B2491DF1F783FC39 -:1013E000002801D00A202DE70020C04360841AA8FD -:1013F000019023A922980297039500910078002379 -:101400008206920E20462A99FFF712FC0390208B49 -:1014100020A988807BE1032EC0D1402220A98A81A7 -:101420004178027808021043208320A988802A99F5 -:101430001EAB1C9A02930192009139880022491E2A -:101440008BB21B990978F5F747F918A9087200289B -:1014500033D10B20287010A8008F3FE0052E9DD1BE -:10146000802220A98A8141780278080210432083D3 -:10147000249984464A78097812020A43628420A992 -:1014800088801248824202D30720DBE6AFE03F208B -:101490008002024362842A981FAB1C990293019137 -:1014A00000903888401E83B21B9801786046F5F79B -:1014B00013F918A9087200280CD08328AAD107E0D4 -:1014C000FFFF0000AC130020012800000102000013 -:1014D0000220B8E00D20287010A8808F401C15E174 -:1014E00001990C22C9095143C91CB14204D9019880 -:1014F00040067CD5002009E14278037810021843A9 -:1015000020AA9080844622980078400609D50520BC -:101510006A46107422980078C00905D00020107423 -:101520001DE106206A46107424981F902A9A0090A4 -:101530000023701A029383B21E9001921B9800221E -:1015400001786046F4F7E4FE18A9087200226946A3 -:101550000A74832801D10220039022980078400663 -:101560000DD52088C00506D520A9208B8988884202 -:1015700001D100206062002018A90872C6E0FF2196 -:10158000013120A88181808820831E9860841F9863 -:1015900060621320B8E0052E29D341780278080252 -:1015A000104320A98880218F002902D0FE4A914251 -:1015B00006D10A216A4611740121C943218702E03C -:1015C00007216A46117422992A9A491D01920091B5 -:1015D00001221D990023D203029311438BB2249957 -:1015E0004A78097812020A431B99097800E0C9E099 -:1015F000F4F78EFE18A90872002269460A740122C7 -:10160000520220A98A81832808D0002809D0218F7E -:10161000E54881427ED10020208778E088882083B9 -:101620004DE7606B002808D031462046229AFFF72C -:10163000E3FB18A90872002869D12B463A463046C8 -:10164000229900F056FB039061E02298022E407828 -:1016500001907DD1002801D0012879D10820694668 -:1016600008740198087521A800901B980022017841 -:101670002046019BFFF7B0FC6946002248758A7539 -:10168000002802D10198012809D0208F002806D017 -:10169000002008740120800220A988810EE004A89F -:1016A0003399F1F7BCFF03900020694608740120CC -:1016B000800220A988810398022807D0BB480068CF -:1016C0008079002805D018A908722BE001982083A2 -:1016D0001DE00398002803D0812018A9087240E07B -:1016E00021A800901B98012201782046019BFFF75A -:1016F00073FC18A9087220463499FFF753FC18A907 -:10170000087A002803D11920287001203880684603 -:10171000007C00E03CE0002804D004A83399F1F7F5 -:101720007EFF0390039800282ED01AE0062012E5D1 -:101730002078000713D5012E11D1092168460174C4 -:10174000A188818204203499FAF757FF082100E02C -:1017500005E020A88181CDE60198400612D503203E -:10176000039020A9208889890843208020A988899E -:101770004005400E04D026992B9808602698868054 -:101780000398AAE40420E6E418A8007A00280ED002 -:101790000120287022980078687020A88088A8709E -:1017A000000AE87018A8007A28710520388020A95E -:1017B0002088898988432080E2E7FFB50746A1B0E9 -:1017C00000201C903A7801209040794A7C681040B3 -:1017D00010AA1087744B22885B1C9A4203D0002801 -:1017E00004D0100702D5012025B0F0BD249E0020B2 -:1017F000307023980025028810A8028518A8057566 -:101800006A4B68461972057404A8186020462C308B -:101810001B902A985860249E94463878721C0521A3 -:10182000039201282DD0022808D003287DD13078DA -:10183000800980011D303070B889A0803878022876 -:1018400004D13078800980011B303070F01C1FAA51 -:1018500001900292009110A8008D0022C01E83B258 -:101860002020015DB889F4F737FF0028DED1039806 -:10187000B9890170090A417010A9888FC01C0885B8 -:1018800028E1787B18AA10753A7B012A02D0022A37 -:10189000CCD1FCE022887F231B011A4010AB1A87B1 -:1018A000802A4AD006DC102A10D0202A0ED0402AE6 -:1018B0000AD124E0FF3A013A65D0FF3A013A79D0E3 -:1018C000FF3AFF3A022A76D00525A2E02078C0062A -:1018D00001D5082000E010201C9004206A461074F6 -:1018E000002090821AA81DAA1EAB039601920290B6 -:1018F00000933B8A20461C9AFFF79AF984E0228BDA -:101900003B8A9646934268D10A221C92002839D11C -:10191000039801906046401E1FAA83B202922020C5 -:101920000091015D0022704600E0BAE0F4F7D4FEB9 -:10193000014618A801750B201AE0228B3B8A9646B7 -:1019400093424AD10C221C92002862D10398019044 -:1019500060461FAA401E0292009183B22020015DC2 -:10196000628C7046F4F7B8FE014618A801750D2088 -:10197000307010A8818F491C0185042168460174CC -:10198000218B818245E0238B3A8A9C469A4224D15E -:1019900012221C9200283CD1606A002813D0002239 -:1019A0006B4607C3638C07E0FEFF0000AC1300200A -:1019B00009F800000DE04BE02020015D6046F4F7DF -:1019C000A7FC18A9087513203070012010A90885FC -:1019D0001FE0398A228B914201D00425B6E01621FE -:1019E0001C91002815D11B98818802682046FFF7BA -:1019F00003FA18A9087500280BD11B983346016813 -:101A000080881AAA00F075F9054602281BD0042D1B -:101A100019D01B988088002811D06846007C0028C7 -:101A200004D004A82A99F1F7FAFD05460120694679 -:101A300008741B981B990068059000208880002D71 -:101A400048D0052D2ED06846007C032878D07DE054 -:101A500018211C91002806D0388A20832046B968B6 -:101A6000FFF7A0FAD5E72046183000902020015D4E -:101A7000237E01222046FFF7AFFA18A90875002837 -:101A8000ECD119203070012010A90885E6E72088E4 -:101A900001214902084010A90887FF38FF380228B1 -:101AA00006D0052510A92088098F884320804DE0A5 -:101AB000208F9849884290D116201C9038690028C0 -:101AC00005D06063B88A20870020608702E000208C -:101AD000C043208710A8008F7F21090102468A4356 -:101AE0000DD0782300220420B968FAF7DFFC38789B -:101AF000A07010A92088098F0843208002E0218867 -:101B0000814321806846007C002805D082484168D6 -:101B100004A8F1F784FD054618A8007D002815D01B -:101B20001C98707001203070208BB070000AF0702B -:101B300018A8007D3071052110A8018506E0FFE797 -:101B40007548416804A8F1F76AFD05467248017AB4 -:101B500020884005400E22D11B98808800281ED086 -:101B6000239A0026138810AA1385249A2A9B6F466D -:101B70004CC71B9A039412681AABFFF78DFA0546FF -:101B800002280CD00120694608741B982A99006825 -:101B9000059004A8F1F743FD05461B98868010A820 -:101BA000018D2398018028461EE600B597B00428D1 -:101BB00007D102206A461070019100216846F1F7B2 -:101BC0002EFD17B000BD10B5534C037800222168DC -:101BD000012B02D0022B42D126E00B78002B01D042 -:101BE000042B03D10A7122680321117021688388B4 -:101BF0000A79D200921D8B5221680A79D2000832EC -:101C00008918C2880A80216803890A79D2000A32B9 -:101C10008B52428920680179C9000C3142522168F7 -:101C20000879401C08711EE00A7482888A80216845 -:101C3000C288CA8022680189118122684189518144 -:101C4000C1682068C1606168F1F7E9FC01460228BB -:101C500007D02068007C002802D1002903D0812011 -:101C600010BD832010BD002010BD406B002800D0A7 -:101C7000012070478178012909D100880521C90216 -:101C8000884202D0491C884201D1002070470520BB -:101C90007047F7B586B00024684615460F46848124 -:101CA00005261AE004984178027809021143298038 -:101CB000811D019602940091417902790B02134330 -:101CC000C178827809020A43417800780902084302 -:101CD0003946F4F71DFB002806D104AA03A906988B -:101CE000FFF7BFF80028DDD0822800D1002009B01E -:101CF000F0BD10B51488844201D2052010BD172410 -:101D00001C701080421E581C491C09F09AF80020D3 -:101D100010BD0000FEFF0000AC13002030B50346EC -:101D2000002002460DE09C5C2546303D0A2D02D382 -:101D30000020C04330BD0A25684330382018521CAB -:101D4000D2B28A42EFD330BD70B50D46144608E0DA -:101D50000A2109F0DFF82A193031203A641ED177C0 -:101D6000E4B2002CF4D170BD10B5002310E0040AD9 -:101D700000020443A0B2CC5C44402006000F604047 -:101D80000407240C44402006C00C60405B1C9BB23E -:101D90009342ECD310BD000010B572B600F0DCF831 -:101DA00000280BD0EFF77CFAFAF7E1FD08F097FB7B -:101DB0006E490020C86288626D49086062B60020E2 -:101DC00010BDF3B5002501200007C06A81B0C043F3 -:101DD0000006000E04D167480068401C00D10125B0 -:101DE00072B600F0B9F8002802D062B60820FEBD35 -:101DF000EFF7ACF9EFF758FA5F4B604E00211A6825 -:101E0000CA40D2071FD00246CA40D20718D14AB2F0 -:101E1000002A07DA1407240F083CA408A400A41918 -:101E2000E46904E09408564FA400E419246892077A -:101E3000D20ED4402206920F012A04D0032A02D0E7 -:101E400062B65048FEBD491C2029D8D30198030032 -:101E500009F0A2FA142123232323232323230B0D88 -:101E60000F11131F1517191B1D2E002416E0012436 -:101E700014E0022412E0032410E004240EE00824FD -:101E80000CE009240AE00A2408E00B2406E00C24F4 -:101E900004E0052402E0072400E00624F0690121A3 -:101EA0000002000AC9070843F061002D04D009E0D0 -:101EB00062B601200003FEBD2C4D3348E862EFF707 -:101EC000F3F9A8622A49314808603149029808604C -:101ED000EFF7EAF9214608F0E9FAFAF70CFD08F005 -:101EE000EFFC08F065FB0198EFF7A8F9040062B673 -:101EF00003D0FFF751FF2046FEBD0020FEBD10B508 -:101F0000044600F029F8002800D0012020700020AD -:101F100010BD204908600020704710B50C461028FD -:101F200008D011280BD012280CD013280ED0012075 -:101F3000086010BD03CC083CFFF743FF0AE0FFF741 -:101F40002BFF07E02068FFF7DAFF03E01149206864 -:101F500008600020206010BD05480C4900688842D8 -:101F600001D10120704700207047000000050040AB -:101F7000640000200010001000E100E000ED00E02F -:101F800000E400E00110000000220000BEBAFECA1A -:101F9000980000200400002010B520380C460300F3 -:101FA00009F0FAF933A6AAAEB2B8BCC0C5E0DBE4CA -:101FB0001B1F23272C31373C41474D5054585C6040 -:101FC0006D71656974787C8084888C9094989C9FEE -:101FD000A2CACFE9F0F3D3D7F800206800F0DDF80B -:101FE000D6E0206800F0E1F8D2E0206800F0F5F8D3 -:101FF000CEE0207840B208F0C9F8C9E0207840B2BD -:1020000008F0E7F8C4E02078616840B208F0FAF818 -:10201000BEE0207840B208F00AF9B9E0207840B27A -:1020200008F015F9B4E02078217940B208F020F9E1 -:10203000AEE02078616840B208F04AF9A8E008F004 -:1020400056F9A5E0206808F05AF9A1E0207808F0D8 -:102050006FF99DE02068FAF738F899E02068FAF700 -:1020600038F895E021792068FAF73AF890E020688E -:1020700007F0D8FF8CE0206807F0D9FF88E02078CF -:1020800007F0D9FF84E007F0E3FF81E0207807F054 -:10209000E5FF7DE0207807F0F7FF79E0206808F0A1 -:1020A00010F875E0206808F012F871E0206808F078 -:1020B00014F86DE0206808F015F869E0206808F071 -:1020C00017F865E0206808F019F861E0206808F06A -:1020D0001AF85DE00846EFF751F859E0F0F787F994 -:1020E00056E0F0F7B4F953E02068F0F7BCF94FE0A0 -:1020F000206800F0E1F84BE0206800F0E9F847E0E4 -:10210000206800F0F0F843E02078A268616800F0F1 -:10211000F5F83DE0207800F006F939E0207800F08D -:1021200017F935E02078616800F027F930E0207871 -:10213000616800F03AF92BE02179207808F008FA7C -:1021400026E0206800F06BF822E02068FAF7FEFA3B -:102150001EE02068FAF7E2FA1AE007CC0C3C08F01F -:10216000F1FA15E0206808F044FB11E003CC083CCC -:1021700008F06FFB0CE0206808F065FD08E009E05E -:1021800003E0FFE708F077FD02E0206808F0AEFD0D -:10219000206010BD0120086010BD002101700846BC -:1021A00070470146002008707047EFF31081C9079F -:1021B000C90F72B60278012A01D0012200E0002284 -:1021C00001230370002900D162B6002A01D000204B -:1021D0007047012040037047E7E7EFF31081C9071C -:1021E000C90F72B600220270002900D162B6002029 -:1021F0007047F2E710B52848FFF7CFFF002803D05B -:1022000026A11D2008F0A7FF2348401CFFF7C5FFAB -:10221000002803D021A1212008F09DFF10BDF1B5B9 -:10222000224D6F6801261C48FFF7BFFF1A4C00289B -:1022300003D10026601CFFF7D0FF1D4A1D49012075 -:10224000506000BF00BF00BF00BF00BF00230B6095 -:102250004B60009B6B60106000BF00BF00BF00BF01 -:1022600000BF0868002802D148680028F9D04868F3 -:102270000028E4D1002E04D06F60601CFFF795FFAA -:1022800007E0601CFFF791FF0028D3D10248FFF759 -:10229000A4FF0020F8BDC2E79C0000207372635CBD -:1022A000736F635F6563622E6300000000E50040AA -:1022B00000E0004000E100405A495B4B0A685B497E -:1022C0009A42096801D18904890C01600020704795 -:1022D0005449554B0A6855499A4201D18004800CF3 -:1022E0004860002070474F494F4B0A684F499A4257 -:1022F00001D18004800C88600020704730B5494BC4 -:10230000494D1C684A4BAC4202D0102802D203E06F -:102310000E2801D3184630BDC30044481818016187 -:102320004261002030BD3F493F4B0A684049491C8B -:102330009A4202D0042802D203E0022801D30846C0 -:1023400070473C4A0121C00080180160002070479E -:102350003449354B0A683649491C9A4202D0042850 -:1023600002D203E0022801D308467047314A012116 -:10237000C000801841600020704770B5294A2C4B7E -:1023800014682D4E284D82005B1C9219AC4203D07C -:10239000042803D2116006E0022801D3184670BD5C -:1023A0008804800C1060002070BD70B51D4A204B61 -:1023B0001468214E1C4D82005B1C9219AC4203D064 -:1023C000042803D2106806E0022801D3184670BD25 -:1023D00010688004800C0860002070BD10B5134A9E -:1023E000164890600E200021C3009B1819615961A6 -:1023F000401C1028F8D300200F4A05E0022803D320 -:1024000083009B18196005E083009B181C68A404D6 -:10241000A40C1C60401C0428F0D310BD03490748DD -:102420008860704764000020BEBAFECA00F5014013 -:102430000820000000F0014000F8014000C0FFFF4C -:10244000FE48C07E7047FE4840687047FD48C07E29 -:102450007047FFB5F94E85B0706A346805686068EA -:102460000190306A0390298D0798401A80B202903B -:102470000898002804D0274638372046483002E024 -:10248000371D2846A0300090032038710598002899 -:102490001FD001287ED0022863D003287BD0EAA178 -:1024A000ED4808F058FE0898002806D0387903282F -:1024B00003D0E5A1E94808F04EFEA16A7069FAF779 -:1024C000B0FDB860216A606A814265D900990860F0 -:1024D00034E1306A002803D1DBA1E14808F03BFE7B -:1024E000288BE0494843421806980021002804D070 -:1024F0005043DD4908F00EFD411CA1610191AA88FD -:10250000D848002142430698002804D05043D649B9 -:1025100008F000FD411CE161306AD24A801CA062D3 -:10252000298BD04B5143019A891AD04A891809182E -:10253000A162AA7D01985A4340008018FF301930EB -:1025400020626062306A081AC949FF38153888422B -:10255000A9D2C84988427DD2BBA1C74808F0FBFD7B -:102560008BE0288BBF4AE16850430A180698002187 -:10257000002804D05043BC4908F0CCFC411CA161A8 -:10258000AA88B848002142430698002808D0504342 -:10259000B54902E03EE073E0CEE008F0BBFC411C30 -:1025A000E161306A002803D1A7A1B44808F0D3FD47 -:1025B000A620405BAB4A0028288BE16821D050431D -:1025C0000818A169401AA0622169A068A54A484379 -:1025D000A1694018A97D400051434018FF301730D1 -:1025E0002062A888E1695043411AA5480818606232 -:1025F000A06A316A401A9E49FF38553888423CD358 -:1026000051E750430818A169401A3168D638496823 -:102610004018D8E7284680300190C08C002802D0AE -:10262000306A002803D188A1964808F094FDA88854 -:102630008C49E3694843C01AA06201999C46CA8C40 -:102640002169A368521A4B43A16959186346534341 -:10265000C91800E011E0AA7D824B49005A4389184D -:10266000FF3117312162864941186162316A401A8F -:102670007F49FF3855388842C2D20120387112E7AD -:102680000898002803D03420005D00287ED1A88857 -:1026900074494843E169401A02994843A0622846B8 -:1026A00080300490C08C0028019825D0002803D0E9 -:1026B00065A1754808F04FFD04986A4AC18C0298DC -:1026C0000818E16948434000FF3017302062A888AD -:1026D0005043411A6A48081860626C4840680028F4 -:1026E00019D0A26A03990120511A614AFF3955395C -:1026F000914285D23871D6E6002802D0039800288E -:1027000003D151A1624808F026FD0198A16AD6388C -:102710000818A062D0E7FAF7F2F97269014610468C -:10272000FBF706FCA16A081A5149FF385038884265 -:10273000A5D2012009B0F0BD00980160009855496C -:1027400000684018F86028468030028A0799511ABC -:1027500009B2002904DD0599022901D0032100E016 -:10276000002179710E99002915D0028F002A1ED000 -:10277000418F4187A0352B7F491C4B4393420AD29E -:102780007979491E002906DD012100E00CE079710C -:10279000418F491C4187089838700898002808D054 -:1027A0003420005D002804D0022009B0F0BD0021D3 -:1027B000DFE708980121484020346075307FF27EC1 -:1027C0003946B37E9A4202D0FAF710FE04E00020A8 -:1027D000F076B07630607062002009B0F0BDF0B5E0 -:1027E0002A4F83B038680568416A2E460C68203647 -:1027F000717D00290AD0698E228D914206D1407ADE -:10280000002803D110A1244808F0A5FCFAF777F9B5 -:102810001E4F39684A6901461046FBF789FB3F683D -:102820000028796A096807D089880E4A51433A68B6 -:10283000D269891A08F06EFB698E2FE0B813002068 -:10284000B8000020E01300207372635C6C6C5F6C56 -:102850006D2E73302E630000310500003A05000034 -:10286000B7040000E204000040420F0033040000FF -:102870005C0800001D030000D4040000DC0400001C -:1028800094FBFFFFF50400001B050000A8000020DA -:1028900014050000FF0B000021060000228D131814 -:1028A000994202DB491C698602E0401C10186886C8 -:1028B000B07D002806D19421688E095B884201D141 -:1028C000401C6886388BFB4E401C388320464030C5 -:1028D0000190C1888088081A218D401E401887B257 -:1028E000C03418E03068F449406A002300794000A1 -:1028F000085A009323795B00C95A081881B2287DD1 -:102900000023FFF7A6FD00280FD001280FD0EB49C8 -:10291000EB4808F020FC6A8EB81A00B20028E1DA11 -:1029200001980821817005F0BDFF03B0F0BD688EED -:10293000401C6886EFE770B5DE4D09292B686A6890 -:102940007BD20C007C4424792419A7440463869626 -:1029500083A5A575A20000201062D17E042956D25D -:102960000B007B441B79DB189F4451510147516A8E -:102970000C68116808701168486010682030407D4C -:10298000002808D1FAF7BBF869680968096CFBF7F9 -:10299000CFFA002817DC6868228D0168498E9142C1 -:1029A00005D123468033998A8A1ADA8204E0891A8B -:1029B000962211530168498E21850268C16811640D -:1029C000C168416111E068680168098E228D8B1A27 -:1029D00022468032D3820168098E218501680B6C02 -:1029E000C3600B6C4361886C1062204606F0C8FB24 -:1029F000002821D0B3A1B74829E0D068506105F084 -:102A000088FA002818D0EF20AEA180001FE0ADA109 -:102A1000B1481CE0D07E042817D20100794409791E -:102A200049188F441212010B06F0E6FC002803D06F -:102A3000A4A1AA4808F08FFB70BD2DE005F09FFB14 -:102A40000028F9D09FA1A64801E09EA1A54808F062 -:102A500082FB70BDFDF7CBFD70BDD87E022806D08D -:102A6000D87E032806D0FF2096A1AB300EE0FFF7FA -:102A7000B6FE70BD00F013FC70BDD87E0228F6D003 -:102A8000D87E0328F6D0FF208EA1B83008F063FB73 -:102A9000F0E7FAF719F870BDFF208AA1C630D6E733 -:102AA000F3B50126834C904D81B00F46092945D2DC -:102AB00008007844007900188744042D38382D40E8 -:102AC000403838000121884800F0D0FB3946019891 -:102AD000FFF731FFE87E022826D160680468406A6B -:102AE0000768F9F7EAFFB988804A5143E269891A11 -:102AF000D639E162B72803D283200001081A02E028 -:102B0000081A7B494018E0627A48E16A814200D89D -:102B10000846E06205E00198FFF70DFFE87E022815 -:102B200002D128682030067503B0F0BD25600198F9 -:102B3000FFF701FF0020206003B0F0BDFF2061A17E -:102B4000623008F008FB03B0F0BD70B506460C46D5 -:102B500009291FD208007844007900188744040D21 -:102B600011110D1A1A1111000121634800F07EFBAA -:102B700021463046FFF7DFFE70BD3046FFF7DBFE33 -:102B800070BD4C4D5C4828603046FFF7D4FE0020F5 -:102B9000286070BDFF204BA1883008F0DCFA70BDC2 -:102BA000F0B5514985B0CA7E0026424C032A03D0B5 -:102BB0002831CA7E032A64D100252160002824D050 -:102BC00001280ED03FA14D4808F0C5FA2068002E1C -:102BD00005604562256054D049484560002005B035 -:102BE000F0BD0320887600E020BF2068C17E002968 -:102BF00003D0C17E827E9142F6D0C17E002902D0F0 -:102C000000268576E2E70126FBE700260327084633 -:102C10008F76C97E032903D0C07E00282DD02DE0F9 -:102C2000007F002803D127A1364808F094FA2068D5 -:102C3000067F684607714771F9F761FF0290FF2030 -:102C4000F530039001216846017069463046FAF775 -:102C5000CDFB2068007FFBF7F7F900280BD0206838 -:102C6000007FF9F731FF20680577C5768576056026 -:102C70000126456202E020BFEBE701262068857649 -:102C8000A4E70C2005B0F0BD10B5174800F04DFBCF -:102C9000194800F04AFB1C49002008751849487083 -:102CA00011494861144A506188769076014948601C -:102CB000086010BDA800002034B4010048280100BD -:102CC0005B0600007372635C6C6C5F6C6D2E73301E -:102CD0002E630000B6030000C3030000D60300000B -:102CE000DB030000E2030000B8130020E204000050 -:102CF00087F8FFFFEC060000E01300201E03000031 -:102D0000B80000207E02000008140020F8B5FF4E35 -:102D100005463068002401270004810FFC48006844 -:102D2000800F814204D0FF20FA49D03008F013FA16 -:102D30003068F94E0004810F30680006800F814230 -:102D400004D0FF20F349D13008F005FAF348C069F8 -:102D50003168800F0904890F884204D0FF20ED49B3 -:102D6000D23008F0F8F9EE480570EE4DEC76AC760E -:102D7000ED4EF476B476ED48077104606C627462CF -:102D80002C60EB4F346028467C6000F0CEFA304671 -:102D900000F0CBFAE74804757C706C617461AC7626 -:102DA000B476E54844600460F8BDE04908717047B6 -:102DB000F8B5DC490546CA7EDB48DF4C002A02D163 -:102DC000C27E002A03D0C97E022907D009E0DB4871 -:102DD0002160F9F725FE216808770AE0C17E002905 -:102DE00001D00C20F8BD2060D548F9F719FE216804 -:102DF0000877CF48456021680860D2484862284675 -:102E00000121BC30F9F790F9A035287F8007800FA9 -:102E1000401C28772068007F002803D1BD49CA489C -:102E200008F099F9F9F749FEC849884200D20846E6 -:102E3000C749401886B221680320C87604F084FF91 -:102E40002168086104F0A8FF01270025002826D08A -:102E500004F0A2FF21684A6A106008680121077027 -:102E60006846F9F7EAF868460078BA49000208F0BF -:102E700051F80F46F9F743FEF119FAF7D2F8216835 -:102E8000C86022680320107250721571107FD37EC3 -:102E9000111D967EB3420ED0FAF7A8FA0FE0F9F7AB -:102EA0002EFE3146FAF7BDF82168C8600868057043 -:102EB00008684770E5E7D576957615605562206815 -:102EC000058300202560F8BD7047F8B5954EF17E6A -:102ED000002903D19449C97E002901D00C20F8BDF6 -:102EE0000221F176914F934D77623560002438606E -:102EF0002C7500943979C0304A00974900798A5A74 -:102F00004000085A2346101881B222462046FFF797 -:102F1000A0FA002803D07F49904808F01CF92C61E2 -:102F20000120AC6028756C862C868D4884753968C4 -:102F3000088D401E088534830020F8BD10B57E48FA -:102F400001244068817E03290CD00168497800295A -:102F500006D0006A8349884202D9002405F03CF972 -:102F6000204610BD0024FBE77348406802681178D2 -:102F7000491C1170016A0068C26A914204D8007D40 -:102F8000012801D0012070470020704700207047C1 -:102F9000F8B5694D63482860416A00270C680068ED -:102FA000342126460F548036B17F002927D1007D79 -:102FB000032824D1F9F7A3FD29684A690146104680 -:102FC000FAF7B6FF00281ADD2D68674B6A6A296890 -:102FD000126892880091C9695A43511A07F09AFF02 -:102FE000218D401C4218009953480A862968B28AEC -:102FF0000B8ED21A12B2002A03DC0760F8BD2F60D4 -:10300000F8BD012220318A7521464031CA8889885D -:10301000514F511A228D491E89188EB20546C0346F -:1030200019E0496A09794900795A00220092028E12 -:103030002379007D5B00FB5A591889B20123FFF701 -:1030400008FA00280ED001280FD002280AD03149F2 -:10305000464808F080F829680868028EB21A12B251 -:10306000002ADEDA00202860F8BD28680068018E9A -:10307000491C0186EFE770B52F4900244D680628EA -:1030800076D202007A441279921897441820020EE0 -:10309000240D002000F08FF9EC76AC762C60002136 -:1030A00008466C6200F0E2F870BD1D480D680078BB -:1030B000EFF72AF9EC76AC762C606C6270BD0120DB -:1030C00000F079F90021084600F0D0F870BD2968B9 -:1030D0000320087570BD686A29680068CA698A603B -:1030E0008188214A51432A68D1600146C0310A8A49 -:1030F00002838A7B82754A8A82808A8AC280C98AD0 -:10310000018129680220087570BD31E000E400E00B -:1031100008E400E0C42C010018E400E000ED00E049 -:10312000A0000020B8130020E0130020B000002011 -:10313000B800002008140020A8000020A12A0100E7 -:103140004B2B0100A4000020C9020000F60500007E -:10315000BB0200001027000034B40100520300003D -:1031600028140020D9821300E204000007060000A2 -:10317000DD49DE4807F0EFFF70BD70B500280BD0C9 -:103180000024DB4D01280ED002282FD0EF20D64995 -:10319000C00007F0E0FF70BD00F06BF900210846A9 -:1031A00000F064F870BD686801684C70C47684767D -:1031B0000460D04E446201220021706800F063FF79 -:1031C00071680846C0318C72CC72FFF77EFE002811 -:1031D00003D0C549C84807F0BEFFF9F7DBFBC74875 -:1031E0006C600078EFF790F86C6070BD00F041F90A -:1031F0006868C4768476046000214462084600F062 -:1032000035F870BDBA494968CA7E022A08D10A68F1 -:103210001378002B04D150600968CA6A1018C8627C -:10322000704710B5B24A002952680BD0012906D068 -:10323000022906D0AC49B24807F08DFF10BD801EB0 -:1032400000E0401F106210BD08B50020C043694671 -:103250000880AC48C07E002801D0002008BD084688 -:1032600000F0F6F90028F9D0012008BD70B5A04C97 -:1032700005466268002908D0002A04D0FF209A4938 -:103280000D3007F068FF656070BD002A04D1FF2093 -:103290009549133007F05FFF0020606070BD38B5BE -:1032A000934C20680168497801291FD001216846A4 -:1032B000F8F7C3FE684600789349000207F02AFE3B -:1032C0002068426AC06812685118F9F7AAFE21689E -:1032D000C8608C4822680321824202D0108B0A28E1 -:1032E00010D2108B401C108351720DE07D21C068FC -:1032F000C900F9F796FE2168C86004F025FD216831 -:103300000861E6E702205072117200231371107FEA -:10331000D47E111D957EAC4202D0FAF767F838BD15 -:10332000D37693761360536238BDF8B5704C05467A -:103330001F27EE7E042E2DD230007844007900182D -:103340008744312801237148854203D0664970487B -:1033500007F001FF02202560A87600E020BF216869 -:10336000C87E002803D0CA7E887E8242F6D0CA7EFC -:10337000002A04D000228A760C27226010E0002266 -:103380008A760A604A6222600DE00120FFF708FC9D -:10339000074603E054495F4807F0DDFE002F02D0E6 -:1033A000E87EB042C5D1E87E002803D04E495A4895 -:1033B00007F0D1FEF8BDF8B54D4D01286A68516A95 -:1033C0000C6846D10879554940000B5A1068077DB2 -:1033D0000126032F06D0027D022A13D0007D01288A -:1033E00024D036E00027076110688760942000969B -:1033F000025BC420005D4000085AC01881B23B4601 -:1034000003201EE022468032D78C07610096C4203C -:10341000005D928A4000085AC01881B20023022041 -:10342000FFF717F8696809680E750CE0942000969C -:10343000025BC420005D4000085AC01881B200231E -:103440000120FFF706F8002803D02749344807F089 -:1034500082FEF9F79FFA29480078EEF755FF696870 -:10346000002008830B68228D5A86096820318875F0 -:10347000F8BDF8B51E4D002168680C46006842781A -:10348000002A01D0447027E00078002809D00121EB -:103490006846F8F7F7FD684600781B49000207F018 -:1034A00039FD6868426AC06812685118F9F7B9FDB9 -:1034B0006A68D060147103205072107FD37E111D92 -:1034C000967EB34202D0F9F791FF03E0D47694766A -:1034D0001460546268680483F9F75CFA074800785E -:1034E000EEF712FFF8BD0000C42C010056070000E3 -:1034F000A8000020B800002003070000A000002062 -:103500009D070000E013002010270000B8130020E2 -:1035100007020000130200001902000034B4010089 -:10352000BC060000F8B50024E948FEF73EFE00287E -:1035300025D1E84FC02026464643F51901462846C6 -:1035400007F0DEFC0120B8556C80E34900200870CC -:10355000E24A4A8080356962E149641C0870A962C8 -:10356000E049E4B208704A80A963032CE2D3D8484A -:10357000FEF733FED648FEF718FE002801D00C20D7 -:10358000F8BDFF211931D84807F0BAFCD64801210F -:1035900001704480D5490020087208750877D44925 -:1035A0008872CB48FEF719FE0020F8BD10B5C84858 -:1035B000FEF7F3FD002803D0CEA1282007F0CBFDB5 -:1035C000C348FEF7EAFD002803D0CAA12D2007F06A -:1035D000C2FDFFF7A7FF002803D0C6A1332007F0E4 -:1035E000BAFD10BD10B50446B948FEF7DEFD00284F -:1035F00001D00C2010BDBC490878002807D000205D -:103600000870B3482160FEF7E8FD002010BDB04807 -:10361000FEF7E3FD1F2010BD70B505460C46AC4813 -:10362000FEF7C3FD002801D00C2070BDAE4A5088C3 -:10363000A84202D11078002804D0A548FEF7CDFD9D -:10364000122070BDA2482260FEF7C7FD002070BDA9 -:1036500010B504469E48FEF7A8FD002801D00C20B6 -:1036600010BDA1480178002907D00020C043208068 -:103670009748FEF7B2FD122010BD40882080944884 -:10368000FEF7ABFD002010BD10B504469048FEF7D4 -:103690008CFD002801D00C2010BD2078002804D01B -:1036A0008B48FEF79AFD0C2010BD01202070884841 -:1036B000FEF793FD002010BD10B504468448FEF7C8 -:1036C00074FD002801D00C2010BD824A0021C020CA -:1036D0004843105C00280AD0C023002059435054AE -:1036E000881820607A48FEF778FD002010BD491C3C -:1036F000C9B20329EBD37648FEF76FFD1F2010BD3A -:10370000032805D2C0225043724A135C002B01D01B -:1037100012207047801808600020704710B5002202 -:103720000C46032809D2C02148436A490B5C002B90 -:1037300014D122704018606018E003280ED164484C -:10374000FEF733FD002809D167484188032902D1DB -:103750000178002904D05E48FEF73FFD122010BD1D -:1037600060605B48FEF739FD01202070002010BD2D -:1037700010B504465648FEF718FD002801D00C206D -:1037800010BD2088534A032804D2C0214843105C4E -:10379000002801D00020208000202188491C89B207 -:1037A0002180032900D300212180C0235943515C8B -:1037B00000290BD0401CC0B20328EED30020C04328 -:1037C00020804348FEF709FD122010BD4048FEF757 -:1037D00004FD002010BD70B505460E463C48FEF7BE -:1037E000E4FC002801D00C2070BD2888341D03287B -:1037F00004D303D0A04201D3002028800020361D2E -:103800001DD0394B33492A88521C92B22A80A242D9 -:1038100000D300222A80042A02D3A24217D301E057 -:10382000032A05D0C02672438A5C002A0FD002E02A -:103830001A78002A0BD0401CC0B2A042E3D300206B -:10384000C04328802248FEF7C8FC122070BD2048E3 -:10385000FEF7C3FC002070BD10B504461C48FEF7FF -:10386000A4FC002801D00C2010BD2078002804D032 -:103870001748FEF7B2FC0C2010BD01202070144840 -:10388000FEF7ABFC002010BD10B504461048FEF753 -:103890008CFC002801D00C2010BD217801200029CB -:1038A00002D0012905D008E061680A78002A09D011 -:1038B00003E061680A78002A04D00548FEF78DFC11 -:1038C0000C2010BD08700248FEF787FC002010BDD8 -:1038D000C00000205814002098160020FFFF0000B0 -:1038E000C1000020C6160020D8160020B8170020FE -:1038F000D81700207372635C6C6C5F64622E630087 -:1039000010B5282107F0FAFA10BD70B50546007809 -:103910000A0700090001120F1043287007290ED270 -:10392000080078440079001887440305030503075D -:103930000300062408E00C2406E0222404E000240E -:10394000F8A1572007F007FC687880098001204320 -:10395000687070BD00780007000F704710B5C01C7C -:1039600007F0F5FC10BD0A4610B5C11C104607F063 -:10397000EEFC10BD10B5093007F0E9FC10BD02786F -:10398000BF23C9071A40490E0A43027070470078E6 -:103990004006C00F704702785206520EC9010A4312 -:1039A0000270704770B50C460546C11C20460930B0 -:1039B00007F0CDFC20784006400E2070297849069B -:1039C000C90FC9010843207070BD70B515460E4679 -:1039D00004461F2A03D9D3A1A82007F0BCFB204628 -:1039E0002A463146093007F02CFA6078AD1D80096F -:1039F0008001A906890E0843607070BD70B5054648 -:103A000040780E468406A40E062C03D2C5A1B82029 -:103A100007F0A1FBA41FE4B21F2C00D91F242946E4 -:103A200022460931304607F00CFA204670BD70B5C9 -:103A300015460E4604461F2A03D9BAA1CC2007F02A -:103A40008AFB20462A463146093007F0FAF96078A9 -:103A5000AD1D80098001A906890E0843607070BD04 -:103A600070B5044640780E468506AD0E062D03D28D -:103A7000ACA1DD2007F06FFBAD1FEDB21F2D03D908 -:103A8000A8A1E12007F067FB21462A46093130460C -:103A900007F0D7F9284670BD0A78C2734A780274D5 -:103AA0008A784274C978817470470A78C2744A78F7 -:103AB00002758978417570474176090A81767047A9 -:103AC000C176090A017770474177090A8177704703 -:103AD000C175090A017670478175704720300279F7 -:103AE000C90652095201C90E0A43027170472030BB -:103AF0000279D206D20E49010A430271704710B50D -:103B00001F3007F019FC10BD417800788906890E36 -:103B10000007000F06D0012808D0022809D0062887 -:103B200010D10AE0891F1F290AD90BE00C2907D000 -:103B300008E0891F1F2903D904E0891F1F2901D824 -:103B400001207047002070474178007889060007FF -:103B5000890E000F042805D1062903D3252901D891 -:103B6000012070470020704770B401780907090FE1 -:103B700003292ED0052931D1411C827E0C46437E7B -:103B800011021943037FC27D1D02037EC67E1B0204 -:103B90001343827D407835438006800E22281DD154 -:103BA00006291BD31920C001814217D8FF26F436FD -:103BB000B54213D8002A11D0082A0FD88A420DD254 -:103BC0008B420BD8617F227F09021143814208D9C1 -:103BD00004E040788006800E0C2802D070BC0020E3 -:103BE000704770BC0120704710B5222107F086F99C -:103BF00010BD10B502788B07920892009B0F1A43F4 -:103C000002704278520952014270012908D00229FB -:103C100006D0032905D0FF2042A1E83007F09BFA27 -:103C200010BD01210A43427010BD10B502788B0708 -:103C3000920892009B0F1A43027042785209520177 -:103C40004270012907D0022905D0032904D035A1EB -:103C5000384807F080FA10BD01210A43427010BDB8 -:103C600000788007800F70470278EF23C9071A4059 -:103C7000C90E0A43027070474178C078C906C90E60 -:103C80000E2835D202007A44127992189744060918 -:103C90000C0F1215181B1E2124272A2D0C2929D0A0 -:103CA0002AE0082926D027E0022923D024E017297A -:103CB00020D021E00D291DD01EE001291AD01BE0E3 -:103CC000012917D018E0022914D015E0092911D0D4 -:103CD00012E009290ED00FE001290BD00CE00129D8 -:103CE00008D009E0062905D006E0022902D003E049 -:103CF0001B2901D8012070470020704770B5054688 -:103D0000C1700E2926D20800784400790018874433 -:103D100006131517191B1B151D1D1B1B1F150C2426 -:103D20001DE000007372635C756C5F7064752E63D8 -:103D30000000000001020000082410E002240EE050 -:103D400017240CE00D240AE0012408E0092406E011 -:103D5000062404E000249A499A4807F0FCF96878A0 -:103D6000400940012043687070BDC0787047C17140 -:103D7000090A01727047017AC2790802104370473C -:103D80004172090A81727047817A427A08021043AF -:103D90007047C172090A01737047017BC27A080239 -:103DA000104370474171090A8171704781794279E6 -:103DB00008021043704701717047007970474173E2 -:103DC000090A81737047817B427B08021043704768 -:103DD00070B4017AC37909021943431C857A1C46E1 -:103DE000467A2B023343657926792C023443C21C70 -:103DF000754E00798D1FB54215D8FF25F435AB42BD -:103E000011D800280FD008280DD888420BD28C4238 -:103E100009D8507A117A00020843B11D884202D8AD -:103E200070BC0120704770BC0020704710B5001DA9 -:103E300007F082FA10BD0A4610B5011D104607F0C2 -:103E40007BFA10BD4172090A81727047817A427A09 -:103E5000080210437047017170470079704710B530 -:103E6000001D07F081FA10BD0A4610B5011D10466D -:103E700007F07AFA10BD0A780273497841737047E7 -:103E8000027B0A70407B4870704710B50E3007F017 -:103E90006BFA10BD0A46014610B50E31104607F008 -:103EA00063FA10BD0A7882754A78C2758A780276FC -:103EB000C97841767047827D0A70C27D4A70027E61 -:103EC0008A70407EC870704710B5001D07F04CFA2C -:103ED00010BD0A4610B5011D104607F045FA10BD89 -:103EE0000A7802734A7842738A788273C978C173F8 -:103EF0007047027B0A70427B4A70827B8A70C07B6B -:103F0000C8707047017170474171090A817170472B -:103F1000C171090A0172704700797047817942794D -:103F2000080210437047017AC279080210437047B3 -:103F300001717047007970470171704710B5001D1D -:103F400007F012FA10BD0A4610B5011D104607F021 -:103F50000BFA10BD10B5001D07F006FA10BD0A4699 -:103F600010B5011D104607F0FFF910BD70B51546DC -:103F70000E4604461B2A03D91149144807F0EBF8F2 -:103F80002A463146E01C06F05CFF6078E9064009ED -:103F90004001C90E0843607070BD70B50546407899 -:103FA0000E46C406E40E1B2C03D90549084807F049 -:103FB000D2F82246E91C304606F043FF204670BD89 -:103FC000243D0100A10200007A0C0000F103000072 -:103FD000FD03000070B504460020A083208C1E461F -:103FE00048431546114606F0A3FF2084F0002946F9 -:103FF00006F090FF401C80B20146192269439202EC -:10400000E083914201DD401EE0837D2029460002CD -:1040100006F080FF401CA08470BD70B50A7BD206FC -:10402000D20E0A73002282758B181B7ADC075B089C -:10403000DD07E40FED0F2C195B08DD07ED0F2C19E0 -:104040005B08DD07ED0F2C195B08DD07ED0F2D195F -:104050005C08E307DB0F5B196508EC07E40FE41865 -:104060006B081B1984186374847D521CE318D2B248 -:104070008375052AD8D3D8B2252803D9E1A18A208F -:1040800007F069F870BD70B504460B462546264614 -:10409000214600202835C0368031032B0AD0002B62 -:1040A0003AD0012B41D0022B03D1A11C2846FFF7A7 -:1040B000B4FF70BD2880A871E871E8722873687336 -:1040C000A873A870E870287168716876A8832B4679 -:1040D00068842033987128859872E8752876E8738B -:1040E0002874D872187398731A752884FF22603563 -:1040F000AA709875088248828882C882088348839B -:104100004877C884A4221055088748872421085579 -:1041100060843070B07170BDC8848877A1882389AD -:104120000A462846FFF756FFBFE7C884F38A728A1B -:10413000A1882846FFF74EFF70BD70B504460346C0 -:1041400028348033054603290AD0002933D00129B9 -:1041500038D0022903D1A91C2046FFF75EFF70BDAD -:1041600000202080A071E071E07220736073A07362 -:10417000A070E070207160716076A0832146608439 -:104180002031887120858872E0752076E073207474 -:10419000C872087388730A752084FF226034A27085 -:1041A00088751883987618742421586148551877B3 -:1041B000A035287370BDA9882B890A462046FFF7D1 -:1041C00009FFC8E7586AA988C38942892046FFF7D2 -:1041D00001FF70BD70B5867D0D460446002E01D0EE -:1041E000252E01D9122070BD002A18D0287EE17D2D -:1041F00050430818252106F08DFEE1750846CA08CF -:104200004907490F834BAA18595C127A914308D089 -:10421000314606F07FFE491CCAB200200AE00020A9 -:1042200070BD2076002070BD002803D02118097CC5 -:10423000511ACAB22118497C91423AD32918097AF5 -:10424000C943CB07DB17D21A521E1206120E35D005 -:104250008B07DB17D21A521E1206120E32D04B07F2 -:10426000DB17D21A521E1206120E30D00B07DB17C4 -:10427000D21A521E1206120E2ED0CB06DB17D21AFD -:10428000521E1206120E2CD08B06DB17D21A521EAB -:104290001206120E2AD04B06DB17D21A521E120635 -:1042A000120E28D00906C917511A491E0A06120E05 -:1042B00026D0401C0528B7DB1F2070BDC00020762B -:1042C000002070BDC000401C2076002070BDC000E2 -:1042D000801C2076002070BDC000C01C207600200D -:1042E00070BDC000001D2076002070BDC000401DC4 -:1042F0002076002070BDC000801D2076002070BD9B -:10430000C000C01D2076002070BD70B50D4604466B -:10431000072904D9FF203BA15D3006F01CFFE0789F -:10432000502108406907490F88300843E070A078A1 -:10433000A72108401830A07060785E210840203026 -:1043400060702078BC2108404030207070BD017939 -:10435000490901D000207047002230B41146445C66 -:10436000491CE3076408E507DB0FED0FEB18640851 -:10437000E507ED0FEB186408E507ED0FEB1864088F -:10438000E507ED0FEB186408E507ED0FEB1864087F -:10439000E507ED0FA407EB18E40FE318D218D2B22B -:1043A0000529DCDB002A02D030BC0120704730BC7C -:1043B0000020704738B505460C466846FCF74EF8B5 -:1043C00000281ED069460020085620720921615637 -:1043D0000022411A00D549422035EB788B420FDC90 -:1043E000FF2B0DD0A17A491CC9B2A1722B79994239 -:1043F00002D8617A7F2903D160720020A072012265 -:10440000104638BD7372635C6C6C5F7574696C2E9A -:104410006300000044B40100F8B50024F74EFF200B -:10442000B470F0702546F64F06E0042D04D3FF204B -:10443000F4A1AB3006F08FFEFF212846A03148439F -:10444000FF213331C0194A1C0C540146FF3114546A -:1044500021310C754C75F178A94202D1B470FF215D -:10446000F170FF219D314A1C6D1C0C54EDB21454A7 -:10447000042DDAD30020FF21A0314143C919FF31B7 -:1044800081318C77401CC0B20428F4D3E048FFF798 -:10449000ABFB0021DE48FFF7E7FB0121DC48FFF71B -:1044A000A8FBDC49FF20087048708870C87008714C -:1044B0004871F8BDB0E71B20704710B4D04A002106 -:1044C000FF23A0334B439B18FF3381339B7F002B8B -:1044D00004D0491CC9B20429F2D30DE004290BD23F -:1044E000FF23A0334B439A180124FF328132947783 -:1044F0000170204610BC704710BC0020704730B4DB -:104500000025042825D2FF220146A0325143BC4A8F -:1045100089180B46FF3381339A7F002A19D0FF2474 -:104520003334621C655455541A46603A15755575F6 -:10453000B24AD478844202D19570FF20D070FF2017 -:104540009D304554FF319E310D709D7730BC012068 -:10455000704730BC0020704704280ED2FF2201466D -:10456000A0325143A64A8918FF318131897F002941 -:1045700003D0A8494871012070470020704710B44B -:10458000A449FF224979A03251439D4A82B089183B -:104590000A46FF322132937C6C462370D27C227112 -:1045A000237822795A40802A0AD022782223520680 -:1045B000520E5A435118016002B010BC01207047DE -:1045C00002B010BC002070479248FF214079A03112 -:1045D00048438B4981B041180846FF303330FF31E2 -:1045E0002131CA7C69460A7003780922097859404A -:1045F00080290ED0037869460B7009784906490E68 -:10460000491C914208D26A461178491CC9B21170FE -:1046100009E0002001B0704769460978090601D514 -:10462000002100E080210170012001B070470428C2 -:104630000ED2FF220146A0325143714A8918FF3140 -:104640008131897F002903D07249087101207047A8 -:104650000020704710B46F49FF220979A0325143FE -:10466000674A82B089180A46FF322132947C6B4631 -:104670001C71D27C1A701C781A7994420AD01A786C -:1046800022235206520E5A435118016002B010BC48 -:104690000120704702B010BC0020704738B55D485B -:1046A0000179FF20A0304143554808180146FF31E9 -:1046B00021318A7C6C4622700922FF303430037825 -:1046C0002478A34223D004786B461C701B785B06C9 -:1046D0005B0E5B1C934205D26B461A78521CD2B219 -:1046E0001A7006E06A461278120601D5002200E030 -:1046F00080220270087D401C0875087D497D884233 -:1047000003D140A1444806F026FD012038BD002019 -:1047100038BD4048FF210079A0314843384940184E -:10472000FF302130C17C807C814201D10120704763 -:10473000002070473748FF210079A03148433049B5 -:104740004018FF302130817CC27C092013464B4049 -:10475000802B0AD049065206490E520E914201D3CF -:10476000881A01E0511A401AC0B2704709207047F8 -:104770000022042813D2FF23A0335843204BC01833 -:10478000FF239F331B5C002B09D0FF300A702130C0 -:10479000027D437DD31A0B704275012070470020C3 -:1047A0007047042811D2FF22A0325043144A8018C7 -:1047B000FF229F32125C002A07D0FF302130027D99 -:1047C000407D101A08700120704700207047104982 -:1047D0000160704704280ED2FF220146A0325143E7 -:1047E000074A8918FF318131897F002903D009499F -:1047F000087001207047002070470000101800204A -:10480000141800207372635C646D5F712E63000086 -:10481000901E0020C70000205A020000AC49CA7850 -:10482000FF2A03D000210160084670478A78A94911 -:10483000012A02D001600120704700207047A6487D -:104840000178012907D001210170A4480178A0480E -:10485000C170012070470020704704280ED2FF224B -:104860000146A03251439E4A8918FF318131897F28 -:10487000002903D0994948700120704700207047F3 -:104880009349964BCA785B789A4206D18A78203948 -:10489000002A02D0016001207047002070478C4838 -:1048A0008E4AC1785278914209D1FF21C170801C93 -:1048B0000178002903D000210170012070470020F9 -:1048C00070478348854AC1785278914204D18078F4 -:1048D000002801D0002070470120704704280ED224 -:1048E000FF220146A03251437D4A8918FF318131B0 -:1048F000897F002903D07949C870012070470020C2 -:10490000704710B47549FF22C978A0325143744AE8 -:1049100082B089180A46FF328132147F6B461C70C0 -:10492000527F1A711C781A79FF3162403731802A20 -:104930000AD01A7822235206520E5A4351180160A7 -:1049400002B010BC0120704702B010BC00207047BC -:104950006248FF21C078A0314843614981B04118C5 -:104960000846FF309D30FF3181314A7F69460A7029 -:10497000037803220978594080290ED003786946CC -:104980000B7009784906490E491C914208D26A46C3 -:104990001178491CC9B2117009E0002001B07047BC -:1049A00069460978090601D5002100E080210170DF -:1049B000012001B070474948FF21C078A031484329 -:1049C00047494018FF308130417F007F814201D14B -:1049D000012070470020704704280ED2FF220146B4 -:1049E000A03251433E4A8918FF318131897F002925 -:1049F00003D03A498870012070470020704710B4F6 -:104A00003649FF228978A0325143354A82B089184D -:104A10000A46FF328132147F6B461C71527F1A7036 -:104A20001A781B79FF3137319A420BD06A461278D7 -:104A300022235206520E5A435118016002B010BC94 -:104A40000120704702B010BC002070472348FF21AE -:104A50008078A0314843224981B04018FF219D3120 -:104A6000095C6B4619700321FF309E3002781B7879 -:104A70009A4219D003786A46137012785206520E81 -:104A8000521C8A4205D26A461178491CC9B211707B -:104A900006E069460978090601D5002100E0802179 -:104AA0000170012001B07047002001B070470B4831 -:104AB000FF218078A031484309494018FF308130F8 -:104AC000417F007F814201D1012070470020704763 -:104AD00010180020F017002012180020C700002036 -:104AE00014180020F8B5FD4F0A46044600207978D6 -:104AF000FB4D0646002902D0012909D00FE0F949F3 -:104B0000497A00290BD0002A08D10120787005E0ED -:104B1000A97F002903D0002A00D17E700120797876 -:104B20002B23594349198B7F034311D0002A22D1EB -:104B30002A22A01C1F3106F084F966700420207020 -:104B40000120A07078782B2148434019867712E025 -:104B50002878012801D00020F8BD002A0BD166700A -:104B6000132020701C22A91CA01C06F06AF9A67153 -:104B70002E70DD48C6770120F8BDD948017800299C -:104B800001D080887047D9487047F8B5D44E0746A1 -:104B9000B07F00282DD13846FEF7DCFE002101252C -:104BA000D34C072824D202007A44127992189744F1 -:104BB0000305081F1F1F0A00217006E025702172DF -:104BC00008E0032000E002202070CA493846FEF7C2 -:104BD00015FF20723846FEF7DAFE6070C649384687 -:104BE000FEF7C1FEBD4CC54F20787F2807D101E0FC -:104BF0002172F8BDFF20C2A1543006F0ACFA207833 -:104C000038707F202070B577032002F0E7FEF8BDF2 -:104C100010B5002002F072FE002812D0FBF79CFBBA -:104C200000210120FBF7A0FABA48FBF7ACFBAE4C21 -:104C3000A06AFBF7ABFB2079032805D0022803D03C -:104C400006E000F0F3FD10BD01210020FBF716FC8B -:104C5000FBF7FBFBB04C6078002803D0FBF77DFF2F -:104C6000FBF7D9FB0320E07010BD70B59E4900280A -:104C7000CA8D08D0FF2A0DD25004000CC885FF2829 -:104C800008D9FF2005E0012A04D95008C88501D1C0 -:104C90000120C88591484268012A01D0002A01D12B -:104CA0000D224260D24317239B4C5A43637B3B2522 -:104CB000DB436B43D2184260C98D900C06F02AF991 -:104CC000617370BDF8B5944CE078022804D0E078A8 -:104CD000012801D00C20F8BD0020814A05462B2177 -:104CE000414389188D77401CC0B20228F7D3157054 -:104CF0006078002804D0FBF796FBFBF73FFF657058 -:104D0000794845778577C5778449257001228A7768 -:104D10000571A570CA760A774A77714E0146324608 -:104D2000736F7432B46FF66FD7688B60CC600E61AE -:104D30004F6112698A6105770020F8BD10B5764A87 -:104D40000023D3701371684B596318630120D0702E -:104D5000FFF7B8FF002803D069A1714806F0FBF9FE -:104D600010BDF1B582B00C2001906B480090C07866 -:104D7000012806D00098C078022802D00C2003B089 -:104D8000F0BDFBF7F0FA0020FBF7B1F8564C207F9E -:104D9000002837D0524920460F4682687437C368CE -:104DA000056946694A678B67CD67FE60806938612F -:104DB00000266677A677594DE87E002805D1287F22 -:104DC000002802D1687F00281AD0009800780028B7 -:104DD00016D02079032802D0022805D008E005214A -:104DE000504800F040FD03E003214E4800F03BFD39 -:104DF000A97E3846FBF7F3F80020019026770CE0F7 -:104E0000267703E00098C078022804D00098C07884 -:104E1000022828D00AE0002001900098C0780128DC -:104E200004D10099087300980221C170606B017869 -:104E3000002903D00178001DFBF714F9206B0178DD -:104E4000002906D0384A401CFBF777FE0099012064 -:104E500048700298A0623548FBF717FAFBF78EFA04 -:104E6000019803B0F0BD00990120C8700C2003B078 -:104E7000F0BD70B5FBF777FA274CE078022803D035 -:104E8000FBF77CFA0C2070BD012017496073C885C0 -:104E90000220FBF765FA2648FBF739F9254E002575 -:104EA000A0780321401C06F035F8A170885D012828 -:104EB00044D06D1CEDB2032DF2D3FFF7A9FE20798B -:104EC000002809D0012807D002283DD003283BD074 -:104ED0000BA1194806F03FF9002070BDD00000205A -:104EE000B41E0020F41E0020341F0020FFFF00002D -:104EF000D41E0020DD1E0020D61E0020FC1E002037 -:104F00007372635C6C6C5F64645F7363616E2E6369 -:104F1000000000006C1F0020541F0020141F002000 -:104F200051030000941F00206F1F00204CB40100AB -:104F300052B401002F1F0020EA030000C8B2FC4950 -:104F4000085CFBF7F6F8B8E7EEF762F8C4E770B56F -:104F5000F84C0125A577E37F002B01D03A2070BDE6 -:104F60000026002802D1A07B884209D1A173667770 -:104F70001146F14806F0EBF96577F04805702577A2 -:104F8000A677002070BD024600200123E949002ACF -:104F900003D0012A03D0122070478B7400E088747C -:104FA0000B774A767047E34A032800D151611076A7 -:104FB0000120107700207047E049012803D0032822 -:104FC00001D0002000E0012008717047D948017F1E -:104FD000002903D0407E002803D170474079002883 -:104FE000FBD00120704710B5FBF709FAFBF7FCF97D -:104FF000FBF708F9FBF7AAF9D04C6078002805D038 -:10500000FBF711FAFBF7BAFD002060700120207356 -:105010000220E070FBF7B2F9002010BDC7494871CB -:10502000704710B500F002FC10BDF0B5C44EC34D82 -:1050300083B0002810D0C348FEF766FD002804D1D5 -:10504000C048FEF781FD002806D0BA4C207903281D -:105050000DD1A07F00280AD0E87805286BD2010086 -:105060007944097949188F44666666F7F600E8784E -:1050700005287AD201007944097949188F44757559 -:105080007502EE00AF48FEF765FCAD498870AE488A -:105090000190807F002803D1FBF736F8002800D06C -:1050A000012000906878002813D00526761EF6B2FD -:1050B000FBF785FD0746022805D1002EF6D1A3494E -:1050C000A34806F048F80098002810D1012F0ED010 -:1050D00000909B4F9F4EB878072871D20100794409 -:1050E000097949188F446DFE056C6C6C280001200D -:1050F000EEE76878002803D0FBF795F9FBF73EFD53 -:105100008F48FBF7ABF9002801D17F203870FBF7FF -:1051100093F9009800280AD02079012801D00228AC -:1051200005D1FBF76FF88748FFF72FFD37E2FBF754 -:1051300069F8FFF76DFD34E26878002803D0FBF7CB -:1051400072F9FBF71BFD7E48FBF788F9002801D1B7 -:105150007F203870FBF770F90098002879D020790B -:10516000022803D001287AD047E221E27548FFF7F0 -:105170000CFD012002F0C2FB00286ED07649714878 -:10518000FEF710FC7448FBF7FEF8607F00280ED095 -:105190006848019902898A824289CA828089088383 -:1051A00031466D48FEF7DAFB00206077A0770121D9 -:1051B0000846FBF763F9FBF703F90520E870F0E117 -:1051C0005BE16878002803D0FBF72DF9FBF7D6FCEC -:1051D0005B48FBF743F9002801D17F203870FBF7CB -:1051E0002BF90098002834D02079022808D0012813 -:1051F00035D0032837D05549584805F0ACFFD0E1E9 -:105200005048FFF7C2FC012002F078FB002824D0B0 -:1052100051494C48FEF7C6FB4F48FBF7B4F8607F96 -:1052200000280ED04348019902898A824289CA82A5 -:105230008089088331464848FEF790FB002060775C -:10524000A07701210846FBF719F9FBF7B9F805200B -:1052500001E10EE103E0BFE1ADE1B3E022E1394855 -:10526000FFF793FC9BE137482168C2780B7F9A4295 -:105270001DD102794B7F9A4219D142798B7F9A4294 -:1052800015D18279CB7F9A4211D10A462032C37957 -:105290001778BB420BD1037A5278934207D100783A -:1052A000CA7E4006C00F904201D1012000E00020DC -:1052B0006279012A30D0002800D138E7022002F0BC -:1052C0001DFB00287ED0012002F088FB22491D48EA -:1052D000FEF768FB2068018B1F48FEF7F9FB20688A -:1052E000817D00E03CE01C48FEF7F6FB1A48FBF726 -:1052F0004AF8607F002866D00E48019902898A82A8 -:105300004289CA828089088331461348FEF726FB0A -:1053100000206077A0779BE00028CFD109481C319E -:10532000FEF721FB0748FEF732FB2168C876C5E788 -:105330004FB40100341F00203C1F0020541F0020E8 -:10534000D00000206C1F0020141F0020004F01001F -:10535000D4040000281F0020941F0020CC0500006A -:105360006878002803D0FBF75EF8FBF707FCF948E4 -:10537000FBF774F8002801D17F203870FBF75CF848 -:105380000098002875D0FAF733FE002871D02079F4 -:105390000328F14804D0FFF7F8FBFAF733FFFEE0EB -:1053A0002168C2780B7F9A4220D102794B7F9A42C2 -:1053B0001CD142798B7F9A4218D18279CB7F9A4255 -:1053C00014D101E056E043E00A462032C379177851 -:1053D000BB420BD1037A5278934207D10078CA7E40 -:1053E0004006C00F904201D1012000E00020627908 -:1053F000012A32D0002800D199E6022002F07EFA7C -:10540000002837D0012002F0E9FAD449D248FEF74B -:10541000C9FA2068018BD148FEF75AFB2068817DCC -:10542000CE48FEF759FBCD48FAF7ADFF607F002864 -:105430000ED0CB4901980A8982824A89C282898921 -:1054400001833146C548FEF789FA00206077A077CE -:105450000120E0770620E870A3E00028CDD1BE4807 -:105460001C31FEF780FABC48FEF791FA2168C87635 -:10547000C3E7C2E000F0DAF993E06878002803D0CF -:10548000FAF7D1FFFBF77AFBB248FAF7E7FF0028FB -:1054900001D17F203870FAF7CFFFFAF7B3FEFFF79C -:1054A000B7FB7EE0AC48FEF755FAB070AA48AB49AE -:1054B000C3784A7A93421CD103798A7A934218D1ED -:1054C0004379CA7A934214D183790A7B934210D1EB -:1054D000C3794A7B93420CD1037A8A7B934208D1E9 -:1054E000007809784006C00FC909884201D101241B -:1054F00000E00024FAF786FEB07804283ED1002CA4 -:105500003CD09448FAF7AAFF002801D17F203070E0 -:10551000FAF792FF287B002802D00020FFF7A5FBB6 -:105520000120904C28738C4F607A002837D10420DA -:10553000E0723846FEF72BFA002801D0012800D18E -:10554000207389493846FEF70EFA88493846FEF737 -:1055500087FAE0741F2801D91F20E0743078844F47 -:105560007F2804D1FF208349543005F0F4FD3078C2 -:1055700038707F2030700120607210E07548FAF7B3 -:105580006DFF002801D17F203070FAF755FF287B8E -:10559000002802D10120FFF768FB00202873FFF7E5 -:1055A00037FBE87802283DD0E87804282DD127E0A1 -:1055B0007049714821E66878002803D0FAF733FF74 -:1055C000FBF7DCFA6348FAF749FF002801D17F2096 -:1055D0003070FAF731FF10E05E48FAF73FFF00281D -:1055E00001D17F203070FAF727FF287B002802D1F5 -:1055F0000120FFF73AFB00202873FAF703FECEE7FD -:1056000037205C49400105F0A6FD2879002809D023 -:1056100001280ED0022807D0032810D0554957483A -:1056200005F099FD03B0F0BDE878032807D003B07A -:10563000F0BDE878062802D0E8780528F7D10120E7 -:10564000FAF7D2FF03B0F0BD70B54D4CE0780728F3 -:105650005FD201007944097949188F445A5A5A5A3D -:105660005A030B003C48FAF78EFEFAF7EEFE0420D0 -:10567000E07053E0FAF7C3FEFAF7B6FEFAF7C2FDA0 -:10568000FAF764FE012626730220E070FAF776FE30 -:105690003C4D2878002803D036493B4805F05BFD97 -:1056A0000020A8702E4800684188A980C17EE97159 -:1056B000818B2981C18B6981018CA9818188E982D3 -:1056C000C188298300896883607928772F48304909 -:1056D000807EA8732F4805F03AFE6078002803D03A -:1056E000FBF76DFA012808D0687F40084000687712 -:1056F0002E70022002F072F910E0687F3043687764 -:10570000FBF776FA697F4000C907C90F0143697743 -:10571000EEE775201749000105F01DFDE07802282D -:1057200016D0E078032806D0E078042803D0114989 -:10573000194805F010FD2079002809D0012807D06C -:1057400002282DD003282BD00A49144805F003FD68 -:1057500070BD0000D00000206C1F0020941F0020AE -:10576000341F0020F41E0020011F0020081F00200D -:10577000271F0020004F01009E060000F5060000D4 -:10578000541F0020B41E002029070000141F002011 -:10579000281F0020C31E00205607000062070000DB -:1057A0000120FAF721FF70BD10B55C4CE0780528A8 -:1057B00020D201007944097949188F441B1B1B1919 -:1057C00002005748FAF74AFE002802D154497F20C8 -:1057D0000870FAF731FE207B002802D10120FFF784 -:1057E00044FA00202073FAF70DFDFFF711FA01E0EB -:1057F00000F01CF8E078022813D0E078032803D0EA -:105800004849494805F0A7FC2079002809D001281B -:1058100007D0022806D0032804D04249434805F0A7 -:105820009AFC10BD0120FAF7DFFE10BD10B5FAF7A3 -:10583000E6FDFAF7D9FDFAF7E5FCFAF787FD374CF4 -:105840006078002805D0FAF7EEFDFBF797F9002005 -:105850006070012020730220E070FAF78FFD0020B5 -:1058600002F0BCF810BD70B5314C054626466036D6 -:105870007434032943D0052940D1FEF741F80521AE -:105880002846FEF742F8B17E2846FEF778F8214612 -:105890002846FEF763F8274C284621680F31FEF7AB -:1058A000FBF8216828461331FEF7FFF82068817D58 -:1058B0002846FEF711F92068018B2846FEF708F903 -:1058C000206881882846FEF7F7F82068C1882846B6 -:1058D000FEF7F6F8206801892846FEF7F5F82168FA -:1058E00028460A31FEF70BF92068817E2846FEF72C -:1058F000F5F80A4841792846FEF7F9F870BDFDF73A -:10590000FFFF03212846FEF700F8B17E2846FEF788 -:1059100036F821462846FEF721F870BD541F0020B6 -:10592000D0000020004F010099070000A5070000EB -:10593000B41E0020341F0020F8B5FEF7FBFE04461D -:10594000FEF7BFFFF74E0546F0682030407B002889 -:1059500026D0012867D0022869D0032871D0FF2003 -:10596000F1A1793005F0F7FB3069F7220178114099 -:105970000170F2682032937BDB071B0F1943FB2376 -:1059800019400170D37BDB075B0F19430170577B14 -:10599000EF23022F60D0012F63D0032F65D06AE080 -:1059A000E548FEF76DFF002827D030690090F168C8 -:1059B000088DC9884018801D87B20098FEF7D5F978 -:1059C000012805D00098FEF7D0F9002808D00FE094 -:1059D000F06839468030C7850098FEF733FA07E053 -:1059E000F06839468030406A87800098FEF7E7F912 -:1059F000F168032020314873B6E7CF48FEF72AFE4E -:105A0000002804D0F0685321095C002907D0CA4857 -:105A1000FEF7DDFEF168012020314873A4E7022182 -:105A200020304173A0E7C448FEF7D1FE9CE7C2488E -:105A3000FEF710FE002897D1FF20BBA16B3008E0D5 -:105A4000FFE7BD48FEF71CFF00288DD1FF20B6A15F -:105A5000733005F080FB87E7012C08D8002D06D0B5 -:105A600009E06D1E2C4302D105E0002C03D0194043 -:105A70001023194300E019400170D17D002915D091 -:105A8000517B012912D0AD48FAF77DFCAC480121C9 -:105A90000176F268116E526E42610161A749326966 -:105AA000FAF7D7FF0020FAF7E3FF03E0FAF76BFC01 -:105AB000FBF701F801210846FAF7E0FC03203070FB -:105AC000F8BD08282FD203007B441B79DB189F44C4 -:105AD00003060B0E11152528002926D023E00229E4 -:105AE00023D0032921D01EE007291ED01BE008295E -:105AF0001BD018E00A390B2917D914E00D2914D04E -:105B00000C2912D0002A04D00D290CD315290CD948 -:105B100009E0112907D3152907D904E0092904D080 -:105B200001E0012901D0002070470120704730B505 -:105B3000054683B08048FEF771FE002803D17AA1A4 -:105B4000804805F008FB774C2069FEF74DF80321EB -:105B50002069FEF76AF82069EF2201781140017090 -:105B60002946FEF7CBF80D2D76D22800784400792F -:105B7000001887441F1606448080840E7280848437 -:105B800060006848C16800698031497FFEF763F9A9 -:105B900075E06448C16800698031497AFEF7CCF944 -:105BA0006DE06048C16800698031896A491CFEF770 -:105BB0003DF964E05B4CE0688030406A817920699F -:105BC000FEF7F9F8E0688030406A01892069FEF745 -:105BD000E9F8E0688030406A41892069FEF7C7F83B -:105BE000E0688030406A81892069FEF7C9F8E06882 -:105BF0008030406AC1892069FEF7CBF83FE0494C0C -:105C0000E0688030416A2069091DFEF728F9E068E4 -:105C10008030416A20690C31FEF72DF9E068803050 -:105C2000416A20691E31FEF730F9E1682069803150 -:105C3000FEF738F923E03B4CA06901782069FEF7B4 -:105C400061F9A06981882069FEF75EF9A069418841 -:105C50002069FEF75DF912E00DE000200090694632 -:105C60000190087801210843694608702D480069B1 -:105C7000FEF764F903E02CA1334805F06CFAFEF757 -:105C8000DEFD002803D128A1304805F064FA0C2D70 -:105C90000ED0072D0ED0012D0AD0002D08D0022DD8 -:105CA00006D020480021C068403041810121817325 -:105CB00003B030BD1B480021C0684030018203B0F2 -:105CC00030BDF0B5174C8DB02079C0077ED060791B -:105CD00000287BD16069C0780E2878D20100794411 -:105CE000097949188F44737306733D5DE25C73FD57 -:105CF0007334FCA5E06854210A5C2030417D01200A -:105D0000FFF7DFFE00284BD16069FEF7A6F8E168D7 -:105D10009E22505402223520425400204031887483 -:105D20008873EFE1D80000207372635C6C6C5F6D68 -:105D300061737465722E6300E8000020E21F00208A -:105D40000820002083060000C7060000CD060000E2 -:105D5000E0682030C17C0A297ED10021C1750D2167 -:105D60001DE0E0683321095C0E2975D1A421095892 -:105D700040884988814203D0FAA1FE4805F0EBF93A -:105D8000E0688030416A60692631FEF7A2F8E16878 -:105D900060698431FEF7ADF8E06811212030C174EC -:105DA000B0E1E1683320405C112855D180318C4648 -:105DB0004B6AF14810260022082168440E33B51AB8 -:105DC000ED18203DEF7F4770AD7F01E0A2E17AE161 -:105DD0008570801C491E921C0029F0D161464B6AD7 -:105DE00003A810260022082103301E33B51AED182F -:105DF000203DEF7F4770AD7F8570801C491E921C4F -:105E00000029F3D16846FCF746FA08AD8DCDE1686C -:105E100000260E664E660D4670318DC10126203576 -:105E2000EE75D64E8DC6D64805F09EFA1320E8745E -:105E300068E1E0683321095C112901D00E293AD1CB -:105E40004030007D002836D16069FEF773F8E168C4 -:105E50000B460A46803300E02DE0187200254031E1 -:105E6000CD748D73586A51884088884203D0BDA193 -:105E7000C44805F070F9E06801468030426A157048 -:105E8000826B1378002B03D0D920B6A1800033E0B9 -:105E90004B88D380836B027A1A71826B1572836B85 -:105EA0000B221A70806B4988418008E1E068332139 -:105EB000095C152902D00220607123E1014600250A -:105EC0004031CD748D73A42109584088498881429E -:105ED00003D0A4A1AC4805F03EF9E068014601E01A -:105EE0002CE094E080314A6A15708A6B1378002B9D -:105EF00005D071209BA1C00005F02DF9DFE003461D -:105F000040331E7D002E0BD01D754388D3808A6BD5 -:105F100015718B6B0C221A70896B40884880CEE01B -:105F20004388D3808A6B15718B6B01221A728B6B3D -:105F30000B221A70896B40884880C0E0E0685421C9 -:105F40000A5C2030017D0020FFF7BBFD00280DD149 -:105F5000E06854210A5C2030C17C0720FFF7B1FDC6 -:105F6000002803D16079012108436071607900281D -:105F70004CD1E0684030807D800715D46069FDF722 -:105F8000CBFFE1684031C8756069FDF7C7FFE16884 -:105F9000403108836069FDF7C6FFE16802224031A5 -:105FA0004883887D10438875E068014640318A7DCA -:105FB000D20716D10A7D2030017D0020FFF781FD38 -:105FC000002803D167A1714805F0C5F8E0680121F8 -:105FD000342211540623A02213544030817400212E -:105FE0000182E06801462031CA7C012A03D10022E7 -:105FF000CA744E210A54A421095840884A88824212 -:1060000004D1087806287DD1002008707AE0E06885 -:1060100054210A5C2030C17C0620FFF752FD002885 -:1060200003D160790121084360716079002869D14A -:1060300069466069FDF793FF68460078C107C90F9C -:106040006846017004D0E06801214030017703E028 -:10605000E068002140300177E06800254E210D54B2 -:10606000A421095840884988814203D03DA148486D -:1060700005F071F8E06802468030416A0D70816B6E -:106080000B78002B04D037A1424805F064F816E0E5 -:106090005388CB80816B6B460D71816B1B880B81A4 -:1060A0006B465B884B816B469B888B816B46DB889C -:1060B000CB81836B06211970806B51884180E06829 -:1060C0002030C5741EE0E06854210A5C2030017D58 -:1060D0000020FFF7F6FC002803D160790121084376 -:1060E0006071607900280DD16069FDF73EFEE168BE -:1060F0008922505405223420425400204031088225 -:1061000001208874E2680023916ED06E491C5841CA -:106110009166D0660DB0F0BDF8B5FAF770F9FAF7F0 -:1061200063F9FAF76FF8FAF711F9FAF7C4FCFAF71E -:1061300025F9194CE06820300079012801D1FAF7DF -:106140007BF9E068012502462032917D002908D1C3 -:10615000E178CB0701D1890703D59575012101F0BD -:10616000F9FB1BE07372635C6C6C5F6D617374654B -:10617000722E630021030000FFFFFFFF08200020B4 -:10618000212000205F03000083030000C303000000 -:10619000F1030000F6030000D8000020E07900269B -:1061A00000284FD100F06DFDF848FEF737FB0028BE -:1061B00048D06079002845D1E06854210A5C20303D -:1061C000417D0120FFF77DFC00283BD1E0680246BD -:1061D0008032117F002901D0022051E00346203394 -:1061E000D97C05292AD0E927FF000C292DD00D29BB -:1061F00029D0132943D01B7D012B4BD0052B42D036 -:10620000526A1378002B61D0528843889A425DD13C -:106210004030027D0020FFF754FC00287FD0E0686A -:10622000A42109580978891E062978D20A007A44DF -:106230001279921897443A3C7373658CD449D548C7 -:1062400004F089FFB6E00B201AE0F5F71AFF0C28DE -:106250007DD3E06808218030406A1E30F5F712FFD8 -:10626000002806D0E06804218030F5F70BFF0028F5 -:1062700003D1C749384604F06EFF032000E0062032 -:10628000FFF755FC96E00720FFF751FCE06820304F -:1062900006758FE00C20FFF74AFCE06801464030AD -:1062A000827D2A43827520310E7583E000200BE049 -:1062B0002030C17D00290AD0007E002803D1B449D6 -:1062C000B54804F048FF0A20FFF731FC27E0F5F756 -:1062D000D8FE0C2823D3E06808218030406A1E30A5 -:1062E000F5F7D0FE002806D0E06804218030F5F7ED -:1062F000C9FE002803D1A649384604F02CFF03202C -:10630000E2E74030807D800709D10C20FFF70FFCC9 -:10631000E068403046818573817D294381759B48C3 -:10632000FEF77CFA002845D0E06854210A5C203052 -:10633000C17C0020FFF7C5FB00283BD0E168AC2002 -:10634000405C002836D0E0690078002802D031E0B7 -:106350000820B9E7088D0A282CD905220A31206ABD -:1063600004F042FD002822D0E0688030816A08787D -:1063700000280CD00522491C206A04F035FD0028B5 -:1063800018D1E0688030806A0078002806D1E06883 -:10639000216A8030806A401C04F0CEFFE0688030C3 -:1063A000806A0178491C01700120FFF7C0FBE0689A -:1063B000A0300673E078C007E06802D040308680E5 -:1063C00003E040308188491C8180E0689C21095CA1 -:1063D000002908D154210A5C2030417D0120FFF7BB -:1063E00070FB002804D0E06840300189491C01811D -:1063F000E0793D21002804D0E0684030817045708C -:106400005AE0207A02280AD001280AD060790028B0 -:106410001AD0420701D4C2060AD51E21ECE7162184 -:10642000EAE7E0689E21095C40308170457043E0F6 -:106430000207E1D4C10705D1800703D45449574866 -:1064400004F089FE2A21D7E7E06802464032917BBA -:10645000002905D05389591C518191898B4213D24F -:10646000917C002905D0118A4B1C13829389994293 -:106470000AD21789D3889F4203D39C21095C002943 -:1064800002D191898F4203D322209070557013E07E -:106490003621095C0029918805D0994209D308204A -:1064A0009070557008E0062903D33E209070557017 -:1064B00002E05178002908D0E06801462031CE740E -:1064C0000E758E752570022101E02570002101F006 -:1064D00041FAF8BDF8B50C4616466946FDF710F9C5 -:1064E000002801D00020F8BD009800250246803029 -:1064F000816B0B78072B1CD0A71C0C2B29D00B2BE6 -:1065000034D0062B4CD01146A031087C0028EAD0AC -:10651000657012202070087C002808D0A2320D740B -:10652000108A6080508AA080087C0028F7D1012062 -:10653000F8BD002EFBD1657007212170816B0A2206 -:10654000A01C091D04F07DFC00988030806B057054 -:10655000EDE7002EEBD165700C212170816B8A88EC -:106560006280C988A180806B0570E0E7002EDED1D3 -:1065700065700B212170816B8A883A80CA887A8085 -:106580000989B980806B0570D1E70000E800002020 -:1065900064610100BE0500007905000032020000C0 -:1065A000002EC4D1657006212170816B8A883A80E3 -:1065B000CA887A800A89BA804A89FA808A893A81A7 -:1065C000CA897A81806B0570B1E7FE48007801289E -:1065D00001D00C2070470020704770B5F94C05467B -:1065E0002078002803D0F849F84804F0B4FD0020D2 -:1065F000A5616072012020702078012803D0F24943 -:10660000F34804F0A8FD70BDF8B5EE4C21780129DF -:1066100001D00C20F8BDE0608030807AFEF707F8EA -:1066200000283AD0E0688030807AFEF757F90028D9 -:1066300033D0E0688030807AFEF7CCF800282CD088 -:10664000E0688030807AFEF708F9002825D0F9F755 -:106650008AFE0026E6710120F9F749FCE068014650 -:1066600040318A7B002A03D04A898B899A4211D211 -:106670008A7C002A03D00A8A8B899A420AD20B8923 -:10668000CA88934206D236231B5C8988002B06D029 -:10669000914206D30120A0703BE01220F8BD0629EC -:1066A000F8D2A6701330F9F7F0FDE0680F30F9F773 -:1066B0002EFD0320F9F754FEE06805462030017EE8 -:1066C000002902D1C07D002809D0294670318EC929 -:1066D000C0488EC02946C048803104F045FE98204D -:1066E000405BA91C401C82B228462830FDF772FD91 -:1066F000002803D0B449B94804F02DFDE0684030CB -:106700000078F9F716FDF9F727FE01210020F9F7C7 -:106710002BFDE67026716671A6712672022020702C -:10672000E06880300683F9F729FE0020F8BD10B537 -:10673000F9F719FEA34C2078022803D0F9F71EFEC2 -:106740000C2010BDA078002802D0FFF7E5FC17E070 -:10675000F9F736FEFFF7F0F8E068203000790128FD -:1067600001D1F9F772FE607A002809D0012809D01A -:10677000022805D0032805D09349994804F0EBFC82 -:10678000002010BDECF744FCFAE770B505468030F8 -:10679000018B2C46491C01834034A188491CA180EF -:1067A000A17B002902D06189491C6181A17C00295B -:1067B00002D0218A491C2182007F002807D1352080 -:1067C000415D227D0120FFF77CF9002802D020895D -:1067D000401C2081284600F0EBF9002070BD79496B -:1067E00048727047774A1162D0617047F8B5754CAE -:1067F0002078032803D074497A4804F0ACFCE1689F -:1068000004272031887A0025002803D08D72207952 -:1068100038432071206901260278D2439207002A6A -:106820001FD1CA7A002A1CD1CE72217902221143CB -:106830002171FDF79AFA062802D00B2811D10AE03F -:10684000E06801462030C27C132A0AD100228A6601 -:10685000CA66067605E0E0682030C17C0D2900D1CB -:1068600005762079400704D5E0682030407D022875 -:1068700005D06079002802D1A079002802D0FFF766 -:106880004BFC2AE05848FEF73CF8002801D0657020 -:1068900002E0667055486061E0682030007E0028A4 -:1068A00011D05348F9F76FFD4A480576E268916EBA -:1068B000D26E426101614E4A6169FAF7CAF801205D -:1068C000FAF7D6F804E06069F9F75DFDFAF7F3F836 -:1068D00002210020F9F7D2FD2770207801280CD082 -:1068E000607A002809D0012807D0022806D00328A2 -:1068F00004D035493F4804F02EFCF8BD0120F9F7DB -:1069000073FEF8BDF8B52F4C05462078042803D057 -:106910002D49394804F01FFC002D71D0FAF7E3F837 -:106920000125002812D1E0682030017E00290DD019 -:1069300061694A78D20609D00978C07B0907C90F76 -:10694000814203D1E571FFF7E7FBACE0E06820305E -:106950000079012811D1F9F76FFDE168881C283111 -:10696000FDF728FD002808D0E068B22142880A52CD -:106970003121095CA030017505746069002600783A -:106980004007C10FE0682030827B914255D0407BA8 -:10699000002852D002280FD1FDF780FE002803D135 -:1069A0000949164804F0D7FBE2680023106E516EC7 -:1069B000401C594151661066E06820304673C17A28 -:1069C00001291EE0D800002064610100EF070000EB -:1069D000FB07000008200020212000203A080000CA -:1069E0007A080000AF080000EC000020C01F002063 -:1069F000E21F0020F3080000FB080000FD05000076 -:106A0000B1E014D1C6722079082108432071FDF746 -:106A100046FF002803D1FE49FE4804F09CFBE268D3 -:106A20000023106E516E401C594151661066E0689B -:106A30002030817B012948D08573606901788C46BC -:106A40000907CF0FE1680A462031CB7B9F420CD16A -:106A50006746BF07BF0F012F4FD0022F4DD0032F26 -:106A600035D06079042108436071E0782843E070F4 -:106A700020690078C00604D460690078C00600D49C -:106A800061E720790028FBD160780028F8D100F078 -:106A900056FF0028F4D060790028F1D1A0790028B1 -:106AA000EED1FEF749FF207801280DD0607A00284A -:106AB0000AD001285CD0022806D0032858D095209F -:106AC000D349000104F047FBF8BD8673B5E7FDF735 -:106AD000D3F800280CD0E068203085722179294352 -:106AE0002171C17B012901D1C673BEE7C573BCE723 -:106AF0006079102108436071B7E74078C7062CD051 -:106B00006378002BB1D1C006C00E1B28F0D84032EC -:106B1000127DC97C0520FEF7D4FF002804D0A0799F -:106B200008210843A071A0E7E07804210843E07041 -:106B3000FDF70EFF002803D1B549B74804F00BFB61 -:106B4000E0680023816EC26E491C5A41C2668166AC -:106B50002030C17B0129C9D1C6E7012B01D0CD73FB -:106B600083E7CE7381E7E07802210843E070EAE62C -:106B70000120F9F739FDF8BD10B5A84800780428C0 -:106B800003D0A349A64804F0E6FAFFF7C5FA10BD02 -:106B900036210A5C40308188091D002A04D0C08853 -:106BA000814203D3012070470629FBD200207047A1 -:106BB000F8B5054606462036F07C2C460027803482 -:106BC000072820D1288DE18D401C884258D1A16A28 -:106BD00028460A30491C04F0AFFB01220221284656 -:106BE000FDF7ABFAF77401215E204155A06A0078E9 -:106BF000002804D1A1208649800004F0ACFAA16AE3 -:106C00000878401E0870F07C082839D1616A288D08 -:106C10008988401C884233D1A06B0178002904D0B8 -:106C20007B49804804F097FA15E06988C180606A62 -:106C3000A16B40890881606AA16B80894881606A84 -:106C4000A16BC0898881A06B0771A16B07200870B8 -:106C5000A16B68884880012211462846FDF76DFA2D -:106C60000321284600F076FE606A698840888842E1 -:106C700003D067496C4804F06EFA606A0770F774D5 -:106C8000F8BDF8B5654C6079002875D120790126EA -:106C900040070025002815DAE0682030C07C022873 -:106CA00002D0052807D102E05949604801E058495F -:106CB0005F4804F050FAE0682030417D022901D19C -:106CC00026724575207908278007002840DA607908 -:106CD00000283DD12069C0780D2875D20100794483 -:106CE000097949188F4449350681FCFCBB1722FC01 -:106CF0005B71CA00E06854210A5C2030417D0120AC -:106D0000FEF7DFFE002823D1E0680321352211546D -:106D100040308573E2E0E06854210A5C2030017D58 -:106D20000020FEF7CEFE002870D1DDE0E06854219F -:106D30000A5C2030C17C0020FEF7C3FE002803D18E -:106D400033493C4804F007FAE06809212030C17457 -:106D5000CAE0E06854210A5C2030C17C0020FEF7C4 -:106D6000B0FE002803D12A49334804F0F4F9E06862 -:106D700007212030C174B7E0FBE0E06854210A5CD1 -:106D80002030C17C0020FEF79CFE002803D1204962 -:106D90002A4804F0E0F9E0682030C774A4E0E06815 -:106DA00054210A5C2030C17C0020FEF78AFE0028B6 -:106DB00003D11749224804F0CEF9E06853210E545C -:106DC0000A212030C1748FE08AE0E0682030C07C66 -:106DD0000D2803D00E491B4804F0BDF9E06854218A -:106DE0000E540C212030C1747EE0E06854210A5C0E -:106DF0002030C17C0020FEF764FE002828D1E06826 -:106E00004030007D002823D101491DE064E00000EE -:106E1000646101000E06000057060000D800002043 -:106E20005809000091020000A50200006A04000059 -:106E30006E040000AC040000B1040000B6040000C1 -:106E4000BB040000C20400009920C00004F083F9D4 -:106E5000E06853210E540E212030C17444E0E068F4 -:106E60002030C07C132804D04D204349000104F099 -:106E700072F9E06815212030C17435E0E068A42182 -:106E8000095843884A889A421CD10978062919D1A1 -:106E900054210A5C2030C17C0020FEF712FE00283D -:106EA00003D13549354804F056F9E06801464031D0 -:106EB0008A7D920702D42030C67403E08D7380303F -:106EC000406A0570E06854210A5C2030017D002092 -:106ED000FEF7F7FD002807D0E0684030857403E036 -:106EE0002549274804F037F9207900070AD5607949 -:106EF000002807D1E0682030417D032902D102211A -:106F000021724575FEF7DDFEA07900072ED5E068F9 -:106F100054210A5C2030C17C0520FEF7D2FD0028F8 -:106F20000BD0607938436071E0688030816B0878FD -:106F30000B2800D10020087018E0E07804210843F5 -:106F4000E070FDF705FD002803D10B490D4804F062 -:106F500002F9E0680023816EC26E491C5A41C26684 -:106F600081662030C17B012904D0C673E068FFF739 -:106F70001FFEF8BDC573F9E764610100DC04000081 -:106F8000F6040000EA020000F7B582B00646039856 -:106F900017468188FE48FE4A41430398039D008BB3 -:106FA00000245043009080352A7C002A0CD0F948F8 -:106FB000012A40683CD0022A1FD0032A38D0F6A10B -:106FC000F94804F0C8F84BE0002F04D17D20F2A16D -:106FD000C00004F0C0F8EF4C6068002803D1EEA1B7 -:106FE000F24804F0B8F86068A168001D0918F04A7A -:106FF000009880180C18012018E0791E084303D16E -:10700000E5A1EC4804F0A7F8EB48016800980C18DB -:10701000002F0AD0DF484168E8480818A04204D988 -:107020008120DDA1C00004F096F80320287415E04B -:107030000C46002F12D0D74F002806D178780028B0 -:1070400003D0D5A1DE4804F086F8DC48796808183A -:10705000A04203D9D0A1DB4804F07DF8002C03D175 -:10706000CDA1D94804F077F821466869F5F7D9FF32 -:10707000686100203070012434716869B060039841 -:10708000FFF786FD002801D0747104E0287C0128F8 -:1070900005D003207071CD48F06005B0F0BD02202E -:1070A000F8E7F0B5054687B00F46012000F01BFD5C -:1070B000C4B20B2000F017FDC0B2844204D0FF2000 -:1070C000B5A14D3004F047F8012000F00CFDC4B22A -:1070D000182000F008FDC0B2844204D0FF20AEA109 -:1070E0004E3004F038F83846B94F6C1E6900CD199F -:1070F0000026403D09287DD20100794409794918CC -:107100008F44044150504CE9E9E9A0000B2C04DB0A -:10711000FF20B0A1213004F01EF8E88F6946FCF78B -:10712000EFFA002804D0FF209BA1563004F013F89A -:107130000B2C04DBFF20A7A1213004F00CF80099F0 -:10714000E88F4988884204D0FF2093A1583004F08A -:1071500002F800988030007C002804D1FF208EA126 -:10716000593003F0F8FF8B484660467086600098FF -:10717000FFF74AFA002804D0FF2087A1603003F00F -:10718000EAFF07B0F0BDFFF7D2FA0028F9D0FF20E0 -:1071900081A1663003F0DFFF07B0F0BDF9F727FAF1 -:1071A00007B0F0BD0420C04300F09DFCC6B219201A -:1071B00000F099FCC0B2864204D0FF2076A1723064 -:1071C00003F0C9FF0B2C04DBFF2082A1213003F068 -:1071D000C2FFE88F6946FCF793FA002804D0FF202D -:1071E0006DA1763003F0B7FF0B2C06DBFF2079A1F1 -:1071F000213000E06FE003F0AEFF0099E88F49888E -:10720000884204D0FF2064A1783003F0A4FF0098E6 -:10721000FFF7BBFA002804D0FF205FA17B3003F00A -:107220009AFF009C0022214602A8FFF7ADFE8034A1 -:10723000A07E02A9F6F7DAF80099088D401C0885AF -:1072400007B0F0BD0B2C04DBFF2062A1213003F05E -:1072500082FFE88F6946FCF753FA002804D0FF202C -:107260004DA1863003F077FF0B2C04DBFF2059A1E2 -:10727000213003F070FF0099E88F4988884204D0DC -:10728000FF2045A1883003F066FF00988030007C25 -:10729000042804D0FF2040A1893003F05CFF009C4B -:1072A00080342674A57E4F4F681E0B2804DBFF2018 -:1072B00048A1273003F04FFF4548690008184038BF -:1072C000C787A07EF5F700FC4748A6760078EBF765 -:1072D0001BF807B0F0BDFF202FA193304FE770B52A -:1072E000424C0646E08B0025401C80B2E0832378A8 -:1072F0000A46002B09D021464968042B0BD0052BE8 -:1073000017D03D2024A1000102E0ED2022A1800041 -:1073100003F021FF14E00A2801D3022000E003203B -:107320007071002A0BD00320226900F0F5FB05469E -:1073300006E002207071002A01D02D4D00E00D46BC -:1073400029462069F5F76DFE002120613170012189 -:107350003171B060A068FF303130F06070BDF0B5C1 -:10736000074685B00E46012000F0BDFBC4B20B20DD -:1073700000F0B9FBC0B2844204D0FF2006A19E30C9 -:1073800003F0E9FE012000F0AEFBC4B2182031E0AA -:10739000E2040000302000207372635C6C6C5F6C50 -:1073A0006D2E6D302E6300001C040000E903000008 -:1073B0005504000003040000000100205F040000E9 -:1073C00016040000170400001F040000F60400006B -:1073D0005C2000207372635C6C6C5F6C6D2E6D3092 -:1073E0002E630000FFFF0000FC0000203C20002076 -:1073F000B80B000000F077FBC0B2844204D0FF203D -:10740000FD499F3003F0A7FE00250120FB4C092E0B -:1074100070D231007944097949188F44041A3737FA -:10742000336B6B18520060732073607800280ED1A4 -:10743000F348456085602573A068C338FDF791FC6B -:10744000002804D0FF20EC49B33003F084FE05B0DF -:10745000F0BD6178002909D0207B002801D1FDF71B -:10746000C2FD6573F5F796FA05B0F0BDA073FDF7A0 -:1074700000FD0028F8D0FF20DF49C73003F06BFE85 -:1074800005B0F0BDF9F7B3F805B0F0BD0420C04376 -:1074900000F029FBC4B2192000F025FBC0B28442E1 -:1074A00004D0FF20D449D53003F055FE012200213D -:1074B0006846FFF714FF69463846F5F797FF05B0B1 -:1074C000F0BD2078052804D0FF20CB49E13003F03F -:1074D00042FE207F002804D1FF20C749E23003F09C -:1074E0003AFE25772570207DF5F7EEFA257505B073 -:1074F000F0BDFFE7FF20C049ED30A6E7F0B5BF4C77 -:1075000087B020780026042805D02078052802D0EE -:107510000C2007B0F0BD01276770607B00250028B4 -:1075200027D072B6607B002808D0A07B002805D049 -:10753000FDF759FD6573A573F5F72CFA62B6207D4A -:10754000F6F782FD002827D0207F002808D0257775 -:107550002078052803D0A849AA4803F0FCFD0C2692 -:1075600065702570207DF5F7AFFA2575304607B0B8 -:10757000F0BD207D00900320694608734873F5F73D -:10758000BEFA04900020C043694605900F7202A91C -:107590000098F5F72BFFD2E720BFD0E7F0B597486A -:1075A00083B00078002801D0FFF7A8FF944F012096 -:1075B0003870FF26944D2D36002405E00B2C03D3A4 -:1075C0009249304603F0C7FD204601A9FCF798F820 -:1075D000002838D101988030007C002833D00B2C53 -:1075E00003D38A49304603F0B6FD2046AC422ED084 -:1075F0006946FCF785F8002803D08449844803F0E5 -:10760000AAFD00988030807EF6F71EFD002822D06B -:107610000098002180300174847E0C2C04D3FF205C -:107620007A49273003F097FD7A48610008184038FE -:10763000C58700988030807EF5F746FA00990020D3 -:1076400080318876B8E7641CE4B2032CB6D30020FE -:10765000387003B0F0BD20BFD3E710B500786E4C92 -:1076600000280FD001280CD068496C4803F073FD46 -:10767000A0686B49884203D364496A4803F06BFDF4 -:1076800010BD6948A060F3E710B55D4900220A709B -:10769000614C207059480270427002770273427345 -:1076A0008273826102752030574B0380052143802D -:1076B0008380001D491EFAD1100004D0002A04D096 -:1076C0005948A06005E0A26003E05049534803F028 -:1076D00042FDA0685249884203D34C49514803F007 -:1076E0003AFDFFF75BFF10BD70B5444C0E462178A4 -:1076F00084B01546002902D00C2004B070BDA061F2 -:107700008030007C002803D03B49484803F023FD2B -:107710004748464345434748ED1C30186660A5601E -:10772000854200D82846A0603549002088600521A0 -:10773000217060702077E0833F48F5F771F920757C -:10774000002803D12C493D4803F005FDF5F7D7F992 -:107750002061002201216846FFF7C1FD207D6946B6 -:10776000F5F744FE002004B070BD08B50020C0430A -:107770006946088021480078002801D0002008BD13 -:107780000846FBF7F5FF0028F9D0012008BD10B529 -:107790001A4C84B02278002A02D00C2004B010BD0C -:1077A000234A51435043C91C224AA160606080189B -:1077B000814200D80846A06000206070042121703A -:1077C000E0831D48F5F72CF92075002803D10A49FC -:1077D0001B4803F0C0FCF5F792F91A49F5F721FCB4 -:1077E0002061002201216846FFF779FD207D69466E -:1077F000F5F7FCFD002027E0987301003C200020F5 -:107800003020002076020000FFFF0000D47301004A -:10781000190300005C200020FC000020510500003E -:107820006A1800005A050000C40900008B0200001D -:1078300071020000B3FBFFFF5F73010097020000BD -:10784000C6020000B80B000004B010BD10B5E14C3A -:10785000A1690160FFF752FE0021A16110BD70B562 -:10786000DC4C84B02078052802D00C2004B070BD18 -:10787000A069002803D1D849D84803F06CFCA0695E -:107880008030007C002803D0D349D54803F063FC46 -:10789000A0698030807E002803D0CF49D14803F012 -:1078A0005AFCD148F5F7BCF8A1699A225054054614 -:1078B0004E88401E0B2804DBFF20C749273003F009 -:1078C0004AFCCA49680040184038C687A069803021 -:1078D000807E002803D1C049C54803F03CFC01224A -:1078E0006846A169FFF750FBA06969468030807E39 -:1078F000F5F77CFD0020A06104B070BD10B5BD4956 -:107900004C68983400280ED001280FD0022811D0DE -:107910003520B949000103F01EFCAE488068A04242 -:107920000BD9012010BDFF347934F6E7B120800077 -:107930002418F2E7FF346134EFE7002010BDAD48B2 -:107940004178002902D10078002801D0002070473A -:107950000120704770B504460422A84E803484B0DC -:1079600000290DD0012923D0022907D0032921D0D5 -:10797000A149A34803F0EFFB04B070BD227410E0EE -:1079800005469C4800780028F8D12946012268461F -:10799000FFF7FAFAA07E6946F5F728FD288D401C0E -:1079A0002885F4F7F7FF3078EAF7AEFC04B070BD35 -:1079B000032010E08188934A5143934A1160616A21 -:1079C0000A8902838A7982754A8982808A89C2807B -:1079D000C98901810220207404B070BDF0B5874EC2 -:1079E0000146307800257B4C85B0002908D001295C -:1079F00016D0022942D0032958D07F49834839E064 -:107A0000E583EAF781FC6078002849D1002211461D -:107A10006846FFF764FC207D6946F5F7E7FC3FE028 -:107A2000744F20697968774B401879494218A069EA -:107A300081884088594300F06FF8B1680546884254 -:107A400005D2A1696F4A88884243551903E06D4900 -:107A500003F060FAA1690883A06905218175008B94 -:107A600068494843281A6B49B860884204D32520E6 -:107A70005949400103F06FFB05B0F0BDE583EAF71B -:107A800043FC01202077A0692169803041610574A1 -:107A9000FFF7E5FE002803D04F495F4803F05BFB8A -:107AA000F4F778FF6573A57305B0F0BDEAF72CFC19 -:107AB00005B0F0BD704710B54E4A00290ED001291F -:107AC00006D0022906D04C49544803F044FB10BDAF -:107AD000401E03E05178491C5170001F506010BDDA -:107AE0003C48007870478107C90E00280BDA000770 -:107AF000000F083880084A4A80008018C069C840D2 -:107B00000006800F70478008464A80008018006891 -:107B1000C8400006800F7047F7B582B00D46064694 -:107B2000414F002406E00B2C04D3FF202A492D30BE -:107B300003F011FB204601A9FBF7E2FD00280ED15E -:107B400001988030007C002809D00B2C04D3FF2042 -:107B500021492D3003F0FFFABC4204D006E0641C3A -:107B6000E4B2032CDFD3002005B0F0BD6946204607 -:107B7000FBF7C6FD002803D017492C4803F0EBFAA9 -:107B8000A64204D1DD201449800003F0E4FA28481D -:107B9000341B44430098803041690498F6F7C8F9D3 -:107BA000041908D5281B66422946401E03F0C0F977 -:107BB0006843841B05E02946204603F0B9F9684371 -:107BC000241AAC4203D904491A4803F0C4FA2046E7 -:107BD00005B0F0BD3C200020D4730100E702000096 -:107BE000E9020000EB020000A37001005C2000200D -:107BF000EE0200003020002098730100FC000020FD -:107C0000ED040000E204000000010020190500005E -:107C10004E0600006A180000B3040000360500009C -:107C200000ED00E000E400E0FFFF00007103000051 -:107C3000770800008903000070B5F84E0446B0795B -:107C40000025012805D0F64E307A01280CD00020FE -:107C500070BD002915D1657014202070F149A01C59 -:107C600003F082FBB5710CE000290AD16570132086 -:107C700020701C22EC49A01C03F0E3F80120A07145 -:107C80003572012070BDE648007A002802D0E7482E -:107C9000808D7047E6487047F8B5E64801780029BE -:107CA00002D00C263046F8BD0026E04D34462E7535 -:107CB0006E75EE752E76AE75DF496E734E73D84FC6 -:107CC0007F217E718170687E002804D0F8F7ABFBBD -:107CD000F8F754FF6C763C72D848FBF711FED84891 -:107CE000FBF70EFEDEE770B5D24A00251570CC4ECC -:107CF000D44B35711966D8651078002805D0FF205F -:107D0000D1A17A3003F027FA70BDC84C257565758E -:107D1000E5752576A575C8486573457375717F202F -:107D20009070607E002804D0F8F77DFBF8F726FFFE -:107D300065763572C148FBF7E3FDC148FBF7E0FD0E -:107D400070BDBA48007D704710B5B849C87B897BC3 -:107D500042078307D20FDB0FC007D218C00F1018DD -:107D60004000052911D20A007A44127992189744EA -:107D7000090509020700B849085A10BDB74810BDE7 -:107D8000B74900E0B749085A10BDFF20AEA19A30AC -:107D900003F0E1F9002010BDA448B349008A48432C -:107DA00070479F488079002800D001207047F8B5BF -:107DB00006469E4C407BE07330790027A073012873 -:107DC00025D0308820829648B37B83719D4DA7488B -:107DD0002970114603F0BBFAB0796873F11DA4480D -:107DE00003F0B5FA607B0126002800D06675924842 -:107DF000407B002800D0A675A07B05284DD201004D -:107E00007944097949188F440409262B09002782EF -:107E1000D9E700218948FBF778FD25E00121874853 -:107E2000FBF773FDE91D8548FBF7A4FD687B00287F -:107E300007D001280AD0FF2083A1E83003F08BF996 -:107E400012E000217D48FBF7A6FD0DE001217B48F3 -:107E5000FBF7A1FD08E006217848FBF756FD03E09B -:107E600002217648FBF751FDE7752776691C7348B8 -:107E7000FBF774FD29787148FBF781FD04217048F8 -:107E8000FBF743FD691C6E48FBF768FD29786C48D9 -:107E9000FBF775FD26750020F8BDFF206AA1F230C2 -:107EA000CCE770B5614C012525765D4A127A002A2F -:107EB00001D03A2070BD634A13780022834205D175 -:107EC000E2756A4803F043FAE57500E02276002087 -:107ED00070BD70B50446554D0020A8752246654812 -:107EE00002F0AFFF544844730120A87570BD4C499F -:107EF0000871704710B54D4C0022627560730246E0 -:107F00005D4802F09EFF0120607510BD4449487134 -:107F10007047F8B5474D287800282CD1434C207D78 -:107F2000002828D0F8F71FFA0026A674E6746E70B1 -:107F30003046F8F715FA0020F7F7D9FF4F48F8F761 -:107F4000E6F84F48F8F7A1F9F8F73AFAE07B01278D -:107F5000C107002902D0A17CC9070ED0810712D524 -:107F6000A17C89070FD42620F8F7E3F8A07C022132 -:107F70000843A07413E00C20F8BD2520F8F7D9F8C9 -:107F8000A07C38430AE0400709D5A07C400706D40E -:107F90002720F8F7CEF8A07C04210843A074F8F756 -:107FA000DBF901210020F8F7DFF80F210520F8F7B1 -:107FB00022F8244D2978681CF8F711F8A07B0128D5 -:107FC0000AD0042808D0607D002805D0627B2A49A9 -:107FD0001A48FBF7FAFC6675A07D002806D0164803 -:107FE0002449427B9830FBF722FDA675286E017864 -:107FF000002903D00178001DF8F734F8E86D017806 -:10800000002904D01F4A401CF8F797FD6776F8F75F -:10801000B5F90020F8BD074948607047F4200020FA -:10802000D4200020FB200020DE200020B4200020EF -:10803000FFFF000008010020942000200421002000 -:108040002C210020742000207372635C6C6C5F61D3 -:1080500064762E630000000066B401009A89130064 -:108060006EB401005EB401007102000075200020B2 -:108070007B20002082200020A220002059B4010093 -:1080800056B4010057210020F8B50126FE4C0546E4 -:10809000002824D0E07B2146C207897C002A01D039 -:1080A000CA070BD082070FD58A070DD42620F8F710 -:1080B00040F8A07C02210843A07410E02520F8F7C6 -:1080C00038F8A07C3043F7E7400708D5480706D4C6 -:1080D0002720F8F72EF8A07C04210843A074E07C48 -:1080E00000280AD0A07B012804D14B20E7490001D9 -:1080F00003F031F800F0BDFAF8BD002D0CD00221DC -:108100000020F8F731F8E2480079032801D001286F -:1081100002D10220F8F768FAE07D002700280AD093 -:10812000DC4DDD48691CFBF719FC691CDB48FBF7DB -:1081300015FCE7752776D848F8F725F9A07B0528C0 -:108140000CD201007944097949188F440202020BCC -:10815000020001210846F8F791F903E0CB49D04825 -:1081600002F0F9FFE07BA17C884303D1A07B0128CA -:1081700003D0E674CB480670F8BDA774FAE710B5D3 -:10818000F8F7F1F8C7480078002816D1BE48007DFE -:10819000002812D00020FFF777FFBD4800790028A3 -:1081A00009D0012815D0022805D0032811D0B749DD -:1081B000BD4802F0D0FF002010BDF8F720F9F8F715 -:1081C00013F9F8F71FF8F8F7C1F8F8F7D7F80C200B -:1081D00010BDEAF71DFFEEE7B24901204870704775 -:1081E000F8B50024FAF7AAFE002822D0FF202D308F -:1081F000F7F7B7FFAB4D2878A54F01281CD0022810 -:1082000001D0032831D0CF20A049800002F0A3FF85 -:10821000287800280CD03879002809D0012807D008 -:10822000022835D0032833D09849A04802F093FFA4 -:10823000F8BD00F01EFAF8BD934EB07B032814D0B1 -:10824000707E002803D0F8F788FCF8F7E4F8984827 -:10825000F8F799F8B07B012812D0042810D0B8792B -:10826000012806D0032804D004E00120FFF70CFF0A -:10827000CEE7102421460E2001430020F8F7FEF837 -:108280007879012801D1F8F7E0F802202870BFE7DB -:1082900028780228CFD10120F8F7A6F9F8BD70B5EB -:1082A0007B48804C4079012808D18248F8F7D6F8FD -:1082B000002801D17F20A070F8F7BEF8724D687ECB -:1082C000002803D0F8F7AFF8F8F758FCFAF736FEB5 -:1082D00000280BD02078022804D0DD206B498000D4 -:1082E00002F039FFA87B012803D006E000F0C1F9B5 -:1082F00070BD99208000F7F734FF0120FFF7C4FE1E -:1083000020780028F4D020780128F1D05F496A480D -:1083100002F021FF70BDF0B5044689B00020069040 -:108320000190F7F7F1FE03905E480078022803D031 -:108330005649624802F00FFF554D6879012809D16E -:108340005C48F8F78BF8002802D156497F208870E6 -:10835000F8F772F85648FBF7FDFA4B4E0746002C2B -:108360006FD05348FBF700FC00286AD0F7F740FEB7 -:10837000002866D0707E00280AD00524641EE4B26E -:10838000F8F71DFC022811D0012800D00020019030 -:10839000474A4B4CD01C0290062F52D238007844EA -:1083A000007900188744B4B4B409B44E002CE5D168 -:1083B00044A1484802F0CFFEE8E7B07B012840D056 -:1083C00004283ED001990398084304D1A8790028D5 -:1083D00001D0022835D1687901281AD1A079002866 -:1083E00017D10120A07110784006C00FE0713A4803 -:1083F000029902F0ACFF2B4C384FA0787F2804D1B3 -:10840000532030A1000102F0A6FEA07838707F2032 -:10841000A0702248F7F7B7FF22480321017028799E -:10842000002877D0012808D0022873D0032804D070 -:1084300024A12B4802F08FFE6CE00120F8F7D4F85D -:1084400068E065E01348D178C07981424AD111488B -:108450001179037A994245D15179437A994241D1B0 -:108460009179837A99423DD1D179C37A994239D1B0 -:10847000117A037B994235D11178407B4906C90FA7 -:1084800081422FD101212EE0B4200020488001003C -:10849000D420002074200020042100202C21002062 -:1084A000DE04000008010020D1020000510300009A -:1084B000542100200A01002083030000C1030000B2 -:1084C000F42000207372635C6C6C5F6164762E63D1 -:1084D00000000000AB030000FC200020022100206F -:1084E000090400000021B07B012801D0042801D13B -:1084F00000290AD100280BD101990398084304D11F -:10850000A879002801D0012802D1307E00281FD090 -:1085100001200690707E002803D0F7F784FFF8F75B -:108520002DFB0698002802D00120FFF7ADFD73480F -:10853000017800290AD00178012907D000780328A2 -:1085400004D049206E49000102F005FE09B0F0BDDB -:108550006A486C4F4068397BC173797B0174B97B81 -:108560004174F97B8174684909784906C90FC1765D -:108570001C30029902F0EBFE6048397C4068C174FF -:10858000797C0175B97C4175F91E897D81750299E7 -:108590004A7D0B7D110219430183F91E8A7E4B7EB1 -:1085A00012021A438280029A537E177E1A023A43BD -:1085B000C2808A7F4B7F11021943018153490A30DF -:1085C00002F0BAFE52480179CA064C49D20E4968F7 -:1085D0008A7600794009C0310871287A002803D0D2 -:1085E00047494C4802F0B7FD0020A87243484B4968 -:1085F00047687888B085F87EE873B88B2882F88B56 -:108600006882388CA88244480078A875444802F0F3 -:108610009EFEB888F087F888208038896080C0374F -:10862000387920710198002860790BD00121084326 -:108630006071F8F7DDFA61794000C907C90F01439D -:10864000617102E0400840006071012028722B4CEB -:1086500000202070F7F7D3FEF7F7C6FEF7F7D2FD3C -:10866000F7F774FEF7F78AFE01206168FAF785FDD7 -:1086700050E7F8B5F7F7C3FEF7F7B6FEF7F7C2FD18 -:10868000F7F764FE274E0027707E002804D0F7F726 -:10869000CAFEF8F773FA7776184D2F70F7F76EFE6B -:1086A000B07B012804D000210846FAF766FDF8BD2A -:1086B00000210220FAF761FD1B4C207A002803D02C -:1086C0000F491A4802F047FD68780028EFD0124899 -:1086D000417BE1730078A0751549164802F037FE1A -:1086E0000E490F4802F033FE3C20A07268684088B3 -:1086F000B085012020726F70F8BD000008010020D5 -:10870000C48401005721002054210020732100203F -:10871000742100203D0400007420002075200020FA -:10872000EB200020B4200020D42000204F020000C5 -:108730007B200020E4200020F8B5FBF7FBFF044677 -:10874000FCF7BFF8FE4E054670692030407B0028DC -:1087500026D0012844D0022846D003284DD0FF203F -:10876000F8A19C3002F0F7FCB069F72201781140C3 -:10877000017072692032937BDB071B0F1943FB23C7 -:1087800019400170D37BDB075B0F19430170577BE6 -:10879000EF23022F3CD0012F3FD0032F41D046E0E2 -:1087A000EC48FCF76DF8002804D0716903202031F3 -:1087B0004873D9E7E748FBF74DFF002804D07069FC -:1087C0005321095C002907D0E248FCF700F87169E1 -:1087D000012020314873C7E7022120304173C3E7ED -:1087E000DC48FBF7F4FFBFE7DA48FBF733FF00286C -:1087F000BAD1FF20D3A18E3007E0D648FCF740F86D -:108800000028B1D1FF20CFA1963002F0A4FCABE745 -:10881000012C08D8002D06D009E06D1E2C4302D192 -:1088200005E0002C03D019401023194300E0194043 -:108830000170D17D002915D0517B012912D0C64885 -:10884000F7F7A1FDC548002101767269116E526EDD -:1088500042610161C049B269F8F7FBF80020F8F7FE -:1088600007F903E0F7F78FFDF8F725F9B06900780D -:10887000C00606D4F0690078C00602D4F07900285A -:1088800006D0B079002803D101210846F7F7F6FD9C -:10889000032030703079002803D1F7F791FD0120D3 -:1088A0003071F8BD10B5A649002348690246203052 -:1088B000C37483750120412398548032927F002A2B -:1088C00003D008700021022001E000210320FAF704 -:1088D000D2FB10BD06281AD202007A4412799218EF -:1088E00097440205090D101000290ED00FE0891ED3 -:1088F00002290AD90BE0891F012906D907E00829B6 -:1089000003D004E00B390B2901D801207047002067 -:10891000704730B5044683B08E48FBF77FFF0028D0 -:1089200004D1F52087A1C00002F015FC844DA86990 -:10893000FBF75AF90321A869FBF777F9A869EF2239 -:108940000178114001702146FBF7D8F90E2C5BD25B -:1089500020007844007900188744565606561F5A5E -:108960005A175642565A312B75485D224169525C5E -:10897000002A04D006218069FBF76DFA48E0C03177 -:10898000C9798069FBF767FA42E06D4841698069FF -:108990008031497AFBF7D0FA3AE0694D6969A869F4 -:1089A000B031FBF791FA6969A8698431FBF798FA4D -:1089B0002EE0634806218069FBF7BAFA28E0604D93 -:1089C00028690178A869FBF79DFA28698188A86958 -:1089D000FBF79AFA28694188A869FBF799FA17E02A -:1089E000002000900190564841694031097F0029DC -:1089F00005D06A461178012211436A461170694612 -:108A00008069FBF7A7FA03E04EA1554802F0A3FBEB -:108A1000FBF715FF002804D17F204AA1000102F0D6 -:108A20009AFB0C2C0AD0072C06D04548002140693F -:108A3000403041810121817303B030BD40480021A5 -:108A400040694030018203B030BDF0B53C4D064670 -:108A500068698DB020300079012801D1F7F7ECFC6E -:108A60000024012E1ED168692030017E002902D128 -:108A7000C07D002801D0F8F71EF8F7F7C0FCF7F723 -:108A8000B3FCF7F7BFFBF7F761FCF7F777FC687902 -:108A9000C006686902D58030048703E08030018F0A -:108AA000491C018768790226C107002901D1800786 -:108AB00013D568692030817D002902D0032907D0B1 -:108AC0000BE00121817500210120FAF7D4FA04E0BE -:108AD000867500210120FAF7CEFA68692030817D81 -:108AE000012903D16979090700D586751448807A70 -:108AF000002861D100F015FF1648FBF78FFE002813 -:108B00005AD00F4D287A002856D16869C621095CD1 -:108B100000290ED02030C17C0120FFF7DBFE0028A9 -:108B200007D168692030C17C0420FFF7D3FE0028FC -:108B300018D06869CB21095C062919D01FE0000014 -:108B4000100100207372635C6C6C5F736C617665FE -:108B50002E6300002801002080210020A821002091 -:108B6000EA070000686940300481447702204DE044 -:108B70002030C17C0420FFF7ADFE002815D06869C5 -:108B80002030C07C801E15287ED2010079440979EE -:108B900049188F449B9B9B1C9B9B9B979B1E9B9B5D -:108BA0009B243E9B9B9B9B9B900068695621095C84 -:108BB000C90702D0C030C472AEE00C20FFF7A9FE96 -:108BC000686901224030817D11438175A4E007204E -:108BD0001CE0FBF7F0FE00286CD00B2016E0F3F74A -:108BE00050FA0C2866D368690821B030F3F74AFAC6 -:108BF000002806D0686904218430F3F743FA00287E -:108C000003D1F4A1F74802F0A6FA0420FFF781FE91 -:108C100082E068698446C030807A042802D0052842 -:108C200039D079E06046E030007D002874D1EE490B -:108C30006046102600230822D8306944F51A2D1802 -:108C4000203DEF7F4F70AD7F8D70891C521E9B1CA5 -:108C5000002AF3D103A86346102608210330A83365 -:108C6000B51AED18203DEF7F4770AD7F8570801CF1 -:108C7000491E921C0029F3D16846F9F70CFB08AF96 -:108C80004ECFDA4D686900E020E070304EC005201C -:108C9000FFF73FFE0BE060464030017D002903D026 -:108CA00001214177022000E00D20FFF732FE6869C4 -:108CB000C030847230E00620FFF72BFE6869403038 -:108CC000847329E00920FFF724FE25E06869CA21A2 -:108CD000095C002920D0062906D02030C17C002064 -:108CE000FFF7F8FD002817D068690146C0318A7A7D -:108CF000072A11D213007B441B79DB189F440C0C0C -:108D00000C0C0C0C03004030807DC20700D154E7EE -:108D1000C043800700D18C72B44D2879002868695F -:108D200002D08030048303E08030018B491C018332 -:108D30006879C007686904D0A4210C54403084804D -:108D400003E040308188491C8180E879002806D002 -:108D50006969A0310879022806D8401C0871686941 -:108D6000A0300079022806D9686901468030048362 -:108D70004483A0310C7168692030C17C0020FFF76A -:108D8000A9FD002804D168692030C07C07284CD197 -:108D900068690146C0318A7A062A46D0C97A06290E -:108DA00043D03621095C02293FD1A0300079002848 -:108DB0003BD1FBF7AEFC002837D0FBF782FD002843 -:108DC00033D06869014680314A8A012A2DD90122AF -:108DD0004A77024640329688D288931E9E4201DB33 -:108DE000012302E0921B521E93B20A8BAE89B2425B -:108DF00001D3012202E0B21A521C92B2934200D96E -:108E00001346012B00D14C77C0300278002A10D0D5 -:108E1000498B4088814201D3012102E0401A401C65 -:108E200081B28B4205D90B4603E06869012380308B -:108E300044776A69118D1646C81883B2104680308F -:108E400083822036B77D002F25D0012F23D0022F1B -:108E50000CD0032F0AD05FA1654802F07CF9687935 -:108E6000C006686919D58030C4841BE0F67C032EE7 -:108E700009D0082E0FD04032D1889288891A891ED5 -:108E800059180182EBE740329688032E03D3D2882B -:108E90008918491CF5E70382E1E78030C18CC28A5A -:108EA0008918C18468690246C0329179002906D0C8 -:108EB0000146403196230E891B5AF3180B81A97A7B -:108EC0000426002913D002463D214032917001460C -:108ED0002031CC748C75012151708030807F002846 -:108EE00070D0297000210220FAF7C5F85EE0014633 -:108EF0002031CB7C042B48D02B7A002B1ED05A0774 -:108F000001D4DA0604D51E2240308270CE743CE0D3 -:108F10001A0704D53D2240308270CE7435E0D80760 -:108F200005D1980703D42BA1324802F014F96869DF -:108F30002A21422211542030C67426E04030837B1F -:108F4000002B05D047897B1C438183899F420FD228 -:108F5000D37A062B02D0927A062A05D1038A5A1CAC -:108F600002828289934203D20389C288934203D347 -:108F700022228270CE7408E08B7D002B23D0838860 -:108F800093423CD308228270CE7468694122014624 -:108F90002031CC748C75012111548030807F0028E1 -:108FA0002AD0297000210220FAF765F8F9F7EEFFC0 -:108FB00000282DD068690146FF300130827A002AEE -:108FC00022D025E018E08288062A18D33E2282703B -:108FD000CE74DAE77372635C6C6C5F736C61766598 -:108FE0002E63000039060000FFFFFFFF1001002084 -:108FF000790800004502000000210320D4E7012089 -:10900000287000210846CFE74988818101218172BB -:109010006869803084770DB0F0BDF8B50C4617460E -:109020006946FAF7F9FA002801D00020F8BD009847 -:109030000146E030027AF74E0025002A17D0002FB3 -:109040007DD1657007212170007A00280DD07169EB -:10905000E8204D8445540A22A01CEA3101F0F1FEBB -:109060000098E030007A0028F1D1A57067E0027D19 -:10907000002A2AD0002F62D1017D0D2920D20A00BA -:109080007A441279921897441B1B1B1B1B1B1B1B3A -:109090001B1B1B0F060065700C212170817DA170C8 -:1090A00071694988A18009E065700B212170817D7B -:1090B000A17071694988A180817EA17105753EE02A -:1090C000D549D64802F047F839E0027F002A15D08A -:1090D000002F34D16570082222707269FF315288E6 -:1090E000628001310A88A2804A88E2808A882281CF -:1090F000CA8862810989A181057720E0FF310131A9 -:10910000887A002808D0002F19D1657011202070AE -:10911000888960808D7212E0887B002886D0002FBD -:109120000DD1657012202070887B002807D08D73C8 -:10913000088A6080488AA080887B0028F7D10120B7 -:10914000F8BDB4480078012801D00C2070470020F9 -:10915000704770B5AF4C05462078002803D0AE4963 -:10916000AF4801F0F8FF00202561E0720120207077 -:109170002078012803D0A849AA4801F0ECFF70BD6F -:10918000F8B5A44D2978012901D00C20F8BD01269D -:10919000686180308677807AFBF749FA00282ED004 -:1091A00068698030807AFBF799FB002827D06869CE -:1091B0008030807AFBF70EFB002820D06869803071 -:1091C000807AFBF74AFB002819D0F7F7CCF86869DA -:1091D00000248030408A002825D09348FBF71EFBEE -:1091E000002820D06869C621095C00291BD02030E6 -:1091F000C17C0120FFF76EFB002802D013E0122093 -:10920000F8BD68692030C17C0420FFF763FB0028AB -:1092100009D168694030048144770220FFF779FB67 -:109220006869803044776869E821095C002905D1C4 -:10923000418CC288914201D9A98101E0C188A981EC -:1092400001468031CA8A521E93B20A8BD21892B25A -:109250000A830F7F002F02D04C830C7702E04F8BE4 -:10926000FF184F8305464035AF88FF18AF804D8A01 -:10927000012D01D86D1C4D82002B01D0A4231C545C -:109280002030C07C634D042817D0487F002816D0BA -:10929000A889824213D2FBF73CFA00280FD06869F4 -:1092A0000146C0310A78002A09D08030408B4988B5 -:1092B000884204D3AC70EE7003E0AE7001E0AC7095 -:1092C000EC7068699D210C543321095C062901D09A -:1092D000072917D1CC21028D095A511A09B2002948 -:1092E00010DB0146CE310A3002F04FF80122022194 -:1092F0006869FAF7C8FE6869CB210C5433210C5415 -:1093000040308677434D962168690A5A01462830D5 -:10931000891CFAF75FFFA87800284DD16869C02141 -:10932000095C002901D0803044830120F6F7DFFD7D -:10933000384D68691330F6F7A8FF68690F30F6F703 -:10934000E6FE0120F7F70CF8686901462030027E3E -:10935000002A02D1C07D002806D07031ACC9334844 -:10936000ACC0334802F000F8F6F7F6FF01210846DA -:10937000F6F7FAFE274D68698030006AF7F706F8BD -:109380002C48FBF7BEFA002801D06C7002E06E702A -:109390002948E86168692030007E002802D068789A -:1093A000002817D0E869F6F7EEFFF7F784FB686945 -:1093B00040300078F6F7BDFE164802214471C471B2 -:1093C000847104724472847204710170F6F7D6FFDE -:1093D0000020F8BD1848F6F7D6FF144806766A69EB -:1093E000916ED26E42610161134AE969F7F731FB70 -:1093F0000120F7F73DFBDAE710B5064C207802288C -:1094000001D00C2010BDA078002817D00020FFF755 -:109410001CFB2FE010010020D48F0100DD080000AC -:109420002D0900003809000028010020A821002093 -:10943000C12100202C01002080210020F6F793FF9D -:1094400001210020F7F71AF804202070606920300D -:109450000079012801D1F6F7F8FFE07A002809D059 -:10946000012807D0022807D0032805D0F949FA4877 -:1094700001F071FE002010BDE9F7CAFDFAE7F749D7 -:10948000C8727047F8B5F54C2078032803D0F1492D -:10949000F34801F060FE616901252031887A0028D7 -:1094A00006D0002088720D73A07904221043A071A9 -:1094B000A0690278D24392072BD1C97A002928D11A -:1094C000FAF753FC04281DD0052802D00B2819D127 -:1094D00011E0606901462030C27C102A12D10022BE -:1094E0008A66CA6605767031CCC9DE48CCC0DE48D3 -:1094F00001F03AFF06E060692030C17C0B2901D100 -:1095000000210176606902212030C572A0790843EC -:10951000A071A0690078C00606D4E0690078C00692 -:1095200002D4E07900280FD0607800280CD1A0790F -:10953000002809D1F9F718FD002805D0207A002865 -:1095400002D1607A002803D00120FFF77EFA1DE0E7 -:10955000C648FBF7D6F9002802D00020607002E070 -:109560006570C348E06160692030007E002802D049 -:10957000607800281CD0E069F6F705FFF7F79BFA42 -:1095800001210020F6F77AFF0420207020780128BE -:109590000DD0E07A00280AD0012808D0022819D07E -:1095A000032817D0A920AB49000101F0D4FDF8BD74 -:1095B000AF48F6F7E8FEAB4805766269916ED26E69 -:1095C00042610161AA4AE169F7F743FA0120F7F71E -:1095D0004FFAD5E70120F7F707F8F8BDF8B59F4C2B -:1095E00005462078042803D09A49A24801F0B3FD2B -:1095F0009A481027417939434171002D7ED0F7F701 -:1096000072FA0125002814D1944842692032117E53 -:1096100000290ED0C1694B78DB060AD00978D27BCD -:109620000907C90F914204D185720120FFF70DFA95 -:1096300054E18A4CE07800281ED0E0694178C906E0 -:109640001AD10078C00617D460692030007901284B -:109650007ED1F6F7F1FE6169881C2831FAF7AAFE7F -:10966000002875D06069C21D4388F932138220300A -:10967000007C907495732BE160692030007901289B -:1096800011D1F6F7D9FE6169881C2831FAF792FEEC -:10969000002808D06069C21D4388F9321382203047 -:1096A000007C90749573E069002600784007C10F34 -:1096B00060692030827B914242D0407B00283BD0C1 -:1096C00002280FD1FAF7EAFF002803D161496A485E -:1096D00001F041FD62690023106E516E401C59413A -:1096E00051661066606920304673017B012903D101 -:1096F0000673A1793943A171C17A00E0D1E0012953 -:1097000014D1C672A07908210843A071FBF7C7F8ED -:10971000002803D14F49594801F01DFD626900231B -:10972000106E516E401C59415166106660692030C0 -:10973000817B01292ED085736079082108436071EF -:109740004649C869496903781A07D40F203100E0F7 -:109750007FE0CA7B94420CD19B07404C9B0F012BAE -:1097600048D0022B46D0032B16D0207A0421084380 -:1097700020723A48417929434171C67181790907BC -:1097800004D541692031C97C032962D0017A0029BE -:109790005FD182E08673CFE76378002BE9D18D72C9 -:1097A000A3792B43A371012A10D0CD73FAF7DDFA08 -:1097B00006280DD00B28DCD1606901462030C27C20 -:1097C0000C2AD6D1C67540310D75D2E7CE73EDE7C0 -:1097D000606901462030C27C122ACAD100220A6682 -:1097E0004A66C57570319CC91E489CC0093001F09D -:1097F000BBFDBEE74078C30649D06278002AB8D1E5 -:10980000C006C00E1B283FD8C97C0520FFF762F8B0 -:10981000002804D0607A082108436072A9E76079C3 -:10982000042108436071FBF793F8002803D109492C -:10983000134801F090FC60690023816EC26E491CE0 -:109840005A41C26681662030C17B01291AD0C57396 -:109850008FE73DE0D48F01000D0A000010010020C9 -:10986000360A0000A8210020C12100202C01002080 -:1098700080210020A80A00000A070000220700003B -:109880007C070000C67374E7207A384370E7012A2A -:1098900001D0CD736DE7CE736BE7407A002817D106 -:1098A0001AE0F948022211434171C179491CC9B239 -:1098B000C17101290CD840692030007E00280BD0EE -:1098C000F2484078C106C90E052905D2C00603D06A -:1098D0000120FFF7BAF801E0FEF72EFFEA48017811 -:1098E00001290CD0C07A002809D0012808D002280C -:1098F00005D0032804D0E649E64801F02CFCF8BD69 -:109900000120F6F771FEF8BD10B5DF480078042895 -:1099100003D0DF49E04801F01EFC0120FFF795F875 -:1099200010BDF8B5D84C0427A07900250007002801 -:109930002FDA207A00282CD160692030C07C801E6C -:10994000132826D201007944097949188F44210946 -:1099500021212121212121212121212121212121F7 -:109960001A006069014640318D734A7F002A04D095 -:1099700006228A702030C7740BE016228A702030CD -:10998000C77406E0606901464031CD748D732030A4 -:10999000C57400F063F9BC4801268279500700289D -:1099A00022DAB948017A00291ED1406901462031E6 -:1099B0000B46C97C891E072916D20C007C442479E9 -:1099C0002419A744031111110B110E000146403157 -:1099D0008D73C030007A8870DF7405E0C030C672C5 -:1099E00002E00221C030C172A74C90074AD5207A0C -:1099F000002847D160692030C17C0120FEF76AFF52 -:109A000000283FD1A069C0780E287DD2010079449A -:109A1000097949188F44A7A706A73747630BA718EA -:109A2000A7279755616903202031C8749FE06069BA -:109A30002030C07C052803D09549984801F08BFB65 -:109A400060692030C57492E060692030C07C0928CC -:109A500003D08F49924801F07EFB60694E210D547E -:109A60002030C57483E060692030C07C0B2803D0AF -:109A700087498C4801F06FFB606953210E540C211B -:109A80002030C17473E060692030C07C0F2803D09F -:109A90007F49854801F05FFB606953210E54102116 -:109AA0002030C17463E060692030C07C102803D08E -:109AB00077497E4801F04FFB606912212030C17464 -:109AC00055E060692030C07C102803D07049784888 -:109AD00001F041FB606914212030C17447E06069E6 -:109AE0002030C07C162803D06949724801F033FB4E -:109AF000606901464030C5748573E031087D0028F7 -:109B000006D063492B2000E02DE0400101F023FB4B -:109B10006069014640310A7D002A08D00D754288EF -:109B2000F8210A520146E0318D750C2207E0418888 -:109B3000F82211520146E0318D758E760B220A759E -:109B40002030C57413E060690146C030827A062A6D -:109B500004D14031897D890700D58572C17A0629F3 -:109B600005D1C57203E04A49534801F0F4FAA079DF -:109B7000C00612D5207A00280FD160692030C17C40 -:109B800007290AD20A007A441279921897440505E7 -:109B90000505050503000721C174607A000727D574 -:109BA00060692030C17C0520FEF794FE002807D0B4 -:109BB000207A0821084320726069E030057517E0BB -:109BC000607938436071FAF7C3FE002803D1304949 -:109BD0003A4801F0C0FA60690023816EC26E491CE8 -:109BE0005A41C26681662030C17B012934D0C673D8 -:109BF00060693321095C08292DD10146028DC031ED -:109C00008B89521C9A4226D1227A002A23D14A8A71 -:109C100083889A4207D18B8AC788BB4203D1CB8AFB -:109C20000789BB4208D043888B85CA858A8A0A8601 -:109C3000CA8A4A86E8210E5401221146FAF723FA0D -:109C400000210420F9F717FA6069CB210D54203068 -:109C5000C57403218175F8BDC573C9E730B50A4CD9 -:109C600083B0A079C0077DD0207A00287AD16069BE -:109C70002030C17C0120FEF72DFE00284AD1E0698A -:109C8000C0780D286FD21BE0100100208021002039 -:109C9000D48F01000E0B0000160B000027050000FA -:109CA0002D050000340500003C05000043050000C0 -:109CB000490500005B050000BD0500009E03000093 -:109CC00001007944097949188F443B1506C14D4D6F -:109CD000FE24FD4D98B2FC00E069FAF7BEF8616918 -:109CE000C82250540222332042540020403148817F -:109CF0000120887385E160692030C17C0020FEF777 -:109D0000E9FD0028207A02D0002803D103E00121D8 -:109D10000843207275E1E069FAF798F86169CC228E -:109D200050520A8D801ABC4A00B290425FDC002873 -:109D30005DDDCE31E069FAF77EF8606906212030FA -:109D400083E060692030C17C0020FEF7C3FD00285D -:109D500003D1207A012108432072207A00284CD1B7 -:109D6000E06901E055E134E1FAF732F800282ED03D -:109D7000E069FAF728F86169CC2250520A8D801AFE -:109D8000A54A00B2904232DC002830DDE069FAF7E3 -:109D900014F86169C0318873E069FAF707F86169FE -:109DA000C0310882E069F9F7E6FF6169C031488295 -:109DB000E069F9F7E9FF6169C0318882E069F9F784 -:109DC000ECFF6169D62250520820203196E060698C -:109DD0002030C17C0020FEF77DFD002803D1207AD1 -:109DE000012108432072207A002806D100E12820B2 -:109DF0004222505404202031C87402E160692030AE -:109E0000C17C0020FEF766FD002803D1207A0121E5 -:109E100008432072207A00285FD160690022014641 -:109E200040304281012282730B202031C874E8E067 -:109E300060692030C17C0C2903D0217A02221143B1 -:109E40002172217A002948D10D21C174D9E06069BD -:109E50002030C17C0020FEF73DFD002808D160695C -:109E60004030007D002803D1207A01210843207270 -:109E7000207A002831D160690022014640304281B9 -:109E800001258573A831E069FAF704F86169E06992 -:109E90008031FAF710F86069E030007F002803D0C5 -:109EA0005E495F4801F057F96169FE204A884252D5 -:109EB000FF310131E069F9F7D7FF6169E069FF31EE -:109EC000093102E01CE056E008E0F9F7D9FF6069CB -:109ED000FC210D540F212030C17492E060690146CD -:109EE0002031CA7C122A03D0227A02231A4322721A -:109EF000227A002A6CD1403082731620C87480E028 -:109F000060690146C031CA7A002A06D0897A0629DA -:109F100003D0217A012211432172217A002970D1C4 -:109F20004030807D800715D4E069F9F7F5FF61695D -:109F30004031C875E069F9F7F1FF61694031088384 -:109F4000E069F9F7F0FF6169022240314883887DBA -:109F50001043887560690146C0318A7A062A01D1AA -:109F600000228A724030827DD2074AD10622CA720C -:109F70000021018245E060692030C17C0020FEF7AD -:109F8000A9FC002803D1207A012108432072207AFD -:109F9000002836D16946E069F9F7D5FF68460078B0 -:109FA000C107C90F6846017004D0606901214030C3 -:109FB000017703E060690021403001776069002289 -:109FC0000146403042810122827309202031C87449 -:109FD00017E060692030C17C0020FEF77BFC002880 -:109FE00003D1207A012108432072207A002808D169 -:109FF000E069F9F7BAFE61698922505405202031E1 -:10A00000C87461690023886ECA6E401C5A41CA66D2 -:10A01000886603B030BD0000FE7F0000D48F0100D1 -:10A020002104000047490968016000207047454944 -:10A030000860002070470121434A002803D001280E -:10A0400003D042487047916300E0D163002070471D -:10A050003F49012008603D48801C704704223D4B69 -:10A060003B49002805D05A60086901221043086165 -:10A0700008E008694008400008619A603249002001 -:10A08000C03188600020704731490622002808D07E -:10A09000012809D002280DD003280FD02B48401CDE -:10A0A00070470869904302E008699043801C08618A -:10A0B0000020704708699043001DF8E708691043C5 -:10A0C000F5E723494A6A02434A6200207047204963 -:10A0D0004A6A82434A62002070471D49496A01600A -:10A0E000002070471A49CA690243CA6100207047BC -:10A0F0001749CA698243CA61002070471449C96977 -:10A100000160002070471249024600204031002AB9 -:10A1100003D0012A01D0072070478A6370470D4998 -:10A120000420886008490020C03188600A4801681E -:10A130008022090A090211430160084901200860D0 -:10A140007047000000040040400000400420000070 -:10A15000000500400003004000E400E000E100E0F2 -:10A160008107C90E002808DA0007000F08388008A8 -:10A17000814A80008018C06904E080087F4A80001E -:10A1800080180068C8400006800F704710B504466C -:10A1900000F0DBF8002813D02046FFF7E1FFC0B243 -:10A1A00000F0E1F800280DD07549E2060B78D20ED8 -:10A1B00001209040002B08D04A681043486006E018 -:10A1C000704810BD6F48401C10BD6F4908600020EA -:10A1D00010BD10B5044600F0B8F800280BD068494F -:10A1E000E2060B78D20E01209040002B05D04A6881 -:10A1F00082434A6004E0634810BD634980310860CF -:10A20000002010BD70B50D46044600F09EF80028F1 -:10A210000BD05E480068E206D20E01219140084052 -:10A2200000D001202860002070BD564870BD10B5D8 -:10A23000044600F08AF8002807D0E106C90E012084 -:10A24000884052490860002010BD4E4810BD10B52E -:10A25000044600F07AF8002808D0E106C90E012073 -:10A2600088404A4980310860002010BD454810BD33 -:10A2700070B50D46044600F068F8002819D028464D -:10A2800000F071F8002816D0A007C10EFF228A4006 -:10A29000A807000E8840002C10DA2107090F0839A2 -:10A2A0008B0835499B005B18D96991430143D961FB -:10A2B0000CE0344870BD3348401C70BDA3082F49E2 -:10A2C0009B005B181968914301431960002070BD21 -:10A2D00070B50C46054600F038F8002805D0284631 -:10A2E000FFF73EFF2070002070BD264870BDBFF311 -:10A2F0004F8F21492648C860BFF34F8FFEE770B5E6 -:10A300001F4C05462178012000290ED1207072B61D -:10A3100000F0F4F81C4E803631688143616000F033 -:10A32000EDF8C043306062B600202870002070BD98 -:10A3300013490A78002A06D0002804D1124A486836 -:10A340001060002008700020704710B504462028D7 -:10A3500007DA00F0D3F80121A140084201D1012021 -:10A3600010BD002010BD012803D0032801D000201B -:10A37000704701207047000000ED00E000E400E0BD -:10A38000300100200120000000E100E000E200E0D8 -:10A390000400FA05F8B504468007002501260028C8 -:10A3A00004DA5848C563C66302208443E00404D538 -:10A3B0005548C563C66380148443600003D5534881 -:10A3C000456080058443E00504D55148C563C663F4 -:10A3D00080158443A00404D54E48C563C663401469 -:10A3E000844360042704C00FF90F884203D04AA1B8 -:10A3F000612000F0B0FEB80F0AD04C49CD634C4844 -:10A40000C563C563CE63C663C6630320800384430C -:10A4100020050AD5474FFD632F20E6F7C5FEFE63F2 -:10A420002F20E6F7C1FEF8148443F7F7D7FF424820 -:10A43000044203D038A18D2000F08DFEF8BDF0B5A8 -:10A4400000210A46FF230446CC40E4072AD04CB240 -:10A45000E606F60E0125B540384E3560384E3560BB -:10A46000002C11DA25072D0F083DAE08354DB6003A -:10A470007719FD69A407E60E1C46B440A5431446AF -:10A48000B4402543FD610DE0A6082F4DB6007619B6 -:10A490003568A407E70E1C46BC40A5431446BC40E3 -:10A4A00025433560491C2029CDD3F0BD70B5274C1C -:10A4B0000D462060FFF76EFF2068FFF7C0FF2846BB -:10A4C000E8F766F8F7F796FEF1F792FDF7F786FFE3 -:10A4D000FFF725FEE7F7E2FE00F06AF870BD10B561 -:10A4E0001A4C2068FFF756FF2068FFF7A8FFF7F720 -:10A4F00075FFE8F7C7F80020206010BD134800681A -:10A5000070470000C01F0040C0CF004000E5014080 -:10A51000C08F0040C0DF00407372635C736F635F85 -:10A52000636F6E6669672E6300000000C0EF004035 -:10A53000C0FF0040C0BF0040FEFF0FFC80E100E014 -:10A5400080E200E000ED00E000E400E038010020DF -:10A5500070B5002402460D4620462146002A1ED032 -:10A56000012A04D0022A04D0032A1ED103E00120CC -:10A5700002E0022013E003202B0000F00DFF07167D -:10A580000507090B0D0F1600012108E0022106E066 -:10A59000032104E0042102E0052100E00621F2F796 -:10A5A00058FA002801D0204670BD0724FBE70000C0 -:10A5B000B348002101708170704770B5B14D01231F -:10A5C0006B60B14B1C68002CFCD0002407E00E68C7 -:10A5D00006601E68002EFCD0001D091D641C9442FC -:10A5E000F5D30020686018680028FCD070BD70B5F5 -:10A5F000A34C0E466178884203D0A4A16F2000F0DE -:10A60000AAFD0325330000F0C7FE09520624245298 -:10A610005252524952002078022803D09BA1732045 -:10A6200000F099FD2570A078022802D0012804D0FE -:10A6300008E0A068E8F7C6FC04E02046083007C838 -:10A64000FFF7BBFF0020A070F2F7A4F904202070F0 -:10A6500070BDF2F754FA01466068F3F769FC0646EC -:10A660002078022803D089A1872000F074FD8B4A4E -:10A670008B498C48964205D86269032A02D2521C43 -:10A68000626102E0864207D84D71801BC860844930 -:10A690006078F2F7ABFE70BD032003E0A0780028DD -:10A6A000FAD10220F2F77EF800F0E1F870BD77A150 -:10A6B000B12000F050FD70BD70B50546F2F71FFAED -:10A6C0006F4C60602078012803D070A1B82000F0A2 -:10A6D00042FD73490220087000220A718D60042235 -:10A6E0004A71704ACA6020706078F2F77FFE70BDD0 -:10A6F00010B5634CA078002802D12078002801D042 -:10A70000112010BD6848F2F78BF96070607800285E -:10A7100004D0012020700020606110BD032010BD16 -:10A7200010B50124020B64040121604BA04202D247 -:10A730009140186802E0203A58689140084000D0E3 -:10A74000012010BDF8B50E46910005464F1914467C -:10A750003F1F0091E8F747FC009980028919091F03 -:10A76000B14201D2012200E00022002C03D0FF21DF -:10A7700001318C4201D90920F8BD4D498D4219D3D0 -:10A78000AF4217D3854205D2874203D228463043D1 -:10A79000800701D01020F8BD8E420BD3002A09D1CA -:10A7A0002846FFF7BDFF002804D13846FFF7B8FF61 -:10A7B000002801D00F20F8BD3E483F49006888427C -:10A7C00005D0224631462846FFF7F7FE0FE0FFF797 -:10A7D0008FFF0028EFD12A480121C66085600461FF -:10A7E00081702046302148431830FFF765FF002074 -:10A7F000F8BD10B504462E48800A84420BD3E8F712 -:10A80000F2FBA04201D8102010BDA0020446FFF7C1 -:10A8100087FF002801D00F2010BD26482649006878 -:10A82000884203D02046E8F7CDFB0AE0FFF760FF3F -:10A830000028F1D112480221846081701F48FFF77F -:10A840003BFF002010BD1A48010B01208840401E2C -:10A85000704700B50B460246FFF7F5FF104201D0E6 -:10A860000F2000BD114802604360002000BD10B5FC -:10A87000034C6078F2F728F900202070A07010BD1A -:10A880003C01002000E5014000E401407372635C7C -:10A89000736F635F666C6173682E630030750000D0 -:10A8A000D0210020D0FB0100EFA5010000060040F0 -:10A8B00000C0010064000020BEBAFECA3A56000083 -:10A8C000F94805218170002101704170C1708160DB -:10A8D000704710B5F5490A78022A07D0CA681018DF -:10A8E000C860C8689638F3F7DBFA10BD8A6810189C -:10A8F00088608868F6E70378ED49EE4A002B02D0BD -:10A90000012B10D014E00379002B01D0012B0FD1C3 -:10A910004379002B01D0012B0AD18368643B8B4221 -:10A9200006D2C06810E00379002B03D0012B01D0C0 -:10A93000002070474379002B01D0012BF8D1C36868 -:10A94000643B8B42F4D280689042F1D8012070477A -:10A95000F8B504460226F2F731FF0068002803D05C -:10A96000D5A1BD2000F0F7FB0127CF4D002C08D06A -:10A970002078002817D0012805D0022811D00328FC -:10A9800013D02F710DE06068C82808D3F3F7FEFAE2 -:10A99000002804D06068FFF79CFF012603E0002632 -:10A9A00001E000F0FDF93046F8BD28780028F8D124 -:10A9B0006068FFF7A0FF0028E3D0606800780028F7 -:10A9C00026D0A878042803D0BBA1F72000F0C3FB51 -:10A9D000B64F0020387060680079012800D0002050 -:10A9E000387160684079002837D004207871606839 -:10A9F0008168E868F2F715FBB8606068C068963057 -:10AA0000F8600320A870A949E878F2F7EFFCC8E7DE -:10AA1000A6480221017061680979012919D0002135 -:10AA2000017161684979002915D00421417161687B -:10AA30008968963181606168C968C160C0689A4C54 -:10AA400014346060F2F75BF820606F700220A87029 -:10AA5000A7E70321E4E70321E8E70320C6E7F8B509 -:10AA6000914C0D46E178884204D0FF2092A11A3023 -:10AA700000F071FB2846002501268C4F030000F0F2 -:10AA80008BFC0906123C5E82939DCAA6CA00A07880 -:10AA9000032807D0A078022804D0FF2086A11E300A -:10AAA00000F059FBF8BDA078032807D0A078022851 -:10AAB00004D0FF2080A1223000F04DFB0420A070C4 -:10AAC00025712078002815D1FFF703FF3878022878 -:10AAD0000CD0B868E0607F49886A7F4A02402261F2 -:10AAE0007D4AD24310408862002055E0E078F2F7BA -:10AAF000BFFAEFE700F054F9F8BDA078032807D0BB -:10AB0000A078022804D0FF206BA14B3000F023FB7B -:10AB10002078002802D000F04FF9F8BDA078032873 -:10AB20001ED104202BE0081AF8606049E078F2F7A3 -:10AB30005DFCF8BD0420F1F735FEA570F8BDA078E6 -:10AB4000032807D0A078022804D0FF205AA16C3037 -:10AB500000F001FB20780028DDD1A07803280DD07B -:10AB6000F1F7CDFF504E014614363068F3F7E0F9A7 -:10AB70000028DFDB71688142DCDBD4E70520F1F7D8 -:10AB800011FEA670F8BDA078042804D0FF204AA1C9 -:10AB90008D3000F0E0FA0220A1688847FFF7D8FE68 -:10ABA000FF260546C63642E0A078042804D0FF20E0 -:10ABB00041A1923000F0CFFA0120EDE7A0780428FF -:10ABC00098D0FF203CA1973000F0C5FA92E7A0781A -:10ABD00004280AD06078002802D0A078022804D087 -:10ABE000FF2035A19C3000F0B6FA2078002892D1E1 -:10ABF0002079002804D00620F1F7D4FD2571C0E7A4 -:10AC00006078002805D02949E078F2F7EFFB6570FD -:10AC1000F8BD0720B3E7FF2027A1B73040E7002D9C -:10AC20000AD0012D06D024A1304600F094FA022D5E -:10AC3000F5D1F8BD042000E00320A1688847FFF7A4 -:10AC400087FE0546F3E770B5050005D0164CA078E1 -:10AC5000052803D0112070BD102070BD1F48F1F7EA -:10AC6000DFFEE070E078002803D0A5600020A0702F -:10AC700070BD032070BD10B50B480178002901D0CC -:10AC8000112010BD817805292AD08178012929D089 -:10AC90008178002926D0012101708178012921D0F5 -:10ACA000807800281ED01FE054010020E021002001 -:10ACB0003D860100FF1FA1077372635C736F635FC2 -:10ACC000726164696F5F74696D65736C6F742E6314 -:10ACD0000000000000050040028100005FAA0100A2 -:10ACE0000F2010BD00F068F8002010BDF8B5394EF7 -:10ACF0000446B078002801D001280DD1002C0DD0D9 -:10AD00002046FFF7F8FD00280AD02078324D0028B1 -:10AD100008D0B078012823D00F20F8BD1020F8BD4E -:10AD20000720F8BD02272F702079012814D00020B9 -:10AD300028716079002811D004206871A0689630CD -:10AD4000A860E068E860E868224C14346060F1F7BD -:10AD5000D6FE2060B77019E00320E9E70320ECE796 -:10AD6000002028702079012816D0002028716079F1 -:10AD7000002813D004206871A168F068F2F751F937 -:10AD8000A860E0689630E8600320B0701249F0785F -:10AD9000F2F72CFB0020F8BD0320E7E70320EAE7E9 -:10ADA00010B50E48816A0E4A11400A4A12691143D1 -:10ADB0008162F1F7EFFD10BD10B5064CE078F1F7B8 -:10ADC00083FE0820F1F7EEFC0520A0700020207023 -:10ADD000607010BD54010020E021002000050040FB -:10ADE000FD7EFFFF70477047034610B50B439B077E -:10ADF0000FD1042A0DD308C810C9121FA342F8D0DE -:10AE000018BA21BA884201D9012010BD0020C043E0 -:10AE100010BD002A03D0D30703D0521C07E0002046 -:10AE200010BD03780C78401C491C1B1B07D103780C -:10AE30000C78401C491C1B1B01D1921EF1D11846F5 -:10AE400010BDF8B5042A2CD3830712D00B78491C07 -:10AE50000370401C521E83070BD00B78491C0370F3 -:10AE6000401C521E830704D00B78491C0370401C01 -:10AE7000521E8B079B0F05D0C91ADF002023DE1B53 -:10AE800008C90AE0E6F7A0F9F8BD1D4608C9FD406B -:10AE90001C46B4402C4310C0121F042AF5D2F308FC -:10AEA000C91A521EF0D40B78491C0370401C521E64 -:10AEB000EAD40B78491C0370401C012AE4D40978B9 -:10AEC0000170F8BD01E004C0091F0429FBD28B0703 -:10AED00001D50280801CC90700D00270704700298C -:10AEE0000BD0C30702D00270401C491E022904D3B4 -:10AEF000830702D50280801C891EE3E70022EEE76B -:10AF00000022DFE7020A08704A70020C8A70020E03 -:10AF1000CA707047002203098B4273D3030A8B4225 -:10AF200058D3030B8B423CD3030C8B4221D312E04A -:10AF300003460B437FD4002243088B4274D303099A -:10AF40008B425FD3030A8B4244D3030B8B4228D33B -:10AF5000030C8B420DD3FF22090212BA030C8B4261 -:10AF600002D31212090265D0030B8B4219D300E001 -:10AF7000090AC30B8B4201D3CB03C01A5241830B86 -:10AF80008B4201D38B03C01A5241430B8B4201D336 -:10AF90004B03C01A5241030B8B4201D30B03C01A5F -:10AFA0005241C30A8B4201D3CB02C01A5241830AD9 -:10AFB0008B4201D38B02C01A5241430A8B4201D308 -:10AFC0004B02C01A5241030A8B4201D30B02C01A32 -:10AFD0005241CDD2C3098B4201D3CB01C01A524199 -:10AFE00083098B4201D38B01C01A524143098B4222 -:10AFF00001D34B01C01A524103098B4201D30B010B -:10B00000C01A5241C3088B4201D3CB00C01A52412F -:10B0100083088B4201D38B00C01A524143088B42F4 -:10B0200001D34B00C01A5241411A00D2014652418D -:10B03000104670475DE0CA0F00D04942031000D3AC -:10B040004042534000229C4603098B422DD3030A01 -:10B050008B4212D3FC22890112BA030A8B420CD311 -:10B06000890192118B4208D3890192118B4204D33A -:10B0700089013AD0921100E08909C3098B4201D3BA -:10B08000CB01C01A524183098B4201D38B01C01AF4 -:10B09000524143098B4201D34B01C01A524103096B -:10B0A0008B4201D30B01C01A5241C3088B4201D31A -:10B0B000CB00C01A524183088B4201D38B00C01AC7 -:10B0C0005241D9D243088B4201D34B00C01A52419E -:10B0D000411A00D20146634652415B10104601D32B -:10B0E0004042002B00D54942704763465B1000D3B5 -:10B0F000404201B50020C046C04602BD70477047BF -:10B10000704710B500F058F810BD30B58C180278B3 -:10B11000401C13071B0F01D10378401C120906D1F4 -:10B120000278401C03E00578401C0D70491C5B1E32 -:10B13000F9D101E00B70491C521EFBD1A142E6D3AC -:10B14000002030BD012308CB134B1860134B19604E -:10B15000134B1A607047134A134B13607246053A3B -:10B16000F0E7114A0F4B1B689A420ED10D4B00209D -:10B17000186001980D4B04B598470CBC9E460246DA -:10B18000029800990A4B1B68184706980599094BC5 -:10B190001B68DB6818470000780100207C01002054 -:10B1A0008001002070010020EFBEADDE4D2F0000B9 -:10B1B00098000020040000201D481E497047FFF73A -:10B1C000FBFFE5F7BBFF00BD01200007C06AC0B26E -:10B1D000FF2804D1184819490968884202D0184844 -:10B1E00018490160184819490968884203D1184A6A -:10B1F00013605B68184700BD20BFFDE71248134984 -:10B20000096888420ED1134B18680B498842F3D065 -:10B2100080F308881049884204DD10480268022142 -:10B220000A4302600E4880470E4880470E48004798 -:10B23000F0210020F0210020FFFFFFFF0010001090 -:10B240002C05004008000000001000000000002055 -:10B250000400002000C00100002000202405004060 -:10B26000632F0000C9B1010045B1010013487045CA -:10B2700002D1EFF3098101E0EFF308818869023818 -:10B280000078102814DB202810DB2B280BDB0C4A5D -:10B2900012680C4B9A4203D1602804DB0A4A10471B -:10B2A000022008607047094A10470000084A10470A -:10B2B000084A12682C32126810470000FDFFFFFF99 -:10B2C00064000020BEBAFECAAD120000991F010042 -:10B2D0001B1F0100040000200D4B0E4908470E4BB8 -:10B2E0000C4908470D4B0B4908470D4B09490847C6 -:10B2F0000C4B084908470C4B064908470B4B0549BE -:10B3000008470B4B034908470A4B0249084700000E -:10B31000B125000051220000D52B0000772A000043 -:10B32000252A0000D7270000B912000017140000DA -:10B33000392B0000472300000A7802704B784370D5 -:10B340008A788270CA78C2700B79037170470A7864 -:10B3500002704B7843708A788270CA78C2700B7919 -:10B3600003714A79427170470A7802704B784370D2 -:10B370008A788270CA78C2700B7903714A794271F7 -:10B380008A798271CB79C37170470A8802804A88B2 -:10B3900042800A790271704730B47446641E257881 -:10B3A000641CAB4200D21D46635D5B00E31830BCF9 -:10B3B00018470000FFFFFFFF0000FFFF0100030030 -:10B3C000000001000000000000000000000000007C -:10B3D00000000000870000000000000000000000E6 -:10B3E0000000000000000001020304000D0E0F1019 -:10B3F000000000000F6900002D6B0000F56B0000DD -:10B400004F6C0000A36C00000B6D00006969000028 -:10B41000216A0000AD6D0000BB7900001001100131 -:10B420003A0200001A020000040104013C00170067 -:10B4300044000E00F401FA00960064004B00320054 -:10B440001E001400010204081020408055555525A7 -:10B450002627D6BE898E555555D6BE898E0000004A -:10B460007006120DB413000014035A06A009000060 -:10B470006004F208840D0000A8B401000800002058 -:10B480001000000004110000B8B4010018000020F2 -:10B490006C0100000AB10100D8B401008401002051 -:10B4A0006C20000020110000024801688907FCD5CB -:10B4B0007047000000E200E0013536010001005451 -:10B4C0003720FB349B5F80B4800010026801337F1B -:08B4D0000102A029E449B101C9 -:00000001FF +:020000040000FA +:10000000C0070000D1060000D1000000B1060000CA +:1000100000000000000000000000000000000000E0 +:100020000000000000000000000000005107000078 +:100030000000000000000000DB000000E500000000 +:10004000EF000000F9000000030100000D010000B6 +:1000500017010000210100002B0100003501000004 +:100060003F01000049010000530100005D01000054 +:1000700067010000710100007B01000085010000A4 +:100080008F01000099010000A3010000AD010000F4 +:10009000B7010000C1010000CB010000D501000044 +:1000A000DF010000E9010000F3010000FD01000094 +:1000B00007020000110200001B02000025020000E0 +:1000C0001FB5C046C04600F0EFFA04B00FB41FBD24 +:1000D00008205A49096809580847382057490968CB +:1000E000095808473C2055490968095808474020E5 +:1000F0005249096809580847442050490968095875 +:10010000084748204D490968095808474C204B4981 +:10011000096809580847502048490968095808479C +:100120005420464909680958084758204349096836 +:10013000095808475C204149096809580847602068 +:100140003E4909680958084764203C49096809582C +:100150000847682039490968095808476C20374919 +:100160000968095808477020344909680958084740 +:100170007420324909680958084778202F490968CE +:10018000095808477C202D490968095808478020EC +:100190002A490968095808478420284909680958E4 +:1001A0000847882025490968095808478C202349B1 +:1001B00009680958084790202049096809580847E4 +:1001C00094201E4909680958084798201B49096866 +:1001D000095808479C201949096809580847A02070 +:1001E0001649096809580847A4201449096809589C +:1001F0000847A8201149096809580847AC200F4949 +:10020000096809580847B0200C4909680958084787 +:10021000B4200A49096809580847B82007490968FD +:1002200009580847BC2005490968095808470000D3 +:1002300003480449024A034B7047000000000020B5 +:10024000C0070000C00700000122D84B5A6000BF61 +:10025000D74A1268002AFBD0016000BFD44A126856 +:10026000002AFBD00022D14B5A6000BFD04A12684E +:10027000002AFBD07047F0B505460E46174600240D +:1002800006E0A200B158A2005019FFF7DDFF641C80 +:10029000BC42F6D30020F0BD0120C043C549086030 +:1002A000401048607047014601229204086890425D +:1002B00001D9102070470020FCE7F0B505460C4638 +:1002C0001646002706E028462168FFF7BDFF2D1DD2 +:1002D000241D7F1CB742F6D3F0BD70B505460C4611 +:1002E0002E460BE0304600F075F9FF2C01D80024B3 +:1002F00001E0FF3C013C012080023618002CF1D1C6 +:1003000070BD0146012212044868904201D90920BB +:100310007047A9484069401C01D10F20F8E7002030 +:10032000F6E7FEB504462068030000F037FA05043E +:100330002B4249598B00201DFFF7E3FF0546002D96 +:1003400001D02846FEBDFFF7A7FF0120C00200F044 +:1003500041F9042221469948FFF78DFF002801D07A +:100360000320EFE708222146944800F06DF90028A9 +:1003700006D1002192480068FFF766FF00F00CF9F3 +:100380000320DFE7A768E6686068019031463846D9 +:10039000FFF7A3FF324638460199FFF78EFFB20000 +:1003A0003846019900F050F9002800D1CAE703202F +:1003B000C8E700F0E3F9834800688349086041E03A +:1003C00060680190E668A0680090B200009901980A +:1003D00000F03AF90746002F00D1B3E70E20B1E74D +:1003E000201DFFF760FF0546002D01D02846A9E734 +:1003F0006068002807D1FFF74FFF0320800200F05C +:10040000E9F800F0C9F8FFF747FF0120C00200F04B +:10041000E1F8042221466948FFF72DFF002801D0AA +:1004200003208FE708222146644800F00DF90028D8 +:1004300006D1002162480068FFF706FF00F0ACF823 +:1004400003207FE700BF00207CE770B505460C461F +:10045000182D04D12068FFF764FF206002E001201E +:10046000206000BF00BF70BDF0B589B05248406940 +:1004700003905248806881000398081802900398FE +:10048000000B01900121090302984018401E000B47 +:1004900000900124002520462946019A00F0C4F866 +:1004A0000022401E91410791069001260027304608 +:1004B0003946009A00F0B8F80022401E914105919B +:1004C0000490049BDB43059AD2430698184307998E +:1004D00011430791069037490698086007984860CD +:1004E00009B0F0BD70B53448446934488568466841 +:1004F000AA003146204600F0A7F8002801D00020CD +:1005000070BD0120FCE72D484068002801D0012083 +:1005100000E000200546FFF7E5FF002807D0FFF7C1 +:10052000BBFE0320800200F055F800F035F8FFF71D +:100530009BFF002D0ED020484669204884684768FC +:1005400021463046FFF7C9FE224639463046FFF7BE +:10055000B4FE00BF00F020F810B5184844681A48EF +:100560000460204600F0DCF810BD15480068006803 +:10057000401C01D100BFFEE710480068002802D0EF +:10058000042806D101E0FFF7BEFFFFF7E5FF00BF3B +:10059000FEE700BF00BFFEE7BFF34F8F0B480C49DB +:1005A000C860BFF34F8F00BFFEE7000000E50140C9 +:1005B00000E40140000600400010001000080000A8 +:1005C000B8070000BC070000000000200400FA0586 +:1005D00000ED00E010B50146104B1A6808460223F2 +:1005E0000F4C636000BF0F4B1B68002BFBD0531CEC +:1005F00004D0904202D20A4B186101E0084B986087 +:1006000000BF084B1B68002BFBD00023044C636029 +:1006100000BF044B1B68002BFBD010BD0010001066 +:1006200000E5014000E4014010B5202A04DB01464A +:10063000203A9140002010BD914020239C1A03468F +:10064000E3401943904010BD034610B50B439B0790 +:100650000FD1042A0DD308C810C9121FA342F8D025 +:1006600018BA21BA884201D9012010BD0020C04328 +:1006700010BD002A03D0D30703D0521C07E000208E +:1006800010BD03780C78401C491C1B1B07D1037854 +:100690000C78401C491C1B1B01D1921EF1D118463D +:1006A00010BD70477047704710B500F007F810BDD7 +:1006B000014B1B68DB6818470000002019481A49E5 +:1006C0007047FFF7FBFFFFF7FBFC00BD20BFFDE716 +:1006D0001649174C24688C420BD1164B1B68994263 +:1006E0000CD1154B154A1360186810498842EDD09B +:1006F0000AE0134880F30888124B18470F4A13602A +:1007000018680A498842E1D080F308880E49884277 +:1007100004DD0E48026802210A4302605B68184744 +:100720000346DFE7C0070000C0070000FFFFFFFF30 +:10073000000C000014100010001000000000002049 +:10074000000400206B05000000200020240500406C +:100750000D48704502D1EFF3098101E0EFF3088104 +:10076000886902380078182802D1C046074A104725 +:10077000074A12682C3212681047000000B5054B7A +:10078000054A9B58984700BDFDFFFFFF4B04000042 +:1007900000000020001000000400000030B4744687 +:1007A000641E2578641CAB4204D3635D5B00E318D0 +:1007B00030BC18471D46F8E7000C00000010000090 +:10100000F0210020FDB101005D22000063B101006C +:1010100000000000000000000000000000000000D0 +:101020000000000000000000000000006DB20100A0 +:1010300000000000000000005D2200005D220000B2 +:10104000D9B20100DFB201005D2200005D22000084 +:101050005D2200005D2200005D2200005D22000094 +:10106000E5B201005D2200005D220000EBB201004C +:101070005D220000F1B20100F7B20100FDB20100F3 +:101080005D2200005D2200005D2200005D22000064 +:101090005D2200005D2200005D2200005D22000054 +:1010A00003B3010009B301005D2200005D220000CE +:1010B0005D2200005D2200005D2200005D22000034 +:1010C00000F002F81AF07BF80CA030C80838241899 +:1010D0002D18A246671EAB4654465D46AC4201D170 +:1010E0001AF06DF87E460F3E0FCCB646012633420D +:1010F00000D0FB1AA246AB46334318477CA301003D +:10110000ACA30100103A02D378C878C1FAD85207CC +:1011100001D330C830C101D504680C6070470000AD +:101120000023002400250026103A01D378C1FBD803 +:10113000520700D330C100D50B6070471FB5C046C1 +:10114000C04619F0DEFF04B00FB41FBDF0B4404636 +:10115000494652465B460FB402A0013001B506482D +:10116000004700BF01BC86460FBC804689469246B8 +:101170009B46F0BC70470000C11000008269024924 +:101180008161024810447047911100000100000085 +:1011900001B41EB400B501F000FF01B40198864609 +:1011A00001BC01B01EBD0000401E00BF00BF00BF5B +:1011B00000BF00BF00BF00BF00BF00BF00BF00BF37 +:1011C00000BFF1D17047000070B505460C461646C9 +:1011D00002E00FCC0FC5103E102EFAD2082E02D31B +:1011E00003CC03C5083E042E07D301CC01C5361F2E +:1011F00003E021782970641C6D1C761EF9D270BD45 +:101200008307FF22DB0E9A408907090E99400028C8 +:101210000BDA0007000F0838830828489B001818CD +:10122000C36993430B43C3617047830824489B0001 +:101230001B181868904308431860704710B504469F +:1012400000210120FFF7DCFF00211820FFF7D8FF65 +:1012500000210B20FFF7D4FF02211920FFF7D0FF58 +:1012600002210D20FFF7CCFF02210E20FFF7C8FF5F +:1012700002210F20FFF7C4FF0221C81FFFF7C0FFA4 +:1012800003211620FFF7BCFF03211520FFF7B8FF4D +:10129000204600F019F8002010BD6721018070473A +:1012A00010B500F020F810BD0648704710B500F0EA +:1012B00022F810BD704770477047000000ED00E055 +:1012C00000E400E003F9004370B505462D4C08200A +:1012D0002070A01CFFF7E1FF5920A080294620467E +:1012E00000F0B3FB70BD10B500F0B8FB254900203D +:1012F000891E087010BDF8B5224E0446B61E30781F +:1013000001270D46002807D0204660380B2808D852 +:10131000204600F059FF2BE0602CF9D01A480860F5 +:10132000F8BD20466C38032803D8204600F08DFF16 +:101330001EE0204670381F2803D8204600F047F9E9 +:1013400016E0204690380F2803D8204600F0EAF82F +:101350000EE02046A0380F2803D8204600F076F88B +:1013600006E02046B0380F2804D8204600F0E2F905 +:10137000286000E02F60602CD2D128680028CFD1EF +:101380003770F8BD1A000020013000000120254907 +:10139000C003086024490020087007202349C005C5 +:1013A0008860704770B5204D04462878A04207D069 +:1013B000002C05D0002803D01DA14D2019F0CBFE34 +:1013C0002878A0420ED000211E4A18482C70002C0C +:1013D0001BD01D4B012C06D0022C0DD014A168206F +:1013E00019F0B9FE70BD1160022111605361032133 +:1013F00009068160416070BD116003211160536175 +:101400000121C9058160416070BD11601160072133 +:10141000C905816070BD10B505A1712019F09BFE52 +:1014200010BD000080E100E02000002000F5014038 +:101430007372635C68616C5F63636D5F6161722E80 +:101440006300000000F500408401002010B5A038C2 +:10145000030019F0A1FF0B070E172028313A414B6A +:10146000525C65004B6808788A68194603F0D9F920 +:1014700010BD88888A6883B20888194680B203F054 +:10148000DFF910BD08884C68CB688A6880B22146B5 +:1014900003F0DAF910BD08884B688A6880B21946F3 +:1014A00003F0EEF910BD88888A6883B2088819466F +:1014B00080B203F0FAF910BD88888A6883B2088880 +:1014C000194680B203F034FA10BD08884A6880B229 +:1014D000114603F073FA10BD088982B2888883B27E +:1014E0000888194680B203F074FA10BD08884A686B +:1014F00080B2114603F091FA10BD08894C6882B29F +:101500000888CB6880B2214603F00AFB10BD08882A +:101510004C68CB688A6880B2214603F01BFC10BD82 +:10152000012010BD10B59038030019F035FF0906F1 +:101530000F161D242C363F464E0088888A6883B2D9 +:101540000888194680B204F01DF910BD08884A6861 +:1015500080B2114604F051F910BD08884A6880B283 +:10156000114604F056F910BD08884A6880B2114649 +:1015700004F05CF910BD08884B688A6880B219468F +:1015800004F067F910BD088982B2888883B20888A0 +:10159000194680B204F066F910BD08894B6882B222 +:1015A0000888194680B204F07CF910BD08884A68A2 +:1015B00080B2114604F087F910BD888882B208888D +:1015C000114680B204F0DBF910BD012010BD10B54A +:1015D0007038030019F0E0FE1B0F15192125282F84 +:1015E000363B4044484C53585F68707881889095EA +:1015F000999CA2A5AC004A680878114607F019FC2E +:1016000010BD086807F066FC10BD0C790B7B8A687A +:101610000868214607F06FFC10BD086807F000FD60 +:1016200010BD07F08CF910BD08884A6880B21146D9 +:1016300007F034FE10BD0A790888114680B207F021 +:10164000C4FE10BD087840B207F0CDFE10BD08887A +:1016500080B207F0E1FE10BD086807F0EFFE10BD94 +:10166000086801F0ECFB10BD086801F016FC10BD25 +:10167000088982B209C9194607F0F8FE10BD05C9EC +:10168000114607F042FF10BD08884A6880B2114633 +:1016900009F0FAF910BD0C790888CB688A6880B225 +:1016A000214609F0CDFA10BD0B7908888A6880B20E +:1016B000194609F07DFC10BD08884B688A6880B225 +:1016C000194609F0EEFC10BD08884C68CB688A68A2 +:1016D00080B2214609F053FD10BD08884A6880B2E7 +:1016E000114609F08CFD10BD0B7908880A7A80B28A +:1016F000194607F02DFF10BD088880B207F02DFFB6 +:1017000010BD086807F030FF10BD07F0FCF810BDF1 +:101710008A6809C9194607F08CFF10BD07F0DCF88C +:1017200010BD08884A6880B2114608F05BF810BD09 +:10173000012010BD10B5B02805D0B12808D0B228BE +:101740000BD0012010BD088880B20AF056F910BDF8 +:10175000088880B20AF070F910BD08884B688A6862 +:1017600080B219460AF079F910BD000010B50300E7 +:1017700019F012FE0A0609060C0C0F0F06060612D7 +:1017800007F005F910BD09F027FF10BD01F042FA7E +:1017900010BD06F075FA10BDFAA1FE4819F0DBFC89 +:1017A00010BD7FB5FC49054603C901900291132085 +:1017B000800169468881F94A0F2310460A2128389A +:1017C0000AF043FE0024F6480AF05DFE641CE4B211 +:1017D0000A2CF8D304200090F04801231A4603A9EC +:1017E000F0300AF05DFA002804D0FF20E5A1533064 +:1017F00019F0B1FC686800F024FC00211E220846A4 +:1018000004F040F907F0C6FA02222421E54801F06D +:101810007FFBE44801222C214C3001F079FBE149A7 +:101820000B20B03901F000FA002804D0FF20D5A128 +:10183000673019F090FC09F09FFE02F075F901ABDA +:1018400000220821D8A007F085F9002804D0FF2045 +:10185000CCA16D3019F07FFC284602F0C2FC0028B4 +:1018600004D0FF20C7A16F3019F075FCDB2189007F +:10187000D04819F045FBCF48012141710221817107 +:101880000621C1717FBD10B5CA4CA078092804D3C8 +:10189000FF20BCA1A73019F05EFC207860214843EE +:1018A000001900210173417BF722C908C900C91C36 +:1018B0001140EF22114041730121E1700C3010BD45 +:1018C00070B50E4600211C4619801546030019F01C +:1018D00063FD0723050B1711231D2300224629460C +:1018E000304609F096FE70BD22462946304606F085 +:1018F00098FE70BD22462946304601F0C2FF70BDF9 +:1019000022462946304603F0C0FD70BD22462946D6 +:10191000304600F010FC70BD9E489AA1D53819F0F1 +:101920001AFC032070BD70B5A24CE078002818D0D6 +:101930002078602148430019407B00254007400F74 +:1019400001190879401E08712078401CC0B220702F +:10195000092800D12570A078401CA0700AF01DFF56 +:10196000E57070BD9348C079002800D08BE77047C0 +:1019700070B5904DA86800280CD0FFF7F3FF002841 +:1019800062D06022A968FFF71FFCFFF7CCFF0020A0 +:10199000A860EFE76879002856D0FFF774FF044687 +:1019A00080484C3001F0C4FA6060002804D1C9209E +:1019B00074A1800019F0CFFB60680AF0EAF80028F3 +:1019C0000DD0204606F011FD6078010703D5C00850 +:1019D000C000401C2BE0734861684C302DE071481A +:1019E00061684C3001F0ADFA00F05AFB00282BD1B1 +:1019F000FFF749FF04466B4801F09AFA606000283F +:101A000004D164485FA16D3019F0A5FB60680AF04D +:101A1000C4F8002814D0606800886080204609F06F +:101A20002BFE6078010706D5C008C000801C6070DE +:101A3000FFF779FF9EE75B48616801F082FA99E75A +:101A40005848616801F07DFA70BD10B55A4CE160EC +:101A5000A0605A4800F034FC607010BD5649002068 +:101A60000870704770B5564E0546706A94B00C46C3 +:101A7000401C04D1B06AC0430004000C0BD0306A93 +:101A8000C007C00F2870706A19F03CFAB06A207164 +:101A9000000A607114E02B206946087009A96846A5 +:101AA0000AF04BF8002804D0972036A1800019F0E6 +:101AB00052FB0120287006220AA9204619F0C1F91C +:101AC0002878002803D06079C0210843607114B0E1 +:101AD00070BDF0B53A4C0646206895B00D463746C5 +:101AE0000837401C08D16068401C05D1A068401C24 +:101AF00002D1E068401C11D02068314619F002FA8A +:101B00006068311D19F0FEF9A068394619F0FAF93C +:101B1000E06831460C3119F0F5F925E02B206946D3 +:101B2000087009A968460AF008F8002804D0194886 +:101B300014A1553819F00FFB08220AA9304619F0F4 +:101B400080F92B206946087009A9684609F0F5FF5D +:101B5000002804D0A3200BA1800019F0FCFA082271 +:101B60000AA9384619F06DF920692E460836401C3E +:101B700029D16069401C26D1A069401C23D1E069AD +:101B8000401C1FE07372635C686F73745F636F72F5 +:101B9000652E6300DA020000B4B30100D801002012 +:101BA0006D170000A40B00206E52463531383232DA +:101BB00000000000880700202400002071190000A8 +:101BC0008000001012D02069294619F09BF9606945 +:101BD000291D19F097F9A069314619F093F9E069C8 +:101BE00029460C3119F08EF915B0F0BD2B2468464A +:101BF000047009A909F0A1FF002803D0F649F748AD +:101C000019F0A9FA082209AF28460AA919F019F90A +:101C10006846047009A909F090FF002804D0EF4835 +:101C2000ED49C01D19F097FA0822391D304619F008 +:101C300008F9D9E770B5EA4C0546A068002804D039 +:101C40000320E549000219F086FAA56070BD10B5C1 +:101C50000146E44801F075F9E1498879401CC0B2B9 +:101C60008871012803D1E048407800F04DFB10BD99 +:101C700070B50446DD4816460D46814204D1D7486A +:101C8000D549CB3019F067FA012E05D0E120D249B1 +:101C9000800019F060FA70BD66202070002020726C +:101CA000A5810120A07370BD70B515460C4606468F +:101CB000FFF758FE00280CD06621017046800121F4 +:101CC000017221680161A18881820573FFF72BFEF3 +:101CD00070BD1321304607F078FB70BDC2494968DA +:101CE000884201D210207047032101700020704704 +:101CF00070B5BD4C05462078002694B0002801D070 +:101D00000820E4E6BA4A6260954201D21020DEE67D +:101D10006868002809D00921D82804D3C31C9B086F +:101D20009B00834205D00846D1E60320400268604C +:101D30000EE0012109074B6B896B4B43AD49511AEA +:101D40000122591AD202891A814201D20421EAE7FA +:101D500000F052FF6178A0680CF04EFBE068401E76 +:101D600007280BD8302269460A70887068460DF043 +:101D700088FF002802D009A80CF0FBFC2846FFF7DA +:101D800010FD012020703046A1E6F8B504469648C3 +:101D90000F464068814208D3002C01D0844204D30E +:101DA000E01C80088000A04201D01020F8BD8C48C3 +:101DB0008178002911D039880091417860225143FF +:101DC0000D18287B0C350007000F3B4600222946E2 +:101DD000FFF776FD060004D015E0002038800520CE +:101DE000F8BD002C13D039880098814201D90C2607 +:101DF0000DE028783B460007000F22462946FFF7F2 +:101E00005FFD060005D00C2E01D000203880304642 +:101E1000F8BD734C6078401CC0B26070092801D1D5 +:101E200000206070A078401EA07068784107490FBC +:101E300001290ED0022906D003291AD066496E481E +:101E400019F089F9E3E7C006E1D46868FFF7FFFEFF +:101E5000DDE7644869684C3001F073F86079401C34 +:101E6000C0B260710128D2D15F48407800F04CFACE +:101E7000CDE7E079401CE071C9E7604A10B59042B7 +:101E800009D3594A0124A4045268A04201D39042C4 +:101E900001D3914201D2102010BD00F0FEFE10BD12 +:101EA000564B10B5994209D34F4B0124A4045B68EB +:101EB000A14201D3994201D39A4201D2102010BD10 +:101EC000022803D0102801D0092010BD00F00BFF1C +:101ED0000028FAD0052010BD484B10B598420DD30C +:101EE000414B0124A4045B68A04201D3984205D36E +:101EF000994203D3002A03D09A4201D2102010BD88 +:101F000000F017FF0028FAD0072010BD10B50446D6 +:101F1000354894B04068844202D2102014B010BDFD +:101F20000F2008A9087369460BA809F006FE0028CF +:101F3000F4D16846007A207068464089608068461F +:101F40008089A0800020E9E710B500290BD0264A3F +:101F50005268914202D30B68934201D2102010BD07 +:101F60008A88002A02D001F037FE10BD092010BD7A +:101F700010B5224A94B091420ED31B4A01239B0410 +:101F80005268994201D3914206D3441E1E2C41D877 +:101F9000994203D3914201D21020BFE7012837D1E3 +:101FA00008780024C007C00F002803D0032069462A +:101FB000887001E06846847038206946087009A975 +:101FC000684609F0BAFD002804D004480CA18B38FB +:101FD00019F0C1F82046A1E7841B0000AA02000006 +:101FE00088070020A40B002024000020FFFF000031 +:101FF00000220020000000202104000000C0010099 +:102000007372635C686F73745F636F72652E6300D5 +:10201000072083E70246203A1F2AF9D806F001FE7E +:102020007CE710B5604A5268914201D2102010BD81 +:102030000246203A1F2A02D806F068FE10BD07208B +:1020400010BD70B50546594C002020702046461939 +:1020500055484660E01C80088000A04204D0FF2064 +:102060005349293019F077F801200007C06AC043AE +:102070000006000E03D14F480068401C03D04E48B4 +:102080004E49301AC862A8B20422214604F00DF964 +:10209000002804D0FF204649393019F05CF870BDA3 +:1020A000F0B595B03B2008A9087369460BA809F064 +:1020B00044FD002804D0FF203D49813019F04BF841 +:1020C0003F4E00246D4630E02F19B87DC10706D081 +:1020D000400704D460004019C08809F0E9FB394882 +:1020E000807900281FD0B87D80071CD5600040197A +:1020F000C0880022062109F0F7FB002813D03C21FC +:1021000008A8017360004019C1886846C185694606 +:102110000BA809F012FD06000BD0FF2024499630D1 +:1021200019F019F805E0641CE4B268460079A04291 +:10213000CAD8304658E5F7B50546007800270009AB +:102140000C463E46062804D0FF201949BF3019F03E +:1021500002F8287A00280ED0012814D0FF20144954 +:10216000E03018F0F8FF0298002C068001D027809C +:1021700066800020FEBD02270926002C10D0A88909 +:10218000A080A87B0AE003271426002C08D06888CA +:10219000A0802869E060A88A2082287B2072E2E77C +:1021A00002980680E5E700002400002000220020BD +:1021B000002000000010001000000020000500407A +:1021C000043000008807002010B56038030019F0C3 +:1021D000E3F80A060A0F13181F252930353A086854 +:1021E000FFF786FD10BD05C91146FFF7CEFD10BDF6 +:1021F0000868FFF773FD10BD05C91146FFF73DFEE6 +:1022000010BD4B6808788A681946FFF749FE10BD73 +:102210008A6809C91946FFF75FFE10BD0868FFF715 +:1022200075FE10BD08884A6880B21146FFF78CFE23 +:1022300010BD05C91146FFF79BFE10BD05C911462B +:10224000FFF7EFFE10BD012010BD01207047000018 +:102250000E4A12680C498A420AD118470B4A126882 +:10226000094B9A4204D101B500F08EFE03BC8E46A4 +:10227000074909680958084706480749054A064BAF +:102280007047000000000000BEBAFECA64000020D3 +:1022900004000020F0210020F021002001203F490F +:1022A000400608603E4908603E490A68FF231B0259 +:1022B0009A4383121A430A6038498039086070478C +:1022C00010B502460420384904E0C3005B181B79AE +:1022D000002B0AD00346401EC0B2002BF5D133A11B +:1022E000432018F038FFFF2010BDC300CA50002261 +:1022F00059184A718A7101220A7110BD2A4A0021B7 +:10230000C00080180171704710B50446042803D33B +:1023100026A1522018F01FFF2348E1000C18207955 +:10232000012803D021A1532018F015FF6079A1796D +:10233000401CC0B2814200D06071012017494006A4 +:102340008031086010BD70B5164804250068164E2F +:102350000004800F1B4C02281AD014A1692018F029 +:10236000FAFE15E02078C10088190279012A07D108 +:10237000427983799A4203D04279827170588047BA +:102380002078401CC0B22070042801D300202070A7 +:1023900028466D1EEDB20028E4D170BD80E100E05A +:1023A00080E200E018E400E0200C00207372635C1F +:1023B000736F635F7369676E616C6C696E672E63C0 +:1023C000000000003400002010B5EFF31080C407B7 +:1023D000E40F72B6D2484178491C41704078012818 +:1023E00001D10AF0FFF9002C00D162B610BD70B522 +:1023F000CB4CE07800280AD10125E570FFF7E4FF17 +:102400000AF0F8F9002804D000200AF0CBF90020E7 +:1024100070BDC44865714560F9E770B5EFF3108091 +:10242000C507ED0F72B6BE4C6078002803D1BEA17F +:102430008F2018F090FE6078401E60706078002851 +:1024400001D10AF0D3F9002D00D162B670BD10B5EC +:10245000B348C178002904D000214171C170FFF751 +:10246000DCFF002010BD10B504460AF0C3F9AC49EA +:10247000C978084000D001202060002010BDF8B5C8 +:102480000246A74C0026A67108200421012510272A +:10249000130018F081FF0D080A0C0E101214161EFE +:1024A000262123252800257122E0022001E0217148 +:1024B0001EE020711CE027711AE02020F9E70126B8 +:1024C00016E0FFF781FF0AF095F90028FBD00226FD +:1024D0000EE02171A5710BE02771FBE7202000E0E1 +:1024E00040202071F6E7FF208FA1763018F033FEF0 +:1024F0000AF08CF9002809D00AF08EF9B04205D113 +:1025000030460AF08CF90028FAD02CE00120800730 +:10251000C560894900224A60884A9661814B02223F +:102520005A60856086480269D243D206D51702698F +:1025300010231A4302610F466D1C00E020BF78682B +:102540000028FBD030460AF06AF90028FAD0002DA6 +:1025500004D17B48026910218A430261714902203B +:10256000886000207860A07900280CD00AF042F939 +:1025700005460AF09FF8734A002D02D0A260E06081 +:1025800001E0E260A060002E01D100F0A5F8F8BDE6 +:1025900010B504460AF034F9002805D0604901203E +:1025A000C8704A78521C4A702046FFF768FF10BD79 +:1025B000F8B5614DA8680026012802D1AE600AF086 +:1025C000F1F86868012800D16E6028680127544C32 +:1025D000012812D12E606079002803D000200AF073 +:1025E000E1F866712078002807D00AF003F9002886 +:1025F00003D0012080070761A770286901282AD12C +:102600002E6100F05FF8012080074761A079002863 +:1026100015D00AF0EFF800900AF04CF80099002964 +:1026200001D0E16800E0A168411A022901DA8A1CA0 +:1026300011DC0099002901D0E06000E0A060FFF704 +:10264000C3FE0AF0D7F8002804D0012080070761F4 +:10265000A77000E02770E868012812D100F032F876 +:1026600000F030F800F02EF8A078002804D1FF2008 +:102670002DA1033018F06FFDEE60A6702670FFF7F5 +:10268000CCFEF8BD10B5264CE078002801D10AF048 +:10269000ADF801208107886100F014F8A0780028C7 +:1026A0000BD0254CE068002803D10AF0B8F80028C8 +:1026B000F8D10020E06000F005F800201949C0437F +:1026C000886010BD08B55020694608806A461088A9 +:1026D000411E1180FAD208BDF8B51248192787604B +:1026E000154900200860C8600AF084F8BE0701247C +:1026F0000B4D002802D03461AC7000E02C70FFF765 +:1027000063FE084847600D4928798863FFF7DAFFC0 +:10271000B461FFF7D7FF0849002008617461F8BD74 +:1027200038000020000300407372635C736F635FC6 +:10273000636C6F636B2E6300000100400005004076 +:1027400000ED00E0FFFFFF7F8107C90E002808DAD7 +:102750000007000F083880082E4A80008018C069E2 +:1027600004E080082C4A800080180068C8400006F9 +:10277000800F704710B50D20FFF7E6FFC4B20420AC +:10278000C043FFF7E1FFC0B2844203D023A11A2067 +:1027900018F0E1FC26490120486010BD0121254ABE +:1027A00048031060244B00221A60244A5160244AD6 +:1027B0001060244A11601F49803908607047012168 +:1027C0001C4A480310601F4A51601B4A00211160D7 +:1027D0001B490860704710B517490868012804D0E4 +:1027E0000EA1572018F0B7FC10BD114880680022D8 +:1027F000C0B20A6009F0BEFC10BD10B50E480168F9 +:102800000029FCD0FFF7E7FF01200D4940030860D5 +:1028100010BD000000ED00E000E400E07372635CB6 +:10282000736F635F68616C5F726E672E6300000098 +:1028300000D5004080E100E000D1004000D300401E +:1028400080E200E000D0004030B40121BC48C90261 +:102850000160CD1005604A030260BA4803681B029C +:102860001B0A036004680023240A24020460B6489B +:102870000468240A24020460B4480124446084608B +:10288000B34C23606360A360B24B19601D601A6093 +:10289000B14B19601A600121016030BC704710B45F +:1028A0000121A748CA0202600B0203600C06046003 +:1028B000A64841608160A94841680029FCD1A4492B +:1028C0000020086048608860A248026003600460DD +:1028D00010BC704701219F48C9020160C910016006 +:1028E0007047002805D0012805D0022805D19C4852 +:1028F00070479C4870479C48704710B59BA18B203F +:1029000018F029FC002010BD70B500219E4C9F4D91 +:102910009F4A8F4B002808D001281DD0022822D0C2 +:1029200092A1B32018F017FC70BD01200004A06034 +:10293000A86011601960974BC2039A60964A906034 +:102940007F4A0012106095480160864801609448F3 +:1029500001609448017070BD01204004A060A8602F +:102960005160596070BD01208004A060A860916032 +:10297000996070BDF8B59446834A8B4F834D00240F +:102980000126002808D0012832D0022840D077A1A3 +:10299000E82018F0E0FBF8BD891E0902090A0120B1 +:1029A000000490603C6468606C4A1164012B1DD087 +:1029B00000217C4A7D4B51706146DC63DE637C4BB9 +:1029C0005C6002249C6004241C61744B3D311960DE +:1029D00073490E605F4B891519606F4B58605E48F4 +:1029E00001606C49C00548601670F8BD0121E0E740 +:1029F0000120704E4004704F012B04D134645060AC +:102A000068603964F8BD9060346468603964F8BD0A +:102A100001206A4E80046A4F012BF4D1EEE74F4843 +:102A20004068704770B54A4D28680026564C01280A +:102A300006D1A068C00303D501200004A0602E6069 +:102A40006868012809D1A068800306D501204004E8 +:102A5000A0606E6001200AF0B9FEA868012809D1C3 +:102A6000A068400306D501208004A060AE6002206B +:102A70000AF0ACFE70BD10B54A490878002818D09D +:102A80000120444AC0079060434AC00B90602C4A22 +:102A900000121060414A00201060324A1060404A23 +:102AA000106008704A78002A02D048700AF08EFE42 +:102AB00010BD0320FAE70120424900060860704774 +:102AC0000120244900060860704701203D49400567 +:102AD0000860704701201F4940050860704733496E +:102AE0000020C86388151B4908607047410A364AB0 +:102AF000C005C00D5043801C5143400A0818704760 +:102B000010B4324C430B63431B0C5C020C602E4C24 +:102B10006343C31A2E485C0258432B4B400D43437A +:102B2000E31A0124DB0324041B191B1613700A6823 +:102B30001018086010BC704710B50AF01BFF10BDDC +:102B400080E100E008E400E018E400E000B00040AC +:102B500040B1004080E200E000E100E000B500404C +:102B600048B100404081004044B100407372635C52 +:102B700072656D5F68616C5F6576656E745F7469C0 +:102B80006D65722E6300000000B3004040B300404A +:102B900040B5004000F50140008300404085004002 +:102BA000008200404800002000B10040C08F00407B +:102BB0000085004004B1004004B5004008B1004069 +:102BC00008B5004000E200E0093D00003786000043 +:102BD0006F0C010010B50AF0B9FE10BD00200449C9 +:102BE000C863012001218140024A116000BF704783 +:102BF000C01F004080E200E010B50DF05DF909F063 +:102C0000F7F9FEF7C3FB0FF0F5FA0DF08FFF0DF0AB +:102C10001BFF10BD70B50C46054603F0A7FA214610 +:102C200028460EF0C2FF70BD70B50D46040012D0EC +:102C3000002D10D02101284618F060F910225449C7 +:102C4000284618F0FEF852480121083801804480D7 +:102C50004560002070BD012070BD70B54C4E002451 +:102C60000546083E11E0716820014018817BAA7B6F +:102C7000914209D1C17BEA7B914205D10C222946C0 +:102C800018F0B2F8002806D0641C30888442EADBD1 +:102C90000020C04370BD204670BD70B50D460600D3 +:102CA0000AD0002D08D03A4C083C20886188401C8E +:102CB000884203D9042070BD102070BD3046FFF754 +:102CC000CCFF002801DB401C0AE02088616800017D +:102CD00040181022314618F0B4F82088401C20809B +:102CE0002870002070BD70B514460D001FD0002C58 +:102CF0001DD00021A170022802D0102817D108E0B1 +:102D0000687829780002084311D00121A170108051 +:102D10000BE02846FFF7A1FF002808DB401CA0704D +:102D2000687B297B000208432080002070BD0120C1 +:102D300070BD70B5054614460E000AD000203070F4 +:102D4000A878012807D004D9114908390A88904287 +:102D50000BD9012070BD002C04D028782070288861 +:102D6000000A50700220087010E0002C0CD0496856 +:102D70000001411810222046103918F062F8287816 +:102D800020732888000A607310203070002070BD06 +:102D9000540000205A4910B5884207D30121890404 +:102DA000884205D357490968884201D2102010BDD6 +:102DB0000146012005F0CBF810BD30B5044693B0B4 +:102DC00000200D46079014210BA818F099F81C213B +:102DD000684618F095F86A46112010770020507761 +:102DE000107802210843107007A80C90012008AA4F +:102DF000907245486A4610850AA80B902088108476 +:102E000060885084A0889084E088D084907FF921E5 +:102E10000840801C4008400090770820908610876A +:102E200008A80F9010AA0BA9684600F05CFF0028C4 +:102E300003D110A800882880002013B030BD3EB513 +:102E400004460820694608802D48844207D30120A3 +:102E50008004844205D32B480068844201D21020AC +:102E60003EBD2146012005F072F80028F8D12088E7 +:102E7000694688806088C880A0880881E088488189 +:102E800005F065FE01AB6A46002101F0BBFB694617 +:102E900009880829E4D003203EBD1FB50446002060 +:102EA000029008206946088115480391844207D39F +:102EB00001208004844206D312480068844202D272 +:102EC000102004B010BD05F042FE014602AA0F48D2 +:102ED00001F02EFD0028F4D169460989082901D0A6 +:102EE0000320EEE7694609882180694649886180A8 +:102EF00069468988A1806946C988E180E1E70000C8 +:102F000000C0010028000020042A0000FFFF00008C +:102F100010B5031D03600020521E04E05C181C6005 +:102F2000401C2346C0B29042F8DB0020186010BD60 +:102F300001460A680020002A02D0104612680A6082 +:102F4000704702680A6001607047000010B50146D2 +:102F50002022094817F075FF07490020C877084666 +:102F600010BD0649012048610548064A01689142A2 +:102F700001D1002101607047B00E00200005004023 +:102F800064000020BEBAFECA0C4908784A78401C8A +:102F9000C0B2904200D008707047094A074820BF6D +:102FA00040BF20BF4178037843701368002B02D1E3 +:102FB00003788B42F3D00020704700006B000020A4 +:102FC00000E200E00A4A022151600A490B68002B26 +:102FD000FCD0906008680028FCD000205060086891 +:102FE0000028FCD0704701200007406970470000AE +:102FF00000E5014000E401407047704770477047AA +:1030000010FFFFFFDBE5B15100C001006700FFFFCB +:1030100003B40148019001BD09000020002803D03D +:103020008178012939D101E0102070470188FE4ADA +:10303000881A914233D01BDCFC4A881A91422ED068 +:103040000BDC00292BD00320C002081A27D001284E +:1030500025D001210903401A07E001281FD00228CA +:103060001DD0FF281BD0FF380138002815D116E0ED +:10307000FF220132811A904211D008DC01280ED0C3 +:1030800002280CD0FE280AD0FF2806D107E001292B +:1030900005D0022903D0032901D0002070470F205A +:1030A000704700B50B2826D009DC030018F074F92E +:1030B0000B1D2125251B25292325271F1B00112832 +:1030C0001BD008DC0C2816D00D281CD00F2814D0DB +:1030D000102808D10FE0822809D084280FD0852835 +:1030E0000FD0872811D0032000BD002000BD05208F +:1030F00000BDCF4800BD072000BD0F2000BD04204B +:1031000000BD062000BD0C2000BD0D20800200BDCA +:1031100070B500290BD0CB1FFA3B81241E46CDB2DF +:10312000112B1BD2012805D0022806D009E000206F +:1031300010701DE0FF20043001E0FF2003308142C9 +:1031400018D0330018F028F9111613131613161699 +:103150001316161613131313161316000846FF380A +:1031600081381F2803D9FF39FE39022902D815708A +:10317000002070BD1470072070BD00B5030018F06A +:103180000BF9060406040C080A0C002000BD1120EF +:1031900000BD072000BD082000BD032000BD007851 +:1031A0000207120F04D0012A05D0022A0AD10EE02C +:1031B000000907D108E00009012805D0022803D042 +:1031C000032801D0072070470870002070470620B0 +:1031D0007047002807D0012807D0022807D003280D +:1031E00007D007207047002004E0112002E02120D2 +:1031F00000E0312008700020704738B50C4605000B +:103200004FD06946FFF7CBFF002822D12088032149 +:1032100089028843694609788907090D0843208097 +:103220006946681CFFF7BBFF002812D121880320E4 +:1032300000038143684600788007800C01432180A9 +:10324000A8784007820F2020012A03D0022A03D049 +:10325000072038BD814300E00143218088B2010589 +:10326000890F08D0012189038843A9780907C90F6C +:1032700089030843208080B28104890F0AD0A9788D +:103280004004C906C90F400CC903084320808004CC +:10329000800F02D12088400403D5208840210843B4 +:1032A0002080002038BD70B50446002008801546F7 +:1032B0006068FFF7A2FF002815D12189A08981420B +:1032C00010D861688978C90708D00121490288426D +:1032D00008D8491C17F01EFE298009E0FF21FF31A4 +:1032E000884201D90C2070BDFF30FF3003302880A8 +:1032F000002070BD10B5137804785B08E4075B000C +:10330000E40F23431370FD2423400478A407E40F43 +:10331000640023431370FB24234004786407E40F04 +:10332000A40023431370F724234004782407E40FF8 +:10333000E40023431370EF2423400478E406E40FF1 +:10334000240123431370DF2423400478A406E40FF0 +:103350006401234313700078BF244006C00F23404C +:10336000800103431370002906D00878C10701D1FA +:10337000800701D5012000E00020C0015906490E58 +:103380000843107010BD30B50A8803239B020488DF +:103390009A4323059D0F02D1A3049C0F01D09B0FDC +:1033A00000E001239B021A4303230A801B039A4374 +:1033B00003889804840F02D11805830F01D0800F71 +:1033C00000E00120000302430A8030BDF3B593B052 +:1033D0000D000FD0139800280FD01221284617F0A7 +:1033E0008DFD03AAFF21012003F0D5F80024264615 +:1033F00037467AE0102015B0F0BD0720FBE768469D +:10340000807D01280BD16846818A0520C002081AF8 +:1034100010D0012810D0022812D0032812D0042C7A +:1034200014D0052C15D113E002290000012800005A +:1034300003300000012400E002246846468A08E0C8 +:10344000032406E068460424478A02E0052400E0DD +:1034500006246846418A1398814246D12C74002E76 +:1034600041D00DAA0EA905200292019100901023CF +:103470000022FF21304603F02FF9002823D16846AF +:10348000808E2A46C0B20EA9FFF72DFC00281AD163 +:10349000AE81002F27D00DA9052008AE0291009023 +:1034A000132300220196FF21384603F015F9002866 +:1034B00009D16846808EF11CC01EC0B22A1DFFF7DC +:1034C00012FC002801D0032095E708A881784278F3 +:1034D00008021043E881062C05D16846807DA87259 +:1034E0006846808A2881002085E703A803F05CF8FD +:1034F000002884D0FFF7D5FD7DE7002805D0FE4ADF +:10350000012903D0022903D003207047518800E02D +:103510009188814201D1002070470720704770B523 +:103520000C4605461C21204617F0E8FC00202080B0 +:10353000002D08D0012D04D0F0A1F54817F00BFEA6 +:1035400070BD062000E00520A07070BD70B592B07F +:103550001546064601206A461071107453740846D9 +:1035600008300395029048889082FEF7FBF904002A +:1035700019D06580172069468883203600940AABED +:103580007178023307AA01A80EF017F90646607891 +:10359000000701D5FEF7C7F9002E0AD03046FFF725 +:1035A000ECFD12B070BD1321284605F00EFF03207C +:1035B000F7E708A800906846838B0422012128467B +:1035C00007F0B3FEEDE770B506468AB000200D4661 +:1035D00007900590069003A90490052402460291E5 +:1035E0000190102300942946304603F075F8002816 +:1035F0000DD108A804A9009102900194684683891E +:1036000000222946304602F083FE002801D0FFF751 +:1036100048FD0AB070BD10B50EF0D5FA10BDF0B57A +:1036200089B000260546059600780C460827030059 +:1036300017F0B2FE0CFD070C390B75759BBEFCD361 +:10364000E3FD68680A38FEF702FB07E1A88800225C +:1036500080B20421009008F067FB0290002C04D097 +:10366000AB48A6A16E3017F076FD0298002804D171 +:10367000A748A2A16F3017F06EFD0298009908309C +:103680000DF0D0FCFEF76EF9040007D060783843E7 +:10369000607000986080FEF746F9E1E01321009821 +:1036A00005F093FEEAE0002C04D1BD2093A1800038 +:1036B00017F051FD60880022042108F035FB0090CE +:1036C000002804D192488DA1883017F044FD00995C +:1036D000002008802A7994461EE0C3005B199B688D +:1036E00007936B469B8B1A0708D5DA0606D560460A +:1036F000C20050194038C08F088006E05B0409D52D +:103700000871C2005019C0884880607838436070E2 +:103710000226A3E0401CC0B28445DED89EE0E888C3 +:10372000694608800090002C04D1794873A1983034 +:1037300017F011FD2878062813D10098C00B10D07F +:1037400060880022042108F0EFFA060004D17048D6 +:103750006AA1A23017F0FFFC00203071A8887080A9 +:1037600039E060783843607078E0002C04D1684814 +:1037700062A1B43017F0EFFC60880022042108F049 +:10378000D3FA0090002804D161485CA1B73017F04B +:10379000E2FC009808300EF068FA0121484002D19E +:1037A000E888C00B5AD0009861880226C180D8E70B +:1037B000002C04D1564851A1D03017F0CCFC6088C1 +:1037C0000022042108F0B0FA002804D150484BA18F +:1037D000D33017F0C0FC0226C3E7002C04D14C48BC +:1037E00046A1DC3017F0B7FC022661880122204692 +:1037F000FEF73EFA01200590B3E7A889002280B2C7 +:103800000421009008F090FA0746002C04D04048AC +:103810003AA1EE3017F09FFC002F04D13C4837A1AD +:10382000EF3017F098FC6868029001E009E010E0C2 +:10383000288969468881012202A90098FEF734FA96 +:103840000CE0002C8DD16D202CA1C00017F083FC62 +:1038500087E72F4829A1FE3017F07DFC002C0DD002 +:10386000607800070AD50598002807D184202070C9 +:103870002046582229460830FDF7A6FC304609B0FC +:10388000F0BDF7B50C460546007A224688B00A32EC +:103890000492921C01920027811E16323E4602922B +:1038A0000B0017F079FD08F405F348488ED0F2F3C9 +:1038B00068880022042108F037FA0190002803D11B +:1038C0000EA1144817F047FC01980088002802D088 +:1038D0005227072600E151271E26002C70D0688849 +:1038E000A0800120A071019804990079C0004019BE +:1038F000C089FFF76BFD0FE0400C00207372635C22 +:1039000067617474735F636F72652E6300000000FB +:103910006F0200008603000000287DD10198007925 +:10392000C0004019C089208101980079C000401969 +:10393000408AA083F0E0698A0091062820D1E889B6 +:10394000C00B1DD008462230512786B2002CC5D0AE +:10395000A8890199FFF73AFD002872D16888A080F4 +:103960000220A071A88920810120A072288AE0830A +:10397000009820846969009A029817F062FACBE0F7 +:1039800008462030502786B2002CA7D0A889049979 +:10399000FFF71CFD002854D16888A080A889E0802A +:1039A000287A06280AD002202072288AA08300984C +:1039B000E083204669692030009ADEE70120F3E7C2 +:1039C0008FE068880022042108F0AEF90690688A2A +:1039D00000900698002803D1FD49FE4817F0BBFB74 +:1039E000069808300EF041F90121484002D1E889DB +:1039F000C00B25D000985127223086B2002C7AD0F7 +:103A00006888A080A8890199FFF7E0FC002818D1F8 +:103A10000220A071A88900E013E020810420A07298 +:103A2000288AE083009820846969009A029817F038 +:103A300008FA0699002008710698A98941806BE070 +:103A400003200BB0F0BD688804F0DDF900906888B1 +:103A50000022042108F068F901900098002804D1A0 +:103A6000DC48DB492C3017F076FB0198002804D1A4 +:103A7000D848D7492D3017F06EFB0198D649C08839 +:103A8000884205D05127222604E01EE03FE035E0C1 +:103A900050272026002C2ED06888A080502F07D0D9 +:103AA0000220A0712146287B0831FFF738FD33E062 +:103AB000287BA11DFFF733FD6A8800230199009838 +:103AC000FFF744FD0028BCD126E0C449A889C98875 +:103AD000814207D154270626002C0CD06888A0808C +:103AE0001AE008E053270826002C04D06888A0803C +:103AF000A889E08010E00A98068013E05527072681 +:103B0000002CF8D0A889A0800020A07104E08D20AE +:103B1000AF49C00017F01FFB0A98002C068001D0A7 +:103B20002780668000208CE7AC4900200870704731 +:103B300030B585B00C4601F0DBF90546FF2804D10D +:103B4000A448A349953017F006FB0020208020717F +:103B50006080401EE0802046294608300DF056FA6D +:103B60006A462946012002F016FD102412E068463C +:103B7000808800070ED56846C0882946FFF723FDD8 +:103B800068468188FF2321438180C0882946019AA5 +:103B900002F02CFE684602F007FD0028E7D005B0D1 +:103BA00030BD0A46014610B5104608300DF042FA05 +:103BB00010BD70B505460022042108F0B5F80400D8 +:103BC00004D184488249B73017F0C5FA2046294607 +:103BD00008300DF027FA70BDF0B591B00C460746DD +:103BE00004F011F9050005D02878222804D2082015 +:103BF00011B0F0BD7A48FBE700220421384608F0F6 +:103C000093F80646002C02D0A08800280CD0012092 +:103C1000694608710220087400204874002C05D001 +:103C2000A0880883206802E00920E1E70883059066 +:103C30003046083003970290FDF794FE040018D038 +:103C40006780172069468883203500940AAB69781D +:103C5000023307AA01A80DF0B0FD05466078000701 +:103C600001D5FDF760FE002D09D02846FFF785FA43 +:103C7000BEE71321384605F0A8FB0320B8E708A8E3 +:103C800000906846838B04220121384607F04DFBE3 +:103C90000021C943F180ABE7FFB585B00E9E778860 +:103CA000384604F0B0F8054600220421384608F0F2 +:103CB0003BF80446002D03D145494A4817F04BFA1A +:103CC000002C04D147484249401C17F044FA0834FC +:103CD000089869460394C1C105A80DC820356978C4 +:103CE0000DF0DAF9CBE5F0B50446002099B00D46A9 +:103CF00001460D9010A88181164601818180374AC6 +:103D000068469180018510A80180684601878185F9 +:103D100081841078012808D0022806D0032804D016 +:103D2000042802D0082019B0F0BD2F4A944273D362 +:103D30002E4F0121890438688C4201D3844278D304 +:103D4000294A954275D3012189048D4201D38542C8 +:103D50006FD36168002913D0234A914269D30122AD +:103D60009204914201D3814263D3608921898842C0 +:103D700003D801225202914201D90C20D3E70D90C1 +:103D800016AA0EA92846FFF78EFA0028CBD168683C +:103D900080784007800F02280AD16846008F80048F +:103DA000800F05D02869002802D03968884240D3A6 +:103DB0000AA92069FFF721FA0028B4D12069002858 +:103DC0001CD0607880076846008D14D580040FE011 +:103DD000FC380000EE030000FFFF0000400C002054 +:103DE000023000000C05000000C001002800002087 +:103DF000800F68D002E08004800F64D16846008D97 +:103E0000810618D58004800F606806D0002812D083 +:103E1000396888420DD302E00BE000280BD0FE4940 +:103E2000884206D301218904884204D33968884234 +:103E300001D2102077E709A96069FFF7DEF90028B1 +:103E40009CD16069002808D06846808C0105890FE4 +:103E5000012938D18004800F35D00BA9A069FFF764 +:103E6000CCF900288AD16846808C80062BD468461D +:103E7000808D810627D4A169002906D00105890F0C +:103E8000012920D18004800F1DD0E068002804D0D3 +:103E90000078002817D01C2815D204AA611C2046DF +:103EA000FFF728FA0121890210A80180012768463E +:103EB0008773DA49818104AA033217A92868FEF7BB +:103EC00038FF002801D007202DE710A8007F15A992 +:103ED000C01CC2B200200C920190FF320090034639 +:103EE0000291FF3203A80332109902F0ACFA0028C5 +:103EF00026D110A9888A0F902A892969C84801917A +:103F00000092029010A90A8B6B8928680E9902F022 +:103F10009AFA01007ED1C2480025001F81886846B8 +:103F20004174090A8174052104A86A4623C210A8B5 +:103F30002A46FF21808A0C9B02F0EAF9002802D071 +:103F4000FFF7AFF8EFE66846007C0322C1090020C6 +:103F5000920290430122920280181490002928D0E6 +:103F6000014610A8018068462921877309028181D2 +:103F7000058608A8007C0023410860784900C00736 +:103F8000C00F014308A80174FD2001406078A54AD4 +:103F90008007C00F4000014308A801740CA902204B +:103FA00001910090029503A8109902F04CFA0100CB +:103FB00030D16068002828D0206900280DD10AA9D6 +:103FC0000EA8FFF7E0F96078800706D46946088DEF +:103FD0000321090388436946088590496846877329 +:103FE000FE3181818F492089891E16F093FF626816 +:103FF0000D9811AB0192009002930A46002303A88A +:104000000A9902F020FA010004D12078C10603D4F5 +:10401000800600E085E02AD56846058660690028AC +:104020000DD109A90EA8FFF7AEF96846818C0320CF +:104030008002814301208002091868468184694614 +:10404000888CC82108436946888474488F73FF3080 +:10405000888112AA0CA902200292019100900023EB +:10406000704A03A8099902F0EEF9010059D12078AD +:10407000C00729D068460586A06900280DD10BA984 +:104080000EA8FFF780F96846818D032080028143E6 +:10409000012080020918684681856846818D40208C +:1040A00001436846818587735F49818113AA0CA902 +:1040B000022002920191009000235A4A03A80B9912 +:1040C00002F0C1F901002CD1E06800282DD010A821 +:1040D00014990180544968468773491C8181E168BD +:1040E00008A80A78027449784174E068412241883E +:1040F00068464186E0680023017908A80175E068F8 +:10410000D200C18808A84175090A81750CA8072149 +:1041100001900091029503A8109902F094F9010012 +:1041200003D00F9800F0E8FEFDE53D480321001F95 +:104130000170002E0AD08088308010A8808870809E +:1041400010A80089B08010A88089F0800020EAE5DE +:1041500030B501248BB015460B46012802D0022849 +:104160001CD104E0684605218473C90203E02B4991 +:1041700068468473891E8181002B12D003210020A0 +:10418000890288430121890240186946888405AA6A +:1041900004A91846FEF7CDFD002804D007200BB077 +:1041A00030BD1020FBE76A46127C1D480092801E3D +:1041B00005A9FF3201910290FF32002303A80332C8 +:1041C000099902F040F9002802D0FEF76AFFE6E7FD +:1041D0001348001F002D01D0418829800470002061 +:1041E000DDE770B592B00446012608A886700F4935 +:1041F0006846018410AA08A93046FFF7A9FF0028E5 +:104200004ED12078064DC00700242D1F002849D02C +:104210001C2168460CE0000000C0010003280000DB +:10422000440C0020030200000329000001180000D4 +:1042300016F066FE6846017820200143684601704A +:1042400008A88670F9496846018411940794817F13 +:10425000F92001406846891C8177002001466846A4 +:104260000177002001466846417704218185C48595 +:10427000018607A80A9011A80D9008A809900EAA17 +:1042800009A96846FFF72FFD002809D16846008F6D +:10429000E8806846808F2881401C68812C7000204F +:1042A00012B070BDEC802C8110A80088F4E7F7B53F +:1042B000DF4900260A789EB0012A04D0022A02D0E3 +:1042C000082021B0F0BD4A88824201D00620F8E7DC +:1042D0001F98824201D10720F3E7012210A98A75B5 +:1042E000D4488882002003239B020146994393020D +:1042F000CB1810A90B8669468A81CF4ACA8118A9B2 +:10430000887110A9888419A904916946CA82069007 +:10431000FF20087503A802F06AF900242546274605 +:1043200008AA052103A802F065F9002810D0822808 +:104330006FD1002C6FD0002D6DD010A88480C58067 +:104340000021017418A8807B11AC012865D06DE0B4 +:1043500008A88079002F21D0012857D16846818C88 +:10436000B44881421CD113AA0DA905206B4607C38E +:104370006846408C10230022FF2102F0ADF900288E +:1043800068D110A88089042801D006284CD168463D +:10439000818E1F98814239D10F2092E7012835D1B3 +:1043A0006846808C0521C902884202D0491C884297 +:1043B0002CD19F4841886846408C814201D1012719 +:1043C00000E00027002C01D0002D10D01F9988425A +:1043D0001CD113AB0DAA05216E460EC60446102350 +:1043E0000022FF2102F078F9002833D101E03546A0 +:1043F0000CE010A88089022801D0102814D1C0B286 +:104400001BAA0DA9FEF76FFC00280DD16846468C4B +:1044100086E71FE0FFE7052053E714A91BA8221D2C +:10442000FEF787FC002801D003204AE710A8007C93 +:104430000023001DC2B210A80274209802900194BB +:10444000009215A81C9901F0FEFF002802D17849BE +:1044500002220A70FEF725FE33E710B50B46401E18 +:1044600086B084B203AA00211846FEF743FF04AACF +:10447000052103A802920191009001230022FF214F +:10448000204601F045FF04466846008A012804D012 +:104490006D206A49000116F05EFE2046FEF701FE1F +:1044A00006B010BDF0B5624F0446387887B00E46AE +:1044B000032804D0042802D0082007B0F0BD04AAC5 +:1044C00003A92046FEF7EFFE0500F6D1606880786C +:1044D0004007800F02280DD1684680898004800F34 +:1044E00008D02069002805D055490968884201D2C2 +:1044F0001020E2E7208905AA6B46216907C36946B7 +:104500000A8A63892068039901F09DFF002802D080 +:10451000FEF7C7FDD1E7002E02D06846808A3080C2 +:10452000042038702846C8E738B50C00054609D085 +:1045300000236A46FF2102F031F9002804D0FEF77B +:10454000B0FD38BD102038BD69462046FEF755FE47 +:104550000028F8D1A078FF21C307DB0F2846009A76 +:1045600002F044F9EBE73EB50C0009D002AB6A4615 +:10457000FF2102F013F9002804D0FEF792FD3EBDA2 +:1045800010203EBD0321204616F0B8FC6846008886 +:1045900001A90005800FFEF71CFE00280BD168461C +:1045A000007920706846008801A98004800FFEF71A +:1045B00010FE002801D003203EBD684600796070DF +:1045C000A278EF20024068460088C10B09010A4327 +:1045D000F7210A404104C90FC9000A43A270F9211A +:1045E0000A40800601D5022000E001204000694613 +:1045F0000243097A50084000C907C90F0843A07058 +:1046000000203EBD7FB514460522019203AD029500 +:1046100000930A462388FF2101F07AFE69468989C2 +:104620002180FEF73EFD04B070BD0000052A0000A9 +:10463000400C002002280000FFFF0000FC380000B2 +:1046400028000020F3B5002799B068460C4607877C +:104650003D4600291DD0E068002806D0A06800284B +:1046600017D001886A4611870780199803F0CBFBA1 +:10467000002811D0007822287ED3199800F038FC49 +:10468000009000220421199807F04EFB060009D182 +:1046900004E010201BB0F0BDFC48FBE7FC49FD48DE +:1046A00016F059FDA078012803D0022801D0072078 +:1046B000F0E72088002808D0401E80B203AA0099A5 +:1046C00001F069FF002859D11DE0F048401CE1E7E6 +:1046D0006946498A228891420BD26846807D00252E +:1046E000012810D16846808AEB4988420BD1012508 +:1046F00009E0914203D1002D2AD06D1C01E0022D6A +:104700000BD0032D04D203A801F04EFF0028DFD008 +:1047100082281BD0002831D11DE06946897D0129FE +:10472000F1D16946DC4B8A8A5B1ED11A9A420FD0BE +:1047300005DCDA48101A0BD00128E4D108E0012981 +:1047400006D0FF390129DED10325E1E7022D15D17D +:104750000D2080029EE7E068002816D00EA90522F1 +:1047600002910192009069460B8FA2882088FF2158 +:1047700001F0CEFD002800E01DE002D0FEF791FC24 +:1047800088E76846A168008F08806846008AC006EE +:1047900001D5C3487EE70798002803D06846008B00 +:1047A000022801D0032075E70798A1780078012935 +:1047B00003D0800710D408206CE7C007FBD000228C +:1047C0000721199807F090F8002802D00725022049 +:1047D00004E0AE48801C5DE70225032008A90870AC +:1047E000218868468185199808360A90099617210C +:1047F0006846818712AB02330FAA052108A80097EB +:104800000CF0DBFF002802D0FEF7B7FC42E710A84F +:1048100000906846838F04222946199806F085FD8A +:1048200038E770B5064615460C460846FEF7F6FB17 +:10483000002804D12A4621463046FFF789FCF3E6DA +:1048400010B5FFF734FD10BD70B51E4614460D00BF +:1048500014D0002C12D0616800290FD00121FEF77E +:104860004CFE002809D12068FEF7D8FB002804D1AF +:10487000324621462846FFF736FAD5E61020D3E621 +:1048800070B515460C000ED00221FEF736FE00284A +:1048900008D12068FEF7C2FB002803D12946204634 +:1048A000FFF700FEC0E61020BEE6F8B506467D48DC +:1048B0000D46016814468A4231D36068002808D04A +:1048C000794A90422BD301229204904201D388422C +:1048D00025D37648864204D0304603F094FA002867 +:1048E0000CD0304600F004FB0646284600F0BDFA26 +:1048F000002804D16068002802D012E06348F8BDA7 +:1049000000236A463146284601F048FF002802D0BD +:10491000FEF7C7FBF8BD68460088800601D410206A +:10492000F8BD6188224628466368FFF76BFEF8BD34 +:10493000F7B55C4E0746306886B01446824202D214 +:10494000102009B0F0BD384600F0D2FA05465748AD +:10495000874201D0FF2D08D0002304AA29460798DA +:1049600001F01CFF002826D101E04848E9E768462D +:10497000008AC00601D54A48E3E703A90020029156 +:104980000527019000976288484B2946079801F057 +:10499000A3FE00280FD161683268914208D30191CB +:1049A00002900097238862882946079801F094FEB8 +:1049B000694689892180FEF774FBC2E7002907D088 +:1049C0003B4B0A881B899A4202D83048401C7047EA +:1049D00038E610B586B004236C46A382344BDC88DD +:1049E000002C07D01B898B4201D2914204D9274861 +:1049F000401C55E5062053E56B4619825A8200217A +:104A0000009101911C800221997005A9029104A9CD +:104A100003916946FFF716FE42E5F3B50C4685B0F3 +:104A2000812069460873002C1AD0059803F0EBF931 +:104A3000070017D03878222868D3059800F058FA74 +:104A4000049000220121059806F04EFF00280BD0AB +:104A500000220421059807F067F905000AD105E056 +:104A600010202AE5094828E5112026E508491148C3 +:104A700016F071FB284608300CF0F6FA064620784E +:104A8000012819D0022838D0072016E5023000008E +:104A9000FC380000E10800000328000000280000A6 +:104AA000013400002800002000C00100FFFF0000CA +:104AB000400C0020840A0000A18803AAFEF728FB0E +:104AC0000028CED1B00721D56846007B00281FD131 +:104AD000A079C0071CD0E068002205216B4607C3FF +:104AE000638922896888049901F012FC6946087379 +:104AF00000280DD0FEF7D5FADFE4A18803AAFEF75F +:104B000007FB0028ADD13420064201D10820D4E4AF +:104B10006846037B29463846059AFEF717FDCCE424 +:104B2000FFB597B0002001901F4615460C460E4673 +:104B3000179803F068F9002804D00078222803D2DF +:104B40000820A7E5F348A5E5B80801D00720A1E5AE +:104B5000032F00D10027179800F0CAF90890002C05 +:104B60001BD0022D77D3EC48006884427CD36119B6 +:104B70000091012902D0491E814275D3AD1EAAB20F +:104B80002146E6480DF0F0F800991E394A7F0B7F68 +:104B900011021943884267D1ADB2E148B90702D585 +:104BA0000189491C00E0012189B20091F90701D077 +:104BB000078900E0D94F03AA0899009801F0EBFC9F +:104BC0000DE0F078B1780002084310284CD8019924 +:104BD000091D401880B20190A84245D82618002E21 +:104BE00060D0707831780002084300998842E8D399 +:104BF00058E06946098A0A0754D5002C3FD0019A2B +:104C0000A618121D92B20992F278B37812021A43D2 +:104C10009446102A28D8099A6244AA4224D8727865 +:104C2000337812021A4390421ED1C8061ED5099845 +:104C30000AAA052120186B4607C370783178000254 +:104C4000084363460022089901F062FB002803D064 +:104C5000FEF727FA1EE507E0F078B1780002084376 +:104C60006946098D884201D00B2013E5F078B178B0 +:104C7000000208430999401880B2019006E0C90675 +:104C800004D50899FEF79FFC0028E3D16946088AFD +:104C90001021884369460882488AFF23049A0899AC +:104CA00001F0A4FD03A801F07FFC002803D16846B1 +:104CB000408AB8429DD900220421179807F034F8A1 +:104CC000040003D19749984816F045FA2088002837 +:104CD000C0D0012108A80170017300264673218805 +:104CE0006846018620460830099017980A90FCF71C +:104CF00039FE05001BD01798688017206946888008 +:104D000010AB023301AA052108A800950CF055FD4F +:104D100007466878000704D583488249223016F098 +:104D20001AFA002F09D03846FEF727FAB2E4132109 +:104D3000179804F04AFB0320ACE40EA800906846E4 +:104D4000838804220121179806F0EFFA00288CD1FD +:104D500026809FE4F0B500248DB01F4615460E4610 +:104D6000002A04D0B90804D007200DB0F0BD1020EF +:104D7000FBE7032F00D1002700F0BAF80390FF28CB +:104D800004D06749B80703D5488902E06148ECE7D9 +:104D90000120FA0702D04989491E00E05F4906AAAE +:104DA0008FB2039901F0F7FB38E06946898B090758 +:104DB00034D504AB05210022029300910192574B98 +:104DC000039901F089FC002821D1002E21D06A46E8 +:104DD000128A2988A2183019121D914234D36946CB +:104DE000CA8B0270120A42700A8A8270120AC2705A +:104DF00004A90522001D0092029101906946C88B0A +:104E00000B8A0022039901F067FC002801D00320DF +:104E1000ABE76846008A2018001D84B206A801F09E +:104E2000C3FB002804D0822806D0FEF73AF99CE79D +:104E30006846C08BB842B8D9002C07D0002E10D0DD +:104E40002988A01C814203D20C208EE705208CE724 +:104E50002246314631480CF087FF31190870000AAC +:104E60004870A41C2C8000207FE700B585B06946FF +:104E7000FEF7ACFA00280AD16846007C030016F061 +:104E80008BFA08052F2F2F2F08080531032005B0B6 +:104E900000BD68468078012807D168460088032154 +:104EA000C902401A1CD001281AD06846807901280E +:104EB00006D16846808815214902401A05280FD975 +:104EC0006846807A012811D16846018929200002AC +:104ED000081A05D0022803D0032801D0042805D1E0 +:104EE0000F20D4E711A1164816F035F90020CEE7BF +:104EF00010B506F00FFF10BD10B50C4601F01EFBFB +:104F0000002803D009A10F4816F025F92046FEF726 +:104F1000C8F810BD0230000028000020FFFF00008C +:104F2000400C0020FC3800003F0B00007372635CF3 +:104F300067617474735F636F72652E6300000000B5 +:104F400022020000BB060000F8B500780C461646A9 +:104F500010340E36069F022809D0032836D00528C3 +:104F60007ED0FF20F6A1E53016F0F5F8F8BDCD892A +:104F70000A2068430E30188031203880002AF5D08E +:104F8000087B9581801FC7B21AE020886168308055 +:104F900048780A7800021043F080C8788A780002C6 +:104FA00010433081B21C3846091DFDF79CFE002FCE +:104FB00001D0002802D000203071708008340A36F9 +:104FC00028466D1EADB20028DFD1F8BDCD890A207C +:104FD00068430E30188032203880002AF5D0087BD4 +:104FE0009581401FC7B243E0616822880878F2804B +:104FF0003279C30752085200DB0F1A43FD231A40CF +:105000008307DB0F5B001A43FB231A404307DB0FC8 +:105010009B001A43F7231A400307DB0FDB001A43F8 +:10502000EF231A40C306DB0F1B011A43DF231A408C +:105030008306DB0F5B011A43BF231A404306DB0FD5 +:105040009B011A433271C00970718A784B78100243 +:105050001843308132463846C91CFDF744FE00E053 +:105060000CE0002802D00020B070308008340A36EE +:1050700028466D1EADB20028B6D1F8BD087BCD899B +:10508000801E86B2304608306843103018803420C5 +:105090003880002AF1D0174695811037E800D68174 +:1050A000C01900900DE02088388000987860324662 +:1050B0006168009815F0C5FE00980834801908371B +:1050C000009028466D1EADB20028ECD1F8BDFFB5AA +:1050D00081B00A9D1E460C46002A05D0607AFF303A +:1050E0000130D080E089108101980E2700780300FC +:1050F00016F052F90B7E0719293541536C787878F0 +:105100007E000092087B082805D0032803D091A1D7 +:10511000954816F020F8378030200FE000990020E5 +:10512000888105B0F0BD0092087B042804D08E4829 +:1051300088A1143016F00FF83780312028800098AD +:105140000028EBD1EDE70092087B042804D09320DF +:1051500080A1800015F0FFFF37803220EEE700923B +:10516000087B022804D080487AA13A3015F0F3FF7A +:1051700037803320E2E7087B1746042804D07A48BA +:1051800074A14C3015F0E7FF1020308034202880C7 +:10519000002FC6D00020B88116E0207B17460528D6 +:1051A00006D0062804D070486AA1603015F0D3FFFD +:1051B0001220308035202880002FB2D0E089B881BD +:1051C0000020388201984088F881AAE70092087B85 +:1051D000072804D064485FA1713015F0BCFF378008 +:1051E0003620ABE733460095019800F00AFC98E7BB +:1051F0002F2053A1000115F0AEFF92E770B50C46C9 +:10520000054602F000FE002804D00078222803D2D0 +:10521000082070BD554870BD00220521284606F0C3 +:1052200083FD2060002801D0002070BD032070BDE8 +:10523000FFB58BB00D4607461720694608850E98C6 +:1052400003261446002805D10EA93846FFF7D6FFDD +:10525000002834D1002D0BD000220321384606F05F +:1052600043FB002834D00E980078002830D108E0A5 +:105270002078092819D00F2823D031A13C4815F0F7 +:105280006AFF0E98A760801D03AA606002320AA917 +:10529000204600F00CFC002827D0030016F07CF814 +:1052A000071A182323211C1E23000726002231463B +:1052B000384606F019FB0028E3D12C48801C0FB0BB +:1052C000F0BD00220321384606F00EFB0028D8D19D +:1052D0001120F4E70020F2E70820F0E72348401C03 +:1052E000EDE70720EBE70320E9E701A80090684617 +:1052F000038D04223146384606F017F80028DED127 +:10530000002DDCD00E990D70D9E730B587B01D4661 +:105310000C46002A11D0042369460B7013888B8138 +:105320005288CA81A2788A7422880A8200236A4637 +:105330002946FFF77DFF07B030BD1020FBE70000D6 +:105340007372635C67617474635F636F72652E630D +:10535000000000007372635C67617474635F636F65 +:1053600072652E630000000025020000023000007C +:105370004F030000F3B581B001980C460078082671 +:10538000030016F009F8125E46461B134A0A0A0A81 +:105390000A0A0A0A0A0A0A0A0A5E002C02D1F64917 +:1053A000F64808E06078304360703BE0002CF9D1AB +:1053B000F248F149083015F0CEFEF3E701980022DB +:1053C0008088052187B2384606F0AEFC0546002CE1 +:1053D00004D07520E849C00015F0BDFE002D04D1B1 +:1053E000E648E549143015F0B6FE3946A81D00F030 +:1053F00055FBFCF7B7FA040006D0607830436070C4 +:105400006780FCF790FA0FE01321384603F0DDFFC8 +:1054100015E0DA48D849283002E0D848D6492D307E +:1054200015F099FE002C0AD06078000707D593206C +:1054300020702046582208300199FBF7C5FE002055 +:10544000FEBDCE48CC493130EAE710B500210170ED +:10545000801D00F020FB10BD0A4610B50146901DCE +:1054600000F024FB10BD70B505460022052106F0B2 +:105470005BFC040004D1F920BF49800015F06BFEED +:105480002946A01D00F00AFB70BDF7B5054684B0A3 +:105490000C4600206946088188806F8802460521F5 +:1054A000384606F041FC060004D1FD20B2498000D8 +:1054B00015F051FE002C03D0A7800020E080208151 +:1054C000297A20461230C91E142700900B0015F0CF +:1054D00063FF0FFDFCFB3809A95E657A2FB2C9E9AD +:1054E0009191FB003078012804D0A3497020143139 +:1054F00015F031FEA9896A46C8000E309080302030 +:105500001081002C13D0A18100200DE0C100327960 +:1055100009190A747288CA8182005319DA894A8289 +:105520001A8A401C8A8280B2A1898142EED8F1E0B9 +:1055300002A8009001AB22462946304600F02AFA24 +:10554000E8E03078042804D08B49BD20143115F0F0 +:1055500002FEA8890622014650436A460E3090801A +:1055600033201081002CE2D0A18100200BE0062125 +:1055700041434F190919FA89CA81BA7C8A743A8A57 +:10558000401C0A8280B2A1898142F0D8C2E0307802 +:1055900006280BD078491431D72005E0307806284A +:1055A00004D07549EB20143115F0D5FDE889694622 +:1055B0001230888035200881002CB8D0A989A181BB +:1055C0007188E18126E03078072804D06A49FF20FD +:1055D000143115F0C0FDA8896A4601460E3090804E +:1055E00036201081002CA2D0A1812046AA890E303D +:1055F000296954E0E8896946123080B238228880EF +:105600000A81002C7ED0A989A181287A102807D090 +:105610000221A173E9892182EA89296900983EE083 +:105620000121F6E702A8009001AB22462946304648 +:10563000FFF78AFC6EE03078082805D04E49FF203D +:105640001431EE3015F087FD6846372187800181DF +:10565000002C5FD0A989A1810020608220820120D6 +:10566000A07357E03078092805D04349FF20143152 +:10567000FF3015F070FD288A694614308880372085 +:105680000881002C46D00421A173A989A181E98950 +:105690002182298A618220462A8A1430696915F09C +:1056A000D0FB37E030780A2804D03349344814312D +:1056B00015F051FD6846372187800181002C29D0E3 +:1056C0000521A173002002E01FE004E00DE0A081AD +:1056D000208260821EE002A8009001AB224629468B +:1056E0003046FFF7F4FC15E00CE00D206946392246 +:1056F00088800A81002C05D00120E08000202081D4 +:10570000207307E00699088019E01C481A49A43064 +:1057100015F021FD6846069980880880002C0ED07F +:10572000684600892080684680886080287A03283F +:1057300005D0102803D0112801D00020307000209F +:1057400007B0F0BDF7B5568815460F4682B0002267 +:105750000521304606F0E8FA040004D1074806495E +:10576000C43015F0F8FCA41D33462A46394600948F +:10577000029800F022FBD4E440530000950300009F +:1057800013020000F7B58CB00D46144607A90C981B +:10579000FFF734FD002812D1B64E0127002C0FD0A0 +:1057A0000321684601701021818208A802460690F4 +:1057B000204605A9FDF7BDFA00280BD007207EE59D +:1057C0000821684601708581C68105218774C90258 +:1057D00001820BE00798A178017121884180684619 +:1057E00005218774C90201828581C6810246012193 +:1057F000079B0C98FFF71CFD61E508B501236A467D +:1058000093709D4B13800A4602236946FFF77DFD86 +:1058100008BD08B501236A469370974B5B1C138043 +:105820000A4603236946FFF770FD08BD00B587B03F +:1058300000290CD002236A4613700B889381498893 +:10584000D18100230421FFF7F3FC07B000BD102035 +:10585000FBE710B5002903D00523FFF756FD10BD67 +:10586000072010BD70B588B00D461446064607A93E +:10587000FFF7C4FC00280DD1002C0DD0062168468E +:1058800001708581C481079B02465C8006213046F9 +:10589000FFF7CEFC08B070BD052168460170858118 +:1058A000F1E710B588B000290BD007246B461C70B7 +:1058B0009A81049100236A462146FFF7B9FC08B09B +:1058C00010BD1020FBE770B50024172288B0002916 +:1058D00014D00D782B0015F05FFD06230505190483 +:1058E0001B231522D21E93B2CA88002A02D08E68CA +:1058F000002E03D09A4203D90C20CBE71020C9E731 +:10590000042D05D08A88002A0AD101E00620C1E7CB +:10591000012D11D0022D05D0042D18D0052D23D036 +:105920000720B7E709236A4613704B889381CB8819 +:10593000D381896804911DE00C236A4613704B885B +:105940009381CB88D38189680824049112E00D23C8 +:105950006A4613704B8893818B88D381CB881382DE +:1059600089680924059105E00E236A461370497879 +:1059700011730A2400232146FFF75AFC8AE700B579 +:1059800087B00F236A461370918100231946FFF7F1 +:105990004FFC5AE7FEB50078089D1C4616460F4698 +:1059A000012803D03549912015F0D5FBF889C000B6 +:1059B0000E30208030202880387B001FC0B201903C +:1059C000002E1DD0F889B081002516E0E80084196A +:1059D000C0190090224641690E320198FDF783F903 +:1059E000002802D000202074E08100986D1C008AFD +:1059F00060820098ADB2408AA082B089A842E5D802 +:105A0000FEBD70B514461425049A1D8037231380FB +:105A1000002C0ED0CA89A281002262820078082858 +:105A200008D0092810D00A2819D01449144815F0B4 +:105A300092FB70BD087B0C2804D011480F490C382C +:105A400015F089FB012008E0087B0D2804D00C48E4 +:105A50000A49083815F07FFB0420A07370BD087B4D +:105A60000E2804D006480549001F15F074FB0520D8 +:105A7000F3E70000FFFF000002280000545300007D +:105A8000BB02000010B5FE4B586019721A80C900A5 +:105A900015F036FA10BD00210180704710B50022C4 +:105AA000D2430280032006F0A8FD10BD7047F0B578 +:105AB0000E460446017801208840F24999B008401A +:105AC0000090616815460888EF4A904206D0009A17 +:105AD000002A06D0EB4A521E104202D0012019B013 +:105AE000F0BD009A10430880002D12D000202870CD +:105AF0002178EA1C0027681C01920B0015F04CFC71 +:105B000010F30E16233A59616F3CB4B08AB8F2F123 +:105B1000F0F320780B28EBD00420E0E70221297075 +:105B2000A1890170090A4170032097E004212970BE +:105B3000A1890170090A41700198E1890170090A7F +:105B4000417005208AE006212970A1890170090AA7 +:105B500041700199E2890A70120A4A70218A017122 +:105B6000090A4171A28AE81DA16915F06AF9A08AA3 +:105B7000C01D73E0082129702178082901D1102166 +:105B80002970A1890170090A41700198E1890170A9 +:105B9000090A41700520308020466A1D02A9103094 +:105BA000FDF7C7F800287DD169463088097A40188A +:105BB00054E00A212970A1890170090A417003206B +:105BC0000BE00C212970A1890170090A417001982C +:105BD000E1890170090A4170052030809CE0A089AC +:105BE00084464000401C81B2308888425AD305293F +:105BF00058D30E202870002008E0236942009B5AE9 +:105C0000521953701B0A401C937080B26045F4D344 +:105C10003180B9E09A48417A002973D0491E417217 +:105C2000217B4068C9004518A988286808224018C7 +:105C30000838216915F005F9022168460171002133 +:105C4000417128680390A98868460181002101A854 +:105C5000FFF790FB0020A880002E00D0308093E05A +:105C60002978802211432970297840221143297014 +:105C700029788909890112312970A1890170090ADD +:105C80004170E289E81C216915F0DBF8E089C01C4D +:105C90003080287841063FD5C00975D0012168467B +:105CA000017200E02CE0002141723188091D8181E0 +:105CB0000495E189019808180590001D0690704828 +:105CC000017A68460177002102A8FFF753FB0746D7 +:105CD00030880C303080022F06D0002F54D065E081 +:105CE0003DE033E01CE05EE065486946097F4268BC +:105CF000CB00D218037A994202D29188002902D0AF +:105D0000042753E02FE0417A491C41721560308826 +:105D100090800020308049E06168A089888033E06D +:105D200029788909890116312970A1890170090A28 +:105D300041700198E1890170090A4170228A681D49 +:105D4000616915F07EF8208A401D46E728788009B1 +:105D5000800118302870207B687002207EE7606820 +:105D60000188090401D4052720E0C088A189884260 +:105D700001D006271AE01E202870012030806068BC +:105D800001884904490C0180009800280ED03C4845 +:105D900000220088A1688300032006F087FB616869 +:105DA0002078887007E00020308003276068009921 +:105DB00002888A430280384691E6FFB59FB0289D4D +:105DC0000E46002805D0172803D82A882E4B9A4261 +:105DD00002D1072023B0F0BD3278530601D4D20996 +:105DE00001D00820F6E700226B461A715A7114465A +:105DF0003278431E1D939BB2189303AB1A939706F8 +:105E0000CB1CBF0E1B93821E711C3B0015F0C4FA05 +:105E1000209011EE66EE74EEB0EED4EEEDEEECEE08 +:105E2000EBEEEAEEE9EEEEEEE8EEE7EEE6EEE5EEBC +:105E300090EE05287CD1042168460171A978017291 +:105E4000F078B2780102114368464181317941719D +:105E500070788006800E0C282ED009DC801E03008E +:105E600015F09AFA0919661C6621662466276600F1 +:105E700012282AD00ADC0E2821D01028DAD121E0FD +:105E80004C0C0020FF710000FFFF000016281FD0FF +:105E90001828CFD11FE02878800701E02878400734 +:105EA000002845DA45E128780007F9E72878C00698 +:105EB000F6E728788006F3E728784006F0E72878A8 +:105EC0000006EDE72888C005EAE72888C004E7E770 +:105ED00028888004E4E728884004E1E72A789207CC +:105EE00026D50328A6D105206A461071487809787E +:105EF0000002084310811CE129784907F0D50628E3 +:105F000016D3717890B2012902D0022992D101E012 +:105F1000022100E01021189106216A46117100212A +:105F2000118102AF189AB11C0237921C1B921AE021 +:105F3000B3E04A780B7812021A433A80801E891C1B +:105F40001790BA1C1A911898FCF7CDFE1A99189858 +:105F5000189A091817986B46801A1A8980B2521C31 +:105F60001A811B9ABF1D8242E3D9002886D1E0E046 +:105F700028780007B4D51D98694682B207200871B9 +:105F800000200881701C0A3111E0437807781B0259 +:105F90003B430B80C37887781B023B434B806F46A3 +:105FA0003B89121F5B1C001D92B23B81091D042A14 +:105FB000EBD2002A71D1BCE02978C9066DD5022840 +:105FC0006BD30820694608710020488170780872F8 +:105FD000844692B2B01C1A9919E089E090E07EE004 +:105FE00067E05BE030E025E019E013E0BCE04378D7 +:105FF00007781B023B430B80831C4B606346D21A1D +:106000006F467B8960445B1C92B27B81083194456A +:10601000EDD9CEE7287880063FD5092203E028781D +:1060200040063AD50A2268460271AA880281189A67 +:10603000428107E0287800062FD50B206A461071B0 +:1060400018981081039174E02988C90525D5022884 +:1060500023D30C20694608710020488170780872AB +:10606000844692B2B01C1A9914E0437807781B0258 +:106070003B430B80C37887781B023B434B80031D57 +:106080004B606346D21A6F467B8960445B1C92B2B8 +:106090007B8108319445E8D98BE763E02988C904FE +:1060A00060D501285ED10D2168460171A988018162 +:1060B0003FE02988890455D5052853D30E22694627 +:1060C0000A71AA880A811B99401F4A78097812022E +:1060D0000A4369464A818881701D049029E0298815 +:1060E00049043FD501283DD10F206946087120E0C1 +:1060F0002A88120436D44A780B7812021A43EA80AE +:1061000003282FD332789206920E1B2A26D0112212 +:106110006B461A712A880123DB031A432A804A78C6 +:10612000097812020A4369460A81C01E48811B98F9 +:10613000039030788006800E1B2809D01D2807D0D8 +:106140000320229906F059FA2888C00BC003288042 +:1061500001A82199FFF70EF920463BE610226B4675 +:106160001A71DCE70724F7E70824F5E700B597B0D4 +:10617000032806D16A461070019100216846FFF796 +:10618000F9F817B000BD000010B58B78002B11D0C6 +:1061900082789A4207D10B88002B0BD003E08B79D1 +:1061A000091D002B08D08B789A42F8D103880C88FF +:1061B000A342F4D1002010BD812010BD052826D0B7 +:1061C000002A02D0012A0DD102E00988090501E068 +:1061D00009888904890F07D0012918D0022909D01C +:1061E00003290ED081207047002A01D00320704778 +:1061F0000220704703280AD0042808D0002804D0C1 +:1062000007E0042803D0022803D0052070470020AF +:1062100070470F20704770B51388054614460B80F1 +:1062200018061DD5FE481022807AA84203D81343D1 +:106230000B80002070BDA06893430078E840C00741 +:10624000C00E03430B802078A1788007800D08439F +:10625000F44914F05FFEA06869430818401C70BD43 +:10626000906870BD37B569468B88138019061BD5B9 +:10627000EB4C0125A47A9168844209D8FE280FD1FD +:10628000D80602D5A5406D1E00E000250D7007E080 +:1062900085400C78DB06DB0FAC4383401C430C705D +:1062A00010881021884310803EBDF8B50746C81CF1 +:1062B00080080E468000B04201D08620F8BD082A32 +:1062C00001D90E20F8BDD64D00202E60AF80288168 +:1062D000AA723446E88016E0E988491CE980810604 +:1062E00010D48007A178800D0843CE4914F012FE27 +:1062F000206800F0BAFA2989401880B22881381A3B +:106300008019A0600C3420884107E5D40020F8BD36 +:10631000FFB589B09F041646139DBF0C01930998E1 +:1063200000F095FA04000AD02078000609D5BC4890 +:10633000817A0A98814204D887200DB0F0BD0120EF +:10634000FBE7224669460A98FFF765FF06900020A2 +:1063500069460872052D14D0012221462846FFF710 +:106360002DFF0028E9D1207840060AD50221684691 +:106370000172099981810188C18106824782129840 +:1063800005900198000404D500273E460125079793 +:1063900009E02078A1788007800D0843A149079083 +:1063A00014F0B8FD0D46019840040AD50798A8429C +:1063B00007D12088E1788005800F00020843B042B1 +:1063C00001D3AE4201D90720B7E7B81980B20190D6 +:1063D000A84201D90D20B0E76846007A002804D011 +:1063E00002A8FDF718F90028A7D10798A8420BD1F9 +:1063F000208803210902884301998905890F090230 +:10640000084320800198E0701498002800D007808D +:106410001298002815D006983A468019129914F05F +:1064200010FD224669460A98FFF7F5FE694608887E +:106430001021884369460880224600990A98FFF790 +:1064400011FF002079E7FFB5754D0C22E888296817 +:10645000504383B00C180D9F7249059814F05AFDF3 +:106460000091049800F001FA29682A898E46611A81 +:106470000C310918944651188AB2A988914202D861 +:10648000842007B0F0BD6A46168A320603D5B206EC +:1064900001D58520F5E7EA88521C92B2EA800E9B6E +:1064A000002B00D01A80B20601D5A76006E0604438 +:1064B00080B22881091A70460818A0602246FE2082 +:1064C0000499FFF7CFFE0598A0700098E07020882F +:1064D0000599800889058000890F08430321090276 +:1064E000884300998905890F09020843042108435C +:1064F000208003988078A07103980088A0800020F5 +:106500002073310601D5AC7A00E00124B10600D534 +:10651000002700260EE0052100200191029000973F +:10652000E88831460C9B069AFFF7F2FE0028A8D1B6 +:10653000761CF6B2A642EED30020A2E7F1B5009891 +:1065400000F085F9060002D00025009C14E001202F +:10655000F8BD204600F07BF90746007831498007F6 +:10656000820DB878104314F0D5FC386800F07DF93E +:106570004019641C85B2A4B22948C188601E8142BA +:10658000E7DC00992648491EC1800189491B018129 +:1065900000203070F8BD002804D0401E108091709B +:1065A000002070470120704710B5044601881C4840 +:1065B000C288914201D3822010BD00680C22514351 +:1065C00042189079A072908820811088D178800537 +:1065D000800F00020843A081A078211DFFF71BFE59 +:1065E00020612088401C2080E080002010BD012117 +:1065F00001827047F7B50546002084B0C043108083 +:1066000068681746817868468170686801886846BE +:10661000018000218171288A2C88A04205D303E0E3 +:10662000580C00200102000004462C8235E0288A24 +:10663000401C2882301D6968FFF7A6FD00282AD17A +:1066400039889248814201D1601E38806888A04212 +:1066500028D33088F1788005800F0002084302902B +:106660006946301DFFF790FD002814D169898748DD +:1066700081421BD0002231460598FFF79FFD00287C +:1066800009D16A890298824205D1E968B06814F09C +:10669000ABFB00280AD0641CA4B2204600F0D7F857 +:1066A0000600C4D1641E2C828220EAE67C80B07988 +:1066B000B871B088B8803078B1788007800D084311 +:1066C00078810298B8813946287A32460831FFF736 +:1066D000A2FD38610020D4E6FFB585B01C460F4608 +:1066E000059800F0B4F8050009D02878000608D510 +:1066F0006748807AB84204D8872009B0F0BD0120ED +:10670000FBE707982A468605B60D69463846FFF727 +:1067100082FD07460E98052816D000222946FFF76D +:106720004DFD0028E9D1287840060DD501216846A5 +:10673000017105990181018841818681C48101A887 +:10674000FCF769FF0028D8D12888AA788107890D2D +:1067500011438005800FEA7800021043079A9642A1 +:1067600007D04C4A914204D3611E814201DD0B20C7 +:10677000C3E7864201D90720BFE7801B82B2A2424D +:1067800000D922461098002800D002800F980028D7 +:1067900002D0B91914F055FB0020AEE7F8B51D463C +:1067A00017460E4600F053F8040008D02078000683 +:1067B00007D53748807AB04203D88720F8BD01203A +:1067C000F8BD224639463046FFF725FD002D0BD097 +:1067D0002078A1788007800D08432E49884201D295 +:1067E000012000E0002028700020F8BDF8B51E460A +:1067F00017460D4600F02BF8040008D0207800065C +:1068000007D52348807AA84203D88720F8BD012005 +:10681000F8BD224639462846FFF724FDFF2E14D046 +:106820002588A178A807800D08431A4914F072FB47 +:10683000002E03D1FF31FF31033189B2A170A808C6 +:1068400080008905890F084320800020F8BD104989 +:10685000CA88824207D3002805D00C220968504319 +:106860000C38081870470020704703B50846694681 +:1068700009888A0607D4090604D50549897A41435F +:10688000491C88B20CBD00200CBD0000FFFF0000B9 +:10689000580C002001020000F8B507780D460446A8 +:1068A000012F19D0072F02D00C2F19D114E0A068A6 +:1068B000216906780B2E0BD0052005F09EFE052ED3 +:1068C0000ED0782300220520216905F0EFFD07E0B6 +:1068D000782300220620F8E70520216905F08DFEC7 +:1068E000002D0ED0002028702946204603F0E2F942 +:1068F000FE482978C05D884201D10320F8BD0220FE +:10690000F8BD0021204603F0D5F90020F8BD70B590 +:106910000E460C462036317901208AB015460029F2 +:1069200009D0012905D12978042902D10520107048 +:1069300000200AB070BD6068019005A802900D218A +:10694000C01C14F0DBFA032205A8A16814F079FA40 +:1069500001203071062069460870206A049029469B +:106960006846FFF799FFE4E770B50C4615462031FD +:106970000A790120062686B0002A2CD0012A28D1C7 +:106980002978042925D169681022A06801F0B5F999 +:106990006868C07B000606D5D44AA0681023103A68 +:1069A000014601F09FF91022A168E06801F0A5F905 +:1069B000A068C07B000606D5CC4AE0681023103AD8 +:1069C000014601F08FF92E70A0686860E068A86049 +:1069D000002006B070BD60680190C4482038029065 +:1069E0000120087168460670206A049029466846AE +:1069F000FFF752FFEDE7027B032A06D00022242393 +:106A00005A540B78092B02D003E0042070470A7611 +:106A1000CA61027B9300521C0273C150032070476D +:106A2000F0B50E4615460C46203602463179012057 +:106A3000072393B000290CD0012924D002292ED09D +:106A4000032904D12978042901D12B70002013B027 +:106A5000F0BD01203071606800280DD0A1690B7075 +:106A600060684860206988606069C860206A086260 +:106A70001046FFF7C0FFEAE706202870206968602B +:106A80006069A86009E029780629E0D10220307108 +:106A9000042028709548203868600320D7E72978BB +:106AA0000429D4D1A08910280AD9103880B2A08135 +:106AB000A1681023091805A86A6801F013F923E0FA +:106AC00010282FD0C2B21020801AA1680DAF1190EB +:106AD000C01914F0B6F911980006000E06D0401E39 +:106AE000C1B280207854384614F008FA6269102345 +:106AF0000DA909A801F0F6F8102309A905A86A68EC +:106B000001F0F0F8032030716068019005A8029050 +:106B1000062069460870206A049029466846FFF7F7 +:106B2000BBFE94E710232269A168E2E7F0B50E46A8 +:106B30000C4620363179012006278FB015460029F2 +:106B40000BD0012932D0022905D12978042902D19C +:106B50000820107000200FB0F0BD217D08A8CA07E2 +:106B6000D20F02718807C10F08A801716846027030 +:106B700041700722801CE16814F063F902A8072223 +:106B80000130216914F05DF9606805900AA806904B +:106B900010236A46A16801F0A5F80120307168460B +:106BA0000774206A0890294604A820E0297804295F +:106BB000D1D1062205A8E16914F043F906A80622FE +:106BC0000230A16914F03DF900200890606801903E +:106BD00009A80290102305AA696801F083F8022031 +:106BE000307168460770206A049029466846FFF7AE +:106BF00053FEB0E770B50D460C46203529790120CB +:106C00008CB01646002909D0012905D13178042914 +:106C100002D10920107000200CB070BD6068019096 +:106C200006A802900822E16814F00BF9082208A8CF +:106C3000A16814F006F90120287106206946087041 +:106C4000206A049031466846FFF726FEE4E770B5F7 +:106C50000D460C462035297901208CB016460029B6 +:106C600008D00129D8D131780429D5D10A20107053 +:106C70000020D1E76068019006A802900822A16870 +:106C800014F0DFF8002008900990012028710620F8 +:106C900069460870206A049031466846FFF7FCFD9B +:106CA000BAE730B50B4620331C7901208BB0002C9D +:106CB00009D0012C05D11178042902D10B201070C4 +:106CC00000200BB030BD4868019005A802908C6888 +:106CD00068462578057564784475CC68257885758F +:106CE0006478C47500200690079001E0E4B30100C9 +:106CF000089001201871062368460370086A049002 +:106D000011466846FFF7C8FDDBE770B50C46203436 +:106D1000034625790120002D0AD0012D14D0022D23 +:106D200005D111780A2902D10C201070002070BD05 +:106D300001202071C868052202704A684260F84A42 +:106D40008260921CC2600BE015780B2DEFD10220FF +:106D50002071C86804240470526842608A688260A6 +:106D6000096A016201461846FFF745FE70BD30B55D +:106D7000011D02463132947803258379ED432C437B +:106D800023408371DB070DD04B79547923404B713D +:106D90000B79127913400B718278C9788A4200D935 +:106DA000817030BD00224A710A71F5E7F7B50C46D3 +:106DB00086B00020694626460870203631790127C2 +:106DC0001E2015461F2977D24B007B449B885B0011 +:106DD0009F441E0017023E025602690288029A0270 +:106DE000D102F5022E03590371037F03AE03C303DF +:106DF000CC03F7031A0464049A04AB04DF04FE0412 +:106E000010052A0565059B05C605830587058B05C5 +:106E10006069002802D0007813287DD0A068059012 +:106E2000002849D0012168460170206A049003219E +:106E3000684601710A214171E069029020790028B9 +:106E4000EFD0059909780029E7D00C2964D20B000E +:106E500014F0A2FA0CFD1A4B90B5E8FCFBFAF9F815 +:106E600007FD022828D16069002802D00078082890 +:106E700052D1022168460170206A04900598417839 +:106E8000684601710021B9E20620216A05F0B5FBD0 +:106E900020790728E6D1606900F051FF02280CD064 +:106EA000606900F04CFF042807D060690028B8D062 +:106EB00000780128D6D103E01BE261690120087047 +:106EC00005980079C11F0A2901D30A2050E06169A1 +:106ED0000722887060690599303013F0B2FF0120F5 +:106EE000307161690320087034E00728BAD1606905 +:106EF000002896D001780929B4D10599C978890765 +:106F000007D1059949790029DFD1059989790029A7 +:106F1000DBD105994A7900E04EE2014620314B7DF4 +:106F20009A43D2D1059A8B7D92799A43CDD1059A15 +:106F30001279D31F0A2BC8D20979914236D8072279 +:106F4000C01C059913F07DFF0120307161690A2092 +:106F50000870032069460870206A04906069313027 +:106F600001906069001D029060691C300390A1E2ED +:106F70002076F2E311288DD1606900F0E0FE04284C +:106F800004D0606900F0DBFE0B2893D1606905999D +:106F900010223730491C13F054FF6069017804292E +:106FA0007CD12421095C8278914201D90620DFE757 +:106FB000052101700320307168460170E2E3112859 +:106FC00094D1606900F0BBFE062804D0606900F02F +:106FD000B6FE0C288AD1E068002813D0206900286A +:106FE00010D060690178062910D00D210170606908 +:106FF000059910225730491C13F023FF6069573060 +:1070000009218CE100206946087072E107210170B6 +:107010006069059910224730491C13F012FF60691E +:107020004730EDE70228F0D1606900F088FE0028C3 +:10703000EBD0606900F083FE0128E6D0606900F0C3 +:107040007EFE05E0B1E08DE06CE02AE00AE0D6E0EB +:107050000828DAD00521684601710598417868460C +:10706000417146E11128D0D160690028CDD0017866 +:107070000E29CAD1C16A4078022810D000201422FB +:1070800050431430085805991022491C13F0D9FEBA +:107090000520216A00F041FE0F205EE0F1E10120B1 +:1070A000EDE70B28B1D160690028AED001780F2937 +:1070B000ABD1C16A4078022826D000201422504368 +:1070C0000C300958059842780A70807848706069D9 +:1070D000C16A4078022819D0002014225043103091 +:1070E000085805990822C91C13F0ABFE0520216A37 +:1070F00000F013FE60694178022909D000220832AD +:10710000825C5208520073E00120D7E70120E4E7D7 +:107110000122F4E7012100E0002108314254BCE3E0 +:10712000BEB3010011289CD16069002899D0017874 +:10713000102996D1C16A4078022811D0002014226B +:1071400050431830085805991022491C13F079FE55 +:107150000520216A00F0E1FD112061690870B4E3A7 +:107160000120ECE7082884D1606900289DD00178CF +:10717000112997D10599C06A49780170606905990C +:10718000C06A0622401C891C13F05BFE0520216AA0 +:1071900000F0C3FD60694178022904D00022083262 +:1071A000825CFD2323E00122F9E71128BBD160694D +:1071B0000028BBD001781229B5D1C16A40780228D5 +:1071C00019D00020142250431C3008580599102271 +:1071D000491C13F036FE0520216A00F09EFD60690F +:1071E0004178022909D000220832825CFB231A4030 +:1071F000022991D18EE70120E4E70122F4E707207C +:10720000B6E6287801288ED16069696814221C309E +:10721000F9F7DAFF6069017F002901D02176ACE33C +:107220000178032901D0032037E00227C770817954 +:107230004907490F8171017A4907490F0172417A63 +:107240004907490F41726069FFF791FD377196E276 +:1072500028780F28E3D1072069460870216A049135 +:10726000916802916946087161690722C91C0298F8 +:1072700013F0E7FD61690420087000203071BBE065 +:1072800028780328CBD1606901780529696807D07F +:107290000822473013F0D5FD0420307105206FE23D +:1072A00008225730F6E728780328B8D160690178BA +:1072B0000529696811D008224F3013F0C2FD05205E +:1072C00030716069006A00280AD00220287000200E +:1072D00028716069006AA860F9E008225F30ECE775 +:1072E00004204DE22878022899D12879002801D07D +:1072F000207642E36069A96801626069002901D1D2 +:10730000F949016206200BE228780F2887D1A86886 +:10731000E0616069017805292BD047300721317180 +:10732000E16802220A706269126A4A6088606069D4 +:107330003030C8606069C01C08616269087D926A6B +:10734000400812784000D207D20F104308756269D6 +:10735000926A521C8A61FD2210406269D26A1278D8 +:10736000D207920F104308756069C06A401CC8615B +:1073700053E25730D2E728780828BAD160690178FB +:1073800005291AD00B210170072069460870206A70 +:107390000490E069029011200871029803210170A5 +:1073A00051681022401C13F04CFD00216846FFF785 +:1073B00073FA00203071E06187E20621E3E7287864 +:1073C0000F2896D1072069460870206A0490A868A3 +:1073D00002901120087102980421017061690A78F5 +:1073E000072A0ED0002232710C220A706169102225 +:1073F000401C473113F025FD00216846FFF74CFA89 +:1074000063E21022401C573113F01BFD0021684637 +:10741000FFF742FA0A203071E168032008706069C2 +:10742000006A486060695730886060694730F3E1FE +:1074300028780828A1D1606969681022373013F0D4 +:10744000D3FC002801D0042092E560690078072869 +:1074500017D00A203071E168032008706069006A63 +:10746000486060695730886060694730C860206A4A +:1074700008620698FFF7BFFA07466069FFF777FCD6 +:107480006BE208207AE1287809289AD10B20307124 +:1074900061696868897810224018511A13F02EFD2E +:1074A000082069460870206A049068680190606945 +:1074B0008078087268E129780D29BBD161698979E2 +:1074C000C90703D00C20307109203EE0307103273A +:1074D00070E228780E28ADD160691422291D1C3075 +:1074E000F9F772FE6069018DC06A4172090A817202 +:1074F00060698178C06AC1716169CA6A081D117AC0 +:10750000C909C90111724379626919438378D26A42 +:107510009B079B0F012B00D0002300799B01C0002B +:1075200003431943117260694078012876D0B4E1B1 +:1075300060694178022901D0012100E00021083171 +:10754000405CC00707D00E20EAE069460870206A58 +:107550001146049019E11320B8E728780F2894D138 +:10756000A868E0610F2030710520EEE72878032835 +:107570008BD16069C16A4078022801D0012000E007 +:10758000002014225043103008580822696813F074 +:1075900058FC10203071E16806202269087060698B +:1075A000406A48606069C36A4078022801D00120BF +:1075B00000E000201427784310301858CA60886013 +:1075C0002BE128780C2886D16069C26A40780228AD +:1075D00001D0012000E00020142148430C30105855 +:1075E00002230932696800F07DFB11203071E168E7 +:1075F000052008706069006A48606069C06A0930E7 +:1076000088603948001F07E128780B28A7D16169F5 +:107610004878CA6A022802D0012001E059E100201E +:1076200014235843143010588A78696813F009FC01 +:1076300060694178C26A022901D0012100E000217D +:107640001423594314315258817850181022511A7A +:1076500013F054FC072069460870206A0490E06922 +:107660000290112008710298062101706169CA6AAE +:107670004978022901D0012100E000211423594357 +:10768000143151581022401C13F0DBFB00216846D6 +:10769000FFF702F90020E06112206FE028780F2840 +:1076A00091D1072168460170206A04909068029089 +:1076B0000B2268460271029801706169CA6A4978B2 +:1076C000022901D0012100E00021142359430C318B +:1076D00051580A784270497881706169CA6A49785C +:1076E000022903D0012102E0C4B3010000211423C8 +:1076F0005943103151580822C01C13F0A2FB00213D +:107700006846FFF7C9F826E760694178022901D089 +:10771000012100E000210831405C800703D51420DE +:1077200030710A2011E71620D0E628780F287AD188 +:10773000A868E061072069460870206A0490E06943 +:107740000290112008710298082101706169CA6ACB +:107750004978022902D0012101E011E1002114231E +:107760005943183151581022401C13F06AFB002174 +:107770006846FFF791F80020E061152030710A207B +:1077800069460870206A049029466846FFF784F825 +:107790002BE028780F2846D1072069460870206A18 +:1077A00004909068029008200871029809210170E5 +:1077B00061690622C969097841706169801CC969DB +:1077C000491C13F03EFB00216846FFF765F8AAE765 +:1077D00060694178022901D0012200E000220832CC +:1077E000805C400703D51720C8E70746B5E00129AC +:1077F00053D070E028780F2815D1A868E0611820D0 +:107800003071E168052008706069006A486060694D +:10781000C06A09308860F848C860206A0862069823 +:10782000FFF7E9F8E1E76FE028780B286CD1606991 +:10783000C16A4078022801D0012000E00020142213 +:1078400050431C3008581022696813F0FAFA0720D8 +:1078500069460870206A0490E0690290112008715E +:1078600002980A2101706169CA6A4978022901D027 +:10787000012100E00021142359431C3151581022EA +:10788000401C13F0DEFA00216846FFF705F80020DF +:10789000E0616069407801281DD1192016E6606911 +:1078A0004278022A09D000210831411809780029BC +:1078B0000DD0CA0703D00E2106E00121F4E78907A5 +:1078C00001D5102100E012210170002772E0012A89 +:1078D00001D00D20FAE51C20F8E51D2030710B20A9 +:1078E00033E62978102948D1F0E56069017801294B +:1078F00043D0082941D00021317100F01AFA0C2040 +:1079000069460870206A049037E028780F2805D06F +:107910001020107003271B2030714BE007216846B0 +:107920000170206A0490A8680290022168460171E3 +:10793000029805210170217E417000216846FEF702 +:10794000ABFF0B2168460170206A04902946684607 +:10795000FEF7A2FF07461B203071012F0DD029E052 +:10796000012168460170206A049004216846017173 +:10797000217E41710020207612E0207E00280FD069 +:107980006169132008701A2030710A206946087056 +:10799000206A049029466846FEF77EFF074609E004 +:1079A0006069002801D01421017068460078002821 +:1079B00000D021E5384609B0F0BDF7B50F462037B5 +:1079C0003879012686B00C46002804D0012828D03A +:1079D00002281CD197E02079012804D0022811D078 +:1079E000032814D10AE0A068407801280ED10620AF +:1079F000216A04F0DCFD00287FD10CE0A16813208F +:107A0000087008E0A0684178022901D0052674E0DA +:107A10000078082871D1012038710A206946087061 +:107A200033E0089800780F2867D107216846017075 +:107A3000206A049008988568029522790220012A1C +:107A400004D0022A29D0032A57D10FE006466846FF +:107A500006710B202870207B00214007400F6870C2 +:107A60006846FEF719FFA068067045E006466846BE +:107A7000067105202870207B687000216846FEF79B +:107A80000BFF3E710B2168460170206A0490684626 +:107A90000899FEF701FF06462FE0684601710120B4 +:107AA0002870207C6870607CC007C00FA870A07C24 +:107AB0004007400FE870E17C2971C0071FD0207D8E +:107AC0004007400F6871607D4007400FA87100219A +:107AD0006846FEF7E1FEA06807222946303013F021 +:107AE000B0F9E068017AA06820300171A1682879B6 +:107AF0008870A16809200870002630465BE70020E6 +:107B0000A8716871E3E7A168142008700121684634 +:107B10000170206A0490042168460171217B417143 +:107B20000021FEF7B9FEE7E7F0B585B00F46054640 +:107B30000124287B800040198038C66F3078411EB0 +:107B40000A290AD22C498000323140188038C36F8C +:107B50003A463146284698470446002C01D0012C6D +:107B600011D1287B401E0006000E287301D003248B +:107B7000DFE70D2069460870306A04900021019605 +:107B80006846FEF789FE032CD3D0204605B0F0BD31 +:107B900070B515460A46044629461046FFF7C4FF4D +:107BA0000646002C0FD0207814280CD1207E002807 +:107BB00006D000202870204629460C30FFF7B4FF7D +:107BC000204600F0B6F8304670BD704710B5012968 +:107BD00003D0022901D0052010BD417000F0A9F8A2 +:107BE000002010BD002809D0027E002A06D00A46D7 +:107BF00001460C31CCE70000C2B301000120704700 +:107C000030B5044687B00D46062004F0F6FC294640 +:107C1000052004F0F2FC2078142805D000206946E5 +:107C200008702046FFF7DEFF07B030BD7FB50E4677 +:107C300000216A4611730178092903D00A2903D06B +:107C4000002407E0446900E08468002C02D0217E13 +:107C5000002912D0154601462846FEF7CCFE03281F +:107C600009D1324629462046FFF792FF6946097B33 +:107C7000002900D0042004B070BD25460C35EAE789 +:107C800000B50023012285B005280CD0062808D1B4 +:107C90006846027004910221017143710021FEF7D0 +:107CA000FBFD05B000BD6846027004910271F4E767 +:107CB00010B590B00C4605216B4619700190234811 +:107CC00002900892001D03900AA96846FFF7AEFFD4 +:107CD000002805D1102220460B9913F0B2F800209D +:107CE00010B010BD30B505E05B1EDBB2CC5CD55CDE +:107CF0006C40C454002BF7D130BD10B5002409E00E +:107D00000B78521E5B00234303700B78401CDC0988 +:107D1000D2B2491C002AF3D110BD70B50C460546FD +:107D200004F06BFC782300222146284604F0BEFBB9 +:107D300070BD4178012900D00821017070470028EA +:107D400001D000787047082070470000BCB30100E4 +:107D500070B5F84D040008D0012C10D0022C07D0CB +:107D6000032C05D0F4A1752007E0F3A16C2004E0FA +:107D70002878012803D0F0A1722013F0ECF92C70C0 +:107D800070BD70B5EB4D044610280AD0112C16D0EA +:107D900028468178122C07D0132C0AD0E6A1A42003 +:107DA0000BE0E5A1992008E0112908D0E2A19E206E +:107DB00003E0112903D0E0A1A12013F0CCF9AC70AD +:107DC00070BD10B5DB4894B0007B002819D0172097 +:107DD00069460870D74900A806220D31023013F019 +:107DE00030F809A9684603F0A8FE0446112805D01A +:107DF000002C03D0D0A1C02013F0ADF9204614B060 +:107E000010BD3220E4E710B50022022103F08CFF00 +:107E100010BDFFB595B01D460E460746FFF7F3FFB0 +:107E200004000AD02078222804D3A07F8006C00F47 +:107E3000A84204D1082019B0F0BDC348FBE73721A0 +:107E4000684601704780002D05D0012101714671FF +:107E50001799817102E000206946087109A96846F6 +:107E600003F06BFEA07FDF21084069010843A07783 +:107E70000020E0E770B50446084620380D460300B0 +:107E800013F08AFA0A060A11232C3342495057612B +:107E9000FF20A9A10D3052E02078202851D1FF20E9 +:107EA000A5A110304BE0A3480178032949D0807880 +:107EB000132846D02078242843D0252841D02328D1 +:107EC0003FD0FF209CA1133039E02078222838D001 +:107ED000232836D8FF2098A11A3030E020782228B5 +:107EE0002FD0FF2094A11E3029E02078222828D00E +:107EF000242826D0262824D0272822D0292820D07C +:107F0000FF208DA121301AE02078252819D0FF20EC +:107F100089A1283013E02078252812D0FF2086A1DF +:107F20002B300CE0207825280BD0FF2082A12E30AA +:107F300005E02078282804D0FF207FA1313013F0FD +:107F40000AF9257070BDFF207BA13430F7E730B50A +:107F50007E4C0B887E4A022801D0934204D09D1F9C +:107F6000A54225D2022802D04D88954203D04D88E3 +:107F7000AD1FA5421CD24C88A34219D88B88FF257F +:107F8000F435AB4214D8022802D0C888904205D0FC +:107F9000C8886E4D0A382D1FA84209D2C888904261 +:107FA00008D0944206D05B1C63438000834201DB0F +:107FB000072030BD002030BDF0B56649884245D36A +:107FC000654A0125AD041368A84201D398423DD308 +:107FD0000279002A06D0082A02D8067B082E05D985 +:107FE0000720F0BD047B002CFAD0F6E7002A06D06B +:107FF00004688C422AD3AC4201D39C4226D3002E83 +:1080000006D084688C4221D3AC4201D39C421DD35C +:1080100000240CE00568A700ED598D4216D3012716 +:10802000BF04BD4201D39D4210D3641CE4B2A242FE +:10803000F0D800220125AD040CE084689700E459D3 +:108040008C4203D3AC4203D39C4201D21020F0BD3A +:10805000521CD2B29642F0D80020F0BD10B5028971 +:108060003E4B111F994213D24189042910D3DB1CC6 +:1080700099420DD891420BD80178890706D54068FE +:10808000002803D0FFF798FF002800D1002010BD82 +:10809000072010BDFFB50022099B002802D099429D +:1080A00005DC6EE0002902D1002004B0F0BD0920FB +:1080B000FBE7845C002C12D087187D78112D59D0F5 +:1080C00010DC2B0013F068F90A561726262C2C2EEC +:1080D0002E4C4C56835C002B46D1521CD2B28A42A5 +:1080E000F8DBE1E71C2D45DA123D2B0013F054F9C3 +:1080F000044242121A42022CD9D1BB78039C072BAE +:10810000237001D25B0701D40A20CEE7029B012431 +:108110001B782CE0E343DB0708E0012C08D029E0C2 +:108120000620C2E70F2523072D075B19002BF4D08B +:108130003046BAE7640C00207372635C6761705F5D +:10814000636F72652E630000023000007B0C00003C +:10815000FFFF000000C0010028000020FD3F0000DC +:10816000029B1B789C0701D50B209EE7022423432A +:10817000029C2370835C521C9A18D2B28A4202DDA0 +:1081800095E7192676028A4293DB8DE710B50478CD +:108190000B46002C08D00121F94A012C07D0022CF3 +:1081A0000BD0032C13D10EE00021197011E01970CF +:1081B0008179890903290AD10BE01970817989092C +:1081C000012904D105E019708179890901D010468F +:1081D00010BD411C0622581C12F033FE002010BDB9 +:1081E00008B51346002806D0E6A00068009048793C +:1081F0006A468009105C18700622581C12F021FE95 +:1082000008BD30B50C46097895B0222902D2082065 +:1082100015B030BD282369460B704880132A03D05F +:108220003B2A01D00720F3E708460A7109A903F0A9 +:1082300084FC050003D121212046FFF71BFE2846C0 +:10824000E6E700B595B0232369460B704880108897 +:1082500088805088C880D088488190880881002014 +:108260008881C88109A9684603F067FC15B000BD84 +:1082700070B50C00064610D0FFF7C5FD050003D110 +:10828000C149C24812F067FFA6802889E08028898A +:10829000208168896081A889A08170BD70B50E4673 +:1082A000050003D00021092004F0A7F90120B84CF3 +:1082B000022E207324D0032E04D0D320B249800094 +:1082C00012F049FFB24806210D3003F02DFFA07CCB +:1082D0008006800EA074FFF774FDA08B00280ED0DE +:1082E000002D0CD0830001220021092004F0DEF8CB +:1082F000092804D0A548A449283012F02CFF70BDED +:10830000A3480321103003F00FFFA07C402180061A +:10831000800E0843A0749E480C3002F04EFBDAE752 +:108320007FB501A9022003F06EFD002851D09748C7 +:108330009549673012F00FFF4BE0029C207821280E +:1083400047D0A07F01072BD52046223000906846F9 +:108350002346628E80882146343301F084FC050078 +:1083600005D011282ED089488749843028E0A07F85 +:10837000F7210840A077E17F480889074000C90F2E +:1083800008432021095D4007400FC9000843E077FA +:108390002078282824D129212046FFF76BFD1FE0F3 +:1083A000400716D568462246808821460E32FFF7E0 +:1083B00048FF050008D0112804D074487249933052 +:1083C00012F0C9FE00250BE0A07FFB210840A0773A +:1083D00006E001A803F025FD0500AED0052D02D072 +:1083E000284604B070BD0020FBE7F8B5040004D1B6 +:1083F00066486549A13012F0AEFE722020706068B8 +:1084000008260178091F0B0012F0C6FF11FD0A466D +:1084100068FC460EFCFC4746464646FD92FD46007B +:108420007B205949C00035E087883846FFF7EBFCD0 +:10843000050004D11F205449400112F08CFE6078E1 +:10844000042130436070524CA07F0843A077212163 +:108450002846FFF70FFDA87F8007800F012801D174 +:10846000801EA080384603F0B1F83846FCF7FBFFC9 +:108470003846FBF79EFB3946022004F0BEF8A87F81 +:10848000EF210840A877FFF74BFF002804D03F48B2 +:108490003D49C93012F05FFEF8BD85882846FFF7D8 +:1084A000B2FC002804D139483749D33012F053FECA +:1084B00060688078012804D034483349D53012F000 +:1084C0004AFE60688179284603F09CF90028E3D0D1 +:1084D0006178314361706168C880F8BD878838462B +:1084E000FFF791FC050004D128482749E63012F037 +:1084F00032FE60783946304360706068C0882881F9 +:1085000060680089688160684089A881022004F061 +:1085100074F80020A875A87F8007800F0228DCD19E +:10852000FFF7FEFE0028D8D0212017494001B1E70F +:1085300080783C2803D00025022814D000E00125D3 +:108540000027002808D03C2806D0022804D00F4875 +:108550000D49FF3012F0FFFD002F06D002263046F5 +:1085600001F06CF9F8BD0127EBE7607830436070EB +:108570000748817F31438177002D0BD00126EEE73C +:10858000023200000302FF01388100002E030000C8 +:10859000640C002060688788384601F07BF9054646 +:1085A00060688079012832D00226A87F06228008E0 +:1085B00080003043A8776068C08A28816068008B9B +:1085C00068816068408BA8816068C079E8756168DF +:1085D00028461830083112F034FC60680622807B8F +:1085E00068706168A81C0F3112F02BFCA87F81070E +:1085F000890F384602F0D4FFA87F8007800F01283A +:10860000ADD101E005E008E0FE488780A7E701263C +:10861000CBE7204601F01EFEF8BD60783043607065 +:10862000F8BDF7B505460078002700090C463E4620 +:1086300001287DD00022F44902287AD0072804D0EE +:108640000A2877D0F149F24839E1686803780D2BA0 +:1086500035D006DC042B6ED0072B3AD00A2B69D11B +:1086600006E0122B3CD0132B44D0142BF7D1BEE0E4 +:1086700011270726002C7CD08088A0806968FB2306 +:108680008979A171DF4905468A7F1A408A770421DA +:1086900003F071FB0521284603F06DFB00212846FD +:1086A00003F069FB0121284603F065FB03212846FE +:1086B00003F061FB0221284603F05DFB01E1012785 +:1086C0000926002CD7D08088A08068688079207225 +:1086D000F7E012270E2680882146FFF7C9FDF0E05B +:1086E0001A270726002CC6D04088A0806868007929 +:1086F000A071E6E081783C293ED010271E26002C90 +:10870000B9D08088A0806868C08A20836868C08AE1 +:10871000E0826868008B60836868408BA08369682A +:10872000607D497F40084000C907C90F084303E046 +:108730006CE097E0BAE029E060756968C007497F9E +:10874000C00F49084900084360756968A21DC879CF +:108750000831FFF745FD69682246887B0D320F31ED +:10876000FFF73EFD68688079002803D0012020755E +:1087700007E076E00220FAE719270726002C70D0E0 +:10878000A271A048F722817F11407DE01B272E2691 +:10879000002C66D0A1806968A21D0879491DFFF7E9 +:1087A0001FFD68682030C07A60736868C07804284C +:1087B000A07B19D040084000A073F92108406968E7 +:1087C0001F22C9788907490F0843A07369684007C9 +:1087D000C97A400FC9000843A073696820460F306A +:1087E0000C3112F02EFB6CE001210843E4E71E2758 +:1087F0000E26002C6DD0A1806868E21D407AA07121 +:1088000069688878C91CFFF7EBFC5AE0287A0128D0 +:1088100005D0022815D07E487C4932384FE01D270C +:108820000E26002C55D06888A080A889E080E889B1 +:108830002081288A6081688AA0817248DF22817F36 +:10884000A2E712270E266888FFF712FD002C40D001 +:1088500068784007400F032833D16A48FD22817FA2 +:1088600092E736E0287A030012F096FD0604101015 +:108870002020202619270726002C2AD0A180614815 +:10888000A271817F4908490081771AE019270726DC +:10889000002C1ED0A180287A012805D00320A071C9 +:1088A0005848EF22817F6FE70220F8E721462846EB +:1088B000029A01F068FEFEBD55485449801F12F02F +:1088C0004AFC0298002C068001D027806680002098 +:1088D000FEBD02980680FAE710B54A4894B0807849 +:1088E000132802D0082014B010BD22206946087059 +:1088F00009A9684603F021F904460021072003F086 +:108900007CFE2046EFE700B53E4895B080781228FF +:1089100001D00820AAE41E21684601700021817060 +:10892000C17009A903F009F90028F3D1002107203B +:1089300003F063FE1120FFF724FA002096E400B54F +:10894000304895B00078022801D0032818D11B21A7 +:1089500008A801730021817369460BA803F0EDF8A4 +:10896000002804D1684640781B2801D003207DE40C +:108970000021084603F041FE68468078002801D0B7 +:10898000082073E40120FFF7E3F900206EE4F8B556 +:108990001C4C030012F000FD0A06791779797979E9 +:1089A00044356779FFF7CBFF00282AD1F8F7DAFFC3 +:1089B000002826D02221017000210172F8F7B3FFB0 +:1089C000A07F01214BE08EB23046FFF71CFA050074 +:1089D00004D10F480D492E3012F0BDFB2878212814 +:1089E0000FD0F8F7BFFF002814D012210170022722 +:1089F000077246800020A875F8F795FFA07F3843DE +:108A0000A077F8BD640C0020FFFF00003881000053 +:108A10005F050000132229463046FFF7F2FBF0E71E +:108A2000A578122D06D0132D07D0F849F84812F07A +:108A300092FBE6E7FFF767FF01E0FFF74DFF002835 +:108A4000DFD1F8F78FFF0028DBD022210170122D33 +:108A500007D002210172F8F766FFA07F10210843BA +:108A6000CEE70121F6E7A07C810901290BD080091E +:108A700004D0E748E549223012F06DFB03210020C5 +:108A8000FFF70CFCBDE70221F9E7E148DF49293097 +:108A9000CDE7F7B514460D0004D1DD48DB49313090 +:108AA00012F059FB28780827012807D002281FD088 +:108AB000D748D649623012F04EFBFEBD0098FFF752 +:108AC000A2F9060004D1D248D049383012F043FB55 +:108AD0000220B0751030207060783843607007CD88 +:108AE000083407C4CB482022817F11438177FEBD23 +:108AF0000098FFF788F9060004D1C548C3494630FD +:108B000012F029FBA988C448814208D1EA88824230 +:108B100005D1132231460098FFF773FBFEBD814259 +:108B200002D1E888002809D01220207060783843EC +:108B3000607007CD083407C4002006E078230022C7 +:108B40000220009903F0B2FC0120B075FEBDB148CF +:108B500040897047FFB591B01498FAF71BF90028C7 +:108B60005DD10124684603218471C90281800022FD +:108B700001A92046FBF7ECFA002850D168461521E0 +:108B800084714902818000261C2102A8009612F0FF +:108B9000B7F90120014668461031017000200146F6 +:108BA000684641708178F9273940891C21438170DA +:108BB000017A02252943017212998186C6861F21F6 +:108BC00001870C9011980F9001A80B9009AA0BA98E +:108BD00002A8FBF788F8002821D168468D4E808CCA +:108BE000F080684684718D498180807809AA384078 +:108BF000801C41084900684681708586058713A856 +:108C00000F900BA902A8FBF76EF8002807D1684661 +:108C1000808C308131460A311498FAF7CEF815B0BD +:108C2000F0BD30B50C467E4995B08C423CD37D49B1 +:108C3000012292040968944201D38C4234D3203833 +:108C400000220125030012F0A7FB06042A44484E27 +:108C5000575F0021082003F0AAFC002802D0112051 +:108C600015B030BD24206946087000A80522A11C5B +:108C7000023012F0E6F809A9684602F05EFF05002E +:108C80002FD1082300221146184603F00FFC0828B4 +:108C900027D05F485D49D63012F05DFA21E0606868 +:108CA000002803D0884201D21020D9E73D21684630 +:108CB0000170218841806188818009A902F03DFF0F +:108CC00005000ED1606800280BD06946098D01802F +:108CD00007E0206801F0B2FE02E0204600F024FE2A +:108CE00005462846BCE73E2007E0857000E082701C +:108CF00009A902F022FFF3E73420694608702078C2 +:108D0000C0076846F3D0F0E70720A9E730B50C4666 +:108D1000444995B009688C4201D21020A0E7203860 +:108D2000030012F039FB05042121232132002088A1 +:108D3000FFF769F8002804D00078222803D2082021 +:108D40008EE739488CE725216846017021884180EB +:108D500009A902F0F2FE050015D10AA90522023187 +:108D6000A01C12F06EF80EE006250CE0206800282A +:108D700005D0884201D2102505E001F055FE2548B6 +:108D80000025808BA08028466AE7072068E72148F5 +:108D90001330704710B520211E4812F0AFF80120A3 +:108DA000FEF7D6FF1120FEF7ECFF00211948C9435A +:108DB000818000218176E1218900818301460C3088 +:108DC0000D310446F8F74EFE1248072221461330B3 +:108DD00012F037F8FEF7F5FF002803D00B491348CF +:108DE00012F0B9F901F0E5F910BD10B504463C21C7 +:108DF00012F084F8A07F80088000A07720202070E7 +:108E00000020A0752034607010BD00003881000083 +:108E1000B5050000640C0020FFFF0000012A0000DF +:108E200000C0010028000020023000001C070000E4 +:108E30007047FEB50546FF480C46814207D3012026 +:108E40008004844205D3FC480068844201D210208B +:108E5000FEBD002D02D0012D32D126E0F7490822B7 +:108E60000F46684611F0EDFF39462046FFF78EF9B0 +:108E70000028EDD1FEF7A5FF060006D007226946BF +:108E8000384611F0DEFF3046FEBD2078002801D0C4 +:108E9000012805D1E94807223946C01D11F0D1FF4C +:108EA0000021092003F0A9FB0FE00978002907D071 +:108EB000012905D0022905D0032903D0E048FEBDD1 +:108EC0000720FEBD0120FFF7E9F9DC480C38857664 +:108ED0000020FEBD10B5D8490968884201D2102093 +:108EE00092E7D64902460C390B7B0D311846FFF745 +:108EF00077F9002088E7FFB599B00546002008A95A +:108F000008746946087108A908730875CA481446A8 +:108F10000121C84A890400681E46002D05D09542EB +:108F20000BD38D4201D3854207D3002C08D0944245 +:108F300003D38C4204D3844202D210201DB0F0BD72 +:108F40002846204318D01F270BAB0CAA00972846B1 +:108F50001A99FFF79FF80028F0D10DAB01AA31460E +:108F600020460097FFF796F80028E7D16846007979 +:108F7000C00703D00A20E1E70720DFE702AF002D9A +:108F80000FD01A20694608721A9888722946F81C70 +:108F90001A9A11F056FF0EA902A802F0CEFD002881 +:108FA000CCD1002C0ED02021684601728672324648 +:108FB0002146F81C11F045FF0EA902A802F0BDFDE4 +:108FC0000028BBD19D4908A8007B0C3948700020BF +:108FD000B4E770B506460A200C46087015461146DF +:108FE000204602F0AAFD002807D139212170204631 +:108FF000294602F0A2FD002804D0082801D190489B +:10900000401C70BD2A462146304600F0B9FC04469B +:10901000082803D18B498C4812F09DF8204670BD7A +:10902000F0B5044689A003C897B0824D002715917A +:109030001490AC4211D380480121890403688C420A +:1090400001D39C4209D32078012809D16268AA4241 +:1090500003D38A4204D39A4202D2102017B0F0BD43 +:1090600076490C390A78012A0CD18A88794B9A42C0 +:1090700003D0002806D0012804D08A7F13079B0F55 +:1090800006D101E00820E9E7D30701D1910701D516 +:109090001120E3E7218A704B0A46203A9A4207D30F +:1090A000012877D1002975D1628A002A72D111E096 +:1090B000022801D0032801D1A0296BD3012809D0AF +:1090C0005E4A0C3A5278D20704D0628A002A61D0F4 +:1090D000B42A5FD8002806D0012808D0022804D07E +:1090E000032857D117E0002518E0022516E00029D3 +:1090F00002D1608A00280CD004256068007800281E +:109100000CD0012809D0022807D0032805D04C48EC +:10911000A4E70125F1E7032500E00127207A0028D4 +:1091200006D0012806D0022806D0032867D105E022 +:10913000002604E0012602E0022600E00326002DBE +:1091400001D0022D16D1002E14D0E068002803D0E3 +:10915000FEF732FF002881D138480C38407880076C +:1091600002D03748401E79E7022D03D1022E46D0A7 +:10917000032E44D0182168460170218A4180218A3B +:10918000818085712D480C38007B002803D0012890 +:109190006FD104E033E000216846C17102E0012094 +:1091A0006946C8716846077221780930012920D0C4 +:1091B000062111F0A3FE69460E74207D8207C107C7 +:1091C000D20F4007C90F5200C00F11438000014366 +:1091D00014A8405C6946C873002810D009A96846E5 +:1091E00002F0ABFC002893D1002D0AD0022D08D04C +:1091F00012E061680622491C11F023FEDBE707201C +:109200002CE7002E08D0E068002805D009AA69469E +:10921000FFF7DFFE0028A6D11B2069460870012059 +:10922000887009A9684602F088FC00289BD108A82C +:10923000407913E000C0010028000020700C0020DD +:1092400002320000388100002708000007060504EC +:1092500003020100FFFF0000E13F00001B2819D1BD +:109260002B0012F099F80504040707040A000320F4 +:1092700001E00FE00220FEF76BFD012D0CD0608AAB +:10928000002809D0002283001146104603F00EF991 +:10929000002801D00320E1E60020DFE6F3B5032635 +:1092A00087B00D4600290AD0FE4885426FD30120C1 +:1092B0008004854203D3FC480068854267D3079841 +:1092C000FEF7A1FD040005D02078222804D2082052 +:1092D00009B0F0BDF548FBE7A07F8707BF0F002D61 +:1092E00005D029463846FEF732FE0600F0D1394651 +:1092F0000027EF48012907D0022931D0ED49EE4877 +:1093000011F029FF3046E3E7A27D2946012A02D069 +:10931000827F920701D51120DAE700291BD10821AD +:109320006A46049711820592418904AAE348FBF733 +:10933000FFFA0028CCD16846008A082801D0032013 +:10934000C6E7684601880181418841818188818121 +:10935000C188C18102A9079802F0E7F90646D1E762 +:10936000A17D022916D1807F800613D4002D04D060 +:10937000A07F40070CD4002100E00121079802F0F3 +:1093800014FA0600BED1A775002DBBD004E01AE088 +:109390001126B7E7002D16D02A4621460798FEF77A +:1093A00050FF06461128ADD1A07F4007AAD4204621 +:1093B000082229460E3011F044FDA07F0421084305 +:1093C000A07700269EE7102082E770B50C46054680 +:1093D000FEF719FD010004D022462846FEF711FFD2 +:1093E00070BDB24870BD00B50146143195B0192961 +:1093F00001D2810707D001461E3104D00A3102D0C4 +:10940000072015B000BD312269460A70887009A98D +:10941000684602F092FBF4E701B582B0022069468B +:109420000880A34802AB00896A460021FBF7EAF8EE +:1094300069460988022900D003200EBD1CB5002111 +:10944000009102216A46118097490190096888427B +:1094500001D210201CBD964801899848FBF768FA94 +:10946000694609880229F5D003201CBDF0B50E46D7 +:109470008C4985B0174605468E4207D38A4801229B +:1094800092040068964204D3864202D2102005B0AE +:10949000F0BD1F2F01D90C20F9E7854C8D4226D352 +:1094A000954201D3854222D3E08803A9FBF75BF8FC +:1094B0000028ECD1287869464873E08803A9FBF7B7 +:1094C00033F80028E3D16946009008780221084368 +:1094D00069460870497B090703D00821084369469B +:1094E0000870E0886946FAF7B8FF0028CFD16946CE +:1094F0008F80E088334601AA0021FBF783F8694694 +:109500008988B942C3D00320C1E71CB50C460021AD +:1095100000910191228869460A8063490190096897 +:10952000002801D0884201D38C4201D210201CBDFA +:10953000002801D0002A09D05D486A46C1885F48EA +:10954000FBF7F6F96946098821801CBD0C201CBD7B +:1095500010B50123FEF75DFC56E4002310B51A4652 +:109560001946FEF756FC4FE470B504464D4894B0DA +:10957000844207D301208004844206D34A4800680D +:10958000844202D2102014B070BD2046FEF766FD62 +:109590000028F8D146488178112901D00820F2E747 +:1095A000817FC90601D51120EDE71D2269460A70A9 +:1095B00021780025CA07D20F69468A7022898A80DD +:1095C0006289CA80217801268907CA0F69464A72D2 +:1095D000007B002803D0012804D00320D3E70846ED +:1095E0000D7201E008460E7209A902F0A6FA0028E1 +:1095F000C9D12078800708D56068002805D009AA5D +:109600006946FFF7E6FC0028BDD11E2168460170BF +:109610008670C57009A902F090FA0028B3D1A0891C +:1096200000F073F90400AED11220FEF7AAFB204629 +:10963000A9E7F0B516461C4A0C4605001948204912 +:10964000126899B005D085420FD38D4201D395425F +:109650000BD3844209D38C4201D3944205D3864272 +:1096600003D38E4204D3964202D2102019B0F0BD2B +:109670000F4FB87FC106890F01D1400701D51120D6 +:10968000F4E72046FEF7EAFC0028EFD120788107B6 +:10969000C90F294303D0800714D5002D12D007200D +:1096A000E4E7000000C001002800002002300000B4 +:1096B000640C002038810000F3090000FFFF000067 +:1096C0000000040031460220FEF741FC0028CDD105 +:1096D000C9488078112803D0122801D00820C5E796 +:1096E0000220002714A9189002F08DFB00280DD04D +:1096F000C2A1C64811F02FFD08E01598807F8107B0 +:109700001898890F814201D17F1CFFB214A802F082 +:1097100088FB0028F1D0032F01D30420A6E7B64828 +:109720008078122803D1FFF7EEF800289ED1207828 +:10973000800708D56068002805D009AA6946FFF7A8 +:1097400048FC002892D1212168460170218941807E +:1097500061898180207800278007C10F6846817168 +:1097600020788007002815DB2878002807D00128FA +:1097700008D0022806D0032804D0A54876E768461A +:10978000C77102E001206946C8710622691C02A85F +:1097900011F057FB9848007B002803D0012804D023 +:1097A000032063E76846877302E0012069468873F7 +:1097B00031886846018271884182B1888182F1884E +:1097C000C1820783478309A902F0B7F9002886D12F +:1097D000A08900F09AF80400A0D11320FEF7D1FA76 +:1097E000204643E730B505468A4895B000680C46E8 +:1097F000814202D2102015B030BD2846FEF703FB8F +:10980000002807D00178222902D3807F800603D464 +:109810000820F0E78048EEE7132168460170458094 +:1098200009A902F08AF90028E5D108AA0A215156AF +:109830007F2901D02170DEE70520DCE710B56E49F5 +:10984000012807D0022815D0FF206CA14D3011F05F +:1098500082FC81E60878032804D0FF2067A143300A +:1098600011F079FC0021084602F0C7FE0120FEF746 +:109870006FFA71E68878132804D0FF205FA1483082 +:1098800011F069FC0021072002F0B7FE1120FEF75D +:1098900078FA61E6F8B504460122022102F044FAA2 +:1098A000074601220321204602F03EFA0646012225 +:1098B0000521204602F038FA0546012204212046FF +:1098C00002F032FA0446002F04D1AF204BA18000F1 +:1098D00011F041FC002E04D14C4848A11A3811F077 +:1098E0003AFC002D04D1494844A1193811F033FC49 +:1098F000002C04D1454841A1183811F02CFC22213C +:109900003846FEF7B7FA3846F8BD10B5002809D03A +:10991000830000221146072002F0C8FD072801D06D +:10992000032019E6002017E610B504460068002859 +:109930000CD03A49884207D301218904884205D3D3 +:1099400034490968884201D2102005E601F060F828 +:10995000A088294CA083A07E01280DD100210920D8 +:1099600002F025FE002800D00120A17C89090129F0 +:1099700004D00321FEF792FC0020EDE50221F9E777 +:10998000F7B500260C4605460B271AE02968B000FB +:1099900009580978002903D0012901D00720FEBD0C +:1099A000A170296806220958E01C491C11F049FAE7 +:1099B00027702046029902F0C0F80028EFD1761CEB +:1099C000F6B22879B042E1D800263A270FE0A8681D +:1099D000B10041581022A01C11F033FA2770204624 +:1099E000029902F0AAF80028D9D1761CF6B2287B99 +:1099F000B042ECD80020FEBD640C00207372635CA2 +:109A00006761705F636F72652E630000D7020000AC +:109A100002320000280000200230000000C00100D7 +:109A200030B5FE4B9A4207D301239B049A4205D3DB +:109A3000FB4B1B689A4201D2102030BD1578EB0613 +:109A40005B0F042B07D85478072C04D39378102B82 +:109A500001D8A34201D2072030BDD3785B0702D4DE +:109A600013795B0701D5062030BDC37FAC075B08C7 +:109A70005B00E40F2343C3770878EF231840137883 +:109A80009B06DB0F1B0118430870F1231840137865 +:109A9000DB065B0F5B0018430870507808730020EA +:109AA00030BD30B500240C70C378DB07DB0F0B70C2 +:109AB000C578AD07ED0F6D002B430B70C5786D07B2 +:109AC000ED0FAD002B430B7014700179C907C90F5E +:109AD000117003799B07DB0F5B001943117000794C +:109AE0004007C00F80000143117030BD70B51446AF +:109AF0000D460646F7F736FF002809D0A22101706F +:109B0000142221460830F7F75FFBF7F70CFF70BD12 +:109B1000132229463046FEF774FB70BD70B514461B +:109B20000E460546F7F71EFF002809D022210170D6 +:109B300045802178017261784172F7F7F4FE70BDBB +:109B4000132231462846FEF75CFB70BD10B5B54CBC +:109B5000207C00280DD12046B34A21461038FEF75C +:109B6000A7F8002803D0B1A1F12011F0F4FA0120E8 +:109B7000207410BDFFB581B00A9D06461C461746ED +:109B80001421284611F0BCF90B9800210160F80758 +:109B90000ED0A34920680968884239D31230286062 +:109BA0002068143068602068A8600B982168016004 +:109BB000B80726D56068002803D09949096888420B +:109BC00026D3029900290AD0FC3600280ED031464F +:109BD0001030FEF7DBFA00281BD1606810E0002887 +:109BE00016D0E86080366068B0670AE0FFF7CFF80B +:109BF00001460722304611F024F9FFF7A7FF8948F4 +:109C0000E860780708D58649A0680968884202D2CA +:109C1000102005B0F0BD28610020FAE770B50546B8 +:109C200011200C460870002161702121495D002936 +:109C300008D003290ED0042910D0FF207BA1523078 +:109C400011F089FA20780009012802D9E87FC008BC +:109C5000607070BD0007000F203002E00007000FA9 +:109C600030302070EEE770B594B015460C462C22CB +:109C70006946189E0A704880002B17D008221946A2 +:109C800001A811F0DEF868468581102231460E30B9 +:109C900011F0D7F809A9684601F04FFF002803D159 +:109CA000A17F10221143A17714B070BD0020019054 +:109CB0000290E8E7F0B50646008A97B080B20D46FC +:109CC0000190FEF7A0F804465648317848385B4FBB +:109CD00009900B0011F060FB0EFEFD43084A7283F1 +:109CE000B8D9FCFBFAF9F8FEA07F8007800F0128A5 +:109CF00007D000210022019802F016F8050007D1D4 +:109D000001E00121F6E7FF2048A1943011F023FA89 +:109D1000387CC00904D049484038406DA86112E041 +:109D20002B20694608720BA902A801F006FF002843 +:109D300004D0FF203DA19F3011F00DFA40490C984E +:109D400011F0E8F8A9617068A862B068E86220784C +:109D5000252804D0FF2035A1A53011F0FCF93246AA +:109D600021460198FFF7C2FE17B0F0BDA07F800723 +:109D7000800F012807D000210022019801F0D4FFB4 +:109D8000060007D101E00121F6E7FF2027A1AF304F +:109D900011F0E1F92078252804D03078012108431A +:109DA0003070E1E702202870B068A860B068002831 +:109DB00002D000202871D7E70120FBE72B2069465D +:109DC0000870184968464C3901F0B7FE002804D0E5 +:109DD000FF2016A1CE3011F0BEF903201BE02A208F +:109DE0006946087000A810220230716811F029F845 +:109DF00004A810220230B16811F023F8094968461E +:109E00004C3901F09AFE002804D0FF2007A1DF3072 +:109E100011F0A1F904202870099813E000C0010096 +:109E200028000020300D0020FFFF00007372635CEB +:109E30006761705F7365632E63000000500E002041 +:109E400040420F0068608FE7B068002804D1FF200F +:109E5000F649EB3011F07FF9E07F400704D5FF2091 +:109E6000F249EC3011F077F9B06806220A38009018 +:109E700033790421019801F058FA002891D0FF208D +:109E8000EA49F13011F067F96EE7002C04D1FF20A8 +:109E9000E649F93011F05FF92046223010220546DC +:109EA000716810F0CEFF28212046FDF7E3FFA07F68 +:109EB0008007800F022814D100231A4621460095FE +:109EC0000198FFF7D0FE06E055E1B6E0ACE089E08E +:109ED0002CE065E069E111280BD029212046FDF72F +:109EE000C9FFE07F317A4007400FC9000843E0779F +:109EF0003AE7A07F000703D5CC49CD4811F02BF9F4 +:109F0000A07F08210843A0770020608620463430D7 +:109F100010F0F4FFE07FFD220146C9071040890FD1 +:109F20000843E077307A203420701DE7A07F800757 +:109F3000800F012807D000210022019801F0F4FED3 +:109F4000040007D101E00121F6E7B948B7491D3007 +:109F500011F001F92B2069460872B64902A801F0F8 +:109F6000ECFD002804D0B248B049223011F0F3F8DB +:109F7000B0488188204621300176090A41760E21B9 +:109F800029702146FC316960017E2974407E687425 +:109F9000A8482C30A860103030346C61E860E3E6EB +:109FA000002C04D1A248A149363011F0D4F8207811 +:109FB00021289DD93079012802D0022808D103E058 +:109FC000E07F04210843E077387C0121084338749E +:109FD000324621460198FFF789FD23212046FDF7EF +:109FE00049FFC1E601220421019801F07DFC00280F +:109FF0009BD0A07F8007800F012807D0002100227E +:10A00000019801F091FE040007D101E00121F6E77B +:10A0100087488649543011F09EF80F202870172089 +:10A0200028716E34AC609FE60421019801F0ABFC0E +:10A030000028B4D11020287096E6A07F8007800FFA +:10A04000012807D000210022019801F06DFE0500D3 +:10A0500007D101E00121F6E7754874496D3011F030 +:10A060007AF82E462036307E41064DD5A17F8F07E7 +:10A07000BF0FC00713D02A468032516F00290ED07F +:10A08000087CF37DC007C00F5B0018430874516F54 +:10A09000E27F40084000D207D20F10430874307EA0 +:10A0A000000713D528468030026F002A0ED0117C9D +:10A0B000F37DC907C90F5B0019431174E27F49089A +:10A0C0004900D207006FD20F11430174307E800720 +:10A0D0000BD5F8204259002A07D0012F05D0294678 +:10A0E000307C31311032FEF77BF8307EC0060BD564 +:10A0F000F8204259002A07D0012F05D12946307C8B +:10A1000031311032FEF76CF8052368460370357E56 +:10A110004570484822226038019902704278D2087E +:10A12000D200D21C4270418003724572F7F782FD63 +:10A130002078252809D021280BD0AD203B4980006C +:10A1400011F009F82078222803D922212046FDF7B2 +:10A1500091FEA07F8007800F01280AD0002101987E +:10A1600001F009FE002800D1FEE5AF202F49800054 +:10A1700088E60121F3E774682E4D207860350928C0 +:10A1800002D00A28F0D10BE0E168002902D028466D +:10A19000F8F7D7FE2169002902D02846F8F7D1FE4A +:10A1A00021462846F8F7CDFEDEE521481F49DC3080 +:10A1B00068E6204810B5072228216030F8F7A8FE8D +:10A1C0001D480024017C4906490E0174403844654D +:10A1D000FDF7FBFC17493C3108461038F7F779FCCE +:10A1E00014484C30047410BD70B50D46FDF70BFEDD +:10A1F000040004D103200D49000210F0ACFFFF2140 +:10A200000531284610F07CFEA07F8007800F0128D2 +:10A2100016D0022128468830FDF7D8FC002803D04C +:10A220000249064810F097FF70BD00002C9E000008 +:10A2300005020000E40C0020500E00200503000081 +:10A240000121E7E70A46014610B510468830FDF7C0 +:10A25000D7FC10BDF0B505464068082601789BB0D4 +:10A2600008290DD00B2903D00C293FD10121817180 +:10A27000686887883846FDF7C6FD040041D13BE099 +:10A2800047883846FDF7BFFD040003D1FD49FE486D +:10A2900010F061FF2078212828D0282828D168686C +:10A2A00002210C3000F0BEFF002821D06868082190 +:10A2B000001D00F0B7FF00281AD02D21684601705C +:10A2C000478021461022223101A810F0BAFD0FA9C3 +:10A2D000684601F032FC002804D0CB20E949800018 +:10A2E00010F039FF29212046FDF7C4FD1BB0F0BD59 +:10A2F000687830436870F9E7E348E2492D3010F0A0 +:10A300002AFFA07F8107890F022902D1EF2108408F +:10A31000A0772078212810D068688179002902D0A0 +:10A320008078002818D0A07F8007800F022864D092 +:10A330000720D449C00110F00EFFA07F8007800FD6 +:10A340000228D3D1FDF7ECFF0028CFD0CE48CD496D +:10A35000733010F000FFC9E7687830436870E07F21 +:10A36000C00701D0042100E00321212001552078FD +:10A37000292818D02428E0D13946062002F03DF9DA +:10A3800022212046FDF776FDA07F8007800F01285F +:10A3900031D00021384601F0EEFC0028CDD0BA487B +:10A3A000B8495830C7E7A07F8007800F012807D041 +:10A3B00000210022384601F0B7FC050007D101E07A +:10A3C0000121F6E71B20AF49400110F0C4FE252112 +:10A3D0002046FDF74FFD0D2008A90871284609A960 +:10A3E0008830FDF7FFFB0228A7D00028A5D0A6489B +:10A3F000A4494D309FE70121CCE76878304368706D +:10A400009BE7F7B58AB00A98FDF7FDFC050056D02A +:10A410002878222853D3232851D0E87F40074ED4F0 +:10A42000A87F8007800F01280ED0002201280DD0C0 +:10A4300000210A9801F078FC064694480290F8F74B +:10A4400077FD040009D103E00122EFE70121F0E7E5 +:10A4500075208C49C00010F07EFE002E0FD088368B +:10A4600066610298F8F764FD07460298F8F760FD08 +:10A4700006462878222807D0242805D008E00020A6 +:10A4800007460646606103E025212846FDF7F2FCF9 +:10A49000092020700A9820620C9820710B98E760C0 +:10A4A0002661A06004A92046FDF7C0FB022806D063 +:10A4B000002804D074487349AF3010F04CFE0DB042 +:10A4C000F0BD30B587B00446FDF79DFC0546807FA2 +:10A4D0008007800F01280BD000210022204601F0C8 +:10A4E00023FC0446287822281ED9002C07D101E03D +:10A4F0000121F2E764486349BB3010F02CFE0F21C4 +:10A50000684601701721017120466E30029069463D +:10A510001A30FDF767FB022806D0002804D05A48FD +:10A520005849C03010F017FE07B030BD30B587B0C5 +:10A530000446FDF768FC0546807F8007800F0128F0 +:10A540000BD000210022204601F0EEFB04462878C3 +:10A550002228E9D9002C07D101E00121F2E74A487D +:10A560004849CD3010F0F7FD1020694608702046AC +:10A570008830FDF737FB0028D6D043484149D0301A +:10A5800010F0E9FDD0E7F7B505460078002700098F +:10A5900082B00C463E4602287CD0072802D00A280A +:10A5A00049D149E068680178082906D00B292FD0E5 +:10A5B0000C292DD03349364865E114271A26002C82 +:10A5C00069D04088A080FDF71EFC0090002804D1CF +:10A5D0002F482C49243810F0BEFD00980099C07D0A +:10A5E000A21D1831FDF7FCFD686808228089E08112 +:10A5F000696820461030091D10F023FC207E0121DF +:10A600000843F9210840207600984021807F50E0DF +:10A6100018270826002CD3D08088A080FDF7F3FBF4 +:10A62000050004D11A481749401F10F094FDA11DE0 +:10A630002846FFF7F3FA28E1002C01D0288BA080F0 +:10A64000287A01287ED0022805D0032838D0104867 +:10A650000C49853017E11C270726002CB0D0A088B4 +:10A66000FDF7D1FB0090002804D1094805491330BB +:10A6700010F071FD287B8007800F0128A0791CD085 +:10A68000400809E02C9E00001A030000440D002041 +:10A6900027040000E9E0E3E04000A071FD2108404C +:10A6A000297B4907C90F49000843A0710098802100 +:10A6B000807F084300998877E7E001210843ECE7B1 +:10A6C00013270B26002CA6D0A088FDF79CFB00903A +:10A6D000807F8007800F012807D00021A0880022FA +:10A6E00001F022FB050006D101E00121F6E7FB495C +:10A6F000FB4810F030FD0098807F8007800F012814 +:10A7000050D0E86A81788907890F0129A1794BD057 +:10A7100049084900A1718278FD255207D20F2940CE +:10A7200052001143A171E322114002785207D20E68 +:10A730001143A171DF2211404278D207920E1143DA +:10A74000A17100E033E00021E171C178217242790A +:10A750000179607AD30740084000DB0F1843930764 +:10A76000DB0F28405B0018435207FB23D20F184031 +:10A77000920010436072A07ACA0740084000D20FCE +:10A7800010438A07D20F2840520049071043C90FCF +:10A79000184089000843A07200980078232874D9D3 +:10A7A0002621C4E0A86AADE701221143B2E7297B64 +:10A7B000CC48022911D017270C26002C50D0012993 +:10A7C00012D003291FD0042920D005291ED09320A0 +:10A7D000C249C00010F0BFFC23E019270726002C57 +:10A7E00053D00121A17105E00121A171E17989080E +:10A7F0008900E171017CCA094906D201890E49002C +:10A800000A4302740DE00220A07106E0687B000795 +:10A81000000F8030A07105291DD0E07980088000EC +:10A82000E071A088FDF7EFFA0546007821282CD0CA +:10A83000232804D0AA48A949573010F08CFCA87FDF +:10A840008007800F01280ED00021A08801F093FA24 +:10A85000222128466CE0E07980088000401CDFE778 +:10A860000498068017E00121EFE7002C01D06888EA +:10A87000A080287A032832D004280FD005285AD087 +:10A8800097489649B03010F066FC0498002C06807A +:10A8900001D027806680002005B0F0BD15270C266A +:10A8A000002CDDD0A088FDF7AEFA807F8007800FF6 +:10A8B000012807D00021A088002201F035FA050008 +:10A8C00007D101E00121F6E785488449763010F090 +:10A8D00042FC0622A11DA86907F036FAD5E7162723 +:10A8E0000726002CBCD0A088FDF78DFA0090807F51 +:10A8F0008007800F012807D00021A088002201F0E6 +:10A9000013FA050007D101E00121F6E77448734905 +:10A91000843010F020FC2878C00601D5022000E029 +:10A920000120A071009800782328AED92721009833 +:10A93000FDF7A0FAA9E717270C26002C90D0A088D5 +:10A94000FDF761FA00906D7A002804D164486349EC +:10A95000973010F000FC0621A01D10F0CFFA002067 +:10A96000A071207A032108432072FB21084000993E +:10A97000C97FC907490F08432072680685D5E07969 +:10A9800004210843E071A07AE90740084000C90F9C +:10A990000843E17A2A0749084900D20F1143FD22F2 +:10A9A000AB07DB0F10405B001843A072E806C00F36 +:10A9B000114040000143E17267E710B50446807919 +:10A9C00090B08009012804D045484449C93010F0AE +:10A9D000C2FBFFF7BBF801206946087042480890A7 +:10A9E00042480190201D0290601C0B900AA9684605 +:10A9F000FDF71CF9002804D039483849D43010F04C +:10AA0000AAFB0322601C0B9910F01BFA10B010BDBA +:10AA100010B5364C002805D001461022204610F013 +:10AA200010FA0120207410BD10B50446FFF78EF80F +:10AA300010222E49204610F004FA10BD70B50025F2 +:10AA4000284C00281CD02A49884207D301218904B8 +:10AA5000884205D327490968884201D210250DE0B4 +:10AA6000062107F05BF9411C07D01E4940394865B3 +:10AA7000207C80210843207400E00725284670BD13 +:10AA8000207C4006400EF6E7F3B5002089B00D4665 +:10AA9000029000290AD0164885421CD30120800468 +:10AAA000854203D313480068854214D30998FDF703 +:10AAB000AAF9060003D03078222826D102E00E48F9 +:10AAC0000BB0F0BD002D19D1B07FC10903D08007B4 +:10AAD000800F022812D01020F2E700002C9E000008 +:10AAE0004D040000500E0020FFFF0000300D00203C +:10AAF00000C001002800002002300000B07FC10625 +:10AB000001D4010703D5002D01D00820D8E7FE4964 +:10AB1000097CC90717D1F17F490701D50D20CFE77F +:10AB20008007800F01280CD000210122099801F034 +:10AB3000FBF8070007D0B07F8007800F022804D001 +:10AB40000DE00121F1E71120BAE7002D07D02A46D8 +:10AB500039463046FEF764FF02900028B0D1EB483A +:10AB6000F8F7E6F9040003D1E949EA4810F0F3FAEE +:10AB70000A2020700998206238468830A060B07F93 +:10AB8000FB218007800F012829D0002D3DD0022015 +:10AB90002071381DE06038780007400F2074387845 +:10ABA000C006C00F6074A07C2A788008D20780009D +:10ABB000D20F1043A0740840F17F01AAC907490FC2 +:10ABC0000843A074A878E07469462846FEF769FF38 +:10ABD00068460079207568460078607519E00120A4 +:10ABE0002071207B2A788008D2078000D20F104382 +:10ABF0002073084029788907C90F8900084320730A +:10AC000024213046FDF736F90BE0032020710520A2 +:10AC1000207325213046FDF72DF9B07F4006400E08 +:10AC2000B07703A92046FDF701F8022806D00028D6 +:10AC300004D0B848B6492B3010F08DFA02983FE79F +:10AC4000FFB5B54A0E4607CA97B002AB07C3002747 +:10AC500001970C971798FDF7D6F8050005D02878CE +:10AC6000262804D008201BB0F0BDAC48FBE7A87F25 +:10AC70008007800F012807D000210022179801F0DB +:10AC800053F8040007D101E00121F6E7A148A049EB +:10AC9000623010F060FAA87F8007800F16900128BC +:10ACA00014D0022824D09B4899497B3010F053FAE5 +:10ACB00001210022852E31D01EDC002E26D0812ECF +:10ACC00026D0822E26D0832E1ED125E0002EEFD155 +:10ACD00021462846199AFEF7A3FE0028C3D11998E9 +:10ACE0008078019019980078C007C00F0C90DFE7BA +:10ACF0001998002808D1DBE7862E11D0882E11D0B4 +:10AD0000892E11D08A2E11D00720ACE710460EE014 +:10AD100008460CE002200AE0032008E0052006E0D7 +:10AD2000062004E0082002E0092000E00A200022BA +:10AD3000227101216A461176211D0791002801D058 +:10AD400020710BE1169801280CD0A66AE06A022255 +:10AD5000012111900020A0602846173002291AD046 +:10AD6000012119E0E66AA06A119003203070207872 +:10AD7000FB23C006C00F7070B07801221840019B01 +:10AD8000F37080080C9B800018430221B0700020F3 +:10AD900070713071DEE70021890009190861681CB3 +:10ADA000022A01D0012100E000218900091908616F +:10ADB000B0788007800F01285ED1119880788007D5 +:10ADC000800F012858D1119800790190119840798D +:10ADD0000090169801281DD0317908A80174717966 +:10ADE000017508A8027C01980099024008A8007D1E +:10ADF0000840149010433FD049491A98884207D31D +:10AE000001218904884215D346490968884211D234 +:10AE1000102028E70CAA0DA91998FEF742FE08A8F1 +:10AE2000007C01990840307108A8007D0099084015 +:10AE30007071D6E720463C3021460090F0311698DC +:10AE40000191022834D000211A9B20460C33FEF7D2 +:10AE500091FE0028DDD12046503021460090F4318B +:10AE600016980191012825D0002120461A9B149A9A +:10AE7000FEF780FE0028CCD111988078400702D4DC +:10AE8000E87FC0072BD0169902A8012914D0119988 +:10AE900009784900405A21780907490F4900C840FC +:10AEA0008707BF0F2AD0012F14D0022F0FD113E034 +:10AEB0000121C9E70121D8E721780907490F490095 +:10AEC000405A119909784900C8408707BF0F032FDE +:10AED00004D004E0022711E001270FE002271698B2 +:10AEE00001280BD1B078FB210840E97FC907490F41 +:10AEF0000843B07020780007400F30702078400879 +:10AF00004000207011990FE0500E0020440D0020E9 +:10AF10002C9E0000A90500001CB4010002300000B6 +:10AF200000C001002800002049781022C907C90E7E +:10AF3000D243114308402070C00622D4022F20D0F3 +:10AF4000012F20D00020A061E061206260622046D5 +:10AF50001830A060E87F40084000E877204606A946 +:10AF60008830FCF73FFE002805D0022803D0B44902 +:10AF7000B44810F0F0F825212846FCF77BFF0020AC +:10AF800071E6032008E020460D211B300FF0B6FFCC +:10AF900020461830A060042069460875E87F01212A +:10AFA0000843E87705AA29461798FEF7B7FDD5E7C5 +:10AFB000F0B587B015460F0004460DD0A248854273 +:10AFC00007D301208004854206D3A048006885424B +:10AFD00002D2102007B0F0BD2046FCF714FF060097 +:10AFE00004D03078272803D00820F3E79848F1E709 +:10AFF000B07F8007800F012807D000210022204663 +:10B0000000F092FE040007D101E00121F6E78D482F +:10B010008B491F3010F09FF80020002F05D0022F21 +:10B0200008D0012F11D00720D4E701216A46117101 +:10B03000A06018E0234618336946A3600871102207 +:10B04000294618460FF0FDFE0DE021461831A1609B +:10B0500069460871A061E0612062606206212846AD +:10B0600006F05CFEA0612078C10714D040084000C3 +:10B070002070022069460870204618300290703017 +:10B08000FCF7B0FD022806D0002804D06D486C49BA +:10B09000423010F060F825213046FCF7EBFE00202E +:10B0A00098E7F8B515460E460746FCF7ACFE0400D7 +:10B0B00004D02078222803D00820F8BD6448F8BDC9 +:10B0C000A07F8007800F022802D06148C01CF8BD15 +:10B0D0005D4886420ED3012189045C4A8E4202D328 +:10B0E00013689E4206D3854204D38D4204D3106870 +:10B0F000854201D21020F8BD00953288B31C21464C +:10B100003846FEF7B0FD112816D00028F3D1E17FB4 +:10B110002A7C4908D2074900D20F1143E1772A7CE3 +:10B1200049079206490FD20ED2001143E177A17F61 +:10B130004906490EA177F8BDA17F0907FBD4204637 +:10B140000822B11C34300FF07CFE30886086204627 +:10B150001022294622300FF074FEE07FFD210840C6 +:10B16000297CC907890F0843E077287C4108202003 +:10B170000155A07F08210843A0770020D7E770B5CC +:10B1800094B00D460646002B02D0072014B070BDC7 +:10B19000FCF739FE040007D02078222802D3A07FD4 +:10B1A000400603D40820F1E72948EFE7002D19D025 +:10B1B0002D216846017046801022294601A80FF013 +:10B1C00040FEE07F297C4008C9074000C90F0843C2 +:10B1D000E077297C40078906400FC90EC900084363 +:10B1E000E07703E02E2168460170468009A9684691 +:10B1F00000F0A3FCA17FBF221140A177C6E710B5E4 +:10B200000C46FCF700FE002805D0104909688C4266 +:10B2100003D2102010BD0E4810BD2146FEF7FEFCE3 +:10B22000002010BD05E00278401C002A01D000205B +:10B2300070470A46491E89B2002AF4D1012070479E +:10B240002C9E0000ED06000000C001002800002038 +:10B250000230000030B50346072903D00620DA7813 +:10B260001C7916E00320FAE707290BD05500ED18EA +:10B270006D79072D01D0401EC0B2521CD2B2092AEE +:10B2800007D105E05500ED186D79072DF3D0F4E7EF +:10B2900000222546641EE4B2002DE5D130BDFFB585 +:10B2A00081B00C461646114620460A9F0B9DFFF7BB +:10B2B000D1FF00280AD02079092803D3FEA1A020BD +:10B2C0000FF049FFA078C00907D019E0072E02D07F +:10B2D000112005B0F0BDFD48FBE701982880381D1E +:10B2E0006880002068712871EF80049828812846C2 +:10B2F00000F04BFC002803D1EFA1AD200FF02BFF95 +:10B30000E07821794018491CC0B22171092801D385 +:10B310000938C0B24000001946718179F12249080C +:10B320004900114081710020D3E7FFB583B0164674 +:10B330000F461C46002203210C9D039800F0F4FCEC +:10B34000010008D033463A46019500940398FFF770 +:10B35000A6FF07B0F0BDDD48801EFAE7F0B5054650 +:10B3600016460F4650888DB00022032100F0DCFC09 +:10B37000040003D1D0A1DF200FF0EDFE00206946CC +:10B380000871A078400603D1CBA1E3200FF0E3FEC3 +:10B39000042F5ED32A78D007C017401C06D16178ED +:10B3A0006B78994255D12178090752D00121142A8E +:10B3B00046DA012A42D0122A02D0132A40D128E0CC +:10B3C0000C2F3DD1A2785206520E012A38D0207897 +:10B3D00000090001401C20706878607068460171A7 +:10B3E00068792A790102114368460181E879AA79CE +:10B3F0000102114368464181687A2A7A01021143A9 +:10B4000068468181E87AAA7A010211436846C181BF +:10B410001AE0062F14D120780009000120707188ED +:10B42000012001F0EAF8022168460171C91E01817C +:10B4300068792A790102114368461FE0062F0AD075 +:10B440006A461279002A1BD07088324601A9FDF79E +:10B4500020FB0DB0F0BD207800090001207071883C +:10B46000012001F0CAF802216846017168792A7941 +:10B4700001021143684601810021C9434181E3E78C +:10B480000028E6D07488684681766978C176022102 +:10B4900081830021C18304A8052200900623114660 +:10B4A0002046FFF742FF0028D3D089A1D6200FF015 +:10B4B00052FECEE7F7B58CB015460C990D98FAF709 +:10B4C00041F9C0B2082850D10020694688856888B3 +:10B4D0000022032100F028FC040004D1FF2076A103 +:10B4E00063300FF038FE01230021E07822790BE071 +:10B4F0004600361976799E4201D1491CC9B2401CDA +:10B50000C0B2092800D100201646521ED2B2002E29 +:10B51000EED1002902D117206946888504AB023399 +:10B520000BAA00950C990D98F8F7B6FB0006000ED3 +:10B5300007D002281BD0032817D0FF205EA1893036 +:10B5400011E06846808D00280FD002A9019100907B +:10B550006888042301222146FFF7A1FE002804D0B9 +:10B56000FF2055A176300FF0F6FD0FB0F0BD6878E2 +:10B57000102108436870F8E700205A49024643004A +:10B58000401CCA520828FAD3704700218170017804 +:10B5900009090901017000214170C17001717047F2 +:10B5A00070B50D460022032100F0BEFB040004D15B +:10B5B000FF2041A1CF300FF0CEFDA0786906C00971 +:10B5C000C001490E0843A07070BD704710B5014618 +:10B5D000012001F012F810BD3EB58DB2002203210A +:10B5E000284600F0A1FB040004D1FF2032A1E43082 +:10B5F0000FF0B1FD2078694600090001207002209B +:10B60000087039488880C88000222846FDF741FA32 +:10B610003EBDF7B505460078002700090C463E46BA +:10B62000012804D0FF2024A1F3300FF094FD287AE4 +:10B6300003280CD0412020A1C0000FF08CFD0298FF +:10B64000002C068001D0278066800020FEBDEA899C +:10B65000702710460A3086B2002C0AD06888A08075 +:10B66000A8892081E28020460A3029690FF0E9FB91 +:10B67000E5E702980680E8E7F8B543680246D9791D +:10B680009C79090221435C7A1E7A25025C88981D08 +:10B690003543241FA14238D11B79022B35D1042D0B +:10B6A00034D0052D3DD0062D34D0402D2DD3061D90 +:10B6B0000F461446284619E07372635C6C3263616E +:10B6C000705F636F72652E6300000000043000003D +:10B6D0007372635C6C326361705F636F72652E635B +:10B6E00000000000680E0020FFFF000000F0E3F9FA +:10B6F00008280AD01120207003202072A581E7813C +:10B7000026616078082108436070F8BD001DFFF7CE +:10B71000D1FEF8BD031D50880A461946FEF771FE9A +:10B72000F8BD001DFFF71AFEF8BD70B50D468CB0D0 +:10B7300006460022032100F0F7FA040031D02078F9 +:10B740000007000F01282ED0122069468874607807 +:10B750000523801CC874082088822888C8826888CD +:10B760000883A8884883E888888302A90C2001916F +:10B7700000901A4621463046FFF791FD00280ED171 +:10B78000F02300223146012000F090FE20780009CD +:10B790000001401C20706078801C607000200CB09C +:10B7A00070BDCB48FBE71120F9E770B50D468CB0B2 +:10B7B00006460022032100F0B7FA040006D02078E4 +:10B7C0000007000F012803D00820E8E7C048E6E79B +:10B7D0001321684681746178C17402218182C58217 +:10B7E00002A906200523019100901A462146304601 +:10B7F000FFF755FD0028D2D1207800090001207004 +:10B800000020CCE7F3B581B00D460022032101985A +:10B8100000F08AFA00260446002803D1AD49AE485C +:10B820000FF099FC2079A8423BD2AB48A949401CB3 +:10B830000FF091FC35E0E07841000F19401C797958 +:10B84000C0B20091E070092801D10020E070207999 +:10B85000401E2071B879C00708D0009801990428CB +:10B8600015D09C49822018310FF075FCB87900077B +:10B87000410F08D0400F019904280CD095498F2022 +:10B8800018310FF068FC009807280AD107E0084635 +:10B89000FEF74CFEEAE70846FEF713FEF3E7761CD8 +:10B8A000F6B228466D1EEDB20028C4D13046FEBD6A +:10B8B00010B50022032100F037FA040004D1B520AE +:10B8C000844980000FF047FCE07821794018C0B22D +:10B8D000E070092801D30938E07000202071A078B9 +:10B8E00080210843A07010BDF8B517460D46002210 +:10B8F000032100F019FA040005D0002D0CD0002F10 +:10B9000007D0062006E0072D01D00620F8BD032051 +:10B91000F8BD0820A84204D86F486E4942300FF0A5 +:10B920001AFC29462046FFF795FC0646002F28D032 +:10B93000002E26D1E07821791CE0420012195379BB +:10B94000072B03D093791B075B0F04D0401CC0B2B8 +:10B9500009280CD00CE0400000198079F123184030 +:10B960006B071B0F1843907100290AD104E00020D7 +:10B97000491EC9B20029E0D1574856495A300FF044 +:10B98000EAFB3046F8BDF8B50D460022032100F071 +:10B99000CBF9040004D150484E4968300FF0DBFB6E +:10B9A000681E052804D34C484A4969300FF0D3FB80 +:10B9B0000921E2782079002310E0560036197779C2 +:10B9C000AF4206D1B17949084900B1715B1CDBB2C5 +:10B9D0001146521CD2B2092A00D100220646401E4E +:10B9E000C0B2002EE9D1092905D248000019817999 +:10B9F0000122114381711846F8BD10B50446402854 +:10BA000001D2072010BD00F056F8082802D03120DE +:10BA1000000210BD0021314802E0491C082903D270 +:10BA20004A00825A002AF8D1082903D0490044521A +:10BA3000002010BD042010BD10B5402801D2072001 +:10BA400010BD00F038F8082805D00021234A400036 +:10BA50001152084610BD052010BDF0B58BB016463A +:10BA60000C00074607D0002E05D06188402904D27B +:10BA700007200BB0F0BD1020FBE72088002801D084 +:10BA8000172801D90C20F4E7084600F014F808281C +:10BA90000FD0258803A82A46314602300FF0D1F98D +:10BAA00001A8009062882B4607213846FFF73DFC2D +:10BAB000DFE70520DDE701460020084A02E0401CE0 +:10BAC000082803D24300D35A8B42F8D170470000B4 +:10BAD00002300000B8B60000AD020000680E002081 +:10BAE00000B51E2827D00FDC0C2820D008DC03006E +:10BAF0000FF052FC0913211521211B1B17192100DE +:10BB0000122818D1072000BD302814DD3A38030070 +:10BB10000FF042FC030F11091100002000BD214865 +:10BB200000BD042000BD0D2000BD0F2000BD082079 +:10BB300000BD112000BD032000BD10B50C4604F06F +:10BB4000A0F800281ED0204602F013FE002816D0D0 +:10BB500022780E2A0DD00F2A0BD0022A09D0032AF0 +:10BB600007D0102A09D010A17E200FF0F4FA00208F +:10BB700010BDA078FFF7B4FF10BD112010BD0AA1C1 +:10BB80008420F2E708A18A20EFE710B502F0A2FCBA +:10BB900010BD10B502F0EDFD10BD10B502F01AFD9C +:10BBA00010BD0000023000007372635C686F737434 +:10BBB0005F6863692E630000F8B5054606ACC1CC2A +:10BBC000E44C21706270A370E070681C4208277119 +:10BBD0005200E14B66710021880000198446026220 +:10BBE000605C40008218002D0AD0002005E0664607 +:10BBF0004700366A401CF353C0B2665C8642F6D8F2 +:10BC0000491CC9B20629E7D30026D21C9708B00008 +:10BC1000BF0000198760304600F02AF9A15D761C4C +:10BC20004843C219F6B2062EEFD3501B80B2F8BDBE +:10BC3000F0B504468C46C7490020A500FF23024604 +:10BC40006D18C54E0C5D0BE02F6A5100795AB14258 +:10BC500004D1401CC0B2FF2B00D11346521CD2B2FB +:10BC60009442F1D8002801D061460B70F0BD70B548 +:10BC7000B84C0023655CA678B54200D10346890024 +:10BC800009199D420AD90C6A5E00A45B844202D164 +:10BC90001370012070BD5B1C9BB2F2E7002070BDE9 +:10BCA000FFB583B00C9C1F460D46060009D0002D41 +:10BCB00007D0F01C80088000B04204D0102007B0EC +:10BCC000F0BD0E20FBE70598A04201D8A74201D99C +:10BCD0000720F4E701460094019423463A460020E9 +:10BCE0000294FFF769FF2988814207D0814201D27F +:10BCF000042100E0092128800846E0E7009401942F +:10BD000023463A46029430460599FFF755FF2880AE +:10BD10000020D4E710B5044600F0B4F8002801D0A4 +:10BD2000E0B210BDFF2010BDF8B505468A481646A2 +:10BD30000C46854201D0062C01D30020F8BD002717 +:10BD400069460F7028466A462146FFF790FF002893 +:10BD50000DD068460178204600F09CF8002EEDD00A +:10BD60000028EBD12146284600F0A0F8F8BD38465F +:10BD7000002EF7D1F8BDF8B505460C460020764EEA +:10BD80006946764F0870B5423BD0062C01D3072098 +:10BD9000F8BD0A4621462846FFF769FF002830D043 +:10BDA00068460178204600F075F823000FF0F4FA99 +:10BDB000060404090C11161B01462846FEF742FA38 +:10BDC00015E0FDF735F812E001462846FFF7FDFBC8 +:10BDD0000DE001462846F7F7E4FE08E00146284654 +:10BDE000F9F73AFB03E05EA17C200FF0B4F9594A61 +:10BDF0006846A10000788918096A40000E520020A8 +:10BE0000F8BD3846F8BD5A4A1268914201D2102056 +:10BE10007047062801D30720704708720020487237 +:10BE20007047F8B5044652480068844201D2102099 +:10BE3000F8BD207A474A83009B18617A464D125C10 +:10BE400011E01E6A4F00F65BAE420AD04A1C6272D5 +:10BE50001A6A4B00D25A228000F01CF86060002061 +:10BE6000F8BD491CC9B28A42EBD861720520F8BD01 +:10BE70000EB5404B40000ECB0091029301926946F3 +:10BE8000085A0EBD33498978814201D90120704793 +:10BE90000020704770B50C460546FFF7E9FF2D4AB4 +:10BEA000A900891889686043401870BDF8B5044638 +:10BEB0000E4600206946087005462046FFF7E2FF5F +:10BEC000002803D126A1F3200FF045F92148214B8A +:10BED000815D8278B000C718914209D1E0B269460D +:10BEE0000870396A4000085A1B49884206D02EE083 +:10BEF00069463046FFF79CFE002828D06846007847 +:10BF0000396A40000C52684601783046FFF7C2FF9C +:10BF1000054633000FF040FA060404090C0F14170D +:10BF200029462046FEF760F911E0FCF75EFF0EE0BF +:10BF3000FFF72BFB0BE029462046F7F7F9FD06E05B +:10BF4000F9F783FA03E006A162200FF004F928460E +:10BF5000F8BD0000780E0020FFFF00000230000056 +:10BF60007372635C686F73745F636D2E63000000AF +:10BF70002800002028B401008107C90E002808DA33 +:10BF80000007000F08388008C24A80008018C06986 +:10BF900004E08008C04A800080180068C84000069D +:10BFA000800F7047BD4948788978884201D3401A8C +:10BFB00002E02122511A0818C0B27047B749233154 +:10BFC00048788978884201D3401A02E02122511A28 +:10BFD0000818C0B27047B14946314878897888421C +:10BFE00001D3401A02E02122511A0818C0B270474A +:10BFF000A94910B50C310868FF22120290430122B2 +:10C00000D20310430860A54900202331487088708E +:10C01000233948708870463148708870A04806F00F +:10C02000BCF89F48401C06F0B8F8F6F7A3FB00F0F8 +:10C0300028F910BD20207047B4E770B50C460546BE +:10C040000026FFF7AFFF9549A04214D30A46203AD5 +:10C0500000232046641EE4B200280BD08878105CD0 +:10C06000287088786D1C401CC0B288702128F0D1DF +:10C070008B70EEE7012600F004F9304670BD2020F9 +:10C0800070479BE770B50C4605460026FFF796FF04 +:10C0900082492331A04214D30A46203A0023204685 +:10C0A000641EE4B200280BD08878105C2870887871 +:10C0B0006D1C401CC0B288702128F0D18B70EEE757 +:10C0C000012600F0DEF8304670BD2021017000200E +:10C0D000704710B50446FFF77EFF2070002010BDAA +:10C0E00070B50C460546FFF776FF6C494631A04215 +:10C0F00015D30A46203A00232046641EE4B20028E5 +:10C100000BD08878105C287088786D1C401CC0B2F9 +:10C1100088702128F0D18B70EEE7002400E0614C9C +:10C1200000F0AFF8204670BD70B50C4605462129D9 +:10C1300004D9FF205CA147300FF00DF85548406846 +:10C14000103840B2FFF718FFC6B20D20FFF714FFFA +:10C15000C0B2864207D2FF2053A14D300EF0FBFF44 +:10C1600001E0F6F74AFB21462846FFF766FF002864 +:10C17000F7D070BDF8B507464948484C401E474EB9 +:10C180000078254646362335002806D1A9786878F8 +:10C19000212200F06BF800280ED0A17860782122CF +:10C1A00000F064F8002814D0B1787078212200F0F3 +:10C1B0005DF8002828D033E038496878C91C0F544E +:10C1C0006878401CC0B26870212829D100206870AE +:10C1D00026E03249607820390F546078401CC0B2A4 +:10C1E0006070212801D1002060702D4F7F1E3878AB +:10C1F000002815D0A1786078212200F037F80028B7 +:10C200000ED0002038700BE02449707826310F548E +:10C210007078401CC0B27070212801D1002070706D +:10C22000A9786878212200F021F800281DD0A17893 +:10C230006078212200F01AF8002816D0B1787078C2 +:10C24000212200F013F800280FD0F6F7B8FA1448AE +:10C2500005F0ABFF01214903884203D016A1C1209C +:10C260000EF079FF0E4805F0B8FFF8BD401C88427B +:10C2700005D0904201D1002901D000207047012053 +:10C28000704710B5064805F090FF002801D1F6F779 +:10C2900085FA10BD00ED00E000E400E0F00E0020A3 +:10C2A00069000020072000007372635C736F635F96 +:10C2B00072616E642E6300007372635C736F635F00 +:10C2C00072616E642E630000FEB5F54C074660682F +:10C2D000FF213E0181552178FF2913D00901083142 +:10C2E00041583246491E083209020192090A805813 +:10C2F00000F0CCF9002802D02478254615E06168CA +:10C30000207888552770FEBDE5484268019811588D +:10C31000280100900830105800F0B8F9002806D124 +:10C32000DF482C46416800980D5CFF2DECD1DC48BD +:10C330002101406885554754FEBD70B5D84A044672 +:10C340000020157A53680AE00201561C9E5DA64241 +:10C3500003D10C329A588A4204D0401CC0B28542A4 +:10C36000F2D8FF2070BDF8B5CD4F3E7801F00AFE3F +:10C370000146FF2E68D034012546786808354059BB +:10C3800000F084F9022802D9786840595AE0C4497B +:10C390004868025D0A70A11C425C002A0CD0521E43 +:10C3A000425441590122D20589180902090A415112 +:10C3B0003046FFF789FF30E0631CC25C0092221D0B +:10C3C00094468258002A10D001239B029A420FD92A +:10C3D0009205920D43595703DB191B021B0A435167 +:10C3E0006346C3589A1A920A09E0FF21C1540AE031 +:10C3F000435952039A181202120A4251002242541F +:10C400003046FFF761FFA6480C344168C2680098C7 +:10C4100009598000125800989047A14C2078FF28B5 +:10C4200012D001F0AFFD01462078626800010830AB +:10C43000105800F02BF9012896D920786168000186 +:10C440000830085801F091FDF8BDF8B51C461546B6 +:10C450000E460746FF2B03D392A1D3200EF07BFE9E +:10C460008F48FF21C7604560047206740170002286 +:10C470004270104604E00201521C401CA954C0B294 +:10C48000A042F8D3F8BD70B5854C06466578207C8F +:10C49000854203D383A1E6200EF05DFEE068A9008B +:10C4A00046506078401C6070284670BDFFB581B072 +:10C4B0001D46FF2401F066FD794F06467978019804 +:10C4C000814203D877A1F4200EF045FE7448002184 +:10C4D000037A406810E00A019446521C825CFF2AED +:10C4E00024D0019FBA4205D162460C328758029A85 +:10C4F00097421DD0491CC9B28B42ECD8FF2C17D0F3 +:10C5000021014B1C019AC2540B33029AC250039B67 +:10C51000634F0022012B0ED00B1DC25001239B0242 +:10C520009D4216D9AA05920D08D008E00C46E1E715 +:10C53000FF2005B0F0BD0B1DC550EFE71A465303B1 +:10C540009B190E461B0208361B0AAA1A8351920A2F +:10C5500009E0002D00D101256B039B191D022D0A56 +:10C560000B460833C550891C42543D463E78204650 +:10C57000FFF7AAFE2878B04217D001F003FD01466C +:10C5800028786A6800010830105800F07FF8012808 +:10C5900007D92878696800010830085801F0E5FCDF +:10C5A00003E001F010F9F5F7AFFE0198C1E770B5AF +:10C5B0000C46054601F0E6FC064621462846FFF7F4 +:10C5C000BCFEFF2817D0364D0401204669680830AC +:10C5D0000858314600F05AF80121090340186968EB +:10C5E000A41C095D400B002901D08902081800280D +:10C5F00000D1012070BD002070BDF3B581B00F46A1 +:10C600000198FFF79AFEFF282AD0254D2E786968F9 +:10C610003246344604E0844205D026462301CC5CF1 +:10C62000FF2CF8D11CE0FF2C1AD0A64221D110011A +:10C63000085C2870FF281AD001F0A4FC2A78014673 +:10C64000120168680832805800F020F8012809D9E2 +:10C650002878696800010830085801F086FC08E075 +:10C660000020FEBD01F0AFF8F5F74EFE01E001F04D +:10C6700084FC39460198FFF79AFF22016968FF237D +:10C68000541C0B558A5C3301CA54FEBD401A00028B +:10C690000121000AC905884200D900207047000026 +:10C6A0003C0F00207372635C736F635F74696D6528 +:10C6B000722E6300F0B500241C4A01211C4B0803B4 +:10C6C000546018601B4B1C601B4C20601B480469A5 +:10C6D000E443E406E617046910252C430461184C72 +:10C6E0006160184D2960761C00E020BF1F68002F94 +:10C6F000FBD0002E03D107691026B743076190686D +:10C700008005906801D5104A10436960A16000213E +:10C7100019600121084A09031160F0BD10B50446F3 +:10C72000FFF7C8FF2060002010BD000000C50040DA +:10C7300080E100E000C1004080E200E000ED00E0A8 +:10C7400000C3004000C0004000FCFFFF70B51F495F +:10C750000A68002A17D000231D4601244A68521C8B +:10C760004A60092A00D34D600E792246B2400E6815 +:10C7700016420AD072B60B6893430B6062B64968E2 +:10C780000160002070BD052070BD5B1C092BE5D346 +:10C790000FA136200EF0DFFCF5E7012010498005DF +:10C7A00008607047EFF31081CA07D20F72B60121FB +:10C7B00081400648036819430160002A00D162B62F +:10C7C000EBE70248002101604160704770000020E3 +:10C7D0007372635C736F635F6576742E6300000031 +:10C7E00000E200E001208107086070470120810716 +:10C7F000486070471048C068C00700D001207047EB +:10C800000D488068C00700D0012070470A48406981 +:10C81000C00700D0012070470748C069704706492B +:10C820008A69D20306D589698907890F814201D1B6 +:10C83000012070470020704700040040F8B5F74C15 +:10C84000207EE17D88421CD00126F54D0027E07D49 +:10C85000215C14200A4642435019037C052B11D059 +:10C86000037C062B1CD0037C072B28D0437C012B98 +:10C8700033D0ECA1EE480EF06EFC207EE17D8842C4 +:10C88000E5D1F8BD0674E07D162807D0E07D401C98 +:10C89000E075491CC8B2AA5802210CE00020F7E755 +:10C8A0000674E07D162808D0E07D401CE075491C28 +:10C8B000C8B2AA5803219047DFE70020F6E70674C4 +:10C8C000E07D162807D0E07D401CE075491CC8B209 +:10C8D000AA580821EFE70020F7E74774E07D162803 +:10C8E00007D0E07D401CE075491CC8B2AA5807215A +:10C8F000E1E70020F7E770B50024CE4E0C207072FF +:10C90000CD4825464473047328300476C475CB485B +:10C9100005F043FCCA480575F572CA49601E886077 +:10C920007571B570F57035717570C748E839057067 +:10C9300045701420604340180574641CE4B20B2C4D +:10C94000F7D30120F5F7E0FF0020F5F7DDFF012028 +:10C95000B071F5F7A3FCBD48F5F7B2FCBC4C2070F4 +:10C96000BC48F5F7ADFC6070F5F76EFF70BD10B513 +:10C97000F5F795FFB64C2078F5F7C0FC6078F5F731 +:10C98000BDFCAC4C207A002803D0F5F746FD002012 +:10C99000207210BD70B5A74CA079002804D0A1A1C9 +:10C9A000AD480EF0D8FB70BDE07A002803D19DA100 +:10C9B000AA480EF0D0FB0126A6710025E572607A28 +:10C9C000042114225043964A801801749D488168BE +:10C9D000491C04D0691E81600120F5F795FF0020F5 +:10C9E000F5F792FFF5F776FF05F018FDF6F777F803 +:10C9F0009B480560056001209A49C0030860F6F76E +:10CA0000EDF891480078022804D0032804D1E0789A +:10CA1000002801D0A67000E0A570F6F74CF870BDB4 +:10CA200003467F490B20142242435218203A127FBA +:10CA3000002A04D0401E0006000EF4D170471422D4 +:10CA4000424351180A46803AD366012220390A77B8 +:10CA50007047012805D0032805D1002903D1002003 +:10CA600070470029FBD010B4724C00236370764AE3 +:10CA7000002890700CD002280AD007291AD208008A +:10CA800078440079001887441505070D0F1113002D +:10CA9000D37003E01B2000E03A20D07001206070CA +:10CAA00010BC70475820F8E77720F6E79620F4E7A7 +:10CAB000B520F2E710BC0020704710B562484078FE +:10CAC000F6F714F880B210BD411E1422504310B581 +:10CAD000534A8418203C0A2902D8207F002803D119 +:10CAE00050A161480EF037FB207F012804D0B3200D +:10CAF0004CA180000EF02FFB0020207710BD70B5F8 +:10CB00004D4C607B217B884201D1012500E000254E +:10CB1000F5F785FFF5F7EAFF617B227B914201D1B2 +:10CB2000012100E00021A942EBD170BDF7B5064616 +:10CB3000481E84468EB0C0B2142205905043384A35 +:10CB400085180495287C2D1D07282AD1334C0027F1 +:10CB5000E07D227E824221D0235C059A934201D15E +:10CB6000012701E0002F04D0162811D0421CA25C3E +:10CB7000225416280ED0401C227EC0B28242EBD135 +:10CB8000002F0BD0207E002806D0207E401E04E01F +:10CB90000022ECE70020EFE716202076049801221F +:10CBA00002746046234C0A2813D8142041431C48C1 +:10CBB00008182038007F00280BD00498007C01283A +:10CBC0000BD00498007C012803D01098807A0128AB +:10CBD00007D014A125480EF0BEFA1098807A0128DB +:10CBE0006DD104980E4B007C022843D00B4C207E64 +:10CBF000162870D0207EE17D401C884203D109A117 +:10CC00001B480EF0A8FA049901204874217E05986B +:10CC10006054207E162862D063E0000038110020A6 +:10CC2000541100207372635C72656D2E6300000006 +:10CC3000D40500005C1200201011002068120020B2 +:10CC4000201100203C1200207A00002067C3000061 +:10CC5000780000203DC800007D0200005E02000058 +:10CC600000F5004080E200E0CB0200001503000068 +:10CC700022030000607A059A0146904206D00146E0 +:10CC800014277843C018807C9042F8D1627A82429F +:10CC900008D1617A14225143C918897C617201213B +:10CCA000A17207E014224243D21814277943927CE0 +:10CCB000C9188A7414220C215043C018817410982A +:10CCC000007A06281DD201007944097949188F4459 +:10CCD0000C161412100EE07D002890D093E700206F +:10CCE00001E0207E401C2076B5E000210FE0B42159 +:10CCF0000DE073210BE0322109E00A2107E0062153 +:10CD000005E0FF20FDA1E0300EF025FA002110988B +:10CD100002910068401A28601099097A002912D0FF +:10CD20000221401A0102090A29601098026840682D +:10CD300010180002000A68601098807A0228109883 +:10CD400003D0007B71E00421EBE7007A002812D0C9 +:10CD500002220298121810984368104610301818D2 +:10CD60000A90E948029B4078984202D9E378002B68 +:10CD700003D00A9805E00422EBE7029BC31A0A9845 +:10CD80001818637A10300C2B1CD0637A14277B435D +:10CD9000DE4FDB195B68994214D0DD4F617ABC46E7 +:10CDA00014235943D94BC9184B6889689B1B891BAD +:10CDB0001B0209021B0A090A984237D8634535D875 +:10CDC000614533D831180A980123081A0002000A75 +:10CDD000286010998018C9680002000A471ACD4AD5 +:10CDE0009B05BC469F4201D2384610E00F1A9F4275 +:10CDF00001D260460BE0944503D9511A0818401C33 +:10CE000005E0974206D9101A4018401C40420028FD +:10CE10005FDC03E0B9A1C0480EF09DF929680A98CB +:10CE200008180002000A686000202872686810274D +:10CE300010300002000A68601098407AA8721098BA +:10CE4000007A687203280ED200280CD0FFF7D2FCBB +:10CE5000002803D007E0002011B0F0BD0298422165 +:10CE60000F1A32200290A8490878012801D003281F +:10CE700009D148780299884205D9E178002902D180 +:10CE80000299401AC7196B6828689B1B801B9C4637 +:10CE900001021B029E4A090A1B0A8F4219D8174633 +:10CEA000914216D8BB4214D8617A0C2915D0677A02 +:10CEB00061460C22039200921422944B7A43D218BA +:10CEC00093689B1B834216D80397977C0C2FF3D152 +:10CED00073E0059801F04CF9BDE70498022205992A +:10CEE0000274627A0C2A00D0627A82746172012024 +:10CEF000A07211B0F0BD0C2F5FD0002238469446CE +:10CF00001422824B4243D21853689B1B8B4225D27A +:10CF1000907BAB7A98421BD804980521059D01743B +:10CF20007E4C207E16280FD0207EE17D401C88425A +:10CF300003D172A17A480EF00EF9207E2554207E8E +:10CF4000162800D0CDE6CAE6E07D0028F1D0F4E74F +:10CF500001208446907C0C28D2D102E06146002951 +:10CF60002AD03D46009014202A46424367480621B5 +:10CF7000161831741C38007E1628684816D0017EB9 +:10CF8000C07D491C814203D15CA166480EF0E3F8E4 +:10CF90006248017E4554017E16290BD0017E491C52 +:10CFA0000176B57C0098A842DDD106E0C07D00285E +:10CFB000EAD0EDE70021F3E7009704990220534DF2 +:10CFC0000874607AB84207D104990098887405986B +:10CFD00060720120A07221E003980C2F0FD00C2862 +:10CFE00003D146A150480EF0B6F8039814225043DE +:10CFF0004019059981740499009888740EE00C28F2 +:10D0000003D13EA149480EF0A6F8039814225043DC +:10D0100040190599817404990C208874012011B07D +:10D02000F0BD70B50D46424A441900210B46101A56 +:10D030008B4103D231A13F480EF08DF83E48854226 +:10D0400003DD2EA13D480EF086F83D48854203DA07 +:10D050002AA13C480EF07FF83B48844205DA002CB8 +:10D0600001DB204670BD384800E03848201870BD0C +:10D07000401E70B5C0B21421484324494418607B57 +:10D08000062813D201007944097949188F44020C0B +:10D090000A080604002067E0B42010E073200EE0C8 +:10D0A00032200CE00A200AE0062008E0FF2013A14D +:10D0B000E0300EF050F8617B0020002954D00221AE +:10D0C0004018616840180002000AF5F70FFD0C25B2 +:10D0D0006557174A441900210B46101A8B4103D299 +:10D0E00006A114480EF037F81348854203DD03A16A +:10D0F00012480EF030F81248854229E07372635CE2 +:10D1000072656D2E630000007A000020541100202B +:10D11000FFFF3F00FFFFFF00130700003811002052 +:10D1200007020000C5030000DD030000E303000068 +:10D13000FF7F841EF50300000020A107F603000016 +:10D1400000E05EF8F70300000080841E00807BE1B1 +:10D1500003DAF749F7480DF0FEFFF748844207DA93 +:10D16000002C03DB204670BD0421A9E7F24800E053 +:10D17000F248201870BDF0B5064683B0F048019023 +:10D18000457A029534687068001B0702ED483F0A33 +:10D19000001B00900C2D2DD0142029464143EA4855 +:10D1A0000122081884464168E64892058646081B15 +:10D1B000904210D3631A93420DD3024670467245D3 +:10D1C00003D900984018401C05E073450ED9411A58 +:10D1D0000819401C404200280CDA60460295857C04 +:10D1E0000198C0790028D5D003B0F0BDD049D74808 +:10D1F0000DF0B1FF0298854226D014214843D24950 +:10D200000123401802908068CE499B058C46011B83 +:10D210008646994210D3221A9A420DD3634661453D +:10D2200003D900997144491C06E0194662452DD97D +:10D23000091A0819401C4142002905DD0298B17AFB +:10D24000807B814200D374460C2D15D0BE4914203A +:10D25000454368184268121B1202120ABA420BD2E6 +:10D26000B37A827B934200D38468857C0198C0792D +:10D270000028B9D10C2DEAD13068A042B4D0E01911 +:10D280000002000A3460706003B0F0BDA849AF48E6 +:10D290000DF061FFD8E7F0B5AD490446486885B0A8 +:10D2A000C005C00D1CD0103840B200280CDA0207AF +:10D2B000120F083A920892005118C9698007C00EEF +:10D2C000C1400806800F09E08108A24A8900891838 +:10D2D00009688007C00EC1400806800F002808D0EA +:10D2E00000272078002806D0012804D0002005B0AF +:10D2F000F0BD0127F5E72079062813D20100794413 +:10D30000097949188F44020C0A080604002018E025 +:10D31000B42010E073200EE032200CE00A200AE076 +:10D32000062008E0FF208249E0300DF014FF21794B +:10D330000020002905D002214618814D002F02D07F +:10D3400003E00421F8E70020E871694602AAA0681A +:10D35000F5F7D6FB694608228A56E06801A98018CD +:10D360000122C01C1F2801DA019209E003AAF5F787 +:10D37000C7FB6846007B002802D00198401C019042 +:10D3800000990198401810300002000A0190881B93 +:10D390000002000A00906079694688720098039044 +:10D3A000F5F73DFB009A019B121A181A6A491202FE +:10D3B0000002120A000A8A4216D8884214D8684627 +:10D3C000FFF7D9FE00990398814205D08819000221 +:10D3D000000AF5F78BFBA0600120E979002986D0CF +:10D3E000002FB0D005B0F0BD0020F6E7F3B58FB048 +:10D3F0005A480C460B9004F0D8FE594A0F99504FEA +:10D400005618584D203E00280BD05748007D002864 +:10D4100003D056A158480DF09EFE207801287CD0FC +:10D420005AE1687B16280CD0687B297B401C884217 +:10D4300003D14EA151480DF08EFE2078012804D072 +:10D440000CE0287B0028F4D0F7E7F07F002803D019 +:10D4500046A14B480DF07FFE0120F077697B0F98C5 +:10D460001422484E5143891908742078022822D08A +:10D47000687B142148438619207930726079707274 +:10D4800032460C323146A068F5F73AFB0C20305694 +:10D490000F2804DD1F3830733068401C30600C21C9 +:10D4A0007156301DE26801905018C01C1F283EDAEA +:10D4B00001200199F7E026494868C005C00D21D038 +:10D4C000103840B200280CDA0207120F083A92080E +:10D4D00092005118C9698007C00EC1400806800F2C +:10D4E00009E081081B4A8900891809688007C00E75 +:10D4F000C1400806800F002804D105201BA10002AE +:10D500000DF029FE687B1421484386190021E0684C +:10D510006A460691117006A900E0D3E0F5F7F0FA2B +:10D520006A46002010560F282EDD01202DE0AEE0C7 +:10D53000FCD00000F70300000080841E00807BE127 +:10D540005C120020FFFFFF005411002013070000B1 +:10D5500000ED00E000E400E0FFFF3F006812002063 +:10D560003012002010110020201100207372635C23 +:10D5700072656D2E6300000011050000EF040000CD +:10D58000F4040000500F0020002006994018079076 +:10D590000220B0722079307260797072A068311DFB +:10D5A000C01C06911F2801DA012009E0F5F7A8FA4E +:10D5B00068460078002804D0069806990068401C48 +:10D5C0000860307A062813D2010079440979491895 +:10D5D0008F44020C0A08060400200FE0B4200DE07E +:10D5E00073200BE0322009E00A2007E0062005E066 +:10D5F000FF20FE49E0300DF0AEFD0020217900292A +:10D6000043D002214018069071681030081807991D +:10D61000089009180698081A0C900020F871F5F780 +:10D62000FEF904463060079820180002000AF060F6 +:10D63000787A0C2825D0797A14204143EC480818D0 +:10D6400040680899029040180002000A0390707A1E +:10D650006946887402A8FFF78EFD0299039A091B98 +:10D66000121B09021202E34B090A120A0C98994292 +:10D6700007D8824205D80299069808180002000AC5 +:10D680003060F8790028C8D110E00421BAE704AA74 +:10D690000199F5F735FA6846007C002804D0019816 +:10D6A00001990068401C08602078B072687B1628D9 +:10D6B00006D0687B401C68730B9804F08EFD47E031 +:10D6C0000020F8E7F07F002804D0A320CAA1C00002 +:10D6D0000DF041FD0120F077CA490F9808742078B9 +:10D6E000022803D1C4A1C8480DF035FDC54E2079EC +:10D6F00030726079707232460C323146A068F5F7AC +:10D70000FFF90C2030560F2804DD1F3830733068C5 +:10D71000401C30600C22B256301DE1680190881820 +:10D72000C01C1F2802DA012001990BE003AA01990D +:10D73000F5F7E6F96846007B002804D001980199C6 +:10D740000068401C08602078B072AE49012008755E +:10D75000687B297B884224D07C7A0C2C23D0F5F777 +:10D760005EF914214C43A24961180A7C042A18D09E +:10D770000A7C032A15D04B6889681B1A081A1B02F9 +:10D7800000029C4A1B0A000A102B0AD3114693423E +:10D7900007D8884205D8687B297B884201D0F5F7F5 +:10D7A0008AF911B0F0BD687B297B8842F7D111B0AE +:10D7B000F0BD10B50020F5F794F810BD10B50120AC +:10D7C000F5F78FF810BD914800787047F1B50098D3 +:10D7D00002281ED08E4C607A0C2803D186A18D4879 +:10D7E0000DF0B9FC0026A6710125E572607A0321CF +:10D7F00014227F4F5043C0190174F5F761F9009866 +:10D8000000280BD001282AD003287AD07AA1824898 +:10D8100045E07E480078F4F777FDF8BD7F48007F4B +:10D82000002804D02B2074A140010DF094FC6571F8 +:10D830007A4D00202E60F5F767F8A968481C04D0DF +:10D84000012300221846F5F795F8607A617A401CAA +:10D85000C0B2142251437A5801219047F8BD0120EB +:10D86000F5F752F8607900280DD06C488068401CAC +:10D8700009D0607A617A401CC0B2142251437A58B0 +:10D8800006219047F8BD6548007F01280AD002288C +:10D8900012D0032822D0042834D057A160480DF0BC +:10D8A0005AFCF8BD2079002803D02671F5F70DF950 +:10D8B000E5705A480677F8BD207A002802D1F4F7BF +:10D8C00083FD2572607A617A401CC0B214225143F4 +:10D8D0007A580021904751480677F8BD4F4F0123F1 +:10D8E000397B78680022411A1846F5F743F8207909 +:10D8F000002803D02671F5F7E8F8E57002203877A4 +:10D90000F8BD19E0454E217870680123411A0022C4 +:10D910001846F5F72FF8207A002802D1F4F754FDC5 +:10D920002572607A617A401CC0B2142251437A5841 +:10D93000002190473577F8BD607A617A401CC0B20B +:10D94000142251437A5805219047F8BD10B5304C48 +:10D95000607A0C2803D128A132480DF0FCFB607AD4 +:10D96000617A401CC0B214225143214A525804210A +:10D97000904710BDF0B583B00C200290F5F74FF83A +:10D98000234C0090617A284801900C2920D0617ABC +:10D990001420414316480918097C042918D0617ADB +:10D9A000142251430818007C032879D0019900986B +:10D9B0000B6849681B1A081A1B0200020D4A1B0A51 +:10D9C000000A102B6CD31146934269D8884267D85D +:10D9D00012488068401C03D007A114480DF0BBFB1F +:10D9E00000206071607A0C282AD121E0FCD0000070 +:10D9F00054110020FFFF3F007372635C72656D2E4F +:10DA000063000000201100201E05000078000020A7 +:10DA10005C12002054050000A70500003C12002005 +:10DA20009B050000AE0500004C120020EA05000036 +:10DA30006078002804D0FE48C17841708178017078 +:10DA4000607A0C2815D0607A1421FA4A484380186D +:10DA5000007C04280DD1607A0290607A01211423A1 +:10DA6000584380180174607A58438018807C607233 +:10DA7000A172F14D687B297BF04F884233D0F04E84 +:10DA8000287B142148438019007CC05D0128287B35 +:10DA900007D048438019007CC05D02282FD044E0A5 +:10DAA000FCE1142148438019807A01280AD0287BA0 +:10DAB0000221142250438019007CC155287B16286E +:10DAC00008D009E0287B0021142250438019007CF3 +:10DAD000C1552AE0002001E0287B401C2873687BA8 +:10DAE000297B8842CCD1D74D287D00284DD0287C79 +:10DAF000C15D012928D0C05D022830D03BE0287BE1 +:10DB0000142148438019807A012803D0CEA1D1483E +:10DB10000DF021FB297B00201422514389198872C2 +:10DB2000297B51438919097CC855287B1421484316 +:10DB30008219287B48438019017C0098FEF7F6FF84 +:10DB4000287B1628C8D1C5E7A97A012904D002216B +:10DB5000C155002028750EE00021C1550BE0A87AC0 +:10DB6000012804D0C520B8A1C0000DF0F4FA0020AF +:10DB7000A872297CC855287D002806D0297CB14A86 +:10DB80000098FEF7D3FF0020287502980C281ED0BD +:10DB900014214843A7494018017C012917D10721C6 +:10DBA0000174AD4D287E16283CD0287EE97D401CAE +:10DBB000884203D1A4A1A9480DF0CDFA297E02988C +:10DBC0006854287E162831D0287E401C2876607A3A +:10DBD0000C287DD0A07A00287BD00020A072617A2A +:10DBE0001420414393480E189D49B56873680A464E +:10DBF000F6687C32CB67966055609A4D697E002945 +:10DC000016D00226617A14228A4851430818407BB4 +:10DC100006281BD201007944097949188F440A1457 +:10DC200012100E0CE87D0028C4D0C7E70020CDE715 +:10DC30000426E7E700210FE0B4210DE073210BE09B +:10DC4000322109E00A2107E0062105E0FF2086498C +:10DC5000E0300DF080FA00212973687E022801D09F +:10DC6000012810D12869009A4018821A1202120A5B +:10DC7000422A08D93238032100026976000A286155 +:10DC80003220287308E0322906D2207A00280AD1EF +:10DC9000F4F79AFB012005E0207A002803D0F4F77E +:10DCA000BCFB00202072624910224878207009785D +:10DCB000012901D0032906D101212171297B884244 +:10DCC00001D9421A1032A378002B00D0921C01E037 +:10DCD0008DE09BE02179002901D1002B5DD0944695 +:10DCE000624A00990092019A176852687F1A511A85 +:10DCF0003F0209023F0A090ABC451BD85B4A97420A +:10DD000018D8009A914215D8297B884223D92B69CB +:10DD1000421A9A1A1202120A101880190002000AF6 +:10DD20002A616860002914D0032028770006000EBD +:10DD30003ED14CE000202071A070297B002925D025 +:10DD40002869401880190002000A686002202877BC +:10DD50002EE00120E9E781420BD92A69511889197F +:10DD60000902090A6960002801D00420DDE70220C9 +:10DD7000DBE7002B03D134A13D480DF0ECF9286915 +:10DD800080190002000A6860002004E029698919EE +:10DD90000902090A6960287719E0287B00280FD05A +:10DDA0002969081880190002000A68600220287793 +:10DDB00028690123811900221846F4F7DBFD09E0E8 +:10DDC000286980190002000A686000202877012075 +:10DDD000F4F79AFD607A1421484316490C22401842 +:10DDE0008256012300206968F4F7C4FD0EE001208B +:10DDF000F4F78AFD0020F4F787FDF4F76BFD207A35 +:10DE0000002803D0F4F709FB00202072A078002836 +:10DE100004D0F4F75AFE0020E070A070607800286B +:10DE200004D00348C178417081780170207921E0E5 +:10DE30007A00002054110020101100202F12002021 +:10DE4000500F0020201100207372635C72656D2EEC +:10DE5000630000000C060000381100203A060000A4 +:10DE6000D01100203C120020FCD00000FFFF3F003A +:10DE70008C060000002806D00020CF49E070097809 +:10DE8000002900D12071CD48017EC07D814203D0A0 +:10DE9000CB484078F4F738FA0120E07103B0F0BDC8 +:10DEA000F0B5C84C0746607A83B00C2803D1C6A1F0 +:10DEB000C8480DF050F9607A1421C74E48438019C4 +:10DEC000007C032804D06F20BFA100010DF043F9AE +:10DED000C24DA868401C03D0BBA1C1480DF03BF95E +:10DEE000607A1421484381190C20085600216A46A3 +:10DEF00000911171C01901AA6946F4F701FE6A4642 +:10DF0000042010560F2801DD012000E000200099B8 +:10DF10004018696840180102090AA9606079002860 +:10DF200004D0012300221846F4F724FD03B0F0BD0D +:10DF300070B5AD4CAB4A0B1AA34214D3451AA54297 +:10DF400011D3934203D9101A43185B1C0BE095427E +:10DF500004D9511A0818401C434204E0A349A448BC +:10DF60000DF0F9F80023184670BD10B501460123E5 +:10DF700000220220F4F7FEFC10BD10B50220F4F7D9 +:10DF8000C3FC10BD10B5F4F74AFD10BDF0B58D4DC2 +:10DF90000446E87A83B0002803D18BA195480DF0A0 +:10DFA000DAF8642C4DD3944900200246091B8241C3 +:10DFB00047D39248417B007B814242D19048007D0B +:10DFC00000283ED1687A1421834F4843834EC519F7 +:10DFD000306801AA00196946F4F792FD69460420E9 +:10DFE0000856002802DD0098401C0090A96800989F +:10DFF0006B680A18D21A1202824B120A9A4220D86F +:10E00000AA7C0C2A08D014235A43D2195268511AF8 +:10E010000902090A814214D3B068401C05D00120CE +:10E02000F4F772FC0020C043B06030680019306023 +:10E03000A868009940180002000A7061012003B02E +:10E04000F0BD002003B0F0BDF8B50646401EC5B2D5 +:10E050001420614968434418207C002803D15AA148 +:10E0600069480DF078F86548017B407B81420CD00F +:10E07000664A14234B439B181B7CB3420CD01629D1 +:10E080000CD0491CC9B28142F3D15D48017D002901 +:10E0900064D0007CB04261D10020F8BD0021F1E7DE +:10E0A000217C052905D0217C062902D0217C072965 +:10E0B00028D101212174C17D0023027E8A4221D012 +:10E0C0000246565CAE4201D1012301E0002B04D090 +:10E0D000162911D04E1C965D565416290ED0491C97 +:10E0E000167EC9B28E42ECD1002B0BD0117E0029D6 +:10E0F00006D0117E491E04E00026ECE70021EFE780 +:10E1000016211176617C00292AD06774C17D002315 +:10E11000027E8A4224D0425CAA4201D1012301E05E +:10E12000002B04D0162912D04A1C825C42541629B6 +:10E130000FD0491C027EC9B28A42ECD1002B0FD00D +:10E14000027E0146002A06D00A7E521E04E000220A +:10E15000EBE70021EEE716220A7601E017480027D8 +:10E16000217C01299CD1617C002999D10120F8BD35 +:10E1700070B505461420184A0521684380180174BB +:10E180000E4C207E162811D0207EE17D401C884256 +:10E1900003D116491E480CF0DEFF207E2554207E58 +:10E1A000162807D0207E401C207670BDE07D002818 +:10E1B000EFD0F2E70020F7E77A00002038110020C6 +:10E1C000780000205C1200207372635C72656D2E13 +:10E1D00063000000EF060000541100203C120020F4 +:10E1E000F1060000FF7F841E0020A107FCD0000084 +:10E1F0001307000032070000FF1FA10710110020C5 +:10E2000020110020FFFF3F006F070000500F00208B +:10E210000702000010B509F063FC042803D009F0E0 +:10E220005FFC052803D106F0D1FE00280BD104F0D5 +:10E2300007F9032803D004F009F9032805D109F0F0 +:10E24000B0FD002801D0012010BD002010BDF0B5A8 +:10E2500085B00746002668460D4606726946384670 +:10E2600005F05CFA00287DD16846007800280BD0C4 +:10E2700009F009FDB84275D00022294638460AF057 +:10E28000CCFE00283ED120E006F077FCB842F2D068 +:10E2900000222946384608F01DF900287DD1019C4E +:10E2A0009020005D2834002804D1607E002801D031 +:10E2B000012000E000200490204660300390807828 +:10E2C00006F08AFB002804D008E0019C2834607E18 +:10E2D000F1E7FF20FDA1DA300CF03DFF20462030B1 +:10E2E000417B00290FD0817B89070CD56E700121FD +:10E2F0002970AE70AF80C17BA971218E2981618E9A +:10E300006981467349E0039802A9807806F030FAE3 +:10E31000002804D1FF20EDA1EE300CF01CFF684670 +:10E32000007A002809D06E700D202870AF806846F2 +:10E33000007AE8800120A8702FE0049800282FD0F0 +:10E3400006F0B5FB00282BD068460078002806D1DF +:10E3500001988030406A4188B94200D10670039824 +:10E36000807800E01CE006F0CAF8002803D1D7A1AD +:10E37000DA480CF0F0FE6E700A202870AE70AF80A4 +:10E38000A07EA8716676684605F07EFA002804D063 +:10E39000D248CEA10E300CF0DEFE012005B0F0BD5B +:10E3A0000020FBE77CB5CEA103C9CF4D002401912D +:10E3B0000090AC7001F067FD2946EC7004204039F4 +:10E3C000088710204887C81DC84AF9304280047168 +:10E3D000C280E03844740C7084730475C0300477D4 +:10E3E0001D300522694604460CF02BFD28462146C7 +:10E3F000BC3008F0F7F97CBDF8B5BD4C0D46606047 +:10E40000217006F057F805F0D1F8FFF7CBFF207820 +:10E4100009F03AF9B4498431084681380F46064676 +:10E4200006F08CFC606808F0D8F8284604F06EFC12 +:10E430003946304609F057FC60680AF08AFE01F060 +:10E4400022FDA9480021C170F8BDFEB50E461D464B +:10E45000144601A905F062F9002839D102988030EC +:10E46000807A06F079F800280CD0684606F087F824 +:10E47000002806D0002C03D006F01DF8A04206D2DA +:10E480000020FEBD91A19B480CF065FEF8E70098C6 +:10E4900005F0AAFB3146009805F0ABFBE2B2294635 +:10E4A000009805F063FD06F08FF8002804D191482C +:10E4B00086A11E300CF04FFE68460079012807D176 +:10E4C00001A801F0E7FC8A48002180688030418281 +:10E4D0000120FEBD30B40179002904D0012907D004 +:10E4E00030BC00207047831D42880488022103E06D +:10E4F00042880488831D0121204630BCA5E7FFB572 +:10E50000794C85B00E460746C0346088694608805D +:10E51000154602A905F002F9002811D0002168462D +:10E5200005F059F9002823D1684602A9008805F0B2 +:10E53000F5F8002804D06F4864A13C300CF00BFEC5 +:10E5400068460088388068460088608066480021F8 +:10E55000C23005F040F9002802D00020C04360809E +:10E5600003988030807A06F037FA002803D007E05D +:10E57000002009B0F0BD5F4854A156300CF0EBFD0F +:10E5800004A806F03CFA0028F3D0049805F068FBD4 +:10E590003070022807D0012805D056484BA17230B0 +:10E5A0000CF0D9FDE4E70899049805F0F6FC288002 +:10E5B000002804D14F4845A165300CF0CCFD06F091 +:10E5C00045FA002804D1E92040A180000CF0C3FDE9 +:10E5D0000120CEE73EB50446831D02AA694601A884 +:10E5E000FFF78DFF002813D068468088208068469A +:10E5F000008960800020607168460078012808D09A +:10E60000022806D03B4831A192380CF0A4FD01202D +:10E610003EBD2071FBE7FEB5040004D135482BA1B7 +:10E620007E380CF098FD304D0026203D687C002897 +:10E6300008D0667010202070A87CA070E87CE07084 +:10E640006E7430E0284F403F3878002808D02C22E4 +:10E65000B91C20460CF0F5FB0E2020703E7022E025 +:10E66000A87B002809D00120E070E87BA070287CFE +:10E6700060700F202070AE7315E01B480221C63079 +:10E68000029005F0A8F8002871D1174FC037F8881C +:10E690000190F888042808D0052831D02146FFF7DA +:10E6A000D6FD002859D00120FEBD0021204606F0ED +:10E6B00019FA0028F7D1287D00284ED06670132063 +:10E6C00020701C21A01C0CF019FC15E07372635C17 +:10E6D0006C6C5F6374726C2E630000000D020000AE +:10E6E000FFFFFFFF1F000000AC120020FFFF000033 +:10E6F00080000020390300000220A0702E75D2E7B0 +:10E700000021204609F098FA002826D02078132806 +:10E71000C9D1A0783C28C6D1A088694604F07CFF06 +:10E72000002803D0FD49FE480CF015FD009880300C +:10E73000807A05F0E4FE002804D1F948F749001D6D +:10E740000CF009FD009804F09FFF0028ABD0F448BE +:10E75000F24908300CF0FFFCA5E70221029805F011 +:10E760003AF8002803D1F9880198814291D100201C +:10E77000FEBD50E710B508F011FF002804D0E848AE +:10E78000E649BE300CF0E7FC07F01FFF06F09AFAEE +:10E7900004F07AFA002804D07920E049C0000CF097 +:10E7A000DAFC0AF0CEFC002804D03D20DB49000151 +:10E7B0000CF0D1FC09F070FA002804D0F520D749FC +:10E7C00080000CF0C8FCFFF7EDFD04F0ABFE002864 +:10E7D00004D0F720D14980000CF0BDFC05F01CFEF0 +:10E7E00001F051FBCF480021C17040380171012177 +:10E7F00041710222C270017010BD10B5C94C403C7D +:10E800002078002804D00A210E2001F002FB10BD60 +:10E81000FFF700FD002801D00C2002E001F033FBDF +:10E8200000202071012060710A21E170207010BD6C +:10E8300070B5BC4C0646403C2078002804D03A21F4 +:10E840000E2001F0E6FA70BDFFF7E4FC002801D0CD +:10E850000C2010E0B34DE87808280BD20001001915 +:10E8600010223146443001F0DEFAE878401CE870AE +:10E87000002000E007202071012060713A21E17042 +:10E88000207070BD70B5A74C0646403C207800282B +:10E8900004D00B210E2001F0BCFA70BD30780028A6 +:10E8A00003D0012801D0122015E09E4D8035287933 +:10E8B000082817D2FFF7AEFC002801D00C200AE090 +:10E8C000984833782979721C883001F098FB2879B0 +:10E8D000401C287100202071012060710B21E17023 +:10E8E000207070BD0720F6E710B58E4C403C2078B4 +:10E8F000002804D039210E2001F08BFA10BDFFF75B +:10E9000089FC002801D00C2002E086490020C87054 +:10E910002071012060713921E170207010BD8148A3 +:10E9200010B540380178002904D00F210E2001F0E5 +:10E9300070FA10BD002101710E2181700F21C1708C +:10E94000FF2181710021C9430181774949680A7813 +:10E9500082728A8882814988C18101214171017056 +:10E9600010BD704910B540390A78002A04D03C2106 +:10E970000E2001F04EFA10BD6A4A0088C032508065 +:10E980000120107100220A7148713C22CA7008707F +:10E9900010BD10B5634C403C2078002804D02B21DA +:10E9A0000E2001F036FA10BD0821A01DFDF7BCFBBA +:10E9B00000202071012060712B21E170207010BDBA +:10E9C00010B5584C403C2078002804D005210E207A +:10E9D00001F01FFA10BD05F06EFDE08005F0C6FEE7 +:10E9E000207200202071012060710521E1702070EB +:10E9F00010BD10B54B4C403C2178002904D031218A +:10EA00000E2001F006FA10BD00214156042911D054 +:10EA100000290FD0081D0DD0001D0BD0001D09D0FE +:10EA2000001D07D0001D05D00A3003D00A3001D0E8 +:10EA3000122003E0084601F033FB00202071312052 +:10EA4000E07001206071207010BD30B5354D044676 +:10EA5000403D28788DB0002805D02A210E2001F0F5 +:10EA6000D8F90DB030BD10222146684601F0DBF91F +:10EA70001022A11804A801F0D6F9684603F00BFC97 +:10EA800010222C46A81D08A901F0CDF90020207104 +:10EA90000E20A0702A20E070012060712070E0E755 +:10EAA000F0B5204C85B0403C2078002804D03B21B4 +:10EAB0000E2001F0AEF971E40020A07119486946FA +:10EAC000C0304088888002A904F028FE002805D0C4 +:10EAD000002101A804F07FFE002865D16846114D91 +:10EAE00081880180283D684602A9008804F016FE4E +:10EAF000002803D009490D480CF02DFB039E04A902 +:10EB000037468837B878283605F04BFE002804D100 +:10EB100006480249401D0CF01EFB09E0CCE600004F +:10EB2000FF020000AC12002080000020140500004D +:10EB3000767EB87805F050FF002803D1FB49FC48E9 +:10EB40000CF009FB05F0B3FF0121484031460143B9 +:10EB50001FD06A461188A279FD2352001219118133 +:10EB6000A2794000515D4908490031435155A279CD +:10EB70001940014351556A46107C002802D00420F8 +:10EB8000014301E0FB200140A0794155A079401CE0 +:10EB9000A0710021684604F01EFE002804D16846DA +:10EBA0000188808881429ED10020207101206071FF +:10EBB0003B21E17020707EE770B5DE4C0546207881 +:10EBC000002804D034210E2001F023F970BD08F094 +:10EBD00087FF052804D0284608F03FFD002000E00C +:10EBE0000C202071012060713421E170207070BD13 +:10EBF00010B5D04C2078002804D00E21084601F032 +:10EC000008F910BD0622CC49A01D0CF01AF900200D +:10EC10002071012060710E21E170207010BD70B56F +:10EC2000C44C06462078251D002804D032210E2031 +:10EC300001F0EFF870BD3146002009F032F928707C +:10EC400000280CD100213246084606F080F92870D1 +:10EC5000002804D106223146B7480CF0F2F8012012 +:10EC600060713221E170207070BD70B5B14C054605 +:10EC70002078002804D030210E2001F0CAF870BDA1 +:10EC800008F073FD002803D104F0DEFA00280DD04F +:10EC9000287804F08AF8287806F0C0F9002020715E +:10ECA000012060713021E170207070BD0C20F6E70A +:10ECB000F8B5A04C06462078251D002804D0172161 +:10ECC0000E2001F0A6F8F8BD3146012009F0E9F860 +:10ECD0000127287000280FD13246012106F037F9AC +:10ECE0002870002808D19348062231463C300CF0A9 +:10ECF000A8F890484030877067711720E07027703F +:10ED0000F8BDFEB58B4C05462034A07B002804D00E +:10ED100028210F2001F07DF8FEBDA8781A2824D004 +:10ED20000EDC03000CF038FB16333333333321335E +:10ED300033333333333333333333333321212133D9 +:10ED40002A2824D00ADC1E3803000CF025FB0C20F6 +:10ED5000202020202020202020200E203A380300D0 +:10ED60000CF01AFB04150315031528887349884213 +:10ED70000DD81F21E173282121740120A073288858 +:10ED8000694604F0CBFC002803D0022014E01220D6 +:10ED900012E068460078019F00280FD0C637019E18 +:10EDA00000280DD0C736684601F05CF8002802D074 +:10EDB0003878002806D00C20E073FEBD9C37EEE7C3 +:10EDC0009D36F0E701203870A87830700020E0739D +:10EDD000684601F05FF8FEBDF0B5564C0746207856 +:10EDE00085B0002804D025210E2001F012F862E63B +:10EDF000388802A904F092FC4E4E00210836002803 +:10EE00000CD00220207131603171E1800E20A070A1 +:10EE10002520E0700120607120704CE6039D28469B +:10EE20000A30483501900020A87505223046019926 +:10EE30000CF007F8A87D0028F5D13888E080E5E7D8 +:10EE4000FEB53C4C06462034A07B002804D010219F +:10EE50000F2000F0DEFFFEBD1F20E07310202074A5 +:10EE60000127A7733088694604F058FC002810D1A8 +:10EE7000684600F0F7FF00280BD06846019D007837 +:10EE800028350028019806D0CA300178002909D118 +:10EE900004E0022007E08030406AF6E72035697B15 +:10EEA000002902D03A20E073FEBDA97B89070DD16D +:10EEB0000621017068460078002804D10198318845 +:10EEC0008030406A4180684600F0E4FF0020E07333 +:10EED0006F73FEBD70B5174D04462878002804D026 +:10EEE00038210E2000F095FF70BD1F2028710120F1 +:10EEF00068713821E97028702078002808D001282E +:10EF000006D0022804D0032802D01220287170BD38 +:10EF1000002606F051F8207807F061FC207808F010 +:10EF2000E6FF20780AF0ABFA2E7170BDCCE6000047 +:10EF30001F0500006C1200208C000020FF0E000056 +:10EF4000F8B5FE4D06462878002804D01D210E2075 +:10EF500000F05FFFF8BD1F202871012068711D219E +:10EF6000E970287008F0BCFD0C27042857D005284C +:10EF700055D0B0791224012801D000281DD1307855 +:10EF8000002801D0012818D1F079002801D00128EB +:10EF900013D17088EA49021F30248A420DD2B28808 +:10EFA000121F8A4209D22887B0886887B079002466 +:10EFB000012804D000280CD016E02C71F8BDDF48E1 +:10EFC0004030807800282AD0DC4A3C3201210846B3 +:10EFD00002E0DC4A0021012005F0B9FF040003D063 +:10EFE000D949DA480CF0B7F8F079012801D00028A7 +:10EFF00002D105F0C8FF0446002C01D01F2011E00B +:10F000003078012802D0002803D00AE00021022035 +:10F0100001E00021012005F0C6FF002801D02F717A +:10F02000F8BD00202871F8BD70B5C44C21780029C6 +:10F0300004D01E210E2000F0ECFE76E71F21217186 +:10F04000012161711E22E270217002781221012AD1 +:10F0500001D0002A04D14078002803D0012801D033 +:10F06000217162E700260C25012A09D008F038FD3D +:10F07000052803D008F042FA002806D0257154E78D +:10F08000618F208F08F083FBF6E726714DE7F0B51E +:10F09000AD490446143103C987B0A84D0591203508 +:10F0A0000490A87B002805D021210F2000F0B1FE9C +:10F0B00007B0F0BD1F20E873212028740126AE732D +:10F0C00022889F4B111F3020994243D261880F1F25 +:10F0D0009F42FAD291423DD8E2899D4B911F9942BD +:10F0E000F3D2218A8F1F9F42EFD28A42F3D8628ADD +:10F0F000FF23F4339A42EED8A28A954F13460A3B77 +:10F100003F1FBB42E1D2C9088A4223D9E18A228B40 +:10F110009142E0D821791220002902D0012919D189 +:10F1200002E061790029F9D1217B002901D0012970 +:10F13000F5D108F0D5FC05280BD008F0D1FC042847 +:10F1400007D0287D002804D105F017FD81498842A9 +:10F1500001D00C20BDE0684604F0AEFA002801D0D2 +:10F160000920B6E001220321009804F0E6FF009F89 +:10F17000042178880F3703903846FCF7D5FF3846CE +:10F18000039905F0C2F874A0009F0068069003215F +:10F1900006A81337FCF751FF002006A90A5C3A5471 +:10F1A000401CC0B20328F9D30098218A8180618A6B +:10F1B000C180A18A01810146002720318F73CF735E +:10F1C0006179002902D0012903D101E0C77600E06E +:10F1D000C6760622A11D1C300BF033FE00980522D6 +:10F1E00004A90A300BF02DFE0098A0300673694682 +:10F1F0000F71012101A8FCF720FF6946087941073A +:10F20000C206490F920F80068918C00F0818694678 +:10F210000871401D009B0928987601D20830987625 +:10F2200001220021184604F088FF00988A3005F07A +:10F2300044F9002804D145484349FC300BF08BFFCA +:10F24000207B002806D0012808D03F4943480BF016 +:10F2500082FF40E000213B4A012008E0374840306F +:10F26000807800280FD0354A01213C32084605F04D +:10F270006EFE00282FD000988030807A05F03FF98C +:10F28000002816D01AE000988030807A05F037F90F +:10F29000002804D131482C490D380BF05CFF009850 +:10F2A00004F0DAFA002800D153E72C48264909383F +:10F2B00041E02A482449C01D0BF04DFF009804F09E +:10F2C000CBFA002804D025481F490B300BF043FF30 +:10F2D0001F20E873ECE62079012801D0002803D133 +:10F2E00005F051FE00280CD10320009905F05BFECB +:10F2F000002806D162882188009808F0F5F90028D6 +:10F3000007D000988030807A05F0F9F8002805D001 +:10F3100009E00098A0300770EF73C9E60F480A496A +:10F3200031300BF018FF009804F096FA0028BBD09B +:10F330000A48054935300BF00EFF0AE76C12002031 +:10F34000FD3F00008C000020CCE600000607000016 +:10F350007B0C0000FFFF0000112233001C0800009E +:10F3600038B5F94C2078002804D022210E2000F076 +:10F3700050FD38BD1F202071012565712220E070ED +:10F38000257008F0ADFB052802D00C20207138BD97 +:10F3900000202071684608F059FA0028F7D100983B +:10F3A0008030807A05F0ABF8002803D1E749E848BF +:10F3B0000BF0D1FE009804F04FFA002804D0E44886 +:10F3C000E249001D0BF0C7FEDF4820300575E1481B +:10F3D0000078F2F799FF38BDF8B5DB4D04462035CB +:10F3E000A87B002804D023210F2000F012FDF8BDD7 +:10F3F0001F20E873232028740120A8736288D64B4D +:10F40000911F302099424CD2A1888E1F9E4248D233 +:10F410008A4246D8E288FF23F4339A4241D82289AF +:10F42000CD4E13460A3B361FB3423AD2C9088A4230 +:10F4300037D96189A289914233D80026208869464C +:10F4400004F05EF9022700280BD1009800F0F8FCC8 +:10F45000002806D000988030416A0A78002A06D138 +:10F4600001E0EF73F8BD826B1278002A01D03A20D8 +:10F4700017E005228A71416A0E81426AA188518192 +:10F48000426AE1889181426A2189D181406A018979 +:10F490004289914204D88179082901D8914202D346 +:10F4A0001220E873F8BD2188418000988030406ABE +:10F4B0000770EE73F8BDFEB5A34C06462078002811 +:10F4C00004D024210E2000F0A4FCFEBD01256571AE +:10F4D0002420E0702570304604F039FF002801D068 +:10F4E000002000E0122020710028EED1964F052266 +:10F4F000E03738463D7731461D300BF0A2FC002640 +:10F500003E77701E69460880684604F031F900288D +:10F5100019D168460788684601A9008804F0F0F808 +:10F52000002804D08A4889498F300BF014FE0198D6 +:10F53000A0300573684604F01BF9002803D1684623 +:10F5400000888742E7D12671FEBD38B57E4C05465E +:10F550002034A07B002804D026210F2000F059FC85 +:10F5600038BD1F20E073262020740120A073288856 +:10F57000694604F0C5F800280BD1009800F060FC43 +:10F58000002806D000988030416A0A78002A06D107 +:10F5900001E002200DE0806B0078002801D03A20C5 +:10F5A00007E007200870009829888030406A418071 +:10F5B0000020E07338BD10B5634C2078002804D0DB +:10F5C00006210E2000F025FC10BD002020710E2029 +:10F5D000A0700620E0700821A01D0BF08FFCA1791F +:10F5E00001200143A1716071207010BD38B5564CE7 +:10F5F00005462034A07B002804D02C210F2000F0E9 +:10F6000008FC38BD1F20E0732C2020740120A0735B +:10F610002888694604F074F800280CD1009800F09E +:10F620000FFC002807D00098014680314B6A1A78F9 +:10F63000002A06D101E0022025E0896B0978002923 +:10F6400001D03A201FE04030007F00281DD0082262 +:10F65000A91C181D0BF0F5FB00986A898030416ADF +:10F660008A81406A294610220C310E300BF0E9FBEA +:10F67000009803218030406A01700098298880300A +:10F68000406A41800020E07338BD0C20FBE770B574 +:10F690002D4E044630780C25002804D018210E2069 +:10F6A00000F0B7FB41E402F0CBFE032865D002F086 +:10F6B000CDFE032861D06079002801D001282DD12A +:10F6C000A079002801D0012828D1A07B002805D0EE +:10F6D000012803D0022801D003281FD1607B002815 +:10F6E0001CD0C0081AD1628801208003824202D84F +:10F6F0002188814203D9207901280FD119E020798E +:10F70000002806D0012814D0022805D0032805D1EE +:10F7100002E0202A0BD30CE0A0290AD22079042889 +:10F7200005D12088202802D36188884201D912257A +:10F7300023E00548217920308175607900280DD0BB +:10F7400001280FD019E000006C120020CCE6000068 +:10F750007F080000800000207B0C0000FA4A002196 +:10F76000204607E0F9488078002806D0F74A0121B2 +:10F77000121F204608F01BFB0546012035717071F1 +:10F780001821F170307058E410B5F04C403C2178ED +:10F79000002904D01A210E2000F03BFB10BD017897 +:10F7A0001F2902D91220207106E000212171027860 +:10F7B000411C104608F09EFB012060711A21E17087 +:10F7C000207010BD10B5E14C403C2178002904D0D8 +:10F7D00020210E2000F01DFB10BD01781F2902D949 +:10F7E0001220207106E0002121710278411C104690 +:10F7F00008F06FFB012060712021E170207010BDC6 +:10F80000F8B5D24C403C2178002904D01B210E20B1 +:10F8100000F0FFFAF8BD012666710C212171007815 +:10F820000025012804D000285CD01220207188E037 +:10F8300002F006FE002835D102F008FE002831D182 +:10F8400008F021FAC24988422CD108F07AFA00283F +:10F8500077D0684603F0C6FEBB4A00990C3A916027 +:10F86000002803D0BB49BC480BF075FC01220321E2 +:10F87000009804F008FC009808F0CDFB00988A304E +:10F8800004F01BFE002804D1B348B24908300BF045 +:10F8900062FC009803F08CFA002851D0AE48AD49C4 +:10F8A0000C301CE002F0CCFD02284AD102F0CEFD63 +:10F8B000002846D1A5482038807D002841D0012865 +:10F8C0003FD004283DD008F03CFA002839D0002071 +:10F8D00003F06EFA002833D09F489E4924300BF085 +:10F8E0003AFC2DE002F0ACFD032804D002F0AEFD9E +:10F8F000032820D025E002F0A6FD0090002003F0B0 +:10F900004FF900281DD1257100988030807A04F0CD +:10F91000F6FD002804D190488E493E300BF01BFCC8 +:10F92000009803F0B1FE00280BD08B488949423083 +:10F930000BF011FC05E0002003F032F9002800D1A3 +:10F9400025711B20E0702670F8BD38B57F4C054648 +:10F95000403C2078002804D02D210E2000F059FAD8 +:10F9600038BD2888694603F057FE002801D00220E0 +:10F970000FE00098CA21095C002909D13321095CF4 +:10F980000F2901D0102903D1FC21095C00290BD0DB +:10F990000C2020710E20A0702D20E0702888E080BF +:10F9A00001206071207038BD1022A91CD8300BF0E6 +:10F9B00048FA00980421C03081720020E9E738B588 +:10F9C000624C0546403C2078002804D02E210E20B1 +:10F9D00000F01FFA38BD2888694603F01DFE002894 +:10F9E00001D002200CE000980146C030827A002A43 +:10F9F00005D12031C97C0F290DD010290BD00C2046 +:10FA000020710E20A0702E20E0702888E080012058 +:10FA10006071207038BD052181720020F0E77CB54F +:10FA20004A4C0546403C2078002804D037210E205F +:10FA300000F0EFF97CBD2888694603F06FFE0028CE +:10FA400007D002202071012060713721E170207001 +:10FA50007CBD01987F22014628300272427200224A +:10FA60008272A87822318870E878C8702879087185 +:10FA70002271E8E71CB5354C403C2178002904D0C0 +:10FA800013210E2000F0C5F91CBD0088694603F063 +:10FA900045FE002801D0022006E001982421095CDF +:10FAA000801C012902D00C20207107E0002201995E +:10FAB00022712831097A21720088E080012060716A +:10FAC0001321E1700E21A17020701CBDF8B51F4CF0 +:10FAD0000546403C2078002804D035210E2000F057 +:10FAE00098F9F8BDA878002801D0012804D1A88889 +:10FAF000FF21F531884201D91220207128886946FA +:10FB000003F08AFD0126002806D0022020716671CC +:10FB10003520E0702670F8BD009800270246C030FE +:10FB20000770AB8801464380104680300677AA787C +:10FB3000012A00D000220A70407F002801D003F083 +:10FB400027FA2771E3E700008C000020AC120020A8 +:10FB5000FFFF0000CCE600002D0A0000F8B5D44EEF +:10FB600004463078002804D03D210E2000F051F9E1 +:10FB7000F8BD2088694603F04FFD002801D002201F +:10FB800027E0009F6488FD883A896800B988401C96 +:10FB9000844217D3C7484143800050430BF0BAF961 +:10FBA000401EFF2180B2F531884200D908468442C8 +:10FBB00000D22046691C401C0BF0ACF96D1C684358 +:10FBC000401E85B2E820C05D002800D17D84F5800C +:10FBD00000203071012070713D21F1703070F8BD4E +:10FBE00070B5B34C05462078002804D033210E2090 +:10FBF00000F00FF956E502F023FC002801D00C209C +:10FC000018E02978002911D00A290FD014290DD025 +:10FC10001E290BD0282909D0322907D04B2905D01D +:10FC2000642903D0FF2901D0122003E0284603F005 +:10FC30004BF900202071012060713321E1702070A8 +:10FC400030E570B59A4C05462078002804D03E2156 +:10FC50000E2000F0DEF825E502F0F2FB002803D1CB +:10FC600002F0F4FB002801D00C2003E0287808F013 +:10FC70004DF900202071012060713E21E17020705B +:10FC800010E510B5017801240B000BF085FB3FBF98 +:10FC9000BF21BFBF4C94BFBFBF2427BFBF464F612A +:10FCA000BFBF59BFBFBF2B97BF9B9FBF797DBFA36E +:10FCB0008185888C6590BF5DBF555275A7ABBF37F6 +:10FCC0002F33BB6DAFBF71423F3B4969B3B7C00033 +:10FCD000FEF750FD9BE0FEF790FD98E0801CFEF7DC +:10FCE000D1FD94E0801CFEF7E3FF90E0801CFEF75E +:10FCF00080FE8CE0801CFEF792FF88E0801CFEF7FF +:10FD0000B4FF84E0801CFEF793FD80E0FEF7ECFD7D +:10FD10007DE0801CFFF7DEF879E0FEF769FF76E012 +:10FD2000FEF7BEFE73E0FEF74BFE70E0FEF7F7FD58 +:10FD30006DE0FEF72EFE6AE0801CFEF786FE66E0B0 +:10FD4000801CFFF797FE62E0801CFEF7DAFF5EE0A2 +:10FD5000801CFFF775F85AE0801CFFF73DF856E06D +:10FD6000801CFEF7FEFD52E0801CFEF725FF4EE0F2 +:10FD7000801CFFF754FE4AE0801CFFF737FC46E08A +:10FD8000801CFFF7DDF842E0801CFFF74DF93EE0F4 +:10FD9000801CFFF77CF93AE0FFF7E2FA37E0801CBD +:10FDA000FFF71AFB33E0801CFFF785FB2FE0801C78 +:10FDB000FFF7CBFB2BE0FFF7FEFB28E0801CFFF7F3 +:10FDC00066FC24E0801CFFF7DFFC20E0801CFFF7CE +:10FDD00017FD1CE0801CFFF7F5FC18E0801CFFF706 +:10FDE000B4FD14E0801CFFF7EAFD10E0801CFFF773 +:10FDF0006DFE0CE0801CFFF7B1FE08E0801CFFF7F1 +:10FE000020FF04E0801CFFF7EBFE00E0002420460A +:10FE100010BD274A2032537C002B03D19074D1743B +:10FE200001205074704730B5134606E0CC18203CD2 +:10FE3000D51AE47F5B1E4455DBB2002BF6D130BDF2 +:10FE4000017800290CD14121095C002908D18030BA +:10FE5000017C002904D0007C042801D001207047D7 +:10FE60000020704701784068002903D001780029FC +:10FE700005D100E0E4E740304078002801D00020C0 +:10FE80007047012070470A4900208031886740315F +:10FE90000871704710B50178012908D14068803099 +:10FEA000417F002903D00021417703F071F810BD94 +:10FEB0006C120020C409000070B5FC4D00246C7069 +:10FEC0002C70AC616C72AC720120E872F84844701E +:10FED000C473AC62F7482C6302F05FF9002804D0C9 +:10FEE000FF20F5A14F300BF036F92C7770BDF8B537 +:10FEF000F54902250D60F5490026CE630127CF6341 +:10FF0000F349C96A09070DD4F24AD36AF2494B6230 +:10FF1000136B8B62536BCB62936B0B63D26BCB0512 +:10FF20001A434A63ED4C002823D0012825D0FF2036 +:10FF3000E1A1A2300BF00FF9E948A063FF200430E3 +:10FF40006063276303202061E64996204860D74913 +:10FF50001C2008560B22D243811A904237D011DC64 +:10FF60001C313AD00A2938D0142934D0182911D19B +:10FF70002FE0DD486061DD4802E0DD486061DD487A +:10FF8000A061D9E708301FD004281BD0082817D05B +:10FF90000C2812D0FF20D8A176300BF0DCF8DB491A +:10FFA000D9488860DB48DA494160DB490160DB48B9 +:10FFB0000560DB4910204860F8BD0420E060EEE7F2 +:10FFC000E660ECE7FC2000E0F820E060E7E7F420E2 +:10FFD000FBE7F020F9E7EC20F7E7D820F5E710B5CC +:10FFE0000C460146CF480BF0B2F9B048047210BD80 +:10FFF000AF4840787047AD4A517010707047F8B5FF +:020000040001F9 +:1000000004460D4650791179000208436900091928 +:100010000884501C01460E78012730464E7836027F +:1000200030438E78C9783604304309060843117886 +:1000300000020843A9006050284608303E4686402A +:10004000002B0CD0012B04D0FF209BA1E9300BF03A +:1000500082F8206B3043AF4038432063F8BD206BFB +:10006000B043F8E770B50D460446082904D9FF20CF +:1000700091A1FA300BF06FF80022002D0CD9AA489C +:100080009100635809180B6053001B191B8C0B62FD +:10009000521CD2B2AA42F3D3206BA449086070BDAF +:1000A00010B504460B22D2430C308C49944223D025 +:1000B00008DC1C3026D00A2824D0142820D0182888 +:1000C00009D11BE02046083014D0042810D008289D +:1000D0000BD00C2807D0FF2087A176300BF03BF81F +:1000E0007248047710BD042000E00020C860F7E7E4 +:1000F000FC20FBE7F820F9E7F420F7E7F020F5E72C +:10010000EC20F3E7D820F1E76948007B704773499A +:10011000C2784A6202461378184653781B02184385 +:100120009378D2781B041843120610430002C8616A +:100130007047252808D0262808D0272808D0410055 +:100140000A2807D8091D06E0022105E01A2103E06C +:10015000502101E0891DC9B2604A9160614948613E +:10016000704752498861704770B5002816D0022246 +:100170004E4C6F4BA27203201860644D6248686059 +:1001800000200126207500290AD001290FD002295C +:100190001DD049A167480AF0DEFF70BD0122E7E7E4 +:1001A0006548012A01D0466070BD066070BD3F48B9 +:1001B000012A006B05D001214905084320636960CD +:1001C00070BD0121090508432063696070BDA06905 +:1001D000002804D1492038A1C0000AF0BCFFA16961 +:1001E000A06A4018554988604A4855498160554978 +:1001F000C1600120216BC0030143216368602C486A +:10020000C67370BDF8B54A4801688F084449BF00FD +:100210004A68D206D60F10228A60002404603B4848 +:10022000394981600C2069460870474D2C6142496C +:10023000012008610BE000BF00BF00BF00BF00BF8E +:1002400000BF00BF00BF69460878401E08706846BE +:100250000078002802D028690028ECD06846007891 +:10026000002804D14D2024A1C0000AF074FF2C61A5 +:100270000E48012144728472C1722D480760002E1D +:1002800002D0274910204860F8BD01460A78104680 +:100290004A78120210438A78C9781204104309067A +:1002A000084300020D49000AC86370477413002018 +:1002B00094130020A81300207372635C68616C5F64 +:1002C0007263732E6300000080E100E0C01F0040F5 +:1002D00080000010C0000010001700400015004012 +:1002E0005B060000401500400601020025000302E5 +:1002F000050103001F0003027372635C68616C5F99 +:100300007263732E630000000040000400F501409A +:100310004080004080F501401011004080E200E084 +:1003200000130040761300200016004040160040E5 +:1003300000120040550200000010004040850040BF +:10034000488100401010004000110040FB4902208D +:100350000860FB4908607047FA490220086070474E +:10036000F9490870704710B5F84801F01EFF0028E1 +:1003700003D0F749F7480AF0EEFE10BD10B5F34878 +:1003800001F02BFF10BDF4494860704770B5F34C85 +:100390000546A06AA84203D3ED49F1480AF0DBFE06 +:1003A00001202073EF49002025614860EE48456038 +:1003B0000120216B800501432163EC49486070BD39 +:1003C000E64802210173C6210161E64A002151601D +:1003D000816AE54AC63151600121026B89050A43F1 +:1003E0000263E248416070470121E048890581606D +:1003F000DA48026B8A430021026301737047DC48CC +:1004000001214160C160D74900204860D649486059 +:10041000D24988627047D74940200862D6490A68A5 +:1004200002430A607047D44801684022914301604A +:10043000D049002008627047CF48016810229143DC +:100440000160CE49012088617047CD490020C86114 +:10045000C94801681022114301607047C849CA6940 +:10046000012A01D000207047C24A92685206520EFB +:10047000524202700020C8610120704770B50C0024 +:10048000054604D1D920B24980000AF064FEE00795 +:1004900005D0012C03D0AE49BA480AF05CFE002D0D +:1004A0000DD00221AD4801294172C472B24808D072 +:1004B00002290BD0A649B4480AF04DFE70BD0121B7 +:1004C000F0E7016804221143016070BD0168082251 +:1004D0001143016070BDF8B5A04C0025E27A910788 +:1004E00001D5410713D4D306A849002B05DA4B7B6D +:1004F000002B02D08B7B002B09D0130702D50B7881 +:10050000002B04D1520703D54978002900D10125D9 +:10051000677A002201239849002F1BD00226304021 +:10052000284348D0084601688E089949B6004D68AE +:10053000ED06ED0F10278F60002101608B4A954872 +:1005400090600C206A4610708D4F39618B490120F4 +:10055000086114E0854D8F48A86008688008800015 +:100560000860A272E372F8BD00BF00BF00BF00BF09 +:1005700000BF00BF00BF00BF1078401E1070107891 +:10058000002802D038690028EED01078002804D165 +:100590004D208149C0000AF0DEFD00203861607204 +:1005A000A0720120E07274480660002DDBD078480C +:1005B00010214160F8BD012F06D0022F0CD06449F4 +:1005C00076480AF0C8FDF8BD08680425A84308600D +:1005D0006272E372A372F8BD08680825A843086038 +:1005E0006272E372A672F8BD5C4908757047F8B58F +:1005F000664D5A49EC7B086B002C58D001245B4AAD +:10060000E4039460A04308635B480768604C1021D2 +:10061000A16000210160001490600C206A461070F7 +:10062000574C21615548012606610AE000BF00BF12 +:1006300000BF00BF00BF00BF00BF00BF1078401E5A +:1006400010701078002802D020690028EED01078B1 +:10065000002804D14D205049C0000AF07CFD002044 +:10066000E060206160606061A061434807603F49CD +:1006700000144860464910204860384CA07A012890 +:100680000FD0022810D0444945480AF064FD0020EC +:10069000E873207D022803D1424801688907FCD510 +:1006A000F8BD36480660F2E734484660EFE72F4A67 +:1006B000906000200863087B2A4E002802D07068F2 +:1006C000012809D000222E4C2069012806D00023E1 +:1006D000887A012804D006E00122F4E74023F7E7F6 +:1006E000E768012F04D000271F43012802D004E04F +:1006F0002027F9E76368012B05D000233B432A4FED +:10070000022802D007E01023F8E73968012902D156 +:10071000E168012904D000211943022802D007E032 +:100720000821F9E73B68002B02D1E368012B3DD09B +:1007300000230B4302283BD03EE0000080E100E0B4 +:1007400080E200E000E100E092000020A813002019 +:10075000B8020100A202000000150040741300203E +:10076000B3020000408100404085004000F5014098 +:100770000080004040150040001200400010004082 +:1007800000110040690300007E0300009413002064 +:100790000013004000400004F8020100CF030000F5 +:1007A0005E03000000E200E0001400400423C0E704 +:1007B000002A01D0022100E000211943022807D1BC +:1007C0006068012804D17068012801D0012700E089 +:1007D000002790480F4301680906090E02D061699D +:1007E000012900D00021297300680006000E02D004 +:1007F000A069012800D0002068738748006A00289B +:1008000003D000F0DCF9012800D00020A8730020FC +:10081000E060206160606061A06180494860804E56 +:100820008049307548683C4670620968B1620B4681 +:10083000B17A022909D17178002906D07A4A526822 +:1008400012780A40317891430ED000212970774FF9 +:10085000E10710D03978032908D0022906D002F028 +:10086000D1FC0121B06A20E00121EFE707F022F975 +:100870000121B06A27E0A0060ED53878032806D0FB +:10088000022804D00221184602F0CBFC0FE002211E +:10089000184607F010F90AE0A00708D538780328B1 +:1008A0000FD002280DD00021184602F0BAFC5E4895 +:1008B00041680622B01C09310AF096FA002805D0DA +:1008C0000DE00021184607F0F6F8F0E75648317AB7 +:1008D00040680078C009814201D1012000E0002079 +:1008E00068702046FFF7F7FD387800280DD0012802 +:1008F0001ED002282FD003284AD04D494D480AF077 +:100900002AFCB07A022856D075E0A00701D507F07E +:10091000C6FC200702D5012007F0FDFC600702D5C8 +:10092000002007F0F8FCA006EBD507F059FCE8E73B +:10093000A00701D508F0E8FF200702D5012008F044 +:100940004DFE600702D5002008F048FEA006D8D56D +:1009500008F098FDD5E7A007BF25002802DA2C4053 +:1009600004F022FF200703D52C40012004F05DFB9A +:10097000600703D52C40002004F057FBA00602D5E9 +:100980002C4004F061FE6006BBD504F04AFBB8E7DA +:10099000A00701D506F0F0F8200702D5012005F0E8 +:1009A000B1FF600702D5002005F0ACFFA006A8D576 +:1009B00005F01CFFA5E7307B00281CD0174900225A +:1009C0004A60022820D0012803D019491A480AF0A9 +:1009D000C2FBB16A3069884203D8154917480AF04A +:1009E000BAFB1048316941600120316B8005014339 +:1009F000316313494860307D012800D050E611482A +:100A000001688907FCD5F8BD3169B06A411805480D +:100A10004160E9E740160040401500404081004039 +:100A20007413002040850040001500409200002013 +:100A3000B8020100FD0400001205000013050000CB +:100A400000F5014000E200E02E48002101704170F5 +:100A5000704770B5064614460D460120F0F7A2FC1B +:100A600028490120284B08709E60DC601D6170BD24 +:100A7000F8B504460120F0F795FC224901200870E2 +:100A800021494C60214900264E600321204D090672 +:100A9000A960204F002C0AD0012C03D01EA14120B8 +:100AA0000AF059FB3E60032000066860F8BD38601C +:100AB00001200006F9E710B51248017800290ED090 +:100AC0000321134A0906916010494A680021002A4F +:100AD00003D0154A1268427000E041700170002096 +:100AE000F0F760FC10BD07480178002907D00748DF +:100AF0004068002802D00C480068C0B270474078B7 +:100B0000704700009300002000F5004000F1004015 +:100B100000F5014000F200407372635C68616C5F35 +:100B200063636D2E6300000000F400403B48002129 +:100B30000170417010218170704770B506461446EF +:100B40000D460220F0F72EFC01203449344A08708B +:100B5000E41E14619660556070BD10B50220F0F778 +:100B600021FC2E49012008702E48002101604160BF +:100B7000816001202C49C005486010BD10B5274890 +:100B80000178002917D00121274AC905916025491C +:100B90000B680022002B05D04B68002B02D089681F +:100BA000002902D04270102103E0012141701F4949 +:100BB0000968817002700020F0F7F4FB10BD17483F +:100BC0000178002912D01748016800290AD001686D +:100BD000002905D04168002902D08068002803D090 +:100BE000002070470220704701207047407870470E +:100BF0000A48017800290FD00A480168002905D069 +:100C00004168002902D08068002801D01020704778 +:100C100006480068C0B27047807870479500002091 +:100C200000F5004000F1004000F5014000F40040F4 +:100C3000FFB593B0044600201D9E049015981C9D9E +:100C40001027082806D0E06901F014F8002809D020 +:100C50003770CCE028880921384328801F98022764 +:100C6000017016E0E169012088710521E269C9027D +:100C70009180E1698872E169F9480881E1690020A1 +:100C80008873288820210843288011211F98042771 +:100C900001701F980225801C0390307810900A2064 +:100CA0003070204618301190F5F7A1FC00206FE05D +:100CB0001598102809D1022D07D06846828A049918 +:100CC0000398401A8270110AC1706846C08A16994A +:100CD000884203D9E349097A149106E0884204D195 +:100CE0001099002901D0317021E003990870000AA1 +:100CF00048701E980088401BC01B83B2FF20C01B99 +:100D0000984200D203460398149AC0190CA9009285 +:100D1000019002912020015D6846C08A0022F5F70B +:100D2000DBFC3070002806D0C0B2832862D0684651 +:100D3000C08A208345E00F98002805D0C948006884 +:100D400000790A2830D33CE06846008EC119C9B248 +:100D50000491022D0FD01F99049A4978914203D132 +:100D60006A46128C824209D0BE480491006801781C +:100D7000032909D027E008461F994870B948006840 +:100D80000178042906D008E000790A281BD2012046 +:100D90000F9009E06946C98A818003990498081870 +:100DA00003900498281885B205AA14991198F5F7AC +:100DB00021FC002805D11E980088401BB84200DBAA +:100DC00076E7022D0ED01598102807D1049A0399C2 +:100DD0006846808A891A8870000AC8701E98058043 +:100DE000002030709F4800680078032802D000205F +:100DF00017B0F0BD0220FBE7F8B50446406B0026B3 +:100E0000134600282BD0491F8DB2618F2A46083225 +:100E1000278F8A18BA4221D89A7840185F78110231 +:100E200039430170090A41701A79DF781102394398 +:100E30008170090AC1700571290A41712A46591D3C +:100E4000801D09F0FEFF608FAD1D401980B26087E4 +:100E5000626B002110180170417000E009263046D5 +:100E6000F8BD30B50B88048F9C4212D9446BE01852 +:100E70004478057824022C430BD044790579240268 +:100E80002C436404640CA41D1B190B80106000200B +:100E900030BD822030BDF7B588B000256846058298 +:100EA00005275DE00398417802780E0216434179E8 +:100EB000027908021043000452D40A9801230680E4 +:100EC00005A802905B02002200970195304609991F +:100ED000F5F702FC04004AD16846018A01830398B1 +:100EE0004179027909021143437802781C021443C4 +:100EF000B4421ED10A041CD44B0401215B0C8903AB +:100F000000950B4301970295C17880780A0202434D +:100F100020460999F5F7FCF9040011D103994879A5 +:100F20000A79000210430122D20310430871000A1B +:100F3000487103AA06A90898FFF793FF0400CED0D2 +:100F400003990095019702954878097800020843B3 +:100F500069468B8A00220999F5F7DAF9822C06D1C5 +:100F600003AA04A90898FFF77CFF04009AD06846FA +:100F7000058209E003984179027909021143490485 +:100F8000490C0171090A417103AA04A90898FFF7E5 +:100F900068FF0028EED0822C02D020460BB0F0BDB6 +:100FA0000020FBE730B50446406B002597B00028D1 +:100FB0000DD00B2268460270228F0281606B039174 +:100FC000019000216846F2F72AFB684605706563C8 +:100FD0006587258717B030BDF8B50F460546696BA4 +:100FE0000020069E144600290FD0012B0DD1324659 +:100FF00039462846FFF74FFF002806D1002C04D0C1 +:1010000032463946284600F044FEF8BD00220280F0 +:10101000C262831D0263C36142634287028720303C +:101020000170704710B50022D24302800420FBF704 +:10103000E4FA10BD10B596B00446FFF7B3FF208E5A +:10104000002808D0012069460870E06A019000215C +:101050006846F2F7E4FA0020E062206316B010BDA3 +:1010600001280000AC1300200146098800200A076F +:1010700000D501200A06120F01D002221043CA0532 +:1010800001D5042210438A0501D5102210434905D9 +:1010900001D5202108437047FFB5A9B00600329D55 +:1010A000359C2B981F46229016D0007841060FD40D +:1010B0008106890E1E2909D021884A05520E0BD1BE +:1010C0003A88172A08D3FE4A914205D0C10906D0B2 +:1010D0008006800E122802D003202DB0F0BD2046DD +:1010E0002C302690F7492A980872002018AA0390FD +:1010F00010726A46107404AA0A60339A4A6020AAE1 +:10110000908090812298007801908106681C1C9044 +:10111000701F1D902B98890EC21C249222462032EB +:101120001B92083A401C02920B000AF035F91FFD91 +:10113000FD11FD1FFD8EFDFCFDFBFDFAFDF9FDFC23 +:10114000FDF8FDFDFDF7FDF6FDFDFDFDFDF5FD00E6 +:10115000032E76D102E018A9087219E30320287043 +:101160001C9917220A7000224A70CFE2052EF0D196 +:101170004178027808021043208320A98880249AAD +:101180005178127809021143618300287ED0884289 +:101190007CD800202072E080401E60840298F5F721 +:1011A00026FA05202870A81C0190022000901BAA96 +:1011B0002A990298F5F71EFA002868D118A8807CB1 +:1011C000012803D002206870102002E0012068701E +:1011D00002202490002225A91CA8F1F7AAFD0028CE +:1011E0002BD120A8007D2499814226D13A880099EC +:1011F000801C511A814220DB10A8C18D019801701A +:10120000090A417001991CA8891C01910099019A51 +:10121000891C009125A9F1F78CFD20A8007D01997A +:101220001BAA091801910099081880B200902A9908 +:101230000298F5F7DFF90028CCD00098022826D0D4 +:1012400064E272E018A9087261E2072E6DD341785A +:101250000346027808021043208320A98880249A3C +:101260005178127809021143618300280ED0884218 +:101270000CD8012020725879197900020843E080C7 +:1012800000202073E06900F0F5FC01E098E0A9E09F +:1012900000280ED1E169012088710521E269C902A7 +:1012A0009180E1698872E16987480881E1690020DD +:1012B0008873F01F60842298C01D60620298F5F761 +:1012C00096F907202870681C0090012001900020EA +:1012D00010A9C8852FE00198012814D0E069807911 +:1012E000012830D000981E38417F007F0902014359 +:1012F00000980170090A41700098801C00900198C4 +:10130000801C80B2019010A8C18D00980170090A5C +:1013100041700098801C09E00AE296E13BE1DFE0C1 +:1013200004E29BE077E036E016E2AFE0009001983F +:10133000801C80B201901BAA2A990298F5F75AF9ED +:10134000002803D007E010A8818DD1E739880198E3 +:10135000081A0428BFDA0198012843D0E06980798F +:10136000012804D010A8818D5548814206D110A8CB +:10137000818D00980170090A417009E000981E38BB +:10138000417F027F0802009910430870000A4870EC +:101390000198801CBAE1072E01D0152E76D1417834 +:1013A000027808021043208320A98880249A51786B +:1013B0001278090211436183002801D0884201D9C3 +:1013C00001203FE7012020720020E0802073052EDD +:1013D0000AD01D982299E269C0B2491DF1F783FC39 +:1013E000002801D00A202DE70020C04360841AA8FD +:1013F000019023A922980297039500910078002379 +:101400008206920E20462A99FFF712FC0390208B49 +:1014100020A988807BE1032EC0D1402220A98A81A7 +:101420004178027808021043208320A988802A99F5 +:101430001EAB1C9A02930192009139880022491E2A +:101440008BB21B990978F5F747F918A9087200289B +:1014500033D10B20287010A8008F3FE0052E9DD1BE +:10146000802220A98A8141780278080210432083D3 +:10147000249984464A78097812020A43628420A992 +:1014800088801248824202D30720DBE6AFE03F208B +:101490008002024362842A981FAB1C990293019137 +:1014A00000903888401E83B21B9801786046F5F79B +:1014B00013F918A9087200280CD08328AAD107E0D4 +:1014C000FFFF0000AC130020012800000102000013 +:1014D0000220B8E00D20287010A8808F401C15E174 +:1014E00001990C22C9095143C91CB14204D9019880 +:1014F00040067CD5002009E14278037810021843A9 +:1015000020AA9080844622980078400609D50520BC +:101510006A46107422980078C00905D00020107423 +:101520001DE106206A46107424981F902A9A0090A4 +:101530000023701A029383B21E9001921B9800221E +:1015400001786046F4F7E4FE18A9087200226946A3 +:101550000A74832801D10220039022980078400663 +:101560000DD52088C00506D520A9208B8988884202 +:1015700001D100206062002018A90872C6E0FF2196 +:10158000013120A88181808820831E9860841F9863 +:1015900060621320B8E0052E29D341780278080252 +:1015A000104320A98880218F002902D0FE4A914251 +:1015B00006D10A216A4611740121C943218702E03C +:1015C00007216A46117422992A9A491D01920091B5 +:1015D00001221D990023D203029311438BB2249957 +:1015E0004A78097812020A431B99097800E0C9E099 +:1015F000F4F78EFE18A90872002269460A740122C7 +:10160000520220A98A81832808D0002809D0218F7E +:10161000E54881427ED10020208778E088882083B9 +:101620004DE7606B002808D031462046229AFFF72C +:10163000E3FB18A90872002869D12B463A463046C8 +:10164000229900F056FB039061E02298022E407828 +:1016500001907DD1002801D0012879D10820694668 +:1016600008740198087521A800901B980022017841 +:101670002046019BFFF7B0FC6946002248758A7539 +:10168000002802D10198012809D0208F002806D017 +:10169000002008740120800220A988810EE004A89F +:1016A0003399F1F7BCFF03900020694608740120CC +:1016B000800220A988810398022807D0BB480068CF +:1016C0008079002805D018A908722BE001982083A2 +:1016D0001DE00398002803D0812018A9087240E07B +:1016E00021A800901B98012201782046019BFFF75A +:1016F00073FC18A9087220463499FFF753FC18A907 +:10170000087A002803D11920287001203880684603 +:10171000007C00E03CE0002804D004A83399F1F7F5 +:101720007EFF0390039800282ED01AE0062012E5D1 +:101730002078000713D5012E11D1092168460174C4 +:10174000A188818204203499FAF757FF082100E02C +:1017500005E020A88181CDE60198400612D503203E +:10176000039020A9208889890843208020A988899E +:101770004005400E04D026992B9808602698868054 +:101780000398AAE40420E6E418A8007A00280ED002 +:101790000120287022980078687020A88088A8709E +:1017A000000AE87018A8007A28710520388020A95E +:1017B0002088898988432080E2E7FFB50746A1B0E9 +:1017C00000201C903A7801209040794A7C681040B3 +:1017D00010AA1087744B22885B1C9A4203D0002801 +:1017E00004D0100702D5012025B0F0BD249E0020B2 +:1017F000307023980025028810A8028518A8057566 +:101800006A4B68461972057404A8186020462C308B +:101810001B902A985860249E94463878721C0521A3 +:10182000039201282DD0022808D003287DD13078DA +:10183000800980011D303070B889A0803878022876 +:1018400004D13078800980011B303070F01C1FAA51 +:1018500001900292009110A8008D0022C01E83B258 +:101860002020015DB889F4F737FF0028DED1039806 +:10187000B9890170090A417010A9888FC01C0885B8 +:1018800028E1787B18AA10753A7B012A02D0022A37 +:10189000CCD1FCE022887F231B011A4010AB1A87B1 +:1018A000802A4AD006DC102A10D0202A0ED0402AE6 +:1018B0000AD124E0FF3A013A65D0FF3A013A79D0E3 +:1018C000FF3AFF3A022A76D00525A2E02078C0062A +:1018D00001D5082000E010201C9004206A461074F6 +:1018E000002090821AA81DAA1EAB039601920290B6 +:1018F00000933B8A20461C9AFFF79AF984E0228BDA +:101900003B8A9646934268D10A221C92002839D11C +:10191000039801906046401E1FAA83B202922020C5 +:101920000091015D0022704600E0BAE0F4F7D4FEB9 +:10193000014618A801750B201AE0228B3B8A9646B7 +:1019400093424AD10C221C92002862D10398019044 +:1019500060461FAA401E0292009183B22020015DC2 +:10196000628C7046F4F7B8FE014618A801750D2088 +:10197000307010A8818F491C0185042168460174CC +:10198000218B818245E0238B3A8A9C469A4224D15E +:1019900012221C9200283CD1606A002813D0002239 +:1019A0006B4607C3638C07E0FEFF0000AC1300200A +:1019B00009F800000DE04BE02020015D6046F4F7DF +:1019C000A7FC18A9087513203070012010A90885FC +:1019D0001FE0398A228B914201D00425B6E01621FE +:1019E0001C91002815D11B98818802682046FFF7BA +:1019F00003FA18A9087500280BD11B983346016813 +:101A000080881AAA00F075F9054602281BD0042D1B +:101A100019D01B988088002811D06846007C0028C7 +:101A200004D004A82A99F1F7FAFD05460120694679 +:101A300008741B981B990068059000208880002D71 +:101A400048D0052D2ED06846007C032878D07DE054 +:101A500018211C91002806D0388A20832046B968B6 +:101A6000FFF7A0FAD5E72046183000902020015D4E +:101A7000237E01222046FFF7AFFA18A90875002837 +:101A8000ECD119203070012010A90885E6E72088E4 +:101A900001214902084010A90887FF38FF380228B1 +:101AA00006D0052510A92088098F884320804DE0A5 +:101AB000208F9849884290D116201C9038690028C0 +:101AC00005D06063B88A20870020608702E000208C +:101AD000C043208710A8008F7F21090102468A4356 +:101AE0000DD0782300220420B968FAF7DFFC38789B +:101AF000A07010A92088098F0843208002E0218867 +:101B0000814321806846007C002805D082484168D6 +:101B100004A8F1F784FD054618A8007D002815D01B +:101B20001C98707001203070208BB070000AF0702B +:101B300018A8007D3071052110A8018506E0FFE797 +:101B40007548416804A8F1F76AFD05467248017AB4 +:101B500020884005400E22D11B98808800281ED086 +:101B6000239A0026138810AA1385249A2A9B6F466D +:101B70004CC71B9A039412681AABFFF78DFA0546FF +:101B800002280CD00120694608741B982A99006825 +:101B9000059004A8F1F743FD05461B98868010A820 +:101BA000018D2398018028461EE600B597B00428D1 +:101BB00007D102206A461070019100216846F1F7B2 +:101BC0002EFD17B000BD10B5534C037800222168DC +:101BD000012B02D0022B42D126E00B78002B01D042 +:101BE000042B03D10A7122680321117021688388B4 +:101BF0000A79D200921D8B5221680A79D2000832EC +:101C00008918C2880A80216803890A79D2000A32B9 +:101C10008B52428920680179C9000C3142522168F7 +:101C20000879401C08711EE00A7482888A80216845 +:101C3000C288CA8022680189118122684189518144 +:101C4000C1682068C1606168F1F7E9FC01460228BB +:101C500007D02068007C002802D1002903D0812011 +:101C600010BD832010BD002010BD406B002800D0A7 +:101C7000012070478178012909D100880521C90216 +:101C8000884202D0491C884201D1002070470520BB +:101C90007047F7B586B00024684615460F46848124 +:101CA00005261AE004984178027809021143298038 +:101CB000811D019602940091417902790B02134330 +:101CC000C178827809020A43417800780902084302 +:101CD0003946F4F71DFB002806D104AA03A906988B +:101CE000FFF7BFF80028DDD0822800D1002009B01E +:101CF000F0BD10B51488844201D2052010BD172410 +:101D00001C701080421E581C491C09F09AF80020D3 +:101D100010BD0000FEFF0000AC13002030B50346EC +:101D2000002002460DE09C5C2546303D0A2D02D382 +:101D30000020C04330BD0A25684330382018521CAB +:101D4000D2B28A42EFD330BD70B50D46144608E0DA +:101D50000A2109F0DFF82A193031203A641ED177C0 +:101D6000E4B2002CF4D170BD10B5002310E0040AD9 +:101D700000020443A0B2CC5C44402006000F604047 +:101D80000407240C44402006C00C60405B1C9BB23E +:101D90009342ECD310BD000010B572B600F0DCF831 +:101DA00000280BD0EFF77CFAFAF7E1FD08F097FB7B +:101DB0006E490020C86288626D49086062B60020E2 +:101DC00010BDF3B5002501200007C06A81B0C043F3 +:101DD0000006000E04D167480068401C00D10125B0 +:101DE00072B600F0B9F8002802D062B60820FEBD35 +:101DF000EFF7ACF9EFF758FA5F4B604E00211A6825 +:101E0000CA40D2071FD00246CA40D20718D14AB2F0 +:101E1000002A07DA1407240F083CA408A400A41918 +:101E2000E46904E09408564FA400E419246892077A +:101E3000D20ED4402206920F012A04D0032A02D0E7 +:101E400062B65048FEBD491C2029D8D30198030032 +:101E500009F0A2FA142123232323232323230B0D88 +:101E60000F11131F1517191B1D2E002416E0012436 +:101E700014E0022412E0032410E004240EE00824FD +:101E80000CE009240AE00A2408E00B2406E00C24F4 +:101E900004E0052402E0072400E00624F0690121A3 +:101EA0000002000AC9070843F061002D04D009E0D0 +:101EB00062B601200003FEBD2C4D3348E862EFF707 +:101EC000F3F9A8622A49314808603149029808604C +:101ED000EFF7EAF9214608F0E9FAFAF70CFD08F005 +:101EE000EFFC08F065FB0198EFF7A8F9040062B673 +:101EF00003D0FFF751FF2046FEBD0020FEBD10B508 +:101F0000044600F029F8002800D0012020700020AD +:101F100010BD204908600020704710B50C461028FD +:101F200008D011280BD012280CD013280ED0012075 +:101F3000086010BD03CC083CFFF743FF0AE0FFF741 +:101F40002BFF07E02068FFF7DAFF03E01149206864 +:101F500008600020206010BD05480C4900688842D8 +:101F600001D10120704700207047000000050040AB +:101F7000640000200010001000E100E000ED00E02F +:101F800000E400E00110000000220000BEBAFECA1A +:101F9000980000200400002010B520380C460300F3 +:101FA00009F0FAF933A6AAAEB2B8BCC0C5E0DBE4CA +:101FB0001B1F23272C31373C41474D5054585C6040 +:101FC0006D71656974787C8084888C9094989C9FEE +:101FD000A2CACFE9F0F3D3D7F800206800F0DDF80B +:101FE000D6E0206800F0E1F8D2E0206800F0F5F8D3 +:101FF000CEE0207840B208F0C9F8C9E0207840B2BD +:1020000008F0E7F8C4E02078616840B208F0FAF818 +:10201000BEE0207840B208F00AF9B9E0207840B27A +:1020200008F015F9B4E02078217940B208F020F9E1 +:10203000AEE02078616840B208F04AF9A8E008F004 +:1020400056F9A5E0206808F05AF9A1E0207808F0D8 +:102050006FF99DE02068FAF738F899E02068FAF700 +:1020600038F895E021792068FAF73AF890E020688E +:1020700007F0D8FF8CE0206807F0D9FF88E02078CF +:1020800007F0D9FF84E007F0E3FF81E0207807F054 +:10209000E5FF7DE0207807F0F7FF79E0206808F0A1 +:1020A00010F875E0206808F012F871E0206808F078 +:1020B00014F86DE0206808F015F869E0206808F071 +:1020C00017F865E0206808F019F861E0206808F06A +:1020D0001AF85DE00846EFF751F859E0F0F787F994 +:1020E00056E0F0F7B4F953E02068F0F7BCF94FE0A0 +:1020F000206800F0E1F84BE0206800F0E9F847E0E4 +:10210000206800F0F0F843E02078A268616800F0F1 +:10211000F5F83DE0207800F006F939E0207800F08D +:1021200017F935E02078616800F027F930E0207871 +:10213000616800F03AF92BE02179207808F008FA7C +:1021400026E0206800F06BF822E02068FAF7FEFA3B +:102150001EE02068FAF7E2FA1AE007CC0C3C08F01F +:10216000F1FA15E0206808F044FB11E003CC083CCC +:1021700008F06FFB0CE0206808F065FD08E009E05E +:1021800003E0FFE708F077FD02E0206808F0AEFD0D +:10219000206010BD0120086010BD002101700846BC +:1021A00070470146002008707047EFF31081C9079F +:1021B000C90F72B60278012A01D0012200E0002284 +:1021C00001230370002900D162B6002A01D000204B +:1021D0007047012040037047E7E7EFF31081C9071C +:1021E000C90F72B600220270002900D162B6002029 +:1021F0007047F2E710B52848FFF7CFFF002803D05B +:1022000026A11D2008F0A7FF2348401CFFF7C5FFAB +:10221000002803D021A1212008F09DFF10BDF1B5B9 +:10222000224D6F6801261C48FFF7BFFF1A4C00289B +:1022300003D10026601CFFF7D0FF1D4A1D49012075 +:10224000506000BF00BF00BF00BF00BF00230B6095 +:102250004B60009B6B60106000BF00BF00BF00BF01 +:1022600000BF0868002802D148680028F9D04868F3 +:102270000028E4D1002E04D06F60601CFFF795FFAA +:1022800007E0601CFFF791FF0028D3D10248FFF759 +:10229000A4FF0020F8BDC2E79C0000207372635CBD +:1022A000736F635F6563622E6300000000E50040AA +:1022B00000E0004000E100405A495B4B0A685B497E +:1022C0009A42096801D18904890C01600020704795 +:1022D0005449554B0A6855499A4201D18004800CF3 +:1022E0004860002070474F494F4B0A684F499A4257 +:1022F00001D18004800C88600020704730B5494BC4 +:10230000494D1C684A4BAC4202D0102802D203E06F +:102310000E2801D3184630BDC30044481818016187 +:102320004261002030BD3F493F4B0A684049491C8B +:102330009A4202D0042802D203E0022801D30846C0 +:1023400070473C4A0121C00080180160002070479E +:102350003449354B0A683649491C9A4202D0042850 +:1023600002D203E0022801D308467047314A012116 +:10237000C000801841600020704770B5294A2C4B7E +:1023800014682D4E284D82005B1C9219AC4203D07C +:10239000042803D2116006E0022801D3184670BD5C +:1023A0008804800C1060002070BD70B51D4A204B61 +:1023B0001468214E1C4D82005B1C9219AC4203D064 +:1023C000042803D2106806E0022801D3184670BD25 +:1023D00010688004800C0860002070BD10B5134A9E +:1023E000164890600E200021C3009B1819615961A6 +:1023F000401C1028F8D300200F4A05E0022803D320 +:1024000083009B18196005E083009B181C68A404D6 +:10241000A40C1C60401C0428F0D310BD03490748DD +:102420008860704764000020BEBAFECA00F5014013 +:102430000820000000F0014000F8014000C0FFFF4C +:10244000FE48C07E7047FE4840687047FD48C07E29 +:102450007047FFB5F94E85B0706A346805686068EA +:102460000190306A0390298D0798401A80B202903B +:102470000898002804D0274638372046483002E024 +:10248000371D2846A0300090032038710598002899 +:102490001FD001287ED0022863D003287BD0EAA178 +:1024A000ED4808F058FE0898002806D0387903282F +:1024B00003D0E5A1E94808F04EFEA16A7069FAF779 +:1024C000B0FDB860216A606A814265D900990860F0 +:1024D00034E1306A002803D1DBA1E14808F03BFE7B +:1024E000288BE0494843421806980021002804D070 +:1024F0005043DD4908F00EFD411CA1610191AA88FD +:10250000D848002142430698002804D05043D649B9 +:1025100008F000FD411CE161306AD24A801CA062D3 +:10252000298BD04B5143019A891AD04A891809182E +:10253000A162AA7D01985A4340008018FF301930EB +:1025400020626062306A081AC949FF38153888422B +:10255000A9D2C84988427DD2BBA1C74808F0FBFD7B +:102560008BE0288BBF4AE16850430A180698002187 +:10257000002804D05043BC4908F0CCFC411CA161A8 +:10258000AA88B848002142430698002808D0504342 +:10259000B54902E03EE073E0CEE008F0BBFC411C30 +:1025A000E161306A002803D1A7A1B44808F0D3FD47 +:1025B000A620405BAB4A0028288BE16821D050431D +:1025C0000818A169401AA0622169A068A54A484379 +:1025D000A1694018A97D400051434018FF301730D1 +:1025E0002062A888E1695043411AA5480818606232 +:1025F000A06A316A401A9E49FF38553888423CD358 +:1026000051E750430818A169401A3168D638496823 +:102610004018D8E7284680300190C08C002802D0AE +:10262000306A002803D188A1964808F094FDA88854 +:102630008C49E3694843C01AA06201999C46CA8C40 +:102640002169A368521A4B43A16959186346534341 +:10265000C91800E011E0AA7D824B49005A4389184D +:10266000FF3117312162864941186162316A401A8F +:102670007F49FF3855388842C2D20120387112E7AD +:102680000898002803D03420005D00287ED1A88857 +:1026900074494843E169401A02994843A0622846B8 +:1026A00080300490C08C0028019825D0002803D0E9 +:1026B00065A1754808F04FFD04986A4AC18C0298DC +:1026C0000818E16948434000FF3017302062A888AD +:1026D0005043411A6A48081860626C4840680028F4 +:1026E00019D0A26A03990120511A614AFF3955395C +:1026F000914285D23871D6E6002802D0039800288E +:1027000003D151A1624808F026FD0198A16AD6388C +:102710000818A062D0E7FAF7F2F97269014610468C +:10272000FBF706FCA16A081A5149FF385038884265 +:10273000A5D2012009B0F0BD00980160009855496C +:1027400000684018F86028468030028A0799511ABC +:1027500009B2002904DD0599022901D0032100E016 +:10276000002179710E99002915D0028F002A1ED000 +:10277000418F4187A0352B7F491C4B4393420AD29E +:102780007979491E002906DD012100E00CE079710C +:10279000418F491C4187089838700898002808D054 +:1027A0003420005D002804D0022009B0F0BD0021D3 +:1027B000DFE708980121484020346075307FF27EC1 +:1027C0003946B37E9A4202D0FAF710FE04E00020A8 +:1027D000F076B07630607062002009B0F0BDF0B5E0 +:1027E0002A4F83B038680568416A2E460C68203647 +:1027F000717D00290AD0698E228D914206D1407ADE +:10280000002803D110A1244808F0A5FCFAF777F9B5 +:102810001E4F39684A6901461046FBF789FB3F683D +:102820000028796A096807D089880E4A51433A68B6 +:10283000D269891A08F06EFB698E2FE0B813002068 +:10284000B8000020E01300207372635C6C6C5F6C56 +:102850006D2E73302E630000310500003A05000034 +:10286000B7040000E204000040420F0033040000FF +:102870005C0800001D030000D4040000DC0400001C +:1028800094FBFFFFF50400001B050000A8000020DA +:1028900014050000FF0B000021060000228D131814 +:1028A000994202DB491C698602E0401C10186886C8 +:1028B000B07D002806D19421688E095B884201D141 +:1028C000401C6886388BFB4E401C388320464030C5 +:1028D0000190C1888088081A218D401E401887B257 +:1028E000C03418E03068F449406A002300794000A1 +:1028F000085A009323795B00C95A081881B2287DD1 +:102900000023FFF7A6FD00280FD001280FD0EB49C8 +:10291000EB4808F020FC6A8EB81A00B20028E1DA11 +:1029200001980821817005F0BDFF03B0F0BD688EED +:10293000401C6886EFE770B5DE4D09292B686A6890 +:102940007BD20C007C4424792419A7440463869626 +:1029500083A5A575A20000201062D17E042956D25D +:102960000B007B441B79DB189F4451510147516A8E +:102970000C68116808701168486010682030407D4C +:10298000002808D1FAF7BBF869680968096CFBF7F9 +:10299000CFFA002817DC6868228D0168498E9142C1 +:1029A00005D123468033998A8A1ADA8204E0891A8B +:1029B000962211530168498E21850268C16811640D +:1029C000C168416111E068680168098E228D8B1A27 +:1029D00022468032D3820168098E218501680B6C02 +:1029E000C3600B6C4361886C1062204606F0C8FB24 +:1029F000002821D0B3A1B74829E0D068506105F084 +:102A000088FA002818D0EF20AEA180001FE0ADA109 +:102A1000B1481CE0D07E042817D20100794409791E +:102A200049188F441212010B06F0E6FC002803D06F +:102A3000A4A1AA4808F08FFB70BD2DE005F09FFB14 +:102A40000028F9D09FA1A64801E09EA1A54808F062 +:102A500082FB70BDFDF7CBFD70BDD87E022806D08D +:102A6000D87E032806D0FF2096A1AB300EE0FFF7FA +:102A7000B6FE70BD00F013FC70BDD87E0228F6D003 +:102A8000D87E0328F6D0FF208EA1B83008F063FB73 +:102A9000F0E7FAF719F870BDFF208AA1C630D6E733 +:102AA000F3B50126834C904D81B00F46092945D2DC +:102AB00008007844007900188744042D38382D40E8 +:102AC000403838000121884800F0D0FB3946019891 +:102AD000FFF731FFE87E022826D160680468406A6B +:102AE0000768F9F7EAFFB988804A5143E269891A11 +:102AF000D639E162B72803D283200001081A02E028 +:102B0000081A7B494018E0627A48E16A814200D89D +:102B10000846E06205E00198FFF70DFFE87E022815 +:102B200002D128682030067503B0F0BD25600198F9 +:102B3000FFF701FF0020206003B0F0BDFF2061A17E +:102B4000623008F008FB03B0F0BD70B506460C46D5 +:102B500009291FD208007844007900188744040D21 +:102B600011110D1A1A1111000121634800F07EFBAA +:102B700021463046FFF7DFFE70BD3046FFF7DBFE33 +:102B800070BD4C4D5C4828603046FFF7D4FE0020F5 +:102B9000286070BDFF204BA1883008F0DCFA70BDC2 +:102BA000F0B5514985B0CA7E0026424C032A03D0B5 +:102BB0002831CA7E032A64D100252160002824D050 +:102BC00001280ED03FA14D4808F0C5FA2068002E1C +:102BD00005604562256054D049484560002005B035 +:102BE000F0BD0320887600E020BF2068C17E002968 +:102BF00003D0C17E827E9142F6D0C17E002902D0F0 +:102C000000268576E2E70126FBE700260327084633 +:102C10008F76C97E032903D0C07E00282DD02DE0F9 +:102C2000007F002803D127A1364808F094FA2068D5 +:102C3000067F684607714771F9F761FF0290FF2030 +:102C4000F530039001216846017069463046FAF775 +:102C5000CDFB2068007FFBF7F7F900280BD0206838 +:102C6000007FF9F731FF20680577C5768576056026 +:102C70000126456202E020BFEBE701262068857649 +:102C8000A4E70C2005B0F0BD10B5174800F04DFBCF +:102C9000194800F04AFB1C49002008751849487083 +:102CA00011494861144A506188769076014948601C +:102CB000086010BDA800002034B4010048280100BD +:102CC0005B0600007372635C6C6C5F6C6D2E73301E +:102CD0002E630000B6030000C3030000D60300000B +:102CE000DB030000E2030000B8130020E204000050 +:102CF00087F8FFFFEC060000E01300201E03000031 +:102D0000B80000207E02000008140020F8B5FF4E35 +:102D100005463068002401270004810FFC48006844 +:102D2000800F814204D0FF20FA49D03008F013FA16 +:102D30003068F94E0004810F30680006800F814230 +:102D400004D0FF20F349D13008F005FAF348C069F8 +:102D50003168800F0904890F884204D0FF20ED49B3 +:102D6000D23008F0F8F9EE480570EE4DEC76AC760E +:102D7000ED4EF476B476ED48077104606C627462CF +:102D80002C60EB4F346028467C6000F0CEFA304671 +:102D900000F0CBFAE74804757C706C617461AC7626 +:102DA000B476E54844600460F8BDE04908717047B6 +:102DB000F8B5DC490546CA7EDB48DF4C002A02D163 +:102DC000C27E002A03D0C97E022907D009E0DB4871 +:102DD0002160F9F725FE216808770AE0C17E002905 +:102DE00001D00C20F8BD2060D548F9F719FE216804 +:102DF0000877CF48456021680860D2484862284675 +:102E00000121BC30F9F790F9A035287F8007800FA9 +:102E1000401C28772068007F002803D1BD49CA489C +:102E200008F099F9F9F749FEC849884200D20846E6 +:102E3000C749401886B221680320C87604F084FF91 +:102E40002168086104F0A8FF01270025002826D08A +:102E500004F0A2FF21684A6A106008680121077027 +:102E60006846F9F7EAF868460078BA49000208F0BF +:102E700051F80F46F9F743FEF119FAF7D2F8216835 +:102E8000C86022680320107250721571107FD37EC3 +:102E9000111D967EB3420ED0FAF7A8FA0FE0F9F7AB +:102EA0002EFE3146FAF7BDF82168C8600868057043 +:102EB00008684770E5E7D576957615605562206815 +:102EC000058300202560F8BD7047F8B5954EF17E6A +:102ED000002903D19449C97E002901D00C20F8BDF6 +:102EE0000221F176914F934D77623560002438606E +:102EF0002C7500943979C0304A00974900798A5A74 +:102F00004000085A2346101881B222462046FFF797 +:102F1000A0FA002803D07F49904808F01CF92C61E2 +:102F20000120AC6028756C862C868D4884753968C4 +:102F3000088D401E088534830020F8BD10B57E48FA +:102F400001244068817E03290CD00168497800295A +:102F500006D0006A8349884202D9002405F03CF972 +:102F6000204610BD0024FBE77348406802681178D2 +:102F7000491C1170016A0068C26A914204D8007D40 +:102F8000012801D0012070470020704700207047C1 +:102F9000F8B5694D63482860416A00270C680068ED +:102FA000342126460F548036B17F002927D1007D79 +:102FB000032824D1F9F7A3FD29684A690146104680 +:102FC000FAF7B6FF00281ADD2D68674B6A6A296890 +:102FD000126892880091C9695A43511A07F09AFF02 +:102FE000218D401C4218009953480A862968B28AEC +:102FF0000B8ED21A12B2002A03DC0760F8BD2F60D4 +:10300000F8BD012220318A7521464031CA8889885D +:10301000514F511A228D491E89188EB20546C0346F +:1030200019E0496A09794900795A00220092028E12 +:103030002379007D5B00FB5A591889B20123FFF701 +:1030400008FA00280ED001280FD002280AD03149F2 +:10305000464808F080F829680868028EB21A12B251 +:10306000002ADEDA00202860F8BD28680068018E9A +:10307000491C0186EFE770B52F4900244D680628EA +:1030800076D202007A441279921897441820020EE0 +:10309000240D002000F08FF9EC76AC762C60002136 +:1030A00008466C6200F0E2F870BD1D480D680078BB +:1030B000EFF72AF9EC76AC762C606C6270BD0120DB +:1030C00000F079F90021084600F0D0F870BD2968B9 +:1030D0000320087570BD686A29680068CA698A603B +:1030E0008188214A51432A68D1600146C0310A8A49 +:1030F00002838A7B82754A8A82808A8AC280C98AD0 +:10310000018129680220087570BD31E000E400E00B +:1031100008E400E0C42C010018E400E000ED00E049 +:10312000A0000020B8130020E0130020B000002011 +:10313000B800002008140020A8000020A12A0100E7 +:103140004B2B0100A4000020C9020000F60500007E +:10315000BB0200001027000034B40100520300003D +:1031600028140020D9821300E204000007060000A2 +:10317000DD49DE4807F0EFFF70BD70B500280BD0C9 +:103180000024DB4D01280ED002282FD0EF20D64995 +:10319000C00007F0E0FF70BD00F06BF900210846A9 +:1031A00000F064F870BD686801684C70C47684767D +:1031B0000460D04E446201220021706800F063FF79 +:1031C00071680846C0318C72CC72FFF77EFE002811 +:1031D00003D0C549C84807F0BEFFF9F7DBFBC74875 +:1031E0006C600078EFF790F86C6070BD00F041F90A +:1031F0006868C4768476046000214462084600F062 +:1032000035F870BDBA494968CA7E022A08D10A68F1 +:103210001378002B04D150600968CA6A1018C8627C +:10322000704710B5B24A002952680BD0012906D068 +:10323000022906D0AC49B24807F08DFF10BD801EB0 +:1032400000E0401F106210BD08B50020C043694671 +:103250000880AC48C07E002801D0002008BD084688 +:1032600000F0F6F90028F9D0012008BD70B5A04C97 +:1032700005466268002908D0002A04D0FF209A4938 +:103280000D3007F068FF656070BD002A04D1FF2093 +:103290009549133007F05FFF0020606070BD38B5BE +:1032A000934C20680168497801291FD001216846A4 +:1032B000F8F7C3FE684600789349000207F02AFE3B +:1032C0002068426AC06812685118F9F7AAFE21689E +:1032D000C8608C4822680321824202D0108B0A28E1 +:1032E00010D2108B401C108351720DE07D21C068FC +:1032F000C900F9F796FE2168C86004F025FD216831 +:103300000861E6E702205072117200231371107FEA +:10331000D47E111D957EAC4202D0FAF767F838BD15 +:10332000D37693761360536238BDF8B5704C05467A +:103330001F27EE7E042E2DD230007844007900182D +:103340008744312801237148854203D0664970487B +:1033500007F001FF02202560A87600E020BF216869 +:10336000C87E002803D0CA7E887E8242F6D0CA7EFC +:10337000002A04D000228A760C27226010E0002266 +:103380008A760A604A6222600DE00120FFF708FC9D +:10339000074603E054495F4807F0DDFE002F02D0E6 +:1033A000E87EB042C5D1E87E002803D04E495A4895 +:1033B00007F0D1FEF8BDF8B54D4D01286A68516A95 +:1033C0000C6846D10879554940000B5A1068077DB2 +:1033D0000126032F06D0027D022A13D0007D01288A +:1033E00024D036E00027076110688760942000969B +:1033F000025BC420005D4000085AC01881B23B4601 +:1034000003201EE022468032D78C07610096C4203C +:10341000005D928A4000085AC01881B20023022041 +:10342000FFF717F8696809680E750CE0942000969C +:10343000025BC420005D4000085AC01881B200231E +:103440000120FFF706F8002803D02749344807F089 +:1034500082FEF9F79FFA29480078EEF755FF696870 +:10346000002008830B68228D5A86096820318875F0 +:10347000F8BDF8B51E4D002168680C46006842781A +:10348000002A01D0447027E00078002809D00121EB +:103490006846F8F7F7FD684600781B49000207F018 +:1034A00039FD6868426AC06812685118F9F7B9FDB9 +:1034B0006A68D060147103205072107FD37E111D92 +:1034C000967EB34202D0F9F791FF03E0D47694766A +:1034D0001460546268680483F9F75CFA074800785E +:1034E000EEF712FFF8BD0000C42C010056070000E3 +:1034F000A8000020B800002003070000A000002062 +:103500009D070000E013002010270000B8130020E2 +:1035100007020000130200001902000034B4010089 +:10352000BC060000F8B50024E948FEF73EFE00287E +:1035300025D1E84FC02026464643F51901462846C6 +:1035400007F0DEFC0120B8556C80E34900200870CC +:10355000E24A4A8080356962E149641C0870A962C8 +:10356000E049E4B208704A80A963032CE2D3D8484A +:10357000FEF733FED648FEF718FE002801D00C20D7 +:10358000F8BDFF211931D84807F0BAFCD64801210F +:1035900001704480D5490020087208750877D44925 +:1035A0008872CB48FEF719FE0020F8BD10B5C84858 +:1035B000FEF7F3FD002803D0CEA1282007F0CBFDB5 +:1035C000C348FEF7EAFD002803D0CAA12D2007F06A +:1035D000C2FDFFF7A7FF002803D0C6A1332007F0E4 +:1035E000BAFD10BD10B50446B948FEF7DEFD00284F +:1035F00001D00C2010BDBC490878002807D000205D +:103600000870B3482160FEF7E8FD002010BDB04807 +:10361000FEF7E3FD1F2010BD70B505460C46AC4813 +:10362000FEF7C3FD002801D00C2070BDAE4A5088C3 +:10363000A84202D11078002804D0A548FEF7CDFD9D +:10364000122070BDA2482260FEF7C7FD002070BDA9 +:1036500010B504469E48FEF7A8FD002801D00C20B6 +:1036600010BDA1480178002907D00020C043208068 +:103670009748FEF7B2FD122010BD40882080944884 +:10368000FEF7ABFD002010BD10B504469048FEF7D4 +:103690008CFD002801D00C2010BD2078002804D01B +:1036A0008B48FEF79AFD0C2010BD01202070884841 +:1036B000FEF793FD002010BD10B504468448FEF7C8 +:1036C00074FD002801D00C2010BD824A0021C020CA +:1036D0004843105C00280AD0C023002059435054AE +:1036E000881820607A48FEF778FD002010BD491C3C +:1036F000C9B20329EBD37648FEF76FFD1F2010BD3A +:10370000032805D2C0225043724A135C002B01D01B +:1037100012207047801808600020704710B5002202 +:103720000C46032809D2C02148436A490B5C002B90 +:1037300014D122704018606018E003280ED164484C +:10374000FEF733FD002809D167484188032902D1DB +:103750000178002904D05E48FEF73FFD122010BD1D +:1037600060605B48FEF739FD01202070002010BD2D +:1037700010B504465648FEF718FD002801D00C206D +:1037800010BD2088534A032804D2C0214843105C4E +:10379000002801D00020208000202188491C89B207 +:1037A0002180032900D300212180C0235943515C8B +:1037B00000290BD0401CC0B20328EED30020C04328 +:1037C00020804348FEF709FD122010BD4048FEF757 +:1037D00004FD002010BD70B505460E463C48FEF7BE +:1037E000E4FC002801D00C2070BD2888341D03287B +:1037F00004D303D0A04201D3002028800020361D2E +:103800001DD0394B33492A88521C92B22A80A242D9 +:1038100000D300222A80042A02D3A24217D301E057 +:10382000032A05D0C02672438A5C002A0FD002E02A +:103830001A78002A0BD0401CC0B2A042E3D300206B +:10384000C04328802248FEF7C8FC122070BD2048E3 +:10385000FEF7C3FC002070BD10B504461C48FEF7FF +:10386000A4FC002801D00C2010BD2078002804D032 +:103870001748FEF7B2FC0C2010BD01202070144840 +:10388000FEF7ABFC002010BD10B504461048FEF753 +:103890008CFC002801D00C2010BD217801200029CB +:1038A00002D0012905D008E061680A78002A09D011 +:1038B00003E061680A78002A04D00548FEF78DFC11 +:1038C0000C2010BD08700248FEF787FC002010BDD8 +:1038D000C00000205814002098160020FFFF0000B0 +:1038E000C1000020C6160020D8160020B8170020FE +:1038F000D81700207372635C6C6C5F64622E630087 +:1039000010B5282107F0FAFA10BD70B50546007809 +:103910000A0700090001120F1043287007290ED270 +:10392000080078440079001887440305030503075D +:103930000300062408E00C2406E0222404E000240E +:10394000F8A1572007F007FC687880098001204320 +:10395000687070BD00780007000F704710B5C01C7C +:1039600007F0F5FC10BD0A4610B5C11C104607F063 +:10397000EEFC10BD10B5093007F0E9FC10BD02786F +:10398000BF23C9071A40490E0A43027070470078E6 +:103990004006C00F704702785206520EC9010A4312 +:1039A0000270704770B50C460546C11C20460930B0 +:1039B00007F0CDFC20784006400E2070297849069B +:1039C000C90FC9010843207070BD70B515460E4679 +:1039D00004461F2A03D9D3A1A82007F0BCFB204628 +:1039E0002A463146093007F02CFA6078AD1D80096F +:1039F0008001A906890E0843607070BD70B5054648 +:103A000040780E468406A40E062C03D2C5A1B82029 +:103A100007F0A1FBA41FE4B21F2C00D91F242946E4 +:103A200022460931304607F00CFA204670BD70B5C9 +:103A300015460E4604461F2A03D9BAA1CC2007F02A +:103A40008AFB20462A463146093007F0FAF96078A9 +:103A5000AD1D80098001A906890E0843607070BD04 +:103A600070B5044640780E468506AD0E062D03D28D +:103A7000ACA1DD2007F06FFBAD1FEDB21F2D03D908 +:103A8000A8A1E12007F067FB21462A46093130460C +:103A900007F0D7F9284670BD0A78C2734A780274D5 +:103AA0008A784274C978817470470A78C2744A78F7 +:103AB00002758978417570474176090A81767047A9 +:103AC000C176090A017770474177090A8177704703 +:103AD000C175090A017670478175704720300279F7 +:103AE000C90652095201C90E0A43027170472030BB +:103AF0000279D206D20E49010A430271704710B50D +:103B00001F3007F019FC10BD417800788906890E36 +:103B10000007000F06D0012808D0022809D0062887 +:103B200010D10AE0891F1F290AD90BE00C2907D000 +:103B300008E0891F1F2903D904E0891F1F2901D824 +:103B400001207047002070474178007889060007FF +:103B5000890E000F042805D1062903D3252901D891 +:103B6000012070470020704770B401780907090FE1 +:103B700003292ED0052931D1411C827E0C46437E7B +:103B800011021943037FC27D1D02037EC67E1B0204 +:103B90001343827D407835438006800E22281DD154 +:103BA00006291BD31920C001814217D8FF26F436FD +:103BB000B54213D8002A11D0082A0FD88A420DD254 +:103BC0008B420BD8617F227F09021143814208D9C1 +:103BD00004E040788006800E0C2802D070BC0020E3 +:103BE000704770BC0120704710B5222107F086F99C +:103BF00010BD10B502788B07920892009B0F1A43F4 +:103C000002704278520952014270012908D00229FB +:103C100006D0032905D0FF2042A1E83007F09BFA27 +:103C200010BD01210A43427010BD10B502788B0708 +:103C3000920892009B0F1A43027042785209520177 +:103C40004270012907D0022905D0032904D035A1EB +:103C5000384807F080FA10BD01210A43427010BDB8 +:103C600000788007800F70470278EF23C9071A4059 +:103C7000C90E0A43027070474178C078C906C90E60 +:103C80000E2835D202007A44127992189744060918 +:103C90000C0F1215181B1E2124272A2D0C2929D0A0 +:103CA0002AE0082926D027E0022923D024E017297A +:103CB00020D021E00D291DD01EE001291AD01BE0E3 +:103CC000012917D018E0022914D015E0092911D0D4 +:103CD00012E009290ED00FE001290BD00CE00129D8 +:103CE00008D009E0062905D006E0022902D003E049 +:103CF0001B2901D8012070470020704770B5054688 +:103D0000C1700E2926D20800784400790018874433 +:103D100006131517191B1B151D1D1B1B1F150C2426 +:103D20001DE000007372635C756C5F7064752E63D8 +:103D30000000000001020000082410E002240EE050 +:103D400017240CE00D240AE0012408E0092406E011 +:103D5000062404E000249A499A4807F0FCF96878A0 +:103D6000400940012043687070BDC0787047C17140 +:103D7000090A01727047017AC2790802104370473C +:103D80004172090A81727047817A427A08021043AF +:103D90007047C172090A01737047017BC27A080239 +:103DA000104370474171090A8171704781794279E6 +:103DB00008021043704701717047007970474173E2 +:103DC000090A81737047817B427B08021043704768 +:103DD00070B4017AC37909021943431C857A1C46E1 +:103DE000467A2B023343657926792C023443C21C70 +:103DF000754E00798D1FB54215D8FF25F435AB42BD +:103E000011D800280FD008280DD888420BD28C4238 +:103E100009D8507A117A00020843B11D884202D8AD +:103E200070BC0120704770BC0020704710B5001DA9 +:103E300007F082FA10BD0A4610B5011D104607F0C2 +:103E40007BFA10BD4172090A81727047817A427A09 +:103E5000080210437047017170470079704710B530 +:103E6000001D07F081FA10BD0A4610B5011D10466D +:103E700007F07AFA10BD0A780273497841737047E7 +:103E8000027B0A70407B4870704710B50E3007F017 +:103E90006BFA10BD0A46014610B50E31104607F008 +:103EA00063FA10BD0A7882754A78C2758A780276FC +:103EB000C97841767047827D0A70C27D4A70027E61 +:103EC0008A70407EC870704710B5001D07F04CFA2C +:103ED00010BD0A4610B5011D104607F045FA10BD89 +:103EE0000A7802734A7842738A788273C978C173F8 +:103EF0007047027B0A70427B4A70827B8A70C07B6B +:103F0000C8707047017170474171090A817170472B +:103F1000C171090A0172704700797047817942794D +:103F2000080210437047017AC279080210437047B3 +:103F300001717047007970470171704710B5001D1D +:103F400007F012FA10BD0A4610B5011D104607F021 +:103F50000BFA10BD10B5001D07F006FA10BD0A4699 +:103F600010B5011D104607F0FFF910BD70B51546DC +:103F70000E4604461B2A03D91149144807F0EBF8F2 +:103F80002A463146E01C06F05CFF6078E9064009ED +:103F90004001C90E0843607070BD70B50546407899 +:103FA0000E46C406E40E1B2C03D90549084807F049 +:103FB000D2F82246E91C304606F043FF204670BD89 +:103FC000243D0100A10200007A0C0000F103000072 +:103FD000FD03000070B504460020A083208C1E461F +:103FE00048431546114606F0A3FF2084F0002946F9 +:103FF00006F090FF401C80B20146192269439202EC +:10400000E083914201DD401EE0837D2029460002CD +:1040100006F080FF401CA08470BD70B50A7BD206FC +:10402000D20E0A73002282758B181B7ADC075B089C +:10403000DD07E40FED0F2C195B08DD07ED0F2C19E0 +:104040005B08DD07ED0F2C195B08DD07ED0F2D195F +:104050005C08E307DB0F5B196508EC07E40FE41865 +:104060006B081B1984186374847D521CE318D2B248 +:104070008375052AD8D3D8B2252803D9E1A18A208F +:1040800007F069F870BD70B504460B462546264614 +:10409000214600202835C0368031032B0AD0002B62 +:1040A0003AD0012B41D0022B03D1A11C2846FFF7A7 +:1040B000B4FF70BD2880A871E871E8722873687336 +:1040C000A873A870E870287168716876A8832B4679 +:1040D00068842033987128859872E8752876E8738B +:1040E0002874D872187398731A752884FF22603563 +:1040F000AA709875088248828882C882088348839B +:104100004877C884A4221055088748872421085579 +:1041100060843070B07170BDC8848877A1882389AD +:104120000A462846FFF756FFBFE7C884F38A728A1B +:10413000A1882846FFF74EFF70BD70B504460346C0 +:1041400028348033054603290AD0002933D00129B9 +:1041500038D0022903D1A91C2046FFF75EFF70BDAD +:1041600000202080A071E071E07220736073A07362 +:10417000A070E070207160716076A0832146608439 +:104180002031887120858872E0752076E073207474 +:10419000C872087388730A752084FF226034A27085 +:1041A00088751883987618742421586148551877B3 +:1041B000A035287370BDA9882B890A462046FFF7D1 +:1041C00009FFC8E7586AA988C38942892046FFF7D2 +:1041D00001FF70BD70B5867D0D460446002E01D0EE +:1041E000252E01D9122070BD002A18D0287EE17D2D +:1041F00050430818252106F08DFEE1750846CA08CF +:104200004907490F834BAA18595C127A914308D089 +:10421000314606F07FFE491CCAB200200AE00020A9 +:1042200070BD2076002070BD002803D02118097CC5 +:10423000511ACAB22118497C91423AD32918097AF5 +:10424000C943CB07DB17D21A521E1206120E35D005 +:104250008B07DB17D21A521E1206120E32D04B07F2 +:10426000DB17D21A521E1206120E30D00B07DB17C4 +:10427000D21A521E1206120E2ED0CB06DB17D21AFD +:10428000521E1206120E2CD08B06DB17D21A521EAB +:104290001206120E2AD04B06DB17D21A521E120635 +:1042A000120E28D00906C917511A491E0A06120E05 +:1042B00026D0401C0528B7DB1F2070BDC00020762B +:1042C000002070BDC000401C2076002070BDC000E2 +:1042D000801C2076002070BDC000C01C207600200D +:1042E00070BDC000001D2076002070BDC000401DC4 +:1042F0002076002070BDC000801D2076002070BD9B +:10430000C000C01D2076002070BD70B50D4604466B +:10431000072904D9FF203BA15D3006F01CFFE0789F +:10432000502108406907490F88300843E070A078A1 +:10433000A72108401830A07060785E210840203026 +:1043400060702078BC2108404030207070BD017939 +:10435000490901D000207047002230B41146445C66 +:10436000491CE3076408E507DB0FED0FEB18640851 +:10437000E507ED0FEB186408E507ED0FEB1864088F +:10438000E507ED0FEB186408E507ED0FEB1864087F +:10439000E507ED0FA407EB18E40FE318D218D2B22B +:1043A0000529DCDB002A02D030BC0120704730BC7C +:1043B0000020704738B505460C466846FCF74EF8B5 +:1043C00000281ED069460020085620720921615637 +:1043D0000022411A00D549422035EB788B420FDC90 +:1043E000FF2B0DD0A17A491CC9B2A1722B79994239 +:1043F00002D8617A7F2903D160720020A072012265 +:10440000104638BD7372635C6C6C5F7574696C2E9A +:104410006300000044B40100F8B50024F74EFF200B +:10442000B470F0702546F64F06E0042D04D3FF204B +:10443000F4A1AB3006F08FFEFF212846A03148439F +:10444000FF213331C0194A1C0C540146FF3114546A +:1044500021310C754C75F178A94202D1B470FF215D +:10446000F170FF219D314A1C6D1C0C54EDB21454A7 +:10447000042DDAD30020FF21A0314143C919FF31B7 +:1044800081318C77401CC0B20428F4D3E048FFF798 +:10449000ABFB0021DE48FFF7E7FB0121DC48FFF71B +:1044A000A8FBDC49FF20087048708870C87008714C +:1044B0004871F8BDB0E71B20704710B4D04A002106 +:1044C000FF23A0334B439B18FF3381339B7F002B8B +:1044D00004D0491CC9B20429F2D30DE004290BD23F +:1044E000FF23A0334B439A180124FF328132947783 +:1044F0000170204610BC704710BC0020704730B4DB +:104500000025042825D2FF220146A0325143BC4A8F +:1045100089180B46FF3381339A7F002A19D0FF2474 +:104520003334621C655455541A46603A15755575F6 +:10453000B24AD478844202D19570FF20D070FF2017 +:104540009D304554FF319E310D709D7730BC012068 +:10455000704730BC0020704704280ED2FF2201466D +:10456000A0325143A64A8918FF318131897F002941 +:1045700003D0A8494871012070470020704710B44B +:10458000A449FF224979A03251439D4A82B089183B +:104590000A46FF322132937C6C462370D27C227112 +:1045A000237822795A40802A0AD022782223520680 +:1045B000520E5A435118016002B010BC01207047DE +:1045C00002B010BC002070479248FF214079A03112 +:1045D00048438B4981B041180846FF303330FF31E2 +:1045E0002131CA7C69460A7003780922097859404A +:1045F00080290ED0037869460B7009784906490E68 +:10460000491C914208D26A461178491CC9B21170FE +:1046100009E0002001B0704769460978090601D514 +:10462000002100E080210170012001B070470428C2 +:104630000ED2FF220146A0325143714A8918FF3140 +:104640008131897F002903D07249087101207047A8 +:104650000020704710B46F49FF220979A0325143FE +:10466000674A82B089180A46FF322132947C6B4631 +:104670001C71D27C1A701C781A7994420AD01A786C +:1046800022235206520E5A435118016002B010BC48 +:104690000120704702B010BC0020704738B55D485B +:1046A0000179FF20A0304143554808180146FF31E9 +:1046B00021318A7C6C4622700922FF303430037825 +:1046C0002478A34223D004786B461C701B785B06C9 +:1046D0005B0E5B1C934205D26B461A78521CD2B219 +:1046E0001A7006E06A461278120601D5002200E030 +:1046F00080220270087D401C0875087D497D884233 +:1047000003D140A1444806F026FD012038BD002019 +:1047100038BD4048FF210079A0314843384940184E +:10472000FF302130C17C807C814201D10120704763 +:10473000002070473748FF210079A03148433049B5 +:104740004018FF302130817CC27C092013464B4049 +:10475000802B0AD049065206490E520E914201D3CF +:10476000881A01E0511A401AC0B2704709207047F8 +:104770000022042813D2FF23A0335843204BC01833 +:10478000FF239F331B5C002B09D0FF300A702130C0 +:10479000027D437DD31A0B704275012070470020C3 +:1047A0007047042811D2FF22A0325043144A8018C7 +:1047B000FF229F32125C002A07D0FF302130027D99 +:1047C000407D101A08700120704700207047104982 +:1047D0000160704704280ED2FF220146A0325143E7 +:1047E000074A8918FF318131897F002903D009499F +:1047F000087001207047002070470000101800204A +:10480000141800207372635C646D5F712E63000086 +:10481000901E0020C70000205A020000AC49CA7850 +:10482000FF2A03D000210160084670478A78A94911 +:10483000012A02D001600120704700207047A6487D +:104840000178012907D001210170A4480178A0480E +:10485000C170012070470020704704280ED2FF224B +:104860000146A03251439E4A8918FF318131897F28 +:10487000002903D0994948700120704700207047F3 +:104880009349964BCA785B789A4206D18A78203948 +:10489000002A02D0016001207047002070478C4838 +:1048A0008E4AC1785278914209D1FF21C170801C93 +:1048B0000178002903D000210170012070470020F9 +:1048C00070478348854AC1785278914204D18078F4 +:1048D000002801D0002070470120704704280ED224 +:1048E000FF220146A03251437D4A8918FF318131B0 +:1048F000897F002903D07949C870012070470020C2 +:10490000704710B47549FF22C978A0325143744AE8 +:1049100082B089180A46FF328132147F6B461C70C0 +:10492000527F1A711C781A79FF3162403731802A20 +:104930000AD01A7822235206520E5A4351180160A7 +:1049400002B010BC0120704702B010BC00207047BC +:104950006248FF21C078A0314843614981B04118C5 +:104960000846FF309D30FF3181314A7F69460A7029 +:10497000037803220978594080290ED003786946CC +:104980000B7009784906490E491C914208D26A46C3 +:104990001178491CC9B2117009E0002001B07047BC +:1049A00069460978090601D5002100E080210170DF +:1049B000012001B070474948FF21C078A031484329 +:1049C00047494018FF308130417F007F814201D14B +:1049D000012070470020704704280ED2FF220146B4 +:1049E000A03251433E4A8918FF318131897F002925 +:1049F00003D03A498870012070470020704710B4F6 +:104A00003649FF228978A0325143354A82B089184D +:104A10000A46FF328132147F6B461C71527F1A7036 +:104A20001A781B79FF3137319A420BD06A461278D7 +:104A300022235206520E5A435118016002B010BC94 +:104A40000120704702B010BC002070472348FF21AE +:104A50008078A0314843224981B04018FF219D3120 +:104A6000095C6B4619700321FF309E3002781B7879 +:104A70009A4219D003786A46137012785206520E81 +:104A8000521C8A4205D26A461178491CC9B211707B +:104A900006E069460978090601D5002100E0802179 +:104AA0000170012001B07047002001B070470B4831 +:104AB000FF218078A031484309494018FF308130F8 +:104AC000417F007F814201D1012070470020704763 +:104AD00010180020F017002012180020C700002036 +:104AE00014180020F8B5FD4F0A46044600207978D6 +:104AF000FB4D0646002902D0012909D00FE0F949F3 +:104B0000497A00290BD0002A08D10120787005E0ED +:104B1000A97F002903D0002A00D17E700120797876 +:104B20002B23594349198B7F034311D0002A22D1EB +:104B30002A22A01C1F3106F084F966700420207020 +:104B40000120A07078782B2148434019867712E025 +:104B50002878012801D00020F8BD002A0BD166700A +:104B6000132020701C22A91CA01C06F06AF9A67153 +:104B70002E70DD48C6770120F8BDD948017800299C +:104B800001D080887047D9487047F8B5D44E0746A1 +:104B9000B07F00282DD13846FEF7DCFE002101252C +:104BA000D34C072824D202007A44127992189744F1 +:104BB0000305081F1F1F0A00217006E025702172DF +:104BC00008E0032000E002202070CA493846FEF7C2 +:104BD00015FF20723846FEF7DAFE6070C649384687 +:104BE000FEF7C1FEBD4CC54F20787F2807D101E0FC +:104BF0002172F8BDFF20C2A1543006F0ACFA207833 +:104C000038707F202070B577032002F0E7FEF8BDF2 +:104C100010B5002002F072FE002812D0FBF79CFBBA +:104C200000210120FBF7A0FABA48FBF7ACFBAE4C21 +:104C3000A06AFBF7ABFB2079032805D0022803D03C +:104C400006E000F0F3FD10BD01210020FBF716FC8B +:104C5000FBF7FBFBB04C6078002803D0FBF77DFF2F +:104C6000FBF7D9FB0320E07010BD70B59E4900280A +:104C7000CA8D08D0FF2A0DD25004000CC885FF2829 +:104C800008D9FF2005E0012A04D95008C88501D1C0 +:104C90000120C88591484268012A01D0002A01D12B +:104CA0000D224260D24317239B4C5A43637B3B2522 +:104CB000DB436B43D2184260C98D900C06F02AF991 +:104CC000617370BDF8B5944CE078022804D0E078A8 +:104CD000012801D00C20F8BD0020814A05462B2177 +:104CE000414389188D77401CC0B20228F7D3157054 +:104CF0006078002804D0FBF796FBFBF73FFF657058 +:104D0000794845778577C5778449257001228A7768 +:104D10000571A570CA760A774A77714E0146324608 +:104D2000736F7432B46FF66FD7688B60CC600E61AE +:104D30004F6112698A6105770020F8BD10B5764A87 +:104D40000023D3701371684B596318630120D0702E +:104D5000FFF7B8FF002803D069A1714806F0FBF9FE +:104D600010BDF1B582B00C2001906B480090C07866 +:104D7000012806D00098C078022802D00C2003B089 +:104D8000F0BDFBF7F0FA0020FBF7B1F8564C207F9E +:104D9000002837D0524920460F4682687437C368CE +:104DA000056946694A678B67CD67FE60806938612F +:104DB00000266677A677594DE87E002805D1287F22 +:104DC000002802D1687F00281AD0009800780028B7 +:104DD00016D02079032802D0022805D008E005214A +:104DE000504800F040FD03E003214E4800F03BFD39 +:104DF000A97E3846FBF7F3F80020019026770CE0F7 +:104E0000267703E00098C078022804D00098C07884 +:104E1000022828D00AE0002001900098C0780128DC +:104E200004D10099087300980221C170606B017869 +:104E3000002903D00178001DFBF714F9206B0178DD +:104E4000002906D0384A401CFBF777FE0099012064 +:104E500048700298A0623548FBF717FAFBF78EFA04 +:104E6000019803B0F0BD00990120C8700C2003B078 +:104E7000F0BD70B5FBF777FA274CE078022803D035 +:104E8000FBF77CFA0C2070BD012017496073C885C0 +:104E90000220FBF765FA2648FBF739F9254E002575 +:104EA000A0780321401C06F035F8A170885D012828 +:104EB00044D06D1CEDB2032DF2D3FFF7A9FE20798B +:104EC000002809D0012807D002283DD003283BD074 +:104ED0000BA1194806F03FF9002070BDD00000205A +:104EE000B41E0020F41E0020341F0020FFFF00002D +:104EF000D41E0020DD1E0020D61E0020FC1E002037 +:104F00007372635C6C6C5F64645F7363616E2E6369 +:104F1000000000006C1F0020541F0020141F002000 +:104F200051030000941F00206F1F00204CB40100AB +:104F300052B401002F1F0020EA030000C8B2FC4950 +:104F4000085CFBF7F6F8B8E7EEF762F8C4E770B56F +:104F5000F84C0125A577E37F002B01D03A2070BDE6 +:104F60000026002802D1A07B884209D1A173667770 +:104F70001146F14806F0EBF96577F04805702577A2 +:104F8000A677002070BD024600200123E949002ACF +:104F900003D0012A03D0122070478B7400E088747C +:104FA0000B774A767047E34A032800D151611076A7 +:104FB0000120107700207047E049012803D0032822 +:104FC00001D0002000E0012008717047D948017F1E +:104FD000002903D0407E002803D170474079002883 +:104FE000FBD00120704710B5FBF709FAFBF7FCF97D +:104FF000FBF708F9FBF7AAF9D04C6078002805D038 +:10500000FBF711FAFBF7BAFD002060700120207356 +:105010000220E070FBF7B2F9002010BDC7494871CB +:10502000704710B500F002FC10BDF0B5C44EC34D82 +:1050300083B0002810D0C348FEF766FD002804D1D5 +:10504000C048FEF781FD002806D0BA4C207903281D +:105050000DD1A07F00280AD0E87805286BD2010086 +:105060007944097949188F44666666F7F600E8784E +:1050700005287AD201007944097949188F44757559 +:105080007502EE00AF48FEF765FCAD498870AE488A +:105090000190807F002803D1FBF736F8002800D06C +:1050A000012000906878002813D00526761EF6B2FD +:1050B000FBF785FD0746022805D1002EF6D1A3494E +:1050C000A34806F048F80098002810D1012F0ED010 +:1050D00000909B4F9F4EB878072871D20100794409 +:1050E000097949188F446DFE056C6C6C280001200D +:1050F000EEE76878002803D0FBF795F9FBF73EFD53 +:105100008F48FBF7ABF9002801D17F203870FBF7FF +:1051100093F9009800280AD02079012801D00228AC +:1051200005D1FBF76FF88748FFF72FFD37E2FBF754 +:1051300069F8FFF76DFD34E26878002803D0FBF7CB +:1051400072F9FBF71BFD7E48FBF788F9002801D1B7 +:105150007F203870FBF770F90098002879D020790B +:10516000022803D001287AD047E221E27548FFF7F0 +:105170000CFD012002F0C2FB00286ED07649714878 +:10518000FEF710FC7448FBF7FEF8607F00280ED095 +:105190006848019902898A824289CA828089088383 +:1051A00031466D48FEF7DAFB00206077A0770121D9 +:1051B0000846FBF763F9FBF703F90520E870F0E117 +:1051C0005BE16878002803D0FBF72DF9FBF7D6FCEC +:1051D0005B48FBF743F9002801D17F203870FBF7CB +:1051E0002BF90098002834D02079022808D0012813 +:1051F00035D0032837D05549584805F0ACFFD0E1E9 +:105200005048FFF7C2FC012002F078FB002824D0B0 +:1052100051494C48FEF7C6FB4F48FBF7B4F8607F96 +:1052200000280ED04348019902898A824289CA82A5 +:105230008089088331464848FEF790FB002060775C +:10524000A07701210846FBF719F9FBF7B9F805200B +:1052500001E10EE103E0BFE1ADE1B3E022E1394855 +:10526000FFF793FC9BE137482168C2780B7F9A4295 +:105270001DD102794B7F9A4219D142798B7F9A4294 +:1052800015D18279CB7F9A4211D10A462032C37957 +:105290001778BB420BD1037A5278934207D100783A +:1052A000CA7E4006C00F904201D1012000E00020DC +:1052B0006279012A30D0002800D138E7022002F0BC +:1052C0001DFB00287ED0012002F088FB22491D48EA +:1052D000FEF768FB2068018B1F48FEF7F9FB20688A +:1052E000817D00E03CE01C48FEF7F6FB1A48FBF726 +:1052F0004AF8607F002866D00E48019902898A82A8 +:105300004289CA828089088331461348FEF726FB0A +:1053100000206077A0779BE00028CFD109481C319E +:10532000FEF721FB0748FEF732FB2168C876C5E788 +:105330004FB40100341F00203C1F0020541F0020E8 +:10534000D00000206C1F0020141F0020004F01001F +:10535000D4040000281F0020941F0020CC0500006A +:105360006878002803D0FBF75EF8FBF707FCF948E4 +:10537000FBF774F8002801D17F203870FBF75CF848 +:105380000098002875D0FAF733FE002871D02079F4 +:105390000328F14804D0FFF7F8FBFAF733FFFEE0EB +:1053A0002168C2780B7F9A4220D102794B7F9A42C2 +:1053B0001CD142798B7F9A4218D18279CB7F9A4255 +:1053C00014D101E056E043E00A462032C379177851 +:1053D000BB420BD1037A5278934207D10078CA7E40 +:1053E0004006C00F904201D1012000E00020627908 +:1053F000012A32D0002800D199E6022002F07EFA7C +:10540000002837D0012002F0E9FAD449D248FEF74B +:10541000C9FA2068018BD148FEF75AFB2068817DCC +:10542000CE48FEF759FBCD48FAF7ADFF607F002864 +:105430000ED0CB4901980A8982824A89C282898921 +:1054400001833146C548FEF789FA00206077A077CE +:105450000120E0770620E870A3E00028CDD1BE4807 +:105460001C31FEF780FABC48FEF791FA2168C87635 +:10547000C3E7C2E000F0DAF993E06878002803D0CF +:10548000FAF7D1FFFBF77AFBB248FAF7E7FF0028FB +:1054900001D17F203870FAF7CFFFFAF7B3FEFFF79C +:1054A000B7FB7EE0AC48FEF755FAB070AA48AB49AE +:1054B000C3784A7A93421CD103798A7A934218D1ED +:1054C0004379CA7A934214D183790A7B934210D1EB +:1054D000C3794A7B93420CD1037A8A7B934208D1E9 +:1054E000007809784006C00FC909884201D101241B +:1054F00000E00024FAF786FEB07804283ED1002CA4 +:105500003CD09448FAF7AAFF002801D17F203070E0 +:10551000FAF792FF287B002802D00020FFF7A5FBB6 +:105520000120904C28738C4F607A002837D10420DA +:10553000E0723846FEF72BFA002801D0012800D18E +:10554000207389493846FEF70EFA88493846FEF737 +:1055500087FAE0741F2801D91F20E0743078844F47 +:105560007F2804D1FF208349543005F0F4FD3078C2 +:1055700038707F2030700120607210E07548FAF7B3 +:105580006DFF002801D17F203070FAF755FF287B8E +:10559000002802D10120FFF768FB00202873FFF7E5 +:1055A00037FBE87802283DD0E87804282DD127E0A1 +:1055B0007049714821E66878002803D0FAF733FF74 +:1055C000FBF7DCFA6348FAF749FF002801D17F2096 +:1055D0003070FAF731FF10E05E48FAF73FFF00281D +:1055E00001D17F203070FAF727FF287B002802D1F5 +:1055F0000120FFF73AFB00202873FAF703FECEE7FD +:1056000037205C49400105F0A6FD2879002809D023 +:1056100001280ED0022807D0032810D0554957483A +:1056200005F099FD03B0F0BDE878032807D003B07A +:10563000F0BDE878062802D0E8780528F7D10120E7 +:10564000FAF7D2FF03B0F0BD70B54D4CE0780728F3 +:105650005FD201007944097949188F445A5A5A5A3D +:105660005A030B003C48FAF78EFEFAF7EEFE0420D0 +:10567000E07053E0FAF7C3FEFAF7B6FEFAF7C2FDA0 +:10568000FAF764FE012626730220E070FAF776FE30 +:105690003C4D2878002803D036493B4805F05BFD97 +:1056A0000020A8702E4800684188A980C17EE97159 +:1056B000818B2981C18B6981018CA9818188E982D3 +:1056C000C188298300896883607928772F48304909 +:1056D000807EA8732F4805F03AFE6078002803D03A +:1056E000FBF76DFA012808D0687F40084000687712 +:1056F0002E70022002F072F910E0687F3043687764 +:10570000FBF776FA697F4000C907C90F0143697743 +:10571000EEE775201749000105F01DFDE07802282D +:1057200016D0E078032806D0E078042803D0114989 +:10573000194805F010FD2079002809D0012807D06C +:1057400002282DD003282BD00A49144805F003FD68 +:1057500070BD0000D00000206C1F0020941F0020AE +:10576000341F0020F41E0020011F0020081F00200D +:10577000271F0020004F01009E060000F5060000D4 +:10578000541F0020B41E002029070000141F002011 +:10579000281F0020C31E00205607000062070000DB +:1057A0000120FAF721FF70BD10B55C4CE0780528A8 +:1057B00020D201007944097949188F441B1B1B1919 +:1057C00002005748FAF74AFE002802D154497F20C8 +:1057D0000870FAF731FE207B002802D10120FFF784 +:1057E00044FA00202073FAF70DFDFFF711FA01E0EB +:1057F00000F01CF8E078022813D0E078032803D0EA +:105800004849494805F0A7FC2079002809D001281B +:1058100007D0022806D0032804D04249434805F0A7 +:105820009AFC10BD0120FAF7DFFE10BD10B5FAF7A3 +:10583000E6FDFAF7D9FDFAF7E5FCFAF787FD374CF4 +:105840006078002805D0FAF7EEFDFBF797F9002005 +:105850006070012020730220E070FAF78FFD0020B5 +:1058600002F0BCF810BD70B5314C054626466036D6 +:105870007434032943D0052940D1FEF741F80521AE +:105880002846FEF742F8B17E2846FEF778F8214612 +:105890002846FEF763F8274C284621680F31FEF7AB +:1058A000FBF8216828461331FEF7FFF82068817D58 +:1058B0002846FEF711F92068018B2846FEF708F903 +:1058C000206881882846FEF7F7F82068C1882846B6 +:1058D000FEF7F6F8206801892846FEF7F5F82168FA +:1058E00028460A31FEF70BF92068817E2846FEF72C +:1058F000F5F80A4841792846FEF7F9F870BDFDF73A +:10590000FFFF03212846FEF700F8B17E2846FEF788 +:1059100036F821462846FEF721F870BD541F0020B6 +:10592000D0000020004F010099070000A5070000EB +:10593000B41E0020341F0020F8B5FEF7FBFE04461D +:10594000FEF7BFFFF74E0546F0682030407B002889 +:1059500026D0012867D0022869D0032871D0FF2003 +:10596000F1A1793005F0F7FB3069F7220178114099 +:105970000170F2682032937BDB071B0F1943FB2376 +:1059800019400170D37BDB075B0F19430170577B14 +:10599000EF23022F60D0012F63D0032F65D06AE080 +:1059A000E548FEF76DFF002827D030690090F168C8 +:1059B000088DC9884018801D87B20098FEF7D5F978 +:1059C000012805D00098FEF7D0F9002808D00FE094 +:1059D000F06839468030C7850098FEF733FA07E053 +:1059E000F06839468030406A87800098FEF7E7F912 +:1059F000F168032020314873B6E7CF48FEF72AFE4E +:105A0000002804D0F0685321095C002907D0CA4857 +:105A1000FEF7DDFEF168012020314873A4E7022182 +:105A200020304173A0E7C448FEF7D1FE9CE7C2488E +:105A3000FEF710FE002897D1FF20BBA16B3008E0D5 +:105A4000FFE7BD48FEF71CFF00288DD1FF20B6A15F +:105A5000733005F080FB87E7012C08D8002D06D0B5 +:105A600009E06D1E2C4302D105E0002C03D0194043 +:105A70001023194300E019400170D17D002915D091 +:105A8000517B012912D0AD48FAF77DFCAC480121C9 +:105A90000176F268116E526E42610161A749326966 +:105AA000FAF7D7FF0020FAF7E3FF03E0FAF76BFC01 +:105AB000FBF701F801210846FAF7E0FC03203070FB +:105AC000F8BD08282FD203007B441B79DB189F44C4 +:105AD00003060B0E11152528002926D023E00229E4 +:105AE00023D0032921D01EE007291ED01BE008295E +:105AF0001BD018E00A390B2917D914E00D2914D04E +:105B00000C2912D0002A04D00D290CD315290CD948 +:105B100009E0112907D3152907D904E0092904D080 +:105B200001E0012901D0002070470120704730B505 +:105B3000054683B08048FEF771FE002803D17AA1A4 +:105B4000804805F008FB774C2069FEF74DF80321EB +:105B50002069FEF76AF82069EF2201781140017090 +:105B60002946FEF7CBF80D2D76D22800784400792F +:105B7000001887441F1606448080840E7280848437 +:105B800060006848C16800698031497FFEF763F9A9 +:105B900075E06448C16800698031497AFEF7CCF944 +:105BA0006DE06048C16800698031896A491CFEF770 +:105BB0003DF964E05B4CE0688030406A817920699F +:105BC000FEF7F9F8E0688030406A01892069FEF745 +:105BD000E9F8E0688030406A41892069FEF7C7F83B +:105BE000E0688030406A81892069FEF7C9F8E06882 +:105BF0008030406AC1892069FEF7CBF83FE0494C0C +:105C0000E0688030416A2069091DFEF728F9E068E4 +:105C10008030416A20690C31FEF72DF9E068803050 +:105C2000416A20691E31FEF730F9E1682069803150 +:105C3000FEF738F923E03B4CA06901782069FEF7B4 +:105C400061F9A06981882069FEF75EF9A069418841 +:105C50002069FEF75DF912E00DE000200090694632 +:105C60000190087801210843694608702D480069B1 +:105C7000FEF764F903E02CA1334805F06CFAFEF757 +:105C8000DEFD002803D128A1304805F064FA0C2D70 +:105C90000ED0072D0ED0012D0AD0002D08D0022DD8 +:105CA00006D020480021C068403041810121817325 +:105CB00003B030BD1B480021C0684030018203B0F2 +:105CC00030BDF0B5174C8DB02079C0077ED060791B +:105CD00000287BD16069C0780E2878D20100794411 +:105CE000097949188F44737306733D5DE25C73FD57 +:105CF0007334FCA5E06854210A5C2030417D01200A +:105D0000FFF7DFFE00284BD16069FEF7A6F8E168D7 +:105D10009E22505402223520425400204031887483 +:105D20008873EFE1D80000207372635C6C6C5F6D68 +:105D300061737465722E6300E8000020E21F00208A +:105D40000820002083060000C7060000CD060000E2 +:105D5000E0682030C17C0A297ED10021C1750D2167 +:105D60001DE0E0683321095C0E2975D1A421095892 +:105D700040884988814203D0FAA1FE4805F0EBF93A +:105D8000E0688030416A60692631FEF7A2F8E16878 +:105D900060698431FEF7ADF8E06811212030C174EC +:105DA000B0E1E1683320405C112855D180318C4648 +:105DB0004B6AF14810260022082168440E33B51AB8 +:105DC000ED18203DEF7F4770AD7F01E0A2E17AE161 +:105DD0008570801C491E921C0029F0D161464B6AD7 +:105DE00003A810260022082103301E33B51AED182F +:105DF000203DEF7F4770AD7F8570801C491E921C4F +:105E00000029F3D16846FCF746FA08AD8DCDE1686C +:105E100000260E664E660D4670318DC10126203576 +:105E2000EE75D64E8DC6D64805F09EFA1320E8745E +:105E300068E1E0683321095C112901D00E293AD1CB +:105E40004030007D002836D16069FEF773F8E168C4 +:105E50000B460A46803300E02DE0187200254031E1 +:105E6000CD748D73586A51884088884203D0BDA193 +:105E7000C44805F070F9E06801468030426A157048 +:105E8000826B1378002B03D0D920B6A1800033E0B9 +:105E90004B88D380836B027A1A71826B1572836B85 +:105EA0000B221A70806B4988418008E1E068332139 +:105EB000095C152902D00220607123E1014600250A +:105EC0004031CD748D73A42109584088498881429E +:105ED00003D0A4A1AC4805F03EF9E068014601E01A +:105EE0002CE094E080314A6A15708A6B1378002B9D +:105EF00005D071209BA1C00005F02DF9DFE003461D +:105F000040331E7D002E0BD01D754388D3808A6BD5 +:105F100015718B6B0C221A70896B40884880CEE01B +:105F20004388D3808A6B15718B6B01221A728B6B3D +:105F30000B221A70896B40884880C0E0E0685421C9 +:105F40000A5C2030017D0020FFF7BBFD00280DD149 +:105F5000E06854210A5C2030C17C0720FFF7B1FDC6 +:105F6000002803D16079012108436071607900281D +:105F70004CD1E0684030807D800715D46069FDF722 +:105F8000CBFFE1684031C8756069FDF7C7FFE16884 +:105F9000403108836069FDF7C6FFE16802224031A5 +:105FA0004883887D10438875E068014640318A7DCA +:105FB000D20716D10A7D2030017D0020FFF781FD38 +:105FC000002803D167A1714805F0C5F8E0680121F8 +:105FD000342211540623A02213544030817400212E +:105FE0000182E06801462031CA7C012A03D10022E7 +:105FF000CA744E210A54A421095840884A88824212 +:1060000004D1087806287DD1002008707AE0E06885 +:1060100054210A5C2030C17C0620FFF752FD002885 +:1060200003D160790121084360716079002869D14A +:1060300069466069FDF793FF68460078C107C90F9C +:106040006846017004D0E06801214030017703E028 +:10605000E068002140300177E06800254E210D54B2 +:10606000A421095840884988814203D03DA148486D +:1060700005F071F8E06802468030416A0D70816B6E +:106080000B78002B04D037A1424805F064F816E0E5 +:106090005388CB80816B6B460D71816B1B880B81A4 +:1060A0006B465B884B816B469B888B816B46DB889C +:1060B000CB81836B06211970806B51884180E06829 +:1060C0002030C5741EE0E06854210A5C2030017D58 +:1060D0000020FFF7F6FC002803D160790121084376 +:1060E0006071607900280DD16069FDF73EFEE168BE +:1060F0008922505405223420425400204031088225 +:1061000001208874E2680023916ED06E491C5841CA +:106110009166D0660DB0F0BDF8B5FAF770F9FAF7F0 +:1061200063F9FAF76FF8FAF711F9FAF7C4FCFAF71E +:1061300025F9194CE06820300079012801D1FAF7DF +:106140007BF9E068012502462032917D002908D1C3 +:10615000E178CB0701D1890703D59575012101F0BD +:10616000F9FB1BE07372635C6C6C5F6D617374654B +:10617000722E630021030000FFFFFFFF08200020B4 +:10618000212000205F03000083030000C303000000 +:10619000F1030000F6030000D8000020E07900269B +:1061A00000284FD100F06DFDF848FEF737FB0028BE +:1061B00048D06079002845D1E06854210A5C20303D +:1061C000417D0120FFF77DFC00283BD1E0680246BD +:1061D0008032117F002901D0022051E00346203394 +:1061E000D97C05292AD0E927FF000C292DD00D29BB +:1061F00029D0132943D01B7D012B4BD0052B42D036 +:10620000526A1378002B61D0528843889A425DD13C +:106210004030027D0020FFF754FC00287FD0E0686A +:10622000A42109580978891E062978D20A007A44DF +:106230001279921897443A3C7373658CD449D548C7 +:1062400004F089FFB6E00B201AE0F5F71AFF0C28DE +:106250007DD3E06808218030406A1E30F5F712FFD8 +:10626000002806D0E06804218030F5F70BFF0028F5 +:1062700003D1C749384604F06EFF032000E0062032 +:10628000FFF755FC96E00720FFF751FCE06820304F +:1062900006758FE00C20FFF74AFCE06801464030AD +:1062A000827D2A43827520310E7583E000200BE049 +:1062B0002030C17D00290AD0007E002803D1B449D6 +:1062C000B54804F048FF0A20FFF731FC27E0F5F756 +:1062D000D8FE0C2823D3E06808218030406A1E30A5 +:1062E000F5F7D0FE002806D0E06804218030F5F7ED +:1062F000C9FE002803D1A649384604F02CFF03202C +:10630000E2E74030807D800709D10C20FFF70FFCC9 +:10631000E068403046818573817D294381759B48C3 +:10632000FEF77CFA002845D0E06854210A5C203052 +:10633000C17C0020FFF7C5FB00283BD0E168AC2002 +:10634000405C002836D0E0690078002802D031E0B7 +:106350000820B9E7088D0A282CD905220A31206ABD +:1063600004F042FD002822D0E0688030816A08787D +:1063700000280CD00522491C206A04F035FD0028B5 +:1063800018D1E0688030806A0078002806D1E06883 +:10639000216A8030806A401C04F0CEFFE0688030C3 +:1063A000806A0178491C01700120FFF7C0FBE0689A +:1063B000A0300673E078C007E06802D040308680E5 +:1063C00003E040308188491C8180E0689C21095CA1 +:1063D000002908D154210A5C2030417D0120FFF7BB +:1063E00070FB002804D0E06840300189491C01811D +:1063F000E0793D21002804D0E0684030817045708C +:106400005AE0207A02280AD001280AD060790028B0 +:106410001AD0420701D4C2060AD51E21ECE7162184 +:10642000EAE7E0689E21095C40308170457043E0F6 +:106430000207E1D4C10705D1800703D45449574866 +:1064400004F089FE2A21D7E7E06802464032917BBA +:10645000002905D05389591C518191898B4213D24F +:10646000917C002905D0118A4B1C13829389994293 +:106470000AD21789D3889F4203D39C21095C002943 +:1064800002D191898F4203D322209070557013E07E +:106490003621095C0029918805D0994209D308204A +:1064A0009070557008E0062903D33E209070557017 +:1064B00002E05178002908D0E06801462031CE740E +:1064C0000E758E752570022101E02570002101F006 +:1064D00041FAF8BDF8B50C4616466946FDF710F9C5 +:1064E000002801D00020F8BD009800250246803029 +:1064F000816B0B78072B1CD0A71C0C2B29D00B2BE6 +:1065000034D0062B4CD01146A031087C0028EAD0AC +:10651000657012202070087C002808D0A2320D740B +:10652000108A6080508AA080087C0028F7D1012062 +:10653000F8BD002EFBD1657007212170816B0A2206 +:10654000A01C091D04F07DFC00988030806B057054 +:10655000EDE7002EEBD165700C212170816B8A88EC +:106560006280C988A180806B0570E0E7002EDED1D3 +:1065700065700B212170816B8A883A80CA887A8085 +:106580000989B980806B0570D1E70000E800002020 +:1065900064610100BE0500007905000032020000C0 +:1065A000002EC4D1657006212170816B8A883A80E3 +:1065B000CA887A800A89BA804A89FA808A893A81A7 +:1065C000CA897A81806B0570B1E7FE48007801289E +:1065D00001D00C2070470020704770B5F94C05467B +:1065E0002078002803D0F849F84804F0B4FD0020D2 +:1065F000A5616072012020702078012803D0F24943 +:10660000F34804F0A8FD70BDF8B5EE4C21780129DF +:1066100001D00C20F8BDE0608030807AFEF707F8EA +:1066200000283AD0E0688030807AFEF757F90028D9 +:1066300033D0E0688030807AFEF7CCF800282CD088 +:10664000E0688030807AFEF708F9002825D0F9F755 +:106650008AFE0026E6710120F9F749FCE068014650 +:1066600040318A7B002A03D04A898B899A4211D211 +:106670008A7C002A03D00A8A8B899A420AD20B8923 +:10668000CA88934206D236231B5C8988002B06D029 +:10669000914206D30120A0703BE01220F8BD0629EC +:1066A000F8D2A6701330F9F7F0FDE0680F30F9F773 +:1066B0002EFD0320F9F754FEE06805462030017EE8 +:1066C000002902D1C07D002809D0294670318EC929 +:1066D000C0488EC02946C048803104F045FE98204D +:1066E000405BA91C401C82B228462830FDF772FD91 +:1066F000002803D0B449B94804F02DFDE0684030CB +:106700000078F9F716FDF9F727FE01210020F9F7C7 +:106710002BFDE67026716671A6712672022020702C +:10672000E06880300683F9F729FE0020F8BD10B537 +:10673000F9F719FEA34C2078022803D0F9F71EFEC2 +:106740000C2010BDA078002802D0FFF7E5FC17E070 +:10675000F9F736FEFFF7F0F8E068203000790128FD +:1067600001D1F9F772FE607A002809D0012809D01A +:10677000022805D0032805D09349994804F0EBFC82 +:10678000002010BDECF744FCFAE770B505468030F8 +:10679000018B2C46491C01834034A188491CA180EF +:1067A000A17B002902D06189491C6181A17C00295B +:1067B00002D0218A491C2182007F002807D1352080 +:1067C000415D227D0120FFF77CF9002802D020895D +:1067D000401C2081284600F0EBF9002070BD79496B +:1067E00048727047774A1162D0617047F8B5754CAE +:1067F0002078032803D074497A4804F0ACFCE1689F +:1068000004272031887A0025002803D08D72207952 +:1068100038432071206901260278D2439207002A6A +:106820001FD1CA7A002A1CD1CE72217902221143CB +:106830002171FDF79AFA062802D00B2811D10AE03F +:10684000E06801462030C27C132A0AD100228A6601 +:10685000CA66067605E0E0682030C17C0D2900D1CB +:1068600005762079400704D5E0682030407D022875 +:1068700005D06079002802D1A079002802D0FFF766 +:106880004BFC2AE05848FEF73CF8002801D0657020 +:1068900002E0667055486061E0682030007E0028A4 +:1068A00011D05348F9F76FFD4A480576E268916EBA +:1068B000D26E426101614E4A6169FAF7CAF801205D +:1068C000FAF7D6F804E06069F9F75DFDFAF7F3F836 +:1068D00002210020F9F7D2FD2770207801280CD082 +:1068E000607A002809D0012807D0022806D00328A2 +:1068F00004D035493F4804F02EFCF8BD0120F9F7DB +:1069000073FEF8BDF8B52F4C05462078042803D057 +:106910002D49394804F01FFC002D71D0FAF7E3F837 +:106920000125002812D1E0682030017E00290DD019 +:1069300061694A78D20609D00978C07B0907C90F76 +:10694000814203D1E571FFF7E7FBACE0E06820305E +:106950000079012811D1F9F76FFDE168881C283111 +:10696000FDF728FD002808D0E068B22142880A52CD +:106970003121095CA030017505746069002600783A +:106980004007C10FE0682030827B914255D0407BA8 +:10699000002852D002280FD1FDF780FE002803D135 +:1069A0000949164804F0D7FBE2680023106E516EC7 +:1069B000401C594151661066E06820304673C17A28 +:1069C00001291EE0D800002064610100EF070000EB +:1069D000FB07000008200020212000203A080000CA +:1069E0007A080000AF080000EC000020C01F002063 +:1069F000E21F0020F3080000FB080000FD05000076 +:106A0000B1E014D1C6722079082108432071FDF746 +:106A100046FF002803D1FE49FE4804F09CFBE268D3 +:106A20000023106E516E401C594151661066E0689B +:106A30002030817B012948D08573606901788C46BC +:106A40000907CF0FE1680A462031CB7B9F420CD16A +:106A50006746BF07BF0F012F4FD0022F4DD0032F26 +:106A600035D06079042108436071E0782843E070F4 +:106A700020690078C00604D460690078C00600D49C +:106A800061E720790028FBD160780028F8D100F078 +:106A900056FF0028F4D060790028F1D1A0790028B1 +:106AA000EED1FEF749FF207801280DD0607A00284A +:106AB0000AD001285CD0022806D0032858D095209F +:106AC000D349000104F047FBF8BD8673B5E7FDF735 +:106AD000D3F800280CD0E068203085722179294352 +:106AE0002171C17B012901D1C673BEE7C573BCE723 +:106AF0006079102108436071B7E74078C7062CD051 +:106B00006378002BB1D1C006C00E1B28F0D84032EC +:106B1000127DC97C0520FEF7D4FF002804D0A0799F +:106B200008210843A071A0E7E07804210843E07041 +:106B3000FDF70EFF002803D1B549B74804F00BFB61 +:106B4000E0680023816EC26E491C5A41C2668166AC +:106B50002030C17B0129C9D1C6E7012B01D0CD73FB +:106B600083E7CE7381E7E07802210843E070EAE62C +:106B70000120F9F739FDF8BD10B5A84800780428C0 +:106B800003D0A349A64804F0E6FAFFF7C5FA10BD02 +:106B900036210A5C40308188091D002A04D0C08853 +:106BA000814203D3012070470629FBD200207047A1 +:106BB000F8B5054606462036F07C2C460027803482 +:106BC000072820D1288DE18D401C884258D1A16A28 +:106BD00028460A30491C04F0AFFB01220221284656 +:106BE000FDF7ABFAF77401215E204155A06A0078E9 +:106BF000002804D1A1208649800004F0ACFAA16AE3 +:106C00000878401E0870F07C082839D1616A288D08 +:106C10008988401C884233D1A06B0178002904D0B8 +:106C20007B49804804F097FA15E06988C180606A62 +:106C3000A16B40890881606AA16B80894881606A84 +:106C4000A16BC0898881A06B0771A16B07200870B8 +:106C5000A16B68884880012211462846FDF76DFA2D +:106C60000321284600F076FE606A698840888842E1 +:106C700003D067496C4804F06EFA606A0770F774D5 +:106C8000F8BDF8B5654C6079002875D120790126EA +:106C900040070025002815DAE0682030C07C022873 +:106CA00002D0052807D102E05949604801E058495F +:106CB0005F4804F050FAE0682030417D022901D19C +:106CC00026724575207908278007002840DA607908 +:106CD00000283DD12069C0780D2875D20100794483 +:106CE000097949188F4449350681FCFCBB1722FC01 +:106CF0005B71CA00E06854210A5C2030417D0120AC +:106D0000FEF7DFFE002823D1E0680321352211546D +:106D100040308573E2E0E06854210A5C2030017D58 +:106D20000020FEF7CEFE002870D1DDE0E06854219F +:106D30000A5C2030C17C0020FEF7C3FE002803D18E +:106D400033493C4804F007FAE06809212030C17457 +:106D5000CAE0E06854210A5C2030C17C0020FEF7C4 +:106D6000B0FE002803D12A49334804F0F4F9E06862 +:106D700007212030C174B7E0FBE0E06854210A5CD1 +:106D80002030C17C0020FEF79CFE002803D1204962 +:106D90002A4804F0E0F9E0682030C774A4E0E06815 +:106DA00054210A5C2030C17C0020FEF78AFE0028B6 +:106DB00003D11749224804F0CEF9E06853210E545C +:106DC0000A212030C1748FE08AE0E0682030C07C66 +:106DD0000D2803D00E491B4804F0BDF9E06854218A +:106DE0000E540C212030C1747EE0E06854210A5C0E +:106DF0002030C17C0020FEF764FE002828D1E06826 +:106E00004030007D002823D101491DE064E00000EE +:106E1000646101000E06000057060000D800002043 +:106E20005809000091020000A50200006A04000059 +:106E30006E040000AC040000B1040000B6040000C1 +:106E4000BB040000C20400009920C00004F083F9D4 +:106E5000E06853210E540E212030C17444E0E068F4 +:106E60002030C07C132804D04D204349000104F099 +:106E700072F9E06815212030C17435E0E068A42182 +:106E8000095843884A889A421CD10978062919D1A1 +:106E900054210A5C2030C17C0020FEF712FE00283D +:106EA00003D13549354804F056F9E06801464031D0 +:106EB0008A7D920702D42030C67403E08D7380303F +:106EC000406A0570E06854210A5C2030017D002092 +:106ED000FEF7F7FD002807D0E0684030857403E036 +:106EE0002549274804F037F9207900070AD5607949 +:106EF000002807D1E0682030417D032902D102211A +:106F000021724575FEF7DDFEA07900072ED5E068F9 +:106F100054210A5C2030C17C0520FEF7D2FD0028F8 +:106F20000BD0607938436071E0688030816B0878FD +:106F30000B2800D10020087018E0E07804210843F5 +:106F4000E070FDF705FD002803D10B490D4804F062 +:106F500002F9E0680023816EC26E491C5A41C26684 +:106F600081662030C17B012904D0C673E068FFF739 +:106F70001FFEF8BDC573F9E764610100DC04000081 +:106F8000F6040000EA020000F7B582B00646039856 +:106F900017468188FE48FE4A41430398039D008BB3 +:106FA00000245043009080352A7C002A0CD0F948F8 +:106FB000012A40683CD0022A1FD0032A38D0F6A10B +:106FC000F94804F0C8F84BE0002F04D17D20F2A16D +:106FD000C00004F0C0F8EF4C6068002803D1EEA1B7 +:106FE000F24804F0B8F86068A168001D0918F04A7A +:106FF000009880180C18012018E0791E084303D16E +:10700000E5A1EC4804F0A7F8EB48016800980C18DB +:10701000002F0AD0DF484168E8480818A04204D988 +:107020008120DDA1C00004F096F80320287415E04B +:107030000C46002F12D0D74F002806D178780028B0 +:1070400003D0D5A1DE4804F086F8DC48796808183A +:10705000A04203D9D0A1DB4804F07DF8002C03D175 +:10706000CDA1D94804F077F821466869F5F7D9FF32 +:10707000686100203070012434716869B060039841 +:10708000FFF786FD002801D0747104E0287C0128F8 +:1070900005D003207071CD48F06005B0F0BD02202E +:1070A000F8E7F0B5054687B00F46012000F01BFD5C +:1070B000C4B20B2000F017FDC0B2844204D0FF2000 +:1070C000B5A14D3004F047F8012000F00CFDC4B22A +:1070D000182000F008FDC0B2844204D0FF20AEA109 +:1070E0004E3004F038F83846B94F6C1E6900CD199F +:1070F0000026403D09287DD20100794409794918CC +:107100008F44044150504CE9E9E9A0000B2C04DB0A +:10711000FF20B0A1213004F01EF8E88F6946FCF78B +:10712000EFFA002804D0FF209BA1563004F013F89A +:107130000B2C04DBFF20A7A1213004F00CF80099F0 +:10714000E88F4988884204D0FF2093A1583004F08A +:1071500002F800988030007C002804D1FF208EA126 +:10716000593003F0F8FF8B484660467086600098FF +:10717000FFF74AFA002804D0FF2087A1603003F00F +:10718000EAFF07B0F0BDFFF7D2FA0028F9D0FF20E0 +:1071900081A1663003F0DFFF07B0F0BDF9F727FAF1 +:1071A00007B0F0BD0420C04300F09DFCC6B219201A +:1071B00000F099FCC0B2864204D0FF2076A1723064 +:1071C00003F0C9FF0B2C04DBFF2082A1213003F068 +:1071D000C2FFE88F6946FCF793FA002804D0FF202D +:1071E0006DA1763003F0B7FF0B2C06DBFF2079A1F1 +:1071F000213000E06FE003F0AEFF0099E88F49888E +:10720000884204D0FF2064A1783003F0A4FF0098E6 +:10721000FFF7BBFA002804D0FF205FA17B3003F00A +:107220009AFF009C0022214602A8FFF7ADFE8034A1 +:10723000A07E02A9F6F7DAF80099088D401C0885AF +:1072400007B0F0BD0B2C04DBFF2062A1213003F05E +:1072500082FFE88F6946FCF753FA002804D0FF202C +:107260004DA1863003F077FF0B2C04DBFF2059A1E2 +:10727000213003F070FF0099E88F4988884204D0DC +:10728000FF2045A1883003F066FF00988030007C25 +:10729000042804D0FF2040A1893003F05CFF009C4B +:1072A00080342674A57E4F4F681E0B2804DBFF2018 +:1072B00048A1273003F04FFF4548690008184038BF +:1072C000C787A07EF5F700FC4748A6760078EBF765 +:1072D0001BF807B0F0BDFF202FA193304FE770B52A +:1072E000424C0646E08B0025401C80B2E0832378A8 +:1072F0000A46002B09D021464968042B0BD0052BE8 +:1073000017D03D2024A1000102E0ED2022A1800041 +:1073100003F021FF14E00A2801D3022000E003203B +:107320007071002A0BD00320226900F0F5FB05469E +:1073300006E002207071002A01D02D4D00E00D46BC +:1073400029462069F5F76DFE002120613170012189 +:107350003171B060A068FF303130F06070BDF0B5C1 +:10736000074685B00E46012000F0BDFBC4B20B20DD +:1073700000F0B9FBC0B2844204D0FF2006A19E30C9 +:1073800003F0E9FE012000F0AEFBC4B2182031E0AA +:10739000E2040000302000207372635C6C6C5F6C50 +:1073A0006D2E6D302E6300001C040000E903000008 +:1073B0005504000003040000000100205F040000E9 +:1073C00016040000170400001F040000F60400006B +:1073D0005C2000207372635C6C6C5F6C6D2E6D3092 +:1073E0002E630000FFFF0000FC0000203C20002076 +:1073F000B80B000000F077FBC0B2844204D0FF203D +:10740000FD499F3003F0A7FE00250120FB4C092E0B +:1074100070D231007944097949188F44041A3737FA +:10742000336B6B18520060732073607800280ED1A4 +:10743000F348456085602573A068C338FDF791FC6B +:10744000002804D0FF20EC49B33003F084FE05B0DF +:10745000F0BD6178002909D0207B002801D1FDF71B +:10746000C2FD6573F5F796FA05B0F0BDA073FDF7A0 +:1074700000FD0028F8D0FF20DF49C73003F06BFE85 +:1074800005B0F0BDF9F7B3F805B0F0BD0420C04376 +:1074900000F029FBC4B2192000F025FBC0B28442E1 +:1074A00004D0FF20D449D53003F055FE012200213D +:1074B0006846FFF714FF69463846F5F797FF05B0B1 +:1074C000F0BD2078052804D0FF20CB49E13003F03F +:1074D00042FE207F002804D1FF20C749E23003F09C +:1074E0003AFE25772570207DF5F7EEFA257505B073 +:1074F000F0BDFFE7FF20C049ED30A6E7F0B5BF4C77 +:1075000087B020780026042805D02078052802D0EE +:107510000C2007B0F0BD01276770607B00250028B4 +:1075200027D072B6607B002808D0A07B002805D049 +:10753000FDF759FD6573A573F5F72CFA62B6207D4A +:10754000F6F782FD002827D0207F002808D0257775 +:107550002078052803D0A849AA4803F0FCFD0C2692 +:1075600065702570207DF5F7AFFA2575304607B0B8 +:10757000F0BD207D00900320694608734873F5F73D +:10758000BEFA04900020C043694605900F7202A91C +:107590000098F5F72BFFD2E720BFD0E7F0B597486A +:1075A00083B00078002801D0FFF7A8FF944F012096 +:1075B0003870FF26944D2D36002405E00B2C03D3A4 +:1075C0009249304603F0C7FD204601A9FCF798F820 +:1075D000002838D101988030007C002833D00B2C53 +:1075E00003D38A49304603F0B6FD2046AC422ED084 +:1075F0006946FCF785F8002803D08449844803F0E5 +:10760000AAFD00988030807EF6F71EFD002822D06B +:107610000098002180300174847E0C2C04D3FF205C +:107620007A49273003F097FD7A48610008184038FE +:10763000C58700988030807EF5F746FA00990020D3 +:1076400080318876B8E7641CE4B2032CB6D30020FE +:10765000387003B0F0BD20BFD3E710B500786E4C92 +:1076600000280FD001280CD068496C4803F073FD46 +:10767000A0686B49884203D364496A4803F06BFDF4 +:1076800010BD6948A060F3E710B55D4900220A709B +:10769000614C207059480270427002770273427345 +:1076A0008273826102752030574B0380052143802D +:1076B0008380001D491EFAD1100004D0002A04D096 +:1076C0005948A06005E0A26003E05049534803F028 +:1076D00042FDA0685249884203D34C49514803F007 +:1076E0003AFDFFF75BFF10BD70B5444C0E462178A4 +:1076F00084B01546002902D00C2004B070BDA061F2 +:107700008030007C002803D03B49484803F023FD2B +:107710004748464345434748ED1C30186660A5601E +:10772000854200D82846A0603549002088600521A0 +:10773000217060702077E0833F48F5F771F920757C +:10774000002803D12C493D4803F005FDF5F7D7F992 +:107750002061002201216846FFF7C1FD207D6946B6 +:10776000F5F744FE002004B070BD08B50020C0430A +:107770006946088021480078002801D0002008BD13 +:107780000846FBF7F5FF0028F9D0012008BD10B529 +:107790001A4C84B02278002A02D00C2004B010BD0C +:1077A000234A51435043C91C224AA160606080189B +:1077B000814200D80846A06000206070042121703A +:1077C000E0831D48F5F72CF92075002803D10A49FC +:1077D0001B4803F0C0FCF5F792F91A49F5F721FCB4 +:1077E0002061002201216846FFF779FD207D69466E +:1077F000F5F7FCFD002027E0987301003C200020F5 +:107800003020002076020000FFFF0000D47301004A +:10781000190300005C200020FC000020510500003E +:107820006A1800005A050000C40900008B0200001D +:1078300071020000B3FBFFFF5F73010097020000BD +:10784000C6020000B80B000004B010BD10B5E14C3A +:10785000A1690160FFF752FE0021A16110BD70B562 +:10786000DC4C84B02078052802D00C2004B070BD18 +:10787000A069002803D1D849D84803F06CFCA0695E +:107880008030007C002803D0D349D54803F063FC46 +:10789000A0698030807E002803D0CF49D14803F012 +:1078A0005AFCD148F5F7BCF8A1699A225054054614 +:1078B0004E88401E0B2804DBFF20C749273003F009 +:1078C0004AFCCA49680040184038C687A069803021 +:1078D000807E002803D1C049C54803F03CFC01224A +:1078E0006846A169FFF750FBA06969468030807E39 +:1078F000F5F77CFD0020A06104B070BD10B5BD4956 +:107900004C68983400280ED001280FD0022811D0DE +:107910003520B949000103F01EFCAE488068A04242 +:107920000BD9012010BDFF347934F6E7B120800077 +:107930002418F2E7FF346134EFE7002010BDAD48B2 +:107940004178002902D10078002801D0002070473A +:107950000120704770B504460422A84E803484B0DC +:1079600000290DD0012923D0022907D0032921D0D5 +:10797000A149A34803F0EFFB04B070BD227410E0EE +:1079800005469C4800780028F8D12946012268461F +:10799000FFF7FAFAA07E6946F5F728FD288D401C0E +:1079A0002885F4F7F7FF3078EAF7AEFC04B070BD35 +:1079B000032010E08188934A5143934A1160616A21 +:1079C0000A8902838A7982754A8982808A89C2807B +:1079D000C98901810220207404B070BDF0B5874EC2 +:1079E0000146307800257B4C85B0002908D001295C +:1079F00016D0022942D0032958D07F49834839E064 +:107A0000E583EAF781FC6078002849D1002211461D +:107A10006846FFF764FC207D6946F5F7E7FC3FE028 +:107A2000744F20697968774B401879494218A069EA +:107A300081884088594300F06FF8B1680546884254 +:107A400005D2A1696F4A88884243551903E06D4900 +:107A500003F060FAA1690883A06905218175008B94 +:107A600068494843281A6B49B860884204D32520E6 +:107A70005949400103F06FFB05B0F0BDE583EAF71B +:107A800043FC01202077A0692169803041610574A1 +:107A9000FFF7E5FE002803D04F495F4803F05BFB8A +:107AA000F4F778FF6573A57305B0F0BDEAF72CFC19 +:107AB00005B0F0BD704710B54E4A00290ED001291F +:107AC00006D0022906D04C49544803F044FB10BDAF +:107AD000401E03E05178491C5170001F506010BDDA +:107AE0003C48007870478107C90E00280BDA000770 +:107AF000000F083880084A4A80008018C069C840D2 +:107B00000006800F70478008464A80008018006891 +:107B1000C8400006800F7047F7B582B00D46064694 +:107B2000414F002406E00B2C04D3FF202A492D30BE +:107B300003F011FB204601A9FBF7E2FD00280ED15E +:107B400001988030007C002809D00B2C04D3FF2042 +:107B500021492D3003F0FFFABC4204D006E0641C3A +:107B6000E4B2032CDFD3002005B0F0BD6946204607 +:107B7000FBF7C6FD002803D017492C4803F0EBFAA9 +:107B8000A64204D1DD201449800003F0E4FA28481D +:107B9000341B44430098803041690498F6F7C8F9D3 +:107BA000041908D5281B66422946401E03F0C0F977 +:107BB0006843841B05E02946204603F0B9F9684371 +:107BC000241AAC4203D904491A4803F0C4FA2046E7 +:107BD00005B0F0BD3C200020D4730100E702000096 +:107BE000E9020000EB020000A37001005C2000200D +:107BF000EE0200003020002098730100FC000020FD +:107C0000ED040000E204000000010020190500005E +:107C10004E0600006A180000B3040000360500009C +:107C200000ED00E000E400E0FFFF00007103000051 +:107C3000770800008903000070B5F84E0446B0795B +:107C40000025012805D0F64E307A01280CD00020FE +:107C500070BD002915D1657014202070F149A01C59 +:107C600003F082FBB5710CE000290AD16570132086 +:107C700020701C22EC49A01C03F0E3F80120A07145 +:107C80003572012070BDE648007A002802D0E7482E +:107C9000808D7047E6487047F8B5E64801780029BE +:107CA00002D00C263046F8BD0026E04D34462E7535 +:107CB0006E75EE752E76AE75DF496E734E73D84FC6 +:107CC0007F217E718170687E002804D0F8F7ABFBBD +:107CD000F8F754FF6C763C72D848FBF711FED84891 +:107CE000FBF70EFEDEE770B5D24A00251570CC4ECC +:107CF000D44B35711966D8651078002805D0FF205F +:107D0000D1A17A3003F027FA70BDC84C257565758E +:107D1000E5752576A575C8486573457375717F202F +:107D20009070607E002804D0F8F77DFBF8F726FFFE +:107D300065763572C148FBF7E3FDC148FBF7E0FD0E +:107D400070BDBA48007D704710B5B849C87B897BC3 +:107D500042078307D20FDB0FC007D218C00F1018DD +:107D60004000052911D20A007A44127992189744EA +:107D7000090509020700B849085A10BDB74810BDE7 +:107D8000B74900E0B749085A10BDFF20AEA19A30AC +:107D900003F0E1F9002010BDA448B349008A48432C +:107DA00070479F488079002800D001207047F8B5BF +:107DB00006469E4C407BE07330790027A073012873 +:107DC00025D0308820829648B37B83719D4DA7488B +:107DD0002970114603F0BBFAB0796873F11DA4480D +:107DE00003F0B5FA607B0126002800D06675924842 +:107DF000407B002800D0A675A07B05284DD201004D +:107E00007944097949188F440409262B09002782EF +:107E1000D9E700218948FBF778FD25E00121874853 +:107E2000FBF773FDE91D8548FBF7A4FD687B00287F +:107E300007D001280AD0FF2083A1E83003F08BF996 +:107E400012E000217D48FBF7A6FD0DE001217B48F3 +:107E5000FBF7A1FD08E006217848FBF756FD03E09B +:107E600002217648FBF751FDE7752776691C7348B8 +:107E7000FBF774FD29787148FBF781FD04217048F8 +:107E8000FBF743FD691C6E48FBF768FD29786C48D9 +:107E9000FBF775FD26750020F8BDFF206AA1F230C2 +:107EA000CCE770B5614C012525765D4A127A002A2F +:107EB00001D03A2070BD634A13780022834205D175 +:107EC000E2756A4803F043FAE57500E02276002087 +:107ED00070BD70B50446554D0020A8752246654812 +:107EE00002F0AFFF544844730120A87570BD4C499F +:107EF0000871704710B54D4C0022627560730246E0 +:107F00005D4802F09EFF0120607510BD4449487134 +:107F10007047F8B5474D287800282CD1434C207D78 +:107F2000002828D0F8F71FFA0026A674E6746E70B1 +:107F30003046F8F715FA0020F7F7D9FF4F48F8F761 +:107F4000E6F84F48F8F7A1F9F8F73AFAE07B01278D +:107F5000C107002902D0A17CC9070ED0810712D524 +:107F6000A17C89070FD42620F8F7E3F8A07C022132 +:107F70000843A07413E00C20F8BD2520F8F7D9F8C9 +:107F8000A07C38430AE0400709D5A07C400706D40E +:107F90002720F8F7CEF8A07C04210843A074F8F756 +:107FA000DBF901210020F8F7DFF80F210520F8F7B1 +:107FB00022F8244D2978681CF8F711F8A07B0128D5 +:107FC0000AD0042808D0607D002805D0627B2A49A9 +:107FD0001A48FBF7FAFC6675A07D002806D0164803 +:107FE0002449427B9830FBF722FDA675286E017864 +:107FF000002903D00178001DF8F734F8E86D017806 +:10800000002904D01F4A401CF8F797FD6776F8F75F +:10801000B5F90020F8BD074948607047F4200020FA +:10802000D4200020FB200020DE200020B4200020EF +:10803000FFFF000008010020942000200421002000 +:108040002C210020742000207372635C6C6C5F61D3 +:1080500064762E630000000066B401009A89130064 +:108060006EB401005EB401007102000075200020B2 +:108070007B20002082200020A220002059B4010093 +:1080800056B4010057210020F8B50126FE4C0546E4 +:10809000002824D0E07B2146C207897C002A01D039 +:1080A000CA070BD082070FD58A070DD42620F8F710 +:1080B00040F8A07C02210843A07410E02520F8F7C6 +:1080C00038F8A07C3043F7E7400708D5480706D4C6 +:1080D0002720F8F72EF8A07C04210843A074E07C48 +:1080E00000280AD0A07B012804D14B20E7490001D9 +:1080F00003F031F800F0BDFAF8BD002D0CD00221DC +:108100000020F8F731F8E2480079032801D001286F +:1081100002D10220F8F768FAE07D002700280AD093 +:10812000DC4DDD48691CFBF719FC691CDB48FBF7DB +:1081300015FCE7752776D848F8F725F9A07B0528C0 +:108140000CD201007944097949188F440202020BCC +:10815000020001210846F8F791F903E0CB49D04825 +:1081600002F0F9FFE07BA17C884303D1A07B0128CA +:1081700003D0E674CB480670F8BDA774FAE710B5D3 +:10818000F8F7F1F8C7480078002816D1BE48007DFE +:10819000002812D00020FFF777FFBD4800790028A3 +:1081A00009D0012815D0022805D0032811D0B749DD +:1081B000BD4802F0D0FF002010BDF8F720F9F8F715 +:1081C00013F9F8F71FF8F8F7C1F8F8F7D7F80C200B +:1081D00010BDEAF71DFFEEE7B24901204870704775 +:1081E000F8B50024FAF7AAFE002822D0FF202D308F +:1081F000F7F7B7FFAB4D2878A54F01281CD0022810 +:1082000001D0032831D0CF20A049800002F0A3FF85 +:10821000287800280CD03879002809D0012807D008 +:10822000022835D0032833D09849A04802F093FFA4 +:10823000F8BD00F01EFAF8BD934EB07B032814D0B1 +:10824000707E002803D0F8F788FCF8F7E4F8984827 +:10825000F8F799F8B07B012812D0042810D0B8792B +:10826000012806D0032804D004E00120FFF70CFF0A +:10827000CEE7102421460E2001430020F8F7FEF837 +:108280007879012801D1F8F7E0F802202870BFE7DB +:1082900028780228CFD10120F8F7A6F9F8BD70B5EB +:1082A0007B48804C4079012808D18248F8F7D6F8FD +:1082B000002801D17F20A070F8F7BEF8724D687ECB +:1082C000002803D0F8F7AFF8F8F758FCFAF736FEB5 +:1082D00000280BD02078022804D0DD206B498000D4 +:1082E00002F039FFA87B012803D006E000F0C1F9B5 +:1082F00070BD99208000F7F734FF0120FFF7C4FE1E +:1083000020780028F4D020780128F1D05F496A480D +:1083100002F021FF70BDF0B5044689B00020069040 +:108320000190F7F7F1FE03905E480078022803D031 +:108330005649624802F00FFF554D6879012809D16E +:108340005C48F8F78BF8002802D156497F208870E6 +:10835000F8F772F85648FBF7FDFA4B4E0746002C2B +:108360006FD05348FBF700FC00286AD0F7F740FEB7 +:10837000002866D0707E00280AD00524641EE4B26E +:10838000F8F71DFC022811D0012800D00020019030 +:10839000474A4B4CD01C0290062F52D238007844EA +:1083A000007900188744B4B4B409B44E002CE5D168 +:1083B00044A1484802F0CFFEE8E7B07B012840D056 +:1083C00004283ED001990398084304D1A8790028D5 +:1083D00001D0022835D1687901281AD1A079002866 +:1083E00017D10120A07110784006C00FE0713A4803 +:1083F000029902F0ACFF2B4C384FA0787F2804D1B3 +:10840000532030A1000102F0A6FEA07838707F2032 +:10841000A0702248F7F7B7FF22480321017028799E +:10842000002877D0012808D0022873D0032804D070 +:1084300024A12B4802F08FFE6CE00120F8F7D4F85D +:1084400068E065E01348D178C07981424AD111488B +:108450001179037A994245D15179437A994241D1B0 +:108460009179837A99423DD1D179C37A994239D1B0 +:10847000117A037B994235D11178407B4906C90FA7 +:1084800081422FD101212EE0B4200020488001003C +:10849000D420002074200020042100202C21002062 +:1084A000DE04000008010020D1020000510300009A +:1084B000542100200A01002083030000C1030000B2 +:1084C000F42000207372635C6C6C5F6164762E63D1 +:1084D00000000000AB030000FC200020022100206F +:1084E000090400000021B07B012801D0042801D13B +:1084F00000290AD100280BD101990398084304D11F +:10850000A879002801D0012802D1307E00281FD090 +:1085100001200690707E002803D0F7F784FFF8F75B +:108520002DFB0698002802D00120FFF7ADFD73480F +:10853000017800290AD00178012907D000780328A2 +:1085400004D049206E49000102F005FE09B0F0BDDB +:108550006A486C4F4068397BC173797B0174B97B81 +:108560004174F97B8174684909784906C90FC1765D +:108570001C30029902F0EBFE6048397C4068C174FF +:10858000797C0175B97C4175F91E897D81750299E7 +:108590004A7D0B7D110219430183F91E8A7E4B7EB1 +:1085A00012021A438280029A537E177E1A023A43BD +:1085B000C2808A7F4B7F11021943018153490A30DF +:1085C00002F0BAFE52480179CA064C49D20E4968F7 +:1085D0008A7600794009C0310871287A002803D0D2 +:1085E00047494C4802F0B7FD0020A87243484B4968 +:1085F00047687888B085F87EE873B88B2882F88B56 +:108600006882388CA88244480078A875444802F0F3 +:108610009EFEB888F087F888208038896080C0374F +:10862000387920710198002860790BD00121084326 +:108630006071F8F7DDFA61794000C907C90F01439D +:10864000617102E0400840006071012028722B4CEB +:1086500000202070F7F7D3FEF7F7C6FEF7F7D2FD3C +:10866000F7F774FEF7F78AFE01206168FAF785FDD7 +:1086700050E7F8B5F7F7C3FEF7F7B6FEF7F7C2FD18 +:10868000F7F764FE274E0027707E002804D0F7F726 +:10869000CAFEF8F773FA7776184D2F70F7F76EFE6B +:1086A000B07B012804D000210846FAF766FDF8BD2A +:1086B00000210220FAF761FD1B4C207A002803D02C +:1086C0000F491A4802F047FD68780028EFD0124899 +:1086D000417BE1730078A0751549164802F037FE1A +:1086E0000E490F4802F033FE3C20A07268684088B3 +:1086F000B085012020726F70F8BD000008010020D5 +:10870000C48401005721002054210020732100203F +:10871000742100203D0400007420002075200020FA +:10872000EB200020B4200020D42000204F020000C5 +:108730007B200020E4200020F8B5FBF7FBFF044677 +:10874000FCF7BFF8FE4E054670692030407B0028DC +:1087500026D0012844D0022846D003284DD0FF203F +:10876000F8A19C3002F0F7FCB069F72201781140C3 +:10877000017072692032937BDB071B0F1943FB23C7 +:1087800019400170D37BDB075B0F19430170577BE6 +:10879000EF23022F3CD0012F3FD0032F41D046E0E2 +:1087A000EC48FCF76DF8002804D0716903202031F3 +:1087B0004873D9E7E748FBF74DFF002804D07069FC +:1087C0005321095C002907D0E248FCF700F87169E1 +:1087D000012020314873C7E7022120304173C3E7ED +:1087E000DC48FBF7F4FFBFE7DA48FBF733FF00286C +:1087F000BAD1FF20D3A18E3007E0D648FCF740F86D +:108800000028B1D1FF20CFA1963002F0A4FCABE745 +:10881000012C08D8002D06D009E06D1E2C4302D192 +:1088200005E0002C03D019401023194300E0194043 +:108830000170D17D002915D0517B012912D0C64885 +:10884000F7F7A1FDC548002101767269116E526EDD +:1088500042610161C049B269F8F7FBF80020F8F7FE +:1088600007F903E0F7F78FFDF8F725F9B06900780D +:10887000C00606D4F0690078C00602D4F07900285A +:1088800006D0B079002803D101210846F7F7F6FD9C +:10889000032030703079002803D1F7F791FD0120D3 +:1088A0003071F8BD10B5A649002348690246203052 +:1088B000C37483750120412398548032927F002A2B +:1088C00003D008700021022001E000210320FAF704 +:1088D000D2FB10BD06281AD202007A4412799218EF +:1088E00097440205090D101000290ED00FE0891ED3 +:1088F00002290AD90BE0891F012906D907E00829B6 +:1089000003D004E00B390B2901D801207047002067 +:10891000704730B5044683B08E48FBF77FFF0028D0 +:1089200004D1F52087A1C00002F015FC844DA86990 +:10893000FBF75AF90321A869FBF777F9A869EF2239 +:108940000178114001702146FBF7D8F90E2C5BD25B +:1089500020007844007900188744565606561F5A5E +:108960005A175642565A312B75485D224169525C5E +:10897000002A04D006218069FBF76DFA48E0C03177 +:10898000C9798069FBF767FA42E06D4841698069FF +:108990008031497AFBF7D0FA3AE0694D6969A869F4 +:1089A000B031FBF791FA6969A8698431FBF798FA4D +:1089B0002EE0634806218069FBF7BAFA28E0604D93 +:1089C00028690178A869FBF79DFA28698188A86958 +:1089D000FBF79AFA28694188A869FBF799FA17E02A +:1089E000002000900190564841694031097F0029DC +:1089F00005D06A461178012211436A461170694612 +:108A00008069FBF7A7FA03E04EA1554802F0A3FBEB +:108A1000FBF715FF002804D17F204AA1000102F0D6 +:108A20009AFB0C2C0AD0072C06D04548002140693F +:108A3000403041810121817303B030BD40480021A5 +:108A400040694030018203B030BDF0B53C4D064670 +:108A500068698DB020300079012801D1F7F7ECFC6E +:108A60000024012E1ED168692030017E002902D128 +:108A7000C07D002801D0F8F71EF8F7F7C0FCF7F723 +:108A8000B3FCF7F7BFFBF7F761FCF7F777FC687902 +:108A9000C006686902D58030048703E08030018F0A +:108AA000491C018768790226C107002901D1800786 +:108AB00013D568692030817D002902D0032907D0B1 +:108AC0000BE00121817500210120FAF7D4FA04E0BE +:108AD000867500210120FAF7CEFA68692030817D81 +:108AE000012903D16979090700D586751448807A70 +:108AF000002861D100F015FF1648FBF78FFE002813 +:108B00005AD00F4D287A002856D16869C621095CD1 +:108B100000290ED02030C17C0120FFF7DBFE0028A9 +:108B200007D168692030C17C0420FFF7D3FE0028FC +:108B300018D06869CB21095C062919D01FE0000014 +:108B4000100100207372635C6C6C5F736C617665FE +:108B50002E6300002801002080210020A821002091 +:108B6000EA070000686940300481447702204DE044 +:108B70002030C17C0420FFF7ADFE002815D06869C5 +:108B80002030C07C801E15287ED2010079440979EE +:108B900049188F449B9B9B1C9B9B9B979B1E9B9B5D +:108BA0009B243E9B9B9B9B9B900068695621095C84 +:108BB000C90702D0C030C472AEE00C20FFF7A9FE96 +:108BC000686901224030817D11438175A4E007204E +:108BD0001CE0FBF7F0FE00286CD00B2016E0F3F74A +:108BE00050FA0C2866D368690821B030F3F74AFAC6 +:108BF000002806D0686904218430F3F743FA00287E +:108C000003D1F4A1F74802F0A6FA0420FFF781FE91 +:108C100082E068698446C030807A042802D0052842 +:108C200039D079E06046E030007D002874D1EE490B +:108C30006046102600230822D8306944F51A2D1802 +:108C4000203DEF7F4F70AD7F8D70891C521E9B1CA5 +:108C5000002AF3D103A86346102608210330A83365 +:108C6000B51AED18203DEF7F4770AD7F8570801CF1 +:108C7000491E921C0029F3D16846F9F70CFB08AF96 +:108C80004ECFDA4D686900E020E070304EC005201C +:108C9000FFF73FFE0BE060464030017D002903D026 +:108CA00001214177022000E00D20FFF732FE6869C4 +:108CB000C030847230E00620FFF72BFE6869403038 +:108CC000847329E00920FFF724FE25E06869CA21A2 +:108CD000095C002920D0062906D02030C17C002064 +:108CE000FFF7F8FD002817D068690146C0318A7A7D +:108CF000072A11D213007B441B79DB189F440C0C0C +:108D00000C0C0C0C03004030807DC20700D154E7EE +:108D1000C043800700D18C72B44D2879002868695F +:108D200002D08030048303E08030018B491C018332 +:108D30006879C007686904D0A4210C54403084804D +:108D400003E040308188491C8180E879002806D002 +:108D50006969A0310879022806D8401C0871686941 +:108D6000A0300079022806D9686901468030048362 +:108D70004483A0310C7168692030C17C0020FFF76A +:108D8000A9FD002804D168692030C07C07284CD197 +:108D900068690146C0318A7A062A46D0C97A06290E +:108DA00043D03621095C02293FD1A0300079002848 +:108DB0003BD1FBF7AEFC002837D0FBF782FD002843 +:108DC00033D06869014680314A8A012A2DD90122AF +:108DD0004A77024640329688D288931E9E4201DB33 +:108DE000012302E0921B521E93B20A8BAE89B2425B +:108DF00001D3012202E0B21A521C92B2934200D96E +:108E00001346012B00D14C77C0300278002A10D0D5 +:108E1000498B4088814201D3012102E0401A401C65 +:108E200081B28B4205D90B4603E06869012380308B +:108E300044776A69118D1646C81883B2104680308F +:108E400083822036B77D002F25D0012F23D0022F1B +:108E50000CD0032F0AD05FA1654802F07CF9687935 +:108E6000C006686919D58030C4841BE0F67C032EE7 +:108E700009D0082E0FD04032D1889288891A891ED5 +:108E800059180182EBE740329688032E03D3D2882B +:108E90008918491CF5E70382E1E78030C18CC28A5A +:108EA0008918C18468690246C0329179002906D0C8 +:108EB0000146403196230E891B5AF3180B81A97A7B +:108EC0000426002913D002463D214032917001460C +:108ED0002031CC748C75012151708030807F002846 +:108EE00070D0297000210220FAF7C5F85EE0014633 +:108EF0002031CB7C042B48D02B7A002B1ED05A0774 +:108F000001D4DA0604D51E2240308270CE743CE0D3 +:108F10001A0704D53D2240308270CE7435E0D80760 +:108F200005D1980703D42BA1324802F014F96869DF +:108F30002A21422211542030C67426E04030837B1F +:108F4000002B05D047897B1C438183899F420FD228 +:108F5000D37A062B02D0927A062A05D1038A5A1CAC +:108F600002828289934203D20389C288934203D347 +:108F700022228270CE7408E08B7D002B23D0838860 +:108F800093423CD308228270CE7468694122014624 +:108F90002031CC748C75012111548030807F0028E1 +:108FA0002AD0297000210220FAF765F8F9F7EEFFC0 +:108FB00000282DD068690146FF300130827A002AEE +:108FC00022D025E018E08288062A18D33E2282703B +:108FD000CE74DAE77372635C6C6C5F736C61766598 +:108FE0002E63000039060000FFFFFFFF1001002084 +:108FF000790800004502000000210320D4E7012089 +:10900000287000210846CFE74988818101218172BB +:109010006869803084770DB0F0BDF8B50C4617460E +:109020006946FAF7F9FA002801D00020F8BD009847 +:109030000146E030027AF74E0025002A17D0002FB3 +:109040007DD1657007212170007A00280DD07169EB +:10905000E8204D8445540A22A01CEA3101F0F1FEBB +:109060000098E030007A0028F1D1A57067E0027D19 +:10907000002A2AD0002F62D1017D0D2920D20A00BA +:109080007A441279921897441B1B1B1B1B1B1B1B3A +:109090001B1B1B0F060065700C212170817DA170C8 +:1090A00071694988A18009E065700B212170817D7B +:1090B000A17071694988A180817EA17105753EE02A +:1090C000D549D64802F047F839E0027F002A15D08A +:1090D000002F34D16570082222707269FF315288E6 +:1090E000628001310A88A2804A88E2808A882281CF +:1090F000CA8862810989A181057720E0FF310131A9 +:10910000887A002808D0002F19D1657011202070AE +:10911000888960808D7212E0887B002886D0002FBD +:109120000DD1657012202070887B002807D08D73C8 +:10913000088A6080488AA080887B0028F7D10120B7 +:10914000F8BDB4480078012801D00C2070470020F9 +:10915000704770B5AF4C05462078002803D0AE4963 +:10916000AF4801F0F8FF00202561E0720120207077 +:109170002078012803D0A849AA4801F0ECFF70BD6F +:10918000F8B5A44D2978012901D00C20F8BD01269D +:10919000686180308677807AFBF749FA00282ED004 +:1091A00068698030807AFBF799FB002827D06869CE +:1091B0008030807AFBF70EFB002820D06869803071 +:1091C000807AFBF74AFB002819D0F7F7CCF86869DA +:1091D00000248030408A002825D09348FBF71EFBEE +:1091E000002820D06869C621095C00291BD02030E6 +:1091F000C17C0120FFF76EFB002802D013E0122093 +:10920000F8BD68692030C17C0420FFF763FB0028AB +:1092100009D168694030048144770220FFF779FB67 +:109220006869803044776869E821095C002905D1C4 +:10923000418CC288914201D9A98101E0C188A981EC +:1092400001468031CA8A521E93B20A8BD21892B25A +:109250000A830F7F002F02D04C830C7702E04F8BE4 +:10926000FF184F8305464035AF88FF18AF804D8A01 +:10927000012D01D86D1C4D82002B01D0A4231C545C +:109280002030C07C634D042817D0487F002816D0BA +:10929000A889824213D2FBF73CFA00280FD06869F4 +:1092A0000146C0310A78002A09D08030408B4988B5 +:1092B000884204D3AC70EE7003E0AE7001E0AC7095 +:1092C000EC7068699D210C543321095C062901D09A +:1092D000072917D1CC21028D095A511A09B2002948 +:1092E00010DB0146CE310A3002F04FF80122022194 +:1092F0006869FAF7C8FE6869CB210C5433210C5415 +:1093000040308677434D962168690A5A01462830D5 +:10931000891CFAF75FFFA87800284DD16869C02141 +:10932000095C002901D0803044830120F6F7DFFD7D +:10933000384D68691330F6F7A8FF68690F30F6F703 +:10934000E6FE0120F7F70CF8686901462030027E3E +:10935000002A02D1C07D002806D07031ACC9334844 +:10936000ACC0334802F000F8F6F7F6FF01210846DA +:10937000F6F7FAFE274D68698030006AF7F706F8BD +:109380002C48FBF7BEFA002801D06C7002E06E702A +:109390002948E86168692030007E002802D068789A +:1093A000002817D0E869F6F7EEFFF7F784FB686945 +:1093B00040300078F6F7BDFE164802214471C471B2 +:1093C000847104724472847204710170F6F7D6FFDE +:1093D0000020F8BD1848F6F7D6FF144806766A69EB +:1093E000916ED26E42610161134AE969F7F731FB70 +:1093F0000120F7F73DFBDAE710B5064C207802288C +:1094000001D00C2010BDA078002817D00020FFF755 +:109410001CFB2FE010010020D48F0100DD080000AC +:109420002D0900003809000028010020A821002093 +:10943000C12100202C01002080210020F6F793FF9D +:1094400001210020F7F71AF804202070606920300D +:109450000079012801D1F6F7F8FFE07A002809D059 +:10946000012807D0022807D0032805D0F949FA4877 +:1094700001F071FE002010BDE9F7CAFDFAE7F749D7 +:10948000C8727047F8B5F54C2078032803D0F1492D +:10949000F34801F060FE616901252031887A0028D7 +:1094A00006D0002088720D73A07904221043A071A9 +:1094B000A0690278D24392072BD1C97A002928D11A +:1094C000FAF753FC04281DD0052802D00B2819D127 +:1094D00011E0606901462030C27C102A12D10022BE +:1094E0008A66CA6605767031CCC9DE48CCC0DE48D3 +:1094F00001F03AFF06E060692030C17C0B2901D100 +:1095000000210176606902212030C572A0790843EC +:10951000A071A0690078C00606D4E0690078C00692 +:1095200002D4E07900280FD0607800280CD1A0790F +:10953000002809D1F9F718FD002805D0207A002865 +:1095400002D1607A002803D00120FFF77EFA1DE0E7 +:10955000C648FBF7D6F9002802D00020607002E070 +:109560006570C348E06160692030007E002802D049 +:10957000607800281CD0E069F6F705FFF7F79BFA42 +:1095800001210020F6F77AFF0420207020780128BE +:109590000DD0E07A00280AD0012808D0022819D07E +:1095A000032817D0A920AB49000101F0D4FDF8BD74 +:1095B000AF48F6F7E8FEAB4805766269916ED26E69 +:1095C00042610161AA4AE169F7F743FA0120F7F71E +:1095D0004FFAD5E70120F7F707F8F8BDF8B59F4C2B +:1095E00005462078042803D09A49A24801F0B3FD2B +:1095F0009A481027417939434171002D7ED0F7F701 +:1096000072FA0125002814D1944842692032117E53 +:1096100000290ED0C1694B78DB060AD00978D27BCD +:109620000907C90F914204D185720120FFF70DFA95 +:1096300054E18A4CE07800281ED0E0694178C906E0 +:109640001AD10078C00617D460692030007901284B +:109650007ED1F6F7F1FE6169881C2831FAF7AAFE7F +:10966000002875D06069C21D4388F932138220300A +:10967000007C907495732BE160692030007901289B +:1096800011D1F6F7D9FE6169881C2831FAF792FEEC +:10969000002808D06069C21D4388F9321382203047 +:1096A000007C90749573E069002600784007C10F34 +:1096B00060692030827B914242D0407B00283BD0C1 +:1096C00002280FD1FAF7EAFF002803D161496A485E +:1096D00001F041FD62690023106E516E401C59413A +:1096E00051661066606920304673017B012903D101 +:1096F0000673A1793943A171C17A00E0D1E0012953 +:1097000014D1C672A07908210843A071FBF7C7F8ED +:10971000002803D14F49594801F01DFD626900231B +:10972000106E516E401C59415166106660692030C0 +:10973000817B01292ED085736079082108436071EF +:109740004649C869496903781A07D40F203100E0F7 +:109750007FE0CA7B94420CD19B07404C9B0F012BAE +:1097600048D0022B46D0032B16D0207A0421084380 +:1097700020723A48417929434171C67181790907BC +:1097800004D541692031C97C032962D0017A0029BE +:109790005FD182E08673CFE76378002BE9D18D72C9 +:1097A000A3792B43A371012A10D0CD73FAF7DDFA08 +:1097B00006280DD00B28DCD1606901462030C27C20 +:1097C0000C2AD6D1C67540310D75D2E7CE73EDE7C0 +:1097D000606901462030C27C122ACAD100220A6682 +:1097E0004A66C57570319CC91E489CC0093001F09D +:1097F000BBFDBEE74078C30649D06278002AB8D1E5 +:10980000C006C00E1B283FD8C97C0520FFF762F8B0 +:10981000002804D0607A082108436072A9E76079C3 +:10982000042108436071FBF793F8002803D109492C +:10983000134801F090FC60690023816EC26E491CE0 +:109840005A41C26681662030C17B01291AD0C57396 +:109850008FE73DE0D48F01000D0A000010010020C9 +:10986000360A0000A8210020C12100202C01002080 +:1098700080210020A80A00000A070000220700003B +:109880007C070000C67374E7207A384370E7012A2A +:1098900001D0CD736DE7CE736BE7407A002817D106 +:1098A0001AE0F948022211434171C179491CC9B239 +:1098B000C17101290CD840692030007E00280BD0EE +:1098C000F2484078C106C90E052905D2C00603D06A +:1098D0000120FFF7BAF801E0FEF72EFFEA48017811 +:1098E00001290CD0C07A002809D0012808D002280C +:1098F00005D0032804D0E649E64801F02CFCF8BD69 +:109900000120F6F771FEF8BD10B5DF480078042895 +:1099100003D0DF49E04801F01EFC0120FFF795F875 +:1099200010BDF8B5D84C0427A07900250007002801 +:109930002FDA207A00282CD160692030C07C801E6C +:10994000132826D201007944097949188F44210946 +:1099500021212121212121212121212121212121F7 +:109960001A006069014640318D734A7F002A04D095 +:1099700006228A702030C7740BE016228A702030CD +:10998000C77406E0606901464031CD748D732030A4 +:10999000C57400F063F9BC4801268279500700289D +:1099A00022DAB948017A00291ED1406901462031E6 +:1099B0000B46C97C891E072916D20C007C442479E9 +:1099C0002419A744031111110B110E000146403157 +:1099D0008D73C030007A8870DF7405E0C030C672C5 +:1099E00002E00221C030C172A74C90074AD5207A0C +:1099F000002847D160692030C17C0120FEF76AFF52 +:109A000000283FD1A069C0780E287DD2010079449A +:109A1000097949188F44A7A706A73747630BA718EA +:109A2000A7279755616903202031C8749FE06069BA +:109A30002030C07C052803D09549984801F08BFB65 +:109A400060692030C57492E060692030C07C0928CC +:109A500003D08F49924801F07EFB60694E210D547E +:109A60002030C57483E060692030C07C0B2803D0AF +:109A700087498C4801F06FFB606953210E540C211B +:109A80002030C17473E060692030C07C0F2803D09F +:109A90007F49854801F05FFB606953210E54102116 +:109AA0002030C17463E060692030C07C102803D08E +:109AB00077497E4801F04FFB606912212030C17464 +:109AC00055E060692030C07C102803D07049784888 +:109AD00001F041FB606914212030C17447E06069E6 +:109AE0002030C07C162803D06949724801F033FB4E +:109AF000606901464030C5748573E031087D0028F7 +:109B000006D063492B2000E02DE0400101F023FB4B +:109B10006069014640310A7D002A08D00D754288EF +:109B2000F8210A520146E0318D750C2207E0418888 +:109B3000F82211520146E0318D758E760B220A759E +:109B40002030C57413E060690146C030827A062A6D +:109B500004D14031897D890700D58572C17A0629F3 +:109B600005D1C57203E04A49534801F0F4FAA079DF +:109B7000C00612D5207A00280FD160692030C17C40 +:109B800007290AD20A007A441279921897440505E7 +:109B90000505050503000721C174607A000727D574 +:109BA00060692030C17C0520FEF794FE002807D0B4 +:109BB000207A0821084320726069E030057517E0BB +:109BC000607938436071FAF7C3FE002803D1304949 +:109BD0003A4801F0C0FA60690023816EC26E491CE8 +:109BE0005A41C26681662030C17B012934D0C673D8 +:109BF00060693321095C08292DD10146028DC031ED +:109C00008B89521C9A4226D1227A002A23D14A8A71 +:109C100083889A4207D18B8AC788BB4203D1CB8AFB +:109C20000789BB4208D043888B85CA858A8A0A8601 +:109C3000CA8A4A86E8210E5401221146FAF723FA0D +:109C400000210420F9F717FA6069CB210D54203068 +:109C5000C57403218175F8BDC573C9E730B50A4CD9 +:109C600083B0A079C0077DD0207A00287AD16069BE +:109C70002030C17C0120FEF72DFE00284AD1E0698A +:109C8000C0780D286FD21BE0100100208021002039 +:109C9000D48F01000E0B0000160B000027050000FA +:109CA0002D050000340500003C05000043050000C0 +:109CB000490500005B050000BD0500009E03000093 +:109CC00001007944097949188F443B1506C14D4D6F +:109CD000FE24FD4D98B2FC00E069FAF7BEF8616918 +:109CE000C82250540222332042540020403148817F +:109CF0000120887385E160692030C17C0020FEF777 +:109D0000E9FD0028207A02D0002803D103E00121D8 +:109D10000843207275E1E069FAF798F86169CC228E +:109D200050520A8D801ABC4A00B290425FDC002873 +:109D30005DDDCE31E069FAF77EF8606906212030FA +:109D400083E060692030C17C0020FEF7C3FD00285D +:109D500003D1207A012108432072207A00284CD1B7 +:109D6000E06901E055E134E1FAF732F800282ED03D +:109D7000E069FAF728F86169CC2250520A8D801AFE +:109D8000A54A00B2904232DC002830DDE069FAF7E3 +:109D900014F86169C0318873E069FAF707F86169FE +:109DA000C0310882E069F9F7E6FF6169C031488295 +:109DB000E069F9F7E9FF6169C0318882E069F9F784 +:109DC000ECFF6169D62250520820203196E060698C +:109DD0002030C17C0020FEF77DFD002803D1207AD1 +:109DE000012108432072207A002806D100E12820B2 +:109DF0004222505404202031C87402E160692030AE +:109E0000C17C0020FEF766FD002803D1207A0121E5 +:109E100008432072207A00285FD160690022014641 +:109E200040304281012282730B202031C874E8E067 +:109E300060692030C17C0C2903D0217A02221143B1 +:109E40002172217A002948D10D21C174D9E06069BD +:109E50002030C17C0020FEF73DFD002808D160695C +:109E60004030007D002803D1207A01210843207270 +:109E7000207A002831D160690022014640304281B9 +:109E800001258573A831E069FAF704F86169E06992 +:109E90008031FAF710F86069E030007F002803D0C5 +:109EA0005E495F4801F057F96169FE204A884252D5 +:109EB000FF310131E069F9F7D7FF6169E069FF31EE +:109EC000093102E01CE056E008E0F9F7D9FF6069CB +:109ED000FC210D540F212030C17492E060690146CD +:109EE0002031CA7C122A03D0227A02231A4322721A +:109EF000227A002A6CD1403082731620C87480E028 +:109F000060690146C031CA7A002A06D0897A0629DA +:109F100003D0217A012211432172217A002970D1C4 +:109F20004030807D800715D4E069F9F7F5FF61695D +:109F30004031C875E069F9F7F1FF61694031088384 +:109F4000E069F9F7F0FF6169022240314883887DBA +:109F50001043887560690146C0318A7A062A01D1AA +:109F600000228A724030827DD2074AD10622CA720C +:109F70000021018245E060692030C17C0020FEF7AD +:109F8000A9FC002803D1207A012108432072207AFD +:109F9000002836D16946E069F9F7D5FF68460078B0 +:109FA000C107C90F6846017004D0606901214030C3 +:109FB000017703E060690021403001776069002289 +:109FC0000146403042810122827309202031C87449 +:109FD00017E060692030C17C0020FEF77BFC002880 +:109FE00003D1207A012108432072207A002808D169 +:109FF000E069F9F7BAFE61698922505405202031E1 +:10A00000C87461690023886ECA6E401C5A41CA66D2 +:10A01000886603B030BD0000FE7F0000D48F0100D1 +:10A020002104000047490968016000207047454944 +:10A030000860002070470121434A002803D001280E +:10A0400003D042487047916300E0D163002070471D +:10A050003F49012008603D48801C704704223D4B69 +:10A060003B49002805D05A60086901221043086165 +:10A0700008E008694008400008619A603249002001 +:10A08000C03188600020704731490622002808D07E +:10A09000012809D002280DD003280FD02B48401CDE +:10A0A00070470869904302E008699043801C08618A +:10A0B0000020704708699043001DF8E708691043C5 +:10A0C000F5E723494A6A02434A6200207047204963 +:10A0D0004A6A82434A62002070471D49496A01600A +:10A0E000002070471A49CA690243CA6100207047BC +:10A0F0001749CA698243CA61002070471449C96977 +:10A100000160002070471249024600204031002AB9 +:10A1100003D0012A01D0072070478A6370470D4998 +:10A120000420886008490020C03188600A4801681E +:10A130008022090A090211430160084901200860D0 +:10A140007047000000040040400000400420000070 +:10A15000000500400003004000E400E000E100E0F2 +:10A160008107C90E002808DA0007000F08388008A8 +:10A17000814A80008018C06904E080087F4A80001E +:10A1800080180068C8400006800F704710B504466C +:10A1900000F0DBF8002813D02046FFF7E1FFC0B243 +:10A1A00000F0E1F800280DD07549E2060B78D20ED8 +:10A1B00001209040002B08D04A681043486006E018 +:10A1C000704810BD6F48401C10BD6F4908600020EA +:10A1D00010BD10B5044600F0B8F800280BD068494F +:10A1E000E2060B78D20E01209040002B05D04A6881 +:10A1F00082434A6004E0634810BD634980310860CF +:10A20000002010BD70B50D46044600F09EF80028F1 +:10A210000BD05E480068E206D20E01219140084052 +:10A2200000D001202860002070BD564870BD10B5D8 +:10A23000044600F08AF8002807D0E106C90E012084 +:10A24000884052490860002010BD4E4810BD10B52E +:10A25000044600F07AF8002808D0E106C90E012073 +:10A2600088404A4980310860002010BD454810BD33 +:10A2700070B50D46044600F068F8002819D028464D +:10A2800000F071F8002816D0A007C10EFF228A4006 +:10A29000A807000E8840002C10DA2107090F0839A2 +:10A2A0008B0835499B005B18D96991430143D961FB +:10A2B0000CE0344870BD3348401C70BDA3082F49E2 +:10A2C0009B005B181968914301431960002070BD21 +:10A2D00070B50C46054600F038F8002805D0284631 +:10A2E000FFF73EFF2070002070BD264870BDBFF311 +:10A2F0004F8F21492648C860BFF34F8FFEE770B5E6 +:10A300001F4C05462178012000290ED1207072B61D +:10A3100000F0F4F81C4E803631688143616000F033 +:10A32000EDF8C043306062B600202870002070BD98 +:10A3300013490A78002A06D0002804D1124A486836 +:10A340001060002008700020704710B504462028D7 +:10A3500007DA00F0D3F80121A140084201D1012021 +:10A3600010BD002010BD012803D0032801D000201B +:10A37000704701207047000000ED00E000E400E0BD +:10A38000300100200120000000E100E000E200E0D8 +:10A390000400FA05F8B504468007002501260028C8 +:10A3A00004DA5848C563C66302208443E00404D538 +:10A3B0005548C563C66380148443600003D5534881 +:10A3C000456080058443E00504D55148C563C663F4 +:10A3D00080158443A00404D54E48C563C663401469 +:10A3E000844360042704C00FF90F884203D04AA1B8 +:10A3F000612000F0B0FEB80F0AD04C49CD634C4844 +:10A40000C563C563CE63C663C6630320800384430C +:10A4100020050AD5474FFD632F20E6F7C5FEFE63F2 +:10A420002F20E6F7C1FEF8148443F7F7D7FF424820 +:10A43000044203D038A18D2000F08DFEF8BDF0B5A8 +:10A4400000210A46FF230446CC40E4072AD04CB240 +:10A45000E606F60E0125B540384E3560384E3560BB +:10A46000002C11DA25072D0F083DAE08354DB6003A +:10A470007719FD69A407E60E1C46B440A5431446AF +:10A48000B4402543FD610DE0A6082F4DB6007619B6 +:10A490003568A407E70E1C46BC40A5431446BC40E3 +:10A4A00025433560491C2029CDD3F0BD70B5274C1C +:10A4B0000D462060FFF76EFF2068FFF7C0FF2846BB +:10A4C000E8F766F8F7F796FEF1F792FDF7F786FFE3 +:10A4D000FFF725FEE7F7E2FE00F06AF870BD10B561 +:10A4E0001A4C2068FFF756FF2068FFF7A8FFF7F720 +:10A4F00075FFE8F7C7F80020206010BD134800681A +:10A5000070470000C01F0040C0CF004000E5014080 +:10A51000C08F0040C0DF00407372635C736F635F85 +:10A52000636F6E6669672E6300000000C0EF004035 +:10A53000C0FF0040C0BF0040FEFF0FFC80E100E014 +:10A5400080E200E000ED00E000E400E038010020DF +:10A5500070B5002402460D4620462146002A1ED032 +:10A56000012A04D0022A04D0032A1ED103E00120CC +:10A5700002E0022013E003202B0000F00DFF07167D +:10A580000507090B0D0F1600012108E0022106E066 +:10A59000032104E0042102E0052100E00621F2F796 +:10A5A00058FA002801D0204670BD0724FBE70000C0 +:10A5B000B348002101708170704770B5B14D01231F +:10A5C0006B60B14B1C68002CFCD0002407E00E68C7 +:10A5D00006601E68002EFCD0001D091D641C9442FC +:10A5E000F5D30020686018680028FCD070BD70B5F5 +:10A5F000A34C0E466178884203D0A4A16F2000F0DE +:10A60000AAFD0325330000F0C7FE09520624245298 +:10A610005252524952002078022803D09BA1732045 +:10A6200000F099FD2570A078022802D0012804D0FE +:10A6300008E0A068E8F7C6FC04E02046083007C838 +:10A64000FFF7BBFF0020A070F2F7A4F904202070F0 +:10A6500070BDF2F754FA01466068F3F769FC0646EC +:10A660002078022803D089A1872000F074FD8B4A4E +:10A670008B498C48964205D86269032A02D2521C43 +:10A68000626102E0864207D84D71801BC860844930 +:10A690006078F2F7ABFE70BD032003E0A0780028DD +:10A6A000FAD10220F2F77EF800F0E1F870BD77A150 +:10A6B000B12000F050FD70BD70B50546F2F71FFAED +:10A6C0006F4C60602078012803D070A1B82000F0A2 +:10A6D00042FD73490220087000220A718D60042235 +:10A6E0004A71704ACA6020706078F2F77FFE70BDD0 +:10A6F00010B5634CA078002802D12078002801D042 +:10A70000112010BD6848F2F78BF96070607800285E +:10A7100004D0012020700020606110BD032010BD16 +:10A7200010B50124020B64040121604BA04202D247 +:10A730009140186802E0203A58689140084000D0E3 +:10A74000012010BDF8B50E46910005464F1914467C +:10A750003F1F0091E8F747FC009980028919091F03 +:10A76000B14201D2012200E00022002C03D0FF21DF +:10A7700001318C4201D90920F8BD4D498D4219D3D0 +:10A78000AF4217D3854205D2874203D228463043D1 +:10A79000800701D01020F8BD8E420BD3002A09D1CA +:10A7A0002846FFF7BDFF002804D13846FFF7B8FF61 +:10A7B000002801D00F20F8BD3E483F49006888427C +:10A7C00005D0224631462846FFF7F7FE0FE0FFF797 +:10A7D0008FFF0028EFD12A480121C66085600461FF +:10A7E00081702046302148431830FFF765FF002074 +:10A7F000F8BD10B504462E48800A84420BD3E8F712 +:10A80000F2FBA04201D8102010BDA0020446FFF7C1 +:10A8100087FF002801D00F2010BD26482649006878 +:10A82000884203D02046E8F7CDFB0AE0FFF760FF3F +:10A830000028F1D112480221846081701F48FFF77F +:10A840003BFF002010BD1A48010B01208840401E2C +:10A85000704700B50B460246FFF7F5FF104201D0E6 +:10A860000F2000BD114802604360002000BD10B5FC +:10A87000034C6078F2F728F900202070A07010BD1A +:10A880003C01002000E5014000E401407372635C7C +:10A89000736F635F666C6173682E630030750000D0 +:10A8A000D0210020D0FB0100EFA5010000060040F0 +:10A8B00000C0010064000020BEBAFECA3A56000083 +:10A8C000F94805218170002101704170C1708160DB +:10A8D000704710B5F5490A78022A07D0CA681018DF +:10A8E000C860C8689638F3F7DBFA10BD8A6810189C +:10A8F00088608868F6E70378ED49EE4A002B02D0BD +:10A90000012B10D014E00379002B01D0012B0FD1C3 +:10A910004379002B01D0012B0AD18368643B8B4221 +:10A9200006D2C06810E00379002B03D0012B01D0C0 +:10A93000002070474379002B01D0012BF8D1C36868 +:10A94000643B8B42F4D280689042F1D8012070477A +:10A95000F8B504460226F2F731FF0068002803D05C +:10A96000D5A1BD2000F0F7FB0127CF4D002C08D06A +:10A970002078002817D0012805D0022811D00328FC +:10A9800013D02F710DE06068C82808D3F3F7FEFAE2 +:10A99000002804D06068FFF79CFF012603E0002632 +:10A9A00001E000F0FDF93046F8BD28780028F8D124 +:10A9B0006068FFF7A0FF0028E3D0606800780028F7 +:10A9C00026D0A878042803D0BBA1F72000F0C3FB51 +:10A9D000B64F0020387060680079012800D0002050 +:10A9E000387160684079002837D004207871606839 +:10A9F0008168E868F2F715FBB8606068C068963057 +:10AA0000F8600320A870A949E878F2F7EFFCC8E7DE +:10AA1000A6480221017061680979012919D0002135 +:10AA2000017161684979002915D00421417161687B +:10AA30008968963181606168C968C160C0689A4C54 +:10AA400014346060F2F75BF820606F700220A87029 +:10AA5000A7E70321E4E70321E8E70320C6E7F8B509 +:10AA6000914C0D46E178884204D0FF2092A11A3023 +:10AA700000F071FB2846002501268C4F030000F0F2 +:10AA80008BFC0906123C5E82939DCAA6CA00A07880 +:10AA9000032807D0A078022804D0FF2086A11E300A +:10AAA00000F059FBF8BDA078032807D0A078022851 +:10AAB00004D0FF2080A1223000F04DFB0420A070C4 +:10AAC00025712078002815D1FFF703FF3878022878 +:10AAD0000CD0B868E0607F49886A7F4A02402261F2 +:10AAE0007D4AD24310408862002055E0E078F2F7BA +:10AAF000BFFAEFE700F054F9F8BDA078032807D0BB +:10AB0000A078022804D0FF206BA14B3000F023FB7B +:10AB10002078002802D000F04FF9F8BDA078032873 +:10AB20001ED104202BE0081AF8606049E078F2F7A3 +:10AB30005DFCF8BD0420F1F735FEA570F8BDA078E6 +:10AB4000032807D0A078022804D0FF205AA16C3037 +:10AB500000F001FB20780028DDD1A07803280DD07B +:10AB6000F1F7CDFF504E014614363068F3F7E0F9A7 +:10AB70000028DFDB71688142DCDBD4E70520F1F7D8 +:10AB800011FEA670F8BDA078042804D0FF204AA1C9 +:10AB90008D3000F0E0FA0220A1688847FFF7D8FE68 +:10ABA000FF260546C63642E0A078042804D0FF20E0 +:10ABB00041A1923000F0CFFA0120EDE7A0780428FF +:10ABC00098D0FF203CA1973000F0C5FA92E7A0781A +:10ABD00004280AD06078002802D0A078022804D087 +:10ABE000FF2035A19C3000F0B6FA2078002892D1E1 +:10ABF0002079002804D00620F1F7D4FD2571C0E7A4 +:10AC00006078002805D02949E078F2F7EFFB6570FD +:10AC1000F8BD0720B3E7FF2027A1B73040E7002D9C +:10AC20000AD0012D06D024A1304600F094FA022D5E +:10AC3000F5D1F8BD042000E00320A1688847FFF7A4 +:10AC400087FE0546F3E770B5050005D0164CA078E1 +:10AC5000052803D0112070BD102070BD1F48F1F7EA +:10AC6000DFFEE070E078002803D0A5600020A0702F +:10AC700070BD032070BD10B50B480178002901D0CC +:10AC8000112010BD817805292AD08178012929D089 +:10AC90008178002926D0012101708178012921D0F5 +:10ACA000807800281ED01FE054010020E021002001 +:10ACB0003D860100FF1FA1077372635C736F635FC2 +:10ACC000726164696F5F74696D65736C6F742E6314 +:10ACD0000000000000050040028100005FAA0100A2 +:10ACE0000F2010BD00F068F8002010BDF8B5394EF7 +:10ACF0000446B078002801D001280DD1002C0DD0D9 +:10AD00002046FFF7F8FD00280AD02078324D0028B1 +:10AD100008D0B078012823D00F20F8BD1020F8BD4E +:10AD20000720F8BD02272F702079012814D00020B9 +:10AD300028716079002811D004206871A0689630CD +:10AD4000A860E068E860E868224C14346060F1F7BD +:10AD5000D6FE2060B77019E00320E9E70320ECE796 +:10AD6000002028702079012816D0002028716079F1 +:10AD7000002813D004206871A168F068F2F751F937 +:10AD8000A860E0689630E8600320B0701249F0785F +:10AD9000F2F72CFB0020F8BD0320E7E70320EAE7E9 +:10ADA00010B50E48816A0E4A11400A4A12691143D1 +:10ADB0008162F1F7EFFD10BD10B5064CE078F1F7B8 +:10ADC00083FE0820F1F7EEFC0520A0700020207023 +:10ADD000607010BD54010020E021002000050040FB +:10ADE000FD7EFFFF70477047034610B50B439B077E +:10ADF0000FD1042A0DD308C810C9121FA342F8D0DE +:10AE000018BA21BA884201D9012010BD0020C043E0 +:10AE100010BD002A03D0D30703D0521C07E0002046 +:10AE200010BD03780C78401C491C1B1B07D103780C +:10AE30000C78401C491C1B1B01D1921EF1D11846F5 +:10AE400010BDF8B5042A2CD3830712D00B78491C07 +:10AE50000370401C521E83070BD00B78491C0370F3 +:10AE6000401C521E830704D00B78491C0370401C01 +:10AE7000521E8B079B0F05D0C91ADF002023DE1B53 +:10AE800008C90AE0E6F7A0F9F8BD1D4608C9FD406B +:10AE90001C46B4402C4310C0121F042AF5D2F308FC +:10AEA000C91A521EF0D40B78491C0370401C521E64 +:10AEB000EAD40B78491C0370401C012AE4D40978B9 +:10AEC0000170F8BD01E004C0091F0429FBD28B0703 +:10AED00001D50280801CC90700D00270704700298C +:10AEE0000BD0C30702D00270401C491E022904D3B4 +:10AEF000830702D50280801C891EE3E70022EEE76B +:10AF00000022DFE7020A08704A70020C8A70020E03 +:10AF1000CA707047002203098B4273D3030A8B4225 +:10AF200058D3030B8B423CD3030C8B4221D312E04A +:10AF300003460B437FD4002243088B4274D303099A +:10AF40008B425FD3030A8B4244D3030B8B4228D33B +:10AF5000030C8B420DD3FF22090212BA030C8B4261 +:10AF600002D31212090265D0030B8B4219D300E001 +:10AF7000090AC30B8B4201D3CB03C01A5241830B86 +:10AF80008B4201D38B03C01A5241430B8B4201D336 +:10AF90004B03C01A5241030B8B4201D30B03C01A5F +:10AFA0005241C30A8B4201D3CB02C01A5241830AD9 +:10AFB0008B4201D38B02C01A5241430A8B4201D308 +:10AFC0004B02C01A5241030A8B4201D30B02C01A32 +:10AFD0005241CDD2C3098B4201D3CB01C01A524199 +:10AFE00083098B4201D38B01C01A524143098B4222 +:10AFF00001D34B01C01A524103098B4201D30B010B +:10B00000C01A5241C3088B4201D3CB00C01A52412F +:10B0100083088B4201D38B00C01A524143088B42F4 +:10B0200001D34B00C01A5241411A00D2014652418D +:10B03000104670475DE0CA0F00D04942031000D3AC +:10B040004042534000229C4603098B422DD3030A01 +:10B050008B4212D3FC22890112BA030A8B420CD311 +:10B06000890192118B4208D3890192118B4204D33A +:10B0700089013AD0921100E08909C3098B4201D3BA +:10B08000CB01C01A524183098B4201D38B01C01AF4 +:10B09000524143098B4201D34B01C01A524103096B +:10B0A0008B4201D30B01C01A5241C3088B4201D31A +:10B0B000CB00C01A524183088B4201D38B00C01AC7 +:10B0C0005241D9D243088B4201D34B00C01A52419E +:10B0D000411A00D20146634652415B10104601D32B +:10B0E0004042002B00D54942704763465B1000D3B5 +:10B0F000404201B50020C046C04602BD70477047BF +:10B10000704710B500F058F810BD30B58C180278B3 +:10B11000401C13071B0F01D10378401C120906D1F4 +:10B120000278401C03E00578401C0D70491C5B1E32 +:10B13000F9D101E00B70491C521EFBD1A142E6D3AC +:10B14000002030BD012308CB134B1860134B19604E +:10B15000134B1A607047134A134B13607246053A3B +:10B16000F0E7114A0F4B1B689A420ED10D4B00209D +:10B17000186001980D4B04B598470CBC9E460246DA +:10B18000029800990A4B1B68184706980599094BC5 +:10B190001B68DB6818470000780100207C01002054 +:10B1A0008001002070010020EFBEADDE4D2F0000B9 +:10B1B00098000020040000201D481E497047FFF73A +:10B1C000FBFFE5F7BBFF00BD01200007C06AC0B26E +:10B1D000FF2804D1184819490968884202D0184844 +:10B1E00018490160184819490968884203D1184A6A +:10B1F00013605B68184700BD20BFFDE71248134984 +:10B20000096888420ED1134B18680B498842F3D065 +:10B2100080F308881049884204DD10480268022142 +:10B220000A4302600E4880470E4880470E48004798 +:10B23000F0210020F0210020FFFFFFFF0010001090 +:10B240002C05004008000000001000000000002055 +:10B250000400002000C00100002000202405004060 +:10B26000632F0000C9B1010045B1010013487045CA +:10B2700002D1EFF3098101E0EFF308818869023818 +:10B280000078102814DB202810DB2B280BDB0C4A5D +:10B2900012680C4B9A4203D1602804DB0A4A10471B +:10B2A000022008607047094A10470000084A10470A +:10B2B000084A12682C32126810470000FDFFFFFF99 +:10B2C00064000020BEBAFECAAD120000991F010042 +:10B2D0001B1F0100040000200D4B0E4908470E4BB8 +:10B2E0000C4908470D4B0B4908470D4B09490847C6 +:10B2F0000C4B084908470C4B064908470B4B0549BE +:10B3000008470B4B034908470A4B0249084700000E +:10B31000B125000051220000D52B0000772A000043 +:10B32000252A0000D7270000B912000017140000DA +:10B33000392B0000472300000A7802704B784370D5 +:10B340008A788270CA78C2700B79037170470A7864 +:10B3500002704B7843708A788270CA78C2700B7919 +:10B3600003714A79427170470A7802704B784370D2 +:10B370008A788270CA78C2700B7903714A794271F7 +:10B380008A798271CB79C37170470A8802804A88B2 +:10B3900042800A790271704730B47446641E257881 +:10B3A000641CAB4200D21D46635D5B00E31830BCF9 +:10B3B00018470000FFFFFFFF0000FFFF0100030030 +:10B3C000000001000000000000000000000000007C +:10B3D00000000000870000000000000000000000E6 +:10B3E0000000000000000001020304000D0E0F1019 +:10B3F000000000000F6900002D6B0000F56B0000DD +:10B400004F6C0000A36C00000B6D00006969000028 +:10B41000216A0000AD6D0000BB7900001001100131 +:10B420003A0200001A020000040104013C00170067 +:10B4300044000E00F401FA00960064004B00320054 +:10B440001E001400010204081020408055555525A7 +:10B450002627D6BE898E555555D6BE898E0000004A +:10B460007006120DB413000014035A06A009000060 +:10B470006004F208840D0000A8B401000800002058 +:10B480001000000004110000B8B4010018000020F2 +:10B490006C0100000AB10100D8B401008401002051 +:10B4A0006C20000020110000024801688907FCD5CB +:10B4B0007047000000E200E0013536010001005451 +:10B4C0003720FB349B5F80B4800010026801337F1B +:08B4D0000102A029E449B101C9 +:00000001FF diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/PeripheralNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/PeripheralNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/PeripheralNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/PeripheralNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/PortNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/PortNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/PortNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/PortNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_ARCH_BLE/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_ARCH_BLE/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_ARCH_BLE/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_ARCH_BLE/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_ARCH_BLE/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_ARCH_BLE/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_ARCH_BLE/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_ARCH_BLE/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/mbed_overrides.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/mbed_overrides.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/mbed_overrides.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/mbed_overrides.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/rtc_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/rtc_api.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/rtc_api.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/rtc_api.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_HRM1017/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_HRM1017/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_HRM1017/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_HRM1017/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_HRM1017/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_HRM1017/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_HRM1017/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_HRM1017/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51822_MKIT/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_MKIT/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51822_MKIT/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_MKIT/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51822_MKIT/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_MKIT/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51822_MKIT/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_MKIT/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51822_SBKIT/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_SBKIT/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51822_SBKIT/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_SBKIT/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51822_SBKIT/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_SBKIT/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51822_SBKIT/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_SBKIT/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51822_Y5_MBUG/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_Y5_MBUG/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51822_Y5_MBUG/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_Y5_MBUG/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51822_Y5_MBUG/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_Y5_MBUG/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51822_Y5_MBUG/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_Y5_MBUG/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51_DK/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DK/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51_DK/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DK/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51_DK/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DK/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51_DK/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DK/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51_DONGLE/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DONGLE/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51_DONGLE/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DONGLE/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51_DONGLE/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DONGLE/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51_DONGLE/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DONGLE/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51_MICROBIT/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_MICROBIT/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51_MICROBIT/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_MICROBIT/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51_MICROBIT/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_MICROBIT/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_NRF51_MICROBIT/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_MICROBIT/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_SEEED_TINY_BLE/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_SEEED_TINY_BLE/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_SEEED_TINY_BLE/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_SEEED_TINY_BLE/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_SEEED_TINY_BLE/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_SEEED_TINY_BLE/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_SEEED_TINY_BLE/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_SEEED_TINY_BLE/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_TY51822R3/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_TY51822R3/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_TY51822R3/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_TY51822R3/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_TY51822R3/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_TY51822R3/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_TY51822R3/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_TY51822R3/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_WALLBOT_BLE/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_WALLBOT_BLE/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_WALLBOT_BLE/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_WALLBOT_BLE/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_WALLBOT_BLE/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_WALLBOT_BLE/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_WALLBOT_BLE/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_WALLBOT_BLE/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/analogin_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/analogin_api.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/gpio_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/gpio_api.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/gpio_api.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/gpio_api.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/gpio_irq_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/gpio_irq_api.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/gpio_irq_api.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/gpio_irq_api.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/gpio_object.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/gpio_object.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/gpio_object.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/gpio_object.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/i2c_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/i2c_api.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/i2c_api.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/i2c_api.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/objects.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/objects.h old mode 100755 new mode 100644 similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/objects.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/objects.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/pinmap.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pinmap.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/pinmap.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pinmap.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/port_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/port_api.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/port_api.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/port_api.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/pwmout_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/pwmout_api.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/serial_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/serial_api.c old mode 100755 new mode 100644 similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/serial_api.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/serial_api.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/sleep.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sleep.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/sleep.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sleep.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/spi_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/spi_api.c old mode 100755 new mode 100644 similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/spi_api.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/spi_api.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/twi_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/twi_config.h old mode 100755 new mode 100644 similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/twi_config.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/twi_config.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/twi_master.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/twi_master.c old mode 100755 new mode 100644 similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/twi_master.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/twi_master.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/twi_master.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/twi_master.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/twi_master.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/twi_master.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/us_ticker.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/us_ticker.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/us_ticker.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/us_ticker.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/Lib/s132_nrf52_2_0_0/s132_nrf52_2.0.0_softdevice.hex b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/Lib/s132_nrf52_2_0_0/s132_nrf52_2.0.0_softdevice.hex similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/Lib/s132_nrf52_2_0_0/s132_nrf52_2.0.0_softdevice.hex rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/Lib/s132_nrf52_2_0_0/s132_nrf52_2.0.0_softdevice.hex diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/PeripheralNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/PeripheralNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/PeripheralNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/PeripheralNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/PortNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/PortNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/PortNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/PortNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/TARGET_NRF52_DK/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TARGET_NRF52_DK/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/TARGET_NRF52_DK/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TARGET_NRF52_DK/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/TARGET_NRF52_DK/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TARGET_NRF52_DK/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/TARGET_NRF52_DK/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TARGET_NRF52_DK/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/analogin_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/analogin_api.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/analogin_api.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/analogin_api.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/gpio_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/gpio_api.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/gpio_api.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/gpio_api.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/gpio_irq_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/gpio_irq_api.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/gpio_irq_api.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/gpio_irq_api.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/gpio_object.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/gpio_object.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/gpio_object.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/gpio_object.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/i2c_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/i2c_api.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/i2c_api.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/i2c_api.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/objects.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/objects.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/objects.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/objects.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/pinmap.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pinmap.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/pinmap.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pinmap.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/port_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/port_api.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/port_api.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/port_api.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/pwmout_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/pwmout_api.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/serial_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/serial_api.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/serial_api.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/serial_api.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/sleep.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sleep.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/sleep.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sleep.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/spi_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/spi_api.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/spi_api.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/spi_api.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/us_ticker.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/us_ticker.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF52832/us_ticker.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/us_ticker.c From 216fa9dfa707e93c587361607510dee18bffd538 Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Wed, 15 Jun 2016 16:43:06 +0100 Subject: [PATCH 07/67] Introduce nordic SDK v11, cleanup path and targets. --- .../compiler_abstraction.h | 109 - .../TARGET_MCU_NRF51822/nrf_delay.h | 74 - .../TARGET_MCU_NORDIC_16K/startup_nRF51822.S | 0 .../TARGET_MCU_NORDIC_32K/nRF51822.sct | 0 .../TARGET_MCU_NORDIC_32K/startup_nRF51822.S | 0 .../TARGET_MCU_NRF51_16K_S110/nRF51822.sct | 0 .../TARGET_MCU_NRF51_16K_S130/nRF51822.sct | 0 .../TOOLCHAIN_ARM_STD/sys.cpp | 0 .../TARGET_MCU_NORDIC_32K/NRF51822.ld | 0 .../TARGET_MCU_NRF51_16K_S110/NRF51822.ld | 0 .../TARGET_MCU_NRF51_16K_S130/NRF51822.ld | 0 .../TOOLCHAIN_GCC_ARM/startup_NRF51822.S | 0 .../TARGET_MCU_NORDIC_16K/nRF51822_QFAA.icf | 0 .../startup_NRF51822_IAR.S | 0 .../TARGET_MCU_NORDIC_32K/nRF51822_QFAA.icf | 0 .../startup_NRF51822_IAR.S | 0 .../s110_nrf51822_7.1.0_softdevice.bin | Bin .../TARGET_MCU_NRF51822/cmsis.h | 0 .../TARGET_MCU_NRF51822/cmsis_nvic.c | 0 .../TARGET_MCU_NRF51822/cmsis_nvic.h | 0 .../TARGET_MCU_NRF51822/system_nrf51.c | 100 +- .../TARGET_MCU_NRF51822/system_nrf51.h | 5 +- .../TOOLCHAIN_GCC_ARM/NRF52832.ld | 0 .../TOOLCHAIN_GCC_ARM/startup_NRF52832.S | 0 .../TARGET_MCU_NRF52832/cmsis.h | 0 .../TARGET_MCU_NRF52832/cmsis_nvic.c | 0 .../TARGET_MCU_NRF52832/cmsis_nvic.h | 0 .../TARGET_MCU_NRF52832/system_nrf52.c | 58 +- .../TARGET_MCU_NRF52832/system_nrf52.h} | 49 +- .../sdk/device}/compiler_abstraction.h | 44 +- .../TARGET_NRF5/sdk/device/nrf.h | 66 + .../sdk/device}/nrf51.h | 165 +- .../sdk/device}/nrf51_bitfields.h | 423 +- .../TARGET_NRF5/sdk/device/nrf51_deprecated.h | 438 ++ .../sdk/device}/nrf51_to_nrf52.h | 45 +- .../sdk/device}/nrf52.h | 49 +- .../sdk/device}/nrf52_bitfields.h | 44 +- .../sdk/device}/nrf52_name_change.h | 47 +- .../components/libraries/util/app_error.h | 92 - .../components/libraries/util/app_util.h | 234 - .../sdk/softdevice/s130/headers/ble.h | 632 ++ .../sdk/softdevice/s130/headers/ble_err.h | 90 + .../sdk/softdevice/s130/headers/ble_gap.h | 1742 +++++ .../sdk/softdevice/s130/headers/ble_gatt.h | 212 + .../sdk/softdevice/s130/headers/ble_gattc.h | 569 ++ .../sdk/softdevice/s130/headers/ble_gatts.h | 722 ++ .../sdk/softdevice/s130/headers/ble_hci.h | 131 + .../sdk/softdevice/s130/headers/ble_l2cap.h | 202 + .../sdk/softdevice/s130/headers/ble_ranges.h | 126 + .../sdk/softdevice/s130/headers/ble_types.h | 205 + .../softdevice/s130/headers/nrf51/nrf_mbr.h | 199 + .../sdk/softdevice/s130/headers/nrf_error.h | 87 + .../softdevice/s130/headers/nrf_error_sdm.h} | 54 +- .../softdevice/s130/headers/nrf_error_soc.h | 82 + .../sdk/softdevice/s130/headers/nrf_nvic.h | 483 ++ .../sdk/softdevice/s130/headers/nrf_sd_def.h | 23 + .../sdk/softdevice/s130/headers/nrf_sdm.h | 271 + .../sdk/softdevice/s130/headers/nrf_soc.h | 908 +++ .../sdk/softdevice/s130/headers/nrf_svc.h | 88 + .../s130/hex/s130_nrf51_2.0.0_softdevice.hex | 6783 ++++++++++++++++ .../sdk/softdevice/s132/headers/ble.h | 632 ++ .../sdk/softdevice/s132/headers/ble_err.h | 90 + .../sdk/softdevice/s132/headers/ble_gap.h | 1742 +++++ .../sdk/softdevice/s132/headers/ble_gatt.h | 212 + .../sdk/softdevice/s132/headers/ble_gattc.h | 569 ++ .../sdk/softdevice/s132/headers/ble_gatts.h | 722 ++ .../sdk/softdevice/s132/headers/ble_hci.h | 131 + .../sdk/softdevice/s132/headers/ble_l2cap.h | 202 + .../sdk/softdevice/s132/headers/ble_ranges.h | 126 + .../sdk/softdevice/s132/headers/ble_types.h | 205 + .../softdevice/s132/headers/nrf52/nrf_mbr.h | 217 + .../sdk/softdevice/s132/headers/nrf_error.h | 87 + .../softdevice/s132/headers/nrf_error_sdm.h} | 58 +- .../softdevice/s132/headers/nrf_error_soc.h | 82 + .../sdk/softdevice/s132/headers/nrf_nvic.h | 483 ++ .../sdk/softdevice/s132/headers/nrf_sd_def.h | 23 + .../sdk/softdevice/s132/headers/nrf_sdm.h | 271 + .../sdk/softdevice/s132/headers/nrf_soc.h | 908 +++ .../sdk/softdevice/s132/headers/nrf_svc.h | 88 + .../s132/hex/s132_nrf52_2.0.0_softdevice.hex | 6918 +++++++++++++++++ .../sdk/ble/ble_advertising/ble_advertising.c | 566 ++ .../sdk/ble/ble_advertising/ble_advertising.h | 223 + .../ble/ble_db_discovery/ble_db_discovery.c | 939 +++ .../ble/ble_db_discovery/ble_db_discovery.h | 180 + .../ble_debug_assert_handler.c | 55 + .../ble_debug_assert_handler.h | 51 + .../TARGET_NRF5/sdk/ble/ble_dtm/ble_dtm.c | 643 ++ .../TARGET_NRF5/sdk/ble/ble_dtm/ble_dtm.h | 141 + .../sdk/ble/ble_error_log/ble_error_log.c | 58 + .../sdk/ble/ble_error_log/ble_error_log.h | 69 + .../TARGET_NRF5/sdk/ble/ble_racp/ble_racp.c | 56 + .../TARGET_NRF5/sdk/ble/ble_racp/ble_racp.h | 96 + .../ble/ble_services/ble_ancs_c/ble_ancs_c.c | 812 ++ .../ble/ble_services/ble_ancs_c/ble_ancs_c.h | 419 + .../ble/ble_services/ble_ans_c/ble_ans_c.c | 544 ++ .../ble/ble_services/ble_ans_c/ble_ans_c.h | 348 + .../sdk/ble/ble_services/ble_bas/ble_bas.c | 316 + .../sdk/ble/ble_services/ble_bas/ble_bas.h | 133 + .../ble/ble_services/ble_bas_c/ble_bas_c.c | 370 + .../ble/ble_services/ble_bas_c/ble_bas_c.h | 212 + .../sdk/ble/ble_services/ble_bps/ble_bps.c | 439 ++ .../sdk/ble/ble_services/ble_bps/ble_bps.h | 161 + .../sdk/ble/ble_services/ble_cscs/ble_cscs.c | 443 ++ .../sdk/ble/ble_services/ble_cscs/ble_cscs.h | 161 + .../ble/ble_services/ble_cscs/ble_sc_ctrlpt.c | 638 ++ .../ble/ble_services/ble_cscs/ble_sc_ctrlpt.h | 211 + .../ble/ble_services/ble_cts_c/ble_cts_c.c | 340 + .../ble/ble_services/ble_cts_c/ble_cts_c.h | 219 + .../sdk/ble/ble_services/ble_dfu/ble_dfu.c | 649 ++ .../sdk/ble/ble_services/ble_dfu/ble_dfu.h | 239 + .../sdk/ble/ble_services/ble_dis/ble_dis.c | 277 + .../sdk/ble/ble_services/ble_dis/ble_dis.h | 98 + .../sdk/ble/ble_services/ble_gls/ble_gls.c | 1273 +++ .../sdk/ble/ble_services/ble_gls/ble_gls.h | 264 + .../sdk/ble/ble_services/ble_gls/ble_gls_db.c | 112 + .../sdk/ble/ble_services/ble_gls/ble_gls_db.h | 84 + .../sdk/ble/ble_services/ble_hids/ble_hids.c | 1380 ++++ .../sdk/ble/ble_services/ble_hids/ble_hids.h | 314 + .../sdk/ble/ble_services/ble_hrs/ble_hrs.c | 440 ++ .../sdk/ble/ble_services/ble_hrs/ble_hrs.h | 192 + .../ble/ble_services/ble_hrs_c/ble_hrs_c.c | 331 + .../ble/ble_services/ble_hrs_c/ble_hrs_c.h | 215 + .../sdk/ble/ble_services/ble_hts/ble_hts.c | 428 + .../sdk/ble/ble_services/ble_hts/ble_hts.h | 160 + .../sdk/ble/ble_services/ble_ias/ble_ias.c | 173 + .../sdk/ble/ble_services/ble_ias/ble_ias.h | 113 + .../ble/ble_services/ble_ias_c/ble_ias_c.c | 189 + .../ble/ble_services/ble_ias_c/ble_ias_c.h | 168 + .../sdk/ble/ble_services/ble_lbs/ble_lbs.c | 228 + .../sdk/ble/ble_services/ble_lbs/ble_lbs.h | 104 + .../ble/ble_services/ble_lbs_c/ble_lbs_c.c | 362 + .../ble/ble_services/ble_lbs_c/ble_lbs_c.h | 191 + .../sdk/ble/ble_services/ble_lls/ble_lls.c | 214 + .../sdk/ble/ble_services/ble_lls/ble_lls.h | 116 + .../sdk/ble/ble_services/ble_nus/ble_nus.c | 295 + .../sdk/ble/ble_services/ble_nus/ble_nus.h | 114 + .../ble/ble_services/ble_nus_c/ble_nus_c.c | 212 + .../ble/ble_services/ble_nus_c/ble_nus_c.h | 192 + .../sdk/ble/ble_services/ble_rscs/ble_rscs.c | 385 + .../sdk/ble/ble_services/ble_rscs/ble_rscs.h | 144 + .../ble/ble_services/ble_rscs_c/ble_rscs_c.c | 360 + .../ble/ble_services/ble_rscs_c/ble_rscs_c.h | 149 + .../sdk/ble/ble_services/ble_tps/ble_tps.c | 139 + .../sdk/ble/ble_services/ble_tps/ble_tps.h | 86 + .../experimental_ble_lns/ble_ln_common.h | 58 + .../experimental_ble_lns/ble_ln_cp.c | 806 ++ .../experimental_ble_lns/ble_ln_cp.h | 219 + .../experimental_ble_lns/ble_ln_db.c | 127 + .../experimental_ble_lns/ble_ln_db.h | 86 + .../experimental_ble_lns/ble_lns.c | 1001 +++ .../experimental_ble_lns/ble_lns.h | 328 + .../TARGET_NRF5/sdk/ble/common/ble_advdata.c | 761 ++ .../TARGET_NRF5/sdk/ble/common/ble_advdata.h | 212 + .../sdk/ble/common/ble_conn_params.c | 323 + .../sdk/ble/common/ble_conn_params.h | 111 + .../sdk/ble/common/ble_conn_state.c | 387 + .../sdk/ble/common/ble_conn_state.h | 275 + .../sdk/ble/common/ble_date_time.h | 76 + .../TARGET_NRF5/sdk/ble/common/ble_gatt_db.h | 49 + .../sdk/ble/common/ble_sensor_location.h | 40 + .../sdk/ble/common/ble_srv_common.c | 197 + .../sdk/ble/common/ble_srv_common.h | 367 + .../config/device_manager_cnfg.h | 98 + .../sdk/ble/device_manager/device_manager.h | 888 +++ .../device_manager_peripheral.c | 2943 +++++++ .../sdk/ble/peer_manager/gatt_cache_manager.c | 568 ++ .../sdk/ble/peer_manager/gatt_cache_manager.h | 209 + .../ble/peer_manager/gattc_cache_manager.c | 112 + .../ble/peer_manager/gattc_cache_manager.h | 105 + .../ble/peer_manager/gatts_cache_manager.c | 369 + .../ble/peer_manager/gatts_cache_manager.h | 201 + .../sdk/ble/peer_manager/id_manager.c | 731 ++ .../sdk/ble/peer_manager/id_manager.h | 242 + .../sdk/ble/peer_manager/peer_data.c | 65 + .../sdk/ble/peer_manager/peer_data.h | 57 + .../sdk/ble/peer_manager/peer_data_storage.c | 760 ++ .../sdk/ble/peer_manager/peer_data_storage.h | 354 + .../sdk/ble/peer_manager/peer_database.c | 777 ++ .../sdk/ble/peer_manager/peer_database.h | 358 + .../sdk/ble/peer_manager/peer_id.c | 159 + .../sdk/ble/peer_manager/peer_id.h | 132 + .../sdk/ble/peer_manager/peer_manager.c | 1012 +++ .../sdk/ble/peer_manager/peer_manager.h | 699 ++ .../ble/peer_manager/peer_manager_internal.h | 147 + .../sdk/ble/peer_manager/peer_manager_types.h | 170 + .../sdk/ble/peer_manager/pm_buffer.c | 122 + .../sdk/ble/peer_manager/pm_buffer.h | 115 + .../sdk/ble/peer_manager/pm_mutex.c | 115 + .../sdk/ble/peer_manager/pm_mutex.h | 90 + .../ble/peer_manager/security_dispatcher.c | 884 +++ .../ble/peer_manager/security_dispatcher.h | 254 + .../sdk/ble/peer_manager/security_manager.c | 553 ++ .../sdk/ble/peer_manager/security_manager.h | 192 + .../sdk/drivers_nrf/ble_flash/ble_flash.c | 306 + .../sdk/drivers_nrf/ble_flash/ble_flash.h | 162 + .../sdk/drivers_nrf/config/nrf_drv_config.h | 484 ++ .../config/nrf_drv_config_validation.h | 103 + .../sdk/drivers_nrf/delay/nrf_delay.c | 26 + .../sdk/drivers_nrf/delay}/nrf_delay.h | 46 +- .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.c | 93 + .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.h | 85 + .../sdk/drivers_nrf/hal/nrf_gpio.h | 667 ++ .../sdk/drivers_nrf/hal/nrf_gpiote.h | 411 + .../sdk/drivers_nrf/hal/nrf_nvmc.c | 136 + .../sdk/drivers_nrf/hal/nrf_nvmc.h | 109 + .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_pdm.h | 379 + .../sdk/drivers_nrf/hal/nrf_temp.h} | 51 +- .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_wdt.h | 319 + .../pstorage/config/pstorage_platform.h | 92 + .../sdk/drivers_nrf/pstorage/pstorage.c | 1592 ++++ .../sdk/drivers_nrf/pstorage/pstorage.h | 401 + .../sdk/libraries/bootloader_dfu/bootloader.c | 382 + .../sdk/libraries/bootloader_dfu/bootloader.h | 97 + .../bootloader_dfu/bootloader_settings.c | 63 + .../bootloader_dfu/bootloader_settings.h | 35 + .../bootloader_dfu/bootloader_types.h | 59 + .../bootloader_dfu/bootloader_util.c | 152 + .../bootloader_dfu/bootloader_util.h | 38 + .../sdk/libraries/bootloader_dfu/dfu.h | 134 + .../bootloader_dfu/dfu_app_handler.c | 192 + .../bootloader_dfu/dfu_app_handler.h | 86 + .../bootloader_dfu/dfu_bank_internal.h | 87 + .../libraries/bootloader_dfu/dfu_ble_svc.h | 80 + .../bootloader_dfu/dfu_ble_svc_internal.h | 43 + .../sdk/libraries/bootloader_dfu/dfu_init.h | 134 + .../bootloader_dfu/dfu_init_template.c | 155 + .../libraries/bootloader_dfu/dfu_transport.h | 40 + .../sdk/libraries/bootloader_dfu/dfu_types.h | 168 + .../hci_transport/hci_mem_pool_internal.h | 32 + .../hci_transport/hci_transport_config.h | 45 + .../TARGET_NRF5/sdk/libraries/crc16/crc16.c | 31 + .../libraries/crc16/crc16.h | 19 +- .../experimental_section_vars/section_vars.h | 263 + .../sdk/libraries/fds/config/fds_config.h | 63 + .../TARGET_NRF5/sdk/libraries/fds/fds.c | 2058 +++++ .../TARGET_NRF5/sdk/libraries/fds/fds.h | 733 ++ .../sdk/libraries/fds/fds_internal_defs.h | 305 + .../fstorage/config/fstorage_config.h | 59 + .../sdk/libraries/fstorage/fstorage.c | 494 ++ .../sdk/libraries/fstorage/fstorage.h | 235 + .../fstorage/fstorage_internal_defs.h | 135 + .../sdk/libraries/fstorage/fstorage_nosd.c | 0 .../hci/config/hci_mem_pool_internal.h | 32 + .../hci/config/hci_transport_config.h | 40 + .../sdk/libraries/hci/hci_mem_pool.c | 235 + .../sdk/libraries/hci/hci_mem_pool.h | 132 + .../sdk/libraries/scheduler/app_scheduler.c | 227 + .../libraries/scheduler/app_scheduler.h | 13 +- .../sdk/libraries/timer/app_timer.h | 287 + .../sdk/libraries/trace/app_trace.c | 43 + .../sdk/libraries/trace/app_trace.h | 56 + .../sdk/libraries/util/app_error.c | 124 + .../sdk/libraries/util/app_error.h | 201 + .../sdk/libraries/util/app_error_weak.c | 53 + .../sdk/libraries/util/app_error_weak.h | 51 + .../TARGET_NRF5/sdk/libraries/util/app_util.h | 493 ++ .../sdk/libraries/util/app_util_bds.h | 413 + .../sdk/libraries/util/app_util_platform.c | 60 + .../sdk/libraries/util/app_util_platform.h | 211 + .../TARGET_NRF5/sdk/libraries/util/common.h | 38 + .../sdk/libraries/util/nordic_common.h | 108 + .../sdk/libraries/util/nrf_assert.c | 28 + .../sdk/libraries/util/nrf_assert.h | 60 + .../TARGET_NRF5/sdk/libraries/util/nrf_log.c | 425 + .../TARGET_NRF5/sdk/libraries/util/nrf_log.h | 699 ++ .../sdk/libraries/util/sdk_common.h | 174 + .../sdk/libraries/util/sdk_errors.h | 115 + .../sdk/libraries/util/sdk_macros.h | 72 + .../sdk/libraries/util/sdk_mapped_flags.c | 161 + .../sdk/libraries/util/sdk_mapped_flags.h | 153 + .../TARGET_NRF5/sdk/libraries/util/sdk_os.h | 40 + .../sdk/libraries/util/sdk_resources.h | 50 + .../ant_stack_handler_types.h | 73 + .../common/softdevice_handler/app_ram_base.h | 176 + .../ble_stack_handler_types.h | 64 + .../softdevice_handler/softdevice_handler.c | 490 ++ .../softdevice_handler/softdevice_handler.h | 213 + .../softdevice_handler_appsh.c | 26 + .../softdevice_handler_appsh.h | 24 + 279 files changed, 83976 insertions(+), 1317 deletions(-) delete mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/compiler_abstraction.h delete mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/nrf_delay.h rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_16K/startup_nRF51822.S (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/startup_nRF51822.S (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S110/nRF51822.sct (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S130/nRF51822.sct (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/sys.cpp (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NORDIC_32K/NRF51822.ld (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S110/NRF51822.ld (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S130/NRF51822.ld (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/startup_NRF51822.S (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/nRF51822_QFAA.icf (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/startup_NRF51822_IAR.S (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/nRF51822_QFAA.icf (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/startup_NRF51822_IAR.S (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/s110_nrf51822_7.1.0_softdevice.bin (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/cmsis.h (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/cmsis_nvic.c (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/cmsis_nvic.h (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/system_nrf51.c (59%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF51822/system_nrf51.h (95%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/NRF52832.ld (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/startup_NRF52832.S (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/cmsis.h (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/cmsis_nvic.c (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/cmsis_nvic.h (100%) rename hal/targets/cmsis/TARGET_NORDIC/{ => TARGET_NRF5}/TARGET_MCU_NRF52832/system_nrf52.c (84%) rename hal/targets/cmsis/TARGET_NORDIC/{TARGET_MCU_NRF51822/nrf.h => TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.h} (67%) rename hal/targets/cmsis/TARGET_NORDIC/{TARGET_MCU_NRF52832 => TARGET_NRF5/sdk/device}/compiler_abstraction.h (61%) create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf.h rename hal/targets/cmsis/TARGET_NORDIC/{TARGET_MCU_NRF51822 => TARGET_NRF5/sdk/device}/nrf51.h (94%) rename hal/targets/cmsis/TARGET_NORDIC/{TARGET_MCU_NRF51822 => TARGET_NRF5/sdk/device}/nrf51_bitfields.h (96%) create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_deprecated.h rename hal/targets/cmsis/TARGET_NORDIC/{TARGET_MCU_NRF52832 => TARGET_NRF5/sdk/device}/nrf51_to_nrf52.h (96%) rename hal/targets/cmsis/TARGET_NORDIC/{TARGET_MCU_NRF52832 => TARGET_NRF5/sdk/device}/nrf52.h (98%) rename hal/targets/cmsis/TARGET_NORDIC/{TARGET_MCU_NRF52832 => TARGET_NRF5/sdk/device}/nrf52_bitfields.h (99%) rename hal/targets/cmsis/TARGET_NORDIC/{TARGET_MCU_NRF52832 => TARGET_NRF5/sdk/device}/nrf52_name_change.h (60%) delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/util/app_error.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/util/app_util.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_err.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gap.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gatt.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gattc.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gatts.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_hci.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_l2cap.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_ranges.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_types.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf51/nrf_mbr.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error.h rename hal/targets/{cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/system_nrf52.h => hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error_sdm.h} (62%) create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error_soc.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_nvic.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_sd_def.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_sdm.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_soc.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_svc.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/hex/s130_nrf51_2.0.0_softdevice.hex create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_err.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gap.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gatt.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gattc.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gatts.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_hci.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_l2cap.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_ranges.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_types.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf52/nrf_mbr.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error.h rename hal/targets/{cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf.h => hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error_sdm.h} (60%) create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error_soc.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_nvic.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_sd_def.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_sdm.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_soc.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_svc.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/hex/s132_nrf52_2.0.0_softdevice.hex create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_advertising/ble_advertising.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_advertising/ble_advertising.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_debug_assert_handler/ble_debug_assert_handler.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_debug_assert_handler/ble_debug_assert_handler.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_dtm/ble_dtm.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_dtm/ble_dtm.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_error_log/ble_error_log.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_error_log/ble_error_log.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_racp/ble_racp.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_racp/ble_racp.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ancs_c/ble_ancs_c.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ancs_c/ble_ancs_c.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ans_c/ble_ans_c.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ans_c/ble_ans_c.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas/ble_bas.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas/ble_bas.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas_c/ble_bas_c.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas_c/ble_bas_c.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bps/ble_bps.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bps/ble_bps.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_cscs.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_cscs.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_sc_ctrlpt.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_sc_ctrlpt.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cts_c/ble_cts_c.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cts_c/ble_cts_c.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dis/ble_dis.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dis/ble_dis.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls_db.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls_db.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hids/ble_hids.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hids/ble_hids.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs/ble_hrs.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs/ble_hrs.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs_c/ble_hrs_c.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs_c/ble_hrs_c.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hts/ble_hts.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hts/ble_hts.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias/ble_ias.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias/ble_ias.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias_c/ble_ias_c.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias_c/ble_ias_c.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs/ble_lbs.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs/ble_lbs.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs_c/ble_lbs_c.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs_c/ble_lbs_c.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lls/ble_lls.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lls/ble_lls.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus/ble_nus.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus/ble_nus.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus_c/ble_nus_c.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus_c/ble_nus_c.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs/ble_rscs.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs/ble_rscs.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs_c/ble_rscs_c.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs_c/ble_rscs_c.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_tps/ble_tps.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_tps/ble_tps.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_common.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_cp.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_cp.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_db.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_db.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_lns.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_lns.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_date_time.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_gatt_db.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_sensor_location.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/config/device_manager_cnfg.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager_peripheral.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data_storage.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data_storage.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_database.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_database.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_id.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_id.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_internal.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_types.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_buffer.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_buffer.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_mutex.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_mutex.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_manager.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_manager.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/config/nrf_drv_config.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/config/nrf_drv_config_validation.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/delay/nrf_delay.c rename hal/targets/{cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832 => hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/delay}/nrf_delay.h (67%) create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpio.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpiote.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_pdm.h rename hal/targets/{cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf_delay.c => hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_temp.h} (57%) create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_wdt.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/config/pstorage_platform.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_types.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_util.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_util.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_app_handler.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_app_handler.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_bank_internal.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_ble_svc.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_ble_svc_internal.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_init.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_init_template.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_transport.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_types.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/hci_transport/hci_mem_pool_internal.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/hci_transport/hci_transport_config.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/crc16/crc16.c rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822/Lib/nordic_sdk/components => sdk}/libraries/crc16/crc16.h (77%) create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/experimental_section_vars/section_vars.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/config/fds_config.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds_internal_defs.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/config/fstorage_config.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage_internal_defs.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage_nosd.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/config/hci_mem_pool_internal.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/config/hci_transport_config.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/hci_mem_pool.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/hci_mem_pool.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/scheduler/app_scheduler.c rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822/Lib/nordic_sdk/components => sdk}/libraries/scheduler/app_scheduler.h (94%) create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/timer/app_timer.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/trace/app_trace.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/trace/app_trace.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error_weak.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error_weak.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_bds.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_platform.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_platform.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/common.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nordic_common.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_log.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_log.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_common.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_errors.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_macros.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_mapped_flags.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_mapped_flags.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_os.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_resources.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/ant_stack_handler_types.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/app_ram_base.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/ble_stack_handler_types.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler_appsh.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler_appsh.h diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/compiler_abstraction.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/compiler_abstraction.h deleted file mode 100644 index 18d70eb207..0000000000 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/compiler_abstraction.h +++ /dev/null @@ -1,109 +0,0 @@ -/* Copyright (c) 2013, 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. - * - */ -#ifndef _COMPILER_ABSTRACTION_H -#define _COMPILER_ABSTRACTION_H - -/*lint ++flb "Enter library region" */ - -#if defined ( __CC_ARM ) - - #ifndef __ASM - #define __ASM __asm /*!< asm keyword for ARM Compiler */ - #endif - - #ifndef __INLINE - #define __INLINE __inline /*!< inline keyword for ARM Compiler */ - #endif - - #ifndef __WEAK - #define __WEAK __weak /*!< weak keyword for ARM Compiler */ - #endif - - #define GET_SP() __current_sp() /*!> read current SP function for ARM Compiler */ - -#elif defined ( __ICCARM__ ) - - #ifndef __ASM - #define __ASM __asm /*!< asm keyword for IAR Compiler */ - #endif - - #ifndef __INLINE - #define __INLINE inline /*!< inline keyword for IAR Compiler. Only available in High optimization mode! */ - #endif - - #ifndef __WEAK - #define __WEAK __weak /*!> define weak function for IAR Compiler */ - #endif - - #define GET_SP() __get_SP() /*!> read current SP function for IAR Compiler */ - -#elif defined ( __GNUC__ ) - - #ifndef __ASM - #define __ASM __asm /*!< asm keyword for GNU Compiler */ - #endif - - #ifndef __INLINE - #define __INLINE inline /*!< inline keyword for GNU Compiler */ - #endif - - #ifndef __WEAK - #define __WEAK __attribute__((weak)) /*!< weak keyword for GNU Compiler */ - #endif - - #define GET_SP() gcc_current_sp() /*!> read current SP function for GNU Compiler */ - - static inline unsigned int gcc_current_sp(void) - { - register unsigned sp asm("sp"); - return sp; - } - -#elif defined ( __TASKING__ ) - - #ifndef __ASM - #define __ASM __asm /*!< asm keyword for TASKING Compiler */ - #endif - - #ifndef __INLINE - #define __INLINE inline /*!< inline keyword for TASKING Compiler */ - #endif - - #ifndef __WEAK - #define __WEAK __attribute__((weak)) /*!< weak keyword for TASKING Compiler */ - #endif - - #define GET_SP() __get_MSP() /*!> read current SP function for TASKING Compiler */ - -#endif - -/*lint --flb "Leave library region" */ - -#endif diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/nrf_delay.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/nrf_delay.h deleted file mode 100644 index 4ce34e15e1..0000000000 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/nrf_delay.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef _NRF_DELAY_H -#define _NRF_DELAY_H - -// #include "nrf.h" - -/*lint --e{438, 522} "Variable not used" "Function lacks side-effects" */ -#if defined ( __CC_ARM ) -static __ASM void __INLINE nrf_delay_us(uint32_t volatile number_of_us) -{ -loop - SUBS R0, R0, #1 - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - BNE loop - BX LR -} -#elif defined ( __ICCARM__ ) -static void __INLINE nrf_delay_us(uint32_t volatile number_of_us) -{ -__ASM ( -"loop:\n\t" - " SUBS R0, R0, #1\n\t" - " NOP\n\t" - " NOP\n\t" - " NOP\n\t" - " NOP\n\t" - " NOP\n\t" - " NOP\n\t" - " NOP\n\t" - " NOP\n\t" - " NOP\n\t" - " NOP\n\t" - " NOP\n\t" - " NOP\n\t" - " BNE loop\n\t"); -} -#elif defined ( __GNUC__ ) -__INLINE static void nrf_delay_us(uint32_t volatile number_of_us) -{ - do - { - __ASM volatile ( - "NOP\n\t" - "NOP\n\t" - "NOP\n\t" - "NOP\n\t" - "NOP\n\t" - "NOP\n\t" - "NOP\n\t" - "NOP\n\t" - "NOP\n\t" - "NOP\n\t" - "NOP\n\t" - "NOP\n\t" - "NOP\n\t" - "NOP\n\t" - ); - } while (--number_of_us); -} -#endif - -void nrf_delay_ms(uint32_t volatile number_of_ms); - -#endif diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_16K/startup_nRF51822.S b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_16K/startup_nRF51822.S similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_16K/startup_nRF51822.S rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_16K/startup_nRF51822.S diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/startup_nRF51822.S b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/startup_nRF51822.S similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/startup_nRF51822.S rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/startup_nRF51822.S diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S110/nRF51822.sct b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S110/nRF51822.sct similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S110/nRF51822.sct rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S110/nRF51822.sct diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S130/nRF51822.sct b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S130/nRF51822.sct similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S130/nRF51822.sct rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S130/nRF51822.sct diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/sys.cpp b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/sys.cpp similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/sys.cpp rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/sys.cpp diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NORDIC_32K/NRF51822.ld b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NORDIC_32K/NRF51822.ld similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NORDIC_32K/NRF51822.ld rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NORDIC_32K/NRF51822.ld diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S110/NRF51822.ld b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S110/NRF51822.ld similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S110/NRF51822.ld rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S110/NRF51822.ld diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S130/NRF51822.ld b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S130/NRF51822.ld similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S130/NRF51822.ld rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S130/NRF51822.ld diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/startup_NRF51822.S b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/startup_NRF51822.S similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/startup_NRF51822.S rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/startup_NRF51822.S diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/nRF51822_QFAA.icf b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/nRF51822_QFAA.icf similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/nRF51822_QFAA.icf rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/nRF51822_QFAA.icf diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/startup_NRF51822_IAR.S b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/startup_NRF51822_IAR.S similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/startup_NRF51822_IAR.S rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/startup_NRF51822_IAR.S diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/nRF51822_QFAA.icf b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/nRF51822_QFAA.icf similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/nRF51822_QFAA.icf rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/nRF51822_QFAA.icf diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/startup_NRF51822_IAR.S b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/startup_NRF51822_IAR.S similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/startup_NRF51822_IAR.S rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/startup_NRF51822_IAR.S diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/s110_nrf51822_7.1.0_softdevice.bin b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/s110_nrf51822_7.1.0_softdevice.bin similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/s110_nrf51822_7.1.0_softdevice.bin rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/s110_nrf51822_7.1.0_softdevice.bin diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/cmsis.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/cmsis.h similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/cmsis.h rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/cmsis.h diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/cmsis_nvic.c b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/cmsis_nvic.c similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/cmsis_nvic.c rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/cmsis_nvic.c diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/cmsis_nvic.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/cmsis_nvic.h similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/cmsis_nvic.h rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/cmsis_nvic.h diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/system_nrf51.c b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c similarity index 59% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/system_nrf51.c rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c index 46119472d2..3414e5b38d 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/system_nrf51.c +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, Nordic Semiconductor ASA +/* Copyright (c) 2015, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,16 +34,16 @@ #include #include #include "nrf.h" -#include "nrf_delay.h" #include "system_nrf51.h" /*lint ++flb "Enter library region" */ + #define __SYSTEM_CLOCK (16000000UL) /*!< nRF51 devices use a fixed System Clock Frequency of 16MHz */ static bool is_manual_peripheral_setup_needed(void); static bool is_disabled_in_debug_needed(void); -static void init_clock(void); +static bool is_peripheral_domain_setup_needed(void); #if defined ( __CC_ARM ) @@ -61,27 +61,6 @@ void SystemCoreClockUpdate(void) void SystemInit(void) { -#if defined(TARGET_NRF_32MHZ_XTAL) - /* For 32MHz HFCLK XTAL such as Taiyo Yuden - Physically, tiny footprint XTAL oscillate higher freq. To make BLE modules smaller, some modules - are using 32MHz XTAL. - This code wriging the value 0xFFFFFF00 to the UICR (User Information Configuration Register) - at address 0x10001008, to make nRF51 works with 32MHz system clock. This register will be overwritten - by SoftDevice to 0xFFFFFFFF, the default value. Each hex files built with mbed classic online compiler - contain SoftDevice, so that, this code run once just after the hex file will be flashed onto nRF51. - After changing the value, nRF51 need to reboot. */ - if (*(uint32_t *)0x10001008 == 0xFFFFFFFF) - { - NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos; - while (NRF_NVMC->READY == NVMC_READY_READY_Busy){} - *(uint32_t *)0x10001008 = 0xFFFFFF00; - NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos; - while (NRF_NVMC->READY == NVMC_READY_READY_Busy){} - NVIC_SystemReset(); - while (true){} - } -#endif - /* If desired, switch off the unused RAM to lower consumption by the use of RAMON register. It can also be done in the application main() function. */ @@ -97,59 +76,27 @@ void SystemInit(void) } /* Disable PROTENSET registers under debug, as indicated by PAN 59 "MPU: Reset value of DISABLEINDEBUG - register is incorrect" found at Product Anomaly document four your device found at + register is incorrect" found at Product Anomaly document for your device found at https://www.nordicsemi.com/. There is no side effect of using these instruction if not needed. */ if (is_disabled_in_debug_needed()) { NRF_MPU->DISABLEINDEBUG = MPU_DISABLEINDEBUG_DISABLEINDEBUG_Disabled << MPU_DISABLEINDEBUG_DISABLEINDEBUG_Pos; } - // Start the external 32khz crystal oscillator. - init_clock(); -} - -void init_clock(void) -{ - /* For compatibility purpose, the default behaviour is to first attempt to initialise an - external clock, and after a timeout, use the internal RC one. To avoid this wait, boards that - don't have an external oscillator can set TARGET_NRF_LFCLK_RC directly. */ - uint32_t i = 0; - const uint32_t polling_period = 200; - const uint32_t timeout = 1000000; - -#if defined(TARGET_NRF_LFCLK_RC) - NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_RC << CLOCK_LFCLKSRC_SRC_Pos); -#else - NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos); -#endif - NRF_CLOCK->EVENTS_LFCLKSTARTED = 0; - NRF_CLOCK->TASKS_LFCLKSTART = 1; - - /* Wait for the external oscillator to start up. - nRF51822 product specification (8.1.5) gives a typical value of 300ms for external clock - startup duration, and a maximum value of 1s. When using the internal RC source, typical delay - will be 390µs, so we use a polling period of 200µs. - - We can't use us_ticker at this point, so we have to rely on a less precise method for - measuring our timeout. Because of this, the actual timeout will be slightly longer than 1 - second, which isn't an issue at all, since this fallback should only be used as a safety net. - */ - for (i = 0; i < (timeout / polling_period); i++) { - if (NRF_CLOCK->EVENTS_LFCLKSTARTED != 0) - return; - nrf_delay_us(polling_period); - } - - /* Fallback to internal clock. Belt and braces, since the internal clock is used by default - whilst no external source is running. This is not only a sanity check, but it also allows - code down the road (e.g. ble initialisation) to directly know which clock is used. */ - NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_RC << CLOCK_LFCLKSRC_SRC_Pos); - NRF_CLOCK->TASKS_LFCLKSTART = 1; - while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0) { - // Do nothing. + /* Execute the following code to eliminate excessive current in sleep mode with RAM retention in nRF51802 devices, + as indicated by PAN 76 "System: Excessive current in sleep mode with retention" found at Product Anomaly document + for your device found at https://www.nordicsemi.com/. */ + if (is_peripheral_domain_setup_needed()){ + if (*(uint32_t volatile *)0x4006EC00 != 1){ + *(uint32_t volatile *)0x4006EC00 = 0x9375; + while (*(uint32_t volatile *)0x4006EC00 != 1){ + } + } + *(uint32_t volatile *)0x4006EC14 = 0xC0; } } + static bool is_manual_peripheral_setup_needed(void) { if ((((*(uint32_t *)0xF0000FE0) & 0x000000FF) == 0x1) && (((*(uint32_t *)0xF0000FE4) & 0x0000000F) == 0x0)) @@ -184,4 +131,21 @@ static bool is_disabled_in_debug_needed(void) return false; } +static bool is_peripheral_domain_setup_needed(void) +{ + if ((((*(uint32_t *)0xF0000FE0) & 0x000000FF) == 0x1) && (((*(uint32_t *)0xF0000FE4) & 0x0000000F) == 0x0)) + { + if ((((*(uint32_t *)0xF0000FE8) & 0x000000F0) == 0xA0) && (((*(uint32_t *)0xF0000FEC) & 0x000000F0) == 0x0)) + { + return true; + } + if ((((*(uint32_t *)0xF0000FE8) & 0x000000F0) == 0xD0) && (((*(uint32_t *)0xF0000FEC) & 0x000000F0) == 0x0)) + { + return true; + } + } + + return false; +} + /*lint --flb "Leave library region" */ diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/system_nrf51.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.h similarity index 95% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/system_nrf51.h rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.h index ae613609dd..1307b7159a 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/system_nrf51.h +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, Nordic Semiconductor ASA +/* Copyright (c) 2015, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,6 +27,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ + #ifndef SYSTEM_NRF51_H #define SYSTEM_NRF51_H @@ -56,7 +57,7 @@ extern void SystemInit (void); * @param none * @return none * - * @brief Updates the SystemCoreClock with current core Clock + * @brief Updates the SystemCoreClock with current core Clock * retrieved from cpu registers. */ extern void SystemCoreClockUpdate (void); diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/NRF52832.ld b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/NRF52832.ld similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/NRF52832.ld rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/NRF52832.ld diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/startup_NRF52832.S b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/startup_NRF52832.S similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/startup_NRF52832.S rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/startup_NRF52832.S diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/cmsis.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/cmsis.h similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/cmsis.h rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/cmsis.h diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/cmsis_nvic.c b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/cmsis_nvic.c similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/cmsis_nvic.c rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/cmsis_nvic.c diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/cmsis_nvic.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/cmsis_nvic.h similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/cmsis_nvic.h rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/cmsis_nvic.h diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/system_nrf52.c b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.c similarity index 84% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/system_nrf52.c rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.c index d5f076f1e4..72e067cad7 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/system_nrf52.c +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.c @@ -1,32 +1,30 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* 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: + * 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. + * * 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. + * * 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. + * * 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. + * 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. * */ @@ -189,20 +187,6 @@ void SystemInit(void) #endif SystemCoreClockUpdate(); - - // Start the external 32khz crystal oscillator. -#if defined(TARGET_NRF_LFCLK_RC) - NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_RC << CLOCK_LFCLKSRC_SRC_Pos); -#else - NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos); -#endif - 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. - } } diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/nrf.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.h similarity index 67% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/nrf.h rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.h index e77307f3f6..48b3bbc80c 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/nrf.h +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, Nordic Semiconductor ASA +/* Copyright (c) 2015, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,22 +27,43 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -#ifndef NRF_H -#define NRF_H -#ifndef _WIN32 +#ifndef SYSTEM_NRF52_H +#define SYSTEM_NRF52_H -/* Family selection for main includes. NRF51 must be selected. */ -#ifdef NRF51 - #include "nrf51.h" - #include "nrf51_bitfields.h" -#else - #error "Device family must be defined. See nrf.h." -#endif /* NRF51 */ +#ifdef __cplusplus +extern "C" { +#endif -#include "compiler_abstraction.h" +#include -#endif /* _WIN32 */ -#endif /* NRF_H */ +extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ +/** + * Initialize the system + * + * @param none + * @return none + * + * @brief Setup the microcontroller system. + * Initialize the System and update the SystemCoreClock variable. + */ +extern void SystemInit (void); + +/** + * Update SystemCoreClock variable + * + * @param none + * @return none + * + * @brief Updates the SystemCoreClock with current core Clock + * retrieved from cpu registers. + */ +extern void SystemCoreClockUpdate (void); + +#ifdef __cplusplus +} +#endif + +#endif /* SYSTEM_NRF52_H */ diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/compiler_abstraction.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/compiler_abstraction.h similarity index 61% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/compiler_abstraction.h rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/compiler_abstraction.h index 34ebeabb51..a2bb0a0e1a 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/compiler_abstraction.h +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/compiler_abstraction.h @@ -1,32 +1,30 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* 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: + * 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. + * * 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. + * * 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. + * * 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. + * 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 _COMPILER_ABSTRACTION_H diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf.h new file mode 100644 index 0000000000..80fa51fd7a --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf.h @@ -0,0 +1,66 @@ +/* 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. + * + */ + +#ifndef NRF_H +#define NRF_H + +/* MDK version */ +#define MDK_MAJOR_VERSION 8 +#define MDK_MINOR_VERSION 5 +#define MDK_MICRO_VERSION 0 + +#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 */ +#elif defined(__APPLE__) + /* Do not include nrf51 specific files when building for PC host */ +#else + + /* Family selection for family includes. */ + #if defined (NRF51) + #include "nrf51.h" + #include "nrf51_bitfields.h" + #include "nrf51_deprecated.h" + #elif defined (NRF52) + #include "nrf52.h" + #include "nrf52_bitfields.h" + #include "nrf51_to_nrf52.h" + #include "nrf52_name_change.h" + #else + #error "Device family must be defined. See nrf.h." + #endif /* NRF51, NRF52 */ + + #include "compiler_abstraction.h" + +#endif /* _WIN32 || __unix || __APPLE__ */ + +#endif /* NRF_H */ + diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/nrf51.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51.h similarity index 94% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/nrf51.h rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51.h index 266d8f0ed1..0fae756197 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/nrf51.h +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51.h @@ -1,33 +1,33 @@ /****************************************************************************************************//** - * @file nRF51.h + * @file nrf51.h * * @brief CMSIS Cortex-M0 Peripheral Access Layer Header File for - * nRF51 from Nordic Semiconductor. + * nrf51 from Nordic Semiconductor. * * @version V522 - * @date 31. October 2014 + * @date 23. February 2016 * - * @note Generated with SVDConv V2.81d - * from CMSIS SVD File 'nRF51.xml' Version 522, + * @note Generated with SVDConv V2.81d + * from CMSIS SVD File 'nrf51.svd' Version 522, * * @par Copyright (c) 2013, 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 @@ -38,7 +38,7 @@ * 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. - * + * * *******************************************************************************************************/ @@ -48,7 +48,7 @@ * @{ */ -/** @addtogroup nRF51 +/** @addtogroup nrf51 * @{ */ @@ -71,7 +71,7 @@ typedef enum { DebugMonitor_IRQn = -4, /*!< 12 Debug Monitor */ PendSV_IRQn = -2, /*!< 14 Pendable request for system service */ SysTick_IRQn = -1, /*!< 15 System Tick Timer */ -/* ---------------------- nRF51 Specific Interrupt Numbers ---------------------- */ +/* ---------------------- nrf51 Specific Interrupt Numbers ---------------------- */ POWER_CLOCK_IRQn = 0, /*!< 0 POWER_CLOCK */ RADIO_IRQn = 1, /*!< 1 RADIO */ UART0_IRQn = 2, /*!< 2 UART0 */ @@ -117,7 +117,8 @@ typedef enum { /** @} */ /* End of group Configuration_of_CMSIS */ #include "core_cm0.h" /*!< Cortex-M0 processor and core peripherals */ -#include "system_nrf51.h" /*!< nRF51 System */ +#include "system_nrf51.h" /*!< nrf51 System */ + /* ================================================================================ */ /* ================ Device Specific Peripheral Section ================ */ @@ -183,15 +184,6 @@ typedef struct { __IO uint32_t TEP; /*!< Channel task end-point. */ } PPI_CH_Type; -typedef struct { - __I uint32_t PART; /*!< Part code */ - __I uint32_t VARIANT; /*!< Part variant */ - __I uint32_t PACKAGE; /*!< Package option */ - __I uint32_t RAM; /*!< RAM variant */ - __I uint32_t FLASH; /*!< Flash variant */ - __I uint32_t RESERVED[3]; /*!< Reserved */ -} FICR_INFO_Type; - /* ================================================================================ */ /* ================ POWER ================ */ @@ -300,27 +292,6 @@ typedef struct { /*!< MPU Structure } 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 ================ */ /* ================================================================================ */ @@ -366,7 +337,7 @@ typedef struct { /*!< RADIO Structure __IO uint32_t EVENTS_RSSIEND; /*!< Sampling of the receive signal strength complete. A new RSSI sample is ready for readout at the RSSISAMPLE register. */ __I uint32_t RESERVED1[2]; - __IO uint32_t EVENTS_BCMATCH; /*!< Bit counter reached bit count value specified in BC register. */ + __IO uint32_t EVENTS_BCMATCH; /*!< Bit counter reached bit count value specified in BCC register. */ __I uint32_t RESERVED2[53]; __IO uint32_t SHORTS; /*!< Shortcuts for the radio. */ __I uint32_t RESERVED3[64]; @@ -374,11 +345,11 @@ typedef struct { /*!< RADIO Structure __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */ __I uint32_t RESERVED4[61]; __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 RXCRC; /*!< Received CRC. */ __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 FREQUENCY; /*!< Frequency. */ __IO uint32_t TXPOWER; /*!< Output power. */ @@ -397,22 +368,22 @@ typedef struct { /*!< RADIO Structure __IO uint32_t TEST; /*!< Test features enable register. */ __IO uint32_t TIFS; /*!< Inter Frame Spacing in microseconds. */ __I uint32_t RSSISAMPLE; /*!< RSSI sample. */ - __I uint32_t RESERVED6; + __I uint32_t RESERVED7; __I uint32_t STATE; /*!< Current radio state. */ __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. */ - __I uint32_t RESERVED8[39]; + __I uint32_t RESERVED9[39]; __IO uint32_t DAB[8]; /*!< Device address base segment. */ __IO uint32_t DAP[8]; /*!< Device address prefix. */ __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 OVERRIDE1; /*!< Trim value override register 1. */ __IO uint32_t OVERRIDE2; /*!< Trim value override register 2. */ __IO uint32_t OVERRIDE3; /*!< Trim value override register 3. */ __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. */ } NRF_RADIO_Type; @@ -571,39 +542,41 @@ typedef struct { /*!< SPIS Structure __O uint32_t TASKS_RELEASE; /*!< Release SPI semaphore. */ __I uint32_t RESERVED1[54]; __IO uint32_t EVENTS_END; /*!< Granted transaction completed. */ - __I uint32_t RESERVED2[8]; + __I uint32_t RESERVED2[2]; + __IO uint32_t EVENTS_ENDRX; /*!< End of RXD buffer reached */ + __I uint32_t RESERVED3[5]; __IO uint32_t EVENTS_ACQUIRED; /*!< Semaphore acquired. */ - __I uint32_t RESERVED3[53]; + __I uint32_t RESERVED4[53]; __IO uint32_t SHORTS; /*!< Shortcuts for SPIS. */ - __I uint32_t RESERVED4[64]; + __I uint32_t RESERVED5[64]; __IO uint32_t INTENSET; /*!< Interrupt enable set register. */ __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */ - __I uint32_t RESERVED5[61]; + __I uint32_t RESERVED6[61]; __I uint32_t SEMSTAT; /*!< Semaphore status. */ - __I uint32_t RESERVED6[15]; + __I uint32_t RESERVED7[15]; __IO uint32_t STATUS; /*!< Status from last transaction. */ - __I uint32_t RESERVED7[47]; + __I uint32_t RESERVED8[47]; __IO uint32_t ENABLE; /*!< Enable SPIS. */ - __I uint32_t RESERVED8; + __I uint32_t RESERVED9; __IO uint32_t PSELSCK; /*!< Pin select for SCK. */ __IO uint32_t PSELMISO; /*!< Pin select for MISO. */ __IO uint32_t PSELMOSI; /*!< Pin select for MOSI. */ __IO uint32_t PSELCSN; /*!< Pin select for CSN. */ - __I uint32_t RESERVED9[7]; + __I uint32_t RESERVED10[7]; __IO uint32_t RXDPTR; /*!< RX data pointer. */ __IO uint32_t MAXRX; /*!< Maximum number of bytes in the receive buffer. */ __I uint32_t AMOUNTRX; /*!< Number of bytes received in last granted transaction. */ - __I uint32_t RESERVED10; + __I uint32_t RESERVED11; __IO uint32_t TXDPTR; /*!< TX data pointer. */ __IO uint32_t MAXTX; /*!< Maximum number of bytes in the transmit buffer. */ __I uint32_t AMOUNTTX; /*!< Number of bytes transmitted in last granted transaction. */ - __I uint32_t RESERVED11; - __IO uint32_t CONFIG; /*!< Configuration register. */ __I uint32_t RESERVED12; + __IO uint32_t CONFIG; /*!< Configuration register. */ + __I uint32_t RESERVED13; __IO uint32_t DEF; /*!< Default character. */ - __I uint32_t RESERVED13[24]; + __I uint32_t RESERVED14[24]; __IO uint32_t ORC; /*!< Over-read character. */ - __I uint32_t RESERVED14[654]; + __I uint32_t RESERVED15[654]; __IO uint32_t POWER; /*!< Peripheral power control. */ } NRF_SPIS_Type; @@ -628,35 +601,28 @@ typedef struct { /*!< SPIM Structure __IO uint32_t EVENTS_STOPPED; /*!< SPI transaction has stopped. */ __I uint32_t RESERVED3[2]; __IO uint32_t EVENTS_ENDRX; /*!< End of RXD buffer reached. */ - __I uint32_t RESERVED4; - __IO uint32_t EVENTS_END; /*!< End of RXD buffer and TXD buffer reached. */ - __I uint32_t RESERVED5; + __I uint32_t RESERVED4[3]; __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. */ - __I uint32_t RESERVED7[44]; - __IO uint32_t SHORTS; /*!< Shortcuts for SPIM. */ - __I uint32_t RESERVED8[64]; + __I uint32_t RESERVED6[109]; __IO uint32_t INTENSET; /*!< Interrupt enable set 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. */ - __I uint32_t RESERVED10; + __I uint32_t RESERVED8; SPIM_PSEL_Type PSEL; /*!< Pin select configuration. */ - __I uint32_t RESERVED11; - __I uint32_t RXDDATA; /*!< RXD register. */ - __IO uint32_t TXDDATA; /*!< TXD register. */ - __I uint32_t RESERVED12; + __I uint32_t RESERVED9[4]; __IO uint32_t FREQUENCY; /*!< SPI frequency. */ - __I uint32_t RESERVED13[3]; + __I uint32_t RESERVED10[3]; SPIM_RXD_Type RXD; /*!< RXD EasyDMA configuration and status. */ - __I uint32_t RESERVED14; + __I uint32_t RESERVED11; SPIM_TXD_Type TXD; /*!< TXD EasyDMA configuration and status. */ - __I uint32_t RESERVED15; + __I uint32_t RESERVED12; __IO uint32_t CONFIG; /*!< Configuration register. */ - __I uint32_t RESERVED16[26]; + __I uint32_t RESERVED13[26]; __IO uint32_t ORC; /*!< Over-read character. */ - __I uint32_t RESERVED17[654]; + __I uint32_t RESERVED14[654]; __IO uint32_t POWER; /*!< Peripheral power control. */ } NRF_SPIM_Type; @@ -899,8 +865,8 @@ typedef struct { /*!< AAR Structure __IO uint32_t IRKPTR; /*!< Pointer to the IRK data structure. */ __I uint32_t RESERVED5; __IO uint32_t ADDRPTR; /*!< Pointer to the resolvable address (6 bytes). */ - __IO uint32_t SCRATCHPTR; /*!< Pointer to a "scratch" data area used for temporary storage - during resolution. A minimum of 3 bytes must be reserved. */ + __IO uint32_t SCRATCHPTR; /*!< Pointer to a scratch data area used for temporary storage during + resolution. A minimum of 3 bytes must be reserved. */ __I uint32_t RESERVED6[697]; __IO uint32_t POWER; /*!< Peripheral power control. */ } NRF_AAR_Type; @@ -938,8 +904,8 @@ typedef struct { /*!< CCM Structure __IO uint32_t CNFPTR; /*!< Pointer to a data structure holding AES key and NONCE vector. */ __IO uint32_t INPTR; /*!< Pointer to the input packet. */ __IO uint32_t OUTPTR; /*!< Pointer to the output packet. */ - __IO uint32_t SCRATCHPTR; /*!< Pointer to a "scratch" data area used for temporary storage - during resolution. A minimum of 43 bytes must be reserved. */ + __IO uint32_t SCRATCHPTR; /*!< Pointer to a scratch data area used for temporary storage during + resolution. A minimum of 43 bytes must be reserved. */ __I uint32_t RESERVED5[697]; __IO uint32_t POWER; /*!< Peripheral power control. */ } NRF_CCM_Type; @@ -1087,9 +1053,13 @@ typedef struct { /*!< NVMC Structure __I uint32_t READY; /*!< Ready flag. */ __I uint32_t RESERVED1[64]; __IO uint32_t CONFIG; /*!< Configuration register. */ - __IO uint32_t ERASEPAGE; /*!< Register for erasing a non-protected non-volatile memory page. */ + + union { + __IO uint32_t ERASEPCR1; /*!< Register for erasing a non-protected non-volatile memory page. */ + __IO uint32_t ERASEPAGE; /*!< Register for erasing a non-protected non-volatile memory page. */ + }; __IO uint32_t ERASEALL; /*!< Register for erasing all non-volatile user memory. */ - __IO uint32_t ERASEPROTECTEDPAGE; /*!< Register for erasing a protected non-volatile memory page. */ + __IO uint32_t ERASEPCR0; /*!< Register for erasing a protected non-volatile memory page. */ __IO uint32_t ERASEUICR; /*!< Register for start erasing User Information Congfiguration Registers. */ } NRF_NVMC_Type; @@ -1134,7 +1104,7 @@ typedef struct { /*!< FICR Structure __I uint32_t PPFC; /*!< Pre-programmed factory code present. */ __I uint32_t RESERVED2; __I uint32_t NUMRAMBLOCK; /*!< Number of individualy controllable RAM blocks. */ - + union { __I uint32_t SIZERAMBLOCK[4]; /*!< Deprecated array of size of RAM block in bytes. This name is kept for backward compatinility purposes. Use SIZERAMBLOCKS @@ -1155,7 +1125,6 @@ typedef struct { /*!< FICR Structure __I uint32_t RESERVED5[10]; __I uint32_t BLE_1MBIT[5]; /*!< Override values for the OVERRIDEn registers in RADIO for BLE_1Mbit mode. */ - FICR_INFO_Type INFO; /*!< Device info */ } NRF_FICR_Type; @@ -1174,7 +1143,13 @@ typedef struct { /*!< UICR Structure __IO uint32_t XTALFREQ; /*!< Reset value for CLOCK XTALFREQ register. */ __I uint32_t RESERVED0; __I uint32_t FWID; /*!< Firmware ID. */ - __IO uint32_t BOOTLOADERADDR; /*!< Bootloader start address. */ + + union { + __IO uint32_t NRFFW[15]; /*!< Reserved for Nordic firmware design. */ + __IO uint32_t BOOTLOADERADDR; /*!< Bootloader start address. */ + }; + __IO uint32_t NRFHW[12]; /*!< Reserved for Nordic hardware design. */ + __IO uint32_t CUSTOMER[32]; /*!< Reserved for customer. */ } NRF_UICR_Type; @@ -1226,7 +1201,6 @@ typedef struct { /*!< GPIO Structure #define NRF_POWER_BASE 0x40000000UL #define NRF_CLOCK_BASE 0x40000000UL #define NRF_MPU_BASE 0x40000000UL -#define NRF_PU_BASE 0x40000000UL #define NRF_AMLI_BASE 0x40000000UL #define NRF_RADIO_BASE 0x40001000UL #define NRF_UART0_BASE 0x40002000UL @@ -1266,7 +1240,6 @@ typedef struct { /*!< GPIO Structure #define NRF_POWER ((NRF_POWER_Type *) NRF_POWER_BASE) #define NRF_CLOCK ((NRF_CLOCK_Type *) NRF_CLOCK_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_RADIO ((NRF_RADIO_Type *) NRF_RADIO_BASE) #define NRF_UART0 ((NRF_UART_Type *) NRF_UART0_BASE) @@ -1300,7 +1273,7 @@ typedef struct { /*!< GPIO Structure /** @} */ /* End of group Device_Peripheral_Registers */ -/** @} */ /* End of group nRF51 */ +/** @} */ /* End of group nrf51 */ /** @} */ /* End of group Nordic Semiconductor */ #ifdef __cplusplus @@ -1308,5 +1281,5 @@ typedef struct { /*!< GPIO Structure #endif -#endif /* nRF51_H */ +#endif /* nrf51_H */ diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/nrf51_bitfields.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_bitfields.h similarity index 96% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/nrf51_bitfields.h rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_bitfields.h index 52aa653943..a6684470d1 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/nrf51_bitfields.h +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_bitfields.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, Nordic Semiconductor ASA +/* Copyright (c) 2015, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -30,9 +30,7 @@ #ifndef __NRF51_BITS_H #define __NRF51_BITS_H -/*lint ++flb "Enter library region */ - -#include +/*lint ++flb "Enter library region" */ /* Peripheral: AAR */ /* Description: Accelerated Address Resolver. */ @@ -820,6 +818,7 @@ #define AMLI_RAMPRI_AAR_RAM0_Pri12 (0xCUL) /*!< Priority 12. */ #define AMLI_RAMPRI_AAR_RAM0_Pri14 (0xEUL) /*!< Priority 14. */ + /* Peripheral: CCM */ /* Description: AES CCM Mode Encryption. */ @@ -1064,8 +1063,8 @@ /* Bits 7..0 : External Xtal frequency selection. */ #define CLOCK_XTALFREQ_XTALFREQ_Pos (0UL) /*!< Position of XTALFREQ field. */ #define CLOCK_XTALFREQ_XTALFREQ_Msk (0xFFUL << CLOCK_XTALFREQ_XTALFREQ_Pos) /*!< Bit mask of XTALFREQ field. */ -#define CLOCK_XTALFREQ_XTALFREQ_16MHz (0xFFUL) /*!< 16MHz xtal is used as source for the HFCLK oscillator. */ #define CLOCK_XTALFREQ_XTALFREQ_32MHz (0x00UL) /*!< 32MHz xtal is used as source for the HFCLK oscillator. */ +#define CLOCK_XTALFREQ_XTALFREQ_16MHz (0xFFUL) /*!< 16MHz xtal is used as source for the HFCLK oscillator. */ /* Peripheral: ECB */ @@ -1124,8 +1123,8 @@ /* Bits 7..0 : Pre-programmed factory code present. */ #define FICR_PPFC_PPFC_Pos (0UL) /*!< Position of PPFC field. */ #define FICR_PPFC_PPFC_Msk (0xFFUL << FICR_PPFC_PPFC_Pos) /*!< Bit mask of PPFC field. */ -#define FICR_PPFC_PPFC_NotPresent (0xFFUL) /*!< Not present. */ #define FICR_PPFC_PPFC_Present (0x00UL) /*!< Present. */ +#define FICR_PPFC_PPFC_NotPresent (0xFFUL) /*!< Not present. */ /* Register: FICR_CONFIGID */ /* Description: Configuration identifier. */ @@ -1162,60 +1161,6 @@ #define FICR_OVERRIDEEN_NRF_1MBIT_Override (0UL) /*!< Override the default values for NRF_1Mbit mode. */ #define FICR_OVERRIDEEN_NRF_1MBIT_NotOverride (1UL) /*!< Do not override the default values for NRF_1Mbit mode. */ -/* Register: FICR_INFO_PART */ -/* Description: Part code */ - -/* Bits 31..0 : Part code */ -#define FICR_INFO_PART_PART_Pos (0UL) /*!< Position of PART field. */ -#define FICR_INFO_PART_PART_Msk (0xFFFFFFFFUL << FICR_INFO_PART_PART_Pos) /*!< Bit mask of PART field. */ -#define FICR_INFO_PART_PART_N51822 (0x51822UL) /*!< nRF51822 */ -#define FICR_INFO_PART_PART_N51422 (0x51422UL) /*!< nRF51422 */ -#define FICR_INFO_PART_PART_Unspecified (0xFFFFFFFFUL) /*!< Unspecified */ - -/* Register: FICR_INFO_VARIANT */ -/* Description: Part variant */ - -/* Bits 31..0 : Part variant */ -#define FICR_INFO_VARIANT_VARIANT_Pos (0UL) /*!< Position of VARIANT field. */ -#define FICR_INFO_VARIANT_VARIANT_Msk (0xFFFFFFFFUL << FICR_INFO_VARIANT_VARIANT_Pos) /*!< Bit mask of VARIANT field. */ -#define FICR_INFO_VARIANT_VARIANT_nRF51C (0x1002UL) /*!< nRF51-C (XLR3) */ -#define FICR_INFO_VARIANT_VARIANT_nRF51D (0x1003UL) /*!< nRF51-D (L3) */ -#define FICR_INFO_VARIANT_VARIANT_nRF51E (0x1004UL) /*!< nRF51-E (XLR3P) */ -#define FICR_INFO_VARIANT_VARIANT_Unspecified (0xFFFFFFFFUL) /*!< Unspecified */ - -/* Register: FICR_INFO_PACKAGE */ -/* Description: Package option */ - -/* Bits 31..0 : Package option */ -#define FICR_INFO_PACKAGE_PACKAGE_Pos (0UL) /*!< Position of PACKAGE field. */ -#define FICR_INFO_PACKAGE_PACKAGE_Msk (0xFFFFFFFFUL << FICR_INFO_PACKAGE_PACKAGE_Pos) /*!< Bit mask of PACKAGE field. */ -#define FICR_INFO_PACKAGE_PACKAGE_QFN48 (0x0000UL) /*!< 48-pin QFN with 31 GPIO */ -#define FICR_INFO_PACKAGE_PACKAGE_nRF51CSP56A (0x1000UL) /*!< nRF51x22 CDxx - WLCSP 56 balls */ -#define FICR_INFO_PACKAGE_PACKAGE_nRF51CSP62A (0x1001UL) /*!< nRF51x22 CExx - WLCSP 62 balls */ -#define FICR_INFO_PACKAGE_PACKAGE_nRF51CSP62B (0x1002UL) /*!< nRF51x22 CFxx - WLCSP 62 balls */ -#define FICR_INFO_PACKAGE_PACKAGE_nRF51CSP62C (0x1003UL) /*!< nRF51x22 CTxx - WLCSP 62 balls */ -#define FICR_INFO_PACKAGE_PACKAGE_Unspecified (0xFFFFFFFFUL) /*!< Unspecified */ - -/* Register: FICR_INFO_RAM */ -/* Description: RAM variant */ - -/* Bits 31..0 : RAM variant */ -#define FICR_INFO_RAM_RAM_Pos (0UL) /*!< Position of RAM field. */ -#define FICR_INFO_RAM_RAM_Msk (0xFFFFFFFFUL << FICR_INFO_RAM_RAM_Pos) /*!< Bit mask of RAM field. */ -#define FICR_INFO_RAM_RAM_Unspecified (0xFFFFFFFFUL) /*!< Unspecified */ -#define FICR_INFO_RAM_RAM_K16 (16UL) /*!< 16 kByte RAM. */ -#define FICR_INFO_RAM_RAM_K32 (32UL) /*!< 32 kByte RAM. */ - -/* Register: FICR_INFO_FLASH */ -/* Description: Flash variant */ - -/* Bits 31..0 : Flash variant */ -#define FICR_INFO_FLASH_FLASH_Pos (0UL) /*!< Position of FLASH field. */ -#define FICR_INFO_FLASH_FLASH_Msk (0xFFFFFFFFUL << FICR_INFO_FLASH_FLASH_Pos) /*!< Bit mask of FLASH field. */ -#define FICR_INFO_FLASH_FLASH_Unspecified (0xFFFFFFFFUL) /*!< Unspecified */ -#define FICR_INFO_FLASH_FLASH_K128 (128UL) /*!< 128 kByte FLASH. */ -#define FICR_INFO_FLASH_FLASH_K256 (256UL) /*!< 256 kByte FLASH. */ - /* Peripheral: GPIO */ /* Description: General purpose input and output. */ @@ -2846,6 +2791,7 @@ /* Bits 17..16 : Effects on output when in Task mode, or events on input that generates an event. */ #define GPIOTE_CONFIG_POLARITY_Pos (16UL) /*!< Position of POLARITY field. */ #define GPIOTE_CONFIG_POLARITY_Msk (0x3UL << GPIOTE_CONFIG_POLARITY_Pos) /*!< Bit mask of POLARITY field. */ +#define GPIOTE_CONFIG_POLARITY_None (0x00UL) /*!< No task or event. */ #define GPIOTE_CONFIG_POLARITY_LoToHi (0x01UL) /*!< Low to high. */ #define GPIOTE_CONFIG_POLARITY_HiToLo (0x02UL) /*!< High to low. */ #define GPIOTE_CONFIG_POLARITY_Toggle (0x03UL) /*!< Toggle. */ @@ -3720,30 +3666,44 @@ /* Bit 18 : Reset from wake-up from OFF mode detected by entering into debug interface mode. */ #define POWER_RESETREAS_DIF_Pos (18UL) /*!< Position of DIF field. */ #define POWER_RESETREAS_DIF_Msk (0x1UL << POWER_RESETREAS_DIF_Pos) /*!< Bit mask of DIF field. */ +#define POWER_RESETREAS_DIF_NotDetected (0UL) /*!< Reset not detected. */ +#define POWER_RESETREAS_DIF_Detected (1UL) /*!< Reset detected. */ /* Bit 17 : Reset from wake-up from OFF mode detected by the use of ANADETECT signal from LPCOMP. */ #define POWER_RESETREAS_LPCOMP_Pos (17UL) /*!< Position of LPCOMP field. */ #define POWER_RESETREAS_LPCOMP_Msk (0x1UL << POWER_RESETREAS_LPCOMP_Pos) /*!< Bit mask of LPCOMP field. */ +#define POWER_RESETREAS_LPCOMP_NotDetected (0UL) /*!< Reset not detected. */ +#define POWER_RESETREAS_LPCOMP_Detected (1UL) /*!< Reset detected. */ /* Bit 16 : Reset from wake-up from OFF mode detected by the use of DETECT signal from GPIO. */ #define POWER_RESETREAS_OFF_Pos (16UL) /*!< Position of OFF field. */ #define POWER_RESETREAS_OFF_Msk (0x1UL << POWER_RESETREAS_OFF_Pos) /*!< Bit mask of OFF field. */ +#define POWER_RESETREAS_OFF_NotDetected (0UL) /*!< Reset not detected. */ +#define POWER_RESETREAS_OFF_Detected (1UL) /*!< Reset detected. */ /* Bit 3 : Reset from CPU lock-up detected. */ #define POWER_RESETREAS_LOCKUP_Pos (3UL) /*!< Position of LOCKUP field. */ #define POWER_RESETREAS_LOCKUP_Msk (0x1UL << POWER_RESETREAS_LOCKUP_Pos) /*!< Bit mask of LOCKUP field. */ +#define POWER_RESETREAS_LOCKUP_NotDetected (0UL) /*!< Reset not detected. */ +#define POWER_RESETREAS_LOCKUP_Detected (1UL) /*!< Reset detected. */ /* Bit 2 : Reset from AIRCR.SYSRESETREQ detected. */ #define POWER_RESETREAS_SREQ_Pos (2UL) /*!< Position of SREQ field. */ #define POWER_RESETREAS_SREQ_Msk (0x1UL << POWER_RESETREAS_SREQ_Pos) /*!< Bit mask of SREQ field. */ +#define POWER_RESETREAS_SREQ_NotDetected (0UL) /*!< Reset not detected. */ +#define POWER_RESETREAS_SREQ_Detected (1UL) /*!< Reset detected. */ /* Bit 1 : Reset from watchdog detected. */ #define POWER_RESETREAS_DOG_Pos (1UL) /*!< Position of DOG field. */ #define POWER_RESETREAS_DOG_Msk (0x1UL << POWER_RESETREAS_DOG_Pos) /*!< Bit mask of DOG field. */ +#define POWER_RESETREAS_DOG_NotDetected (0UL) /*!< Reset not detected. */ +#define POWER_RESETREAS_DOG_Detected (1UL) /*!< Reset detected. */ /* Bit 0 : Reset from pin-reset detected. */ #define POWER_RESETREAS_RESETPIN_Pos (0UL) /*!< Position of RESETPIN field. */ #define POWER_RESETREAS_RESETPIN_Msk (0x1UL << POWER_RESETREAS_RESETPIN_Pos) /*!< Bit mask of RESETPIN field. */ +#define POWER_RESETREAS_RESETPIN_NotDetected (0UL) /*!< Reset not detected. */ +#define POWER_RESETREAS_RESETPIN_Detected (1UL) /*!< Reset detected. */ /* Register: POWER_RAMSTATUS */ /* Description: Ram status register. */ @@ -4636,186 +4596,6 @@ #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 */ /* Description: Rotary decoder. */ @@ -5172,13 +4952,6 @@ #define RADIO_CRCSTATUS_CRCSTATUS_CRCError (0UL) /*!< Packet received with CRC error. */ #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 */ /* Description: Received address. */ @@ -5213,14 +4986,14 @@ /* Bits 7..0 : Radio output power. Decision point: TXEN task. */ #define RADIO_TXPOWER_TXPOWER_Pos (0UL) /*!< Position of TXPOWER field. */ #define RADIO_TXPOWER_TXPOWER_Msk (0xFFUL << RADIO_TXPOWER_TXPOWER_Pos) /*!< Bit mask of TXPOWER field. */ -#define RADIO_TXPOWER_TXPOWER_Pos4dBm (0x04UL) /*!< +4dBm. */ #define RADIO_TXPOWER_TXPOWER_0dBm (0x00UL) /*!< 0dBm. */ -#define RADIO_TXPOWER_TXPOWER_Neg4dBm (0xFCUL) /*!< -4dBm. */ -#define RADIO_TXPOWER_TXPOWER_Neg8dBm (0xF8UL) /*!< -8dBm. */ -#define RADIO_TXPOWER_TXPOWER_Neg12dBm (0xF4UL) /*!< -12dBm. */ -#define RADIO_TXPOWER_TXPOWER_Neg16dBm (0xF0UL) /*!< -16dBm. */ -#define RADIO_TXPOWER_TXPOWER_Neg20dBm (0xECUL) /*!< -20dBm. */ +#define RADIO_TXPOWER_TXPOWER_Pos4dBm (0x04UL) /*!< +4dBm. */ #define RADIO_TXPOWER_TXPOWER_Neg30dBm (0xD8UL) /*!< -30dBm. */ +#define RADIO_TXPOWER_TXPOWER_Neg20dBm (0xECUL) /*!< -20dBm. */ +#define RADIO_TXPOWER_TXPOWER_Neg16dBm (0xF0UL) /*!< -16dBm. */ +#define RADIO_TXPOWER_TXPOWER_Neg12dBm (0xF4UL) /*!< -12dBm. */ +#define RADIO_TXPOWER_TXPOWER_Neg8dBm (0xF8UL) /*!< -8dBm. */ +#define RADIO_TXPOWER_TXPOWER_Neg4dBm (0xFCUL) /*!< -4dBm. */ /* Register: RADIO_MODE */ /* Description: Data rate and modulation. */ @@ -6000,15 +5773,6 @@ /* Peripheral: SPIM */ /* 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 */ /* Description: Interrupt enable set register. */ @@ -6026,13 +5790,6 @@ #define SPIM_INTENSET_ENDTX_Enabled (1UL) /*!< Interrupt enabled. */ #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. */ #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. */ @@ -6064,13 +5821,6 @@ #define SPIM_INTENCLR_ENDTX_Enabled (1UL) /*!< Interrupt enabled. */ #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. */ #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. */ @@ -6094,20 +5844,6 @@ #define SPIM_ENABLE_ENABLE_Disabled (0x00UL) /*!< Disabled SPIM. */ #define SPIM_ENABLE_ENABLE_Enabled (0x07UL) /*!< Enable SPIM. */ -/* Register: SPIM_RXDDATA */ -/* Description: RXD register. */ - -/* Bits 7..0 : RX data received. Double buffered. */ -#define SPIM_RXDDATA_RXD_Pos (0UL) /*!< Position of RXD field. */ -#define SPIM_RXDDATA_RXD_Msk (0xFFUL << SPIM_RXDDATA_RXD_Pos) /*!< Bit mask of RXD field. */ - -/* Register: SPIM_TXDDATA */ -/* Description: TXD register. */ - -/* Bits 7..0 : TX data to send. Double buffered. */ -#define SPIM_TXDDATA_TXD_Pos (0UL) /*!< Position of TXD field. */ -#define SPIM_TXDDATA_TXD_Msk (0xFFUL << SPIM_TXDDATA_TXD_Pos) /*!< Bit mask of TXD field. */ - /* Register: SPIM_FREQUENCY */ /* Description: SPI frequency. */ @@ -6122,43 +5858,6 @@ #define SPIM_FREQUENCY_FREQUENCY_M4 (0x40000000UL) /*!< 4 Mbps. */ #define SPIM_FREQUENCY_FREQUENCY_M8 (0x80000000UL) /*!< 8 Mbps. */ -/* Register: SPIM_CONFIG */ -/* Description: Configuration register. */ - -/* Bit 2 : Serial clock (SCK) polarity. */ -#define SPIM_CONFIG_CPOL_Pos (2UL) /*!< Position of CPOL field. */ -#define SPIM_CONFIG_CPOL_Msk (0x1UL << SPIM_CONFIG_CPOL_Pos) /*!< Bit mask of CPOL field. */ -#define SPIM_CONFIG_CPOL_ActiveHigh (0UL) /*!< Active high. */ -#define SPIM_CONFIG_CPOL_ActiveLow (1UL) /*!< Active low. */ - -/* Bit 1 : Serial clock (SCK) phase. */ -#define SPIM_CONFIG_CPHA_Pos (1UL) /*!< Position of CPHA field. */ -#define SPIM_CONFIG_CPHA_Msk (0x1UL << SPIM_CONFIG_CPHA_Pos) /*!< Bit mask of CPHA field. */ -#define SPIM_CONFIG_CPHA_Leading (0UL) /*!< Sample on leading edge of the clock. Shift serial data on trailing edge. */ -#define SPIM_CONFIG_CPHA_Trailing (1UL) /*!< Sample on trailing edge of the clock. Shift serial data on leading edge. */ - -/* Bit 0 : Bit order. */ -#define SPIM_CONFIG_ORDER_Pos (0UL) /*!< Position of ORDER field. */ -#define SPIM_CONFIG_ORDER_Msk (0x1UL << SPIM_CONFIG_ORDER_Pos) /*!< Bit mask of ORDER field. */ -#define SPIM_CONFIG_ORDER_MsbFirst (0UL) /*!< Most significant bit transmitted out first. */ -#define SPIM_CONFIG_ORDER_LsbFirst (1UL) /*!< Least significant bit transmitted out first. */ - -/* Register: SPIM_ORC */ -/* Description: Over-read character. */ - -/* Bits 7..0 : Over-read character. */ -#define SPIM_ORC_ORC_Pos (0UL) /*!< Position of ORC field. */ -#define SPIM_ORC_ORC_Msk (0xFFUL << SPIM_ORC_ORC_Pos) /*!< Bit mask of ORC field. */ - -/* Register: SPIM_POWER */ -/* Description: Peripheral power control. */ - -/* Bit 0 : Peripheral power control. */ -#define SPIM_POWER_POWER_Pos (0UL) /*!< Position of POWER field. */ -#define SPIM_POWER_POWER_Msk (0x1UL << SPIM_POWER_POWER_Pos) /*!< Bit mask of POWER field. */ -#define SPIM_POWER_POWER_Disabled (0UL) /*!< Module power disabled. */ -#define SPIM_POWER_POWER_Enabled (1UL) /*!< Module power enabled. */ - /* Register: SPIM_RXD_PTR */ /* Description: Data pointer. */ @@ -6201,6 +5900,43 @@ #define SPIM_TXD_AMOUNT_AMOUNT_Pos (0UL) /*!< Position of AMOUNT field. */ #define SPIM_TXD_AMOUNT_AMOUNT_Msk (0xFFUL << SPIM_TXD_AMOUNT_AMOUNT_Pos) /*!< Bit mask of AMOUNT field. */ +/* Register: SPIM_CONFIG */ +/* Description: Configuration register. */ + +/* Bit 2 : Serial clock (SCK) polarity. */ +#define SPIM_CONFIG_CPOL_Pos (2UL) /*!< Position of CPOL field. */ +#define SPIM_CONFIG_CPOL_Msk (0x1UL << SPIM_CONFIG_CPOL_Pos) /*!< Bit mask of CPOL field. */ +#define SPIM_CONFIG_CPOL_ActiveHigh (0UL) /*!< Active high. */ +#define SPIM_CONFIG_CPOL_ActiveLow (1UL) /*!< Active low. */ + +/* Bit 1 : Serial clock (SCK) phase. */ +#define SPIM_CONFIG_CPHA_Pos (1UL) /*!< Position of CPHA field. */ +#define SPIM_CONFIG_CPHA_Msk (0x1UL << SPIM_CONFIG_CPHA_Pos) /*!< Bit mask of CPHA field. */ +#define SPIM_CONFIG_CPHA_Leading (0UL) /*!< Sample on leading edge of the clock. Shift serial data on trailing edge. */ +#define SPIM_CONFIG_CPHA_Trailing (1UL) /*!< Sample on trailing edge of the clock. Shift serial data on leading edge. */ + +/* Bit 0 : Bit order. */ +#define SPIM_CONFIG_ORDER_Pos (0UL) /*!< Position of ORDER field. */ +#define SPIM_CONFIG_ORDER_Msk (0x1UL << SPIM_CONFIG_ORDER_Pos) /*!< Bit mask of ORDER field. */ +#define SPIM_CONFIG_ORDER_MsbFirst (0UL) /*!< Most significant bit transmitted out first. */ +#define SPIM_CONFIG_ORDER_LsbFirst (1UL) /*!< Least significant bit transmitted out first. */ + +/* Register: SPIM_ORC */ +/* Description: Over-read character. */ + +/* Bits 7..0 : Over-read character. */ +#define SPIM_ORC_ORC_Pos (0UL) /*!< Position of ORC field. */ +#define SPIM_ORC_ORC_Msk (0xFFUL << SPIM_ORC_ORC_Pos) /*!< Bit mask of ORC field. */ + +/* Register: SPIM_POWER */ +/* Description: Peripheral power control. */ + +/* Bit 0 : Peripheral power control. */ +#define SPIM_POWER_POWER_Pos (0UL) /*!< Position of POWER field. */ +#define SPIM_POWER_POWER_Msk (0x1UL << SPIM_POWER_POWER_Pos) /*!< Bit mask of POWER field. */ +#define SPIM_POWER_POWER_Disabled (0UL) /*!< Module power disabled. */ +#define SPIM_POWER_POWER_Enabled (1UL) /*!< Module power enabled. */ + /* Peripheral: SPIS */ /* Description: SPI slave 1. */ @@ -6224,6 +5960,13 @@ #define SPIS_INTENSET_ACQUIRED_Enabled (1UL) /*!< Interrupt enabled. */ #define SPIS_INTENSET_ACQUIRED_Set (1UL) /*!< Enable interrupt on write. */ +/* Bit 4 : enable interrupt on ENDRX event. */ +#define SPIS_INTENSET_ENDRX_Pos (4UL) /*!< Position of ENDRX field. */ +#define SPIS_INTENSET_ENDRX_Msk (0x1UL << SPIS_INTENSET_ENDRX_Pos) /*!< Bit mask of ENDRX field. */ +#define SPIS_INTENSET_ENDRX_Disabled (0UL) /*!< Interrupt disabled. */ +#define SPIS_INTENSET_ENDRX_Enabled (1UL) /*!< Interrupt enabled. */ +#define SPIS_INTENSET_ENDRX_Set (1UL) /*!< Enable interrupt on write. */ + /* Bit 1 : Enable interrupt on END event. */ #define SPIS_INTENSET_END_Pos (1UL) /*!< Position of END field. */ #define SPIS_INTENSET_END_Msk (0x1UL << SPIS_INTENSET_END_Pos) /*!< Bit mask of END field. */ @@ -6241,6 +5984,13 @@ #define SPIS_INTENCLR_ACQUIRED_Enabled (1UL) /*!< Interrupt enabled. */ #define SPIS_INTENCLR_ACQUIRED_Clear (1UL) /*!< Disable interrupt on write. */ +/* Bit 4 : Disable interrupt on ENDRX event. */ +#define SPIS_INTENCLR_ENDRX_Pos (4UL) /*!< Position of ENDRX field. */ +#define SPIS_INTENCLR_ENDRX_Msk (0x1UL << SPIS_INTENCLR_ENDRX_Pos) /*!< Bit mask of ENDRX field. */ +#define SPIS_INTENCLR_ENDRX_Disabled (0UL) /*!< Interrupt disabled. */ +#define SPIS_INTENCLR_ENDRX_Enabled (1UL) /*!< Interrupt enabled. */ +#define SPIS_INTENCLR_ENDRX_Clear (1UL) /*!< Disable interrupt on write. */ + /* Bit 1 : Disable interrupt on END event. */ #define SPIS_INTENCLR_END_Pos (1UL) /*!< Position of END field. */ #define SPIS_INTENCLR_END_Msk (0x1UL << SPIS_INTENCLR_END_Pos) /*!< Bit mask of END field. */ @@ -6669,6 +6419,13 @@ #define TWI_ERRORSRC_ANACK_Present (1UL) /*!< Error present. */ #define TWI_ERRORSRC_ANACK_Clear (1UL) /*!< Clear error on write. */ +/* Bit 0 : Byte received in RXD register before read of the last received byte (data loss). */ +#define TWI_ERRORSRC_OVERRUN_Pos (0UL) /*!< Position of OVERRUN field. */ +#define TWI_ERRORSRC_OVERRUN_Msk (0x1UL << TWI_ERRORSRC_OVERRUN_Pos) /*!< Bit mask of OVERRUN field. */ +#define TWI_ERRORSRC_OVERRUN_NotPresent (0UL) /*!< Error not present. */ +#define TWI_ERRORSRC_OVERRUN_Present (1UL) /*!< Error present. */ +#define TWI_ERRORSRC_OVERRUN_Clear (1UL) /*!< Clear error on write. */ + /* Register: TWI_ENABLE */ /* Description: Enable two-wire master. */ @@ -6725,13 +6482,13 @@ /* Register: UART_SHORTS */ /* Description: Shortcuts for UART. */ -/* Bit 4 : Shortcut between NCTS event and the STOPRX task. */ +/* 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 the STARTRX task. */ +/* 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. */ @@ -6901,7 +6658,7 @@ #define UART_BAUDRATE_BAUDRATE_Baud230400 (0x03AFB000UL) /*!< 230400 baud. */ #define UART_BAUDRATE_BAUDRATE_Baud250000 (0x04000000UL) /*!< 250000 baud. */ #define UART_BAUDRATE_BAUDRATE_Baud460800 (0x075F7000UL) /*!< 460800 baud. */ -#define UART_BAUDRATE_BAUDRATE_Baud921600 (0x0EBEDFA4UL) /*!< 921600 baud. */ +#define UART_BAUDRATE_BAUDRATE_Baud921600 (0x0EBED000UL) /*!< 921600 baud. */ #define UART_BAUDRATE_BAUDRATE_Baud1M (0x10000000UL) /*!< 1M baud. */ /* Register: UART_CONFIG */ @@ -6938,14 +6695,14 @@ /* Bits 15..8 : Readback protect all code in the device. */ #define UICR_RBPCONF_PALL_Pos (8UL) /*!< Position of PALL field. */ #define UICR_RBPCONF_PALL_Msk (0xFFUL << UICR_RBPCONF_PALL_Pos) /*!< Bit mask of PALL field. */ -#define UICR_RBPCONF_PALL_Disabled (0xFFUL) /*!< Disabled. */ #define UICR_RBPCONF_PALL_Enabled (0x00UL) /*!< Enabled. */ +#define UICR_RBPCONF_PALL_Disabled (0xFFUL) /*!< Disabled. */ /* Bits 7..0 : Readback protect region 0. Will be ignored if pre-programmed factory code is present on the chip. */ #define UICR_RBPCONF_PR0_Pos (0UL) /*!< Position of PR0 field. */ #define UICR_RBPCONF_PR0_Msk (0xFFUL << UICR_RBPCONF_PR0_Pos) /*!< Bit mask of PR0 field. */ -#define UICR_RBPCONF_PR0_Disabled (0xFFUL) /*!< Disabled. */ #define UICR_RBPCONF_PR0_Enabled (0x00UL) /*!< Enabled. */ +#define UICR_RBPCONF_PR0_Disabled (0xFFUL) /*!< Disabled. */ /* Register: UICR_XTALFREQ */ /* Description: Reset value for CLOCK XTALFREQ register. */ @@ -6953,8 +6710,8 @@ /* Bits 7..0 : Reset value for CLOCK XTALFREQ register. */ #define UICR_XTALFREQ_XTALFREQ_Pos (0UL) /*!< Position of XTALFREQ field. */ #define UICR_XTALFREQ_XTALFREQ_Msk (0xFFUL << UICR_XTALFREQ_XTALFREQ_Pos) /*!< Bit mask of XTALFREQ field. */ -#define UICR_XTALFREQ_XTALFREQ_16MHz (0xFFUL) /*!< 16MHz Xtal is used. */ #define UICR_XTALFREQ_XTALFREQ_32MHz (0x00UL) /*!< 32MHz Xtal is used. */ +#define UICR_XTALFREQ_XTALFREQ_16MHz (0xFFUL) /*!< 16MHz Xtal is used. */ /* Register: UICR_FWID */ /* Description: Firmware ID. */ diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_deprecated.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_deprecated.h new file mode 100644 index 0000000000..2a45aeecae --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_deprecated.h @@ -0,0 +1,438 @@ +/* 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. + * + */ + +#ifndef NRF51_DEPRECATED_H +#define NRF51_DEPRECATED_H + +/*lint ++flb "Enter library region */ + +/* This file is given to prevent your SW from not compiling with the updates made to nrf51.h and + * nrf51_bitfields.h. The macros defined in this file were available previously. Do not use these + * macros on purpose. Use the ones defined in nrf51.h and nrf51_bitfields.h instead. + */ + +/* NVMC */ +/* The register ERASEPROTECTEDPAGE is called ERASEPCR0 in the documentation. */ +#define ERASEPROTECTEDPAGE ERASEPCR0 + + +/* LPCOMP */ +/* The interrupt ISR was renamed. Adding old name to the macros. */ +#define LPCOMP_COMP_IRQHandler LPCOMP_IRQHandler +#define LPCOMP_COMP_IRQn LPCOMP_IRQn + + +/* MPU */ +/* The field MPU.PERR0.LPCOMP_COMP was renamed. Added into deprecated in case somebody was using the macros defined for it. */ +#define MPU_PERR0_LPCOMP_COMP_Pos MPU_PERR0_LPCOMP_Pos +#define MPU_PERR0_LPCOMP_COMP_Msk MPU_PERR0_LPCOMP_Msk +#define MPU_PERR0_LPCOMP_COMP_InRegion1 MPU_PERR0_LPCOMP_InRegion1 +#define MPU_PERR0_LPCOMP_COMP_InRegion0 MPU_PERR0_LPCOMP_InRegion0 + + +/* POWER */ +/* The field POWER.RAMON.OFFRAM3 was eliminated. Added into deprecated in case somebody was using the macros defined for it. */ +#define POWER_RAMON_OFFRAM3_Pos (19UL) +#define POWER_RAMON_OFFRAM3_Msk (0x1UL << POWER_RAMON_OFFRAM3_Pos) +#define POWER_RAMON_OFFRAM3_RAM3Off (0UL) +#define POWER_RAMON_OFFRAM3_RAM3On (1UL) +/* The field POWER.RAMON.OFFRAM2 was eliminated. Added into deprecated in case somebody was using the macros defined for it. */ +#define POWER_RAMON_OFFRAM2_Pos (18UL) +#define POWER_RAMON_OFFRAM2_Msk (0x1UL << POWER_RAMON_OFFRAM2_Pos) +#define POWER_RAMON_OFFRAM2_RAM2Off (0UL) +#define POWER_RAMON_OFFRAM2_RAM2On (1UL) +/* The field POWER.RAMON.ONRAM3 was eliminated. Added into deprecated in case somebody was using the macros defined for it. */ +#define POWER_RAMON_ONRAM3_Pos (3UL) +#define POWER_RAMON_ONRAM3_Msk (0x1UL << POWER_RAMON_ONRAM3_Pos) +#define POWER_RAMON_ONRAM3_RAM3Off (0UL) +#define POWER_RAMON_ONRAM3_RAM3On (1UL) +/* The field POWER.RAMON.ONRAM2 was eliminated. Added into deprecated in case somebody was using the macros defined for it. */ +#define POWER_RAMON_ONRAM2_Pos (2UL) +#define POWER_RAMON_ONRAM2_Msk (0x1UL << POWER_RAMON_ONRAM2_Pos) +#define POWER_RAMON_ONRAM2_RAM2Off (0UL) +#define POWER_RAMON_ONRAM2_RAM2On (1UL) + + +/* RADIO */ +/* The enumerated value RADIO.TXPOWER.TXPOWER.Neg40dBm was renamed. Added into deprecated with the new macro name. */ +#define RADIO_TXPOWER_TXPOWER_Neg40dBm RADIO_TXPOWER_TXPOWER_Neg30dBm +/* The name of the field SKIPADDR was corrected. Old macros added for compatibility. */ +#define RADIO_CRCCNF_SKIP_ADDR_Pos RADIO_CRCCNF_SKIPADDR_Pos +#define RADIO_CRCCNF_SKIP_ADDR_Msk RADIO_CRCCNF_SKIPADDR_Msk +#define RADIO_CRCCNF_SKIP_ADDR_Include RADIO_CRCCNF_SKIPADDR_Include +#define RADIO_CRCCNF_SKIP_ADDR_Skip RADIO_CRCCNF_SKIPADDR_Skip +/* The name of the field PLLLOCK was corrected. Old macros added for compatibility. */ +#define RADIO_TEST_PLL_LOCK_Pos RADIO_TEST_PLLLOCK_Pos +#define RADIO_TEST_PLL_LOCK_Msk RADIO_TEST_PLLLOCK_Msk +#define RADIO_TEST_PLL_LOCK_Disabled RADIO_TEST_PLLLOCK_Disabled +#define RADIO_TEST_PLL_LOCK_Enabled RADIO_TEST_PLLLOCK_Enabled +/* The name of the field CONSTCARRIER was corrected. Old macros added for compatibility. */ +#define RADIO_TEST_CONST_CARRIER_Pos RADIO_TEST_CONSTCARRIER_Pos +#define RADIO_TEST_CONST_CARRIER_Msk RADIO_TEST_CONSTCARRIER_Msk +#define RADIO_TEST_CONST_CARRIER_Disabled RADIO_TEST_CONSTCARRIER_Disabled +#define RADIO_TEST_CONST_CARRIER_Enabled RADIO_TEST_CONSTCARRIER_Enabled + + +/* FICR */ +/* The registers FICR.SIZERAMBLOCK0, FICR.SIZERAMBLOCK1, FICR.SIZERAMBLOCK2 and FICR.SIZERAMBLOCK3 were renamed into an array. */ +#define SIZERAMBLOCK0 SIZERAMBLOCKS +#define SIZERAMBLOCK1 SIZERAMBLOCKS +#define SIZERAMBLOCK2 SIZERAMBLOCK[2] /*!< Note that this macro will disapear when SIZERAMBLOCK array is eliminated. SIZERAMBLOCK is a deprecated array. */ +#define SIZERAMBLOCK3 SIZERAMBLOCK[3] /*!< Note that this macro will disapear when SIZERAMBLOCK array is eliminated. SIZERAMBLOCK is a deprecated array. */ +/* The registers FICR.DEVICEID0 and FICR.DEVICEID1 were renamed into an array. */ +#define DEVICEID0 DEVICEID[0] +#define DEVICEID1 DEVICEID[1] +/* The registers FICR.ER0, FICR.ER1, FICR.ER2 and FICR.ER3 were renamed into an array. */ +#define ER0 ER[0] +#define ER1 ER[1] +#define ER2 ER[2] +#define ER3 ER[3] +/* The registers FICR.IR0, FICR.IR1, FICR.IR2 and FICR.IR3 were renamed into an array. */ +#define IR0 IR[0] +#define IR1 IR[1] +#define IR2 IR[2] +#define IR3 IR[3] +/* The registers FICR.DEVICEADDR0 and FICR.DEVICEADDR1 were renamed into an array. */ +#define DEVICEADDR0 DEVICEADDR[0] +#define DEVICEADDR1 DEVICEADDR[1] + + +/* PPI */ +/* The tasks PPI.TASKS_CHGxEN and PPI.TASKS_CHGxDIS were renamed into an array of structs. */ +#define TASKS_CHG0EN TASKS_CHG[0].EN +#define TASKS_CHG0DIS TASKS_CHG[0].DIS +#define TASKS_CHG1EN TASKS_CHG[1].EN +#define TASKS_CHG1DIS TASKS_CHG[1].DIS +#define TASKS_CHG2EN TASKS_CHG[2].EN +#define TASKS_CHG2DIS TASKS_CHG[2].DIS +#define TASKS_CHG3EN TASKS_CHG[3].EN +#define TASKS_CHG3DIS TASKS_CHG[3].DIS +/* The registers PPI.CHx_EEP and PPI.CHx_TEP were renamed into an array of structs. */ +#define CH0_EEP CH[0].EEP +#define CH0_TEP CH[0].TEP +#define CH1_EEP CH[1].EEP +#define CH1_TEP CH[1].TEP +#define CH2_EEP CH[2].EEP +#define CH2_TEP CH[2].TEP +#define CH3_EEP CH[3].EEP +#define CH3_TEP CH[3].TEP +#define CH4_EEP CH[4].EEP +#define CH4_TEP CH[4].TEP +#define CH5_EEP CH[5].EEP +#define CH5_TEP CH[5].TEP +#define CH6_EEP CH[6].EEP +#define CH6_TEP CH[6].TEP +#define CH7_EEP CH[7].EEP +#define CH7_TEP CH[7].TEP +#define CH8_EEP CH[8].EEP +#define CH8_TEP CH[8].TEP +#define CH9_EEP CH[9].EEP +#define CH9_TEP CH[9].TEP +#define CH10_EEP CH[10].EEP +#define CH10_TEP CH[10].TEP +#define CH11_EEP CH[11].EEP +#define CH11_TEP CH[11].TEP +#define CH12_EEP CH[12].EEP +#define CH12_TEP CH[12].TEP +#define CH13_EEP CH[13].EEP +#define CH13_TEP CH[13].TEP +#define CH14_EEP CH[14].EEP +#define CH14_TEP CH[14].TEP +#define CH15_EEP CH[15].EEP +#define CH15_TEP CH[15].TEP +/* The registers PPI.CHG0, PPI.CHG1, PPI.CHG2 and PPI.CHG3 were renamed into an array. */ +#define CHG0 CHG[0] +#define CHG1 CHG[1] +#define CHG2 CHG[2] +#define CHG3 CHG[3] +/* All bitfield macros for the CHGx registers therefore changed name. */ +#define PPI_CHG0_CH15_Pos PPI_CHG_CH15_Pos +#define PPI_CHG0_CH15_Msk PPI_CHG_CH15_Msk +#define PPI_CHG0_CH15_Excluded PPI_CHG_CH15_Excluded +#define PPI_CHG0_CH15_Included PPI_CHG_CH15_Included +#define PPI_CHG0_CH14_Pos PPI_CHG_CH14_Pos +#define PPI_CHG0_CH14_Msk PPI_CHG_CH14_Msk +#define PPI_CHG0_CH14_Excluded PPI_CHG_CH14_Excluded +#define PPI_CHG0_CH14_Included PPI_CHG_CH14_Included +#define PPI_CHG0_CH13_Pos PPI_CHG_CH13_Pos +#define PPI_CHG0_CH13_Msk PPI_CHG_CH13_Msk +#define PPI_CHG0_CH13_Excluded PPI_CHG_CH13_Excluded +#define PPI_CHG0_CH13_Included PPI_CHG_CH13_Included +#define PPI_CHG0_CH12_Pos PPI_CHG_CH12_Pos +#define PPI_CHG0_CH12_Msk PPI_CHG_CH12_Msk +#define PPI_CHG0_CH12_Excluded PPI_CHG_CH12_Excluded +#define PPI_CHG0_CH12_Included PPI_CHG_CH12_Included +#define PPI_CHG0_CH11_Pos PPI_CHG_CH11_Pos +#define PPI_CHG0_CH11_Msk PPI_CHG_CH11_Msk +#define PPI_CHG0_CH11_Excluded PPI_CHG_CH11_Excluded +#define PPI_CHG0_CH11_Included PPI_CHG_CH11_Included +#define PPI_CHG0_CH10_Pos PPI_CHG_CH10_Pos +#define PPI_CHG0_CH10_Msk PPI_CHG_CH10_Msk +#define PPI_CHG0_CH10_Excluded PPI_CHG_CH10_Excluded +#define PPI_CHG0_CH10_Included PPI_CHG_CH10_Included +#define PPI_CHG0_CH9_Pos PPI_CHG_CH9_Pos +#define PPI_CHG0_CH9_Msk PPI_CHG_CH9_Msk +#define PPI_CHG0_CH9_Excluded PPI_CHG_CH9_Excluded +#define PPI_CHG0_CH9_Included PPI_CHG_CH9_Included +#define PPI_CHG0_CH8_Pos PPI_CHG_CH8_Pos +#define PPI_CHG0_CH8_Msk PPI_CHG_CH8_Msk +#define PPI_CHG0_CH8_Excluded PPI_CHG_CH8_Excluded +#define PPI_CHG0_CH8_Included PPI_CHG_CH8_Included +#define PPI_CHG0_CH7_Pos PPI_CHG_CH7_Pos +#define PPI_CHG0_CH7_Msk PPI_CHG_CH7_Msk +#define PPI_CHG0_CH7_Excluded PPI_CHG_CH7_Excluded +#define PPI_CHG0_CH7_Included PPI_CHG_CH7_Included +#define PPI_CHG0_CH6_Pos PPI_CHG_CH6_Pos +#define PPI_CHG0_CH6_Msk PPI_CHG_CH6_Msk +#define PPI_CHG0_CH6_Excluded PPI_CHG_CH6_Excluded +#define PPI_CHG0_CH6_Included PPI_CHG_CH6_Included +#define PPI_CHG0_CH5_Pos PPI_CHG_CH5_Pos +#define PPI_CHG0_CH5_Msk PPI_CHG_CH5_Msk +#define PPI_CHG0_CH5_Excluded PPI_CHG_CH5_Excluded +#define PPI_CHG0_CH5_Included PPI_CHG_CH5_Included +#define PPI_CHG0_CH4_Pos PPI_CHG_CH4_Pos +#define PPI_CHG0_CH4_Msk PPI_CHG_CH4_Msk +#define PPI_CHG0_CH4_Excluded PPI_CHG_CH4_Excluded +#define PPI_CHG0_CH4_Included PPI_CHG_CH4_Included +#define PPI_CHG0_CH3_Pos PPI_CHG_CH3_Pos +#define PPI_CHG0_CH3_Msk PPI_CHG_CH3_Msk +#define PPI_CHG0_CH3_Excluded PPI_CHG_CH3_Excluded +#define PPI_CHG0_CH3_Included PPI_CHG_CH3_Included +#define PPI_CHG0_CH2_Pos PPI_CHG_CH2_Pos +#define PPI_CHG0_CH2_Msk PPI_CHG_CH2_Msk +#define PPI_CHG0_CH2_Excluded PPI_CHG_CH2_Excluded +#define PPI_CHG0_CH2_Included PPI_CHG_CH2_Included +#define PPI_CHG0_CH1_Pos PPI_CHG_CH1_Pos +#define PPI_CHG0_CH1_Msk PPI_CHG_CH1_Msk +#define PPI_CHG0_CH1_Excluded PPI_CHG_CH1_Excluded +#define PPI_CHG0_CH1_Included PPI_CHG_CH1_Included +#define PPI_CHG0_CH0_Pos PPI_CHG_CH0_Pos +#define PPI_CHG0_CH0_Msk PPI_CHG_CH0_Msk +#define PPI_CHG0_CH0_Excluded PPI_CHG_CH0_Excluded +#define PPI_CHG0_CH0_Included PPI_CHG_CH0_Included +#define PPI_CHG1_CH15_Pos PPI_CHG_CH15_Pos +#define PPI_CHG1_CH15_Msk PPI_CHG_CH15_Msk +#define PPI_CHG1_CH15_Excluded PPI_CHG_CH15_Excluded +#define PPI_CHG1_CH15_Included PPI_CHG_CH15_Included +#define PPI_CHG1_CH14_Pos PPI_CHG_CH14_Pos +#define PPI_CHG1_CH14_Msk PPI_CHG_CH14_Msk +#define PPI_CHG1_CH14_Excluded PPI_CHG_CH14_Excluded +#define PPI_CHG1_CH14_Included PPI_CHG_CH14_Included +#define PPI_CHG1_CH13_Pos PPI_CHG_CH13_Pos +#define PPI_CHG1_CH13_Msk PPI_CHG_CH13_Msk +#define PPI_CHG1_CH13_Excluded PPI_CHG_CH13_Excluded +#define PPI_CHG1_CH13_Included PPI_CHG_CH13_Included +#define PPI_CHG1_CH12_Pos PPI_CHG_CH12_Pos +#define PPI_CHG1_CH12_Msk PPI_CHG_CH12_Msk +#define PPI_CHG1_CH12_Excluded PPI_CHG_CH12_Excluded +#define PPI_CHG1_CH12_Included PPI_CHG_CH12_Included +#define PPI_CHG1_CH11_Pos PPI_CHG_CH11_Pos +#define PPI_CHG1_CH11_Msk PPI_CHG_CH11_Msk +#define PPI_CHG1_CH11_Excluded PPI_CHG_CH11_Excluded +#define PPI_CHG1_CH11_Included PPI_CHG_CH11_Included +#define PPI_CHG1_CH10_Pos PPI_CHG_CH10_Pos +#define PPI_CHG1_CH10_Msk PPI_CHG_CH10_Msk +#define PPI_CHG1_CH10_Excluded PPI_CHG_CH10_Excluded +#define PPI_CHG1_CH10_Included PPI_CHG_CH10_Included +#define PPI_CHG1_CH9_Pos PPI_CHG_CH9_Pos +#define PPI_CHG1_CH9_Msk PPI_CHG_CH9_Msk +#define PPI_CHG1_CH9_Excluded PPI_CHG_CH9_Excluded +#define PPI_CHG1_CH9_Included PPI_CHG_CH9_Included +#define PPI_CHG1_CH8_Pos PPI_CHG_CH8_Pos +#define PPI_CHG1_CH8_Msk PPI_CHG_CH8_Msk +#define PPI_CHG1_CH8_Excluded PPI_CHG_CH8_Excluded +#define PPI_CHG1_CH8_Included PPI_CHG_CH8_Included +#define PPI_CHG1_CH7_Pos PPI_CHG_CH7_Pos +#define PPI_CHG1_CH7_Msk PPI_CHG_CH7_Msk +#define PPI_CHG1_CH7_Excluded PPI_CHG_CH7_Excluded +#define PPI_CHG1_CH7_Included PPI_CHG_CH7_Included +#define PPI_CHG1_CH6_Pos PPI_CHG_CH6_Pos +#define PPI_CHG1_CH6_Msk PPI_CHG_CH6_Msk +#define PPI_CHG1_CH6_Excluded PPI_CHG_CH6_Excluded +#define PPI_CHG1_CH6_Included PPI_CHG_CH6_Included +#define PPI_CHG1_CH5_Pos PPI_CHG_CH5_Pos +#define PPI_CHG1_CH5_Msk PPI_CHG_CH5_Msk +#define PPI_CHG1_CH5_Excluded PPI_CHG_CH5_Excluded +#define PPI_CHG1_CH5_Included PPI_CHG_CH5_Included +#define PPI_CHG1_CH4_Pos PPI_CHG_CH4_Pos +#define PPI_CHG1_CH4_Msk PPI_CHG_CH4_Msk +#define PPI_CHG1_CH4_Excluded PPI_CHG_CH4_Excluded +#define PPI_CHG1_CH4_Included PPI_CHG_CH4_Included +#define PPI_CHG1_CH3_Pos PPI_CHG_CH3_Pos +#define PPI_CHG1_CH3_Msk PPI_CHG_CH3_Msk +#define PPI_CHG1_CH3_Excluded PPI_CHG_CH3_Excluded +#define PPI_CHG1_CH3_Included PPI_CHG_CH3_Included +#define PPI_CHG1_CH2_Pos PPI_CHG_CH2_Pos +#define PPI_CHG1_CH2_Msk PPI_CHG_CH2_Msk +#define PPI_CHG1_CH2_Excluded PPI_CHG_CH2_Excluded +#define PPI_CHG1_CH2_Included PPI_CHG_CH2_Included +#define PPI_CHG1_CH1_Pos PPI_CHG_CH1_Pos +#define PPI_CHG1_CH1_Msk PPI_CHG_CH1_Msk +#define PPI_CHG1_CH1_Excluded PPI_CHG_CH1_Excluded +#define PPI_CHG1_CH1_Included PPI_CHG_CH1_Included +#define PPI_CHG1_CH0_Pos PPI_CHG_CH0_Pos +#define PPI_CHG1_CH0_Msk PPI_CHG_CH0_Msk +#define PPI_CHG1_CH0_Excluded PPI_CHG_CH0_Excluded +#define PPI_CHG1_CH0_Included PPI_CHG_CH0_Included +#define PPI_CHG2_CH15_Pos PPI_CHG_CH15_Pos +#define PPI_CHG2_CH15_Msk PPI_CHG_CH15_Msk +#define PPI_CHG2_CH15_Excluded PPI_CHG_CH15_Excluded +#define PPI_CHG2_CH15_Included PPI_CHG_CH15_Included +#define PPI_CHG2_CH14_Pos PPI_CHG_CH14_Pos +#define PPI_CHG2_CH14_Msk PPI_CHG_CH14_Msk +#define PPI_CHG2_CH14_Excluded PPI_CHG_CH14_Excluded +#define PPI_CHG2_CH14_Included PPI_CHG_CH14_Included +#define PPI_CHG2_CH13_Pos PPI_CHG_CH13_Pos +#define PPI_CHG2_CH13_Msk PPI_CHG_CH13_Msk +#define PPI_CHG2_CH13_Excluded PPI_CHG_CH13_Excluded +#define PPI_CHG2_CH13_Included PPI_CHG_CH13_Included +#define PPI_CHG2_CH12_Pos PPI_CHG_CH12_Pos +#define PPI_CHG2_CH12_Msk PPI_CHG_CH12_Msk +#define PPI_CHG2_CH12_Excluded PPI_CHG_CH12_Excluded +#define PPI_CHG2_CH12_Included PPI_CHG_CH12_Included +#define PPI_CHG2_CH11_Pos PPI_CHG_CH11_Pos +#define PPI_CHG2_CH11_Msk PPI_CHG_CH11_Msk +#define PPI_CHG2_CH11_Excluded PPI_CHG_CH11_Excluded +#define PPI_CHG2_CH11_Included PPI_CHG_CH11_Included +#define PPI_CHG2_CH10_Pos PPI_CHG_CH10_Pos +#define PPI_CHG2_CH10_Msk PPI_CHG_CH10_Msk +#define PPI_CHG2_CH10_Excluded PPI_CHG_CH10_Excluded +#define PPI_CHG2_CH10_Included PPI_CHG_CH10_Included +#define PPI_CHG2_CH9_Pos PPI_CHG_CH9_Pos +#define PPI_CHG2_CH9_Msk PPI_CHG_CH9_Msk +#define PPI_CHG2_CH9_Excluded PPI_CHG_CH9_Excluded +#define PPI_CHG2_CH9_Included PPI_CHG_CH9_Included +#define PPI_CHG2_CH8_Pos PPI_CHG_CH8_Pos +#define PPI_CHG2_CH8_Msk PPI_CHG_CH8_Msk +#define PPI_CHG2_CH8_Excluded PPI_CHG_CH8_Excluded +#define PPI_CHG2_CH8_Included PPI_CHG_CH8_Included +#define PPI_CHG2_CH7_Pos PPI_CHG_CH7_Pos +#define PPI_CHG2_CH7_Msk PPI_CHG_CH7_Msk +#define PPI_CHG2_CH7_Excluded PPI_CHG_CH7_Excluded +#define PPI_CHG2_CH7_Included PPI_CHG_CH7_Included +#define PPI_CHG2_CH6_Pos PPI_CHG_CH6_Pos +#define PPI_CHG2_CH6_Msk PPI_CHG_CH6_Msk +#define PPI_CHG2_CH6_Excluded PPI_CHG_CH6_Excluded +#define PPI_CHG2_CH6_Included PPI_CHG_CH6_Included +#define PPI_CHG2_CH5_Pos PPI_CHG_CH5_Pos +#define PPI_CHG2_CH5_Msk PPI_CHG_CH5_Msk +#define PPI_CHG2_CH5_Excluded PPI_CHG_CH5_Excluded +#define PPI_CHG2_CH5_Included PPI_CHG_CH5_Included +#define PPI_CHG2_CH4_Pos PPI_CHG_CH4_Pos +#define PPI_CHG2_CH4_Msk PPI_CHG_CH4_Msk +#define PPI_CHG2_CH4_Excluded PPI_CHG_CH4_Excluded +#define PPI_CHG2_CH4_Included PPI_CHG_CH4_Included +#define PPI_CHG2_CH3_Pos PPI_CHG_CH3_Pos +#define PPI_CHG2_CH3_Msk PPI_CHG_CH3_Msk +#define PPI_CHG2_CH3_Excluded PPI_CHG_CH3_Excluded +#define PPI_CHG2_CH3_Included PPI_CHG_CH3_Included +#define PPI_CHG2_CH2_Pos PPI_CHG_CH2_Pos +#define PPI_CHG2_CH2_Msk PPI_CHG_CH2_Msk +#define PPI_CHG2_CH2_Excluded PPI_CHG_CH2_Excluded +#define PPI_CHG2_CH2_Included PPI_CHG_CH2_Included +#define PPI_CHG2_CH1_Pos PPI_CHG_CH1_Pos +#define PPI_CHG2_CH1_Msk PPI_CHG_CH1_Msk +#define PPI_CHG2_CH1_Excluded PPI_CHG_CH1_Excluded +#define PPI_CHG2_CH1_Included PPI_CHG_CH1_Included +#define PPI_CHG2_CH0_Pos PPI_CHG_CH0_Pos +#define PPI_CHG2_CH0_Msk PPI_CHG_CH0_Msk +#define PPI_CHG2_CH0_Excluded PPI_CHG_CH0_Excluded +#define PPI_CHG2_CH0_Included PPI_CHG_CH0_Included +#define PPI_CHG3_CH15_Pos PPI_CHG_CH15_Pos +#define PPI_CHG3_CH15_Msk PPI_CHG_CH15_Msk +#define PPI_CHG3_CH15_Excluded PPI_CHG_CH15_Excluded +#define PPI_CHG3_CH15_Included PPI_CHG_CH15_Included +#define PPI_CHG3_CH14_Pos PPI_CHG_CH14_Pos +#define PPI_CHG3_CH14_Msk PPI_CHG_CH14_Msk +#define PPI_CHG3_CH14_Excluded PPI_CHG_CH14_Excluded +#define PPI_CHG3_CH14_Included PPI_CHG_CH14_Included +#define PPI_CHG3_CH13_Pos PPI_CHG_CH13_Pos +#define PPI_CHG3_CH13_Msk PPI_CHG_CH13_Msk +#define PPI_CHG3_CH13_Excluded PPI_CHG_CH13_Excluded +#define PPI_CHG3_CH13_Included PPI_CHG_CH13_Included +#define PPI_CHG3_CH12_Pos PPI_CHG_CH12_Pos +#define PPI_CHG3_CH12_Msk PPI_CHG_CH12_Msk +#define PPI_CHG3_CH12_Excluded PPI_CHG_CH12_Excluded +#define PPI_CHG3_CH12_Included PPI_CHG_CH12_Included +#define PPI_CHG3_CH11_Pos PPI_CHG_CH11_Pos +#define PPI_CHG3_CH11_Msk PPI_CHG_CH11_Msk +#define PPI_CHG3_CH11_Excluded PPI_CHG_CH11_Excluded +#define PPI_CHG3_CH11_Included PPI_CHG_CH11_Included +#define PPI_CHG3_CH10_Pos PPI_CHG_CH10_Pos +#define PPI_CHG3_CH10_Msk PPI_CHG_CH10_Msk +#define PPI_CHG3_CH10_Excluded PPI_CHG_CH10_Excluded +#define PPI_CHG3_CH10_Included PPI_CHG_CH10_Included +#define PPI_CHG3_CH9_Pos PPI_CHG_CH9_Pos +#define PPI_CHG3_CH9_Msk PPI_CHG_CH9_Msk +#define PPI_CHG3_CH9_Excluded PPI_CHG_CH9_Excluded +#define PPI_CHG3_CH9_Included PPI_CHG_CH9_Included +#define PPI_CHG3_CH8_Pos PPI_CHG_CH8_Pos +#define PPI_CHG3_CH8_Msk PPI_CHG_CH8_Msk +#define PPI_CHG3_CH8_Excluded PPI_CHG_CH8_Excluded +#define PPI_CHG3_CH8_Included PPI_CHG_CH8_Included +#define PPI_CHG3_CH7_Pos PPI_CHG_CH7_Pos +#define PPI_CHG3_CH7_Msk PPI_CHG_CH7_Msk +#define PPI_CHG3_CH7_Excluded PPI_CHG_CH7_Excluded +#define PPI_CHG3_CH7_Included PPI_CHG_CH7_Included +#define PPI_CHG3_CH6_Pos PPI_CHG_CH6_Pos +#define PPI_CHG3_CH6_Msk PPI_CHG_CH6_Msk +#define PPI_CHG3_CH6_Excluded PPI_CHG_CH6_Excluded +#define PPI_CHG3_CH6_Included PPI_CHG_CH6_Included +#define PPI_CHG3_CH5_Pos PPI_CHG_CH5_Pos +#define PPI_CHG3_CH5_Msk PPI_CHG_CH5_Msk +#define PPI_CHG3_CH5_Excluded PPI_CHG_CH5_Excluded +#define PPI_CHG3_CH5_Included PPI_CHG_CH5_Included +#define PPI_CHG3_CH4_Pos PPI_CHG_CH4_Pos +#define PPI_CHG3_CH4_Msk PPI_CHG_CH4_Msk +#define PPI_CHG3_CH4_Excluded PPI_CHG_CH4_Excluded +#define PPI_CHG3_CH4_Included PPI_CHG_CH4_Included +#define PPI_CHG3_CH3_Pos PPI_CHG_CH3_Pos +#define PPI_CHG3_CH3_Msk PPI_CHG_CH3_Msk +#define PPI_CHG3_CH3_Excluded PPI_CHG_CH3_Excluded +#define PPI_CHG3_CH3_Included PPI_CHG_CH3_Included +#define PPI_CHG3_CH2_Pos PPI_CHG_CH2_Pos +#define PPI_CHG3_CH2_Msk PPI_CHG_CH2_Msk +#define PPI_CHG3_CH2_Excluded PPI_CHG_CH2_Excluded +#define PPI_CHG3_CH2_Included PPI_CHG_CH2_Included +#define PPI_CHG3_CH1_Pos PPI_CHG_CH1_Pos +#define PPI_CHG3_CH1_Msk PPI_CHG_CH1_Msk +#define PPI_CHG3_CH1_Excluded PPI_CHG_CH1_Excluded +#define PPI_CHG3_CH1_Included PPI_CHG_CH1_Included +#define PPI_CHG3_CH0_Pos PPI_CHG_CH0_Pos +#define PPI_CHG3_CH0_Msk PPI_CHG_CH0_Msk +#define PPI_CHG3_CH0_Excluded PPI_CHG_CH0_Excluded +#define PPI_CHG3_CH0_Included PPI_CHG_CH0_Included + + + +/*lint --flb "Leave library region" */ + +#endif /* NRF51_DEPRECATED_H */ + diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf51_to_nrf52.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_to_nrf52.h similarity index 96% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf51_to_nrf52.h rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_to_nrf52.h index 41e3ee4063..a1d8c61843 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf51_to_nrf52.h +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_to_nrf52.h @@ -1,32 +1,30 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* 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: + * 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. + * * 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. + * * 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. + * * 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. + * 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. * */ @@ -934,3 +932,4 @@ /*lint --flb "Leave library region" */ #endif /* NRF51_TO_NRF52_H */ + diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf52.h similarity index 98% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52.h rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf52.h index a5ad4a47fe..bf7c165a0e 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52.h +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf52.h @@ -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. - * - */ - /****************************************************************************************************//** * @file nrf52.h @@ -40,26 +8,26 @@ * @version V1 * @date 23. February 2016 * - * @note Generated with SVDConv V2.81d + * @note Generated with SVDConv V2.81d * from CMSIS SVD File 'nrf52.svd' Version 1, * * @par 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 @@ -70,7 +38,7 @@ * 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. - * + * * *******************************************************************************************************/ @@ -1822,7 +1790,7 @@ typedef struct { /*!< NVMC Structure __I uint32_t READY; /*!< Ready flag */ __I uint32_t RESERVED1[64]; __IO uint32_t CONFIG; /*!< Configuration register */ - + union { __IO uint32_t ERASEPCR1; /*!< Deprecated register - Register for erasing a page in Code area. Equivalent to ERASEPAGE. */ @@ -2154,3 +2122,4 @@ typedef struct { /*!< GPIO Structure #endif /* nrf52_H */ + diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52_bitfields.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf52_bitfields.h similarity index 99% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52_bitfields.h rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf52_bitfields.h index 24b62da867..7d442e2ba1 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52_bitfields.h +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf52_bitfields.h @@ -1,32 +1,30 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* 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: + * 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. + * * 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. + * * 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. + * * 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. + * 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 __NRF52_BITS_H diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52_name_change.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf52_name_change.h similarity index 60% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52_name_change.h rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf52_name_change.h index c15fbc6f66..b3be6f957c 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf52_name_change.h +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf52_name_change.h @@ -1,32 +1,30 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* 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: + * 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. + * * 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. + * * 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. + * * 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. + * 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. * */ @@ -35,7 +33,7 @@ /*lint ++flb "Enter library region */ -/* This file is given to prevent your SW from not compiling with the updates made to nrf52.h and +/* This file is given to prevent your SW from not compiling with the updates made to nrf52.h and * nrf52_bitfields.h. The macros defined in this file were available previously. Do not use these * macros on purpose. Use the ones defined in nrf52.h and nrf52_bitfields.h instead. */ @@ -69,3 +67,4 @@ /*lint --flb "Leave library region" */ #endif /* NRF52_NAME_CHANGE_H */ + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/util/app_error.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/util/app_error.h deleted file mode 100644 index 2711170419..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/util/app_error.h +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/** @file - * - * @defgroup app_error Common application error handler - * @{ - * @ingroup app_common - * - * @brief Common application error handler and macros for utilizing a common error handler. - */ - -#ifndef APP_ERROR_H__ -#define APP_ERROR_H__ - -#include -#include -#include "nrf_error.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/**@brief Function for error handling, which is called when an error has occurred. - * - * @param[in] error_code Error code supplied to the handler. - * @param[in] line_num Line number where the handler is called. - * @param[in] p_file_name Pointer to the file name. - */ -void app_error_handler(uint32_t error_code, uint32_t line_num, const uint8_t * p_file_name); - -#ifdef __cplusplus -} -#endif - -/**@brief Macro for calling error handler function. - * - * @param[in] ERR_CODE Error code supplied to the error handler. - */ -#ifdef DEBUG -#define APP_ERROR_HANDLER(ERR_CODE) \ - do \ - { \ - app_error_handler((ERR_CODE), __LINE__, (uint8_t*) __FILE__); \ - } while (0) -#else -#define APP_ERROR_HANDLER(ERR_CODE) \ - do \ - { \ - app_error_handler((ERR_CODE), 0, 0); \ - } while (0) -#endif -/**@brief Macro for calling error handler function if supplied error code any other than NRF_SUCCESS. - * - * @param[in] ERR_CODE Error code supplied to the error handler. - */ -#define APP_ERROR_CHECK(ERR_CODE) \ - do \ - { \ - const uint32_t LOCAL_ERR_CODE = (ERR_CODE); \ - if (LOCAL_ERR_CODE != NRF_SUCCESS) \ - { \ - APP_ERROR_HANDLER(LOCAL_ERR_CODE); \ - } \ - } while (0) - -/**@brief Macro for calling error handler function if supplied boolean value is false. - * - * @param[in] BOOLEAN_VALUE Boolean value to be evaluated. - */ -#define APP_ERROR_CHECK_BOOL(BOOLEAN_VALUE) \ - do \ - { \ - const uint32_t LOCAL_BOOLEAN_VALUE = (BOOLEAN_VALUE); \ - if (!LOCAL_BOOLEAN_VALUE) \ - { \ - APP_ERROR_HANDLER(0); \ - } \ - } while (0) - -#endif // APP_ERROR_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/util/app_util.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/util/app_util.h deleted file mode 100644 index 7b0ef5a06a..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/util/app_util.h +++ /dev/null @@ -1,234 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/** @file - * - * @defgroup app_util Utility Functions and Definitions - * @{ - * @ingroup app_common - * - * @brief Various types and definitions available to all applications. - */ - -#ifndef APP_UTIL_H__ -#define APP_UTIL_H__ - -#include -#include -#include "compiler_abstraction.h" - -enum -{ - UNIT_0_625_MS = 625, /**< Number of microseconds in 0.625 milliseconds. */ - UNIT_1_25_MS = 1250, /**< Number of microseconds in 1.25 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__) -#define STATIC_ASSERT(EXPR) typedef char __attribute__((unused)) static_assert_failed[(EXPR) ? 1 : -1] -#elif defined(__ICCARM__) -#define STATIC_ASSERT(EXPR) extern char static_assert_failed[(EXPR) ? 1 : -1] -#else -#define STATIC_ASSERT(EXPR) typedef char static_assert_failed[(EXPR) ? 1 : -1] -#endif - - -/**@brief type for holding an encoded (i.e. little endian) 16 bit unsigned integer. */ -typedef uint8_t uint16_le_t[2]; - -/**@brief type for holding an encoded (i.e. little endian) 32 bit unsigned integer. */ -typedef uint8_t uint32_le_t[4]; - -/**@brief Byte array type. */ -typedef struct -{ - uint16_t size; /**< Number of array entries. */ - uint8_t * p_data; /**< Pointer to array entries. */ -} uint8_array_t; - -/**@brief Perform rounded integer division (as opposed to truncating the result). - * - * @param[in] A Numerator. - * @param[in] B Denominator. - * - * @return Rounded (integer) result of dividing A by B. - */ -#define ROUNDED_DIV(A, B) (((A) + ((B) / 2)) / (B)) - -/**@brief Check if the integer provided is a power of two. - * - * @param[in] A Number to be tested. - * - * @return true if value is power of two. - * @return false if value not power of two. - */ -#define IS_POWER_OF_TWO(A) ( ((A) != 0) && ((((A) - 1) & (A)) == 0) ) - -/**@brief To convert milliseconds to ticks. - * @param[in] TIME Number of milliseconds to convert. - * @param[in] RESOLUTION Unit to be converted to in [us/ticks]. - */ -#define MSEC_TO_UNITS(TIME, RESOLUTION) (((TIME) * 1000) / (RESOLUTION)) - - -/**@brief Perform integer division, making sure the result is rounded up. - * - * @details One typical use for this is to compute the number of objects with size B is needed to - * hold A number of bytes. - * - * @param[in] A Numerator. - * @param[in] B Denominator. - * - * @return Integer result of dividing A by B, rounded up. - */ -#define CEIL_DIV(A, B) \ - /*lint -save -e573 */ \ - ((((A) - 1) / (B)) + 1) \ - /*lint -restore */ - -/**@brief Function for encoding a uint16 value. - * - * @param[in] value Value to be encoded. - * @param[out] p_encoded_data Buffer where the encoded data is to be written. - * - * @return Number of bytes written. - */ -static __INLINE uint8_t uint16_encode(uint16_t value, uint8_t * p_encoded_data) -{ - p_encoded_data[0] = (uint8_t) ((value & 0x00FF) >> 0); - p_encoded_data[1] = (uint8_t) ((value & 0xFF00) >> 8); - return sizeof(uint16_t); -} - -/**@brief Function for encoding a uint32 value. - * - * @param[in] value Value to be encoded. - * @param[out] p_encoded_data Buffer where the encoded data is to be written. - * - * @return Number of bytes written. - */ -static __INLINE uint8_t uint32_encode(uint32_t value, uint8_t * p_encoded_data) -{ - p_encoded_data[0] = (uint8_t) ((value & 0x000000FF) >> 0); - p_encoded_data[1] = (uint8_t) ((value & 0x0000FF00) >> 8); - p_encoded_data[2] = (uint8_t) ((value & 0x00FF0000) >> 16); - p_encoded_data[3] = (uint8_t) ((value & 0xFF000000) >> 24); - return sizeof(uint32_t); -} - -/**@brief Function for decoding a uint16 value. - * - * @param[in] p_encoded_data Buffer where the encoded data is stored. - * - * @return Decoded value. - */ -static __INLINE uint16_t uint16_decode(const uint8_t * p_encoded_data) -{ - return ( (((uint16_t)((uint8_t *)p_encoded_data)[0])) | - (((uint16_t)((uint8_t *)p_encoded_data)[1]) << 8 )); -} - -/**@brief Function for decoding a uint32 value. - * - * @param[in] p_encoded_data Buffer where the encoded data is stored. - * - * @return Decoded value. - */ -static __INLINE uint32_t uint32_decode(const uint8_t * p_encoded_data) -{ - return ( (((uint32_t)((uint8_t *)p_encoded_data)[0]) << 0) | - (((uint32_t)((uint8_t *)p_encoded_data)[1]) << 8) | - (((uint32_t)((uint8_t *)p_encoded_data)[2]) << 16) | - (((uint32_t)((uint8_t *)p_encoded_data)[3]) << 24 )); -} - -/** @brief Function for converting the input voltage (in milli volts) into percentage of 3.0 Volts. - * - * @details The calculation is based on a linearized version of the battery's discharge - * curve. 3.0V returns 100% battery level. The limit for power failure is 2.1V and - * is considered to be the lower boundary. - * - * The discharge curve for CR2032 is non-linear. In this model it is split into - * 4 linear sections: - * - Section 1: 3.0V - 2.9V = 100% - 42% (58% drop on 100 mV) - * - Section 2: 2.9V - 2.74V = 42% - 18% (24% drop on 160 mV) - * - Section 3: 2.74V - 2.44V = 18% - 6% (12% drop on 300 mV) - * - Section 4: 2.44V - 2.1V = 6% - 0% (6% drop on 340 mV) - * - * These numbers are by no means accurate. Temperature and - * load in the actual application is not accounted for! - * - * @param[in] mvolts The voltage in mV - * - * @return Battery level in percent. -*/ -static __INLINE uint8_t battery_level_in_percent(const uint16_t mvolts) -{ - uint8_t battery_level; - - if (mvolts >= 3000) - { - battery_level = 100; - } - else if (mvolts > 2900) - { - battery_level = 100 - ((3000 - mvolts) * 58) / 100; - } - else if (mvolts > 2740) - { - battery_level = 42 - ((2900 - mvolts) * 24) / 160; - } - else if (mvolts > 2440) - { - battery_level = 18 - ((2740 - mvolts) * 12) / 300; - } - else if (mvolts > 2100) - { - battery_level = 6 - ((2440 - mvolts) * 6) / 340; - } - else - { - battery_level = 0; - } - - return battery_level; -} - -/**@brief Function for checking if a pointer value is aligned to a 4 byte boundary. - * - * @param[in] p Pointer value to be checked. - * - * @return TRUE if pointer is aligned to a 4 byte boundary, FALSE otherwise. - */ -static __INLINE bool is_word_aligned(void * p) -{ - return (((uintptr_t)p & 0x03) == 0); -} - -#endif // APP_UTIL_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble.h new file mode 100644 index 0000000000..593be948e0 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble.h @@ -0,0 +1,632 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 BLE_COMMON BLE SoftDevice Common + @{ + @defgroup ble_api Events, type definitions and API calls + @{ + + @brief Module independent events, type definitions and API calls for the BLE SoftDevice. + + */ + +#ifndef BLE_H__ +#define BLE_H__ + +#include "ble_ranges.h" +#include "ble_types.h" +#include "ble_gap.h" +#include "ble_l2cap.h" +#include "ble_gatt.h" +#include "ble_gattc.h" +#include "ble_gatts.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup BLE_COMMON_ENUMERATIONS Enumerations + * @{ */ + +/** + * @brief Common API SVC numbers. + */ +enum BLE_COMMON_SVCS +{ + SD_BLE_ENABLE = BLE_SVC_BASE, /**< Enable and initialize the BLE stack */ + SD_BLE_EVT_GET, /**< Get an event from the pending events queue. */ + SD_BLE_TX_PACKET_COUNT_GET, /**< Get the total number of available application transmission packets for a particular connection. */ + SD_BLE_UUID_VS_ADD, /**< Add a Vendor Specific UUID. */ + SD_BLE_UUID_DECODE, /**< Decode UUID bytes. */ + SD_BLE_UUID_ENCODE, /**< Encode UUID bytes. */ + SD_BLE_VERSION_GET, /**< Get the local version information (company id, Link Layer Version, Link Layer Subversion). */ + SD_BLE_USER_MEM_REPLY, /**< User Memory Reply. */ + SD_BLE_OPT_SET, /**< Set a BLE option. */ + SD_BLE_OPT_GET, /**< Get a BLE option. */ +}; + + /** + * @brief BLE Module Independent Event IDs. + */ +enum BLE_COMMON_EVTS +{ + BLE_EVT_TX_COMPLETE = BLE_EVT_BASE, /**< Transmission Complete. @ref ble_evt_tx_complete_t */ + BLE_EVT_USER_MEM_REQUEST, /**< User Memory request. @ref ble_evt_user_mem_request_t */ + BLE_EVT_USER_MEM_RELEASE /**< User Memory release. @ref ble_evt_user_mem_release_t */ +}; + +/**@brief BLE connection bandwidth types. + * Bandwidth types supported by the SoftDevice in packets per connection interval. + */ +enum BLE_CONN_BWS +{ + BLE_CONN_BW_NONE = 0, + BLE_CONN_BW_LOW, + BLE_CONN_BW_MID, + BLE_CONN_BW_HIGH +}; + +/**@brief Common Option IDs. + * IDs that uniquely identify a common option. + */ +enum BLE_COMMON_OPTS +{ + BLE_COMMON_OPT_CONN_BW = BLE_OPT_BASE, /**< Bandwidth configuration @ref ble_common_opt_conn_bw_t */ + BLE_COMMON_OPT_PA_LNA /**< PA and LNA options */ +}; + +/** @} */ + +/** @addtogroup BLE_COMMON_DEFINES Defines + * @{ */ + +/** @brief Required pointer alignment for BLE Events. +*/ +#define BLE_EVTS_PTR_ALIGNMENT 4 + +/** @defgroup BLE_USER_MEM_TYPES User Memory Types + * @{ */ +#define BLE_USER_MEM_TYPE_INVALID 0x00 /**< Invalid User Memory Types. */ +#define BLE_USER_MEM_TYPE_GATTS_QUEUED_WRITES 0x01 /**< User Memory for GATTS queued writes. */ +/** @} */ + +/** @defgroup BLE_UUID_VS_COUNTS Vendor Specific UUID counts + * @{ + */ +#define BLE_UUID_VS_COUNT_MIN 1 /**< Minimum VS UUID count. */ +#define BLE_UUID_VS_COUNT_DEFAULT 0 /**< Use the default VS UUID count (10 for this version of the SoftDevice). */ +/** @} */ + +/** @} */ + +/** @addtogroup BLE_COMMON_STRUCTURES Structures + * @{ */ + +/**@brief User Memory Block. */ +typedef struct +{ + uint8_t *p_mem; /**< Pointer to the start of the user memory block. */ + uint16_t len; /**< Length in bytes of the user memory block. */ +} ble_user_mem_block_t; + +/** + * @brief Event structure for @ref BLE_EVT_TX_COMPLETE. + */ +typedef struct +{ + uint8_t count; /**< Number of packets transmitted. */ +} ble_evt_tx_complete_t; + +/**@brief Event structure for @ref BLE_EVT_USER_MEM_REQUEST. */ +typedef struct +{ + uint8_t type; /**< User memory type, see @ref BLE_USER_MEM_TYPES. */ +} ble_evt_user_mem_request_t; + +/**@brief Event structure for @ref BLE_EVT_USER_MEM_RELEASE. */ +typedef struct +{ + uint8_t type; /**< User memory type, see @ref BLE_USER_MEM_TYPES. */ + ble_user_mem_block_t mem_block; /**< User memory block */ +} ble_evt_user_mem_release_t; + + +/**@brief Event structure for events not associated with a specific function module. */ +typedef struct +{ + uint16_t conn_handle; /**< Connection Handle on which this event occurred. */ + union + { + ble_evt_tx_complete_t tx_complete; /**< Transmission Complete. */ + ble_evt_user_mem_request_t user_mem_request; /**< User Memory Request Event Parameters. */ + ble_evt_user_mem_release_t user_mem_release; /**< User Memory Release Event Parameters. */ + } params; +} ble_common_evt_t; + +/**@brief BLE Event header. */ +typedef struct +{ + uint16_t evt_id; /**< Value from a BLE__EVT series. */ + uint16_t evt_len; /**< Length in octets including this header. */ +} ble_evt_hdr_t; + +/**@brief Common BLE Event type, wrapping the module specific event reports. */ +typedef struct +{ + ble_evt_hdr_t header; /**< Event header. */ + union + { + ble_common_evt_t common_evt; /**< Common Event, evt_id in BLE_EVT_* series. */ + ble_gap_evt_t gap_evt; /**< GAP originated event, evt_id in BLE_GAP_EVT_* series. */ + ble_l2cap_evt_t l2cap_evt; /**< L2CAP originated event, evt_id in BLE_L2CAP_EVT* series. */ + ble_gattc_evt_t gattc_evt; /**< GATT client originated event, evt_id in BLE_GATTC_EVT* series. */ + ble_gatts_evt_t gatts_evt; /**< GATT server originated event, evt_id in BLE_GATTS_EVT* series. */ + } evt; +} ble_evt_t; + + +/** + * @brief Version Information. + */ +typedef struct +{ + uint8_t version_number; /**< Link Layer Version number for BT 4.1 spec is 7 (https://www.bluetooth.org/en-us/specification/assigned-numbers/link-layer). */ + uint16_t company_id; /**< Company ID, Nordic Semiconductor's company ID is 89 (0x0059) (https://www.bluetooth.org/apps/content/Default.aspx?doc_id=49708). */ + uint16_t subversion_number; /**< Link Layer Sub Version number, corresponds to the SoftDevice Config ID or Firmware ID (FWID). */ +} ble_version_t; + +/* @brief: Configuration parameters for the PA and LNA. */ +typedef struct +{ + uint8_t enable :1; /**< Enable toggling for this amplifier */ + uint8_t active_high :1; /**< Set the pin to be active high */ + uint8_t gpio_pin :6; /**< The GPIO pin to toggle for this amplifier */ +} ble_pa_lna_cfg_t; + +/* + * @brief PA & LNA GPIO toggle configuration + * + * This option configures the SoftDevice to toggle pins when the radio is active for use with a power amplifier and/or + * a low noise amplifier. + * + * Toggling the pins is achieved by using two PPI channels and a GPIOTE channel. The hardware channel IDs are provided + * by the application and should be regarded as reserved as long as any PA/LNA toggling is enabled. + * + * @note @ref sd_ble_opt_get is not supported for this option. + * @note This feature is only supported for nRF52, on nRF51 @ref NRF_ERROR_NOT_SUPPORTED will always be returned. + * @note Setting this option while the radio is in use (i.e. any of the roles are active) may have undefined consequences + * and must be avoided by the application. + * + */ +typedef struct +{ + ble_pa_lna_cfg_t pa_cfg; /**< Power Amplifier configuration */ + ble_pa_lna_cfg_t lna_cfg; /**< Low Noise Amplifier configuration */ + + uint8_t ppi_ch_id_set; /**< PPI channel used for radio pin setting */ + uint8_t ppi_ch_id_clr; /**< PPI channel used for radio pin clearing */ + uint8_t gpiote_ch_id; /**< GPIOTE channel used for radio pin toggling */ +} ble_common_opt_pa_lna_t; + +/** + * @brief BLE connection bandwidth configuration parameters + */ +typedef struct +{ + uint8_t conn_bw_tx; /**< Connection bandwidth configuration for transmission, see @ref BLE_CONN_BWS.*/ + uint8_t conn_bw_rx; /**< Connection bandwidth configuration for reception, see @ref BLE_CONN_BWS.*/ +} ble_conn_bw_t; + +/**@brief BLE connection specific bandwidth configuration parameters. + * + * This can be used with @ref sd_ble_opt_set to set the bandwidth configuration to be used when creating connections. + * + * Call @ref sd_ble_opt_set with this option prior to calling @ref sd_ble_gap_adv_start or @ref sd_ble_gap_connect. + * + * The bandwidth configurations set via @ref sd_ble_opt_set are maintained separately for central and peripheral + * connections. The given configurations are used for all future connections of the role indicated in this structure + * unless they are changed by subsequent @ref sd_ble_opt_set calls. + * + * @note When this option is not used, the SoftDevice will use the default options: + * - @ref BLE_CONN_BW_HIGH for @ref BLE_GAP_ROLE_PERIPH connections (both transmission and reception). + * - @ref BLE_CONN_BW_MID for @ref BLE_GAP_ROLE_CENTRAL connections (both transmisison and reception). + * This option allows the application to selectively override these defaults for each role. + * + * @note The global memory pool configuration can be set with the @ref ble_conn_bw_counts_t configuration parameter, which + * is provided to @ref sd_ble_enable. + * + * @note Please refer to SoftDevice Specification for more information on bandwidth configuration. + * + * @mscs + * @mmsc{@ref BLE_COMMON_CONF_BW} + * @endmscs + * + * @retval ::NRF_SUCCESS Set successfully. + * @retval ::BLE_ERROR_INVALID_ROLE The role is invalid. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid bandwidth configuration parameters. + * @retval ::NRF_ERROR_NOT_SUPPORTED If the combination of role and bandwidth configuration is not supported. + */ +typedef struct +{ + uint8_t role; /**< BLE role of the connection, see @ref BLE_GAP_ROLES. */ + ble_conn_bw_t conn_bw; /**< Bandwidth configuration parameters. */ +} ble_common_opt_conn_bw_t; + +/**@brief Option structure for common options. */ +typedef union +{ + ble_common_opt_conn_bw_t conn_bw; /**< Parameters for the connection bandwidth option. */ + ble_common_opt_pa_lna_t pa_lna; /**< Parameters for controlling PA and LNA pin toggling. */ +} ble_common_opt_t; + +/**@brief Common BLE Option type, wrapping the module specific options. */ +typedef union +{ + ble_common_opt_t common_opt; /**< COMMON options, opt_id in @ref BLE_COMMON_OPTS series. */ + ble_gap_opt_t gap_opt; /**< GAP option, opt_id in @ref BLE_GAP_OPTS series. */ +} ble_opt_t; + +/** + * @brief BLE bandwidth count parameters + * + * These parameters are used to configure the memory pools allocated within the SoftDevice for application packets + * (both transmission and reception) for all connections. + * + * @note The sum of all three counts must add up to the sum of @ref ble_gap_enable_params_t::central_conn_count and + * @ref ble_gap_enable_params_t::periph_conn_count in @ref ble_gap_enable_params_t. + */ +typedef struct { + uint8_t high_count; /**< Total number of high bandwidth TX or RX memory pools available to the application at runtime for all active connections. */ + uint8_t mid_count; /**< Total number of medium bandwidth TX or RX memory pools available to the application at runtime for all active connections. */ + uint8_t low_count; /**< Total number of low bandwidth TX or RX memory pools available to the application at runtime for all active connections. */ +} ble_conn_bw_count_t; + +/** + * @brief BLE bandwidth global memory pool configuration parameters + * + * These configuration parameters are used to set the amount of memory dedicated to application packets for + * all connections. The application should specify the most demanding configuration for the intended use. + * + * Please refer to the SoftDevice Specification for more information on bandwidth configuration. + * + * @note Each connection created at runtime requires both a TX and an RX memory pool. By the use of these configuration + * parameters, the application can decide the size and total number of the global memory pools that will be later + * available for connection creation. + * + * @mscs + * @mmsc{@ref BLE_COMMON_CONF_BW} + * @endmscs + * + */ +typedef struct { + ble_conn_bw_count_t tx_counts; /**< Global memory pool configuration for transmission.*/ + ble_conn_bw_count_t rx_counts; /**< Global memory pool configuration for reception.*/ +} ble_conn_bw_counts_t; + +/** + * @brief BLE Common Initialization parameters. + * + * @note If @ref p_conn_bw_counts is NULL the SoftDevice will assume default bandwidth configuration for all connections. + * To fit a custom bandwidth configuration requirement, the application developer may have to specify a custom memory + * pool configuration here. See @ref ble_common_opt_conn_bw_t for bandwidth configuration of individual connections. + * Please refer to the SoftDevice Specification for more information on bandwidth configuration. + */ +typedef struct +{ + uint16_t vs_uuid_count; /**< Maximum number of 128-bit, Vendor Specific UUID bases to allocate. */ + ble_conn_bw_counts_t *p_conn_bw_counts; /**< Bandwidth configuration parameters or NULL for defaults. */ +} ble_common_enable_params_t; + +/** + * @brief BLE Initialization parameters. + */ +typedef struct +{ + ble_common_enable_params_t common_enable_params; /**< Common init parameters @ref ble_common_enable_params_t. */ + ble_gap_enable_params_t gap_enable_params; /**< GAP init parameters @ref ble_gap_enable_params_t. */ + ble_gatts_enable_params_t gatts_enable_params; /**< GATTS init parameters @ref ble_gatts_enable_params_t. */ +} ble_enable_params_t; + +/** @} */ + +/** @addtogroup BLE_COMMON_FUNCTIONS Functions + * @{ */ + +/**@brief Enable the BLE stack + * + * @param[in, out] p_ble_enable_params Pointer to ble_enable_params_t + * @param[in, out] p_app_ram_base Pointer to a variable containing the start address of the application RAM region + * (APP_RAM_BASE). On return, this will contain the minimum start address of the application RAM region required by the + * SoftDevice for this configuration. Calling @ref sd_ble_enable() with *p_app_ram_base set to 0 can be used during + * development to find out how much memory a specific configuration will need. + * + * @note The memory requirement for a specific configuration will not increase between SoftDevices with the same major + * version number. + * + * @note At runtime the IC's RAM is split into 2 regions: The SoftDevice RAM region is located between 0x20000000 and + * APP_RAM_BASE-1 and the application's RAM region is located between APP_RAM_BASE and the start of the call stack. + * + * @details This call initializes the BLE stack, no other BLE related function can be called before this one. + * + * @mscs + * @mmsc{@ref BLE_COMMON_ENABLE} + * @endmscs + * + * @retval ::NRF_SUCCESS The BLE stack has been initialized successfully. + * @retval ::NRF_ERROR_INVALID_STATE The BLE stack had already been initialized and cannot be reinitialized. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid or not sufficiently aligned pointer supplied. + * @retval ::NRF_ERROR_INVALID_LENGTH The specified Attribute Table size is either too small or not a multiple of 4. + * The minimum acceptable size is defined by @ref BLE_GATTS_ATTR_TAB_SIZE_MIN. + * @retval ::NRF_ERROR_INVALID_PARAM Incorrectly configured VS UUID count or connection count parameters. + * @retval ::NRF_ERROR_NO_MEM The amount of memory assigned to the SoftDevice by *p_app_ram_base is not + * large enough to fit this configuration's memory requirement. Check *p_app_ram_base + * and set the start address of the application RAM region accordingly. + * @retval ::NRF_ERROR_CONN_COUNT The requested number of connections exceeds the maximum supported by the SoftDevice. + * Please refer to the SoftDevice Specification for more information on role configuration. + */ +SVCALL(SD_BLE_ENABLE, uint32_t, sd_ble_enable(ble_enable_params_t * p_ble_enable_params, uint32_t * p_app_ram_base)); + +/**@brief Get an event from the pending events queue. + * + * @param[out] p_dest Pointer to buffer to be filled in with an event, or NULL to retrieve the event length. + * This buffer must be 4-byte aligned in memory. + * @param[in, out] p_len Pointer the length of the buffer, on return it is filled with the event length. + * + * @details This call allows the application to pull a BLE event from the BLE stack. The application is signaled that + * an event is available from the BLE stack by the triggering of the SD_EVT_IRQn interrupt. + * The application is free to choose whether to call this function from thread mode (main context) or directly from the + * Interrupt Service Routine that maps to SD_EVT_IRQn. In any case however, and because the BLE stack runs at a higher + * priority than the application, this function should be called in a loop (until @ref NRF_ERROR_NOT_FOUND is returned) + * every time SD_EVT_IRQn is raised to ensure that all available events are pulled from the BLE stack. Failure to do so + * could potentially leave events in the internal queue without the application being aware of this fact. Sizing the + * p_dest buffer is equally important, since the application needs to provide all the memory necessary for the event to + * be copied into application memory. If the buffer provided is not large enough to fit the entire contents of the event, + * @ref NRF_ERROR_DATA_SIZE will be returned and the application can then call again with a larger buffer size. + * Please note that because of the variable length nature of some events, sizeof(ble_evt_t) will not always be large + * enough to fit certain events, and so it is the application's responsibility to provide an amount of memory large + * enough so that the relevant event is copied in full. The application may "peek" the event length by providing p_dest + * as a NULL pointer and inspecting the value of *p_len upon return: + * + * \code + * uint16_t len; + * errcode = sd_ble_evt_get(NULL, &len); + * \endcode + * + * @note The pointer supplied must be aligned to the extend defined by @ref BLE_EVTS_PTR_ALIGNMENT + * + * @mscs + * @mmsc{@ref BLE_COMMON_IRQ_EVT_MSC} + * @mmsc{@ref BLE_COMMON_THREAD_EVT_MSC} + * @endmscs + * + * @retval ::NRF_SUCCESS Event pulled and stored into the supplied buffer. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid or not sufficiently aligned pointer supplied. + * @retval ::NRF_ERROR_NOT_FOUND No events ready to be pulled. + * @retval ::NRF_ERROR_DATA_SIZE Event ready but could not fit into the supplied buffer. + */ +SVCALL(SD_BLE_EVT_GET, uint32_t, sd_ble_evt_get(uint8_t *p_dest, uint16_t *p_len)); + + +/**@brief Get the total number of available guaranteed application transmission packets for a particular connection. + * + * @details This call allows the application to obtain the total number of guaranteed application transmission packets + * available for a connection. Please note that this does not return the number of free packets, but rather the total + * amount of them for that particular connection. The application has two options to handle transmitting application packets: + * - Use a simple arithmetic calculation: after connection creation time the application should use this function to + * find out the total amount of guaranteed packets available to it and store it in a variable. + * Every time a packet is successfully queued for a transmission on this connection using any of the exposed functions in + * this BLE API, the application should decrement that variable. Conversely, whenever a @ref BLE_EVT_TX_COMPLETE event + * with the conn_handle matching the particular connection is received by the application, it should retrieve the count + * field in such event and add that number to the same variable storing the number of available guaranteed packets. This + * mechanism allows the application to be aware at any time of the number of guaranteed application packets available for + * each of the active connections, and therefore it can know with certainty whether it is possible to send more data or + * it has to wait for a @ref BLE_EVT_TX_COMPLETE event before it proceeds. + * The application can still pursue transmissions when the number of guaranteed application packets available is smaller + * than or equal to zero, but successful queuing of the tranmsission is not guaranteed. + * - Choose to simply not keep track of available packets at all, and instead handle the @ref BLE_ERROR_NO_TX_PACKETS error + * by queueing the packet to be transmitted and try again as soon as a @ref BLE_EVT_TX_COMPLETE event arrives. + * + * The API functions that may consume an application packet depending on the parameters supplied to them can be found below: + * - @ref sd_ble_gattc_write (write without response only) + * - @ref sd_ble_gatts_hvx (notifications only) + * - @ref sd_ble_l2cap_tx (all packets) + * + * @param[in] conn_handle Connection handle. + * @param[out] p_count Pointer to a uint8_t which will contain the number of application transmission packets upon + * successful return. + * @mscs + * @mmsc{@ref BLE_COMMON_APP_BUFF_MSC} + * @endmscs + * + * @retval ::NRF_SUCCESS Number of application transmission packets retrieved successfully. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + */ +SVCALL(SD_BLE_TX_PACKET_COUNT_GET, uint32_t, sd_ble_tx_packet_count_get(uint16_t conn_handle, uint8_t *p_count)); + + +/**@brief Add a Vendor Specific UUID. + * + * @details This call enables the application to add a vendor specific UUID to the BLE stack's table, for later use + * all other modules and APIs. This then allows the application to use the shorter, 24-bit @ref ble_uuid_t format + * when dealing with both 16-bit and 128-bit UUIDs without having to check for lengths and having split code paths. + * The way that this is accomplished is by extending the grouping mechanism that the Bluetooth SIG standard base + * UUID uses for all other 128-bit UUIDs. The type field in the @ref ble_uuid_t structure is an index (relative to + * @ref BLE_UUID_TYPE_VENDOR_BEGIN) to the table populated by multiple calls to this function, and the uuid field + * in the same structure contains the 2 bytes at indices 12 and 13. The number of possible 128-bit UUIDs available to + * the application is therefore the number of Vendor Specific UUIDs added with the help of this function times 65536, + * although restricted to modifying bytes 12 and 13 for each of the entries in the supplied array. + * + * @note Bytes 12 and 13 of the provided UUID will not be used internally, since those are always replaced by + * the 16-bit uuid field in @ref ble_uuid_t. + * + * @note If a UUID is already present in the BLE stack's internal table, the corresponding index will be returned in + * p_uuid_type along with an NRF_SUCCESS error code. + * + * @param[in] p_vs_uuid Pointer to a 16-octet (128-bit) little endian Vendor Specific UUID disregarding + * bytes 12 and 13. + * @param[out] p_uuid_type Pointer to a uint8_t where the type field in @ref ble_uuid_t corresponding to this UUID will be stored. + * + * @retval ::NRF_SUCCESS Successfully added the Vendor Specific UUID. + * @retval ::NRF_ERROR_INVALID_ADDR If p_vs_uuid or p_uuid_type is NULL or invalid. + * @retval ::NRF_ERROR_NO_MEM If there are no more free slots for VS UUIDs. + */ +SVCALL(SD_BLE_UUID_VS_ADD, uint32_t, sd_ble_uuid_vs_add(ble_uuid128_t const *p_vs_uuid, uint8_t *p_uuid_type)); + + +/** @brief Decode little endian raw UUID bytes (16-bit or 128-bit) into a 24 bit @ref ble_uuid_t structure. + * + * @details The raw UUID bytes excluding bytes 12 and 13 (i.e. bytes 0-11 and 14-15) of p_uuid_le are compared + * to the corresponding ones in each entry of the table of vendor specific UUIDs populated with @ref sd_ble_uuid_vs_add + * to look for a match. If there is such a match, bytes 12 and 13 are returned as p_uuid->uuid and the index + * relative to @ref BLE_UUID_TYPE_VENDOR_BEGIN as p_uuid->type. + * + * @note If the UUID length supplied is 2, then the type set by this call will always be @ref BLE_UUID_TYPE_BLE. + * + * @param[in] uuid_le_len Length in bytes of the buffer pointed to by p_uuid_le (must be 2 or 16 bytes). + * @param[in] p_uuid_le Pointer pointing to little endian raw UUID bytes. + * @param[out] p_uuid Pointer to a @ref ble_uuid_t structure to be filled in. + * + * @retval ::NRF_SUCCESS Successfully decoded into the @ref ble_uuid_t structure. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_LENGTH Invalid UUID length. + * @retval ::NRF_ERROR_NOT_FOUND For a 128-bit UUID, no match in the populated table of UUIDs. + */ +SVCALL(SD_BLE_UUID_DECODE, uint32_t, sd_ble_uuid_decode(uint8_t uuid_le_len, uint8_t const *p_uuid_le, ble_uuid_t *p_uuid)); + + +/** @brief Encode a @ref ble_uuid_t structure into little endian raw UUID bytes (16-bit or 128-bit). + * + * @note The pointer to the destination buffer p_uuid_le may be NULL, in which case only the validity and size of p_uuid is computed. + * + * @param[in] p_uuid Pointer to a @ref ble_uuid_t structure that will be encoded into bytes. + * @param[out] p_uuid_le_len Pointer to a uint8_t that will be filled with the encoded length (2 or 16 bytes). + * @param[out] p_uuid_le Pointer to a buffer where the little endian raw UUID bytes (2 or 16) will be stored. + * + * @retval ::NRF_SUCCESS Successfully encoded into the buffer. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid UUID type. + */ +SVCALL(SD_BLE_UUID_ENCODE, uint32_t, sd_ble_uuid_encode(ble_uuid_t const *p_uuid, uint8_t *p_uuid_le_len, uint8_t *p_uuid_le)); + + +/**@brief Get Version Information. + * + * @details This call allows the application to get the BLE stack version information. + * + * @param[out] p_version Pointer to a ble_version_t structure to be filled in. + * + * @retval ::NRF_SUCCESS Version information stored successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_BUSY The BLE stack is busy (typically doing a locally-initiated disconnection procedure). + */ +SVCALL(SD_BLE_VERSION_GET, uint32_t, sd_ble_version_get(ble_version_t *p_version)); + + +/**@brief Provide a user memory block. + * + * @note This call can only be used as a response to a @ref BLE_EVT_USER_MEM_REQUEST event issued to the application. + * + * @param[in] conn_handle Connection handle. + * @param[in,out] p_block Pointer to a user memory block structure. + * + * @mscs + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_PEER_CANCEL_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_AUTH_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_NOAUTH_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_BUF_AUTH_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_BUF_NOAUTH_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_QUEUE_FULL_MSC} + * @endmscs + * + * @retval ::NRF_SUCCESS Successfully queued a response to the peer. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection state or no execute write request pending. + * @retval ::NRF_ERROR_BUSY The BLE stack is busy. Retry at later time. + */ +SVCALL(SD_BLE_USER_MEM_REPLY, uint32_t, sd_ble_user_mem_reply(uint16_t conn_handle, ble_user_mem_block_t const *p_block)); + +/**@brief Set a BLE option. + * + * @details This call allows the application to set the value of an option. + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_BONDING_STATIC_PK_MSC} + * @mmsc{@ref BLE_COMMON_CONF_BW} + * @endmscs + * + * @param[in] opt_id Option ID, see @ref BLE_COMMON_OPTS and @ref BLE_GAP_OPTS. + * @param[in] p_opt Pointer to a ble_opt_t structure containing the option value. + * + * @retval ::NRF_SUCCESS Option set successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, check parameter limits and constraints. + * @retval ::NRF_ERROR_INVALID_STATE Unable to set the parameter at this time. + * @retval ::NRF_ERROR_BUSY The BLE stack is busy or the previous procedure has not completed. + */ +SVCALL(SD_BLE_OPT_SET, uint32_t, sd_ble_opt_set(uint32_t opt_id, ble_opt_t const *p_opt)); + + +/**@brief Get a BLE option. + * + * @details This call allows the application to retrieve the value of an option. + * + * @param[in] opt_id Option ID, see @ref BLE_COMMON_OPTS and @ref BLE_GAP_OPTS. + * @param[out] p_opt Pointer to a ble_opt_t structure to be filled in. + * + * @retval ::NRF_SUCCESS Option retrieved successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, check parameter limits and constraints. + * @retval ::NRF_ERROR_INVALID_STATE Unable to retrieve the parameter at this time. + * @retval ::NRF_ERROR_BUSY The BLE stack is busy or the previous procedure has not completed. + * @retval ::NRF_ERROR_NOT_SUPPORTED This option is not supported. + * + */ +SVCALL(SD_BLE_OPT_GET, uint32_t, sd_ble_opt_get(uint32_t opt_id, ble_opt_t *p_opt)); + +/** @} */ +#ifdef __cplusplus +} +#endif +#endif /* BLE_H__ */ + +/** + @} + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_err.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_err.h new file mode 100644 index 0000000000..2332267905 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_err.h @@ -0,0 +1,90 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 BLE_COMMON + @{ + @addtogroup nrf_error + @{ + @ingroup BLE_COMMON + @} + + @defgroup ble_err General error codes + @{ + + @brief General error code definitions for the BLE API. + + @ingroup BLE_COMMON +*/ +#ifndef NRF_BLE_ERR_H__ +#define NRF_BLE_ERR_H__ + +#include "nrf_error.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* @defgroup BLE_ERRORS Error Codes + * @{ */ +#define BLE_ERROR_NOT_ENABLED (NRF_ERROR_STK_BASE_NUM+0x001) /**< @ref sd_ble_enable has not been called. */ +#define BLE_ERROR_INVALID_CONN_HANDLE (NRF_ERROR_STK_BASE_NUM+0x002) /**< Invalid connection handle. */ +#define BLE_ERROR_INVALID_ATTR_HANDLE (NRF_ERROR_STK_BASE_NUM+0x003) /**< Invalid attribute handle. */ +#define BLE_ERROR_NO_TX_PACKETS (NRF_ERROR_STK_BASE_NUM+0x004) /**< Not enough application packets available on this connection. */ +#define BLE_ERROR_INVALID_ROLE (NRF_ERROR_STK_BASE_NUM+0x005) /**< Invalid role. */ +/** @} */ + + +/** @defgroup BLE_ERROR_SUBRANGES Module specific error code subranges + * @brief Assignment of subranges for module specific error codes. + * @note For specific error codes, see ble_.h or ble_error_.h. + * @{ */ +#define NRF_L2CAP_ERR_BASE (NRF_ERROR_STK_BASE_NUM+0x100) /**< L2CAP specific errors. */ +#define NRF_GAP_ERR_BASE (NRF_ERROR_STK_BASE_NUM+0x200) /**< GAP specific errors. */ +#define NRF_GATTC_ERR_BASE (NRF_ERROR_STK_BASE_NUM+0x300) /**< GATT client specific errors. */ +#define NRF_GATTS_ERR_BASE (NRF_ERROR_STK_BASE_NUM+0x400) /**< GATT server specific errors. */ +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif + + +/** + @} + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gap.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gap.h new file mode 100644 index 0000000000..ad0fd304db --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gap.h @@ -0,0 +1,1742 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 BLE_GAP Generic Access Profile (GAP) + @{ + @brief Definitions and prototypes for the GAP interface. + */ + +#ifndef BLE_GAP_H__ +#define BLE_GAP_H__ + +#include "ble_types.h" +#include "ble_ranges.h" +#include "nrf_svc.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/**@addtogroup BLE_GAP_ENUMERATIONS Enumerations + * @{ */ + +/**@brief GAP API SVC numbers. + */ +enum BLE_GAP_SVCS +{ + SD_BLE_GAP_ADDRESS_SET = BLE_GAP_SVC_BASE, /**< Set own Bluetooth Address. */ + SD_BLE_GAP_ADDRESS_GET, /**< Get own Bluetooth Address. */ + SD_BLE_GAP_ADV_DATA_SET, /**< Set Advertising Data. */ + SD_BLE_GAP_ADV_START, /**< Start Advertising. */ + SD_BLE_GAP_ADV_STOP, /**< Stop Advertising. */ + SD_BLE_GAP_CONN_PARAM_UPDATE, /**< Connection Parameter Update. */ + SD_BLE_GAP_DISCONNECT, /**< Disconnect. */ + SD_BLE_GAP_TX_POWER_SET, /**< Set TX Power. */ + SD_BLE_GAP_APPEARANCE_SET, /**< Set Appearance. */ + SD_BLE_GAP_APPEARANCE_GET, /**< Get Appearance. */ + SD_BLE_GAP_PPCP_SET, /**< Set PPCP. */ + SD_BLE_GAP_PPCP_GET, /**< Get PPCP. */ + SD_BLE_GAP_DEVICE_NAME_SET, /**< Set Device Name. */ + SD_BLE_GAP_DEVICE_NAME_GET, /**< Get Device Name. */ + SD_BLE_GAP_AUTHENTICATE, /**< Initiate Pairing/Bonding. */ + SD_BLE_GAP_SEC_PARAMS_REPLY, /**< Reply with Security Parameters. */ + SD_BLE_GAP_AUTH_KEY_REPLY, /**< Reply with an authentication key. */ + SD_BLE_GAP_LESC_DHKEY_REPLY, /**< Reply with an LE Secure Connections DHKey. */ + SD_BLE_GAP_KEYPRESS_NOTIFY, /**< Notify of a keypress during an authentication procedure. */ + SD_BLE_GAP_LESC_OOB_DATA_GET, /**< Get the local LE Secure Connections OOB data. */ + SD_BLE_GAP_LESC_OOB_DATA_SET, /**< Set the remote LE Secure Connections OOB data. */ + SD_BLE_GAP_ENCRYPT, /**< Initiate encryption procedure. */ + SD_BLE_GAP_SEC_INFO_REPLY, /**< Reply with Security Information. */ + SD_BLE_GAP_CONN_SEC_GET, /**< Obtain connection security level. */ + SD_BLE_GAP_RSSI_START, /**< Start reporting of changes in RSSI. */ + SD_BLE_GAP_RSSI_STOP, /**< Stop reporting of changes in RSSI. */ + SD_BLE_GAP_SCAN_START, /**< Start Scanning. */ + SD_BLE_GAP_SCAN_STOP, /**< Stop Scanning. */ + SD_BLE_GAP_CONNECT, /**< Connect. */ + SD_BLE_GAP_CONNECT_CANCEL, /**< Cancel ongoing connection procedure. */ + SD_BLE_GAP_RSSI_GET, /**< Get the last RSSI sample. */ +}; + +/**@brief GAP Event IDs. + * IDs that uniquely identify an event coming from the stack to the application. + */ +enum BLE_GAP_EVTS +{ + BLE_GAP_EVT_CONNECTED = BLE_GAP_EVT_BASE, /**< Connection established. \n See @ref ble_gap_evt_connected_t. */ + BLE_GAP_EVT_DISCONNECTED, /**< Disconnected from peer. \n See @ref ble_gap_evt_disconnected_t. */ + BLE_GAP_EVT_CONN_PARAM_UPDATE, /**< Connection Parameters updated. \n See @ref ble_gap_evt_conn_param_update_t. */ + BLE_GAP_EVT_SEC_PARAMS_REQUEST, /**< Request to provide security parameters. \n Reply with @ref sd_ble_gap_sec_params_reply. \n See @ref ble_gap_evt_sec_params_request_t. */ + BLE_GAP_EVT_SEC_INFO_REQUEST, /**< Request to provide security information. \n Reply with @ref sd_ble_gap_sec_info_reply. \n See @ref ble_gap_evt_sec_info_request_t. */ + BLE_GAP_EVT_PASSKEY_DISPLAY, /**< Request to display a passkey to the user. \n In LESC Numeric Comparison, reply with @ref sd_ble_gap_auth_key_reply. \n See @ref ble_gap_evt_passkey_display_t. */ + BLE_GAP_EVT_KEY_PRESSED, /**< Notification of a keypress on the remote device.\n See @ref ble_gap_evt_key_pressed_t */ + BLE_GAP_EVT_AUTH_KEY_REQUEST, /**< Request to provide an authentication key. \n Reply with @ref sd_ble_gap_auth_key_reply. \n See @ref ble_gap_evt_auth_key_request_t. */ + BLE_GAP_EVT_LESC_DHKEY_REQUEST, /**< Request to calculate an LE Secure Connections DHKey. \n Reply with @ref sd_ble_gap_lesc_dhkey_reply. \n See @ref ble_gap_evt_lesc_dhkey_request_t */ + BLE_GAP_EVT_AUTH_STATUS, /**< Authentication procedure completed with status. \n See @ref ble_gap_evt_auth_status_t. */ + BLE_GAP_EVT_CONN_SEC_UPDATE, /**< Connection security updated. \n See @ref ble_gap_evt_conn_sec_update_t. */ + BLE_GAP_EVT_TIMEOUT, /**< Timeout expired. \n See @ref ble_gap_evt_timeout_t. */ + BLE_GAP_EVT_RSSI_CHANGED, /**< RSSI report. \n See @ref ble_gap_evt_rssi_changed_t. */ + BLE_GAP_EVT_ADV_REPORT, /**< Advertising report. \n See @ref ble_gap_evt_adv_report_t. */ + BLE_GAP_EVT_SEC_REQUEST, /**< Security Request. \n See @ref ble_gap_evt_sec_request_t. */ + BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST, /**< Connection Parameter Update Request. \n Reply with @ref sd_ble_gap_conn_param_update. \n See @ref ble_gap_evt_conn_param_update_request_t. */ + BLE_GAP_EVT_SCAN_REQ_REPORT, /**< Scan request report. \n See @ref ble_gap_evt_scan_req_report_t. */ +}; + +/**@brief GAP Option IDs. + * IDs that uniquely identify a GAP option. + */ +enum BLE_GAP_OPTS +{ + BLE_GAP_OPT_CH_MAP = BLE_GAP_OPT_BASE, /**< Channel Map. @ref ble_gap_opt_ch_map_t */ + BLE_GAP_OPT_LOCAL_CONN_LATENCY, /**< Local connection latency. @ref ble_gap_opt_local_conn_latency_t */ + BLE_GAP_OPT_PASSKEY, /**< Set passkey. @ref ble_gap_opt_passkey_t */ + BLE_GAP_OPT_PRIVACY, /**< Custom privacy. @ref ble_gap_opt_privacy_t */ + BLE_GAP_OPT_SCAN_REQ_REPORT, /**< Scan request report. @ref ble_gap_opt_scan_req_report_t */ + BLE_GAP_OPT_COMPAT_MODE /**< Compatibility mode. @ref ble_gap_opt_compat_mode_t */ +}; + +/** @} */ + +/**@addtogroup BLE_GAP_DEFINES Defines + * @{ */ + +/**@defgroup BLE_ERRORS_GAP SVC return values specific to GAP + * @{ */ +#define BLE_ERROR_GAP_UUID_LIST_MISMATCH (NRF_GAP_ERR_BASE + 0x000) /**< UUID list does not contain an integral number of UUIDs. */ +#define BLE_ERROR_GAP_DISCOVERABLE_WITH_WHITELIST (NRF_GAP_ERR_BASE + 0x001) /**< Use of Whitelist not permitted with discoverable advertising. */ +#define BLE_ERROR_GAP_INVALID_BLE_ADDR (NRF_GAP_ERR_BASE + 0x002) /**< The upper two bits of the address do not correspond to the specified address type. */ +#define BLE_ERROR_GAP_WHITELIST_IN_USE (NRF_GAP_ERR_BASE + 0x003) /**< Attempt to overwrite the whitelist while already in use by another operation. */ +/**@} */ + + +/**@defgroup BLE_GAP_ROLES GAP Roles + * @note Not explicitly used in peripheral API, but will be relevant for central API. + * @{ */ +#define BLE_GAP_ROLE_INVALID 0x0 /**< Invalid Role. */ +#define BLE_GAP_ROLE_PERIPH 0x1 /**< Peripheral Role. */ +#define BLE_GAP_ROLE_CENTRAL 0x2 /**< Central Role. */ +/**@} */ + + +/**@defgroup BLE_GAP_TIMEOUT_SOURCES GAP Timeout sources + * @{ */ +#define BLE_GAP_TIMEOUT_SRC_ADVERTISING 0x00 /**< Advertising timeout. */ +#define BLE_GAP_TIMEOUT_SRC_SECURITY_REQUEST 0x01 /**< Security request timeout. */ +#define BLE_GAP_TIMEOUT_SRC_SCAN 0x02 /**< Scanning timeout. */ +#define BLE_GAP_TIMEOUT_SRC_CONN 0x03 /**< Connection timeout. */ +/**@} */ + + +/**@defgroup BLE_GAP_ADDR_TYPES GAP Address types + * @{ */ +#define BLE_GAP_ADDR_TYPE_PUBLIC 0x00 /**< Public address. */ +#define BLE_GAP_ADDR_TYPE_RANDOM_STATIC 0x01 /**< Random Static address. */ +#define BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE 0x02 /**< Private Resolvable address. */ +#define BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE 0x03 /**< Private Non-Resolvable address. */ +/**@} */ + +/**@defgroup BLE_GAP_ADDR_CYCLE_MODES GAP Address cycle modes + * @{ */ +#define BLE_GAP_ADDR_CYCLE_MODE_NONE 0x00 /**< Set addresses directly, no automatic address cycling. */ +#define BLE_GAP_ADDR_CYCLE_MODE_AUTO 0x01 /**< Automatically generate and update private addresses. */ +/** @} */ + +/**@brief The default interval in seconds at which a private address is refreshed when address cycle mode is @ref BLE_GAP_ADDR_CYCLE_MODE_AUTO. */ +#define BLE_GAP_DEFAULT_PRIVATE_ADDR_CYCLE_INTERVAL_S (60 * 15) + +/** @brief BLE address length. */ +#define BLE_GAP_ADDR_LEN 6 + + +/**@defgroup BLE_GAP_AD_TYPE_DEFINITIONS GAP Advertising and Scan Response Data format + * @note Found at https://www.bluetooth.org/Technical/AssignedNumbers/generic_access_profile.htm + * @{ */ +#define BLE_GAP_AD_TYPE_FLAGS 0x01 /**< Flags for discoverability. */ +#define BLE_GAP_AD_TYPE_16BIT_SERVICE_UUID_MORE_AVAILABLE 0x02 /**< Partial list of 16 bit service UUIDs. */ +#define BLE_GAP_AD_TYPE_16BIT_SERVICE_UUID_COMPLETE 0x03 /**< Complete list of 16 bit service UUIDs. */ +#define BLE_GAP_AD_TYPE_32BIT_SERVICE_UUID_MORE_AVAILABLE 0x04 /**< Partial list of 32 bit service UUIDs. */ +#define BLE_GAP_AD_TYPE_32BIT_SERVICE_UUID_COMPLETE 0x05 /**< Complete list of 32 bit service UUIDs. */ +#define BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_MORE_AVAILABLE 0x06 /**< Partial list of 128 bit service UUIDs. */ +#define BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_COMPLETE 0x07 /**< Complete list of 128 bit service UUIDs. */ +#define BLE_GAP_AD_TYPE_SHORT_LOCAL_NAME 0x08 /**< Short local device name. */ +#define BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME 0x09 /**< Complete local device name. */ +#define BLE_GAP_AD_TYPE_TX_POWER_LEVEL 0x0A /**< Transmit power level. */ +#define BLE_GAP_AD_TYPE_CLASS_OF_DEVICE 0x0D /**< Class of device. */ +#define BLE_GAP_AD_TYPE_SIMPLE_PAIRING_HASH_C 0x0E /**< Simple Pairing Hash C. */ +#define BLE_GAP_AD_TYPE_SIMPLE_PAIRING_RANDOMIZER_R 0x0F /**< Simple Pairing Randomizer R. */ +#define BLE_GAP_AD_TYPE_SECURITY_MANAGER_TK_VALUE 0x10 /**< Security Manager TK Value. */ +#define BLE_GAP_AD_TYPE_SECURITY_MANAGER_OOB_FLAGS 0x11 /**< Security Manager Out Of Band Flags. */ +#define BLE_GAP_AD_TYPE_SLAVE_CONNECTION_INTERVAL_RANGE 0x12 /**< Slave Connection Interval Range. */ +#define BLE_GAP_AD_TYPE_SOLICITED_SERVICE_UUIDS_16BIT 0x14 /**< List of 16-bit Service Solicitation UUIDs. */ +#define BLE_GAP_AD_TYPE_SOLICITED_SERVICE_UUIDS_128BIT 0x15 /**< List of 128-bit Service Solicitation UUIDs. */ +#define BLE_GAP_AD_TYPE_SERVICE_DATA 0x16 /**< Service Data - 16-bit UUID. */ +#define BLE_GAP_AD_TYPE_PUBLIC_TARGET_ADDRESS 0x17 /**< Public Target Address. */ +#define BLE_GAP_AD_TYPE_RANDOM_TARGET_ADDRESS 0x18 /**< Random Target Address. */ +#define BLE_GAP_AD_TYPE_APPEARANCE 0x19 /**< Appearance. */ +#define BLE_GAP_AD_TYPE_ADVERTISING_INTERVAL 0x1A /**< Advertising Interval. */ +#define BLE_GAP_AD_TYPE_LE_BLUETOOTH_DEVICE_ADDRESS 0x1B /**< LE Bluetooth Device Address. */ +#define BLE_GAP_AD_TYPE_LE_ROLE 0x1C /**< LE Role. */ +#define BLE_GAP_AD_TYPE_SIMPLE_PAIRING_HASH_C256 0x1D /**< Simple Pairing Hash C-256. */ +#define BLE_GAP_AD_TYPE_SIMPLE_PAIRING_RANDOMIZER_R256 0x1E /**< Simple Pairing Randomizer R-256. */ +#define BLE_GAP_AD_TYPE_SERVICE_DATA_32BIT_UUID 0x20 /**< Service Data - 32-bit UUID. */ +#define BLE_GAP_AD_TYPE_SERVICE_DATA_128BIT_UUID 0x21 /**< Service Data - 128-bit UUID. */ +#define BLE_GAP_AD_TYPE_URI 0x24 /**< URI */ +#define BLE_GAP_AD_TYPE_3D_INFORMATION_DATA 0x3D /**< 3D Information Data. */ +#define BLE_GAP_AD_TYPE_MANUFACTURER_SPECIFIC_DATA 0xFF /**< Manufacturer Specific Data. */ +/**@} */ + + +/**@defgroup BLE_GAP_ADV_FLAGS GAP Advertisement Flags + * @{ */ +#define BLE_GAP_ADV_FLAG_LE_LIMITED_DISC_MODE (0x01) /**< LE Limited Discoverable Mode. */ +#define BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE (0x02) /**< LE General Discoverable Mode. */ +#define BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED (0x04) /**< BR/EDR not supported. */ +#define BLE_GAP_ADV_FLAG_LE_BR_EDR_CONTROLLER (0x08) /**< Simultaneous LE and BR/EDR, Controller. */ +#define BLE_GAP_ADV_FLAG_LE_BR_EDR_HOST (0x10) /**< Simultaneous LE and BR/EDR, Host. */ +#define BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE (BLE_GAP_ADV_FLAG_LE_LIMITED_DISC_MODE | BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED) /**< LE Limited Discoverable Mode, BR/EDR not supported. */ +#define BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE (BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE | BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED) /**< LE General Discoverable Mode, BR/EDR not supported. */ +/**@} */ + + +/**@defgroup BLE_GAP_ADV_INTERVALS GAP Advertising interval max and min + * @{ */ +#define BLE_GAP_ADV_INTERVAL_MIN 0x0020 /**< Minimum Advertising interval in 625 us units, i.e. 20 ms. */ +#define BLE_GAP_ADV_NONCON_INTERVAL_MIN 0x00A0 /**< Minimum Advertising interval in 625 us units for non connectable mode, i.e. 100 ms. */ +#define BLE_GAP_ADV_INTERVAL_MAX 0x4000 /**< Maximum Advertising interval in 625 us units, i.e. 10.24 s. */ + /**@} */ + + +/**@defgroup BLE_GAP_SCAN_INTERVALS GAP Scan interval max and min + * @{ */ +#define BLE_GAP_SCAN_INTERVAL_MIN 0x0004 /**< Minimum Scan interval in 625 us units, i.e. 2.5 ms. */ +#define BLE_GAP_SCAN_INTERVAL_MAX 0x4000 /**< Maximum Scan interval in 625 us units, i.e. 10.24 s. */ + /** @} */ + + +/**@defgroup BLE_GAP_SCAN_WINDOW GAP Scan window max and min + * @{ */ +#define BLE_GAP_SCAN_WINDOW_MIN 0x0004 /**< Minimum Scan window in 625 us units, i.e. 2.5 ms. */ +#define BLE_GAP_SCAN_WINDOW_MAX 0x4000 /**< Maximum Scan window in 625 us units, i.e. 10.24 s. */ + /** @} */ + + +/**@defgroup BLE_GAP_SCAN_TIMEOUT GAP Scan timeout max and min + * @{ */ +#define BLE_GAP_SCAN_TIMEOUT_MIN 0x0001 /**< Minimum Scan timeout in seconds. */ +#define BLE_GAP_SCAN_TIMEOUT_MAX 0xFFFF /**< Maximum Scan timeout in seconds. */ + /** @} */ + + +/**@brief Maximum size of advertising data in octets. */ +#define BLE_GAP_ADV_MAX_SIZE 31 + + +/**@defgroup BLE_GAP_ADV_TYPES GAP Advertising types + * @{ */ +#define BLE_GAP_ADV_TYPE_ADV_IND 0x00 /**< Connectable undirected. */ +#define BLE_GAP_ADV_TYPE_ADV_DIRECT_IND 0x01 /**< Connectable directed. */ +#define BLE_GAP_ADV_TYPE_ADV_SCAN_IND 0x02 /**< Scannable undirected. */ +#define BLE_GAP_ADV_TYPE_ADV_NONCONN_IND 0x03 /**< Non connectable undirected. */ +/**@} */ + + +/**@defgroup BLE_GAP_ADV_FILTER_POLICIES GAP Advertising filter policies + * @{ */ +#define BLE_GAP_ADV_FP_ANY 0x00 /**< Allow scan requests and connect requests from any device. */ +#define BLE_GAP_ADV_FP_FILTER_SCANREQ 0x01 /**< Filter scan requests with whitelist. */ +#define BLE_GAP_ADV_FP_FILTER_CONNREQ 0x02 /**< Filter connect requests with whitelist. */ +#define BLE_GAP_ADV_FP_FILTER_BOTH 0x03 /**< Filter both scan and connect requests with whitelist. */ +/**@} */ + + +/**@defgroup BLE_GAP_ADV_TIMEOUT_VALUES GAP Advertising timeout values + * @{ */ +#define BLE_GAP_ADV_TIMEOUT_LIMITED_MAX 180 /**< Maximum advertising time in limited discoverable mode (TGAP(lim_adv_timeout) = 180s). */ +#define BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED 0 /**< Unlimited advertising in general discoverable mode. */ +/**@} */ + + +/**@defgroup BLE_GAP_DISC_MODES GAP Discovery modes + * @{ */ +#define BLE_GAP_DISC_MODE_NOT_DISCOVERABLE 0x00 /**< Not discoverable discovery Mode. */ +#define BLE_GAP_DISC_MODE_LIMITED 0x01 /**< Limited Discovery Mode. */ +#define BLE_GAP_DISC_MODE_GENERAL 0x02 /**< General Discovery Mode. */ +/**@} */ + +/**@defgroup BLE_GAP_IO_CAPS GAP IO Capabilities + * @{ */ +#define BLE_GAP_IO_CAPS_DISPLAY_ONLY 0x00 /**< Display Only. */ +#define BLE_GAP_IO_CAPS_DISPLAY_YESNO 0x01 /**< Display and Yes/No entry. */ +#define BLE_GAP_IO_CAPS_KEYBOARD_ONLY 0x02 /**< Keyboard Only. */ +#define BLE_GAP_IO_CAPS_NONE 0x03 /**< No I/O capabilities. */ +#define BLE_GAP_IO_CAPS_KEYBOARD_DISPLAY 0x04 /**< Keyboard and Display. */ +/**@} */ + +/**@defgroup BLE_GAP_AUTH_KEY_TYPES GAP Authentication Key Types + * @{ */ +#define BLE_GAP_AUTH_KEY_TYPE_NONE 0x00 /**< No key (may be used to reject). */ +#define BLE_GAP_AUTH_KEY_TYPE_PASSKEY 0x01 /**< 6-digit Passkey. */ +#define BLE_GAP_AUTH_KEY_TYPE_OOB 0x02 /**< Out Of Band data. */ +/**@} */ + +/**@defgroup BLE_GAP_KP_NOT_TYPES GAP Keypress Notification Types + * @{ */ +#define BLE_GAP_KP_NOT_TYPE_PASSKEY_START 0x00 /**< Passkey entry started. */ +#define BLE_GAP_KP_NOT_TYPE_PASSKEY_DIGIT_IN 0x01 /**< Passkey digit entered. */ +#define BLE_GAP_KP_NOT_TYPE_PASSKEY_DIGIT_OUT 0x02 /**< Passkey digit erased. */ +#define BLE_GAP_KP_NOT_TYPE_PASSKEY_CLEAR 0x03 /**< Passkey cleared. */ +#define BLE_GAP_KP_NOT_TYPE_PASSKEY_END 0x04 /**< Passkey entry completed. */ +/**@} */ + +/**@defgroup BLE_GAP_SEC_STATUS GAP Security status + * @{ */ +#define BLE_GAP_SEC_STATUS_SUCCESS 0x00 /**< Procedure completed with success. */ +#define BLE_GAP_SEC_STATUS_TIMEOUT 0x01 /**< Procedure timed out. */ +#define BLE_GAP_SEC_STATUS_PDU_INVALID 0x02 /**< Invalid PDU received. */ +#define BLE_GAP_SEC_STATUS_RFU_RANGE1_BEGIN 0x03 /**< Reserved for Future Use range #1 begin. */ +#define BLE_GAP_SEC_STATUS_RFU_RANGE1_END 0x80 /**< Reserved for Future Use range #1 end. */ +#define BLE_GAP_SEC_STATUS_PASSKEY_ENTRY_FAILED 0x81 /**< Passkey entry failed (user cancelled or other). */ +#define BLE_GAP_SEC_STATUS_OOB_NOT_AVAILABLE 0x82 /**< Out of Band Key not available. */ +#define BLE_GAP_SEC_STATUS_AUTH_REQ 0x83 /**< Authentication requirements not met. */ +#define BLE_GAP_SEC_STATUS_CONFIRM_VALUE 0x84 /**< Confirm value failed. */ +#define BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP 0x85 /**< Pairing not supported. */ +#define BLE_GAP_SEC_STATUS_ENC_KEY_SIZE 0x86 /**< Encryption key size. */ +#define BLE_GAP_SEC_STATUS_SMP_CMD_UNSUPPORTED 0x87 /**< Unsupported SMP command. */ +#define BLE_GAP_SEC_STATUS_UNSPECIFIED 0x88 /**< Unspecified reason. */ +#define BLE_GAP_SEC_STATUS_REPEATED_ATTEMPTS 0x89 /**< Too little time elapsed since last attempt. */ +#define BLE_GAP_SEC_STATUS_INVALID_PARAMS 0x8A /**< Invalid parameters. */ +#define BLE_GAP_SEC_STATUS_DHKEY_FAILURE 0x8B /**< DHKey check failure. */ +#define BLE_GAP_SEC_STATUS_NUM_COMP_FAILURE 0x8C /**< Numeric Comparison failure. */ +#define BLE_GAP_SEC_STATUS_BR_EDR_IN_PROG 0x8D /**< BR/EDR pairing in progress. */ +#define BLE_GAP_SEC_STATUS_X_TRANS_KEY_DISALLOWED 0x8E /**< BR/EDR Link Key cannot be used for LE keys. */ +#define BLE_GAP_SEC_STATUS_RFU_RANGE2_BEGIN 0x8F /**< Reserved for Future Use range #2 begin. */ +#define BLE_GAP_SEC_STATUS_RFU_RANGE2_END 0xFF /**< Reserved for Future Use range #2 end. */ +/**@} */ + +/**@defgroup BLE_GAP_SEC_STATUS_SOURCES GAP Security status sources + * @{ */ +#define BLE_GAP_SEC_STATUS_SOURCE_LOCAL 0x00 /**< Local failure. */ +#define BLE_GAP_SEC_STATUS_SOURCE_REMOTE 0x01 /**< Remote failure. */ +/**@} */ + +/**@defgroup BLE_GAP_CP_LIMITS GAP Connection Parameters Limits + * @{ */ +#define BLE_GAP_CP_MIN_CONN_INTVL_NONE 0xFFFF /**< No new minimum connection interval specified in connect parameters. */ +#define BLE_GAP_CP_MIN_CONN_INTVL_MIN 0x0006 /**< Lowest minimum connection interval permitted, in units of 1.25 ms, i.e. 7.5 ms. */ +#define BLE_GAP_CP_MIN_CONN_INTVL_MAX 0x0C80 /**< Highest minimum connection interval permitted, in units of 1.25 ms, i.e. 4 s. */ +#define BLE_GAP_CP_MAX_CONN_INTVL_NONE 0xFFFF /**< No new maximum connection interval specified in connect parameters. */ +#define BLE_GAP_CP_MAX_CONN_INTVL_MIN 0x0006 /**< Lowest maximum connection interval permitted, in units of 1.25 ms, i.e. 7.5 ms. */ +#define BLE_GAP_CP_MAX_CONN_INTVL_MAX 0x0C80 /**< Highest maximum connection interval permitted, in units of 1.25 ms, i.e. 4 s. */ +#define BLE_GAP_CP_SLAVE_LATENCY_MAX 0x01F3 /**< Highest slave latency permitted, in connection events. */ +#define BLE_GAP_CP_CONN_SUP_TIMEOUT_NONE 0xFFFF /**< No new supervision timeout specified in connect parameters. */ +#define BLE_GAP_CP_CONN_SUP_TIMEOUT_MIN 0x000A /**< Lowest supervision timeout permitted, in units of 10 ms, i.e. 100 ms. */ +#define BLE_GAP_CP_CONN_SUP_TIMEOUT_MAX 0x0C80 /**< Highest supervision timeout permitted, in units of 10 ms, i.e. 32 s. */ +/**@} */ + + +/**@brief GAP device name maximum length. */ +#define BLE_GAP_DEVNAME_MAX_LEN 31 + +/**@brief Disable RSSI events for connections */ +#define BLE_GAP_RSSI_THRESHOLD_INVALID 0xFF + +/**@defgroup BLE_GAP_CONN_SEC_MODE_SET_MACROS GAP attribute security requirement setters + * + * See @ref ble_gap_conn_sec_mode_t. + * @{ */ +/**@brief Set sec_mode pointed to by ptr to have no access rights.*/ +#define BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(ptr) do {(ptr)->sm = 0; (ptr)->lv = 0;} while(0) +/**@brief Set sec_mode pointed to by ptr to require no protection, open link.*/ +#define BLE_GAP_CONN_SEC_MODE_SET_OPEN(ptr) do {(ptr)->sm = 1; (ptr)->lv = 1;} while(0) +/**@brief Set sec_mode pointed to by ptr to require encryption, but no MITM protection.*/ +#define BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(ptr) do {(ptr)->sm = 1; (ptr)->lv = 2;} while(0) +/**@brief Set sec_mode pointed to by ptr to require encryption and MITM protection.*/ +#define BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM(ptr) do {(ptr)->sm = 1; (ptr)->lv = 3;} while(0) +/**@brief Set sec_mode pointed to by ptr to require LESC encryption and MITM protection.*/ +#define BLE_GAP_CONN_SEC_MODE_SET_LESC_ENC_WITH_MITM(ptr) do {(ptr)->sm = 1; (ptr)->lv = 4;} while(0) +/**@brief Set sec_mode pointed to by ptr to require signing or encryption, no MITM protection needed.*/ +#define BLE_GAP_CONN_SEC_MODE_SET_SIGNED_NO_MITM(ptr) do {(ptr)->sm = 2; (ptr)->lv = 1;} while(0) +/**@brief Set sec_mode pointed to by ptr to require signing or encryption with MITM protection.*/ +#define BLE_GAP_CONN_SEC_MODE_SET_SIGNED_WITH_MITM(ptr) do {(ptr)->sm = 2; (ptr)->lv = 2;} while(0) +/**@} */ + + +/**@brief GAP Security Random Number Length. */ +#define BLE_GAP_SEC_RAND_LEN 8 + +/**@brief GAP Security Key Length. */ +#define BLE_GAP_SEC_KEY_LEN 16 + +/**@brief GAP LE Secure Connections Elliptic Curve Diffie-Hellman P-256 Public Key Length. */ +#define BLE_GAP_LESC_P256_PK_LEN 64 + +/**@brief GAP LE Secure Connections Elliptic Curve Diffie-Hellman DHKey Length. */ +#define BLE_GAP_LESC_DHKEY_LEN 32 + +/**@brief GAP Passkey Length. */ +#define BLE_GAP_PASSKEY_LEN 6 + +/**@brief Maximum amount of addresses in a whitelist. */ +#define BLE_GAP_WHITELIST_ADDR_MAX_COUNT (8) + +/**@brief Maximum amount of IRKs in a whitelist. + * @note The number of IRKs is limited to 8, even if the hardware supports more. + */ +#define BLE_GAP_WHITELIST_IRK_MAX_COUNT (8) + +/**@defgroup GAP_SEC_MODES GAP Security Modes + * @{ */ +#define BLE_GAP_SEC_MODE 0x00 /**< No key (may be used to reject). */ +/**@} */ +/** @} */ + +/**@addtogroup BLE_GAP_STRUCTURES Structures + * @{ */ + +/** + * @brief BLE GAP initialization parameters. + */ +typedef struct +{ + uint8_t periph_conn_count; /**< Number of connections acting as a peripheral */ + uint8_t central_conn_count; /**< Number of connections acting as a central */ + uint8_t central_sec_count; /**< Number of SMP instances for all connections acting as a central. */ +} ble_gap_enable_params_t; + +/**@brief Bluetooth Low Energy address. */ +typedef struct +{ + uint8_t addr_type; /**< See @ref BLE_GAP_ADDR_TYPES. */ + uint8_t addr[BLE_GAP_ADDR_LEN]; /**< 48-bit address, LSB format. */ +} ble_gap_addr_t; + + +/**@brief GAP connection parameters. + * + * @note When ble_conn_params_t is received in an event, both min_conn_interval and + * max_conn_interval will be equal to the connection interval set by the central. + * + * @note If both conn_sup_timeout and max_conn_interval are specified, then the following constraint applies: + * conn_sup_timeout * 4 > (1 + slave_latency) * max_conn_interval + * that corresponds to the following Bluetooth Spec requirement: + * The Supervision_Timeout in milliseconds shall be larger than + * (1 + Conn_Latency) * Conn_Interval_Max * 2, where Conn_Interval_Max is given in milliseconds. + */ +typedef struct +{ + uint16_t min_conn_interval; /**< Minimum Connection Interval in 1.25 ms units, see @ref BLE_GAP_CP_LIMITS.*/ + uint16_t max_conn_interval; /**< Maximum Connection Interval in 1.25 ms units, see @ref BLE_GAP_CP_LIMITS.*/ + uint16_t slave_latency; /**< Slave Latency in number of connection events, see @ref BLE_GAP_CP_LIMITS.*/ + uint16_t conn_sup_timeout; /**< Connection Supervision Timeout in 10 ms units, see @ref BLE_GAP_CP_LIMITS.*/ +} ble_gap_conn_params_t; + + +/**@brief GAP connection security modes. + * + * Security Mode 0 Level 0: No access permissions at all (this level is not defined by the Bluetooth Core specification).\n + * Security Mode 1 Level 1: No security is needed (aka open link).\n + * Security Mode 1 Level 2: Encrypted link required, MITM protection not necessary.\n + * Security Mode 1 Level 3: MITM protected encrypted link required.\n + * Security Mode 1 Level 4: LESC MITM protected encrypted link required.\n + * Security Mode 2 Level 1: Signing or encryption required, MITM protection not necessary.\n + * Security Mode 2 Level 2: MITM protected signing required, unless link is MITM protected encrypted.\n + */ +typedef struct +{ + uint8_t sm : 4; /**< Security Mode (1 or 2), 0 for no permissions at all. */ + uint8_t lv : 4; /**< Level (1, 2, 3 or 4), 0 for no permissions at all. */ + +} ble_gap_conn_sec_mode_t; + + +/**@brief GAP connection security status.*/ +typedef struct +{ + ble_gap_conn_sec_mode_t sec_mode; /**< Currently active security mode for this connection.*/ + uint8_t encr_key_size; /**< Length of currently active encryption key, 7 to 16 octets (only applicable for bonding procedures). */ +} ble_gap_conn_sec_t; + + +/**@brief Identity Resolving Key. */ +typedef struct +{ + uint8_t irk[BLE_GAP_SEC_KEY_LEN]; /**< Array containing IRK. */ +} ble_gap_irk_t; + + +/**@brief Whitelist structure. */ +typedef struct +{ + ble_gap_addr_t **pp_addrs; /**< Pointer to an array of device address pointers, pointing to addresses to be used in whitelist. NULL if none are given. */ + uint8_t addr_count; /**< Count of device addresses in array, up to @ref BLE_GAP_WHITELIST_ADDR_MAX_COUNT. */ + ble_gap_irk_t **pp_irks; /**< Pointer to an array of Identity Resolving Key (IRK) pointers, each pointing to an IRK in the whitelist. NULL if none are given. */ + uint8_t irk_count; /**< Count of IRKs in array, up to @ref BLE_GAP_WHITELIST_IRK_MAX_COUNT. */ +} ble_gap_whitelist_t; + +/**@brief Channel mask for RF channels used in advertising. */ +typedef struct +{ + uint8_t ch_37_off : 1; /**< Setting this bit to 1 will turn off advertising on channel 37 */ + uint8_t ch_38_off : 1; /**< Setting this bit to 1 will turn off advertising on channel 38 */ + uint8_t ch_39_off : 1; /**< Setting this bit to 1 will turn off advertising on channel 39 */ +} ble_gap_adv_ch_mask_t; + +/**@brief GAP advertising parameters.*/ +typedef struct +{ + uint8_t type; /**< See @ref BLE_GAP_ADV_TYPES. */ + ble_gap_addr_t *p_peer_addr; /**< For @ref BLE_GAP_ADV_TYPE_ADV_DIRECT_IND mode only, known peer address. */ + uint8_t fp; /**< Filter Policy, see @ref BLE_GAP_ADV_FILTER_POLICIES. */ + ble_gap_whitelist_t *p_whitelist; /**< Pointer to whitelist, NULL if no whitelist or the current active whitelist is to be used. */ + uint16_t interval; /**< Advertising interval between 0x0020 and 0x4000 in 0.625 ms units (20ms to 10.24s), see @ref BLE_GAP_ADV_INTERVALS. + - If type equals @ref BLE_GAP_ADV_TYPE_ADV_DIRECT_IND, this parameter must be set to 0 for high duty cycle directed advertising. + - If type equals @ref BLE_GAP_ADV_TYPE_ADV_DIRECT_IND, set @ref BLE_GAP_ADV_INTERVAL_MIN <= interval <= @ref BLE_GAP_ADV_INTERVAL_MAX for low duty cycle advertising.*/ + uint16_t timeout; /**< Advertising timeout between 0x0001 and 0x3FFF in seconds, 0x0000 disables timeout. See also @ref BLE_GAP_ADV_TIMEOUT_VALUES. If type equals @ref BLE_GAP_ADV_TYPE_ADV_DIRECT_IND, this parameter must be set to 0 for High duty cycle directed advertising. */ + ble_gap_adv_ch_mask_t channel_mask; /**< Advertising channel mask. See @ref ble_gap_adv_ch_mask_t. */ +} ble_gap_adv_params_t; + + +/**@brief GAP scanning parameters. */ +typedef struct +{ + uint8_t active : 1; /**< If 1, perform active scanning (scan requests). */ + uint8_t selective : 1; /**< If 1, ignore unknown devices (non whitelisted). */ + ble_gap_whitelist_t * p_whitelist; /**< Pointer to whitelist, NULL if no whitelist or the current active whitelist is to be used. */ + uint16_t interval; /**< Scan interval between 0x0004 and 0x4000 in 0.625ms units (2.5ms to 10.24s). */ + uint16_t window; /**< Scan window between 0x0004 and 0x4000 in 0.625ms units (2.5ms to 10.24s). */ + uint16_t timeout; /**< Scan timeout between 0x0001 and 0xFFFF in seconds, 0x0000 disables timeout. */ +} ble_gap_scan_params_t; + + +/** @brief Keys that can be exchanged during a bonding procedure. */ +typedef struct +{ + uint8_t enc : 1; /**< Long Term Key and Master Identification. */ + uint8_t id : 1; /**< Identity Resolving Key and Identity Address Information. */ + uint8_t sign : 1; /**< Connection Signature Resolving Key. */ + uint8_t link : 1; /**< Derive the Link Key from the LTK. */ +} ble_gap_sec_kdist_t; + + +/**@brief GAP security parameters. */ +typedef struct +{ + uint8_t bond : 1; /**< Perform bonding. */ + uint8_t mitm : 1; /**< Enable Man In The Middle protection. */ + uint8_t lesc : 1; /**< Enable LE Secure Connection pairing. */ + uint8_t keypress : 1; /**< Enable generation of keypress notifications. */ + uint8_t io_caps : 3; /**< IO capabilities, see @ref BLE_GAP_IO_CAPS. */ + uint8_t oob : 1; /**< Out Of Band data available. */ + uint8_t min_key_size; /**< Minimum encryption key size in octets between 7 and 16. If 0 then not applicable in this instance. */ + uint8_t max_key_size; /**< Maximum encryption key size in octets between min_key_size and 16. */ + ble_gap_sec_kdist_t kdist_own; /**< Key distribution bitmap: keys that the local device will distribute. */ + ble_gap_sec_kdist_t kdist_peer; /**< Key distribution bitmap: keys that the remote device will distribute. */ +} ble_gap_sec_params_t; + + +/**@brief GAP Encryption Information. */ +typedef struct +{ + uint8_t ltk[BLE_GAP_SEC_KEY_LEN]; /**< Long Term Key. */ + uint8_t lesc : 1; /**< Key generated using LE Secure Connections. */ + uint8_t auth : 1; /**< Authenticated Key. */ + uint8_t ltk_len : 6; /**< LTK length in octets. */ +} ble_gap_enc_info_t; + + +/**@brief GAP Master Identification. */ +typedef struct +{ + uint16_t ediv; /**< Encrypted Diversifier. */ + uint8_t rand[BLE_GAP_SEC_RAND_LEN]; /**< Random Number. */ +} ble_gap_master_id_t; + + +/**@brief GAP Signing Information. */ +typedef struct +{ + uint8_t csrk[BLE_GAP_SEC_KEY_LEN]; /**< Connection Signature Resolving Key. */ +} ble_gap_sign_info_t; + +/**@brief GAP LE Secure Connections P-256 Public Key. */ +typedef struct +{ + uint8_t pk[BLE_GAP_LESC_P256_PK_LEN]; /**< LE Secure Connections Elliptic Curve Diffie-Hellman P-256 Public Key. Stored in the standard SMP protocol format: {X,Y} both in little-endian. */ +} ble_gap_lesc_p256_pk_t; + +/**@brief GAP LE Secure Connections DHKey. */ +typedef struct +{ + uint8_t key[BLE_GAP_LESC_DHKEY_LEN]; /**< LE Secure Connections Elliptic Curve Diffie-Hellman Key. Stored in little-endian. */ +} ble_gap_lesc_dhkey_t; + +/**@brief GAP LE Secure Connections OOB data. */ +typedef struct +{ + ble_gap_addr_t addr; /**< Bluetooth address of the device. */ + uint8_t r[BLE_GAP_SEC_KEY_LEN]; /**< Random Number. */ + uint8_t c[BLE_GAP_SEC_KEY_LEN]; /**< Confirm Value. */ +} ble_gap_lesc_oob_data_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_CONNECTED. */ +typedef struct +{ + 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. */ + uint8_t role; /**< BLE role for this connection, see @ref BLE_GAP_ROLES */ + 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. */ + ble_gap_conn_params_t conn_params; /**< GAP Connection Parameters. */ +} ble_gap_evt_connected_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_DISCONNECTED. */ +typedef struct +{ + uint8_t reason; /**< HCI error code, see @ref BLE_HCI_STATUS_CODES. */ +} ble_gap_evt_disconnected_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_CONN_PARAM_UPDATE. */ +typedef struct +{ + ble_gap_conn_params_t conn_params; /**< GAP Connection Parameters. */ +} ble_gap_evt_conn_param_update_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_SEC_PARAMS_REQUEST. */ +typedef struct +{ + ble_gap_sec_params_t peer_params; /**< Initiator Security Parameters. */ +} ble_gap_evt_sec_params_request_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_SEC_INFO_REQUEST. */ +typedef struct +{ + ble_gap_addr_t peer_addr; /**< Bluetooth address of the peer device. */ + ble_gap_master_id_t master_id; /**< Master Identification for LTK lookup. */ + uint8_t enc_info : 1; /**< If 1, Encryption Information required. */ + uint8_t id_info : 1; /**< If 1, Identity Information required. */ + uint8_t sign_info : 1; /**< If 1, Signing Information required. */ +} ble_gap_evt_sec_info_request_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_PASSKEY_DISPLAY. */ +typedef struct +{ + uint8_t passkey[BLE_GAP_PASSKEY_LEN]; /**< 6-digit passkey in ASCII ('0'-'9' digits only). */ + uint8_t match_request : 1; /**< If 1 requires the application to report the match using @ref sd_ble_gap_auth_key_reply + with either @ref BLE_GAP_AUTH_KEY_TYPE_NONE if there is no match or + @ref BLE_GAP_AUTH_KEY_TYPE_PASSKEY if there is a match. */ +} ble_gap_evt_passkey_display_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_KEY_PRESSED. */ +typedef struct +{ + uint8_t kp_not; /**< Keypress notification type, see @ref BLE_GAP_KP_NOT_TYPES. */ +} ble_gap_evt_key_pressed_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_AUTH_KEY_REQUEST. */ +typedef struct +{ + uint8_t key_type; /**< See @ref BLE_GAP_AUTH_KEY_TYPES. */ +} ble_gap_evt_auth_key_request_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST. */ +typedef struct +{ + ble_gap_lesc_p256_pk_t *p_pk_peer; /**< LE Secure Connections remote P-256 Public Key. This will point to the application-supplied memory + inside the keyset during the call to @ref sd_ble_gap_sec_params_reply. */ + uint8_t oobd_req :1; /**< LESC OOB data required. A call to @ref sd_ble_gap_lesc_oob_data_set is required to complete the procedure. */ +} ble_gap_evt_lesc_dhkey_request_t; + + +/**@brief Security levels supported. + * @note See Bluetooth Specification Version 4.2 Volume 3, Part C, Chapter 10, Section 10.2.1. +*/ +typedef struct +{ + uint8_t lv1 : 1; /**< If 1: Level 1 is supported. */ + uint8_t lv2 : 1; /**< If 1: Level 2 is supported. */ + uint8_t lv3 : 1; /**< If 1: Level 3 is supported. */ + uint8_t lv4 : 1; /**< If 1: Level 4 is supported. */ +} ble_gap_sec_levels_t; + + +/**@brief Encryption Key. */ +typedef struct +{ + ble_gap_enc_info_t enc_info; /**< Encryption Information. */ + ble_gap_master_id_t master_id; /**< Master Identification. */ +} ble_gap_enc_key_t; + + +/**@brief Identity Key. */ +typedef struct +{ + ble_gap_irk_t id_info; /**< Identity Information. */ + ble_gap_addr_t id_addr_info; /**< Identity Address Information. */ +} ble_gap_id_key_t; + + +/**@brief Security Keys. */ +typedef struct +{ + ble_gap_enc_key_t *p_enc_key; /**< Encryption Key, or NULL. */ + ble_gap_id_key_t *p_id_key; /**< Identity Key, or NULL. */ + ble_gap_sign_info_t *p_sign_key; /**< Signing Key, or NULL. */ + ble_gap_lesc_p256_pk_t *p_pk; /**< LE Secure Connections P-256 Public Key. When in debug mode the application must use the value defined + in the Core Bluetooth Specification v4.2 Vol.3, Part H, Section 2.3.5.6.1 */ +} ble_gap_sec_keys_t; + + +/**@brief Security key set for both local and peer keys. */ +typedef struct +{ + ble_gap_sec_keys_t keys_own; /**< Keys distributed by the local device. For LE Secure Connections the encryption key will be generated locally and will always be stored if bonding. */ + ble_gap_sec_keys_t keys_peer; /**< Keys distributed by the remote device. For LE Secure Connections, p_enc_key must always be NULL. */ +} ble_gap_sec_keyset_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_AUTH_STATUS. */ +typedef struct +{ + uint8_t auth_status; /**< Authentication status, see @ref BLE_GAP_SEC_STATUS. */ + uint8_t error_src : 2; /**< On error, source that caused the failure, see @ref BLE_GAP_SEC_STATUS_SOURCES. */ + uint8_t bonded : 1; /**< Procedure resulted in a bond. */ + ble_gap_sec_levels_t sm1_levels; /**< Levels supported in Security Mode 1. */ + ble_gap_sec_levels_t sm2_levels; /**< Levels supported in Security Mode 2. */ + ble_gap_sec_kdist_t kdist_own; /**< Bitmap stating which keys were exchanged (distributed) by the local device. If bonding with LE Secure Connections, the enc bit will be always set. */ + ble_gap_sec_kdist_t kdist_peer; /**< Bitmap stating which keys were exchanged (distributed) by the remote device. If bonding with LE Secure Connections, the enc bit will never be set. */ +} ble_gap_evt_auth_status_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_CONN_SEC_UPDATE. */ +typedef struct +{ + ble_gap_conn_sec_t conn_sec; /**< Connection security level. */ +} ble_gap_evt_conn_sec_update_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_TIMEOUT. */ +typedef struct +{ + uint8_t src; /**< Source of timeout event, see @ref BLE_GAP_TIMEOUT_SOURCES. */ +} ble_gap_evt_timeout_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_RSSI_CHANGED. */ +typedef struct +{ + int8_t rssi; /**< Received Signal Strength Indication in dBm. */ +} ble_gap_evt_rssi_changed_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_ADV_REPORT. */ +typedef struct +{ + ble_gap_addr_t peer_addr; /**< Bluetooth address of the peer device. */ + int8_t rssi; /**< Received Signal Strength Indication in dBm. */ + uint8_t scan_rsp : 1; /**< If 1, the report corresponds to a scan response and the type field may be ignored. */ + uint8_t type : 2; /**< See @ref BLE_GAP_ADV_TYPES. Only valid if the scan_rsp field is 0. */ + uint8_t dlen : 5; /**< Advertising or scan response data length. */ + uint8_t data[BLE_GAP_ADV_MAX_SIZE]; /**< Advertising or scan response data. */ +} ble_gap_evt_adv_report_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_SEC_REQUEST. */ +typedef struct +{ + uint8_t bond : 1; /**< Perform bonding. */ + uint8_t mitm : 1; /**< Man In The Middle protection requested. */ + uint8_t lesc : 1; /**< LE Secure Connections requested. */ + uint8_t keypress : 1; /**< Generation of keypress notifications requested. */ +} ble_gap_evt_sec_request_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST. */ +typedef struct +{ + ble_gap_conn_params_t conn_params; /**< GAP Connection Parameters. */ +} ble_gap_evt_conn_param_update_request_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_SCAN_REQ_REPORT. */ +typedef struct +{ + int8_t rssi; /**< Received Signal Strength Indication in dBm. */ + ble_gap_addr_t peer_addr; /**< Bluetooth address of the peer device. */ +} ble_gap_evt_scan_req_report_t; + + + +/**@brief GAP event structure. */ +typedef struct +{ + uint16_t conn_handle; /**< Connection Handle on which event occurred. */ + union /**< union alternative identified by evt_id in enclosing struct. */ + { + ble_gap_evt_connected_t connected; /**< Connected Event Parameters. */ + ble_gap_evt_disconnected_t disconnected; /**< Disconnected Event Parameters. */ + ble_gap_evt_conn_param_update_t conn_param_update; /**< Connection Parameter Update Parameters. */ + ble_gap_evt_sec_params_request_t sec_params_request; /**< Security Parameters Request Event Parameters. */ + ble_gap_evt_sec_info_request_t sec_info_request; /**< Security Information Request Event Parameters. */ + ble_gap_evt_passkey_display_t passkey_display; /**< Passkey Display Event Parameters. */ + ble_gap_evt_key_pressed_t key_pressed; /**< Key Pressed Event Parameters. */ + ble_gap_evt_auth_key_request_t auth_key_request; /**< Authentication Key Request Event Parameters. */ + ble_gap_evt_lesc_dhkey_request_t lesc_dhkey_request; /**< LE Secure Connections DHKey calculation request. */ + ble_gap_evt_auth_status_t auth_status; /**< Authentication Status Event Parameters. */ + ble_gap_evt_conn_sec_update_t conn_sec_update; /**< Connection Security Update Event Parameters. */ + ble_gap_evt_timeout_t timeout; /**< Timeout Event Parameters. */ + ble_gap_evt_rssi_changed_t rssi_changed; /**< RSSI Event parameters. */ + ble_gap_evt_adv_report_t adv_report; /**< Advertising Report Event Parameters. */ + ble_gap_evt_sec_request_t sec_request; /**< Security Request Event Parameters. */ + ble_gap_evt_conn_param_update_request_t conn_param_update_request; /**< Connection Parameter Update Parameters. */ + ble_gap_evt_scan_req_report_t scan_req_report; /**< Scan Request Report parameters. */ + } params; /**< Event Parameters. */ + +} ble_gap_evt_t; + + +/**@brief Channel Map option. + * Used with @ref sd_ble_opt_get to get the current channel map + * or @ref sd_ble_opt_set to set a new channel map. When setting the + * channel map, it applies to all current and future connections. When getting the + * current channel map, it applies to a single connection and the connection handle + * must be supplied. + * + * @note Setting the channel map may take some time, depending on connection parameters. + * The time taken may be different for each connection and the get operation will + * return the previous channel map until the new one has taken effect. + * + * @note After setting the channel map, by spec it can not be set again until at least 1 s has passed. + * See Bluetooth Specification Version 4.1 Volume 2, Part E, Section 7.3.46. + * + * @retval ::NRF_SUCCESS Get or set successful. + * @retval ::NRF_ERROR_BUSY Channel map was set again before enough time had passed. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied for get. + * @retval ::NRF_ERROR_NOT_SUPPORTED Returned by sd_ble_opt_set in peripheral-only SoftDevices. + * + */ +typedef struct +{ + uint16_t conn_handle; /**< Connection Handle (only applicable for get) */ + uint8_t ch_map[5]; /**< Channel Map (37-bit). */ +} ble_gap_opt_ch_map_t; + + +/**@brief Local connection latency option. + * + * Local connection latency is a feature which enables the slave to improve + * current consumption by ignoring the slave latency set by the peer. The + * local connection latency can only be set to a multiple of the slave latency, + * and cannot be longer than half of the supervision timeout. + * + * Used with @ref sd_ble_opt_set to set the local connection latency. The + * @ref sd_ble_opt_get is not supported for this option, but the actual + * local connection latency (unless set to NULL) is set as a return parameter + * when setting the option. + * + * @note The latency set will be truncated down to the closest slave latency event + * multiple, or the nearest multiple before half of the supervision timeout. + * + * @note The local connection latency is disabled by default, and needs to be enabled for new + * connections and whenever the connection is updated. + * + * @retval ::NRF_SUCCESS Set successfully. + * @retval ::NRF_ERROR_NOT_SUPPORTED Get is not supported. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle parameter. + */ +typedef struct +{ + uint16_t conn_handle; /**< Connection Handle */ + uint16_t requested_latency; /**< Requested local connection latency. */ + uint16_t * p_actual_latency; /**< Pointer to storage for the actual local connection latency (can be set to NULL to skip return value). */ +} ble_gap_opt_local_conn_latency_t; + + +/**@brief Passkey Option. + * + * Structure containing the passkey to be used during pairing. This can be used with @ref + * sd_ble_opt_set to make the SoftDevice use a pre-programmed passkey for authentication + * instead of generating a random one. + * + * @note @ref sd_ble_opt_get is not supported for this option. + * + */ +typedef struct +{ + uint8_t * p_passkey; /**< Pointer to 6-digit ASCII string (digit 0..9 only, no NULL termination) passkey to be used during pairing. If this is NULL, the SoftDevice will generate a random passkey if required.*/ +} ble_gap_opt_passkey_t; + + +/**@brief Custom Privacy Option. + * + * This structure is used with both @ref sd_ble_opt_set (as input) and with + * @ref sd_ble_opt_get (as output). + * + * Structure containing: + * - A pointer to an IRK to set (if input), or a place to store a read IRK (if output). + * - A private address refresh cycle. + * + * @note The specified address cycle interval is used when the address cycle mode is + * @ref BLE_GAP_ADDR_CYCLE_MODE_AUTO. If 0 is given, the address will not be automatically + * refreshed at all. The default interval is @ref BLE_GAP_DEFAULT_PRIVATE_ADDR_CYCLE_INTERVAL_S. + * + * @note If the current address cycle mode is @ref BLE_GAP_ADDR_CYCLE_MODE_AUTO, the address will immediately be + * refreshed when a custom privacy option is set. A new address can be generated manually by calling + * @ref sd_ble_gap_address_set with the same type again. + * + * @note If the IRK is updated, the new IRK becomes the one to be distributed in all + * bonding procedures performed after @ref sd_ble_opt_set returns. + * + * @retval ::NRF_SUCCESS Set or read successfully. + * @retval ::NRF_ERROR_INVALID_ADDR The pointer to IRK storage is invalid. + */ +typedef struct +{ + ble_gap_irk_t * p_irk; /**< When input: Pointer to custom IRK, or NULL to use/reset to the device's default IRK. When output: Pointer to where the current IRK is to be stored, or NULL to not read out the IRK. */ + uint16_t interval_s; /**< When input: Custom private address cycle interval in seconds. When output: The current private address cycle interval. */ +} ble_gap_opt_privacy_t; + + +/**@brief Scan request report option. + * + * This can be used with @ref sd_ble_opt_set to make the SoftDevice send + * @ref BLE_GAP_EVT_SCAN_REQ_REPORT events. + * + * @note Due to the limited space reserved for scan request report events, + * not all received scan requests will be reported. + * + * @note If whitelisting is used, only whitelisted requests are reported. + * + * @retval ::NRF_SUCCESS Set successfully. + * @retval ::NRF_ERROR_INVALID_STATE When advertising is ongoing while the option is set. + */ +typedef struct +{ + uint8_t enable : 1; /**< Enable scan request reports. */ +} ble_gap_opt_scan_req_report_t; + +/**@brief Compatibility mode option. + * + * This can be used with @ref sd_ble_opt_set to enable and disable + * compatibility modes. Compatibility modes are disabled by default. + * + * @note Compatibility mode 1 enables interoperability with devices that do not support + * a value of 0 for the WinOffset parameter in the Link Layer CONNECT_REQ packet. + * + * @retval ::NRF_SUCCESS Set successfully. + * @retval ::NRF_ERROR_INVALID_STATE When connection creation is ongoing while mode 1 is set. + */ +typedef struct +{ + uint8_t mode_1_enable : 1; /**< Enable compatibility mode 1.*/ +} ble_gap_opt_compat_mode_t; + +/**@brief Option structure for GAP options. */ +typedef union +{ + ble_gap_opt_ch_map_t ch_map; /**< Parameters for the Channel Map option. */ + ble_gap_opt_local_conn_latency_t local_conn_latency; /**< Parameters for the Local connection latency option */ + ble_gap_opt_passkey_t passkey; /**< Parameters for the Passkey option.*/ + ble_gap_opt_privacy_t privacy; /**< Parameters for the Custom privacy option. */ + ble_gap_opt_scan_req_report_t scan_req_report; /**< Parameters for the scan request report option.*/ + ble_gap_opt_compat_mode_t compat_mode; /**< Parameters for the compatibility mode option.*/ +} ble_gap_opt_t; +/**@} */ + + +/**@addtogroup BLE_GAP_FUNCTIONS Functions + * @{ */ + +/**@brief Set local Bluetooth address. + * + * @note If the address cycle mode is @ref BLE_GAP_ADDR_CYCLE_MODE_AUTO, the address type is required to + * be @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE or + * @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE. The given address is ignored and the + * SoftDevice will generate a new private address automatically every + * @ref BLE_GAP_DEFAULT_PRIVATE_ADDR_CYCLE_INTERVAL_S seconds. If this API + * call is used again with the same parameters, the SoftDevice will immediately + * generate a new private address to replace the current address. + * + * @note If the application wishes to use a @ref BLE_GAP_ADDR_TYPE_PUBLIC or + * @ref BLE_GAP_ADDR_TYPE_RANDOM_STATIC address, the cycle mode must be + * @ref BLE_GAP_ADDR_CYCLE_MODE_NONE. + * + * @note By default the SoftDevice will set an address of type @ref BLE_GAP_ADDR_TYPE_RANDOM_STATIC upon being + * enabled. The address is a random number populated during the IC manufacturing process and remains unchanged + * for the lifetime of each IC. + * + * @note If this API function is called while advertising or scanning, the softdevice will immediately update the + * advertising or scanning address without the need to stop the procedure in the following cases: + * - If the previously set address is of type @ref BLE_GAP_ADDR_TYPE_PUBLIC and the new address + * is also of type @ref BLE_GAP_ADDR_TYPE_PUBLIC + * - If the previously set address is not @ref BLE_GAP_ADDR_TYPE_PUBLIC and the new address is + * also not @ref BLE_GAP_ADDR_TYPE_PUBLIC. + * If the address is changed from a @ref BLE_GAP_ADDR_TYPE_PUBLIC address to another type or from + * another type to a @ref BLE_GAP_ADDR_TYPE_PUBLIC address, the change will take effect the next + * time an advertising or scanning procedure is started. + * + * @note If the address cycle mode is @ref BLE_GAP_ADDR_CYCLE_MODE_NONE and the application is + * using privacy, the application must take care to generate and set new private addresses + * periodically to comply with the Privacy specification in Bluetooth Core Spec. + * + * @mscs + * @mmsc{@ref BLE_GAP_ADV_MSC} + * @endmscs + * + * @param[in] addr_cycle_mode Address cycle mode, see @ref BLE_GAP_ADDR_CYCLE_MODES. + * @param[in] p_addr Pointer to address structure. + * + * @retval ::NRF_SUCCESS Address successfully set. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameters. + * @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR Invalid address. + * @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + */ +SVCALL(SD_BLE_GAP_ADDRESS_SET, uint32_t, sd_ble_gap_address_set(uint8_t addr_cycle_mode, ble_gap_addr_t const *p_addr)); + + +/**@brief Get local Bluetooth address. + * + * @param[out] p_addr Pointer to address structure to be filled in. + * + * @retval ::NRF_SUCCESS Address successfully retrieved. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + */ +SVCALL(SD_BLE_GAP_ADDRESS_GET, uint32_t, sd_ble_gap_address_get(ble_gap_addr_t *p_addr)); + + +/**@brief Set, clear or update advertising and scan response data. + * + * @note The format of the advertising data will be checked by this call to ensure interoperability. + * Limitations imposed by this API call to the data provided include having a flags data type in the scan response data and + * duplicating the local name in the advertising data and scan response data. + * + * @note To clear the advertising data and set it to a 0-length packet, simply provide a valid pointer (p_data/p_sr_data) with its corresponding + * length (dlen/srdlen) set to 0. + * + * @note The call will fail if p_data and p_sr_data are both NULL since this would have no effect. + * + * @mscs + * @mmsc{@ref BLE_GAP_ADV_MSC} + * @mmsc{@ref BLE_GAP_WL_SHARE_MSC} + * @endmscs + * + * @param[in] p_data Raw data to be placed in advertising packet. If NULL, no changes are made to the current advertising packet data. + * @param[in] dlen Data length for p_data. Max size: @ref BLE_GAP_ADV_MAX_SIZE octets. Should be 0 if p_data is NULL, can be 0 if p_data is not NULL. + * @param[in] p_sr_data Raw data to be placed in scan response packet. If NULL, no changes are made to the current scan response packet data. + * @param[in] srdlen Data length for p_sr_data. Max size: @ref BLE_GAP_ADV_MAX_SIZE octets. Should be 0 if p_sr_data is NULL, can be 0 if p_data is not NULL. + * + * @retval ::NRF_SUCCESS Advertising data successfully updated or cleared. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, both p_data and p_sr_data cannot be NULL. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_FLAGS Invalid combination of advertising flags supplied. + * @retval ::NRF_ERROR_INVALID_DATA Invalid data type(s) supplied, check the advertising data format specification. + * @retval ::NRF_ERROR_INVALID_LENGTH Invalid data length(s) supplied. + * @retval ::NRF_ERROR_NOT_SUPPORTED Unsupported data type. + * @retval ::BLE_ERROR_GAP_UUID_LIST_MISMATCH Invalid UUID list supplied. + */ +SVCALL(SD_BLE_GAP_ADV_DATA_SET, uint32_t, sd_ble_gap_adv_data_set(uint8_t const *p_data, uint8_t dlen, uint8_t const *p_sr_data, uint8_t srdlen)); + + +/**@brief Start advertising (GAP Discoverable, Connectable modes, Broadcast Procedure). + * + * @note An application can start an advertising procedure for broadcasting purposes while a connection + * is active. After a @ref BLE_GAP_EVT_CONNECTED event is received, this function may therefore + * be called to start a broadcast advertising procedure. The advertising procedure + * cannot however be connectable (it must be of type @ref BLE_GAP_ADV_TYPE_ADV_SCAN_IND or + * @ref BLE_GAP_ADV_TYPE_ADV_NONCONN_IND). @note Only one advertiser may be active at any time. + * + * @note To use the currently active whitelist set p_adv_params->p_whitelist to NULL. + * + * @events + * @event{@ref BLE_GAP_EVT_CONNECTED, Generated after connection has been established through connectable advertising.} + * @event{@ref BLE_GAP_EVT_TIMEOUT, Advertisement has timed out.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_ADV_MSC} + * @mmsc{@ref BLE_GAP_WL_SHARE_MSC} + * @endmscs + * + * @param[in] p_adv_params Pointer to advertising parameters structure. + * + * @retval ::NRF_SUCCESS The BLE stack has started advertising. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::NRF_ERROR_CONN_COUNT The limit of available connections has been reached; connectable advertiser cannot be started. + * @retval ::NRF_ERROR_NO_MEM The configured memory pools (see @ref ble_conn_bw_counts_t) are not large enough for the + * bandwidth selected for this connection. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, check the accepted ranges and limits. + * @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR Invalid Bluetooth address supplied. + * @retval ::BLE_ERROR_GAP_DISCOVERABLE_WITH_WHITELIST Discoverable mode and whitelist incompatible. + * @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry. + * @retval ::BLE_ERROR_GAP_WHITELIST_IN_USE Unable to replace the whitelist while another operation is using it. + * @retval ::NRF_ERROR_RESOURCES Not enough BLE role slots available. + * Stop one or more currently active roles (Central, Peripheral or Observer) and try again + */ +SVCALL(SD_BLE_GAP_ADV_START, uint32_t, sd_ble_gap_adv_start(ble_gap_adv_params_t const *p_adv_params)); + + +/**@brief Stop advertising (GAP Discoverable, Connectable modes, Broadcast Procedure). + * + * @mscs + * @mmsc{@ref BLE_GAP_ADV_MSC} + * @mmsc{@ref BLE_GAP_WL_SHARE_MSC} + * @endmscs + * + * @retval ::NRF_SUCCESS The BLE stack has stopped advertising. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation (most probably not in advertising state). + */ +SVCALL(SD_BLE_GAP_ADV_STOP, uint32_t, sd_ble_gap_adv_stop(void)); + + +/**@brief Update connection parameters. + * + * @details In the central role this will initiate a Link Layer connection parameter update procedure, + * otherwise in the peripheral role, this will send the corresponding L2CAP request and wait for + * the central to perform the procedure. In both cases, and regardless of success or failure, the application + * will be informed of the result with a @ref BLE_GAP_EVT_CONN_PARAM_UPDATE event. + * + * @details This function can be used as a central both to reply to a @ref BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST or to start the procedure unrequested. + * + * @events + * @event{@ref BLE_GAP_EVT_CONN_PARAM_UPDATE, Result of the connection parameter update procedure.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_CPU_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_ENC_AUTH_MUTEX_MSC} + * @mmsc{@ref BLE_GAP_MULTILINK_CPU_MSC} + * @mmsc{@ref BLE_GAP_MULTILINK_CTRL_PROC_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_CPU_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_conn_params Pointer to desired connection parameters. If NULL is provided on a peripheral role, + * the parameters in the PPCP characteristic of the GAP service will be used instead. + * If NULL is provided on a central role and in response to a @ref BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST, the peripheral request will be rejected + * + * @retval ::NRF_SUCCESS The Connection Update procedure has been started successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, check parameter limits and constraints. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::NRF_ERROR_BUSY Procedure already in progress or not allowed at this time, process pending events and wait for pending procedures to complete and retry. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + */ +SVCALL(SD_BLE_GAP_CONN_PARAM_UPDATE, uint32_t, sd_ble_gap_conn_param_update(uint16_t conn_handle, ble_gap_conn_params_t const *p_conn_params)); + + +/**@brief Disconnect (GAP Link Termination). + * + * @details This call initiates the disconnection procedure, and its completion will be communicated to the application + * with a @ref BLE_GAP_EVT_DISCONNECTED event. + * + * @events + * @event{@ref BLE_GAP_EVT_DISCONNECTED, Generated when disconnection procedure is complete.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_CONN_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] hci_status_code HCI status code, see @ref BLE_HCI_STATUS_CODES (accepted values are @ref BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION and @ref BLE_HCI_CONN_INTERVAL_UNACCEPTABLE). + * + * @retval ::NRF_SUCCESS The disconnection procedure has been started successfully. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation (disconnection is already in progress). + */ +SVCALL(SD_BLE_GAP_DISCONNECT, uint32_t, sd_ble_gap_disconnect(uint16_t conn_handle, uint8_t hci_status_code)); + + +/**@brief Set the radio's transmit power. + * + * @param[in] tx_power Radio transmit power in dBm (accepted values are -40, -30, -20, -16, -12, -8, -4, 0, and 4 dBm). + * + * @note The -30dBm setting is only available on nRF51 series ICs. + * @note The -40dBm setting is only available on nRF52 series ICs. + * + * @retval ::NRF_SUCCESS Successfully changed the transmit power. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + */ +SVCALL(SD_BLE_GAP_TX_POWER_SET, uint32_t, sd_ble_gap_tx_power_set(int8_t tx_power)); + + +/**@brief Set GAP Appearance value. + * + * @param[in] appearance Appearance (16-bit), see @ref BLE_APPEARANCES. + * + * @retval ::NRF_SUCCESS Appearance value set successfully. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + */ +SVCALL(SD_BLE_GAP_APPEARANCE_SET, uint32_t, sd_ble_gap_appearance_set(uint16_t appearance)); + + +/**@brief Get GAP Appearance value. + * + * @param[out] p_appearance Pointer to appearance (16-bit) to be filled in, see @ref BLE_APPEARANCES. + * + * @retval ::NRF_SUCCESS Appearance value retrieved successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + */ +SVCALL(SD_BLE_GAP_APPEARANCE_GET, uint32_t, sd_ble_gap_appearance_get(uint16_t *p_appearance)); + + +/**@brief Set GAP Peripheral Preferred Connection Parameters. + * + * @param[in] p_conn_params Pointer to a @ref ble_gap_conn_params_t structure with the desired parameters. + * + * @retval ::NRF_SUCCESS Peripheral Preferred Connection Parameters set successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + */ +SVCALL(SD_BLE_GAP_PPCP_SET, uint32_t, sd_ble_gap_ppcp_set(ble_gap_conn_params_t const *p_conn_params)); + + +/**@brief Get GAP Peripheral Preferred Connection Parameters. + * + * @param[out] p_conn_params Pointer to a @ref ble_gap_conn_params_t structure where the parameters will be stored. + * + * @retval ::NRF_SUCCESS Peripheral Preferred Connection Parameters retrieved successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + */ +SVCALL(SD_BLE_GAP_PPCP_GET, uint32_t, sd_ble_gap_ppcp_get(ble_gap_conn_params_t *p_conn_params)); + + +/**@brief Set GAP device name. + * + * @param[in] p_write_perm Write permissions for the Device Name characteristic, see @ref ble_gap_conn_sec_mode_t. + * @param[in] p_dev_name Pointer to a UTF-8 encoded, non NULL-terminated string. + * @param[in] len Length of the UTF-8, non NULL-terminated string pointed to by p_dev_name in octets (must be smaller or equal than @ref BLE_GAP_DEVNAME_MAX_LEN). + * + * @retval ::NRF_SUCCESS GAP device name and permissions set successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied. + */ +SVCALL(SD_BLE_GAP_DEVICE_NAME_SET, uint32_t, sd_ble_gap_device_name_set(ble_gap_conn_sec_mode_t const *p_write_perm, uint8_t const *p_dev_name, uint16_t len)); + + +/**@brief Get GAP device name. + * + * @note If the device name is longer than the size of the supplied buffer, + * p_len will return the complete device name length, + * and not the number of bytes actually returned in p_dev_name. + * The application may use this information to allocate a suitable buffer size. + * + * @param[out] p_dev_name Pointer to an empty buffer where the UTF-8 non NULL-terminated string will be placed. Set to NULL to obtain the complete device name length. + * @param[in,out] p_len Length of the buffer pointed by p_dev_name, complete device name length on output. + * + * @retval ::NRF_SUCCESS GAP device name retrieved successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied. + */ +SVCALL(SD_BLE_GAP_DEVICE_NAME_GET, uint32_t, sd_ble_gap_device_name_get(uint8_t *p_dev_name, uint16_t *p_len)); + + +/**@brief Initiate the GAP Authentication procedure. + * + * @details In the central role, this function will send an SMP Pairing Request (or an SMP Pairing Failed if rejected), + * otherwise in the peripheral role, an SMP Security Request will be sent. + * + * @events + * @event{Depending on the security parameters set and the packet exchanges with the peer\, the following events may be generated:} + * @event{@ref BLE_GAP_EVT_SEC_PARAMS_REQUEST} + * @event{@ref BLE_GAP_EVT_SEC_INFO_REQUEST} + * @event{@ref BLE_GAP_EVT_PASSKEY_DISPLAY} + * @event{@ref BLE_GAP_EVT_KEY_PRESSED} + * @event{@ref BLE_GAP_EVT_AUTH_KEY_REQUEST} + * @event{@ref BLE_GAP_EVT_LESC_DHKEY_REQUEST} + * @event{@ref BLE_GAP_EVT_CONN_SEC_UPDATE} + * @event{@ref BLE_GAP_EVT_AUTH_STATUS} + * @event{@ref BLE_GAP_EVT_TIMEOUT} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_SEC_REQ_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_SEC_REQ_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_ENC_AUTH_MUTEX_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_JW_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_PK_PERIPH_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_PK_PERIPH_OOB_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_NC_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_PD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_CD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_OOB_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_sec_params Pointer to the @ref ble_gap_sec_params_t structure with the security parameters to be used during the pairing or bonding procedure. + * In the peripheral role, only the bond, mitm, lesc and keypress fields of this structure are used. + * In the central role, this pointer may be NULL to reject a Security Request. + * + * @retval ::NRF_SUCCESS Successfully initiated authentication procedure. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry. + * @retval ::NRF_ERROR_NO_MEM The maximum number of authentication procedures that can run in parallel for the given role is reached. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::NRF_ERROR_NOT_SUPPORTED Setting of sign or link fields in @ref ble_gap_sec_kdist_t not supported. + * @retval ::NRF_ERROR_TIMEOUT A SMP timeout has occurred, and further SMP operations on this link is prohibited. + */ +SVCALL(SD_BLE_GAP_AUTHENTICATE, uint32_t, sd_ble_gap_authenticate(uint16_t conn_handle, ble_gap_sec_params_t const *p_sec_params)); + + +/**@brief Reply with GAP security parameters. + * + * @details This function is only used to reply to a @ref BLE_GAP_EVT_SEC_PARAMS_REQUEST, calling it at other times will result in an @ref NRF_ERROR_INVALID_STATE. + * @note If the call returns an error code, the request is still pending, and the reply call may be repeated with corrected parameters. + * + * @events + * @event{This function is used during authentication procedures\, see the list of events in the documentation of @ref sd_ble_gap_authenticate.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_BONDING_JW_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_BONDING_PK_PERIPH_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_BONDING_PK_CENTRAL_OOB_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_BONDING_STATIC_PK_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_CONFIRM_FAIL_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_NC_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_PD_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_CD_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_OOB_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_KS_TOO_SMALL_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_APP_ERROR_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_REMOTE_PAIRING_FAIL_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_TIMEOUT_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_JW_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_PK_PERIPH_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_PK_PERIPH_OOB_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_NC_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_PD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_CD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_OOB_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] sec_status Security status, see @ref BLE_GAP_SEC_STATUS. + * @param[in] p_sec_params Pointer to a @ref ble_gap_sec_params_t security parameters structure. In the central role this must be set to NULL, as the parameters have + * already been provided during a previous call to @ref sd_ble_gap_authenticate. + * @param[in,out] p_sec_keyset Pointer to a @ref ble_gap_sec_keyset_t security keyset structure. Any keys generated and/or distributed as a result of the ongoing security procedure + * will be stored into the memory referenced by the pointers inside this structure. The keys will be stored and available to the application + * upon reception of a @ref BLE_GAP_EVT_AUTH_STATUS event. + * Note that the SoftDevice expects the application to provide memory for storing the + * peer's keys. So it must be ensured that the relevant pointers inside this structure are not NULL. The pointers to the local key + * can, however, be NULL, in which case, the local key data will not be available to the application upon reception of the + * @ref BLE_GAP_EVT_AUTH_STATUS event. + * + * @retval ::NRF_SUCCESS Successfully accepted security parameter from the application. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::NRF_ERROR_NOT_SUPPORTED Setting of sign or link fields in @ref ble_gap_sec_kdist_t not supported. + */ +SVCALL(SD_BLE_GAP_SEC_PARAMS_REPLY, uint32_t, sd_ble_gap_sec_params_reply(uint16_t conn_handle, uint8_t sec_status, ble_gap_sec_params_t const *p_sec_params, ble_gap_sec_keyset_t const *p_sec_keyset)); + + +/**@brief Reply with an authentication key. + * + * @details This function is only used to reply to a @ref BLE_GAP_EVT_AUTH_KEY_REQUEST or a @ref BLE_GAP_EVT_PASSKEY_DISPLAY, calling it at other times will result in an @ref NRF_ERROR_INVALID_STATE. + * @note If the call returns an error code, the request is still pending, and the reply call may be repeated with corrected parameters. + * + * @events + * @event{This function is used during authentication procedures\, see the list of events in the documentation of @ref sd_ble_gap_authenticate.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_BONDING_PK_CENTRAL_OOB_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_NC_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_CD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_PK_PERIPH_OOB_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_NC_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_CD_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] key_type See @ref BLE_GAP_AUTH_KEY_TYPES. + * @param[in] p_key If key type is @ref BLE_GAP_AUTH_KEY_TYPE_NONE, then NULL. + * If key type is @ref BLE_GAP_AUTH_KEY_TYPE_PASSKEY, then a 6-byte ASCII string (digit 0..9 only, no NULL termination) + * or NULL when confirming LE Secure Connections Numeric Comparison. + * If key type is @ref BLE_GAP_AUTH_KEY_TYPE_OOB, then a 16-byte OOB key value in Little Endian format. + * + * @retval ::NRF_SUCCESS Authentication key successfully set. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_AUTH_KEY_REPLY, uint32_t, sd_ble_gap_auth_key_reply(uint16_t conn_handle, uint8_t key_type, uint8_t const *p_key)); + +/**@brief Reply with an LE Secure connections DHKey. + * + * @details This function is only used to reply to a @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST, calling it at other times will result in an @ref NRF_ERROR_INVALID_STATE. + * @note If the call returns an error code, the request is still pending, and the reply call may be repeated with corrected parameters. + * + * @events + * @event{This function is used during authentication procedures\, see the list of events in the documentation of @ref sd_ble_gap_authenticate.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_LESC_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_NC_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_PD_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_CD_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_OOB_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_NC_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_PD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_CD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_OOB_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_dhkey LE Secure Connections DHKey. + * + * @retval ::NRF_SUCCESS DHKey successfully set. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_LESC_DHKEY_REPLY, uint32_t, sd_ble_gap_lesc_dhkey_reply(uint16_t conn_handle, ble_gap_lesc_dhkey_t const *p_dhkey)); + +/**@brief Notify the peer of a local keypress. + * + * @details This function can only be used when an authentication procedure using LE Secure Connection is in progress. Calling it at other times will result in an @ref NRF_ERROR_INVALID_STATE. + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_CD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_CD_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] kp_not See @ref BLE_GAP_KP_NOT_TYPES. + * + * @retval ::NRF_SUCCESS Keypress notification successfully queued for transmission. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either not entering a passkey or keypresses have not been enabled by both peers. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::NRF_ERROR_BUSY The BLE stack is busy. Retry at later time. + */ +SVCALL(SD_BLE_GAP_KEYPRESS_NOTIFY, uint32_t, sd_ble_gap_keypress_notify(uint16_t conn_handle, uint8_t kp_not)); + +/**@brief Generate a set of OOB data to send to a peer out of band. + * + * @note The @ref ble_gap_addr_t included in the OOB data returned will be the currently active one (or, if a connection has already been established, + * the one used during connection setup). The application may manually overwrite it with an updated value. + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_OOB_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_OOB_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. Can be BLE_CONN_HANDLE_INVALID if a BLE connection has not been established yet. + * @param[in] p_pk_own LE Secure Connections local P-256 Public Key. + * @param[out] p_oobd_own The OOB data to be sent out of band to a peer. + * + * @retval ::NRF_SUCCESS OOB data successfully generated. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_LESC_OOB_DATA_GET, uint32_t, sd_ble_gap_lesc_oob_data_get(uint16_t conn_handle, ble_gap_lesc_p256_pk_t const *p_pk_own, ble_gap_lesc_oob_data_t *p_oobd_own)); + +/**@brief Provide the OOB data sent/received out of band. + * + * @note At least one of the 2 pointers provided must be different from NULL. + * @note An authentication procedure with OOB selected as an algorithm must be in progress when calling this function. + * @note A @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST event with the oobd_req set to 1 must have been received prior to calling this function. + * + * @events + * @event{This function is used during authentication procedures\, see the list of events in the documentation of @ref sd_ble_gap_authenticate.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_OOB_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_OOB_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_oobd_own The OOB data sent out of band to a peer or NULL if none sent. + * @param[in] p_oobd_peer The OOB data received out of band from a peer or NULL if none received. + * + * @retval ::NRF_SUCCESS OOB data accepted. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_LESC_OOB_DATA_SET, uint32_t, sd_ble_gap_lesc_oob_data_set(uint16_t conn_handle, ble_gap_lesc_oob_data_t const *p_oobd_own, ble_gap_lesc_oob_data_t const *p_oobd_peer)); + +/**@brief Initiate GAP Encryption procedure. + * + * @details In the central role, this function will initiate the encryption procedure using the encryption information provided. + * + * @events + * @event{@ref BLE_GAP_EVT_CONN_SEC_UPDATE, The connection security has been updated.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_CENTRAL_ENC_AUTH_MUTEX_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_ENC_MSC} + * @mmsc{@ref BLE_GAP_MULTILINK_CTRL_PROC_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_SEC_REQ_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_master_id Pointer to a @ref ble_gap_master_id_t master identification structure. + * @param[in] p_enc_info Pointer to a @ref ble_gap_enc_info_t encryption information structure. + * + * @retval ::NRF_SUCCESS Successfully initiated authentication procedure. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::BLE_ERROR_INVALID_ROLE Operation is not supported in the Peripheral role. + * @retval ::NRF_ERROR_BUSY Procedure already in progress or not allowed at this time, wait for pending procedures to complete and retry. + */ +SVCALL(SD_BLE_GAP_ENCRYPT, uint32_t, sd_ble_gap_encrypt(uint16_t conn_handle, ble_gap_master_id_t const *p_master_id, ble_gap_enc_info_t const *p_enc_info)); + + +/**@brief Reply with GAP security information. + * + * @details This function is only used to reply to a @ref BLE_GAP_EVT_SEC_INFO_REQUEST, calling it at other times will result in @ref NRF_ERROR_INVALID_STATE. + * @note If the call returns an error code, the request is still pending, and the reply call may be repeated with corrected parameters. + * @note Data signing is not yet supported, and p_sign_info must therefore be NULL. + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_ENC_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_enc_info Pointer to a @ref ble_gap_enc_info_t encryption information structure. May be NULL to signal none is available. + * @param[in] p_id_info Pointer to a @ref ble_gap_irk_t identity information structure. May be NULL to signal none is available. + * @param[in] p_sign_info Pointer to a @ref ble_gap_sign_info_t signing information structure. May be NULL to signal none is available. + * + * @retval ::NRF_SUCCESS Successfully accepted security information. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_SEC_INFO_REPLY, uint32_t, sd_ble_gap_sec_info_reply(uint16_t conn_handle, ble_gap_enc_info_t const *p_enc_info, ble_gap_irk_t const *p_id_info, ble_gap_sign_info_t const *p_sign_info)); + + +/**@brief Get the current connection security. + * + * @param[in] conn_handle Connection handle. + * @param[out] p_conn_sec Pointer to a @ref ble_gap_conn_sec_t structure to be filled in. + * + * @retval ::NRF_SUCCESS Current connection security successfully retrieved. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_CONN_SEC_GET, uint32_t, sd_ble_gap_conn_sec_get(uint16_t conn_handle, ble_gap_conn_sec_t *p_conn_sec)); + + +/**@brief Start reporting the received signal strength to the application. + * + * A new event is reported whenever the RSSI value changes, until @ref sd_ble_gap_rssi_stop is called. + * + * @events + * @event{@ref BLE_GAP_EVT_RSSI_CHANGED, New RSSI data available. How often the event is generated is + dependent on the settings of the threshold_dbm + and skip_count input parameters.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_CENTRAL_RSSI_READ_MSC} + * @mmsc{@ref BLE_GAP_RSSI_FILT_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] threshold_dbm Minimum change in dBm before triggering the @ref BLE_GAP_EVT_RSSI_CHANGED event. Events are disabled if threshold_dbm equals @ref BLE_GAP_RSSI_THRESHOLD_INVALID. + * @param[in] skip_count Number of RSSI samples with a change of threshold_dbm or more before sending a new @ref BLE_GAP_EVT_RSSI_CHANGED event. + * + * @retval ::NRF_SUCCESS Successfully activated RSSI reporting. + * @retval ::NRF_ERROR_INVALID_STATE Disconnection in progress. Invalid state to perform operation. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_RSSI_START, uint32_t, sd_ble_gap_rssi_start(uint16_t conn_handle, uint8_t threshold_dbm, uint8_t skip_count)); + + +/**@brief Stop reporting the received signal strength. + * + * @note An RSSI change detected before the call but not yet received by the application + * may be reported after @ref sd_ble_gap_rssi_stop has been called. + * + * @mscs + * @mmsc{@ref BLE_GAP_CENTRAL_RSSI_READ_MSC} + * @mmsc{@ref BLE_GAP_RSSI_FILT_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * + * @retval ::NRF_SUCCESS Successfully deactivated RSSI reporting. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_RSSI_STOP, uint32_t, sd_ble_gap_rssi_stop(uint16_t conn_handle)); + + +/**@brief Get the received signal strength for the last connection event. + * + * @ref sd_ble_gap_rssi_start must be called to start reporting RSSI before using this function. @ref NRF_ERROR_NOT_FOUND + * will be returned until RSSI was sampled for the first time after calling @ref sd_ble_gap_rssi_start. + * + * @mscs + * @mmsc{@ref BLE_GAP_CENTRAL_RSSI_READ_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[out] p_rssi Pointer to the location where the RSSI measurement shall be stored. + * + * @retval ::NRF_SUCCESS Successfully read the RSSI. + * @retval ::NRF_ERROR_NOT_FOUND No sample is available. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::NRF_ERROR_INVALID_STATE RSSI reporting is not ongoing, or disconnection in progress. + */ +SVCALL(SD_BLE_GAP_RSSI_GET, uint32_t, sd_ble_gap_rssi_get(uint16_t conn_handle, int8_t *p_rssi)); + + +/**@brief Start scanning (GAP Discovery procedure, Observer Procedure). + * + * @note To use the currently active whitelist set p_scan_params->p_whitelist to NULL. + * + * @events + * @event{@ref BLE_GAP_EVT_ADV_REPORT, An advertising or scan response packet has been received.} + * @event{@ref BLE_GAP_EVT_TIMEOUT, Scanner has timed out.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_SCAN_MSC} + * @mmsc{@ref BLE_GAP_WL_SHARE_MSC} + * @endmscs + * + * @param[in] p_scan_params Pointer to scan parameters structure. + * + * @retval ::NRF_SUCCESS Successfully initiated scanning procedure. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry. + * @retval ::BLE_ERROR_GAP_WHITELIST_IN_USE Unable to replace the whitelist while another operation is using it. + * @retval ::NRF_ERROR_RESOURCES Not enough BLE role slots available. + * Stop one or more currently active roles (Central, Peripheral or Broadcaster) and try again + */ +SVCALL(SD_BLE_GAP_SCAN_START, uint32_t, sd_ble_gap_scan_start(ble_gap_scan_params_t const *p_scan_params)); + + +/**@brief Stop scanning (GAP Discovery procedure, Observer Procedure). + * + * @mscs + * @mmsc{@ref BLE_GAP_SCAN_MSC} + * @mmsc{@ref BLE_GAP_WL_SHARE_MSC} + * @endmscs + * + * @retval ::NRF_SUCCESS Successfully stopped scanning procedure. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation (most probably not in scanning state). + */ +SVCALL(SD_BLE_GAP_SCAN_STOP, uint32_t, sd_ble_gap_scan_stop(void)); + + +/**@brief Create a connection (GAP Link Establishment). + * + * @note To use the currently active whitelist set p_scan_params->p_whitelist to NULL. + * @note If a scanning procedure is currently in progress it will be automatically stopped when calling this function. + * + * @mscs + * @mmsc{@ref BLE_GAP_WL_SHARE_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_CONN_MSC} + * @endmscs + * + * @param[in] p_peer_addr Pointer to peer address. If the selective bit is set in @ref ble_gap_scan_params_t, then this must be NULL. + * @param[in] p_scan_params Pointer to scan parameters structure. + * @param[in] p_conn_params Pointer to desired connection parameters. + * + * @retval ::NRF_SUCCESS Successfully initiated connection procedure. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid parameter(s) pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR Invalid Peer address. + * @retval ::NRF_ERROR_CONN_COUNT The limit of available connections has been reached. + * @retval ::NRF_ERROR_NO_MEM The configured memory pool (see @ref ble_conn_bw_counts_t) is not large enough for the + * bandwidth selected for this connection. + * @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry. If another connection is being established + * wait for the corresponding @ref BLE_GAP_EVT_CONNECTED event before calling again. + * @retval ::BLE_ERROR_GAP_WHITELIST_IN_USE Unable to replace the whitelist while another operation is using it. + * @retval ::NRF_ERROR_RESOURCES Not enough BLE role slots available. + * Stop one or more currently active roles (Central, Peripheral or Broadcaster) and try again + */ +SVCALL(SD_BLE_GAP_CONNECT, uint32_t, sd_ble_gap_connect(ble_gap_addr_t const *p_peer_addr, ble_gap_scan_params_t const *p_scan_params, ble_gap_conn_params_t const *p_conn_params)); + + +/**@brief Cancel a connection establishment. + * + * @mscs + * @mmsc{@ref BLE_GAP_CENTRAL_CONN_MSC} + * @endmscs + * + * @retval ::NRF_SUCCESS Successfully cancelled an ongoing connection procedure. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + */ +SVCALL(SD_BLE_GAP_CONNECT_CANCEL, uint32_t, sd_ble_gap_connect_cancel(void)); + +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif // BLE_GAP_H__ + +/** + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gatt.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gatt.h new file mode 100644 index 0000000000..8d915ee76a --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gatt.h @@ -0,0 +1,212 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 BLE_GATT Generic Attribute Profile (GATT) Common + @{ + @brief Common definitions and prototypes for the GATT interfaces. + */ + +#ifndef BLE_GATT_H__ +#define BLE_GATT_H__ + +#include "ble_types.h" +#include "ble_ranges.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup BLE_GATT_DEFINES Defines + * @{ */ + +/** @brief Default MTU size. */ +#define GATT_MTU_SIZE_DEFAULT 23 + +/** @brief Only the default MTU size of 23 is currently supported. */ +#define GATT_RX_MTU 23 + + +/**@brief Invalid Attribute Handle. */ +#define BLE_GATT_HANDLE_INVALID 0x0000 + +/**@brief First Attribute Handle. */ +#define BLE_GATT_HANDLE_START 0x0001 + +/**@brief Last Attribute Handle. */ +#define BLE_GATT_HANDLE_END 0xFFFF + +/** @defgroup BLE_GATT_TIMEOUT_SOURCES GATT Timeout sources + * @{ */ +#define BLE_GATT_TIMEOUT_SRC_PROTOCOL 0x00 /**< ATT Protocol timeout. */ +/** @} */ + +/** @defgroup BLE_GATT_WRITE_OPS GATT Write operations + * @{ */ +#define BLE_GATT_OP_INVALID 0x00 /**< Invalid Operation. */ +#define BLE_GATT_OP_WRITE_REQ 0x01 /**< Write Request. */ +#define BLE_GATT_OP_WRITE_CMD 0x02 /**< Write Command. */ +#define BLE_GATT_OP_SIGN_WRITE_CMD 0x03 /**< Signed Write Command. */ +#define BLE_GATT_OP_PREP_WRITE_REQ 0x04 /**< Prepare Write Request. */ +#define BLE_GATT_OP_EXEC_WRITE_REQ 0x05 /**< Execute Write Request. */ +/** @} */ + +/** @defgroup BLE_GATT_EXEC_WRITE_FLAGS GATT Execute Write flags + * @{ */ +#define BLE_GATT_EXEC_WRITE_FLAG_PREPARED_CANCEL 0x00 +#define BLE_GATT_EXEC_WRITE_FLAG_PREPARED_WRITE 0x01 +/** @} */ + +/** @defgroup BLE_GATT_HVX_TYPES GATT Handle Value operations + * @{ */ +#define BLE_GATT_HVX_INVALID 0x00 /**< Invalid Operation. */ +#define BLE_GATT_HVX_NOTIFICATION 0x01 /**< Handle Value Notification. */ +#define BLE_GATT_HVX_INDICATION 0x02 /**< Handle Value Indication. */ +/** @} */ + +/** @defgroup BLE_GATT_STATUS_CODES GATT Status Codes + * @{ */ +#define BLE_GATT_STATUS_SUCCESS 0x0000 /**< Success. */ +#define BLE_GATT_STATUS_UNKNOWN 0x0001 /**< Unknown or not applicable status. */ +#define BLE_GATT_STATUS_ATTERR_INVALID 0x0100 /**< ATT Error: Invalid Error Code. */ +#define BLE_GATT_STATUS_ATTERR_INVALID_HANDLE 0x0101 /**< ATT Error: Invalid Attribute Handle. */ +#define BLE_GATT_STATUS_ATTERR_READ_NOT_PERMITTED 0x0102 /**< ATT Error: Read not permitted. */ +#define BLE_GATT_STATUS_ATTERR_WRITE_NOT_PERMITTED 0x0103 /**< ATT Error: Write not permitted. */ +#define BLE_GATT_STATUS_ATTERR_INVALID_PDU 0x0104 /**< ATT Error: Used in ATT as Invalid PDU. */ +#define BLE_GATT_STATUS_ATTERR_INSUF_AUTHENTICATION 0x0105 /**< ATT Error: Authenticated link required. */ +#define BLE_GATT_STATUS_ATTERR_REQUEST_NOT_SUPPORTED 0x0106 /**< ATT Error: Used in ATT as Request Not Supported. */ +#define BLE_GATT_STATUS_ATTERR_INVALID_OFFSET 0x0107 /**< ATT Error: Offset specified was past the end of the attribute. */ +#define BLE_GATT_STATUS_ATTERR_INSUF_AUTHORIZATION 0x0108 /**< ATT Error: Used in ATT as Insufficient Authorisation. */ +#define BLE_GATT_STATUS_ATTERR_PREPARE_QUEUE_FULL 0x0109 /**< ATT Error: Used in ATT as Prepare Queue Full. */ +#define BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND 0x010A /**< ATT Error: Used in ATT as Attribute not found. */ +#define BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_LONG 0x010B /**< ATT Error: Attribute cannot be read or written using read/write blob requests. */ +#define BLE_GATT_STATUS_ATTERR_INSUF_ENC_KEY_SIZE 0x010C /**< ATT Error: Encryption key size used is insufficient. */ +#define BLE_GATT_STATUS_ATTERR_INVALID_ATT_VAL_LENGTH 0x010D /**< ATT Error: Invalid value size. */ +#define BLE_GATT_STATUS_ATTERR_UNLIKELY_ERROR 0x010E /**< ATT Error: Very unlikely error. */ +#define BLE_GATT_STATUS_ATTERR_INSUF_ENCRYPTION 0x010F /**< ATT Error: Encrypted link required. */ +#define BLE_GATT_STATUS_ATTERR_UNSUPPORTED_GROUP_TYPE 0x0110 /**< ATT Error: Attribute type is not a supported grouping attribute. */ +#define BLE_GATT_STATUS_ATTERR_INSUF_RESOURCES 0x0111 /**< ATT Error: Encrypted link required. */ +#define BLE_GATT_STATUS_ATTERR_RFU_RANGE1_BEGIN 0x0112 /**< ATT Error: Reserved for Future Use range #1 begin. */ +#define BLE_GATT_STATUS_ATTERR_RFU_RANGE1_END 0x017F /**< ATT Error: Reserved for Future Use range #1 end. */ +#define BLE_GATT_STATUS_ATTERR_APP_BEGIN 0x0180 /**< ATT Error: Application range begin. */ +#define BLE_GATT_STATUS_ATTERR_APP_END 0x019F /**< ATT Error: Application range end. */ +#define BLE_GATT_STATUS_ATTERR_RFU_RANGE2_BEGIN 0x01A0 /**< ATT Error: Reserved for Future Use range #2 begin. */ +#define BLE_GATT_STATUS_ATTERR_RFU_RANGE2_END 0x01DF /**< ATT Error: Reserved for Future Use range #2 end. */ +#define BLE_GATT_STATUS_ATTERR_RFU_RANGE3_BEGIN 0x01E0 /**< ATT Error: Reserved for Future Use range #3 begin. */ +#define BLE_GATT_STATUS_ATTERR_RFU_RANGE3_END 0x01FC /**< ATT Error: Reserved for Future Use range #3 end. */ +#define BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR 0x01FD /**< ATT Common Profile and Service Error: Client Characteristic Configuration Descriptor improperly configured. */ +#define BLE_GATT_STATUS_ATTERR_CPS_PROC_ALR_IN_PROG 0x01FE /**< ATT Common Profile and Service Error: Procedure Already in Progress. */ +#define BLE_GATT_STATUS_ATTERR_CPS_OUT_OF_RANGE 0x01FF /**< ATT Common Profile and Service Error: Out Of Range. */ +/** @} */ + + +/** @defgroup BLE_GATT_CPF_FORMATS Characteristic Presentation Formats + * @note Found at http://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorViewer.aspx?u=org.bluetooth.descriptor.gatt.characteristic_presentation_format.xml + * @{ */ +#define BLE_GATT_CPF_FORMAT_RFU 0x00 /**< Reserved For Future Use. */ +#define BLE_GATT_CPF_FORMAT_BOOLEAN 0x01 /**< Boolean. */ +#define BLE_GATT_CPF_FORMAT_2BIT 0x02 /**< Unsigned 2-bit integer. */ +#define BLE_GATT_CPF_FORMAT_NIBBLE 0x03 /**< Unsigned 4-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT8 0x04 /**< Unsigned 8-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT12 0x05 /**< Unsigned 12-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT16 0x06 /**< Unsigned 16-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT24 0x07 /**< Unsigned 24-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT32 0x08 /**< Unsigned 32-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT48 0x09 /**< Unsigned 48-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT64 0x0A /**< Unsigned 64-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT128 0x0B /**< Unsigned 128-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT8 0x0C /**< Signed 2-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT12 0x0D /**< Signed 12-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT16 0x0E /**< Signed 16-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT24 0x0F /**< Signed 24-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT32 0x10 /**< Signed 32-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT48 0x11 /**< Signed 48-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT64 0x12 /**< Signed 64-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT128 0x13 /**< Signed 128-bit integer. */ +#define BLE_GATT_CPF_FORMAT_FLOAT32 0x14 /**< IEEE-754 32-bit floating point. */ +#define BLE_GATT_CPF_FORMAT_FLOAT64 0x15 /**< IEEE-754 64-bit floating point. */ +#define BLE_GATT_CPF_FORMAT_SFLOAT 0x16 /**< IEEE-11073 16-bit SFLOAT. */ +#define BLE_GATT_CPF_FORMAT_FLOAT 0x17 /**< IEEE-11073 32-bit FLOAT. */ +#define BLE_GATT_CPF_FORMAT_DUINT16 0x18 /**< IEEE-20601 format. */ +#define BLE_GATT_CPF_FORMAT_UTF8S 0x19 /**< UTF-8 string. */ +#define BLE_GATT_CPF_FORMAT_UTF16S 0x1A /**< UTF-16 string. */ +#define BLE_GATT_CPF_FORMAT_STRUCT 0x1B /**< Opaque Structure. */ +/** @} */ + +/** @defgroup BLE_GATT_CPF_NAMESPACES GATT Bluetooth Namespaces + * @{ + */ +#define BLE_GATT_CPF_NAMESPACE_BTSIG 0x01 /**< Bluetooth SIG defined Namespace. */ +#define BLE_GATT_CPF_NAMESPACE_DESCRIPTION_UNKNOWN 0x0000 /**< Namespace Description Unknown. */ +/** @} */ + +/** @} */ + +/** @addtogroup BLE_GATT_STRUCTURES Structures + * @{ */ + +/**@brief GATT Characteristic Properties. */ +typedef struct +{ + /* Standard properties */ + uint8_t broadcast :1; /**< Broadcasting of the value permitted. */ + uint8_t read :1; /**< Reading the value permitted. */ + uint8_t write_wo_resp :1; /**< Writing the value with Write Command permitted. */ + uint8_t write :1; /**< Writing the value with Write Request permitted. */ + uint8_t notify :1; /**< Notications of the value permitted. */ + uint8_t indicate :1; /**< Indications of the value permitted. */ + uint8_t auth_signed_wr :1; /**< Writing the value with Signed Write Command permitted. */ +} ble_gatt_char_props_t; + +/**@brief GATT Characteristic Extended Properties. */ +typedef struct +{ + /* Extended properties */ + uint8_t reliable_wr :1; /**< Writing the value with Queued Write operations permitted. */ + uint8_t wr_aux :1; /**< Writing the Characteristic User Description descriptor permitted. */ +} ble_gatt_char_ext_props_t; + +#ifdef __cplusplus +} +#endif +#endif // BLE_GATT_H__ + +/** @} */ + +/** + @} + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gattc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gattc.h new file mode 100644 index 0000000000..3515063a9b --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gattc.h @@ -0,0 +1,569 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 BLE_GATTC Generic Attribute Profile (GATT) Client + @{ + @brief Definitions and prototypes for the GATT Client interface. + */ + +#ifndef BLE_GATTC_H__ +#define BLE_GATTC_H__ + +#include "ble_gatt.h" +#include "ble_types.h" +#include "ble_ranges.h" +#include "nrf_svc.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup BLE_GATTC_ENUMERATIONS Enumerations + * @{ */ + +/**@brief GATTC API SVC numbers. */ +enum BLE_GATTC_SVCS +{ + SD_BLE_GATTC_PRIMARY_SERVICES_DISCOVER = BLE_GATTC_SVC_BASE, /**< Primary Service Discovery. */ + SD_BLE_GATTC_RELATIONSHIPS_DISCOVER, /**< Relationship Discovery. */ + SD_BLE_GATTC_CHARACTERISTICS_DISCOVER, /**< Characteristic Discovery. */ + SD_BLE_GATTC_DESCRIPTORS_DISCOVER, /**< Characteristic Descriptor Discovery. */ + SD_BLE_GATTC_ATTR_INFO_DISCOVER, /**< Attribute Information Discovery. */ + SD_BLE_GATTC_CHAR_VALUE_BY_UUID_READ, /**< Read Characteristic Value by UUID. */ + SD_BLE_GATTC_READ, /**< Generic read. */ + SD_BLE_GATTC_CHAR_VALUES_READ, /**< Read multiple Characteristic Values. */ + SD_BLE_GATTC_WRITE, /**< Generic write. */ + SD_BLE_GATTC_HV_CONFIRM, /**< Handle Value Confirmation. */ +}; + +/** + * @brief GATT Client Event IDs. + */ +enum BLE_GATTC_EVTS +{ + BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP = BLE_GATTC_EVT_BASE, /**< Primary Service Discovery Response event. \n See @ref ble_gattc_evt_prim_srvc_disc_rsp_t. */ + BLE_GATTC_EVT_REL_DISC_RSP, /**< Relationship Discovery Response event. \n See @ref ble_gattc_evt_rel_disc_rsp_t. */ + BLE_GATTC_EVT_CHAR_DISC_RSP, /**< Characteristic Discovery Response event. \n See @ref ble_gattc_evt_char_disc_rsp_t. */ + BLE_GATTC_EVT_DESC_DISC_RSP, /**< Descriptor Discovery Response event. \n See @ref ble_gattc_evt_desc_disc_rsp_t. */ + BLE_GATTC_EVT_ATTR_INFO_DISC_RSP, /**< Attribute Information Response event. \n See @ref ble_gattc_evt_attr_info_disc_rsp_t. */ + BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP, /**< Read By UUID Response event. \n See @ref ble_gattc_evt_char_val_by_uuid_read_rsp_t. */ + BLE_GATTC_EVT_READ_RSP, /**< Read Response event. \n See @ref ble_gattc_evt_read_rsp_t. */ + BLE_GATTC_EVT_CHAR_VALS_READ_RSP, /**< Read multiple Response event. \n See @ref ble_gattc_evt_char_vals_read_rsp_t. */ + BLE_GATTC_EVT_WRITE_RSP, /**< Write Response event. \n See @ref ble_gattc_evt_write_rsp_t. */ + BLE_GATTC_EVT_HVX, /**< Handle Value Notification or Indication event. \n Confirm indication with @ref sd_ble_gattc_hv_confirm. \n See @ref ble_gattc_evt_hvx_t. */ + BLE_GATTC_EVT_TIMEOUT /**< Timeout event. \n See @ref ble_gattc_evt_timeout_t. */ +}; + +/** @} */ + +/** @addtogroup BLE_GATTC_DEFINES Defines + * @{ */ + +/** @defgroup BLE_ERRORS_GATTC SVC return values specific to GATTC + * @{ */ +#define BLE_ERROR_GATTC_PROC_NOT_PERMITTED (NRF_GATTC_ERR_BASE + 0x000) /**< Procedure not Permitted. */ +/** @} */ + +/** @defgroup BLE_GATTC_ATTR_INFO_FORMAT Attribute Information Formats + * @{ */ +#define BLE_GATTC_ATTR_INFO_FORMAT_16BIT 1 /**< 16-bit Attribute Information Format. */ +#define BLE_GATTC_ATTR_INFO_FORMAT_128BIT 2 /**< 128-bit Attribute Information Format. */ +/** @} */ + +/** @} */ + +/** @addtogroup BLE_GATTC_STRUCTURES Structures + * @{ */ + +/**@brief Operation Handle Range. */ +typedef struct +{ + uint16_t start_handle; /**< Start Handle. */ + uint16_t end_handle; /**< End Handle. */ +} ble_gattc_handle_range_t; + + +/**@brief GATT service. */ +typedef struct +{ + ble_uuid_t uuid; /**< Service UUID. */ + ble_gattc_handle_range_t handle_range; /**< Service Handle Range. */ +} ble_gattc_service_t; + + +/**@brief GATT include. */ +typedef struct +{ + uint16_t handle; /**< Include Handle. */ + ble_gattc_service_t included_srvc; /**< Handle of the included service. */ +} ble_gattc_include_t; + + +/**@brief GATT characteristic. */ +typedef struct +{ + ble_uuid_t uuid; /**< Characteristic UUID. */ + ble_gatt_char_props_t char_props; /**< Characteristic Properties. */ + uint8_t char_ext_props : 1; /**< Extended properties present. */ + uint16_t handle_decl; /**< Handle of the Characteristic Declaration. */ + uint16_t handle_value; /**< Handle of the Characteristic Value. */ +} ble_gattc_char_t; + + +/**@brief GATT descriptor. */ +typedef struct +{ + uint16_t handle; /**< Descriptor Handle. */ + ble_uuid_t uuid; /**< Descriptor UUID. */ +} ble_gattc_desc_t; + + +/**@brief Write Parameters. */ +typedef struct +{ + uint8_t write_op; /**< Write Operation to be performed, see @ref BLE_GATT_WRITE_OPS. */ + uint8_t flags; /**< Flags, see @ref BLE_GATT_EXEC_WRITE_FLAGS. */ + uint16_t handle; /**< Handle to the attribute to be written. */ + uint16_t offset; /**< Offset in bytes. @note For WRITE_CMD and WRITE_REQ, offset must be 0. */ + uint16_t len; /**< Length of data in bytes. */ + uint8_t *p_value; /**< Pointer to the value data. */ +} ble_gattc_write_params_t; + +/**@brief Attribute Information. */ +typedef struct +{ + uint16_t handle; /**< Attribute handle. */ + union { + ble_uuid_t uuid16; /**< 16-bit Attribute UUID. */ + ble_uuid128_t uuid128; /**< 128-bit Attribute UUID. */ + } info; +} ble_gattc_attr_info_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP. */ +typedef struct +{ + uint16_t count; /**< Service count. */ + ble_gattc_service_t services[1]; /**< Service data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gattc_evt_prim_srvc_disc_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_REL_DISC_RSP. */ +typedef struct +{ + uint16_t count; /**< Include count. */ + ble_gattc_include_t includes[1]; /**< Include data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gattc_evt_rel_disc_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_CHAR_DISC_RSP. */ +typedef struct +{ + uint16_t count; /**< Characteristic count. */ + ble_gattc_char_t chars[1]; /**< Characteristic data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gattc_evt_char_disc_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_DESC_DISC_RSP. */ +typedef struct +{ + uint16_t count; /**< Descriptor count. */ + ble_gattc_desc_t descs[1]; /**< Descriptor data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gattc_evt_desc_disc_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_ATTR_INFO_DISC_RSP. */ +typedef struct +{ + uint16_t count; /**< Attribute count. */ + uint8_t format; /**< Attribute information format, see @ref BLE_GATTC_ATTR_INFO_FORMAT. */ + ble_gattc_attr_info_t attr_info[1]; /**< Attribute information. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gattc_evt_attr_info_disc_rsp_t; + +/**@brief GATT read by UUID handle value pair. */ +typedef struct +{ + uint16_t handle; /**< Attribute Handle. */ + uint8_t *p_value; /**< Pointer to value, variable length (length available as value_len in @ref ble_gattc_evt_char_val_by_uuid_read_rsp_t). + Please note that this pointer is absolute to the memory provided by the user when retrieving the event, + so it will effectively point to a location inside the handle_value array. */ +} ble_gattc_handle_value_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP. */ +typedef struct +{ + uint16_t count; /**< Handle-Value Pair Count. */ + uint16_t value_len; /**< Length of the value in Handle-Value(s) list. */ + ble_gattc_handle_value_t handle_value[1]; /**< Handle-Value(s) list. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gattc_evt_char_val_by_uuid_read_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_READ_RSP. */ +typedef struct +{ + uint16_t handle; /**< Attribute Handle. */ + uint16_t offset; /**< Offset of the attribute data. */ + uint16_t len; /**< Attribute data length. */ + uint8_t data[1]; /**< Attribute data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gattc_evt_read_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_CHAR_VALS_READ_RSP. */ +typedef struct +{ + uint16_t len; /**< Concatenated Attribute values length. */ + uint8_t values[1]; /**< Attribute values. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gattc_evt_char_vals_read_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_WRITE_RSP. */ +typedef struct +{ + uint16_t handle; /**< Attribute Handle. */ + uint8_t write_op; /**< Type of write operation, see @ref BLE_GATT_WRITE_OPS. */ + uint16_t offset; /**< Data offset. */ + uint16_t len; /**< Data length. */ + uint8_t data[1]; /**< Data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gattc_evt_write_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_HVX. */ +typedef struct +{ + uint16_t handle; /**< Handle to which the HVx operation applies. */ + uint8_t type; /**< Indication or Notification, see @ref BLE_GATT_HVX_TYPES. */ + uint16_t len; /**< Attribute data length. */ + uint8_t data[1]; /**< Attribute data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gattc_evt_hvx_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_TIMEOUT. */ +typedef struct +{ + uint8_t src; /**< Timeout source, see @ref BLE_GATT_TIMEOUT_SOURCES. */ +} ble_gattc_evt_timeout_t; + +/**@brief GATTC event structure. */ +typedef struct +{ + uint16_t conn_handle; /**< Connection Handle on which event occured. */ + uint16_t gatt_status; /**< GATT status code for the operation, see @ref BLE_GATT_STATUS_CODES. */ + uint16_t error_handle; /**< In case of error: The handle causing the error. In all other cases @ref BLE_GATT_HANDLE_INVALID. */ + union + { + ble_gattc_evt_prim_srvc_disc_rsp_t prim_srvc_disc_rsp; /**< Primary Service Discovery Response Event Parameters. */ + ble_gattc_evt_rel_disc_rsp_t rel_disc_rsp; /**< Relationship Discovery Response Event Parameters. */ + ble_gattc_evt_char_disc_rsp_t char_disc_rsp; /**< Characteristic Discovery Response Event Parameters. */ + ble_gattc_evt_desc_disc_rsp_t desc_disc_rsp; /**< Descriptor Discovery Response Event Parameters. */ + ble_gattc_evt_char_val_by_uuid_read_rsp_t char_val_by_uuid_read_rsp; /**< Characteristic Value Read by UUID Response Event Parameters. */ + ble_gattc_evt_read_rsp_t read_rsp; /**< Read Response Event Parameters. */ + ble_gattc_evt_char_vals_read_rsp_t char_vals_read_rsp; /**< Characteristic Values Read Response Event Parameters. */ + ble_gattc_evt_write_rsp_t write_rsp; /**< Write Response Event Parameters. */ + ble_gattc_evt_hvx_t hvx; /**< Handle Value Notification/Indication Event Parameters. */ + ble_gattc_evt_timeout_t timeout; /**< Timeout Event Parameters. */ + ble_gattc_evt_attr_info_disc_rsp_t attr_info_disc_rsp; /**< Attribute Information Discovery Event Parameters. */ + } params; /**< Event Parameters. @note Only valid if @ref gatt_status == @ref BLE_GATT_STATUS_SUCCESS. */ +} ble_gattc_evt_t; +/** @} */ + +/** @addtogroup BLE_GATTC_FUNCTIONS Functions + * @{ */ + +/**@brief Initiate or continue a GATT Primary Service Discovery procedure. + * + * @details This function initiates or resumes a Primary Service discovery procedure, starting from the supplied handle. + * If the last service has not been reached, this function must be called again with an updated start handle value to continue the search. + * + * @note If any of the discovered services have 128-bit UUIDs which are not present in the table provided to ble_vs_uuids_assign, a UUID structure with + * type @ref BLE_UUID_TYPE_UNKNOWN will be received in the corresponding event. + * + * @events + * @event{@ref BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_PRIM_SRVC_DISC_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] start_handle Handle to start searching from. + * @param[in] p_srvc_uuid Pointer to the service UUID to be found. If it is NULL, all primary services will be returned. + * + * @retval ::NRF_SUCCESS Successfully started or resumed the Primary Service Discovery procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + */ +SVCALL(SD_BLE_GATTC_PRIMARY_SERVICES_DISCOVER, uint32_t, sd_ble_gattc_primary_services_discover(uint16_t conn_handle, uint16_t start_handle, ble_uuid_t const *p_srvc_uuid)); + + +/**@brief Initiate or continue a GATT Relationship Discovery procedure. + * + * @details This function initiates or resumes the Find Included Services sub-procedure. If the last included service has not been reached, + * this must be called again with an updated handle range to continue the search. + * + * @events + * @event{@ref BLE_GATTC_EVT_REL_DISC_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_REL_DISC_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on. + * + * @retval ::NRF_SUCCESS Successfully started or resumed the Relationship Discovery procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + */ +SVCALL(SD_BLE_GATTC_RELATIONSHIPS_DISCOVER, uint32_t, sd_ble_gattc_relationships_discover(uint16_t conn_handle, ble_gattc_handle_range_t const *p_handle_range)); + + +/**@brief Initiate or continue a GATT Characteristic Discovery procedure. + * + * @details This function initiates or resumes a Characteristic discovery procedure. If the last Characteristic has not been reached, + * this must be called again with an updated handle range to continue the discovery. + * + * @note If any of the discovered characteristics have 128-bit UUIDs which are not present in the table provided to ble_vs_uuids_assign, a UUID structure with + * type @ref BLE_UUID_TYPE_UNKNOWN will be received in the corresponding event. + * + * @events + * @event{@ref BLE_GATTC_EVT_CHAR_DISC_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_CHAR_DISC_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on. + * + * @retval ::NRF_SUCCESS Successfully started or resumed the Characteristic Discovery procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + */ +SVCALL(SD_BLE_GATTC_CHARACTERISTICS_DISCOVER, uint32_t, sd_ble_gattc_characteristics_discover(uint16_t conn_handle, ble_gattc_handle_range_t const *p_handle_range)); + + +/**@brief Initiate or continue a GATT Characteristic Descriptor Discovery procedure. + * + * @details This function initiates or resumes a Characteristic Descriptor discovery procedure. If the last Descriptor has not been reached, + * this must be called again with an updated handle range to continue the discovery. + * + * @events + * @event{BLE_GATTC_EVT_DESC_DISC_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_DESC_DISC_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] p_handle_range A pointer to the range of handles of the Characteristic to perform this procedure on. + * + * @retval ::NRF_SUCCESS Successfully started or resumed the Descriptor Discovery procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + */ +SVCALL(SD_BLE_GATTC_DESCRIPTORS_DISCOVER, uint32_t, sd_ble_gattc_descriptors_discover(uint16_t conn_handle, ble_gattc_handle_range_t const *p_handle_range)); + + +/**@brief Initiate or continue a GATT Read using Characteristic UUID procedure. + * + * @details This function initiates or resumes a Read using Characteristic UUID procedure. If the last Characteristic has not been reached, + * this must be called again with an updated handle range to continue the discovery. + * + * @events + * @event{BLE_GATTC_EVT_DESC_DISC_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_READ_UUID_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] p_uuid Pointer to a Characteristic value UUID to read. + * @param[in] p_handle_range A pointer to the range of handles to perform this procedure on. + * + * @retval ::NRF_SUCCESS Successfully started or resumed the Read using Characteristic UUID procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + */ +SVCALL(SD_BLE_GATTC_CHAR_VALUE_BY_UUID_READ, uint32_t, sd_ble_gattc_char_value_by_uuid_read(uint16_t conn_handle, ble_uuid_t const *p_uuid, ble_gattc_handle_range_t const *p_handle_range)); + + +/**@brief Initiate or continue a GATT Read (Long) Characteristic or Descriptor procedure. + * + * @details This function initiates or resumes a GATT Read (Long) Characteristic or Descriptor procedure. If the Characteristic or Descriptor + * to be read is longer than ATT_MTU - 1, this function must be called multiple times with appropriate offset to read the + * complete value. + * + * @events + * @event{@ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_VALUE_READ_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] handle The handle of the attribute to be read. + * @param[in] offset Offset into the attribute value to be read. + * + * @retval ::NRF_SUCCESS Successfully started or resumed the Read (Long) procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + */ +SVCALL(SD_BLE_GATTC_READ, uint32_t, sd_ble_gattc_read(uint16_t conn_handle, uint16_t handle, uint16_t offset)); + + +/**@brief Initiate a GATT Read Multiple Characteristic Values procedure. + * + * @details This function initiates a GATT Read Multiple Characteristic Values procedure. + * + * @events + * @event{@ref BLE_GATTC_EVT_CHAR_VALS_READ_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_READ_MULT_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] p_handles A pointer to the handle(s) of the attribute(s) to be read. + * @param[in] handle_count The number of handles in p_handles. + * + * @retval ::NRF_SUCCESS Successfully started the Read Multiple Characteristic Values procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + */ +SVCALL(SD_BLE_GATTC_CHAR_VALUES_READ, uint32_t, sd_ble_gattc_char_values_read(uint16_t conn_handle, uint16_t const *p_handles, uint16_t handle_count)); + + +/**@brief Perform a Write (Characteristic Value or Descriptor, with or without response, signed or not, long or reliable) procedure. + * + * @details This function can perform all write procedures described in GATT. + * + * @note It is important to note that a write without response will consume an application buffer, and will therefore + * generate a @ref BLE_EVT_TX_COMPLETE event when the packet has been transmitted. A write (with response) on the other hand will use the + * standard client internal buffer and thus will only generate a @ref BLE_GATTC_EVT_WRITE_RSP event as soon as the write response + * has been received from the peer. Please see the documentation of @ref sd_ble_tx_packet_count_get for more details. + * + * @events + * @event{@ref BLE_GATTC_EVT_WRITE_RSP, Generated when using write request or queued writes.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_VALUE_WRITE_MSC} + * @mmsc{@ref BLE_GATTC_VALUE_LONG_WRITE_MSC} + * @mmsc{@ref BLE_GATTC_VALUE_RELIABLE_WRITE_MSC} + * @mmsc{@ref BLE_COMMON_APP_BUFF_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] p_write_params A pointer to a write parameters structure. + * + * @retval ::NRF_SUCCESS Successfully started the Write procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied. + * @retval ::NRF_ERROR_BUSY Procedure already in progress. + * @retval ::BLE_ERROR_NO_TX_PACKETS No available application packets for this connection. + */ +SVCALL(SD_BLE_GATTC_WRITE, uint32_t, sd_ble_gattc_write(uint16_t conn_handle, ble_gattc_write_params_t const *p_write_params)); + + +/**@brief Send a Handle Value Confirmation to the GATT Server. + * + * @mscs + * @mmsc{@ref BLE_GATTC_HVI_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] handle The handle of the attribute in the indication. + * + * @retval ::NRF_SUCCESS Successfully queued the Handle Value Confirmation for transmission. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State or no Indication pending to be confirmed. + * @retval ::BLE_ERROR_INVALID_ATTR_HANDLE Invalid attribute handle. + */ +SVCALL(SD_BLE_GATTC_HV_CONFIRM, uint32_t, sd_ble_gattc_hv_confirm(uint16_t conn_handle, uint16_t handle)); + +/**@brief Discovers information about a range of attributes on a GATT server. + * + * @events + * @event{@ref BLE_GATTC_EVT_ATTR_INFO_DISC_RSP, Generated when information about a range of attributes has been received.} + * @endevents + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] p_handle_range The range of handles to request information about. + * + * @retval ::NRF_SUCCESS Successfully started an attribute information discovery procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid connection state + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + */ +SVCALL(SD_BLE_GATTC_ATTR_INFO_DISCOVER, uint32_t, sd_ble_gattc_attr_info_discover(uint16_t conn_handle, ble_gattc_handle_range_t const * p_handle_range)); + +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif /* BLE_GATTC_H__ */ + +/** + @} + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gatts.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gatts.h new file mode 100644 index 0000000000..93db0b35c2 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gatts.h @@ -0,0 +1,722 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 BLE_GATTS Generic Attribute Profile (GATT) Server + @{ + @brief Definitions and prototypes for the GATTS interface. + */ + +#ifndef BLE_GATTS_H__ +#define BLE_GATTS_H__ + +#include "ble_types.h" +#include "ble_ranges.h" +#include "ble_l2cap.h" +#include "ble_gap.h" +#include "ble_gatt.h" +#include "nrf_svc.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup BLE_GATTS_ENUMERATIONS Enumerations + * @{ */ + +/** + * @brief GATTS API SVC numbers. + */ +enum BLE_GATTS_SVCS +{ + SD_BLE_GATTS_SERVICE_ADD = BLE_GATTS_SVC_BASE, /**< Add a service. */ + SD_BLE_GATTS_INCLUDE_ADD, /**< Add an included service. */ + SD_BLE_GATTS_CHARACTERISTIC_ADD, /**< Add a characteristic. */ + SD_BLE_GATTS_DESCRIPTOR_ADD, /**< Add a generic attribute. */ + SD_BLE_GATTS_VALUE_SET, /**< Set an attribute value. */ + SD_BLE_GATTS_VALUE_GET, /**< Get an attribute value. */ + SD_BLE_GATTS_HVX, /**< Handle Value Notification or Indication. */ + SD_BLE_GATTS_SERVICE_CHANGED, /**< Perform a Service Changed Indication to one or more peers. */ + SD_BLE_GATTS_RW_AUTHORIZE_REPLY, /**< Reply to an authorization request for a read or write operation on one or more attributes. */ + SD_BLE_GATTS_SYS_ATTR_SET, /**< Set the persistent system attributes for a connection. */ + SD_BLE_GATTS_SYS_ATTR_GET, /**< Retrieve the persistent system attributes. */ + SD_BLE_GATTS_INITIAL_USER_HANDLE_GET, /**< Retrieve the first valid user handle. */ + SD_BLE_GATTS_ATTR_GET /**< Retrieve the UUID and/or metadata of an attribute. */ +}; + +/** + * @brief GATT Server Event IDs. + */ +enum BLE_GATTS_EVTS +{ + BLE_GATTS_EVT_WRITE = BLE_GATTS_EVT_BASE, /**< Write operation performed. \n See @ref ble_gatts_evt_write_t. */ + BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST, /**< Read/Write Authorization request. \n Reply with @ref sd_ble_gatts_rw_authorize_reply. \n See @ref ble_gatts_evt_rw_authorize_request_t. */ + BLE_GATTS_EVT_SYS_ATTR_MISSING, /**< A persistent system attribute access is pending. \n Respond with @ref sd_ble_gatts_sys_attr_set. \n See @ref ble_gatts_evt_sys_attr_missing_t. */ + BLE_GATTS_EVT_HVC, /**< Handle Value Confirmation. \n See @ref ble_gatts_evt_hvc_t. */ + BLE_GATTS_EVT_SC_CONFIRM, /**< Service Changed Confirmation. No additional event structure applies. */ + BLE_GATTS_EVT_TIMEOUT /**< Peer failed to resonpond to an ATT request in time. \n See @ref ble_gatts_evt_timeout_t. */ +}; +/** @} */ + +/** @addtogroup BLE_GATTS_DEFINES Defines + * @{ */ + +/** @defgroup BLE_ERRORS_GATTS SVC return values specific to GATTS + * @{ */ +#define BLE_ERROR_GATTS_INVALID_ATTR_TYPE (NRF_GATTS_ERR_BASE + 0x000) /**< Invalid attribute type. */ +#define BLE_ERROR_GATTS_SYS_ATTR_MISSING (NRF_GATTS_ERR_BASE + 0x001) /**< System Attributes missing. */ +/** @} */ + +/** @defgroup BLE_GATTS_ATTR_LENS_MAX Maximum attribute lengths + * @{ */ +#define BLE_GATTS_FIX_ATTR_LEN_MAX (510) /**< Maximum length for fixed length Attribute Values. */ +#define BLE_GATTS_VAR_ATTR_LEN_MAX (512) /**< Maximum length for variable length Attribute Values. */ +/** @} */ + +/** @defgroup BLE_GATTS_SRVC_TYPES GATT Server Service Types + * @{ */ +#define BLE_GATTS_SRVC_TYPE_INVALID 0x00 /**< Invalid Service Type. */ +#define BLE_GATTS_SRVC_TYPE_PRIMARY 0x01 /**< Primary Service. */ +#define BLE_GATTS_SRVC_TYPE_SECONDARY 0x02 /**< Secondary Type. */ +/** @} */ + + +/** @defgroup BLE_GATTS_ATTR_TYPES GATT Server Attribute Types + * @{ */ +#define BLE_GATTS_ATTR_TYPE_INVALID 0x00 /**< Invalid Attribute Type. */ +#define BLE_GATTS_ATTR_TYPE_PRIM_SRVC_DECL 0x01 /**< Primary Service Declaration. */ +#define BLE_GATTS_ATTR_TYPE_SEC_SRVC_DECL 0x02 /**< Secondary Service Declaration. */ +#define BLE_GATTS_ATTR_TYPE_INC_DECL 0x03 /**< Include Declaration. */ +#define BLE_GATTS_ATTR_TYPE_CHAR_DECL 0x04 /**< Characteristic Declaration. */ +#define BLE_GATTS_ATTR_TYPE_CHAR_VAL 0x05 /**< Characteristic Value. */ +#define BLE_GATTS_ATTR_TYPE_DESC 0x06 /**< Descriptor. */ +#define BLE_GATTS_ATTR_TYPE_OTHER 0x07 /**< Other, non-GATT specific type. */ +/** @} */ + + +/** @defgroup BLE_GATTS_OPS GATT Server Operations + * @{ */ +#define BLE_GATTS_OP_INVALID 0x00 /**< Invalid Operation. */ +#define BLE_GATTS_OP_WRITE_REQ 0x01 /**< Write Request. */ +#define BLE_GATTS_OP_WRITE_CMD 0x02 /**< Write Command. */ +#define BLE_GATTS_OP_SIGN_WRITE_CMD 0x03 /**< Signed Write Command. */ +#define BLE_GATTS_OP_PREP_WRITE_REQ 0x04 /**< Prepare Write Request. */ +#define BLE_GATTS_OP_EXEC_WRITE_REQ_CANCEL 0x05 /**< Execute Write Request: Cancel all prepared writes. */ +#define BLE_GATTS_OP_EXEC_WRITE_REQ_NOW 0x06 /**< Execute Write Request: Immediately execute all prepared writes. */ +/** @} */ + +/** @defgroup BLE_GATTS_VLOCS GATT Value Locations + * @{ */ +#define BLE_GATTS_VLOC_INVALID 0x00 /**< Invalid Location. */ +#define BLE_GATTS_VLOC_STACK 0x01 /**< Attribute Value is located in stack memory, no user memory is required. */ +#define BLE_GATTS_VLOC_USER 0x02 /**< Attribute Value is located in user memory. This requires the user to maintain a valid buffer through the lifetime of the attribute, since the stack + will read and write directly to the memory using the pointer provided in the APIs. There are no alignment requirements for the buffer. */ +/** @} */ + +/** @defgroup BLE_GATTS_AUTHORIZE_TYPES GATT Server Authorization Types + * @{ */ +#define BLE_GATTS_AUTHORIZE_TYPE_INVALID 0x00 /**< Invalid Type. */ +#define BLE_GATTS_AUTHORIZE_TYPE_READ 0x01 /**< Authorize a Read Operation. */ +#define BLE_GATTS_AUTHORIZE_TYPE_WRITE 0x02 /**< Authorize a Write Request Operation. */ +/** @} */ + +/** @defgroup BLE_GATTS_SYS_ATTR_FLAGS System Attribute Flags + * @{ */ +#define BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS (1 << 0) /**< Restrict system attributes to system services only. */ +#define BLE_GATTS_SYS_ATTR_FLAG_USR_SRVCS (1 << 1) /**< Restrict system attributes to user services only. */ +/** @} */ + +/** @defgroup BLE_GATTS_ATTR_TAB_SIZE Attribute Table size + * @{ + */ +#define BLE_GATTS_ATTR_TAB_SIZE_MIN 216 /**< Minimum Attribute Table size */ +#define BLE_GATTS_ATTR_TAB_SIZE_DEFAULT 0x0000 /**< Default Attribute Table size (0x580 bytes for this version of the SoftDevice). */ +/** @} */ + +/** @} */ + +/** @addtogroup BLE_GATTS_STRUCTURES Structures + * @{ */ + +/** + * @brief BLE GATTS initialization parameters. + */ +typedef struct +{ + uint8_t service_changed:1; /**< Include the Service Changed characteristic in the Attribute Table. */ + uint32_t attr_tab_size; /**< Attribute Table size in bytes. The size must be a multiple of 4. @ref BLE_GATTS_ATTR_TAB_SIZE_DEFAULT is used to set the default size. */ +} ble_gatts_enable_params_t; + +/**@brief Attribute metadata. */ +typedef struct +{ + ble_gap_conn_sec_mode_t read_perm; /**< Read permissions. */ + ble_gap_conn_sec_mode_t write_perm; /**< Write permissions. */ + uint8_t vlen :1; /**< Variable length attribute. */ + uint8_t vloc :2; /**< Value location, see @ref BLE_GATTS_VLOCS.*/ + uint8_t rd_auth :1; /**< Read authorization and value will be requested from the application on every read operation. */ + uint8_t wr_auth :1; /**< Write authorization will be requested from the application on every Write Request operation (but not Write Command). */ +} ble_gatts_attr_md_t; + + +/**@brief GATT Attribute. */ +typedef struct +{ + ble_uuid_t *p_uuid; /**< Pointer to the attribute UUID. */ + ble_gatts_attr_md_t *p_attr_md; /**< Pointer to the attribute metadata structure. */ + uint16_t init_len; /**< Initial attribute value length in bytes. */ + uint16_t init_offs; /**< Initial attribute value offset in bytes. If different from zero, the first init_offs bytes of the attribute value will be left uninitialized. */ + uint16_t max_len; /**< Maximum attribute value length in bytes, see @ref BLE_GATTS_ATTR_LENS_MAX for maximum values. */ + uint8_t* p_value; /**< Pointer to the attribute data. Please note that if the @ref BLE_GATTS_VLOC_USER value location is selected in the attribute metadata, this will have to point to a buffer + that remains valid through the lifetime of the attribute. This excludes usage of automatic variables that may go out of scope or any other temporary location. + The stack may access that memory directly without the application's knowledge. For writable characteristics, this value must not be a location in flash memory.*/ +} ble_gatts_attr_t; + +/**@brief GATT Attribute Value. */ +typedef struct +{ + uint16_t len; /**< Length in bytes to be written or read. Length in bytes written or read after successful return.*/ + uint16_t offset; /**< Attribute value offset. */ + uint8_t *p_value; /**< Pointer to where value is stored or will be stored. + If value is stored in user memory, only the attribute length is updated when p_value == NULL. + Set to NULL when reading to obtain the complete length of the attribute value */ +} ble_gatts_value_t; + + +/**@brief GATT Characteristic Presentation Format. */ +typedef struct +{ + uint8_t format; /**< Format of the value, see @ref BLE_GATT_CPF_FORMATS. */ + int8_t exponent; /**< Exponent for integer data types. */ + uint16_t unit; /**< Unit from Bluetooth Assigned Numbers. */ + uint8_t name_space; /**< Namespace from Bluetooth Assigned Numbers, see @ref BLE_GATT_CPF_NAMESPACES. */ + uint16_t desc; /**< Namespace description from Bluetooth Assigned Numbers, see @ref BLE_GATT_CPF_NAMESPACES. */ +} ble_gatts_char_pf_t; + + +/**@brief GATT Characteristic metadata. */ +typedef struct +{ + ble_gatt_char_props_t char_props; /**< Characteristic Properties. */ + ble_gatt_char_ext_props_t char_ext_props; /**< Characteristic Extended Properties. */ + uint8_t *p_char_user_desc; /**< Pointer to a UTF-8 encoded string (non-NULL terminated), NULL if the descriptor is not required. */ + uint16_t char_user_desc_max_size; /**< The maximum size in bytes of the user description descriptor. */ + uint16_t char_user_desc_size; /**< The size of the user description, must be smaller or equal to char_user_desc_max_size. */ + ble_gatts_char_pf_t* p_char_pf; /**< Pointer to a presentation format structure or NULL if the CPF descriptor is not required. */ + ble_gatts_attr_md_t* p_user_desc_md; /**< Attribute metadata for the User Description descriptor, or NULL for default values. */ + ble_gatts_attr_md_t* p_cccd_md; /**< Attribute metadata for the Client Characteristic Configuration Descriptor, or NULL for default values. */ + ble_gatts_attr_md_t* p_sccd_md; /**< Attribute metadata for the Server Characteristic Configuration Descriptor, or NULL for default values. */ +} ble_gatts_char_md_t; + + +/**@brief GATT Characteristic Definition Handles. */ +typedef struct +{ + uint16_t value_handle; /**< Handle to the characteristic value. */ + uint16_t user_desc_handle; /**< Handle to the User Description descriptor, or @ref BLE_GATT_HANDLE_INVALID if not present. */ + uint16_t cccd_handle; /**< Handle to the Client Characteristic Configuration Descriptor, or @ref BLE_GATT_HANDLE_INVALID if not present. */ + uint16_t sccd_handle; /**< Handle to the Server Characteristic Configuration Descriptor, or @ref BLE_GATT_HANDLE_INVALID if not present. */ +} ble_gatts_char_handles_t; + + +/**@brief GATT HVx parameters. */ +typedef struct +{ + uint16_t handle; /**< Characteristic Value Handle. */ + uint8_t type; /**< Indication or Notification, see @ref BLE_GATT_HVX_TYPES. */ + uint16_t offset; /**< Offset within the attribute value. */ + uint16_t *p_len; /**< Length in bytes to be written, length in bytes written after successful return. */ + uint8_t *p_data; /**< Actual data content, use NULL to use the current attribute value. */ +} ble_gatts_hvx_params_t; + +/**@brief GATT Authorization parameters. */ +typedef struct +{ + uint16_t gatt_status; /**< GATT status code for the operation, see @ref BLE_GATT_STATUS_CODES. */ + uint8_t update : 1; /**< If set, data supplied in p_data will be used to update the attribute value. + Please note that for @ref BLE_GATTS_OP_WRITE_REQ operations this bit must always be set, + as the data to be written needs to be stored and later provided by the application. */ + uint16_t offset; /**< Offset of the attribute value being updated. */ + uint16_t len; /**< Length in bytes of the value in p_data pointer, see @ref BLE_GATTS_ATTR_LENS_MAX. */ + const uint8_t *p_data; /**< Pointer to new value used to update the attribute value. */ +} ble_gatts_authorize_params_t; + +/**@brief GATT Read or Write Authorize Reply parameters. */ +typedef struct +{ + uint8_t type; /**< Type of authorize operation, see @ref BLE_GATTS_AUTHORIZE_TYPES. */ + union { + ble_gatts_authorize_params_t read; /**< Read authorization parameters. */ + ble_gatts_authorize_params_t write; /**< Write authorization parameters. */ + } params; /**< Reply Parameters. */ +} ble_gatts_rw_authorize_reply_params_t; + + + +/**@brief Event structure for @ref BLE_GATTS_EVT_WRITE. */ +typedef struct +{ + uint16_t handle; /**< Attribute Handle. */ + ble_uuid_t uuid; /**< Attribute UUID. */ + uint8_t op; /**< Type of write operation, see @ref BLE_GATTS_OPS. */ + uint8_t auth_required; /**< Writing operation deferred due to authorization requirement. Application may use @ref sd_ble_gatts_value_set to finalise the writing operation. */ + uint16_t offset; /**< Offset for the write operation. */ + uint16_t len; /**< Length of the received data. */ + uint8_t data[1]; /**< Received data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gatts_evt_write_t; + +/**@brief Event substructure for authorized read requests, see @ref ble_gatts_evt_rw_authorize_request_t. */ +typedef struct +{ + uint16_t handle; /**< Attribute Handle. */ + ble_uuid_t uuid; /**< Attribute UUID. */ + uint16_t offset; /**< Offset for the read operation. */ +} ble_gatts_evt_read_t; + +/**@brief Event structure for @ref BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST. */ +typedef struct +{ + uint8_t type; /**< Type of authorize operation, see @ref BLE_GATTS_AUTHORIZE_TYPES. */ + union { + ble_gatts_evt_read_t read; /**< Attribute Read Parameters. */ + ble_gatts_evt_write_t write; /**< Attribute Write Parameters. */ + } request; /**< Request Parameters. */ +} ble_gatts_evt_rw_authorize_request_t; + +/**@brief Event structure for @ref BLE_GATTS_EVT_SYS_ATTR_MISSING. */ +typedef struct +{ + uint8_t hint; /**< Hint (currently unused). */ +} ble_gatts_evt_sys_attr_missing_t; + + +/**@brief Event structure for @ref BLE_GATTS_EVT_HVC. */ +typedef struct +{ + uint16_t handle; /**< Attribute Handle. */ +} ble_gatts_evt_hvc_t; + +/**@brief Event structure for @ref BLE_GATTS_EVT_TIMEOUT. */ +typedef struct +{ + uint8_t src; /**< Timeout source, see @ref BLE_GATT_TIMEOUT_SOURCES. */ +} ble_gatts_evt_timeout_t; + + +/**@brief GATT Server event callback event structure. */ +typedef struct +{ + uint16_t conn_handle; /**< Connection Handle on which the event occurred. */ + union + { + ble_gatts_evt_write_t write; /**< Write Event Parameters. */ + ble_gatts_evt_rw_authorize_request_t authorize_request; /**< Read or Write Authorize Request Parameters. */ + ble_gatts_evt_sys_attr_missing_t sys_attr_missing; /**< System attributes missing. */ + ble_gatts_evt_hvc_t hvc; /**< Handle Value Confirmation Event Parameters. */ + ble_gatts_evt_timeout_t timeout; /**< Timeout Event. */ + } params; /**< Event Parameters. */ +} ble_gatts_evt_t; + +/** @} */ + +/** @addtogroup BLE_GATTS_FUNCTIONS Functions + * @{ */ + +/**@brief Add a service declaration to the Attribute Table. + * + * @note Secondary Services are only relevant in the context of the entity that references them, it is therefore forbidden to + * add a secondary service declaration that is not referenced by another service later in the Attribute Table. + * + * @mscs + * @mmsc{@ref BLE_GATTS_ATT_TABLE_POP_MSC} + * @endmscs + * + * @param[in] type Toggles between primary and secondary services, see @ref BLE_GATTS_SRVC_TYPES. + * @param[in] p_uuid Pointer to service UUID. + * @param[out] p_handle Pointer to a 16-bit word where the assigned handle will be stored. + * + * @retval ::NRF_SUCCESS Successfully added a service declaration. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, Vendor Specific UUIDs need to be present in the table. + * @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, certain UUIDs are reserved for the stack. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + */ +SVCALL(SD_BLE_GATTS_SERVICE_ADD, uint32_t, sd_ble_gatts_service_add(uint8_t type, ble_uuid_t const *p_uuid, uint16_t *p_handle)); + + +/**@brief Add an include declaration to the Attribute Table. + * + * @note It is currently only possible to add an include declaration to the last added service (i.e. only sequential population is supported at this time). + * + * @note The included service must already be present in the Attribute Table prior to this call. + * + * @mscs + * @mmsc{@ref BLE_GATTS_ATT_TABLE_POP_MSC} + * @endmscs + * + * @param[in] service_handle Handle of the service where the included service is to be placed, if @ref BLE_GATT_HANDLE_INVALID is used, it will be placed sequentially. + * @param[in] inc_srvc_handle Handle of the included service. + * @param[out] p_include_handle Pointer to a 16-bit word where the assigned handle will be stored. + * + * @retval ::NRF_SUCCESS Successfully added an include declaration. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, handle values need to match previously added services. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, self inclusions are not allowed. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + * @retval ::NRF_ERROR_NOT_FOUND Attribute not found. + */ +SVCALL(SD_BLE_GATTS_INCLUDE_ADD, uint32_t, sd_ble_gatts_include_add(uint16_t service_handle, uint16_t inc_srvc_handle, uint16_t *p_include_handle)); + + +/**@brief Add a characteristic declaration, a characteristic value declaration and optional characteristic descriptor declarations to the Attribute Table. + * + * @note It is currently only possible to add a characteristic to the last added service (i.e. only sequential population is supported at this time). + * + * @note Several restrictions apply to the parameters, such as matching permissions between the user description descriptor and the writeable auxiliaries bits, + * readable (no security) and writeable (selectable) CCCDs and SCCDs and valid presentation format values. + * + * @note If no metadata is provided for the optional descriptors, their permissions will be derived from the characteristic permissions. + * + * @mscs + * @mmsc{@ref BLE_GATTS_ATT_TABLE_POP_MSC} + * @endmscs + * + * @param[in] service_handle Handle of the service where the characteristic is to be placed, if @ref BLE_GATT_HANDLE_INVALID is used, it will be placed sequentially. + * @param[in] p_char_md Characteristic metadata. + * @param[in] p_attr_char_value Pointer to the attribute structure corresponding to the characteristic value. + * @param[out] p_handles Pointer to the structure where the assigned handles will be stored. + * + * @retval ::NRF_SUCCESS Successfully added a characteristic. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, service handle, Vendor Specific UUIDs, lengths, and permissions need to adhere to the constraints. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation, a service context is required. + * @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, certain UUIDs are reserved for the stack. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX. + */ +SVCALL(SD_BLE_GATTS_CHARACTERISTIC_ADD, uint32_t, sd_ble_gatts_characteristic_add(uint16_t service_handle, ble_gatts_char_md_t const *p_char_md, ble_gatts_attr_t const *p_attr_char_value, ble_gatts_char_handles_t *p_handles)); + + +/**@brief Add a descriptor to the Attribute Table. + * + * @note It is currently only possible to add a descriptor to the last added characteristic (i.e. only sequential population is supported at this time). + * + * @mscs + * @mmsc{@ref BLE_GATTS_ATT_TABLE_POP_MSC} + * @endmscs + * + * @param[in] char_handle Handle of the characteristic where the descriptor is to be placed, if @ref BLE_GATT_HANDLE_INVALID is used, it will be placed sequentially. + * @param[in] p_attr Pointer to the attribute structure. + * @param[out] p_handle Pointer to a 16-bit word where the assigned handle will be stored. + * + * @retval ::NRF_SUCCESS Successfully added a descriptor. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, characteristic handle, Vendor Specific UUIDs, lengths, and permissions need to adhere to the constraints. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation, a characteristic context is required. + * @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, certain UUIDs are reserved for the stack. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX. + */ +SVCALL(SD_BLE_GATTS_DESCRIPTOR_ADD, uint32_t, sd_ble_gatts_descriptor_add(uint16_t char_handle, ble_gatts_attr_t const *p_attr, uint16_t *p_handle)); + +/**@brief Set the value of a given attribute. + * + * @note Values other than system attributes can be set at any time, regardless of wheter any active connections exist. + * + * @mscs + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_QUEUE_FULL_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_NOAUTH_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. If the value does not belong to a system attribute then @ref BLE_CONN_HANDLE_INVALID can be used. + * @param[in] handle Attribute handle. + * @param[in,out] p_value Attribute value information. + * + * @retval ::NRF_SUCCESS Successfully set the value of the attribute. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_NOT_FOUND Attribute not found. + * @retval ::NRF_ERROR_FORBIDDEN Forbidden handle supplied, certain attributes are not modifiable by the application. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::BLE_ERROR_GATTS_INVALID_ATTR_TYPE @ref BLE_CONN_HANDLE_INVALID supplied on a system attribute. + */ +SVCALL(SD_BLE_GATTS_VALUE_SET, uint32_t, sd_ble_gatts_value_set(uint16_t conn_handle, uint16_t handle, ble_gatts_value_t *p_value)); + +/**@brief Get the value of a given attribute. + * + * @note If the attribute value is longer than the size of the supplied buffer, + * p_len will return the total attribute value length (excluding offset), + * and not the number of bytes actually returned in p_data. + * The application may use this information to allocate a suitable buffer size. + * + * @note When retrieving system attribute values with this function, the connection handle + * may refer to an already disconnected connection. Refer to the documentation of + * @ref sd_ble_gatts_sys_attr_get for further information. + * + * @param[in] conn_handle Connection handle. If the value does not belong to a system attribute then @ref BLE_CONN_HANDLE_INVALID can be used. + * @param[in] handle Attribute handle. + * @param[in,out] p_value Attribute value information. + * + * @retval ::NRF_SUCCESS Successfully retrieved the value of the attribute. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_NOT_FOUND Attribute not found. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid attribute offset supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::BLE_ERROR_GATTS_INVALID_ATTR_TYPE @ref BLE_CONN_HANDLE_INVALID supplied on a system attribute. + */ +SVCALL(SD_BLE_GATTS_VALUE_GET, uint32_t, sd_ble_gatts_value_get(uint16_t conn_handle, uint16_t handle, ble_gatts_value_t *p_value)); + +/**@brief Notify or Indicate an attribute value. + * + * @details This function checks for the relevant Client Characteristic Configuration descriptor value to verify that the relevant operation + * (notification or indication) has been enabled by the client. It is also able to update the attribute value before issuing the PDU, so that + * the application can atomically perform a value update and a server initiated transaction with a single API call. + * If the application chooses to indicate an attribute value, a @ref BLE_GATTS_EVT_HVC event will be issued as soon as the confirmation arrives from + * the peer. + * + * @note The local attribute value may be updated even if an outgoing packet is not sent to the peer due to an error during execution. + * When receiveing the error codes @ref NRF_ERROR_INVALID_STATE, @ref NRF_ERROR_BUSY, @ref BLE_ERROR_GATTS_SYS_ATTR_MISSING and + * @ref BLE_ERROR_NO_TX_PACKETS the Attribute Table has been updated. + * The caller can check whether the value has been updated by looking at the contents of *(p_hvx_params->p_len). + * + * @note It is important to note that a notification will consume an application buffer, and will therefore + * generate a @ref BLE_EVT_TX_COMPLETE event when the packet has been transmitted. An indication on the other hand will use the + * standard server internal buffer and thus will only generate a @ref BLE_GATTS_EVT_HVC event as soon as the confirmation + * has been received from the peer. Please see the documentation of @ref sd_ble_tx_packet_count_get for more details. + * + * @events + * @event{@ref BLE_EVT_TX_COMPLETE, Transmission complete.} + * @event{@ref BLE_GATTS_EVT_HVC, Confirmation received from peer.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTS_HVX_SYS_ATTRS_MISSING_MSC} + * @mmsc{@ref BLE_GATTS_HVN_MSC} + * @mmsc{@ref BLE_GATTS_HVI_MSC} + * @mmsc{@ref BLE_GATTS_HVX_DISABLED_MSC} + * @mmsc{@ref BLE_COMMON_APP_BUFF_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_hvx_params Pointer to an HVx parameters structure. If the p_data member contains a non-NULL pointer the attribute value will be updated with + * the contents pointed by it before sending the notification or indication. + * + * @retval ::NRF_SUCCESS Successfully queued a notification or indication for transmission, and optionally updated the attribute value. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State or notifications and/or indications not enabled in the CCCD. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::BLE_ERROR_INVALID_ATTR_HANDLE Invalid attribute handle(s) supplied. Only attributes added directly by the application are available to notify and indicate. + * @retval ::BLE_ERROR_GATTS_INVALID_ATTR_TYPE Invalid attribute type(s) supplied, only characteristic values may be notified and indicated. + * @retval ::NRF_ERROR_NOT_FOUND Attribute not found. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied. + * @retval ::NRF_ERROR_BUSY Procedure already in progress. + * @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known value. + * @retval ::BLE_ERROR_NO_TX_PACKETS No available application packets for this connection, applies only to notifications. + */ +SVCALL(SD_BLE_GATTS_HVX, uint32_t, sd_ble_gatts_hvx(uint16_t conn_handle, ble_gatts_hvx_params_t const *p_hvx_params)); + +/**@brief Indicate the Service Changed attribute value. + * + * @details This call will send a Handle Value Indication to one or more peers connected to inform them that the Attribute + * Table layout has changed. As soon as the peer has confirmed the indication, a @ref BLE_GATTS_EVT_SC_CONFIRM event will + * be issued. + * + * @note Some of the restrictions and limitations that apply to @ref sd_ble_gatts_hvx also apply here. + * + * @events + * @event{@ref BLE_GATTS_EVT_SC_CONFIRM, Confirmation of attribute table change received from peer.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTS_SC_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] start_handle Start of affected attribute handle range. + * @param[in] end_handle End of affected attribute handle range. + * + * @retval ::NRF_SUCCESS Successfully queued the Service Changed indication for transmission. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_NOT_SUPPORTED Service Changed not enabled at initialization. See @ref sd_ble_enable and @ref ble_gatts_enable_params_t. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State or notifications and/or indications not enabled in the CCCD. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::BLE_ERROR_INVALID_ATTR_HANDLE Invalid attribute handle(s) supplied, handles must be in the range populated by the application. + * @retval ::NRF_ERROR_BUSY Procedure already in progress. + * @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known value. + */ +SVCALL(SD_BLE_GATTS_SERVICE_CHANGED, uint32_t, sd_ble_gatts_service_changed(uint16_t conn_handle, uint16_t start_handle, uint16_t end_handle)); + +/**@brief Respond to a Read/Write authorization request. + * + * @note This call should only be used as a response to a @ref BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST event issued to the application. + * + * @mscs + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_AUTH_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_BUF_AUTH_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_NOAUTH_MSC} + * @mmsc{@ref BLE_GATTS_READ_REQ_AUTH_MSC} + * @mmsc{@ref BLE_GATTS_WRITE_REQ_AUTH_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_QUEUE_FULL_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_PEER_CANCEL_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_rw_authorize_reply_params Pointer to a structure with the attribute provided by the application. + * + * @retval ::NRF_SUCCESS Successfully queued a response to the peer, and in the case of a write operation, Attribute Table updated. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State or no authorization request pending. + * @retval ::NRF_ERROR_INVALID_PARAM Authorization op invalid, + * handle supplied does not match requested handle, + * or invalid data to be written provided by the application. + * @retval ::NRF_ERROR_BUSY The stack is busy. Retry at later time. + */ +SVCALL(SD_BLE_GATTS_RW_AUTHORIZE_REPLY, uint32_t, sd_ble_gatts_rw_authorize_reply(uint16_t conn_handle, ble_gatts_rw_authorize_reply_params_t const *p_rw_authorize_reply_params)); + + +/**@brief Update persistent system attribute information. + * + * @details Supply information about persistent system attributes to the stack, + * previously obtained using @ref sd_ble_gatts_sys_attr_get. + * This call is only allowed for active connections, and is usually + * made immediately after a connection is established with an known bonded device, + * often as a response to a @ref BLE_GATTS_EVT_SYS_ATTR_MISSING. + * + * p_sysattrs may point directly to the application's stored copy of the system attributes + * obtained using @ref sd_ble_gatts_sys_attr_get. + * If the pointer is NULL, the system attribute info is initialized, assuming that + * the application does not have any previously saved system attribute data for this device. + * + * @note The state of persistent system attributes is reset upon connection establishment and then remembered for its duration. + * + * @note If this call returns with an error code different from @ref NRF_SUCCESS, the storage of persistent system attributes may have been completed only partially. + * This means that the state of the attribute table is undefined, and the application should either provide a new set of attributes using this same call or + * reset the SoftDevice to return to a known state. + * + * @note When the @ref BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS is used with this function, only the system attributes included in system services will be modified. + * @note When the @ref BLE_GATTS_SYS_ATTR_FLAG_USR_SRVCS is used with this function, only the system attributes included in user services will be modified. + * + * @mscs + * @mmsc{@ref BLE_GATTS_HVX_SYS_ATTRS_MISSING_MSC} + * @mmsc{@ref BLE_GATTS_SYS_ATTRS_UNK_PEER_MSC} + * @mmsc{@ref BLE_GATTS_SYS_ATTRS_BONDED_PEER_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_sys_attr_data Pointer to a saved copy of system attributes supplied to the stack, or NULL. + * @param[in] len Size of data pointed by p_sys_attr_data, in octets. + * @param[in] flags Optional additional flags, see @ref BLE_GATTS_SYS_ATTR_FLAGS + * + * @retval ::NRF_SUCCESS Successfully set the system attribute information. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_DATA Invalid data supplied, the data should be exactly the same as retrieved with @ref sd_ble_gatts_sys_attr_get. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + * @retval ::NRF_ERROR_BUSY The stack is busy. Retry at later time. + */ +SVCALL(SD_BLE_GATTS_SYS_ATTR_SET, uint32_t, sd_ble_gatts_sys_attr_set(uint16_t conn_handle, uint8_t const *p_sys_attr_data, uint16_t len, uint32_t flags)); + + +/**@brief Retrieve persistent system attribute information from the stack. + * + * @details This call is used to retrieve information about values to be stored perisistently by the application + * during the lifetime of a connection or after it has been terminated. When a new connection is established with the same bonded device, + * the system attribute information retrieved with this function should be restored using using @ref sd_ble_gatts_sys_attr_set. + * If retrieved after disconnection, the data should be read before a new connection established. The connection handle for + * the previous, now disconnected, connection will remain valid until a new one is created to allow this API call to refer to it. + * Connection handles belonging to active connections can be used as well, but care should be taken since the system attributes + * may be written to at any time by the peer during a connection's lifetime. + * + * @note When the @ref BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS is used with this function, only the system attributes included in system services will be returned. + * @note When the @ref BLE_GATTS_SYS_ATTR_FLAG_USR_SRVCS is used with this function, only the system attributes included in user services will be returned. + * + * @mscs + * @mmsc{@ref BLE_GATTS_SYS_ATTRS_BONDED_PEER_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle of the recently terminated connection. + * @param[out] p_sys_attr_data Pointer to a buffer where updated information about system attributes will be filled in. The format of the data is described + * in @ref BLE_GATTS_SYS_ATTRS_FORMAT. NULL can be provided to obtain the length of the data. + * @param[in,out] p_len Size of application buffer if p_sys_attr_data is not NULL. Unconditially updated to actual length of system attribute data. + * @param[in] flags Optional additional flags, see @ref BLE_GATTS_SYS_ATTR_FLAGS + * + * @retval ::NRF_SUCCESS Successfully retrieved the system attribute information. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_DATA_SIZE The system attribute information did not fit into the provided buffer. + * @retval ::NRF_ERROR_NOT_FOUND No system attributes found. + */ +SVCALL(SD_BLE_GATTS_SYS_ATTR_GET, uint32_t, sd_ble_gatts_sys_attr_get(uint16_t conn_handle, uint8_t *p_sys_attr_data, uint16_t *p_len, uint32_t flags)); + + +/**@brief Retrieve the first valid user attribute handle. + * + * @param[out] p_handle Pointer to an integer where the handle will be stored. + * + * @retval ::NRF_SUCCESS Successfully retrieved the handle. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + */ +SVCALL(SD_BLE_GATTS_INITIAL_USER_HANDLE_GET, uint32_t, sd_ble_gatts_initial_user_handle_get(uint16_t *p_handle)); + +/**@brief Retrieve the attribute UUID and/or metadata. + * + * @param[in] handle Attribute handle + * @param[out] p_uuid UUID of the attribute. Use NULL to omit this field. + * @param[out] p_md Metadata of the attribute. Use NULL to omit this field. + * + * @retval ::NRF_SUCCESS Successfully retrieved the attribute metadata, + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameters supplied. Returned when both @c p_uuid and @c p_md are NULL. + * @retval ::NRF_ERROR_NOT_FOUND Attribute was not found. + */ +SVCALL(SD_BLE_GATTS_ATTR_GET, uint32_t, sd_ble_gatts_attr_get(uint16_t handle, ble_uuid_t * p_uuid, ble_gatts_attr_md_t * p_md)); + +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif // BLE_GATTS_H__ + +/** + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_hci.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_hci.h new file mode 100644 index 0000000000..4a9620ce21 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_hci.h @@ -0,0 +1,131 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 BLE_COMMON + @{ +*/ + + +#ifndef BLE_HCI_H__ +#define BLE_HCI_H__ +#ifdef __cplusplus +extern "C" { +#endif + +/** @defgroup BLE_HCI_STATUS_CODES Bluetooth status codes + * @{ */ + +#define BLE_HCI_STATUS_CODE_SUCCESS 0x00 /**< Success. */ +#define BLE_HCI_STATUS_CODE_UNKNOWN_BTLE_COMMAND 0x01 /**< Unknown BLE Command. */ +#define BLE_HCI_STATUS_CODE_UNKNOWN_CONNECTION_IDENTIFIER 0x02 /**< Unknown Connection Identifier. */ +/*0x03 Hardware Failure +0x04 Page Timeout +*/ +#define BLE_HCI_AUTHENTICATION_FAILURE 0x05 /**< Authentication Failure. */ +#define BLE_HCI_STATUS_CODE_PIN_OR_KEY_MISSING 0x06 /**< Pin or Key missing. */ +#define BLE_HCI_MEMORY_CAPACITY_EXCEEDED 0x07 /**< Memory Capacity Exceeded. */ +#define BLE_HCI_CONNECTION_TIMEOUT 0x08 /**< Connection Timeout. */ +/*0x09 Connection Limit Exceeded +0x0A Synchronous Connection Limit To A Device Exceeded +0x0B ACL Connection Already Exists*/ +#define BLE_HCI_STATUS_CODE_COMMAND_DISALLOWED 0x0C /**< Command Disallowed. */ +/*0x0D Connection Rejected due to Limited Resources +0x0E Connection Rejected Due To Security Reasons +0x0F Connection Rejected due to Unacceptable BD_ADDR +0x10 Connection Accept Timeout Exceeded +0x11 Unsupported Feature or Parameter Value*/ +#define BLE_HCI_STATUS_CODE_INVALID_BTLE_COMMAND_PARAMETERS 0x12 /**< Invalid BLE Command Parameters. */ +#define BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION 0x13 /**< Remote User Terminated Connection. */ +#define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES 0x14 /**< Remote Device Terminated Connection due to low resources.*/ +#define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF 0x15 /**< Remote Device Terminated Connection due to power off. */ +#define BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION 0x16 /**< Local Host Terminated Connection. */ +/* +0x17 Repeated Attempts +0x18 Pairing Not Allowed +0x19 Unknown LMP PDU +*/ +#define BLE_HCI_UNSUPPORTED_REMOTE_FEATURE 0x1A /**< Unsupported Remote Feature. */ +/* +0x1B SCO Offset Rejected +0x1C SCO Interval Rejected +0x1D SCO Air Mode Rejected*/ +#define BLE_HCI_STATUS_CODE_INVALID_LMP_PARAMETERS 0x1E /**< Invalid LMP Parameters. */ +#define BLE_HCI_STATUS_CODE_UNSPECIFIED_ERROR 0x1F /**< Unspecified Error. */ +/*0x20 Unsupported LMP Parameter Value +0x21 Role Change Not Allowed +*/ +#define BLE_HCI_STATUS_CODE_LMP_RESPONSE_TIMEOUT 0x22 /**< LMP Response Timeout. */ +/*0x23 LMP Error Transaction Collision*/ +#define BLE_HCI_STATUS_CODE_LMP_PDU_NOT_ALLOWED 0x24 /**< LMP PDU Not Allowed. */ +/*0x25 Encryption Mode Not Acceptable +0x26 Link Key Can Not be Changed +0x27 Requested QoS Not Supported +*/ +#define BLE_HCI_INSTANT_PASSED 0x28 /**< Instant Passed. */ +#define BLE_HCI_PAIRING_WITH_UNIT_KEY_UNSUPPORTED 0x29 /**< Pairing with Unit Key Unsupported. */ +#define BLE_HCI_DIFFERENT_TRANSACTION_COLLISION 0x2A /**< Different Transaction Collision. */ +/* +0x2B Reserved +0x2C QoS Unacceptable Parameter +0x2D QoS Rejected +0x2E Channel Classification Not Supported +0x2F Insufficient Security +0x30 Parameter Out Of Mandatory Range +0x31 Reserved +0x32 Role Switch Pending +0x33 Reserved +0x34 Reserved Slot Violation +0x35 Role Switch Failed +0x36 Extended Inquiry Response Too Large +0x37 Secure Simple Pairing Not Supported By Host. +0x38 Host Busy - Pairing +0x39 Connection Rejected due to No Suitable Channel Found*/ +#define BLE_HCI_CONTROLLER_BUSY 0x3A /**< Controller Busy. */ +#define BLE_HCI_CONN_INTERVAL_UNACCEPTABLE 0x3B /**< Connection Interval Unacceptable. */ +#define BLE_HCI_DIRECTED_ADVERTISER_TIMEOUT 0x3C /**< Directed Adverisement Timeout. */ +#define BLE_HCI_CONN_TERMINATED_DUE_TO_MIC_FAILURE 0x3D /**< Connection Terminated due to MIC Failure. */ +#define BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED 0x3E /**< Connection Failed to be Established. */ + +/** @} */ + + +#ifdef __cplusplus +} +#endif +#endif // BLE_HCI_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_l2cap.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_l2cap.h new file mode 100644 index 0000000000..8a68ed90c8 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_l2cap.h @@ -0,0 +1,202 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 BLE_L2CAP Logical Link Control and Adaptation Protocol (L2CAP) + @{ + @brief Definitions and prototypes for the L2CAP interface. + */ + +#ifndef BLE_L2CAP_H__ +#define BLE_L2CAP_H__ + +#include "ble_types.h" +#include "ble_ranges.h" +#include "ble_err.h" +#include "nrf_svc.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/**@addtogroup BLE_L2CAP_ENUMERATIONS Enumerations + * @{ */ + +/**@brief L2CAP API SVC numbers. */ +enum BLE_L2CAP_SVCS +{ + SD_BLE_L2CAP_CID_REGISTER = BLE_L2CAP_SVC_BASE, /**< Register a CID. */ + SD_BLE_L2CAP_CID_UNREGISTER, /**< Unregister a CID. */ + SD_BLE_L2CAP_TX /**< Transmit a packet. */ +}; + +/**@brief L2CAP Event IDs. */ +enum BLE_L2CAP_EVTS +{ + BLE_L2CAP_EVT_RX = BLE_L2CAP_EVT_BASE /**< L2CAP packet received. */ +}; + +/** @} */ + +/**@addtogroup BLE_L2CAP_DEFINES Defines + * @{ */ + +/**@defgroup BLE_ERRORS_L2CAP SVC return values specific to L2CAP + * @{ */ +#define BLE_ERROR_L2CAP_CID_IN_USE (NRF_L2CAP_ERR_BASE + 0x000) /**< CID already in use. */ +/** @} */ + +/**@brief Default L2CAP MTU. */ +#define BLE_L2CAP_MTU_DEF (23) + +/**@brief Invalid Channel Identifier. */ +#define BLE_L2CAP_CID_INVALID (0x0000) + +/**@brief Dynamic Channel Identifier base. */ +#define BLE_L2CAP_CID_DYN_BASE (0x0040) + +/**@brief Maximum amount of dynamic CIDs. */ +#define BLE_L2CAP_CID_DYN_MAX (8) + +/** @} */ + +/**@addtogroup BLE_L2CAP_STRUCTURES Structures + * @{ */ + +/**@brief Packet header format for L2CAP transmission. */ +typedef struct +{ + uint16_t len; /**< Length of valid info in data member. */ + uint16_t cid; /**< Channel ID on which packet is transmitted. */ +} ble_l2cap_header_t; + + +/**@brief L2CAP Received packet event report. */ +typedef struct +{ + ble_l2cap_header_t header; /**< L2CAP packet header. */ + uint8_t data[1]; /**< Packet data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_l2cap_evt_rx_t; + + +/**@brief L2CAP event callback event structure. */ +typedef struct +{ + uint16_t conn_handle; /**< Connection Handle on which event occured. */ + union + { + ble_l2cap_evt_rx_t rx; /**< RX Event parameters. */ + } params; /**< Event Parameters. */ +} ble_l2cap_evt_t; + +/** @} */ + +/**@addtogroup BLE_L2CAP_FUNCTIONS Functions + * @{ */ + +/**@brief Register a CID with L2CAP. + * + * @details This registers a higher protocol layer with the L2CAP multiplexer, and is requried prior to all operations on the CID. + * + * @mscs + * @mmsc{@ref BLE_L2CAP_API_MSC} + * @endmscs + * + * @param[in] cid L2CAP CID. + * + * @retval ::NRF_SUCCESS Successfully registered a CID with the L2CAP layer. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, CID must be above @ref BLE_L2CAP_CID_DYN_BASE. + * @retval ::BLE_ERROR_L2CAP_CID_IN_USE L2CAP CID already in use. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + */ +SVCALL(SD_BLE_L2CAP_CID_REGISTER, uint32_t, sd_ble_l2cap_cid_register(uint16_t cid)); + +/**@brief Unregister a CID with L2CAP. + * + * @details This unregisters a previously registerd higher protocol layer with the L2CAP multiplexer. + * + * @mscs + * @mmsc{@ref BLE_L2CAP_API_MSC} + * @endmscs + * + * @param[in] cid L2CAP CID. + * + * @retval ::NRF_SUCCESS Successfully unregistered the CID. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_NOT_FOUND CID not previously registered. + */ +SVCALL(SD_BLE_L2CAP_CID_UNREGISTER, uint32_t, sd_ble_l2cap_cid_unregister(uint16_t cid)); + +/**@brief Transmit an L2CAP packet. + * + * @note It is important to note that a call to this function will consume an application packet, and will therefore + * generate a @ref BLE_EVT_TX_COMPLETE event when the packet has been transmitted. + * Please see the documentation of @ref sd_ble_tx_packet_count_get for more details. + * + * @events + * @event{@ref BLE_EVT_TX_COMPLETE} + * @event{@ref BLE_L2CAP_EVT_RX} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_L2CAP_API_MSC} + * @endmscs + * + * @param[in] conn_handle Connection Handle. + * @param[in] p_header Pointer to a packet header containing length and CID. + * @param[in] p_data Pointer to the data to be transmitted. + * + * @retval ::NRF_SUCCESS Successfully queued an L2CAP packet for transmission. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, CIDs must be registered beforehand with @ref sd_ble_l2cap_cid_register. + * @retval ::NRF_ERROR_NOT_FOUND CID not found. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + * @retval ::BLE_ERROR_NO_TX_PACKETS Not enough application packets available. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, see @ref BLE_L2CAP_MTU_DEF. + */ +SVCALL(SD_BLE_L2CAP_TX, uint32_t, sd_ble_l2cap_tx(uint16_t conn_handle, ble_l2cap_header_t const *p_header, uint8_t const *p_data)); + +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif // BLE_L2CAP_H__ + +/** + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_ranges.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_ranges.h new file mode 100644 index 0000000000..2e5ff7b299 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_ranges.h @@ -0,0 +1,126 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 BLE_COMMON + @{ + @defgroup ble_ranges Module specific SVC, event and option number subranges + @{ + + @brief Definition of SVC, event and option number subranges for each API module. + + @note + SVCs, event and option numbers are split into subranges for each API module. + Each module receives its entire allocated range of SVC calls, whether implemented or not, + but return BLE_ERROR_NOT_SUPPORTED for unimplemented or undefined calls in its range. + + Note that the symbols BLE__SVC_LAST is the end of the allocated SVC range, + rather than the last SVC function call actually defined and implemented. + + Specific SVC, event and option values are defined in each module's ble_.h file, + which defines names of each individual SVC code based on the range start value. +*/ + +#ifndef BLE_RANGES_H__ +#define BLE_RANGES_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#define BLE_SVC_BASE 0x60 /**< Common BLE SVC base. */ +#define BLE_SVC_LAST 0x6B /**< Total: 12. */ + +#define BLE_RESERVED_SVC_BASE 0x6C /**< Reserved BLE SVC base. */ +#define BLE_RESERVED_SVC_LAST 0x6F /**< Total: 4. */ + +#define BLE_GAP_SVC_BASE 0x70 /**< GAP BLE SVC base. */ +#define BLE_GAP_SVC_LAST 0x8F /**< Total: 32. */ + +#define BLE_GATTC_SVC_BASE 0x90 /**< GATTC BLE SVC base. */ +#define BLE_GATTC_SVC_LAST 0x9F /**< Total: 32. */ + +#define BLE_GATTS_SVC_BASE 0xA0 /**< GATTS BLE SVC base. */ +#define BLE_GATTS_SVC_LAST 0xAF /**< Total: 16. */ + +#define BLE_L2CAP_SVC_BASE 0xB0 /**< L2CAP BLE SVC base. */ +#define BLE_L2CAP_SVC_LAST 0xBF /**< Total: 16. */ + + +#define BLE_EVT_INVALID 0x00 /**< Invalid BLE Event. */ + +#define BLE_EVT_BASE 0x01 /**< Common BLE Event base. */ +#define BLE_EVT_LAST 0x0F /**< Total: 15. */ + +#define BLE_GAP_EVT_BASE 0x10 /**< GAP BLE Event base. */ +#define BLE_GAP_EVT_LAST 0x2F /**< Total: 32. */ + +#define BLE_GATTC_EVT_BASE 0x30 /**< GATTC BLE Event base. */ +#define BLE_GATTC_EVT_LAST 0x4F /**< Total: 32. */ + +#define BLE_GATTS_EVT_BASE 0x50 /**< GATTS BLE Event base. */ +#define BLE_GATTS_EVT_LAST 0x6F /**< Total: 32. */ + +#define BLE_L2CAP_EVT_BASE 0x70 /**< L2CAP BLE Event base. */ +#define BLE_L2CAP_EVT_LAST 0x8F /**< Total: 32. */ + + +#define BLE_OPT_INVALID 0x00 /**< Invalid BLE Option. */ + +#define BLE_OPT_BASE 0x01 /**< Common BLE Option base. */ +#define BLE_OPT_LAST 0x1F /**< Total: 31. */ + +#define BLE_GAP_OPT_BASE 0x20 /**< GAP BLE Option base. */ +#define BLE_GAP_OPT_LAST 0x3F /**< Total: 32. */ + +#define BLE_GATTC_OPT_BASE 0x40 /**< GATTC BLE Option base. */ +#define BLE_GATTC_OPT_LAST 0x5F /**< Total: 32. */ + +#define BLE_GATTS_OPT_BASE 0x60 /**< GATTS BLE Option base. */ +#define BLE_GATTS_OPT_LAST 0x7F /**< Total: 32. */ + +#define BLE_L2CAP_OPT_BASE 0x80 /**< L2CAP BLE Option base. */ +#define BLE_L2CAP_OPT_LAST 0x9F /**< Total: 32. */ + +#ifdef __cplusplus +} +#endif +#endif /* BLE_RANGES_H__ */ + +/** + @} + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_types.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_types.h new file mode 100644 index 0000000000..23e23a150e --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_types.h @@ -0,0 +1,205 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 BLE_COMMON + @{ + @defgroup ble_types Common types and macro definitions + @{ + + @brief Common types and macro definitions for the BLE SoftDevice. + */ + +#ifndef BLE_TYPES_H__ +#define BLE_TYPES_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup BLE_TYPES_DEFINES Defines + * @{ */ + +/** @defgroup BLE_CONN_HANDLES BLE Connection Handles + * @{ */ +#define BLE_CONN_HANDLE_INVALID 0xFFFF /**< Invalid Connection Handle. */ +#define BLE_CONN_HANDLE_ALL 0xFFFE /**< Applies to all Connection Handles. */ +/** @} */ + + +/** @defgroup BLE_UUID_VALUES Assigned Values for BLE UUIDs + * @{ */ +/* Generic UUIDs, applicable to all services */ +#define BLE_UUID_UNKNOWN 0x0000 /**< Reserved UUID. */ +#define BLE_UUID_SERVICE_PRIMARY 0x2800 /**< Primary Service. */ +#define BLE_UUID_SERVICE_SECONDARY 0x2801 /**< Secondary Service. */ +#define BLE_UUID_SERVICE_INCLUDE 0x2802 /**< Include. */ +#define BLE_UUID_CHARACTERISTIC 0x2803 /**< Characteristic. */ +#define BLE_UUID_DESCRIPTOR_CHAR_EXT_PROP 0x2900 /**< Characteristic Extended Properties Descriptor. */ +#define BLE_UUID_DESCRIPTOR_CHAR_USER_DESC 0x2901 /**< Characteristic User Description Descriptor. */ +#define BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG 0x2902 /**< Client Characteristic Configuration Descriptor. */ +#define BLE_UUID_DESCRIPTOR_SERVER_CHAR_CONFIG 0x2903 /**< Server Characteristic Configuration Descriptor. */ +#define BLE_UUID_DESCRIPTOR_CHAR_PRESENTATION_FORMAT 0x2904 /**< Characteristic Presentation Format Descriptor. */ +#define BLE_UUID_DESCRIPTOR_CHAR_AGGREGATE_FORMAT 0x2905 /**< Characteristic Aggregate Format Descriptor. */ +/* GATT specific UUIDs */ +#define BLE_UUID_GATT 0x1801 /**< Generic Attribute Profile. */ +#define BLE_UUID_GATT_CHARACTERISTIC_SERVICE_CHANGED 0x2A05 /**< Service Changed Characteristic. */ +/* GAP specific UUIDs */ +#define BLE_UUID_GAP 0x1800 /**< Generic Access Profile. */ +#define BLE_UUID_GAP_CHARACTERISTIC_DEVICE_NAME 0x2A00 /**< Device Name Characteristic. */ +#define BLE_UUID_GAP_CHARACTERISTIC_APPEARANCE 0x2A01 /**< Appearance Characteristic. */ +#define BLE_UUID_GAP_CHARACTERISTIC_PPF 0x2A02 /**< Peripheral Privacy Flag Characteristic. */ +#define BLE_UUID_GAP_CHARACTERISTIC_RECONN_ADDR 0x2A03 /**< Reconnection Address Characteristic. */ +#define BLE_UUID_GAP_CHARACTERISTIC_PPCP 0x2A04 /**< Peripheral Preferred Connection Parameters Characteristic. */ +/** @} */ + + +/** @defgroup BLE_UUID_TYPES Types of UUID + * @{ */ +#define BLE_UUID_TYPE_UNKNOWN 0x00 /**< Invalid UUID type. */ +#define BLE_UUID_TYPE_BLE 0x01 /**< Bluetooth SIG UUID (16-bit). */ +#define BLE_UUID_TYPE_VENDOR_BEGIN 0x02 /**< Vendor UUID types start at this index (128-bit). */ +/** @} */ + + +/** @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 + * @{ */ +#define BLE_APPEARANCE_UNKNOWN 0 /**< Unknown. */ +#define BLE_APPEARANCE_GENERIC_PHONE 64 /**< Generic Phone. */ +#define BLE_APPEARANCE_GENERIC_COMPUTER 128 /**< Generic Computer. */ +#define BLE_APPEARANCE_GENERIC_WATCH 192 /**< Generic Watch. */ +#define BLE_APPEARANCE_WATCH_SPORTS_WATCH 193 /**< Watch: Sports Watch. */ +#define BLE_APPEARANCE_GENERIC_CLOCK 256 /**< Generic Clock. */ +#define BLE_APPEARANCE_GENERIC_DISPLAY 320 /**< Generic Display. */ +#define BLE_APPEARANCE_GENERIC_REMOTE_CONTROL 384 /**< Generic Remote Control. */ +#define BLE_APPEARANCE_GENERIC_EYE_GLASSES 448 /**< Generic Eye-glasses. */ +#define BLE_APPEARANCE_GENERIC_TAG 512 /**< Generic Tag. */ +#define BLE_APPEARANCE_GENERIC_KEYRING 576 /**< Generic Keyring. */ +#define BLE_APPEARANCE_GENERIC_MEDIA_PLAYER 640 /**< Generic Media Player. */ +#define BLE_APPEARANCE_GENERIC_BARCODE_SCANNER 704 /**< Generic Barcode Scanner. */ +#define BLE_APPEARANCE_GENERIC_THERMOMETER 768 /**< Generic Thermometer. */ +#define BLE_APPEARANCE_THERMOMETER_EAR 769 /**< Thermometer: Ear. */ +#define BLE_APPEARANCE_GENERIC_HEART_RATE_SENSOR 832 /**< Generic Heart rate Sensor. */ +#define BLE_APPEARANCE_HEART_RATE_SENSOR_HEART_RATE_BELT 833 /**< Heart Rate Sensor: Heart Rate Belt. */ +#define BLE_APPEARANCE_GENERIC_BLOOD_PRESSURE 896 /**< Generic Blood Pressure. */ +#define BLE_APPEARANCE_BLOOD_PRESSURE_ARM 897 /**< Blood Pressure: Arm. */ +#define BLE_APPEARANCE_BLOOD_PRESSURE_WRIST 898 /**< Blood Pressure: Wrist. */ +#define BLE_APPEARANCE_GENERIC_HID 960 /**< Human Interface Device (HID). */ +#define BLE_APPEARANCE_HID_KEYBOARD 961 /**< Keyboard (HID Subtype). */ +#define BLE_APPEARANCE_HID_MOUSE 962 /**< Mouse (HID Subtype). */ +#define BLE_APPEARANCE_HID_JOYSTICK 963 /**< Joystiq (HID Subtype). */ +#define BLE_APPEARANCE_HID_GAMEPAD 964 /**< Gamepad (HID Subtype). */ +#define BLE_APPEARANCE_HID_DIGITIZERSUBTYPE 965 /**< Digitizer Tablet (HID Subtype). */ +#define BLE_APPEARANCE_HID_CARD_READER 966 /**< Card Reader (HID Subtype). */ +#define BLE_APPEARANCE_HID_DIGITAL_PEN 967 /**< Digital Pen (HID Subtype). */ +#define BLE_APPEARANCE_HID_BARCODE 968 /**< Barcode Scanner (HID Subtype). */ +#define BLE_APPEARANCE_GENERIC_GLUCOSE_METER 1024 /**< Generic Glucose Meter. */ +#define BLE_APPEARANCE_GENERIC_RUNNING_WALKING_SENSOR 1088 /**< Generic Running Walking Sensor. */ +#define BLE_APPEARANCE_RUNNING_WALKING_SENSOR_IN_SHOE 1089 /**< Running Walking Sensor: In-Shoe. */ +#define BLE_APPEARANCE_RUNNING_WALKING_SENSOR_ON_SHOE 1090 /**< Running Walking Sensor: On-Shoe. */ +#define BLE_APPEARANCE_RUNNING_WALKING_SENSOR_ON_HIP 1091 /**< Running Walking Sensor: On-Hip. */ +#define BLE_APPEARANCE_GENERIC_CYCLING 1152 /**< Generic Cycling. */ +#define BLE_APPEARANCE_CYCLING_CYCLING_COMPUTER 1153 /**< Cycling: Cycling Computer. */ +#define BLE_APPEARANCE_CYCLING_SPEED_SENSOR 1154 /**< Cycling: Speed Sensor. */ +#define BLE_APPEARANCE_CYCLING_CADENCE_SENSOR 1155 /**< Cycling: Cadence Sensor. */ +#define BLE_APPEARANCE_CYCLING_POWER_SENSOR 1156 /**< Cycling: Power Sensor. */ +#define BLE_APPEARANCE_CYCLING_SPEED_CADENCE_SENSOR 1157 /**< Cycling: Speed and Cadence Sensor. */ +#define BLE_APPEARANCE_GENERIC_PULSE_OXIMETER 3136 /**< Generic Pulse Oximeter. */ +#define BLE_APPEARANCE_PULSE_OXIMETER_FINGERTIP 3137 /**< Fingertip (Pulse Oximeter subtype). */ +#define BLE_APPEARANCE_PULSE_OXIMETER_WRIST_WORN 3138 /**< Wrist Worn(Pulse Oximeter subtype). */ +#define BLE_APPEARANCE_GENERIC_WEIGHT_SCALE 3200 /**< Generic Weight Scale. */ +#define BLE_APPEARANCE_GENERIC_OUTDOOR_SPORTS_ACT 5184 /**< Generic Outdoor Sports Activity. */ +#define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_DISP 5185 /**< Location Display Device (Outdoor Sports Activity subtype). */ +#define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_DISP 5186 /**< Location and Navigation Display Device (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). */ +/** @} */ + +/** @brief Set .type and .uuid fields of ble_uuid_struct to specified uuid value. */ +#define BLE_UUID_BLE_ASSIGN(instance, value) do {\ + instance.type = BLE_UUID_TYPE_BLE; \ + instance.uuid = value;} while(0) + +/** @brief Copy type and uuid members from src to dst ble_uuid_t pointer. Both pointers must be valid/non-null. */ +#define BLE_UUID_COPY_PTR(dst, src) do {\ + (dst)->type = (src)->type; \ + (dst)->uuid = (src)->uuid;} while(0) + +/** @brief Copy type and uuid members from src to dst ble_uuid_t struct. */ +#define BLE_UUID_COPY_INST(dst, src) do {\ + (dst).type = (src).type; \ + (dst).uuid = (src).uuid;} while(0) + +/** @brief Compare for equality both type and uuid members of two (valid, non-null) ble_uuid_t pointers. */ +#define BLE_UUID_EQ(p_uuid1, p_uuid2) \ + (((p_uuid1)->type == (p_uuid2)->type) && ((p_uuid1)->uuid == (p_uuid2)->uuid)) + +/** @brief Compare for difference both type and uuid members of two (valid, non-null) ble_uuid_t pointers. */ +#define BLE_UUID_NEQ(p_uuid1, p_uuid2) \ + (((p_uuid1)->type != (p_uuid2)->type) || ((p_uuid1)->uuid != (p_uuid2)->uuid)) + +/** @} */ + +/** @addtogroup BLE_TYPES_STRUCTURES Structures + * @{ */ + +/** @brief 128 bit UUID values. */ +typedef struct +{ + uint8_t uuid128[16]; /**< Little-Endian UUID bytes. */ +} ble_uuid128_t; + +/** @brief Bluetooth Low Energy UUID type, encapsulates both 16-bit and 128-bit UUIDs. */ +typedef struct +{ + uint16_t uuid; /**< 16-bit UUID value or octets 12-13 of 128-bit UUID. */ + uint8_t type; /**< UUID type, see @ref BLE_UUID_TYPES. If type is @ref BLE_UUID_TYPE_UNKNOWN, the value of uuid is undefined. */ +} ble_uuid_t; + +/** @} */ +#ifdef __cplusplus +} +#endif + +#endif /* BLE_TYPES_H__ */ + +/** + @} + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf51/nrf_mbr.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf51/nrf_mbr.h new file mode 100644 index 0000000000..8d4486b4db --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf51/nrf_mbr.h @@ -0,0 +1,199 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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. + * + */ +/** + @defgroup nrf_mbr_api Master Boot Record API + @{ + + @brief APIs for updating SoftDevice and BootLoader + +*/ + +/* Header guard */ +#ifndef NRF_MBR_H__ +#define NRF_MBR_H__ + +#include "nrf_svc.h" +#include + +#ifndef NRF51 +#error "This header file shall only be included for nRF51 projects" +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup NRF_MBR_DEFINES Defines + * @{ */ + +/**@brief MBR SVC Base number. */ +#define MBR_SVC_BASE (0x18) + +/**@brief Page size in words. */ +#define PAGE_SIZE_IN_WORDS 256 +/** @} */ + +/** @brief The size that must be reserved for the MBR when a softdevice is written to flash. +This is the offset where the first byte of the softdevice hex file is written.*/ +#define MBR_SIZE (0x1000) + +/** @addtogroup NRF_MBR_ENUMS Enumerations + * @{ */ + +/**@brief nRF Master Boot Record API SVC numbers. */ +enum NRF_MBR_SVCS +{ + SD_MBR_COMMAND = MBR_SVC_BASE, /**< ::sd_mbr_command */ +}; + +/**@brief Possible values for ::sd_mbr_command_t.command */ +enum NRF_MBR_COMMANDS +{ + SD_MBR_COMMAND_COPY_BL, /**< Copy a new BootLoader. @see sd_mbr_command_copy_bl_t */ + SD_MBR_COMMAND_COPY_SD, /**< Copy a new SoftDevice. @see ::sd_mbr_command_copy_sd_t*/ + SD_MBR_COMMAND_INIT_SD, /**< Init forwarding interrupts to SD, and run reset function in SD*/ + SD_MBR_COMMAND_COMPARE, /**< This command works like memcmp. @see ::sd_mbr_command_compare_t*/ + SD_MBR_COMMAND_VECTOR_TABLE_BASE_SET, /**< Start forwarding all exception to this address @see ::sd_mbr_command_vector_table_base_set_t*/ +}; + +/** @} */ + +/** @addtogroup NRF_MBR_TYPES Types + * @{ */ + +/**@brief This command copies part of a new SoftDevice + * The destination area is erased before copying. + * If dst is in the middle of a flash page, that whole flash page will be erased. + * If (dst+len) is in the middle of a flash page, that whole flash page will be erased. + * + * The user of this function is responsible for setting the PROTENSET registers. + * + * @retval ::NRF_SUCCESS indicates that the contents of the memory blocks where copied correctly. + * @retval ::NRF_ERROR_INTERNAL indicates that the contents of the memory blocks where not verified correctly after copying. + */ +typedef struct +{ + uint32_t *src; /**< Pointer to the source of data to be copied.*/ + uint32_t *dst; /**< Pointer to the destination where the content is to be copied.*/ + uint32_t len; /**< Number of 32 bit words to copy. Must be a multiple of @ref PAGE_SIZE_IN_WORDS words.*/ +} sd_mbr_command_copy_sd_t; + + +/**@brief This command works like memcmp, but takes the length in words. + * + * @retval ::NRF_SUCCESS indicates that the contents of both memory blocks are equal. + * @retval ::NRF_ERROR_NULL indicates that the contents of the memory blocks are not equal. + */ +typedef struct +{ + uint32_t *ptr1; /**< Pointer to block of memory. */ + uint32_t *ptr2; /**< Pointer to block of memory. */ + uint32_t len; /**< Number of 32 bit words to compare.*/ +} sd_mbr_command_compare_t; + + +/**@brief This command copies a new BootLoader. + * With this command, destination of BootLoader is always the address written in NRF_UICR->BOOTADDR. + * + * Destination is erased by this function. + * If (destination+bl_len) is in the middle of a flash page, that whole flash page will be erased. + * + * This function will use PROTENSET to protect the flash that is not intended to be written. + * + * On Success, this function will not return. It will start the new BootLoader from reset-vector as normal. + * + * @retval ::NRF_ERROR_INTERNAL indicates an internal error that should not happen. + * @retval ::NRF_ERROR_FORBIDDEN if NRF_UICR->BOOTADDR is not set. + * @retval ::NRF_ERROR_INVALID_LENGTH if parameters attempts to read or write outside flash area. + */ +typedef struct +{ + uint32_t *bl_src; /**< Pointer to the source of the Bootloader to be be copied.*/ + uint32_t bl_len; /**< Number of 32 bit words to copy for BootLoader. */ +} sd_mbr_command_copy_bl_t; + +/**@brief Sets the base address of the interrupt vector table for interrupts forwarded from the MBR + * + * Once this function has been called, this address is where the MBR will start to forward interrupts to after a reset. + * + * To restore default forwarding this function should be called with @param address set to 0. + * The MBR will then start forwarding to interrupts to the address in NFR_UICR->BOOTADDR or to the SoftDevice if the BOOTADDR is not set. + * + * @retval ::NRF_ERROR_INTERNAL indicates an internal error that should not happen. + * @retval ::NRF_ERROR_INVALID_ADDR if parameter address is outside of the flash size. + */ +typedef struct +{ + uint32_t address; /**< The base address of the interrupt vector table for forwarded interrupts.*/ +} sd_mbr_command_vector_table_base_set_t; + +typedef struct +{ + uint32_t command; /**< type of command to be issued see @ref NRF_MBR_COMMANDS. */ + union + { + sd_mbr_command_copy_sd_t copy_sd; /**< Parameters for copy SoftDevice.*/ + sd_mbr_command_copy_bl_t copy_bl; /**< Parameters for copy BootLoader.*/ + sd_mbr_command_compare_t compare; /**< Parameters for verify.*/ + sd_mbr_command_vector_table_base_set_t base_set; /**< Parameters for vector table base set.*/ + } params; +} sd_mbr_command_t; + +/** @} */ + +/** @addtogroup NRF_MBR_FUNCTIONS Functions + * @{ */ + +/**@brief Issue Master Boot Record commands + * + * Commands used when updating a SoftDevice and bootloader. + * + * @param[in] param Pointer to a struct describing the command. + * + *@note for retvals see ::sd_mbr_command_copy_sd_t ::sd_mbr_command_copy_bl_t ::sd_mbr_command_compare_t + +*/ +SVCALL(SD_MBR_COMMAND, uint32_t, sd_mbr_command(sd_mbr_command_t* param)); + +/** @} */ +#ifdef __cplusplus +} +#endif +#endif // NRF_MBR_H__ + +/** + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error.h new file mode 100644 index 0000000000..1035b76d4a --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error.h @@ -0,0 +1,87 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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. + * + */ + /** + @defgroup nrf_error SoftDevice Global Error Codes + @{ + + @brief Global Error definitions +*/ + +/* Header guard */ +#ifndef NRF_ERROR_H__ +#define NRF_ERROR_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/** @defgroup NRF_ERRORS_BASE Error Codes Base number definitions + * @{ */ +#define NRF_ERROR_BASE_NUM (0x0) ///< Global error base +#define NRF_ERROR_SDM_BASE_NUM (0x1000) ///< SDM error base +#define NRF_ERROR_SOC_BASE_NUM (0x2000) ///< SoC error base +#define NRF_ERROR_STK_BASE_NUM (0x3000) ///< STK error base +/** @} */ + +#define NRF_SUCCESS (NRF_ERROR_BASE_NUM + 0) ///< Successful command +#define NRF_ERROR_SVC_HANDLER_MISSING (NRF_ERROR_BASE_NUM + 1) ///< SVC handler is missing +#define NRF_ERROR_SOFTDEVICE_NOT_ENABLED (NRF_ERROR_BASE_NUM + 2) ///< SoftDevice has not been enabled +#define NRF_ERROR_INTERNAL (NRF_ERROR_BASE_NUM + 3) ///< Internal Error +#define NRF_ERROR_NO_MEM (NRF_ERROR_BASE_NUM + 4) ///< No Memory for operation +#define NRF_ERROR_NOT_FOUND (NRF_ERROR_BASE_NUM + 5) ///< Not found +#define NRF_ERROR_NOT_SUPPORTED (NRF_ERROR_BASE_NUM + 6) ///< Not supported +#define NRF_ERROR_INVALID_PARAM (NRF_ERROR_BASE_NUM + 7) ///< Invalid Parameter +#define NRF_ERROR_INVALID_STATE (NRF_ERROR_BASE_NUM + 8) ///< Invalid state, operation disallowed in this state +#define NRF_ERROR_INVALID_LENGTH (NRF_ERROR_BASE_NUM + 9) ///< Invalid Length +#define NRF_ERROR_INVALID_FLAGS (NRF_ERROR_BASE_NUM + 10) ///< Invalid Flags +#define NRF_ERROR_INVALID_DATA (NRF_ERROR_BASE_NUM + 11) ///< Invalid Data +#define NRF_ERROR_DATA_SIZE (NRF_ERROR_BASE_NUM + 12) ///< Invalid Data size +#define NRF_ERROR_TIMEOUT (NRF_ERROR_BASE_NUM + 13) ///< Operation timed out +#define NRF_ERROR_NULL (NRF_ERROR_BASE_NUM + 14) ///< Null Pointer +#define NRF_ERROR_FORBIDDEN (NRF_ERROR_BASE_NUM + 15) ///< Forbidden Operation +#define NRF_ERROR_INVALID_ADDR (NRF_ERROR_BASE_NUM + 16) ///< Bad Memory Address +#define NRF_ERROR_BUSY (NRF_ERROR_BASE_NUM + 17) ///< Busy +#define NRF_ERROR_CONN_COUNT (NRF_ERROR_BASE_NUM + 18) ///< Maximum connection count exceeded. +#define NRF_ERROR_RESOURCES (NRF_ERROR_BASE_NUM + 19) ///< Not enough resources for operation + +#ifdef __cplusplus +} +#endif +#endif // NRF_ERROR_H__ + +/** + @} +*/ diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/system_nrf52.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error_sdm.h similarity index 62% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/system_nrf52.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error_sdm.h index 02d260738a..412b9b5524 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/system_nrf52.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error_sdm.h @@ -16,6 +16,10 @@ * contributors to this software may be used to endorse or promote products * derived from this software without specific prior written permission. * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * * * 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 @@ -29,43 +33,35 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ + /** + @addtogroup nrf_sdm_api + @{ + @defgroup nrf_sdm_error SoftDevice Manager Error Codes + @{ -#ifndef SYSTEM_NRF52_H -#define SYSTEM_NRF52_H + @brief Error definitions for the SDM API +*/ + +/* Header guard */ +#ifndef NRF_ERROR_SDM_H__ +#define NRF_ERROR_SDM_H__ + +#include "nrf_error.h" #ifdef __cplusplus extern "C" { #endif -#include - - -extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ - -/** - * Initialize the system - * - * @param none - * @return none - * - * @brief Setup the microcontroller system. - * Initialize the System and update the SystemCoreClock variable. - */ -extern void SystemInit (void); - -/** - * Update SystemCoreClock variable - * - * @param none - * @return none - * - * @brief Updates the SystemCoreClock with current core Clock - * retrieved from cpu registers. - */ -extern void SystemCoreClockUpdate (void); +#define NRF_ERROR_SDM_LFCLK_SOURCE_UNKNOWN (NRF_ERROR_SDM_BASE_NUM + 0) ///< Unknown lfclk source. +#define NRF_ERROR_SDM_INCORRECT_INTERRUPT_CONFIGURATION (NRF_ERROR_SDM_BASE_NUM + 1) ///< Incorrect interrupt configuration (can be caused by using illegal priority levels, or having enabled SoftDevice interrupts). +#define NRF_ERROR_SDM_INCORRECT_CLENR0 (NRF_ERROR_SDM_BASE_NUM + 2) ///< Incorrect CLENR0 (can be caused by erronous SoftDevice flashing). #ifdef __cplusplus } #endif +#endif // NRF_ERROR_SDM_H__ -#endif /* SYSTEM_NRF52_H */ +/** + @} + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error_soc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error_soc.h new file mode 100644 index 0000000000..93958a44d0 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error_soc.h @@ -0,0 +1,82 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 nrf_soc_api + @{ + @defgroup nrf_soc_error SoC Library Error Codes + @{ + + @brief Error definitions for the SoC library + +*/ + +/* Header guard */ +#ifndef NRF_ERROR_SOC_H__ +#define NRF_ERROR_SOC_H__ + +#include "nrf_error.h" +#ifdef __cplusplus +extern "C" { +#endif + +/* Mutex Errors */ +#define NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN (NRF_ERROR_SOC_BASE_NUM + 0) ///< Mutex already taken + +/* NVIC errors */ +#define NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE (NRF_ERROR_SOC_BASE_NUM + 1) ///< NVIC interrupt not available +#define NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED (NRF_ERROR_SOC_BASE_NUM + 2) ///< NVIC interrupt priority not allowed +#define NRF_ERROR_SOC_NVIC_SHOULD_NOT_RETURN (NRF_ERROR_SOC_BASE_NUM + 3) ///< NVIC should not return + +/* Power errors */ +#define NRF_ERROR_SOC_POWER_MODE_UNKNOWN (NRF_ERROR_SOC_BASE_NUM + 4) ///< Power mode unknown +#define NRF_ERROR_SOC_POWER_POF_THRESHOLD_UNKNOWN (NRF_ERROR_SOC_BASE_NUM + 5) ///< Power POF threshold unknown +#define NRF_ERROR_SOC_POWER_OFF_SHOULD_NOT_RETURN (NRF_ERROR_SOC_BASE_NUM + 6) ///< Power off should not return + +/* Rand errors */ +#define NRF_ERROR_SOC_RAND_NOT_ENOUGH_VALUES (NRF_ERROR_SOC_BASE_NUM + 7) ///< RAND not enough values + +/* PPI errors */ +#define NRF_ERROR_SOC_PPI_INVALID_CHANNEL (NRF_ERROR_SOC_BASE_NUM + 8) ///< Invalid PPI Channel +#define NRF_ERROR_SOC_PPI_INVALID_GROUP (NRF_ERROR_SOC_BASE_NUM + 9) ///< Invalid PPI Group + +#ifdef __cplusplus +} +#endif +#endif // NRF_ERROR_SOC_H__ +/** + @} + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_nvic.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_nvic.h new file mode 100644 index 0000000000..dae0ca5a53 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_nvic.h @@ -0,0 +1,483 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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. + * + */ +/** + * @defgroup nrf_nvic_api SoftDevice NVIC API + * @{ + * + * @note In order to use this module, the following code has to be added to a .c file: + * \code + * nrf_nvic_state_t nrf_nvic_state; + * \endcode + * + * @note Definitions and declarations starting with __ (double underscore) in this header file are + * not intended for direct use by the application. + * + * @brief APIs for the accessing NVIC when using a SoftDevice. + * + */ + +#ifndef NRF_NVIC_H__ +#define NRF_NVIC_H__ + +#include +#include "nrf.h" + +#include "nrf_error_soc.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/**@addtogroup NRF_NVIC_DEFINES Defines + * @{ */ + +/**@defgroup NRF_NVIC_ISER_DEFINES SoftDevice NVIC internal definitions + * @{ */ + +#define __NRF_NVIC_NVMC_IRQn (30) /**< The peripheral ID of the NVMC. IRQ numbers are used to identify peripherals, but the NVMC doesn't have an IRQ number in the MDK. */ + +#ifdef NRF51 + #define __NRF_NVIC_ISER_COUNT (1) /**< The number of ISER/ICER registers in the NVIC that are used. */ + + /**@brief Interrupts used by the SoftDevice. */ + #define __NRF_NVIC_SD_IRQS_0 ((uint32_t)( \ + (1U << POWER_CLOCK_IRQn) \ + | (1U << RADIO_IRQn) \ + | (1U << RTC0_IRQn) \ + | (1U << TIMER0_IRQn) \ + | (1U << RNG_IRQn) \ + | (1U << ECB_IRQn) \ + | (1U << CCM_AAR_IRQn) \ + | (1U << TEMP_IRQn) \ + | (1U << __NRF_NVIC_NVMC_IRQn) \ + | (1U << (uint32_t)SWI4_IRQn) \ + | (1U << (uint32_t)SWI5_IRQn) \ + )) + + /**@brief Interrupts available for to application. */ + #define __NRF_NVIC_APP_IRQS_0 (~__NRF_NVIC_SD_IRQS_0) +#endif + +#ifdef NRF52 + #define __NRF_NVIC_ISER_COUNT (2) /**< The number of ISER/ICER registers in the NVIC that are used. */ + + /**@brief Interrupts used by the SoftDevice. */ + #define __NRF_NVIC_SD_IRQS_0 ((uint32_t)( \ + (1U << POWER_CLOCK_IRQn) \ + | (1U << RADIO_IRQn) \ + | (1U << RTC0_IRQn) \ + | (1U << TIMER0_IRQn) \ + | (1U << RNG_IRQn) \ + | (1U << ECB_IRQn) \ + | (1U << CCM_AAR_IRQn) \ + | (1U << TEMP_IRQn) \ + | (1U << __NRF_NVIC_NVMC_IRQn) \ + | (1U << (uint32_t)SWI4_EGU4_IRQn) \ + | (1U << (uint32_t)SWI5_EGU5_IRQn) \ + )) + #define __NRF_NVIC_SD_IRQS_1 ((uint32_t)0) + + /**@brief Interrupts available for to application. */ + #define __NRF_NVIC_APP_IRQS_0 (~__NRF_NVIC_SD_IRQS_0) + #define __NRF_NVIC_APP_IRQS_1 (~__NRF_NVIC_SD_IRQS_1) +#endif +/**@} */ + +/**@} */ + +/**@addtogroup NRF_NVIC_VARIABLES Variables + * @{ */ + +/**@brief Type representing the state struct for the SoftDevice NVIC module. */ +typedef struct +{ + uint32_t volatile __irq_masks[__NRF_NVIC_ISER_COUNT]; /**< IRQs enabled by the application in the NVIC. */ + uint32_t volatile __cr_flag; /**< Non-zero if already in a critical region */ +} nrf_nvic_state_t; + +/**@brief Variable keeping the state for the SoftDevice NVIC module. This must be declared in an + * application source file. */ +extern nrf_nvic_state_t nrf_nvic_state; + +/**@} */ + +/**@addtogroup NRF_NVIC_INTERNAL_FUNCTIONS SoftDevice NVIC internal functions + * @{ */ + +/**@brief Disables IRQ interrupts globally, including the SoftDevice's interrupts. + * + * @retval The value of PRIMASK prior to disabling the interrupts. + */ +static inline int __sd_nvic_irq_disable(void) +{ + int pm = __get_PRIMASK(); + __disable_irq(); + return pm; +} + +/**@brief Enables IRQ interrupts globally, including the SoftDevice's interrupts. + */ +static inline void __sd_nvic_irq_enable(void) +{ + __enable_irq(); +} + +/**@brief Checks if IRQn is available to application + * @param[in] IRQn irq to check + * + * @retval 1 (true) if the irq to check is available to the application + */ +static inline uint32_t __sd_nvic_app_accessible_irq(IRQn_Type IRQn) +{ + if (IRQn < 32) + { + return ((1UL<= (1 << __NVIC_PRIO_BITS)) + { + return 0; + } +#ifdef NRF51 + if( priority == 0 + || priority == 2 + ) + { + return 0; + } +#endif +#ifdef NRF52 + if( priority == 0 + || priority == 1 + || priority == 4 + || priority == 5 + ) + { + return 0; + } +#endif + return 1; +} + +/**@} */ + +/**@addtogroup NRF_NVIC_FUNCTIONS SoftDevice NVIC public functions + * @{ */ + +/**@brief Enable External Interrupt. + * @note Corresponds to NVIC_EnableIRQ in CMSIS. + * + * @pre IRQn is valid and not reserved by the stack. + * + * @param[in] IRQn See the NVIC_EnableIRQ documentation in CMSIS. + * + * @retval ::NRF_SUCCESS The interrupt was enabled. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE The interrupt is not available for the application. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED The interrupt has a priority not available for the application. + */ +static inline uint32_t sd_nvic_EnableIRQ(IRQn_Type IRQn) +{ + if (!__sd_nvic_app_accessible_irq(IRQn)) + { + return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE; + } + if (!__sd_nvic_is_app_accessible_priority(NVIC_GetPriority(IRQn))) + { + return NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED; + } + + if (nrf_nvic_state.__cr_flag) + { + nrf_nvic_state.__irq_masks[(uint32_t)((int32_t)IRQn) >> 5] |= (uint32_t)(1 << ((uint32_t)((int32_t)IRQn) & (uint32_t)0x1F)); + } + else + { + NVIC_EnableIRQ(IRQn); + } + return NRF_SUCCESS; +} + +/**@brief Disable External Interrupt. + * @note Corresponds to NVIC_DisableIRQ in CMSIS. + * + * @pre IRQn is valid and not reserved by the stack. + * + * @param[in] IRQn See the NVIC_DisableIRQ documentation in CMSIS. + * + * @retval ::NRF_SUCCESS The interrupt was disabled. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE The interrupt is not available for the application. + */ +static inline uint32_t sd_nvic_DisableIRQ(IRQn_Type IRQn) +{ + if (!__sd_nvic_app_accessible_irq(IRQn)) + { + return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE; + } + + if (nrf_nvic_state.__cr_flag) + { + nrf_nvic_state.__irq_masks[(uint32_t)((int32_t)IRQn) >> 5] &= ~(1UL << ((uint32_t)(IRQn) & 0x1F)); + } + else + { + NVIC_DisableIRQ(IRQn); + } + + return NRF_SUCCESS; +} + +/**@brief Get Pending Interrupt. + * @note Corresponds to NVIC_GetPendingIRQ in CMSIS. + * + * @pre IRQn is valid and not reserved by the stack. + * + * @param[in] IRQn See the NVIC_GetPendingIRQ documentation in CMSIS. + * @param[out] p_pending_irq Return value from NVIC_GetPendingIRQ. + * + * @retval ::NRF_SUCCESS The interrupt is available for the application. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application. + */ +static inline uint32_t sd_nvic_GetPendingIRQ(IRQn_Type IRQn, uint32_t * p_pending_irq) +{ + if (__sd_nvic_app_accessible_irq(IRQn)) + { + *p_pending_irq = NVIC_GetPendingIRQ(IRQn); + return NRF_SUCCESS; + } + else + { + return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE; + } +} + +/**@brief Set Pending Interrupt. + * @note Corresponds to NVIC_SetPendingIRQ in CMSIS. + * + * @pre IRQn is valid and not reserved by the stack. + * + * @param[in] IRQn See the NVIC_SetPendingIRQ documentation in CMSIS. + * + * @retval ::NRF_SUCCESS The interrupt is set pending. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application. + */ +static inline uint32_t sd_nvic_SetPendingIRQ(IRQn_Type IRQn) +{ + if (__sd_nvic_app_accessible_irq(IRQn)) + { + NVIC_SetPendingIRQ(IRQn); + return NRF_SUCCESS; + } + else + { + return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE; + } +} + +/**@brief Clear Pending Interrupt. + * @note Corresponds to NVIC_ClearPendingIRQ in CMSIS. + * + * @pre IRQn is valid and not reserved by the stack. + * + * @param[in] IRQn See the NVIC_ClearPendingIRQ documentation in CMSIS. + * + * @retval ::NRF_SUCCESS The interrupt pending flag is cleared. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application. + */ +static inline uint32_t sd_nvic_ClearPendingIRQ(IRQn_Type IRQn) +{ + if (__sd_nvic_app_accessible_irq(IRQn)) + { + NVIC_ClearPendingIRQ(IRQn); + return NRF_SUCCESS; + } + else + { + return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE; + } +} + +/**@brief Set Interrupt Priority. + * @note Corresponds to NVIC_SetPriority in CMSIS. + * + * @pre IRQn is valid and not reserved by the stack. + * @pre Priority is valid and not reserved by the stack. + * + * @param[in] IRQn See the NVIC_SetPriority documentation in CMSIS. + * @param[in] priority A valid IRQ priority for use by the application. + * + * @retval ::NRF_SUCCESS The interrupt and priority level is available for the application. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED The interrupt priority is not available for the application. + */ +static inline uint32_t sd_nvic_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if (!__sd_nvic_app_accessible_irq(IRQn)) + { + return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE; + } + + if (!__sd_nvic_is_app_accessible_priority(priority)) + { + return NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED; + } + + NVIC_SetPriority(IRQn, (uint32_t)priority); + return NRF_SUCCESS; +} + +/**@brief Get Interrupt Priority. + * @note Corresponds to NVIC_GetPriority in CMSIS. + * + * @pre IRQn is valid and not reserved by the stack. + * + * @param[in] IRQn See the NVIC_GetPriority documentation in CMSIS. + * @param[out] p_priority Return value from NVIC_GetPriority. + * + * @retval ::NRF_SUCCESS The interrupt priority is returned in p_priority. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE - IRQn is not available for the application. + */ +static inline uint32_t sd_nvic_GetPriority(IRQn_Type IRQn, uint32_t * p_priority) +{ + if (__sd_nvic_app_accessible_irq(IRQn)) + { + *p_priority = (NVIC_GetPriority(IRQn) & 0xFF); + return NRF_SUCCESS; + } + else + { + return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE; + } +} + +/**@brief System Reset. + * @note Corresponds to NVIC_SystemReset in CMSIS. + * + * @retval ::NRF_ERROR_SOC_NVIC_SHOULD_NOT_RETURN + */ +static inline uint32_t sd_nvic_SystemReset(void) +{ + NVIC_SystemReset(); + return NRF_ERROR_SOC_NVIC_SHOULD_NOT_RETURN; +} + +/**@brief Enters critical region. + * + * @post Application interrupts will be disabled. + * @note sd_nvic_critical_region_enter() and ::sd_nvic_critical_region_exit() must be called in matching pairs inside each + * execution context + * @sa sd_nvic_critical_region_exit + * + * @retval ::NRF_SUCCESS + */ +static inline uint32_t sd_nvic_critical_region_enter(uint8_t * p_is_nested_critical_region) +{ + int was_masked = __sd_nvic_irq_disable(); + if (!nrf_nvic_state.__cr_flag) + { + nrf_nvic_state.__cr_flag = 1; + nrf_nvic_state.__irq_masks[0] = ( NVIC->ICER[0] & __NRF_NVIC_APP_IRQS_0 ); + NVIC->ICER[0] = __NRF_NVIC_APP_IRQS_0; + #ifdef NRF52 + nrf_nvic_state.__irq_masks[1] = ( NVIC->ICER[1] & __NRF_NVIC_APP_IRQS_1 ); + NVIC->ICER[1] = __NRF_NVIC_APP_IRQS_1; + #endif + *p_is_nested_critical_region = 0; + } + else + { + *p_is_nested_critical_region = 1; + } + if (!was_masked) + { + __sd_nvic_irq_enable(); + } + return NRF_SUCCESS; +} + +/**@brief Exit critical region. + * + * @pre Application has entered a critical region using ::sd_nvic_critical_region_enter. + * @post If not in a nested critical region, the application interrupts will restored to the state before ::sd_nvic_critical_region_enter was called. + * + * @param[in] is_nested_critical_region If this is set to 1, the critical region won't be exited. @sa sd_nvic_critical_region_enter. + * + * @retval ::NRF_SUCCESS + */ +static inline uint32_t sd_nvic_critical_region_exit(uint8_t is_nested_critical_region) +{ + if (nrf_nvic_state.__cr_flag && (is_nested_critical_region == 0)) + { + int was_masked = __sd_nvic_irq_disable(); + NVIC->ISER[0] = nrf_nvic_state.__irq_masks[0]; + #ifdef NRF52 + NVIC->ISER[1] = nrf_nvic_state.__irq_masks[1]; + #endif + nrf_nvic_state.__cr_flag = 0; + if (!was_masked) + { + __sd_nvic_irq_enable(); + } + } + + return NRF_SUCCESS; +} +/**@} */ + +#ifdef __cplusplus +} +#endif + +#endif // NRF_NVIC_H__ + +/**@} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_sd_def.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_sd_def.h new file mode 100644 index 0000000000..dc433f9fd2 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_sd_def.h @@ -0,0 +1,23 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef NRF_SD_DEF_H__ +#define NRF_SD_DEF_H__ + +#include + +#define SD_PPI_CHANNELS_USED 0xFFF0C000uL /**< PPI channels utilized by SotfDevice (not available to the application). */ +#define SD_PPI_GROUPS_USED 0x0000000CuL /**< PPI groups utilized by SoftDevice (not available to the application). */ +#define SD_TIMERS_USED 0x00000001uL /**< Timers used by SoftDevice. */ +#define SD_SWI_USED 0x0000003CuL /**< Software interrupts used by SoftDevice */ + +#endif /* NRF_SD_DEF_H__ */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_sdm.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_sdm.h new file mode 100644 index 0000000000..9b673ea4f7 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_sdm.h @@ -0,0 +1,271 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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. + * + */ +/** + @defgroup nrf_sdm_api SoftDevice Manager API + @{ + + @brief APIs for SoftDevice management. + +*/ + +/* Header guard */ +#ifndef NRF_SDM_H__ +#define NRF_SDM_H__ + +#include "nrf_svc.h" +#include "nrf.h" +#include "nrf_soc.h" +#include "nrf_error_sdm.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup NRF_SDM_DEFINES Defines + * @{ */ +#ifdef NRFSOC_DOXYGEN +//Stuff defined elsewere, to satisfy doxygen +#define MBR_SIZE 0 +#warning test +#endif + +/** @brief SoftDevice Manager SVC Base number. */ +#define SDM_SVC_BASE 0x10 + +/** @brief Defines the SoftDevice Information Structure location (address) as an offset from +the start of the softdevice (without MBR)*/ +#define SOFTDEVICE_INFO_STRUCT_OFFSET (0x2000) + +/** @brief Defines the absolute Softdevice information structure location (address)*/ +#define SOFTDEVICE_INFO_STRUCT_ADDRESS (SOFTDEVICE_INFO_STRUCT_OFFSET + MBR_SIZE) + +/** @brief Defines the offset for Softdevice size value relative to Softdevice base address*/ +#define SD_SIZE_OFFSET (SOFTDEVICE_INFO_STRUCT_OFFSET + 0x08) + +/** @brief Defines the offset for FWID value relative to Softdevice base address*/ +#define SD_FWID_OFFSET (SOFTDEVICE_INFO_STRUCT_OFFSET + 0x0C) + +/** @brief Defines a macro for retreiving the actual Softdevice size value from a given base address + use @ref MBR_SIZE when Softdevice is installed just above the MBR (the usual case)*/ +#define SD_SIZE_GET(baseaddr) (*((uint32_t *) ((baseaddr) + SD_SIZE_OFFSET))) + +/** @brief Defines a macro for retreiving the actual FWID value from a given base address + use @ref MBR_SIZE when Softdevice is installed just above the MBR (the usual case)*/ +#define SD_FWID_GET(baseaddr) ((*((uint32_t *) ((baseaddr) + SD_FWID_OFFSET))) & 0xFFFF) + +/**@defgroup NRF_FAULT_ID_RANGES Fault ID ranges + * @{ */ +#define NRF_FAULT_ID_SD_RANGE_START 0x00000000 /**< SoftDevice ID range start. */ +#define NRF_FAULT_ID_APP_RANGE_START 0x00001000 /**< Application ID range start. */ +/**@} */ + +/**@defgroup NRF_FAULT_IDS Fault ID types + * @{ */ +#define NRF_FAULT_ID_SD_ASSERT (NRF_FAULT_ID_SD_RANGE_START + 1) /**< SoftDevice assertion. The info parameter will be set to 0x00000000. */ +#define NRF_FAULT_ID_APP_MEMACC (NRF_FAULT_ID_APP_RANGE_START + 1) /**< Application invalid memory access. The info parameter will contain the address in memory that was accessed. */ +/**@} */ + +/** @} */ + +/** @addtogroup NRF_SDM_ENUMS Enumerations + * @{ */ + +/**@brief nRF SoftDevice Manager API SVC numbers. */ +enum NRF_SD_SVCS +{ + SD_SOFTDEVICE_ENABLE = SDM_SVC_BASE, /**< ::sd_softdevice_enable */ + SD_SOFTDEVICE_DISABLE, /**< ::sd_softdevice_disable */ + SD_SOFTDEVICE_IS_ENABLED, /**< ::sd_softdevice_is_enabled */ + SD_SOFTDEVICE_VECTOR_TABLE_BASE_SET, /**< ::sd_softdevice_vector_table_base_set */ + SVC_SDM_LAST /**< Placeholder for last SDM SVC */ +}; + +/** @} */ + +/** @addtogroup NRF_SDM_DEFINES Defines + * @{ */ + +/**@defgroup NRF_CLOCK_LF_XTAL_ACCURACY Clock accuracy * @{ */ + +#define NRF_CLOCK_LF_XTAL_ACCURACY_250_PPM (0) /* Default */ +#define NRF_CLOCK_LF_XTAL_ACCURACY_500_PPM (1) +#define NRF_CLOCK_LF_XTAL_ACCURACY_150_PPM (2) +#define NRF_CLOCK_LF_XTAL_ACCURACY_100_PPM (3) +#define NRF_CLOCK_LF_XTAL_ACCURACY_75_PPM (4) +#define NRF_CLOCK_LF_XTAL_ACCURACY_50_PPM (5) +#define NRF_CLOCK_LF_XTAL_ACCURACY_30_PPM (6) +#define NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM (7) + +/** @} */ + +/**@defgroup NRF_CLOCK_LF_SRC Possible lfclk oscillator sources * @{ */ + +#define NRF_CLOCK_LF_SRC_RC (0) /**< LFCLK RC oscillator. */ +#define NRF_CLOCK_LF_SRC_XTAL (1) /**< LFCLK crystal oscillator. */ +#define NRF_CLOCK_LF_SRC_SYNTH (2) /**< LFCLK Synthesized from HFCLK. */ + +/** @} */ +/** @} */ + +/** @addtogroup NRF_SDM_TYPES Types + * @{ */ + +/**@brief Type representing lfclk oscillator source. */ +typedef struct +{ + uint8_t source; /**< LF oscillator clock source, see @ref NRF_CLOCK_LF_SRC. */ + uint8_t rc_ctiv; /**< Only for NRF_CLOCK_LF_SRC_RC: Calibration timer interval in 1/4 second + units (nRF51: 1-64, nRF52: 1-32). + @note To avoid excessive clock drift, 0.5 degrees Celsius is the + maximum temperature change allowed in one calibration timer + interval. The interval should be selected to ensure this. + + @note Must be 0 if source is not NRF_CLOCK_LF_SRC_RC. */ + uint8_t rc_temp_ctiv; /**< Only for NRF_CLOCK_LF_SRC_RC: How often (in number of calibration + intervals) the RC oscillator shall be calibrated if the temperature + hasn't changed. + 0: Always calibrate even if the temperature hasn't changed. + 1: Only calibrate if the temperature has changed (nRF51 only). + 2-33: Check the temperature and only calibrate if it has changed, + however calibration will take place every rc_temp_ctiv + intervals in any case. + + @note Must be 0 if source is not NRF_CLOCK_LF_SRC_RC. + + @note For nRF52, the application must ensure calibration at least once + every 8 seconds to ensure +/-250ppm clock stability. The + recommended configuration for NRF_CLOCK_LF_SRC_RC on nRF52 is + rc_ctiv=16 and rc_temp_ctiv=2. This will ensure calibration at + least once every 8 seconds and for temperature changes of 0.5 + degrees Celsius every 4 seconds. See the Product Specification + for the nRF52 device being used for more information.*/ + uint8_t xtal_accuracy; /**< External crystal clock accuracy used in the LL to compute timing windows. + + @note For the NRF_CLOCK_LF_SRC_RC clock source this parameter is ignored. */ +} nrf_clock_lf_cfg_t; + +/**@brief Fault Handler type. + * + * When certain unrecoverable errors occur within the application or SoftDevice the fault handler will be called back. + * The protocol stack will be in an undefined state when this happens and the only way to recover will be to + * perform a reset, using e.g. CMSIS NVIC_SystemReset(). + * + * @note This callback is executed in HardFault context, thus SVC functions cannot be called from the fault callback. + * + * @param[in] id Fault identifier. See @ref NRF_FAULT_IDS. + * @param[in] pc The program counter of the instruction that triggered the fault. + * @param[in] info Optional additional information regarding the fault. Refer to each Fault identifier for details. + */ +typedef void (*nrf_fault_handler_t)(uint32_t id, uint32_t pc, uint32_t info); + +/** @} */ + +/** @addtogroup NRF_SDM_FUNCTIONS Functions + * @{ */ + +/**@brief Enables the SoftDevice and by extension the protocol stack. + * + * @note Some care must be taken if a low frequency clock source is already running when calling this function: + * If the LF clock has a different source then the one currently running, it will be stopped. Then, the new + * clock source will be started. + * + * @note This function has no effect when returning with an error. + * + * @post If return code is ::NRF_SUCCESS + * - SoC library and protocol stack APIs are made available. + * - A portion of RAM will be unavailable (see relevant SDS documentation). + * - Some peripherals will be unavailable or available only through the SoC API (see relevant SDS documentation). + * - Interrupts will not arrive from protected peripherals or interrupts. + * - nrf_nvic_ functions must be used instead of CMSIS NVIC_ functions for reliable usage of the SoftDevice. + * - Interrupt latency may be affected by the SoftDevice (see relevant SDS documentation). + * - Chosen low frequency clock source will be running. + * + * @param p_clock_lf_cfg Low frequency clock source and accuracy. + If NULL the clock will be configured as an rc source with rc_ctiv = 16 and .rc_temp_ctiv = 2 + In the case of XTAL source, the PPM accuracy of the chosen clock source must be greater than or equal to the actual characteristics of your XTAL clock. + * @param fault_handler Callback to be invoked in case of fault. + * + * @retval ::NRF_SUCCESS + * @retval ::NRF_ERROR_INVALID_STATE SoftDevice is already enabled, and the clock source and fault handler cannot be updated. + * @retval ::NRF_ERROR_SDM_INCORRECT_INTERRUPT_CONFIGURATION SoftDevice interrupt is already enabled, or an enabled interrupt has an illegal priority level. + * @retval ::NRF_ERROR_SDM_LFCLK_SOURCE_UNKNOWN Unknown low frequency clock source selected. + */ +SVCALL(SD_SOFTDEVICE_ENABLE, uint32_t, sd_softdevice_enable(nrf_clock_lf_cfg_t const * p_clock_lf_cfg, nrf_fault_handler_t fault_handler)); + + +/**@brief Disables the SoftDevice and by extension the protocol stack. + * + * Idempotent function to disable the SoftDevice. + * + * @post SoC library and protocol stack APIs are made unavailable. + * @post All interrupts that was protected by the SoftDevice will be disabled and initialized to priority 0 (highest). + * @post All peripherals used by the SoftDevice will be reset to default values. + * @post All of RAM become available. + * @post All interrupts are forwarded to the application. + * @post LFCLK source chosen in ::sd_softdevice_enable will be left running. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_SOFTDEVICE_DISABLE, uint32_t, sd_softdevice_disable(void)); + +/**@brief Check if the SoftDevice is enabled. + * + * @param[out] p_softdevice_enabled If the SoftDevice is enabled: 1 else 0. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_SOFTDEVICE_IS_ENABLED, uint32_t, sd_softdevice_is_enabled(uint8_t * p_softdevice_enabled)); + +/**@brief Sets the base address of the interrupt vector table for interrupts forwarded from the SoftDevice + * + * This function is only intended to be called when a bootloader is enabled. + * + * @param[in] address The base address of the interrupt vector table for forwarded interrupts. + + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_SOFTDEVICE_VECTOR_TABLE_BASE_SET, uint32_t, sd_softdevice_vector_table_base_set(uint32_t address)); + +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif // NRF_SDM_H__ + +/** + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_soc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_soc.h new file mode 100644 index 0000000000..f3c0b0dfa4 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_soc.h @@ -0,0 +1,908 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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. + * + */ +/** + * @defgroup nrf_soc_api SoC Library API + * @{ + * + * @brief APIs for the SoC library. + * + */ + +#ifndef NRF_SOC_H__ +#define NRF_SOC_H__ + +#include +#include +#include "nrf_svc.h" +#include "nrf.h" + +#include "nrf_error_soc.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/**@addtogroup NRF_SOC_DEFINES Defines + * @{ */ + +/**@brief The number of the lowest SVC number reserved for the SoC library. */ +#define SOC_SVC_BASE (0x20) +#define SOC_SVC_BASE_NOT_AVAILABLE (0x2B) + +/**@brief Guranteed time for application to process radio inactive notification. */ +#define NRF_RADIO_NOTIFICATION_INACTIVE_GUARANTEED_TIME_US (62) + +/**@brief The minimum allowed timeslot extension time. */ +#define NRF_RADIO_MINIMUM_TIMESLOT_LENGTH_EXTENSION_TIME_US (200) + +#define SOC_ECB_KEY_LENGTH (16) /**< ECB key length. */ +#define SOC_ECB_CLEARTEXT_LENGTH (16) /**< ECB cleartext length. */ +#define SOC_ECB_CIPHERTEXT_LENGTH (SOC_ECB_CLEARTEXT_LENGTH) /**< ECB ciphertext length. */ + +#ifdef NRF51 +#define SD_EVT_IRQn (SWI2_IRQn) /**< SoftDevice Event IRQ number. Used for both protocol events and SoC events. */ +#define SD_EVT_IRQHandler (SWI2_IRQHandler) /**< SoftDevice Event IRQ handler. Used for both protocol events and SoC events. */ +#define RADIO_NOTIFICATION_IRQn (SWI1_IRQn) /**< The radio notification IRQ number. */ +#define RADIO_NOTIFICATION_IRQHandler (SWI1_IRQHandler) /**< The radio notification IRQ handler. */ +#endif +#ifdef NRF52 +#define SD_EVT_IRQn (SWI2_EGU2_IRQn) /**< SoftDevice Event IRQ number. Used for both protocol events and SoC events. */ +#define SD_EVT_IRQHandler (SWI2_EGU2_IRQHandler) /**< SoftDevice Event IRQ handler. Used for both protocol events and SoC events. */ +#define RADIO_NOTIFICATION_IRQn (SWI1_EGU1_IRQn) /**< The radio notification IRQ number. */ +#define RADIO_NOTIFICATION_IRQHandler (SWI1_EGU1_IRQHandler) /**< The radio notification IRQ handler. */ +#endif + +#define NRF_RADIO_LENGTH_MIN_US (100) /**< The shortest allowed radio timeslot, in microseconds. */ +#define NRF_RADIO_LENGTH_MAX_US (100000) /**< The longest allowed radio timeslot, in microseconds. */ + +#define NRF_RADIO_DISTANCE_MAX_US (128000000UL - 1UL) /**< The longest timeslot distance, in microseconds, allowed for the distance parameter (see @ref nrf_radio_request_normal_t) in the request. */ + +#define NRF_RADIO_EARLIEST_TIMEOUT_MAX_US (128000000UL - 1UL) /**< The longest timeout, in microseconds, allowed when requesting the earliest possible timeslot. */ + +#define NRF_RADIO_START_JITTER_US (2) /**< The maximum jitter in @ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_START relative to the requested start time. */ + +/**@} */ + +/**@addtogroup NRF_SOC_ENUMS Enumerations + * @{ */ + +/**@brief The SVC numbers used by the SVC functions in the SoC library. */ +enum NRF_SOC_SVCS +{ + SD_PPI_CHANNEL_ENABLE_GET = SOC_SVC_BASE, + SD_PPI_CHANNEL_ENABLE_SET, + SD_PPI_CHANNEL_ENABLE_CLR, + SD_PPI_CHANNEL_ASSIGN, + SD_PPI_GROUP_TASK_ENABLE, + SD_PPI_GROUP_TASK_DISABLE, + SD_PPI_GROUP_ASSIGN, + SD_PPI_GROUP_GET, + SD_FLASH_PAGE_ERASE, + SD_FLASH_WRITE, + SD_FLASH_PROTECT, + SD_MUTEX_NEW = SOC_SVC_BASE_NOT_AVAILABLE, + SD_MUTEX_ACQUIRE, + SD_MUTEX_RELEASE, + SD_RFU_1, + SD_RFU_2, + SD_RFU_3, + SD_RFU_4, + SD_RFU_5, + SD_RFU_6, + SD_RFU_7, + SD_RFU_8, + SD_RFU_9, + SD_RFU_10, + SD_RAND_APPLICATION_POOL_CAPACITY_GET, + SD_RAND_APPLICATION_BYTES_AVAILABLE_GET, + SD_RAND_APPLICATION_VECTOR_GET, + SD_POWER_MODE_SET, + SD_POWER_SYSTEM_OFF, + SD_POWER_RESET_REASON_GET, + SD_POWER_RESET_REASON_CLR, + SD_POWER_POF_ENABLE, + SD_POWER_POF_THRESHOLD_SET, + SD_POWER_RAMON_SET, + SD_POWER_RAMON_CLR, + SD_POWER_RAMON_GET, + SD_POWER_GPREGRET_SET, + SD_POWER_GPREGRET_CLR, + SD_POWER_GPREGRET_GET, + SD_POWER_DCDC_MODE_SET, + SD_APP_EVT_WAIT, + SD_CLOCK_HFCLK_REQUEST, + SD_CLOCK_HFCLK_RELEASE, + SD_CLOCK_HFCLK_IS_RUNNING, + SD_RADIO_NOTIFICATION_CFG_SET, + SD_ECB_BLOCK_ENCRYPT, + SD_ECB_BLOCKS_ENCRYPT, + SD_RADIO_SESSION_OPEN, + SD_RADIO_SESSION_CLOSE, + SD_RADIO_REQUEST, + SD_EVT_GET, + SD_TEMP_GET, + SVC_SOC_LAST +}; + +/**@brief Possible values of a ::nrf_mutex_t. */ +enum NRF_MUTEX_VALUES +{ + NRF_MUTEX_FREE, + NRF_MUTEX_TAKEN +}; + +/**@brief Power modes. */ +enum NRF_POWER_MODES +{ + NRF_POWER_MODE_CONSTLAT, /**< Constant latency mode. See power management in the reference manual. */ + NRF_POWER_MODE_LOWPWR /**< Low power mode. See power management in the reference manual. */ +}; + + +/**@brief Power failure thresholds */ +enum NRF_POWER_THRESHOLDS +{ + NRF_POWER_THRESHOLD_V21, /**< 2.1 Volts power failure threshold. */ + NRF_POWER_THRESHOLD_V23, /**< 2.3 Volts power failure threshold. */ + NRF_POWER_THRESHOLD_V25, /**< 2.5 Volts power failure threshold. */ + NRF_POWER_THRESHOLD_V27 /**< 2.7 Volts power failure threshold. */ +}; + + +/**@brief DC/DC converter modes. */ +enum NRF_POWER_DCDC_MODES +{ + NRF_POWER_DCDC_DISABLE, /**< The DCDC is disabled. */ + NRF_POWER_DCDC_ENABLE /**< The DCDC is enabled. */ +}; + +/**@brief Radio notification distances. */ +enum NRF_RADIO_NOTIFICATION_DISTANCES +{ + NRF_RADIO_NOTIFICATION_DISTANCE_NONE = 0, /**< The event does not have a notification. */ + NRF_RADIO_NOTIFICATION_DISTANCE_800US, /**< The distance from the active notification to start of radio activity. */ + NRF_RADIO_NOTIFICATION_DISTANCE_1740US, /**< The distance from the active notification to start of radio activity. */ + NRF_RADIO_NOTIFICATION_DISTANCE_2680US, /**< The distance from the active notification to start of radio activity. */ + NRF_RADIO_NOTIFICATION_DISTANCE_3620US, /**< The distance from the active notification to start of radio activity. */ + NRF_RADIO_NOTIFICATION_DISTANCE_4560US, /**< The distance from the active notification to start of radio activity. */ + NRF_RADIO_NOTIFICATION_DISTANCE_5500US /**< The distance from the active notification to start of radio activity. */ +}; + + +/**@brief Radio notification types. */ +enum NRF_RADIO_NOTIFICATION_TYPES +{ + NRF_RADIO_NOTIFICATION_TYPE_NONE = 0, /**< The event does not have a radio notification signal. */ + NRF_RADIO_NOTIFICATION_TYPE_INT_ON_ACTIVE, /**< Using interrupt for notification when the radio will be enabled. */ + NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE, /**< Using interrupt for notification when the radio has been disabled. */ + NRF_RADIO_NOTIFICATION_TYPE_INT_ON_BOTH, /**< Using interrupt for notification both when the radio will be enabled and disabled. */ +}; + +/**@brief The Radio signal callback types. */ +enum NRF_RADIO_CALLBACK_SIGNAL_TYPE +{ + NRF_RADIO_CALLBACK_SIGNAL_TYPE_START, /**< This signal indicates the start of the radio timeslot. */ + NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0, /**< This signal indicates the NRF_TIMER0 interrupt. */ + NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO, /**< This signal indicates the NRF_RADIO interrupt. */ + NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_FAILED, /**< This signal indicates extend action failed. */ + NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_SUCCEEDED /**< This signal indicates extend action succeeded. */ +}; + +/**@brief The actions requested by the signal callback. + * + * This code gives the SOC instructions about what action to take when the signal callback has + * returned. + */ +enum NRF_RADIO_SIGNAL_CALLBACK_ACTION +{ + NRF_RADIO_SIGNAL_CALLBACK_ACTION_NONE, /**< Return without action. */ + NRF_RADIO_SIGNAL_CALLBACK_ACTION_EXTEND, /**< Request an extension of the current timeslot (maximum execution time for this action is when the extension succeeded). */ + NRF_RADIO_SIGNAL_CALLBACK_ACTION_END, /**< End the current radio timeslot. */ + NRF_RADIO_SIGNAL_CALLBACK_ACTION_REQUEST_AND_END /**< Request a new radio timeslot and end the current timeslot. */ +}; + +/**@brief Radio timeslot high frequency clock source configuration. */ +enum NRF_RADIO_HFCLK_CFG +{ + NRF_RADIO_HFCLK_CFG_XTAL_GUARANTEED, /**< The SoftDevice will guarantee that the high frequency clock source is the + external crystal for the whole duration of the timeslot. This should be the + preferred option for events that use the radio or require high timing accuracy. */ + NRF_RADIO_HFCLK_CFG_NO_GUARANTEE /**< This configuration allows for earlier and tighter scheduling of timeslots. + The RC oscillator may be the clock source in part or for the whole duration of the timeslot. + The RC oscillator's accuracy must therefore be taken into consideration. + @note If the application will use the radio peripheral in timeslots with this configuration, + it must make sure that the crystal is running and stable before starting the radio. */ +}; + +/**@brief Radio timeslot priorities. */ +enum NRF_RADIO_PRIORITY +{ + NRF_RADIO_PRIORITY_HIGH, /**< High (equal priority as the normal connection priority of the SoftDevice stack(s)). */ + NRF_RADIO_PRIORITY_NORMAL, /**< Normal (equal priority as the priority of secondary activites of the SoftDevice stack(s)). */ +}; + +/**@brief Radio timeslot request type. */ +enum NRF_RADIO_REQUEST_TYPE +{ + NRF_RADIO_REQ_TYPE_EARLIEST, /**< Request radio timeslot as early as possible. This should always be used for the first request in a session. */ + NRF_RADIO_REQ_TYPE_NORMAL /**< Normal radio timeslot request. */ +}; + +/**@brief SoC Events. */ +enum NRF_SOC_EVTS +{ + NRF_EVT_HFCLKSTARTED, /**< Event indicating that the HFCLK has started. */ + NRF_EVT_POWER_FAILURE_WARNING, /**< Event indicating that a power failure warning has occurred. */ + NRF_EVT_FLASH_OPERATION_SUCCESS, /**< Event indicating that the ongoing flash operation has completed successfully. */ + NRF_EVT_FLASH_OPERATION_ERROR, /**< Event indicating that the ongoing flash operation has timed out with an error. */ + NRF_EVT_RADIO_BLOCKED, /**< Event indicating that a radio timeslot was blocked. */ + NRF_EVT_RADIO_CANCELED, /**< Event indicating that a radio timeslot was canceled by SoftDevice. */ + NRF_EVT_RADIO_SIGNAL_CALLBACK_INVALID_RETURN, /**< Event indicating that a radio timeslot signal callback handler return was invalid. */ + NRF_EVT_RADIO_SESSION_IDLE, /**< Event indicating that a radio timeslot session is idle. */ + NRF_EVT_RADIO_SESSION_CLOSED, /**< Event indicating that a radio timeslot session is closed. */ + NRF_EVT_NUMBER_OF_EVTS +}; + +/**@} */ + + +/**@addtogroup NRF_SOC_STRUCTURES Structures + * @{ */ + +/**@brief Represents a mutex for use with the nrf_mutex functions. + * @note Accessing the value directly is not safe, use the mutex functions! + */ +typedef volatile uint8_t nrf_mutex_t; + +/**@brief Parameters for a request for a timeslot as early as possible. */ +typedef struct +{ + uint8_t hfclk; /**< High frequency clock source, see @ref NRF_RADIO_HFCLK_CFG. */ + uint8_t priority; /**< The radio timeslot priority, see @ref NRF_RADIO_PRIORITY. */ + uint32_t length_us; /**< The radio timeslot length (in the range 100 to 100,000] microseconds). */ + uint32_t timeout_us; /**< Longest acceptable delay until the start of the requested timeslot (up to @ref NRF_RADIO_EARLIEST_TIMEOUT_MAX_US microseconds). */ +} nrf_radio_request_earliest_t; + +/**@brief Parameters for a normal radio timeslot request. */ +typedef struct +{ + uint8_t hfclk; /**< High frequency clock source, see @ref NRF_RADIO_HFCLK_CFG. */ + uint8_t priority; /**< The radio timeslot priority, see @ref NRF_RADIO_PRIORITY. */ + uint32_t distance_us; /**< Distance from the start of the previous radio timeslot (up to @ref NRF_RADIO_DISTANCE_MAX_US microseconds). */ + uint32_t length_us; /**< The radio timeslot length (in the range [100..100,000] microseconds). */ +} nrf_radio_request_normal_t; + +/**@brief Radio timeslot request parameters. */ +typedef struct +{ + uint8_t request_type; /**< Type of request, see @ref NRF_RADIO_REQUEST_TYPE. */ + union + { + nrf_radio_request_earliest_t earliest; /**< Parameters for requesting a radio timeslot as early as possible. */ + nrf_radio_request_normal_t normal; /**< Parameters for requesting a normal radio timeslot. */ + } params; +} nrf_radio_request_t; + +/**@brief Return parameters of the radio timeslot signal callback. */ +typedef struct +{ + uint8_t callback_action; /**< The action requested by the application when returning from the signal callback, see @ref NRF_RADIO_SIGNAL_CALLBACK_ACTION. */ + union + { + struct + { + nrf_radio_request_t * p_next; /**< The request parameters for the next radio timeslot. */ + } request; /**< Additional parameters for return_code @ref NRF_RADIO_SIGNAL_CALLBACK_ACTION_REQUEST_AND_END. */ + struct + { + uint32_t length_us; /**< Requested extension of the radio timeslot duration (microseconds) (for minimum time see @ref NRF_RADIO_MINIMUM_TIMESLOT_LENGTH_EXTENSION_TIME_US). */ + } extend; /**< Additional parameters for return_code @ref NRF_RADIO_SIGNAL_CALLBACK_ACTION_EXTEND. */ + } params; +} nrf_radio_signal_callback_return_param_t; + +/**@brief The radio timeslot signal callback type. + * + * @note In case of invalid return parameters, the radio timeslot will automatically end + * immediately after returning from the signal callback and the + * @ref NRF_EVT_RADIO_SIGNAL_CALLBACK_INVALID_RETURN event will be sent. + * @note The returned struct pointer must remain valid after the signal callback + * function returns. For instance, this means that it must not point to a stack variable. + * + * @param[in] signal_type Type of signal, see @ref NRF_RADIO_CALLBACK_SIGNAL_TYPE. + * + * @return Pointer to structure containing action requested by the application. + */ +typedef nrf_radio_signal_callback_return_param_t * (*nrf_radio_signal_callback_t) (uint8_t signal_type); + +/**@brief AES ECB parameter typedefs */ +typedef uint8_t soc_ecb_key_t[SOC_ECB_KEY_LENGTH]; +typedef uint8_t soc_ecb_cleartext_t[SOC_ECB_CLEARTEXT_LENGTH]; +typedef uint8_t soc_ecb_ciphertext_t[SOC_ECB_CIPHERTEXT_LENGTH]; + +/**@brief AES ECB data structure */ +typedef struct +{ + soc_ecb_key_t key; /**< Encryption key. */ + soc_ecb_cleartext_t cleartext; /**< Cleartext data. */ + soc_ecb_ciphertext_t ciphertext; /**< Ciphertext data. */ +} nrf_ecb_hal_data_t; + +/**@brief AES ECB block. Used to provide multiple blocks in a single call + to @ref sd_ecb_blocks_encrypt.*/ +typedef struct +{ + soc_ecb_key_t* p_key; /**< Pointer to the Encryption key. */ + soc_ecb_cleartext_t* p_cleartext; /**< Pointer to the Cleartext data. */ + soc_ecb_ciphertext_t* p_ciphertext; /**< Pointer to the Ciphertext data. */ +} nrf_ecb_hal_data_block_t; + +/**@} */ + +/**@addtogroup NRF_SOC_FUNCTIONS Functions + * @{ */ + +/**@brief Initialize a mutex. + * + * @param[in] p_mutex Pointer to the mutex to initialize. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_MUTEX_NEW, uint32_t, sd_mutex_new(nrf_mutex_t * p_mutex)); + +/**@brief Attempt to acquire a mutex. + * + * @param[in] p_mutex Pointer to the mutex to acquire. + * + * @retval ::NRF_SUCCESS The mutex was successfully acquired. + * @retval ::NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN The mutex could not be acquired. + */ +SVCALL(SD_MUTEX_ACQUIRE, uint32_t, sd_mutex_acquire(nrf_mutex_t * p_mutex)); + +/**@brief Release a mutex. + * + * @param[in] p_mutex Pointer to the mutex to release. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_MUTEX_RELEASE, uint32_t, sd_mutex_release(nrf_mutex_t * p_mutex)); + +/**@brief Query the capacity of the application random pool. + * + * @param[out] p_pool_capacity The capacity of the pool. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_RAND_APPLICATION_POOL_CAPACITY_GET, uint32_t, sd_rand_application_pool_capacity_get(uint8_t * p_pool_capacity)); + +/**@brief Get number of random bytes available to the application. + * + * @param[out] p_bytes_available The number of bytes currently available in the pool. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_RAND_APPLICATION_BYTES_AVAILABLE_GET, uint32_t, sd_rand_application_bytes_available_get(uint8_t * p_bytes_available)); + +/**@brief Get random bytes from the application pool. + * + * @param[out] p_buff Pointer to unit8_t buffer for storing the bytes. + * @param[in] length Number of bytes to take from pool and place in p_buff. + * + * @retval ::NRF_SUCCESS The requested bytes were written to p_buff. + * @retval ::NRF_ERROR_SOC_RAND_NOT_ENOUGH_VALUES No bytes were written to the buffer, because there were not enough bytes available. +*/ +SVCALL(SD_RAND_APPLICATION_VECTOR_GET, uint32_t, sd_rand_application_vector_get(uint8_t * p_buff, uint8_t length)); + +/**@brief Gets the reset reason register. + * + * @param[out] p_reset_reason Contents of the NRF_POWER->RESETREAS register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_RESET_REASON_GET, uint32_t, sd_power_reset_reason_get(uint32_t * p_reset_reason)); + +/**@brief Clears the bits of the reset reason register. + * + * @param[in] reset_reason_clr_msk Contains the bits to clear from the reset reason register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_RESET_REASON_CLR, uint32_t, sd_power_reset_reason_clr(uint32_t reset_reason_clr_msk)); + +/**@brief Sets the power mode when in CPU sleep. + * + * @param[in] power_mode The power mode to use when in CPU sleep, see @ref NRF_POWER_MODES. @sa sd_app_evt_wait + * + * @retval ::NRF_SUCCESS The power mode was set. + * @retval ::NRF_ERROR_SOC_POWER_MODE_UNKNOWN The power mode was unknown. + */ +SVCALL(SD_POWER_MODE_SET, uint32_t, sd_power_mode_set(uint8_t power_mode)); + +/**@brief Puts the chip in System OFF mode. + * + * @retval ::NRF_ERROR_SOC_POWER_OFF_SHOULD_NOT_RETURN + */ +SVCALL(SD_POWER_SYSTEM_OFF, uint32_t, sd_power_system_off(void)); + +/**@brief Enables or disables the power-fail comparator. + * + * Enabling this will give a softdevice event (NRF_EVT_POWER_FAILURE_WARNING) when the power failure warning occurs. + * The event can be retrieved with sd_evt_get(); + * + * @param[in] pof_enable True if the power-fail comparator should be enabled, false if it should be disabled. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_POF_ENABLE, uint32_t, sd_power_pof_enable(uint8_t pof_enable)); + +/**@brief Sets the power-fail threshold value. + * + * @param[in] threshold The power-fail threshold value to use, see @ref NRF_POWER_THRESHOLDS. + * + * @retval ::NRF_SUCCESS The power failure threshold was set. + * @retval ::NRF_ERROR_SOC_POWER_POF_THRESHOLD_UNKNOWN The power failure threshold is unknown. + */ +SVCALL(SD_POWER_POF_THRESHOLD_SET, uint32_t, sd_power_pof_threshold_set(uint8_t threshold)); + +/**@brief Sets bits in the NRF_POWER->RAMON register. + * + * @param[in] ramon Contains the bits needed to be set in the NRF_POWER->RAMON register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_RAMON_SET, uint32_t, sd_power_ramon_set(uint32_t ramon)); + +/**@brief Clears bits in the NRF_POWER->RAMON register. + * + * @param ramon Contains the bits needed to be cleared in the NRF_POWER->RAMON register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_RAMON_CLR, uint32_t, sd_power_ramon_clr(uint32_t ramon)); + +/**@brief Get contents of NRF_POWER->RAMON register, indicates power status of ram blocks. + * + * @param[out] p_ramon Content of NRF_POWER->RAMON register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_RAMON_GET, uint32_t, sd_power_ramon_get(uint32_t * p_ramon)); + +/**@brief Set bits in the NRF_POWER->GPREGRET register. + * + * @param[in] gpregret_msk Bits to be set in the GPREGRET register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_GPREGRET_SET, uint32_t, sd_power_gpregret_set(uint32_t gpregret_msk)); + +/**@brief Clear bits in the NRF_POWER->GPREGRET register. + * + * @param[in] gpregret_msk Bits to be clear in the GPREGRET register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_GPREGRET_CLR, uint32_t, sd_power_gpregret_clr(uint32_t gpregret_msk)); + +/**@brief Get contents of the NRF_POWER->GPREGRET register. + * + * @param[out] p_gpregret Contents of the GPREGRET register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_GPREGRET_GET, uint32_t, sd_power_gpregret_get(uint32_t *p_gpregret)); + +/**@brief Sets the DCDC mode. + * + * Enable or disable the DCDC peripheral. + * + * @param[in] dcdc_mode The mode of the DCDC, see @ref NRF_POWER_DCDC_MODES. + * + * @retval ::NRF_SUCCESS + * @retval ::NRF_ERROR_INVALID_PARAM The DCDC mode is invalid. + */ +SVCALL(SD_POWER_DCDC_MODE_SET, uint32_t, sd_power_dcdc_mode_set(uint8_t dcdc_mode)); + +/**@brief Request the high frequency crystal oscillator. + * + * Will start the high frequency crystal oscillator, the startup time of the crystal varies + * and the ::sd_clock_hfclk_is_running function can be polled to check if it has started. + * + * @see sd_clock_hfclk_is_running + * @see sd_clock_hfclk_release + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_CLOCK_HFCLK_REQUEST, uint32_t, sd_clock_hfclk_request(void)); + +/**@brief Releases the high frequency crystal oscillator. + * + * Will stop the high frequency crystal oscillator, this happens immediately. + * + * @see sd_clock_hfclk_is_running + * @see sd_clock_hfclk_request + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_CLOCK_HFCLK_RELEASE, uint32_t, sd_clock_hfclk_release(void)); + +/**@brief Checks if the high frequency crystal oscillator is running. + * + * @see sd_clock_hfclk_request + * @see sd_clock_hfclk_release + * + * @param[out] p_is_running 1 if the external crystal oscillator is running, 0 if not. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_CLOCK_HFCLK_IS_RUNNING, uint32_t, sd_clock_hfclk_is_running(uint32_t * p_is_running)); + +/**@brief Waits for an application event. + * + * An application event is either an application interrupt or a pended interrupt when the + * interrupt is disabled. When the interrupt is enabled it will be taken immediately since + * this function will wait in thread mode, then the execution will return in the application's + * main thread. When an interrupt is disabled and gets pended it will return to the application's + * thread main. The application must ensure that the pended flag is cleared using + * ::sd_nvic_ClearPendingIRQ in order to sleep using this function. This is only necessary for + * disabled interrupts, as the interrupt handler will clear the pending flag automatically for + * enabled interrupts. + * + * In order to wake up from disabled interrupts, the SEVONPEND flag has to be set in the Cortex-M0 + * System Control Register (SCR). @sa CMSIS_SCB + * + * @note If an application interrupt has happened since the last time sd_app_evt_wait was + * called this function will return immediately and not go to sleep. This is to avoid race + * conditions that can occur when a flag is updated in the interrupt handler and processed + * in the main loop. + * + * @post An application interrupt has happened or a interrupt pending flag is set. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_APP_EVT_WAIT, uint32_t, sd_app_evt_wait(void)); + +/**@brief Get PPI channel enable register contents. + * + * @param[out] p_channel_enable The contents of the PPI CHEN register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_CHANNEL_ENABLE_GET, uint32_t, sd_ppi_channel_enable_get(uint32_t * p_channel_enable)); + +/**@brief Set PPI channel enable register. + * + * @param[in] channel_enable_set_msk Mask containing the bits to set in the PPI CHEN register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_CHANNEL_ENABLE_SET, uint32_t, sd_ppi_channel_enable_set(uint32_t channel_enable_set_msk)); + +/**@brief Clear PPI channel enable register. + * + * @param[in] channel_enable_clr_msk Mask containing the bits to clear in the PPI CHEN register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_CHANNEL_ENABLE_CLR, uint32_t, sd_ppi_channel_enable_clr(uint32_t channel_enable_clr_msk)); + +/**@brief Assign endpoints to a PPI channel. + * + * @param[in] channel_num Number of the PPI channel to assign. + * @param[in] evt_endpoint Event endpoint of the PPI channel. + * @param[in] task_endpoint Task endpoint of the PPI channel. + * + * @retval ::NRF_ERROR_SOC_PPI_INVALID_CHANNEL The channel number is invalid. + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_CHANNEL_ASSIGN, uint32_t, sd_ppi_channel_assign(uint8_t channel_num, const volatile void * evt_endpoint, const volatile void * task_endpoint)); + +/**@brief Task to enable a channel group. + * + * @param[in] group_num Number of the channel group. + * + * @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_GROUP_TASK_ENABLE, uint32_t, sd_ppi_group_task_enable(uint8_t group_num)); + +/**@brief Task to disable a channel group. + * + * @param[in] group_num Number of the PPI group. + * + * @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid. + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_GROUP_TASK_DISABLE, uint32_t, sd_ppi_group_task_disable(uint8_t group_num)); + +/**@brief Assign PPI channels to a channel group. + * + * @param[in] group_num Number of the channel group. + * @param[in] channel_msk Mask of the channels to assign to the group. + * + * @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid. + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_GROUP_ASSIGN, uint32_t, sd_ppi_group_assign(uint8_t group_num, uint32_t channel_msk)); + +/**@brief Gets the PPI channels of a channel group. + * + * @param[in] group_num Number of the channel group. + * @param[out] p_channel_msk Mask of the channels assigned to the group. + * + * @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid. + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_GROUP_GET, uint32_t, sd_ppi_group_get(uint8_t group_num, uint32_t * p_channel_msk)); + +/**@brief Configures the Radio Notification signal. + * + * @note + * - The notification signal latency depends on the interrupt priority settings of SWI used + * for notification signal. + * - To ensure that the radio notification signal behaves in a consistent way, always + * configure radio notifications when there is no protocol stack or other SoftDevice + * activity in progress. It is recommended that the radio notification signal is + * configured directly after the SoftDevice has been enabled. + * - In the period between the ACTIVE signal and the start of the Radio Event, the SoftDevice + * will interrupt the application to do Radio Event preparation. + * - Using the Radio Notification feature may limit the bandwidth, as the SoftDevice may have + * to shorten the connection events to have time for the Radio Notification signals. + * + * @param[in] type Type of notification signal, see @ref NRF_RADIO_NOTIFICATION_TYPES. + * @ref NRF_RADIO_NOTIFICATION_TYPE_NONE shall be used to turn off radio + * notification. Using @ref NRF_RADIO_NOTIFICATION_DISTANCE_NONE is + * recommended (but not required) to be used with + * @ref NRF_RADIO_NOTIFICATION_TYPE_NONE. + * + * @param[in] distance Distance between the notification signal and start of radio activity, see @ref NRF_RADIO_NOTIFICATION_DISTANCES. + * This parameter is ignored when @ref NRF_RADIO_NOTIFICATION_TYPE_NONE or + * @ref NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE is used. + * + * @retval ::NRF_ERROR_INVALID_PARAM The group number is invalid. + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_RADIO_NOTIFICATION_CFG_SET, uint32_t, sd_radio_notification_cfg_set(uint8_t type, uint8_t distance)); + +/**@brief Encrypts a block according to the specified parameters. + * + * 128-bit AES encryption. + * + * @note: + * - The application may set the SEVONPEND bit in the SCR to 1 to make the SoftDevice sleep while + * the ECB is running. The SEVONPEND bit should only be cleared (set to 0) from application + * main or low interrupt level. + * + * @param[in, out] p_ecb_data Pointer to the ECB parameters' struct (two input + * parameters and one output parameter). + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_ECB_BLOCK_ENCRYPT, uint32_t, sd_ecb_block_encrypt(nrf_ecb_hal_data_t * p_ecb_data)); + +/**@brief Encrypts multiple data blocks provided as an array of data block structures. + * + * @details: Performs 128-bit AES encryption on multiple data blocks + * + * @note: + * - The application may set the SEVONPEND bit in the SCR to 1 to make the SoftDevice sleep while + * the ECB is running. The SEVONPEND bit should only be cleared (set to 0) from application + * main or low interrupt level. + * + * @param[in] block_count Count of blocks in the p_data_blocks array. + * @param[in,out] p_data_blocks Pointer to the first entry in a contiguous array of + * @ref nrf_ecb_hal_data_block_t structures. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_ECB_BLOCKS_ENCRYPT, uint32_t, sd_ecb_blocks_encrypt(uint8_t block_count, nrf_ecb_hal_data_block_t * p_data_blocks)); + +/**@brief Gets any pending events generated by the SoC API. + * + * The application should keep calling this function to get events, until ::NRF_ERROR_NOT_FOUND is returned. + * + * @param[out] p_evt_id Set to one of the values in @ref NRF_SOC_EVTS, if any events are pending. + * + * @retval ::NRF_SUCCESS An event was pending. The event id is written in the p_evt_id parameter. + * @retval ::NRF_ERROR_NOT_FOUND No pending events. + */ +SVCALL(SD_EVT_GET, uint32_t, sd_evt_get(uint32_t * p_evt_id)); + +/**@brief Get the temperature measured on the chip + * + * This function will block until the temperature measurement is done. + * It takes around 50us from call to return. + * + * @param[out] p_temp Result of temperature measurement. Die temperature in 0.25 degrees celsius. + * + * @retval ::NRF_SUCCESS A temperature measurement was done, and the temperature was written to temp + */ +SVCALL(SD_TEMP_GET, uint32_t, sd_temp_get(int32_t * p_temp)); + +/**@brief Flash Write +* +* Commands to write a buffer to flash +* +* If the SoftDevice is enabled: +* This call initiates the flash access command, and its completion will be communicated to the +* application with exactly one of the following events: +* - @ref NRF_EVT_FLASH_OPERATION_SUCCESS - The command was successfully completed. +* - @ref NRF_EVT_FLASH_OPERATION_ERROR - The command could not be started. +* +* If the SoftDevice is not enabled no event will be generated, and this call will return @ref NRF_SUCCESS when the + * write has been completed +* +* @note +* - This call takes control over the radio and the CPU during flash erase and write to make sure that +* they will not interfere with the flash access. This means that all interrupts will be blocked +* for a predictable time (depending on the NVMC specification in nRF51 Series Reference Manual +* and the command parameters). +* +* +* @param[in] p_dst Pointer to start of flash location to be written. +* @param[in] p_src Pointer to buffer with data to be written. +* @param[in] size Number of 32-bit words to write. Maximum size is 256 32-bit words for nRF51 and 1024 for nRF52. +* +* @retval ::NRF_ERROR_INVALID_ADDR Tried to write to a non existing flash address, or p_dst or p_src was unaligned. +* @retval ::NRF_ERROR_BUSY The previous command has not yet completed. +* @retval ::NRF_ERROR_INVALID_LENGTH Size was 0, or higher than the maximum allowed size. +* @retval ::NRF_ERROR_FORBIDDEN Tried to write to or read from protected location. +* @retval ::NRF_SUCCESS The command was accepted. +*/ +SVCALL(SD_FLASH_WRITE, uint32_t, sd_flash_write(uint32_t * const p_dst, uint32_t const * const p_src, uint32_t size)); + + +/**@brief Flash Erase page +* +* Commands to erase a flash page +* If the SoftDevice is enabled: +* This call initiates the flash access command, and its completion will be communicated to the +* application with exactly one of the following events: +* - @ref NRF_EVT_FLASH_OPERATION_SUCCESS - The command was successfully completed. +* - @ref NRF_EVT_FLASH_OPERATION_ERROR - The command could not be started. +* +* If the SoftDevice is not enabled no event will be generated, and this call will return @ref NRF_SUCCESS when the +* erase has been completed +* +* @note +* - This call takes control over the radio and the CPU during flash erase and write to make sure that +* they will not interfere with the flash access. This means that all interrupts will be blocked +* for a predictable time (depending on the NVMC specification in nRF51 Series Reference Manual +* and the command parameters). +* +* +* @param[in] page_number Pagenumber of the page to erase +* @retval ::NRF_ERROR_INTERNAL If a new session could not be opened due to an internal error. +* @retval ::NRF_ERROR_INVALID_ADDR Tried to erase to a non existing flash page. +* @retval ::NRF_ERROR_BUSY The previous command has not yet completed. +* @retval ::NRF_ERROR_FORBIDDEN Tried to erase a protected page. +* @retval ::NRF_SUCCESS The command was accepted. +*/ +SVCALL(SD_FLASH_PAGE_ERASE, uint32_t, sd_flash_page_erase(uint32_t page_number)); + + +/**@brief Flash Protection set + * + * Commands to set the flash protection configuration registers. + On nRF51 this sets the PROTENSETx registers of the MPU peripheral. + On nRF52 this sets the CONFIGx registers of the BPROT peripheral. + * + * @note To read the values read them directly. They are only write-protected. + * + * @param[in] block_cfg0 Value to be written to the configuration register. + * @param[in] block_cfg1 Value to be written to the configuration register. + * @param[in] block_cfg2 Value to be written to the configuration register (ignored on nRF51). + * @param[in] block_cfg3 Value to be written to the configuration register (ignored on nRF51). + * + * @retval ::NRF_ERROR_FORBIDDEN Tried to protect the SoftDevice. + * @retval ::NRF_SUCCESS Values successfully written to configuration registers. + */ +SVCALL(SD_FLASH_PROTECT, uint32_t, sd_flash_protect(uint32_t block_cfg0, uint32_t block_cfg1, uint32_t block_cfg2, uint32_t block_cfg3)); + +/**@brief Opens a session for radio timeslot requests. + * + * @note Only one session can be open at a time. + * @note p_radio_signal_callback(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_START) will be called when the radio timeslot + * starts. From this point the NRF_RADIO and NRF_TIMER0 peripherals can be freely accessed + * by the application. + * @note p_radio_signal_callback(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0) is called whenever the NRF_TIMER0 + * interrupt occurs. + * @note p_radio_signal_callback(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO) is called whenever the NRF_RADIO + * interrupt occurs. + * @note p_radio_signal_callback() will be called at ARM interrupt priority level 0. This + * implies that none of the sd_* API calls can be used from p_radio_signal_callback(). + * + * @param[in] p_radio_signal_callback The signal callback. + * + * @retval ::NRF_ERROR_INVALID_ADDR p_radio_signal_callback is an invalid function pointer. + * @retval ::NRF_ERROR_BUSY If session cannot be opened. + * @retval ::NRF_ERROR_INTERNAL If a new session could not be opened due to an internal error. + * @retval ::NRF_SUCCESS Otherwise. + */ + SVCALL(SD_RADIO_SESSION_OPEN, uint32_t, sd_radio_session_open(nrf_radio_signal_callback_t p_radio_signal_callback)); + +/**@brief Closes a session for radio timeslot requests. + * + * @note Any current radio timeslot will be finished before the session is closed. + * @note If a radio timeslot is scheduled when the session is closed, it will be canceled. + * @note The application cannot consider the session closed until the @ref NRF_EVT_RADIO_SESSION_CLOSED + * event is received. + * + * @retval ::NRF_ERROR_FORBIDDEN If session not opened. + * @retval ::NRF_ERROR_BUSY If session is currently being closed. + * @retval ::NRF_SUCCESS Otherwise. + */ + SVCALL(SD_RADIO_SESSION_CLOSE, uint32_t, sd_radio_session_close(void)); + +/**@brief Requests a radio timeslot. + * + * @note The request type is determined by p_request->request_type, and can be one of @ref NRF_RADIO_REQ_TYPE_EARLIEST + * and @ref NRF_RADIO_REQ_TYPE_NORMAL. The first request in a session must always be of type @ref NRF_RADIO_REQ_TYPE_EARLIEST. + * @note For a normal request (@ref NRF_RADIO_REQ_TYPE_NORMAL), the start time of a radio timeslot is specified by + * p_request->distance_us and is given relative to the start of the previous timeslot. + * @note A too small p_request->distance_us will lead to a @ref NRF_EVT_RADIO_BLOCKED event. + * @note Timeslots scheduled too close will lead to a @ref NRF_EVT_RADIO_BLOCKED event. + * @note See the SoftDevice Specification for more on radio timeslot scheduling, distances and lengths. + * @note If an opportunity for the first radio timeslot is not found before 100ms after the call to this + * function, it is not scheduled, and instead a @ref NRF_EVT_RADIO_BLOCKED event is sent. + * The application may then try to schedule the first radio timeslot again. + * @note Successful requests will result in nrf_radio_signal_callback_t(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_START). + * Unsuccessful requests will result in a @ref NRF_EVT_RADIO_BLOCKED event, see @ref NRF_SOC_EVTS. + * @note The jitter in the start time of the radio timeslots is +/- @ref NRF_RADIO_START_JITTER_US us. + * @note The nrf_radio_signal_callback_t(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_START) call has a latency relative to the + * specified radio timeslot start, but this does not affect the actual start time of the timeslot. + * @note NRF_TIMER0 is reset at the start of the radio timeslot, and is clocked at 1MHz from the high frequency + * (16 MHz) clock source. If p_request->hfclk_force_xtal is true, the high frequency clock is + * guaranteed to be clocked from the external crystal. + * @note The SoftDevice will neither access the NRF_RADIO peripheral nor the NRF_TIMER0 peripheral + * during the radio timeslot. + * + * @param[in] p_request Pointer to the request parameters. + * + * @retval ::NRF_ERROR_FORBIDDEN If session not opened or the session is not IDLE. + * @retval ::NRF_ERROR_INVALID_ADDR If the p_request pointer is invalid. + * @retval ::NRF_ERROR_INVALID_PARAM If the parameters of p_request are not valid. + * @retval ::NRF_SUCCESS Otherwise. + */ + SVCALL(SD_RADIO_REQUEST, uint32_t, sd_radio_request(nrf_radio_request_t * p_request )); + +/**@} */ + +#ifdef __cplusplus +} +#endif +#endif // NRF_SOC_H__ + +/**@} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_svc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_svc.h new file mode 100644 index 0000000000..20f7c8d889 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_svc.h @@ -0,0 +1,88 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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_SVC__ +#define NRF_SVC__ + +#include "stdint.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef SVCALL_AS_NORMAL_FUNCTION +#define SVCALL(number, return_type, signature) return_type signature +#else + +#ifndef SVCALL +#if defined (__CC_ARM) +#define SVCALL(number, return_type, signature) return_type __svc(number) signature +#elif defined (__GNUC__) +#ifdef __cplusplus +#define GCC_CAST_CPP (uint8_t) +#else +#define GCC_CAST_CPP +#endif +#define SVCALL(number, return_type, signature) \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wreturn-type\"") \ + __attribute__((naked)) \ + __attribute__((unused)) \ + static return_type signature \ + { \ + __asm( \ + "svc %0\n" \ + "bx r14" : : "I" (GCC_CAST_CPP number) : "r0" \ + ); \ + } \ + _Pragma("GCC diagnostic pop") + +#elif defined (__ICCARM__) +#define PRAGMA(x) _Pragma(#x) +#define SVCALL(number, return_type, signature) \ +PRAGMA(swi_number = (number)) \ + __swi return_type signature; +#else +#define SVCALL(number, return_type, signature) return_type signature +#endif +#endif // SVCALL + +#endif // SVCALL_AS_NORMAL_FUNCTION + +#ifdef __cplusplus +} +#endif +#endif // NRF_SVC__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/hex/s130_nrf51_2.0.0_softdevice.hex b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/hex/s130_nrf51_2.0.0_softdevice.hex new file mode 100644 index 0000000000..4cfda4eec1 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/hex/s130_nrf51_2.0.0_softdevice.hex @@ -0,0 +1,6783 @@ +:020000040000FA +:10000000C0070000D1060000D1000000B1060000CA +:1000100000000000000000000000000000000000E0 +:100020000000000000000000000000005107000078 +:100030000000000000000000DB000000E500000000 +:10004000EF000000F9000000030100000D010000B6 +:1000500017010000210100002B0100003501000004 +:100060003F01000049010000530100005D01000054 +:1000700067010000710100007B01000085010000A4 +:100080008F01000099010000A3010000AD010000F4 +:10009000B7010000C1010000CB010000D501000044 +:1000A000DF010000E9010000F3010000FD01000094 +:1000B00007020000110200001B02000025020000E0 +:1000C0001FB5C046C04600F0EFFA04B00FB41FBD24 +:1000D00008205A49096809580847382057490968CB +:1000E000095808473C2055490968095808474020E5 +:1000F0005249096809580847442050490968095875 +:10010000084748204D490968095808474C204B4981 +:10011000096809580847502048490968095808479C +:100120005420464909680958084758204349096836 +:10013000095808475C204149096809580847602068 +:100140003E4909680958084764203C49096809582C +:100150000847682039490968095808476C20374919 +:100160000968095808477020344909680958084740 +:100170007420324909680958084778202F490968CE +:10018000095808477C202D490968095808478020EC +:100190002A490968095808478420284909680958E4 +:1001A0000847882025490968095808478C202349B1 +:1001B00009680958084790202049096809580847E4 +:1001C00094201E4909680958084798201B49096866 +:1001D000095808479C201949096809580847A02070 +:1001E0001649096809580847A4201449096809589C +:1001F0000847A8201149096809580847AC200F4949 +:10020000096809580847B0200C4909680958084787 +:10021000B4200A49096809580847B82007490968FD +:1002200009580847BC2005490968095808470000D3 +:1002300003480449024A034B7047000000000020B5 +:10024000C0070000C00700000122D84B5A6000BF61 +:10025000D74A1268002AFBD0016000BFD44A126856 +:10026000002AFBD00022D14B5A6000BFD04A12684E +:10027000002AFBD07047F0B505460E46174600240D +:1002800006E0A200B158A2005019FFF7DDFF641C80 +:10029000BC42F6D30020F0BD0120C043C549086030 +:1002A000401048607047014601229204086890425D +:1002B00001D9102070470020FCE7F0B505460C4638 +:1002C0001646002706E028462168FFF7BDFF2D1DD2 +:1002D000241D7F1CB742F6D3F0BD70B505460C4611 +:1002E0002E460BE0304600F075F9FF2C01D80024B3 +:1002F00001E0FF3C013C012080023618002CF1D1C6 +:1003000070BD0146012212044868904201D90920BB +:100310007047A9484069401C01D10F20F8E7002030 +:10032000F6E7FEB504462068030000F037FA05043E +:100330002B4249598B00201DFFF7E3FF0546002D96 +:1003400001D02846FEBDFFF7A7FF0120C00200F044 +:1003500041F9042221469948FFF78DFF002801D07A +:100360000320EFE708222146944800F06DF90028A9 +:1003700006D1002192480068FFF766FF00F00CF9F3 +:100380000320DFE7A768E6686068019031463846D9 +:10039000FFF7A3FF324638460199FFF78EFFB20000 +:1003A0003846019900F050F9002800D1CAE703202F +:1003B000C8E700F0E3F9834800688349086041E03A +:1003C00060680190E668A0680090B200009901980A +:1003D00000F03AF90746002F00D1B3E70E20B1E74D +:1003E000201DFFF760FF0546002D01D02846A9E734 +:1003F0006068002807D1FFF74FFF0320800200F05C +:10040000E9F800F0C9F8FFF747FF0120C00200F04B +:10041000E1F8042221466948FFF72DFF002801D0AA +:1004200003208FE708222146644800F00DF90028D8 +:1004300006D1002162480068FFF706FF00F0ACF823 +:1004400003207FE700BF00207CE770B505460C461F +:10045000182D04D12068FFF764FF206002E001201E +:10046000206000BF00BF70BDF0B589B05248406940 +:1004700003905248806881000398081802900398FE +:10048000000B01900121090302984018401E000B47 +:1004900000900124002520462946019A00F0C4F866 +:1004A0000022401E91410791069001260027304608 +:1004B0003946009A00F0B8F80022401E914105919B +:1004C0000490049BDB43059AD2430698184307998E +:1004D00011430791069037490698086007984860CD +:1004E00009B0F0BD70B53448446934488568466841 +:1004F000AA003146204600F0A7F8002801D00020CD +:1005000070BD0120FCE72D484068002801D0012083 +:1005100000E000200546FFF7E5FF002807D0FFF7C1 +:10052000BBFE0320800200F055F800F035F8FFF71D +:100530009BFF002D0ED020484669204884684768FC +:1005400021463046FFF7C9FE224639463046FFF7BE +:10055000B4FE00BF00F020F810B5184844681A48EF +:100560000460204600F0DCF810BD15480068006803 +:10057000401C01D100BFFEE710480068002802D0EF +:10058000042806D101E0FFF7BEFFFFF7E5FF00BF3B +:10059000FEE700BF00BFFEE7BFF34F8F0B480C49DB +:1005A000C860BFF34F8F00BFFEE7000000E50140C9 +:1005B00000E40140000600400010001000080000A8 +:1005C000B8070000BC070000000000200400FA0586 +:1005D00000ED00E010B50146104B1A6808460223F2 +:1005E0000F4C636000BF0F4B1B68002BFBD0531CEC +:1005F00004D0904202D20A4B186101E0084B986087 +:1006000000BF084B1B68002BFBD00023044C636029 +:1006100000BF044B1B68002BFBD010BD0010001066 +:1006200000E5014000E4014010B5202A04DB01464A +:10063000203A9140002010BD914020239C1A03468F +:10064000E3401943904010BD034610B50B439B0790 +:100650000FD1042A0DD308C810C9121FA342F8D025 +:1006600018BA21BA884201D9012010BD0020C04328 +:1006700010BD002A03D0D30703D0521C07E000208E +:1006800010BD03780C78401C491C1B1B07D1037854 +:100690000C78401C491C1B1B01D1921EF1D118463D +:1006A00010BD70477047704710B500F007F810BDD7 +:1006B000014B1B68DB6818470000002019481A49E5 +:1006C0007047FFF7FBFFFFF7FBFC00BD20BFFDE716 +:1006D0001649174C24688C420BD1164B1B68994263 +:1006E0000CD1154B154A1360186810498842EDD09B +:1006F0000AE0134880F30888124B18470F4A13602A +:1007000018680A498842E1D080F308880E49884277 +:1007100004DD0E48026802210A4302605B68184744 +:100720000346DFE7C0070000C0070000FFFFFFFF30 +:10073000000C000014100010001000000000002049 +:10074000000400206B05000000200020240500406C +:100750000D48704502D1EFF3098101E0EFF3088104 +:10076000886902380078182802D1C046074A104725 +:10077000074A12682C3212681047000000B5054B7A +:10078000054A9B58984700BDFDFFFFFF4B04000042 +:1007900000000020001000000400000030B4744687 +:1007A000641E2578641CAB4204D3635D5B00E318D0 +:1007B00030BC18471D46F8E7000C00000010000090 +:101000007811002045A90100752F000095A8010066 +:1010100000000000000000000000000000000000D0 +:10102000000000000000000000000000B1A9010065 +:101030000000000000000000752F0000752F000068 +:1010400019AA01001FAA0100752F0000752F0000CA +:10105000752F0000752F0000752F0000752F000000 +:1010600025AA0100752F0000752F00002BAA010092 +:10107000752F000031AA010037AA01003DAA010026 +:10108000752F0000752F0000752F0000752F0000D0 +:10109000752F0000752F0000752F0000752F0000C0 +:1010A00043AA010049AA0100752F0000752F000016 +:1010B000752F0000752F0000752F0000752F0000A0 +:1010C00000F002F819F01FFC0CA030C808382418F2 +:1010D0002D18A246671EAB4654465D46AC4201D170 +:1010E00019F011FC7E460F3E0FCCB6460126334266 +:1010F00000D0FB1AA246AB4633431847B49E01000A +:10110000D49E01000023002400250026103A01D3BC +:1011100078C1FBD8520700D330C100D50B607047AF +:101120001FB5C046C04619F08BFB04B00FB41FBDFD +:1011300082690249816102481044704745110000EC +:101140000100000001B41EB400B510F096F901B41E +:101150000198864601BC01B01EBD0000F0B44046B7 +:10116000494652465B460FB402A0013001B506481D +:10117000004700BF01BC86460FBC804689469246A8 +:101180009B46F0BC70470000C110000070B50546DA +:101190000C46164602E00FCC0FC5103E102EFAD2B8 +:1011A000082E02D303CC03C5083E042E07D301CC7E +:1011B00001C5361F03E021782970641C6D1C761E62 +:1011C000F9D270BD70B505461A4C08202070A01CDD +:1011D00000F083F85920A0802946204606F07FFCC5 +:1011E00070BD10B506F088FC12490020891E0870F9 +:1011F00010BD70B50C460F49891E0978002905D02D +:1012000001466039532905D301200EE0602801D042 +:1012100009480AE0094E211D80008019FF380EC9D7 +:101220008138256806682846B047206070BD0120D7 +:10123000704700000A00002001300000FCAA0100F5 +:101240008307FF22DB0E9A408907090E9940002888 +:101250000BDA0007000F0838830827489B0018188E +:10126000C36993430B43C3617047830823489B00C2 +:101270001B181868904308431860704710B504465F +:1012800000210120FFF7DCFF00211820FFF7D8FF25 +:1012900000210B20FFF7D4FF02211920FFF7D0FF18 +:1012A00002210D20FFF7CCFF02210E20FFF7C8FF1F +:1012B00002210F20FFF7C4FF0221C81FFFF7C0FF64 +:1012C00003211620FFF7BCFF03211520FFF7B8FF0D +:1012D0002046FFF777FF002010BD80210180704776 +:1012E00010B5FFF77EFF10BD0548704710B5FFF73A +:1012F00080FF10BD7047704700ED00E000E400E0A3 +:1013000003F9004330B5FD4D044610280AD0112CD6 +:1013100006D028468178122C06D0132C08D0FFDF87 +:10132000AC7030BDFFDFFBE71129F9D0FFDFF7E735 +:101330001129F5D0FFDFF3E770B50EF010FA04467F +:101340000FF05BFE201AC4B206200CF0EFFB05463E +:1013500006200CF0F3FB2E1A07200CF0E7FB0546E5 +:1013600007200CF0EBFB281AE44932188878122881 +:101370000DD00023D21813280BD0002012180878A3 +:10138000022808D000201018201AC0B270BD012316 +:10139000F0E70120F2E70120F5E710B5D74994B056 +:1013A000C878002815D017206A46107000A80622B9 +:1013B0000230091D19F0D3F809A968460AF064F94A +:1013C0000446112802D0002C00D0FFDF204614B0C4 +:1013D00010BD3220E8E710B502210CF0F9FB10BD7A +:1013E000FFB595B01D460E460746FFF7F4FF040013 +:1013F0000AD02078222804D3A07F8006C00FA842FC +:1014000004D1082019B0F0BDBD48FBE7372168467C +:1014100001704780002D05D0012101714671179997 +:10142000817102E000206946087109A968460AF046 +:101430002BF9A07FDF21084069010843A077002035 +:10144000E0E730B50446084620380D46030019F0A1 +:1014500047FB0A06080D1D2429363B40454AFFDF9D +:1014600042E0207820283FD1FFDF3DE0A34801780B +:10147000032939D08078132836D02078242833D017 +:10148000252831D023282FD0FFDF2DE020782228F7 +:101490002AD0232828D8FFDF26E02078222823D04E +:1014A000FFDF21E0207822281ED024281CD0262807 +:1014B0001AD0272818D0292816D0FFDF14E020786A +:1014C000252811D0FFDF0FE0207825280CD0FFDF82 +:1014D0000AE02078252807D0FFDF05E020782828BB +:1014E00002D0FFDF00E0FFDF257030BD30B5854C56 +:1014F0000B88854A022801D0934204D09D1FA54243 +:1015000025D2022802D04D88954203D04D88AD1FC8 +:10151000A5421CD24C88A34219D88B88FF25F435EC +:10152000AB4214D8022802D0C888904205D0C8889F +:10153000744D0A382D1FA84209D2C888904208D09D +:10154000944206D05B1C63438000834201DB07208A +:1015500030BD002030BD70B5044610F0BDF9002844 +:1015600033D12079002806D0082802D8217B082909 +:1015700005D9072070BD217B0029FAD0F6E70028A5 +:1015800004D0206810F0A8F900281ED1207B002884 +:1015900004D0A06810F0A0F9002816D1002508E0BA +:1015A0002068A900405810F097F900280DD16D1C53 +:1015B000EDB22079A842F3D800250AE0A068A9007E +:1015C000405810F089F9002801D0102070BD6D1C22 +:1015D000EDB2207BA842F1D8002070BD10B5028981 +:1015E0004A4B111F994213D24189042910D3DB1CA5 +:1015F00099420DD891420BD80178890706D54068E9 +:10160000002803D0FFF7A7FF002800D1002010BD5D +:10161000072010BDFFB50022099B002802D0994287 +:1016200005D858E0002902D1002004B0F0BD0920FF +:10163000FBE7845C002C12D087187D78112D43D0F5 +:1016400010DC2B0019F04CFA0A401726262C2C2E01 +:101650002E363640835C002B30D1521CD2B28A42E7 +:10166000F8D3E1E71D2D2FDA123D2B0019F038FADF +:10167000042C2C121A2C022CD9D1BB78039C072BDA +:10168000237001D25B0701D40A20CEE7029B01241C +:101690001B7816E0E343DB0708E0012C08D013E0D9 +:1016A0000620C2E70F2523072D075B19002BF4D076 +:1016B0003046BAE7029B1B789C0701D50B20B4E7A4 +:1016C00002242343029C2370835C521C9A18D2B2DA +:1016D0008A4202D9ABE7192676028A42A9D3A3E748 +:1016E00010B504780B46002C14D00121084A012CB7 +:1016F00013D0022C17D0032C1FD11AE0A801002010 +:10170000023000007B0C0000FFFF0000FD3F0000E6 +:10171000023200000021197011E0197081798909E5 +:1017200003290AD10BE0197081798909012904D1B3 +:1017300005E019708179890901D0104610BD411C5E +:101740000622581C18F00BFF002010BD08B51346E8 +:10175000002806D0F6A00068009048796A46800903 +:10176000105C18700622581C18F0F9FE08BD30B540 +:101770000C46097895B0222902D2082015B030BD58 +:10178000282369460B704880132A03D03B2A01D0D6 +:101790000720F3E708460A7109A909F075FF05005B +:1017A00003D121212046FFF74CFE2846E6E700B58D +:1017B00095B0232369460B70488010888880508834 +:1017C000C880D08848819088088100208881C8819D +:1017D00009A9684609F058FF15B000BD70B50E465E +:1017E000050003D00021092010F037F80120D14C6A +:1017F000022EE0701BD0032E00D0FFDF0621201D3B +:101800000FF07CFD607A8006800E6072FFF7C5FDE8 +:10181000608A00280AD0002D08D083000122002110 +:1018200009200FF08BFF092800D0FFDF70BD0321D6 +:10183000E01D0FF063FD607A40218006800E0843B2 +:101840006072E01C02F0E7FCE0E7F0B585B0022131 +:101850006846B84E0171F18AC18000275AE001A89C +:101860000CF01EF9050007D0F08A002858D000209F +:10187000F0826946C8804BE0039C2078212847D03D +:10188000A07F01072FD520462330009068462346CD +:10189000A28E00892146363301F051FD050003D0A8 +:1018A00011282ED0FFDF2CE0A07FF7210840A07781 +:1018B000E17F480849074000C90F0843FD21014066 +:1018C0000007C00F400001432046E17720304178F7 +:1018D000C906C90E01702078282823D12921204665 +:1018E000FFF7AFFD1EE0400712D56846224600898B +:1018F00021460E32FFF75BFF050004D0112800D00F +:10190000FFDF00250EE0A07FFB210840A07709E063 +:101910007F1CFFB202200CF009F9401CB8429ED88F +:10192000052D07D06846C088F082052D04D02846D2 +:1019300005B0F0BD0020F0820020F9E7FEB50400FC +:1019400000D1FFDF72202070606808250178794E91 +:10195000091F0B0019F0C4F811F10A0B4EF00B0C23 +:10196000F0F0350B0B0B0BF172F10B00FFDFFEBD3E +:1019700080880090FFF72FFD070000D1FFDF60781F +:10198000042128436070307D08433075212138469A +:10199000FFF757FD009806F0B5FE009803F016FD1E +:1019A000009804F03BFD022000990FF056FFB87F2D +:1019B000EF210840B877FFF748FF0028D7D0FFDFB6 +:1019C000FEBD86883046FFF706FD002800D1FFDF08 +:1019D00060688078012800D0FFDF60688179304638 +:1019E00007F017F80028EBD061782943617061682F +:1019F000C880FEBD87883846FFF7EDFC060000D1A1 +:101A0000FFDF60783946284360706068C0883081A5 +:101A100060680089708160684089B08102200FF0A1 +:101A20001CFF0020B075B07F8007800F0228E0D136 +:101A3000FFF70BFF0028DCD0FFDFFEBD80783C28DD +:101A400003D0002702280ED000E0012700210091DA +:101A5000002804D03C2802D0022800D0FFDF0098E4 +:101A6000002802D078E00121F1E760782843607017 +:101A7000307D28433075002F62D16068022187884D +:101A8000009738460CF09CF80546032138460CF0C8 +:101A900097F80290052138460CF092F80190042145 +:101AA00038460CF08DF80746002D00D1FFDF029874 +:101AB000002800D1FFDF0198002800D1FFDF002FB0 +:101AC00000D1FFDF22212846FFF7BBFC6068807948 +:101AD000012833D00227A87F0622800880003843DF +:101AE000A8776068C08A28816068008B6881606818 +:101AF000408BA8816068C079E87561682846183015 +:101B0000083118F02CFD60680622807B68706168DF +:101B1000A81C0F3118F023FDA87F8107890F0098BA +:101B200006F0DFFD012F0BD0022F15D0FFDFFEBD29 +:101B30000302FF01A80100201AE01DE00127CAE707 +:101B40003078032800D0FFDF002108460FF085FE23 +:101B5000012000F065FFEAE7B078132800D0FFDF2E +:101B6000002107200FF079FE1120FFF7CBFBDEE705 +:101B7000204601F0DFFEDAE7607828436070D6E7A0 +:101B8000F7B505460078002700090C463E460128B7 +:101B90007ED0F84902287CD007280AD00A2879D0BC +:101BA000FFDF0298002C068001D02780668000208D +:101BB000BDE768682246037808320D2B3DD006DC6D +:101BC000042B68D0072B41D00A2B63D106E0122BDF +:101BD00043D0132B4BD0142BF7D1C8E01127092683 +:101BE000002C7DD08088A0806968FB2389792172D0 +:101BF000E14905460A7D1A400A7504210BF0F9FFF8 +:101C0000052128460BF0F5FF002128460BF0F1FFD7 +:101C1000012128460BF0EDFF032128460BF0E9FFD8 +:101C2000022128460BF0E5FF062128460BF0E1FFD4 +:101C3000072128460BF0DDFFB3E701270926002C1A +:101C4000CFD08088A080686880790EE012271026A7 +:101C50008088214600F007FFA3E71C270926002CF7 +:101C6000BFD04088A08068680079207299E78178A9 +:101C70003C2941D010272026002CB2D08088A0809B +:101C80006868C08A60836868C08A2083686803E0E7 +:101C90007EE0A7E0CBE03AE0008BA0836868408B51 +:101CA000E0836968E07D497F4008C9074000C90FAB +:101CB0000843E0756968C007497FC00F49084900BB +:101CC0000843E0756968C8790831FFF73FFD696826 +:101CD000224608460F308B7B01460F32184600E043 +:101CE0007FE0FFF733FD68688079002802D001208B +:101CF000A07507E00220FBE71B270926002C70D007 +:101D0000002020729C48F722017D11407DE01D27B4 +:101D10003026002C65D0A18069680879491DFFF73D +:101D200015FD68682030C07AE0736868C0780428C0 +:101D3000207C19D0400840002074F92108406968CF +:101D40001F22C9788907490F084320746968400732 +:101D5000C97A400FC90008432074696820461130D1 +:101D60000C3118F0FCFB1CE701210843E4E72027B5 +:101D70001026002C63D0A18068682246407A207229 +:101D800069680932CB1C88781946FFF7DFFC08E741 +:101D9000287E012803D0022813D0FFDF01E71F2788 +:101DA0001026002C4BD06888A080688B2081A88BDF +:101DB0006081E88BA081288CE0816F48DF22017D63 +:101DC000A3E712271026688800F04DFE002C36D0BD +:101DD00068784007400F0328C5D16748FD22017D80 +:101DE00093E72CE0287E030018F07AFE0604111118 +:101DF000212121271B270926002C20D0A18000208B +:101E000020725D48017D490849000175C9E61B271C +:101E10000926002C13D0A180287E012805D003209C +:101E200020725548EF22017D6FE70220F8E7214636 +:101E30002846029A01F003FF79E6FFDFB1E6029837 +:101E40000680B4E610B54C4894B08078132802D0D0 +:101E5000082014B010BD22206946087009A9684600 +:101E600009F012FC0446002107200FF0F6FC204682 +:101E7000EFE700B5404895B08078122801D00820DF +:101E8000AAE41E216846017000218170C17009A971 +:101E900009F0FAFB0028F3D1002107200FF0DDFC48 +:101EA0001120FFF72FFA002096E400B5324895B0D4 +:101EB0000078022803D0032801D008208CE41B21DD +:101EC000684601700021817009A909F0DDFB002836 +:101ED000F4D1002108460FF0C0FC012000F0A0FD65 +:101EE000002079E4F8B5244C030018F0F9FD0A0647 +:101EF0006B176B6B6B6B38315D6BFFF7D6FF002890 +:101F000026D105F02EFD002822D0222101700021CB +:101F1000017605F004FD207D012141E08EB23046BE +:101F2000FFF759FA050000D1FFDF287821280FD0EC +:101F300005F017FD00280CD012210170022707764A +:101F400046800020A87505F0EAFC207D3843207506 +:101F5000F8BD132229463046FFF709FCF8BDA578E5 +:101F6000122D03D0132D09D0FFDFF8BDFFF781FF3D +:101F700006E00000FFFF0000A8010020FFF762FF5D +:101F80000028F2D105F0EDFC0028EED022210170EE +:101F9000122D07D00221017605F0C1FC207D102111 +:101FA0000843D4E70121F6E7607A8109012907D0C7 +:101FB000800900D0FFDF03210020FFF70FFCF8BDF0 +:101FC0000221F9E7FFDFF8BDF7B582B014460D0036 +:101FD00000D1FFDF2046297818300827009001291A +:101FE00003D0022919D0FFDFA2E40298FFF7F3F92A +:101FF000060000D1FFDF0220B0751030207060783D +:102000000A22384360702946009818F0A8FAF84868 +:102010002022017D114301758AE40298FFF7DBF964 +:10202000060000D1FFDF6988F248814208D1AA8802 +:10203000824205D1132231460298FFF798FB77E4DC +:10204000814202D1A88800280BD01220207060782D +:102050000A22384360702946009818F080FA002060 +:1020600006E078230022022002990FF067FB01208E +:10207000B0755DE430B5054695B00C4608460FF0E6 +:102080002BFC00282FD1203D01212B0018F028FD2A +:1020900006042640444A545B002108200FF0B7FB99 +:1020A000002802D0112015B030BD242069460870E8 +:1020B00000A80522A11C023018F051FA09A96846AF +:1020C00009F0E2FA05002BD1082300221146184638 +:1020D0000FF034FB082823D0FFDF21E060680FF009 +:1020E0002EFC002801D01020DDE73C21684601705D +:1020F000218841806188818009A909F0C5FA05001D +:102100000ED1606800280BD06946098D018007E078 +:10211000206802F0BCF802E0204600F0B7FC05465B +:102120002846C0E73D2208E0997000E0987009A9B0 +:10213000184609F0A9FAF2E734226B461A702278A1 +:10214000D207F3D0F0E70720ADE730B5054695B0EC +:102150000C4608460FF0DDFB002801D01020A2E756 +:10216000203D2B0018F0BCFC050421212321350063 +:102170002088FFF730F9002804D00078222803D205 +:10218000082090E79C488EE7252168460170218849 +:10219000418009A909F078FA050018D10AA9052299 +:1021A0000231A01C18F0DBF911E006250FE02068D1 +:1021B000002808D00FF0C3FB002801D0102506E04E +:1021C000206802F059F88A480025408AA0802846F5 +:1021D00069E7072067E786480A30704710B518217D +:1021E000834818F019FA012000F01AFC1120FFF7BB +:1021F00089F87F4C00206074E12080006082211DFE +:10220000E01C05F07DFCE11C0722C81D18F0A7F9B1 +:10221000FFF7C3F8002800D0FFDF00F09FFC01F0BB +:102220003FFB10BD10B50C463E21204618F0F4F9D6 +:10223000A07F80088000A077202020700020A0755B +:102240002034A07010BD7047FEB505460E46084606 +:102250000FF042FB002801D0102068E4644C002DF0 +:1022600002D0012D31D125E00722E11C684618F08B +:1022700076F9E11C3046FFF733FA0028EDD1FFF77D +:102280008CF8070006D007226946E01C18F067F9B1 +:1022900038464CE43078002801D0012805D1544854 +:1022A0000722E11C0A3018F05AF9002109200FF02A +:1022B000D4FA0FE03178002907D0012905D002298E +:1022C00005D0032903D04D4831E407202FE4012035 +:1022D000FFF784FA6574002029E410B504460FF076 +:1022E00018FB002801D0102010BD41492246C878B3 +:1022F000091DFFF72BFA002010BDFFB599B0054668 +:10230000002008A908746946087108A908730875AF +:102310001E46144628460FF01DFB002804D1204617 +:102320000FF018FB002802D010201DB0F0BD284689 +:10233000204318D01F270BAB0CAA009728461A99E8 +:10234000FFF768F90028F0D10DAB01AA314620460D +:102350000097FFF75FF90028E7D168460079C007CA +:1023600003D00A20E1E70720DFE702AF002D0FD0FE +:102370001A20694608721A9888722946F81C1A9A17 +:1023800018F0EDF80EA902A809F07EF90028CCD1CA +:10239000002C0ED0202168460172867232462146FA +:1023A000F81C18F0DCF80EA902A809F06DF9002855 +:1023B000BBD108A80E49007B48700020B5E770B576 +:1023C00006460A200C46087015461146204609F0BC +:1023D0005BF9002807D1382121702046294609F0F1 +:1023E00053F900280CD0082801D10448401C70BDC6 +:1023F000A8010020FFFF00000230000002320000B0 +:102400002A462146304600F067FB0446082800D1E2 +:10241000FFDF2046EBE7F0B50446F9A103C997B00A +:1024200014900027159120460FF056FA002807D186 +:102430002078012807D160680FF04EFA002802D0FA +:10244000102017B0F0BDF04D2878012801D00820E9 +:10245000F7E707200BF072FB002804D12078002852 +:102460000AD0012808D0FEF767FF002806D0287D93 +:102470000107890F08D103E01220E2E71320E0E70B +:10248000C10701D1800701D51120DAE7208ADF4A90 +:10249000014620399142217807D301297ED10028B5 +:1024A0007CD1618A002979D110E0022901D0032969 +:1024B00001D1A02872D3012908D0D3494978C9078E +:1024C00004D0618A002969D0B42967D8217800290D +:1024D00006D0012908D0022904D003295ED117E0D3 +:1024E000002518E0022516E0002802D1608A0028A5 +:1024F0000CD004256068007800280CD0012809D091 +:10250000022807D0032805D0C1489AE70125F1E742 +:10251000032500E00127207A002806D0012806D0F4 +:10252000022806D0032860D105E0002604E0012639 +:1025300002E0022600E00326002D01D0022D15D175 +:10254000002E13D0E068002803D0FFF704F800281D +:1025500093D1AD484078800702D0AD48401E70E767 +:10256000022D03D1022E40D0032E3ED01821684602 +:102570000170218A4180218A81808571A248C078BA +:10258000002801D0012865D16946C87168460772E4 +:1025900021780930012922D0062100E025E018F039 +:1025A0003BF869460E74207D8207C107D20F4007B1 +:1025B000C90F5200C00F11438000014314A8405CB2 +:1025C0006946C873002810D009A9684609F05CF86C +:1025D00000289AD1002D0AD0022D08D012E061689F +:1025E0000622491C17F0BBFFDBE7072029E7002E76 +:1025F00008D0E068002805D009AA6946FFF7DFFE89 +:102600000028ACD11B20694608700120887009A9F8 +:10261000684609F039F80028A1D108A840791B289C +:1026200018D12B0018F05CFA050404060604090012 +:10263000032000E0022000F0F3F9012D0CD0608AA5 +:10264000002809D000228300114610460FF076F8CA +:10265000002801D00320F4E60020F2E6F3B583B0B1 +:102660000E46032508460FF075F9002866D1039839 +:10267000FEF7B1FE040004D02078222803D20820FF +:10268000B2E46448B0E4A07F8707BF0F002E05D0F6 +:1026900031463846FEF72AFF0500F1D15A48012F8E +:1026A00004D0022F18D0FFDF28469DE4A27D3146DA +:1026B000012A02D0007D800701D5112094E4002971 +:1026C00005D1684600F0E7FA0028D9D16946039899 +:1026D00006F00EF90546E7E7A17D022915D1007D38 +:1026E000800612D4002E04D0A07F40070BD4002116 +:1026F00000E00121039806F050F90500D4D1A0753F +:10270000002ED1D003E01125CEE7002E16D03246A0 +:1027100021460398FFF74BF805461128C4D1A07F46 +:102720004007C1D42046082231460E3017F017FF6B +:10273000A07F04210843A0770025B5E7102053E4CB +:1027400070B50C460546FEF746FE010004D0224651 +:102750002846FFF70CF84AE62E4848E600B595B043 +:10276000312269460A70887009A9684608F08CFF12 +:1027700015B000BD10B50123FEF732FE10BD0023D9 +:1027800010B51A461946FEF72BFE10BD70B594B071 +:1027900004460FF0A1F8002802D0102014B026E65D +:1027A0002046FEF71BFF0028F8D1174DA878112806 +:1027B00001D00820F2E7FEF7BFFD002804D0287DF5 +:1027C000C00603D51120E9E71320E7E71D2168467D +:1027D000017020780126C107C90F684681702189E0 +:1027E00081806189C18020788007C10F684641726D +:1027F000E878002500280FD0012810D00320CDE76D +:102800000706050403020100A8010020E13F0000C3 +:1028100002320000023000006846057201E068469E +:10282000067209A908F030FF0028B7D12078800788 +:1028300008D56068002805D009AA6946FFF7BFFDE2 +:102840000028ABD11E21684601708670C57009A9A9 +:1028500008F01AFF0028A1D1A08900F0F5F80400C3 +:102860009CD11220FEF74EFD204697E7F0B595B0BB +:1028700015460C4606460FF06DF8002809D1204693 +:102880000FF02AF8002804D128460FF025F8002878 +:1028900002D0102015B0F0BDAD4F387DC106890FB4 +:1028A00001D1400701D51120F4E72046FEF796FE3E +:1028B0000028EFD120788107C90F314303D080076A +:1028C00003D5002E01D00720E4E729460220FEF7B9 +:1028D0000DFE0028DED1B878112803D0122801D0CF +:1028E0000820D7E706200BF029F9002804D09848E3 +:1028F0008078122802D005E01220CBE7FFF7B9FA62 +:102900000028C7D1FEF718FD022801D21320C1E725 +:102910002078800708D56068002805D009AA694694 +:10292000FFF74DFD0028B5D12121684601702189AE +:10293000418061898180207800278007C10F684627 +:10294000817120788007002815DB3078002807D0B7 +:10295000012808D0022806D0032804D07D4899E732 +:102960006846C77102E001206946C8710622711CE1 +:1029700002A817F0F4FD7648C078002803D001289B +:1029800004D0032086E76846877302E00120694689 +:10299000887329886846018269884182A988818272 +:1029A000E988C1820783478309A908F06DFE0028E2 +:1029B0008AD1A08900F048F8040085D11320FEF7E1 +:1029C000A1FC204666E730B5054695B00C460846A2 +:1029D0000EF09FFF002802D0102015B030BD284611 +:1029E000FEF7F9FC002807D00178222902D3807F66 +:1029F000800603D40820F0E75748EEE71321684625 +:102A00000170458009A908F03FFE0028E5D108AA19 +:102A10000A2151567F2901D02170DEE70520DCE72D +:102A200030B54B4D040008D0012C04D0022C06D048 +:102A3000032C04D0FFDF2C7030BDFFDFFBE72878CC +:102A40000128F8D0FFDFF6E710B5002809D0830091 +:102A50000022114607200EF071FE072801D0032046 +:102A600010BD002010BD70B50C0006460DD0FEF75D +:102A7000B2FC050000D1FFDFA680288920812889CB +:102A800060816889A081A889E081B0E410B504461E +:102A90000068002806D00EF05DFF002801D010204D +:102AA00010BD206801F0DBFBA088294C6082607CAF +:102AB00001280DD1002109200EF0A9FE002800D028 +:102AC0000120617A8909012904D00321FEF786FEDD +:102AD000002010BD0221F9E7F7B500260C46054697 +:102AE0000B271AE02968B00009580978002903D09B +:102AF000012901D00720FEBDA170296806220958CE +:102B0000E01C491C17F02BFD27702046029908F0A5 +:102B1000BBFD0028EFD1761CF6B22879B042E1D88F +:102B2000002639270FE0A868B10041581022A01CE8 +:102B300017F015FD27702046029908F0A5FD002822 +:102B4000D9D1761CF6B2287BB042ECD80020FEBD6D +:102B5000A8010020023200000230000010B506215A +:102B6000D04817F059FD10BDFFB591B0149C204618 +:102B70000EF0B2FE002802D0102015B0F0BD2146A4 +:102B80000120FEF7B3FC0028F7D101246846032199 +:102B90008471C9028180002201A9204603F0EDFE64 +:102BA0000028EAD1684615218471490281800026F7 +:102BB0001C2102A8009617F031FD0120014668464D +:102BC0001031017000200146684641708178F92774 +:102BD0003940891C21438170017A02252943017201 +:102BE00012998186C6861F2101870C9011980F903B +:102BF00001A80B9009AA0BA902A803F0A9FC0028C0 +:102C0000BBD16846A74E808C308068468471A64947 +:102C10008180807809AA3840801C410849006846B4 +:102C200081708586058713A80F900BA902A803F071 +:102C30008FFC0028A1D16846808C7080311D1498CB +:102C400000F0EDF899E73EB5044608206946088093 +:102C500020460EF041FE002801D010203EBD214646 +:102C60000120FEF743FC0028F8D1208869468880BF +:102C70006088C880A0880881E0884881894801ABC5 +:102C800080886A46002104F07FF86946098808298F +:102C9000E4D003203EBD1FB504460020029008206A +:102CA00069460881204603910EF016FE002802D0E6 +:102CB000102004B010BD7B4802AA81887B4804F034 +:102CC00007FA0028F5D169460989082901D00320AF +:102CD000EFE769460988218069464988618069462D +:102CE0008988A1806946C988E180E2E701B582B0A0 +:102CF0000220694608806B4802AB40886A46002182 +:102D000004F042F869460988022900D003200EBD6C +:102D10001CB50021009102216A46118001900EF03D +:102D2000F8FD002801D010201CBD5E486A4641888D +:102D30005E4804F0CDF9694609880229F4D00320E1 +:102D40001CBDFEB5064615460F4608460EF0C4FDEE +:102D5000002801D01020FEBD1F2D01D90C20FEBD82 +:102D600030460EF0B9FD4F4C002822D1208801A931 +:102D700003F058F90028F2D130786946487120886C +:102D800001A903F0E2FF0028E9D169460090087824 +:102D900002210843694608704979090703D00821D0 +:102DA0000843694608702088694603F06DFF0028D3 +:102DB000D5D169460D8120883B4602AA002103F047 +:102DC000E3FF69460989A942C9D00320FEBD7CB54D +:102DD00005460020009001900C460888694608804E +:102DE000284601950EF0ABFD002804D120460EF0D8 +:102DF00090FD002801D010207CBD002D03D0684636 +:102E00000088002809D027486A460188274804F02E +:102E10005FF96946098821807CBD0C207CBD30B5F6 +:102E2000044693B000200D46079014210BA817F01C +:102E3000F5FB1C21684617F0F1FB6A46112010775C +:102E400000205077107802210843107007A80C90DA +:102E5000012008AA907214486A46C01C10850AA86E +:102E60000B902088108460885084A0889084E0882B +:102E7000D084907FF9210840801C40084000907762 +:102E800008209086108708A80F9010AA0BA9684602 +:102E900003F05EFB002803D110A8008828800020E2 +:102EA00013B030BD10000020012A0000FFFF000019 +:102EB00001202049C00308601F4900200870072036 +:102EC0001E49C0058860704730B51B4D0446287800 +:102ED000A04204D0002C02D0002800D0FFDF2878C8 +:102EE000A0420BD00021164A14482C70002C18D098 +:102EF000144B012C03D0022C0AD0FFDF30BD11602F +:102F0000022111605361032109068160416030BDD7 +:102F100011600321116053610121C9058160416085 +:102F200030BD116011600721C905816030BD00B559 +:102F3000FFDF00BD80E100E01600002000F5014049 +:102F400000F500406403002010B50DF062FB10BDD9 +:102F500003490020C863034902200860704700004D +:102F6000C01F004080E200E00E4A12680C498A420D +:102F70000AD118470B4A1268094B9A4204D101B58D +:102F80000EF072FA03BC8E460749096809580847D3 +:102F900006480749054A064B70470000000000003C +:102FA000BEBAFECA9800002004000020781100205C +:102FB0007811002070B50C46054606F0B1FE21469A +:102FC000284607F014FF70BD10B50EF0CBFD0EF0D3 +:102FD000F9F8FFF76DFF16F0B5F90EF0DBFC0EF017 +:102FE0005BFD10BD0348044A0168914201D10021F4 +:102FF0000160704798000020BEBAFECA7047704753 +:1030000010FFFFFFDBE5B15100B001008000FFFFC2 +:1030100010B504460EF060FC002801D0102010BD51 +:1030200020784006400F042807D86078072804D38A +:10303000A178102901D8814201D2072010BDE07883 +:10304000410706D421794A0703D4000701D40807B1 +:1030500001D5062010BD002010BD30B5C37F147807 +:103060005B08A4075B00E40F2343C3771578FD24B6 +:103070006D07ED0F23406D002B43C37713788878DD +:10308000DB0920405B001843887014784B78640695 +:10309000DB06640FDB0E640123434B70137840089A +:1030A00040001B07DB0F184388705078487130BD13 +:1030B000F0B50B78C4785B08E4075B00E40F2343AA +:1030C0000B70C478FD26A407E40F3340640023434B +:1030D0000B70C478FB256407E40F2B40A400234346 +:1030E0000B70C778F7243F07FF0F2340FF003B43D7 +:1030F0000B70117803794908DB074900DB0F19438E +:103100001170037931409B07DB0F5B00194311708D +:10311000037929405B07DB0F9B001943117000798D +:1031200021400007C00FC00001431170F0BD70B511 +:1031300014460D46064604F014FC002809D0A221CE +:103140000170142221461830FEF720F804F0E7FB46 +:1031500070BD132229463046FEF709FB70BD70B5DD +:1031600015460E46044604F0FCFB00280AD0222136 +:103170000170448004222946183017F0F0F904F059 +:10318000CEFB70BD132231462046FEF7F0FA70BD2B +:1031900010B5FE4C207C00280AD12046FC4A21466E +:1031A00010380CF060F9002800D0FFDF01202074F7 +:1031B00010BDFFB581B00B9E05461F461421304659 +:1031C0000A9C17F02BFA0C98002101600398002844 +:1031D00001D0029801E03878C007002812D020689A +:1031E0000EF097FB00283FD10398002807D12068F4 +:1031F000123030602068143070602068B0600C9825 +:10320000216801603878800726D560680EF097FB4A +:10321000002829D10298002829D0FEF7DCFF0146BA +:103220002846FF300722B53017F099F9FFF7B0FFB5 +:10323000D6480090F0606268002A0DD0FF20294631 +:10324000B530FF31405DB6311032FEF77FFA102203 +:103250006068009917F083F93878400712D5A068A4 +:103260000EF057FB00280BD0102005B0F0BD6068B1 +:103270000028F9D0F060FF35813560682863EBE7FE +:10328000A06830610020F0E730B50C4611212170B4 +:103290000022054662702035A878002806D0042850 +:1032A0000DD005280FD0062812D0FFDF20780009A6 +:1032B000012803D92878C006C00E607030BD080709 +:1032C000000F203002E00807000F30302070EDE7DB +:1032D0000807000F4030F9E710B5002803D0A924F3 +:1032E000245C002C08D0A948447D0020002C0BD081 +:1032F00008601060186010BD0446A8340C600146D8 +:10330000D031F8301160F5E7A04C14340C60F0E7D0 +:1033100010B58AB008236C466370019102910023B6 +:103320009A490993039223744431059101466846F2 +:103330000CF06FF8002800D0FFDF0AB010BD70B5A8 +:1033400094B015460C462C226946189E0A70488097 +:10335000002B17D00822194601A817F000F968467B +:103360008581102231460E3017F0F9F809A9684618 +:1033700008F08AF9002803D1A17F10221143A17718 +:1033800014B070BD002001900290E8E7F0B5064649 +:10339000008A8BB080B20D460390FEF71CF87B4983 +:1033A0000446483930780F4668370091030017F01B +:1033B00097FB12FAF93A0A3B7A819DADF8F7F6F5D8 +:1033C000F4F360F3F3FAA07F8007800F012806D0A2 +:1033D000002103980AF0FCFB050003D101E0012164 +:1033E000F7E7FFDF387FC00905D068482946203855 +:1033F000006E21310DE028462130032107460DF0F3 +:103400007DFF384617F00CF9624917F022F908469B +:10341000394617F016F970686866B068A8662078B3 +:10342000252800D0FFDFFCE0A07F8007800F012867 +:1034300006D0002103980AF0CBFB060003D101E07F +:103440000121F7E7FFDF7078810702D52178252970 +:1034500004D00121084370700BB0F0BD0220287029 +:103460002020805D2871304621303136EE60A86022 +:10347000F2E7A07F8007800F012806D00021039883 +:103480000AF0A6FB040003D101E00121F7E7FFDF0A +:103490006078C10604D51420287041346C60DBE7E5 +:1034A0000821084385E03948082148380DF026FFF7 +:1034B000032017E02A206946087101A81022023073 +:1034C000716817F04CF805A810220230B16817F0A7 +:1034D00046F82E4901A84C3908F0D6F8002800D04B +:1034E000FFDF0420287000986860B5E7E07FC00621 +:1034F00000D5FFDFB0680090B3880622032103984F +:1035000005F05CF90028A7D0FFDFA5E7002C00D16B +:10351000FFDF7168002904D020461022233017F005 +:103520001EF828212046FDF78CFFA07F8007800F22 +:1035300002280ED120462330002300901A4621464F +:103540000398FFF7FCFE112806D029212046FDF73D +:1035500078FF307A2034B4E0A07F000700D5FFDF89 +:10356000A07F08210843A0770020A086204636309F +:1035700017F052F8E07FFB220146C9071040490FBF +:103580000843F72101408007C00F0DE07C020020B6 +:10359000FFFF000040420F0034E07BE19CE092E03E +:1035A00063E008E043E079E1C0000143E177307A6D +:1035B0002034607050E7A07F8007800F012806D07C +:1035C000002103980AF004FB040003D101E001216B +:1035D000F7E7FFDF2046022175300DF08FFE112046 +:1035E00028702046FF30B530686020466130017D8C +:1035F0002974407D6874FE48A86010306C346C619A +:10360000E86029E7A07F8007800F012806D000210D +:1036100003980AF0DDFA002803D101E00121F7E761 +:10362000FFDF324621460398FFF781FD14E7002CA7 +:1036300000D1FFDF20782128BCD93079012802D0C1 +:10364000022808D103E0E07F10210843E077387FAB +:10365000012108433877324621460398FFF767FD7A +:1036600023212046FDF7EDFEF6E632790123032102 +:10367000039804F097FE002813D0122028703279A6 +:10368000AA802846A91D0C3008350191029000231C +:1036900000950321039804F004FF00288AD0FFDF7F +:1036A000DAE6A07F8007800F012806D0002103986A +:1036B0000AF08EFA040003D101E00121F7E7FFDFF1 +:1036C00030792070C8E60321039805F030FA00280D +:1036D00097D113202870BFE6A07F8007800F0128B4 +:1036E00006D0002103980AF073FA050003D101E027 +:1036F0000121F7E7FFDF2E466036307D8007800F1F +:1037000001287DD1A07F8007800F0890E07F80078F +:10371000C70F03D00898012804D031E09020405D05 +:10372000C00731D02946FF318131CA6A002A25D02D +:10373000107CF37C8007800F9B0018431074FD23DE +:103740001840E37FCA6ADB079B0F184310744008D8 +:1037500040003843CA6A002F107415D0C86A214649 +:103760001022233116F0FBFE28468030017C012216 +:1037700011430174307E9043307601E0002F03D076 +:103780000898022803D031E0307EC0072BD02846AD +:10379000FF308130826A002A25D0117CF37C8907B2 +:1037A000890F9B0019431174FD231940E37F826A3E +:1037B000DB079B0F19431174490849003943826A9A +:1037C000002F11740FD02146806A1022233116F089 +:1037D000C6FE307E01210843307628468030017CC9 +:1037E000490849000174089802284FD00020182188 +:1037F000484340196030007E80070AD5FF2000E072 +:1038000007E0B13042592946307B6D311032FDF767 +:103810009DFF052168460175307D80358107890F40 +:1038200068464175317E8175297CC17570482221B9 +:103830009C38039A0170417805ABC908C900C91CBE +:103840004170428004221946183016F088FE6848FC +:103850009C3804F009FA2078252805D0212807D0C3 +:10386000FFDF2078222803D922212046FDF7E9FD39 +:10387000A07F8007800F01280AD0002103980AF05A +:10388000B8F9002800D1E7E5FFDFE5E50120AEE764 +:103890000121F3E7716800204870DDE5FFDFDBE51B +:1038A00070B55348524C4030017F00254906490EFF +:1038B000017725660BF076FD21461031204604F095 +:1038C00052F92046203005740721403041712C30D8 +:1038D000E066503060671030A06770BD70B50D466F +:1038E000FDF779FD040000D1FFDFFF21BD3128463F +:1038F00016F094FE3E48643068612046233028610B +:10390000A07F8007800F012809D002212846FF30C0 +:1039100021300BF048FD002800D0FFDF70BD0121F1 +:10392000F4E70A460146104610B5FF3021300BF08F +:103930005AFD10BDF0B505464068082601789BB0D9 +:1039400008290DD00B2903D00C2938D10121817110 +:10395000686887883846FDF73EFD040036D134E0BC +:1039600047883846FDF737FD040000D1FFDF207897 +:10397000212824D0282824D1686802210C3001F0A5 +:1039800032FA00281DD068680821001D01F02BFACA +:10399000002816D02D21684601704780214610224C +:1039A000233101A816F0DBFD0FA9684607F06CFE75 +:1039B000002800D0FFDF29212046FDF742FD1BB083 +:1039C000F0BD687830436870F9E7FFDFA07F8107BA +:1039D000890F022902D1EF210840A0772078212801 +:1039E0000FD068688179002905D08078002801E02F +:1039F0005C02002010D0A07F8007800F022858D0E2 +:103A0000FFDFA07F8007800F0228D8D1FDF71DFFC0 +:103A10000028D4D0FFDFD2E7687830436870E07FB9 +:103A2000C10720D0800701D5062100E00521222012 +:103A300001552078292818D02428E2D139460620BB +:103A40000DF00BFF22212046FDF7FBFCA07F800735 +:103A5000800F01282BD0002138460AF0CAF8002830 +:103A6000CFD0FFDFCDE70421E1E7A07F8007800F03 +:103A7000012806D0002138460AF0AAF8050003D133 +:103A800001E00121F7E7FFDF25212046FDF7D9FC02 +:103A9000102008A908712846FF3009A921300BF031 +:103AA00097FC0228ADD00028ABD0FFDFA9E70121A9 +:103AB000D2E7687830436870A3E7FFB58BB01D4646 +:103AC0000646FDF788FC040054D02078222851D304 +:103AD00023284FD0E07FC0064CD4A07F8007800F02 +:103AE000012806D0002130460AF072F8070002D003 +:103AF0000BE00121F7E7A07F8007800F012804D1A8 +:103B0000012130460AF05CF8074601AB02AA03A97E +:103B10003846FFF7E1FB0398002800D1FFDF002FB4 +:103B200009D0FF370398213787612078222806D0F3 +:103B3000242804D007E003990020886103E02521B0 +:103B40002046FDF77EFC03980C21417046620D99DA +:103B500081800C9981601499C180C56002990161CE +:103B60000199416104A90BF054FC022802D00028FD +:103B700000D0FFDF0FB0F0BD30B589B00546FDF7CE +:103B80002AFC0178222934D9807F8007800F012800 +:103B900006D0002128460AF01BF8040003D101E0FA +:103BA0000121F7E7FFDF227801230321284604F0F3 +:103BB000F9FB00281DD01221684601732278028289 +:103BC00006A8694405AB00930191029000230321EC +:103BD000284604F066FC002800D0FFDF2046FF30B6 +:103BE00003A921300BF0F4FB022802D0002800D0FA +:103BF000FFDF09B030BD10B586B00446FDF7EBFB22 +:103C00000178222919D9807F8007800F012806D0EA +:103C10000021204609F0DCFF040003D101E001216E +:103C2000F7E7FFDF1320694608702046FF30213098 +:103C30000BF0CEFB002800D0FFDF06B010BDF7B5BB +:103C4000054600780C46010920460027083082B05E +:103C50003E46019002297DD0072902D00A2909D1C8 +:103C600040E068680178082905D00B292AD00C2982 +:103C700028D0FFDF0BE214271C26002C6BD04088D5 +:103C8000A080FDF7A8FB0090002800D1FFDF00987E +:103C90000099C07D1831019AFDF758FD6868082227 +:103CA00080892082696820461230091D16F057FC71 +:103CB000A07E01210843F9210840A0760098402108 +:103CC000807F56E01A270A26002CD7D08088A08053 +:103CD000FDF781FB050000D1FFDF28460199FFF7C2 +:103CE000D3FAD4E1002C01D0288DA080287E0E28A4 +:103CF0007ED006DC01287CD0022808D0032804D11D +:103D00003EE0102876D0112875D0FFDFBFE11E27D6 +:103D10000926002CB2D0A088FDF75DFB009000289A +:103D200000D1FFDF287F8007800F0128207A24D070 +:103D3000400840002072FD210840297F4907C90F33 +:103D4000490008432072FB210840297F0907C90F59 +:103D5000890001E08FE160E108432072F72108400B +:103D6000297FC906C90FC900084320720098802125 +:103D7000807F08430099887789E101210843D9E7CA +:103D800013270D26002CA0D0A088FDF724FB00905F +:103D9000807F8007800F012806D00021A08809F0CD +:103DA00017FF050003D101E00121F7E7FFDF0098CD +:103DB000807F8207920F012A7ED0A86E81788907C2 +:103DC000890F0129217A79D0490849002172857823 +:103DD000FD236D07ED0F19406D0029432172FB256E +:103DE000294085782D07ED0FAD002943217203E0AE +:103DF0009FE0E7E0CDE0DEE0F72529408578ED069D +:103E0000ED0FED00294321728F25294005786D07BC +:103E10006D0E2943217245784906490EED0129436B +:103E2000217200216172C178A172E17A012A48D021 +:103E300042794908D2074900D20F1143E172427911 +:103E400019409207D20F52001143E1724579FB22CB +:103E50006D07ED0F1140AD002943E172F7252940B0 +:103E600045792D07ED0FED002943E172217B05799E +:103E70004908ED074900ED0F2943217319400379E3 +:103E80009B07DB0F5B001943217311400279520736 +:103E9000D20F920011432173F722007911400007DD +:103EA000C00FC000014321730098007823286FD908 +:103EB00026217EE000E001E0686E7FE701231943E0 +:103EC00084E702794908D2074900D20F1143E17211 +:103ED000027919409207D20F52001143E17205791D +:103EE000FB226D07ED0F1140AD002943E172F7256C +:103EF000294005792D07ED0FED002943E172217B63 +:103F000045794908ED074900ED0F29432173194010 +:103F100043799B07DB0F5B00194321731140427902 +:103F20005207D20F920011432173F72211404079BA +:103F3000B5E718271026002C6FD0A088FDF74BFAA4 +:103F40000190807F8007800F012807D00021A08882 +:103F500009F03EFE0090002803D101E00121F6E7C0 +:103F6000FFDFE869A06000980421407808430099C9 +:103F7000487000988078800708D501202073019848 +:103F80000078232804D92721019867E0002020E148 +:103F900066E015270F26002C68D0A088FDF71BFAD5 +:103FA00000900622E869019907F0D4FB0120A07374 +:103FB000B5E0009852E016270926002C56D0287F3D +:103FC000207264E0297FFE4802290DD019270E26B1 +:103FD000002C4BD001290ED003291BD004291DD061 +:103FE00005291BD0FFDF24E01B270926002C4ED01B +:103FF0000121217205E001212172617A890889007D +:104000006172017FCA094906D201890E49000A433B +:1040100002770EE00220207207E027E0687F0007A9 +:10402000000F8030207205291BD0607A8008800044 +:104030006072A088FDF7CFF905460078212826D0C8 +:10404000232800D0FFDFA87F8007800F012810D031 +:104050000021A08809F0CDFD22212846FDF7F1F9C5 +:1040600015E0607A80088000401CE1E70498068033 +:1040700013E00121EDE7002C01D06888A080287EA4 +:1040800003282ED004280BD005284ED0FFDF04983B +:10409000002C068001D027806680002005B0F0BD8E +:1040A00015270F26002CE1D0A088FDF794F9807F1A +:1040B0008007800F012806D00021A08809F088FD24 +:1040C000050003D101E00121F7E7FFDF2846213099 +:1040D00016F0A6FA0622019907F03CFB0020A07317 +:1040E000D5E717270926002CC0D0A088FDF773F963 +:1040F0000090807F8007800F012806D00021A088D3 +:1041000009F066FD050003D101E00121F7E7FFDFBB +:10411000A878800701D5022000E0012020720098D5 +:1041200000782328B3D9272143E719270E26002C2E +:104130009CD0A088FDF74FF90090002800D1FFDF48 +:104140000621019816F06AFA00202072A07A032155 +:104150000843A072FB2108400099C97FC907490F95 +:104160000843A0720099C97F8A07D20F1140F72235 +:10417000C90010400143A172687E8007800F0128AA +:1041800085D1607A0421084360720098807F80079F +:10419000800F01281FD0607B4108E87E4900C007DE +:1041A000C00F01436173207BAA7E4008D207400004 +:1041B000D20F10432073EB7EFD229B07DB0F1140D3 +:1041C0005B0019436173A97E10408907C90F49003C +:1041D000084320735BE7207BE97E4008C907400065 +:1041E000C90F08432073617BAA7E4908D2074900A2 +:1041F000D20F11436173EB7EFD229B07DB0F104052 +:104200005B0018432073A87E11408007C00F400058 +:10421000014361733BE710B50446807990B0800993 +:10422000012800D0FFDFFEF7B3FF01206946487088 +:104230006448099062480AA920380190201D029024 +:10424000601C0B9068460BF0E4F8002800D0FFDFFC +:104250000322601C0B9916F082F910B010BD10B546 +:10426000574C203C002805D001461022204616F06D +:1042700076F90120207410BD10B50446FEF788FFC2 +:104280004F4910222039204616F069F910BD70B54B +:1042900000254B4C0646002816D00DF01DFB0028CB +:1042A00001D010250EE00621304607F03DFA411CF2 +:1042B00007D0434940390866207F80210843207792 +:1042C00000E00725284670BD207F4006400EF6E737 +:1042D000F3B589B00D46002708460DF03BFB0028DA +:1042E00014D10998FDF777F8040003D0207822282C +:1042F00015D102E034480BB0F0BD002D08D1A07FED +:10430000C10903D08007800F022801D01020F2E7F6 +:10431000A07FC10601D4010703D5002D01D00820DC +:10432000E9E72749097FC90701D01120E3E7E17FC9 +:10433000C90601D50D20DEE78007800F022806D1CF +:10434000002D04D02846FEF763FE0700D3D1A07FDE +:104350008007800F012806D00021099809F038FC59 +:10436000060002D00CE00121F7E7A07F8007800F54 +:1043700001280BD00021099809F022FC060007D083 +:10438000A07F8007800F022804D00AE00121F2E715 +:104390000420B0E7002D04D02A4631462046FEF71F +:1043A0005CFE07AB1A4669463046FEF795FF00985B +:1043B000002800D1FFDF00990D204870099805E022 +:1043C0009C020020FFFF00000230000048623046DF +:1043D000FF302130486100200881A07FFB22800748 +:1043E000800F012832D0002D56D002200871301DD8 +:1043F0008861707840090877B0788007C00F4877E7 +:10440000887F2B788008DB078000DB0F18438877D4 +:104410001040E27FD207520F10438877F7221040F6 +:10442000E27F9207D20FD20010438877EF2210402C +:10443000B278D207D20E10438877A878C8770A4698 +:10444000213228462031FEF733FE29E00120087191 +:10445000087E2B788008DB078000DB0F1843087686 +:1044600010402A789207D20F920010430876F72264 +:1044700010402A785207D20FD20010430876EF225C +:1044800010402A781207D20F120110430876242117 +:104490002046FCF7D6FF0BE00320087105200876C4 +:1044A00025212046FCF7CDFFA07F4006400EA077D7 +:1044B00001A900980AF0ADFF022802D0002800D020 +:1044C000FFDF384617E7FFB5FB4A0D4607CA99B02C +:1044D00003AB07C300271998FCF77DFF060005D042 +:1044E0003078262804D008201DB0F0BDF348FBE743 +:1044F000B07F8007800F1590012802D0022808D0D5 +:104500000AE0002D08D11B98FEF782FD0028EBD1B0 +:1045100002E01B98002841D1B07F8007800F01285E +:1045200006D00021199809F053FB040003D101E0E3 +:104530000121F7E7FFDF852D26D008DC002D1BD0F9 +:10454000812D1BD0822D1BD0832D08D11AE0862D02 +:104550001CD0882D1CD0892D1CD08A2D1CD00F205A +:1045600020710F281AD0012069460877201D089075 +:104570002079002814D062E10020F1E70120EFE764 +:104580000220EDE70320EBE70520E9E70620E7E757 +:104590000820E5E70920E3E70A20E1E70720A3E791 +:1045A0001598012814D0656EA06E16900220019017 +:1045B000012000901699A878897808400007C00F5C +:1045C000109069D01C980DF087F9002878D138E058 +:1045D000A56E606E16900120019002200090214689 +:1045E00030461B9AFEF739FD1B99A8780978800898 +:1045F000C9078000C90F0843A870FB210840F17F5C +:10460000C907490F0843A870F7210840F17F8907BF +:10461000C90FC9000843A870EF210840A178C90755 +:10462000C90E0843A870607840092870A0788007F8 +:10463000C00F68701B988078E8700020687128713E +:10464000B8E71C98C0680DF047F9002863D11C98A2 +:10465000C0690DF041F900285DD11C98C068A060C8 +:104660001C98C069E0601699A0784978C907890F3D +:104670000843A0701699C0B28978C906C90F891E6F +:104680000840A070002020210855304600991730BE +:1046900002290BD001210AE0169902224978A0785C +:1046A000C907890FD24311430840E2E7002189007E +:1046B000091988610199701C022902D0012101E0C9 +:1046C00029E00021890009198861A8788007800FF6 +:1046D00001284CD1169880788007800F012846D198 +:1046E0001598012804D12A1D691D1B98FEF7E0FCCE +:1046F00016982979007908AA01401175169A6879E7 +:104700005279104008AA1076014330D01C980DF061 +:10471000E3F8002801D01020E6E61C982146FF317E +:1047200022461030159BA9317C321790022B3AD0CB +:1047300002910192009000210DAB2046109AFEF7E5 +:1047400038FD0028E8D12146FF3122461598AD31C9 +:10475000943201282DD017980291019200900021E7 +:104760000EAB2046109AFEF724FD0028D4D1A07885 +:1047700080073DD41699A87889780843400737D533 +:104780001698159B2978007803AA012B17D04300AF +:10479000D25A4B00DA409707BF0F18D0012F1ED016 +:1047A000022F12D11DE01C9802910192009001216C +:1047B000C2E71C980291019200900121D0E74B00C2 +:1047C000D25A4300DA409707BF0F032F07D0109A41 +:1047D000002A0DD0012906D0042904D008E00227C0 +:1047E000F5E70127F3E7012801D0042800D10427C9 +:1047F000F07F01210843FD221040109A520010431F +:10480000F077A07882070320002A0BDAA0711099B4 +:10481000002914D16946087606AA31461998FEF790 +:104820009EFC0CE00225022F1AD0012F1AD0042F73 +:1048300023D00020A071F07F40084000F0772521B0 +:104840003046FCF7FEFD2046FF3007A921300AF074 +:10485000BFFD002802D0022800D0FFDF002043E681 +:10486000A571D7E72046A5710D21243015F0D6FE9D +:104870006078284360700420CCE7A171DFE7F7B5CA +:1048800086B00D460446FCF7A6FD070005D0387833 +:10489000272804D0082009B0F0BD0848FBE7B87FFE +:1048A0008007800F01280BD00021204609F090F9E5 +:1048B000040008D106E0000048AC0100023000000E +:1048C0000121F2E7FFDFA679012E08D0002D0ED0DE +:1048D00008980DF001F8002815D01020DBE70898A3 +:1048E000002821D1002D08D0012D1DD11EE0022E5F +:1048F00005D0032E05D0FFDF28E00C2526E001259A +:1049000024E0022522E0022D02D0012D0AD00BE086 +:10491000032E09D12046002510222130089915F0D8 +:104920001EFE13E0022E01D00720B4E720462130FE +:1049300000251021064615F06FFE0898002805D0C6 +:10494000062106F0F1FE314615F07BFE607802216B +:1049500008436070C20712D040084000607068468B +:10496000017005712046213002906946FF300AF03F +:104970002FFD022805D0002803D0FFDF01E02034FE +:10498000257025213846FCF75CFD002083E730B513 +:1049900087B00D460446FCF71EFD002812D0807F2C +:1049A0008007800F01280FD00021204609F010F960 +:1049B00004000ED028460CF08FFF002806D01020EF +:1049C00007B030BDFB48FBE70121EEE76078400708 +:1049D00001D40820F4E7204629464130202205462C +:1049E00015F0BDFD6078102108436070010710D5F7 +:1049F000F721084060701420694608702046FF3097 +:104A0000213001950AF0E4FC022802D0002800D0F1 +:104A1000FFDF0020D4E770B594B00D460646FCF7E2 +:104A2000DAFC002803D00178272945D102E0E148CB +:104A300014B070BD807F8007800F012806D0002150 +:104A4000304609F0C5F8040003D101E00121F7E781 +:104A5000FFDFA07902282FD1A078C0072CD0002337 +:104A600002220321304603F09DFC002826D00D21B0 +:104A700068464173FF34213402220C9608948282E6 +:104A800007A8811F06AB0093019102900023032128 +:104A9000304603F006FD002800D0FFDF0421684601 +:104AA000017408A805710DA903A80AF0B2FC00283A +:104AB00000D0FFDF0020BBE70820B9E71120B7E7EF +:104AC00070B5064686B014460D4608460CF004FF45 +:104AD000002804D120460CF01CFF002802D0102032 +:104AE00006B070BDB44886420DD03046FCF773FC6A +:104AF000002806D04378811C22461846FCF726FE83 +:104B000006E0AC48ECE72046FDF7E7FB0028E7D1DC +:104B10001021E01D0CF0F2FBE21D29466846FEF76D +:104B2000F7FB204610221730019915F018FD0020E0 +:104B3000D6E7F7B58CB00446154600270D980CF063 +:104B400009FF002804D128460CF004FF002802D0F9 +:104B500010200FB0F0BD2046FCF73DFC060003D04E +:104B60003078272817D101E09248F2E7B07F80071C +:104B7000800F012806D00021204609F029F8040002 +:104B800003D101E00121F7E7FFDF6078400702D59C +:104B9000A078800701D40820DBE7B07F8007800F72 +:104BA00001281DD0616EA06E4978002901D0002D2A +:104BB00019D04078002802D00D98002813D0002D7D +:104BC00019D0EA1D06A8E168FEF7A2FB28461022CC +:104BD0001730079915F096FC002806D004270AE044 +:104BE000A16E606EE0E70720B3E720461022E91DC2 +:104BF000313015F0B4FC0D98002805D0C11D2046B9 +:104C00001022213015F0ABFC60780221084360705F +:104C1000C20714D0400840006070684601700771F8 +:104C2000204621300290103003906946EF300AF0A0 +:104C3000CFFB022805D0002803D0FFDF01E020349D +:104C4000277025213046FCF7FCFB002081E7F8B5F2 +:104C500015460E460746FCF7BEFB040004D020783C +:104C6000222803D00820F8BD5248F8BDA07F800755 +:104C7000800F022802D04F48C01CF8BD30460CF00F +:104C80002BFE002804D128460CF026FE002801D077 +:104C90001020F8BD00953288B31C21463846FEF737 +:104CA0004EFB112819D00028F3D1E17F2A7C490856 +:104CB00092074900D20F1143E177FD2211402A7C6F +:104CC000D207920F1143E177297C8A0820210A55E7 +:104CD000A17F4906490EA177F8BDA17F0907FBD442 +:104CE00020460822B11C363015F039FC3088A086E9 +:104CF000204610222946233015F031FCE07FFB21AD +:104D00000840297C8907C90F89000843E077F7210B +:104D10000840297CC907090F0843E077287C8108EF +:104D200021200155A07F08210843A0770020CFE76C +:104D300070B594B00D460646002B01D0072077E6EB +:104D4000FCF749FB040007D02078222802D3A07F7B +:104D5000400603D408206BE6164869E6002D1CD0F7 +:104D60002D216846017046801022294601A815F0C1 +:104D7000F6FBE07F297C400889074000C90F084303 +:104D8000E077FD210840297CC907890F0843E077B7 +:104D9000287C81082020015503E02E2168460170FF +:104DA000468009A9684606F06FFCA17FBF2211402A +:104DB000A1773DE602300000FFFF000070B50D4610 +:104DC000FCF709FB040006D028460CF0A2FD0028E1 +:104DD00003D0102070BD0B4870BD29462046FEF759 +:104DE00053FA002070BD05E00278401C002A01D073 +:104DF000002070470A46491E89B2002AF4D10120DA +:104E0000704700000230000070B50D46007804992C +:104E10001446042803D005282DD0FFDF70BDA88BD1 +:104E2000062250430E30188033200880002CF5D025 +:104E3000A88BA081002611E0A87F012812D01220A3 +:104E40007043411906227243088C1219D081102038 +:104E5000223110320AF083FB761CB6B2A089B04230 +:104E6000EAD870BDB000411906227243088C1219AD +:104E7000D0810220ECE7A88B12225043103018801A +:104E800034200880A87F012808D0022806D0FFDF40 +:104E9000002CE6D0A88BA081002612E0A073F7E7D3 +:104EA000A87F012811D030461221484341190A8CAD +:104EB0000019028210221230223115F050FB761CAC +:104EC000B6B2A089B042EBD870BDB0004119122231 +:104ED000088C7243121910820220223112320AF019 +:104EE0003EFBECE7F8B500780C46164620340E364B +:104EF000069F022805D0032832D006287ED0FFDF87 +:104F0000F8BDCD8B0A2068430E30188031203880E0 +:104F1000002AF5D0087F9581801FC7B21AE020884B +:104F20006168308048780A7800021043F080C878C1 +:104F30008A78000210433081B21C3846091D0AF0FD +:104F40000EFB002F01D0002802D0002030717080AD +:104F500008340A3628466D1EADB20028DFD1F8BDF0 +:104F6000CD8B0A2068430E30188032203880002A0A +:104F7000F5D0087F9581401FC7B243E06168228861 +:104F80000878F2803279C30752085200DB0F1A43C7 +:104F9000FD231A408307DB0F5B001A43FB231A40F3 +:104FA0004307DB0F9B001A43F7231A400307DB0F6D +:104FB000DB001A43EF231A40C306DB0F1B011A4321 +:104FC000DF231A408306DB0F5B011A43BF231A401D +:104FD0004306DB0F9B011A433271C00970718A7856 +:104FE0004B7810021843308132463846C91C0AF00B +:104FF000B6FA002804D00020B07000E008E030804D +:1050000008340A3628466D1EADB20028B6D1F8BD68 +:10501000087FCD8B801E86B2304608306843103042 +:10502000188035203880002AF1D017469581103736 +:10503000E800D681C01900900DE0208838800098E3 +:10504000786032466168009815F089FA0098083453 +:1050500080190837009028466D1EADB20028ECD1AB +:10506000F8BDFFB5099E1D460C46002A05D0607E9E +:10507000FF300130D080E08B108100980078030071 +:1050800015F02EFD0C900715212A333C4A5F686805 +:105090006890087F1746082802D0032800D0FFDF59 +:1050A0000E20288030200AE00020B881FFBD087F54 +:1050B0001746042800D0FFDF0E20288031203080E2 +:1050C000002FF1D1FFBD087F1746042800D0FFDF75 +:1050D0000E2028803220F2E7087F1746022800D0F1 +:1050E000FFDF0E2028803320E9E7087F17460228DB +:1050F00000D0FFDF102028803420E0E7087F17462B +:10510000042800D0FFDF1020288035203080002FB9 +:10511000D8D00020B88112E0207F1746052802D0A1 +:10512000062800D0FFDF1220288036203080002F94 +:10513000C8D0E08BB8810020388200984088F88180 +:10514000FFBD087F1746072800D0FFDF0E2028800C +:105150003720B4E714202880382017463080002AF2 +:10516000EED0E08BB8810020788200980078092882 +:1051700005D00A2809D00B280DD0FFDFFFBD087F1E +:105180000C2800D0FFDF01200AE0087F0D2800D0A6 +:10519000FFDF042004E0087F0E2800D0FFDF052099 +:1051A000B873FFBDFFDFFFBD70B50C460546FCF7C9 +:1051B00012F9002804D00078222803D2082070BDFC +:1051C000FA4870BD0521284608F002FD206000283D +:1051D00001D0002070BD032070BDFFB585B00D4625 +:1051E0000746172069468881089802261446002839 +:1051F00005D108A93846FFF7D7FF002842D1002D76 +:105200000DD06846828900233146384603F0CAF83B +:10521000002842D00898007800283ED105E0207888 +:10522000092823D00F282FD0FFDF002004A90190E8 +:10523000034600910290684682893146384603F061 +:1052400030F900281ED10898A760801D606003A96E +:105250002046049A04F0FBF900282BD0030015F037 +:105260003FFC071E1C27272520222700684607260B +:10527000828900233146384603F094F80028D4D1BF +:10528000CA48801C09B0F0BD6846828900233146B7 +:10529000384603F087F80028C7D11120F2E7002034 +:1052A000F0E70820EEE7C148401CEBE70720E9E7FC +:1052B0000320E7E70498009068468389042231467A +:1052C000384603F07BFA0028DCD1002DDAD00899AB +:1052D0000D70D7E730B587B01D460C46002A11D0B7 +:1052E000042369460B7013888B815288CA81A27887 +:1052F0008A7422880A8200236A462946FFF76DFFD6 +:1053000007B030BD1020FBE7F3B581B001980C4623 +:1053100000780826030015F0E3FB123B3737151120 +:10532000390A0A0A0A0A0A0A0A0A0A0A0A3B002C65 +:1053300000D1FFDF6078304360702AE0002CF9D1A3 +:10534000FFDFF7E701980521808887B2384608F02B +:105350003FFC0546002C00D0FFDF002D00D1FFDF11 +:105360003946A81D04F06AF902F0FBFA040006D0E1 +:10537000607830436070678002F0D1FA0BE013214F +:105380003846FDF7DDF911E0FFDF02E0FFDF00E066 +:10539000FFDF002C0AD06078000707D5932020702B +:1053A0002046582218300199FBF7F0FE0020FEBD80 +:1053B00010B500200870881D04F03DF910BD0A46A4 +:1053C00010B50146901D04F041F910BD70B50546B9 +:1053D000052108F0FDFB040000D1FFDF2946A01DD8 +:1053E00004F02CF970BDF7B586B00C4605460020D8 +:1053F0006946088188806F880521384608F0E8FBF7 +:10540000060000D1FFDF002C03D0A7800020E08041 +:105410002081297E20461230C91E142700900B00DF +:1054200015F05EFB0FFEF5F25E09A8676C7D2BB1EF +:10543000C6E19090F2003078012800D0FFDFA88B01 +:105440006A46C1000E31918030211181002C13D0A9 +:10545000A08100200DE0C100327909190A74728818 +:10546000CA8182005319DA8B4A821A8C401C8A82C4 +:1054700080B2A1898142EED8E4E03078012800D0E2 +:10548000FFDFE88B6A46C1000E3191803021118127 +:10549000297F091FC9B20491002CEDD0A0810027FB +:1054A0001AE0F8000219401900920390416A0E3286 +:1054B00004980AF054F8002804D0009900200874D9 +:1054C0000099C88103987F1C018C0098BFB241826B +:1054D0000398418C00988182A089B842E1D8B1E05C +:1054E00002A8009001AB224629463046FFF78CFC0B +:1054F000A8E03078072805D0FFDF03E030780728E0 +:1055000000D0FFDFE88B69461230888036200881A2 +:10551000002C37D0A98BA1817188E18122E03078FD +:10552000082800D0FFDFA88B6A4601460E30908025 +:1055300037201081002C25D0A1812046AA8B0E3067 +:10554000296A4DE0E88B6946123080B239228880A2 +:105550000A81002C72D0A98BA181287E102807D047 +:105560000221A173E98B2182EA8B296A009837E036 +:105570000121F6E702A8009001AB224629463046F9 +:10558000FFF7B0FC5EE03078092800D0FFDF694605 +:1055900038208F800881002C54D0A98BA181002055 +:1055A000608220820120A0734CE0000002300000E5 +:1055B00030780A2800D0FFDF288C694614308880B4 +:1055C00038200881002C3DD00421A173A98BA18132 +:1055D000E98B2182298C618220462A8C1430696AE9 +:1055E00014F0BDFF2EE030780B2800D0FFDF6946B5 +:1055F00038208F800881002C24D00521A173002041 +:10560000A081208260821DE01BE000E008E002A88B +:10561000009001AB224629463046FFF722FD11E0FB +:105620000D2069463A2288800A81002C06D001208C +:10563000E08000202081207304E0FFE708990880C3 +:1056400015E0FFDF6846089980880880002C0ED09E +:10565000684600892080684680886080287E03280C +:1056600005D0102803D0112801D000203070002070 +:1056700008E6F7B556880F4682B015460521304634 +:1056800008F0A6FA040000D1FFDFA41D33462A4625 +:1056900039460094029804F060F905B0F0BDF7B502 +:1056A0008CB00D46144607A90C98FFF77DFD002825 +:1056B00012D1884E0127002C10D0032168460170BA +:1056C0001021818208A802460690204605A909F00B +:1056D0006CFF00280CD007200FB0F0BD08216846F1 +:1056E00001708581C68105218774C90201820BE0A2 +:1056F0000798A17801712188418068460521877447 +:10570000C90201828581C68102460121079B0C984E +:10571000FFF763FDE0E708B501236A4693706E4B1F +:1057200013800A4602236946FFF7D4FD08BD08B579 +:1057300001236A469370684B5B1C13800A4603235F +:105740006946FFF7C7FD08BD00B587B000290CD03A +:1057500002236A4613700B8893814988D181002304 +:105760000421FFF73AFD07B000BD1020FBE710B59C +:10577000002903D00623FFF7ADFD10BD072010BDA3 +:1057800070B588B00D461446064607A9FFF70CFD14 +:1057900000280DD1002C0DD00621684601708581AE +:1057A000C481079B02465C8007213046FFF715FD48 +:1057B00008B070BD0521684601708581F1E710B51C +:1057C00088B000290BD007246B461C709A81049185 +:1057D00000236A460821FFF700FD08B010BD102025 +:1057E000FBE770B50024172288B0002914D00D788B +:1057F0002B0015F075F90623050519041B23152246 +:10580000D21E93B2CA88002A02D08E68002E03D01E +:105810009A4203D90C20CBE71020C9E7042D05D00C +:105820008A88002A0AD101E00620C1E7012D11D0A3 +:10583000022D05D0042D18D0052D23D00720B7E761 +:1058400009236A4613704B889381CB88D38189687A +:1058500004911DE00C236A4613704B889381CB881A +:10586000D38189680924049112E00D236A461370DC +:105870004B8893818B88D381CB88138289680A24D3 +:10588000059105E00E236A461370497811730B24C5 +:1058900000232146FFF7A1FC8AE700B587B00F235C +:1058A0006A461370918100231946FFF796FC5AE768 +:1058B00000B587B000290BD002236A4613700B880D +:1058C00093814988D18100230521FFF786FC4AE7AF +:1058D000102048E7FFFF000002280000002803D046 +:1058E0008178012939D101E0102070470188FE4AF2 +:1058F000881A914233D01BDCFC4A881A91422ED080 +:105900000BDC00292BD00320C002081A27D0012865 +:1059100025D001210903401A07E001281FD00228E1 +:105920001DD0FF281BD0FF380138002815D116E004 +:10593000FF220132811A904211D008DC01280ED0DA +:1059400002280CD0FE280AD0FF2806D107E0012942 +:1059500005D0022903D0032901D0002070470F2071 +:10596000704700B50B2826D009DC030015F0B8F805 +:105970000B1D2125251B25292325271F1B00112849 +:105980001BD008DC0C2816D00D281CD00F2814D0F2 +:10599000102808D10FE0822809D084280FD085284C +:1059A0000FD0872811D0032000BD002000BD0520A6 +:1059B00000BDCF4800BD072000BD0F2000BD042062 +:1059C00000BD062000BD0C2000BD0D20800200BDE2 +:1059D00000B5030015F084F8070507050D0D090B48 +:1059E0000D00002000BD112000BD072000BD0820D3 +:1059F00000BD032000BD00780207120F04D0012A69 +:105A000005D0022A0CD110E0000909D10AE00009F2 +:105A1000012807D0022805D0032803D0042801D08C +:105A2000072070470870002070470620704700B5B7 +:105A3000030015F055F8050406080A0C10000020B4 +:105A400006E0112004E0212002E0312000E04120A6 +:105A50000870002000BD072000BD38B50C460500C9 +:105A60004DD06946FFF7C7FF00281FD1694660780F +:105A70000978C0084907C000490F084360706946AB +:105A8000681CFFF7B8FF002810D16078C7210840D4 +:105A9000694609784907890E08436070A978490763 +:105AA000890F012903D0022905D0072038BD2178AC +:105AB000DF22114002E021782022114321704107AA +:105AC00007D0BF210840A9780907C90F89010843F9 +:105AD000607060788106490F0AD0A9784006C9062F +:105AE000C90F400EC901084360708006400F02D103 +:105AF0006078400603D520784021084320700020BC +:105B000038BD70B504460020088015466068FFF770 +:105B1000A4FF002815D12189A089814210D861688D +:105B20008978C90708D001214902884208D8491C50 +:105B300014F08FFD298009E0FF21FF31884201D94F +:105B40000C2070BDFF30FF3003302880002070BD76 +:105B500010B5137804785B08E4075B00E40F234377 +:105B60001370FD2423400478A407E40F640023434A +:105B70001370FB24234004786407E40FA40023433C +:105B80001370F724234004782407E40FE400234330 +:105B90001370EF2423400478E406E40F2401234328 +:105BA0001370DF2423400478A406E40F6401234328 +:105BB00013700078BF244006C00F234080010343C8 +:105BC0001370002906D00878C10701D1800701D5DC +:105BD000012000E00020C0015906490E0843107062 +:105BE00010BD10B54A784378D208D2005C0702D0C5 +:105BF0005B075B0F05E09B065C0F01D05B0F00E0CD +:105C000001231A434A70C72340781A4083065C0F69 +:105C100001D0580F05E0430702D04007400F00E0D5 +:105C20000120C00002434A7010BDF3B593B00D00CF +:105C30000FD0139800280FD01221284614F0ECFC46 +:105C400003AAFF21012005F092FB002426463746D7 +:105C50007BE0102015B0F0BD0720FBE76846807D93 +:105C600001280BD16846818A0520C002081A0AD093 +:105C700001280AD002280CD003280CD0042C0ED006 +:105C8000052C0FD10DE0012400E002246846468A6D +:105C900008E0032406E068460424478A02E005245D +:105CA00000E006246846418A139881424DD12C7445 +:105CB000002E48D00DAA0EA9072002920191009053 +:105CC00010230022FF21304605F0F0FB00282AD1E6 +:105CD0006846808E2A46C0B20EA909F040FC002812 +:105CE00021D1AE81002F05E002290000012800002B +:105CF0000330000027D00DA9072008AE02910090C4 +:105D0000132300220196FF21384605F0CFFB00281F +:105D100009D16846808EF11CC01EC0B22A1D09F050 +:105D20001EFC002801D0032094E708A8817842785F +:105D300008021043E881062C05D16846807DA872D0 +:105D40006846808A2881002084E703A805F018FBB4 +:105D5000002883D0FFF705FE7CE7F0B58BB00E4638 +:105D600005461C461746142103A814F057FC0120D1 +:105D7000694608730874119A4A748F82002C0AD0FD +:105D8000A178C90707D069468875E0884883A0884C +:105D90000883A068079001F0E4FD040024D065802A +:105DA000172268460284002009A900910190034649 +:105DB00002900146284602F074FB002812D1684682 +:105DC000083670C008AA099B109904F0C2FD064667 +:105DD0006078000701D501F0A2FD002E0AD0304600 +:105DE000FFF7F6FD0BB0F0BD13212846FCF7A8FC29 +:105DF0000320F7E7099800906846038C04220021ED +:105E0000284602F0DBFCEDE770B506468AB00020BC +:105E10000D4607900590069003A9049007240246BA +:105E200002910190102300942946304605F03EFB74 +:105E300000280DD108A804A9009102900194684699 +:105E4000838900222946304605F051F9002801D007 +:105E5000FFF787FD0AB070BD10B504F0D6FF10BD86 +:105E6000FEB500260546029600780C46082703007A +:105E700014F036FE0CC5070F33D6686887A1C1A69B +:105E8000B2C5002C00D0FFDF288980B201F0F5FEFA +:105E9000B6E0A888042180B2009007F099FE019036 +:105EA000002C00D0FFDF0198002800D1FFDF01980F +:105EB0000099083004F06BF901F053FD040007D09D +:105EC0006078384360700098608001F028FD99E0A8 +:105ED00013210098FCF734FCA2E0002C00D1FFDF76 +:105EE0006088042107F074FE0090002800D1FFDFD5 +:105EF0000099002008802A79944620E0C3005B19AD +:105F00009B6800936B461B781A0708D5DB0606D5FD +:105F10006046C20050194038C08F088008E06B46C8 +:105F20005B785B0609D50871C2005019C0884880AB +:105F3000607838436070022662E0401CC0B284453D +:105F4000DCD85DE0E88869460880002C00D1FFDFDE +:105F500068464078C00904D02878062805D005286E +:105F60002CD06078384360704AE06088042107F0E4 +:105F70002FFE060000D1FFDF00203071A88870805E +:105F80001CE0002C00D1FFDF6088042107F020FE18 +:105F90000090002800D1FFDF0098083004F087FF50 +:105FA0000121484002D1E879C00929D000986188D0 +:105FB0000226C180D5E7002C00D1FFDF0226D0E702 +:105FC000002C00D1FFDF022661880122204601F06B +:105FD0009AFE01200290C4E7A889002C87B200D065 +:105FE000FFDF68680090288969468880012238466A +:105FF00001F09DFE04E0002CB3D1FFDFB1E7FFDF2D +:10600000002C0DD0607800070AD50298002807D12F +:10601000842020702046582229461830FBF7B6F815 +:106020003046FEBD3EB50C0009D002AB6A460021E9 +:1060300005F09EFA002804D0FFF793FC3EBD102027 +:106040003EBD0321204614F0E7FA6846407801A9D6 +:106050004007400FFFF7EBFC00280BD168460079A2 +:1060600020706846407801A98006400FFFF7DFFCEA +:10607000002801D003203EBD684600796070A278F8 +:10608000EF20024068464078C00900010243A27038 +:10609000F7200240684640784006C00FC000024327 +:1060A000A270F920024068460078800601D50220DF +:1060B00000E00120400069460243097A5008400090 +:1060C000C907C90F0843A07000203EBD70B5064641 +:1060D000144608460D46204307D0002D10D0284610 +:1060E0000BF02DFC002812D101E0072070BD2946DD +:1060F000304605F096FA002802D0FFF732FC70BD5A +:10610000002C0BD020460BF01AFC002801D01020E8 +:1061100070BD21463046FFF785FF70BD002070BD81 +:10612000F7B50C460546007E22468AB00A32009238 +:10613000921E05920027811E0C323E4603920B00F0 +:1061400014F0CEFC08FC05FB34347EBEFDFB6888F1 +:10615000042107F03DFD0190002800D1FFDF0198E8 +:106160000088002802D052270726EFE0512710268A +:10617000002C7DD06888A0800120A07101980022A9 +:1061800000790099C0004019C08BFFF79FFF0028DD +:106190006FD101980079C0004019C08B208101980F +:1061A0000079C0004019408CE081EBE0698C0191DE +:1061B000062821D1E87FC0091ED008461430512797 +:1061C00086B2002CD5D0A88B00220099FFF77EFF65 +:1061D000002873D16888A0800220A071A88B20813C +:1061E0000120A073288C208201986082696A019A3C +:1061F000039814F0B4F9C5E008461230502786B26F +:10620000002CB6D0A88B00220599FFF75FFF00286D +:1062100054D16888A080A88BE080287E06280DD005 +:1062200002202073288CE081E87FC0096073019808 +:1062300020822046696A1230019ADAE70120F0E7ED +:106240006888042107F0C4FC0290688C05900298CD +:10625000002800D1FFDF0298083004F028FE012159 +:10626000484002D1E87FC00927D00598143001E0EA +:106270007AE023E0512786B2002C76D06888A0808F +:10628000A88B00220099FFF721FF002816D10220D9 +:10629000A071A88B20810420A073288C20820598EF +:1062A0006082696A059A039814F059F902990020EE +:1062B00008710298A98B418064E003200DB0F0BD05 +:1062C0006888FBF788F800906888042107F080FC54 +:1062D00003900098002800D1FFDF0398002800D128 +:1062E000FFDF0398FE49C088884202D05127142658 +:1062F00001E050271226002C37D06888A080502F4C +:1063000006D00220A071287F059901F08BF939E0B1 +:10631000287FA11D01F086F90098002120308078A7 +:106320000090019103980B46428868880399FFF713 +:1063300014FD0028C2D125E001E022E018E0E9497F +:10634000A88BC988814206D154270626002C0CD080 +:106350006888A08016E053270826002C05D068889E +:10636000A080A88BE0800DE0FFE70C9806800FE08E +:1063700055270726002CF8D0A88BA0800020A071FC +:1063800000E0FFDF0C98002C068001D0278066809B +:10639000002093E7D34900200870704730B587B0DC +:1063A0000C4607F0E2FB0546FF2800D1FFDF002086 +:1063B000208020716080401EE08020462946083001 +:1063C00003F0D8FE01AA2946012004F0D0FF1024D2 +:1063D00015E06846C079000711D56846408929460E +:1063E000FFF712FD6846C179FF232143C171017097 +:1063F000017A417040892946009A05F0E1F801A828 +:1064000004F0BEFF0028E4D007B030BD0A460146C4 +:1064100010B51046083003F0C2FE10BD70B5054639 +:10642000042107F0D5FB040000D1FFDF20462946F8 +:10643000083003F0ACFE70BDF3B58BB00D460B9881 +:10644000FAF7C9FF060004D03078222803D20820CA +:1064500034E7A54832E704210B9807F0B9FB07465B +:10646000002D02D0A88800280ED0012168460173B3 +:106470000221002401744474002D07D0A8886946C5 +:1064800008832868059003E0092017E70483059432 +:1064900001F067FA050028D00B986880172268463B +:1064A000028409A8019400230090194602940B98D5 +:1064B00001F0F7FF0028CBD1384608300B99029045 +:1064C000203600950191B17808AA03A8099B04F031 +:1064D00040FA04466878000701D501F020FA002C44 +:1064E00009D02046FFF774FAE8E613210B98FCF771 +:1064F00027F90320E2E6099800906846038C0422FD +:1065000000210B9802F05AF90021C943F980D5E621 +:10651000FFB585B00E9E77883846FAF75CFF0546D2 +:106520000421384607F054FB0446002D00D1FFDF5C +:10653000002C00D1FFDF0834089869460394C1C1DC +:1065400005A80DC82035A97803F058FE09B0F0BDA4 +:10655000F0B50446002099B007460E9010A8878138 +:106560000D46078187805F4968468F80078587844D +:1065700087870786878508781646012808D002286D +:1065800006D0032804D0042802D0082019B0F0BD9A +:1065900020460BF0A1F9002856D128460BF09CF9B3 +:1065A000002851D160680BF0D5F900284CD1606803 +:1065B00000280AD060892189884203D8012252022A +:1065C000914201D90C20E1E70E9015AA0FA92846A7 +:1065D000FFF797FA0028D9D1686880784007800FC4 +:1065E000022809D108A8407F8006400F04D02869FE +:1065F0000BF0A5F9002827D10AA92069FFF72DFA89 +:106600000028C3D1206900280BD06078800708A833 +:10661000407A03D58006400F6FD002E08006400F1D +:106620006BD108A8007A800610D508A8407A8006A9 +:10663000400F04D060680BF082F9002804D1606834 +:106640000BF088F9002801D010209FE70BA96069A2 +:10665000FFF703FA002899D16069002808D008A83C +:10666000407B4107490F012947D18006400F44D0A4 +:106670000CA9A069FFF7F1F9002887D108A8007BD1 +:1066800080063AD408A8007C800636D4A069002889 +:1066900008D008A8407C4107490F01292DD1800668 +:1066A000400F2AD0E068002804D00078002824D0C9 +:1066B0001C2822D204AA611C2046FFF749FA08A828 +:1066C00040790127C108C900491C08A841716846E2 +:1066D00087730649818104AA033217A9286808E054 +:1066E000FFFF0000580300200230000003280000D4 +:1066F00003E008F05AFF002801D0072046E710A861 +:10670000007F14A9C01CC2B200200D92FF3200907D +:10671000034602910190FF3203A80332099904F065 +:106720007EFD002852D110A9088A10902A89296973 +:10673000FD4801910092029010A98A8A6B8928680D +:106740000F9904F06CFD01007ED12078C10601D4C0 +:10675000800626D5002010A908836069002809D189 +:106760000BA90FA8FFF73DFA08A9487BC008C00095 +:10677000401C487308A9087BC821084308A908736E +:1067800069468F73E948888112AA16A902206D46CE +:1067900007C50023E64A03A80B9904F040FD010059 +:1067A000D2D1E1480025001F818868464174090A5A +:1067B0008174072104A86A4623C210A82A46FF2133 +:1067C000008A0D9B04F093FC002802D0FFF7C9F863 +:1067D000DCE66846007CC0092ED06846858408A89F +:1067E00040790023C108C90008A8491C41716846C6 +:1067F0002921877309028181858608A8007DCC4AFA +:10680000410860784900C007C00F014308A801751E +:10681000FD20014060788007C00F4000014308A8B8 +:1068200001750DA9022001910090029503A8099914 +:1068300004F0F5FC010007D16068002829D0206928 +:1068400000280ED10AA900E080E00FA8FFF7C9F9DF +:106850006078800705D408A9487AC721084008A9AC +:106860004872B24968468773491E8181B0492089C0 +:10687000891E13F0EEFE0A4661680E9811AB009077 +:1068800002930191002303A80A9904F0C8FC0100B7 +:106890005CD12078C00727D068468586A06900288B +:1068A00009D10CA90FA8FFF79CF908A9487CC008DA +:1068B000C000401C487408A8017C4020014308A87F +:1068C00001749A4968468773491C818113AA0DA9EE +:1068D00002200292019100900023954A03A80C998E +:1068E00004F09DFC010031D1E068002832D06846F8 +:1068F000858408A840790023C108C90008A8491C5C +:1069000041718A4968468773891C8181E16808A8BA +:106910000A78027549784175E068412241886846E5 +:10692000C186E068D200017908A80176E0686C466B +:10693000C18808A84176090A81760DA9072023C4D9 +:1069400003A8099904F06BFC010003D0109800F033 +:106950007DFE1BE674480321001F0170002E0AD043 +:106960008088308010A88088708010A80089B0804E +:1069700010A88089F080002008E630B501248BB093 +:1069800015460B46012802D002281AD104E06846B9 +:1069900005218473C90202E06846664984738181D7 +:1069A000002B11D000210182407C06AAC108C90039 +:1069B0006846491C417405A9184608F0F6FD0028F0 +:1069C00004D007200BB030BD1020FBE76A46127DD3 +:1069D00055480092801E06A9FF3201910290FF32B5 +:1069E000002303A80332049904F019FC002802D004 +:1069F000FEF7B7FFE6E74C48001F002D01D04188A5 +:106A0000298004700020DDE770B592B004460126AD +:106A100008A8867048496846018410AA08A930462B +:106A2000FFF7ABFF002840D120783F4DC00700247E +:106A30002D1F00283BD01C21684613F0EFFD68464F +:106A40000178202001436846017008A886703B4900 +:106A50006846018411940794817FF92001406846BB +:106A6000891C817700200146684601770020014695 +:106A70006846417704218185C485018607A80A906C +:106A800011A80D9008A809900EAA09A96846FFF759 +:106A90005FFD002809D16846008FE8806846808F36 +:106AA0002881401C68812C70002012B070BDEC80E1 +:106AB0002C8110A80088F4E7F7B51B490026091FB0 +:106AC0000A789EB0012A04D0022A02D0082021B000 +:106AD000F0BD4A88824201D00620F8E71F98824222 +:106AE00001D10720F3E7012218A812498271491C3D +:106AF00010A8818400210182407CC308DB0010A81B +:106B00005B1C4374684682810D4AC28118A8817358 +:106B100010A881851BA804906846C2820691FF21B7 +:106B2000017503A80EE000005C03002002290000AC +:106B3000030200000128000001180000052A0000DF +:106B4000FFFF000004F03EFC00242546274608AA6B +:106B5000072103A804F039FC002810D082286FD147 +:106B6000002C6FD0002D6DD010A88480C58000212E +:106B7000017518A8807C11AC012865D06DE008A8CB +:106B80008079002F21D0012857D16846818CFE489A +:106B900081421CD113AA0DA907206B4607C3684682 +:106BA000408C10230022FF2104F080FC002868D1D3 +:106BB00010A88089042801D006284CD16846818E0F +:106BC0001F98814239D10F2081E7012835D16846CD +:106BD000808C0521C902884202D0491C88422CD1F0 +:106BE000EA4841886846408C814201D1012700E093 +:106BF0000027002C01D0002D10D01F9988421CD1F5 +:106C000013AB0DAA07216E460EC6044610230022C0 +:106C1000FF2104F04BFC002833D101E035460CE0A5 +:106C200010A88089022801D0102814D1C0B21CAA53 +:106C30000DA908F094FC00280DD16846468C86E723 +:106C40001FE0FFE7052042E715A91CA8221D08F058 +:106C5000ACFC002801D0032039E710A8007D0023F8 +:106C6000001DC2B210A802752098009202900194F3 +:106C700019A8149904F0D3FA002802D1C34A0221BA +:106C80001170FEF76EFE22E710B50B46401E86B06F +:106C900084B203AA00211846FEF75AFF04AA07216E +:106CA00003A802920191009001230022FF212046B7 +:106CB00004F01DFA04466846008A012800D0FFDF70 +:106CC0002046FEF74EFE06B010BDF0B5AF4F0446AD +:106CD000387887B00E46032804D0042802D0082054 +:106CE00007B0F0BD04AA03A92046FEF70AFF05007D +:106CF000F6D1606880784007800F02280BD1684683 +:106D0000407B8006400F06D020690AF018FE00285C +:106D100001D01020E4E7208905AA6B46216907C34A +:106D200069460A8A63892068039904F078FA002882 +:106D300002D0FEF716FED3E7002E02D06846808A06 +:106D40003080042038702846CAE738B50C00054664 +:106D500009D000236A46FF2104F00AFC002804D071 +:106D6000FEF7FFFD38BD102038BD69462046FEF70E +:106D700074FE0028F8D1A078FF21C307DB0F284656 +:106D8000009A04F01DFCEBE77FB514460722019240 +:106D900003AD029500930A462388FF2104F0A7F96A +:106DA000694689892180FEF7DCFD04B070BDF0B52D +:106DB00091B00746002568460C46858600291CD000 +:106DC000E068002806D0A068002816D001886A462E +:106DD000918605803846FAF7FEFA002810D0007830 +:106DE00022286CD3384606F0C0FE009004213846B5 +:106DF00006F0EEFE060006D104E0102011B0F0BD52 +:106E00006348FBE7FFDFA078012803D0022801D008 +:106E10000720F3E72088002808D0401C80B203AA8E +:106E2000009904F0A4FA002829D102E05848401C37 +:106E3000E4E703A804F0A4FA69468A7D0D218902DB +:106E4000012A09D16A46928A524B9A4204D1822879 +:106E500002D0002813D101E00846CFE7E0680028FF +:106E600014D00DA9072202910192009069468B8EE1 +:106E7000A2882088FF2104F03AF9002802D0FEF70A +:106E800070FDBBE76846A168808E08806846C07BBD +:106E9000C00601D54048B1E70798002803D06846EE +:106EA000008B022801D00320A8E717226946079823 +:106EB0000A87A1780078012903D0800711D408201F +:106EC0009CE7C007FBD000230721384601F06AFA8F +:106ED000002803D007200F90022005E02C48801CDA +:106EE0008CE701200F90032008A9087021886846CC +:106EF000818410A80090019502956846028F0023B6 +:106F000038460F9901F0CDFA002891D10836019743 +:106F1000029600950EAA072108A8109B03F019FD00 +:106F2000002802D0FEF754FD68E7109800906846EC +:106F3000038F042238460F9901F040FC5EE770B5DC +:106F4000064615460C460846FEF7C8FC002804D144 +:106F50002A4621463046FFF710FD70BD10B5FFF7F9 +:106F6000ABFD10BD70B51E4614460D0016D0002CAA +:106F700014D06168002911D0002811D00349498834 +:106F800081420DD0072070BD022800005803002068 +:106F90000230000002290000013400001020F2E756 +:106FA0002068FEF79BFC0028EDD13246214628469A +:106FB000FFF7CEFAE7E770B515460C0007D00028BA +:106FC00007D0FE498988814203D00720DBE71020E3 +:106FD000D9E72068FEF782FC0028D4D12946204654 +:106FE000FFF773FECFE770B5054686B00E46144630 +:106FF00010460AF08EFC002861D160680AF0AAFCF5 +:1070000000285CD1EE48854204D02846FAF7E3F91F +:10701000002814D0284606F0A8FD0546304601A9F0 +:10702000FEF703FE00280BD16846017D0F200B0000 +:1070300013F056FD0808060606060A0A0832E1485B +:1070400006B0A0E70320FBE769468979012907D14B +:10705000694689880322D202891AF1D00129EFD02A +:107060006946897A012906D16946098915225202A1 +:10707000891A0529E4D96946897B01290DD1694618 +:10708000898929221202891ADAD00229D8D0032943 +:10709000D6D0042901D1D3E7FFDF6068002810D1E2 +:1070A00000236A462946304604F062FA002802D0DE +:1070B000FEF757FCC4E768460078800601D410202C +:1070C000BEE76188224630466368FFF75DFEB7E79A +:1070D000F7B5074686B0144610460AF01AFC002899 +:1070E00002D0102009B0F0BD384606F03EFDB44E87 +:1070F0000546B74201D0FF2D0AD00146002303AA5E +:10710000079804F035FA002804D0FEF72AFCE9E7D6 +:10711000AC48E7E76846007BC00601D5AA48E1E72E +:1071200004A9072002910027009001976288334646 +:107130002946079804F0BAF9060013D160680AF0EE +:10714000E8FB00280BD160680721029700910190AD +:10715000238862882946079804F0A8F906466846FD +:10716000008A20803046D0E710B5002907D0934B25 +:107170000A881B899A4202D89248401C10BDFFF72A +:1071800016FE10BD10B586B004236C46A3828B4B4F +:10719000DC88002C07D01B898B4201D2914204D994 +:1071A0008848401C8FE506208DE56B4619825A827F +:1071B0000021009101911C800221997005A9029182 +:1071C00004A903916946FFF7F2FD7CE5F3B583B0AE +:1071D0008126684606700F4608460AF07DFB0028A7 +:1071E0003ED10398FAF7F7F80190002812D0007802 +:1071F000222827D3002317221946039801F0D2F83A +:1072000000280AD00421039806F0E2FC029000282E +:1072100006D104E06B4805B0F0BD1120FBE7FFDFAD +:107220000298083002F0D2FF05463878012803D0D2 +:10723000022804D00720EEE7A80703D504E0342095 +:10724000054201D10820E6E7B8793C1DC00709D006 +:10725000E088002806D0A0680AF03EFB002801D094 +:107260001020D8E720883F780021002811D0C21FC5 +:10727000FA3A0721112A1ED2130013F031FC110F24 +:107280000D130F240F1824160F0F242424240F2469 +:107290000F006846017018E0022F14D1684606708E +:1072A0000846B8E7012FF9D00DE0EA0600E0AA068B +:1072B000002AF3DA07E00246FF3A813A1F2A02D990 +:1072C0007D3A022AEAD86946087068460178019832 +:1072D0002346203080780090029801914288014630 +:1072E0000398FEF73AFD96E7FFB58BB000200190BA +:1072F0001F4615460C460E460B98FAF76CF8002808 +:1073000005D00078222804D208200FB0F0BD2D4807 +:10731000FBE7B80801D00720F7E7032F00D10027CB +:107320000B9806F022FC0890002C1FD0022D7DD374 +:1073300020460AF00FFB002806D160190090401E7D +:107340000AF008FB002801D01020DEE7AD1EAAB22B +:1073500021461B4804F00EFA014600981E38427F71 +:10736000037F10021843814271D1ADB21348B907AF +:1073700002D50189491C00E0012189B20091F90779 +:1073800001D0078900E00E4F03AA0899009803F086 +:10739000EEFF0DE0F078B17800020843102856D8CF +:1073A0000199091D401880B20190A8424FD82618B3 +:1073B000002E6ED070783278010207E0580300206A +:1073C000FFFF00000230000001340000009811436C +:1073D0008142DFD35DE0C07B01075AD5002C41D04C +:1073E00001996618091D89B20991F178B3780902EB +:1073F00019438C4610292AD809996144A94226D8F4 +:1074000071783378090219438A4220D1C00620D509 +:1074100009990AAA072061180292009101907078D8 +:107420003178000208436346002200E00FE008992B +:1074300003F05DFE002802D0FEF793FA65E7F078CE +:10744000B178000208436946098D884201D00B20BB +:107450005BE7F078B178000208430999401880B2E0 +:10746000019007E0C00605D510460899FEF7CCFC50 +:107470000028E3D16946C87BEF2108406946C873FC +:107480000870087C4870488AFF23009A089904F025 +:1074900097F803A803F074FF002803D16846428AD6 +:1074A000BA4298D904210B9806F092FB040000D14F +:1074B000FFDF2288002A0CD00025072001950090CC +:1074C0002B4621460B98FEF748FC0028B6D12580B4 +:1074D0001BE7002019E7F0B500248DB01F461646C3 +:1074E0000D46002A1DD0B90802D007200DB0F0BD0E +:1074F000032F00D1002706F038FB0890FF2807D0A3 +:10750000002D10D028460AF01AFA002809D101E00F +:107510005448EBE73188681E08180AF010FA002872 +:1075200001D01020E2E75049B80701D5488900E0B2 +:107530000120FA0702D04989491E00E04B4903AAFD +:107540008FB2089903F013FF38E06946C97B090739 +:1075500034D509AB07210022029300910192434BDD +:10756000089903F0A3FF002821D1002D21D06A46FD +:10757000928C3188A2182819121D914234D3694681 +:107580004A8A0270120A42708A8C8270120AC27091 +:1075900009A90722001D0092029101906946488ABC +:1075A0008B8C0022089903F081FF002801D0032072 +:1075B0009CE76846808C2018001D84B203A803F065 +:1075C000DFFE002804D0822806D0FEF7CAF98DE736 +:1075D0006846408AB842B8D9002C07D0002D10D098 +:1075E0003188A01C814203D20C207FE705207DE773 +:1075F000224629461D4804F0BDF829190870000AE2 +:107600004870A41C3480002070E710B504460AF0CE +:1076100080F9002801D0102010BD13484089208037 +:10762000002010BD70B50C4605460E21204612F014 +:10763000F3FF00202080002D05D0012D01D0FFDFB9 +:10764000A1E4062000E00520A0719CE410B50C46E2 +:1076500003F060FE002800D0FFDF2046FEF781F92E +:1076600010BD00000230000058030020FFFF0000A2 +:1076700010B50446007894B0022804D0012802D046 +:10768000FD4814B010BDA078002806D0032804D807 +:107690006078002801D0032801D90720F1E73F20B6 +:1076A000694608702078022801D0012000E00020FF +:1076B0008870607800F090FD6946C01DC870A078A1 +:1076C000012800D1022000F087FD6946087160782A +:1076D00000F082FD69464871A07800F07DFD6946A2 +:1076E00088712078012802D1C878401CC87009A987 +:1076F000684603F0C9FF002800D0FFDF0020C0E784 +:10770000FFB5DE4906468DB015468868C96803AAEC +:1077100043C2687A297A4018C7B2002E0ED00024DE +:10772000F01DC008C000B04200D0FFDF28880599D6 +:10773000401C80B20090002C02D007E00124EFE74B +:10774000C0B207F0AFFE002800D0FFDF0098059917 +:10775000000108182969C01C0191810889003A4676 +:107760000591002C08D100200870019880B203F028 +:107770008BFC002800D0FFDF0599019823460818EC +:107780000590A87A297A3A464018C1B205A800F0B7 +:1077900069FD0598C01C800880000590697A0091F9 +:1077A0002B7AAA7A002C00D0002001A906F0EAF872 +:1077B000002800D0FFDF694689880598169B40188D +:1077C000C01C8008BC468000109F179A189900932F +:1077D000019202910590002C00D000203B466246A9 +:1077E00007A906F05BFA002800D0FFDF6946898B05 +:1077F00005984018C01DC008C000821B0E99059056 +:107800000A60002C3ED101210907C96AC943090653 +:10781000090E03D19A490968491C03D09949401AB5 +:107820009949C86201232C220BA9984806F028F830 +:1078300000F0DCFC00211E22084601F0F3FEFAF7FE +:10784000CDFC00F02BFFFEF7A5FD03AB00220521C8 +:107850008FA0FBF789F9002800D0FFDF28460C3005 +:10786000FFF7D2F8002800D0FFDFFF2189008A4807 +:1078700012F0D4FE854801211C3841760221817620 +:107880000621C17611B0F0BD10B5834CA07809284F +:1078900000D3FFDF207870214843001900210171D7 +:1078A0004179F722C908C900C91C1140EF221140D3 +:1078B00041710121E170001D10BDF7B5054600784A +:1078C000002700090C463E46052800D0FFDF287E31 +:1078D00000280AD0012810D0FFDF0298002C068073 +:1078E00001D0278066800020FEBD02270926002CDB +:1078F00010D0A88BA080A87F0AE003271426002CB4 +:1079000008D06888A080286AE060A88C2082287F40 +:107910002072E2E702980680E5E70620704770B51E +:107920005D4CE07800281BD0207870214843001976 +:10793000407900254007400F01191F204001091818 +:10794000087E401E08762078401CC0B220700928AE +:1079500000D12570A078401CA07009F0ADFBE57047 +:1079600070BD4A481C38C07E002800D08CE77047A4 +:10797000F0B5464D00269BB07C3D686F00280BD0CB +:10798000FFF7EFFF002876D07022696FF9F7FEFB52 +:10799000FFF7C5FF6E67F0E73C481C38407E0028C3 +:1079A00069D0FFF771FF0446384805F098FF606022 +:1079B000002800D1FFDF606803F0AFFE002811D07F +:1079C0002046F9F7BBFF6078010706D5C008C00064 +:1079D000401C6070FFF7A3FFCFE72C48616805F0FB +:1079E00087FFCAE72948616805F082FF01A800F017 +:1079F00072FC002871D168460321808806F0E8F8FF +:107A000002906846808806F040FA074602980028EF +:107A100000D1FFDF02984068002802D00078FF28DC +:107A20005BD0FFF731FF04463846211D05F08CFE80 +:107A3000002800D1FFDF60680C90067068468088DF +:107A40006080204600F017FF384605F0A8FE0028A9 +:107A500000D1FFDF3B21684601738188C18103A803 +:107A600005F0E5FA0DA804F0BCF86078010715D41C +:107A7000C00619D41CE030E00530000054AC010011 +:107A8000001000100000002000050040B407002096 +:107A90006E52463578000000B8030020C008C000D0 +:107AA000801C6070FFF73BFF02990C98486064E708 +:107AB00002984068002807D00178491C0906090E81 +:107AC000017089D1FFDF58E700221146384600F0E7 +:107AD0007FFB002885D1FFDF4FE71BB0F0BD10B55D +:107AE000FE4C0422A06020460C3012F038FDFC4809 +:107AF00001F02CFD607010BDF8490020087070473F +:107B000070B5F84E0546706A94B00C46401C04D11E +:107B1000B06AC0430004000C0BD0306AC007C00F2D +:107B20002870706A12F08DFDB06A2071000A6071D1 +:107B300010E02B206946087009A9684603F0A4FDEF +:107B4000002800D0FFDF0120287006220AA9204665 +:107B500012F005FD2878002803D06079C021084381 +:107B6000607114B070BDF0B5DE4C0646206895B06B +:107B70000D4637460837401C08D16068401C05D1C7 +:107B8000A068401C02D1E068401C11D0206831463A +:107B900012F057FD6068311D12F053FDA0683946A0 +:107BA00012F04FFDE06831460C3112F04AFD1DE045 +:107BB0002B206946087009A9684603F065FD002876 +:107BC00000D0FFDF08220AA9304612F0C8FC2B20A3 +:107BD0006946087009A9684603F056FD002800D0E0 +:107BE000FFDF08220AA9384612F0B9FC20692E46A8 +:107BF0000836401C08D16069401C05D1A069401CB2 +:107C000002D1E069401C12D02069294612F019FD0A +:107C10006069291D12F015FDA069314612F011FDB1 +:107C2000E06929460C3112F00CFD15B0F0BD2B2493 +:107C30006846047009A903F027FD002800D0FFDF83 +:107C4000082209AF28460AA912F089FC6846047088 +:107C500009A903F019FD002800D0FFDF0822391D13 +:107C6000304612F07CFCE0E730B59F4C0546606F73 +:107C7000002800D0FFDF656730BD3EB50546032113 +:107C800005F0A6FF0446284606F0FFF80546002C3E +:107C900000D1FFDF6068002803D00078FF2800D102 +:107CA000FFDF01AA6946284600F092FA00280ED1AB +:107CB000FFDF0CE0002202A9284600F089FA002824 +:107CC00000D1FFDF6846007A002800D0FFDF6A4657 +:107CD0001078411E1170EDD260680199884201D17F +:107CE00000206060804C6034A07E022800D3FFDF5B +:107CF000A07E401CC0B2A076012803D1774840780E +:107D000001F045FC3EBD70B50446784816460D4668 +:107D1000814200D1FFDF012E01D0FFDF70BD552071 +:107D2000207000202076A5830120A07770BD70B55B +:107D300015460C460646FFF714FE00280CD05521C8 +:107D4000017046800121017621680162A188818449 +:107D50000577FFF7E4FD70BD13213046FAF7F0FC1C +:107D600070BD70B505460C46084609F0D2FD0028E6 +:107D700001D0102070BD2846F9F72DFB002805D052 +:107D8000284600F0C7FE2070002070BD584870BD26 +:107D9000F3B5044687B000200690504801780029CA +:107DA00002D0082009B0F0BD4C485249416020463D +:107DB00009F0AFFD002867D1089809F0AAFD002856 +:107DC00062D1677A237AF818FF2870D82088FE28B5 +:107DD0006DD8002800D10A2020802169002901D116 +:107DE0000B21C90121616268002A15D0557890786D +:107DF0006E00AD1928181578062675432818557990 +:107E00006E00AE191579B4466E00AD19D27806260B +:107E100065447243551905E07800062238185A4324 +:107E200010180546FA00D21B1018DA00D21A1018E2 +:107E3000181886B21B207043059028461B22504319 +:107E40000290D82901D20920ACE7A07AB8422ED8F6 +:107E5000082F0DD8012B0BD807F081FC074609F03D +:107E6000CCF83A1A207A617A521E43189A4201DA03 +:107E7000122097E7676801910090002F19D03846CB +:107E800009F068FD002801D010208BE7B8787978D8 +:107E9000401839784218009901984018904206D14C +:107EA00079793A798918FA788918884201D00720B7 +:107EB00078E70298019687B200970598029583B2F9 +:107EC000224603A90020FFF71BFC0448089A0399E7 +:107ED000406812680918914212D90DE0180000207C +:107EE000717900008000001038070020FFFF0000BB +:107EF000023000008812002008980160042051E739 +:107F00000097059922468BB20196029504A9FA4C76 +:107F1000FFF7F6FB04990398884200D0FFDF04982E +:107F2000616840186060089908600120F34920707A +:107F30000870069836E7F8B507460E46084609F079 +:107F4000E8FC002809D1384609F0F9FC002804D1E2 +:107F5000F81C80088000B84201D01020F8BDE84825 +:107F60008178002911D031880091417870225143E5 +:107F70000C182079241D0007000F334600222146EB +:107F800000F0F6F9050004D015E00020308005204F +:107F9000F8BD002F13D031880098814201D90C25FB +:107FA0000DE0207833460007000F3A46214600F0E6 +:107FB000DFF9050005D00C2D01D0002030802846C7 +:107FC000F8BDCF484178491CC9B24170092901D197 +:107FD000002141708178CB4E491E81706078410745 +:107FE000490F01290BD0022903D0032917D0FFDF45 +:107FF000E5E7C006E3D46088FFF73FFEDFE7C1484E +:1080000061681C3005F074FC707E401CC0B2707654 +:108010000128D4D1B848407801F0B9FACFE7F07E12 +:10802000401CF076CBE770B50D46044609F054FCD1 +:10803000002804D1284609F06CFC002801D010204B +:1080400070BD2946204607F066FA70BD70B504463B +:1080500015460E46084609F03FFC002804D1284684 +:1080600009F057FC002801D0102070BD022C03D06D +:10807000102C01D0092070BD2A463146204607F059 +:108080006EFA0028F7D0052070BD70B514460D4675 +:10809000064609F021FC002809D1284609F039FCE0 +:1080A000002804D1204609F04AFC002801D0102005 +:1080B00070BD22462946304607F077FA0028F7D0EF +:1080C000072070BD10B594B0044609F022FC0028CA +:1080D00002D0102014B010BD0F2008A90873694603 +:1080E0000BA803F0D1FA0028F4D16846007A20707A +:1080F00068464089608068468089A0800020E9E762 +:1081000070B505460C46084609F019FC002806D152 +:10811000002C09D0206809F0FCFB002801D01020B9 +:1081200070BDA088002804D021462846FEF784F9B7 +:1081300070BD092070BD70B504460D46084609F0B3 +:10814000CBFB002807D1601E1E2815D8284609F051 +:10815000C3FB002801D0102070BD022C01D90720DC +:1081600070BD002C00D1FFDF6749A00040188038A7 +:10817000C16F2846884770BD204620381F28EED89A +:1081800029462046F9F776FF70BD70B504460D46C6 +:10819000084609F0BEFB002807D1601E1E280ED835 +:1081A000284609F099FB002801D0102070BD012C51 +:1081B00001D0022C01D1062070BD072070BD2046E1 +:1081C00020381F28F9D829462046F9F7BEFF70BD90 +:1081D00010B505F02CF910BD032803D0022803D0F8 +:1081E00001207047062070470320704710B594B0F7 +:1081F000FAF7EAFE40484178806803F020FC3E48E8 +:1082000001240C300178012915D1302269460A7009 +:10821000C0788870002802D0012802D003E08C705A +:1082200001E000208870084604F001FF002802D019 +:1082300009A803F0D6FC022008A9087148718871CA +:1082400009A8FFF715FA002800D0FFDF08A804717D +:1082500003214171817109A8FFF70AFA002800D0B3 +:10826000FFDF37E7F8B506460220002A02D05000AB +:108270004018401DC7B23068C01C820892003260AE +:10828000002B23D11E483B460A21283809F028FA42 +:10829000002408E0230012F023FC0A0608060A0A5C +:1082A0000C0C06060611194804E0194802E01948AA +:1082B00000E0194809F032FA054600E0FFDFA54268 +:1082C00000D0FFDF641CE4B20A2CE3D3306839012C +:1082D00040183060F8BDF1B594B03A2008A9087391 +:1082E00069460BA803F0D0F9002800D0FFDF0B4E41 +:1082F00000246D4636E00000180000200800002031 +:10830000B80300209807002054AC0100E51E0000CF +:1083100011870000B52F000059F200000430000062 +:108320002F19B87DC10706D0400704D4600040195A +:10833000C08800F0E0FB1948807E002810D0B87D8E +:1083400080070DD560004019C08800F04EFA002863 +:1083500006D060004019C18814980026018005E00D +:10836000641CE4B268460079A042D9D830465CE487 +:10837000F8B5044600201880601E1D4616460F46BC +:10838000052800D3FFDF0649A00040188038C36FDE +:108390002A46314638469847F8BD00009807002025 +:1083A00064AC0100FFB581B015460646032105F017 +:1083B0000FFC0446304605F07CFD0C35AFB20025BD +:1083C0002E460090002C00D1FFDF0098002800D13D +:1083D000FFDF0298800000190189B94200D301250E +:1083E000218CB94202D20299062900D301260499B0 +:1083F000A94304D0817A0222114381720AE00499D0 +:10840000B14307D0827A04210A4382722034A078D3 +:108410000843A0702846304005B0F0BDFFB581B0DC +:108420000A9D174628460C3080B20E4600900B9CE1 +:1084300000232A4639460198FFF7B4FF002803D0ED +:10844000B078C00906D01EE0072F01D01120E3E765 +:10845000FE48E1E7241F2570280A60700498A07088 +:10846000000AE070019805F024FD040000D1FFDF50 +:108470002D1D2046A9B204F0C9FE002800D1FFDF5F +:10848000019803F04EFAB800801902890099511A38 +:108490000181062F03D2318C0098081A3084002005 +:1084A000BAE7FFB585B01E460F460F9D109C05F03C +:1084B00000FD002833D0079A6946121D92B204F0DD +:1084C0003CFE00282ED000980770684600890428DA +:1084D00000D2FFDF0321019812F09EF8002211461E +:1084E000019803F0D8FA002E03D068460089001FD7 +:1084F00030800E98002803D001980E99C01D0860A6 +:10850000002D02D06846008A2880002C04D02888DC +:10851000002800D003982060002009B0F0BDCB48AF +:10852000801EFAE7072F01D01120F6E7C748F4E7CD +:10853000F0B50F46054687B016465088032105F072 +:1085400047FB040000D1FFDF002069460873A078D4 +:10855000400600D1FFDF042F5ED32978C807C0177B +:10856000401C06D162786B789A4255D12278120766 +:1085700052D0142947DA012943D0122902D01329F5 +:1085800041D129E00C2F3ED1A1784906490E01299D +:1085900039D02078012100090001401C2070687842 +:1085A00060706846017368792A7901021143684650 +:1085B000C181E879AA790102114368460182687A8B +:1085C0002A7A0102114368464182E87AAA7A0102B6 +:1085D0001143684681821AE0062F14D120780009E1 +:1085E000000120707188012009F037F902216846E6 +:1085F0000173C91EC18168792A7901021143684655 +:108600001FE0062F0AD06946097B00291BD070881D +:10861000324603A9F9F7D8FC07B0F0BD207800096D +:10862000000120707188012009F017F902216846C5 +:10863000017368792A79010211436846C1810021DA +:10864000C9430182E3E70028E6D076882746002464 +:1086500006A8009001942346062204210294304685 +:10866000FFF71FFF002800D0FFDF069801210170EF +:1086700069784170022181700021C1700471210A62 +:1086800041710621009101900523042239463046AC +:10869000FFF7C4FE0028BFD0FFDFBDE700206C4914 +:1086A00002464300401CCA520828FAD3704770B5EE +:1086B0000C460021A17021780909090121700121CE +:1086C00061700021616005F0F4FB050000D1FFDF5F +:1086D000284604F030FDF5382085204600F027FBC1 +:1086E00070BD70B50D46032105F072FA040000D18B +:1086F000FFDFA0786906C009C001490E0843A070D9 +:1087000070BD704710B50146012009F0A6F810BDF4 +:108710003EB58DB20321284605F05AFA040000D177 +:10872000FFDF2078694600090001207002200870F0 +:1087300048484880888000222846F9F745FC3EBD1D +:10874000F7B50546002082B00746019028780C4610 +:108750000009012800D0FFDF287E032809D0FFDFB1 +:108760000498002C078002D00198208067800020A8 +:1087700052E6AE8B7020019030460A3087B2002C52 +:1087800019D06888A080688B2081E680A889001FA6 +:1087900080B200900246A96820460A30C91D11F037 +:1087A000DEFE00988642DBD9321A20180A30296989 +:1087B00011F0D5FED4E704980780D8E7FFB583B061 +:1087C0000F461C46164603210C9D039805F000FA3F +:1087D000010007D033463A46019500940398FFF70D +:1087E0001DFE19E71948801E16E770B505461948A1 +:1087F00086B0854214D0284605F047FB040000D11E +:10880000FFDF2046694604F09FFF002800D1FFDF0C +:10881000019CA079617900020843E41C052802D07C +:10882000012006B070BD2E460321284605F0D0F980 +:10883000050000D1FFDF2079122811D1607821785E +:10884000000208430C280BD1A87805E00430000092 +:10885000E4070020FFFF00004006400E022806D07B +:108860000023062204213046FFF79CFDD9E70023B0 +:1088700006220521F7E7F8B5024680680179C3783A +:1088800009021943837944791D0225439489938A07 +:10889000C01CE418241F8C4218D1042D17D0052DBC +:1088A00022D0062D17D0402D10D30E461446284650 +:1088B00000F0DEF9082809D011202070032020766E +:1088C0006583A6836078082108436070F8BD001DA9 +:1088D00000F0DAF9F8BD0093548813690A46011DC7 +:1088E0002046FBF7EAF8F8BD001DFFF721FEF8BDB2 +:1088F0007FB50D460646032105F06AF9040048D00D +:1089000020780007000F012845D0002003A901901E +:108910000346009102900C2205213046FFF7C1FD6D +:10892000002834D103981221017061780523891C35 +:108930004170082181700021C17029880171090AE4 +:10894000417169888171090AC171A9880172090A96 +:108950004172E9888172090AC1720C21009101906B +:108960001A4621463046FFF759FD002800D0FFDFA8 +:10897000F02300223146012008F0E0FE20780009B3 +:108980000001401C20706078801C6070002004B0E2 +:1089900070BDF048FBE71120F9E77FB50D460646AC +:1089A000032105F015F9040006D020780007000F18 +:1089B000012803D00820EAE7E648E8E7002003A9F9 +:1089C0000190034600910290062205213046FFF7F0 +:1089D00068FD0028DBD10398132101706178417094 +:1089E000022181700021C1700571290A417106219F +:1089F0000523009101901A4621463046FFF70EFDEF +:108A0000002800D0FFDF207800090001207000203E +:108A1000BDE7F3B585B00F460321059805F0D8F8FA +:108A20000446059805F045FA019000200090002CBE +:108A300000D1FFDF0198002853D1FFDF51E002A9E8 +:108A40000022019804F0F3FC03906846057A082D93 +:108A500000D3FFDFA80006190398318908300918F0 +:108A60003181062D02D2218C08182084072D03D1D4 +:108A70000098401CC0B20090B07AC0070DD02946C3 +:108A8000204600F0DDF8002807D1B07A4008400009 +:108A9000B0720598032D2BD0FFDFB07A810706D581 +:108AA000FD210840B0722946059800F0D9F8062D3E +:108AB00017D8214620318878420712D5FB2630404E +:108AC00088700025A8000119887A420705D5304032 +:108AD00088722946059800F0C3F86D1CEDB2062D8A +:108AE000F0D338467F1EFFB20028A8D1009893E546 +:108AF000FBF781F8D1E710B5032105F069F8040010 +:108B000000D1FFDF204600F012F9A0788021084351 +:108B1000A07010BD10B5032105F05AF8040000D173 +:108B2000FFDF208D232111F094FDC0B210BD70B580 +:108B30000D46032105F04CF8040000D1FFDF062D9F +:108B400000D9FFDF2946204600F07AF8002805D03A +:108B5000A90009198A7A01231A438A7270BD10B5D7 +:108B60000446402801D2072010BD00F081F80828F3 +:108B700002D03120000210BD0021774802E0491CDC +:108B8000082903D24A00825A002AF8D1082903D0C2 +:108B900049004452002010BD042010BD10B54028EB +:108BA00001D2072010BD00F063F8082805D000218D +:108BB000694A40001152084610BD052010BD70B52D +:108BC00088B015460C00064607D0002D05D06088F9 +:108BD000402804D2072008B070BD1020FBE7218890 +:108BE000002929D000F044F8082827D003AA06A9B4 +:108BF00005A86B4607C3228804AB07213046FFF760 +:108C000050FC0028E7D16846028A2946059811F0F1 +:108C1000A6FC68462188008A814204D90A1A2918CC +:108C2000039811F09CFC0598009023886288072126 +:108C30003046FFF7C3FDCEE70C20CCE70520CAE79E +:108C4000072903D0454B4A009A5A00E0028D89005B +:108C500008180089904201D2012070470020704717 +:108C600010B5032901D0FFDF10BDFAF785FF10BD55 +:108C700001460020384A02E0401C082803D2430085 +:108C8000D35A8B42F8D17047F7B50F4688B01446D7 +:108C900038460899FCF7EDFCC0B208283ED1002503 +:108CA0006846858203956088032104F091FF0600E1 +:108CB00000D1FFDF00213046FFF7C2FF00280ED1B0 +:108CC00017226846828203A801950295009000232E +:108CD00060881946FFF7E5FB002800D0FFDF00940D +:108CE00005AA3846039B0899FDF712FCC0B20300A1 +:108CF00011F0F6FE05041B1416141B006846808A4A +:108D000000280BD003990191009060880423002271 +:108D10003146FFF783FB002800D0FFDF0BB0F0BD2A +:108D20006078102108436070F8E7FFDFF6E710B5C0 +:108D300004462021083011F071FC084800214A0047 +:108D40008B001B19825A491C1A810629F7D9208DDC +:108D5000A08410BD02300000E40700207CAC0100BC +:108D600030B40121B848C9020160CD1005604A0342 +:108D70000260B64803681C02240A002304600468E9 +:108D8000240A24020460B2480468240A240204600D +:108D9000B048012444608460AF4C23606360A360EA +:108DA000AE4B19601D601A60AD4B19601A6001214D +:108DB000016030BC704710B40121A348CA020260B0 +:108DC0000B0203600C060460A24841608160A54864 +:108DD00041680029FCD1A0490020086048608860F3 +:108DE0009E4802600360046010BC704701219B48EC +:108DF000C9020160C91001607047002805D0012830 +:108E000005D0022805D1984870479848704798487F +:108E1000704700B5FFDF002000BD30B50021954C44 +:108E2000954D964A8C4B002805D001281AD002286F +:108E30001FD0FFDF30BD01200004A060A8601160DA +:108E400019608F4BC2039A608E4A90607E4A00126E +:108E500010608D480160854801608C4801608C4835 +:108E6000017030BD01204004A060A86051605960CD +:108E700030BD01208004A060A8609160996030BD81 +:108E8000F0B594467B4A834F7B4D00240126002891 +:108E900005D001282ED002283CD0FFDFF0BD891E6E +:108EA0000902090A0120000490603C6468606D4A70 +:108EB0001164012B1CD00021754B774A5970614613 +:108EC0001661764A546002249460042414616E4A48 +:108ED0003D3111606D490E60604A89151160694A23 +:108EE00050605F4801606649C00548601E70F0BD73 +:108EF0000121E1E701206A4E40046A4F012B04D1B1 +:108F00003464506068603964F0BD906034646860B7 +:108F10003964F0BD0120644E8004644F012BF4D10C +:108F2000EEE750484068704770B54B4D2868002602 +:108F3000504C012806D1A068C00303D501200004CD +:108F4000A0602E606868012809D1A068800306D55A +:108F500001204004A0606E60012007F0A6FAA86816 +:108F6000012809D1A068400306D501208004A06033 +:108F7000AE60022007F099FA70BD10B54449087838 +:108F8000002818D001203E4AC00790603D4AC00B1F +:108F900090602D4A001210603B4A00201060334A56 +:108FA00010603A4A106008704A78002A02D048706F +:108FB00007F07BFA10BD0320FAE701203C490006C8 +:108FC00008607047012025490006086070470120AD +:108FD0003749400508607047012020494005086076 +:108FE00070472D49012008611C4900020860704744 +:108FF000410A304AC005C00D5043FF300130514393 +:10900000400A0818704710B42B4C430B63431B0CE9 +:109010005C020C60274C6343C31A28485C02584327 +:10902000244B400D4343E31A0124DB03E4051B19E1 +:109030001B1613700A681018086010BC704710B532 +:1090400007F0F8FA10BD000080E100E008E400E05D +:1090500018E400E000B0004040B1004080E200E0D1 +:1090600000E100E000B5004048B100404081004010 +:1090700044B1004000B3004040B3004040B5004060 +:1090800000F5014000830040408500400082004020 +:109090002800002000B10040008000400085004012 +:1090A00004B1004004B5004008B1004008B50040DC +:1090B00000E200E0093D0000378600006F0C01006F +:1090C00010B5EFF31080C407E40F72B6D8484178AA +:1090D000491C41704078012801D108F00BF8002CA0 +:1090E00000D162B610BD70B5D14CE07800280AD12D +:1090F0000125E570FFF7E4FF08F004F8002804D02C +:10910000002007F0DEFF002070BDCA486571456091 +:10911000F9E770B5EFF31080C507ED0F72B6C44CD8 +:109120006078002800D1FFDF6078401E60706078B2 +:10913000002801D107F0E2FF002D00D162B670BD1A +:1091400010B5BB48C178002904D000214171C1701D +:10915000FFF7DFFF002010BD10B5044607F0D2FF77 +:10916000B349C978084000D001202060002010BD1C +:10917000F8B5054641788278AD4800248171C27106 +:10918000047228782646002804D0012810D002282E +:1091900010D0FFDF07F0C2FF002813D007F0C4FF94 +:1091A000A0420FD1204607F0C2FF0028FAD035E0D8 +:1091B0000124EFE7FFF784FF07F0A4FF0028FBD0AE +:1091C0000224E7E701208107C8609B4F7E609B4A2D +:1091D0009461984B02225A60886099480169C9439A +:1091E000C906C917491C0091016910221143016188 +:1091F00000E020BF78680028FBD0204607F097FFEA +:109200000028FAD00098002804D18D480269102166 +:109210008A4302618749022088607E60844FF87922 +:1092200000280FD0287800280CD107F06BFF0546E6 +:1092300008F038F98349002D02D0F960386101E067 +:109240003961F860002C01D03E71F8BD0120387101 +:1092500000F0CFF8F8BD10B5040000D1FFDF00200A +:109260007449C0438860744A002111605160D16024 +:10927000116107F04DFF002805D06D490120C8702D +:109280004878401C48702046FFF772FF10BDF8B5C3 +:109290000125AF077D61664CE07900281FD00128C9 +:1092A00003D0217A401E814219DA07F02BFF0646CF +:1092B00008F0F8F8E179012902D9217A491C2172D4 +:1092C000002E01D0216900E0E168411A022901DA8B +:1092D0008A1C10DC002E01D0206100E0E060FFF766 +:1092E000EFFE07F00FFF002802D03D61A57000E0FF +:1092F000257000202072F8BDFEB54F4CA0680028F4 +:1093000001D0012600E000262068002801D00125B8 +:1093100000E000256068002801D0012700E0002758 +:10932000E068002800D0012001902069002801D0C9 +:10933000012100E00021009131462943384688434D +:10934000019988430099884300D0FFDF304600260A +:10935000002803D0A660012007F0B3FE2800344D9A +:1093600012D026606879002803D06E71002007F0C3 +:10937000A8FE2878002807D007F0C4FE002803D0F4 +:109380000120A87081070861002F00D06660019855 +:10939000002808D0E660A878002800D1FFDFAE7072 +:1093A0002E70FFF7B6FE0098002805D026612879B8 +:1093B000002801D0FFF76BFFFEBD10B51C4CE07814 +:1093C000002801D107F09AFE012081078861A0786A +:1093D000002809D0184CE068002803D107F0A7FE48 +:1093E0000028F8D10020E06000201249C0438860C6 +:1093F00010BDF8B50F48192787600124A507AC6197 +:109400000D4900200860C860086107F07BFE084E27 +:10941000002802D0B4702C6100E03470FFF750FED9 +:109420000649B0798863034847606C61F8BD000065 +:109430002C00002000030040000100400005004017 +:1094400000ED00E0FFFFFF7F8107C90E002808DA6A +:109450000007000F083880082B4A80008018C06978 +:1094600004E08008294A800080180068C84000068F +:10947000800F704710B50D20FFF7E6FFC4B204203F +:10948000C043FFF7E1FFC0B2844200D0FFDF2049B4 +:109490000120486010BD01211E4A480310601E4B88 +:1094A00000221A601D4A51601D4A10601D4A116059 +:1094B00018498039086070470121164A4803106036 +:1094C000184A5160144A002111601549086070471C +:1094D00010B511490868012801D0FFDF10BD0C4804 +:1094E00080680022C0B20A6007F026FF10BD10B5E8 +:1094F000094801680029FCD0FFF7EAFF012008496C +:109500004003086010BD000000ED00E000E400E052 +:1095100000D5004080E100E000D1004000D30040D1 +:1095200080E200E000D00040012039494006086098 +:109530003849086038490A68FF231B029A4383129E +:109540001A430A60324980390860704700B5024604 +:109550000420324904E0C3005B181B79002B07D0BC +:109560000346401EC0B2002BF5D1FFDFFF2000BD37 +:10957000C300CA50002259184A718A7101220A7127 +:1095800000BD264A0021C00080180171704710B547 +:109590000446042800D3FFDF2048E1000C1820799E +:1095A000012800D0FFDF6079A179401CC0B2814260 +:1095B00000D060710120164940068031086010BD5E +:1095C00070B5154804250068144E0004800F144C33 +:1095D000022817D0FFDF15E02078C1008819027932 +:1095E000012A07D1427983799A4203D04279827164 +:1095F000705880472078401CC0B22070042801D3E6 +:109600000020207028466D1EEDB20028E4D170BD08 +:1096100080E100E080E200E018E400E0F4070020D0 +:109620004000002010B5FE4B586019721A80C90026 +:1096300010F0F4FF10BD00210180704710B500222A +:10964000D2430280032008F008F910BD7047F0B53E +:109650000E460446017801208840F24999B008403E +:109660000090616815460888EF4A904206D0009A3B +:10967000002A06D0EB4A521E104202D0012019B037 +:10968000F0BD009A10430880002D12D000202870F1 +:109690002178EA1C0027681C01920B0011F020FAC7 +:1096A00010F30E16233A59616F3CB4B08AB8F2F148 +:1096B000F0F320780B28EBD00420E0E7022129709A +:1096C000A1890170090A4170032097E004212970E3 +:1096D000A1890170090A41700198E1890170090AA4 +:1096E000417005208AE006212970A1890170090ACC +:1096F00041700199E2890A70120A4A70218A017147 +:10970000090A4171A28AE81DA16910F028FFA08A08 +:10971000C01D73E0082129702178082901D110218A +:109720002970A1890170090A41700198E1890170CD +:10973000090A41700520308020466A1D02A91030B8 +:1097400005F033FF00287DD169463088097A40183A +:1097500054E00A212970A1890170090A417003208F +:109760000BE00C212970A1890170090A4170019850 +:10977000E1890170090A4170052030809CE0A089D0 +:1097800084464000401C81B2308888425AD3052963 +:1097900058D30E202870002008E0236942009B5A0D +:1097A000521953701B0A401C937080B26045F4D369 +:1097B0003180B9E09A48417A002973D0491E41723C +:1097C000217B4068C9004518A988286808224018EC +:1097D0000838216910F0C3FE02216846017100219A +:1097E000417128680390A98868460181002101A879 +:1097F000FBF78AFD0020A880002E00D0308093E087 +:109800002978802211432970297840221143297038 +:1098100029788909890112312970A1890170090A01 +:109820004170E289E81C216910F099FEE089C01CB2 +:109830003080287841063FD5C00975D0012168469F +:10984000017200E02CE0002141723188091D818104 +:109850000495E189019808180590001D069070484C +:10986000017A68460177002102A8FBF74DFD074603 +:1098700030880C303080022F06D0002F54D065E0A5 +:109880003DE033E01CE05EE065486946097F4268E0 +:10989000CB00D218037A994202D29188002902D0D3 +:1098A000042753E02FE0417A491C4172156030884B +:1098B00090800020308049E06168A089888033E092 +:1098C00029788909890116312970A1890170090A4D +:1098D00041700198E1890170090A4170228A681D6E +:1098E000616910F03CFE208A401D46E72878800917 +:1098F000800118302870207B687002207EE7606845 +:109900000188090401D4052720E0C088A189884284 +:1099100001D006271AE01E202870012030806068E0 +:1099200001884904490C0180009800280ED03C4869 +:1099300000220088A1688300032007F0FFFE616811 +:109940002078887007E00020308003276068009945 +:1099500002888A430280384691E6FFB59BB0249D79 +:109960000E46002805D0172803D82A882E4B9A4285 +:1099700002D107201FB0F0BD3278530601D4D209BE +:1099800001D00820F6E700226B461A705A70144680 +:10999000327802AB1793431E19939BB21693970626 +:1099A000CB1CBF0E1893821E711C3B0011F098F85F +:1099B000209011F066F074F0B4F0D6F0EFF0EEF015 +:1099C000EDF0ECF0EBF0F0F0EAF0E9F0E8F0E7F0C1 +:1099D00090F005287CD1042168460170A9780171B6 +:1099E000F078B278010211436846C1803179417044 +:1099F00070788006800E0C282ED009DC801E0300B3 +:109A000011F06EF80919661C662166246627660047 +:109A100012282AD00ADC0E2821D01028DAD121E021 +:109A200014080020FF710000FFFF000016281FD05F +:109A30001828CFD11FE02878800701E02878400758 +:109A4000002845DA4FE128780007F9E72878C006B2 +:109A5000F6E728788006F3E728784006F0E72878CC +:109A60000006EDE72888C005EAE72888C004E7E794 +:109A700028888004E4E728884004E1E72A789207F0 +:109A800026D50328A6D105206A46107048780978A3 +:109A900000020843908026E129784907F0D506287E +:109AA00016D3707891B2012802D0022892D101E039 +:109AB000022700E010270622684602707278827141 +:109AC00000228280179AB01C1692BA1C18921EE0CF +:109AD000BDE042780378801C17901202891E169808 +:109AE0001A431991028016983A46801C179910F073 +:109AF00036FD169A1798D219921C19996B46169230 +:109B00009A88C019C91B521C9A80189A89B28A4235 +:109B1000DFD900298DD1E6E028780007B0D5199863 +:109B20006A4681B20720107000209080701C921D40 +:109B300011E0437807781B023B431380C378877892 +:109B40001B023B4353806F46BB88091F5B1C001DF3 +:109B500089B2BB80121D0429EBD2DAE72978C90645 +:109B600075D5022873D30821684601700021C18091 +:109B7000717801718C4692B2B01C179919E091E08E +:109B800098E086E06FE063E038E02DE021E015E04A +:109B9000C4E0437807781B023B430B80831C4B6077 +:109BA0006346D21A6F46FB8860445B1C92B2FB800E +:109BB00008319445EDD9002A49D194E028788006EF +:109BC00045D5092268460270AA888280169AC2800A +:109BD00012E0287840063AD50A206A461070A88814 +:109BE00090801698D08007E0287800062FD50B20AB +:109BF0006A46107016989080029174E02988C90511 +:109C000025D5022823D30C20694608700020C8807F +:109C100070780871844692B2B01C179914E04378AA +:109C200007781B023B430B80C37887781B023B43BA +:109C30004B80031D4B606346D21A6F46FB8860441D +:109C40005B1C92B2FB8008319445E8D9B3E763E02E +:109C50002988C90460D501285ED10D2168460170AC +:109C6000A98881803FE02988890455D5052853D3E8 +:109C70000E2269460A70AA888A801899401F4A787D +:109C8000097812020A436946CA800881701D039050 +:109C900029E0298849043FD501283DD10F20694694 +:109CA000087020E02A88120436D44A780B78120211 +:109CB0001A43EA8003282FD332789206920E1B2A89 +:109CC00026D011226B461A702A880123DB031A431F +:109CD0002A804A780B78110219436A469180C01E87 +:109CE000D0801898029030788006800E1B2809D00A +:109CF0001D2807D003201E9907F0AFFD2888C00B50 +:109D0000C003288068461D99FBF7FEFA204631E61D +:109D100010226B461A70DCE70724F7E70824F5E702 +:109D200000B597B0032806D16A4610700191002152 +:109D30006846FBF7E9FA17B000BD0000FFB593B025 +:109D4000044600201D9E049015981C9D102708288D +:109D500006D0E06901F0B0F8002809D03770CCE0F7 +:109D600028880921384328801F980227017016E0AF +:109D7000E169012088710521E269C9029180E169E8 +:109D80008872E169F8480881E169002088732888B1 +:109D900020210843288011211F98042701701F9853 +:109DA0000225801C0390307810900A2030702046E5 +:109DB0001830119001F006FB00206FE01598102874 +:109DC00009D1022D07D06846828A04990398401A67 +:109DD0008270110AC1706846C08A1699884203D9F8 +:109DE000E249097A149106E0884204D110990029C9 +:109DF00001D0317021E003990870000A48701E9864 +:109E00000088401BC01B83B2FF20C01B984200D2B9 +:109E100003460398149AC0190CA90092019002916C +:109E20002020015D6846C08A002201F03FFB3070AF +:109E3000002806D0C0B2832862D06846C08A20833A +:109E400045E00F98002805D0C848006800790A2826 +:109E500030D33CE06846008EC119C9B20491022D8E +:109E60000FD01F99049A4978914203D16A46128C07 +:109E7000824209D0BD48049100680178032909D0C5 +:109E800027E008461F994870B848006801780429FF +:109E900006D008E000790A281BD201200F9009E0C3 +:109EA0006946C98A81800399049808180390049828 +:109EB000281885B205AA1499119801F086FA00288D +:109EC00005D11E980088401BB84200DB76E7022DC2 +:109ED0000ED01598102807D1049A03996846808AF5 +:109EE000891A8870000AC8701E980580002030709A +:109EF0009E4800680078032802D0002017B0F0BD0B +:109F00000220FBE7F8B50546406B00271346002802 +:109F100036D0491F8EB2698F954A914208D04218B7 +:109F200054791279240214430919891D8CB200E076 +:109F30000024A1192A8F083191421FD899785A78A4 +:109F40000902001911430170090A41701979DA7880 +:109F5000090211438170090AC1700671310A417109 +:109F60003246591D801D10F0FAFA6C87696B00208B +:109F70000919B61D89190870487002E0092700E028 +:109F800083273846F8BD30B50B88048F9C4212D920 +:109F9000446BE0184478057824022C430BD04479B4 +:109FA000057924022C436404640CA41D1B190B8046 +:109FB0001060002030BD822030BDF7B588B000258C +:109FC0006846058207275DE00398417802780E0213 +:109FD00016434179027908021043000452D40A98CA +:109FE0000123068005A802905B02002200970195DC +:109FF0003046099901F05AFA04004AD16846018AAC +:10A000000183039841790279090211434378027868 +:10A010001C021443B4421ED10A041CD44B04012177 +:10A020005B0C890300950B4301970295C1788078FA +:10A030000A0202432046099901F059F8040011D19F +:10A04000039948790A79000210430122D203104390 +:10A050000871000A487103AA06A90898FFF793FF40 +:10A060000400CED0039900950197029548780978AD +:10A070000002084369468B8A0022099901F037F8EB +:10A08000822C06D103AA04A90898FFF77CFF0400DC +:10A090009AD06846058209E003984179027909025D +:10A0A00011434904490C0171090A417103AA04A929 +:10A0B0000898FFF768FF0028EED0822C02D02046D7 +:10A0C0000BB0F0BD0020FBE730B50446406B002527 +:10A0D00097B000280DD00B2268460270228F0281B3 +:10A0E000606B0391019000216846FBF7B9FE68465A +:10A0F00005700020C04365636087258717B030BDB9 +:10A10000F8B50F460546696B0020069E14460029E7 +:10A110000FD0012B0DD1324639462846FFF74DFFAF +:10A12000002806D1002C04D032463946284600F0DB +:10A13000D2FEF8BDF8B5069E4D1D3788ADB2079C1E +:10A14000AF4201D20620F8BD35801725257060701A +:10A15000000AA070E270100A20710A461946601DBC +:10A1600010F0FDF90020F8BD0128000020080020B3 +:10A17000FFFF000000220280C262831D0263C361F0 +:10A180004263531E4387028720300170704710B529 +:10A190000022D2430280042007F05FFB10BD30B5DF +:10A1A00097B00D460446FFF78FFF208E002809D098 +:10A1B000012069460870E06A019000210295684616 +:10A1C000FBF74EFE0020E062206397E70146098816 +:10A1D00000200A0700D501200A06120F01D0022232 +:10A1E0001043CA0501D5042210438A0501D5102267 +:10A1F0001043490501D5202108437047FFB5A7B09A +:10A200000700309D339C29981E46229016D0007876 +:10A2100041060FD48106890E1E2909D021884A05DE +:10A22000520E0BD13288172A08D3FB4A914205D02F +:10A23000C10906D08006800E122802D004202BB05F +:10A24000F0BDF64928980872002018AA03901072F1 +:10A250006A46107404AA0A60319A4A6020AA908063 +:10A260009081229800781C908106681C0190781FCC +:10A270001D902998890EC21C2492224620321B92DE +:10A28000083A401C02920B0010F02AFC1FFEFE113F +:10A29000FE1FFE8EFEFDFEFCFEFBFEFAFEFDFEF93D +:10A2A000FEFEFEF8FEF7FEFEFEFEFEF6FE00032FAB +:10A2B00076D102E018A9087236E3032028700199CC +:10A2C00017220A7000224A70ECE2052FF0D1417883 +:10A2D000027808021043208320A98880249A5178AC +:10A2E000127809021143618300287DD088427BD80F +:10A2F00000202072E080401E6084029801F062F825 +:10A3000005202870A81C0190022000901BAA289903 +:10A31000029801F05AF8002867D118A8807C01281B +:10A3200003D002206870102002E001206870022033 +:10A330002490002225A91CA805F037F900282BD16C +:10A3400020A8007D2499814226D132880099801C62 +:10A35000511A814220DB10A8C18D01980170090AB1 +:10A36000417001991CA8891C01910099019A891CCE +:10A37000009125A905F019F920A8007D01991BAAD3 +:10A38000091801910099081880B200902899029844 +:10A3900001F01BF80028CCD00098022825D081E2DB +:10A3A00073E018A908727EE2072F6ED34178027815 +:10A3B00009021143218320AA9180249B5A781B789B +:10A3C00012021A43628300290ED091420CD8012157 +:10A3D00021724179027908021043E0800020207345 +:10A3E000E06900F069FD01E098E0A9E000280ED1E5 +:10A3F000E169012088710521E269C9029180E16962 +:10A400008872E16986480881E16900208873F81F35 +:10A4100060842298C01D6062029800F0D3FF07207C +:10A420002870681C009001200190002010A9C885A8 +:10A430002FE00198012814D0E0698079012830D0FC +:10A4400000981E38417F007F090201430098017087 +:10A45000090A41700098801C00900198801C80B20D +:10A46000019010A8C18D00980170090A41700098F0 +:10A47000801C0090019809E025E2A9E135E1D9E0CE +:10A480001FE297E075E034E02FE2ABE0801C80B281 +:10A4900001901BAA2899029800F097FF002803D08A +:10A4A00007E010A8818DD1E731880198081A0428A7 +:10A4B000BFDA0198012843D0E0698079012804D0EF +:10A4C00010A8818D5448814206D110A8818D009832 +:10A4D0000170090A417009E000981E38417F027F2F +:10A4E0000802009910430870000A48700198801C07 +:10A4F000D8E1072F01D0152F74D1417802780802D6 +:10A500001043208320A98880249A51781278090268 +:10A5100011436183002801D0884201D9012040E71E +:10A52000012020720020E0802073052F0AD01D98A2 +:10A530002299E269C0B2491D05F011F8002801D046 +:10A540000A202EE70020C04360841AA8019023A9A6 +:10A550002298029603950091007800238206920EBD +:10A5600020462899FFF7EAFB0390208B20A98880DA +:10A5700099E1032FC0D1402220A98A814178027835 +:10A5800008021043208320A988801EAB289A0293DA +:10A59000009231880022491E8BB21B99097800F085 +:10A5A00085FF18A90872002831D10B20287010A847 +:10A5B000008F3DE0052F9FD1802220A98A8141781C +:10A5C0000278080210432083249984464A78097847 +:10A5D00012020A43628420A988801248824202D370 +:10A5E0000720DEE6ADE03F208002024362841FAB1D +:10A5F0002899029300913088401E83B21B980178FD +:10A60000604600F053FF18A9087200280CD0832878 +:10A61000AED10220DAE00000FFFF00002008002099 +:10A6200001280000010200000D20287010A8808F72 +:10A63000401C37E11C990C22C9095143C91CB9427D +:10A6400004D91C9840067CD500202BE14278037881 +:10A650001002184320AA9080844622980078400671 +:10A6600009D505206A46107422980078C00905D0E3 +:10A67000002010743CE106206A4610742498289A41 +:10A680001F9000900023781A029383B21E900192CB +:10A690001B9800220178604600F029FD18A9087275 +:10A6A000002269460A742299097849060DD5208846 +:10A6B000C00506D520A9208B8988884201D10020B9 +:10A6C0006062002018A90872ECE0832801D1022002 +:10A6D0000390FF21013120A88181808820831E986A +:10A6E00060841F9860621320DAE0052F29D3417837 +:10A6F00002780802104320A98880218F002902D007 +:10A70000F94A914206D10A216A4611740121C943CE +:10A71000218702E007216A46117422990022491D0F +:10A72000289B0292009101221D99D20301931143AB +:10A730008BB224994A78097812020A431B99097846 +:10A7400000E0EBE000F0D3FC18A908720022694693 +:10A750000A740122520220A98A81832808D0002885 +:10A7600015D0218FE04881427BD1002020879AE0DC +:10A7700039462046229AFFF7C5FB18A9087200281F +:10A7800001D0832823D120A88088208341E739463F +:10A790002046229AFFF7B6FB18A90872002816D1A6 +:10A7A000618F606B009643180195D8789978000204 +:10A7B0000843844658791A790102114358781A7867 +:10A7C0000002104362469B1DFFF7B4FC03906AE051 +:10A7D0002298022F4078019072D1002801D00128E0 +:10A7E0006ED10820694608740198087521A8009068 +:10A7F0001B98002201782046019BFFF781FC6946E7 +:10A80000002248758A75002809D10198012811D0C5 +:10A81000002804D1B448218F401C81420AD0208FE7 +:10A82000002807D00020694608740120800220A972 +:10A8300088810EE004A83199FBF712FB03900020F9 +:10A84000694608740120800220A9888103980228A3 +:10A8500008D0A64800688079002806D018A9087298 +:10A860002AE061E0019820831DE00398002803D0CE +:10A87000812018A908723DE021A800901B980122B0 +:10A8800001782046019BFFF73BFC18A9087220467F +:10A890003299FFF719FC18A9087A002803D119206A +:10A8A0002870012030806846007C002804D004A86D +:10A8B0003199FBF7D5FA03900398002830D019E0BE +:10A8C00016E00620F6E42078000711D5012F0FD1FD +:10A8D000092168460174A18881820420329906F01A +:10A8E000BCFF082120A88181AEE61C98400615D542 +:10A8F0000420039020A9208889890843208020A96A +:10A900008889800508D5218F7748814204D129980C +:10A91000E062278603200390039890E40420C9E4B2 +:10A9200018A8007A00280ED00120287022980078FC +:10A93000687020A88088A870000AE87018A8007ABB +:10A9400028710520308020A92088898988432080AB +:10A95000E2E7FFB5A1B000201C902198012100780A +:10A960002C9C81406248604A014010A88186208862 +:10A97000521C904203D0002904D0000702D50120C8 +:10A9800025B0F0BD249E00203070239910AA0988BC +:10A99000118518AA10735549229A0A726A4605460B +:10A9A000107404A808602A9848602198249E0178B1 +:10A9B000701C1E90204620300390012930D00229BF +:10A9C00009D0032975D13078800980011D3030709D +:10A9D00021988088A08021980078022804D13078BE +:10A9E000800980011B3030701FAAF11C07206B46C4 +:10A9F00007C310A8008D0022C01E83B203980178FF +:10AA00002198808800F052FD0028DBD121988188B0 +:10AA10001E980170090A417010A9888FC01CCDE0F2 +:10AA20002198417918A8017321980079012802D052 +:10AA30000228C7D144E120887F2212011040219FC3 +:10AA400010AA908602060837120F1BD00006800F4E +:10AA500005D03888228B904201D0052597E1002946 +:10AA600010D1B878C0070DD0B868002207216B4616 +:10AA700007C30398FB880178BA88388800F037FB51 +:10AA8000002875D110A8808E80284DD006DC1028B3 +:10AA900010D020280ED0402894D12BE0FF38013868 +:10AAA00068D0FF3801387DD0FF38FF38022889D1BF +:10AAB000D8E00FE1C00601D5082000E010201C906E +:10AAC000042069460874002088821AA81BA91DAAC0 +:10AAD00003960092019102903B88072120461C9A20 +:10AAE000FFF72CF9A2E00000FEFF00002008002084 +:10AAF00009F800000A201C9018A8007B002836D115 +:10AB00001FAA07206B461E9907C310A8008D0022BC +:10AB1000401E83B203980178208B00F0C7FC0146E9 +:10AB200018A801730B2018E00C201C9018A8007BBB +:10AB30000028E4D11FAA07206B461E9907C310A85E +:10AB4000008D628C401E83B203980178208B00F048 +:10AB5000ADFC014618A801730D20307010A8818F3C +:10AB6000491C0185042168460174218B8182D2E051 +:10AB700061E0FFE73988208B81425CD112211C9172 +:10AB800018A9097B00291AD1616A002912D0B97865 +:10AB9000C90750D00023B96807220293019200919F +:10ABA000FB8800E00CE00399BA88097800F09FFA6E +:10ABB00018A9087313203070012010A90885AAE095 +:10ABC0003888218B884236D116211C9118A9097B1F +:10ABD000002907D0606B002843D000206A4610800F +:10ABE000D54F30E0616B002915D0B878C00722D16D +:10ABF000608F01960B181AA80090D87899780202F5 +:10AC000058790A431D790102294358781D780002BA +:10AC100028439B1D08E0B978C9070CD01AA90196F2 +:10AC20000091BA88F988BB68FFF784FA050072D0F2 +:10AC3000062D50D03FE005253DE00F4601AA6946AC +:10AC40002046FFF7A0F96946628F09888A4201D041 +:10AC50000028F2D0618F626B002051180870487094 +:10AC6000678758E018201C9018A8007B002809D09E +:10AC7000208B00281AD03888208320462B99FFF794 +:10AC800023FA48E02046183000900398237E01788C +:10AC900001222046FFF734FA18A908730028ECD1E6 +:10ACA00019203070012010A90885E6E70525204607 +:10ACB0002B99FFF709FA6846007C032861D066E00B +:10ACC000208801214902084010A98886FF38FF38F2 +:10ACD000022806D0062510A92088898E8843208066 +:10ACE00055E09549208F491E884200D0B5E61620D0 +:10ACF0001C902198806800280AD060632199898976 +:10AD000021870021C943618700210170417002E061 +:10AD10000020C043208710A8808E7F2109010246B1 +:10AD20008A430ED07823002204202B9906F006FDDA +:10AD3000219810A90078A0702088898E084320806F +:10AD400002E02188814321806846007C002805D0EC +:10AD50007A48416804A8FBF783F8054618A8007BE9 +:10AD6000002814D01C98707001203070208BB070B7 +:10AD7000000AF07018A8007B3071052110A8018529 +:10AD800005E06E48416804A8FBF76AF8054620888C +:10AD90004005400E25D1208E002822D0239910AAEC +:10ADA0000988118524992A9B2B9A01930091039479 +:10ADB00002921AABE26A2299FFF720FA05460328AD +:10ADC0000FD0012069460874E06A05902B98069020 +:10ADD000002104A8FBF744F8002800D00546002015 +:10ADE000208610A8018D239801802846C8E500B56B +:10ADF00097B0042807D102206A4610700191002103 +:10AE00006846FBF72DF817B000BD10B54B4C037822 +:10AE100000222168012B02D0022B42D126E00B78C0 +:10AE2000002B01D0042B03D10A7122680321117079 +:10AE3000216883880A79D200921D8B5221680A7991 +:10AE4000D20008328918C2880A80216803890A79E9 +:10AE5000D2000A328B52428920680179C9000C3134 +:10AE6000425221680879401C08711EE00A748288E9 +:10AE70008A802168C288CA8022680189118122687B +:10AE800041895181C1682068C1606168FAF7E8FFB3 +:10AE90000146022807D02068007C002802D1002942 +:10AEA00003D0812010BD832010BD002010BD406B59 +:10AEB000002800D0012070478178012909D100883D +:10AEC0000521C902884202D0491C884201D10020D4 +:10AED000704706207047F7B586B0002468461546CF +:10AEE0000F46848107261AE0049841780278090207 +:10AEF00011432980811D01960294009141790279C4 +:10AF00000B021343C178827809020A434178007822 +:10AF100009020843394600F0EAF8002806D104AADD +:10AF200003A90698FFF72FF80028DDD0822800D16A +:10AF3000002009B0F0BD0000FFFF00002008002045 +:10AF400010B58B78002B16D002789A4202D10B886C +:10AF5000002B10D0401C8B789A4206D1437804789D +:10AF60001B0223430C88A34205D08B79091D002BBB +:10AF7000F1D1812010BD002010BD00B507282ED0D2 +:10AF8000002A02D0012A2ED103E049784907490F4F +:10AF900002E049788906490F0B000FF0A1FD050476 +:10AFA000200A131A2400002A01D0032000BD022029 +:10AFB00000BD042813D0052811D006280FD0002882 +:10AFC0000BD00EE005280AD0062808D0022808D0A9 +:10AFD00003E0062803D0032803D0052000BD00208D +:10AFE00000BD0F2000BD812000BD70B5137805465F +:10AFF0000B70507848701446D8091ED0FE48807AED +:10B00000A84204D8102003430B70002070BDA06834 +:10B01000EF2200781340E840C007C00E03430B70D6 +:10B020002078E1788007800D0843F4490FF011FB88 +:10B03000A06869430818401C70BD906870BD37B5A2 +:10B0400069468988118069460D79E9091BD0EA496A +:10B0500093688C7A0121844209D8FE280FD1E80632 +:10B0600002D5A140491E00E00021197007E01C78BC +:10B0700081408C43E906C90F81400C431C70107855 +:10B08000EF21084010703EBDF8B50746C81C800887 +:10B090000E468000B04201D08620F8BD082A01D9B2 +:10B0A0000E20F8BDD44D00202E60AF802881AA72FA +:10B0B0003446E88016E0E988491CE980810610D40E +:10B0C0008007E178800D0843CC490FF0C2FA206870 +:10B0D00000F0C3FA2989401880B22881381A8019F3 +:10B0E000A0600C3420784107E5D40020F8BDFFB5FE +:10B0F00089B09F041646139DBF0C0193099800F078 +:10B100009EFA04000AD02078C00909D0BA48817A92 +:10B110000A98814204D887200DB0F0BD0120FBE7DA +:10B12000224669460A98FFF760FF002106906846AC +:10B130000172072D14D0012221462846FFF71DFF7A +:10B140000028E9D1207840060AD50221684601721C +:10B15000099981810188C1810682478212980590F0 +:10B160000198000404D500273E460125079709E011 +:10B170002078E1788007800D0843A04907900FF000 +:10B1800068FA0D460198400409D50798A84206D1EF +:10B19000A07821798007800D0843B04201D3AE42E8 +:10B1A00001D90720B8E7B81980B20190A84201D9A7 +:10B1B0000D20B1E76846007A002804D002A8FAF70B +:10B1C0004BFE0028A8D10798A84209D1A078019980 +:10B1D000800880008905890F0843A07001982071BC +:10B1E0001498002800D007801298002815D00698DF +:10B1F0003A46801912990FF0B2F9224669460A9828 +:10B20000FFF7F3FE69460878EF21084069460870A9 +:10B21000224600990A98FFF712FF00207CE7FFB54D +:10B22000754D0C22E8882968504383B00C180D9F97 +:10B23000724905980FF00DFA0091049800F00DFA8C +:10B2400029682A898E46611A0C31091894465118CA +:10B250008AB2A988914202D8842007B0F0BD6A461C +:10B26000167CF20903D0B20601D58520F5E7EA88FD +:10B27000521C92B2EA800E9B002B00D01A80B206BC +:10B2800001D5A76006E0604480B22881091A7046A3 +:10B290000818A0602246FE200499FFF7D0FE05980A +:10B2A000E070009820712078059980088905800059 +:10B2B000890F0843A178009A890892058900920FA6 +:10B2C0001143A170042108432070039880786071B5 +:10B2D00003980088E08000202073F10901D0AC7A47 +:10B2E00000E00124B10600D5002700260EE007216A +:10B2F0000020019102900097E88831460C9B069A45 +:10B30000FFF7F5FE0028A8D1761CF6B2A642EED3D0 +:10B310000020A2E7F1B5009800F091F9060002D0F4 +:10B320000025009C14E00120F8BD204600F087F9BC +:10B330000746007831498007820DF87810430FF0F6 +:10B3400088F9386800F089F94019641C85B2A4B204 +:10B350002948C188601E8142E7DC00992648491EC1 +:10B36000C1800189491B018100203070F8BD00288F +:10B3700004D0401E1080917000207047012070475B +:10B3800010B5044601881C48C288914201D382202E +:10B3900010BD00680C22514342185079A072D08829 +:10B3A0002081907811798007800D0843A081A078D2 +:10B3B000E11CFFF71AFE20612088401C2080E080FD +:10B3C000002010BD012101827047F7B5054600201D +:10B3D00084B0C043108068681746817868468170E1 +:10B3E000686801886846018000218171288A2C885C +:10B3F000A04200D3044603E02C0800200102000014 +:10B400002C8234E0288A401C2882701D6968FFF76E +:10B4100097FD002829D139889848814201D1601EC2 +:10B4200038806888A04227D3B07831798007800DB2 +:10B43000084302906946701DFFF782FD002814D171 +:10B4400069898E4881421BD0002231460598FFF75A +:10B4500094FD002809D16A890298824205D1E968E1 +:10B46000B0680FF04FF800280AD0641CA4B2204640 +:10B4700000F0E5F80600C5D1641E2C828220ECE6BF +:10B480007C807079B871F088B8803078F178800766 +:10B49000800D084378810298B8813946287A32466F +:10B4A0000831FFF7A2FD38610020D6E6FFB585B070 +:10B4B0001D460F46059800F0C2F8040009D0207818 +:10B4C000C00908D06E48807AB84204D8872009B0F5 +:10B4D000F0BD0120FBE7079822468605B60D6946B8 +:10B4E0003846FFF782FD07460E98072816D000223F +:10B4F0002146FFF742FD0028E9D1207840060DD50E +:10B500000121684601710599018101884181868187 +:10B51000C58101A8FAF7A0FC0028D8D120782279AB +:10B520008007810DE0780143A0788007800D1043EB +:10B53000079A964207D0534A914204D3691E81422A +:10B5400001DD0B20C3E7864201D90720BFE7801B3E +:10B5500082B2AA4200D92A461098002800D0028060 +:10B560000F98002802D0B9190EF0F9FF0020AEE7BD +:10B57000F8B51D4617460E4600F061F8040008D0E5 +:10B580002078C00907D03E48807AB04203D887208F +:10B59000F8BD0120F8BD224639463046FFF725FDAB +:10B5A000002D0BD02078E1788007800D08433549C5 +:10B5B000884201D2012000E0002028700020F8BD60 +:10B5C000F8B51E4617460D4600F039F8040008D0BD +:10B5D0002078C00907D02A48807AA84203D887205B +:10B5E000F8BD0120F8BD224639462846FFF727FD61 +:10B5F000FF2E14D02578E178A807800D0843214953 +:10B600000FF027F8002E03D1FF31FF31033189B24B +:10B61000E170A80880008905890F08432070002088 +:10B62000F8BD10B50C4600F00AF8002805D0C18816 +:10B6300021804079A070002010BD012010BD10496C +:10B64000CA88824207D3002805D00C2209685043DB +:10B650000C38081870470020704703B50846694643 +:10B6600009788A0607D4C90904D00549897A414373 +:10B67000491C88B20CBD00200CBD0000FFFF00007B +:10B680002C0800200102000010B50C4601F0CFFC90 +:10B69000002840D0204600F0A4FA002839D02278B3 +:10B6A0000E2A09D00F2A07D0022A05D0032A03D078 +:10B6B000102A2AD0FFDF1CE0A0781E2827D00FDC3C +:10B6C0000C2820D008DC03000FF00AFA091321151A +:10B6D00021211B1B17192100122818D1072010BD8A +:10B6E000302814DD3A3803000FF0FAF9030F11097E +:10B6F0001100002010BD0B4810BD042010BD0D200E +:10B7000010BD0F2010BD082010BD112010BD03205A +:10B7100010BDFFDFEDE7FFDFEBE710B500F061FAEA +:10B7200010BD00000230000030B503460020024684 +:10B730000DE09C5C2546303D0A2D02D30020C0431D +:10B7400030BD0A25684330382018521CD2B28A42D4 +:10B75000EFD330BD70B50D46144608E00A210EF057 +:10B7600078FF2A193031203A641ED177E4B2002CD8 +:10B77000F4D170BD10B5002310E0040A00020443A8 +:10B78000A0B2CC5C44402006000F60400407240CAB +:10B7900044402006C00C60405B1C9BB29342ECD33B +:10B7A00010BD000010B508F0D2FF042803D008F047 +:10B7B000CEFF052803D107F083FE00280BD109F046 +:10B7C00071F8032803D009F073F8032805D106F0B7 +:10B7D000D9FF002801D0012010BD002010BD70B598 +:10B7E0000C460546062102F0F3F96060002801D0FE +:10B7F000002007E00721284602F0EAF960600028EF +:10B8000003D001202070002070BD022070BDFEB565 +:10B810000C46064601A9FFF7E2FF00287FD16846E3 +:10B82000007900280BD006F026FFB04277D0002226 +:10B83000214630460BF098F800286DD12DE007F036 +:10B8400040FCB0426BD00022214630460AF0CDFECB +:10B85000002861D1029D9820405D3035002804D138 +:10B86000687E002801D0012000E0002000902846DA +:10B870002030417B002914D0817B890711D500211C +:10B88000617001222270A170A680C27BA2712A8EF3 +:10B8900022816A8E628141733EE0029D3035687E6E +:10B8A000E4E7304602F005FB070000D1FFDF384631 +:10B8B00001F06BFD0006000E08D0002161700D2123 +:10B8C0002170A680E0800120A07025E0304602F0C3 +:10B8D000DCFA070000D1FFDF009800281FD03846AF +:10B8E00001F0EEFD00281AD068460079002807D143 +:10B8F00002988030C06B4188B14201D100210170B3 +:10B90000304606F020FE002060700A212170A070F1 +:10B91000A680A97EA17168760120FEBDFFE7002008 +:10B92000FBE71CB56946FFF75AFF002800D0FFDF90 +:10B93000684601F0C5FBF8480021806880304183EB +:10B940001CBDFEB504460E46062002F0EFF8054683 +:10B95000072002F0EBF82818C7B20025BE1915E041 +:10B960002088401C80B22080B04201D3002020807B +:10B9700080B2B84203D3B04201D20020CDE769467D +:10B98000FFF72DFF0028C8D06D1CEDB2AE42E7D8FE +:10B990000020C04320801220BFE738B50020C043FC +:10B9A000694608800FE068460621008802F021F908 +:10B9B000044668460721008802F01BF9002C02D0DB +:10B9C000002800D0FFDF00216846FFF7BAFF0028FB +:10B9D000E9D038BD7CB5D1A103C9D24C0025019175 +:10B9E0000090A57001F065FB2146E5700420403908 +:10B9F000088710204887CC48C03460812573E081D7 +:10BA00000846203045740D7085730575C030057784 +:10BA10001D300522694605460EF0A1FD2946201F6E +:10BA20000AF08CFE0A20A0700320E0702071607183 +:10BA30000E20A0710620E071207260727CBDF8B506 +:10BA4000B54C0D466060217006F066FDFFF7A5FF5E +:10BA5000FFF7C0FF207808F025FCB2498431084682 +:10BA600081380F46064607F009FC60680AF02CFE94 +:10BA700020780BF06BFF284609F0BFFA39463046B4 +:10BA800006F02AFE60680AF0F4FF01F012FBA548F8 +:10BA90000021C170F8BD10B50124002A01D000209A +:10BAA00010BD002904D0012903D00024204610BD78 +:10BAB00002210CF090FEF9E7FEB5040000D1FFDF93 +:10BAC000984D203D687C002809D00020607010212E +:10BAD0002170A97CA170E97CE170687473E0914EDB +:10BAE000403E3078002809D02C22B11C20460EF0B0 +:10BAF00036FD0E2020700020307064E0A87B002806 +:10BB00000AD00120E070E87BA070287C60700F20D4 +:10BB100020700020A87356E082480221CE300290A7 +:10BB2000FFF70FFF002800D0FFDF7E4FC037F889F6 +:10BB30000190062001F0FAFF0646072001F0F6FF0B +:10BB40003018C6B2701CC0B20090F889B04214D14F +:10BB50000021204607F06AFA002834D1287D002809 +:10BB600033D000266670132020701C21A01C0EF01C +:10BB700053FD0220A0702E7525E0009988421DD14A +:10BB80000021204606F050FD00281ED02078132802 +:10BB900019D1A0783C2816D1A088072102F018F806 +:10BBA000050000D1FFDF288806F0CDFCA088072122 +:10BBB00002F01FF8002806D0FFDF04E02146FFF75F +:10BBC00026FE002801D00120A7E602210298FFF7F7 +:10BBD000B8FE002803D1F98901988142B5D100202F +:10BBE0009BE669E710B508F0E5FA002800D0FFDF12 +:10BBF0000AF068FD002800D0FFDF07F003FB09F022 +:10BC0000E6F9002800D0FFDF0AF031FF002800D05D +:10BC1000FFDF06F039FD002800D0FFDF0BF090FEBB +:10BC2000002800D0FFDFFFF7B8FEFFF7D3FE06F0D5 +:10BC30005DFC02F019F901F03CFA3A480021C170AC +:10BC400040380171012141710222C270017010BDA2 +:10BC500010B5344C403C2078002804D00A210E2036 +:10BC600001F0F4F910BDFFF79DFD002801D00C2074 +:10BC700002E001F01EFA00202071012060710A210B +:10BC8000E170207010BD70B5264C0646403C20780F +:10BC9000002804D039210E2001F0D8F970BDFFF73B +:10BCA00081FD002801D00C2010E01E4DE878082806 +:10BCB0000BD20001001910223146443001F0D0F9B6 +:10BCC000E878401CE870002000E007202071012087 +:10BCD00060713921E170207070BD70B5114C06465D +:10BCE000403C2078002804D00B210E2001F0AEF952 +:10BCF00070BD3078002803D0012801D012201FE049 +:10BD0000084D80352879082821D2FFF74BFD0028FF +:10BD10000CD00C2014E0000044000020FFFFFFFFC7 +:10BD20001F00000078080020FFFF00003378297909 +:10BD3000721CFE4805F0BAFF2879401C28710020CB +:10BD40002071012060710B21E170207070BD07200F +:10BD5000F6E710B5F54CC83C2078002804D038210F +:10BD60000E2001F073F910BDFFF71CFD002801D073 +:10BD70000C2003E0ED4900208839C87020710120B3 +:10BD800060713821E170207010BDE84810B5C838E6 +:10BD90000178002904D00F210E2001F057F910BDC1 +:10BDA000002101710E2181700F21C170FF2181716D +:10BDB0000021C9430181DE4949680A7882728A8874 +:10BDC00082814988C18101214171017010BDD7492B +:10BDD00010B5C8390A78002A04D03B210E2001F0A2 +:10BDE00035F910BDD14A00883832508101201073D6 +:10BDF00000220A7148713B22CA70087010BD10B54C +:10BE0000CA4CC83C2078002804D02B210E2001F019 +:10BE10001DF910BD0821A01D05F070FA0020207149 +:10BE2000012060712B21E170207010BD70B5BF4CF6 +:10BE3000C83C2178002904D031210E2001F006F9F8 +:10BE400070BD00214156042910D000290ED0081DD4 +:10BE50000CD0001D0AD0001D08D0001D06D0001D0A +:10BE600004D00A3002D01220207104E000250846D8 +:10BE700005F065FF25713120E070012060712070B0 +:10BE800070BD30B5A94D0446C83D28788DB0002856 +:10BE900005D02A210E2001F0D9F80DB030BD1022B6 +:10BEA0002146684601F0DCF81022A11804A801F030 +:10BEB000D7F868460DF0CFFA10222C46A81D08A925 +:10BEC00001F0CEF8002020710E20A0702A20E07032 +:10BED000012060712070E0E7F0B5944885B0C83863 +:10BEE0000178002905D03A210E2001F0AFF805B005 +:10BEF000F0BD8E480021C8388171FF300130408983 +:10BF00006946888002A9FFF76AFC0124002805D051 +:10BF1000002101A8FFF715FD002852D1684681884D +:10BF20000180684602A90088FFF759FC002800D06C +:10BF3000FFDF6846008801F0BCFF050000D1FFDF8D +:10BF4000039E2846303601F0C3FA60400546684635 +:10BF5000767E008801F099FF070000D1FFDF3846A8 +:10BF600001F0AEFA60400246304610431ED06846EB +:10BF700001886E485200C8388379AD005B001B18F9 +:10BF80001981877903461833F95C49084900314320 +:10BF9000F954FD27867939401143F154FB26827903 +:10BFA00031402943D1548179491C8171002168466F +:10BFB000FFF7C7FC002804D16846018880888142C9 +:10BFC000AFD15A480021C838017144713A21C1707B +:10BFD00004708CE770B5554C0546C83C20780028A5 +:10BFE00004D034210E2001F031F870BD08F0AFFB11 +:10BFF000052804D0284608F044F9002000E00C2071 +:10C000002071012060713421E170207070BD10B585 +:10C01000464CC83C2078002804D00E21084601F088 +:10C0200015F810BD424906220C31A01D0EF097FAFA +:10C0300000202071012060710E21E170207010BD80 +:10C0400070B53A4C0646C83C2078251D002804D01F +:10C0500032210E2000F0FAFF70BD3146002006F0BC +:10C060000BFC287000280DD100213246084607F04D +:10C07000CDF92870002805D12D48062231460C3014 +:10C080000EF06DFA012060713221E170207070BDF8 +:10C0900070B5264C0546C83C2078002804D03021D5 +:10C0A0000E2000F0D3FF70BD08F092F9002803D1F4 +:10C0B00009F01CFA00280DD0287808F0E1FF287854 +:10C0C00007F026FA00202071012060713021E17014 +:10C0D000207070BD0C20F6E7F8B5144C0646C83C3D +:10C0E0002078251D002804D017210E2000F0AEFF77 +:10C0F000F8BD3146012006F0BFFB0127287000285B +:10C100000FD13246012107F081F92870002808D1AB +:10C110000648062231468C380EF021FA034888384A +:10C12000877067711720E0702770F8BD0009002044 +:10C130004400002010B5FE480178002904D03021C9 +:10C140000E2000F083FF10BD122101710121417109 +:10C150003E22C270017010BDFEB5F54C054620347C +:10C16000A07B002804D028210F2000F06FFF05E4F9 +:10C17000282020740121A173A8781A2824D00EDC6D +:10C1800003000EF0ADFC162F2F2F2F2F212F2F2F56 +:10C190002F2F2F2F2F2F2F2F2F2F2121212F2A28E5 +:10C1A00020D00ADC1E3803000EF09AFC0C1C1C1C6C +:10C1B0001C1C1C1C1C1C1C1C0E1C3A3803000EF002 +:10C1C0008FFC0411031103112888DA4A904209D820 +:10C1D0001F20E07328886946FFF701FB002803D081 +:10C1E000022014E0122012E068460078019F002827 +:10C1F0000FD0CE37019E00280DD0CF36684600F014 +:10C200004BFF002802D03878002806D00C20E073BD +:10C21000DAE4B437EEE7B536F0E701203870A878F5 +:10C2200030700020E073684600F04AFFCCE4F0B5BF +:10C23000BF4C0746207885B0002804D025210E2069 +:10C2400000F004FF53E6388802A9FFF7C8FAB84E99 +:10C250000021083600280CD0022020713160317195 +:10C26000E1800E20A0702520E07001206071207018 +:10C270003DE6039D28460830503501900020A87502 +:10C28000052230460199F4F781FFA87D0028F5D1F9 +:10C290003888E080E5E7FEB5A54C06462034A07B53 +:10C2A000002804D010210F2000F0D0FE8CE41F20C5 +:10C2B000E073102020740127A77330886946FFF7C8 +:10C2C0008EFA002810D1684600F0E6FE00280BD058 +:10C2D0006846019D007830350028019806D0E2308C +:10C2E0000178002909D104E0022007E08030C06B0A +:10C2F000F6E72035697B002902D03A20E07363E439 +:10C30000A97B89070DD104210170684600780028B7 +:10C3100004D1019831888030C06B4180684600F0BC +:10C32000CFFE0020E0736F734EE4F8B5804D0646F3 +:10C330002878002804D01D210E2000F087FEF4E6A6 +:10C340001F202871012068711D21E970287008F0F4 +:10C35000FEF90C27042854D0052852D0B0791224B5 +:10C36000012801D000281DD13078002801D00128F3 +:10C3700018D1F079002801D0012813D170886E49B6 +:10C38000021F30248A420DD2B288121F8A4209D27B +:10C390002887B0886887B0790024012804D0002855 +:10C3A0000CD013E02C71C0E6614840308078002842 +:10C3B00027D05F4A3C320121084602E05F4A002153 +:10C3C000012007F023F8040000D0FFDFF0790128F6 +:10C3D00001D0002802D107F05AF80446002C01D001 +:10C3E0001F2011E03078012802D0002803D00AE095 +:10C3F0000021022001E00021012007F058F8002868 +:10C4000001D02F7191E6002028718EE670B5484C5E +:10C410002178002904D01E210E2000F017FE70BDE7 +:10C420001F212171012161711E22E27021700278A9 +:10C430001221012A01D0002A04D14078002803D01B +:10C44000012801D0217170BD00260C25012A09D0D8 +:10C4500008F07DF9052803D007F05AFE002806D021 +:10C46000257170BD618F208F07F0BFFFF6E7267141 +:10C4700070BDF0B53249054603C985B02C4E039115 +:10C4800020360290B07B002804D021210F2000F03C +:10C49000DDFD2CE51F20F073212030740120B073E6 +:10C4A0002A88254B111F3020994252D269880C1FCF +:10C4B0009C42FAD291424CD8EA89224B911F994270 +:10C4C000F3D2298A8C1F9C42EFD28A42F3D86A8A1F +:10C4D000FF23F4339A42EED8AA8A1A4C13460A3B39 +:10C4E000241FA342E1D2C9088A4232D9E98A2A8BA1 +:10C4F0009142E0D829791220002902D0012928D1BF +:10C5000002E069790029F9D1297B002901D00129AC +:10C51000F5D108F01CF905281AD008F018F90428FC +:10C5200016D0307D002813D106F0CBFD06490DE072 +:10C5300038080020FF0E0000FD3F000050000020E2 +:10C540001CBD00007B0C0000FFFF0000884201D0F2 +:10C550000C20AFE0062104A801F00FFB04004CD032 +:10C5600003210BF077FEF74F1B22F8780090BB7881 +:10C570002088114601F0D5FB042840D0002800D0C7 +:10C58000FFDF208805F0DEFF20460D300090208878 +:10C5900001900421009804F0B1FE019900980BF07D +:10C5A000F1FE204611300190E7A0006800900321C1 +:10C5B000684604F02CFE00206946019A0B5C135477 +:10C5C000401CC0B20328F8D3288A6080688AA08003 +:10C5D000A88AE0807979387907F0CCFE01462046B8 +:10C5E00007F0EFFE2046002720308775C775687971 +:10C5F00000280DD001280FD10CE009205AE0208836 +:10C60000062101F0F6FA002800D0FFDF072051E0F4 +:10C61000677601E00120607620460622A91D1A30C7 +:10C620000DF09DFF2046052202A90830F4F7AEFD6B +:10C630000120C421085569460F700146684604F080 +:10C64000E6FD694608784107C206490F920F800649 +:10C650008918C00F081869460870401D20760928FF +:10C6600001D208302076002120460BF0F3FD287B14 +:10C67000002803D0012805D0FFDF29E00021B34ABC +:10C68000012008E0AF48C0388078002814D0AD4AB7 +:10C690000121C43A084606F0B9FE002818D02088C7 +:10C6A00005F051FF2088062101F0A3FA002800D0F0 +:10C6B000FFDF1F20F0731AE4208805F044FF208874 +:10C6C000062101F096FA002800D141E7FFDF3FE79D +:10C6D0002879012801D0002803D106F0D8FE0028CF +:10C6E0000CD12146032006F0E2FE002806D16A881C +:10C6F0002988204607F0FEFD00280AD0208805F092 +:10C7000022FF2088062101F074FA0028DDD0FFDF27 +:10C710001EE7A0342776F7735BE438B58C4C20789D +:10C72000002804D022210E2000F090FC38BD1F20EC +:10C730002071012565712220E070257008F007F84E +:10C74000052802D00C20207138BD002020716846D9 +:10C7500007F07EFE0028F7D10098008805F0F3FE70 +:10C7600000980621008801F044FA002800D0FFDF7D +:10C7700077482030057575480C380078FCF707FFBE +:10C7800038BDF8B5724E05462036B07B002804D07F +:10C7900023210F2000F05AFCC7E41F20F073232050 +:10C7A00030740120B0736A886A4B911F302099421F +:10C7B0004BD2A9888C1F9C4247D28A4245D8EA882E +:10C7C000FF23F4339A4240D82A89624C13460A3B2D +:10C7D000241FA34239D2C9088A4236D96989AA8955 +:10C7E000914232D82888062101F0F2F90227044646 +:10C7F000002809D000F041FC002805D08034E06B0F +:10C800000178002906D101E0F7738EE4216D0978E3 +:10C81000002901D03A2018E005218171E06B002148 +:10C820000181E26BA8885081E26BE8889081E26B1D +:10C830002889D081E06B028943899A4204D88279A1 +:10C84000082A01D89A4202D31220F0736DE42A8894 +:10C850004280E06B0770F17367E4FEB53C4C05461F +:10C860002078002804D024210E2000F0EFFB7EE485 +:10C87000012666712420E070267028460BF0A0FD8A +:10C88000002801D0002000E0122020710028EED105 +:10C890002C4F0522203F38463E7729461D300DF0AB +:10C8A0005EFE002038776946062001F01DF9002859 +:10C8B00000D0FFDF684601F0F3F8002814D1684685 +:10C8C000878868468088062101F082F9050000D13A +:10C8D000FFDFC0352E71684601F0E2F8002803D171 +:10C8E00068468088B842ECD1002020713FE470B5E2 +:10C8F000174C06462034A07B002804D026210F20A8 +:10C9000000F0A4FB70BD1F20E073262020740120DE +:10C91000A0733088062101F05BF9050009D000F012 +:10C92000ACFB002805D08035E86B0178002906D1E2 +:10C9300001E0022016E0296D097800290CD03A2088 +:10C9400010E00000380900201122330050000020C0 +:10C95000380800207B0C000005210170E96B30884D +:10C9600048800020E07370BD10B5FA4C2078002894 +:10C9700004D006210E2000F069FB10BD00202071BC +:10C980000E20A0700620E0700821A01D0DF044FECE +:10C99000A17901200143A1716071207010BDF8B52B +:10C9A000EC4C07462034A07B002804D02C210F201B +:10C9B00000F04CFBC3E41F20E0732C202074012006 +:10C9C000A0733888062101F003F906000AD000F0B0 +:10C9D00054FB002806D035468035E86B01780029E5 +:10C9E00006D101E002201FE0296D0978002901D05D +:10C9F0003A2019E060363179002917D00822B91C95 +:10CA0000001D0DF0ACFDE86B79898181E86B39463A +:10CA100010220C310E300DF0A2FDE96B03200870DE +:10CA2000E96B388848800020E07388E40C20FBE73D +:10CA300070B5C84E044630780C25002804D0182163 +:10CA40000E2000F003FB70BD07F02CFF03285BD025 +:10CA500007F02EFF032857D06079002801D0012865 +:10CA60002DD1A079002801D0012828D1A07B002851 +:10CA700005D0012803D0022801D003281FD1607BF4 +:10CA800000281CD0C0081AD162880120800382428D +:10CA900002D82188814203D9207901280FD119E0D9 +:10CAA0002079002806D0012814D0022805D00328B8 +:10CAB00005D102E0202A0BD30CE0A0290AD220796C +:10CAC000042805D12088202802D36188884201D912 +:10CAD000122519E09F48217920308175607900285E +:10CAE00002D0012804D00FE09B4A0021204608E034 +:10CAF000984840308078002806D0964A01213C3280 +:10CB0000204605F045FE054601203571707118215B +:10CB1000F170307070BD10B58E4C2178002904D0B2 +:10CB20001A210E2000F092FA10BD01781F2902D9B7 +:10CB30001220207106E0002121710278411C10466C +:10CB400005F0C0FE012060711A21E170207010BD57 +:10CB500010B5804C2178002904D020210E2000F04F +:10CB600075FA10BD01781F2902D91220207106E044 +:10CB7000002121710278411C104605F095FE01202C +:10CB800060712021E170207010BDFEB5714C2178DC +:10CB9000002904D01B210E2000F058FA67E601217D +:10CBA00061710C21217100780026012803D0002832 +:10CBB0006BD012205CE005F0B9FD002859D0654823 +:10CBC0002030807D002816D0012814D0042812D0EF +:10CBD00007F06EFE002875D107F064FE002803D030 +:10CBE00007F060FE02286DD1002008F04CFA002802 +:10CBF00049D0FFDF47E007F055FE002862D107F07B +:10CC000057FE00285ED105F036FD5449884259D1BF +:10CC1000072101A800F0B1FF4F4905460C39886093 +:10CC2000280000D1FFDF032128460BF0B9FA28467F +:10CC300005F0E2FE4A4F797A387A07F03CFE014669 +:10CC4000284607F05FFEF87900901B22BB79288800 +:10CC5000114601F066F800280CD0042800D0FFDF50 +:10CC60002888072100F0C5FF002800D0FFDF07203B +:10CC7000207127E0288805F065FC284608F003FAB3 +:10CC8000002800D0FFDF26711CE007F00BFE032810 +:10CC900003D007F00DFE032814D107F006FE054669 +:10CCA000002008F01DF900280CD12671002D09D0B4 +:10CCB000288805F048FC2888072100F09AFF002802 +:10CCC00000D0FFDF1B20E07001202070CFE5F8B519 +:10CCD000204D06462878002804D02D210E2000F093 +:10CCE000B5F959E53088072100F072FF01270028C7 +:10CCF00022D00446C034617C00290AD13C21095C61 +:10CD00000F2901D0102904D1FF210531095C002928 +:10CD10000AD00C2028710E20A8702D20E8703088D1 +:10CD2000E8806F712F7037E51022B11CD2300DF002 +:10CD300016FC67740020EDE70220EBE770B5054CA8 +:10CD40000546207800280DD02E210E2000F07EF917 +:10CD500070BD00003808002050000020FFFF0000D8 +:10CD6000380900202888072100F032FF022200281D +:10CD700010D00146C0314B7C002B05D12030007F04 +:10CD80000F2804D0102802D00C20207103E04A7430 +:10CD90000020FAE722710E20A0702E20E070288873 +:10CDA000E080012060712070D2E77CB5CB4C054655 +:10CDB0002078002804D037210E2000F047F97CBDF0 +:10CDC00028886946FEF70BFD002807D00220207155 +:10CDD000012060713721E17020707CBD01987F22B5 +:10CDE000014630300272427200228272A8782031ED +:10CDF0000872E8784872287988722271E8E71CB5D1 +:10CE0000B64C2178002904D013210E2000F01EF921 +:10CE10001CBD00886946FEF7E2FC002801D0022014 +:10CE200005E001992820405C012802D00C202071E7 +:10CE300006E0382000222271405C20720888E080E1 +:10CE4000012060711321E1700E21A17020701CBDC2 +:10CE5000F8B5A24C05462078002804D035210E20D4 +:10CE600000F0F4F898E4A878002801D0012804D153 +:10CE7000A888FF21F531884201D912202071288825 +:10CE8000072100F0A5FE0126002813D00146002747 +:10CE9000C0310F72AA884A81A0300671AA78012A8F +:10CEA00000D000220A724079002801D008F007FA69 +:10CEB000277101E00220207166713520E070267034 +:10CEC0006AE4F8B5854F04463878002804D03C2140 +:10CED0000E2000F0BBF85FE42088072100F078FE08 +:10CEE00006002DD0B58864886800F2887188401CDF +:10CEF000844217D37A484143800050430DF0A9FB88 +:10CF0000401EFF2180B2F531884200D90846844294 +:10CF100000D22046691C401C0DF09BFB6D1C684331 +:10CF2000401E85B2F020805D002800D13584FD8050 +:10CF300000203871012078713C21F97038702BE4A1 +:10CF40000220F6E770B5654C05462078002804D02D +:10CF500033210E2000F07AF8FAE607F0A3FC00284F +:10CF600001D00C2018E02978002911D00A290FD00F +:10CF700014290DD01E290BD0282909D0322907D019 +:10CF80004B2905D0642903D0FF2901D0122003E0EA +:10CF9000284608F035F90020207101206071332106 +:10CFA000E1702070D4E610B54C4C2178002904D0F3 +:10CFB0003F210E2000F04AF810BD002121710178B8 +:10CFC000002909D001290BD01220207101206071A5 +:10CFD0003F21E170207010BD0422411C414803E054 +:10CFE000411C40480422001D0DF0B9FAEEE770B56F +:10CFF0003A4C05462078002804D03D210E2000F050 +:10D0000025F8A5E607F04EFC002803D107F050FCF8 +:10D01000002801D00C2003E0287805F05FFC0020F8 +:10D020002071012060713D21E170207090E610B503 +:10D030000178402908D22C4A89005158002903D090 +:10D04000801C8847012010BD002010BD234A2032DB +:10D05000537C002B03D19074D1740120507470471D +:10D0600030B5134606E0CC18203CD51AE47F5B1E91 +:10D070004455DBB2002BF6D130BD4921095C0029B3 +:10D0800008D18030017E002904D0007E042801D020 +:10D09000012070470020704701784068002905D0C2 +:10D0A0004030407A002802D000207047E5E7012098 +:10D0B00070470A4900208031886740310871704705 +:10D0C00010B50178012908D14068A03041790029C4 +:10D0D00003D00021417108F0F2F810BD380800209B +:10D0E000C40900003A0900208CAC01003D307047B3 +:10D0F0000818C01D50433D31401880B2704770B5CC +:10D100001D460646A818049BC01D2C4658433D34B6 +:10D11000001984B2A14200D2FFDF1C2130460DF07D +:10D120007BFA1C3CA0B201213575C90330808842CE +:10D1300000D9FFDF70BD00887047F0B5044684B0A9 +:10D140001C300390019015460E46A288E1885704D2 +:10D1500048047F0C400CB84208D1C90BD20BC9035C +:10D16000D203914202D0002004B0F0BDB8421AD9D7 +:10D17000217DC01B401AC01F85422CDC0198C91DAF +:10D18000C0190918C91E716035810021F160318212 +:10D19000021D326005702A0A42708170C170012040 +:10D1A000A07404B0F0BD2188227DC91B891AC91F53 +:10D1B000009102900FD41B2900DAFFDF009885420E +:10D1C00001DC294600E081B2681A0204120C06D084 +:10D1D0000298824203DD0020A07404B0F0BD237DDC +:10D1E0000198DB1DC0191B18DB1E73603181039B86 +:10D1F000F3603282031D33600170090A417082704E +:10D20000110AC1700120A07404B0F0BDF8B5044645 +:10D2100002468088A37C40041C32400C002B0BD0BB +:10D2200010184278037812021A43C37885781B02DB +:10D230002B43D3188B4201D20020F8BD00268A422E +:10D2400006D30170090A41708670310AC17014E07A +:10D25000891A8DB2290A8570C170002D0DD0A08861 +:10D26000271D4004400CA84200D2FFDF398801206E +:10D27000C0038843284338800BE041780278237D3F +:10D2800008021043DB1D181881B22288201D00F00F +:10D29000DAFAA6740120F8BDF0B4044646880346C5 +:10D2A000858870041C34400C2018AE4203D1002045 +:10D2B000D881F0BC7047457807785E892D023D43E0 +:10D2C000AE4209D3761BC57880782D020543A81B92 +:10D2D00085B23019C01E05E0AC1BA5B21C7DA41997 +:10D2E0002018001D0C88AC4200D90D805C89002CF0 +:10D2F00005D0002414700988D981F0BC704701243E +:10D30000F8E7F8B50446014640881C314004400C5B +:10D310004518E089002837D06189081880B26081FB +:10D3200069782A7809021143EA78AB7812021A4325 +:10D330008918814200D2FFDF68782978000208430B +:10D34000E978AA780D0215436289411900279142B4 +:10D3500018D1002D0DD06088A61C4004400CA842B6 +:10D3600000D2FFDF31880120C0038843284330808A +:10D3700007E0237D2288DB1D181881B2A01C00F075 +:10D3800062FA6781E7810120F8BDF0B504468AB0F2 +:10D390001C300390218967880026B94244D0254675 +:10D3A000083548040399400C0918C8788A780002A7 +:10D3B00010430ED0009029884904490C814200D2C4 +:10D3C000FFDF29880120C003884300990843288093 +:10D3D00025E04A78207D09782B8812020A43C01D77 +:10D3E0009C4681185B045B0C2288591889B29142D3 +:10D3F0000DD2521A92B21B30824204D201206146F1 +:10D40000C00388430AE06046C00BC00305E0881AE9 +:10D4100081B201206246C003904308432880761CF5 +:10D420002189B6B2B942BCD130460AB0F0BDF0B5E0 +:10D430000B46C5880146044683B000896E041C3142 +:10D440000090760C608889190E46854202D1002032 +:10D4500003B0F0BD002A01D0081D1060002B04D0DD +:10D46000227D311D18460DF07AF870783178070268 +:10D470000F43F078B1780002084311D0C1198FB280 +:10D480000190E188A61D4904490C814200D2FFDFCA +:10D4900031880120C003884301990843308007E0A8 +:10D4A000237D2288DB1DD81981B2A01D00F0CBF9A5 +:10D4B0000098854201D1E0882081384603B0F0BD54 +:10D4C00041888088814201D1012070470020704747 +:10D4D0004188C088884201D10120704700207047F0 +:10D4E000F0B44588838804466A041C34520C5904FD +:10D4F000490CA6189D4222D04389C48937781D194A +:10D5000073781C02F378B6781B023C433343E61869 +:10D51000B54217D3002B02D08B4213D30FE0037D0B +:10D52000D21D1C19A218008892B2801A80B2223330 +:10D53000984202D2002902D004E08A4202D1F0BC13 +:10D5400000207047F0BC01207047F0B48588C68881 +:10D5500002466C047304640C1C305B0C0719A34274 +:10D5600008D1F60BED0BF603ED03AE4202D000201E +:10D57000108228E0A34206D9157D1B1B5B1BDB1F15 +:10D580009C46002305E01588167D2D1BAD1BED1F65 +:10D59000AC466546002DEADB9589002D16D07D78D6 +:10D5A0003E782D023543FE78BF7836023E430DD0DB +:10D5B0009C1B0023D3748C4204DB93891818401BF6 +:10D5C000C01E18E01382F0BC002070476646771B2F +:10D5D0000026D6748F4206DB137DDB1D1B19948950 +:10D5E0002018181806E08B4208DB0123D3749389B6 +:10D5F0001818401BC01E1182F0BC70471682E2E76B +:10D60000F7B504460546808882B04004400C1C35BE +:10D610002E180190208A002802D00399884202D255 +:10D62000002005B0F0BDA189002913D070783278B0 +:10D6300007021743F078B2780002104300903818C0 +:10D64000814200D0FFDFE07C0099014305D0002833 +:10D650003FD048E000270097F5E7A08900280CD0CC +:10D66000217D019AC91D891840190818617DC01EC5 +:10D670000170A17D4170E17D81700398A2890399B9 +:10D6800038185118A1813070000A70700027B770E7 +:10D69000F770049800280DD07078237D317800024F +:10D6A0000843DB1D181881B22288201D00F0CBF83A +:10D6B000A78143E0207D0199C01D4018A189491927 +:10D6C0004018C01E017861754178A1758078E075B9 +:10D6D00034E0A089617D4019C01BC01E0170A17D8E +:10D6E0004170E17D817003990098A289401851181A +:10D6F000A1813770390A80B27170B070010AF1707F +:10D700000646049800280FD0A088251D4004400C30 +:10D71000B04200D2FFDF29880120C0038843304394 +:10D7200028800020A08109E0A0894019C01BC01EEC +:10D73000017861754178A1758078E07500202082BC +:10D74000A074012005B0F0BD30B4458802466B04DA +:10D750001C3284885B0CD318A54202D04489002C6B +:10D7600002D030BC002070471C1D0C60007DC01D25 +:10D77000C018C01E486058781C78000220430881F9 +:10D78000CA60DC789D7823022B430B82002803D1EA +:10D79000D21E4A600B81088230BC0120704770B5F0 +:10D7A000024641880446838848041C32400C121803 +:10D7B000994205D06189002902D1E189002901D06F +:10D7C000002070BD5178137809021943D3789278FC +:10D7D0001D0215430DD0A61CA84200D2FFDF3188E0 +:10D7E0000120C0038843284330800020E0810120CD +:10D7F00070BD237D2288DB1D581881B2A01C00F06B +:10D8000022F8F2E700218181C1740182817470479E +:10D810008289002A01D10020704730B482880346F3 +:10D820005204520C1C339A185478157824022C4355 +:10D8300004D0037D121D9A184A6001E0DB1E4B6084 +:10D84000808930BC704730B405886C04640C611862 +:10D850008CB20121C90394420AD2121B92B21B332B +:10D860009A4201D2A94307E0E90BC903214303E02F +:10D87000A21A92B2A9431143018030BC7047000044 +:10D88000FFB52649D21C0A401E460446154600280C +:10D8900009D00027E01C80088000A04200D0FFDFF4 +:10D8A000201D01210DE00127F4E702464019002F59 +:10D8B00005D1B14201D2034600E000231360491CA8 +:10D8C000C9B2B142F1D9011B0198002F016005D105 +:10D8D000002E01D0201D00E000202060FFBD014689 +:10D8E0000A680020002A02D0104612680A607047B9 +:10D8F00002680A6001607047084B10B5C91C101A15 +:10D900001940001F0CF0B3FEC0B210BD034BC91C80 +:10D9100019405143001D081870470000FCFF00002B +:10D92000FEB5D14C0546A0780E46A84200D8FFDFD0 +:10D93000B00007190190A800B96A009008580028A3 +:10D9400000D0FFDFB868FFF7CAFF04000DD0B96A46 +:10D950000098062E0C500AD0082E00D3FFDFC349D2 +:10D9600001980A582146284690472046FEBDBE48E9 +:10D97000BF4B7A30024600902E3A2146284608F0E6 +:10D980001EFEF2E7FFB581B00A98019F18181E46E7 +:10D99000C4B2002F07D00025FF2800D9FFDF02986E +:10D9A000002803D101E00125F6E7FFDF0198C01C44 +:10D9B000810801988900814200D0FFDF0A9903980D +:10D9C000884200D9FFDF002D0BD1A74900204C3140 +:10D9D0000870A84A4A80A6490870A3497A3108709D +:10D9E0004A80A1480399017046708470C470047124 +:10D9F00044710A998171C6710026FF1CB808800025 +:10DA00000746002D03D19849B20051188860974904 +:10DA1000720040318A5A9449002D8B5D00D000205D +:10DA20006946FFF72DFF0099761C7F18F6B2082E85 +:10DA3000E3D3FF1CB808800023460646002D0FD014 +:10DA4000002002226946FFF71BFF009831180020D2 +:10DA5000A2009646C91C8A089200002D03D012E04D +:10DA600081498864EDE78049860071188C468A6296 +:10DA700000210B4605E066468F00B66A491CF3514B +:10DA8000C9B2A142F7D37146401C5118C0B2082850 +:10DA9000E0D30198081A02990880002005B0F0BD73 +:10DAA00070B5044603F035FF002801D0102070BD8A +:10DAB00020786D4A80008018618892780FE0836A30 +:10DAC0008D005B59002B08D04A1C6280A180806ABF +:10DAD00089004058A060002070BD491C89B28A426C +:10DAE000EDD86180052070BD70B505460C4608462E +:10DAF00003F00FFF002801D0102070BD082D01D3C6 +:10DB0000072070BD25700020608070BD0EB569468D +:10DB1000FFF7EAFF002800D0FFDF6846FFF7C0FFED +:10DB2000002801D000200EBD01200EBD10B5044616 +:10DB3000082800D3FFDF4C48005D10BD3EB5054608 +:10DB400000246946FFF7D0FF002803D0FFDF01E083 +:10DB5000641CE4B26846FFF7A3FF0028F8D028460B +:10DB6000FFF7E4FF001BC0B23EBD3F498978814208 +:10DB700001D9C0B27047FF207047F8B50C46054682 +:10DB8000062901D0072C0FD1374FB86CFFF7A7FE3D +:10DB9000384E020004D00221B86CFFF7ADFE00E061 +:10DBA00030462880B04201D10020F8BD2146FFF761 +:10DBB000B7FE040002D1288800F049F82046F8BDDD +:10DBC0002C4A904201D0082901D300207047A7E6D3 +:10DBD000284A90420BD0082909D2234A93788342DD +:10DBE00005D989008918896A800008587047002083 +:10DBF0007047F8B50D4604461E491F488C4202D0B6 +:10DC0000082D01D30720F8BD174A9178A142FAD90F +:10DC1000A9008F18A200BB6A00929E58002EF2D075 +:10DC2000124A204620325258314690470020BA6AA4 +:10DC30000099062D505001D0072D02D1204600F04A +:10DC400006F83146B868FFF753FE0020F8BD10B55E +:10DC5000054CC2B20221A06CFFF758FE0146A06C31 +:10DC6000FFF746FE10BD0000480900208CAD010002 +:10DC700056000020FFFF000002300000014610B5F2 +:10DC80009F48002200680260037A9B001818C26057 +:10DC9000018211460C3000F022F910BDFFB50027BB +:10DCA00081B015460446002826D00026E01C8008D6 +:10DCB0008000A04200D0FFDF002D2DD00120FFF713 +:10DCC00015FA0C996843CA000A995118471801209F +:10DCD000FFF70CFA6843C1190B98C200049810189A +:10DCE0000818062169430818A900143008180818F4 +:10DCF00087B2002E02D00FE00126D7E7781A0C3841 +:10DD000086B27F480460204625720C3060600CF0BB +:10DD100085FC3046FFF7B2FF02980780002005B06F +:10DD2000F0BDFFB5764C0546206883B0002800D1D1 +:10DD3000FFDF2068017AA94205D9A9004268019154 +:10DD40005158002902D06F4807B0F0BD0068002884 +:10DD500000D1FFDF01210C9A0598FFF7C9F96A4E3F +:10DD6000C51C35400121069A0498FFF7C1F9C01C73 +:10DD7000304002904019001D86B2614800270068BB +:10DD8000046801E0274604462068002807D0A188DF +:10DD9000B142F7D13946204600F0AAF813E03046E8 +:10DDA0000830A18880B2814229D33946204600F04C +:10DDB0009FF8A0880022811BA0190260818039464B +:10DDC00000F08DF8A680A088608025802946201D5F +:10DDD0000C9D059A064601230095FFF790F92088CF +:10DDE000069D80190123049A02990095FFF787F98F +:10DDF00043480068416801980C500020A4E70420C3 +:10DE0000A2E770B53E4C06462068002800D1FFDF2F +:10DE10002068017AB14210D94568B300E85800285B +:10DE20000BD041880022EA5002608180114600F048 +:10DE300056F8216800200A7A08E0324870BD4B6825 +:10DE400084001B59002B0DD1401CC0B28242F6D871 +:10DE5000002002E08A88101880B209680029F9D1F0 +:10DE6000FFF70CFF002070BD70B5254D2868002815 +:10DE70000AD0002404E02046FFF7C3FF641CE4B28C +:10DE80002868007AA042F6D870BD70B51C4E0546D1 +:10DE900030680024002800D1FFDF3068017AA942F1 +:10DEA00005D94068A9004058002800D0041D20462C +:10DEB00070BD70B5124E054630680024002800D1B0 +:10DEC000FFDF3068017AA94207D94068A9004158AC +:10DED000002902D00888091D4418204670BD002979 +:10DEE00003D00A6802600860704705490968F8E7CE +:10DEF0000068002901D00860704701490968FAE705 +:10DF00005C00002002300000FCFF000070B50446F9 +:10DF100000780E46012819D0072802D00C2819D104 +:10DF200014E0A068216905780B2D0BD0052003F0C3 +:10DF300094FC052D0ED0782300220520216903F0E2 +:10DF4000FDFB07E0782300220620F8E70520216981 +:10DF500003F083FC3146204601F0A8F970BD30B5CE +:10DF6000411D0246393294780325C379ED432C4391 +:10DF70002340C371DB070DD04B79547923404B719B +:10DF80000B79127913400B718278C9788A4200D9D3 +:10DF9000817030BD00224A710A71F5E7417801298C +:10DFA00000D00C2101707047F7B58CB00D468C691C +:10DFB0000020694608732878012716462A287CD253 +:10DFC00043007B449B885B009F4429000503450375 +:10DFD00058039103A103BD03ED03050431045C0460 +:10DFE0007C049504DA04E9040B05140534055B058B +:10DFF0008C05B205DD05FA050406260640064C062A +:10E0000074069406E2061607240752076E07860771 +:10E010009907D20709083408F207F607FB07002C16 +:10E0200002D020781D282BD0A8680190002844D069 +:10E03000012168460173686A0790032168460174EC +:10E040000A214174286A0590A8880028EFD0019918 +:10E050000978002914D00F2912D20B000CF040FDD2 +:10E060000FFE1446D7FDFCFBFAF9F8F70990F6F518 +:10E07000FE00022821D1002C04D020780C2801D0E9 +:10E0800000275FE30220C3E10620696A03F0E5FB95 +:10E09000A8880728EED1204601F002F9022809D00D +:10E0A000204601F0FDF8032808D9204601F0F8F8D1 +:10E0B000072803D20120207005E018E2002CB6D01A +:10E0C00020780128D6D101980079C11F0A2901D3EF +:10E0D0000A2053E0A07020460722383001990CF046 +:10E0E0003EFA01202870032020703BE00728C1D1B0 +:10E0F000002C9CD020780D28BCD101982246C178F4 +:10E100002032D07E08400007C00F01D00E2000E072 +:10E110000F20890707D1019949790142D8D1019986 +:10E1200089790142D4D10199537F497907469F43A8 +:10E130003942CDD10199927F897990430142C7D16B +:10E1400001980079C11F0A29C2D2617F81427BD820 +:10E150000722201D01990CF002FA012028700E20E0 +:10E160002070032069460873686A0790204639309A +:10E170000490601D059017300690FEE02877F6E3C6 +:10E18000E9880891412885D1204601F089F80428C2 +:10E1900002D1E078C00704D1204601F081F80F28B1 +:10E1A00090D1089840210A1A01991746606A491CC3 +:10E1B0000CF0D5F9606AE968C019089A0CF0CFF93B +:10E1C0000E2069460873686A0790606A049000210F +:10E1D00003A8FFF79BFE2078042809D0A07F002821 +:10E1E00011D001280FD003280FD010202070B8E0E4 +:10E1F00005202070032028700A2168460173686A90 +:10E2000041210790F5E311203DE11220EEE71128AE +:10E21000B9D1204601F044F8042802D1E078C007C3 +:10E220000FD0204601F03CF8062805D1E078C00761 +:10E2300007D1A07F022804D0204601F031F8112830 +:10E24000A1D1102220460AE020E0C7E097E098E143 +:10E2500077E159E11BE1FCE0E3E01BE0B9E1019962 +:10E260004830491C0CF07BF9607801280AD0122054 +:10E270002070E078C00778D0A07F002871D00128F6 +:10E280006FD072E0607FA178884201D9062075E7DF +:10E290000720ABE71128BBD1204601F001F8082880 +:10E2A00004D0204600F0FCFF1328B1D128690028D3 +:10E2B0001BD06869002818D02046019978301022B8 +:10E2C000491C02900CF04BF92078082811D014203A +:10E2D0002070E078C0070ED0A07F022822D061789D +:10E2E00002291BD003283CD03FE000206946087378 +:10E2F000FDE00920ECE70B20287029690220487016 +:10E30000206C48600298886020463830C860201D24 +:10E310000861206B4861606B8861ACE3002801D024 +:10E3200001287DD10B2028702F6908207870606A41 +:10E330007860206AB860029860E2206C0CF070F996 +:10E34000E1788906C90E491EC840C007C00F803059 +:10E3500000E000203874E06A786164E20746DEE39A +:10E36000FFE7042028700520CCE10A2028706946C8 +:10E370000873686A07901120F8E33146F7E3112823 +:10E38000B6D1204600F08CFF0A2802D1E078C00701 +:10E3900004D1204600F084FF1528A9D10199204618 +:10E3A00010224830491C0CF0DAF820780A2810D0E6 +:10E3B000162020701220287029690A2048702046F3 +:10E3C00058304860203088601038C860206C086180 +:10E3D000A8E30B202070D1E22870B2E1022887D197 +:10E3E000204600F05DFF042804D3204600F058FFCB +:10E3F000082809D3204600F053FF0E2877D3204683 +:10E4000000F04EFF122872D2A07F0228B8D111204E +:10E4100069460873686A0790019840780874FAE3BF +:10E420004FE20228ACD1204600F03AFF00285ED02F +:10E43000204600F035FF0128F9D0204600F030FFDB +:10E440000C28F4D005206946087401984078487477 +:10E450004EE71128FCD1002CFAD020781728F7D1EC +:10E460006078E16A022810D000201822504318304A +:10E47000085801991022491C0CF071F80520696AAE +:10E4800000F002FF18202070FAE50120EDE70B28CC +:10E49000DED1002CDCD020781828D9D16078E16A50 +:10E4A000022825D000201822504310300958019826 +:10E4B00042780A70807848706078E16A022819D042 +:10E4C0000020182250431430085801990822C91C12 +:10E4D0000CF045F80520696A00F0D6FE6078022845 +:10E4E0000AD000210919497A490849006AE0A5E1E2 +:10E4F0000120D8E70120E4E70121F3E7012000E053 +:10E5000000200019417285E31128A1D1002C9FD071 +:10E51000207819289CD16078E16A02280FD0002069 +:10E52000182250431C30085801991022491C0CF045 +:10E5300016F80520696A00F0A7FE1A20A3E701205B +:10E54000EEE7082884D1002C86D020781A2886D1BE +:10E550000198E16A40780870E06A01990622401C3F +:10E56000891C0BF0FCFF0520696A00F08DFE6078C5 +:10E57000022804D000210919497AFD2221E0012155 +:10E58000F9E7112884D1002C84D020781B2884D16D +:10E590006078E16A022818D0002018225043203009 +:10E5A000085801991022491C0BF0D9FF0520696A0F +:10E5B00000F06AFE6078022809D000210919497A22 +:10E5C000FB22114002289BD198E70120E5E70121B9 +:10E5D000F4E70720D2E53078012896D11C22A01854 +:10E5E0007168F2F7D3FD3B21E079095D0840E178DD +:10E5F00000074908C00F49000843E070217F002947 +:10E6000001D029771AE1217803290BD0C00700D166 +:10E61000A7E6032028700A2069460873686A0790F5 +:10E620004120B3E302272771E1792046C906C90ECC +:10E63000E171617A0907090F6172A17A0907090F6F +:10E64000A172FFF78CFC2F700A2069460873686A74 +:10E65000079007209AE330781228D3D10720087357 +:10E66000696A079191680591694608820722211D10 +:10E6700005980BF074FF04202070CCE2F08808901D +:10E6800030781228BED107200873686A0790301DC1 +:10E6900007C804AB07C341206946088205980C21CE +:10E6A000017008994022571A3A46401C216A0BF023 +:10E6B00056FF206A089AC119F0680BF050FF00213C +:10E6C00003A8FFF723FCE078C1210840801CE0701C +:10E6D0002078052801D00F20D5E6A07F002800D1A2 +:10E6E000D6E50128FCD0032874D10820CBE6307889 +:10E6F000032887D120460822683071680BF02FFF6D +:10E700000520287069460873686A079035E63078F6 +:10E710000328A2D120460822703071680BF01FFF39 +:10E72000206C00283DD1A07F002805D0012803D00F +:10E73000062028700420E5E707202870F8482064A8 +:10E7400060640327FEE33078022886D13079002800 +:10E7500073D1A07F022802D0032805D021E0B06841 +:10E7600000286BD020641BE06078012806D03A2195 +:10E77000A079095D012805D0E94806E03A20A17991 +:10E78000005DF7E7B0680028EBD02064E078C007B0 +:10E7900001D0012901D0E24802E0F0680028E0D071 +:10E7A0006064072018E60A200873696A0791E17817 +:10E7B000C9070AD06178022904D1A17F002905D0B8 +:10E7C000012903D0A17F032900D00820287011203F +:10E7D00069467BE3CCE0307812288AD1B0682862A1 +:10E7E00009202870E0782F69C0070DD008207870C4 +:10E7F000206A7860606AB86020466830F860A07F60 +:10E80000022800D0A5E598E502207870206C786099 +:10E8100020466830B8603038F860201D3861206BC1 +:10E820007861606BB861686A3946786225E1E078A2 +:10E830003178C00703D0072002E0D8E0BCE20B200B +:10E840008142CAD1207807281AD0112020700721D0 +:10E8500068460173686A0790286A05901121684626 +:10E86000018205980321017051681022401C0BF0B1 +:10E8700076FE002103A8FFF749FB0020286203E68B +:10E880000820E3E730781228A7D107200873686AC8 +:10E890000790906805901120088205980421017066 +:10E8A000214610226831401C0BF059FE002103A8BC +:10E8B000FFF72CFB2078092801D01320E3E50A207C +:10E8C000207016E0E1783078C90701D0072100E018 +:10E8D0000B218842B5D120461022483071680BF0D8 +:10E8E00011FE002801D0042048E42078092800D136 +:10E8F0003BE50C2070E5E078C1073FD0A17F0129FE +:10E9000002D002291DD035E00D20287029690B2086 +:10E910004870607801280BD0206A4860606A88607F +:10E9200020466830C86010300861E06A4861A2E0A3 +:10E93000606A4860206A886020467830C860103875 +:10E94000F2E78106C90E142914D20621C84101211B +:10E95000C90640181A21C841E0706078012807D024 +:10E9600010202070042028700520694676E171E3AC +:10E97000062088E56078012800D185E50E202BE58A +:10E9800030780A28A6D1287010200873686A07908A +:10E9900050680490002103A8FFF7B8FAEAE7E0788E +:10E9A000C0070AD0A07F012803D10F2028700420BF +:10E9B00054E1102028700F2050E11520287029699B +:10E9C00003204870206C48606078012804D02046FD +:10E9D0007830886010388FE22046683088601030C8 +:10E9E0008AE230780228CDD130790028E1D028772A +:10E9F0002DE374E030781428FAD1112028702969A9 +:10EA00000920487070684860607801280DD0204661 +:10EA1000683088601030C860206B0861606B4861A6 +:10EA2000204658308861A06A22E02046783088600D +:10EA30001038F0E730780828DAD16078012801D062 +:10EA40001320F7E0A178A06A10224018511A0BF0A9 +:10EA5000E3FD1220287029690A20487020465830AA +:10EA60004860203088601038C860206C08614FE032 +:10EA7000C861E06A0862686A48620C9800F02DFC80 +:10EA80006CE430780928B3D12046102248307168F0 +:10EA90000BF038FD002801D00B209BE520780B28D7 +:10EAA00015D02046FFF75BFAA178A06A1022401823 +:10EAB000511A0BF0B1FD1620287008206946087322 +:10EAC000686A079000200490A078087555E4132028 +:10EAD00028700A2168460173686A11210790684608 +:10EAE00001744AE43078122886D1B0682862142074 +:10EAF000287029690A204870204658304860103034 +:10EB000088601030C860606C08616078012809D0A6 +:10EB1000204639304861206B8861606BA8E786E247 +:10EB2000AAAE0100601D4861606B8861206B9FE7A1 +:10EB300030780928A7D107200873686A0790286AE7 +:10EB400005901120088205980D2101701022401CAB +:10EB500071680BF004FD002103A8FFF7D7F900202E +:10EB600028626178012903D015208CE40EE17BE155 +:10EB70001621297008216A461173696A0791049069 +:10EB8000A0781075C2E530780C28ADD11620287019 +:10EB90006078022802D12046FFF7E1F9A178706879 +:10EBA00010224018511A0BF037FD082168460173F6 +:10EBB000686A079070680490A17868460175A5E5B9 +:10EBC0003078102890D1E079C00772D017202870D3 +:10EBD000092043E03078112886D120461422311DC7 +:10EBE0001C30F2F7D3FAE06A218D4172090A817272 +:10EBF000E16AA078C871E179E26A8907890F117228 +:10EC0000E16A627A0A73E16AA07A20310871607859 +:10EC100001286ED0AAE136E26078022801D00120F6 +:10EC200000E000200019407AC0070DD0E078C0074E +:10EC30000AD1192028700A2168460173686A079072 +:10EC400011216846017442E11E20ABE5307812289C +:10EC50009BD1B06828621A20287005200873686A62 +:10EC6000079034E1307803288FD16078E16A022878 +:10EC700001D0012000E00020182250431430085831 +:10EC8000082271680BF06BFC1B2028702969062292 +:10EC900068694A70626A4A606278E36A022A01D04F +:10ECA000012200E0002218277A4314329A588A6021 +:10ECB00022E184E130780F287ED16078E26A022870 +:10ECC00001D0012000E000201821484310301058E6 +:10ECD00002230932716809F049FF1C202870296954 +:10ECE00005204870206A4860E06A09308860FB4867 +:10ECF00002E159E130780E285ED16078E16A02289D +:10ED000001D0012000E0002018225043183008589C +:10ED1000A27871680BF023FC6078E16A022801D0C8 +:10ED2000012000E000201822504318300858A17834 +:10ED300010224018511A0BF06FFC07206946087327 +:10ED4000686A0790286A05901120088205980621B4 +:10ED500001706178E26A022901D0012100E00021FE +:10ED600018235943183151581022401C0BF0F7FB5F +:10ED7000002103A8FFF7CAF8002028621D20287090 +:10ED80000A2069460873686A07900B200874BDE47E +:10ED90003078122810D1072168460173686A0790FD +:10EDA000906805900B226846028205980170617890 +:10EDB000E26A022903D000E0A0E0012100E0002186 +:10EDC00018235943103151580A784270497881709C +:10EDD0006178E26A022901D0012100E000211823B4 +:10EDE0005943143151580822C01C0BF0B8FB0021C4 +:10EDF00003A8FFF78BF827E76078022801D00120ED +:10EE000000E000200019407A800701D51F2011E79B +:10EE10002120C7E43078122870D107200873686A6F +:10EE20000790B068059011200882059808270770A0 +:10EE30006178E26A022901D0012100E00021182353 +:10EE400059431C3151581022401C0BF088FB002103 +:10EE500003A8FFF75BF8202028700A206946087392 +:10EE6000686A07900F7451E403A8FFF74FF807E6AC +:10EE70003078122842D107200873686A079090689A +:10EE8000059008200882059809210170E169062291 +:10EE900009784170E169801C491C0BF060FB00217E +:10EEA00003A8FFF733F8B3E76078022801D0012107 +:10EEB00000E000210919497A49070AD52220287063 +:10EEC0000A2069460873686A079011200874114681 +:10EED000CAE701284AD069E0307812280ED1B0681C +:10EEE000286223202870296905204870206A48601C +:10EEF000E06A093088607A48C860BCE56EE0307826 +:10EF00000E286BD16078E16A022801D0012000E070 +:10EF100000201822504320300858102271680BF04E +:10EF20001EFB072069460873686A0790286A0590E7 +:10EF30001120088205980A2101706178E26A02298D +:10EF400003D000E0A4E0012100E000211823594390 +:10EF5000203151581022401C0BF001FB002103A866 +:10EF6000FEF7D4FF002028626078B2E7242019E47D +:10EF7000607802280BD000200019407AC10702D027 +:10EF8000E178C90705D0810705D5192096E401204D +:10EF9000F2E7172092E4400701D51B208EE41C20E5 +:10EFA00020706078012801D01820A3E42720A1E474 +:10EFB000282028700B2051E63078132847D12920CB +:10EFC00098E42078012842D00C2840D02046FEF753 +:10EFD000E5FF0C2069460873686A079037E03078CF +:10EFE000122805D0132010700327262028704FE028 +:10EFF000072168460173686A0790B068059002218E +:10F0000068460182059805210170297F4170002121 +:10F0100003A8FEF77BFF0B2168460173686A07901F +:10F02000314603A8FEF772FF074626202870012FFD +:10F030000DD02DE0012168460173686A0790042114 +:10F0400068460174297F41740020287713E0287FE7 +:10F05000002810D01D202070252028700A20694625 +:10F060000873686A079002200874314603A8FEF707 +:10F070004DFF07460CE0002C01D0FE2020706846B2 +:10F08000007B002804D0002103A8FEF73FFF74E4B2 +:10F0900038460FB0F0BDF7B50C464E690978012728 +:10F0A000072086B0002904D001294BD0022920D1A5 +:10F0B000C4E02179012906D0022916D0032911D0F4 +:10F0C000042916D126E07078012811D10620616A42 +:10F0D00002F09DFB00280CD102200EE0A2AE010040 +:10F0E000DCAD01001D203070F6E77178022901D0F7 +:10F0F000052790E031780C2923D169460871012059 +:10F100002070684621890079814211D20A2069461F +:10F1100008704AE03078011F042902D30E38032812 +:10F1200079D2B07F022876D12089022873D3D3E721 +:10F13000089812210170083408980ECC001D0EC0EA +:10F14000032768E008990978122964D16946087094 +:10F15000616A049108998D6802952179012906D088 +:10F1600002292AD0032911D0042954D15AE00227B8 +:10F17000684687800B202870207E0021C006C00EC4 +:10F1800068706846FEF7C2FE377043E002266846A4 +:10F19000868005202870207E687000216846FEF772 +:10F1A000B5FE26700B2168460170606A04906846BF +:10F1B0000899FEF7ABFE07462DE0694688800120DE +:10F1C0002870207F6870607FC007C00FA870A07F84 +:10F1D000C006C00EE870E17F2971C0071ED020462E +:10F1E000203001780907090F697140780007000F86 +:10F1F000A87100216846FEF789FE3046072229469D +:10F2000038300BF0ACF9A069407870772879B0708D +:10F210000D2030700027384609B0F0BD0020A871DD +:10F220006871E6E70220694688800E202870207EFB +:10F23000687000216846FEF769FEEBE7FE2030703B +:10F24000012168460170606A0490042168460171DA +:10F25000217E41710021EEE700B50023012285B037 +:10F2600005280CD0062808D16846027004910221B6 +:10F27000017143710021FEF749FE05B000BD6846EB +:10F28000027004910271F4E770B50C46054602F075 +:10F29000E4FA782300222146284602F04FFA70BD96 +:10F2A000002801D0007870470C20704770B50578B1 +:10F2B0000C000DD0002121702146F4F767F8774843 +:10F2C0002178405D884201D1032070BD022070BDCD +:10F2D0000021F4F75BF8002070BD027B032A05D003 +:10F2E00000220A704B780C2B02D003E004207047F8 +:10F2F0000A770A62027B9300521C0273C1500320FA +:10F300007047F0B585B00F4605460124287B800084 +:10F3100040198038C66F7078411E0D290AD25F49A6 +:10F320008000123140188038C36F3A463146284673 +:10F3300098470446002C01D0012C11D1287B401E97 +:10F340000006000E287301D00324DFE70D20694674 +:10F350000870706A0490002101966846FFF7A6FFC6 +:10F36000032CD3D0204605B0F0BD70B515460A4633 +:10F37000044629461046FFF7C4FF0646002C0FD06E +:10F380002078FE280CD1207E002806D0002028708E +:10F39000204629460C30FFF7B4FF2046FEF7FEFD5D +:10F3A000304670BD704770B50D46044688210BF09D +:10F3B00035F9012D03D0022D03D0052070BD0120A9 +:10F3C00000E0022060702046FEF7E8FD002070BDDE +:10F3D000002806D0027E002A03D00A4601460C31DE +:10F3E000C3E70120704730B5044687B00D460620BC +:10F3F00002F033FA2946052002F02FFA2078FE2881 +:10F4000005D00020694608702046FFF7E1FF07B0ED +:10F4100030BD7FB50E4600216A46117341780C2934 +:10F4200003D00D2903D0002407E0846900E044697B +:10F43000002C02D0217E002912D015460146284614 +:10F44000FFF74BFF032809D1324629462046FFF734 +:10F450008CFF6946097B002900D0042004B070BDF0 +:10F4600025460C35EAE710B590B00C4605216B46F1 +:10F470005970019009480992801E02900848039033 +:10F480000AA96846FFF7C5FF002805D110222046CB +:10F490000B990BF064F8002010B010BDE2AD010034 +:10F4A000A2AE010070B50D46040012D0002D10D0A0 +:10F4B000210128460BF0B0F81022534928460BF0E2 +:10F4C0004EF85148012108380180448045600020F1 +:10F4D00070BD012070BD70B54B4E00240546083E3E +:10F4E00011E0716820014018817BAA7B914209D10B +:10F4F000C17BEA7B914205D10C2229460BF002F830 +:10F50000002806D0641C30888442EADB0020C04317 +:10F5100070BD204670BD70B50D46060007D0002DA9 +:10F5200005D0FFF7D8FF002803DB401C14E01020B3 +:10F5300070BD354C083C20886288411C914201D93D +:10F54000042070BD616800014018102231460BF0A4 +:10F5500006F82088401C20802870002070BD70B5FF +:10F5600014460D001FD0002C1DD00021A1700228D0 +:10F5700002D0102817D108E06878297800020843E3 +:10F5800011D00121A17010800BE02846FFF7A3FFE6 +:10F59000002808DB401CA070687B297B0002084320 +:10F5A0002080002070BD012070BD70B50546144656 +:10F5B0000E000AD000203070A878012807D004D9A6 +:10F5C000114908390A8890420BD9012070BD002CDE +:10F5D00004D0287820702888000A50700220087013 +:10F5E00010E0002C0CD04968000141181022204680 +:10F5F00010390AF0B4FF287820732888000A607355 +:10F6000010203070002070BD68000020F8B5FC4C60 +:10F61000207EE17D884219D00126FA4D0027E07D49 +:10F62000215C14200A4642435019037C052B0ED05E +:10F63000037C062B19D0037C072B25D0437C012BA0 +:10F6400030D0FFDF207EE17D8842E8D1F8BD06742E +:10F65000E07D162807D0E07D401CE075491CC8B24B +:10F66000AA5802210CE00020F7E70674E07D162876 +:10F6700008D0E07D401CE075491CC8B2AA5803219F +:10F680009047DFE70020F6E70674E07D162807D0F4 +:10F69000E07D401CE075491CC8B2AA580821EFE77C +:10F6A0000020F7E74774E07D162807D0E07D401C76 +:10F6B000E075491CC8B2AA580721E1E70020F7E726 +:10F6C00070B50024D04E0C207072D048254644738B +:10F6D000047328300476C475CD480AF079F8CD4813 +:10F6E0000575F572CC49601E88607571B570F5704E +:10F6F00035717570C948E83905704570142060434C +:10F7000040180574641CE4B20B2CF7D30120F9F700 +:10F7100084FB0020F9F781FB0120B071F9F704FFA9 +:10F72000BF48F9F713FFBF4C2070BF48F9F70EFF31 +:10F730006070F9F715FB70BD10B5F9F73CFBB94CDB +:10F740002078F9F71EFF6078F9F71BFFAE4C207A9E +:10F75000002803D0F9F7DDFC0020207210BD0B203B +:10F760007047F8B5F9F7DDFBA74D0446A8790028E6 +:10F7700001D0FFDFF8BDE87A002800D1FFDFA64FF7 +:10F7800001237969A94A601A9B0598420ED30E1B82 +:10F790009E420BD3904203D9501A0019401C05E039 +:10F7A000964232D9101B4018401C4042002800DB12 +:10F7B000FFDF0126AE710024EC72687A0421142266 +:10F7C0005043904A80180174B868401C04D0481F08 +:10F7D000B8600120F9F721FB0020F9F71EFBF9F7CB +:10F7E00005FB0AF06FF9F9F7FCFB9148046004602F +:10F7F00001209049C0030860F3F7AAFB874800780E +:10F80000022807D0032802D006E0FFDFD0E7E8781F +:10F81000002801D0AE7000E0AC70F9F7CEFBF8BD67 +:10F82000034678490B20142242435218203A127F93 +:10F83000002A04D0401E0006000EF4D170471422A6 +:10F84000424351180A46803AD366012220390A778A +:10F850007047012805D0032805D1002903D10020D5 +:10F8600070470029FBD010B4674C002363706B4ACB +:10F87000002890700CD002280AD007291AD208005C +:10F8800078440079001887441505070D0F111300FF +:10F89000D37003E01B2000E03A20D070012060709C +:10F8A00010BC70475820F8E77720F6E79620F4E779 +:10F8B000B520F2E710BC0020704710B557484078DB +:10F8C000F9F796FB80B210BD411E1422504310B5CB +:10F8D0004C4A8418203C0A2902D8207F002800D1F5 +:10F8E000FFDF207F012800D0FFDF0020207710BD40 +:10F8F00070B5464C607B217B884201D1012500E038 +:10F900000025F9F70EFBF9F773FB617B227B91422F +:10F9100001D1012100E00021A942EBD170BDF7B572 +:10F920000646481E84468EB0C0B21422059050434D +:10F93000344A85180495287C2D1D07282AD1304C7F +:10F940000027E07D227E824221D0235C059A9342EB +:10F9500001D1012701E0002F04D0162811D0421C4C +:10F96000A25C225416280ED0401C227EC0B28242D5 +:10F97000EBD1002F0BD0207E002806D0207E401E29 +:10F9800004E00022ECE70020EFE716202076049A3E +:10F990000120107460461C4C0A2813D814204143DF +:10F9A000184808182038007F00280BD00498007CE5 +:10F9B000012808D00498007C012803D01098807A90 +:10F9C000012804D0FFDF1098807A012859D10498CB +:10F9D0000C4B007C02282FD0094C207E16285CD0CE +:10F9E000207EE17D401C884200D1FFDF0499012088 +:10F9F0004874217E05986054207E162851D052E02C +:10FA0000BC0B0020D80B0020E00C0020940B002041 +:10FA1000EC0C0020A40B0020C00C00207A00002079 +:10FA2000FD150100780000200DF60000FFFFFF002B +:10FA300000F5004080E200E0607A059A01469042BD +:10FA400006D0014614277843C018807C9042F8D134 +:10FA5000627A824208D1617A14225143C918897CA2 +:10FA600061720121A17207E014224243D2181427C7 +:10FA70007943927CC9188A7414220C215043C0180F +:10FA800081741098007A06281DD201007944097902 +:10FA900049188F440C161412100EE07D0028A4D0D3 +:10FAA000A4E7002001E0207E401C2076AFE000218A +:10FAB0000BE0B42109E0732107E0322105E00A21BF +:10FAC00003E0062101E0FFDF0021109802910068A9 +:10FAD000401A28601099097A002912D00221401A90 +:10FAE0000102090A29601098026840681018000293 +:10FAF000000A68601098807A0228109803D0007B72 +:10FB00006FE00421EBE7007A002812D0022202986D +:10FB10001218109843681046103018180A90FB48C5 +:10FB2000029B4078984202D9E378002B03D00A98D0 +:10FB300005E00422EBE7029BC31A0A981818637ABF +:10FB400011300C2B1CD0637A14277B43F04FDB1948 +:10FB50005B68994214D0EF4F617ABC461423594335 +:10FB6000EB4BC9184B6889689B1B891B1B02090258 +:10FB70001B0A090A984235D8634533D8614531D804 +:10FB800031180A980123081A0002000A2860109907 +:10FB90008018C9680002000A471ADF4A9B05BC4664 +:10FBA0009F4201D2384610E00F1A9F4201D26046B0 +:10FBB0000BE0944503D9511A0818401C05E0974200 +:10FBC00006D9101A4018401C404200285DDC00E0B5 +:10FBD000FFDF0A982968103808180002000A6860D8 +:10FBE000002028726868112710300002000A68603F +:10FBF0001098407AA8721098007A687203280ED282 +:10FC000000280CD001F07EFA002803D007E0002085 +:10FC100011B0F0BD3221029802910F1A1137BB4882 +:10FC20000178012901D0032909D14078029988423D +:10FC300005D9E178002902D10299401AC7196A68EA +:10FC40002868921B801B944601021202B14B090ADC +:10FC5000120A8F4219D81F46994216D8BA4214D8B0 +:10FC6000617A0C2915D0677A61460C2203920092C2 +:10FC70001422A74B7A43D21893689B1B834216D851 +:10FC80000397977C0C2FF3D16EE0059801F096F85E +:10FC9000BDE70499022205980A74627A0C2A00D002 +:10FCA000627A8A7460720120A07211B0F0BD0C2FCC +:10FCB0005AD0002238469446142203465343944AAD +:10FCC0009A1853689B1B8B4222D2907BAB7A984246 +:10FCD00018D804980521059D0174904C207E1628A3 +:10FCE0000CD0207EE17D401C884200D1FFDF207EC9 +:10FCF0002554207E162800D0D5E6D2E6E07D0028E7 +:10FD0000F4D0F4E701208446907C0C28D4D102E0A2 +:10FD10006146002927D03D46009014202A464243E0 +:10FD20007B480621161831741C38007E16287B4843 +:10FD300013D0017EC07D491C814200D1FFDF77488E +:10FD4000017E4554017E16290BD0017E491C0176A7 +:10FD5000B57C0098A842E0D106E0C07D0028EDD037 +:10FD6000EDE70021F3E7009704990220684D08743D +:10FD7000607AB84207D10499009888740598607237 +:10FD80000120A0721BE003980C2F0CD00C2800D18E +:10FD9000FFDF039814225043401905998174049998 +:10FDA000009888740BE00C2800D1FFDF0398142220 +:10FDB000504340190599817404990C2088740120DE +:10FDC00011B0F0BD30B50D46554A441900210B461F +:10FDD000101A8B4100D2FFDF5248854200DDFFDF61 +:10FDE0005148854200DAFFDF5048844205DA002C92 +:10FDF00001DB204630BD4D4800E04D48201830BDA5 +:10FE0000401E70B5C0B21421484341494418607B7C +:10FE1000062813D201007944097949188F44020C4D +:10FE20000A08060400202FE0B4200CE073200AE04A +:10FE3000322008E00A2006E0062004E0FFDF617BB4 +:10FE40000020002920D002214018616840180002DB +:10FE5000000AF9F7CDF80C256557314A44190021FD +:10FE60000B46101A8B4100D2FFDF2E48854200DD81 +:10FE7000FFDF2D48854200DAFFDF2C48844207DA95 +:10FE8000002C03DB204670BD0421DDE7274800E09D +:10FE90002748201870BDF0B5064683B0254801906C +:10FEA000457A029534687068001B07021A483F0AB9 +:10FEB000001B00900C2D40D01420294641431448CB +:10FEC0000122081884464168134892058646081B9B +:10FED000904210D3631A93420DD302467046724586 +:10FEE00003D900984018401C05E0734524D9411AF5 +:10FEF0000819401C404200281FDA60460295857CA4 +:10FF00000198C0790028D5D003B0F0BD7A00002058 +:10FF1000D80B0020FFFF3F00FFFFFF00BC0B0020BD +:10FF2000FF7F841E0020A10700E05EF80080841E91 +:10FF300000807BE1E00C0020FFDF0298854226D0A4 +:10FF400014214843FE490123401802908068FD496E +:10FF50009B058C46011B8646994210D3221A9A4271 +:10FF60000DD36346614503D900997144491C06E0ED +:10FF7000194662452DD9091A0819401C4142002929 +:10FF800005DD0298B17A807B814200D374460C2D46 +:10FF900015D0EB491420454368184268121B120221 +:10FFA000120ABA420BD2B37A827B934200D384689E +:10FFB000857C0198C0790028A6D10C2DEAD1306843 +:10FFC000A042A1D0E0190002000A3460706003B0C2 +:10FFD000F0BDFFDFDBE7F0B5DB490446486885B0DC +:10FFE000C005C00D1CD0103840B200280CDA020742 +:10FFF000120F083A920892005118C9698007C00E82 +:020000040001F9 +:10000000C1400806800F09E08108D04A890089189C +:1000100009688007C00EC1400806800F002808D07C +:1000200000272078002806D0012804D0002005B041 +:10003000F0BD0127F5E72079062813D201007944A5 +:10004000097949188F44020C0A080604002014E0BC +:10005000B4200CE073200AE0322008E00A2006E019 +:10006000062004E0FFDF21790020002905D00221CD +:100070004618B74D002F02D003E00421F8E7002016 +:10008000E871694602AAA068F8F7BDFF6946082230 +:100090008A56E06801A980180122C01C1F2801DAD5 +:1000A000019209E003AAF8F7AEFF6846007B00283A +:1000B00002D00198401C019000990198401810301E +:1000C0000002000A0190881B0002000A009060797B +:1000D0006946887200980390F8F723FF009A019B05 +:1000E000121A181A9B4912020002120A000A8A42C6 +:1000F00016D8884214D86846FFF7CDFE00990398B9 +:10010000814205D088190002000AF8F771FFA0604B +:100110000120E97900298AD0002FB0D005B0F0BDC8 +:100120000020F6E7F3B58FB08B480C460B9009F032 +:1001300057FB8A4A0F99864F5618894D203E002852 +:1001400008D08848007D002800D0FFDF20780128F3 +:100150007AD033E1687B162809D0687B297B401C64 +:10016000884200D1FFDF2078012804D009E0287BF5 +:100170000028F7D0F7E7F07F002800D0FFDF01204C +:10018000F077697B0F981422774E514389190874D0 +:100190002078022822D0687B1421484386192079D0 +:1001A00030726079707232460C323146A068F8F7CE +:1001B0002AFF0C2030560F2804DD1F3830733068BA +:1001C000401C30600C217156301DE26801905018BF +:1001D000C01C1F287EDA01200199DAE05A494868DC +:1001E000C005C00D1DD0103840B200280CDA02073F +:1001F000120F083A920892005118C9698007C00E80 +:10020000C1400806800F09E08108504A890089181A +:1002100009688007C00EC1400806800F002800D181 +:10022000FFDF687B1421484386190021E0686A4695 +:100230000691117006A9F8F7E6FE6A4600201056EE +:100240000F2802DD012001E0B2E0002006994018ED +:1002500007900220B0722079307260797072A068C5 +:10026000311DC01C06911F2801DA012009E0F8F7B2 +:10027000CAFE68460078002804D0069806990068EF +:10028000401C0860307A062813D2010079440979AD +:1002900049188F44020C0A08060400200BE0B42021 +:1002A00009E0732007E0322005E00A2003E0062081 +:1002B00001E0FFDF0020217900295CD002214018F5 +:1002C0000690716810300818079908900918069868 +:1002D000081A00E051E00C900020F871F8F721FEB8 +:1002E00004463060079820180002000AF060787A0F +:1002F0000C283CD0797A14204143114808184068F2 +:100300000899029040180002000A0390707A69462A +:10031000887402A8FFF7BFFD0299039A091B121BFC +:10032000090212020B4B090A120A0C9899421ED8B4 +:1003300082421CD80299069808180002000A15E0AB +:10034000D80B0020FFFFFF0000ED00E000E400E01C +:10035000E00C0020FFFF3F00EC0C0020B40C00205C +:10036000940B0020A40B0020D40900203060F87901 +:100370000028B1D110E00421A1E704AA0199F8F7FF +:1003800042FE6846007C002804D00198019900686C +:10039000401C08602078B072687B162806D0687B05 +:1003A000401C68730B9809F033FA40E00020F8E72E +:1003B000F07F002800D0FFDF0120F077FE490F9882 +:1003C00008742078022800D1FFDFFB4E20793072BC +:1003D0006079707232460C323146A068F8F713FE2D +:1003E0000C2030560F2804DD1F3830733068401C55 +:1003F00030600C22B256301DE16801908818C01C94 +:100400001F2802DA012001990BE003AA0199F8F7ED +:10041000FAFD6846007B002804D001980199006825 +:10042000401C08602078B072E34901200875687BA1 +:10043000297B884224D07C7A0C2C23D0F8F771FDDC +:1004400014214C43DD4961180A7C042A18D00A7C27 +:10045000032A15D04B6889681B1A081A1B02000270 +:10046000D74A1B0A000A112B0AD31146934207D818 +:10047000884205D8687B297B884201D0F8F79DFD2A +:1004800011B0F0BD687B297B8842F7D111B0F0BD77 +:1004900010B50020F8F7B1FC10BD10B50120F8F739 +:1004A000ACFC10BDC74800787047F1B50098022831 +:1004B0001AD0C54C607A0C2800D1FFDF0026A67147 +:1004C0000125E572607A03211422BC4F5043C01904 +:1004D0000174F8F777FD009800280AD0012825D08C +:1004E000032872D0FFDFF8BDB6480078F9F74FF85F +:1004F000F8BDB648007F002800D0FFDF6571B34D1E +:1005000000202E60F8F789FCA968481C04D001235C +:1005100000221846F8F7B4FC607A617A401CC0B239 +:10052000142251437A5801219047F8BD0120F8F771 +:1005300074FC607900280DD0A4488068401C09D064 +:10054000607A617A401CC0B2142251437A58062165 +:100550009047F8BD9D48007F012807D002280FD0A2 +:1005600003281FD0042831D0FFDFF8BD20790028F0 +:1005700003D02671F8F72BFDE57094480677F8BD97 +:10058000207A002802D1F8F79BFD2572607A617A03 +:10059000401CC0B2142251437A58002190478B4826 +:1005A0000677F8BD894F0123397B78680022411A0C +:1005B0001846F8F765FC2079002803D02671F8F773 +:1005C00006FDE57002203877F8BD19E07F4E2178EE +:1005D00070680123411A00221846F8F751FC207A6E +:1005E000002802D1F8F76CFD2572607A617A401C10 +:1005F000C0B2142251437A58002190473577F8BD94 +:10060000607A617A401CC0B2142251437A580521A5 +:100610008AE710B56C4C607A0C2800D1FFDF607A55 +:10062000617A401CC0B214225143644A52580421DA +:10063000904710BDF0B583B0F8F773FC00900C2024 +:10064000614C0290617A624801900C2920D0617A55 +:100650001420414359480918097C042918D0617AAB +:10066000142251430818007C03286ED00199009889 +:100670000A684968121A081A12020002504B120A3C +:10068000000A112A61D319469A425ED888425CD882 +:100690004E488068401C00D0FFDF00206071607A07 +:1006A0000C2807D16078002804D04A48C1784170EE +:1006B00081780170607A0C2815D0617A142041434A +:1006C0003E480918097C04290DD1617A0291617AAA +:1006D00001221423594309180A74617A59430818EE +:1006E000807C6072A2723C4D687B297B3B4F8842C4 +:1006F00033D03B4E287B142148438019007CC05DD9 +:100700000128287B06D048438019007CC05D022860 +:100710002FD041E0142148438019807A01280AD063 +:10072000287B0221142250438019007CC155287B6C +:10073000162808D00AE0287B002114225043801993 +:10074000007CC15528E0002002E0C5E1287B401C68 +:100750002873687B297B8842CCD1174D287D0028DF +:100760005DD0287CC15D01293CD0C05D022844D009 +:100770004BE0287B142148438019807A012800D05F +:10078000FFDF297B00201422514389198872297BBD +:1007900051438919097CC855287B14214843821983 +:1007A000287B48438019017C0098FFF7B8F8287B24 +:1007B0001628CBD1C7E70000A40B0020D80B0020DF +:1007C000FFFF3F0078000020E00C0020C00C00205C +:1007D000D00C00207A000020940B0020B30C0020E5 +:1007E000D4090020A97A012904D00221C155002092 +:1007F00028750AE00021C15507E0A87A012800D039 +:10080000FFDF0020A872297CC855287D002806D06B +:10081000297CFE4A0098FFF782F80020287502988C +:100820000C281CD0014614204143F9480818017CCB +:10083000012914D107210174F64D287E162839D0DC +:10084000287EE97D401C884200D1FFDF297E029886 +:100850006854287E162831D0287E401C2876607A7D +:100860000C287DD0A07A00287BD00020A072607A6E +:1008700014214843E6494618E748B56873680246BC +:10088000F6687C32C36796605560E44D687E002848 +:1008900016D00226607A1422DD4950434018407B6E +:1008A00006281BD201007944097949188F440A149B +:1008B00012100E0CE87D0028C7D0C7E70020CDE756 +:1008C0000426E7E700200BE0B42009E0732007E0EE +:1008D000322005E00A2003E0062001E0FFDF0020CF +:1008E0002873697E022901D0012910D12969009A53 +:1008F00009188A1A1202120A432A08D903206876B4 +:1009000032390802000A28613220287308E03228B0 +:1009100006D2207A00280AD1F8F7D2FB012005E0A0 +:10092000207A002803D0F8F7F4FB00202072BC499D +:100930001122487820700978012901D0032906D1B5 +:1009400001212171297B884201D9421A1132A378F1 +:10095000002B00D0921C2179002904D1002B01E04A +:1009600086E094E05AD09446AE4A00990092019AEB +:10097000176852687F1A511A3F0209023F0A090A92 +:10098000BC451BD8A74A974218D8009A914215D85F +:10099000297B884223D92B69421A9A1A1202120A19 +:1009A000101880190002000A2A616860002914D01A +:1009B000032028770006000E3BD149E0002020717B +:1009C000A070297B002922D02869401880190002D4 +:1009D000000A6860022028772BE00120E9E78142C5 +:1009E0000BD92A69511889190902090A6960002876 +:1009F00001D00420DDE70220DBE7002B00D1FFDF80 +:100A0000286980190002000A6860002004E0296952 +:100A100089190902090A6960287719E0287B0028EA +:100A20000FD02969081880190002000A68600220A6 +:100A3000287728690123811900221846F8F720FA3F +:100A400009E0286980190002000A68600020287700 +:100A50000120F8F7E2F9607A142148436C490C222E +:100A600040188256012300206968F8F709FA0EE061 +:100A70000120F8F7D2F90020F8F7CFF9F8F7B6F926 +:100A8000207A002803D0F8F744FB00202072A078D9 +:100A9000002804D0F8F79BFA0020E070A07060787E +:100AA000002804D05E48C1784170817801702079B7 +:100AB000002806D000205A49E0700978002900D1AA +:100AC00020715448017EC07D814203D05648407851 +:100AD000F8F75DFD0120E07103B0F0BDF0B5534CB7 +:100AE0000746607A83B00C2800D1FFDF607A1421BA +:100AF000474E48438019007C032800D0FFDF474D54 +:100B0000A868401C00D0FFDF607A14214843811997 +:100B10000C20085600216A4600911171C01901AAE3 +:100B20006946F8F770FA6A46042010560F2801DD6E +:100B3000012000E000200099401869684018010277 +:100B4000090AA9606079002804D001230022184610 +:100B5000F8F796F903B0F0BD30B5364C344A0B1AAD +:100B6000A34211D3451AA5420ED3934203D9101ABA +:100B700043185B1C08E0954204D9511A0818401C20 +:100B8000434201E0FFDF0023184630BD10B50146A7 +:100B9000012300220220F8F773F910BD10B50220DE +:100BA000F8F73BF910BD10B5F8F7BBF910BDF0B57B +:100BB0001E4D0446E87A83B0002800D1FFDF642C84 +:100BC00068D31D4900200246091B824162D31B489D +:100BD000417B007B81425DD10C48007D002859D1CA +:100BE000687A14210A4F48430C4EC519306801AA8F +:100BF00000196946F8F707FA6946042008560028E4 +:100C000002DD0098401C0090A96819E0A40B0020A8 +:100C1000D80B0020BC0B0020540C0020C00C00207E +:100C20007A000020FFFF3F0078000020E00C002049 +:100C3000FF7F841E0020A107FF1FA107940B002047 +:100C400000986B680A18D21A12026D4B120A9A4267 +:100C500020D8AA7C0C2A08D014235A43D2195268EF +:100C6000511A0902090A814214D3B068401C05D008 +:100C70000120F8F7D2F80020C043B06030680019B6 +:100C80003060A868009940180002000A70610120D5 +:100C900003B0F0BD002003B0F0BDF0B50646401E25 +:100CA000C5B21420574968434418207C002800D15D +:100CB000FFDF5548017B407B81420CD0534A14230F +:100CC0004B439B181B7CB3420CD016290CD0491CFB +:100CD000C9B28142F3D14E48017D002964D0007C25 +:100CE000B04261D10020F0BD0021F1E7217C05294F +:100CF00005D0217C062902D0217C072928D1012199 +:100D00002174C17D0023027E8A4221D00246565CB6 +:100D1000AE4201D1012301E0002B04D0162911D0ED +:100D20004E1C965D565416290ED0491C167EC9B22B +:100D30008E42ECD1002B0BD0117E002906D0117E03 +:100D4000491E04E00026ECE70021EFE716211176AA +:100D5000617C00292AD06774C17D0023027E8A420B +:100D600024D0425CAA4201D1012301E0002B04D02F +:100D7000162912D04A1C825C425416290FD0491CF5 +:100D8000027EC9B28A42ECD1002B0FD0027E01460E +:100D9000002A06D00A7E521E04E00022EBE7002162 +:100DA000EEE716220A7601E01A480027217C012985 +:100DB0009CD1617C002999D10120F0BD30B5054658 +:100DC0001420104A0521684380180174114C207EBC +:100DD00016280ED0207EE17D401C884200D1FFDF26 +:100DE000207E2554207E162807D0207E401C2076A9 +:100DF00030BDE07D0028F2D0F2E70020F7E70000E8 +:100E0000FFFF3F00D80B0020940B0020D4090020E6 +:100E1000A40B0020BC0B0020F0B5794A1468794E71 +:100E2000002533780121002B06D1774B5D60032725 +:100E30009F6004271F6131701560744BD960196081 +:100E4000724E714D40364035F160EF688742FBD3FA +:100E50005960D9601460F0BDF8B5044680070025DC +:100E60000126002804DA6A48C563C6630220844369 +:100E7000684FE00405D5684846606848876080147C +:100E80008443600003D56648456080058443E005DF +:100E90000CD55B480560634887605B4845608560AA +:100EA000042101615948066180158443A00409D5D5 +:100EB0005D4846605D4805605D4887605D48456007 +:100EC000401484436004C10F20040090C00F81428D +:100ED00000D0FFDF0098800F13D057484660574876 +:100EE000876057498E6057480560574A9760574852 +:100EF000056046608E609760056046600320800351 +:100F0000844320050BD5524846608660514887606F +:100F100050484030876050488560C014844308F0D2 +:100F2000B1FD4E48044200D0FFDFF8BDF0B500210E +:100F300020270A46FF230446CC40E4072ED04CB2BB +:100F4000E606F60E0125B540454E3560454E356046 +:100F5000002C13DA25072D0F083DAE08424DB600D0 +:100F60007619F569B446A407E40E1E46A640B543BB +:100F70001646A64035436646F5610FE0A6083B4D90 +:100F8000B60076193568B446A407E40E1E46A6409E +:100F9000B5431646A640354366463560491CB942FE +:100FA000C9D3F0BD70B5174C0D466060FFF754FF14 +:100FB0006068FFF7BBFF2846F8F74DF908F0C2F963 +:100FC00000F000F908F05EFD08F0ADFCF8F7ACFAAF +:100FD00008F050FA70BD10B50A4C6068FFF73CFF8E +:100FE0006068FFF7A3FF08F04DFDF8F7E6F9002071 +:100FF000606010BD034840687047022070470000E1 +:1010000000820040800000200085004000800040F9 +:10101000C01F0040FFFFFFFF00C0004000C30040B2 +:1010200000E501400083004000D0004000D20040B5 +:1010300000D3004000D5004000E0004000E3004045 +:1010400000F0004000F2004000F3004000F50040D6 +:1010500000B0004000B3004000B50040FEFF0FFCB0 +:1010600080E100E080E200E000ED00E000E400E06C +:1010700070B51E490A68002A17D000231D460124B6 +:101080004A68521C4A60092A00D34D600E792246F4 +:10109000B2400E6816420AD072B60B6893430B60DA +:1010A00062B649680160002070BD052070BD5B1C00 +:1010B000092BE5D3FFDFF8E701200D498005086023 +:1010C0007047EFF31081CA07D20F72B60121814039 +:1010D0000648036819430160002A00D162B6EBE7B5 +:1010E0000248002101604160704700008800002034 +:1010F00000E200E0012081070860704701208107BD +:10110000486070471048C068C00700D00120704791 +:101110000D488068C00700D0012070470A48406928 +:10112000C00700D0012070470748C06970470649D2 +:101130008A69D20306D589698907890F814201D15D +:101140000120704700207047000400408107C90E4D +:10115000002808DA0007000F08388008BD4A800020 +:101160008018C06904E08008BB4A800080180068CD +:10117000C8400006800F7047B8494878897888428F +:1011800001D3401A02E02122511A0818C0B2704758 +:10119000B249233148788978884201D3401A02E065 +:1011A0002122511A0818C0B27047AC49463148781C +:1011B0008978884201D3401A02E02122511A081886 +:1011C000C0B27047A44910B50C310868FF22120262 +:1011D00090430122D20310430860A049002023312C +:1011E000487088702339487088704631487088701C +:1011F0009B4808F0EDFA9A48401C08F0E9FAF8F725 +:1012000039F900F01DF910BD20207047B4E770B522 +:101210000C4605460026FFF7AFFF9049A04214D3C5 +:101220000A46203A00232046641EE4B200280BD070 +:101230008878105C287088786D1C401CC0B288705B +:101240002128F0D18B70EEE7012600F0F9F8304646 +:1012500070BD202070479BE770B50C460546002600 +:10126000FFF796FF7D492331A04214D30A46203A66 +:1012700000232046641EE4B200280BD08878105C5E +:10128000287088786D1C401CC0B288702128F0D16D +:101290008B70EEE7012600F0D3F8304670BD2021B8 +:1012A00001700020704710B50446FFF77EFF2070E4 +:1012B000002010BD70B50C460546FFF776FF674964 +:1012C0004631A04215D30A46203A00232046641E28 +:1012D000E4B200280BD08878105C287088786D1CE8 +:1012E000401CC0B288702128F0D18B70EEE700243A +:1012F00000E05C4C00F0A4F8204670BD70B50C46D0 +:101300000546212900D9FFDF52484068103840B215 +:10131000FFF71CFFC6B20D20FFF718FFC0B28642D0 +:1013200003D2FFDF01E0F8F7E2F821462846FFF795 +:101330006EFF0028F7D070BDF8B507464848474C07 +:10134000401E464E0078254646362335002806D1F5 +:10135000A9786878212200F068F800280ED0A178DA +:101360006078212200F061F8002814D0B1787078FC +:10137000212200F05AF8002828D033E03749687855 +:10138000C91C0F546878401CC0B26870212829D14C +:101390000020687026E03149607820390F54607869 +:1013A000401CC0B26070212801D1002060702C4F19 +:1013B0007F1E3878002815D0A1786078212200F0AF +:1013C00034F800280ED0002038700BE023497078E4 +:1013D00026310F547078401CC0B27070212801D1A2 +:1013E00000207070A9786878212200F01EF800288B +:1013F0001AD0A1786078212200F017F8002813D0C5 +:10140000B1787078212200F010F800280CD0F8F79D +:1014100053F8134808F0E4F901214903884200D049 +:10142000FFDF0F4808F0F4F9F8BD401C884205D0F2 +:10143000904201D1002901D000207047012070475F +:1014400010B5074808F0CCF9002801D1F8F723F8C7 +:1014500010BD000000ED00E000E400E0100D0020F1 +:1014600091000020072000000C4908784A78401CB1 +:10147000C0B2904200D008707047094A074820BFA8 +:1014800040BF20BF4178037843701368002B02D11E +:1014900003788B42F3D000207047000093000020B7 +:1014A00000E200E0F0B50121184A08031060184A74 +:1014B00000231360174B1860174803690569DB4365 +:1014C000DB06DB17102425430561144D6960144EBB +:1014D00031605B1C00E020BF1768002FFBD0002BA1 +:1014E00002D10369A34303610E4880687160A9605B +:1014F000002111600121074A09031160F0BD10B5F8 +:101500000446FFF7CFFF2060002010BD80E100E01F +:1015100000C1004080E200E000ED00E000C30040B8 +:1015200000C0004000C50040FEB5EA4C07466068B8 +:10153000FF213E0181552178FF2913D0090108318F +:1015400041583246491E083209020192090A805860 +:1015500000F0B6F9002802D02478254615E061682D +:10156000207888552770FEBDDA48426801981158E6 +:10157000280100900830105800F0A2F9002806D188 +:10158000D4482C46416800980D5CFF2DECD1D14821 +:101590002101406885554754FEBD70B5CD4A0446CB +:1015A0000020157A53680AE00201561C9E5DA6428F +:1015B00003D10C329A588A4204D0401CC0B28542F2 +:1015C000F2D8FF2070BD10B5FFF7EDFAC14C01460F +:1015D0002078626800010830105800F071F9012885 +:1015E00007D920786168000108300858FFF7CEFA63 +:1015F00010BDFEF757FFF7F7CAFF10BDF8B5B54F9E +:101600003E78FFF7D0FA0146FF2E68D03401254618 +:1016100078680835405900F053F9022802D97868F3 +:1016200040595AE0AB494868025D0A70A11C425C0F +:10163000002A0CD0521E425441590122D205891869 +:101640000902090A41513046FFF76EFF30E0631C82 +:10165000C25C0092221D94468258002A10D00123B9 +:101660009B029A420FD99205920D43595703DB19F9 +:101670001B021B0A43516346C3589A1A920A09E097 +:10168000FF21C1540AE0435952039A181202120A68 +:101690004251002242543046FFF746FF8D480C3439 +:1016A0004168C26800980959800012580098904714 +:1016B000884C2078FF2812D0FFF775FA0146207871 +:1016C000626800010830105800F0FAF8012896D935 +:1016D00020786168000108300858FFF757FAF8BD14 +:1016E000F0B51D4614460E460746FF2B00D3FFDF1C +:1016F000A00700D0FFDF7748FF21C7604460057274 +:101700000674017000224270104604E00201521C6F +:10171000401CA154C0B2A842F8D3F0BD70B56D4CC6 +:1017200006466578207C854200D3FFDFE068A9008B +:1017300046506078401C6070284670BDFFB581B08F +:101740001D46FF24FFF72FFA624F0646797801986D +:10175000814200D8FFDF5F480021037A406810E033 +:101760000A019446521C825CFF2A25D0019FBA428E +:1017700005D162460C328758029A97421ED0491C06 +:10178000C9B28B42ECD8FF2C18D021014A1C019B16 +:1017900083540B460C33029AC250039B4D4F0022D8 +:1017A000012B0ED00B1DC25001239B029D4216D966 +:1017B000AA05920D08D008E00C46E0E7FF2005B02E +:1017C000F0BD0B1DC550EFE71A4653039B190E469B +:1017D0001B0208361B0AAA1A8351920A09E0002D3F +:1017E00000D101256B039B191D022D0A0B460833FE +:1017F000C550891C42543D463E782046FFF794FE72 +:101800002878B04201D0FFF7DEFE0198D7E770B527 +:101810000C460546FFF7C7F9064621462846FFF75E +:10182000BCFEFF2817D02B4D040120466968083004 +:101830000858314600F044F801210903401869684E +:10184000A41C095D400B002901D08902081800285A +:1018500000D1012070BD002070BDF3B581B00F46EE +:101860000198FFF79AFEFF2819D01A4E3578716853 +:101870002A462C4604E0844205D025462301CC5C50 +:10188000FF2CF8D10BE0FF2C09D0A5420BD11001A1 +:10189000085C3070FF2804D0FFF795FE03E00020BD +:1018A000FEBDFFF77BF939460198FFF7B0FF220133 +:1018B0007168FF23541C0B558A5C2B01CA54FEBD72 +:1018C000401A00020121000AC905884200D90020FF +:1018D000704700005C0D002070B504462748844224 +:1018E00001D2012500E0002500F03FF8244900283E +:1018F00006D08C420BD32348006804E0284370BD17 +:101900008C4204D32048844201D20120F6E7002013 +:10191000F4E710B5044600F028F8012189070028F3 +:1019200006D01848006804E08C4204D2012003E08D +:1019300015488442F8D200200121484010BD10B55E +:10194000002805D0FFF7E5FF002801D0012010BDD9 +:10195000002010BD10B5002805D0FFF7BDFF0028FE +:1019600001D0012010BD002010BD084808490068C2 +:10197000884201D1012070470020704700B001006B +:10198000000000201C00002008000020980000201B +:10199000BEBAFECA3B48002101704170102181701F +:1019A000704770B5064614460D460220F1F78CFAD2 +:1019B00001203449344A0870E41E14619660556071 +:1019C00070BD10B50220F1F77FFA2E490120087092 +:1019D0002E48002101604160816001202C49C00532 +:1019E000486010BD10B527480178002917D00121A3 +:1019F000274AC905916025490B680022002B05D0B4 +:101A00004B68002B02D08968002902D04270102157 +:101A100003E0012141701F490968817002700020B4 +:101A2000F1F752FA10BD17480178002912D0174873 +:101A3000016800290AD00168002905D04168002901 +:101A400002D08068002803D0002070470220704731 +:101A500001207047407870470A48017800290FD06C +:101A60000A480168002905D04168002902D0806831 +:101A7000002801D01020704706480068C0B27047A7 +:101A8000807870479C00002000F5004000F1004085 +:101A900000F5014000F400402C4800210170417025 +:101AA000704770B5064614460D460120F1F70CFA52 +:101AB00026490120264B08709E60DC601D6170BDC8 +:101AC000F8B504460120F1F7FFF92049012008701C +:101AD0001F494C601F4900264E6003211E4D090618 +:101AE000A9601E4F002C07D0012C00D0FFDF3E6004 +:101AF000032000066860F8BD386001200006F9E7A1 +:101B000010B51248017800290ED00321124A0906A7 +:101B1000916010494A680021002A03D0104A1268D7 +:101B2000427000E0417001700020F1F7CDF910BD66 +:101B300006480178002907D006484068002802D0EE +:101B400007480068C0B27047407870479F00002087 +:101B500000F5004000F1004000F5014000F20040B7 +:101B600000F4004070B5FC4D00246C702C706C616A +:101B70006C72AC720120E8726C776C62F748EC62B0 +:101B800007F026FE002800D0FFDF2C7670BD00B5E0 +:101B9000F349002803D0012805D0FFDF00BDF1483C +:101BA0004861F14802E0F1484861F148886100BDB0 +:101BB000F0B50125EF4902260E60EF490027CF63FB +:101BC000CD63EE49C96A09070DD4ED49CB6AED4AE8 +:101BD00053620B6B93624B6BD3628B6B1363C96B5A +:101BE000D30519435163DE4C00281FD0012821D0B2 +:101BF000FFDFE548A063FF20043060632563032016 +:101C00002061E24996204860D349182008560722EF +:101C1000D243811A90422ED011DC163134D00A29D9 +:101C200030D00E292CD012290FD127E0CD48606189 +:101C3000CD4802E0CD486061CD48A061D9E7001DE4 +:101C400017D0042813D008280ED0FFDFD149D04880 +:101C50008860D248D0494160D1490160D1480660CE +:101C6000D14910204860F0BD0420E060EEE7E76055 +:101C7000ECE7FC2000E0F820E060E7E7F420FBE779 +:101C8000F020F9E7EC20F7E7D820F5E710B50C468F +:101C90000146C64808F0FFFEAF48047210BDAE48CA +:101CA000407F7047AC4A517010707047F0B50446E1 +:101CB0000D4650791179000208436900091908841A +:101CC000501C01460E78012730464E7836023043CC +:101CD0008E78C9783604304309060843117800022B +:101CE0000843A9006050284608303E468640002B35 +:101CF00008D0012B00D0FFDF206B3043AF403843CA +:101D00002063F0BD206BB043F8E730B50D460446C4 +:101D1000082900D9FFDF0022002D0CD9A44891002A +:101D2000635809180B6053001B191B8C0B62521C63 +:101D3000D2B2AA42F3D3206B9E49086030BD10B5E1 +:101D400004460722D2430830854994421AD008DC61 +:101D500016301FD00A281BD00E2817D0122806D103 +:101D600012E0201D0CD0042807D0082803D0FFDF84 +:101D70007948047610BD042000E00020C860F7E731 +:101D8000FC20FBE7F820F9E7F420F7E7F020F5E77F +:101D9000EC20F3E7D820F1E78748007A70477049D4 +:101DA000C2784A6202461378184653781B021843D9 +:101DB0009378D2781B041843120610430002C861BE +:101DC0007047252808D0262808D0272808D04100A9 +:101DD0000A2807D8091D06E0022105E01A2103E0C0 +:101DE000502101E0891DC9B25D4A9160674948618F +:101DF0007047594948617047F8B5002812D0022051 +:101E0000554E6E4AB07203231360624C604A6260A2 +:101E100001276B4D002907D001290BD002291DD0C5 +:101E2000FFDFF8BD0120EBE7012801D06F60F8BDAE +:101E30002F60F8BD48490128C96A03D0022807D09D +:101E4000FFDFF8BD012000050143F1626060F8BDCD +:101E5000012040050143F1626060F8BD706900280F +:101E600000D1FFDF7169706A4018564988604B489D +:101E700055498160B17A012917D05449C1600120C8 +:101E8000F16AC0030143F1624C490E68464A1020D2 +:101E90009060002008603F4A09149160FF216A4663 +:101EA00011704B4C20612F6104E0C560E7E71078AA +:101EB000401E10701078002802D020690028F6D04B +:101EC0001078002800D1FFDF0020E0602061606012 +:101ED0006061A0613948066001142E484160324AB1 +:101EE00010215160C9024160F8BDF8B5334801685E +:101EF0008F082D49BF004A68D206D60F10228A608B +:101F000000240460234822498160FF20694608704C +:101F10002F4D2C612A490120086103E069460878A9 +:101F2000401E087068460078002802D02869002802 +:101F3000F4D068460078002800D1FFDF2C61064805 +:101F4000012144728472C1721C480760002E02D0C5 +:101F5000154910204860F8BD700D0020A00D00202C +:101F600000150040060102002500030205010300E0 +:101F70001F00030280E100E0C01F0040800000104D +:101F8000C0000010001700405B0600004015004034 +:101F90000040000400F501404080004080F5014011 +:101FA0001011004080E200E000130040720D00209C +:101FB0000016004040160040900D00200012004026 +:101FC000001000404085004048810040041000405F +:101FD0000011004001460A7810464A781202104368 +:101FE0008A78C97812041043090608430002FD49A3 +:101FF000000AC8637047FC4902200860FB4908607A +:102000007047FB49022008607047FA490870704722 +:1020100010B5F94807F0E4FB002800D0FFDF10BD41 +:1020200010B5F54807F0F4FB10BDEE494860704765 +:1020300030B5F24C0546606AA84200D3FFDF0120AC +:102040002073EF49002025614860EE48456001207B +:10205000E16A80050143E162EB49486030BDE74831 +:1020600002210173C6210161E54A00215160416AE4 +:10207000E44AC63151600121C26A89050A43C2623D +:10208000E148416070470121DF4889058160DB48F4 +:10209000C26A8A430021C26201737047DB48012192 +:1020A0004160C160D64900204860D6494860D349A4 +:1020B00048627047D64940200862D6490A68024300 +:1020C0000A607047D3480168402291430160D049BB +:1020D000002008627047CF480168102291430160D8 +:1020E000CD49012088617047CC490020C861C948AA +:1020F00001681022114301607047C849CA69012A6A +:1021000001D000207047C24A92685206520E5242D5 +:1021100002700020C8610120704730B50C000546F0 +:1021200000D1FFDFE00702D0012C00D0FFDF002D3F +:102130000AD00221B14801294172C472B54805D0C4 +:10214000022908D0FFDF30BD0121F3E70168042236 +:102150001143016030BD016808221143016030BDA8 +:10216000F8B5A64C0025E17A8A0701D5420712D4BA +:10217000CA0606D5AA4A537A002B02D0927A002AC0 +:1021800009D00A0702D5227F002A04D1490703D5C6 +:10219000617F002900D10125677A002201239D4932 +:1021A000002F1AD00226304028433BD0086886080A +:1021B0009C48B6004568ED06ED0F102787600020AB +:1021C0000860914A98499160FF216A461170934FC7 +:1021D00038619149012008610CE08B4D9248A8605C +:1021E0000868800880000860A272E372F8BD107869 +:1021F000401E10701078002802D038690028F6D0F0 +:102200001078002800D1FFDF002038616072A072D2 +:102210000120E0727F480660002DE7D08148102140 +:102220004160F8BD012F03D0022F09D0FFDFF8BDB8 +:1022300008680425A84308606272E372A372F8BDBF +:1022400008680825A84308606272E372A672F8BDA8 +:10225000F8B56A486C49C26A8A600021C162017B94 +:10226000674D002902D06968012909D000236B4C11 +:102270002169012906D00022817A012904D006E0D3 +:102280000123F4E74022F7E7E668012E04D0002698 +:102290001643012902D004E02026F9E76268012AEA +:1022A00005D000223243614F022902D007E01022FC +:1022B000F8E73E68012E02D1E668012E04D0002620 +:1022C0001643022902D007E00826F9E73A68002AF7 +:1022D00002D1E268012A04D000223243022902D04E +:1022E00005E00422F9E7002B01D0022300E00023DF +:1022F0001343022907D16068012804D168680128C6 +:1023000001D0012700E0002749481F430168090662 +:10231000090E02D06169012900D00021404E3172BE +:1023200000680006000E02D0A069012800D000203D +:1023300070723748006A002803D0FFF774FB012849 +:1023400000D00020B0720026E660266166606661FB +:10235000A6612B4846602B483D464168274C2162C8 +:1023600000686062A07A022809D16078002806D04F +:102370001C4A526812780240207890430CD026778D +:102380001C4FE8070BD038782A4A400880001258C2 +:1023900008469047012109E001202077F0E7A806D0 +:1023A00001D5022102E0A80707D500213A78224B87 +:1023B000520892009A58606A90473878C0073FD117 +:1023C000084841680622A01C093108F09BF8002843 +:1023D00034D10448217A40680078C00981422DD167 +:1023E00001202CE00015004080E100E080E200E0E8 +:1023F00000E100E0A1000020A00D0020700D0020F1 +:10240000408100404085004000F5014000800040D0 +:102410004015004000120040001000400011004034 +:10242000900D002000130040004000040014004004 +:102430004016004028AE010030AE01000020607759 +:102440002846FFF78DFEA80704D53878214980007B +:10245000085880472807810F05D03978C00F1E4AD9 +:10246000890051588847A80604D538781B49800050 +:10247000085880473878022805D16E200540402D45 +:1024800005D101F048F83878042800D3FFDFA07A9E +:10249000022818D1207B002815D011494E6002284F +:1024A00012D0012800D0FFDF616A2069884200D87D +:1024B000FFDF0C48216941600120E16A800501438A +:1024C000E16209494860F8BD2169606A4118054820 +:1024D0004160F1E738AE010048AE010058AE01009E +:1024E000408100404085004000F5014010B548485B +:1024F00006F06CF90021464806F0A1F90121444894 +:1025000006F069F9434800218170444942488884B3 +:1025100043490880488010BD10B53D4806F056F983 +:1025200000213B4806F08BF90121394806F053F9A8 +:1025300038480021817039493748888438490880F3 +:10254000488010BD704735498A8C824204D1314899 +:1025500000228270501E888470472D4901607047A8 +:102560002F49088070472D492B4A898C914209D107 +:1025700028498A782039012A02D001600120704759 +:102580000020704700210160084670472548017807 +:10259000012907D001210170214820490088888441 +:1025A00001207047002070471D49488070471B4933 +:1025B0001B4A898C5288914207D116498A78203962 +:1025C000002A02D0016001207047002070471348A4 +:1025D000134A818C528891420AD10021C9438184D7 +:1025E00022300178002903D00021017001207047BA +:1025F0000020704709480A49808C4988884205D1E3 +:1026000004488078002801D00020704701207047DE +:10261000CA0D0020C40D0020FFFF0000A40D002003 +:10262000A2000020C60D002070B5FF4E0446307990 +:102630000025012805D0FD4EB07901280CD00020DE +:1026400070BD002915D1657014202070F849A01CB8 +:1026500008F02EFA35710CE000290AD165701320BC +:1026600020701C22F349A01C07F079FF0120A07103 +:10267000B571012070BDED488079002802D0EE4888 +:10268000408D7047ED487047F8B5ED480178002956 +:1026900002D00C263046F8BD0026E74D34462E7594 +:1026A0006E75AE75EE752E766E76E6496E734E7368 +:1026B000DE4F7F213E718170A87E002804D0FFF795 +:1026C00001FDFFF78FF9AC76BC71DF4805F01CFF08 +:1026D000DE4805F019FFDDE770B5D94A0024147013 +:1026E000DB4B1966D8651078002801D0FFDF70BD7C +:1026F000D14D2C756C75AC75EC752C766C76D1481B +:102700006C734473C94E7F2034719070A87E00288A +:1027100004D0FFF7D7FCFFF765F9AC76B471CA486F +:1027200005F0F2FEC94805F0EFFE70BDC248007D1D +:10273000704700B5C049C87B897B42078307D20F29 +:10274000DB0FC007D218C00F10184000052911D2A6 +:102750000A007A4412799218974409050902070081 +:10276000BC49085A00BDBC4800BDBC4900E0BC499A +:10277000085A00BDFFDF002000BDAF48B949008AFC +:1027800048437047A9484079002800D0012070478D +:10279000F8B50646A84C407BE07330790027A0735B +:1027A000012825D030882082A048B37B4371A84DF2 +:1027B000AD482970114608F06EF9B0796873F11DC3 +:1027C000AA4808F068F9607B0126002800D06675E9 +:1027D0009C48407B002800D0A675A07B052831D2FC +:1027E00001007944097949188F4404092227090016 +:1027F0002782D9E70021944805F08BFE23E00121D0 +:10280000914805F086FEE91D8F4805F0B4FE687B0F +:10281000002803D0012806D0FFDF14E000218A48F9 +:1028200005F0BAFE0FE00121874805F0B5FE0AE089 +:102830000621854805F06DFE05E00221824805F07D +:1028400068FE00E0FFDFE7752776691C7E4805F02B +:1028500086FE29787C4805F093FE04217B4805F02C +:1028600058FE691C794805F07AFE2978774805F00A +:1028700087FE26750020F8BD70B56F4C01252576C2 +:102880006A4A9279002A01D03A2070BD704A1378C2 +:102890000022834205D1E275734808F0FCF8E57523 +:1028A00000E02276002070BD70B50446624D002025 +:1028B000A87522466E4807F052FE62484473012014 +:1028C000A87570BD10B55C4C00226275607302463D +:1028D000684807F044FE0120607510BD5349087137 +:1028E0007047F8B5564D287800282FD1524C207DDE +:1028F00000282BD0FFF78CFB0026A674E6746E70C0 +:102900003046FFF782FB0020FFF752F95A48FFF7E5 +:1029100046FA5A48FFF75EFBFFF7A1FBE07B012771 +:10292000C107002902D0A17CC90711D0810718D5A1 +:10293000A17C890715D42620FFF743FA0020FFF772 +:1029400026F9A07C02210843A07419E00C20F8BDF0 +:102950002520FFF736FA0020FFF719F9A07C38434D +:102960000DE040070CD5A07C400709D42720FFF7D5 +:1029700028FA0020FFF70BF9A07C04210843A0747B +:10298000FFF73FFB01210020FFF736FA0F2105205A +:10299000FFF788F92E4D2978681CFFF777F9A07B9F +:1029A00001280AD0042808D0607D002805D0627B69 +:1029B0003049254805F00AFE6675A07D002806D03E +:1029C00020482B49427B983005F02CFEA675286ED6 +:1029D0000178002903D00178001DFFF796F9E86D12 +:1029E0000178002904D0264A401CFEF7DAFFA776BA +:1029F000FFF716FB0020F8BD114948607047F8B595 +:102A000001260D4C054600285DD0E07B2146C2071B +:102A1000897C002A01D0CA073ED0820745D58A07A3 +:102A200043D426202EE000006C0E00204C0E002027 +:102A3000710E0020540E00202C0E0020FFFF00001D +:102A4000A80000200C0E00207C0E0020A40E002008 +:102A5000EC0D002078AE01009A89130080AE0100D1 +:102A600070AE010071020000ED0D0020F30D00209A +:102A7000FA0D00201A0E00206BAE010068AE0100B6 +:102A8000CF0E0020FFF79DF90020FFF780F8A07C13 +:102A900002210843A07416E02520FFF792F90020D8 +:102AA000FFF775F8A07C3043F4E740070BD54807E3 +:102AB00009D42720FFF785F90020FFF768F8A07CEC +:102AC00004210843A074E07C002806D0A07B0128E4 +:102AD00000D1FFDF00F058FAF8BD002D03D002212D +:102AE0000020FFF789F9E07D002700280AD0FE4D7D +:102AF000FE48691C05F033FD691CFD4805F02FFDFB +:102B0000E7752776F948FFF790FAA07B05280CD2E5 +:102B100001007944097949188F4402020208020031 +:102B200001210846FFF7F9FA00E0FFDFE07BA17C16 +:102B3000884303D1A07B012803D0E674ED480670DA +:102B4000F8BDA774FAE710B5FFF762FAE948007814 +:102B5000002808D1E848007D002804D00020FFF7B5 +:102B60004EFF002010BDFFF799FAFFF78CFAFFF730 +:102B7000BCF9FFF740FAFFF753FA0C2010BDDD490E +:102B8000012048707047DC494876704770B50024D2 +:102B900002F06DFB00280DD0FF202D30FFF729F942 +:102BA000D44E3078012808D0022801D003282CD038 +:102BB000FFDF70BD00F0E8F970BDCF4DA87B0328A2 +:102BC00023D0A87E002803D0FEF7FBFEFFF772FAA1 +:102BD000CA48FFF72AFAA87BC94D01280DD004285E +:102BE0000BD06879012801D0032800D110240E20D1 +:102BF000044321460020FFF790FA2879012801D1EB +:102C0000FFF772FA0220307070BD0120FFF7F7FE67 +:102C100070BD70B5BA48B74C0079012808D1B948E1 +:102C2000FFF76BFA002801D17F20A070FFF753FA5D +:102C3000B14DA87E002803D0FFF744FAFEF7D2FE7C +:102C400002F015FB002807D02078022800D0FFDF13 +:102C5000A87B012803D006E000F096F970BD99200A +:102C60008000FFF7C6F80120FFF7C9FE2078002892 +:102C7000F4D020780128F1D0FFDF70BDF0B5044614 +:102C800089B000200690FFF787F80190002002909D +:102C900098480078022800D0FFDF994E307901284B +:102CA00009D19848FFF729FA002802D191497F20DD +:102CB0008870FFF710FA914805F04DFC8E4D0746DD +:102CC000002C79D08D4805F041FD002874D0FEF726 +:102CD000E6FF002870D0A87E00280AD02824641EB1 +:102CE000E4B2FEF7A0FE022811D0012800D0002097 +:102CF0000290824A844CD01C0090062F76D2380075 +:102D00007844007900188744717171067135002C80 +:102D1000E5D1FFDFEBE7A87B012867D0042865D069 +:102D200002990198084304D17079002801D0022843 +:102D30005CD13079012816D12079002813D10120E7 +:102D4000207110784006C00F60717048009907F03C +:102D5000A2FE684C6E4EA0787F2800D1FFDFA078DD +:102D600030707F20A0706248FFF75FF9614803214F +:102D700001703DE05C48D178C07981421DD15A484C +:102D80001179037A994218D15179437A994214D131 +:102D90009179837A994210D1D179C37A99420CD131 +:102DA000117A037B994208D11178407B4906C90FFB +:102DB000814202D1012101E018E00021A87B012815 +:102DC00001D0042801D100290AD100280ED102998E +:102DD0000198084304D17079002801D0012805D159 +:102DE000287E002802D1687E00281BD00120069092 +:102DF000A87E002803D0FFF765F9FEF7F3FD0698DB +:102E0000002802D00120FFF7FAFD3A480178002996 +:102E100006D00178012903D00078032800D0FFDF15 +:102E200009B0F0BD33483B4F4068397B4173797B33 +:102E30008173B97BC173F97B0174F91E0978490666 +:102E4000C90F41761A30009907F025FE2948397CD0 +:102E500040684174797C8174B97CC174F91E897DA4 +:102E6000017500994A7D0B7D11021943C182F91E3B +:102E70008A7E4B7E12021A434280009A537E177E4E +:102E80001A023A4382808A7F4B7F11021943C18024 +:102E90002149083007F0F4FD20480179CA06154998 +:102EA000D20E49680A7600794009C0310873B079BA +:102EB000002800D0FFDF002030720E481849476814 +:102EC00038886885787E70737A8B8A81BA8BCA81DC +:102ED000F88B08820448134900783075124807F0CF +:102EE000DAFD7888A88721E0EC0D00207C0E002018 +:102EF000A40E0020A80000202C0E0020CC0E0020E4 +:102F00004C0E0020AA0000206C0E0020720E002043 +:102F1000780E0020CF0E0020EB0E0020EC0E0020DB +:102F20004E0E0020ED0D0020610E0020B888E887CD +:102F3000F8882080C037387BA07002980028E0789D +:102F40000BD001210843E070FEF786FDE1784000D8 +:102F5000C907C90F0143E17002E040084000E0707A +:102F60000120B071294C00202070FFF797F8FFF77F +:102F70008AF8FEF7BAFFFFF73EF8FFF751F8012095 +:102F8000616802F057FA33E7F8B5FFF787F8FFF703 +:102F90007AF8FEF7AAFFFFF72EF81D4E0027B07E45 +:102FA000002804D0FFF78EF8FEF71CFDB776174D0A +:102FB0002F70FFF735F8B07B012804D000210846B8 +:102FC00002F038FAF8BD0021022002F033FA114C69 +:102FD000A079002800D0FFDF68780028F2D00E48E2 +:102FE000417B6173007820750C490D4807F053FD53 +:102FF0000C490D4807F04FFD3C202072686800889E +:1030000070850120A0716F70F8BD0000A80000203D +:103010002C0E00204C0E0020EC0D0020F30D0020A3 +:103020005A0E0020ED0D0020610E0020F8B5FC4F77 +:103030000A46044600207978FA4D0646002902D057 +:10304000012909D00FE0F849497A00290BD0002A5C +:1030500008D10120787005E0A97F002903D0002A5B +:1030600000D17E70012079782B23594349198B7F39 +:10307000034311D0002A22D12A22A01C1F3107F0BD +:103080006EFA6670042020700120A07078782B21E1 +:1030900048434019867712E02878012801D00020A3 +:1030A000F8BD002A0BD16670132020701C22A91CC9 +:1030B000A01C07F054FAA6712E70DC48C6770120D8 +:1030C000F8BDD8480178002901D080887047D848D9 +:1030D0007047F8B5D34E0746B07F00282DD138464B +:1030E00005F039FA00210125D24C072824D202002C +:1030F0007A441279921897440305081F1F1F0A008B +:10310000217006E02570217208E0032000E0022013 +:103110002070C949384605F06FFA2072384605F02C +:1031200037FA6070C549384605F01EFABC4CC44FEA +:1031300020787F2803D101E02172F8BDFFDF2078DD +:1031400038707F202070B577032001F06AFAF8BD4F +:1031500010B5002001F0FAF9002812D0FEF751FF57 +:1031600000210120FEF748FEB648FEF75EFFAF4C97 +:10317000A06AFEF75DFF2079032805D0022803D05E +:1031800006E000F01AFD10BD01210020FEF7C5FF8A +:10319000FEF7AAFFAC4C6078002803D0FEF711FCC4 +:1031A000FEF788FF0320E07010BD70B59F4900282E +:1031B000CA8D08D0FF2A0DD25004000CC885FF2804 +:1031C00008D9FF2005E0012A04D95008C88501D19B +:1031D0000120C88592484268012A01D0002A01D105 +:1031E0000D224260D2431723974C5A43637B3B2501 +:1031F000DB436B43D2184260C98D900C07F029FA6B +:10320000617370BDF8B5904CE078022804D0E07886 +:10321000012801D00C20F8BD0020824A05462B2150 +:10322000414389188D77401CC0B20228F7D315702E +:103230006078002804D0FEF745FFFEF7D3FB6570E9 +:103240007A4845778577C5778049257001228A7746 +:103250000571A570CA760A774A77724E01463246E2 +:10326000736F7432B46FF66FD7688B60CC600E6189 +:103270004F6112698A6105770020F8BD10B5724A66 +:103280000023D370694B596318630120D070FFF796 +:10329000B9FF002800D0FFDF10BDF1B582B00C20CF +:1032A000019069480090C078012806D00098C07845 +:1032B000022802D00C2003B0F0BDFEF7A9FE0020CA +:1032C000FEF776FC594C207F002837D05549204620 +:1032D0000F4682687437C368056946694A678B6719 +:1032E000CD67FE608069386100266677A677574D06 +:1032F000E87E002805D1287F002802D1687F0028B9 +:103300001AD000980078002816D02079032802D01F +:10331000022805D008E005214D4800F06BFC03E0D1 +:1033200003214B4800F066FCA97E3846FEF7AEFC50 +:103330000020019026770CE0267703E00098C07803 +:10334000022804D00098C078022828D00AE0002083 +:1033500001900098C078012804D100990873009862 +:103360000221C170606B0178002903D00178001D33 +:10337000FEF7CBFC206B0178002906D0354A401CB3 +:10338000FEF70FFB0099012048700298A0623248B6 +:10339000FEF720FEFEF744FE019803B0F0BD009951 +:1033A0000120C8700C2003B0F0BD70B5FEF730FEF0 +:1033B000254CE078022803D0FEF732FE0C2070BDC9 +:1033C00001201A496073C8850220FEF71EFE2348BB +:1033D000FEF7E5FC224E0025A0780321401C07F0F3 +:1033E00038F9A170885D012807D06D1CEDB2032D5E +:1033F000F2D3FFF7ADFE002070BDC8B21949085CDA +:10340000FEF7DFFC0020FEF7C2FBF2E770B5074CC9 +:103410000125A577E37F002B26D03A2070BD000060 +:10342000B0000020F40E0020340F0020740F0020A4 +:10343000FFFF0000140F00201D0F0020160F0020BA +:103440003C0F0020AC0F0020940F0020540F0020F0 +:10345000D40F0020AF0F002088AE01008EAE010017 +:103460006F0F00208BAE01000026002802D1A07B48 +:10347000884209D1A17366771146FE4807F00BFB1D +:103480006577FD4805702577A677002070BD024658 +:1034900000200123F949002A03D0012A03D0122079 +:1034A00070478B7400E088740B774A767047F34A54 +:1034B000032800D151611076012010770020704759 +:1034C000EE48017F002903D0407E002803D17047D9 +:1034D00040790028FBD00120704710B5FEF7DEFDD3 +:1034E000FEF7D1FDFEF701FDFEF785FDE24C6078A9 +:1034F000002805D0FEF7E6FDFEF774FA00206070A4 +:10350000012020730220E070FEF78AFD002010BD2C +:10351000D9490871704710B500F04FFB10BDF0B5E8 +:10352000D74ED54D83B0002810D0D64805F0DEF830 +:10353000002804D1D34805F0F9F8002806D0CF4C74 +:10354000207903280DD1A07F00280AD0E87805282B +:103550007ED201007944097949188F44929292FEF3 +:10356000FD00E878052874D20100794409794918EA +:103570008F446F6F6F02F400C24804F0ECFFC04943 +:103580008870C1480290807F002803D1FEF704FCB8 +:10359000002800D0012000906878002810D028264C +:1035A000761EF6B2FEF73FFA0746022802D1002E39 +:1035B000F6D1FFDF0098002812D1012F10D0009023 +:1035C000AF4FB248B9780526019007297ED208008E +:1035D000784400790018874466F5057979792300E5 +:1035E0000120ECE76878002803D0FEF76BFDFEF7BA +:1035F000F9F9A348FEF781FD002801D17F2038703A +:10360000FEF769FD009800284AD02079012801D0F2 +:10361000022845D1FEF769FC9A48FFF75AFD83E07E +:103620006878002803D0FEF74DFDFEF7DBF99448DB +:10363000FEF763FD002801D17F203870FEF74BFDB7 +:10364000009800282CD02079022805D0012801E01C +:1036500017E0F7E120D023E08A48FFF73AFD012088 +:1036600000F074FF00280AD08949864804F09BFFC7 +:103670008748FEF7DAFC607F002845D103E000F0C0 +:103680009CFA03B0F0BD01210846FEF746FDFEF7A7 +:10369000E6FCEE7003B0F0BD7A48FFF71AFD43E098 +:1036A000FEF723FC40E06878002803D0FEF70AFD0F +:1036B000FEF798F97248FEF720FD002801D17F201F +:1036C0003870FEF708FD0098002800E02AE178D065 +:1036D0002079022806D00128DED0032828D0FFDF79 +:1036E00003B0F0BD6748FFF7F4FC012000F02EFFA7 +:1036F0000028C4D06649634804F055FF6448FEF7CB +:1037000094FC607F0028BED05C4902980A898282BE +:103710004A89C282898901835D48019904F01FFFAB +:1037200000206077A077AEE7FFF712FD03B0F0BD91 +:1037300054482168C2788B7E9A421FD10279CB7E91 +:103740009A421BD142790B7F9A4217D182794B7FE3 +:103750009A4213D1C27902E08DE176E1F5E08B7FE8 +:103760009A420BD1027ACB7F9A4207D100784A7EE7 +:103770004006C00F904201D1012000E00020627994 +:10378000012A20D000288BD0022000F0DFFE002884 +:10379000AFD0012000F045FF3D493A4804F003FF57 +:1037A0002068C18A3A4804F085FF2068017D3848C6 +:1037B00004F084FF3648FEF738FC607F002869D1AA +:1037C0000DE012E017E00028DED12E481A3104F097 +:1037D000CBFE2C4804F0DCFE21684876D4E70120BB +:1037E000E0770620E87003B0F0BDFEF77EFBFFF740 +:1037F000AFFC03B0F0BD6878002803D0FEF762FC90 +:10380000FEF7F0F81E48FEF778FC002801D17F2073 +:103810003870FEF760FC00980028E6D0FEF73FFA0B +:103820000028E2D020790328164807D0FFF751FC82 +:10383000FEF75BFBFFF78CFC03B0F0BD2168C2789C +:103840008B7E9A422DD10279CB7E9A4229D1427940 +:103850000B7F9A4225D182794B7F9A4221D1C2793E +:103860008B7F9A421DD1027ACB7F9A4219D1007880 +:10387000400610E07C0F0020940F0020740F002001 +:10388000B0000020AC0F0020540F0020680F002073 +:10389000D40F00202AE04A7EC00F904201D10120BF +:1038A00000E000206279012A30D0002800D1F7E63C +:1038B000022000F04BFE002800D1E0E6012000F0DD +:1038C000B0FEFA49FA4804F06EFE2068C18AF74853 +:1038D00004F0F0FE2068017DF44804F0EFFEF348A8 +:1038E000FEF7A3FB607F002800D178E7F14902983A +:1038F0000A8982824A89C28289890183EB480199B7 +:1039000004F02DFE00206077A07768E70028CFD173 +:10391000E7481A3104F028FEE54804F039FE216832 +:103920004876C5E76878002803D0FEF7CBFBFEF7A2 +:1039300059F8E148FEF7E1FB002801D17F203870FB +:10394000FEF7C9FBFEF7D1FAEEE6D94804F003FE14 +:10395000B070D748D549C2784B7A9A421CD10279C7 +:103960008B7A9A4218D14279CB7A9A4214D18279D1 +:103970000B7B9A4210D1C2794B7B9A420CD1027ACE +:103980008B7B9A4208D1007809784006C00FC9099C +:10399000884201D1012400E00024FEF7A6FAB078A5 +:1039A00004283DD1002C3BD0C348FEF7A6FB0028DD +:1039B00001D17F203070FEF78EFB287B002802D0DB +:1039C0000020FFF7F2FB01272F73BC4CB84D607A43 +:1039D0000028B9D10420E072284604F0D9FD00285F +:1039E00002D0012804D102E00020207300E02773F8 +:1039F000B349284604F0B8FDB249284604F028FE31 +:103A0000E0741F2801D91F20E0743078AE4D7F2864 +:103A100000D1FFDF307828707F203070677283E636 +:103A2000A548FEF76AFB002801D17F203070FEF721 +:103A300052FB287B002802D10120FFF7B6FB0020B3 +:103A4000287371E6FFDF03B0F0BD6878002803D06B +:103A5000FEF738FBFDF7C6FF9748FEF74EFB002840 +:103A600001D17F203070FEF736FBFEF73EFAFFF7FC +:103A70006FFB03B0F0BD9048FEF73FFB002801D17B +:103A80007F203070FEF727FB287B002802D1012021 +:103A9000FFF78BFB00202873FEF727FAFFF758FB90 +:103AA00003B0F0BD70B5894DE87807285CD20100FD +:103AB0007944097949188F445757575757030B00D2 +:103AC0007B48FEF7B2FAFEF70FFB0420E87070BDEA +:103AD000FEF7E4FAFEF7D7FAFEF707FAFEF78BFADD +:103AE00001262E730220E870FEF79AFA784C2078AF +:103AF000002800D0FFDF0020A0706E480068018819 +:103B0000A180417EE171428B2281828B6281C18BD7 +:103B1000A1814188E18281882183C08860832879DE +:103B200020776C486C49807EA0736C4806F0B3FF28 +:103B30006878002803D0FDF776FF012808D0607F61 +:103B40004008400060772670022000F06AFD70BDDA +:103B5000607F30436077FDF77FFF617F4000C907DA +:103B6000C90F01436177EEE7FFDF70BD10B5574C19 +:103B7000E07805281DD201007944097949188F445D +:103B80001818181902004C48FEF7B7FA002802D19D +:103B900049497F200870FEF79EFA207B002802D159 +:103BA0000120FFF702FB00202073FEF79EF9FFF7CC +:103BB000CFFA10BD00F001F810BD10B5FEF76EFA97 +:103BC000FEF761FAFEF791F9FEF715FA3F4C6078BF +:103BD000002805D0FEF776FAFDF704FF002060709C +:103BE000012020730220E070FEF71AFA002000F096 +:103BF00018FD10BD70B5364C054626466036743447 +:103C0000032943D0052940D104F07EFC0521284634 +:103C100004F07FFCB17E284604F0B2FC2146284621 +:103C200004F09DFC0C34216828460D3104F026FD7B +:103C300021682846113104F02AFD2068017D2846BC +:103C400004F03CFD2068C18A284604F033FD20685A +:103C50004188284604F022FD20688188284604F027 +:103C600021FD2068C188284604F020FD21682846EF +:103C7000083104F036FD2068017E284604F020FD5E +:103C800012480179284604F024FD70BD04F03CFC84 +:103C90000321284604F03DFCB17E284604F070FC68 +:103CA0002146284604F05BFC70BD0000D40F0020C4 +:103CB000AC0F0020740F0020B0000020340F002053 +:103CC000410F0020480F0020670F0020940F0020B4 +:103CD000F40E0020540F0020680F0020030F002076 +:103CE000F0B5054685B00F46012000F033FDC4B2A3 +:103CF0000B2000F02FFDC0B2844200D0FFDF012076 +:103D000000F028FDC4B2182000F024FDC0B28442A7 +:103D100000D0FFDF3846F84F6C1E6900CD19002631 +:103D2000403D09287ED201007944097949188F4421 +:103D3000042C343430B2B2B267000B2C00DBFFDF4E +:103D4000E88F0621F9F744FF070000D1FFDF0B2CB5 +:103D500000DBFFDFE88F3988884200D0FFDF982042 +:103D6000C05D002800D1FFDFE448F12146604670C5 +:103D7000C6607A6A89008A4201D9561A91368660ED +:103D8000384602F0A2FB05B0F0BD02F0F0FB05B032 +:103D9000F0BDFEF75DFA05B0F0BD0420C04300F0B1 +:103DA000D9FCC6B2192000F0D5FCC0B2864200D0C2 +:103DB000FFDF0B2C00DBFFDFE88F0621F9F708FFA0 +:103DC000060000D1FFDF0B2C00DBFFDFE88F31881E +:103DD000884200D0FFDF304602F079FC002800D096 +:103DE000FFDF00223146684600F0CDFCA220805D56 +:103DF0006946FCF797F9308E401C308605B0F0BD5F +:103E00000B2C00DBFFDFE88F0621F9F7E1FE07004E +:103E100000D1FFDF0B2C00DBFFDFE88F3988884201 +:103E200002D000E037E0FFDF3C468034207E0428EB +:103E300000D0FFDF00202076A037BD78B04E681E8E +:103E40000B2800DBFFDFAC48690008184038C68744 +:103E5000B878FBF739FD0020B870A16A002909D0B5 +:103E6000236BE26AD2188B69D2188A61A26A616AEE +:103E7000D16002E0A149626A0A61616A002902D048 +:103E8000A06A086101E0A16A88619E480078F5F7A0 +:103E90007EFB05B0F0BDFFDF05B0F0BDF8B507460D +:103EA00099480025C28B521C92B2C2830078002828 +:103EB00016D0954B04285C6814D0052848D0FFDF45 +:103EC000914C29462069FBF77DFF00212061397064 +:103ED00001213971B860A068FF303130F860F8BD59 +:103EE000FFDFEDE788480A2A01D3022200E003221F +:103EF0007A7100296FD0056980480069002825D0B3 +:103F00000646C0680028FBD1002E1FD0307800285C +:103F100000D1FFDF7169706841182846FCF71CFE6C +:103F2000050009D5601B6E422146401E06F09FFB2E +:103F300060432146851B05E0214606F098FB60435F +:103F400021462D1A8D42BBD9FFDFB9E70025B7E71F +:103F50000220787100294FD06B488669002E00D16D +:103F6000FFDF664BAC2000251C698259691E28467C +:103F7000002C0CD0A069904203D3884201D20146A4 +:103F800025462046E468002CF4D1002D00D10546DA +:103F900098363561002D1FD0E868EE60F06000288B +:103FA00000D0066100203469B061002C0DD0A169F9 +:103FB000002908D070690090814200D2FFDFA1691A +:103FC0000098081AB0610020A061002D0FD0287859 +:103FD000002806D104E00FE00020F0601E61E1E758 +:103FE000FFDF6969686841184748016202E0464995 +:103FF00000200862454D63E7254661E7F0B50746B6 +:1040000085B00E46012000F0A5FBC4B20B2000F0E5 +:10401000A1FBC0B2844200D0FFDF012000F09AFB78 +:10402000C4B2182000F096FBC0B2844200D0FFDF7B +:1040300000250120344C092E5BD2310079440979E6 +:1040400049188F4404162F2F2B56561446006073C0 +:104050002073607800280AD128484560C560257320 +:10406000A068C338FFF719F9002800D0FFDF05B0BA +:10407000F0BD6178002909D0207B002801D1FFF72D +:104080002CFA6573FBF76DFB05B0F0BDA073FFF76D +:104090008CF90028F8D0FFDF05B0F0BDFEF7D8F8A6 +:1040A00005B0F0BD0420C04300F054FBC4B2192099 +:1040B00000F050FBC0B2844200D0FFDF012200219B +:1040C0006846FFF7EBFE69463846FCF72BF805B06B +:1040D000F0BD2078052800D0FFDF207F002800D128 +:1040E000FFDF25772570207DFBF7EEFB257505B0FA +:1040F000F0BDFFDF05B0F0BD34100020FC0F002044 +:10410000FFFF0000B800002010100020B80B0000D6 +:10411000F0B5FF4C87B020780026042805D0207821 +:10412000052802D00C2007B0F0BD01276770607B26 +:104130000025002813D072B6607B002808D0A07B31 +:10414000002805D0FFF7C9F96573A573FBF709FBD4 +:1041500062B6207DFCF7A1FD002813D018E0207D79 +:1041600000900320694608734873FBF7C1FB049075 +:104170000020C043694605900F7202A90098FBF722 +:10418000D1FFE6E720BF207DFCF787FD0028F9D0AE +:10419000207F002805D025772078052800D0FFDF74 +:1041A0000C2665702570207DFBF78EFB257530464B +:1041B00007B0F0BDF0B5D64883B00078002801D034 +:1041C000FFF7A6FFD3480121017069460620F9F7E1 +:1041D0008BFC002800D0FFDF0027CF4E0AE00298BA +:1041E000002807D09821095C002903D00088B0423C +:1041F00006D140E06846F9F753FC0028EFD03AE0DA +:104200000621F9F7E5FC040000D1FFDF2546A035C3 +:10421000A878FCF742FD002805D120BFA878FCF75C +:104220003CFD0028F9D080342776AC78601E0B283E +:1042300000DBFFDFB949620051184039CE87A8780A +:10424000FBF742FBAF7069460620F9F74DFC0028EA +:104250000CD0FFDF0AE00298002807D09821095C03 +:10426000002903D00088B042CAD104E06846F9F7BB +:1042700017FC0028EFD0A74807700761002003B0A3 +:10428000F0BD10B50078A64C002809D0012806D052 +:10429000FFDFA068A349884200D3FFDF10BDA2481A +:1042A000A060F6E710B59E4C00232070984803707C +:1042B0004370037703734373837383610375974973 +:1042C00095480880052248808880091D521EFAD131 +:1042D000180004D0002B04D09348A06002E0A36033 +:1042E00000E0FFDFA0688F49884200D3FFDFFFF7BF +:1042F00061FF10BD70B5864C0E46217884B015461E +:10430000002902D00C2004B070BD884A416A8A1886 +:1043100001468031CA62A061087E002800D0FFDF1C +:104320008348464345438348ED1C30186660A560CA +:10433000854200D82846A06076490020C860052143 +:10434000217060702077E0837B48FBF769FA207565 +:10435000002800D1FFDFFBF7CBFA2061002201210A +:104360006846FFF79BFD207D6946FBF7DBFE0020DA +:1043700004B070BD10B4884201D2012200E00022D6 +:104380001218D2B2814201D2012000E00020401870 +:10439000C1B28A4201D2084600E01046441A831A8C +:1043A0001B19502451186343FF22493251435A18B4 +:1043B0009821414351189C225043081810BC98384A +:1043C0007047CB229200914200D211464162704761 +:1043D0004F480078002801D00020704710B5062013 +:1043E000F9F794FB0121484010BD10B5484C84B04A +:1043F0002278002A02D00C2004B010BD4C4A514350 +:104400005043C91C4B4AA16060608018814200D8AB +:104410000846A0600020607004212170E0834648B7 +:10442000FBF7FEF92075002800D1FFDFFBF760FAEB +:104430004249FBF7C7FC2061002201216846FFF7D3 +:104440002DFD207D6946FBF76DFE002004B010BDF8 +:1044500070B52F4CA1690160FFF75AFE00230028B8 +:1044600018D1A16980318A6A002A09D00E6BCD6A01 +:10447000AD199669AD1995618D6A4A6AEA6002E0E4 +:10448000244D4A6A2A614A6A896A002A01D0116168 +:1044900000E08B61A36170BD70B51D4C84B02078C5 +:1044A000052802D00C2004B070BDA069002800D1FE +:1044B000FFDFA0698030007E002800D0FFDFA06908 +:1044C000A0308078002800D0FFDF1D48FBF7A8F956 +:1044D000A169A222505405460E88401E0B2800DB1D +:1044E000FFDF0E49680040184038C687A069A03039 +:1044F0008078002800D1FFDF01226846A16900F022 +:1045000042F9A0696946A0308078FBF70BFE19E0FC +:1045100010100020FC0F0020FFFF000034100020CE +:10452000B80000206A180000C4090000EB04000075 +:1045300071020000B3FBFFFFFD3F0100B80B00005C +:10454000E13C01000020A06104B070BD10B5CA4973 +:104550004C68983400280AD001280BD002280DD0CE +:10456000FFDFC6488068A0420BD9012010BDFF3490 +:104570007934F6E7B12080002418F2E7FF34613483 +:10458000EFE7002010BDBC4882684168914202D22A +:104590000078002801D0002070470120704730B516 +:1045A00002460423B64D803285B000290AD0012985 +:1045B00021D0022904D003291FD0FFDF05B030BD70 +:1045C000137611E00446AC4800780028F8D10122A7 +:1045D0002146684600F0D7F8A220005D6946FBF747 +:1045E000A1FD208E401C2086FBF7BBF82878F4F74D +:1045F000CEFF05B030BD032010E04188A14B5943E8 +:10460000A14B1960D16B0B89C3828B7903754B89E0 +:1046100043808B898380C989C1800220107605B0D0 +:1046200030BDF0B50146964800250078934C85B022 +:10463000002908D0012916D002295BD003296FD0A8 +:10464000FFDF05B0F0BDE583F4F7A1FF6078002837 +:104650005FD1002211466846FFF720FC207D6946A5 +:10466000FBF760FD55E0844920694A68854B821854 +:10467000864809691018A269558898325D439142AD +:1046800018D0216AFCF768FA060009D5A81B774202 +:104690002946401E05F0EBFF68432946C61B05E08E +:1046A000294605F0E4FF68432946361A8E4202D9AE +:1046B000FFDF00E0002672488068864205D2A169CB +:1046C000704A48884243961904E06E49304605F026 +:1046D000C0FFA169C882A06905210175C08A694926 +:1046E00048436549301AC86069498842A9D3FFDF49 +:1046F00005B0F0BDE583F4F74AFF01202077A069FB +:1047000021698030C1610576FFF7C6FE002800D020 +:10471000FFDFFBF726F86573A57305B0F0BDFFE773 +:10472000F4F735FF05B0F0BD704700B5524A0029D7 +:104730000BD0012903D0022903D0FFDF00BD401EAA +:1047400003E05178491C5170001F506000BD4B4878 +:10475000007870478107C90E00280BDA0007000FA8 +:10476000083880084B4A80008018C069C84000069D +:10477000800F70478008484A800080180068C84051 +:104780000006800F7047F7B50F46064649883D483A +:104790003C4A4143F88A82B0504300253C4680346D +:1047A0000090227E002A09D03348012A40682ED08A +:1047B000022A16D0032A2AD0FFDF3CE00498002802 +:1047C00000D1FFDF2C4D6868002800D1FFDF68684A +:1047D000E968001D0918314A009880180D18012059 +:1047E00013E00499491E084300D1FFDF2648016801 +:1047F00000980D180498002806D01F4841682848E2 +:104800000818A84200D9FFDF0320207611E00D46EA +:10481000049900290DD0002804D1174840780028B9 +:1048200000D0FFDF144841681D480818A84200D98D +:10483000FFDF002D00D1FFDF2946E069FBF7C2FA58 +:10484000E0610020307001253571E069B0603846C4 +:1048500001F078FF002801D0757104E0207E012866 +:1048600007D003207071786AFF30CF30F06005B058 +:10487000F0BD0220F6E70000FC0F00201010002021 +:10488000B8000020E2040000BC0000204E0600003A +:104890006A18000000ED00E000E400E055040000AC +:1048A0005F040000FD48C07E7047FD4840687047C7 +:1048B000FC48C07E704710B4884201D2012200E05B +:1048C00000221218D2B2814201D2012000E0002061 +:1048D0004018C1B28A4201D2084600E01046441A8C +:1048E000831A1B19502451186343FF224932514344 +:1048F0005A189821414351189C225043081810BC63 +:104900009C3870476522D200914200D21146416224 +:104910007047FFB5E14E85B0706A3468056860681D +:104920000190306A0390298E0798401A80B2029055 +:104930000898002804D0274638372046483002E03F +:10494000371D2846A83000900320387105980028AC +:1049500019D001287ED0022856D003287BD0FFDF53 +:104960000898002803D03879032800D0FFDFA16A17 +:104970007069FBF727FAB860216A606A81426BD9D7 +:104980000099086022E1306A002800D1FFDFE88A40 +:10499000C5494843421806980021002804D05043D6 +:1049A000C24905F056FE411CA16101916A88BE48CA +:1049B000002142430698002804D05043BB4905F02B +:1049C00048FE411CE161306AB74A801CA062E98A56 +:1049D000B54B5143019A891AB54A89180918A16241 +:1049E000287D019A584352001018FF301930206278 +:1049F0006062306A081AAF49801E8842B0D2AE4960 +:104A000088427DD2FFDF86E0E88AA74AE16850430A +:104A10000A1806980021002804D05043A34905F045 +:104A200018FE411CA1616A889F48002142430698F4 +:104A3000002804D050439D4905F00BFE411CE16164 +:104A4000306A002800D1FFDFAE20405B964A002884 +:104A5000E88A02E02EE061E0B6E0E16821D0504350 +:104A60000818A169401AA0622169A0688E4A4843CB +:104A7000A1694018297D400051434018FF3017308C +:104A800020626888E1695043411A8C4808186062C6 +:104A9000A06A316A401A8A49FF38553888423AD3A9 +:104AA0005EE750430818A169401A3168D638496852 +:104AB0004018D8E7284680300190C08D002800D1EA +:104AC000FFDF306A002800D1FFDF68887649E3699C +:104AD0004843C01AA06201999C46CA8D2169A36807 +:104AE000521A4B43A169591863465343C9182A7D8A +:104AF0006D4B49005A438918FF311731216200E09C +:104B000009E06E4941186162316A401A6C49FF3808 +:104B100055388842C4D20120387121E7089800280E +:104B200003D03420005D00287ED168885E49484368 +:104B3000E169401A02994843A062284680300490F7 +:104B4000C08D0028019822D0002800D0FFDF0498F3 +:104B5000554AC18D02980818E16948434000FF306A +:104B60001730206268885043411A54480818606220 +:104B700054484068002816D0A26A03990120511AAF +:104B80004F4AFF39553991428AD23871E8E60028F8 +:104B900002D00398002800D1FFDF0198A16AD6381F +:104BA0000818A062D3E7FAF7A3FE7269014610461F +:104BB000FBF7D2FFA16A081A4149FF3850388842F2 +:104BC000ABD2012009B0F0BD009801600098696A7D +:104BD00000684018FF305030F8609820415B07981B +:104BE000081A00B2002804DD0598022801D003202D +:104BF00000E0002078710E98002813D0C035298875 +:104C000000291DD0688868802A79401C42438A4266 +:104C100008D27879401E002804DD01207871688868 +:104C2000401C6880089800E007E038700898002869 +:104C300008D03420005D002804D0022009B0F0BD67 +:104C40000020E0E708980121484020346075307F5B +:104C5000F27E3946B37E9A4202D0FBF763FA04E053 +:104C60000020F076B07630607062002009B0F0BDB0 +:104C700070B5144D09292B686A686FD20C007C440A +:104C800024792419A74404758D9F8AAAAA69A700CC +:104C900000201062D17E042969D215E04C1000205A +:104CA000DC00002074100020E204000040420F00ED +:104CB00033040000750900003104000094FBFFFF7D +:104CC0005C080000CC0000200B007B441B79DB1843 +:104CD0009F444D4D0145516A0C6811680870116878 +:104CE000486010682030407D002808D1FAF700FEA7 +:104CF00069680968096CFBF72FFF002818DC6868F1 +:104D0000228E0168498E914206D1214680318B8BDB +:104D10009A1ACA83238605E0891A9E2211530168D4 +:104D2000498E21860268C1681164C168416111E041 +:104D300068680168098E228E8B1A22468032D383DE +:104D40000168098E218601680B6CC3600B6C43619E +:104D5000886C9062204602F0C8F970BD3EE0D068D1 +:104D60005061FDF7BEFD0028F7D0FFDF70BDFFDF0B +:104D700070BDD07E04280FD201007944097949180A +:104D80008F440A0A010402F082FA70BDFDF7DBFECF +:104D90000028FAD0FFDF70BDFFDF70BDFDF758FAC5 +:104DA00070BDD87E022806D0D87E032800D0FFDF51 +:104DB00000F0A9FB70BDF948007D012800D1FFDF9C +:104DC00000F0E7FB70BDD87E0228F9D0D87E03281A +:104DD000EED0FFDFECE7FAF777FD70BDFFDF70BDC7 +:104DE000F3B581B00298EE4E0024EE4D09284BD267 +:104DF00001007944097949188F4404313E3E314617 +:104E0000463E3E007068E74F002800D0FFDF776025 +:104E100002990198FFF72CFFE87E02282AD17068DA +:104E20000768406A0668FAF748FD7188DE4A514310 +:104E3000FA69891AAE39B72800D8B7206523DB0094 +:104E40001818081AD949F1224018716A9200914243 +:104E500000D98C1A844200D22046F86206E001464E +:104E60000198FFF705FFE87E022803D12968012099 +:104E70002031087503B0F0BD014635600198FFF799 +:104E8000F7FE346003B0F0BDFFDF03B0F0BDF8B54E +:104E9000C34C07460D46092920D208007844007902 +:104EA00000188744040F13130F1B1B1313006068B3 +:104EB000BF4E002800D0FFDF294638466660FFF766 +:104EC000D7FEF8BD3846FFF7D3FEF8BDB8482060DE +:104ED0003846FFF7CDFE00202060F8BDFFDFF8BDAB +:104EE000F0B5B04985B0CA7E0026AD4C032A03D088 +:104EF0002831CA7E032A67D100252160002821D0ED +:104F000001280BD0FFDF2068002E05604562256078 +:104F10005AD0A8484560002005B0F0BD032088762F +:104F200000E020BF2168C87E002803D0C87E8A7EAA +:104F30009042F6D0C87E002802D000268D76E2E7A7 +:104F40000126FBE70026032708468F76C97E032942 +:104F500003D0C07E002833D033E00120FDF713FEDC +:104F60002068007F002800D1FFDF2068067F6846A8 +:104F700007714771FAF7BCFC0290FF20F5300390EF +:104F800001216846017069463046FBF7CBF820687E +:104F9000007FFBF782FE002806D120BF2068007F3B +:104FA000FBF77BFE0028F8D02068007FFAF78CFC26 +:104FB00020680577C576857605600126456200E0A4 +:104FC0000126206885769EE70C2005B0F0BD10B55F +:104FD000744800F071FB764800F06EFB6F490020CA +:104FE0000875744948706F494861714A5061887604 +:104FF00090766B494860086010BDF8B56E4E054666 +:105000003068002401270004810F6C480068800F7D +:10501000814200D0FFDF3068694E0004810F3068A4 +:105020000006800F814200D0FFDF6648C06931680A +:10503000800F0904890F884200D0FFDF62480570A5 +:10504000584DEC76AC765A4EF476B4765F480771DC +:1050500004606C6274622C60564F346028467C6039 +:1050600000F02AFB304600F027FB4C4804757C70AA +:105070006C617461AC76B476494844600460F8BDF4 +:10508000524908717047F8B546490546CA7E4848F6 +:10509000434C002A02D1C27E002A03D0C97E0229D5 +:1050A00007D009E04A482160FAF7BAFB216808777F +:1050B0000AE0C17E002901D00C20F8BD20604548DF +:1050C000FAF7AEFB216808773A48002D4560216861 +:1050D00008604148486212D028460121C430FCF7DC +:1050E0000DF90620F8F722FD06460720F8F71EFD09 +:1050F0003118C035287905F0ACFA491C29712068AF +:10510000007F002800D1FFDFFAF7D7FB3349884240 +:1051100000D208463249401886B221680320C8767A +:10512000FDF707FB21680861FDF727FB0127002534 +:10513000002826D0FDF721FB21684A6A1060086824 +:10514000012107706846FCF762F868460078254937 +:10515000000205F07EFA0F46FAF7CAFBF119FAF7DA +:1051600031FE2168C86022680320107250721571E8 +:10517000107FD37E111D967EB34235D0FAF7D2FF51 +:1051800036E0FAF7B5FB3146FAF71CFE2168C86035 +:105190000868057008684770E5E700009C1000206B +:1051A000CC0000204C100020E2040000AFFBFFFF09 +:1051B00074100020DC00002000E400E008E400E0BF +:1051C00018E400E000ED00E0C4000020D40000205E +:1051D000E14D01008F4E0100C8000020F6050000DF +:1051E000BB02000010270000D57695761560556249 +:1051F000206805830020FDF7C6FC00202560F8BD6F +:105200007047F8B5FC4EF17E002903D1FB49C97EF9 +:10521000002901D00C20F8BD0221F176F94FF84D9C +:1052200077623560002438602C7500943979C0307D +:105230004A00F549007B8A5A4000085A2346101854 +:1052400081B222462046FFF764FB002800D0FFDF32 +:105250002C610120AC6028756C862C86EB48847527 +:105260003968088E401E088634830020F8BD10B5CA +:10527000E74801244068817E03290CD00168497801 +:10528000002906D0006AE349884202D90024FDF7CC +:1052900076FC204610BD0024FBE7DD48406802682C +:1052A0001178491C1170016A0068C26A914204D8E1 +:1052B000007D012801D00120704700207047F8B51B +:1052C000D34DCD482860416A00680C68002734211E +:1052D0000F54A621095D002926D1007D032823D182 +:1052E000FAF706FB29684A6901461046FBF734FCC9 +:1052F000002819DD2E68C84A716A3568096849882E +:105300005143EA69891A05F0A4F9218E401C41181D +:10531000BF48298632689C21095B138EC91A09B2DD +:10532000002903DC0760F8BD2F60F8BD01212032A1 +:10533000917521464031CA898989B34F511A228E0D +:10534000491E89188EB20546C03416E0496A0979AB +:105350004900795A00220092028E237B007D5B0077 +:10536000FB5A591889B20123FFF7D3FA00280BD052 +:1053700001280CD0022807D0FFDF29680868028EB8 +:10538000B21A12B2002AE1DA00202860F8BD2868BB +:105390000068018E491C0186EFE770B59C4D002620 +:1053A0006C68062844D201007944097949188F4471 +:1053B0001820020E240D002000F0BBF9E676A67638 +:1053C000266066626868002811D06E6070BD9348E0 +:1053D0002C680078F4F7DBF8E676A676266066623D +:1053E00070BD012000F0A5F968680028EDD1FFDF4D +:1053F000EBE721680320087570BD606A21680068CA +:10540000CA698A604188844A51432268D160014652 +:10541000C0310A8DC282E622125C02754A8D42803A +:105420008A8D8280C98DC18021680220087570BD77 +:10543000FFDF70BD70B50024754D002805D0012830 +:105440000AD0022827D0FFDF70BD00F0CDF96868D0 +:10545000002829D06C6070BD686801684C70C47603 +:10546000847604606E4E44620021706802F098FEFB +:1054700071680846E0318C70CC70FFF7C2FE0028DE +:1054800000D0FFDFFAF76DF964486C600078F4F73C +:105490007EF86C6070BD00F0A7F96868C476847609 +:1054A000046044620028D5D1FFDFD3E7584949683A +:1054B000CA7E022A09D10A681378002B05D15060F0 +:1054C0000968CA6A10182838C862704700B5504A7F +:1054D0000029526808D0012903D0022903D0FFDF38 +:1054E00000BD801E00E0401F106200BD4348C07E2A +:1054F000002801D00020704710B50720F8F706FB00 +:105500000121484010BD38B5414C206801684978F8 +:1055100001291FD001216846FBF779FE6846007813 +:105520004049000205F095F82068426AC068126898 +:105530005118FAF747FC2168C860304822680321F7 +:10554000824202D0108B0A2810D2108B401C10838C +:1055500051720DE07D21C068C900FAF733FC216863 +:10556000C860FDF7E6F821680861E6E7022050729E +:10557000117200231371107FD47E111D957EAC42F1 +:1055800002D0FAF7CFFD38BDD3769376136053621D +:1055900038BDF0B51E4F83B038680568416A2E46A5 +:1055A0000C682036717D002907D0698E228E9142C9 +:1055B00003D1407A002800D1FFDFFAF799F9144FA0 +:1055C00039684A6901461046FBF7C6FA3F68002869 +:1055D000796A096807D049880F4A51433A68D26905 +:1055E000891A05F036F8228E698E131899421BDB52 +:1055F000491C69861BE000004C100020741000203C +:105600009C100020D400002092AE0100BC100020AD +:10561000CC000020D9821300E2040000C400002066 +:10562000DC00002010270000401C10186886B07DA8 +:10563000002806D19C21688E095B884201D1401C5C +:105640006886388B2646401C3883204640300190BF +:10565000C2898089101A228E401E801887B2C036F7 +:1056600016E07E4800230068406A007941007C48CB +:10567000415A0093337B5B00C05A401881B2287DA9 +:105680000023FFF746F9002810D0012810D0FFDFD3 +:105690006A8EB81A00B20028E3DA019808218172F4 +:1056A000019801214172204601F0E6F903B0F0BDF6 +:1056B000688E401C6886EBE7F8B5684C05461F27E6 +:1056C000EE7E042E2AD230007844007900188744F8 +:1056D0002B2501206348854200D0FFDF0220256092 +:1056E000A87600E020BF2168C87E002803D0C87ECD +:1056F0008A7E9042F6D0CA7E002A04D000228A76A2 +:105700000C2722600DE000228A760A604A6222603D +:105710000AE00120FFF7E4FB074600E0FFDF002F6F +:1057200002D0E87EB042CBD1E87E002800D0FFDF77 +:10573000F8BDF8B5494D01286A68516A0C6843D133 +:105740000879474940000B5A1068077D0126032F4E +:1057500006D0027D022A13D0007D012824D033E038 +:1057600000270761106887609C200096025BCC20B0 +:10577000005D4000085AC01881B23B4603201EE07D +:1057800022468032D78D07610096CC20005D928B37 +:105790004000085AC01881B200230220FFF7B9F870 +:1057A000696809680E750CE09C200096025BCC20AD +:1057B000005D4000085AC01881B200230120FFF7A5 +:1057C000A8F8002800D0FFDFF9F7CBFF26480078C3 +:1057D000F3F7DDFE6968002008830B68228E5A8685 +:1057E000096820318875F8BDF8B51C4D002168683E +:1057F0000C4600684278002A01D0447027E0007807 +:10580000002809D001216846FBF726FD684600788C +:105810001649000204F01DFF6868426AC0681268F9 +:105820005118FAF7CFFA6A68D060147103205072E9 +:10583000107FD37E111D967EB34202D0FAF772FC20 +:1058400003E0D47694761460546268680483F9F7B0 +:1058500088FF05480078F3F79AFEF8BDCC000020D9 +:1058600092AE01004C100020C40000201027000060 +:1058700010B584B004466846FCF775FE002800D1D8 +:10588000FFDF009802F0A2FF0321009802F0BBFFA7 +:105890000098EF22017811400170214603F019F8B9 +:1058A0000D2C7CD2200078440079001887442D1FED +:1058B0000657A2A2A31390A2A3A37800F848806879 +:1058C000A030417D009803F0A3F8FCF75FFE0028AC +:1058D0007AD004B010BDF24880688030417C0098D6 +:1058E00003F007F9FCF752FE002870D09EE0EC4868 +:1058F00080688030016C0098491C03F074F8FCF754 +:1059000045FE002860D004B010BDE54CA068803092 +:10591000C06B8179009803F02BF8A0688030C06BD1 +:105920000189009803F01BF8A0688030C06B4189A2 +:10593000009802F0F9FFA0688030C06B8189009860 +:1059400002F0FBFFA0688030C06BC189009802F0B4 +:10595000FDFFFCF71BFE002836D004B010BDD04C74 +:10596000A0688030C16B0098091D03F055F8A0684D +:105970008030C16B00980C3103F05AF8A068803079 +:10598000C16B00981E3103F05DF8A1680098883162 +:1059900003F065F8FCF7FAFD002844D03AE029E06E +:1059A000BF4C60690178009803F089F860698188CC +:1059B000009803F086F860694188009803F085F844 +:1059C000FCF7E4FD0028C8D1FFDF04B010BD2CE0D7 +:1059D0000020029069460390087A01210843694635 +:1059E000087202A9009803F086F8FCF7CFFD0028A2 +:1059F00019D00FE0FFDFFCF7C9FD002800D1FFDF61 +:105A00000C2CE2D0072C11D0012CDED0002CDCD0E5 +:105A1000022CDAD0A2480021806840304182012166 +:105A2000817504B010BDFFDFF4E7FFDF9C48002163 +:105A300080684030018304B010BDF0B5984C8DB043 +:105A40002079C0077ED020693B21C578A06800235B +:105A50000A5C0521303002F00EFD00280FD0022D27 +:105A60000DD00B2D0BD0042D09D0052D07D0062D00 +:105A700005D00D2D03D06078082108436070607850 +:105A800000285FD12069C078801E0C287ED20100DA +:105A90007944097949188F4405792743C47A79F400 +:105AA000791DF38BA0683D210A5C00230121303071 +:105AB00002F0E1FC00286AD1206902F0ABFFA16886 +:105AC000B622505402223D204254002040318876B4 +:105AD0008875C3E1A0682030C17E0A2973D10021F6 +:105AE000C1770D21C176B9E1A0683B21095C0E297F +:105AF00069D1BC21095800884988814200D0FFDF64 +:105B0000A0688030C16B2069263102F0BFFFA16818 +:105B100020698C3102F0CAFFA0681121203045E0D5 +:105B2000A1683B20405C11284DD180318C46CB6B65 +:105B30005C4810260022082168440E33B51AED187F +:105B4000203D00E092E1EF7F4770AD7F8570801CC3 +:105B5000491E921C0029F1D16146CB6B03A8102687 +:105B60000022082103301E33B51AED18203DEF7FC7 +:105B70004770AD7F8570801C491E921C0029F3D1AF +:105B8000684603F068FCA068014601E047E1F2E0E6 +:105B900008AF6CCFC36778318267CE608D6000211B +:105BA0008166C16601212030C1771321C17655E19C +:105BB000A0683B21095C112901D00E2903D1403096 +:105BC000007F002802D00220607047E1206902F0C7 +:105BD0008EFFA16800250A468032107408464030C6 +:105BE000C5768575D06B09884088884200D0FFDF74 +:105BF000A06801468030C26B1570026D1378002BCF +:105C000001D0FFDF07E10B88D380036D027C1A719E +:105C1000026D1572036D0B221A70006D09884180A8 +:105C2000F9E0A0683B21095C152901D0022005E1BB +:105C3000014600254031CD768D75BC21095800887C +:105C40004988814200D0FFDFA06801468030C26BE6 +:105C50001570036D1A78002A01D0FFDFDBE00A46D9 +:105C60004032167F002E0DD015770A88DA80026D3B +:105C70001571036D0C221A70006D09884180CAE00D +:105C800012E079E00A88DA80026D1571036D012255 +:105C90001A72036D0B221A70006D09884180BAE0F8 +:105CA000E4000020FFFFFFFFA0683C210A5C002306 +:105CB0001946303002F0DFFB002809D1A0683B21F3 +:105CC0000A5C00230721303002F0D5FB002870D099 +:105CD000607800284FD1A0684030807F800715D4BD +:105CE000206902F0F6FEA1684031C877206902F011 +:105CF000F2FEA16840310884206902F0F1FEA1683B +:105D0000022240314884887F10438877A0685E2152 +:105D1000095CC90714D13C210A5C002319463030C4 +:105D200002F0A9FB002800D1FFDFA06801213C227E +:105D300011540423B822135440308176002101838A +:105D4000A068014620310A46C97E012903D10021FD +:105D5000D17656231954BC21095805884B88AB428B +:105D60007CD10B78042B79D100230B70D17E0029D4 +:105D700074D14030837571E0A0683B210A5C002338 +:105D80000621303002F077FB002856D060780028DA +:105D900064D16946206902F0BFFE68460078C107F9 +:105DA000C90F6846017005D0A068012160300171FB +:105DB00004E042E0A068002160300171A068002585 +:105DC00056210D54BC21095800884988814200D0D1 +:105DD000FFDFA1680A468031C86B0570086D037843 +:105DE000002B01D0FFDF16E01388C380086D6B46DF +:105DF0000571086D1B8803816B465B8843816B4688 +:105E00009B8883816B46DB88C3810B6D06201870ED +:105E1000096D10884880A0682030C5761EE0A06813 +:105E20003C210A5C00231946303002F024FB002894 +:105E300003D06078002811D102E0012060700DE0ED +:105E4000206902F06FFDA1689122505405223C2088 +:105E5000425400204031088301208876A268002344 +:105E6000106F516F401C5941516710670DB0F0BD64 +:105E7000F8B5FF4C0746607800250843607020465F +:105E80008068A288014693064031002B01DA8D819B +:105E900002E08B895B1C8B815106890F012600294A +:105EA00008D0014620318A7F002A03D18E77012154 +:105EB000FEF775FB002F75D16078002873D120792B +:105EC00040070CD5A0682030C07E052800D1FFDF38 +:105ED000A0682030417F022901D1267045772079C2 +:105EE00080074ED5607800284BD1E068C0780D2837 +:105EF0007BD201007944097949188F4443330677EE +:105F0000CACA8F1823CA55689B00A0683D210A5C45 +:105F100000230121303002F0AEFA002831D1A2680E +:105F200003213D208154403295759576B2E0A068FA +:105F30003C210A5C00231946303002F09CFA00280C +:105F400077D1A7E0A0683B210A5C002319463030D6 +:105F500002F091FA002800D1FFDFA168092020316A +:105F6000C87697E0A0683B210A5C002319463030D0 +:105F700002F081FA002800D1FFDFA168072020315C +:105F8000C87687E0A0683B210A5C002319463030C0 +:105F900002F071FA002800D1FFDFA168082020314B +:105FA000C87677E0E8E0A2E0A0683B210A5C002325 +:105FB0001946303002F05FFA002800D1FFDFA068F8 +:105FC0000A2201464030C6762031CA7662E0A068D7 +:105FD0002030C07E0D2800D0FFDFA0680C220146D3 +:105FE000403006772031CA7654E052E0A0683B2169 +:105FF0000A5C00231946303002F03DFA002805D132 +:10600000A0684030007F002800D1FFDFA0680E228A +:1060100001464030C6762031CA763BE0A068203089 +:10602000C07E132800D0FFDFA16815202031C8767C +:1060300030E02AE0A068BC21095803884A889A42C7 +:1060400019D10978042916D13B210A5C002319468D +:10605000303002F010FA002800D1FFDFA0680146BE +:1060600040318A7F920702D42030C67603E08D75D6 +:106070008030C06B0570A0683C210A5C0023194683 +:10608000303002F0F8F9002804D0A068403085765E +:1060900000E0FFDF207900070AD56078002807D1EB +:1060A000A0682030417F032902D102212170457769 +:1060B000FFF7C3FCA078000716D5A0683B210A5C57 +:1060C00000230521303002F0D6F900280AD008203C +:1060D0006070A0688030016D08780B2800D1002026 +:1060E000087001E001F0DAFDA06800F03BFB6846B3 +:1060F000FCF739FA00283FD0607800283CD1A0682E +:106100003D210A5C00230121303002F0B4F900285F +:1061100032D1A068B421095C002901D0022029E015 +:106120003B210A5C0C2A0DD00D2A09D0132A20D05D +:1061300000230421303002F09EF900281DD0D9E060 +:106140000B2017E0FBF787F80C2815D3A06808216F +:106150008030C06B1E30FBF77FF8002806D0A068A7 +:1061600004218830FBF778F8002800D1FFDF0320F6 +:1061700000E00620FFF77CFBBCE0A0680146203170 +:106180000A7F012A26D0052A1DD0BC221258137876 +:10619000002B60D0528803889A425CD1CA7E0023CB +:1061A0001946303002F067F9002854D0A068BC21AD +:1061B0000958097802291AD003291AD004293CD099 +:1061C000052948D164E00720FFF752FBA068203082 +:1061D00005778FE00C20FFF74BFBA06801464030AD +:1061E0000583827F3243827720310D7782E0002061 +:1061F00009E03F21095C002908D0403000780028E0 +:1062000000D1FFDF0A20FFF733FB24E0FBF723F880 +:106210000C2820D3A06808218030C06B1E30FBF70B +:106220001BF8002806D0A06804218830FBF714F87A +:10623000002800D1FFDF0320E5E74030807F8007A2 +:1062400009D10C20FFF714FBA06840304582867509 +:10625000817F314381776846FCF785F9002849D072 +:10626000A0683B210A5C00231946303002E00000A0 +:10627000E400002002F0FFF800283BD0A168C42011 +:10628000405C002836D0A0690078002802D031E0B8 +:106290000820B8E7088E0A282CD905220831E069C1 +:1062A00004F030F9002822D0A0688030016C087812 +:1062B00000280CD00522491CE06904F023F90028CD +:1062C00018D1A0688030006C0078002806D1A06842 +:1062D000E1698030006C401C04F0D2FBA068803083 +:1062E000006C0178491C01700120FFF7C1FAA06819 +:1062F000C0300571FE4880680446A030007D30340F +:10630000002807D1627B00230121204602F0B3F868 +:10631000002802D0208C401C20843D22002F01D078 +:10632000A27615E0F248017802290BD001290BD0A2 +:106330004178002917D0142001420BD01E20A076EE +:10634000667648E0162002E08068A030807DA07666 +:10635000667640E00807E3D4880700D1FFDF2A20F3 +:10636000A076667637E0214620318A79002A05D06A +:10637000628C531C6384A38C9A4214D2897A0029BC +:1063800005D0218D4A1C2285A28C91420BD2228CF1 +:10639000E18B8A4204D38368A0331B7D002B02D19A +:1063A000A38C9A4203D32220A076667613E0A27BC8 +:1063B000002A06D0A28B8A420AD30820A0766676ED +:1063C00009E0A18B062903D33E20A076667602E081 +:1063D000617E002908D0E5722573C548A5730221A6 +:1063E0008068FEF7DCF8F8BD00218068FEF7D7F87A +:1063F000F8BD10B5BE494A788B781A430ED10128F2 +:1064000009D00879400704D588682030407F0228E9 +:1064100004D0012010BDFEF7B6F810BD002010BD5D +:1064200070B5B34C0546A0880E462843A080A80747 +:1064300003D5E80700D0FFDFE660E80700D026615B +:10644000A8071BD5304602F06DFA062802D00B28AB +:1064500014D10BE0A0683B21095C13290ED1002167 +:106460000167416701214030017007E0A0683B21CE +:10647000095C0D2902D1002140300170280601D5A8 +:106480000820A070680517D5A068018E80880818BC +:10649000801D85B2304602F045FA01280DD0304605 +:1064A00002F040FA002807D1A06829468030C06B6E +:1064B0008580304602F060FA70BDA0682946C03081 +:1064C000C580304602F09BFA70BDF8B5884C0026B6 +:1064D000A060A68066700546A67026702F460088CC +:1064E000FCF73EF8A0680088FCF75EF88035288C41 +:1064F000A168401C82B20846303001F0F8FE002846 +:1065000000D0FFDF2E84A06801464030827D002A43 +:1065100003D0428A838A9A4225D2827E002A03D0FF +:10652000028B838A9A421ED2038AC28993421AD26C +:106530002031897F8089002916D0904213D26D487E +:1065400000906D4B6D4A3946304601F00CFAA06858 +:106550003B210A5C00230521303001F08CFF00282C +:1065600001D001F0FCF9F8BD0628E8D3F8BD10B55C +:106570005F48816808464030827D002A03D0428A05 +:10658000838A9A4216D2827E002A03D0028B838AA3 +:106590009A420FD2038AC28993420BD22031897F5B +:1065A0008089002904D0904204D201F02AFB10BD5A +:1065B0000628FAD300200146FFF75AFC10BDFFB5AC +:1065C0000C4681B007461546D82120460A9E04F0A5 +:1065D00025F827808034E56304982665206405B09B +:1065E000F0BD10B5F7F70DFC10BDF8B50C46174619 +:1065F0000621F7F7EDFA010062D00D468035286DCF +:1066000000260278072A1CD0A01C0C2A27D00B2AAF +:1066100032D0062A3FD00846C030027A002A4FD036 +:10662000667012222270027A002A08D0C2310672E5 +:106630000A8962804A89A280027A002AF7D1012061 +:10664000F8BD002FFBD1667007202070296D0A224B +:10665000A01C091D03F083FF286D0670EFE7002FD3 +:10666000EDD166700C202070286D81886180C08813 +:10667000A080286D0670E2E7002FE0D166700B2144 +:106680002170296D8A880280CA88428009898180A8 +:10669000286D0670D3E7002FD1D1667006212170D6 +:1066A000296D8A880280CA8842800A8982804A8944 +:1066B000C2808A890281CA894281286D0670BEE73C +:1066C0000020F8BD0020704709494861704770B547 +:1066D000044601468031088C2546401C088440351C +:1066E000A889401CA881A87D00280BD0688A07E0F3 +:1066F000E4000020715E0100F363010021640100E9 +:10670000401C6882A87E002802D0288B401C288369 +:10671000B420005D002809D13D20025D2046002301 +:106720000121303001F0A7FE002802D0288A401C49 +:106730002882204600F016F8002070BD384AD1614A +:10674000906170473E210A5C40308189091D002A12 +:1067500004D0C089814203D3012070470629FBD2AF +:1067600000207047F8B5054606462036F07E2C46D8 +:106770000027803407281CD1288EC621495B401C85 +:1067800088424CD1216C28460830491C04F078F925 +:106790000221284601F05EFDF77601216620415571 +:1067A000206C0078002800D1FFDF216C0878401EA3 +:1067B0000870F07E082832D1E16B288E8988401C51 +:1067C00088422CD1206D0178002901D0FFDF15E02F +:1067D0002988C180E06B216D40890881E06B216DC3 +:1067E00080894881E06B216DC0898881206D0771A7 +:1067F000216D07200870216D2888488001212846D6 +:1068000001F028FD03212846FDF7C9FEE06B298829 +:106810004088884200D0FFDFE06B0770F776F8BD54 +:10682000E400002030B585B004466846FBF79BFEC7 +:10683000002800D1FFDF009801F0C8FF0321009875 +:1068400001F0E1FF0098EF2201781140017021462C +:1068500002F03FF8A01E0C2853D2010079440979B8 +:1068600049188F44054E1E4F4F164E404E4F2F2A4B +:10687000FE486521C068095C002904D00621009803 +:1068800002F0C6F83EE0C030C17B009802F0C0F8CC +:1068900038E0F648C0688030417C009802F029F961 +:1068A00030E0F24D0098E968B83102F0EAF8E968A2 +:1068B00000988C3102F0F1F824E00621009802F0F3 +:1068C00014F91FE0E94DA8680178009802F0F7F884 +:1068D000A8688188009802F0F4F8A86841880098B8 +:1068E00002F0F3F80EE00020029069460390087A67 +:1068F000012108436946087202A9009802F007F9CD +:1069000000E0FFDFFBF742FE002800D1FFDF0C2C88 +:106910000AD0072C0AD0022C06D0D4480021C06827 +:10692000403001830121817605B030BDCF48002180 +:10693000C0684030018305B030BD70B50C460546D7 +:10694000FF212131204603F069FE002021462580E9 +:10695000E03108740877FF3401342071A07470BDF1 +:1069600010B5F7F74EFA10BDF8B50D4617460721DA +:10697000F7F72EF9040078D02646E036307C002167 +:10698000002817D0002F6DD1697007202870307C47 +:106990000F4600280CD02046F23000902784377430 +:1069A0000A22A81C009903F0DAFD307C0028F5D1FA +:1069B000AF7057E0307F00281DD0002F52D1307FBC +:1069C0000B280BD00C2801D0FFDF4BE069700C20A6 +:1069D0002870B07FA8702088A8800AE069700B201A +:1069E0002870B07FA8702088FF34A8800134A07878 +:1069F000A871317736E0E01DF9300279002A12D013 +:106A0000002F2FD1697008222A7022886A8002899B +:106A1000AA804289EA8082892A81C2896A81028A9F +:106A2000AA8101711EE0827C002A08D0002F19D1B2 +:106A3000697011222A70828A6A80817412E0827DD4 +:106A4000002A12D0002F0DD1697012222A70827D87 +:106A5000002A07D08175028B6A80428BAA80827DD2 +:106A6000002AF7D10120F8BDFFE70020F8BD002083 +:106A700070477E4988607047014610B5002220317A +:106A8000CA760A778A77A0308079002802D0002160 +:106A9000022001E000210320FEF77FFC10BDF3B5CA +:106AA000724C8FB0E0680D460088F7F702FA0C9040 +:106AB000002800D1FFDF607828436070A28890062C +:106AC00006D5E06800214C231952A030017304E080 +:106AD000E06840308189491C81815006800F022581 +:106AE000002813D0E0682030817F002902D00329DC +:106AF0000CD106E00121817700210120FEF74DFC39 +:106B000004E0857700210120FEF747FC5748C06864 +:106B1000014620318A7F012A04D1544A9288D20545 +:106B200000D58D770F9900297ED150498988890534 +:106B300002D50021C03002E0C0300188491C01802C +:106B400000F0A9FB0DA8FBF70EFD002856D0474C1E +:106B50006078002852D1E0683D210A5C0123194683 +:106B6000303001F088FC002848D1E0680146C0318F +:106B70008A7B002A08D000215022115260304171D6 +:106B80000220FFF74FFECCE03C22125C0B2A17D00C +:106B900006DC012A6ED0052A10D0092A06D18FE022 +:106BA0000F2A11D0102A24D0162A6ED001230421D6 +:106BB000303001F060FC002868D0B2E0072000E02F +:106BC0000B20FFF72FFEACE0FAF745FB0C2815D39E +:106BD000E0680821B830FAF73FFB002806D0E068EB +:106BE00004218C30FAF738FB002800D1FFDF0420A5 +:106BF000E7E7497C012902D0022948D091E0FC2135 +:106C0000095C002940D105461949D23510260023D8 +:106C100008226944F41A6419203CE77F4F70A47F6E +:106C20008C70891C521E00E02CE19B1C002AF1D1C3 +:106C3000002310260822B03003A91C460331F51AA0 +:106C40002D18203DEF7F4F70AD7F8D70891C521E37 +:106C50009B1C002AF3D1684602F0FDFB034D08AAF5 +:106C6000E868CCCA01467831C36704E0040100201B +:106C7000FFFFFFFF26E08267CF6005208E60FFF7F1 +:106C8000D1FDE868C03044744BE011E026E05C219F +:106C9000095C002904D0012160304171022000E02C +:106CA0000D20FFF7BFFDE1680020C031487438E0D7 +:106CB0000620FFF7B7FDE16800204031887630E01C +:106CC00009207EE70C20FFF7ADFDE0680021403091 +:106CD0000183817F01221143817722E0E0683B211B +:106CE0000A5CE221095C00291BD00123002130301D +:106CF00001F0C1FB002814D0E068E221095C0429FE +:106D00000FD14030807F80070BD10C20FFF78AFD28 +:106D1000E168002040314882012088758A7F024363 +:106D20008A7700F0B1FF002805D0FF490020C9682C +:106D30008031088405E0FC48C0688030018C491C23 +:106D4000018400F0A4FF002807D0F748C168A031F3 +:106D5000087B022807D8401C0873F348C068A0309D +:106D6000007B022808D9F0480021C2681046803014 +:106D700001844184A0321173EB4C3C21E068012373 +:106D80000A5C0021303001F076FB002804D1E06875 +:106D90002030007F07285DD1E0683B210A5C012399 +:106DA0000021303001F067FB002853D0E0683D211E +:106DB0000A5C01230021303001F05DFB002849D03E +:106DC000E0683E21095C022944D1A030007B002804 +:106DD00040D10C98F6F774FB00283BD0FBF70AFC77 +:106DE000002837D0E068054601468035688B0128C9 +:106DF00030D90B460120A0335871084640308689AF +:106E0000C089821E964201DB012002E0801B401EE9 +:106E100080B22A8CE688B24201D3012202E0B21A83 +:106E2000521C92B2904200D91046012801D1002292 +:106E30005A71C0310A7A002A11D06A8C49898A4273 +:106E400001D3012102E0891A491C89B2884206D97E +:106E5000084604E0E26801200021A0325171E26896 +:106E6000138E1146181880B280311446888320345E +:106E7000A57F002D1DD0012D1BD0022D0DD0032D7F +:106E80000BD0FFDFA84C0F9DA0888005C00F1AD043 +:106E9000E16800208031C8851BE0657F032D0AD0A2 +:106EA000237F082B05D04032D38992899A1A921EEB +:106EB00080180883E6E740329489032CF9D3D089FF +:106EC0001818401CF5E7E0688030C18DC28B891826 +:106ED000C185E068CE21095C002908D13D210A5C0A +:106EE00001231946303001F0C6FA002807D0E168C6 +:106EF000084640308031028AC98B511801823D21F9 +:106F0000002D04D0E0684030817201211AE0207821 +:106F1000022809D0012817D06078002829D014222F +:106F2000104219D01E2119E0E0686521095C002992 +:106F300003D006224A210A5402E016224A210A54AA +:106F40000121403041724CE0E068D021095C4030C2 +:106F500081720121417244E0020705D5E0684030AA +:106F60008172012141723CE0800700D1FFDF2A21BC +:106F7000F4E7E06801464030827D002A05D0438A6C +:106F80005A1C4282828A934210D2827E002A05D005 +:106F9000028B531C0383838A9A4207D2038AC289D5 +:106FA000934208D3CE235B5C002B04D02221817254 +:106FB0000121417215E02031897F0029818906D0A5 +:106FC00091420BD3082181720121417209E0062907 +:106FD00004D33E2181720121417202E0407A0028EF +:106FE00011D0E068002102462032D17611779177E6 +:106FF000A0308079002801D0022001E00021032088 +:10700000FEF7CBF903E000210846FEF7C6F9E16878 +:107010000020A031887111B0F0BD10B542494A7806 +:107020008B781A430ED1002809D00879000704D5BF +:10703000C8682030407F032804D0012010BDFEF72F +:107040002CF910BD002010BDF8B5374C0546A088BE +:107050000E462843A080A80703D5E80700D0FFDF2D +:107060002661E807012700281DD03046666101F03F +:1070700059FC062802D00B2815D10AE0E068014629 +:107080002030027F122A0ED100228A66CA66C77794 +:1070900009E0E06801462030027F0C2A03D100227B +:1070A000C27740310F77A8071AD5206901F03AFC62 +:1070B000052802D00B2813D10AE0E0683C21095CC6 +:1070C00010290DD10021016741674030077007E0AA +:1070D000E0683C21095C0B2902D10021403001709D +:1070E000280601D50820A070F8BDF0B50E4C85B07B +:1070F0002269090A012609023143029100250392FF +:107100000190A5806570A5702570A621E0600E54E1 +:107110000088F6F7CEFE0090002800D1FFDFE0687F +:107120000088FBF71DFA01E004010020E0680088F8 +:10713000FBF73AFAE0688030408B00281DD003A8A6 +:10714000FBF711FA002818D0E068CE21095C00296D +:1071500013D03D210A5C01231946303001F08BF930 +:1071600000280AD1E06850210D526030457102209C +:10717000FFF758FBE068A0304571E068F021095C3A +:10718000002905D1018C8288914201D9E18001E07A +:107190008188E18001468031CA8B521E93B20A8CED +:1071A000D21897B202460F84A0321479002C02D074 +:1071B0004D84157102E04C8CE4184C844030848975 +:1071C000E4188481488B012801D8401C4883002B97 +:1071D00000D015735079FE4C002814D0E088874207 +:1071E00011D20098F6F76CF900280CD0E06801463F +:1071F000C030027A002A06D08031498C4089814211 +:1072000001D300F047FDE068A5210D543C21095C45 +:10721000062901D0072916D1E421028E095A511AF4 +:1072200009B200290FDB0146E631083003F051FCBA +:107230000221E06800F0B4FFE068E3210D543C2136 +:107240000D5460308671E0689E210A5A0146303044 +:1072500001F04DF8E068C821095C002901D08030B8 +:107260004584DC480090DC4BDC4A0199029800F030 +:107270007AFBE0683C210A5C01230521303001F0F3 +:10728000FAF8002801D000F06AFB05B0F0BD10B597 +:1072900000F0B7FC10BDF8B5CD4C022720790025D1 +:1072A0000007002811DA607800280ED1E068014656 +:1072B00020310A7F142A03D14030C57685760D77B8 +:1072C000487F032801D127704D7700F035F9A28857 +:1072D00001265007002815DA6078002812D1E068EE +:1072E000014620310B7F062B02D0082B05D102E08E +:1072F000E030C67001E0E030C770487F022801D15D +:1073000026704D7790070327002841DA607800281F +:107310003ED12069C078801E0C287DD201007944BE +:10732000097949188F4405B235425815B221B2285F +:10733000864DE0683D210A5C01231946303001F09A +:107340009AF8002824D1E0683D210F54403085751B +:1073500009E0E0682030007F052800D0FFDFE0680A +:107360003C210D544030857691E0E0682030007F6C +:10737000092877D0FFDF83E0E0682030007F0B280A +:1073800000D0FFDFE0685B210E540C212030017734 +:107390007DE0E0682030007F0F2800D0FFDFE0684C +:1073A0005B210E5410212030017770E0E06820301E +:1073B000007F102800D0FFDFE06812212030017725 +:1073C00065E0E0682030007F102800D0FFDFE06833 +:1073D0001421203001775AE0E0682030007F162821 +:1073E00000D0FFDFE06801464030C5768576E031A9 +:1073F000087F002800D0FFDFE068014640310A7FA7 +:10740000002A0AD00D77FF21028801310A52014675 +:10741000E0318D770C2209E038E0C21D0188F93295 +:1074200011800146E0318D7796700B220A7720306B +:1074300005772CE0E068E221095C042916D13B21A4 +:107440000A5C01230021303001F015F8002800D13A +:10745000FFDFE068014640318A7F920703D4203085 +:10746000C67603E00CE08D75E0308570E0683C2165 +:107470000A5C01230721303000F0FDFF002806D010 +:10748000E0685A210D542030057700E0FFDF2079B5 +:10749000C00609D56078002806D1E0682030017F59 +:1074A000062901D107210177A078000711D5E068EE +:1074B0003C210A5C01230521303000F0DCFF00286C +:1074C00005D008206070E068E030057701E000F04A +:1074D000E5FBE0683C21095C08292CD10146028EBD +:1074E000C0318B8C521C9A4225D16278002A22D15D +:1074F0004A8D43889A4207D18B8D8488A34203D159 +:10750000CB8DC488A34208D003888B86CA868A8D17 +:107510000A87CA8D4A87F0210E5401212C4C00F0B5 +:107520003FFE00210420FDF738FFE068E3210D5401 +:10753000203005778777F8BD70B5254C82B020796B +:10754000C0076FD060693C21C678E06801230A5CFF +:107550000521303000F08FFF082500280CD0022EC6 +:107560000AD00A2E08D00B2E06D0032E04D0062EE9 +:1075700002D06078284360706078002852D160693A +:10758000C0780D287DD201007944097949188F44CB +:107590004A2706C67878FD79FC78A3BFFB00E0682F +:1075A0003D210A5C01231946303000F064FF0028B9 +:1075B00068D1606901F02EFAE168D02250540222AD +:1075C0003D2042540020403188768875ACE10000AF +:1075D000040100209F6A01001B7001004970010036 +:1075E000E0683C210A5C01230021303000F043FFB9 +:1075F00000287FD06078002844D1606901F003FA48 +:10760000E168E42250520A8E801ACC4A00B29042BD +:107610005BDC002859DDE631606901F0E9F90621FB +:10762000E06860E188E1E0683C210A5C0123002118 +:10763000303000F020FF00285CD06078002821D195 +:10764000606901F0A2F9002831D0606901F098F971 +:10765000E168E42250520A8E801AB84A00B2904281 +:1076600033DC002831DD606901F084F9E168E03144 +:107670008871606901F077F9E168C0310885606957 +:1076800001E033E192E001F053F9E168C03148854F +:10769000606901F056F9E168C0318885606901F0E0 +:1076A00059F9E168EE22505220310D773CE1E06853 +:1076B0003C210A5C01230021303000F0DCFE002870 +:1076C00018D06078002871D120E1282040318872DC +:1076D0000120487228E10DE0E0683C210A5C0123AA +:1076E0000021303000F0C7FE002803D06078002869 +:1076F0005CD102E00120607016E1E06800220146E2 +:1077000040300283012282760B20203108770BE182 +:10771000E0682030017F0C294FD10D21E4E0E068C2 +:107720003C210A5C01230021303000F0A4FE002837 +:1077300004D1E0684030007F00287DD060780028C8 +:1077400034D101E06070EFE0E1680022084640308B +:10775000028301258576B031606901F078F9E1682E +:107760006069883101F084F9E068FF300130007908 +:10777000002800D0FFDFE168FF200A88073042526E +:10778000FF310931606902E01EE083E00FE001F0A3 +:1077900048F9E1686069FF31113101F04EF9FF21CC +:1077A000E06805310D540F2120300177BCE0E0681E +:1077B00001462030027F122A01D00220C2E70022B7 +:1077C00040318A7616218FE0E0683C210A5C012373 +:1077D0000021303000F04FFE002809D1E0683B2145 +:1077E0000A5C01230721303000F045FE002823D039 +:1077F000607800284DD1E0684030807F800715D444 +:10780000606901F066F9E1684031C877606901F0AC +:1078100062F9E16840310884606901F061F9E1686A +:10782000022240314884887F10438877E0685E21D7 +:10783000095CC90716D100E066E03C210A5C01231F +:107840000021303000F017FE002800D1FFDFE06893 +:1078500001213C2211540423E32213544030817649 +:1078600000210183E06802462032D17E012903D144 +:107870000021D176562319540146E0310B46897810 +:10788000042951D100219970D27E002A4CD1403078 +:10789000817549E0E0683C210A5C01230021303019 +:1078A00000F0E9FD00282FD0607800283CD169461F +:1078B000606901F025F968460078C107C90F68467C +:1078C000017004D0E06801216030017103E0E068DC +:1078D000002160300171E1680022084640310A83CE +:1078E00001228A760921203001771DE0E0683C21E1 +:1078F0000A5C01230021303000F0BDFD002803D0D8 +:107900006078002810D101E001201BE7606901F0D8 +:1079100009F8E1689122505405223C20425400208D +:107920004031088301208876E2680023106F516F90 +:10793000401C59415167106702B070BDFE7F0000C6 +:10794000F7480078002800D00C20704730B5F44C80 +:1079500005462078002800D0FFDF657230BDF04971 +:10796000012008727047FFB5ED4881B000780A9F8A +:107970001E4615460C46002805D1002D03D0002ECA +:1079800001D0002F00D1FFDFE54901984C63086367 +:107990002A460D46EF61AE616A6100222A72EA71E1 +:1079A0002A71EA706A712046AA71AA706A81074634 +:1079B000DC4E00883034F6F77CFAA8623888F6F797 +:1079C00064FAE862FAF724FB0120FAF7F1F8384686 +:1079D0001130FAF7FFFA38460D30FAF7E0F930784F +:1079E000002810D00120FAF710FB207EFAF7E9F901 +:1079F0000120FAF7CCF8FAF704FB217CCA480029E9 +:107A000003D0CA4902E00320EDE7C949816130781B +:107A100000280ED001210846FAF7EEF97068803090 +:107A2000806AFAF705FB01202870FAF7F9FA05B029 +:107A3000F0BD01210020FAF7DFF9F4E7F0B5B94E07 +:107A400083B031464C681B20694608803034607929 +:107A50000027B34D002828D0012859D002285BD038 +:107A6000032862D0FFDFAE4AF723116A0878184076 +:107A70000870A379DB071B0F1843FB23184008701D +:107A8000E379DB075B0F1843EF2318400870677931 +:107A9000906AF5F725FD0546FAF7ACFD022F4BD0AD +:107AA000012F4CD0032F4DD050E0A248FAF77FFDB4 +:107AB000002809D0012080020122296AAA706A697F +:107AC000904703206071CEE701AA6946A86AF5F7DE +:107AD000E3FB2862002803D02B21095D002904D094 +:107AE0009448FAF73AFD012010E069460979002927 +:107AF00005D1077047708770012100F084FE684649 +:107B00000088C1B2286A01F00EF802206071AAE76D +:107B10008848FAF722FDA6E701AAA86AF5F7BCFB98 +:107B2000286200289FD1FFDF9DE78248FAF73FFDDA +:107B3000002898D1FFDF96E7A84305D006E0A843C8 +:107B400002D003E0002D01D0012000E00020744DA0 +:107B50000101286A027811430170E17B002923D0DA +:107B60006179012920D0214648318EC972488EC0E2 +:107B700021465831714802F09BFF7148FAF755FAD7 +:107B8000307800280ED000216B480176E26BA16BA3 +:107B9000426101616A492A6AF9F783FF0020F9F717 +:107BA0008FFF05E00121EFE7FAF73FFAF9F7A8FFA9 +:107BB0003078002811D0286A0078C00606D46148C1 +:107BC0000078C00602D42879002802D0A8780028BE +:107BD00003D06879002805D008E001210846FAF7AB +:107BE0009CFAF6E701206871FAF739FA286A0178F9 +:107BF0002973417869738078A8730220287003B0D4 +:107C0000F0BD10B546480078012800D0FFDFFAF734 +:107C1000FFF9444801784468002908D000F0D5F9FC +:107C20002034207A012801D1FAF75EFA10BDFFF75F +:107C300005FFF5E770B53B4900254C68FAF72EFAC9 +:107C4000FAF721FAFAF751F9FAF7D5F9F9F758FFE7 +:107C5000FAF7E6F92034207A012801D1FAF73BFA45 +:107C60002F4C0021626960899047E269E179E078F0 +:107C70009047257070BD10B529480078032800D0C2 +:107C8000FFDFFFF7D7FF10BD254840797047244834 +:107C9000007970472249012088717047F8B5204D5E +:107CA0002049686A4C6841780126C906C90E0091CE +:107CB00000273034E96A02F013F8002807D00128C1 +:107CC0001BD0022840D003284CD0FFDFF8BD012292 +:107CD000E86A0099F5F794FC216C606C491C00225D +:107CE000504121646064E079012804D0E671687A2B +:107CF000F1F74DFCF8BDE771F9E70022E86A009959 +:107D0000F5F77EFC206C616C0022401C51416164DF +:107D10002064E079012801D1E771F8BDE671F8BD72 +:107D20001C0100204C010020001500401F00030230 +:107D30001B0003023C0100203011002049110020EB +:107D40000A1100202B010020E86AF5F75BFD216C89 +:107D5000606C491C0022504121646064E079012874 +:107D6000DCD1D9E7E86AF5F74DFDD8E7F8B5D94F8A +:107D7000D94D394628784C6801263034022800D085 +:107D8000FFDFA078002809D00021A170AE706A69D9 +:107D9000042090473878002800D02671286A00789F +:107DA000C043800708D1E078002805D1E670296A31 +:107DB000AE706A69022090470121002000F04BF963 +:107DC000002802D0FFF736FFF8BD00F0FEF8F8BD3E +:107DD000F1B5C04DC04C294620784F680126303798 +:107DE000032800D0FFDF6089012149020843608138 +:107DF000009900297ED0F9F79BFE002810D1387C2D +:107E000000280DD0606A4178C90609D00078F97958 +:107E10000007C00F884203D1E670FFF70BFFF8BDE3 +:107E2000AD490846426A1378CB7353780B74927845 +:107E30004A744189202211434181002101716C68FB +:107E4000303045682820405D3034012813D1FAF7DE +:107E500042F92146284600F0E6FA00280BD09D485A +:107E600001784068002917D0FF30173029884180F9 +:107E7000217A01710670984DB979686A00784007D7 +:107E8000C00F88424AD09348446830346079002853 +:107E90003FD0022802D011E0C830E7E7A86AF5F722 +:107EA00030FA002800D1FFDFA06BE16B0022401CFC +:107EB0005141E163A063687AF1F769FB00206071CA +:107EC00084480078002808D020790021002804D0B8 +:107ED0002171AE706A6910209047E078002814D0B4 +:107EE0000020E070FAF773FB002800D1FFDF0820C4 +:107EF000002100E05AE0AE706A699047A16BE06B28 +:107F0000491C00225041A163E063A07901281DD0E3 +:107F1000A6716889FF21013108436881686AFB798D +:107F200002781107C90F994243D16A4910274C685A +:107F300091073034890F012920D002291ED003294E +:107F400007D0E87904210843E87132E00020A071ED +:107F5000DFE700F07CFC00280DD0A670696AAE70E7 +:107F60006A6930469047E079012802D10020E0712B +:107F70001FE0E6711DE0E8793843E5E74078C10687 +:107F800010D06978002914D1C006C00E1B28F2D881 +:107F9000287A002803D06A698020904709E0FFF71B +:107FA0007DFE06E0E0790128E3D1DFE740210843C8 +:107FB00060810120009900F04EF8002802D0FFF700 +:107FC00039FEF8BDFFF73AFDF8BDF8B5424C1B216C +:107FD000E06AF5F7BAFA00216062002801D061700A +:107FE00003E0012060703D4860623A4E7568307869 +:107FF0003035287C002822D0294648318EC938489F +:108000008EC029465831374802F052FD3648FAF7FB +:108010000CF83078002810D0002101204140304871 +:1080200001766A6C296C426101612F4A616AF9F735 +:1080300038FD0120F9F744FD06E00121EDE7606A13 +:10804000F9F7F3FFF9F75CFD01210020FAF765F875 +:1080500003202070F8BD70B51F4C0546002907D1DC +:10806000012D05D12079401CC0B2207101282DD8E6 +:10807000A16928468847002828D0A1791B480029F3 +:1080800007D0012D05D14178C90602D10178C90672 +:108090001CD5E179002919D10E490978002901D0B0 +:1080A000002102E0012D02D00121294310D1104905 +:1080B0000978CA0602D40078C00607D5A07800283F +:1080C00004D16078002803D0C80601D4012070BD17 +:1080D000002070BD4C0100201C010020E810002091 +:1080E00030110020491100200A1100202B0100202E +:1080F0002801002070B504460020A083208C1E4675 +:1081000048431546114602F0B2FA2084F000294691 +:1081100002F09FFA401C80B2014619226943920284 +:10812000E083914201DD401EE0837D20294600026C +:1081300002F08FFA401CA08470BD30B50A7BD206D5 +:10814000D20E0A73002282758B181B7ADC075B083B +:10815000DD07E40FED0F2C195B08DD07ED0F2C197F +:108160005B08DD07ED0F2D195C08E307DB0F5B19DA +:108170006408E507ED0FEB186408E507ED0FEB1851 +:108180006408E31884186374847D521CE318D2B227 +:108190008375052AD8D3D8B2252800D9FFDF30BD92 +:1081A000F8B504460E4625462246234621460020C1 +:1081B0003035C032A0338031032E0AD0002E38D0A3 +:1081C000012E3FD0022E03D121462846FFF7B5FFEE +:1081D000F8BD2880A871E871E87228736873A873E5 +:1081E000A870E8702871687168762E46A8832036DA +:1081F0006884B0712885B072E8752876E8732874B1 +:10820000F0723073B073012737752884B075088316 +:1082100048838883C883088448845871C885187344 +:10822000108050802821085520841072907350745B +:10823000F8BDC88598716188E3880A462846FFF72B +:1082400059FFC1E7C885D38D528D61882846FFF755 +:1082500051FFF8BD70B50446024630348032054601 +:1082600003290AD0002933D0012938D0022903D1AB +:1082700029462046FFF761FF70BD00202080A071D5 +:10828000E071E07220736073A073A070E0702071E1 +:10829000607160762146A0832031608488712085DA +:1082A0008872E0752076E0732074C8720873887352 +:1082B00001230B752084887529461084A0318870AD +:1082C0001076D061282250550875C035287170BDD0 +:1082D0006988EB880A462046FFF70CFFC8E7D06B99 +:1082E0006988C38942892046FFF704FF70BDF8B54D +:1082F000867D0F460446002E01D0252E01D912207E +:10830000F8BD002A15D0387EE17D5043081825219C +:1083100002F09FF90846E175CA084907490FBA18E3 +:108320000125127A2B468B401A4204D02076002079 +:10833000F8BD0020F8BD314602F08BF9491CC8B2E7 +:108340000022A118497C814214D30021BB181E7A57 +:108350002B468B401E4201D0401EC0B2002804D0E4 +:10836000491CC9B20829F3D306E0D0004018207692 +:108370000020F8BD401AC0B2521CD2B2052AE0D388 +:108380001F20F8BD30B50D460446072900D9FFDF90 +:10839000E078502108406907490F88300843E070B1 +:1083A000A078A72108401830A07060785E210840AE +:1083B000203060702078BC2108404030207030BDF3 +:1083C0000179490901D000207047002230B41146DC +:1083D000445C491CE3076408E507DB0FED0FEB186D +:1083E0006408E507ED0FEB186408E507ED0FEB18DF +:1083F0006408E507ED0FEB186408E507ED0FEB18CF +:108400006408E507ED0FA407EB18E40FE318D21892 +:10841000D2B20529DCDB012A02D930BC0120704729 +:1084200030BC0020704738B505460C466846F9F761 +:1084300064FE00281ED069460020085620720921DB +:1084400061560022411A00D5494220356B7A8B4291 +:108450000FDCFF2B0DD0A17A491CC9B2A172AB7AF7 +:10846000994202D8617A7F2903D160720020A072FC +:108470000122104638BD30B414460B3C08293DD2C9 +:108480000D007D442D796D19AF4403060B10131CAC +:108490003336002A35D031E0022A32D0032A30D0D8 +:1084A0002CE0072A2DD0062A2BD027E0082A28D036 +:1084B00024E0002B02D00B2C23D91FE00A3A0B2A10 +:1084C0001FD91BE0002B02D00B2C1AD916E00D2A65 +:1084D00017D00C2A15D02030007B002804D00D2A9C +:1084E0000CD3152A0DD909E0112A07D3152A08D96A +:1084F00004E0092A05D001E0012A02D030BC0020A6 +:10850000704730BC0120704710B5282102F084F874 +:1085100010BD30B5054600780A0700090001120FAA +:108520001043287007290ED20800784400790018FB +:1085300087440305030503070300062405E00C2414 +:1085400003E0222401E00024FFDF68788009800135 +:108550002043687030BD00780007000F704710B5E9 +:10856000C01C02F098FA10BD0A4610B5C11C104696 +:1085700002F091FA10BD10B5093002F08CFA10BD6E +:108580000278BF23C9071A40490E0A430270704798 +:1085900000784006C00F704702785206520EC9019B +:1085A0000A430270704770B50C460546C11C204650 +:1085B000093002F070FA20784006400E20702978C9 +:1085C0004906C90FC9010843207070BD70B5154632 +:1085D0000E4604461F2A00D9FFDF20462A463146B0 +:1085E000093001F0BCFF6078AD1D80098001A9064B +:1085F000890E0843607070BD70B5054640780E4620 +:108600008406A40E062C00D2FFDFA41FE4B21F2CA8 +:1086100000D91F24294622460931304601F09FFF28 +:10862000204670BD70B515460E4604461F2A00D977 +:10863000FFDF20462A463146093001F090FF60787E +:10864000AD1D80098001A906890E0843607070BDC8 +:1086500070B5044640780E468506AD0E062D00D254 +:10866000FFDFAD1FEDB21F2D00D9FFDF21462A46E7 +:108670000931304601F073FF284670BD0A78C27395 +:108680004A7802748A784274C978817470470A788B +:10869000C2744A7802758978417570474176090A33 +:1086A00081767047C176090A017770474177090AD8 +:1086B00081777047C175090A0176704781757047E7 +:1086C00020300279C90652095201C90E0A430271CB +:1086D000704720300279D206D20E49010A43027156 +:1086E000704710B51F3002F0CBF910BD417800780B +:1086F0008906890E0007000F06D0012808D002283D +:1087000009D0062810D10AE0891F1F290AD90BE0D9 +:108710000C2907D008E0891F1F2903D904E0891F0D +:108720001F2901D801207047002070474178007848 +:1087300089060007890E000F042805D1062903D3F6 +:10874000252901D8012070470020704770B40178B6 +:108750000907090F03292ED0052931D1411C827E3A +:108760000C46437E11021943037FC27D1D02037E26 +:10877000C67E1B021343827D407835438006800EFF +:1087800022281DD106291BD31920C001814217D8E8 +:10879000FF26F436B54213D8002A11D0082A0FD884 +:1087A0008A420DD28B420BD8617F227F090211438E +:1087B000814208D904E040788006800E0C2802D05F +:1087C00070BC0020704770BC0120704710B522219A +:1087D00001F022FF10BD00B502788B0792089200CD +:1087E0009B0F1A43027042785209520142700129CC +:1087F00004D0022902D0032901D0FFDF00BD0121EE +:108800000A43427000BD00B502788B0792089200BF +:108810009B0F1A430270427852095201427001299B +:1088200004D0022902D0032901D0FFDF00BD0121BD +:108830000A43427000BD00788007800F70470278BD +:10884000EF23C9071A40C90E0A43027070474178E6 +:10885000C078C906C90E0E2835D202007A441279B2 +:108860009218974406090C0F1215181B1E21242775 +:108870002A2D0C2929D02AE0082926D027E0022910 +:1088800023D024E0172920D021E00D291DD01EE09F +:1088900001291AD01BE0012917D018E0022914D0B1 +:1088A00015E0092911D012E009290ED00FE00129A5 +:1088B0000BD00CE0012908D009E0062905D006E01C +:1088C000022902D003E01B2901D8012070470020B3 +:1088D000704730B50546C1700E291BD20800784498 +:1088E00000790018874406080A0C0E10100A1212AC +:1088F0001010140A0C240FE008240DE002240BE0F1 +:10890000172409E00D2407E0012405E0092403E011 +:10891000062401E00024FFDF68784009400120437D +:10892000687030BDC0787047C171090A0172704724 +:10893000017AC2790802104370474172090A8172B4 +:108940007047817A427A080210437047C172090A5F +:1089500001737047017BC27A08021043704741716E +:10896000090A817170478179427908021043704782 +:1089700001717047007970474173090A817370472C +:10898000817B427B08021043704770B4017AC3793F +:1089900009021943431C857A1C46467A2B0233434D +:1089A000657926792C023443C21C664E00798D1FEE +:1089B000B54215D8FF25F435AB4211D800280FD0A9 +:1089C00008280DD888420BD28C4209D8507A117AE7 +:1089D00000020843B11D884202D870BC01207047D4 +:1089E00070BC0020704710B5001D02F049F810BDA2 +:1089F0000A4610B5011D104602F042F810BD417242 +:108A0000090A81727047817A427A080210437047DE +:108A1000017170470079704710B5001D02F048F8E9 +:108A200010BD0A4610B5011D104602F041F810BDF8 +:108A30000A780273497841737047027B0A70407B61 +:108A40004870704710B50E3002F032F810BD0A467B +:108A5000014610B50E31104602F02AF810BD0A7812 +:108A600082754A78C2758A780276C97841767047ED +:108A7000827D0A70C27D4A70027E8A70407EC87014 +:108A8000704710B5001D02F013F810BD0A4610B56E +:108A9000011D104602F00CF810BD0A7802734A78E6 +:108AA00042738A788273C978C1737047027B0A70F7 +:108AB000427B4A70827B8A70C07BC87070470171AC +:108AC00070474171090A81717047C171090A0172C9 +:108AD00070470079704781794279080210437047E6 +:108AE000017AC2790802104370470171704700791A +:108AF00070470171704710B5001D01F0D9FF10BD1E +:108B00000A4610B5011D104601F0D2FF10BD10B588 +:108B1000001D01F0CDFF10BD0A4610B5011D104625 +:108B200001F0C6FF10BD30B50C4605461B2900D923 +:108B3000FFDF6878E10640094001C90E084368700C +:108B400030BD00007A0C000070B504461020851A74 +:108B5000281901F004FD2906090E06D0491EC9B2E4 +:108B600080206054204601F057FD70BD30B505E00F +:108B70005B1EDBB2CC5CD55C6C40C454002BF7D1DF +:108B800030BD10B5002409E00B78521E5B00234372 +:108B900003700B78401CDC09D2B2491C002AF3D1C7 +:108BA00010BD30B50C460978012089B01546002962 +:108BB00009D0012905D12978042902D10520107096 +:108BC000002009B030BD60680590684606900D2110 +:108BD000C01C01F021FD03226846A16801F0BFFC22 +:108BE00001202070062069460874606A08902946B2 +:108BF00004A8F6F75BFBE4E7F0B50C460978012022 +:108C0000FF4E062791B0154600290CD001291DD032 +:108C1000022945D0032904D12978042901D11770EC +:108C2000002011B0F0BD6068002809D001900296C4 +:108C30000120207068460770606A114604905EE06B +:108C40000220207004202870566027E0297804292B +:108C5000E7D1696810222069FFF793FF6868C07B3D +:108C6000000606D5E64A2069102310320146FFF7B8 +:108C70007DFF102221696069FFF783FF2069C07BB7 +:108C8000000606D5DE4A6069102310320146FFF760 +:108C90006DFF02202070042028706E600320C0E762 +:108CA00029780429BDD1A08910280AD9103880B2AA +:108CB000A081A1681023091805A86A68FFF756FF6C +:108CC00014E010281FD0C2B20DA8A168FFF73CFF26 +:108CD000626910230DA909A8FFF748FF102309A90D +:108CE00005A86A68FFF742FF0320207060680190C2 +:108CF00005A8029068460770606A29460490684695 +:108D0000F6F7D4FA8DE710232269A168E3E7F8B5F6 +:108D10000D4607460B7801200721002B07D0012BB9 +:108D200004D11378062B01D111700020F8BD6C69B5 +:108D300001266170E8686060686A6062A168287CEA +:108D40000870A681A068A9682022401C01F007FCD9 +:108D5000A08920222030A081A0686968213001F01C +:108D6000FEFBA08921462030A0812E703846F6F700 +:108D7000B4FAF8BDF7B50D46012009781746064646 +:108D8000002913D0012922D002297DD003290CD13A +:108D90003978062909D179681022E86901F0DFFBEA +:108DA00008203870183500207D60FEBD2C6A072031 +:108DB000607093482022203060602020A081686A83 +:108DC00060626968A06801F0CAFB2E70D3E0397850 +:108DD0000629EAD12C6A07206070686A60625168CF +:108DE0001022E86901F0BBFBE8696060A068002719 +:108DF0000770A681A06806224670A089401C80B238 +:108E0000A081A16808186969491C01F0A8FBA08924 +:108E1000801D80B2A0816969A2680978C907C90F5D +:108E20001154A0890622401C80B2A081A1680818B4 +:108E30002969491C01F093FBA089801D80B2A081A3 +:108E40002969A2680978C907C90F1154A08910229D +:108E5000401C80B2A081A1680818E96801F07FFB7E +:108E6000A0891022103080B2A081A1680818A968DA +:108E700001F075FBA0890422103080B2A081A168A6 +:108E800008185F49091F00E00CE001F068FBA089A9 +:108E9000001D80B2A081A1680F54A089401CA08150 +:108EA000022067E03978062993D151681022A86919 +:108EB00001F055FB2C6A07206070E8696060686A01 +:108EC0006062A16800200870A681A0680622467032 +:108ED000A089401C80B2A081A16808186969491C5A +:108EE00001F03DFBA089801D80B2A0816969A26864 +:108EF0000978C907C90F1154A0890622401C80B205 +:108F0000A081A16808182969491C01F028FBA089E3 +:108F1000801D80B2A0812969A2680978C907C90F9C +:108F20001154A0891022401C80B2A081A1680818A9 +:108F3000E96801F014FBA0891022103080B2A081F2 +:108F4000A1680818A96801F00AFBA0890422103062 +:108F500080B2A081A16808182949091F01F0FFFA11 +:108F6000A089001D80B2A081A1680E54A089401C78 +:108F7000A0810320287021460098F6F7AEF9FEBDC7 +:108F800070B50D46064609780120002908D0012950 +:108F900005D11178062902D109201070002070BD7A +:108FA0002C6A0720607068686060686A6062E969BE +:108FB0000622491CA06801F0D2FA0620A081E869C7 +:108FC000A16800780622C007C00F8871A089401CE4 +:108FD00080B2A081A1680818A969491C01F0BFFAF4 +:108FE000A089801D80B2A081A969A2680978C907FB +:108FF000C90F1154A089401C80B2A081A16801E072 +:10900000AAAE010008180322696901F0A8FAA08934 +:109010001022C01C80B2A081A1680818296901F043 +:109020009EFAA0891022103080B2A081A168081891 +:10903000E96801F094FAA0891022103080B2A08172 +:10904000A1680818A96801F08AFAA08921461030A1 +:10905000A081012028703046F6F73FF970BD70B549 +:109060000D46064609780120144600290CD0012936 +:1090700009D12178062906D10A202070606801F004 +:10908000CFFA6060002070BD6C6907206070E868EE +:109090006060686A606229691022A06801F05FFA66 +:1090A0001020A081A06820221030A96801F057FA92 +:1090B000A0892022203080B2A081A16808186968A8 +:1090C00001F04DFAA08921462030A08101202870AE +:1090D0003046F6F702F970BD70B50C4609780120EC +:1090E00006268EB0154600290BD0012932D0022960 +:1090F00005D12978042902D10B20107000200EB070 +:1091000070BD606907220078C107C90F6846017009 +:10911000A0690078C107C90F68464170801CE168EA +:1091200001F01DFA02A807220130216901F017FAA7 +:109130006068059009A8069010236A46A168FFF7A9 +:1091400015FD0120207068460674606A0890294663 +:1091500004A822E029780429D1D1A169062205A812 +:10916000491C01F0FCF9616906A806220230491C7D +:1091700001F0F5F9002008906068019009A80290BC +:10918000102305AA6968FFF7F1FC022020706846E9 +:109190000670606A049029466846F6F787F8AEE7DD +:1091A00030B50C460978012089B01546002908D051 +:1091B000012905D12978042902D10C201070002042 +:1091C000FFE460680590684606900822E16801F0B7 +:1091D000C6F9082202A8A16801F0C1F90120207097 +:1091E000062069460874606A0890294604A8F6F7C4 +:1091F0005DF8E6E430B50C460978012089B01546E3 +:10920000002908D0012905D12978042902D10D208F +:1092100010700020D5E4606805906846069008222A +:10922000A16801F09CF900200290039001202070B9 +:10923000062069460874606A0890294604A8F6F773 +:1092400035F8BEE410B50B7801208AB0002B09D0A8 +:10925000012B05D11178042902D10E2010700020B5 +:109260000AB010BD48680590684606908B681C7867 +:1092700004705B784370CB681C7884705B78C37033 +:109280000020019002900390012008700623684698 +:109290000374486A0890114604A8F6F707F8DFE758 +:1092A00010B50C780123002C04D0012C11D0022C15 +:1092B00028D121E001220A70CA68052353704B6847 +:1092C0005360114B93609B1ED360496A51621146F3 +:1092D0000EE014780E2C15D102230B70CB680424F9 +:1092E0005C7052685A608A689A60496A5962194685 +:1092F000F5F7F3FF034605E010780D2802D10F20A3 +:1093000010700023184610BDA4AE010070B50C46C5 +:1093100001462039342901D301200BE048280BD025 +:10932000211D074E800080190EC980382568066807 +:109330002846B047206070BD2046E7F7F9FEF9E700 +:10934000DCAE010010B5444800F042FA002800D01D +:10935000FFDF4148401C00F03BFA002800D0FFDF4F +:1093600010BDF1B53D4D82B06868009001263A48C5 +:1093700000F036FA384C002803D10026601C00F0BB +:1093800047FA3749374A0120506000230B604B6091 +:10939000029B6B60106034481214344F19E003696B +:1093A000DB0616D5324B1A60EFF31083DB07DB0FB9 +:1093B00072B600D001239C4603237B600B68002B10 +:1093C00003D14B68002B00D120BF6346002B00D196 +:1093D00062B60B68002B02D14B68002BDFD04868C7 +:1093E0000028CFD1002E05D000986860601C00F0E6 +:1093F000F7F907E0601C00F0F3F90028BED1164829 +:1094000000F006FA0020FEBDF0B58FB0064604A8B5 +:1094100008AA0D4600240C920D9017E020460C215E +:1094200048430746E9591022684601F098F87F1929 +:10943000102279680D9801F092F86846FFF791FFC5 +:109440001022B8680C9901F08AF8641CB442E5DB7C +:1094500000200FB0F0BD84E75401002000E500407B +:1094600000E1004000E0004000ED00E000E30040CB +:1094700080E200E0CB48002101708170704770B538 +:10948000C94D01236B60C94B1C68002CFCD0002423 +:1094900007E00E6806601E68002EFCD0001D091D46 +:1094A000641C9442F5D30020686018680028FCD042 +:1094B00070BD70B5BB4C0546BD4E2078022800D06B +:1094C000FFDFB54200D3FFDF6169BA48012902D846 +:1094D000B94A954201DD03224271491C6161711B49 +:1094E000C160B4496078F6F71DFE70BD70B5AD4C33 +:1094F0000D466178884200D0FFDFAD4E2B0001F0B1 +:10950000EFFA094D0622304D4D4D4D3C4D0020786F +:10951000022800D0FFDF03202070A078022802D0AC +:10952000012804D008E0A06800F00EFC04E020460A +:10953000083007C8FFF7A3FF052020700020A070A7 +:10954000F6F70FF970BDF6F7D3F901466068F7F743 +:1095500003FBB0420DD2616902290AD2FFF7A9FFCD +:1095600070BDF6F7C5F901466068F7F7F5FAB04245 +:10957000F4D30320F7F7A5FD07E02078022809D0EF +:10958000052805D0FFDF0420207000F002F970BD2F +:10959000022000E00320F7F794FDF4E7FFDF70BD41 +:1095A00070B50546F6F7A4F97E4C60602078012876 +:1095B00000D0FFDF7F490220087000220A718D6011 +:1095C00004224A717A4ACA6020706078F6F7AAFDD0 +:1095D00070BD10B5734CA078002802D12078002807 +:1095E00001D0112010BD7548F6F71AF96070607847 +:1095F000002804D0012020700020606110BD0320ED +:1096000010BD0246010B012310B55B0401209A42F4 +:1096100003D2884000F042FF10BD01239B049A4210 +:1096200004D22039884000F041FF10BD03235B04C1 +:109630009A4204D24039884000F040FF10BD012317 +:10964000DB049A4204D26039884000F039FF10BD33 +:10965000002010BDF8B515469200044617190E46B5 +:109660003F1F009200F081FB012109070A69504366 +:10967000009A9219121FB24201D2012200E0002288 +:10968000002D03D009698908A94201D20920F8BD3B +:109690004B498C4219D3A74217D3844205D2874243 +:1096A00003D220463043800701D01020F8BD8E42FF +:1096B0000BD3002A09D12046FFF7A3FF002804D1CD +:1096C0003846FFF79EFF002801D00F20F8BD3D4827 +:1096D0003D490068884205D02A4631462046FFF7BA +:1096E000CEFE0FE0FFF775FF0028EFD12D480121D6 +:1096F000C660056184608170284630214843183077 +:10970000FFF74EFF0020F8BD70B501252D07296930 +:1097100004462B4800F09DFF84420BD300F025FB4C +:10972000A04201D8102070BD28696043FFF769FF8F +:10973000002801D00F2070BD2248234900688842CC +:1097400004D02869604300F0FFFA0CE0FFF741FF06 +:109750000028F0D12969134861438160022181709A +:109760001A48FFF71DFF002070BD1548010B0120AE +:109770008840401E704770B50D460446FFF7F5FF60 +:10978000204201D00F2070BD2946204600F09AFEED +:1097900070BD10B5034C6078F6F796F80020207085 +:1097A000A07010BD5801002000E5014000E4014018 +:1097B000B08F06005811002030750000ED940100B4 +:1097C00000B0010098000020BEBAFECA3A56000060 +:1097D000002101700846704701460020087070475C +:1097E000EFF31081C907C90F72B60278012A01D0C0 +:1097F000012200E0002201230370002900D162B69B +:10980000002A01D000207047012040037047E7E79D +:10981000EFF31081C907C90F72B600220270002948 +:1098200000D162B600207047F2E7000045490968A0 +:109830000160002070474349086000207047012103 +:10984000414A002803D0012803D040487047916363 +:1098500000E0D163002070473D49012008603B488B +:10986000801C704704223B4B3949002805D05A60C0 +:10987000086901221043086108E0086940084000B7 +:1098800008619A6030490020C0318860002070472C +:109890002F490622002808D0012809D002280DD01F +:1098A00003280FD02948401C70470869904302E004 +:1098B00008699043801C0861002070470869904344 +:1098C000001DF8E708691043F5E721494A6A024399 +:1098D0004A62002070471E494A6A82434A62002059 +:1098E00070471B49496A0160002070471849CA69DE +:1098F0000243CA61002070471549CA698243CA61A0 +:10990000002070471249C969016000207047104962 +:10991000024600204031002A03D0012A01D007204E +:1099200070478A63704708490020C03188600A4840 +:1099300001688022090A09021143016007490120D8 +:109940000860704700040040400000400420000010 +:10995000000500400003004000E400E000E100E0FA +:109960005A495B4B0A685B499A42096801D18904EC +:10997000890C0160002070475449554B0A685549CD +:109980009A4201D18004800C4860002070474F4902 +:109990004F4B0A684F499A4201D18004800C88607D +:1099A0000020704730B5494B494D1C684A4BAC42CA +:1099B00002D0102802D203E00E2801D3184630BD91 +:1099C000C3004448181801614261002030BD3F497E +:1099D0003F4B0A684049491C9A4202D0042802D2EF +:1099E00003E0022801D3084670473C4A0121C00029 +:1099F00080180160002070473449354B0A683649A9 +:109A0000491C9A4202D0042802D203E0022801D362 +:109A100008467047314A0121C0008018416000208B +:109A2000704770B5294A2C4B14682D4E284D820082 +:109A30005B1C9219AC4203D0042803D2116006E0EB +:109A4000022801D3184670BD8804800C10600020E5 +:109A500070BD70B51D4A204B1468214E1C4D82000C +:109A60005B1C9219AC4203D0042803D2106806E0B4 +:109A7000022801D3184670BD10688004800C08606D +:109A8000002070BD10B5134A164890600E200021CA +:109A9000C3009B1819615961401C1028F8D300209D +:109AA0000F4A05E0022803D383009B18196005E0E4 +:109AB00083009B181C68A404A40C1C60401C042890 +:109AC000F0D310BD03490748886070479800002014 +:109AD000BEBAFECA00F501400820000000F00140B7 +:109AE00000F8014000C0FFFF10B572B600F0D7F8D3 +:109AF00000280BD0E7F7F4FBF5F71EFEF7F76BFA3B +:109B00006B490020C86288626A49086062B600201A +:109B100010BDF3B50446002601200007C06A81B0DD +:109B2000C0430006000E04D163480068401C00D109 +:109B3000012672B600F0B3F8002802D062B6082001 +:109B4000FEBDE7F70BFBE7F7CFFB5C4F002500906E +:109B50006909E806C00E8900C9190968C140C8072B +:109B60001FD0202D03D20098E840C0071FD168B253 +:109B7000002808DA0107090F08398A0850499200BD +:109B80005118C96904E081084E4A8900891809689A +:109B90008007C00EC1400806800F00F005F90028BC +:109BA00005D06D1C202DD3D3002C03D003E062B66A +:109BB0004548FEBD454C2078022803D962B60120F5 +:109BC0000003FEBD3E48C1690902090AC2051143EE +:109BD000C161002E05D1364D3D48E862E7F784FBB0 +:109BE000A86220780028607802D000280BD107E016 +:109BF000002808D0402806D8A078212803D804E0FF +:109C0000A078002801D00720FEBD2A49314808600D +:109C1000314902980860E7F767FB2146F7F7C2F978 +:109C2000F5F74EFD00F0FCF9FFF724FC2046E7F7BE +:109C300025FB040062B603D0FFF756FF2046FEBDA9 +:109C40000020FEBD10B5044600F029F8002800D021 +:109C500001202070002010BD2049086000207047BE +:109C600010B50C46102808D011280BD012280CD0A3 +:109C700013280ED00120086010BD03CC083CFFF76C +:109C800048FF0AE0FFF730FF07E02068FFF7DAFF40 +:109C900003E01249206808600020206010BD0548DC +:109CA0000C490068884201D10120704700207047AC +:109CB00000050040980000200010001000E100E0C6 +:109CC00000ED00E000E400E001100000ACAF010096 +:109CD00088120000BEBAFECA7001002004000020F5 +:109CE000F0B585B00F460446FEF7A5FD0546607841 +:109CF0006946C606F60E3846F3F78AFD01000AD01B +:109D0000012D02D0032005B0F0BD01980279C3787F +:109D10001002184307E0022D12D1042E10D320792F +:109D2000E27800021043001D80B28919814202D1FD +:109D3000002005B0F0BD814202D2012005B0F0BD87 +:109D4000022005B0F0BD00000A4A022151600A4914 +:109D50000B68002BFCD0906008680028FCD0002025 +:109D6000506008680028FCD0704701200007406957 +:109D70007047000000E5014000E401408107C90E82 +:109D8000002808DA0007000F08388008854A80009C +:109D90008018C06904E08008834A80008018006849 +:109DA000C8400006800F7047042805D2002803D061 +:109DB000022801D0012070470020704710B50446EA +:109DC00000F0E1F8002812D02046FFF7D7FFFFF798 +:109DD000EBFF00280DD07549E2060B78D20E01206A +:109DE0009040002B08D04A681043486006E0704855 +:109DF00010BD6F48401C10BD6E490860002010BDAA +:109E000010B5044600F0BFF800280BD06749E20601 +:109E10000B78D20E01209040002B05D04A68824377 +:109E20004A6004E0624810BD624980310860002049 +:109E300010BD70B50D46044600F0A5F800280BD003 +:109E40005D480068E206D20E01219140084000D032 +:109E500001202860002070BD554870BD10B5044633 +:109E600000F091F8002807D0E106C90E01208840D3 +:109E700051490860002010BD4D4810BD10B5044682 +:109E800000F081F8002808D0E106C90E01208840C2 +:109E9000494980310860002010BD454810BD70B5AB +:109EA0000D46044600F06FF8002819D02846FFF749 +:109EB0007BFF002816D0A007C10EFF228A40A8070A +:109EC000000E8840002C10DA2107090F08398B0892 +:109ED00034499B005B18D96991430143D9610CE077 +:109EE000334870BD3248401C70BDA3082E499B000A +:109EF0005B181968914301431960002070BD70B56B +:109F00000C46054600F03FF8002806D02846FFF72B +:109F100035FFC0B22060002070BD254870BDBFF382 +:109F20004F8F20492548C860BFF34F8FFEE770B5BB +:109F30000546F7F7EEFC002801D0072070BD1B4C4A +:109F40000120217800290ED1207072B6F7F752F85F +:109F5000184E8036316881436160F7F74BF8C04393 +:109F6000306062B600202870002070BD0F490A786A +:109F7000002A06D0002804D10E4A4868106000204C +:109F800008700020704710B50446202807DAF7F75C +:109F900031F80121A140084201D1012010BD00206B +:109FA00010BD000000ED00E000E400E074010020BE +:109FB0000120000000E100E000E200E00400FA05FA +:109FC00070B5002402460D4620462146002A1ED0C8 +:109FD000012A04D0022A04D0032A1ED103E0012062 +:109FE00002E0022013E003202B0000F079FD0716A9 +:109FF0000507090B0D0F1600012108E0022106E0FC +:10A00000032104E0042102E0052100E00621F5F728 +:10A0100020FC002801D0204670BD0724FBE700008B +:10A02000FA4805218170002101704170C170816082 +:10A03000704710B5F6490A78022A07D0CA68101886 +:10A04000C860C8686438F6F749FD10BD8A68101802 +:10A0500088608868F6E70378EE49EF4A002B02D063 +:10A06000012B10D014E00379012B01D0002B0FD16C +:10A070004379002B01D0012B0AD18368643B8B42CA +:10A0800006D2C06810E00379012B03D0002B01D069 +:10A09000002070474379002B01D0012BF8D1C36811 +:10A0A000643B8B42F4D280689042F1D80120704723 +:10A0B000F8B504460226F6F7F0F90068002800D04B +:10A0C000FFDF0127D14D002C08D02078002817D0C1 +:10A0D000012805D0022811D0032813D02F710DE0DC +:10A0E0006068C82808D3F6F762FD002804D06068CD +:10A0F000FFF79FFF012603E0002601E000F0B4F91E +:10A100003046F8BD28780028F8D16068FFF7A3FF33 +:10A110000028E3D060680078002823D0A8780428BD +:10A1200000D0FFDFBA4F0020387060680079002847 +:10A130003DD00020387160684079002839D0042073 +:10A14000787160688168E868F5F73CFEB86060681F +:10A15000C0686430F8600320A870AD49E878F5F76E +:10A16000E1FFCBE7AA480221017061680979002963 +:10A1700019D00021017161684979002915D00421A5 +:10A18000417161688968643181606168C968C160D2 +:10A19000C0689E4C14346060F5F7AAFB20606F70B5 +:10A1A0000220A870AAE70321E4E70321E8E70120E1 +:10A1B000C0E70320C4E7F8B5944C0D46E178884227 +:10A1C00000D0FFDF284600250126914F030000F054 +:10A1D00087FC09060E2E4C6C727DA282A200A0782C +:10A1E000032803D0A078022800D0FFDFF8BDA078B4 +:10A1F000032803D0A078022800D0FFDF0420A0703D +:10A200002571207800280FD1FFF713FF3878022836 +:10A2100006D0B868E06000F061F9206100204FE0EE +:10A22000E078F5F7EDFDF5E700F01EF9F8BDA07850 +:10A23000032803D0A078022800D0FFDF2078002870 +:10A2400002D000F019F9F8BDA07803281AD1042033 +:10A2500027E0081AF8606E49E078F5F763FFF8BD6B +:10A260000420F6F72EFFA570F8BDA078032803D0D0 +:10A27000A078022800D0FFDF20780028E1D1A07864 +:10A2800003280DD0F5F734FB604E014614363068D4 +:10A29000F6F762FC0028E3DB71688142E0DBD8E777 +:10A2A0000520F6F70EFFA670F8BDA078042800D0B0 +:10A2B000FFDF022004E0A078042800D0FFDF0120A7 +:10A2C000A1688847FFF7F4FE05462BE0A078042834 +:10A2D000AAD0FFDFA8E7A078042806D0607800287D +:10A2E00002D0A078022800D0FFDF20780028A8D173 +:10A2F0002079002804D00620F6F7E3FE2571D2E786 +:10A300006078002805D04249E078F5F70BFF6570CA +:10A31000F8BD0720C5E7FFDFF8BD002D07D0012DF0 +:10A3200003D0FFDF022DF8D1F8BD0420C8E70320D9 +:10A33000C6E770B5050005D0344CA078052803D0D9 +:10A34000112070BD102070BD3448F5F769FAE07037 +:10A35000E078002803D0A5600020A07070BD032025 +:10A3600070BD10B529480178002901D0112010BD19 +:10A37000817805290ED0817801290DD081780029B6 +:10A380000AD0012101708178012905D08078002848 +:10A3900002D003E00F2010BD00F06EF8002010BDC9 +:10A3A000F8B51A4E0446B078002801D001280DD126 +:10A3B000002C0DD02046FFF74EFE00280AD0207852 +:10A3C000134D002808D0B07801282DD00F20F8BDFB +:10A3D0001020F8BD0720F8BD02272F702079002833 +:10A3E0001ED000202871607900281BD004206871DD +:10A3F000A0686430A860E068E860E868034C143442 +:10A400006060F5F775FA2060B77023E07C010020EA +:10A41000681100203D860100FF1FA107B7A10100C0 +:10A420000320DFE70320E2E70020287020790028DE +:10A4300016D0002028716079002813D0042068719C +:10A44000A168F068F5F7BEFCA860E0686430E860D9 +:10A450000320B0700F49F078F5F764FE0020F8BDD6 +:10A460000320E7E70320EAE710B50B48006900F096 +:10A470002EF8F5F776F910BD10B5074CE078F5F732 +:10A4800023FA0820F6F71DFE0520A070002020709A +:10A49000607010BD681100207C010020144909681B +:10A4A000014201D0012070470020704710494968DF +:10A4B000014201D001207047002070470020704702 +:10A4C000002070470A4A1060516000207047094917 +:10A4D0008A6A094B1A4002438A627047054A916AA8 +:10A4E0000548054BC0430840194091627047000081 +:10A4F0000006004000050040FD7EFFFF70477047EA +:10A5000070477047034610B50B439B070FD1042AD1 +:10A510000DD308C810C9121FA342F8D018BA21BA27 +:10A52000884201D9012010BD0020C04310BD002A7F +:10A5300003D0D30703D0521C07E0002010BD0378DE +:10A540000C78401C491C1B1B07D103780C78401C5D +:10A55000491C1B1B01D1921EF1D1184610BDF8B544 +:10A56000042A2CD3830712D00B78491C0370401C9B +:10A57000521E83070BD00B78491C0370401C521EDF +:10A58000830704D00B78491C0370401C521E8B07B4 +:10A590009B0F05D0C91ADF002023DE1B08C90AE083 +:10A5A000E6F7F4FDF8BD1D4608C9FD401C46B44061 +:10A5B0002C4310C0121F042AF5D2F308C91A521EE8 +:10A5C000F0D40B78491C0370401C521EEAD40B785F +:10A5D000491C0370401C012AE4D409780170F8BDBD +:10A5E00001E004C0091F0429FBD28B0701D50280BA +:10A5F000801CC90700D00270704700290BD0C30728 +:10A6000002D00270401C491E022904D3830702D5E0 +:10A610000280801C891EE3E70022EEE70022DFE7CC +:10A620000378C2781946437812061B0219438378CF +:10A63000C0781B04194311430902090A00060843A4 +:10A640007047020A08704A70020C8A70020ECA70C3 +:10A650007047002203098B4273D3030A8B4258D3FD +:10A66000030B8B423CD3030C8B4221D312E00346F5 +:10A670000B437FD4002243088B4274D303098B42DF +:10A680005FD3030A8B4244D3030B8B4228D3030CC2 +:10A690008B420DD3FF22090212BA030C8B4202D364 +:10A6A0001212090265D0030B8B4219D300E0090A8C +:10A6B000C30B8B4201D3CB03C01A5241830B8B4295 +:10A6C00001D38B03C01A5241430B8B4201D34B037E +:10A6D000C01A5241030B8B4201D30B03C01A5241E3 +:10A6E000C30A8B4201D3CB02C01A5241830A8B4268 +:10A6F00001D38B02C01A5241430A8B4201D34B0251 +:10A70000C01A5241030A8B4201D30B02C01A5241B4 +:10A71000CDD2C3098B4201D3CB01C01A5241830968 +:10A720008B4201D38B01C01A524143098B4201D3A2 +:10A730004B01C01A524103098B4201D30B01C01ACD +:10A740005241C3088B4201D3CB00C01A5241830847 +:10A750008B4201D38B00C01A524143088B4201D374 +:10A760004B00C01A5241411A00D2014652411046D4 +:10A7700070475DE0CA0F00D04942031000D3404249 +:10A78000534000229C4603098B422DD3030A8B427F +:10A7900012D3FC22890112BA030A8B420CD389011D +:10A7A00092118B4208D3890192118B4204D3890103 +:10A7B0003AD0921100E08909C3098B4201D3CB0141 +:10A7C000C01A524183098B4201D38B01C01A5241F6 +:10A7D00043098B4201D34B01C01A524103098B42FA +:10A7E00001D30B01C01A5241C3088B4201D3CB00E5 +:10A7F000C01A524183088B4201D38B00C01A5241C8 +:10A80000D9D243088B4201D34B00C01A5241411A9E +:10A8100000D20146634652415B10104601D34042CC +:10A82000002B00D54942704763465B1000D340427D +:10A8300001B50020C046C04602BD70477047704752 +:10A8400010B500F05DF810BD30B58C180278401CD2 +:10A8500013071B0F01D10378401C120906D102789F +:10A86000401C03E00578401C0D70491C5B1EF9D1AB +:10A8700001E00B70491C521EFBD1A142E6D300201F +:10A8800030BD0000154B1860154B1960154B1A6050 +:10A890007047FEDF04207146084218D10699124A1B +:10A8A000914214DC069902394878DF280FD10878E4 +:10A8B000FE2806D0FF280AD10C480D4A0D4B1B6814 +:10A8C00018470D480099019A0A4B1B6818470698CB +:10A8D00005990A4B1B68DB68184700009C010020A3 +:10A8E000A0010020A401002000B001000100000030 +:10A8F0000000000070010020011000000400002092 +:10A900001D481E497047FFF7FBFFE6F709FC00BD35 +:10A9100001200007C06AC0B2FF2804D118481949B5 +:10A920000968884202D01848184901601848194936 +:10A930000968884203D1184A13605B68184700BD54 +:10A9400020BFFDE712481349096888420ED1134B16 +:10A9500018680B498842F3D080F308881049884270 +:10A9600004DD1048026802210A4302600E48804755 +:10A970000E488047FFDF000078110020781100208A +:10A98000FFFFFFFF001000102C0500400800000032 +:10A9900000100000000000200400002000B00100B2 +:10A9A0000020002024050040E52F000011A901002F +:10A9B00004207146084202D0EFF3098101E0EFF371 +:10A9C0000881886902380078102813DB20280FDB03 +:10A9D0002B280BDB0A4A12680A4B9A4203D16028E3 +:10A9E00004DB094A1047022008607047074A1047F5 +:10A9F000074A1047074A12682C32126810470000B5 +:10AA000098000020BEBAFECAED1200000D930100AE +:10AA1000619C0100040000200E4B0F4908470F4BBA +:10AA20000D4908470E4B0C4908470E4B0A49084789 +:10AA30000D4B094908470D4B074908470C4B064980 +:10AA400008470C4B044908470B4B034908470B4B7D +:10AA500001490847F9920000692F0000492F0000C2 +:10AA60007B8F0000298F0000D1940000F7120000B6 +:10AA70002F2F00003F900000C19500003111000011 +:10AA80000A7802704B7843708A788270CA78C270F4 +:10AA90000B79037170470A7802704B7843708A789B +:10AAA0008270CA78C2700B7903714A79427170471B +:10AAB0000A7802704B7843708A788270CA78C270C4 +:10AAC0000B7903714A7942718A798271CB79C371AA +:10AAD00070470A8802804A8842800A79027170476A +:10AAE00030B47446641E2578641CAB4200D21D4607 +:10AAF000635D5B00E31830BC18470000917D0000E7 +:10AB0000377F0000637D0000278000004D8000003B +:10AB10008B800000C58000000181000037810000AB +:10AB20008B8100002F1200002F1200002F12000056 +:10AB30002F1200002F1200002F12000049220000E7 +:10AB4000DB220000FB22000017240000AB1E0000E7 +:10AB50005D260000412700005D270000ED2C00006D +:10AB6000112D0000472C0000972C0000432D000001 +:10AB7000CF2D0000D1420000C74400007F480000F4 +:10AB80008F490000174A0000C14A0000334B000003 +:10AB90004F4C0000314D0000BD4D000075270000F6 +:10ABA0007F2700008D270000731E00006D28000025 +:10ABB000451E0000C72900002F1200009F5600000C +:10ABC000175700002F57000049570000B1580000E8 +:10ABD0006F57000081570000BF570000E357000087 +:10ABE0009B5800002F1200002F1200002F120000AF +:10ABF0002F1200002F1200002F1200003F6F0000E4 +:10AC00005D6F0000656F0000B76F0000E76F000028 +:10AC1000D17000006971000085710000CD710000E5 +:10AC2000E9720000D77400000B760000CD600000D0 +:10AC30002F1200002F1200002F1200005F8B000067 +:10AC40009D8B0000BF8B0000100110013A02000034 +:10AC50001A020000717600001B790000FFFFFFFF61 +:10AC60000000FFFF41870000811B0000E753000048 +:10AC700021610000BB7800000000000023002300D9 +:10AC800046004D0023002300F500000000000000F6 +:10AC900000000000E5BB0000000000000000000014 +:10ACA0000000000069C90000000000000000000072 +:10ACB0000000000051BC0000DBBC000000000000F0 +:10ACC000000000000FC000008BBD000097C2000014 +:10ACD0000000000000000000FFCD000000000000A8 +:10ACE0000000000000000000D9C0000031CA0000D0 +:10ACF0000000000017CB00008BCB0000000000001C +:10AD00002BC300000DC400000000000051CB000068 +:10AD100073C400001BC7000083C700005BC80000AD +:10AD20002FC20000EFC800000000000059C1000061 +:10AD30000000000083BE0000FFBD00009FC90000AE +:10AD4000CFCC00003DCD00000000000091C000000D +:10AD50002DBE000041C0000045CF0000D5BF00005F +:10AD600051CE000000000000ABCD000053BD00003C +:10AD700087BC0000D9BE0000CFBD0000C3CE0000DC +:10AD8000EFCF000035C10000A7CF0000DD38000084 +:10AD9000DD38000025220000AF8600009D63000022 +:10ADA000B1530000000000003B690100233900009E +:10ADB0002339000047220000038700000D640000D3 +:10ADC000BF530000E365010061690100BC01BC01E3 +:10ADD0003E002C0044000E00D800200101000000BD +:10ADE0000100000000010203040010111213000012 +:10ADF00000140000A38B0100D9900100A191010073 +:10AE0000F591010045920100A1920100F98B01002A +:10AE10000F8D0100758D0100818F01005F90010091 +:10AE2000A9DF000097F00000AD54010029470100A0 +:10AE3000CD5401002B470100132C0100777C010049 +:10AE40006D3B0100777C01007D2C0100D17D01006C +:10AE50001F350100D17D01008D2B01006D7D0100AA +:10AE6000A53A01006D7D0100555555D6BE898E006D +:10AE700000007006120DB413000014035A06A00956 +:10AE800000006004F208840D555555252627D6BECE +:10AE9000898EF401FA00960064004B0032001E0017 +:10AEA000140000000300656C7462000000000000E4 +:10AEB000000000000000000000008700000000000B +:10AEC00000000000000000000000BE83605ADB0BA1 +:10AED000376038A5F5AA9183886C0000619901005C +:10AEE000799901008F990100A5990100CF9901007E +:10AEF000F9990100239A0100539A01000997010072 +:10AF00005596010077970100D1970100E197010064 +:10AF100011980100BD9D0100019E0100339E0100BA +:10AF20005D9E01007D9E01009F9E0100FF9E01002D +:10AF30001F9F01002F9F01006D9F01009F120100C4 +:10AF4000A7120100B51201003F98010059980100B5 +:10AF50002D98010037980100659801009198010033 +:10AF6000CB980100D7980100E3980100ED9801000B +:10AF7000F9980100059901000F99010000000000F7 +:10AF8000E79000004191000059910000C19F01002D +:10AF9000639301000994010033A3010063A301003E +:10AFA000A1A3010071100100FF14010000100200B4 +:10AFB000D0AF010008000020A001000048A8010057 +:10AFC000F4AF0100A8010020D00F00000411000020 +:10AFD00001593601000100683720FB349B5F800473 +:10AFE0001F800010022001337F0102E429E485A8BC +:04AFF000010000005C +:00000001FF diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble.h new file mode 100644 index 0000000000..593be948e0 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble.h @@ -0,0 +1,632 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 BLE_COMMON BLE SoftDevice Common + @{ + @defgroup ble_api Events, type definitions and API calls + @{ + + @brief Module independent events, type definitions and API calls for the BLE SoftDevice. + + */ + +#ifndef BLE_H__ +#define BLE_H__ + +#include "ble_ranges.h" +#include "ble_types.h" +#include "ble_gap.h" +#include "ble_l2cap.h" +#include "ble_gatt.h" +#include "ble_gattc.h" +#include "ble_gatts.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup BLE_COMMON_ENUMERATIONS Enumerations + * @{ */ + +/** + * @brief Common API SVC numbers. + */ +enum BLE_COMMON_SVCS +{ + SD_BLE_ENABLE = BLE_SVC_BASE, /**< Enable and initialize the BLE stack */ + SD_BLE_EVT_GET, /**< Get an event from the pending events queue. */ + SD_BLE_TX_PACKET_COUNT_GET, /**< Get the total number of available application transmission packets for a particular connection. */ + SD_BLE_UUID_VS_ADD, /**< Add a Vendor Specific UUID. */ + SD_BLE_UUID_DECODE, /**< Decode UUID bytes. */ + SD_BLE_UUID_ENCODE, /**< Encode UUID bytes. */ + SD_BLE_VERSION_GET, /**< Get the local version information (company id, Link Layer Version, Link Layer Subversion). */ + SD_BLE_USER_MEM_REPLY, /**< User Memory Reply. */ + SD_BLE_OPT_SET, /**< Set a BLE option. */ + SD_BLE_OPT_GET, /**< Get a BLE option. */ +}; + + /** + * @brief BLE Module Independent Event IDs. + */ +enum BLE_COMMON_EVTS +{ + BLE_EVT_TX_COMPLETE = BLE_EVT_BASE, /**< Transmission Complete. @ref ble_evt_tx_complete_t */ + BLE_EVT_USER_MEM_REQUEST, /**< User Memory request. @ref ble_evt_user_mem_request_t */ + BLE_EVT_USER_MEM_RELEASE /**< User Memory release. @ref ble_evt_user_mem_release_t */ +}; + +/**@brief BLE connection bandwidth types. + * Bandwidth types supported by the SoftDevice in packets per connection interval. + */ +enum BLE_CONN_BWS +{ + BLE_CONN_BW_NONE = 0, + BLE_CONN_BW_LOW, + BLE_CONN_BW_MID, + BLE_CONN_BW_HIGH +}; + +/**@brief Common Option IDs. + * IDs that uniquely identify a common option. + */ +enum BLE_COMMON_OPTS +{ + BLE_COMMON_OPT_CONN_BW = BLE_OPT_BASE, /**< Bandwidth configuration @ref ble_common_opt_conn_bw_t */ + BLE_COMMON_OPT_PA_LNA /**< PA and LNA options */ +}; + +/** @} */ + +/** @addtogroup BLE_COMMON_DEFINES Defines + * @{ */ + +/** @brief Required pointer alignment for BLE Events. +*/ +#define BLE_EVTS_PTR_ALIGNMENT 4 + +/** @defgroup BLE_USER_MEM_TYPES User Memory Types + * @{ */ +#define BLE_USER_MEM_TYPE_INVALID 0x00 /**< Invalid User Memory Types. */ +#define BLE_USER_MEM_TYPE_GATTS_QUEUED_WRITES 0x01 /**< User Memory for GATTS queued writes. */ +/** @} */ + +/** @defgroup BLE_UUID_VS_COUNTS Vendor Specific UUID counts + * @{ + */ +#define BLE_UUID_VS_COUNT_MIN 1 /**< Minimum VS UUID count. */ +#define BLE_UUID_VS_COUNT_DEFAULT 0 /**< Use the default VS UUID count (10 for this version of the SoftDevice). */ +/** @} */ + +/** @} */ + +/** @addtogroup BLE_COMMON_STRUCTURES Structures + * @{ */ + +/**@brief User Memory Block. */ +typedef struct +{ + uint8_t *p_mem; /**< Pointer to the start of the user memory block. */ + uint16_t len; /**< Length in bytes of the user memory block. */ +} ble_user_mem_block_t; + +/** + * @brief Event structure for @ref BLE_EVT_TX_COMPLETE. + */ +typedef struct +{ + uint8_t count; /**< Number of packets transmitted. */ +} ble_evt_tx_complete_t; + +/**@brief Event structure for @ref BLE_EVT_USER_MEM_REQUEST. */ +typedef struct +{ + uint8_t type; /**< User memory type, see @ref BLE_USER_MEM_TYPES. */ +} ble_evt_user_mem_request_t; + +/**@brief Event structure for @ref BLE_EVT_USER_MEM_RELEASE. */ +typedef struct +{ + uint8_t type; /**< User memory type, see @ref BLE_USER_MEM_TYPES. */ + ble_user_mem_block_t mem_block; /**< User memory block */ +} ble_evt_user_mem_release_t; + + +/**@brief Event structure for events not associated with a specific function module. */ +typedef struct +{ + uint16_t conn_handle; /**< Connection Handle on which this event occurred. */ + union + { + ble_evt_tx_complete_t tx_complete; /**< Transmission Complete. */ + ble_evt_user_mem_request_t user_mem_request; /**< User Memory Request Event Parameters. */ + ble_evt_user_mem_release_t user_mem_release; /**< User Memory Release Event Parameters. */ + } params; +} ble_common_evt_t; + +/**@brief BLE Event header. */ +typedef struct +{ + uint16_t evt_id; /**< Value from a BLE__EVT series. */ + uint16_t evt_len; /**< Length in octets including this header. */ +} ble_evt_hdr_t; + +/**@brief Common BLE Event type, wrapping the module specific event reports. */ +typedef struct +{ + ble_evt_hdr_t header; /**< Event header. */ + union + { + ble_common_evt_t common_evt; /**< Common Event, evt_id in BLE_EVT_* series. */ + ble_gap_evt_t gap_evt; /**< GAP originated event, evt_id in BLE_GAP_EVT_* series. */ + ble_l2cap_evt_t l2cap_evt; /**< L2CAP originated event, evt_id in BLE_L2CAP_EVT* series. */ + ble_gattc_evt_t gattc_evt; /**< GATT client originated event, evt_id in BLE_GATTC_EVT* series. */ + ble_gatts_evt_t gatts_evt; /**< GATT server originated event, evt_id in BLE_GATTS_EVT* series. */ + } evt; +} ble_evt_t; + + +/** + * @brief Version Information. + */ +typedef struct +{ + uint8_t version_number; /**< Link Layer Version number for BT 4.1 spec is 7 (https://www.bluetooth.org/en-us/specification/assigned-numbers/link-layer). */ + uint16_t company_id; /**< Company ID, Nordic Semiconductor's company ID is 89 (0x0059) (https://www.bluetooth.org/apps/content/Default.aspx?doc_id=49708). */ + uint16_t subversion_number; /**< Link Layer Sub Version number, corresponds to the SoftDevice Config ID or Firmware ID (FWID). */ +} ble_version_t; + +/* @brief: Configuration parameters for the PA and LNA. */ +typedef struct +{ + uint8_t enable :1; /**< Enable toggling for this amplifier */ + uint8_t active_high :1; /**< Set the pin to be active high */ + uint8_t gpio_pin :6; /**< The GPIO pin to toggle for this amplifier */ +} ble_pa_lna_cfg_t; + +/* + * @brief PA & LNA GPIO toggle configuration + * + * This option configures the SoftDevice to toggle pins when the radio is active for use with a power amplifier and/or + * a low noise amplifier. + * + * Toggling the pins is achieved by using two PPI channels and a GPIOTE channel. The hardware channel IDs are provided + * by the application and should be regarded as reserved as long as any PA/LNA toggling is enabled. + * + * @note @ref sd_ble_opt_get is not supported for this option. + * @note This feature is only supported for nRF52, on nRF51 @ref NRF_ERROR_NOT_SUPPORTED will always be returned. + * @note Setting this option while the radio is in use (i.e. any of the roles are active) may have undefined consequences + * and must be avoided by the application. + * + */ +typedef struct +{ + ble_pa_lna_cfg_t pa_cfg; /**< Power Amplifier configuration */ + ble_pa_lna_cfg_t lna_cfg; /**< Low Noise Amplifier configuration */ + + uint8_t ppi_ch_id_set; /**< PPI channel used for radio pin setting */ + uint8_t ppi_ch_id_clr; /**< PPI channel used for radio pin clearing */ + uint8_t gpiote_ch_id; /**< GPIOTE channel used for radio pin toggling */ +} ble_common_opt_pa_lna_t; + +/** + * @brief BLE connection bandwidth configuration parameters + */ +typedef struct +{ + uint8_t conn_bw_tx; /**< Connection bandwidth configuration for transmission, see @ref BLE_CONN_BWS.*/ + uint8_t conn_bw_rx; /**< Connection bandwidth configuration for reception, see @ref BLE_CONN_BWS.*/ +} ble_conn_bw_t; + +/**@brief BLE connection specific bandwidth configuration parameters. + * + * This can be used with @ref sd_ble_opt_set to set the bandwidth configuration to be used when creating connections. + * + * Call @ref sd_ble_opt_set with this option prior to calling @ref sd_ble_gap_adv_start or @ref sd_ble_gap_connect. + * + * The bandwidth configurations set via @ref sd_ble_opt_set are maintained separately for central and peripheral + * connections. The given configurations are used for all future connections of the role indicated in this structure + * unless they are changed by subsequent @ref sd_ble_opt_set calls. + * + * @note When this option is not used, the SoftDevice will use the default options: + * - @ref BLE_CONN_BW_HIGH for @ref BLE_GAP_ROLE_PERIPH connections (both transmission and reception). + * - @ref BLE_CONN_BW_MID for @ref BLE_GAP_ROLE_CENTRAL connections (both transmisison and reception). + * This option allows the application to selectively override these defaults for each role. + * + * @note The global memory pool configuration can be set with the @ref ble_conn_bw_counts_t configuration parameter, which + * is provided to @ref sd_ble_enable. + * + * @note Please refer to SoftDevice Specification for more information on bandwidth configuration. + * + * @mscs + * @mmsc{@ref BLE_COMMON_CONF_BW} + * @endmscs + * + * @retval ::NRF_SUCCESS Set successfully. + * @retval ::BLE_ERROR_INVALID_ROLE The role is invalid. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid bandwidth configuration parameters. + * @retval ::NRF_ERROR_NOT_SUPPORTED If the combination of role and bandwidth configuration is not supported. + */ +typedef struct +{ + uint8_t role; /**< BLE role of the connection, see @ref BLE_GAP_ROLES. */ + ble_conn_bw_t conn_bw; /**< Bandwidth configuration parameters. */ +} ble_common_opt_conn_bw_t; + +/**@brief Option structure for common options. */ +typedef union +{ + ble_common_opt_conn_bw_t conn_bw; /**< Parameters for the connection bandwidth option. */ + ble_common_opt_pa_lna_t pa_lna; /**< Parameters for controlling PA and LNA pin toggling. */ +} ble_common_opt_t; + +/**@brief Common BLE Option type, wrapping the module specific options. */ +typedef union +{ + ble_common_opt_t common_opt; /**< COMMON options, opt_id in @ref BLE_COMMON_OPTS series. */ + ble_gap_opt_t gap_opt; /**< GAP option, opt_id in @ref BLE_GAP_OPTS series. */ +} ble_opt_t; + +/** + * @brief BLE bandwidth count parameters + * + * These parameters are used to configure the memory pools allocated within the SoftDevice for application packets + * (both transmission and reception) for all connections. + * + * @note The sum of all three counts must add up to the sum of @ref ble_gap_enable_params_t::central_conn_count and + * @ref ble_gap_enable_params_t::periph_conn_count in @ref ble_gap_enable_params_t. + */ +typedef struct { + uint8_t high_count; /**< Total number of high bandwidth TX or RX memory pools available to the application at runtime for all active connections. */ + uint8_t mid_count; /**< Total number of medium bandwidth TX or RX memory pools available to the application at runtime for all active connections. */ + uint8_t low_count; /**< Total number of low bandwidth TX or RX memory pools available to the application at runtime for all active connections. */ +} ble_conn_bw_count_t; + +/** + * @brief BLE bandwidth global memory pool configuration parameters + * + * These configuration parameters are used to set the amount of memory dedicated to application packets for + * all connections. The application should specify the most demanding configuration for the intended use. + * + * Please refer to the SoftDevice Specification for more information on bandwidth configuration. + * + * @note Each connection created at runtime requires both a TX and an RX memory pool. By the use of these configuration + * parameters, the application can decide the size and total number of the global memory pools that will be later + * available for connection creation. + * + * @mscs + * @mmsc{@ref BLE_COMMON_CONF_BW} + * @endmscs + * + */ +typedef struct { + ble_conn_bw_count_t tx_counts; /**< Global memory pool configuration for transmission.*/ + ble_conn_bw_count_t rx_counts; /**< Global memory pool configuration for reception.*/ +} ble_conn_bw_counts_t; + +/** + * @brief BLE Common Initialization parameters. + * + * @note If @ref p_conn_bw_counts is NULL the SoftDevice will assume default bandwidth configuration for all connections. + * To fit a custom bandwidth configuration requirement, the application developer may have to specify a custom memory + * pool configuration here. See @ref ble_common_opt_conn_bw_t for bandwidth configuration of individual connections. + * Please refer to the SoftDevice Specification for more information on bandwidth configuration. + */ +typedef struct +{ + uint16_t vs_uuid_count; /**< Maximum number of 128-bit, Vendor Specific UUID bases to allocate. */ + ble_conn_bw_counts_t *p_conn_bw_counts; /**< Bandwidth configuration parameters or NULL for defaults. */ +} ble_common_enable_params_t; + +/** + * @brief BLE Initialization parameters. + */ +typedef struct +{ + ble_common_enable_params_t common_enable_params; /**< Common init parameters @ref ble_common_enable_params_t. */ + ble_gap_enable_params_t gap_enable_params; /**< GAP init parameters @ref ble_gap_enable_params_t. */ + ble_gatts_enable_params_t gatts_enable_params; /**< GATTS init parameters @ref ble_gatts_enable_params_t. */ +} ble_enable_params_t; + +/** @} */ + +/** @addtogroup BLE_COMMON_FUNCTIONS Functions + * @{ */ + +/**@brief Enable the BLE stack + * + * @param[in, out] p_ble_enable_params Pointer to ble_enable_params_t + * @param[in, out] p_app_ram_base Pointer to a variable containing the start address of the application RAM region + * (APP_RAM_BASE). On return, this will contain the minimum start address of the application RAM region required by the + * SoftDevice for this configuration. Calling @ref sd_ble_enable() with *p_app_ram_base set to 0 can be used during + * development to find out how much memory a specific configuration will need. + * + * @note The memory requirement for a specific configuration will not increase between SoftDevices with the same major + * version number. + * + * @note At runtime the IC's RAM is split into 2 regions: The SoftDevice RAM region is located between 0x20000000 and + * APP_RAM_BASE-1 and the application's RAM region is located between APP_RAM_BASE and the start of the call stack. + * + * @details This call initializes the BLE stack, no other BLE related function can be called before this one. + * + * @mscs + * @mmsc{@ref BLE_COMMON_ENABLE} + * @endmscs + * + * @retval ::NRF_SUCCESS The BLE stack has been initialized successfully. + * @retval ::NRF_ERROR_INVALID_STATE The BLE stack had already been initialized and cannot be reinitialized. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid or not sufficiently aligned pointer supplied. + * @retval ::NRF_ERROR_INVALID_LENGTH The specified Attribute Table size is either too small or not a multiple of 4. + * The minimum acceptable size is defined by @ref BLE_GATTS_ATTR_TAB_SIZE_MIN. + * @retval ::NRF_ERROR_INVALID_PARAM Incorrectly configured VS UUID count or connection count parameters. + * @retval ::NRF_ERROR_NO_MEM The amount of memory assigned to the SoftDevice by *p_app_ram_base is not + * large enough to fit this configuration's memory requirement. Check *p_app_ram_base + * and set the start address of the application RAM region accordingly. + * @retval ::NRF_ERROR_CONN_COUNT The requested number of connections exceeds the maximum supported by the SoftDevice. + * Please refer to the SoftDevice Specification for more information on role configuration. + */ +SVCALL(SD_BLE_ENABLE, uint32_t, sd_ble_enable(ble_enable_params_t * p_ble_enable_params, uint32_t * p_app_ram_base)); + +/**@brief Get an event from the pending events queue. + * + * @param[out] p_dest Pointer to buffer to be filled in with an event, or NULL to retrieve the event length. + * This buffer must be 4-byte aligned in memory. + * @param[in, out] p_len Pointer the length of the buffer, on return it is filled with the event length. + * + * @details This call allows the application to pull a BLE event from the BLE stack. The application is signaled that + * an event is available from the BLE stack by the triggering of the SD_EVT_IRQn interrupt. + * The application is free to choose whether to call this function from thread mode (main context) or directly from the + * Interrupt Service Routine that maps to SD_EVT_IRQn. In any case however, and because the BLE stack runs at a higher + * priority than the application, this function should be called in a loop (until @ref NRF_ERROR_NOT_FOUND is returned) + * every time SD_EVT_IRQn is raised to ensure that all available events are pulled from the BLE stack. Failure to do so + * could potentially leave events in the internal queue without the application being aware of this fact. Sizing the + * p_dest buffer is equally important, since the application needs to provide all the memory necessary for the event to + * be copied into application memory. If the buffer provided is not large enough to fit the entire contents of the event, + * @ref NRF_ERROR_DATA_SIZE will be returned and the application can then call again with a larger buffer size. + * Please note that because of the variable length nature of some events, sizeof(ble_evt_t) will not always be large + * enough to fit certain events, and so it is the application's responsibility to provide an amount of memory large + * enough so that the relevant event is copied in full. The application may "peek" the event length by providing p_dest + * as a NULL pointer and inspecting the value of *p_len upon return: + * + * \code + * uint16_t len; + * errcode = sd_ble_evt_get(NULL, &len); + * \endcode + * + * @note The pointer supplied must be aligned to the extend defined by @ref BLE_EVTS_PTR_ALIGNMENT + * + * @mscs + * @mmsc{@ref BLE_COMMON_IRQ_EVT_MSC} + * @mmsc{@ref BLE_COMMON_THREAD_EVT_MSC} + * @endmscs + * + * @retval ::NRF_SUCCESS Event pulled and stored into the supplied buffer. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid or not sufficiently aligned pointer supplied. + * @retval ::NRF_ERROR_NOT_FOUND No events ready to be pulled. + * @retval ::NRF_ERROR_DATA_SIZE Event ready but could not fit into the supplied buffer. + */ +SVCALL(SD_BLE_EVT_GET, uint32_t, sd_ble_evt_get(uint8_t *p_dest, uint16_t *p_len)); + + +/**@brief Get the total number of available guaranteed application transmission packets for a particular connection. + * + * @details This call allows the application to obtain the total number of guaranteed application transmission packets + * available for a connection. Please note that this does not return the number of free packets, but rather the total + * amount of them for that particular connection. The application has two options to handle transmitting application packets: + * - Use a simple arithmetic calculation: after connection creation time the application should use this function to + * find out the total amount of guaranteed packets available to it and store it in a variable. + * Every time a packet is successfully queued for a transmission on this connection using any of the exposed functions in + * this BLE API, the application should decrement that variable. Conversely, whenever a @ref BLE_EVT_TX_COMPLETE event + * with the conn_handle matching the particular connection is received by the application, it should retrieve the count + * field in such event and add that number to the same variable storing the number of available guaranteed packets. This + * mechanism allows the application to be aware at any time of the number of guaranteed application packets available for + * each of the active connections, and therefore it can know with certainty whether it is possible to send more data or + * it has to wait for a @ref BLE_EVT_TX_COMPLETE event before it proceeds. + * The application can still pursue transmissions when the number of guaranteed application packets available is smaller + * than or equal to zero, but successful queuing of the tranmsission is not guaranteed. + * - Choose to simply not keep track of available packets at all, and instead handle the @ref BLE_ERROR_NO_TX_PACKETS error + * by queueing the packet to be transmitted and try again as soon as a @ref BLE_EVT_TX_COMPLETE event arrives. + * + * The API functions that may consume an application packet depending on the parameters supplied to them can be found below: + * - @ref sd_ble_gattc_write (write without response only) + * - @ref sd_ble_gatts_hvx (notifications only) + * - @ref sd_ble_l2cap_tx (all packets) + * + * @param[in] conn_handle Connection handle. + * @param[out] p_count Pointer to a uint8_t which will contain the number of application transmission packets upon + * successful return. + * @mscs + * @mmsc{@ref BLE_COMMON_APP_BUFF_MSC} + * @endmscs + * + * @retval ::NRF_SUCCESS Number of application transmission packets retrieved successfully. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + */ +SVCALL(SD_BLE_TX_PACKET_COUNT_GET, uint32_t, sd_ble_tx_packet_count_get(uint16_t conn_handle, uint8_t *p_count)); + + +/**@brief Add a Vendor Specific UUID. + * + * @details This call enables the application to add a vendor specific UUID to the BLE stack's table, for later use + * all other modules and APIs. This then allows the application to use the shorter, 24-bit @ref ble_uuid_t format + * when dealing with both 16-bit and 128-bit UUIDs without having to check for lengths and having split code paths. + * The way that this is accomplished is by extending the grouping mechanism that the Bluetooth SIG standard base + * UUID uses for all other 128-bit UUIDs. The type field in the @ref ble_uuid_t structure is an index (relative to + * @ref BLE_UUID_TYPE_VENDOR_BEGIN) to the table populated by multiple calls to this function, and the uuid field + * in the same structure contains the 2 bytes at indices 12 and 13. The number of possible 128-bit UUIDs available to + * the application is therefore the number of Vendor Specific UUIDs added with the help of this function times 65536, + * although restricted to modifying bytes 12 and 13 for each of the entries in the supplied array. + * + * @note Bytes 12 and 13 of the provided UUID will not be used internally, since those are always replaced by + * the 16-bit uuid field in @ref ble_uuid_t. + * + * @note If a UUID is already present in the BLE stack's internal table, the corresponding index will be returned in + * p_uuid_type along with an NRF_SUCCESS error code. + * + * @param[in] p_vs_uuid Pointer to a 16-octet (128-bit) little endian Vendor Specific UUID disregarding + * bytes 12 and 13. + * @param[out] p_uuid_type Pointer to a uint8_t where the type field in @ref ble_uuid_t corresponding to this UUID will be stored. + * + * @retval ::NRF_SUCCESS Successfully added the Vendor Specific UUID. + * @retval ::NRF_ERROR_INVALID_ADDR If p_vs_uuid or p_uuid_type is NULL or invalid. + * @retval ::NRF_ERROR_NO_MEM If there are no more free slots for VS UUIDs. + */ +SVCALL(SD_BLE_UUID_VS_ADD, uint32_t, sd_ble_uuid_vs_add(ble_uuid128_t const *p_vs_uuid, uint8_t *p_uuid_type)); + + +/** @brief Decode little endian raw UUID bytes (16-bit or 128-bit) into a 24 bit @ref ble_uuid_t structure. + * + * @details The raw UUID bytes excluding bytes 12 and 13 (i.e. bytes 0-11 and 14-15) of p_uuid_le are compared + * to the corresponding ones in each entry of the table of vendor specific UUIDs populated with @ref sd_ble_uuid_vs_add + * to look for a match. If there is such a match, bytes 12 and 13 are returned as p_uuid->uuid and the index + * relative to @ref BLE_UUID_TYPE_VENDOR_BEGIN as p_uuid->type. + * + * @note If the UUID length supplied is 2, then the type set by this call will always be @ref BLE_UUID_TYPE_BLE. + * + * @param[in] uuid_le_len Length in bytes of the buffer pointed to by p_uuid_le (must be 2 or 16 bytes). + * @param[in] p_uuid_le Pointer pointing to little endian raw UUID bytes. + * @param[out] p_uuid Pointer to a @ref ble_uuid_t structure to be filled in. + * + * @retval ::NRF_SUCCESS Successfully decoded into the @ref ble_uuid_t structure. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_LENGTH Invalid UUID length. + * @retval ::NRF_ERROR_NOT_FOUND For a 128-bit UUID, no match in the populated table of UUIDs. + */ +SVCALL(SD_BLE_UUID_DECODE, uint32_t, sd_ble_uuid_decode(uint8_t uuid_le_len, uint8_t const *p_uuid_le, ble_uuid_t *p_uuid)); + + +/** @brief Encode a @ref ble_uuid_t structure into little endian raw UUID bytes (16-bit or 128-bit). + * + * @note The pointer to the destination buffer p_uuid_le may be NULL, in which case only the validity and size of p_uuid is computed. + * + * @param[in] p_uuid Pointer to a @ref ble_uuid_t structure that will be encoded into bytes. + * @param[out] p_uuid_le_len Pointer to a uint8_t that will be filled with the encoded length (2 or 16 bytes). + * @param[out] p_uuid_le Pointer to a buffer where the little endian raw UUID bytes (2 or 16) will be stored. + * + * @retval ::NRF_SUCCESS Successfully encoded into the buffer. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid UUID type. + */ +SVCALL(SD_BLE_UUID_ENCODE, uint32_t, sd_ble_uuid_encode(ble_uuid_t const *p_uuid, uint8_t *p_uuid_le_len, uint8_t *p_uuid_le)); + + +/**@brief Get Version Information. + * + * @details This call allows the application to get the BLE stack version information. + * + * @param[out] p_version Pointer to a ble_version_t structure to be filled in. + * + * @retval ::NRF_SUCCESS Version information stored successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_BUSY The BLE stack is busy (typically doing a locally-initiated disconnection procedure). + */ +SVCALL(SD_BLE_VERSION_GET, uint32_t, sd_ble_version_get(ble_version_t *p_version)); + + +/**@brief Provide a user memory block. + * + * @note This call can only be used as a response to a @ref BLE_EVT_USER_MEM_REQUEST event issued to the application. + * + * @param[in] conn_handle Connection handle. + * @param[in,out] p_block Pointer to a user memory block structure. + * + * @mscs + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_PEER_CANCEL_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_AUTH_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_NOAUTH_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_BUF_AUTH_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_BUF_NOAUTH_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_QUEUE_FULL_MSC} + * @endmscs + * + * @retval ::NRF_SUCCESS Successfully queued a response to the peer. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection state or no execute write request pending. + * @retval ::NRF_ERROR_BUSY The BLE stack is busy. Retry at later time. + */ +SVCALL(SD_BLE_USER_MEM_REPLY, uint32_t, sd_ble_user_mem_reply(uint16_t conn_handle, ble_user_mem_block_t const *p_block)); + +/**@brief Set a BLE option. + * + * @details This call allows the application to set the value of an option. + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_BONDING_STATIC_PK_MSC} + * @mmsc{@ref BLE_COMMON_CONF_BW} + * @endmscs + * + * @param[in] opt_id Option ID, see @ref BLE_COMMON_OPTS and @ref BLE_GAP_OPTS. + * @param[in] p_opt Pointer to a ble_opt_t structure containing the option value. + * + * @retval ::NRF_SUCCESS Option set successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, check parameter limits and constraints. + * @retval ::NRF_ERROR_INVALID_STATE Unable to set the parameter at this time. + * @retval ::NRF_ERROR_BUSY The BLE stack is busy or the previous procedure has not completed. + */ +SVCALL(SD_BLE_OPT_SET, uint32_t, sd_ble_opt_set(uint32_t opt_id, ble_opt_t const *p_opt)); + + +/**@brief Get a BLE option. + * + * @details This call allows the application to retrieve the value of an option. + * + * @param[in] opt_id Option ID, see @ref BLE_COMMON_OPTS and @ref BLE_GAP_OPTS. + * @param[out] p_opt Pointer to a ble_opt_t structure to be filled in. + * + * @retval ::NRF_SUCCESS Option retrieved successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, check parameter limits and constraints. + * @retval ::NRF_ERROR_INVALID_STATE Unable to retrieve the parameter at this time. + * @retval ::NRF_ERROR_BUSY The BLE stack is busy or the previous procedure has not completed. + * @retval ::NRF_ERROR_NOT_SUPPORTED This option is not supported. + * + */ +SVCALL(SD_BLE_OPT_GET, uint32_t, sd_ble_opt_get(uint32_t opt_id, ble_opt_t *p_opt)); + +/** @} */ +#ifdef __cplusplus +} +#endif +#endif /* BLE_H__ */ + +/** + @} + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_err.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_err.h new file mode 100644 index 0000000000..2332267905 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_err.h @@ -0,0 +1,90 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 BLE_COMMON + @{ + @addtogroup nrf_error + @{ + @ingroup BLE_COMMON + @} + + @defgroup ble_err General error codes + @{ + + @brief General error code definitions for the BLE API. + + @ingroup BLE_COMMON +*/ +#ifndef NRF_BLE_ERR_H__ +#define NRF_BLE_ERR_H__ + +#include "nrf_error.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* @defgroup BLE_ERRORS Error Codes + * @{ */ +#define BLE_ERROR_NOT_ENABLED (NRF_ERROR_STK_BASE_NUM+0x001) /**< @ref sd_ble_enable has not been called. */ +#define BLE_ERROR_INVALID_CONN_HANDLE (NRF_ERROR_STK_BASE_NUM+0x002) /**< Invalid connection handle. */ +#define BLE_ERROR_INVALID_ATTR_HANDLE (NRF_ERROR_STK_BASE_NUM+0x003) /**< Invalid attribute handle. */ +#define BLE_ERROR_NO_TX_PACKETS (NRF_ERROR_STK_BASE_NUM+0x004) /**< Not enough application packets available on this connection. */ +#define BLE_ERROR_INVALID_ROLE (NRF_ERROR_STK_BASE_NUM+0x005) /**< Invalid role. */ +/** @} */ + + +/** @defgroup BLE_ERROR_SUBRANGES Module specific error code subranges + * @brief Assignment of subranges for module specific error codes. + * @note For specific error codes, see ble_.h or ble_error_.h. + * @{ */ +#define NRF_L2CAP_ERR_BASE (NRF_ERROR_STK_BASE_NUM+0x100) /**< L2CAP specific errors. */ +#define NRF_GAP_ERR_BASE (NRF_ERROR_STK_BASE_NUM+0x200) /**< GAP specific errors. */ +#define NRF_GATTC_ERR_BASE (NRF_ERROR_STK_BASE_NUM+0x300) /**< GATT client specific errors. */ +#define NRF_GATTS_ERR_BASE (NRF_ERROR_STK_BASE_NUM+0x400) /**< GATT server specific errors. */ +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif + + +/** + @} + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gap.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gap.h new file mode 100644 index 0000000000..ad0fd304db --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gap.h @@ -0,0 +1,1742 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 BLE_GAP Generic Access Profile (GAP) + @{ + @brief Definitions and prototypes for the GAP interface. + */ + +#ifndef BLE_GAP_H__ +#define BLE_GAP_H__ + +#include "ble_types.h" +#include "ble_ranges.h" +#include "nrf_svc.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/**@addtogroup BLE_GAP_ENUMERATIONS Enumerations + * @{ */ + +/**@brief GAP API SVC numbers. + */ +enum BLE_GAP_SVCS +{ + SD_BLE_GAP_ADDRESS_SET = BLE_GAP_SVC_BASE, /**< Set own Bluetooth Address. */ + SD_BLE_GAP_ADDRESS_GET, /**< Get own Bluetooth Address. */ + SD_BLE_GAP_ADV_DATA_SET, /**< Set Advertising Data. */ + SD_BLE_GAP_ADV_START, /**< Start Advertising. */ + SD_BLE_GAP_ADV_STOP, /**< Stop Advertising. */ + SD_BLE_GAP_CONN_PARAM_UPDATE, /**< Connection Parameter Update. */ + SD_BLE_GAP_DISCONNECT, /**< Disconnect. */ + SD_BLE_GAP_TX_POWER_SET, /**< Set TX Power. */ + SD_BLE_GAP_APPEARANCE_SET, /**< Set Appearance. */ + SD_BLE_GAP_APPEARANCE_GET, /**< Get Appearance. */ + SD_BLE_GAP_PPCP_SET, /**< Set PPCP. */ + SD_BLE_GAP_PPCP_GET, /**< Get PPCP. */ + SD_BLE_GAP_DEVICE_NAME_SET, /**< Set Device Name. */ + SD_BLE_GAP_DEVICE_NAME_GET, /**< Get Device Name. */ + SD_BLE_GAP_AUTHENTICATE, /**< Initiate Pairing/Bonding. */ + SD_BLE_GAP_SEC_PARAMS_REPLY, /**< Reply with Security Parameters. */ + SD_BLE_GAP_AUTH_KEY_REPLY, /**< Reply with an authentication key. */ + SD_BLE_GAP_LESC_DHKEY_REPLY, /**< Reply with an LE Secure Connections DHKey. */ + SD_BLE_GAP_KEYPRESS_NOTIFY, /**< Notify of a keypress during an authentication procedure. */ + SD_BLE_GAP_LESC_OOB_DATA_GET, /**< Get the local LE Secure Connections OOB data. */ + SD_BLE_GAP_LESC_OOB_DATA_SET, /**< Set the remote LE Secure Connections OOB data. */ + SD_BLE_GAP_ENCRYPT, /**< Initiate encryption procedure. */ + SD_BLE_GAP_SEC_INFO_REPLY, /**< Reply with Security Information. */ + SD_BLE_GAP_CONN_SEC_GET, /**< Obtain connection security level. */ + SD_BLE_GAP_RSSI_START, /**< Start reporting of changes in RSSI. */ + SD_BLE_GAP_RSSI_STOP, /**< Stop reporting of changes in RSSI. */ + SD_BLE_GAP_SCAN_START, /**< Start Scanning. */ + SD_BLE_GAP_SCAN_STOP, /**< Stop Scanning. */ + SD_BLE_GAP_CONNECT, /**< Connect. */ + SD_BLE_GAP_CONNECT_CANCEL, /**< Cancel ongoing connection procedure. */ + SD_BLE_GAP_RSSI_GET, /**< Get the last RSSI sample. */ +}; + +/**@brief GAP Event IDs. + * IDs that uniquely identify an event coming from the stack to the application. + */ +enum BLE_GAP_EVTS +{ + BLE_GAP_EVT_CONNECTED = BLE_GAP_EVT_BASE, /**< Connection established. \n See @ref ble_gap_evt_connected_t. */ + BLE_GAP_EVT_DISCONNECTED, /**< Disconnected from peer. \n See @ref ble_gap_evt_disconnected_t. */ + BLE_GAP_EVT_CONN_PARAM_UPDATE, /**< Connection Parameters updated. \n See @ref ble_gap_evt_conn_param_update_t. */ + BLE_GAP_EVT_SEC_PARAMS_REQUEST, /**< Request to provide security parameters. \n Reply with @ref sd_ble_gap_sec_params_reply. \n See @ref ble_gap_evt_sec_params_request_t. */ + BLE_GAP_EVT_SEC_INFO_REQUEST, /**< Request to provide security information. \n Reply with @ref sd_ble_gap_sec_info_reply. \n See @ref ble_gap_evt_sec_info_request_t. */ + BLE_GAP_EVT_PASSKEY_DISPLAY, /**< Request to display a passkey to the user. \n In LESC Numeric Comparison, reply with @ref sd_ble_gap_auth_key_reply. \n See @ref ble_gap_evt_passkey_display_t. */ + BLE_GAP_EVT_KEY_PRESSED, /**< Notification of a keypress on the remote device.\n See @ref ble_gap_evt_key_pressed_t */ + BLE_GAP_EVT_AUTH_KEY_REQUEST, /**< Request to provide an authentication key. \n Reply with @ref sd_ble_gap_auth_key_reply. \n See @ref ble_gap_evt_auth_key_request_t. */ + BLE_GAP_EVT_LESC_DHKEY_REQUEST, /**< Request to calculate an LE Secure Connections DHKey. \n Reply with @ref sd_ble_gap_lesc_dhkey_reply. \n See @ref ble_gap_evt_lesc_dhkey_request_t */ + BLE_GAP_EVT_AUTH_STATUS, /**< Authentication procedure completed with status. \n See @ref ble_gap_evt_auth_status_t. */ + BLE_GAP_EVT_CONN_SEC_UPDATE, /**< Connection security updated. \n See @ref ble_gap_evt_conn_sec_update_t. */ + BLE_GAP_EVT_TIMEOUT, /**< Timeout expired. \n See @ref ble_gap_evt_timeout_t. */ + BLE_GAP_EVT_RSSI_CHANGED, /**< RSSI report. \n See @ref ble_gap_evt_rssi_changed_t. */ + BLE_GAP_EVT_ADV_REPORT, /**< Advertising report. \n See @ref ble_gap_evt_adv_report_t. */ + BLE_GAP_EVT_SEC_REQUEST, /**< Security Request. \n See @ref ble_gap_evt_sec_request_t. */ + BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST, /**< Connection Parameter Update Request. \n Reply with @ref sd_ble_gap_conn_param_update. \n See @ref ble_gap_evt_conn_param_update_request_t. */ + BLE_GAP_EVT_SCAN_REQ_REPORT, /**< Scan request report. \n See @ref ble_gap_evt_scan_req_report_t. */ +}; + +/**@brief GAP Option IDs. + * IDs that uniquely identify a GAP option. + */ +enum BLE_GAP_OPTS +{ + BLE_GAP_OPT_CH_MAP = BLE_GAP_OPT_BASE, /**< Channel Map. @ref ble_gap_opt_ch_map_t */ + BLE_GAP_OPT_LOCAL_CONN_LATENCY, /**< Local connection latency. @ref ble_gap_opt_local_conn_latency_t */ + BLE_GAP_OPT_PASSKEY, /**< Set passkey. @ref ble_gap_opt_passkey_t */ + BLE_GAP_OPT_PRIVACY, /**< Custom privacy. @ref ble_gap_opt_privacy_t */ + BLE_GAP_OPT_SCAN_REQ_REPORT, /**< Scan request report. @ref ble_gap_opt_scan_req_report_t */ + BLE_GAP_OPT_COMPAT_MODE /**< Compatibility mode. @ref ble_gap_opt_compat_mode_t */ +}; + +/** @} */ + +/**@addtogroup BLE_GAP_DEFINES Defines + * @{ */ + +/**@defgroup BLE_ERRORS_GAP SVC return values specific to GAP + * @{ */ +#define BLE_ERROR_GAP_UUID_LIST_MISMATCH (NRF_GAP_ERR_BASE + 0x000) /**< UUID list does not contain an integral number of UUIDs. */ +#define BLE_ERROR_GAP_DISCOVERABLE_WITH_WHITELIST (NRF_GAP_ERR_BASE + 0x001) /**< Use of Whitelist not permitted with discoverable advertising. */ +#define BLE_ERROR_GAP_INVALID_BLE_ADDR (NRF_GAP_ERR_BASE + 0x002) /**< The upper two bits of the address do not correspond to the specified address type. */ +#define BLE_ERROR_GAP_WHITELIST_IN_USE (NRF_GAP_ERR_BASE + 0x003) /**< Attempt to overwrite the whitelist while already in use by another operation. */ +/**@} */ + + +/**@defgroup BLE_GAP_ROLES GAP Roles + * @note Not explicitly used in peripheral API, but will be relevant for central API. + * @{ */ +#define BLE_GAP_ROLE_INVALID 0x0 /**< Invalid Role. */ +#define BLE_GAP_ROLE_PERIPH 0x1 /**< Peripheral Role. */ +#define BLE_GAP_ROLE_CENTRAL 0x2 /**< Central Role. */ +/**@} */ + + +/**@defgroup BLE_GAP_TIMEOUT_SOURCES GAP Timeout sources + * @{ */ +#define BLE_GAP_TIMEOUT_SRC_ADVERTISING 0x00 /**< Advertising timeout. */ +#define BLE_GAP_TIMEOUT_SRC_SECURITY_REQUEST 0x01 /**< Security request timeout. */ +#define BLE_GAP_TIMEOUT_SRC_SCAN 0x02 /**< Scanning timeout. */ +#define BLE_GAP_TIMEOUT_SRC_CONN 0x03 /**< Connection timeout. */ +/**@} */ + + +/**@defgroup BLE_GAP_ADDR_TYPES GAP Address types + * @{ */ +#define BLE_GAP_ADDR_TYPE_PUBLIC 0x00 /**< Public address. */ +#define BLE_GAP_ADDR_TYPE_RANDOM_STATIC 0x01 /**< Random Static address. */ +#define BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE 0x02 /**< Private Resolvable address. */ +#define BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE 0x03 /**< Private Non-Resolvable address. */ +/**@} */ + +/**@defgroup BLE_GAP_ADDR_CYCLE_MODES GAP Address cycle modes + * @{ */ +#define BLE_GAP_ADDR_CYCLE_MODE_NONE 0x00 /**< Set addresses directly, no automatic address cycling. */ +#define BLE_GAP_ADDR_CYCLE_MODE_AUTO 0x01 /**< Automatically generate and update private addresses. */ +/** @} */ + +/**@brief The default interval in seconds at which a private address is refreshed when address cycle mode is @ref BLE_GAP_ADDR_CYCLE_MODE_AUTO. */ +#define BLE_GAP_DEFAULT_PRIVATE_ADDR_CYCLE_INTERVAL_S (60 * 15) + +/** @brief BLE address length. */ +#define BLE_GAP_ADDR_LEN 6 + + +/**@defgroup BLE_GAP_AD_TYPE_DEFINITIONS GAP Advertising and Scan Response Data format + * @note Found at https://www.bluetooth.org/Technical/AssignedNumbers/generic_access_profile.htm + * @{ */ +#define BLE_GAP_AD_TYPE_FLAGS 0x01 /**< Flags for discoverability. */ +#define BLE_GAP_AD_TYPE_16BIT_SERVICE_UUID_MORE_AVAILABLE 0x02 /**< Partial list of 16 bit service UUIDs. */ +#define BLE_GAP_AD_TYPE_16BIT_SERVICE_UUID_COMPLETE 0x03 /**< Complete list of 16 bit service UUIDs. */ +#define BLE_GAP_AD_TYPE_32BIT_SERVICE_UUID_MORE_AVAILABLE 0x04 /**< Partial list of 32 bit service UUIDs. */ +#define BLE_GAP_AD_TYPE_32BIT_SERVICE_UUID_COMPLETE 0x05 /**< Complete list of 32 bit service UUIDs. */ +#define BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_MORE_AVAILABLE 0x06 /**< Partial list of 128 bit service UUIDs. */ +#define BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_COMPLETE 0x07 /**< Complete list of 128 bit service UUIDs. */ +#define BLE_GAP_AD_TYPE_SHORT_LOCAL_NAME 0x08 /**< Short local device name. */ +#define BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME 0x09 /**< Complete local device name. */ +#define BLE_GAP_AD_TYPE_TX_POWER_LEVEL 0x0A /**< Transmit power level. */ +#define BLE_GAP_AD_TYPE_CLASS_OF_DEVICE 0x0D /**< Class of device. */ +#define BLE_GAP_AD_TYPE_SIMPLE_PAIRING_HASH_C 0x0E /**< Simple Pairing Hash C. */ +#define BLE_GAP_AD_TYPE_SIMPLE_PAIRING_RANDOMIZER_R 0x0F /**< Simple Pairing Randomizer R. */ +#define BLE_GAP_AD_TYPE_SECURITY_MANAGER_TK_VALUE 0x10 /**< Security Manager TK Value. */ +#define BLE_GAP_AD_TYPE_SECURITY_MANAGER_OOB_FLAGS 0x11 /**< Security Manager Out Of Band Flags. */ +#define BLE_GAP_AD_TYPE_SLAVE_CONNECTION_INTERVAL_RANGE 0x12 /**< Slave Connection Interval Range. */ +#define BLE_GAP_AD_TYPE_SOLICITED_SERVICE_UUIDS_16BIT 0x14 /**< List of 16-bit Service Solicitation UUIDs. */ +#define BLE_GAP_AD_TYPE_SOLICITED_SERVICE_UUIDS_128BIT 0x15 /**< List of 128-bit Service Solicitation UUIDs. */ +#define BLE_GAP_AD_TYPE_SERVICE_DATA 0x16 /**< Service Data - 16-bit UUID. */ +#define BLE_GAP_AD_TYPE_PUBLIC_TARGET_ADDRESS 0x17 /**< Public Target Address. */ +#define BLE_GAP_AD_TYPE_RANDOM_TARGET_ADDRESS 0x18 /**< Random Target Address. */ +#define BLE_GAP_AD_TYPE_APPEARANCE 0x19 /**< Appearance. */ +#define BLE_GAP_AD_TYPE_ADVERTISING_INTERVAL 0x1A /**< Advertising Interval. */ +#define BLE_GAP_AD_TYPE_LE_BLUETOOTH_DEVICE_ADDRESS 0x1B /**< LE Bluetooth Device Address. */ +#define BLE_GAP_AD_TYPE_LE_ROLE 0x1C /**< LE Role. */ +#define BLE_GAP_AD_TYPE_SIMPLE_PAIRING_HASH_C256 0x1D /**< Simple Pairing Hash C-256. */ +#define BLE_GAP_AD_TYPE_SIMPLE_PAIRING_RANDOMIZER_R256 0x1E /**< Simple Pairing Randomizer R-256. */ +#define BLE_GAP_AD_TYPE_SERVICE_DATA_32BIT_UUID 0x20 /**< Service Data - 32-bit UUID. */ +#define BLE_GAP_AD_TYPE_SERVICE_DATA_128BIT_UUID 0x21 /**< Service Data - 128-bit UUID. */ +#define BLE_GAP_AD_TYPE_URI 0x24 /**< URI */ +#define BLE_GAP_AD_TYPE_3D_INFORMATION_DATA 0x3D /**< 3D Information Data. */ +#define BLE_GAP_AD_TYPE_MANUFACTURER_SPECIFIC_DATA 0xFF /**< Manufacturer Specific Data. */ +/**@} */ + + +/**@defgroup BLE_GAP_ADV_FLAGS GAP Advertisement Flags + * @{ */ +#define BLE_GAP_ADV_FLAG_LE_LIMITED_DISC_MODE (0x01) /**< LE Limited Discoverable Mode. */ +#define BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE (0x02) /**< LE General Discoverable Mode. */ +#define BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED (0x04) /**< BR/EDR not supported. */ +#define BLE_GAP_ADV_FLAG_LE_BR_EDR_CONTROLLER (0x08) /**< Simultaneous LE and BR/EDR, Controller. */ +#define BLE_GAP_ADV_FLAG_LE_BR_EDR_HOST (0x10) /**< Simultaneous LE and BR/EDR, Host. */ +#define BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE (BLE_GAP_ADV_FLAG_LE_LIMITED_DISC_MODE | BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED) /**< LE Limited Discoverable Mode, BR/EDR not supported. */ +#define BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE (BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE | BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED) /**< LE General Discoverable Mode, BR/EDR not supported. */ +/**@} */ + + +/**@defgroup BLE_GAP_ADV_INTERVALS GAP Advertising interval max and min + * @{ */ +#define BLE_GAP_ADV_INTERVAL_MIN 0x0020 /**< Minimum Advertising interval in 625 us units, i.e. 20 ms. */ +#define BLE_GAP_ADV_NONCON_INTERVAL_MIN 0x00A0 /**< Minimum Advertising interval in 625 us units for non connectable mode, i.e. 100 ms. */ +#define BLE_GAP_ADV_INTERVAL_MAX 0x4000 /**< Maximum Advertising interval in 625 us units, i.e. 10.24 s. */ + /**@} */ + + +/**@defgroup BLE_GAP_SCAN_INTERVALS GAP Scan interval max and min + * @{ */ +#define BLE_GAP_SCAN_INTERVAL_MIN 0x0004 /**< Minimum Scan interval in 625 us units, i.e. 2.5 ms. */ +#define BLE_GAP_SCAN_INTERVAL_MAX 0x4000 /**< Maximum Scan interval in 625 us units, i.e. 10.24 s. */ + /** @} */ + + +/**@defgroup BLE_GAP_SCAN_WINDOW GAP Scan window max and min + * @{ */ +#define BLE_GAP_SCAN_WINDOW_MIN 0x0004 /**< Minimum Scan window in 625 us units, i.e. 2.5 ms. */ +#define BLE_GAP_SCAN_WINDOW_MAX 0x4000 /**< Maximum Scan window in 625 us units, i.e. 10.24 s. */ + /** @} */ + + +/**@defgroup BLE_GAP_SCAN_TIMEOUT GAP Scan timeout max and min + * @{ */ +#define BLE_GAP_SCAN_TIMEOUT_MIN 0x0001 /**< Minimum Scan timeout in seconds. */ +#define BLE_GAP_SCAN_TIMEOUT_MAX 0xFFFF /**< Maximum Scan timeout in seconds. */ + /** @} */ + + +/**@brief Maximum size of advertising data in octets. */ +#define BLE_GAP_ADV_MAX_SIZE 31 + + +/**@defgroup BLE_GAP_ADV_TYPES GAP Advertising types + * @{ */ +#define BLE_GAP_ADV_TYPE_ADV_IND 0x00 /**< Connectable undirected. */ +#define BLE_GAP_ADV_TYPE_ADV_DIRECT_IND 0x01 /**< Connectable directed. */ +#define BLE_GAP_ADV_TYPE_ADV_SCAN_IND 0x02 /**< Scannable undirected. */ +#define BLE_GAP_ADV_TYPE_ADV_NONCONN_IND 0x03 /**< Non connectable undirected. */ +/**@} */ + + +/**@defgroup BLE_GAP_ADV_FILTER_POLICIES GAP Advertising filter policies + * @{ */ +#define BLE_GAP_ADV_FP_ANY 0x00 /**< Allow scan requests and connect requests from any device. */ +#define BLE_GAP_ADV_FP_FILTER_SCANREQ 0x01 /**< Filter scan requests with whitelist. */ +#define BLE_GAP_ADV_FP_FILTER_CONNREQ 0x02 /**< Filter connect requests with whitelist. */ +#define BLE_GAP_ADV_FP_FILTER_BOTH 0x03 /**< Filter both scan and connect requests with whitelist. */ +/**@} */ + + +/**@defgroup BLE_GAP_ADV_TIMEOUT_VALUES GAP Advertising timeout values + * @{ */ +#define BLE_GAP_ADV_TIMEOUT_LIMITED_MAX 180 /**< Maximum advertising time in limited discoverable mode (TGAP(lim_adv_timeout) = 180s). */ +#define BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED 0 /**< Unlimited advertising in general discoverable mode. */ +/**@} */ + + +/**@defgroup BLE_GAP_DISC_MODES GAP Discovery modes + * @{ */ +#define BLE_GAP_DISC_MODE_NOT_DISCOVERABLE 0x00 /**< Not discoverable discovery Mode. */ +#define BLE_GAP_DISC_MODE_LIMITED 0x01 /**< Limited Discovery Mode. */ +#define BLE_GAP_DISC_MODE_GENERAL 0x02 /**< General Discovery Mode. */ +/**@} */ + +/**@defgroup BLE_GAP_IO_CAPS GAP IO Capabilities + * @{ */ +#define BLE_GAP_IO_CAPS_DISPLAY_ONLY 0x00 /**< Display Only. */ +#define BLE_GAP_IO_CAPS_DISPLAY_YESNO 0x01 /**< Display and Yes/No entry. */ +#define BLE_GAP_IO_CAPS_KEYBOARD_ONLY 0x02 /**< Keyboard Only. */ +#define BLE_GAP_IO_CAPS_NONE 0x03 /**< No I/O capabilities. */ +#define BLE_GAP_IO_CAPS_KEYBOARD_DISPLAY 0x04 /**< Keyboard and Display. */ +/**@} */ + +/**@defgroup BLE_GAP_AUTH_KEY_TYPES GAP Authentication Key Types + * @{ */ +#define BLE_GAP_AUTH_KEY_TYPE_NONE 0x00 /**< No key (may be used to reject). */ +#define BLE_GAP_AUTH_KEY_TYPE_PASSKEY 0x01 /**< 6-digit Passkey. */ +#define BLE_GAP_AUTH_KEY_TYPE_OOB 0x02 /**< Out Of Band data. */ +/**@} */ + +/**@defgroup BLE_GAP_KP_NOT_TYPES GAP Keypress Notification Types + * @{ */ +#define BLE_GAP_KP_NOT_TYPE_PASSKEY_START 0x00 /**< Passkey entry started. */ +#define BLE_GAP_KP_NOT_TYPE_PASSKEY_DIGIT_IN 0x01 /**< Passkey digit entered. */ +#define BLE_GAP_KP_NOT_TYPE_PASSKEY_DIGIT_OUT 0x02 /**< Passkey digit erased. */ +#define BLE_GAP_KP_NOT_TYPE_PASSKEY_CLEAR 0x03 /**< Passkey cleared. */ +#define BLE_GAP_KP_NOT_TYPE_PASSKEY_END 0x04 /**< Passkey entry completed. */ +/**@} */ + +/**@defgroup BLE_GAP_SEC_STATUS GAP Security status + * @{ */ +#define BLE_GAP_SEC_STATUS_SUCCESS 0x00 /**< Procedure completed with success. */ +#define BLE_GAP_SEC_STATUS_TIMEOUT 0x01 /**< Procedure timed out. */ +#define BLE_GAP_SEC_STATUS_PDU_INVALID 0x02 /**< Invalid PDU received. */ +#define BLE_GAP_SEC_STATUS_RFU_RANGE1_BEGIN 0x03 /**< Reserved for Future Use range #1 begin. */ +#define BLE_GAP_SEC_STATUS_RFU_RANGE1_END 0x80 /**< Reserved for Future Use range #1 end. */ +#define BLE_GAP_SEC_STATUS_PASSKEY_ENTRY_FAILED 0x81 /**< Passkey entry failed (user cancelled or other). */ +#define BLE_GAP_SEC_STATUS_OOB_NOT_AVAILABLE 0x82 /**< Out of Band Key not available. */ +#define BLE_GAP_SEC_STATUS_AUTH_REQ 0x83 /**< Authentication requirements not met. */ +#define BLE_GAP_SEC_STATUS_CONFIRM_VALUE 0x84 /**< Confirm value failed. */ +#define BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP 0x85 /**< Pairing not supported. */ +#define BLE_GAP_SEC_STATUS_ENC_KEY_SIZE 0x86 /**< Encryption key size. */ +#define BLE_GAP_SEC_STATUS_SMP_CMD_UNSUPPORTED 0x87 /**< Unsupported SMP command. */ +#define BLE_GAP_SEC_STATUS_UNSPECIFIED 0x88 /**< Unspecified reason. */ +#define BLE_GAP_SEC_STATUS_REPEATED_ATTEMPTS 0x89 /**< Too little time elapsed since last attempt. */ +#define BLE_GAP_SEC_STATUS_INVALID_PARAMS 0x8A /**< Invalid parameters. */ +#define BLE_GAP_SEC_STATUS_DHKEY_FAILURE 0x8B /**< DHKey check failure. */ +#define BLE_GAP_SEC_STATUS_NUM_COMP_FAILURE 0x8C /**< Numeric Comparison failure. */ +#define BLE_GAP_SEC_STATUS_BR_EDR_IN_PROG 0x8D /**< BR/EDR pairing in progress. */ +#define BLE_GAP_SEC_STATUS_X_TRANS_KEY_DISALLOWED 0x8E /**< BR/EDR Link Key cannot be used for LE keys. */ +#define BLE_GAP_SEC_STATUS_RFU_RANGE2_BEGIN 0x8F /**< Reserved for Future Use range #2 begin. */ +#define BLE_GAP_SEC_STATUS_RFU_RANGE2_END 0xFF /**< Reserved for Future Use range #2 end. */ +/**@} */ + +/**@defgroup BLE_GAP_SEC_STATUS_SOURCES GAP Security status sources + * @{ */ +#define BLE_GAP_SEC_STATUS_SOURCE_LOCAL 0x00 /**< Local failure. */ +#define BLE_GAP_SEC_STATUS_SOURCE_REMOTE 0x01 /**< Remote failure. */ +/**@} */ + +/**@defgroup BLE_GAP_CP_LIMITS GAP Connection Parameters Limits + * @{ */ +#define BLE_GAP_CP_MIN_CONN_INTVL_NONE 0xFFFF /**< No new minimum connection interval specified in connect parameters. */ +#define BLE_GAP_CP_MIN_CONN_INTVL_MIN 0x0006 /**< Lowest minimum connection interval permitted, in units of 1.25 ms, i.e. 7.5 ms. */ +#define BLE_GAP_CP_MIN_CONN_INTVL_MAX 0x0C80 /**< Highest minimum connection interval permitted, in units of 1.25 ms, i.e. 4 s. */ +#define BLE_GAP_CP_MAX_CONN_INTVL_NONE 0xFFFF /**< No new maximum connection interval specified in connect parameters. */ +#define BLE_GAP_CP_MAX_CONN_INTVL_MIN 0x0006 /**< Lowest maximum connection interval permitted, in units of 1.25 ms, i.e. 7.5 ms. */ +#define BLE_GAP_CP_MAX_CONN_INTVL_MAX 0x0C80 /**< Highest maximum connection interval permitted, in units of 1.25 ms, i.e. 4 s. */ +#define BLE_GAP_CP_SLAVE_LATENCY_MAX 0x01F3 /**< Highest slave latency permitted, in connection events. */ +#define BLE_GAP_CP_CONN_SUP_TIMEOUT_NONE 0xFFFF /**< No new supervision timeout specified in connect parameters. */ +#define BLE_GAP_CP_CONN_SUP_TIMEOUT_MIN 0x000A /**< Lowest supervision timeout permitted, in units of 10 ms, i.e. 100 ms. */ +#define BLE_GAP_CP_CONN_SUP_TIMEOUT_MAX 0x0C80 /**< Highest supervision timeout permitted, in units of 10 ms, i.e. 32 s. */ +/**@} */ + + +/**@brief GAP device name maximum length. */ +#define BLE_GAP_DEVNAME_MAX_LEN 31 + +/**@brief Disable RSSI events for connections */ +#define BLE_GAP_RSSI_THRESHOLD_INVALID 0xFF + +/**@defgroup BLE_GAP_CONN_SEC_MODE_SET_MACROS GAP attribute security requirement setters + * + * See @ref ble_gap_conn_sec_mode_t. + * @{ */ +/**@brief Set sec_mode pointed to by ptr to have no access rights.*/ +#define BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(ptr) do {(ptr)->sm = 0; (ptr)->lv = 0;} while(0) +/**@brief Set sec_mode pointed to by ptr to require no protection, open link.*/ +#define BLE_GAP_CONN_SEC_MODE_SET_OPEN(ptr) do {(ptr)->sm = 1; (ptr)->lv = 1;} while(0) +/**@brief Set sec_mode pointed to by ptr to require encryption, but no MITM protection.*/ +#define BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(ptr) do {(ptr)->sm = 1; (ptr)->lv = 2;} while(0) +/**@brief Set sec_mode pointed to by ptr to require encryption and MITM protection.*/ +#define BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM(ptr) do {(ptr)->sm = 1; (ptr)->lv = 3;} while(0) +/**@brief Set sec_mode pointed to by ptr to require LESC encryption and MITM protection.*/ +#define BLE_GAP_CONN_SEC_MODE_SET_LESC_ENC_WITH_MITM(ptr) do {(ptr)->sm = 1; (ptr)->lv = 4;} while(0) +/**@brief Set sec_mode pointed to by ptr to require signing or encryption, no MITM protection needed.*/ +#define BLE_GAP_CONN_SEC_MODE_SET_SIGNED_NO_MITM(ptr) do {(ptr)->sm = 2; (ptr)->lv = 1;} while(0) +/**@brief Set sec_mode pointed to by ptr to require signing or encryption with MITM protection.*/ +#define BLE_GAP_CONN_SEC_MODE_SET_SIGNED_WITH_MITM(ptr) do {(ptr)->sm = 2; (ptr)->lv = 2;} while(0) +/**@} */ + + +/**@brief GAP Security Random Number Length. */ +#define BLE_GAP_SEC_RAND_LEN 8 + +/**@brief GAP Security Key Length. */ +#define BLE_GAP_SEC_KEY_LEN 16 + +/**@brief GAP LE Secure Connections Elliptic Curve Diffie-Hellman P-256 Public Key Length. */ +#define BLE_GAP_LESC_P256_PK_LEN 64 + +/**@brief GAP LE Secure Connections Elliptic Curve Diffie-Hellman DHKey Length. */ +#define BLE_GAP_LESC_DHKEY_LEN 32 + +/**@brief GAP Passkey Length. */ +#define BLE_GAP_PASSKEY_LEN 6 + +/**@brief Maximum amount of addresses in a whitelist. */ +#define BLE_GAP_WHITELIST_ADDR_MAX_COUNT (8) + +/**@brief Maximum amount of IRKs in a whitelist. + * @note The number of IRKs is limited to 8, even if the hardware supports more. + */ +#define BLE_GAP_WHITELIST_IRK_MAX_COUNT (8) + +/**@defgroup GAP_SEC_MODES GAP Security Modes + * @{ */ +#define BLE_GAP_SEC_MODE 0x00 /**< No key (may be used to reject). */ +/**@} */ +/** @} */ + +/**@addtogroup BLE_GAP_STRUCTURES Structures + * @{ */ + +/** + * @brief BLE GAP initialization parameters. + */ +typedef struct +{ + uint8_t periph_conn_count; /**< Number of connections acting as a peripheral */ + uint8_t central_conn_count; /**< Number of connections acting as a central */ + uint8_t central_sec_count; /**< Number of SMP instances for all connections acting as a central. */ +} ble_gap_enable_params_t; + +/**@brief Bluetooth Low Energy address. */ +typedef struct +{ + uint8_t addr_type; /**< See @ref BLE_GAP_ADDR_TYPES. */ + uint8_t addr[BLE_GAP_ADDR_LEN]; /**< 48-bit address, LSB format. */ +} ble_gap_addr_t; + + +/**@brief GAP connection parameters. + * + * @note When ble_conn_params_t is received in an event, both min_conn_interval and + * max_conn_interval will be equal to the connection interval set by the central. + * + * @note If both conn_sup_timeout and max_conn_interval are specified, then the following constraint applies: + * conn_sup_timeout * 4 > (1 + slave_latency) * max_conn_interval + * that corresponds to the following Bluetooth Spec requirement: + * The Supervision_Timeout in milliseconds shall be larger than + * (1 + Conn_Latency) * Conn_Interval_Max * 2, where Conn_Interval_Max is given in milliseconds. + */ +typedef struct +{ + uint16_t min_conn_interval; /**< Minimum Connection Interval in 1.25 ms units, see @ref BLE_GAP_CP_LIMITS.*/ + uint16_t max_conn_interval; /**< Maximum Connection Interval in 1.25 ms units, see @ref BLE_GAP_CP_LIMITS.*/ + uint16_t slave_latency; /**< Slave Latency in number of connection events, see @ref BLE_GAP_CP_LIMITS.*/ + uint16_t conn_sup_timeout; /**< Connection Supervision Timeout in 10 ms units, see @ref BLE_GAP_CP_LIMITS.*/ +} ble_gap_conn_params_t; + + +/**@brief GAP connection security modes. + * + * Security Mode 0 Level 0: No access permissions at all (this level is not defined by the Bluetooth Core specification).\n + * Security Mode 1 Level 1: No security is needed (aka open link).\n + * Security Mode 1 Level 2: Encrypted link required, MITM protection not necessary.\n + * Security Mode 1 Level 3: MITM protected encrypted link required.\n + * Security Mode 1 Level 4: LESC MITM protected encrypted link required.\n + * Security Mode 2 Level 1: Signing or encryption required, MITM protection not necessary.\n + * Security Mode 2 Level 2: MITM protected signing required, unless link is MITM protected encrypted.\n + */ +typedef struct +{ + uint8_t sm : 4; /**< Security Mode (1 or 2), 0 for no permissions at all. */ + uint8_t lv : 4; /**< Level (1, 2, 3 or 4), 0 for no permissions at all. */ + +} ble_gap_conn_sec_mode_t; + + +/**@brief GAP connection security status.*/ +typedef struct +{ + ble_gap_conn_sec_mode_t sec_mode; /**< Currently active security mode for this connection.*/ + uint8_t encr_key_size; /**< Length of currently active encryption key, 7 to 16 octets (only applicable for bonding procedures). */ +} ble_gap_conn_sec_t; + + +/**@brief Identity Resolving Key. */ +typedef struct +{ + uint8_t irk[BLE_GAP_SEC_KEY_LEN]; /**< Array containing IRK. */ +} ble_gap_irk_t; + + +/**@brief Whitelist structure. */ +typedef struct +{ + ble_gap_addr_t **pp_addrs; /**< Pointer to an array of device address pointers, pointing to addresses to be used in whitelist. NULL if none are given. */ + uint8_t addr_count; /**< Count of device addresses in array, up to @ref BLE_GAP_WHITELIST_ADDR_MAX_COUNT. */ + ble_gap_irk_t **pp_irks; /**< Pointer to an array of Identity Resolving Key (IRK) pointers, each pointing to an IRK in the whitelist. NULL if none are given. */ + uint8_t irk_count; /**< Count of IRKs in array, up to @ref BLE_GAP_WHITELIST_IRK_MAX_COUNT. */ +} ble_gap_whitelist_t; + +/**@brief Channel mask for RF channels used in advertising. */ +typedef struct +{ + uint8_t ch_37_off : 1; /**< Setting this bit to 1 will turn off advertising on channel 37 */ + uint8_t ch_38_off : 1; /**< Setting this bit to 1 will turn off advertising on channel 38 */ + uint8_t ch_39_off : 1; /**< Setting this bit to 1 will turn off advertising on channel 39 */ +} ble_gap_adv_ch_mask_t; + +/**@brief GAP advertising parameters.*/ +typedef struct +{ + uint8_t type; /**< See @ref BLE_GAP_ADV_TYPES. */ + ble_gap_addr_t *p_peer_addr; /**< For @ref BLE_GAP_ADV_TYPE_ADV_DIRECT_IND mode only, known peer address. */ + uint8_t fp; /**< Filter Policy, see @ref BLE_GAP_ADV_FILTER_POLICIES. */ + ble_gap_whitelist_t *p_whitelist; /**< Pointer to whitelist, NULL if no whitelist or the current active whitelist is to be used. */ + uint16_t interval; /**< Advertising interval between 0x0020 and 0x4000 in 0.625 ms units (20ms to 10.24s), see @ref BLE_GAP_ADV_INTERVALS. + - If type equals @ref BLE_GAP_ADV_TYPE_ADV_DIRECT_IND, this parameter must be set to 0 for high duty cycle directed advertising. + - If type equals @ref BLE_GAP_ADV_TYPE_ADV_DIRECT_IND, set @ref BLE_GAP_ADV_INTERVAL_MIN <= interval <= @ref BLE_GAP_ADV_INTERVAL_MAX for low duty cycle advertising.*/ + uint16_t timeout; /**< Advertising timeout between 0x0001 and 0x3FFF in seconds, 0x0000 disables timeout. See also @ref BLE_GAP_ADV_TIMEOUT_VALUES. If type equals @ref BLE_GAP_ADV_TYPE_ADV_DIRECT_IND, this parameter must be set to 0 for High duty cycle directed advertising. */ + ble_gap_adv_ch_mask_t channel_mask; /**< Advertising channel mask. See @ref ble_gap_adv_ch_mask_t. */ +} ble_gap_adv_params_t; + + +/**@brief GAP scanning parameters. */ +typedef struct +{ + uint8_t active : 1; /**< If 1, perform active scanning (scan requests). */ + uint8_t selective : 1; /**< If 1, ignore unknown devices (non whitelisted). */ + ble_gap_whitelist_t * p_whitelist; /**< Pointer to whitelist, NULL if no whitelist or the current active whitelist is to be used. */ + uint16_t interval; /**< Scan interval between 0x0004 and 0x4000 in 0.625ms units (2.5ms to 10.24s). */ + uint16_t window; /**< Scan window between 0x0004 and 0x4000 in 0.625ms units (2.5ms to 10.24s). */ + uint16_t timeout; /**< Scan timeout between 0x0001 and 0xFFFF in seconds, 0x0000 disables timeout. */ +} ble_gap_scan_params_t; + + +/** @brief Keys that can be exchanged during a bonding procedure. */ +typedef struct +{ + uint8_t enc : 1; /**< Long Term Key and Master Identification. */ + uint8_t id : 1; /**< Identity Resolving Key and Identity Address Information. */ + uint8_t sign : 1; /**< Connection Signature Resolving Key. */ + uint8_t link : 1; /**< Derive the Link Key from the LTK. */ +} ble_gap_sec_kdist_t; + + +/**@brief GAP security parameters. */ +typedef struct +{ + uint8_t bond : 1; /**< Perform bonding. */ + uint8_t mitm : 1; /**< Enable Man In The Middle protection. */ + uint8_t lesc : 1; /**< Enable LE Secure Connection pairing. */ + uint8_t keypress : 1; /**< Enable generation of keypress notifications. */ + uint8_t io_caps : 3; /**< IO capabilities, see @ref BLE_GAP_IO_CAPS. */ + uint8_t oob : 1; /**< Out Of Band data available. */ + uint8_t min_key_size; /**< Minimum encryption key size in octets between 7 and 16. If 0 then not applicable in this instance. */ + uint8_t max_key_size; /**< Maximum encryption key size in octets between min_key_size and 16. */ + ble_gap_sec_kdist_t kdist_own; /**< Key distribution bitmap: keys that the local device will distribute. */ + ble_gap_sec_kdist_t kdist_peer; /**< Key distribution bitmap: keys that the remote device will distribute. */ +} ble_gap_sec_params_t; + + +/**@brief GAP Encryption Information. */ +typedef struct +{ + uint8_t ltk[BLE_GAP_SEC_KEY_LEN]; /**< Long Term Key. */ + uint8_t lesc : 1; /**< Key generated using LE Secure Connections. */ + uint8_t auth : 1; /**< Authenticated Key. */ + uint8_t ltk_len : 6; /**< LTK length in octets. */ +} ble_gap_enc_info_t; + + +/**@brief GAP Master Identification. */ +typedef struct +{ + uint16_t ediv; /**< Encrypted Diversifier. */ + uint8_t rand[BLE_GAP_SEC_RAND_LEN]; /**< Random Number. */ +} ble_gap_master_id_t; + + +/**@brief GAP Signing Information. */ +typedef struct +{ + uint8_t csrk[BLE_GAP_SEC_KEY_LEN]; /**< Connection Signature Resolving Key. */ +} ble_gap_sign_info_t; + +/**@brief GAP LE Secure Connections P-256 Public Key. */ +typedef struct +{ + uint8_t pk[BLE_GAP_LESC_P256_PK_LEN]; /**< LE Secure Connections Elliptic Curve Diffie-Hellman P-256 Public Key. Stored in the standard SMP protocol format: {X,Y} both in little-endian. */ +} ble_gap_lesc_p256_pk_t; + +/**@brief GAP LE Secure Connections DHKey. */ +typedef struct +{ + uint8_t key[BLE_GAP_LESC_DHKEY_LEN]; /**< LE Secure Connections Elliptic Curve Diffie-Hellman Key. Stored in little-endian. */ +} ble_gap_lesc_dhkey_t; + +/**@brief GAP LE Secure Connections OOB data. */ +typedef struct +{ + ble_gap_addr_t addr; /**< Bluetooth address of the device. */ + uint8_t r[BLE_GAP_SEC_KEY_LEN]; /**< Random Number. */ + uint8_t c[BLE_GAP_SEC_KEY_LEN]; /**< Confirm Value. */ +} ble_gap_lesc_oob_data_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_CONNECTED. */ +typedef struct +{ + 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. */ + uint8_t role; /**< BLE role for this connection, see @ref BLE_GAP_ROLES */ + 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. */ + ble_gap_conn_params_t conn_params; /**< GAP Connection Parameters. */ +} ble_gap_evt_connected_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_DISCONNECTED. */ +typedef struct +{ + uint8_t reason; /**< HCI error code, see @ref BLE_HCI_STATUS_CODES. */ +} ble_gap_evt_disconnected_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_CONN_PARAM_UPDATE. */ +typedef struct +{ + ble_gap_conn_params_t conn_params; /**< GAP Connection Parameters. */ +} ble_gap_evt_conn_param_update_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_SEC_PARAMS_REQUEST. */ +typedef struct +{ + ble_gap_sec_params_t peer_params; /**< Initiator Security Parameters. */ +} ble_gap_evt_sec_params_request_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_SEC_INFO_REQUEST. */ +typedef struct +{ + ble_gap_addr_t peer_addr; /**< Bluetooth address of the peer device. */ + ble_gap_master_id_t master_id; /**< Master Identification for LTK lookup. */ + uint8_t enc_info : 1; /**< If 1, Encryption Information required. */ + uint8_t id_info : 1; /**< If 1, Identity Information required. */ + uint8_t sign_info : 1; /**< If 1, Signing Information required. */ +} ble_gap_evt_sec_info_request_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_PASSKEY_DISPLAY. */ +typedef struct +{ + uint8_t passkey[BLE_GAP_PASSKEY_LEN]; /**< 6-digit passkey in ASCII ('0'-'9' digits only). */ + uint8_t match_request : 1; /**< If 1 requires the application to report the match using @ref sd_ble_gap_auth_key_reply + with either @ref BLE_GAP_AUTH_KEY_TYPE_NONE if there is no match or + @ref BLE_GAP_AUTH_KEY_TYPE_PASSKEY if there is a match. */ +} ble_gap_evt_passkey_display_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_KEY_PRESSED. */ +typedef struct +{ + uint8_t kp_not; /**< Keypress notification type, see @ref BLE_GAP_KP_NOT_TYPES. */ +} ble_gap_evt_key_pressed_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_AUTH_KEY_REQUEST. */ +typedef struct +{ + uint8_t key_type; /**< See @ref BLE_GAP_AUTH_KEY_TYPES. */ +} ble_gap_evt_auth_key_request_t; + +/**@brief Event structure for @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST. */ +typedef struct +{ + ble_gap_lesc_p256_pk_t *p_pk_peer; /**< LE Secure Connections remote P-256 Public Key. This will point to the application-supplied memory + inside the keyset during the call to @ref sd_ble_gap_sec_params_reply. */ + uint8_t oobd_req :1; /**< LESC OOB data required. A call to @ref sd_ble_gap_lesc_oob_data_set is required to complete the procedure. */ +} ble_gap_evt_lesc_dhkey_request_t; + + +/**@brief Security levels supported. + * @note See Bluetooth Specification Version 4.2 Volume 3, Part C, Chapter 10, Section 10.2.1. +*/ +typedef struct +{ + uint8_t lv1 : 1; /**< If 1: Level 1 is supported. */ + uint8_t lv2 : 1; /**< If 1: Level 2 is supported. */ + uint8_t lv3 : 1; /**< If 1: Level 3 is supported. */ + uint8_t lv4 : 1; /**< If 1: Level 4 is supported. */ +} ble_gap_sec_levels_t; + + +/**@brief Encryption Key. */ +typedef struct +{ + ble_gap_enc_info_t enc_info; /**< Encryption Information. */ + ble_gap_master_id_t master_id; /**< Master Identification. */ +} ble_gap_enc_key_t; + + +/**@brief Identity Key. */ +typedef struct +{ + ble_gap_irk_t id_info; /**< Identity Information. */ + ble_gap_addr_t id_addr_info; /**< Identity Address Information. */ +} ble_gap_id_key_t; + + +/**@brief Security Keys. */ +typedef struct +{ + ble_gap_enc_key_t *p_enc_key; /**< Encryption Key, or NULL. */ + ble_gap_id_key_t *p_id_key; /**< Identity Key, or NULL. */ + ble_gap_sign_info_t *p_sign_key; /**< Signing Key, or NULL. */ + ble_gap_lesc_p256_pk_t *p_pk; /**< LE Secure Connections P-256 Public Key. When in debug mode the application must use the value defined + in the Core Bluetooth Specification v4.2 Vol.3, Part H, Section 2.3.5.6.1 */ +} ble_gap_sec_keys_t; + + +/**@brief Security key set for both local and peer keys. */ +typedef struct +{ + ble_gap_sec_keys_t keys_own; /**< Keys distributed by the local device. For LE Secure Connections the encryption key will be generated locally and will always be stored if bonding. */ + ble_gap_sec_keys_t keys_peer; /**< Keys distributed by the remote device. For LE Secure Connections, p_enc_key must always be NULL. */ +} ble_gap_sec_keyset_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_AUTH_STATUS. */ +typedef struct +{ + uint8_t auth_status; /**< Authentication status, see @ref BLE_GAP_SEC_STATUS. */ + uint8_t error_src : 2; /**< On error, source that caused the failure, see @ref BLE_GAP_SEC_STATUS_SOURCES. */ + uint8_t bonded : 1; /**< Procedure resulted in a bond. */ + ble_gap_sec_levels_t sm1_levels; /**< Levels supported in Security Mode 1. */ + ble_gap_sec_levels_t sm2_levels; /**< Levels supported in Security Mode 2. */ + ble_gap_sec_kdist_t kdist_own; /**< Bitmap stating which keys were exchanged (distributed) by the local device. If bonding with LE Secure Connections, the enc bit will be always set. */ + ble_gap_sec_kdist_t kdist_peer; /**< Bitmap stating which keys were exchanged (distributed) by the remote device. If bonding with LE Secure Connections, the enc bit will never be set. */ +} ble_gap_evt_auth_status_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_CONN_SEC_UPDATE. */ +typedef struct +{ + ble_gap_conn_sec_t conn_sec; /**< Connection security level. */ +} ble_gap_evt_conn_sec_update_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_TIMEOUT. */ +typedef struct +{ + uint8_t src; /**< Source of timeout event, see @ref BLE_GAP_TIMEOUT_SOURCES. */ +} ble_gap_evt_timeout_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_RSSI_CHANGED. */ +typedef struct +{ + int8_t rssi; /**< Received Signal Strength Indication in dBm. */ +} ble_gap_evt_rssi_changed_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_ADV_REPORT. */ +typedef struct +{ + ble_gap_addr_t peer_addr; /**< Bluetooth address of the peer device. */ + int8_t rssi; /**< Received Signal Strength Indication in dBm. */ + uint8_t scan_rsp : 1; /**< If 1, the report corresponds to a scan response and the type field may be ignored. */ + uint8_t type : 2; /**< See @ref BLE_GAP_ADV_TYPES. Only valid if the scan_rsp field is 0. */ + uint8_t dlen : 5; /**< Advertising or scan response data length. */ + uint8_t data[BLE_GAP_ADV_MAX_SIZE]; /**< Advertising or scan response data. */ +} ble_gap_evt_adv_report_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_SEC_REQUEST. */ +typedef struct +{ + uint8_t bond : 1; /**< Perform bonding. */ + uint8_t mitm : 1; /**< Man In The Middle protection requested. */ + uint8_t lesc : 1; /**< LE Secure Connections requested. */ + uint8_t keypress : 1; /**< Generation of keypress notifications requested. */ +} ble_gap_evt_sec_request_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST. */ +typedef struct +{ + ble_gap_conn_params_t conn_params; /**< GAP Connection Parameters. */ +} ble_gap_evt_conn_param_update_request_t; + + +/**@brief Event structure for @ref BLE_GAP_EVT_SCAN_REQ_REPORT. */ +typedef struct +{ + int8_t rssi; /**< Received Signal Strength Indication in dBm. */ + ble_gap_addr_t peer_addr; /**< Bluetooth address of the peer device. */ +} ble_gap_evt_scan_req_report_t; + + + +/**@brief GAP event structure. */ +typedef struct +{ + uint16_t conn_handle; /**< Connection Handle on which event occurred. */ + union /**< union alternative identified by evt_id in enclosing struct. */ + { + ble_gap_evt_connected_t connected; /**< Connected Event Parameters. */ + ble_gap_evt_disconnected_t disconnected; /**< Disconnected Event Parameters. */ + ble_gap_evt_conn_param_update_t conn_param_update; /**< Connection Parameter Update Parameters. */ + ble_gap_evt_sec_params_request_t sec_params_request; /**< Security Parameters Request Event Parameters. */ + ble_gap_evt_sec_info_request_t sec_info_request; /**< Security Information Request Event Parameters. */ + ble_gap_evt_passkey_display_t passkey_display; /**< Passkey Display Event Parameters. */ + ble_gap_evt_key_pressed_t key_pressed; /**< Key Pressed Event Parameters. */ + ble_gap_evt_auth_key_request_t auth_key_request; /**< Authentication Key Request Event Parameters. */ + ble_gap_evt_lesc_dhkey_request_t lesc_dhkey_request; /**< LE Secure Connections DHKey calculation request. */ + ble_gap_evt_auth_status_t auth_status; /**< Authentication Status Event Parameters. */ + ble_gap_evt_conn_sec_update_t conn_sec_update; /**< Connection Security Update Event Parameters. */ + ble_gap_evt_timeout_t timeout; /**< Timeout Event Parameters. */ + ble_gap_evt_rssi_changed_t rssi_changed; /**< RSSI Event parameters. */ + ble_gap_evt_adv_report_t adv_report; /**< Advertising Report Event Parameters. */ + ble_gap_evt_sec_request_t sec_request; /**< Security Request Event Parameters. */ + ble_gap_evt_conn_param_update_request_t conn_param_update_request; /**< Connection Parameter Update Parameters. */ + ble_gap_evt_scan_req_report_t scan_req_report; /**< Scan Request Report parameters. */ + } params; /**< Event Parameters. */ + +} ble_gap_evt_t; + + +/**@brief Channel Map option. + * Used with @ref sd_ble_opt_get to get the current channel map + * or @ref sd_ble_opt_set to set a new channel map. When setting the + * channel map, it applies to all current and future connections. When getting the + * current channel map, it applies to a single connection and the connection handle + * must be supplied. + * + * @note Setting the channel map may take some time, depending on connection parameters. + * The time taken may be different for each connection and the get operation will + * return the previous channel map until the new one has taken effect. + * + * @note After setting the channel map, by spec it can not be set again until at least 1 s has passed. + * See Bluetooth Specification Version 4.1 Volume 2, Part E, Section 7.3.46. + * + * @retval ::NRF_SUCCESS Get or set successful. + * @retval ::NRF_ERROR_BUSY Channel map was set again before enough time had passed. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied for get. + * @retval ::NRF_ERROR_NOT_SUPPORTED Returned by sd_ble_opt_set in peripheral-only SoftDevices. + * + */ +typedef struct +{ + uint16_t conn_handle; /**< Connection Handle (only applicable for get) */ + uint8_t ch_map[5]; /**< Channel Map (37-bit). */ +} ble_gap_opt_ch_map_t; + + +/**@brief Local connection latency option. + * + * Local connection latency is a feature which enables the slave to improve + * current consumption by ignoring the slave latency set by the peer. The + * local connection latency can only be set to a multiple of the slave latency, + * and cannot be longer than half of the supervision timeout. + * + * Used with @ref sd_ble_opt_set to set the local connection latency. The + * @ref sd_ble_opt_get is not supported for this option, but the actual + * local connection latency (unless set to NULL) is set as a return parameter + * when setting the option. + * + * @note The latency set will be truncated down to the closest slave latency event + * multiple, or the nearest multiple before half of the supervision timeout. + * + * @note The local connection latency is disabled by default, and needs to be enabled for new + * connections and whenever the connection is updated. + * + * @retval ::NRF_SUCCESS Set successfully. + * @retval ::NRF_ERROR_NOT_SUPPORTED Get is not supported. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle parameter. + */ +typedef struct +{ + uint16_t conn_handle; /**< Connection Handle */ + uint16_t requested_latency; /**< Requested local connection latency. */ + uint16_t * p_actual_latency; /**< Pointer to storage for the actual local connection latency (can be set to NULL to skip return value). */ +} ble_gap_opt_local_conn_latency_t; + + +/**@brief Passkey Option. + * + * Structure containing the passkey to be used during pairing. This can be used with @ref + * sd_ble_opt_set to make the SoftDevice use a pre-programmed passkey for authentication + * instead of generating a random one. + * + * @note @ref sd_ble_opt_get is not supported for this option. + * + */ +typedef struct +{ + uint8_t * p_passkey; /**< Pointer to 6-digit ASCII string (digit 0..9 only, no NULL termination) passkey to be used during pairing. If this is NULL, the SoftDevice will generate a random passkey if required.*/ +} ble_gap_opt_passkey_t; + + +/**@brief Custom Privacy Option. + * + * This structure is used with both @ref sd_ble_opt_set (as input) and with + * @ref sd_ble_opt_get (as output). + * + * Structure containing: + * - A pointer to an IRK to set (if input), or a place to store a read IRK (if output). + * - A private address refresh cycle. + * + * @note The specified address cycle interval is used when the address cycle mode is + * @ref BLE_GAP_ADDR_CYCLE_MODE_AUTO. If 0 is given, the address will not be automatically + * refreshed at all. The default interval is @ref BLE_GAP_DEFAULT_PRIVATE_ADDR_CYCLE_INTERVAL_S. + * + * @note If the current address cycle mode is @ref BLE_GAP_ADDR_CYCLE_MODE_AUTO, the address will immediately be + * refreshed when a custom privacy option is set. A new address can be generated manually by calling + * @ref sd_ble_gap_address_set with the same type again. + * + * @note If the IRK is updated, the new IRK becomes the one to be distributed in all + * bonding procedures performed after @ref sd_ble_opt_set returns. + * + * @retval ::NRF_SUCCESS Set or read successfully. + * @retval ::NRF_ERROR_INVALID_ADDR The pointer to IRK storage is invalid. + */ +typedef struct +{ + ble_gap_irk_t * p_irk; /**< When input: Pointer to custom IRK, or NULL to use/reset to the device's default IRK. When output: Pointer to where the current IRK is to be stored, or NULL to not read out the IRK. */ + uint16_t interval_s; /**< When input: Custom private address cycle interval in seconds. When output: The current private address cycle interval. */ +} ble_gap_opt_privacy_t; + + +/**@brief Scan request report option. + * + * This can be used with @ref sd_ble_opt_set to make the SoftDevice send + * @ref BLE_GAP_EVT_SCAN_REQ_REPORT events. + * + * @note Due to the limited space reserved for scan request report events, + * not all received scan requests will be reported. + * + * @note If whitelisting is used, only whitelisted requests are reported. + * + * @retval ::NRF_SUCCESS Set successfully. + * @retval ::NRF_ERROR_INVALID_STATE When advertising is ongoing while the option is set. + */ +typedef struct +{ + uint8_t enable : 1; /**< Enable scan request reports. */ +} ble_gap_opt_scan_req_report_t; + +/**@brief Compatibility mode option. + * + * This can be used with @ref sd_ble_opt_set to enable and disable + * compatibility modes. Compatibility modes are disabled by default. + * + * @note Compatibility mode 1 enables interoperability with devices that do not support + * a value of 0 for the WinOffset parameter in the Link Layer CONNECT_REQ packet. + * + * @retval ::NRF_SUCCESS Set successfully. + * @retval ::NRF_ERROR_INVALID_STATE When connection creation is ongoing while mode 1 is set. + */ +typedef struct +{ + uint8_t mode_1_enable : 1; /**< Enable compatibility mode 1.*/ +} ble_gap_opt_compat_mode_t; + +/**@brief Option structure for GAP options. */ +typedef union +{ + ble_gap_opt_ch_map_t ch_map; /**< Parameters for the Channel Map option. */ + ble_gap_opt_local_conn_latency_t local_conn_latency; /**< Parameters for the Local connection latency option */ + ble_gap_opt_passkey_t passkey; /**< Parameters for the Passkey option.*/ + ble_gap_opt_privacy_t privacy; /**< Parameters for the Custom privacy option. */ + ble_gap_opt_scan_req_report_t scan_req_report; /**< Parameters for the scan request report option.*/ + ble_gap_opt_compat_mode_t compat_mode; /**< Parameters for the compatibility mode option.*/ +} ble_gap_opt_t; +/**@} */ + + +/**@addtogroup BLE_GAP_FUNCTIONS Functions + * @{ */ + +/**@brief Set local Bluetooth address. + * + * @note If the address cycle mode is @ref BLE_GAP_ADDR_CYCLE_MODE_AUTO, the address type is required to + * be @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE or + * @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE. The given address is ignored and the + * SoftDevice will generate a new private address automatically every + * @ref BLE_GAP_DEFAULT_PRIVATE_ADDR_CYCLE_INTERVAL_S seconds. If this API + * call is used again with the same parameters, the SoftDevice will immediately + * generate a new private address to replace the current address. + * + * @note If the application wishes to use a @ref BLE_GAP_ADDR_TYPE_PUBLIC or + * @ref BLE_GAP_ADDR_TYPE_RANDOM_STATIC address, the cycle mode must be + * @ref BLE_GAP_ADDR_CYCLE_MODE_NONE. + * + * @note By default the SoftDevice will set an address of type @ref BLE_GAP_ADDR_TYPE_RANDOM_STATIC upon being + * enabled. The address is a random number populated during the IC manufacturing process and remains unchanged + * for the lifetime of each IC. + * + * @note If this API function is called while advertising or scanning, the softdevice will immediately update the + * advertising or scanning address without the need to stop the procedure in the following cases: + * - If the previously set address is of type @ref BLE_GAP_ADDR_TYPE_PUBLIC and the new address + * is also of type @ref BLE_GAP_ADDR_TYPE_PUBLIC + * - If the previously set address is not @ref BLE_GAP_ADDR_TYPE_PUBLIC and the new address is + * also not @ref BLE_GAP_ADDR_TYPE_PUBLIC. + * If the address is changed from a @ref BLE_GAP_ADDR_TYPE_PUBLIC address to another type or from + * another type to a @ref BLE_GAP_ADDR_TYPE_PUBLIC address, the change will take effect the next + * time an advertising or scanning procedure is started. + * + * @note If the address cycle mode is @ref BLE_GAP_ADDR_CYCLE_MODE_NONE and the application is + * using privacy, the application must take care to generate and set new private addresses + * periodically to comply with the Privacy specification in Bluetooth Core Spec. + * + * @mscs + * @mmsc{@ref BLE_GAP_ADV_MSC} + * @endmscs + * + * @param[in] addr_cycle_mode Address cycle mode, see @ref BLE_GAP_ADDR_CYCLE_MODES. + * @param[in] p_addr Pointer to address structure. + * + * @retval ::NRF_SUCCESS Address successfully set. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameters. + * @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR Invalid address. + * @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + */ +SVCALL(SD_BLE_GAP_ADDRESS_SET, uint32_t, sd_ble_gap_address_set(uint8_t addr_cycle_mode, ble_gap_addr_t const *p_addr)); + + +/**@brief Get local Bluetooth address. + * + * @param[out] p_addr Pointer to address structure to be filled in. + * + * @retval ::NRF_SUCCESS Address successfully retrieved. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + */ +SVCALL(SD_BLE_GAP_ADDRESS_GET, uint32_t, sd_ble_gap_address_get(ble_gap_addr_t *p_addr)); + + +/**@brief Set, clear or update advertising and scan response data. + * + * @note The format of the advertising data will be checked by this call to ensure interoperability. + * Limitations imposed by this API call to the data provided include having a flags data type in the scan response data and + * duplicating the local name in the advertising data and scan response data. + * + * @note To clear the advertising data and set it to a 0-length packet, simply provide a valid pointer (p_data/p_sr_data) with its corresponding + * length (dlen/srdlen) set to 0. + * + * @note The call will fail if p_data and p_sr_data are both NULL since this would have no effect. + * + * @mscs + * @mmsc{@ref BLE_GAP_ADV_MSC} + * @mmsc{@ref BLE_GAP_WL_SHARE_MSC} + * @endmscs + * + * @param[in] p_data Raw data to be placed in advertising packet. If NULL, no changes are made to the current advertising packet data. + * @param[in] dlen Data length for p_data. Max size: @ref BLE_GAP_ADV_MAX_SIZE octets. Should be 0 if p_data is NULL, can be 0 if p_data is not NULL. + * @param[in] p_sr_data Raw data to be placed in scan response packet. If NULL, no changes are made to the current scan response packet data. + * @param[in] srdlen Data length for p_sr_data. Max size: @ref BLE_GAP_ADV_MAX_SIZE octets. Should be 0 if p_sr_data is NULL, can be 0 if p_data is not NULL. + * + * @retval ::NRF_SUCCESS Advertising data successfully updated or cleared. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, both p_data and p_sr_data cannot be NULL. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_FLAGS Invalid combination of advertising flags supplied. + * @retval ::NRF_ERROR_INVALID_DATA Invalid data type(s) supplied, check the advertising data format specification. + * @retval ::NRF_ERROR_INVALID_LENGTH Invalid data length(s) supplied. + * @retval ::NRF_ERROR_NOT_SUPPORTED Unsupported data type. + * @retval ::BLE_ERROR_GAP_UUID_LIST_MISMATCH Invalid UUID list supplied. + */ +SVCALL(SD_BLE_GAP_ADV_DATA_SET, uint32_t, sd_ble_gap_adv_data_set(uint8_t const *p_data, uint8_t dlen, uint8_t const *p_sr_data, uint8_t srdlen)); + + +/**@brief Start advertising (GAP Discoverable, Connectable modes, Broadcast Procedure). + * + * @note An application can start an advertising procedure for broadcasting purposes while a connection + * is active. After a @ref BLE_GAP_EVT_CONNECTED event is received, this function may therefore + * be called to start a broadcast advertising procedure. The advertising procedure + * cannot however be connectable (it must be of type @ref BLE_GAP_ADV_TYPE_ADV_SCAN_IND or + * @ref BLE_GAP_ADV_TYPE_ADV_NONCONN_IND). @note Only one advertiser may be active at any time. + * + * @note To use the currently active whitelist set p_adv_params->p_whitelist to NULL. + * + * @events + * @event{@ref BLE_GAP_EVT_CONNECTED, Generated after connection has been established through connectable advertising.} + * @event{@ref BLE_GAP_EVT_TIMEOUT, Advertisement has timed out.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_ADV_MSC} + * @mmsc{@ref BLE_GAP_WL_SHARE_MSC} + * @endmscs + * + * @param[in] p_adv_params Pointer to advertising parameters structure. + * + * @retval ::NRF_SUCCESS The BLE stack has started advertising. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::NRF_ERROR_CONN_COUNT The limit of available connections has been reached; connectable advertiser cannot be started. + * @retval ::NRF_ERROR_NO_MEM The configured memory pools (see @ref ble_conn_bw_counts_t) are not large enough for the + * bandwidth selected for this connection. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, check the accepted ranges and limits. + * @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR Invalid Bluetooth address supplied. + * @retval ::BLE_ERROR_GAP_DISCOVERABLE_WITH_WHITELIST Discoverable mode and whitelist incompatible. + * @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry. + * @retval ::BLE_ERROR_GAP_WHITELIST_IN_USE Unable to replace the whitelist while another operation is using it. + * @retval ::NRF_ERROR_RESOURCES Not enough BLE role slots available. + * Stop one or more currently active roles (Central, Peripheral or Observer) and try again + */ +SVCALL(SD_BLE_GAP_ADV_START, uint32_t, sd_ble_gap_adv_start(ble_gap_adv_params_t const *p_adv_params)); + + +/**@brief Stop advertising (GAP Discoverable, Connectable modes, Broadcast Procedure). + * + * @mscs + * @mmsc{@ref BLE_GAP_ADV_MSC} + * @mmsc{@ref BLE_GAP_WL_SHARE_MSC} + * @endmscs + * + * @retval ::NRF_SUCCESS The BLE stack has stopped advertising. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation (most probably not in advertising state). + */ +SVCALL(SD_BLE_GAP_ADV_STOP, uint32_t, sd_ble_gap_adv_stop(void)); + + +/**@brief Update connection parameters. + * + * @details In the central role this will initiate a Link Layer connection parameter update procedure, + * otherwise in the peripheral role, this will send the corresponding L2CAP request and wait for + * the central to perform the procedure. In both cases, and regardless of success or failure, the application + * will be informed of the result with a @ref BLE_GAP_EVT_CONN_PARAM_UPDATE event. + * + * @details This function can be used as a central both to reply to a @ref BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST or to start the procedure unrequested. + * + * @events + * @event{@ref BLE_GAP_EVT_CONN_PARAM_UPDATE, Result of the connection parameter update procedure.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_CPU_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_ENC_AUTH_MUTEX_MSC} + * @mmsc{@ref BLE_GAP_MULTILINK_CPU_MSC} + * @mmsc{@ref BLE_GAP_MULTILINK_CTRL_PROC_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_CPU_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_conn_params Pointer to desired connection parameters. If NULL is provided on a peripheral role, + * the parameters in the PPCP characteristic of the GAP service will be used instead. + * If NULL is provided on a central role and in response to a @ref BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST, the peripheral request will be rejected + * + * @retval ::NRF_SUCCESS The Connection Update procedure has been started successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, check parameter limits and constraints. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::NRF_ERROR_BUSY Procedure already in progress or not allowed at this time, process pending events and wait for pending procedures to complete and retry. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + */ +SVCALL(SD_BLE_GAP_CONN_PARAM_UPDATE, uint32_t, sd_ble_gap_conn_param_update(uint16_t conn_handle, ble_gap_conn_params_t const *p_conn_params)); + + +/**@brief Disconnect (GAP Link Termination). + * + * @details This call initiates the disconnection procedure, and its completion will be communicated to the application + * with a @ref BLE_GAP_EVT_DISCONNECTED event. + * + * @events + * @event{@ref BLE_GAP_EVT_DISCONNECTED, Generated when disconnection procedure is complete.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_CONN_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] hci_status_code HCI status code, see @ref BLE_HCI_STATUS_CODES (accepted values are @ref BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION and @ref BLE_HCI_CONN_INTERVAL_UNACCEPTABLE). + * + * @retval ::NRF_SUCCESS The disconnection procedure has been started successfully. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation (disconnection is already in progress). + */ +SVCALL(SD_BLE_GAP_DISCONNECT, uint32_t, sd_ble_gap_disconnect(uint16_t conn_handle, uint8_t hci_status_code)); + + +/**@brief Set the radio's transmit power. + * + * @param[in] tx_power Radio transmit power in dBm (accepted values are -40, -30, -20, -16, -12, -8, -4, 0, and 4 dBm). + * + * @note The -30dBm setting is only available on nRF51 series ICs. + * @note The -40dBm setting is only available on nRF52 series ICs. + * + * @retval ::NRF_SUCCESS Successfully changed the transmit power. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + */ +SVCALL(SD_BLE_GAP_TX_POWER_SET, uint32_t, sd_ble_gap_tx_power_set(int8_t tx_power)); + + +/**@brief Set GAP Appearance value. + * + * @param[in] appearance Appearance (16-bit), see @ref BLE_APPEARANCES. + * + * @retval ::NRF_SUCCESS Appearance value set successfully. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + */ +SVCALL(SD_BLE_GAP_APPEARANCE_SET, uint32_t, sd_ble_gap_appearance_set(uint16_t appearance)); + + +/**@brief Get GAP Appearance value. + * + * @param[out] p_appearance Pointer to appearance (16-bit) to be filled in, see @ref BLE_APPEARANCES. + * + * @retval ::NRF_SUCCESS Appearance value retrieved successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + */ +SVCALL(SD_BLE_GAP_APPEARANCE_GET, uint32_t, sd_ble_gap_appearance_get(uint16_t *p_appearance)); + + +/**@brief Set GAP Peripheral Preferred Connection Parameters. + * + * @param[in] p_conn_params Pointer to a @ref ble_gap_conn_params_t structure with the desired parameters. + * + * @retval ::NRF_SUCCESS Peripheral Preferred Connection Parameters set successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + */ +SVCALL(SD_BLE_GAP_PPCP_SET, uint32_t, sd_ble_gap_ppcp_set(ble_gap_conn_params_t const *p_conn_params)); + + +/**@brief Get GAP Peripheral Preferred Connection Parameters. + * + * @param[out] p_conn_params Pointer to a @ref ble_gap_conn_params_t structure where the parameters will be stored. + * + * @retval ::NRF_SUCCESS Peripheral Preferred Connection Parameters retrieved successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + */ +SVCALL(SD_BLE_GAP_PPCP_GET, uint32_t, sd_ble_gap_ppcp_get(ble_gap_conn_params_t *p_conn_params)); + + +/**@brief Set GAP device name. + * + * @param[in] p_write_perm Write permissions for the Device Name characteristic, see @ref ble_gap_conn_sec_mode_t. + * @param[in] p_dev_name Pointer to a UTF-8 encoded, non NULL-terminated string. + * @param[in] len Length of the UTF-8, non NULL-terminated string pointed to by p_dev_name in octets (must be smaller or equal than @ref BLE_GAP_DEVNAME_MAX_LEN). + * + * @retval ::NRF_SUCCESS GAP device name and permissions set successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied. + */ +SVCALL(SD_BLE_GAP_DEVICE_NAME_SET, uint32_t, sd_ble_gap_device_name_set(ble_gap_conn_sec_mode_t const *p_write_perm, uint8_t const *p_dev_name, uint16_t len)); + + +/**@brief Get GAP device name. + * + * @note If the device name is longer than the size of the supplied buffer, + * p_len will return the complete device name length, + * and not the number of bytes actually returned in p_dev_name. + * The application may use this information to allocate a suitable buffer size. + * + * @param[out] p_dev_name Pointer to an empty buffer where the UTF-8 non NULL-terminated string will be placed. Set to NULL to obtain the complete device name length. + * @param[in,out] p_len Length of the buffer pointed by p_dev_name, complete device name length on output. + * + * @retval ::NRF_SUCCESS GAP device name retrieved successfully. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied. + */ +SVCALL(SD_BLE_GAP_DEVICE_NAME_GET, uint32_t, sd_ble_gap_device_name_get(uint8_t *p_dev_name, uint16_t *p_len)); + + +/**@brief Initiate the GAP Authentication procedure. + * + * @details In the central role, this function will send an SMP Pairing Request (or an SMP Pairing Failed if rejected), + * otherwise in the peripheral role, an SMP Security Request will be sent. + * + * @events + * @event{Depending on the security parameters set and the packet exchanges with the peer\, the following events may be generated:} + * @event{@ref BLE_GAP_EVT_SEC_PARAMS_REQUEST} + * @event{@ref BLE_GAP_EVT_SEC_INFO_REQUEST} + * @event{@ref BLE_GAP_EVT_PASSKEY_DISPLAY} + * @event{@ref BLE_GAP_EVT_KEY_PRESSED} + * @event{@ref BLE_GAP_EVT_AUTH_KEY_REQUEST} + * @event{@ref BLE_GAP_EVT_LESC_DHKEY_REQUEST} + * @event{@ref BLE_GAP_EVT_CONN_SEC_UPDATE} + * @event{@ref BLE_GAP_EVT_AUTH_STATUS} + * @event{@ref BLE_GAP_EVT_TIMEOUT} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_SEC_REQ_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_SEC_REQ_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_ENC_AUTH_MUTEX_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_JW_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_PK_PERIPH_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_PK_PERIPH_OOB_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_NC_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_PD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_CD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_OOB_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_sec_params Pointer to the @ref ble_gap_sec_params_t structure with the security parameters to be used during the pairing or bonding procedure. + * In the peripheral role, only the bond, mitm, lesc and keypress fields of this structure are used. + * In the central role, this pointer may be NULL to reject a Security Request. + * + * @retval ::NRF_SUCCESS Successfully initiated authentication procedure. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry. + * @retval ::NRF_ERROR_NO_MEM The maximum number of authentication procedures that can run in parallel for the given role is reached. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::NRF_ERROR_NOT_SUPPORTED Setting of sign or link fields in @ref ble_gap_sec_kdist_t not supported. + * @retval ::NRF_ERROR_TIMEOUT A SMP timeout has occurred, and further SMP operations on this link is prohibited. + */ +SVCALL(SD_BLE_GAP_AUTHENTICATE, uint32_t, sd_ble_gap_authenticate(uint16_t conn_handle, ble_gap_sec_params_t const *p_sec_params)); + + +/**@brief Reply with GAP security parameters. + * + * @details This function is only used to reply to a @ref BLE_GAP_EVT_SEC_PARAMS_REQUEST, calling it at other times will result in an @ref NRF_ERROR_INVALID_STATE. + * @note If the call returns an error code, the request is still pending, and the reply call may be repeated with corrected parameters. + * + * @events + * @event{This function is used during authentication procedures\, see the list of events in the documentation of @ref sd_ble_gap_authenticate.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_BONDING_JW_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_BONDING_PK_PERIPH_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_BONDING_PK_CENTRAL_OOB_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_BONDING_STATIC_PK_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_CONFIRM_FAIL_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_NC_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_PD_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_CD_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_OOB_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_KS_TOO_SMALL_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_APP_ERROR_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_REMOTE_PAIRING_FAIL_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_TIMEOUT_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_JW_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_PK_PERIPH_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_PK_PERIPH_OOB_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_NC_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_PD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_CD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_OOB_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] sec_status Security status, see @ref BLE_GAP_SEC_STATUS. + * @param[in] p_sec_params Pointer to a @ref ble_gap_sec_params_t security parameters structure. In the central role this must be set to NULL, as the parameters have + * already been provided during a previous call to @ref sd_ble_gap_authenticate. + * @param[in,out] p_sec_keyset Pointer to a @ref ble_gap_sec_keyset_t security keyset structure. Any keys generated and/or distributed as a result of the ongoing security procedure + * will be stored into the memory referenced by the pointers inside this structure. The keys will be stored and available to the application + * upon reception of a @ref BLE_GAP_EVT_AUTH_STATUS event. + * Note that the SoftDevice expects the application to provide memory for storing the + * peer's keys. So it must be ensured that the relevant pointers inside this structure are not NULL. The pointers to the local key + * can, however, be NULL, in which case, the local key data will not be available to the application upon reception of the + * @ref BLE_GAP_EVT_AUTH_STATUS event. + * + * @retval ::NRF_SUCCESS Successfully accepted security parameter from the application. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::NRF_ERROR_NOT_SUPPORTED Setting of sign or link fields in @ref ble_gap_sec_kdist_t not supported. + */ +SVCALL(SD_BLE_GAP_SEC_PARAMS_REPLY, uint32_t, sd_ble_gap_sec_params_reply(uint16_t conn_handle, uint8_t sec_status, ble_gap_sec_params_t const *p_sec_params, ble_gap_sec_keyset_t const *p_sec_keyset)); + + +/**@brief Reply with an authentication key. + * + * @details This function is only used to reply to a @ref BLE_GAP_EVT_AUTH_KEY_REQUEST or a @ref BLE_GAP_EVT_PASSKEY_DISPLAY, calling it at other times will result in an @ref NRF_ERROR_INVALID_STATE. + * @note If the call returns an error code, the request is still pending, and the reply call may be repeated with corrected parameters. + * + * @events + * @event{This function is used during authentication procedures\, see the list of events in the documentation of @ref sd_ble_gap_authenticate.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_BONDING_PK_CENTRAL_OOB_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_NC_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_CD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_PK_PERIPH_OOB_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_NC_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_CD_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] key_type See @ref BLE_GAP_AUTH_KEY_TYPES. + * @param[in] p_key If key type is @ref BLE_GAP_AUTH_KEY_TYPE_NONE, then NULL. + * If key type is @ref BLE_GAP_AUTH_KEY_TYPE_PASSKEY, then a 6-byte ASCII string (digit 0..9 only, no NULL termination) + * or NULL when confirming LE Secure Connections Numeric Comparison. + * If key type is @ref BLE_GAP_AUTH_KEY_TYPE_OOB, then a 16-byte OOB key value in Little Endian format. + * + * @retval ::NRF_SUCCESS Authentication key successfully set. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_AUTH_KEY_REPLY, uint32_t, sd_ble_gap_auth_key_reply(uint16_t conn_handle, uint8_t key_type, uint8_t const *p_key)); + +/**@brief Reply with an LE Secure connections DHKey. + * + * @details This function is only used to reply to a @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST, calling it at other times will result in an @ref NRF_ERROR_INVALID_STATE. + * @note If the call returns an error code, the request is still pending, and the reply call may be repeated with corrected parameters. + * + * @events + * @event{This function is used during authentication procedures\, see the list of events in the documentation of @ref sd_ble_gap_authenticate.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_LESC_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_NC_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_PD_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_CD_MSC} + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_OOB_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_PAIRING_JW_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_NC_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_PD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_CD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_OOB_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_dhkey LE Secure Connections DHKey. + * + * @retval ::NRF_SUCCESS DHKey successfully set. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_LESC_DHKEY_REPLY, uint32_t, sd_ble_gap_lesc_dhkey_reply(uint16_t conn_handle, ble_gap_lesc_dhkey_t const *p_dhkey)); + +/**@brief Notify the peer of a local keypress. + * + * @details This function can only be used when an authentication procedure using LE Secure Connection is in progress. Calling it at other times will result in an @ref NRF_ERROR_INVALID_STATE. + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_CD_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_CD_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] kp_not See @ref BLE_GAP_KP_NOT_TYPES. + * + * @retval ::NRF_SUCCESS Keypress notification successfully queued for transmission. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either not entering a passkey or keypresses have not been enabled by both peers. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::NRF_ERROR_BUSY The BLE stack is busy. Retry at later time. + */ +SVCALL(SD_BLE_GAP_KEYPRESS_NOTIFY, uint32_t, sd_ble_gap_keypress_notify(uint16_t conn_handle, uint8_t kp_not)); + +/**@brief Generate a set of OOB data to send to a peer out of band. + * + * @note The @ref ble_gap_addr_t included in the OOB data returned will be the currently active one (or, if a connection has already been established, + * the one used during connection setup). The application may manually overwrite it with an updated value. + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_OOB_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_OOB_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. Can be BLE_CONN_HANDLE_INVALID if a BLE connection has not been established yet. + * @param[in] p_pk_own LE Secure Connections local P-256 Public Key. + * @param[out] p_oobd_own The OOB data to be sent out of band to a peer. + * + * @retval ::NRF_SUCCESS OOB data successfully generated. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_LESC_OOB_DATA_GET, uint32_t, sd_ble_gap_lesc_oob_data_get(uint16_t conn_handle, ble_gap_lesc_p256_pk_t const *p_pk_own, ble_gap_lesc_oob_data_t *p_oobd_own)); + +/**@brief Provide the OOB data sent/received out of band. + * + * @note At least one of the 2 pointers provided must be different from NULL. + * @note An authentication procedure with OOB selected as an algorithm must be in progress when calling this function. + * @note A @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST event with the oobd_req set to 1 must have been received prior to calling this function. + * + * @events + * @event{This function is used during authentication procedures\, see the list of events in the documentation of @ref sd_ble_gap_authenticate.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_OOB_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_OOB_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_oobd_own The OOB data sent out of band to a peer or NULL if none sent. + * @param[in] p_oobd_peer The OOB data received out of band from a peer or NULL if none received. + * + * @retval ::NRF_SUCCESS OOB data accepted. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_LESC_OOB_DATA_SET, uint32_t, sd_ble_gap_lesc_oob_data_set(uint16_t conn_handle, ble_gap_lesc_oob_data_t const *p_oobd_own, ble_gap_lesc_oob_data_t const *p_oobd_peer)); + +/**@brief Initiate GAP Encryption procedure. + * + * @details In the central role, this function will initiate the encryption procedure using the encryption information provided. + * + * @events + * @event{@ref BLE_GAP_EVT_CONN_SEC_UPDATE, The connection security has been updated.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_CENTRAL_ENC_AUTH_MUTEX_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_ENC_MSC} + * @mmsc{@ref BLE_GAP_MULTILINK_CTRL_PROC_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_SEC_REQ_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_master_id Pointer to a @ref ble_gap_master_id_t master identification structure. + * @param[in] p_enc_info Pointer to a @ref ble_gap_enc_info_t encryption information structure. + * + * @retval ::NRF_SUCCESS Successfully initiated authentication procedure. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::BLE_ERROR_INVALID_ROLE Operation is not supported in the Peripheral role. + * @retval ::NRF_ERROR_BUSY Procedure already in progress or not allowed at this time, wait for pending procedures to complete and retry. + */ +SVCALL(SD_BLE_GAP_ENCRYPT, uint32_t, sd_ble_gap_encrypt(uint16_t conn_handle, ble_gap_master_id_t const *p_master_id, ble_gap_enc_info_t const *p_enc_info)); + + +/**@brief Reply with GAP security information. + * + * @details This function is only used to reply to a @ref BLE_GAP_EVT_SEC_INFO_REQUEST, calling it at other times will result in @ref NRF_ERROR_INVALID_STATE. + * @note If the call returns an error code, the request is still pending, and the reply call may be repeated with corrected parameters. + * @note Data signing is not yet supported, and p_sign_info must therefore be NULL. + * + * @mscs + * @mmsc{@ref BLE_GAP_PERIPH_ENC_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_enc_info Pointer to a @ref ble_gap_enc_info_t encryption information structure. May be NULL to signal none is available. + * @param[in] p_id_info Pointer to a @ref ble_gap_irk_t identity information structure. May be NULL to signal none is available. + * @param[in] p_sign_info Pointer to a @ref ble_gap_sign_info_t signing information structure. May be NULL to signal none is available. + * + * @retval ::NRF_SUCCESS Successfully accepted security information. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_SEC_INFO_REPLY, uint32_t, sd_ble_gap_sec_info_reply(uint16_t conn_handle, ble_gap_enc_info_t const *p_enc_info, ble_gap_irk_t const *p_id_info, ble_gap_sign_info_t const *p_sign_info)); + + +/**@brief Get the current connection security. + * + * @param[in] conn_handle Connection handle. + * @param[out] p_conn_sec Pointer to a @ref ble_gap_conn_sec_t structure to be filled in. + * + * @retval ::NRF_SUCCESS Current connection security successfully retrieved. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_CONN_SEC_GET, uint32_t, sd_ble_gap_conn_sec_get(uint16_t conn_handle, ble_gap_conn_sec_t *p_conn_sec)); + + +/**@brief Start reporting the received signal strength to the application. + * + * A new event is reported whenever the RSSI value changes, until @ref sd_ble_gap_rssi_stop is called. + * + * @events + * @event{@ref BLE_GAP_EVT_RSSI_CHANGED, New RSSI data available. How often the event is generated is + dependent on the settings of the threshold_dbm + and skip_count input parameters.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_CENTRAL_RSSI_READ_MSC} + * @mmsc{@ref BLE_GAP_RSSI_FILT_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] threshold_dbm Minimum change in dBm before triggering the @ref BLE_GAP_EVT_RSSI_CHANGED event. Events are disabled if threshold_dbm equals @ref BLE_GAP_RSSI_THRESHOLD_INVALID. + * @param[in] skip_count Number of RSSI samples with a change of threshold_dbm or more before sending a new @ref BLE_GAP_EVT_RSSI_CHANGED event. + * + * @retval ::NRF_SUCCESS Successfully activated RSSI reporting. + * @retval ::NRF_ERROR_INVALID_STATE Disconnection in progress. Invalid state to perform operation. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_RSSI_START, uint32_t, sd_ble_gap_rssi_start(uint16_t conn_handle, uint8_t threshold_dbm, uint8_t skip_count)); + + +/**@brief Stop reporting the received signal strength. + * + * @note An RSSI change detected before the call but not yet received by the application + * may be reported after @ref sd_ble_gap_rssi_stop has been called. + * + * @mscs + * @mmsc{@ref BLE_GAP_CENTRAL_RSSI_READ_MSC} + * @mmsc{@ref BLE_GAP_RSSI_FILT_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * + * @retval ::NRF_SUCCESS Successfully deactivated RSSI reporting. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + */ +SVCALL(SD_BLE_GAP_RSSI_STOP, uint32_t, sd_ble_gap_rssi_stop(uint16_t conn_handle)); + + +/**@brief Get the received signal strength for the last connection event. + * + * @ref sd_ble_gap_rssi_start must be called to start reporting RSSI before using this function. @ref NRF_ERROR_NOT_FOUND + * will be returned until RSSI was sampled for the first time after calling @ref sd_ble_gap_rssi_start. + * + * @mscs + * @mmsc{@ref BLE_GAP_CENTRAL_RSSI_READ_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[out] p_rssi Pointer to the location where the RSSI measurement shall be stored. + * + * @retval ::NRF_SUCCESS Successfully read the RSSI. + * @retval ::NRF_ERROR_NOT_FOUND No sample is available. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::NRF_ERROR_INVALID_STATE RSSI reporting is not ongoing, or disconnection in progress. + */ +SVCALL(SD_BLE_GAP_RSSI_GET, uint32_t, sd_ble_gap_rssi_get(uint16_t conn_handle, int8_t *p_rssi)); + + +/**@brief Start scanning (GAP Discovery procedure, Observer Procedure). + * + * @note To use the currently active whitelist set p_scan_params->p_whitelist to NULL. + * + * @events + * @event{@ref BLE_GAP_EVT_ADV_REPORT, An advertising or scan response packet has been received.} + * @event{@ref BLE_GAP_EVT_TIMEOUT, Scanner has timed out.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GAP_SCAN_MSC} + * @mmsc{@ref BLE_GAP_WL_SHARE_MSC} + * @endmscs + * + * @param[in] p_scan_params Pointer to scan parameters structure. + * + * @retval ::NRF_SUCCESS Successfully initiated scanning procedure. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry. + * @retval ::BLE_ERROR_GAP_WHITELIST_IN_USE Unable to replace the whitelist while another operation is using it. + * @retval ::NRF_ERROR_RESOURCES Not enough BLE role slots available. + * Stop one or more currently active roles (Central, Peripheral or Broadcaster) and try again + */ +SVCALL(SD_BLE_GAP_SCAN_START, uint32_t, sd_ble_gap_scan_start(ble_gap_scan_params_t const *p_scan_params)); + + +/**@brief Stop scanning (GAP Discovery procedure, Observer Procedure). + * + * @mscs + * @mmsc{@ref BLE_GAP_SCAN_MSC} + * @mmsc{@ref BLE_GAP_WL_SHARE_MSC} + * @endmscs + * + * @retval ::NRF_SUCCESS Successfully stopped scanning procedure. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation (most probably not in scanning state). + */ +SVCALL(SD_BLE_GAP_SCAN_STOP, uint32_t, sd_ble_gap_scan_stop(void)); + + +/**@brief Create a connection (GAP Link Establishment). + * + * @note To use the currently active whitelist set p_scan_params->p_whitelist to NULL. + * @note If a scanning procedure is currently in progress it will be automatically stopped when calling this function. + * + * @mscs + * @mmsc{@ref BLE_GAP_WL_SHARE_MSC} + * @mmsc{@ref BLE_GAP_CENTRAL_CONN_MSC} + * @endmscs + * + * @param[in] p_peer_addr Pointer to peer address. If the selective bit is set in @ref ble_gap_scan_params_t, then this must be NULL. + * @param[in] p_scan_params Pointer to scan parameters structure. + * @param[in] p_conn_params Pointer to desired connection parameters. + * + * @retval ::NRF_SUCCESS Successfully initiated connection procedure. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid parameter(s) pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR Invalid Peer address. + * @retval ::NRF_ERROR_CONN_COUNT The limit of available connections has been reached. + * @retval ::NRF_ERROR_NO_MEM The configured memory pool (see @ref ble_conn_bw_counts_t) is not large enough for the + * bandwidth selected for this connection. + * @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry. If another connection is being established + * wait for the corresponding @ref BLE_GAP_EVT_CONNECTED event before calling again. + * @retval ::BLE_ERROR_GAP_WHITELIST_IN_USE Unable to replace the whitelist while another operation is using it. + * @retval ::NRF_ERROR_RESOURCES Not enough BLE role slots available. + * Stop one or more currently active roles (Central, Peripheral or Broadcaster) and try again + */ +SVCALL(SD_BLE_GAP_CONNECT, uint32_t, sd_ble_gap_connect(ble_gap_addr_t const *p_peer_addr, ble_gap_scan_params_t const *p_scan_params, ble_gap_conn_params_t const *p_conn_params)); + + +/**@brief Cancel a connection establishment. + * + * @mscs + * @mmsc{@ref BLE_GAP_CENTRAL_CONN_MSC} + * @endmscs + * + * @retval ::NRF_SUCCESS Successfully cancelled an ongoing connection procedure. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + */ +SVCALL(SD_BLE_GAP_CONNECT_CANCEL, uint32_t, sd_ble_gap_connect_cancel(void)); + +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif // BLE_GAP_H__ + +/** + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gatt.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gatt.h new file mode 100644 index 0000000000..8d915ee76a --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gatt.h @@ -0,0 +1,212 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 BLE_GATT Generic Attribute Profile (GATT) Common + @{ + @brief Common definitions and prototypes for the GATT interfaces. + */ + +#ifndef BLE_GATT_H__ +#define BLE_GATT_H__ + +#include "ble_types.h" +#include "ble_ranges.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup BLE_GATT_DEFINES Defines + * @{ */ + +/** @brief Default MTU size. */ +#define GATT_MTU_SIZE_DEFAULT 23 + +/** @brief Only the default MTU size of 23 is currently supported. */ +#define GATT_RX_MTU 23 + + +/**@brief Invalid Attribute Handle. */ +#define BLE_GATT_HANDLE_INVALID 0x0000 + +/**@brief First Attribute Handle. */ +#define BLE_GATT_HANDLE_START 0x0001 + +/**@brief Last Attribute Handle. */ +#define BLE_GATT_HANDLE_END 0xFFFF + +/** @defgroup BLE_GATT_TIMEOUT_SOURCES GATT Timeout sources + * @{ */ +#define BLE_GATT_TIMEOUT_SRC_PROTOCOL 0x00 /**< ATT Protocol timeout. */ +/** @} */ + +/** @defgroup BLE_GATT_WRITE_OPS GATT Write operations + * @{ */ +#define BLE_GATT_OP_INVALID 0x00 /**< Invalid Operation. */ +#define BLE_GATT_OP_WRITE_REQ 0x01 /**< Write Request. */ +#define BLE_GATT_OP_WRITE_CMD 0x02 /**< Write Command. */ +#define BLE_GATT_OP_SIGN_WRITE_CMD 0x03 /**< Signed Write Command. */ +#define BLE_GATT_OP_PREP_WRITE_REQ 0x04 /**< Prepare Write Request. */ +#define BLE_GATT_OP_EXEC_WRITE_REQ 0x05 /**< Execute Write Request. */ +/** @} */ + +/** @defgroup BLE_GATT_EXEC_WRITE_FLAGS GATT Execute Write flags + * @{ */ +#define BLE_GATT_EXEC_WRITE_FLAG_PREPARED_CANCEL 0x00 +#define BLE_GATT_EXEC_WRITE_FLAG_PREPARED_WRITE 0x01 +/** @} */ + +/** @defgroup BLE_GATT_HVX_TYPES GATT Handle Value operations + * @{ */ +#define BLE_GATT_HVX_INVALID 0x00 /**< Invalid Operation. */ +#define BLE_GATT_HVX_NOTIFICATION 0x01 /**< Handle Value Notification. */ +#define BLE_GATT_HVX_INDICATION 0x02 /**< Handle Value Indication. */ +/** @} */ + +/** @defgroup BLE_GATT_STATUS_CODES GATT Status Codes + * @{ */ +#define BLE_GATT_STATUS_SUCCESS 0x0000 /**< Success. */ +#define BLE_GATT_STATUS_UNKNOWN 0x0001 /**< Unknown or not applicable status. */ +#define BLE_GATT_STATUS_ATTERR_INVALID 0x0100 /**< ATT Error: Invalid Error Code. */ +#define BLE_GATT_STATUS_ATTERR_INVALID_HANDLE 0x0101 /**< ATT Error: Invalid Attribute Handle. */ +#define BLE_GATT_STATUS_ATTERR_READ_NOT_PERMITTED 0x0102 /**< ATT Error: Read not permitted. */ +#define BLE_GATT_STATUS_ATTERR_WRITE_NOT_PERMITTED 0x0103 /**< ATT Error: Write not permitted. */ +#define BLE_GATT_STATUS_ATTERR_INVALID_PDU 0x0104 /**< ATT Error: Used in ATT as Invalid PDU. */ +#define BLE_GATT_STATUS_ATTERR_INSUF_AUTHENTICATION 0x0105 /**< ATT Error: Authenticated link required. */ +#define BLE_GATT_STATUS_ATTERR_REQUEST_NOT_SUPPORTED 0x0106 /**< ATT Error: Used in ATT as Request Not Supported. */ +#define BLE_GATT_STATUS_ATTERR_INVALID_OFFSET 0x0107 /**< ATT Error: Offset specified was past the end of the attribute. */ +#define BLE_GATT_STATUS_ATTERR_INSUF_AUTHORIZATION 0x0108 /**< ATT Error: Used in ATT as Insufficient Authorisation. */ +#define BLE_GATT_STATUS_ATTERR_PREPARE_QUEUE_FULL 0x0109 /**< ATT Error: Used in ATT as Prepare Queue Full. */ +#define BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND 0x010A /**< ATT Error: Used in ATT as Attribute not found. */ +#define BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_LONG 0x010B /**< ATT Error: Attribute cannot be read or written using read/write blob requests. */ +#define BLE_GATT_STATUS_ATTERR_INSUF_ENC_KEY_SIZE 0x010C /**< ATT Error: Encryption key size used is insufficient. */ +#define BLE_GATT_STATUS_ATTERR_INVALID_ATT_VAL_LENGTH 0x010D /**< ATT Error: Invalid value size. */ +#define BLE_GATT_STATUS_ATTERR_UNLIKELY_ERROR 0x010E /**< ATT Error: Very unlikely error. */ +#define BLE_GATT_STATUS_ATTERR_INSUF_ENCRYPTION 0x010F /**< ATT Error: Encrypted link required. */ +#define BLE_GATT_STATUS_ATTERR_UNSUPPORTED_GROUP_TYPE 0x0110 /**< ATT Error: Attribute type is not a supported grouping attribute. */ +#define BLE_GATT_STATUS_ATTERR_INSUF_RESOURCES 0x0111 /**< ATT Error: Encrypted link required. */ +#define BLE_GATT_STATUS_ATTERR_RFU_RANGE1_BEGIN 0x0112 /**< ATT Error: Reserved for Future Use range #1 begin. */ +#define BLE_GATT_STATUS_ATTERR_RFU_RANGE1_END 0x017F /**< ATT Error: Reserved for Future Use range #1 end. */ +#define BLE_GATT_STATUS_ATTERR_APP_BEGIN 0x0180 /**< ATT Error: Application range begin. */ +#define BLE_GATT_STATUS_ATTERR_APP_END 0x019F /**< ATT Error: Application range end. */ +#define BLE_GATT_STATUS_ATTERR_RFU_RANGE2_BEGIN 0x01A0 /**< ATT Error: Reserved for Future Use range #2 begin. */ +#define BLE_GATT_STATUS_ATTERR_RFU_RANGE2_END 0x01DF /**< ATT Error: Reserved for Future Use range #2 end. */ +#define BLE_GATT_STATUS_ATTERR_RFU_RANGE3_BEGIN 0x01E0 /**< ATT Error: Reserved for Future Use range #3 begin. */ +#define BLE_GATT_STATUS_ATTERR_RFU_RANGE3_END 0x01FC /**< ATT Error: Reserved for Future Use range #3 end. */ +#define BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR 0x01FD /**< ATT Common Profile and Service Error: Client Characteristic Configuration Descriptor improperly configured. */ +#define BLE_GATT_STATUS_ATTERR_CPS_PROC_ALR_IN_PROG 0x01FE /**< ATT Common Profile and Service Error: Procedure Already in Progress. */ +#define BLE_GATT_STATUS_ATTERR_CPS_OUT_OF_RANGE 0x01FF /**< ATT Common Profile and Service Error: Out Of Range. */ +/** @} */ + + +/** @defgroup BLE_GATT_CPF_FORMATS Characteristic Presentation Formats + * @note Found at http://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorViewer.aspx?u=org.bluetooth.descriptor.gatt.characteristic_presentation_format.xml + * @{ */ +#define BLE_GATT_CPF_FORMAT_RFU 0x00 /**< Reserved For Future Use. */ +#define BLE_GATT_CPF_FORMAT_BOOLEAN 0x01 /**< Boolean. */ +#define BLE_GATT_CPF_FORMAT_2BIT 0x02 /**< Unsigned 2-bit integer. */ +#define BLE_GATT_CPF_FORMAT_NIBBLE 0x03 /**< Unsigned 4-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT8 0x04 /**< Unsigned 8-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT12 0x05 /**< Unsigned 12-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT16 0x06 /**< Unsigned 16-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT24 0x07 /**< Unsigned 24-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT32 0x08 /**< Unsigned 32-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT48 0x09 /**< Unsigned 48-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT64 0x0A /**< Unsigned 64-bit integer. */ +#define BLE_GATT_CPF_FORMAT_UINT128 0x0B /**< Unsigned 128-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT8 0x0C /**< Signed 2-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT12 0x0D /**< Signed 12-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT16 0x0E /**< Signed 16-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT24 0x0F /**< Signed 24-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT32 0x10 /**< Signed 32-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT48 0x11 /**< Signed 48-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT64 0x12 /**< Signed 64-bit integer. */ +#define BLE_GATT_CPF_FORMAT_SINT128 0x13 /**< Signed 128-bit integer. */ +#define BLE_GATT_CPF_FORMAT_FLOAT32 0x14 /**< IEEE-754 32-bit floating point. */ +#define BLE_GATT_CPF_FORMAT_FLOAT64 0x15 /**< IEEE-754 64-bit floating point. */ +#define BLE_GATT_CPF_FORMAT_SFLOAT 0x16 /**< IEEE-11073 16-bit SFLOAT. */ +#define BLE_GATT_CPF_FORMAT_FLOAT 0x17 /**< IEEE-11073 32-bit FLOAT. */ +#define BLE_GATT_CPF_FORMAT_DUINT16 0x18 /**< IEEE-20601 format. */ +#define BLE_GATT_CPF_FORMAT_UTF8S 0x19 /**< UTF-8 string. */ +#define BLE_GATT_CPF_FORMAT_UTF16S 0x1A /**< UTF-16 string. */ +#define BLE_GATT_CPF_FORMAT_STRUCT 0x1B /**< Opaque Structure. */ +/** @} */ + +/** @defgroup BLE_GATT_CPF_NAMESPACES GATT Bluetooth Namespaces + * @{ + */ +#define BLE_GATT_CPF_NAMESPACE_BTSIG 0x01 /**< Bluetooth SIG defined Namespace. */ +#define BLE_GATT_CPF_NAMESPACE_DESCRIPTION_UNKNOWN 0x0000 /**< Namespace Description Unknown. */ +/** @} */ + +/** @} */ + +/** @addtogroup BLE_GATT_STRUCTURES Structures + * @{ */ + +/**@brief GATT Characteristic Properties. */ +typedef struct +{ + /* Standard properties */ + uint8_t broadcast :1; /**< Broadcasting of the value permitted. */ + uint8_t read :1; /**< Reading the value permitted. */ + uint8_t write_wo_resp :1; /**< Writing the value with Write Command permitted. */ + uint8_t write :1; /**< Writing the value with Write Request permitted. */ + uint8_t notify :1; /**< Notications of the value permitted. */ + uint8_t indicate :1; /**< Indications of the value permitted. */ + uint8_t auth_signed_wr :1; /**< Writing the value with Signed Write Command permitted. */ +} ble_gatt_char_props_t; + +/**@brief GATT Characteristic Extended Properties. */ +typedef struct +{ + /* Extended properties */ + uint8_t reliable_wr :1; /**< Writing the value with Queued Write operations permitted. */ + uint8_t wr_aux :1; /**< Writing the Characteristic User Description descriptor permitted. */ +} ble_gatt_char_ext_props_t; + +#ifdef __cplusplus +} +#endif +#endif // BLE_GATT_H__ + +/** @} */ + +/** + @} + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gattc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gattc.h new file mode 100644 index 0000000000..3515063a9b --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gattc.h @@ -0,0 +1,569 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 BLE_GATTC Generic Attribute Profile (GATT) Client + @{ + @brief Definitions and prototypes for the GATT Client interface. + */ + +#ifndef BLE_GATTC_H__ +#define BLE_GATTC_H__ + +#include "ble_gatt.h" +#include "ble_types.h" +#include "ble_ranges.h" +#include "nrf_svc.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup BLE_GATTC_ENUMERATIONS Enumerations + * @{ */ + +/**@brief GATTC API SVC numbers. */ +enum BLE_GATTC_SVCS +{ + SD_BLE_GATTC_PRIMARY_SERVICES_DISCOVER = BLE_GATTC_SVC_BASE, /**< Primary Service Discovery. */ + SD_BLE_GATTC_RELATIONSHIPS_DISCOVER, /**< Relationship Discovery. */ + SD_BLE_GATTC_CHARACTERISTICS_DISCOVER, /**< Characteristic Discovery. */ + SD_BLE_GATTC_DESCRIPTORS_DISCOVER, /**< Characteristic Descriptor Discovery. */ + SD_BLE_GATTC_ATTR_INFO_DISCOVER, /**< Attribute Information Discovery. */ + SD_BLE_GATTC_CHAR_VALUE_BY_UUID_READ, /**< Read Characteristic Value by UUID. */ + SD_BLE_GATTC_READ, /**< Generic read. */ + SD_BLE_GATTC_CHAR_VALUES_READ, /**< Read multiple Characteristic Values. */ + SD_BLE_GATTC_WRITE, /**< Generic write. */ + SD_BLE_GATTC_HV_CONFIRM, /**< Handle Value Confirmation. */ +}; + +/** + * @brief GATT Client Event IDs. + */ +enum BLE_GATTC_EVTS +{ + BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP = BLE_GATTC_EVT_BASE, /**< Primary Service Discovery Response event. \n See @ref ble_gattc_evt_prim_srvc_disc_rsp_t. */ + BLE_GATTC_EVT_REL_DISC_RSP, /**< Relationship Discovery Response event. \n See @ref ble_gattc_evt_rel_disc_rsp_t. */ + BLE_GATTC_EVT_CHAR_DISC_RSP, /**< Characteristic Discovery Response event. \n See @ref ble_gattc_evt_char_disc_rsp_t. */ + BLE_GATTC_EVT_DESC_DISC_RSP, /**< Descriptor Discovery Response event. \n See @ref ble_gattc_evt_desc_disc_rsp_t. */ + BLE_GATTC_EVT_ATTR_INFO_DISC_RSP, /**< Attribute Information Response event. \n See @ref ble_gattc_evt_attr_info_disc_rsp_t. */ + BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP, /**< Read By UUID Response event. \n See @ref ble_gattc_evt_char_val_by_uuid_read_rsp_t. */ + BLE_GATTC_EVT_READ_RSP, /**< Read Response event. \n See @ref ble_gattc_evt_read_rsp_t. */ + BLE_GATTC_EVT_CHAR_VALS_READ_RSP, /**< Read multiple Response event. \n See @ref ble_gattc_evt_char_vals_read_rsp_t. */ + BLE_GATTC_EVT_WRITE_RSP, /**< Write Response event. \n See @ref ble_gattc_evt_write_rsp_t. */ + BLE_GATTC_EVT_HVX, /**< Handle Value Notification or Indication event. \n Confirm indication with @ref sd_ble_gattc_hv_confirm. \n See @ref ble_gattc_evt_hvx_t. */ + BLE_GATTC_EVT_TIMEOUT /**< Timeout event. \n See @ref ble_gattc_evt_timeout_t. */ +}; + +/** @} */ + +/** @addtogroup BLE_GATTC_DEFINES Defines + * @{ */ + +/** @defgroup BLE_ERRORS_GATTC SVC return values specific to GATTC + * @{ */ +#define BLE_ERROR_GATTC_PROC_NOT_PERMITTED (NRF_GATTC_ERR_BASE + 0x000) /**< Procedure not Permitted. */ +/** @} */ + +/** @defgroup BLE_GATTC_ATTR_INFO_FORMAT Attribute Information Formats + * @{ */ +#define BLE_GATTC_ATTR_INFO_FORMAT_16BIT 1 /**< 16-bit Attribute Information Format. */ +#define BLE_GATTC_ATTR_INFO_FORMAT_128BIT 2 /**< 128-bit Attribute Information Format. */ +/** @} */ + +/** @} */ + +/** @addtogroup BLE_GATTC_STRUCTURES Structures + * @{ */ + +/**@brief Operation Handle Range. */ +typedef struct +{ + uint16_t start_handle; /**< Start Handle. */ + uint16_t end_handle; /**< End Handle. */ +} ble_gattc_handle_range_t; + + +/**@brief GATT service. */ +typedef struct +{ + ble_uuid_t uuid; /**< Service UUID. */ + ble_gattc_handle_range_t handle_range; /**< Service Handle Range. */ +} ble_gattc_service_t; + + +/**@brief GATT include. */ +typedef struct +{ + uint16_t handle; /**< Include Handle. */ + ble_gattc_service_t included_srvc; /**< Handle of the included service. */ +} ble_gattc_include_t; + + +/**@brief GATT characteristic. */ +typedef struct +{ + ble_uuid_t uuid; /**< Characteristic UUID. */ + ble_gatt_char_props_t char_props; /**< Characteristic Properties. */ + uint8_t char_ext_props : 1; /**< Extended properties present. */ + uint16_t handle_decl; /**< Handle of the Characteristic Declaration. */ + uint16_t handle_value; /**< Handle of the Characteristic Value. */ +} ble_gattc_char_t; + + +/**@brief GATT descriptor. */ +typedef struct +{ + uint16_t handle; /**< Descriptor Handle. */ + ble_uuid_t uuid; /**< Descriptor UUID. */ +} ble_gattc_desc_t; + + +/**@brief Write Parameters. */ +typedef struct +{ + uint8_t write_op; /**< Write Operation to be performed, see @ref BLE_GATT_WRITE_OPS. */ + uint8_t flags; /**< Flags, see @ref BLE_GATT_EXEC_WRITE_FLAGS. */ + uint16_t handle; /**< Handle to the attribute to be written. */ + uint16_t offset; /**< Offset in bytes. @note For WRITE_CMD and WRITE_REQ, offset must be 0. */ + uint16_t len; /**< Length of data in bytes. */ + uint8_t *p_value; /**< Pointer to the value data. */ +} ble_gattc_write_params_t; + +/**@brief Attribute Information. */ +typedef struct +{ + uint16_t handle; /**< Attribute handle. */ + union { + ble_uuid_t uuid16; /**< 16-bit Attribute UUID. */ + ble_uuid128_t uuid128; /**< 128-bit Attribute UUID. */ + } info; +} ble_gattc_attr_info_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP. */ +typedef struct +{ + uint16_t count; /**< Service count. */ + ble_gattc_service_t services[1]; /**< Service data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gattc_evt_prim_srvc_disc_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_REL_DISC_RSP. */ +typedef struct +{ + uint16_t count; /**< Include count. */ + ble_gattc_include_t includes[1]; /**< Include data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gattc_evt_rel_disc_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_CHAR_DISC_RSP. */ +typedef struct +{ + uint16_t count; /**< Characteristic count. */ + ble_gattc_char_t chars[1]; /**< Characteristic data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gattc_evt_char_disc_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_DESC_DISC_RSP. */ +typedef struct +{ + uint16_t count; /**< Descriptor count. */ + ble_gattc_desc_t descs[1]; /**< Descriptor data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gattc_evt_desc_disc_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_ATTR_INFO_DISC_RSP. */ +typedef struct +{ + uint16_t count; /**< Attribute count. */ + uint8_t format; /**< Attribute information format, see @ref BLE_GATTC_ATTR_INFO_FORMAT. */ + ble_gattc_attr_info_t attr_info[1]; /**< Attribute information. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gattc_evt_attr_info_disc_rsp_t; + +/**@brief GATT read by UUID handle value pair. */ +typedef struct +{ + uint16_t handle; /**< Attribute Handle. */ + uint8_t *p_value; /**< Pointer to value, variable length (length available as value_len in @ref ble_gattc_evt_char_val_by_uuid_read_rsp_t). + Please note that this pointer is absolute to the memory provided by the user when retrieving the event, + so it will effectively point to a location inside the handle_value array. */ +} ble_gattc_handle_value_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP. */ +typedef struct +{ + uint16_t count; /**< Handle-Value Pair Count. */ + uint16_t value_len; /**< Length of the value in Handle-Value(s) list. */ + ble_gattc_handle_value_t handle_value[1]; /**< Handle-Value(s) list. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gattc_evt_char_val_by_uuid_read_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_READ_RSP. */ +typedef struct +{ + uint16_t handle; /**< Attribute Handle. */ + uint16_t offset; /**< Offset of the attribute data. */ + uint16_t len; /**< Attribute data length. */ + uint8_t data[1]; /**< Attribute data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gattc_evt_read_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_CHAR_VALS_READ_RSP. */ +typedef struct +{ + uint16_t len; /**< Concatenated Attribute values length. */ + uint8_t values[1]; /**< Attribute values. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gattc_evt_char_vals_read_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_WRITE_RSP. */ +typedef struct +{ + uint16_t handle; /**< Attribute Handle. */ + uint8_t write_op; /**< Type of write operation, see @ref BLE_GATT_WRITE_OPS. */ + uint16_t offset; /**< Data offset. */ + uint16_t len; /**< Data length. */ + uint8_t data[1]; /**< Data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gattc_evt_write_rsp_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_HVX. */ +typedef struct +{ + uint16_t handle; /**< Handle to which the HVx operation applies. */ + uint8_t type; /**< Indication or Notification, see @ref BLE_GATT_HVX_TYPES. */ + uint16_t len; /**< Attribute data length. */ + uint8_t data[1]; /**< Attribute data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gattc_evt_hvx_t; + +/**@brief Event structure for @ref BLE_GATTC_EVT_TIMEOUT. */ +typedef struct +{ + uint8_t src; /**< Timeout source, see @ref BLE_GATT_TIMEOUT_SOURCES. */ +} ble_gattc_evt_timeout_t; + +/**@brief GATTC event structure. */ +typedef struct +{ + uint16_t conn_handle; /**< Connection Handle on which event occured. */ + uint16_t gatt_status; /**< GATT status code for the operation, see @ref BLE_GATT_STATUS_CODES. */ + uint16_t error_handle; /**< In case of error: The handle causing the error. In all other cases @ref BLE_GATT_HANDLE_INVALID. */ + union + { + ble_gattc_evt_prim_srvc_disc_rsp_t prim_srvc_disc_rsp; /**< Primary Service Discovery Response Event Parameters. */ + ble_gattc_evt_rel_disc_rsp_t rel_disc_rsp; /**< Relationship Discovery Response Event Parameters. */ + ble_gattc_evt_char_disc_rsp_t char_disc_rsp; /**< Characteristic Discovery Response Event Parameters. */ + ble_gattc_evt_desc_disc_rsp_t desc_disc_rsp; /**< Descriptor Discovery Response Event Parameters. */ + ble_gattc_evt_char_val_by_uuid_read_rsp_t char_val_by_uuid_read_rsp; /**< Characteristic Value Read by UUID Response Event Parameters. */ + ble_gattc_evt_read_rsp_t read_rsp; /**< Read Response Event Parameters. */ + ble_gattc_evt_char_vals_read_rsp_t char_vals_read_rsp; /**< Characteristic Values Read Response Event Parameters. */ + ble_gattc_evt_write_rsp_t write_rsp; /**< Write Response Event Parameters. */ + ble_gattc_evt_hvx_t hvx; /**< Handle Value Notification/Indication Event Parameters. */ + ble_gattc_evt_timeout_t timeout; /**< Timeout Event Parameters. */ + ble_gattc_evt_attr_info_disc_rsp_t attr_info_disc_rsp; /**< Attribute Information Discovery Event Parameters. */ + } params; /**< Event Parameters. @note Only valid if @ref gatt_status == @ref BLE_GATT_STATUS_SUCCESS. */ +} ble_gattc_evt_t; +/** @} */ + +/** @addtogroup BLE_GATTC_FUNCTIONS Functions + * @{ */ + +/**@brief Initiate or continue a GATT Primary Service Discovery procedure. + * + * @details This function initiates or resumes a Primary Service discovery procedure, starting from the supplied handle. + * If the last service has not been reached, this function must be called again with an updated start handle value to continue the search. + * + * @note If any of the discovered services have 128-bit UUIDs which are not present in the table provided to ble_vs_uuids_assign, a UUID structure with + * type @ref BLE_UUID_TYPE_UNKNOWN will be received in the corresponding event. + * + * @events + * @event{@ref BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_PRIM_SRVC_DISC_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] start_handle Handle to start searching from. + * @param[in] p_srvc_uuid Pointer to the service UUID to be found. If it is NULL, all primary services will be returned. + * + * @retval ::NRF_SUCCESS Successfully started or resumed the Primary Service Discovery procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + */ +SVCALL(SD_BLE_GATTC_PRIMARY_SERVICES_DISCOVER, uint32_t, sd_ble_gattc_primary_services_discover(uint16_t conn_handle, uint16_t start_handle, ble_uuid_t const *p_srvc_uuid)); + + +/**@brief Initiate or continue a GATT Relationship Discovery procedure. + * + * @details This function initiates or resumes the Find Included Services sub-procedure. If the last included service has not been reached, + * this must be called again with an updated handle range to continue the search. + * + * @events + * @event{@ref BLE_GATTC_EVT_REL_DISC_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_REL_DISC_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on. + * + * @retval ::NRF_SUCCESS Successfully started or resumed the Relationship Discovery procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + */ +SVCALL(SD_BLE_GATTC_RELATIONSHIPS_DISCOVER, uint32_t, sd_ble_gattc_relationships_discover(uint16_t conn_handle, ble_gattc_handle_range_t const *p_handle_range)); + + +/**@brief Initiate or continue a GATT Characteristic Discovery procedure. + * + * @details This function initiates or resumes a Characteristic discovery procedure. If the last Characteristic has not been reached, + * this must be called again with an updated handle range to continue the discovery. + * + * @note If any of the discovered characteristics have 128-bit UUIDs which are not present in the table provided to ble_vs_uuids_assign, a UUID structure with + * type @ref BLE_UUID_TYPE_UNKNOWN will be received in the corresponding event. + * + * @events + * @event{@ref BLE_GATTC_EVT_CHAR_DISC_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_CHAR_DISC_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on. + * + * @retval ::NRF_SUCCESS Successfully started or resumed the Characteristic Discovery procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + */ +SVCALL(SD_BLE_GATTC_CHARACTERISTICS_DISCOVER, uint32_t, sd_ble_gattc_characteristics_discover(uint16_t conn_handle, ble_gattc_handle_range_t const *p_handle_range)); + + +/**@brief Initiate or continue a GATT Characteristic Descriptor Discovery procedure. + * + * @details This function initiates or resumes a Characteristic Descriptor discovery procedure. If the last Descriptor has not been reached, + * this must be called again with an updated handle range to continue the discovery. + * + * @events + * @event{BLE_GATTC_EVT_DESC_DISC_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_DESC_DISC_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] p_handle_range A pointer to the range of handles of the Characteristic to perform this procedure on. + * + * @retval ::NRF_SUCCESS Successfully started or resumed the Descriptor Discovery procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + */ +SVCALL(SD_BLE_GATTC_DESCRIPTORS_DISCOVER, uint32_t, sd_ble_gattc_descriptors_discover(uint16_t conn_handle, ble_gattc_handle_range_t const *p_handle_range)); + + +/**@brief Initiate or continue a GATT Read using Characteristic UUID procedure. + * + * @details This function initiates or resumes a Read using Characteristic UUID procedure. If the last Characteristic has not been reached, + * this must be called again with an updated handle range to continue the discovery. + * + * @events + * @event{BLE_GATTC_EVT_DESC_DISC_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_READ_UUID_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] p_uuid Pointer to a Characteristic value UUID to read. + * @param[in] p_handle_range A pointer to the range of handles to perform this procedure on. + * + * @retval ::NRF_SUCCESS Successfully started or resumed the Read using Characteristic UUID procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + */ +SVCALL(SD_BLE_GATTC_CHAR_VALUE_BY_UUID_READ, uint32_t, sd_ble_gattc_char_value_by_uuid_read(uint16_t conn_handle, ble_uuid_t const *p_uuid, ble_gattc_handle_range_t const *p_handle_range)); + + +/**@brief Initiate or continue a GATT Read (Long) Characteristic or Descriptor procedure. + * + * @details This function initiates or resumes a GATT Read (Long) Characteristic or Descriptor procedure. If the Characteristic or Descriptor + * to be read is longer than ATT_MTU - 1, this function must be called multiple times with appropriate offset to read the + * complete value. + * + * @events + * @event{@ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_VALUE_READ_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] handle The handle of the attribute to be read. + * @param[in] offset Offset into the attribute value to be read. + * + * @retval ::NRF_SUCCESS Successfully started or resumed the Read (Long) procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + */ +SVCALL(SD_BLE_GATTC_READ, uint32_t, sd_ble_gattc_read(uint16_t conn_handle, uint16_t handle, uint16_t offset)); + + +/**@brief Initiate a GATT Read Multiple Characteristic Values procedure. + * + * @details This function initiates a GATT Read Multiple Characteristic Values procedure. + * + * @events + * @event{@ref BLE_GATTC_EVT_CHAR_VALS_READ_RSP} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_READ_MULT_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] p_handles A pointer to the handle(s) of the attribute(s) to be read. + * @param[in] handle_count The number of handles in p_handles. + * + * @retval ::NRF_SUCCESS Successfully started the Read Multiple Characteristic Values procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + */ +SVCALL(SD_BLE_GATTC_CHAR_VALUES_READ, uint32_t, sd_ble_gattc_char_values_read(uint16_t conn_handle, uint16_t const *p_handles, uint16_t handle_count)); + + +/**@brief Perform a Write (Characteristic Value or Descriptor, with or without response, signed or not, long or reliable) procedure. + * + * @details This function can perform all write procedures described in GATT. + * + * @note It is important to note that a write without response will consume an application buffer, and will therefore + * generate a @ref BLE_EVT_TX_COMPLETE event when the packet has been transmitted. A write (with response) on the other hand will use the + * standard client internal buffer and thus will only generate a @ref BLE_GATTC_EVT_WRITE_RSP event as soon as the write response + * has been received from the peer. Please see the documentation of @ref sd_ble_tx_packet_count_get for more details. + * + * @events + * @event{@ref BLE_GATTC_EVT_WRITE_RSP, Generated when using write request or queued writes.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTC_VALUE_WRITE_MSC} + * @mmsc{@ref BLE_GATTC_VALUE_LONG_WRITE_MSC} + * @mmsc{@ref BLE_GATTC_VALUE_RELIABLE_WRITE_MSC} + * @mmsc{@ref BLE_COMMON_APP_BUFF_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] p_write_params A pointer to a write parameters structure. + * + * @retval ::NRF_SUCCESS Successfully started the Write procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied. + * @retval ::NRF_ERROR_BUSY Procedure already in progress. + * @retval ::BLE_ERROR_NO_TX_PACKETS No available application packets for this connection. + */ +SVCALL(SD_BLE_GATTC_WRITE, uint32_t, sd_ble_gattc_write(uint16_t conn_handle, ble_gattc_write_params_t const *p_write_params)); + + +/**@brief Send a Handle Value Confirmation to the GATT Server. + * + * @mscs + * @mmsc{@ref BLE_GATTC_HVI_MSC} + * @endmscs + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] handle The handle of the attribute in the indication. + * + * @retval ::NRF_SUCCESS Successfully queued the Handle Value Confirmation for transmission. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State or no Indication pending to be confirmed. + * @retval ::BLE_ERROR_INVALID_ATTR_HANDLE Invalid attribute handle. + */ +SVCALL(SD_BLE_GATTC_HV_CONFIRM, uint32_t, sd_ble_gattc_hv_confirm(uint16_t conn_handle, uint16_t handle)); + +/**@brief Discovers information about a range of attributes on a GATT server. + * + * @events + * @event{@ref BLE_GATTC_EVT_ATTR_INFO_DISC_RSP, Generated when information about a range of attributes has been received.} + * @endevents + * + * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. + * @param[in] p_handle_range The range of handles to request information about. + * + * @retval ::NRF_SUCCESS Successfully started an attribute information discovery procedure. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid connection state + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_BUSY Client procedure already in progress. + */ +SVCALL(SD_BLE_GATTC_ATTR_INFO_DISCOVER, uint32_t, sd_ble_gattc_attr_info_discover(uint16_t conn_handle, ble_gattc_handle_range_t const * p_handle_range)); + +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif /* BLE_GATTC_H__ */ + +/** + @} + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gatts.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gatts.h new file mode 100644 index 0000000000..93db0b35c2 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gatts.h @@ -0,0 +1,722 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 BLE_GATTS Generic Attribute Profile (GATT) Server + @{ + @brief Definitions and prototypes for the GATTS interface. + */ + +#ifndef BLE_GATTS_H__ +#define BLE_GATTS_H__ + +#include "ble_types.h" +#include "ble_ranges.h" +#include "ble_l2cap.h" +#include "ble_gap.h" +#include "ble_gatt.h" +#include "nrf_svc.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup BLE_GATTS_ENUMERATIONS Enumerations + * @{ */ + +/** + * @brief GATTS API SVC numbers. + */ +enum BLE_GATTS_SVCS +{ + SD_BLE_GATTS_SERVICE_ADD = BLE_GATTS_SVC_BASE, /**< Add a service. */ + SD_BLE_GATTS_INCLUDE_ADD, /**< Add an included service. */ + SD_BLE_GATTS_CHARACTERISTIC_ADD, /**< Add a characteristic. */ + SD_BLE_GATTS_DESCRIPTOR_ADD, /**< Add a generic attribute. */ + SD_BLE_GATTS_VALUE_SET, /**< Set an attribute value. */ + SD_BLE_GATTS_VALUE_GET, /**< Get an attribute value. */ + SD_BLE_GATTS_HVX, /**< Handle Value Notification or Indication. */ + SD_BLE_GATTS_SERVICE_CHANGED, /**< Perform a Service Changed Indication to one or more peers. */ + SD_BLE_GATTS_RW_AUTHORIZE_REPLY, /**< Reply to an authorization request for a read or write operation on one or more attributes. */ + SD_BLE_GATTS_SYS_ATTR_SET, /**< Set the persistent system attributes for a connection. */ + SD_BLE_GATTS_SYS_ATTR_GET, /**< Retrieve the persistent system attributes. */ + SD_BLE_GATTS_INITIAL_USER_HANDLE_GET, /**< Retrieve the first valid user handle. */ + SD_BLE_GATTS_ATTR_GET /**< Retrieve the UUID and/or metadata of an attribute. */ +}; + +/** + * @brief GATT Server Event IDs. + */ +enum BLE_GATTS_EVTS +{ + BLE_GATTS_EVT_WRITE = BLE_GATTS_EVT_BASE, /**< Write operation performed. \n See @ref ble_gatts_evt_write_t. */ + BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST, /**< Read/Write Authorization request. \n Reply with @ref sd_ble_gatts_rw_authorize_reply. \n See @ref ble_gatts_evt_rw_authorize_request_t. */ + BLE_GATTS_EVT_SYS_ATTR_MISSING, /**< A persistent system attribute access is pending. \n Respond with @ref sd_ble_gatts_sys_attr_set. \n See @ref ble_gatts_evt_sys_attr_missing_t. */ + BLE_GATTS_EVT_HVC, /**< Handle Value Confirmation. \n See @ref ble_gatts_evt_hvc_t. */ + BLE_GATTS_EVT_SC_CONFIRM, /**< Service Changed Confirmation. No additional event structure applies. */ + BLE_GATTS_EVT_TIMEOUT /**< Peer failed to resonpond to an ATT request in time. \n See @ref ble_gatts_evt_timeout_t. */ +}; +/** @} */ + +/** @addtogroup BLE_GATTS_DEFINES Defines + * @{ */ + +/** @defgroup BLE_ERRORS_GATTS SVC return values specific to GATTS + * @{ */ +#define BLE_ERROR_GATTS_INVALID_ATTR_TYPE (NRF_GATTS_ERR_BASE + 0x000) /**< Invalid attribute type. */ +#define BLE_ERROR_GATTS_SYS_ATTR_MISSING (NRF_GATTS_ERR_BASE + 0x001) /**< System Attributes missing. */ +/** @} */ + +/** @defgroup BLE_GATTS_ATTR_LENS_MAX Maximum attribute lengths + * @{ */ +#define BLE_GATTS_FIX_ATTR_LEN_MAX (510) /**< Maximum length for fixed length Attribute Values. */ +#define BLE_GATTS_VAR_ATTR_LEN_MAX (512) /**< Maximum length for variable length Attribute Values. */ +/** @} */ + +/** @defgroup BLE_GATTS_SRVC_TYPES GATT Server Service Types + * @{ */ +#define BLE_GATTS_SRVC_TYPE_INVALID 0x00 /**< Invalid Service Type. */ +#define BLE_GATTS_SRVC_TYPE_PRIMARY 0x01 /**< Primary Service. */ +#define BLE_GATTS_SRVC_TYPE_SECONDARY 0x02 /**< Secondary Type. */ +/** @} */ + + +/** @defgroup BLE_GATTS_ATTR_TYPES GATT Server Attribute Types + * @{ */ +#define BLE_GATTS_ATTR_TYPE_INVALID 0x00 /**< Invalid Attribute Type. */ +#define BLE_GATTS_ATTR_TYPE_PRIM_SRVC_DECL 0x01 /**< Primary Service Declaration. */ +#define BLE_GATTS_ATTR_TYPE_SEC_SRVC_DECL 0x02 /**< Secondary Service Declaration. */ +#define BLE_GATTS_ATTR_TYPE_INC_DECL 0x03 /**< Include Declaration. */ +#define BLE_GATTS_ATTR_TYPE_CHAR_DECL 0x04 /**< Characteristic Declaration. */ +#define BLE_GATTS_ATTR_TYPE_CHAR_VAL 0x05 /**< Characteristic Value. */ +#define BLE_GATTS_ATTR_TYPE_DESC 0x06 /**< Descriptor. */ +#define BLE_GATTS_ATTR_TYPE_OTHER 0x07 /**< Other, non-GATT specific type. */ +/** @} */ + + +/** @defgroup BLE_GATTS_OPS GATT Server Operations + * @{ */ +#define BLE_GATTS_OP_INVALID 0x00 /**< Invalid Operation. */ +#define BLE_GATTS_OP_WRITE_REQ 0x01 /**< Write Request. */ +#define BLE_GATTS_OP_WRITE_CMD 0x02 /**< Write Command. */ +#define BLE_GATTS_OP_SIGN_WRITE_CMD 0x03 /**< Signed Write Command. */ +#define BLE_GATTS_OP_PREP_WRITE_REQ 0x04 /**< Prepare Write Request. */ +#define BLE_GATTS_OP_EXEC_WRITE_REQ_CANCEL 0x05 /**< Execute Write Request: Cancel all prepared writes. */ +#define BLE_GATTS_OP_EXEC_WRITE_REQ_NOW 0x06 /**< Execute Write Request: Immediately execute all prepared writes. */ +/** @} */ + +/** @defgroup BLE_GATTS_VLOCS GATT Value Locations + * @{ */ +#define BLE_GATTS_VLOC_INVALID 0x00 /**< Invalid Location. */ +#define BLE_GATTS_VLOC_STACK 0x01 /**< Attribute Value is located in stack memory, no user memory is required. */ +#define BLE_GATTS_VLOC_USER 0x02 /**< Attribute Value is located in user memory. This requires the user to maintain a valid buffer through the lifetime of the attribute, since the stack + will read and write directly to the memory using the pointer provided in the APIs. There are no alignment requirements for the buffer. */ +/** @} */ + +/** @defgroup BLE_GATTS_AUTHORIZE_TYPES GATT Server Authorization Types + * @{ */ +#define BLE_GATTS_AUTHORIZE_TYPE_INVALID 0x00 /**< Invalid Type. */ +#define BLE_GATTS_AUTHORIZE_TYPE_READ 0x01 /**< Authorize a Read Operation. */ +#define BLE_GATTS_AUTHORIZE_TYPE_WRITE 0x02 /**< Authorize a Write Request Operation. */ +/** @} */ + +/** @defgroup BLE_GATTS_SYS_ATTR_FLAGS System Attribute Flags + * @{ */ +#define BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS (1 << 0) /**< Restrict system attributes to system services only. */ +#define BLE_GATTS_SYS_ATTR_FLAG_USR_SRVCS (1 << 1) /**< Restrict system attributes to user services only. */ +/** @} */ + +/** @defgroup BLE_GATTS_ATTR_TAB_SIZE Attribute Table size + * @{ + */ +#define BLE_GATTS_ATTR_TAB_SIZE_MIN 216 /**< Minimum Attribute Table size */ +#define BLE_GATTS_ATTR_TAB_SIZE_DEFAULT 0x0000 /**< Default Attribute Table size (0x580 bytes for this version of the SoftDevice). */ +/** @} */ + +/** @} */ + +/** @addtogroup BLE_GATTS_STRUCTURES Structures + * @{ */ + +/** + * @brief BLE GATTS initialization parameters. + */ +typedef struct +{ + uint8_t service_changed:1; /**< Include the Service Changed characteristic in the Attribute Table. */ + uint32_t attr_tab_size; /**< Attribute Table size in bytes. The size must be a multiple of 4. @ref BLE_GATTS_ATTR_TAB_SIZE_DEFAULT is used to set the default size. */ +} ble_gatts_enable_params_t; + +/**@brief Attribute metadata. */ +typedef struct +{ + ble_gap_conn_sec_mode_t read_perm; /**< Read permissions. */ + ble_gap_conn_sec_mode_t write_perm; /**< Write permissions. */ + uint8_t vlen :1; /**< Variable length attribute. */ + uint8_t vloc :2; /**< Value location, see @ref BLE_GATTS_VLOCS.*/ + uint8_t rd_auth :1; /**< Read authorization and value will be requested from the application on every read operation. */ + uint8_t wr_auth :1; /**< Write authorization will be requested from the application on every Write Request operation (but not Write Command). */ +} ble_gatts_attr_md_t; + + +/**@brief GATT Attribute. */ +typedef struct +{ + ble_uuid_t *p_uuid; /**< Pointer to the attribute UUID. */ + ble_gatts_attr_md_t *p_attr_md; /**< Pointer to the attribute metadata structure. */ + uint16_t init_len; /**< Initial attribute value length in bytes. */ + uint16_t init_offs; /**< Initial attribute value offset in bytes. If different from zero, the first init_offs bytes of the attribute value will be left uninitialized. */ + uint16_t max_len; /**< Maximum attribute value length in bytes, see @ref BLE_GATTS_ATTR_LENS_MAX for maximum values. */ + uint8_t* p_value; /**< Pointer to the attribute data. Please note that if the @ref BLE_GATTS_VLOC_USER value location is selected in the attribute metadata, this will have to point to a buffer + that remains valid through the lifetime of the attribute. This excludes usage of automatic variables that may go out of scope or any other temporary location. + The stack may access that memory directly without the application's knowledge. For writable characteristics, this value must not be a location in flash memory.*/ +} ble_gatts_attr_t; + +/**@brief GATT Attribute Value. */ +typedef struct +{ + uint16_t len; /**< Length in bytes to be written or read. Length in bytes written or read after successful return.*/ + uint16_t offset; /**< Attribute value offset. */ + uint8_t *p_value; /**< Pointer to where value is stored or will be stored. + If value is stored in user memory, only the attribute length is updated when p_value == NULL. + Set to NULL when reading to obtain the complete length of the attribute value */ +} ble_gatts_value_t; + + +/**@brief GATT Characteristic Presentation Format. */ +typedef struct +{ + uint8_t format; /**< Format of the value, see @ref BLE_GATT_CPF_FORMATS. */ + int8_t exponent; /**< Exponent for integer data types. */ + uint16_t unit; /**< Unit from Bluetooth Assigned Numbers. */ + uint8_t name_space; /**< Namespace from Bluetooth Assigned Numbers, see @ref BLE_GATT_CPF_NAMESPACES. */ + uint16_t desc; /**< Namespace description from Bluetooth Assigned Numbers, see @ref BLE_GATT_CPF_NAMESPACES. */ +} ble_gatts_char_pf_t; + + +/**@brief GATT Characteristic metadata. */ +typedef struct +{ + ble_gatt_char_props_t char_props; /**< Characteristic Properties. */ + ble_gatt_char_ext_props_t char_ext_props; /**< Characteristic Extended Properties. */ + uint8_t *p_char_user_desc; /**< Pointer to a UTF-8 encoded string (non-NULL terminated), NULL if the descriptor is not required. */ + uint16_t char_user_desc_max_size; /**< The maximum size in bytes of the user description descriptor. */ + uint16_t char_user_desc_size; /**< The size of the user description, must be smaller or equal to char_user_desc_max_size. */ + ble_gatts_char_pf_t* p_char_pf; /**< Pointer to a presentation format structure or NULL if the CPF descriptor is not required. */ + ble_gatts_attr_md_t* p_user_desc_md; /**< Attribute metadata for the User Description descriptor, or NULL for default values. */ + ble_gatts_attr_md_t* p_cccd_md; /**< Attribute metadata for the Client Characteristic Configuration Descriptor, or NULL for default values. */ + ble_gatts_attr_md_t* p_sccd_md; /**< Attribute metadata for the Server Characteristic Configuration Descriptor, or NULL for default values. */ +} ble_gatts_char_md_t; + + +/**@brief GATT Characteristic Definition Handles. */ +typedef struct +{ + uint16_t value_handle; /**< Handle to the characteristic value. */ + uint16_t user_desc_handle; /**< Handle to the User Description descriptor, or @ref BLE_GATT_HANDLE_INVALID if not present. */ + uint16_t cccd_handle; /**< Handle to the Client Characteristic Configuration Descriptor, or @ref BLE_GATT_HANDLE_INVALID if not present. */ + uint16_t sccd_handle; /**< Handle to the Server Characteristic Configuration Descriptor, or @ref BLE_GATT_HANDLE_INVALID if not present. */ +} ble_gatts_char_handles_t; + + +/**@brief GATT HVx parameters. */ +typedef struct +{ + uint16_t handle; /**< Characteristic Value Handle. */ + uint8_t type; /**< Indication or Notification, see @ref BLE_GATT_HVX_TYPES. */ + uint16_t offset; /**< Offset within the attribute value. */ + uint16_t *p_len; /**< Length in bytes to be written, length in bytes written after successful return. */ + uint8_t *p_data; /**< Actual data content, use NULL to use the current attribute value. */ +} ble_gatts_hvx_params_t; + +/**@brief GATT Authorization parameters. */ +typedef struct +{ + uint16_t gatt_status; /**< GATT status code for the operation, see @ref BLE_GATT_STATUS_CODES. */ + uint8_t update : 1; /**< If set, data supplied in p_data will be used to update the attribute value. + Please note that for @ref BLE_GATTS_OP_WRITE_REQ operations this bit must always be set, + as the data to be written needs to be stored and later provided by the application. */ + uint16_t offset; /**< Offset of the attribute value being updated. */ + uint16_t len; /**< Length in bytes of the value in p_data pointer, see @ref BLE_GATTS_ATTR_LENS_MAX. */ + const uint8_t *p_data; /**< Pointer to new value used to update the attribute value. */ +} ble_gatts_authorize_params_t; + +/**@brief GATT Read or Write Authorize Reply parameters. */ +typedef struct +{ + uint8_t type; /**< Type of authorize operation, see @ref BLE_GATTS_AUTHORIZE_TYPES. */ + union { + ble_gatts_authorize_params_t read; /**< Read authorization parameters. */ + ble_gatts_authorize_params_t write; /**< Write authorization parameters. */ + } params; /**< Reply Parameters. */ +} ble_gatts_rw_authorize_reply_params_t; + + + +/**@brief Event structure for @ref BLE_GATTS_EVT_WRITE. */ +typedef struct +{ + uint16_t handle; /**< Attribute Handle. */ + ble_uuid_t uuid; /**< Attribute UUID. */ + uint8_t op; /**< Type of write operation, see @ref BLE_GATTS_OPS. */ + uint8_t auth_required; /**< Writing operation deferred due to authorization requirement. Application may use @ref sd_ble_gatts_value_set to finalise the writing operation. */ + uint16_t offset; /**< Offset for the write operation. */ + uint16_t len; /**< Length of the received data. */ + uint8_t data[1]; /**< Received data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_gatts_evt_write_t; + +/**@brief Event substructure for authorized read requests, see @ref ble_gatts_evt_rw_authorize_request_t. */ +typedef struct +{ + uint16_t handle; /**< Attribute Handle. */ + ble_uuid_t uuid; /**< Attribute UUID. */ + uint16_t offset; /**< Offset for the read operation. */ +} ble_gatts_evt_read_t; + +/**@brief Event structure for @ref BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST. */ +typedef struct +{ + uint8_t type; /**< Type of authorize operation, see @ref BLE_GATTS_AUTHORIZE_TYPES. */ + union { + ble_gatts_evt_read_t read; /**< Attribute Read Parameters. */ + ble_gatts_evt_write_t write; /**< Attribute Write Parameters. */ + } request; /**< Request Parameters. */ +} ble_gatts_evt_rw_authorize_request_t; + +/**@brief Event structure for @ref BLE_GATTS_EVT_SYS_ATTR_MISSING. */ +typedef struct +{ + uint8_t hint; /**< Hint (currently unused). */ +} ble_gatts_evt_sys_attr_missing_t; + + +/**@brief Event structure for @ref BLE_GATTS_EVT_HVC. */ +typedef struct +{ + uint16_t handle; /**< Attribute Handle. */ +} ble_gatts_evt_hvc_t; + +/**@brief Event structure for @ref BLE_GATTS_EVT_TIMEOUT. */ +typedef struct +{ + uint8_t src; /**< Timeout source, see @ref BLE_GATT_TIMEOUT_SOURCES. */ +} ble_gatts_evt_timeout_t; + + +/**@brief GATT Server event callback event structure. */ +typedef struct +{ + uint16_t conn_handle; /**< Connection Handle on which the event occurred. */ + union + { + ble_gatts_evt_write_t write; /**< Write Event Parameters. */ + ble_gatts_evt_rw_authorize_request_t authorize_request; /**< Read or Write Authorize Request Parameters. */ + ble_gatts_evt_sys_attr_missing_t sys_attr_missing; /**< System attributes missing. */ + ble_gatts_evt_hvc_t hvc; /**< Handle Value Confirmation Event Parameters. */ + ble_gatts_evt_timeout_t timeout; /**< Timeout Event. */ + } params; /**< Event Parameters. */ +} ble_gatts_evt_t; + +/** @} */ + +/** @addtogroup BLE_GATTS_FUNCTIONS Functions + * @{ */ + +/**@brief Add a service declaration to the Attribute Table. + * + * @note Secondary Services are only relevant in the context of the entity that references them, it is therefore forbidden to + * add a secondary service declaration that is not referenced by another service later in the Attribute Table. + * + * @mscs + * @mmsc{@ref BLE_GATTS_ATT_TABLE_POP_MSC} + * @endmscs + * + * @param[in] type Toggles between primary and secondary services, see @ref BLE_GATTS_SRVC_TYPES. + * @param[in] p_uuid Pointer to service UUID. + * @param[out] p_handle Pointer to a 16-bit word where the assigned handle will be stored. + * + * @retval ::NRF_SUCCESS Successfully added a service declaration. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, Vendor Specific UUIDs need to be present in the table. + * @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, certain UUIDs are reserved for the stack. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + */ +SVCALL(SD_BLE_GATTS_SERVICE_ADD, uint32_t, sd_ble_gatts_service_add(uint8_t type, ble_uuid_t const *p_uuid, uint16_t *p_handle)); + + +/**@brief Add an include declaration to the Attribute Table. + * + * @note It is currently only possible to add an include declaration to the last added service (i.e. only sequential population is supported at this time). + * + * @note The included service must already be present in the Attribute Table prior to this call. + * + * @mscs + * @mmsc{@ref BLE_GATTS_ATT_TABLE_POP_MSC} + * @endmscs + * + * @param[in] service_handle Handle of the service where the included service is to be placed, if @ref BLE_GATT_HANDLE_INVALID is used, it will be placed sequentially. + * @param[in] inc_srvc_handle Handle of the included service. + * @param[out] p_include_handle Pointer to a 16-bit word where the assigned handle will be stored. + * + * @retval ::NRF_SUCCESS Successfully added an include declaration. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, handle values need to match previously added services. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. + * @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, self inclusions are not allowed. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + * @retval ::NRF_ERROR_NOT_FOUND Attribute not found. + */ +SVCALL(SD_BLE_GATTS_INCLUDE_ADD, uint32_t, sd_ble_gatts_include_add(uint16_t service_handle, uint16_t inc_srvc_handle, uint16_t *p_include_handle)); + + +/**@brief Add a characteristic declaration, a characteristic value declaration and optional characteristic descriptor declarations to the Attribute Table. + * + * @note It is currently only possible to add a characteristic to the last added service (i.e. only sequential population is supported at this time). + * + * @note Several restrictions apply to the parameters, such as matching permissions between the user description descriptor and the writeable auxiliaries bits, + * readable (no security) and writeable (selectable) CCCDs and SCCDs and valid presentation format values. + * + * @note If no metadata is provided for the optional descriptors, their permissions will be derived from the characteristic permissions. + * + * @mscs + * @mmsc{@ref BLE_GATTS_ATT_TABLE_POP_MSC} + * @endmscs + * + * @param[in] service_handle Handle of the service where the characteristic is to be placed, if @ref BLE_GATT_HANDLE_INVALID is used, it will be placed sequentially. + * @param[in] p_char_md Characteristic metadata. + * @param[in] p_attr_char_value Pointer to the attribute structure corresponding to the characteristic value. + * @param[out] p_handles Pointer to the structure where the assigned handles will be stored. + * + * @retval ::NRF_SUCCESS Successfully added a characteristic. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, service handle, Vendor Specific UUIDs, lengths, and permissions need to adhere to the constraints. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation, a service context is required. + * @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, certain UUIDs are reserved for the stack. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX. + */ +SVCALL(SD_BLE_GATTS_CHARACTERISTIC_ADD, uint32_t, sd_ble_gatts_characteristic_add(uint16_t service_handle, ble_gatts_char_md_t const *p_char_md, ble_gatts_attr_t const *p_attr_char_value, ble_gatts_char_handles_t *p_handles)); + + +/**@brief Add a descriptor to the Attribute Table. + * + * @note It is currently only possible to add a descriptor to the last added characteristic (i.e. only sequential population is supported at this time). + * + * @mscs + * @mmsc{@ref BLE_GATTS_ATT_TABLE_POP_MSC} + * @endmscs + * + * @param[in] char_handle Handle of the characteristic where the descriptor is to be placed, if @ref BLE_GATT_HANDLE_INVALID is used, it will be placed sequentially. + * @param[in] p_attr Pointer to the attribute structure. + * @param[out] p_handle Pointer to a 16-bit word where the assigned handle will be stored. + * + * @retval ::NRF_SUCCESS Successfully added a descriptor. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, characteristic handle, Vendor Specific UUIDs, lengths, and permissions need to adhere to the constraints. + * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation, a characteristic context is required. + * @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, certain UUIDs are reserved for the stack. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX. + */ +SVCALL(SD_BLE_GATTS_DESCRIPTOR_ADD, uint32_t, sd_ble_gatts_descriptor_add(uint16_t char_handle, ble_gatts_attr_t const *p_attr, uint16_t *p_handle)); + +/**@brief Set the value of a given attribute. + * + * @note Values other than system attributes can be set at any time, regardless of wheter any active connections exist. + * + * @mscs + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_QUEUE_FULL_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_NOAUTH_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. If the value does not belong to a system attribute then @ref BLE_CONN_HANDLE_INVALID can be used. + * @param[in] handle Attribute handle. + * @param[in,out] p_value Attribute value information. + * + * @retval ::NRF_SUCCESS Successfully set the value of the attribute. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_NOT_FOUND Attribute not found. + * @retval ::NRF_ERROR_FORBIDDEN Forbidden handle supplied, certain attributes are not modifiable by the application. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::BLE_ERROR_GATTS_INVALID_ATTR_TYPE @ref BLE_CONN_HANDLE_INVALID supplied on a system attribute. + */ +SVCALL(SD_BLE_GATTS_VALUE_SET, uint32_t, sd_ble_gatts_value_set(uint16_t conn_handle, uint16_t handle, ble_gatts_value_t *p_value)); + +/**@brief Get the value of a given attribute. + * + * @note If the attribute value is longer than the size of the supplied buffer, + * p_len will return the total attribute value length (excluding offset), + * and not the number of bytes actually returned in p_data. + * The application may use this information to allocate a suitable buffer size. + * + * @note When retrieving system attribute values with this function, the connection handle + * may refer to an already disconnected connection. Refer to the documentation of + * @ref sd_ble_gatts_sys_attr_get for further information. + * + * @param[in] conn_handle Connection handle. If the value does not belong to a system attribute then @ref BLE_CONN_HANDLE_INVALID can be used. + * @param[in] handle Attribute handle. + * @param[in,out] p_value Attribute value information. + * + * @retval ::NRF_SUCCESS Successfully retrieved the value of the attribute. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_NOT_FOUND Attribute not found. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid attribute offset supplied. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. + * @retval ::BLE_ERROR_GATTS_INVALID_ATTR_TYPE @ref BLE_CONN_HANDLE_INVALID supplied on a system attribute. + */ +SVCALL(SD_BLE_GATTS_VALUE_GET, uint32_t, sd_ble_gatts_value_get(uint16_t conn_handle, uint16_t handle, ble_gatts_value_t *p_value)); + +/**@brief Notify or Indicate an attribute value. + * + * @details This function checks for the relevant Client Characteristic Configuration descriptor value to verify that the relevant operation + * (notification or indication) has been enabled by the client. It is also able to update the attribute value before issuing the PDU, so that + * the application can atomically perform a value update and a server initiated transaction with a single API call. + * If the application chooses to indicate an attribute value, a @ref BLE_GATTS_EVT_HVC event will be issued as soon as the confirmation arrives from + * the peer. + * + * @note The local attribute value may be updated even if an outgoing packet is not sent to the peer due to an error during execution. + * When receiveing the error codes @ref NRF_ERROR_INVALID_STATE, @ref NRF_ERROR_BUSY, @ref BLE_ERROR_GATTS_SYS_ATTR_MISSING and + * @ref BLE_ERROR_NO_TX_PACKETS the Attribute Table has been updated. + * The caller can check whether the value has been updated by looking at the contents of *(p_hvx_params->p_len). + * + * @note It is important to note that a notification will consume an application buffer, and will therefore + * generate a @ref BLE_EVT_TX_COMPLETE event when the packet has been transmitted. An indication on the other hand will use the + * standard server internal buffer and thus will only generate a @ref BLE_GATTS_EVT_HVC event as soon as the confirmation + * has been received from the peer. Please see the documentation of @ref sd_ble_tx_packet_count_get for more details. + * + * @events + * @event{@ref BLE_EVT_TX_COMPLETE, Transmission complete.} + * @event{@ref BLE_GATTS_EVT_HVC, Confirmation received from peer.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTS_HVX_SYS_ATTRS_MISSING_MSC} + * @mmsc{@ref BLE_GATTS_HVN_MSC} + * @mmsc{@ref BLE_GATTS_HVI_MSC} + * @mmsc{@ref BLE_GATTS_HVX_DISABLED_MSC} + * @mmsc{@ref BLE_COMMON_APP_BUFF_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_hvx_params Pointer to an HVx parameters structure. If the p_data member contains a non-NULL pointer the attribute value will be updated with + * the contents pointed by it before sending the notification or indication. + * + * @retval ::NRF_SUCCESS Successfully queued a notification or indication for transmission, and optionally updated the attribute value. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State or notifications and/or indications not enabled in the CCCD. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::BLE_ERROR_INVALID_ATTR_HANDLE Invalid attribute handle(s) supplied. Only attributes added directly by the application are available to notify and indicate. + * @retval ::BLE_ERROR_GATTS_INVALID_ATTR_TYPE Invalid attribute type(s) supplied, only characteristic values may be notified and indicated. + * @retval ::NRF_ERROR_NOT_FOUND Attribute not found. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied. + * @retval ::NRF_ERROR_BUSY Procedure already in progress. + * @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known value. + * @retval ::BLE_ERROR_NO_TX_PACKETS No available application packets for this connection, applies only to notifications. + */ +SVCALL(SD_BLE_GATTS_HVX, uint32_t, sd_ble_gatts_hvx(uint16_t conn_handle, ble_gatts_hvx_params_t const *p_hvx_params)); + +/**@brief Indicate the Service Changed attribute value. + * + * @details This call will send a Handle Value Indication to one or more peers connected to inform them that the Attribute + * Table layout has changed. As soon as the peer has confirmed the indication, a @ref BLE_GATTS_EVT_SC_CONFIRM event will + * be issued. + * + * @note Some of the restrictions and limitations that apply to @ref sd_ble_gatts_hvx also apply here. + * + * @events + * @event{@ref BLE_GATTS_EVT_SC_CONFIRM, Confirmation of attribute table change received from peer.} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_GATTS_SC_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] start_handle Start of affected attribute handle range. + * @param[in] end_handle End of affected attribute handle range. + * + * @retval ::NRF_SUCCESS Successfully queued the Service Changed indication for transmission. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_NOT_SUPPORTED Service Changed not enabled at initialization. See @ref sd_ble_enable and @ref ble_gatts_enable_params_t. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State or notifications and/or indications not enabled in the CCCD. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::BLE_ERROR_INVALID_ATTR_HANDLE Invalid attribute handle(s) supplied, handles must be in the range populated by the application. + * @retval ::NRF_ERROR_BUSY Procedure already in progress. + * @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known value. + */ +SVCALL(SD_BLE_GATTS_SERVICE_CHANGED, uint32_t, sd_ble_gatts_service_changed(uint16_t conn_handle, uint16_t start_handle, uint16_t end_handle)); + +/**@brief Respond to a Read/Write authorization request. + * + * @note This call should only be used as a response to a @ref BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST event issued to the application. + * + * @mscs + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_AUTH_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_BUF_AUTH_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_NOAUTH_MSC} + * @mmsc{@ref BLE_GATTS_READ_REQ_AUTH_MSC} + * @mmsc{@ref BLE_GATTS_WRITE_REQ_AUTH_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_QUEUE_FULL_MSC} + * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_PEER_CANCEL_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_rw_authorize_reply_params Pointer to a structure with the attribute provided by the application. + * + * @retval ::NRF_SUCCESS Successfully queued a response to the peer, and in the case of a write operation, Attribute Table updated. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State or no authorization request pending. + * @retval ::NRF_ERROR_INVALID_PARAM Authorization op invalid, + * handle supplied does not match requested handle, + * or invalid data to be written provided by the application. + * @retval ::NRF_ERROR_BUSY The stack is busy. Retry at later time. + */ +SVCALL(SD_BLE_GATTS_RW_AUTHORIZE_REPLY, uint32_t, sd_ble_gatts_rw_authorize_reply(uint16_t conn_handle, ble_gatts_rw_authorize_reply_params_t const *p_rw_authorize_reply_params)); + + +/**@brief Update persistent system attribute information. + * + * @details Supply information about persistent system attributes to the stack, + * previously obtained using @ref sd_ble_gatts_sys_attr_get. + * This call is only allowed for active connections, and is usually + * made immediately after a connection is established with an known bonded device, + * often as a response to a @ref BLE_GATTS_EVT_SYS_ATTR_MISSING. + * + * p_sysattrs may point directly to the application's stored copy of the system attributes + * obtained using @ref sd_ble_gatts_sys_attr_get. + * If the pointer is NULL, the system attribute info is initialized, assuming that + * the application does not have any previously saved system attribute data for this device. + * + * @note The state of persistent system attributes is reset upon connection establishment and then remembered for its duration. + * + * @note If this call returns with an error code different from @ref NRF_SUCCESS, the storage of persistent system attributes may have been completed only partially. + * This means that the state of the attribute table is undefined, and the application should either provide a new set of attributes using this same call or + * reset the SoftDevice to return to a known state. + * + * @note When the @ref BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS is used with this function, only the system attributes included in system services will be modified. + * @note When the @ref BLE_GATTS_SYS_ATTR_FLAG_USR_SRVCS is used with this function, only the system attributes included in user services will be modified. + * + * @mscs + * @mmsc{@ref BLE_GATTS_HVX_SYS_ATTRS_MISSING_MSC} + * @mmsc{@ref BLE_GATTS_SYS_ATTRS_UNK_PEER_MSC} + * @mmsc{@ref BLE_GATTS_SYS_ATTRS_BONDED_PEER_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle. + * @param[in] p_sys_attr_data Pointer to a saved copy of system attributes supplied to the stack, or NULL. + * @param[in] len Size of data pointed by p_sys_attr_data, in octets. + * @param[in] flags Optional additional flags, see @ref BLE_GATTS_SYS_ATTR_FLAGS + * + * @retval ::NRF_SUCCESS Successfully set the system attribute information. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. + * @retval ::NRF_ERROR_INVALID_DATA Invalid data supplied, the data should be exactly the same as retrieved with @ref sd_ble_gatts_sys_attr_get. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + * @retval ::NRF_ERROR_BUSY The stack is busy. Retry at later time. + */ +SVCALL(SD_BLE_GATTS_SYS_ATTR_SET, uint32_t, sd_ble_gatts_sys_attr_set(uint16_t conn_handle, uint8_t const *p_sys_attr_data, uint16_t len, uint32_t flags)); + + +/**@brief Retrieve persistent system attribute information from the stack. + * + * @details This call is used to retrieve information about values to be stored perisistently by the application + * during the lifetime of a connection or after it has been terminated. When a new connection is established with the same bonded device, + * the system attribute information retrieved with this function should be restored using using @ref sd_ble_gatts_sys_attr_set. + * If retrieved after disconnection, the data should be read before a new connection established. The connection handle for + * the previous, now disconnected, connection will remain valid until a new one is created to allow this API call to refer to it. + * Connection handles belonging to active connections can be used as well, but care should be taken since the system attributes + * may be written to at any time by the peer during a connection's lifetime. + * + * @note When the @ref BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS is used with this function, only the system attributes included in system services will be returned. + * @note When the @ref BLE_GATTS_SYS_ATTR_FLAG_USR_SRVCS is used with this function, only the system attributes included in user services will be returned. + * + * @mscs + * @mmsc{@ref BLE_GATTS_SYS_ATTRS_BONDED_PEER_MSC} + * @endmscs + * + * @param[in] conn_handle Connection handle of the recently terminated connection. + * @param[out] p_sys_attr_data Pointer to a buffer where updated information about system attributes will be filled in. The format of the data is described + * in @ref BLE_GATTS_SYS_ATTRS_FORMAT. NULL can be provided to obtain the length of the data. + * @param[in,out] p_len Size of application buffer if p_sys_attr_data is not NULL. Unconditially updated to actual length of system attribute data. + * @param[in] flags Optional additional flags, see @ref BLE_GATTS_SYS_ATTR_FLAGS + * + * @retval ::NRF_SUCCESS Successfully retrieved the system attribute information. + * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_DATA_SIZE The system attribute information did not fit into the provided buffer. + * @retval ::NRF_ERROR_NOT_FOUND No system attributes found. + */ +SVCALL(SD_BLE_GATTS_SYS_ATTR_GET, uint32_t, sd_ble_gatts_sys_attr_get(uint16_t conn_handle, uint8_t *p_sys_attr_data, uint16_t *p_len, uint32_t flags)); + + +/**@brief Retrieve the first valid user attribute handle. + * + * @param[out] p_handle Pointer to an integer where the handle will be stored. + * + * @retval ::NRF_SUCCESS Successfully retrieved the handle. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + */ +SVCALL(SD_BLE_GATTS_INITIAL_USER_HANDLE_GET, uint32_t, sd_ble_gatts_initial_user_handle_get(uint16_t *p_handle)); + +/**@brief Retrieve the attribute UUID and/or metadata. + * + * @param[in] handle Attribute handle + * @param[out] p_uuid UUID of the attribute. Use NULL to omit this field. + * @param[out] p_md Metadata of the attribute. Use NULL to omit this field. + * + * @retval ::NRF_SUCCESS Successfully retrieved the attribute metadata, + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameters supplied. Returned when both @c p_uuid and @c p_md are NULL. + * @retval ::NRF_ERROR_NOT_FOUND Attribute was not found. + */ +SVCALL(SD_BLE_GATTS_ATTR_GET, uint32_t, sd_ble_gatts_attr_get(uint16_t handle, ble_uuid_t * p_uuid, ble_gatts_attr_md_t * p_md)); + +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif // BLE_GATTS_H__ + +/** + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_hci.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_hci.h new file mode 100644 index 0000000000..4a9620ce21 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_hci.h @@ -0,0 +1,131 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 BLE_COMMON + @{ +*/ + + +#ifndef BLE_HCI_H__ +#define BLE_HCI_H__ +#ifdef __cplusplus +extern "C" { +#endif + +/** @defgroup BLE_HCI_STATUS_CODES Bluetooth status codes + * @{ */ + +#define BLE_HCI_STATUS_CODE_SUCCESS 0x00 /**< Success. */ +#define BLE_HCI_STATUS_CODE_UNKNOWN_BTLE_COMMAND 0x01 /**< Unknown BLE Command. */ +#define BLE_HCI_STATUS_CODE_UNKNOWN_CONNECTION_IDENTIFIER 0x02 /**< Unknown Connection Identifier. */ +/*0x03 Hardware Failure +0x04 Page Timeout +*/ +#define BLE_HCI_AUTHENTICATION_FAILURE 0x05 /**< Authentication Failure. */ +#define BLE_HCI_STATUS_CODE_PIN_OR_KEY_MISSING 0x06 /**< Pin or Key missing. */ +#define BLE_HCI_MEMORY_CAPACITY_EXCEEDED 0x07 /**< Memory Capacity Exceeded. */ +#define BLE_HCI_CONNECTION_TIMEOUT 0x08 /**< Connection Timeout. */ +/*0x09 Connection Limit Exceeded +0x0A Synchronous Connection Limit To A Device Exceeded +0x0B ACL Connection Already Exists*/ +#define BLE_HCI_STATUS_CODE_COMMAND_DISALLOWED 0x0C /**< Command Disallowed. */ +/*0x0D Connection Rejected due to Limited Resources +0x0E Connection Rejected Due To Security Reasons +0x0F Connection Rejected due to Unacceptable BD_ADDR +0x10 Connection Accept Timeout Exceeded +0x11 Unsupported Feature or Parameter Value*/ +#define BLE_HCI_STATUS_CODE_INVALID_BTLE_COMMAND_PARAMETERS 0x12 /**< Invalid BLE Command Parameters. */ +#define BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION 0x13 /**< Remote User Terminated Connection. */ +#define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES 0x14 /**< Remote Device Terminated Connection due to low resources.*/ +#define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF 0x15 /**< Remote Device Terminated Connection due to power off. */ +#define BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION 0x16 /**< Local Host Terminated Connection. */ +/* +0x17 Repeated Attempts +0x18 Pairing Not Allowed +0x19 Unknown LMP PDU +*/ +#define BLE_HCI_UNSUPPORTED_REMOTE_FEATURE 0x1A /**< Unsupported Remote Feature. */ +/* +0x1B SCO Offset Rejected +0x1C SCO Interval Rejected +0x1D SCO Air Mode Rejected*/ +#define BLE_HCI_STATUS_CODE_INVALID_LMP_PARAMETERS 0x1E /**< Invalid LMP Parameters. */ +#define BLE_HCI_STATUS_CODE_UNSPECIFIED_ERROR 0x1F /**< Unspecified Error. */ +/*0x20 Unsupported LMP Parameter Value +0x21 Role Change Not Allowed +*/ +#define BLE_HCI_STATUS_CODE_LMP_RESPONSE_TIMEOUT 0x22 /**< LMP Response Timeout. */ +/*0x23 LMP Error Transaction Collision*/ +#define BLE_HCI_STATUS_CODE_LMP_PDU_NOT_ALLOWED 0x24 /**< LMP PDU Not Allowed. */ +/*0x25 Encryption Mode Not Acceptable +0x26 Link Key Can Not be Changed +0x27 Requested QoS Not Supported +*/ +#define BLE_HCI_INSTANT_PASSED 0x28 /**< Instant Passed. */ +#define BLE_HCI_PAIRING_WITH_UNIT_KEY_UNSUPPORTED 0x29 /**< Pairing with Unit Key Unsupported. */ +#define BLE_HCI_DIFFERENT_TRANSACTION_COLLISION 0x2A /**< Different Transaction Collision. */ +/* +0x2B Reserved +0x2C QoS Unacceptable Parameter +0x2D QoS Rejected +0x2E Channel Classification Not Supported +0x2F Insufficient Security +0x30 Parameter Out Of Mandatory Range +0x31 Reserved +0x32 Role Switch Pending +0x33 Reserved +0x34 Reserved Slot Violation +0x35 Role Switch Failed +0x36 Extended Inquiry Response Too Large +0x37 Secure Simple Pairing Not Supported By Host. +0x38 Host Busy - Pairing +0x39 Connection Rejected due to No Suitable Channel Found*/ +#define BLE_HCI_CONTROLLER_BUSY 0x3A /**< Controller Busy. */ +#define BLE_HCI_CONN_INTERVAL_UNACCEPTABLE 0x3B /**< Connection Interval Unacceptable. */ +#define BLE_HCI_DIRECTED_ADVERTISER_TIMEOUT 0x3C /**< Directed Adverisement Timeout. */ +#define BLE_HCI_CONN_TERMINATED_DUE_TO_MIC_FAILURE 0x3D /**< Connection Terminated due to MIC Failure. */ +#define BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED 0x3E /**< Connection Failed to be Established. */ + +/** @} */ + + +#ifdef __cplusplus +} +#endif +#endif // BLE_HCI_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_l2cap.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_l2cap.h new file mode 100644 index 0000000000..8a68ed90c8 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_l2cap.h @@ -0,0 +1,202 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 BLE_L2CAP Logical Link Control and Adaptation Protocol (L2CAP) + @{ + @brief Definitions and prototypes for the L2CAP interface. + */ + +#ifndef BLE_L2CAP_H__ +#define BLE_L2CAP_H__ + +#include "ble_types.h" +#include "ble_ranges.h" +#include "ble_err.h" +#include "nrf_svc.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/**@addtogroup BLE_L2CAP_ENUMERATIONS Enumerations + * @{ */ + +/**@brief L2CAP API SVC numbers. */ +enum BLE_L2CAP_SVCS +{ + SD_BLE_L2CAP_CID_REGISTER = BLE_L2CAP_SVC_BASE, /**< Register a CID. */ + SD_BLE_L2CAP_CID_UNREGISTER, /**< Unregister a CID. */ + SD_BLE_L2CAP_TX /**< Transmit a packet. */ +}; + +/**@brief L2CAP Event IDs. */ +enum BLE_L2CAP_EVTS +{ + BLE_L2CAP_EVT_RX = BLE_L2CAP_EVT_BASE /**< L2CAP packet received. */ +}; + +/** @} */ + +/**@addtogroup BLE_L2CAP_DEFINES Defines + * @{ */ + +/**@defgroup BLE_ERRORS_L2CAP SVC return values specific to L2CAP + * @{ */ +#define BLE_ERROR_L2CAP_CID_IN_USE (NRF_L2CAP_ERR_BASE + 0x000) /**< CID already in use. */ +/** @} */ + +/**@brief Default L2CAP MTU. */ +#define BLE_L2CAP_MTU_DEF (23) + +/**@brief Invalid Channel Identifier. */ +#define BLE_L2CAP_CID_INVALID (0x0000) + +/**@brief Dynamic Channel Identifier base. */ +#define BLE_L2CAP_CID_DYN_BASE (0x0040) + +/**@brief Maximum amount of dynamic CIDs. */ +#define BLE_L2CAP_CID_DYN_MAX (8) + +/** @} */ + +/**@addtogroup BLE_L2CAP_STRUCTURES Structures + * @{ */ + +/**@brief Packet header format for L2CAP transmission. */ +typedef struct +{ + uint16_t len; /**< Length of valid info in data member. */ + uint16_t cid; /**< Channel ID on which packet is transmitted. */ +} ble_l2cap_header_t; + + +/**@brief L2CAP Received packet event report. */ +typedef struct +{ + ble_l2cap_header_t header; /**< L2CAP packet header. */ + uint8_t data[1]; /**< Packet data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation. + See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */ +} ble_l2cap_evt_rx_t; + + +/**@brief L2CAP event callback event structure. */ +typedef struct +{ + uint16_t conn_handle; /**< Connection Handle on which event occured. */ + union + { + ble_l2cap_evt_rx_t rx; /**< RX Event parameters. */ + } params; /**< Event Parameters. */ +} ble_l2cap_evt_t; + +/** @} */ + +/**@addtogroup BLE_L2CAP_FUNCTIONS Functions + * @{ */ + +/**@brief Register a CID with L2CAP. + * + * @details This registers a higher protocol layer with the L2CAP multiplexer, and is requried prior to all operations on the CID. + * + * @mscs + * @mmsc{@ref BLE_L2CAP_API_MSC} + * @endmscs + * + * @param[in] cid L2CAP CID. + * + * @retval ::NRF_SUCCESS Successfully registered a CID with the L2CAP layer. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, CID must be above @ref BLE_L2CAP_CID_DYN_BASE. + * @retval ::BLE_ERROR_L2CAP_CID_IN_USE L2CAP CID already in use. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + */ +SVCALL(SD_BLE_L2CAP_CID_REGISTER, uint32_t, sd_ble_l2cap_cid_register(uint16_t cid)); + +/**@brief Unregister a CID with L2CAP. + * + * @details This unregisters a previously registerd higher protocol layer with the L2CAP multiplexer. + * + * @mscs + * @mmsc{@ref BLE_L2CAP_API_MSC} + * @endmscs + * + * @param[in] cid L2CAP CID. + * + * @retval ::NRF_SUCCESS Successfully unregistered the CID. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. + * @retval ::NRF_ERROR_NOT_FOUND CID not previously registered. + */ +SVCALL(SD_BLE_L2CAP_CID_UNREGISTER, uint32_t, sd_ble_l2cap_cid_unregister(uint16_t cid)); + +/**@brief Transmit an L2CAP packet. + * + * @note It is important to note that a call to this function will consume an application packet, and will therefore + * generate a @ref BLE_EVT_TX_COMPLETE event when the packet has been transmitted. + * Please see the documentation of @ref sd_ble_tx_packet_count_get for more details. + * + * @events + * @event{@ref BLE_EVT_TX_COMPLETE} + * @event{@ref BLE_L2CAP_EVT_RX} + * @endevents + * + * @mscs + * @mmsc{@ref BLE_L2CAP_API_MSC} + * @endmscs + * + * @param[in] conn_handle Connection Handle. + * @param[in] p_header Pointer to a packet header containing length and CID. + * @param[in] p_data Pointer to the data to be transmitted. + * + * @retval ::NRF_SUCCESS Successfully queued an L2CAP packet for transmission. + * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. + * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, CIDs must be registered beforehand with @ref sd_ble_l2cap_cid_register. + * @retval ::NRF_ERROR_NOT_FOUND CID not found. + * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. + * @retval ::BLE_ERROR_NO_TX_PACKETS Not enough application packets available. + * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, see @ref BLE_L2CAP_MTU_DEF. + */ +SVCALL(SD_BLE_L2CAP_TX, uint32_t, sd_ble_l2cap_tx(uint16_t conn_handle, ble_l2cap_header_t const *p_header, uint8_t const *p_data)); + +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif // BLE_L2CAP_H__ + +/** + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_ranges.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_ranges.h new file mode 100644 index 0000000000..2e5ff7b299 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_ranges.h @@ -0,0 +1,126 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 BLE_COMMON + @{ + @defgroup ble_ranges Module specific SVC, event and option number subranges + @{ + + @brief Definition of SVC, event and option number subranges for each API module. + + @note + SVCs, event and option numbers are split into subranges for each API module. + Each module receives its entire allocated range of SVC calls, whether implemented or not, + but return BLE_ERROR_NOT_SUPPORTED for unimplemented or undefined calls in its range. + + Note that the symbols BLE__SVC_LAST is the end of the allocated SVC range, + rather than the last SVC function call actually defined and implemented. + + Specific SVC, event and option values are defined in each module's ble_.h file, + which defines names of each individual SVC code based on the range start value. +*/ + +#ifndef BLE_RANGES_H__ +#define BLE_RANGES_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#define BLE_SVC_BASE 0x60 /**< Common BLE SVC base. */ +#define BLE_SVC_LAST 0x6B /**< Total: 12. */ + +#define BLE_RESERVED_SVC_BASE 0x6C /**< Reserved BLE SVC base. */ +#define BLE_RESERVED_SVC_LAST 0x6F /**< Total: 4. */ + +#define BLE_GAP_SVC_BASE 0x70 /**< GAP BLE SVC base. */ +#define BLE_GAP_SVC_LAST 0x8F /**< Total: 32. */ + +#define BLE_GATTC_SVC_BASE 0x90 /**< GATTC BLE SVC base. */ +#define BLE_GATTC_SVC_LAST 0x9F /**< Total: 32. */ + +#define BLE_GATTS_SVC_BASE 0xA0 /**< GATTS BLE SVC base. */ +#define BLE_GATTS_SVC_LAST 0xAF /**< Total: 16. */ + +#define BLE_L2CAP_SVC_BASE 0xB0 /**< L2CAP BLE SVC base. */ +#define BLE_L2CAP_SVC_LAST 0xBF /**< Total: 16. */ + + +#define BLE_EVT_INVALID 0x00 /**< Invalid BLE Event. */ + +#define BLE_EVT_BASE 0x01 /**< Common BLE Event base. */ +#define BLE_EVT_LAST 0x0F /**< Total: 15. */ + +#define BLE_GAP_EVT_BASE 0x10 /**< GAP BLE Event base. */ +#define BLE_GAP_EVT_LAST 0x2F /**< Total: 32. */ + +#define BLE_GATTC_EVT_BASE 0x30 /**< GATTC BLE Event base. */ +#define BLE_GATTC_EVT_LAST 0x4F /**< Total: 32. */ + +#define BLE_GATTS_EVT_BASE 0x50 /**< GATTS BLE Event base. */ +#define BLE_GATTS_EVT_LAST 0x6F /**< Total: 32. */ + +#define BLE_L2CAP_EVT_BASE 0x70 /**< L2CAP BLE Event base. */ +#define BLE_L2CAP_EVT_LAST 0x8F /**< Total: 32. */ + + +#define BLE_OPT_INVALID 0x00 /**< Invalid BLE Option. */ + +#define BLE_OPT_BASE 0x01 /**< Common BLE Option base. */ +#define BLE_OPT_LAST 0x1F /**< Total: 31. */ + +#define BLE_GAP_OPT_BASE 0x20 /**< GAP BLE Option base. */ +#define BLE_GAP_OPT_LAST 0x3F /**< Total: 32. */ + +#define BLE_GATTC_OPT_BASE 0x40 /**< GATTC BLE Option base. */ +#define BLE_GATTC_OPT_LAST 0x5F /**< Total: 32. */ + +#define BLE_GATTS_OPT_BASE 0x60 /**< GATTS BLE Option base. */ +#define BLE_GATTS_OPT_LAST 0x7F /**< Total: 32. */ + +#define BLE_L2CAP_OPT_BASE 0x80 /**< L2CAP BLE Option base. */ +#define BLE_L2CAP_OPT_LAST 0x9F /**< Total: 32. */ + +#ifdef __cplusplus +} +#endif +#endif /* BLE_RANGES_H__ */ + +/** + @} + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_types.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_types.h new file mode 100644 index 0000000000..23e23a150e --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_types.h @@ -0,0 +1,205 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 BLE_COMMON + @{ + @defgroup ble_types Common types and macro definitions + @{ + + @brief Common types and macro definitions for the BLE SoftDevice. + */ + +#ifndef BLE_TYPES_H__ +#define BLE_TYPES_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup BLE_TYPES_DEFINES Defines + * @{ */ + +/** @defgroup BLE_CONN_HANDLES BLE Connection Handles + * @{ */ +#define BLE_CONN_HANDLE_INVALID 0xFFFF /**< Invalid Connection Handle. */ +#define BLE_CONN_HANDLE_ALL 0xFFFE /**< Applies to all Connection Handles. */ +/** @} */ + + +/** @defgroup BLE_UUID_VALUES Assigned Values for BLE UUIDs + * @{ */ +/* Generic UUIDs, applicable to all services */ +#define BLE_UUID_UNKNOWN 0x0000 /**< Reserved UUID. */ +#define BLE_UUID_SERVICE_PRIMARY 0x2800 /**< Primary Service. */ +#define BLE_UUID_SERVICE_SECONDARY 0x2801 /**< Secondary Service. */ +#define BLE_UUID_SERVICE_INCLUDE 0x2802 /**< Include. */ +#define BLE_UUID_CHARACTERISTIC 0x2803 /**< Characteristic. */ +#define BLE_UUID_DESCRIPTOR_CHAR_EXT_PROP 0x2900 /**< Characteristic Extended Properties Descriptor. */ +#define BLE_UUID_DESCRIPTOR_CHAR_USER_DESC 0x2901 /**< Characteristic User Description Descriptor. */ +#define BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG 0x2902 /**< Client Characteristic Configuration Descriptor. */ +#define BLE_UUID_DESCRIPTOR_SERVER_CHAR_CONFIG 0x2903 /**< Server Characteristic Configuration Descriptor. */ +#define BLE_UUID_DESCRIPTOR_CHAR_PRESENTATION_FORMAT 0x2904 /**< Characteristic Presentation Format Descriptor. */ +#define BLE_UUID_DESCRIPTOR_CHAR_AGGREGATE_FORMAT 0x2905 /**< Characteristic Aggregate Format Descriptor. */ +/* GATT specific UUIDs */ +#define BLE_UUID_GATT 0x1801 /**< Generic Attribute Profile. */ +#define BLE_UUID_GATT_CHARACTERISTIC_SERVICE_CHANGED 0x2A05 /**< Service Changed Characteristic. */ +/* GAP specific UUIDs */ +#define BLE_UUID_GAP 0x1800 /**< Generic Access Profile. */ +#define BLE_UUID_GAP_CHARACTERISTIC_DEVICE_NAME 0x2A00 /**< Device Name Characteristic. */ +#define BLE_UUID_GAP_CHARACTERISTIC_APPEARANCE 0x2A01 /**< Appearance Characteristic. */ +#define BLE_UUID_GAP_CHARACTERISTIC_PPF 0x2A02 /**< Peripheral Privacy Flag Characteristic. */ +#define BLE_UUID_GAP_CHARACTERISTIC_RECONN_ADDR 0x2A03 /**< Reconnection Address Characteristic. */ +#define BLE_UUID_GAP_CHARACTERISTIC_PPCP 0x2A04 /**< Peripheral Preferred Connection Parameters Characteristic. */ +/** @} */ + + +/** @defgroup BLE_UUID_TYPES Types of UUID + * @{ */ +#define BLE_UUID_TYPE_UNKNOWN 0x00 /**< Invalid UUID type. */ +#define BLE_UUID_TYPE_BLE 0x01 /**< Bluetooth SIG UUID (16-bit). */ +#define BLE_UUID_TYPE_VENDOR_BEGIN 0x02 /**< Vendor UUID types start at this index (128-bit). */ +/** @} */ + + +/** @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 + * @{ */ +#define BLE_APPEARANCE_UNKNOWN 0 /**< Unknown. */ +#define BLE_APPEARANCE_GENERIC_PHONE 64 /**< Generic Phone. */ +#define BLE_APPEARANCE_GENERIC_COMPUTER 128 /**< Generic Computer. */ +#define BLE_APPEARANCE_GENERIC_WATCH 192 /**< Generic Watch. */ +#define BLE_APPEARANCE_WATCH_SPORTS_WATCH 193 /**< Watch: Sports Watch. */ +#define BLE_APPEARANCE_GENERIC_CLOCK 256 /**< Generic Clock. */ +#define BLE_APPEARANCE_GENERIC_DISPLAY 320 /**< Generic Display. */ +#define BLE_APPEARANCE_GENERIC_REMOTE_CONTROL 384 /**< Generic Remote Control. */ +#define BLE_APPEARANCE_GENERIC_EYE_GLASSES 448 /**< Generic Eye-glasses. */ +#define BLE_APPEARANCE_GENERIC_TAG 512 /**< Generic Tag. */ +#define BLE_APPEARANCE_GENERIC_KEYRING 576 /**< Generic Keyring. */ +#define BLE_APPEARANCE_GENERIC_MEDIA_PLAYER 640 /**< Generic Media Player. */ +#define BLE_APPEARANCE_GENERIC_BARCODE_SCANNER 704 /**< Generic Barcode Scanner. */ +#define BLE_APPEARANCE_GENERIC_THERMOMETER 768 /**< Generic Thermometer. */ +#define BLE_APPEARANCE_THERMOMETER_EAR 769 /**< Thermometer: Ear. */ +#define BLE_APPEARANCE_GENERIC_HEART_RATE_SENSOR 832 /**< Generic Heart rate Sensor. */ +#define BLE_APPEARANCE_HEART_RATE_SENSOR_HEART_RATE_BELT 833 /**< Heart Rate Sensor: Heart Rate Belt. */ +#define BLE_APPEARANCE_GENERIC_BLOOD_PRESSURE 896 /**< Generic Blood Pressure. */ +#define BLE_APPEARANCE_BLOOD_PRESSURE_ARM 897 /**< Blood Pressure: Arm. */ +#define BLE_APPEARANCE_BLOOD_PRESSURE_WRIST 898 /**< Blood Pressure: Wrist. */ +#define BLE_APPEARANCE_GENERIC_HID 960 /**< Human Interface Device (HID). */ +#define BLE_APPEARANCE_HID_KEYBOARD 961 /**< Keyboard (HID Subtype). */ +#define BLE_APPEARANCE_HID_MOUSE 962 /**< Mouse (HID Subtype). */ +#define BLE_APPEARANCE_HID_JOYSTICK 963 /**< Joystiq (HID Subtype). */ +#define BLE_APPEARANCE_HID_GAMEPAD 964 /**< Gamepad (HID Subtype). */ +#define BLE_APPEARANCE_HID_DIGITIZERSUBTYPE 965 /**< Digitizer Tablet (HID Subtype). */ +#define BLE_APPEARANCE_HID_CARD_READER 966 /**< Card Reader (HID Subtype). */ +#define BLE_APPEARANCE_HID_DIGITAL_PEN 967 /**< Digital Pen (HID Subtype). */ +#define BLE_APPEARANCE_HID_BARCODE 968 /**< Barcode Scanner (HID Subtype). */ +#define BLE_APPEARANCE_GENERIC_GLUCOSE_METER 1024 /**< Generic Glucose Meter. */ +#define BLE_APPEARANCE_GENERIC_RUNNING_WALKING_SENSOR 1088 /**< Generic Running Walking Sensor. */ +#define BLE_APPEARANCE_RUNNING_WALKING_SENSOR_IN_SHOE 1089 /**< Running Walking Sensor: In-Shoe. */ +#define BLE_APPEARANCE_RUNNING_WALKING_SENSOR_ON_SHOE 1090 /**< Running Walking Sensor: On-Shoe. */ +#define BLE_APPEARANCE_RUNNING_WALKING_SENSOR_ON_HIP 1091 /**< Running Walking Sensor: On-Hip. */ +#define BLE_APPEARANCE_GENERIC_CYCLING 1152 /**< Generic Cycling. */ +#define BLE_APPEARANCE_CYCLING_CYCLING_COMPUTER 1153 /**< Cycling: Cycling Computer. */ +#define BLE_APPEARANCE_CYCLING_SPEED_SENSOR 1154 /**< Cycling: Speed Sensor. */ +#define BLE_APPEARANCE_CYCLING_CADENCE_SENSOR 1155 /**< Cycling: Cadence Sensor. */ +#define BLE_APPEARANCE_CYCLING_POWER_SENSOR 1156 /**< Cycling: Power Sensor. */ +#define BLE_APPEARANCE_CYCLING_SPEED_CADENCE_SENSOR 1157 /**< Cycling: Speed and Cadence Sensor. */ +#define BLE_APPEARANCE_GENERIC_PULSE_OXIMETER 3136 /**< Generic Pulse Oximeter. */ +#define BLE_APPEARANCE_PULSE_OXIMETER_FINGERTIP 3137 /**< Fingertip (Pulse Oximeter subtype). */ +#define BLE_APPEARANCE_PULSE_OXIMETER_WRIST_WORN 3138 /**< Wrist Worn(Pulse Oximeter subtype). */ +#define BLE_APPEARANCE_GENERIC_WEIGHT_SCALE 3200 /**< Generic Weight Scale. */ +#define BLE_APPEARANCE_GENERIC_OUTDOOR_SPORTS_ACT 5184 /**< Generic Outdoor Sports Activity. */ +#define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_DISP 5185 /**< Location Display Device (Outdoor Sports Activity subtype). */ +#define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_DISP 5186 /**< Location and Navigation Display Device (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). */ +/** @} */ + +/** @brief Set .type and .uuid fields of ble_uuid_struct to specified uuid value. */ +#define BLE_UUID_BLE_ASSIGN(instance, value) do {\ + instance.type = BLE_UUID_TYPE_BLE; \ + instance.uuid = value;} while(0) + +/** @brief Copy type and uuid members from src to dst ble_uuid_t pointer. Both pointers must be valid/non-null. */ +#define BLE_UUID_COPY_PTR(dst, src) do {\ + (dst)->type = (src)->type; \ + (dst)->uuid = (src)->uuid;} while(0) + +/** @brief Copy type and uuid members from src to dst ble_uuid_t struct. */ +#define BLE_UUID_COPY_INST(dst, src) do {\ + (dst).type = (src).type; \ + (dst).uuid = (src).uuid;} while(0) + +/** @brief Compare for equality both type and uuid members of two (valid, non-null) ble_uuid_t pointers. */ +#define BLE_UUID_EQ(p_uuid1, p_uuid2) \ + (((p_uuid1)->type == (p_uuid2)->type) && ((p_uuid1)->uuid == (p_uuid2)->uuid)) + +/** @brief Compare for difference both type and uuid members of two (valid, non-null) ble_uuid_t pointers. */ +#define BLE_UUID_NEQ(p_uuid1, p_uuid2) \ + (((p_uuid1)->type != (p_uuid2)->type) || ((p_uuid1)->uuid != (p_uuid2)->uuid)) + +/** @} */ + +/** @addtogroup BLE_TYPES_STRUCTURES Structures + * @{ */ + +/** @brief 128 bit UUID values. */ +typedef struct +{ + uint8_t uuid128[16]; /**< Little-Endian UUID bytes. */ +} ble_uuid128_t; + +/** @brief Bluetooth Low Energy UUID type, encapsulates both 16-bit and 128-bit UUIDs. */ +typedef struct +{ + uint16_t uuid; /**< 16-bit UUID value or octets 12-13 of 128-bit UUID. */ + uint8_t type; /**< UUID type, see @ref BLE_UUID_TYPES. If type is @ref BLE_UUID_TYPE_UNKNOWN, the value of uuid is undefined. */ +} ble_uuid_t; + +/** @} */ +#ifdef __cplusplus +} +#endif + +#endif /* BLE_TYPES_H__ */ + +/** + @} + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf52/nrf_mbr.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf52/nrf_mbr.h new file mode 100644 index 0000000000..a18403e10d --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf52/nrf_mbr.h @@ -0,0 +1,217 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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. + * + */ +/** + @defgroup nrf_mbr_api Master Boot Record API + @{ + + @brief APIs for updating SoftDevice and BootLoader + +*/ + +/* Header guard */ +#ifndef NRF_MBR_H__ +#define NRF_MBR_H__ + +#include "nrf_svc.h" +#include + +#ifndef NRF52 +#error "This header file shall only be included for nRF52 projects" +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup NRF_MBR_DEFINES Defines + * @{ */ + +/**@brief MBR SVC Base number. */ +#define MBR_SVC_BASE (0x18) + +/**@brief Page size in words. */ +#define MBR_PAGE_SIZE_IN_WORDS (1024) + +/** @brief The size that must be reserved for the MBR when a softdevice is written to flash. +This is the offset where the first byte of the softdevice hex file is written.*/ +#define MBR_SIZE (0x1000) + +/** @} */ + +/** @addtogroup NRF_MBR_ENUMS Enumerations + * @{ */ + +/**@brief nRF Master Boot Record API SVC numbers. */ +enum NRF_MBR_SVCS +{ + SD_MBR_COMMAND = MBR_SVC_BASE, /**< ::sd_mbr_command */ +}; + +/**@brief Possible values for ::sd_mbr_command_t.command */ +enum NRF_MBR_COMMANDS +{ + SD_MBR_COMMAND_COPY_BL, /**< Copy a new BootLoader. @see sd_mbr_command_copy_bl_t */ + SD_MBR_COMMAND_COPY_SD, /**< Copy a new SoftDevice. @see ::sd_mbr_command_copy_sd_t*/ + SD_MBR_COMMAND_INIT_SD, /**< Init forwarding interrupts to SD, and run reset function in SD*/ + SD_MBR_COMMAND_COMPARE, /**< This command works like memcmp. @see ::sd_mbr_command_compare_t*/ + SD_MBR_COMMAND_VECTOR_TABLE_BASE_SET, /**< Start forwarding all exception to this address @see ::sd_mbr_command_vector_table_base_set_t*/ +}; + +/** @} */ + +/** @addtogroup NRF_MBR_TYPES Types + * @{ */ + +/**@brief This command copies part of a new SoftDevice + * The destination area is erased before copying. + * If dst is in the middle of a flash page, that whole flash page will be erased. + * If (dst+len) is in the middle of a flash page, that whole flash page will be erased. + * + * The user of this function is responsible for setting the BPROT registers. + * + * @retval ::NRF_SUCCESS indicates that the contents of the memory blocks where copied correctly. + * @retval ::NRF_ERROR_INTERNAL indicates that the contents of the memory blocks where not verified correctly after copying. + */ +typedef struct +{ + uint32_t *src; /**< Pointer to the source of data to be copied.*/ + uint32_t *dst; /**< Pointer to the destination where the content is to be copied.*/ + uint32_t len; /**< Number of 32 bit words to copy. Must be a multiple of @ref MBR_PAGE_SIZE_IN_WORDS words.*/ +} sd_mbr_command_copy_sd_t; + + +/**@brief This command works like memcmp, but takes the length in words. + * + * @retval ::NRF_SUCCESS indicates that the contents of both memory blocks are equal. + * @retval ::NRF_ERROR_NULL indicates that the contents of the memory blocks are not equal. + */ +typedef struct +{ + uint32_t *ptr1; /**< Pointer to block of memory. */ + uint32_t *ptr2; /**< Pointer to block of memory. */ + uint32_t len; /**< Number of 32 bit words to compare.*/ +} sd_mbr_command_compare_t; + + +/**@brief This command copies a new BootLoader. + * With this command, destination of BootLoader is always the address written in NRF_UICR->BOOTADDR. + * + * Destination is erased by this function. + * If (destination+bl_len) is in the middle of a flash page, that whole flash page will be erased. + * + * This function will use PROTENSET to protect the flash that is not intended to be written. + * + * On Success, this function will not return. It will start the new BootLoader from reset-vector as normal. + * + * @retval ::NRF_ERROR_INTERNAL indicates an internal error that should not happen. + * @retval ::NRF_ERROR_FORBIDDEN if NRF_UICR->BOOTADDR is not set. + * @retval ::NRF_ERROR_INVALID_LENGTH if parameters attempts to read or write outside flash area. + * @retval ::NRF_ERROR_NO_MEM if no parameter page is provided (see sds for more info) + */ +typedef struct +{ + uint32_t *bl_src; /**< Pointer to the source of the Bootloader to be be copied.*/ + uint32_t bl_len; /**< Number of 32 bit words to copy for BootLoader. */ +} sd_mbr_command_copy_bl_t; + +/**@brief Sets the base address of the interrupt vector table for interrupts forwarded from the MBR + * + * Once this function has been called, this address is where the MBR will start to forward interrupts to after a reset. + * + * To restore default forwarding this function should be called with @param address set to 0. + * The MBR will then start forwarding to interrupts to the address in NFR_UICR->BOOTADDR or to the SoftDevice if the BOOTADDR is not set. + * + * On Success, this function will not return. It will reset the device. + * + * @retval ::NRF_ERROR_INTERNAL indicates an internal error that should not happen. + * @retval ::NRF_ERROR_INVALID_ADDR if parameter address is outside of the flash size. + * @retval ::NRF_ERROR_NO_MEM if no parameter page is provided (see sds for more info) + */ +typedef struct +{ + uint32_t address; /**< The base address of the interrupt vector table for forwarded interrupts.*/ +} sd_mbr_command_vector_table_base_set_t; + + +typedef struct +{ + uint32_t command; /**< type of command to be issued see @ref NRF_MBR_COMMANDS. */ + union + { + sd_mbr_command_copy_sd_t copy_sd; /**< Parameters for copy SoftDevice.*/ + sd_mbr_command_compare_t compare; /**< Parameters for verify.*/ + sd_mbr_command_copy_bl_t copy_bl; /**< Parameters for copy BootLoader. Requires parameter page. */ + sd_mbr_command_vector_table_base_set_t base_set; /**< Parameters for vector table base set. Requires parameter page.*/ + } params; +} sd_mbr_command_t; + +/** @} */ + +/** @addtogroup NRF_MBR_FUNCTIONS Functions + * @{ */ + +/**@brief Issue Master Boot Record commands + * + * Commands used when updating a SoftDevice and bootloader. + * + * The SD_MBR_COMMAND_COPY_BL and SD_MBR_COMMAND_VECTOR_TABLE_BASE_SET requires parameters to be + * retained by the MBR when resetting the IC. This is done in a separate flash page + * provided by the application. The uicr register UICR.NRFFW[1] must be set + * to an address corresponding to a page in the application flash space. This page will be cleared + * by the MBR and used to store the command before reset. When the UICR.NRFFW[1] field is set + * the page it refers to must not be used by the application. If the UICR.NRFFW[1] is set to + * 0xFFFFFFFF (the default) MBR commands which use flash will be unavailable and return + * NRF_ERROR_NO_MEM. + * + * @param[in] param Pointer to a struct describing the command. + * + * @note for retvals see ::sd_mbr_command_copy_sd_t ::sd_mbr_command_copy_bl_t ::sd_mbr_command_compare_t ::sd_mbr_command_vector_table_base_set_t + * + * @retval NRF_ERROR_NO_MEM if UICR.NRFFW[1] is not set (i.e. is 0xFFFFFFFF). + * @retval NRF_ERROR_INVALID_PARAM if an invalid command is given. +*/ +SVCALL(SD_MBR_COMMAND, uint32_t, sd_mbr_command(sd_mbr_command_t* param)); + +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif // NRF_MBR_H__ + +/** + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error.h new file mode 100644 index 0000000000..1035b76d4a --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error.h @@ -0,0 +1,87 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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. + * + */ + /** + @defgroup nrf_error SoftDevice Global Error Codes + @{ + + @brief Global Error definitions +*/ + +/* Header guard */ +#ifndef NRF_ERROR_H__ +#define NRF_ERROR_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/** @defgroup NRF_ERRORS_BASE Error Codes Base number definitions + * @{ */ +#define NRF_ERROR_BASE_NUM (0x0) ///< Global error base +#define NRF_ERROR_SDM_BASE_NUM (0x1000) ///< SDM error base +#define NRF_ERROR_SOC_BASE_NUM (0x2000) ///< SoC error base +#define NRF_ERROR_STK_BASE_NUM (0x3000) ///< STK error base +/** @} */ + +#define NRF_SUCCESS (NRF_ERROR_BASE_NUM + 0) ///< Successful command +#define NRF_ERROR_SVC_HANDLER_MISSING (NRF_ERROR_BASE_NUM + 1) ///< SVC handler is missing +#define NRF_ERROR_SOFTDEVICE_NOT_ENABLED (NRF_ERROR_BASE_NUM + 2) ///< SoftDevice has not been enabled +#define NRF_ERROR_INTERNAL (NRF_ERROR_BASE_NUM + 3) ///< Internal Error +#define NRF_ERROR_NO_MEM (NRF_ERROR_BASE_NUM + 4) ///< No Memory for operation +#define NRF_ERROR_NOT_FOUND (NRF_ERROR_BASE_NUM + 5) ///< Not found +#define NRF_ERROR_NOT_SUPPORTED (NRF_ERROR_BASE_NUM + 6) ///< Not supported +#define NRF_ERROR_INVALID_PARAM (NRF_ERROR_BASE_NUM + 7) ///< Invalid Parameter +#define NRF_ERROR_INVALID_STATE (NRF_ERROR_BASE_NUM + 8) ///< Invalid state, operation disallowed in this state +#define NRF_ERROR_INVALID_LENGTH (NRF_ERROR_BASE_NUM + 9) ///< Invalid Length +#define NRF_ERROR_INVALID_FLAGS (NRF_ERROR_BASE_NUM + 10) ///< Invalid Flags +#define NRF_ERROR_INVALID_DATA (NRF_ERROR_BASE_NUM + 11) ///< Invalid Data +#define NRF_ERROR_DATA_SIZE (NRF_ERROR_BASE_NUM + 12) ///< Invalid Data size +#define NRF_ERROR_TIMEOUT (NRF_ERROR_BASE_NUM + 13) ///< Operation timed out +#define NRF_ERROR_NULL (NRF_ERROR_BASE_NUM + 14) ///< Null Pointer +#define NRF_ERROR_FORBIDDEN (NRF_ERROR_BASE_NUM + 15) ///< Forbidden Operation +#define NRF_ERROR_INVALID_ADDR (NRF_ERROR_BASE_NUM + 16) ///< Bad Memory Address +#define NRF_ERROR_BUSY (NRF_ERROR_BASE_NUM + 17) ///< Busy +#define NRF_ERROR_CONN_COUNT (NRF_ERROR_BASE_NUM + 18) ///< Maximum connection count exceeded. +#define NRF_ERROR_RESOURCES (NRF_ERROR_BASE_NUM + 19) ///< Not enough resources for operation + +#ifdef __cplusplus +} +#endif +#endif // NRF_ERROR_H__ + +/** + @} +*/ diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error_sdm.h similarity index 60% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error_sdm.h index 06cbcc41df..412b9b5524 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error_sdm.h @@ -16,6 +16,10 @@ * contributors to this software may be used to endorse or promote products * derived from this software without specific prior written permission. * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * * * 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 @@ -29,39 +33,35 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ + /** + @addtogroup nrf_sdm_api + @{ + @defgroup nrf_sdm_error SoftDevice Manager Error Codes + @{ -#ifndef NRF_H -#define NRF_H + @brief Error definitions for the SDM API +*/ -/* MDK version */ -#define MDK_MAJOR_VERSION 8 -#define MDK_MINOR_VERSION 5 -#define MDK_MICRO_VERSION 0 +/* Header guard */ +#ifndef NRF_ERROR_SDM_H__ +#define NRF_ERROR_SDM_H__ -#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 */ -#elif defined(__APPLE__) - /* Do not include nrf51 specific files when building for PC host */ -#else +#include "nrf_error.h" - /* Family selection for family includes. */ - #if defined (NRF51) - #include "nrf51.h" - #include "nrf51_bitfields.h" - #include "nrf51_deprecated.h" - #elif defined (NRF52) - #include "nrf52.h" - #include "nrf52_bitfields.h" - #include "nrf51_to_nrf52.h" - #include "nrf52_name_change.h" - #else - #error "Device family must be defined. See nrf.h." - #endif /* NRF51, NRF52 */ +#ifdef __cplusplus +extern "C" { +#endif - #include "compiler_abstraction.h" +#define NRF_ERROR_SDM_LFCLK_SOURCE_UNKNOWN (NRF_ERROR_SDM_BASE_NUM + 0) ///< Unknown lfclk source. +#define NRF_ERROR_SDM_INCORRECT_INTERRUPT_CONFIGURATION (NRF_ERROR_SDM_BASE_NUM + 1) ///< Incorrect interrupt configuration (can be caused by using illegal priority levels, or having enabled SoftDevice interrupts). +#define NRF_ERROR_SDM_INCORRECT_CLENR0 (NRF_ERROR_SDM_BASE_NUM + 2) ///< Incorrect CLENR0 (can be caused by erronous SoftDevice flashing). -#endif /* _WIN32 || __unix || __APPLE__ */ +#ifdef __cplusplus +} +#endif +#endif // NRF_ERROR_SDM_H__ -#endif /* NRF_H */ +/** + @} + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error_soc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error_soc.h new file mode 100644 index 0000000000..93958a44d0 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error_soc.h @@ -0,0 +1,82 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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 nrf_soc_api + @{ + @defgroup nrf_soc_error SoC Library Error Codes + @{ + + @brief Error definitions for the SoC library + +*/ + +/* Header guard */ +#ifndef NRF_ERROR_SOC_H__ +#define NRF_ERROR_SOC_H__ + +#include "nrf_error.h" +#ifdef __cplusplus +extern "C" { +#endif + +/* Mutex Errors */ +#define NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN (NRF_ERROR_SOC_BASE_NUM + 0) ///< Mutex already taken + +/* NVIC errors */ +#define NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE (NRF_ERROR_SOC_BASE_NUM + 1) ///< NVIC interrupt not available +#define NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED (NRF_ERROR_SOC_BASE_NUM + 2) ///< NVIC interrupt priority not allowed +#define NRF_ERROR_SOC_NVIC_SHOULD_NOT_RETURN (NRF_ERROR_SOC_BASE_NUM + 3) ///< NVIC should not return + +/* Power errors */ +#define NRF_ERROR_SOC_POWER_MODE_UNKNOWN (NRF_ERROR_SOC_BASE_NUM + 4) ///< Power mode unknown +#define NRF_ERROR_SOC_POWER_POF_THRESHOLD_UNKNOWN (NRF_ERROR_SOC_BASE_NUM + 5) ///< Power POF threshold unknown +#define NRF_ERROR_SOC_POWER_OFF_SHOULD_NOT_RETURN (NRF_ERROR_SOC_BASE_NUM + 6) ///< Power off should not return + +/* Rand errors */ +#define NRF_ERROR_SOC_RAND_NOT_ENOUGH_VALUES (NRF_ERROR_SOC_BASE_NUM + 7) ///< RAND not enough values + +/* PPI errors */ +#define NRF_ERROR_SOC_PPI_INVALID_CHANNEL (NRF_ERROR_SOC_BASE_NUM + 8) ///< Invalid PPI Channel +#define NRF_ERROR_SOC_PPI_INVALID_GROUP (NRF_ERROR_SOC_BASE_NUM + 9) ///< Invalid PPI Group + +#ifdef __cplusplus +} +#endif +#endif // NRF_ERROR_SOC_H__ +/** + @} + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_nvic.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_nvic.h new file mode 100644 index 0000000000..dae0ca5a53 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_nvic.h @@ -0,0 +1,483 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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. + * + */ +/** + * @defgroup nrf_nvic_api SoftDevice NVIC API + * @{ + * + * @note In order to use this module, the following code has to be added to a .c file: + * \code + * nrf_nvic_state_t nrf_nvic_state; + * \endcode + * + * @note Definitions and declarations starting with __ (double underscore) in this header file are + * not intended for direct use by the application. + * + * @brief APIs for the accessing NVIC when using a SoftDevice. + * + */ + +#ifndef NRF_NVIC_H__ +#define NRF_NVIC_H__ + +#include +#include "nrf.h" + +#include "nrf_error_soc.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/**@addtogroup NRF_NVIC_DEFINES Defines + * @{ */ + +/**@defgroup NRF_NVIC_ISER_DEFINES SoftDevice NVIC internal definitions + * @{ */ + +#define __NRF_NVIC_NVMC_IRQn (30) /**< The peripheral ID of the NVMC. IRQ numbers are used to identify peripherals, but the NVMC doesn't have an IRQ number in the MDK. */ + +#ifdef NRF51 + #define __NRF_NVIC_ISER_COUNT (1) /**< The number of ISER/ICER registers in the NVIC that are used. */ + + /**@brief Interrupts used by the SoftDevice. */ + #define __NRF_NVIC_SD_IRQS_0 ((uint32_t)( \ + (1U << POWER_CLOCK_IRQn) \ + | (1U << RADIO_IRQn) \ + | (1U << RTC0_IRQn) \ + | (1U << TIMER0_IRQn) \ + | (1U << RNG_IRQn) \ + | (1U << ECB_IRQn) \ + | (1U << CCM_AAR_IRQn) \ + | (1U << TEMP_IRQn) \ + | (1U << __NRF_NVIC_NVMC_IRQn) \ + | (1U << (uint32_t)SWI4_IRQn) \ + | (1U << (uint32_t)SWI5_IRQn) \ + )) + + /**@brief Interrupts available for to application. */ + #define __NRF_NVIC_APP_IRQS_0 (~__NRF_NVIC_SD_IRQS_0) +#endif + +#ifdef NRF52 + #define __NRF_NVIC_ISER_COUNT (2) /**< The number of ISER/ICER registers in the NVIC that are used. */ + + /**@brief Interrupts used by the SoftDevice. */ + #define __NRF_NVIC_SD_IRQS_0 ((uint32_t)( \ + (1U << POWER_CLOCK_IRQn) \ + | (1U << RADIO_IRQn) \ + | (1U << RTC0_IRQn) \ + | (1U << TIMER0_IRQn) \ + | (1U << RNG_IRQn) \ + | (1U << ECB_IRQn) \ + | (1U << CCM_AAR_IRQn) \ + | (1U << TEMP_IRQn) \ + | (1U << __NRF_NVIC_NVMC_IRQn) \ + | (1U << (uint32_t)SWI4_EGU4_IRQn) \ + | (1U << (uint32_t)SWI5_EGU5_IRQn) \ + )) + #define __NRF_NVIC_SD_IRQS_1 ((uint32_t)0) + + /**@brief Interrupts available for to application. */ + #define __NRF_NVIC_APP_IRQS_0 (~__NRF_NVIC_SD_IRQS_0) + #define __NRF_NVIC_APP_IRQS_1 (~__NRF_NVIC_SD_IRQS_1) +#endif +/**@} */ + +/**@} */ + +/**@addtogroup NRF_NVIC_VARIABLES Variables + * @{ */ + +/**@brief Type representing the state struct for the SoftDevice NVIC module. */ +typedef struct +{ + uint32_t volatile __irq_masks[__NRF_NVIC_ISER_COUNT]; /**< IRQs enabled by the application in the NVIC. */ + uint32_t volatile __cr_flag; /**< Non-zero if already in a critical region */ +} nrf_nvic_state_t; + +/**@brief Variable keeping the state for the SoftDevice NVIC module. This must be declared in an + * application source file. */ +extern nrf_nvic_state_t nrf_nvic_state; + +/**@} */ + +/**@addtogroup NRF_NVIC_INTERNAL_FUNCTIONS SoftDevice NVIC internal functions + * @{ */ + +/**@brief Disables IRQ interrupts globally, including the SoftDevice's interrupts. + * + * @retval The value of PRIMASK prior to disabling the interrupts. + */ +static inline int __sd_nvic_irq_disable(void) +{ + int pm = __get_PRIMASK(); + __disable_irq(); + return pm; +} + +/**@brief Enables IRQ interrupts globally, including the SoftDevice's interrupts. + */ +static inline void __sd_nvic_irq_enable(void) +{ + __enable_irq(); +} + +/**@brief Checks if IRQn is available to application + * @param[in] IRQn irq to check + * + * @retval 1 (true) if the irq to check is available to the application + */ +static inline uint32_t __sd_nvic_app_accessible_irq(IRQn_Type IRQn) +{ + if (IRQn < 32) + { + return ((1UL<= (1 << __NVIC_PRIO_BITS)) + { + return 0; + } +#ifdef NRF51 + if( priority == 0 + || priority == 2 + ) + { + return 0; + } +#endif +#ifdef NRF52 + if( priority == 0 + || priority == 1 + || priority == 4 + || priority == 5 + ) + { + return 0; + } +#endif + return 1; +} + +/**@} */ + +/**@addtogroup NRF_NVIC_FUNCTIONS SoftDevice NVIC public functions + * @{ */ + +/**@brief Enable External Interrupt. + * @note Corresponds to NVIC_EnableIRQ in CMSIS. + * + * @pre IRQn is valid and not reserved by the stack. + * + * @param[in] IRQn See the NVIC_EnableIRQ documentation in CMSIS. + * + * @retval ::NRF_SUCCESS The interrupt was enabled. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE The interrupt is not available for the application. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED The interrupt has a priority not available for the application. + */ +static inline uint32_t sd_nvic_EnableIRQ(IRQn_Type IRQn) +{ + if (!__sd_nvic_app_accessible_irq(IRQn)) + { + return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE; + } + if (!__sd_nvic_is_app_accessible_priority(NVIC_GetPriority(IRQn))) + { + return NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED; + } + + if (nrf_nvic_state.__cr_flag) + { + nrf_nvic_state.__irq_masks[(uint32_t)((int32_t)IRQn) >> 5] |= (uint32_t)(1 << ((uint32_t)((int32_t)IRQn) & (uint32_t)0x1F)); + } + else + { + NVIC_EnableIRQ(IRQn); + } + return NRF_SUCCESS; +} + +/**@brief Disable External Interrupt. + * @note Corresponds to NVIC_DisableIRQ in CMSIS. + * + * @pre IRQn is valid and not reserved by the stack. + * + * @param[in] IRQn See the NVIC_DisableIRQ documentation in CMSIS. + * + * @retval ::NRF_SUCCESS The interrupt was disabled. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE The interrupt is not available for the application. + */ +static inline uint32_t sd_nvic_DisableIRQ(IRQn_Type IRQn) +{ + if (!__sd_nvic_app_accessible_irq(IRQn)) + { + return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE; + } + + if (nrf_nvic_state.__cr_flag) + { + nrf_nvic_state.__irq_masks[(uint32_t)((int32_t)IRQn) >> 5] &= ~(1UL << ((uint32_t)(IRQn) & 0x1F)); + } + else + { + NVIC_DisableIRQ(IRQn); + } + + return NRF_SUCCESS; +} + +/**@brief Get Pending Interrupt. + * @note Corresponds to NVIC_GetPendingIRQ in CMSIS. + * + * @pre IRQn is valid and not reserved by the stack. + * + * @param[in] IRQn See the NVIC_GetPendingIRQ documentation in CMSIS. + * @param[out] p_pending_irq Return value from NVIC_GetPendingIRQ. + * + * @retval ::NRF_SUCCESS The interrupt is available for the application. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application. + */ +static inline uint32_t sd_nvic_GetPendingIRQ(IRQn_Type IRQn, uint32_t * p_pending_irq) +{ + if (__sd_nvic_app_accessible_irq(IRQn)) + { + *p_pending_irq = NVIC_GetPendingIRQ(IRQn); + return NRF_SUCCESS; + } + else + { + return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE; + } +} + +/**@brief Set Pending Interrupt. + * @note Corresponds to NVIC_SetPendingIRQ in CMSIS. + * + * @pre IRQn is valid and not reserved by the stack. + * + * @param[in] IRQn See the NVIC_SetPendingIRQ documentation in CMSIS. + * + * @retval ::NRF_SUCCESS The interrupt is set pending. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application. + */ +static inline uint32_t sd_nvic_SetPendingIRQ(IRQn_Type IRQn) +{ + if (__sd_nvic_app_accessible_irq(IRQn)) + { + NVIC_SetPendingIRQ(IRQn); + return NRF_SUCCESS; + } + else + { + return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE; + } +} + +/**@brief Clear Pending Interrupt. + * @note Corresponds to NVIC_ClearPendingIRQ in CMSIS. + * + * @pre IRQn is valid and not reserved by the stack. + * + * @param[in] IRQn See the NVIC_ClearPendingIRQ documentation in CMSIS. + * + * @retval ::NRF_SUCCESS The interrupt pending flag is cleared. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application. + */ +static inline uint32_t sd_nvic_ClearPendingIRQ(IRQn_Type IRQn) +{ + if (__sd_nvic_app_accessible_irq(IRQn)) + { + NVIC_ClearPendingIRQ(IRQn); + return NRF_SUCCESS; + } + else + { + return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE; + } +} + +/**@brief Set Interrupt Priority. + * @note Corresponds to NVIC_SetPriority in CMSIS. + * + * @pre IRQn is valid and not reserved by the stack. + * @pre Priority is valid and not reserved by the stack. + * + * @param[in] IRQn See the NVIC_SetPriority documentation in CMSIS. + * @param[in] priority A valid IRQ priority for use by the application. + * + * @retval ::NRF_SUCCESS The interrupt and priority level is available for the application. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED The interrupt priority is not available for the application. + */ +static inline uint32_t sd_nvic_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if (!__sd_nvic_app_accessible_irq(IRQn)) + { + return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE; + } + + if (!__sd_nvic_is_app_accessible_priority(priority)) + { + return NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED; + } + + NVIC_SetPriority(IRQn, (uint32_t)priority); + return NRF_SUCCESS; +} + +/**@brief Get Interrupt Priority. + * @note Corresponds to NVIC_GetPriority in CMSIS. + * + * @pre IRQn is valid and not reserved by the stack. + * + * @param[in] IRQn See the NVIC_GetPriority documentation in CMSIS. + * @param[out] p_priority Return value from NVIC_GetPriority. + * + * @retval ::NRF_SUCCESS The interrupt priority is returned in p_priority. + * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE - IRQn is not available for the application. + */ +static inline uint32_t sd_nvic_GetPriority(IRQn_Type IRQn, uint32_t * p_priority) +{ + if (__sd_nvic_app_accessible_irq(IRQn)) + { + *p_priority = (NVIC_GetPriority(IRQn) & 0xFF); + return NRF_SUCCESS; + } + else + { + return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE; + } +} + +/**@brief System Reset. + * @note Corresponds to NVIC_SystemReset in CMSIS. + * + * @retval ::NRF_ERROR_SOC_NVIC_SHOULD_NOT_RETURN + */ +static inline uint32_t sd_nvic_SystemReset(void) +{ + NVIC_SystemReset(); + return NRF_ERROR_SOC_NVIC_SHOULD_NOT_RETURN; +} + +/**@brief Enters critical region. + * + * @post Application interrupts will be disabled. + * @note sd_nvic_critical_region_enter() and ::sd_nvic_critical_region_exit() must be called in matching pairs inside each + * execution context + * @sa sd_nvic_critical_region_exit + * + * @retval ::NRF_SUCCESS + */ +static inline uint32_t sd_nvic_critical_region_enter(uint8_t * p_is_nested_critical_region) +{ + int was_masked = __sd_nvic_irq_disable(); + if (!nrf_nvic_state.__cr_flag) + { + nrf_nvic_state.__cr_flag = 1; + nrf_nvic_state.__irq_masks[0] = ( NVIC->ICER[0] & __NRF_NVIC_APP_IRQS_0 ); + NVIC->ICER[0] = __NRF_NVIC_APP_IRQS_0; + #ifdef NRF52 + nrf_nvic_state.__irq_masks[1] = ( NVIC->ICER[1] & __NRF_NVIC_APP_IRQS_1 ); + NVIC->ICER[1] = __NRF_NVIC_APP_IRQS_1; + #endif + *p_is_nested_critical_region = 0; + } + else + { + *p_is_nested_critical_region = 1; + } + if (!was_masked) + { + __sd_nvic_irq_enable(); + } + return NRF_SUCCESS; +} + +/**@brief Exit critical region. + * + * @pre Application has entered a critical region using ::sd_nvic_critical_region_enter. + * @post If not in a nested critical region, the application interrupts will restored to the state before ::sd_nvic_critical_region_enter was called. + * + * @param[in] is_nested_critical_region If this is set to 1, the critical region won't be exited. @sa sd_nvic_critical_region_enter. + * + * @retval ::NRF_SUCCESS + */ +static inline uint32_t sd_nvic_critical_region_exit(uint8_t is_nested_critical_region) +{ + if (nrf_nvic_state.__cr_flag && (is_nested_critical_region == 0)) + { + int was_masked = __sd_nvic_irq_disable(); + NVIC->ISER[0] = nrf_nvic_state.__irq_masks[0]; + #ifdef NRF52 + NVIC->ISER[1] = nrf_nvic_state.__irq_masks[1]; + #endif + nrf_nvic_state.__cr_flag = 0; + if (!was_masked) + { + __sd_nvic_irq_enable(); + } + } + + return NRF_SUCCESS; +} +/**@} */ + +#ifdef __cplusplus +} +#endif + +#endif // NRF_NVIC_H__ + +/**@} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_sd_def.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_sd_def.h new file mode 100644 index 0000000000..5b58c4f259 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_sd_def.h @@ -0,0 +1,23 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef NRF_SD_DEF_H__ +#define NRF_SD_DEF_H__ + +#include + +#define SD_PPI_CHANNELS_USED 0xFFF0C000uL /**< PPI channels utilized by SotfDevice (not available to the application). */ +#define SD_PPI_GROUPS_USED 0x0000000CuL /**< PPI groups utilized by SoftDevice (not available to the application). */ +#define SD_TIMERS_USED 0x00000001uL /**< Timers used by SoftDevice. */ +#define SD_SWI_USED 0x0000003CuL /**< Software interrupts used by SoftDevice */ + +#endif /* NRF_SD_DEF_H__ */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_sdm.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_sdm.h new file mode 100644 index 0000000000..9b673ea4f7 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_sdm.h @@ -0,0 +1,271 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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. + * + */ +/** + @defgroup nrf_sdm_api SoftDevice Manager API + @{ + + @brief APIs for SoftDevice management. + +*/ + +/* Header guard */ +#ifndef NRF_SDM_H__ +#define NRF_SDM_H__ + +#include "nrf_svc.h" +#include "nrf.h" +#include "nrf_soc.h" +#include "nrf_error_sdm.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** @addtogroup NRF_SDM_DEFINES Defines + * @{ */ +#ifdef NRFSOC_DOXYGEN +//Stuff defined elsewere, to satisfy doxygen +#define MBR_SIZE 0 +#warning test +#endif + +/** @brief SoftDevice Manager SVC Base number. */ +#define SDM_SVC_BASE 0x10 + +/** @brief Defines the SoftDevice Information Structure location (address) as an offset from +the start of the softdevice (without MBR)*/ +#define SOFTDEVICE_INFO_STRUCT_OFFSET (0x2000) + +/** @brief Defines the absolute Softdevice information structure location (address)*/ +#define SOFTDEVICE_INFO_STRUCT_ADDRESS (SOFTDEVICE_INFO_STRUCT_OFFSET + MBR_SIZE) + +/** @brief Defines the offset for Softdevice size value relative to Softdevice base address*/ +#define SD_SIZE_OFFSET (SOFTDEVICE_INFO_STRUCT_OFFSET + 0x08) + +/** @brief Defines the offset for FWID value relative to Softdevice base address*/ +#define SD_FWID_OFFSET (SOFTDEVICE_INFO_STRUCT_OFFSET + 0x0C) + +/** @brief Defines a macro for retreiving the actual Softdevice size value from a given base address + use @ref MBR_SIZE when Softdevice is installed just above the MBR (the usual case)*/ +#define SD_SIZE_GET(baseaddr) (*((uint32_t *) ((baseaddr) + SD_SIZE_OFFSET))) + +/** @brief Defines a macro for retreiving the actual FWID value from a given base address + use @ref MBR_SIZE when Softdevice is installed just above the MBR (the usual case)*/ +#define SD_FWID_GET(baseaddr) ((*((uint32_t *) ((baseaddr) + SD_FWID_OFFSET))) & 0xFFFF) + +/**@defgroup NRF_FAULT_ID_RANGES Fault ID ranges + * @{ */ +#define NRF_FAULT_ID_SD_RANGE_START 0x00000000 /**< SoftDevice ID range start. */ +#define NRF_FAULT_ID_APP_RANGE_START 0x00001000 /**< Application ID range start. */ +/**@} */ + +/**@defgroup NRF_FAULT_IDS Fault ID types + * @{ */ +#define NRF_FAULT_ID_SD_ASSERT (NRF_FAULT_ID_SD_RANGE_START + 1) /**< SoftDevice assertion. The info parameter will be set to 0x00000000. */ +#define NRF_FAULT_ID_APP_MEMACC (NRF_FAULT_ID_APP_RANGE_START + 1) /**< Application invalid memory access. The info parameter will contain the address in memory that was accessed. */ +/**@} */ + +/** @} */ + +/** @addtogroup NRF_SDM_ENUMS Enumerations + * @{ */ + +/**@brief nRF SoftDevice Manager API SVC numbers. */ +enum NRF_SD_SVCS +{ + SD_SOFTDEVICE_ENABLE = SDM_SVC_BASE, /**< ::sd_softdevice_enable */ + SD_SOFTDEVICE_DISABLE, /**< ::sd_softdevice_disable */ + SD_SOFTDEVICE_IS_ENABLED, /**< ::sd_softdevice_is_enabled */ + SD_SOFTDEVICE_VECTOR_TABLE_BASE_SET, /**< ::sd_softdevice_vector_table_base_set */ + SVC_SDM_LAST /**< Placeholder for last SDM SVC */ +}; + +/** @} */ + +/** @addtogroup NRF_SDM_DEFINES Defines + * @{ */ + +/**@defgroup NRF_CLOCK_LF_XTAL_ACCURACY Clock accuracy * @{ */ + +#define NRF_CLOCK_LF_XTAL_ACCURACY_250_PPM (0) /* Default */ +#define NRF_CLOCK_LF_XTAL_ACCURACY_500_PPM (1) +#define NRF_CLOCK_LF_XTAL_ACCURACY_150_PPM (2) +#define NRF_CLOCK_LF_XTAL_ACCURACY_100_PPM (3) +#define NRF_CLOCK_LF_XTAL_ACCURACY_75_PPM (4) +#define NRF_CLOCK_LF_XTAL_ACCURACY_50_PPM (5) +#define NRF_CLOCK_LF_XTAL_ACCURACY_30_PPM (6) +#define NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM (7) + +/** @} */ + +/**@defgroup NRF_CLOCK_LF_SRC Possible lfclk oscillator sources * @{ */ + +#define NRF_CLOCK_LF_SRC_RC (0) /**< LFCLK RC oscillator. */ +#define NRF_CLOCK_LF_SRC_XTAL (1) /**< LFCLK crystal oscillator. */ +#define NRF_CLOCK_LF_SRC_SYNTH (2) /**< LFCLK Synthesized from HFCLK. */ + +/** @} */ +/** @} */ + +/** @addtogroup NRF_SDM_TYPES Types + * @{ */ + +/**@brief Type representing lfclk oscillator source. */ +typedef struct +{ + uint8_t source; /**< LF oscillator clock source, see @ref NRF_CLOCK_LF_SRC. */ + uint8_t rc_ctiv; /**< Only for NRF_CLOCK_LF_SRC_RC: Calibration timer interval in 1/4 second + units (nRF51: 1-64, nRF52: 1-32). + @note To avoid excessive clock drift, 0.5 degrees Celsius is the + maximum temperature change allowed in one calibration timer + interval. The interval should be selected to ensure this. + + @note Must be 0 if source is not NRF_CLOCK_LF_SRC_RC. */ + uint8_t rc_temp_ctiv; /**< Only for NRF_CLOCK_LF_SRC_RC: How often (in number of calibration + intervals) the RC oscillator shall be calibrated if the temperature + hasn't changed. + 0: Always calibrate even if the temperature hasn't changed. + 1: Only calibrate if the temperature has changed (nRF51 only). + 2-33: Check the temperature and only calibrate if it has changed, + however calibration will take place every rc_temp_ctiv + intervals in any case. + + @note Must be 0 if source is not NRF_CLOCK_LF_SRC_RC. + + @note For nRF52, the application must ensure calibration at least once + every 8 seconds to ensure +/-250ppm clock stability. The + recommended configuration for NRF_CLOCK_LF_SRC_RC on nRF52 is + rc_ctiv=16 and rc_temp_ctiv=2. This will ensure calibration at + least once every 8 seconds and for temperature changes of 0.5 + degrees Celsius every 4 seconds. See the Product Specification + for the nRF52 device being used for more information.*/ + uint8_t xtal_accuracy; /**< External crystal clock accuracy used in the LL to compute timing windows. + + @note For the NRF_CLOCK_LF_SRC_RC clock source this parameter is ignored. */ +} nrf_clock_lf_cfg_t; + +/**@brief Fault Handler type. + * + * When certain unrecoverable errors occur within the application or SoftDevice the fault handler will be called back. + * The protocol stack will be in an undefined state when this happens and the only way to recover will be to + * perform a reset, using e.g. CMSIS NVIC_SystemReset(). + * + * @note This callback is executed in HardFault context, thus SVC functions cannot be called from the fault callback. + * + * @param[in] id Fault identifier. See @ref NRF_FAULT_IDS. + * @param[in] pc The program counter of the instruction that triggered the fault. + * @param[in] info Optional additional information regarding the fault. Refer to each Fault identifier for details. + */ +typedef void (*nrf_fault_handler_t)(uint32_t id, uint32_t pc, uint32_t info); + +/** @} */ + +/** @addtogroup NRF_SDM_FUNCTIONS Functions + * @{ */ + +/**@brief Enables the SoftDevice and by extension the protocol stack. + * + * @note Some care must be taken if a low frequency clock source is already running when calling this function: + * If the LF clock has a different source then the one currently running, it will be stopped. Then, the new + * clock source will be started. + * + * @note This function has no effect when returning with an error. + * + * @post If return code is ::NRF_SUCCESS + * - SoC library and protocol stack APIs are made available. + * - A portion of RAM will be unavailable (see relevant SDS documentation). + * - Some peripherals will be unavailable or available only through the SoC API (see relevant SDS documentation). + * - Interrupts will not arrive from protected peripherals or interrupts. + * - nrf_nvic_ functions must be used instead of CMSIS NVIC_ functions for reliable usage of the SoftDevice. + * - Interrupt latency may be affected by the SoftDevice (see relevant SDS documentation). + * - Chosen low frequency clock source will be running. + * + * @param p_clock_lf_cfg Low frequency clock source and accuracy. + If NULL the clock will be configured as an rc source with rc_ctiv = 16 and .rc_temp_ctiv = 2 + In the case of XTAL source, the PPM accuracy of the chosen clock source must be greater than or equal to the actual characteristics of your XTAL clock. + * @param fault_handler Callback to be invoked in case of fault. + * + * @retval ::NRF_SUCCESS + * @retval ::NRF_ERROR_INVALID_STATE SoftDevice is already enabled, and the clock source and fault handler cannot be updated. + * @retval ::NRF_ERROR_SDM_INCORRECT_INTERRUPT_CONFIGURATION SoftDevice interrupt is already enabled, or an enabled interrupt has an illegal priority level. + * @retval ::NRF_ERROR_SDM_LFCLK_SOURCE_UNKNOWN Unknown low frequency clock source selected. + */ +SVCALL(SD_SOFTDEVICE_ENABLE, uint32_t, sd_softdevice_enable(nrf_clock_lf_cfg_t const * p_clock_lf_cfg, nrf_fault_handler_t fault_handler)); + + +/**@brief Disables the SoftDevice and by extension the protocol stack. + * + * Idempotent function to disable the SoftDevice. + * + * @post SoC library and protocol stack APIs are made unavailable. + * @post All interrupts that was protected by the SoftDevice will be disabled and initialized to priority 0 (highest). + * @post All peripherals used by the SoftDevice will be reset to default values. + * @post All of RAM become available. + * @post All interrupts are forwarded to the application. + * @post LFCLK source chosen in ::sd_softdevice_enable will be left running. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_SOFTDEVICE_DISABLE, uint32_t, sd_softdevice_disable(void)); + +/**@brief Check if the SoftDevice is enabled. + * + * @param[out] p_softdevice_enabled If the SoftDevice is enabled: 1 else 0. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_SOFTDEVICE_IS_ENABLED, uint32_t, sd_softdevice_is_enabled(uint8_t * p_softdevice_enabled)); + +/**@brief Sets the base address of the interrupt vector table for interrupts forwarded from the SoftDevice + * + * This function is only intended to be called when a bootloader is enabled. + * + * @param[in] address The base address of the interrupt vector table for forwarded interrupts. + + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_SOFTDEVICE_VECTOR_TABLE_BASE_SET, uint32_t, sd_softdevice_vector_table_base_set(uint32_t address)); + +/** @} */ + +#ifdef __cplusplus +} +#endif +#endif // NRF_SDM_H__ + +/** + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_soc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_soc.h new file mode 100644 index 0000000000..f3c0b0dfa4 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_soc.h @@ -0,0 +1,908 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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. + * + */ +/** + * @defgroup nrf_soc_api SoC Library API + * @{ + * + * @brief APIs for the SoC library. + * + */ + +#ifndef NRF_SOC_H__ +#define NRF_SOC_H__ + +#include +#include +#include "nrf_svc.h" +#include "nrf.h" + +#include "nrf_error_soc.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/**@addtogroup NRF_SOC_DEFINES Defines + * @{ */ + +/**@brief The number of the lowest SVC number reserved for the SoC library. */ +#define SOC_SVC_BASE (0x20) +#define SOC_SVC_BASE_NOT_AVAILABLE (0x2B) + +/**@brief Guranteed time for application to process radio inactive notification. */ +#define NRF_RADIO_NOTIFICATION_INACTIVE_GUARANTEED_TIME_US (62) + +/**@brief The minimum allowed timeslot extension time. */ +#define NRF_RADIO_MINIMUM_TIMESLOT_LENGTH_EXTENSION_TIME_US (200) + +#define SOC_ECB_KEY_LENGTH (16) /**< ECB key length. */ +#define SOC_ECB_CLEARTEXT_LENGTH (16) /**< ECB cleartext length. */ +#define SOC_ECB_CIPHERTEXT_LENGTH (SOC_ECB_CLEARTEXT_LENGTH) /**< ECB ciphertext length. */ + +#ifdef NRF51 +#define SD_EVT_IRQn (SWI2_IRQn) /**< SoftDevice Event IRQ number. Used for both protocol events and SoC events. */ +#define SD_EVT_IRQHandler (SWI2_IRQHandler) /**< SoftDevice Event IRQ handler. Used for both protocol events and SoC events. */ +#define RADIO_NOTIFICATION_IRQn (SWI1_IRQn) /**< The radio notification IRQ number. */ +#define RADIO_NOTIFICATION_IRQHandler (SWI1_IRQHandler) /**< The radio notification IRQ handler. */ +#endif +#ifdef NRF52 +#define SD_EVT_IRQn (SWI2_EGU2_IRQn) /**< SoftDevice Event IRQ number. Used for both protocol events and SoC events. */ +#define SD_EVT_IRQHandler (SWI2_EGU2_IRQHandler) /**< SoftDevice Event IRQ handler. Used for both protocol events and SoC events. */ +#define RADIO_NOTIFICATION_IRQn (SWI1_EGU1_IRQn) /**< The radio notification IRQ number. */ +#define RADIO_NOTIFICATION_IRQHandler (SWI1_EGU1_IRQHandler) /**< The radio notification IRQ handler. */ +#endif + +#define NRF_RADIO_LENGTH_MIN_US (100) /**< The shortest allowed radio timeslot, in microseconds. */ +#define NRF_RADIO_LENGTH_MAX_US (100000) /**< The longest allowed radio timeslot, in microseconds. */ + +#define NRF_RADIO_DISTANCE_MAX_US (128000000UL - 1UL) /**< The longest timeslot distance, in microseconds, allowed for the distance parameter (see @ref nrf_radio_request_normal_t) in the request. */ + +#define NRF_RADIO_EARLIEST_TIMEOUT_MAX_US (128000000UL - 1UL) /**< The longest timeout, in microseconds, allowed when requesting the earliest possible timeslot. */ + +#define NRF_RADIO_START_JITTER_US (2) /**< The maximum jitter in @ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_START relative to the requested start time. */ + +/**@} */ + +/**@addtogroup NRF_SOC_ENUMS Enumerations + * @{ */ + +/**@brief The SVC numbers used by the SVC functions in the SoC library. */ +enum NRF_SOC_SVCS +{ + SD_PPI_CHANNEL_ENABLE_GET = SOC_SVC_BASE, + SD_PPI_CHANNEL_ENABLE_SET, + SD_PPI_CHANNEL_ENABLE_CLR, + SD_PPI_CHANNEL_ASSIGN, + SD_PPI_GROUP_TASK_ENABLE, + SD_PPI_GROUP_TASK_DISABLE, + SD_PPI_GROUP_ASSIGN, + SD_PPI_GROUP_GET, + SD_FLASH_PAGE_ERASE, + SD_FLASH_WRITE, + SD_FLASH_PROTECT, + SD_MUTEX_NEW = SOC_SVC_BASE_NOT_AVAILABLE, + SD_MUTEX_ACQUIRE, + SD_MUTEX_RELEASE, + SD_RFU_1, + SD_RFU_2, + SD_RFU_3, + SD_RFU_4, + SD_RFU_5, + SD_RFU_6, + SD_RFU_7, + SD_RFU_8, + SD_RFU_9, + SD_RFU_10, + SD_RAND_APPLICATION_POOL_CAPACITY_GET, + SD_RAND_APPLICATION_BYTES_AVAILABLE_GET, + SD_RAND_APPLICATION_VECTOR_GET, + SD_POWER_MODE_SET, + SD_POWER_SYSTEM_OFF, + SD_POWER_RESET_REASON_GET, + SD_POWER_RESET_REASON_CLR, + SD_POWER_POF_ENABLE, + SD_POWER_POF_THRESHOLD_SET, + SD_POWER_RAMON_SET, + SD_POWER_RAMON_CLR, + SD_POWER_RAMON_GET, + SD_POWER_GPREGRET_SET, + SD_POWER_GPREGRET_CLR, + SD_POWER_GPREGRET_GET, + SD_POWER_DCDC_MODE_SET, + SD_APP_EVT_WAIT, + SD_CLOCK_HFCLK_REQUEST, + SD_CLOCK_HFCLK_RELEASE, + SD_CLOCK_HFCLK_IS_RUNNING, + SD_RADIO_NOTIFICATION_CFG_SET, + SD_ECB_BLOCK_ENCRYPT, + SD_ECB_BLOCKS_ENCRYPT, + SD_RADIO_SESSION_OPEN, + SD_RADIO_SESSION_CLOSE, + SD_RADIO_REQUEST, + SD_EVT_GET, + SD_TEMP_GET, + SVC_SOC_LAST +}; + +/**@brief Possible values of a ::nrf_mutex_t. */ +enum NRF_MUTEX_VALUES +{ + NRF_MUTEX_FREE, + NRF_MUTEX_TAKEN +}; + +/**@brief Power modes. */ +enum NRF_POWER_MODES +{ + NRF_POWER_MODE_CONSTLAT, /**< Constant latency mode. See power management in the reference manual. */ + NRF_POWER_MODE_LOWPWR /**< Low power mode. See power management in the reference manual. */ +}; + + +/**@brief Power failure thresholds */ +enum NRF_POWER_THRESHOLDS +{ + NRF_POWER_THRESHOLD_V21, /**< 2.1 Volts power failure threshold. */ + NRF_POWER_THRESHOLD_V23, /**< 2.3 Volts power failure threshold. */ + NRF_POWER_THRESHOLD_V25, /**< 2.5 Volts power failure threshold. */ + NRF_POWER_THRESHOLD_V27 /**< 2.7 Volts power failure threshold. */ +}; + + +/**@brief DC/DC converter modes. */ +enum NRF_POWER_DCDC_MODES +{ + NRF_POWER_DCDC_DISABLE, /**< The DCDC is disabled. */ + NRF_POWER_DCDC_ENABLE /**< The DCDC is enabled. */ +}; + +/**@brief Radio notification distances. */ +enum NRF_RADIO_NOTIFICATION_DISTANCES +{ + NRF_RADIO_NOTIFICATION_DISTANCE_NONE = 0, /**< The event does not have a notification. */ + NRF_RADIO_NOTIFICATION_DISTANCE_800US, /**< The distance from the active notification to start of radio activity. */ + NRF_RADIO_NOTIFICATION_DISTANCE_1740US, /**< The distance from the active notification to start of radio activity. */ + NRF_RADIO_NOTIFICATION_DISTANCE_2680US, /**< The distance from the active notification to start of radio activity. */ + NRF_RADIO_NOTIFICATION_DISTANCE_3620US, /**< The distance from the active notification to start of radio activity. */ + NRF_RADIO_NOTIFICATION_DISTANCE_4560US, /**< The distance from the active notification to start of radio activity. */ + NRF_RADIO_NOTIFICATION_DISTANCE_5500US /**< The distance from the active notification to start of radio activity. */ +}; + + +/**@brief Radio notification types. */ +enum NRF_RADIO_NOTIFICATION_TYPES +{ + NRF_RADIO_NOTIFICATION_TYPE_NONE = 0, /**< The event does not have a radio notification signal. */ + NRF_RADIO_NOTIFICATION_TYPE_INT_ON_ACTIVE, /**< Using interrupt for notification when the radio will be enabled. */ + NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE, /**< Using interrupt for notification when the radio has been disabled. */ + NRF_RADIO_NOTIFICATION_TYPE_INT_ON_BOTH, /**< Using interrupt for notification both when the radio will be enabled and disabled. */ +}; + +/**@brief The Radio signal callback types. */ +enum NRF_RADIO_CALLBACK_SIGNAL_TYPE +{ + NRF_RADIO_CALLBACK_SIGNAL_TYPE_START, /**< This signal indicates the start of the radio timeslot. */ + NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0, /**< This signal indicates the NRF_TIMER0 interrupt. */ + NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO, /**< This signal indicates the NRF_RADIO interrupt. */ + NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_FAILED, /**< This signal indicates extend action failed. */ + NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_SUCCEEDED /**< This signal indicates extend action succeeded. */ +}; + +/**@brief The actions requested by the signal callback. + * + * This code gives the SOC instructions about what action to take when the signal callback has + * returned. + */ +enum NRF_RADIO_SIGNAL_CALLBACK_ACTION +{ + NRF_RADIO_SIGNAL_CALLBACK_ACTION_NONE, /**< Return without action. */ + NRF_RADIO_SIGNAL_CALLBACK_ACTION_EXTEND, /**< Request an extension of the current timeslot (maximum execution time for this action is when the extension succeeded). */ + NRF_RADIO_SIGNAL_CALLBACK_ACTION_END, /**< End the current radio timeslot. */ + NRF_RADIO_SIGNAL_CALLBACK_ACTION_REQUEST_AND_END /**< Request a new radio timeslot and end the current timeslot. */ +}; + +/**@brief Radio timeslot high frequency clock source configuration. */ +enum NRF_RADIO_HFCLK_CFG +{ + NRF_RADIO_HFCLK_CFG_XTAL_GUARANTEED, /**< The SoftDevice will guarantee that the high frequency clock source is the + external crystal for the whole duration of the timeslot. This should be the + preferred option for events that use the radio or require high timing accuracy. */ + NRF_RADIO_HFCLK_CFG_NO_GUARANTEE /**< This configuration allows for earlier and tighter scheduling of timeslots. + The RC oscillator may be the clock source in part or for the whole duration of the timeslot. + The RC oscillator's accuracy must therefore be taken into consideration. + @note If the application will use the radio peripheral in timeslots with this configuration, + it must make sure that the crystal is running and stable before starting the radio. */ +}; + +/**@brief Radio timeslot priorities. */ +enum NRF_RADIO_PRIORITY +{ + NRF_RADIO_PRIORITY_HIGH, /**< High (equal priority as the normal connection priority of the SoftDevice stack(s)). */ + NRF_RADIO_PRIORITY_NORMAL, /**< Normal (equal priority as the priority of secondary activites of the SoftDevice stack(s)). */ +}; + +/**@brief Radio timeslot request type. */ +enum NRF_RADIO_REQUEST_TYPE +{ + NRF_RADIO_REQ_TYPE_EARLIEST, /**< Request radio timeslot as early as possible. This should always be used for the first request in a session. */ + NRF_RADIO_REQ_TYPE_NORMAL /**< Normal radio timeslot request. */ +}; + +/**@brief SoC Events. */ +enum NRF_SOC_EVTS +{ + NRF_EVT_HFCLKSTARTED, /**< Event indicating that the HFCLK has started. */ + NRF_EVT_POWER_FAILURE_WARNING, /**< Event indicating that a power failure warning has occurred. */ + NRF_EVT_FLASH_OPERATION_SUCCESS, /**< Event indicating that the ongoing flash operation has completed successfully. */ + NRF_EVT_FLASH_OPERATION_ERROR, /**< Event indicating that the ongoing flash operation has timed out with an error. */ + NRF_EVT_RADIO_BLOCKED, /**< Event indicating that a radio timeslot was blocked. */ + NRF_EVT_RADIO_CANCELED, /**< Event indicating that a radio timeslot was canceled by SoftDevice. */ + NRF_EVT_RADIO_SIGNAL_CALLBACK_INVALID_RETURN, /**< Event indicating that a radio timeslot signal callback handler return was invalid. */ + NRF_EVT_RADIO_SESSION_IDLE, /**< Event indicating that a radio timeslot session is idle. */ + NRF_EVT_RADIO_SESSION_CLOSED, /**< Event indicating that a radio timeslot session is closed. */ + NRF_EVT_NUMBER_OF_EVTS +}; + +/**@} */ + + +/**@addtogroup NRF_SOC_STRUCTURES Structures + * @{ */ + +/**@brief Represents a mutex for use with the nrf_mutex functions. + * @note Accessing the value directly is not safe, use the mutex functions! + */ +typedef volatile uint8_t nrf_mutex_t; + +/**@brief Parameters for a request for a timeslot as early as possible. */ +typedef struct +{ + uint8_t hfclk; /**< High frequency clock source, see @ref NRF_RADIO_HFCLK_CFG. */ + uint8_t priority; /**< The radio timeslot priority, see @ref NRF_RADIO_PRIORITY. */ + uint32_t length_us; /**< The radio timeslot length (in the range 100 to 100,000] microseconds). */ + uint32_t timeout_us; /**< Longest acceptable delay until the start of the requested timeslot (up to @ref NRF_RADIO_EARLIEST_TIMEOUT_MAX_US microseconds). */ +} nrf_radio_request_earliest_t; + +/**@brief Parameters for a normal radio timeslot request. */ +typedef struct +{ + uint8_t hfclk; /**< High frequency clock source, see @ref NRF_RADIO_HFCLK_CFG. */ + uint8_t priority; /**< The radio timeslot priority, see @ref NRF_RADIO_PRIORITY. */ + uint32_t distance_us; /**< Distance from the start of the previous radio timeslot (up to @ref NRF_RADIO_DISTANCE_MAX_US microseconds). */ + uint32_t length_us; /**< The radio timeslot length (in the range [100..100,000] microseconds). */ +} nrf_radio_request_normal_t; + +/**@brief Radio timeslot request parameters. */ +typedef struct +{ + uint8_t request_type; /**< Type of request, see @ref NRF_RADIO_REQUEST_TYPE. */ + union + { + nrf_radio_request_earliest_t earliest; /**< Parameters for requesting a radio timeslot as early as possible. */ + nrf_radio_request_normal_t normal; /**< Parameters for requesting a normal radio timeslot. */ + } params; +} nrf_radio_request_t; + +/**@brief Return parameters of the radio timeslot signal callback. */ +typedef struct +{ + uint8_t callback_action; /**< The action requested by the application when returning from the signal callback, see @ref NRF_RADIO_SIGNAL_CALLBACK_ACTION. */ + union + { + struct + { + nrf_radio_request_t * p_next; /**< The request parameters for the next radio timeslot. */ + } request; /**< Additional parameters for return_code @ref NRF_RADIO_SIGNAL_CALLBACK_ACTION_REQUEST_AND_END. */ + struct + { + uint32_t length_us; /**< Requested extension of the radio timeslot duration (microseconds) (for minimum time see @ref NRF_RADIO_MINIMUM_TIMESLOT_LENGTH_EXTENSION_TIME_US). */ + } extend; /**< Additional parameters for return_code @ref NRF_RADIO_SIGNAL_CALLBACK_ACTION_EXTEND. */ + } params; +} nrf_radio_signal_callback_return_param_t; + +/**@brief The radio timeslot signal callback type. + * + * @note In case of invalid return parameters, the radio timeslot will automatically end + * immediately after returning from the signal callback and the + * @ref NRF_EVT_RADIO_SIGNAL_CALLBACK_INVALID_RETURN event will be sent. + * @note The returned struct pointer must remain valid after the signal callback + * function returns. For instance, this means that it must not point to a stack variable. + * + * @param[in] signal_type Type of signal, see @ref NRF_RADIO_CALLBACK_SIGNAL_TYPE. + * + * @return Pointer to structure containing action requested by the application. + */ +typedef nrf_radio_signal_callback_return_param_t * (*nrf_radio_signal_callback_t) (uint8_t signal_type); + +/**@brief AES ECB parameter typedefs */ +typedef uint8_t soc_ecb_key_t[SOC_ECB_KEY_LENGTH]; +typedef uint8_t soc_ecb_cleartext_t[SOC_ECB_CLEARTEXT_LENGTH]; +typedef uint8_t soc_ecb_ciphertext_t[SOC_ECB_CIPHERTEXT_LENGTH]; + +/**@brief AES ECB data structure */ +typedef struct +{ + soc_ecb_key_t key; /**< Encryption key. */ + soc_ecb_cleartext_t cleartext; /**< Cleartext data. */ + soc_ecb_ciphertext_t ciphertext; /**< Ciphertext data. */ +} nrf_ecb_hal_data_t; + +/**@brief AES ECB block. Used to provide multiple blocks in a single call + to @ref sd_ecb_blocks_encrypt.*/ +typedef struct +{ + soc_ecb_key_t* p_key; /**< Pointer to the Encryption key. */ + soc_ecb_cleartext_t* p_cleartext; /**< Pointer to the Cleartext data. */ + soc_ecb_ciphertext_t* p_ciphertext; /**< Pointer to the Ciphertext data. */ +} nrf_ecb_hal_data_block_t; + +/**@} */ + +/**@addtogroup NRF_SOC_FUNCTIONS Functions + * @{ */ + +/**@brief Initialize a mutex. + * + * @param[in] p_mutex Pointer to the mutex to initialize. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_MUTEX_NEW, uint32_t, sd_mutex_new(nrf_mutex_t * p_mutex)); + +/**@brief Attempt to acquire a mutex. + * + * @param[in] p_mutex Pointer to the mutex to acquire. + * + * @retval ::NRF_SUCCESS The mutex was successfully acquired. + * @retval ::NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN The mutex could not be acquired. + */ +SVCALL(SD_MUTEX_ACQUIRE, uint32_t, sd_mutex_acquire(nrf_mutex_t * p_mutex)); + +/**@brief Release a mutex. + * + * @param[in] p_mutex Pointer to the mutex to release. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_MUTEX_RELEASE, uint32_t, sd_mutex_release(nrf_mutex_t * p_mutex)); + +/**@brief Query the capacity of the application random pool. + * + * @param[out] p_pool_capacity The capacity of the pool. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_RAND_APPLICATION_POOL_CAPACITY_GET, uint32_t, sd_rand_application_pool_capacity_get(uint8_t * p_pool_capacity)); + +/**@brief Get number of random bytes available to the application. + * + * @param[out] p_bytes_available The number of bytes currently available in the pool. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_RAND_APPLICATION_BYTES_AVAILABLE_GET, uint32_t, sd_rand_application_bytes_available_get(uint8_t * p_bytes_available)); + +/**@brief Get random bytes from the application pool. + * + * @param[out] p_buff Pointer to unit8_t buffer for storing the bytes. + * @param[in] length Number of bytes to take from pool and place in p_buff. + * + * @retval ::NRF_SUCCESS The requested bytes were written to p_buff. + * @retval ::NRF_ERROR_SOC_RAND_NOT_ENOUGH_VALUES No bytes were written to the buffer, because there were not enough bytes available. +*/ +SVCALL(SD_RAND_APPLICATION_VECTOR_GET, uint32_t, sd_rand_application_vector_get(uint8_t * p_buff, uint8_t length)); + +/**@brief Gets the reset reason register. + * + * @param[out] p_reset_reason Contents of the NRF_POWER->RESETREAS register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_RESET_REASON_GET, uint32_t, sd_power_reset_reason_get(uint32_t * p_reset_reason)); + +/**@brief Clears the bits of the reset reason register. + * + * @param[in] reset_reason_clr_msk Contains the bits to clear from the reset reason register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_RESET_REASON_CLR, uint32_t, sd_power_reset_reason_clr(uint32_t reset_reason_clr_msk)); + +/**@brief Sets the power mode when in CPU sleep. + * + * @param[in] power_mode The power mode to use when in CPU sleep, see @ref NRF_POWER_MODES. @sa sd_app_evt_wait + * + * @retval ::NRF_SUCCESS The power mode was set. + * @retval ::NRF_ERROR_SOC_POWER_MODE_UNKNOWN The power mode was unknown. + */ +SVCALL(SD_POWER_MODE_SET, uint32_t, sd_power_mode_set(uint8_t power_mode)); + +/**@brief Puts the chip in System OFF mode. + * + * @retval ::NRF_ERROR_SOC_POWER_OFF_SHOULD_NOT_RETURN + */ +SVCALL(SD_POWER_SYSTEM_OFF, uint32_t, sd_power_system_off(void)); + +/**@brief Enables or disables the power-fail comparator. + * + * Enabling this will give a softdevice event (NRF_EVT_POWER_FAILURE_WARNING) when the power failure warning occurs. + * The event can be retrieved with sd_evt_get(); + * + * @param[in] pof_enable True if the power-fail comparator should be enabled, false if it should be disabled. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_POF_ENABLE, uint32_t, sd_power_pof_enable(uint8_t pof_enable)); + +/**@brief Sets the power-fail threshold value. + * + * @param[in] threshold The power-fail threshold value to use, see @ref NRF_POWER_THRESHOLDS. + * + * @retval ::NRF_SUCCESS The power failure threshold was set. + * @retval ::NRF_ERROR_SOC_POWER_POF_THRESHOLD_UNKNOWN The power failure threshold is unknown. + */ +SVCALL(SD_POWER_POF_THRESHOLD_SET, uint32_t, sd_power_pof_threshold_set(uint8_t threshold)); + +/**@brief Sets bits in the NRF_POWER->RAMON register. + * + * @param[in] ramon Contains the bits needed to be set in the NRF_POWER->RAMON register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_RAMON_SET, uint32_t, sd_power_ramon_set(uint32_t ramon)); + +/**@brief Clears bits in the NRF_POWER->RAMON register. + * + * @param ramon Contains the bits needed to be cleared in the NRF_POWER->RAMON register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_RAMON_CLR, uint32_t, sd_power_ramon_clr(uint32_t ramon)); + +/**@brief Get contents of NRF_POWER->RAMON register, indicates power status of ram blocks. + * + * @param[out] p_ramon Content of NRF_POWER->RAMON register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_RAMON_GET, uint32_t, sd_power_ramon_get(uint32_t * p_ramon)); + +/**@brief Set bits in the NRF_POWER->GPREGRET register. + * + * @param[in] gpregret_msk Bits to be set in the GPREGRET register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_GPREGRET_SET, uint32_t, sd_power_gpregret_set(uint32_t gpregret_msk)); + +/**@brief Clear bits in the NRF_POWER->GPREGRET register. + * + * @param[in] gpregret_msk Bits to be clear in the GPREGRET register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_GPREGRET_CLR, uint32_t, sd_power_gpregret_clr(uint32_t gpregret_msk)); + +/**@brief Get contents of the NRF_POWER->GPREGRET register. + * + * @param[out] p_gpregret Contents of the GPREGRET register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_POWER_GPREGRET_GET, uint32_t, sd_power_gpregret_get(uint32_t *p_gpregret)); + +/**@brief Sets the DCDC mode. + * + * Enable or disable the DCDC peripheral. + * + * @param[in] dcdc_mode The mode of the DCDC, see @ref NRF_POWER_DCDC_MODES. + * + * @retval ::NRF_SUCCESS + * @retval ::NRF_ERROR_INVALID_PARAM The DCDC mode is invalid. + */ +SVCALL(SD_POWER_DCDC_MODE_SET, uint32_t, sd_power_dcdc_mode_set(uint8_t dcdc_mode)); + +/**@brief Request the high frequency crystal oscillator. + * + * Will start the high frequency crystal oscillator, the startup time of the crystal varies + * and the ::sd_clock_hfclk_is_running function can be polled to check if it has started. + * + * @see sd_clock_hfclk_is_running + * @see sd_clock_hfclk_release + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_CLOCK_HFCLK_REQUEST, uint32_t, sd_clock_hfclk_request(void)); + +/**@brief Releases the high frequency crystal oscillator. + * + * Will stop the high frequency crystal oscillator, this happens immediately. + * + * @see sd_clock_hfclk_is_running + * @see sd_clock_hfclk_request + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_CLOCK_HFCLK_RELEASE, uint32_t, sd_clock_hfclk_release(void)); + +/**@brief Checks if the high frequency crystal oscillator is running. + * + * @see sd_clock_hfclk_request + * @see sd_clock_hfclk_release + * + * @param[out] p_is_running 1 if the external crystal oscillator is running, 0 if not. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_CLOCK_HFCLK_IS_RUNNING, uint32_t, sd_clock_hfclk_is_running(uint32_t * p_is_running)); + +/**@brief Waits for an application event. + * + * An application event is either an application interrupt or a pended interrupt when the + * interrupt is disabled. When the interrupt is enabled it will be taken immediately since + * this function will wait in thread mode, then the execution will return in the application's + * main thread. When an interrupt is disabled and gets pended it will return to the application's + * thread main. The application must ensure that the pended flag is cleared using + * ::sd_nvic_ClearPendingIRQ in order to sleep using this function. This is only necessary for + * disabled interrupts, as the interrupt handler will clear the pending flag automatically for + * enabled interrupts. + * + * In order to wake up from disabled interrupts, the SEVONPEND flag has to be set in the Cortex-M0 + * System Control Register (SCR). @sa CMSIS_SCB + * + * @note If an application interrupt has happened since the last time sd_app_evt_wait was + * called this function will return immediately and not go to sleep. This is to avoid race + * conditions that can occur when a flag is updated in the interrupt handler and processed + * in the main loop. + * + * @post An application interrupt has happened or a interrupt pending flag is set. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_APP_EVT_WAIT, uint32_t, sd_app_evt_wait(void)); + +/**@brief Get PPI channel enable register contents. + * + * @param[out] p_channel_enable The contents of the PPI CHEN register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_CHANNEL_ENABLE_GET, uint32_t, sd_ppi_channel_enable_get(uint32_t * p_channel_enable)); + +/**@brief Set PPI channel enable register. + * + * @param[in] channel_enable_set_msk Mask containing the bits to set in the PPI CHEN register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_CHANNEL_ENABLE_SET, uint32_t, sd_ppi_channel_enable_set(uint32_t channel_enable_set_msk)); + +/**@brief Clear PPI channel enable register. + * + * @param[in] channel_enable_clr_msk Mask containing the bits to clear in the PPI CHEN register. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_CHANNEL_ENABLE_CLR, uint32_t, sd_ppi_channel_enable_clr(uint32_t channel_enable_clr_msk)); + +/**@brief Assign endpoints to a PPI channel. + * + * @param[in] channel_num Number of the PPI channel to assign. + * @param[in] evt_endpoint Event endpoint of the PPI channel. + * @param[in] task_endpoint Task endpoint of the PPI channel. + * + * @retval ::NRF_ERROR_SOC_PPI_INVALID_CHANNEL The channel number is invalid. + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_CHANNEL_ASSIGN, uint32_t, sd_ppi_channel_assign(uint8_t channel_num, const volatile void * evt_endpoint, const volatile void * task_endpoint)); + +/**@brief Task to enable a channel group. + * + * @param[in] group_num Number of the channel group. + * + * @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_GROUP_TASK_ENABLE, uint32_t, sd_ppi_group_task_enable(uint8_t group_num)); + +/**@brief Task to disable a channel group. + * + * @param[in] group_num Number of the PPI group. + * + * @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid. + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_GROUP_TASK_DISABLE, uint32_t, sd_ppi_group_task_disable(uint8_t group_num)); + +/**@brief Assign PPI channels to a channel group. + * + * @param[in] group_num Number of the channel group. + * @param[in] channel_msk Mask of the channels to assign to the group. + * + * @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid. + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_GROUP_ASSIGN, uint32_t, sd_ppi_group_assign(uint8_t group_num, uint32_t channel_msk)); + +/**@brief Gets the PPI channels of a channel group. + * + * @param[in] group_num Number of the channel group. + * @param[out] p_channel_msk Mask of the channels assigned to the group. + * + * @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid. + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_PPI_GROUP_GET, uint32_t, sd_ppi_group_get(uint8_t group_num, uint32_t * p_channel_msk)); + +/**@brief Configures the Radio Notification signal. + * + * @note + * - The notification signal latency depends on the interrupt priority settings of SWI used + * for notification signal. + * - To ensure that the radio notification signal behaves in a consistent way, always + * configure radio notifications when there is no protocol stack or other SoftDevice + * activity in progress. It is recommended that the radio notification signal is + * configured directly after the SoftDevice has been enabled. + * - In the period between the ACTIVE signal and the start of the Radio Event, the SoftDevice + * will interrupt the application to do Radio Event preparation. + * - Using the Radio Notification feature may limit the bandwidth, as the SoftDevice may have + * to shorten the connection events to have time for the Radio Notification signals. + * + * @param[in] type Type of notification signal, see @ref NRF_RADIO_NOTIFICATION_TYPES. + * @ref NRF_RADIO_NOTIFICATION_TYPE_NONE shall be used to turn off radio + * notification. Using @ref NRF_RADIO_NOTIFICATION_DISTANCE_NONE is + * recommended (but not required) to be used with + * @ref NRF_RADIO_NOTIFICATION_TYPE_NONE. + * + * @param[in] distance Distance between the notification signal and start of radio activity, see @ref NRF_RADIO_NOTIFICATION_DISTANCES. + * This parameter is ignored when @ref NRF_RADIO_NOTIFICATION_TYPE_NONE or + * @ref NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE is used. + * + * @retval ::NRF_ERROR_INVALID_PARAM The group number is invalid. + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_RADIO_NOTIFICATION_CFG_SET, uint32_t, sd_radio_notification_cfg_set(uint8_t type, uint8_t distance)); + +/**@brief Encrypts a block according to the specified parameters. + * + * 128-bit AES encryption. + * + * @note: + * - The application may set the SEVONPEND bit in the SCR to 1 to make the SoftDevice sleep while + * the ECB is running. The SEVONPEND bit should only be cleared (set to 0) from application + * main or low interrupt level. + * + * @param[in, out] p_ecb_data Pointer to the ECB parameters' struct (two input + * parameters and one output parameter). + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_ECB_BLOCK_ENCRYPT, uint32_t, sd_ecb_block_encrypt(nrf_ecb_hal_data_t * p_ecb_data)); + +/**@brief Encrypts multiple data blocks provided as an array of data block structures. + * + * @details: Performs 128-bit AES encryption on multiple data blocks + * + * @note: + * - The application may set the SEVONPEND bit in the SCR to 1 to make the SoftDevice sleep while + * the ECB is running. The SEVONPEND bit should only be cleared (set to 0) from application + * main or low interrupt level. + * + * @param[in] block_count Count of blocks in the p_data_blocks array. + * @param[in,out] p_data_blocks Pointer to the first entry in a contiguous array of + * @ref nrf_ecb_hal_data_block_t structures. + * + * @retval ::NRF_SUCCESS + */ +SVCALL(SD_ECB_BLOCKS_ENCRYPT, uint32_t, sd_ecb_blocks_encrypt(uint8_t block_count, nrf_ecb_hal_data_block_t * p_data_blocks)); + +/**@brief Gets any pending events generated by the SoC API. + * + * The application should keep calling this function to get events, until ::NRF_ERROR_NOT_FOUND is returned. + * + * @param[out] p_evt_id Set to one of the values in @ref NRF_SOC_EVTS, if any events are pending. + * + * @retval ::NRF_SUCCESS An event was pending. The event id is written in the p_evt_id parameter. + * @retval ::NRF_ERROR_NOT_FOUND No pending events. + */ +SVCALL(SD_EVT_GET, uint32_t, sd_evt_get(uint32_t * p_evt_id)); + +/**@brief Get the temperature measured on the chip + * + * This function will block until the temperature measurement is done. + * It takes around 50us from call to return. + * + * @param[out] p_temp Result of temperature measurement. Die temperature in 0.25 degrees celsius. + * + * @retval ::NRF_SUCCESS A temperature measurement was done, and the temperature was written to temp + */ +SVCALL(SD_TEMP_GET, uint32_t, sd_temp_get(int32_t * p_temp)); + +/**@brief Flash Write +* +* Commands to write a buffer to flash +* +* If the SoftDevice is enabled: +* This call initiates the flash access command, and its completion will be communicated to the +* application with exactly one of the following events: +* - @ref NRF_EVT_FLASH_OPERATION_SUCCESS - The command was successfully completed. +* - @ref NRF_EVT_FLASH_OPERATION_ERROR - The command could not be started. +* +* If the SoftDevice is not enabled no event will be generated, and this call will return @ref NRF_SUCCESS when the + * write has been completed +* +* @note +* - This call takes control over the radio and the CPU during flash erase and write to make sure that +* they will not interfere with the flash access. This means that all interrupts will be blocked +* for a predictable time (depending on the NVMC specification in nRF51 Series Reference Manual +* and the command parameters). +* +* +* @param[in] p_dst Pointer to start of flash location to be written. +* @param[in] p_src Pointer to buffer with data to be written. +* @param[in] size Number of 32-bit words to write. Maximum size is 256 32-bit words for nRF51 and 1024 for nRF52. +* +* @retval ::NRF_ERROR_INVALID_ADDR Tried to write to a non existing flash address, or p_dst or p_src was unaligned. +* @retval ::NRF_ERROR_BUSY The previous command has not yet completed. +* @retval ::NRF_ERROR_INVALID_LENGTH Size was 0, or higher than the maximum allowed size. +* @retval ::NRF_ERROR_FORBIDDEN Tried to write to or read from protected location. +* @retval ::NRF_SUCCESS The command was accepted. +*/ +SVCALL(SD_FLASH_WRITE, uint32_t, sd_flash_write(uint32_t * const p_dst, uint32_t const * const p_src, uint32_t size)); + + +/**@brief Flash Erase page +* +* Commands to erase a flash page +* If the SoftDevice is enabled: +* This call initiates the flash access command, and its completion will be communicated to the +* application with exactly one of the following events: +* - @ref NRF_EVT_FLASH_OPERATION_SUCCESS - The command was successfully completed. +* - @ref NRF_EVT_FLASH_OPERATION_ERROR - The command could not be started. +* +* If the SoftDevice is not enabled no event will be generated, and this call will return @ref NRF_SUCCESS when the +* erase has been completed +* +* @note +* - This call takes control over the radio and the CPU during flash erase and write to make sure that +* they will not interfere with the flash access. This means that all interrupts will be blocked +* for a predictable time (depending on the NVMC specification in nRF51 Series Reference Manual +* and the command parameters). +* +* +* @param[in] page_number Pagenumber of the page to erase +* @retval ::NRF_ERROR_INTERNAL If a new session could not be opened due to an internal error. +* @retval ::NRF_ERROR_INVALID_ADDR Tried to erase to a non existing flash page. +* @retval ::NRF_ERROR_BUSY The previous command has not yet completed. +* @retval ::NRF_ERROR_FORBIDDEN Tried to erase a protected page. +* @retval ::NRF_SUCCESS The command was accepted. +*/ +SVCALL(SD_FLASH_PAGE_ERASE, uint32_t, sd_flash_page_erase(uint32_t page_number)); + + +/**@brief Flash Protection set + * + * Commands to set the flash protection configuration registers. + On nRF51 this sets the PROTENSETx registers of the MPU peripheral. + On nRF52 this sets the CONFIGx registers of the BPROT peripheral. + * + * @note To read the values read them directly. They are only write-protected. + * + * @param[in] block_cfg0 Value to be written to the configuration register. + * @param[in] block_cfg1 Value to be written to the configuration register. + * @param[in] block_cfg2 Value to be written to the configuration register (ignored on nRF51). + * @param[in] block_cfg3 Value to be written to the configuration register (ignored on nRF51). + * + * @retval ::NRF_ERROR_FORBIDDEN Tried to protect the SoftDevice. + * @retval ::NRF_SUCCESS Values successfully written to configuration registers. + */ +SVCALL(SD_FLASH_PROTECT, uint32_t, sd_flash_protect(uint32_t block_cfg0, uint32_t block_cfg1, uint32_t block_cfg2, uint32_t block_cfg3)); + +/**@brief Opens a session for radio timeslot requests. + * + * @note Only one session can be open at a time. + * @note p_radio_signal_callback(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_START) will be called when the radio timeslot + * starts. From this point the NRF_RADIO and NRF_TIMER0 peripherals can be freely accessed + * by the application. + * @note p_radio_signal_callback(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0) is called whenever the NRF_TIMER0 + * interrupt occurs. + * @note p_radio_signal_callback(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO) is called whenever the NRF_RADIO + * interrupt occurs. + * @note p_radio_signal_callback() will be called at ARM interrupt priority level 0. This + * implies that none of the sd_* API calls can be used from p_radio_signal_callback(). + * + * @param[in] p_radio_signal_callback The signal callback. + * + * @retval ::NRF_ERROR_INVALID_ADDR p_radio_signal_callback is an invalid function pointer. + * @retval ::NRF_ERROR_BUSY If session cannot be opened. + * @retval ::NRF_ERROR_INTERNAL If a new session could not be opened due to an internal error. + * @retval ::NRF_SUCCESS Otherwise. + */ + SVCALL(SD_RADIO_SESSION_OPEN, uint32_t, sd_radio_session_open(nrf_radio_signal_callback_t p_radio_signal_callback)); + +/**@brief Closes a session for radio timeslot requests. + * + * @note Any current radio timeslot will be finished before the session is closed. + * @note If a radio timeslot is scheduled when the session is closed, it will be canceled. + * @note The application cannot consider the session closed until the @ref NRF_EVT_RADIO_SESSION_CLOSED + * event is received. + * + * @retval ::NRF_ERROR_FORBIDDEN If session not opened. + * @retval ::NRF_ERROR_BUSY If session is currently being closed. + * @retval ::NRF_SUCCESS Otherwise. + */ + SVCALL(SD_RADIO_SESSION_CLOSE, uint32_t, sd_radio_session_close(void)); + +/**@brief Requests a radio timeslot. + * + * @note The request type is determined by p_request->request_type, and can be one of @ref NRF_RADIO_REQ_TYPE_EARLIEST + * and @ref NRF_RADIO_REQ_TYPE_NORMAL. The first request in a session must always be of type @ref NRF_RADIO_REQ_TYPE_EARLIEST. + * @note For a normal request (@ref NRF_RADIO_REQ_TYPE_NORMAL), the start time of a radio timeslot is specified by + * p_request->distance_us and is given relative to the start of the previous timeslot. + * @note A too small p_request->distance_us will lead to a @ref NRF_EVT_RADIO_BLOCKED event. + * @note Timeslots scheduled too close will lead to a @ref NRF_EVT_RADIO_BLOCKED event. + * @note See the SoftDevice Specification for more on radio timeslot scheduling, distances and lengths. + * @note If an opportunity for the first radio timeslot is not found before 100ms after the call to this + * function, it is not scheduled, and instead a @ref NRF_EVT_RADIO_BLOCKED event is sent. + * The application may then try to schedule the first radio timeslot again. + * @note Successful requests will result in nrf_radio_signal_callback_t(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_START). + * Unsuccessful requests will result in a @ref NRF_EVT_RADIO_BLOCKED event, see @ref NRF_SOC_EVTS. + * @note The jitter in the start time of the radio timeslots is +/- @ref NRF_RADIO_START_JITTER_US us. + * @note The nrf_radio_signal_callback_t(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_START) call has a latency relative to the + * specified radio timeslot start, but this does not affect the actual start time of the timeslot. + * @note NRF_TIMER0 is reset at the start of the radio timeslot, and is clocked at 1MHz from the high frequency + * (16 MHz) clock source. If p_request->hfclk_force_xtal is true, the high frequency clock is + * guaranteed to be clocked from the external crystal. + * @note The SoftDevice will neither access the NRF_RADIO peripheral nor the NRF_TIMER0 peripheral + * during the radio timeslot. + * + * @param[in] p_request Pointer to the request parameters. + * + * @retval ::NRF_ERROR_FORBIDDEN If session not opened or the session is not IDLE. + * @retval ::NRF_ERROR_INVALID_ADDR If the p_request pointer is invalid. + * @retval ::NRF_ERROR_INVALID_PARAM If the parameters of p_request are not valid. + * @retval ::NRF_SUCCESS Otherwise. + */ + SVCALL(SD_RADIO_REQUEST, uint32_t, sd_radio_request(nrf_radio_request_t * p_request )); + +/**@} */ + +#ifdef __cplusplus +} +#endif +#endif // NRF_SOC_H__ + +/**@} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_svc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_svc.h new file mode 100644 index 0000000000..20f7c8d889 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_svc.h @@ -0,0 +1,88 @@ +/* + * 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. + * + * 4. This software must only be used in a processor manufactured by Nordic + * Semiconductor ASA, or in a processor manufactured by a third party that + * is used in combination with a processor manufactured by Nordic Semiconductor. + * + * + * 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_SVC__ +#define NRF_SVC__ + +#include "stdint.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef SVCALL_AS_NORMAL_FUNCTION +#define SVCALL(number, return_type, signature) return_type signature +#else + +#ifndef SVCALL +#if defined (__CC_ARM) +#define SVCALL(number, return_type, signature) return_type __svc(number) signature +#elif defined (__GNUC__) +#ifdef __cplusplus +#define GCC_CAST_CPP (uint8_t) +#else +#define GCC_CAST_CPP +#endif +#define SVCALL(number, return_type, signature) \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wreturn-type\"") \ + __attribute__((naked)) \ + __attribute__((unused)) \ + static return_type signature \ + { \ + __asm( \ + "svc %0\n" \ + "bx r14" : : "I" (GCC_CAST_CPP number) : "r0" \ + ); \ + } \ + _Pragma("GCC diagnostic pop") + +#elif defined (__ICCARM__) +#define PRAGMA(x) _Pragma(#x) +#define SVCALL(number, return_type, signature) \ +PRAGMA(swi_number = (number)) \ + __swi return_type signature; +#else +#define SVCALL(number, return_type, signature) return_type signature +#endif +#endif // SVCALL + +#endif // SVCALL_AS_NORMAL_FUNCTION + +#ifdef __cplusplus +} +#endif +#endif // NRF_SVC__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/hex/s132_nrf52_2.0.0_softdevice.hex b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/hex/s132_nrf52_2.0.0_softdevice.hex new file mode 100644 index 0000000000..a61b7c914c --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/hex/s132_nrf52_2.0.0_softdevice.hex @@ -0,0 +1,6918 @@ +:020000040000FA +:1000000000040020E508000079050000C508000094 +:10001000830500008D05000097050000000000002A +:1000200000000000000000000000000009090000BE +:10003000A105000000000000AB050000B5050000B0 +:10004000BF050000C9050000D3050000DD05000064 +:10005000E7050000F1050000FB05000005060000B3 +:100060000F06000019060000230600002D06000000 +:1000700037060000410600004B0600005506000050 +:100080005F06000069060000730600007D060000A0 +:1000900087060000910600009B060000A5060000F0 +:1000A000AF060000B9060000C3060000CD06000040 +:1000B000D7060000E1060000EB060000F506000090 +:1000C000FF06000009070000130700001D070000DD +:1000D00027070000310700003B070000450700002C +:1000E0004F07000059070000630700006D0700007C +:1000F00077070000810700008B07000095070000CC +:100100009F0700001FB500F003F88DE80F001FBD2A +:1001100000F0DEBB1FB56FF00100009040100390AF +:10012000029001904FF010208069000B420900F00E +:100130001F045DF822300120A04083434DF8223097 +:10014000684600F044F91FBDF0B54FF6FF734FF459 +:10015000B4751A466E1E11E0A94201D3344600E080 +:100160000C46091B30F8027B641E3B441A44F9D14B +:100170009CB204EB134394B204EB12420029EBD17E +:1001800098B200EB134002EB124140EA0140F0BD8F +:10019000DD4992B00446D1E90001CDE91001FF220A +:1001A0004021684600F03AFB94E80F008DE80F000C +:1001B000684610A902E004C841F8042D8842FAD12B +:1001C00010216846FFF7C0FF1090AA208DF8440068 +:1001D000FFF7A0FF00F0F2F84FF01024A069102202 +:1001E0006946803000F001F9A069082210A900F0EA +:1001F000FCF800F0D7F84FF080510A6949690068AF +:100200004A43824201D8102070470020704710B541 +:10021000D0E900214FF0805002EB8103026944696C +:100220006243934209D84FF01022536903EB8103D4 +:100230000169406941438B4201D9092010BD5069D1 +:10024000401C01D0002010BD0F2010BD70B501680A +:100250000446AE4D4FF01020062951D2DFE801F0E0 +:10026000320318283B1DD4E90265646829463046EC +:1002700000F0CDF82A462146304600F0B6F8AA0034 +:100280002146304600F09EFA002800D0032070BDC1 +:1002900000F050FB4FF4805007E0201DFFF7ABFF4C +:1002A0000028F4D100F046FB60682860002070BD93 +:1002B000241D94E80700920000F084FA0028F6D08C +:1002C0000E2070BD8069401C12D0201DFFF79FFFDB +:1002D0000028F6D109E08069401C09D0201DFFF7F5 +:1002E0008AFF0028EDD1606820B12046FFF750FF5B +:1002F000042070BDFFF70EFF00F060F800F052F828 +:10030000072070BD10B50C46182802D001200860E7 +:1003100010BD2068FFF79AFF206010BD4FF0102439 +:10032000A069401C05D0A569A66980353079AA2846 +:1003300008D06069401C2DD060690068401C29D03D +:1003400060692CE010212846FFF7FEFE31688142EB +:100350001CD1A16901F18002C03105E030B108CAA9 +:1003600051F8040D984201D1012000E000208A429A +:10037000F4D158B1286810B1042803D0FEE728460C +:1003800000F057F861496868086008E000F016F866 +:1003900000F008F84FF480500168491C01D000F0CB +:1003A000A3FAFEE7BFF34F8F59480168594A01F499 +:1003B000E06111430160BFF34F8FFEE74FF0102063 +:1003C0008169491C02D0806900F0ADB87047524A7B +:1003D00001681160121D416811604F4A8168103236 +:1003E0001160111DC068086070472DE9F041174683 +:1003F0000D460646002406E03046296800F0A6F8BF +:10040000641C2D1D361DBC42F6D3BDE8F08170B5CD +:100410000C4605464FF4806608E0284600F083F855 +:10042000B44205D3A4F5806405F58055002CF4D1C1 +:1004300070BD4168044609B1012500E000254FF078 +:1004400010267069A268920000F0BCF9C8B120467D +:1004500000F01AF89DB17669A56864684FF4002031 +:1004600084420AD2854208D229463046FFF7CFFFA0 +:100470002A4621463046FFF7B8FFFFF79FFFFFF7F8 +:1004800091FFFFF747FEF8E72DE9FF414FF01024F9 +:10049000616980680D0B01EB800000F6FF70010BB5 +:1004A00000200090019002900246039068460123CC +:1004B0000BE0560902F01F0C50F8267003FA0CFCF2 +:1004C00047EA0C0740F82670521CAA42F1D30AE012 +:1004D0004A0901F01F0650F8225003FA06F6354388 +:1004E00040F82250491C8029F2D3A169090B4A091E +:1004F00001F01F0150F822408B409C4340F82240FD +:10050000FFF765FFBDE8FF815809000000000020EB +:100510000CED00E00400FA050006004014480168F4 +:100520000029FCD07047134A0221116010490B6862 +:10053000002BFCD00F4B1B1D186008680028FCD056 +:100540000020106008680028FCD07047094B10B5E7 +:1005500001221A60064A1468002CFCD00160106861 +:100560000028FCD00020186010680028FCD010BDC6 +:1005700000E4014004E5014008208F49096809585A +:10058000084710208C4909680958084714208A49EF +:100590000968095808471820874909680958084711 +:1005A0003020854909680958084738208249096878 +:1005B000095808473C2080490968095808474020E5 +:1005C0007D4909680958084744207B49096809584A +:1005D0000847482078490968095808474C20764957 +:1005E000096809580847502073490968095808479D +:1005F0005420714909680958084758206E4909680C +:10060000095808475C206C49096809580847602068 +:100610006949096809580847642067490968095801 +:100620000847682064490968095808476C206249EE +:1006300009680958084770205F4909680958084740 +:1006400074205D4909680958084778205A490968A3 +:10065000095808477C2058490968095808478020EC +:1006600055490968095808478420534909680958B9 +:100670000847882050490968095808478C204E4986 +:1006800009680958084790204B49096809580847E4 +:10069000942049490968095808479820464909683B +:1006A000095808479C204449096809580847A02070 +:1006B0004149096809580847A4203F490968095871 +:1006C0000847A8203C49096809580847AC203A491E +:1006D000096809580847B020374909680958084788 +:1006E000B4203549096809580847B82032490968D3 +:1006F00009580847BC203049096809580847C020F4 +:100700002D49096809580847C4202B490968095828 +:100710000847C8202849096809580847CC202649B5 +:10072000096809580847D02023490968095808472B +:10073000D4202149096809580847D8201E4909686A +:1007400009580847DC201C49096809580847E02077 +:100750001949096809580847E420174909680958E0 +:100760000847E8201449096809580847EC2012494D +:10077000096809580847F0200F49096809580847CF +:10078000F4200D49096809580847F8200A49096802 +:1007900009580847FC2008490968095808475FF4C8 +:1007A0008070054909680958084700000348044952 +:1007B000024A034B70470000000000206809000057 +:1007C0006809000040EA010310B59B070FD1042A15 +:1007D0000DD310C808C9121F9C42F8D020BA19BA0C +:1007E000884201D9012010BD4FF0FF3010BD1AB171 +:1007F000D30703D0521C07E0002010BD10F8013BC6 +:1008000011F8014B1B1B07D110F8013B11F8014BEC +:100810001B1B01D1921EF1D1184610BD02F0FF033F +:1008200043EA032242EA024200F005B870477047EB +:1008300070474FF000020429C0F0128010F0030C42 +:1008400000F01B80CCF1040CBCF1020F18BF00F8C3 +:10085000012BA8BF20F8022BA1EB0C0100F00DB872 +:100860005FEAC17C24BF00F8012B00F8012B48BFD0 +:1008700000F8012B70474FF0000200B51346944674 +:100880009646203922BFA0E80C50A0E80C50B1F1E8 +:100890002001BFF4F7AF090728BFA0E80C5048BFFC +:1008A0000CC05DF804EB890028BF40F8042B08BF9A +:1008B000704748BF20F8022B11F0804F18BF00F896 +:1008C000012B7047014B1B68DB68184700000020B4 +:1008D00009480A497047FFF7FBFFFFF713FC00BD0B +:1008E00020BFFDE7064B1847064A1060016881F3F8 +:1008F0000888406800470000680900006809000097 +:100900001D030000000000201EF0040F0CBFEFF3D9 +:100910000881EFF30981886902380078182803D12B +:1009200000E00000074A1047074A12682C3212689C +:100930001047000000B5054B1B68054A9B589847B7 +:1009400000BD000005030000000000205409000065 +:1009500004000000001000000000000000FFFFFF86 +:040960000090D00330 +:10100000881100207DB0010079960000CDAF01006D +:1010100079960000799600007996000000000000A3 +:10102000000000000000000000000000D9B0010036 +:101030007996000000000000799600007996000083 +:1010400041B1010047B10100799600007996000096 +:101050007996000079960000799600007996000054 +:101060004DB10100799600007996000053B101005E +:101070007996000059B101005FB1010065B101002E +:101080007996000079960000799600007996000024 +:101090007996000079960000799600007996000014 +:1010A0006BB1010071B101007996000079960000E2 +:1010B00079960000799600007996000079960000F4 +:1010C00077B10100799600007996000079960000CA +:1010D00079960000799600007996000079960000D4 +:1010E00079960000799600007996000079960000C4 +:1010F00079960000799600007996000079960000B4 +:10110000799600007996000000F002F819F093FF3C +:101110000AA090E8000C82448344AAF10107DA4552 +:1011200001D119F088FFAFF2090EBAE80F0013F0F1 +:10113000010F18BFFB1A43F00103184734A5010043 +:1011400054A501000A4410F8014B14F00F0508BF24 +:1011500010F8015B240908BF10F8014B6D1E05D083 +:1011600010F8013B6D1E01F8013BF9D1641E03D05C +:10117000641E01F8015BFBD19142E4D3704700008B +:101180000023002400250026103A28BF78C1FBD890 +:10119000520728BF30C148BF0B6070471FB500F031 +:1011A0003DF88DE80F001FBD1EF0040F0CBFEFF3DC +:1011B0000880EFF30980014A10470000CB9400003B +:1011C0008269034981614FF00100104470470000BB +:1011D000D511000001B41EB400B510F085F901B4BA +:1011E0000198864601BC01B01EBD0000F0B4404627 +:1011F000494652465B460FB402A0013001B506488D +:10120000004700BF01BC86460FBC80468946924617 +:101210009B46F0BC704700000911000019F008BFA0 +:1012200070B51C4C054608202070A01C00F065F825 +:101230005920A08029462046BDE8704006F067BBD3 +:1012400010B506F06FFB13490020891E087010BD11 +:1012500070B50C460F49891E097829B1A0F16001CB +:10126000532906D3012011E0602802D043F2010087 +:101270000CE020CC084E94E80E0006EB8000A0F5B0 +:101280008050241FD0F8806E2846B047206070BD83 +:10129000012070470A000020BCB1010010B50446CF +:1012A0000021012000F03FF80021182000F03BF859 +:1012B00000210B2000F037F80421192000F033F84A +:1012C00004210D2000F02FF804210E2000F02BF84F +:1012D00004210F2000F027F80421C84300F023F870 +:1012E0000721162000F01FF80721152000F01BF839 +:1012F0002046FFF795FF002010BD81210180704737 +:10130000FFF79EBF10487047104A10B514680F4B86 +:101310000F4A08331A60FFF79BFF0C48001D04605A +:1013200010BD704770474907090E002806DA00F023 +:101330000F0000F1E02080F8141D704700F1E0205C +:1013400080F800147047000003F9004310050240C4 +:101350000100000130B5FB4D044610280AD0112CC5 +:1013600006D02846122C817806D0132C08D0FFDF37 +:10137000AC7030BDFFDFFBE71129F9D0FFDFF7E7E5 +:101380001129F5D0FFDFF3E770B50EF03CF9044604 +:101390000FF072FE201AC4B206200CF0F9FA0546CE +:1013A00006200CF0FDFA2E1A07200CF0F1FA054683 +:1013B00007200CF0F5FAE349281A32188878122829 +:1013C0000DD000231A4413280BD0002002440878C3 +:1013D000022808D000201044201AC0B270BD01239A +:1013E000F0E70120F2E70120F5E7D64810B5C17813 +:1013F00094B0A9B15FF017018DF800104168CDF8E5 +:1014000002100089ADF8060009A968460AF0D1F873 +:101410000446112801D004B1FFDF14B0204610BDEE +:101420003221E9E702210CF008BB2DE9F04194B02C +:101430001D4690460E460746FFF7F4FF04000BD00A +:101440002078222804D3A07FC0F34010A84206D100 +:10145000082014B0BDE8F08143F20200F9E737201C +:101460008DF80000ADF802703DB101208DF8040048 +:101470008DF805608DF8068002E000208DF80400EC +:1014800009A968460AF095F8A07F65F34510A07792 +:101490000020DEE730B50446A1F120000D460A2801 +:1014A0004AD2DFE800F005070C1C2328353A3F44F8 +:1014B000FFDF42E0207820283FD1FFDF3DE0A14858 +:1014C0000178032939D08078132836D02078242851 +:1014D00033D0252831D023282FD0FFDF2DE02078EE +:1014E00022282AD0232828D8FFDF26E020782228A7 +:1014F00023D0FFDF21E0207822281ED024281CD012 +:1015000026281AD0272818D0292816D0FFDF14E063 +:101510002078252811D0FFDF0FE0207825280CD077 +:10152000FFDF0AE02078252807D0FFDF05E02078DC +:10153000282802D0FFDF00E0FFDF257030BD30B586 +:101540000B8840F67B444FF6FF72022801D093428D +:1015500004D09D1FA54224D2022802D04D88954276 +:1015600003D04D88AD1FA5421BD24C88A34218D88A +:101570008B88B3F5FA7F14D2022802D0C888904233 +:1015800005D0C88840F677450A38A84209D2C888ED +:10159000904208D0944206D05B1C6343B3EB800FAB +:1015A00001DB072030BD002030BD70B5044610F0CF +:1015B00003FA60BB207930B1082802D8217B0829C2 +:1015C00005D9072070BD217B0029FAD0F6E718B1B4 +:1015D000206810F0F1F9D0B9207B18B1A06810F0A4 +:1015E000EBF9A0B9002507E0206850F8250010F0BD +:1015F000E3F960B96D1CEDB22079A842F4D800255A +:1016000009E0A06850F8250010F0D6F908B11020C4 +:1016100070BD6D1CEDB2207BA842F2D8002070BDD9 +:1016200010B5028943F6FD73111F994212D2418908 +:1016300004290FD3B1F5804F0CD891420AD8017814 +:10164000890705D5406818B1FFF7AFFF002800D122 +:10165000002010BD072010BDF0B50024059D10B17D +:10166000A94203D851E009B90020F0BD0920F0BD1E +:10167000055D8DB107197E78112E3FD00FDC0A2E43 +:101680003CD2DFE806F03B1624242A2A2C2C3333E4 +:10169000025D72BB641CE4B28C42F9D3E4E71D2EF8 +:1016A0002CDAA6F11206042E28D2DFE806F027274E +:1016B0001018022DDAD1BD781D70072D01D26D07EB +:1016C00001D40A20F0BD157845F0010515E0EE4380 +:1016D000F60707E0012D07D010E00620F0BD2E0729 +:1016E000A6F18056002EF5D06046F0BD1578AE0705 +:1016F00001D50B20F0BD45F002051570055D641C99 +:101700002C44E4B28C4202D9B0E74FF4485C8C42DE +:10171000AED3A9E710B504784CB1012243F20223FD +:10172000012C07D0022C0FD0032C17D112E000227D +:101730000A7015E00A7082790324B4EB921F0DD170 +:101740000EE00000A80100200A708479B2EB941F1B +:1017500004D105E00A708279920901D0184610BDC3 +:1017600050F8012F41F8012F80888880002010BD9B +:1017700008B538B1FEA06B4600680090487903EBCD +:10178000901000781070086842F8010F88889080E7 +:1017900008BD30B50C46097895B0222902D2082040 +:1017A00015B030BD28218DF80010ADF80200132AC5 +:1017B00003D03B2A01D00720F2E78DF8042009A9C5 +:1017C000684609F0F6FE050003D121212046FFF707 +:1017D00061FE2846E4E700B595B023218DF800109E +:1017E000ADF802001088ADF804005088ADF806008E +:1017F000D088ADF80A009088ADF808000020ADF858 +:101800000C00ADF80E0009A9684609F0D2FE15B02B +:1018100000BD70B50E46050003D00021092010F070 +:1018200088F8D44C0120022EE0701CD0032E00D08A +:10183000FFDF0621201D0FF071FD607A20F0C0004F +:1018400084F80900FFF7D1FD608A00280AD0002D36 +:1018500008D083000122002109200FF0CDFF0928C4 +:1018600000D0FFDF70BD0321E01D0FF057FD607A4F +:1018700020F0C00040F040006072E01C02F03BFC31 +:10188000E0E72DE9FF410220BA4E8DF80400002761 +:10189000F08AADF80600B84655E001A80CF037F81C +:1018A000050006D0F08AB0B3A6F81680ADF8068021 +:1018B00047E0039C2078212843D0A07F01072BD547 +:1018C00004F123000090A28EBDF80800214604F127 +:1018D000360301F02BFD050003D011282AD0FFDFCD +:1018E00028E0A07F20F00800A077E07F810861F366 +:1018F0000000C10861F34100E07794F8210000F096 +:101900001F0084F820002078282824D1292120468F +:10191000FFF7C0FD1FE01CE0400712D5BDF808002E +:10192000214604F10E02FFF756FF050004D01128EE +:1019300000D0FFDF00250EE0A07F20F00400A0779C +:1019400009E07F1CFFB202200CF022F8401CB842D4 +:10195000A3D8052D07D0BDF80600F082052D04D0D0 +:10196000284604B076E5A6F816800020F9E72DE9B0 +:10197000F047040000D1FFDF20787E4E20F00F00FA +:10198000801C20F0F0007030207060680178091F22 +:1019900011290BD2DFE801F0F1090A4FF00A0CF02F +:1019A000F0360A0A0A0AF174F100FFDFBDE8F08799 +:1019B00087883846FFF736FD050000D1FFDF6078E5 +:1019C000212140F008006070307D40F00400307547 +:1019D0002846FFF75FFD384606F089FD384603F0DC +:1019E00021FC384604F03BFC394602200FF0A1FFF1 +:1019F000A87F20F01000A877FFF743FF0028D5D07C +:101A0000FFDFD3E785882846FFF70CFD00B9FFDF2D +:101A100060688078012800D0FFDF606881792846FF +:101A200006F0D8FE0028C1D0617841F0080161704D +:101A30006168C880BAE786883046FFF7F3FC050086 +:101A400000D1FFDF6078314640F0080060706068C8 +:101A5000C088288160680089688160684089A881A1 +:101A600002200FF066FF0020A875A87F00F0030099 +:101A700002289BD1FFF705FF002897D0FFDF95E7ED +:101A800080783C2803D0002502280AD000E00125F8 +:101A9000002720B13C2802D0022800D0FFDF17B178 +:101AA0007EE00127F5E7607840F008006070307D47 +:101AB00040F008003075EDBB606802218788384629 +:101AC0000BF0B2FF0546032138460BF0ADFF82460E +:101AD000052138460BF0A8FF8146042138460BF05B +:101AE000A3FF804605B9FFDFBAF1000F00D1FFDF89 +:101AF000B9F1000F00D1FFDFB8F1000F00D1FFDF17 +:101B000022212846FFF7C6FC60688079012837D07B +:101B10004FF00208A87F68F30100A8776068C08AC8 +:101B200028816068008B68816068408BA88160684C +:101B3000C07900E027E0E87560688168A961808964 +:101B4000A8836068807B6870606850F80F1FC5F8D4 +:101B500002108088E880A87F00F00301384606F074 +:101B6000B8FCB8F1010F0ED0B8F1020F18D005E0A3 +:101B70000302FF01A80100201FE023E0FFDF15E7BB +:101B80004FF00108C6E73078032800D0FFDF0021BE +:101B900008460FF0CEFEBDE8F047012000F087BFF9 +:101BA000B078132800D0FFDF002107200FF0C1FE1E +:101BB000BDE8F0471120FFF7CDBB2046BDE8F04758 +:101BC00001F08CBE607840F008006070EEE62DE910 +:101BD000F0470546007800270009DFF894A69146F3 +:101BE0000C463E46012871D0BC464FF6FF710228D4 +:101BF0006DD0072809D00A286AD0FFDFA9F8006055 +:101C00000CB1278066800020D0E6686804F10802E5 +:101C100003780D2B40D006DC042B7DD0072B44D05D +:101C20000A2B7AD106E0122B46D0132B51D0142B5D +:101C3000F7D1C0E011270926002C6FD0B0F804803E +:101C4000A4F804806868807920729AF814104046DD +:101C500021F004018AF8141004210BF000FF052183 +:101C600040460BF0FCFE002140460BF0F8FE01213F +:101C700040460BF0F4FE032140460BF0F0FE02213B +:101C800040460BF0ECFE062140460BF0E8FE072133 +:101C900040460BF0E4FEB1E701270926002CCCD02A +:101CA0008088A080686880790EE0122710268088DE +:101CB000214600F01EFFA1E71C270926002CBCD0FE +:101CC0004088A08068680079207297E78AE0B3E0D6 +:101CD00082E081783C2938D010272026002CACD017 +:101CE0008088A0806868C08A60836868C08A208312 +:101CF0006868008BA0836868408BE0836868417FD8 +:101D0000E07D61F30000E0756968497F490861F38F +:101D10004700E075696802E022E05CE08BE0C8798A +:101D20000831FFF725FD696804F10F0201F10F008A +:101D30008B7B01461846FFF71BFD6868807910B160 +:101D40000120A07507E00220FBE71B270926002CD5 +:101D500071D084F808C09AF8141021F008018CE0C2 +:101D60001D273026002C66D0A1806868411D0079AF +:101D7000FFF7FEFC686890F82B00E0736868C07895 +:101D80000428207C14D020F00100207469681F22F0 +:101D9000C97861F3420020746968C97A61F3C700A9 +:101DA0002074696804F111000C3119F043F825E73B +:101DB00040F00100E9E720271026E4B3A18068681D +:101DC00004F10902407A20726968CB1C88781946B0 +:101DD000FFF7CEFC12E74A4621462846BDE8F04709 +:101DE00001F001BF287E012803D0022813D0FFDFB5 +:101DF00004E71F271026F4B16888A080688B208133 +:101E0000A88B6081E88BA081288CE0819AF814105F +:101E100021F0200131E012271026688800F069FEC9 +:101E20004CB1687800F007000328C0D19AF814106C +:101E300021F0020121E027E0287E062822D2DFE8F7 +:101E400000F0040F0F030303C5E71B270926DCB1CD +:101E5000A18084F808C09AF8141021F001010CE068 +:101E60001B27092684B1A180287E012808D00320E1 +:101E700020729AF8141021F010018AF81410BDE6AF +:101E80000220F5E7FFDFB9E6A9F80060BBE610B570 +:101E9000F74894B08078132802D0082014B010BD01 +:101EA00022208DF8000009A9684609F082FB04464B +:101EB000002107200FF03DFD2046EFE700B5EC487C +:101EC00095B08078122801D00820A0E41E208DF85B +:101ED000000000208DF802008DF8030009A9684673 +:101EE00009F067FB0028F0D1002107200FF021FD49 +:101EF0001120FFF72FFA002089E400B5DC4895B0E7 +:101F00000078022803D0032801D008207FE41B209A +:101F10008DF8000000208DF8020009A9684609F03C +:101F200048FB0028F2D1002108460FF002FD0120F5 +:101F300000F0BDFD00206AE42DE9F0410027CC4C03 +:101F40000A287CD2DFE800F0057B1C7B7B7B7B448E +:101F50003B6AFFF7D2FF002831D105F01FFC0028B3 +:101F60002DD0017821F00F01891C21F0F0012031E2 +:101F70000170077605F0F0FB207D40F001001DE0C8 +:101F80008EB23046FFF74EFA050000D1FFDF287809 +:101F9000212814D005F002FC98B1017821F00F013E +:101FA000891C21F0F0011031017002210176468078 +:101FB000AF7505F0D1FB207D40F002002075BDE833 +:101FC000F08129463046BDE8F0411322FFF7E1BB1E +:101FD000A578122D03D0132D04D0FFDFEFE7FFF714 +:101FE0006DFF01E0FFF753FF0028E8D105F0D6FBB5 +:101FF0000028E4D0017821F00F01891C21F0F001C4 +:1020000020310170122D07D00221017605F0A4FBCA +:10201000207D40F01000D1E70121F6E7607A012130 +:10202000B1EB901F02D1022104E008E0800900D04A +:10203000FFDF0321BDE8F0410020FFF7EABBFFDF2F +:10204000BDE72DE9F04114460D00074600D1FFDF42 +:102050002878012803D0022821D0FFDFAFE73846D7 +:10206000FFF7E0F9060000D1FFDF0220B07520780D +:1020700020F00F00801C20F0F000103020706078FD +:1020800040F0080060702868A0616868E0612889F5 +:1020900020847748017D41F0200101758FE73846A3 +:1020A000FFF7C0F9060000D1FFDF69884FF6FF7027 +:1020B000814209D1AA88824206D131463846BDE81C +:1020C000F0411322FFF765BB814201D1A88898B186 +:1020D000207820F00F00801C20F0F00010302070DD +:1020E000607840F0080060702868A0616868E0616E +:1020F00028892084002006E0782300223946022027 +:102100000FF07AFB0120B07559E730B5054695B060 +:102110000C4608460FF050FC78BB00200121203D02 +:10212000062D5FD2DFE805F0032540444A57002121 +:1021300008200FF0D7FB10B1112015B030BD2420BE +:102140008DF80000D4F80200CDF80200A0798DF8D7 +:10215000060009A9684609F02CFA05002CD10823CD +:102160000022114618460FF047FB082824D0FFDF55 +:1021700022E060680FF062FC08B11020DDE73C202F +:102180008DF800002088ADF802006088ADF80400EA +:1021900009A9684609F00DFA05000DD1606858B12B +:1021A000BDF82810018007E0206801F0E2FF02E09E +:1021B000204600F0B1FC05462846BEE73D220BE074 +:1021C0008DF8021002E000BF8DF8020009A96846F0 +:1021D00009F0EFF9EFE734228DF800202278D207DA +:1021E000F2D0EDE70720A8E730B5054695B00C46DC +:1021F00008460FF005FC70BB203D052D35D2DFE809 +:1022000005F00323232523002088FFF70BF920B1D5 +:102210000078222804D208208FE743F202008CE7DE +:1022200025208DF800002088ADF8020009A9684635 +:1022300009F0BFF9002880D1DDF82A10C4F8021097 +:102240009DF82E10A17178E7062076E7206838B156 +:102250000FF0F4FB08B110206FE7206801F07DFF5C +:102260000348408AA080002067E7072065E7000058 +:10227000A8010020FE487047FD4810B518210A3813 +:1022800018F04FFE012000F012FC1120FFF762F859 +:10229000F74C00200A3C211D60744FF4617060828D +:1022A000E01C05F043FBD4F80300C4F80A00B4F8BE +:1022B0000700E081607A2074FFF797F800B1FFDF34 +:1022C00000F09CFCBDE8104001F0C2BA10B50C460D +:1022D0003E21204618F025FEA07F20F00300A077C5 +:1022E000202020700020A07584F8220010BD7047C7 +:1022F0002DE9FC4105460E4608460FF05DFB10B186 +:102300001020BDE8FC81DA4C0A3C15B1012D38D112 +:102310002CE0D4F803000090B4F80700ADF80400F6 +:102320008046677A8DF80670E11C3046FFF7F2F9B7 +:102330000028E6D1FFF759F830B10099C4F803102E +:10234000A4F807806772DCE7307808B1012808D16B +:10235000D4F80300C4F80A00B4F80700E081607AFA +:102360002074002109200FF0E4FA0FE0317841B128 +:10237000012906D0022906D0032904D043F2022005 +:10238000BFE70720BDE70120FFF743FA657400208F +:10239000B7E710B504460FF033FB08B1102010BDAD +:1023A000B34922460A39C878091DFFF7E1F9002030 +:1023B00010BD2DE9F0419AB0054600208DF85C0073 +:1023C0008DF858008DF828008DF860001E461446E0 +:1023D000884628460FF03BFB18B920460FF037FB24 +:1023E00010B110201AB0EAE555EA040018D01F27F2 +:1023F0000AAB17AA414628460097FFF72DF9002897 +:10240000F0D118AB16AA314620460097FFF724F901 +:102410000028E7D19DF85800C00703D00A20E1E763 +:102420000720DFE701AF7DB11A208DF804008DF899 +:10243000068042462946F81C18F0FCFC0BA901A8AE +:1024400009F0B7F80028CDD17CB120208DF8040028 +:102450008DF8066032462146F81C18F0EBFC0BA9FB +:1024600001A809F0A6F80028BCD181499DF82800F0 +:102470000A3948700020B5E770B506460A200C46B8 +:10248000087015461146204609F093F830B93821F6 +:1024900021702046294609F08CF820B1082801D186 +:1024A00043F2032070BD2A462146304600F05BFB14 +:1024B0000446082800D1FFDF204670BD2DE9F04119 +:1024C0006CA196B00446D1E90001CDE914010027C2 +:1024D00020460FF071FA30B92078012806D16068E3 +:1024E0000FF06AFA10B1102016B068E5604D0A3D91 +:1024F0002878012801D00820F6E707200BF050FAD1 +:1025000018B9207848B1012807D0FEF73DFF30B157 +:10251000287D10F00C0F09D103E01220E4E713200E +:10252000E2E7C10702D1A846800701D51120DBE709 +:10253000208A43F6E172A0F120019142217807D36D +:10254000012942D1002840D1618A00293DD10FE004 +:10255000022901D0032901D1A02836D3012907D0AF +:1025600098F80110C90703D0618A71B3B4292CD837 +:10257000217831B1012908D0022904D0032924D1BE +:1025800015E0002516E0022514E008B9608A60B164 +:1025900004256068007868B101280AD0022808D0B4 +:1025A000032806D043F202209EE70125F1E7032528 +:1025B00000E00127207A30B1012807D0022807D097 +:1025C00003286AD106E0002605E066E0012602E065 +:1025D000022600E003260DB1022D13D196B1E0686A +:1025E00018B1FEF7E2FF002886D198F801008007B5 +:1025F00002D043F2012077E7022D03D1022E4CD006 +:10260000032E4AD018208DF82C00208AADF82E0019 +:10261000208AADF830008DF8325098F80310002071 +:102620004FF0010811B1012968D102E08DF83300A3 +:1026300001E08DF833808DF834702178012925D0A0 +:10264000CDF83500ADF839008DF83C60207DC0F341 +:102650004002014662F35F01C0F3800041EA80005E +:1026600014A9085C8DF83B00B8B169460BA805E0D9 +:10267000B2010020070605040302010008F099FFDB +:10268000002891D15DB1022D09D011E0606850F8A9 +:10269000011FCDF835108088D4E7072024E73EB12C +:1026A000E06828B16A460BA9FFF7E6FE0028A2D130 +:1026B0001B208DF82C008DF82E8069460BA808F0A1 +:1026C00078FF002897D19DF801001B2816D1052D11 +:1026D00009D2DFE805F0030305050300032000E04D +:1026E000022000F0E4F9012D0AD0608A40B10022F6 +:1026F0008300114610460FF07FF808B10320F3E67F +:102700000020F1E62DE9FC4107460D460326084668 +:102710000FF09DF9002863D13846FEF783FE0400D0 +:1027200004D02078222804D20820EAE543F20200EF +:10273000E7E5A07F00F0030C2DB129466046FEF7C7 +:10274000FEFE0600F1D1F948BCF1010F05D0BCF145 +:10275000020F17D0FFDF3046D3E5A27D2946012ABC +:1027600002D0007D800701D51120CAE529B968464D +:1027700000F0FDFA0028D8D16946384605F0A7FFD9 +:102780000646E8E7A17D022914D1007D800611D418 +:1027900025B1A07F40070BD4002100E0012138467D +:1027A00005F0E0FF0600D6D1A075002DD3D002E0E1 +:1027B0001126D0E7A5B12A4621463846FFF70BF887 +:1027C00006461128C7D1A07F4107C4D4296844F820 +:1027D0000E1F6968616040F0040020740026BAE7AB +:1027E00010208EE570B50C460546FEF71BFE010075 +:1027F00005D022462846BDE87040FEF7CABF43F226 +:10280000020070BD00B595B031218DF800108DF833 +:10281000020009A9684608F0CCFE15B000BD0123EE +:10282000FEF703BE00231A461946FEF7FEBD70B53B +:1028300094B004460FF0C0F810B1102014B070BD71 +:102840002046FEF7EDFE0028F8D1B84DA8781128F3 +:1028500001D00820F2E7FEF797FD20B1287DC006E1 +:1028600003D51120EAE71320E8E71D208DF80000CA +:10287000207800F001008DF802002089ADF80400F6 +:102880006089ADF806002078C0F340008DF809009B +:10289000E8780025012618B1012804D00320CDE7EF +:1028A0008DF8085001E08DF8086009A9684608F025 +:1028B00080FE0028C2D12078800707D5606828B143 +:1028C00009AA6946FFF7D8FD0028B7D11E208DF868 +:1028D00000008DF802608DF8035009A9684608F0E1 +:1028E00068FE0028AAD1A08900F0F5F80400A5D15F +:1028F0001220FEF72FFD2046A0E7F0B595B0154653 +:102900000C4607460FF0A3F838B920460FF054F8EC +:1029100018B928460FF050F810B1102015B0F0BDCE +:10292000824E307D10F0180F01D1400701D51120E3 +:10293000F4E72046FEF774FE0028EFD12078C0F3BC +:102940004001394302D0800702D50FB10720E5E7E7 +:1029500029460220FEF7F3FD0028DFD1B0781128C8 +:1029600003D0122801D00820D8E706200BF018F871 +:1029700018B1B078122802D005E01220CEE7FFF798 +:102980009DFA0028CAD1FEF7FFFC022801D21320CD +:10299000C4E72078800707D5606828B109AA69468E +:1029A000FFF76AFD0028B9D121208DF800002089A9 +:1029B000ADF802006089ADF8040020784FF0010105 +:1029C000C0F340008DF80600207882074FF0000029 +:1029D00015D43A7842B1012A09D0022A07D0032A35 +:1029E00005D043F2022099E78DF8070001E08DF849 +:1029F000071057F8012F0292BA88ADF80C20F27830 +:102A00001AB1012A04D0032088E78DF80E0001E0F6 +:102A10008DF80E102988ADF810106988ADF81210E5 +:102A2000A988ADF81410E988ADF81800ADF81610B3 +:102A3000ADF81A0009A9684608F0BBFD002886D148 +:102A4000A08900F048F804008ED11320FEF782FC24 +:102A5000204663E730B5054695B00C4608460EF0B3 +:102A6000CFFF10B1102015B030BD2846FEF7DAFCBC +:102A700038B10178222902D3807F800604D408204F +:102A8000F1E743F20200EEE713208DF80000ADF805 +:102A9000025009A9684608F08CFD0028E3D19DF991 +:102AA0002A107F2901D02170DDE70520DBE730B552 +:102AB0001E4D040008D0012C04D0022C06D0032C9B +:102AC00004D0FFDF2C7030BDFFDFFBE72878012842 +:102AD000F8D0FFDFF6E710B548B1830000221146B9 +:102AE00007200EF089FE072801D0032010BD00202A +:102AF00010BD70B50C0006460DD0FEF793FC050026 +:102B000000D1FFDFA680288920812889608168891B +:102B1000A081A889E08170BD10B50446006840B16D +:102B20000EF095FF20B1102010BD0000A80100207C +:102B3000206801F005FBA0882F4C6082607C012892 +:102B40000FD1002109200EF0CDFE00B10120617AE5 +:102B50000122B2EB911F01D1022100E00321FEF717 +:102B600058FE0020E0E72DE9F047002592460C468C +:102B70000646A8464FF001090B2721E0306850F8BF +:102B80002500007820B1012805D00720BDE8F08796 +:102B900084F8028001E084F80290306850F8250043 +:102BA00050F8011FC4F803108088A4F807002770AC +:102BB0005146204608F0FDFC0028E7D16D1CEDB21F +:102BC0003079A842DAD8002539270FE0B068102202 +:102BD00050F82510A01C18F02DF9277051462046FA +:102BE00008F0E7FC0028D1D16D1CEDB2307BA84283 +:102BF000ECD80020CAE70000A8010020E848002126 +:102C00000160818070472DE9FF41804692B01C46EB +:102C10000E4618460EF0D0FE18B1102016B0BDE8D2 +:102C2000F08121460120FEF78AFC0028F6D101251B +:102C30008DF842504FF4C050ADF84000002210A96A +:102C4000284603F0AAFD0028E8D18DF842504FF441 +:102C50002850ADF8400000271C216846099718F05D +:102C600082F99DF82400ADF8346020F00F00401C7C +:102C700020F0F00010308DF824009DF82500ADF80C +:102C8000367020F0FF008DF825009DF8260007AA79 +:102C900020F00600801C40F001008DF826009DF811 +:102CA00000000BA940F002008DF800001F20ADF8D5 +:102CB000380009A80C9010A80B90CDF83C8068460D +:102CC00003F06EFB0028A9D1B54EBDF81C0007AA81 +:102CD00030808DF8425042F60120ADF840009DF85A +:102CE00026000BA920F00600801C20F001008DF8C2 +:102CF00026000220ADF83400ADF8380014A80F907B +:102D0000684603F04DFB002888D1BDF81C00708098 +:102D1000311D204600F0ECF880E73EB5044608205F +:102D2000ADF8000020460EF047FE08B110203EBD71 +:102D300021460120FEF703FC0028F8D12088ADF8D9 +:102D400004006088ADF80600A088ADF80800E088AF +:102D5000ADF80A00924801AB6A468088002103F072 +:102D600009FFBDF800100829E1D003203EBD1FB5C2 +:102D70000446002002900820ADF80800CDF80CD0E1 +:102D800020460EF019FE10B1102004B010BD84488A +:102D900002AA81884FF6FF7004F07BF80028F4D176 +:102DA000BDF80810082901D00320EEE7BDF8001097 +:102DB0002180BDF802106180BDF80410A180BDF82B +:102DC0000610E180E1E701B582B00220ADF8000015 +:102DD000734802AB6A464088002103F0CBFEBDF881 +:102DE0000010022900D003200EBD1CB50021009167 +:102DF0000221ADF8001001900EF002FE08B1102083 +:102E00001CBD67486A4641884FF6FF7004F041F8E0 +:102E1000BDF800100229F3D003201CBDFEB5074603 +:102E200014460E4608460EF0C7FD08B11020FEBD40 +:102E30001F2C01D90C20FEBD38460EF0BDFD584DAB +:102E400018BB288801A903F021F80028F3D13878AD +:102E50008DF80500288801A903F06DFE0028EAD14D +:102E600000909DF800009DF8051040F002008DF8DC +:102E70000000090703D040F008008DF80000288802 +:102E8000694603F0FBFD0028D5D1ADF8084028883D +:102E9000334602AA002103F06DFEBDF80810A142DE +:102EA000C9D00320FEBD7CB50546002000900190EE +:102EB0000888ADF800000C46284601950EF0BEFDCE +:102EC00018B920460EF09CFD08B110207CBD15B14C +:102ED000BDF8000050B132486A4601884FF6FF70D5 +:102EE00003F0D7FFBDF8001021807CBD0C207CBD15 +:102EF00030B593B0044600200D460090142101A87F +:102F000018F031F81C2108A818F02DF89DF80000E1 +:102F1000CDF808D020F00F00401C20F0F000103059 +:102F20008DF800009DF8010006AA20F0FF008DF842 +:102F300001009DF8200001A940F002008DF820005A +:102F400001208DF8460042F60420ADF8440011A897 +:102F500001902088ADF83C006088ADF83E00A08864 +:102F6000ADF84000E088ADF842009DF8020020F086 +:102F70000600801C20F001008DF802000820ADF84A +:102F80000C00ADF810000FA8059008A803F008FA8F +:102F9000002803D1BDF818002880002013B030BDF0 +:102FA00010000020094810B504680A490848086064 +:102FB0000DF08AFB0848046010BD08490020086035 +:102FC0004FF0E0210220C1F8800270471005024056 +:102FD000010000011805024014050240FC1F0040DA +:102FE00070B50C46054606F0BFFE21462846BDE8F2 +:102FF000704007F09CBE704770477047704770473D +:1030000010FFFFFFDBE5B15100C001008100FFFFB1 +:1030100010B504460EF0D0FC08B1102010BD207889 +:10302000C0F30210042807D86078072804D3A178D9 +:10303000102901D8814201D2072010BDE078410754 +:1030400006D421794A0703D4000701D4080701D523 +:10305000062010BD002010BD10B513785C08C37F9A +:1030600064F30003C3771478A40864F34103C377BF +:103070001078C309887863F34100887013781C09BD +:103080004B7864F347134B701378DB0863F300004D +:1030900088705078487110BD10B5C4780B7864F30F +:1030A00000030B70C478640864F341030B70C478A8 +:1030B000A40864F382030B70C478E40864F3C303C8 +:1030C0000B700379117863F30001117003795B08C9 +:1030D00063F34101117003799B0863F3820111705E +:1030E0000079C00860F3C301117010BD70B51446BB +:1030F0000D46064604F052FB80B10178142221F0FF +:103100000F01891C21F0F001A03100F8181B2146A5 +:1031100017F0D5FEBDE8704004F01EBB29463046CE +:10312000BDE870401322FEF734BB70B514460E465E +:10313000054604F033FB70B1017821F00F01891CC2 +:1031400021F0F00120310170458021688161BDE8E6 +:10315000704004F001BB31462846BDE870401322A0 +:10316000FEF717BB10B5FE4C94F8300000280CD1C8 +:1031700004F120014FF6FF72A1F110000CF0B9F834 +:1031800000B1FFDF012084F8300010BD2DE9F047C9 +:10319000064608A8894690E830041F469046142148 +:1031A000284617F0E0FE0021CAF80010B8F1000F21 +:1031B00003D0B9F1000F03D114E03878C00711D063 +:1031C00020680EF01DFCE8BBB8F1000F07D12068A5 +:1031D000123028602068143068602068A860216878 +:1031E000CAF800103878800727D560680EF026FCF2 +:1031F00040BBB9F1000F2CD0FFF73CF80168C6F8CE +:10320000B4118188A6F8B811807986F8BA01FFF761 +:10321000A9FFDFF84C8308F12008C5F80C8062682C +:103220005AB196F8B40106F2B5111032FEF7A0FAC1 +:1032300010224146606817F0FDFD3878400712D52E +:10324000A06800E002E00EF0DBFB50B11020BDE80A +:10325000F08760680028F9D0E8606068C6F8B001BF +:10326000EBE7A06828610020F1E730B50546087853 +:103270000C4620F00F00401C20F0F00110312170AE +:103280000020607095F8220030B104280FD0052886 +:1032900011D0062814D0FFDF20780121B1EB101FD8 +:1032A00004D295F8200000F01F00607030BD21F0BE +:1032B000F000203002E021F0F00030302070EBE729 +:1032C00021F0F0004030F9E710B510B190F8A940B6 +:1032D00044B1A34890F8354000205CB1086010600C +:1032E000186010BD00F1A8040C6000F1D001F830A6 +:1032F0001160F5E79A4C34340C60F0E700B58BB000 +:103300000823CDE902128DF8013001919449002380 +:1033100064310591099301468DF8103068460BF031 +:10332000C0FF002800D0FFDF0BB000BD30B595B066 +:103330000C462C2518998DF80050ADF80200B3B159 +:103340001868019058680290ADF80C2010220DF119 +:103350000E0017F06FFD09A9684608F02AF9002849 +:1033600003D1A17F41F01001A17715B030BD00203D +:103370000190E8E72DE9F0470646008A8AB080B25E +:103380000D468146FEF74EF80446754F3078283FCB +:10339000DFF8CC814FF0000A122873D2DFE800F08A +:1033A00072E9350936777E98A8F3E7E6E5E4DF5B56 +:1033B000DFDFA07F00F00300012806D0002148468F +:1033C0000AF03BFB050003D101E00121F7E7FFDF35 +:1033D00098F85C10090602D5D8F860000BE00321CC +:1033E00005F121000DF09AFFD5F821005D49B0FBF1 +:1033F000F1F201FB1200C5F8210070686866B06840 +:10340000A8662078252800D0FFDFECE0A07F00F040 +:103410000300012806D0002148460AF00EFB0600F2 +:1034200003D101E00121F7E7FFDF7078810702D5C2 +:103430002178252904D040F0010070700AB006E719 +:103440000220287096F82000287106F121003136FC +:10345000C5E90206F2E7A07F00F00300012806D0CC +:10346000002148460AF0E9FA040003D101E00121F5 +:10347000F7E7FFDF6078C10605D5142028704134D6 +:103480006C60DBE7E2E140F008006070D6E73448AA +:10349000082128380DF042FF032016E02A208DF87D +:1034A000000010220DF10200716817F0C3FC102219 +:1034B0000DF11200B16817F0BDFC294968462C399E +:1034C00008F077F800B1FFDF042028706F60B5E7DF +:1034D000E07FC00600D5FFDFB0680090B388062209 +:1034E0000321484605F063F80028A7D0FFDFA5E7D1 +:1034F00004B9FFDF716821B1102204F1230017F035 +:1035000099FC28212046FDF7C5FFA07F00F00300AD +:1035100002280ED104F12300002300901A46214610 +:103520004846FFF703FF112807D029212046FDF761 +:10353000B1FF307A84F8200080E7A07F000700D533 +:10354000FFDF14F81E0F40F008002070A4F816A04A +:10355000C4F818A0C4F81CA0617808460AE034E05A +:103560005C02002040420F006CE19AE090E062E0D3 +:1035700009E03FE061F38200410861F3C30060703D +:10358000307AE0705AE7A07F00F00300012806D0EF +:10359000002148460AF051FA040003D101E001215C +:1035A000F7E7FFDF022104F175000DF0B7FE1120EF +:1035B000287004F5DA706860B4F875002882FD4858 +:1035C0006C346C61C5E9028038E7A07F00F003002D +:1035D000012805D0002148460AF02FFA18B901E069 +:1035E0000121F8E7FFDF0AB0324621464846BDE830 +:1035F000F0477BE504B9FFDF207821289CD930799A +:10360000012802D002280AD103E0E07F40F0100038 +:10361000E07798F85C1041F0010188F85C103246C0 +:1036200021464846FFF762FD0AB02046BDE8F04754 +:103630002321FDF72FBF327901230321484604F0EF +:10364000B7FD98B1122005F8040B327925F8042B48 +:10365000281DA91E0095CDE901100023032148462D +:1036600004F023FE00288DD0FFDFE7E6A07F00F006 +:103670000300012806D0002148460AF0DEF90400C4 +:1036800003D101E00121F7E7FFDF30792070D5E6B3 +:103690000321484605F02DF9002895D11320287004 +:1036A000CCE6A07F00F00300012806D000214846A8 +:1036B0000AF0C3F9050003D101E00121F7E7FFDFBC +:1036C00095F8740000F00300012878D1A07F00F085 +:1036D0000307E07FC0F3400616B1012F04D02BE0B2 +:1036E00095F89000C0072AD0D5F8AC0118B395F82A +:1036F0007320017C62F387010174E27FD5F8AC018D +:1037000062F341010174D5F8AC0166F30001017464 +:10371000AEB1D5F8AC01102204F12301783517F0D1 +:1037200089FB287E40F001002876287820F00100EF +:1037300005F8780900E016B1022F04D02CE095F8C6 +:103740007800C00726D0D5F8A80118B395F87320E3 +:10375000017C62F387010174E27FD5F8A80162F36E +:1037600041010174D5F8A80166F3000101748EB11E +:10377000D5F8A801102204F12301783517F05AFB7F +:10378000287840F0010005F8180B287820F0010097 +:1037900005F89009022F51D05FF0000000EB4000C7 +:1037A00005EBC00090F87800800708D5D5F8B02167 +:1037B00095F86C0005F16D011032FDF7D9FF052079 +:1037C00060F3070815F8740F00F0030060F30F288A +:1037D000287960F31748287F60F31F687548AC3874 +:1037E000027822F00F02921C22F0F00220320270C6 +:1037F000427822F00702D21C4270A0F80290C0F872 +:10380000188004F033F92078252805D0212807D026 +:10381000FFDF2078222803D922212046FDF73AFE37 +:10382000A07F00F0030001280AD0002148460AF0DA +:1038300016F900283FF40EAEFFDFFFE50120ADE7EB +:103840000121F3E7716881F801A0F7E5FFDFF5E5F5 +:1038500070B5584C0025103C14F85C0F20F0800027 +:10386000207065600BF0E7FC5249A1F1100004F0F4 +:103870008FF804F82C5C072060724E487C30206181 +:103880005030A0611030E06170BD70B50D46FDF79D +:10389000C9FD040000D1FFDF4FF4DE71284617F0A8 +:1038A00062FB44485430686104F123002861A07F22 +:1038B00000F00300012809D05FF0020105F59070C7 +:1038C0000BF0BAFC002800D0FFDF70BD0121F5E746 +:1038D0000A46014602F590700BF0CCBC70B5054667 +:1038E00040689AB0017808290DD00B2903D00C2923 +:1038F00036D101218171686886883046FDF792FDD6 +:10390000040035D133E046883046FDF78BFD0400D6 +:1039100000D1FFDF2078212822D0282822D1686812 +:1039200002210C3001F09CF9E0B168680821001D0B +:1039300001F096F9B0B12D208DF80000ADF80260CD +:10394000102204F1230101A817F074FA09A96846AE +:1039500007F02FFE00B1FFDF29212046FDF79AFD79 +:103960001AB070BD687840F008006870F8E7FFDFB3 +:10397000A07F00F00301022902D120F01000A077FF +:10398000207821280AD06868817909B1807898B1B7 +:10399000A07F00F0030002285BD0FFDFA07F00F0D3 +:1039A00003000228DCD1FDF76CFF0028D8D0FFDF30 +:1039B000D6E700006C020020687840F008006870CC +:1039C000E07FC10720D0800701D5062000E0052058 +:1039D00084F822002078292818D02428DED1314606 +:1039E00006200DF0A6FF22212046FDF753FDA07F03 +:1039F00000F0030001282AD0002130460AF02FF8F9 +:103A00000028CBD0FFDFC9E70420E1E7A07F00F06A +:103A10000300012806D0002130460AF00EF8050008 +:103A200003D101E00121F7E7FFDF25212046FDF763 +:103A300031FD10208DF8500014A905F590700BF0A1 +:103A400010FC0228AAD00028A8D0FFDFA6E7012199 +:103A5000D3E7687840F0080068709FE72DE9F047E9 +:103A60008CB01D46904689460646DDF850A0FDF70D +:103A7000D9FC040052D0207822284FD323284DD0DF +:103A8000E07FC0064AD4A07F00F00300012806D0E2 +:103A90000021304609F0D1FF070002D00BE00121E0 +:103AA000F7E7A07F00F00300012804D10121304690 +:103AB00009F0BAFF074601AB02AA03A93846FFF78F +:103AC00003FC039800B9FFDF4FB1039807F5907727 +:103AD00087612078222806D0242804D007E00399A3 +:103AE0000020886103E025212046FDF7D3FC0398E0 +:103AF0000C2141704662A0F80480C0F80890A0F83C +:103B000006A0C560029901610199416104A90BF009 +:103B1000C8FB022802D0002800D0FFDF0CB0BDE8AF +:103B2000F08730B589B00546FDF77CFC0178222985 +:103B300033D9807F00F00300012806D000212846F9 +:103B400009F07BFF040003D101E00121F7E7FFDF6B +:103B5000227801230321284604F02AFB00281CD0E8 +:103B600012208DF80C00227806A8811F05ABCDE944 +:103B700000310290ADF8102000230321284604F004 +:103B800094FB00B1FFDF03A904F590700BF069FB13 +:103B9000022802D0002800D0FFDF09B030BD10B5E8 +:103BA00086B00446FDF73EFC0178222919D9807FB2 +:103BB00000F00300012806D00021204609F03DFF57 +:103BC000040003D101E00121F7E7FFDF13208DF8A6 +:103BD0000000694604F590700BF043FB002800D00C +:103BE000FFDF06B010BD2DE9F05F05460C4600274B +:103BF0000078904601093E46BB4604F1080A0229B6 +:103C00007ED0072902D00A2909D141E068680178ED +:103C1000082905D00B292BD00C2929D0FFDFC5E1BD +:103C200014271C26002C6CD04088A080FDF7FAFBDE +:103C30005FEA000900D1FFDF99F81700524609F149 +:103C40001801FDF795FD68688089208269684868D9 +:103C5000C4F812008868C4F81600A07E20F00600A0 +:103C600040F00100A07699F81E0040F040014DE0C0 +:103C70001A270A26002CD6D08088A080FDF7D2FB18 +:103C8000050000D1FFDF51462846FFF7EEFA8DE12F +:103C90000CB1288DA080287E0E287CD006DC01285F +:103CA0007AD0022808D0032804D135E0102874D037 +:103CB000112873D0FFDF79E11E270926002CB2D02E +:103CC000A088FDF7AFFB5FEA000900D1FFDF287F86 +:103CD00000F003000128207A1BD020F001002072A0 +:103CE000297F890861F341002072297FC90861F3A7 +:103CF00082002072297F090961F3C300207201E06C +:103D000049E116E199F81E0040F0800189F81E1083 +:103D10004CE140F00100E2E713270D26002CAAD069 +:103D2000A088FDF77FFB8146807F00F0030001281B +:103D300006D00021A08809F080FE050003D101E033 +:103D40000121F7E7FFDF99F81E0000F00302012AC6 +:103D500059D0A86E817801F003010129217A54D04D +:103D600021F00101217283789B0863F341012172E4 +:103D70008378DB0863F38201217283781B0963F384 +:103D8000C3012172037863F306112172437863F350 +:103D9000C711217203E060E0A6E08EE09EE084F8A7 +:103DA00009B0C178A172012A32D04279E17A62F376 +:103DB0000001E1724279520862F34101E1724279F5 +:103DC000920862F38201E1724279D20862F3C30180 +:103DD000E1720279217B62F30001217302795208BA +:103DE00062F3410121730279920862F38201217327 +:103DF0000079C00860F3C301217399F800002328FB +:103E00005AD9262168E0686EA4E741F00101A9E7CC +:103E10000279E17A62F30001E1720279520862F3F9 +:103E20004101E1720279920862F38201E172027942 +:103E3000D20862F3C301E1724279217B62F300018F +:103E400021734279520862F3410121734279920849 +:103E500062F3820121734079CBE718271026002CEA +:103E600067D0A088FDF7DEFA8246807F00F003006D +:103E7000012807D00021A08809F0DFFD5FEA0009D2 +:103E800003D101E00121F6E7FFDFE869A06099F8BE +:103E9000010040F0040189F8011099F80200800740 +:103EA00008D5012020739AF8000023287ED9272105 +:103EB000504663E084F80CB078E015270F26C4B3B1 +:103EC000A088FDF7AFFA814606225146E86907F05F +:103ED000D6FB0120A073AEE048464FE01627092626 +:103EE0003CB3287F207261E0287FFE4902280CD075 +:103EF00019270E26ECB101280DD003281AD004286A +:103F00001BD0052819D0FFDF23E01B270926BCB3EF +:103F10000120207205E001202072607A20F0030069 +:103F2000607211F85C0F4208520062F306000870DC +:103F30000FE02BE00220207207E0697F052801F0E6 +:103F40000F0141F0800121721BD0607A20F0030044 +:103F50006072A088FDF766FA05460078212825D012 +:103F6000232800D0FFDFA87F00F00300012810D035 +:103F70000021A08809F073FD22212846FDF78AFA66 +:103F800014E0607A20F00300401CE1E7A8F800602C +:103F900011E00121EDE70CB16888A080287E03289C +:103FA0002BD004280AD005284BD0FFDFA8F80060EA +:103FB0000CB1278066800020BDE8F09F15270F26F2 +:103FC000002CE3D0A088FDF72DFA807F00F00300DD +:103FD000012806D00021A08809F02FFD050003D19B +:103FE00001E00121F7E7FFDFD5F821000622514665 +:103FF00007F045FB84F80EB0D8E717270926002CF8 +:10400000C4D0A088FDF70EFA8146807F00F003003F +:10401000012806D00021A08809F00FFD050003D17A +:1040200001E00121F7E7FFDFA878800701D5022032 +:1040300000E00120207299F800002328B6D927213A +:104040004AE719270E26002CA0D0A088FDF7EAF930 +:104050005FEA000900D1FFDFC4F808B0A4F80CB093 +:1040600084F808B0A07A40F00300A07299F81F10FD +:1040700061F38200A07299F81F1001EA510161F307 +:10408000C300A072687E00F0030001288ED1607A20 +:1040900040F00400607299F81E0000F0030001284F +:1040A00014D0E97E607B61F300006073AA7E217BFF +:1040B00062F300012173EA7E520862F341006073EB +:1040C000A87E400860F3410121736FE7E87E217B01 +:1040D00060F300012173AA7E607B62F300006073CD +:1040E000EA7E520862F341012173A97E490861F317 +:1040F000410060735AE730B504468079012591B0DC +:10410000B5EB901F00D0FFDFFFF72CF84FF6FF70E4 +:10411000099074488DF8015020300190201D0290C4 +:10412000601C0B900AA968460BF0BBF800B1FFDFDA +:104130000B980188A4F801108078E07011B030BDB0 +:1041400010B5684C30B10146102204F1200016F081 +:1041500071FE012084F8300010BD10B50446FFF751 +:1041600001F8604920461022BDE81040203116F0C9 +:1041700061BE70B55B4C06004FF0000514D00DF029 +:104180001BFC08B110250DE00621304607F05EFA51 +:10419000411C06D0206614F85C0F40F080002070AF +:1041A00000E00725284670BD14F85C0F20F0800061 +:1041B000F5E72DE9F041804688B00D460027084616 +:1041C0000DF045FCA8B94046FDF72CF9040003D0DA +:1041D0002078222815D104E043F2020008B0BDE89F +:1041E000F08145B9A07F010603D500F00300022845 +:1041F00001D01020F2E7A07FC10601D4010702D54B +:104200000DB10820EAE7374991F85C10C90701D0E1 +:104210001120E3E7E17FC90601D50D20DEE700F0BC +:104220000300022805D125B12846FEF7F1FE07005C +:10423000D4D1A07F00F00300012806D00021404621 +:1042400009F0FBFB060002D00CE00121F7E7A07F9C +:1042500000F0030001280BD00021404609F0E4FBE8 +:10426000060007D0A07F00F00300022804D009E078 +:104270000121F2E70420B1E725B12A463146204664 +:10428000FEF7EAFE07AB1A4669463046FFF71CF810 +:10429000009800B9FFDF00990D20487006F5907076 +:1042A000C1F82480486100200881A07F00F003004D +:1042B00001282BD0F5B302200871301D8861707879 +:1042C00040090877B078C0F340004877287800F0BC +:1042D0000102887F62F301008877E27F62F3820047 +:1042E000887701E05C020020E27F520862F3C3009D +:1042F0008877B27862F304108877A878C87701F1DC +:10430000210228462031FEF7C7FE22E00120087175 +:10431000287800F00102087E62F3010008762A780E +:10432000520862F3820008762A78920862F3C3008A +:10433000087600E009E02A78D20862F304100876D3 +:1043400024212046FDF7A6F80BE003200871052084 +:10435000087625212046FDF79DF8A07F20F08000FB +:10436000A07701A900980AF09CFF022801D000B1B3 +:10437000FFDF384632E72DE9FF4FF94A0D4699B085 +:104380009A4607CA14AB002783E807001998FDF77F +:1043900049F8060006D03078262806D008201DB03F +:1043A000BDE8F08F43F20200F9E7B07F00F00309A7 +:1043B000B9F1010F03D0B9F1020F07D008E03DB900 +:1043C0001B98FEF725FE0028E9D101E01B9878BB79 +:1043D000B07F00F00300012806D00021199809F0F1 +:1043E0002CFB040003D101E00121F7E7FFDF852D5D +:1043F00025D007DCD5B1812D1BD0822D1BD0832D7C +:1044000008D11AE0862D1CD0882D1CD0892D1CD0F7 +:104410008A2D1CD00F2020710F281AD001208DF872 +:104420003400201D0E902079A8B158E10020F2E759 +:104430000FE00120EFE70220EDE70320EBE7052086 +:10444000E9E70620E7E70820E5E70920E3E70A2097 +:10445000E1E70720A3E7B9F1010F17D0D4E919501C +:1044600080460220019001200090A87898F8021060 +:10447000C0F3C000C1F3C00108405FEA000B5DD08B +:1044800050460DF099FA00286CD12DE0D4E9198539 +:104490000120019002200090214630461B9AFEF731 +:1044A000DBFD1B98007800F00101A87861F30100A2 +:1044B000A870F17F61F38200A870F17F490861F371 +:1044C000C300A870A17861F30410A8706078400957 +:1044D0002870A078C0F3400068701B988078E8705E +:1044E000002068712871C0E7DAF80C000DF064FA5A +:1044F000C0BBDAF81C000DF05FFA98BBDAF80C00CC +:10450000A060DAF81C00E06098F80100A17800F0E3 +:10451000010041EA4000A07098F80210C0B2C1F357 +:104520000011891E0840A070002084F82000009926 +:1045300006F1170002290BD001210AE098F80110BA +:10454000A07801F00101FD2242EA41010840E2E7C2 +:10455000002104EB810188610199701C022902D0BD +:10456000012101E028E0002104EB81018861A878A5 +:1045700000F00300012849D198F8020000F0030080 +:10458000012843D1B9F1010F04D12A1D691D1B98DF +:10459000FEF782FD297998F8040001408DF82C106F +:1045A000687998F8052010408DF8300001432DD02F +:1045B00050460DF001FA08B11020F0E60AF11000A3 +:1045C00004F5D47104F17C020490B9F1020F3CD0DF +:1045D0000090CDE9012100210BAB5A462046FEF7A1 +:1045E000D5FD0028E9D104F5D67104F19402B9F1A2 +:1045F000010F30D004980090CDE9012100210CABCF +:104600005A462046FEF7C2FD0028D6D1A078800782 +:1046100040D4A87898F80210C0F38000C1F380015C +:10462000084337D0297898F8000014AAB9F1010F8F +:1046300017D032F810204B00DA4012F0030718D0E0 +:10464000012F1ED0022F12D11DE0CDF800A0CDE920 +:1046500001210121C0E7CDF800A0CDE90121012110 +:10466000CDE732F811204300DA4002F00307032FB0 +:1046700007D0BBF1000F0DD0012906D0042904D0CA +:1046800008E00227F5E70127F3E7012801D0042815 +:1046900000D10427F07F40F001006BF34100F07778 +:1046A000A07881074FF003000CD5A071BBF1000F7B +:1046B00015D100BF8DF85C0017AA31461998FEF796 +:1046C00034FD0CE00221022F18D0012F18D0042F46 +:1046D00022D00020A071F07F20F00100F07725218A +:1046E0003046FCF7D7FE0DA904F590700AF0B9FD2D +:1046F00010B1022800D0FFDF002050E6A171D9E7F9 +:10470000A1710D2104F1240016F02DFC607840F019 +:10471000020060700420CDE70120A071DFE72DE9E1 +:10472000F04387B0914688460446FCF77BFE0700BD +:1047300006D03878272806D0082007B0BDE8F083D7 +:1047400043F20200F9E7B87F00F00300012809D026 +:104750000021204609F071F9040006D104E00000B0 +:1047600008B301000121F4E7FFDFA679012E08D08C +:10477000B8F1000F0FD048460DF01EF9B8B1102067 +:10478000DBE7B9F1000F25D1B8F1000F09D0B8F17E +:10479000010F1FD120E0022E05D0032E05D0FFDF30 +:1047A00028E00C2526E0012524E0022522E0B8F1CE +:1047B000020F03D0B8F1010F0AD00BE0032E09D18C +:1047C00000251022494604F1210016F033FB11E0C8 +:1047D000022E01D00720B0E70025102104F12100AE +:1047E00016F09FFB5FEA090004D0062106F02EFFB9 +:1047F000C4F82100607840F002006070C10713D057 +:1048000020F00100607002208DF8000004F121000A +:1048100002908DF804506946FF300AF022FD02280C +:1048200004D018B1FFDF01E084F82050252138467C +:10483000FCF730FE002080E730B587B00D46044617 +:10484000FCF7F0FD88B1807F00F0030001280FD055 +:104850000021204609F0F1F804000ED028460DF0A2 +:10486000ABF838B1102007B030BD43F20200FAE7D0 +:104870000121EEE76078400701D40820F3E72946DC +:1048800004F141002022054616F0D4FA607840F089 +:104890001000607001070FD520F008006070142030 +:1048A0008DF80000694604F5907001950AF0D9FC76 +:1048B000022801D000B1FFDF0020D4E770B594B02A +:1048C0000D460646FCF7AEFD18B10178272944D104 +:1048D00003E043F2020014B070BD807F00F00300DB +:1048E000012806D00021304609F0A7F8040003D1C2 +:1048F00001E00121F7E7FFDFA07902282DD1A078A0 +:10490000C0072AD0002302220321304603F050FCC6 +:1049100028B30D208DF80D0007A80222811FADF8E5 +:10492000142006ABCDE900310C9604F5907402908A +:10493000089400230321304603F0B7FC00B1FFDFE9 +:1049400004208DF810008DF824500DA903A80AF05A +:10495000A8FC00B1FFDF0020BDE70820BBE7112065 +:10496000B9E770B5064686B014460D4608460DF008 +:1049700023F818B920460DF043F810B1102006B006 +:1049800070BDA6F57F40FF380DD03046FCF74AFDDC +:1049900030B14378811C22461846FCF7E9FE07E057 +:1049A00043F20200EBE72046FDF7F3FC0028E6D1D6 +:1049B0001021E01D0CF0B2FCE21D29466846FEF70E +:1049C0009DFC102204F11700019916F033FA002023 +:1049D000D5E72DE9F04104468CB0154688460027FE +:1049E00008460DF034F818B928460DF030F818B123 +:1049F00010200CB0BDE8F0812046FCF713FD060046 +:104A000003D03078272818D102E043F20200F0E703 +:104A1000B07F00F00300012806D00021204609F0F5 +:104A20000CF8040003D101E00121F7E7FFDF607813 +:104A3000400702D5A078800701D40820D9E7B07FCD +:104A400000F00300012818D0D4E91901407800B122 +:104A5000B5B1487810B1B8F1000F11D0C5B1EA1D59 +:104A600006A8E168FEF74AFC102205F11700079935 +:104A700016F0B4F930B104270AE0D4E91910E5E7DB +:104A80000720B6E71022E91D04F1310016F0D2F933 +:104A9000B8F1000F06D0102208F1070104F121003F +:104AA00016F0C8F9607840F002006070C10715D0B8 +:104AB00020F00100607002208DF8000004F1210058 +:104AC0000290103003908DF804706946EF300AF0C0 +:104AD000C8FB022804D018B1FFDF01E084F8207081 +:104AE00025213046FCF7D6FC002082E7F8B51546B4 +:104AF0000E460746FCF796FC040004D020782228D6 +:104B000004D00820F8BD43F20200F8BDA07F00F0F9 +:104B10000300022802D043F20500F8BD30460CF035 +:104B20004BFF18B928460CF047FF08B11020F8BD1C +:104B300000953288B31C21463846FEF7F7FB112852 +:104B400014D00028F3D1297C4A08E17F62F30001E8 +:104B5000E1772A7C62F34101E177297C890884F8B6 +:104B60002010A17F21F08001A177F8BDA17F090766 +:104B7000FBD4D6F80200C4F83600D6F80600C4F814 +:104B80003A003088A0861022294604F1230016F04E +:104B900051F9287C4108E07F61F38200E077297CAD +:104BA00061F3C300E077287C800884F82100A07FAF +:104BB00040F00800A0770020D3E770B594B00D4610 +:104BC00006460BB1072086E6FCF72CFC040007D054 +:104BD0002078222802D3A07F400604D408207AE659 +:104BE00043F2020077E6C5B12D208DF80000ADF844 +:104BF00002601022294601A816F01CF9287C410801 +:104C0000E07F61F30000E077297C61F34100E07709 +:104C1000287C800884F8200004E02E208DF8000015 +:104C2000ADF8026009A9684606F0C3FCA17F21F037 +:104C30004001A1774FE670B50D46FCF7F3FB040089 +:104C400005D028460CF0DCFE20B1102070BD43F2E8 +:104C5000020070BD29462046FEF707FB002070BD0C +:104C600005E000BF10F8012B0AB100207047491E73 +:104C700089B2F7D20120704770B50D4600780499CB +:104C80001446042803D0052832D0FFDF70BDA88B5E +:104C90000E2200EB400002EB400018803320088019 +:104CA000002CF3D0A88BA081002613E0A87F012858 +:104CB00014D006EBC60005EB400106EB460204EB00 +:104CC0004202088CD0811020223110320AF08AFB77 +:104CD000761CB6B2A089B042E8D870BD05EB86015B +:104CE00006EB460204EB4202088CD0810220EBE77F +:104CF000A88B102200EBC00002EB4000188034208B +:104D00000880A87F012808D0022806D0FFDF002CE9 +:104D1000E3D0A88BA081002613E0A073F7E7A87F5B +:104D2000012812D006EBC60005EB400104EB400061 +:104D30000A8C028210221230223116F07BF8761C87 +:104D4000B6B2A089B042EAD870BD05EB860106EB89 +:104D5000C602088C04EB4202223110820220123279 +:104D60000AF040FBEBE72DE9F04105780E20DDF875 +:104D700018C001F1200402F10E074FF00008022DC7 +:104D800006D0032D2DD0062D6AD0FFDFBDE8F081BF +:104D9000CD8B05EB850600EB460018803120ACF882 +:104DA0000000002AF2D0087F9581801FC6B214E06F +:104DB00061682088388031F8020BF88031F8020BE6 +:104DC0003881BA1C30460AF00DFB06B118B187F8DD +:104DD0000480A7F8028008340A376D1EADB2E7D20E +:104DE000D4E7CD8B05EB850600EB4600188032201A +:104DF000ACF80000002AC9D0087F9581401FC6B2D8 +:104E00002AE06168228811F8010BFA803A79430898 +:104E100060F3000263F34102830863F38202C30874 +:104E200063F3C302030963F30412430963F34512F6 +:104E3000830963F386123A71C009787131F8020B65 +:104E400038813A4630460AF0CDFA18B187F8028028 +:104E5000A7F8008008340A376D1EADB2D1D295E7AD +:104E6000087FCD8B801E86B206F1080068431030A3 +:104E700018803520ACF80000002A87D0958102F117 +:104E80001007D68107EBC5080BE020883880C7F8EB +:104E9000048032464046616815F0CCFF0834B044C7 +:104EA00008376D1EADB2F0D270E72DE9F0471D4610 +:104EB000089E0C4681462AB1607E00F58070D08045 +:104EC000E08B108199F800000E274FF000084FF09A +:104ED000100A0C287ED2DFE800F096061521293151 +:104EE0003F4E636B6B6B207F9146082802D00328EE +:104EF00000D0FFDF2F8030200BE000BFA9F80C802E +:104F0000BDE8F087207F9146042800D0FFDF2F8086 +:104F100031203080B9F1000FF0D1F1E7207F9146C8 +:104F2000042800D0FFDF2F803220F2E7207F914657 +:104F3000022800D0FFDF2F803320EAE7207F1746CA +:104F4000022800D0FFDF3420A5F800A03080002F19 +:104F5000D6D0A7F80C80D3E7207F1746042800D0CE +:104F6000FFDF3520A5F800A03080002FC8D04046D4 +:104F7000A7F80C8012E0207F1746052802D00628EB +:104F800000D0FFDF1220288036203080002FB7D0DD +:104F9000E08BB881A7F81080B9F80200F881AFE77C +:104FA000207F9146072800D0FFDF2F803720B0E711 +:104FB0004FF0140018804FF03800170030809FD059 +:104FC000E08BB881A7F8128099F80000092807D073 +:104FD0000A2800E017E009D00B280DD0FFDF8FE78B +:104FE000207F0C2800D0FFDF01200AE0207F0D2861 +:104FF00000D0FFDF042004E0207F0E2800D0FFDF78 +:105000000520B8737CE7FFDF7AE770B50C460546EC +:10501000FCF708FA20B10078222804D2082070BDDD +:1050200043F2020070BD0521284608F006FD20600D +:1050300008B1002070BD032070BDFFB585B00746E4 +:105040001720ADF80C00089814460D46022628B922 +:1050500008A93846FFF7D9FF00283ED15DB10023EB +:10506000BDF80C203146384603F0A2F8B8B30898D2 +:105070000078A0BB05E02078092822D00F282FD087 +:10508000FFDF002004A9CDE9001003460290BDF81F +:105090000C203146384603F008F900281DD1089845 +:1050A00003A9801DC4E901072046049A04F017FBF8 +:1050B00060B3072828D2DFE800F01E1C2727252030 +:1050C000220007260023BDF80C203146384603F0A5 +:1050D0006FF80028D5D143F2040009B0F0BD08E014 +:1050E0000023BDF80C203146384603F061F8002853 +:1050F000C7D11120F1E70020EFE70820EDE743F2E8 +:105100000300EAE70720E8E70320E6E704980090B9 +:10511000BDF80C3004223146384603F048FA002826 +:10512000DBD1002DD9D008990D70D6E710B588B025 +:105130001C46AAB104238DF800301388ADF80C305A +:105140005288ADF80E208A788DF812200988ADF8C3 +:10515000101000236A462146FFF76FFF08B010BD0C +:105160001020FBE72DE9F041074600780C46122895 +:1051700039D2DFE800F0383434141036090909094F +:10518000090909090909090904B9FFDF607840F034 +:105190000800607028E0002CF8D1FFDFF6E7B8883F +:1051A000052186B2304608F048FC054604B1FFDF11 +:1051B00005B9FFDF3146A81D04F08AFA02F0EEFAC5 +:1051C000040007D0607840F008006070668002F04C +:1051D000C3FA0AE013213046FDF704FB16E0FFDFB7 +:1051E00002E0FFDF00E0FFDF84B1607800070DD54B +:1051F0002078582220F00F00C01C20F0F0009030E2 +:105200002070394604F1180015F059FE0020BDE564 +:1052100000200870881D04F058BA0A460146901D07 +:1052200004F05CBA70B50546052108F006FC0400E0 +:1052300000D1FFDF2946A01DBDE8704004F048BA48 +:105240002DE9FE4F4FF00009ADF80890ADF804903D +:1052500047880C46054693460521384608F0EDFB85 +:10526000060000D1FFDF24B1A780A4F80690A4F8BF +:105270000890297E04F112003827C91E4FF001085A +:105280004FF0360A00900F2970D2DFE801F0F9FAEA +:105290006F6108AD6A70812CB6C9E59595003078CC +:1052A000012800D0FFDFA88B0E2101EBC001ADF873 +:1052B00004103021ADF80810002C13D0A08100207C +:1052C0000DE004EBC00132790A747288CA8105EBE3 +:1052D0008002401CD38B4B82128C8A8280B2A189BF +:1052E0008142EED8E8E03078012800D0FFDFE88B7B +:1052F0000E2101EBC001ADF804103021ADF808100B +:10530000297F091FC9B20091002CEBD0A081002792 +:105310001AE000BF05EBC70A04EBC70808F10E024C +:10532000DAF8241000980AF05DF818B188F81090A7 +:10533000A8F80E90BAF82010A8F81210BAF82210A7 +:105340007F1CA8F81410BFB2A089B842E2D8B3E01D +:1053500002A8009001AB224629463046FFF78CFC9C +:10536000AAE03078072806D0FFDF04E0A3E0307819 +:10537000072800D0FFDFE88BADF808A01230ADF8A9 +:105380000400002C38D0A98BA1817188E18123E031 +:105390003078082800D0FFDFA88B00F10E01ADF8AF +:1053A00004103721ADF80810002C25D0A081AA8B5D +:1053B00004F10E00296A4CE0E88B123080B23921EA +:1053C000ADF80400ADF80810F4B3A98BA181287ED4 +:1053D000102807D00221A173E98B2182EA8B296A68 +:1053E000009836E00121F6E702A8009001AB2246C2 +:1053F00029463046FFF7B7FC5EE03078092800D038 +:10540000FFDF1420ADF80400ADF808701CB3A98BC1 +:10541000A181A4F81290A4F8109084F80E804BE0BB +:1054200030780A2800D0FFDF288CADF808701430DF +:10543000ADF804007CB10421A173A98BA181E98B93 +:105440002182298C618200E032E02A8C04F1140070 +:10545000696A15F0EFFC2FE030780B2800D0FFDFF1 +:105460001420ADF80400ADF8087004B30521A17351 +:10547000A4F80C90A4F81090A4F812901CE000E09E +:1054800008E002A8009001AB224629463046FFF70B +:105490000CFD11E00D203A21ADF80400ADF8081024 +:1054A00034B1A4F80680A4F8089084F80C9003E0C6 +:1054B000ABF8000014E0FFDFBDF80400ABF800001B +:1054C00074B1BDF808002080BDF804006080287E1B +:1054D000032805D0102803D0112801D086F80090A9 +:1054E0000020BDE8FE8F2DE9F84356880F46804620 +:1054F00015460521304608F0A0FA040000D1FFDF70 +:10550000A41D33462A4639464046009404F064FA06 +:10551000BDE8F8832DE9F0438DB00D461446814671 +:1055200007A9FFF772FD002814D14FF6FF76012777 +:105530004FF420588CB103208DF800001020ADF8F6 +:10554000140008A802460690204605A909F069FF44 +:1055500078B107200DB0BDE8F0830820ADF80C50FD +:105560008DF812708DF80000ADF80E60ADF8108067 +:105570000CE00798A1780171218841808DF81270A4 +:10558000ADF80C50ADF81080ADF80E606A46012100 +:105590004846079BFFF751FDDCE708B501228DF86F +:1055A000022042F60202ADF800200A4602236946B4 +:1055B000FFF7BCFD08BD08B501228DF8022042F6B8 +:1055C0000302ADF800200A4603236946FFF7AEFD4B +:1055D00008BD00B587B079B102228DF800200A8895 +:1055E000ADF80C204988ADF80E1000236A4604215E +:1055F000FFF723FD07B000BD1020FBE709B106232C +:1056000094E50720704770B588B00D4614460646ED +:1056100007A9FFF7FAFC00280ED17CB10620ADF8EF +:105620000C508DF80000ADF80E40079B6A4607212C +:105630005C803046FFF701FD08B070BD05208DF895 +:105640000000ADF80C50F0E700B587B059B1072362 +:105650008DF80030ADF80C20049100236A46082133 +:10566000FFF7EBFCC6E71020C4E770B5002488B054 +:10567000172391B10A78062A20D2DFE802F01F042E +:10568000041503171523DB1E9DB2CB880BB18E6862 +:105690001EB1AB4203D90C20CEE71020CCE7042A80 +:1056A00004D08B8853B901E00620C5E7012A13D046 +:1056B000022A05D0042A1CD0052A2AD00720BBE7DD +:1056C00009228DF800204A88ADF80C20CA88ADF870 +:1056D0000E208968049123E00C228DF800204A886E +:1056E000ADF80C20CA88ADF80E2089680924049111 +:1056F00016E00D228DF800204A88ADF80C208A882B +:10570000ADF80E20CA88ADF8102089680A240591EA +:1057100006E00E228DF8002049788DF80C100B243D +:1057200000236A462146FFF788FC85E700B587B06D +:105730000F228DF80020ADF80C1000236A461946A0 +:10574000FFF77BFC56E700B587B071B102228DF8F8 +:1057500000200A88ADF80C204988ADF80E1000230F +:105760006A460521FFF769FC44E7102042E7000084 +:1057700018B1817801293CD101E0102070470188DF +:1057800042F60213C81A4FF48072994233D01CDCDF +:1057900042F60103A1EB030099422CD00CDCF9B1D5 +:1057A000B1F5C05F27D06FF4C050081823D0A0F522 +:1057B0007060FF381DD11EE001281CD002281AD0CD +:1057C000FF2818D0904214D115E0904213D008DC85 +:1057D000012810D002280ED0FE280CD0FF2808D1B6 +:1057E00009E0A0F58070013805D0012803D0022817 +:1057F00001D0002070470F2070470B2826D008DC0E +:105800001BD2DFE800F01C2025251A252923252797 +:105810001E0011281CD008DC0C2817D00D281DD024 +:105820000F2815D0102808D110E0822809D084282C +:1058300010D0852810D0872812D003207047002070 +:1058400070470520704743F20300704707207047F8 +:105850000F20704704207047062070470C207047C7 +:105860004FF45050704707280DD2DFE800F00406CF +:10587000040C0C080A000020704711207047072014 +:1058800070470820704703207047007810F00F021F +:1058900004D0012A05D0022A0CD110E0000909D158 +:1058A0000AE00009012807D0022805D0032803D008 +:1058B000042801D007207047087000207047062098 +:1058C000704705282AD2DFE800F003070F171F00F2 +:1058D000087820F0FF001EE0087820F00F00401C40 +:1058E00020F0F000103016E0087820F00F00401C87 +:1058F00020F0F00020300EE0087820F00F00401C6F +:1059000020F0F000303006E0087820F00F00401C56 +:1059100020F0F000403008700020704707207047EA +:1059200038B50C46050041D06946FFF7AEFF0028A8 +:1059300019D19DF80010607861F30200607069462B +:10594000681CFFF7A2FF00280DD19DF800106078B9 +:1059500061F3C5006070A978C1F34101012903D04A +:10596000022905D0072038BD217821F0200102E06E +:10597000217841F020012170410704D0A978C9089D +:1059800061F386106070607810F0380F07D0A97846 +:10599000090961F3C710607010F0380F02D1607808 +:1059A000400603D5207840F040002070002038BD2C +:1059B00070B504460020088015466068FFF7B0FF08 +:1059C000002816D12089A189884211D86068807882 +:1059D000C0070AD0B1F5007F0AD840F20120B1FB20 +:1059E000F0F200FB1210288007E0B1F5FF7F01D92B +:1059F0000C2070BD01F201212980002070BD10B57E +:105A00000478137864F3000313700478640864F373 +:105A1000410313700478A40864F3820313700478BC +:105A2000E40864F3C30313700478240964F30413D3 +:105A300013700478640964F34513137000788009C7 +:105A400060F38613137031B10878C10701D1800764 +:105A500001D5012000E0002060F3C713137010BDD2 +:105A60004278530702D002F0070306E012F0380F25 +:105A700002D0C2F3C20300E001234A7863F30202BA +:105A80004A70407810F0380F02D0C0F3C20005E031 +:105A9000430702D000F0070000E0012060F3C502D8 +:105AA0004A7070472DE9F04792B00D00804613D040 +:105AB000B8F1000F14D01221284615F032FA03AACB +:105AC000FF21012005F0D3FB0024264637464FF482 +:105AD00020596FF4205A6DE0102012B0BDE8F08715 +:105AE0000720FAE79DF8160001280AD1BDF8140036 +:105AF00048450BD010EB0A000AD001280CD0022830 +:105B00000CD0042C0ED0052C0FD10DE0012400E0A8 +:105B10000224BDF8126008E0032406E00424BDF866 +:105B2000127002E0052400E00624BDF81210414581 +:105B300040D12C7486B34FF007090DF134080EAA3A +:105B4000CDF80090CDE9012810230022FF21304636 +:105B500005F029FCF0B9BDF834002A46C0B20EA900 +:105B600009F040FCB0B9AE81B7B108AECDF80090F5 +:105B7000CDE9016813230022FF21384605F013FC0C +:105B800040B9BDF83400F11CC01EC0B22A1D09F096 +:105B900029FC10B10320A0E70AE0BDF82100E8814C +:105BA000062C05D19DF81600A872BDF814002881B6 +:105BB000002092E703A805F062FB002892D0FFF7CF +:105BC0001CFE8AE72DE9F0438BB00E46DDE9129802 +:105BD00005461C461746142103A815F0C4F90120F8 +:105BE0008DF810008DF80C008DF81180ADF8147050 +:105BF00064B1A178C90709D08DF81600E088ADF826 +:105C00001A00A088ADF81800A068079001F0C6FD42 +:105C1000040025D06580002009A9CDE900101722D5 +:105C2000034601460290ADF82020284602F03DFBD5 +:105C3000002812D108368DE8700008AA494603A84A +:105C4000099B04F042FE06466078000701D501F08A +:105C500083FD5EB13046FFF706FE0BB0BDE8F08372 +:105C600013212846FCF7BEFD0320F6E709980090B3 +:105C7000BDF8203004220021284602F098FCECE711 +:105C800070B506468AB000200D46059007240490A2 +:105C9000069003A900940790CDE901010246102364 +:105CA0002946304605F07FFB68B904A9009108A891 +:105CB000CDE90140BDF80C3000222946304605F000 +:105CC00081F9002801D0FFF798FD0AB070BD05F0FA +:105CD0003CB82DE9FC470546002700780C46B8463D +:105CE000B9460C2873D2DFE800F0B8060D2FCE5F5E +:105CF0005F7F96B49AA504B1FFDF288980B201F0D6 +:105D0000BFFEABE0A888042180B2814607F095FE73 +:105D1000064604B1FFDF06B9FFDF494606F1080079 +:105D200004F03CFA01F03AFD040008D0607840F03D +:105D300008006070A4F8029001F00EFD8FE01321BE +:105D40004846FCF74FFD9EE004B9FFDF6088042160 +:105D500007F073FE060000D1FFDFA6F800900020D8 +:105D600029791EE005EBC0029268D3B25FEA037C9A +:105D700007D5DB0605D505EBC10030F8020C3080F5 +:105D800007E0120A52060AD5307105EBC000C08840 +:105D900070806078022740F0080060705EE0401C70 +:105DA000C0B28142DED859E0E888ADF8000004B9FD +:105DB000FFDF9DF80100000604D52878062807D0EB +:105DC00005282AD0607840F00800607046E044E082 +:105DD0006088042107F031FE060000D1FFDF86F85D +:105DE0000490A888708018E004B9FFDF608804215F +:105DF00007F023FE060000D1FFDF06F1080004F0E3 +:105E0000F8FF90F0010F02D1E879000626D56088EE +:105E10000227F080D6E704B9FFDF0227D2E704B9F2 +:105E2000FFDF022761880122204601F06DFE4FF05E +:105E30000108C7E7A88986B204B1FFDF686800904F +:105E40002889ADF8040001226946304601F077FE4A +:105E500004E0002CB6D1FFDFB4E7FFDF9CB160782F +:105E6000000710D5B8F1000F0DD12078582220F08E +:105E70000F00001D20F0F00080302070294604F152 +:105E8000180015F01CF83846BDE8FC873EB50C003C +:105E900008D06B4601AA002105F0F2FA20B1FFF705 +:105EA000ACFC3EBD10203EBD00202080A0709DF8BF +:105EB000050002A900F00700FFF703FD50B99DF8A7 +:105EC000080020709DF8050002A9C0F3C200FFF78A +:105ED000F8FC08B103203EBD9DF8080060709DF8F5 +:105EE0000500C109A07861F30410A0709DF80510A9 +:105EF000890961F3C300A0709DF80410890601D5DB +:105F0000022100E0012161F342009DF8001061F3DD +:105F10000000A07000203EBD70B5144606460D4638 +:105F200051EA040005D075B108460BF087FD78B939 +:105F300001E0072070BD2946304605F0FCFA10B19B +:105F4000BDE8704059E454B120460BF077FD08B12C +:105F5000102070BD21463046BDE8704096E7002015 +:105F600070BD2DE9FE4F05460C46007E0A310091BA +:105F700004F108010027029190460C31821E3E4632 +:105F8000BB464FF0010A0191082A7CD2DFE802F0FB +:105F9000F7047B32327EBCF86888042107F04DFD9F +:105FA0005FEA000900D1FFDFB9F8000010B1522705 +:105FB0000726ECE051271026002C7CD06888A080B2 +:105FC00084F806A099F80400002205EBC0000099AF +:105FD000C08BFFF7A1FF00286ED199F8040005EBF4 +:105FE000C000C08B208199F8040005EBC000408CF4 +:105FF000E081E6E0B5F82290062822D1E87F00068D +:106000001FD5512709F1140086B2002CD5D0A88BDA +:1060100000220099FFF780FF002873D16888A080D4 +:106020000220A071A88B208184F80EA0288C2082E9 +:10603000A4F812904A46696ADDF8040014F0FAFEEA +:10604000BFE0502709F1120086B2002C33D0A88B94 +:1060500000220299FFF760FF002853D16888A080D2 +:10606000A88BE080287E06280ED002202073288C82 +:10607000E081E87F4A46C0096073A4F8109004F1FB +:106080001200696ADAE79BE00120EFE768880421E3 +:1060900007F0D3FCB5F822A05FEA000900D1FFDFCA +:1060A00009F1080004F0A5FE90F0010F02D1E87F8D +:1060B000000626D501E076E024E00AF1140051271D +:1060C00086B2002C70D06888A080A88B002200992E +:1060D000FFF722FF002815D10220A071A88B208194 +:1060E0000420A073288C2082A4F812A05246696A6A +:1060F000019814F09FFE89F804B0A98BA9F802104A +:106100005FE00320BDE8FE8F6888FBF78BF98246CD +:106110006888042107F091FC8146BAF1000F00D194 +:10612000FFDFB9F1000F00D1FFDFB9F80600A0F5DD +:106130007F41FF3902D05127142601E05027122653 +:106140008CB36888A080502F06D00220A071287FD1 +:10615000029901F016F934E0287FA11D01F011F930 +:106160009AF82210CDE9001BB9F8022068880023B4 +:106170004946FFF727FD0028C4D122E000E016E0E1 +:10618000FE49A88BC988814205D15427062654B1FF +:106190006888A08015E05327082624B16888A0806D +:1061A000A88BE0800DE0FFE7A8F800600EE055271F +:1061B0000726002CF8D0A88BA08084F806B000E059 +:1061C000FFDFA8F800600CB127806680002099E707 +:1061D000EA4900200870704730B587B00C4607F0D8 +:1061E000F5FB0546FF2800D1FFDF0020208020714D +:1061F00060804FF6FF70E080294604F1080003F04C +:10620000BFFF02AA2946012005F031F81AE000BFBD +:106210009DF80B00000715D5BDF80E002946FFF7C5 +:106220002FFD9DF80B00FF2340F010008DF80B00B0 +:10623000BDF80B00ADF80400BDF80E002946019A28 +:1062400005F047F902A805F01AF80028E0D007B0D9 +:1062500030BD0A46014602F1080003F0A5BF70B543 +:106260000546042107F0E9FB040000D1FFDF2946C1 +:1062700004F10800BDE8704003F090BF2DE9F04143 +:106280008AB00D468046FBF7CDF8060006D0307880 +:10629000222806D208200AB0BDE8F08143F20200AD +:1062A000F9E70421404607F0C8FB07460DB1A8886E +:1062B00078B101208DF8140002208DF81800002418 +:1062C0008DF819403DB1A888ADF8200028680790E6 +:1062D00004E00920DFE7ADF82040079401F05EFA02 +:1062E000050026D0A5F8028004A8CDE900041722F5 +:1062F0000023ADF80C2019464046029401F0D5FF6A +:106300000028C8D107F108000095CDE9018096F872 +:10631000221003AA05A8049B04F0D7FA0446687863 +:10632000000701D501F018FA4CB12046FFF79BFA9F +:10633000B1E713214046FCF755FA0320ABE7049878 +:106340000090BDF80C3004220021404602F02FF9E5 +:106350004FF6FF71F9809EE72DE9FF5F83460E9EA1 +:106360009846914677888A463846FBF75BF805469B +:106370000421384607F061FB044605B9FFDF04B984 +:10638000FFDF0834CDE90274CDE9008695F82210CC +:106390004B465246584603F037FF04B0BDE8F09F25 +:1063A0002DE9F04F99B004464FF000087348ADF85E +:1063B0004C80ADF82480ADF84880A0F80480ADF89A +:1063C0000C80ADF81080ADF81880ADF8148000781E +:1063D00016460D464746012809D0022807D0032853 +:1063E00005D0042803D0082019B0BDE8F08F20465E +:1063F0000BF0E2FAD0BB28460BF0DEFAB0BB6068C7 +:106400000BF025FB90BB606848B160892189884208 +:1064100002D8B1F5007F01D90C20E5E7804608AA33 +:1064200004A92846FFF7C4FA0028DDD168688078FF +:10643000C0F34100022808D19DF8110010F0380F78 +:1064400003D028690BF0FAFA80B903A92069FFF795 +:1064500067FA0028C8D1206950B1607880079DF89C +:106460000D0000F0380002D5E8B301E011E0D0BB28 +:106470009DF80C0080060ED59DF80D0010F0380F29 +:1064800003D060680BF0DAFA18B960680BF0DFFA35 +:1064900008B11020A8E705A96069FFF741FA0028B4 +:1064A000A2D1606940B19DF8150000F007010129F3 +:1064B0003BD110F0380F38D006A9A069FFF730FAA9 +:1064C000002891D19DF8140080062ED49DF8180064 +:1064D00080062AD4A06950B19DF8190000F0070188 +:1064E000012922D100E020E010F0380F1DD0E06833 +:1064F00018B10078C8B11C2817D20CAA611C20461C +:10650000FFF77DFA0120B94660F30F27BA46074628 +:106510008DF8460042F60300ADF844000DF1330259 +:1065200015A9286808F07DFF08B107205CE79DF8F1 +:10653000540014A9CDF80090C01CCDE9019100F0E1 +:10654000FF0B00230BF20122514611A804F0D7FDE6 +:10655000E8BBBDF850000B9008492A892869091D3D +:106560000092CDE901016B89BDF8202028680499CB +:1065700004F0C5FD01007CD1207801E05803002023 +:10658000C1064FF0020A01D480062BD5ADF81C904D +:10659000606950B905A904A8FFF762FA9DF81500D3 +:1065A00020F00700401C8DF815009DF814008DF8B0 +:1065B000467040F0C8008DF8140042F60210ADF8A5 +:1065C000440009A907AA0023CDF800A000E01CE0C0 +:1065D000CDE9012140F2032211A8059904F08FFDB5 +:1065E000010046D1F8484D464FF007098088ADF8C4 +:1065F00031000CA9CDE900195B4600220295FF216C +:10660000BDF8500004F0DEFC10B1FFF7F6F8EBE641 +:106610009DF83000000625D52946012060F30F21A2 +:106620008DF846704FF42450ADF84400ADF8285072 +:1066300062789DF82800002362F300008DF828009E +:106640006278520862F341008DF828000AAACDF85A +:1066500000A0CDE9012540F2032211A804F04FFD6E +:10666000010006D1606850B3206970B903A904A87D +:1066700000E07DE0FFF7F4F96078800705D49DF82D +:106680000D0020F038008DF80D008DF8467042F6B0 +:106690000110ADF84400208940F20121B0FBF1F275 +:1066A00001FB1202606812ABCDF80080CDE9010356 +:1066B000002311A8039904F022FD010058D120788D +:1066C000C00729D0ADF81C50A06950B906A904A88C +:1066D000FFF7C6F99DF8190020F00700401C8DF85F +:1066E00019009DF818008DF8467040F040008DF8B4 +:1066F000180042F60310ADF8440013A907AACDF81C +:1067000000A0CDE90121002340F2032211A806993F +:1067100004F0F5FC01002BD1E06868B329460120A4 +:1067200060F30F218DF8467042F60410ADF8440076 +:10673000E068002302788DF8582040788DF85900E1 +:10674000E06816AA4088ADF85A00E06800798DF834 +:106750005C00E068C088ADF85D00CDF80090CDE940 +:1067600001254FF4027211A804F0C9FC010003D006 +:106770000B9800F019FE37E693480321017056B1DB +:1067800080883080BDF848007080BDF82400B0805B +:10679000BDF84C00F080002026E670B501258AB0D7 +:1067A00016460B46012802D0022816D104E08DF8C7 +:1067B0000E504FF4205003E08DF80E5042F60100C9 +:1067C000ADF80C0063B10024601C60F30F2404AA30 +:1067D00008A9184608F025FE20B107200AB070BDB0 +:1067E0001020FBE704A99DF820207748CDE900217F +:1067F000801C02900023214603A802F2012204F02B +:106800007EFC10B1FEF7F9FFE8E76F480EB1418852 +:10681000318005700020E1E770B594B00446012690 +:106820008DF83E6041F60100ADF83C0012AA0FA9B8 +:106830003046FFF7B2FF002848D12078624CC007ED +:106840004FF0000544D01C2102A814F08CFB9DF8E9 +:1068500008008DF83E6040F020008DF8080042F6F8 +:106860000520ADF83C000E959DF83A00119520F0FA +:106870000600801C8DF83A009DF838006A4620F02A +:10688000FF008DF838009DF8390009A920F0FF00BD +:106890008DF839000420ADF82C00ADF830000EA8BA +:1068A0000A9011A80D900FA80990ADF82E5002A8DB +:1068B000FFF776FD002809D1BDF80000E080BDF8A3 +:1068C00004002081401C60812570002014B070BD40 +:1068D000E5802581BDF84800F4E72DE9F74F8B46A8 +:1068E000394900269EB00A78012A04D0022A02D033 +:1068F000082021B079E54A88824201D00620F8E7D5 +:1069000089465A4501D10720F3E701214FF00008DD +:106910008DF86610ADF8401042464FF6FF71531CDB +:1069200063F30F220492ADF84210ADF84A10FF2035 +:1069300042F6020A8DF86A801AAA8DF84800ADF86E +:1069400064A0ADF868801192CDF84C8010A804F0D6 +:10695000BDFC0024254627460BAA072110A804F0F9 +:10696000B8FC78B1822857D184B37DB3ADF85C40D0 +:106970009DF85600ADF85E508DF80C8017AC0128DC +:106980005ED065E09DF832000FB3012853D1BDF809 +:10699000301051451DD116AA07A907208DE8070020 +:1069A000BDF82E0010230022FF2104F0FCFC98BB50 +:1069B000BDF85800042801D0062847D1BDF81C10A6 +:1069C000594538D10F2094E75803002036E00128BC +:1069D00031D1BDF83000B0F5205F03D042F601019F +:1069E000884228D1B9F80210BDF82E00814201D1A9 +:1069F000012700E0002704B17DB158451BD116AB3B +:106A000007AA07218DE80E00044610230022FF216B +:106A100004F0C9FC00B902E02DE035460BE0BDF8FA +:106A20005800022801D0102810D1C0B215AA07A919 +:106A300008F0D8FC50B9BDF82E608DE7052058E766 +:106A400003A915A8221D08F0ECFC08B1032050E7AB +:106A50009DF80C000023001DC2B220988DF80C2078 +:106A60000092CDE9014019A8049904F048FB10B93F +:106A7000022289F80020FEF7C0FE3AE710B50B4667 +:106A8000401E86B084B203AA00211846FEF7B7FF65 +:106A900004AA072103A88DE8070001230022FF2193 +:106AA000204604F08FFA0446BDF81000012800D0FB +:106AB000FFDF2046FEF7A1FE06B010BDF0B5FC4F8B +:106AC000044687B038780E46032804D0042802D044 +:106AD000082007B0F0BD04AA03A92046FEF768FF0E +:106AE0000500F6D160688078C0F3410002280AD121 +:106AF0009DF80D0010F0380F05D020690AF09EFFB8 +:106B000008B11020E5E7208905AA21698DE8070072 +:106B10006389BDF810202068039904F0F0FA10B1E1 +:106B2000FEF76BFED5E716B1BDF8140030800420E7 +:106B300038702846CDE738B50C00054609D000234B +:106B40006A46FF2104F09CFC28B100BFFEF755FE09 +:106B500038BD102038BD69462046FEF7E1FE00280A +:106B6000F8D1A078FF2100F001032846009A04F034 +:106B7000B0FCEBE77FB5144603AA07250292CDE9E6 +:106B800000350A462388FF2104F01CFABDF80C10DA +:106B90002180FEF732FE04B070BD2DE9F04192B0C5 +:106BA0004FF000050C000746ADF8105019D0E06812 +:106BB00028B1A068A8B10188ADF81010058038464A +:106BC000FAF730FC88B1007822286AD3384606F0FC +:106BD000FDFE80460421384606F02FFF060008D14E +:106BE00006E0102012B0BDE8F08143F20200F9E7A0 +:106BF000FFDFA078012803D0022801D00720F1E7A9 +:106C0000208838B1401C80B206AA414604F02FFB10 +:106C100038BB02E043F20300E4E706A804F02FFBD0 +:106C20009DF822204FF45051012A09D1BDF82020AF +:106C3000A2F52453023B03D1822801D088B901E098 +:106C40000846CFE7E06898B1072204A9CDE9000221 +:106C50000291A2882088BDF81030FF2104F0B2F91B +:106C600010B1FEF7CAFDBDE7A168BDF810000880AD +:106C70009DF81B00C00602D543F20140B2E70A9816 +:106C800018B1BDF82400022801D00320AAE717227A +:106C90000A98ADF80C20A1780078012903D080076C +:106CA00010D408209EE7C007FBD0002307213846F8 +:106CB00001F07EFA18B14FF00708022005E043F218 +:106CC00004008FE74FF0010803208DF83000208882 +:106CD000ADF834000BA8CDE9000500230295BDF8FE +:106CE0000C204146384601F0E0FA002887D1CDE972 +:106CF00000570836029603AA07210CA80B9B03F045 +:106D0000E4FD10B1FEF7AFFD6CE70B980090BDF805 +:106D10000C3004224146384601F049FC62E770B568 +:106D2000064615460C460846FEF722FD002805D10A +:106D30002A4621463046BDE870402EE570BDCCE5C0 +:106D400070B51E4614460D0009D044B1616831B1DA +:106D500038B157494988814203D0072070BD1020BF +:106D600070BD2068FEF704FD0028F9D132462146A7 +:106D70002846BDE87040FFF713BB70B515460C0000 +:106D800006D038B14A498988814203D0072070BDB6 +:106D9000102070BD2068FEF7EBFC0028F9D12946D1 +:106DA0002046BDE8704089E670B5054686B00E46BF +:106DB000144610460AF024FEF0BB60680AF047FE55 +:106DC000D0BBA5F57F40FF3803D02846FAF72AFB51 +:106DD000A0B1284606F0FAFD054630466946FEF7A2 +:106DE00061FE00280CD19DF810100F20082936D222 +:106DF000DFE801F008060606060A0A0843F2020068 +:106E000006B070BD0320FBE79DF80210012908D1F0 +:106E1000BDF80010B1F5C05FF2D06FF4C052D1429E +:106E2000EED09DF80610012905D1BDF80410A1F59A +:106E300028510529E4D900E022E09DF80A10012933 +:106E40000ED1BDF80810B1F5245FD9D0A1F52451B9 +:106E50000239D5D00129D3D0022901D1D0E7FFDFF3 +:106E6000606878B9002305AA2946304604F008FB7B +:106E700010B1FEF7C2FCC3E79DF81400800601D4F0 +:106E80001020BDE76188224630466368FFF772FE36 +:106E9000B6E72DE9F043074685B08946144610460B +:106EA0000AF0AEFD30B1102005B0BDE8F08300005F +:106EB00058030020384606F089FD4FF6FF76054658 +:106EC000B74201D0FF2D0AD00146002304AA48464C +:106ED00004F0D6FA30B100BFFEF78FFCE4E743F2CE +:106EE0000200E1E79DF81000C00602D543F2014020 +:106EF000DAE74FF0070803A90027CDF80080CDE9B5 +:106F00000171628833462946484604F04CFA06006F +:106F100012D160680AF074FD58B96068CDF800803D +:106F2000CDE90107238862882946484604F03BFAE8 +:106F30000646BDF80C0020803046CDE739B1FD4B48 +:106F40000A881B899A4202D843F20300704724E65C +:106F500010B586B0F74C0423ADF81430E3883BB18C +:106F600024898C4201D2914204D943F20300A3E563 +:106F70000620A1E5ADF81010002100910191ADF8B7 +:106F8000003002218DF8021005A9029104A9039195 +:106F9000ADF812206946FFF700FE8DE52DE9FC47AC +:106FA00081460F4608460AF007FDD0BB4846FAF76F +:106FB00039FA5FEA000811D098F80000222832D38D +:106FC000002317221946484601F0F2F850B1042177 +:106FD000484606F032FD060007D105E043F2020004 +:106FE000BDE8FC871120FBE7FFDF06F1080003F096 +:106FF000F1F805463878012803D0022804D007208C +:10700000EEE7A8070FD502E015F0340F0BD0B879E2 +:107010003C1DC00709D0E08838B1A0680AF0CCFC5C +:1070200018B11020DCE70820DAE73A782088002140 +:1070300028B3A0F201130721112B18D20CD2DFE8DC +:1070400003F00B090D0B1D0B121D100B0B1D1D1D4D +:107050001D0B1D00022A11D10846C1E7012AFBD0F1 +:107060000CE0EA0600E0AA06002AF5DA06E0A0F540 +:10707000C0721F2A02D97D3A022AEDD8C1B298F80F +:107080002200CDE900017288234631464846FEF7CA +:1070900099FDA5E72DE9FF4F89B01E4615460C4620 +:1070A0004FF000080F460998FAF7BCF930B10078A4 +:1070B000222806D208200DB0BDE8F08F43F202006E +:1070C000F9E7B00801D00720F5E7032E00D100262C +:1070D000099806F07BFC83464FF6FF7ACCB1022D6F +:1070E0006AD320460AF0B3FC30B904EB0509A9F1D4 +:1070F00001000AF0ACFC08B11020DCE7AD1EAAB21A +:107100002146504604F0CCFA39F8021C884253D18B +:10711000ADB28848B10702D50189491C00E00121C0 +:107120001FFA81F9F10701D0068900E0564603AA4B +:107130005946484604F09BF84FF0070A0BE0788860 +:10714000102839D808F1040108441FFA80F8A8452E +:1071500032D804EB08078FB339884945EFD34DE0A7 +:107160009DF80F100A0749D54CB304EB080908F144 +:107170000402B9F8023097B2102B1DD8DA19AA42CE +:107180001AD8B9F80020904216D1C80618D5E119CE +:10719000CDE9001A08AA0292B9F800000022594667 +:1071A00003F010FF10B1FEF728FB84E7B9F80200E6 +:1071B000BDF82010884203D00B207CE71EE005E0DC +:1071C000B9F8020038441FFA80F806E0C90604D571 +:1071D0005946FEF755FD00288FD19DF80F00FF237B +:1071E00020F010008DF80F00BDF80F00ADF8000082 +:1071F000BDF812005946009A04F06BF903A804F098 +:107200003EF818B9BDF81200B042A9D90421099876 +:1072100006F013FC040000D1FFDF22885AB10025DC +:10722000CDE900A52B4621460998FEF7CBFC0028A6 +:10723000BBD125803FE700203DE72DE9F04F89B025 +:107240001E4617000D464FF000041BD0B10802D0B7 +:10725000072009B030E7032E00D1002606F0B6FB68 +:107260008046FF2805D07DB128460AF0E7FB48B9E3 +:1072700002E043F20200ECE73988681E08440AF095 +:10728000DDFB08B11020E4E72A49B00701D54889A1 +:1072900000E00120F2074FF6FF7902D04989491E2C +:1072A00000E049468EB204AA414603F0E0FF4FF0E9 +:1072B000070A0DF10C0B33E09DF8131009072FD5C9 +:1072C0000023CDE900A3CDF808B04B46002241468B +:1072D00004F069F8E8B9F5B1BDF80C103A8821441A +:1072E0002819091D8A4231D3BDF8162020F8022B37 +:1072F000BDF80C2020F8022BCDE900A0CDF808B095 +:10730000BDF81600BDF80C300022414604F04BF8E1 +:1073100008B103209DE7BDF80C002044001D84B295 +:1073200004A803F0ACFF38B1822809D0FEF765FA53 +:107330008FE7000058030020BDF81600B042BBD90B +:1073400034B175B13988A01C814203D20C2080E78A +:1073500005207EE722462946484604F0A1F929196E +:107360000880A41C3C80002073E710B504460AF096 +:1073700047FB08B1102010BD114840892080002033 +:1073800010BD70B50C4605460E21204613F0C9FD10 +:10739000002020802DB1012D01D0FFDF70BD06201F +:1073A00000E00520A07170BD10B50C4603F02EFF63 +:1073B00000B1FFDF2046BDE81040FEF71EBA000016 +:1073C000580300204FF0E0224FF400410020C2F8A3 +:1073D000801120490870204990020860704730B53C +:1073E0001C4D04462878A04218BF002C02D000286B +:1073F00018BFFFDF2878A04208BF30BD2C701749A6 +:10740000154A0020ECB1164DDFF858C0131F012CAF +:107410000DD0022C1CBFFFDF30BD086003200860C8 +:10742000CCF800504FF400001060186030BD0860C8 +:1074300002200860CCF800504FF0407010601860D7 +:1074400030BD086008604FF06070106030BD00B55E +:10745000FFDF00BD1600002008F5014000F50040E8 +:107460006403002014F5004010B50446007894B081 +:10747000022805D0012803D043F2050014B010BD46 +:10748000A07828B1032803D8607808B1032801D96F +:107490000720F3E73F208DF800002078022801D074 +:1074A000012000E000208DF80200607800F095FDDA +:1074B000C01D8DF80300A078012800D1022000F043 +:1074C0008CFD8DF80400607800F087FD8DF80500D4 +:1074D000A07800F082FD8DF806002078012804D104 +:1074E0009DF80300401C8DF8030009A9684604F0CC +:1074F00060F800B1FFDF0020C0E72DE9FF4F8DB03D +:10750000FA49DDE91AB90600D1E902010396CDE98D +:107510000901507A117A9A4608441546C7B20DD02F +:107520000024F01D20F00700B04200D0FFDF2888C3 +:107530000399401C1FFA80F814B107E00124F0E71A +:1075400008F0FF0007F0F4FE00B1FFDF03993A46B0 +:1075500001EB0810C01C20F00301D5F81080039146 +:107560003CB9002008701FFA88F003F0F2FC00B16B +:10757000FFDF0399234601EB08000390A87A297ADC +:107580003A460844C1B203A800F071FD0398C01C3C +:1075900020F003000390697A00912B7AAA7A04B153 +:1075A000002001A906F025F900B1FFDFBDF80410A5 +:1075B0000398CDE900B90844C01C20F003001C99D1 +:1075C000CDE902103A4604B10020534605A906F061 +:1075D0009BFA00B1FFDFBDF8141003980844C01DEA +:1075E00020F007000E99821B03900A60002C35D111 +:1075F000C04ABF491160111D401E086001232C22A2 +:107600000BA9BD4806F076F800F0F1FC00211E221F +:10761000084602F053F8FAF72FFE00F034FFFEF7A9 +:10762000D7FD09AB00220521B4A0FBF7ECFA00B1AD +:10763000FFDF05F10C00FFF7EFF800B1FFDF4FF4BB +:107640007F71B04813F08FFCAE48012180F8F91328 +:10765000022180F8FA13062180F8FB1311B0BDE86F +:10766000F08F10B5A74CA078092800D3FFDF207851 +:10767000C0EBC00004EB001010F8041F21F0FF0164 +:107680000170417821F00701C91C21F018014170F7 +:107690000121E17010BD2DE9F04105460C4600279F +:1076A0000078052190463E46B1EB101F00D0FFDF69 +:1076B000287E58B1012810D0FFDF00BFA8F8006075 +:1076C0000CB1278066800020BDE8F08102270926E2 +:1076D0007CB1A88BA080A87F09E00327142644B1C1 +:1076E0006888A080286AE060A88C2082287F2072A9 +:1076F000E4E7A8F80060E6E700B5017895B001F08E +:1077000001018DF80210417801F001018DF803109C +:107710000178C1F340018DF804104178C1F34001B4 +:107720008DF80510017889088DF8061041788908D0 +:107730008DF8071081788DF80810C1788DF8091040 +:1077400000798DF80A003E208DF8000009A96846EE +:1077500003F02FFF15B000BD70B56A4CE07800282B +:107760001BD020780025C0EBC00004EB001040794E +:1077700000F00700011991F8F803401E81F8F803A2 +:107780002078401CC0B22070092800D12570A07854 +:10779000401CA07009F0B1FCE57070BD594890F82C +:1077A000FB03002800D05CE770472DE9F043554DFE +:1077B0009BB00026D5F8F40368B1FFF7EFFF00286F +:1077C00075D07022D5F8F41313F079FBFFF7C4FFDE +:1077D000C5F8F463EEE795F8F903002867D0FFF7E2 +:1077E00040FF0446444805F0B6FF606000B9FFDF83 +:1077F000606803F029FF88B12046FAF7B8F860788E +:10780000010706D520F00700401C6070FFF7A4FFB9 +:10781000D0E73948616805F0A7FFCBE736486168D3 +:1078200005F0A2FF01A800F05BFC00286CD1032149 +:10783000BDF8040006F001F98046BDF8040006F02A +:1078400062FA0746B8F1000F00D1FFDFD8F8040054 +:1078500010B10078FF2857D0FFF703FF04463846E1 +:10786000211D05F0B0FE00B9FFDFD4F8049089F8BF +:107870000060BDF804006080204600F0EAFE384653 +:1078800005F0CDFE00B9FFDF3B208DF81000BDF8FC +:107890000400ADF8120004A805F050FB0EA804F097 +:1078A0003CF96078010703D4C00607D409E02BE057 +:1078B00020F00700801C6070FFF74EFFC8F80490AE +:1078C00078E7D8F8040038B10178491C11F0FF01BD +:1078D00001709DD1FFDF6DE700221146384600F0B0 +:1078E0007AFB002894D1FFDF64E7000014B30100A5 +:1078F0000000002000060240B40700206E5246350A +:1079000078000000B80300201BB0BDE8F08310B57C +:10791000FC4CA0600868E060AFF2711001F031FE2D +:10792000607010BDF74900200870704730B50546FB +:107930004FF080500C46D0F8A41095B0491C05D1EA +:10794000D0F8A810C9430904090C08D050F8A01FAA +:1079500001F0010129704168216080680EE02B2050 +:107960008DF8000009A9684603F023FE00B1FFDF8F +:10797000012028700A982060BDF82C00A08028788B +:10798000002803D0607940F0C000607115B030BDB0 +:10799000F0B54FF080540746D4F8800095B00D46FE +:1079A0002B26401C0BD1D4F88400401C07D1D4F8FE +:1079B0008800401C03D1D4F88C00401C0BD0D4F8B4 +:1079C00080003860D4F884007860D4F88800B8600B +:1079D000D4F88C0016E08DF82C6069460BA803F0F3 +:1079E000E8FD00B1FFDF01983860029878608DF8FB +:1079F0002C6069460BA803F0DCFD00B1FFDF0198A5 +:107A0000B8600298F860D4F89000401C0BD1D4F80C +:107A10009400401C07D1D4F89800401C03D1D4F83E +:107A20009C00401C08D054F8900F28606068686083 +:107A3000A068A860E06816E08DF8006009A96846B3 +:107A400003F0B7FD00B1FFDF0A9828600B9868606B +:107A50008DF8006009A9684603F0ABFD00B1FFDFB7 +:107A60000A98A8600B98E86015B0F0BD30B5A64C38 +:107A70000546D4F8F40300B1FFDFC4F8F45330BD79 +:107A80003EB50546032105F0D8FF0446284606F01A +:107A90003AF9054604B9FFDF606818B10078FF289D +:107AA00000D1FFDF01AA6946284600F094FA60B9C8 +:107AB000FFDF0AE0002202A9284600F08CFA00B994 +:107AC000FFDF9DF8080000B1FFDF9DF80000411EB8 +:107AD0008DF80010EED260680199884201D1002033 +:107AE0006060894C94F8FA03022800D3FFDF94F811 +:107AF000FA03401CC0B284F8FA03012803D181487C +:107B0000407801F05DFD3EBD70B50446A1F57F40B3 +:107B100016460D46FF3800D1FFDF012E01D0FFDFF2 +:107B200070BD207820F00F00401D20F0F000503094 +:107B3000207000202076A5830120A07770BD70B54D +:107B400015460C460646FFF729FE90B1017821F054 +:107B50000F01491D21F0F0015031017046800121D3 +:107B6000017621680162A18881840577BDE87040B3 +:107B7000F2E53046BDE870401321FAF733BE70B528 +:107B800005460C46084609F03BFF08B1102070BDC1 +:107B90002846F9F747FC28B1284600F09DFE2070E2 +:107BA000002070BD43F2020070BD2DE9F04F87B098 +:107BB00005460020059053488946017811B10820F8 +:107BC00007B04CE54F4851494160284609F018FF7D +:107BD000002868D1484609F013FF002863D16F7A66 +:107BE0002B7AF818FF2870D82888FE286DD800B99D +:107BF0000A202880296909B94FF4B06129616A68AF +:107C0000B2B15478907804EB440420441478167987 +:107C100004EB440400EB44005479D27804EB4404B0 +:107C200006EB4606344402EB420204EB420406E053 +:107C300007EB470003EB430200EB42042046C7EB8F +:107C4000C7021044C3EBC3021044184486B206EBCB +:107C5000C60000EB400A04EBC40000EB40000090BB +:107C6000D82901D20920ABE7A87AB8422DD84FF025 +:107C70001208082F0DD8012B0BD807F0C4FC0746BB +:107C800009F0FAF93A1A297A687A521E0B189A42C0 +:107C900001DA404694E76F6883468846BFB13846AC +:107CA00009F0D5FE08B110208AE7B9787878014448 +:107CB00038780A180BEB0800904206D179793A79A6 +:107CC0001144FA781144884201D0072078E70098DF +:107CD0001FFA8AF387B20097CDE901642A4603A907 +:107CE0000020FFF70AFCDFF81C800399D9F8002078 +:107CF000D8F80400014491420AD90420C9F80010C0 +:107D00005EE7000018000020B80300208812002061 +:107D10000097CDE901641FFA8AF32A4604A9FFF708 +:107D2000ECFBDDE90301884200D0FFDF0498D8F8BE +:107D300004100844C8F80400C9F80000FF490120F5 +:107D400088F80000087005983AE72DE9F0470746E3 +:107D50000C46084609F054FE40B9384609F06EFE5C +:107D600020B9F81C20F00300B84202D01020BDE872 +:107D7000F087F3484FF00008817899B14178824646 +:107D8000C1EBC10100EB0115B4F8009015F8040F28 +:107D9000234600F00F000022294600F0F0F906000B +:107DA00004D013E0A4F800800520E0E797B1218813 +:107DB000494501D90C260DE02878234600F00F0034 +:107DC0003A46294600F0DBF9060005D00C2E01D01A +:107DD000A4F800803046CAE79AF801005446401CD7 +:107DE000C0B28AF80100092801D184F80180A07886 +:107DF000401EA070687800F0070101290BD002290D +:107E000003D0032918D0FFDFE4E7C006E2D4688876 +:107E1000FFF736FEDEE7CB48696805F0A5FC94F86D +:107E2000F903401CC0B284F8F9030128D2D1C64836 +:107E3000407801F0C5FBCDE794F8FB03401C8AF8BD +:107E4000FB03C7E770B50D46044609F0B5FD18B948 +:107E5000284609F0D5FD08B1102070BD29462046FE +:107E6000BDE8704007F09BBA70B5044615460E4653 +:107E7000084609F0A1FD18B9284609F0C1FD08B16E +:107E8000102070BD022C03D0102C01D0092070BD31 +:107E90002A463146204607F0A5FA0028F7D00520EB +:107EA00070BD70B514460D46064609F085FD38B91B +:107EB000284609F0A5FD18B9204609F0BFFD08B114 +:107EC000102070BD22462946304607F0AAFA002845 +:107ED000F7D0072070BD10B594B0044609F090FDAE +:107EE00010B1102014B010BD0F208DF8000009A9AA +:107EF000684603F05EFB0028F4D19DF82C0020704A +:107F0000BDF82E006080BDF83000A0800020E9E7B9 +:107F100070B505460C46084609F090FD20B93CB105 +:107F2000206809F06DFD08B1102070BDA08828B14F +:107F300021462846BDE87040FEF7A0B9092070BD73 +:107F400070B504460D46084609F036FD30B9601E8E +:107F50001E2814D8284609F02FFD08B1102070BD46 +:107F6000022C01D9072070BD04B9FFDF774800EB70 +:107F7000840050F8041C2846BDE870400847A4F16E +:107F800020001F28EED829462046BDE87040FAF7A9 +:107F9000BCB870B504460D46084609F031FD30B94D +:107FA000601E1E280DD8284609F006FD08B11020D5 +:107FB00070BD012C01D0022C01D1062070BD07201C +:107FC00070BDA4F120001F28F9D829462046BDE83D +:107FD0007040FAF709B905F099B9032803D00228CF +:107FE00003D001207047062070470320704710B56A +:107FF00094B003F0CFFA54484178806803F0C0FC95 +:10800000514801240C300178012916D130218DF816 +:108010000010C0788DF8020010B1012803D005E0EF +:108020008DF8024002E000208DF80200684604F05E +:1080300085FF10B109A803F070FD02208DF824001F +:108040008DF825008DF8260009A8FFF70DFA00B17C +:10805000FFDF8DF8244003208DF825008DF82600E1 +:1080600009A8FFF701FA002800D0FFDF3AE72DE961 +:10807000F0410646022012B101EB4200401DC7B29A +:108080003068C01C20F0030232601BBB2C483B460A +:108090000A21283809F081FB002408E00A2C11D2BB +:1080A000DFE804F005070509090B0B05050528485D +:1080B00004E0284802E0284800E0284809F08CFB4A +:1080C000054600E0FFDFA54200D0FFDF641CE4B2FC +:1080D0000A2CE3D3306800EB07103060BDE8F08174 +:1080E0002DE9F04395B081463A208DF82C00694681 +:1080F0000BA803F05EFA00B1FFDF43F20406002490 +:108100006D46DFF83C8032E02F19B87DC10706D0FC +:10811000400704D405EB4400C08800F0CEFB98F87B +:10812000FA0310B3B87D80071FD505EB4400C08863 +:1081300000F055FAC8B105EB440011E0080000203A +:10814000B8030020B40700201800002014B3010079 +:10815000391F0000F7840000E12F0000E9F0000063 +:10816000C188A9F80010002605E0641CE4B29DF85F +:108170000400A042C8D815B03046BDE8F0832DE910 +:10818000F041044600201880601E1D4616460F462A +:10819000052800D3FFDF05482A4600EB840031465E +:1081A00050F8043C3846BDE8F041184724B30100BC +:1081B0002DE9F0478A46984615460646032105F004 +:1081C0003CFC0446304605F0B0FD0C35AFB200254E +:1081D00081462E4604B9FFDFB9F1000F00D1FFDF61 +:1081E00004EB8A000189B94200D30125218CB942F0 +:1081F00002D2BAF1060F00D3012638EA050104D0F5 +:10820000817A41F0020181720BE038EA060108D060 +:10821000817A41F00401817214F8220F40F00400C9 +:10822000207005EA0600BDE8F0872DE9F047824698 +:10823000DDE90854174605F10C0099460E461FFA71 +:1082400080F800232A4639465046FFF7B1FF60B157 +:10825000B07800061BD424F8045C24F8029C504635 +:1082600005F063FD040008D106E0072F01D01120BE +:10827000D9E743F20400D6E7FFDF2D1D2046A9B25F +:1082800004F047FF00B9FFDF504603F0E5FA06EBC4 +:108290008700062F0289A2EB0801018103D2318CED +:1082A000A1EB080030840020BDE72DE9F04385B044 +:1082B0001E46DDE90D5491460F46DDF8308005F08D +:1082C00034FD60B309F10402694692B204F0BBFECA +:1082D00050B300980770BDF80800042800D2FFDFF3 +:1082E000002701983A46394607808770019803F0C5 +:1082F00075FB1EB1BDF80800001F3080B8F1000FFB +:1083000003D00198C01DC8F8000015B1BDF81000D9 +:1083100028808CB1288870B1039820600CE043F26B +:10832000020005B0BDE8F083072F01D01120F8E767 +:1083300043F20400F5E727600020F2E72DE9F04F53 +:108340000F46054687B016465088032105F075FB99 +:10835000040000D1FFDF4FF000098DF80C90A078E9 +:10836000400600D1FFDF042F53D3297841F30000EA +:10837000401C06D162786B789A424AD12278120763 +:1083800047D04FF0010B4FF00208142939DA4FF6AD +:10839000FF7A012933D0122902D0132931D11CE0F0 +:1083A0000C2F2ED1A17801F07F01012929D020784E +:1083B00020F00F00401C2070687860708DF80CB0C1 +:1083C000A888ADF80E00E888ADF810002889ADF84F +:1083D00012006889ADF8140016E0062F11D120783C +:1083E00020F00F0020707188012009F0A2FA8DF8AA +:1083F0000C80ADF80EA0A888ADF8100004E0062FA0 +:108400000AD09DF80C10B9B17088324603A9F9F76B +:1084100018FE07B0BDE8F08F207820F00F00207024 +:108420007188012009F085FA8DF80C80A888ADF8D4 +:108430000E00ADF810A0E7E70028EAD0768806A87D +:10844000CDE9000927464C46002306220421304688 +:10845000CDF80890FFF729FF00B1FFDF069805234C +:10846000042280F800B069784170A0F8028084800E +:108470000621CDE9001039463046FFF7D6FE002828 +:10848000C7D0FFDFC5E70020FE49024621F81020D3 +:10849000401C0828FAD3704770B50C46897821F043 +:1084A000FF01A170217821F00F012170012161707D +:1084B0000021616005F039FC050000D1FFDF28468E +:1084C00004F0BFFDF53820852046BDE8704000F07F +:1084D00010BB70B50D46032105F0AFFA040000D1C2 +:1084E000FFDFA07865F30600A07070BD70470146FD +:1084F000012009F01EBA3EB58DB20321284605F0D1 +:108500009CFA040000D1FFDF2078002220F00F0049 +:10851000207002208DF800004FF6FF70ADF80200C9 +:10852000ADF8040069462846F9F78BFD3EBD2DE9FC +:10853000F04705460C4600784FF0000901219246AD +:108540004F46B1EB101F00D0FFDF287E032809D073 +:10855000FFDF00BFAAF8007014B1A4F80090678094 +:10856000002060E6AE8B4FF0700906F10A0087B27A +:10857000D4B16888A080688B2081E680A889A9682A +:10858000001F80B28046024604F10A00C91D12F0A5 +:1085900051FC4645DED904EB0800A6EB08020A3080 +:1085A000296912F047FCD5E7AAF80070D8E72DE951 +:1085B000FC410F461C46164680460321089D05F0E7 +:1085C0003CFA010008D033463A464046CDE9004522 +:1085D000FFF72BFEBDE8FC8143F20200FAE770B51D +:1085E0000546A0F57F4086B0FF3811D0284605F03B +:1085F0008AFB040000D1FFDF2046694604F0E3FF58 +:1086000000B9FFDF019CB4F80500E41C052802D086 +:10861000012006B070BD2E460321284605F00DFA54 +:10862000050000D1FFDF2079122807D120880C280F +:1086300004D1A87800F07F00022806D0002306228B +:1086400004213046FFF7B4FDE3E7002306220521AD +:10865000F7E7F8B5024680689489938A30F8031FDB +:108660001C444588241F8C421ED1042D1DD0052D8D +:1086700029D0062D1ED0402D16D30E46144628466E +:1086800000F0D7F908280FD0207820F00F00401C08 +:1086900020F0F00010302070032020766583A68340 +:1086A000607840F008006070F8BDBDE8F840001D3B +:1086B00000F0CBB90093548813690A46011D204687 +:1086C000FBF7CCF9F8BDBDE8F840001D36E67FB5F4 +:1086D0000D460646032105F0B0F904003DD0207890 +:1086E00000F00F0001283BD0002003A9CDE90010C5 +:1086F000034602900C2205213046FFF7D6FD0028E4 +:1087000029D1039812210523017061781A46891C2A +:10871000417008214180298881806988C180A988A9 +:108720000181E98841810C21CDE9001021463046C4 +:10873000FFF77BFD00B1FFDFF0230022314601206F +:1087400009F05AF8207820F00F00401C2070607863 +:10875000801C6070002004B070BD43F20200FAE794 +:108760001120F8E77FB50D460646032105F065F9AF +:10877000040006D0207800F00F00012804D0082063 +:10878000E9E743F20200E6E7002003A9CDE9001083 +:1087900003460290062205213046FFF786FD002899 +:1087A000D9D103981321052301706178417002210A +:1087B000418085800621CDE900101A4621463046C9 +:1087C000FFF733FD00B1FFDF207820F00F002070AD +:1087D0000020C0E72DE9F84F0F468346032105F03E +:1087E0002CF90546584605F0A0FA80464FF0000ADD +:1087F00005B9FFDFB8F1000F56D1FFDF54E0404666 +:108800006946002204F082FD9DF800408146082C54 +:1088100000D3FFDF05EB840609F108003189062C3F +:108820000144318102D2298C08442884072C03D1C9 +:108830000AF1010000F0FF0AB07AC0070CD021460F +:10884000284600F0DDF838B9B07A032C20F001009A +:10885000B07258462ED0FFDFB07A810706D520F0DF +:108860000200B0722146584600F0DAF8062C1BD8F8 +:1088700095F82200410717D520F0040085F8220062 +:10888000002401E0E407002005EB8401887A420718 +:1088900006D520F0040088722146584600F0C0F842 +:1088A000641CE4B2062CECD37F1EFFB2A7D2504664 +:1088B000BDE8F88FFBF773F9CEE710B5032105F09B +:1088C000BCF8040000D1FFDF204600F012F9A078C8 +:1088D00040F08000A07010BD10B5032105F0ADF888 +:1088E000040000D1FFDF208D2321B0FBF1F0C0B2E6 +:1088F00010BD70B50D46032105F09FF8040000D1AE +:10890000FFDF062D00D9FFDF2946204600F078F86A +:10891000002805D004EB85018A7A42F001028A72B0 +:1089200070BD10B50446402801D2072010BD00F0EC +:1089300080F8082802D04FF4445010BD0021774839 +:1089400002E0491C082903D230F81120002AF8D18E +:10895000082903D020F81140002010BD042010BDCC +:1089600010B5402801D2072010BD00F062F8082899 +:1089700005D06A4A002122F81010084610BD0520D3 +:1089800010BD70B588B015460C00064606D02DB156 +:108990006088402804D2072008B070BD1020FBE793 +:1089A000218849B300F045F8082827D003AA06A972 +:1089B00005A88DE80700228804AB07213046FFF7A1 +:1089C00074FC0028E8D1BDF810202946059812F063 +:1089D00031FA2088BDF81010884204D9421A29447F +:1089E000039812F027FA05980090238862880721DF +:1089F0003046FFF7DCFDCFE70C20CDE70520CBE7C5 +:108A0000072903D0464A32F8112000E0028D00EB1E +:108A100081000089904201D20120704700207047F8 +:108A200010B5032901D0FFDF10BDBDE81040FBF7F2 +:108A300078B801460020394A02E0401C082803D2D9 +:108A400032F810308B42F8D170472DE9F0410F46D3 +:108A50008046014686B014463846FCF744FDC0B255 +:108A600008283CD10025ADF81450039560880321F7 +:108A700004F0E3FF060000D1FFDF00213046FFF7DE +:108A8000BFFF68B91722ADF8142003A8CDE900058F +:108A90000295002360881946FFF707FC00B1FFDF4D +:108AA000009405AA41463846039BFDF755FCC0B229 +:108AB00005281CD2DFE800F0031B13161300BDF8D5 +:108AC000140000280BD003990423CDE9000160882D +:108AD00000223146FFF7A9FB002800D0FFDF06B0D7 +:108AE000BDE8F081607840F010006070F7E7FFDFCC +:108AF000F5E710B504462021083012F034FA084892 +:108B0000002100BF30F8112004EB8103491C1A81B9 +:108B10000629F7D9208DA08410BD0000E4070020AD +:108B20003CB3010030B44FF0E02001234FF4006C5F +:108B30000021C0F880C11D02C0F880511C06C0F899 +:108B40008041E54A82F80014D21E82F80014E34AFC +:108B500082F80014E24A53609360C2F84011C2F8F0 +:108B60004411C2F84811C0F880C2C0F88052C0F861 +:108B70008042C0F800C1C0F80041136030BC7047AB +:108B800070B401204FF0E023C6024FF0000CC3F890 +:108B900080610402C3F880410506C3F88051D04AC1 +:108BA00050609060CF4801680029FCD1C2F840C1F4 +:108BB000C2F844C1C2F848C1C3F88062C3F8804219 +:108BC000C3F8805270BC70474FF0E0204FF4006152 +:108BD000C0F88012C910C0F880127047002804BF86 +:108BE000C1487047012804BFC0487047022804BF2D +:108BF000BF48704700B5FFDF002000BD08B5B84989 +:108C0000002298B101282FD002281CBFFFDF08BD29 +:108C10004FF48020C1F80803C1F84803B54802604A +:108C2000C1F84821B2480068009008BD4FF4803078 +:108C3000C1F80803C1F84803AF4B1A60C1F84021DE +:108C4000AE4BC1031960AE49C1F808034FF0E023F1 +:108C50000012C3F88001AB480260C1F84021C1F89E +:108C60000022A948027008BD4FF40030C1F8080383 +:108C7000C1F84803A5480260C1F844219B48006838 +:108C8000009008BD70B5DFF858C204260024012505 +:108C900058B1012840D002281CBFFFDF70BD9C4A9C +:108CA0004FF48020012B3CD144E0881E20F07F410E +:108CB0004FF48030CCF80803CCF84041CCF84403A2 +:108CC000CCF84015012B14BF002101218E4B5970A7 +:108CD0008B490D61DFF83CC2CCF800408E4C4FF060 +:108CE000020CC4F800C0DFF834C2CCF80060DFF832 +:108CF00014C23D32CCF80020C1F800524FF0E02CF5 +:108D00008A15CCF88022C1F80403CCF800210804AD +:108D1000834908601D7070BD824A4FF40030012BFA +:108D200008D0CCF80803C2F84041CCF84403C2F89C +:108D3000401570BDC2F84041CCF80403CCF84403A0 +:108D4000C2F8401570BD67480068704770B5764836 +:108D50000568774975480860614CD4F840010026E1 +:108D600001280AD1D4F8080310F4803F05D04FF44D +:108D70008030C4F80803C4F84061D4F844010128E5 +:108D80000DD1D4F8080310F4003F08D04FF40030A0 +:108D9000C4F80803C4F84461012007F0BEFBD4F80E +:108DA000480101280DD1D4F8080310F4802F08D011 +:108DB0004FF48020C4F80803C4F84861022007F08B +:108DC000ACFB5C48056070BD574810B50468584955 +:108DD000564808604C490878002808BF03201AD07C +:108DE000464A4FF000401060454AC00BC2F80803E5 +:108DF00003124FF0E02C0020CCF88031414B18607A +:108E0000C2F84001C2F8000208704A78002A1CBF6C +:108E10004870002001D007F080FB4648046010BD78 +:108E20004FF0E0214FF08070C1F8000270474FF022 +:108E3000E0214FF08070C1F8800270474FF0E021D0 +:108E40004FF40010C1F8000270474FF0E0214FF4DA +:108E50000010C1F8800270472949012008614FF0D5 +:108E6000E0210002C1F880027047410A43F609522E +:108E70005143C0F3080010FB02F000F5807001EBD5 +:108E800050207047430B48F2376C03FB0CF31B0C6C +:108E90004FEA432CC1F800C0DFF89CC003FB0C0371 +:108EA00026484CF2F72C5843400D10FB0CFC0CEB01 +:108EB000432303F580735B1213700A681044086043 +:108EC0007047194810B5046819491848086007F038 +:108ED00011FC1848046010BD0BE000E018E000E051 +:108EE00000B0004004B500404081004044B1004063 +:108EF00048B1004048B5004040B5004008F5014089 +:108F000000800040408500402800002044B500401B +:108F100008B00040048500400885004010850040EE +:108F200004F5014004B000401005024001000001BA +:108F30001805024014050240F7C2FFFF6F0C010044 +:108F400010B5EFF3108000F0010472B6EC484178E0 +:108F5000491C41704078012801D108F0EDF8002C3F +:108F600000D162B610BD70B5E54CE07848B9012576 +:108F7000E570FFF7E5FF08F0E7F820B1002008F002 +:108F8000C3F8002070BD4FF080406571C0F80453F5 +:108F9000F7E770B5EFF3108000F0010572B6D84C1A +:108FA000607800B9FFDF6078401E6070607808B9B3 +:108FB00008F0C6F8002D00D162B670BDD04810B5DB +:108FC000C17821B100214171C170FFF7E2FF00209B +:108FD00010BD10B5044608F0B7F8C949C978084073 +:108FE00000D001202060002010BD2DE9F05FDFF8E7 +:108FF00010934278817889F80620002589F80710B7 +:10900000064689F8085000782F4620B101280FD075 +:1090100002280FD0FFDF08F0A4F898B108F0A8F8F4 +:10902000A8420FD1284608F0A7F80028FAD047E058 +:109030000125F0E7FFF784FF08F086F80028FBD051 +:109040000225E8E701208407E060C4F80471AD4917 +:109050000D600107D1F84412AA4AC1F3423124320B +:109060001160A8494FF0020B34310860C4F804B312 +:10907000A060DFF894A2DAF80010C94341F30011B0 +:1090800001F10108DAF8001041F01001CAF80010EF +:1090900000E020BFD4F804010028FAD0284608F0E8 +:1090A0006BF80028FAD0B8F1000F05D1DAF80010FB +:1090B00021F01001CAF80010C4F808B3C4F8047114 +:1090C00099F807004C4670B1307860B908F03CF868 +:1090D000064608F027FA6FF0004116B1C4E9031004 +:1090E00001E0C4E9030115B12771BDE8F09F01203B +:1090F0002071BDE8F05F00F0E1B810B5040000D1C8 +:10910000FFDF4FF080414FF0FF30C1F8080300222D +:10911000C1F80021C1F80421C1F80C21C1F81021C7 +:1091200008F018F828B176490120C8704878401C2A +:1091300048702046BDE8104057E72DE9F041012571 +:10914000AF077D616E4CE079F0B1012803D0217A40 +:10915000401E814218DA07F0F7FF064608F0E2F9F0 +:10916000E179012902D9217A491C21720EB12169C4 +:1091700000E0E168411A022902DA11F1020F0EDC67 +:109180000EB1206100E0E060FFF7DAFE07F0DCFFDF +:1091900010B13D61A57000E0257000202072BDE88F +:1091A000F0812DE9F05F5948D0F800B0574A58498E +:1091B000083211608406D4F8080110B14FF001089C +:1091C00001E04FF00008D4F8000100B10120814611 +:1091D000D4F8040108B1012600E00026D4F80C01FF +:1091E00000B101208246D4F8100108B1012700E047 +:1091F000002748EA090126EA010020EA0A00B843EC +:1092000000D0FFDF0025B8F1000F04D0C4F80851EA +:10921000012007F079FFDFF8E880B9F1000F13D0E3 +:10922000C4F8005198F8050020B188F805500020D6 +:1092300007F06AFF98F8000030B107F085FF18B119 +:10924000012088F8020020610EB1C4F80451BAF17F +:10925000000F0AD0C4F80C5198F80200464600B935 +:10926000FFDFB5703570FFF794FE37B1C4F81051C9 +:1092700098F8040008B1FFF760FF2449091DC1F800 +:1092800000B032E770B51E4DE87808B907F058FF16 +:1092900001208407A061A87858B100BFD4F80C0160 +:1092A00020B9002007F068FF0028F7D10020C4F89B +:1092B0000C014FF0FF30C4F8080370BD2DE9F041F8 +:1092C0001926B507C5F808630124AC610020C5F86C +:1092D0000001C5F80C01C5F8100107F035FF084F73 +:1092E00010B1BC702C6100E03C70FFF729FE05490D +:1092F000B87920310860C5F804636C614FE700005D +:109300002C0000201805004010ED00E01005024080 +:109310000100000110B50D2000F06FF8C4B26FF02D +:10932000040000F06AF8C0B2844200D0FFDF3A497E +:109330000120086010BD70B50D2000F048F8374CD2 +:109340000020C4F800010125C4F804530D2000F0EA +:1093500049F825604FF0E0216014C1F8000170BDAC +:1093600010B50D2000F033F82C4801214160002198 +:10937000C0F80011BDE810400D2000F033B82848B7 +:1093800010B5046826492748083108602349D1F8F8 +:109390000001012804D0FFDF2148001D046010BD3A +:1093A0001D48001D00680022C0B2C1F8002107F06E +:1093B000D4FFF1E710B51948D0F800110029FBD00F +:1093C000FFF7DDFFBDE810400D2000F00BB800F006 +:1093D0001F02012191404009800000F1E020C0F807 +:1093E0008011704700F01F02012191404009800068 +:1093F00000F1E020C0F880127047002806DA00F083 +:109400000F0000F1E02090F8140D03E000F1E020DF +:1094100090F800044009704704D5004000D0004097 +:10942000100502400100000110B5202000F075F881 +:10943000202000F07DF84449202081F800044349B1 +:1094400000060860091D42480860F7F75BFF3F49C6 +:10945000C83108603F48D0F8041341F00101C0F85A +:109460000413D0F8041341F08071C0F80413364996 +:1094700001201C39C1F8000110BD10B5202000F0FA +:109480004CF8324800210160001D01602F4A481E3F +:10949000E83A10602F4AC2F808032C4BC833196011 +:1094A000C2F80001C2F860012B490860BDE8104015 +:1094B000202000F03DB825492848EC390860704765 +:1094C00022492648E8390860704770B51F4A80690C +:1094D000E83A224911601F49D1F800610023204D6C +:1094E0001D4A5C1E1EB1A84206D300210FE0D1F830 +:1094F000606186B1A84209D2C1F80031C1F860317B +:109500001460BDE87040202000F012B81168BDE87A +:10951000704011F05ABDFFDF70BD00F01F02012145 +:1095200091404009800000F1E020C0F880117047B0 +:1095300000F01F02012191404009800000F1E0206D +:10954000C0F880127047000020E000E000060240F2 +:1095500084120020000002400004024001000001CB +:1095600000C001004FF0E0214FF00070C1F8800111 +:10957000C1F88002384B802283F80024C1F8000132 +:10958000704700B502460420344903E001EBC003F4 +:109590001B792BB1401EC0B2F8D2FFDFFF2000BD07 +:1095A00041F8302001EBC00100224A718A7101228A +:1095B0000A7100BD294A002102EBC0000171704709 +:1095C00010B50446042800D3FFDF244800EBC40490 +:1095D0002079012800D0FFDF6079A179401CC0B25A +:1095E000814200D060714FF0E0214FF00070C1F86F +:1095F000000210BD2DE9F0411948056818491948C5 +:10960000083108601448042690F80004134F4009FC +:10961000154C042818D0FFDF16E0217807EBC100B5 +:109620000279012A08D1427983799A4204D0427999 +:10963000827157F8310080472078401CC0B22070FA +:10964000042801D300202070761EF6B2E5D204482B +:10965000001D0560BDE8F08119E000E0F40700207E +:109660001005024001000001400000200F4A12686E +:109670000D498A420CD118470C4A12680A4B9A428B +:1096800006D101B507F022FFFFF715FFBDE8014045 +:10969000074909680958084706480749054A064B1B +:1096A0007047000000000000BEBAFECA980000200B +:1096B000040000208811002088110020F84B586019 +:1096C00019721A80C90011F04EBC00210180704748 +:1096D0004FF6FF720280032008F02BB970472DE986 +:1096E000F04F0E46017804464FF0010A0AFA01F0E5 +:1096F00047F2FF1100EA01086168154697B0088833 +:10970000A0F57F42FF3A06D0B8F1000F07D047F22C +:10971000FE12104203D0012017B0BDE8F08F40EADE +:10972000080008804FF00009A5B185F80090237863 +:109730000027052003220221DFF864B3102B75D225 +:10974000DFE803F0740D131C2F4A515A31A5A1759F +:10975000A9F1F0EF20780B28E9D00420DCE729708C +:10976000A089A5F8010032801DE104212970A1899A +:10977000A5F80110E189A5F8031082E00620287001 +:10978000A089A5F80100E089A5F80300208AA5F8C2 +:109790000500A28AE81DA16911F04CFBA08AC01D3A +:1097A0006FE0082129702178082901D11021297042 +:1097B000A189A5F80110E189A5F8031030806A1D80 +:1097C000694604F1100005F02CFE00287ED1308897 +:1097D0009DF80010084454E00A202870A089A5F8DC +:1097E00001003280AAE00C212970A189A5F801109E +:1097F000E189A5F80310B7E0A2890AEB420081B223 +:109800003088884262D3052960D30E20287000205A +:1098100008E0236905EB400C33F81030401CACF82D +:10982000013080B29042F4D33180BCE0CAE09BF8B2 +:1098300009005A46002873D0401E5072227BDBF884 +:109840000400236900EBC205AA882868D3F800C089 +:109850000244A2F1080042F808CC5A6842608DF830 +:1098600000108DF8019028680290A888ADF80400D7 +:1098700000216846FBF776FCA5F80490002E01D085 +:10988000484630808FE0287840F0800129702878A1 +:1098900040F040012970287820F03F0012302870F5 +:1098A000A189A5F80110E289E81C216911F0C2FA2A +:1098B000E089C01C3080287841063FD5000672D56B +:1098C0008DF800A08DF80190308800E026E0001DA2 +:1098D000ADF804000295E189E81C08440390001DDE +:1098E00004909BF808008DF8140000216846FBF7EF +:1098F00039FC074630880C303080022F01D007B386 +:1099000063E09DF81420DBF804109BF808305846FB +:1099100001EBC2019A4201D28A882AB1042754E09D +:1099200030E02BE022E00DE0427A521C8BF8092057 +:109930000D6030888880A6F8009046E06168A089B4 +:10994000888030E0287820F03F0016302870A08909 +:10995000A5F80100E089A5F80300228A681D616965 +:1099600011F068FA208A401D3080E7E7287820F05F +:109970003F0018302870207B687055E760680188C8 +:10998000090401D4052720E0C088A189884201D0BC +:1099900006271AE01E202870A6F800A0606801883B +:1099A00021F400410180B8F1000F0ED0BBF8000097 +:1099B000002283000320A16807F01EFF6168207861 +:1099C000887007E0A6F8009003276068018821EA04 +:1099D0000801018038469FE62DE9FF4F97B00C46FD +:1099E000249E70B117280CD83288A2F57F43FF3B24 +:1099F00007D02278530601D4120604D508201BB0E4 +:109A00008BE60720FBE74FF000098DF800908DF8FA +:109A100001902278831E02F03F0CA0F1010A611C24 +:109A20004D461FFA8AF702AABCF1200F79D2DFE86F +:109A30000CF089107861786C78AA78CD78F778FC8A +:109A400078F478F378F2787878F178F078EF78EE47 +:109A50007889052876D104208DF80000B0788DF83B +:109A600004006088ADF8060020798DF80100607868 +:109A700000F03F000C282BD00ADCA0F102000928DE +:109A800060D2DFE800F0145F175F1C5F1F5F2200E9 +:109A9000122826D006DC0E281DD01028DAD11DE0B1 +:109AA0001408002016281FD01828D3D11FE03078C2 +:109AB000800701E030784007002843DA37E130784A +:109AC0000007F9E73078C006F6E730788006F3E75C +:109AD00030784006F0E730780006EDE73088C005C2 +:109AE000EAE73088C004E7E730888004E4E730889C +:109AF0004004E1E73178890724D50328AAD105205D +:109B00008DF80000B4F80100D2E031784907F3D5B0 +:109B1000062817D3617898B2012903D0022999D178 +:109B200002E01FE1022700E0102706218DF8001057 +:109B300061788DF80610ADF80490A11C904607F1ED +:109B400002091BE097E000BF31F8022BA0F1020AE6 +:109B5000A8F800208B463A4608F1020011F06AF995 +:109B600008EB070202F10208BDF80420AAEB070087 +:109B7000521C0BEB070180B2ADF804208145E3D9FC +:109B8000002878D1D3E03078000774D507208DF80D +:109B900000001FFA8AF1ADF80490601C0DF1060276 +:109BA0000FE000BF30F8023B22F8023B30F8023BE6 +:109BB00022F8023B091FBDF8043089B25B1CADF8E6 +:109BC00004300429EED2002955D1B0E03178C9061D +:109BD00051D502284FD308208DF80000ADF806902B +:109BE00061789BB28DF80410A01C0CE0078822F865 +:109BF000047B871C80C25B1ABDF8067008447F1C7A +:109C00009BB2ADF806709942F0D9A3BB8FE070E02B +:109C100075E065E04FE042E01DE012E005E0FFE79F +:109C20003078800627D5092003E03078400622D519 +:109C30000A208DF80000B088ADF80400ADF8067079 +:109C400007E03078000616D50B208DF80000ADF83F +:109C5000047002916BE03188C9050CD502287FD3CE +:109C60000C208DF8000099B2ADF8069063788DF85D +:109C70000430A01C10E073E0078822F8027B4788BC +:109C800022F8027B071D80C2C91ABDF8067018446D +:109C90007F1C89B2ADF806708B42EDD993E731880D +:109CA000C9045DD501285BD10D208DF80000B08876 +:109CB000ADF804003BE03188890451D505284FD325 +:109CC0000E218DF80010B188ADF80410B4F803101F +:109CD000401FADF80800601DADF80610039026E0A7 +:109CE000318849043CD501283AD10F208DF8000075 +:109CF0001DE03188090433D4B4F80110F180032841 +:109D00002ED3217801F03F011B2925D011218DF898 +:109D10000010318841F40041A6F80010B4F8011099 +:109D2000ADF80410C01EADF80600E01C02902078CB +:109D300000F03F001B2809D01D2807D003201A99E6 +:109D400007F0F7FD308800F400403080684619992C +:109D5000FBF708FA284652E610218DF80010DDE7DF +:109D60000725F7E70825F5E700B597B0032806D1E2 +:109D70008DF80000019100216846FBF7F3F917B058 +:109D800000BD00002DE9FF4F8DB09346DDE91A5666 +:109D9000DDF8749004464FF0000A082A06D0E06906 +:109DA00001F02CF858B110203070BCE0288809214F +:109DB00040F01000288089F80010022717E0E169C0 +:109DC00001208871E2694FF420519180E169887225 +:109DD000E06942F601010181E16900208873288869 +:109DE00040F020002880112089F8000004273078F6 +:109DF00009900A20307004F1180009F102080225C8 +:109E00000B9001F063FA002066E000BFBBF1100F79 +:109E100006D1022D04D0A8EB0A00BDF80C20428028 +:109E2000BDF80E001099884203D9F649097A0E91BF +:109E300004E003D1099909B131701FE0A8F80000CE +:109E40001C980088A0EB0500A0EB070083B2C7F1C7 +:109E5000FF00984200D203460E980AAA08EB0701B9 +:109E60008DE8070094F82010BDF80E00002201F0E4 +:109E70009AFA307030B1C0B2832858D0BDF80E00C5 +:109E800020833DE0089828B1DE48006800790A2860 +:109E90002BD335E0BDF82800C11901F0FF0A022DCF +:109EA0000ED099F80110514503D1BDF81820824217 +:109EB00008D0D4488A4600680178032908D021E0F8 +:109EC00089F801A0CF4800680178042906D008E08D +:109ED00000790A2816D20120089006E0BDF80E107D +:109EE000818005EB0A00D04485B203AA0E990B9835 +:109EF00001F0EFF920B91C980088401BB84285DAC0 +:109F0000022D0BD0BBF1100F04D1A8EB0A01BDF854 +:109F10000C0048801C98058000203070B94800680B +:109F20000078032803D0002011B0BDE8F08F022094 +:109F3000FAE72DE9F0410546406B1346002758B378 +:109F4000491F8EB2698FA1F57F42FF3A05D04218B2 +:109F500092881144891D8CB200E00024A1192A8F37 +:109F60000831914216D82044B3F8011020F8021BA2 +:109F7000B3F8031020F8021B324620F8026B591D7B +:109F800010F058FF6C87696B00202144B61D3144E6 +:109F9000088002E0092700E083273846BDE8F08109 +:109FA00010B50B88048F9C420CD9446BE0180488D0 +:109FB00044B1848824F40044A41D23440B80106021 +:109FC000002010BD822010BD2DE9F04788B000258B +:109FD000904689468246ADF81050072745E0039821 +:109FE00006888088000440D4A8F8006005A800977F +:109FF000CDE901504FF4007300224946304601F08C +:10A00000D2F9040038D1BDF81000ADF8180003985B +:10A0100004888188B44214D10A0412D4CDE90057CF +:10A0200021F40041029541F480434288494620468C +:10A0300000F0C8FF04000BD10398818841F400416F +:10A04000818003AA06A95046FFF7AAFF0400DED0CC +:10A05000CDE9005703980295BDF81430008800221E +:10A06000494600F0AFFF822C06D103AA04A950464E +:10A07000FFF796FF0400B2D0ADF8105004E003984B +:10A08000818821F40041818003AA04A95046FFF78A +:10A0900087FF0028F3D0822C03D0204608B0BDE80B +:10A0A000F0870020FAE730B50446406B97B00025F2 +:10A0B00070B10B208DF80000208FADF80800606BA8 +:10A0C0000391019000216846FBF703FE8DF80050D4 +:10A0D0004FF6FF7065636087258717B030BD2DE9A7 +:10A0E000F041044686B00E46616B00200C9D174679 +:10A0F00000292AD0012B28D12A4631462046FFF7D5 +:10A1000063FF002821D1002F1FD0A046344600262F +:10A11000ADF8106007270EE00398008828800398A8 +:10A120000296811DCDE90017838842880088214668 +:10A1300000F048FF30B903AA04A94046FFF730FFFA +:10A140000028E9D0822800D1002006B026E72DE9BA +:10A15000F0411546DDE906644A1D378892B2974200 +:10A1600001D206201AE73280172204F8012B0A4692 +:10A17000208065801946201D10F05CFE00200DE750 +:10A1800000220280C262831D0263C36142634FF6F4 +:10A19000FF734387028780F8201070474FF6FF72E5 +:10A1A0000280042007F0C5BB30B597B00D460446C9 +:10A1B000FFF779FF208E48B101208DF80000E06A9A +:10A1C000CDE9010500216846FBF783FD0020E06230 +:10A1D000206382E70146002009880A0700D5012094 +:10A1E00011F0F00F01D040F00200CA0501D540F097 +:10A1F00004008A0501D540F01000490501D540F062 +:10A2000020007047200800202DE9FF4FA7B01F460F +:10A21000349E299D379C5FEA000817D028784106B4 +:10A2200010D400F03F011E290AD0218811F4FE6FDE +:10A230000CD13A88172A09D3A1F57F42FF3A05D0FD +:10A24000010606D500F03F00122802D004202BB0F2 +:10A250006BE6FE4928984FF0000908728DF81090BF +:10A260008DF834900DAA0A60359A4A60ADF81490C2 +:10A27000ADF890902878032200F03F038646711CC9 +:10A2800004F1180CCB464FF0040AA8F10500CDF8F4 +:10A2900098C01F2B7DD2DFE803F07C7C107C1C7CF7 +:10A2A000867CEF7CEE7CED7CEC7CEF7CEB7C7C7C3C +:10A2B000EA7CE97C7C7C7C7CE800B8F1030F02D06E +:10A2C0008DF810A0EFE232701720A6F801003A8056 +:10A2D000BEE2B8F1050FF3D1B5F801002083ADF867 +:10A2E0001400B5F80310618300287DD088427BD824 +:10A2F00084F808B0A4F806B04FF6FF706084269882 +:10A3000000F0E4FF05203070B01C00904FF0020A0E +:10A3100008AA2899269800F0DCFF00287ED19DF835 +:10A320002600012803D002207070102002E00120D6 +:10A33000707002208346002201A909A805F071F877 +:10A3400030BB9DF80400834522D13A88801CA2EBE3 +:10A350000A0181421CDB0098BDF822100AF1020AB2 +:10A360000180009909A8891C0A46009101A905F0FD +:10A3700058F89DF80400009908AA014450441FFAB7 +:10A3800080FA00912899269800F0A3FF0028D2D0E7 +:10A3900000E069E2BAF1020F40D0A7F800A057E24E +:10A3A0008DF8100054E2B8F1070F89D3B5F8010019 +:10A3B0002083ADF81400B5F803106183A0B1884282 +:10A3C00012D84FF0010A84F808A0B5F80500E08023 +:10A3D00000202073E06900F011FD90B9E16981F877 +:10A3E00006A04FF4205100E078E0E26942F6010057 +:10A3F0009180E16981F80AA0E1690881E1690020A2 +:10A400008873A8F107006084E81D6062269800F058 +:10A410005DFF0720307006F1010A00E06FE00020C8 +:10A420004FF0010BADF8220018E000BFBBF1010FA7 +:10A430000CD0E069807901281FD03AF8021C00BFD7 +:10A440000BF102002AF8021B1FFA80FBBDF8221054 +:10A450000BF102002AF8021B1FFA80FB08AA2899B8 +:10A46000269800F036FF58B10FE0DAE16BE10AE11F +:10A47000AEE0D2E17BE05AE01EE0BDF82010DFE75D +:10A480003988A1EB0B000428D0DABBF1010F36D0DC +:10A49000E069807901280CD0BDF82010A1F57F403B +:10A4A000FF3806D03AF8021CAAF800100BF102009F +:10A4B000B1E1BDF82010F7E7B8F1070F03D0B8F10C +:10A4C000150F7FF4FDAEB5F801102183ADF814101F +:10A4D000B5F80320628309B1914201D901205FE7F9 +:10A4E00001212172A4F806B084F80CB0B8F1050F70 +:10A4F00007D0C0B2691DE26904F074FF08B10A20F8 +:10A500004EE74FF6FF70608404A824A9CDE900103F +:10A51000CDE902762878002300F03F0220462899F2 +:10A52000FFF730FC8146208BADF8140090E1B8F1C4 +:10A53000030FC6D14020ADF89000B5F8010020838C +:10A54000ADF81400289ACDE900210AAB02933988AE +:10A550000022491E8BB294F8201000F024FF8DF8E1 +:10A56000100058BB0B203070BDF828002EE0B8F169 +:10A57000050FA6D18020ADF89000B5F8010020832A +:10A58000B5F803206284ADF81400B2F5007F01D95C +:10A59000072005E742F47C426284289BCDE9003124 +:10A5A0000DF12C0CCDF808C03988491E8BB294F8F7 +:10A5B000201000F0F8FE8DF8100018B18328B5D1F6 +:10A5C0000220BEE00D203070BDF82C00401C22E1BE +:10A5D0004FEADE1000EB400002EB8000404505D959 +:10A5E0005FEA4E607FF56CAE584614E1B5F801C0E5 +:10A5F000ADF814C02978490608D505218DF8341026 +:10A600002978090605D58DF834B031E106218DF899 +:10A610003410E91C289BA8EB000ACDE90013CDF803 +:10A6200008B009911FFA8AF394F8201000226046BE +:10A6300000F0C8FC8DF810008DF834B02978490678 +:10A6400010D52088C00509D5208B01E02008002006 +:10A65000BDF81410884201D1C4F824B058468DF8D2 +:10A6600010B0D8E0832801D14FF002094FF4807078 +:10A67000ADF89000BDF814002083A4F822A009983A +:10A6800060621320C5E0B8F1050FFFF419AEB5F80C +:10A6900001C0ADF814C0218F41B3A1F57F42FE3A4D +:10A6A00024D007218DF83410289A6B1DCDE9003293 +:10A6B00080B2CDF808B040F40043DA46B5F8032084 +:10A6C00094F82010604600F07DFC4FF400718DF886 +:10A6D00010008DF834A0ADF89010832810D0E8B1A8 +:10A6E000218FA1F57F40FE3807D0DCE00A218DF8EC +:10A6F00034104FF6FE712187D6E7A4F838A0A7E002 +:10A700002A4641462046FFF714FC8DF8100008B198 +:10A71000832848D1BDF81400208351E72A464146DA +:10A720002046FFF706FC8DF81000E0BB618F606BE0 +:10A73000CDE9007643185A88998833F8060BFFF75D +:10A7400006FD814684E095F801A0B8F1020F7CD1A6 +:10A750005FEA0A0002D0BAF1010F76D108208DF825 +:10A76000340005A800908DF838A094F820105346C6 +:10A7700000222046FFF7B3FC8DF839008DF83AB07F +:10A7800050B9BAF1010F12D0BAF1000F04D1218FE4 +:10A79000A1F57F40FF380AD0208F40B18DF834B04A +:10A7A0004FF4806000E053E0ADF890000DE00DA89C +:10A7B0003599FBF78EFA81464FF480608DF834B0FE +:10A7C000ADF89000B9F1020F06D0FD48006880791D +:10A7D00028B18DF8100043E0A4F818A038E0B9F1D2 +:10A7E000000F03D081208DF8100043E005A80090F1 +:10A7F00094F82010534601222046FFF770FC8DF894 +:10A80000100020463699FFF74EFC9DF81000F8B96D +:10A8100019203070012038801AE006208DF81000D1 +:10A8200041E02078000723D5B8F1010F20D109209D +:10A830008DF83400A088ADF838000420369907F070 +:10A8400078F80820ADF8900000E011E0A7F800B01B +:10A850009DF8340020B10DA83599FBF73AFA8146EE +:10A86000B9F1000F1CD005E05FEA4E607FF528AD1E +:10A870004FF004092088BDF8901008432080BDF8EF +:10A88000900080050AD5218FA1F57F40FE3805D1C3 +:10A890002998E062A4F830804FF003094846D6E4D6 +:10A8A0009DF8100058B10120307028787070BDF804 +:10A8B000140070809DF810003071052038802088C9 +:10A8C000BDF8901088432080E8E72DE9FF4F01781C +:10A8D000A5B080464FF0010B0BFA01F04FF60901CD +:10A8E000349C0840ADF86C0021884FF00009A1F5B8 +:10A8F0007F42FF3A02D028B1080703D5012029B0D2 +:10A90000BDE8F08F289F4FF0000A04A887F800A048 +:10A910002799269A55460988ADF87C10A8498DF8E4 +:10A9200068A00A728DF810A008603298486098F804 +:10A930000000012830D0022809D0032876D13878C9 +:10A9400020F03F001D303870B8F80400A08098F85F +:10A950000000022804D1387820F03F001B30387006 +:10A9600021AAF91C07208DE80700BDF87C0094F8A7 +:10A970002010C01E83B2B8F80400002200F013FDBE +:10A980000028DBD1B8F80400A7F80100BDF8840066 +:10A99000C01CADF87C005FE198F805108DF86810D8 +:10A9A00098F804004FF40079012802D00228C5D19C +:10A9B00033E1208808F1080600F4FE60ADF86C0071 +:10A9C00010F0F00F1BD010F0C00F05D03088228B94 +:10A9D000904201D005257DE189B9B078C0070ED03D +:10A9E000B2680720CDE90020CDF808A0F388B2882E +:10A9F00094F82010308800F0E5FA00286FD12899EB +:10AA0000BDF86C00491C802845D006DC10280ED00B +:10AA100020280CD0402891D122E0B0F5807F5FD073 +:10AA200048457DD0B0F5806F88D1CBE029E1C006E4 +:10AA300001D5082000E0102081460420ADF814A0C4 +:10AA40001BAA8DF8100000921FA81AA90397CDE940 +:10AA5000011033884A4607212046FFF793F992E018 +:10AA60009DF868004FF00A09002894D121AA072018 +:10AA70008DE80700BDF87C0094F82010401E83B2DA +:10AA8000208B002200F08FFC8DF868000B203870BE +:10AA9000BDF8840019E09DF868004FF00C0900280B +:10AAA0001CD123AA07208DE80700BDF87C00628C2A +:10AAB000401E83B294F82010208B00F074FC8DF8B7 +:10AAC00068000D203870BDF88C00401CADF87C008B +:10AAD00004208DF81000208BADF81400BCE057E086 +:10AAE0003188208B814253D19DF868104FF01209B4 +:10AAF000002918D1616A81B1B178C90748D0B3681B +:10AB00000722CDE90032CDF808A0F388B28894F886 +:10AB1000201000F057FA8DF868001320387000E01C +:10AB200002E0ADF87CB097E0B6F800C0208B844519 +:10AB30002ED19DF868004FF016090028606B08D0F0 +:10AB4000E0B34FF6FF7000215646ADF808A0019023 +:10AB500027E060B1B178C9071AD1618F43181FA8E7 +:10AB6000CDE900075A88998833F8060B09E0B078D8 +:10AB7000C0070DD01FA8CDE90007B288F188604654 +:10AB8000B368FFF7E4FA050066D0062D7AD03FE0FF +:10AB900005253DE0019021AA02A92046FFF700FA11 +:10ABA0000146628FBDF80800824201D00029F1D031 +:10ABB000608F616B08440680019860874CE000005C +:10ABC000200800209DF868004FF0180940B1208B44 +:10ABD000C8B13088208320463399FFF764FA3BE000 +:10ABE00004F118000090237E94F8201001222046E2 +:10ABF000FFF775FA8DF868000028ECD1192038703D +:10AC0000ADF87CB0E7E7052520463399FFF74BFA0E +:10AC10009DF81000032857D05CE0208800F40070F5 +:10AC2000ADF86C0048452CD1208FA0F57F41FE394E +:10AC30007FF4D0AED8F808004FF0160948B1606331 +:10AC4000B8F80C1021874FF6FF716187A0F800A0BB +:10AC500002E04FF6FF702087BDF86C0030F4FE6113 +:10AC600016D0782300220420339906F0C5FD98F809 +:10AC70000000A0702088BDF86C10084320800AE016 +:10AC800000E006252088BDF86C108843208021E074 +:10AC90002188814321809DF8100028B15F484168D8 +:10ACA00004A8FBF716F805469DF8680090B187F8F0 +:10ACB000019087F800B0208B78809DF8680038718B +:10ACC0000520ADF87C0005E05448416804A8FBF776 +:10ACD00000F80546208810F4FE6F22D1208E00B3C4 +:10ACE0002799289B01AD0988ADF87C10DDE9321267 +:10ACF000009385E816001FABE26A2699FFF784FAF5 +:10AD0000054603280DD08DF810B0E06A0590339801 +:10AD10000690002104A8FAF7DCFF00B10546A4F86C +:10AD200030A02798BDF87C1001802846E7E500B5E3 +:10AD300097B0042807D102208DF80000019100216E +:10AD40006846FAF7C6FF17B000BD70B5334C0378FC +:10AD500000222168012B02D0022B44D129E00B787C +:10AD60000BB1042B03D10A712268032111702168F1 +:10AD7000062582880B7905EBC303CA522168082394 +:10AD80000A250A7903EBC2021144C2880A802168AD +:10AD900002890B7905EBC303CA52418920680C2351 +:10ADA000027903EBC202815220680179491C0171CA +:10ADB0001DE00A7482888A802168C288CA8022685D +:10ADC00001891181226841895181C1682068C1606F +:10ADD0006168FAF77EFF0146022806D02068007CF1 +:10ADE000002801D119B1812070BD832070BD0020E1 +:10ADF00070BD406B002800D0012070478178012988 +:10AE000009D10088B0F5205F03D042F601018842E5 +:10AE100001D1002070470620704700002008002064 +:10AE200010B58B7883B102789A4205D10B885BB15B +:10AE300002E08B79091D4BB18B789A42F9D1B0F8B9 +:10AE400001300C88A342F4D1002010BD812010BD38 +:10AE500007282BD012B1012A2CD103E0497801F048 +:10AE6000070102E04978C1F3C201052922D2DFE8D7 +:10AE700001F0031D081017000AB1032070470220DB +:10AE80007047042812D0052810D006280ED058B1DB +:10AE90000EE005280AD0062808D0022808D003E0D2 +:10AEA000062803D0032803D00520704700207047F0 +:10AEB0000F2070478120704710B513880B800B78E6 +:10AEC0001C061FD5FE4CA47A844204D843F010001F +:10AED0000870002010BD94682478C44064F3041303 +:10AEE0000B701378D17803F0030341EA032140F299 +:10AEF0000123B1FBF3F403FB1411926800FB012062 +:10AF0000401C10BD906810BD37B5BDF8041011800D +:10AF10009DF8045029061BD5E94901239468897AD4 +:10AF2000814209D8FE280FD1E80602D58B405B1E6E +:10AF300000E00023237007E0217883409943C5F3A4 +:10AF40000013834019432170107820F01000107016 +:10AF50003EBD2DE9F0410746C81C0E4620F0030017 +:10AF6000B04202D08620BDE8F081082A01D90E2027 +:10AF7000F9E7D34D002034462E60AF802881AA72B5 +:10AF8000E8801AE0E988491CE980810614D4E17858 +:10AF900000F0030041EA002040F20121B0FBF1F291 +:10AFA00001FB1201206800F0E3FA2989084480B20D +:10AFB0002881381A3044A0600C3420784107E1D44D +:10AFC0000020D0E72DE9FF4F85B01546DDE912B628 +:10AFD0008046994623F4404700F0BAFA04000BD0AB +:10AFE000207800060AD5B648817A0698814205D8AD +:10AFF000872009B0BDE8F08F0120FAE722466946B4 +:10B000000698FFF759FF824600208DF80400072EAE +:10B0100018D0012221463046FFF71AFF0028E8D158 +:10B02000207840060ED502208DF80400ADF8088087 +:10B03000BDF80000ADF80C50ADF80A00ADF80E7088 +:10B04000CDF810B05FEA094004D500273D46B84668 +:10B0500001260CE02178E07801F0030140EA0120AC +:10B0600040F20121B0FBF1F2804601FB12865FEA5B +:10B07000494009D5B04507D1A178207901F00301F5 +:10B0800040EA0120A84201D3B54201D90720B0E728 +:10B0900078191FFA80F9B14501D90D20A9E79DF86B +:10B0A000040020B101A8FAF712FE0028A1D1B04592 +:10B0B00007D1A0784FEA192161F30100A07084F84C +:10B0C0000490149800B10780BBF1000F15D00AEB73 +:10B0D00005003A4659460FF0ADFE224669460698ED +:10B0E000FFF7EAFE9DF80000224620F010008DF8E0 +:10B0F000000000990698FFF707FF002079E72DE987 +:10B10000FF4FDFF8BC9182461746B9F80610D9F810 +:10B11000000001EB410100EB810440F20120B2FB91 +:10B12000F0F183B000FB11764D46DDF844803146E6 +:10B13000049800F01DFA29682A898B46611A0C319F +:10B1400001441144AB8889B28B4202D8842007B0F5 +:10B1500050E70499CDB2290603D5A90601D585206B +:10B16000F5E7B9F806C00CF1010C1FFA8CFCA9F840 +:10B1700006C0129909B1A1F800C0A90602D5C4F809 +:10B18000088007E0104480B2A9F80800191A01EB02 +:10B190000B00A0602246FE200499FFF7B5FEE77081 +:10B1A00026712078390A61F30100320AA17840F053 +:10B1B000040062F30101A17020709AF8020060712E +:10B1C000BAF80000E08000262673280602D599F818 +:10B1D0000A7000E00127A80601D54FF000084D468F +:10B1E00000244FF007090DE0CDF80080CDE901966D +:10B1F000E8882146109B069AFFF7E4FE0028A6D1B6 +:10B20000641CE4B2BC42EFD30020A0E72DE9F04774 +:10B21000804600F09DF9070005D000264446284DE1 +:10B2200040F2012916E00120BDE8F087204600F039 +:10B230008FF90278C17802F0030241EA0222B2FBE0 +:10B24000F9F309FB1321006800F092F93044641C03 +:10B2500086B2A4B2E988601E8142E7DCA8F1010051 +:10B26000E8802889801B288100203870DCE720B125 +:10B27000401E10809170002070470120704710B56B +:10B280000F4904460088CA88904201D3822010BD2D +:10B29000096800EB400001EB80025079A072D08871 +:10B2A00020819178107901F0030140EA0120A0810A +:10B2B000A078E11CFFF700FE20612088401C01E01F +:10B2C0002C0800202080E080002010BD0121018298 +:10B2D00070472DE9FC474FF6FF780546A2F800803D +:10B2E000406817468A4680788DF8020068680088B2 +:10B2F000ADF8000000208DF80600288A2C88A042B6 +:10B3000000D304462C822DE0288A401C2882701D20 +:10B310006968FFF785FD18BB3988414501D1601E7A +:10B3200038806888A04222D3B178307901F00301D7 +:10B3300040EA01296946701DFFF772FD80B96989ED +:10B34000414519D0002231465046FFF781FD38B9FA +:10B350006A894A4504D1E968B0680FF03FFD58B1E9 +:10B36000641CA4B2204600F0F3F80600CCD1641EA1 +:10B370002C828220BDE8FC877C807079B871F088CF +:10B38000B8803178F07801F0030140EA012078813B +:10B39000A7F80C90287A324607F10801FFF78CFDD8 +:10B3A00038610020E6E72DE9F04F85B01D46904654 +:10B3B0000F468346DDF838A0DDF8409000F0C8F86D +:10B3C000040009D02078000608D57148807AB84278 +:10B3D00004D8872005B00DE60120FBE7C8F3090675 +:10B3E000224669463846FFF767FD07465046BAF1E0 +:10B3F000070F1AD000222146FFF72AFD0028E9D1C5 +:10B400002078400611D501208DF80400ADF808B071 +:10B41000BDF80000ADF80A00ADF80C60ADF80E50B4 +:10B4200001A8FAF754FC0028D4D12178E07801F083 +:10B43000030140EA0121A278207902F0030240EAE8 +:10B440000220464507D0B1F5007F04D9691E81422C +:10B4500001DD0B20BEE7864201D90720BAE7801B39 +:10B4600082B2AA4200D92A46B9F1000F01D0A9F848 +:10B4700000200F9810B1B9190FF0DCFC0020A9E7EB +:10B480002DE9F0411D4617460E4600F061F8040014 +:10B4900008D02078000607D53D48807AB04203D80E +:10B4A000872060E501205EE5224639463046FFF7F9 +:10B4B00003FD65B12178E07801F0030140EA012045 +:10B4C000B0F5007F01D8012000E0002028700020A6 +:10B4D00049E52DE9F0411D4617460E4600F038F8C3 +:10B4E000040008D02078000607D52948807AB042A9 +:10B4F00003D8872037E5012035E522463946304616 +:10B50000FFF702FDFF2D14D02178E07801F003024F +:10B5100040EA022040F20122B0FBF2F302FB1300EA +:10B5200015B900F2012080B2E070000A60F3010159 +:10B530002170002017E510B50C4600F009F828B17D +:10B54000C18821804079A070002010BD012010BD6D +:10B550000F49CA88824209D340B1096800EB400014 +:10B560006FF00B0202EB8000084470470020704728 +:10B57000C0B2820609D4000605D50548807A484342 +:10B58000401C80B27047084670470020704700009A +:10B590002C08002010B506F08BFB05F026FEFBF70B +:10B5A00011FF0EF04FFB06F083FABDE8104006F0E5 +:10B5B0000FBB10B50C4601F0C1FC80B3204600F073 +:10B5C000ACFA68B322780E2A09D00F2A07D0022AD3 +:10B5D00005D0032A03D0102A2ED0FFDF1DE0A0786B +:10B5E0001E282BD00FDC0C2824D008DC092825D2FB +:10B5F000DFE800F013241724241E1E1A1C00122852 +:10B600001CD1072010BD302818DDA0F13A00032816 +:10B6100014D2DFE800F011130B00002010BD11E080 +:10B620000EE043F20200F9E70420F7E70D20F5E70A +:10B630000F20F3E70820F1E71120EFE70320EDE703 +:10B64000FFDFEAE7FFDFE8E700F067BA70B503461F +:10B65000002002466FF02F050EE09C5CA4F130063E +:10B660000A2E02D34FF0FF3070BD00EB800005EBD7 +:10B670004000521C2044D2B28A42EED370BD30B595 +:10B680000A240AE0B0FBF4F304FB13008D183030F9 +:10B6900005F8010C521E1846D2B2002AF2D130BD74 +:10B6A00030B500234FF6FF7510E0040A44EA00208D +:10B6B00084B2C85C6040C0F30314604005EA003403 +:10B6C0004440E0B25B1C84EA40109BB29342ECD34E +:10B6D00030BD000010B509F0DBFB042803D009F0F1 +:10B6E000D7FB052802D108F0D4F950B909F05CFC69 +:10B6F000032803D009F05EFC032804D107F0AEFA5A +:10B7000008B1012010BD002010BD70B50C460546E3 +:10B71000062102F092F9606008B1002006E00721DE +:10B72000284602F08AF9606018B1012020700020DC +:10B7300070BD022070BD2DE9FC470C4606466946E7 +:10B74000FFF7E3FF00287DD19DF8000058B107F016 +:10B75000E7F9B0427ED00022214630460BF0F9FCDA +:10B76000002874D116E007F042FFB04272D00022E8 +:10B77000214630460BF0E0F8002868D1019D95F88D +:10B780009800303518B9687E08B1012000E000202B +:10B79000804603E0019D95F8498030354FF0010A5D +:10B7A00095F82D004FF00009A0B195F82E00800704 +:10B7B00010D584F8019084F800A084F80290A68047 +:10B7C00095F82F10A171298E2181698E618185F8EC +:10B7D0002D903CE0304602F0A8FA070000D1FFDFD0 +:10B7E000384601F049FD10F0FF0008D084F80190C0 +:10B7F0000D212170A680E08084F802A027E0304669 +:10B8000002F081FA070000D1FFDFB8F1000F21D06C +:10B81000384601F0BCFDA8B19DF8000038B9019888 +:10B82000D0F8BC004188B14201D180F80090304688 +:10B8300007F0DBF884F801900A21217084F8029067 +:10B84000A68000E006E0A97EA17185F8199001208C +:10B85000BDE8FC870020FBE71CB56946FFF755FFF4 +:10B8600000B1FFDF684601F0B1FBFD4900208968A7 +:10B87000A1F89A001CBD2DE9FC4104460E460620A5 +:10B8800002F086F80546072002F082F82844C7B285 +:10B890000025A8463E4417E02088401C80B2208046 +:10B8A000B04202D34046A4F8008080B2B84204D32C +:10B8B000B04202D20020BDE8FC816946FFF725FFB7 +:10B8C0000028F8D06D1CEDB2AE42E5D84FF6FF70FF +:10B8D00020801220EFE738B54FF6FF70ADF800007A +:10B8E0000DE00621BDF8000002F0B9F8044607217A +:10B8F000BDF8000002F0B3F80CB100B1FFDF002189 +:10B900006846FFF7B8FF0028EBD038BD2DE9F041BD +:10B91000D4A0D64C06790025076884F8425001F07F +:10B920004EFB84F8435004202087102060874FF698 +:10B93000FF70A4F80A0184F80C51A4F80E0184F8F1 +:10B94000315004F8EE5BC94804F8C05C04F8BA5CF6 +:10B950008030A57340F87D7FC4490671FD31481ED3 +:10B960000BF095F80A20207503206075A075E0752E +:10B970000E20207606206076A076E076BDE8F08185 +:10B980002DE9F041B64C0D466060217007F015F8C6 +:10B99000FFF7A1FFFFF7BAFF207809F01CF8B349C1 +:10B9A000C431A1F181000F46064607F041FF6068EF +:10B9B0000BF038F820780CF0C9FB284609F0C1FEDE +:10B9C0003946304607F0E8F860680BF04DFC01F0AE +:10B9D000F6FAA649002081F84300CFE710B501240C +:10B9E0000AB1002010BD21B1012903D00024204656 +:10B9F00010BD02210DF096FBF9E72DE9F047040098 +:10BA000000D1FFDF994D002695F8310058B16670DE +:10BA10001020207095F83200A07095F83300E07087 +:10BA200085F831606AE0287840B12C22A91C2046B4 +:10BA30000FF000FA0E2020702E705FE095F82E00B7 +:10BA400060B10120E07095F82F00A07095F83000EB +:10BA500060700F20207085F82E604FE0844802212E +:10BA60008246FFF708FF00B1FFDFB5F80E91062010 +:10BA700001F08EFF0746072001F08AFF3844C7B265 +:10BA8000781C00F0FF0800BFB5F80E01B84213D1D2 +:10BA90000021204607F05EFD58BB95F8340080B3C6 +:10BAA0006670132020701C21A01C0FF03AFA0220AF +:10BAB000A07085F8346021E040451BD1002120466C +:10BAC00007F000F8E8B12078132817D1A0783C28B7 +:10BAD00014D1A088072101F0B0FF050000D1FFDFDD +:10BAE000288806F082FFA088072101F0B8FF00B186 +:10BAF000FFDF03E02146FFF71EFE10B10120BDE885 +:10BB0000F087FFE702215046FFF7B5FE18B9B5F8F8 +:10BB10000E114945B8D10020F1E76EE710B508F0E5 +:10BB2000C8FE00B1FFDF0AF07BFF00B1FFDF07F0C6 +:10BB300035FE09F0EFFD00B1FFDF0BF093FB00B124 +:10BB4000FFDF06F0F7FF00B1FFDF0CF0F9FA00B1FC +:10BB5000FFDFFFF7C0FEFFF7D9FE06F017FF02F088 +:10BB6000C1F801F02CFA4148002180F8431001711E +:10BB7000012141710222C270017010BD10B53B4C11 +:10BB8000207828B10A21BDE810400E2001F0E4B968 +:10BB9000FFF7A0FD08B10C2002E001F010FA002030 +:10BBA0002071012060710A21E170207010BD70B514 +:10BBB0002E4C0546207828B1BDE8704039210E2072 +:10BBC00001F0CAB9FFF786FD08B10C2012E094F825 +:10BBD000430008280DD204EB0010102229464430FF +:10BBE00001F0C7F994F84300401C84F8430000209A +:10BBF00000E007202071012060713921E170207080 +:10BC000070BD70B5194C0546207828B1BDE870406C +:10BC10000B210E2001F0A0B9287818B1012801D01D +:10BC2000122016E094F8C400082823D2FFF752FD32 +:10BC300008B10C200DE00E482B7894F8C4106A1C53 +:10BC4000463806F01AF994F8C400401C84F8C40081 +:10BC500000202071012060710B21E170207070BD07 +:10BC600044000020FFFFFFFF1F00000038080020F5 +:10BC7000460900200720ECE710B5FE4C207828B1DB +:10BC80003821BDE810400E2001F066B9FFF722FD13 +:10BC900008B10C2002E0002084F84300207101204C +:10BCA00060713821E170207010BDF248017819B13F +:10BCB0000F210E2001F050B9002101710E21817079 +:10BCC0000F21C170FF2181714FF6FF710181EA4997 +:10BCD00049680A7882728A8882814988C1810121F3 +:10BCE000417101707047E3490A781AB13B210E2077 +:10BCF00001F032B90088A1F80A01012081F80C0195 +:10BD000000220A7148713B22CA700870704710B552 +:10BD1000D84C207828B12B21BDE810400E2001F02E +:10BD20001BB90821A01D05F0F9FA0020207101209F +:10BD300060712B21E170207010BD70B5CD4C217861 +:10BD400029B1BDE8704031210E2001F005B990F90C +:10BD50000000042814D098B1011D11D010F1080F73 +:10BD60000ED010F10C0F0BD010F1100F08D010F105 +:10BD7000140F05D010F1280F02D01220207103E01B +:10BD8000002506F0BBF825713120E07001206071BC +:10BD9000207064E730B5B74D04468DB0287828B1DF +:10BDA0002A210E2001F0D8F80DB030BD1022214616 +:10BDB000684601F0DEF8102204F1100104A801F039 +:10BDC000D8F868460DF0D6FF10222C46A81D08A909 +:10BDD00001F0CFF8002020710E20A0702A20E07022 +:10BDE000012060712070DFE72DE9FF41A14C207830 +:10BDF00028B13A210E2001F0AFF8BDE8FF814FF0E5 +:10BE0000000884F80680B4F80A01ADF8040002A91D +:10BE1000FFF77BFC20B1002101A8FFF72CFDE8BB58 +:10BE2000BDF80400ADF8000002A980B2FFF76DFC78 +:10BE300000B1FFDFBDF8000001F077FF050000D181 +:10BE4000FFDF2846039F01F0A9FA80F0010697F86A +:10BE50004950BDF8000001F056FF070000D1FFDF98 +:10BE6000384601F094FA80F0010255EA020019D038 +:10BE7000A179BDF8000004EB410108817D49A37957 +:10BE80001831585C65F300005854A37962F34100FF +:10BE90005854A27966F38200505400E00DE0A07976 +:10BEA000401CA07100216846FFF7E5FC28B9BDF8E9 +:10BEB0000000BDF804108842B6D1012084F8048047 +:10BEC00060713A21E170207097E770B5694C0546C2 +:10BED000207828B1BDE8704034210E2001F03CB834 +:10BEE00008F0D6FF052804D0284608F061FD0020A0 +:10BEF00000E00C202071012060713421E17020707D +:10BF0000ADE65C48017819B10E21084601F024B86D +:10BF10005949CA68C0F80620098A41810021017187 +:10BF2000012141710E22C2700170704770B5514CF1 +:10BF30000646251D207828B1BDE8704032210E202C +:10BF400001F00AB83146002006F00EFF287058B9FB +:10BF500000213246084607F053FD287020B94648B4 +:10BF60003168C160B1880182012060713221E170C5 +:10BF7000207074E670B53F4C0546207828B1BDE8C6 +:10BF8000704030210E2000F0E7BF08F0C4FD10B96A +:10BF900009F064FE68B1287809F034FC287807F0CD +:10BFA000A7FD00202071012060713021E170207018 +:10BFB00055E60C20F6E72DE9F0412E4C0646251DEE +:10BFC000207828B1BDE8F04117210E2000F0C4BF51 +:10BFD0003146012006F0C8FE2870012768B93246B4 +:10BFE0000121002007F00CFD287030B93068E063B3 +:10BFF000B088A4F8400084F8427067711720E070A0 +:10C000002770BBE438B51B4D0446287828B1BDE83D +:10C01000384030210E2000F09FBF227961798A429A +:10C0200015D0A079E379984211D01F2A0FD81F2983 +:10C030000DD8002211460EF03DF940B90022E079FA +:10C0400011460EF037F910B9207A072801D91220CD +:10C050001BE04FF6FF70ADF8000008F0A5FFD8B95F +:10C0600008F0A8FFC0B908F013FFA8B9002168467E +:10C0700004E000003808002044000020FFF7FBFB2C +:10C0800050B1204605F032FE002028710120687171 +:10C090003E21E970287038BD0C20F6E72DE9FC47F9 +:10C0A000FE4C054694F82E0028B128210F2000F000 +:10C0B00053FFBDE8FC87282084F83000012184F874 +:10C0C0002E10A8784FF000091A2825D00EDC16286B +:10C0D00031D2DFE800F030303030302130303030D5 +:10C0E0003030303030303030302121212A2822D0F9 +:10C0F0000BDCA0F11E000C281DD2DFE800F01C1C98 +:10C100001C1C1C1C1C1C1C1C1C0D3A38042812D2A4 +:10C11000DFE800F0110211022888B0F5706F0AD232 +:10C120001F20884684F82F0028886946FFF7EDFA1B +:10C1300018B1022019E0122017E09DF80000019FBD +:10C14000002806D007F1CE07019E05D106F1B506FD +:10C1500004E007F1B407F7E706F1CF06684600F000 +:10C1600023FF08B1387818B10C2084F82F00A0E71D +:10C1700087F80080A878307084F82F90684600F027 +:10C1800025FF96E77CB5C54C0546207820B12521D2 +:10C190000E2000F0E1FE7CBD28886946FFF7B5FA65 +:10C1A000002168B102202071BC4881600173E180E8 +:10C1B0000E20A0702520E0700120607120707CBDF1 +:10C1C000019A104612F1300282F836108368A3609B +:10C1D000037B237392F83630002BF5D12888E0805A +:10C1E000E6E72DE9FC41AD4C064694F82E0028B157 +:10C1F00010210F2000F0B0FEBDE8FC811F2084F864 +:10C200002F00102084F83000012784F82E70308829 +:10C210006946FFF77AFA70B9684600F0C5FE50B17A +:10C22000019D9DF8000030350028019805D0E230CE +:10C23000017841B904E0022006E0D0F8BC00F7E73D +:10C2400095F82D1019B13A2084F82F00D4E795F80D +:10C250002E1089070CD1042101709DF8000020B92F +:10C2600001993088D1F8BC104880684600F0AEFED5 +:10C27000002084F82F0085F82D70BDE72DE9F047E8 +:10C28000864D0646287828B1BDE8F0471D210E20CE +:10C2900000F062BE4FF01F0985F80490012068711C +:10C2A0001D21E970287008F0F3FD0C2704284ED0FA +:10C2B00005284CD0B0791224012800D0E8B9307894 +:10C2C00008B1012819D1F07908B1012815D1708879 +:10C2D00043F6FD71021F30248A420ED2B288121F2B +:10C2E0008A420AD22887B0886887B0794FF0000860 +:10C2F0004446012803D050B111E02C710CE495F8AC +:10C30000420020B3654A3C320121084602E0644AFB +:10C310000021012007F074FB040000D0FFDFF0795A +:10C32000012800D010B907F093FB044614B185F83A +:10C330000490E3E73078012801D018B109E000212A +:10C34000022001E00021012007F097FB08B12F71C6 +:10C35000D4E785F80480D1E770B5504C217829B135 +:10C36000BDE870401E210E2000F0F6BD1F21217196 +:10C37000012161711E22E270217002781221012ACE +:10C3800000D01AB9407818B1012801D0217166E4B3 +:10C3900000260C25012A08D008F07AFD052802D0D5 +:10C3A00008F034FA30B1257159E4618F208F08F01C +:10C3B000BFFBF7E7267152E42DE9FE4F0546AFF2C9 +:10C3C0005C71D1E90001354E01908A4696F82E0045 +:10C3D00030B103B02121BDE8F04F0F2000F0BCBD0B +:10C3E0001F2086F82F00212086F830004FF001082A +:10C3F00086F82E80298843F6FD730A1F30209A4262 +:10C400007ED26A88141F9C42FAD28A4278D8EA897E +:10C4100040F67B43911F9942F2D2298A8C1F9C429D +:10C42000EED28A42F2D86A8AB2F5FA7FE8D2AA8AB4 +:10C4300040F67744A2F10A03A342E1D2B2EBD10F56 +:10C440005ED9E98A2A8B9142E0D82979122011B16C +:10C45000012955D102E069790029F9D1297B09B177 +:10C460000129F6D108F014FD4FF00C0905286ED013 +:10C4700008F00EFD0428FAD096F83400002866D1A2 +:10C4800007F0B5F8A0F57F41FF39F8D1062102A8E1 +:10C4900001F0A4FA040050D0032103E03808002082 +:10C4A000500000200CF02CFB96F8030100901B229A +:10C4B00096F802312088114601F070FB04283ED026 +:10C4C00000B1FFDF208806F08FFA04F10D07B4F801 +:10C4D00000B00421384604F021FF594638460CF0DC +:10C4E00004FCFDA03F1D006800900321684604F095 +:10C4F000A0FE002069460A5C3A54401CC0B200E02D +:10C500006FE00328F7D3288A6080688AA080A88A11 +:10C51000E08096F8051196F8040108F0C8FA014683 +:10C52000204608F0F0FA002784F8367084F8377057 +:10C53000687968B101280FD10CE0092051E020880A +:10C54000062101F08CFA00B1FFDF072049E071E01D +:10C55000677601E084F81980D5F80600C4F81A005F +:10C560006889E0830198A06084F80CA084F8C480F6 +:10C570008DF800700121684604F05BFE9DF8000014 +:10C5800000F00701C0F3C1021144C0F34010084499 +:10C590008DF80000401D2076092801D20830207651 +:10C5A000002120460CF0ACFA287B18B1012805D0F8 +:10C5B000FFDF24E00021C94A012005E096F842008F +:10C5C00098B10121C64A084607F01AFAB8B1208886 +:10C5D00006F00BFA2088062101F041FA00B1FFDFD6 +:10C5E0001F2086F82F00BDE8FE8F208806F0FDF999 +:10C5F0002088062101F033FAE0B1FFDF1AE0287944 +:10C60000012800D010B907F023FA50B921460320C1 +:10C6100007F033FA28B96A882988204608F005FA15 +:10C6200058B1208806F0E1F92088062101F017FAB8 +:10C6300000B1FFDF86F82F90D5E784F8B87086F850 +:10C640002F70D0E738B5A64C3C3C207820B1222191 +:10C650000E2000F081FC38BD1F202071012565717E +:10C660002220E070257008F013FC052802D00C2071 +:10C67000207138BD00202071684608F090FA00282B +:10C68000F7D10098008806F0B0F9009806210088DC +:10C6900001F0E5F900B1FFDF904884F834500C3820 +:10C6A0000078FCF78DFF38BD2DE9F0418C4D044634 +:10C6B0003C3D95F82E0028B1BDE8F04123210F2024 +:10C6C00000F04ABC1F2085F82F00232085F8300099 +:10C6D000012085F82E00618840F67B438A1F3020B8 +:10C6E0009A4251D2A288961F9E424DD291424BD877 +:10C6F000E188B1F5FA7F47D2218940F67746A1F16A +:10C700000A03B34240D2B1EBD20F3DD96189A2896D +:10C71000914239D84FF000082088062101F08DF9A8 +:10C7200006004FF0020707D000F030FC20B1D6F829 +:10C73000BC00017839B902E085F82F7061E4D6F8C1 +:10C74000D010097809B13A201EE005218171D6F890 +:10C75000BC004146A0F80880D6F8BC20A0885081D3 +:10C76000D6F8BC20E0889081D6F8BC202089D08102 +:10C77000D6F8BC00028943899A4204D88279082AF3 +:10C7800001D89A4203D3122085F82F0039E4228879 +:10C790004280D6F8BC00077085F82F1031E42DE9EF +:10C7A000FE434F4C06463C3C207830B103B0242178 +:10C7B000BDE8F0430E2000F0CFBB012565712420B9 +:10C7C000E070257030460CF0B2FA08B1002000E0AD +:10C7D0001220207100282DD1414884F8FC504430AB +:10C7E000316840F87D1F317901714FF0000884F8FD +:10C7F000FC806946062001F0ACF800B1FFDF684616 +:10C8000001F085F8A0B9BDF8047000BFBDF80400C0 +:10C81000062101F012F9060000D1FFDF86F8C450AE +:10C82000684601F074F818B9BDF80400B842EDD1BB +:10C8300084F80480BDE8FE8370B5294D06463C3D72 +:10C8400095F82E0028B1BDE8704026210F2000F099 +:10C8500083BB1F2085F82F00262085F8300001209B +:10C8600085F82E003088062101F0E7F8040007D093 +:10C8700000F08CFB20B1D4F8BC00017831B901E0A4 +:10C8800002200CE0D4F8D010097809B13A2006E073 +:10C8900005210170D4F8BC1030884880002085F84C +:10C8A0002F0074E50E483C38017819B106210E209E +:10C8B00000F052BB002101710E2282700622C2706C +:10C8C000C0F80610C0F80A10817941F001018171A9 +:10C8D0000121417101707047112233005000002086 +:10C8E0007408002070B5F84E054696F82E0028B161 +:10C8F000BDE870402C210F2000F02EBB1F2086F8D1 +:10C900002F002C2086F83000012086F82E00288881 +:10C91000062101F092F8040007D000F037FB20B1A7 +:10C92000D4F8BC00017831B901E0022020E0D4F84D +:10C93000D010097809B13A201AE094F86410D1B106 +:10C94000D5F802104160D5F80610816054F8BC0F8C +:10C95000698910228181206805F10C010E300EF0EA +:10C9600069FA21680320087021682888488000201F +:10C9700086F82F000BE50C20FAE770B5D24E04467E +:10C980000C25307828B1BDE8704018210E2000F049 +:10C99000E3BA08F009FB032852D008F00BFB032888 +:10C9A0004ED0607908B1012829D1A07908B10128B9 +:10C9B00025D1A07B28B1012803D0022801D003286B +:10C9C0001DD1607BD8B1C00819D162884FF4804076 +:10C9D000824202D82188814203D9207901280ED1D0 +:10C9E00018E0207930B1012814D0022805D003289E +:10C9F00005D102E0202A0BD30CE0A0290AD220792D +:10CA0000042805D12088202802D36188884201D9D2 +:10CA1000122515E0207986F83600607910B10128DA +:10CA200004D00DE0A94A0021204606E096F8420015 +:10CA300030B1A54A01213C32204606F016F90546E0 +:10CA40000120357170711821F17030709FE410B5BC +:10CA50009D4C217829B11A21BDE810400E2000F02C +:10CA60007BBA01781F2902D91220207106E000212B +:10CA700021710278411C104606F0A8F9012060716E +:10CA80001A21E170207010BD10B58F4C217829B1AA +:10CA90002021BDE810400E2000F05EBA01781F2969 +:10CAA00002D91220207106E0002121710278411C78 +:10CAB000104606F07AF9012060712021E1702070A3 +:10CAC00010BD2DE9FC41804C217829B1BDE8FC4125 +:10CAD0001B210E2000F040BA012767710C21217143 +:10CAE00000780026012803D000286AD012205CE0DC +:10CAF00006F085F800287ED094F83600A0B1012811 +:10CB000012D0042810D008F055FA002873D108F08C +:10CB10004BFA18B108F048FA02286CD1002008F04E +:10CB200074FEE0B3FFDF4AE008F03EFA002862D16D +:10CB300008F040FA00285ED105F0F2FFA0F57F4131 +:10CB4000FF3958D1072101A800F048FF5F49054689 +:10CB50000C398860280000D1FFDF032128460BF044 +:10CB60001DFF284606F0FCF994F8091194F8080115 +:10CB700008F023FA0146284608F04BFA94F807011A +:10CB800000901B2294F806312888114601F006F81F +:10CB900068B1042800D0FFDF2888072100E00EE0FC +:10CBA00000F05DFF00B1FFDF0720207123E028883F +:10CBB00005F01AFF284608F028FE00B1FFDF2671B5 +:10CBC00019E008F0F1F9032803D008F0F3F903287D +:10CBD00011D108F0ECF90546002008F027FD50B906 +:10CBE000267145B1288805F000FF2888072100F04C +:10CBF00036FF00B1FFDF1B20E0702770BDE8FC812D +:10CC00002DE9F041304C0646207828B1BDE8F041CE +:10CC10002D210E2000F0A0B93088072100F00DFF73 +:10CC200005004FF0010720D095F8D10040B995F8E4 +:10CC30003C000F2801D0102802D195F8040150B112 +:10CC40000C2020710E20A0702D20E0703088E08034 +:10CC50006771277072E51022B11C05F1D2000EF049 +:10CC6000E9F885F8D1700020EBE70220E9E770B51C +:10CC7000154C0546207828B1BDE870402E210E20C5 +:10CC800000F06AB92888072100F0D7FE022178B1A8 +:10CC900090F8D1202AB990F83C200F2A04D0102A0D +:10CCA00002D00C20207104E080F8D1100020F9E7B8 +:10CCB00021710E20A0702E20E0702888E0800120D5 +:10CCC00060712070EDE50000380800205000002061 +:10CCD0007CB5C54C0546207820B137210E2000F0E8 +:10CCE0003BF97CBD28886946FEF70FFD38B102206C +:10CCF0002071012060713721E17020707CBD0198A6 +:10CD00007F22014680F8382080F83920002280F800 +:10CD10003A20A87801F8280FE878487028798870B8 +:10CD20002271E6E71CB5B04C217821B113210E2009 +:10CD300000F012F91CBD00886946FEF7E6FC08B158 +:10CD4000022005E0019890F82810012902D00C205B +:10CD5000207106E0382100222271095C21720088CE +:10CD6000E080012060711321E1700E21A17020701C +:10CD70001CBD2DE9F0419C4C0546207828B1BDE84A +:10CD8000F04135210E2000F0E7B8A87808B101285D +:10CD900003D1A888B0F5FA7F01D912202071288824 +:10CDA000072100F04AFE0126A0B1002780F8C870D4 +:10CDB000A988A0F8CA1080F8A460A978012900D039 +:10CDC000002180F8C81090F8A50008B108F01CFEFA +:10CDD000277101E00220207166713520E070267015 +:10CDE000ACE42DE9F041804C0546207828B1BDE83F +:10CDF000F0413C210E2000F0AFB82888072100F058 +:10CE00001CFE012358B382886D88C688418803EBD5 +:10CE10004207BD4217D342F210777E43BF107943D9 +:10CE2000B6FBF1F1491E89B24FF4FA76B14200D94E +:10CE300031468D4200D22946491C521CB1FBF2F109 +:10CE40005143491E8AB290F8F01001B90284E28081 +:10CE50000020207163713C20E07023706EE402209A +:10CE6000F7E770B5604C0546207828B1BDE8704002 +:10CE700033210E2000F070B808F096F808B10C20AD +:10CE800017E0297889B10A290FD014290DD01E295D +:10CE90000BD0282909D0322907D04B2905D0642985 +:10CEA00003D0FF2901D0122003E0284608F04FFDEF +:10CEB00000202071012060713321E1702070F0E4C6 +:10CEC00049490A781AB13F210E2000F045B80022E6 +:10CED0000A710278454B4AB1012A0CD01220087120 +:10CEE000012048713F22CA700870F4E4D0F80100B4 +:10CEF000C3F80200F4E7D0F80100C3F80600EFE73A +:10CF000070B5394C0546207828B1BDE870403D2108 +:10CF10000E2000F021B808F047F810B908F04AF8E0 +:10CF200008B10C2003E0287805F060FF0020207194 +:10CF3000012060713D21E1702070B2E410B50178EC +:10CF4000402907D22A4A52F8211019B1801C88477B +:10CF5000012010BD002010BD234A92F83130002B73 +:10CF600006D182F8320082F83310012082F83100B5 +:10CF7000B1E430B5134606E0CC18D51A14F8014CCC +:10CF80005B1E4455DBB2002BF6D130BD90F8491042 +:10CF900041B990F8981029B190F89800042801D070 +:10CFA000012098E4002096E40178406821B190F8CF +:10CFB000490010B100208EE4E8E701208BE40A4824 +:10CFC0000021C0F8F81080F8C41084E40178012929 +:10CFD00009D1406890F8A510002904D0002180F8FC +:10CFE000A51008F011BD76E43808002038090020AB +:10CFF0004CB301003D3070470844C01D424301F16D +:10D000003D00104480B2704770B51C460546A0181C +:10D01000049BC01D00FB03F204F13D00104486B2E6 +:10D02000B14238BFFFDF1C2128460DF07AFFA6F180 +:10D030001C0080B22C752880B0F5004F88BFFFDF40 +:10D0400070BD008870472DE9F04F0E468188044678 +:10D0500000F11C0AC088154620F4004221F4004368 +:10D06000002721F4004820F400499A4208D100F436 +:10D07000004001F4004188421CBF0020BDE8F08F51 +:10D08000C14517D9207DA9EB0801091AC91F8D4296 +:10D0900027DCC11D0AEB08000144C91E71603581FF +:10D0A000F7603782011D3160058047800120A07440 +:10D0B000BDE8F08F2088217DA0EB0800401AB0F178 +:10D0C000070B0ED4BBF11B0FB8BFFFDF5D45D4BF0C +:10D0D00028461FFA8BF0291A0A04120C18BF4A4579 +:10D0E00003DDA7740020BDE8F08F217DCB1D0AEB86 +:10D0F00008010B44DB1E7360308104F11C03F360F4 +:10D1000032820B1D336008804A800120A074BDE884 +:10D11000F08F2DE9F041044600F11C02808820F4D4 +:10D120000043A07C002808BFBDE8F081D018028829 +:10D13000438813448B423CBF0020BDE8F0810027A8 +:10D1400091429CBF0180478013D9891A0D042D0C90 +:10D1500045800ED0A088261D20F40040854288BF5F +:10D16000FFDF30884FF4004121EA0000284330807F +:10D1700008E0217D0088CB1D184481B22288201D43 +:10D1800000F09AFAA7740120BDE8F08130B4B0F83D +:10D1900002C08488034600F11C052CF4004028449A +:10D1A000A44503D10020D88130BC7047B3F80AC031 +:10D1B0000488A44509D34088ACEB040CA0EB0C0018 +:10D1C00084B20CEB0500C01E06E0A4EB0C041D7D30 +:10D1D000A4B2AC446044001DB1F800C0A44588BFAF +:10D1E0000C80B3F80AC0BCF1000F0CBF4FF0010C6B +:10D1F0004FF0000C82F800C00988D98130BC70471C +:10D200002DE9F041044600F11C01408820F4004063 +:10D210004518E089002808BFBDE8F081618908440D +:10D2200080B2608129886A881144814238BFFFDF5B +:10D2300028886D88628941190027914218D175B1FB +:10D240006088A61C20F40040A84238BFFFDF308869 +:10D250004FF4004121EA00002843308007E0217D9F +:10D260002288CB1D184481B2A01C00F025FA6781EA +:10D27000E7810120BDE8F0812DE9F0470189B0F890 +:10D2800002800027044600F11C0A414518BF4FF4F4 +:10D29000004938D021F400400AEB00014E886EB1FD +:10D2A000208904F1080520F40040B04238BFFFDFB8 +:10D2B000288829EA0000304328801FE0207D238948 +:10D2C000C21D088823F4004510442188284480B2F8 +:10D2D00004F1080C88420AD2091A89B21B32914221 +:10D2E0002CBF03F4004129EA030004D204E0401AF1 +:10D2F00080B229EA03010843ACF80000781C2189B8 +:10D3000087B24145C6D13846BDE8F0872DE9F047E0 +:10D31000B0F806800B46044600F11C01B0F80890F6 +:10D32000408828F4004C01EB0C05804504BF002028 +:10D33000BDE8F087002A1CBF281D106023B1227DA4 +:10D34000291D18460DF076FD2F886D8885B1E819E6 +:10D3500087B2E088A61D20F40040A84238BFFFDF56 +:10D3600030884FF4004121EA00002843308007E074 +:10D37000207D2288C31DD81981B2A01D00F09CF920 +:10D38000C84504BFE08820813846BDE8F087418861 +:10D39000808881420CBF0120002070474188C088EE +:10D3A00088420CBF01200020704730B44488828836 +:10D3B00000F11C0324F4004C22F400416344944225 +:10D3C0001BD04289C48915191C885A88A3189D420C +:10D3D00016D312B18A4210D212E0037D0CF1070C71 +:10D3E0001A196244008892B2801A80B2223398429D +:10D3F00001D211B104E08A4202D130BC0020704752 +:10D4000030BC012070472DE9F0078588C48800F101 +:10D410001C06024625F4004C24F4004925F4004A79 +:10D42000002024F4004306EB0C074FF00108D1451F +:10D430000AD104F4004405F40045AC4204D0108243 +:10D44000BDE8F00700207047634506D9147DA3EBC3 +:10D450000C031B1BDD1F002305E01488157DA4EBC6 +:10D460000C04641BE51F002DE9DB94895CB13C884A +:10D470007F8847B1DB1BD0748B42E0DB908930445E +:10D48000001BC01E12E02D1BD0748D4206DB107DE8 +:10D490009389C01D60443344184406E08B42CEDBC0 +:10D4A00082F8138090893044001BC01E1182BDE8B1 +:10D4B000F00770472DE9F05F044600F11C088088F2 +:10D4C000924620F4004B208A894608EB0B0608B1EF +:10D4D000484502D20020BDE8F09FA089002804BF83 +:10D4E00000273D4605D0378875887919884218BFCE +:10D4F000FFDFE07C50EA050101D078B338E0A08975 +:10D5000050B1217D4044C91D59440844B4F8151058 +:10D5100020F8031DE17D8170A18907EB09004944D2 +:10D52000A181308000257580207DBAF1000F09D0DF +:10D53000C31D30882288184481B2201D00F0BCF839 +:10D54000A5813AE0A189C01D58444144084430F8FF +:10D55000031DA4F815108078E0752EE0FFE7A08980 +:10D56000B4F815104044C01B20F8031DE17D817004 +:10D5700005EB090085B2A089BAF1000F4844A081EB +:10D580003780758010D0A088261D20F40040A84266 +:10D5900038BFFFDF30884FF4004121EA0000284304 +:10D5A00030800020A08108E0A0894044C01B30F8F2 +:10D5B000031DA4F815108078E07500202082A07467 +:10D5C0000120BDE8F09F10B4B0F802C0848800F1DB +:10D5D0001C022CF400431344A44504D0B0F80AC044 +:10D5E000BCF1000F02D010BC0020704703F1040C06 +:10D5F000C1F800C0007D00F1070C0CEB0300C01E59 +:10D60000486018880881CA605B880B8220B9D01EE8 +:10D6100048600B810020088210BC0120704770B563 +:10D62000044600F11C018288408820F4004319441C +:10D63000904205D06289002A04BFE289002A01D005 +:10D64000002070BD0A884D8885B1A61C20F40040DA +:10D65000A84238BFFFDF30884FF4004121EA0000C4 +:10D66000284330800020E081012070BD207DC31D53 +:10D67000981881B22288A01C00F01EF8F2E7002161 +:10D680008181C1740182817470478289002A04BF3C +:10D6900000207047828800F11C0322F400421A44E3 +:10D6A000B2F800C0BCF1000F1DBF037D121D1A446B +:10D6B000DA1E4A608089704710B4B0F800C02CF4BC +:10D6C0000044214489B24FF4004491420AD2521AD4 +:10D6D00092B21B339A422CBF0CF4004224EA0C0194 +:10D6E00004D204E0891A89B224EA0C0211430180B1 +:10D6F00010BC70472DE9F04188464FF6FC7102F1ED +:10D7000003021E46040002EA010509D00027E01CBE +:10D7100020F00300A04200D0FFDF201D01210CE01B +:10D720000127F4E7024628442FB9B14201D203464B +:10D7300000E000231360491CC9B2B142F2D9011BB9 +:10D74000C8F80010002F04D10EB1201D00E0002009 +:10D750002060BDE8F081024600201168002902D057 +:10D76000084609681160704702680A6001607047E6 +:10D770004FF6FC73C91C1940101A001F90FBF1F002 +:10D78000C0B270474FF6FC73C91C1940001D01FB65 +:10D7900002007047F8B5D24D04460E46A878A04264 +:10D7A00000D8FFDF05EB8607B86A50F8240000B107 +:10D7B000FFDFB868FFF7CFFF05000DD0B86A062E6F +:10D7C00040F824500AD0082E00D3FFDFC548294670 +:10D7D00050F82620204690472846F8BDC048C24B46 +:10D7E0007A30A0F12E0200902946204609F08FF8E9 +:10D7F000F2E72DE9F84F8046DDF828901E4603EB4E +:10D80000090093468A46C4B25FEA080707D000259C +:10D81000FF2800D9FFDFBAF1000F03D101E0012595 +:10D82000F6E7FFDF08F1030020F00301414500D0D7 +:10D83000FFDFCB4500D9FFDF65B9A94A00204C3294 +:10D840004FF6FF7110705180A74A1070A44A7A32C7 +:10D8500010705180A24880F800B046708470C47087 +:10D860000471447180F80690DFF878B2C671002622 +:10D870000BF1400B8146FF1C27F003000746002DEB +:10D8800002D109EB860188603BF8162019F80630B2 +:10D8900001D04FF000006946FFF72CFF0098761C7E +:10D8A000F6B20744082EE6D3FF1C27F003002346F8 +:10D8B000064675B1002002226946FFF71BFF00985B +:10D8C0003118002003464E46C91C21F003021DB149 +:10D8D00010E0C9F84800EEE706EB80070021BA62C5 +:10D8E00006E000BFD7F828C04CF82130491CC9B267 +:10D8F000A142F7D3401CC0B202EB84010828E3D355 +:10D90000A1EB0800AAF800000020BDE8F88F10B5D0 +:10D91000044604F075F808B1102010BD2078704A54 +:10D92000618802EB800092780EE0836A53F8213020 +:10D9300043B14A1C6280A180806A50F82100A06037 +:10D94000002010BD491C89B28A42EED861800520B2 +:10D9500010BD70B505460C46084604F051F808B1F4 +:10D96000102070BD082D01D3072070BD2570002048 +:10D97000608070BD0EB56946FFF7EBFF00B1FFDFB9 +:10D980006846FFF7C4FF08B100200EBD01200EBDA0 +:10D9900010B50446082800D3FFDF5148005D10BDD4 +:10D9A0003EB5054600246946FFF7D3FF18B1FFDFF7 +:10D9B00001E0641CE4B26846FFF7A9FF0028F8D034 +:10D9C0002846FFF7E5FF001BC0B23EBD44498978F9 +:10D9D000814201D9C0B27047FF2070472DE9F04164 +:10D9E0000C460546062901D0072C10D13C4FB86CD7 +:10D9F000FFF7B1FE02004FF6FF7604D00221B86CAB +:10DA0000FFF7B6FE00E030462880B04202D1002089 +:10DA1000BDE8F0812146FFF7BDFE040002D1288851 +:10DA200000F050F82046F3E7A0F57F42FF3A01D01E +:10DA3000082901D300207047ACE6A0F57F42FF3AE9 +:10DA40000BD0082909D2264A9378834205D902EBE4 +:10DA50008101896A51F820007047002070472DE944 +:10DA6000F04104460D46A4F57F4143F20200FF3920 +:10DA7000CED0082D01D30720CAE719494FF000087E +:10DA80008A78A242C4D901EB85072146BA6A52F8C6 +:10DA90002460002EBCD0134A08462032314652F88A +:10DAA00025209047B96A062D41F8248001D0072D22 +:10DAB00002D1204600F006F83146B868FFF754FE60 +:10DAC0000020A5E710B5064CC2B20221A06CFFF7FA +:10DAD00059FE0146A06CBDE81040FFF745BE0000AE +:10DAE000480900204CB40100560000200146A0481F +:10DAF000002200680260037A00EB830040F80C2FDC +:10DB00008180114600F025B92DE9F05F9846DDF8D7 +:10DB100030B0DDF828A01546894604004FF0000615 +:10DB200025D00027E01C20F00300A04200D0FFDF3A +:10DB30007DB30120FFF75EFA00FB05620AEBCB0024 +:10DB4000104486B20120FFF755FA00FB05620B99DD +:10DB500008EBC100104405EB450100EB4100143017 +:10DB600000EB850000EB850086B217B111E00127BC +:10DB7000D8E7A6EB85000C3887B27D48A900046081 +:10DB8000257204F10C0060600DF0EDF93846FFF7E6 +:10DB9000ADFFA9F800600020BDE8F09F2DE9FF4F20 +:10DBA000734C814681B020689A468B4600B9FFDFEE +:10DBB0002068027A4A4503D9426852F8291021B1F7 +:10DBC00043F2020005B0BDE8F08F006800B9FFDF46 +:10DBD00001210E9A0398FFF70FFAC61C4FF6FC7549 +:10DBE0002E40584601215246FFF706FAC01C00EAB3 +:10DBF000050808EB0600001D85B25D480027006897 +:10DC0000046801E027460446206838B1A188A9428B +:10DC1000F8D13946204600F0A4F813E005F10800D9 +:10DC2000A18880B2814229D33946204600F099F874 +:10DC3000A0880022411B601902608180394600F0F3 +:10DC400088F8A580A08860802680251D0E9F01236E +:10DC5000039A314628460097FFF7D6F920884146B7 +:10DC600028445A460123CDF800A0FFF7CDF94048DB +:10DC700000684168002041F82940A3E70420A1E79B +:10DC800070B53B4C0546206800B9FFDF2068017A7B +:10DC9000A94210D9426852F8250060B1418800239A +:10DCA00042F8253003608180194600F052F821685F +:10DCB00000200A7A08E043F2020070BD4B6853F876 +:10DCC00020306BB9401CC0B28242F7D8002002E07D +:10DCD0008A88104480B209680029F9D1FFF706FF4D +:10DCE000002070BD70B5224D286800280AD000249D +:10DCF00004E02046FFF7C4FF641CE4B22868007A01 +:10DD0000A042F6D870BD70B5194E054600243068A3 +:10DD100000B9FFDF3068017AA94204D9406850F8A1 +:10DD2000250000B1041D204670BD70B5104E05469B +:10DD30000024306800B9FFDF3068017AA94206D9B3 +:10DD4000406850F8251011B131F8040B44182046F2 +:10DD500070BD19B10A68026008607047044909681B +:10DD6000F8E7006809B10860704701490968FAE7F7 +:10DD70005C00002070B5044600780E4601281AD0D9 +:10DD8000072802D00C281AD115E0A068216905786F +:10DD90000B2D0CD0052003F0CCFD052D0FD07823E2 +:10DDA00000220520D4F8101003F026FD07E07823A8 +:10DDB00000220620F8E70520216903F0BAFD31466C +:10DDC0002046BDE8704001F0BDB910B500F1390240 +:10DDD000C3799478411D64F003042340C371DB07C9 +:10DDE0000DD04B79547923404B710B791279134044 +:10DDF0000B718278C9788A4200D9817010BD0022E7 +:10DE00004A710A71F5E74178012900D00C210170AF +:10DE100070472DE9F74F86B000208C698DF800001F +:10DE20000878012617460D464FF0070B4FF01109F1 +:10DE30004FF00A0A2A2878D2DFE810F02A001A03E5 +:10DE400058036D03A703B603D203FF03160440046F +:10DE500068048704A004DD04EE04110519053905E2 +:10DE60005E058905AC05D705F505FF0521063206D7 +:10DE7000440676069806EA0621072F075A077A070E +:10DE80008E079F07D80710083C08F807FC07020810 +:10DE900014B120781D2829D0D5F808805FEA080041 +:10DEA00043D001208DF80000686A049003208DF8AB +:10DEB00004008DF805A0286A0290A8880028EFD0F9 +:10DEC00098F8001091B10F2910D27DD2DFE801F04F +:10DED0007C144BDCFEFDFCFBFAF9F8089EF7F6001B +:10DEE000022822D124B120780C2801D0002676E324 +:10DEF00002208DF80000B7E10620696A03F019FDE1 +:10DF0000A8880728EDD1204601F017F9022809D08A +:10DF1000204601F012F9032808D9204601F00DF936 +:10DF2000072803D20120207005E016E2002CB7D0AC +:10DF300020780128D5D198F80400C11F0A2902D3FE +:10DF400085F81CA093E2A070D8F80010A163B8F87F +:10DF50000410A18798F8060084F83E00012028707C +:10DF60000320207046E00728BBD1002C98D02078F1 +:10DF70000D28B6D198F8031094F83B20C1F3C000E7 +:10DF8000C2F3C002104201D00E2000E00F2089072A +:10DF900007D198F805100142D2D198F80610014235 +:10DFA000CED194F83D2098F8051020EA02021142E3 +:10DFB000C6D194F83E2098F8061090430142BFD194 +:10DFC00098F80400C11F00E04FE20A29B8D2617F2F +:10DFD000814201D90620C9E3D8F800106160B8F881 +:10DFE0000410218198F80600A072012028700E20EC +:10DFF000207003208DF80000686A049004F1390055 +:10E000000190601D029017300390E1E0B5F806B072 +:10E0100041288FD1204601F090F8042802D1E07801 +:10E02000C00704D1204601F088F80F289CD1CBF11D +:10E030004002164608F10101606A0CF0FBFE606ABE +:10E040005A463044E9680CF0F5FE0E208DF80000C9 +:10E05000686A0490606A019000216846FFF78AFEB2 +:10E060002078042808D0A07F48B1012807D00328D1 +:10E0700008D010202070A2E00520207015E284F85E +:10E08000009033E71220F5E71128C2D1204601F0B5 +:10E0900054F8042802D1E078C00719D0204601F0D6 +:10E0A0004CF8062805D1E078C00711D1A07F0228DE +:10E0B0000ED0204601F041F8112808E0B9E089E0CF +:10E0C000A1E178E158E110E1EFE0D5E01DE0A0D159 +:10E0D000102208F1010104F148000CF0ABFE607859 +:10E0E000012809D012202070E078C0076BD0A07FF3 +:10E0F000A0B3012863D066E0607FA17888423FF634 +:10E1000069AF00BF84F800B059E011288ED12046D5 +:10E1100001F013F8082804D0204601F00EF8132867 +:10E1200084D12869D8B16869C8B104F17800102297 +:10E1300008F1010106460CF07DFE2078082812D077 +:10E1400014202070E078C0070FD0A07F022818D0DC +:10E150006178022912D0032831D034E02FE000206A +:10E160008DF80000F9E00920EBE70B202870296901 +:10E1700002204870206CC1E9010695E208B101282F +:10E1800079D10B202870296908204870606A48609E +:10E19000206AC1E902067BE2206CE2780068C2F3E3 +:10E1A0004402521ED04000F0010040F0800000E028 +:10E1B00000200874E06A48617FE20646FEE304201E +:10E1C00028700520EBE185F800A08DF800A0B9E3E8 +:10E1D0003946F4E31128C5D1204600F0AEFF0A28E5 +:10E1E00002D1E078C00704D1204600F0A6FF152830 +:10E1F000B8D1102208F1010104F148000CF01AFE18 +:10E2000020780A2810D01620207012202870296942 +:10E2100004F1580081F801A048602030886010386F +:10E22000C860206C0861AFE30B202070E1E2287029 +:10E23000D4E1022896D1204600F07FFF042804D3C1 +:10E24000204600F07AFF082809D3204600F075FF29 +:10E250000E2887D3204600F070FF12287DD2A07FC1 +:10E260000228B8D18DF80090686A049098F80100EF +:10E270008DF80400FEE367E20228ACD1204600F0EE +:10E280005CFF002869D0204600F057FF0128F9D034 +:10E29000204600F052FF0C28F4D005208DF8040031 +:10E2A00098F801008DF805005CE71128FCD1002CDE +:10E2B000FAD020781728F7D16178E06A022912D0C5 +:10E2C0005FF0000101EB4101182606EBC1011022AD +:10E2D000405808F101010CF0ADFD0520696A00F01D +:10E2E0001FFF267002E60121ECE70B28DCD1002C91 +:10E2F000DAD020781828D7D16178E06A02292DD0A9 +:10E300005FF0000101EB4101102202EBC101415815 +:10E31000B8F8010008806078E16A022821D0002066 +:10E3200000EB4002142000EBC2000958404650F8B0 +:10E33000032F0A60406848600520696A00F0F0FE1B +:10E340006078022810D04FF000002044407A20F07E +:10E3500001010CD14FF001000BE0D3E14FF00101BE +:10E36000D0E74FF00100DBE74FF00100EDE74FF0A1 +:10E3700000002044417281E3112895D1002C93D0F4 +:10E380002078192890D16178E06A022911D0002103 +:10E3900001EB41011C2202EBC1011022405808F19F +:10E3A00001010CF047FD0520696A00F0B9FE1A2052 +:10E3B000E9E00121ECE7082898D1002C98D02078DA +:10E3C0001A2893D1E16A98F801000870E16AD8F838 +:10E3D000022041F8012FB8F8060088800520696AFC +:10E3E00000F09EFE6078022807D04FF00000204425 +:10E3F000407A20F002002CD034E04FF00100F6E724 +:10E40000214448723AE31128B7D1002CB7D02078C4 +:10E410001B28B2D16178E06A02291DD05FF00001AB +:10E4200001EB4101202202EBC1011022405808F10A +:10E4300001010CF0FFFC0520696A00F071FE6078B4 +:10E4400002280CD04FF000002044407A20F0040055 +:10E4500008D14FF00101D3E74FF00101E0E74FF0A1 +:10E460000100F1E74FF00001CAE785F81CB0F4E3C2 +:10E470003878012886D11C2204F11C0079680CF040 +:10E480001EFDE079C10894F83B0001EAD001E07874 +:10E4900061F30000E070217F09B1297732E1217832 +:10E4A00003290AD0C0073FF4E6AD032028708DF899 +:10E4B00000A0686A04904120A7E302262671E17952 +:10E4C000204621F0E001E171617A21F0F0016172F2 +:10E4D000A17A21F0F001A172FFF777FC2E708DF880 +:10E4E00000A0686A04908DF804B071E638781228AC +:10E4F000D4D18DF800B0696A049191680291ADF8A9 +:10E5000004B008466168016021898180A17A817127 +:10E5100004202070AEE23878B7F806801228BDD10A +:10E520008DF800B0686A0490381D01AB07C883E815 +:10E5300007004120ADF8040008460C2100F8011B3B +:10E54000C8F140063246216A0CF074FC206A42464B +:10E550008119F8680CF06EFC00216846FFF70AFC90 +:10E56000E07820F03E00801CE0702078052801D083 +:10E570000F2008E0A07F00283FF4C4AD0128FBD0A5 +:10E58000032870D108202070B0E43878032885D1A2 +:10E5900078680168A1664068E066052028708DF8FB +:10E5A0000000686A049013E638780328A0D17868E0 +:10E5B0000168216740686067206C68B9A07F28B156 +:10E5C000012803D0062028700420E8E785F800B071 +:10E5D000FE482064606401E085F800B00326F0E3A3 +:10E5E0003878022884D13879E0BBA07F02280BD08C +:10E5F0000328F1D1607801280BD0A07994F83A1063 +:10E6000001280AD0F1480BE0B86800287AD02064CD +:10E6100011E0A17994F83A00F2E7B8680028F5D043 +:10E620002064E078C00701D0012901D0E74802E06A +:10E63000F8680028EAD06064CEE78DF800A0696A27 +:10E640000491E1785046C90709D06178022903D1C5 +:10E65000A17F29B1012903D0A17F032900D008207F +:10E66000287046E101E1BFE0387812288FD1B86800 +:10E67000286209202870E0782969C0070DD0082099 +:10E680004870206A4860606A886004F16800C86069 +:10E69000A07F02287FF48CAD7EE502204870206CBC +:10E6A000486004F16800886004F13800C860201DEB +:10E6B0000861206B4861606B88612EE2E1783878F0 +:10E6C000C90701D0072100E00B2188428AD12078B8 +:10E6D000072818D084F800908DF800B0686A04907C +:10E6E000286A0290ADF80490032100F8011B5168DC +:10E6F00010220CF09FFB00216846FFF73BFB002037 +:10E700002862BEE44CE208202070E5E73878122841 +:10E71000ACD18DF800B0686A049090680290ADF8B2 +:10E720000490042100F8011B102204F168010CF090 +:10E7300081FB00216846FFF71DFB2078092801D0E6 +:10E74000132020E784F800A016E0E1783878C907A4 +:10E7500001D0072100E00B21884287D1102204F16B +:10E76000480079680CF03AFB10B104202877B1E337 +:10E77000207809283FF4BFAC0C2058E5E078C107A9 +:10E7800037D0A17F012902D002291BD02EE00D2015 +:10E79000287029690B2048706078012809D0206A08 +:10E7A0004860606A886004F16800C86010300861E1 +:10E7B00000E5606A4860206A886004F17800C860FB +:10E7C0001038F4E7C0F3440114290FD24FF0006170 +:10E7D00001EBB0104FEAB060E0706078012803D020 +:10E7E00010202070042061E10620CCE6607801282A +:10E7F00087D00E201BE538780A2889D185F800A03B +:10E8000010208DF80000686A049050680190002183 +:10E810006846FFF7AFFAE9E7E078C0070AD0A07FC3 +:10E82000012803D10F202870042041E11020287016 +:10E830000F203DE115202870296903204870206CC5 +:10E8400048606078012805D004F1780088601038AD +:10E85000C86062E104F1680088601030F8E7387839 +:10E860000228CAD138790028E0D0287730E33878F8 +:10E870001428FBD185F80090296909204870786830 +:10E880004860607801280DD004F16800886010307D +:10E89000C860206B0861606B486104F158008861B2 +:10E8A000A06A22E004F1780088601038F0E7387838 +:10E8B0000828DBD16078012801D0132043E2A17839 +:10E8C000A06A0844C1F110010CF02BFB1220287043 +:10E8D000296904F1580081F801A04860203088605F +:10E8E0001038C860206C086147E0C861E06A0862BF +:10E8F00013E18DF80490DFE038780928B6D11022B2 +:10E9000004F1480079680CF069FA08B10B202DE792 +:10E9100020780B2812D02046FFF757FAA178A06A7A +:10E920000844C1F110010CF0FCFA162028700820F0 +:10E930008DF80000686A049000206FE013202870B2 +:10E940008DF800A0686A04908DF8049040E438784F +:10E9500012288BD1B868286214202870296904F124 +:10E96000580081F801A04860103088601030C860FD +:10E97000606C08616078012806D004F139004861B4 +:10E98000206B8861606BB0E7601D4861606B8861D7 +:10E99000206BAAE7387809288BD18DF800B0686A17 +:10E9A0000490286A0290ADF804900D2100F8011B34 +:10E9B000102279680CF03EFA002101E077E27CE059 +:10E9C0006846FFF7D7F90020286201E06AB5010028 +:10E9D0006178012901D01520D5E51621297008217B +:10E9E0008DF80010696A049118E038780C2885D1F8 +:10E9F000162028706078022802D12046FFF7E5F93A +:10EA0000A07879680A18C0F1100110460CF089FA54 +:10EA100008208DF80000686A049078680190A0785A +:10EA20008DF8080061E53878102892D1E079C007A8 +:10EA300079D01720287009203AE03878112888D139 +:10EA40001422391D04F11C000CF039FAE16A208D02 +:10EA5000A1F80900E16AA078C871E179E26A01F0E1 +:10EA600003011172E16A627A0A73E16AA07A81F89D +:10EA7000240000E045E26078012876D0B4E16078B7 +:10EA8000022801D0012000E000202044407AC00785 +:10EA900004D0E078C00701D1192054E11E206CE6B3 +:10EAA000387812287CD1B86828621A20287005208E +:10EAB0008DF80000686A049011466846FFF75AF91D +:10EAC000FFF77BBB387803286AD16078E16A0228B7 +:10EAD00001D0012000E0002000EB4002142000EBF8 +:10EAE000C20289587A6813680B6052684A601B2119 +:10EAF0002970D5E9041206234B70636A4B6066786F +:10EB0000E36A022E01D0012600E0002606EB46064D +:10EB100000EBC6001858C1E90202686A486206980C +:10EB200000F027FBCCE788E138780F2838D16078EF +:10EB3000E26A022801D0012000E0002000EB400042 +:10EB4000102101EBC00002231058093279680AF045 +:10EB50006DFC1C202870296905204870206A4860D7 +:10EB6000E06A09308860FA4872E65BE138780E287E +:10EB700016D16178E06A022901D0012100E000216C +:10EB800001EB4101182606EBC101A27840587968D3 +:10EB90000CF050F96178E06A022902D0012101E00D +:10EBA000B8E0002101EB410106EBC1014158A0781A +:10EBB0000A18C0F1100110460CF0B3F98DF800B03E +:10EBC000686A0490286A0290ADF8049006210170EA +:10EBD0006278E16A022A01D0012200E0002202EB01 +:10EBE000420206EBC202401C895810220CF022F9A6 +:10EBF00000216846FFF7BEF8002028621D2028701B +:10EC00008DF800A0686A04900B208DF804006CE475 +:10EC1000387812287ED18DF800B0686A0490906828 +:10EC200002900B20ADF80400029880F800B06278E2 +:10EC3000E16A022A01D0012200E0002202EB420236 +:10EC4000102303EBC20289580988A0F801106178EB +:10EC5000E26A022902D0012101E03BE1002101EB3F +:10EC60004103142101EBC30151580A6840F8032FF6 +:10EC70004968416000216846FFF77CF80EE760783C +:10EC8000022801D0012000E000202044407A8007C3 +:10EC900001D51F2057E021206FE53878122839D19F +:10ECA0008DF800B0686A0490B8680290ADF80490DE +:10ECB000082606706278E16A022A01D0012200E08B +:10ECC000002202EB42021C2303EBC202401C8958C3 +:10ECD00010220CF0AFF800216846FFF74BF8202017 +:10ECE00028708DF800A0686A04908DF804605AE4DA +:10ECF000387812280ED18DF800B0686A04909068B8 +:10ED000002900820ADF80400029809210170E16921 +:10ED1000097800E093E04170E16951F8012FC0F8F3 +:10ED200002208988C18000216846FFF723F8B2E7F6 +:10ED30006078022801D0012100E000212144497AB5 +:10ED4000490706D5222028708DF800A0686A049033 +:10ED5000CFE5012848D067E0387812286FD1B8682D +:10ED6000286223202870296905204870206A48609D +:10ED7000E06A0930886077486AE538780E285ED105 +:10ED80006178E06A022901D0012100E0002101EB55 +:10ED90004101202606EBC1014058516810220CF0B9 +:10EDA00049F88DF800B0686A0490286A0290ADF8BE +:10EDB000049080F800A06278E16A022A02D0012261 +:10EDC00001E0A4E0002202EB420206EBC202401C7A +:10EDD000895810220CF02EF800216846FEF7CAFF71 +:10EDE000002028626078B4E72420C6E46078022816 +:10EDF0000BD000202044407AC10702D0E178C90737 +:10EE000005D0810705D519209BE40120F2E71720E2 +:10EE100097E4400701D51B2093E41C202070607804 +:10EE2000012801D01820A8E42720A6E42820287073 +:10EE30000B203DE6387813284AD129209DE40CE0C8 +:10EE40002078012844D00C2842D02046FEF7DBFF72 +:10EE50000C208DF80000686A049039E038784FF093 +:10EE60002608122805D013201070032685F800808C +:10EE70004DE08DF800B0686A0490B86802900220F6 +:10EE8000ADF80400029805210170297F417000212E +:10EE90006846FEF76FFF0B208DF80000686A04904B +:10EEA00039466846FEF766FF064685F80080012E63 +:10EEB0000ED02CE001208DF80000686A0490042038 +:10EEC0008DF80400287F8DF805000020287712E0D7 +:10EED000287F80B11D202070252028708DF800A08B +:10EEE000686A049002208DF8040039466846FEF7EF +:10EEF00041FF06460BE00CB1FE2020709DF800009B +:10EF000028B100216846FEF735FFFEF7EFBF09B0D4 +:10EF10003046BDE8F08F2DE9F04F0C4601274E69D1 +:10EF2000097885B09046BA464FF00209072021B112 +:10EF300001294FD0022920D1C9E0217901290BD024 +:10EF4000022916D0032911D0042916D11CE0000093 +:10EF500062B501009CB40100707801280CD1062034 +:10EF6000616A02F0BFFC002807D11AE01D20307052 +:10EF700017E07178022901D0052796E031780C2935 +:10EF800027D18DF804000EE03078011F042902D348 +:10EF90000E3803281DD2B07F02281AD120890228FA +:10EFA00017D38DF8049084F800A020899DF80410F0 +:10EFB000884203D20A208DF800003FE01221083475 +:10EFC00088F8001094E80E00C8E901120327C8F879 +:10EFD0000C306AE098F80010122966D18DF8000014 +:10EFE000616A0491D8F80850029521794FF00B0B13 +:10EFF000012906D0022929D0032911D0042954D18E +:10F000005AE0ADF8049085F800B0207E4F4600F03D +:10F010001F00687000216846FEF7ACFE377043E0C1 +:10F02000ADF8049005202870207E68704E460021BF +:10F030006846FEF79FFE26708DF800B0606A049067 +:10F0400041466846FEF796FE07462EE0ADF80400FE +:10F0500085F800A0207F6870607F00F00100A87034 +:10F06000A07F00F01F00E870E17F2971C0071FD06A +:10F0700094F8200000F00F00687194F8210000F06F +:10F080000F00A87100216846FEF774FE2868B0637F +:10F09000A888B087A87986F83E00A0694078707784 +:10F0A0002879B0700D2030700027384605B030E761 +:10F0B0000020A8716871E5E7ADF804900E20287073 +:10F0C000207E687000216846FEF754FEECE7FE20C3 +:10F0D00030708DF800A0606A049004208DF8040060 +:10F0E000207E8DF80500EDE700B50023012285B0F4 +:10F0F00005280FD006280BD102208DF8002004919E +:10F100008DF804008DF8053000216846FEF732FEC8 +:10F1100005B000BD8DF8002004918DF80420F1E7C2 +:10F1200070B50C46054602F004FC21462846BDE8B1 +:10F1300070407823002202F05FBB08B1007870476E +:10F140000C20704770B50C0005784FF000010CD012 +:10F1500021702146F4F70EF973482178405D88420A +:10F1600001D1032070BD022070BDF4F703F9002027 +:10F1700070BD027B032A05D000220A704B780C2B4D +:10F1800002D003E0042070470A770A62027B9300F2 +:10F19000521C0273C15003207047F0B585B00F4672 +:10F1A00005460124287B05EB800050F8046C70783C +:10F1B000411E0D290AD25C493A46123101EB80000A +:10F1C000314650F8043C2846984704460CB1012CBF +:10F1D00011D1287B401E10F0FF00287301D00324BA +:10F1E000E0E70D208DF80000706A04900021019680 +:10F1F0006846FFF7A7FF032CD4D005B02046F0BD2A +:10F2000070B515460A46044629461046FFF7C5FF65 +:10F21000064674B12078FE280BD1207E30B1002044 +:10F220002870294604F10C00FFF7B7FF2046FEF7CF +:10F23000EAFD304670BD704770B50D460446882122 +:10F240000BF091FE012D03D0022D03D0052070BDDF +:10F25000012000E0022060702046FEF7D4FD00206F +:10F2600070BD28B1027E1AB10A4600F10C01C7E751 +:10F270000120704730B5044687B00D46062002F0E5 +:10F2800058FB2946052002F054FB2078FE2806D0C2 +:10F2900000208DF8000069462046FFF7E2FF07B026 +:10F2A00030BD7FB50E4600218DF80C1041780C2939 +:10F2B00003D00D2903D0002405E0846900E04469EF +:10F2C0000CB1217E91B16D4601462846FFF751FFF2 +:10F2D000032809D1324629462046FFF791FF9DF8C1 +:10F2E0000C10002900D0042004B070BD04F10C05FE +:10F2F000EAE710B590B00C4607900B480521801E38 +:10F3000008900A488DF8191009900F92694606A8CE +:10F31000FFF7C7FF002805D11022204601990BF006 +:10F3200089FD002010B010BDA2B4010062B501003B +:10F3300070B50D46040011D085B1210128460BF0AF +:10F34000F0FD10224E4928460BF074FD4C48012177 +:10F350000838018044804560002070BD012070BDE8 +:10F3600070B5474E00240546083E10E07068AA7B41 +:10F3700000EB0410817B914208D1C17BEA7B914272 +:10F3800004D10C2229460BF029FD30B1641C3088D1 +:10F390008442EBDB4FF0FF3070BD204670BD70B58E +:10F3A0000D46060006D02DB1FFF7DAFF002803DB7B +:10F3B000401C14E0102070BD314C083C208862884D +:10F3C000411C914201D9042070BD6168102201EBFB +:10F3D000001031460BF02EFD2088401C2080287044 +:10F3E000002070BD70B514460D0018D0BCB10021CE +:10F3F000A170022802D0102811D105E0288870B130 +:10F400000121A170108008E02846FFF7A9FF00281D +:10F4100005DB401CA070A8892080002070BD012061 +:10F4200070BD70B5054614460E000BD0002030703C +:10F43000A878012808D005D91149A1F108010A8846 +:10F4400090420AD9012070BD24B128782070288804 +:10F45000000A5070022008700FE064B14968102261 +:10F4600001EB0011204610390BF0E4FC28782073E2 +:10F470002888000A607310203070002070BD0000E2 +:10F48000680000202DE9F041FE4C207EE17D88429D +:10F4900008BFBDE8F0810126FB4D0027E07D215C1F +:10F4A00001EB810205EB8200037C052B10D0037C6D +:10F4B000062B1BD0037C072B27D0437C012B18BFC6 +:10F4C000FFDF30D0207EE17D8842E7D1BDE8F081CA +:10F4D0000674E07D16281ABFE07D401C0020E07510 +:10F4E000481CC0B255F8222002210CE00674E07DD1 +:10F4F00016281ABFE07D401C0020E075481C55F816 +:10F500002220C0B203219047DCE70674E07D162874 +:10F510001ABFE07D401C0020E075481CC0B255F8C1 +:10F5200022200821EFE74774E07D16280EBF002057 +:10F53000E07D401CE075481CC0B255F82220072130 +:10F54000E1E770B5D14E00240C2086F82900A6F51D +:10F550003B70254680F8CD4180F8CC4100F5F47031 +:10F560000476C47506F12C000AF0B2FDA6F58E7083 +:10F57000057586F82B50601EB06086F8255086F819 +:10F58000225086F8235086F8245086F82150C0482F +:10F5900005704570A6F1E80004EB840100EB8101E1 +:10F5A0000D74611CCCB20B2CF6D30120F9F726FBAD +:10F5B0000020F9F723FB012086F82600F9F7D2FF97 +:10F5C000B448F9F7DEFFB44C2070B448F9F7D9FF1E +:10F5D0006070BDE87040F9F7A5BA10B5F9F7D0FA38 +:10F5E000AD4C2078F9F7E6FF6078F9F7E3FFA74C18 +:10F5F00094F82800002808BF10BDF9F7CAFC0020C5 +:10F6000084F8280010BD0B20704770B5F9F79BFBFC +:10F610009E4C054694F8260000281CBFFFDF70BDF5 +:10F6200094F82B00002808BFFFDF6FF07F4260696D +:10F630000026291AB1F5800F24BF431BB3F5800FB4 +:10F640000DD38A4203D2101A2844411C07E09A4283 +:10F6500028BFFFDF05D2511B0844401C414200294E +:10F6600000DBFFDF012584F8265084F82B6094F836 +:10F6700029100420844A01EB810102EB8101087406 +:10F68000A068B0F1FF3F04D0A81EA0600120F9F7E8 +:10F69000B5FA0020F9F7B2FAF9F796FA0AF0A6FEE1 +:10F6A000F9F7DAFB7E48066006604FF0E0214FF480 +:10F6B0000040C1F88002F3F780FC7548007802280A +:10F6C00004D0032805D194F8230010B184F8225007 +:10F6D00001E084F82260BDE87040F9F7A1BB034661 +:10F6E00069490B2000EB800201EB820212F8042C26 +:10F6F00022B1401E10F0FF00F4D1704700EB8002F1 +:10F7000001EB8201012241F8143C01F8042C7047FE +:10F71000012804D0032808BF002926D000E021B327 +:10F720005A4B4FF0000C83F821C0594A00289070C2 +:10F7300014BF022882F803C00BD0072915D2DFE8D6 +:10F7400001F01404060C0E1012001B2000E03A20F9 +:10F75000D070012083F8210070475820F8E7772007 +:10F76000F6E79620F4E7B520F2E700207047484816 +:10F7700010B54078F9F779FB80B210BD421E10B584 +:10F78000414900EB800001EB80040A2A02D814F8FA +:10F79000040C00B9FFDF14F8040C012818BFFFDFC8 +:10F7A000002004F8040C10BD70B53E4C94F8CD0157 +:10F7B00094F8CC1188420CBF01250025F9F7C3FA53 +:10F7C000F9F753FB94F8CD1194F8CC2191420CBF7A +:10F7D00001210021A942E9D170BD2DE9F05F8046E9 +:10F7E0004B1E1746DCB2284804EB840200EB82056E +:10F7F0002E1D287CDFF88C9007282DD199F8170052 +:10F80000002299F818C0844524D000BF19F800C020 +:10F81000A44508BF012200D04AB116280CBF4FF002 +:10F82000000C00F1010C19F80CC009F800C01628F2 +:10F830000CBF0020401CC0B299F818C08445E5D127 +:10F8400042B199F818204846002A0EBF1622027EBF +:10F85000521E0276012028740A2B10D80A4801EBA8 +:10F86000810100EB810010F8040C40B1287C0128D4 +:10F8700006D0287C012802D0B87A012816D0FFDFF4 +:10F88000B87A11E0BC0B0020D80B0020C00C00207F +:10F890007A000020A51601007800002085F4000001 +:10F8A00000F50040D409002001284AD1FE49287CF7 +:10F8B000022816D099F8180016284AD099F818008E +:10F8C00099F81710401C884200D1FFDF01206874AE +:10F8D00099F8180009F8004099F8180016283DD04A +:10F8E0003EE0DFF8C8C39CF829000246A04207D0DA +:10F8F000024600EB820001EB8000807CA042F7D141 +:10F900009CF8293083420CD19CF8292002EB82021A +:10F9100001EB8202927C8CF8292001228CF82A20AB +:10F9200009E000EB800301EB830302EB820201EBB1 +:10F9300082029B7C937400EB800001EB80000C2220 +:10F940008274387A062825D2DFE800F012211E1BC7 +:10F95000181599F817000028B8D1B6E7002002E082 +:10F9600099F81800401C89F818000020BDE8F09FA5 +:10F970004FF0000A11E04FF0B40A0EE04FF0730AA6 +:10F980000BE04FF0320A08E04FF00A0A05E04FF0B2 +:10F99000060A02E0FFDF4FF0000A3868A0EB0A0019 +:10F9A0003060397A00290CBF04210221401A20F06E +:10F9B0007F423260D7E90001084420F07F40706048 +:10F9C000B87A022818BF387B7ED1387A00280CBF5D +:10F9D0000420022000EB0A037868591D00EB010B9C +:10F9E000B3484078504503D9B04991F8231011B17C +:10F9F0000BF1060003E0A0EB0A005844801DAB4960 +:10FA000091F829C0BCF10C0F24D08E4691F8291032 +:10FA100001EB810CA44901EB8C0CDCF804C06245BD +:10FA200018D0DFF890C29EF8292002EB820201EB89 +:10FA300082014A688968A2EB080222F07F42A1EBAA +:10FA4000080121F07F41904298BFB2F5800F49D262 +:10FA50008C4547D34044A0EB0B0020F07F41316040 +:10FA60001944F86821F07F410A1A6FF07F43B2F51C +:10FA7000800F24BFA0EB010CBCF5800F0DD3934287 +:10FA800003D2181A0844421C07E0634528BFFFDF71 +:10FA90001FD2591A0844401C4242002A19DD052091 +:10FAA000287499F8180016282DD099F8180099F89C +:10FAB0001710401C884200D1FFDF99F8180009F8A0 +:10FAC000004099F8180000E00BE016287FF448AFDA +:10FAD00044E73068ABF10501084420F07F407060D6 +:10FAE000002030727068401D20F07F407060787A8E +:10FAF000B072387A0627707203280DD260B101F017 +:10FB000023FB28B108E099F817000028D5D1D3E7E6 +:10FB1000CAF138074FF0320A65480178012918BF49 +:10FB200003290AD14078504507D9604991F823103C +:10FB3000002904BFA0EB0A0007445E4B3068A0EB2D +:10FB40000802706822F07F41A0EB080020F07F4C93 +:10FB50008F4298BFB1F5800F1CD263451AD3534929 +:10FB600091F829300C2B32D091F829704FF00C0B02 +:10FB70004FEA0B0A4C4907EB870301EB8303D3F8E9 +:10FB800008C0ACEB080C944531D8BB469F7C0C2FC9 +:10FB9000F0D199E00520287499F81800162811D0A2 +:10FBA00099F8180099F81710401C884200D1FFDF1F +:10FBB00099F8180009F8004099F8180016287FF401 +:10FBC000CFAECBE699F817000028F1D1EFE702207D +:10FBD000287491F829000C2818BF91F82900A874FE +:10FBE00081F82940012081F82A00BDE8F09F0C2F00 +:10FBF0001CBFBA46002267D00AEB8A0301EB8303DD +:10FC0000D3F804C0ACEB080C844528D29A7B96F854 +:10FC10000AC094451CD30520287499F818001628AA +:10FC200011D099F8180099F81710401C884200D19B +:10FC3000FFDF99F8180009F8004099F81800162815 +:10FC40007FF48EAE8AE699F817000028F1D1EFE72D +:10FC500093F812A00122BAF10C0FCDD103E0002AD3 +:10FC600008BFBA4630D03E460F4806EB860200EB8E +:10FC70008208062188F8101099F81800162836D046 +:10FC800099F8180099F81710401C884200D1FFDF3E +:10FC900099F8180009F8006099F8180016280CBFA8 +:10FCA000002099F8180007E0D80B0020C00C0020B5 +:10FCB0007A000020FFFF3F0018BF401C89F81800A1 +:10FCC00098F81260B245CFD10220FE4E287406F19A +:10FCD000E80090F82910B9420ED185F812A080F8FA +:10FCE0002940012180F82A100120BDE8F09F99F8F1 +:10FCF00017000028CCD1CAE70C2F0BD0BBF10C0F9A +:10FD000008BFFFDF0BEB8B0006EB8000847485F8E7 +:10FD100012A0E9E7BBF10C0F08BFFFDF0BEB8B0074 +:10FD200006EB800084740C20A874DDE730B50D4626 +:10FD3000E54A44190021101A71EB010038BFFFDFBA +:10FD4000E2488542C8BFFFDFE1488542B8BFFFDF18 +:10FD5000E0488442A8BFE04804DA002CAABF20464D +:10FD6000DC4830BD201830BD401E70B5C0B200EB7D +:10FD70008001D44800EB8104607B062810D2DFE8C4 +:10FD800000F0030D0B090705002033E0B4200BE061 +:10FD9000732009E0322007E00A2005E0062003E096 +:10FDA000FFDF617B002029B3022108446168084419 +:10FDB00020F07F40F9F759F894F90C50C24A4419E1 +:10FDC0000021101A71EB010038BFFFDFBF488542E8 +:10FDD000C8BFFFDFBE488542B8BFFFDFBD488442D1 +:10FDE000A8BFBD4804DA002CAABF2046B94870BDA0 +:10FDF000201870BD0421D8E72DE9F04F0646B7481A +:10FE000085B00068C005C00D11D0103840B2002880 +:10FE1000B8BF00F00F0000F1E020B4BF90F8140D5F +:10FE200090F80004400908BF4FF0010A01D04FF0DC +:10FE3000000A3078002817BF01283079002005B06B +:10FE400018BFBDE8F08F062810D2DFE800F0030DE0 +:10FE50000B090705002015E0B4200BE0732009E032 +:10FE6000322007E00A2005E0062003E0FFDF3179B9 +:10FE7000002039B15FF0020100EB0109BAF1000F77 +:10FE800006D101E00421F7E79549002081F8270019 +:10FE90006C4602AA2146B068F8F7F4FF9DF90820E5 +:10FEA000F068211D10440122C01C1F28B8BF019218 +:10FEB00008DB03AAF8F7E6FF9DF80C0010B10198E3 +:10FEC000401C0190DDE900100844401D20F07F40F7 +:10FED0000190A1EB090020F07F40009070798DF82F +:10FEE0000A0000980390F8F72EFF0099019B091A69 +:10FEF000181A7C4A21F07F4120F07F40B1F5800F35 +:10FF000010D282420ED3764890F82950009CAB461E +:10FF1000191B21F07F486FF07F41091BA0F1E80712 +:10FF2000049101E0002080E00C2D26D005EB850037 +:10FF300007EB80026FF07F435068011BB1F5800F23 +:10FF400010D3A4EB000CBCF5800F0BD38B4203D273 +:10FF500004990844411C05E063450DD2181A204459 +:10FF6000401C4142002908DA5D48AB46957C90F878 +:10FF700027000028D8D04CE0FFDF5D4525D00BEBF3 +:10FF80008B0007EB80036FF07F429968081BB0F588 +:10FF9000800F12D3A4EB010CBCF5800F0DD382426D +:10FFA00003D204980844401C07E0624528BFFFDFE5 +:10FFB0000BD2521A1019401C4042002805DD9DF852 +:10FFC0000A009A7B904228BF0C460C2D1CBF9DF85E +:10FFD0000A10434A14D000BF05EB850007EB8000F0 +:10FFE00043681B1B23F07F43434509D2837B99421F +:10FFF00028BF8468857C92F8270050B90C2DEBD17E +:020000040001F9 +:100000000098A04205D004EB080020F07F40009447 +:10001000019000990398814206D001EB090020F07D +:100020007F40F8F722FFB06001202D4991F827109A +:10003000002904BF05B0BDE8F08FBAF1000F3FF40E +:1000400023AF05B0BDE8F08F2DE9F04F814687B0B2 +:100050000C4625480AF044F8244901274FF00008CF +:1000600001EB090500287DD0A1F5887898F81400E7 +:10007000002818BFFFDF2078012800F0238200BF8E +:1000800088F810902078022808BFFFDF184E2079EA +:1000900006F10C023072607970723146A068F8F790 +:1000A000F1FE96F90C000F2804DD1F38307330681C +:1000B000401C306096F90C00E168351D0844C01CF6 +:1000C0001F2817E0D80B0020FF7F841E0020A10707 +:1000D00000E05EF80080841E00807BE104ED00E01B +:1000E000C00C0020FFFF3F00EC0C0020B40C0020EF +:1000F000A40B0020B8BF2F6009DB6A462946F8F739 +:10010000C1FE9DF8000010B12868401C28602078CE +:10011000B07288F81470F64D95F8CD0195F8CC11B1 +:10012000884204BF07B0BDE8F08FF24890F829403C +:100130000C2C00F0CF81F8F706FEEF4904EB8402A7 +:1001400001EB82010A7C042A19BF0A7C032A07B04A +:10015000BDE8F08FE94B4A688968121A22F07F42A5 +:10016000081A00E01BE020F07F40062A3CBF07B0E1 +:10017000BDE8F08FB2F5800F24BF07B0BDE8F08F67 +:1001800083423CBF07B0BDE8F08F95F8CD0195F8EC +:10019000CC11884240F0A78107B0BDE8F08FD44E63 +:1001A00096F8CD01162855D096F8CD0196F8CC11C9 +:1001B000401C884200D1FFDF207801284FD0CC4876 +:1001C00090F8CD1101EB810100EB810080F81090D7 +:1001D000207802284BD0C64890F8CD1101EB810160 +:1001E00000EB8105207928726079687205F10C02B4 +:1001F0002946A068F8F746FE95F90C000F2804DDA3 +:100200001F3828732868401C286095F90C00E168A5 +:100210002E1D0844C01C1F28B8BF376009DB6A4682 +:100220003146F8F72FFE9DF8000010B13068401CF1 +:1002300030602078A872AE4991F8CD0116280EBF23 +:10024000002091F8CD01401C81F8CD01AC4809F0A7 +:100250005DFF60E796F8CC010028ADD1ABE715F85B +:10026000010C002818BFFFDF05F8017CA7E7A548AF +:100270000068C005C00D0FD0103840B20028B8BFCC +:1002800000F00F0000F1E020ACBF90F8000490F8FF +:10029000140D400908BFFFDF954890F8CD1101AA61 +:1002A00001EB810100EB8106E068CDF800808DF85C +:1002B00004806946F8F7E6FD9DF904000F28CCBFDD +:1002C000012000200099351D084401900220B072E1 +:1002D0002079307260797072A068C01C1F28B8BF86 +:1002E0002F6009DB6A462946F8F7CCFD9DF800002F +:1002F00010B12868401C2860307A062810D2DFE848 +:1003000000F0030D0B09070500200BE0B42009E005 +:10031000732007E0322005E00A2003E0062001E018 +:10032000FFDF0020217900290CBF042102210844AD +:1003300002907168401D08440199009001440298A0 +:10034000081A05906B4C002084F82700F8F7FBFC96 +:10035000804630600198404420F07F40F06094F87F +:1003600029000C287ED0204690F8291001EB81024C +:10037000A0F1E80101EB82025468009A274622446A +:1003800022F07F42039296F809B090F82950121B90 +:1003900022F07F4A6FF07F42121BA94604920C2D77 +:1003A00027D0554805EB850100EB81036FF07F42B4 +:1003B0005868011BB1F5800F24BFA4EB000CBCF5FD +:1003C000800F0BD38A4203D204990844411C05E0F4 +:1003D00062450DD2111A0819401C4142002908DA61 +:1003E0004448A9469D7C90F827000028D7D04DE0CE +:1003F000FFDF4D4525D0404809EB890100EB810125 +:100400006FF07F438868021B8146B2F5800F24BFDE +:10041000A4EB000CBCF5800F0DD3934203D2049AD9 +:100420001044421C07E0634528BFFFDF09D21A1AB7 +:100430001019401C4242002A03DD887B834528BFF7 +:100440004C460C2D1CBF2B4BA3F1E80116D000BF6E +:1004500005EB850001EB80025068001B20F07F4017 +:10046000504500E026E009D2907B834528BF946880 +:10047000957C93F8270048B90C2DE9D1A74205D007 +:1004800004EB0A0020F07F4027460390039AA7EB75 +:10049000080121F07F41A2EB0802059822F07F427B +:1004A000B1F5800F06D2904204D30298384420F070 +:1004B0007F4030600F4890F8270000287FF442AF5B +:1004C000B9E600BF15F8010C002818BFFFDF05F8DA +:1004D000017CD5E595F8CD0195F8CC11884204BF93 +:1004E00007B0BDE8F08F07B0BDE8F04FF8F798BC53 +:1004F000D4090020C00C0020D80B0020FFFF3F00D3 +:10050000EC0C002004ED00E00020F8F767BB0120B0 +:10051000F8F764BBFD48007870472DE9F0410546C7 +:1005200002282DD0FA4C94F829000C2808BFFFDFD0 +:10053000002784F82670012684F82B6094F829108F +:100540000320DFF8D08301EB810108EB81010874FF +:10055000F8F76DFCD5B1012D39D0032D1CBFFFDF9D +:10056000BDE8F08194F8290094F82910401CC0B22D +:1005700001EB810158F82120BDE8F0410521104729 +:10058000E2480078BDE8F041F9F71AB8207F00286A +:1005900018BFFFDF84F8256000202760F8F72EFBE6 +:1005A000A168B1F1FF3F04D0012300221846F8F7FB +:1005B00069FB94F8290094F82910401CC0B201EBA3 +:1005C000810158F82120BDE8F041012110470120A8 +:1005D000F8F714FB94F8250000281CBFA068B0F1C0 +:1005E000FF3F0DD094F8290094F82910401CC0B2A8 +:1005F00001EB810158F82120BDE8F04106211047A8 +:10060000207F012815D002281FD0032833D00428CA +:100610001CBFFFDFBDE8F08194F820106068012363 +:10062000411A00221846F8F72DFB94F82800B8BBB1 +:1006300037E094F8240028B184F82470F8F7FEFB22 +:1006400084F823602777BDE8F08194F8280018B972 +:10065000F8F776FC84F8286094F8290094F82910BB +:10066000401CC0B201EB810158F8212000219047C5 +:100670002777BDE8F081217B60680123411A0022C1 +:100680001846F8F7FFFA94F8240028B184F824708B +:10069000F8F7D4FB84F8236002202077BDE8F081CE +:1006A00003E0F8F74DFC84F8286094F8290094F8EA +:1006B0002910401CC0B201EB810158F82120002113 +:1006C00090472677BDE8F08110B5914C94F8290049 +:1006D0000C2808BFFFDF94F8290094F82910401C6B +:1006E000C0B28C4A01EB810152F82120BDE81040D4 +:1006F000042110472DE9F05FF8F725FB844C814673 +:100700004FF00C0B94F829000026A4F1E8084FF0F4 +:10071000010A0C282CD094F82910204601EB810105 +:1007200008EB8101097C042922D090F8291001EB03 +:10073000810108EB8101097C032908BFBDE8F09F16 +:10074000754922696069A2EB090222F07F42A0EBA1 +:10075000090020F07F40062A38BFBDE8F09FB2F5BF +:10076000800F28BFBDE8F09F814238BFBDE8F09FF1 +:10077000A068B0F1FF3F18BFFFDF84F8256094F850 +:100780002900664F0C2806D194F8210018B1F8789A +:100790007870B87838705E4890F829000C281ED020 +:1007A0005B4890F8291001EB810108EB8101097C7D +:1007B000042914D190F829B090F8291001EB810197 +:1007C00008EB810181F810A090F8291001EB81015C +:1007D00008EB8101897C80F8291080F82AA0504C10 +:1007E00094F8CD0194F8CC1104F2DF2588424ED064 +:1007F00094F8CC0100EB800004EB8000007C405DAD +:10080000012894F8CC0100EB800004EB800004D0B8 +:10081000007C405D022878D018E0807A01280DD055 +:1008200094F8CC11022001EB810104EB8101097CD9 +:10083000485594F8CC01162820D01BE094F8CC0140 +:1008400000EB800004EB8000007C465594F8CC015E +:1008500000EB800004EB800294F8CC0100EB8000F8 +:1008600004EB8000017C4846FEF7B7FF94F8CC010A +:10087000162803D094F8CC01401C00E0002084F836 +:10088000CC0194F8CD0194F8CC118842B0D1254C1C +:10089000207D70B1207C415D012966D0405D022839 +:1008A0006BD0207D28B1217C1E4A4846FEF795FF7B +:1008B0002675BBF10C0F06D00BEB8B0008EB80000C +:1008C000017C012961D0124C94F829000C2800F019 +:1008D000388194F82A00002800F0428184F82A60C8 +:1008E00094F8290000EB800008EB8003A4F53B702E +:1008F000D3E90112DB68C0F80433C0E9BF12607E9F +:1009000000280CBF042502250EE01CE07800002022 +:10091000C00C0020D80B0020FFFF3F007A00002011 +:10092000D4090020A40B002094F82900C34600EB52 +:10093000800108EB8100407B06284DD2DFE800F003 +:10094000404A4846444294F8CC0100EB800004EB56 +:100950008000807A012818BFFFDF94F8CC0100EBFB +:10096000800004EB8000867268E7A17A01291DBF30 +:10097000022141552675465593E7A07A012818BFF4 +:10098000FFDFA672207C46558BE707210174FE4CE1 +:10099000207E162810D0207EE17D401C884200D1A8 +:1009A000FFDF207E04F800B0207E16280EBF002056 +:1009B000207E401C207686E7E07D0028F1D1EFE71D +:1009C00000200BE0B42009E0732007E0322005E0AE +:1009D0000A2003E0062001E0FFDF00202073617E93 +:1009E000022918BF012911D121690144A1EB090293 +:1009F00022F07F42382A09D903206076A1F1320023 +:100A000020F07F4020613220207309E0322807D295 +:100A100094F8280058B9F8F793FA84F828A006E06B +:100A200094F8280018B1F8F7B4FA84F828607978B7 +:100A300084F8201038780622012818BF032806D130 +:100A400084F824A0207B814284BF081A821D94F878 +:100A50002230002B18BF921C94F82400002808BFF5 +:100A6000002B6AD0D4F810806069A8EB0908DFF881 +:100A70001CC328F07F48A0EB090020F07F404245CE +:100A800098BFB8F5800F41D284453FD3207B884280 +:100A900015D22369A1EB0002A3EB020222F07F42F0 +:100AA0001144294421F07F412261616000280CBF7C +:100AB00001200320207710F0FF0F36D114E00AD96F +:100AC000226900291044284420F07F4060600CBF58 +:100AD00002200420EEE7002B08BFFFDF2069284436 +:100AE00020F07F40606026770120F8F787F800BF8C +:100AF00094F82900012300EB80010BEB8100616871 +:100B000090F90C200020F8F7BDF829E084F8246063 +:100B100084F82260207B0028E0D021690844284422 +:100B200020F07F4060600220207720690123411976 +:100B300000221846F8F7A6F8DAE7207B0028ECD167 +:100B4000CCE70120F8F75AF80020F8F757F8F8F743 +:100B50003BF894F8280018B1F8F71BFA84F82860DD +:100B600094F8220028B1F8F769F984F8236084F832 +:100B7000226094F8210018B1F8787870B87838704D +:100B800094F8240030B184F823603878002808BF36 +:100B900084F824607C48017EC07D814203D07C487B +:100BA0004078F8F70DFD84F827A0BDE8F09F70B5F8 +:100BB000784C054682B094F829000C2808BFFFDF66 +:100BC00094F8290000EB8000734E06EB8000007C57 +:100BD000032818BFFFDFA068B0F1FF3F18BFFFDF99 +:100BE00094F82900002100EB800006EB800001AAA8 +:100BF00090F90C0000918DF8041028446946F8F72C +:100C000041F99DF904000F28CCBF01200020009974 +:100C100008446168084420F07F41A16094F82500F1 +:100C2000002804BF02B070BD012302B00022BDE85D +:100C300070401846F8F726B8584A0B1A02F1010C12 +:100C4000B3EB9C0F3CBF1846704710B5441AB4EB89 +:100C50009C0F3CBF184610BD9A4203D2101A08449C +:100C6000401C10BD94429EBFFFDF002010BD511AF2 +:100C70000844401C404210BD0123002201460220CE +:100C8000F8F700B80220F7F7B9BFF8F75CB8F0B58D +:100C9000404C054683B094F82B00002808BFFFDFC6 +:100CA000642D50D33E490020491B80414BD33D4821 +:100CB00090F8CD1190F8CC01814244D13A48007DA2 +:100CC000002840D194F82900334F00EB800007EB57 +:100CD0008006206801AA28446946F8F7D3F89DF9F0 +:100CE0000400002802DD0098401C0090B2680099C2 +:100CF00073685018C01A20F07F40B0F5800F22D2E0 +:100D0000B07C0C2809D000EB800007EB8000406825 +:100D1000801A20F07F40884215D3A068B0F1FF3FD1 +:100D200005D00120F7F76AFF4FF0FF30A060206880 +:100D300028442060B0680099084420F07F4060613A +:100D400003B00120F0BD03B00020F0BD2DE9F0415B +:100D50000646401EC5B2104805EB850100EB810434 +:100D6000207C002808BFFFDF0E4A92F8CC1192F8D1 +:100D7000CD01814221D000BF01EB810302EB83034F +:100D80001B7CB34220D011E0BC0B0020FFFF3F00D2 +:100D900078000020C00C0020D80B0020FF7F841EAC +:100DA000FF1FA107D4090020A40B002016290CBFA7 +:100DB0000021491CC9B28142DED13A48017D002997 +:100DC00062D0007CB0425FD10020BDE8F081217C80 +:100DD00005291FBF217C0629217C07292CD12774D6 +:100DE000C27D0023017E914218BF014624D000BF7E +:100DF00011F80280A84508BF012300D04BB1162A84 +:100E00000CBF4FF0000802F1010811F8088001F84A +:100E10000280162A0CBF0022521CD2B291F8188010 +:100E20009045E5D143B10A7E002A08BF81F818C079 +:100E300002D00A7E521E0A76617C21B36674C27D9E +:100E40000021037E934224D0835CAB4208BF012182 +:100E500000D029B1162A0CBF0023531CC35C835455 +:100E6000162A0CBF0022521CD2B2037E9342EBD151 +:100E700049B1027E0146002A08BF81F818C008D097 +:100E80000A7E521E0A7604E00127074800264FF02A +:100E9000160C217C012904BF617C002997D1012017 +:100EA000BDE8F081A40B0020BC0B0020F0B5734A14 +:100EB000D2F80032724D002401212E7856B9714EBD +:100EC0003460704F03263F1D3E606E4F04260C3782 +:100ED0003E602970C2F80042D1601160694C48340C +:100EE000D16425688542FBD35160D160C2F80032DD +:100EF000F0BD2DE9F041044680074FF000054FF0AA +:100F0000010604D560480560066024F00204E00490 +:100F10004FF0FF3705D55D484660C0F8087324F4EC +:100F20008054600003D55A48056024F08044E005F1 +:100F30000FD55248C0F80052C0F8087351490D60EF +:100F4000091D0D604F4A04210C321160066124F422 +:100F50008074A00409D54F484660C0F80052C0F81C +:100F600008734D48056024F40054C4F38030C4F382 +:100F7000C031884200D0FFDF14F4404F14D04748FE +:100F80004660C0F8087346488660C0F80052C0F852 +:100F9000087344490D600A1D16608660C0F8087326 +:100FA0000D60166024F4404420050AD53E48466092 +:100FB0008660C0F80873C0F848733C48056024F4A4 +:100FC000006409F0EDF93A48044200D0FFDFBDE8C3 +:100FD000F08170B5202500224FEA020320FA02F1C9 +:100FE000C90719D051B201F01F060124B4404E09BF +:100FF000B60006F1E026C6F88041C6F88042002916 +:1010000006DA01F00F0101F1E02181F8143D03E05F +:1010100001F1E02181F80034521CAA42DED370BDF8 +:1010200070B5174C0D466060FFF763FF6068FFF70F +:10103000D0FF2846F8F761F808F004FE00F0D5F874 +:1010400009F0AEF909F0FBF8F8F78CFABDE870404A +:1010500008F09ABE10B50A4C6068FFF74AFF606856 +:10106000FFF7B7FF09F09CF9F8F70CF90020606072 +:1010700010BD034840687047022070470080004060 +:101080008000002004850040FC1F004000C000409C +:1010900004E5014000D0004004D5004000E00040DD +:1010A00000F0004000F5004000B0004008B50040EE +:1010B000FEFF0FFC70B51F490A68BAB100231D4638 +:1010C00001244A68521C4A60092A00D34D600E79F7 +:1010D00004FA06F20E6816420AD072B60B68934301 +:1010E0000B6062B649680160002070BD052070BDCC +:1010F0005B1C092BE5D3FFDFF8E74FF0E0214FF44D +:101100008000C1F800027047EFF3108111F0010F69 +:1011100072B64FF0010202FA00F20648036842EA92 +:101120000302026000D162B6E7E7024800210160D5 +:1011300041607047880000200120810708607047E7 +:10114000012081074860704712480068C00700D03E +:10115000012070470F48001F0068C00700D0012021 +:1011600070470C4808300068C00700D00120704765 +:10117000084810300068704706490C310A68D203ED +:1011800006D5096801F00301814201D101207047B1 +:10119000002070470C040040C84911F8210F49781D +:1011A000884201D3401A02E0C1F121010844C0B2D3 +:1011B0007047C249233111F8210F4978884201D381 +:1011C000401A02E0C1F121010844C0B27047BB4996 +:1011D000463111F8210F4978884201D3401A02E0C4 +:1011E000C1F121010844C0B27047B54910B5802053 +:1011F00081F80004B1490020233101F8210F487023 +:10120000AE4901F8210F4870AC49463101F8210F71 +:101210004870AC4808F05CFFAA48401C08F058FF32 +:10122000F8F778F8BDE8104000F03DB9202070478D +:10123000B2E770B50C4605460026FFF7ADFF014644 +:101240009E48A14212D30022641EE4B20DD390F84E +:101250002210435C491CC9B205F8013B80F82210FA +:101260002129F1D180F82220EEE7012600F01BF9B8 +:10127000304670BD202070479BE770B50C46054690 +:101280000026FFF796FF01468C482330A14212D377 +:101290000022641EE4B20DD390F82210435C491C76 +:1012A000C9B205F8013B80F822102129F1D180F85C +:1012B0002220EEE7012600F0F6F8304670BD20212E +:1012C00001700020704710B50446FFF780FF2070C2 +:1012D000002010BD70B50C460546FFF778FF0146AB +:1012E00076484630A14213D30022641EE4B20DD3E7 +:1012F00090F82210435C491CC9B205F8013B80F804 +:1013000022102129F1D180F82220EEE7002401E00B +:1013100042F2070400F0C7F8204670BD70B50C46D5 +:101320000546212900D9FFDF67480068103840B220 +:1013300000F0A0F8C6B20D2000F09CF8C0B28642C2 +:1013400004D2FFDF02E000BFF8F734F82146284658 +:10135000FFF76FFF0028F7D070BD2DE9F047DFF8E9 +:101360006481564CA8F101080746233498F8000020 +:10137000DFF84891002604F1230A38B994F82210C6 +:1013800094F82100212200F084F890B14D4699F89C +:10139000221099F82100212200F07BF8B8B15546BF +:1013A0009AF822109AF82100212200F072F848B32E +:1013B00035E094F82100275494F82100401CC0B275 +:1013C00084F8210021282AD184F8216027E095F8AB +:1013D00021002F5495F82100401CC0B285F821004F +:1013E000212801D185F8216098F800004746B0B166 +:1013F00095F8221095F82100212200F04AF870B1EA +:101400003E700CE095F821002F5495F82100401C07 +:10141000C0B285F82100212801D185F8216094F817 +:10142000221094F82100212200F033F800281FD068 +:1014300099F8221099F82100212200F02AF80028BA +:1014400016D09AF822109AF82100212200F021F8F3 +:1014500000280DD0F7F784FF1A4808F041FEB0F5D8 +:10146000005F00D0FFDFBDE8F047164808F04EBE31 +:10147000BDE8F087002806DA00F00F0000F1E02058 +:1014800090F8140D03E000F1E02090F8000440090A +:101490007047401C884204D0904200D109B100201E +:1014A00070470120704710B5064808F019FE002863 +:1014B00003D1BDE81040F7F73EBF10BDF00C00208F +:1014C0000DE000E09100002004ED00E013490878F1 +:1014D0004A78401CC0B2904205D0114B01221A60DC +:1014E000BFF34F8F0870704770B54FF0E0250B4C7D +:1014F000F7F7E6FF20BF40BF20BF6078217861701A +:10150000D5F8001229B9D5F8041211B92178814211 +:10151000EED0F7F7D0FF002070BD00009300002050 +:10152000180502402DE9F041012528034FF0E02184 +:101530000026C1F880011E4CC4F800610C2000F0A8 +:101540002CF81C4801680268C94341F3001142F0BD +:1015500010020260C4F804532560491C00E020BF5B +:10156000D4F80021002AFAD019B9016821F010013D +:101570000160114807686560C4F80853C4F8006149 +:101580000C2000F00AF83846BDE8F08110B504469A +:10159000FFF7C8FF2060002010BD00F01F020121EE +:1015A00091404009800000F1E020C0F880127047AF +:1015B00000C0004010ED00E008C500402DE9F047F4 +:1015C000F84C0646FF21606800EB06121170217886 +:1015D000FF2916D04FF0080909EB011109EB061796 +:1015E0004158C059491E21F07F4100F0DDF918B182 +:1015F00094F80080454614E06168207801EB0611FC +:1016000008702670BDE8F087626809EB0510D159B3 +:10161000105800F0C9F930B96068A84600EB08100E +:101620000578FF2DF0D1606800EB061100EB081083 +:101630000D700670E6E7F0B5DA4B04460020012590 +:101640005A680C261B7A0BE005EB0017D75DA74202 +:1016500004D106EB0017D7598F4204D0401CC0B20A +:101660008342F1D8FF20F0BD70B5FFF70EFBCD4CE3 +:10167000014608252278606805EB0212805800F0C8 +:1016800093F9012808D92178606805EB01114058C9 +:10169000BDE87040FFF7F0BAFEF73CFFBDE87040D0 +:1016A000F7F78EBF2DE9F041BE4C2578FFF7EDFA34 +:1016B0000146FF2D6FD04FF00808626808EB051651 +:1016C000905900F071F90228606801D980595EE0F4 +:1016D00000EB051109782170022101EB0511425C34 +:1016E0005AB1521E4254815901F5000121F07F4147 +:1016F00081512846FFF762FF34E00423012203EB07 +:10170000051302EB051250F803C0875CBCF1000F13 +:1017100010D0BCF5806F10D9CCF3090250F806C088 +:101720000CEB423C2CF07F4C40F806C0C3589A1A90 +:10173000920A09E0FF2181540AE0825902EB4C32FF +:1017400022F07F428251002242542846FFF736FFA2 +:101750000C21606801EB05114158E06850F8272022 +:10176000384690472078FF2815D0FFF78EFA0146BB +:101770002278606808EB02124546805800F014F9A0 +:10178000012891D92178606805EB01114058BDE826 +:10179000F041FFF771BABDE8F081F0B51D4614467F +:1017A0000E460746FF2B00D3FFDFA00700D0FFDF68 +:1017B0007C48FF210022C7604460057206740170F6 +:1017C00042701046012204E002EB0013401CE15479 +:1017D000C0B2A842F8D3F0BD70B5724C0646657829 +:1017E000207C854200D3FFDFE06840F82560607808 +:1017F000401C6070284670BD2DE9FF5F1D468B467A +:101800000746FF24FFF741FADFF89891064699F85A +:101810000100B84200D8FFDF00214FF001084FF06F +:101820000C0A99F80820D9F804000EE008EB01131F +:10183000C35CFF2B27D0BB4205D10AEB011350F844 +:1018400003C0DC4521D0491CC9B28A42EED8FF2C26 +:101850001BD008EB04110AEB0412475440F802B005 +:101860000421029B0022012B01EB041111D04250F4 +:101870004FF4806808234FF0020C454519D9A9059B +:10188000890D08D008E00C46DDE7FF2004B0BDE874 +:10189000F09F4550ECE7414606EB413203EB041361 +:1018A00022F07F42C250691A0CEB0412890A81545B +:1018B0000BE005B9012506EB453103EB041321F0DC +:1018C0007F41C1500CEB0411425499F8005020465E +:1018D000FFF774FE99F80000A84201D0FFF7C4FE9C +:1018E0003846D3E770B50C460546FFF7CEF90646F5 +:1018F00021462846FFF79FFE0446FF2817D0294DB2 +:10190000082101EB041168684058314600F04CF89A +:1019100000F58050400B02216A6801EB0411515C14 +:1019200009B100EB8120002800D1012070BD00200A +:1019300070BD2DE9F0410F468046FFF77CFEFF2881 +:101940001BD0184E357871682A462C4605E0844233 +:1019500006D0254601EB05131C78FF2CF7D10CE0CF +:10196000FF2C0AD0A5420CD101EB02100078307098 +:10197000FF2804D0FFF778FE03E000200BE7FFF715 +:1019800081F939464046FFF7ADFFFF220123716818 +:1019900003EB0413CA5401EB041201EB0511127896 +:1019A0000A70F8E65C0D0020401A20F07F40B0F588 +:1019B000000F00D90020704770B50446A0F5000064 +:1019C0002C4EB0F1786F02D23444A4F500042A48BA +:1019D000844201D2012500E0002500F041F830B139 +:1019E000B4420BD32548006804E0284370BDB442DC +:1019F00004D32348844201D20120F6E70020F4E713 +:101A000010B50446A0F50000B0F1786F03D2194874 +:101A10000444A4F5000400F023F84FF0804130B1F5 +:101A20001648006804E08C4204D2012003E0144808 +:101A30008442F8D2002080F0010010BD10B520B122 +:101A4000FFF7DEFF08B1012010BD002010BD10B56A +:101A500020B1FFF7B1FF08B1012010BD002010BD7B +:101A6000084809490068884201D1012070470020D8 +:101A7000704700000000002000C001001C00002092 +:101A80000800002098000020BEBAFECA0548064A99 +:101A90000168914201D100210160044901200860E0 +:101AA0007047000098000020BEBAFECA40E5014021 +:101AB000404800210170417010218170704770B55D +:101AC000054616460C460220F5F789FC39490120E7 +:101AD00008703949F01E086038480560001F04602E +:101AE00070BD10B50220F5F77AFC3249012008706C +:101AF00033480021C0F80011C0F80411C0F80811E3 +:101B000030494FF40000086010BD2A480178C9B17F +:101B10002D4A4FF4000111602949D1F8003100220B +:101B2000002B1CBFD1F80431002B02D0D1F80811D2 +:101B300011B14270102103E001214170234909686D +:101B4000817002700020F5F74ABC1A48017800291C +:101B500004BF407870471A48D0F80011002904BF2C +:101B600002207047D0F8001100291CBFD0F80411E2 +:101B7000002905D0D0F80801002804BF01207047D3 +:101B8000002070470B480178002904BF8078704717 +:101B90000B48D0F8001100291CBFD0F8041100290F +:101BA00002D0D0F8080108B110207047074800683B +:101BB000C0B270479C00002010F5004008F50040BE +:101BC00000F0004004F5014008F5014000F4004039 +:101BD0003148002101704170704770B506461446C7 +:101BE0000D460120F5F7FBFB2B49012008702B481F +:101BF0000660001D0460001D056070BD2DE9F04108 +:101C000004460120F5F7EBFB234901200870244925 +:101C10000C60244D0026C5F8046123494FF040773D +:101C20000F60A1F1040844B1012C18BFFFDFC5F813 +:101C30000062C8F80070BDE8F081C5F800024FF0FE +:101C40008070C8F80000BDE8F0811348017879B1D0 +:101C5000154A4FF0407111601249D1F8042100215A +:101C6000002A08BF417002D0104A12684270017009 +:101C70000020F5F7B4BB08480178002904BF40787C +:101C800070470848D0F80401002808BF704707488B +:101C90000068C0B2704700009F00002008F50040B7 +:101CA00004F5004000F0004008F5014000F4004059 +:101CB00070B5FE4C002501266570257025626572A1 +:101CC000A572E67284F82950256304F13C00A563EF +:101CD00008F0FEF9002818BFFFDF84F82450F4480C +:101CE00009F062FAF3480660657770BD30B4EF49D9 +:101CF0000268DFF8C8C34A6142688A61007A0877DF +:101D00000A7DED4BACF1040401204AB10A7E00FAD1 +:101D100002F21A608D7D002D0CBF2260CCF80020ED +:101D20004A7D002A04BF30BC70474A7E904018604C +:101D3000C97D00290CBF2060CCF8000030BC704782 +:101D4000DF4900B50A1D40B101281CBFFFDF00BDFF +:101D5000DC480860DC48106000BDDC480860DC48F6 +:101D6000F9E7F0B502264FF0E02701240025C7F877 +:101D70008061D8490D600C60D7490A6822F077026B +:101D800042F0880242F000420A60CD490A1DD0B1FB +:101D9000012818BFFFDF1AD0D04940F25B6008600D +:101DA000091F40F203100860081F0460CC4903209B +:101DB0000860CC4996200860BC4C94F9240010F0CF +:101DC000030F09D033E0C1480860C14802E0BD48B4 +:101DD0000860BD481060DFE780100A300C2826D26A +:101DE000DFE800F021252525251D1915110D0A060E +:101DF000BD49042008601BE0BB48056018E0BA49F3 +:101E0000FC20086014E0B849F820086010E0B649EA +:101E1000F42008600CE0B449F020086008E0B24902 +:101E2000EC20086004E0B049D820086000E0FFDF43 +:101E3000607F002814BF4FF4C020AC48AC49086054 +:101E4000AD49AC480860091FAC480860C7F880621B +:101E5000AB491020C1F80403F0BD944A0368C2F8EE +:101E600002308088D08011727047904890F8290025 +:101E700070478E4A517010707047F0B50D46044699 +:101E800004EB4501908808841078D2F801100127EE +:101E900040EA012044F8250005F1080007FA00F6A1 +:101EA000002B04BF206BB04304D0012B18BFFFDF11 +:101EB000206B304307FA05F108432063F0BD30B5CD +:101EC0000D460446082988BFFFDF0022002D11D9E6 +:101ED00054F82210900000F1804000F58050C0F8C6 +:101EE000001604EB4201098CC0F82016501CC2B247 +:101EF0009542EDD8206B8349086030BD10B504468B +:101F000010F0030F2BD1A0100A300C2827D2DFE8E5 +:101F100000F022262626261E1A16120E0A067249DE +:101F2000042008601CE070490020086018E06E4939 +:101F3000FC20086014E06C49F820086010E06A4951 +:101F4000F42008600CE06849F020086008E0664969 +:101F5000EC20086004E06449D820086000E0FFDF5E +:101F6000524880F8244010BD504890F83400704723 +:101F7000654AC178116000686449000208607047D2 +:101F8000252808BF02210ED0262808BF1A210AD012 +:101F9000272808BF502106D00A2894BF0422062211 +:101FA00002EB4001C9B25A4A11605A4908607047B1 +:101FB0003E49086270473D498A7A012A49D0022A7F +:101FC00018BF70474B7D002B08BF7047DFF848C132 +:101FD000012A42D0CA7D4B7E002A18BF01227D30E3 +:101FE000CCF80000DFF834C10020CCF84C01180216 +:101FF00082F0010240EA025040F00312087F8300A1 +:1020000003F1804303F5C043C3F81025444A02EBB3 +:102010008002887EC30003F1804303F5F833C3F8E0 +:102020001425DFF800C1C3F810C5C97ECB0003F149 +:10203000804303F5F833C3F81425304AC3F810255C +:10204000012202FA00F002FA01F108433649086061 +:1020500070470B7D002BB9D170478A7D0B7E002A1B +:1020600018BF01227E30BBE72DE9F84F00280CBFD6 +:10207000012002200D4C224D0322A072C5F800223F +:10208000627F002A14BF4FF4C022184A264F3A60DC +:102090004FF00108002976D0012973D002291CBF16 +:1020A000FFDFBDE8F88F206A00283FE0700D0020B8 +:1020B000840D0020A0050040180500500C050050BC +:1020C00014150040050103001F0003020601020071 +:1020D00025000302FC1F00403C170040381500405B +:1020E00010150040441500400C1500400000040489 +:1020F00008F5014040800040A4F501401011004067 +:102100000010004040160040241500401C150040FF +:1021100008150040541500404C85004000800040E8 +:10212000006000404C81004004F5014008BFFFDF23 +:10213000216A206B0844FB490860FC49FA480860A2 +:10214000A17AFB4801290EBF0560FA490160A06B26 +:1021500040F40020A063D5F800924FF0100AC5F8B3 +:1021600008A30026C5F80062F3484FF4802BC0F89E +:1021700000B0FF208DF80000C5F81061C5F8108090 +:102180003DE000E01CE0012813D0C5F804800228DF +:1021900018BFBDE8F88F607D002808BFBDE8F88F44 +:1021A000E648C0F84C80E6480068BDE8F84F0A30C1 +:1021B00001E7C5F80080207D0028F1D1BDE8F88F47 +:1021C000E0490128896B07D0022818BFFFDF09D03A +:1021D000BDE8F84F0A20EEE641F48010A0634FF40A +:1021E000801004E041F40010A0634FF40010386048 +:1021F000EEE700BF9DF80000401E8DF800009DF83E +:10220000000018B1D5F810010028F3D09DF80000A7 +:10221000002808BFFFDFC5F80C61C5F81061C5F8DC +:102220000461C5F81461C5F81861C5F82861C6488D +:1022300000680090C5F80092C7F800B0C5F804A384 +:102240004FF400203860216A206BBDE8F84F084445 +:102250000A30B0E62DE9F847BC4CD4F8000220F073 +:102260000309D4F804034FF0100AC0F30018C4F8AF +:1022700008A30026C4F80062B24D687F002814BF8E +:102280004FF4C020B248AC490860A87A0127012861 +:1022900002D0022803D014E0287D10B911E0687D37 +:1022A00078B1A87EEA7E07FA00F007FA02F210433E +:1022B0000860287F800000F1804000F5C040C0F831 +:1022C0001065FF208DF80000C4F81061276104E05C +:1022D0009DF80000401E8DF800009DF8000018B128 +:1022E000D4F810010028F3D09DF80000002808BFA2 +:1022F000FFDFC4F81061C4F828616E72AE72EF722D +:10230000C4F80092B8F1000F18BFC4F804A3BDE8E8 +:10231000F88700688F4920F07F40086070474FF0D1 +:10232000E0200221C0F88011C0F8801270474FF001 +:10233000E0210220C1F8000170478749087070470A +:1023400010B5864807F0CCFE002818BFFFDF10BD8F +:10235000824807F0DBBE82490860704730B5794C8F +:102360000546206BA84228BFFFDF012020732561AE +:10237000607F40B1A81C20617448D0F8001241F081 +:102380004001C0F800126D490020C1F844017549B0 +:1023900020690860A06B744940F48000A0634FF48A +:1023A0008000086030BD674802210173CA210161C5 +:1023B000417F41B1CC2101616449D1F8002242F052 +:1023C0004002C1F800225D4A0021C2F844110269AE +:1023D000016B1144634A1160816B41F48001816398 +:1023E00061494FF4800008607047564901204877E2 +:1023F0005E49022008605F495D480860091F5E4829 +:10240000086070474F490020487770474A494FF4A9 +:10241000800008604B48816B21F4800181630021BA +:1024200001737047454801214160C1600021C0F837 +:1024300044114C480160434801637047414800B56E +:10244000407F002818BFFFDF4020484908603F4810 +:10245000D0F8001241F04001C0F8001200BD394828 +:1024600000B5407F002818BFFFDF3848D0F80012C1 +:1024700021F04001C0F800123C490020086000BD76 +:102480003248D0F8001221F01001C0F800120121EA +:10249000816170472D480021C0F81C11D0F800124E +:1024A00041F01001C0F800127047284981B0D1F8FE +:1024B0001C21012A1EBF002001B070472F4A12685C +:1024C00002F07F02524202700020C1F81C012C4829 +:1024D00000680090012001B0704730B50C0005463F +:1024E00008BFFFDF14F0010F1CBF012CFFDF002D20 +:1024F0000CBF01200220134901284872CC721349F5 +:1025000004BFD1F8000240F0040007D0022807BF42 +:10251000D1F8000240F00800FFDF30BDC1F8000232 +:1025200030BD00004885004048810040A8F50140CA +:10253000ACF501400410004008F501400080004067 +:102540004C850040700D0020181100400010004024 +:10255000000004043C150040A1000020AC0D002048 +:10256000041500404485004004F50140601500401A +:10257000448000409CF5014028110040481500406F +:102580001C11004070B5EB4C0022E17A11F0020FF3 +:1025900018BF10F0040F16D111F0100F1CBF94F8E3 +:1025A0003530002B02D094F8363063B111F0080FAB +:1025B0001CBF94F82830002B05D111F0040F03D074 +:1025C00094F8291001B90122657ADB4900234FF004 +:1025D000010C35B100F00200104314D0BDE870408A +:1025E00038E6607F002814BF4FF4C020D348D44A97 +:1025F0001060D1F8000220F00300C1F80002A372BD +:1026000084F80BC070BD012D14D0022D18BFFFDF60 +:102610001CD0A07A01280CBFCA48CB484FF47A716D +:1026200000F2E730B0FBF1F0216BBDE87040081A12 +:102630008C30C0E4D1F8000220F00400C1F80002A0 +:10264000637284F80BC084F80AC0E2E7D1F8000294 +:1026500020F00800C1F80002637284F80BC0022069 +:10266000A072D6E72DE9F84FB84FD7F84C21B14CFE +:10267000B3494FF00108A07A0026CAB1012802D060 +:10268000022803D014E0227D12B911E0627D7AB1F4 +:10269000A27EE37E08FA02F208FA03F31A430A6004 +:1026A000227F920002F1804202F5C042C2F810651A +:1026B000A26B0A60A663217B19B1D7F844110129E6 +:1026C00000D000219C4DD5F81021012A0CBF4022DA +:1026D0000022012805BFD5F80C31012B002320234F +:1026E0001A43012805BFD5F80431012B002310231C +:1026F0001343974A022804BFD2F800C0BCF1010F6F +:1027000007D1D5F80CC1BCF1010F08BF4FF0080C80 +:1027100001D04FF0000C4CEA0303022804BF1268FA +:10272000002A05D1D5F80C21012A08BF042200D0C7 +:1027300000221A43022803D1002918BF022100D128 +:1027400000211143022804BFD5F80401012805D156 +:10275000D7F84401012818BF012000D1002040EA29 +:1027600001097C48016811F0FF0F03D0D5F814115E +:10277000012900D0002184F83410006810F0FF0F08 +:1027800003D0D5F81801012800D0002084F83500C6 +:102790007148006818B1FFF7D8F9012800D000206F +:1027A00084F83600C5F80C61C5F81061C5F80461FD +:1027B000C5F81461C5F81861C5F828616748006854 +:1027C0000090C7F84461664800684D46DFF8949170 +:1027D0000090D9F80000E062617F00291CBF801ED4 +:1027E000E062614800682063A07ADFF880A10228D7 +:1027F0000CD1607850B1DAF80010097808402178DF +:1028000031EA000008BF84F8288001D084F82860ED +:10281000DFF85C8115F0010F16D098F80010554ACA +:102820004908E06A52F821108847012198F80020F1 +:10283000514B5208206B53F82220904798F8000023 +:1028400010F0010F0BD01FE015F0200F18BF022170 +:10285000ECD115F0020F18BF0021E7D1EEE7DAF84E +:102860000000062200F10901A01C08F0B7FA40B9E7 +:10287000207ADAF800100978B0EBD11F08BF0120E8 +:1028800000D0002084F829002846FFF77BFE15F0D1 +:10289000020F05D0394898F8001050F82100804701 +:1028A00015F00C0F07D0364898F8001050F821109A +:1028B000C5F3C000884715F0200F05D0314898F8BF +:1028C000001050F82100804798F80000022805D138 +:1028D00005F06E00402806D101F00EF998F80000CE +:1028E000042828BFFFDFA07A022818BFBDE8F88FB0 +:1028F000207B002808BFBDE8F88FC7F84461022894 +:1029000014D0012818BFFFDF216B2069884298BFCF +:10291000FFDF2069C9F80000A06B1B4940F480006C +:10292000A0634FF480000860BDE8F88F2169206B38 +:102930000844EFE7700D0020001000400000040480 +:1029400008F50140F0FE0100B0F8010000800040F1 +:10295000001400404016004060150040181100406F +:1029600044810040448500404085004004150040FB +:10297000A1000020E8B40100F0B40100F8B40100A7 +:1029800008B5010018B5010004F5014010B54A482A +:1029900006F0C5FB0021484806F0F6FB0121464839 +:1029A00006F0C0FB4549002081F822004FF6FF7079 +:1029B000888443490880488010BD10B53E4806F021 +:1029C000AEFB00213C4806F0DFFB01213A4806F04F +:1029D000A9FB3A49002081F822004FF6FF70888455 +:1029E00037490880488010BD704734498A8C82423C +:1029F00018BF7047002081F822004FF6FF708884CE +:102A000070472D49016070472D49088070472B4958 +:102A10008A8CA2F57F43FF3B03D00021016008466A +:102A2000704791F822202549012A1ABF0160012030 +:102A300000207047214901F1220091F82220012A4B +:102A400004BF00207047012202701D48008888845E +:102A5000104670471A49488070471849184B8A8CAD +:102A60005B889A4206D191F82220002A1EBF01609D +:102A700001207047002070471048114A818C52880D +:102A8000914209D14FF6FF71818410F8221F19B1CC +:102A90000021017001207047002070470748084A54 +:102AA000818C5288914205D190F8220000281CBFE9 +:102AB0000020704701207047D60D0020B00D002087 +:102AC000A200002070B5FF4E044696F88400002551 +:102AD000012807D096F8660001281CBF002070BDB1 +:102AE000E1B90EE0D1B9657014202070D6F88500E8 +:102AF000C4F80200D6F88900C4F8060086F88450AD +:102B00000CE06570132020701C2206F16801A01CE7 +:102B100008F090F90120A07186F86650012070BD80 +:102B2000E84890F86610002914BFB0F86A004FF624 +:102B3000FF70704770B5E4480178002918BF0C2673 +:102B400001D0304670BDDF4C0026354684F8546015 +:102B500084F8556084F8566084F8576084F85860AB +:102B600084F8596084F84D6084F82D6084F86460BE +:102B70007F21817094F85A0028B1FFF770FCFEF7AE +:102B8000C4FF84F85A5084F86650D04806F074F9AF +:102B9000CF4806F071F9D4E770B5CB4A002515701F +:102BA000C84CC4E91701107800281CBFFFDF70BDB6 +:102BB00084F8545084F8555084F8565084F857508F +:102BC00084F8585084F8595084F84D5084F82D50AA +:102BD00084F864507F20907094F85A0028B1FFF771 +:102BE0003EFCFEF792FF84F85A5084F86650B748CE +:102BF00006F042F9BDE87040B54806F03DB9B1486D +:102C000090F854007047AF4900B591F84F0091F823 +:102C10004E10C0F38002C0F340031A4400F00100DC +:102C20001044052910D2DFE801F00B070B0309005F +:102C3000A84931F8100000BDA74800BDA74900E031 +:102C4000A74931F8100000BDFFDF002000BD9D48FE +:102C500040F27121B0F8500048437047994890F80D +:102C60006500002818BF0120704770B5954C437B64 +:102C7000002584F84F30037984F84E30012B0EBFC5 +:102C8000A4F85050B0F800C0A4F850C090F80EC09E +:102C900084F865C021701168C4F801109188A4F807 +:102CA000051081796173D0F80710C4F80710B0F8E7 +:102CB0000B00A4F80B0094F84D000126002818BF63 +:102CC00084F8556094F82D00002818BF84F85660E9 +:102CD000052B2CD2DFE803F0030821260800002191 +:102CE0007A4806F0CCF823E00121784806F0C7F8CE +:102CF000E11D764806F0F4F8607B20B1012818BF8A +:102D0000FFDF05D014E00021704806F0FDF80FE069 +:102D100001216E4806F0F8F80AE006216B4806F03B +:102D2000AEF805E00221694806F0A9F800E0FFDFEF +:102D300084F8575084F85850611C644806F0C2F873 +:102D40002178624806F0D3F80421614806F097F82C +:102D5000611C5F4806F0B6F821785D4806F0C7F8B8 +:102D600084F85460002070BD564A012382F8583020 +:102D700092F866C0BCF1000F1CBF3A20704710B437 +:102D800014784FF0000C844218BF82F858C009D163 +:102D900082F857C00868C2F801008888A2F80500C8 +:102DA00082F8573010BC0020704770B5454C05467E +:102DB000002084F856002A4604F10E0008F03AF884 +:102DC00084F82D50012084F8560070BD10B53D4C9C +:102DD000002284F8552084F84D00024604F12E00AC +:102DE00008F028F8012084F8550010BD354981F815 +:102DF0006400704770B5344E3078A0BB314C94F805 +:102E0000540080B3FFF79CFA002584F8525084F8F0 +:102E1000535075702846FFF790FA0020FEF7A1FF87 +:102E20003048FFF7A5F83048FFF773FAFFF7BBFA11 +:102E300094F84F0010F0010F04D094F8521011F0E4 +:102E4000010F13D010F0020F04D094F8521011F0BB +:102E5000020F18D010F0040F2CD094F8520010F08C +:102E6000040F1BD026E0FFE70C2070BD2520FFF7E4 +:102E700087F80020FEF764FF94F8520040F001004C +:102E800084F8520016E02620FFF77AF80020FEF7BB +:102E900057FF94F8520040F0020009E02720FFF7A6 +:102EA0006FF80020FEF74CFF94F8520040F0040049 +:102EB00084F85200FFF73BFA01210020FFF7D4F815 +:102EC0000F2113E0F80D0020A8000020880E00203C +:102ED000B00E002038B501009189130040B5010003 +:102EE00030B501002BB5010028B501000520FEF723 +:102EF000C0FF2178601CFEF7B0FF94F84E00012857 +:102F00001EBF042894F85500002808D094F84D20DE +:102F100004F12E01FE4806F012F884F8555094F89A +:102F2000560040B194F82D2004F10E01F94806F046 +:102F300032F884F85650206E017819B110F8041B4D +:102F4000FEF7BDFFE06D017831B1F34A401CFEF79A +:102F5000B6FD012084F85A00FFF7FAF9002070BD91 +:102F6000EE494860704770B5ED4C05003BD02046F7 +:102F700094F84F1090F8520011F0010F02D010F0A9 +:102F8000010F0CD011F0020F02D010F0020F11D07F +:102F900011F0040F27D010F0040F18D023E02520E3 +:102FA000FEF7EEFF0020FEF7CBFE94F8520040F053 +:102FB000010009E02620FEF7E3FF0020FEF7C0FE37 +:102FC00094F8520040F0020084F852000BE02720F1 +:102FD000FEF7D6FF0020FEF7B3FE94F8520040F053 +:102FE000040084F8520094F8530040B194F84E0065 +:102FF000012808BFFFDFBDE8704000F054BA1DB1E2 +:1030000002210020FFF730F894F85700002558B14E +:10301000611CBF4805F056FF611CBE4805F052FF19 +:1030200084F8575084F85850B948FFF794F994F849 +:103030004E00052809D2DFE800F00303030903006E +:1030400001210846FFF749FA00E0FFDF94F84F003E +:1030500094F8521030EA01014FF0010002D0AF495C +:10306000087070BD94F84E10012914BF84F8530005 +:1030700084F85250F3E710B5FFF762F9A7480078DB +:1030800040B9A74890F8540020B10020FFF76BFF2B +:10309000002010BDFFF7C6F9FFF7B8F9FFF7DAF81F +:1030A000FFF73DF9FFF754F90C2010BD9B490120B3 +:1030B000487070479A4981F85900704770B50025EB +:1030C00002F07BFC68B14FF49670FEF771FF934EEF +:1030D0003078012809D0022801D003282ED0FFDF44 +:1030E00070BDBDE8704000F0DEB98D4C94F84E0024 +:1030F000032823D094F85A0018B1FEF7F2FCFFF72A +:103100009DF98848FFF727F994F84E00012818BF69 +:1031100004280AD094F86500012814BF032810255C +:1031200045F00E010020FFF7D8F994F8640001285B +:1031300008BFFFF7AFF90220307070BDBDE87040E6 +:10314000012010E770B5764C744D94F864000128A6 +:1031500020D000BF94F85A0018B1FFF780F9FEF7AD +:10316000D4FC02F02AFCF8B12878022818BFFFDF4F +:1031700094F84E00012804BF4FF41970FEF718FFB1 +:103180000120FFF7F0FE287800281EBF28780128CC +:10319000FFDF70BD6448FFF788F9002804BF7F2077 +:1031A000A870FFF76DF9D5E7BDE8704000F07BB976 +:1031B0002DE9F05F82460027FEF7D6FE574D814687 +:1031C000B8462878022818BFFFDF554C4FF07F0B18 +:1031D00094F86400012825D0524805F06FFE064699 +:1031E000BAF1000F6FD04F4805F065FF00286AD094 +:1031F000FEF73BFE002866D094F85A00002818BF5E +:103200004FF028081ED000BFA8F1010000F0FF0811 +:10321000FEF79BFC02280FD0012808BF4FF00108E1 +:1032200010D00DE04048FFF740F9002808BF85F8AE +:1032300002B0FFF725F9CFE7B8F1000FE4D1FFDFC7 +:103240004FF0000837484FF0010A062E3BD2DFE866 +:1032500006F083838303833B94F84E10012918BF43 +:10326000042979D059EA080105D194F8651000299C +:1032700018BF022970D194F86410012904BF94F892 +:103280008410002905D02348FFF765F80320287033 +:1032900063E084F884A0007804F18C06C0F3801009 +:1032A00084F88500D4F8E300C4F88600B4F8E70099 +:1032B000A4F88A00A8787F2808BFFFDFA8783070BC +:1032C00085F802B0DFE747E0C178E27991421BD18F +:1032D0000179227A914217D14179627A914213D1D0 +:1032E0008179A27A91420FD1C179E27A91420BD1D0 +:1032F000017A227B914207D10178627BC1F3801170 +:10330000914208BF012200D0002294F84E100DE037 +:10331000880E0020B00E0020DB0E0020A800002048 +:10332000F80D0020D80E0020AA000020012918BFA7 +:10333000042900D14AB979B959EA080105D194F8AC +:103340006510002918BF012906D194F8581019B941 +:1033500094F85910A346C9B1012794F85A0018B13E +:10336000FFF77DF8FEF7D1FB002F1CBF0120FFF710 +:10337000FAFD287800281ABF28780128BDE8F09FB8 +:103380002878032818BFFFDFBDE8F09F06466A686B +:10339000DBF8EF10C2F80D1000786B49C0F3801015 +:1033A0005076DBF8E300C2F81A00BBF8E700D083E0 +:1033B000BBF8F300A2F811009BF8F500D074B07DC3 +:1033C0001075B6F81700D082B6F819005080B6F81C +:1033D0001B009080B6F81D00D08002F1080007F0B5 +:1033E000E8FE96F8240000F01F016868017696F860 +:1033F0002410490980F8CC109BF86600002818BFFB +:10340000FFDF00268BF8686068680188ABF86A10F7 +:10341000417E8BF86D10D0F81A10CBF86E10C18B6E +:10342000ABF872109BF800108BF87410DBF80110E9 +:10343000CBF87510BBF80510ABF879104188ABF8E4 +:103440007C108188ABF87E10C188ABF8801090F8B2 +:10345000CC008BF882009BF88300B8F1000F04BF0A +:1034600020F001008BF883000BD040F001008BF8B6 +:103470008300FEF787FB9BF8831060F347018BF80E +:1034800083108BF866A02E70FEF7CCFFFEF7BEFF10 +:10349000FEF7E0FEFEF743FFFEF75AFF01206968E2 +:1034A00002F06AFB59E770B5FEF7BCFFFEF7AEFF0E +:1034B000FEF7D0FEFEF733FF244C002694F85A00A6 +:1034C00028B1FEF7CCFFFEF720FB84F85A60204DB0 +:1034D0002E70FEF73DFF94F84E004FF000010128DA +:1034E00004D0BDE87040002002F046BB022002F08C +:1034F00043FB94F86600002818BFFFDF68780028B7 +:1035000008BF70BD607B84F86D00207884F874007B +:10351000D4F80700C4F86E00B4F80B00A4F87200E9 +:10352000D4F80100C4F87500B4F80500A4F87900D7 +:103530003C2084F8680068680088A4F86A000120CC +:1035400084F866006E7070BDF70E0020F80D002044 +:10355000A80000202DE9F041FF4F044600207A78B2 +:10356000FE4D4FF00108064612B1012A08D00DE0C9 +:1035700095F8492052B1002908BF87F8018004E07E +:10358000AA7F1AB1002908BF7E7001207A782B2308 +:1035900012FB03F22A44937F184312D021BB02F19D +:1035A0001F012A22A01C07F045FC66700420207031 +:1035B00084F8028078782B2110FB01F0284486776C +:1035C00012E0287801281CBF0020BDE8F08159B91D +:1035D0006670132020701C22A91CA01C07F02AFC76 +:1035E000A6712E7085F89F600120BDE8F081DB4850 +:1035F0000178002914BF80884FF6FF7070472DE9CD +:10360000F041D64C0546A07F002818BFBDE8F081E8 +:10361000284605F053FC00210126072834D2DFE8B4 +:1036200000F004070C3333330E0084F8201009E057 +:1036300084F8206084F828100BE0032000E00220CA +:1036400084F8200004F12901284605F08EFC84F856 +:103650002800284605F054FC84F8210004F12201DA +:10366000284605F036FCBC4D04F1480728787F2831 +:1036700008BFFFDF287838707F202870A677BDE864 +:10368000F041032001F023BB84F82810BDE8F0814D +:1036900010B5002001F0ACFAB04CA0B1FEF747FE27 +:1036A00000210120FEF7E0FC04F1B800FEF753FE14 +:1036B000D4F8A800FEF752FE94F88400032818BF3F +:1036C00002281FD022E0FEF7ADFEFEF79FFEFEF7B8 +:1036D000C1FDFEF724FE94F8A10030B1FEF7BFFE55 +:1036E000FEF713FA002084F8A100012084F8AC0052 +:1036F000022084F8A300FEF72BFEBDE81040002056 +:1037000001F0E5BA01210020FEF7E7FEFEF7C2FE58 +:1037100094F8A10018B1FEF7E4F9FEF78FFE03203C +:1037200084F8A30010BD8D490028B1F8AE202CD03C +:10373000FF2A0BD24FF6FF7000EA4200A1F8AE005C +:10374000FF2888BFFF2001D9A1F8AE008248426857 +:10375000012A12BF002A0D224260D243C2EBC203EB +:1037600003EB021291F8AD30DB4303EB830CCCEB9F +:1037700083131A444260900CB1F8AE20B0FBF2F310 +:1037800002FB130081F8AD007047012ADED9500812 +:10379000A1F8AE0008BF0120D8D1D5E770B56F4CB5 +:1037A00094F8A300022819BF94F8A3000128002070 +:1037B00005461CBF0C2070BD2B2101FB00418D77FD +:1037C000401CC0B20228F7D3257094F8A10028B19C +:1037D000FEF745FEFEF799F984F8A15084F89D5054 +:1037E00084F89E5084F89F5084F8A050012084F8FB +:1037F0007E0084F8845084F8A25084F87B0084F81A +:103800007C0084F87D00606FA16FE26FD4F8803097 +:10381000C4F88800C4F88C10C4F89020C4F8943020 +:10382000D4F88400C4F8980084F89C50002070BD3F +:103830004A4A10B5002382F8A330C2E92C010120C6 +:1038400082F8A300FFF7AAFF002818BFFFDF10BD12 +:103850002DE9F047414C81460C2794F8A30001283C +:103860001FBF94F8A30002280C20BDE8F087FEF7E4 +:1038700067FD0020FEF775FA94F89C004FF00108F0 +:10388000002844D0D4F88800D4F88C10D4F89020C4 +:10389000D4F894306067A167E267C4F88030D4F848 +:1038A0009800C4F88400002684F89D6084F89E6027 +:1038B00094F87B00002801BF94F87C00002894F85D +:1038C0007D0000281ABF94F8A000002884F89C60AE +:1038D00023D094F88400032802D0022805D008E001 +:1038E00005211F4800F0F3FC03E003211C4800F011 +:1038F000EEFC94F87A1004F17400FEF7AEFA00279B +:1039000084F89C6094F8A300012815D10FE094F886 +:10391000A300022808BF0027F4D094F8A3000228CF +:1039200002BF84F8A3800C20BDE8F08704E084F88F +:10393000AC80022084F8A300D4F8B400017819B157 +:1039400010F8041BFEF7BBFAD4F8B000017879B187 +:10395000044A401C08E00000B0000020000F0020D6 +:10396000E00F0020BB0F0020FEF7A9F884F8A1802B +:10397000FD48C4F8A890FEF7CCFCFEF7E9FC3846F9 +:10398000BDE8F08770B5FEF7DBFCF84C94F8A300B7 +:10399000022803D0FEF7DCFC0C2070BD012084F867 +:1039A000AD00A4F8AE000220FEF7C7FCF048FEF719 +:1039B000DFFAF04B002004F17B0200BF94F8A21064 +:1039C000491CA3FB015C4FEA5C0CACEB8C0C614422 +:1039D000C9B284F8A210895C012907D0401CC0B28A +:1039E0000328EBD3FFF754FE002070BD94F8A2002B +:1039F000E149085CFEF7C4FA0020FEF7A1F9F1E7FF +:103A0000DA4B10B44FF0010C83F89EC093F89F403E +:103A1000002C1EBF3A2010BC7047002418B993F840 +:103A20008E0088420FD183F88E1083F89D40106875 +:103A3000C3F888009088A3F88C0083F89DC083F8B1 +:103A4000A0C083F89CC083F89E4010BC0020704743 +:103A50000300C6494FF000004FF0010208BF81F893 +:103A6000922005D0012B16BF122081F892007047DA +:103A700081F89C2081F899307047BC4A032808BF20 +:103A8000C2F8941082F89800012082F89C0000206F +:103A90007047B64890F89C1029B190F8990000281A +:103AA00008BF704704E090F88500002808BF704701 +:103AB0000120704710B5FEF7B5FCFEF7A7FCFEF736 +:103AC000C9FBFEF72CFCA94C94F8A10030B1FEF71D +:103AD000C6FCFEF71AF8002084F8A100012084F843 +:103AE000AC00022084F8A300FEF732FC002010BDD9 +:103AF0009E4981F8A400704710B5FEF793FCFEF7CD +:103B000085FCFEF7A7FBFEF70AFC984C94F8A10091 +:103B100030B1FEF7A4FCFDF7F8FF002084F8A10007 +:103B2000012084F8AC00022084F8A300FEF710FC0A +:103B3000BDE81040002001F0CAB82DE9F05F002672 +:103B4000DFF83882894C7F2780B104F1B80005F096 +:103B500082FA20B904F1B80005F09DFA30B194F86A +:103B6000840003280DD194F89E0050B194F8A3006E +:103B7000052828BFBDE8F09FDFE800F0BABABAF523 +:103B8000F40094F8A3007E4D4FF0010A052880F060 +:103B90005D82DFE800F0FBFBFB03FA00784805F0EC +:103BA0008DF97649887094F87E0030B9FEF7DCF91B +:103BB000002808BF4FF0000801D04FF0010894F82A +:103BC000A100002818BF4FF0280915D0A9F1010065 +:103BD00000F0FF09FDF7B9FF8346022803D1B9F1D0 +:103BE000000FF3D1FFDFB8F1000F14D1BBF1010FCB +:103BF00018BF4FF000080ED0DFF880914FF0020B95 +:103C000099F80200072880F08281DFE800F073F75E +:103C100007F6F6F625004FF00108EDE794F8A1004D +:103C200018B1FEF71CFCFDF770FF5448FEF73DFC91 +:103C3000002808BF89F80070FEF722FCB8F1000FD9 +:103C400000F05F8194F88400012818BF022840F03A +:103C50005881FEF7FFFAEBE094F8A10018B1FEF7E7 +:103C6000FEFBFDF752FF4548FEF71FFC002808BF8A +:103C700089F80070FEF704FCB8F1000F00F04181F4 +:103C800094F88400022803D001287DD000F039B9CF +:103C90003B48FFF7B4FC012000F0AAFF58B13949B6 +:103CA000A1F1280005F039F93648FEF754FB94F8E5 +:103CB0009D00A0B190E0FEF7B5FBFEF7A7FBFEF775 +:103CC000C9FAFEF72CFB94F8A100002870D000BFC1 +:103CD000FEF7C5FBFDF719FF84F8A1609DE0012107 +:103CE0000846FEF7FAFBFEF75EFB052084F8A3000A +:103CF000BDE8F09F94F8A10018B1FEF7B0FBFDF706 +:103D000004FF1E48FEF7D1FB002808BF89F80070A9 +:103D1000FEF7B6FBB8F1000F71D094F884000228CA +:103D200047D0012830D003281CBFFFDFBDE8F09F3B +:103D3000E978D4F88000827E914231D12979C27E1F +:103D400091422DD16979027F914229D1A979427F8F +:103D5000914225D1E979827F914221D1297AC27F8E +:103D6000914214E08BE174E148B50100000F00209E +:103D70004EB50100ABAAAAAA4BB50100B0000020C5 +:103D8000B80F0020E00F002052E0CFE05EE107D145 +:103D90002978427EC1F38011914208BF012100D0F1 +:103DA000002194F88520012A48D0002927D0A0E0DE +:103DB00033E0FE48FFF723FC012000F019FFF8B1C3 +:103DC000FB49A1F1280005F0A8F8F948FEF7C3FA6D +:103DD00094F89D00002882D0D4F888006067B4F879 +:103DE0008C00A4F8780004F17401F14805F06AF839 +:103DF00084F89D6084F89E6071E788E02CE07FE0A5 +:103E0000FEF710FBFEF702FBFEF724FAFEF787FA37 +:103E100094F8A10000287FF45BAF84F8ACA084F88C +:103E2000A3B0FEF795FABDE8F05F002000F04FBFA9 +:103E3000DE48FFF7E4FBBDE8F05F29E4F1BB00BF1B +:103E400000F11A01D94805F044F8D84805F058F8AF +:103E5000D4F8801048764CE094F8A10018B1FEF731 +:103E6000FEFAFDF752FED348FEF71FFB002808BFFD +:103E700089F80070FEF704FBB8F1000F41D0FDF7A0 +:103E8000F4FFE8B394F88400032808D0C748FFF78C +:103E9000B6FBFEF7DFF9BDE8F05FFFF7F9BBD4F83A +:103EA0008000E978827E91421DD12979C27E9142BB +:103EB00019D16979027F914215D100E019E0A97901 +:103EC000427F91420FD1E979827F91420BD1297AC9 +:103ED000C27F914207D12978427EC1F3801191427D +:103EE00008BF012100D0002194F88520012A04D0C8 +:103EF00031B1BDE8F05F00F08FB90029F9D19FE73B +:103F0000FFE7FEF7A7F9BDE8F05FFFF7C1BB94F844 +:103F1000A10018B1FEF7A3FAFDF7F7FDA548FEF7DB +:103F2000C4FA002808BF89F80070A0E09F4804F098 +:103F3000C5FF88F802009E48E978427A91421CD178 +:103F40002979827A914218D16979C27A914214D141 +:103F5000A979027B914210D1E979427B91420CD13F +:103F6000297A827B914208D129780078C1F38011A7 +:103F7000B1EBD01F08BF012500D00025FEF76AF97C +:103F800098F8020004284BD1F5B38A48FEF78DFA61 +:103F9000002808BF88F80070FEF772FA94F8AC00A9 +:103FA00000281CBF0020FFF7BEFB84F8ACA07F4DAB +:103FB00094F8490018B1BDE8F05FFFF769BB042031 +:103FC00084F84B00284604F09BFF002808BF84F8C3 +:103FD0004C6003D0012808BF84F84CA004F14D01C7 +:103FE000284604F076FF04F15401284604F0E9FF66 +:103FF00084F853001F2884BF1F2084F8530004F165 +:10400000730598F8000000E00AE07F2808BFFFDF92 +:1040100098F80000287088F8007084F849A0CAE772 +:104020006448FEF742FA002808BF88F80070FEF7DF +:1040300027FA94F8AC00002804BF0120FFF773FBB7 +:1040400084F8AC60BDE8F05FFFF722BBFFDFBDE89E +:10405000F09F94F8A10018B1FEF701FAFDF755FDA5 +:104060005448FEF722FA002808BF88F80070FEF7CF +:1040700007FAFEF7EFF8BDE8F05FFFF709BB4D4820 +:10408000FEF713FA002808BF88F80070FEF7F8F969 +:1040900094F8AC00002804BF0120FFF744FB84F82B +:1040A000AC60FEF7D7F8BDE8F05FFFF7F1BA70B586 +:1040B000414C94F8A30007285ED2DFE800F05D5D74 +:1040C0005D5D5D040D003948FEF745F9FEF7E2F944 +:1040D000042084F8A30070BDFEF7A4F9FEF796F95A +:1040E000FEF7B8F8FEF71BF9012584F8AC50022062 +:1040F00084F8A300FEF72CF92078002818BFFFDF12 +:104100000020A070D4F880000188A180417EE17178 +:10411000D0F81A10A160C18BA1814188E182818809 +:104120002183C088608394F8A400207794F87A00F3 +:10413000A073606FC4F80F00B4F87800A4F81300FF +:1041400094F8A10018B1FDF700FD012809D0607FA7 +:1041500020F0010060772570BDE87040022000F07B +:10416000B6BD607F40F001006077FDF70BFD617F19 +:1041700060F347016177EEE7FFDF70BD70B50E4C6D +:1041800094F8A3000025052828BF70BDDFE800F0E3 +:104190004343432503000748FEF787F910B9054953 +:1041A0007F200870FEF76CF908E00000B80F0020CF +:1041B000E00F0020B0000020000F002094F8AC00B9 +:1041C000002804BF0120FFF7AEFA84F8AC50FEF7D8 +:1041D00041F8BDE87040FFF75BBAFEF723F9FEF740 +:1041E00015F9FEF737F8FEF79AF894F8A10028B110 +:1041F000FEF735F9FDF789FC84F8A150012084F819 +:10420000AC00022084F8A300FEF7A2F8BDE87040DD +:10421000002000F05CBD70BD70B5022000F0E8FC2D +:104220000025604C0126A0B3012000F050FD04F1F0 +:10423000E001A1F1280004F070FED4F88000C18AEA +:1042400004F1E00004F0E9FED4F88000017D04F1FF +:10425000E00004F0E6FE04F1E000FEF77CF894F8DC +:104260009D0080B1D4F888006067B4F88C00A4F891 +:10427000780004F1740104F1E00004F023FE84F8F6 +:104280009D5084F89E5084F89F60062084F8A30017 +:1042900070BDFFE7FEF7C6F8FEF7B8F8FDF7DAFFE6 +:1042A000FEF73DF894F8A10028B1FEF7D8F8FDF725 +:1042B0002CFC84F8A15084F8AC60022084F8A300A0 +:1042C000FEF746F8BDE87040002000F000BD70B574 +:1042D000344C0546032952D0052918BF70BD04F09F +:1042E000CBFD0521284604F0CAFD94F87A10284633 +:1042F00004F0FDFD04F17401284604F0E3FDD4F858 +:10430000800000F10D01284604F071FED4F8800011 +:1043100000F11101284604F06EFED4F88000017D02 +:10432000284604F07EFED4F88000C18A284604F0B6 +:1043300074FED4F880004188284604F062FED4F868 +:1043400080008188284604F060FED4F88000C1888F +:10435000284604F05EFED4F8800000F108012846EB +:1043600004F076FED4F88000017E284604F05BFE5F +:1043700094F8A4102846BDE8704004F05EBE04F036 +:104380007BFD0321284604F07AFD94F87A10284634 +:1043900004F0ADFD04F174012846BDE8704004F05E +:1043A00091BD0000000F00202DE9F047744E054636 +:1043B00084B096F800040C46DFF8C8A140099AF8CA +:1043C00000144909884218BFFFDF96F8000440092D +:1043D0006D4991F800144909884218BFFFDFDFF8E2 +:1043E000AC816E1E08F13809002709EB4505092C40 +:1043F00080F0C280DFE804F005323C3C37C0C0C02A +:1044000070000B2EA8BFFFDF35F8020C0621F9F76C +:1044100014FB040008BFFFDF0B2EA8BFFFDF35F839 +:10442000020C2188884218BFFFDF94F8980000280A +:1044300008BFFFDFC8F8047088F80170C8F80C7076 +:10444000606AB0F5717F88BFA0F237372046C8F8A0 +:10445000087004B0BDE8F04702F0D5B904B0BDE87B +:10446000F04702F02CBA04B0BDE8F047FEF7FAB806 +:104470009AF8140D4649400991F8001449098842F8 +:1044800018BFFFDF0B2EA8BFFFDF35F8020C062197 +:10449000F9F7D3FA040008BFFFDF0B2EA8BFFFDF38 +:1044A00035F8020C2188884218BFFFDF204602F051 +:1044B000BCFA002818BFFFDF00222146684600F042 +:1044C000EAFC94F8A2006946FBF7BEFD208E401C72 +:1044D000208604B0BDE8F0870B2EA8BFFFDF35F8BB +:1044E000020C0621F9F7A9FA040008BFFFDF0B2E22 +:1044F000A8BFFFDF35F8020C2188884218BFFFDF14 +:1045000094F89800042818BFFFDF84F8987094F896 +:10451000A2504FF6FF76681E0B28A8BFFFDF09EBFD +:10452000450020F8026C94F8A200FBF727F984F804 +:10453000A270D4F8A800002804BFD4F8A400C8F8DA +:10454000100008D0D4E92B12114482691144816112 +:10455000D4E92901C860D4F8A400002819BFD4F810 +:10456000A8100161D4F8A80087610A48007804B057 +:10457000BDE8F047F5F724B8FFDF04B0BDE8F087E9 +:1045800001E000E00BE000E018E000E0081000208F +:1045900019E000E0B80000202DE9F047FD4E074685 +:1045A0000024F08B401C80B2F0833278A046002AB1 +:1045B00008BFFFDF09D0F74B042AA3F114095D6897 +:1045C00013D0052A18BFFFDF44D021463069FBF71E +:1045D000ADFB306187F8008001213971B860B068A7 +:1045E00000F22710F860BDE8F0870A282CBF0220EF +:1045F0000320787100297BD0D6F810A0D9F810409C +:1046000034B3A146E468002CFBD1B9F1000F1FD0F0 +:1046100099F80000002808BFFFDFD9F81410D9F876 +:10462000040001445046FCF707FB002807DA291A6A +:104630004A1E92FBF5F202FB0504294604E090FBBA +:10464000F5F202FB150429468C4288BFFFDFBCE768 +:104650004446BAE702207871002953D0D6F818A052 +:10466000BAF1000F08BFFFDF0025DAF8AC20D9F857 +:1046700010402846691E5CB1A069904228BF814263 +:1046800084BF014625462046E468002CF4D105B9D4 +:1046900005460AF19804CAF8A850002D04BFC4F8D2 +:1046A0000C80C9F8104005D0E868EC60E060002894 +:1046B00018BF0461D4F81090C4F81880B9F1000F45 +:1046C0000ED0D9F8180048B1D4F814A0504538BF1E +:1046D000FFDFD9F81800A0EB0A00A061C9F8188024 +:1046E000002D08BFC6F8208009D02878002800E0F7 +:1046F00008E008BFFFDF696968680844306240F677 +:10470000B83462E72C4660E72DE9F041A24C8046C0 +:1047100084B094F800040E46A04F410997F80004B5 +:104720004009814218BFFFDF94F8000440099C490A +:1047300091F800144909884218BFFFDF00250122C3 +:10474000092E944C5ED2DFE806F0051B3636315D4B +:104750005D184C0062732273607800281CBF04B09F +:10476000BDE8F0818F484560C5602573A068CD38ED +:10477000FFF76EF8002818BFFFDF04B0BDE8F08136 +:10478000607850B1207B002808BFFFF793F965736C +:1047900004B0BDE8F041FAF738BFA273FFF7F2F8B2 +:1047A000002818BFFFDF04B0BDE8F08104B0BDE809 +:1047B000F041FDF757BF97F8140D7B49400991F878 +:1047C00000144909884218BFFFDF01220021684612 +:1047D000FFF7E2FE69464046FBF736FC04B0BDE851 +:1047E000F0812078052818BFFFDF207F002808BF50 +:1047F000FFDF25772570207DFAF7C0FF257504B00F +:10480000BDE8F081FFDF04B0BDE8F0812DE9F041A3 +:10481000604C84B00025207804281FBF207805282C +:104820000C2004B018BFBDE8F08101276770607BE1 +:10483000002690B172B6607B00281CBFA07B0028C8 +:1048400005D0FFF737F96673A673FAF7DEFE62B696 +:10485000207DFCF77BFAD0B913E094F81480032094 +:104860008DF804008DF80500FAF79EFF02904FF0D6 +:10487000FF3003908DF8007069464046FBF7E4FB7B +:10488000E6E720BF207DFCF761FA0028F9D0207F01 +:1048900028B126772078052818BFFFDF0C25667021 +:1048A0002670207DFAF76AFF267504B02846BDE819 +:1048B000F0812DE9F047374884B00078002818BF10 +:1048C000FFF7A4FF0120374E307069460620F9F744 +:1048D00040F8002818BFFFDF00254FF6FF7718E0EB +:1048E000029800281CBF90F89810002911D0008869 +:1048F000B84218BFDFF8B48045D00621F9F79DF81B +:10490000040008BFFFDF94F8A200FCF71FFA68B9A3 +:1049100005E06846F8F7FBFF0028E1D033E020BF50 +:1049200094F8A200FCF712FA0028F8D084F8985006 +:1049300094F8A2904FF6FF7AA9F101000B28A8BFC6 +:10494000FFDF08EB490020F802AC94F8A200FAF768 +:1049500015FF84F8A25069460620F8F7FAFF0028F0 +:1049600018BFFFDF0AE0029800281CBF90F89810DB +:10497000002903D00088B842BFD104E06846F8F7A8 +:10498000C6FF0028EFD03570356104B00020BDE8C7 +:10499000F08700001C10002001E000E00BE000E0C8 +:1049A00018E000E00810002019E000E040100020AE +:1049B00010B50078FE4C60B101280CBF40F6C41061 +:1049C000FFDF06D0A06841F66A01884228BFFFDFFA +:1049D00010BDA060F6E710B5F54C00232070F54837 +:1049E00003704370037703734373837383610375A9 +:1049F00024304FF6FF7101800522418020F8041F0A +:104A0000521EFAD1180008BFA36005D0002B0EBFBC +:104A1000FFDF40F6C410A060A06841F66A0188423A +:104A200028BFFFDFBDE8104043E770B5E14C0E46FC +:104A300084B02178154600291EBF0C2004B070BD3B +:104A4000416A01F29731C0F8AC10A06190F898006B +:104A5000002818BFFFDF40F2712006FB00F1684319 +:104A60000A30C4E90110A1F53D71884288BF0846AB +:104A7000A060D1490020C8600521217060702077B6 +:104A8000E083CE48FAF72BFE2075002808BFFFDF31 +:104A9000FAF78AFE2061002201216846FFF77CFDBB +:104AA000207D6946FBF7D0FA04B0002070BD884233 +:104AB00034BF012200220244D2B2814234BF01201D +:104AC00000200844C1B28A4234BF08461046831A07 +:104AD000A0EB010C114401EBC102634402EB411154 +:104AE00003EB83031B0100EB400203EBC10102EB6C +:104AF000001201EBC201C0EBC00202EB401001EB5F +:104B00008000983870474FF44B72B1F54B7F38BF37 +:104B1000114641627047A748007800281CBF00205A +:104B2000704710B50620F8F725FF80F0010010BD92 +:104B300010B5A04C84B02278002A1EBF0C2004B00F +:104B400010BD40F27122424340F2712048430A30C6 +:104B5000C4E90120A2F53D71884298BF01460020BA +:104B6000A160607004212170E0839448FAF7B7FDDA +:104B70002075002808BFFFDFFAF716FE40F6B831AF +:104B8000FBF7D4F82061002201216846FFF704FDFD +:104B9000207D6946FBF758FA04B0002010BD70B5BF +:104BA000844CA1690160FFF731FE002308B1A361C5 +:104BB00070BDA169D1F8A8205AB1D1E92BC5AC4488 +:104BC0009569AC44C2F818C0D1E9292CCCF80C2066 +:104BD00005E0DFF8E4C1D1F8A420CCF81020D1F82A +:104BE000A420D1F8A810002A14BF11618B61DEE760 +:104BF000714910B54968002801F1980408BF04F50F +:104C0000BC7409D0012808BF04F5317404D002280F +:104C100014BFFFDF04F5B07466488068A0428CBF03 +:104C20000120002010BD6448D0E90112914204D255 +:104C30000078002804BF012070470020704730B57D +:104C40005B4D85B0042221B3012908BF03211CD08C +:104C5000022908BF80F8982023D003291EBFFFDF58 +:104C600005B030BD418840F2E2425143544A1160E0 +:104C7000D0F8BC100A89C2828A7902754A894280BA +:104C80008A898280C989C180022180F8981005B084 +:104C900030BD044648480078002818BF84F89820A2 +:104CA00007D0FAF7B2FC287805B0BDE83040F4F739 +:104CB00087BC01222146684600F0EDF894F8A20076 +:104CC0006946FBF7C1F9208E401C2086E9E72DE9F3 +:104CD000F041374F0100374C387884B04FF0000571 +:104CE0000ED001291CD0022976D003291EBFFFDF78 +:104CF00004B0BDE8F08104B0BDE8F041F4F760BC59 +:104D0000E583F4F75DFC6078002875D10022114638 +:104D10006846FFF741FC207D6946FBF795F96BE09B +:104D2000DFF89480206940F2E243D8F80410084488 +:104D3000A16900F251604A88983102FB03F5D8F866 +:104D400010208A4208BF002614D0216AFBF774FFA6 +:104D5000002807DA291A4A1E92FBF5F202FB050623 +:104D6000294604E090FBF5F202FB150629468E4227 +:104D700088BFFFDFB868864208D2A06940F271227E +:104D80004188C1824A4306EB420605E040F2E24018 +:104D9000B6FBF0F0A169C882A06905210175C08A3F +:104DA0006FF41C71484306EB400040F635410AE0C1 +:104DB000B80000201C100020081000200947010046 +:104DC000BC00002008E0C8F80C00B0EB410F28BF81 +:104DD000FFDF04B0BDE8F081E583F4F7F1FB0120CB +:104DE0002077A0692169C0F89C1080F8985021783C +:104DF000052918BFFFDF06D0FAF707FC6573A57316 +:104E000004B0BDE8F081002808BFFFDFA06990F87A +:104E10009800002818BFFFDFA06990F8A2000028C2 +:104E200018BFFFDF5B48FAF75AFCA169064681F814 +:104E3000A2000F88401E0B28A8BFFFDF564800EBDA +:104E4000460020F8027CA06990F8A200002808BF64 +:104E5000FFDF01226846A16900F01DF8A0696946DC +:104E600090F8A200FBF7F0F8A561C5E7704700B520 +:104E70004A4A59B1012908BF401E07D002291CBF68 +:104E8000FFDF00BD5178491C5170C01F506000BD4C +:104E90004348007870472DE9F05F06460C46488885 +:104EA00040F2E24141439046E08A40F2E24200FB98 +:104EB00002FA94F898200025384F4FF0030B4FF07A +:104EC000010952B13846012A40682DD0022A16D075 +:104ED000032A18BFFFDF27D036E0B8F1000F08BF64 +:104EE000FFDF7868002808BFFFDF7868F968C01D19 +:104EF00008440AF25D41451884F8989023E0A8F12F +:104F00000101084308BFFFDF2648B8F1000F006821 +:104F100000EB0A0505D0786800F20F30A84288BF80 +:104F2000FFDF84F898B00EE00D46B8F1000F0AD00C +:104F300018B97878002818BFFFDF786800F20F30C2 +:104F4000A84288BFFFDF05B9FFDF2946D4F89C00DF +:104F5000FAF7ECFEC4F89C000020307086F804904C +:104F6000D4F89C00B060204601F095FD002818BFE1 +:104F700086F8059005D0606A00F5E570F060BDE840 +:104F8000F09F94F89800012806BF0220707186F8FF +:104F900005B0F0E7A94301004010002008100020F0 +:104FA0001C100020BC000020FE48C07E7047FE4858 +:104FB00040687047FD48C07E7047884234BF012278 +:104FC00000220244D2B2814234BF012000200844B2 +:104FD000C1B28A4234BF08461046831AA0EB010CC6 +:104FE000114401EBC102634402EB411103EB830363 +:104FF0001B0100EB400203EBC10102EB001201EBCD +:10500000C201C0EBC00202EB401001EB80009C38F3 +:1050100070474FF44A72B1F54A7F38BF114641627A +:1050200070472DE9FF4FDF4E83B08846706A3468C1 +:105030005FEA03090568D4F804B0306A0190298E4C +:105040000598A0EB010080B2009019BF04F1380769 +:1050500004F1480A371D05F1A80A032038710398A6 +:10506000002832D0012800F0DF8002287DD00328FC +:1050700018BFFFDF00F00C81B9F1000F1EBF3879B7 +:105080000328FFDFA16A7069FAF750FEB860D4E91F +:10509000081081428EBFCAF800000846CAF8001006 +:1050A000696A084400F24F10F860B5F89810059846 +:1050B000081A00B2002840F349810398022818BF5B +:1050C000032040F0448100F041B9306A002808BF55 +:1050D000FFDFE98A40F27120484340F2E24101EBF0 +:1050E00040010020B8F1000F06D0B14808FB01F1E3 +:1050F000B1FBF0F000F10100A061698840F2E242EA +:1051000001FB02F24FF0000106D0A94908FB02F2B0 +:10511000B2FBF1F101F10101E161316A40F2712369 +:1051200001F10101A162EA8A02FB03F2C0EB420233 +:1051300002F237421144A1622A7D40F2E24312FB9F +:1051400003F202EB400000F2151020626062306A48 +:10515000A1EB00009749A0F1010009188CD2B0F52D +:10516000387F98BFFFDF5CE0FFE7E98A40F27122F9 +:10517000E068514300EB41010020B8F1000F06D078 +:105180008B4808FB01F1B1FBF0F000F10100A061D8 +:10519000688840F2E24100FB01F14FF0000006D0C8 +:1051A000834808FB01F1B1FBF0F000F10100E06180 +:1051B000306A002808BFFFDFB5F8AE00E98A002892 +:1051C00040F27122E06801FB02F100EB4100A169AD +:1051D000A0EB010003D13168D33849680844A062CC +:1051E0002269A168A06901FB0200297D40F2E24228 +:1051F00011FB02F101EB400000F2131020626988FC +:105200005210E0695143C0EB4100A0F54770606265 +:10521000A06A316A401AA0F5AA7167484018BFF425 +:105220002BAF0120387127E7B5F8AE00002808BF82 +:10523000FFDF306A002808BFFFDF698840F2712273 +:10524000E0695143C0EB4101A162B5F8AE3022697B +:10525000D4F818C0D4F808809B1A08FB02C203FBDC +:1052600000202A7D40F2E24312FB03F202EB4000F1 +:1052700000F213102062A1F547706062306A081ACC +:10528000A0F5AA714C484018BFF4F6AEC9E700BFBC +:10529000B9F1000F1CBF94F83400002803D007B008 +:1052A0000220BDE8F08F698840F27122E069514325 +:1052B000C0EB410100984843A062B5F8AE0030B39E +:1052C000BBF1000F18BFFFDFB5F8AE100098002249 +:1052D0000844E169484302EB400000F213102062E9 +:1052E000688840F271225043C1EB4000A0F547703E +:1052F000606232484068B0B1A26A01990120511A37 +:10530000A1F5AA722C49891838BF3871B4E6BBF1EF +:10531000000F1ABF01980028FFDFABF1D301A06A8C +:105320000844A062D0E7FAF73FFA726901461046D6 +:10533000FBF782FCA16A081AA0F24F111E48401820 +:105340003EBF012007B0BDE8F08F95E600207871E0 +:105350001098C8B1B5F8C01000290CBF0020B5F8EE +:10536000C200A5F8C20095F8C420401C50438842F2 +:105370000AD27879401E002806DD01207871B5F840 +:10538000C200401CA5F8C20087F80090B9F1000FD8 +:105390001CBF94F83400002881D189F0010084F802 +:1053A00035000DE058100020DC00002080100020A7 +:1053B00040420F00DBF7FFFFF4F8FFFFCC000020B6 +:1053C000307FF27E3946B37E9A4202D0FAF73CFE35 +:1053D00004E00020F076B0763060706207B0002004 +:1053E000BDE8F08F70B5FD4D0929D5E900326FD2C7 +:1053F000DFE801F0055B73816F9494589000002002 +:105400001062D17E04294ED2DFE801F04D4D0245F5 +:10541000516A0C681168087011684860106890F84B +:10542000350040B9FAF7C0F969680968096CFBF7FB +:1054300003FC002818DC686801684A8E218E8A42C5 +:1054400006D1B4F89C20511AA4F89E10228605E0DB +:10545000511AA4F89E100168498E21860268C1681D +:105460001164C168416111E068680168098E228E8B +:10547000891AA4F89E100168098E218601680A6CB9 +:10548000C2600A6C4261886CC4F8A8002046BDE87E +:10549000704002F01DBAD0685061FDF7ABFC0028E7 +:1054A00018BFFFDF70BDFFDF70BDD07E04280DD2B6 +:1054B000DFE800F00C0C0206BDE8704002F0D8BA3C +:1054C000FDF7D9FD002818BFFFDF70BDFFDF70BDFD +:1054D00024E0BDE87040FDF7C5B8D87E022804D0AE +:1054E000D87E032818BFFFDF0CE0BD48007D0128EF +:1054F00008BFFFDF0AE0D87E022807D0D87E032845 +:1055000018BFFFDFBDE8704000F0B5BBBDE87040DC +:1055100000F0FCBBBDE87040FAF730B9FFDF70BDAA +:105520002DE9F047AD4D0024AE4E82460F464FF0B8 +:10553000010809294ED2DFE801F0053B46463B4D04 +:105540004D4646006868DFF89C92002818BFFFDFD0 +:1055500039465046C5F80490FFF744FFF07E022814 +:1055600018BFBDE8F08768680568406A0768FAF701 +:10557000FEF87A8840F27123E9695A43C1EB42018F +:10558000AB39B72898BFB72000F54A70081A796A76 +:10559000A0F20130B1F5717F88BFA1F5717484422A +:1055A00038BF2046E862306880F83480BDE8F08774 +:1055B0005046FFF717FFF07E022804BF306880F8DE +:1055C0003480BDE8F08750462E60FFF70BFF2C605B +:1055D000BDE8F087FFDFBDE8F0872DE9F0417F4CA3 +:1055E00007460D4609291ED2DFE801F00510141404 +:1055F000101D1D14140060687B4E002818BFFFDFCB +:10560000294638466660BDE8F041EBE63846BDE81D +:10561000F041E7E6744820603846FFF7E3FE0020DB +:105620002060BDE8F081FFDFBDE8F081F0B56D4995 +:1056300085B00026CA7E694C032A03D02831CA7E71 +:10564000032A64D10025216000B3012806BF03208E +:105650008876FFDF0AD02068002E0560456225604D +:1056600055D06248456005B00020F0BD2068C17E7D +:1056700029B1C17E827E914208BF20BFF6D0C17E93 +:1056800000290CBF012600268576E4E700260327C3 +:1056900008468F76C97E032904D0C07E002808BF43 +:1056A000012631E00120FDF705FD2068007F00287C +:1056B00008BFFFDF2068067F8DF804708DF8057045 +:1056C000FAF772F802904FF4FA70039001208DF807 +:1056D000000069463046FAF7B7FC2068007FFBF708 +:1056E00035FB30B920BF2068007FFBF72FFB002877 +:1056F000F8D02068007FFAF741F820680577C57672 +:10570000857605600126456220688576A3E705B0A9 +:105710000C20F0BD10B5334800F076FB324800F0A5 +:1057200073FB2F4900200875304948702D494861A6 +:1057300001F1280250618876907628494860086017 +:1057400010BD2DE9F0412A4C064694F80004294D7D +:10575000400995F800144909884218BFFFDF94F802 +:1057600000044009244991F800144909884218BFEF +:10577000FFDF95F8140D4009204991F800144909FC +:10578000884218BFFFDF1E48164D00240670EC76D5 +:10579000AC7605F12806F476B4761030012101715B +:1057A00004606C6274622C6000F108073460284663 +:1057B0007C6000F029FB05F1280000F025FB05F1D5 +:1057C000500004757C706C617461AC76B476A7F19E +:1057D000100044600460BDE8F0810000CC000020AF +:1057E000A81000205810002080100020DC000020AD +:1057F00001E000E00BE000E018E000E019E000E06C +:10580000C4000020F849087170472DE9F843F749B2 +:105810000546CA7EF64C01F12800002A04BFC27E6C +:10582000002A73D0C97E022907BFC17E00290C203F +:10583000BDE8F8832060EF48F9F751FF2168087749 +:10584000ED4845602168086014384862ADB1012117 +:1058500005F1C400FBF762FD0620F8F799F806464B +:105860000720F8F795F895F8C4103044B1FBF0F232 +:1058700000FB1210401C85F8C4002068007F00283F +:1058800008BFFFDFF9F773FFDC49091838BF40F2A2 +:10589000F65000F26B1087B220680326C676FDF73B +:1058A000B2F921680861FDF7D2F94FF0010800252F +:1058B00058B3FDF7CCF921684A6A106008680121E5 +:1058C00080F800806846FBF7B4FC9DF8000042F2C7 +:1058D00010710002B0FBF1F201FB1208F9F764FF4E +:1058E00007EB0801FAF722FA2168C86022681672ED +:1058F00056721571107FD37E111D92F81AC0634540 +:1059000018D0FAF7A1FB19E000E006E0BC482160DE +:10591000F9F7E5FE2168087792E7F9F745FF394680 +:10592000FAF704FA2168C86008680570086880F80A +:105930000180DBE7D5769576156055622068058392 +:105940000020FDF7B7FB00202560BDE8F883704715 +:10595000F8B5A64EF17E19B906F12801C97E09B144 +:105960000C20F8BD0221F1769F4FA64D776235607D +:10597000002438602C750094A3493A7990F8CC0043 +:10598000234631F8122031F81000104481B222462B +:105990002046FFF746FB002818BFFFDF2C610120DF +:1059A000AC6028756C862C8685F836403868018E88 +:1059B000491E018634830020F8BD8D4810B540682B +:1059C0000124817E032908BF002409D00168497899 +:1059D00031B1006A8D49884284BF0024FDF766FB1F +:1059E000204610BD8248406801680A78521C0A703F +:1059F000016A0068C26A914204D8007D01281CBF78 +:105A000001207047002070472DE9F843784C774813 +:105A100000262060416A00680D6880F8346095F8BF +:105A2000A610002904BF007D032850D1F9F7BCFE61 +:105A30002268526901461046FBF7FEF8002846DD51 +:105A4000216840F271274A6A13680A685B88D2F8B5 +:105A50001CC07B43CCEB4303B0FBF3F02B8E401C0C +:105A6000184410860A68B5F89C00118E401A00B2DE +:105A700000282CDD012082F83600B5F84E00B5F87C +:105A80004C10DFF88481401A298E401E084487B2EA +:105A900016E0496A097938F811100096028E95F8D7 +:105AA000CC30007D38F81330194489B20123FFF758 +:105AB000B8FA60B101280DD0022818BFFFDF06D068 +:105AC00021680868028EBA1A12B2002AE1DA26604A +:105AD000BDE8F88320680068018E491C0186EFE765 +:105AE00070B5434E00240628756843D2DFE800F005 +:105AF0001820030E240D002000F0C3F9EC76AC76DC +:105B00002C606C62706888B1746070BD4048356804 +:105B10000078F3F755FDEC76AC762C606C6270BDC6 +:105B2000012000F0AEF970680028EDD1FFDFEBE74F +:105B300029680320087570BD686A29680068CA6909 +:105B40008A60418840F2E24251432A68D160B0F84D +:105B5000E810C18290F8E6100175B0F8EA104180B3 +:105B6000B0F8EC108180B0F8EE10C18029680220F6 +:105B7000087570BDFFDF70BD70B51D4D002470B19C +:105B8000012812D002281CBFFFDF70BD00F0D5F93C +:105B90006868C47684760460446220B93BE000F013 +:105BA000CCF96868B0B36C6070BD686801684C700F +:105BB000C4768476104E046044620021706802F05E +:105BC000EDFE706880F8E24080F8E340FFF7C0FE29 +:105BD000002818BFFFDFF9F718FD0D486C6000784A +:105BE000F3F7EEFC6C6070BDD4000020581000206C +:105BF000CC000020DB550100DC0000200AFAFFFF8A +:105C000021550100A810002052B50100CF821300D9 +:105C1000C4000020FFE7FFDFC5E7E7494968CA7E07 +:105C2000022A18BF70470A681378002B18BF704704 +:105C300050600968CA6A10442838C8627047DE4A52 +:105C400000B5526841B1012908BF401E04D00229A5 +:105C500016BFFFDFC01F00BD106200BDD748C07E69 +:105C600000281CBF0020704710B50720F7F782FE00 +:105C700080F0010010BD38B5CF4C2068016849782C +:105C8000012932D001216846FBF7D3FA9DF80000C4 +:105C900042F210710002B0FBF1F201FB1201206828 +:105CA000426AC06812681144FAF740F82168C86077 +:105CB000C249226803208A4205D0118B0A2924BFD9 +:105CC0000221517203D2118B491C11835072107240 +:105CD00000231371107F92F81BC0111D947EA44500 +:105CE0000FD0BDE83840FAF7AFB9C0684FF47A7109 +:105CF000FAF71CF82168C860FCF785FF2168086185 +:105D0000D6E7D37693761360536238BD2DE9F84316 +:105D1000A94E3068416A04680D6894F8351031B1B5 +:105D2000618E2A8E914202BF407A0028FFDFF9F788 +:105D30003BFD3268526901461046FAF77DFF336831 +:105D40004FF000090028596A096808BF48460AD080 +:105D50001A68498840F2712CD26901FB0CF1C2EB40 +:105D60004101B0FBF1F02A8E618E02EB000C61451F +:105D7000AEBF481C401C1044608694F8360030B911 +:105D8000608EB5F89C10884204BF401C6086188B5A +:105D90008B4F401C1883B5F84E00B5F84C10401AD4 +:105DA000298E401E08441FFA80F818E03068406AC7 +:105DB000007937F81000CDF8009095F8CC1037F83E +:105DC0001110084481B2207D0023FFF72AF9002832 +:105DD00008BFBDE8F883012818BFFFDF10D0628E2E +:105DE000A8EB020000B20028E0DA082085F84A009B +:105DF000012085F849002846BDE8F84301F037BA8C +:105E0000608E401C6086EAE72DE9F047DFF8B48138 +:105E1000694C05464FF01F090027EE7E042E23D261 +:105E2000DFE806F02922021D454518BFFFDF0220EA +:105E30002560A8762168C87E28B1C87E8A7E9042F7 +:105E400008BF20BFF6D0C87E8F7600281CBF4FF059 +:105E50000C0927600CD10F604F6227600BE0012016 +:105E6000FFF7E4FB814600E0FFDFB9F1000F02D04D +:105E7000E87EB042D1D1E87E002818BFFFDFBDE840 +:105E8000F087F8B54C4D002601286A68516A0C6805 +:105E900044D108794A4B33F81010106890F814C0B8 +:105EA0000127BCF1030F06D0027D022A12D0007D2B +:105EB000012823D032E0066110688660009794F8CC +:105EC000CC00B4F89C2033F810000023084481B2C1 +:105ED00003201EE0B4F8AE200261009794F8CC00D5 +:105EE000B4F89C2033F810000023084481B202204B +:105EF000FFF797F8696809680F750CE0009794F848 +:105F0000CC00B4F89C2033F810000023084481B280 +:105F10000120FFF786F8002818BFFFDFF9F775FBAF +:105F200029480078F3F74CFB686806830268218EE5 +:105F30005186006880F83660F8BD38B51E4C0020E8 +:105F40000546616809684A78002A18BF4D702AD151 +:105F5000097861B101216846FBF78FF99DF80000CF +:105F600042F210710002B0FBF1F201FB1200626814 +:105F7000516A09680144D068F9F7D8FE6268D060B8 +:105F8000157103205072107FD37E111D92F81AC034 +:105F9000634502D0FAF758F803E0D5769576156098 +:105FA000556260680583F9F730FB07480078BDE863 +:105FB0003840F3F705BB0000CC0000208010002023 +:105FC00052B5010058100020C400002010B584B064 +:105FD00004466846FCF71BFD002808BFFFDF009859 +:105FE00003F09DF80321009803F0B3F800980178BE +:105FF00021F010010170214603F00EF90D2C7CD226 +:10600000DFE804F03122075CABABAC159AABACAC6B +:106010008100FE48806890F8B510009803F07BF985 +:10602000FCF708FD00281CBF04B010BD81E0F74854 +:10603000806890F89110009803F0BDF9FCF7FAFC25 +:10604000002808BFFFDFA6E0F0488068D0F8C00055 +:10605000411C009803F050F9FCF7ECFC00281CBF31 +:1060600004B010BD65E0E94CA068D0F8BC008179AF +:10607000009803F015F9A068D0F8BC0001890098D9 +:1060800003F007F9A068D0F8BC004189009803F03C +:10609000EBF8A068D0F8BC008189009803F0EBF819 +:1060A000A068D0F8BC00C189009803F0EBF8FCF7B9 +:1060B000C1FC00281CBF04B010BD3AE0D34CA0685E +:1060C000D0F8BC00011D009803F029F9A068D0F8B1 +:1060D000BC0000F10C01009803F02BF9A068D0F887 +:1060E000BC0000F11E01009803F029F9A06800F13E +:1060F0008801009803F031F900E02EE0FCF79AFCEB +:1061000000283CD145E0C14C60690178009803F05B +:106110003CF960698188009803F039F96069418829 +:10612000009803F038F9FCF785FC00281CBF04B088 +:1061300010BDFFDF04B010BD0020029003909DF859 +:10614000080002A940F001008DF80800009803F053 +:1061500034F9FCF76FFC90B91BE0FFDFFCF76AFC39 +:10616000002808BFFFDF0C2C04BF04B010BD072CB3 +:1061700011D0012C19BF002C022C04B010BD00213D +:10618000A2488068A0F85210012180F8561004B08F +:1061900010BDFFDFF3E79D4900208968A1F8580092 +:1061A00004B010BD2DE9F843984D04464FF00006A9 +:1061B0006878084368702846A988806811F0200F25 +:1061C00018BFA0F84C6004D1B0F84C20521CA0F8C5 +:1061D0004C2011F0600F4FF0010707D090F83E10EF +:1061E00021B980F83E700121FEF729FD4FF0080823 +:1061F000002C40F018826878002840F01681287939 +:1062000010F0040F0DD0A86890F83B00052808BFD7 +:10621000FFDFA86890F83D10022904BF2F7080F8B6 +:106220003D60287910F0020F00F0CD8068780028DA +:1062300040F0C980E868C0780D2880F0C380DFE8AE +:1062400000F04333076FC1C1851823C15264900029 +:10625000A8680023012190F83D20303002F0C3FDF2 +:1062600000283FD1A868032180F83D1080F85660CF +:106270008DE0A8680023194690F83C20303002F0E9 +:10628000B2FD00287ED19EE0A8680023194690F850 +:106290003B20303002F0A7FD002808BFFFDF0920B7 +:1062A000A96881F83B008EE0A8680023194690F8A1 +:1062B0003B20303002F097FD002808BFFFDF0720A9 +:1062C000A96881F83B007EE0A8680023194690F891 +:1062D0003B20303002F087FD002808BFFFDFA868B0 +:1062E00080F83B806FE0A8680023194690F83B20B7 +:1062F000303002F078FD002808BFFFDFA8680A21CF +:1063000080F85B7080F83B105DE0A86890F83B0077 +:106310000D2818BFFFDFA8680C2180F85C7012E020 +:10632000A8680023194690F83B20303002F05BFD4E +:1063300028B9A86890F85C00002808BFFFDFA868AB +:106340000E2180F85B7080F83B103CE0A86890F864 +:106350003B00132818BFFFDF1520A96881F83B0018 +:1063600031E0A868D0F8BC1003884A889A4204BF7C +:10637000097804290ED0A8680023194690F83C201B +:10638000303000E002E002F02EFDE0B1A86880F8B5 +:106390005A6018E090F83B2000231946303002F094 +:1063A00022FD002808BFFFDFA86890F85E1011F0FA +:1063B000020F0FBF80F83B7080F85660D0F8BC0029 +:1063C0000670D8E7FFDF287910F0080F0AD0687848 +:1063D00040B9A86890F83D10032903D10221297023 +:1063E00080F83D6000F0E2FBA87810F0080F19D0AB +:1063F000A8680023052190F83B20303002F0F3FC20 +:1064000070B185F80180A86802E00000E400002077 +:10641000D0F8D01008780B2808BF0020087001E0E1 +:1064200002F029F8A86800F046FB6846FCF7EFFA8E +:10643000002800F0F8806878002840F0F480A86810 +:106440000023012190F83D20303002F0CCFC0028E0 +:1064500040F0E980A86890F8B410002918BF022025 +:1064600026D190F83B200C2A0ED00D2A08BF0B2015 +:106470001ED0132A08BF06201AD000230421303072 +:1064800002F0B1FCB8B1CEE0FAF7F6FE0C284DD31D +:10649000A8680821D0F8BC001E30FAF7EEFE28B13B +:1064A000A86804218830FAF7E8FE00B9FFDF03206E +:1064B000FFF78CFDB7E0A86890F83C10012927D0C1 +:1064C000052920D0D0F8BC100A7882B34988028808 +:1064D000914261D190F83B2000231946303002F000 +:1064E00082FC20B3A868D0F8BC100978022908BF44 +:1064F000002026D003291BD004293AD0052908BF43 +:1065000008201ED048E00720FFF760FDA8680BE0D8 +:106510000C20FFF75BFDA868A0F8586090F85E10AB +:1065200041F0010180F85E1080F83C607BE033E0D0 +:1065300090F83F1041B190F84000002808BFFFDFFD +:106540000A20FFF743FD27E0FAF796FE0C2823D335 +:10655000A8680821D0F8BC001E30FAF78EFE28B1DA +:10656000A86804218830FAF788FE00B9FFDF03200D +:10657000E7E790F85E0010F0030F0DD10C20FFF755 +:1065800025FDA868A0F8526080F8567090F85E105B +:1065900041F0010180F85E106846FCF738FAE0B37C +:1065A000A8680023194690F83B20303002F01BFC0D +:1065B00098B3A86890F8C41079B3A969097861BB49 +:1065C000018E0A292FD900F108010522E86904F09B +:1065D00005FC0028A86808BF80F8C46023D0D0F864 +:1065E000C000017851B1411C0522E86904F0F6FBB6 +:1065F00098B9A868D0F8C000007830B9A868E969EF +:10660000D0F8C000401C04F0D4FDA868D0F8C00049 +:106610000178491C0170012000E004E0FFF7D6FC7E +:10662000A86880F8C460A868A14600F1300490F81A +:10663000B40030B9627B00230121204602F0D3FB75 +:1066400010B1208C401C20843D21B9F1000F18D1DD +:106650002878022808BF16200ED0012804BFA86899 +:1066600090F8B60008D06878B0B110F0140F1CBFD5 +:106670001E20A07602D005E0A07603E010F0080FFF +:1066800002D0A17667763AE010F0030F08BFFFDF73 +:106690002A20A076677632E094F8260028B1608C34 +:1066A000411C6184A18C884213D294F82A0028B13D +:1066B000208D411C2185A18C88420AD2208CE18B3F +:1066C000884203D3AA6892F8B42012B9A28C9042EF +:1066D00003D32220A076677611E0A07B0028A08B50 +:1066E00005D0884228BF84F81A80CBD205E006285E +:1066F00003D33E20A076677601E0607E40B1E6726B +:106700002673A673A868BDE8F8430221FEF797BA7E +:10671000A868BDE8F8430021FEF791BAFE494A781F +:106720008B781A430ED101280AD0087910F0040F93 +:1067300004D0886890F83D00022803D001207047FB +:10674000FEF771BA0020704770B5F34C05460E464F +:10675000A0882843A08015F0020F04D015F0010F87 +:1067600018BFFFDFE66015F0010F18BF266115F0B6 +:10677000020F13D0304602F075FD062802D00B2818 +:1067800030D00BE0A06890F83B10132906D100210F +:10679000C0E91C115FF0010180F8401015F0800F76 +:1067A0001CBF0820A07015F4806F08BF70BDA168E1 +:1067B000088E89880844801D85B2304602F052FD5B +:1067C000012817D0304602F04DFD002818BF70BDDB +:1067D000A0682946D0F8BC0085803046BDE87040EE +:1067E00002F062BDA06890F83B100D2908BF00219F +:1067F000D4D1D1E7A0682946A0F8C6503046BDE8FC +:10680000704002F081BDF8B5C34C00260546A0607B +:10681000A6806670A67026700088FCF7F5F8A06860 +:106820000088FCF717F9B5F8A000A168401C82B2F7 +:1068300001F1300002F0FDF9002818BFFFDFA5F8D4 +:10684000A060A06890F8561031B1B0F85210B0F8BE +:106850005420914228BFF8BD90F85A1031B1B0F8D9 +:106860005810B0F85420914228BFF8BDB0F850201D +:10687000B0F84E108A4228BFF8BD90F83E20B0F81C +:106880004C00CAB1884228BFF8BDA4480090A44B70 +:10689000A44A2946304601F066FCA0680023052181 +:1068A00090F83B20303002F09EFA002808BFF8BD77 +:1068B000BDE8F84001F053BC0628E6D3F8BD964881 +:1068C000806890F8561029B1B0F85210B0F85420F2 +:1068D000914219D290F85A1029B1B0F85810B0F876 +:1068E0005420914210D2B0F85020B0F84E108A4295 +:1068F0000AD290F83E20B0F84C001AB1884203D278 +:1069000001F08BBD0628FBD3002001464AE42DE9A7 +:10691000F0410C4607461D461646D8212046DDF8B4 +:10692000188004F020FB2780C4F8D080C4E92F65CC +:10693000BDE8F081F7F7A4B970B50C4615460621FD +:10694000F7F77BF8002808BF70BDD0F8D0100A78A0 +:106950000021072A1ED00C2A2FD00B2A3BD0062A52 +:1069600049D090F8C820002A04BF002070BD617093 +:106970001222227090F8C82052B100BF80F8C810CF +:10698000D0F8CA20C4F8022090F8C820002AF5D117 +:10699000012070BD002DFBD1617007222270D0F85C +:1069A000D0205368C4F802309368C4F80630928946 +:1069B0006281D0F8D0000170EAE7002DE8D1617063 +:1069C0000C222270D0F8D0205268C4F80220D0F8EF +:1069D000D0000170DCE7002DDAD161700B2222704B +:1069E000D0F8D0205368C4F802301289E280D0F881 +:1069F000D0000170CCE7002DCAD161700622227050 +:106A0000D0F8D0205368D2F808C0D268C4F8023059 +:106A1000C4F806C0C4F80A20D0F8D0000170B7E767 +:106A2000002070473C494861704710B50446B0F8F3 +:106A3000A000401CA4F8A000B4F84C00401CA4F82E +:106A40004C0094F8560020B1B4F85200401CA4F851 +:106A5000520094F85A0020B1B4F85800401CA4F831 +:106A6000580094F8B40040B994F83D200023012167 +:106A700004F1300002F0B7F920B1B4F85000401C26 +:106A8000A4F85000204600F016F8002010BD224A5D +:106A9000C2E906017047B0F84C1090F83E20091D7D +:106AA0002AB1B0F84E00814203D301207047062975 +:106AB000FBD20020704770B5044690F83B000025DB +:106AC000072821D1208EB4F8C610401C884218BF78 +:106AD00070BDD4F8C000411C04F1080004F069FB4B +:106AE0000221204602F00CF884F83B50012084F883 +:106AF0006600D4F8C0000078002808BFFFDFD4F893 +:106B0000C0000178491E017094F83B00082818BFA6 +:106B100070BD208E08E00000E4000020A5610100A7 +:106B20001D67010049670100D4F8BC10401C89882A +:106B3000884218BF70BDD4F8D0000178002918BF72 +:106B4000FFDF1ED12188C180D4F8BC00D4F8D0105A +:106B500040890881D4F8BC00D4F8D01080894881DD +:106B6000D4F8BC00D4F8D010C0898881D4F8D00003 +:106B70000571D4F8D01007200870D4F8D010208800 +:106B800048800121204601F0BBFF03212046FEF78B +:106B900056F8D4F8BC0021884088884218BFFFDF2F +:106BA000D4F8BC00057084F83B5070BDF0B5FF4CC4 +:106BB0008DB0207910F0010F04BF0DB0F0BD206939 +:106BC00000230521C578A06890F83B20303002F002 +:106BD0000AF9002818BF022D0CD00B2D18BF042D68 +:106BE00008D0052D1CBF062D0D2D03D0607840F078 +:106BF00008006070607800281CBF0DB0F0BD2069EF +:106C0000C078801E0C2880F0D881DFE800F006FDF7 +:106C10002B4BD2FCFDFBFD21FA96A068002301213D +:106C200090F83D20303002F0DEF8002840F0E3819B +:106C3000206902F072FBA16881F8B600022081F899 +:106C40003D00002081F85A0081F8560000F0D3B9C9 +:106C5000A06890F83B100A2929D1002180F83F1044 +:106C60000D2166E0A06890F83B100E291FD1D0F8E6 +:106C7000BC1000884988814218BFFFDFA068D0F8A7 +:106C8000BC0000F12601206902F074FBA06800F14D +:106C90008C01206902F076FBA168112081F83B008D +:106CA00000F0A9B9A66896F83B00112803D002208D +:106CB000607000F0A0B9D6F8BC10102501F10E0CE0 +:106CC00000210DF1FF3208206B1A6344401E13F8B7 +:106CD000017C577013F8023C02F8023F01F10201F7 +:106CE000F2D1D6F8BC10102601F11E0300210822B3 +:106CF0000DF10F00A6EB010C9C44891C1CF8015CF3 +:106D000045701CF802CC00F802CF521EF2D1684642 +:106D100003F030F808ADA06895E80E1000F1780592 +:106D200085E80E100021C0E91A11012180F83F10FA +:106D3000132180F83B1000F05EB9A16891F83B0088 +:106D4000112812BF0E2891F85C000028AFD12069ED +:106D500002F02FFBA168002581F8900081F85B50BC +:106D600081F85650D1F8BC0009884088884218BF85 +:106D7000FFDFA068D0F8BC100D70D0F8D0100A78F2 +:106D8000002A18BFFFDF40F014810288CA80D0F8C3 +:106D9000D02090F890101171D0F8D0100D72D0F86A +:106DA000D0200B2111700188D0F8D000418000F074 +:106DB00000B9A06890F83B10152918BF022040F0D8 +:106DC0000981002580F85B5080F85650D0F8BC103F +:106DD00000884988814218BFFFDFA068D0F8BC1046 +:106DE0000D70D0F8D0100A78002A18BFFFDF40F0ED +:106DF000E08090F85C20A2B180F85C500288CA80E4 +:106E000003E020E08BE089E0D7E0D0F8D0100D71EE +:106E1000D0F8D0200C2111700188D0F8D00041802A +:106E2000C7E00288CA80D0F8D0100D71D0F8D02009 +:106E300001211172D0F8D0200B2111700188D0F8F7 +:106E4000D0004180B5E0A0680023194690F83C20AE +:106E5000303001F0C8FF48B9A0680023072190F83E +:106E60003B20303001F0BFFF00287DD06078002843 +:106E700054D1A06890F85E0010F0020F17D120697D +:106E800002F08DFAA16881F85F00206902F089FAAA +:106E9000A168A1F86000206902F086FAA168A1F853 +:106EA000620091F85E0040F0020081F85E00A06888 +:106EB00090F85E1011F0010F15D190F83C200023DE +:106EC0001946303001F08FFF002808BFFFDF012195 +:106ED000A068042280F83C1080F8B82080F85A108E +:106EE0000021A0F85810A06890F83B10012904D1A7 +:106EF000002180F83B1080F85610D0F8BC200388A1 +:106F00005188994204BF1178042974D1002111706D +:106F100090F83B20002A08BF80F856106BE0A0686C +:106F20000023062190F83B20303001F05CFFD8B1FF +:106F3000607800285FD16946206902F04DFA9DF81B +:106F4000000010F001008DF8000014BF01200020A7 +:106F5000A168002581F86400A06880F85650D0F838 +:106F6000BC100088498800E033E0814218BFFFDF91 +:106F7000A068D0F8BC100D70D0F8D0100A78002AA4 +:106F800018BFFFDF15D10288CA80D0F8D0100D716C +:106F9000DDE90013D0F8D0209160D360D0F8D02084 +:106FA000062111700188D0F8D00001E0E400002033 +:106FB0004180A06880F83B501DE0A068002319467E +:106FC00090F83C20303001F00EFF10B1607818B11D +:106FD00011E0012060700EE0206902F043F9A16821 +:106FE00081F89100052081F83C000020A1F85800AC +:106FF000012081F85A00A068D0E91C12491C42F116 +:107000000002C0E91C120DB0F0BD000030B585B023 +:1070100004466846FBF7FBFC002808BFFFDF00982A +:1070200002F07DF80321009802F093F800980178AF +:1070300021F010010170214602F0EEF8A01E0C288C +:1070400051D2DFE800F006501E5151165042505107 +:10705000312CFD48C06890F8651021B106210098D8 +:1070600002F059F940E090F8CF10009802F053F97F +:107070003AE0F548C06890F89110009802F09BF94A +:1070800032E0F14DE86800F1B801009802F06DF9C6 +:10709000E86800F18C01009802F071F924E0062103 +:1070A000009802F084F91FE0E74DA8680178009885 +:1070B00002F06BF9A8688188009802F068F9A86866 +:1070C0004188009802F067F90EE0002002900390DA +:1070D0009DF8080002A940F001008DF80800009812 +:1070E00002F075F900E0FFDFFBF7A4FC002808BF01 +:1070F000FFDF0C2C04BF05B030BD072C0DD0022CD7 +:1071000004BF05B030BD0021CF48C068A0F85810BA +:10711000012180F85A1005B030BDCB490020C96864 +:10712000A1F8580005B030BD70B50C4605464FF4C7 +:107130009071204603F017FF2580002084F8F000AE +:1071400084F8FC0084F8040184F8120170BDF6F79D +:1071500097BD70B50C4615460721F6F76EFC002862 +:1071600008BF70BD90F8F0200021DAB1002D77D172 +:1071700061700722227090F8F0208AB1018480F8B3 +:10718000F010D0F8F220C4F80220D0F8F620C4F8AD +:107190000620B0F8FA20628190F8F020002AEDD1A4 +:1071A000A1705DE090F8FC2002B3002D58D190F85A +:1071B000FC200B2A0CD00C2A18BFFFDF50D16170C5 +:1071C0000C22227090F8FE20A2700288A2800AE0B1 +:1071D00061700B22227090F8FE20A2700288A280BB +:1071E00090F80221A27180F8FC1039E090F8042197 +:1071F0008AB17DB961700822227002886280D0F85D +:107200000821D0F80C316260A360B0F81021A2818F +:1072100080F8041124E090F812214AB105BB617096 +:1072200011222270B0F81421628080F8121117E048 +:1072300090F81621002A04BF002070BD85B9617046 +:107240001222227090F8162152B100BF80F8161158 +:10725000D0F81821C4F8022090F81621002AF5D1A0 +:10726000012070BD00207047774988607047002179 +:1072700080F83B1080F83C1080F83E1090F8A60093 +:1072800010B10220FEF72CBC0320FEF729BC2DE92B +:10729000F04F6D4C07468DB0E0680D460088F6F75C +:1072A00044FD5FEA000B08BFFFDF60782843607091 +:1072B000A188E06811F0200F4FF000051CBFA0F876 +:1072C0004C5080F8AC5004D1B0F84C20521CA0F8BF +:1072D0004C2011F0600F4FF002084FF0010613D060 +:1072E000E06890F83E1011B1032907D00CE080F857 +:1072F0003E6000210120FEF7F3FB05E080F83E80B0 +:1073000000210120FEF7ECFBE06890F83E10012917 +:1073100005D1A18811F4807F18BF80F83E80002F2E +:1073200040F09B81A18811F4007F18BFA0F8C050E5 +:1073300004D1B0F8C010491CA0F8C01000F09AFBAE +:107340000CA8FBF764FB002800F0E88060780028B8 +:1073500040F0E480E0680123194690F83D20303089 +:1073600001F041FD002849D1D4F80CC09CF8CE00B2 +:1073700038B1ACF850508CF865500220FFF746FE4B +:10738000CCE09CF83C200B2A08BF0B201AD00ADC6A +:10739000012A7BD0052A08BF072013D0092A08BF7D +:1073A00009200FD005E00F2A0FD0102A20D0162A6E +:1073B0007CD0012304210CF1300001F014FD0028E1 +:1073C0001CD187E0FFF722FEA8E0F9F755FF0C2853 +:1073D00014D3E0680821B830F9F74FFF28B1E0680E +:1073E00004218C30F9F749FF00B9FFDF0420E9E7F9 +:1073F0009CF8D100012802D0022849D08EE09CF8E8 +:10740000FC00002841D100220CF1D2094FF01008F5 +:1074100008210DF1FF3000BFA8EB02034B44491EC9 +:1074200013F801AC80F801A013F8023C00F8023F09 +:1074300002F10202F0D10CF1B00800204FF0100C64 +:107440000DF10F01082201E004010020ACEB000364 +:107450004344801C13F8019C81F8019013F8023C0E +:1074600001F8023F521EEED1684602F083FC0DF196 +:107470002008E06898E80E10783080E80E100520AB +:10748000FFF7C4FDE06880F8D15047E015E00DE05B +:107490009CF85C0000281ABF8CF8656002200D2063 +:1074A000FFF7B4FDE06880F8D15037E00620FFF721 +:1074B000ADFDE06880F85A5030E00C20FFF7A6FDE3 +:1074C000E068A0F8585090F85E1041F0010180F893 +:1074D0005E1023E0E06890F83B2090F8E210E9B1FC +:1074E00001230021303001F07EFCB8B1E06890F853 +:1074F000E210042904BF90F85E0010F0030F0DD1D4 +:107500000C20FFF783FDE068A0F8525080F8566029 +:1075100090F85E1041F0010180F85E1000F0A1FFCC +:107520000028E06818BFA0F8A05004D1B0F8A0105F +:10753000491CA0F8A01000F097FF40B1E06890F857 +:10754000AC1002299CBF491C80F8AC1004D8E0683C +:1075500090F8AC00022806D9E068A0F8A050A0F886 +:10756000A25080F8AC50E0680123002190F83C2044 +:10757000303001F038FC20B9E06890F83C00072872 +:1075800056D1E0680123002190F83B20303001F013 +:107590002AFCE8B3E0680123002190F83D20303058 +:1075A00001F021FCA0B3E06890F83E10022904BF6E +:1075B00090F8AC0000283BD15846F5F7E8FE38B308 +:1075C000FBF76CFA20B3E068B0F89A1001292FD9C4 +:1075D00080F8A560B0F84E10B0F84C208B1E9A428F +:1075E000AFBF0121891A491E89B2B0F8A030E288E4 +:1075F00093422FBF0122D21A521C92B2914288BFED +:107600001146012908BF80F8A55090F8C82000E075 +:107610000EE08AB1B0F8A220B0F8CA0082422FBFB3 +:107620000120801A401C80B2814288BF014603E0DD +:10763000E068012180F8A550E068028E114489B20B +:10764000A0F89C1090F83E30002B18BF012B1DD0E5 +:10765000022B1CBF032BFFDF09D0A088C0F3402002 +:107660000028E06818BFA0F8AE5022D11AE090F8C8 +:107670003D30032B0DD090F83C20082A06D0B0F8FE +:107680004E20B0F84C30D21A921E1144A0F8981037 +:10769000E3E7B0F84C30032BF8D3B0F84E101144A8 +:1076A000491CF3E7B0F8AE10B0F89E201144A0F8E2 +:1076B000AE10E06890F8CE1039B990F83D20012363 +:1076C0001946303001F08FFB38B1E068B0F8501047 +:1076D000B0F89E201144A0F850103D212FB1E06871 +:1076E00080F84A1080F8496069E02078022810D0BC +:1076F00001281AD0607800B310F0140F14BF1E21B7 +:1077000010F0080FEBD110F0030F08BFFFDF2A21A4 +:10771000E5E7E06890F86510002914BF06211621FE +:1077200080F84A1080F8496049E0E06890F8D0108D +:1077300080F84A1080F8496041E0E06890F85610FF +:1077400041B1B0F852104A1CA0F85220B0F85420B1 +:10775000914214D290F85A1041B1B0F858104A1C16 +:10776000A0F85820B0F85420914208D2B0F8502028 +:10777000B0F84E108A4208D390F8CE202AB12221C8 +:1077800080F84A1080F8496019E090F83E204AB12C +:10779000B0F84C208A420FD3082180F84A1080F8B4 +:1077A00049600CE0B0F84C10062905D33E2180F862 +:1077B0004A1080F8496002E090F8490088B1E0681A +:1077C00080F83B5080F83C5080F83E5090F8A6007E +:1077D0004FF00001002814BF02200320FEF780F9BB +:1077E00003E000210846FEF77BF9E06880F8A65028 +:1077F0000DB0BDE8F08FFE494A788B781A430DD161 +:1078000050B1087910F0080F04D0C86890F83D0016 +:10781000032803D001207047FEF7E4B8002070472A +:107820002DE9F041F24C05460E46A0882843A08081 +:1078300015F0020F04D015F0010F18BFFFDF26610D +:1078400015F0010F4FF000084FF001071CD0304633 +:10785000666101F007FD062802D00B280BD013E06B +:10786000E06890F83C1012290ED10021C0E91A11ED +:1078700080F83F7008E0E06890F83C100C2904BFE5 +:1078800080F83F8080F85C7015F0020F19D02069F5 +:1078900001F0E8FC052802D00B280BD011E0E068CD +:1078A00090F83C1010290CD10021C0E91C1180F87F +:1078B000407006E0E06890F83C100B2908BF80F8A3 +:1078C000408015F0800F1CBF0820A070BDE8F0813B +:1078D0002DE9F043C64C83B00127216900250191B1 +:1078E000A5806570A5702570E06067F307080646FF +:1078F00080F8A6700088F6F718FA5FEA000908BF5A +:10790000FFDFE0680088FBF77FF8E0680088FBF79E +:10791000A1F8E068B0F89A00D0B101A8FBF777F8B9 +:10792000B0B1E06890F8CE1091B190F83D200123FD +:107930001946303001F057FA50B9E068A0F85050BD +:1079400080F865500220FFF761FBE06880F8A550E1 +:10795000E26892F8F00028B9108C9188884288BFBC +:10796000E08001D89088E080B2F89E00B2F8A010C4 +:10797000401E80B2014489B2A2F8A01092F8A4304F +:10798000002B1CBFA2F8A25082F8A45004D1B2F878 +:10799000A2300344A2F8A230B2F84C300344A2F85B +:1079A0004C30B2F89A30012B9CBF5B1CA2F89A3085 +:1079B000002818BF82F8AC5092F8A50000281CBF20 +:1079C000E08881420FD24846F5F7E1FC58B1E06803 +:1079D00090F8C81039B1B0F8A210B0F8CA008142CE +:1079E00028BF00F044FDE06880F8A55090F83C10F6 +:1079F000062918BF072916D1018EB0F8E420891A8C +:107A000009B200290FDB00F1E601083003F0D1FBD9 +:107A10000221E06800F0C2FFE06880F8E35080F8DF +:107A20003C5080F86670E16801F13000B1F89E20AA +:107A300001F0FFF8E06890F8C810002918BFA0F81E +:107A4000A2506C4800906C4B6C4A3146404600F0A6 +:107A50008AFBE0680123052190F83C20303001F0DA +:107A6000C2F9002818BF00F07AFB03B0BDE8F0832C +:107A700000F0D3BC2DE9F0415D4C4FF002074FF010 +:107A80000005207910F0080F13D0607888B9E068FD +:107A900090F83C10142905D180F85B5080F85A50BA +:107AA00080F83C5090F83D10032904BF277080F8FF +:107AB0003D5000F043F9A1884FF0010611F0040F8A +:107AC00014D0607890B9E06890F83C20062A08BF8E +:107AD00080F8E36003D0082A08BF80F8E37090F8CC +:107AE0003D20022A04BF267080F83D5011F0020F9D +:107AF0004FF0030754D06078002851D12069C07836 +:107B0000801E0C287CD2DFE800F006B636415718FC +:107B1000B622B6298B4CE0680123194690F83D2027 +:107B2000303001F060F900283AD1E06880F83D700B +:107B300080F8565080F85A509EE0E06890F83C007B +:107B4000052818BFFFDFE06880F83C50F2E7E068E6 +:107B500090F83C00092818BFFFDF6FE0E06890F85C +:107B60003C000B2818BFFFDFE0680C2180F85B6049 +:107B700080F83C1080E0E06890F83C000F2818BFC7 +:107B8000FFDFE068102180F85B60F1E7E06890F8C3 +:107B90003C00102818BFFFDF1220E16881F83C008C +:107BA0006AE0E06890F83C00102818BFFFDF14205E +:107BB000E16881F83C005FE0E06890F83C0016283E +:107BC00018BFFFDFE06880F85B5080F85A5090F8EB +:107BD000FC00002818BFFFDFE06890F85C1091B14E +:107BE00080F85C500188A0F8001180F8FE5008E091 +:107BF000040100208F720100F77701002178010055 +:107C000039E00C2107E00188A0F8001180F8FE504F +:107C100080F802610B2180F8FC1080F83C502BE0CA +:107C2000E06890F8E21004290ED0E06801230721F3 +:107C300090F83C20303001F0D6F8E8B1E06880F8E8 +:107C40005A5080F83C5017E090F83B200123002167 +:107C5000303001F0C8F8002808BFFFDFE06890F876 +:107C60005E1011F0020F0EBF80F83B6080F8565096 +:107C700080F8E250D9E7FFDF207910F0100F09D02B +:107C8000607838B9E06890F83C10062904BF0721F5 +:107C900080F83C10A07810F0080F10D0E0680123A5 +:107CA000052190F83C20303001F09DF828B10820E3 +:107CB0006070E06880F8FC5001E000F0DCFBE068F8 +:107CC00090F83C10082918BFBDE8F081018EB0F88B +:107CD000E420491C914206BF61780029BDE8F0818B +:107CE000B0F8EA104288914209D1B0F8EC208388BC +:107CF0009A4204D1B0F8EE20C3889A420ED002888E +:107D0000A0F8F420A0F8F610B0F8EC10A0F8F810E5 +:107D1000B0F8EE10A0F8FA1080F8F060012100F041 +:107D20003DFE00210420FDF7DBFEE06880F8E35013 +:107D300080F83C5080F83E70BDE8F08130B5FF4CD3 +:107D400083B0207910F0010F04BF03B030BD60692B +:107D500001230521C578E06890F83C20303001F01F +:107D600042F8002818BF022D0BD00A2D18BF0B2D8A +:107D700007D0032D18BF062D03D0607840F008000F +:107D80006070607800281CBF03B030BD6069C078A7 +:107D90000D2880F0AB81DFE800F0462207C8FEFE28 +:107DA000FDDBFCFEA3C0FB00E0680123194690F850 +:107DB0003D20303001F017F8002840F0B4816069B0 +:107DC00001F0ABFAE16881F8D000022081F83D00B3 +:107DD000002081F85A0081F8560000F0A4B9E0684C +:107DE0000123002190F83C20303000F0FCFF0028F7 +:107DF00075D06078002840F09681606901F088FABB +:107E0000E168A1F8E4000A8E801A00B247F6FE721B +:107E10008242A8BF00285ADDE631606901F06FFA9E +:107E20000620E1683FE0E0680123002190F83C2053 +:107E3000303000F0D8FF00285FD06078002840F094 +:107E40007281606901F037FA88B3606901F030FA35 +:107E5000E168A1F8E4000A8E801A00B247F6FE72CB +:107E60008242A8BF002832DD606901F01BFAE16898 +:107E700081F8E600606901F010FAE168A1F8E80015 +:107E8000606901F0F5F9E168A1F8EA00606901F0C4 +:107E9000F6F9E168A1F8EC00606901F0F7F9E16832 +:107EA000A1F8EE00082081F83C0000F03CB9FFE7A3 +:107EB000E0680123002190F83C20303000F093FF6F +:107EC00068B16078002800F01F8100F02CB92820EC +:107ED00081F84A00012081F8490000F024B90CE043 +:107EE000E0680123002190F83C20303000F07BFF57 +:107EF00018B1607828B100F016B90120607000F068 +:107F000012B9E0680021A0F85810012180F85A1039 +:107F10000B2180F83C1000F006B9E06890F83C10A6 +:107F20000C2908BF0D214CD143E0E068012300215A +:107F300090F83C20303000F056FF20B9E06890F80F +:107F40005C0000287ED06078002801D101E06070DC +:107F5000E9E0E06800210125A0F8581080F85A50A7 +:107F600000F1B001606901F0F1F9E06800F1880109 +:107F7000606901F0F6F9E06890F80401002818BF84 +:107F8000FFDFE0680188A0F8061100F5847103E0C6 +:107F90001EE087E010E0A9E0606901F0C5F9E06843 +:107FA00000F58871606901F0C7F9E06880F8045154 +:107FB0000F2180F83C10B6E0E06890F83C101229E0 +:107FC00001D00220C3E7002180F85A101621F0E703 +:107FD000E0680123002190F83C20303000F003FFDE +:107FE00048B9E0680123072190F83B20303000F0C9 +:107FF000FAFE002826D06078002852D1E06890F878 +:108000005E0010F0020F17D1606901F0C8F9E16855 +:1080100081F85F00606901F0C4F9E168A1F86000CF +:10802000606901F0C1F9E168A1F8620091F85E00B1 +:1080300040F0020081F85E00E06890F85E1011F0F8 +:10804000010F00E05EE015D190F83C2001230021F3 +:10805000303000F0C8FE002808BFFFDF0121E068D3 +:10806000042280F83C1080F8E32080F85A100021A8 +:10807000A0F85810E06890F83B10012904D10021C5 +:1080800080F83B1080F8561090F8E21004294AD18D +:10809000002180F8E21090F83B20002A08BF80F809 +:1080A000561040E0E0680123002190F83C20303079 +:1080B00000F099FE30B3607818BB6946606901F042 +:1080C00081F99DF8000010F001008DF8000014BF48 +:1080D00001200020E16881F86400E0680021A0F838 +:1080E0005810012180F85A10092162E7E068012345 +:1080F000002190F83C20303000F075FE10B160781F +:1081000010B110E0012022E7606901F0ABF8E168EE +:1081100081F89100052081F83C000020A1F858006A +:10812000012081F85A00E068D0E91C21521C41F17D +:108130000001C0E91C2103B030BD00000401002093 +:10814000F9480078002818BF0C20704730B5F64C6D +:1081500005462078002818BFFFDF657230BDF24960 +:108160000120087270472DE9F047EF4C8146DDF899 +:10817000208020781E4617460D4628B9002F1CBFC8 +:10818000002EB8F1000F00D1FFDFC4F81C80C4E955 +:108190000C95C4E9057600202072E0712071E07032 +:1081A0006071A071E14EA070608130784FF00108DD +:1081B00005F130072888F5F7B8FDA0622888F5F7A3 +:1081C000A2FDE062FAF7BCF80120F9F7CAFDFAF760 +:1081D0000CF905F11100FAF79CF805F10D00F9F71B +:1081E000C7FE307800280CBF03200120FAF7A5F85D +:1081F000387EF9F7C5FE0120F9F7A2FDFAF797F8E6 +:10820000397CCB48002914BFCA49CB49016030787A +:108210004FF0010170B10120F9F726FF7068D0F826 +:10822000A800FAF79BF800BF84F80080BDE8F0478B +:10823000FAF78EB80020F9F717FFF5E72DE9F047B8 +:10824000DFF8E89282B0484600264068012700F136 +:1082500030041B20ADF8000060794FF00208A9F14E +:10826000300570B301285AD002285CD0032818BF0B +:10827000FFDF62D0286A0823017821F0080101702D +:10828000A27903EAC202114321F004010170E279EC +:10829000042303EA8202114321F01001017094F8D3 +:1082A00005A0A86AF5F781F80646FAF7F7FBBAF1D8 +:1082B000020F49D0BAF1010F49D0BAF1030F49D0EA +:1082C0004BE0FFE79D48FAF7C8FB40B1296AAF7061 +:1082D0006A694FF48060904703206071CAE701AA81 +:1082E0006946A86AF4F752FF286210B194F82B107F +:1082F00021B19248FAF785FB6771BBE79DF804103E +:1083000021B906808670012100F023FFBDF800002E +:10831000C1B2286A01F065F884F80580AAE78748A9 +:10832000FAF76FFBA6E701AA6946A86AF4F72EFFE1 +:108330002862002808BFFFDF9CE78048FAF78DFB22 +:10834000002808BFFFDF95E7B04306D103E0B04344 +:1083500003D100E00EB1012100E00021286A02787B +:1083600042EA01110170E17B00291CBF61790129FA +:1083700026D004F14801724891E80E1000F1480639 +:1083800086E80E10A16DC0F86110E16DC0F86510AF +:108390002230F9F7E0FF99F8000000280CBF012116 +:1083A000002168480176D4E90E12C0E90412A0F158 +:1083B00026012A6AF9F711FC0020F9F71FFC03E0F7 +:1083C000F9F7C9FFF9F741FC99F8000028B1286ACC +:1083D000007810F0100F05D00CE001210846FAF7E4 +:1083E0007CF80AE05848007810F0100F04BF287994 +:1083F000002802D0A8780028EFD06879002804BFB0 +:108400006F71F9F7D0FF286A0188A9818078A87375 +:1084100085F8008002B0BDE8F087434810B50078C9 +:10842000012818BFFFDFF9F78BFF40480178446847 +:1084300011B9FFF703FF01E000F0BCF994F8280040 +:10844000012818BF10BDBDE81040FAF723B8364820 +:1084500010B50078032818BFFFDFBDE8104000F01A +:10846000F4B93148407970472F48007970472E4958 +:108470000120887170472DE9F0412C482A4D0126D2 +:1084800001784068002700F13004686A417801F003 +:108490001F08E96A02F09AF868B1012821D0022881 +:1084A00034D003281CBFFFDFBDE8F081E86ABDE8D7 +:1084B000F041F5F7E4B801224146E86AF4F7FAFF23 +:1084C000D4E91010491C40F10000C4E91010E07913 +:1084D000012814BFE671E771687ABDE8F041F1F751 +:1084E0006FB800224146E86AF4F7E4FFD4E91001CE +:1084F000401C41F10001C4E91001E079012802D1DA +:10850000E771BDE8F081E671BDE8F081E86AF5F752 +:10851000B6F8D4E91010491C40F10000C4E910106D +:10852000E0790128EFD1EBE71C0100204C0100208D +:10853000181500401F0003021B0003023C0100202D +:10854000F8100020401100202B0100202DE9F041FF +:10855000F04F4FF000083846A7F13004406801267C +:1085600000F130052078022818BFFFDFA87850B14D +:1085700085F80280A67062694146042090473878E9 +:10858000002818BF2E71206A0321007831EA00000C +:1085900004BFE878002805D1EE70216AA6706269F0 +:1085A000022090470121002000F072F918B1BDE8C7 +:1085B000F04100F04AB9BDE8F04100F0FBB82DE908 +:1085C000F05FD44E82463046A6F1300540684FF049 +:1085D000000800F1300928780127032818BFFFDFC1 +:1085E0006889BAF1000F40F40070688104BF40F060 +:1085F0004000688100F0CE80F9F73DFB98B999F80A +:10860000100080B1686A417811F01F0F0BD000781C +:1086100099F80710C0F3C000884204D1EF70BDE89C +:10862000F05F00F012B9686A0188A5F80F10807831 +:108630006874688940F02000688185F8048070685B +:1086400000F1300B044690F82800012813D1F9F707 +:1086500017FF5946204600F09BFB60B13078002898 +:1086600070680CBFC83000F58B70218841809BF882 +:10867000081001710770686A99F806100078C0F355 +:108680008000884233D0706800F1300490F83500E3 +:1086900048B3022844D000BF84F80580307838B150 +:1086A0002079414620B12171AF706A69102090474E +:1086B000E07890B184F80380FAF7DEF9002808BF6B +:1086C000FFDF0820AF706A6900219047D4E90E10DF +:1086D000491C40F10000C4E90E10A07901280CBF2C +:1086E00084F80680A771688940F480706881686AA0 +:1086F00099F807300178C1F3C0029A424AD17268F2 +:1087000001F0030102F13004012918BF02292ED023 +:1087100003291CBFE87940F0040012D0E87139E069 +:10872000A86AF4F76DFD002808BFFFDFD4E90E103A +:10873000491C40F10000C4E90E10687AF0F740FFD0 +:10874000AAE700F02AFD70B1A770696AAF706A6984 +:1087500038469047E079012803D100BF84F80780AC +:1087600018E0E77116E0E87940F01000D6E74078AD +:1087700010F01F0F17D0697861B900F01F001B2897 +:10878000F1D8287A20B180206A690021904701E061 +:10879000FFF771FE5146012000F07AF838B1BDE8CC +:1087A000F05F00F052B8E0790128DAD1D6E7BDE8F1 +:1087B000F05F43E570B5584C1B21E06AF4F723FEE7 +:1087C000002101226062002811BF6170627053486D +:1087D0006062504E3078706800F1300590F84000CB +:1087E00038B305F148014D4891E80E1000F1480EEC +:1087F0008EE80E10A96DC0F86110E96DC0F8651023 +:108800002230F9F7A8FD307800280CBF01200020A5 +:1088100080F0010142480176D5E91012C0E9041246 +:10882000A0F12602616AF9F7D8F90120F9F7E6F913 +:1088300004E0606AF9F78FFDF9F707FA01210020DB +:10884000F9F74BFE0320207070BD70B5314900254B +:108850004C68F9F7E7FDF9F7D9FDF9F7FBFCF9F7F3 +:108860005EFDF9F7F2F9F9F7CDFDF9F771FD94F82E +:108870002800012808BFF9F703FE274C0021626990 +:1088800060899047E269E179E0789047257070BD92 +:1088900070B5214C0546002908BF012D05D120796E +:1088A000401CC0B22071012831D8A16928468847F0 +:1088B00000282CD0A1791B4841B1012D01BF41787E +:1088C00011F01F0F017811F0100F20D0E179F1B9EC +:1088D00010490978002918BF002102D0294304D08B +:1088E00013E0012D18BF0121F8D10F49097811F0CB +:1088F000100F04BF007810F0100F08D0A07830B926 +:10890000607810B111F0100F01D0002070BD01206F +:1089100070BD00004C0100201C010020F810002058 +:10892000401100202B0100202801002010B50A7BF7 +:1089300002F01F020A73002282758B181B7A03F063 +:10894000010C5B0803F00104A4445B0803F001047C +:10895000A4445B0803F00104A4445B0803F0010491 +:1089600064444FEA530C0CF0010323444FEA5C0CBF +:108970000CF00104234403EB5C0300EB020C521CDB +:108980008CF8113090F816C0D2B263448375052A72 +:10899000D3D3D8B2252888BFFFDF10BD0A4610B454 +:1089A0000021032A0DD04FF4FA4C002A60D0012A8E +:1089B0007ED0022A1CBF10BC7047014610BC30306C +:1089C000B4E7018680F8361080F8371080F83B1045 +:1089D00080F83C1080F83D1080F83E1080F832108E +:1089E00080F8331080F8341080F8351080F8491082 +:1089F000A0F84C10A0F8521080F85610A0F85810AB +:108A000080F85A1080F8471080F8481080F83F101E +:108A100080F8401080F85B1080F85C1080F85E10E1 +:108A2000012280F86420A0F8501080F86610A0F8A9 +:108A30009810A0F89A10A0F89C10A0F89E10A0F82A +:108A4000A010A0F8A21080F8A510A0F8AE1080F831 +:108A5000AC10A0F8C010A0F8C21080F82810018453 +:108A600080F8C81080F8CE1080F8D11010BC704784 +:108A7000A0F8AE1080F8A6104288C488A0F84C1068 +:108A8000B0F8501000F13003514391FBF2F1A0F81F +:108A90005010E100B1FBF2F1491C89B201FB02F474 +:108AA000A0F84E10B4F5C84FC4BF491ED98300E0EA +:108AB00004E0BCFBF2F1491C99847EE7A0F8AE10FB +:108AC00000F130024488B0F8EA30B0F8EE0091834B +:108AD000118CC0006143B0FBF3F091FBF3F1401C3B +:108AE000118480B200FB03F1D083B1F5C84FC4BF3D +:108AF000401ED083BCFBF3F0401C908410BC704738 +:108B00000A4610B40021032A0DD04FF4FA4C002A73 +:108B10004FD0012A6DD0022A1CBF10BC70470146FD +:108B200010BC303002E7018680F8361080F837102C +:108B300080F83B1080F83C1080F83D1080F83E1023 +:108B400080F8321080F8331080F8341080F8351037 +:108B500080F84910A0F84C10A0F8521080F8561078 +:108B6000A0F8581080F85A1080F8471080F8481084 +:108B700080F83F1080F8401080F85B1080F85C109F +:108B800080F85E10012280F86420A0F8501080F870 +:108B90006610A0F8A01080F8A21080F89810C0F815 +:108BA0009C1080F8281080F8B41080F8C41010BC15 +:108BB00070474288C488A0F84C10B0F8501000F1FB +:108BC0003003514391FBF2F1A0F85010E100B1FBEA +:108BD000F2F1491C89B201FB02F4A0F84E10B4F581 +:108BE000C84FC4BF491ED983BCFBF2F1491C99840C +:108BF00095E7D0F8BC4000F1300243886089E489F1 +:108C00009183118C594391FBF0F11184E100B1FB88 +:108C1000F0F1491C89B201FB00F3D183B3F5C84FD1 +:108C2000C4BF491ED183BCFBF0F0401C908410BC33 +:108C30007047837D0BB1252B01D912207047002A84 +:108C400004BF0020704770B490F817C00C7E894DA7 +:108C500004FB02C22C464FF0000CE2FB054C4FEA2D +:108C60001C1C6FF024040CFB0422D2B201EBD20CCA +:108C7000C27502F007059CF808C0012404FA05F546 +:108C80001CEA050F18BF02762CD1B2FBF3FC03FBE4 +:108C90001C22521CD2B24FF0000C00BF00EB0C03A0 +:108CA0005B7C93423CBFD21AD2B20ED301EB0C05CF +:108CB00000232D7A04FA03F635421CBF521ED2B2AD +:108CC0006AB15B1CDBB2082BF4D30CF1010303F097 +:108CD000FF0CBCF1050FE1D370BC1F20704703EB04 +:108CE000CC01017670BC0020704730B50D460446BB +:108CF000072988BFFFDFE07805F0070100F050008A +:108D0000084340F08800E070A07800F0A70040F031 +:108D10001800A070607800F05E0040F020006070E5 +:108D2000207800F0BC0040F04000207030BD017998 +:108D300031F01F0113BF002000221146704710B40C +:108D4000435C491C03F0010C5B0803F00104A444DC +:108D50005B0803F00104A4445B0803F00104A4448D +:108D60005B0803F00104A4445B0803F001045B0802 +:108D7000A44403F00104A4440CEB53031A44D2B2FC +:108D80000529DDDB012A8CBF0120002010BC7047C3 +:108D900038B505460C466846F9F787FB002808BF3A +:108DA00038BD9DF90020227294F909100020511A53 +:108DB00048BF494295F829308B42C8BF38BDFF2BC8 +:108DC00008BF38BDA17A491CC9B2A17295F82A30F2 +:108DD000994203D8617A7F2918BF38BD627200209A +:108DE000A072012038BD10B4A2F10B0C08293AD2B0 +:108DF000DFE801F004060B10131D333782B332E0B5 +:108E0000022A18BF032A31D02DE0072A18BF062AEC +:108E10002CD028E0082A29D025E01BB1BCF10B0F8B +:108E200024D920E0A2F10A000B281FD91BE01BB1B6 +:108E3000BCF10B0F1AD916E00D2A18BF0C2A15D059 +:108E400090F82C0020B10D2A0DD3152A0ED90AE076 +:108E5000112A08D3152A09D905E0092A06D002E00B +:108E600004E0012A02D010BC0020704710BC012091 +:108E70007047000053E4B36E282102F052B830B5B9 +:108E80000546007801F00F0220F00F001043287013 +:108E900007290BD2DFE801F00406040604080400E9 +:108EA000062405E00C2403E0222401E00024FFDF77 +:108EB000687820F03F002043687030BD007800F0F3 +:108EC0000F0070470A68C0F803208988A0F80710CF +:108ED0007047D0F803200A60B0F807008880704718 +:108EE0000A68C0F809208988A0F80D107047027838 +:108EF000402322F0400203EA8111114301707047C0 +:108F00000078C0F3801070470278802322F080023E +:108F100003EAC111114301707047D0F80320C1F872 +:108F20000920B0F80720A1F80D200A7822F080026D +:108F30000A700078800942EAC0100870704770B566 +:108F400015460E4604461F2A88BFFFDF2A463146D3 +:108F500004F1090001F06EFF6078A91D20F03F00C8 +:108F600001F03F010843607070BD70B50546407860 +:108F70000E4600F03F04062C38BFFFDFA01FC4B22E +:108F80001F2C88BF1F24224605F10901304601F03D +:108F900051FF204670BD70B515460E4604461F2A87 +:108FA00088BFFFDF2A46314604F1090001F042FF85 +:108FB0006078A91D20F03F0001F03F010843607078 +:108FC00070BD70B5054640780E4600F03F04062C93 +:108FD00038BFFFDFA01FC4B21F2C88BFFFDF2246AF +:108FE00005F10901304601F025FF204670BD0968F2 +:108FF000C0F80F1070470A88A0F8132089784175CF +:1090000070474176090A81767047C176090A01776F +:1090100070474177090A81777047C175090A01765F +:1090200070478175704790F8242001F01F0122F0ED +:109030001F02114380F82410704790F82420E02389 +:1090400022F0E00203EA4111114380F82410704736 +:109050001F3002F0AEB84178007801F03F0110F007 +:109060000F0006D0012808D0022809D006280BD00E +:109070000FE0881F1F280AD90BE00C2909D106E050 +:10908000881F1F2803D904E0881F1F2801D801204A +:109090007047002070474178007801F03F0100F0F0 +:1090A0000F00042805D1062903D325299CBF0120E0 +:1090B00070470020704710B4017801F00F010329B8 +:1090C00022D0052925D14478B0F81910B0F81BC07A +:1090D000B0F81730827D04F03F04222C19D1062904 +:1090E00017D3B1F5486F98BFBCF5FA7F11D282B1A2 +:1090F000082A98BF8A420CD28B429CBFB0F81D0050 +:10910000B0F5486F05D807E0407800F03F000C2824 +:1091100002D010BC0020704710BC012070472221F3 +:1091200001F0FFBE00B5027801F0030322F0030254 +:109130001A4302704278012922F01F02427014BFC4 +:10914000022900BD032912BFFFDF42F00101417077 +:1091500000BD01F0030300B5027822F003021A43B8 +:1091600002704278012922F01F02427014BF0229C6 +:1091700000BD032912BFFFDF42F00101417000BDB5 +:10918000007800F0030070470278102322F01002EC +:1091900003EA01111143017070474178C07801F072 +:1091A0001F010E2832D2DFE800F0070A0D10131657 +:1091B000191C1F2225282B2E0C2929D02AE008292A +:1091C00026D027E0022923D024E0172920D021E04F +:1091D0000D291DD01EE001291AD01BE0012917D04E +:1091E00018E0022914D015E0092911D012E009294C +:1091F0000ED00FE001290BD00CE0012908D009E0C6 +:10920000062905D006E0022902D003E01B2901D877 +:10921000012070470020704730B50546C1700E2907 +:1092200018D2DFE801F007090B0D0F11110B131312 +:109230001111150B0C240FE008240DE002240BE0A3 +:10924000172409E00D2407E0012405E0092403E0C8 +:10925000062401E00024FFDF687820F01F0020438F +:10926000687030BDC0787047C171090A01727047DB +:10927000B0F8070070474172090A81727047B0F870 +:1092800009007047C172090A01737047B0F80B00FA +:1092900070474171090A81717047B0F80500704745 +:1092A00001717047007970474173090A81737047F3 +:1092B000B0F80D00704730B4B0F80720504DB0F84A +:1092C00009C0B0F805300179941F2D1998BFBCF57D +:1092D000FA7F0ED269B1082998BF914209D2934210 +:1092E0009FBFB0F80B00B0F5486F012030BC98BFAD +:1092F0007047002030BC7047001D01F05ABF021DAE +:109300000846114601F055BF4172090A8172704743 +:10931000B0F80900704701717047007970470A681A +:10932000426049688160704742680A6080684860AE +:1093300070470988818170478089088070470A6872 +:10934000C0F80E204968C0F812107047D0F80E20FF +:109350000A60D0F81200486070470968C0F816101B +:109360007047D0F81600086070470A684260496884 +:109370008160704742680A60806848607047096889 +:10938000C1607047C06808607047017170474171E3 +:10939000090A81717047C171090A01727047007929 +:1093A0007047B0F805007047B0F8070070470171CA +:1093B000704700797047017170470A6842604968D8 +:1093C0008160704742680A608068486070470A6838 +:1093D000426049688160704742680A6080684860FE +:1093E000704730B50C4605461B2988BFFFDF6878FB +:1093F00004F01F0120F01F000843687030BD00001A +:1094000086F3FFFF70B50446C2F11005281901F07C +:1094100011FD15F0FF0108D0491EC9B2802060542B +:109420002046BDE8704001F07CBD70BD30B505E060 +:109430005B1EDBB2CC5CD55C6C40C454002BF7D116 +:1094400030BD10B5002409E00B78521E44EA4303F6 +:1094500000F8013B11F8013BD2B2DC09002AF3D13C +:1094600010BD30B50C46097889B01546012049B1C8 +:10947000012905D12978042902D105201070002086 +:1094800009B030BD60680590CDF818D00D210DF100 +:10949000030001F046FDA0680188ADF80010807857 +:1094A0008DF802000120207006208DF81000606AFF +:1094B0000890294604A8F5F745FEE1E72DE9F041BB +:1094C0000C46097892B0154601204FF0020CFE4F71 +:1094D00006264FF0040869B101291ED0022946D0A2 +:1094E000032904D12978042901D11670002012B073 +:1094F000BDE8F081606850B1CDE90107012020701E +:109500008DF80060606A04901146684665E084F852 +:1095100000C085F80080576027E029780429E6D14B +:10952000696810222069FFF78CFF6868C07B00061D +:1095300006D5E54A2069102310320146FFF776FF71 +:10954000D4E904101022FFF77CFF2069C07B0006DD +:1095500006D5DD4A6069102310320146FFF766FF29 +:1095600084F800C085F800806F600320BFE7297889 +:109570000429BCD1A08910280CD9A0F1100080B218 +:10958000A081A1684FF01003014468466A68FFF7A4 +:109590004DFF18E004D14FF010032269A16807E0E5 +:1095A000C2B20DA8A168FFF72DFF626910230DA9B3 +:1095B00009A8FFF73BFF102309A968466A68FFF76F +:1095C00035FF0320207060680590CDF818D08DF825 +:1095D0001060606A0890294604A8F5F7B3FD86E795 +:1095E0002DE9F04107460D4601200B7807213BB1DC +:1095F000012B04D11378062B01D11170002077E7DD +:109600006C69012620226170E8686060686A6062A7 +:10961000A168287C0870A681A068A968401C01F098 +:1096200009FCA08920222030A081A068696821302F +:1096300001F000FCA08921462030A0812E70384620 +:10964000BDE8F041F5F795BD2DE9F05F0D46834685 +:1096500001200978174606464FF00708D1B1DFF818 +:1096600068A24FF00009AAF1080A012923D00229B3 +:109670007ED003290CD13978062909D179681022C6 +:10968000E86901F0D7FB08203870183500207D60AC +:10969000BDE8F09F2C6A8C48202284F8018020309D +:1096A00060602020A081686A60626968A06801F03B +:1096B000C1FB2E70D4E039780629E9D12C6A84F8F0 +:1096C0000180686A606251681022E86901F0B2FBAB +:1096D000E8696060A0684F4680F80090A681A068A5 +:1096E0004670A089401C80B2A081A16808446969C5 +:1096F00051F8012F026089888180A089801D80B285 +:10970000A0816969A268097801F001011154A0895A +:10971000401C80B2A081A1680844296951F8012F3A +:10972000026089888180A089801D80B2A08129691A +:10973000A268097801F001011154A0891022401C8F +:1097400080B2A081A1680844E96801F073FBA08998 +:109750001022103080B2A081A1680844A96801F0ED +:1097600069FBA089103080B2A081A168014400E0AB +:109770000DE0DAF804000860A089001D80B2A08125 +:10978000A1680F54A089401CA081022067E03978AD +:10979000062992D151681022A86901F04BFB2C6A6E +:1097A00084F80180E8696060686A6062A16881F895 +:1097B0000090A681A0684670A089401C80B2A0815C +:1097C000A1680844696951F8012F02608988818085 +:1097D000A089801D80B2A0816969A268097801F022 +:1097E00001011154A089401C80B2A081A1680844E5 +:1097F000296951F8012F026089888180A089801D24 +:1098000080B2A0812969A268097801F00101115490 +:10981000A0891022401C80B2A081A1680844E96898 +:1098200001F008FBA0891022103080B2A081A1684D +:109830000844A96801F0FEFAA089103080B2A08126 +:10984000A1680144DAF804000860A089001D80B214 +:10985000A081A1680E54A089401CA081032028701B +:1098600021465846BDE8F05FF5F783BC70B50D465C +:1098700006460978012041B1012905D11178062950 +:1098800002D109201070002070BD2C6A0720607082 +:1098900068686060686A6062E969A06851F8012FD1 +:1098A0000260898881800620A081E869A16800782B +:1098B00000F001008871A089401C80B2A081A168DD +:1098C0000844A96902E000006AB5010051F8012FBF +:1098D000026089888180A089801D80B2A081A969E9 +:1098E000A268097801F001011154A089401C80B2DE +:1098F000A081A168084469690A880280897881701A +:10990000A0891022C01C80B2A081A16808442969E6 +:1099100001F090FAA0891022103080B2A081A168D5 +:109920000844E96801F086FAA0891022103080B25C +:10993000A081A1680844A96801F07CFAA0892146A9 +:109940001030A081012028703046BDE87040F5F746 +:1099500010BC70B50D4606460978012059B10129A1 +:1099600008D11178062905D10A20107050680068C6 +:109970005060002070BD6C69072010226070E8689C +:109980006060686A60622969A06801F053FA10207B +:10999000A081A06820221030A96801F04BFAA089AC +:1099A0002022203080B2A081A1680844696801F0BB +:1099B00041FAA08921462030A0810120287030463C +:1099C000BDE87040F5F7D5BB70B50C4601200978AD +:1099D0008EB01546062659B1012934D0022905D189 +:1099E0002978042902D10B20107000200EB070BD20 +:1099F000606910236A46007800F001008DF80000CD +:109A0000A069007800F001008DF80100E0680168AD +:109A1000CDF802108188ADF8061080798DF8080025 +:109A200020690168CDF809108188ADF80D108079A2 +:109A30008DF80F006068059009A80690A168FFF7EF +:109A4000F5FC01201DE029780429CFD1A06910235D +:109A50006A4650F8011F00918088ADF804006069E3 +:109A600050F8011FCDF806108088ADF80A000020DC +:109A700003906068059009A806906968FFF7D6FC16 +:109A8000022020708DF81060606A0890294604A8B2 +:109A9000F5F758FBAAE700B50B7889B001204BB168 +:109AA000012B05D11178042902D10C20107000205F +:109AB00009B000BD4868019005A80290C868036815 +:109AC000059340680690886803680793406808908B +:109AD0000120087006208DF80000486A04901146A5 +:109AE0006846F5F72FFBE3E700B50B7889B0012056 +:109AF00043B1012BDCD111780429D9D10D2010708C +:109B00000020D5E74868019005A80290886803689E +:109B10000593406806900020079008900120087087 +:109B200006208DF80000486A049011466846F5F753 +:109B300009FBBDE700B50B7889B0012043B1012BCB +:109B4000B6D111780429B3D10E2010700020AFE7F0 +:109B500048680590CDF818D088680088ADF80000F6 +:109B6000C8680088ADF802000020019002900390C0 +:109B70000120087006208DF81000486A08901146F0 +:109B800004A8F5F7DFFA93E730B403460C78012018 +:109B90005CB1012C15D0022C05D111780D2902D110 +:109BA0000F201070002030BC704701200870C8687A +:109BB000052242704A6842600B4A8260921EC2606F +:109BC0000BE014780E2CEED102200870C868042433 +:109BD0004470526842608A688260496A4162014604 +:109BE00030BC1846F5F7C5BA64B501002DE9F0415F +:109BF0000C4611490D68104A104908321160A0F155 +:109C00002001342901D301200CE0482810D040CC99 +:109C10000B4F94E80E0007EB8000241F50F8807C67 +:109C20003046B84720600448001D0560BDE8F0815B +:109C30002046E7F7C5FAF5E71005024001000001EC +:109C40009CB5010010B54C4800F042FA00B1FFDFAE +:109C50004948401C00F03CFA002800D0FFDF10BD4E +:109C60002DE9F05F454D8246D5F800900126424827 +:109C700000F036FA404C18B90026601C00F046FA95 +:109C80003F494FF0000E4FF0010B00BFC1F804B088 +:109C9000C1F800E1C1F804E1C5F800A0C1F800B0C6 +:109CA000384A4FF480434FF0E0274FF0030C1AE09E +:109CB0001068C00617D5C7F88032EFF3108010F097 +:109CC000010072B600D00120C1F804C3D1F80081B0 +:109CD000B8F1000F05D1D1F80481B8F1000F00D11F +:109CE00020BF00B962B6D1F8000118B9D1F804015B +:109CF0000028DDD0D1F804010028C7D12EB1C5F865 +:109D00000090601C00F0ECF907E0601C00F0E8F93E +:109D10000028B2D1184800F0F9F90020BDE8F09F02 +:109D20002DE9F0438DB00D46064600240DF11009D3 +:109D30000DF1200818E000BF04EB4407102255F88D +:109D40002710684601F076F805EB87071022484691 +:109D5000796801F06FF86846FFF782FF10224146EC +:109D6000B86801F067F8641CB442E5DB0DB0002070 +:109D7000BDE8F08374E700005401002004E50040D2 +:109D800000E0004010ED00E0C74800210170817044 +:109D9000704770B5C54D01232B60C54B1C68002C66 +:109DA000FCD0002407E00E6806601E68002EFCD080 +:109DB000001D091D641C9442F5D30020286018681A +:109DC0000028FCD070BD70B5B74E0446B94D307850 +:109DD000022800D0FFDFAC4200D3FFDF7169B64834 +:109DE000012903D847F23052944201DD0322427127 +:109DF000491C7161291BC160AF497078BDE8704092 +:109E0000F6F722B970B5A84C0D466178884200D0AB +:109E1000FFDFA84E092D4FD2DFE805F04E052231B5 +:109E20004E4E4E4E3C002078022800D0FFDF03202B +:109E30002070A078022802D0012804D008E0A06891 +:109E400000F0F4FB04E004F1080007C8FFF7A1FFED +:109E5000052020700020A070BDE87040F5F7D5BB4C +:109E6000F5F7A2FC01466068F6F7E6FEB04202D2C2 +:109E7000616902290BD30320F7F746F912E0F5F7E1 +:109E800093FC01466068F6F7D7FEB042F3D2BDE816 +:109E9000704098E7207802280AD0052806D0FFDF16 +:109EA00004202070BDE8704000F0F4B8022000E00B +:109EB0000320F7F729F9F3E7FFDF70BD70B505461A +:109EC000F5F772FC784C60602078012800D0FFDF45 +:109ED00079490220087000220A718D6004224A71BB +:109EE000744ACA6020706078BDE87040F6F7ACB87C +:109EF00010B56D4CA07808B9207808B1112010BDBC +:109F00006E48F5F7ECFB6070607820B1012020709E +:109F10000020606110BD032010BD0246010B01202E +:109F2000B2F5003F02D2884000F014BFB2F5802F96 +:109F300003D22039884000F015BFB2F5C02F03D2FC +:109F40004039884000F017BFB2F5002F03D26039C6 +:109F5000884000F019BF002070472DE9F0411446F9 +:109F600000EB84070E4605463F1F00F072FB4FF0E2 +:109F700080510A69504306EB8402121FB24201D29B +:109F8000012200E000221CB10969B4EB910F02D953 +:109F90000920BDE8F0814A498D4216D3AF4214D35F +:109FA000854205D2874203D245EA0600800701D0E8 +:109FB0001020EEE78E4208D33AB92846FFF7ADFFEE +:109FC00018B93846FFF7A9FF08B10F20E1E73D486F +:109FD0003D490068884205D0224631462846FFF7B1 +:109FE000D8FE10E0FFF784FF0028D2D12E480121CF +:109FF0008560C0E9036481704FF4A97104FB01F02E +:10A000001830FFF75BFF0020C3E770B54FF08055B5 +:10A01000044628692A49B1FBF0F084420AD300F0D3 +:10A0200018FBA04201D8102070BD28696043FFF7DB +:10A0300074FF08B10F2070BD224823490068884290 +:10A0400004D02869604300F0F1FA0CE0FFF750FFFC +:10A050000028F0D129691448614381600221817090 +:10A060001A48FFF72BFF002070BD1548010B012097 +:10A070008840401E704770B50D460446FFF7F5FF57 +:10A08000204201D00F2070BD29462046BDE8704017 +:10A0900000F083BE10B5044C6078F5F76FFB00202C +:10A0A0002070A07010BD00005801002004E50140A0 +:10A0B00000E40140105C0C0068110020059E0100C6 +:10A0C00000C0010098000020BEBAFECA7C5E0100FC +:10A0D0000021017008467047014600200870704753 +:10A0E000EFF3108101F0010172B60278012A01D06C +:10A0F000012200E000220123037001B962B60AB117 +:10A10000002070474FF400507047E9E7EFF31081EB +:10A1100011F0010F72B64FF00002027000D162B66A +:10A1200000207047F2E700004C49096801600020F8 +:10A1300070474A4908600020704701218A0720B112 +:10A14000012804D042F204007047916700E0D16713 +:10A150000020704742490120086042F20600704723 +:10A1600008B504233E4A1907103230B1C1F8043350 +:10A17000106840F0010010600BE0106820F0010052 +:10A180001060C1F808330020C1F8080135480068A4 +:10A190000090002008BD3249103140B101280AD09A +:10A1A00002280FD0032812D042F205007047086839 +:10A1B00020F01E0003E0086820F01E00801C0860EC +:10A1C00000207047086820F01E00001DF7E70868AF +:10A1D00020F01E00801DF2E7214924310A68024365 +:10A1E0000A60002070471E4924310A6882430A60D1 +:10A1F000002070471A492431096801600020704727 +:10A2000017491C310A6802430A600020704714494C +:10A210001C310A6882430A600020704710491C31D3 +:10A22000096801600020704702000F494FF00000EC +:10A2300003D0012A01D0072070470A6070474FF011 +:10A2400080410020C1F808014FF0E020802180F813 +:10A2500000140121C0F80011704700000004004004 +:10A260000005004008010040780500406249634B4A +:10A270000A6863499A42096801D1C1F3100101607B +:10A28000002070475C495D4B0A685D49091D9A4290 +:10A2900001D1C0F310000860002070475649574BA9 +:10A2A0000A68574908319A4201D1C0F3100008608A +:10A2B0000020704730B5504B504D1C6842F20803E7 +:10A2C000AC4202D0142802D203E0112801D3184670 +:10A2D00030BDC3004B481844C0F81015C0F8142511 +:10A2E000002030BD4449454B0A6842F209019A42B8 +:10A2F00002D0062802D203E0042801D308467047A2 +:10A30000404A012142F83010002070473A493B4B47 +:10A310000A6842F209019A4202D0062802D203E0FA +:10A32000042801D308467047364A012102EBC000D9 +:10A3300041600020704770B52F4A304E314C15688F +:10A3400042F2090304EB8002B54204D0062804D28D +:10A35000C2F8001807E0042801D3184670BDC1F305 +:10A360001000C2F80008002070BD70B5224A234ECC +:10A37000244C156842F2090304EB8002B54204D074 +:10A38000062804D2D2F8000807E0042801D31846B2 +:10A3900070BDD2F80008C0F310000860002070BD46 +:10A3A000174910B50831184808601120154A0021D6 +:10A3B00002EBC003C3F81015C3F81415401C142891 +:10A3C000F6D3002006E0042804D302EB8003C3F890 +:10A3D000001807E002EB8003D3F80048C4F3100430 +:10A3E000C3F80048401C0628EDD310BD04490648B8 +:10A3F000083108607047000098000020BEBAFECA0D +:10A4000000F5014000F001400000FEFF10B572B6FB +:10A4100000F0C2F850B1E6F773FFF5F7DEF8F6F793 +:10A4200019FEEFF72AF861490020086062B60020A3 +:10A4300010BD2DE9F0410F46044672B600F0ACF8AD +:10A4400018B162B60820BDE8F081E6F7CFFEE6F766 +:10A4500059FF064600256909890001F1E02105F050 +:10A460001F00D1F80011C140C80717D0202D03D21A +:10A4700026FA05F0C00716D168B2002806DA00F007 +:10A480000F0000F1E02090F8140D03E000F1E0204F +:10A4900090F80004400900F0E5F820B16D1C642D2F +:10A4A000D9D324B104E062B641F20100CBE7404CBD +:10A4B0002078022803D962B64FF48050C3E73D49A3 +:10A4C000802081F8140DEEF7AFFF20780028607827 +:10A4D00001D058B908E048B1202807D8A078212831 +:10A4E00004D8012802D003E0A07808B10720AAE729 +:10A4F0002E493148086031480760E6F703FF2146DE +:10A50000F6F78EFDF5F71DF800F0F4F9FFF73CFCC7 +:10A510002046E6F7C3FE040062B603D0FFF776FFDD +:10A52000204690E700208EE710B5044600F034F88E +:10A5300000B101202070002010BD214908600020DA +:10A54000704770B50C461F490D681E491E4E0831F4 +:10A550000E60102807D011280CD012280FD0132815 +:10A5600011D0012013E0D4E90001FFF762FF354666 +:10A5700020600DE0FFF74AFF0025206008E020681A +:10A58000FFF7D2FF03E00E4920680860002020603A +:10A590000C48001D056070BD0448074900688842EA +:10A5A00001D1012070470020704700009800002072 +:10A5B0006CB601000BE000E0BEBAFECA70010020DC +:10A5C000040000201005024001000001F0B585B034 +:10A5D0000F460646FEF7D4FD04467078694600F043 +:10A5E0001F053846F3F751F8C0B1012C07BF019998 +:10A5F000B1F80310032005B018BFF0BD091D89B2E2 +:10A600002844884238BF012008BF00209CBF05B005 +:10A61000F0BD00BF05B04FF00200F0BD022CF9D133 +:10A62000042D28BFB6F80310F4D3E7E70B4A022144 +:10A6300011600B490B68002BFCD0084B1B1D1860E8 +:10A6400008680028FCD00020106008680028FCD0B2 +:10A6500070474FF0805040697047000004E50140AA +:10A6600000E40140082808D238B1042805D00128A8 +:10A6700003D0052801D0012070470020704710B595 +:10A68000044600F0F5F880B1204600F0E2F8FFF74C +:10A69000E9FF68B17D4A04F01F010120137888406A +:10A6A0004BB15168084350600BE042F2010010BD0D +:10A6B00042F2020010BD6109890001F1E021C1F8F8 +:10A6C0000001002010BD10B5044600F0D1F850B1D3 +:10A6D0006E4A04F01F0101201378884033B151689D +:10A6E0008143516008E042F2010010BD6109890018 +:10A6F00001F1E021C1F88001002010BD70B50D46C8 +:10A70000044600F0B5F878B16009800000F1E0205F +:10A71000D0F8000204F01F0201219140084000D04F +:10A7200001202860002070BD42F2010070BD10B50C +:10A73000044600F09DF858B104F01F010120884044 +:10A740006109890001F1E021C1F80002002010BD7B +:10A7500042F2010010BD10B5044600F089F858B16E +:10A7600004F01F01012088406109890001F1E02106 +:10A77000C1F88002002010BD42F2010010BD70B58A +:10A780000D46044600F074F870B12846FFF76AFFE2 +:10A7900068B16807000E002C0CDA04F00F0101F11B +:10A7A000E02181F8140D09E042F2010070BD42F28F +:10A7B000020070BD04F1E02484F80004002070BDA4 +:10A7C00070B50C46054600F053F830B1284600F04D +:10A7D00040F8C0B22060002070BD42F2010070BDA0 +:10A7E000BFF34F8F2A4801682A4A01F4E061114300 +:10A7F0000160BFF34F8FFEE770B50546F7F700F92C +:10A8000008B1072070BD214C0120217889B9207042 +:10A8100072B6F6F72EFC4FF0E026D6F8801106F55A +:10A82000C07681436160F6F724FCC043306062B6B5 +:10A8300000202870002070BD14490A783AB130B960 +:10A840004FF0E0224868C2F80001002008700020A4 +:10A850007047002806DA00F00F0000F1E02090F8C1 +:10A86000140D03E000F1E02090F800044009704767 +:10A8700010B50446642807DAF6F7FBFB0121A14076 +:10A88000084201D1012010BD002010BD740100203C +:10A890000CED00E00400FA0510B54FF000040B4683 +:10A8A0000200204621461ED0012A04D0022A04D0EC +:10A8B000032A1DD103E0012002E0022013E003205F +:10A8C000072B15D2DFE803F0140406080A0C0E006B +:10A8D000012108E0022106E0032104E0042102E056 +:10A8E000052100E00621F4F713FF08B1204610BD52 +:10A8F0000724FBE7FE4805218170002101704170AB +:10A90000C17081607047FB490A78022A06D0CA6884 +:10A910001044C860C8683238F6F749B98A681044EC +:10A9200088608868F7E70378F349F44A13B1012B8C +:10A930000ED011E00379012B00D06BB943790BB134 +:10A94000012B09D18368643B8B4205D2C0680EE0BD +:10A950000379012B02D00BB10020704743790BB172 +:10A96000012BF9D1C368643B8B42F5D280689042D9 +:10A97000F2D8012070472DE9F04704460226F5F78A +:10A98000C6FD006800B1FFDFD94D01273CB120783A +:10A99000B0B1012805D0022810D0032813D02F71A0 +:10A9A0000CE06068C82807D3F6F771F920B1606839 +:10A9B000FFF7A9FF012603E0002601E000F0AFF950 +:10A9C0003046BDE8F08728780028F7D16068FFF7A7 +:10A9D000AAFF0028E3D06068DFF81883007810B37E +:10A9E000A878042800D0FFDF0020474688F8000040 +:10A9F00060680079C0B30020387160684079A0B306 +:10AA00000420787160688168E868F5F78FF9B860AC +:10AA10006068C0683230F8600320A870B549E878F3 +:10AA2000F5F712FBCAE74FF00209404688F800909C +:10AA300061680979D1B10021017161684979B9B1C1 +:10AA40000421417161688968323181606168C96837 +:10AA5000C160C068A64C14346060F4F7A5FE2060A5 +:10AA60006F7085F80290A9E704E005E00321E3E7B1 +:10AA70000321E6E70120BFE70320C2E72DE9F04705 +:10AA80009B4C8846E178884200D0FFDFDFF8609277 +:10AA900000250127974E09F11409B8F1090F76D264 +:10AAA000DFE808F0050D2A3D646A769E7E00A078F6 +:10AAB000032886D0A078022883D0FFDF81E7A07822 +:10AAC000032803D0A078022800D0FFDF0420A07064 +:10AAD0002571207800285FD1FFF715FF3078022814 +:10AAE00006D0B068E06000F06CF92061002048E01A +:10AAF000E078F5F739F9F5E7A078032803D0A078D6 +:10AB0000022800D0FFDF207878BBA078032812D17C +:10AB1000042026E00420F6F7F7FAA57051E7A078A4 +:10AB2000032803D0A078022800D0FFDF2078E0B906 +:10AB3000A078032814D0F4F737FE01464F46D9F821 +:10AB40000000F6F779F80028E4DB79688142E1DB60 +:10AB5000081AF0606749E078BDE8F047F5F774BA85 +:10AB60000520F6F7D1FAA7702BE724E0A078042897 +:10AB700000D0FFDF022004E0A078042800D0FFDF2F +:10AB80000120A1688847FFF7F6FE05462EE027E082 +:10AB9000A078042800D0FFDFBDE8F04700F0BFB880 +:10ABA000A078042805D0607810B1A078022800D0E1 +:10ABB000FFDF207818B1BDE8F04700F0B9B8207980 +:10ABC00020B10620F6F7A0FA2571CCE7607828B10D +:10ABD0004849E078F5F738FA6570F2E60720C0E7F3 +:10ABE000FFDFEEE63DB1012D03D0FFDF022DF9D1ED +:10ABF000E7E60420C5E70320C3E770B5050005D0EC +:10AC00003B4CA078052803D0112070BD102070BDEA +:10AC10003B48F4F764FDE070E07818B1A5600020CF +:10AC2000A07070BD032070BD314810B5017809B126 +:10AC3000112010BD817805290CD0817801290BD015 +:10AC4000817849B1012101708178012904D080788F +:10AC500010B103E00F2010BD00F06AF8002010BD15 +:10AC60002DE9F041224E0446B07808B101280AD1FE +:10AC700064B12046FFF757FE50B120781D4D48B112 +:10AC8000B078012822D00F20BDE8F0811020FBE72A +:10AC90000720F9E702272F70207998B1002028714A +:10ACA000607988B104206871A0683230A860E068DB +:10ACB000E860E8680E4C14346060F4F775FD2060BD +:10ACC000B77022E00320EAE70320ECE700202870B9 +:10ACD000207900B3002028716079F0B104206871F8 +:10ACE000A168F068F5F722F8A860E068323009E062 +:10ACF0007C010020781100203D860100FF1FA10784 +:10AD00007DAA0100E8600320B0701049F078F5F7E3 +:10AD10009BF90020B8E70320DDE70320DFE70C48BC +:10AD200010B5006900F045F8BDE81040F4F76DBCBF +:10AD300010B5074CE078F4F721FD0820F6F7E4F9A8 +:10AD40000520A07000202070607010BD78110020D8 +:10AD50007C0100201F490968014201D00120704791 +:10AD6000002070471B49091D0968014201D00120DC +:10AD7000704700207047174910310968014201D01F +:10AD800001207047002070471249143109680142C0 +:10AD900001D0012070470020704710B50D4C206095 +:10ADA000201D01600B4810300260001D0360002070 +:10ADB00010BD09490A6848F202139A4302430A6027 +:10ADC0007047054A116848F2021301EA03009943EB +:10ADD0001160704700060040C806024040EA0103C7 +:10ADE00010B59B070FD1042A0DD310C808C9121F34 +:10ADF0009C42F8D020BA19BA884201D9012010BD6E +:10AE00004FF0FF3010BD1AB1D30703D0521C07E03A +:10AE1000002010BD10F8013B11F8014B1B1B07D19E +:10AE200010F8013B11F8014B1B1B01D1921EF1D10F +:10AE3000184610BD032A40F2308010F0030C00F0D9 +:10AE4000158011F8013BBCF1020F624498BF11F864 +:10AE500001CB00F8013B38BF11F8013BA2F104021D +:10AE600098BF00F801CB38BF00F8013B11F0030395 +:10AE700000F02580083AC0F0088051F8043B083AF9 +:10AE800051F804CBA0E80810F5E7121D5CBF51F89B +:10AE9000043B40F8043BAFF30080D20724BF11F815 +:10AEA000013B11F801CB48BF11F8012B24BF00F87A +:10AEB000013B00F801CB48BF00F8012B704710B5EB +:10AEC000203AC0F00B80B1E81850203AA0E81850A2 +:10AED000B1E81850A0E81850BFF4F5AF5FEA027C63 +:10AEE00024BFB1E81850A0E8185044BF18C918C0D2 +:10AEF000BDE810405FEA827C24BF51F8043B40F873 +:10AF0000043B08BF7047D20728BF31F8023B48BF57 +:10AF100011F8012B28BF20F8023B48BF00F8012B95 +:10AF200070474FF000020429C0F0128010F0030CAB +:10AF300000F01B80CCF1040CBCF1020F18BF00F82C +:10AF4000012BA8BF20F8022BA1EB0C0100F00DB8DB +:10AF50005FEAC17C24BF00F8012B00F8012B48BF39 +:10AF600000F8012B70474FF0000200B513469446DD +:10AF70009646203922BFA0E80C50A0E80C50B1F151 +:10AF80002001BFF4F7AF090728BFA0E80C5048BF65 +:10AF90000CC05DF804EB890028BF40F8042B08BF03 +:10AFA000704748BF20F8022B11F0804F18BF00F8FF +:10AFB000012B70477047704770477047164B1860F9 +:10AFC000164B1960164B1A607047FEDF042071465D +:10AFD00008421BD10699134A914217DC069902399F +:10AFE0004878DF2812D10878FE2808D0FF280DD134 +:10AFF0004FF001004FF000020B4B1B68184741F265 +:10B0000001000099019A084B1B681847069805999A +:10B01000064B1B68DB6818479C010020A00100203C +:10B02000A401002000C001007001002004000020E5 +:10B03000204821497047FFF7FBFFE6F7AFF800BD56 +:10B0400001200007C06AC0B2FF2806D14FF0FF30D0 +:10B050004FF010210968884203D018484FF00801CA +:10B0600001604FF4805016490968884203D1154A9F +:10B0700013605B68184700BD20BFFDE74FF48050A8 +:10B080000F490968884210D10F4B18684FF0FF3103 +:10B090008842F1D080F308884FF02021884204DDF7 +:10B0A0000A48026802210A430260094880470948A9 +:10B0B0008047FFDF88110020881100202C05004008 +:10B0C000000000200400002000C001002405004012 +:10B0D0008D1A010041B0010004207146084202D0DF +:10B0E000EFF3098101E0EFF3088188690238007805 +:10B0F000102813DB20280FDB2B280BDB0A4A1268F1 +:10B100000A4B9A4203D1602804DB094A1047022007 +:10B1100008607047074A1047074A1047074A1268F5 +:10B120002C3212681047000098000020BEBAFECAF8 +:10B1300009130000ED9B010043A50100040000205D +:10B140000E4B0F4908470F4B0D4908470E4B0C4952 +:10B1500008470E4B0A4908470D4B094908470D4B54 +:10B16000074908470C4B064908470C4B0449084758 +:10B170000B4B034908470B4B01490847A3910000BB +:10B180006D960000A52F0000C98D00004D8D0000B8 +:10B190007F930000251300004F740000C38E000051 +:10B1A000F5950000A91100000021016041600172C5 +:10B1B00070470A6802600B7903717047AB7B00002F +:10B1C0004B7D00007F7B0000457E0000697E000013 +:10B1D000A37E0000D77E0000117F0000417F0000A9 +:10B1E000937F000091120000911200009112000064 +:10B1F000911200009112000091120000F122000053 +:10B2000093230000B3230000BD240000FB1E0000B8 +:10B2100005270000E527000005280000C72D0000D5 +:10B22000EB2D00001B2D00006F2D00001D2E0000D7 +:10B23000A72E0000B3410000774300001F47000025 +:10B2400039480000BD48000063490000D3490000B0 +:10B25000ED4A0000BB4B0000374C00001F280000E7 +:10B26000252800002F280000BD1E0000FB2800003C +:10B270008F1E0000552A0000911200001555000095 +:10B280009B550000B7550000D355000047570000FC +:10B29000FD55000007560000495600006B5600009F +:10B2A0002D57000091120000911200009112000031 +:10B2B0009112000091120000911200001F6D000019 +:10B2C0003F6D0000416D00007B6D0000A96D000026 +:10B2D000936E00003D6F0000516F00009D6F0000F5 +:10B2E000957000003B7200006B730000195F000056 +:10B2F00091120000911200009112000023890000B9 +:10B300006189000083890000100110013A020000E9 +:10B310001A02000069740000F9760000FFFFFFFFC9 +:10B320000000FFFF2F850000CF1B000041520000EE +:10B33000635F0000977600000000000023002300F8 +:10B3400046004D0023002300F5000000000000002F +:10B35000000000001DBB0000000000000000000015 +:10B3600000000000A5C80000000000000000000070 +:10B37000000000007DBB000003BC000000000000D6 +:10B380000000000003BF0000ABBC0000E3C10000F0 +:10B39000000000000000000025CD000000000000BB +:10B3A0000000000000000000B7BF00007BC90000E3 +:10B3B000000000004FCA0000C3CA000000000000E7 +:10B3C0007DC2000059C300000000000089CA0000CF +:10B3D000B9C3000045C60000A9C600009FC7000011 +:10B3E00085C1000039C80000000000009DC00000B9 +:10B3F0000000000095BD00000FBD0000E5C8000082 +:10B4000001CC00006FCC00000000000075BF000000 +:10B410003BBD00002DBF000063CE0000CBBE00008E +:10B4200073CD000000000000D1CC000079BC00000A +:10B43000AFBB0000E9BD0000E7BC0000E3CD0000A9 +:10B4400001CF000005C00000C1CE00008B38000015 +:10B450008B380000CD22000099840000D9610000E3 +:10B46000115200000000000029710100D1380000D5 +:10B47000D1380000EF220000ED840000536200008C +:10B480001B520000356901004F710100BC01BC0175 +:10B490003E002C0044000E00D800200101000000F6 +:10B4A000010000000001020304001011121300004B +:10B4B0000014000063940100C9990100979A0100EB +:10B4C000E99A0100359B0100899B0100BD940100B0 +:10B4D000E1950100499601006D9801005399010022 +:10B4E00013DE000017EF00001B5C01006D4E010031 +:10B4F0003F5C01006F4E0100453101004F840100A7 +:10B500007D4101004F840100B1310100BF85010080 +:10B510003B3B0100BF850100BD3001004D850100AE +:10B52000AF4001004D850100555555D6BE898E00AE +:10B5300000006606F30C801300000A033B066C094A +:10B5400000005604D308500D555555252627D6BE64 +:10B55000898EF401FA00960064004B0032001E0050 +:10B56000140000000300656C74620000000000001D +:10B570000000000000000000000087000000000044 +:10B5800000000000000000000000BE83605ADB0BDA +:10B59000376038A5F5AA9183886C00006DA2010080 +:10B5A00085A201009DA20100B5A20100E5A2010053 +:10B5B0000DA3010037A301006BA301000BA0010044 +:10B5C0005B9F010077A00100D1A00100E1A0010074 +:10B5D0000DA101007FA60100C7A60100FDA6010084 +:10B5E0002FA7010057A701007FA70100C1A70100F5 +:10B5F000E1A70100F9A7010039A80100BF1201006D +:10B60000C7120100D51201003BA1010055A10100A4 +:10B6100029A1010033A1010061A1010097A101004E +:10B62000D9A10100E7A10100F5A1010001A20100DB +:10B630000FA201001DA2010029A2010000000000CC +:10B64000678F0000BD8F0000D38F000099A8010014 +:10B65000619C0100219D0100FBAB010029AC0100B0 +:10B6600061AC0100B51001008D1501000010020051 +:10B6700090B6010008000020A00100004411000065 +:10B68000B4B60100A8010020E00F00008011000006 +:10B6900001593601000100683720FB349B5F8004AC +:10B6A0001F800010022001337F0102E429E4BDAFB6 +:04B6B0000100000095 +:00000001FF diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_advertising/ble_advertising.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_advertising/ble_advertising.c new file mode 100644 index 0000000000..959ecb10dc --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_advertising/ble_advertising.c @@ -0,0 +1,566 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + */ + + +#include "ble_advdata.h" +#include "ble_advertising.h" +#include "nrf_soc.h" +#include "nrf_log.h" +#include "pstorage.h" +#include "fstorage.h" +#include "sdk_common.h" + + +#define ADV_LOG(...) + +static bool m_advertising_start_pending = false; /**< Flag to keep track of ongoing operations on persistent memory. */ + +static ble_gap_addr_t m_peer_address; /**< Address of the most recently connected peer, used for direct advertising. */ +static ble_advdata_t m_advdata; /**< Used by the initialization function to set name, appearance, and UUIDs and advertising flags visible to peer devices. */ +static ble_adv_evt_t m_adv_evt; /**< Advertising event propogated to the main application. The event is either a transaction to a new advertising mode, or a request for whitelist or peer address.. */ +static ble_advertising_evt_handler_t m_evt_handler; /**< Handler for the advertising events. Can be initialized as NULL if no handling is implemented on in the main application. */ +static ble_advertising_error_handler_t m_error_handler; /**< Handler for the advertising error events. */ + +static ble_adv_mode_t m_adv_mode_current; /**< Variable to keep track of the current advertising mode. */ +static ble_adv_modes_config_t m_adv_modes_config; /**< Struct to keep track of disabled and enabled advertising modes, as well as time-outs and intervals.*/ + +static ble_gap_whitelist_t m_whitelist; /**< Struct that points to whitelisted addresses. */ +static ble_gap_addr_t * mp_whitelist_addr[BLE_GAP_WHITELIST_ADDR_MAX_COUNT]; /**< Pointer to a list of addresses. Pointed to by the whitelist */ +static ble_gap_irk_t * mp_whitelist_irk[BLE_GAP_WHITELIST_IRK_MAX_COUNT]; /**< Pointer to a list of Identity Resolving Keys (IRK). Pointed to by the whitelist */ +static bool m_whitelist_temporarily_disabled = false; /**< Flag to keep track of temporary disabling of the whitelist. */ +static bool m_whitelist_reply_expected = false; /**< Flag to verify that whitelist is only set when it is requested. */ +static bool m_peer_addr_reply_expected = false; /**< Flag to verify that peer address is only set when requested. */ + +static ble_advdata_manuf_data_t m_manuf_specific_data; /**< Manufacturer specific data structure*/ +static uint8_t m_manuf_data_array[BLE_GAP_ADV_MAX_SIZE]; /**< Array to store the Manufacturer specific data*/ +static ble_advdata_service_data_t m_service_data; /**< Service data structure. */ +static uint8_t m_service_data_array[BLE_GAP_ADV_MAX_SIZE]; /**< Array to store the service data. */ +static ble_advdata_conn_int_t m_slave_conn_int; /**< Connection interval range structure.*/ +static int8_t m_tx_power_level; /**< TX power level*/ + + +/**@brief Function for checking that the whitelist has entries. + */ +static bool whitelist_has_entries(ble_gap_whitelist_t const * whitelist) +{ + if ((whitelist->addr_count != 0) || (whitelist->irk_count != 0)) + { + return true; + } + return false; +} + + +/**@brief Function for setting the stored peer address back to zero. + */ +static void ble_advertising_peer_address_clear() +{ + memset(&m_peer_address, 0, sizeof(m_peer_address)); +} + + +/**@brief Function for checking if an address is non-zero. Used to determine if + */ +static bool peer_address_exists(uint8_t const * address) +{ + uint32_t i; + + for (i = 0; i < BLE_GAP_ADDR_LEN; i++) + { + if (address[i] != 0) + { + return true; + } + } + return false; +} + + +uint32_t ble_advertising_init(ble_advdata_t const * p_advdata, + ble_advdata_t const * p_srdata, + ble_adv_modes_config_t const * p_config, + ble_advertising_evt_handler_t const evt_handler, + ble_advertising_error_handler_t const error_handler) +{ + uint32_t err_code; + + VERIFY_PARAM_NOT_NULL(p_advdata); + VERIFY_PARAM_NOT_NULL(p_config); + + m_adv_mode_current = BLE_ADV_MODE_IDLE; + m_evt_handler = evt_handler; + m_error_handler = error_handler; + m_adv_modes_config = *p_config; + + ble_advertising_peer_address_clear(); + + // Prepare Whitelist. Address and IRK double pointers point to allocated arrays. + m_whitelist.pp_addrs = mp_whitelist_addr; + m_whitelist.pp_irks = mp_whitelist_irk; + + // Copy and set advertising data. + memset(&m_advdata, 0, sizeof(m_advdata)); + + // Copy advertising data. + m_advdata.name_type = p_advdata->name_type; + m_advdata.include_appearance = p_advdata->include_appearance; + m_advdata.flags = p_advdata->flags; + m_advdata.short_name_len = p_advdata->short_name_len; + /* + if(p_advdata->uuids_complete != NULL) + { + m_advdata.uuids_complete = p_advdata->uuids_complete; + } + */ + m_advdata.uuids_complete = p_advdata->uuids_complete; + m_advdata.uuids_more_available = p_advdata->uuids_more_available; + m_advdata.uuids_solicited = p_advdata->uuids_solicited; + + if(p_advdata->p_manuf_specific_data != NULL) + { + m_advdata.p_manuf_specific_data = &m_manuf_specific_data; + m_manuf_specific_data.data.p_data = m_manuf_data_array; + m_advdata.p_manuf_specific_data->company_identifier = + p_advdata->p_manuf_specific_data->company_identifier; + m_advdata.p_manuf_specific_data->data.size = p_advdata->p_manuf_specific_data->data.size; + + for(uint32_t i = 0; i < m_advdata.p_manuf_specific_data->data.size; i++) + { + m_manuf_data_array[i] = p_advdata->p_manuf_specific_data->data.p_data[i]; + } + } + + if(p_advdata->p_service_data_array != NULL) + { + m_service_data.data.p_data = m_service_data_array; + m_advdata.p_service_data_array = &m_service_data; + m_advdata.p_service_data_array->data.p_data = m_service_data_array; + m_advdata.p_service_data_array->data.size = p_advdata->p_service_data_array->data.size; + m_advdata.p_service_data_array->service_uuid = p_advdata->p_service_data_array->service_uuid; + + for(uint32_t i = 0; i < m_advdata.p_service_data_array->data.size; i++) + { + m_service_data_array[i] = p_advdata->p_service_data_array->data.p_data[i]; + } + + m_advdata.service_data_count = p_advdata->service_data_count; + } + + + if(p_advdata->p_slave_conn_int != NULL) + { + m_advdata.p_slave_conn_int = &m_slave_conn_int; + m_advdata.p_slave_conn_int->max_conn_interval = p_advdata->p_slave_conn_int->max_conn_interval; + m_advdata.p_slave_conn_int->min_conn_interval = p_advdata->p_slave_conn_int->min_conn_interval; + } + + if(p_advdata->p_tx_power_level != NULL) + { + m_advdata.p_tx_power_level = &m_tx_power_level; + m_advdata.p_tx_power_level = p_advdata->p_tx_power_level; + } + err_code = ble_advdata_set(&m_advdata, p_srdata); + return err_code; +} + +/** @brief Function to determine if a flash access in in progress. If it is the case, we can not +* start advertising until it is finished. attempted restart +* in @ref ble_advertising_on_sys_evt +* +* @return true if a flash access is in progress, false if not. +*/ +static bool flash_access_in_progress() +{ + uint32_t err_code; + uint32_t count = 0; + + err_code = pstorage_access_status_get(&count); + if ((err_code != NRF_ERROR_INVALID_STATE) && (err_code != NRF_SUCCESS)) + { + ADV_LOG("[ADV]: pstorage_access_status_get returned %d.\r\n", err_code); + return true; + } + + if (err_code == NRF_ERROR_INVALID_STATE) + { + err_code = fs_queued_op_count_get(&count); + if (err_code != FS_SUCCESS) + { + return false; + } + ADV_LOG("[ADV]: fs_queued_op_count_get gives count %d.\r\n", count); + } + + if(count != 0) + { + return true; + } + else + { + return false; + } +} + +uint32_t ble_advertising_start(ble_adv_mode_t advertising_mode) +{ + uint32_t err_code; + ble_gap_adv_params_t adv_params; + + m_adv_mode_current = advertising_mode; + + // Verify if there are any pending flash operations. If so, delay starting advertising until + // the flash operations are complete. + if(flash_access_in_progress()) + { + m_advertising_start_pending = true; + return NRF_SUCCESS; + } + + ADV_LOG("[ADV]: no flash operations in progress, prepare advertising.\r\n"); + // Fetch the peer address. + ble_advertising_peer_address_clear(); + + if ( ((m_adv_modes_config.ble_adv_directed_enabled) && (m_adv_mode_current == BLE_ADV_MODE_DIRECTED)) + ||((m_adv_modes_config.ble_adv_directed_slow_enabled) && (m_adv_mode_current == BLE_ADV_MODE_DIRECTED)) + ||((m_adv_modes_config.ble_adv_directed_slow_enabled) && (m_adv_mode_current == BLE_ADV_MODE_DIRECTED_SLOW)) + ) + { + if (m_evt_handler != NULL) + { + m_peer_addr_reply_expected = true; + m_evt_handler(BLE_ADV_EVT_PEER_ADDR_REQUEST); + } + else + { + m_peer_addr_reply_expected = false; + } + } + + // If a mode is disabled, continue to the next mode. I.e fast instead of direct, slow instead of fast, idle instead of slow. + if ( (m_adv_mode_current == BLE_ADV_MODE_DIRECTED) + &&(!m_adv_modes_config.ble_adv_directed_enabled || !peer_address_exists(m_peer_address.addr))) + { + m_adv_mode_current = BLE_ADV_MODE_DIRECTED_SLOW; + } + if ( (m_adv_mode_current == BLE_ADV_MODE_DIRECTED_SLOW) + &&(!m_adv_modes_config.ble_adv_directed_slow_enabled || !peer_address_exists(m_peer_address.addr))) + { + m_adv_mode_current = BLE_ADV_MODE_FAST; + } + if (!m_adv_modes_config.ble_adv_fast_enabled && m_adv_mode_current == BLE_ADV_MODE_FAST) + { + m_adv_mode_current = BLE_ADV_MODE_SLOW; + } + if (!m_adv_modes_config.ble_adv_slow_enabled && m_adv_mode_current == BLE_ADV_MODE_SLOW) + { + m_adv_mode_current = BLE_ADV_MODE_IDLE; + m_adv_evt = BLE_ADV_EVT_IDLE; + } + + // Fetch the whitelist. + if ( (m_evt_handler != NULL) + && (m_adv_mode_current == BLE_ADV_MODE_FAST || m_adv_mode_current == BLE_ADV_MODE_SLOW) + && (m_adv_modes_config.ble_adv_whitelist_enabled) + && (!m_whitelist_temporarily_disabled)) + { + m_whitelist_reply_expected = true; + m_evt_handler(BLE_ADV_EVT_WHITELIST_REQUEST); + } + else + { + m_whitelist_reply_expected = false; + } + + // Initialize advertising parameters with default values. + memset(&adv_params, 0, sizeof(adv_params)); + + adv_params.type = BLE_GAP_ADV_TYPE_ADV_IND; + adv_params.p_peer_addr = NULL; + adv_params.fp = BLE_GAP_ADV_FP_ANY; + adv_params.p_whitelist = NULL; + + // Set advertising parameters and events according to selected advertising mode. + switch (m_adv_mode_current) + { + case BLE_ADV_MODE_DIRECTED: + ADV_LOG("[ADV]: Starting direct advertisement.\r\n"); + adv_params.p_peer_addr = &m_peer_address; // Directed advertising. + adv_params.type = BLE_GAP_ADV_TYPE_ADV_DIRECT_IND; + adv_params.timeout = 0; + adv_params.interval = 0; + m_adv_evt = BLE_ADV_EVT_DIRECTED; + break; + + case BLE_ADV_MODE_DIRECTED_SLOW: + ADV_LOG("[ADV]: Starting direct advertisement.\r\n"); + adv_params.p_peer_addr = &m_peer_address; // Directed advertising. + adv_params.type = BLE_GAP_ADV_TYPE_ADV_DIRECT_IND; + adv_params.timeout = m_adv_modes_config.ble_adv_directed_slow_timeout; + adv_params.interval = m_adv_modes_config.ble_adv_directed_slow_interval; + m_adv_evt = BLE_ADV_EVT_DIRECTED_SLOW; + break; + + case BLE_ADV_MODE_FAST: + adv_params.timeout = m_adv_modes_config.ble_adv_fast_timeout; + adv_params.interval = m_adv_modes_config.ble_adv_fast_interval; + + if ( whitelist_has_entries(&m_whitelist) + && m_adv_modes_config.ble_adv_whitelist_enabled + && !m_whitelist_temporarily_disabled) + { + adv_params.fp = BLE_GAP_ADV_FP_FILTER_CONNREQ; + adv_params.p_whitelist = &m_whitelist; + m_advdata.flags = BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED; + err_code = ble_advdata_set(&m_advdata, NULL); + VERIFY_SUCCESS(err_code); + + m_adv_evt = BLE_ADV_EVT_FAST_WHITELIST; + ADV_LOG("[ADV]: Starting fast advertisement with whitelist.\r\n"); + } + else + { + m_adv_evt = BLE_ADV_EVT_FAST; + ADV_LOG("[ADV]: Starting fast advertisement.\r\n"); + } + break; + + case BLE_ADV_MODE_SLOW: + adv_params.interval = m_adv_modes_config.ble_adv_slow_interval; + adv_params.timeout = m_adv_modes_config.ble_adv_slow_timeout; + + if ( whitelist_has_entries(&m_whitelist) + && m_adv_modes_config.ble_adv_whitelist_enabled + && !m_whitelist_temporarily_disabled) + { + adv_params.fp = BLE_GAP_ADV_FP_FILTER_CONNREQ; + adv_params.p_whitelist = &m_whitelist; + m_advdata.flags = BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED; + err_code = ble_advdata_set(&m_advdata, NULL); + VERIFY_SUCCESS(err_code); + + m_adv_evt = BLE_ADV_EVT_SLOW_WHITELIST; + ADV_LOG("[ADV]: Starting slow advertisement with whitelist.\r\n"); + } + else + { + m_adv_evt = BLE_ADV_EVT_SLOW; + ADV_LOG("[ADV]: Starting slow advertisement.\r\n"); + } + break; + + default: + break; + } + if (m_adv_mode_current != BLE_ADV_MODE_IDLE) + { + err_code = sd_ble_gap_adv_start(&adv_params); + VERIFY_SUCCESS(err_code); + } + if (m_evt_handler != NULL) + { + m_evt_handler(m_adv_evt); + } + + return NRF_SUCCESS; +} + + +void ble_advertising_on_ble_evt(ble_evt_t const * p_ble_evt) +{ + static uint16_t current_slave_link_conn_handle = BLE_CONN_HANDLE_INVALID; + + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + if (p_ble_evt->evt.gap_evt.params.connected.role == BLE_GAP_ROLE_PERIPH) + { + current_slave_link_conn_handle = p_ble_evt->evt.gap_evt.conn_handle; + } + break; + + // Upon disconnection, whitelist will be activated and direct advertising is started. + case BLE_GAP_EVT_DISCONNECTED: + { + uint32_t err_code; + m_whitelist_temporarily_disabled = false; + + if (p_ble_evt->evt.gap_evt.conn_handle == current_slave_link_conn_handle) + { + err_code = ble_advertising_start(BLE_ADV_MODE_DIRECTED); + if ((err_code != NRF_SUCCESS) && (m_error_handler != NULL)) + { + m_error_handler(err_code); + } + } + break; + } + // Upon time-out, the next advertising mode is started, i.e. go from fast to slow or from slow to idle. + case BLE_GAP_EVT_TIMEOUT: + if (p_ble_evt->evt.gap_evt.params.timeout.src == BLE_GAP_TIMEOUT_SRC_ADVERTISING) + { + switch (m_adv_mode_current) + { + case BLE_ADV_MODE_DIRECTED: + ADV_LOG("[ADV]: Timed out from directed advertising.\r\n"); + { + uint32_t err_code; + err_code = ble_advertising_start(BLE_ADV_MODE_DIRECTED_SLOW); + if ((err_code != NRF_SUCCESS) && (m_error_handler != NULL)) + { + m_error_handler(err_code); + } + } + break; + case BLE_ADV_MODE_DIRECTED_SLOW: + ADV_LOG("[ADV]: Timed out from directed slow advertising.\r\n"); + { + uint32_t err_code; + err_code = ble_advertising_start(BLE_ADV_MODE_FAST); + if ((err_code != NRF_SUCCESS) && (m_error_handler != NULL)) + { + m_error_handler(err_code); + } + } + break; + case BLE_ADV_MODE_FAST: + { + uint32_t err_code; + m_adv_evt = BLE_ADV_EVT_FAST; + ADV_LOG("[ADV]: Timed out from fast advertising, starting slow advertising.\r\n"); + err_code = ble_advertising_start(BLE_ADV_MODE_SLOW); + if ((err_code != NRF_SUCCESS) && (m_error_handler != NULL)) + { + m_error_handler(err_code); + } + break; + } + case BLE_ADV_MODE_SLOW: + m_adv_evt = BLE_ADV_EVT_IDLE; + ADV_LOG("[ADV]: Timed out from slow advertising, stopping advertising.\r\n"); + if (m_evt_handler != NULL) + { + m_evt_handler(m_adv_evt); + } + break; + + default: + // No implementation needed. + break; + } + } + break; + + default: + // No implementation needed. + break; + } +} +void ble_advertising_on_sys_evt(uint32_t sys_evt) +{ + uint32_t err_code = NRF_SUCCESS; + switch (sys_evt) + { + + case NRF_EVT_FLASH_OPERATION_SUCCESS: + // Fall through. + + //When a flash operation finishes, advertising no longer needs to be pending. + case NRF_EVT_FLASH_OPERATION_ERROR: + if (m_advertising_start_pending) + { + m_advertising_start_pending = false; + err_code = ble_advertising_start(m_adv_mode_current); + if ((err_code != NRF_SUCCESS) && (m_error_handler != NULL)) + { + m_error_handler(err_code); + } + } + break; + + default: + // No implementation needed. + break; + } +} + +uint32_t ble_advertising_peer_addr_reply(ble_gap_addr_t * p_peer_address) +{ + if(m_peer_addr_reply_expected == false) + { + return NRF_ERROR_INVALID_STATE; + } + + m_peer_address.addr_type = p_peer_address->addr_type; + + for (int i = 0; i < BLE_GAP_ADDR_LEN; i++) + { + m_peer_address.addr[i] = p_peer_address->addr[i]; + } + + m_peer_addr_reply_expected = false; + return NRF_SUCCESS; +} + + +uint32_t ble_advertising_whitelist_reply(ble_gap_whitelist_t * p_whitelist) +{ + uint32_t i; + + if(m_whitelist_reply_expected == false) + { + return NRF_ERROR_INVALID_STATE; + } + + m_whitelist.addr_count = p_whitelist->addr_count; + m_whitelist.irk_count = p_whitelist->irk_count; + + for (i = 0; i < m_whitelist.irk_count; i++) + { + mp_whitelist_irk[i] = p_whitelist->pp_irks[i]; + } + + for (i = 0; i < m_whitelist.addr_count; i++) + { + mp_whitelist_addr[i] = p_whitelist->pp_addrs[i]; + } + + m_whitelist_reply_expected = false; + return NRF_SUCCESS; +} + + +uint32_t ble_advertising_restart_without_whitelist(void) +{ + uint32_t err_code; + + if( m_adv_modes_config.ble_adv_whitelist_enabled == BLE_ADV_WHITELIST_ENABLED + && !m_whitelist_temporarily_disabled) + { + if (m_adv_mode_current != BLE_ADV_MODE_IDLE) + { + err_code = sd_ble_gap_adv_stop(); + VERIFY_SUCCESS(err_code); + } + m_whitelist_temporarily_disabled = true; + m_advdata.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE; + err_code = ble_advdata_set(&m_advdata, NULL); + VERIFY_SUCCESS(err_code); + + err_code = ble_advertising_start(m_adv_mode_current); + if ((err_code != NRF_SUCCESS) && (m_error_handler != NULL)) + { + m_error_handler(err_code); + } + } + return NRF_SUCCESS; +} + + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_advertising/ble_advertising.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_advertising/ble_advertising.h new file mode 100644 index 0000000000..09605e557d --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_advertising/ble_advertising.h @@ -0,0 +1,223 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + */ + + +/**@file + * + * @defgroup ble_sdk_lib_advertising Advertising Module + * @{ + * @ingroup ble_sdk_lib + * @brief Module for handling connectable BLE advertising. + * + * @details The Advertising Module handles connectable advertising for your application. It can + * be configured with advertising modes to suit most typical use cases. + * Your main application can react to changes in advertising modes + * if an event handler is provided. + * + * @note The Advertising Module supports only applications with a single peripheral link. + * + * The application must propagate BLE stack events to this module by calling + * @ref ble_advertising_on_ble_evt() and system events by calling + * @ref ble_advertising_on_sys_evt(). + * + */ + +#ifndef BLE_ADVERTISING_H__ +#define BLE_ADVERTISING_H__ + +#include +#include "ble_gattc.h" +#include "ble.h" +#include "nrf_error.h" +#include "ble_advdata.h" + +/**@brief Advertising modes. +*/ +typedef enum +{ + BLE_ADV_MODE_IDLE, /**< Idle; no connectable advertising is ongoing.*/ + BLE_ADV_MODE_DIRECTED, /**< Directed advertising attempts to connect to the most recently disconnected peer. */ + BLE_ADV_MODE_DIRECTED_SLOW, /**< Directed advertising (low duty cycle) attempts to connect to the most recently disconnected peer. */ + BLE_ADV_MODE_FAST, /**< Fast advertising will connect to any peer device, or filter with a whitelist if one exists. */ + BLE_ADV_MODE_SLOW, /**< Slow advertising is similar to fast advertising. By default, it uses a longer advertising interval and time-out than fast advertising. However, these options are defined by the user. */ +} ble_adv_mode_t; + +/**@brief Advertising events. + * + * @details These events are propagated to the main application if a handler was provided during + * initialization of the Advertising Module. Events for modes that are not used can be + * ignored. Similarly, BLE_ADV_EVT_WHITELIST_REQUEST and BLE_ADV_EVT_PEER_ADDR_REQUEST + * can be ignored if whitelist and direct advertising is not used. + */ +typedef enum +{ + BLE_ADV_EVT_IDLE, /**< Idle; no connectable advertising is ongoing.*/ + BLE_ADV_EVT_DIRECTED, /**< Direct advertising mode has started. */ + BLE_ADV_EVT_DIRECTED_SLOW, /**< Directed advertising (low duty cycle) has started. */ + BLE_ADV_EVT_FAST, /**< Fast advertising mode has started. */ + BLE_ADV_EVT_SLOW, /**< Slow advertising mode has started.*/ + BLE_ADV_EVT_FAST_WHITELIST, /**< Fast advertising mode using the whitelist has started. */ + BLE_ADV_EVT_SLOW_WHITELIST, /**< Slow advertising mode using the whitelist has started.*/ + BLE_ADV_EVT_WHITELIST_REQUEST, /**< Request a whitelist from the main application. For whitelist advertising to work, the whitelist must be set when this event occurs. */ + BLE_ADV_EVT_PEER_ADDR_REQUEST /**< Request a peer address from the main application. For directed advertising to work, the peer address must be set when this event occurs. */ +} ble_adv_evt_t; + +/**@brief Options for the different advertisement modes. + * + * @details This structure is used to enable or disable advertising modes and to configure time-out + * periods and advertising intervals. + */ +typedef struct +{ + bool ble_adv_whitelist_enabled; /**< Enable or disable use of the whitelist. */ + bool ble_adv_directed_enabled; /**< Enable or disable direct advertising mode. */ + bool ble_adv_directed_slow_enabled; /**< Enable or disable direct advertising mode. */ + uint32_t ble_adv_directed_slow_interval; /**< Advertising interval for directed advertising. */ + uint32_t ble_adv_directed_slow_timeout; /**< Time-out (number of tries) for direct advertising. */ + bool ble_adv_fast_enabled; /**< Enable or disable fast advertising mode. */ + uint32_t ble_adv_fast_interval; /**< Advertising interval for fast advertising. */ + uint32_t ble_adv_fast_timeout; /**< Time-out (in seconds) for fast advertising. */ + bool ble_adv_slow_enabled; /**< Enable or disable slow advertising mode. */ + uint32_t ble_adv_slow_interval; /**< Advertising interval for slow advertising. */ + uint32_t ble_adv_slow_timeout; /**< Time-out (in seconds) for slow advertising. */ +}ble_adv_modes_config_t; + + +/**@brief BLE advertising event handler type. */ +typedef void (*ble_advertising_evt_handler_t) (ble_adv_evt_t const adv_evt); + +/**@brief BLE advertising error handler type. */ +typedef void (*ble_advertising_error_handler_t) (uint32_t nrf_error); + +/**@brief Initialization parameters for the Advertising Module. + * @details This structure is used to pass advertising options, advertising data, and an event handler to the Advertising Module during initialization. */ +typedef struct +{ + ble_adv_modes_config_t options; /**< Parameters for advertising modes.*/ + ble_advdata_t advdata; /**< Advertising data. */ + ble_advertising_evt_handler_t evt_handler; /**< Event handler. */ +}ble_adv_init_t; + + +/* Defines to make the mode options easier to set during advertising init.*/ +#define BLE_ADV_DIRECTED_ENABLED true +#define BLE_ADV_DIRECTED_DISABLED false + +#define BLE_ADV_DIRECTED_SLOW_ENABLED true +#define BLE_ADV_DIRECTED_SLOW_DISABLED false + +#define BLE_ADV_FAST_ENABLED true +#define BLE_ADV_FAST_DISABLED false + +#define BLE_ADV_SLOW_ENABLED true +#define BLE_ADV_SLOW_DISABLED false + +#define BLE_ADV_WHITELIST_ENABLED true +#define BLE_ADV_WHITELIST_DISABLED false + + +/**@brief Function for handling BLE events. + * + * @details This function must be called from the BLE stack event dispatcher for + * the module to handle BLE events that are relevant for the Advertising Module. + * + * @param[in] p_ble_evt BLE stack event. + */ +void ble_advertising_on_ble_evt(const ble_evt_t * const p_ble_evt); + + +/**@brief Function for handling system events. + * + * @details This function must be called to handle system events that are relevant + * for the Advertising Module. Specifically, the advertising module can not use the + * softdevice as long as there are pending writes to the flash memory. This + * event handler is designed to delay advertising until there is no flash operation. + * + * @param[in] sys_evt System event. + */ +void ble_advertising_on_sys_evt(uint32_t sys_evt); + + +/**@brief Function for initializing the Advertising Module. + * + * @details Encodes the required advertising data and passes it to the stack. + * Also builds a structure to be passed to the stack when starting advertising. + * The supplied advertising data is copied to a local structure and is manipulated + * depending on what advertising modes are started in @ref ble_advertising_start. + * + * @param[in] p_advdata Advertising data: name, appearance, discovery flags, and more. + * @param[in] p_srdata Scan response data: Supplement to advertising data. + * @param[in] p_config Select which advertising modes and intervals will be utilized. + * @param[in] evt_handler Event handler that will be called upon advertising events. + * @param[in] error_handler Error handler that will propogate internal errors to the main applications. + * + * @retval NRF_SUCCESS If initialization was successful. Otherwise, an error code is returned. + */ +uint32_t ble_advertising_init(ble_advdata_t const * p_advdata, + ble_advdata_t const * p_srdata, + ble_adv_modes_config_t const * p_config, + ble_advertising_evt_handler_t const evt_handler, + ble_advertising_error_handler_t const error_handler); + + +/**@brief Function for starting advertising. + * + * @details You can start advertising in any of the advertising modes that you enabled + * during initialization. + * + * @param[in] advertising_mode Advertising mode. + * + * @retval @ref NRF_SUCCESS On success, else an error code indicating reason for failure. + * @retval @ref NRF_ERROR_INVALID_STATE + */ +uint32_t ble_advertising_start(ble_adv_mode_t advertising_mode); + +/**@brief Function for setting the peer address. + * + * @details The peer address must be set by the application upon receiving a + * @ref BLE_ADV_EVT_PEER_ADDR_REQUEST event. Without the peer address, the directed + * advertising mode will not be run. + * + * @param[in] p_peer_addr Pointer to a peer address. + * + * @retval @ref NRF_SUCCESS Successfully stored the peer address pointer in the advertising module. + * @retval @ref NRF_ERROR_INVALID_STATE If a reply was not expected. + */ +uint32_t ble_advertising_peer_addr_reply(ble_gap_addr_t * p_peer_addr); + + +/**@brief Function for setting a whitelist. + * + * @details The whitelist must be set by the application upon receiving a + * @ref BLE_ADV_EVT_WHITELIST_REQUEST event. Without the whitelist, the whitelist + * advertising for fast and slow modes will not be run. + * + * @param[in] p_whitelist Pointer to a whitelist. + * + * @retval @ref NRF_SUCCESS Successfully stored pointers to the whitelist into the advertising module. + * @retval @ref NRF_ERROR_INVALID_STATE If a reply was not expected. + */ +uint32_t ble_advertising_whitelist_reply(ble_gap_whitelist_t * p_whitelist); + + +/**@brief Function for disabling whitelist advertising. + * + * @details This function temporarily disables whitelist advertising. + * Calling this function resets the current time-out countdown. + * + * @retval @ref NRF_SUCCESS On success, else an error message propogated from the Softdevice. + */ +uint32_t ble_advertising_restart_without_whitelist(void); +/** @} */ + +#endif // BLE_ADVERTISING_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.c new file mode 100644 index 0000000000..6285810603 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.c @@ -0,0 +1,939 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + */ + +#include "ble_db_discovery.h" +#include +#include "ble.h" +#include "nrf_log.h" + +#include "sdk_common.h" + +#define SRV_DISC_START_HANDLE 0x0001 /**< The start handle value used during service discovery. */ +#define DB_DISCOVERY_MAX_USERS BLE_DB_DISCOVERY_MAX_SRV /**< The maximum number of users/registrations allowed by this module. */ +#define DB_LOG NRF_LOG_PRINTF_DEBUG /**< A debug logger macro that can be used in this file to do logging information over UART. */ + + +/**@brief Array of structures containing information about the registered application modules. */ +static ble_uuid_t m_registered_handlers[DB_DISCOVERY_MAX_USERS]; + + +/**@brief Array of structures containing pending events to be sent to the application modules. + * + * @details Whenever a discovery related event is to be raised to a user module, it will be stored + * in this array first. When all services needed to be discovered have been + * discovered, all pending events will be sent to the corresponding user modules. + **/ +static struct +{ + ble_db_discovery_evt_t evt; /**< The pending event. */ + ble_db_discovery_evt_handler_t evt_handler; /**< The event handler which should be called to raise this event. */ +} m_pending_user_evts[DB_DISCOVERY_MAX_USERS]; + +static ble_db_discovery_evt_handler_t m_evt_handler; +static uint32_t m_pending_usr_evt_index; /**< The index to the pending user event array, pointing to the last added pending user event. */ +static uint32_t m_num_of_handlers_reg; /**< The number of handlers registered with the DB Discovery module. */ +static bool m_initialized = false; /**< This variable Indicates if the module is initialized or not. */ + +#define MODULE_INITIALIZED (m_initialized == true) +#include "sdk_macros.h" + +/**@brief Function for fetching the event handler provided by a registered application module. + * + * @param[in] srv_uuid UUID of the service. + * + * @retval evt_handler Event handler of the module, registered for the given service UUID. + * @retval NULL If no event handler is found. + */ +static ble_db_discovery_evt_handler_t registered_handler_get(const ble_uuid_t * const p_srv_uuid) +{ + uint32_t i; + + for (i = 0; i < m_num_of_handlers_reg; i++) + { + if (BLE_UUID_EQ(&(m_registered_handlers[i]), p_srv_uuid)) + { + return (m_evt_handler); + } + } + + return NULL; +} + + +/**@brief Function for storing the event handler provided by a registered application module. + * + * @param[in] p_srv_uuid The UUID of the service. + * @param[in] p_evt_handler The event handler provided by the application. + * + * @retval NRF_SUCCESS If the handler was stored or already present in the list. + * @retval NRF_ERROR_NO_MEM If there is no space left to store the handler. + */ +static uint32_t registered_handler_set(const ble_uuid_t * const p_srv_uuid, + ble_db_discovery_evt_handler_t p_evt_handler) +{ + if (registered_handler_get(p_srv_uuid) != NULL) + { + return NRF_SUCCESS; + } + if (m_num_of_handlers_reg < DB_DISCOVERY_MAX_USERS) + { + m_registered_handlers[m_num_of_handlers_reg] = *p_srv_uuid; + + m_num_of_handlers_reg++; + + return NRF_SUCCESS; + } + else + { + return NRF_ERROR_NO_MEM; + } +} + + +/**@brief Function for sending all pending discovery events to the corresponding user modules. + */ +static void pending_user_evts_send(void) +{ + uint32_t i = 0; + + for (i = 0; i < m_num_of_handlers_reg; i++) + { + // Pass the event to the corresponding event handler. + m_pending_user_evts[i].evt_handler(&(m_pending_user_evts[i].evt)); + } + m_pending_usr_evt_index = 0; +} + + +/**@brief Function for indicating error to the application. + * + * @details This function will fetch the event handler based on the UUID of the service being + * discovered. (The event handler is registered by the application beforehand). + * The error code is added to the pending events together with the event handler. + * If no event handler was found, then this function will do nothing. + * + * @param[in] p_db_discovery Pointer to the DB discovery structure. + * @param[in] err_code Error code that should be provided to the application. + * @param[in] conn_handle Connection Handle. + * + */ +static void discovery_error_evt_trigger(ble_db_discovery_t * const p_db_discovery, + uint32_t err_code, + uint16_t const conn_handle) +{ + ble_db_discovery_evt_handler_t p_evt_handler; + ble_gatt_db_srv_t * p_srv_being_discovered; + + p_srv_being_discovered = &(p_db_discovery->services[p_db_discovery->curr_srv_ind]); + + p_evt_handler = registered_handler_get(&(p_srv_being_discovered->srv_uuid)); + + if (p_evt_handler != NULL) + { + ble_db_discovery_evt_t evt; + + evt.conn_handle = conn_handle; + evt.evt_type = BLE_DB_DISCOVERY_ERROR; + evt.params.err_code = err_code; + + p_evt_handler(&evt); + } +} + + +/**@brief Function for triggering a Discovery Complete or Service Not Found event to the + * application. + * + * @details This function will fetch the event handler based on the UUID of the service being + * discovered. (The event handler is registered by the application beforehand). + * It then triggers an event indicating the completion of the service discovery. + * If no event handler was found, then this function will do nothing. + * + * @param[in] p_db_discovery Pointer to the DB discovery structure. + * @param[in] is_srv_found Variable to indicate if the service was found at the peer. + * @param[in] conn_handle Connection Handle. + */ +static void discovery_complete_evt_trigger(ble_db_discovery_t * const p_db_discovery, + bool is_srv_found, + uint16_t const conn_handle) +{ + ble_db_discovery_evt_handler_t p_evt_handler; + ble_gatt_db_srv_t * p_srv_being_discovered; + + p_srv_being_discovered = &(p_db_discovery->services[p_db_discovery->curr_srv_ind]); + + p_evt_handler = registered_handler_get(&(p_srv_being_discovered->srv_uuid)); + + if (p_evt_handler != NULL) + { + if (m_pending_usr_evt_index < DB_DISCOVERY_MAX_USERS) + { + // Insert an event into the pending event list. + m_pending_user_evts[m_pending_usr_evt_index].evt.conn_handle = conn_handle; + + m_pending_user_evts[m_pending_usr_evt_index].evt.params.discovered_db = + *p_srv_being_discovered; + if (is_srv_found) + { + m_pending_user_evts[m_pending_usr_evt_index].evt.evt_type = + BLE_DB_DISCOVERY_COMPLETE; + } + else + { + m_pending_user_evts[m_pending_usr_evt_index].evt.evt_type = + BLE_DB_DISCOVERY_SRV_NOT_FOUND; + } + m_pending_user_evts[m_pending_usr_evt_index].evt_handler = p_evt_handler; + + m_pending_usr_evt_index++; + + if (m_pending_usr_evt_index == m_num_of_handlers_reg) + { + // All registered modules have pending events. Send all pending events to the user + // modules. + pending_user_evts_send(); + } + else + { + // Too many events pending. Do nothing. (Ideally this should not happen.) + } + } + } +} + + +/**@brief Function for handling service discovery completion. + * + * @details This function will be used to determine if there are more services to be discovered, + * and if so, initiate the discovery of the next service. + * + * @param[in] p_db_discovery Pointer to the DB Discovery Structure. + * @param[in] conn_handle Connection Handle. + */ +static void on_srv_disc_completion(ble_db_discovery_t * p_db_discovery, + uint16_t const conn_handle) +{ + p_db_discovery->discoveries_count++; + + // Check if more services need to be discovered. + if (p_db_discovery->discoveries_count < m_num_of_handlers_reg) + { + // Reset the current characteristic index since a new service discovery is about to start. + p_db_discovery->curr_char_ind = 0; + + // Initiate discovery of the next service. + p_db_discovery->curr_srv_ind++; + + ble_gatt_db_srv_t * p_srv_being_discovered; + + p_srv_being_discovered = &(p_db_discovery->services[p_db_discovery->curr_srv_ind]); + + p_srv_being_discovered->srv_uuid = m_registered_handlers[p_db_discovery->curr_srv_ind]; + + // Reset the characteristic count in the current service to zero since a new service + // discovery is about to start. + p_srv_being_discovered->char_count = 0; + + DB_LOG("[DB]: Starting discovery of service with UUID 0x%x for Connection handle %d\r\n", + p_srv_being_discovered->srv_uuid.uuid, conn_handle); + + uint32_t err_code; + + err_code = sd_ble_gattc_primary_services_discover + ( + conn_handle, + SRV_DISC_START_HANDLE, + &(p_srv_being_discovered->srv_uuid) + ); + if (err_code != NRF_SUCCESS) + { + p_db_discovery->discovery_in_progress = false; + + // Error with discovering the service. + // Indicate the error to the registered user application. + discovery_error_evt_trigger(p_db_discovery, err_code, conn_handle); + + m_pending_user_evts[0].evt.evt_type = BLE_DB_DISCOVERY_AVAILABLE; + m_pending_user_evts[0].evt.conn_handle = conn_handle; +// m_evt_handler(&m_pending_user_evts[0].evt); + + return; + } + } + else + { + // No more service discovery is needed. + p_db_discovery->discovery_in_progress = false; + m_pending_user_evts[0].evt.evt_type = BLE_DB_DISCOVERY_AVAILABLE; + m_pending_user_evts[0].evt.conn_handle = conn_handle; + //m_evt_handler(&m_pending_user_evts[0].evt); + } +} + + +/**@brief Function for finding out if a characteristic discovery should be performed after the + * last discovered characteristic. + * + * @details This function is used during the time of database discovery to find out if there is + * a need to do more characteristic discoveries. The value handles of the + * last discovered characteristic is compared with the end handle of the service. + * If the service handle is greater than one of the former characteristic handles, + * it means that a characteristic discovery is required. + * + * @param[in] p_db_discovery The pointer to the DB Discovery structure. + * @param[in] p_after_char The pointer to the last discovered characteristic. + * + * @retval True if a characteristic discovery is required. + * @retval False if a characteristic discovery is NOT required. + */ +static bool is_char_discovery_reqd(ble_db_discovery_t * const p_db_discovery, + ble_gattc_char_t * p_after_char) +{ + if ( + p_after_char->handle_value < + p_db_discovery->services[p_db_discovery->curr_srv_ind].handle_range.end_handle + ) + { + // Handle value of the characteristic being discovered is less than the end handle of + // the service being discovered. There is a possibility of more characteristics being + // present. Hence a characteristic discovery is required. + return true; + } + + return false; +} + + +/**@brief Function to find out if a descriptor discovery is required. + * + * @details This function finds out if there is a possibility of existence of descriptors between + * current characteristic and the next characteristic. If so, this function will compute + * the handle range on which the descriptors may be present and will return it. + * If the current characteristic is the last known characteristic, then this function + * will use the service end handle to find out if the current characteristic can have + * descriptors. + * + * @param[in] p_db_discovery Pointer to the DB Discovery structure. + * @param[in] p_curr_char Pointer to the current characteristic. + * @param[in] p_next_char Pointer to the next characteristic. This should be NULL if the + * caller knows that there is no characteristic after the current + * characteristic at the peer. + * @param[out] p_handle_range Pointer to the handle range in which descriptors may exist at the + * the peer. + * + * @retval True If a descriptor discovery is required. + * @retval False If a descriptor discovery is NOT required. + */ +static bool is_desc_discovery_reqd(ble_db_discovery_t * p_db_discovery, + ble_gatt_db_char_t * p_curr_char, + ble_gatt_db_char_t * p_next_char, + ble_gattc_handle_range_t * p_handle_range) +{ + if (p_next_char == NULL) + { + // Current characteristic is the last characteristic in the service. Check if the value + // handle of the current characteristic is equal to the service end handle. + if ( + p_curr_char->characteristic.handle_value == + p_db_discovery->services[p_db_discovery->curr_srv_ind].handle_range.end_handle + ) + { + // No descriptors can be present for the current characteristic. p_curr_char is the last + // characteristic with no descriptors. + return false; + } + + p_handle_range->start_handle = p_curr_char->characteristic.handle_value + 1; + + // Since the current characteristic is the last characteristic in the service, the end + // handle should be the end handle of the service. + p_handle_range->end_handle = + p_db_discovery->services[p_db_discovery->curr_srv_ind].handle_range.end_handle; + + return true; + } + + // p_next_char != NULL. Check for existence of descriptors between the current and the next + // characteristic. + if ((p_curr_char->characteristic.handle_value + 1) == p_next_char->characteristic.handle_decl) + { + // No descriptors can exist between the two characteristic. + return false; + } + + p_handle_range->start_handle = p_curr_char->characteristic.handle_value + 1; + p_handle_range->end_handle = p_next_char->characteristic.handle_decl - 1; + + return true; +} + + +/**@brief Function for performing characteristic discovery. + * + * @param[in] p_db_discovery Pointer to the DB Discovery structure. + * @param[in] conn_handle Connection Handle. + * + * @return NRF_SUCCESS if the SoftDevice was successfully requested to perform the characteristic + * discovery. Otherwise an error code. This function returns the error code returned + * by the SoftDevice API @ref sd_ble_gattc_characteristics_discover. + */ +static uint32_t characteristics_discover(ble_db_discovery_t * const p_db_discovery, + uint16_t const conn_handle) +{ + ble_gatt_db_srv_t * p_srv_being_discovered; + ble_gattc_handle_range_t handle_range; + + p_srv_being_discovered = &(p_db_discovery->services[p_db_discovery->curr_srv_ind]); + + if (p_db_discovery->curr_char_ind != 0) + { + // This is not the first characteristic being discovered. Hence the 'start handle' to be + // used must be computed using the handle_value of the previous characteristic. + ble_gattc_char_t * p_prev_char; + uint8_t prev_char_ind = p_db_discovery->curr_char_ind - 1; + + p_srv_being_discovered = &(p_db_discovery->services[p_db_discovery->curr_srv_ind]); + + p_prev_char = &(p_srv_being_discovered->charateristics[prev_char_ind].characteristic); + + handle_range.start_handle = p_prev_char->handle_value + 1; + } + else + { + // This is the first characteristic of this service being discovered. + handle_range.start_handle = p_srv_being_discovered->handle_range.start_handle; + } + + handle_range.end_handle = p_srv_being_discovered->handle_range.end_handle; + + return sd_ble_gattc_characteristics_discover(conn_handle, &handle_range); +} + + +/**@brief Function for performing descriptor discovery, if required. + * + * @details This function will check if descriptor discovery is required and then perform it if + * needed. If no more descriptor discovery is required for the service, then the output + * parameter p_raise_discov_complete is set to true, indicating to the caller that a + * discovery complete event can be triggered to the application. + * + * @param[in] p_db_discovery Pointer to the DB Discovery structure. + * @param[out] p_raise_discov_complete The value pointed to by this pointer will be set to true if + * the Discovery Complete event can be triggered to the + * application. + * @param[in] conn_handle Connection Handle. + * + * @return NRF_SUCCESS if the SoftDevice was successfully requested to perform the descriptor + * discovery, or if no more descriptor discovery is required. Otherwise an error code. + * This function returns the error code returned by the SoftDevice API @ref + * sd_ble_gattc_descriptors_discover. + */ +static uint32_t descriptors_discover(ble_db_discovery_t * const p_db_discovery, + bool * p_raise_discov_complete, + uint16_t const conn_handle) +{ + ble_gattc_handle_range_t handle_range; + ble_gatt_db_char_t * p_curr_char_being_discovered; + ble_gatt_db_srv_t * p_srv_being_discovered; + bool is_discovery_reqd = false; + + p_srv_being_discovered = &(p_db_discovery->services[p_db_discovery->curr_srv_ind]); + + p_curr_char_being_discovered = + &(p_srv_being_discovered->charateristics[p_db_discovery->curr_char_ind]); + + if ((p_db_discovery->curr_char_ind + 1) == p_srv_being_discovered->char_count) + { + // This is the last characteristic of this service. + is_discovery_reqd = is_desc_discovery_reqd(p_db_discovery, + p_curr_char_being_discovered, + NULL, + &handle_range); + } + else + { + uint8_t i; + ble_gatt_db_char_t * p_next_char; + + for (i = p_db_discovery->curr_char_ind; + i < p_srv_being_discovered->char_count; + i++) + { + + if (i == (p_srv_being_discovered->char_count - 1)) + { + // The current characteristic is the last characteristic in the service. + p_next_char = NULL; + } + else + { + p_next_char = &(p_srv_being_discovered->charateristics[i + 1]); + } + + // Check if it is possible for the current characteristic to have a descriptor. + if (is_desc_discovery_reqd(p_db_discovery, + p_curr_char_being_discovered, + p_next_char, + &handle_range)) + { + is_discovery_reqd = true; + break; + } + else + { + // No descriptors can exist. + p_curr_char_being_discovered = p_next_char; + p_db_discovery->curr_char_ind++; + } + } + } + + if (!is_discovery_reqd) + { + // No more descriptor discovery required. Discovery is complete. + // This informs the caller that a discovery complete event can be triggered. + *p_raise_discov_complete = true; + + return NRF_SUCCESS; + } + + *p_raise_discov_complete = false; + + return sd_ble_gattc_descriptors_discover(conn_handle, &handle_range); +} + + +/**@brief Function for handling primary service discovery response. + * + * @details This function will handle the primary service discovery response and start the + * discovery of characteristics within that service. + * + * @param[in] p_db_discovery Pointer to the DB Discovery structure. + * @param[in] p_ble_gattc_evt Pointer to the GATT Client event. + */ +static void on_primary_srv_discovery_rsp(ble_db_discovery_t * const p_db_discovery, + const ble_gattc_evt_t * const p_ble_gattc_evt) +{ + ble_gatt_db_srv_t * p_srv_being_discovered; + p_srv_being_discovered = &(p_db_discovery->services[p_db_discovery->curr_srv_ind]); + + if (p_ble_gattc_evt->conn_handle != p_db_discovery->conn_handle) + { + return; + } + if (p_ble_gattc_evt->gatt_status == BLE_GATT_STATUS_SUCCESS) + { + uint32_t err_code; + const ble_gattc_evt_prim_srvc_disc_rsp_t * p_prim_srvc_disc_rsp_evt; + + DB_LOG("Found service UUID 0x%x\r\n", p_srv_being_discovered->srv_uuid.uuid); + + p_prim_srvc_disc_rsp_evt = &(p_ble_gattc_evt->params.prim_srvc_disc_rsp); + + p_srv_being_discovered->srv_uuid = p_prim_srvc_disc_rsp_evt->services[0].uuid; + p_srv_being_discovered->handle_range = p_prim_srvc_disc_rsp_evt->services[0].handle_range; + + err_code = characteristics_discover(p_db_discovery, + p_ble_gattc_evt->conn_handle); + + if (err_code != NRF_SUCCESS) + { + p_db_discovery->discovery_in_progress = false; + + // Error with discovering the service. + // Indicate the error to the registered user application. + discovery_error_evt_trigger(p_db_discovery, + err_code, + p_ble_gattc_evt->conn_handle); + + m_pending_user_evts[0].evt.evt_type = BLE_DB_DISCOVERY_AVAILABLE; + m_pending_user_evts[0].evt.conn_handle = p_ble_gattc_evt->conn_handle; + //m_evt_handler(&m_pending_user_evts[0].evt); + } + } + else + { + DB_LOG("Service UUID 0x%x Not found\r\n", p_srv_being_discovered->srv_uuid.uuid); + // Trigger Service Not Found event to the application. + discovery_complete_evt_trigger(p_db_discovery, + false, + p_ble_gattc_evt->conn_handle); + + on_srv_disc_completion(p_db_discovery, + p_ble_gattc_evt->conn_handle); + } +} + + +/**@brief Function for handling characteristic discovery response. + * + * @param[in] p_db_discovery Pointer to the DB Discovery structure. + * @param[in] p_ble_gattc_evt Pointer to the GATT Client event. + */ +static void on_characteristic_discovery_rsp(ble_db_discovery_t * const p_db_discovery, + const ble_gattc_evt_t * const p_ble_gattc_evt) +{ + uint32_t err_code; + ble_gatt_db_srv_t * p_srv_being_discovered; + bool perform_desc_discov = false; + + if (p_ble_gattc_evt->conn_handle != p_db_discovery->conn_handle) + { + return; + } + p_srv_being_discovered = &(p_db_discovery->services[p_db_discovery->curr_srv_ind]); + + if (p_ble_gattc_evt->gatt_status == BLE_GATT_STATUS_SUCCESS) + { + const ble_gattc_evt_char_disc_rsp_t * p_char_disc_rsp_evt; + + p_char_disc_rsp_evt = &(p_ble_gattc_evt->params.char_disc_rsp); + + // Find out the number of characteristics that were previously discovered (in earlier + // characteristic discovery responses, if any). + uint8_t num_chars_prev_disc = p_srv_being_discovered->char_count; + + // Find out the number of characteristics that are currently discovered (in the + // characteristic discovery response being handled). + uint8_t num_chars_curr_disc = p_char_disc_rsp_evt->count; + + // Check if the total number of discovered characteristics are supported by this module. + if ((num_chars_prev_disc + num_chars_curr_disc) <= BLE_GATT_DB_MAX_CHARS) + { + // Update the characteristics count. + p_srv_being_discovered->char_count += num_chars_curr_disc; + } + else + { + // The number of characteristics discovered at the peer is more than the supported + // maximum. This module will store only the characteristics found up to this point. + p_srv_being_discovered->char_count = BLE_GATT_DB_MAX_CHARS; + } + + uint32_t i; + uint32_t j; + + for (i = num_chars_prev_disc, j = 0; i < p_srv_being_discovered->char_count; i++, j++) + { + p_srv_being_discovered->charateristics[i].characteristic = + p_char_disc_rsp_evt->chars[j]; + + p_srv_being_discovered->charateristics[i].cccd_handle = BLE_GATT_HANDLE_INVALID; + } + + ble_gattc_char_t * p_last_known_char; + + p_last_known_char = &(p_srv_being_discovered->charateristics[i - 1].characteristic); + + // If no more characteristic discovery is required, or if the maximum number of supported + // characteristic per service has been reached, descriptor discovery will be performed. + if ( + !is_char_discovery_reqd(p_db_discovery, p_last_known_char) || + (p_srv_being_discovered->char_count == BLE_GATT_DB_MAX_CHARS) + ) + { + perform_desc_discov = true; + } + else + { + // Update the current characteristic index. + p_db_discovery->curr_char_ind = p_srv_being_discovered->char_count; + + // Perform another round of characteristic discovery. + err_code = characteristics_discover(p_db_discovery, + p_ble_gattc_evt->conn_handle); + + if (err_code != NRF_SUCCESS) + { + p_db_discovery->discovery_in_progress = false; + + discovery_error_evt_trigger(p_db_discovery, + err_code, + p_ble_gattc_evt->conn_handle); + + m_pending_user_evts[0].evt.evt_type = BLE_DB_DISCOVERY_AVAILABLE; + m_pending_user_evts[0].evt.conn_handle = p_ble_gattc_evt->conn_handle; + //m_evt_handler(&m_pending_user_evts[0].evt); + + return; + } + } + } + else + { + // The previous characteristic discovery resulted in no characteristics. + // descriptor discovery should be performed. + perform_desc_discov = true; + } + + if (perform_desc_discov) + { + bool raise_discov_complete; + + p_db_discovery->curr_char_ind = 0; + + err_code = descriptors_discover(p_db_discovery, + &raise_discov_complete, + p_ble_gattc_evt->conn_handle); + + if (err_code != NRF_SUCCESS) + { + p_db_discovery->discovery_in_progress = false; + + discovery_error_evt_trigger(p_db_discovery, + err_code, + p_ble_gattc_evt->conn_handle); + + m_pending_user_evts[0].evt.evt_type = BLE_DB_DISCOVERY_AVAILABLE; + m_pending_user_evts[0].evt.conn_handle = p_ble_gattc_evt->conn_handle; + //m_evt_handler(&m_pending_user_evts[0].evt); + + return; + } + if (raise_discov_complete) + { + // No more characteristics and descriptors need to be discovered. Discovery is complete. + // Send a discovery complete event to the user application. + DB_LOG("[DB]: Discovery of service with UUID 0x%x completed with success for Connection" + " handle %d\r\n", p_srv_being_discovered->srv_uuid.uuid, + p_ble_gattc_evt->conn_handle); + + discovery_complete_evt_trigger(p_db_discovery, + true, + p_ble_gattc_evt->conn_handle); + + on_srv_disc_completion(p_db_discovery, + p_ble_gattc_evt->conn_handle); + } + } +} + + +/**@brief Function for handling descriptor discovery response. + * + * @param[in] p_db_discovery Pointer to the DB Discovery structure. + * @param[in] p_ble_gattc_evt Pointer to the GATT Client event. + */ +static void on_descriptor_discovery_rsp(ble_db_discovery_t * const p_db_discovery, + const ble_gattc_evt_t * const p_ble_gattc_evt) +{ + const ble_gattc_evt_desc_disc_rsp_t * p_desc_disc_rsp_evt; + ble_gatt_db_srv_t * p_srv_being_discovered; + + if (p_ble_gattc_evt->conn_handle != p_db_discovery->conn_handle) + { + return; + } + + p_srv_being_discovered = &(p_db_discovery->services[p_db_discovery->curr_srv_ind]); + + p_desc_disc_rsp_evt = &(p_ble_gattc_evt->params.desc_disc_rsp); + + ble_gatt_db_char_t * p_char_being_discovered = + &(p_srv_being_discovered->charateristics[p_db_discovery->curr_char_ind]); + + if (p_ble_gattc_evt->gatt_status == BLE_GATT_STATUS_SUCCESS) + { + // The descriptor was found at the peer. + // If the descriptor was a CCCD, then the cccd_handle needs to be populated. + + uint32_t i; + + // Loop through all the descriptors to find the CCCD. + for (i = 0; i < p_desc_disc_rsp_evt->count; i++) + { + if ( + p_desc_disc_rsp_evt->descs[i].uuid.uuid == + BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG + ) + { + p_char_being_discovered->cccd_handle = p_desc_disc_rsp_evt->descs[i].handle; + + break; + } + } + } + + bool raise_discov_complete = false; + + if ((p_db_discovery->curr_char_ind + 1) == p_srv_being_discovered->char_count) + { + // No more characteristics and descriptors need to be discovered. Discovery is complete. + // Send a discovery complete event to the user application. + + raise_discov_complete = true; + } + else + { + // Begin discovery of descriptors for the next characteristic. + uint32_t err_code; + + p_db_discovery->curr_char_ind++; + + err_code = descriptors_discover(p_db_discovery, + &raise_discov_complete, + p_ble_gattc_evt->conn_handle); + + if (err_code != NRF_SUCCESS) + { + p_db_discovery->discovery_in_progress = false; + + // Error with discovering the service. + // Indicate the error to the registered user application. + discovery_error_evt_trigger(p_db_discovery, + err_code, + p_ble_gattc_evt->conn_handle); + + m_pending_user_evts[0].evt.evt_type = BLE_DB_DISCOVERY_AVAILABLE; + m_pending_user_evts[0].evt.conn_handle = p_ble_gattc_evt->conn_handle; + + return; + } + } + + if (raise_discov_complete) + { + DB_LOG("[DB]: Discovery of service with UUID 0x%x completed with success for Connection" + "handle %d\r\n", p_srv_being_discovered->srv_uuid.uuid, + p_ble_gattc_evt->conn_handle); + + discovery_complete_evt_trigger(p_db_discovery, + true, + p_ble_gattc_evt->conn_handle); + + on_srv_disc_completion(p_db_discovery, + p_ble_gattc_evt->conn_handle); + } +} + + +uint32_t ble_db_discovery_init(const ble_db_discovery_evt_handler_t evt_handler) +{ + uint32_t err_code = NRF_SUCCESS; + VERIFY_PARAM_NOT_NULL(evt_handler); + + m_num_of_handlers_reg = 0; + m_initialized = true; + m_pending_usr_evt_index = 0; + m_evt_handler = evt_handler; + + return err_code; + +} + + +uint32_t ble_db_discovery_close() +{ + m_num_of_handlers_reg = 0; + m_initialized = false; + m_pending_usr_evt_index = 0; + + return NRF_SUCCESS; +} + + +uint32_t ble_db_discovery_evt_register(const ble_uuid_t * const p_uuid) +{ + VERIFY_PARAM_NOT_NULL(p_uuid); + VERIFY_MODULE_INITIALIZED(); + + return registered_handler_set(p_uuid, m_evt_handler); +} + + +uint32_t ble_db_discovery_start(ble_db_discovery_t * const p_db_discovery, + uint16_t conn_handle) +{ + VERIFY_PARAM_NOT_NULL(p_db_discovery); + VERIFY_MODULE_INITIALIZED(); + + if (m_num_of_handlers_reg == 0) + { + // No user modules were registered. There are no services to discover. + return NRF_ERROR_INVALID_STATE; + } + + if (p_db_discovery->discovery_in_progress) + { + return NRF_ERROR_BUSY; + } + + p_db_discovery->conn_handle = conn_handle; + ble_gatt_db_srv_t * p_srv_being_discovered; + + m_pending_usr_evt_index = 0; + + p_db_discovery->discoveries_count = 0; + p_db_discovery->curr_srv_ind = 0; + + p_srv_being_discovered = &(p_db_discovery->services[p_db_discovery->curr_srv_ind]); + + p_srv_being_discovered->srv_uuid = m_registered_handlers[p_db_discovery->curr_srv_ind]; + + DB_LOG("[DB]: Starting discovery of service with UUID 0x%x for Connection handle %d\r\n", + p_srv_being_discovered->srv_uuid.uuid, conn_handle); + + uint32_t err_code; + + err_code = sd_ble_gattc_primary_services_discover(conn_handle, + SRV_DISC_START_HANDLE, + &(p_srv_being_discovered->srv_uuid)); + VERIFY_SUCCESS(err_code); + p_db_discovery->discovery_in_progress = true; + + return NRF_SUCCESS; +} + + +/**@brief Function for handling disconnected event. + * + * @param[in] p_db_discovery Pointer to the DB Discovery structure. + * @param[in] p_ble_gattc_evt Pointer to the GAP event. + */ +static void on_disconnected(ble_db_discovery_t * const p_db_discovery, + const ble_gap_evt_t * const p_evt) +{ + if (p_evt->conn_handle == p_db_discovery->conn_handle) + { + p_db_discovery->discovery_in_progress = false; + } +} + + +void ble_db_discovery_on_ble_evt(ble_db_discovery_t * const p_db_discovery, + const ble_evt_t * const p_ble_evt) +{ + VERIFY_PARAM_NOT_NULL_VOID(p_db_discovery); + VERIFY_PARAM_NOT_NULL_VOID(p_ble_evt); + VERIFY_MODULE_INITIALIZED_VOID(); + + switch (p_ble_evt->header.evt_id) + { + case BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP: + on_primary_srv_discovery_rsp(p_db_discovery, &(p_ble_evt->evt.gattc_evt)); + break; + + case BLE_GATTC_EVT_CHAR_DISC_RSP: + on_characteristic_discovery_rsp(p_db_discovery, &(p_ble_evt->evt.gattc_evt)); + break; + + case BLE_GATTC_EVT_DESC_DISC_RSP: + on_descriptor_discovery_rsp(p_db_discovery, &(p_ble_evt->evt.gattc_evt)); + break; + + case BLE_GAP_EVT_DISCONNECTED: + on_disconnected(p_db_discovery, &(p_ble_evt->evt.gap_evt)); + break; + + default: + break; + } +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.h new file mode 100644 index 0000000000..f964e1e97d --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.h @@ -0,0 +1,180 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + */ + + +/**@file + * + * @defgroup ble_sdk_lib_db_discovery Database Discovery + * @{ + * @ingroup ble_sdk_lib + * @brief Database discovery module. + * + * @details This module contains the APIs and types exposed by the DB Discovery module. These APIs + * and types can be used by the application to perform discovery of a service and its + * characteristics at the peer server. This module can also be used to discover the + * desired services in multiple remote devices. + * + * @warning The maximum number of characteristics per service that can be discovered by this module + * is determined by the number of characteristics in the service structure defined in + * db_disc_config.h. If the peer has more than the supported number of characteristics, then + * the first found will be discovered and any further characteristics will be ignored. No + * descriptors other than Client Characteristic Configuration Descriptors will be searched + * for at the peer. + * + * @note Presently only one instance of a Primary Service can be discovered by this module. If + * there are multiple instances of the service at the peer, only the first instance + * of it at the peer is fetched and returned to the application. + * + * @note The application must propagate BLE stack events to this module by calling + * ble_db_discovery_on_ble_evt(). + * + */ + +#ifndef BLE_DB_DISCOVERY_H__ +#define BLE_DB_DISCOVERY_H__ + +#include +#include "ble_gattc.h" +#include "ble.h" +#include "nrf_error.h" +#include "ble_srv_common.h" +#include "ble_gatt_db.h" + + +#define BLE_DB_DISCOVERY_MAX_SRV 6 /**< Maximum number of services supported by this module. This also indicates the maximum number of users allowed to be registered to this module. (one user per service). */ + + +/**@brief Type of the DB Discovery event. + */ +typedef enum +{ + BLE_DB_DISCOVERY_COMPLETE, /**< Event indicating that the GATT Database discovery is complete. */ + BLE_DB_DISCOVERY_ERROR, /**< Event indicating that an internal error has occurred in the DB Discovery module. This could typically be because of the SoftDevice API returning an error code during the DB discover.*/ + BLE_DB_DISCOVERY_SRV_NOT_FOUND, /**< Event indicating that the service was not found at the peer.*/ + BLE_DB_DISCOVERY_AVAILABLE /**< Event indicating that the DB discovery module is available.*/ +} ble_db_discovery_evt_type_t; + + + +/**@brief Structure for holding the information related to the GATT database at the server. + * + * @details This module identifies a remote database. Use one instance of this structure per + * connection. + * + * @warning This structure must be zero-initialized. + */ +typedef struct +{ + ble_gatt_db_srv_t services[BLE_DB_DISCOVERY_MAX_SRV]; /**< Information related to the current service being discovered. This is intended for internal use during service discovery.*/ + uint8_t srv_count; /**< Number of services at the peers GATT database.*/ + uint8_t curr_char_ind; /**< Index of the current characteristic being discovered. This is intended for internal use during service discovery.*/ + uint8_t curr_srv_ind; /**< Index of the current service being discovered. This is intended for internal use during service discovery.*/ + bool discovery_in_progress; /**< Variable to indicate if there is a service discovery in progress. */ + uint8_t discoveries_count; /**< Number of service discoveries made, both successful and unsuccessful. */ + uint16_t conn_handle; /**< Connection handle on which the discovery is started*/ +} ble_db_discovery_t; + + +/**@brief Structure containing the event from the DB discovery module to the application. + */ +typedef struct +{ + ble_db_discovery_evt_type_t evt_type; /**< Type of event. */ + uint16_t conn_handle; /**< Handle of the connection for which this event has occurred. */ + union + { + ble_gatt_db_srv_t discovered_db; /**< Structure containing the information about the GATT Database at the server. This will be filled when the event type is @ref BLE_DB_DISCOVERY_COMPLETE.*/ + uint32_t err_code; /**< nRF Error code indicating the type of error which occurred in the DB Discovery module. This will be filled when the event type is @ref BLE_DB_DISCOVERY_ERROR. */ + } params; +} ble_db_discovery_evt_t; + + +/**@brief DB Discovery event handler type. */ +typedef void (* ble_db_discovery_evt_handler_t)(ble_db_discovery_evt_t * p_evt); + + +/**@brief Function for initializing the DB Discovery module. + * + * @param[in] evt_handler Event handler to be called by the DB discovery module when any event + * related to discovery of the registered service occurs. + * + * @retval NRF_SUCCESS On successful initialization. + * @retval NRF_ERROR_NULL If the handler was NULL. + */ +uint32_t ble_db_discovery_init(ble_db_discovery_evt_handler_t evt_handler); + + +/**@brief Function for closing the DB Discovery module. + * + * @details This function will clear up any internal variables and states maintained by the + * module. To re-use the module after calling this function, the function @ref + * ble_db_discovery_init must be called again. + * + * @retval NRF_SUCCESS Operation success. + */ +uint32_t ble_db_discovery_close(void); + + +/**@brief Function for registering with the DB Discovery module. + * + * @details The application can use this function to inform which service it is interested in + * discovering at the server. + * + * @param[in] p_uuid Pointer to the UUID of the service to be discovered at the server. + * + * @note The total number of services that can be discovered by this module is @ref + * BLE_DB_DISCOVERY_MAX_SRV. This effectively means that the maximum number of + * registrations possible is equal to the @ref BLE_DB_DISCOVERY_MAX_SRV. + * + * @retval NRF_SUCCESS Operation success. + * @retval NRF_ERROR_NULL When a NULL pointer is passed as input. + * @retval NRF_ERROR_INVALID_STATE If this function is called without calling the + * @ref ble_db_discovery_init. + * @retval NRF_ERROR_NO_MEM The maximum number of registrations allowed by this module + * has been reached. + */ +uint32_t ble_db_discovery_evt_register(const ble_uuid_t * const p_uuid); + + +/**@brief Function for starting the discovery of the GATT database at the server. + * + * @warning p_db_discovery structure must be zero-initialized. + * + * @param[out] p_db_discovery Pointer to the DB Discovery structure. + * @param[in] conn_handle The handle of the connection for which the discovery should be + * started. + * + * @retval NRF_SUCCESS Operation success. + * @retval NRF_ERROR_NULL When a NULL pointer is passed as input. + * @retval NRF_ERROR_INVALID_STATE If this function is called without calling the + * @ref ble_db_discovery_init, or without calling + * @ref ble_db_discovery_evt_register. + * @retval NRF_ERROR_BUSY If a discovery is already in progress for the current + * connection. + * + * @return This API propagates the error code returned by the + * SoftDevice API @ref sd_ble_gattc_primary_services_discover. + */ +uint32_t ble_db_discovery_start(ble_db_discovery_t * const p_db_discovery, + uint16_t conn_handle); + + +/**@brief Function for handling the Application's BLE Stack events. + * + * @param[in,out] p_db_discovery Pointer to the DB Discovery structure. + * @param[in] p_ble_evt Pointer to the BLE event received. + */ +void ble_db_discovery_on_ble_evt(ble_db_discovery_t * const p_db_discovery, + const ble_evt_t * const p_ble_evt); + +#endif // BLE_DB_DISCOVERY_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_debug_assert_handler/ble_debug_assert_handler.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_debug_assert_handler/ble_debug_assert_handler.c new file mode 100644 index 0000000000..a47ec5ef81 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_debug_assert_handler/ble_debug_assert_handler.c @@ -0,0 +1,55 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "ble_debug_assert_handler.h" +#include +#include "nrf.h" +#include "ble_error_log.h" +#include "nordic_common.h" + +#define MAX_LENGTH_FILENAME 128 /**< Max length of filename to copy for the debug error handlier. */ + + +// WARNING - DO NOT USE THIS FUNCTION IN END PRODUCT. - WARNING +// WARNING - FOR DEBUG PURPOSES ONLY. - WARNING +void ble_debug_assert_handler(uint32_t error_code, uint32_t line_num, const uint8_t * p_file_name) +{ + // Copying parameters to static variables because parameters may not be accessible in debugger. + static volatile uint8_t s_file_name[MAX_LENGTH_FILENAME]; + static volatile uint16_t s_line_num; + static volatile uint32_t s_error_code; + + strncpy((char *)s_file_name, (const char *)p_file_name, MAX_LENGTH_FILENAME - 1); + s_file_name[MAX_LENGTH_FILENAME - 1] = '\0'; + s_line_num = line_num; + s_error_code = error_code; + UNUSED_VARIABLE(s_file_name); + UNUSED_VARIABLE(s_line_num); + UNUSED_VARIABLE(s_error_code); + + // WARNING: The PRIMASK register is set to disable ALL interrups during writing the error log. + // + // Do not use __disable_irq() in normal operation. + __disable_irq(); + + // This function will write error code, filename, and line number to the flash. + // In addition, the Cortex-M0 stack memory will also be written to the flash. + //(void) ble_error_log_write(error_code, p_file_name, line_num); + + // For debug purposes, this function never returns. + // Attach a debugger for tracing the error cause. + for (;;) + { + // Do nothing. + } +} + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_debug_assert_handler/ble_debug_assert_handler.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_debug_assert_handler/ble_debug_assert_handler.h new file mode 100644 index 0000000000..051e6a4062 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_debug_assert_handler/ble_debug_assert_handler.h @@ -0,0 +1,51 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_debug_assert_handler Assert handler for debug purposes + * @{ + * @ingroup ble_sdk_lib + * @brief Module for handling of assert during application development when debugging. + * + * @details This module may be used during development of an application to facilitate debugging. + * It contains a function to write file name, line number and the Stack Memory to flash. + * This module is ONLY for debugging purposes and must never be used in final product. + * + */ + +#ifndef BLE_DEBUG_ASSERT_HANDLER_H__ +#define BLE_DEBUG_ASSERT_HANDLER_H__ + +#include + +/**@brief Function for handling the Debug assert, which can be called from an error handler. + * To be used only for debugging purposes. + * + *@details This code will copy the filename and line number into local variables for them to always + * be accessible in Keil debugger. The function will also write the ARM Cortex-M0 stack + * memory into flash where it can be retrieved and manually un-winded in order to + * back-trace the location where the error ocured.
+ * @warning ALL INTERRUPTS WILL BE DISABLED. + * + * @note This function will never return but loop forever for debug purposes. + * + * @param[in] error_code Error code supplied to the handler. + * @param[in] line_num Line number where the original handler is called. + * @param[in] p_file_name Pointer to the file name. + */ +void ble_debug_assert_handler(uint32_t error_code, uint32_t line_num, const uint8_t * p_file_name); + +#endif /* BLE_DEBUG_ASSERT_HANDLER_H__ */ + + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_dtm/ble_dtm.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_dtm/ble_dtm.c new file mode 100644 index 0000000000..de0ed8d7a3 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_dtm/ble_dtm.c @@ -0,0 +1,643 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "ble_dtm.h" +#include +#include +#include "nrf.h" + +#define DTM_HEADER_OFFSET 0 /**< Index where the header of the pdu is located. */ +#define DTM_HEADER_SIZE 2 /**< Size of PDU header. */ +#define DTM_PAYLOAD_MAX_SIZE 37 /**< Maximum payload size allowed during dtm execution. */ +#define DTM_LENGTH_OFFSET (DTM_HEADER_OFFSET + 1) /**< Index where the length of the payload is encoded. */ +#define DTM_PDU_MAX_MEMORY_SIZE (DTM_HEADER_SIZE + DTM_PAYLOAD_MAX_SIZE) /**< Maximum PDU size allowed during dtm execution. */ + +/**@details The UART poll cycle in micro seconds. + * Baud rate of 19200 bits / second, and 8 data bits, 1 start/stop bit, no flow control, + * give the time to transmit a byte: 10 bits * 1/19200 = approx: 520 us. + * + * To ensure no loss of bytes, the UART should be polled every 260 us. + * + * @note If UART bit rate is changed, this value should be recalculated as well. + */ +#define UART_POLL_CYCLE 260 + +#define RX_MODE true /**< Constant defining RX mode for radio during dtm test. */ +#define TX_MODE false /**< Constant defining TX mode for radio during dtm test. */ + +#define PHYS_CH_MAX 39 /**< Maximum number of valid channels in BLE. */ + +// Values that for now are "constants" - they could be configured by a function setting them, +// but most of these are set by the BLE DTM standard, so changing them is not relevant. +#define RFPHY_TEST_0X0F_REF_PATTERN 0x0f /**< RF-PHY test packet patterns, for the repeated octet packets. */ +#define RFPHY_TEST_0X55_REF_PATTERN 0x55 /**< RF-PHY test packet patterns, for the repeated octet packets. */ + +#define PRBS9_CONTENT {0xff, 0xc1, 0xfb, 0xe8, 0x4c, 0x90, 0x72, 0x8b, \ + 0xe7, 0xb3, 0x51, 0x89, 0x63, 0xab, 0x23, 0x23, \ + 0x2, 0x84, 0x18, 0x72, 0xaa, 0x61, 0x2f, 0x3b, \ + 0x51, 0xa8, 0xe5, 0x37, 0x49, 0xfb, 0xc9, 0xca, \ + 0xc, 0x18, 0x53, 0x2c, 0xfd} /**< The PRBS9 sequence used as packet payload. */ + +/**@brief Structure holding the PDU used for transmitting/receiving a PDU. + */ +typedef struct +{ + uint8_t content[DTM_HEADER_SIZE + DTM_PAYLOAD_MAX_SIZE]; /**< PDU packet content. */ +} pdu_type_t; + +/**@brief States used for the DTM test implementation. + */ +typedef enum +{ + STATE_UNINITIALIZED, /**< The DTM is uninitialized. */ + STATE_IDLE, /**< State when system has just initialized, or current test has completed. */ + STATE_TRANSMITTER_TEST, /**< State used when a DTM Transmission test is running. */ + STATE_CARRIER_TEST, /**< State used when a DTM Carrier test is running (Vendor specific test). */ + STATE_RECEIVER_TEST /**< State used when a DTM Receive test is running. */ +} state_t; + +// Internal variables set as side effects of commands or events. +static state_t m_state = STATE_UNINITIALIZED; /**< Current machine state. */ +static uint16_t m_rx_pkt_count; /**< Number of valid packets received. */ +static pdu_type_t m_pdu; /**< PDU to be sent. */ +static uint16_t m_event; /**< current command status - initially "ok", may be set if error detected, or to packet count. */ +static bool m_new_event; /**< Command has been processed - number of not yet reported event bytes. */ +static uint8_t m_packet_length; /**< Payload length of transmitted PDU, bits 2:7 of 16-bit dtm command. */ +static dtm_pkt_type_t m_packet_type; /**< Bits 0..1 of 16-bit transmit command, or 0xFFFFFFFF. */ +static dtm_freq_t m_phys_ch; /**< 0..39 physical channel number (base 2402 MHz, Interval 2 MHz), bits 8:13 of 16-bit dtm command. */ +static uint32_t m_current_time = 0; /**< Counter for interrupts from timer to ensure that the 2 bytes forming a DTM command are received within the time window. */ + +// Nordic specific configuration values (not defined by BLE standard). +// Definition of initial values found in ble_dtm.h +static int32_t m_tx_power = DEFAULT_TX_POWER; /**< TX power for transmission test, default to maximum value (+4 dBm). */ +static NRF_TIMER_Type * mp_timer = DEFAULT_TIMER; /**< Timer to be used. */ +static IRQn_Type m_timer_irq = DEFAULT_TIMER_IRQn; /**< which interrupt line to clear on every timeout */ + +static uint8_t const m_prbs_content[] = PRBS9_CONTENT; /**< Pseudo-random bit sequence defined by the BLE standard. */ +static uint8_t m_packetHeaderLFlen = 8; /**< Length of length field in packet Header (in bits). */ +static uint8_t m_packetHeaderS0len = 1; /**< Length of S0 field in packet Header (in bytes). */ +static uint8_t m_packetHeaderS1len = 0; /**< Length of S1 field in packet Header (in bits). */ +static uint8_t m_crcConfSkipAddr = 1; /**< Leave packet address field out of CRC calculation. */ +static uint8_t m_static_length = 0; /**< Number of bytes sent in addition to the var.length payload. */ +static uint32_t m_balen = 3; /**< Base address length in bytes. */ +static uint32_t m_endian = RADIO_PCNF1_ENDIAN_Little; /**< On air endianess of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields. */ +static uint32_t m_whitening = RADIO_PCNF1_WHITEEN_Disabled; /**< Whitening disabled. */ +static uint8_t m_crcLength = RADIO_CRCCNF_LEN_Three; /**< CRC Length (in bytes). */ +static uint32_t m_address = 0x71764129; /**< Address. */ +static uint32_t m_crc_poly = 0x0000065B; /**< CRC polynomial. */ +static uint32_t m_crc_init = 0x00555555; /**< Initial value for CRC calculation. */ +static uint8_t m_radio_mode = RADIO_MODE_MODE_Ble_1Mbit; /**< nRF51 specific radio mode vale. */ +static uint32_t m_txIntervaluS = 625; /**< Time between start of Tx packets (in uS). */ + + +/**@brief Function for verifying that a received PDU has the expected structure and content. + */ +static bool check_pdu(void) +{ + uint8_t k; // Byte pointer for running through PDU payload + uint8_t pattern; // Repeating octet value in payload + dtm_pkt_type_t pdu_packet_type; // Note: PDU packet type is a 4-bit field in HCI, but 2 bits in BLE DTM + uint8_t length; + + pdu_packet_type = (dtm_pkt_type_t)(m_pdu.content[DTM_HEADER_OFFSET] & 0x0F); + length = m_pdu.content[DTM_LENGTH_OFFSET]; + + if ((pdu_packet_type > (dtm_pkt_type_t)PACKET_TYPE_MAX) || (length > DTM_PAYLOAD_MAX_SIZE)) + { + return false; + } + + if (pdu_packet_type == DTM_PKT_PRBS9) + { + // Payload does not consist of one repeated octet; must compare ir with entire block into + return (memcmp(m_pdu.content+DTM_HEADER_SIZE, m_prbs_content, length) == 0); + } + + if (pdu_packet_type == DTM_PKT_0X0F) + { + pattern = RFPHY_TEST_0X0F_REF_PATTERN; + } + else + { + pattern = RFPHY_TEST_0X55_REF_PATTERN; + } + + for (k = 0; k < length; k++) + { + // Check repeated pattern filling the PDU payload + if (m_pdu.content[k + 2] != pattern) + { + return false; + } + } + return true; +} + + +/**@brief Function for turning off the radio after a test. + * Also called after test done, to be ready for next test. + */ +static void radio_reset(void) +{ + NRF_PPI->CHENCLR = PPI_CHENCLR_CH0_Msk | PPI_CHENCLR_CH1_Msk; + + NRF_RADIO->SHORTS = 0; + NRF_RADIO->EVENTS_DISABLED = 0; + NRF_RADIO->TASKS_DISABLE = 1; + + while (NRF_RADIO->EVENTS_DISABLED == 0) + { + // Do nothing + } + + NRF_RADIO->EVENTS_DISABLED = 0; + NRF_RADIO->TASKS_RXEN = 0; + NRF_RADIO->TASKS_TXEN = 0; + + m_rx_pkt_count = 0; +} + + +/**@brief Function for initializing the radio for DTM. + */ +static uint32_t radio_init(void) +{ +#ifdef NRF51 + // Handle BLE Radio tuning parameters from production for DTM if required. + // Only needed for DTM without SoftDevice, as the SoftDevice normally handles this. + // PCN-083. + if ( ((NRF_FICR->OVERRIDEEN) & FICR_OVERRIDEEN_BLE_1MBIT_Msk) == FICR_OVERRIDEEN_BLE_1MBIT_Override) + { + NRF_RADIO->OVERRIDE0 = NRF_FICR->BLE_1MBIT[0]; + NRF_RADIO->OVERRIDE1 = NRF_FICR->BLE_1MBIT[1]; + NRF_RADIO->OVERRIDE2 = NRF_FICR->BLE_1MBIT[2]; + NRF_RADIO->OVERRIDE3 = NRF_FICR->BLE_1MBIT[3]; + NRF_RADIO->OVERRIDE4 = NRF_FICR->BLE_1MBIT[4]; + } +#endif // NRF51 + + // Initializing code below is quite generic - for BLE, the values are fixed, and expressions + // are constant. Non-constant values are essentially set in radio_prepare(). + if (((m_tx_power & 0x03) != 0) || // tx_power should be a multiple of 4 + ((m_tx_power & 0xffffff00) != 0) || // Upper 24 bits are required to be zeroed + ((int8_t)m_tx_power > 4) || // Max tx_power is +4 dBm + ((int8_t)(m_tx_power & 0xff) < -40) || // Min tx_power is -40 dBm + (m_radio_mode > RADIO_MODE_MODE_Ble_1Mbit) // Values 0-2: Proprietary mode, 3 (last valid): BLE + ) + { + return DTM_ERROR_ILLEGAL_CONFIGURATION; + } + + // Turn off radio before configuring it + radio_reset(); + + NRF_RADIO->TXPOWER = m_tx_power; + NRF_RADIO->MODE = m_radio_mode << RADIO_MODE_MODE_Pos; + + // Set the access address, address0/prefix0 used for both Rx and Tx address + NRF_RADIO->PREFIX0 &= ~RADIO_PREFIX0_AP0_Msk; + NRF_RADIO->PREFIX0 |= (m_address >> 24) & RADIO_PREFIX0_AP0_Msk; + NRF_RADIO->BASE0 = m_address << 8; + NRF_RADIO->RXADDRESSES = RADIO_RXADDRESSES_ADDR0_Enabled << RADIO_RXADDRESSES_ADDR0_Pos; + NRF_RADIO->TXADDRESS = (0x00 << RADIO_TXADDRESS_TXADDRESS_Pos) & RADIO_TXADDRESS_TXADDRESS_Msk; + + // Configure CRC calculation + NRF_RADIO->CRCCNF = (m_crcConfSkipAddr << RADIO_CRCCNF_SKIP_ADDR_Pos) | + (m_crcLength << RADIO_CRCCNF_LEN_Pos); + + NRF_RADIO->PCNF0 = (m_packetHeaderS1len << RADIO_PCNF0_S1LEN_Pos) | + (m_packetHeaderS0len << RADIO_PCNF0_S0LEN_Pos) | + (m_packetHeaderLFlen << RADIO_PCNF0_LFLEN_Pos); + + NRF_RADIO->PCNF1 = (m_whitening << RADIO_PCNF1_WHITEEN_Pos) | + (m_endian << RADIO_PCNF1_ENDIAN_Pos) | + (m_balen << RADIO_PCNF1_BALEN_Pos) | + (m_static_length << RADIO_PCNF1_STATLEN_Pos) | + (DTM_PAYLOAD_MAX_SIZE << RADIO_PCNF1_MAXLEN_Pos); + + return DTM_SUCCESS; +} + + +/**@brief Function for preparing the radio. At start of each test: Turn off RF, clear interrupt flags of RF, initialize the radio + * at given RF channel. + * + *@param[in] rx boolean indicating if radio should be prepared in rx mode (true) or tx mode. + */ +static void radio_prepare(bool rx) +{ +#ifdef NRF51 + NRF_RADIO->TEST = 0; +#elif defined(NRF52) + NRF_RADIO->MODECNF0 = (RADIO_MODECNF0_RU_Default << RADIO_MODECNF0_RU_Pos) | + (RADIO_MODECNF0_DTX_B1 << RADIO_MODECNF0_DTX_Pos); +#endif // NRF51 / NRF52 + NRF_RADIO->CRCPOLY = m_crc_poly; + NRF_RADIO->CRCINIT = m_crc_init; + NRF_RADIO->FREQUENCY = (m_phys_ch << 1) + 2; // Actual frequency (MHz): 2400 + register value + NRF_RADIO->PACKETPTR = (uint32_t)&m_pdu; // Setting packet pointer will start the radio + NRF_RADIO->EVENTS_READY = 0; + NRF_RADIO->SHORTS = (1 << RADIO_SHORTS_READY_START_Pos) | // Shortcut between READY event and START task + (1 << RADIO_SHORTS_END_DISABLE_Pos); // Shortcut between END event and DISABLE task + + if (rx) + { + NRF_RADIO->EVENTS_END = 0; + NRF_RADIO->TASKS_RXEN = 1; // shorts will start radio in RX mode when it is ready + } + else // tx + { + NRF_RADIO->TXPOWER = m_tx_power; + } +} + + +/**@brief Function for terminating the ongoing test (if any) and closing down the radio. + */ +static void dtm_test_done(void) +{ +#ifdef NRF51 + NRF_RADIO->TEST = 0; +#elif defined(NRF52) + NRF_RADIO->MODECNF0 = (RADIO_MODECNF0_RU_Default << RADIO_MODECNF0_RU_Pos) | + (RADIO_MODECNF0_DTX_B1 << RADIO_MODECNF0_DTX_Pos); +#endif // NRF51 / NRF52 + NRF_PPI->CHENCLR = 0x01; + NRF_PPI->CH[0].EEP = 0; // Break connection from timer to radio to stop transmit loop + NRF_PPI->CH[0].TEP = 0; + + radio_reset(); + m_state = STATE_IDLE; +} + + +/**@brief Function for configuring the timer for 625us cycle time. + */ +static uint32_t timer_init(void) +{ + // Use 16MHz from external crystal + // This could be customized for RC/Xtal, or even to use a 32 kHz crystal + NRF_CLOCK->EVENTS_HFCLKSTARTED = 0; + NRF_CLOCK->TASKS_HFCLKSTART = 1; + + while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0) + { + // Do nothing while waiting for the clock to start + } + + mp_timer->TASKS_STOP = 1; // Stop timer, if it was running + mp_timer->TASKS_CLEAR = 1; + mp_timer->MODE = TIMER_MODE_MODE_Timer; // Timer mode (not counter) + mp_timer->EVENTS_COMPARE[0] = 0; // clean up possible old events + mp_timer->EVENTS_COMPARE[1] = 0; + mp_timer->EVENTS_COMPARE[2] = 0; + mp_timer->EVENTS_COMPARE[3] = 0; + + // Timer is polled, but enable the compare0 interrupt in order to wakeup from CPU sleep + mp_timer->INTENSET = TIMER_INTENSET_COMPARE0_Msk; + mp_timer->SHORTS = 1 << TIMER_SHORTS_COMPARE0_CLEAR_Pos; // Clear the count every time timer reaches the CCREG0 count + mp_timer->PRESCALER = 4; // Input clock is 16MHz, timer clock = 2 ^ prescale -> interval 1us + mp_timer->CC[0] = m_txIntervaluS; // 625uS with 1MHz clock to the timer + mp_timer->CC[1] = UART_POLL_CYCLE; // 260uS with 1MHz clock to the timer + mp_timer->TASKS_START = 1; // Start the timer - it will be running continuously + m_current_time = 0; + return DTM_SUCCESS; +} + + +/**@brief Function for handling vendor specific commands. + * Used when packet type is set to Vendor specific. + * The length field is used for encoding vendor specific command. + * The frequency field is used for encoding vendor specific options to the command. + * + * @param[in] vendor_cmd Vendor specific command to be executed. + * @param[in] vendor_option Vendor specific option to the vendor command. + * + * @return DTM_SUCCESS or one of the DTM_ERROR_ values + */ +static uint32_t dtm_vendor_specific_pkt(uint32_t vendor_cmd, dtm_freq_t vendor_option) +{ + switch (vendor_cmd) + { + // nRFgo Studio uses CARRIER_TEST_STUDIO to indicate a continuous carrier without + // a modulated signal. + case CARRIER_TEST: + case CARRIER_TEST_STUDIO: + // Not a packet type, but used to indicate that a continuous carrier signal + // should be transmitted by the radio. + radio_prepare(TX_MODE); +#ifdef NRF51 + NRF_RADIO->TEST = (RADIO_TEST_PLL_LOCK_Enabled << RADIO_TEST_PLL_LOCK_Pos) | + (RADIO_TEST_CONST_CARRIER_Enabled << RADIO_TEST_CONST_CARRIER_Pos); +#elif defined(NRF52) + NRF_RADIO->MODECNF0 = (RADIO_MODECNF0_RU_Default << RADIO_MODECNF0_RU_Pos) | + (RADIO_MODECNF0_DTX_B1 << RADIO_MODECNF0_DTX_Pos); +#endif // NRF51 / NRF52 + + // Shortcut between READY event and START task + NRF_RADIO->SHORTS = 1 << RADIO_SHORTS_READY_START_Pos; + + // Shortcut will start radio in Tx mode when it is ready + NRF_RADIO->TASKS_TXEN = 1; + m_state = STATE_CARRIER_TEST; + break; + + case SET_TX_POWER: + if (!dtm_set_txpower(vendor_option)) + { + return DTM_ERROR_ILLEGAL_CONFIGURATION; + } + break; + + case SELECT_TIMER: + if (!dtm_set_timer(vendor_option)) + { + return DTM_ERROR_ILLEGAL_CONFIGURATION; + } + break; + } + // Event code is unchanged, successful + return DTM_SUCCESS; +} + + +uint32_t dtm_init(void) +{ + if ((timer_init() != DTM_SUCCESS) || (radio_init() != DTM_SUCCESS)) + { + return DTM_ERROR_ILLEGAL_CONFIGURATION; + } + m_new_event = false; + m_state = STATE_IDLE; + + // Enable wake-up on event + SCB->SCR |= SCB_SCR_SEVONPEND_Msk; + + return DTM_SUCCESS; +} + + +uint32_t dtm_wait(void) +{ + // Enable wake-up on event + SCB->SCR |= SCB_SCR_SEVONPEND_Msk; + + for (;;) + { + // Event may be the reception of a packet - + // handle radio first, to give it highest priority: + if (NRF_RADIO->EVENTS_END != 0) + { + NRF_RADIO->EVENTS_END = 0; + NVIC_ClearPendingIRQ(RADIO_IRQn); + + if (m_state == STATE_RECEIVER_TEST) + { + NRF_RADIO->TASKS_RXEN = 1; + if ((NRF_RADIO->CRCSTATUS == 1) && check_pdu()) + { + // Count the number of successfully received packets + m_rx_pkt_count++; + } + // Note that failing packets are simply ignored (CRC or contents error). + + // Zero fill all pdu fields to avoid stray data + memset(&m_pdu, 0, DTM_PDU_MAX_MEMORY_SIZE); + } + // If no RECEIVER_TEST is running, ignore incoming packets (but do clear IRQ!) + } + + // Check for timeouts: + if (mp_timer->EVENTS_COMPARE[0] != 0) + { + mp_timer->EVENTS_COMPARE[0] = 0; + } + else if (mp_timer->EVENTS_COMPARE[1] != 0) + { + // Reset timeout event flag for next iteration. + mp_timer->EVENTS_COMPARE[1] = 0; + NVIC_ClearPendingIRQ(m_timer_irq); + return ++m_current_time; + } + + // Other events: No processing + } +} + + +uint32_t dtm_cmd(dtm_cmd_t cmd, dtm_freq_t freq, uint32_t length, dtm_pkt_type_t payload) +{ + // Save specified packet in static variable for tx/rx functions to use. + // Note that BLE conformance testers always use full length packets. + m_packet_length = ((uint8_t)length & 0xFF); + m_packet_type = payload; + m_phys_ch = freq; + + // Clean out any non-retrieved event that might linger from an earlier test + m_new_event = true; + + // Set default event; any error will set it to LE_TEST_STATUS_EVENT_ERROR + m_event = LE_TEST_STATUS_EVENT_SUCCESS; + + if (m_state == STATE_UNINITIALIZED) + { + // Application has not explicitly initialized DTM, + return DTM_ERROR_UNINITIALIZED; + } + + if (cmd == LE_RESET) + { + // Note that timer will continue running after a reset + dtm_test_done(); + return DTM_SUCCESS; + } + + if (cmd == LE_TEST_END) + { + if (m_state == STATE_IDLE) + { + // Sequencing error - only rx or tx test may be ended! + m_event = LE_TEST_STATUS_EVENT_ERROR; + return DTM_ERROR_INVALID_STATE; + } + m_event = LE_PACKET_REPORTING_EVENT | m_rx_pkt_count; + dtm_test_done(); + return DTM_SUCCESS; + } + + if (m_state != STATE_IDLE) + { + // Sequencing error - only TEST_END/RESET are legal while test is running + // Note: State is unchanged; ongoing test not affected + m_event = LE_TEST_STATUS_EVENT_ERROR; + return DTM_ERROR_INVALID_STATE; + } + + if (m_phys_ch > PHYS_CH_MAX) + { + // Parameter error + // Note: State is unchanged; ongoing test not affected + m_event = LE_TEST_STATUS_EVENT_ERROR; + return DTM_ERROR_ILLEGAL_CHANNEL; + } + + m_rx_pkt_count = 0; + + if (cmd == LE_RECEIVER_TEST) + { + // Zero fill all pdu fields to avoid stray data from earlier test run + memset(&m_pdu, 0, DTM_PDU_MAX_MEMORY_SIZE); + radio_prepare(RX_MODE); // Reinitialize "everything"; RF interrupts OFF + m_state = STATE_RECEIVER_TEST; + return DTM_SUCCESS; + } + + if (cmd == LE_TRANSMITTER_TEST) + { + if (m_packet_length > DTM_PAYLOAD_MAX_SIZE) + { + // Parameter error + m_event = LE_TEST_STATUS_EVENT_ERROR; + return DTM_ERROR_ILLEGAL_LENGTH; + } + + // Note that PDU uses 4 bits even though BLE DTM uses only 2 (the HCI SDU uses all 4) + m_pdu.content[DTM_HEADER_OFFSET] = ((uint8_t)m_packet_type & 0x0F); + m_pdu.content[DTM_LENGTH_OFFSET] = m_packet_length; + + switch (m_packet_type) + { + case DTM_PKT_PRBS9: + // Non-repeated, must copy entire pattern to PDU + memcpy(m_pdu.content + DTM_HEADER_SIZE, m_prbs_content, length); + break; + + case DTM_PKT_0X0F: + // Bit pattern 00001111 repeated + memset(m_pdu.content + DTM_HEADER_SIZE, RFPHY_TEST_0X0F_REF_PATTERN, length); + break; + + case DTM_PKT_0X55: + // Bit pattern 01010101 repeated + memset(m_pdu.content + DTM_HEADER_SIZE, RFPHY_TEST_0X55_REF_PATTERN, length); + break; + + case DTM_PKT_VENDORSPECIFIC: + // The length field is for indicating the vendor specific command to execute. + // The frequency field is used for vendor specific options to the command. + return dtm_vendor_specific_pkt(length, freq); + + default: + // Parameter error + m_event = LE_TEST_STATUS_EVENT_ERROR; + return DTM_ERROR_ILLEGAL_CONFIGURATION; + } + + // Initialize CRC value, set channel: + radio_prepare(TX_MODE); + // Configure PPI so that timer will activate radio every 625 us + NRF_PPI->CH[0].EEP = (uint32_t)&mp_timer->EVENTS_COMPARE[0]; + NRF_PPI->CH[0].TEP = (uint32_t)&NRF_RADIO->TASKS_TXEN; + NRF_PPI->CHENSET = 0x01; + m_state = STATE_TRANSMITTER_TEST; + } + return DTM_SUCCESS; +} + + +bool dtm_event_get(dtm_event_t *p_dtm_event) +{ + bool was_new = m_new_event; + // mark the current event as retrieved + m_new_event = false; + *p_dtm_event = m_event; + // return value indicates whether this value was already retrieved. + return was_new; +} + + +// ================================================================================================= +// Configuration functions (only for parameters not definitely determined by the BLE DTM standard). +// These functions return true if successful, false if value could not be set + + +/**@brief Function for configuring the output power for transmitter test. + This function may be called directly, or through dtm_cmd() specifying + DTM_PKT_VENDORSPECIFIC as payload, SET_TX_POWER as length, and the dBm value as frequency. + */ +bool dtm_set_txpower(uint32_t new_tx_power) +{ + // radio->TXPOWER register is 32 bits, low octet a signed value, upper 24 bits zeroed + int8_t new_power8 = (int8_t)(new_tx_power & 0xFF); + + if (m_state > STATE_IDLE) + { + // radio must be idle to change the tx power + return false; + } + + if ((new_power8 > 4) || (new_power8 < -40)) + { + // Parameter outside valid range: nRF radio is restricted to the range -40 dBm to +4 dBm + return false; + } + + if (new_tx_power & 0x03) + { + // Parameter error: The nRF51 radio requires settings that are a multiple of 4. + return false; + } + m_tx_power = new_tx_power; + + return true; +} + + +/**@brief Function for selecting a timer resource. + * This function may be called directly, or through dtm_cmd() specifying + * DTM_PKT_VENDORSPECIFIC as payload, SELECT_TIMER as length, and the timer as freq + * + * @param[in] new_timer Timer id for the timer to use: 0, 1, or 2. + * + * @return true if the timer was successfully changed, false otherwise. + */ +bool dtm_set_timer(uint32_t new_timer) +{ + if (m_state > STATE_IDLE) + { + return false; + } + if (new_timer == 0) + { + mp_timer = NRF_TIMER0; + m_timer_irq = TIMER0_IRQn; + } + else if (new_timer == 1) + { + mp_timer = NRF_TIMER1; + m_timer_irq = TIMER1_IRQn; + } + else if (new_timer == 2) + { + mp_timer = NRF_TIMER2; + m_timer_irq = TIMER2_IRQn; + } + else + { + // Parameter error: Only TIMER 0, 1, 2 provided by nRF51 + return false; + } + // New timer has been selected: + return true; +} + +/// @} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_dtm/ble_dtm.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_dtm/ble_dtm.h new file mode 100644 index 0000000000..76acb1e4f0 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_dtm/ble_dtm.h @@ -0,0 +1,141 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_sdk_dtmlib_dtm DTM - Direct Test Mode + * @{ + * @ingroup ble_sdk_lib + * @brief Module for testing RF/PHY using DTM commands. + */ + +#ifndef BLE_DTM_H__ +#define BLE_DTM_H__ + +#include +#include + + +/**@brief Configuration parameters. */ +#define DEFAULT_TX_POWER RADIO_TXPOWER_TXPOWER_0dBm /**< Default Transmission power using in the DTM module. */ +#define DEFAULT_TIMER NRF_TIMER0 /**< Default timer used for timing. */ +#define DEFAULT_TIMER_IRQn TIMER0_IRQn /**< IRQ used for timer. NOTE: MUST correspond to DEFAULT_TIMER. */ + +/**@brief BLE DTM command codes. */ +typedef uint32_t dtm_cmd_t; /**< DTM command type. */ + +#define LE_RESET 0 /**< DTM command: Reset device. */ +#define LE_RECEIVER_TEST 1 /**< DTM command: Start receive test. */ +#define LE_TRANSMITTER_TEST 2 /**< DTM command: Start transmission test. */ +#define LE_TEST_END 3 /**< DTM command: End test and send packet report. */ + +// Configuration options used as parameter 2 +// when cmd == LE_TRANSMITTER_TEST and payload == DTM_PKT_VENDORSPECIFIC +// Configuration value, if any, is supplied in parameter 3 + +#define CARRIER_TEST 0 /**< Length=0 indicates a constant, unmodulated carrier until LE_TEST_END or LE_RESET */ +#define CARRIER_TEST_STUDIO 1 /**< nRFgo Studio uses value 1 in length field, to indicate a constant, unmodulated carrier until LE_TEST_END or LE_RESET */ +#define SET_TX_POWER 2 /**< Set transmission power, value -40..+4 dBm in steps of 4 */ +#define SELECT_TIMER 3 /**< Select on of the 16 MHz timers 0, 1 or 2 */ + +#define LE_PACKET_REPORTING_EVENT 0x8000 /**< DTM Packet reporting event, returned by the device to the tester. */ +#define LE_TEST_STATUS_EVENT_SUCCESS 0x0000 /**< DTM Status event, indicating success. */ +#define LE_TEST_STATUS_EVENT_ERROR 0x0001 /**< DTM Status event, indicating an error. */ + +#define DTM_PKT_PRBS9 0x00 /**< Bit pattern PRBS9. */ +#define DTM_PKT_0X0F 0x01 /**< Bit pattern 11110000 (LSB is the leftmost bit). */ +#define DTM_PKT_0X55 0x02 /**< Bit pattern 10101010 (LSB is the leftmost bit). */ +#define DTM_PKT_VENDORSPECIFIC 0xFFFFFFFF /**< Vendor specific. Nordic: Continuous carrier test, or configuration. */ + +/**@brief Return codes from dtm_cmd(). */ +#define DTM_SUCCESS 0x00 /**< Indicate that the DTM function completed with success. */ +#define DTM_ERROR_ILLEGAL_CHANNEL 0x01 /**< Physical channel number must be in the range 0..39. */ +#define DTM_ERROR_INVALID_STATE 0x02 /**< Sequencing error: Command is not valid now. */ +#define DTM_ERROR_ILLEGAL_LENGTH 0x03 /**< Payload size must be in the range 0..37. */ +#define DTM_ERROR_ILLEGAL_CONFIGURATION 0x04 /**< Parameter out of range (legal range is function dependent). */ +#define DTM_ERROR_UNINITIALIZED 0x05 /**< DTM module has not been initialized by the application. */ + +// Note: DTM_PKT_VENDORSPECIFIC, is not a packet type +#define PACKET_TYPE_MAX DTM_PKT_0X55 /**< Highest value allowed as DTM Packet type. */ + +/** @brief BLE DTM event type. */ +typedef uint32_t dtm_event_t; /**< Type for handling DTM event. */ + +/** @brief BLE DTM frequency type. */ +typedef uint32_t dtm_freq_t; /**< Physical channel, valid range: 0..39. */ + +/**@brief BLE DTM packet types. */ +typedef uint32_t dtm_pkt_type_t; /**< Type for holding the requested DTM payload type.*/ + + +/**@brief Function for initializing or re-initializing DTM module + * + * @return DTM_SUCCESS on successful initialization of the DTM module. +*/ +uint32_t dtm_init(void); + + +/**@brief Function for giving control to dtmlib for handling timer and radio events. + * Will return to caller at 625us intervals or whenever another event than radio occurs + * (such as UART input). Function will put MCU to sleep between events. + * + * @return Time counter, incremented every 625 us. + */ +uint32_t dtm_wait(void); + + +/**@brief Function for calling when a complete command has been prepared by the Tester. + * + * @param[in] cmd One of the DTM_CMD values (bits 14:15 in the 16-bit UART format). + * @param[in] freq Phys. channel no - actual frequency = (2402 + freq * 2) MHz (bits 8:13 in + * the 16-bit UART format). + * @param[in] length Payload length, 0..37 (bits 2:7 in the 16-bit UART format). + * @param[in] payload One of the DTM_PKT values (bits 0:1 in the 16-bit UART format). + * + * @return DTM_SUCCESS or one of the DTM_ERROR_ values + */ +uint32_t dtm_cmd(dtm_cmd_t cmd, dtm_freq_t freq, uint32_t length, dtm_pkt_type_t payload); + + +/**@brief Function for reading the result of a DTM command + * + * @param[out] p_dtm_event Pointer to buffer for 16 bit event code according to DTM standard. + * + * @return true: new event, false: no event since last call, this event has been read earlier + */ +bool dtm_event_get(dtm_event_t * p_dtm_event); + + +/**@brief Function for configuring the timer to use. + * + * @note Must be called when no DTM test is running. + * + * @param[in] new_timer Index (0..2) of timer to be used by the DTM library + * + * @return true: success, new timer was selected, false: parameter error + */ +bool dtm_set_timer(uint32_t new_timer); + + +/**@brief Function for configuring the transmit power. + * + * @note Must be called when no DTM test is running. + * + * @param[in] new_tx_power New output level, +4..-40, in steps of 4. + * + * @return true: tx power setting changed, false: parameter error + */ +bool dtm_set_txpower(uint32_t new_tx_power); + +#endif // BLE_DTM_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_error_log/ble_error_log.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_error_log/ble_error_log.c new file mode 100644 index 0000000000..0e2614041b --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_error_log/ble_error_log.c @@ -0,0 +1,58 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include +#include +#include +#include +#include "ble_error_log.h" +#include "app_util.h" +#include "app_error.h" +#include "nrf_gpio.h" +#include "pstorage.h" + + +// Made static to avoid the error_log to go on the stack. +static ble_error_log_data_t m_ble_error_log; /**< . */ +//lint -esym(526,__Vectors) +extern uint32_t * __Vectors; /**< The initialization vector holds the address to __initial_sp that will be used when fetching the stack. */ + +static void fetch_stack(ble_error_log_data_t * error_log) +{ + uint32_t * p_stack; + uint32_t * initial_sp; + uint32_t length; + + initial_sp = (uint32_t *) __Vectors; + p_stack = (uint32_t *) GET_SP(); + + length = ((uint32_t) initial_sp) - ((uint32_t) p_stack); + memcpy(error_log->stack_info, + p_stack, + (length > STACK_DUMP_LENGTH) ? STACK_DUMP_LENGTH : length); +} + +uint32_t ble_error_log_write(uint32_t err_code, const uint8_t * p_message, uint16_t line_number) +{ + m_ble_error_log.failure = true; + m_ble_error_log.err_code = err_code; + m_ble_error_log.line_number = line_number; + + strncpy((char *)m_ble_error_log.message, (const char *)p_message, ERROR_MESSAGE_LENGTH - 1); + m_ble_error_log.message[ERROR_MESSAGE_LENGTH - 1] = '\0'; + + fetch_stack(&m_ble_error_log); + + // Write to flash removed, to be redone. + + return NRF_SUCCESS; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_error_log/ble_error_log.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_error_log/ble_error_log.h new file mode 100644 index 0000000000..825046fa6a --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_error_log/ble_error_log.h @@ -0,0 +1,69 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_error_log_module Error Log Module + * @{ + * @ingroup ble_sdk_lib + * @brief Module for writing error and stack to flash memory. + * + * @details It contains functions for writing an error code, line number, filename/message and + * the stack to the flash during an error, e.g. in the assert handler. + * + */ +#ifndef BLE_ERROR_LOG_H__ +#define BLE_ERROR_LOG_H__ + +#include +#include +#include "ble_flash.h" + +#define ERROR_MESSAGE_LENGTH 128 /**< Length of error message to stored. */ +#define STACK_DUMP_LENGTH 256 /**< Length of stack to be stored at max: 64 entries of 4 bytes each. */ +#define FLASH_PAGE_ERROR_LOG (BLE_FLASH_PAGE_END - 2) /**< Address in flash where stack trace can be stored. */ + +/**@brief Error Log Data structure. + * + * @details The structure contains the error, message/filename, line number as well as the current + * stack, at the time where an error occured. + */ +typedef struct +{ + uint16_t failure; /**< Indication that a major failure has occurred during last execution of the application. */ + uint16_t line_number; /**< Line number indicating at which line the failure occurred. */ + uint32_t err_code; /**< Error code when failure occurred. */ + uint8_t message[ERROR_MESSAGE_LENGTH]; /**< Will just use the first 128 bytes of filename to store for debugging purposes. */ + uint32_t stack_info[STACK_DUMP_LENGTH / 4]; /**< Will contain stack information, can be manually unwinded for debug purposes. */ +} ble_error_log_data_t; + + +/**@brief Function for writing the file name/message, line number, and current program stack + * to flash. + * + * @note This function will force the writing to flash, and disregard any radio communication. + * USE THIS FUNCTION WITH CARE. + * + * @param[in] err_code Error code to be logged. + * @param[in] p_message Message to be written to the flash together with stack dump, usually + * the file name where the error occured. + * @param[in] line_number Line number where the error occured. + * + * @return NRF_SUCCESS on successful writing of the error log. + * + */ +uint32_t ble_error_log_write(uint32_t err_code, const uint8_t * p_message, uint16_t line_number); + + +#endif /* BLE_ERROR_LOG_H__ */ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_racp/ble_racp.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_racp/ble_racp.c new file mode 100644 index 0000000000..047c85545b --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_racp/ble_racp.c @@ -0,0 +1,56 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + */ + +#include "ble_racp.h" +#include + + +void ble_racp_decode(uint8_t data_len, uint8_t * p_data, ble_racp_value_t * p_racp_val) +{ + p_racp_val->opcode = 0xFF; + p_racp_val->operator = 0xFF; + p_racp_val->operand_len = 0; + p_racp_val->p_operand = NULL; + + if (data_len > 0) + { + p_racp_val->opcode = p_data[0]; + } + if (data_len > 1) + { + p_racp_val->operator = p_data[1]; //lint !e415 + } + if (data_len > 2) + { + p_racp_val->operand_len = data_len - 2; + p_racp_val->p_operand = &p_data[2]; //lint !e416 + } +} + + +uint8_t ble_racp_encode(const ble_racp_value_t * p_racp_val, uint8_t * p_data) +{ + uint8_t len = 0; + int i; + + if (p_data != NULL) + { + p_data[len++] = p_racp_val->opcode; + p_data[len++] = p_racp_val->operator; + + for (i = 0; i < p_racp_val->operand_len; i++) + { + p_data[len++] = p_racp_val->p_operand[i]; + } + } + + return len; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_racp/ble_racp.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_racp/ble_racp.h new file mode 100644 index 0000000000..d3296e47f1 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_racp/ble_racp.h @@ -0,0 +1,96 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + */ + +/** @file + * + * @defgroup ble_sdk_lib_racp Record Access Control Point + * @{ + * @ingroup ble_sdk_lib + * @brief Record Access Control Point library. + */ + +#ifndef BLE_RACP_H__ +#define BLE_RACP_H__ + +#include +#include +#include "ble.h" +#include "ble_types.h" +#include "ble.h" + +/**@brief Record Access Control Point opcodes. */ +#define RACP_OPCODE_RESERVED 0 /**< Record Access Control Point opcode - Reserved for future use. */ +#define RACP_OPCODE_REPORT_RECS 1 /**< Record Access Control Point opcode - Report stored records. */ +#define RACP_OPCODE_DELETE_RECS 2 /**< Record Access Control Point opcode - Delete stored records. */ +#define RACP_OPCODE_ABORT_OPERATION 3 /**< Record Access Control Point opcode - Abort operation. */ +#define RACP_OPCODE_REPORT_NUM_RECS 4 /**< Record Access Control Point opcode - Report number of stored records. */ +#define RACP_OPCODE_NUM_RECS_RESPONSE 5 /**< Record Access Control Point opcode - Number of stored records response. */ +#define RACP_OPCODE_RESPONSE_CODE 6 /**< Record Access Control Point opcode - Response code. */ + +/**@brief Record Access Control Point operators. */ +#define RACP_OPERATOR_NULL 0 /**< Record Access Control Point operator - Null. */ +#define RACP_OPERATOR_ALL 1 /**< Record Access Control Point operator - All records. */ +#define RACP_OPERATOR_LESS_OR_EQUAL 2 /**< Record Access Control Point operator - Less than or equal to. */ +#define RACP_OPERATOR_GREATER_OR_EQUAL 3 /**< Record Access Control Point operator - Greater than or equal to. */ +#define RACP_OPERATOR_RANGE 4 /**< Record Access Control Point operator - Within range of (inclusive). */ +#define RACP_OPERATOR_FIRST 5 /**< Record Access Control Point operator - First record (i.e. oldest record). */ +#define RACP_OPERATOR_LAST 6 /**< Record Access Control Point operator - Last record (i.e. most recent record). */ +#define RACP_OPERATOR_RFU_START 7 /**< Record Access Control Point operator - Start of Reserved for Future Use area. */ + +/**@brief Record Access Control Point response codes. */ +#define RACP_RESPONSE_RESERVED 0 /**< Record Access Control Point response code - Reserved for future use. */ +#define RACP_RESPONSE_SUCCESS 1 /**< Record Access Control Point response code - Successful operation. */ +#define RACP_RESPONSE_OPCODE_UNSUPPORTED 2 /**< Record Access Control Point response code - Unsupported op code received. */ +#define RACP_RESPONSE_INVALID_OPERATOR 3 /**< Record Access Control Point response code - Operator not valid for service. */ +#define RACP_RESPONSE_OPERATOR_UNSUPPORTED 4 /**< Record Access Control Point response code - Unsupported operator. */ +#define RACP_RESPONSE_INVALID_OPERAND 5 /**< Record Access Control Point response code - Operand not valid for service. */ +#define RACP_RESPONSE_NO_RECORDS_FOUND 6 /**< Record Access Control Point response code - No matching records found. */ +#define RACP_RESPONSE_ABORT_FAILED 7 /**< Record Access Control Point response code - Abort could not be completed. */ +#define RACP_RESPONSE_PROCEDURE_NOT_DONE 8 /**< Record Access Control Point response code - Procedure could not be completed. */ +#define RACP_RESPONSE_OPERAND_UNSUPPORTED 9 /**< Record Access Control Point response code - Unsupported operand. */ + +/**@brief Record Access Control Point value structure. */ +typedef struct +{ + uint8_t opcode; /**< Op Code. */ + uint8_t operator; /**< Operator. */ + uint8_t operand_len; /**< Length of the operand. */ + uint8_t * p_operand; /**< Pointer to the operand. */ +} ble_racp_value_t; + +/**@brief Function for decoding a Record Access Control Point write. + * + * @details This call decodes a write to the Record Access Control Point. + * + * @param[in] data_len Length of data in received write. + * @param[in] p_data Pointer to received data. + * @param[out] p_racp_val Pointer to decoded Record Access Control Point write. + * @note This does not do a data copy. It assumes the data pointed to by + * p_data is persistant until no longer needed. + */ +void ble_racp_decode(uint8_t data_len, uint8_t * p_data, ble_racp_value_t * p_racp_val); + +/**@brief Function for encoding a Record Access Control Point response. + * + * @details This call encodes a response from the Record Access Control Point response. + * + * @param[in] p_racp_val Pointer to Record Access Control Point to encode. + * @param[out] p_data Pointer to where encoded data is written. + * NOTE! It is calling routines respsonsibility to make sure. + * + * @return Length of encoded data. + */ +uint8_t ble_racp_encode(const ble_racp_value_t * p_racp_val, uint8_t * p_data); + +#endif // BLE_RACP_H__ + +/** @} */ + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ancs_c/ble_ancs_c.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ancs_c/ble_ancs_c.c new file mode 100644 index 0000000000..4ad72136c6 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ancs_c/ble_ancs_c.c @@ -0,0 +1,812 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + */ + +/* Disclaimer: This client implementation of the Apple Notification Center Service can and will be changed at any time by Nordic Semiconductor ASA. + * Server implementations such as the ones found in iOS can be changed at any time by Apple and may cause this client implementation to stop working. + */ + +#include "ble_ancs_c.h" +#include "ble_err.h" +#include "ble_srv_common.h" +#include "nrf_assert.h" +#include "device_manager.h" +#include "ble_db_discovery.h" +#include "app_error.h" +#include "app_trace.h" +#include "sdk_common.h" + +#define BLE_ANCS_NOTIF_EVT_ID_INDEX 0 /**< Index of the Event ID field when parsing notifications. */ +#define BLE_ANCS_NOTIF_FLAGS_INDEX 1 /**< Index of the Flags field when parsing notifications. */ +#define BLE_ANCS_NOTIF_CATEGORY_ID_INDEX 2 /**< Index of the Category ID field when parsing notifications. */ +#define BLE_ANCS_NOTIF_CATEGORY_CNT_INDEX 3 /**< Index of the Category Count field when parsing notifications. */ +#define BLE_ANCS_NOTIF_NOTIF_UID 4 /**< Index of the Notification UID field when patsin notifications. */ + +#define ANCS_LOG NRF_LOG_PRINTF_DEBUG /**< Debug logger macro that will be used in this file to do logging of important information over UART. */ + +#define START_HANDLE_DISCOVER 0x0001 /**< Value of start handle during discovery. */ + +#define TX_BUFFER_MASK 0x07 /**< TX buffer mask. Must be a mask of contiguous zeroes followed by a contiguous sequence of ones: 000...111. */ +#define TX_BUFFER_SIZE (TX_BUFFER_MASK + 1) /**< Size of send buffer, which is 1 higher than the mask. */ +#define WRITE_MESSAGE_LENGTH 20 /**< Length of the write message for CCCD/control point. */ +#define BLE_CCCD_NOTIFY_BIT_MASK 0x0001 /**< Enable notification bit. */ + +#define BLE_ANCS_MAX_DISCOVERED_CENTRALS DEVICE_MANAGER_MAX_BONDS /**< Maximum number of discovered services that can be stored in the flash. This number should be identical to maximum number of bonded peer devices. */ + +#define TIME_STRING_LEN 15 /**< Unicode Technical Standard (UTS) #35 date format pattern "yyyyMMdd'T'HHmmSS" + "'\0'". */ + +#define DISCOVERED_SERVICE_DB_SIZE \ + CEIL_DIV(sizeof(ble_ancs_c_service_t) * BLE_ANCS_MAX_DISCOVERED_CENTRALS, sizeof(uint32_t)) /**< Size of bonded peer's database in word size (4 byte). */ + + +/**@brief ANCS request types. + */ +typedef enum +{ + READ_REQ = 1, /**< Type identifying that this tx_message is a read request. */ + WRITE_REQ /**< Type identifying that this tx_message is a write request. */ +} ancs_tx_request_t; + + +/**@brief Structure for writing a message to the central, i.e. Control Point or CCCD. + */ +typedef struct +{ + uint8_t gattc_value[WRITE_MESSAGE_LENGTH]; /**< The message to write. */ + ble_gattc_write_params_t gattc_params; /**< GATTC parameters for this message. */ +} write_params_t; + + +/**@brief Structure for holding data to be transmitted to the connected master. + */ +typedef struct +{ + uint16_t conn_handle; /**< Connection handle to be used when transmitting this message. */ + ancs_tx_request_t type; /**< Type of this message, i.e. read or write message. */ + union + { + uint16_t read_handle; /**< Read request message. */ + write_params_t write_req; /**< Write request message. */ + } req; +} tx_message_t; + + +static tx_message_t m_tx_buffer[TX_BUFFER_SIZE]; /**< Transmit buffer for messages to be transmitted to the Notification Provider. */ +static uint32_t m_tx_insert_index = 0; /**< Current index in the transmit buffer where the next message should be inserted. */ +static uint32_t m_tx_index = 0; /**< Current index in the transmit buffer from where the next message to be transmitted resides. */ + + +/**@brief 128-bit service UUID for the Apple Notification Center Service. + */ +const ble_uuid128_t ble_ancs_base_uuid128 = +{ + { + // 7905F431-B5CE-4E99-A40F-4B1E122D00D0 + 0xd0, 0x00, 0x2d, 0x12, 0x1e, 0x4b, 0x0f, 0xa4, + 0x99, 0x4e, 0xce, 0xb5, 0x31, 0xf4, 0x05, 0x79 + } +}; + + +/**@brief 128-bit control point UUID. + */ +const ble_uuid128_t ble_ancs_cp_base_uuid128 = +{ + { + // 69d1d8f3-45e1-49a8-9821-9BBDFDAAD9D9 + 0xd9, 0xd9, 0xaa, 0xfd, 0xbd, 0x9b, 0x21, 0x98, + 0xa8, 0x49, 0xe1, 0x45, 0xf3, 0xd8, 0xd1, 0x69 + } +}; + +/**@brief 128-bit notification source UUID. +*/ +const ble_uuid128_t ble_ancs_ns_base_uuid128 = +{ + { + // 9FBF120D-6301-42D9-8C58-25E699A21DBD + 0xbd, 0x1d, 0xa2, 0x99, 0xe6, 0x25, 0x58, 0x8c, + 0xd9, 0x42, 0x01, 0x63, 0x0d, 0x12, 0xbf, 0x9f + + } +}; + +/**@brief 128-bit data source UUID. +*/ +const ble_uuid128_t ble_ancs_ds_base_uuid128 = +{ + { + // 22EAC6E9-24D6-4BB5-BE44-B36ACE7C7BFB + 0xfb, 0x7b, 0x7c, 0xce, 0x6a, 0xb3, 0x44, 0xbe, + 0xb5, 0x4b, 0xd6, 0x24, 0xe9, 0xc6, 0xea, 0x22 + } +}; + + +/**@brief Function for handling Disconnected event received from the SoftDevice. + * + * @details This function check if the disconnect event is happening on the link + * associated with the current instance of the module, if so it will set its + * conn_handle to invalid. + * + * @param[in] p_ancs Pointer to the ANCS client structure. + * @param[in] p_ble_evt Pointer to the BLE event received. + */ +static void on_disconnected(ble_ancs_c_t * p_ancs, const ble_evt_t * p_ble_evt) +{ + if (p_ancs->conn_handle == p_ble_evt->evt.gap_evt.conn_handle) + { + p_ancs->conn_handle = BLE_CONN_HANDLE_INVALID; + } +} + + +void ble_ancs_c_on_db_disc_evt(ble_ancs_c_t * p_ancs, ble_db_discovery_evt_t * p_evt) +{ + ANCS_LOG("[ANCS]: Database Discovery handler called with event 0x%x\r\n", p_evt->evt_type); + + ble_ancs_c_evt_t evt; + ble_gatt_db_char_t * p_chars; + + p_chars = p_evt->params.discovered_db.charateristics; + + // Check if the ANCS Service was discovered. + if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE && + p_evt->params.discovered_db.srv_uuid.uuid == ANCS_UUID_SERVICE && + p_evt->params.discovered_db.srv_uuid.type == p_ancs->service.service.uuid.type) + { + // Find the handles of the ANCS characteristic. + uint32_t i; + + for (i = 0; i < p_evt->params.discovered_db.char_count; i++) + { + switch (p_chars[i].characteristic.uuid.uuid) + { + case ANCS_UUID_CHAR_CONTROL_POINT: + ANCS_LOG("[ANCS]: Control Point Characteristic found.\n\r"); + memcpy(&evt.service.control_point_char, + &p_chars[i].characteristic, + sizeof(ble_gattc_char_t)); + break; + + case ANCS_UUID_CHAR_DATA_SOURCE: + ANCS_LOG("[ANCS]: Data Source Characteristic found.\n\r"); + memcpy(&evt.service.data_source_char, + &p_chars[i].characteristic, + sizeof(ble_gattc_char_t)); + evt.service.data_source_cccd.handle = p_chars[i].cccd_handle; + break; + + case ANCS_UUID_CHAR_NOTIFICATION_SOURCE: + ANCS_LOG("[ANCS]: Notification point Characteristic found.\n\r"); + memcpy(&evt.service.notif_source_char, + &p_chars[i].characteristic, + sizeof(ble_gattc_char_t)); + evt.service.notif_source_cccd.handle = p_chars[i].cccd_handle; + break; + + default: + break; + } + } + evt.evt_type = BLE_ANCS_C_EVT_DISCOVERY_COMPLETE; + evt.conn_handle = p_evt->conn_handle; + p_ancs->evt_handler(&evt); + } + else + { + evt.evt_type = BLE_ANCS_C_EVT_DISCOVERY_FAILED; + p_ancs->evt_handler(&evt); + } +} + + +/**@brief Function for passing any pending request from the buffer to the stack. + */ +static void tx_buffer_process(void) +{ + if (m_tx_index != m_tx_insert_index) + { + uint32_t err_code; + + if (m_tx_buffer[m_tx_index].type == READ_REQ) + { + err_code = sd_ble_gattc_read(m_tx_buffer[m_tx_index].conn_handle, + m_tx_buffer[m_tx_index].req.read_handle, + 0); + } + else + { + err_code = sd_ble_gattc_write(m_tx_buffer[m_tx_index].conn_handle, + &m_tx_buffer[m_tx_index].req.write_req.gattc_params); + } + if (err_code == NRF_SUCCESS) + { + ++m_tx_index; + m_tx_index &= TX_BUFFER_MASK; + } + } +} + + +/**@brief Function for parsing command id and notification id. + * Used in the @ref parse_get_notif_attrs_response state machine. + * + * @details UID and command ID will be received only once at the beginning of the first + * GATTC notification of a new attribute request for a given iOS notification. + * + * @param[in] p_ancs Pointer to an ANCS instance to which the event belongs. + * @param[in] p_data_src Pointer to data that was received from the Notification Provider. + * @param[in] index Pointer to an index that helps us keep track of the current data to be parsed. + * + * @return The next parse state. + */ +static ble_ancs_c_parse_state_t command_id_and_notif_parse(ble_ancs_c_t * p_ancs, + const uint8_t * p_data_src, + uint32_t * index) +{ + ble_ancs_c_command_id_values_t command_id; + + command_id = (ble_ancs_c_command_id_values_t) p_data_src[(*index)++]; + + if(command_id != BLE_ANCS_COMMAND_ID_GET_NOTIF_ATTRIBUTES) + { + ANCS_LOG("[ANCS]: Invalid Command ID"); + return DONE; + } + + p_ancs->evt.attr.notif_uid = uint32_decode(&p_data_src[*index]); + *index += sizeof(uint32_t); + return ATTR_ID; + +} + +/**@brief Function for parsing the id of an iOS attribute. + * Used in the @ref parse_get_notif_attrs_response state machine. + * + * @details We only request attributes that are registered with @ref ble_ancs_c_attr_add + * once they have been reveiced we stop parsing. + * + * @param[in] p_ancs Pointer to an ANCS instance to which the event belongs. + * @param[in] p_data_src Pointer to data that was received from the Notification Provider. + * @param[in] index Pointer to an index that helps us keep track of the current data to be parsed. + * + * @return The next parse state. + */ +static ble_ancs_c_parse_state_t attr_id_parse(ble_ancs_c_t * p_ancs, + const uint8_t * p_data_src, + uint32_t * index) +{ + p_ancs->evt.attr.attr_id = (ble_ancs_c_notif_attr_id_values_t) p_data_src[(*index)++]; + p_ancs->evt.attr.p_attr_data = p_ancs->ancs_attr_list[p_ancs->evt.attr.attr_id].p_attr_data; + + if (p_ancs->expected_number_of_attrs == 0) + { + ANCS_LOG("[ANCS]: All requested attributes received\n\r"); + // (*index)++; + return DONE; + } + else if (p_ancs->ancs_attr_list[p_ancs->evt.attr.attr_id].get == true) + { + ANCS_LOG("[ANCS]: Attribute ID %i \n\r", p_ancs->evt.attr.attr_id); + return ATTR_LEN1; + } + else + { + p_ancs->expected_number_of_attrs--; + return ATTR_ID; + } +} + + +/**@brief Function for parsing the length of an iOS attribute. + * Used in the @ref parse_get_notif_attrs_response state machine. + * + * @details The Length is 2 bytes. Since there is a chance we reveice the bytes in two different + * GATTC notifications, we parse only the first byte here and then set the state machine + * ready to parse the next byte. + * + * @param[in] p_ancs Pointer to an ANCS instance to which the event belongs. + * @param[in] p_data_src Pointer to data that was received from the Notification Provider. + * @param[in] index Pointer to an index that helps us keep track of the current data to be parsed. + * + * @return The next parse state. + */ +static ble_ancs_c_parse_state_t attr_len1_parse(ble_ancs_c_t * p_ancs, const uint8_t * p_data_src, uint32_t * index) +{ + p_ancs->evt.attr.attr_len = p_data_src[(*index)++]; + return ATTR_LEN2; +} + +/**@brief Function for parsing the length of an iOS attribute. + * Used in the @ref parse_get_notif_attrs_response state machine. + * + * @details Second byte of the length field. If the length is zero, it means that the attribute is not + * present and the state machine is set to parse the next attribute. + * + * @param[in] p_ancs Pointer to an ANCS instance to which the event belongs. + * @param[in] p_data_src Pointer to data that was received from the Notification Provider. + * @param[in] index Pointer to an index that helps us keep track of the current data to be parsed. + * + * @return The next parse state. + */ +static ble_ancs_c_parse_state_t attr_len2_parse(ble_ancs_c_t * p_ancs, const uint8_t * p_data_src, uint32_t * index) +{ + p_ancs->evt.attr.attr_len |= (p_data_src[(*index)++] << 8); + p_ancs->current_attr_index = 0; + + if (p_ancs->evt.attr.attr_len != 0) + { + return ATTR_DATA; + } + else + { + ANCS_LOG("[ANCS]: Attribute LEN %i \n\r", p_ancs->evt.attr.attr_len); + p_ancs->evt.evt_type = BLE_ANCS_C_EVT_NOTIF_ATTRIBUTE; + p_ancs->evt_handler(&p_ancs->evt); + return ATTR_ID; + } +} + +/**@brief Function for parsing the data of an iOS attribute. + * Used in the @ref parse_get_notif_attrs_response state machine. + * + * @details Read the data of the attribute into our local buffer. + * + * @param[in] p_ancs Pointer to an ANCS instance to which the event belongs. + * @param[in] p_data_src Pointer to data that was received from the Notification Provider. + * @param[in] index Pointer to an index that helps us keep track of the current data to be parsed. + * + * @return The next parse state. + */ +static ble_ancs_c_parse_state_t attr_data_parse(ble_ancs_c_t * p_ancs, const uint8_t * p_data_src, uint32_t * index) +{ + // We have not reached the end of the attribute, nor our max allocated internal size. + // Proceed with copying data over to our buffer. + if ( (p_ancs->current_attr_index < p_ancs->ancs_attr_list[p_ancs->evt.attr.attr_id].attr_len) + && (p_ancs->current_attr_index < p_ancs->evt.attr.attr_len)) + { + p_ancs->evt.attr.p_attr_data[p_ancs->current_attr_index++] = p_data_src[(*index)++]; + } + + // We have reached the end of the attribute, or our max allocated internal size. + // Stop copying data over to our buffer. NUL-terminate at the current index. + if ( (p_ancs->current_attr_index == p_ancs->evt.attr.attr_len) || + (p_ancs->current_attr_index == p_ancs->ancs_attr_list[p_ancs->evt.attr.attr_id].attr_len)) + { + p_ancs->evt.attr.p_attr_data[p_ancs->current_attr_index] = '\0'; + + // If our max buffer size is smaller than the remaining attribute data, we must + // increase index to skip the data until the start of the next attribute. + if (p_ancs->current_attr_index < p_ancs->evt.attr.attr_len) + { + (*index) += (p_ancs->evt.attr.attr_len - p_ancs->current_attr_index); + } + ANCS_LOG("[ANCS]: Attribute finished!\n\r"); + p_ancs->evt.evt_type = BLE_ANCS_C_EVT_NOTIF_ATTRIBUTE; + p_ancs->evt_handler(&p_ancs->evt); + return ATTR_ID; + } + return ATTR_DATA; +} + +/**@brief Function for parsing received notification attribute response data. + * + * @details The data that comes from the Notification Provider can be much longer than what + * would fit in a single GATTC notification. Therefore, this function relies on a + * state-oriented switch case. + * UID and command ID will be received only once at the beginning of the first + * GATTC notification of a new attribute request for a given iOS notification. + * After this, we can loop several ATTR_ID > LENGTH > DATA > ATTR_ID > LENGTH > DATA until + * we have received all attributes we wanted as a Notification Consumer. + * The Notification Provider can also simply stop sending attributes. + * + * |1 Byte | 4 Bytes |1 Byte |2 Bytes | X Bytes |1 Bytes| 2 Bytes| X Bytes + * +--------+-------------+-------+--------+- - - - - - - - - - +-------+--------+- - - - - - - + * | CMD_ID | NOTIF_UID |ATTR_ID| LENGTH | DATA |ATTR_ID| LENGTH | DATA + * +--------+-------------+-------+--------+- - - - - - - - - - +-------+--------+- - - - - - - + * + * @param[in] p_ancs Pointer to an ANCS instance to which the event belongs. + * @param[in] p_data_src Pointer to data that was received from the Notification Provider. + * @param[in] hvx_len Length of the data that was received from the Notification Provider. + */ +static void parse_get_notif_attrs_response(ble_ancs_c_t * p_ancs, + const uint8_t * p_data_src, + const uint16_t hvx_data_len) +{ + uint32_t index; + + for (index = 0; index < hvx_data_len;) + { + switch (p_ancs->parse_state) + { + case COMMAND_ID_AND_NOTIF_UID: + p_ancs->parse_state = command_id_and_notif_parse(p_ancs, p_data_src, &index); + break; + + case ATTR_ID: + p_ancs->parse_state = attr_id_parse(p_ancs, p_data_src, &index); + break; + + case ATTR_LEN1: + p_ancs->parse_state = attr_len1_parse(p_ancs, p_data_src, &index); + break; + + case ATTR_LEN2: + p_ancs->parse_state = attr_len2_parse(p_ancs, p_data_src, &index); + break; + + case ATTR_DATA: + p_ancs->parse_state = attr_data_parse(p_ancs, p_data_src, &index); + break; + + case DONE: + ANCS_LOG("[ANCS]: State: Done \n\r"); + index = hvx_data_len; + break; + + default: + // Default case will never trigger intentionally. Go to the DONE state to minimize the consequences. + p_ancs->parse_state = DONE; + break; + } + } +} + + +/**@brief Function for checking if data in an iOS notification is out of bounds. + * + * @param[in] notif An iOS notification. + * + * @retval NRF_SUCCESS If the notification is within bounds. + * @retval NRF_ERROR_INVALID_PARAM If the notification is out of bounds. + */ +static uint32_t ble_ancs_verify_notification_format(const ble_ancs_c_evt_notif_t * notif) +{ + if( (notif->evt_id >= BLE_ANCS_NB_OF_EVT_ID) + || (notif->category_id >= BLE_ANCS_NB_OF_CATEGORY_ID)) + { + return NRF_ERROR_INVALID_PARAM; + } + return NRF_SUCCESS; +} + +/**@brief Function for receiving and validating notifications received from the Notification Provider. + * + * @param[in] p_ancs Pointer to an ANCS instance to which the event belongs. + * @param[in] p_data_src Pointer to data that was received from the Notification Provider. + * @param[in] hvx_len Length of the data that was received by the Notification Provider. + */ +static void parse_notif(const ble_ancs_c_t * p_ancs, + const uint8_t * p_data_src, + const uint16_t hvx_data_len) +{ + ble_ancs_c_evt_t ancs_evt; + uint32_t err_code; + if (hvx_data_len != BLE_ANCS_NOTIFICATION_DATA_LENGTH) + { + ancs_evt.evt_type = BLE_ANCS_C_EVT_INVALID_NOTIF; + p_ancs->evt_handler(&ancs_evt); + } + + /*lint --e{415} --e{416} -save suppress Warning 415: possible access out of bond */ + ancs_evt.notif.evt_id = + (ble_ancs_c_evt_id_values_t) p_data_src[BLE_ANCS_NOTIF_EVT_ID_INDEX]; + + ancs_evt.notif.evt_flags.silent = + (p_data_src[BLE_ANCS_NOTIF_FLAGS_INDEX] >> BLE_ANCS_EVENT_FLAG_SILENT) & 0x01; + + ancs_evt.notif.evt_flags.important = + (p_data_src[BLE_ANCS_NOTIF_FLAGS_INDEX] >> BLE_ANCS_EVENT_FLAG_IMPORTANT) & 0x01; + + ancs_evt.notif.evt_flags.pre_existing = + (p_data_src[BLE_ANCS_NOTIF_FLAGS_INDEX] >> BLE_ANCS_EVENT_FLAG_PREEXISTING) & 0x01; + + ancs_evt.notif.evt_flags.positive_action = + (p_data_src[BLE_ANCS_NOTIF_FLAGS_INDEX] >> BLE_ANCS_EVENT_FLAG_POSITIVE_ACTION) & 0x01; + + ancs_evt.notif.evt_flags.negative_action = + (p_data_src[BLE_ANCS_NOTIF_FLAGS_INDEX] >> BLE_ANCS_EVENT_FLAG_NEGATIVE_ACTION) & 0x01; + + ancs_evt.notif.category_id = + (ble_ancs_c_category_id_values_t) p_data_src[BLE_ANCS_NOTIF_CATEGORY_ID_INDEX]; + + ancs_evt.notif.category_count = p_data_src[BLE_ANCS_NOTIF_CATEGORY_CNT_INDEX]; + ancs_evt.notif.notif_uid = uint32_decode(&p_data_src[BLE_ANCS_NOTIF_NOTIF_UID]); + /*lint -restore*/ + + err_code = ble_ancs_verify_notification_format(&ancs_evt.notif); + if (err_code == NRF_SUCCESS) + { + ancs_evt.evt_type = BLE_ANCS_C_EVT_NOTIF; + } + else + { + ancs_evt.evt_type = BLE_ANCS_C_EVT_INVALID_NOTIF; + } + + p_ancs->evt_handler(&ancs_evt); +} + + +/**@brief Function for receiving and validating notifications received from the Notification Provider. + * + * @param[in] p_ancs Pointer to an ANCS instance to which the event belongs. + * @param[in] p_ble_evt Bluetooth stack event. + */ +static void on_evt_gattc_notif(ble_ancs_c_t * p_ancs, const ble_evt_t * p_ble_evt) +{ + const ble_gattc_evt_hvx_t * p_notif = &p_ble_evt->evt.gattc_evt.params.hvx; + + if(p_ble_evt->evt.gattc_evt.conn_handle != p_ancs->conn_handle) + { + return; + } + + if (p_notif->handle == p_ancs->service.notif_source_char.handle_value) + { + parse_notif(p_ancs, p_notif->data, p_notif->len); + } + else if (p_notif->handle == p_ancs->service.data_source_char.handle_value) + { + parse_get_notif_attrs_response(p_ancs, p_notif->data, p_notif->len); + } + else + { + // No applicable action. + } +} + +/**@brief Function for handling write response events. + * + * @param[in] p_ancs_c Pointer to the Battery Service Client Structure. + * @param[in] p_ble_evt Pointer to the SoftDevice event. + */ +static void on_write_rsp(ble_ancs_c_t * p_ancs, const ble_evt_t * p_ble_evt) +{ + // Check if the event if on the link for this instance + if (p_ancs->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) + { + return; + } + // Check if there is any message to be sent across to the peer and send it. + tx_buffer_process(); +} + + +void ble_ancs_c_on_ble_evt(ble_ancs_c_t * p_ancs, const ble_evt_t * p_ble_evt) +{ + uint16_t evt = p_ble_evt->header.evt_id; + + switch (evt) + { + case BLE_GATTC_EVT_WRITE_RSP: + on_write_rsp(p_ancs, p_ble_evt); + break; + + case BLE_GATTC_EVT_HVX: + on_evt_gattc_notif(p_ancs, p_ble_evt); + break; + case BLE_GAP_EVT_DISCONNECTED: + on_disconnected(p_ancs, p_ble_evt); + break; + default: + break; + } +} + + +uint32_t ble_ancs_c_init(ble_ancs_c_t * p_ancs, const ble_ancs_c_init_t * p_ancs_init) +{ + uint32_t err_code; + + //Verify that the parameters needed for to initialize this instance of ANCS are not NULL. + VERIFY_PARAM_NOT_NULL(p_ancs); + VERIFY_PARAM_NOT_NULL(p_ancs_init); + VERIFY_PARAM_NOT_NULL(p_ancs_init->evt_handler); + + p_ancs->parse_state = COMMAND_ID_AND_NOTIF_UID; + p_ancs->p_data_dest = NULL; + p_ancs->current_attr_index = 0; + + p_ancs->evt_handler = p_ancs_init->evt_handler; + p_ancs->error_handler = p_ancs_init->error_handler; + p_ancs->conn_handle = BLE_CONN_HANDLE_INVALID; + + p_ancs->service.data_source_cccd.uuid.uuid = BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG; + p_ancs->service.notif_source_cccd.uuid.uuid = BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG; + + // Make sure instance of service is clear. GATT handles inside the service and characteristics are set to @ref BLE_GATT_HANDLE_INVALID. + memset(&p_ancs->service, 0, sizeof(ble_ancs_c_service_t)); + memset(m_tx_buffer, 0, TX_BUFFER_SIZE); + + // Assign UUID types. + err_code = sd_ble_uuid_vs_add(&ble_ancs_base_uuid128, &p_ancs->service.service.uuid.type); + VERIFY_SUCCESS(err_code); + + err_code = sd_ble_uuid_vs_add(&ble_ancs_cp_base_uuid128, &p_ancs->service.control_point_char.uuid.type); + VERIFY_SUCCESS(err_code); + + err_code = sd_ble_uuid_vs_add(&ble_ancs_ns_base_uuid128, &p_ancs->service.notif_source_char.uuid.type); + VERIFY_SUCCESS(err_code); + + err_code = sd_ble_uuid_vs_add(&ble_ancs_ds_base_uuid128, &p_ancs->service.data_source_char.uuid.type); + VERIFY_SUCCESS(err_code); + + // Assign UUID to the service. + p_ancs->service.service.uuid.uuid = ANCS_UUID_SERVICE; + p_ancs->service.service.uuid.type = p_ancs->service.service.uuid.type; + + return ble_db_discovery_evt_register(&p_ancs->service.service.uuid); +} + + +/**@brief Function for creating a TX message for writing a CCCD. + * + * @param[in] conn_handle Connection handle on which to perform the configuration. + * @param[in] handle_cccd Handle of the CCCD. + * @param[in] enable Enable or disable GATTC notifications. + * + * @retval NRF_SUCCESS If the message was created successfully. + * @retval NRF_ERROR_INVALID_PARAM If one of the input parameters was invalid. + */ +static uint32_t cccd_configure(const uint16_t conn_handle, const uint16_t handle_cccd, bool enable) +{ + tx_message_t * p_msg; + uint16_t cccd_val = enable ? BLE_CCCD_NOTIFY_BIT_MASK : 0; + + p_msg = &m_tx_buffer[m_tx_insert_index++]; + m_tx_insert_index &= TX_BUFFER_MASK; + + p_msg->req.write_req.gattc_params.handle = handle_cccd; + p_msg->req.write_req.gattc_params.len = 2; + p_msg->req.write_req.gattc_params.p_value = p_msg->req.write_req.gattc_value; + p_msg->req.write_req.gattc_params.offset = 0; + p_msg->req.write_req.gattc_params.write_op = BLE_GATT_OP_WRITE_REQ; + p_msg->req.write_req.gattc_value[0] = LSB_16(cccd_val); + p_msg->req.write_req.gattc_value[1] = MSB_16(cccd_val); + p_msg->conn_handle = conn_handle; + p_msg->type = WRITE_REQ; + + tx_buffer_process(); + return NRF_SUCCESS; +} + + +uint32_t ble_ancs_c_notif_source_notif_enable(const ble_ancs_c_t * p_ancs) +{ + ANCS_LOG("[ANCS]: Enable Notification Source notifications. writing to handle: %i \n\r", + p_ancs->service.notif_source_cccd.handle); + return cccd_configure(p_ancs->conn_handle, p_ancs->service.notif_source_cccd.handle, true); +} + + +uint32_t ble_ancs_c_notif_source_notif_disable(const ble_ancs_c_t * p_ancs) +{ + return cccd_configure(p_ancs->conn_handle, p_ancs->service.notif_source_cccd.handle, false); +} + + +uint32_t ble_ancs_c_data_source_notif_enable(const ble_ancs_c_t * p_ancs) +{ + ANCS_LOG("[ANCS]: Enable Data Source notifications. Writing to handle: %i \n\r", + p_ancs->service.data_source_cccd.handle); + return cccd_configure(p_ancs->conn_handle, p_ancs->service.data_source_cccd.handle, true); +} + + +uint32_t ble_ancs_c_data_source_notif_disable(const ble_ancs_c_t * p_ancs) +{ + return cccd_configure(p_ancs->conn_handle, p_ancs->service.data_source_cccd.handle, false); +} + + +uint32_t ble_ancs_get_notif_attrs(ble_ancs_c_t * p_ancs, + const uint32_t p_uid) +{ + tx_message_t * p_msg; + + uint32_t index = 0; + p_ancs->number_of_requested_attr = 0; + p_msg = &m_tx_buffer[m_tx_insert_index++]; + m_tx_insert_index &= TX_BUFFER_MASK; + + p_msg->req.write_req.gattc_params.handle = p_ancs->service.control_point_char.handle_value; + p_msg->req.write_req.gattc_params.p_value = p_msg->req.write_req.gattc_value; + p_msg->req.write_req.gattc_params.offset = 0; + p_msg->req.write_req.gattc_params.write_op = BLE_GATT_OP_WRITE_REQ; + + //Encode Command ID. + p_msg->req.write_req.gattc_value[index++] = BLE_ANCS_COMMAND_ID_GET_NOTIF_ATTRIBUTES; + + //Encode Notification UID. + index += uint32_encode(p_uid, &p_msg->req.write_req.gattc_value[index]); + + //Encode Attribute ID. + for (uint32_t attr = 0; attr < BLE_ANCS_NB_OF_ATTRS; attr++) + { + if (p_ancs->ancs_attr_list[attr].get == true) + { + p_msg->req.write_req.gattc_value[index++] = attr; + if ((attr == BLE_ANCS_NOTIF_ATTR_ID_TITLE) || + (attr == BLE_ANCS_NOTIF_ATTR_ID_SUBTITLE) || + (attr == BLE_ANCS_NOTIF_ATTR_ID_MESSAGE)) + { + //Encode Length field, only applicable for Title, Subtitle and Message + index += uint16_encode(p_ancs->ancs_attr_list[attr].attr_len, + &p_msg->req.write_req.gattc_value[index]); + } + p_ancs->number_of_requested_attr++; + } + } + p_msg->req.write_req.gattc_params.len = index; + p_msg->conn_handle = p_ancs->conn_handle; + p_msg->type = WRITE_REQ; + p_ancs->expected_number_of_attrs = p_ancs->number_of_requested_attr; + + tx_buffer_process(); + + return NRF_SUCCESS; +} + + +uint32_t ble_ancs_c_attr_add(ble_ancs_c_t * p_ancs, + const ble_ancs_c_notif_attr_id_values_t id, + uint8_t * p_data, + const uint16_t len) +{ + VERIFY_PARAM_NOT_NULL(p_data); + + if((len == 0) || (len > BLE_ANCS_ATTR_DATA_MAX)) + { + return NRF_ERROR_INVALID_LENGTH; + } + + p_ancs->ancs_attr_list[id].get = true; + p_ancs->ancs_attr_list[id].attr_len = len; + p_ancs->ancs_attr_list[id].p_attr_data = p_data; + + return NRF_SUCCESS; +} + + +uint32_t ble_ancs_c_request_attrs(ble_ancs_c_t * p_ancs, + const ble_ancs_c_evt_notif_t * p_notif) +{ + uint32_t err_code; + err_code = ble_ancs_verify_notification_format(p_notif); + VERIFY_SUCCESS(err_code); + + err_code = ble_ancs_get_notif_attrs(p_ancs, p_notif->notif_uid); + p_ancs->parse_state = COMMAND_ID_AND_NOTIF_UID; + VERIFY_SUCCESS(err_code); + + return NRF_SUCCESS; +} + +uint32_t ble_ancs_c_handles_assign(ble_ancs_c_t * p_ancs, + const uint16_t conn_handle, + const ble_ancs_c_service_t * p_peer_handles) +{ + VERIFY_PARAM_NOT_NULL(p_ancs); + + p_ancs->conn_handle = conn_handle; + + if(p_peer_handles != NULL) + { + p_ancs->service.control_point_char.handle_value = p_peer_handles->control_point_char.handle_value; + p_ancs->service.data_source_cccd.handle = p_peer_handles->data_source_cccd.handle; + p_ancs->service.data_source_char.handle_value = p_peer_handles->data_source_char.handle_value; + p_ancs->service.notif_source_cccd.handle = p_peer_handles->notif_source_cccd.handle; + p_ancs->service.notif_source_char.handle_value = p_peer_handles->notif_source_char.handle_value; + } + + return NRF_SUCCESS; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ancs_c/ble_ancs_c.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ancs_c/ble_ancs_c.h new file mode 100644 index 0000000000..8028455987 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ancs_c/ble_ancs_c.h @@ -0,0 +1,419 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + */ + +/** @file + * + * @defgroup ble_sdk_srv_ancs_c Apple Notification Service client + * @{ + * @ingroup ble_sdk_srv + * + * @brief Apple Notification Center Service Client Module. + * + * @details Disclaimer: This client implementation of the Apple Notification Center Service can + * be changed at any time by Nordic Semiconductor ASA. Server implementations such as the + * ones found in iOS can be changed at any time by Apple and may cause this client + * implementation to stop working. + * + * This module implements the Apple Notification Center Service (ANCS) client. + * This client can be used as a Notification Consumer (NC) that receives data + * notifications from a Notification Provider (NP). The NP is typically an iOS + * device acting as a server. For terminology and up-to-date specs, see + * http://developer.apple.com. + * + * The term "notification" is used in two different meanings: + * - An iOS notification is the data received from the Notification Provider. + * - A GATTC notification is a way to transfer data with Bluetooth Smart. + * In this module, we receive iOS notifications using GATTC notifications. + * We use the full term (iOS notification or GATTC notification) where required to avoid confusion. + * + * Upon initializing the module, you must add the different iOS notification attributes you + * would like to receive for iOS notifications. @ref ble_ancs_c_attr_add. + * + * Once a connection is established with a central device, the module does a service discovery to + * discover the ANVS server handles. If this succeeds (@ref BLE_ANCS_C_EVT_DISCOVERY_COMPLETE) + * The handles for the CTS server are part of the @ref ble_ancs_c_evt_t structure and must be + * assigned to a ANCS_C instance using the @ref ble_ancs_c_handles_assign function. For more + * information about service discovery, see the ble_discovery module documentation + * @ref lib_ble_db_discovery. + * + * The application can now subscribe to iOS notifications using + * @ref ble_ancs_c_notif_source_notif_enable. They arrive in the @ref BLE_ANCS_C_EVT_NOTIF event. + * @ref ble_ancs_c_request_attrs can be used to request attributes for the notifications. They + * arrive in the @ref BLE_ANCS_C_EVT_NOTIF_ATTRIBUTE event. + * + * @msc + * hscale = "1.5"; + * Application, ANCS_C; + * |||; + * Application=>ANCS_C [label = "ble_ancs_c_attr_add(attribute)"]; + * Application=>ANCS_C [label = "ble_ancs_c_init(ancs_instance, event_handler)"]; + * ...; + * Application<<=ANCS_C [label = "BLE_ANCS_C_EVT_DISCOVERY_COMPLETE"]; + * Application=>ANCS_C [label = "ble_ancs_c_handles_assign(ancs_instance, conn_handle, service_handles)"]; + * Application=>ANCS_C [label = "ble_ancs_c_notif_source_notif_enable(ancs_instance)"]; + * Application=>ANCS_C [label = "ble_ancs_c_data_source_notif_enable(ancs_instance)"]; + * |||; + * ...; + * |||; + * Application<<=ANCS_C [label = "BLE_ANCS_C_EVT_NOTIF"]; + * |||; + * ...; + * |||; + * Application=>ANCS_C [label = "ble_ancs_c_request_attrs(attr_id, buffer)"]; + * Application<<=ANCS_C [label = "BLE_ANCS_C_EVT_NOTIF_ATTRIBUTE"]; + * |||; + * @endmsc + * + * @note The application must propagate BLE stack events to this module + * by calling ble_ancs_c_on_ble_evt() from the @ref softdevice_handler callback. + */ +#ifndef BLE_ANCS_C_H__ +#define BLE_ANCS_C_H__ + + +#include "ble_types.h" +#include "ble_srv_common.h" +#include "device_manager.h" +#include "ble_db_discovery.h" + + +#define BLE_ANCS_ATTR_DATA_MAX 32 /**< Maximum data length of an iOS notification attribute. */ +#define BLE_ANCS_NB_OF_CATEGORY_ID 12 /**< Number of iOS notification categories: Other, Incoming Call, Missed Call, Voice Mail, Social, Schedule, Email, News, Health And Fitness, Business And Finance, Location, Entertainment. */ +#define BLE_ANCS_NB_OF_ATTRS 8 /**< Number of iOS notification attributes: AppIdentifier, Title, Subtitle, Message, MessageSize, Date, PositiveActionLabel, NegativeActionLabel. */ +#define BLE_ANCS_NB_OF_EVT_ID 3 /**< Number of iOS notification events: Added, Modified, Removed.*/ + +/** @brief Length of the iOS notification data. + * + * @details 8 bytes: + * Event ID |Event flags |Category ID |Category count|Notification UID + * ---------|------------|------------|--------------|---------------- + * 1 byte | 1 byte | 1 byte | 1 byte | 4 bytes + */ +#define BLE_ANCS_NOTIFICATION_DATA_LENGTH 8 + +#define ANCS_UUID_SERVICE 0xF431 /**< 16-bit service UUID for the Apple Notification Center Service. */ +#define ANCS_UUID_CHAR_CONTROL_POINT 0xD8F3 /**< 16-bit control point UUID. */ +#define ANCS_UUID_CHAR_DATA_SOURCE 0xC6E9 /**< 16-bit data source UUID. */ +#define ANCS_UUID_CHAR_NOTIFICATION_SOURCE 0x120D /**< 16-bit notification source UUID. */ + +#define BLE_ANCS_EVENT_FLAG_SILENT 0 /**< 0b.......1 Silent: First (LSB) bit is set. All flags can be active at the same time.*/ +#define BLE_ANCS_EVENT_FLAG_IMPORTANT 1 /**< 0b......1. Important: Second (LSB) bit is set. All flags can be active at the same time.*/ +#define BLE_ANCS_EVENT_FLAG_PREEXISTING 2 /**< 0b.....1.. Pre-existing: Third (LSB) bit is set. All flags can be active at the same time.*/ +#define BLE_ANCS_EVENT_FLAG_POSITIVE_ACTION 3 /**< 0b....1... Positive action: Fourth (LSB) bit is set. All flags can be active at the same time.*/ +#define BLE_ANCS_EVENT_FLAG_NEGATIVE_ACTION 4 /**< 0b...1.... Negative action: Fifth (LSB) bit is set. All flags can be active at the same time. */ + + +/**@brief Event types that are passed from client to application on an event. */ +typedef enum +{ + BLE_ANCS_C_EVT_DISCOVERY_COMPLETE, /**< A successful connection has been established and the service was found on the connected peer. */ + BLE_ANCS_C_EVT_DISCOVERY_FAILED, /**< It was not possible to discover the service or characteristics of the connected peer. */ + BLE_ANCS_C_EVT_NOTIF, /**< An iOS notification was received on the notification source control point. */ + BLE_ANCS_C_EVT_INVALID_NOTIF, /**< An iOS notification was received on the notification source control point, but the format is invalid. */ + BLE_ANCS_C_EVT_NOTIF_ATTRIBUTE /**< A received iOS notification attribute has been parsed. */ +} ble_ancs_c_evt_type_t; + +/**@brief Category IDs for iOS notifications. */ +typedef enum +{ + BLE_ANCS_CATEGORY_ID_OTHER, /**< The iOS notification belongs to the "other" category. */ + BLE_ANCS_CATEGORY_ID_INCOMING_CALL, /**< The iOS notification belongs to the "Incoming Call" category. */ + BLE_ANCS_CATEGORY_ID_MISSED_CALL, /**< The iOS notification belongs to the "Missed Call" category. */ + BLE_ANCS_CATEGORY_ID_VOICE_MAIL, /**< The iOS notification belongs to the "Voice Mail" category. */ + BLE_ANCS_CATEGORY_ID_SOCIAL, /**< The iOS notification belongs to the "Social" category. */ + BLE_ANCS_CATEGORY_ID_SCHEDULE, /**< The iOS notification belongs to the "Schedule" category. */ + BLE_ANCS_CATEGORY_ID_EMAIL, /**< The iOS notification belongs to the "E-mail" category. */ + BLE_ANCS_CATEGORY_ID_NEWS, /**< The iOS notification belongs to the "News" category. */ + BLE_ANCS_CATEGORY_ID_HEALTH_AND_FITNESS, /**< The iOS notification belongs to the "Health and Fitness" category. */ + BLE_ANCS_CATEGORY_ID_BUSINESS_AND_FINANCE, /**< The iOS notification belongs to the "Buisness and Finance" category. */ + BLE_ANCS_CATEGORY_ID_LOCATION, /**< The iOS notification belongs to the "Location" category. */ + BLE_ANCS_CATEGORY_ID_ENTERTAINMENT /**< The iOS notification belongs to the "Entertainment" category. */ +} ble_ancs_c_category_id_values_t; + +/**@brief Event IDs for iOS notifications. */ +typedef enum +{ + BLE_ANCS_EVENT_ID_NOTIFICATION_ADDED, /**< The iOS notification was added. */ + BLE_ANCS_EVENT_ID_NOTIFICATION_MODIFIED, /**< The iOS notification was modified. */ + BLE_ANCS_EVENT_ID_NOTIFICATION_REMOVED /**< The iOS notification was removed. */ +} ble_ancs_c_evt_id_values_t; + +/**@brief Control point command IDs that the Notification Consumer can send to the Notification Provider. */ +typedef enum +{ + BLE_ANCS_COMMAND_ID_GET_NOTIF_ATTRIBUTES, /**< Requests attributes to be sent from the NP to the NC for a given notification. */ + BLE_ANCS_COMMAND_ID_GET_APP_ATTRIBUTES, /**< Requests attributes to be sent from the NP to the NC for a given iOS App. */ + BLE_ANCS_COMMAND_ID_GET_PERFORM_NOTIF_ACTION, /**< Requests an action to be performed on a given notification, for example dismiss an alarm. */ +} ble_ancs_c_command_id_values_t; + +/**@brief IDs for iOS notification attributes. */ +typedef enum +{ + BLE_ANCS_NOTIF_ATTR_ID_APP_IDENTIFIER, /**< Identifies that the attribute data is of an "App Identifier" type. */ + BLE_ANCS_NOTIF_ATTR_ID_TITLE, /**< Identifies that the attribute data is a "Title". */ + BLE_ANCS_NOTIF_ATTR_ID_SUBTITLE, /**< Identifies that the attribute data is a "Subtitle". */ + BLE_ANCS_NOTIF_ATTR_ID_MESSAGE, /**< Identifies that the attribute data is a "Message". */ + BLE_ANCS_NOTIF_ATTR_ID_MESSAGE_SIZE, /**< Identifies that the attribute data is a "Message Size". */ + BLE_ANCS_NOTIF_ATTR_ID_DATE, /**< Identifies that the attribute data is a "Date". */ + BLE_ANCS_NOTIF_ATTR_ID_POSITIVE_ACTION_LABEL, /**< The notification has a "Positive action" that can be executed associated with it. */ + BLE_ANCS_NOTIF_ATTR_ID_NEGATIVE_ACTION_LABEL, /**< The notification has a "Negative action" that can be executed associated with it. */ +} ble_ancs_c_notif_attr_id_values_t; + + +/**@brief Flags for iOS notifications. */ +typedef struct +{ + uint8_t silent : 1; /**< If this flag is set, the notification has a low priority. */ + uint8_t important : 1; /**< If this flag is set, the notification has a high priority. */ + uint8_t pre_existing : 1; /**< If this flag is set, the notification is pre-existing. */ + uint8_t positive_action : 1; /**< If this flag is set, the notification has a positive action that can be taken. */ + uint8_t negative_action : 1; /**< If this flag is set, the notification has a negative action that can be taken. */ +} ble_ancs_c_notif_flags_t; + + +/**@brief Parsing states for received iOS notification attributes. + */ +typedef enum +{ + COMMAND_ID_AND_NOTIF_UID, /**< Parsing the command ID and the notification UID. */ + ATTR_ID, /**< Parsing attribute ID. */ + ATTR_LEN1, /**< Parsing the LSB of the attribute length. */ + ATTR_LEN2, /**< Parsing the MSB of the attribute length. */ + ATTR_DATA, /**< Parsing the attribute data. */ + DONE /**< Parsing is done. */ +} ble_ancs_c_parse_state_t; + + +/**@brief iOS notification structure. */ +typedef struct +{ + ble_ancs_c_evt_id_values_t evt_id; /**< Whether the notification was added, removed, or modified. */ + ble_ancs_c_notif_flags_t evt_flags; /**< Bitmask to signal if a special condition applies to the notification, for example, "Silent" or "Important". */ + ble_ancs_c_category_id_values_t category_id; /**< Classification of the notification type, for example, email or location. */ + uint8_t category_count; /**< Current number of active notifications for this category ID. */ + uint32_t notif_uid; /**< Notification UID. */ +} ble_ancs_c_evt_notif_t; + + +/**@brief iOS notification attribute structure for incomming attributes. */ +typedef struct +{ + uint32_t notif_uid; /**< UID of the notification that the attribute belongs to.*/ + uint16_t attr_len; /**< Length of the received attribute data. */ + ble_ancs_c_notif_attr_id_values_t attr_id; /**< Classification of the attribute type, for example, title or date. */ + uint8_t * p_attr_data; /**< Pointer to where the memory is allocated for storing incoming attributes. */ +} ble_ancs_c_evt_notif_attr_t; + + +/**@brief iOS notification attribute content wanted by our application. */ +typedef struct +{ + bool get; /**< Boolean to determine if this attribute will be requested from the Notification Provider. */ + ble_ancs_c_notif_attr_id_values_t attr_id; /**< Attribute ID: AppIdentifier(0), Title(1), Subtitle(2), Message(3), MessageSize(4), Date(5), PositiveActionLabel(6), NegativeActionLabel(7). */ + uint16_t attr_len; /**< Length of the attribute. If more data is received from the Notification Provider, all data beyond this length is discarded. */ + uint8_t * p_attr_data; /**< Pointer to where the memory is allocated for storing incoming attributes. */ +} ble_ancs_c_attr_list_t; + + +/**@brief Structure used for holding the Apple Notification Center Service found during the + discovery process. + */ +typedef struct +{ + ble_gattc_service_t service; /**< The GATT Service holding the discovered Apple Notification Center Service. (0xF431). */ + ble_gattc_char_t control_point_char; /**< ANCS Control Point Characteristic. Allows interaction with the peer (0xD8F3). */ + ble_gattc_char_t notif_source_char; /**< ANCS Notification Source Characteristic. Keeps track of arrival, modification, and removal of notifications (0x120D). */ + ble_gattc_desc_t notif_source_cccd; /**< ANCS Notification Source Characteristic Descriptor. Enables or Disables GATT notifications */ + ble_gattc_char_t data_source_char; /**< ANCS Data Source Characteristic, where attribute data for the notifications is received from peer (0xC6E9). */ + ble_gattc_desc_t data_source_cccd; /**< ANCS Data Source Characteristic Descriptor. Enables or Disables GATT notifications */ +} ble_ancs_c_service_t; + + +/**@brief ANCS client module event structure. + * + * @details The structure contains the event that should be handled by the main application. + */ +typedef struct +{ + ble_ancs_c_evt_type_t evt_type; /**< Type of event.*/ + uint16_t conn_handle; /**< Connection handle on which the ANCS service was discovered on the peer device. This will be filled if the evt_type is @ref BLE_ANCS_C_EVT_DISCOVERY_COMPLETE.*/ + ble_ancs_c_evt_notif_t notif; /**< iOS notification. Will be filled if evt_type is @ref BLE_ANCS_C_EVT_NOTIF. */ + ble_ancs_c_evt_notif_attr_t attr; /**< Currently received attribute for a given notification. Will be filled if the evt_type is @ref BLE_ANCS_C_EVT_NOTIF_ATTRIBUTE. */ + ble_ancs_c_service_t service; /**< Info on the discovered Alert Notification Service discovered. This will be filled if the evt_type is @ref BLE_ANCS_C_EVT_DISCOVERY_COMPLETE.*/ + uint32_t error_code; /**< Additional status or error code if the event was caused by a stack error or GATT status, for example, during service discovery. */ +} ble_ancs_c_evt_t; + + +/**@brief iOS notification event handler type. */ +typedef void (*ble_ancs_c_evt_handler_t) (ble_ancs_c_evt_t * p_evt); + + +/**@brief iOS notification structure, which contains various status information for the client. */ +typedef struct +{ + ble_ancs_c_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Apple Notification client application. */ + ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ + uint16_t conn_handle; /**< Handle of the current connection. Set with @ref ble_ancs_c_handles_assign when connected. */ + ble_ancs_c_service_t service; /**< Struct to store the different handles and UUIDs related to the service. */ + ble_ancs_c_attr_list_t ancs_attr_list[BLE_ANCS_NB_OF_ATTRS]; /**< For all attributes; contains whether they should be requested upon attribute request and the length and buffer of where to store attribute data. */ + uint32_t number_of_requested_attr; /**< The number of attributes that will be requested upon a iOS notification attribute request is made. */ + uint32_t expected_number_of_attrs; /**< The number of attributes expected upon receiving attributes. Keeps track of when to stop reading incoming attributes. */ + ble_ancs_c_parse_state_t parse_state; /**< ANCS notification attribute parsing state. */ + uint8_t * p_data_dest; /**< Attribute that the parsed data will be copied into. */ + uint16_t current_attr_index; /**< Variable to keep track of how much (for a given attribute) we are done parsing. */ + ble_ancs_c_evt_t evt; /**< The event is filled with several iteration of the parse_get_notif_attrs_response function when requesting iOS notification attributes. So we must allocate memory for it here.*/ +} ble_ancs_c_t; + + +/**@brief Apple Notification client init structure, which contains all options and data needed for + * initialization of the client.*/ +typedef struct +{ + ble_ancs_c_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Battery Service. */ + ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ +} ble_ancs_c_init_t; + + +/**@brief Apple Notification Center Service UUIDs. */ +extern const ble_uuid128_t ble_ancs_base_uuid128; /**< Service UUID. */ +extern const ble_uuid128_t ble_ancs_cp_base_uuid128; /**< Control point UUID. */ +extern const ble_uuid128_t ble_ancs_ns_base_uuid128; /**< Notification source UUID. */ +extern const ble_uuid128_t ble_ancs_ds_base_uuid128; /**< Data source UUID. */ + + +/**@brief Function for handling the application's BLE Stack events. + * + * @details Handles all events from the BLE stack that are of interest to the ANCS client. + * + * @param[in] p_ancs ANCS client structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +void ble_ancs_c_on_ble_evt(ble_ancs_c_t * p_ancs, const ble_evt_t * p_ble_evt); + + +/**@brief Function for handling events from the database discovery module. + * + * @details This function will handle an event from the database discovery module, and determine + * if it relates to the discovery of ANCS at the peer. If so, it will + * call the application's event handler indicating that ANCS has been + * discovered at the peer. It also populates the event with the service related + * information before providing it to the application. + * + * @param[in] p_ancs Pointer to the ANCS client structure. + * @param[in] p_evt Pointer to the event received from the database discovery module. + */ + void ble_ancs_c_on_db_disc_evt(ble_ancs_c_t * p_ancs, ble_db_discovery_evt_t * p_evt); + + +/**@brief Function for initializing the ANCS client. + * + * @param[out] p_ancs ANCS client structure. This structure must be + * supplied by the application. It is initialized by this function + * and will later be used to identify this particular client instance. + * @param[in] p_ancs_init Information needed to initialize the client. + * + * @retval NRF_SUCCESS If the client was initialized successfully. Otherwise, an error code is returned. + */ +uint32_t ble_ancs_c_init(ble_ancs_c_t * p_ancs, const ble_ancs_c_init_t * p_ancs_init); + + +/**@brief Function for writing to the CCCD to enable notifications from the Apple Notification Service. + * + * @param[in] p_ancs iOS notification structure. This structure must be supplied by + * the application. It identifies the particular client instance to use. + * + * @retval NRF_SUCCESS If writing to the CCCD was successful. Otherwise, an error code is returned. + */ +uint32_t ble_ancs_c_notif_source_notif_enable(const ble_ancs_c_t * p_ancs); + + +/**@brief Function for writing to the CCCD to enable data source notifications from the ANCS. + * + * @param[in] p_ancs iOS notification structure. This structure must be supplied by + * the application. It identifies the particular client instance to use. + * + * @retval NRF_SUCCESS If writing to the CCCD was successful. Otherwise, an error code is returned. + */ +uint32_t ble_ancs_c_data_source_notif_enable(const ble_ancs_c_t * p_ancs); + + +/**@brief Function for writing to the CCCD to disable notifications from the ANCS. + * + * @param[in] p_ancs iOS notification structure. This structure must be supplied by + * the application. It identifies the particular client instance to use. + * + * @retval NRF_SUCCESS If writing to the CCCD was successful. Otherwise, an error code is returned. + */ +uint32_t ble_ancs_c_notif_source_notif_disable(const ble_ancs_c_t * p_ancs); + + +/**@brief Function for writing to the CCCD to disable data source notifications from the ANCS. + * + * @param[in] p_ancs iOS notification structure. This structure must be supplied by + * the application. It identifies the particular client instance to use. + * + * @retval NRF_SUCCESS If writing to the CCCD was successful. Otherwise, an error code is returned. + */ +uint32_t ble_ancs_c_data_source_notif_disable(const ble_ancs_c_t * p_ancs); + + +/**@brief Function for registering attributes that will be requested if ble_ancs_c_request_attrs + * is called. + * + * @param[in] p_ancs ANCS client instance on which the attribute will be registered. + * @param[in] id ID of the attribute that will be added. + * @param[in] p_data Pointer to a buffer where the data of the attribute can be stored. + * @param[in] len Length of the buffer where the data of the attribute can be stored. + + * @retval NRF_SUCCESS If all operations were successful. Otherwise, an error code is returned. + */ +uint32_t ble_ancs_c_attr_add(ble_ancs_c_t * p_ancs, + const ble_ancs_c_notif_attr_id_values_t id, + uint8_t * p_data, + const uint16_t len); + + +/**@brief Function for requesting attributes for a notification. + * + * @param[in] p_ancs iOS notification structure. This structure must be supplied by + * the application. It identifies the particular client instance to use. + * @param[in] p_notif Pointer to the notification whose attributes will be requested from + * the Notification Provider. + * + * @retval NRF_SUCCESS If all operations were successful. Otherwise, an error code is returned. + */ +uint32_t ble_ancs_c_request_attrs(ble_ancs_c_t * p_ancs, + const ble_ancs_c_evt_notif_t * p_notif); + + +/**@brief Function for assigning handle to a this instance of ancs_c. + * + * @details Call this function when a link has been established with a peer to + * associate this link to this instance of the module. This makes it + * possible to handle several link and associate each link to a particular + * instance of this module. The connection handle and attribute handles will be + * provided from the discovery event @ref BLE_ANCS_C_EVT_DISCOVERY_COMPLETE. + * + * @param[in] p_ancs Pointer to the ANCS client structure instance to associate with these + * handles. + * @param[in] conn_handle Connection handle to associated with the given ANCS Instance. + * @param[in] p_service Attribute handles on the ANCS server that you want this ANCS client to + * interact with. + * + * @retval NRF_SUCCESS If the operation was successful. + * @retval NRF_ERROR_NULL If a p_ancs was a NULL pointer. + */ +uint32_t ble_ancs_c_handles_assign(ble_ancs_c_t * p_ancs, const uint16_t conn_handle, const ble_ancs_c_service_t * p_service); + +#endif // BLE_ANCS_C_H__ + +/** @} */ + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ans_c/ble_ans_c.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ans_c/ble_ans_c.c new file mode 100644 index 0000000000..a8ace029ab --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ans_c/ble_ans_c.c @@ -0,0 +1,544 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + */ + +/* Attention! +* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile +* qualification listings, this section of source code must not be modified. +*/ + +#include "ble_ans_c.h" +#include +#include +#include "ble_err.h" +#include "ble_srv_common.h" +#include "nordic_common.h" +#include "nrf_assert.h" +#include "ble_db_discovery.h" + + +#define NOTIFICATION_DATA_LENGTH 2 /**< The mandatory length of notification data. After the mandatory data, the optional message is located. */ +#define READ_DATA_LENGTH_MIN 1 /**< Minimum data length in a valid Alert Notification Read Response message. */ + +#define TX_BUFFER_MASK 0x07 /**< TX Buffer mask, must be a mask of contiguous zeroes, followed by contiguous sequence of ones: 000...111. */ +#define TX_BUFFER_SIZE (TX_BUFFER_MASK + 1) /**< Size of send buffer, which is 1 higher than the mask. */ +#define WRITE_MESSAGE_LENGTH 2 /**< Length of the write message for CCCD/control point. */ + + +typedef enum +{ + READ_REQ = 1, /**< Type identifying that this tx_message is a read request. */ + WRITE_REQ /**< Type identifying that this tx_message is a write request. */ +} ans_tx_request_t; + + +/**@brief Structure for writing a message to the central, i.e. Control Point or CCCD. + */ +typedef struct +{ + uint8_t gattc_value[WRITE_MESSAGE_LENGTH]; /**< The message to write. */ + ble_gattc_write_params_t gattc_params; /**< GATTC parameters for this message. */ +} write_params_t; + +/**@brief Structure for holding data to be transmitted to the connected central. + */ +typedef struct +{ + uint16_t conn_handle; /**< Connection handle to be used when transmitting this message. */ + ans_tx_request_t type; /**< Type of this message, i.e. read or write message. */ + union + { + uint16_t read_handle; /**< Read request message. */ + write_params_t write_req; /**< Write request message. */ + } req; +} tx_message_t; + +static tx_message_t m_tx_buffer[TX_BUFFER_SIZE]; /**< Transmit buffer for messages to be transmitted to the central. */ +static uint32_t m_tx_insert_index = 0; /**< Current index in the transmit buffer where next message should be inserted. */ +static uint32_t m_tx_index = 0; /**< Current index in the transmit buffer from where the next message to be transmitted resides. */ + + +/**@brief Function for passing any pending request from the buffer to the stack. + */ +static void tx_buffer_process(void) +{ + if (m_tx_index != m_tx_insert_index) + { + uint32_t err_code; + + if (m_tx_buffer[m_tx_index].type == READ_REQ) + { + err_code = sd_ble_gattc_read(m_tx_buffer[m_tx_index].conn_handle, + m_tx_buffer[m_tx_index].req.read_handle, + 0); + } + else + { + err_code = sd_ble_gattc_write(m_tx_buffer[m_tx_index].conn_handle, + &m_tx_buffer[m_tx_index].req.write_req.gattc_params); + } + if (err_code == NRF_SUCCESS) + { + ++m_tx_index; + m_tx_index &= TX_BUFFER_MASK; + } + } +} + + +/** @brief Function for copying a characteristic. + */ +static void char_set(ble_gattc_char_t * p_dest_char, const ble_gattc_char_t * p_source_char) +{ + memcpy(p_dest_char, p_source_char, sizeof(ble_gattc_char_t)); +} + +static void char_cccd_set(ble_gattc_desc_t * p_cccd, const uint16_t cccd_handle) +{ + p_cccd->handle = cccd_handle; +} + +/** @brief Function to check that all handles required by the client to use the server are present. + */ +static bool is_valid_ans_srv_discovered(const ble_ans_c_service_t * p_srv) +{ + if ((p_srv->alert_notif_ctrl_point.handle_value == BLE_GATT_HANDLE_INVALID) || + (p_srv->suported_new_alert_cat.handle_value == BLE_GATT_HANDLE_INVALID) || + (p_srv->suported_unread_alert_cat.handle_value == BLE_GATT_HANDLE_INVALID) || + (p_srv->new_alert.handle_value == BLE_GATT_HANDLE_INVALID) || + (p_srv->unread_alert_status.handle_value == BLE_GATT_HANDLE_INVALID) || + (p_srv->new_alert_cccd.handle == BLE_GATT_HANDLE_INVALID) || + (p_srv->unread_alert_cccd.handle == BLE_GATT_HANDLE_INVALID) + ) + { + // At least one required characteristic is missing on the server side. + return false; + } + return true; +} + + +void ble_ans_c_on_db_disc_evt(ble_ans_c_t * p_ans, const ble_db_discovery_evt_t * p_evt) +{ + ble_ans_c_evt_t evt; + + memset(&evt, 0, sizeof(ble_ans_c_evt_t)); + evt.conn_handle = p_evt->conn_handle; + evt.evt_type = BLE_ANS_C_EVT_DISCOVERY_FAILED; + + // Check if the Alert Notification Service was discovered. + if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE + && + p_evt->params.discovered_db.srv_uuid.uuid == BLE_UUID_ALERT_NOTIFICATION_SERVICE + && + p_evt->params.discovered_db.srv_uuid.type == BLE_UUID_TYPE_BLE) + { + // Find the characteristics inside the service. + for (uint8_t i = 0; i < p_evt->params.discovered_db.char_count; i++) + { + const ble_gatt_db_char_t * p_char = &(p_evt->params.discovered_db.charateristics[i]); + + switch (p_char->characteristic.uuid.uuid) + { + case BLE_UUID_ALERT_NOTIFICATION_CONTROL_POINT_CHAR: + NRF_LOG_PRINTF("[ANS] Found Ctrlpt \n\r"); + char_set(&evt.data.service.alert_notif_ctrl_point, &p_char->characteristic); + break; + + case BLE_UUID_UNREAD_ALERT_CHAR: + NRF_LOG_PRINTF("[ANS] Found Unread Alert \n\r"); + char_set(&evt.data.service.unread_alert_status, &p_char->characteristic); + char_cccd_set(&evt.data.service.unread_alert_cccd, + p_char->cccd_handle); + break; + + case BLE_UUID_NEW_ALERT_CHAR: + NRF_LOG_PRINTF("[ANS] Found New Alert \n\r"); + char_set(&evt.data.service.new_alert, &p_char->characteristic); + char_cccd_set(&evt.data.service.new_alert_cccd, + p_char->cccd_handle); + break; + + case BLE_UUID_SUPPORTED_UNREAD_ALERT_CATEGORY_CHAR: + NRF_LOG_PRINTF("[ANS] Found supported unread alert category \n\r"); + char_set(&evt.data.service.suported_unread_alert_cat, &p_char->characteristic); + break; + + case BLE_UUID_SUPPORTED_NEW_ALERT_CATEGORY_CHAR: + NRF_LOG_PRINTF("[ANS] Found supported new alert category \n\r"); + char_set(&evt.data.service.suported_new_alert_cat, &p_char->characteristic); + break; + + default: + // No implementation needed. + break; + } + } + if (is_valid_ans_srv_discovered(&evt.data.service)) + { + evt.evt_type = BLE_ANS_C_EVT_DISCOVERY_COMPLETE; + } + } + p_ans->evt_handler(&evt); +} + + +/**@brief Function for receiving and validating notifications received from the central. + */ +static void event_notify(ble_ans_c_t * p_ans, const ble_evt_t * p_ble_evt) +{ + uint32_t message_length; + ble_ans_c_evt_t event; + ble_ans_alert_notification_t * p_alert = &event.data.alert; + const ble_gattc_evt_hvx_t * p_notification = &p_ble_evt->evt.gattc_evt.params.hvx; + + // Message is not valid -> ignore. + event.evt_type = BLE_ANS_C_EVT_NOTIFICATION; + if (p_notification->len < NOTIFICATION_DATA_LENGTH) + { + return; + } + message_length = p_notification->len - NOTIFICATION_DATA_LENGTH; + + if (p_notification->handle == p_ans->service.new_alert.handle_value) + { + BLE_UUID_COPY_INST(event.uuid, p_ans->service.new_alert.uuid); + } + else if (p_notification->handle == p_ans->service.unread_alert_status.handle_value) + { + BLE_UUID_COPY_INST(event.uuid, p_ans->service.unread_alert_status.uuid); + } + else + { + // Nothing to process. + return; + } + + p_alert->alert_category = p_notification->data[0]; + p_alert->alert_category_count = p_notification->data[1]; //lint !e415 + p_alert->alert_msg_length = (message_length > p_ans->message_buffer_size) + ? p_ans->message_buffer_size + : message_length; + p_alert->p_alert_msg_buf = p_ans->p_message_buffer; + + memcpy(p_alert->p_alert_msg_buf, + &p_notification->data[NOTIFICATION_DATA_LENGTH], + p_alert->alert_msg_length); //lint !e416 + + p_ans->evt_handler(&event); +} + + +/**@brief Function for handling write response events. + */ +static void event_write_rsp(ble_ans_c_t * p_ans, const ble_evt_t * p_ble_evt) +{ + tx_buffer_process(); +} + + +/**@brief Function for validating and passing the response to the application, + * when a read response is received. + */ +static void event_read_rsp(ble_ans_c_t * p_ans, const ble_evt_t * p_ble_evt) +{ + ble_ans_c_evt_t event; + const ble_gattc_evt_read_rsp_t * p_response; + + p_response = &p_ble_evt->evt.gattc_evt.params.read_rsp; + event.evt_type = BLE_ANS_C_EVT_READ_RESP; + + if (p_response->len < READ_DATA_LENGTH_MIN) + { + tx_buffer_process(); + return; + } + + if (p_response->handle == p_ans->service.suported_new_alert_cat.handle_value) + { + BLE_UUID_COPY_INST(event.uuid, p_ans->service.suported_new_alert_cat.uuid); + } + else if (p_response->handle == p_ans->service.suported_unread_alert_cat.handle_value) + { + BLE_UUID_COPY_INST(event.uuid, p_ans->service.suported_unread_alert_cat.uuid); + } + else + { + // Bad response, ignore. + tx_buffer_process(); + return; + } + + event.data.settings = *(ble_ans_alert_settings_t *)(p_response->data); + + if (p_response->len == READ_DATA_LENGTH_MIN) + { + // Those must default to 0, if they are not returned by central. + event.data.settings.ans_high_prioritized_alert_support = 0; + event.data.settings.ans_instant_message_support = 0; + } + + p_ans->evt_handler(&event); + + tx_buffer_process(); +} + + +/**@brief Function for disconnecting and cleaning the current service. + */ +static void event_disconnect(ble_ans_c_t * p_ans, ble_evt_t const * p_ble_evt) +{ + if (p_ans->conn_handle == p_ble_evt->evt.gap_evt.conn_handle) + { + p_ans->conn_handle = BLE_CONN_HANDLE_INVALID; + + // Clearing all data for the service will also set all handle values to @ref BLE_GATT_HANDLE_INVALID + memset(&p_ans->service, 0, sizeof(ble_ans_c_service_t)); + + // There was a valid instance of IAS on the peer. Send an event to the + // application, so that it can do any clean up related to this module. + ble_ans_c_evt_t evt; + + evt.evt_type = BLE_ANS_C_EVT_DISCONN_COMPLETE; + p_ans->evt_handler(&evt); + } +} + + +/**@brief Function for handling of BLE stack events. + */ +void ble_ans_c_on_ble_evt(ble_ans_c_t * p_ans, const ble_evt_t * p_ble_evt) +{ + switch (p_ble_evt->header.evt_id) + { + case BLE_GATTC_EVT_HVX: + event_notify(p_ans, p_ble_evt); + break; + + case BLE_GATTC_EVT_WRITE_RSP: + event_write_rsp(p_ans, p_ble_evt); + break; + + case BLE_GATTC_EVT_READ_RSP: + event_read_rsp(p_ans, p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + event_disconnect(p_ans, p_ble_evt); + break; + } +} + + +uint32_t ble_ans_c_init(ble_ans_c_t * p_ans, const ble_ans_c_init_t * p_ans_init) +{ + VERIFY_PARAM_NOT_NULL(p_ans); + VERIFY_PARAM_NOT_NULL(p_ans_init); + VERIFY_PARAM_NOT_NULL(p_ans_init->evt_handler); + + // clear all handles + memset(p_ans, 0, sizeof(ble_ans_c_t)); + memset(m_tx_buffer, 0, TX_BUFFER_SIZE); + p_ans->conn_handle = BLE_CONN_HANDLE_INVALID; + + p_ans->evt_handler = p_ans_init->evt_handler; + p_ans->error_handler = p_ans_init->error_handler; + p_ans->message_buffer_size = p_ans_init->message_buffer_size; + p_ans->p_message_buffer = p_ans_init->p_message_buffer; + + BLE_UUID_BLE_ASSIGN(p_ans->service.service.uuid, BLE_UUID_ALERT_NOTIFICATION_SERVICE); + BLE_UUID_BLE_ASSIGN(p_ans->service.new_alert.uuid, BLE_UUID_NEW_ALERT_CHAR); + BLE_UUID_BLE_ASSIGN(p_ans->service.alert_notif_ctrl_point.uuid, + BLE_UUID_ALERT_NOTIFICATION_CONTROL_POINT_CHAR); + BLE_UUID_BLE_ASSIGN(p_ans->service.unread_alert_status.uuid, BLE_UUID_UNREAD_ALERT_CHAR); + BLE_UUID_BLE_ASSIGN(p_ans->service.suported_new_alert_cat.uuid, + BLE_UUID_SUPPORTED_NEW_ALERT_CATEGORY_CHAR); + BLE_UUID_BLE_ASSIGN(p_ans->service.suported_unread_alert_cat.uuid, + BLE_UUID_SUPPORTED_UNREAD_ALERT_CATEGORY_CHAR); + + BLE_UUID_BLE_ASSIGN(p_ans->service.new_alert_cccd.uuid, BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG); + BLE_UUID_BLE_ASSIGN(p_ans->service.unread_alert_cccd.uuid, + BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG); + + return ble_db_discovery_evt_register(&p_ans->service.service.uuid); +} + + +/**@brief Function for creating a TX message for writing a CCCD. + */ +static uint32_t cccd_configure(uint16_t conn_handle, uint16_t handle_cccd, bool enable) +{ + tx_message_t * p_msg; + uint16_t cccd_val = enable ? BLE_GATT_HVX_NOTIFICATION : 0; + + p_msg = &m_tx_buffer[m_tx_insert_index++]; + m_tx_insert_index &= TX_BUFFER_MASK; + + p_msg->req.write_req.gattc_params.handle = handle_cccd; + p_msg->req.write_req.gattc_params.len = WRITE_MESSAGE_LENGTH; + p_msg->req.write_req.gattc_params.p_value = p_msg->req.write_req.gattc_value; + p_msg->req.write_req.gattc_params.offset = 0; + p_msg->req.write_req.gattc_params.write_op = BLE_GATT_OP_WRITE_REQ; + p_msg->req.write_req.gattc_value[0] = LSB_16(cccd_val); + p_msg->req.write_req.gattc_value[1] = MSB_16(cccd_val); + p_msg->conn_handle = conn_handle; + p_msg->type = WRITE_REQ; + + tx_buffer_process(); + return NRF_SUCCESS; +} + + +uint32_t ble_ans_c_enable_notif_new_alert(const ble_ans_c_t * p_ans) +{ + if (p_ans->conn_handle == BLE_CONN_HANDLE_INVALID) + { + return NRF_ERROR_INVALID_STATE; + } + else + { + return cccd_configure(p_ans->conn_handle, + p_ans->service.new_alert_cccd.handle, + true); + } +} + + +uint32_t ble_ans_c_disable_notif_new_alert(const ble_ans_c_t * p_ans) +{ + return cccd_configure(p_ans->conn_handle, + p_ans->service.new_alert_cccd.handle, + false); +} + + +uint32_t ble_ans_c_enable_notif_unread_alert(const ble_ans_c_t * p_ans) +{ + if ( p_ans->conn_handle == BLE_CONN_HANDLE_INVALID) + { + return NRF_ERROR_INVALID_STATE; + } + return cccd_configure(p_ans->conn_handle, + p_ans->service.unread_alert_cccd.handle, + true); +} + + +uint32_t ble_ans_c_disable_notif_unread_alert(const ble_ans_c_t * p_ans) +{ + return cccd_configure(p_ans->conn_handle, + p_ans->service.unread_alert_cccd.handle, + false); +} + + +uint32_t ble_ans_c_control_point_write(const ble_ans_c_t * p_ans, + const ble_ans_control_point_t * p_control_point) +{ + tx_message_t * p_msg; + + p_msg = &m_tx_buffer[m_tx_insert_index++]; + m_tx_insert_index &= TX_BUFFER_MASK; + + p_msg->req.write_req.gattc_params.handle = p_ans->service.alert_notif_ctrl_point.handle_value; + p_msg->req.write_req.gattc_params.len = WRITE_MESSAGE_LENGTH; + p_msg->req.write_req.gattc_params.p_value = p_msg->req.write_req.gattc_value; + p_msg->req.write_req.gattc_params.offset = 0; + p_msg->req.write_req.gattc_params.write_op = BLE_GATT_OP_WRITE_REQ; + p_msg->req.write_req.gattc_value[0] = p_control_point->command; + p_msg->req.write_req.gattc_value[1] = p_control_point->category; + p_msg->conn_handle = p_ans->conn_handle; + p_msg->type = WRITE_REQ; + + tx_buffer_process(); + return NRF_SUCCESS; +} + + +uint32_t ble_ans_c_new_alert_read(const ble_ans_c_t * p_ans) +{ + tx_message_t * msg; + + msg = &m_tx_buffer[m_tx_insert_index++]; + m_tx_insert_index &= TX_BUFFER_MASK; + + msg->req.read_handle = p_ans->service.suported_new_alert_cat.handle_value; + msg->conn_handle = p_ans->conn_handle; + msg->type = READ_REQ; + + tx_buffer_process(); + return NRF_SUCCESS; +} + + +uint32_t ble_ans_c_unread_alert_read(const ble_ans_c_t * p_ans) +{ + tx_message_t * msg; + + msg = &m_tx_buffer[m_tx_insert_index++]; + m_tx_insert_index &= TX_BUFFER_MASK; + + msg->req.read_handle = p_ans->service.suported_unread_alert_cat.handle_value; + msg->conn_handle = p_ans->conn_handle; + msg->type = READ_REQ; + + tx_buffer_process(); + return NRF_SUCCESS; +} + + +uint32_t ble_ans_c_new_alert_notify(const ble_ans_c_t * p_ans, ble_ans_category_id_t category_id) +{ + ble_ans_control_point_t control_point; + + control_point.command = ANS_NOTIFY_NEW_INCOMING_ALERT_IMMEDIATELY; + control_point.category = category_id; + + return ble_ans_c_control_point_write(p_ans, &control_point); +} + + +uint32_t ble_ans_c_unread_alert_notify(const ble_ans_c_t * p_ans, ble_ans_category_id_t category_id) +{ + ble_ans_control_point_t control_point; + + control_point.command = ANS_NOTIFY_UNREAD_CATEGORY_STATUS_IMMEDIATELY; + control_point.category = category_id; + + return ble_ans_c_control_point_write(p_ans, &control_point); +} + + +uint32_t ble_ans_c_handles_assign(ble_ans_c_t * p_ans, + const uint16_t conn_handle, + const ble_ans_c_service_t * p_peer_handles) +{ + VERIFY_PARAM_NOT_NULL(p_ans); + + if (!is_valid_ans_srv_discovered(p_peer_handles)) + { + return NRF_ERROR_INVALID_PARAM; + } + p_ans->conn_handle = conn_handle; + + if (p_peer_handles != NULL) + { + // Copy the handles from the discovered characteristics over to the provided client instance. + char_set(&p_ans->service.alert_notif_ctrl_point, &p_peer_handles->alert_notif_ctrl_point); + char_set(&p_ans->service.suported_new_alert_cat, &p_peer_handles->suported_new_alert_cat); + char_set(&p_ans->service.suported_unread_alert_cat, &p_peer_handles->suported_unread_alert_cat); + char_set(&p_ans->service.new_alert, &p_peer_handles->new_alert); + char_cccd_set(&p_ans->service.new_alert_cccd, p_peer_handles->new_alert_cccd.handle); + char_set(&p_ans->service.unread_alert_status, &p_peer_handles->unread_alert_status); + char_cccd_set(&p_ans->service.unread_alert_cccd, p_peer_handles->unread_alert_cccd.handle); + } + + return NRF_SUCCESS; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ans_c/ble_ans_c.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ans_c/ble_ans_c.h new file mode 100644 index 0000000000..d79867d4a6 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ans_c/ble_ans_c.h @@ -0,0 +1,348 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + */ + +/** @file + * + * @defgroup ble_sdk_srv_ans_c Alert Notification Service Client + * @{ + * @ingroup ble_sdk_srv + * @brief Alert Notification module. + * + * @details This module implements the Alert Notification Client according to the + * Alert Notification Profile. + * + * @note The application must propagate BLE stack events to the Alert Notification Client module + * by calling ble_ans_c_on_ble_evt() from the @ref softdevice_handler callback. + * + * @note Attention! + * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile + * qualification listings, this section of source code must not be modified. + */ +#ifndef BLE_ANS_C_H__ +#define BLE_ANS_C_H__ + +#include "ble.h" +#include "ble_gatts.h" +#include "ble_types.h" +#include "sdk_common.h" +#include "ble_srv_common.h" +#include "ble_db_discovery.h" + + +// Forward declaration of the ble_ans_c_t type. +typedef struct ble_ans_c_s ble_ans_c_t; + +/** Alerts types as defined in the alert category id; UUID: 0x2A43. */ +typedef enum +{ + ANS_TYPE_SIMPLE_ALERT = 0, /**< General text alert or non-text alert.*/ + ANS_TYPE_EMAIL = 1, /**< Alert when email messages arrives.*/ + ANS_TYPE_NEWS = 2, /**< News feeds such as RSS, Atom.*/ + ANS_TYPE_NOTIFICATION_CALL = 3, /**< Incoming call.*/ + ANS_TYPE_MISSED_CALL = 4, /**< Missed call.*/ + ANS_TYPE_SMS_MMS = 5, /**< SMS/MMS message arrives.*/ + ANS_TYPE_VOICE_MAIL = 6, /**< Voice mail.*/ + ANS_TYPE_SCHEDULE = 7, /**< Alert occurred on calendar, planner.*/ + ANS_TYPE_HIGH_PRIORITIZED_ALERT = 8, /**< Alert that should be handled as high priority.*/ + ANS_TYPE_INSTANT_MESSAGE = 9, /**< Alert for incoming instant messages.*/ + ANS_TYPE_ALL_ALERTS = 0xFF /**< Identifies All Alerts. */ +} ble_ans_category_id_t; + +/** Alerts notification control point commands as defined in the Alert Notification Specification; + * UUID: 0x2A44. + */ +typedef enum +{ + ANS_ENABLE_NEW_INCOMING_ALERT_NOTIFICATION = 0, /**< Enable New Incoming Alert Notification.*/ + ANS_ENABLE_UNREAD_CATEGORY_STATUS_NOTIFICATION = 1, /**< Enable Unread Category Status Notification.*/ + ANS_DISABLE_NEW_INCOMING_ALERT_NOTIFICATION = 2, /**< Disable New Incoming Alert Notification.*/ + ANS_DISABLE_UNREAD_CATEGORY_STATUS_NOTIFICATION = 3, /**< Disable Unread Category Status Notification.*/ + ANS_NOTIFY_NEW_INCOMING_ALERT_IMMEDIATELY = 4, /**< Notify New Incoming Alert immediately.*/ + ANS_NOTIFY_UNREAD_CATEGORY_STATUS_IMMEDIATELY = 5, /**< Notify Unread Category Status immediately.*/ +} ble_ans_command_id_t; + +/**@brief Alert Notification Event types that are passed from client to application on an event. */ +typedef enum +{ + BLE_ANS_C_EVT_DISCOVERY_COMPLETE, /**< A successful connection has been established and the characteristics of the server has been fetched. */ + BLE_ANS_C_EVT_DISCOVERY_FAILED, /**< It was not possible to discover service or characteristics of the connected peer. */ + BLE_ANS_C_EVT_DISCONN_COMPLETE, /**< The connection has been taken down. */ + BLE_ANS_C_EVT_NOTIFICATION, /**< A valid Alert Notification has been received from the server.*/ + BLE_ANS_C_EVT_READ_RESP, /**< A read response has been received from the server.*/ + BLE_ANS_C_EVT_WRITE_RESP /**< A write response has been received from the server.*/ +} ble_ans_c_evt_type_t; + +/**@brief Alert Notification Control Point structure. */ +typedef struct +{ + ble_ans_command_id_t command; /**< The command to be written to the control point, see @ref ble_ans_command_id_t. */ + ble_ans_category_id_t category; /**< The category for the control point for which the command applies, see @ref ble_ans_category_id_t. */ +} ble_ans_control_point_t; + +/**@brief Alert Notification Setting structure containing the supported alerts in the service. + * + *@details + * The structure contains bit fields describing which alerts that are supported: + * 0 = Unsupported + * 1 = Supported + */ +typedef struct +{ + uint8_t ans_simple_alert_support : 1; /**< Support for General text alert or non-text alert.*/ + uint8_t ans_email_support : 1; /**< Support for Alert when email messages arrives.*/ + uint8_t ans_news_support : 1; /**< Support for News feeds such as RSS, Atom.*/ + uint8_t ans_notification_call_support : 1; /**< Support for Incoming call.*/ + uint8_t ans_missed_call_support : 1; /**< Support for Missed call.*/ + uint8_t ans_sms_mms_support : 1; /**< Support for SMS/MMS message arrives.*/ + uint8_t ans_voice_mail_support : 1; /**< Support for Voice mail.*/ + uint8_t ans_schedule_support : 1; /**< Support for Alert occurred on calendar, planner.*/ + uint8_t ans_high_prioritized_alert_support : 1; /**< Support for Alert that should be handled as high priority.*/ + uint8_t ans_instant_message_support : 1; /**< Support for Alert for incoming instant messages.*/ + uint8_t reserved : 6; /**< Reserved for future use. */ +} ble_ans_alert_settings_t; + +/**@brief Alert Notification structure + */ +typedef struct +{ + uint8_t alert_category; /**< Alert category to which this alert belongs.*/ + uint8_t alert_category_count; /**< Number of alerts in the category. */ + uint32_t alert_msg_length; /**< Length of optional text message send by the server. */ + uint8_t * p_alert_msg_buf; /**< Pointer to buffer containing the optional text message. */ +} ble_ans_alert_notification_t; + + +/**@brief Struct to hold information on the Alert Notification Service if found on the server. +*/ +typedef struct +{ + ble_gattc_service_t service; /**< The GATT service holding the discovered Alert Notification Service. */ + ble_gattc_char_t alert_notif_ctrl_point; /**< Characteristic for the Alert Notification Control Point. @ref BLE_UUID_ALERT_NOTIFICATION_CONTROL_POINT_CHAR */ + ble_gattc_char_t suported_new_alert_cat; /**< Characteristic for the Supported New Alert category. @ref BLE_UUID_SUPPORTED_NEW_ALERT_CATEGORY_CHAR */ + ble_gattc_char_t suported_unread_alert_cat; /**< Characteristic for the Unread Alert category. @ref BLE_UUID_SUPPORTED_UNREAD_ALERT_CATEGORY_CHAR */ + ble_gattc_char_t new_alert; /**< Characteristic for the New Alert Notification. @ref BLE_UUID_NEW_ALERT_CHAR */ + ble_gattc_desc_t new_alert_cccd; /**< Characteristic Descriptor for New Alert Category. Enables or Disables GATT notifications */ + ble_gattc_char_t unread_alert_status; /**< Characteristic for the Unread Alert Notification. @ref BLE_UUID_UNREAD_ALERT_CHAR */ + ble_gattc_desc_t unread_alert_cccd; /**< Characteristic Descriptor for Unread Alert Category. Enables or Disables GATT notifications */ +} ble_ans_c_service_t; + + +/**@brief Alert Notification Event structure + * + * @details The structure contains the event that should be handled, as well as + * additional information. + */ +typedef struct +{ + ble_ans_c_evt_type_t evt_type; /**< Type of event. */ + uint16_t conn_handle; /**< Connection handle on which the ANS service was discovered on the peer device. This will be filled if the evt_type is @ref BLE_ANS_C_EVT_DISCOVERY_COMPLETE.*/ + ble_uuid_t uuid; /**< UUID of the event in case of an alert or notification. */ + union + { + ble_ans_alert_settings_t settings; /**< Setting returned from server on read request. */ + ble_ans_alert_notification_t alert; /**< Alert Notification data sent by the server. */ + uint32_t error_code; /**< Additional status/error code if the event was caused by a stack error or gatt status, e.g. during service discovery. */ + ble_ans_c_service_t service; /**< Info on the discovered Alert Notification Service discovered. This will be filled if the evt_type is @ref BLE_ANS_C_EVT_DISCOVERY_COMPLETE.*/ + } data; +} ble_ans_c_evt_t; + +/**@brief Alert Notification event handler type. */ +typedef void (*ble_ans_c_evt_handler_t) (ble_ans_c_evt_t * p_evt); + + +/**@brief Alert Notification structure. This contains various status information for the client. */ +struct ble_ans_c_s +{ + ble_ans_c_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Alert Notification Client Application. */ + ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ + uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ + uint8_t central_handle; /**< Handle for the currently connected central if peer is bonded. */ + uint8_t service_handle; /**< Handle to the service in the database to use for this instance. */ + uint32_t message_buffer_size; /**< Size of message buffer to hold the additional text messages received on notifications. */ + uint8_t * p_message_buffer; /**< Pointer to the buffer to be used for additional text message handling. */ + ble_ans_c_service_t service; /**< Struct to store the different handles and UUIDs related to the service. */ +}; + +/**@brief Alert Notification init structure. This contains all options and data needed for + * initialization of the client.*/ +typedef struct +{ + ble_ans_c_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Battery Service. */ + ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ + uint32_t message_buffer_size; /**< Size of buffer to handle messages. */ + uint8_t * p_message_buffer; /**< Pointer to buffer for passing messages. */ +} ble_ans_c_init_t; + + +/**@brief Function for handling events from the database discovery module. + * + * @details Call this function when getting a callback event from the DB discovery modue. + * This function will handle an event from the database discovery module, and determine + * if it relates to the discovery of heart rate service at the peer. If so, it will + * call the application's event handler indicating that the heart rate service has been + * discovered at the peer. It also populates the event with the service related + * information before providing it to the application. + * + * @param[in] p_ans Pointer to the Alert Notification client structure instance that will handle + * the discovery. + * @param[in] p_evt Pointer to the event received from the database discovery module. + */ +void ble_ans_c_on_db_disc_evt(ble_ans_c_t * p_ans, const ble_db_discovery_evt_t * p_evt); + + +/**@brief Function for handling the Application's BLE Stack events. + * + * @details Handles all events from the BLE stack of interest to the Alert Notification Client. + * + * @param[in] p_ans Alert Notification Client structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +void ble_ans_c_on_ble_evt(ble_ans_c_t * p_ans, const ble_evt_t * p_ble_evt); + + +/**@brief Function for initializing the Alert Notification Client. + * + * @param[out] p_ans Alert Notification Client structure. This structure will have to be + * supplied by the application. It will be initialized by this function, + * and will later be used to identify this particular client instance. + * @param[in] p_ans_init Information needed to initialize the client. + * + * @return NRF_SUCCESS on successful initialization of client, otherwise an error code. + */ +uint32_t ble_ans_c_init(ble_ans_c_t * p_ans, const ble_ans_c_init_t * p_ans_init); + + +/**@brief Function for writing the to CCCD to enable new alert notifications from the Alert Notification Service. + * + * @param[in] p_ans Alert Notification structure. This structure will have to be supplied by + * the application. It identifies the particular client instance to use. + * + * @return NRF_SUCCESS on successful writing of the CCCD, otherwise an error code. + */ +uint32_t ble_ans_c_enable_notif_new_alert(const ble_ans_c_t * p_ans); + + +/**@brief Function for writing to the CCCD to enable unread alert notifications from the Alert Notification Service. + * + * @param[in] p_ans Alert Notification structure. This structure will have to be supplied by + * the application. It identifies the particular client instance to use. + * + * @return NRF_SUCCESS on successful writing of the CCCD, otherwise an error code. + */ +uint32_t ble_ans_c_enable_notif_unread_alert(const ble_ans_c_t * p_ans); + + +/**@brief Function for writing to the CCCD to disable new alert notifications from the Alert Notification Service. + * + * @param[in] p_ans Alert Notification structure. This structure will have to be supplied by + * the application. It identifies the particular client instance to use. + * + * @return NRF_SUCCESS on successful writing of the CCCD, otherwise an error code. + */ +uint32_t ble_ans_c_disable_notif_new_alert(const ble_ans_c_t * p_ans); + + +/**@brief Function for writing to the CCCD to disable unread alert notifications from the Alert Notification Service. + * + * @param[in] p_ans Alert Notification structure. This structure will have to be supplied by + * the application. It identifies the particular client instance to use. + * + * @return NRF_SUCCESS on successful writing of the CCCD, otherwise an error code. + */ +uint32_t ble_ans_c_disable_notif_unread_alert(const ble_ans_c_t * p_ans); + + +/**@brief Function for writing to the Alert Notification Control Point to specify alert notification behavior in the + * Alert Notification Service on the Central. + * + * @param[in] p_ans Alert Notification structure. This structure will have to be + * supplied by the application. It identifies the particular client + * instance to use. + * @param[in] p_control_point Alert Notification Control Point structure. This structure + * specifies the values to write to the Alert Notification Control + * Point, UUID 0x2A44. + * + * @return NRF_SUCCESS on successful writing of the Control Point, otherwise an error code. + */ +uint32_t ble_ans_c_control_point_write(const ble_ans_c_t * p_ans, + const ble_ans_control_point_t * p_control_point); + + +/**@brief Function for reading the Supported New Alert characteristic value of the service. + * The value describes the alerts supported in the central. + * + * @param[in] p_ans Alert Notification structure. This structure will have to be supplied by + * the application. It identifies the particular client instance to use. + * + * @return NRF_SUCCESS on successful transmission of the read request, otherwise an error code. + */ +uint32_t ble_ans_c_new_alert_read(const ble_ans_c_t * p_ans); + + +/**@brief Function for reading the Supported Unread Alert characteristic value of the service. + * The value describes the alerts supported in the central. + * + * @param[in] p_ans Alert Notification structure. This structure will have to be supplied by + * the application. It identifies the particular client instance to use. + * + * @return NRF_SUCCESS on successful transmission of the read request, otherwise an error code. + */ +uint32_t ble_ans_c_unread_alert_read(const ble_ans_c_t * p_ans); + + +/**@brief Function for requesting the peer to notify the New Alert characteristics immediately. + * + * @param[in] p_ans Alert Notification structure. This structure will have to be supplied by + * the application. It identifies the particular client instance to use. + * @param[in] category The category ID for which the peer should notify the client. + * + * @return NRF_SUCCESS on successful transmission of the read request, otherwise an error code. + */ +uint32_t ble_ans_c_new_alert_notify(const ble_ans_c_t * p_ans, ble_ans_category_id_t category); + + +/**@brief Function for requesting the peer to notify the Unread Alert characteristics immediately. + * + * @param[in] p_ans Alert Notification structure. This structure will have to be supplied by + * the application. It identifies the particular client instance to use. + * @param[in] category The category ID for which the peer should notify the client. + * + * @return NRF_SUCCESS on successful transmission of the read request, otherwise an error code. + */ +uint32_t ble_ans_c_unread_alert_notify(const ble_ans_c_t * p_ans, ble_ans_category_id_t category); + + +/**@brief Function for assigning a handles to a an instance of ans_c. + * + * @details Call this function when a link has been established with a peer to + * associate this link to an instance of the module. This makes it + * possible to handle several link and associate each link to a particular + * instance of the ans_c module. The connection handle and attribute handles will be + * provided from the discovery event @ref BLE_ANS_C_EVT_DISCOVERY_COMPLETE. + * + * @param[in] p_ans Pointer to the Alert Notification client structure instance to + * associate with the handles. + * @param[in] conn_handle Connection handle to associated with the given Alert Notification Client + * Instance. + * @param[in] p_peer_handles Attribute handles on the ANS server that you want this ANS client to + * interact with. + * + */ +uint32_t ble_ans_c_handles_assign(ble_ans_c_t * p_ans, + const uint16_t conn_handle, + const ble_ans_c_service_t * p_peer_handles); + + + +#endif // BLE_ANS_C_H__ + +/** @} */ + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas/ble_bas.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas/ble_bas.c new file mode 100644 index 0000000000..2922a3a5b8 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas/ble_bas.c @@ -0,0 +1,316 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/* Attention! +* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile +* qualification listings, this section of source code must not be modified. +*/ + +#include "ble_bas.h" +#include +#include "nordic_common.h" +#include "ble_srv_common.h" +#include "app_util.h" + + +#define INVALID_BATTERY_LEVEL 255 + + +/**@brief Function for handling the Connect event. + * + * @param[in] p_bas Battery Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_connect(ble_bas_t * p_bas, ble_evt_t * p_ble_evt) +{ + p_bas->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; +} + + +/**@brief Function for handling the Disconnect event. + * + * @param[in] p_bas Battery Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_disconnect(ble_bas_t * p_bas, ble_evt_t * p_ble_evt) +{ + UNUSED_PARAMETER(p_ble_evt); + p_bas->conn_handle = BLE_CONN_HANDLE_INVALID; +} + + +/**@brief Function for handling the Write event. + * + * @param[in] p_bas Battery Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_write(ble_bas_t * p_bas, ble_evt_t * p_ble_evt) +{ + if (p_bas->is_notification_supported) + { + ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; + + if ( + (p_evt_write->handle == p_bas->battery_level_handles.cccd_handle) + && + (p_evt_write->len == 2) + ) + { + // CCCD written, call application event handler + if (p_bas->evt_handler != NULL) + { + ble_bas_evt_t evt; + + if (ble_srv_is_notification_enabled(p_evt_write->data)) + { + evt.evt_type = BLE_BAS_EVT_NOTIFICATION_ENABLED; + } + else + { + evt.evt_type = BLE_BAS_EVT_NOTIFICATION_DISABLED; + } + + p_bas->evt_handler(p_bas, &evt); + } + } + } +} + + +void ble_bas_on_ble_evt(ble_bas_t * p_bas, ble_evt_t * p_ble_evt) +{ + if (p_bas == NULL || p_ble_evt == NULL) + { + return; + } + + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + on_connect(p_bas, p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + on_disconnect(p_bas, p_ble_evt); + break; + + case BLE_GATTS_EVT_WRITE: + on_write(p_bas, p_ble_evt); + break; + + default: + // No implementation needed. + break; + } +} + + +/**@brief Function for adding the Battery Level characteristic. + * + * @param[in] p_bas Battery Service structure. + * @param[in] p_bas_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t battery_level_char_add(ble_bas_t * p_bas, const ble_bas_init_t * p_bas_init) +{ + uint32_t err_code; + ble_gatts_char_md_t char_md; + ble_gatts_attr_md_t cccd_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + uint8_t initial_battery_level; + uint8_t encoded_report_ref[BLE_SRV_ENCODED_REPORT_REF_LEN]; + uint8_t init_len; + + // Add Battery Level characteristic + if (p_bas->is_notification_supported) + { + memset(&cccd_md, 0, sizeof(cccd_md)); + + // According to BAS_SPEC_V10, the read operation on cccd should be possible without + // authentication. + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); + cccd_md.write_perm = p_bas_init->battery_level_char_attr_md.cccd_write_perm; + cccd_md.vloc = BLE_GATTS_VLOC_STACK; + } + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.read = 1; + char_md.char_props.notify = (p_bas->is_notification_supported) ? 1 : 0; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = (p_bas->is_notification_supported) ? &cccd_md : NULL; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_BATTERY_LEVEL_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.read_perm = p_bas_init->battery_level_char_attr_md.read_perm; + attr_md.write_perm = p_bas_init->battery_level_char_attr_md.write_perm; + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + initial_battery_level = p_bas_init->initial_batt_level; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = sizeof(uint8_t); + attr_char_value.init_offs = 0; + attr_char_value.max_len = sizeof(uint8_t); + attr_char_value.p_value = &initial_battery_level; + + err_code = sd_ble_gatts_characteristic_add(p_bas->service_handle, &char_md, + &attr_char_value, + &p_bas->battery_level_handles); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + if (p_bas_init->p_report_ref != NULL) + { + // Add Report Reference descriptor + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_REPORT_REF_DESCR); + + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.read_perm = p_bas_init->battery_level_report_read_perm; + BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.write_perm); + + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + init_len = ble_srv_report_ref_encode(encoded_report_ref, p_bas_init->p_report_ref); + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = init_len; + attr_char_value.init_offs = 0; + attr_char_value.max_len = attr_char_value.init_len; + attr_char_value.p_value = encoded_report_ref; + + err_code = sd_ble_gatts_descriptor_add(p_bas->battery_level_handles.value_handle, + &attr_char_value, + &p_bas->report_ref_handle); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + else + { + p_bas->report_ref_handle = BLE_GATT_HANDLE_INVALID; + } + + return NRF_SUCCESS; +} + + +uint32_t ble_bas_init(ble_bas_t * p_bas, const ble_bas_init_t * p_bas_init) +{ + if (p_bas == NULL || p_bas_init == NULL) + { + return NRF_ERROR_NULL; + } + + uint32_t err_code; + ble_uuid_t ble_uuid; + + // Initialize service structure + p_bas->evt_handler = p_bas_init->evt_handler; + p_bas->conn_handle = BLE_CONN_HANDLE_INVALID; + p_bas->is_notification_supported = p_bas_init->support_notification; + p_bas->battery_level_last = INVALID_BATTERY_LEVEL; + + // Add service + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_BATTERY_SERVICE); + + err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &ble_uuid, &p_bas->service_handle); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add battery level characteristic + return battery_level_char_add(p_bas, p_bas_init); +} + + +uint32_t ble_bas_battery_level_update(ble_bas_t * p_bas, uint8_t battery_level) +{ + if (p_bas == NULL) + { + return NRF_ERROR_NULL; + } + + uint32_t err_code = NRF_SUCCESS; + ble_gatts_value_t gatts_value; + + if (battery_level != p_bas->battery_level_last) + { + // Initialize value struct. + memset(&gatts_value, 0, sizeof(gatts_value)); + + gatts_value.len = sizeof(uint8_t); + gatts_value.offset = 0; + gatts_value.p_value = &battery_level; + + // Update database. + err_code = sd_ble_gatts_value_set(p_bas->conn_handle, + p_bas->battery_level_handles.value_handle, + &gatts_value); + if (err_code == NRF_SUCCESS) + { + // Save new battery value. + p_bas->battery_level_last = battery_level; + } + else + { + return err_code; + } + + // Send value if connected and notifying. + if ((p_bas->conn_handle != BLE_CONN_HANDLE_INVALID) && p_bas->is_notification_supported) + { + ble_gatts_hvx_params_t hvx_params; + + memset(&hvx_params, 0, sizeof(hvx_params)); + + hvx_params.handle = p_bas->battery_level_handles.value_handle; + hvx_params.type = BLE_GATT_HVX_NOTIFICATION; + hvx_params.offset = gatts_value.offset; + hvx_params.p_len = &gatts_value.len; + hvx_params.p_data = gatts_value.p_value; + + err_code = sd_ble_gatts_hvx(p_bas->conn_handle, &hvx_params); + } + else + { + err_code = NRF_ERROR_INVALID_STATE; + } + } + + return err_code; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas/ble_bas.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas/ble_bas.h new file mode 100644 index 0000000000..7673a7c300 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas/ble_bas.h @@ -0,0 +1,133 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_sdk_srv_bas Battery Service + * @{ + * @ingroup ble_sdk_srv + * @brief Battery Service module. + * + * @details This module implements the Battery Service with the Battery Level characteristic. + * During initialization it adds the Battery Service and Battery Level characteristic + * to the BLE stack database. Optionally it can also add a Report Reference descriptor + * to the Battery Level characteristic (used when including the Battery Service in + * the HID service). + * + * If specified, the module will support notification of the Battery Level characteristic + * through the ble_bas_battery_level_update() function. + * If an event handler is supplied by the application, the Battery Service will + * generate Battery Service events to the application. + * + * @note The application must propagate BLE stack events to the Battery Service module by calling + * ble_bas_on_ble_evt() from the @ref softdevice_handler callback. + * + * @note Attention! + * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile + * qualification listings, this section of source code must not be modified. + */ + +#ifndef BLE_BAS_H__ +#define BLE_BAS_H__ + +#include +#include +#include "ble.h" +#include "ble_srv_common.h" + +/**@brief Battery Service event type. */ +typedef enum +{ + BLE_BAS_EVT_NOTIFICATION_ENABLED, /**< Battery value notification enabled event. */ + BLE_BAS_EVT_NOTIFICATION_DISABLED /**< Battery value notification disabled event. */ +} ble_bas_evt_type_t; + +/**@brief Battery Service event. */ +typedef struct +{ + ble_bas_evt_type_t evt_type; /**< Type of event. */ +} ble_bas_evt_t; + +// Forward declaration of the ble_bas_t type. +typedef struct ble_bas_s ble_bas_t; + +/**@brief Battery Service event handler type. */ +typedef void (*ble_bas_evt_handler_t) (ble_bas_t * p_bas, ble_bas_evt_t * p_evt); + +/**@brief Battery Service init structure. This contains all options and data needed for + * initialization of the service.*/ +typedef struct +{ + ble_bas_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Battery Service. */ + bool support_notification; /**< TRUE if notification of Battery Level measurement is supported. */ + ble_srv_report_ref_t * p_report_ref; /**< If not NULL, a Report Reference descriptor with the specified value will be added to the Battery Level characteristic */ + uint8_t initial_batt_level; /**< Initial battery level */ + ble_srv_cccd_security_mode_t battery_level_char_attr_md; /**< Initial security level for battery characteristics attribute */ + ble_gap_conn_sec_mode_t battery_level_report_read_perm; /**< Initial security level for battery report read attribute */ +} ble_bas_init_t; + +/**@brief Battery Service structure. This contains various status information for the service. */ +struct ble_bas_s +{ + ble_bas_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Battery Service. */ + uint16_t service_handle; /**< Handle of Battery Service (as provided by the BLE stack). */ + ble_gatts_char_handles_t battery_level_handles; /**< Handles related to the Battery Level characteristic. */ + uint16_t report_ref_handle; /**< Handle of the Report Reference descriptor. */ + uint8_t battery_level_last; /**< Last Battery Level measurement passed to the Battery Service. */ + uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ + bool is_notification_supported; /**< TRUE if notification of Battery Level is supported. */ +}; + +/**@brief Function for initializing the Battery Service. + * + * @param[out] p_bas Battery Service structure. This structure will have to be supplied by + * the application. It will be initialized by this function, and will later + * be used to identify this particular service instance. + * @param[in] p_bas_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. + */ +uint32_t ble_bas_init(ble_bas_t * p_bas, const ble_bas_init_t * p_bas_init); + +/**@brief Function for handling the Application's BLE Stack events. + * + * @details Handles all events from the BLE stack of interest to the Battery Service. + * + * @note For the requirements in the BAS specification to be fulfilled, + * ble_bas_battery_level_update() must be called upon reconnection if the + * battery level has changed while the service has been disconnected from a bonded + * client. + * + * @param[in] p_bas Battery Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +void ble_bas_on_ble_evt(ble_bas_t * p_bas, ble_evt_t * p_ble_evt); + +/**@brief Function for updating the battery level. + * + * @details The application calls this function after having performed a battery measurement. If + * notification has been enabled, the battery level characteristic is sent to the client. + * + * @note For the requirements in the BAS specification to be fulfilled, + * this function must be called upon reconnection if the battery level has changed + * while the service has been disconnected from a bonded client. + * + * @param[in] p_bas Battery Service structure. + * @param[in] battery_level New battery measurement value (in percent of full capacity). + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +uint32_t ble_bas_battery_level_update(ble_bas_t * p_bas, uint8_t battery_level); + +#endif // BLE_BAS_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas_c/ble_bas_c.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas_c/ble_bas_c.c new file mode 100644 index 0000000000..08aff9f330 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas_c/ble_bas_c.c @@ -0,0 +1,370 @@ +/* + * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is confidential property of Nordic Semiconductor. The use, + * copying, transfer or disclosure of such information is prohibited except by express written + * agreement with Nordic Semiconductor. + * + */ + +#include "ble_bas_c.h" +#include "ble_db_discovery.h" +#include "ble_types.h" +#include "ble_srv_common.h" +#include "ble_gattc.h" +#include "app_trace.h" +#include "sdk_common.h" + +#define LOG app_trace_log /**< Debug logger macro that will be used in this file to do logging of important information over UART. */ +#define TX_BUFFER_MASK 0x07 /**< TX Buffer mask, must be a mask of contiguous zeroes, followed by contiguous sequence of ones: 000...111. */ +#define TX_BUFFER_SIZE (TX_BUFFER_MASK + 1) /**< Size of the send buffer, which is 1 higher than the mask. */ +#define WRITE_MESSAGE_LENGTH BLE_CCCD_VALUE_LEN /**< Length of the write message for CCCD. */ + +typedef enum +{ + READ_REQ, /**< Type identifying that this tx_message is a read request. */ + WRITE_REQ /**< Type identifying that this tx_message is a write request. */ +} tx_request_t; + +/**@brief Structure for writing a message to the peer, i.e. CCCD. + */ +typedef struct +{ + uint8_t gattc_value[WRITE_MESSAGE_LENGTH]; /**< The message to write. */ + ble_gattc_write_params_t gattc_params; /**< The GATTC parameters for this message. */ +} write_params_t; + +/**@brief Structure for holding the data that will be transmitted to the connected central. + */ +typedef struct +{ + uint16_t conn_handle; /**< Connection handle to be used when transmitting this message. */ + tx_request_t type; /**< Type of message. (read or write). */ + union + { + uint16_t read_handle; /**< Read request handle. */ + write_params_t write_req; /**< Write request message. */ + } req; +} tx_message_t; + + +static tx_message_t m_tx_buffer[TX_BUFFER_SIZE]; /**< Transmit buffer for the messages that will be transmitted to the central. */ +static uint32_t m_tx_insert_index = 0; /**< Current index in the transmit buffer where the next message should be inserted. */ +static uint32_t m_tx_index = 0; /**< Current index in the transmit buffer containing the next message to be transmitted. */ + +/**@brief Function for passing any pending request from the buffer to the stack. + */ +static void tx_buffer_process(void) +{ + if (m_tx_index != m_tx_insert_index) + { + uint32_t err_code; + + if (m_tx_buffer[m_tx_index].type == READ_REQ) + { + err_code = sd_ble_gattc_read(m_tx_buffer[m_tx_index].conn_handle, + m_tx_buffer[m_tx_index].req.read_handle, + 0); + } + else + { + err_code = sd_ble_gattc_write(m_tx_buffer[m_tx_index].conn_handle, + &m_tx_buffer[m_tx_index].req.write_req.gattc_params); + } + if (err_code == NRF_SUCCESS) + { + LOG("[BAS_C]: SD Read/Write API returns Success..\r\n"); + m_tx_index++; + m_tx_index &= TX_BUFFER_MASK; + } + else + { + LOG("[BAS_C]: SD Read/Write API returns error. This message sending will be " + "attempted again..\r\n"); + } + } +} + + +/**@brief Function for handling write response events. + * + * @param[in] p_bas_c Pointer to the Battery Service Client Structure. + * @param[in] p_ble_evt Pointer to the SoftDevice event. + */ +static void on_write_rsp(ble_bas_c_t * p_bas_c, const ble_evt_t * p_ble_evt) +{ + // Check if the event if on the link for this instance + if (p_bas_c->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) + { + return; + } + // Check if there is any message to be sent across to the peer and send it. + tx_buffer_process(); +} + + +/**@brief Function for handling read response events. + * + * @details This function will validate the read response and raise the appropriate + * event to the application. + * + * @param[in] p_bas_c Pointer to the Battery Service Client Structure. + * @param[in] p_ble_evt Pointer to the SoftDevice event. + */ +static void on_read_rsp(ble_bas_c_t * p_bas_c, const ble_evt_t * p_ble_evt) +{ + const ble_gattc_evt_read_rsp_t * p_response; + + // Check if the event if on the link for this instance + if (p_bas_c->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) + { + return; + } + + p_response = &p_ble_evt->evt.gattc_evt.params.read_rsp; + + if (p_response->handle == p_bas_c->peer_bas_db.bl_handle) + { + ble_bas_c_evt_t evt; + + evt.conn_handle = p_ble_evt->evt.gattc_evt.conn_handle; + evt.evt_type = BLE_BAS_C_EVT_BATT_READ_RESP; + + evt.params.battery_level = p_response->data[0]; + + p_bas_c->evt_handler(p_bas_c, &evt); + } + // Check if there is any buffered transmissions and send them. + tx_buffer_process(); +} + + +/**@brief Function for handling Handle Value Notification received from the SoftDevice. + * + * @details This function will handle the Handle Value Notification received from the SoftDevice + * and checks if it is a notification of the Battery Level measurement from the peer. If + * so, this function will decode the battery level measurement and send it to the + * application. + * + * @param[in] p_ble_bas_c Pointer to the Battery Service Client structure. + * @param[in] p_ble_evt Pointer to the BLE event received. + */ +static void on_hvx(ble_bas_c_t * p_ble_bas_c, const ble_evt_t * p_ble_evt) +{ + // Check if the event if on the link for this instance + if (p_ble_bas_c->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) + { + return; + } + // Check if this notification is a battery level notification. + if (p_ble_evt->evt.gattc_evt.params.hvx.handle == p_ble_bas_c->peer_bas_db.bl_handle) + { + if (p_ble_evt->evt.gattc_evt.params.hvx.len == 1) + { + ble_bas_c_evt_t ble_bas_c_evt; + ble_bas_c_evt.conn_handle = p_ble_evt->evt.gattc_evt.conn_handle; + ble_bas_c_evt.evt_type = BLE_BAS_C_EVT_BATT_NOTIFICATION; + + ble_bas_c_evt.params.battery_level = p_ble_evt->evt.gattc_evt.params.hvx.data[0]; + + p_ble_bas_c->evt_handler(p_ble_bas_c, &ble_bas_c_evt); + } + } +} + + +void ble_bas_on_db_disc_evt(ble_bas_c_t * p_ble_bas_c, const ble_db_discovery_evt_t * p_evt) +{ + // Check if the Battery Service was discovered. + if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE + && + p_evt->params.discovered_db.srv_uuid.uuid == BLE_UUID_BATTERY_SERVICE + && + p_evt->params.discovered_db.srv_uuid.type == BLE_UUID_TYPE_BLE) + { + // Find the CCCD Handle of the Battery Level characteristic. + uint8_t i; + + ble_bas_c_evt_t evt; + evt.evt_type = BLE_BAS_C_EVT_DISCOVERY_COMPLETE; + evt.conn_handle = p_evt->conn_handle; + for (i = 0; i < p_evt->params.discovered_db.char_count; i++) + { + if (p_evt->params.discovered_db.charateristics[i].characteristic.uuid.uuid == + BLE_UUID_BATTERY_LEVEL_CHAR) + { + // Found Battery Level characteristic. Store CCCD handle and break. + evt.params.bas_db.bl_cccd_handle = + p_evt->params.discovered_db.charateristics[i].cccd_handle; + evt.params.bas_db.bl_handle = + p_evt->params.discovered_db.charateristics[i].characteristic.handle_value; + break; + } + } + + LOG("[BAS_C]: Battery Service discovered at peer.\r\n"); + + //If the instance has been assigned prior to db_discovery, assign the db_handles + if(p_ble_bas_c->conn_handle != BLE_CONN_HANDLE_INVALID) + { + if ((p_ble_bas_c->peer_bas_db.bl_cccd_handle == BLE_GATT_HANDLE_INVALID)&& + (p_ble_bas_c->peer_bas_db.bl_handle == BLE_GATT_HANDLE_INVALID)) + { + p_ble_bas_c->peer_bas_db = evt.params.bas_db; + } + } + p_ble_bas_c->evt_handler(p_ble_bas_c, &evt); + } + else + { + LOG("[BAS_C]: Battery Service discovery failure at peer. \r\n"); + } +} + + +/**@brief Function for creating a message for writing to the CCCD. + */ +static uint32_t cccd_configure(uint16_t conn_handle, uint16_t handle_cccd, bool notification_enable) +{ + LOG("[BAS_C]: Configuring CCCD. CCCD Handle = %d, Connection Handle = %d\r\n", + handle_cccd,conn_handle); + + tx_message_t * p_msg; + uint16_t cccd_val = notification_enable ? BLE_GATT_HVX_NOTIFICATION : 0; + + p_msg = &m_tx_buffer[m_tx_insert_index++]; + m_tx_insert_index &= TX_BUFFER_MASK; + + p_msg->req.write_req.gattc_params.handle = handle_cccd; + p_msg->req.write_req.gattc_params.len = WRITE_MESSAGE_LENGTH; + p_msg->req.write_req.gattc_params.p_value = p_msg->req.write_req.gattc_value; + p_msg->req.write_req.gattc_params.offset = 0; + p_msg->req.write_req.gattc_params.write_op = BLE_GATT_OP_WRITE_REQ; + p_msg->req.write_req.gattc_value[0] = LSB_16(cccd_val); + p_msg->req.write_req.gattc_value[1] = MSB_16(cccd_val); + p_msg->conn_handle = conn_handle; + p_msg->type = WRITE_REQ; + + tx_buffer_process(); + return NRF_SUCCESS; +} + + +uint32_t ble_bas_c_init(ble_bas_c_t * p_ble_bas_c, ble_bas_c_init_t * p_ble_bas_c_init) +{ + VERIFY_PARAM_NOT_NULL(p_ble_bas_c); + VERIFY_PARAM_NOT_NULL(p_ble_bas_c_init); + + ble_uuid_t bas_uuid; + + bas_uuid.type = BLE_UUID_TYPE_BLE; + bas_uuid.uuid = BLE_UUID_BATTERY_SERVICE; + + p_ble_bas_c->conn_handle = BLE_CONN_HANDLE_INVALID; + p_ble_bas_c->peer_bas_db.bl_cccd_handle = BLE_GATT_HANDLE_INVALID; + p_ble_bas_c->peer_bas_db.bl_handle = BLE_GATT_HANDLE_INVALID; + p_ble_bas_c->evt_handler = p_ble_bas_c_init->evt_handler; + + return ble_db_discovery_evt_register(&bas_uuid); +} + + +/**@brief Function for handling Disconnected event received from the SoftDevice. + * + * @details This function check if the disconnect event is happening on the link + * associated with the current instance of the module, if so it will set its + * conn_handle to invalid. + * + * @param[in] p_ble_bas_c Pointer to the Battery Service Client structure. + * @param[in] p_ble_evt Pointer to the BLE event received. + */ +static void on_disconnected(ble_bas_c_t * p_ble_bas_c, const ble_evt_t * p_ble_evt) +{ + if (p_ble_bas_c->conn_handle == p_ble_evt->evt.gap_evt.conn_handle) + { + p_ble_bas_c->conn_handle = BLE_CONN_HANDLE_INVALID; + p_ble_bas_c->peer_bas_db.bl_cccd_handle = BLE_GATT_HANDLE_INVALID; + p_ble_bas_c->peer_bas_db.bl_handle = BLE_GATT_HANDLE_INVALID; + } +} + + +void ble_bas_c_on_ble_evt(ble_bas_c_t * p_ble_bas_c, const ble_evt_t * p_ble_evt) +{ + if ((p_ble_bas_c == NULL) || (p_ble_evt == NULL)) + { + return; + } + + switch (p_ble_evt->header.evt_id) + { + case BLE_GATTC_EVT_HVX: + on_hvx(p_ble_bas_c, p_ble_evt); + break; + + case BLE_GATTC_EVT_WRITE_RSP: + on_write_rsp(p_ble_bas_c, p_ble_evt); + break; + + case BLE_GATTC_EVT_READ_RSP: + on_read_rsp(p_ble_bas_c, p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + on_disconnected(p_ble_bas_c, p_ble_evt); + break; + + default: + break; + } +} + + +uint32_t ble_bas_c_bl_notif_enable(ble_bas_c_t * p_ble_bas_c) +{ + VERIFY_PARAM_NOT_NULL(p_ble_bas_c); + + if (p_ble_bas_c->conn_handle == BLE_CONN_HANDLE_INVALID) + { + return NRF_ERROR_INVALID_STATE; + } + + return cccd_configure(p_ble_bas_c->conn_handle, p_ble_bas_c->peer_bas_db.bl_cccd_handle, true); +} + + +uint32_t ble_bas_c_bl_read(ble_bas_c_t * p_ble_bas_c) +{ + VERIFY_PARAM_NOT_NULL(p_ble_bas_c); + if (p_ble_bas_c->conn_handle == BLE_CONN_HANDLE_INVALID) + { + return NRF_ERROR_INVALID_STATE; + } + + tx_message_t * msg; + + msg = &m_tx_buffer[m_tx_insert_index++]; + m_tx_insert_index &= TX_BUFFER_MASK; + + msg->req.read_handle = p_ble_bas_c->peer_bas_db.bl_handle; + msg->conn_handle = p_ble_bas_c->conn_handle; + msg->type = READ_REQ; + + tx_buffer_process(); + return NRF_SUCCESS; +} + + +uint32_t ble_bas_c_handles_assign(ble_bas_c_t * p_ble_bas_c, + uint16_t conn_handle, + ble_bas_c_db_t * p_peer_handles) +{ + VERIFY_PARAM_NOT_NULL(p_ble_bas_c); + + p_ble_bas_c->conn_handle = conn_handle; + if (p_peer_handles != NULL) + { + p_ble_bas_c->peer_bas_db = *p_peer_handles; + } + return NRF_SUCCESS; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas_c/ble_bas_c.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas_c/ble_bas_c.h new file mode 100644 index 0000000000..d56fa1febf --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas_c/ble_bas_c.h @@ -0,0 +1,212 @@ +/* + * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is confidential property of Nordic Semiconductor. The use, + * copying, transfer or disclosure of such information is prohibited except by express written + * agreement with Nordic Semiconductor. + * + */ + +/**@file + * + * @defgroup ble_sdk_srv_bas_c Battery Service Client + * @{ + * @ingroup ble_sdk_srv + * @brief Battery Service Client module. + * + * @details This module contains APIs to read and interact with the Battery Service of a remote + * device. + * + * @note The application must propagate BLE stack events to this module by calling + * ble_hrs_c_on_ble_evt(). + * + */ + +#ifndef BLE_BAS_C_H__ +#define BLE_BAS_C_H__ + +#include +#include "ble.h" +#include "ble_db_discovery.h" + +/** + * @defgroup bas_c_enums Enumerations + * @{ + */ + +/**@brief Battery Service Client event type. */ +typedef enum +{ + BLE_BAS_C_EVT_DISCOVERY_COMPLETE, /**< Event indicating that the Battery Service has been discovered at the peer. */ + BLE_BAS_C_EVT_BATT_NOTIFICATION, /**< Event indicating that a notification of the Battery Level characteristic has been received from the peer. */ + BLE_BAS_C_EVT_BATT_READ_RESP /**< Event indicating that a read response on Battery Level characteristic has been received from peer. */ +} ble_bas_c_evt_type_t; + +/** @} */ + +/** + * @defgroup bas_c_structs Structures + * @{ + */ + + +/**@brief Structure containing the handles related to the Battery Service found on the peer. */ +typedef struct +{ + uint16_t bl_cccd_handle; /**< Handle of the CCCD of the Battery Level characteristic. */ + uint16_t bl_handle; /**< Handle of the Battery Level characteristic as provided by the SoftDevice. */ +} ble_bas_c_db_t; + +/**@brief Battery Service Client Event structure. */ +typedef struct +{ + ble_bas_c_evt_type_t evt_type; /**< Event Type. */ + uint16_t conn_handle; /**< Connection handle relevent to this event.*/ + union + { + ble_bas_c_db_t bas_db; /**< Battery Service related handles found on the peer device. This will be filled if the evt_type is @ref BLE_BAS_C_EVT_DISCOVERY_COMPLETE.*/ + uint8_t battery_level; /**< Battery level received from peer. This field will be used for the events @ref BLE_BAS_C_EVT_BATT_NOTIFICATION and @ref BLE_BAS_C_EVT_BATT_READ_RESP.*/ + } params; +} ble_bas_c_evt_t; + +/** @} */ + +/** + * @defgroup bas_c_types Types + * @{ + */ + +// Forward declaration of the ble_bas_t type. +typedef struct ble_bas_c_s ble_bas_c_t; + +/**@brief Event handler type. + * + * @details This is the type of the event handler that should be provided by the application + * of this module in order to receive events. + */ +typedef void (* ble_bas_c_evt_handler_t) (ble_bas_c_t * p_bas_bas_c, ble_bas_c_evt_t * p_evt); + +/** @} */ + +/** + * @addtogroup bas_c_structs + * @{ + */ + +/**@brief Battery Service Client structure. + + */ +struct ble_bas_c_s +{ + uint16_t conn_handle; /**< Connection handle as provided by the SoftDevice. */ + ble_bas_c_db_t peer_bas_db; /**< Handles related to BAS on the peer*/ + ble_bas_c_evt_handler_t evt_handler; /**< Application event handler to be called when there is an event related to the Battery service. */ +}; + +/**@brief Battery Service Client initialization structure. + */ +typedef struct +{ + ble_bas_c_evt_handler_t evt_handler; /**< Event handler to be called by the Battery Service Client module whenever there is an event related to the Battery Service. */ +} ble_bas_c_init_t; + +/** @} */ + +/** + * @defgroup bas_c_functions Functions + * @{ + */ + +/**@brief Function for initializing the Battery Service Client module. + * + * @details This function will initialize the module and set up Database Discovery to discover + * the Battery Service. After calling this function, call @ref ble_db_discovery_start + * to start discovery once a link with a peer has been established. + * + * @param[out] p_ble_bas_c Pointer to the Battery Service client structure. + * @param[in] p_ble_bas_c_init Pointer to the Battery Service initialization structure containing + * the initialization information. + * + * @retval NRF_SUCCESS Operation success. + * @retval NRF_ERROR_NULL A parameter is NULL. + * Otherwise, an error code returned by @ref ble_db_discovery_evt_register. + */ +uint32_t ble_bas_c_init(ble_bas_c_t * p_ble_bas_c, ble_bas_c_init_t * p_ble_bas_c_init); + + +/**@brief Function for handling BLE events from the SoftDevice. + * + * @details This function will handle the BLE events received from the SoftDevice. If the BLE + * event is relevant for the Battery Service Client module, then it is used to update + * interval variables and, if necessary, send events to the application. + * + * @note This function must be called by the application. + * + * @param[in] p_ble_bas_c Pointer to the Battery Service client structure. + * @param[in] p_ble_evt Pointer to the BLE event. + */ +void ble_bas_c_on_ble_evt(ble_bas_c_t * p_ble_bas_c, const ble_evt_t * p_ble_evt); + + +/**@brief Function for enabling notifications on the Battery Level characteristic. + * + * @details This function will enable to notification of the Battery Level characteristic at the + * peer by writing to the CCCD of the Battery Level Characteristic. + * + * @param p_ble_bas_c Pointer to the Battery Service client structure. + * + * @retval NRF_SUCCESS If the SoftDevice has been requested to write to the CCCD of the peer. + * NRF_ERROR_NULL Parameter is NULL. + * Otherwise, an error code returned by the SoftDevice API @ref + * sd_ble_gattc_write. + */ +uint32_t ble_bas_c_bl_notif_enable(ble_bas_c_t * p_ble_bas_c); + + +/**@brief Function for reading the Battery Level characteristic. + * + * @param p_ble_bas_c Pointer to the Battery Service client structure. + * + * @retval NRF_SUCCESS If the read request was successfully queued to be sent to peer. + */ +uint32_t ble_bas_c_bl_read(ble_bas_c_t * p_ble_bas_c); + + +/**@brief Function for handling events from the database discovery module. + * + * @details Call this function when getting a callback event from the DB discovery modue. + * This function will handle an event from the database discovery module, and determine + * if it relates to the discovery of Battery service at the peer. If so, it will + * call the application's event handler indicating that the Battery service has been + * discovered at the peer. It also populates the event with the service related + * information before providing it to the application. + * + * @param p_ble_bas_c Pointer to the Battery Service client structure. + * @param[in] p_evt Pointer to the event received from the database discovery module. + * + */ +void ble_bas_on_db_disc_evt(ble_bas_c_t * p_ble_bas_c, const ble_db_discovery_evt_t * p_evt); + + +/**@brief Function for assigning handles to a this instance of bas_c. + * + * @details Call this function when a link has been established with a peer to + * associate this link to this instance of the module. This makes it + * possible to handle several link and associate each link to a particular + * instance of this module. The connection handle and attribute handles will be + * provided from the discovery event @ref BLE_BAS_C_EVT_DISCOVERY_COMPLETE. + * + * @param[in] p_ble_bas_c Pointer to the Battery client structure instance to associate. + * @param[in] conn_handle Connection handle to associated with the given Battery Client Instance. + * @param[in] p_peer_handles Attribute handles on the BAS server you want this BAS client to + * interact with. + */ +uint32_t ble_bas_c_handles_assign(ble_bas_c_t * p_ble_bas_c, + uint16_t conn_handle, + ble_bas_c_db_t * p_peer_handles); + +/** @} */ // End tag for Function group. + +#endif // BLE_BAS_C_H__ + +/** @} */ // End tag for the file. diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bps/ble_bps.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bps/ble_bps.c new file mode 100644 index 0000000000..a3b89ade1a --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bps/ble_bps.c @@ -0,0 +1,439 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/* Attention! +* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile +* qualification listings, this section of source code must not be modified. +*/ + +#include "ble_bps.h" +#include +#include "nordic_common.h" +#include "ble_l2cap.h" +#include "ble_srv_common.h" +#include "app_util.h" + + +#define OPCODE_LENGTH 1 /**< Length of opcode inside Blood Pressure Measurement packet. */ +#define HANDLE_LENGTH 2 /**< Length of handle inside Blood Pressure Measurement packet. */ +#define MAX_BPM_LEN (BLE_L2CAP_MTU_DEF - OPCODE_LENGTH - HANDLE_LENGTH) /**< Maximum size of a transmitted Blood Pressure Measurement. */ + +// Blood Pressure Measurement Flags bits +#define BPS_MEAS_BLOOD_PRESSURE_UNITS_FLAG_BIT (0x01 << 0) /**< Blood Pressure Units Flag bit. */ +#define BPS_MEAS_TIME_STAMP_FLAG_BIT (0x01 << 1) /**< Time Stamp Flag bit. */ +#define BPS_MEAS_PULSE_RATE_FLAG_BIT (0x01 << 2) /**< Pulse Rate Flag bit. */ +#define BPS_MEAS_USER_ID_FLAG_BIT (0x01 << 3) /**< User ID Flag bit. */ +#define BPS_MEAS_MEASUREMENT_STATUS_FLAG_BIT (0x01 << 4) /**< Measurement Status Flag bit. */ + + +/**@brief Function for handling the Connect event. + * + * @param[in] p_bps Blood Pressure Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_connect(ble_bps_t * p_bps, ble_evt_t * p_ble_evt) +{ + p_bps->conn_handle = p_ble_evt->evt.gatts_evt.conn_handle; +} + + +/**@brief Function for handling the Disconnect event. + * + * @param[in] p_bps Blood Pressure Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_disconnect(ble_bps_t * p_bps, ble_evt_t * p_ble_evt) +{ + UNUSED_PARAMETER(p_ble_evt); + p_bps->conn_handle = BLE_CONN_HANDLE_INVALID; +} + + +/**@brief Function for handling the write events to the Blood Pressure Measurement characteristic. + * + * @param[in] p_bps Blood Pressure Service structure. + * @param[in] p_evt_write Write event received from the BLE stack. + */ +static void on_cccd_write(ble_bps_t * p_bps, ble_gatts_evt_write_t * p_evt_write) +{ + if (p_evt_write->len == 2) + { + // CCCD written, update indication state + if (p_bps->evt_handler != NULL) + { + ble_bps_evt_t evt; + + if (ble_srv_is_indication_enabled(p_evt_write->data)) + { + evt.evt_type = BLE_BPS_EVT_INDICATION_ENABLED; + } + else + { + evt.evt_type = BLE_BPS_EVT_INDICATION_DISABLED; + } + + p_bps->evt_handler(p_bps, &evt); + } + } +} + + +/**@brief Function for handling the Write event. + * + * @param[in] p_bps Blood Pressure Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_write(ble_bps_t * p_bps, ble_evt_t * p_ble_evt) +{ + ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; + + if (p_evt_write->handle == p_bps->meas_handles.cccd_handle) + { + on_cccd_write(p_bps, p_evt_write); + } +} + + +/**@brief Function for handling the HVC event. + * + * @details Handles HVC events from the BLE stack. + * + * @param[in] p_bps Blood Pressure Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_hvc(ble_bps_t * p_bps, ble_evt_t * p_ble_evt) +{ + ble_gatts_evt_hvc_t * p_hvc = &p_ble_evt->evt.gatts_evt.params.hvc; + + if (p_hvc->handle == p_bps->meas_handles.value_handle) + { + ble_bps_evt_t evt; + + evt.evt_type = BLE_BPS_EVT_INDICATION_CONFIRMED; + p_bps->evt_handler(p_bps, &evt); + } +} + + +void ble_bps_on_ble_evt(ble_bps_t * p_bps, ble_evt_t * p_ble_evt) +{ + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + on_connect(p_bps, p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + on_disconnect(p_bps, p_ble_evt); + break; + + case BLE_GATTS_EVT_WRITE: + on_write(p_bps, p_ble_evt); + break; + + case BLE_GATTS_EVT_HVC: + on_hvc(p_bps, p_ble_evt); + break; + + default: + // No implementation needed. + break; + } +} + + +/**@brief Function for encoding a Blood Pressure Measurement. + * + * @param[in] p_bps Blood Pressure Service structure. + * @param[in] p_bps_meas Measurement to be encoded. + * @param[out] p_encoded_buffer Buffer where the encoded data will be written. + * + * @return Size of encoded data. + */ +static uint8_t bps_measurement_encode(ble_bps_t * p_bps, + ble_bps_meas_t * p_bps_meas, + uint8_t * p_encoded_buffer) +{ + uint8_t flags = 0; + uint8_t len = 1; + uint16_t encoded_sfloat; + + // Set measurement units flag + if (p_bps_meas->blood_pressure_units_in_kpa) + { + flags |= BPS_MEAS_BLOOD_PRESSURE_UNITS_FLAG_BIT; + } + + // Blood Pressure Measurement - Systolic + encoded_sfloat = ((p_bps_meas->blood_pressure_systolic.exponent << 12) & 0xF000) | + ((p_bps_meas->blood_pressure_systolic.mantissa << 0) & 0x0FFF); + len += uint16_encode(encoded_sfloat, &p_encoded_buffer[len]); + + // Blood Pressure Measurement - Diastolic + encoded_sfloat = ((p_bps_meas->blood_pressure_diastolic.exponent << 12) & 0xF000) | + ((p_bps_meas->blood_pressure_diastolic.mantissa << 0) & 0x0FFF); + len += uint16_encode(encoded_sfloat, &p_encoded_buffer[len]); + + // Blood Pressure Measurement - Mean Arterial Pressure + encoded_sfloat = ((p_bps_meas->mean_arterial_pressure.exponent << 12) & 0xF000) | + ((p_bps_meas->mean_arterial_pressure.mantissa << 0) & 0x0FFF); + len += uint16_encode(encoded_sfloat, &p_encoded_buffer[len]); + + // Time Stamp field + if (p_bps_meas->time_stamp_present) + { + flags |= BPS_MEAS_TIME_STAMP_FLAG_BIT; + len += ble_date_time_encode(&p_bps_meas->time_stamp, &p_encoded_buffer[len]); + } + + // Pulse Rate + if (p_bps_meas->pulse_rate_present) + { + flags |= BPS_MEAS_PULSE_RATE_FLAG_BIT; + + encoded_sfloat = ((p_bps_meas->pulse_rate.exponent << 12) & 0xF000) | + ((p_bps_meas->pulse_rate.mantissa << 0) & 0x0FFF); + len += uint16_encode(encoded_sfloat, &p_encoded_buffer[len]); + } + + // User ID + if (p_bps_meas->user_id_present) + { + flags |= BPS_MEAS_USER_ID_FLAG_BIT; + p_encoded_buffer[len++] = p_bps_meas->user_id; + } + + // Measurement Status + if (p_bps_meas->measurement_status_present) + { + flags |= BPS_MEAS_MEASUREMENT_STATUS_FLAG_BIT; + len += uint16_encode(p_bps_meas->measurement_status, &p_encoded_buffer[len]); + } + + // Flags field + p_encoded_buffer[0] = flags; + + return len; +} + + +/**@brief Function for adding Blood Pressure Measurement characteristics. + * + * @param[in] p_bps Blood Pressure Service structure. + * @param[in] p_bps_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t bps_measurement_char_add(ble_bps_t * p_bps, const ble_bps_init_t * p_bps_init) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_md_t cccd_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + ble_bps_meas_t initial_bpm; + uint8_t encoded_bpm[MAX_BPM_LEN]; + + memset(&cccd_md, 0, sizeof(cccd_md)); + + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); + cccd_md.vloc = BLE_GATTS_VLOC_STACK; + cccd_md.write_perm = p_bps_init->bps_meas_attr_md.cccd_write_perm; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.indicate = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = &cccd_md; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_BLOOD_PRESSURE_MEASUREMENT_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.read_perm = p_bps_init->bps_meas_attr_md.read_perm; + attr_md.write_perm = p_bps_init->bps_meas_attr_md.write_perm; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 1; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + memset(&initial_bpm, 0, sizeof(initial_bpm)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = bps_measurement_encode(p_bps, &initial_bpm, encoded_bpm); + attr_char_value.init_offs = 0; + attr_char_value.max_len = MAX_BPM_LEN; + attr_char_value.p_value = encoded_bpm; + + return sd_ble_gatts_characteristic_add(p_bps->service_handle, + &char_md, + &attr_char_value, + &p_bps->meas_handles); +} + + +/**@brief Function for adding Blood Pressure Feature characteristics. + * + * @param[in] p_bps Blood Pressure Service structure. + * @param[in] p_bps_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t bps_feature_char_add(ble_bps_t * p_bps, const ble_bps_init_t * p_bps_init) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + uint8_t init_value_encoded[2]; + uint8_t init_value_len; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.read = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = NULL; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_BLOOD_PRESSURE_FEATURE_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.read_perm = p_bps_init->bps_feature_attr_md.read_perm; + attr_md.write_perm = p_bps_init->bps_feature_attr_md.write_perm; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + init_value_len = uint16_encode(p_bps_init->feature, init_value_encoded); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = init_value_len; + attr_char_value.init_offs = 0; + attr_char_value.max_len = init_value_len; + attr_char_value.p_value = init_value_encoded; + + return sd_ble_gatts_characteristic_add(p_bps->service_handle, + &char_md, + &attr_char_value, + &p_bps->feature_handles); +} + + +uint32_t ble_bps_init(ble_bps_t * p_bps, const ble_bps_init_t * p_bps_init) +{ + uint32_t err_code; + ble_uuid_t ble_uuid; + + // Initialize service structure + p_bps->evt_handler = p_bps_init->evt_handler; + p_bps->conn_handle = BLE_CONN_HANDLE_INVALID; + p_bps->feature = p_bps_init->feature; + + // Add service + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_BLOOD_PRESSURE_SERVICE); + + err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &ble_uuid, &p_bps->service_handle); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add measurement characteristic + err_code = bps_measurement_char_add(p_bps, p_bps_init); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add feature characteristic + err_code = bps_feature_char_add(p_bps, p_bps_init); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + return NRF_SUCCESS; +} + + +uint32_t ble_bps_measurement_send(ble_bps_t * p_bps, ble_bps_meas_t * p_bps_meas) +{ + uint32_t err_code; + + // Send value if connected + if (p_bps->conn_handle != BLE_CONN_HANDLE_INVALID) + { + uint8_t encoded_bps_meas[MAX_BPM_LEN]; + uint16_t len; + uint16_t hvx_len; + ble_gatts_hvx_params_t hvx_params; + + len = bps_measurement_encode(p_bps, p_bps_meas, encoded_bps_meas); + hvx_len = len; + + memset(&hvx_params, 0, sizeof(hvx_params)); + + hvx_params.handle = p_bps->meas_handles.value_handle; + hvx_params.type = BLE_GATT_HVX_INDICATION; + hvx_params.offset = 0; + hvx_params.p_len = &hvx_len; + hvx_params.p_data = encoded_bps_meas; + + err_code = sd_ble_gatts_hvx(p_bps->conn_handle, &hvx_params); + if ((err_code == NRF_SUCCESS) && (hvx_len != len)) + { + err_code = NRF_ERROR_DATA_SIZE; + } + } + else + { + err_code = NRF_ERROR_INVALID_STATE; + } + + return err_code; +} + + +uint32_t ble_bps_is_indication_enabled(ble_bps_t * p_bps, bool * p_indication_enabled) +{ + uint32_t err_code; + uint8_t cccd_value_buf[BLE_CCCD_VALUE_LEN]; + ble_gatts_value_t gatts_value; + + // Initialize value struct. + memset(&gatts_value, 0, sizeof(gatts_value)); + + gatts_value.len = BLE_CCCD_VALUE_LEN; + gatts_value.offset = 0; + gatts_value.p_value = cccd_value_buf; + + err_code = sd_ble_gatts_value_get(p_bps->conn_handle, + p_bps->meas_handles.cccd_handle, + &gatts_value); + if (err_code == NRF_SUCCESS) + { + *p_indication_enabled = ble_srv_is_indication_enabled(cccd_value_buf); + } + return err_code; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bps/ble_bps.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bps/ble_bps.h new file mode 100644 index 0000000000..04404e6ce0 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bps/ble_bps.h @@ -0,0 +1,161 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + */ + +/** @file + * + * @defgroup ble_sdk_srv_bps Blood Pressure Service + * @{ + * @ingroup ble_sdk_srv + * @brief Blood Pressure Service module. + * + * @details This module implements the Blood Pressure Service. + * + * If an event handler is supplied by the application, the Blood Pressure + * Service will generate Blood Pressure Service events to the application. + * + * @note The application must propagate BLE stack events to the Blood Pressure Service + * module by calling ble_bps_on_ble_evt() from the @ref softdevice_handler function. + * + * @note Attention! + * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile + * qualification listings, this section of source code must not be modified. + */ + +#ifndef BLE_BPS_H__ +#define BLE_BPS_H__ + +#include +#include +#include "ble.h" +#include "ble_srv_common.h" +#include "ble_date_time.h" + +// Blood Pressure Feature bits +#define BLE_BPS_FEATURE_BODY_MOVEMENT_BIT (0x01 << 0) /**< Body Movement Detection Support bit. */ +#define BLE_BPS_FEATURE_CUFF_FIT_BIT (0x01 << 1) /**< Cuff Fit Detection Support bit. */ +#define BLE_BPS_FEATURE_IRREGULAR_PULSE_BIT (0x01 << 2) /**< Irregular Pulse Detection Support bit. */ +#define BLE_BPS_FEATURE_PULSE_RATE_RANGE_BIT (0x01 << 3) /**< Pulse Rate Range Detection Support bit. */ +#define BLE_BPS_FEATURE_MEASUREMENT_POSITION_BIT (0x01 << 4) /**< Measurement Position Detection Support bit. */ +#define BLE_BPS_FEATURE_MULTIPLE_BOND_BIT (0x01 << 5) /**< Multiple Bond Support bit. */ + +/**@brief Blood Pressure Service event type. */ +typedef enum +{ + BLE_BPS_EVT_INDICATION_ENABLED, /**< Blood Pressure value indication enabled event. */ + BLE_BPS_EVT_INDICATION_DISABLED, /**< Blood Pressure value indication disabled event. */ + BLE_BPS_EVT_INDICATION_CONFIRMED /**< Confirmation of a blood pressure measurement indication has been received. */ +} ble_bps_evt_type_t; + +/**@brief Blood Pressure Service event. */ +typedef struct +{ + ble_bps_evt_type_t evt_type; /**< Type of event. */ +} ble_bps_evt_t; + +// Forward declaration of the ble_bps_t type. +typedef struct ble_bps_s ble_bps_t; + +/**@brief Blood Pressure Service event handler type. */ +typedef void (*ble_bps_evt_handler_t) (ble_bps_t * p_bps, ble_bps_evt_t * p_evt); + +/**@brief SFLOAT format (IEEE-11073 16-bit FLOAT, defined as a 16-bit vlue with 12-bit mantissa and + * 4-bit exponent. */ +typedef struct +{ + int8_t exponent; /**< Base 10 exponent, only 4 bits */ + int16_t mantissa; /**< Mantissa, only 12 bits */ +} ieee_float16_t; + +/**@brief Blood Pressure Service init structure. This contains all options and data + * needed for initialization of the service. */ +typedef struct +{ + ble_bps_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Blood Pressure Service. */ + ble_srv_cccd_security_mode_t bps_meas_attr_md; /**< Initial security level for blood pressure measurement attribute */ + ble_srv_security_mode_t bps_feature_attr_md; /**< Initial security level for blood pressure feature attribute */ + uint16_t feature; /**< Initial value for blood pressure feature */ +} ble_bps_init_t; + +/**@brief Blood Pressure Service structure. This contains various status information for + * the service. */ +struct ble_bps_s +{ + ble_bps_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Blood Pressure Service. */ + uint16_t service_handle; /**< Handle of Blood Pressure Service (as provided by the BLE stack). */ + ble_gatts_char_handles_t meas_handles; /**< Handles related to the Blood Pressure Measurement characteristic. */ + ble_gatts_char_handles_t feature_handles; /**< Handles related to the Blood Pressure Feature characteristic. */ + uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ + uint16_t feature; /**< Value of Blood Pressure feature. */ +}; + +/**@brief Blood Pressure Service measurement structure. This contains a Blood Pressure + * measurement. */ +typedef struct ble_bps_meas_s +{ + bool blood_pressure_units_in_kpa; /**< Blood Pressure Units Flag, 0=mmHg, 1=kPa */ + bool time_stamp_present; /**< Time Stamp Flag, 0=not present, 1=present. */ + bool pulse_rate_present; /**< Pulse Rate Flag, 0=not present, 1=present. */ + bool user_id_present; /**< User ID Flag, 0=not present, 1=present. */ + bool measurement_status_present; /**< Measurement Status Flag, 0=not present, 1=present. */ + ieee_float16_t blood_pressure_systolic; /**< Blood Pressure Measurement Compound Value - Systolic. */ + ieee_float16_t blood_pressure_diastolic; /**< Blood Pressure Measurement Compound Value - Diastolic . */ + ieee_float16_t mean_arterial_pressure; /**< Blood Pressure Measurement Compound Value - Mean Arterial Pressure. */ + ble_date_time_t time_stamp; /**< Time Stamp. */ + ieee_float16_t pulse_rate; /**< Pulse Rate. */ + uint8_t user_id; /**< User ID. */ + uint16_t measurement_status; /**< Measurement Status. */ +} ble_bps_meas_t; + +/**@brief Function for initializing the Blood Pressure Service. + * + * @param[out] p_bps Blood Pressure Service structure. This structure will have to + * be supplied by the application. It will be initialized by this function, + * and will later be used to identify this particular service instance. + * @param[in] p_bps_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. + */ +uint32_t ble_bps_init(ble_bps_t * p_bps, const ble_bps_init_t * p_bps_init); + +/**@brief Function for handling the Application's BLE Stack events. + * + * @details Handles all events from the BLE stack of interest to the Blood Pressure Service. + * + * @param[in] p_bps Blood Pressure Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +void ble_bps_on_ble_evt(ble_bps_t * p_bps, ble_evt_t * p_ble_evt); + +/**@brief Function for sending blood pressure measurement if indication has been enabled. + * + * @details The application calls this function after having performed a Blood Pressure + * measurement. If indication has been enabled, the measurement data is encoded and + * sent to the client. + * + * @param[in] p_bps Blood Pressure Service structure. + * @param[in] p_bps_meas Pointer to new blood pressure measurement. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +uint32_t ble_bps_measurement_send(ble_bps_t * p_bps, ble_bps_meas_t * p_bps_meas); + +/**@brief Function for checking if indication of Blood Pressure Measurement is currently enabled. + * + * @param[in] p_bps Blood Pressure Service structure. + * @param[out] p_indication_enabled TRUE if indication is enabled, FALSE otherwise. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +uint32_t ble_bps_is_indication_enabled(ble_bps_t * p_bps, bool * p_indication_enabled); + +#endif // BLE_BPS_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_cscs.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_cscs.c new file mode 100644 index 0000000000..490c891af1 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_cscs.c @@ -0,0 +1,443 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/* Attention! +* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile +* qualification listings, this section of source code must not be modified. +*/ + +#include "ble_cscs.h" +#include +#include "nordic_common.h" +#include "ble_l2cap.h" +#include "ble_srv_common.h" +#include "app_util.h" + +#define OPCODE_LENGTH 1 /**< Length of opcode inside Cycling Speed and Cadence Measurement packet. */ +#define HANDLE_LENGTH 2 /**< Length of handle inside Cycling Speed and Cadence Measurement packet. */ +#define MAX_CSCM_LEN (BLE_L2CAP_MTU_DEF - OPCODE_LENGTH - HANDLE_LENGTH) /**< Maximum size of a transmitted Cycling Speed and Cadence Measurement. */ + +// Cycling Speed and Cadence Measurement flag bits +#define CSC_MEAS_FLAG_MASK_WHEEL_REV_DATA_PRESENT (0x01 << 0) /**< Wheel revolution data present flag bit. */ +#define CSC_MEAS_FLAG_MASK_CRANK_REV_DATA_PRESENT (0x01 << 1) /**< Crank revolution data present flag bit. */ + + +/**@brief Function for handling the Connect event. + * + * @param[in] p_cscs Cycling Speed and Cadence Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_connect(ble_cscs_t * p_cscs, ble_evt_t * p_ble_evt) +{ + p_cscs->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; +} + + +/**@brief Function for handling the Disconnect event. + * + * @param[in] p_cscs Cycling Speed and Cadence Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_disconnect(ble_cscs_t * p_cscs, ble_evt_t * p_ble_evt) +{ + UNUSED_PARAMETER(p_ble_evt); + p_cscs->conn_handle = BLE_CONN_HANDLE_INVALID; +} + + +/**@brief Function for handling write events to the CSCS Measurement characteristic. + * + * @param[in] p_cscs Cycling Speed and Cadence Service structure. + * @param[in] p_evt_write Write event received from the BLE stack. + */ +static void on_meas_cccd_write(ble_cscs_t * p_cscs, ble_gatts_evt_write_t * p_evt_write) +{ + if (p_evt_write->len == 2) + { + // CCCD written, update notification state + if (p_cscs->evt_handler != NULL) + { + ble_cscs_evt_t evt; + + if (ble_srv_is_notification_enabled(p_evt_write->data)) + { + evt.evt_type = BLE_CSCS_EVT_NOTIFICATION_ENABLED; + } + else + { + evt.evt_type = BLE_CSCS_EVT_NOTIFICATION_DISABLED; + } + + p_cscs->evt_handler(p_cscs, &evt); + } + } +} + + +/**@brief Function for handling the Write event. + * + * @param[in] p_cscs Cycling Speed and Cadence Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_write(ble_cscs_t * p_cscs, ble_evt_t * p_ble_evt) +{ + ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; + + if (p_evt_write->handle == p_cscs->meas_handles.cccd_handle) + { + on_meas_cccd_write(p_cscs, p_evt_write); + } +} + + +void ble_cscs_on_ble_evt(ble_cscs_t * p_cscs, ble_evt_t * p_ble_evt) +{ + ble_sc_ctrlpt_on_ble_evt(&(p_cscs->ctrl_pt), p_ble_evt); + + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + on_connect(p_cscs, p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + on_disconnect(p_cscs, p_ble_evt); + break; + + case BLE_GATTS_EVT_WRITE: + on_write(p_cscs, p_ble_evt); + break; + + default: + // No implementation needed. + break; + } +} + + +/**@brief Function for encoding a CSCS Measurement. + * + * @param[in] p_cscs Cycling Speed and Cadence Service structure. + * @param[in] p_csc_measurement Measurement to be encoded. + * @param[out] p_encoded_buffer Buffer where the encoded data will be written. + * + * @return Size of encoded data. + */ +static uint8_t csc_measurement_encode(ble_cscs_t * p_cscs, + ble_cscs_meas_t * p_csc_measurement, + uint8_t * p_encoded_buffer) +{ + uint8_t flags = 0; + uint8_t len = 1; + + // Cumulative Wheel Revolutions and Last Wheel Event Time Fields + if (p_cscs->feature & BLE_CSCS_FEATURE_WHEEL_REV_BIT) + { + if (p_csc_measurement->is_wheel_rev_data_present) + { + flags |= CSC_MEAS_FLAG_MASK_WHEEL_REV_DATA_PRESENT; + len += uint32_encode(p_csc_measurement->cumulative_wheel_revs, &p_encoded_buffer[len]); + len += uint16_encode(p_csc_measurement->last_wheel_event_time, &p_encoded_buffer[len]); + } + } + + // Cumulative Crank Revolutions and Last Crank Event Time Fields + if (p_cscs->feature & BLE_CSCS_FEATURE_CRANK_REV_BIT) + { + if (p_csc_measurement->is_crank_rev_data_present) + { + flags |= CSC_MEAS_FLAG_MASK_CRANK_REV_DATA_PRESENT; + len += uint16_encode(p_csc_measurement->cumulative_crank_revs, &p_encoded_buffer[len]); + len += uint16_encode(p_csc_measurement->last_crank_event_time, &p_encoded_buffer[len]); + } + } + + // Flags Field + p_encoded_buffer[0] = flags; + + return len; +} + + +/**@brief Function for adding CSC Measurement characteristics. + * + * @param[in] p_cscs Cycling Speed and Cadence Service structure. + * @param[in] p_cscs_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t csc_measurement_char_add(ble_cscs_t * p_cscs, const ble_cscs_init_t * p_cscs_init) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_md_t cccd_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + ble_cscs_meas_t initial_scm; + uint8_t encoded_scm[MAX_CSCM_LEN]; + memset(&cccd_md, 0, sizeof(cccd_md)); + + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); + cccd_md.write_perm = p_cscs_init->csc_meas_attr_md.cccd_write_perm; + cccd_md.vloc = BLE_GATTS_VLOC_STACK; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.notify = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = &cccd_md; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_CSC_MEASUREMENT_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.read_perm ); + + BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.write_perm); + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 1; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = csc_measurement_encode(p_cscs, &initial_scm, encoded_scm); + attr_char_value.init_offs = 0; + attr_char_value.max_len = MAX_CSCM_LEN; + attr_char_value.p_value = encoded_scm; + + return sd_ble_gatts_characteristic_add(p_cscs->service_handle, + &char_md, + &attr_char_value, + &p_cscs->meas_handles); +} + + +/**@brief Function for adding CSC Feature characteristics. + * + * @param[in] p_cscs Cycling Speed and Cadence Service structure. + * @param[in] p_cscs_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t csc_feature_char_add(ble_cscs_t * p_cscs, const ble_cscs_init_t * p_cscs_init) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + uint8_t init_value_encoded[2]; + uint8_t init_value_len; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.read = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = NULL; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_CSC_FEATURE_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.read_perm = p_cscs_init->csc_feature_attr_md.read_perm; + + BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.write_perm); + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + init_value_len = uint16_encode(p_cscs_init->feature, &init_value_encoded[0]); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = init_value_len; + attr_char_value.init_offs = 0; + attr_char_value.max_len = init_value_len; + attr_char_value.p_value = init_value_encoded; + + return sd_ble_gatts_characteristic_add(p_cscs->service_handle, + &char_md, + &attr_char_value, + &p_cscs->feature_handles); +} + + +/**@brief Function for adding CSC Sensor Location characteristic. + * + * @param[in] p_cscs Cycling Speed and Cadence Service structure. + * @param[in] p_cscs_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t csc_sensor_loc_char_add(ble_cscs_t * p_cscs, const ble_cscs_init_t * p_cscs_init) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + uint8_t init_value_len; + uint8_t encoded_init_value[1]; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.read = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = NULL; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_SENSOR_LOCATION_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.read_perm = p_cscs_init->csc_sensor_loc_attr_md.read_perm; + BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.write_perm); + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + init_value_len = sizeof(uint8_t); + if (p_cscs_init->sensor_location != NULL) + { + encoded_init_value[0] = *p_cscs_init->sensor_location; + } + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = init_value_len; + attr_char_value.init_offs = 0; + attr_char_value.max_len = init_value_len; + attr_char_value.p_value = encoded_init_value; + + return sd_ble_gatts_characteristic_add(p_cscs->service_handle, + &char_md, + &attr_char_value, + &p_cscs->sensor_loc_handles); +} + + +uint32_t ble_cscs_init(ble_cscs_t * p_cscs, const ble_cscs_init_t * p_cscs_init) +{ + uint32_t err_code; + ble_uuid_t ble_uuid; + ble_cs_ctrlpt_init_t sc_ctrlpt_init; + + // Initialize service structure + p_cscs->evt_handler = p_cscs_init->evt_handler; + p_cscs->conn_handle = BLE_CONN_HANDLE_INVALID; + p_cscs->feature = p_cscs_init->feature; + + // Add service + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_CYCLING_SPEED_AND_CADENCE); + + err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, + &ble_uuid, + &p_cscs->service_handle); + + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add cycling speed and cadence measurement characteristic + err_code = csc_measurement_char_add(p_cscs, p_cscs_init); + + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add cycling speed and cadence feature characteristic + err_code = csc_feature_char_add(p_cscs, p_cscs_init); + + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add Sensor Location characteristic (optional) + if (p_cscs_init->sensor_location != NULL) + { + err_code = csc_sensor_loc_char_add(p_cscs, p_cscs_init); + + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + + + // Add speed and cadence control point characteristic + sc_ctrlpt_init.error_handler = p_cscs_init->error_handler; + sc_ctrlpt_init.size_list_supported_locations = p_cscs_init->size_list_supported_locations; + sc_ctrlpt_init.supported_functions = p_cscs_init->ctrplt_supported_functions; + sc_ctrlpt_init.evt_handler = p_cscs_init->ctrlpt_evt_handler; + sc_ctrlpt_init.list_supported_locations = p_cscs_init->list_supported_locations; + sc_ctrlpt_init.sc_ctrlpt_attr_md = p_cscs_init->csc_ctrlpt_attr_md; + sc_ctrlpt_init.sensor_location_handle = p_cscs->sensor_loc_handles.value_handle; + sc_ctrlpt_init.service_handle = p_cscs->service_handle; + + return ble_sc_ctrlpt_init(&p_cscs->ctrl_pt, &sc_ctrlpt_init); +} + + +uint32_t ble_cscs_measurement_send(ble_cscs_t * p_cscs, ble_cscs_meas_t * p_measurement) +{ + uint32_t err_code; + + // Send value if connected and notifying + if (p_cscs->conn_handle != BLE_CONN_HANDLE_INVALID) + { + uint8_t encoded_csc_meas[MAX_CSCM_LEN]; + uint16_t len; + uint16_t hvx_len; + ble_gatts_hvx_params_t hvx_params; + + len = csc_measurement_encode(p_cscs, p_measurement, encoded_csc_meas); + hvx_len = len; + + memset(&hvx_params, 0, sizeof(hvx_params)); + + hvx_params.handle = p_cscs->meas_handles.value_handle; + hvx_params.type = BLE_GATT_HVX_NOTIFICATION; + hvx_params.offset = 0; + hvx_params.p_len = &hvx_len; + hvx_params.p_data = encoded_csc_meas; + + err_code = sd_ble_gatts_hvx(p_cscs->conn_handle, &hvx_params); + if ((err_code == NRF_SUCCESS) && (hvx_len != len)) + { + err_code = NRF_ERROR_DATA_SIZE; + } + } + else + { + err_code = NRF_ERROR_INVALID_STATE; + } + + return err_code; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_cscs.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_cscs.h new file mode 100644 index 0000000000..5517ccb74d --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_cscs.h @@ -0,0 +1,161 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_sdk_srv_csc Cycling Speed and Cadence Service + * @{ + * @ingroup ble_sdk_srv + * @brief Cycling Speed and Cadence Service module. + * + * @details This module implements the Cycling Speed and Cadence Service. If enabled, notification + * of the Cycling Speead and Candence Measurement is performed when the application + * calls ble_cscs_measurement_send(). + * + * To use this service, you need to provide the the supported features (@ref BLE_CSCS_FEATURES). + * If you choose to support Wheel revolution data (feature bit @ref BLE_CSCS_FEATURE_WHEEL_REV_BIT), + * you then need to support the 'setting of cumulative value' operation by the supporting the + * Speed and Cadence Control Point (@ref ble_sdk_srv_sc_ctrlpt) by setting the @ref BLE_SRV_SC_CTRLPT_CUM_VAL_OP_SUPPORTED + * bit of the ctrplt_supported_functions in the @ref ble_cscs_init_t structure. + * If you want to support the 'start autocalibration' control point feature, you need, after the @ref BLE_SC_CTRLPT_EVT_START_CALIBRATION + * has been received and the auto calibration is finished, to call the @ref ble_sc_ctrlpt_rsp_send to indicate that the operation is finished + * and thus be able to receive new control point operations. + * If you want to support the 'sensor location' related operation, you need to provide a list of supported location in the + * @ref ble_cscs_init_t structure. + * + * + * @note The application or the service using this module must propagate BLE stack events to the + * Cycling Speead and Candence Service module by calling ble_cscs_on_ble_evt() from the + * from the @ref softdevice_handler function. This service will forward the event to the @ref ble_sdk_srv_sc_ctrlpt module. + * + * @note Attention! + * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile + * qualification listings, this section of source code must not be modified. + */ + +#ifndef BLE_CSCS_H__ +#define BLE_CSCS_H__ + +#include +#include +#include "ble.h" +#include "ble_srv_common.h" +#include "ble_sc_ctrlpt.h" +#include "ble_sensor_location.h" + +/** @defgroup BLE_CSCS_FEATURES Cycling Speed and Cadence Service feature bits + * @{ */ +#define BLE_CSCS_FEATURE_WHEEL_REV_BIT (0x01 << 0) /**< Wheel Revolution Data Supported bit. */ +#define BLE_CSCS_FEATURE_CRANK_REV_BIT (0x01 << 1) /**< Crank Revolution Data Supported bit. */ +#define BLE_CSCS_FEATURE_MULTIPLE_SENSORS_BIT (0x01 << 2) /**< Multiple Sensor Locations Supported bit. */ +/** @} */ + +/**@brief Cycling Speed and Cadence Service event type. */ +typedef enum +{ + BLE_CSCS_EVT_NOTIFICATION_ENABLED, /**< Cycling Speed and Cadence value notification enabled event. */ + BLE_CSCS_EVT_NOTIFICATION_DISABLED /**< Cycling Speed and Cadence value notification disabled event. */ +} ble_cscs_evt_type_t; + +/**@brief Cycling Speed and Cadence Service event. */ +typedef struct +{ + ble_cscs_evt_type_t evt_type; /**< Type of event. */ +} ble_cscs_evt_t; + +// Forward declaration of the ble_csc_t type. +typedef struct ble_cscs_s ble_cscs_t; + +/**@brief Cycling Speed and Cadence Service event handler type. */ +typedef void (*ble_cscs_evt_handler_t) (ble_cscs_t * p_cscs, ble_cscs_evt_t * p_evt); + +/**@brief Cycling Speed and Cadence Service init structure. This contains all options and data +* needed for initialization of the service. */ +typedef struct +{ + ble_cscs_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Cycling Speed and Cadence Service. */ + ble_srv_cccd_security_mode_t csc_meas_attr_md; /**< Initial security level for cycling speed and cadence measurement attribute */ + ble_srv_cccd_security_mode_t csc_ctrlpt_attr_md; /**< Initial security level for cycling speed and cadence control point attribute */ + ble_srv_security_mode_t csc_feature_attr_md; /**< Initial security level for feature attribute */ + uint16_t feature; /**< Initial value for features of sensor @ref BLE_CSCS_FEATURES. */ + uint8_t ctrplt_supported_functions; /**< Supported control point functionalities see @ref BLE_SRV_SC_CTRLPT_SUPP_FUNC. */ + ble_sc_ctrlpt_evt_handler_t ctrlpt_evt_handler; /**< Event handler */ + ble_sensor_location_t *list_supported_locations; /**< List of supported sensor locations.*/ + uint8_t size_list_supported_locations; /**< Number of supported sensor locations in the list.*/ + ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ + ble_sensor_location_t *sensor_location; /**< Initial Sensor Location, if NULL, sensor_location characteristic is not added*/ + ble_srv_cccd_security_mode_t csc_sensor_loc_attr_md; /**< Initial security level for sensor location attribute */ +} ble_cscs_init_t; + +/**@brief Cycling Speed and Cadence Service structure. This contains various status information for + * the service. */ +struct ble_cscs_s +{ + ble_cscs_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Cycling Speed and Cadence Service. */ + uint16_t service_handle; /**< Handle of Cycling Speed and Cadence Service (as provided by the BLE stack). */ + ble_gatts_char_handles_t meas_handles; /**< Handles related to the Cycling Speed and Cadence Measurement characteristic. */ + ble_gatts_char_handles_t feature_handles; /**< Handles related to the Cycling Speed and Cadence feature characteristic. */ + ble_gatts_char_handles_t sensor_loc_handles; /**< Handles related to the Cycling Speed and Cadence Sensor Location characteristic. */ + uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ + uint16_t feature; /**< Bit mask of features available on sensor. */ + ble_sc_ctrlpt_t ctrl_pt; /**< data for speed and cadence control point */ +}; + +/**@brief Cycling Speed and Cadence Service measurement structure. This contains a Cycling Speed and + * Cadence Service measurement. */ +typedef struct ble_cscs_meas_s +{ + bool is_wheel_rev_data_present; /**< True if Wheel Revolution Data is present in the measurement. */ + bool is_crank_rev_data_present; /**< True if Crank Revolution Data is present in the measurement. */ + uint32_t cumulative_wheel_revs; /**< Cumulative Wheel Revolutions. */ + uint16_t last_wheel_event_time; /**< Last Wheel Event Time. */ + uint16_t cumulative_crank_revs; /**< Cumulative Crank Revolutions. */ + uint16_t last_crank_event_time; /**< Last Crank Event Time. */ +} ble_cscs_meas_t; + +/**@brief Function for initializing the Cycling Speed and Cadence Service. + * + * @param[out] p_cscs Cycling Speed and Cadence Service structure. This structure will have to + * be supplied by the application. It will be initialized by this function, + * and will later be used to identify this particular service instance. + * @param[in] p_cscs_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. + */ +uint32_t ble_cscs_init(ble_cscs_t * p_cscs, const ble_cscs_init_t * p_cscs_init); + +/**@brief Function for handling the Application's BLE Stack events. + * + * @details Handles all events from the BLE stack of interest to the Cycling Speed and Cadence + * Service. + * + * @param[in] p_cscs Cycling Speed and Cadence Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +void ble_cscs_on_ble_evt(ble_cscs_t * p_cscs, ble_evt_t * p_ble_evt); + +/**@brief Function for sending cycling speed and cadence measurement if notification has been enabled. + * + * @details The application calls this function after having performed a Cycling Speed and Cadence + * Service measurement. If notification has been enabled, the measurement data is encoded + * and sent to the client. + * + * @param[in] p_cscs Cycling Speed and Cadence Service structure. + * @param[in] p_measurement Pointer to new cycling speed and cadence measurement. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +uint32_t ble_cscs_measurement_send(ble_cscs_t * p_cscs, ble_cscs_meas_t * p_measurement); + +#endif // BLE_CSCS_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_sc_ctrlpt.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_sc_ctrlpt.c new file mode 100644 index 0000000000..5d1c4e63aa --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_sc_ctrlpt.c @@ -0,0 +1,638 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/* Attention! + * To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile + * qualification listings, this section of source code must not be modified. + */ + +#include "ble_sc_ctrlpt.h" +#include +#include "nordic_common.h" +#include "ble_l2cap.h" +#include "ble_srv_common.h" +#include "app_util.h" + +#define SC_CTRLPT_NACK_PROC_ALREADY_IN_PROGRESS (BLE_GATT_STATUS_ATTERR_APP_BEGIN + 0) +#define SC_CTRLPT_NACK_CCCD_IMPROPERLY_CONFIGURED (BLE_GATT_STATUS_ATTERR_APP_BEGIN + 1) + +uint32_t ble_sc_ctrlpt_init(ble_sc_ctrlpt_t * p_sc_ctrlpt, + const ble_cs_ctrlpt_init_t * p_sc_ctrlpt_init) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_md_t cccd_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + + p_sc_ctrlpt->conn_handle = BLE_CONN_HANDLE_INVALID; + p_sc_ctrlpt->procedure_status = BLE_SCPT_NO_PROC_IN_PROGRESS; + + p_sc_ctrlpt->size_list_supported_locations = p_sc_ctrlpt_init->size_list_supported_locations; + + if ((p_sc_ctrlpt_init->size_list_supported_locations != 0) && + (p_sc_ctrlpt_init->list_supported_locations != NULL)) + { + memcpy(p_sc_ctrlpt->list_supported_locations, + p_sc_ctrlpt_init->list_supported_locations, + p_sc_ctrlpt->size_list_supported_locations * sizeof(ble_sensor_location_t)); + } + + p_sc_ctrlpt->service_handle = p_sc_ctrlpt_init->service_handle; + p_sc_ctrlpt->evt_handler = p_sc_ctrlpt_init->evt_handler; + p_sc_ctrlpt->supported_functions = p_sc_ctrlpt_init->supported_functions; + p_sc_ctrlpt->sensor_location_handle = p_sc_ctrlpt_init->sensor_location_handle; + p_sc_ctrlpt->error_handler = p_sc_ctrlpt_init->error_handler; + + memset(&cccd_md, 0, sizeof(cccd_md)); + + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); + cccd_md.write_perm = p_sc_ctrlpt_init->sc_ctrlpt_attr_md.cccd_write_perm; + cccd_md.vloc = BLE_GATTS_VLOC_STACK; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.indicate = 1; + char_md.char_props.write = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = &cccd_md; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_SC_CTRLPT_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.read_perm); + attr_md.write_perm = p_sc_ctrlpt_init->sc_ctrlpt_attr_md.write_perm; + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 1; + attr_md.vlen = 1; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = 0; + attr_char_value.init_offs = 0; + attr_char_value.max_len = BLE_SC_CTRLPT_MAX_LEN; + attr_char_value.p_value = 0; + + return sd_ble_gatts_characteristic_add(p_sc_ctrlpt->service_handle, + &char_md, + &attr_char_value, + &p_sc_ctrlpt->sc_ctrlpt_handles); +} + + +/**@brief Decode an incoming control point write. + * + * @param[in] rcvd_val received write value + * @param[in] len value length + * @param[out] decoded_ctrlpt decoded control point structure + */ +static uint32_t sc_ctrlpt_decode(uint8_t * p_rcvd_val, + uint8_t len, + ble_sc_ctrlpt_val_t * p_write_val) +{ + int pos = 0; + + if (len < BLE_SC_CTRLPT_MIN_LEN) + { + return NRF_ERROR_INVALID_PARAM; + } + + p_write_val->opcode = (ble_scpt_operator_t) p_rcvd_val[pos++]; + + switch (p_write_val->opcode) + { + case BLE_SCPT_REQUEST_SUPPORTED_SENSOR_LOCATIONS: + break; + + case BLE_SCPT_START_AUTOMATIC_CALIBRATION: + break; + + case BLE_SCPT_UPDATE_SENSOR_LOCATION: + p_write_val->location = (ble_sensor_location_t)p_rcvd_val[pos]; + break; + + case BLE_SCPT_SET_CUMULATIVE_VALUE: + p_write_val->cumulative_value = uint32_decode(&(p_rcvd_val[pos])); + break; + + default: + return NRF_ERROR_INVALID_PARAM; + } + return NRF_SUCCESS; +} + + +/**@brief encode a control point response indication. + * + * @param[in] p_sc_ctrlpt SC Ctrlpt structure. + * @param[in] p_ctrlpt_rsp structure containing response data to be encoded + * @param[out] p_data pointer where data needs to be written + * @return size of encoded data + */ +static int ctrlpt_rsp_encode(ble_sc_ctrlpt_t * p_sc_ctrlpt, + ble_sc_ctrlpt_rsp_t * p_ctrlpt_rsp, + uint8_t * p_data) +{ + int len = 0; + + p_data[len++] = BLE_SCPT_RESPONSE_CODE; + p_data[len++] = p_ctrlpt_rsp->opcode; + p_data[len++] = p_ctrlpt_rsp->status; + + if (p_ctrlpt_rsp->status == BLE_SCPT_SUCCESS) + { + switch (p_ctrlpt_rsp->opcode) + { + case BLE_SCPT_REQUEST_SUPPORTED_SENSOR_LOCATIONS: + { + int i; + for (i = 0; i < p_sc_ctrlpt->size_list_supported_locations; i++) + { + p_data[len++] = p_sc_ctrlpt->list_supported_locations[i]; + } + break; + } + + default: + // No implementation needed. + break; + } + } + return len; +} + + +/**@brief check if a given sensor location is supported or not. + * + * @param[in] p_sc_ctrlpt SC Ctrlpt structure. + * @param[in] location sensor location to check. + * @return true if the given location is found in the list of supported locations, false otherwise. + */ +static bool is_location_supported(ble_sc_ctrlpt_t * p_sc_ctrlpt, ble_sensor_location_t location) +{ + int i; + + for (i = 0; i < p_sc_ctrlpt->size_list_supported_locations; i++) + { + if (p_sc_ctrlpt->list_supported_locations[i] == location) + { + return true; + } + } + return false; +} + + +/**@brief check if the cccd is configured + * + * @param[in] p_sc_ctrlpt SC Ctrlpt structure. + * @return true if the sc_control point's cccd is correctly configured, false otherwise. + */ +static bool is_cccd_configured(ble_sc_ctrlpt_t * p_sc_ctrlpt) +{ + uint32_t err_code; + uint8_t cccd_value_buf[BLE_CCCD_VALUE_LEN]; + bool is_sccp_indic_enabled = false; + ble_gatts_value_t gatts_value; + + // Initialize value struct. + memset(&gatts_value, 0, sizeof(gatts_value)); + + gatts_value.len = BLE_CCCD_VALUE_LEN; + gatts_value.offset = 0; + gatts_value.p_value = cccd_value_buf; + + err_code = sd_ble_gatts_value_get(p_sc_ctrlpt->conn_handle, + p_sc_ctrlpt->sc_ctrlpt_handles.cccd_handle, + &gatts_value); + if (err_code != NRF_SUCCESS) + { + // Report error to application + if (p_sc_ctrlpt->error_handler != NULL) + { + p_sc_ctrlpt->error_handler(err_code); + } + } + + is_sccp_indic_enabled = ble_srv_is_indication_enabled(cccd_value_buf); + + return is_sccp_indic_enabled; +} + + +/**@brief sends a control point indication. + * + * @param[in] p_sc_ctrlpt SC Ctrlpt structure. + */ +static void sc_ctrlpt_resp_send(ble_sc_ctrlpt_t * p_sc_ctrlpt) +{ + uint16_t hvx_len; + ble_gatts_hvx_params_t hvx_params; + uint32_t err_code; + + if ((p_sc_ctrlpt->procedure_status == BLE_SCPT_INDICATION_PENDING)) + { + hvx_len = p_sc_ctrlpt->response.len; + memset(&hvx_params, 0, sizeof(hvx_params)); + + hvx_params.handle = p_sc_ctrlpt->sc_ctrlpt_handles.value_handle; + hvx_params.type = BLE_GATT_HVX_INDICATION; + hvx_params.offset = 0; + hvx_params.p_len = &hvx_len; + hvx_params.p_data = p_sc_ctrlpt->response.encoded_ctrl_rsp; + + err_code = sd_ble_gatts_hvx(p_sc_ctrlpt->conn_handle, &hvx_params); + + // Error handling + if ((err_code == NRF_SUCCESS) && (hvx_len != p_sc_ctrlpt->response.len)) + { + err_code = NRF_ERROR_DATA_SIZE; + } + + switch (err_code) + { + case NRF_SUCCESS: + p_sc_ctrlpt->procedure_status = BLE_SCPT_IND_CONFIRM_PENDING; + // Wait for HVC event + break; + + case BLE_ERROR_NO_TX_PACKETS: + // Wait for TX_COMPLETE event to retry transmission + p_sc_ctrlpt->procedure_status = BLE_SCPT_INDICATION_PENDING; + break; + + default: + // Report error to application + p_sc_ctrlpt->procedure_status = BLE_SCPT_NO_PROC_IN_PROGRESS; + if (p_sc_ctrlpt->error_handler != NULL) + { + p_sc_ctrlpt->error_handler(err_code); + } + break; + } + } +} + + +/**@brief Handle a write event to the Speed and Cadence Control Point. + * + * @param[in] p_sc_ctrlpt SC Ctrlpt structure. + * @param[in] p_evt_write WRITE event to be handled. + */ +static void on_ctrlpt_write(ble_sc_ctrlpt_t * p_sc_ctrlpt, + ble_gatts_evt_write_t * p_evt_write) +{ + ble_sc_ctrlpt_val_t rcvd_ctrlpt = + { BLE_SCPT_RESPONSE_CODE , 0, BLE_SENSOR_LOCATION_OTHER }; + + ble_sc_ctrlpt_rsp_t rsp; + uint32_t err_code; + ble_gatts_rw_authorize_reply_params_t auth_reply; + ble_sc_ctrlpt_evt_t evt; + + auth_reply.type = BLE_GATTS_AUTHORIZE_TYPE_WRITE; + auth_reply.params.write.offset = 0; + auth_reply.params.write.len = 0; + auth_reply.params.write.p_data = NULL; + auth_reply.params.write.gatt_status = BLE_GATT_STATUS_SUCCESS; + auth_reply.params.write.update = 1; + + if (is_cccd_configured(p_sc_ctrlpt)) + { + if (p_sc_ctrlpt->procedure_status == BLE_SCPT_NO_PROC_IN_PROGRESS) + { + auth_reply.params.write.gatt_status = BLE_GATT_STATUS_SUCCESS; + } + else + { + auth_reply.params.write.gatt_status = SC_CTRLPT_NACK_PROC_ALREADY_IN_PROGRESS; + } + } + else + { + auth_reply.params.write.gatt_status = SC_CTRLPT_NACK_CCCD_IMPROPERLY_CONFIGURED; + } + + err_code = sd_ble_gatts_rw_authorize_reply(p_sc_ctrlpt->conn_handle, &auth_reply); + if (err_code != NRF_SUCCESS) + { + // Report error to application. + if (p_sc_ctrlpt->error_handler != NULL) + { + p_sc_ctrlpt->error_handler(err_code); + } + } + + if (auth_reply.params.write.gatt_status != BLE_GATT_STATUS_SUCCESS) + { + return; + } + + p_sc_ctrlpt->procedure_status = BLE_SCPT_INDICATION_PENDING; + rsp.status = BLE_SCPT_OP_CODE_NOT_SUPPORTED; + + err_code = sc_ctrlpt_decode(p_evt_write->data, p_evt_write->len, &rcvd_ctrlpt); + if (err_code != NRF_SUCCESS) + { + rsp.opcode = rcvd_ctrlpt.opcode; + rsp.status = BLE_SCPT_OP_CODE_NOT_SUPPORTED; + } + else + { + rsp.opcode = rcvd_ctrlpt.opcode; + + switch (rcvd_ctrlpt.opcode) + { + case BLE_SCPT_REQUEST_SUPPORTED_SENSOR_LOCATIONS: + if ((p_sc_ctrlpt->supported_functions & + BLE_SRV_SC_CTRLPT_SENSOR_LOCATIONS_OP_SUPPORTED) == + BLE_SRV_SC_CTRLPT_SENSOR_LOCATIONS_OP_SUPPORTED) + { + rsp.status = BLE_SCPT_SUCCESS; + } + else + { + rsp.status = BLE_SCPT_OP_CODE_NOT_SUPPORTED; + } + break; + + case BLE_SCPT_UPDATE_SENSOR_LOCATION: + if ((p_sc_ctrlpt->supported_functions & + BLE_SRV_SC_CTRLPT_SENSOR_LOCATIONS_OP_SUPPORTED) == + BLE_SRV_SC_CTRLPT_SENSOR_LOCATIONS_OP_SUPPORTED) + { + if (is_location_supported(p_sc_ctrlpt, rcvd_ctrlpt.location)) + { + ble_gatts_value_t gatts_value; + uint8_t rcvd_location = (uint8_t)rcvd_ctrlpt.location; + rsp.status = BLE_SCPT_SUCCESS; + + // Initialize value struct. + memset(&gatts_value, 0, sizeof(gatts_value)); + + gatts_value.len = sizeof(uint8_t); + gatts_value.offset = 0; + gatts_value.p_value = &rcvd_location; + + evt.evt_type = BLE_SC_CTRLPT_EVT_UPDATE_LOCATION; + evt.params.update_location = rcvd_ctrlpt.location; + if (p_sc_ctrlpt->evt_handler != NULL) + { + rsp.status = p_sc_ctrlpt->evt_handler(p_sc_ctrlpt, &evt); + } + if (rsp.status == BLE_SCPT_SUCCESS) + { + err_code = sd_ble_gatts_value_set(p_sc_ctrlpt->conn_handle, + p_sc_ctrlpt->sensor_location_handle, + &gatts_value); + if (err_code != NRF_SUCCESS) + { + // Report error to application + if (p_sc_ctrlpt->error_handler != NULL) + { + p_sc_ctrlpt->error_handler(err_code); + } + rsp.status = BLE_SCPT_OPERATION_FAILED; + } + } + } + else + { + rsp.status = BLE_SCPT_INVALID_PARAMETER; + } + } + else + { + rsp.status = BLE_SCPT_OP_CODE_NOT_SUPPORTED; + } + break; + + case BLE_SCPT_SET_CUMULATIVE_VALUE: + if ((p_sc_ctrlpt->supported_functions & + BLE_SRV_SC_CTRLPT_CUM_VAL_OP_SUPPORTED) == + BLE_SRV_SC_CTRLPT_CUM_VAL_OP_SUPPORTED) + { + rsp.status = BLE_SCPT_SUCCESS; + + evt.evt_type = BLE_SC_CTRLPT_EVT_SET_CUMUL_VALUE; + evt.params.cumulative_value = rcvd_ctrlpt.cumulative_value; + if (p_sc_ctrlpt->evt_handler != NULL) + { + rsp.status = p_sc_ctrlpt->evt_handler(p_sc_ctrlpt, &evt); + } + } + else + { + rsp.status = BLE_SCPT_OP_CODE_NOT_SUPPORTED; + } + break; + + case BLE_SCPT_START_AUTOMATIC_CALIBRATION: + if ((p_sc_ctrlpt->supported_functions & + BLE_SRV_SC_CTRLPT_START_CALIB_OP_SUPPORTED) == + BLE_SRV_SC_CTRLPT_START_CALIB_OP_SUPPORTED) + { + p_sc_ctrlpt->procedure_status = BLE_SCPT_AUTOMATIC_CALIB_IN_PROGRESS; + evt.evt_type = BLE_SC_CTRLPT_EVT_START_CALIBRATION; + if (p_sc_ctrlpt->evt_handler != NULL) + { + rsp.status = p_sc_ctrlpt->evt_handler(p_sc_ctrlpt, &evt); + if (rsp.status != BLE_SCPT_SUCCESS) + { + p_sc_ctrlpt->procedure_status = BLE_SCPT_INDICATION_PENDING; // If the application returns an error, the response is to be sent right away and the calibration is considered as not started. + } + } + } + else + { + rsp.status = BLE_SCPT_OP_CODE_NOT_SUPPORTED; + } + break; + + default: + rsp.status = BLE_SCPT_OP_CODE_NOT_SUPPORTED; + break; + } + + } + + p_sc_ctrlpt->response.len = ctrlpt_rsp_encode(p_sc_ctrlpt, &rsp, + p_sc_ctrlpt->response.encoded_ctrl_rsp); + + + if (p_sc_ctrlpt->procedure_status == BLE_SCPT_INDICATION_PENDING) + { + sc_ctrlpt_resp_send(p_sc_ctrlpt); + } +} + + +/**@brief Authorize WRITE request event handler. + * + * @details Handles WRITE events from the BLE stack. + * + * @param[in] p_sc_ctrlpt SC Ctrlpt structure. + * @param[in] p_gatts_evt GATTS Event received from the BLE stack. + * + */ +static void on_rw_authorize_request(ble_sc_ctrlpt_t * p_sc_ctrlpt, ble_gatts_evt_t * p_gatts_evt) +{ + ble_gatts_evt_rw_authorize_request_t * p_auth_req = &p_gatts_evt->params.authorize_request; + if (p_auth_req->type == BLE_GATTS_AUTHORIZE_TYPE_WRITE) + { + if ( (p_gatts_evt->params.authorize_request.request.write.op + != BLE_GATTS_OP_PREP_WRITE_REQ) + && (p_gatts_evt->params.authorize_request.request.write.op + != BLE_GATTS_OP_EXEC_WRITE_REQ_NOW) + && (p_gatts_evt->params.authorize_request.request.write.op + != BLE_GATTS_OP_EXEC_WRITE_REQ_CANCEL) + ) + { + if (p_auth_req->request.write.handle == p_sc_ctrlpt->sc_ctrlpt_handles.value_handle) + { + on_ctrlpt_write(p_sc_ctrlpt, &p_auth_req->request.write); + } + } + } +} + + +/**@brief Tx Complete event handler. + * + * @details Tx Complete event handler. + * Handles WRITE events from the BLE stack and if an indication was pending try sending it + * again. + * + * @param[in] p_sc_ctrlpt SC Ctrlpt structure. + * + */ +static void on_tx_complete(ble_sc_ctrlpt_t * p_sc_ctrlpt) +{ + if (p_sc_ctrlpt->procedure_status == BLE_SCPT_INDICATION_PENDING) + { + sc_ctrlpt_resp_send(p_sc_ctrlpt); + } +} + + +/**@brief Function for handling the Connect event. + * + * @param[in] p_sc_ctrlpt SC Ctrlpt structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_connect(ble_sc_ctrlpt_t * p_sc_ctrlpt, ble_evt_t * p_ble_evt) +{ + p_sc_ctrlpt->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; + p_sc_ctrlpt->procedure_status = BLE_SCPT_NO_PROC_IN_PROGRESS; +} + + +/**@brief Function for handling the Disconnect event. + * + * @param[in] p_sc_ctrlpt SC Ctrlpt structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_disconnect(ble_sc_ctrlpt_t * p_sc_ctrlpt, ble_evt_t * p_ble_evt) +{ + UNUSED_PARAMETER(p_ble_evt); + p_sc_ctrlpt->conn_handle = BLE_CONN_HANDLE_INVALID; + p_sc_ctrlpt->procedure_status = BLE_SCPT_NO_PROC_IN_PROGRESS; +} + + +/**@brief Function for handling the BLE_GATTS_EVT_HVC event. + * + * @param[in] p_sc_ctrlpt SC Ctrlpt structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_sc_hvc_confirm(ble_sc_ctrlpt_t * p_sc_ctrlpt, ble_evt_t * p_ble_evt) +{ + if (p_ble_evt->evt.gatts_evt.params.hvc.handle == p_sc_ctrlpt->sc_ctrlpt_handles.value_handle) + { + if (p_sc_ctrlpt->procedure_status == BLE_SCPT_IND_CONFIRM_PENDING) + { + p_sc_ctrlpt->procedure_status = BLE_SCPT_NO_PROC_IN_PROGRESS; + } + } +} + + +void ble_sc_ctrlpt_on_ble_evt(ble_sc_ctrlpt_t * p_sc_ctrlpt, ble_evt_t * p_ble_evt) +{ + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + on_connect(p_sc_ctrlpt, p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + on_disconnect(p_sc_ctrlpt, p_ble_evt); + break; + + case BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST: + on_rw_authorize_request(p_sc_ctrlpt, &p_ble_evt->evt.gatts_evt); + break; + + case BLE_GATTS_EVT_HVC: + on_sc_hvc_confirm(p_sc_ctrlpt, p_ble_evt); + break; + + case BLE_EVT_TX_COMPLETE: + on_tx_complete(p_sc_ctrlpt); + break; + + default: + break; + } +} + + +uint32_t ble_sc_ctrlpt_rsp_send(ble_sc_ctrlpt_t * p_sc_ctrlpt, ble_scpt_response_t response_status) +{ + uint32_t err_code = NRF_SUCCESS; + ble_sc_ctrlpt_rsp_t rsp; + uint8_t encoded_ctrl_rsp[BLE_SC_CTRLPT_MAX_LEN]; + uint16_t hvx_len; + ble_gatts_hvx_params_t hvx_params; + + if (p_sc_ctrlpt->procedure_status != BLE_SCPT_AUTOMATIC_CALIB_IN_PROGRESS) + { + return NRF_ERROR_INVALID_STATE; + } + rsp.status = response_status; + rsp.opcode = BLE_SCPT_START_AUTOMATIC_CALIBRATION; + hvx_len = ctrlpt_rsp_encode(p_sc_ctrlpt, &rsp, encoded_ctrl_rsp); + + // Send indication + memset(&hvx_params, 0, sizeof(hvx_params)); + + hvx_params.handle = p_sc_ctrlpt->sc_ctrlpt_handles.value_handle; + hvx_params.type = BLE_GATT_HVX_INDICATION; + hvx_params.offset = 0; + hvx_params.p_len = &hvx_len; + hvx_params.p_data = encoded_ctrl_rsp; + + err_code = sd_ble_gatts_hvx(p_sc_ctrlpt->conn_handle, &hvx_params); + + if (err_code == NRF_SUCCESS) + { + p_sc_ctrlpt->procedure_status = BLE_SCPT_NO_PROC_IN_PROGRESS; + } + return err_code; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_sc_ctrlpt.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_sc_ctrlpt.h new file mode 100644 index 0000000000..fc5ac9bb27 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_sc_ctrlpt.h @@ -0,0 +1,211 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_sdk_srv_sc_ctrlpt Speed and Cadence Control Point + * @{ + * @ingroup ble_sdk_srv + * @brief Speed and Cadence Control Point module. + * + * @details This module implements the Speed and Cadence control point behavior. It is used + * by the @ref ble_sdk_srv_csc module and the ble_sdk_srv_rsc module for control point + * mechanisms like setting a cumulative value, Start an automatic calibration, + * Update the sensor location or request the supported locations. + * + * @note Attention! + * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile + * qualification listings, this section of source code must not be modified. + */ + +#ifndef BLE_SC_CTRLPT_H__ +#define BLE_SC_CTRLPT_H__ + +#include +#include +#include "ble.h" +#include "ble_srv_common.h" +#include "ble_sensor_location.h" + +#define BLE_SC_CTRLPT_MAX_LEN 19 /**< maximum lenght for Speed and cadence control point characteristic value. */ +#define BLE_SC_CTRLPT_MIN_LEN 1 /**< minimum length for Speed and cadence control point characteristic value. */ + +// Forward declaration of the ble_sc_ctrlpt_t type. +typedef struct ble_sc_ctrlpt_s ble_sc_ctrlpt_t; + + +/**@brief Speed and Cadence Control Point event type. */ +typedef enum +{ + BLE_SC_CTRLPT_EVT_UPDATE_LOCATION, /**< rcvd update location opcode (the control point handles the change of location automatically, the event just informs the application in case it needs to adjust its algorithm). */ + BLE_SC_CTRLPT_EVT_SET_CUMUL_VALUE, /**< rcvd set cumulative value opcode, it is then up to the application to use the new cumulative value. */ + BLE_SC_CTRLPT_EVT_START_CALIBRATION, /**< rcvd start calibration opcode, the application needs, at the end ot the calibration to call ble_sc_ctrlpt_send_rsp. */ +} ble_sc_ctrlpt_evt_type_t; + + +/**@brief Speed and Cadence Control point event. */ +typedef struct +{ + ble_sc_ctrlpt_evt_type_t evt_type; /**< Type of event. */ + union + { + ble_sensor_location_t update_location; + uint32_t cumulative_value; + }params; +} ble_sc_ctrlpt_evt_t; + + +/** Speed and Cadence Control Point operator code (see RSC service specification)*/ +typedef enum { + BLE_SCPT_SET_CUMULATIVE_VALUE = 0x01, /**< Operator to set a given cumulative value. */ + BLE_SCPT_START_AUTOMATIC_CALIBRATION = 0x02, /**< Operator to start automatic calibration. */ + BLE_SCPT_UPDATE_SENSOR_LOCATION = 0x03, /**< Operator to update the sensor location. */ + BLE_SCPT_REQUEST_SUPPORTED_SENSOR_LOCATIONS = 0x04, /**< Operator to request the supported sensor locations. */ + BLE_SCPT_RESPONSE_CODE = 0x10, /**< Response Code. */ +} ble_scpt_operator_t; + + +/** Speed and Cadence Control Point response parameter (see RSC service specification)*/ +typedef enum { + BLE_SCPT_SUCCESS = 0x01, /**< Sucess Response. */ + BLE_SCPT_OP_CODE_NOT_SUPPORTED = 0x02, /**< Error Response received opcode not supported. */ + BLE_SCPT_INVALID_PARAMETER = 0x03, /**< Error Response received parameter invalid. */ + BLE_SCPT_OPERATION_FAILED = 0x04, /**< Error Response operation failed. */ +} ble_scpt_response_t; + + +/** Speed and Cadence Control Point procedure status (indicates is a procedure is in progress or not and which procedure is in progress*/ +typedef enum { + BLE_SCPT_NO_PROC_IN_PROGRESS = 0x00, /**< No procedure in progress. */ + BLE_SCPT_AUTOMATIC_CALIB_IN_PROGRESS = 0x01, /**< Automatic Calibration is in progress. */ + BLE_SCPT_INDICATION_PENDING = 0x02, /**< Control Point Indication is pending. */ + BLE_SCPT_IND_CONFIRM_PENDING = 0x03, /**< Waiting for the indication confirmation. */ +}ble_scpt_procedure_status_t; + +/**@brief Speed and Cadence Control point event handler type. */ +typedef ble_scpt_response_t (*ble_sc_ctrlpt_evt_handler_t) (ble_sc_ctrlpt_t * p_sc_ctrlpt, + ble_sc_ctrlpt_evt_t * p_evt); + + +typedef struct{ + ble_scpt_operator_t opcode; + uint32_t cumulative_value; + ble_sensor_location_t location; +}ble_sc_ctrlpt_val_t; + + +typedef struct{ + ble_scpt_operator_t opcode; + ble_scpt_response_t status; + ble_sensor_location_t location_list[BLE_NB_MAX_SENSOR_LOCATIONS]; +}ble_sc_ctrlpt_rsp_t; + + +/** + * \defgroup BLE_SRV_SC_CTRLPT_SUPP_FUNC Control point functionalities. + *@{ + */ +#define BLE_SRV_SC_CTRLPT_SENSOR_LOCATIONS_OP_SUPPORTED 0x01 /**< Support for sensor location related operations */ +#define BLE_SRV_SC_CTRLPT_CUM_VAL_OP_SUPPORTED 0x02 /**< Support for setting cumulative value related operations */ +#define BLE_SRV_SC_CTRLPT_START_CALIB_OP_SUPPORTED 0x04 /**< Support for starting calibration related operations */ +/** + *@} + */ + +/**@brief Speed and Cadence Control Point init structure. This contains all options and data +* needed for initialization of the Speed and Cadence Control Point module. */ +typedef struct +{ + ble_srv_cccd_security_mode_t sc_ctrlpt_attr_md; /**< Initial security level for cycling speed and cadence control point attribute */ + uint8_t supported_functions; /**< supported control point functionalities see @ref BLE_SRV_SC_CTRLPT_SUPP_FUNC. */ + uint16_t service_handle; /**< Handle of the parent service (as provided by the BLE stack). */ + ble_sc_ctrlpt_evt_handler_t evt_handler; /**< event handler */ + ble_sensor_location_t *list_supported_locations; /**< list of supported sensor locations.*/ + uint8_t size_list_supported_locations; /**< number of supported sensor locations in the list.*/ + uint16_t sensor_location_handle; /**< handle for the sensor location characteristic (if sensor_location related operation are supported).*/ + ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ +} ble_cs_ctrlpt_init_t; + + +/**@brief Speed and Cadence Control Point response indication structure. */ +typedef struct +{ + ble_scpt_response_t status; /**< control point response status .*/ + uint8_t len; /**< control point response length .*/ + uint8_t encoded_ctrl_rsp[BLE_SC_CTRLPT_MAX_LEN]; /**< control point encoded response.*/ +}ble_sc_ctrlpt_resp_t; + + +/**@brief Speed and Cadence Control Point structure. This contains various status information for + * the Speed and Cadence Control Point behavior. */ +struct ble_sc_ctrlpt_s +{ + uint8_t supported_functions; /**< supported control point functionalities see @ref BLE_SRV_SC_CTRLPT_SUPP_FUNC. */ + uint16_t service_handle; /**< Handle of the parent service (as provided by the BLE stack). */ + ble_gatts_char_handles_t sc_ctrlpt_handles; /**< Handles related to the Speed and Cadence Control Point characteristic. */ + uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ + ble_sensor_location_t list_supported_locations[BLE_NB_MAX_SENSOR_LOCATIONS]; /**< list of supported sensor locations.*/ + uint8_t size_list_supported_locations; /**< number of supported sensor locations in the list.*/ + ble_sc_ctrlpt_evt_handler_t evt_handler; /**< Handle of the parent service (as provided by the BLE stack). */ + uint16_t sensor_location_handle; /**< handle for the sensor location characteristic (if sensor_location related operation are supported).*/ + ble_scpt_procedure_status_t procedure_status; /**< status of possible procedure*/ + ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ + ble_sc_ctrlpt_resp_t response; /**< pending response data.*/ +}; + +#define SCPT_OPCODE_POS 0 /**< Request opcode position. */ +#define SCPT_PARAMETER_POS 1 /**< Request parameter position. */ + +#define SCPT_RESPONSE_REQUEST_OPCODE_POS 1 /**< Response position of requested opcode. */ +#define SCPT_RESPONSE_CODE_POS 2 /**< Response position of response code. */ +#define SCPT_RESPONSE_PARAMETER 3 /**< Response position of response parameter. */ + +#define SCPT_MIN_RESPONSE_SIZE 3 /**< Minimum size for control point response. */ +#define SCPT_MAX_RESPONSE_SIZE (SCPT_MIN_RESPONSE_SIZE + NB_MAX_SENSOR_LOCATIONS) /**< Maximum size for control point response. */ + + +/**@brief Function for Initializing the Speed and Cadence Control Point. + * + * @details Function for Initializing the Speed and Cadence Control Point. + * @param[in] p_sc_ctrlpt Speed and Cadence Control Point structure. + * @param[in] p_sc_ctrlpt_init Information needed to initialize the control point behavior. + * + * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. + */ +uint32_t ble_sc_ctrlpt_init(ble_sc_ctrlpt_t * p_sc_ctrlpt, + const ble_cs_ctrlpt_init_t * p_sc_ctrlpt_init); + + +/**@brief Function for sending a control point response. + * + * @details Function for sending a control point response when the control point received was + * BLE_SCPT_START_AUTOMATIC_CALIBRATION. To be called after the calibration procedure is finished. + * + * @param[in] p_sc_ctrlpt Speed and Cadence Control Point structure. + * @param[in] response_status status to include in the control point response. + */ +uint32_t ble_sc_ctrlpt_rsp_send(ble_sc_ctrlpt_t * p_sc_ctrlpt, ble_scpt_response_t response_status); + + +/**@brief Speed and Cadence Control Point BLE stack event handler. + * + * @details Handles all events from the BLE stack of interest to the Speed and Cadence Control Point. + * + * @param[in] p_sc_ctrlpt Speed and Cadence Control Point structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +void ble_sc_ctrlpt_on_ble_evt(ble_sc_ctrlpt_t * p_sc_ctrlpt, ble_evt_t * p_ble_evt); + + +#endif // BLE_SC_CTRLPT_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cts_c/ble_cts_c.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cts_c/ble_cts_c.c new file mode 100644 index 0000000000..5d3b730a37 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cts_c/ble_cts_c.c @@ -0,0 +1,340 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include +#include "ble.h" +#include "ble_srv_common.h" +#include "ble_gattc.h" +#include "ble_cts_c.h" +#include "ble_date_time.h" +#include "ble_db_discovery.h" +#include "nrf_log.h" +#include "nrf_log.h" +#include "sdk_common.h" + +#define CTS_LOG NRF_LOG_PRINTF_DEBUG /**< Debug logger macro that will be used in this file to do logging of important information over UART. */ +#define CTS_YEAR_MIN 1582 /**< The lowest valid Current Time year is the year when the western calendar was introduced. */ +#define CTS_YEAR_MAX 9999 /**< The highest possible Current Time. */ + +#define CTS_C_CURRENT_TIME_EXPECTED_LENGTH 10 /**< | Year |Month |Day |Hours |Minutes |Seconds |Weekday |Fraction|Reason | + | 2 bytes |1 byte |1 byte |1 byte |1 byte |1 byte |1 byte |1 byte |1 byte | = 10 bytes. */ + + +/**@brief Function for handling events from the database discovery module. + * + * @details This function will handle an event from the database discovery module, and determine + * if it relates to the discovery of Current Time Service at the peer. If so, it will + * call the application's event handler indicating that the Current Time Service has been + * discovered at the peer. It also populates the event with the service related + * information before providing it to the application. + * + * @param[in] p_evt Pointer to the event received from the database discovery module. + * + */ +void ble_cts_c_on_db_disc_evt(ble_cts_c_t * p_cts, ble_db_discovery_evt_t * p_evt) +{ + CTS_LOG("[CTS]: Database Discovery handler called with event 0x%x\r\n", p_evt->evt_type); + + ble_cts_c_evt_t evt; + const ble_gatt_db_char_t * p_chars = p_evt->params.discovered_db.charateristics; + + evt.evt_type = BLE_CTS_C_EVT_DISCOVERY_FAILED; + evt.conn_handle = p_evt->conn_handle; + + // Check if the Current Time Service was discovered. + if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE && + p_evt->params.discovered_db.srv_uuid.uuid == BLE_UUID_CURRENT_TIME_SERVICE && + p_evt->params.discovered_db.srv_uuid.type == BLE_UUID_TYPE_BLE) + { + + // Find the handles of the Current Time characteristic. + uint32_t i; + + for (i = 0; i < p_evt->params.discovered_db.char_count; i++) + { + if (p_evt->params.discovered_db.charateristics[i].characteristic.uuid.uuid == + BLE_UUID_CURRENT_TIME_CHAR) + { + // Found Current Time characteristic. Store CCCD and value handle and break. + evt.params.char_handles.cts_handle = p_chars->characteristic.handle_value; + evt.params.char_handles.cts_cccd_handle = p_chars->cccd_handle; + break; + } + } + + CTS_LOG("[CTS]: Current Time Service discovered at peer.\r\n"); + + evt.evt_type = BLE_CTS_C_EVT_DISCOVERY_COMPLETE; + } + p_cts->evt_handler(p_cts, &evt); +} + + +uint32_t ble_cts_c_init(ble_cts_c_t * p_cts, ble_cts_c_init_t const * p_cts_init) +{ + //Verify that the parameters needed for to initialize this instance of CTS are not NULL. + VERIFY_PARAM_NOT_NULL(p_cts); + VERIFY_PARAM_NOT_NULL(p_cts_init); + VERIFY_PARAM_NOT_NULL(p_cts_init->error_handler); + VERIFY_PARAM_NOT_NULL(p_cts_init->evt_handler); + + static ble_uuid_t cts_uuid; + + BLE_UUID_BLE_ASSIGN(cts_uuid, BLE_UUID_CURRENT_TIME_SERVICE); + + p_cts->evt_handler = p_cts_init->evt_handler; + p_cts->error_handler = p_cts_init->error_handler; + p_cts->conn_handle = BLE_CONN_HANDLE_INVALID; + p_cts->char_handles.cts_handle = BLE_GATT_HANDLE_INVALID; + p_cts->char_handles.cts_cccd_handle = BLE_GATT_HANDLE_INVALID; + + return ble_db_discovery_evt_register(&cts_uuid); +} + + +/**@brief Function for decoding a read from the current time characteristic. + * + * @param[in] p_time Current Time structure. + * @param[in] p_data Pointer to the buffer containing the current time. + * @param[in] length length of the buffer containing the current time. + * + * @return NRF_SUCCESS if the time struct is valid. + * @return NRF_ERROR_DATA_SIZE if length does not match the expected size of the data. + */ +static uint32_t current_time_decode(current_time_char_t * p_time, + const uint8_t * p_data, + const uint32_t length) +{ + //lint -save -e415 -e416 "Access of out of bounds pointer" "Creation of out of bounds pointer" + + if (length != CTS_C_CURRENT_TIME_EXPECTED_LENGTH) + { + // Return to prevent accessing out of bounds data. + return NRF_ERROR_DATA_SIZE; + } + + CTS_LOG("Current Time read response data: %02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X \r\n", + p_data[0], + p_data[1], + p_data[2], + p_data[3], + p_data[4], + p_data[5], + p_data[6], + p_data[7], + p_data[8], + p_data[9]); + + uint32_t index = 0; + + // Date. + index += ble_date_time_decode(&p_time->exact_time_256.day_date_time.date_time, p_data); + + // Day of week. + p_time->exact_time_256.day_date_time.day_of_week = p_data[index++]; + + // Fractions of a second. + p_time->exact_time_256.fractions256 = p_data[index++]; + + // Reason for updating the time. + p_time->adjust_reason.manual_time_update = (p_data[index] >> 0) & 0x01; + p_time->adjust_reason.external_reference_time_update = (p_data[index] >> 1) & 0x01; + p_time->adjust_reason.change_of_time_zone = (p_data[index] >> 2) & 0x01; + p_time->adjust_reason.change_of_daylight_savings_time = (p_data[index] >> 3) & 0x01; + + + //lint -restore + return NRF_SUCCESS; +} + + +/**@brief Function for decoding a read from the current time characteristic. + * + * @param[in] p_time Current Time struct. + * + * @return NRF_SUCCESS if the time struct is valid. + * @return NRF_ERROR_INVALID_DATA if the time is out of bounds. + */ +static uint32_t current_time_validate(current_time_char_t * p_time) +{ + // Year. + if ( (p_time->exact_time_256.day_date_time.date_time.year > CTS_YEAR_MAX) + || ((p_time->exact_time_256.day_date_time.date_time.year < CTS_YEAR_MIN) + && (p_time->exact_time_256.day_date_time.date_time.year != 0))) + { + return NRF_ERROR_INVALID_DATA; + } + + // Month. + if (p_time->exact_time_256.day_date_time.date_time.month > 12) + { + return NRF_ERROR_INVALID_DATA; + } + + // Day. + if (p_time->exact_time_256.day_date_time.date_time.day > 31) + { + return NRF_ERROR_INVALID_DATA; + } + + // Hours. + if (p_time->exact_time_256.day_date_time.date_time.hours > 23) + { + return NRF_ERROR_INVALID_DATA; + } + + // Minutes. + if (p_time->exact_time_256.day_date_time.date_time.minutes > 59) + { + return NRF_ERROR_INVALID_DATA; + } + + // Seconds. + if (p_time->exact_time_256.day_date_time.date_time.seconds > 59) + { + return NRF_ERROR_INVALID_DATA; + } + + // Day of week. + if (p_time->exact_time_256.day_date_time.day_of_week > 7) + { + return NRF_ERROR_INVALID_DATA; + } + + return NRF_SUCCESS; +} + + +/**@brief Function for reading the current time. The time is decoded, then it is validated. + * Depending on the outcome the cts event handler will be called with + * the current time event or an invalid time event. + * + * @param[in] p_cts Current Time Service client structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void current_time_read(ble_cts_c_t * p_cts, const ble_evt_t * p_ble_evt) +{ + ble_cts_c_evt_t evt; + uint32_t err_code = NRF_SUCCESS; + + // Check if the event is on the same connection as this cts instance + if (p_cts->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) + { + return; + } + + if (p_ble_evt->evt.gattc_evt.gatt_status == BLE_GATT_STATUS_SUCCESS) + { + err_code = current_time_decode(&evt.params.current_time, + p_ble_evt->evt.gattc_evt.params.read_rsp.data, + p_ble_evt->evt.gattc_evt.params.read_rsp.len); + + if (err_code != NRF_SUCCESS) + { + // The data length was invalid, decoding was not completed. + evt.evt_type = BLE_CTS_C_EVT_INVALID_TIME; + } + else + { + // Verify That the time is valid. + err_code = current_time_validate(&evt.params.current_time); + + if (err_code != NRF_SUCCESS) + { + // Invalid time received. + evt.evt_type = BLE_CTS_C_EVT_INVALID_TIME; + } + else + { + // Valid time reveiced. + evt.evt_type = BLE_CTS_C_EVT_CURRENT_TIME; + } + } + p_cts->evt_handler(p_cts, &evt); + } +} + + +/**@brief Function for handling the Disconnect event. + * + * @param[in] p_cts Current Time Service client structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_disconnect(ble_cts_c_t * p_cts, ble_evt_t const * p_ble_evt) +{ + if (p_cts->conn_handle == p_ble_evt->evt.gap_evt.conn_handle) + { + p_cts->conn_handle = BLE_CONN_HANDLE_INVALID; + } + + if (ble_cts_c_is_cts_discovered(p_cts)) + { + // There was a valid instance of cts on the peer. Send an event to the + // application, so that it can do any clean up related to this module. + ble_cts_c_evt_t evt; + + evt.evt_type = BLE_CTS_C_EVT_DISCONN_COMPLETE; + + p_cts->evt_handler(p_cts, &evt); + p_cts->char_handles.cts_handle = BLE_GATT_HANDLE_INVALID; + p_cts->char_handles.cts_cccd_handle = BLE_GATT_HANDLE_INVALID; + } +} + + +void ble_cts_c_on_ble_evt(ble_cts_c_t * p_cts, ble_evt_t const * p_ble_evt) +{ + CTS_LOG("[CTS]: BLE event handler called with event 0x%x\r\n", p_ble_evt->header.evt_id); + + switch (p_ble_evt->header.evt_id) + { + case BLE_GATTC_EVT_READ_RSP: + current_time_read(p_cts, p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + on_disconnect(p_cts, p_ble_evt); + break; + + default: + // No implementation needed. + break; + } +} + + +uint32_t ble_cts_c_current_time_read(ble_cts_c_t const * p_cts) +{ + if (!ble_cts_c_is_cts_discovered(p_cts)) + { + return NRF_ERROR_NOT_FOUND; + } + + return sd_ble_gattc_read(p_cts->conn_handle, p_cts->char_handles.cts_handle, 0); +} + + +uint32_t ble_cts_c_handles_assign(ble_cts_c_t * p_cts, + const uint16_t conn_handle, + const ble_cts_c_handles_t * p_peer_handles) +{ + VERIFY_PARAM_NOT_NULL(p_cts); + + p_cts->conn_handle = conn_handle; + if (p_peer_handles != NULL) + { + p_cts->char_handles.cts_cccd_handle = p_peer_handles->cts_cccd_handle; + p_cts->char_handles.cts_handle = p_peer_handles->cts_handle; + } + + return NRF_SUCCESS; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cts_c/ble_cts_c.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cts_c/ble_cts_c.h new file mode 100644 index 0000000000..ea453e2ed6 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cts_c/ble_cts_c.h @@ -0,0 +1,219 @@ +/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_sdk_srv_cts_c Current Time Service client + * @{ + * @ingroup ble_sdk_srv + * @brief Current Time Service client module. + * + * @details This module implements the Current Time Service (CTS) client-peripheral role of + * the Time Profile. After security is established, the module tries to discover the + * Current Time Service and Characteristic on the central side. If this succeeds, + * the application can trigger a read of the current time from the connected server. + * + * The module informs the application about a successful discovery using the + * @ref BLE_CTS_C_EVT_DISCOVERY_COMPLETE event. The handles for the CTS server is now + * available in the @ref ble_cts_c_evt_t structure. These handles must be assigned to an + * instance of CTS_C, using @ref ble_cts_c_handles_assign. For more information about + * service discovery, see the ble_discovery module documentation @ref lib_ble_db_discovery. + * + * The application can then use the function @ref ble_cts_c_current_time_read to read the + * current time. If the read succeeds, it will trigger either a + * @ref BLE_CTS_C_EVT_CURRENT_TIME event or a @ref BLE_CTS_C_EVT_INVALID_TIME event + * (depending on if the data that was read was actually a valid time), which is then sent + * to the application. The current time is then available in the params field of the + * passed @ref ble_cts_c_evt_t structure. + * + * @note The application must propagate BLE stack events to this module by calling + * ble_cts_c_on_ble_evt() from the @ref softdevice_handler callback function. + */ + +#ifndef BLE_CTS_C_H__ +#define BLE_CTS_C_H__ + +#include "ble_srv_common.h" +#include "ble_gattc.h" +#include "ble.h" +#include "ble_date_time.h" +#include "ble_db_discovery.h" +#include + + +/**@brief "Day Date Time" field of the "Exact Time 256" field of the Current Time Characteristic. */ +typedef struct +{ + ble_date_time_t date_time; + uint8_t day_of_week; +} day_date_time_t; + +/**@brief "Exact Time 256" field of the Current Time Characteristic. */ +typedef struct +{ + day_date_time_t day_date_time; + uint8_t fractions256; +} exact_time_256_t; + +/**@brief "Adjust Reason" field of the Current Time Characteristic. */ +typedef struct +{ + uint8_t manual_time_update : 1; + uint8_t external_reference_time_update : 1; + uint8_t change_of_time_zone : 1; + uint8_t change_of_daylight_savings_time : 1; +} adjust_reason_t; + +/**@brief Data structure for the Current Time Characteristic. */ +typedef struct +{ + exact_time_256_t exact_time_256; + adjust_reason_t adjust_reason; +} current_time_char_t; + +// Forward declaration of the ble_cts_c_t type. +typedef struct ble_cts_c_s ble_cts_c_t; + +/**@brief Current Time Service client event type. */ +typedef enum +{ + BLE_CTS_C_EVT_DISCOVERY_COMPLETE, /**< The Current Time Service was found at the peer. */ + BLE_CTS_C_EVT_DISCOVERY_FAILED, /**< The Current Time Service was not found at the peer. */ + BLE_CTS_C_EVT_DISCONN_COMPLETE, /**< Event indicating that the Current Time Service client module has finished processing the BLE_GAP_EVT_DISCONNECTED event. This event is raised only if a valid instance of the Current Time Service was found at the server. The event can be used by the application to do clean up related to the Current Time Service client.*/ + BLE_CTS_C_EVT_CURRENT_TIME, /**< A new current time reading has been received. */ + BLE_CTS_C_EVT_INVALID_TIME /**< The current time value received from the peer is invalid.*/ +} ble_cts_c_evt_type_t; + +/**@brief Structure containing the handles related to the Heart Rate Service found on the peer. */ +typedef struct +{ + uint16_t cts_handle; /**< Handle of the Current Time characteristic as provided by the SoftDevice. */ + uint16_t cts_cccd_handle; /**< Handle of the CCCD of the Current Time characteristic. */ +} ble_cts_c_handles_t; + +/**@brief Current Time Service client event. */ +typedef struct +{ + ble_cts_c_evt_type_t evt_type; /**< Type of event. */ + uint16_t conn_handle; /**< Connection handle on which the CTS service was discovered on the peer device. This will be filled if the evt_type is @ref BLE_CTS_C_EVT_DISCOVERY_COMPLETE.*/ + union + { + current_time_char_t current_time; /**< Current Time Characteristic data. This will be filled when the evt_type is @ref BLE_CTS_C_EVT_CURRENT_TIME. */ + ble_cts_c_handles_t char_handles; /**< Current Time related handles found on the peer device. This will be filled when the evt_type is @ref BLE_HRS_C_EVT_DISCOVERY_COMPLETE.*/ + } params; +} ble_cts_c_evt_t; + +/**@brief Current Time Service client event handler type. */ +typedef void (* ble_cts_c_evt_handler_t) (ble_cts_c_t * p_cts, ble_cts_c_evt_t * p_evt); + + +/**@brief Current Time Service client structure. This structure contains status information for the client. */ +struct ble_cts_c_s +{ + ble_cts_c_evt_handler_t evt_handler; /**< Event handler to be called for handling events from the Current Time Service client. */ + ble_srv_error_handler_t error_handler; /**< Function to be called if an error occurs. */ + ble_cts_c_handles_t char_handles; /**< Handles of Current Time Characteristic at the peer (handles are provided by the BLE stack through the DB Discovery module). */ + uint16_t conn_handle; /**< Handle of the current connection. BLE_CONN_HANDLE_INVALID if not in a connection. */ +}; + +/**@brief Current Time Service client init structure. This structure contains all options and data needed for initialization of the client.*/ +typedef struct +{ + ble_cts_c_evt_handler_t evt_handler; /**< Event handler to be called for handling events from the Current Time Service client. */ + ble_srv_error_handler_t error_handler; /**< Function to be called if an error occurs. */ +} ble_cts_c_init_t; + + +/**@brief Function for initializing the Current Time Service client. + * + * @details This function must be used by the application to initialize the Current Time Service client. + * + * @param[out] p_cts Current Time Service client structure. This structure must + * be supplied by the application. It is initialized by this + * function and can later be used to identify this particular client + * instance. + * @param[in] p_cts_init Information needed to initialize the Current Time Service client. + * + * @retval NRF_SUCCESS If the service was initialized successfully. + */ +uint32_t ble_cts_c_init(ble_cts_c_t * p_cts, const ble_cts_c_init_t * p_cts_init); + + +/**@brief Function for handling events from the database discovery module. + * + * @details This function will handle an event from the database discovery module, and determine + * if it relates to the discovery of CTS at the peer. If so, it will + * call the application's event handler indicating that CTS has been + * discovered. It also populates the event with the service related + * information before providing it to the application. + * + * @param[in] p_cts Pointer to the CTS client structure. + * @param[in] p_evt Pointer to the event received from the database discovery module. + */ + void ble_cts_c_on_db_disc_evt(ble_cts_c_t * p_cts, ble_db_discovery_evt_t * p_evt); + + +/**@brief Function for handling the application's BLE stack events. + * + * @details This function handles all events from the BLE stack that are of interest to the + * Current Time Service client. This is a callback function that must be dispatched + * from main application context. + * + * @param[in] p_cts Current Time Service client structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +void ble_cts_c_on_ble_evt(ble_cts_c_t * p_cts, const ble_evt_t * p_ble_evt); + + +/**@brief Function for checking whether the peer's Current Time Service instance and the Current Time + * Characteristic have been discovered. + * + * @param[in] p_cts Current Time Service client structure. + */ +static __INLINE bool ble_cts_c_is_cts_discovered(const ble_cts_c_t * p_cts) +{ + return (p_cts->char_handles.cts_handle != BLE_GATT_HANDLE_INVALID); +} + + +/**@brief Function for reading the peer's Current Time Service Current Time Characteristic. + * + * @param[in] p_cts Current Time Service client structure. + * + * @retval NRF_SUCCESS If the operation is successful. Otherwise, an error code is returned. + */ +uint32_t ble_cts_c_current_time_read(ble_cts_c_t const * p_cts); + + +/**@brief Function for assigning handles to a this instance of cts_c. + * + * @details Call this function when a link has been established with a peer to + * associate the link to this instance of the module. This makes it + * possible to handle several links and associate each link to a particular + * instance of this module. The connection handle and attribute handles will be + * provided from the discovery event @ref BLE_CTS_C_EVT_DISCOVERY_COMPLETE. + * + * @param[in] p_cts Pointer to the CTS client structure instance to associate. + * @param[in] conn_handle Connection handle to associated with the given CTS instance. + * @param[in] p_peer_handles Attribute handles for the CTS server you want this CTS client to + * interact with. + * + * @retval NRF_SUCCESS If the operation was successful. + * @retval NRF_ERROR_NULL If a p_cts was a NULL pointer. + */ +uint32_t ble_cts_c_handles_assign(ble_cts_c_t * p_cts, + const uint16_t conn_handle, + const ble_cts_c_handles_t * p_peer_handles); + +#endif // BLE_CTS_C_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.c new file mode 100644 index 0000000000..635d211dad --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.c @@ -0,0 +1,649 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "ble_dfu.h" +#include "ble_types.h" +#include "ble_gatts.h" +#include "ble_srv_common.h" +#include +#include "sdk_common.h" + +#define MAX_DFU_PKT_LEN 20 /**< Maximum length (in bytes) of the DFU Packet characteristic. */ +#define PKT_START_DFU_PARAM_LEN 2 /**< Length (in bytes) of the parameters for Packet Start DFU Request. */ +#define PKT_INIT_DFU_PARAM_LEN 2 /**< Length (in bytes) of the parameters for Packet Init DFU Request. */ +#define PKT_RCPT_NOTIF_REQ_LEN 3 /**< Length (in bytes) of the Packet Receipt Notification Request. */ +#define MAX_PKTS_RCPT_NOTIF_LEN 6 /**< Maximum length (in bytes) of the Packets Receipt Notification. */ +#define MAX_RESPONSE_LEN 7 /**< Maximum length (in bytes) of the response to a Control Point command. */ +#define MAX_NOTIF_BUFFER_LEN MAX(MAX_PKTS_RCPT_NOTIF_LEN, MAX_RESPONSE_LEN) /**< Maximum length (in bytes) of the buffer needed by DFU Service while sending notifications to peer. */ + +enum +{ + OP_CODE_START_DFU = 1, /**< Value of the Op code field for 'Start DFU' command.*/ + OP_CODE_RECEIVE_INIT = 2, /**< Value of the Op code field for 'Initialize DFU parameters' command.*/ + OP_CODE_RECEIVE_FW = 3, /**< Value of the Op code field for 'Receive firmware image' command.*/ + OP_CODE_VALIDATE = 4, /**< Value of the Op code field for 'Validate firmware' command.*/ + OP_CODE_ACTIVATE_N_RESET = 5, /**< Value of the Op code field for 'Activate & Reset' command.*/ + OP_CODE_SYS_RESET = 6, /**< Value of the Op code field for 'Reset System' command.*/ + OP_CODE_IMAGE_SIZE_REQ = 7, /**< Value of the Op code field for 'Report received image size' command.*/ + OP_CODE_PKT_RCPT_NOTIF_REQ = 8, /**< Value of the Op code field for 'Request packet receipt notification.*/ + OP_CODE_RESPONSE = 16, /**< Value of the Op code field for 'Response.*/ + OP_CODE_PKT_RCPT_NOTIF = 17 /**< Value of the Op code field for 'Packets Receipt Notification'.*/ +}; + +static bool m_is_dfu_service_initialized = false; /**< Variable to check if the DFU service was initialized by the application.*/ +static uint8_t m_notif_buffer[MAX_NOTIF_BUFFER_LEN]; /**< Buffer used for sending notifications to peer. */ + +/**@brief Function for adding DFU Packet characteristic to the BLE Stack. + * + * @param[in] p_dfu DFU Service structure. + * + * @return NRF_SUCCESS on success. Otherwise an error code. + */ +static uint32_t dfu_pkt_char_add(ble_dfu_t * const p_dfu) +{ + 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; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.write_wo_resp = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = NULL; + char_md.p_sccd_md = NULL; + + char_uuid.type = p_dfu->uuid_type; + char_uuid.uuid = BLE_DFU_PKT_CHAR_UUID; + + memset(&attr_md, 0, sizeof(attr_md)); + + BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.read_perm); + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.write_perm); + + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 1; + + 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.init_len = 0; + attr_char_value.init_offs = 0; + attr_char_value.max_len = MAX_DFU_PKT_LEN; + attr_char_value.p_value = NULL; + + return sd_ble_gatts_characteristic_add(p_dfu->service_handle, + &char_md, + &attr_char_value, + &p_dfu->dfu_pkt_handles); +} + + +/**@brief Function for adding DFU Revision characteristic to the BLE Stack. + * + * @param[in] p_dfu DFU Service structure. + * + * @return NRF_SUCCESS on success. Otherwise an error code. + */ +static uint32_t dfu_rev_char_add(ble_dfu_t * const p_dfu, ble_dfu_init_t const * const p_dfu_init) +{ + 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; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.read = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = NULL; + char_md.p_sccd_md = NULL; + + char_uuid.type = p_dfu->uuid_type; + char_uuid.uuid = BLE_DFU_REV_CHAR_UUID; + + memset(&attr_md, 0, sizeof(attr_md)); + + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.read_perm); + BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.write_perm); + + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 1; + + 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.init_len = sizeof(uint16_t); + attr_char_value.init_offs = 0; + attr_char_value.max_len = sizeof(uint16_t); + attr_char_value.p_value = (uint8_t *)&p_dfu_init->revision; + + return sd_ble_gatts_characteristic_add(p_dfu->service_handle, + &char_md, + &attr_char_value, + &p_dfu->dfu_rev_handles); +} + + +/**@brief Function for adding DFU Control Point characteristic to the BLE Stack. + * + * @param[in] p_dfu DFU Service structure. + * + * @return NRF_SUCCESS on success. Otherwise an error code. + */ +static uint32_t dfu_ctrl_pt_add(ble_dfu_t * const p_dfu) +{ + 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; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.write = 1; + char_md.char_props.notify = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = NULL; + char_md.p_sccd_md = NULL; + + char_uuid.type = p_dfu->uuid_type; + char_uuid.uuid = BLE_DFU_CTRL_PT_UUID; + + memset(&attr_md, 0, sizeof(attr_md)); + + BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.read_perm); + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.write_perm); + + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 1; + attr_md.vlen = 1; + + 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.init_len = 0; + attr_char_value.init_offs = 0; + attr_char_value.max_len = BLE_L2CAP_MTU_DEF; + attr_char_value.p_value = NULL; + + return sd_ble_gatts_characteristic_add(p_dfu->service_handle, + &char_md, + &attr_char_value, + &p_dfu->dfu_ctrl_pt_handles); +} + + +/**@brief Function for handling the @ref BLE_GAP_EVT_CONNECTED event from the S110 SoftDevice. + * + * @param[in] p_dfu DFU Service Structure. + * @param[in] p_ble_evt Pointer to the event received from BLE stack. + */ +static void on_connect(ble_dfu_t * p_dfu, ble_evt_t * p_ble_evt) +{ + p_dfu->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; +} + + +/**@brief Function for checking if the CCCD of DFU Control point is configured for Notification. + * + * @details This function checks if the CCCD of DFU Control Point characteristic is configured + * for Notification by the DFU Controller. + * + * @param[in] p_dfu DFU Service structure. + * + * @return True if the CCCD of DFU Control Point characteristic is configured for Notification. + * False otherwise. + */ +static bool is_cccd_configured(ble_dfu_t * p_dfu) +{ + // Check if the CCCDs are configured. + uint8_t cccd_val_buf[BLE_CCCD_VALUE_LEN]; + ble_gatts_value_t gatts_value; + + // Initialize value struct. + memset(&gatts_value, 0, sizeof(gatts_value)); + + gatts_value.len = BLE_CCCD_VALUE_LEN; + gatts_value.offset = 0; + gatts_value.p_value = cccd_val_buf; + + // Check the CCCD Value of DFU Control Point. + uint32_t err_code = sd_ble_gatts_value_get(p_dfu->conn_handle, + p_dfu->dfu_ctrl_pt_handles.cccd_handle, + &gatts_value); + if (err_code != NRF_SUCCESS) + { + if (p_dfu->error_handler != NULL) + { + p_dfu->error_handler(err_code); + } + return false; + } + + return ble_srv_is_notification_enabled(cccd_val_buf); +} + + +/**@brief Function for handling a Write event on the Control Point characteristic. + * + * @param[in] p_dfu DFU Service Structure. + * @param[in] p_ble_write_evt Pointer to the write event received from BLE stack. + * + * @return NRF_SUCCESS on successful processing of control point write. Otherwise an error code. + */ +static uint32_t on_ctrl_pt_write(ble_dfu_t * p_dfu, ble_gatts_evt_write_t * p_ble_write_evt) +{ + ble_gatts_rw_authorize_reply_params_t auth_reply; + + auth_reply.type = BLE_GATTS_AUTHORIZE_TYPE_WRITE; + auth_reply.type = BLE_GATTS_AUTHORIZE_TYPE_WRITE; + auth_reply.params.write.update = 1; + auth_reply.params.write.offset = p_ble_write_evt->offset; + auth_reply.params.write.len = p_ble_write_evt->len; + auth_reply.params.write.p_data = p_ble_write_evt->data; + + + if (!is_cccd_configured(p_dfu)) + { + // Send an error response to the peer indicating that the CCCD is improperly configured. + auth_reply.params.write.gatt_status = + BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR; + + return (sd_ble_gatts_rw_authorize_reply(p_dfu->conn_handle, &auth_reply)); + + } + else + { + uint32_t err_code; + + auth_reply.params.write.gatt_status = BLE_GATT_STATUS_SUCCESS; + + err_code = (sd_ble_gatts_rw_authorize_reply(p_dfu->conn_handle, &auth_reply)); + VERIFY_SUCCESS(err_code); + } + + ble_dfu_evt_t ble_dfu_evt; + + switch (p_ble_write_evt->data[0]) + { + case OP_CODE_START_DFU: + ble_dfu_evt.ble_dfu_evt_type = BLE_DFU_START; + + if (p_ble_write_evt->len < PKT_START_DFU_PARAM_LEN) + { + return ble_dfu_response_send(p_dfu, + (ble_dfu_procedure_t) p_ble_write_evt->data[0], + BLE_DFU_RESP_VAL_OPER_FAILED); + } + + ble_dfu_evt.evt.ble_dfu_pkt_write.len = 1; + ble_dfu_evt.evt.ble_dfu_pkt_write.p_data = &(p_ble_write_evt->data[1]); + + p_dfu->evt_handler(p_dfu, &ble_dfu_evt); + break; + + case OP_CODE_RECEIVE_INIT: + ble_dfu_evt.ble_dfu_evt_type = BLE_DFU_RECEIVE_INIT_DATA; + + if (p_ble_write_evt->len < PKT_INIT_DFU_PARAM_LEN) + { + return ble_dfu_response_send(p_dfu, + (ble_dfu_procedure_t) p_ble_write_evt->data[0], + BLE_DFU_RESP_VAL_OPER_FAILED); + } + + ble_dfu_evt.evt.ble_dfu_pkt_write.len = 1; + ble_dfu_evt.evt.ble_dfu_pkt_write.p_data = &(p_ble_write_evt->data[1]); + + p_dfu->evt_handler(p_dfu, &ble_dfu_evt); + break; + + case OP_CODE_RECEIVE_FW: + ble_dfu_evt.ble_dfu_evt_type = BLE_DFU_RECEIVE_APP_DATA; + + p_dfu->evt_handler(p_dfu, &ble_dfu_evt); + break; + + case OP_CODE_VALIDATE: + ble_dfu_evt.ble_dfu_evt_type = BLE_DFU_VALIDATE; + + p_dfu->evt_handler(p_dfu, &ble_dfu_evt); + break; + + case OP_CODE_ACTIVATE_N_RESET: + ble_dfu_evt.ble_dfu_evt_type = BLE_DFU_ACTIVATE_N_RESET; + + p_dfu->evt_handler(p_dfu, &ble_dfu_evt); + break; + + case OP_CODE_SYS_RESET: + ble_dfu_evt.ble_dfu_evt_type = BLE_DFU_SYS_RESET; + + p_dfu->evt_handler(p_dfu, &ble_dfu_evt); + break; + + case OP_CODE_PKT_RCPT_NOTIF_REQ: + if (p_ble_write_evt->len < PKT_RCPT_NOTIF_REQ_LEN) + { + return (ble_dfu_response_send(p_dfu, + BLE_DFU_PKT_RCPT_REQ_PROCEDURE, + BLE_DFU_RESP_VAL_NOT_SUPPORTED)); + } + + ble_dfu_evt.evt.pkt_rcpt_notif_req.num_of_pkts = + uint16_decode(&(p_ble_write_evt->data[1])); + + if (ble_dfu_evt.evt.pkt_rcpt_notif_req.num_of_pkts == 0) + { + ble_dfu_evt.ble_dfu_evt_type = BLE_DFU_PKT_RCPT_NOTIF_DISABLED; + } + else + { + ble_dfu_evt.ble_dfu_evt_type = BLE_DFU_PKT_RCPT_NOTIF_ENABLED; + } + + p_dfu->evt_handler(p_dfu, &ble_dfu_evt); + + break; + + case OP_CODE_IMAGE_SIZE_REQ: + ble_dfu_evt.ble_dfu_evt_type = BLE_DFU_BYTES_RECEIVED_SEND; + + p_dfu->evt_handler(p_dfu, &ble_dfu_evt); + break; + + default: + // Unsupported op code. + return ble_dfu_response_send(p_dfu, + (ble_dfu_procedure_t) p_ble_write_evt->data[0], + BLE_DFU_RESP_VAL_NOT_SUPPORTED); + } + return NRF_SUCCESS; +} + + +/**@brief Function for handling the @ref BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST event from the S110 + * Stack. + * + * @param[in] p_dfu DFU Service Structure. + * @param[in] p_ble_evt Pointer to the event received from BLE stack. + */ +static void on_rw_authorize_req(ble_dfu_t * p_dfu, ble_evt_t * p_ble_evt) +{ + ble_gatts_evt_rw_authorize_request_t * p_authorize_request; + + p_authorize_request = &(p_ble_evt->evt.gatts_evt.params.authorize_request); + + if ( + (p_authorize_request->type == BLE_GATTS_AUTHORIZE_TYPE_WRITE) + && + (p_authorize_request->request.write.handle == p_dfu->dfu_ctrl_pt_handles.value_handle) + && + (p_ble_evt->evt.gatts_evt.params.authorize_request.request.write.op != BLE_GATTS_OP_PREP_WRITE_REQ) + && + (p_ble_evt->evt.gatts_evt.params.authorize_request.request.write.op != BLE_GATTS_OP_EXEC_WRITE_REQ_NOW) + && + (p_ble_evt->evt.gatts_evt.params.authorize_request.request.write.op != BLE_GATTS_OP_EXEC_WRITE_REQ_CANCEL) + ) + { + uint32_t err_code; + + err_code = on_ctrl_pt_write(p_dfu, &(p_authorize_request->request.write)); + + if (err_code != NRF_SUCCESS && p_dfu->error_handler != NULL) + { + p_dfu->error_handler(err_code); + } + } +} + + +/**@brief Function for handling the @ref BLE_GATTS_EVT_WRITE event from the S110 SoftDevice. + * + * @param[in] p_dfu DFU Service Structure. + * @param[in] p_ble_evt Pointer to the event received from BLE stack. + */ +static void on_write(ble_dfu_t * p_dfu, ble_evt_t * p_ble_evt) +{ + if (p_ble_evt->evt.gatts_evt.params.write.handle == p_dfu->dfu_pkt_handles.value_handle) + { + // DFU Packet written + + ble_dfu_evt_t ble_dfu_evt; + + ble_dfu_evt.ble_dfu_evt_type = BLE_DFU_PACKET_WRITE; + ble_dfu_evt.evt.ble_dfu_pkt_write.len = p_ble_evt->evt.gatts_evt.params.write.len; + ble_dfu_evt.evt.ble_dfu_pkt_write.p_data = p_ble_evt->evt.gatts_evt.params.write.data; + + p_dfu->evt_handler(p_dfu, &ble_dfu_evt); + } +} + + +/**@brief Function for handling the BLE_GAP_EVT_DISCONNECTED event from the S110 SoftDevice. + * + * @param[in] p_dfu DFU Service Structure. + * @param[in] p_ble_evt Pointer to the event received from BLE stack. + */ +static void on_disconnect(ble_dfu_t * p_dfu, ble_evt_t * p_ble_evt) +{ + p_dfu->conn_handle = BLE_CONN_HANDLE_INVALID; +} + + +uint32_t ble_dfu_init(ble_dfu_t * p_dfu, ble_dfu_init_t * p_dfu_init) +{ + if ((p_dfu == NULL) || (p_dfu_init == NULL) || (p_dfu_init->evt_handler == NULL)) + { + return NRF_ERROR_NULL; + } + + p_dfu->conn_handle = BLE_CONN_HANDLE_INVALID; + + ble_uuid_t service_uuid; + uint32_t err_code; + + const ble_uuid128_t base_uuid128 = + { + { + 0x23, 0xD1, 0xBC, 0xEA, 0x5F, 0x78, 0x23, 0x15, + 0xDE, 0xEF, 0x12, 0x12, 0x00, 0x00, 0x00, 0x00 + } + }; + + service_uuid.uuid = BLE_DFU_SERVICE_UUID; + + err_code = sd_ble_uuid_vs_add(&base_uuid128, &(service_uuid.type)); + VERIFY_SUCCESS(err_code); + + err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, + &service_uuid, + &(p_dfu->service_handle)); + VERIFY_SUCCESS(err_code); + + p_dfu->uuid_type = service_uuid.type; + + err_code = dfu_pkt_char_add(p_dfu); + VERIFY_SUCCESS(err_code); + + err_code = dfu_ctrl_pt_add(p_dfu); + VERIFY_SUCCESS(err_code); + + err_code = dfu_rev_char_add(p_dfu, p_dfu_init); + VERIFY_SUCCESS(err_code); + + p_dfu->evt_handler = p_dfu_init->evt_handler; + + if (p_dfu_init->error_handler != NULL) + { + p_dfu->error_handler = p_dfu_init->error_handler; + } + + m_is_dfu_service_initialized = true; + + return NRF_SUCCESS; +} + + +void ble_dfu_on_ble_evt(ble_dfu_t * p_dfu, ble_evt_t * p_ble_evt) +{ + if ((p_dfu == NULL) || (p_ble_evt == NULL)) + { + return; + } + + if (p_dfu->evt_handler != NULL) + { + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + on_connect(p_dfu, p_ble_evt); + break; + + case BLE_GATTS_EVT_WRITE: + on_write(p_dfu, p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + on_disconnect(p_dfu, p_ble_evt); + break; + + case BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST: + on_rw_authorize_req(p_dfu, p_ble_evt); + break; + + default: + // No implementation needed. + break; + } + } +} + + +uint32_t ble_dfu_bytes_rcvd_report(ble_dfu_t * p_dfu, uint32_t num_of_firmware_bytes_rcvd) +{ + if (p_dfu == NULL) + { + return NRF_ERROR_NULL; + } + + if ((p_dfu->conn_handle == BLE_CONN_HANDLE_INVALID) || !m_is_dfu_service_initialized) + { + return NRF_ERROR_INVALID_STATE; + } + + ble_gatts_hvx_params_t hvx_params; + uint16_t index = 0; + + // Encode the Op Code. + m_notif_buffer[index++] = OP_CODE_RESPONSE; + + // Encode the Reqest Op Code. + m_notif_buffer[index++] = OP_CODE_IMAGE_SIZE_REQ; + + // Encode the Response Value. + m_notif_buffer[index++] = (uint8_t)BLE_DFU_RESP_VAL_SUCCESS; + + index += uint32_encode(num_of_firmware_bytes_rcvd, &m_notif_buffer[index]); + + memset(&hvx_params, 0, sizeof(hvx_params)); + + hvx_params.handle = p_dfu->dfu_ctrl_pt_handles.value_handle; + hvx_params.type = BLE_GATT_HVX_NOTIFICATION; + hvx_params.offset = 0; + hvx_params.p_len = &index; + hvx_params.p_data = m_notif_buffer; + + return sd_ble_gatts_hvx(p_dfu->conn_handle, &hvx_params); +} + + +uint32_t ble_dfu_pkts_rcpt_notify(ble_dfu_t * p_dfu, uint32_t num_of_firmware_bytes_rcvd) +{ + if (p_dfu == NULL) + { + return NRF_ERROR_NULL; + } + + if ((p_dfu->conn_handle == BLE_CONN_HANDLE_INVALID) || !m_is_dfu_service_initialized) + { + return NRF_ERROR_INVALID_STATE; + } + + ble_gatts_hvx_params_t hvx_params; + uint16_t index = 0; + + m_notif_buffer[index++] = OP_CODE_PKT_RCPT_NOTIF; + + index += uint32_encode(num_of_firmware_bytes_rcvd, &m_notif_buffer[index]); + + memset(&hvx_params, 0, sizeof(hvx_params)); + + hvx_params.handle = p_dfu->dfu_ctrl_pt_handles.value_handle; + hvx_params.type = BLE_GATT_HVX_NOTIFICATION; + hvx_params.offset = 0; + hvx_params.p_len = &index; + hvx_params.p_data = m_notif_buffer; + + return sd_ble_gatts_hvx(p_dfu->conn_handle, &hvx_params); +} + + +uint32_t ble_dfu_response_send(ble_dfu_t * p_dfu, + ble_dfu_procedure_t dfu_proc, + ble_dfu_resp_val_t resp_val) +{ + if (p_dfu == NULL) + { + return NRF_ERROR_NULL; + } + + if ((p_dfu->conn_handle == BLE_CONN_HANDLE_INVALID) || !m_is_dfu_service_initialized) + { + return NRF_ERROR_INVALID_STATE; + } + + ble_gatts_hvx_params_t hvx_params; + uint16_t index = 0; + + m_notif_buffer[index++] = OP_CODE_RESPONSE; + + // Encode the Request Op code + m_notif_buffer[index++] = (uint8_t)dfu_proc; + + // Encode the Response Value. + m_notif_buffer[index++] = (uint8_t)resp_val; + + memset(&hvx_params, 0, sizeof(hvx_params)); + + hvx_params.handle = p_dfu->dfu_ctrl_pt_handles.value_handle; + hvx_params.type = BLE_GATT_HVX_NOTIFICATION; + hvx_params.offset = 0; + hvx_params.p_len = &index; + hvx_params.p_data = m_notif_buffer; + + return sd_ble_gatts_hvx(p_dfu->conn_handle, &hvx_params); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.h new file mode 100644 index 0000000000..906febc43f --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.h @@ -0,0 +1,239 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/**@file + * + * @defgroup ble_sdk_srv_dfu Device Firmware Update Service + * @{ + * @ingroup ble_sdk_srv + * @brief Device Firmware Update Service + * + * @details The Device Firmware Update (DFU) service is a GATT based service that can be used for + * performing firmware updates over BLE. Note that this implementation uses vendor + * specific UUIDs for service and characteristics and is intended to demonstrate the + * firmware updates over BLE. Refer @ref bledfu_transport_bleservice and @ref + * bledfu_transport_bleprofile for more information on the service and profile respectively. + */ + +#ifndef BLE_DFU_H__ +#define BLE_DFU_H__ + +#include +#include "ble_gatts.h" +#include "ble_gap.h" +#include "ble.h" +#include "ble_srv_common.h" + +#define BLE_DFU_SERVICE_UUID 0x1530 /**< The UUID of the DFU Service. */ +#define BLE_DFU_PKT_CHAR_UUID 0x1532 /**< The UUID of the DFU Packet Characteristic. */ +#define BLE_DFU_CTRL_PT_UUID 0x1531 /**< The UUID of the DFU Control Point. */ +#define BLE_DFU_STATUS_REP_UUID 0x1533 /**< The UUID of the DFU Status Report Characteristic. */ +#define BLE_DFU_REV_CHAR_UUID 0x1534 /**< The UUID of the DFU Revision Characteristic. */ + +/**@brief DFU Event type. + * + * @details This enumeration contains the types of events that will be received from the DFU Service. + */ +typedef enum +{ + BLE_DFU_START, /**< The event indicating that the peer wants the application to prepare for a new firmware update. */ + BLE_DFU_RECEIVE_INIT_DATA, /**< The event indicating that the peer wants the application to prepare to receive init parameters. */ + BLE_DFU_RECEIVE_APP_DATA, /**< The event indicating that the peer wants the application to prepare to receive the new firmware image. */ + BLE_DFU_VALIDATE, /**< The event indicating that the peer wants the application to validate the newly received firmware image. */ + BLE_DFU_ACTIVATE_N_RESET, /**< The event indicating that the peer wants the application to undergo activate new firmware and restart with new valid application */ + BLE_DFU_SYS_RESET, /**< The event indicating that the peer wants the application to undergo a reset and start the currently valid application image.*/ + BLE_DFU_PKT_RCPT_NOTIF_ENABLED, /**< The event indicating that the peer has enabled packet receipt notifications. It is the responsibility of the application to call @ref ble_dfu_pkts_rcpt_notify each time the number of packets indicated by num_of_pkts field in @ref ble_dfu_evt_t is received.*/ + BLE_DFU_PKT_RCPT_NOTIF_DISABLED, /**< The event indicating that the peer has disabled the packet receipt notifications.*/ + BLE_DFU_PACKET_WRITE, /**< The event indicating that the peer has written a value to the 'DFU Packet' characteristic. The data received from the peer will be present in the @ref BLE_DFU_PACKET_WRITE element contained within @ref ble_dfu_evt_t.*/ + BLE_DFU_BYTES_RECEIVED_SEND /**< The event indicating that the peer is requesting for the number of bytes of firmware data last received by the application. It is the responsibility of the application to call @ref ble_dfu_pkts_rcpt_notify in response to this event. */ +} ble_dfu_evt_type_t; + +/**@brief DFU Procedure type. + * + * @details This enumeration contains the types of DFU procedures. + */ +typedef enum +{ + BLE_DFU_START_PROCEDURE = 1, /**< DFU Start procedure.*/ + BLE_DFU_INIT_PROCEDURE = 2, /**< DFU Initialization procedure.*/ + BLE_DFU_RECEIVE_APP_PROCEDURE = 3, /**< Firmware receiving procedure.*/ + BLE_DFU_VALIDATE_PROCEDURE = 4, /**< Firmware image validation procedure .*/ + BLE_DFU_PKT_RCPT_REQ_PROCEDURE = 8 /**< Packet receipt notification request procedure. */ +} ble_dfu_procedure_t; + +/**@brief DFU Response value type. + */ +typedef enum +{ + BLE_DFU_RESP_VAL_SUCCESS = 1, /**< Success.*/ + BLE_DFU_RESP_VAL_INVALID_STATE, /**< Invalid state.*/ + BLE_DFU_RESP_VAL_NOT_SUPPORTED, /**< Operation not supported.*/ + BLE_DFU_RESP_VAL_DATA_SIZE, /**< Data size exceeds limit.*/ + BLE_DFU_RESP_VAL_CRC_ERROR, /**< CRC Error.*/ + BLE_DFU_RESP_VAL_OPER_FAILED /**< Operation failed.*/ +} ble_dfu_resp_val_t; + + +/**@brief DFU Packet structure. + * + * @details This structure contains the value of the DFU Packet characteristic as written by the + * peer and the length of the value written. It will be filled by the DFU Service when the + * peer writes to the DFU Packet characteristic. + */ +typedef struct +{ + 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; + +/**@brief Packet receipt notification request structure. + * + * @details This structure contains the contents of the packet receipt notification request + * sent by the DFU Controller. + */ +typedef struct +{ + uint16_t num_of_pkts; /**< The number of packets of firmware data to be received by application before sending the next Packet Receipt Notification to the peer. */ +} ble_pkt_rcpt_notif_req_t; + +/**@brief DFU Event structure. + * + * @details This structure contains the event generated by the DFU Service based on the data + * received from the peer. + */ +typedef struct +{ + ble_dfu_evt_type_t ble_dfu_evt_type; /**< Type of the event.*/ + union + { + ble_dfu_pkt_write_t ble_dfu_pkt_write; /**< The DFU packet received. This field is when the @ref ble_dfu_evt_type field is set to @ref BLE_DFU_PACKET_WRITE.*/ + ble_pkt_rcpt_notif_req_t pkt_rcpt_notif_req; /**< Packet receipt notification request. This field is when the @ref ble_dfu_evt_type field is set to @ref BLE_DFU_PKT_RCPT_NOTIF_ENABLED.*/ + } evt; +} ble_dfu_evt_t; + +// Forward declaration of the ble_dfu_t type. +typedef struct ble_dfu_s ble_dfu_t; + +/**@brief DFU Service event handler type. */ +typedef void (*ble_dfu_evt_handler_t) (ble_dfu_t * p_dfu, ble_dfu_evt_t * p_evt); + +/**@brief DFU service structure. + * + * @details This structure contains status information related to the service. + */ +struct ble_dfu_s +{ + uint16_t conn_handle; /**< Handle of the current connection (as provided by the SoftDevice). This will be BLE_CONN_HANDLE_INVALID when not in a connection. */ + uint16_t revision; /**< Handle of DFU Service (as provided by the SoftDevice). */ + uint16_t service_handle; /**< Handle of DFU Service (as provided by the SoftDevice). */ + uint8_t uuid_type; /**< UUID type assigned for DFU Service by the SoftDevice. */ + ble_gatts_char_handles_t dfu_pkt_handles; /**< Handles related to the DFU Packet characteristic. */ + ble_gatts_char_handles_t dfu_ctrl_pt_handles; /**< Handles related to the DFU Control Point characteristic. */ + ble_gatts_char_handles_t dfu_status_rep_handles; /**< Handles related to the DFU Status Report characteristic. */ + ble_gatts_char_handles_t dfu_rev_handles; /**< Handles related to the DFU Revision characteristic. */ + ble_dfu_evt_handler_t evt_handler; /**< The event handler to be called when an event is to be sent to the application.*/ + ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ +}; + +/**@brief DFU service initialization structure. + * + * @details This structure contains the initialization information for the DFU Service. The + * application needs to fill this structure and pass it to the DFU Service using the + * @ref ble_dfu_init function. + */ +typedef struct +{ + uint16_t revision; /**< Revision number to be exposed by the DFU service. */ + ble_dfu_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Device Firmware Update Service. */ + ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ +} ble_dfu_init_t; + +/**@brief Function for handling a BLE event. + * + * @details The DFU service expects the application to call this function each time an event + * is received from the SoftDevice. This function processes the event, if it is + * relevant for the DFU service and calls the DFU event handler of the application if + * necessary. + * + * @param[in] p_dfu Pointer to the DFU service structure. + * @param[in] p_ble_evt Pointer to the event received from SoftDevice. + */ +void ble_dfu_on_ble_evt(ble_dfu_t * p_dfu, ble_evt_t * p_ble_evt); + +/**@brief Function for initializing the DFU service. + * + * @param[out] p_dfu Device Firmware Update service structure. This structure will have to be + * supplied by the application. It will be initialized by this function, + * and will later be used to identify the service instance. + * @param[in] p_dfu_init Information needed to initialize the service. + * + * @return NRF_SUCCESS if the DFU service and its characteristics were successfully added to the + * SoftDevice. Otherwise an error code. + * This function returns NRF_ERROR_NULL if the value of evt_handler in p_dfu_init + * structure provided is NULL or if the pointers supplied as input are NULL. + */ +uint32_t ble_dfu_init(ble_dfu_t * p_dfu, ble_dfu_init_t * p_dfu_init); + +/**@brief Function for sending response to a control point command. + * + * @details This function will encode a DFU Control Point response using the given input + * parameters and will send a notification of the same to the peer. + * + * @param[in] p_dfu Pointer to the DFU service structure. + * @param[in] dfu_proc Procedure for which this response is to be sent. + * @param[in] resp_val Response value. + * + * @return NRF_SUCCESS if the DFU Service has successfully requested the SoftDevice to + * send the notification. Otherwise an error code. + * This function returns NRF_ERROR_INVALID_STATE if the device is not connected to a + * peer or if the DFU service is not initialized or if the notification of the DFU + * Status Report characteristic was not enabled by the peer. It returns NRF_ERROR_NULL + * if the pointer p_dfu is NULL. + */ +uint32_t ble_dfu_response_send(ble_dfu_t * p_dfu, + ble_dfu_procedure_t dfu_proc, + ble_dfu_resp_val_t resp_val); + +/**@brief Function for notifying the peer about the number of bytes of firmware data received. + * + * @param[in] p_dfu Pointer to the DFU service structure. + * @param[in] num_of_firmware_bytes_rcvd Number of bytes. + * + * @return NRF_SUCCESS if the DFU Service has successfully requested the SoftDevice to send + * the notification. Otherwise an error code. + * This function returns NRF_ERROR_INVALID_STATE if the device is not connected to a + * peer or if the DFU service is not initialized or if the notification of the DFU + * Status Report characteristic was not enabled by the peer. It returns NRF_ERROR_NULL + * if the pointer p_dfu is NULL. + */ +uint32_t ble_dfu_bytes_rcvd_report(ble_dfu_t * p_dfu, uint32_t num_of_firmware_bytes_rcvd); + +/**@brief Function for sending Packet Receipt Notification to the peer. + * + * This function will encode the number of bytes received as input parameter into a + * notification of the control point characteristic and send it to the peer. + * + * @param[in] p_dfu Pointer to the DFU service structure. + * @param[in] num_of_firmware_bytes_rcvd Number of bytes of firmware image received. + * + * @return NRF_SUCCESS if the DFU Service has successfully requested the SoftDevice to send + * the notification. Otherwise an error code. + * This function returns NRF_ERROR_INVALID_STATE if the device is not connected to a + * peer or if the DFU service is not initialized or if the notification of the DFU + * Status Report characteristic was not enabled by the peer. It returns NRF_ERROR_NULL + * if the pointer p_dfu is NULL. + */ +uint32_t ble_dfu_pkts_rcpt_notify(ble_dfu_t * p_dfu, uint32_t num_of_firmware_bytes_rcvd); + +#endif // BLE_DFU_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dis/ble_dis.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dis/ble_dis.c new file mode 100644 index 0000000000..72abc58784 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dis/ble_dis.c @@ -0,0 +1,277 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/* Attention! +* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile +* qualification listings, this section of source code must not be modified. +*/ + +#include "ble_dis.h" + +#include +#include +#include "app_error.h" +#include "ble_gatts.h" +#include "nordic_common.h" +#include "ble_srv_common.h" +#include "app_util.h" + + +#define BLE_DIS_SYS_ID_LEN 8 /**< Length of System ID Characteristic Value. */ +#define BLE_DIS_PNP_ID_LEN 7 /**< Length of Pnp ID Characteristic Value. */ + +static uint16_t service_handle; +static ble_gatts_char_handles_t manufact_name_handles; +static ble_gatts_char_handles_t model_num_handles; +static ble_gatts_char_handles_t serial_num_handles; +static ble_gatts_char_handles_t hw_rev_handles; +static ble_gatts_char_handles_t fw_rev_handles; +static ble_gatts_char_handles_t sw_rev_handles; +static ble_gatts_char_handles_t sys_id_handles; +static ble_gatts_char_handles_t reg_cert_data_list_handles; +static ble_gatts_char_handles_t pnp_id_handles; + + +/**@brief Function for encoding a System ID. + * + * @param[out] p_encoded_buffer Buffer where the encoded data will be written. + * @param[in] p_sys_id System ID to be encoded. + */ +static void sys_id_encode(uint8_t * p_encoded_buffer, const ble_dis_sys_id_t * p_sys_id) +{ + APP_ERROR_CHECK_BOOL(p_sys_id != NULL); + APP_ERROR_CHECK_BOOL(p_encoded_buffer != NULL); + + p_encoded_buffer[0] = (p_sys_id->manufacturer_id & 0x00000000FF); + p_encoded_buffer[1] = (p_sys_id->manufacturer_id & 0x000000FF00) >> 8; + p_encoded_buffer[2] = (p_sys_id->manufacturer_id & 0x0000FF0000) >> 16; + p_encoded_buffer[3] = (p_sys_id->manufacturer_id & 0x00FF000000) >> 24; + p_encoded_buffer[4] = (p_sys_id->manufacturer_id & 0xFF00000000) >> 32; + + p_encoded_buffer[5] = (p_sys_id->organizationally_unique_id & 0x0000FF); + p_encoded_buffer[6] = (p_sys_id->organizationally_unique_id & 0x00FF00) >> 8; + p_encoded_buffer[7] = (p_sys_id->organizationally_unique_id & 0xFF0000) >> 16; +} + + +/**@brief Function for encoding a PnP ID. + * + * @param[out] p_encoded_buffer Buffer where the encoded data will be written. + * @param[in] p_pnp_id PnP ID to be encoded. + */ +static void pnp_id_encode(uint8_t * p_encoded_buffer, const ble_dis_pnp_id_t * p_pnp_id) +{ + uint8_t len = 0; + + APP_ERROR_CHECK_BOOL(p_pnp_id != NULL); + APP_ERROR_CHECK_BOOL(p_encoded_buffer != NULL); + + p_encoded_buffer[len++] = p_pnp_id->vendor_id_source; + + len += uint16_encode(p_pnp_id->vendor_id, &p_encoded_buffer[len]); + len += uint16_encode(p_pnp_id->product_id, &p_encoded_buffer[len]); + len += uint16_encode(p_pnp_id->product_version, &p_encoded_buffer[len]); + + APP_ERROR_CHECK_BOOL(len == BLE_DIS_PNP_ID_LEN); +} + + +/**@brief Function for adding the Characteristic. + * + * @param[in] uuid UUID of characteristic to be added. + * @param[in] p_char_value Initial value of characteristic to be added. + * @param[in] char_len Length of initial value. This will also be the maximum value. + * @param[in] dis_attr_md Security settings of characteristic to be added. + * @param[out] p_handles Handles of new characteristic. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t char_add(uint16_t uuid, + uint8_t * p_char_value, + uint16_t char_len, + const ble_srv_security_mode_t * dis_attr_md, + ble_gatts_char_handles_t * p_handles) +{ + ble_uuid_t ble_uuid; + ble_gatts_char_md_t char_md; + ble_gatts_attr_t attr_char_value; + ble_gatts_attr_md_t attr_md; + + APP_ERROR_CHECK_BOOL(p_char_value != NULL); + APP_ERROR_CHECK_BOOL(char_len > 0); + + // The ble_gatts_char_md_t structure uses bit fields. So we reset the memory to zero. + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.read = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = NULL; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, uuid); + + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.read_perm = dis_attr_md->read_perm; + attr_md.write_perm = dis_attr_md->write_perm; + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = char_len; + attr_char_value.init_offs = 0; + attr_char_value.max_len = char_len; + attr_char_value.p_value = p_char_value; + + return sd_ble_gatts_characteristic_add(service_handle, &char_md, &attr_char_value, p_handles); +} + + +uint32_t ble_dis_init(const ble_dis_init_t * p_dis_init) +{ + uint32_t err_code; + ble_uuid_t ble_uuid; + + // Add service + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_DEVICE_INFORMATION_SERVICE); + + err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &ble_uuid, &service_handle); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add characteristics + if (p_dis_init->manufact_name_str.length > 0) + { + err_code = char_add(BLE_UUID_MANUFACTURER_NAME_STRING_CHAR, + p_dis_init->manufact_name_str.p_str, + p_dis_init->manufact_name_str.length, + &p_dis_init->dis_attr_md, + &manufact_name_handles); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + if (p_dis_init->model_num_str.length > 0) + { + err_code = char_add(BLE_UUID_MODEL_NUMBER_STRING_CHAR, + p_dis_init->model_num_str.p_str, + p_dis_init->model_num_str.length, + &p_dis_init->dis_attr_md, + &model_num_handles); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + if (p_dis_init->serial_num_str.length > 0) + { + err_code = char_add(BLE_UUID_SERIAL_NUMBER_STRING_CHAR, + p_dis_init->serial_num_str.p_str, + p_dis_init->serial_num_str.length, + &p_dis_init->dis_attr_md, + &serial_num_handles); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + if (p_dis_init->hw_rev_str.length > 0) + { + err_code = char_add(BLE_UUID_HARDWARE_REVISION_STRING_CHAR, + p_dis_init->hw_rev_str.p_str, + p_dis_init->hw_rev_str.length, + &p_dis_init->dis_attr_md, + &hw_rev_handles); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + if (p_dis_init->fw_rev_str.length > 0) + { + err_code = char_add(BLE_UUID_FIRMWARE_REVISION_STRING_CHAR, + p_dis_init->fw_rev_str.p_str, + p_dis_init->fw_rev_str.length, + &p_dis_init->dis_attr_md, + &fw_rev_handles); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + if (p_dis_init->sw_rev_str.length > 0) + { + err_code = char_add(BLE_UUID_SOFTWARE_REVISION_STRING_CHAR, + p_dis_init->sw_rev_str.p_str, + p_dis_init->sw_rev_str.length, + &p_dis_init->dis_attr_md, + &sw_rev_handles); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + if (p_dis_init->p_sys_id != NULL) + { + uint8_t encoded_sys_id[BLE_DIS_SYS_ID_LEN]; + + sys_id_encode(encoded_sys_id, p_dis_init->p_sys_id); + err_code = char_add(BLE_UUID_SYSTEM_ID_CHAR, + encoded_sys_id, + BLE_DIS_SYS_ID_LEN, + &p_dis_init->dis_attr_md, + &sys_id_handles); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + if (p_dis_init->p_reg_cert_data_list != NULL) + { + err_code = char_add(BLE_UUID_IEEE_REGULATORY_CERTIFICATION_DATA_LIST_CHAR, + p_dis_init->p_reg_cert_data_list->p_list, + p_dis_init->p_reg_cert_data_list->list_len, + &p_dis_init->dis_attr_md, + ®_cert_data_list_handles); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + if (p_dis_init->p_pnp_id != NULL) + { + uint8_t encoded_pnp_id[BLE_DIS_PNP_ID_LEN]; + + pnp_id_encode(encoded_pnp_id, p_dis_init->p_pnp_id); + err_code = char_add(BLE_UUID_PNP_ID_CHAR, + encoded_pnp_id, + BLE_DIS_PNP_ID_LEN, + &p_dis_init->dis_attr_md, + &pnp_id_handles); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + + return NRF_SUCCESS; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dis/ble_dis.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dis/ble_dis.h new file mode 100644 index 0000000000..603c611123 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dis/ble_dis.h @@ -0,0 +1,98 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_sdk_srv_dis Device Information Service + * @{ + * @ingroup ble_sdk_srv + * @brief Device Information Service module. + * + * @details This module implements the Device Information Service. + * During initialization it adds the Device Information Service to the BLE stack database. + * It then encodes the supplied information, and adds the curresponding characteristics. + * + * @note Attention! + * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile + * qualification listings, this section of source code must not be modified. + */ + +#ifndef BLE_DIS_H__ +#define BLE_DIS_H__ + +#include +#include "ble_srv_common.h" + +/** @defgroup DIS_VENDOR_ID_SRC_VALUES Vendor ID Source values + * @{ + */ +#define BLE_DIS_VENDOR_ID_SRC_BLUETOOTH_SIG 1 /**< Vendor ID assigned by Bluetooth SIG. */ +#define BLE_DIS_VENDOR_ID_SRC_USB_IMPL_FORUM 2 /**< Vendor ID assigned by USB Implementer's Forum. */ +/** @} */ + +/**@brief System ID parameters */ +typedef struct +{ + uint64_t manufacturer_id; /**< Manufacturer ID. Only 5 LSOs shall be used. */ + uint32_t organizationally_unique_id; /**< Organizationally unique ID. Only 3 LSOs shall be used. */ +} ble_dis_sys_id_t; + +/**@brief IEEE 11073-20601 Regulatory Certification Data List Structure */ +typedef struct +{ + uint8_t * p_list; /**< Pointer the byte array containing the encoded opaque structure based on IEEE 11073-20601 specification. */ + uint8_t list_len; /**< Length of the byte array. */ +} ble_dis_reg_cert_data_list_t; + +/**@brief PnP ID parameters */ +typedef struct +{ + uint8_t vendor_id_source; /**< Vendor ID Source. see @ref DIS_VENDOR_ID_SRC_VALUES. */ + uint16_t vendor_id; /**< Vendor ID. */ + uint16_t product_id; /**< Product ID. */ + uint16_t product_version; /**< Product Version. */ +} ble_dis_pnp_id_t; + +/**@brief Device Information Service init structure. This contains all possible characteristics + * needed for initialization of the service. + */ +typedef struct +{ + ble_srv_utf8_str_t manufact_name_str; /**< Manufacturer Name String. */ + ble_srv_utf8_str_t model_num_str; /**< Model Number String. */ + ble_srv_utf8_str_t serial_num_str; /**< Serial Number String. */ + ble_srv_utf8_str_t hw_rev_str; /**< Hardware Revision String. */ + ble_srv_utf8_str_t fw_rev_str; /**< Firmware Revision String. */ + ble_srv_utf8_str_t sw_rev_str; /**< Software Revision String. */ + ble_dis_sys_id_t * p_sys_id; /**< System ID. */ + ble_dis_reg_cert_data_list_t * p_reg_cert_data_list; /**< IEEE 11073-20601 Regulatory Certification Data List. */ + ble_dis_pnp_id_t * p_pnp_id; /**< PnP ID. */ + ble_srv_security_mode_t dis_attr_md; /**< Initial Security Setting for Device Information Characteristics. */ +} ble_dis_init_t; + +/**@brief Function for initializing the Device Information Service. + * + * @details This call allows the application to initialize the device information service. + * It adds the DIS service and DIS characteristics to the database, using the initial + * values supplied through the p_dis_init parameter. Characteristics which are not to be + * added, shall be set to NULL in p_dis_init. + * + * @param[in] p_dis_init The structure containing the values of characteristics needed by the + * service. + * + * @return NRF_SUCCESS on successful initialization of service. + */ +uint32_t ble_dis_init(const ble_dis_init_t * p_dis_init); + +#endif // BLE_DIS_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls.c new file mode 100644 index 0000000000..e3b3b68abe --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls.c @@ -0,0 +1,1273 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + */ + +/* Attention! +* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile +* qualification listings, this section of source code must not be modified. +*/ + +#include "ble_gls.h" +#include +#include "ble_srv_common.h" +#include "ble_racp.h" +#include "ble_gls_db.h" + + +#define OPERAND_FILTER_TYPE_SEQ_NUM 0x01 /**< Filter data using Sequence Number criteria. */ +#define OPERAND_FILTER_TYPE_FACING_TIME 0x02 /**< Filter data using User Facing Time criteria. */ +#define OPERAND_FILTER_TYPE_RFU_START 0x07 /**< Start of filter types reserved For Future Use range */ +#define OPERAND_FILTER_TYPE_RFU_END 0xFF /**< End of filter types reserved For Future Use range */ + +#define OPCODE_LENGTH 1 /**< Length of opcode inside Glucose Measurement packet. */ +#define HANDLE_LENGTH 2 /**< Length of handle inside Glucose Measurement packet. */ +#define MAX_GLM_LEN (BLE_L2CAP_MTU_DEF - OPCODE_LENGTH - HANDLE_LENGTH) /**< Maximum size of a transmitted Glucose Measurement. */ + +#define GLS_NACK_PROC_ALREADY_IN_PROGRESS BLE_GATT_STATUS_ATTERR_APP_BEGIN + 0 /**< Reply when a requested procedure is already in progress. */ +#define GLS_NACK_CCCD_IMPROPERLY_CONFIGURED BLE_GATT_STATUS_ATTERR_APP_BEGIN + 1 /**< Reply when the a s CCCD is improperly configured. */ + +/**@brief Glucose Service communication state. */ +typedef enum +{ + STATE_NO_COMM, /**< The service is not in a communicating state. */ + STATE_RACP_PROC_ACTIVE, /**< Processing requested data. */ + STATE_RACP_RESPONSE_PENDING, /**< There is a RACP indication waiting to be sent. */ + STATE_RACP_RESPONSE_IND_VERIF /**< Waiting for a verification of a RACP indication. */ +} gls_state_t; + +static gls_state_t m_gls_state; /**< Current communication state. */ +static uint16_t m_next_seq_num; /**< Sequence number of the next database record. */ +static uint8_t m_racp_proc_operator; /**< Operator of current request. */ +static uint16_t m_racp_proc_seq_num; /**< Sequence number of current request. */ +static uint8_t m_racp_proc_record_ndx; /**< Current record index. */ +static uint8_t m_racp_proc_records_reported; /**< Number of reported records. */ +static uint8_t m_racp_proc_records_reported_since_txcomplete; /**< Number of reported records since last TX_COMPLETE event. */ +static ble_racp_value_t m_pending_racp_response; /**< RACP response to be sent. */ +static uint8_t m_pending_racp_response_operand[2]; /**< Operand of RACP response to be sent. */ + + +/**@brief Function for setting the GLS communication state. + * + * @param[in] new_state New communication state. + */ +static void state_set(gls_state_t new_state) +{ + m_gls_state = new_state; +} + + +/**@brief Function for setting the next sequence number by reading the last record in the data base. + * + * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. + */ +static uint32_t next_sequence_number_set(void) +{ + uint16_t num_records; + ble_gls_rec_t rec; + + num_records = ble_gls_db_num_records_get(); + if (num_records > 0) + { + // Get last record + uint32_t err_code = ble_gls_db_record_get(num_records - 1, &rec); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + m_next_seq_num = rec.meas.sequence_number + 1; + } + else + { + m_next_seq_num = 0; + } + + return NRF_SUCCESS; +} + + +/**@brief Function for encoding a Glucose measurement. + * + * @param[in] p_meas Measurement to be encoded. + * @param[out] p_encoded_buffer Pointer to buffer where the encoded measurement is to be stored. + * + * @return Size of encoded measurement. + */ +static uint8_t gls_meas_encode(const ble_gls_meas_t * p_meas, uint8_t * p_encoded_buffer) +{ + uint8_t len = 0; + + p_encoded_buffer[len++] = p_meas->flags; + + len += uint16_encode(p_meas->sequence_number, &p_encoded_buffer[len]); + len += ble_date_time_encode(&p_meas->base_time, &p_encoded_buffer[len]); + + if (p_meas->flags & BLE_GLS_MEAS_FLAG_TIME_OFFSET) + { + len += uint16_encode(p_meas->time_offset, &p_encoded_buffer[len]); + } + + if (p_meas->flags & BLE_GLS_MEAS_FLAG_CONC_TYPE_LOC) + { + uint16_t encoded_concentration; + + encoded_concentration = ((p_meas->glucose_concentration.exponent << 12) & 0xF000) | + ((p_meas->glucose_concentration.mantissa << 0) & 0x0FFF); + + p_encoded_buffer[len++] = (uint8_t)(encoded_concentration); + p_encoded_buffer[len++] = (uint8_t)(encoded_concentration >> 8); + p_encoded_buffer[len++] = (p_meas->sample_location << 4) | (p_meas->type & 0x0F); + } + + if (p_meas->flags & BLE_GLS_MEAS_FLAG_SENSOR_STATUS) + { + len += uint16_encode(p_meas->sensor_status_annunciation, &p_encoded_buffer[len]); + } + + return len; +} + + +/**@brief Function for adding the characteristic for a glucose measurement. + * + * @param[in] p_gls Service instance. + * + * @return NRF_SUCCESS if characteristic was successfully added, otherwise an error code. + */ +static uint32_t glucose_measurement_char_add(ble_gls_t * p_gls) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_md_t cccd_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + ble_gls_rec_t initial_gls_rec_value; + uint8_t encoded_gls_meas[MAX_GLM_LEN]; + uint8_t num_recs; + memset(&cccd_md, 0, sizeof(cccd_md)); + + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); + BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&cccd_md.write_perm); + cccd_md.vloc = BLE_GATTS_VLOC_STACK; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.notify = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = &cccd_md; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_GLUCOSE_MEASUREMENT_CHAR); + memset(&attr_md, 0, sizeof(attr_md)); + + BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.read_perm); + BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.write_perm); + + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 1; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + memset(&initial_gls_rec_value, 0, sizeof(initial_gls_rec_value)); + + num_recs = ble_gls_db_num_records_get(); + if (num_recs > 0) + { + uint32_t err_code = ble_gls_db_record_get(num_recs - 1, &initial_gls_rec_value); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = gls_meas_encode(&initial_gls_rec_value.meas, encoded_gls_meas); + attr_char_value.init_offs = 0; + attr_char_value.max_len = MAX_GLM_LEN; + attr_char_value.p_value = encoded_gls_meas; + + return sd_ble_gatts_characteristic_add(p_gls->service_handle, + &char_md, + &attr_char_value, + &p_gls->glm_handles); +} + + +/**@brief Function for adding the characteristic for a glucose feature. + * + * @param[in] p_gls Service instance. + * + * @return NRF_SUCCESS if characteristic was successfully added, otherwise an error code. + */ +static uint32_t glucose_feature_char_add(ble_gls_t * p_gls) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + uint8_t encoded_initial_feature[2]; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.read = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = NULL; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_GLUCOSE_FEATURE_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&attr_md.read_perm); + BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.write_perm); + + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + encoded_initial_feature[0] = (uint8_t)(p_gls->feature); + encoded_initial_feature[1] = (uint8_t)((p_gls->feature) >> 8); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = sizeof (uint16_t); + attr_char_value.init_offs = 0; + attr_char_value.max_len = sizeof (uint16_t); + attr_char_value.p_value = encoded_initial_feature; + + return sd_ble_gatts_characteristic_add(p_gls->service_handle, + &char_md, + &attr_char_value, + &p_gls->glf_handles); +} + + +/**@brief Function for adding the characteristic for a record access control point. + * + * @param[in] p_gls Service instance. + * + * @return NRF_SUCCESS if characteristic was successfully added, otherwise an error code. + */ +static uint32_t record_access_control_point_char_add(ble_gls_t * p_gls) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_md_t cccd_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + + memset(&cccd_md, 0, sizeof(cccd_md)); + + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); + BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&cccd_md.write_perm); + cccd_md.vloc = BLE_GATTS_VLOC_STACK; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.indicate = 1; + char_md.char_props.write = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = &cccd_md; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_RECORD_ACCESS_CONTROL_POINT_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.read_perm); + BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&attr_md.write_perm); + + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 1; + attr_md.vlen = 1; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = 0; + attr_char_value.init_offs = 0; + attr_char_value.max_len = BLE_L2CAP_MTU_DEF; + attr_char_value.p_value = 0; + + return sd_ble_gatts_characteristic_add(p_gls->service_handle, + &char_md, + &attr_char_value, + &p_gls->racp_handles); +} + + +uint32_t ble_gls_init(ble_gls_t * p_gls, const ble_gls_init_t * p_gls_init) +{ + uint32_t err_code; + ble_uuid_t ble_uuid; + + // Initialize data base + err_code = ble_gls_db_init(); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + err_code = next_sequence_number_set(); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Initialize service structure + p_gls->evt_handler = p_gls_init->evt_handler; + p_gls->error_handler = p_gls_init->error_handler; + p_gls->feature = p_gls_init->feature; + p_gls->is_context_supported = p_gls_init->is_context_supported; + p_gls->conn_handle = BLE_CONN_HANDLE_INVALID; + + + // Initialize global variables + state_set(STATE_NO_COMM); + m_racp_proc_records_reported_since_txcomplete = 0; + + // Add service + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_GLUCOSE_SERVICE); + + err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &ble_uuid, &p_gls->service_handle); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add glucose measurement characteristic + err_code = glucose_measurement_char_add(p_gls); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add glucose measurement feature characteristic + err_code = glucose_feature_char_add(p_gls); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add record control access point characteristic + err_code = record_access_control_point_char_add(p_gls); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + return NRF_SUCCESS; +} + + +/**@brief Function for sending a response from the Record Access Control Point. + * + * @param[in] p_gls Service instance. + * @param[in] p_racp_val RACP value to be sent. + */ +static void racp_send(ble_gls_t * p_gls, ble_racp_value_t * p_racp_val) +{ + uint32_t err_code; + uint8_t encoded_resp[25]; + uint8_t len; + uint16_t hvx_len; + ble_gatts_hvx_params_t hvx_params; + + if ( + (m_gls_state != STATE_RACP_RESPONSE_PENDING) + && + (m_racp_proc_records_reported_since_txcomplete > 0) + ) + { + state_set(STATE_RACP_RESPONSE_PENDING); + return; + } + + // Send indication + len = ble_racp_encode(p_racp_val, encoded_resp); + hvx_len = len; + + memset(&hvx_params, 0, sizeof(hvx_params)); + + hvx_params.handle = p_gls->racp_handles.value_handle; + hvx_params.type = BLE_GATT_HVX_INDICATION; + hvx_params.offset = 0; + hvx_params.p_len = &hvx_len; + hvx_params.p_data = encoded_resp; + + err_code = sd_ble_gatts_hvx(p_gls->conn_handle, &hvx_params); + + // Error handling + if ((err_code == NRF_SUCCESS) && (hvx_len != len)) + { + err_code = NRF_ERROR_DATA_SIZE; + } + switch (err_code) + { + case NRF_SUCCESS: + // Wait for HVC event + state_set(STATE_RACP_RESPONSE_IND_VERIF); + break; + + case BLE_ERROR_NO_TX_PACKETS: + // Wait for TX_COMPLETE event to retry transmission + state_set(STATE_RACP_RESPONSE_PENDING); + break; + + case NRF_ERROR_INVALID_STATE: + // Make sure state machine returns to the default state + state_set(STATE_NO_COMM); + break; + + default: + // Report error to application + if (p_gls->error_handler != NULL) + { + p_gls->error_handler(err_code); + } + + // Make sure state machine returns to the default state + state_set(STATE_NO_COMM); + break; + } +} + + +/**@brief Function for sending a RACP response containing a Response Code Op Code and a Response Code Value. + * + * @param[in] p_gls Service instance. + * @param[in] opcode RACP Op Code. + * @param[in] value RACP Response Code Value. + */ +static void racp_response_code_send(ble_gls_t * p_gls, uint8_t opcode, uint8_t value) +{ + m_pending_racp_response.opcode = RACP_OPCODE_RESPONSE_CODE; + m_pending_racp_response.operator = RACP_OPERATOR_NULL; + m_pending_racp_response.operand_len = 2; + m_pending_racp_response.p_operand = m_pending_racp_response_operand; + + m_pending_racp_response_operand[0] = opcode; + m_pending_racp_response_operand[1] = value; + + racp_send(p_gls, &m_pending_racp_response); +} + + +/**@brief Function for sending a glucose measurement/context. + * + * @param[in] p_gls Service instance. + * @param[in] p_rec Measurement to be sent. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t glucose_meas_send(ble_gls_t * p_gls, ble_gls_rec_t * p_rec) +{ + uint32_t err_code; + uint8_t encoded_glm[MAX_GLM_LEN]; + uint16_t len; + uint16_t hvx_len; + ble_gatts_hvx_params_t hvx_params; + + len = gls_meas_encode(&p_rec->meas, encoded_glm); + hvx_len = len; + + memset(&hvx_params, 0, sizeof (hvx_params)); + + hvx_params.handle = p_gls->glm_handles.value_handle; + hvx_params.type = BLE_GATT_HVX_NOTIFICATION; + hvx_params.offset = 0; + hvx_params.p_len = &hvx_len; + hvx_params.p_data = encoded_glm; + + err_code = sd_ble_gatts_hvx(p_gls->conn_handle, &hvx_params); + if (err_code == NRF_SUCCESS) + { + if (hvx_len != len) + { + err_code = NRF_ERROR_DATA_SIZE; + } + else + { + // Measurement successfully sent + m_racp_proc_records_reported++; + m_racp_proc_records_reported_since_txcomplete++; + } + } + + return err_code; +} + + +/**@brief Function for responding to the ALL operation. + * + * @param[in] p_gls Service instance. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t racp_report_records_all(ble_gls_t * p_gls) +{ + uint16_t total_records = ble_gls_db_num_records_get(); + + if (m_racp_proc_record_ndx >= total_records) + { + state_set(STATE_NO_COMM); + } + else + { + uint32_t err_code; + ble_gls_rec_t rec; + + err_code = ble_gls_db_record_get(m_racp_proc_record_ndx, &rec); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + err_code = glucose_meas_send(p_gls, &rec); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + + return NRF_SUCCESS; +} + + +/**@brief Function for responding to the FIRST or the LAST operation. + * + * @param[in] p_gls Service instance. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t racp_report_records_first_last(ble_gls_t * p_gls) +{ + uint32_t err_code; + ble_gls_rec_t rec; + uint16_t total_records; + + total_records = ble_gls_db_num_records_get(); + + if ((m_racp_proc_records_reported != 0) || (total_records == 0)) + { + state_set(STATE_NO_COMM); + } + else + { + if (m_racp_proc_operator == RACP_OPERATOR_FIRST) + { + err_code = ble_gls_db_record_get(0, &rec); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + else if (m_racp_proc_operator == RACP_OPERATOR_LAST) + { + err_code = ble_gls_db_record_get(total_records - 1, &rec); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + + err_code = glucose_meas_send(p_gls, &rec); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + + return NRF_SUCCESS; +} + + +/**@brief Function for responding to the GREATER_OR_EQUAL operation. + * + * @param[in] p_gls Service instance. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t racp_report_records_greater_or_equal(ble_gls_t * p_gls) +{ + uint16_t total_records = ble_gls_db_num_records_get(); + + while (m_racp_proc_record_ndx < total_records) + { + uint32_t err_code; + ble_gls_rec_t rec; + + err_code = ble_gls_db_record_get(m_racp_proc_record_ndx, &rec); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + if (rec.meas.sequence_number >= m_racp_proc_seq_num) + { + err_code = glucose_meas_send(p_gls, &rec); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + break; + } + m_racp_proc_record_ndx++; + } + if (m_racp_proc_record_ndx == total_records) + { + state_set(STATE_NO_COMM); + } + + return NRF_SUCCESS; +} + + +/**@brief Function for informing that the REPORT RECORDS procedure is completed. + * + * @param[in] p_gls Service instance. + */ +static void racp_report_records_completed(ble_gls_t * p_gls) +{ + uint8_t resp_code_value; + + if (m_racp_proc_records_reported > 0) + { + resp_code_value = RACP_RESPONSE_SUCCESS; + } + else + { + resp_code_value = RACP_RESPONSE_NO_RECORDS_FOUND; + } + + racp_response_code_send(p_gls, RACP_OPCODE_REPORT_RECS, resp_code_value); +} + + +/**@brief Function for the RACP report records procedure. + * + * @param[in] p_gls Service instance. + */ +static void racp_report_records_procedure(ble_gls_t * p_gls) +{ + uint32_t err_code; + + while (m_gls_state == STATE_RACP_PROC_ACTIVE) + { + // Execute requested procedure + switch (m_racp_proc_operator) + { + case RACP_OPERATOR_ALL: + err_code = racp_report_records_all(p_gls); + break; + + case RACP_OPERATOR_FIRST: + case RACP_OPERATOR_LAST: + err_code = racp_report_records_first_last(p_gls); + break; + + case RACP_OPERATOR_GREATER_OR_EQUAL: + err_code = racp_report_records_greater_or_equal(p_gls); + break; + + default: + // Report error to application + if (p_gls->error_handler != NULL) + { + p_gls->error_handler(NRF_ERROR_INTERNAL); + } + + // Make sure state machine returns to the default state + state_set(STATE_NO_COMM); + return; + } + + // Error handling + switch (err_code) + { + case NRF_SUCCESS: + if (m_gls_state == STATE_RACP_PROC_ACTIVE) + { + m_racp_proc_record_ndx++; + } + else + { + racp_report_records_completed(p_gls); + } + break; + + case BLE_ERROR_NO_TX_PACKETS: + // Wait for TX_COMPLETE event to resume transmission + return; + + case NRF_ERROR_INVALID_STATE: + // Notification is probably not enabled. Ignore request. + state_set(STATE_NO_COMM); + return; + + default: + // Report error to application + if (p_gls->error_handler != NULL) + { + p_gls->error_handler(err_code); + } + + // Make sure state machine returns to the default state + state_set(STATE_NO_COMM); + return; + } + } +} + + +/**@brief Function for testing if the received request is to be executed. + * + * @param[in] p_racp_request Request to be checked. + * @param[out] p_response_code Response code to be sent in case the request is rejected. + * RACP_RESPONSE_RESERVED is returned if the received message is + * to be rejected without sending a response. + * + * @return TRUE if the request is to be executed, FALSE if it is to be rejected. + * If it is to be rejected, p_response_code will contain the response code to be + * returned to the central. + */ +static bool is_request_to_be_executed(const ble_racp_value_t * p_racp_request, + uint8_t * p_response_code) +{ + *p_response_code = RACP_RESPONSE_RESERVED; + + if (p_racp_request->opcode == RACP_OPCODE_ABORT_OPERATION) + { + if (m_gls_state == STATE_RACP_PROC_ACTIVE) + { + if (p_racp_request->operator != RACP_OPERATOR_NULL) + { + *p_response_code = RACP_RESPONSE_INVALID_OPERATOR; + } + else if (p_racp_request->operand_len != 0) + { + *p_response_code = RACP_RESPONSE_INVALID_OPERAND; + } + else + { + *p_response_code = RACP_RESPONSE_SUCCESS; + } + } + else + { + *p_response_code = RACP_RESPONSE_ABORT_FAILED; + } + } + else if (m_gls_state != STATE_NO_COMM) + { + return false; + } + // Supported opcodes. + else if ((p_racp_request->opcode == RACP_OPCODE_REPORT_RECS) || + (p_racp_request->opcode == RACP_OPCODE_REPORT_NUM_RECS)) + { + switch (p_racp_request->operator) + { + // Operators WITHOUT a filter. + case RACP_OPERATOR_ALL: + case RACP_OPERATOR_FIRST: + case RACP_OPERATOR_LAST: + if (p_racp_request->operand_len != 0) + { + *p_response_code = RACP_RESPONSE_INVALID_OPERAND; + } + break; + + // Operators WITH a filter. + case RACP_OPERATOR_GREATER_OR_EQUAL: + if (p_racp_request->p_operand[0] == OPERAND_FILTER_TYPE_SEQ_NUM) + { + if (p_racp_request->operand_len != 3) + { + *p_response_code = RACP_RESPONSE_INVALID_OPERAND; + } + } + else if (p_racp_request->p_operand[0] == OPERAND_FILTER_TYPE_FACING_TIME) + { + *p_response_code = RACP_RESPONSE_OPERAND_UNSUPPORTED; + } + else if (p_racp_request->p_operand[0] >= OPERAND_FILTER_TYPE_RFU_START) + { + *p_response_code = RACP_RESPONSE_OPERAND_UNSUPPORTED; + } + else + { + *p_response_code = RACP_RESPONSE_INVALID_OPERAND; + } + break; + + // Unsupported operators. + case RACP_OPERATOR_LESS_OR_EQUAL: + case RACP_OPERATOR_RANGE: + *p_response_code = RACP_RESPONSE_OPERATOR_UNSUPPORTED; + break; + + // Invalid operators. + case RACP_OPERATOR_NULL: + default: + if (p_racp_request->operator >= RACP_OPERATOR_RFU_START) + { + *p_response_code = RACP_RESPONSE_OPERATOR_UNSUPPORTED; + } + else + { + *p_response_code = RACP_RESPONSE_INVALID_OPERATOR; + } + break; + } + } + // Unsupported opcodes, + else if (p_racp_request->opcode == RACP_OPCODE_DELETE_RECS) + { + *p_response_code = RACP_RESPONSE_OPCODE_UNSUPPORTED; + } + // Unknown opcodes. + else + { + *p_response_code = RACP_RESPONSE_OPCODE_UNSUPPORTED; + } + + // NOTE: The computation of the return value will change slightly when deferred write has been + // implemented in the stack. + return (*p_response_code == RACP_RESPONSE_RESERVED); +} + + +/**@brief Function for processing a REPORT RECORDS request. + * + * @param[in] p_gls Service instance. + * @param[in] p_racp_request Request to be executed. + */ +static void report_records_request_execute(ble_gls_t * p_gls, ble_racp_value_t * p_racp_request) +{ + uint16_t seq_num = (p_racp_request->p_operand[2] << 8) | p_racp_request->p_operand[1]; + + state_set(STATE_RACP_PROC_ACTIVE); + + m_racp_proc_record_ndx = 0; + m_racp_proc_operator = p_racp_request->operator; + m_racp_proc_records_reported = 0; + m_racp_proc_seq_num = seq_num; + + racp_report_records_procedure(p_gls); +} + + +/**@brief Function for processing a REPORT NUM RECORDS request. + * + * @param[in] p_gls Service instance. + * @param[in] p_racp_request Request to be executed. + */ +static void report_num_records_request_execute(ble_gls_t * p_gls, ble_racp_value_t * p_racp_request) +{ + uint16_t total_records; + uint16_t num_records; + + total_records = ble_gls_db_num_records_get(); + num_records = 0; + + if (p_racp_request->operator == RACP_OPERATOR_ALL) + { + num_records = total_records; + } + else if (p_racp_request->operator == RACP_OPERATOR_GREATER_OR_EQUAL) + { + uint16_t seq_num; + uint16_t i; + + seq_num = (p_racp_request->p_operand[2] << 8) | p_racp_request->p_operand[1]; + + for (i = 0; i < total_records; i++) + { + uint32_t err_code; + ble_gls_rec_t rec; + + err_code = ble_gls_db_record_get(i, &rec); + if (err_code != NRF_SUCCESS) + { + if (p_gls->error_handler != NULL) + { + p_gls->error_handler(err_code); + } + return; + } + + if (rec.meas.sequence_number >= seq_num) + { + num_records++; + } + } + } + else if ((p_racp_request->operator == RACP_OPERATOR_FIRST) || + (p_racp_request->operator == RACP_OPERATOR_LAST)) + { + if (total_records > 0) + { + num_records = 1; + } + } + + m_pending_racp_response.opcode = RACP_OPCODE_NUM_RECS_RESPONSE; + m_pending_racp_response.operator = RACP_OPERATOR_NULL; + m_pending_racp_response.operand_len = sizeof(uint16_t); + m_pending_racp_response.p_operand = m_pending_racp_response_operand; + + m_pending_racp_response_operand[0] = num_records & 0xFF; + m_pending_racp_response_operand[1] = num_records >> 8; + + racp_send(p_gls, &m_pending_racp_response); +} + + +/**@brief Function for checking if the CCCDs are configured. + * + * @param[in] p_gls Service instance. + * @param[in] p_are_cccd_configured boolean indicating if both cccds are configured + */ +uint32_t ble_gls_are_cccd_configured(ble_gls_t * p_gls, bool * p_are_cccd_configured) +{ + uint32_t err_code; + uint8_t cccd_value_buf[BLE_CCCD_VALUE_LEN]; + bool is_glm_notif_enabled = false; + bool is_racp_indic_enabled = false; + ble_gatts_value_t gatts_value; + + // Initialize value struct. + memset(&gatts_value, 0, sizeof(gatts_value)); + + gatts_value.len = BLE_CCCD_VALUE_LEN; + gatts_value.offset = 0; + gatts_value.p_value = cccd_value_buf; + + err_code = sd_ble_gatts_value_get(p_gls->conn_handle, + p_gls->glm_handles.cccd_handle, + &gatts_value); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + is_glm_notif_enabled = ble_srv_is_notification_enabled(cccd_value_buf); + + err_code = sd_ble_gatts_value_get(p_gls->conn_handle, + p_gls->racp_handles.cccd_handle, + &gatts_value); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + is_racp_indic_enabled = ble_srv_is_indication_enabled(cccd_value_buf); + if (is_racp_indic_enabled & is_glm_notif_enabled) + { + *p_are_cccd_configured = true; + } + else + { + *p_are_cccd_configured = false; + } + return NRF_SUCCESS; +} + + +/**@brief Function for handling a write event to the Record Access Control Point. + * + * @param[in] p_gls Service instance. + * @param[in] p_evt_write WRITE event to be handled. + */ +static void on_racp_value_write(ble_gls_t * p_gls, ble_gatts_evt_write_t * p_evt_write) +{ + ble_racp_value_t racp_request; + uint8_t response_code; + ble_gatts_rw_authorize_reply_params_t auth_reply; + bool are_cccd_configured; + uint32_t err_code; + + auth_reply.type = BLE_GATTS_AUTHORIZE_TYPE_WRITE; + auth_reply.params.write.offset = 0; + auth_reply.params.write.len = 0; + auth_reply.params.write.p_data = NULL; + + err_code = ble_gls_are_cccd_configured(p_gls, &are_cccd_configured); + if (err_code != NRF_SUCCESS) + { + if (p_gls->error_handler != NULL) + { + p_gls->error_handler(err_code); + } + return; + } + + if (!are_cccd_configured) + { + auth_reply.params.write.gatt_status = GLS_NACK_CCCD_IMPROPERLY_CONFIGURED; + err_code = sd_ble_gatts_rw_authorize_reply(p_gls->conn_handle, + &auth_reply); + + if (err_code != NRF_SUCCESS) + { + if (p_gls->error_handler != NULL) + { + p_gls->error_handler(err_code); + } + } + return; + } + + // Decode request. + ble_racp_decode(p_evt_write->len, p_evt_write->data, &racp_request); + + // Check if request is to be executed. + if (is_request_to_be_executed(&racp_request, &response_code)) + { + auth_reply.params.write.gatt_status = BLE_GATT_STATUS_SUCCESS; + auth_reply.params.write.update = 1; + + err_code = sd_ble_gatts_rw_authorize_reply(p_gls->conn_handle, + &auth_reply); + + if (err_code != NRF_SUCCESS) + { + if (p_gls->error_handler != NULL) + { + p_gls->error_handler(err_code); + } + return; + } + // Execute request. + if (racp_request.opcode == RACP_OPCODE_REPORT_RECS) + { + report_records_request_execute(p_gls, &racp_request); + } + else if (racp_request.opcode == RACP_OPCODE_REPORT_NUM_RECS) + { + report_num_records_request_execute(p_gls, &racp_request); + } + } + else if (response_code != RACP_RESPONSE_RESERVED) + { + auth_reply.params.write.gatt_status = BLE_GATT_STATUS_SUCCESS; + auth_reply.params.write.update = 1; + err_code = sd_ble_gatts_rw_authorize_reply(p_gls->conn_handle, + &auth_reply); + + if (err_code != NRF_SUCCESS) + { + if (p_gls->error_handler != NULL) + { + p_gls->error_handler(err_code); + } + return; + } + + // Abort any running procedure. + state_set(STATE_NO_COMM); + + // Respond with error code. + racp_response_code_send(p_gls, racp_request.opcode, response_code); + } + else + { + auth_reply.params.write.gatt_status = GLS_NACK_PROC_ALREADY_IN_PROGRESS; + err_code = sd_ble_gatts_rw_authorize_reply(p_gls->conn_handle, + &auth_reply); + + if (err_code != NRF_SUCCESS) + { + if (p_gls->error_handler != NULL) + { + p_gls->error_handler(err_code); + } + return; + } + } +} + + +/**@brief Function for handling the Glucose measurement CCCD write event. + * + * @param[in] p_gls Service instance. + * @param[in] p_evt_write WRITE event to be handled. + */ +static void on_glm_cccd_write(ble_gls_t * p_gls, ble_gatts_evt_write_t * p_evt_write) +{ + if (p_evt_write->len == 2) + { + // CCCD written, update notification state + ble_gls_evt_t evt; + + if (ble_srv_is_notification_enabled(p_evt_write->data)) + { + evt.evt_type = BLE_GLS_EVT_NOTIFICATION_ENABLED; + } + else + { + evt.evt_type = BLE_GLS_EVT_NOTIFICATION_DISABLED; + } + + if (p_gls->evt_handler != NULL) + { + p_gls->evt_handler(p_gls, &evt); + } + } +} + + +/**@brief Function for handling the WRITE event. + * + * @details Handles WRITE events from the BLE stack. + * + * @param[in] p_gls Glucose Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_write(ble_gls_t * p_gls, ble_evt_t * p_ble_evt) +{ + ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; + + if (p_evt_write->handle == p_gls->glm_handles.cccd_handle) + { + on_glm_cccd_write(p_gls, p_evt_write); + } + else if (p_evt_write->handle == p_gls->racp_handles.value_handle) + { + on_racp_value_write(p_gls, p_evt_write); + } +} + + +/**@brief Function for handling the TX_COMPLETE event. + * + * @details Handles TX_COMPLETE events from the BLE stack. + * + * @param[in] p_gls Glucose Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_tx_complete(ble_gls_t * p_gls, ble_evt_t * p_ble_evt) +{ + m_racp_proc_records_reported_since_txcomplete = 0; + + if (m_gls_state == STATE_RACP_RESPONSE_PENDING) + { + racp_send(p_gls, &m_pending_racp_response); + } + else if (m_gls_state == STATE_RACP_PROC_ACTIVE) + { + racp_report_records_procedure(p_gls); + } +} + + +/**@brief Function for handling the HVC event. + * + * @details Handles HVC events from the BLE stack. + * + * @param[in] p_gls Glucose Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_hvc(ble_gls_t * p_gls, ble_evt_t * p_ble_evt) +{ + ble_gatts_evt_hvc_t * p_hvc = &p_ble_evt->evt.gatts_evt.params.hvc; + + if (p_hvc->handle == p_gls->racp_handles.value_handle) + { + if (m_gls_state == STATE_RACP_RESPONSE_IND_VERIF) + { + // Indication has been acknowledged. Return to default state. + state_set(STATE_NO_COMM); + } + else + { + // We did not expect this event in this state. Report error to application. + if (p_gls->error_handler != NULL) + { + p_gls->error_handler(NRF_ERROR_INVALID_STATE); + } + } + } +} + + +static void on_rw_authorize_request(ble_gls_t * p_gls, ble_gatts_evt_t * p_gatts_evt) +{ + ble_gatts_evt_rw_authorize_request_t * p_auth_req = &p_gatts_evt->params.authorize_request; + if (p_auth_req->type == BLE_GATTS_AUTHORIZE_TYPE_WRITE) + { + if ( (p_gatts_evt->params.authorize_request.request.write.op + != BLE_GATTS_OP_PREP_WRITE_REQ) + && (p_gatts_evt->params.authorize_request.request.write.op + != BLE_GATTS_OP_EXEC_WRITE_REQ_NOW) + && (p_gatts_evt->params.authorize_request.request.write.op + != BLE_GATTS_OP_EXEC_WRITE_REQ_CANCEL) + ) + { + if (p_auth_req->request.write.handle == p_gls->racp_handles.value_handle) + { + on_racp_value_write(p_gls, &p_auth_req->request.write); + } + } + } +} + +void ble_gls_on_ble_evt(ble_gls_t * p_gls, ble_evt_t * p_ble_evt) +{ + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + p_gls->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; + state_set(STATE_NO_COMM); + break; + + case BLE_GAP_EVT_DISCONNECTED: + p_gls->conn_handle = BLE_CONN_HANDLE_INVALID; + break; + + case BLE_GATTS_EVT_WRITE: + on_write(p_gls, p_ble_evt); + break; + + case BLE_EVT_TX_COMPLETE: + on_tx_complete(p_gls, p_ble_evt); + break; + + case BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST: + on_rw_authorize_request(p_gls, &p_ble_evt->evt.gatts_evt); + break; + + case BLE_GATTS_EVT_HVC: + on_hvc(p_gls, p_ble_evt); + break; + + default: + // No implementation needed. + break; + } +} + + +uint32_t ble_gls_glucose_new_meas(ble_gls_t * p_gls, ble_gls_rec_t * p_rec) +{ + p_rec->meas.sequence_number = m_next_seq_num++; + return ble_gls_db_record_add(p_rec); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls.h new file mode 100644 index 0000000000..8c33805f8b --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls.h @@ -0,0 +1,264 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + */ + +/** @file + * + * @defgroup ble_sdk_srv_gls Glucose Service + * @{ + * @ingroup ble_sdk_srv + * @brief Glucose Service module. + * + * @details This module implements the Glucose Service. + * + * @note The application must propagate BLE stack events to the Glucose Service module by calling + * ble_gls_on_ble_evt() from the @ref softdevice_handler callback. + * + * @note Attention! + * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile + * qualification listings, this section of source code must not be modified. + */ + +#ifndef BLE_GLS_H__ +#define BLE_GLS_H__ + +#include +#include +#include "ble.h" +#include "ble_srv_common.h" +#include "ble_date_time.h" + +/**@brief Glucose feature */ +#define BLE_GLS_FEATURE_LOW_BATT 0x0001 /**< Low Battery Detection During Measurement Supported */ +#define BLE_GLS_FEATURE_MALFUNC 0x0002 /**< Sensor Malfunction Detection Supported */ +#define BLE_GLS_FEATURE_SAMPLE_SIZE 0x0004 /**< Sensor Sample Size Supported */ +#define BLE_GLS_FEATURE_INSERT_ERR 0x0008 /**< Sensor Strip Insertion Error Detection Supported */ +#define BLE_GLS_FEATURE_TYPE_ERR 0x0010 /**< Sensor Strip Type Error Detection Supported */ +#define BLE_GLS_FEATURE_RES_HIGH_LOW 0x0020 /**< Sensor Result High-Low Detection Supported */ +#define BLE_GLS_FEATURE_TEMP_HIGH_LOW 0x0040 /**< Sensor Temperature High-Low Detection Supported */ +#define BLE_GLS_FEATURE_READ_INT 0x0080 /**< Sensor Read Interrupt Detection Supported */ +#define BLE_GLS_FEATURE_GENERAL_FAULT 0x0100 /**< General Device Fault Supported */ +#define BLE_GLS_FEATURE_TIME_FAULT 0x0200 /**< Time Fault Supported */ +#define BLE_GLS_FEATURE_MULTI_BOND 0x0400 /**< Multiple Bond Supported */ + +/**@brief Glucose measurement flags */ +#define BLE_GLS_MEAS_FLAG_TIME_OFFSET 0x01 /**< Time Offset Present */ +#define BLE_GLS_MEAS_FLAG_CONC_TYPE_LOC 0x02 /**< Glucose Concentration, Type, and Sample Location Present */ +#define BLE_GLS_MEAS_FLAG_UNITS_KG_L 0x00 /**< Glucose Concentration Units kg/L */ +#define BLE_GLS_MEAS_FLAG_UNITS_MOL_L 0x04 /**< Glucose Concentration Units mol/L */ +#define BLE_GLS_MEAS_FLAG_SENSOR_STATUS 0x08 /**< Sensor Status Annunciation Present */ +#define BLE_GLS_MEAS_FLAG_CONTEXT_INFO 0x10 /**< Context Information Follows */ + +/**@brief Glucose measurement type */ +#define BLE_GLS_MEAS_TYPE_CAP_BLOOD 1 /**< Capillary whole blood */ +#define BLE_GLS_MEAS_TYPE_CAP_PLASMA 2 /**< Capillary plasma */ +#define BLE_GLS_MEAS_TYPE_VEN_BLOOD 3 /**< Venous whole blood */ +#define BLE_GLS_MEAS_TYPE_VEN_PLASMA 4 /**< Venous plasma */ +#define BLE_GLS_MEAS_TYPE_ART_BLOOD 5 /**< Arterial whole blood */ +#define BLE_GLS_MEAS_TYPE_ART_PLASMA 6 /**< Arterial plasma */ +#define BLE_GLS_MEAS_TYPE_UNDET_BLOOD 7 /**< Undetermined whole blood */ +#define BLE_GLS_MEAS_TYPE_UNDET_PLASMA 8 /**< Undetermined plasma */ +#define BLE_GLS_MEAS_TYPE_FLUID 9 /**< Interstitial fluid (ISF) */ +#define BLE_GLS_MEAS_TYPE_CONTROL 10 /**< Control solution */ + +/**@brief Glucose measurement location */ +#define BLE_GLS_MEAS_LOC_FINGER 1 /**< Finger */ +#define BLE_GLS_MEAS_LOC_AST 2 /**< Alternate Site Test (AST) */ +#define BLE_GLS_MEAS_LOC_EAR 3 /**< Earlobe */ +#define BLE_GLS_MEAS_LOC_CONTROL 4 /**< Control solution */ +#define BLE_GLS_MEAS_LOC_NOT_AVAIL 15 /**< Sample Location value not available */ + +/**@brief Glucose sensor status annunciation */ +#define BLE_GLS_MEAS_STATUS_BATT_LOW 0x0001 /**< Device battery low at time of measurement */ +#define BLE_GLS_MEAS_STATUS_SENSOR_FAULT 0x0002 /**< Sensor malfunction or faulting at time of measurement */ +#define BLE_GLS_MEAS_STATUS_SAMPLE_SIZE 0x0004 /**< Sample size for blood or control solution insufficient at time of measurement */ +#define BLE_GLS_MEAS_STATUS_STRIP_INSERT 0x0008 /**< Strip insertion error */ +#define BLE_GLS_MEAS_STATUS_STRIP_TYPE 0x0010 /**< Strip type incorrect for device */ +#define BLE_GLS_MEAS_STATUS_RESULT_HIGH 0x0020 /**< Sensor result higher than the device can process */ +#define BLE_GLS_MEAS_STATUS_RESULT_LOW 0x0040 /**< Sensor result lower than the device can process */ +#define BLE_GLS_MEAS_STATUS_TEMP_HIGH 0x0080 /**< Sensor temperature too high for valid test/result at time of measurement */ +#define BLE_GLS_MEAS_STATUS_TEMP_LOW 0x0100 /**< Sensor temperature too low for valid test/result at time of measurement */ +#define BLE_GLS_MEAS_STATUS_STRIP_PULL 0x0200 /**< Sensor read interrupted because strip was pulled too soon at time of measurement */ +#define BLE_GLS_MEAS_STATUS_GENERAL_FAULT 0x0400 /**< General device fault has occurred in the sensor */ +#define BLE_GLS_MEAS_STATUS_TIME_FAULT 0x0800 /**< Time fault has occurred in the sensor and time may be inaccurate */ + +/**@brief Glucose measurement context flags */ +#define BLE_GLS_CONTEXT_FLAG_CARB 0x01 /**< Carbohydrate id and carbohydrate present */ +#define BLE_GLS_CONTEXT_FLAG_MEAL 0x02 /**< Meal present */ +#define BLE_GLS_CONTEXT_FLAG_TESTER 0x04 /**< Tester-health present */ +#define BLE_GLS_CONTEXT_FLAG_EXERCISE 0x08 /**< Exercise duration and exercise intensity present */ +#define BLE_GLS_CONTEXT_FLAG_MED 0x10 /**< Medication ID and medication present */ +#define BLE_GLS_CONTEXT_FLAG_MED_KG 0x00 /**< Medication value units, kilograms */ +#define BLE_GLS_CONTEXT_FLAG_MED_L 0x20 /**< Medication value units, liters */ +#define BLE_GLS_CONTEXT_FLAG_HBA1C 0x40 /**< Hba1c present */ +#define BLE_GLS_CONTEXT_FLAG_EXT 0x80 /**< Extended flags present */ + +/**@brief Glucose measurement context carbohydrate ID */ +#define BLE_GLS_CONTEXT_CARB_BREAKFAST 1 /**< Breakfast */ +#define BLE_GLS_CONTEXT_CARB_LUNCH 2 /**< Lunch */ +#define BLE_GLS_CONTEXT_CARB_DINNER 3 /**< Dinner */ +#define BLE_GLS_CONTEXT_CARB_SNACK 4 /**< Snack */ +#define BLE_GLS_CONTEXT_CARB_DRINK 5 /**< Drink */ +#define BLE_GLS_CONTEXT_CARB_SUPPER 6 /**< Supper */ +#define BLE_GLS_CONTEXT_CARB_BRUNCH 7 /**< Brunch */ + +/**@brief Glucose measurement context meal */ +#define BLE_GLS_CONTEXT_MEAL_PREPRANDIAL 1 /**< Preprandial (before meal) */ +#define BLE_GLS_CONTEXT_MEAL_POSTPRANDIAL 2 /**< Postprandial (after meal) */ +#define BLE_GLS_CONTEXT_MEAL_FASTING 3 /**< Fasting */ +#define BLE_GLS_CONTEXT_MEAL_CASUAL 4 /**< Casual (snacks, drinks, etc.) */ +#define BLE_GLS_CONTEXT_MEAL_BEDTIME 5 /**< Bedtime */ + +/**@brief Glucose measurement context tester */ +#define BLE_GLS_CONTEXT_TESTER_SELF 1 /**< Self */ +#define BLE_GLS_CONTEXT_TESTER_PRO 2 /**< Health care professional */ +#define BLE_GLS_CONTEXT_TESTER_LAB 3 /**< Lab test */ +#define BLE_GLS_CONTEXT_TESTER_NOT_AVAIL 15 /**< Tester value not available */ + +/**@brief Glucose measurement context health */ +#define BLE_GLS_CONTEXT_HEALTH_MINOR 1 /**< Minor health issues */ +#define BLE_GLS_CONTEXT_HEALTH_MAJOR 2 /**< Major health issues */ +#define BLE_GLS_CONTEXT_HEALTH_MENSES 3 /**< During menses */ +#define BLE_GLS_CONTEXT_HEALTH_STRESS 4 /**< Under stress */ +#define BLE_GLS_CONTEXT_HEALTH_NONE 5 /**< No health issues */ +#define BLE_GLS_CONTEXT_HEALTH_NOT_AVAIL 15 /**< Health value not available */ + +/**@brief Glucose measurement context medication ID */ +#define BLE_GLS_CONTEXT_MED_RAPID 1 /**< Rapid acting insulin */ +#define BLE_GLS_CONTEXT_MED_SHORT 2 /**< Short acting insulin */ +#define BLE_GLS_CONTEXT_MED_INTERMED 3 /**< Intermediate acting insulin */ +#define BLE_GLS_CONTEXT_MED_LONG 4 /**< Long acting insulin */ +#define BLE_GLS_CONTEXT_MED_PREMIX 5 /**< Pre-mixed insulin */ + +/**@brief SFLOAT format (IEEE-11073 16-bit FLOAT, meaning 4 bits for exponent (base 10) and 12 bits mantissa) */ +typedef struct +{ + int8_t exponent; /**< Base 10 exponent, should be using only 4 bits */ + int16_t mantissa; /**< Mantissa, should be using only 12 bits */ +} sfloat_t; + +/**@brief Glucose Service event type. */ +typedef enum +{ + BLE_GLS_EVT_NOTIFICATION_ENABLED, /**< Glucose value notification enabled event. */ + BLE_GLS_EVT_NOTIFICATION_DISABLED /**< Glucose value notification disabled event. */ +} ble_gls_evt_type_t; + +/**@brief Glucose Service event. */ +typedef struct +{ + ble_gls_evt_type_t evt_type; /**< Type of event. */ +} ble_gls_evt_t; + +// Forward declaration of the ble_gls_t type. +typedef struct ble_gls_s ble_gls_t; + +/**@brief Glucose Service event handler type. */ +typedef void (*ble_gls_evt_handler_t) (ble_gls_t * p_gls, ble_gls_evt_t * p_evt); + +/**@brief Glucose Measurement structure. This contains glucose measurement value. */ +typedef struct +{ + uint8_t flags; /**< Flags */ + uint16_t sequence_number; /**< Sequence number */ + ble_date_time_t base_time; /**< Time stamp */ + int16_t time_offset; /**< Time offset */ + sfloat_t glucose_concentration; /**< Glucose concentration */ + uint8_t type; /**< Type */ + uint8_t sample_location; /**< Sample location */ + uint16_t sensor_status_annunciation; /**< Sensor status annunciation */ +} ble_gls_meas_t; + +/**@brief Glucose measurement context structure */ +typedef struct +{ + uint8_t flags; /**< Flags */ + uint8_t extended_flags; /**< Extended Flags */ + uint8_t carbohydrate_id; /**< Carbohydrate ID */ + sfloat_t carbohydrate; /**< Carbohydrate */ + uint8_t meal; /**< Meal */ + uint8_t tester_and_health; /**< Tester and health */ + uint16_t exercise_duration; /**< Exercise Duration */ + uint8_t exercise_intensity; /**< Exercise Intensity */ + uint8_t medication_id; /**< Medication ID */ + sfloat_t medication; /**< Medication */ + uint16_t hba1c; /**< HbA1c */ +} ble_gls_meas_context_t; + +/**@brief Glucose measurement record */ +typedef struct +{ + ble_gls_meas_t meas; /**< Glucose measurement */ + ble_gls_meas_context_t context; /**< Glucose measurement context */ +} ble_gls_rec_t; + +/**@brief Glucose Service init structure. This contains all options and data needed for + * initialization of the service. */ +typedef struct +{ + ble_gls_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Glucose Service. */ + ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ + uint16_t feature; /**< Glucose Feature value indicating supported features. */ + bool is_context_supported; /**< Determines if optional Glucose Measurement Context is to be supported. */ +} ble_gls_init_t; + +/**@brief Glucose Service structure. This contains various status information for the service. */ +struct ble_gls_s +{ + ble_gls_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Glucose Service. */ + ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ + uint16_t service_handle; /**< Handle of Glucose Service (as provided by the BLE stack). */ + ble_gatts_char_handles_t glm_handles; /**< Handles related to the Glucose Measurement characteristic. */ + ble_gatts_char_handles_t glm_context_handles; /**< Handles related to the Glucose Measurement Context characteristic. */ + ble_gatts_char_handles_t glf_handles; /**< Handles related to the Glucose Feature characteristic. */ + ble_gatts_char_handles_t racp_handles; /**< Handles related to the Record Access Control Point characteristic. */ + uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ + uint16_t feature; + bool is_context_supported; +}; + +/**@brief Function for initializing the Glucose Service. + * + * @details This call allows the application to initialize the Glucose Service. + * + * @param[out] p_gls Glucose Service structure. This structure will have to be supplied by + * the application. It will be initialized by this function, and will later + * be used to identify this particular service instance. + * @param[in] p_gls_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. + */ +uint32_t ble_gls_init(ble_gls_t * p_gls, const ble_gls_init_t * p_gls_init); + +/**@brief Function for handling the Application's BLE Stack events. + * + * @details Handles all events from the BLE stack of interest to the Glucose Service. + * + * @param[in] p_gls Glucose Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +void ble_gls_on_ble_evt(ble_gls_t * p_gls, ble_evt_t * p_ble_evt); + +/**@brief Function for reporting a new glucose measurement to the glucose service module. + * + * @details The application calls this function after having performed a new glucose measurement. + * The new measurement is recorded in the RACP database. + * + * @param[in] p_gls Glucose Service structure. + * @param[in] p_rec Pointer to glucose record (measurement plus context). + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +uint32_t ble_gls_glucose_new_meas(ble_gls_t * p_gls, ble_gls_rec_t * p_rec); + +#endif // BLE_GLS_H__ + +/** @} */ + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls_db.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls_db.c new file mode 100644 index 0000000000..0f7d1a9dc5 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls_db.c @@ -0,0 +1,112 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + */ + +#include "ble_gls_db.h" + + +typedef struct +{ + bool in_use_flag; + ble_gls_rec_t record; +} database_entry_t; + +static database_entry_t m_database[BLE_GLS_DB_MAX_RECORDS]; +static uint8_t m_database_crossref[BLE_GLS_DB_MAX_RECORDS]; +static uint16_t m_num_records; + + +uint32_t ble_gls_db_init(void) +{ + int i; + + for (i = 0; i < BLE_GLS_DB_MAX_RECORDS; i++) + { + m_database[i].in_use_flag = false; + m_database_crossref[i] = 0xFF; + } + + m_num_records = 0; + + return NRF_SUCCESS; +} + + +uint16_t ble_gls_db_num_records_get(void) +{ + return m_num_records; +} + + +uint32_t ble_gls_db_record_get(uint8_t rec_ndx, ble_gls_rec_t * p_rec) +{ + if (rec_ndx >= m_num_records) + { + return NRF_ERROR_INVALID_PARAM; + } + + // copy record to the specified memory + *p_rec = m_database[m_database_crossref[rec_ndx]].record; + + return NRF_SUCCESS; +} + + +uint32_t ble_gls_db_record_add(ble_gls_rec_t * p_rec) +{ + int i; + + if (m_num_records == BLE_GLS_DB_MAX_RECORDS) + { + return NRF_ERROR_NO_MEM; + } + + // find next available database entry + for (i = 0; i < BLE_GLS_DB_MAX_RECORDS; i++) + { + if (!m_database[i].in_use_flag) + { + m_database[i].in_use_flag = true; + m_database[i].record = *p_rec; + + m_database_crossref[m_num_records] = i; + m_num_records++; + + return NRF_SUCCESS; + } + } + + return NRF_ERROR_NO_MEM; +} + + +uint32_t ble_gls_db_record_delete(uint8_t rec_ndx) +{ + int i; + + if (rec_ndx >= m_num_records) + { + return NRF_ERROR_NOT_FOUND; + } + + // free entry + m_database[m_database_crossref[rec_ndx]].in_use_flag = false; + + // decrease number of records + m_num_records--; + + // remove cross reference index + for (i = rec_ndx; i < m_num_records; i++) + { + m_database_crossref[i] = m_database_crossref[i + 1]; + } + + return NRF_SUCCESS; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls_db.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls_db.h new file mode 100644 index 0000000000..2f2f4f9df2 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls_db.h @@ -0,0 +1,84 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + */ + +/** @file + * + * @defgroup ble_sdk_srv_gls_db Glucose Database Service + * @{ + * @ingroup ble_sdk_srv + * @brief Glucose Service module. + * + * @details This module implements at database of stored glucose measurement values. + * + * @note Attention! + * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile + * qualification listings, These APIs must not be modified. However, the corresponding + * functions' implementations can be modified. + */ + +#ifndef BLE_GLS_DB_H__ +#define BLE_GLS_DB_H__ + +#include +#include "ble_gls.h" + +#define BLE_GLS_DB_MAX_RECORDS 20 + +/**@brief Function for initializing the glucose record database. + * + * @details This call initializes the database holding glucose records. + * + * @return NRF_SUCCESS on success. + */ +uint32_t ble_gls_db_init(void); + +/**@brief Function for getting the number of records in the database. + * + * @details This call returns the number of records in the database. + * + * @return Number of records in the database. + */ +uint16_t ble_gls_db_num_records_get(void); + +/**@brief Function for getting a record from the database. + * + * @details This call returns a specified record from the database. + * + * @param[in] record_num Index of the record to retrieve. + * @param[out] p_rec Pointer to record structure where retrieved record is copied to. + * + * @return NRF_SUCCESS on success. + */ +uint32_t ble_gls_db_record_get(uint8_t record_num, ble_gls_rec_t * p_rec); + +/**@brief Function for adding a record at the end of the database. + * + * @details This call adds a record as the last record in the database. + * + * @param[in] p_rec Pointer to record to add to database. + * + * @return NRF_SUCCESS on success. + */ +uint32_t ble_gls_db_record_add(ble_gls_rec_t * p_rec); + +/**@brief Function for deleting a database entry. + * + * @details This call deletes an record from the database. + * + * @param[in] record_num Index of record to delete. + * + * @return NRF_SUCCESS on success. + */ +uint32_t ble_gls_db_record_delete(uint8_t record_num); + +#endif // BLE_GLS_DB_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hids/ble_hids.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hids/ble_hids.c new file mode 100644 index 0000000000..240a25f5a5 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hids/ble_hids.c @@ -0,0 +1,1380 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/* Attention! +* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile +* qualification listings, this section of source code must not be modified. +*/ + +#include "ble_hids.h" +#include +#include "app_error.h" +#include "nordic_common.h" +#include "ble_srv_common.h" +#include "app_util.h" + + +// Protocol Mode values +#define PROTOCOL_MODE_BOOT 0x00 /**< Boot Protocol Mode. */ +#define PROTOCOL_MODE_REPORT 0x01 /**< Report Protocol Mode. */ + +// HID Control Point values +#define HIDS_CONTROL_POINT_SUSPEND 0 /**< Suspend command. */ +#define HIDS_CONTROL_POINT_EXIT_SUSPEND 1 /**< Exit Suspend command. */ + +#define DEFAULT_PROTOCOL_MODE PROTOCOL_MODE_REPORT /**< Default value for the Protocol Mode characteristic. */ +#define INITIAL_VALUE_HID_CONTROL_POINT HIDS_CONTROL_POINT_SUSPEND /**< Initial value for the HID Control Point characteristic. */ + +#define ENCODED_HID_INFORMATION_LEN 4 /**< Maximum size of an encoded HID Information characteristic. */ + +#define BOOT_KB_INPUT_REPORT_MAX_SIZE 8 /**< Maximum size of a Boot Keyboard Input Report (as per Appendix B in Device Class Definition for Human Interface Devices (HID), Version 1.11). */ +#define BOOT_KB_OUTPUT_REPORT_MAX_SIZE 1 /**< Maximum size of a Boot Keyboard Output Report (as per Appendix B in Device Class Definition for Human Interface Devices (HID), Version 1.11). */ +#define BOOT_MOUSE_INPUT_REPORT_MIN_SIZE 3 /**< Minimum size of a Boot Mouse Input Report (as per Appendix B in Device Class Definition for Human Interface Devices (HID), Version 1.11). */ +#define BOOT_MOUSE_INPUT_REPORT_MAX_SIZE 8 /**< Maximum size of a Boot Mouse Input Report (as per Appendix B in Device Class Definition for Human Interface Devices (HID), Version 1.11). */ + + +/**@brief Function for making a HID Service characteristic id. + * + * @param[in] uuid UUID of characteristic. + * @param[in] rep_type Type of report. + * @param[in] rep_index Index of the characteristic. + * + * @return HID Service characteristic id structure. + */ +static ble_hids_char_id_t make_char_id(uint16_t uuid, uint8_t rep_type, uint8_t rep_index) +{ + ble_hids_char_id_t char_id = {0}; + + char_id.uuid = uuid; + char_id.rep_type = rep_type; + char_id.rep_index = rep_index; + + return char_id; +} + + +/**@brief Function for handling the Connect event. + * + * @param[in] p_hids HID Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_connect(ble_hids_t * p_hids, ble_evt_t * p_ble_evt) +{ + uint32_t err_code; + uint8_t default_protocol_mode; + ble_gatts_value_t gatts_value; + + p_hids->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; + + if (p_hids->protocol_mode_handles.value_handle) + { + // Set Protocol Mode characteristic value to default value + default_protocol_mode = DEFAULT_PROTOCOL_MODE; + + // Initialize value struct. + memset(&gatts_value, 0, sizeof(gatts_value)); + + gatts_value.len = sizeof(uint8_t); + gatts_value.offset = 0; + gatts_value.p_value = &default_protocol_mode; + + err_code = sd_ble_gatts_value_set(p_hids->conn_handle, + p_hids->protocol_mode_handles.value_handle, + &gatts_value); + if ((err_code != NRF_SUCCESS) && (p_hids->error_handler != NULL)) + { + p_hids->error_handler(err_code); + } + } +} + + +/**@brief Function for handling the Disconnect event. + * + * @param[in] p_hids HID Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_disconnect(ble_hids_t * p_hids, ble_evt_t * p_ble_evt) +{ + UNUSED_PARAMETER(p_ble_evt); + p_hids->conn_handle = BLE_CONN_HANDLE_INVALID; +} + + +/**@brief Function for handling write events to the HID Control Point value. + * + * @param[in] p_hids HID Service structure. + * @param[in] p_evt_write Write event received from the BLE stack. + */ +static void on_control_point_write(ble_hids_t * p_hids, ble_gatts_evt_write_t * p_evt_write) +{ + if ((p_evt_write->len == 1) && (p_hids->evt_handler != NULL)) + { + ble_hids_evt_t evt; + + // HID Control Point written, propagate event to application + switch (p_evt_write->data[0]) + { + case HIDS_CONTROL_POINT_SUSPEND: + evt.evt_type = BLE_HIDS_EVT_HOST_SUSP; + break; + + case HIDS_CONTROL_POINT_EXIT_SUSPEND: + evt.evt_type = BLE_HIDS_EVT_HOST_EXIT_SUSP; + break; + + default: + // Illegal Control Point value, ignore + return; + } + + p_hids->evt_handler(p_hids, &evt); + } +} + + +/**@brief Function for handling write events to the Protocol Mode value. + * + * @param[in] p_hids HID Service structure. + * @param[in] p_evt_write Write event received from the BLE stack. + */ +static void on_protocol_mode_write(ble_hids_t * p_hids, ble_gatts_evt_write_t * p_evt_write) +{ + if ((p_evt_write->len == 1) && (p_hids->evt_handler != NULL)) + { + ble_hids_evt_t evt; + + // HID Protocol Mode written, propagate event to application + switch (p_evt_write->data[0]) + { + case PROTOCOL_MODE_BOOT: + evt.evt_type = BLE_HIDS_EVT_BOOT_MODE_ENTERED; + break; + + case PROTOCOL_MODE_REPORT: + evt.evt_type = BLE_HIDS_EVT_REPORT_MODE_ENTERED; + break; + + default: + // Illegal Protocol Mode value, ignore + return; + } + + p_hids->evt_handler(p_hids, &evt); + } +} + + +/**@brief Function for handling write events to a report CCCD. + * + * @param[in] p_hids HID Service structure. + * @param[in] p_char_id Id of report characteristic. + * @param[in] p_evt_write Write event received from the BLE stack. + */ +static void on_report_cccd_write(ble_hids_t * p_hids, + ble_hids_char_id_t * p_char_id, + ble_gatts_evt_write_t * p_evt_write) +{ + if (p_evt_write->len == 2) + { + // CCCD written, update notification state + if (p_hids->evt_handler != NULL) + { + ble_hids_evt_t evt; + + if (ble_srv_is_notification_enabled(p_evt_write->data)) + { + evt.evt_type = BLE_HIDS_EVT_NOTIF_ENABLED; + } + else + { + evt.evt_type = BLE_HIDS_EVT_NOTIF_DISABLED; + } + evt.params.notification.char_id = *p_char_id; + + p_hids->evt_handler(p_hids, &evt); + } + } +} + + +/**@brief Function for handling write events to a report value. + * + * @param[in] p_hids HID Service structure. + * @param[in] p_char_id Id of report characteristic. + */ +static void on_report_value_write(ble_hids_t * p_hids, + ble_evt_t * p_ble_evt, + ble_hids_char_id_t * p_char_id) +{ + if (p_hids->evt_handler != NULL) + { + ble_hids_evt_t evt; + + evt.evt_type = BLE_HIDS_EVT_REP_CHAR_WRITE; + evt.params.char_write.char_id = *p_char_id; + evt.params.char_write.offset = p_ble_evt->evt.gatts_evt.params.write.offset; + evt.params.char_write.len = p_ble_evt->evt.gatts_evt.params.write.len; + evt.params.char_write.data = p_ble_evt->evt.gatts_evt.params.write.data; + + p_hids->evt_handler(p_hids, &evt); + } +} + +/**@brief Handle authorize read events to a report value. + * + * @param[in] p_hids HID Service structure. + * @param[in] p_char_id Id of report characteristic. + */ +static void on_report_value_read_auth(ble_hids_t * p_hids, + ble_hids_char_id_t * p_char_id, + ble_evt_t * p_ble_evt) +{ + if (p_hids->evt_handler != NULL) + { + ble_hids_evt_t evt; + + evt.evt_type = BLE_HIDS_EVT_REPORT_READ; + evt.params.char_auth_read.char_id = *p_char_id; + evt.p_ble_evt = p_ble_evt; + + p_hids->evt_handler(p_hids, &evt); + } +} + +/**@brief Function for finding the Characteristic Id of a characteristic corresponding to a CCCD handle. + * + * @param[in] p_hids HID Service structure. + * @param[in] handle Handle to search for. + * @param[out] p_char_id Id of report characteristic. + * + * @return TRUE if CCCD handle was found, FALSE otherwise. + */ +static bool inp_rep_cccd_identify(ble_hids_t * p_hids, + uint16_t handle, + ble_hids_char_id_t * p_char_id) +{ + uint8_t i; + + for (i = 0; i < p_hids->inp_rep_count; i++) + { + if (handle == p_hids->inp_rep_array[i].char_handles.cccd_handle) + { + *p_char_id = make_char_id(BLE_UUID_REPORT_CHAR, BLE_HIDS_REP_TYPE_INPUT, i); + return true; + } + } + + return false; +} + + +/**@brief Function for finding the Characteristic Id of a characteristic corresponding to a value handle. + * + * @param[in] p_hids HID Service structure. + * @param[in] handle Handle to search for. + * @param[out] p_char_id Id of report characteristic. + * + * @return TRUE if value handle was found, FALSE otherwise. + */ +static bool rep_value_identify(ble_hids_t * p_hids, + uint16_t handle, + ble_hids_char_id_t * p_char_id) +{ + uint8_t i; + + for (i = 0; i < p_hids->inp_rep_count; i++) + { + if (handle == p_hids->inp_rep_array[i].char_handles.value_handle) + { + *p_char_id = make_char_id(BLE_UUID_REPORT_CHAR, BLE_HIDS_REP_TYPE_INPUT, i); + return true; + } + } + + for (i = 0; i < p_hids->outp_rep_count; i++) + { + if (handle == p_hids->outp_rep_array[i].char_handles.value_handle) + { + *p_char_id = make_char_id(BLE_UUID_REPORT_CHAR, BLE_HIDS_REP_TYPE_OUTPUT, i); + return true; + } + } + + for (i = 0; i < p_hids->feature_rep_count; i++) + { + if (handle == p_hids->feature_rep_array[i].char_handles.value_handle) + { + *p_char_id = make_char_id(BLE_UUID_REPORT_CHAR, BLE_HIDS_REP_TYPE_FEATURE, i); + return true; + } + } + + return false; +} + + +/**@brief Function for handling the Write event. + * + * @param[in] p_hids HID Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_write(ble_hids_t * p_hids, ble_evt_t * p_ble_evt) +{ + ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; + ble_hids_char_id_t char_id; + + if (p_evt_write->handle == p_hids->hid_control_point_handles.value_handle) + { + on_control_point_write(p_hids, p_evt_write); + } + else if (p_evt_write->handle == p_hids->protocol_mode_handles.value_handle) + { + on_protocol_mode_write(p_hids, p_evt_write); + } + else if (p_evt_write->handle == p_hids->boot_kb_inp_rep_handles.cccd_handle) + { + char_id = make_char_id(BLE_UUID_BOOT_KEYBOARD_INPUT_REPORT_CHAR, 0, 0); + on_report_cccd_write(p_hids, &char_id, p_evt_write); + } + else if (p_evt_write->handle == p_hids->boot_kb_inp_rep_handles.value_handle) + { + char_id = make_char_id(BLE_UUID_BOOT_KEYBOARD_INPUT_REPORT_CHAR, 0, 0); + on_report_value_write(p_hids, p_ble_evt, &char_id); + } + else if (p_evt_write->handle == p_hids->boot_mouse_inp_rep_handles.cccd_handle) + { + char_id = make_char_id(BLE_UUID_BOOT_MOUSE_INPUT_REPORT_CHAR, 0, 0); + on_report_cccd_write(p_hids, &char_id, p_evt_write); + } + else if (p_evt_write->handle == p_hids->boot_mouse_inp_rep_handles.value_handle) + { + char_id = make_char_id(BLE_UUID_BOOT_MOUSE_INPUT_REPORT_CHAR, 0, 0); + on_report_value_write(p_hids, p_ble_evt, &char_id); + } + else if (inp_rep_cccd_identify(p_hids, p_evt_write->handle, &char_id)) + { + on_report_cccd_write(p_hids, &char_id, p_evt_write); + } + else if (rep_value_identify(p_hids, p_evt_write->handle, &char_id)) + { + on_report_value_write(p_hids, p_ble_evt, &char_id); + } + else + { + // No implementation needed. + } +} + +/**@brief Read/write authorize request event handler. + * + * @param[in] p_hids HID Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_rw_authorize_request(ble_hids_t * p_hids, ble_evt_t * p_ble_evt) +{ + ble_gatts_evt_rw_authorize_request_t * evt_rw_auth = &p_ble_evt->evt.gatts_evt.params.authorize_request; + ble_hids_char_id_t char_id; + + if (evt_rw_auth->type != BLE_GATTS_AUTHORIZE_TYPE_READ) + { + // Unexpected operation + return; + } + + if (rep_value_identify(p_hids, evt_rw_auth->request.read.handle, &char_id)) + { + on_report_value_read_auth(p_hids, &char_id, p_ble_evt); + } +} + +void ble_hids_on_ble_evt(ble_hids_t * p_hids, ble_evt_t * p_ble_evt) +{ + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + on_connect(p_hids, p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + on_disconnect(p_hids, p_ble_evt); + break; + + case BLE_GATTS_EVT_WRITE: + on_write(p_hids, p_ble_evt); + break; + + case BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST: + on_rw_authorize_request(p_hids, p_ble_evt); + break; + default: + // No implementation needed. + break; + } +} + + +/**@brief Function for adding Protocol Mode characteristics. + * + * @param[in] p_hids HID Service structure. + * @param[in] p_sec_mode Characteristic security settings. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t protocol_mode_char_add(ble_hids_t * p_hids, + const ble_srv_security_mode_t * p_sec_mode) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + uint8_t initial_protocol_mode; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.read = 1; + char_md.char_props.write_wo_resp = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = NULL; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_PROTOCOL_MODE_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.read_perm = p_sec_mode->read_perm; + attr_md.write_perm = p_sec_mode->write_perm; + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + initial_protocol_mode = DEFAULT_PROTOCOL_MODE; + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = sizeof(uint8_t); + attr_char_value.init_offs = 0; + attr_char_value.max_len = sizeof(uint8_t); + attr_char_value.p_value = &initial_protocol_mode; + + return sd_ble_gatts_characteristic_add(p_hids->service_handle, + &char_md, + &attr_char_value, + &p_hids->protocol_mode_handles); +} + + +/**@brief Function for adding report characteristics. + * + * @param[in] p_hids HID Service structure. + * @param[in] p_properties Report characteristic properties. + * @param[in] max_len Maximum length of report value. + * @param[in] p_rep_ref Report Reference descriptor. + * @param[in] p_rep_ref_attr_md Characteristic security settings. + * @param[in] is_read_resp Characteristic read authorization. + * @param[out] p_rep_char Handles of new characteristic. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t rep_char_add(ble_hids_t * p_hids, + ble_gatt_char_props_t * p_properties, + uint16_t max_len, + ble_srv_report_ref_t * p_rep_ref, + ble_srv_cccd_security_mode_t * p_rep_ref_attr_md, + bool is_read_resp, + ble_hids_rep_char_t * p_rep_char) +{ + uint32_t err_code; + ble_gatts_char_md_t char_md; + ble_gatts_attr_md_t cccd_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + uint8_t encoded_rep_ref[BLE_SRV_ENCODED_REPORT_REF_LEN]; + + // Add Report characteristic + if (p_properties->notify) + { + memset(&cccd_md, 0, sizeof(cccd_md)); + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); + cccd_md.write_perm = p_rep_ref_attr_md->cccd_write_perm; + cccd_md.vloc = BLE_GATTS_VLOC_STACK; + } + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props = *p_properties; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = (p_properties->notify) ? &cccd_md : NULL; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_REPORT_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.read_perm = p_rep_ref_attr_md->read_perm; + attr_md.write_perm = p_rep_ref_attr_md->write_perm; + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = is_read_resp ? 1 : 0; + attr_md.wr_auth = 0; + attr_md.vlen = 1; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = 0; + attr_char_value.init_offs = 0; + attr_char_value.max_len = max_len; + attr_char_value.p_value = NULL; + + err_code = sd_ble_gatts_characteristic_add(p_hids->service_handle, + &char_md, + &attr_char_value, + &p_rep_char->char_handles); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add Report Reference descriptor + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_REPORT_REF_DESCR); + + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.read_perm = p_rep_ref_attr_md->read_perm; + attr_md.write_perm = p_rep_ref_attr_md->write_perm; + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = ble_srv_report_ref_encode(encoded_rep_ref, p_rep_ref); + attr_char_value.init_offs = 0; + attr_char_value.max_len = attr_char_value.init_len; + attr_char_value.p_value = encoded_rep_ref; + + return sd_ble_gatts_descriptor_add(p_rep_char->char_handles.value_handle, + &attr_char_value, + &p_rep_char->ref_handle); +} + + +/**@brief Function for adding Report Map characteristics. + * + * @param[in] p_hids HID Service structure. + * @param[in] p_hids_init Service initialization structure. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t rep_map_char_add(ble_hids_t * p_hids, const ble_hids_init_t * p_hids_init) +{ + uint32_t err_code; + ble_gatts_char_md_t char_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + + // Add Report Map characteristic + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.read = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = NULL; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_REPORT_MAP_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.read_perm = p_hids_init->rep_map.security_mode.read_perm; + attr_md.write_perm = p_hids_init->rep_map.security_mode.write_perm; + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 1; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = p_hids_init->rep_map.data_len; + attr_char_value.init_offs = 0; + attr_char_value.max_len = p_hids_init->rep_map.data_len; + attr_char_value.p_value = p_hids_init->rep_map.p_data; + + err_code = sd_ble_gatts_characteristic_add(p_hids->service_handle, + &char_md, + &attr_char_value, + &p_hids->rep_map_handles); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + if (p_hids_init->rep_map.ext_rep_ref_num != 0 && p_hids_init->rep_map.p_ext_rep_ref == NULL) + { + return NRF_ERROR_INVALID_PARAM; + } + for (int i = 0; i < p_hids_init->rep_map.ext_rep_ref_num; ++i) + { + uint8_t encoded_rep_ref[sizeof(ble_uuid128_t)]; + uint8_t encoded_rep_ref_len; + + // Add External Report Reference descriptor + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_EXTERNAL_REPORT_REF_DESCR); + + memset(&attr_md, 0, sizeof(attr_md)); + + BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&attr_md.read_perm); + BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.write_perm); + + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + err_code = sd_ble_uuid_encode(&p_hids_init->rep_map.p_ext_rep_ref[i], + &encoded_rep_ref_len, + encoded_rep_ref); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = encoded_rep_ref_len; + attr_char_value.init_offs = 0; + attr_char_value.max_len = attr_char_value.init_len; + attr_char_value.p_value = encoded_rep_ref; + + err_code = sd_ble_gatts_descriptor_add(p_hids->rep_map_handles.value_handle, + &attr_char_value, + &p_hids->rep_map_ext_rep_ref_handle); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + + return NRF_SUCCESS; +} + + +/**@brief Function for adding Input Report characteristics. + * + * @param[in] p_hids HID Service structure. + * @param[in] uuid UUID of report characteristic to be added. + * @param[in] max_data_len Maximum length of report value. + * @param[in] p_sec_mode Characteristic security settings. + * @param[out] p_char_handles Handles of new characteristic. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t boot_inp_rep_char_add(ble_hids_t * p_hids, + uint16_t uuid, + uint16_t max_data_len, + const ble_srv_cccd_security_mode_t * p_sec_mode, + ble_gatts_char_handles_t * p_char_handles) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_md_t cccd_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + + memset(&cccd_md, 0, sizeof(cccd_md)); + + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); + cccd_md.write_perm = p_sec_mode->cccd_write_perm; + cccd_md.vloc = BLE_GATTS_VLOC_STACK; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.read = 1; + char_md.char_props.write = (p_sec_mode->write_perm.sm) ? 1 : 0; + char_md.char_props.notify = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = &cccd_md; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, uuid); + + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.read_perm = p_sec_mode->read_perm; + attr_md.write_perm = p_sec_mode->write_perm; + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = 0; + attr_char_value.init_offs = 0; + attr_char_value.max_len = max_data_len; + attr_char_value.p_value = NULL; + + return sd_ble_gatts_characteristic_add(p_hids->service_handle, + &char_md, + &attr_char_value, + p_char_handles); +} + + +/**@brief Function for adding Boot Keyboard Output Report characteristics. + * + * @param[in] p_hids HID Service structure. + * @param[in] p_hids_init Service initialization structure. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t boot_kb_outp_rep_char_add(ble_hids_t * p_hids, const ble_hids_init_t * p_hids_init) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.read = 1; + char_md.char_props.write = 1; + char_md.char_props.write_wo_resp = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = NULL; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_BOOT_KEYBOARD_OUTPUT_REPORT_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.read_perm = p_hids_init->security_mode_boot_kb_outp_rep.read_perm; + attr_md.write_perm = p_hids_init->security_mode_boot_kb_outp_rep.write_perm; + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = 0; + attr_char_value.init_offs = 0; + attr_char_value.max_len = BOOT_KB_OUTPUT_REPORT_MAX_SIZE; + attr_char_value.p_value = NULL; + + return sd_ble_gatts_characteristic_add(p_hids->service_handle, &char_md, &attr_char_value, + &p_hids->boot_kb_outp_rep_handles); +} + + +/**@brief Function for encoding a HID Information characteristic value. + * + * @param[out] p_encoded_buffer Buffer where the encoded data will be written. + * @param[in] p_hid_information Measurement to be encoded. + * + * @return Size of encoded data. + */ +static uint8_t encode_hid_information(uint8_t * p_encoded_buffer, + const ble_hids_hid_information_t * p_hid_information) +{ + uint8_t len = uint16_encode(p_hid_information->bcd_hid, p_encoded_buffer); + + p_encoded_buffer[len++] = p_hid_information->b_country_code; + p_encoded_buffer[len++] = p_hid_information->flags; + + APP_ERROR_CHECK_BOOL(len == ENCODED_HID_INFORMATION_LEN); + + return len; +} + + +/**@brief Function for adding HID Information characteristics. + * + * @param[in] p_hids HID Service structure. + * @param[in] p_hids_init Service initialization structure. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t hid_information_char_add(ble_hids_t * p_hids, const ble_hids_init_t * p_hids_init) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + uint8_t encoded_hid_information[ENCODED_HID_INFORMATION_LEN]; + uint8_t hid_info_len; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.read = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = NULL; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_HID_INFORMATION_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.read_perm = p_hids_init->hid_information.security_mode.read_perm; + attr_md.write_perm = p_hids_init->hid_information.security_mode.write_perm; + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + hid_info_len = encode_hid_information(encoded_hid_information, &p_hids_init->hid_information); + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = hid_info_len; + attr_char_value.init_offs = 0; + attr_char_value.max_len = attr_char_value.init_len; + attr_char_value.p_value = encoded_hid_information; + + return sd_ble_gatts_characteristic_add(p_hids->service_handle, &char_md, + &attr_char_value, + &p_hids->hid_information_handles); +} + + +/**@brief Function for adding HID Control Point characteristics. + * + * @param[in] p_hids HID Service structure. + * @param[in] p_sec_mode Characteristic security settings. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t hid_control_point_char_add(ble_hids_t * p_hids, + const ble_srv_security_mode_t * p_sec_mode) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + uint8_t initial_hid_control_point; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.write_wo_resp = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = NULL; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_HID_CONTROL_POINT_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.read_perm = p_sec_mode->read_perm; + attr_md.write_perm = p_sec_mode->write_perm; + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + initial_hid_control_point = INITIAL_VALUE_HID_CONTROL_POINT; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = sizeof(uint8_t); + attr_char_value.init_offs = 0; + attr_char_value.max_len = sizeof(uint8_t); + attr_char_value.p_value = &initial_hid_control_point; + + return sd_ble_gatts_characteristic_add(p_hids->service_handle, &char_md, + &attr_char_value, + &p_hids->hid_control_point_handles); +} + + +/**@brief Function for adding input report characteristics. + * + * @param[in] p_hids HID Service structure. + * @param[in] p_hids_init Service initialization structure. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t inp_rep_characteristics_add(ble_hids_t * p_hids, + const ble_hids_init_t * p_hids_init) +{ + if ((p_hids_init->inp_rep_count != 0) && (p_hids_init->p_inp_rep_array != NULL)) + { + uint8_t i; + + for (i = 0; i < p_hids_init->inp_rep_count; i++) + { + uint32_t err_code; + ble_hids_inp_rep_init_t * p_rep_init = &p_hids_init->p_inp_rep_array[i]; + ble_gatt_char_props_t properties; + + memset(&properties, 0, sizeof(properties)); + + properties.read = true; + properties.write = p_rep_init->security_mode.write_perm.sm ? 1 : 0; + properties.notify = true; + + err_code = rep_char_add(p_hids, + &properties, + p_rep_init->max_len, + &p_rep_init->rep_ref, + &p_rep_init->security_mode, + p_rep_init->read_resp, + &p_hids->inp_rep_array[i]); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + } + + return NRF_SUCCESS; +} + + +/**@brief Function for adding output report characteristics. + * + * @param[in] p_hids HID Service structure. + * @param[in] p_hids_init Service initialization structure. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t outp_rep_characteristics_add(ble_hids_t * p_hids, + const ble_hids_init_t * p_hids_init) +{ + if ((p_hids_init->outp_rep_count != 0) && (p_hids_init->p_outp_rep_array != NULL)) + { + uint8_t i; + + for (i = 0; i < p_hids_init->outp_rep_count; i++) + { + uint32_t err_code; + ble_hids_outp_rep_init_t * p_rep_init = &p_hids_init->p_outp_rep_array[i]; + ble_gatt_char_props_t properties; + + memset(&properties, 0, sizeof(properties)); + + properties.read = true; + properties.write = true; + properties.write_wo_resp = true; + + err_code = rep_char_add(p_hids, + &properties, + p_rep_init->max_len, + &p_rep_init->rep_ref, + &p_rep_init->security_mode, + p_rep_init->read_resp, + &p_hids->outp_rep_array[i]); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + } + + return NRF_SUCCESS; +} + + +/**@brief Function for adding feature report characteristics. + * + * @param[in] p_hids HID Service structure. + * @param[in] p_hids_init Service initialization structure. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t feature_rep_characteristics_add(ble_hids_t * p_hids, + const ble_hids_init_t * p_hids_init) +{ + if ((p_hids_init->feature_rep_count != 0) && (p_hids_init->p_feature_rep_array != NULL)) + { + uint8_t i; + + for (i = 0; i < p_hids_init->feature_rep_count; i++) + { + uint32_t err_code; + ble_hids_feature_rep_init_t * p_rep_init = &p_hids_init->p_feature_rep_array[i]; + ble_gatt_char_props_t properties; + + memset(&properties, 0, sizeof(properties)); + + properties.read = true; + properties.write = true; + + err_code = rep_char_add(p_hids, + &properties, + p_rep_init->max_len, + &p_rep_init->rep_ref, + &p_rep_init->security_mode, + p_rep_init->read_resp, + &p_hids->feature_rep_array[i]); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + } + + return NRF_SUCCESS; +} + + +/**@brief Function for adding included services. + * + * @param[in] p_hids HID Service structure. + * @param[in] p_hids_init Service initialization structure. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t includes_add(ble_hids_t * p_hids, const ble_hids_init_t * p_hids_init) +{ + uint32_t err_code; + uint8_t i; + uint16_t unused_include_handle; + + for (i = 0; i < p_hids_init->included_services_count; i++) + { + err_code = sd_ble_gatts_include_add(p_hids->service_handle, + p_hids_init->p_included_services_array[i], + &unused_include_handle); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + + return NRF_SUCCESS; +} + + +uint32_t ble_hids_init(ble_hids_t * p_hids, const ble_hids_init_t * p_hids_init) +{ + uint32_t err_code; + ble_uuid_t ble_uuid; + + if ((p_hids_init->inp_rep_count > BLE_HIDS_MAX_INPUT_REP) || + (p_hids_init->outp_rep_count > BLE_HIDS_MAX_OUTPUT_REP) || + (p_hids_init->feature_rep_count > BLE_HIDS_MAX_FEATURE_REP) + ) + { + return NRF_ERROR_INVALID_PARAM; + } + + // Initialize service structure. + p_hids->evt_handler = p_hids_init->evt_handler; + p_hids->error_handler = p_hids_init->error_handler; + p_hids->inp_rep_count = p_hids_init->inp_rep_count; + p_hids->outp_rep_count = p_hids_init->outp_rep_count; + p_hids->feature_rep_count = p_hids_init->feature_rep_count; + p_hids->conn_handle = BLE_CONN_HANDLE_INVALID; + + // Add service. + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_HUMAN_INTERFACE_DEVICE_SERVICE); + + err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, + &ble_uuid, + &p_hids->service_handle); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add includes. + err_code = includes_add(p_hids, p_hids_init); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + if (p_hids_init->is_kb || p_hids_init->is_mouse) + { + // Add Protocol Mode characteristic. + err_code = protocol_mode_char_add(p_hids, &p_hids_init->security_mode_protocol); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + + // Add Input Report characteristics (if any). + err_code = inp_rep_characteristics_add(p_hids, p_hids_init); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add Output Report characteristics (if any). + err_code = outp_rep_characteristics_add(p_hids, p_hids_init); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add Feature Report characteristic (if any). + err_code = feature_rep_characteristics_add(p_hids, p_hids_init); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add Report Map characteristic. + err_code = rep_map_char_add(p_hids, p_hids_init); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + if (p_hids_init->is_kb) + { + // Add Boot Keyboard Input Report characteristic. + err_code = boot_inp_rep_char_add(p_hids, + BLE_UUID_BOOT_KEYBOARD_INPUT_REPORT_CHAR, + BOOT_KB_INPUT_REPORT_MAX_SIZE, + &p_hids_init->security_mode_boot_kb_inp_rep, + &p_hids->boot_kb_inp_rep_handles); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add Boot Keyboard Output Report characteristic. + err_code = boot_kb_outp_rep_char_add(p_hids, p_hids_init); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + + if (p_hids_init->is_mouse) + { + // Add Boot Mouse Input Report characteristic. + err_code = boot_inp_rep_char_add(p_hids, + BLE_UUID_BOOT_MOUSE_INPUT_REPORT_CHAR, + BOOT_MOUSE_INPUT_REPORT_MAX_SIZE, + &p_hids_init->security_mode_boot_mouse_inp_rep, + &p_hids->boot_mouse_inp_rep_handles); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + + // Add HID Information characteristic. + err_code = hid_information_char_add(p_hids, p_hids_init); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add HID Control Point characteristic. + err_code = hid_control_point_char_add(p_hids, &p_hids_init->security_mode_ctrl_point); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + return NRF_SUCCESS; +} + + +uint32_t ble_hids_inp_rep_send(ble_hids_t * p_hids, + uint8_t rep_index, + uint16_t len, + uint8_t * p_data) +{ + uint32_t err_code; + + if (rep_index < p_hids->inp_rep_count) + { + ble_hids_rep_char_t * p_rep_char = &p_hids->inp_rep_array[rep_index]; + + if (p_hids->conn_handle != BLE_CONN_HANDLE_INVALID) + { + ble_gatts_hvx_params_t hvx_params; + uint16_t hvx_len = len; + + memset(&hvx_params, 0, sizeof(hvx_params)); + + hvx_params.handle = p_rep_char->char_handles.value_handle; + hvx_params.type = BLE_GATT_HVX_NOTIFICATION; + hvx_params.offset = 0; + hvx_params.p_len = &hvx_len; + hvx_params.p_data = p_data; + + err_code = sd_ble_gatts_hvx(p_hids->conn_handle, &hvx_params); + if ((err_code == NRF_SUCCESS) && (hvx_len != len)) + { + err_code = NRF_ERROR_DATA_SIZE; + } + } + else + { + err_code = NRF_ERROR_INVALID_STATE; + } + } + else + { + err_code = NRF_ERROR_INVALID_PARAM; + } + + return err_code; +} + + +uint32_t ble_hids_boot_kb_inp_rep_send(ble_hids_t * p_hids, uint16_t len, uint8_t * p_data) +{ + uint32_t err_code; + + if (p_hids->conn_handle != BLE_CONN_HANDLE_INVALID) + { + ble_gatts_hvx_params_t hvx_params; + uint16_t hvx_len = len; + + memset(&hvx_params, 0, sizeof(hvx_params)); + + hvx_params.handle = p_hids->boot_kb_inp_rep_handles.value_handle; + hvx_params.type = BLE_GATT_HVX_NOTIFICATION; + hvx_params.offset = 0; + hvx_params.p_len = &hvx_len; + hvx_params.p_data = p_data; + + err_code = sd_ble_gatts_hvx(p_hids->conn_handle, &hvx_params); + if ((err_code == NRF_SUCCESS) && (hvx_len != len)) + { + err_code = NRF_ERROR_DATA_SIZE; + } + } + else + { + err_code = NRF_ERROR_INVALID_STATE; + } + + return err_code; +} + + +uint32_t ble_hids_boot_mouse_inp_rep_send(ble_hids_t * p_hids, + uint8_t buttons, + int8_t x_delta, + int8_t y_delta, + uint16_t optional_data_len, + uint8_t * p_optional_data) +{ + uint32_t err_code; + + if (p_hids->conn_handle != BLE_CONN_HANDLE_INVALID) + { + uint16_t hvx_len = BOOT_MOUSE_INPUT_REPORT_MIN_SIZE + optional_data_len; + + if (hvx_len <= BOOT_MOUSE_INPUT_REPORT_MAX_SIZE) + { + uint8_t buffer[BOOT_MOUSE_INPUT_REPORT_MAX_SIZE]; + ble_gatts_hvx_params_t hvx_params; + + APP_ERROR_CHECK_BOOL(BOOT_MOUSE_INPUT_REPORT_MIN_SIZE == 3); + + // Build buffer + buffer[0] = buttons; + buffer[1] = (uint8_t)x_delta; + buffer[2] = (uint8_t)y_delta; + + if (optional_data_len > 0) + { + memcpy(&buffer[3], p_optional_data, optional_data_len); + } + + // Pass buffer to stack + memset(&hvx_params, 0, sizeof(hvx_params)); + + hvx_params.handle = p_hids->boot_mouse_inp_rep_handles.value_handle; + hvx_params.type = BLE_GATT_HVX_NOTIFICATION; + hvx_params.offset = 0; + hvx_params.p_len = &hvx_len; + hvx_params.p_data = buffer; + + err_code = sd_ble_gatts_hvx(p_hids->conn_handle, &hvx_params); + if ((err_code == NRF_SUCCESS) && + (hvx_len != BOOT_MOUSE_INPUT_REPORT_MIN_SIZE + optional_data_len) + ) + { + err_code = NRF_ERROR_DATA_SIZE; + } + } + else + { + err_code = NRF_ERROR_DATA_SIZE; + } + } + else + { + err_code = NRF_ERROR_INVALID_STATE; + } + + return err_code; +} + + +uint32_t ble_hids_outp_rep_get(ble_hids_t * p_hids, + uint8_t rep_index, + uint16_t len, + uint8_t offset, + uint8_t * p_outp_rep) +{ + ble_gatts_value_t gatts_value; + + // Initialize value struct. + memset(&gatts_value, 0, sizeof(gatts_value)); + + gatts_value.len = len; + gatts_value.offset = offset; + gatts_value.p_value = p_outp_rep; + + return sd_ble_gatts_value_get(p_hids->conn_handle, + p_hids->outp_rep_array[rep_index].char_handles.value_handle, + &gatts_value); +} + +/** + @} +*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hids/ble_hids.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hids/ble_hids.h new file mode 100644 index 0000000000..ff18e000ad --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hids/ble_hids.h @@ -0,0 +1,314 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_sdk_srv_hids Human Interface Device Service + * @{ + * @ingroup ble_sdk_srv + * @brief Human Interface Device Service module. + * + * @details This module implements the Human Interface Device Service with the corresponding set of + * characteristics. During initialization it adds the Human Interface Device Service and + * a set of characteristics as per the Human Interface Device Service specification and + * the user requirements to the BLE stack database. + * + * If enabled, notification of Input Report characteristics is performed when the + * application calls the corresponding ble_hids_xx_input_report_send() function. + * + * If an event handler is supplied by the application, the Human Interface Device Service + * will generate Human Interface Device Service events to the application. + * + * @note The application must propagate BLE stack events to the Human Interface Device Service + * module by calling ble_hids_on_ble_evt() from the @ref softdevice_handler callback. + * + * @note Attention! + * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile + * qualification listings, this section of source code must not be modified. + */ + +#ifndef BLE_HIDS_H__ +#define BLE_HIDS_H__ + +#include +#include +#include "ble.h" +#include "ble_srv_common.h" + +/** @name Report Type values + * @anchor BLE_HIDS_REPORT_TYPE @{ + */ +// Report Type values +#define BLE_HIDS_REP_TYPE_INPUT 1 +#define BLE_HIDS_REP_TYPE_OUTPUT 2 +#define BLE_HIDS_REP_TYPE_FEATURE 3 +/** @} */ + +// Maximum number of the various Report Types +#define BLE_HIDS_MAX_INPUT_REP 10 +#define BLE_HIDS_MAX_OUTPUT_REP 10 +#define BLE_HIDS_MAX_FEATURE_REP 10 + +// Information Flags +#define HID_INFO_FLAG_REMOTE_WAKE_MSK 0x01 +#define HID_INFO_FLAG_NORMALLY_CONNECTABLE_MSK 0x02 + +/**@brief HID Service characteristic id. */ +typedef struct +{ + uint16_t uuid; /**< UUID of characteristic. */ + uint8_t rep_type; /**< Type of report (only used for BLE_UUID_REPORT_CHAR, see @ref BLE_HIDS_REPORT_TYPE). */ + uint8_t rep_index; /**< Index of the characteristic (only used for BLE_UUID_REPORT_CHAR). */ +} ble_hids_char_id_t; + +/**@brief HID Service event type. */ +typedef enum +{ + BLE_HIDS_EVT_HOST_SUSP, /**< Suspend command received. */ + BLE_HIDS_EVT_HOST_EXIT_SUSP, /**< Exit suspend command received. */ + BLE_HIDS_EVT_NOTIF_ENABLED, /**< Notification enabled event. */ + BLE_HIDS_EVT_NOTIF_DISABLED, /**< Notification disabled event. */ + BLE_HIDS_EVT_REP_CHAR_WRITE, /**< A new value has been written to an Report characteristic. */ + BLE_HIDS_EVT_BOOT_MODE_ENTERED, /**< Boot mode entered. */ + BLE_HIDS_EVT_REPORT_MODE_ENTERED, /**< Report mode entered. */ + BLE_HIDS_EVT_REPORT_READ /**< Read with response */ +} ble_hids_evt_type_t; + +/**@brief HID Service event. */ +typedef struct +{ + ble_hids_evt_type_t evt_type; /**< Type of event. */ + union + { + struct + { + ble_hids_char_id_t char_id; /**< Id of characteristic for which notification has been started. */ + } notification; + struct + { + ble_hids_char_id_t char_id; /**< Id of characteristic having been written. */ + uint16_t offset; /**< Offset for the write operation. */ + uint16_t len; /**< Length of the incoming data. */ + uint8_t* data; /**< Incoming data, variable length */ + } char_write; + struct + { + ble_hids_char_id_t char_id; /**< Id of characteristic being read. */ + } char_auth_read; + } params; + ble_evt_t * p_ble_evt; /**< corresponding received ble event, NULL if not relevant */ +} ble_hids_evt_t; + +// Forward declaration of the ble_hids_t type. +typedef struct ble_hids_s ble_hids_t; + +/**@brief HID Service event handler type. */ +typedef void (*ble_hids_evt_handler_t) (ble_hids_t * p_hids, ble_hids_evt_t * p_evt); + +/**@brief HID Information characteristic value. */ +typedef struct +{ + uint16_t bcd_hid; /**< 16-bit unsigned integer representing version number of base USB HID Specification implemented by HID Device */ + uint8_t b_country_code; /**< Identifies which country the hardware is localized for. Most hardware is not localized and thus this value would be zero (0). */ + uint8_t flags; /**< See http://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.hid_information.xml */ + ble_srv_security_mode_t security_mode; /**< Security mode for the HID Information characteristic. */ +} ble_hids_hid_information_t; + +/**@brief HID Service Input Report characteristic init structure. This contains all options and + * data needed for initialization of one Input Report characteristic. */ +typedef struct +{ + uint16_t max_len; /**< Maximum length of characteristic value. */ + ble_srv_report_ref_t rep_ref; /**< Value of the Report Reference descriptor. */ + ble_srv_cccd_security_mode_t security_mode; /**< Security mode for the HID Input Report characteristic, including cccd. */ + uint8_t read_resp : 1; /**< Should application generate a response to read requests. */ +} ble_hids_inp_rep_init_t; + +/**@brief HID Service Output Report characteristic init structure. This contains all options and + * data needed for initialization of one Output Report characteristic. */ +typedef struct +{ + uint16_t max_len; /**< Maximum length of characteristic value. */ + ble_srv_report_ref_t rep_ref; /**< Value of the Report Reference descriptor. */ + ble_srv_cccd_security_mode_t security_mode; /**< Security mode for the HID Output Report characteristic, including cccd. */ + uint8_t read_resp : 1; /**< Should application generate a response to read requests. */ +} ble_hids_outp_rep_init_t; + +/**@brief HID Service Feature Report characteristic init structure. This contains all options and + * data needed for initialization of one Feature Report characteristic. */ +typedef struct +{ + uint16_t max_len; /**< Maximum length of characteristic value. */ + ble_srv_report_ref_t rep_ref; /**< Value of the Report Reference descriptor. */ + ble_srv_cccd_security_mode_t security_mode; /**< Security mode for the HID Service Feature Report characteristic, including cccd. */ + uint8_t read_resp : 1; /**< Should application generate a response to read requests. */ +} ble_hids_feature_rep_init_t; + +/**@brief HID Service Report Map characteristic init structure. This contains all options and data + * needed for initialization of the Report Map characteristic. */ +typedef struct +{ + uint8_t * p_data; /**< Report map data. */ + uint16_t data_len; /**< Length of report map data. */ + uint8_t ext_rep_ref_num; /**< Number of Optional External Report Reference descriptors. */ + ble_uuid_t * p_ext_rep_ref; /**< Optional External Report Reference descriptor (will be added if != NULL). */ + ble_srv_security_mode_t security_mode; /**< Security mode for the HID Service Report Map characteristic. */ +} ble_hids_rep_map_init_t; + +/**@brief HID Report characteristic structure. */ +typedef struct +{ + ble_gatts_char_handles_t char_handles; /**< Handles related to the Report characteristic. */ + uint16_t ref_handle; /**< Handle of the Report Reference descriptor. */ +} ble_hids_rep_char_t; + +/**@brief HID Service init structure. This contains all options and data needed for initialization + * of the service. */ +typedef struct +{ + ble_hids_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the HID Service. */ + ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ + bool is_kb; /**< TRUE if device is operating as a keyboard, FALSE if it is not. */ + bool is_mouse; /**< TRUE if device is operating as a mouse, FALSE if it is not. */ + uint8_t inp_rep_count; /**< Number of Input Report characteristics. */ + ble_hids_inp_rep_init_t * p_inp_rep_array; /**< Information about the Input Report characteristics. */ + uint8_t outp_rep_count; /**< Number of Output Report characteristics. */ + ble_hids_outp_rep_init_t * p_outp_rep_array; /**< Information about the Output Report characteristics. */ + uint8_t feature_rep_count; /**< Number of Feature Report characteristics. */ + ble_hids_feature_rep_init_t * p_feature_rep_array; /**< Information about the Feature Report characteristics. */ + ble_hids_rep_map_init_t rep_map; /**< Information nedeed for initialization of the Report Map characteristic. */ + ble_hids_hid_information_t hid_information; /**< Value of the HID Information characteristic. */ + uint8_t included_services_count; /**< Number of services to include in HID service. */ + uint16_t * p_included_services_array; /**< Array of services to include in HID service. */ + ble_srv_security_mode_t security_mode_protocol; /**< Security settings for HID service protocol attribute */ + ble_srv_security_mode_t security_mode_ctrl_point; /**< Security settings for HID service Control Point attribute */ + ble_srv_cccd_security_mode_t security_mode_boot_mouse_inp_rep; /**< Security settings for HID service Mouse input report attribute */ + ble_srv_cccd_security_mode_t security_mode_boot_kb_inp_rep; /**< Security settings for HID service Keyboard input report attribute */ + ble_srv_security_mode_t security_mode_boot_kb_outp_rep; /**< Security settings for HID service Keyboard output report attribute */ +} ble_hids_init_t; + +/**@brief HID Service structure. This contains various status information for the service. */ +struct ble_hids_s +{ + ble_hids_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the HID Service. */ + ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ + uint16_t service_handle; /**< Handle of HID Service (as provided by the BLE stack). */ + ble_gatts_char_handles_t protocol_mode_handles; /**< Handles related to the Protocol Mode characteristic (will only be created if ble_hids_init_t.is_kb or ble_hids_init_t.is_mouse is set). */ + uint8_t inp_rep_count; /**< Number of Input Report characteristics. */ + ble_hids_rep_char_t inp_rep_array[BLE_HIDS_MAX_INPUT_REP]; /**< Information about the Input Report characteristics. */ + uint8_t outp_rep_count; /**< Number of Output Report characteristics. */ + ble_hids_rep_char_t outp_rep_array[BLE_HIDS_MAX_OUTPUT_REP]; /**< Information about the Output Report characteristics. */ + uint8_t feature_rep_count; /**< Number of Feature Report characteristics. */ + ble_hids_rep_char_t feature_rep_array[BLE_HIDS_MAX_FEATURE_REP]; /**< Information about the Feature Report characteristics. */ + ble_gatts_char_handles_t rep_map_handles; /**< Handles related to the Report Map characteristic. */ + uint16_t rep_map_ext_rep_ref_handle; /**< Handle of the Report Map External Report Reference descriptor. */ + ble_gatts_char_handles_t boot_kb_inp_rep_handles; /**< Handles related to the Boot Keyboard Input Report characteristic (will only be created if ble_hids_init_t.is_kb is set). */ + ble_gatts_char_handles_t boot_kb_outp_rep_handles; /**< Handles related to the Boot Keyboard Output Report characteristic (will only be created if ble_hids_init_t.is_kb is set). */ + ble_gatts_char_handles_t boot_mouse_inp_rep_handles; /**< Handles related to the Boot Mouse Input Report characteristic (will only be created if ble_hids_init_t.is_mouse is set). */ + ble_gatts_char_handles_t hid_information_handles; /**< Handles related to the Report Map characteristic. */ + ble_gatts_char_handles_t hid_control_point_handles; /**< Handles related to the Report Map characteristic. */ + uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ +}; + +/**@brief Function for initializing the HID Service. + * + * @param[out] p_hids HID Service structure. This structure will have to be supplied by the + * application. It will be initialized by this function, and will later be + * used to identify this particular service instance. + * @param[in] p_hids_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. + */ +uint32_t ble_hids_init(ble_hids_t * p_hids, const ble_hids_init_t * p_hids_init); + +/**@brief Function for handling the Application's BLE Stack events. + * + * @details Handles all events from the BLE stack of interest to the HID Service. + * + * @param[in] p_hids HID Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +void ble_hids_on_ble_evt(ble_hids_t * p_hids, ble_evt_t * p_ble_evt); + +/**@brief Function for sending Input Report. + * + * @details Sends data on an Input Report characteristic. + * + * @param[in] p_hids HID Service structure. + * @param[in] rep_index Index of the characteristic (corresponding to the index in + * ble_hids_t.inp_rep_array as passed to ble_hids_init()). + * @param[in] len Length of data to be sent. + * @param[in] p_data Pointer to data to be sent. + * + * @return NRF_SUCCESS on successful sending of input report, otherwise an error code. + */ +uint32_t ble_hids_inp_rep_send(ble_hids_t * p_hids, + uint8_t rep_index, + uint16_t len, + uint8_t * p_data); + +/**@brief Function for sending Boot Keyboard Input Report. + * + * @details Sends data on an Boot Keyboard Input Report characteristic. + * + * @param[in] p_hids HID Service structure. + * @param[in] len Length of data to be sent. + * @param[in] p_data Pointer to data to be sent. + * + * @return NRF_SUCCESS on successful sending of the report, otherwise an error code. + */ +uint32_t ble_hids_boot_kb_inp_rep_send(ble_hids_t * p_hids, + uint16_t len, + uint8_t * p_data); + +/**@brief Function for sending Boot Mouse Input Report. + * + * @details Sends data on an Boot Mouse Input Report characteristic. + * + * @param[in] p_hids HID Service structure. + * @param[in] buttons State of mouse buttons. + * @param[in] x_delta Horizontal movement. + * @param[in] y_delta Vertical movement. + * @param[in] optional_data_len Length of optional part of Boot Mouse Input Report. + * @param[in] p_optional_data Optional part of Boot Mouse Input Report. + * + * @return NRF_SUCCESS on successful sending of the report, otherwise an error code. + */ +uint32_t ble_hids_boot_mouse_inp_rep_send(ble_hids_t * p_hids, + uint8_t buttons, + int8_t x_delta, + int8_t y_delta, + uint16_t optional_data_len, + uint8_t * p_optional_data); + +/**@brief Function for getting the current value of Output Report from the stack. + * + * @details Fetches the current value of the output report characteristic from the stack. + * + * @param[in] p_hids HID Service structure. + * @param[in] rep_index Index of the characteristic (corresponding to the index in + * ble_hids_t.outp_rep_array as passed to ble_hids_init()). + * @param[in] len Length of output report needed. + * @param[in] offset Offset in bytes to read from. + * @param[out] p_outp_rep Pointer to the output report. + * + * @return NRF_SUCCESS on successful read of the report, otherwise an error code. + */ +uint32_t ble_hids_outp_rep_get(ble_hids_t * p_hids, + uint8_t rep_index, + uint16_t len, + uint8_t offset, + uint8_t * p_outp_rep); + +#endif // BLE_HIDS_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs/ble_hrs.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs/ble_hrs.c new file mode 100644 index 0000000000..4975f0736b --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs/ble_hrs.c @@ -0,0 +1,440 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/* Attention! +* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile +* qualification listings, this section of source code must not be modified. +*/ + +#include "ble_hrs.h" +#include +#include "nordic_common.h" +#include "ble_l2cap.h" +#include "ble_srv_common.h" +#include "app_util.h" + + +#define OPCODE_LENGTH 1 /**< Length of opcode inside Heart Rate Measurement packet. */ +#define HANDLE_LENGTH 2 /**< Length of handle inside Heart Rate Measurement packet. */ +#define MAX_HRM_LEN (BLE_L2CAP_MTU_DEF - OPCODE_LENGTH - HANDLE_LENGTH) /**< Maximum size of a transmitted Heart Rate Measurement. */ + +#define INITIAL_VALUE_HRM 0 /**< Initial Heart Rate Measurement value. */ + +// Heart Rate Measurement flag bits +#define HRM_FLAG_MASK_HR_VALUE_16BIT (0x01 << 0) /**< Heart Rate Value Format bit. */ +#define HRM_FLAG_MASK_SENSOR_CONTACT_DETECTED (0x01 << 1) /**< Sensor Contact Detected bit. */ +#define HRM_FLAG_MASK_SENSOR_CONTACT_SUPPORTED (0x01 << 2) /**< Sensor Contact Supported bit. */ +#define HRM_FLAG_MASK_EXPENDED_ENERGY_INCLUDED (0x01 << 3) /**< Energy Expended Status bit. Feature Not Supported */ +#define HRM_FLAG_MASK_RR_INTERVAL_INCLUDED (0x01 << 4) /**< RR-Interval bit. */ + + +/**@brief Function for handling the Connect event. + * + * @param[in] p_hrs Heart Rate Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_connect(ble_hrs_t * p_hrs, ble_evt_t * p_ble_evt) +{ + p_hrs->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; +} + + +/**@brief Function for handling the Disconnect event. + * + * @param[in] p_hrs Heart Rate Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_disconnect(ble_hrs_t * p_hrs, ble_evt_t * p_ble_evt) +{ + UNUSED_PARAMETER(p_ble_evt); + p_hrs->conn_handle = BLE_CONN_HANDLE_INVALID; +} + + +/**@brief Function for handling write events to the Heart Rate Measurement characteristic. + * + * @param[in] p_hrs Heart Rate Service structure. + * @param[in] p_evt_write Write event received from the BLE stack. + */ +static void on_hrm_cccd_write(ble_hrs_t * p_hrs, ble_gatts_evt_write_t * p_evt_write) +{ + if (p_evt_write->len == 2) + { + // CCCD written, update notification state + if (p_hrs->evt_handler != NULL) + { + ble_hrs_evt_t evt; + + if (ble_srv_is_notification_enabled(p_evt_write->data)) + { + evt.evt_type = BLE_HRS_EVT_NOTIFICATION_ENABLED; + } + else + { + evt.evt_type = BLE_HRS_EVT_NOTIFICATION_DISABLED; + } + + p_hrs->evt_handler(p_hrs, &evt); + } + } +} + + +/**@brief Function for handling the Write event. + * + * @param[in] p_hrs Heart Rate Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_write(ble_hrs_t * p_hrs, ble_evt_t * p_ble_evt) +{ + ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; + + if (p_evt_write->handle == p_hrs->hrm_handles.cccd_handle) + { + on_hrm_cccd_write(p_hrs, p_evt_write); + } +} + + +void ble_hrs_on_ble_evt(ble_hrs_t * p_hrs, ble_evt_t * p_ble_evt) +{ + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + on_connect(p_hrs, p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + on_disconnect(p_hrs, p_ble_evt); + break; + + case BLE_GATTS_EVT_WRITE: + on_write(p_hrs, p_ble_evt); + break; + + default: + // No implementation needed. + break; + } +} + + +/**@brief Function for encoding a Heart Rate Measurement. + * + * @param[in] p_hrs Heart Rate Service structure. + * @param[in] heart_rate Measurement to be encoded. + * @param[out] p_encoded_buffer Buffer where the encoded data will be written. + * + * @return Size of encoded data. + */ +static uint8_t hrm_encode(ble_hrs_t * p_hrs, uint16_t heart_rate, uint8_t * p_encoded_buffer) +{ + uint8_t flags = 0; + uint8_t len = 1; + int i; + + // Set sensor contact related flags + if (p_hrs->is_sensor_contact_supported) + { + flags |= HRM_FLAG_MASK_SENSOR_CONTACT_SUPPORTED; + } + if (p_hrs->is_sensor_contact_detected) + { + flags |= HRM_FLAG_MASK_SENSOR_CONTACT_DETECTED; + } + + // Encode heart rate measurement + if (heart_rate > 0xff) + { + flags |= HRM_FLAG_MASK_HR_VALUE_16BIT; + len += uint16_encode(heart_rate, &p_encoded_buffer[len]); + } + else + { + p_encoded_buffer[len++] = (uint8_t)heart_rate; + } + + // Encode rr_interval values + if (p_hrs->rr_interval_count > 0) + { + flags |= HRM_FLAG_MASK_RR_INTERVAL_INCLUDED; + } + for (i = 0; i < p_hrs->rr_interval_count; i++) + { + if (len + sizeof(uint16_t) > MAX_HRM_LEN) + { + // Not all stored rr_interval values can fit into the encoded hrm, + // move the remaining values to the start of the buffer. + memmove(&p_hrs->rr_interval[0], + &p_hrs->rr_interval[i], + (p_hrs->rr_interval_count - i) * sizeof(uint16_t)); + break; + } + len += uint16_encode(p_hrs->rr_interval[i], &p_encoded_buffer[len]); + } + p_hrs->rr_interval_count -= i; + + // Add flags + p_encoded_buffer[0] = flags; + + return len; +} + + +/**@brief Function for adding the Heart Rate Measurement characteristic. + * + * @param[in] p_hrs Heart Rate Service structure. + * @param[in] p_hrs_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t heart_rate_measurement_char_add(ble_hrs_t * p_hrs, + const ble_hrs_init_t * p_hrs_init) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_md_t cccd_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + uint8_t encoded_initial_hrm[MAX_HRM_LEN]; + + memset(&cccd_md, 0, sizeof(cccd_md)); + + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); + cccd_md.write_perm = p_hrs_init->hrs_hrm_attr_md.cccd_write_perm; + cccd_md.vloc = BLE_GATTS_VLOC_STACK; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.notify = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = &cccd_md; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_HEART_RATE_MEASUREMENT_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.read_perm = p_hrs_init->hrs_hrm_attr_md.read_perm; + attr_md.write_perm = p_hrs_init->hrs_hrm_attr_md.write_perm; + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 1; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = hrm_encode(p_hrs, INITIAL_VALUE_HRM, encoded_initial_hrm); + attr_char_value.init_offs = 0; + attr_char_value.max_len = MAX_HRM_LEN; + attr_char_value.p_value = encoded_initial_hrm; + + return sd_ble_gatts_characteristic_add(p_hrs->service_handle, + &char_md, + &attr_char_value, + &p_hrs->hrm_handles); +} + + +/**@brief Function for adding the Body Sensor Location characteristic. + * + * @param[in] p_hrs Heart Rate Service structure. + * @param[in] p_hrs_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t body_sensor_location_char_add(ble_hrs_t * p_hrs, const ble_hrs_init_t * p_hrs_init) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.read = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = NULL; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_BODY_SENSOR_LOCATION_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.read_perm = p_hrs_init->hrs_bsl_attr_md.read_perm; + attr_md.write_perm = p_hrs_init->hrs_bsl_attr_md.write_perm; + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = sizeof (uint8_t); + attr_char_value.init_offs = 0; + attr_char_value.max_len = sizeof (uint8_t); + attr_char_value.p_value = p_hrs_init->p_body_sensor_location; + + return sd_ble_gatts_characteristic_add(p_hrs->service_handle, + &char_md, + &attr_char_value, + &p_hrs->bsl_handles); +} + + +uint32_t ble_hrs_init(ble_hrs_t * p_hrs, const ble_hrs_init_t * p_hrs_init) +{ + uint32_t err_code; + ble_uuid_t ble_uuid; + + // Initialize service structure + p_hrs->evt_handler = p_hrs_init->evt_handler; + p_hrs->is_sensor_contact_supported = p_hrs_init->is_sensor_contact_supported; + p_hrs->conn_handle = BLE_CONN_HANDLE_INVALID; + p_hrs->is_sensor_contact_detected = false; + p_hrs->rr_interval_count = 0; + + // Add service + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_HEART_RATE_SERVICE); + + err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, + &ble_uuid, + &p_hrs->service_handle); + + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add heart rate measurement characteristic + err_code = heart_rate_measurement_char_add(p_hrs, p_hrs_init); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + if (p_hrs_init->p_body_sensor_location != NULL) + { + // Add body sensor location characteristic + err_code = body_sensor_location_char_add(p_hrs, p_hrs_init); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + + return NRF_SUCCESS; +} + + +uint32_t ble_hrs_heart_rate_measurement_send(ble_hrs_t * p_hrs, uint16_t heart_rate) +{ + uint32_t err_code; + + // Send value if connected and notifying + if (p_hrs->conn_handle != BLE_CONN_HANDLE_INVALID) + { + uint8_t encoded_hrm[MAX_HRM_LEN]; + uint16_t len; + uint16_t hvx_len; + ble_gatts_hvx_params_t hvx_params; + + len = hrm_encode(p_hrs, heart_rate, encoded_hrm); + hvx_len = len; + + memset(&hvx_params, 0, sizeof(hvx_params)); + + hvx_params.handle = p_hrs->hrm_handles.value_handle; + hvx_params.type = BLE_GATT_HVX_NOTIFICATION; + hvx_params.offset = 0; + hvx_params.p_len = &hvx_len; + hvx_params.p_data = encoded_hrm; + + err_code = sd_ble_gatts_hvx(p_hrs->conn_handle, &hvx_params); + if ((err_code == NRF_SUCCESS) && (hvx_len != len)) + { + err_code = NRF_ERROR_DATA_SIZE; + } + } + else + { + err_code = NRF_ERROR_INVALID_STATE; + } + + return err_code; +} + + +void ble_hrs_rr_interval_add(ble_hrs_t * p_hrs, uint16_t rr_interval) +{ + if (p_hrs->rr_interval_count == BLE_HRS_MAX_BUFFERED_RR_INTERVALS) + { + // The rr_interval buffer is full, delete the oldest value + memmove(&p_hrs->rr_interval[0], + &p_hrs->rr_interval[1], + (BLE_HRS_MAX_BUFFERED_RR_INTERVALS - 1) * sizeof(uint16_t)); + p_hrs->rr_interval_count--; + } + + // Add new value + p_hrs->rr_interval[p_hrs->rr_interval_count++] = rr_interval; +} + + +bool ble_hrs_rr_interval_buffer_is_full(ble_hrs_t * p_hrs) +{ + return (p_hrs->rr_interval_count == BLE_HRS_MAX_BUFFERED_RR_INTERVALS); +} + + +uint32_t ble_hrs_sensor_contact_supported_set(ble_hrs_t * p_hrs, bool is_sensor_contact_supported) +{ + // Check if we are connected to peer + if (p_hrs->conn_handle == BLE_CONN_HANDLE_INVALID) + { + p_hrs->is_sensor_contact_supported = is_sensor_contact_supported; + return NRF_SUCCESS; + } + else + { + return NRF_ERROR_INVALID_STATE; + } +} + + +void ble_hrs_sensor_contact_detected_update(ble_hrs_t * p_hrs, bool is_sensor_contact_detected) +{ + p_hrs->is_sensor_contact_detected = is_sensor_contact_detected; +} + + +uint32_t ble_hrs_body_sensor_location_set(ble_hrs_t * p_hrs, uint8_t body_sensor_location) +{ + ble_gatts_value_t gatts_value; + + // Initialize value struct. + memset(&gatts_value, 0, sizeof(gatts_value)); + + gatts_value.len = sizeof(uint8_t); + gatts_value.offset = 0; + gatts_value.p_value = &body_sensor_location; + + return sd_ble_gatts_value_set(p_hrs->conn_handle, p_hrs->bsl_handles.value_handle, &gatts_value); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs/ble_hrs.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs/ble_hrs.h new file mode 100644 index 0000000000..7936091db3 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs/ble_hrs.h @@ -0,0 +1,192 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_sdk_srv_hrs Heart Rate Service + * @{ + * @ingroup ble_sdk_srv + * @brief Heart Rate Service module. + * + * @details This module implements the Heart Rate Service with the Heart Rate Measurement, + * Body Sensor Location and Heart Rate Control Point characteristics. + * During initialization it adds the Heart Rate Service and Heart Rate Measurement + * characteristic to the BLE stack database. Optionally it also adds the + * Body Sensor Location and Heart Rate Control Point characteristics. + * + * If enabled, notification of the Heart Rate Measurement characteristic is performed + * when the application calls ble_hrs_heart_rate_measurement_send(). + * + * The Heart Rate Service also provides a set of functions for manipulating the + * various fields in the Heart Rate Measurement characteristic, as well as setting + * the Body Sensor Location characteristic value. + * + * If an event handler is supplied by the application, the Heart Rate Service will + * generate Heart Rate Service events to the application. + * + * @note The application must propagate BLE stack events to the Heart Rate Service module by calling + * ble_hrs_on_ble_evt() from the @ref softdevice_handler callback. + * + * @note Attention! + * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile + * qualification listings, this section of source code must not be modified. + */ + +#ifndef BLE_HRS_H__ +#define BLE_HRS_H__ + +#include +#include +#include "ble.h" +#include "ble_srv_common.h" + +// Body Sensor Location values +#define BLE_HRS_BODY_SENSOR_LOCATION_OTHER 0 +#define BLE_HRS_BODY_SENSOR_LOCATION_CHEST 1 +#define BLE_HRS_BODY_SENSOR_LOCATION_WRIST 2 +#define BLE_HRS_BODY_SENSOR_LOCATION_FINGER 3 +#define BLE_HRS_BODY_SENSOR_LOCATION_HAND 4 +#define BLE_HRS_BODY_SENSOR_LOCATION_EAR_LOBE 5 +#define BLE_HRS_BODY_SENSOR_LOCATION_FOOT 6 + +#define BLE_HRS_MAX_BUFFERED_RR_INTERVALS 20 /**< Size of RR Interval buffer inside service. */ + +/**@brief Heart Rate Service event type. */ +typedef enum +{ + BLE_HRS_EVT_NOTIFICATION_ENABLED, /**< Heart Rate value notification enabled event. */ + BLE_HRS_EVT_NOTIFICATION_DISABLED /**< Heart Rate value notification disabled event. */ +} ble_hrs_evt_type_t; + +/**@brief Heart Rate Service event. */ +typedef struct +{ + ble_hrs_evt_type_t evt_type; /**< Type of event. */ +} ble_hrs_evt_t; + +// Forward declaration of the ble_hrs_t type. +typedef struct ble_hrs_s ble_hrs_t; + +/**@brief Heart Rate Service event handler type. */ +typedef void (*ble_hrs_evt_handler_t) (ble_hrs_t * p_hrs, ble_hrs_evt_t * p_evt); + +/**@brief Heart Rate Service init structure. This contains all options and data needed for + * initialization of the service. */ +typedef struct +{ + ble_hrs_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Heart Rate Service. */ + bool is_sensor_contact_supported; /**< Determines if sensor contact detection is to be supported. */ + uint8_t * p_body_sensor_location; /**< If not NULL, initial value of the Body Sensor Location characteristic. */ + ble_srv_cccd_security_mode_t hrs_hrm_attr_md; /**< Initial security level for heart rate service measurement attribute */ + ble_srv_security_mode_t hrs_bsl_attr_md; /**< Initial security level for body sensor location attribute */ +} ble_hrs_init_t; + +/**@brief Heart Rate Service structure. This contains various status information for the service. */ +struct ble_hrs_s +{ + ble_hrs_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Heart Rate Service. */ + bool is_expended_energy_supported; /**< TRUE if Expended Energy measurement is supported. */ + bool is_sensor_contact_supported; /**< TRUE if sensor contact detection is supported. */ + uint16_t service_handle; /**< Handle of Heart Rate Service (as provided by the BLE stack). */ + ble_gatts_char_handles_t hrm_handles; /**< Handles related to the Heart Rate Measurement characteristic. */ + ble_gatts_char_handles_t bsl_handles; /**< Handles related to the Body Sensor Location characteristic. */ + ble_gatts_char_handles_t hrcp_handles; /**< Handles related to the Heart Rate Control Point characteristic. */ + uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ + bool is_sensor_contact_detected; /**< TRUE if sensor contact has been detected. */ + uint16_t rr_interval[BLE_HRS_MAX_BUFFERED_RR_INTERVALS]; /**< Set of RR Interval measurements since the last Heart Rate Measurement transmission. */ + uint16_t rr_interval_count; /**< Number of RR Interval measurements since the last Heart Rate Measurement transmission. */ +}; + +/**@brief Function for initializing the Heart Rate Service. + * + * @param[out] p_hrs Heart Rate Service structure. This structure will have to be supplied by + * the application. It will be initialized by this function, and will later + * be used to identify this particular service instance. + * @param[in] p_hrs_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. + */ +uint32_t ble_hrs_init(ble_hrs_t * p_hrs, const ble_hrs_init_t * p_hrs_init); + +/**@brief Function for handling the Application's BLE Stack events. + * + * @details Handles all events from the BLE stack of interest to the Heart Rate Service. + * + * @param[in] p_hrs Heart Rate Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +void ble_hrs_on_ble_evt(ble_hrs_t * p_hrs, ble_evt_t * p_ble_evt); + +/**@brief Function for sending heart rate measurement if notification has been enabled. + * + * @details The application calls this function after having performed a heart rate measurement. + * If notification has been enabled, the heart rate measurement data is encoded and sent to + * the client. + * + * @param[in] p_hrs Heart Rate Service structure. + * @param[in] heart_rate New heart rate measurement. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +uint32_t ble_hrs_heart_rate_measurement_send(ble_hrs_t * p_hrs, uint16_t heart_rate); + +/**@brief Function for adding a RR Interval measurement to the RR Interval buffer. + * + * @details All buffered RR Interval measurements will be included in the next heart rate + * measurement message, up to the maximum number of measurements that will fit into the + * message. If the buffer is full, the oldest measurement in the buffer will be deleted. + * + * @param[in] p_hrs Heart Rate Service structure. + * @param[in] rr_interval New RR Interval measurement (will be buffered until the next + * transmission of Heart Rate Measurement). + */ +void ble_hrs_rr_interval_add(ble_hrs_t * p_hrs, uint16_t rr_interval); + +/**@brief Function for checking if RR Interval buffer is full. + * + * @param[in] p_hrs Heart Rate Service structure. + * + * @return true if RR Interval buffer is full, false otherwise. + */ +bool ble_hrs_rr_interval_buffer_is_full(ble_hrs_t * p_hrs); + +/**@brief Function for setting the state of the Sensor Contact Supported bit. + * + * @param[in] p_hrs Heart Rate Service structure. + * @param[in] is_sensor_contact_supported New state of the Sensor Contact Supported bit. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +uint32_t ble_hrs_sensor_contact_supported_set(ble_hrs_t * p_hrs, bool is_sensor_contact_supported); + +/**@brief Function for setting the state of the Sensor Contact Detected bit. + * + * @param[in] p_hrs Heart Rate Service structure. + * @param[in] is_sensor_contact_detected TRUE if sensor contact is detected, FALSE otherwise. + */ +void ble_hrs_sensor_contact_detected_update(ble_hrs_t * p_hrs, bool is_sensor_contact_detected); + +/**@brief Function for setting the Body Sensor Location. + * + * @details Sets a new value of the Body Sensor Location characteristic. The new value will be sent + * to the client the next time the client reads the Body Sensor Location characteristic. + * + * @param[in] p_hrs Heart Rate Service structure. + * @param[in] body_sensor_location New Body Sensor Location. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +uint32_t ble_hrs_body_sensor_location_set(ble_hrs_t * p_hrs, uint8_t body_sensor_location); + +#endif // BLE_HRS_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs_c/ble_hrs_c.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs_c/ble_hrs_c.c new file mode 100644 index 0000000000..a17839e0dd --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs_c/ble_hrs_c.c @@ -0,0 +1,331 @@ +/* + * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is confidential property of Nordic Semiconductor. The use, + * copying, transfer or disclosure of such information is prohibited except by express written + * agreement with Nordic Semiconductor. + * + */ + +/**@cond To Make Doxygen skip documentation generation for this file. + * @{ + */ + +#include "ble_hrs_c.h" +#include "ble_db_discovery.h" +#include "ble_types.h" +#include "ble_srv_common.h" +#include "ble_gattc.h" +#include "app_trace.h" +#include "sdk_common.h" +#include "nrf_log.h" + +#define LOG NRF_LOG_PRINTF_DEBUG /**< Debug logger macro that will be used in this file to do logging of important information over UART. */ + +#define HRM_FLAG_MASK_HR_16BIT (0x01 << 0) /**< Bit mask used to extract the type of heart rate value. This is used to find if the received heart rate is a 16 bit value or an 8 bit value. */ + +#define TX_BUFFER_MASK 0x07 /**< TX Buffer mask, must be a mask of continuous zeroes, followed by continuous sequence of ones: 000...111. */ +#define TX_BUFFER_SIZE (TX_BUFFER_MASK + 1) /**< Size of send buffer, which is 1 higher than the mask. */ + +#define WRITE_MESSAGE_LENGTH BLE_CCCD_VALUE_LEN /**< Length of the write message for CCCD. */ +#define WRITE_MESSAGE_LENGTH BLE_CCCD_VALUE_LEN /**< Length of the write message for CCCD. */ + +typedef enum +{ + READ_REQ, /**< Type identifying that this tx_message is a read request. */ + WRITE_REQ /**< Type identifying that this tx_message is a write request. */ +} tx_request_t; + +/**@brief Structure for writing a message to the peer, i.e. CCCD. + */ +typedef struct +{ + uint8_t gattc_value[WRITE_MESSAGE_LENGTH]; /**< The message to write. */ + ble_gattc_write_params_t gattc_params; /**< GATTC parameters for this message. */ +} write_params_t; + +/**@brief Structure for holding data to be transmitted to the connected central. + */ +typedef struct +{ + uint16_t conn_handle; /**< Connection handle to be used when transmitting this message. */ + tx_request_t type; /**< Type of this message, i.e. read or write message. */ + union + { + uint16_t read_handle; /**< Read request message. */ + write_params_t write_req; /**< Write request message. */ + } req; +} tx_message_t; + + +static tx_message_t m_tx_buffer[TX_BUFFER_SIZE]; /**< Transmit buffer for messages to be transmitted to the central. */ +static uint32_t m_tx_insert_index = 0; /**< Current index in the transmit buffer where the next message should be inserted. */ +static uint32_t m_tx_index = 0; /**< Current index in the transmit buffer from where the next message to be transmitted resides. */ + + +/**@brief Function for passing any pending request from the buffer to the stack. + */ +static void tx_buffer_process(void) +{ + if (m_tx_index != m_tx_insert_index) + { + uint32_t err_code; + + if (m_tx_buffer[m_tx_index].type == READ_REQ) + { + err_code = sd_ble_gattc_read(m_tx_buffer[m_tx_index].conn_handle, + m_tx_buffer[m_tx_index].req.read_handle, + 0); + } + else + { + err_code = sd_ble_gattc_write(m_tx_buffer[m_tx_index].conn_handle, + &m_tx_buffer[m_tx_index].req.write_req.gattc_params); + } + if (err_code == NRF_SUCCESS) + { + LOG("[HRS_C]: SD Read/Write API returns Success..\r\n"); + m_tx_index++; + m_tx_index &= TX_BUFFER_MASK; + } + else + { + LOG("[HRS_C]: SD Read/Write API returns error. This message sending will be " + "attempted again..\r\n"); + } + } +} + + +/**@brief Function for handling write response events. + * + * @param[in] p_ble_hrs_c Pointer to the Heart Rate Client structure. + * @param[in] p_ble_evt Pointer to the BLE event received. + */ +static void on_write_rsp(ble_hrs_c_t * p_ble_hrs_c, const ble_evt_t * p_ble_evt) +{ + // Check if the event if on the link for this instance + if (p_ble_hrs_c->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) + { + return; + } + // Check if there is any message to be sent across to the peer and send it. + tx_buffer_process(); +} + + +/**@brief Function for handling Handle Value Notification received from the SoftDevice. + * + * @details This function will uses the Handle Value Notification received from the SoftDevice + * and checks if it is a notification of the heart rate measurement from the peer. If + * it is, this function will decode the heart rate measurement and send it to the + * application. + * + * @param[in] p_ble_hrs_c Pointer to the Heart Rate Client structure. + * @param[in] p_ble_evt Pointer to the BLE event received. + */ +static void on_hvx(ble_hrs_c_t * p_ble_hrs_c, const ble_evt_t * p_ble_evt) +{ + // Check if the event is on the link for this instance + if (p_ble_hrs_c->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) + { + LOG("[HRS_C]: received HVX on link 0x%x, not associated to this instance, ignore\r\n", + p_ble_evt->evt.gattc_evt.conn_handle); + return; + } + LOG("[HRS_C]: received HVX on handle 0x%x, hrm_handle 0x%x\r\n", + p_ble_evt->evt.gattc_evt.params.hvx.handle, + p_ble_hrs_c->peer_hrs_db.hrm_handle); + // Check if this is a heart rate notification. + if (p_ble_evt->evt.gattc_evt.params.hvx.handle == p_ble_hrs_c->peer_hrs_db.hrm_handle) + { + ble_hrs_c_evt_t ble_hrs_c_evt; + uint32_t index = 0; + + ble_hrs_c_evt.evt_type = BLE_HRS_C_EVT_HRM_NOTIFICATION; + ble_hrs_c_evt.conn_handle = p_ble_hrs_c->conn_handle; + + if (!(p_ble_evt->evt.gattc_evt.params.hvx.data[index++] & HRM_FLAG_MASK_HR_16BIT)) + { + // 8 Bit heart rate value received. + ble_hrs_c_evt.params.hrm.hr_value = p_ble_evt->evt.gattc_evt.params.hvx.data[index++]; //lint !e415 suppress Lint Warning 415: Likely access out of bond + } + else + { + // 16 bit heart rate value received. + ble_hrs_c_evt.params.hrm.hr_value = + uint16_decode(&(p_ble_evt->evt.gattc_evt.params.hvx.data[index])); + } + + p_ble_hrs_c->evt_handler(p_ble_hrs_c, &ble_hrs_c_evt); + } +} + + +/**@brief Function for handling Disconnected event received from the SoftDevice. + * + * @details This function check if the disconnect event is happening on the link + * associated with the current instance of the module, if so it will set its + * conn_handle to invalid. + * + * @param[in] p_ble_hrs_c Pointer to the Heart Rate Client structure. + * @param[in] p_ble_evt Pointer to the BLE event received. + */ +static void on_disconnected(ble_hrs_c_t * p_ble_hrs_c, const ble_evt_t * p_ble_evt) +{ + if (p_ble_hrs_c->conn_handle == p_ble_evt->evt.gap_evt.conn_handle) + { + p_ble_hrs_c->conn_handle = BLE_CONN_HANDLE_INVALID; + p_ble_hrs_c->peer_hrs_db.hrm_cccd_handle = BLE_GATT_HANDLE_INVALID; + p_ble_hrs_c->peer_hrs_db.hrm_handle = BLE_GATT_HANDLE_INVALID; + } +} + + +void ble_hrs_on_db_disc_evt(ble_hrs_c_t * p_ble_hrs_c, const ble_db_discovery_evt_t * p_evt) +{ + // Check if the Heart Rate Service was discovered. + if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE && + p_evt->params.discovered_db.srv_uuid.uuid == BLE_UUID_HEART_RATE_SERVICE && + p_evt->params.discovered_db.srv_uuid.type == BLE_UUID_TYPE_BLE) + { + // Find the CCCD Handle of the Heart Rate Measurement characteristic. + uint32_t i; + + ble_hrs_c_evt_t evt; + + evt.evt_type = BLE_HRS_C_EVT_DISCOVERY_COMPLETE; + evt.conn_handle = p_evt->conn_handle; + + for (i = 0; i < p_evt->params.discovered_db.char_count; i++) + { + if (p_evt->params.discovered_db.charateristics[i].characteristic.uuid.uuid == + BLE_UUID_HEART_RATE_MEASUREMENT_CHAR) + { + // Found Heart Rate characteristic. Store CCCD handle and break. + evt.params.peer_db.hrm_cccd_handle = + p_evt->params.discovered_db.charateristics[i].cccd_handle; + evt.params.peer_db.hrm_handle = + p_evt->params.discovered_db.charateristics[i].characteristic.handle_value; + break; + } + } + + LOG("[HRS_C]: Heart Rate Service discovered at peer.\r\n"); + //If the instance has been assigned prior to db_discovery, assign the db_handles + if(p_ble_hrs_c->conn_handle != BLE_CONN_HANDLE_INVALID) + { + if ((p_ble_hrs_c->peer_hrs_db.hrm_cccd_handle == BLE_GATT_HANDLE_INVALID)&& + (p_ble_hrs_c->peer_hrs_db.hrm_handle == BLE_GATT_HANDLE_INVALID)) + { + p_ble_hrs_c->peer_hrs_db = evt.params.peer_db; + } + } + + + p_ble_hrs_c->evt_handler(p_ble_hrs_c, &evt); + } +} + + +uint32_t ble_hrs_c_init(ble_hrs_c_t * p_ble_hrs_c, ble_hrs_c_init_t * p_ble_hrs_c_init) +{ + VERIFY_PARAM_NOT_NULL(p_ble_hrs_c); + VERIFY_PARAM_NOT_NULL(p_ble_hrs_c_init); + + ble_uuid_t hrs_uuid; + + hrs_uuid.type = BLE_UUID_TYPE_BLE; + hrs_uuid.uuid = BLE_UUID_HEART_RATE_SERVICE; + + + p_ble_hrs_c->evt_handler = p_ble_hrs_c_init->evt_handler; + p_ble_hrs_c->conn_handle = BLE_CONN_HANDLE_INVALID; + p_ble_hrs_c->peer_hrs_db.hrm_cccd_handle = BLE_GATT_HANDLE_INVALID; + p_ble_hrs_c->peer_hrs_db.hrm_handle = BLE_GATT_HANDLE_INVALID; + + return ble_db_discovery_evt_register(&hrs_uuid); +} + + +void ble_hrs_c_on_ble_evt(ble_hrs_c_t * p_ble_hrs_c, const ble_evt_t * p_ble_evt) +{ + if ((p_ble_hrs_c == NULL) || (p_ble_evt == NULL)) + { + return; + } + + switch (p_ble_evt->header.evt_id) + { + case BLE_GATTC_EVT_HVX: + on_hvx(p_ble_hrs_c, p_ble_evt); + break; + + case BLE_GATTC_EVT_WRITE_RSP: + on_write_rsp(p_ble_hrs_c, p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + on_disconnected(p_ble_hrs_c, p_ble_evt); + break; + + default: + break; + } +} + + +/**@brief Function for creating a message for writing to the CCCD. + */ +static uint32_t cccd_configure(uint16_t conn_handle, uint16_t handle_cccd, bool enable) +{ + LOG("[HRS_C]: Configuring CCCD. CCCD Handle = %d, Connection Handle = %d\r\n", + handle_cccd,conn_handle); + + tx_message_t * p_msg; + uint16_t cccd_val = enable ? BLE_GATT_HVX_NOTIFICATION : 0; + + p_msg = &m_tx_buffer[m_tx_insert_index++]; + m_tx_insert_index &= TX_BUFFER_MASK; + + p_msg->req.write_req.gattc_params.handle = handle_cccd; + p_msg->req.write_req.gattc_params.len = WRITE_MESSAGE_LENGTH; + p_msg->req.write_req.gattc_params.p_value = p_msg->req.write_req.gattc_value; + p_msg->req.write_req.gattc_params.offset = 0; + p_msg->req.write_req.gattc_params.write_op = BLE_GATT_OP_WRITE_REQ; + p_msg->req.write_req.gattc_value[0] = LSB_16(cccd_val); + p_msg->req.write_req.gattc_value[1] = MSB_16(cccd_val); + p_msg->conn_handle = conn_handle; + p_msg->type = WRITE_REQ; + + tx_buffer_process(); + return NRF_SUCCESS; +} + + +uint32_t ble_hrs_c_hrm_notif_enable(ble_hrs_c_t * p_ble_hrs_c) +{ + VERIFY_PARAM_NOT_NULL(p_ble_hrs_c); + + return cccd_configure(p_ble_hrs_c->conn_handle, + p_ble_hrs_c->peer_hrs_db.hrm_cccd_handle, + true); +} + + +uint32_t ble_hrs_c_handles_assign(ble_hrs_c_t * p_ble_hrs_c, + uint16_t conn_handle, + const hrs_db_t * p_peer_hrs_handles) +{ + VERIFY_PARAM_NOT_NULL(p_ble_hrs_c); + + p_ble_hrs_c->conn_handle = conn_handle; + if (p_peer_hrs_handles != NULL) + { + p_ble_hrs_c->peer_hrs_db = *p_peer_hrs_handles; + } + return NRF_SUCCESS; +} +/** @} + * @endcond + */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs_c/ble_hrs_c.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs_c/ble_hrs_c.h new file mode 100644 index 0000000000..4eadda27db --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs_c/ble_hrs_c.h @@ -0,0 +1,215 @@ +/* + * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is confidential property of Nordic Semiconductor. The use, + * copying, transfer or disclosure of such information is prohibited except by express written + * agreement with Nordic Semiconductor. + * + */ + +/**@file + * + * @defgroup ble_sdk_srv_hrs_c Heart Rate Service Client + * @{ + * @ingroup ble_sdk_srv + * @brief Heart Rate Service Client module. + * + * @details This module contains the APIs and types exposed by the Heart Rate Service Client + * module. These APIs and types can be used by the application to perform discovery of + * Heart Rate Service at the peer and interact with it. + * + * @warning Currently this module only has support for Heart Rate Measurement characteristic. This + * means that it will be able to enable notification of the characteristic at the peer and + * be able to receive Heart Rate Measurement notifications from the peer. It does not + * support the Body Sensor Location and the Heart Rate Control Point characteristics. + * When a Heart Rate Measurement is received, this module will decode only the + * Heart Rate Measurement Value (both 8 bit and 16 bit) field from it and provide it to + * the application. + * + * @note The application must propagate BLE stack events to this module by calling + * ble_hrs_c_on_ble_evt(). + * + */ + +#ifndef BLE_HRS_C_H__ +#define BLE_HRS_C_H__ + +#include +#include "ble.h" +#include "ble_db_discovery.h" + +/** + * @defgroup hrs_c_enums Enumerations + * @{ + */ + +/**@brief HRS Client event type. */ +typedef enum +{ + BLE_HRS_C_EVT_DISCOVERY_COMPLETE = 1, /**< Event indicating that the Heart Rate Service has been discovered at the peer. */ + BLE_HRS_C_EVT_HRM_NOTIFICATION /**< Event indicating that a notification of the Heart Rate Measurement characteristic has been received from the peer. */ +} ble_hrs_c_evt_type_t; + +/** @} */ + +/** + * @defgroup hrs_c_structs Structures + * @{ + */ + +/**@brief Structure containing the heart rate measurement received from the peer. */ +typedef struct +{ + uint16_t hr_value; /**< Heart Rate Value. */ +} ble_hrm_t; + + +/**@brief Structure containing the handles related to the Heart Rate Service found on the peer. */ +typedef struct +{ + uint16_t hrm_cccd_handle; /**< Handle of the CCCD of the Heart Rate Measurement characteristic. */ + uint16_t hrm_handle; /**< Handle of the Heart Rate Measurement characteristic as provided by the SoftDevice. */ +} hrs_db_t; + + +/**@brief Heart Rate Event structure. */ +typedef struct +{ + ble_hrs_c_evt_type_t evt_type; /**< Type of the event. */ + uint16_t conn_handle; /**< Connection handle on which the Heart Rate service was discovered on the peer device..*/ + union + { + hrs_db_t peer_db; /**< Heart Rate related handles found on the peer device.. This will be filled if the evt_type is @ref BLE_HRS_C_EVT_DISCOVERY_COMPLETE.*/ + ble_hrm_t hrm; /**< Heart rate measurement received. This will be filled if the evt_type is @ref BLE_HRS_C_EVT_HRM_NOTIFICATION. */ + } params; +} ble_hrs_c_evt_t; + +/** @} */ + +/** + * @defgroup hrs_c_types Types + * @{ + */ + +// Forward declaration of the ble_bas_t type. +typedef struct ble_hrs_c_s ble_hrs_c_t; + +/**@brief Event handler type. + * + * @details This is the type of the event handler that should be provided by the application + * of this module in order to receive events. + */ +typedef void (* ble_hrs_c_evt_handler_t) (ble_hrs_c_t * p_ble_hrs_c, ble_hrs_c_evt_t * p_evt); + +/** @} */ + +/** + * @addtogroup hrs_c_structs + * @{ + */ + +/**@brief Heart Rate Client structure. + */ +struct ble_hrs_c_s +{ + uint16_t conn_handle; /**< Connection handle as provided by the SoftDevice. */ + hrs_db_t peer_hrs_db; /**< Handles related to HRS on the peer*/ + ble_hrs_c_evt_handler_t evt_handler; /**< Application event handler to be called when there is an event related to the heart rate service. */ +}; + +/**@brief Heart Rate Client initialization structure. + */ +typedef struct +{ + ble_hrs_c_evt_handler_t evt_handler; /**< Event handler to be called by the Heart Rate Client module whenever there is an event related to the Heart Rate Service. */ +} ble_hrs_c_init_t; + +/** @} */ + +/** + * @defgroup hrs_c_functions Functions + * @{ + */ + +/**@brief Function for initializing the heart rate client module. + * + * @details This function will register with the DB Discovery module. There it + * registers for the Heart Rate Service. Doing so will make the DB Discovery + * module look for the presence of a Heart Rate Service instance at the peer when a + * discovery is started. + * + * @param[in] p_ble_hrs_c Pointer to the heart rate client structure. + * @param[in] p_ble_hrs_c_init Pointer to the heart rate initialization structure containing the + * initialization information. + * + * @retval NRF_SUCCESS On successful initialization. Otherwise an error code. This function + * propagates the error code returned by the Database Discovery module API + * @ref ble_db_discovery_evt_register. + */ +uint32_t ble_hrs_c_init(ble_hrs_c_t * p_ble_hrs_c, ble_hrs_c_init_t * p_ble_hrs_c_init); + +/**@brief Function for handling BLE events from the SoftDevice. + * + * @details This function will handle the BLE events received from the SoftDevice. If a BLE + * event is relevant to the Heart Rate Client module, then it uses it to update + * interval variables and, if necessary, send events to the application. + * + * @param[in] p_ble_hrs_c Pointer to the heart rate client structure. + * @param[in] p_ble_evt Pointer to the BLE event. + */ +void ble_hrs_c_on_ble_evt(ble_hrs_c_t * p_ble_hrs_c, const ble_evt_t * p_ble_evt); + + +/**@brief Function for requesting the peer to start sending notification of Heart Rate + * Measurement. + * + * @details This function will enable to notification of the Heart Rate Measurement at the peer + * by writing to the CCCD of the Heart Rate Measurement Characteristic. + * + * @param p_ble_hrs_c Pointer to the heart rate client structure. + * + * @retval NRF_SUCCESS If the SoftDevice has been requested to write to the CCCD of the peer. + * Otherwise, an error code. This function propagates the error code returned + * by the SoftDevice API @ref sd_ble_gattc_write. + */ +uint32_t ble_hrs_c_hrm_notif_enable(ble_hrs_c_t * p_ble_hrs_c); + + +/**@brief Function for handling events from the database discovery module. + * + * @details Call this function when getting a callback event from the DB discovery modue. + * This function will handle an event from the database discovery module, and determine + * if it relates to the discovery of heart rate service at the peer. If so, it will + * call the application's event handler indicating that the heart rate service has been + * discovered at the peer. It also populates the event with the service related + * information before providing it to the application. + * + * @param[in] p_ble_hrs_c Pointer to the heart rate client structure instance to associate. + * @param[in] p_evt Pointer to the event received from the database discovery module. + * + */ +void ble_hrs_on_db_disc_evt(ble_hrs_c_t * p_ble_hrs_c, const ble_db_discovery_evt_t * p_evt); + + +/**@brief Function for assigning a handles to a this instance of hrs_c. + * + * @details Call this function when a link has been established with a peer to + * associate this link to this instance of the module. This makes it + * possible to handle several link and associate each link to a particular + * instance of this module.The connection handle and attribute handles will be + * provided from the discovery event @ref BLE_HRS_C_EVT_DISCOVERY_COMPLETE. + * + * @param[in] p_ble_hrs_c Pointer to the heart rate client structure instance to associate. + * @param[in] conn_handle Connection handle to associated with the given Heart Rate Client Instance. + * @param[in] p_peer_hrs_handles Attribute handles for the HRS server you want this HRS_C client to + * interact with. + */ +uint32_t ble_hrs_c_handles_assign(ble_hrs_c_t * p_ble_hrs_c, + uint16_t conn_handle, + const hrs_db_t * p_peer_hrs_handles); + +/** @} */ // End tag for Function group. + +#endif // BLE_HRS_C_H__ + +/** @} */ // End tag for the file. diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hts/ble_hts.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hts/ble_hts.c new file mode 100644 index 0000000000..1ac6bedb97 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hts/ble_hts.c @@ -0,0 +1,428 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/* Attention! +* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile +* qualification listings, this section of source code must not be modified. +*/ + +#include "ble_hts.h" +#include +#include "nordic_common.h" +#include "ble_l2cap.h" +#include "ble_srv_common.h" +#include "app_util.h" + + +#define OPCODE_LENGTH 1 /**< Length of opcode inside Health Thermometer Measurement packet. */ +#define HANDLE_LENGTH 2 /**< Length of handle inside Health Thermometer Measurement packet. */ +#define MAX_HTM_LEN (BLE_L2CAP_MTU_DEF - OPCODE_LENGTH - HANDLE_LENGTH) /**< Maximum size of a transmitted Health Thermometer Measurement. */ + +// Health Thermometer Measurement flag bits +#define HTS_MEAS_FLAG_TEMP_UNITS_BIT (0x01 << 0) /**< Temperature Units flag. */ +#define HTS_MEAS_FLAG_TIME_STAMP_BIT (0x01 << 1) /**< Time Stamp flag. */ +#define HTS_MEAS_FLAG_TEMP_TYPE_BIT (0x01 << 2) /**< Temperature Type flag. */ + + +/**@brief Function for handling the Connect event. + * + * @param[in] p_hts Health Thermometer Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_connect(ble_hts_t * p_hts, ble_evt_t * p_ble_evt) +{ + p_hts->conn_handle = p_ble_evt->evt.gatts_evt.conn_handle; +} + + +/**@brief Function for handling the Disconnect event. + * + * @param[in] p_hts Health Thermometer Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_disconnect(ble_hts_t * p_hts, ble_evt_t * p_ble_evt) +{ + UNUSED_PARAMETER(p_ble_evt); + p_hts->conn_handle = BLE_CONN_HANDLE_INVALID; +} + + +/**@brief Function for handling write events to the Blood Pressure Measurement characteristic. + * + * @param[in] p_hts Health Thermometer Service structure. + * @param[in] p_evt_write Write event received from the BLE stack. + */ +static void on_cccd_write(ble_hts_t * p_hts, ble_gatts_evt_write_t * p_evt_write) +{ + if (p_evt_write->len == 2) + { + // CCCD written, update indication state + if (p_hts->evt_handler != NULL) + { + ble_hts_evt_t evt; + + if (ble_srv_is_indication_enabled(p_evt_write->data)) + { + evt.evt_type = BLE_HTS_EVT_INDICATION_ENABLED; + } + else + { + evt.evt_type = BLE_HTS_EVT_INDICATION_DISABLED; + } + + p_hts->evt_handler(p_hts, &evt); + } + } +} + + +/**@brief Function for handling the Write event. + * + * @param[in] p_hts Health Thermometer Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_write(ble_hts_t * p_hts, ble_evt_t * p_ble_evt) +{ + ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; + + if (p_evt_write->handle == p_hts->meas_handles.cccd_handle) + { + on_cccd_write(p_hts, p_evt_write); + } +} + + +/**@brief Function for handling the HVC event. + * + * @details Handles HVC events from the BLE stack. + * + * @param[in] p_hts Health Thermometer Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_hvc(ble_hts_t * p_hts, ble_evt_t * p_ble_evt) +{ + ble_gatts_evt_hvc_t * p_hvc = &p_ble_evt->evt.gatts_evt.params.hvc; + + if (p_hvc->handle == p_hts->meas_handles.value_handle) + { + ble_hts_evt_t evt; + + evt.evt_type = BLE_HTS_EVT_INDICATION_CONFIRMED; + p_hts->evt_handler(p_hts, &evt); + } +} + + +void ble_hts_on_ble_evt(ble_hts_t * p_hts, ble_evt_t * p_ble_evt) +{ + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + on_connect(p_hts, p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + on_disconnect(p_hts, p_ble_evt); + break; + + case BLE_GATTS_EVT_WRITE: + on_write(p_hts, p_ble_evt); + break; + + case BLE_GATTS_EVT_HVC: + on_hvc(p_hts, p_ble_evt); + break; + + default: + // No implementation needed. + break; + } +} + + +/**@brief Function for encoding a Health Thermometer Measurement. + * + * @param[in] p_hts Health Thermometer Service structure. + * @param[in] p_hts_meas Measurement to be encoded. + * @param[out] p_encoded_buffer Buffer where the encoded data will be written. + * + * @return Size of encoded data. + */ +static uint8_t hts_measurement_encode(ble_hts_t * p_hts, + ble_hts_meas_t * p_hts_meas, + uint8_t * p_encoded_buffer) +{ + uint8_t flags = 0; + uint8_t len = 1; + uint32_t encoded_temp; + + // Flags field + if (p_hts_meas->temp_in_fahr_units) + { + flags |= HTS_MEAS_FLAG_TEMP_UNITS_BIT; + } + if (p_hts_meas->time_stamp_present) + { + flags |= HTS_MEAS_FLAG_TIME_STAMP_BIT; + } + + // Temperature Measurement Value field + if (p_hts_meas->temp_in_fahr_units) + { + flags |= HTS_MEAS_FLAG_TEMP_UNITS_BIT; + + encoded_temp = ((p_hts_meas->temp_in_fahr.exponent << 24) & 0xFF000000) | + ((p_hts_meas->temp_in_fahr.mantissa << 0) & 0x00FFFFFF); + } + else + { + encoded_temp = ((p_hts_meas->temp_in_celcius.exponent << 24) & 0xFF000000) | + ((p_hts_meas->temp_in_celcius.mantissa << 0) & 0x00FFFFFF); + } + len += uint32_encode(encoded_temp, &p_encoded_buffer[len]); + + // Time Stamp field + if (p_hts_meas->time_stamp_present) + { + flags |= HTS_MEAS_FLAG_TIME_STAMP_BIT; + len += ble_date_time_encode(&p_hts_meas->time_stamp, &p_encoded_buffer[len]); + } + + // Temperature Type field + if (p_hts_meas->temp_type_present) + { + flags |= HTS_MEAS_FLAG_TEMP_TYPE_BIT; + p_encoded_buffer[len++] = p_hts_meas->temp_type; + } + + // Flags field + p_encoded_buffer[0] = flags; + + return len; +} + + +/**@brief Function for adding Health Thermometer Measurement characteristics. + * + * @param[in] p_hts Health Thermometer Service structure. + * @param[in] p_hts_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t hts_measurement_char_add(ble_hts_t * p_hts, const ble_hts_init_t * p_hts_init) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_md_t cccd_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + ble_hts_meas_t initial_htm; + uint8_t encoded_htm[MAX_HTM_LEN]; + + memset(&cccd_md, 0, sizeof(cccd_md)); + + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); + cccd_md.vloc = BLE_GATTS_VLOC_STACK; + cccd_md.write_perm = p_hts_init->hts_meas_attr_md.cccd_write_perm; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.indicate = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = &cccd_md; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_TEMPERATURE_MEASUREMENT_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.read_perm = p_hts_init->hts_meas_attr_md.read_perm; + attr_md.write_perm = p_hts_init->hts_meas_attr_md.write_perm; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 1; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + memset(&initial_htm, 0, sizeof(initial_htm)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = hts_measurement_encode(p_hts, &initial_htm, encoded_htm); + attr_char_value.init_offs = 0; + attr_char_value.max_len = MAX_HTM_LEN; + attr_char_value.p_value = encoded_htm; + + return sd_ble_gatts_characteristic_add(p_hts->service_handle, + &char_md, + &attr_char_value, + &p_hts->meas_handles); +} + + +/**@brief Function for adding Temperature Type characteristics. + * + * @param[in] p_hts Health Thermometer Service structure. + * @param[in] p_hts_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t hts_temp_type_char_add(ble_hts_t * p_hts, const ble_hts_init_t * p_hts_init) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + uint8_t init_value_temp_type; + uint8_t init_value_encoded[1]; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.read = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = NULL; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_TEMPERATURE_TYPE_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.read_perm = p_hts_init->hts_temp_type_attr_md.read_perm; + attr_md.write_perm = p_hts_init->hts_temp_type_attr_md.write_perm; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + init_value_temp_type = p_hts_init->temp_type; + init_value_encoded[0] = init_value_temp_type; + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = sizeof (uint8_t); + attr_char_value.init_offs = 0; + attr_char_value.max_len = sizeof (uint8_t); + attr_char_value.p_value = init_value_encoded; + + return sd_ble_gatts_characteristic_add(p_hts->service_handle, + &char_md, + &attr_char_value, + &p_hts->temp_type_handles); +} + + +uint32_t ble_hts_init(ble_hts_t * p_hts, const ble_hts_init_t * p_hts_init) +{ + uint32_t err_code; + ble_uuid_t ble_uuid; + + // Initialize service structure + p_hts->evt_handler = p_hts_init->evt_handler; + p_hts->conn_handle = BLE_CONN_HANDLE_INVALID; + p_hts->temp_type = p_hts_init->temp_type; + + // Add service + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_HEALTH_THERMOMETER_SERVICE); + + err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &ble_uuid, &p_hts->service_handle); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add measurement characteristic + err_code = hts_measurement_char_add(p_hts, p_hts_init); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add temperature type characteristic + if (p_hts_init->temp_type_as_characteristic) + { + err_code = hts_temp_type_char_add(p_hts, p_hts_init); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + + return NRF_SUCCESS; +} + + +uint32_t ble_hts_measurement_send(ble_hts_t * p_hts, ble_hts_meas_t * p_hts_meas) +{ + uint32_t err_code; + + // Send value if connected + if (p_hts->conn_handle != BLE_CONN_HANDLE_INVALID) + { + uint8_t encoded_hts_meas[MAX_HTM_LEN]; + uint16_t len; + uint16_t hvx_len; + ble_gatts_hvx_params_t hvx_params; + + len = hts_measurement_encode(p_hts, p_hts_meas, encoded_hts_meas); + hvx_len = len; + + memset(&hvx_params, 0, sizeof(hvx_params)); + + hvx_params.handle = p_hts->meas_handles.value_handle; + hvx_params.type = BLE_GATT_HVX_INDICATION; + hvx_params.offset = 0; + hvx_params.p_len = &hvx_len; + hvx_params.p_data = encoded_hts_meas; + + err_code = sd_ble_gatts_hvx(p_hts->conn_handle, &hvx_params); + if ((err_code == NRF_SUCCESS) && (hvx_len != len)) + { + err_code = NRF_ERROR_DATA_SIZE; + } + } + else + { + err_code = NRF_ERROR_INVALID_STATE; + } + + return err_code; +} + + +uint32_t ble_hts_is_indication_enabled(ble_hts_t * p_hts, bool * p_indication_enabled) +{ + uint32_t err_code; + uint8_t cccd_value_buf[BLE_CCCD_VALUE_LEN]; + ble_gatts_value_t gatts_value; + + // Initialize value struct. + memset(&gatts_value, 0, sizeof(gatts_value)); + + gatts_value.len = BLE_CCCD_VALUE_LEN; + gatts_value.offset = 0; + gatts_value.p_value = cccd_value_buf; + + err_code = sd_ble_gatts_value_get(p_hts->conn_handle, + p_hts->meas_handles.cccd_handle, + &gatts_value); + if (err_code == NRF_SUCCESS) + { + *p_indication_enabled = ble_srv_is_indication_enabled(cccd_value_buf); + } + return err_code; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hts/ble_hts.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hts/ble_hts.h new file mode 100644 index 0000000000..f6d5723e25 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hts/ble_hts.h @@ -0,0 +1,160 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + */ + +/** @file + * + * @defgroup ble_sdk_srv_hts Health Thermometer Service + * @{ + * @ingroup ble_sdk_srv + * @brief Health Thermometer Service module. + * + * @details This module implements the Health Thermometer Service. + * + * If an event handler is supplied by the application, the Health Thermometer + * Service will generate Health Thermometer Service events to the application. + * + * @note The application must propagate BLE stack events to the Health Thermometer Service + * module by calling ble_hts_on_ble_evt() from the @ref softdevice_handler function. + * + * @note Attention! + * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile + * qualification listings, this section of source code must not be modified. + */ + +#ifndef BLE_HTS_H__ +#define BLE_HTS_H__ + +#include +#include +#include "ble.h" +#include "ble_srv_common.h" +#include "ble_date_time.h" + +// Temperature Type measurement locations +#define BLE_HTS_TEMP_TYPE_ARMPIT 1 +#define BLE_HTS_TEMP_TYPE_BODY 2 +#define BLE_HTS_TEMP_TYPE_EAR 3 +#define BLE_HTS_TEMP_TYPE_FINGER 4 +#define BLE_HTS_TEMP_TYPE_GI_TRACT 5 +#define BLE_HTS_TEMP_TYPE_MOUTH 6 +#define BLE_HTS_TEMP_TYPE_RECTUM 7 +#define BLE_HTS_TEMP_TYPE_TOE 8 +#define BLE_HTS_TEMP_TYPE_EAR_DRUM 9 + +/**@brief Health Thermometer Service event type. */ +typedef enum +{ + BLE_HTS_EVT_INDICATION_ENABLED, /**< Health Thermometer value indication enabled event. */ + BLE_HTS_EVT_INDICATION_DISABLED, /**< Health Thermometer value indication disabled event. */ + BLE_HTS_EVT_INDICATION_CONFIRMED /**< Confirmation of a temperature measurement indication has been received. */ +} ble_hts_evt_type_t; + +/**@brief Health Thermometer Service event. */ +typedef struct +{ + ble_hts_evt_type_t evt_type; /**< Type of event. */ +} ble_hts_evt_t; + +// Forward declaration of the ble_hts_t type. +typedef struct ble_hts_s ble_hts_t; + +/**@brief Health Thermometer Service event handler type. */ +typedef void (*ble_hts_evt_handler_t) (ble_hts_t * p_hts, ble_hts_evt_t * p_evt); + +/**@brief FLOAT format (IEEE-11073 32-bit FLOAT, defined as a 32-bit value with a 24-bit mantissa + * and an 8-bit exponent. */ +typedef struct +{ + int8_t exponent; /**< Base 10 exponent */ + int32_t mantissa; /**< Mantissa, should be using only 24 bits */ +} ieee_float32_t; + +/**@brief Health Thermometer Service init structure. This contains all options and data + * needed for initialization of the service. */ +typedef struct +{ + ble_hts_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Health Thermometer Service. */ + ble_srv_cccd_security_mode_t hts_meas_attr_md; /**< Initial security level for health thermometer measurement attribute */ + ble_srv_security_mode_t hts_temp_type_attr_md; /**< Initial security level for health thermometer tempearture type attribute */ + uint8_t temp_type_as_characteristic; /**< Set non-zero if temp type given as characteristic */ + uint8_t temp_type; /**< Temperature type if temperature characteristic is used */ +} ble_hts_init_t; + +/**@brief Health Thermometer Service structure. This contains various status information for + * the service. */ +struct ble_hts_s +{ + ble_hts_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Health Thermometer Service. */ + uint16_t service_handle; /**< Handle of Health Thermometer Service (as provided by the BLE stack). */ + ble_gatts_char_handles_t meas_handles; /**< Handles related to the Health Thermometer Measurement characteristic. */ + ble_gatts_char_handles_t temp_type_handles; /**< Handles related to the Health Thermometer Temperature Type characteristic. */ + uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ + uint8_t temp_type; /**< Temperature type indicates where the measurement was taken. */ +}; + +/**@brief Health Thermometer Service measurement structure. This contains a Health Thermometer + * measurement. */ +typedef struct ble_hts_meas_s +{ + bool temp_in_fahr_units; /**< True if Temperature is in Fahrenheit units, Celcius otherwise. */ + bool time_stamp_present; /**< True if Time Stamp is present. */ + bool temp_type_present; /**< True if Temperature Type is present. */ + ieee_float32_t temp_in_celcius; /**< Temperature Measurement Value (Celcius). */ + ieee_float32_t temp_in_fahr; /**< Temperature Measurement Value (Fahrenheit). */ + ble_date_time_t time_stamp; /**< Time Stamp. */ + uint8_t temp_type; /**< Temperature Type. */ +} ble_hts_meas_t; + +/**@brief Function for initializing the Health Thermometer Service. + * + * @param[out] p_hts Health Thermometer Service structure. This structure will have to + * be supplied by the application. It will be initialized by this function, + * and will later be used to identify this particular service instance. + * @param[in] p_hts_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. + */ +uint32_t ble_hts_init(ble_hts_t * p_hts, const ble_hts_init_t * p_hts_init); + +/**@brief Function for handling the Application's BLE Stack events. + * + * @details Handles all events from the BLE stack of interest to the Health Thermometer Service. + * + * @param[in] p_hts Health Thermometer Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +void ble_hts_on_ble_evt(ble_hts_t * p_hts, ble_evt_t * p_ble_evt); + +/**@brief Function for sending health thermometer measurement if indication has been enabled. + * + * @details The application calls this function after having performed a Health Thermometer + * measurement. If indication has been enabled, the measurement data is encoded and + * sent to the client. + * + * @param[in] p_hts Health Thermometer Service structure. + * @param[in] p_hts_meas Pointer to new health thermometer measurement. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +uint32_t ble_hts_measurement_send(ble_hts_t * p_hts, ble_hts_meas_t * p_hts_meas); + +/**@brief Function for checking if indication of Temperature Measurement is currently enabled. + * + * @param[in] p_hts Health Thermometer Service structure. + * @param[out] p_indication_enabled TRUE if indication is enabled, FALSE otherwise. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +uint32_t ble_hts_is_indication_enabled(ble_hts_t * p_hts, bool * p_indication_enabled); + +#endif // BLE_HTS_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias/ble_ias.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias/ble_ias.c new file mode 100644 index 0000000000..da33c5235c --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias/ble_ias.c @@ -0,0 +1,173 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/* Attention! +* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile +* qualification listings, this section of source code must not be modified. +*/ + +#include "ble_ias.h" +#include +#include "ble_srv_common.h" + + +#define INITIAL_ALERT_LEVEL BLE_CHAR_ALERT_LEVEL_NO_ALERT + + +/**@brief Function for handling the Connect event. + * + * @param[in] p_ias Immediate Alert Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_connect(ble_ias_t * p_ias, ble_evt_t * p_ble_evt) +{ + p_ias->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; +} + +/**@brief Function for handling the Write event. + * + * @param[in] p_ias Immediate Alert Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_write(ble_ias_t * p_ias, ble_evt_t * p_ble_evt) +{ + ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; + + if ((p_evt_write->handle == p_ias->alert_level_handles.value_handle) && (p_evt_write->len == 1)) + { + // Alert level written, call application event handler + ble_ias_evt_t evt; + + evt.evt_type = BLE_IAS_EVT_ALERT_LEVEL_UPDATED; + evt.params.alert_level = p_evt_write->data[0]; + + p_ias->evt_handler(p_ias, &evt); + } +} + + +void ble_ias_on_ble_evt(ble_ias_t * p_ias, ble_evt_t * p_ble_evt) +{ + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + on_connect(p_ias, p_ble_evt); + break; + + case BLE_GATTS_EVT_WRITE: + on_write(p_ias, p_ble_evt); + break; + + default: + // No implementation needed. + break; + } +} + + +/**@brief Function for adding Alert Level characteristics. + * + * @param[in] p_ias Immediate Alert Service structure. + * @param[in] p_ias_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t alert_level_char_add(ble_ias_t * p_ias) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + uint8_t initial_alert_level; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.write_wo_resp = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = NULL; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_ALERT_LEVEL_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.read_perm); + BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&attr_md.write_perm); + + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + initial_alert_level = INITIAL_ALERT_LEVEL; + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = sizeof (uint8_t); + attr_char_value.init_offs = 0; + attr_char_value.max_len = sizeof (uint8_t); + attr_char_value.p_value = &initial_alert_level; + + return sd_ble_gatts_characteristic_add(p_ias->service_handle, + &char_md, + &attr_char_value, + &p_ias->alert_level_handles); +} + + +uint32_t ble_ias_init(ble_ias_t * p_ias, const ble_ias_init_t * p_ias_init) +{ + uint32_t err_code; + ble_uuid_t ble_uuid; + + // Initialize service structure + if (p_ias_init->evt_handler == NULL) + { + return NRF_ERROR_INVALID_PARAM; + } + p_ias->evt_handler = p_ias_init->evt_handler; + + // Add service + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_IMMEDIATE_ALERT_SERVICE); + + err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, + &ble_uuid, + &p_ias->service_handle); + + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add alert level characteristic + return alert_level_char_add(p_ias); +} + + +uint32_t ble_ias_alert_level_get(ble_ias_t * p_ias, uint8_t * p_alert_level) +{ + ble_gatts_value_t gatts_value; + + // Initialize value struct. + memset(&gatts_value, 0, sizeof(gatts_value)); + + gatts_value.len = sizeof(uint8_t); + gatts_value.offset = 0; + gatts_value.p_value = p_alert_level; + + return sd_ble_gatts_value_get(p_ias->conn_handle, + p_ias->alert_level_handles.value_handle, + &gatts_value); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias/ble_ias.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias/ble_ias.h new file mode 100644 index 0000000000..6089f596c7 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias/ble_ias.h @@ -0,0 +1,113 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_sdk_srv_ias Immediate Alert Service + * @{ + * @ingroup ble_sdk_srv + * @brief Immediate Alert Service module. + * + * @details This module implements the Immediate Alert Service with the Alert Level characteristic. + * During initialization it adds the Immediate Alert Service and Alert Level characteristic + * to the BLE stack database. + * + * The application must supply an event handler for receiving Immediate Alert Service + * events. Using this handler, the service will notify the application when the + * Alert Level characteristic value changes. + * + * The service also provides a function for letting the application poll the current + * value of the Alert Level characteristic. + * + * @note The application must propagate BLE stack events to the Immediate Alert Service + * module by calling ble_ias_on_ble_evt() from the @ref softdevice_handler callback. + * + * @note Attention! + * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile + * qualification listings, this section of source code must not be modified. +*/ + +#ifndef BLE_IAS_H__ +#define BLE_IAS_H__ + +#include +#include "ble.h" + +/**@brief Immediate Alert Service event type. */ +typedef enum +{ + BLE_IAS_EVT_ALERT_LEVEL_UPDATED /**< Alert Level Updated event. */ +} ble_ias_evt_type_t; + +/**@brief Immediate Alert Service event. */ +typedef struct +{ + ble_ias_evt_type_t evt_type; /**< Type of event. */ + union + { + uint8_t alert_level; /**< New Alert Level value. */ + } params; +} ble_ias_evt_t; + +// Forward declaration of the ble_ias_t type. +typedef struct ble_ias_s ble_ias_t; + +/**@brief Immediate Alert Service event handler type. */ +typedef void (*ble_ias_evt_handler_t) (ble_ias_t * p_ias, ble_ias_evt_t * p_evt); + +/**@brief Immediate Alert Service init structure. This contains all options and data needed for + * initialization of the service. */ +typedef struct +{ + ble_ias_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Immediate Alert Service. */ +} ble_ias_init_t; + +/**@brief Immediate Alert Service structure. This contains various status information for the + * service. */ +struct ble_ias_s +{ + ble_ias_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Immediate Alert Service. */ + uint16_t service_handle; /**< Handle of Immediate Alert Service (as provided by the BLE stack). */ + ble_gatts_char_handles_t alert_level_handles; /**< Handles related to the Alert Level characteristic. */ + uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ +}; + +/**@brief Function for initializing the Immediate Alert Service. + * + * @param[out] p_ias Immediate Alert Service structure. This structure will have to be + * supplied by the application. It will be initialized by this function, + * and will later be used to identify this particular service instance. + * @param[in] p_ias_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. + */ +uint32_t ble_ias_init(ble_ias_t * p_ias, const ble_ias_init_t * p_ias_init); + +/**@brief Function for handling the Application's BLE Stack events. + * + * @details Handles all events from the BLE stack of interest to the Immediate Alert Service. + * + * @param[in] p_ias Immediate Alert Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +void ble_ias_on_ble_evt(ble_ias_t * p_ias, ble_evt_t * p_ble_evt); + +/**@brief Function for getting current value of the Alert Level characteristic. + * + * @param[in] p_ias Immediate Alert Service structure. + * @param[out] p_alert_level Current Alert Level value. + */ +uint32_t ble_ias_alert_level_get(ble_ias_t * p_ias, uint8_t * p_alert_level); + +#endif // BLE_IAS_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias_c/ble_ias_c.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias_c/ble_ias_c.c new file mode 100644 index 0000000000..749dbb6f80 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias_c/ble_ias_c.c @@ -0,0 +1,189 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "ble_ias_c.h" + +#include +#include "sdk_common.h" +#include "ble.h" +#include "ble_srv_common.h" +#include "ble_gattc.h" +#include "ble_db_discovery.h" + + +void ble_ias_c_on_db_disc_evt(ble_ias_c_t * p_ias_c, const ble_db_discovery_evt_t * p_evt) +{ + ble_ias_c_evt_t evt; + + memset(&evt, 0, sizeof(ble_ias_c_evt_t)); + evt.evt_type = BLE_IAS_C_EVT_DISCOVERY_FAILED; + evt.conn_handle = p_evt->conn_handle; + + const ble_gatt_db_char_t * p_chars = p_evt->params.discovered_db.charateristics; + + // Check if the Immediate Alert Service was discovered. + if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE + && + p_evt->params.discovered_db.srv_uuid.uuid == BLE_UUID_IMMEDIATE_ALERT_SERVICE + && + p_evt->params.discovered_db.srv_uuid.type == BLE_UUID_TYPE_BLE) + { + + uint32_t i; + + for (i = 0; i < p_evt->params.discovered_db.char_count; i++) + { + // The Alert Level characteristic in the Immediate Alert Service instance is found + // on peer. Check if it has the correct property 'Write without response'. + switch(p_chars[i].characteristic.uuid.uuid) + { + case BLE_UUID_ALERT_LEVEL_CHAR: + if(p_chars[i].characteristic.char_props.write_wo_resp) + { + // Found Alert Level characteristic inside the Immediate Alert Service. + memcpy(&evt.alert_level, + &p_chars[i].characteristic, + sizeof(ble_gattc_char_t)); + } + break; + + default: + break; + } + } + } + if (evt.alert_level.handle_value != BLE_GATT_HANDLE_INVALID) + { + evt.evt_type = BLE_IAS_C_EVT_DISCOVERY_COMPLETE; + } + + p_ias_c->evt_handler(p_ias_c, &evt); +} + + +uint32_t ble_ias_c_init(ble_ias_c_t * p_ias_c, ble_ias_c_init_t const * p_ias_c_init) +{ + VERIFY_PARAM_NOT_NULL(p_ias_c); + VERIFY_PARAM_NOT_NULL(p_ias_c_init->evt_handler); + VERIFY_PARAM_NOT_NULL(p_ias_c_init); + + p_ias_c->evt_handler = p_ias_c_init->evt_handler; + p_ias_c->error_handler = p_ias_c_init->error_handler; + p_ias_c->conn_handle = BLE_CONN_HANDLE_INVALID; + p_ias_c->alert_level_char.handle_value = BLE_GATT_HANDLE_INVALID; + + BLE_UUID_BLE_ASSIGN(p_ias_c->alert_level_char.uuid, BLE_UUID_ALERT_LEVEL_CHAR); + BLE_UUID_BLE_ASSIGN(p_ias_c->service_uuid, BLE_UUID_IMMEDIATE_ALERT_SERVICE); + + return ble_db_discovery_evt_register(&p_ias_c->service_uuid); +} + + + +/**@brief Function for handling the Disconnect event. + * + * @param[in] p_ias_c Immediate Alert Service client structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_disconnect(ble_ias_c_t * p_ias_c, ble_evt_t const * p_ble_evt) +{ + // The following values will be re-initialized when a new connection is made. + p_ias_c->conn_handle = BLE_CONN_HANDLE_INVALID; + + if (ble_ias_c_is_discovered(p_ias_c)) + { + // There was a valid instance of IAS on the peer. Send an event to the + // application, so that it can do any clean up related to this module. + ble_ias_c_evt_t evt; + + evt.evt_type = BLE_IAS_C_EVT_DISCONN_COMPLETE; + + p_ias_c->evt_handler(p_ias_c, &evt); + p_ias_c->alert_level_char.handle_value = BLE_GATT_HANDLE_INVALID; + } +} + + +void ble_ias_c_on_ble_evt(ble_ias_c_t * p_ias_c, ble_evt_t const * p_ble_evt) +{ + uint32_t err_code = NRF_SUCCESS; + + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_DISCONNECTED: + on_disconnect(p_ias_c, p_ble_evt); + break; + + default: + // No implementation needed. + break; + } + + if (err_code != NRF_SUCCESS && p_ias_c->error_handler != 0) + { + p_ias_c->error_handler(err_code); + } +} + + +/**@brief Function for performing a Write procedure. + * + * @param[in] conn_handle Handle of the connection on which to perform the write operation. + * @param[in] write_handle Handle of the attribute to be written. + * @param[in] length Length of data to be written. + * @param[in] p_value Data to be written. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t write_characteristic_value(uint16_t conn_handle, + uint16_t write_handle, + uint16_t length, + uint8_t * p_value) +{ + ble_gattc_write_params_t write_params; + + memset(&write_params, 0, sizeof(write_params)); + + write_params.handle = write_handle; + write_params.write_op = BLE_GATT_OP_WRITE_CMD; + write_params.offset = 0; + write_params.len = length; + write_params.p_value = p_value; + + return sd_ble_gattc_write(conn_handle, &write_params); +} + + +uint32_t ble_ias_c_send_alert_level(ble_ias_c_t const * p_ias_c, uint8_t alert_level) +{ + if (!ble_ias_c_is_discovered(p_ias_c)) + { + return NRF_ERROR_NOT_FOUND; + } + + return write_characteristic_value(p_ias_c->conn_handle, + p_ias_c->alert_level_char.handle_value, + sizeof(uint8_t), + &alert_level); +} + + +uint32_t ble_ias_c_handles_assign(ble_ias_c_t * p_ias_c, + const uint16_t conn_handle, + const uint16_t alert_level_handle) +{ + VERIFY_PARAM_NOT_NULL(p_ias_c); + + p_ias_c->conn_handle = conn_handle; + p_ias_c->alert_level_char.handle_value = alert_level_handle; + return NRF_SUCCESS; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias_c/ble_ias_c.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias_c/ble_ias_c.h new file mode 100644 index 0000000000..7f263ee4a8 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias_c/ble_ias_c.h @@ -0,0 +1,168 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_sdk_srv_ias_c Immediate Alert Service Client + * @{ + * @ingroup ble_sdk_srv + * @brief Immediate Alert Service Client module + * + * @details This module implements the Immediate Alert Service client - locator role of the Find Me + * profile. On @ref BLE_GAP_EVT_CONNECTED event, this module starts discovery of the + * Immediate Alert Service with Alert Level characteristic at the peer. This module will + * indicate the application about a successful service & characteristic discovery using + * @ref BLE_IAS_C_EVT_DISCOVERY_COMPLETE event. The application can use @ref + * ble_ias_c_send_alert_level function to signal alerts to the peer. + * + * @note The application must propagate BLE stack events to this module by calling + * ble_ias_c_on_ble_evt() from the @ref softdevice_handler callback function. + */ + +#ifndef BLE_IAS_C_H__ +#define BLE_IAS_C_H__ + +#include +#include "ble_srv_common.h" +#include "ble_gattc.h" +#include "ble.h" +#include "ble_db_discovery.h" + +// Forward declaration of the ble_ias_c_t type. +typedef struct ble_ias_c_s ble_ias_c_t; + +/**@brief Immediate Alert Service client event type. */ +typedef enum +{ + BLE_IAS_C_EVT_DISCOVERY_COMPLETE, /**< Event indicating that the Immediate Alert Service is found at the peer. */ + BLE_IAS_C_EVT_DISCOVERY_FAILED, /**< Event indicating that the Immediate Alert Service is not found at the peer. */ + BLE_IAS_C_EVT_DISCONN_COMPLETE /**< Event indicating that the Immediate Alert Service client module has completed the processing of BLE_GAP_EVT_DISCONNECTED event. This event is raised only if a valid instance of IAS was found at the peer during the discovery phase. This event can be used the application to do clean up related to the IAS Client.*/ +} ble_ias_c_evt_type_t; + +/**@brief Immediate Alert Service client event. */ +typedef struct +{ + ble_ias_c_evt_type_t evt_type; /**< Type of event. */ + uint16_t conn_handle; /**< Connection handle on which the IAS service was discovered on the peer device. This will be filled if the evt_type is @ref BLE_IAS_C_EVT_DISCOVERY_COMPLETE.*/ + ble_gattc_char_t alert_level; /**< Info on the discovered Alert Level characteristic discovered. This will be filled if the evt_type is @ref BLE_IAS_C_EVT_DISCOVERY_COMPLETE.*/ +} ble_ias_c_evt_t; + +/**@brief Immediate Alert Service client event handler type. */ +typedef void (*ble_ias_c_evt_handler_t) (ble_ias_c_t * p_ias_c, ble_ias_c_evt_t * p_evt); + +/**@brief IAS Client structure. This contains various status information for the client. */ +struct ble_ias_c_s +{ + ble_ias_c_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Immediate Alert Service client. */ + ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ + uint16_t conn_handle; /**< Handle of the current connection. Set with @ref ble_ias_c_handles_assign when connected. */ + ble_uuid_t service_uuid; /**< The GATT Service holding the discovered Immediate Service. */ + ble_gattc_char_t alert_level_char; /**< IAS Alert Level Characteristic. Stores data about the alert characteristic found on the peer. */ +}; + +/**@brief IAS Client init structure. This contains all options and data needed for initialization of + * the client.*/ +typedef struct +{ + ble_ias_c_evt_handler_t evt_handler; /**< Event handler to be called for handling events from the Immediate Alert Service client. */ + ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ +} ble_ias_c_init_t; + +/**@brief Function for initializing the Immediate Alert Service client. + * + * @details This call allows the application to initialize the Immediate Alert Service client. + * + * @param[out] p_ias_c Immediate Alert Service client structure. This structure will have to + * be supplied by the application. It will be initialized by this + * function, and will later be used to identify this particular client + * instance. + * @param[in] p_ias_c_init Information needed to initialize the Immediate Alert Service client. + * + * @return NRF_SUCCESS on successful initialization of service. + */ +uint32_t ble_ias_c_init(ble_ias_c_t * p_ias_c, const ble_ias_c_init_t * p_ias_c_init); + +/**@brief Function for sending alert level to the peer. + * + * @details This function allows the application to send an alert to the peer. + * + * @param[in] p_ias_c Immediate Alert Service client structure. + * @param[in] alert_level Required alert level to be sent to the peer. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +uint32_t ble_ias_c_send_alert_level(const ble_ias_c_t * p_ias_c, uint8_t alert_level); + +/**@brief Function for handling the Application's BLE Stack events for Immediate Alert Service client. + * + * @details Handles all events from the BLE stack of interest to the Immediate Alert Service client. + * + * @param[in] p_ias_c Immediate Alert Service client structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +void ble_ias_c_on_ble_evt(ble_ias_c_t * p_ias_c, const ble_evt_t * p_ble_evt); + +/**@brief Function for checking whether the peer's Immediate Alert Service instance and the alert level + * characteristic have been discovered. + * + * @param[in] p_ias_c Immediate Alert Service client structure. + * + * @return TRUE if a handle has been assigned to alert_level_handle, meaning it must have been + * discovered. FALSE if the handle is invalid. + */ +static __INLINE bool ble_ias_c_is_discovered(const ble_ias_c_t * p_ias_c) +{ + return (p_ias_c->alert_level_char.handle_value != BLE_GATT_HANDLE_INVALID); +} + + +/**@brief Function for handling events from the database discovery module. + * + * @details Call this function when getting a callback event from the DB discovery modue. + * This function will handle an event from the database discovery module, and determine + * if it relates to the discovery of heart rate service at the peer. If so, it will + * call the application's event handler indicating that the heart rate service has been + * discovered at the peer. It also populates the event with the service related + * information before providing it to the application. + * + * @param[in] p_ias_c Pointer to the immediate alert client structure instance that will handle + * the discovery. + * @param[in] p_evt Pointer to the event received from the database discovery module. + * + */ +void ble_ias_c_on_db_disc_evt(ble_ias_c_t * p_ias_c, const ble_db_discovery_evt_t * p_evt); + + +/**@brief Function for assigning handles to an instance of ias_c. + * + * @details Call this function when a link has been established with a peer to + * associate this link to this instance of the module. This makes it + * possible to handle several links and associate each link to a particular + * instance of this module. The connection handle and attribute handles will be + * provided from the discovery event @ref BLE_IAS_C_EVT_DISCOVERY_COMPLETE. + * + * @param[in] p_ias_c Pointer to the IAS client structure instance to associate. + * @param[in] conn_handle Connection handle to associated with the given IAS Instance. + * @param[in] alert_level_handle Attribute handle on the IAS server that you want this IAS_C client to + * interact with. + * + * @retval NRF_SUCCESS If the operation was successful. + * @retval NRF_ERROR_NULL If a p_ias_c was a NULL pointer. + */ +uint32_t ble_ias_c_handles_assign(ble_ias_c_t * p_ias_c, + uint16_t conn_handle, + uint16_t alert_level_handle); + + +#endif // BLE_IAS_C_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs/ble_lbs.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs/ble_lbs.c new file mode 100644 index 0000000000..b8c381b8b7 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs/ble_lbs.c @@ -0,0 +1,228 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the license.txt file. + */ + +#include "ble_lbs.h" +#include "ble_srv_common.h" +#include "sdk_common.h" + + +/**@brief Function for handling the Connect event. + * + * @param[in] p_lbs LED Button Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_connect(ble_lbs_t * p_lbs, ble_evt_t * p_ble_evt) +{ + p_lbs->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; +} + + +/**@brief Function for handling the Disconnect event. + * + * @param[in] p_lbs LED Button Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_disconnect(ble_lbs_t * p_lbs, ble_evt_t * p_ble_evt) +{ + UNUSED_PARAMETER(p_ble_evt); + p_lbs->conn_handle = BLE_CONN_HANDLE_INVALID; +} + + +/**@brief Function for handling the Write event. + * + * @param[in] p_lbs LED Button Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_write(ble_lbs_t * p_lbs, ble_evt_t * p_ble_evt) +{ + ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; + + if ((p_evt_write->handle == p_lbs->led_char_handles.value_handle) && + (p_evt_write->len == 1) && + (p_lbs->led_write_handler != NULL)) + { + p_lbs->led_write_handler(p_lbs, p_evt_write->data[0]); + } +} + + +void ble_lbs_on_ble_evt(ble_lbs_t * p_lbs, ble_evt_t * p_ble_evt) +{ + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + on_connect(p_lbs, p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + on_disconnect(p_lbs, p_ble_evt); + break; + + case BLE_GATTS_EVT_WRITE: + on_write(p_lbs, p_ble_evt); + break; + + default: + // No implementation needed. + break; + } +} + + +/**@brief Function for adding the LED Characteristic. + * + * @param[in] p_lbs LED Button Service structure. + * @param[in] p_lbs_init LED Button Service initialization structure. + * + * @retval NRF_SUCCESS on success, else an error value from the SoftDevice + */ +static uint32_t led_char_add(ble_lbs_t * p_lbs, const ble_lbs_init_t * p_lbs_init) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.read = 1; + char_md.char_props.write = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = NULL; + char_md.p_sccd_md = NULL; + + ble_uuid.type = p_lbs->uuid_type; + ble_uuid.uuid = LBS_UUID_LED_CHAR; + + memset(&attr_md, 0, sizeof(attr_md)); + + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.read_perm); + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.write_perm); + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = sizeof(uint8_t); + attr_char_value.init_offs = 0; + attr_char_value.max_len = sizeof(uint8_t); + attr_char_value.p_value = NULL; + + return sd_ble_gatts_characteristic_add(p_lbs->service_handle, + &char_md, + &attr_char_value, + &p_lbs->led_char_handles); +} + + +/**@brief Function for adding the Button Characteristic. + * + * @param[in] p_lbs LED Button Service structure. + * @param[in] p_lbs_init LED Button Service initialization structure. + * + * @retval NRF_SUCCESS on success, else an error value from the SoftDevice + */ +static uint32_t button_char_add(ble_lbs_t * p_lbs, const ble_lbs_init_t * p_lbs_init) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_md_t cccd_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + + memset(&cccd_md, 0, sizeof(cccd_md)); + + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.write_perm); + cccd_md.vloc = BLE_GATTS_VLOC_STACK; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.read = 1; + char_md.char_props.notify = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = &cccd_md; + char_md.p_sccd_md = NULL; + + ble_uuid.type = p_lbs->uuid_type; + ble_uuid.uuid = LBS_UUID_BUTTON_CHAR; + + memset(&attr_md, 0, sizeof(attr_md)); + + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.read_perm); + BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.write_perm); + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = sizeof(uint8_t); + attr_char_value.init_offs = 0; + attr_char_value.max_len = sizeof(uint8_t); + attr_char_value.p_value = NULL; + + return sd_ble_gatts_characteristic_add(p_lbs->service_handle, + &char_md, + &attr_char_value, + &p_lbs->button_char_handles); +} + +uint32_t ble_lbs_init(ble_lbs_t * p_lbs, const ble_lbs_init_t * p_lbs_init) +{ + uint32_t err_code; + ble_uuid_t ble_uuid; + + // Initialize service structure. + p_lbs->conn_handle = BLE_CONN_HANDLE_INVALID; + p_lbs->led_write_handler = p_lbs_init->led_write_handler; + + // Add service. + ble_uuid128_t base_uuid = {LBS_UUID_BASE}; + err_code = sd_ble_uuid_vs_add(&base_uuid, &p_lbs->uuid_type); + VERIFY_SUCCESS(err_code); + + ble_uuid.type = p_lbs->uuid_type; + ble_uuid.uuid = LBS_UUID_SERVICE; + + err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &ble_uuid, &p_lbs->service_handle); + VERIFY_SUCCESS(err_code); + + // Add characteristics. + err_code = button_char_add(p_lbs, p_lbs_init); + VERIFY_SUCCESS(err_code); + + err_code = led_char_add(p_lbs, p_lbs_init); + VERIFY_SUCCESS(err_code); + + return NRF_SUCCESS; +} + +uint32_t ble_lbs_on_button_change(ble_lbs_t * p_lbs, uint8_t button_state) +{ + ble_gatts_hvx_params_t params; + uint16_t len = sizeof(button_state); + + memset(¶ms, 0, sizeof(params)); + params.type = BLE_GATT_HVX_NOTIFICATION; + params.handle = p_lbs->button_char_handles.value_handle; + params.p_data = &button_state; + params.p_len = &len; + + return sd_ble_gatts_hvx(p_lbs->conn_handle, ¶ms); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs/ble_lbs.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs/ble_lbs.h new file mode 100644 index 0000000000..8995c7997a --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs/ble_lbs.h @@ -0,0 +1,104 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_sdk_srv_lbs LED Button Service Server + * @{ + * @ingroup ble_sdk_srv + * + * @brief LED Button Service Server module. + * + * @details This module implements a custom LED Button Service with an LED and Button Characteristics. + * During initialization, the module adds the LED Button Service and Characteristics + * to the BLE stack database. + * + * The application must supply an event handler for receiving LED Button Service + * events. Using this handler, the service notifies the application when the + * LED value changes. + * + * The service also provides a function for letting the application notify + * the state of the Button Characteristic to connected peers. + * + * @note The application must propagate BLE stack events to the LED Button Service + * module by calling ble_lbs_on_ble_evt() from the @ref softdevice_handler callback. +*/ + +#ifndef BLE_LBS_H__ +#define BLE_LBS_H__ + +#include +#include +#include "ble.h" +#include "ble_srv_common.h" + +#define LBS_UUID_BASE {0x23, 0xD1, 0xBC, 0xEA, 0x5F, 0x78, 0x23, 0x15, \ + 0xDE, 0xEF, 0x12, 0x12, 0x00, 0x00, 0x00, 0x00} +#define LBS_UUID_SERVICE 0x1523 +#define LBS_UUID_BUTTON_CHAR 0x1524 +#define LBS_UUID_LED_CHAR 0x1525 + +// Forward declaration of the ble_lbs_t type. +typedef struct ble_lbs_s ble_lbs_t; + +typedef void (*ble_lbs_led_write_handler_t) (ble_lbs_t * p_lbs, uint8_t new_state); + +/** @brief LED Button Service init structure. This structure contains all options and data needed for + * initialization of the service.*/ +typedef struct +{ + ble_lbs_led_write_handler_t led_write_handler; /**< Event handler to be called when the LED Characteristic is written. */ +} ble_lbs_init_t; + +/**@brief LED Button Service structure. This structure contains various status information for the service. */ +struct ble_lbs_s +{ + uint16_t service_handle; /**< Handle of LED Button Service (as provided by the BLE stack). */ + ble_gatts_char_handles_t led_char_handles; /**< Handles related to the LED Characteristic. */ + ble_gatts_char_handles_t button_char_handles; /**< Handles related to the Button Characteristic. */ + uint8_t uuid_type; /**< UUID type for the LED Button Service. */ + uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack). BLE_CONN_HANDLE_INVALID if not in a connection. */ + ble_lbs_led_write_handler_t led_write_handler; /**< Event handler to be called when the LED Characteristic is written. */ +}; + +/**@brief Function for initializing the LED Button Service. + * + * @param[out] p_lbs LED Button Service structure. This structure must be supplied by + * the application. It is initialized by this function and will later + * be used to identify this particular service instance. + * @param[in] p_lbs_init Information needed to initialize the service. + * + * @retval NRF_SUCCESS If the service was initialized successfully. Otherwise, an error code is returned. + */ +uint32_t ble_lbs_init(ble_lbs_t * p_lbs, const ble_lbs_init_t * p_lbs_init); + +/**@brief Function for handling the application's BLE stack events. + * + * @details This function handles all events from the BLE stack that are of interest to the LED Button Service. + * + * @param[in] p_lbs LED Button Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +void ble_lbs_on_ble_evt(ble_lbs_t * p_lbs, ble_evt_t * p_ble_evt); + +/**@brief Function for sending a button state notification. + * + * @param[in] p_lbs LED Button Service structure. + * @param[in] button_state New button state. + * + * @retval NRF_SUCCESS If the notification was sent successfully. Otherwise, an error code is returned. + */ +uint32_t ble_lbs_on_button_change(ble_lbs_t * p_lbs, uint8_t button_state); + +#endif // BLE_LBS_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs_c/ble_lbs_c.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs_c/ble_lbs_c.c new file mode 100644 index 0000000000..7a3c140ce7 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs_c/ble_lbs_c.c @@ -0,0 +1,362 @@ +/* + * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is confidential property of Nordic Semiconductor. The use, + * copying, transfer or disclosure of such information is prohibited except by express written + * agreement with Nordic Semiconductor. + * + */ + + +#include "ble_lbs_c.h" +#include "ble_db_discovery.h" +#include "ble_types.h" +#include "ble_srv_common.h" +#include "ble_gattc.h" +#include "app_trace.h" +#include "sdk_common.h" +#include "nrf_log.h" + +#define LOG NRF_LOG_PRINTF_DEBUG /**< Debug logger macro that will be used in this file to do logging of important information over UART. */ + +#define TX_BUFFER_MASK 0x07 /**< TX Buffer mask, must be a mask of continuous zeroes, followed by continuous sequence of ones: 000...111. */ +#define TX_BUFFER_SIZE (TX_BUFFER_MASK + 1) /**< Size of send buffer, which is 1 higher than the mask. */ + +#define WRITE_MESSAGE_LENGTH BLE_CCCD_VALUE_LEN /**< Length of the write message for CCCD. */ +#define WRITE_MESSAGE_LENGTH BLE_CCCD_VALUE_LEN /**< Length of the write message for CCCD. */ + +typedef enum +{ + READ_REQ, /**< Type identifying that this tx_message is a read request. */ + WRITE_REQ /**< Type identifying that this tx_message is a write request. */ +} tx_request_t; + +/**@brief Structure for writing a message to the peer, i.e. CCCD. + */ +typedef struct +{ + uint8_t gattc_value[WRITE_MESSAGE_LENGTH]; /**< The message to write. */ + ble_gattc_write_params_t gattc_params; /**< GATTC parameters for this message. */ +} write_params_t; + +/**@brief Structure for holding data to be transmitted to the connected central. + */ +typedef struct +{ + uint16_t conn_handle; /**< Connection handle to be used when transmitting this message. */ + tx_request_t type; /**< Type of this message, i.e. read or write message. */ + union + { + uint16_t read_handle; /**< Read request message. */ + write_params_t write_req; /**< Write request message. */ + } req; +} tx_message_t; + + +static tx_message_t m_tx_buffer[TX_BUFFER_SIZE]; /**< Transmit buffer for messages to be transmitted to the central. */ +static uint32_t m_tx_insert_index = 0; /**< Current index in the transmit buffer where the next message should be inserted. */ +static uint32_t m_tx_index = 0; /**< Current index in the transmit buffer from where the next message to be transmitted resides. */ + + +/**@brief Function for passing any pending request from the buffer to the stack. + */ +static void tx_buffer_process(void) +{ + if (m_tx_index != m_tx_insert_index) + { + uint32_t err_code; + + if (m_tx_buffer[m_tx_index].type == READ_REQ) + { + err_code = sd_ble_gattc_read(m_tx_buffer[m_tx_index].conn_handle, + m_tx_buffer[m_tx_index].req.read_handle, + 0); + } + else + { + err_code = sd_ble_gattc_write(m_tx_buffer[m_tx_index].conn_handle, + &m_tx_buffer[m_tx_index].req.write_req.gattc_params); + } + if (err_code == NRF_SUCCESS) + { + LOG("[LBS_C]: SD Read/Write API returns Success..\r\n"); + m_tx_index++; + m_tx_index &= TX_BUFFER_MASK; + } + else + { + LOG("[LBS_C]: SD Read/Write API returns error. This message sending will be " + "attempted again..\r\n"); + } + } +} + + +/**@brief Function for handling write response events. + * + * @param[in] p_ble_lbs_c Pointer to the Led Button Client structure. + * @param[in] p_ble_evt Pointer to the BLE event received. + */ +static void on_write_rsp(ble_lbs_c_t * p_ble_lbs_c, const ble_evt_t * p_ble_evt) +{ + // Check if the event if on the link for this instance + if (p_ble_lbs_c->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) + { + return; + } + // Check if there is any message to be sent across to the peer and send it. + tx_buffer_process(); +} + + +/**@brief Function for handling Handle Value Notification received from the SoftDevice. + * + * @details This function will uses the Handle Value Notification received from the SoftDevice + * and checks if it is a notification of Button state from the peer. If + * it is, this function will decode the state of the button and send it to the + * application. + * + * @param[in] p_ble_lbs_c Pointer to the Led Button Client structure. + * @param[in] p_ble_evt Pointer to the BLE event received. + */ +static void on_hvx(ble_lbs_c_t * p_ble_lbs_c, const ble_evt_t * p_ble_evt) +{ + // Check if the event is on the link for this instance + if (p_ble_lbs_c->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) + { + return; + } + // Check if this is a Button notification. + if (p_ble_evt->evt.gattc_evt.params.hvx.handle == p_ble_lbs_c->peer_lbs_db.button_handle) + { + if (p_ble_evt->evt.gattc_evt.params.hvx.len == 1) + { + ble_lbs_c_evt_t ble_lbs_c_evt; + + ble_lbs_c_evt.evt_type = BLE_LBS_C_EVT_BUTTON_NOTIFICATION; + ble_lbs_c_evt.conn_handle = p_ble_lbs_c->conn_handle; + ble_lbs_c_evt.params.button.button_state = p_ble_evt->evt.gattc_evt.params.hvx.data[0]; + p_ble_lbs_c->evt_handler(p_ble_lbs_c, &ble_lbs_c_evt); + } + } +} + + +/**@brief Function for handling Disconnected event received from the SoftDevice. + * + * @details This function check if the disconnect event is happening on the link + * associated with the current instance of the module, if so it will set its + * conn_handle to invalid. + * + * @param[in] p_ble_lbs_c Pointer to the Led Button Client structure. + * @param[in] p_ble_evt Pointer to the BLE event received. + */ +static void on_disconnected(ble_lbs_c_t * p_ble_lbs_c, const ble_evt_t * p_ble_evt) +{ + if (p_ble_lbs_c->conn_handle == p_ble_evt->evt.gap_evt.conn_handle) + { + p_ble_lbs_c->conn_handle = BLE_CONN_HANDLE_INVALID; + p_ble_lbs_c->peer_lbs_db.button_cccd_handle = BLE_GATT_HANDLE_INVALID; + p_ble_lbs_c->peer_lbs_db.button_handle = BLE_GATT_HANDLE_INVALID; + p_ble_lbs_c->peer_lbs_db.led_handle = BLE_GATT_HANDLE_INVALID; + } +} + + +void ble_lbs_on_db_disc_evt(ble_lbs_c_t * p_ble_lbs_c, const ble_db_discovery_evt_t * p_evt) +{ + // Check if the Led Button Service was discovered. + if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE && + p_evt->params.discovered_db.srv_uuid.uuid == LBS_UUID_SERVICE && + p_evt->params.discovered_db.srv_uuid.type == p_ble_lbs_c->uuid_type) + { + ble_lbs_c_evt_t evt; + + evt.evt_type = BLE_LBS_C_EVT_DISCOVERY_COMPLETE; + evt.conn_handle = p_evt->conn_handle; + + uint32_t i; + for (i = 0; i < p_evt->params.discovered_db.char_count; i++) + { + const ble_gatt_db_char_t * p_char = &(p_evt->params.discovered_db.charateristics[i]); + switch(p_char->characteristic.uuid.uuid) + { + case LBS_UUID_LED_CHAR: + evt.params.peer_db.led_handle = p_char->characteristic.handle_value; + break; + case LBS_UUID_BUTTON_CHAR: + evt.params.peer_db.button_handle = p_char->characteristic.handle_value; + evt.params.peer_db.button_cccd_handle = p_char->cccd_handle; + break; + + default: + break; + } + } + + LOG("[LBS_C]: Led Button Service discovered at peer.\r\n"); + //If the instance has been assigned prior to db_discovery, assign the db_handles + if(p_ble_lbs_c->conn_handle != BLE_CONN_HANDLE_INVALID) + { + if ((p_ble_lbs_c->peer_lbs_db.led_handle == BLE_GATT_HANDLE_INVALID)&& + (p_ble_lbs_c->peer_lbs_db.button_handle == BLE_GATT_HANDLE_INVALID)&& + (p_ble_lbs_c->peer_lbs_db.button_cccd_handle == BLE_GATT_HANDLE_INVALID)) + { + p_ble_lbs_c->peer_lbs_db = evt.params.peer_db; + } + } + + p_ble_lbs_c->evt_handler(p_ble_lbs_c, &evt); + + } +} + + +uint32_t ble_lbs_c_init(ble_lbs_c_t * p_ble_lbs_c, ble_lbs_c_init_t * p_ble_lbs_c_init) +{ + uint32_t err_code; + ble_uuid_t lbs_uuid; + ble_uuid128_t lbs_base_uuid = {LBS_UUID_BASE}; + + VERIFY_PARAM_NOT_NULL(p_ble_lbs_c); + VERIFY_PARAM_NOT_NULL(p_ble_lbs_c_init); + VERIFY_PARAM_NOT_NULL(p_ble_lbs_c_init->evt_handler); + + p_ble_lbs_c->peer_lbs_db.button_cccd_handle = BLE_GATT_HANDLE_INVALID; + p_ble_lbs_c->peer_lbs_db.button_handle = BLE_GATT_HANDLE_INVALID; + p_ble_lbs_c->peer_lbs_db.led_handle = BLE_GATT_HANDLE_INVALID; + p_ble_lbs_c->conn_handle = BLE_CONN_HANDLE_INVALID; + p_ble_lbs_c->evt_handler = p_ble_lbs_c_init->evt_handler; + + err_code = sd_ble_uuid_vs_add(&lbs_base_uuid, &p_ble_lbs_c->uuid_type); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + VERIFY_SUCCESS(err_code); + + lbs_uuid.type = p_ble_lbs_c->uuid_type; + lbs_uuid.uuid = LBS_UUID_SERVICE; + + return ble_db_discovery_evt_register(&lbs_uuid); +} + +void ble_lbs_c_on_ble_evt(ble_lbs_c_t * p_ble_lbs_c, const ble_evt_t * p_ble_evt) +{ + if ((p_ble_lbs_c == NULL) || (p_ble_evt == NULL)) + { + return; + } + + switch (p_ble_evt->header.evt_id) + { + case BLE_GATTC_EVT_HVX: + on_hvx(p_ble_lbs_c, p_ble_evt); + break; + + case BLE_GATTC_EVT_WRITE_RSP: + on_write_rsp(p_ble_lbs_c, p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + on_disconnected(p_ble_lbs_c, p_ble_evt); + break; + + default: + break; + } +} + + +/**@brief Function for configuring the CCCD. + * + * @param[in] conn_handle The connection handle on which to configure the CCCD. + * @param[in] handle_cccd The handle of the CCCD to be configured. + * @param[in] enable Whether to enable or disable the CCCD. + * + * @return NRF_SUCCESS if the CCCD configure was successfully sent to the peer. + */ +static uint32_t cccd_configure(uint16_t conn_handle, uint16_t handle_cccd, bool enable) +{ + LOG("[LBS_C]: Configuring CCCD. CCCD Handle = %d, Connection Handle = %d\r\n", + handle_cccd,conn_handle); + + tx_message_t * p_msg; + uint16_t cccd_val = enable ? BLE_GATT_HVX_NOTIFICATION : 0; + + p_msg = &m_tx_buffer[m_tx_insert_index++]; + m_tx_insert_index &= TX_BUFFER_MASK; + + p_msg->req.write_req.gattc_params.handle = handle_cccd; + p_msg->req.write_req.gattc_params.len = WRITE_MESSAGE_LENGTH; + p_msg->req.write_req.gattc_params.p_value = p_msg->req.write_req.gattc_value; + p_msg->req.write_req.gattc_params.offset = 0; + p_msg->req.write_req.gattc_params.write_op = BLE_GATT_OP_WRITE_REQ; + p_msg->req.write_req.gattc_value[0] = LSB_16(cccd_val); + p_msg->req.write_req.gattc_value[1] = MSB_16(cccd_val); + p_msg->conn_handle = conn_handle; + p_msg->type = WRITE_REQ; + + tx_buffer_process(); + return NRF_SUCCESS; +} + + +uint32_t ble_lbs_c_button_notif_enable(ble_lbs_c_t * p_ble_lbs_c) +{ + VERIFY_PARAM_NOT_NULL(p_ble_lbs_c); + + if (p_ble_lbs_c->conn_handle == BLE_CONN_HANDLE_INVALID) + { + return NRF_ERROR_INVALID_STATE; + } + + return cccd_configure(p_ble_lbs_c->conn_handle, + p_ble_lbs_c->peer_lbs_db.button_cccd_handle, + true); +} + + +uint32_t ble_lbs_led_status_send(ble_lbs_c_t * p_ble_lbs_c, uint8_t status) +{ + VERIFY_PARAM_NOT_NULL(p_ble_lbs_c); + + if (p_ble_lbs_c->conn_handle == BLE_CONN_HANDLE_INVALID) + { + return NRF_ERROR_INVALID_STATE; + } + + LOG("[LBS_C]: writing LED status 0x%x", status); + + tx_message_t * p_msg; + + p_msg = &m_tx_buffer[m_tx_insert_index++]; + m_tx_insert_index &= TX_BUFFER_MASK; + + p_msg->req.write_req.gattc_params.handle = p_ble_lbs_c->peer_lbs_db.led_handle; + p_msg->req.write_req.gattc_params.len = sizeof(status); + p_msg->req.write_req.gattc_params.p_value = p_msg->req.write_req.gattc_value; + p_msg->req.write_req.gattc_params.offset = 0; + p_msg->req.write_req.gattc_params.write_op = BLE_GATT_OP_WRITE_CMD; + p_msg->req.write_req.gattc_value[0] = status; + p_msg->conn_handle = p_ble_lbs_c->conn_handle; + p_msg->type = WRITE_REQ; + + tx_buffer_process(); + return NRF_SUCCESS; +} + +uint32_t ble_lbs_c_handles_assign(ble_lbs_c_t * p_ble_lbs_c, + uint16_t conn_handle, + const lbs_db_t * p_peer_handles) +{ + VERIFY_PARAM_NOT_NULL(p_ble_lbs_c); + + p_ble_lbs_c->conn_handle = conn_handle; + if (p_peer_handles != NULL) + { + p_ble_lbs_c->peer_lbs_db = *p_peer_handles; + } + return NRF_SUCCESS; +} + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs_c/ble_lbs_c.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs_c/ble_lbs_c.h new file mode 100644 index 0000000000..b771a8035b --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs_c/ble_lbs_c.h @@ -0,0 +1,191 @@ +/* + * Copyright (c) 2016 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is confidential property of Nordic Semiconductor. The use, + * copying, transfer or disclosure of such information is prohibited except by express written + * agreement with Nordic Semiconductor. + * + */ + +/**@file + * + * @defgroup ble_sdk_srv_lbs_c LED Button Service Client + * @{ + * @ingroup ble_sdk_srv + * @brief The LED Button Service client can be used to set a LED, and read a button state on a + * LED button service server. + * + * @details This module contains the APIs and types exposed by the LED Button Service Client + * module. These APIs and types can be used by the application to perform discovery of + * LED Button Service at the peer and interact with it. + * + * @note The application must propagate BLE stack events to this module by calling + * ble_lbs_c_on_ble_evt(). + * + */ + +#ifndef BLE_LBS_C_H__ +#define BLE_LBS_C_H__ + +#include +#include "ble.h" +#include "ble_db_discovery.h" + +#define LBS_UUID_BASE {0x23, 0xD1, 0xBC, 0xEA, 0x5F, 0x78, 0x23, 0x15, \ + 0xDE, 0xEF, 0x12, 0x12, 0x00, 0x00, 0x00, 0x00} +#define LBS_UUID_SERVICE 0x1523 +#define LBS_UUID_BUTTON_CHAR 0x1524 +#define LBS_UUID_LED_CHAR 0x1525 + +/**@brief LBS Client event type. */ +typedef enum +{ + BLE_LBS_C_EVT_DISCOVERY_COMPLETE = 1, /**< Event indicating that the LED Button Service has been discovered at the peer. */ + BLE_LBS_C_EVT_BUTTON_NOTIFICATION /**< Event indicating that a notification of the LED Button Button characteristic has been received from the peer. */ +} ble_lbs_c_evt_type_t; + + +/**@brief Structure containing the Button value received from the peer. */ +typedef struct +{ + uint8_t button_state; /**< Button Value. */ +} ble_button_t; + + +/**@brief Structure containing the handles related to the LED Button Service found on the peer. */ +typedef struct +{ + uint16_t button_cccd_handle; /**< Handle of the CCCD of the Button characteristic. */ + uint16_t button_handle; /**< Handle of the Button characteristic as provided by the SoftDevice. */ + uint16_t led_handle; /**< Handle of the LED characteristic as provided by the SoftDevice. */ +} lbs_db_t; + + +/**@brief LED Button Event structure. */ +typedef struct +{ + ble_lbs_c_evt_type_t evt_type; /**< Type of the event. */ + uint16_t conn_handle; /**< Connection handle on which the event occured.*/ + union + { + ble_button_t button; /**< Button Value received. This will be filled if the evt_type is @ref BLE_LBS_C_EVT_BUTTON_NOTIFICATION. */ + lbs_db_t peer_db; /**< LED Button Service related handles found on the peer device. This will be filled if the evt_type is @ref BLE_LBS_C_EVT_DISCOVERY_COMPLETE.*/ + } params; +} ble_lbs_c_evt_t; + + +// Forward declaration of the ble_lbs_c_t type. +typedef struct ble_lbs_c_s ble_lbs_c_t; + +/**@brief Event handler type. + * + * @details This is the type of the event handler that should be provided by the application + * of this module in order to receive events. + */ +typedef void (* ble_lbs_c_evt_handler_t) (ble_lbs_c_t * p_ble_lbs_c, ble_lbs_c_evt_t * p_evt); + + +/**@brief LED Button Client structure. */ +struct ble_lbs_c_s +{ + uint16_t conn_handle; /**< Connection handle as provided by the SoftDevice. */ + lbs_db_t peer_lbs_db; /**< Handles related to LBS on the peer*/ + ble_lbs_c_evt_handler_t evt_handler; /**< Application event handler to be called when there is an event related to the LED Button service. */ + uint8_t uuid_type; /**< UUID type. */ +}; + +/**@brief LED Button Client initialization structure. */ +typedef struct +{ + ble_lbs_c_evt_handler_t evt_handler; /**< Event handler to be called by the LED Button Client module whenever there is an event related to the LED Button Service. */ +} ble_lbs_c_init_t; + + +/**@brief Function for initializing the LED Button client module. + * + * @details This function will register with the DB Discovery module. There it registers for the + * LED Button Service. Doing so will make the DB Discovery module look for the presence + * of a LED Button Service instance at the peer when a discovery is started. + * + * @param[in] p_ble_lbs_c Pointer to the LED Button client structure. + * @param[in] p_ble_lbs_c_init Pointer to the LED Button initialization structure containing the + * initialization information. + * + * @retval NRF_SUCCESS On successful initialization. Otherwise an error code. This function + * propagates the error code returned by the Database Discovery module API + * @ref ble_db_discovery_evt_register. + */ +uint32_t ble_lbs_c_init(ble_lbs_c_t * p_ble_lbs_c, ble_lbs_c_init_t * p_ble_lbs_c_init); + +/**@brief Function for handling BLE events from the SoftDevice. + * + * @details This function will handle the BLE events received from the SoftDevice. If a BLE event + * is relevant to the LED Button Client module, then it uses it to update interval + * variables and, if necessary, send events to the application. + * + * @param[in] p_ble_lbs_c Pointer to the LED button client structure. + * @param[in] p_ble_evt Pointer to the BLE event. + */ +void ble_lbs_c_on_ble_evt(ble_lbs_c_t * p_ble_lbs_c, const ble_evt_t * p_ble_evt); + + +/**@brief Function for requesting the peer to start sending notification of the Button + * Characteristic. + * + * @details This function will enable to notification of the Button at the peer + * by writing to the CCCD of the Button Characteristic. + * + * @param[in] p_ble_lbs_c Pointer to the LED Button Client structure. + * + * @retval NRF_SUCCESS If the SoftDevice has been requested to write to the CCCD of the peer. + * Otherwise, an error code. This function propagates the error code returned + * by the SoftDevice API @ref sd_ble_gattc_write. + * NRF_ERROR_INVALID_STATE if no connection handle has been assigned (@ref ble_lbs_c_handles_assign) + * NRF_ERROR_NULL if the given parameter is NULL + */ +uint32_t ble_lbs_c_button_notif_enable(ble_lbs_c_t * p_ble_lbs_c); + + +/**@brief Function for handling events from the database discovery module. + * + * @details Call this function when getting a callback event from the DB discovery module. This + * function will handle an event from the database discovery module, and determine if it + * relates to the discovery of LED Button service at the peer. If so, it will call the + * application's event handler indicating that the LED Button service has been discovered + * at the peer. It also populates the event with the service related information before + * providing it to the application. + * + * @param[in] p_ble_lbs_c Pointer to the LED Button client structure. + * @param[in] p_evt Pointer to the event received from the database discovery module. + */ +void ble_lbs_on_db_disc_evt(ble_lbs_c_t * p_ble_lbs_c, const ble_db_discovery_evt_t * p_evt); + + +/**@brief Function for assigning a Handles to this instance of lbs_c. + * + * @details Call this function when a link has been established with a peer to associate this link + * to this instance of the module. This makes it possible to handle several links and + * associate each link to a particular instance of this module. + * + * @param[in] p_ble_lbs_c Pointer to the LED Button client structure instance to associate. + * @param[in] conn_handle Connection handle to associate with the given LED Button Client Instance. + * @param[in] p_peer_handles LED Button Service handles found on the peer (from @ref BLE_LBS_C_EVT_DISCOVERY_COMPLETE event). + * + */ +uint32_t ble_lbs_c_handles_assign(ble_lbs_c_t * p_ble_lbs_c, + uint16_t conn_handle, + const lbs_db_t * p_peer_handles); + + +/**@brief Function for writing the LED status to the connected server. + * + * @param[in] p_ble_lbs_c Pointer to the LED Button client structure. + * @param[in] status LED status to send. + * + * @retval NRF_SUCCESS If the staus was sent successfully. Otherwise, an error code is returned. + */ +uint32_t ble_lbs_led_status_send(ble_lbs_c_t * p_ble_lbs_c, uint8_t status); + +#endif // BLE_LBS_C_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lls/ble_lls.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lls/ble_lls.c new file mode 100644 index 0000000000..bdc1ca87ec --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lls/ble_lls.c @@ -0,0 +1,214 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/* Attention! +* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile +* qualification listings, this section of source code must not be modified. +*/ + +#include "ble_lls.h" +#include +#include "ble_hci.h" +#include "ble_srv_common.h" + + +/**@brief Function for handling the Connect event. + * + * @param[in] p_lls Link Loss Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_connect(ble_lls_t * p_lls, ble_evt_t * p_ble_evt) +{ + // Link reconnected, notify application with a no_alert event + ble_lls_evt_t evt; + + p_lls->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; + + evt.evt_type = BLE_LLS_EVT_LINK_LOSS_ALERT; + evt.params.alert_level = BLE_CHAR_ALERT_LEVEL_NO_ALERT; + p_lls->evt_handler(p_lls, &evt); +} + + +/**@brief Function for handling the Disconnect event. + * + * @param[in] p_lls Link Loss Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_disconnect(ble_lls_t * p_lls, ble_evt_t * p_ble_evt) +{ + uint8_t reason = p_ble_evt->evt.gap_evt.params.disconnected.reason; + + if (reason == BLE_HCI_CONNECTION_TIMEOUT) + { + // Link loss detected, notify application + uint32_t err_code; + ble_lls_evt_t evt; + + evt.evt_type = BLE_LLS_EVT_LINK_LOSS_ALERT; + + err_code = ble_lls_alert_level_get(p_lls, &evt.params.alert_level); + if (err_code == NRF_SUCCESS) + { + p_lls->evt_handler(p_lls, &evt); + } + else + { + if (p_lls->error_handler != NULL) + { + p_lls->error_handler(err_code); + } + } + } +} + + +/**@brief Function for handling the Authentication Status event. + * + * @param[in] p_lls Link Loss Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_auth_status(ble_lls_t * p_lls, ble_evt_t * p_ble_evt) +{ + if (p_ble_evt->evt.gap_evt.params.auth_status.auth_status == BLE_GAP_SEC_STATUS_SUCCESS) + { + ble_lls_evt_t evt; + + evt.evt_type = BLE_LLS_EVT_LINK_LOSS_ALERT; + evt.params.alert_level = BLE_CHAR_ALERT_LEVEL_NO_ALERT; + + p_lls->evt_handler(p_lls, &evt); + } +} + + +void ble_lls_on_ble_evt(ble_lls_t * p_lls, ble_evt_t * p_ble_evt) +{ + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + on_connect(p_lls, p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + on_disconnect(p_lls, p_ble_evt); + break; + + case BLE_GAP_EVT_AUTH_STATUS: + on_auth_status(p_lls, p_ble_evt); + break; + + default: + // No implementation needed. + break; + } +} + + +/**@brief Function for adding Alert Level characteristics. + * + * @param[in] p_lls Link Loss Service structure. + * @param[in] p_lls_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t alert_level_char_add(ble_lls_t * p_lls, const ble_lls_init_t * p_lls_init) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + uint8_t initial_alert_level; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.read = 1; + char_md.char_props.write = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = NULL; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_ALERT_LEVEL_CHAR); + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.read_perm = p_lls_init->lls_attr_md.read_perm; + attr_md.write_perm = p_lls_init->lls_attr_md.write_perm; + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + initial_alert_level = p_lls_init->initial_alert_level; + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = sizeof (uint8_t); + attr_char_value.init_offs = 0; + attr_char_value.max_len = sizeof (uint8_t); + attr_char_value.p_value = &initial_alert_level; + + return sd_ble_gatts_characteristic_add(p_lls->service_handle, + &char_md, + &attr_char_value, + &p_lls->alert_level_handles); +} + + +uint32_t ble_lls_init(ble_lls_t * p_lls, const ble_lls_init_t * p_lls_init) +{ + uint32_t err_code; + ble_uuid_t ble_uuid; + + // Initialize service structure + if (p_lls_init->evt_handler == NULL) + { + return NRF_ERROR_INVALID_PARAM; + } + + p_lls->evt_handler = p_lls_init->evt_handler; + p_lls->error_handler = p_lls_init->error_handler; + + // Add service + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_LINK_LOSS_SERVICE); + + err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, + &ble_uuid, + &p_lls->service_handle); + + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add alert level characteristic + return alert_level_char_add(p_lls, p_lls_init); +} + + +uint32_t ble_lls_alert_level_get(ble_lls_t * p_lls, uint8_t * p_alert_level) +{ + ble_gatts_value_t gatts_value; + + // Initialize value struct. + memset(&gatts_value, 0, sizeof(gatts_value)); + + gatts_value.len = sizeof(uint8_t); + gatts_value.offset = 0; + gatts_value.p_value = p_alert_level; + + return sd_ble_gatts_value_get(p_lls->conn_handle, + p_lls->alert_level_handles.value_handle, + &gatts_value); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lls/ble_lls.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lls/ble_lls.h new file mode 100644 index 0000000000..8a3e2cb95b --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lls/ble_lls.h @@ -0,0 +1,116 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_sdk_srv_lls Link Loss Service + * @{ + * @ingroup ble_sdk_srv + * @brief Link Loss Service module. + * + * @details This module implements the Link Loss Service with the Alert Level characteristic. + * During initialization it adds the Link Loss Service and Alert Level characteristic + * to the BLE stack database. + * + * The application must supply an event handler for receiving Link Loss Service + * events. Using this handler, the service will notify the application when the + * link has been lost, and which Alert Level has been set. + * + * The service also provides a function for letting the application poll the current + * value of the Alert Level characteristic. + * + * @note The application must propagate BLE stack events to the Link Loss Service + * module by calling ble_lls_on_ble_evt() from the @ref softdevice_handler callback. + * + * @note Attention! + * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile + * qualification listings, this section of source code must not be modified. +*/ + +#ifndef BLE_LLS_H__ +#define BLE_LLS_H__ + +#include +#include "ble.h" +#include "ble_srv_common.h" + +/**@brief Link Loss Service event type. */ +typedef enum +{ + BLE_LLS_EVT_LINK_LOSS_ALERT /**< Alert Level Updated event. */ +} ble_lls_evt_type_t; + +/**@brief Link Loss Service event. */ +typedef struct +{ + ble_lls_evt_type_t evt_type; /**< Type of event. */ + union + { + uint8_t alert_level; /**< New Alert Level value. */ + } params; +} ble_lls_evt_t; + +// Forward declaration of the ble_lls_t type. +typedef struct ble_lls_s ble_lls_t; + +/**@brief Link Loss Service event handler type. */ +typedef void (*ble_lls_evt_handler_t) (ble_lls_t * p_lls, ble_lls_evt_t * p_evt); + +/**@brief Link Loss Service init structure. This contains all options and data needed for initialization of the service. */ +typedef struct +{ + ble_lls_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Link Loss Service. */ + ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ + uint8_t initial_alert_level; /**< Initial value of the Alert Level characteristic. */ + ble_srv_security_mode_t lls_attr_md; /**< Initial Security Setting for Link Loss Service Characteristics. */ +} ble_lls_init_t; + +/**@brief Link Loss Service structure. This contains various status information for the service. */ +struct ble_lls_s +{ + ble_lls_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Link Loss Service. */ + ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ + uint16_t service_handle; /**< Handle of Link Loss Service (as provided by the BLE stack). */ + ble_gatts_char_handles_t alert_level_handles; /**< Handles related to the Alert Level characteristic. */ + uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ +}; + +/**@brief Function for initializing the Link Loss Service. + * + * @param[out] p_lls Link Loss Service structure. This structure will have to be supplied by + * the application. It will be initialized by this function, and will later + * be used to identify this particular service instance. + * @param[in] p_lls_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. + */ +uint32_t ble_lls_init(ble_lls_t * p_lls, const ble_lls_init_t * p_lls_init); + +/**@brief Function for handling the Application's BLE Stack events. + * + * @details Handles all events from the BLE stack of interest to the Link Loss Service. + * + * @param[in] p_lls Link Loss Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +void ble_lls_on_ble_evt(ble_lls_t * p_lls, ble_evt_t * p_ble_evt); + +/**@brief Function for getting current value of the Alert Level characteristic. + * + * @param[in] p_lls Link Loss Service structure. + * @param[out] p_alert_level Current Alert Level value. + */ +uint32_t ble_lls_alert_level_get(ble_lls_t * p_lls, uint8_t * p_alert_level); + +#endif // BLE_LLS_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus/ble_nus.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus/ble_nus.c new file mode 100644 index 0000000000..3fb037bb4d --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus/ble_nus.c @@ -0,0 +1,295 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "ble_nus.h" +#include "ble_srv_common.h" +#include "sdk_common.h" + +#define BLE_UUID_NUS_TX_CHARACTERISTIC 0x0002 /**< The UUID of the TX Characteristic. */ +#define BLE_UUID_NUS_RX_CHARACTERISTIC 0x0003 /**< The UUID of the RX Characteristic. */ + +#define BLE_NUS_MAX_RX_CHAR_LEN BLE_NUS_MAX_DATA_LEN /**< Maximum length of the RX Characteristic (in bytes). */ +#define BLE_NUS_MAX_TX_CHAR_LEN BLE_NUS_MAX_DATA_LEN /**< Maximum length of the TX Characteristic (in bytes). */ + +#define NUS_BASE_UUID {{0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E}} /**< Used vendor specific UUID. */ + +/**@brief Function for handling the @ref BLE_GAP_EVT_CONNECTED event from the S110 SoftDevice. + * + * @param[in] p_nus Nordic UART Service structure. + * @param[in] p_ble_evt Pointer to the event received from BLE stack. + */ +static void on_connect(ble_nus_t * p_nus, ble_evt_t * p_ble_evt) +{ + p_nus->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; +} + + +/**@brief Function for handling the @ref BLE_GAP_EVT_DISCONNECTED event from the S110 SoftDevice. + * + * @param[in] p_nus Nordic UART Service structure. + * @param[in] p_ble_evt Pointer to the event received from BLE stack. + */ +static void on_disconnect(ble_nus_t * p_nus, ble_evt_t * p_ble_evt) +{ + UNUSED_PARAMETER(p_ble_evt); + p_nus->conn_handle = BLE_CONN_HANDLE_INVALID; +} + + +/**@brief Function for handling the @ref BLE_GATTS_EVT_WRITE event from the S110 SoftDevice. + * + * @param[in] p_nus Nordic UART Service structure. + * @param[in] p_ble_evt Pointer to the event received from BLE stack. + */ +static void on_write(ble_nus_t * p_nus, ble_evt_t * p_ble_evt) +{ + ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; + + if ( + (p_evt_write->handle == p_nus->rx_handles.cccd_handle) + && + (p_evt_write->len == 2) + ) + { + if (ble_srv_is_notification_enabled(p_evt_write->data)) + { + p_nus->is_notification_enabled = true; + } + else + { + p_nus->is_notification_enabled = false; + } + } + else if ( + (p_evt_write->handle == p_nus->tx_handles.value_handle) + && + (p_nus->data_handler != NULL) + ) + { + p_nus->data_handler(p_nus, p_evt_write->data, p_evt_write->len); + } + else + { + // Do Nothing. This event is not relevant for this service. + } +} + + +/**@brief Function for adding RX characteristic. + * + * @param[in] p_nus Nordic UART Service structure. + * @param[in] p_nus_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t rx_char_add(ble_nus_t * p_nus, const ble_nus_init_t * p_nus_init) +{ + /**@snippet [Adding proprietary characteristic to S110 SoftDevice] */ + ble_gatts_char_md_t char_md; + ble_gatts_attr_md_t cccd_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + + memset(&cccd_md, 0, sizeof(cccd_md)); + + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.write_perm); + + cccd_md.vloc = BLE_GATTS_VLOC_STACK; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.notify = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = &cccd_md; + char_md.p_sccd_md = NULL; + + ble_uuid.type = p_nus->uuid_type; + ble_uuid.uuid = BLE_UUID_NUS_RX_CHARACTERISTIC; + + memset(&attr_md, 0, sizeof(attr_md)); + + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.read_perm); + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.write_perm); + + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 1; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = sizeof(uint8_t); + attr_char_value.init_offs = 0; + attr_char_value.max_len = BLE_NUS_MAX_RX_CHAR_LEN; + + return sd_ble_gatts_characteristic_add(p_nus->service_handle, + &char_md, + &attr_char_value, + &p_nus->rx_handles); + /**@snippet [Adding proprietary characteristic to S110 SoftDevice] */ +} + + +/**@brief Function for adding TX characteristic. + * + * @param[in] p_nus Nordic UART Service structure. + * @param[in] p_nus_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t tx_char_add(ble_nus_t * p_nus, const ble_nus_init_t * p_nus_init) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.write = 1; + char_md.char_props.write_wo_resp = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = NULL; + char_md.p_sccd_md = NULL; + + ble_uuid.type = p_nus->uuid_type; + ble_uuid.uuid = BLE_UUID_NUS_TX_CHARACTERISTIC; + + memset(&attr_md, 0, sizeof(attr_md)); + + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.read_perm); + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.write_perm); + + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 1; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = 1; + attr_char_value.init_offs = 0; + attr_char_value.max_len = BLE_NUS_MAX_TX_CHAR_LEN; + + return sd_ble_gatts_characteristic_add(p_nus->service_handle, + &char_md, + &attr_char_value, + &p_nus->tx_handles); +} + + +void ble_nus_on_ble_evt(ble_nus_t * p_nus, ble_evt_t * p_ble_evt) +{ + if ((p_nus == NULL) || (p_ble_evt == NULL)) + { + return; + } + + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + on_connect(p_nus, p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + on_disconnect(p_nus, p_ble_evt); + break; + + case BLE_GATTS_EVT_WRITE: + on_write(p_nus, p_ble_evt); + break; + + default: + // No implementation needed. + break; + } +} + + +uint32_t ble_nus_init(ble_nus_t * p_nus, const ble_nus_init_t * p_nus_init) +{ + uint32_t err_code; + ble_uuid_t ble_uuid; + ble_uuid128_t nus_base_uuid = NUS_BASE_UUID; + + VERIFY_PARAM_NOT_NULL(p_nus); + VERIFY_PARAM_NOT_NULL(p_nus_init); + + // Initialize the service structure. + p_nus->conn_handle = BLE_CONN_HANDLE_INVALID; + p_nus->data_handler = p_nus_init->data_handler; + p_nus->is_notification_enabled = false; + + /**@snippet [Adding proprietary Service to S110 SoftDevice] */ + // Add a custom base UUID. + err_code = sd_ble_uuid_vs_add(&nus_base_uuid, &p_nus->uuid_type); + VERIFY_SUCCESS(err_code); + + ble_uuid.type = p_nus->uuid_type; + ble_uuid.uuid = BLE_UUID_NUS_SERVICE; + + // Add the service. + err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, + &ble_uuid, + &p_nus->service_handle); + /**@snippet [Adding proprietary Service to S110 SoftDevice] */ + VERIFY_SUCCESS(err_code); + + // Add the RX Characteristic. + err_code = rx_char_add(p_nus, p_nus_init); + VERIFY_SUCCESS(err_code); + + // Add the TX Characteristic. + err_code = tx_char_add(p_nus, p_nus_init); + VERIFY_SUCCESS(err_code); + + return NRF_SUCCESS; +} + + +uint32_t ble_nus_string_send(ble_nus_t * p_nus, uint8_t * p_string, uint16_t length) +{ + ble_gatts_hvx_params_t hvx_params; + + VERIFY_PARAM_NOT_NULL(p_nus); + + if ((p_nus->conn_handle == BLE_CONN_HANDLE_INVALID) || (!p_nus->is_notification_enabled)) + { + return NRF_ERROR_INVALID_STATE; + } + + if (length > BLE_NUS_MAX_DATA_LEN) + { + return NRF_ERROR_INVALID_PARAM; + } + + memset(&hvx_params, 0, sizeof(hvx_params)); + + hvx_params.handle = p_nus->rx_handles.value_handle; + hvx_params.p_data = p_string; + hvx_params.p_len = &length; + hvx_params.type = BLE_GATT_HVX_NOTIFICATION; + + return sd_ble_gatts_hvx(p_nus->conn_handle, &hvx_params); +} + + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus/ble_nus.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus/ble_nus.h new file mode 100644 index 0000000000..23b7007f7a --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus/ble_nus.h @@ -0,0 +1,114 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/**@file + * + * @defgroup ble_sdk_srv_nus Nordic UART Service + * @{ + * @ingroup ble_sdk_srv + * @brief Nordic UART Service implementation. + * + * @details The Nordic UART Service is a simple GATT-based service with TX and RX characteristics. + * Data received from the peer is passed to the application, and the data received + * from the application of this service is sent to the peer as Handle Value + * Notifications. This module demonstrates how to implement a custom GATT-based + * service and characteristics using the SoftDevice. The service + * is used by the application to send and receive ASCII text strings to and from the + * peer. + * + * @note The application must propagate SoftDevice events to the Nordic UART Service module + * by calling the ble_nus_on_ble_evt() function from the ble_stack_handler callback. + */ + +#ifndef BLE_NUS_H__ +#define BLE_NUS_H__ + +#include "ble.h" +#include "ble_srv_common.h" +#include +#include + +#define BLE_UUID_NUS_SERVICE 0x0001 /**< The UUID of the Nordic UART Service. */ +#define BLE_NUS_MAX_DATA_LEN (GATT_MTU_SIZE_DEFAULT - 3) /**< Maximum length of data (in bytes) that can be transmitted to the peer by the Nordic UART service module. */ + +/* Forward declaration of the ble_nus_t type. */ +typedef struct ble_nus_s ble_nus_t; + +/**@brief Nordic UART Service event handler type. */ +typedef void (*ble_nus_data_handler_t) (ble_nus_t * p_nus, uint8_t * p_data, uint16_t length); + +/**@brief Nordic UART Service initialization structure. + * + * @details This structure contains the initialization information for the service. The application + * must fill this structure and pass it to the service using the @ref ble_nus_init + * function. + */ +typedef struct +{ + ble_nus_data_handler_t data_handler; /**< Event handler to be called for handling received data. */ +} ble_nus_init_t; + +/**@brief Nordic UART Service structure. + * + * @details This structure contains status information related to the service. + */ +struct ble_nus_s +{ + uint8_t uuid_type; /**< UUID type for Nordic UART Service Base UUID. */ + uint16_t service_handle; /**< Handle of Nordic UART Service (as provided by the SoftDevice). */ + ble_gatts_char_handles_t tx_handles; /**< Handles related to the TX characteristic (as provided by the SoftDevice). */ + ble_gatts_char_handles_t rx_handles; /**< Handles related to the RX characteristic (as provided by the SoftDevice). */ + uint16_t conn_handle; /**< Handle of the current connection (as provided by the SoftDevice). BLE_CONN_HANDLE_INVALID if not in a connection. */ + bool is_notification_enabled; /**< Variable to indicate if the peer has enabled notification of the RX characteristic.*/ + ble_nus_data_handler_t data_handler; /**< Event handler to be called for handling received data. */ +}; + +/**@brief Function for initializing the Nordic UART Service. + * + * @param[out] p_nus Nordic UART Service structure. This structure must be supplied + * by the application. It is initialized by this function and will + * later be used to identify this particular service instance. + * @param[in] p_nus_init Information needed to initialize the service. + * + * @retval NRF_SUCCESS If the service was successfully initialized. Otherwise, an error code is returned. + * @retval NRF_ERROR_NULL If either of the pointers p_nus or p_nus_init is NULL. + */ +uint32_t ble_nus_init(ble_nus_t * p_nus, const ble_nus_init_t * p_nus_init); + +/**@brief Function for handling the Nordic UART Service's BLE events. + * + * @details The Nordic UART Service expects the application to call this function each time an + * event is received from the SoftDevice. This function processes the event if it + * is relevant and calls the Nordic UART Service event handler of the + * application if necessary. + * + * @param[in] p_nus Nordic UART Service structure. + * @param[in] p_ble_evt Event received from the SoftDevice. + */ +void ble_nus_on_ble_evt(ble_nus_t * p_nus, ble_evt_t * p_ble_evt); + +/**@brief Function for sending a string to the peer. + * + * @details This function sends the input string as an RX characteristic notification to the + * peer. + * + * @param[in] p_nus Pointer to the Nordic UART Service structure. + * @param[in] p_string String to be sent. + * @param[in] length Length of the string. + * + * @retval NRF_SUCCESS If the string was sent successfully. Otherwise, an error code is returned. + */ +uint32_t ble_nus_string_send(ble_nus_t * p_nus, uint8_t * p_string, uint16_t length); + +#endif // BLE_NUS_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus_c/ble_nus_c.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus_c/ble_nus_c.c new file mode 100644 index 0000000000..1c856a90b5 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus_c/ble_nus_c.c @@ -0,0 +1,212 @@ +#include // definition of NULL + +#include "ble.h" +#include "ble_nus_c.h" +#include "ble_gattc.h" +#include "ble_srv_common.h" +#include "app_error.h" +#include "sdk_common.h" + + +void ble_nus_c_on_db_disc_evt(ble_nus_c_t * p_ble_nus_c, ble_db_discovery_evt_t * p_evt) +{ + ble_nus_c_evt_t nus_c_evt; + memset(&nus_c_evt,0,sizeof(ble_nus_c_evt_t)); + + ble_gatt_db_char_t * p_chars = p_evt->params.discovered_db.charateristics; + + // Check if the NUS was discovered. + if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE && + p_evt->params.discovered_db.srv_uuid.uuid == BLE_UUID_NUS_SERVICE && + p_evt->params.discovered_db.srv_uuid.type == p_ble_nus_c->uuid_type) + { + + uint32_t i; + + for (i = 0; i < p_evt->params.discovered_db.char_count; i++) + { + switch (p_chars[i].characteristic.uuid.uuid) + { + case BLE_UUID_NUS_TX_CHARACTERISTIC: + nus_c_evt.handles.nus_tx_handle = p_chars[i].characteristic.handle_value; + break; + + case BLE_UUID_NUS_RX_CHARACTERISTIC: + nus_c_evt.handles.nus_rx_handle = p_chars[i].characteristic.handle_value; + nus_c_evt.handles.nus_rx_cccd_handle = p_chars[i].cccd_handle; + break; + + default: + break; + } + } + if (p_ble_nus_c->evt_handler != NULL) + { + nus_c_evt.conn_handle = p_evt->conn_handle; + nus_c_evt.evt_type = BLE_NUS_C_EVT_DISCOVERY_COMPLETE; + p_ble_nus_c->evt_handler(p_ble_nus_c, &nus_c_evt); + } + } +} + +/**@brief Function for handling Handle Value Notification received from the SoftDevice. + * + * @details This function will uses the Handle Value Notification received from the SoftDevice + * and checks if it is a notification of the NUS RX characteristic from the peer. If + * it is, this function will decode the data and send it to the + * application. + * + * @param[in] p_ble_nus_c Pointer to the NUS Client structure. + * @param[in] p_ble_evt Pointer to the BLE event received. + */ +static void on_hvx(ble_nus_c_t * p_ble_nus_c, const ble_evt_t * p_ble_evt) +{ + // HVX can only occur from client sending. + if ( (p_ble_nus_c->handles.nus_rx_handle != BLE_GATT_HANDLE_INVALID) + && (p_ble_evt->evt.gattc_evt.params.hvx.handle == p_ble_nus_c->handles.nus_rx_handle) + && (p_ble_nus_c->evt_handler != NULL) + ) + { + ble_nus_c_evt_t ble_nus_c_evt; + + ble_nus_c_evt.evt_type = BLE_NUS_C_EVT_NUS_RX_EVT; + ble_nus_c_evt.p_data = (uint8_t *)p_ble_evt->evt.gattc_evt.params.hvx.data; + ble_nus_c_evt.data_len = p_ble_evt->evt.gattc_evt.params.hvx.len; + + p_ble_nus_c->evt_handler(p_ble_nus_c, &ble_nus_c_evt); + } +} + +uint32_t ble_nus_c_init(ble_nus_c_t * p_ble_nus_c, ble_nus_c_init_t * p_ble_nus_c_init) +{ + uint32_t err_code; + ble_uuid_t uart_uuid; + ble_uuid128_t nus_base_uuid = NUS_BASE_UUID; + + VERIFY_PARAM_NOT_NULL(p_ble_nus_c); + VERIFY_PARAM_NOT_NULL(p_ble_nus_c_init); + + err_code = sd_ble_uuid_vs_add(&nus_base_uuid, &p_ble_nus_c->uuid_type); + VERIFY_SUCCESS(err_code); + + uart_uuid.type = p_ble_nus_c->uuid_type; + uart_uuid.uuid = BLE_UUID_NUS_SERVICE; + + p_ble_nus_c->conn_handle = BLE_CONN_HANDLE_INVALID; + p_ble_nus_c->evt_handler = p_ble_nus_c_init->evt_handler; + p_ble_nus_c->handles.nus_rx_handle = BLE_GATT_HANDLE_INVALID; + p_ble_nus_c->handles.nus_tx_handle = BLE_GATT_HANDLE_INVALID; + + return ble_db_discovery_evt_register(&uart_uuid); +} + +void ble_nus_c_on_ble_evt(ble_nus_c_t * p_ble_nus_c, const ble_evt_t * p_ble_evt) +{ + if ((p_ble_nus_c == NULL) || (p_ble_evt == NULL)) + { + return; + } + + if ( (p_ble_nus_c->conn_handle != BLE_CONN_HANDLE_INVALID) + &&(p_ble_nus_c->conn_handle != p_ble_evt->evt.gap_evt.conn_handle) + ) + { + return; + } + + switch (p_ble_evt->header.evt_id) + { + case BLE_GATTC_EVT_HVX: + on_hvx(p_ble_nus_c, p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + if (p_ble_evt->evt.gap_evt.conn_handle == p_ble_nus_c->conn_handle + && p_ble_nus_c->evt_handler != NULL) + { + ble_nus_c_evt_t nus_c_evt; + + nus_c_evt.evt_type = BLE_NUS_C_EVT_DISCONNECTED; + + p_ble_nus_c->conn_handle = BLE_CONN_HANDLE_INVALID; + p_ble_nus_c->evt_handler(p_ble_nus_c, &nus_c_evt); + } + break; + } +} + +/**@brief Function for creating a message for writing to the CCCD. + */ +static uint32_t cccd_configure(uint16_t conn_handle, uint16_t cccd_handle, bool enable) +{ + uint8_t buf[BLE_CCCD_VALUE_LEN]; + + buf[0] = enable ? BLE_GATT_HVX_NOTIFICATION : 0; + buf[1] = 0; + + const ble_gattc_write_params_t write_params = { + .write_op = BLE_GATT_OP_WRITE_REQ, + .flags = BLE_GATT_EXEC_WRITE_FLAG_PREPARED_WRITE, + .handle = cccd_handle, + .offset = 0, + .len = sizeof(buf), + .p_value = buf + }; + + return sd_ble_gattc_write(conn_handle, &write_params); +} + +uint32_t ble_nus_c_rx_notif_enable(ble_nus_c_t * p_ble_nus_c) +{ + VERIFY_PARAM_NOT_NULL(p_ble_nus_c); + + if ( (p_ble_nus_c->conn_handle == BLE_CONN_HANDLE_INVALID) + ||(p_ble_nus_c->handles.nus_rx_cccd_handle == BLE_GATT_HANDLE_INVALID) + ) + { + return NRF_ERROR_INVALID_STATE; + } + return cccd_configure(p_ble_nus_c->conn_handle,p_ble_nus_c->handles.nus_rx_cccd_handle, true); +} + +uint32_t ble_nus_c_string_send(ble_nus_c_t * p_ble_nus_c, uint8_t * p_string, uint16_t length) +{ + VERIFY_PARAM_NOT_NULL(p_ble_nus_c); + + if (length > BLE_NUS_MAX_DATA_LEN) + { + return NRF_ERROR_INVALID_PARAM; + } + if ( p_ble_nus_c->conn_handle == BLE_CONN_HANDLE_INVALID) + { + return NRF_ERROR_INVALID_STATE; + } + + const ble_gattc_write_params_t write_params = { + .write_op = BLE_GATT_OP_WRITE_CMD, + .flags = BLE_GATT_EXEC_WRITE_FLAG_PREPARED_WRITE, + .handle = p_ble_nus_c->handles.nus_tx_handle, + .offset = 0, + .len = length, + .p_value = p_string + }; + + return sd_ble_gattc_write(p_ble_nus_c->conn_handle, &write_params); +} + + +uint32_t ble_nus_c_handles_assign(ble_nus_c_t * p_ble_nus, + const uint16_t conn_handle, + const ble_nus_c_handles_t * p_peer_handles) +{ + VERIFY_PARAM_NOT_NULL(p_ble_nus); + + p_ble_nus->conn_handle = conn_handle; + if (p_peer_handles != NULL) + { + p_ble_nus->handles.nus_rx_cccd_handle = p_peer_handles->nus_rx_cccd_handle; + p_ble_nus->handles.nus_rx_handle = p_peer_handles->nus_rx_handle; + p_ble_nus->handles.nus_tx_handle = p_peer_handles->nus_tx_handle; + } + return NRF_SUCCESS; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus_c/ble_nus_c.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus_c/ble_nus_c.h new file mode 100644 index 0000000000..578883ca47 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus_c/ble_nus_c.h @@ -0,0 +1,192 @@ +/* + * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is confidential property of Nordic Semiconductor. The use, + * copying, transfer or disclosure of such information is prohibited except by express written + * agreement with Nordic Semiconductor. + * + */ + +/**@file + * + * @defgroup ble_sdk_srv_nus_c Nordic UART Service Client + * @{ + * @ingroup ble_sdk_srv + * @brief Nordic UART Service Client module. + * + * @details This module contains the APIs and types exposed by the Nordic UART Service Client + * module. These APIs and types can be used by the application to perform discovery of + * the Nordic UART Service at the peer and interact with it. + * + * @note The application must propagate BLE stack events to this module by calling + * ble_nus_c_on_ble_evt(). + * + */ + + +#ifndef BLE_NUS_C_H__ +#define BLE_NUS_C_H__ + +#include +#include +#include "ble.h" +#include "ble_gatt.h" +#include "ble_db_discovery.h" + +#define NUS_BASE_UUID {{0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E}} /**< Used vendor specific UUID. */ +#define BLE_UUID_NUS_SERVICE 0x0001 /**< The UUID of the Nordic UART Service. */ +#define BLE_UUID_NUS_TX_CHARACTERISTIC 0x0002 /**< The UUID of the TX Characteristic. */ +#define BLE_UUID_NUS_RX_CHARACTERISTIC 0x0003 /**< The UUID of the RX Characteristic. */ + +#define BLE_NUS_MAX_DATA_LEN (GATT_MTU_SIZE_DEFAULT - 3) /**< Maximum length of data (in bytes) that can be transmitted to the peer by the Nordic UART service module. */ + + +/**@brief NUS Client event type. */ +typedef enum +{ + BLE_NUS_C_EVT_DISCOVERY_COMPLETE = 1, /**< Event indicating that the NUS service and its characteristics was found. */ + BLE_NUS_C_EVT_NUS_RX_EVT, /**< Event indicating that the central has received something from a peer. */ + BLE_NUS_C_EVT_DISCONNECTED /**< Event indicating that the NUS server has disconnected. */ +} ble_nus_c_evt_type_t; + + +/**@brief Handles on the connected peer device needed to interact with it. +*/ +typedef struct { + uint16_t nus_rx_handle; /**< Handle of the NUS RX characteristic as provided by a discovery. */ + uint16_t nus_rx_cccd_handle; /**< Handle of the CCCD of the NUS RX characteristic as provided by a discovery. */ + uint16_t nus_tx_handle; /**< Handle of the NUS TX characteristic as provided by a discovery. */ +} ble_nus_c_handles_t; + + +/**@brief Structure containing the NUS event data received from the peer. */ +typedef struct { + ble_nus_c_evt_type_t evt_type; + uint16_t conn_handle; + uint8_t * p_data; + uint8_t data_len; + ble_nus_c_handles_t handles; /**< Handles on which the Nordic Uart service characteristics was discovered on the peer device. This will be filled if the evt_type is @ref BLE_NUS_C_EVT_DISCOVERY_COMPLETE.*/ +} ble_nus_c_evt_t; + + +// Forward declaration of the ble_nus_t type. +typedef struct ble_nus_c_s ble_nus_c_t; + +/**@brief Event handler type. + * + * @details This is the type of the event handler that should be provided by the application + * of this module to receive events. + */ +typedef void (* ble_nus_c_evt_handler_t)(ble_nus_c_t * p_ble_nus_c, const ble_nus_c_evt_t * p_evt); + + +/**@brief NUS Client structure. + */ +struct ble_nus_c_s +{ + uint8_t uuid_type; /**< UUID type. */ + uint16_t conn_handle; /**< Handle of the current connection. Set with @ref ble_nus_c_handles_assign when connected. */ + ble_nus_c_handles_t handles; /**< Handles on the connected peer device needed to interact with it. */ + ble_nus_c_evt_handler_t evt_handler; /**< Application event handler to be called when there is an event related to the NUS. */ +}; + +/**@brief NUS Client initialization structure. + */ +typedef struct { + ble_nus_c_evt_handler_t evt_handler; +} ble_nus_c_init_t; + + +/**@brief Function for initializing the Nordic UART client module. + * + * @details This function registers with the Database Discovery module + * for the NUS. Doing so will make the Database Discovery + * module look for the presence of a NUS instance at the peer when a + * discovery is started. + * + * @param[in] p_ble_nus_c Pointer to the NUS client structure. + * @param[in] p_ble_nus_c_init Pointer to the NUS initialization structure containing the + * initialization information. + * + * @retval NRF_SUCCESS If the module was initialized successfully. Otherwise, an error + * code is returned. This function + * propagates the error code returned by the Database Discovery module API + * @ref ble_db_discovery_evt_register. + */ +uint32_t ble_nus_c_init(ble_nus_c_t * p_ble_nus_c, ble_nus_c_init_t * p_ble_nus_c_init); + + +/**@brief Function for handling events from the database discovery module. + * + * @details This function will handle an event from the database discovery module, and determine + * if it relates to the discovery of NUS at the peer. If so, it will + * call the application's event handler indicating that NUS has been + * discovered at the peer. It also populates the event with the service related + * information before providing it to the application. + * + * @param[in] p_ble_nus_c Pointer to the NUS client structure. + * @param[in] p_evt Pointer to the event received from the database discovery module. + */ + void ble_nus_c_on_db_disc_evt(ble_nus_c_t * p_ble_nus_c, ble_db_discovery_evt_t * p_evt); + + +/**@brief Function for handling BLE events from the SoftDevice. + * + * @details This function handles the BLE events received from the SoftDevice. If a BLE + * event is relevant to the NUS module, it is used to update + * internal variables and, if necessary, send events to the application. + * + * @param[in] p_ble_nus_c Pointer to the NUS client structure. + * @param[in] p_ble_evt Pointer to the BLE event. + */ +void ble_nus_c_on_ble_evt(ble_nus_c_t * p_ble_nus_c, const ble_evt_t * p_ble_evt); + +/**@brief Function for requesting the peer to start sending notification of RX characteristic. + * + * @details This function enables notifications of the NUS RX characteristic at the peer + * by writing to the CCCD of the NUS RX characteristic. + * + * @param p_ble_nus_c Pointer to the NUS client structure. + * + * @retval NRF_SUCCESS If the SoftDevice has been requested to write to the CCCD of the peer. + * Otherwise, an error code is returned. This function propagates the error + * code returned by the SoftDevice API @ref sd_ble_gattc_write. + */ +uint32_t ble_nus_c_rx_notif_enable(ble_nus_c_t * p_ble_nus_c); + +/**@brief Function for sending a string to the server. + * + * @details This function writes the TX characteristic of the server. + * + * @param[in] p_ble_nus_c Pointer to the NUS client structure. + * @param[in] p_string String to be sent. + * @param[in] length Length of the string. + * + * @retval NRF_SUCCESS If the string was sent successfully. Otherwise, an error code is returned. + */ +uint32_t ble_nus_c_string_send(ble_nus_c_t * p_ble_nus_c, uint8_t * p_string, uint16_t length); + + +/**@brief Function for assigning handles to a this instance of nus_c. + * + * @details Call this function when a link has been established with a peer to + * associate this link to this instance of the module. This makes it + * possible to handle several link and associate each link to a particular + * instance of this module. The connection handle and attribute handles will be + * provided from the discovery event @ref BLE_NUS_C_EVT_DISCOVERY_COMPLETE. + * + * @param[in] p_ble_nus_c Pointer to the NUS client structure instance to associate with these + * handles. + * @param[in] conn_handle Connection handle to associated with the given NUS Instance. + * @param[in] p_peer_handles Attribute handles on the NUS server that you want this NUS client to + * interact with. + * + * @retval NRF_SUCCESS If the operation was successful. + * @retval NRF_ERROR_NULL If a p_nus was a NULL pointer. + */ +uint32_t ble_nus_c_handles_assign(ble_nus_c_t * p_ble_nus_c, const uint16_t conn_handle, const ble_nus_c_handles_t * p_peer_handles); + + +#endif // BLE_NUS_C_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs/ble_rscs.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs/ble_rscs.c new file mode 100644 index 0000000000..eac2bf5667 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs/ble_rscs.c @@ -0,0 +1,385 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/* Attention! +* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile +* qualification listings, this section of source code must not be modified. +*/ + +#include "ble_rscs.h" +#include +#include "nordic_common.h" +#include "ble_l2cap.h" +#include "ble_srv_common.h" +#include "app_util.h" + +#define OPCODE_LENGTH 1 /**< Length of opcode inside Running Speed and Cadence Measurement packet. */ +#define HANDLE_LENGTH 2 /**< Length of handle inside Running Speed and Cadence Measurement packet. */ +#define MAX_RSCM_LEN (BLE_L2CAP_MTU_DEF - OPCODE_LENGTH - HANDLE_LENGTH) /**< Maximum size of a transmitted Running Speed and Cadence Measurement. */ + +// Running Speed and Cadence Measurement flag bits +#define RSC_MEAS_FLAG_INSTANT_STRIDE_LEN_PRESENT (0x01 << 0) /**< Instantaneous Stride Length Present flag bit. */ +#define RSC_MEAS_FLAG_TOTAL_DISTANCE_PRESENT (0x01 << 1) /**< Total Distance Present flag bit. */ +#define RSC_MEAS_FLAG_WALKING_OR_RUNNING_BIT (0x01 << 2) /**< Walking or Running Status flag bit. */ + + +/**@brief Function for handling the Connect event. + * + * @param[in] p_rscs Running Speed and Cadence Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_connect(ble_rscs_t * p_rscs, ble_evt_t * p_ble_evt) +{ + p_rscs->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; +} + + +/**@brief Function for handling the Disconnect event. + * + * @param[in] p_rscs Running Speed and Cadence Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_disconnect(ble_rscs_t * p_rscs, ble_evt_t * p_ble_evt) +{ + UNUSED_PARAMETER(p_ble_evt); + p_rscs->conn_handle = BLE_CONN_HANDLE_INVALID; +} + + +/**@brief Function for handling the write events to the RSCS Measurement characteristic. + * + * @param[in] p_rscs Running Speed and Cadence Service structure. + * @param[in] p_evt_write Write event received from the BLE stack. + */ +static void on_meas_cccd_write(ble_rscs_t * p_rscs, ble_gatts_evt_write_t * p_evt_write) +{ + if (p_evt_write->len == 2) + { + // CCCD written, update notification state + if (p_rscs->evt_handler != NULL) + { + ble_rscs_evt_t evt; + + if (ble_srv_is_notification_enabled(p_evt_write->data)) + { + evt.evt_type = BLE_RSCS_EVT_NOTIFICATION_ENABLED; + } + else + { + evt.evt_type = BLE_RSCS_EVT_NOTIFICATION_DISABLED; + } + + p_rscs->evt_handler(p_rscs, &evt); + } + } +} + + +/**@brief Function for handling the Write event. + * + * @param[in] p_rscs Running Speed and Cadence Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_write(ble_rscs_t * p_rscs, ble_evt_t * p_ble_evt) +{ + ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; + + if (p_evt_write->handle == p_rscs->meas_handles.cccd_handle) + { + on_meas_cccd_write(p_rscs, p_evt_write); + } +} + + +void ble_rscs_on_ble_evt(ble_rscs_t * p_rscs, ble_evt_t * p_ble_evt) +{ + if (p_rscs == NULL || p_ble_evt == NULL) + { + return; + } + + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + on_connect(p_rscs, p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + on_disconnect(p_rscs, p_ble_evt); + break; + + case BLE_GATTS_EVT_WRITE: + on_write(p_rscs, p_ble_evt); + break; + + default: + // No implementation needed. + break; + } +} + + +/**@brief Function for encoding a RSCS Measurement. + * + * @param[in] p_rscs Running Speed and Cadence Service structure. + * @param[in] p_rsc_measurement Measurement to be encoded. + * @param[out] p_encoded_buffer Buffer where the encoded data will be written. + * + * @return Size of encoded data. + */ +static uint8_t rsc_measurement_encode(const ble_rscs_t * p_rscs, + const ble_rscs_meas_t * p_rsc_measurement, + uint8_t * p_encoded_buffer) +{ + uint8_t flags = 0; + uint8_t len = 1; + + // Instantaneous speed field + len += uint16_encode(p_rsc_measurement->inst_speed, &p_encoded_buffer[len]); + + // Instantaneous cadence field + p_encoded_buffer[len++] = p_rsc_measurement->inst_cadence; + + // Instantaneous stride length field + if (p_rscs->feature & BLE_RSCS_FEATURE_INSTANT_STRIDE_LEN_BIT) + { + if (p_rsc_measurement->is_inst_stride_len_present) + { + flags |= RSC_MEAS_FLAG_INSTANT_STRIDE_LEN_PRESENT; + len += uint16_encode(p_rsc_measurement->inst_stride_length, + &p_encoded_buffer[len]); + } + } + + // Total distance field + if (p_rscs->feature & BLE_RSCS_FEATURE_TOTAL_DISTANCE_BIT) + { + if (p_rsc_measurement->is_total_distance_present) + { + flags |= RSC_MEAS_FLAG_TOTAL_DISTANCE_PRESENT; + len += uint32_encode(p_rsc_measurement->total_distance, &p_encoded_buffer[len]); + } + } + + // Flags field + if (p_rscs->feature & BLE_RSCS_FEATURE_WALKING_OR_RUNNING_STATUS_BIT) + { + if (p_rsc_measurement->is_running) + { + flags |= RSC_MEAS_FLAG_WALKING_OR_RUNNING_BIT; + } + } + p_encoded_buffer[0] = flags; + + return len; +} + + +/**@brief Function for adding RSC Measurement characteristics. + * + * @param[in] p_rscs Running Speed and Cadence Service structure. + * @param[in] p_rscs_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t rsc_measurement_char_add(ble_rscs_t * p_rscs, const ble_rscs_init_t * p_rscs_init) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_md_t cccd_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + uint8_t encoded_rcm[MAX_RSCM_LEN]; + + memset(&cccd_md, 0, sizeof(cccd_md)); + + BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); + cccd_md.write_perm = p_rscs_init->rsc_meas_attr_md.cccd_write_perm; + cccd_md.vloc = BLE_GATTS_VLOC_STACK; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.notify = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = &cccd_md; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_RSC_MEASUREMENT_CHAR); + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.read_perm = p_rscs_init->rsc_meas_attr_md.read_perm; + attr_md.write_perm = p_rscs_init->rsc_meas_attr_md.write_perm; + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 1; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = rsc_measurement_encode(p_rscs, &p_rscs_init->initial_rcm, encoded_rcm); + attr_char_value.init_offs = 0; + attr_char_value.max_len = MAX_RSCM_LEN; + attr_char_value.p_value = encoded_rcm; + + return sd_ble_gatts_characteristic_add(p_rscs->service_handle, + &char_md, + &attr_char_value, + &p_rscs->meas_handles); +} + + +/**@brief Function for adding RSC Feature characteristics. + * + * @param[in] p_rscs Running Speed and Cadence Service structure. + * @param[in] p_rscs_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t rsc_feature_char_add(ble_rscs_t * p_rscs, const ble_rscs_init_t * p_rscs_init) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + uint16_t init_value_feature; + uint8_t init_value_encoded[2]; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.read = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = NULL; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_RSC_FEATURE_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.read_perm = p_rscs_init->rsc_feature_attr_md.read_perm; + attr_md.write_perm = p_rscs_init->rsc_feature_attr_md.write_perm; + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + init_value_feature = p_rscs_init->feature; + init_value_encoded[0] = init_value_feature & 0xFF; + init_value_encoded[1] = (init_value_feature >> 8) & 0xFF; + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = sizeof (uint16_t); + attr_char_value.init_offs = 0; + attr_char_value.max_len = sizeof (uint16_t); + attr_char_value.p_value = init_value_encoded; + + return sd_ble_gatts_characteristic_add(p_rscs->service_handle, + &char_md, + &attr_char_value, + &p_rscs->feature_handles); +} + + +uint32_t ble_rscs_init(ble_rscs_t * p_rscs, const ble_rscs_init_t * p_rscs_init) +{ + if (p_rscs == NULL || p_rscs_init == NULL) + { + return NRF_ERROR_NULL; + } + + uint32_t err_code; + ble_uuid_t ble_uuid; + + // Initialize service structure + p_rscs->evt_handler = p_rscs_init->evt_handler; + p_rscs->conn_handle = BLE_CONN_HANDLE_INVALID; + p_rscs->feature = p_rscs_init->feature; + + // Add service + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_RUNNING_SPEED_AND_CADENCE); + + err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, + &ble_uuid, + &p_rscs->service_handle); + + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add measurement characteristic + err_code = rsc_measurement_char_add(p_rscs, p_rscs_init); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add feature characteristic + err_code = rsc_feature_char_add(p_rscs, p_rscs_init); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + return NRF_SUCCESS; +} + + +uint32_t ble_rscs_measurement_send(ble_rscs_t * p_rscs, ble_rscs_meas_t * p_measurement) +{ + if (p_rscs == NULL || p_measurement == NULL) + { + return NRF_ERROR_NULL; + } + + uint32_t err_code; + + // Send value if connected and notifying + if (p_rscs->conn_handle != BLE_CONN_HANDLE_INVALID) + { + uint8_t encoded_rsc_meas[MAX_RSCM_LEN]; + uint16_t len; + uint16_t hvx_len; + ble_gatts_hvx_params_t hvx_params; + + len = rsc_measurement_encode(p_rscs, p_measurement, encoded_rsc_meas); + hvx_len = len; + + memset(&hvx_params, 0, sizeof(hvx_params)); + + hvx_params.handle = p_rscs->meas_handles.value_handle; + hvx_params.type = BLE_GATT_HVX_NOTIFICATION; + hvx_params.offset = 0; + hvx_params.p_len = &hvx_len; + hvx_params.p_data = encoded_rsc_meas; + + err_code = sd_ble_gatts_hvx(p_rscs->conn_handle, &hvx_params); + if ((err_code == NRF_SUCCESS) && (hvx_len != len)) + { + err_code = NRF_ERROR_DATA_SIZE; + } + } + else + { + err_code = NRF_ERROR_INVALID_STATE; + } + + return err_code; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs/ble_rscs.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs/ble_rscs.h new file mode 100644 index 0000000000..4c5c2d99e2 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs/ble_rscs.h @@ -0,0 +1,144 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_sdk_srv_rsc Running Speed and Cadence Service + * @{ + * @ingroup ble_sdk_srv + * @brief Running Speed and Cadence Service module. + * + * @details This module implements the Running Speed and Cadence Service. If enabled, notification + * of the Running Speead and Candence Measurement is performed when the application + * calls ble_rscs_measurement_send(). + * + * If an event handler is supplied by the application, the Running Speed and Cadence + * Service will generate Running Speed and Cadence Service events to the application. + * + * @note The application must propagate BLE stack events to the Running Speead and Candence Service + * module by calling ble_rscs_on_ble_evt() from the @ref softdevice_handler function. + * + * @note Attention! + * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile + * qualification listings, this section of source code must not be modified. + */ + +#ifndef BLE_RSCS_H__ +#define BLE_RSCS_H__ + +#include +#include +#include "ble.h" +#include "ble_srv_common.h" + +/**@brief Running Speed and Cadence Service feature bits. */ +#define BLE_RSCS_FEATURE_INSTANT_STRIDE_LEN_BIT (0x01 << 0) /**< Instantaneous Stride Length Measurement Supported bit. */ +#define BLE_RSCS_FEATURE_TOTAL_DISTANCE_BIT (0x01 << 1) /**< Total Distance Measurement Supported bit. */ +#define BLE_RSCS_FEATURE_WALKING_OR_RUNNING_STATUS_BIT (0x01 << 2) /**< Walking or Running Status Supported bit. */ +#define BLE_RSCS_FEATURE_CALIBRATION_PROCEDURE_BIT (0x01 << 3) /**< Calibration Procedure Supported bit. */ +#define BLE_RSCS_FEATURE_MULTIPLE_SENSORS_BIT (0x01 << 4) /**< Multiple Sensor Locations Supported bit. */ + +/**@brief Running Speed and Cadence Service event type. */ +typedef enum +{ + BLE_RSCS_EVT_NOTIFICATION_ENABLED, /**< Running Speed and Cadence value notification enabled event. */ + BLE_RSCS_EVT_NOTIFICATION_DISABLED /**< Running Speed and Cadence value notification disabled event. */ +} ble_rscs_evt_type_t; + +/**@brief Running Speed and Cadence Service event. */ +typedef struct +{ + ble_rscs_evt_type_t evt_type; /**< Type of event. */ +} ble_rscs_evt_t; + +// Forward declaration of the ble_rsc types. +typedef struct ble_rscs_s ble_rscs_t; +typedef struct ble_rscs_meas_s ble_rscs_meas_t; + +/**@brief Running Speed and Cadence Service event handler type. */ +typedef void (*ble_rscs_evt_handler_t) (ble_rscs_t * p_rscs, ble_rscs_evt_t * p_evt); + +/**@brief Running Speed and Cadence Service measurement structure. This contains a Running Speed and + * Cadence measurement. */ +struct ble_rscs_meas_s +{ + bool is_inst_stride_len_present; /**< True if Instantaneous Stride Length is present in the measurement. */ + bool is_total_distance_present; /**< True if Total Distance is present in the measurement. */ + bool is_running; /**< True if running, False if walking. */ + uint16_t inst_speed; /**< Instantaneous Speed. */ + uint8_t inst_cadence; /**< Instantaneous Cadence. */ + uint16_t inst_stride_length; /**< Instantaneous Stride Length. */ + uint32_t total_distance; /**< Total Distance. */ +}; + +/**@brief Running Speed and Cadence Service init structure. This contains all options and data + * needed for initialization of the service. */ +typedef struct +{ + ble_rscs_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Running Speed and Cadence Service. */ + ble_srv_cccd_security_mode_t rsc_meas_attr_md; /**< Initial security level for running speed and cadence measurement attribute */ + ble_srv_security_mode_t rsc_feature_attr_md; /**< Initial security level for feature attribute */ + uint16_t feature; /**< Initial value for features of sensor. */ + ble_rscs_meas_t initial_rcm; /**< Initial Running Speed Cadence Measurement.*/ +} ble_rscs_init_t; + +/**@brief Running Speed and Cadence Service structure. This contains various status information for + * the service. */ +struct ble_rscs_s +{ + ble_rscs_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Running Speed and Cadence Service. */ + uint16_t service_handle; /**< Handle of Running Speed and Cadence Service (as provided by the BLE stack). */ + ble_gatts_char_handles_t meas_handles; /**< Handles related to the Running Speed and Cadence Measurement characteristic. */ + ble_gatts_char_handles_t feature_handles; /**< Handles related to the Running Speed and Cadence feature characteristic. */ + uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ + uint16_t feature; /**< Bit mask of features available on sensor. */ +}; + + + +/**@brief Function for initializing the Running Speed and Cadence Service. + * + * @param[out] p_rscs Running Speed and Cadence Service structure. This structure will have to + * be supplied by the application. It will be initialized by this function, + * and will later be used to identify this particular service instance. + * @param[in] p_rscs_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. + */ +uint32_t ble_rscs_init(ble_rscs_t * p_rscs, const ble_rscs_init_t * p_rscs_init); + +/**@brief Function for handling the Application's BLE Stack events. + * + * @details Handles all events from the BLE stack of interest to the Running Speed and Cadence + * Service. + * + * @param[in] p_rscs Running Speed and Cadence Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +void ble_rscs_on_ble_evt(ble_rscs_t * p_rscs, ble_evt_t * p_ble_evt); + +/**@brief Function for sending running speed and cadence measurement if notification has been enabled. + * + * @details The application calls this function after having performed a Running Speed and Cadence + * measurement. If notification has been enabled, the measurement data is encoded and sent + * to the client. + * + * @param[in] p_rscs Running Speed and Cadence Service structure. + * @param[in] p_measurement Pointer to new running speed and cadence measurement. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +uint32_t ble_rscs_measurement_send(ble_rscs_t * p_rscs, ble_rscs_meas_t * p_measurement); + +#endif // BLE_RSCS_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs_c/ble_rscs_c.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs_c/ble_rscs_c.c new file mode 100644 index 0000000000..c3ac834917 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs_c/ble_rscs_c.c @@ -0,0 +1,360 @@ +/* + * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is confidential property of Nordic Semiconductor. The use, + * copying, transfer or disclosure of such information is prohibited except by express written + * agreement with Nordic Semiconductor. + * + */ + +/**@cond To Make Doxygen skip documentation generation for this file. + * @{ + */ + +#include "ble_rscs_c.h" +#include "ble_db_discovery.h" +#include "ble_types.h" +#include "ble_srv_common.h" +#include "ble_gattc.h" +#include "app_trace.h" +#include "sdk_common.h" +#include "nrf_log.h" + +#define LOG NRF_LOG_PRINTF /**< Debug logger macro that will be used in this file to do logging of important information over UART or RTT. */ + +#define TX_BUFFER_MASK 0x07 /**< TX Buffer mask, must be a mask of continuous zeroes, followed by continuous sequence of ones: 000...111. */ +#define TX_BUFFER_SIZE (TX_BUFFER_MASK + 1) /**< Size of send buffer, which is 1 higher than the mask. */ + +#define WRITE_MESSAGE_LENGTH BLE_CCCD_VALUE_LEN /**< Length of the write message for CCCD. */ + +typedef enum +{ + READ_REQ, /**< Type identifying that this tx_message is a read request. */ + WRITE_REQ /**< Type identifying that this tx_message is a write request. */ +} tx_request_t; + +/**@brief Structure for writing a message to the peer, i.e. CCCD. + */ +typedef struct +{ + uint8_t gattc_value[WRITE_MESSAGE_LENGTH]; /**< The message to write. */ + ble_gattc_write_params_t gattc_params; /**< GATTC parameters for this message. */ +} write_params_t; + +/**@brief Structure for holding data to be transmitted to the connected central. + */ +typedef struct +{ + uint16_t conn_handle; /**< Connection handle to be used when transmitting this message. */ + tx_request_t type; /**< Type of this message, i.e. read or write message. */ + union + { + uint16_t read_handle; /**< Read request message. */ + write_params_t write_req; /**< Write request message. */ + } req; +} tx_message_t; + + +static tx_message_t m_tx_buffer[TX_BUFFER_SIZE]; /**< Transmit buffer for messages to be transmitted to the central. */ +static uint32_t m_tx_insert_index = 0; /**< Current index in the transmit buffer where the next message should be inserted. */ +static uint32_t m_tx_index = 0; /**< Current index in the transmit buffer from where the next message to be transmitted resides. */ + + +/**@brief Function for passing any pending request from the buffer to the stack. + */ +static void tx_buffer_process(void) +{ + if (m_tx_index != m_tx_insert_index) + { + uint32_t err_code; + + if (m_tx_buffer[m_tx_index].type == READ_REQ) + { + err_code = sd_ble_gattc_read(m_tx_buffer[m_tx_index].conn_handle, + m_tx_buffer[m_tx_index].req.read_handle, + 0); + } + else + { + err_code = sd_ble_gattc_write(m_tx_buffer[m_tx_index].conn_handle, + &m_tx_buffer[m_tx_index].req.write_req.gattc_params); + } + if (err_code == NRF_SUCCESS) + { + LOG("[RSCS_C]: SD Read/Write API returns Success.\r\n"); + m_tx_index++; + m_tx_index &= TX_BUFFER_MASK; + } + else + { + LOG("[RSCS_C]: SD Read/Write API returns error. This message sending will be " + "attempted again..\r\n"); + } + } +} + + +/**@brief Function for handling write response events. + * + * @param[in] p_ble_rscs_c Pointer to the Running Speed and Cadence Client structure. + * @param[in] p_ble_evt Pointer to the BLE event received. + */ +static void on_write_rsp(ble_rscs_c_t * p_ble_rscs_c, const ble_evt_t * p_ble_evt) +{ + // Check if the event if on the link for this instance + if (p_ble_rscs_c->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) + { + return; + } + // Check if there is any message to be sent across to the peer and send it. + tx_buffer_process(); +} + + +/**@brief Function for handling Handle Value Notification received from the SoftDevice. + * + * @details This function will uses the Handle Value Notification received from the SoftDevice + * and checks if it is a notification of the Running Speed and Cadence measurement from + * the peer. If it is, this function will decode the Running Speed measurement and send it + * to the application. + * + * @param[in] p_ble_rscs_c Pointer to the Running Speed and Cadence Client structure. + * @param[in] p_ble_evt Pointer to the BLE event received. + */ +static void on_hvx(ble_rscs_c_t * p_ble_rscs_c, const ble_evt_t * p_ble_evt) +{ + const ble_gattc_evt_hvx_t * p_notif = &p_ble_evt->evt.gattc_evt.params.hvx; + + // Check if the event if on the link for this instance + if (p_ble_rscs_c->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) + { + return; + } + + // Check if this is a Running Speed and Cadence notification. + if (p_ble_evt->evt.gattc_evt.params.hvx.handle == p_ble_rscs_c->peer_db.rsc_handle) + { + uint32_t index = 0; + ble_rscs_c_evt_t ble_rscs_c_evt; + ble_rscs_c_evt.evt_type = BLE_RSCS_C_EVT_RSC_NOTIFICATION; + ble_rscs_c_evt.conn_handle = p_ble_evt->evt.gattc_evt.conn_handle; + + //lint -save -e415 -e416 -e662 "Access of out of bounds pointer" "Creation of out of bounds pointer" + + // Flags field + ble_rscs_c_evt.params.rsc.is_inst_stride_len_present = p_notif->data[index] >> BLE_RSCS_INSTANT_STRIDE_LEN_PRESENT & 0x01; + ble_rscs_c_evt.params.rsc.is_total_distance_present = p_notif->data[index] >> BLE_RSCS_TOTAL_DISTANCE_PRESENT & 0x01; + ble_rscs_c_evt.params.rsc.is_running = p_notif->data[index] >> BLE_RSCS_WALKING_OR_RUNNING_STATUS_BIT & 0x01; + index++; + + // Instantaneous Speed + ble_rscs_c_evt.params.rsc.inst_speed = uint16_decode(&p_notif->data[index]); + index += sizeof(uint16_t); + + // Instantaneous Cadence + ble_rscs_c_evt.params.rsc.inst_cadence = p_notif->data[index]; + index++; + + // Instantaneous Stride Length + if (ble_rscs_c_evt.params.rsc.is_inst_stride_len_present == true) + { + ble_rscs_c_evt.params.rsc.inst_stride_length = uint16_decode(&p_notif->data[index]); + index += sizeof(uint16_t); + } + + // Total distance field + if (ble_rscs_c_evt.params.rsc.is_total_distance_present == true) + { + ble_rscs_c_evt.params.rsc.total_distance = uint32_decode(&p_notif->data[index]); + //index += sizeof(uint32_t); + } + + p_ble_rscs_c->evt_handler(p_ble_rscs_c, &ble_rscs_c_evt); + + //lint -restore + } +} + + +/**@brief Function for handling events from the database discovery module. + * + * @details This function will handle an event from the database discovery module, and determine + * if it relates to the discovery of heart rate service at the peer. If so, it will + * call the application's event handler indicating that the Running Speed and Cadence + * service has been discovered at the peer. It also populates the event with the service + * related information before providing it to the application. + * + * @param[in] p_evt Pointer to the event received from the database discovery module. + * + */ +void ble_rscs_on_db_disc_evt(ble_rscs_c_t * p_ble_rscs_c, const ble_db_discovery_evt_t * p_evt) +{ + // Check if the Heart Rate Service was discovered. + if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE && + p_evt->params.discovered_db.srv_uuid.uuid == BLE_UUID_RUNNING_SPEED_AND_CADENCE && + p_evt->params.discovered_db.srv_uuid.type == BLE_UUID_TYPE_BLE) + { + + ble_rscs_c_evt_t evt; + evt.conn_handle = p_evt->conn_handle; + + // Find the CCCD Handle of the Running Speed and Cadence characteristic. + uint32_t i; + + for (i = 0; i < p_evt->params.discovered_db.char_count; i++) + { + if (p_evt->params.discovered_db.charateristics[i].characteristic.uuid.uuid == + BLE_UUID_RSC_MEASUREMENT_CHAR) + { + // Found Running Speed and Cadence characteristic. Store CCCD handle and break. + evt.params.rscs_db.rsc_cccd_handle = + p_evt->params.discovered_db.charateristics[i].cccd_handle; + evt.params.rscs_db.rsc_handle = + p_evt->params.discovered_db.charateristics[i].characteristic.handle_value; + break; + } + } + + LOG("[rscs_c]: Running Speed and Cadence Service discovered at peer.\r\n"); + + //If the instance has been assigned prior to db_discovery, assign the db_handles + if(p_ble_rscs_c->conn_handle != BLE_CONN_HANDLE_INVALID) + { + if ((p_ble_rscs_c->peer_db.rsc_cccd_handle == BLE_GATT_HANDLE_INVALID)&& + (p_ble_rscs_c->peer_db.rsc_handle == BLE_GATT_HANDLE_INVALID)) + { + p_ble_rscs_c->peer_db = evt.params.rscs_db; + } + } + + evt.evt_type = BLE_RSCS_C_EVT_DISCOVERY_COMPLETE; + + p_ble_rscs_c->evt_handler(p_ble_rscs_c, &evt); + } +} + + +uint32_t ble_rscs_c_init(ble_rscs_c_t * p_ble_rscs_c, ble_rscs_c_init_t * p_ble_rscs_c_init) +{ + VERIFY_PARAM_NOT_NULL(p_ble_rscs_c); + VERIFY_PARAM_NOT_NULL(p_ble_rscs_c_init); + + ble_uuid_t rscs_uuid; + + rscs_uuid.type = BLE_UUID_TYPE_BLE; + rscs_uuid.uuid = BLE_UUID_RUNNING_SPEED_AND_CADENCE; + + p_ble_rscs_c->evt_handler = p_ble_rscs_c_init->evt_handler; + p_ble_rscs_c->conn_handle = BLE_CONN_HANDLE_INVALID; + p_ble_rscs_c->peer_db.rsc_cccd_handle = BLE_GATT_HANDLE_INVALID; + p_ble_rscs_c->peer_db.rsc_handle = BLE_GATT_HANDLE_INVALID; + + return ble_db_discovery_evt_register(&rscs_uuid); +} + + +uint32_t ble_rscs_c_handles_assign(ble_rscs_c_t * p_ble_rscs_c, + uint16_t conn_handle, + ble_rscs_c_db_t * p_peer_handles) +{ + VERIFY_PARAM_NOT_NULL(p_ble_rscs_c); + p_ble_rscs_c->conn_handle = conn_handle; + if (p_peer_handles != NULL) + { + p_ble_rscs_c->peer_db = *p_peer_handles; + } + + return NRF_SUCCESS; +} + + +/**@brief Function for handling Disconnected event received from the SoftDevice. + * + * @details This function check if the disconnect event is happening on the link + * associated with the current instance of the module, if so it will set its + * conn_handle to invalid. + * + * @param[in] p_ble_rscs_c Pointer to the RSC Client structure. + * @param[in] p_ble_evt Pointer to the BLE event received. + */ +static void on_disconnected(ble_rscs_c_t * p_ble_rscs_c, const ble_evt_t * p_ble_evt) +{ + if (p_ble_rscs_c->conn_handle == p_ble_evt->evt.gap_evt.conn_handle) + { + p_ble_rscs_c->conn_handle = BLE_CONN_HANDLE_INVALID; + p_ble_rscs_c->peer_db.rsc_cccd_handle = BLE_GATT_HANDLE_INVALID; + p_ble_rscs_c->peer_db.rsc_handle = BLE_GATT_HANDLE_INVALID; + } +} + + +void ble_rscs_c_on_ble_evt(ble_rscs_c_t * p_ble_rscs_c, const ble_evt_t * p_ble_evt) +{ + if ((p_ble_rscs_c == NULL) || (p_ble_evt == NULL)) + { + return; + } + + switch (p_ble_evt->header.evt_id) + { + case BLE_GATTC_EVT_HVX: + on_hvx(p_ble_rscs_c, p_ble_evt); + break; + + case BLE_GATTC_EVT_WRITE_RSP: + on_write_rsp(p_ble_rscs_c, p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + on_disconnected(p_ble_rscs_c, p_ble_evt); + break; + + default: + break; + } +} + + +/**@brief Function for creating a message for writing to the CCCD. + */ +static uint32_t cccd_configure(uint16_t conn_handle, uint16_t handle_cccd, bool enable) +{ + LOG("[rscs_c]: Configuring CCCD. CCCD Handle = %d, Connection Handle = %d\r\n", + handle_cccd, conn_handle); + + tx_message_t * p_msg; + uint16_t cccd_val = enable ? BLE_GATT_HVX_NOTIFICATION : 0; + + p_msg = &m_tx_buffer[m_tx_insert_index++]; + m_tx_insert_index &= TX_BUFFER_MASK; + + p_msg->req.write_req.gattc_params.handle = handle_cccd; + p_msg->req.write_req.gattc_params.len = WRITE_MESSAGE_LENGTH; + p_msg->req.write_req.gattc_params.p_value = p_msg->req.write_req.gattc_value; + p_msg->req.write_req.gattc_params.offset = 0; + p_msg->req.write_req.gattc_params.write_op = BLE_GATT_OP_WRITE_REQ; + p_msg->req.write_req.gattc_value[0] = LSB_16(cccd_val); + p_msg->req.write_req.gattc_value[1] = MSB_16(cccd_val); + p_msg->conn_handle = conn_handle; + p_msg->type = WRITE_REQ; + + tx_buffer_process(); + return NRF_SUCCESS; +} + + +uint32_t ble_rscs_c_rsc_notif_enable(ble_rscs_c_t * p_ble_rscs_c) +{ + VERIFY_PARAM_NOT_NULL(p_ble_rscs_c); + + if (p_ble_rscs_c->conn_handle == BLE_CONN_HANDLE_INVALID) + { + return NRF_ERROR_INVALID_STATE; + } + + return cccd_configure(p_ble_rscs_c->conn_handle, p_ble_rscs_c->peer_db.rsc_cccd_handle, true); +} + +/** @} + * @endcond + */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs_c/ble_rscs_c.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs_c/ble_rscs_c.h new file mode 100644 index 0000000000..27aa5e422c --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs_c/ble_rscs_c.h @@ -0,0 +1,149 @@ +#ifndef BLE_RSCS_C_H__ +#define BLE_RSCS_C_H__ + +#include +#include +#include "ble.h" +#include "ble_db_discovery.h" + +/** + * @defgroup ble_sdk_srv_rscs_c Running Speed and Cadence Service Client + * @{ + * @ingroup ble_sdk_srv + * + * @details This module contains the APIs and types exposed by the Running Speed and Cadence + * Service Client module. These APIs and types can be used by the application to perform + * discovery of Running Speed and Cadence Service at the peer and interact with it. + * + * @note The application must propagate BLE stack events to this module by calling + * ble_rscs_c_on_ble_evt(). + */ + + +/**@brief Structure containing the handles related to the Running Speed and Cadence Service found on the peer. */ +typedef struct +{ + uint16_t rsc_cccd_handle; /**< Handle of the CCCD of the Running Speed and Cadence characteristic. */ + uint16_t rsc_handle; /**< Handle of the Running Speed and Cadence characteristic as provided by the SoftDevice. */ +} ble_rscs_c_db_t; + +/**@brief RSCS Client event type. */ +typedef enum +{ + BLE_RSCS_C_EVT_DISCOVERY_COMPLETE = 1, /**< Event indicating that the Running Speed and Cadence Service has been discovered at the peer. */ + BLE_RSCS_C_EVT_RSC_NOTIFICATION /**< Event indicating that a notification of the Running Speed and Cadence measurement characteristic has been received from the peer. */ +} ble_rscs_c_evt_type_t; + +#define BLE_RSCS_INSTANT_STRIDE_LEN_PRESENT 0x00 /**< Instantaneous Stride Length Measurement Supported bit. */ +#define BLE_RSCS_TOTAL_DISTANCE_PRESENT 0x01 /**< Total Distance Measurement Supported bit. */ +#define BLE_RSCS_WALKING_OR_RUNNING_STATUS_BIT 0x02 /**< Walking or Running Status Supported bit. */ + +/**@brief Structure containing the Running Speed and Cadence measurement received from the peer. */ +typedef struct +{ + bool is_inst_stride_len_present; /**< True if Instantaneous Stride Length is present in the measurement. */ + bool is_total_distance_present; /**< True if Total Distance is present in the measurement. */ + bool is_running; /**< True if running, False if walking. */ + uint16_t inst_speed; /**< Instantaneous Speed. */ + uint8_t inst_cadence; /**< Instantaneous Cadence. */ + uint16_t inst_stride_length; /**< Instantaneous Stride Length. */ + uint32_t total_distance; /**< Total Distance. */ +} ble_rsc_t; + +/**@brief Running Speed and Cadence Event structure. */ +typedef struct +{ + ble_rscs_c_evt_type_t evt_type; /**< Type of the event. */ + uint16_t conn_handle; /**< Connection handle on which the rscs_c event occured.*/ + union + { + ble_rscs_c_db_t rscs_db; /**< Running Speed and Cadence Service related handles found on the peer device. This will be filled if the evt_type is @ref BLE_RSCS_C_EVT_DISCOVERY_COMPLETE.*/ + ble_rsc_t rsc; /**< Running Speed and Cadence measurement received. This will be filled if the evt_type is @ref BLE_RSCS_C_EVT_RSC_NOTIFICATION. */ + } params; +} ble_rscs_c_evt_t; + +// Forward declaration of the ble_rscs_c_t type. +typedef struct ble_rscs_c_s ble_rscs_c_t; + + +/**@brief Event handler type. + * + * @details This is the type of the event handler that should be provided by the application + * of this module in order to receive events. + */ +typedef void (* ble_rscs_c_evt_handler_t) (ble_rscs_c_t * p_ble_rscs_c, ble_rscs_c_evt_t * p_evt); + +/**@brief Running Speed and Cadence client structure. + */ +struct ble_rscs_c_s +{ + uint16_t conn_handle; /**< Connection handle as provided by the SoftDevice. */ + ble_rscs_c_db_t peer_db; /**< Handles related to RSCS on the peer*/ + ble_rscs_c_evt_handler_t evt_handler; /**< Application event handler to be called when there is an event related to the Running Speed and Cadence service. */ +}; + +/**@brief Running Speed and Cadence client initialization structure. + */ +typedef struct +{ + ble_rscs_c_evt_handler_t evt_handler; /**< Event handler to be called by the Running Speed and Cadence Client module whenever there is an event related to the Running Speed and Cadence Service. */ +} ble_rscs_c_init_t; + + +/**@brief Function for initializing the Running Speed and Cadence Service Client module. + * + * @details This function will initialize the module and set up Database Discovery to discover + * the Running Speed and Cadence Service. After calling this function, call @ref ble_db_discovery_start + * to start discovery once a link with a peer has been established. + * + * @param[out] p_ble_rscs_c Pointer to the RSC Service client structure. + * @param[in] p_ble_rscs_c_init Pointer to the RSC Service initialization structure containing + * the initialization information. + * + * @retval NRF_SUCCESS Operation success. + * @retval NRF_ERROR_NULL A parameter is NULL. + * Otherwise, an error code returned by @ref ble_db_discovery_evt_register. + */ +uint32_t ble_rscs_c_init(ble_rscs_c_t * p_ble_rscs_c, ble_rscs_c_init_t * p_ble_rscs_c_init); + +void ble_rscs_c_on_ble_evt(ble_rscs_c_t * p_ble_rscs_c, const ble_evt_t * p_ble_evt); + +uint32_t ble_rscs_c_rsc_notif_enable(ble_rscs_c_t * p_ble_rscs_c); + + +/**@brief Function for handling events from the database discovery module. + * + * @details Call this function when getting a callback event from the DB discovery modue. + * This function will handle an event from the database discovery module, and determine + * if it relates to the discovery of Running Speed and Cadence service at the peer. If so, it will + * call the application's event handler indicating that the RSC service has been + * discovered at the peer. It also populates the event with the service related + * information before providing it to the application. + * + * @param p_ble_rscs_c Pointer to the Runnind Speed and Cadence Service client structure. + * @param[in] p_evt Pointer to the event received from the database discovery module. + * + */ +void ble_rscs_on_db_disc_evt(ble_rscs_c_t * p_ble_rscs_c, const ble_db_discovery_evt_t * p_evt); + + +/**@brief Function for assigning handles to a this instance of rscs_c. + * + * @details Call this function when a link has been established with a peer to + * associate this link to this instance of the module. This makes it + * possible to handle several link and associate each link to a particular + * instance of this module. The connection handle and attribute handles will be + * provided from the discovery event @ref BLE_RSCS_C_EVT_DISCOVERY_COMPLETE. + * + * @param[in] p_ble_rscs_c Pointer to the RSC client structure instance to associate. + * @param[in] conn_handle Connection handle to associated with the given RSCS Client Instance. + * @param[in] p_peer_handles Attribute handles on the RSCS server that you want this RSCS client to + * interact with. + */ +uint32_t ble_rscs_c_handles_assign(ble_rscs_c_t * p_ble_rscs_c, + uint16_t conn_handle, + ble_rscs_c_db_t * p_peer_handles); + +#endif // BLE_RSCS_C_H__ + +/** @} */ // End tag for the file. diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_tps/ble_tps.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_tps/ble_tps.c new file mode 100644 index 0000000000..8b2c0c2075 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_tps/ble_tps.c @@ -0,0 +1,139 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/* Attention! +* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile +* qualification listings, this section of source code must not be modified. +*/ + +#include "ble_tps.h" +#include +#include "ble_srv_common.h" + + +/**@brief Function for handling the Connect event. + * + * @param[in] p_tps TX Power Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_connect(ble_tps_t * p_tps, ble_evt_t * p_ble_evt) +{ + p_tps->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; +} + + +void ble_tps_on_ble_evt(ble_tps_t * p_tps, ble_evt_t * p_ble_evt) +{ + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + on_connect(p_tps, p_ble_evt); + break; + + default: + // No implementation needed. + break; + } +} + + +/**@brief Function for adding TX Power Level characteristics. + * + * @param[in] p_tps TX Power Service structure. + * @param[in] p_tps_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static uint32_t tx_power_level_char_add(ble_tps_t * p_tps, + const ble_tps_init_t * p_tps_init) +{ + ble_gatts_char_md_t char_md; + ble_gatts_attr_t attr_char_value; + ble_uuid_t ble_uuid; + ble_gatts_attr_md_t attr_md; + + memset(&char_md, 0, sizeof(char_md)); + + char_md.char_props.read = 1; + char_md.p_char_user_desc = NULL; + char_md.p_char_pf = NULL; + char_md.p_user_desc_md = NULL; + char_md.p_cccd_md = NULL; + char_md.p_sccd_md = NULL; + + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_TX_POWER_LEVEL_CHAR); + + memset(&attr_md, 0, sizeof(attr_md)); + + attr_md.read_perm = p_tps_init->tps_attr_md.read_perm; + attr_md.write_perm = p_tps_init->tps_attr_md.write_perm; + attr_md.vloc = BLE_GATTS_VLOC_STACK; + attr_md.rd_auth = 0; + attr_md.wr_auth = 0; + attr_md.vlen = 0; + + memset(&attr_char_value, 0, sizeof(attr_char_value)); + + memset(&attr_char_value, 0, sizeof (attr_char_value)); + + attr_char_value.p_uuid = &ble_uuid; + attr_char_value.p_attr_md = &attr_md; + attr_char_value.init_len = sizeof (int8_t); + attr_char_value.init_offs = 0; + attr_char_value.max_len = sizeof (uint8_t); + attr_char_value.p_value = (uint8_t*)&p_tps_init->initial_tx_power_level; + + return sd_ble_gatts_characteristic_add(p_tps->service_handle, + &char_md, + &attr_char_value, + &p_tps->tx_power_level_handles); +} + + +uint32_t ble_tps_init(ble_tps_t * p_tps, const ble_tps_init_t * p_tps_init) +{ + uint32_t err_code; + ble_uuid_t ble_uuid; + + // Add service + BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_TX_POWER_SERVICE); + + err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, + &ble_uuid, + &p_tps->service_handle); + + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Add TX Power Level characteristic + return tx_power_level_char_add(p_tps, p_tps_init); +} + + +uint32_t ble_tps_tx_power_level_set(ble_tps_t * p_tps, int8_t tx_power_level) +{ + ble_gatts_value_t gatts_value; + + // Initialize value struct. + memset(&gatts_value, 0, sizeof(gatts_value)); + + gatts_value.len = sizeof(uint8_t); + gatts_value.offset = 0; + gatts_value.p_value = (uint8_t*)&tx_power_level; + + // Update database + return sd_ble_gatts_value_set(p_tps->conn_handle, + p_tps->tx_power_level_handles.value_handle, + &gatts_value); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_tps/ble_tps.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_tps/ble_tps.h new file mode 100644 index 0000000000..f0b445496f --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_tps/ble_tps.h @@ -0,0 +1,86 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_sdk_srv_tps TX Power Service + * @{ + * @ingroup ble_sdk_srv + * @brief TX Power Service module. + * + * @details This module implements the TX Power Service with the TX Power Level characteristic. + * During initialization it adds the TX Power Service and TX Power Level characteristic + * with the specified initial value to the BLE stack database. + * + * It provides a function for letting the application update the TX Power Level + * characteristic. + * + * @note Attention! + * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile + * qualification listings, this section of source code must not be modified. + */ + +#ifndef BLE_TPS_H__ +#define BLE_TPS_H__ + +#include +#include "ble.h" +#include "ble_srv_common.h" + +/**@brief TX Power Service init structure. This contains all options and data needed for + * initialization of the service. */ +typedef struct +{ + int8_t initial_tx_power_level; /**< Initial value of the TX Power Level characteristic (in dBm). */ + ble_srv_security_mode_t tps_attr_md; /**< Initial Security Setting for TX Power Service Characteristics. */ +} ble_tps_init_t; + +/**@brief TX Power Service structure. This contains various status information for the service. */ +typedef struct +{ + uint16_t service_handle; /**< Handle of TX Power Service (as provided by the BLE stack). */ + ble_gatts_char_handles_t tx_power_level_handles; /**< Handles related to the TX Power Level characteristic. */ + uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ +} ble_tps_t; + +/**@brief Function for initializing the TX Power Service. + * + * @param[out] p_hrs TX Power Service structure. This structure will have to be supplied by + * the application. It will be initialized by this function, and will later + * be used to identify this particular service instance. + * @param[in] p_tps_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. + */ +uint32_t ble_tps_init(ble_tps_t * p_hrs, const ble_tps_init_t * p_tps_init); + +/**@brief Function for handling the Application's BLE Stack events. + * + * @details Handles all events from the BLE stack of interest to the TX Power Service. + * + * @param[in] p_tps TX Power Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +void ble_tps_on_ble_evt(ble_tps_t * p_tps, ble_evt_t * p_ble_evt); + +/**@brief Function for setting the state of the Sensor Contact Detected bit. + * + * @param[in] p_tps TX Power Service structure. + * @param[in] tx_power_level New TX Power Level (unit dBm, range -100 to 20). + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +uint32_t ble_tps_tx_power_level_set(ble_tps_t * p_tps, int8_t tx_power_level); + +#endif // BLE_TPS_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_common.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_common.h new file mode 100644 index 0000000000..79729d5693 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_common.h @@ -0,0 +1,58 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_sdk_srv_ln_common Location and Navigation common defines + * @{ + * @ingroup ble_sdk_srv + * @brief Location and Navigation common defines + * + * @details This module contains define values common to LNS and LNCP + */ + +#ifndef BLE_LNS_COMMON_H__ +#define BLE_LNS_COMMON_H__ + +#define BLE_LNS_INVALID_ROUTE 0xFFFF +#define BLE_LNS_NO_FIX 0xFF + +#define BLE_LNS_MAX_NUM_ROUTES 10 /**< The maximum number of routes. This affects memory usage only. */ +#define BLE_LNS_MAX_ROUTE_NAME_LEN (BLE_L2CAP_MTU_DEF-5) /**< The maximum length of length of a route name. */ +#define MAX_CTRL_POINT_RESP_PARAM_LEN BLE_LNS_MAX_ROUTE_NAME_LEN + 3 /**< Maximum length of a control point response. */ + +// Location and Navigation Service feature bits +#define BLE_LNS_FEATURE_INSTANT_SPEED_SUPPORTED (0x01 << 0) /**< Instaneous Speed Supported bit. */ +#define BLE_LNS_FEATURE_TOTAL_DISTANCE_SUPPORTED (0x01 << 1) /**< Total Distance Supported bit. */ +#define BLE_LNS_FEATURE_LOCATION_SUPPORTED (0x01 << 2) /**< Location Supported bit. */ +#define BLE_LNS_FEATURE_ELEVATION_SUPPORTED (0x01 << 3) /**< Elevation Supported bit. */ +#define BLE_LNS_FEATURE_HEADING_SUPPORTED (0x01 << 4) /**< Heading Supported bit. */ +#define BLE_LNS_FEATURE_ROLLING_TIME_SUPPORTED (0x01 << 5) /**< Rolling Time Supported bit. */ +#define BLE_LNS_FEATURE_UTC_TIME_SUPPORTED (0x01 << 6) /**< UTC Time Supported bit. */ +#define BLE_LNS_FEATURE_REMAINING_DISTANCE_SUPPORTED (0x01 << 7) /**< Remaining Distance Supported bit. */ +#define BLE_LNS_FEATURE_REMAINING_VERT_DISTANCE_SUPPORTED (0x01 << 8) /**< Remaining Vertical Distance Supported bit. */ +#define BLE_LNS_FEATURE_EST_TIME_OF_ARRIVAL_SUPPORTED (0x01 << 9) /**< Estimated Time of Arrival Supported bit. */ +#define BLE_LNS_FEATURE_NUM_SATS_IN_SOLUTION_SUPPORTED (0x01 << 10) /**< Number of Satellites in Solution Supported bit. */ +#define BLE_LNS_FEATURE_NUM_SATS_IN_VIEW_SUPPORTED (0x01 << 11) /**< Number of Satellites in View Supported bit. */ +#define BLE_LNS_FEATURE_TIME_TO_FIRST_FIX_SUPPORTED (0x01 << 12) /**< Time to First Fix Supported bit. */ +#define BLE_LNS_FEATURE_EST_HORZ_POS_ERROR_SUPPORTED (0x01 << 13) /**< Estimated Horizontal Position Error Supported bit. */ +#define BLE_LNS_FEATURE_EST_VERT_POS_ERROR_SUPPORTED (0x01 << 14) /**< Estimated Vertical Position Error Supported bit. */ +#define BLE_LNS_FEATURE_HORZ_DILUTION_OF_PRECISION_SUPPORTED (0x01 << 15) /**< Horizontal Dilution of Precision Supported bit. */ +#define BLE_LNS_FEATURE_VERT_DILUTION_OF_PRECISION_SUPPORTED (0x01 << 16) /**< Vertical Dilution of Precision Supported bit. */ +#define BLE_LNS_FEATURE_LOC_AND_SPEED_CONTENT_MASKING_SUPPORTED (0x01 << 17) /**< Location and Speed Characteristic Content Masking Supported bit. */ +#define BLE_LNS_FEATURE_FIX_RATE_SETTING_SUPPORTED (0x01 << 18) /**< Fix Rate Setting Supported bit. */ +#define BLE_LNS_FEATURE_ELEVATION_SETTING_SUPPORTED (0x01 << 19) /**< Elevation Setting Supported bit. */ +#define BLE_LNS_FEATURE_POSITION_STATUS_SUPPORTED (0x01 << 20) /**< Position Status Supported bit. */ + +#endif /* BLE_LNS_COMMON_H__ */ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_cp.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_cp.c new file mode 100644 index 0000000000..c927cead19 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_cp.c @@ -0,0 +1,806 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "ble_ln_cp.h" +#include "ble_ln_db.h" +#include "ble_ln_common.h" +#include "sdk_common.h" + +#if 0 +/** + * @defgroup lncp_log Module's log macros + * + * @note LNCP_LOG will only log if DEBUG is set. + */ +#ifndef LNCP_DISABLE_LOGS +#define LNCP_LOG(format, ...) NRF_LOG_PRINTF_DEBUG("[LNCP] " format, ##__VA_ARGS__) /**< Debug logger macro */ +#define LNCP_ERR(format, ...) NRF_LOG_PRINTF_ERROR("[LNCP] " format, ##__VA_ARGS__) /**< Error logger macro */ +#else +#define LNCP_LOG(...) +#define LNCP_ERR(...) +#endif // LNCP_DISABLE_LOGS +#endif +#define LNCP_LOG(...) + +// Feature Mask bits +#define FEATURE_MASK_INSTANTANEOUS_SPEED (0x01 << 0) /**< Instantaneous Speed mask bit. */ +#define FEATURE_MASK_TOTAL_DISTANCE (0x01 << 1) /**< Total Distance mask bit. */ +#define FEATURE_MASK_LOCATION (0x01 << 2) /**< Location mask bit. */ +#define FEATURE_MASK_ELEVATION (0x01 << 3) /**< Elevation mask bit. */ +#define FEATURE_MASK_HEADING (0x01 << 4) /**< Heading mask bit. */ +#define FEATURE_MASK_ROLLING_TIME (0x01 << 5) /**< Rolling Time mask bit. */ +#define FEATURE_MASK_UTC_TIME (0x01 << 6) /**< UTC Time mask bit. */ + +// Data Control point parameter type lengths. +#define INT8_LEN 1 +#define INT16_LEN 2 +#define INT24_LEN 3 +#define INT32_LEN 4 + +#define OPCODE_LENGTH 1 /**< Length of opcode inside Location and Navigation Measurement packet. */ +#define HANDLE_LENGTH 2 /**< Length of handle inside Location and Navigation Measurement packet. */ + +static ble_lncp_rsp_code_t notify_app(ble_lncp_t const * p_lncp, ble_lncp_evt_t const * p_evt) +{ + ble_lncp_rsp_code_t rsp = LNCP_RSP_SUCCESS; + + if (p_lncp->evt_handler != NULL) + { + rsp = p_lncp->evt_handler(p_lncp, p_evt); + } + + return rsp; +} + + +static void resp_send(ble_lncp_t * p_lncp) +{ + // Send indication + uint16_t hvx_len; + uint8_t hvx_data[MAX_CTRL_POINT_RESP_PARAM_LEN]; + ble_gatts_hvx_params_t hvx_params; + uint32_t err_code; + + memset(&hvx_params, 0, sizeof(hvx_params)); + + hvx_len = 3 + p_lncp->pending_rsp.rsp_param_len; + hvx_data[0] = LNCP_OP_RESPONSE_CODE; + hvx_data[1] = p_lncp->pending_rsp.op_code; + hvx_data[2] = p_lncp->pending_rsp.rsp_code; + + memcpy(&hvx_data[3], &p_lncp->pending_rsp.rsp_param[0], p_lncp->pending_rsp.rsp_param_len); + + hvx_params.handle = p_lncp->ctrlpt_handles.value_handle; + hvx_params.type = BLE_GATT_HVX_INDICATION; + hvx_params.offset = 0; + hvx_params.p_len = &hvx_len; + hvx_params.p_data = hvx_data; + + err_code = sd_ble_gatts_hvx(p_lncp->conn_handle, &hvx_params); + + // Error handling + if ((err_code == NRF_SUCCESS) && (hvx_len != p_lncp->pending_rsp.rsp_param_len + 3)) + { + err_code = NRF_ERROR_DATA_SIZE; + } + + switch (err_code) + { + case NRF_SUCCESS: + p_lncp->procedure_status = LNCP_STATE_CONFIRMATION_PENDING; + // Wait for HVC event + break; + + case BLE_ERROR_NO_TX_PACKETS: + // Wait for TX_COMPLETE event to retry transmission + p_lncp->procedure_status = LNCP_STATE_INDICATION_PENDING; + break; + + default: + p_lncp->procedure_status = LNCP_STATE_INDICATION_PENDING; + // error + if (p_lncp->error_handler != NULL) + { + p_lncp->error_handler(err_code); + } + break; + } +} + + +static void on_connect(ble_lncp_t * p_lncp, ble_evt_t const * p_ble_evt) +{ + memset(&p_lncp->mask, 0, sizeof(ble_lncp_mask_t)); + p_lncp->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; + p_lncp->procedure_status = LNCP_STATE_NO_PROC_IN_PROGRESS; +} + + +static void on_disconnect(ble_lncp_t * p_lncp, ble_evt_t const * p_ble_evt) +{ + UNUSED_PARAMETER(p_ble_evt); + p_lncp->conn_handle = BLE_CONN_HANDLE_INVALID; + p_lncp->procedure_status = LNCP_STATE_NO_PROC_IN_PROGRESS; +} + + +static void on_hvc_confirm(ble_lncp_t * p_lncp, ble_evt_t const * p_ble_evt) +{ + if (p_ble_evt->evt.gatts_evt.params.hvc.handle == p_lncp->ctrlpt_handles.value_handle) + { + if (p_lncp->procedure_status == LNCP_STATE_CONFIRMATION_PENDING) + { + p_lncp->procedure_status = LNCP_STATE_NO_PROC_IN_PROGRESS; + } + else + { + if (p_lncp->error_handler != NULL) + { + p_lncp->error_handler(NRF_ERROR_INVALID_STATE); + } + } + } +} + + +static void on_tx_complete(ble_lncp_t * p_lncp) +{ + if (p_lncp->procedure_status == LNCP_STATE_INDICATION_PENDING) + { + resp_send(p_lncp); + } +} + + +/**@brief Handle write events to the control point cccd. + * + * @param[in] p_lncp Location and Navigation Service structure. + * @param[in] p_evt_write Write event received from the BLE stack. + */ +static void on_lncp_cccd_write(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) +{ + if (p_evt_write->len == BLE_CCCD_VALUE_LEN) + { + // CCCD written, update indications state + p_lncp->is_ctrlpt_indication_enabled = ble_srv_is_indication_enabled(p_evt_write->data); + } +} + + +/**@brief Handle write events to the navigation cccd. + * + * @param[in] p_lncp Location and Navigation Service structure. + * @param[in] p_evt_write Write event received from the BLE stack. + */ +static void on_nav_cccd_write(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) +{ + if (p_evt_write->len == BLE_CCCD_VALUE_LEN) + { + // CCCD written, update notification state + p_lncp->is_nav_notification_enabled = ble_srv_is_notification_enabled(p_evt_write->data); + } +} + + +/**@brief Event handler for control point write. + * + * @param[in] p_lncp Location and Navigation Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_set_cumulative_value(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) +{ + if ( !(p_lncp->available_features & BLE_LNS_FEATURE_TOTAL_DISTANCE_SUPPORTED) ) + { + p_lncp->pending_rsp.rsp_code = LNCP_RSP_OP_CODE_NOT_SUPPORTED; + return; + } + + if (p_evt_write->len != OPCODE_LENGTH + INT24_LEN) + { + p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; + return; + } + + const uint32_t total_distance = uint24_decode(&p_evt_write->data[1]); + + const ble_lncp_evt_t evt = { + .evt_type = LNCP_EVT_TOTAL_DISTANCE_SET, + .params.total_distance = total_distance + }; + p_lncp->pending_rsp.rsp_code = notify_app(p_lncp, &evt); + + if (p_lncp->pending_rsp.rsp_code == LNCP_RSP_SUCCESS) + { + p_lncp->total_distance = total_distance; + } + +} + + +/**@brief Event handler for control point write. + * + * @param[in] p_lncp Location and Navigation Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_mask_loc_speed_content(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) +{ + if ( !(p_lncp->available_features & BLE_LNS_FEATURE_LOC_AND_SPEED_CONTENT_MASKING_SUPPORTED) ) + { + p_lncp->pending_rsp.rsp_code = LNCP_RSP_OP_CODE_NOT_SUPPORTED; + return; + } + + if (p_evt_write->len != OPCODE_LENGTH + INT16_LEN) + { + p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; + return; + } + + uint16_t rcvd_mask = uint16_decode(&p_evt_write->data[1]); + + if(rcvd_mask > 0x7F) + { + p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; + return; + } + + const ble_lncp_evt_t evt = { + .evt_type = LNCP_EVT_MASK_SET, + .params.mask.flags = rcvd_mask + }; + p_lncp->pending_rsp.rsp_code = notify_app(p_lncp, &evt); + + if (p_lncp->pending_rsp.rsp_code == LNCP_RSP_SUCCESS) + { + p_lncp->mask.flags = rcvd_mask; + } +} + + +/**@brief Event handler for control point write. + * + * @param[in] p_lncp Location and Navigation Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_nav_control(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) +{ + if ( !(p_lncp->is_navigation_present) ) + { + p_lncp->pending_rsp.rsp_code = LNCP_RSP_OP_CODE_NOT_SUPPORTED; + return; + } + + if(p_evt_write->len != LNCP_NAV_CMD_LEN) + { + p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; + return; + } + + /*lint --e{415} --e{416} -save suppress Warning 415: possible access out of bond */ + const uint8_t data_buf = p_evt_write->data[1]; + /*lint -restore*/ + + if (data_buf > LNCP_NAV_CMD_MAX) + { + p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; + return; + } + + const ble_lncp_nav_cmd_t cmd = (ble_lncp_nav_cmd_t) data_buf; + + if (cmd == LNCP_CMD_NAV_START || cmd == LNCP_CMD_NAV_CONTINUE || cmd == LNCP_CMD_NAV_NEAREST) + { + p_lncp->is_navigation_running = true; + } + else if (cmd == LNCP_CMD_NAV_STOP || cmd == LNCP_CMD_NAV_PAUSE) + { + p_lncp->is_navigation_running = false; + } + + const ble_lncp_evt_t evt = { + .evt_type = LNCP_EVT_NAV_COMMAND, + .params.nav_cmd = cmd + }; + p_lncp->pending_rsp.rsp_code = notify_app(p_lncp, &evt); +} + + +/**@brief Event handler for control point write. + * + * @param[in] p_lncp Location and Navigation Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_req_num_routes(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) +{ + p_lncp->pending_rsp.rsp_code = LNCP_RSP_SUCCESS; + + if ( !(p_lncp->is_navigation_present) ) + { + p_lncp->pending_rsp.rsp_code = LNCP_RSP_OP_CODE_NOT_SUPPORTED; + return; + } + + if (p_evt_write->len != OPCODE_LENGTH) + { + p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; + return; + } + + const uint8_t num_records = ble_ln_db_num_records_get(); + p_lncp->pending_rsp.rsp_param_len = uint16_encode(num_records, &p_lncp->pending_rsp.rsp_param[0]); +} + + +/**@brief Event handler for control point write. + * + * @param[in] p_lncp Location and Navigation Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_req_name_of_route(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) +{ + uint8_t * p_name; + uint32_t err_code; + + p_lncp->pending_rsp.rsp_code = LNCP_RSP_SUCCESS; + + if ( !(p_lncp->is_navigation_present) ) + { + p_lncp->pending_rsp.rsp_code = LNCP_RSP_OP_CODE_NOT_SUPPORTED; + return; + } + + if(p_evt_write->len != OPCODE_LENGTH + INT16_LEN) + { + p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; + return; + } + + /*lint --e{415} --e{416} -save suppress Warning 415: possible access out of bond */ + const uint16_t route_num = uint16_decode(&p_evt_write->data[1]); + /*lint -restore*/ + + err_code = ble_ln_db_record_name_get(route_num, &p_name); + if (err_code != NRF_SUCCESS) + { + p_lncp->pending_rsp.rsp_code = LNCP_RSP_OPERATION_FAILED;; + return; + } + memcpy(&p_lncp->pending_rsp.rsp_param[0], p_name, BLE_LNS_MAX_ROUTE_NAME_LEN); + + p_lncp->pending_rsp.rsp_param_len = BLE_LNS_MAX_ROUTE_NAME_LEN; +} + + +/**@brief Event handler for control point write. + * + * @param[in] p_lncp Location and Navigation Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_select_route(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) +{ + if ( !(p_lncp->is_navigation_present)) + { + p_lncp->pending_rsp.rsp_code = LNCP_RSP_OP_CODE_NOT_SUPPORTED; + return; + } + + if(p_evt_write->len != OPCODE_LENGTH + INT16_LEN) + { + p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; + return; + } + + const uint16_t route_num = uint16_decode(&p_evt_write->data[1]); + const uint16_t stored_num = ble_ln_db_num_records_get(); + + if (route_num >= stored_num) + { + p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; + return; + } + + const ble_lncp_evt_t evt = { + .evt_type = LNCP_EVT_ROUTE_SELECTED, + .params.selected_route = route_num + }; + p_lncp->pending_rsp.rsp_code = notify_app(p_lncp, &evt); + + if (p_lncp->pending_rsp.rsp_code == LNCP_RSP_SUCCESS) + { + p_lncp->selected_route = route_num; + } +} + + +/**@brief Event handler for control point write. + * + * @param[in] p_lncp Location and Navigation Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_set_fix_rate(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) +{ + p_lncp->pending_rsp.rsp_code = LNCP_RSP_SUCCESS; + + if ( !(p_lncp->available_features & BLE_LNS_FEATURE_FIX_RATE_SETTING_SUPPORTED) ) + { + p_lncp->pending_rsp.rsp_code = LNCP_RSP_OP_CODE_NOT_SUPPORTED; + return; + } + + if (p_evt_write->len != OPCODE_LENGTH + INT8_LEN) + { + p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; + return; + } + + /*lint --e{415} --e{416} -save suppress Warning 415: possible access out of bond */ + const uint8_t fix_rate = p_evt_write->data[1]; + /*lint -restore*/ + + const ble_lncp_evt_t evt = { + .evt_type = LNCP_EVT_FIX_RATE_SET, + .params.fix_rate = fix_rate + }; + p_lncp->pending_rsp.rsp_code = notify_app(p_lncp, &evt); + + if (p_lncp->pending_rsp.rsp_code == LNCP_RSP_SUCCESS) + { + p_lncp->fix_rate = fix_rate; + } +} + + +/**@brief Event handler for control point write. + * + * @param[in] p_lncp Location and Navigation Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_set_elevation(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) +{ + p_lncp->pending_rsp.rsp_code = LNCP_RSP_SUCCESS; + + if ( !(p_lncp->available_features & BLE_LNS_FEATURE_ELEVATION_SETTING_SUPPORTED) ) + { + p_lncp->pending_rsp.rsp_code = LNCP_RSP_OP_CODE_NOT_SUPPORTED; + return; + } + + if (p_evt_write->len != OPCODE_LENGTH + INT24_LEN) + { + p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; + return; + } + + const uint32_t elevation = uint24_decode(&p_evt_write->data[1]); + ble_lncp_evt_t evt = { + .evt_type = LNCP_EVT_ELEVATION_SET, + .params.elevation = elevation + }; + p_lncp->pending_rsp.rsp_code = notify_app(p_lncp, &evt); + + if (p_lncp->pending_rsp.rsp_code == LNCP_RSP_SUCCESS) + { + p_lncp->elevation = elevation; + } +} + + +/**@brief Handle write events to the Location and Navigation Service Control Point characteristic. + * + * @param[in] p_lncp Location and Navigation Service structure. + * @param[in] p_evt_write Write event received from the BLE stack. + */ +static void on_ctrlpt_write(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) +{ + uint32_t err_code; + + p_lncp->pending_rsp.rsp_param_len = 0; + + ble_gatts_rw_authorize_reply_params_t write_authorize_reply; + memset(&write_authorize_reply, 0, sizeof(write_authorize_reply)); + + write_authorize_reply.type = BLE_GATTS_AUTHORIZE_TYPE_WRITE; + + if (p_lncp->is_ctrlpt_indication_enabled) + { + if (p_lncp->procedure_status == LNCP_STATE_NO_PROC_IN_PROGRESS) + { + write_authorize_reply.params.write.update = 1; + write_authorize_reply.params.write.gatt_status = BLE_GATT_STATUS_SUCCESS; + + // if the op code is navigation control, its cccd must be checked + if (p_evt_write->len > 0 && p_lncp->is_navigation_present) + { + if ( p_evt_write->data[0] == LNCP_OP_NAV_CONTROL + || p_evt_write->data[0] == LNCP_OP_REQ_NAME_OF_ROUTE + || p_evt_write->data[0] == LNCP_OP_REQ_NUM_ROUTES) + { + if (!p_lncp->is_nav_notification_enabled) + { + write_authorize_reply.params.write.gatt_status = LNCP_RSP_CCCD_CONFIG_IMPROPER; + } + } + } + } + else + { + write_authorize_reply.params.write.gatt_status = LNCP_RSP_PROC_ALR_IN_PROG; + } + } + else + { + write_authorize_reply.params.write.gatt_status = LNCP_RSP_CCCD_CONFIG_IMPROPER; + } + + // reply to the write authorization + do { + err_code = sd_ble_gatts_rw_authorize_reply(p_lncp->conn_handle, &write_authorize_reply); + if (err_code != NRF_SUCCESS && err_code != NRF_ERROR_BUSY) + { + if (p_lncp->error_handler != NULL) + { + p_lncp->error_handler(err_code); + } + } + } while (err_code == NRF_ERROR_BUSY); + + + if (write_authorize_reply.params.write.gatt_status != BLE_GATT_STATUS_SUCCESS) + { + return; + } + + // Start executing the control point write action + p_lncp->procedure_status = LNCP_STATE_INDICATION_PENDING; + if (p_evt_write->len > 0) + { + p_lncp->pending_rsp.op_code = (ble_lncp_op_code_t) p_evt_write->data[0]; + switch (p_lncp->pending_rsp.op_code) + { + case LNCP_OP_SET_CUMULATIVE_VALUE: + on_set_cumulative_value(p_lncp, p_evt_write); + break; + + case LNCP_OP_MASK_LOC_SPEED_CONTENT: + on_mask_loc_speed_content(p_lncp, p_evt_write); + break; + + case LNCP_OP_NAV_CONTROL: + on_nav_control(p_lncp, p_evt_write); + break; + + case LNCP_OP_REQ_NUM_ROUTES: + on_req_num_routes(p_lncp, p_evt_write); + break; + + case LNCP_OP_REQ_NAME_OF_ROUTE: + on_req_name_of_route(p_lncp, p_evt_write); + break; + + case LNCP_OP_SELECT_ROUTE: + on_select_route(p_lncp, p_evt_write); + break; + + case LNCP_OP_SET_FIX_RATE: + on_set_fix_rate(p_lncp, p_evt_write); + break; + + case LNCP_OP_SET_ELEVATION: + on_set_elevation(p_lncp, p_evt_write); + break; + + // Unrecognized Op Code + default: + p_lncp->pending_rsp.rsp_code = LNCP_RSP_OP_CODE_NOT_SUPPORTED; + break; + } + + resp_send(p_lncp); + } + else + { + p_lncp->procedure_status = LNCP_STATE_NO_PROC_IN_PROGRESS; + } +} + + +/**@brief Write authorization request event handler. + * + * @details The write authorization request event handler is only called when writing to the control point. + * + * @param[in] p_lncp Location and Navigation Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_rw_authorize_req(ble_lncp_t * p_lncp, ble_evt_t const * p_ble_evt) +{ + const ble_gatts_evt_rw_authorize_request_t * p_auth_req = + &p_ble_evt->evt.gatts_evt.params.authorize_request; + + if ( + (p_auth_req->type == BLE_GATTS_AUTHORIZE_TYPE_WRITE) + && + (p_auth_req->request.write.handle == p_lncp->ctrlpt_handles.value_handle) + && + (p_auth_req->request.write.op != BLE_GATTS_OP_PREP_WRITE_REQ) + && + (p_auth_req->request.write.op != BLE_GATTS_OP_EXEC_WRITE_REQ_NOW) + && + (p_auth_req->request.write.op != BLE_GATTS_OP_EXEC_WRITE_REQ_CANCEL) + ) + { + on_ctrlpt_write(p_lncp, &p_auth_req->request.write); + } + +} + + +/**@brief Write event handler. + * + * @param[in] p_lncp Location and Navigation Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_write(ble_lncp_t * p_lncp, ble_evt_t const * p_ble_evt) +{ + const ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; + + if (p_evt_write->handle == p_lncp->ctrlpt_handles.cccd_handle) + { + on_lncp_cccd_write(p_lncp, p_evt_write); + } + else if (p_evt_write->handle == p_lncp->navigation_handles.cccd_handle) + { + on_nav_cccd_write(p_lncp, p_evt_write); + } +} + + +void ble_lncp_on_ble_evt(ble_lncp_t * p_lncp, ble_evt_t const * p_ble_evt) +{ + VERIFY_PARAM_NOT_NULL_VOID(p_lncp); + VERIFY_PARAM_NOT_NULL_VOID(p_ble_evt); + + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + on_connect(p_lncp, p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + if (p_ble_evt->evt.gap_evt.conn_handle == p_lncp->conn_handle) + { + on_disconnect(p_lncp, p_ble_evt); + } + break; + + case BLE_GATTS_EVT_WRITE: + if (p_ble_evt->evt.gatts_evt.conn_handle == p_lncp->conn_handle) + { + on_write(p_lncp, p_ble_evt); + } + break; + + case BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST: + if (p_ble_evt->evt.gatts_evt.conn_handle == p_lncp->conn_handle) + { + on_rw_authorize_req(p_lncp, p_ble_evt); + } + break; + + case BLE_GATTS_EVT_HVC: + if (p_ble_evt->evt.gatts_evt.conn_handle == p_lncp->conn_handle) + { + on_hvc_confirm(p_lncp, p_ble_evt); + } + break; + + case BLE_EVT_TX_COMPLETE: + on_tx_complete(p_lncp); + break; + + default: + // no implementation + break; + } +} + + +uint32_t ble_lncp_total_distance_get(ble_lncp_t const * p_lncp) +{ + if (p_lncp == NULL) + { + return 0; + } + + return p_lncp->total_distance; +} + + +uint32_t ble_lncp_elevation_get(ble_lncp_t const * p_lncp) +{ + if (p_lncp == NULL) + { + return 0; + } + + return p_lncp->elevation; +} + + +ble_lncp_mask_t ble_lncp_mask_get(ble_lncp_t const * p_lncp) +{ + if (p_lncp == NULL) + { + const ble_lncp_mask_t empty_mask = {0}; + return empty_mask; + } + + return p_lncp->mask; +} + + +bool ble_lncp_is_navigation_running(ble_lncp_t const * p_lncp) +{ + if (p_lncp == NULL) + { + return false; + } + + return p_lncp->is_navigation_running; +} + + +ret_code_t ble_lncp_init(ble_lncp_t * p_lncp, ble_lncp_init_t const * p_lncp_init) +{ + VERIFY_PARAM_NOT_NULL(p_lncp); + VERIFY_PARAM_NOT_NULL(p_lncp_init); + + ble_add_char_params_t add_char_params; + + memset(&add_char_params, 0, sizeof(add_char_params)); + + p_lncp->service_handle = p_lncp_init->service_handle; + p_lncp->evt_handler = p_lncp_init->evt_handler; + p_lncp->error_handler = p_lncp_init->error_handler; + p_lncp->available_features = p_lncp_init->available_features; + p_lncp->is_position_quality_present = p_lncp_init->is_position_quality_present; + p_lncp->is_navigation_present = p_lncp_init->is_navigation_present; + p_lncp->total_distance = p_lncp_init->total_distance; + p_lncp->elevation = p_lncp_init->elevation; + p_lncp->navigation_handles = p_lncp_init->navigation_handles; + + p_lncp->fix_rate = BLE_LNS_NO_FIX; + p_lncp->selected_route = BLE_LNS_INVALID_ROUTE; + + p_lncp->procedure_status = LNCP_STATE_NO_PROC_IN_PROGRESS; + p_lncp->conn_handle = BLE_CONN_HANDLE_INVALID; + p_lncp->is_navigation_running = false; + p_lncp->is_nav_notification_enabled = false; + p_lncp->is_ctrlpt_indication_enabled = false; + + memset(&p_lncp->mask, 0, sizeof(ble_lncp_mask_t)); + + add_char_params.uuid = BLE_UUID_LN_CONTROL_POINT_CHAR; + add_char_params.max_len = 0; + add_char_params.char_props.indicate = true; + add_char_params.char_props.write = true; + add_char_params.is_defered_write = true; + add_char_params.is_var_len = true; + add_char_params.max_len = BLE_L2CAP_MTU_DEF; + add_char_params.write_access = p_lncp_init->write_perm; + add_char_params.cccd_write_access = p_lncp_init->cccd_write_perm; + + LNCP_LOG("Initialized\n"); + + return characteristic_add(p_lncp->service_handle, + &add_char_params, + &p_lncp->ctrlpt_handles); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_cp.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_cp.h new file mode 100644 index 0000000000..ee385efcd0 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_cp.h @@ -0,0 +1,219 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_sdk_srv_lncp Location and Navigation Service Control Point + * @{ + * @ingroup ble_sdk_srv + * @brief Location and Navigation Service Control Point module + * + * @details This module implements the Location and Navigation Service Control Point behavior. + */ + +#ifndef BLE_LN_CTRLPT_H__ +#define BLE_LN_CTRLPT_H__ + +#include "ble_srv_common.h" +#include "sdk_common.h" + +#define BLE_LNS_MAX_ROUTE_NAME_LEN (BLE_L2CAP_MTU_DEF-5) /**< The maximum length of length of a route name. */ +#define MAX_CTRL_POINT_RESP_PARAM_LEN BLE_LNS_MAX_ROUTE_NAME_LEN + 3 /**< Maximum length of a control point response. */ + +typedef struct ble_lncp_s ble_lncp_t; + +/** @brief Location and Navigation event type. This list defines the possible events types from the Location and Navigation Service. */ +typedef enum +{ + LNCP_EVT_ELEVATION_SET, /**< Location and Navigation elevation was set. */ + LNCP_EVT_FIX_RATE_SET, /**< Fix rate was set. */ + LNCP_EVT_ROUTE_SELECTED, /**< A route was selected. */ + LNCP_EVT_NAV_COMMAND, /**< A navigation command was issued. */ + LNCP_EVT_MASK_SET, /**< Location and Speed feature mask was set. */ + LNCP_EVT_TOTAL_DISTANCE_SET /**< Location and Navigation total distance was set. */ +} ble_lncp_evt_type_t; + + +/** @brief Navigation commands. These commands can be sent to the control point and returned by an event callback. */ +typedef enum +{ + LNCP_CMD_NAV_STOP = 0x00, /**< When received, is_navigation_running in @ref ble_lns_s will be set to false. */ + LNCP_CMD_NAV_START = 0x01, /**< When received, is_navigation_running in @ref ble_lns_s will be set to true. */ + LNCP_CMD_NAV_PAUSE = 0x02, /**< When received, is_navigation_running in @ref ble_lns_s will be set to false. */ + LNCP_CMD_NAV_CONTINUE = 0x03, /**< When received, is_navigation_running in @ref ble_lns_s will be set to true. */ + LNCP_CMD_NAV_SKIP_WAYPOINT = 0x04, /**< When received, is_navigation_running in @ref ble_lns_s will not be affected. */ + LNCP_CMD_NAV_NEAREST = 0x05, /**< When received, is_navigation_running in @ref ble_lns_s will be set to true. */ +} ble_lncp_nav_cmd_t; +#define LNCP_NAV_CMD_MAX 0x05 +#define LNCP_NAV_CMD_LEN (OPCODE_LENGTH + 1) + + +#if defined(__CC_ARM) + #pragma push + #pragma anon_unions +#elif defined(__ICCARM__) + #pragma language=extended +#elif defined(__GNUC__) + /* anonymous unions are enabled by default */ +#endif + +/** @brief A mask can be used to temporarily enable and disable features of the Location and Speed characteristic.*/ +typedef union +{ + uint8_t flags; + struct + { + uint8_t instantaneous_speed :1; + uint8_t total_distance :1; + uint8_t location :1; + uint8_t elevation :1; + uint8_t heading :1; + uint8_t rolling_time :1; + uint8_t utc_time :1; + }; +} ble_lncp_mask_t; + +#if defined(__CC_ARM) + #pragma pop +#elif defined(__ICCARM__) + /* leave anonymous unions enabled */ +#elif defined(__GNUC__) + /* anonymous unions are enabled by default */ +#endif + +typedef struct +{ + ble_lncp_evt_type_t evt_type; + union + { + ble_lncp_mask_t mask; + ble_lncp_nav_cmd_t nav_cmd; + uint32_t total_distance; + uint8_t fix_rate; + uint16_t selected_route; + uint32_t elevation; + } params; +} ble_lncp_evt_t; + + +// Location and Navigation Control Point response values +typedef enum +{ + LNCP_RSP_RESERVED = 0x00, /**< Reserved for future use. */ + LNCP_RSP_SUCCESS = 0x01, /**< Success. */ + LNCP_RSP_OP_CODE_NOT_SUPPORTED = 0x02, /**< Op Code not supported. */ + LNCP_RSP_INVALID_PARAMETER = 0x03, /**< Invalid Parameter. */ + LNCP_RSP_OPERATION_FAILED = 0x04, /**< Operation Failed. */ + LNCP_RSP_PROC_ALR_IN_PROG = BLE_GATT_STATUS_ATTERR_CPS_PROC_ALR_IN_PROG, /**< Control point procedure is already in progress. */ + LNCP_RSP_CCCD_CONFIG_IMPROPER = BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR /**< CCCD is improperly configured. */ +} ble_lncp_rsp_code_t; + + +typedef ble_lncp_rsp_code_t (*ble_lncp_evt_handler_t) (ble_lncp_t const * p_lncp, ble_lncp_evt_t const * p_evt); + +// Location and Navigation Control Point Op Code values +typedef enum +{ + LNCP_OP_RESERVED = 0x00, /**< Reserved for future use. */ + LNCP_OP_SET_CUMULATIVE_VALUE = 0x01, /**< Set Cumulative Value. */ + LNCP_OP_MASK_LOC_SPEED_CONTENT = 0x02, /**< Mask Location and Speed Characteristic Content. */ + LNCP_OP_NAV_CONTROL = 0x03, /**< Navigation Control. */ + LNCP_OP_REQ_NUM_ROUTES = 0x04, /**< Request Number of Routes. */ + LNCP_OP_REQ_NAME_OF_ROUTE = 0x05, /**< Request Name of Route. */ + LNCP_OP_SELECT_ROUTE = 0x06, /**< Select Route. */ + LNCP_OP_SET_FIX_RATE = 0x07, /**< Set Fix Rate. */ + LNCP_OP_SET_ELEVATION = 0x08, /**< Set Elevation. */ + LNCP_OP_RESPONSE_CODE = 0x20 /**< Response code. */ +} ble_lncp_op_code_t; + + +/** @brief Location and Navigation Control Point procedure status */ +typedef enum +{ + LNCP_STATE_NO_PROC_IN_PROGRESS, /**< No procedure in progress. */ + LNCP_STATE_INDICATION_PENDING, /**< Control Point indication is pending. */ + LNCP_STATE_CONFIRMATION_PENDING, /**< Waiting for the indication confirmation. */ +} ble_lncp_procedure_status_t; + + +/** @brief Information included in a control point write response indication. */ +typedef struct +{ + ble_lncp_op_code_t op_code; /**< Opcode of the control point write action. */ + ble_lncp_rsp_code_t rsp_code; /**< Response code of the control point write action. */ + uint8_t rsp_param_len; + uint8_t rsp_param[MAX_CTRL_POINT_RESP_PARAM_LEN]; +} ble_lncp_rsp_t; + + +typedef struct +{ + uint16_t service_handle; + ble_lncp_evt_handler_t evt_handler; + ble_srv_error_handler_t error_handler; + + uint32_t available_features; /**< Value of the LN feature. */ + bool is_position_quality_present; /**< If set to true, the position quality characteristic will be added. Else not. */ + bool is_control_point_present; /**< If set to true, the control point characteristic will be added. Else not. */ + bool is_navigation_present; /**< If set to true, the navigation characteristic will be added. Else not. */ + ble_gatts_char_handles_t navigation_handles; + + uint32_t total_distance; + uint32_t elevation; + + security_req_t write_perm; + security_req_t cccd_write_perm; +} ble_lncp_init_t; + + +struct ble_lncp_s +{ + uint16_t conn_handle; + uint16_t service_handle; + ble_gatts_char_handles_t ctrlpt_handles; + ble_gatts_char_handles_t navigation_handles; + ble_lncp_evt_handler_t evt_handler; + ble_srv_error_handler_t error_handler; + ble_lncp_procedure_status_t procedure_status; + ble_lncp_rsp_t pending_rsp; + + ble_lncp_mask_t mask; + uint32_t total_distance; + uint32_t elevation; + uint8_t fix_rate; + uint16_t selected_route; + uint32_t available_features; /**< Value of the LN feature. */ + bool is_position_quality_present; /**< If set to true, the position quality characteristic will be added. Else not. */ + bool is_control_point_present; /**< If set to true, the control point characteristic will be added. Else not. */ + bool is_navigation_present; /**< If set to true, the navigation characteristic will be added. Else not. */ + bool is_navigation_running; /**< This variable can be set using the control point. Must be true to be able to send navigation updates. */ + + bool is_ctrlpt_indication_enabled; /**< True if indication is enabled on the Control Point characteristic. */ + bool is_nav_notification_enabled; /**< True if notification is enabled on the Navigation characteristic. */ +}; + + +void ble_lncp_on_ble_evt(ble_lncp_t * p_lncp, ble_evt_t const * p_ble_evt); + +uint32_t ble_lncp_total_distance_get(ble_lncp_t const * p_lncp); + +uint32_t ble_lncp_elevation_get(ble_lncp_t const * p_lncp); + +ble_lncp_mask_t ble_lncp_mask_get(ble_lncp_t const * p_lncp); + +bool ble_lncp_is_navigation_running(ble_lncp_t const * p_lncp); + +ret_code_t ble_lncp_init(ble_lncp_t * p_lncp, ble_lncp_init_t const * p_lncp_init); + +#endif //BLE_LN_CTRLPT_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_db.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_db.c new file mode 100644 index 0000000000..99b4955275 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_db.c @@ -0,0 +1,127 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "ble_ln_db.h" +#include "ble_ln_common.h" + +typedef struct +{ + bool in_use_flag; + ble_lns_route_t record; +} database_entry_t; + +static database_entry_t m_database[BLE_LNS_MAX_NUM_ROUTES]; +static uint8_t m_database_crossref[BLE_LNS_MAX_NUM_ROUTES]; +static uint16_t m_num_records; + +void ble_ln_db_init(void) +{ + int i; + + for (i = 0; i < BLE_LNS_MAX_NUM_ROUTES; i++) + { + m_database[i].in_use_flag = false; + m_database_crossref[i] = 0xFF; + } + + m_num_records = 0; +} + + +uint16_t ble_ln_db_num_records_get(void) +{ + return m_num_records; +} + + +ret_code_t ble_ln_db_record_get(uint8_t rec_ndx, ble_lns_route_t * p_rec) +{ + if (rec_ndx >= m_num_records) + { + return NRF_ERROR_INVALID_PARAM; + } + + // copy record to the specified memory + *p_rec = m_database[m_database_crossref[rec_ndx]].record; + + return NRF_SUCCESS; +} + + +ret_code_t ble_ln_db_record_name_get(uint8_t rec_ndx, uint8_t ** p_buf) +{ + if (rec_ndx >= m_num_records) + { + return NRF_ERROR_INVALID_PARAM; + } + + // copy record to the specified memory + *p_buf = m_database[m_database_crossref[rec_ndx]].record.route_name; + + return NRF_SUCCESS; +} + + +ret_code_t ble_ln_db_record_add(ble_lns_route_t * p_rec) +{ + int i; + + if (m_num_records == BLE_LNS_MAX_NUM_ROUTES) + { + return NRF_ERROR_NO_MEM; + } + + // find next available database entry + for (i = 0; i < BLE_LNS_MAX_NUM_ROUTES; i++) + { + if (!m_database[i].in_use_flag) + { + m_database[i].in_use_flag = true; + m_database[i].record = *p_rec; + + m_database[i].record.route_id = i; + m_database_crossref[m_num_records] = i; + p_rec->route_id = i; + + m_num_records++; + + return NRF_SUCCESS; + } + } + + return NRF_ERROR_NO_MEM; +} + + +ret_code_t ble_ln_db_record_delete(uint8_t rec_ndx) +{ + int i; + + if (rec_ndx >= m_num_records) + { + return NRF_ERROR_NOT_FOUND; + } + + // free entry + m_database[m_database_crossref[rec_ndx]].in_use_flag = false; + + // decrease number of records + m_num_records--; + + // remove cross reference index + for (i = rec_ndx; i < m_num_records; i++) + { + m_database_crossref[i] = m_database_crossref[i + 1]; + } + + return NRF_SUCCESS; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_db.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_db.h new file mode 100644 index 0000000000..24046c311c --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_db.h @@ -0,0 +1,86 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_sdk_srv_ln_db Location and Navigation database + * @{ + * @ingroup ble_sdk_srv + * @brief Location and Navigation route database + */ + +#ifndef BLE_LN_DB__ +#define BLE_LN_DB__ + +#include "ble_lns.h" + +/**@brief Function for initializing the route database. + * + * @details This call initializes the database holding route records. + * + * @return NRF_SUCCESS on success. + */ +void ble_ln_db_init(void); + +/**@brief Function for getting the number of records in the database. + * + * @details This call returns the number of records in the database. + * + * @return Number of records in the database. + */ +uint16_t ble_ln_db_num_records_get(void); + +/**@brief Function for getting a record from the database. + * + * @details This call returns a specified record from the database. + * + * @param[in] record_num Index of the record to retrieve. + * @param[out] p_rec Pointer to record structure where retrieved record is copied to. + * + * @return NRF_SUCCESS on success. + */ +ret_code_t ble_ln_db_record_get(uint8_t record_num, ble_lns_route_t * p_rec); + +/**@brief Function for getting a record name from the database. + * + * @details This call returns a specified record name from the database. + * + * @param[in] rec_ndx Index of the record to retrieve. + * @param[out] p_buf Pointer to array where retrieved record name is copied to. + * + * @return NRF_SUCCESS on success. + */ +ret_code_t ble_ln_db_record_name_get(uint8_t rec_ndx, uint8_t ** p_buf); + +/**@brief Function for adding a record at the end of the database. + * + * @details This call adds a record as the last record in the database. + * + * @param[in] p_rec Pointer to record to add to database. + * + * @return NRF_SUCCESS on success. + */ +ret_code_t ble_ln_db_record_add(ble_lns_route_t * p_rec); + +/**@brief Function for deleting a database entry. + * + * @details This call deletes an record from the database. + * + * @param[in] record_num Index of record to delete. + * + * @return NRF_SUCCESS on success. + */ +ret_code_t ble_ln_db_record_delete(uint8_t record_num); + +#endif // BLE_LN_DB_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_lns.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_lns.c new file mode 100644 index 0000000000..d03a6f3850 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_lns.c @@ -0,0 +1,1001 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "ble_lns.h" +#include "ble_ln_db.h" +#include "ble_ln_common.h" +#include "sdk_common.h" + +#if 0 +/** + * @defgroup lns_log Module's log macros + * + * @note LNS_LOG will only log if DEBUG is set. + */ +#ifndef LNS_DISABLE_LOGS +#define LNS_LOG(format, ...) NRF_LOG_PRINTF_DEBUG("[LNS] " format, ##__VA_ARGS__) /**< Debug logger macro */ +#define LNS_ERR(format, ...) NRF_LOG_PRINTF_ERROR("[LNS] " format, ##__VA_ARGS__) /**< Error logger macro */ +#else +#define LNS_LOG(...) +#define LNS_ERR(...) +#endif // LNS_DISABLE_LOGS +#endif +#define LNS_LOG(...) + +// Location and Speed flag bits +#define LOC_SPEED_FLAG_INSTANT_SPEED_PRESENT (0x01 << 0) /**< Instantaneous Speed Present bit. */ +#define LOC_SPEED_FLAG_TOTAL_DISTANCE_PRESENT (0x01 << 1) /**< Total Distance Present bit. */ +#define LOC_SPEED_FLAG_LOCATION_PRESENT (0x01 << 2) /**< Location Present bit. */ +#define LOC_SPEED_FLAG_ELEVATION_PRESENT (0x01 << 3) /**< Elevation Present bit. */ +#define LOC_SPEED_FLAG_HEADING_PRESENT (0x01 << 4) /**< Heading Present bit. */ +#define LOC_SPEED_FLAG_ROLLING_TIME_PRESENT (0x01 << 5) /**< Rolling Time Present bit. */ +#define LOC_SPEED_FLAG_UTC_TIME_PRESENT (0x01 << 6) /**< UTC Time Present bit. */ +#define LOC_SPEED_FLAG_POSITION_STATUS (0x03 << 7) /**< Position Status bits(2). */ +#define LOC_SPEED_FLAG_SPEED_AND_DIST_FORMAT (0x01 << 9) /**< Speed and Distance Format. */ +#define LOC_SPEED_FLAG_ELEVATION_SOURCE (0x03 << 10) /**< Elevation Source bits(2). */ +#define LOC_SPEED_FLAG_HEADING_SOURCE (0x01 << 12) /**< Heading Source. */ + +// Position Quality flag bits +#define POS_QUAL_FLAG_NUM_SATS_IN_SOLUTION_PRESENT (0x01 << 0) /**< Number of Satellites in Solution Present bit. */ +#define POS_QUAL_FLAG_NUM_SATS_IN_VIEW_PRESENT (0x01 << 1) /**< Number of Satellites in View Present bit. */ +#define POS_QUAL_FLAG_TIME_TO_FIRST_FIX_PRESESNT (0x01 << 2) /**< Time to First Fix Present bit. */ +#define POS_QUAL_FLAG_EHPE_PRESENT (0x01 << 3) /**< EHPE Present bit. */ +#define POS_QUAL_FLAG_EVPE_PRESENT (0x01 << 4) /**< EVPE Present bit. */ +#define POS_QUAL_FLAG_HDOP_PRESENT (0x01 << 5) /**< HDOP Present bit. */ +#define POS_QUAL_FLAG_VDOP_PRESENT (0x01 << 6) /**< VDOP Present bit. */ +#define POS_QUAL_FLAG_POSITION_STATUS (0x03 << 7) /**< Position Status bits(2). */ + +// Navigation flag bits +#define NAV_FLAG_REMAINING_DIST_PRESENT (0x01 << 0) /**< Remaining Distance Present bit. */ +#define NAV_FLAG_REAMINGING_VERT_DIST_PRESESNT (0x01 << 1) /**< Remaining Vertical Distance Present bit . */ +#define NAV_FLAG_ETA_PRESENT (0x01 << 2) /**< Estimated Time of Arrival Present bit. */ +#define NAV_FLAG_POSITION_STATUS (0x03 << 3) /**< Position Status bits(2). */ +#define NAV_FLAG_HEADING_SOURCE (0x01 << 5) /**< Heading Source bit. */ +#define NAV_FLAG_NAVIGATION_INDICATOR_TYPE (0x01 << 6) /**< Navigation Indicator Type bit. */ +#define NAV_FLAG_WAYPOINT_REACHED (0x01 << 7) /**< Waypoint Reached bit. */ +#define NAV_FLAG_DESTINATION_REACHED (0x01 << 8) /**< Destination Reached bit. */ + +#define BLE_LNS_NAV_MAX_LEN 19 /**< The length of a navigation notification when all features are enabled. See @ref ble_lns_navigation_t to see what this represents, or check https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.navigation.xml. */ + + +static void notification_buffer_process(ble_lns_t * p_lns) +{ + notification_t * p_notification; + + // See if a notification is pending + if (p_lns->pending_loc_speed_notifications[0].is_pending == true) + { + p_notification = &p_lns->pending_loc_speed_notifications[0]; + } + else if (p_lns->pending_loc_speed_notifications[1].is_pending == true) + { + p_notification = &p_lns->pending_loc_speed_notifications[1]; + } + else if (p_lns->pending_navigation_notification.is_pending == true) + { + p_notification = &p_lns->pending_navigation_notification; + } + else + { + p_notification = NULL; + } + + // send the notification if necessary + if (p_notification != NULL) + { + uint32_t err_code; + ble_gatts_hvx_params_t hvx_params; + + memset(&hvx_params, 0, sizeof(hvx_params)); + + uint16_t hvx_len = p_notification->len; + + hvx_params.handle = p_notification->handle; + hvx_params.type = BLE_GATT_HVX_NOTIFICATION; + hvx_params.offset = 0; + hvx_params.p_len = &hvx_len; + hvx_params.p_data = &p_notification->data[0]; + + err_code = sd_ble_gatts_hvx(p_lns->conn_handle, &hvx_params); + + if ((err_code == NRF_SUCCESS) && (hvx_len == p_notification->len)) + { + p_notification->is_pending = false; + } + } +} + + +/**@brief Connect event handler. + * + * @param[in] p_lns Location and Navigation Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_connect(ble_lns_t * p_lns, ble_evt_t const * p_ble_evt) +{ + p_lns->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; + + // clear pending notifications + p_lns->pending_loc_speed_notifications[0].is_pending = false; + p_lns->pending_loc_speed_notifications[1].is_pending = false; + p_lns->pending_navigation_notification.is_pending = false; +} + + +/**@brief Disconnect event handler. + * + * @param[in] p_lns Location and Navigation Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_disconnect(ble_lns_t * p_lns, ble_evt_t const * p_ble_evt) +{ + if (p_lns->conn_handle != p_ble_evt->evt.gatts_evt.conn_handle) + { + return; + } + + p_lns->conn_handle = BLE_CONN_HANDLE_INVALID; +} + + +/**@brief Handle write events to the control point cccd. + * + * @param[in] p_lncp Location and Navigation Service structure. + * @param[in] p_evt_write Write event received from the BLE stack. + */ +static void on_ctrl_pt_cccd_write(ble_lns_t * p_lns, ble_gatts_evt_write_t const * p_evt_write) +{ + if (p_evt_write->len == BLE_CCCD_VALUE_LEN) + { + if (p_lns->evt_handler != NULL) + { + ble_lns_evt_t evt; + + if (ble_srv_is_indication_enabled(p_evt_write->data)) + { + evt.evt_type = BLE_LNS_CTRLPT_EVT_INDICATION_ENABLED;; + } + else + { + evt.evt_type = BLE_LNS_CTRLPT_EVT_INDICATION_DISABLED;; + } + + p_lns->evt_handler(p_lns, &evt); + } + } +} + + +/**@brief Handle write events to the Location and Speed cccd. + * + * @param[in] p_lns Location and Navigation Service structure. + * @param[in] p_evt_write Write event received from the BLE stack. + */ +static void on_loc_speed_cccd_write(ble_lns_t * p_lns, + ble_gatts_evt_write_t const * p_evt_write) +{ + if (p_evt_write->len == BLE_CCCD_VALUE_LEN) + { + // CCCD written, update notification state + p_lns->is_loc_speed_notification_enabled = ble_srv_is_notification_enabled(p_evt_write->data); + if (p_lns->evt_handler != NULL) + { + ble_lns_evt_t evt; + + if (p_lns->is_loc_speed_notification_enabled) + { + evt.evt_type = BLE_LNS_LOC_SPEED_EVT_NOTIFICATION_ENABLED; + } + else + { + evt.evt_type = BLE_LNS_LOC_SPEED_EVT_NOTIFICATION_DISABLED; + } + + p_lns->evt_handler(p_lns, &evt); + } + } +} + + +/**@brief Handle write events to the navigation cccd. + * + * @param[in] p_lns Location and Navigation Service structure. + * @param[in] p_evt_write Write event received from the BLE stack. + */ +static void on_nav_cccd_write(ble_lns_t * p_lns, + ble_gatts_evt_write_t const * p_evt_write) +{ + if (p_evt_write->len == BLE_CCCD_VALUE_LEN) + { + p_lns->is_nav_notification_enabled = ble_srv_is_notification_enabled(p_evt_write->data); + if (p_lns->evt_handler != NULL) + { + ble_lns_evt_t evt; + + if (p_lns->is_nav_notification_enabled) + { + evt.evt_type = BLE_LNS_NAVIGATION_EVT_NOTIFICATION_ENABLED; + } + else + { + evt.evt_type = BLE_LNS_NAVIGATION_EVT_NOTIFICATION_DISABLED; + } + + p_lns->evt_handler(p_lns, &evt); + } + } +} + + +/**@brief Write event handler. + * + * @param[in] p_lns Location and Navigation Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + */ +static void on_write(ble_lns_t * p_lns, ble_evt_t const * p_ble_evt) +{ + if (p_lns->conn_handle != p_ble_evt->evt.gatts_evt.conn_handle) + { + return; + } + + const ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; + + if (p_evt_write->handle == p_lns->ctrlpt_handles.cccd_handle) + { + on_ctrl_pt_cccd_write(p_lns, p_evt_write); + } + else if (p_evt_write->handle == p_lns->loc_speed_handles.cccd_handle) + { + on_loc_speed_cccd_write(p_lns, p_evt_write); + } + else if (p_evt_write->handle == p_lns->navigation_handles.cccd_handle) + { + on_nav_cccd_write(p_lns, p_evt_write); + } +} + + +/**@brief Tx Complete event handler. This is used to retry sending a packet. + * + * @details Tx Complete event handler. + * Handles WRITE events from the BLE stack and if an indication was pending try sending it + * again. + * + * @param[in] p_lns Location navigation structure. + */ +static void on_tx_complete(ble_lns_t * p_lns) +{ + notification_buffer_process(p_lns); +} + + +/**@brief Encode position quality. + * + * @param[in] p_lns Location and Navigation Service structure. + * @param[in] p_pos_qual Position quality data to be encoded. + * @param[out] p_encoded_buffer Buffer where the encoded data will be written. + * + * @return Size of encoded data. + */ +static uint8_t pos_qual_encode(ble_lns_t const * p_lns, + ble_lns_pos_quality_t const * p_pos_qual, + uint8_t * p_encoded_buffer) +{ + uint16_t flags = 0; + uint8_t len = 2; // flags are added at last + + flags |= ((uint16_t)p_pos_qual->position_status << 7) & POS_QUAL_FLAG_POSITION_STATUS; + + if (p_pos_qual->number_of_satellites_in_solution_present) + { + flags |= POS_QUAL_FLAG_NUM_SATS_IN_SOLUTION_PRESENT; + p_encoded_buffer[len++] = p_pos_qual->number_of_satellites_in_solution; + } + + if (p_pos_qual->number_of_satellites_in_view_present) + { + flags |= POS_QUAL_FLAG_NUM_SATS_IN_VIEW_PRESENT; + p_encoded_buffer[len++] = p_pos_qual->number_of_satellites_in_view; + } + + if (p_pos_qual->time_to_first_fix_present) + { + flags |= POS_QUAL_FLAG_TIME_TO_FIRST_FIX_PRESESNT; + len += uint16_encode(p_pos_qual->time_to_first_fix, &p_encoded_buffer[len]); + } + + if (p_pos_qual->ehpe_present) + { + flags |= POS_QUAL_FLAG_EHPE_PRESENT; + len += uint32_encode(p_pos_qual->ehpe, &p_encoded_buffer[len]); + } + + if (p_pos_qual->evpe_present) + { + flags |= POS_QUAL_FLAG_EVPE_PRESENT; + len += uint32_encode(p_pos_qual->evpe, &p_encoded_buffer[len]); + } + + if (p_pos_qual->hdop_present) + { + flags |= POS_QUAL_FLAG_HDOP_PRESENT; + p_encoded_buffer[len++] = p_pos_qual->hdop; + } + + if (p_pos_qual->vdop_present) + { + flags |= POS_QUAL_FLAG_VDOP_PRESENT; + p_encoded_buffer[len++] = p_pos_qual->vdop; + } + + // Flags field + uint16_encode(flags, &p_encoded_buffer[0]); //lint !e534 "Ignoring return value of function" + + return len; +} + + +/**@brief Encode Location and Speed data packet 1 + * + * @param[in] p_lns Location and Navigation Service structure. + * @param[in] p_loc_speed Location and Speed data to be encoded. + * @param[out] p_encoded_buffer Pointer to buffer buffer where encoded data will be written. + * + * @return Size of encoded data. + * + */ +static uint8_t loc_speed_encode_packet1(ble_lns_t const * p_lns, + ble_lns_loc_speed_t const * p_loc_speed, + uint8_t * p_encoded_buffer) +{ + uint16_t flags = 0; + uint8_t len = 2; + + const ble_lncp_mask_t mask = ble_lncp_mask_get(&p_lns->ctrl_pt); + + // Instantaneous Speed + if (p_lns->available_features & BLE_LNS_FEATURE_INSTANT_SPEED_SUPPORTED) + { + if (p_loc_speed->instant_speed_present && !mask.instantaneous_speed) + { + flags |= LOC_SPEED_FLAG_INSTANT_SPEED_PRESENT; + flags |= ((uint16_t)p_loc_speed->data_format<<9) & LOC_SPEED_FLAG_SPEED_AND_DIST_FORMAT; + len += uint16_encode(p_loc_speed->instant_speed, &p_encoded_buffer[len]); + } + } + + // Total Distance + if (p_lns->available_features & BLE_LNS_FEATURE_TOTAL_DISTANCE_SUPPORTED) + { + if (p_loc_speed->total_distance_present && !mask.total_distance) + { + const uint32_t total_distance = ble_lncp_total_distance_get(&p_lns->ctrl_pt); + flags |= LOC_SPEED_FLAG_TOTAL_DISTANCE_PRESENT; + len += uint24_encode(total_distance, &p_encoded_buffer[len]); + } + } + + // Location + if (p_lns->available_features & BLE_LNS_FEATURE_LOCATION_SUPPORTED) + { + if (p_loc_speed->location_present && !mask.location) + { + flags |= LOC_SPEED_FLAG_LOCATION_PRESENT; + flags |= ((uint16_t)p_loc_speed->position_status <<7) & LOC_SPEED_FLAG_POSITION_STATUS; + len += uint32_encode(p_loc_speed->latitude, &p_encoded_buffer[len]); + len += uint32_encode(p_loc_speed->longitude, &p_encoded_buffer[len]); + } + } + + // Flags field + uint16_encode(flags, &p_encoded_buffer[0]); //lint !e534 "Ignoring return value of function" + + return len; +} + + +/**@brief Encode Location and Speed data packet 2 + * + * @param[in] p_lns Location and Navigation Service structure. + * @param[in] p_loc_speed Location and Speed data to be encoded. + * @param[out] p_encoded_buffer Pointer to buffer buffer where encoded data will be written. + * + * @return Size of encoded data. + * + */ +static uint8_t loc_speed_encode_packet2(ble_lns_t const * p_lns, + ble_lns_loc_speed_t const * p_loc_speed, + uint8_t * p_encoded_buffer) +{ + uint16_t flags = 0; + uint8_t len = 2; + + const ble_lncp_mask_t mask = ble_lncp_mask_get(&p_lns->ctrl_pt); + + flags = 0; + len = 2; + + // Elevation + if (p_lns->available_features & BLE_LNS_FEATURE_ELEVATION_SUPPORTED) + { + if (p_loc_speed->elevation_present && !mask.elevation) + { + const uint32_t elevation = ble_lncp_elevation_get(&p_lns->ctrl_pt); + + flags |= LOC_SPEED_FLAG_ELEVATION_PRESENT; + flags |= ((uint16_t) p_loc_speed->elevation_source << 10) & LOC_SPEED_FLAG_ELEVATION_SOURCE; + len += uint24_encode(elevation, &p_encoded_buffer[len]); + } + } + + // Heading + if (p_lns->available_features & BLE_LNS_FEATURE_HEADING_SUPPORTED) + { + if (p_loc_speed->heading_present && !mask.heading) + { + flags |= LOC_SPEED_FLAG_HEADING_PRESENT; + flags |= ((uint16_t) p_loc_speed->heading_source << 12) & LOC_SPEED_FLAG_HEADING_SOURCE; + len += uint16_encode(p_loc_speed->heading, &p_encoded_buffer[len]); + } + } + + // Rolling Time + if (p_lns->available_features & BLE_LNS_FEATURE_ROLLING_TIME_SUPPORTED) + { + if ((p_loc_speed->rolling_time_present && !mask.rolling_time)) + { + flags |= LOC_SPEED_FLAG_ROLLING_TIME_PRESENT; + p_encoded_buffer[len++] = p_loc_speed->rolling_time; + } + } + + // UTC Time + if (p_lns->available_features & BLE_LNS_FEATURE_UTC_TIME_SUPPORTED) + { + if ((p_loc_speed->utc_time_time_present && !mask.utc_time)) + { + flags |= LOC_SPEED_FLAG_UTC_TIME_PRESENT; + len += ble_date_time_encode(&p_loc_speed->utc_time, &p_encoded_buffer[len]); + } + } + // Flags field + uint16_encode(flags, &p_encoded_buffer[0]); //lint !e534 "Ignoring return value of function" + + return len; +} + + +/**@brief Encode Navigation data. + * + * @param[in] p_lns Location and Navigation Service structure. + * @param[in] p_navigation Navigation data to be encoded. + * @param[out] p_encoded_buffer Buffer where the encoded data will be written. + * + * @return Size of encoded data. + */ +static uint8_t navigation_encode(ble_lns_t const * p_lns, + ble_lns_navigation_t const * p_navigation, + uint8_t * p_encoded_buffer) +{ + uint16_t flags = 0; + uint8_t len = 2; + + // Bearing + len += uint16_encode(p_navigation->bearing, &p_encoded_buffer[len]); + + // Heading + len += uint16_encode(p_navigation->heading, &p_encoded_buffer[len]); + + // Remaining Distance + if (p_lns->available_features & BLE_LNS_FEATURE_REMAINING_DISTANCE_SUPPORTED) + { + if (p_navigation->remaining_dist_present) + { + flags |= NAV_FLAG_REMAINING_DIST_PRESENT; + p_encoded_buffer[len++] = ((p_navigation->remaining_distance >> 0) & 0xFF); + p_encoded_buffer[len++] = ((p_navigation->remaining_distance >> 8) & 0xFF); + p_encoded_buffer[len++] = ((p_navigation->remaining_distance >> 16) & 0xFF); + } + } + + // Remaining Vertical Distance + if (p_lns->available_features & BLE_LNS_FEATURE_REMAINING_VERT_DISTANCE_SUPPORTED) + { + if (p_navigation->remaining_vert_dist_present) + { + flags |= NAV_FLAG_REAMINGING_VERT_DIST_PRESESNT; + p_encoded_buffer[len++] = ((p_navigation->remaining_vert_distance >> 0) & 0xFF); + p_encoded_buffer[len++] = ((p_navigation->remaining_vert_distance >> 8) & 0xFF); + p_encoded_buffer[len++] = ((p_navigation->remaining_vert_distance >> 16) & 0xFF); + } + } + + // Estimated Time of Arrival + if (p_lns->available_features & BLE_LNS_FEATURE_EST_TIME_OF_ARRIVAL_SUPPORTED) + { + if (p_navigation->eta_present) + { + flags |= NAV_FLAG_ETA_PRESENT; + len += ble_date_time_encode(&p_navigation->eta, &p_encoded_buffer[len]); + } + } + + flags |= ((uint16_t)p_navigation->position_status <<3) & NAV_FLAG_POSITION_STATUS; + flags |= ((uint16_t)p_navigation->heading_source <<5) & NAV_FLAG_HEADING_SOURCE; + flags |= ((uint16_t)p_navigation->navigation_indicator_type<<6)& NAV_FLAG_NAVIGATION_INDICATOR_TYPE; + flags |= ((uint16_t)p_navigation->waypoint_reached <<7)& NAV_FLAG_WAYPOINT_REACHED; + flags |= ((uint16_t)p_navigation->destination_reached <<8)& NAV_FLAG_DESTINATION_REACHED; + + // Flags field + uint16_encode(flags, &p_encoded_buffer[0]); //lint !e534 "Ignoring return value of function" + + return len; +} + + +/**@brief Add Location and Navigation Feature characteristic. + * + * @param[in] p_lns Location and Navigation Service structure. + * @param[in] p_lns_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static ret_code_t loc_and_nav_feature_char_add(ble_lns_t * p_lns, ble_lns_init_t const * p_lns_init) +{ + uint8_t init_value_encoded[sizeof(uint32_t)]; + uint8_t len; + ble_add_char_params_t add_char_params; + + len = uint32_encode(p_lns_init->available_features, init_value_encoded); + + memset(&add_char_params, 0, sizeof(add_char_params)); + + add_char_params.uuid = BLE_UUID_LN_FEATURE_CHAR; + add_char_params.max_len = len; + add_char_params.init_len = len; + add_char_params.p_init_value = &init_value_encoded[0]; + add_char_params.char_props.read = true; + add_char_params.read_access = p_lns_init->loc_nav_feature_security_req_read_perm; + + return characteristic_add(p_lns->service_handle, + &add_char_params, + &p_lns->feature_handles); +} + + +/**@brief Add Location and Speed characteristic. + * + * @param[in] p_lns Location and Navigation Service structure. + * @param[in] p_lns_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static ret_code_t loc_speed_char_add(ble_lns_t * p_lns, ble_lns_init_t const * p_lns_init) +{ + uint8_t encoded_initial_loc_speed1[BLE_L2CAP_MTU_DEF ]; + uint8_t len; + ble_add_char_params_t add_char_params; + + len = loc_speed_encode_packet1(p_lns, p_lns_init->p_location_speed, &encoded_initial_loc_speed1[0]); + + memset(&add_char_params, 0, sizeof(add_char_params)); + + add_char_params.uuid = BLE_UUID_LN_LOCATION_AND_SPEED_CHAR; + add_char_params.max_len = BLE_L2CAP_MTU_DEF ; + add_char_params.init_len = len; + add_char_params.p_init_value = &encoded_initial_loc_speed1[0]; + add_char_params.is_var_len = true; + add_char_params.char_props.notify = true; + add_char_params.cccd_write_access = p_lns_init->loc_speed_security_req_cccd_write_perm; + + return characteristic_add(p_lns->service_handle, + &add_char_params, + &p_lns->loc_speed_handles); +} + + +/**@brief Add Location and Navigation position quality characteristic. + * + * @param[in] p_lns Location and Navigation Service structure. + * @param[in] p_lns_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static ret_code_t pos_quality_char_add(ble_lns_t * p_lns, ble_lns_init_t const * p_lns_init) +{ + uint8_t len; + uint8_t init_value_encoded[BLE_L2CAP_MTU_DEF]; + ble_add_char_params_t add_char_params; + + len = pos_qual_encode(p_lns, p_lns_init->p_position_quality, init_value_encoded); + + memset(&add_char_params, 0, sizeof(add_char_params)); + + add_char_params.uuid = BLE_UUID_LN_POSITION_QUALITY_CHAR; + add_char_params.max_len = BLE_L2CAP_MTU_DEF ; + add_char_params.init_len = len; + add_char_params.p_init_value = init_value_encoded; + add_char_params.char_props.read = true; + add_char_params.read_access = p_lns_init->position_quality_security_req_read_perm; + + return characteristic_add(p_lns->service_handle, + &add_char_params, + &p_lns->pos_qual_handles); +} + + +/**@brief Add Navigation characteristic. + * + * @param[in] p_lns Location and Navigation Service structure. + * @param[in] p_lns_init Information needed to initialize the service. + * + * @return NRF_SUCCESS on success, otherwise an error code. + */ +static ret_code_t navigation_char_add(ble_lns_t * p_lns, ble_lns_init_t const * p_lns_init) +{ + ble_add_char_params_t add_char_params; + + memset(&add_char_params, 0, sizeof(add_char_params)); + + add_char_params.uuid = BLE_UUID_LN_NAVIGATION_CHAR; + add_char_params.max_len = BLE_LNS_NAV_MAX_LEN; + add_char_params.init_len = 0; + add_char_params.p_init_value = NULL; + add_char_params.char_props.notify = true; + add_char_params.cccd_write_access = p_lns_init->navigation_security_req_cccd_write_perm; + + return characteristic_add(p_lns->service_handle, + &add_char_params, + &p_lns->navigation_handles); +} + + +/** @brief Check if there is a mismatch in initialization parameters. + * + * @details It is possible to give an input which has an internal mismatch. Such a mismatch can arise in two different ways. + * One possibility is a mismatch between the characteristic present indicators and the available features specified. + * The other mismatch arises when no pointer to the characteristic data structure is specified. + * + * @param[in] p_lns_init The init structure which will be checked + * + * @return false if there is no mismatch. true if there is a mismatch + */ +static bool init_param_mismatch_present(ble_lns_init_t const * p_lns_init) +{ + if (p_lns_init->is_position_quality_present == false) + { + if (p_lns_init->available_features & + (BLE_LNS_FEATURE_NUM_SATS_IN_SOLUTION_SUPPORTED | + BLE_LNS_FEATURE_NUM_SATS_IN_VIEW_SUPPORTED | + BLE_LNS_FEATURE_TIME_TO_FIRST_FIX_SUPPORTED | + BLE_LNS_FEATURE_EST_HORZ_POS_ERROR_SUPPORTED | + BLE_LNS_FEATURE_EST_VERT_POS_ERROR_SUPPORTED | + BLE_LNS_FEATURE_HORZ_DILUTION_OF_PRECISION_SUPPORTED | + BLE_LNS_FEATURE_VERT_DILUTION_OF_PRECISION_SUPPORTED) + ) + { + return true; + } + if (p_lns_init->p_position_quality != NULL) + { + return true; + } + } + else if (p_lns_init->is_position_quality_present == true) + { + if (p_lns_init->p_position_quality == NULL) + { + return true; + } + } + + if (p_lns_init->is_control_point_present == false) + { + if (p_lns_init->available_features & + (BLE_LNS_FEATURE_LOC_AND_SPEED_CONTENT_MASKING_SUPPORTED | + BLE_LNS_FEATURE_FIX_RATE_SETTING_SUPPORTED | + BLE_LNS_FEATURE_ELEVATION_SETTING_SUPPORTED) + ) + { + return true; + } + } + + if (p_lns_init->is_navigation_present == false) + { + if (p_lns_init->available_features & + (BLE_LNS_FEATURE_REMAINING_DISTANCE_SUPPORTED | + BLE_LNS_FEATURE_REMAINING_VERT_DISTANCE_SUPPORTED | + BLE_LNS_FEATURE_EST_TIME_OF_ARRIVAL_SUPPORTED) + ) + { + return true; + } + if (p_lns_init->p_navigation != NULL) + { + return true; + } + } + else if (p_lns_init->is_navigation_present == true) + { + if (p_lns_init->p_navigation == NULL) + { + return true; + } + } + + // location and speed must always be specified + if (p_lns_init->p_location_speed == NULL) + { + return true; + } + + return false; +} + + +void ble_lns_on_ble_evt(ble_lns_t * p_lns, ble_evt_t const * p_ble_evt) +{ + VERIFY_PARAM_NOT_NULL_VOID(p_lns); + VERIFY_PARAM_NOT_NULL_VOID(p_ble_evt); + + ble_lncp_on_ble_evt(&p_lns->ctrl_pt, p_ble_evt); + + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + on_connect(p_lns, p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + on_disconnect(p_lns, p_ble_evt); + break; + + case BLE_GATTS_EVT_WRITE: + on_write(p_lns, p_ble_evt); + break; + + case BLE_EVT_TX_COMPLETE: + on_tx_complete(p_lns); + break; + + default: + // no implementation + break; + } +} + + +ret_code_t ble_lns_init(ble_lns_t * p_lns, ble_lns_init_t const * p_lns_init) +{ + VERIFY_PARAM_NOT_NULL(p_lns); + VERIFY_PARAM_NOT_NULL(p_lns_init); + + if (init_param_mismatch_present(p_lns_init) == true) + { + return NRF_ERROR_INVALID_PARAM; + } + + uint32_t err_code; + ble_uuid_t service_uuid; + ble_lncp_init_t lncp_init; + + // Initialize service structure + p_lns->evt_handler = p_lns_init->evt_handler; + p_lns->error_handler = p_lns_init->error_handler; + p_lns->conn_handle = BLE_CONN_HANDLE_INVALID; + p_lns->available_features = p_lns_init->available_features; + p_lns->is_navigation_present = p_lns_init->is_navigation_present; + + // clear pending notifications + p_lns->pending_loc_speed_notifications[0].is_pending = false; + p_lns->pending_loc_speed_notifications[1].is_pending = false; + p_lns->pending_navigation_notification.is_pending = false; + + p_lns->p_location_speed = p_lns_init->p_location_speed; + p_lns->p_position_quality = p_lns_init->p_position_quality; + p_lns->p_navigation = p_lns_init->p_navigation; + + p_lns->is_loc_speed_notification_enabled = false; + p_lns->is_nav_notification_enabled = false; + + ble_ln_db_init(); + + // Add service + BLE_UUID_BLE_ASSIGN(service_uuid, BLE_UUID_LOCATION_AND_NAVIGATION_SERVICE); + + err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &service_uuid, &p_lns->service_handle); + VERIFY_SUCCESS(err_code); + + // Add location and navigation feature characteristic + err_code = loc_and_nav_feature_char_add(p_lns, p_lns_init); + VERIFY_SUCCESS(err_code); + + // Add location and speed characteristic + err_code = loc_speed_char_add(p_lns, p_lns_init); + VERIFY_SUCCESS(err_code); + + if (p_lns_init->is_position_quality_present) + { + // Add Position quality characteristic + err_code = pos_quality_char_add(p_lns, p_lns_init); + VERIFY_SUCCESS(err_code); + } + else + { + p_lns->pos_qual_handles.cccd_handle = BLE_GATT_HANDLE_INVALID; + p_lns->pos_qual_handles.sccd_handle = BLE_GATT_HANDLE_INVALID; + p_lns->pos_qual_handles.user_desc_handle = BLE_GATT_HANDLE_INVALID; + p_lns->pos_qual_handles.value_handle = BLE_GATT_HANDLE_INVALID; + } + + if (p_lns_init->is_navigation_present) + { + // Add navigation characteristic + err_code = navigation_char_add(p_lns, p_lns_init); + VERIFY_SUCCESS(err_code); + } + else + { + p_lns->navigation_handles.cccd_handle = BLE_GATT_HANDLE_INVALID; + p_lns->navigation_handles.sccd_handle = BLE_GATT_HANDLE_INVALID; + p_lns->navigation_handles.user_desc_handle = BLE_GATT_HANDLE_INVALID; + p_lns->navigation_handles.value_handle = BLE_GATT_HANDLE_INVALID; + } + + if (p_lns_init->is_control_point_present) + { + lncp_init.error_handler = p_lns_init->error_handler; + lncp_init.evt_handler = p_lns_init->lncp_evt_handler; + lncp_init.write_perm = p_lns_init->ctrl_point_security_req_write_perm; + lncp_init.cccd_write_perm = p_lns_init->ctrl_point_security_req_cccd_write_perm; + lncp_init.available_features = p_lns_init->available_features; + lncp_init.is_position_quality_present = p_lns_init->is_position_quality_present; + lncp_init.is_navigation_present = p_lns_init->is_navigation_present; + + lncp_init.total_distance = p_lns_init->p_location_speed->total_distance; + lncp_init.elevation = p_lns_init->p_location_speed->elevation; + + lncp_init.service_handle = p_lns->service_handle; + lncp_init.navigation_handles = p_lns->navigation_handles; + + // Add control pointer characteristic + err_code = ble_lncp_init(&p_lns->ctrl_pt, &lncp_init); + VERIFY_SUCCESS(err_code); + + memcpy(&p_lns->ctrlpt_handles, &p_lns->ctrl_pt.ctrlpt_handles, sizeof(ble_gatts_char_handles_t)); + } + + LNS_LOG("Initialized\n"); + + return NRF_SUCCESS; +} + + +ret_code_t ble_lns_loc_speed_send(ble_lns_t * p_lns) +{ + VERIFY_PARAM_NOT_NULL(p_lns); + + if (p_lns->conn_handle == BLE_CONN_HANDLE_INVALID) + { + return NRF_ERROR_INVALID_STATE; + } + + if (!p_lns->is_loc_speed_notification_enabled) + { + return NRF_ERROR_INVALID_STATE; + } + + notification_t * notif1 = &p_lns->pending_loc_speed_notifications[0]; + notification_t * notif2 = &p_lns->pending_loc_speed_notifications[1]; + + // clear previous unsent data. Previous data is invalid. + notif1->is_pending = false; + notif2->is_pending = false; + + // check if it is necessary to send packet 1 + if (p_lns->available_features & (BLE_LNS_FEATURE_INSTANT_SPEED_SUPPORTED + | BLE_LNS_FEATURE_TOTAL_DISTANCE_SUPPORTED + | BLE_LNS_FEATURE_LOCATION_SUPPORTED)) + { + // encode + notif1->len = loc_speed_encode_packet1(p_lns, p_lns->p_location_speed, ¬if1->data[0]); + notif1->handle = p_lns->loc_speed_handles.value_handle; + notif1->is_pending = true; + + // send + notification_buffer_process(p_lns); + } + + // check if it is necessary to send packet 2 + if (p_lns->available_features & (BLE_LNS_FEATURE_ELEVATION_SUPPORTED + | BLE_LNS_FEATURE_HEADING_SUPPORTED + | BLE_LNS_FEATURE_ROLLING_TIME_SUPPORTED + | BLE_LNS_FEATURE_UTC_TIME_SUPPORTED)) + { + notif2->len = loc_speed_encode_packet2(p_lns, p_lns->p_location_speed, ¬if2->data[0]); + notif2->handle = p_lns->loc_speed_handles.value_handle; + notif2->is_pending = true; + + // send + notification_buffer_process(p_lns); + } + + return NRF_SUCCESS; +} + + +ret_code_t ble_lns_navigation_send(ble_lns_t * p_lns) +{ + VERIFY_PARAM_NOT_NULL(p_lns); + + if (p_lns->conn_handle == BLE_CONN_HANDLE_INVALID) + { + return NRF_ERROR_INVALID_STATE; + } + + notification_t * notif = &p_lns->pending_navigation_notification; + + // clear previous unsent data. Previous data is invalid. + notif->is_pending = false; + + if (!p_lns->is_navigation_present) + { + return NRF_ERROR_NOT_SUPPORTED; + } + + if (!p_lns->is_nav_notification_enabled) + { + return NRF_ERROR_INVALID_STATE; + } + + if (!ble_lncp_is_navigation_running(&p_lns->ctrl_pt)) + { + return NRF_ERROR_INVALID_STATE; + } + + notif->len = navigation_encode(p_lns, p_lns->p_navigation, ¬if->data[0]); + notif->handle = p_lns->navigation_handles.value_handle; + notif->is_pending = true; + + notification_buffer_process(p_lns); + + return NRF_SUCCESS; +} + + +ret_code_t ble_lns_add_route(ble_lns_t * p_lns, ble_lns_route_t * p_route) +{ + VERIFY_PARAM_NOT_NULL(p_lns); + VERIFY_PARAM_NOT_NULL(p_route); + + if (p_lns->is_navigation_present == false) + { + return NRF_ERROR_NOT_SUPPORTED; + } + + return ble_ln_db_record_add(p_route); +} + + +ret_code_t ble_lns_remove_route(ble_lns_t * p_lns, uint16_t route_id) +{ + VERIFY_PARAM_NOT_NULL(p_lns); + + if (p_lns->is_navigation_present == false) + { + return NRF_ERROR_NOT_SUPPORTED; + } + + return ble_ln_db_record_delete(route_id); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_lns.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_lns.h new file mode 100644 index 0000000000..1810d37299 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_lns.h @@ -0,0 +1,328 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_sdk_srv_lns Location and Navigation Service + * @{ + * @ingroup ble_sdk_srv + * @brief Location and Navigation Service module. + * + * @details This module implements the Location and Navigation Service with the Location and Speed, Position + * Quality, Feature, Control Point, and Navigation characteristics. + * + * If an event handler is supplied by the application, the Location and Navigation Service will + * generate Location and Navigation Service events to the application. + * + * @note The application must propagate BLE stack events to the Location and Navigation Service module by calling + * @ref ble_lns_on_ble_evt() from the from the ble_stack_handler callback. + */ + +#ifndef BLE_LNS_H__ +#define BLE_LNS_H__ + +#include "ble_srv_common.h" +#include "ble_date_time.h" +#include "ble_ln_common.h" +#include "ble_ln_cp.h" +#include "sdk_common.h" + +/** @brief Location and Navigation event type. This list defines the possible events types from the Location and Navigation Service. */ +typedef enum { + BLE_LNS_CTRLPT_EVT_INDICATION_ENABLED, /**< Control Point value indication was enabled. */ + BLE_LNS_CTRLPT_EVT_INDICATION_DISABLED, /**< Control Point value indication was disabled. */ + BLE_LNS_LOC_SPEED_EVT_NOTIFICATION_ENABLED, /**< Location and Speed value notification was enabled. */ + BLE_LNS_LOC_SPEED_EVT_NOTIFICATION_DISABLED, /**< Location and Speed value notification was disabled. */ + BLE_LNS_NAVIGATION_EVT_NOTIFICATION_ENABLED, /**< Navigation value notification was enabled. */ + BLE_LNS_NAVIGATION_EVT_NOTIFICATION_DISABLED, /**< Navigation value notification was disabled. */ +} ble_lns_evt_type_t; + +/** @brief Location and Navigation event structure. When an event occurs, the data structures of the module are automatically updated. */ +typedef struct { + ble_lns_evt_type_t evt_type; +} ble_lns_evt_t; + +// Forward declarations of the ble_lns types. +typedef struct ble_lns_init_s ble_lns_init_t; +typedef struct ble_lns_s ble_lns_t; +typedef struct ble_lns_loc_speed_s ble_lns_loc_speed_t; +typedef struct ble_lns_pos_quality_s ble_lns_pos_quality_t; +typedef struct ble_lns_navigation_s ble_lns_navigation_t; + + +typedef struct { + bool is_pending; + uint16_t handle; + uint16_t len; + uint8_t data[GATT_MTU_SIZE_DEFAULT]; +} notification_t; + + +/**@brief Location and Navigation Service event handler type. */ +typedef void (*ble_lns_evt_handler_t) (ble_lns_t const * p_lns, ble_lns_evt_t const * p_evt); + + +/**@brief Location and Navigation Service init structure. This structure contains all options and data needed to + * initialize the service. */ +struct ble_lns_init_s +{ + ble_lns_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Location and Navigation Service. */ + ble_lncp_evt_handler_t lncp_evt_handler; + ble_srv_error_handler_t error_handler; /**< Errors will be sent back to this function. */ + + bool is_position_quality_present; /**< If set to true, the position quality characteristic will be added. Else not. */ + bool is_control_point_present; /**< If set to true, the control point characteristic will be added. Else not. */ + bool is_navigation_present; /**< If set to true, the navigation characteristic will be added. Else not. */ + + security_req_t loc_nav_feature_security_req_read_perm; /**< Read security level of the LN Feature characteristic. */ + security_req_t loc_speed_security_req_cccd_write_perm; /**< CCCD write security level of the Write Location and Speed characteristic. */ + security_req_t position_quality_security_req_read_perm; /**< Read security level of the Position Quality characteristic. */ + security_req_t navigation_security_req_cccd_write_perm; /**< CCCD write security level of the Navigation characteristic. */ + security_req_t ctrl_point_security_req_write_perm; /**< Read security level of the LN Control Point characteristic. */ + security_req_t ctrl_point_security_req_cccd_write_perm; /**< CCCD write security level of the LN Control Point characteristic. */ + + uint32_t available_features; /**< Value of the LN feature. */ + ble_lns_loc_speed_t * p_location_speed; /**< Initial Location and Speed. */ + ble_lns_pos_quality_t * p_position_quality; /**< Initial Position Quality. */ + ble_lns_navigation_t * p_navigation; /**< Initial Navigation data structure. */ +}; + + +/**@brief Definition of a navigation route.*/ +typedef struct +{ + uint16_t route_id; + uint8_t route_name[BLE_LNS_MAX_ROUTE_NAME_LEN]; +} ble_lns_route_t; + + +/**@brief Location and Navigation Service structure. This structure contains various status information for the service. */ +struct ble_lns_s +{ + ble_lns_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Location and Navigation Service. */ + ble_srv_error_handler_t error_handler; /**< Error handler. */ + + bool is_navigation_present; /**< If set to true, the navigation characteristic is present. Else not. */ + + uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack; BLE_CONN_HANDLE_INVALID if not in a connection). */ + uint16_t service_handle; /**< Handle of Location and Navigation Service (as provided by the BLE stack). */ + ble_gatts_char_handles_t loc_speed_handles; /**< Handles related to the Location and Speed characteristic. */ + ble_gatts_char_handles_t feature_handles; /**< Handles related to the Location and Navigation Feature characteristic. */ + ble_gatts_char_handles_t navigation_handles; /**< Handles related to the Navigation characteristic. */ + ble_gatts_char_handles_t pos_qual_handles; /**< Handles related to the Position Quality characteristic. */ + ble_gatts_char_handles_t ctrlpt_handles; + uint32_t available_features; /**< Value of Location and Navigation feature. */ + + bool is_loc_speed_notification_enabled; /**< True if notification is enabled on the Location and Speed characteristic. */ + bool is_nav_notification_enabled; /**< True if notification is enabled on the Navigation characteristic. */ + + notification_t pending_loc_speed_notifications[2]; /**< This buffer holds location and speed notifications. */ + notification_t pending_navigation_notification; /**< This buffer holds navigation notifications. */ + ble_lns_loc_speed_t * p_location_speed; /**< Location and Speed. */ + ble_lns_pos_quality_t * p_position_quality; /**< Position measurement quality. */ + ble_lns_navigation_t * p_navigation; /**< Navigation data structure. */ + ble_lncp_t ctrl_pt; +}; + + +/** @brief Position status. This enumeration defines how to interpret the position data. */ +typedef enum +{ + BLE_LNS_NO_POSITION = 0, + BLE_LNS_POSITION_OK = 1, + BLE_LNS_ESTIMATED = 2, + BLE_LNS_LAST_KNOWN_POSITION = 3 +} ble_lns_pos_status_type_t; + + +/** @brief The format of the position and speed measurements. */ +typedef enum +{ + BLE_LNS_SPEED_DISTANCE_FORMAT_2D = 0, + BLE_LNS_SPEED_DISTANCE_FORMAT_3D = 1 +} ble_lns_speed_distance_format_t; + + +/** @brief Elevation source. */ +typedef enum +{ + BLE_LNS_ELEV_SOURCE_POSITIONING_SYSTEM = 0, + BLE_LNS_ELEV_SOURCE_BAROMETRIC = 1, + BLE_LNS_ELEV_SOURCE_DATABASE_SERVICE = 2, + BLE_LNS_ELEV_SOURCE_OTHER = 3 +} ble_lns_elevation_source_t; + + +/** @brief Heading source. */ +typedef enum +{ + BLE_LNS_HEADING_SOURCE_MOVEMENT = 0, + BLE_LNS_HEADING_SOURCE_COMPASS = 1 +} ble_lns_heading_source_t; + + +/**@brief Location and Speed data structure. */ +struct ble_lns_loc_speed_s +{ + bool instant_speed_present; /**< Instantaneous Speed present (0=not present, 1=present). */ + bool total_distance_present; /**< Total Distance present (0=not present, 1=present). */ + bool location_present; /**< Location present (0=not present, 1=present). */ + bool elevation_present; /**< Elevation present (0=not present, 1=present). */ + bool heading_present; /**< Heading present (0=not present, 1=present). */ + bool rolling_time_present; /**< Rolling Time present (0=not present, 1=present). */ + bool utc_time_time_present; /**< UTC Time present (0=not present, 1=present). */ + ble_lns_pos_status_type_t position_status; /**< Status of current position */ + ble_lns_speed_distance_format_t data_format; /**< Format of data (either 2D or 3D). */ + ble_lns_elevation_source_t elevation_source; /**< Source of the elevation measurement. */ + ble_lns_heading_source_t heading_source; /**< Source of the heading measurement. */ + uint16_t instant_speed; /**< Instantaneous Speed (1/10 meter per sec). */ + uint32_t total_distance; /**< Total Distance (meters), size=24 bits. */ + int32_t latitude; /**< Latitude (10e-7 degrees). */ + int32_t longitude; /**< Longitude (10e-7 degrees). */ + int32_t elevation; /**< Elevation (1/100 meters), size=24 bits. */ + uint16_t heading; /**< Heading (1/100 degrees). */ + uint8_t rolling_time; /**< Rolling Time (seconds). */ + ble_date_time_t utc_time; /**< UTC Time. */ +}; + + +/** @brief Position quality structure. */ +struct ble_lns_pos_quality_s +{ + bool number_of_satellites_in_solution_present; /**< The number of satellites present in solution (0=not present, 1=present). */ + bool number_of_satellites_in_view_present; /**< The number of satellites present in solution (0=not present, 1=present). */ + bool time_to_first_fix_present; /**< Time to the first position fix present (0=not present, 1=present). */ + bool ehpe_present; /**< Error in horizontal position estimate present (0=not present, 1=present). */ + bool evpe_present; /**< Error in vertical position estimate present (0=not present, 1=present). */ + bool hdop_present; /**< Horizontal dilution of precision present (0=not present, 1=present). */ + bool vdop_present; /**< Vertical dilution of precision present (0=not present, 1=present). */ + ble_lns_pos_status_type_t position_status; /**< Status of last measured position. */ + uint8_t number_of_satellites_in_solution; /**< The number of satellites in solution (unitless, with a resolution of 1). */ + uint8_t number_of_satellites_in_view; /**< The number of satellites in view (unitless, with a resolution of 1). */ + uint16_t time_to_first_fix; /**< Time to the first position fix (seconds, with a resolution of 1/10). */ + uint32_t ehpe; /**< Error in horizontal position estimate (meters, with a resolution of 1/100). */ + uint32_t evpe; /**< Error in vertical position estimate (meters, with a resolution of 1/100). */ + uint8_t hdop; /**< Horizontal dilution of precision (unitless, with a resolution of 2/10). */ + uint8_t vdop; /**< Vertical dilution of precision (unitless, with a resolution of 2/10). */ +}; + + +/** @brief Navigation indicator type. */ +typedef enum +{ + BLE_LNS_NAV_TO_WAYPOINT = 0, + BLE_LNS_NAV_TO_DESTINATION = 1 +} ble_lns_nav_indicator_type_t; + + +/**@brief Navigation data structure. */ +struct ble_lns_navigation_s +{ + bool remaining_dist_present; /**< Remaining Distance present (0=not present, 1=present). */ + bool remaining_vert_dist_present; /**< Remaining Vertical Distance present (0=not present, 1=present). */ + bool eta_present; /**< Estimated Time of Arrival present (0=not present, 1=present). */ + ble_lns_pos_status_type_t position_status; /**< Status of last measured position. */ + ble_lns_heading_source_t heading_source; /**< Source of the heading measurement. */ + ble_lns_nav_indicator_type_t navigation_indicator_type; /**< Navigation indicator type. */ + bool waypoint_reached; /**< Waypoint Reached (0=not reached, 1=reached). */ + bool destination_reached; /**< Destination Reached (0=not reached, 1=reached). */ + uint16_t bearing; /**< Bearing (1/100 degrees).*/ + uint16_t heading; /**< Heading (1/100 degrees), size=24 bit. */ + uint32_t remaining_distance; /**< Remaining Distance (1/10 meters), size=24 bit. */ + int32_t remaining_vert_distance; /**< Remaining Vertical Distance (1/100 meters), size=24 bit. */ + ble_date_time_t eta; /**< Estimated Time of Arrival. */ +}; + + +/**@brief Function for initializing the Location and Navigation Service. + * + * @param[out] p_lns Location and Navigation Service structure. This structure must be supplied by + * the application. It is initialized by this function, and will later + * be used to identify this particular service instance. + * @param[in] p_lns_init Information needed to initialize the service. + * + * @retval NRF_SUCCESS If the service was initialized successfully. + * @retval NRF_ERROR_NULL If a NULL parameter was provided. + * @retval NRF_INVALID_PARAMS If there is an inconsistency in the initialization structure. + * @return Otherwise, an error code from either sd_ble_gatts_service_add() or sd_ble_gatts_characteristic_add() is returned. + */ +ret_code_t ble_lns_init(ble_lns_t * p_lns, const ble_lns_init_t * p_lns_init); + +/**@brief Function for handling Location and Navigation Service BLE stack events. + * + * @details This function handles all events from the BLE stack that are of interest to the Location and Navigation Service. + * + * @note The function returns when a NULL parameter is provided. + * + * @param[in] p_lns Location and Navigation Service structure. + * @param[in] p_ble_evt Event received from the BLE stack. + * + */ +void ble_lns_on_ble_evt(ble_lns_t * p_lns, ble_evt_t const * p_ble_evt); + +/**@brief Function for sending location and speed data if notification has been enabled. + * + * @details The application calls this function after having performed a location and speed determination. + * If notification has been enabled, the location and speed data is encoded and sent to + * the client. + * + * @param[in] p_lns Location and Navigation Service structure holding the location and speed data. + * + * @retval NRF_SUCCESS If the data was sent successfully. + * @retval NRF_ERROR_NULL If a NULL parameter was provided. + * @retval NRF_ERROR_INVALID_STATE If notification is disabled. + */ +ret_code_t ble_lns_loc_speed_send(ble_lns_t * p_lns); + +/**@brief Function for sending navigation data if notification has been enabled. + * + * @details The application calls this function after having performed a navigation determination. + * If notification has been enabled, the navigation data is encoded and sent to + * the client. + * + * @param[in] p_lns Location and Navigation Service structure holding the navigation data. + * + * @retval NRF_SUCCESS If the data was sent successfully. + * @retval NRF_ERROR_NULL If a NULL parameter was provided. + * @retval NRF_ERROR_NOT_SUPPORTED If the navigation characteristic is absent. + * @retval NRF_ERROR_INVALID_STATE If navigation is not running or notification is disabled. + */ +ret_code_t ble_lns_navigation_send(ble_lns_t * p_lns); + +/**@brief Function for adding a route to the Location and Navigation Service. + * + * @param[in] p_lns Location and Navigation Service structure. + * @param[in,out] p_route The new route to be added. The route ID is updated. + * + * @retval NRF_SUCCESS If the route was added successfully. + * @retval NRF_ERROR_NULL If a NULL parameter was provided. + * @retval NRF_ERROR_NOT_SUPPORTED If the navigation characteristic is absent. + * @retval NRF_ERROR_NO_MEM If there is no memory left. + * @retval NRF_ERROR_INTERNAL If there is an inconsistency in the routes table. + */ +ret_code_t ble_lns_add_route(ble_lns_t * p_lns, ble_lns_route_t * p_route); + +/**@brief Function for removing a route from the Location and Navigation Service. + * + * @param[in] p_lns Location and Navigation Service structure. + * @param[in] route_id The ID of the route to be removed. + * + * @retval NRF_SUCCESS If the route was removed successfully. + * @retval NRF_ERROR_NULL If a NULL parameter was provided. + * @retval NRF_ERROR_NOT_SUPPORTED If the navigation characteristic is absent. + * @retval NRF_INVALID_PARAM If the route ID does not exist. + */ +ret_code_t ble_lns_remove_route(ble_lns_t * p_lns, uint16_t route_id); + +#endif // BLE_LNS_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.c new file mode 100644 index 0000000000..44827bdc05 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.c @@ -0,0 +1,761 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "ble_advdata.h" +#include "ble_gap.h" +#include "ble_srv_common.h" +#include "sdk_common.h" + +// NOTE: For now, Security Manager Out of Band Flags (OOB) are omitted from the advertising data. + +// Types of LE Bluetooth Device Address AD type +#define AD_TYPE_BLE_DEVICE_ADDR_TYPE_PUBLIC 0UL +#define AD_TYPE_BLE_DEVICE_ADDR_TYPE_RANDOM 1UL + +static uint32_t tk_value_encode(ble_advdata_tk_value_t * p_tk_value, + uint8_t * p_encoded_data, + uint16_t * p_offset, + uint16_t max_size) +{ + int8_t i; + + // Check for buffer overflow. + if (((*p_offset) + AD_TYPE_TK_VALUE_SIZE) > max_size) + { + return NRF_ERROR_DATA_SIZE; + } + + // Encode LE Role. + p_encoded_data[*p_offset] = (uint8_t)(ADV_AD_TYPE_FIELD_SIZE + AD_TYPE_TK_VALUE_DATA_SIZE); + *p_offset += ADV_LENGTH_FIELD_SIZE; + p_encoded_data[*p_offset] = BLE_GAP_AD_TYPE_SECURITY_MANAGER_TK_VALUE; + *p_offset += ADV_AD_TYPE_FIELD_SIZE; + + for (i = AD_TYPE_TK_VALUE_DATA_SIZE - 1; i >= 0; i--, (*p_offset)++) + { + p_encoded_data[*p_offset] = p_tk_value->tk[i]; + } + + return NRF_SUCCESS; +} + +static uint32_t le_role_encode(ble_advdata_le_role_t le_role, + uint8_t * p_encoded_data, + uint16_t * p_offset, + uint16_t max_size) +{ + // Check for buffer overflow. + if (((*p_offset) + AD_TYPE_LE_ROLE_SIZE) > max_size) + { + return NRF_ERROR_DATA_SIZE; + } + + // Encode LE Role. + p_encoded_data[*p_offset] = (uint8_t)(ADV_AD_TYPE_FIELD_SIZE + AD_TYPE_LE_ROLE_DATA_SIZE); + *p_offset += ADV_LENGTH_FIELD_SIZE; + p_encoded_data[*p_offset] = BLE_GAP_AD_TYPE_LE_ROLE; + *p_offset += ADV_AD_TYPE_FIELD_SIZE; + switch(le_role) + { + case BLE_ADVDATA_ROLE_ONLY_PERIPH: + p_encoded_data[*p_offset] = 0; + break; + case BLE_ADVDATA_ROLE_ONLY_CENTRAL: + p_encoded_data[*p_offset] = 1; + break; + case BLE_ADVDATA_ROLE_BOTH_PERIPH_PREFERRED: + p_encoded_data[*p_offset] = 2; + break; + case BLE_ADVDATA_ROLE_BOTH_CENTRAL_PREFERRED: + p_encoded_data[*p_offset] = 3; + break; + default: + return NRF_ERROR_INVALID_PARAM; + } + *p_offset += AD_TYPE_LE_ROLE_DATA_SIZE; + + return NRF_SUCCESS; +} + +static uint32_t ble_device_addr_encode(uint8_t * p_encoded_data, + uint16_t * p_offset, + uint16_t max_size) +{ + uint32_t err_code; + ble_gap_addr_t device_addr; + + // Check for buffer overflow. + if (((*p_offset) + AD_TYPE_BLE_DEVICE_ADDR_SIZE) > max_size) + { + return NRF_ERROR_DATA_SIZE; + } + + // Get BLE address + err_code = sd_ble_gap_address_get(&device_addr); + VERIFY_SUCCESS(err_code); + + // Encode LE Bluetooth Device Address + p_encoded_data[*p_offset] = (uint8_t)(ADV_AD_TYPE_FIELD_SIZE + + AD_TYPE_BLE_DEVICE_ADDR_DATA_SIZE); + *p_offset += ADV_LENGTH_FIELD_SIZE; + p_encoded_data[*p_offset] = BLE_GAP_AD_TYPE_LE_BLUETOOTH_DEVICE_ADDRESS; + *p_offset += ADV_AD_TYPE_FIELD_SIZE; + memcpy(&p_encoded_data[*p_offset], &device_addr.addr[0], BLE_GAP_ADDR_LEN); + *p_offset += BLE_GAP_ADDR_LEN; + if(BLE_GAP_ADDR_TYPE_PUBLIC == device_addr.addr_type) + { + p_encoded_data[*p_offset] = AD_TYPE_BLE_DEVICE_ADDR_TYPE_PUBLIC; + } + else + { + p_encoded_data[*p_offset] = AD_TYPE_BLE_DEVICE_ADDR_TYPE_RANDOM; + } + *p_offset += AD_TYPE_BLE_DEVICE_ADDR_TYPE_SIZE; + + return NRF_SUCCESS; +} + +static uint32_t name_encode(const ble_advdata_t * p_advdata, + uint8_t * p_encoded_data, + uint16_t * p_offset, + uint16_t max_size) +{ + uint32_t err_code; + uint16_t rem_adv_data_len; + uint16_t actual_length; + uint8_t adv_data_format; + + + // Validate parameters + if((BLE_ADVDATA_SHORT_NAME == p_advdata->name_type) && (0 == p_advdata->short_name_len)) + { + return NRF_ERROR_INVALID_PARAM; + } + + // Check for buffer overflow. + if ( (((*p_offset) + ADV_AD_DATA_OFFSET) > max_size) || + ( (BLE_ADVDATA_SHORT_NAME == p_advdata->name_type) && + (((*p_offset) + ADV_AD_DATA_OFFSET + p_advdata->short_name_len) > max_size))) + { + return NRF_ERROR_DATA_SIZE; + } + + rem_adv_data_len = max_size - (*p_offset) - ADV_AD_DATA_OFFSET; + actual_length = rem_adv_data_len; + + // Get GAP device name and length + err_code = sd_ble_gap_device_name_get(&p_encoded_data[(*p_offset) + ADV_AD_DATA_OFFSET], + &actual_length); + VERIFY_SUCCESS(err_code); + + // Check if device intend to use short name and it can fit available data size. + if ((p_advdata->name_type == BLE_ADVDATA_FULL_NAME) && (actual_length <= rem_adv_data_len)) + { + // Complete device name can fit, setting Complete Name in Adv Data. + adv_data_format = BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME; + } + else + { + // Else short name needs to be used. Or application has requested use of short name. + adv_data_format = BLE_GAP_AD_TYPE_SHORT_LOCAL_NAME; + + // If application has set a preference on the short name size, it needs to be considered, + // else fit what can be fit. + if ((BLE_ADVDATA_SHORT_NAME == p_advdata->name_type) && + (p_advdata->short_name_len <= rem_adv_data_len)) + { + // Short name fits available size. + actual_length = p_advdata->short_name_len; + } + // Else whatever can fit the data buffer will be packed. + else + { + actual_length = rem_adv_data_len; + } + } + + // There is only 1 byte intended to encode length which is (actual_length + ADV_AD_TYPE_FIELD_SIZE) + if(actual_length > (0x00FF - ADV_AD_TYPE_FIELD_SIZE)) + { + return NRF_ERROR_DATA_SIZE; + } + + // Complete name field in encoded data. + p_encoded_data[*p_offset] = (uint8_t)(ADV_AD_TYPE_FIELD_SIZE + actual_length); + *p_offset += ADV_LENGTH_FIELD_SIZE; + p_encoded_data[*p_offset] = adv_data_format; + *p_offset += ADV_AD_TYPE_FIELD_SIZE; + *p_offset += actual_length; + + return NRF_SUCCESS; +} + + +static uint32_t appearance_encode(uint8_t * p_encoded_data, + uint16_t * p_offset, + uint16_t max_size) +{ + uint32_t err_code; + uint16_t appearance; + + // Check for buffer overflow. + if (((*p_offset) + AD_TYPE_APPEARANCE_SIZE) > max_size) + { + return NRF_ERROR_DATA_SIZE; + } + + // Get GAP appearance field. + err_code = sd_ble_gap_appearance_get(&appearance); + VERIFY_SUCCESS(err_code); + + // Encode Length, AD Type and Appearance. + p_encoded_data[*p_offset] = (uint8_t)(ADV_AD_TYPE_FIELD_SIZE + AD_TYPE_APPEARANCE_DATA_SIZE); + *p_offset += ADV_LENGTH_FIELD_SIZE; + p_encoded_data[*p_offset] = BLE_GAP_AD_TYPE_APPEARANCE; + *p_offset += ADV_AD_TYPE_FIELD_SIZE; + *p_offset += uint16_encode(appearance, &p_encoded_data[*p_offset]); + + return NRF_SUCCESS; +} + +static uint32_t flags_encode(int8_t flags, + uint8_t * p_encoded_data, + uint16_t * p_offset, + uint16_t max_size) +{ + // Check for buffer overflow. + if (((*p_offset) + AD_TYPE_FLAGS_SIZE) > max_size) + { + return NRF_ERROR_DATA_SIZE; + } + + // Encode flags. + p_encoded_data[*p_offset] = (uint8_t)(ADV_AD_TYPE_FIELD_SIZE + AD_TYPE_FLAGS_DATA_SIZE); + *p_offset += ADV_LENGTH_FIELD_SIZE; + p_encoded_data[*p_offset] = BLE_GAP_AD_TYPE_FLAGS; + *p_offset += ADV_AD_TYPE_FIELD_SIZE; + p_encoded_data[*p_offset] = flags; + *p_offset += AD_TYPE_FLAGS_DATA_SIZE; + + return NRF_SUCCESS; +} + +static uint32_t sec_mgr_oob_flags_encode(uint8_t oob_flags, + uint8_t * p_encoded_data, + uint16_t * p_offset, + uint16_t max_size) +{ + // Check for buffer overflow. + if (((*p_offset) + AD_TYPE_OOB_FLAGS_SIZE) > max_size) + { + return NRF_ERROR_DATA_SIZE; + } + + // Encode flags. + p_encoded_data[*p_offset] = (uint8_t)(ADV_AD_TYPE_FIELD_SIZE + AD_TYPE_OOB_FLAGS_DATA_SIZE); + *p_offset += ADV_LENGTH_FIELD_SIZE; + p_encoded_data[*p_offset] = BLE_GAP_AD_TYPE_SECURITY_MANAGER_OOB_FLAGS; + *p_offset += ADV_AD_TYPE_FIELD_SIZE; + p_encoded_data[*p_offset] = oob_flags; + *p_offset += AD_TYPE_OOB_FLAGS_DATA_SIZE; + + return NRF_SUCCESS; +} + +static uint32_t tx_power_level_encode(int8_t tx_power_level, + uint8_t * p_encoded_data, + uint16_t * p_offset, + uint16_t max_size) +{ + // Check for buffer overflow. + if (((*p_offset) + AD_TYPE_TX_POWER_LEVEL_SIZE) > max_size) + { + return NRF_ERROR_DATA_SIZE; + } + + // Encode TX Power Level. + p_encoded_data[*p_offset] = (uint8_t)(ADV_AD_TYPE_FIELD_SIZE + + AD_TYPE_TX_POWER_LEVEL_DATA_SIZE); + *p_offset += ADV_LENGTH_FIELD_SIZE; + p_encoded_data[*p_offset] = BLE_GAP_AD_TYPE_TX_POWER_LEVEL; + *p_offset += ADV_AD_TYPE_FIELD_SIZE; + p_encoded_data[*p_offset] = tx_power_level; + *p_offset += AD_TYPE_TX_POWER_LEVEL_DATA_SIZE; + + return NRF_SUCCESS; +} + + +static uint32_t uuid_list_sized_encode(const ble_advdata_uuid_list_t * p_uuid_list, + uint8_t adv_type, + uint8_t uuid_size, + uint8_t * p_encoded_data, + uint16_t * p_offset, + uint16_t max_size) +{ + int i; + bool is_heading_written = false; + uint16_t start_pos = *p_offset; + uint16_t length; + + for (i = 0; i < p_uuid_list->uuid_cnt; i++) + { + uint32_t err_code; + uint8_t encoded_size; + ble_uuid_t uuid = p_uuid_list->p_uuids[i]; + + // Find encoded uuid size. + err_code = sd_ble_uuid_encode(&uuid, &encoded_size, NULL); + VERIFY_SUCCESS(err_code); + + // Check size. + if (encoded_size == uuid_size) + { + uint8_t heading_bytes = (is_heading_written) ? 0 : ADV_AD_DATA_OFFSET; + + // Check for buffer overflow + if (((*p_offset) + encoded_size + heading_bytes) > max_size) + { + return NRF_ERROR_DATA_SIZE; + } + + if (!is_heading_written) + { + // Write AD structure heading. + *p_offset += ADV_LENGTH_FIELD_SIZE; + p_encoded_data[*p_offset] = adv_type; + *p_offset += ADV_AD_TYPE_FIELD_SIZE; + is_heading_written = true; + } + + // Write UUID. + err_code = sd_ble_uuid_encode(&uuid, &encoded_size, &p_encoded_data[*p_offset]); + VERIFY_SUCCESS(err_code); + *p_offset += encoded_size; + } + } + + if (is_heading_written) + { + // Write length. + length = (*p_offset) - (start_pos + ADV_LENGTH_FIELD_SIZE); + // There is only 1 byte intended to encode length + if(length > 0x00FF) + { + return NRF_ERROR_DATA_SIZE; + } + p_encoded_data[start_pos] = (uint8_t)length; + } + + return NRF_SUCCESS; +} + + +static uint32_t uuid_list_encode(const ble_advdata_uuid_list_t * p_uuid_list, + uint8_t adv_type_16, + uint8_t adv_type_128, + uint8_t * p_encoded_data, + uint16_t * p_offset, + uint16_t max_size) +{ + uint32_t err_code; + + // Encode 16 bit UUIDs. + err_code = uuid_list_sized_encode(p_uuid_list, + adv_type_16, + sizeof(uint16_le_t), + p_encoded_data, + p_offset, + max_size); + VERIFY_SUCCESS(err_code); + + // Encode 128 bit UUIDs. + err_code = uuid_list_sized_encode(p_uuid_list, + adv_type_128, + sizeof(ble_uuid128_t), + p_encoded_data, + p_offset, + max_size); + VERIFY_SUCCESS(err_code); + + return NRF_SUCCESS; +} + + +static uint32_t conn_int_check(const ble_advdata_conn_int_t *p_conn_int) +{ + // Check Minimum Connection Interval. + if ((p_conn_int->min_conn_interval < 0x0006) || + ( + (p_conn_int->min_conn_interval > 0x0c80) && + (p_conn_int->min_conn_interval != 0xffff) + ) + ) + { + return NRF_ERROR_INVALID_PARAM; + } + + // Check Maximum Connection Interval. + if ((p_conn_int->max_conn_interval < 0x0006) || + ( + (p_conn_int->max_conn_interval > 0x0c80) && + (p_conn_int->max_conn_interval != 0xffff) + ) + ) + { + return NRF_ERROR_INVALID_PARAM; + } + + // Make sure Minimum Connection Interval is not bigger than Maximum Connection Interval. + if ((p_conn_int->min_conn_interval != 0xffff) && + (p_conn_int->max_conn_interval != 0xffff) && + (p_conn_int->min_conn_interval > p_conn_int->max_conn_interval) + ) + { + return NRF_ERROR_INVALID_PARAM; + } + + return NRF_SUCCESS; +} + + +static uint32_t conn_int_encode(const ble_advdata_conn_int_t * p_conn_int, + uint8_t * p_encoded_data, + uint16_t * p_offset, + uint16_t max_size) +{ + uint32_t err_code; + + // Check for buffer overflow. + if (((*p_offset) + AD_TYPE_CONN_INT_SIZE) > max_size) + { + return NRF_ERROR_DATA_SIZE; + } + + // Check parameters. + err_code = conn_int_check(p_conn_int); + VERIFY_SUCCESS(err_code); + + // Encode Length and AD Type. + p_encoded_data[*p_offset] = (uint8_t)(ADV_AD_TYPE_FIELD_SIZE + AD_TYPE_CONN_INT_DATA_SIZE); + *p_offset += ADV_LENGTH_FIELD_SIZE; + p_encoded_data[*p_offset] = BLE_GAP_AD_TYPE_SLAVE_CONNECTION_INTERVAL_RANGE; + *p_offset += ADV_AD_TYPE_FIELD_SIZE; + + // Encode Minimum and Maximum Connection Intervals. + *p_offset += uint16_encode(p_conn_int->min_conn_interval, &p_encoded_data[*p_offset]); + *p_offset += uint16_encode(p_conn_int->max_conn_interval, &p_encoded_data[*p_offset]); + + return NRF_SUCCESS; +} + + +static uint32_t manuf_specific_data_encode(const ble_advdata_manuf_data_t * p_manuf_sp_data, + uint8_t * p_encoded_data, + uint16_t * p_offset, + uint16_t max_size) +{ + uint32_t data_size = AD_TYPE_MANUF_SPEC_DATA_ID_SIZE + p_manuf_sp_data->data.size; + + // Check for buffer overflow. + if (((*p_offset) + ADV_AD_DATA_OFFSET + data_size) > max_size) + { + return NRF_ERROR_DATA_SIZE; + } + + // There is only 1 byte intended to encode length which is (data_size + ADV_AD_TYPE_FIELD_SIZE) + if(data_size > (0x00FF - ADV_AD_TYPE_FIELD_SIZE)) + { + return NRF_ERROR_DATA_SIZE; + } + + // Encode Length and AD Type. + p_encoded_data[*p_offset] = (uint8_t)(ADV_AD_TYPE_FIELD_SIZE + data_size); + *p_offset += ADV_LENGTH_FIELD_SIZE; + p_encoded_data[*p_offset] = BLE_GAP_AD_TYPE_MANUFACTURER_SPECIFIC_DATA; + *p_offset += ADV_AD_TYPE_FIELD_SIZE; + + // Encode Company Identifier. + *p_offset += uint16_encode(p_manuf_sp_data->company_identifier, &p_encoded_data[*p_offset]); + + // Encode additional manufacturer specific data. + if (p_manuf_sp_data->data.size > 0) + { + if (p_manuf_sp_data->data.p_data == NULL) + { + return NRF_ERROR_INVALID_PARAM; + } + memcpy(&p_encoded_data[*p_offset], p_manuf_sp_data->data.p_data, p_manuf_sp_data->data.size); + *p_offset += p_manuf_sp_data->data.size; + } + + return NRF_SUCCESS; +} + +// Implemented only for 16-bit UUIDs +static uint32_t service_data_encode(const ble_advdata_t * p_advdata, + uint8_t * p_encoded_data, + uint16_t * p_offset, + uint16_t max_size) +{ + uint8_t i; + + // Check parameter consistency. + if (p_advdata->p_service_data_array == NULL) + { + return NRF_ERROR_INVALID_PARAM; + } + + for (i = 0; i < p_advdata->service_data_count; i++) + { + ble_advdata_service_data_t * p_service_data; + uint32_t data_size; + + p_service_data = &p_advdata->p_service_data_array[i]; + // For now implemented only for 16-bit UUIDs + data_size = AD_TYPE_SERV_DATA_16BIT_UUID_SIZE + p_service_data->data.size; + + // There is only 1 byte intended to encode length which is (data_size + ADV_AD_TYPE_FIELD_SIZE) + if(data_size > (0x00FF - ADV_AD_TYPE_FIELD_SIZE)) + { + return NRF_ERROR_DATA_SIZE; + } + + // Encode Length and AD Type. + p_encoded_data[*p_offset] = (uint8_t)(ADV_AD_TYPE_FIELD_SIZE + data_size); + *p_offset += ADV_LENGTH_FIELD_SIZE; + p_encoded_data[*p_offset] = BLE_GAP_AD_TYPE_SERVICE_DATA; + *p_offset += ADV_AD_TYPE_FIELD_SIZE; + + // Encode service 16-bit UUID. + *p_offset += uint16_encode(p_service_data->service_uuid, &p_encoded_data[*p_offset]); + + // Encode additional service data. + if (p_service_data->data.size > 0) + { + if (p_service_data->data.p_data == NULL) + { + return NRF_ERROR_INVALID_PARAM; + } + memcpy(&p_encoded_data[*p_offset], p_service_data->data.p_data, p_service_data->data.size); + *p_offset += p_service_data->data.size; + } + } + + return NRF_SUCCESS; +} + +uint32_t adv_data_encode(ble_advdata_t const * const p_advdata, + uint8_t * const p_encoded_data, + uint16_t * const p_len) +{ + uint32_t err_code = NRF_SUCCESS; + uint16_t max_size = *p_len; + *p_len = 0; + + //Encode Security Manager OOB Flags + if (p_advdata->p_sec_mgr_oob_flags != NULL) + { + err_code = sec_mgr_oob_flags_encode(*p_advdata->p_sec_mgr_oob_flags, + p_encoded_data, + p_len, + max_size); + VERIFY_SUCCESS(err_code); + } + + // Encode Security Manager TK value + if (NULL != p_advdata->p_tk_value) + { + err_code = tk_value_encode(p_advdata->p_tk_value, p_encoded_data, p_len, max_size); + VERIFY_SUCCESS(err_code); + } + + // Encode LE Role + if (BLE_ADVDATA_ROLE_NOT_PRESENT != p_advdata->le_role) + { + err_code = le_role_encode(p_advdata->le_role, p_encoded_data, p_len, max_size); + VERIFY_SUCCESS(err_code); + } + + // Encode LE Bluetooth Device Address + if (p_advdata->include_ble_device_addr) + { + err_code = ble_device_addr_encode(p_encoded_data, p_len, max_size); + VERIFY_SUCCESS(err_code); + } + + // Encode appearance. + if (p_advdata->include_appearance) + { + err_code = appearance_encode(p_encoded_data, p_len, max_size); + VERIFY_SUCCESS(err_code); + } + + //Encode Flags + if(p_advdata->flags != 0 ) + { + err_code = flags_encode(p_advdata->flags, p_encoded_data, p_len, max_size); + VERIFY_SUCCESS(err_code); + } + + // Encode TX power level. + if (p_advdata->p_tx_power_level != NULL) + { + err_code = tx_power_level_encode(*p_advdata->p_tx_power_level, + p_encoded_data, + p_len, + max_size); + VERIFY_SUCCESS(err_code); + } + + // Encode 'more available' uuid list. + if (p_advdata->uuids_more_available.uuid_cnt > 0) + { + err_code = uuid_list_encode(&p_advdata->uuids_more_available, + BLE_GAP_AD_TYPE_16BIT_SERVICE_UUID_MORE_AVAILABLE, + BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_MORE_AVAILABLE, + p_encoded_data, + p_len, + max_size); + VERIFY_SUCCESS(err_code); + } + + // Encode 'complete' uuid list. + if (p_advdata->uuids_complete.uuid_cnt > 0) + { + err_code = uuid_list_encode(&p_advdata->uuids_complete, + BLE_GAP_AD_TYPE_16BIT_SERVICE_UUID_COMPLETE, + BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_COMPLETE, + p_encoded_data, + p_len, + max_size); + VERIFY_SUCCESS(err_code); + } + + // Encode 'solicited service' uuid list. + if (p_advdata->uuids_solicited.uuid_cnt > 0) + { + err_code = uuid_list_encode(&p_advdata->uuids_solicited, + BLE_GAP_AD_TYPE_SOLICITED_SERVICE_UUIDS_16BIT, + BLE_GAP_AD_TYPE_SOLICITED_SERVICE_UUIDS_128BIT, + p_encoded_data, + p_len, + max_size); + VERIFY_SUCCESS(err_code); + } + + // Encode Slave Connection Interval Range. + if (p_advdata->p_slave_conn_int != NULL) + { + err_code = conn_int_encode(p_advdata->p_slave_conn_int, p_encoded_data, p_len, max_size); + VERIFY_SUCCESS(err_code); + } + + // Encode Manufacturer Specific Data. + if (p_advdata->p_manuf_specific_data != NULL) + { + err_code = manuf_specific_data_encode(p_advdata->p_manuf_specific_data, + p_encoded_data, + p_len, + max_size); + VERIFY_SUCCESS(err_code); + } + + // Encode Service Data. + if (p_advdata->service_data_count > 0) + { + err_code = service_data_encode(p_advdata, p_encoded_data, p_len, max_size); + VERIFY_SUCCESS(err_code); + } + + // Encode name. WARNING: it is encoded last on purpose since too long device name is truncated. + if (p_advdata->name_type != BLE_ADVDATA_NO_NAME) + { + err_code = name_encode(p_advdata, p_encoded_data, p_len, max_size); + VERIFY_SUCCESS(err_code); + } + + return err_code; +} + + +static uint32_t advdata_check(const ble_advdata_t * p_advdata) +{ + // Flags must be included in advertising data, and the BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED flag must be set. + if ( + ((p_advdata->flags & BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED) == 0) + ) + { + return NRF_ERROR_INVALID_PARAM; + } + + return NRF_SUCCESS; +} + + +static uint32_t srdata_check(const ble_advdata_t * p_srdata) +{ + // Flags shall not be included in the scan response data. + if (p_srdata->flags) + { + return NRF_ERROR_INVALID_PARAM; + } + + return NRF_SUCCESS; +} + + +uint32_t ble_advdata_set(const ble_advdata_t * p_advdata, const ble_advdata_t * p_srdata) +{ + uint32_t err_code; + uint16_t len_advdata = BLE_GAP_ADV_MAX_SIZE; + uint16_t len_srdata = BLE_GAP_ADV_MAX_SIZE; + uint8_t encoded_advdata[BLE_GAP_ADV_MAX_SIZE]; + uint8_t encoded_srdata[BLE_GAP_ADV_MAX_SIZE]; + uint8_t * p_encoded_advdata; + uint8_t * p_encoded_srdata; + + // Encode advertising data (if supplied). + if (p_advdata != NULL) + { + err_code = advdata_check(p_advdata); + VERIFY_SUCCESS(err_code); + + err_code = adv_data_encode(p_advdata, encoded_advdata, &len_advdata); + VERIFY_SUCCESS(err_code); + p_encoded_advdata = encoded_advdata; + } + else + { + p_encoded_advdata = NULL; + len_advdata = 0; + } + + // Encode scan response data (if supplied). + if (p_srdata != NULL) + { + err_code = srdata_check(p_srdata); + VERIFY_SUCCESS(err_code); + + err_code = adv_data_encode(p_srdata, encoded_srdata, &len_srdata); + VERIFY_SUCCESS(err_code); + p_encoded_srdata = encoded_srdata; + } + else + { + p_encoded_srdata = NULL; + len_srdata = 0; + } + + // Pass encoded advertising data and/or scan response data to the stack. + return sd_ble_gap_adv_data_set(p_encoded_advdata, len_advdata, p_encoded_srdata, len_srdata); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.h new file mode 100644 index 0000000000..dcf4f92f0c --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.h @@ -0,0 +1,212 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_sdk_lib_advdata Advertising and Scan Response Data Encoder + * @{ + * @ingroup ble_sdk_lib + * @brief Functions for encoding data in the Advertising and Scan Response Data format, + * and for passing the data to the stack. + */ + +#ifndef BLE_ADVDATA_H__ +#define BLE_ADVDATA_H__ + +#include +#include +#include +#include "ble.h" +#include "app_util.h" + + +#define ADV_LENGTH_FIELD_SIZE 1UL /**< Advertising Data and Scan Response format contains 1 octet for the length. */ +#define ADV_AD_TYPE_FIELD_SIZE 1UL /**< Advertising Data and Scan Response format contains 1 octet for the AD type. */ +#define ADV_AD_DATA_OFFSET (ADV_LENGTH_FIELD_SIZE + \ + ADV_AD_TYPE_FIELD_SIZE) /**< Offset for the AD data field of the Advertising Data and Scan Response format. */ +#define AD_TYPE_TK_VALUE_DATA_SIZE (sizeof(ble_advdata_tk_value_t)) /**< Data size (in octets) of the Security Manager TK value AD type. */ +#define AD_TYPE_TK_VALUE_SIZE (ADV_AD_DATA_OFFSET + \ + AD_TYPE_TK_VALUE_DATA_SIZE) /**< Size (in octets) of the Security Manager TK value AD type. */ +#define AD_TYPE_LE_ROLE_DATA_SIZE 1UL /**< Data size (in octets) of the LE Bluetooth Device Address AD type. */ +#define AD_TYPE_LE_ROLE_SIZE (ADV_AD_DATA_OFFSET + \ + AD_TYPE_LE_ROLE_DATA_SIZE) /**< Size (in octets) of the LE Bluetooth Device Address AD type. */ +#define AD_TYPE_BLE_DEVICE_ADDR_TYPE_SIZE 1UL /**< Data size (in octets) of the Address type of the LE Bluetooth Device Address AD type. */ +#define AD_TYPE_BLE_DEVICE_ADDR_DATA_SIZE (BLE_GAP_ADDR_LEN + \ + AD_TYPE_BLE_DEVICE_ADDR_TYPE_SIZE) /**< Data size (in octets) of the LE Bluetooth Device Address AD type. */ +#define AD_TYPE_BLE_DEVICE_ADDR_SIZE (ADV_AD_DATA_OFFSET + \ + AD_TYPE_BLE_DEVICE_ADDR_DATA_SIZE) /**< Size (in octets) of the LE Bluetooth Device Address AD type. */ +#define AD_TYPE_APPEARANCE_DATA_SIZE 2UL /**< Data size (in octets) of the Appearance AD type. */ +#define AD_TYPE_APPEARANCE_SIZE (ADV_AD_DATA_OFFSET + \ + AD_TYPE_APPEARANCE_DATA_SIZE) /**< Size (in octets) of the Appearance AD type. */ +#define AD_TYPE_FLAGS_DATA_SIZE 1UL /**< Data size (in octets) of the Flags AD type. */ +#define AD_TYPE_FLAGS_SIZE (ADV_AD_DATA_OFFSET + \ + AD_TYPE_FLAGS_DATA_SIZE) /**< Size (in octets) of the Flags AD type. */ +#define AD_TYPE_TX_POWER_LEVEL_DATA_SIZE 1UL /**< Data size (in octets) of the TX Power Level AD type. */ +#define AD_TYPE_TX_POWER_LEVEL_SIZE (ADV_AD_DATA_OFFSET + \ + AD_TYPE_TX_POWER_LEVEL_DATA_SIZE) /**< Size (in octets) of the TX Power Level AD type. */ +#define AD_TYPE_CONN_INT_DATA_SIZE 4UL /**< Data size (in octets) of the Slave Connection Interval Range AD type. */ +#define AD_TYPE_CONN_INT_SIZE (ADV_AD_DATA_OFFSET + \ + AD_TYPE_CONN_INT_DATA_SIZE) /**< Data size (in octets) of the Slave Connection Interval Range AD type. */ +#define AD_TYPE_MANUF_SPEC_DATA_ID_SIZE 2UL /**< Size (in octets) of the Company Identifier Code, which is a part of the Manufacturer Specific Data AD type. */ +#define AD_TYPE_SERV_DATA_16BIT_UUID_SIZE 2UL /**< Size (in octets) of the 16-bit UUID, which is a part of the Service Data AD type. */ +#define AD_TYPE_OOB_FLAGS_DATA_SIZE 1UL /**< Data size (in octets) of the Security Manager OOB Flags AD type. */ +#define AD_TYPE_OOB_FLAGS_SIZE (ADV_AD_DATA_OFFSET + \ + AD_TYPE_OOB_FLAGS_DATA_SIZE) /**< Size (in octets) of the Security Manager OOB Flags AD type. */ + +#define AD_TYPE_SEC_MGR_OOB_FLAG_SET 1U /**< Security Manager OOB Flag set. Flag selection is done using _POS defines */ +#define AD_TYPE_SEC_MGR_OOB_FLAG_CLEAR 0U /**< Security Manager OOB Flag clear. Flag selection is done using _POS defines */ +#define AD_TYPE_SEC_MGR_OOB_FLAG_OOB_DATA_PRESENT_POS 0UL /**< Security Manager OOB Data Present Flag position. */ +#define AD_TYPE_SEC_MGR_OOB_FLAG_OOB_LE_SUPPORTED_POS 1UL /**< Security Manager OOB Low Energy Supported Flag position. */ +#define AD_TYPE_SEC_MGR_OOB_FLAG_SIM_LE_AND_EP_POS 2UL /**< Security Manager OOB Simultaneous LE and BR/EDR to Same Device Capable Flag position. */ +#define AD_TYPE_SEC_MGR_OOB_ADDRESS_TYPE_PUBLIC 0UL /**< Security Manager OOB Public Address type. */ +#define AD_TYPE_SEC_MGR_OOB_ADDRESS_TYPE_RANDOM 1UL /**< Security Manager OOB Random Address type. */ +#define AD_TYPE_SEC_MGR_OOB_FLAG_ADDRESS_TYPE_POS 3UL /**< Security Manager OOB Address type Flag (0 = Public Address, 1 = Random Address) position. */ + + +/**@brief Security Manager TK value. */ +typedef struct +{ + uint8_t tk[BLE_GAP_SEC_KEY_LEN]; /**< Array containing TK value. */ +} ble_advdata_tk_value_t; + +/**@brief Advertising data LE Role types. This enumeration contains the options available for the LE role inside + * the advertising data. */ +typedef enum +{ + BLE_ADVDATA_ROLE_NOT_PRESENT = 0, /**< LE Role AD structure not present. */ + BLE_ADVDATA_ROLE_ONLY_PERIPH, /**< Only Peripheral Role supported. */ + BLE_ADVDATA_ROLE_ONLY_CENTRAL, /**< Only Central Role supported. */ + BLE_ADVDATA_ROLE_BOTH_PERIPH_PREFERRED, /**< Peripheral and Central Role supported. Peripheral Role preferred for connection establishment. */ + BLE_ADVDATA_ROLE_BOTH_CENTRAL_PREFERRED /**< Peripheral and Central Role supported. Central Role preferred for connection establishment */ +} ble_advdata_le_role_t; + +/**@brief Advertising data name type. This enumeration contains the options available for the device name inside + * the advertising data. */ +typedef enum +{ + BLE_ADVDATA_NO_NAME, /**< Include no device name in advertising data. */ + BLE_ADVDATA_SHORT_NAME, /**< Include short device name in advertising data. */ + BLE_ADVDATA_FULL_NAME /**< Include full device name in advertising data. */ +} ble_advdata_name_type_t; + +/**@brief UUID list type. */ +typedef struct +{ + uint16_t uuid_cnt; /**< Number of UUID entries. */ + ble_uuid_t * p_uuids; /**< Pointer to UUID array entries. */ +} ble_advdata_uuid_list_t; + +/**@brief Connection interval range structure. */ +typedef struct +{ + uint16_t min_conn_interval; /**< Minimum connection interval, in units of 1.25 ms, range 6 to 3200 (7.5 ms to 4 s). */ + uint16_t max_conn_interval; /**< Maximum connection interval, in units of 1.25 ms, range 6 to 3200 (7.5 ms to 4 s). The value 0xFFFF indicates no specific maximum. */ +} ble_advdata_conn_int_t; + +/**@brief Manufacturer specific data structure. */ +typedef struct +{ + uint16_t company_identifier; /**< Company identifier code. */ + uint8_array_t data; /**< Additional manufacturer specific data. */ +} ble_advdata_manuf_data_t; + +/**@brief Service data structure. */ +typedef struct +{ + uint16_t service_uuid; /**< Service UUID. */ + uint8_array_t data; /**< Additional service data. */ +} ble_advdata_service_data_t; + +/**@brief Advertising data structure. This structure contains all options and data needed for encoding and + * setting the advertising data. */ +typedef struct +{ + ble_advdata_name_type_t name_type; /**< Type of device name. */ + uint8_t short_name_len; /**< Length of short device name (if short type is specified). */ + bool include_appearance; /**< Determines if Appearance shall be included. */ + uint8_t flags; /**< Advertising data Flags field. */ + int8_t * p_tx_power_level; /**< TX Power Level field. */ + ble_advdata_uuid_list_t uuids_more_available; /**< List of UUIDs in the 'More Available' list. */ + ble_advdata_uuid_list_t uuids_complete; /**< List of UUIDs in the 'Complete' list. */ + ble_advdata_uuid_list_t uuids_solicited; /**< List of solicited UUIDs. */ + ble_advdata_conn_int_t * p_slave_conn_int; /**< Slave Connection Interval Range. */ + ble_advdata_manuf_data_t * p_manuf_specific_data; /**< Manufacturer specific data. */ + ble_advdata_service_data_t * p_service_data_array; /**< Array of Service data structures. */ + uint8_t service_data_count; /**< Number of Service data structures. */ + bool include_ble_device_addr; /**< Determines if LE Bluetooth Device Address shall be included. */ + ble_advdata_le_role_t le_role; /**< LE Role field. Included when different from @ref BLE_ADVDATA_ROLE_NOT_PRESENT. @warning This field can be used only for NFC. For BLE advertising, set it to NULL. */ + ble_advdata_tk_value_t * p_tk_value; /**< Security Manager TK value field. Included when different from NULL. @warning This field can be used only for NFC. For BLE advertising, set it to NULL.*/ + uint8_t * p_sec_mgr_oob_flags; /**< Security Manager Out Of Band Flags field. Included when different from NULL. @warning This field can be used only for NFC. For BLE advertising, set it to NULL.*/ +} ble_advdata_t; + +/**@brief Function for encoding data in the Advertising and Scan Response data format + * (AD structures). + * + * @details This function encodes data into the Advertising and Scan Response data format + * (AD structures) based on the selections in the supplied structures. This function can be used to + * create a payload of Advertising packet or Scan Response packet, or a payload of NFC + * message intended for initiating the Out-of-Band pairing. + * + * @param[in] p_advdata Pointer to the structure for specifying the content of encoded data. + * @param[out] p_encoded_data Pointer to the buffer where encoded data will be returned. + * @param[in,out] p_len \c in: Size of \p p_encoded_data buffer. + * \c out: Length of encoded data. + * + * @retval NRF_SUCCESS If the operation was successful. + * @retval NRF_ERROR_INVALID_PARAM If the operation failed because a wrong parameter was provided in \p p_advdata. + * @retval NRF_ERROR_DATA_SIZE If the operation failed because not all the requested data could fit into the + * provided buffer or some encoded AD structure is too long and its + * length cannot be encoded with one octet. + * + * @warning This API may override the application's request to use the long name and use a short name + * instead. This truncation will occur in case the long name does not fit the provided buffer size. + * The application can specify a preferred short name length if truncation is required. + * For example, if the complete device name is ABCD_HRMonitor, the application can specify the short name + * length to be 8, so that the short device name appears as ABCD_HRM instead of ABCD_HRMo or ABCD_HRMoni + * if the available size for the short name is 9 or 12 respectively, to have a more appropriate short name. + * However, it should be noted that this is just a preference that the application can specify, and + * if the preference is too large to fit in the provided buffer, the name can be truncated further. + */ +uint32_t adv_data_encode(ble_advdata_t const * const p_advdata, + uint8_t * const p_encoded_data, + uint16_t * const p_len); + +/**@brief Function for encoding and setting the advertising data and/or scan response data. + * + * @details This function encodes advertising data and/or scan response data based on the selections + * in the supplied structures, and passes the encoded data to the stack. + * + * @param[in] p_advdata Structure for specifying the content of the advertising data. + * Set to NULL if advertising data is not to be set. + * @param[in] p_srdata Structure for specifying the content of the scan response data. + * Set to NULL if scan response data is not to be set. + * + * @retval NRF_SUCCESS If the operation was successful. + * @retval NRF_ERROR_INVALID_PARAM If the operation failed because a wrong parameter was provided in \p p_advdata. + * @retval NRF_ERROR_DATA_SIZE If the operation failed because not all the requested data could fit into the + * advertising packet. The maximum size of the advertisement packet + * is @ref BLE_GAP_ADV_MAX_SIZE. + * + * @warning This API may override the application's request to use the long name and use a short name + * instead. This truncation will occur in case the long name does not fit the provided buffer size. + * The application can specify a preferred short name length if truncation is required. + * For example, if the complete device name is ABCD_HRMonitor, the application can specify the short name + * length to be 8, so that the short device name appears as ABCD_HRM instead of ABCD_HRMo or ABCD_HRMoni + * if the available size for the short name is 9 or 12 respectively, to have a more appropriate short name. + * However, it should be noted that this is just a preference that the application can specify, and + * if the preference is too large to fit in the provided buffer, the name can be truncated further. + */ +uint32_t ble_advdata_set(const ble_advdata_t * p_advdata, const ble_advdata_t * p_srdata); + +#endif // BLE_ADVDATA_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.c new file mode 100644 index 0000000000..ddc1ba924f --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.c @@ -0,0 +1,323 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "ble_conn_params.h" +#include +#include "nordic_common.h" +#include "ble_hci.h" +#include "app_timer.h" +#include "ble_srv_common.h" +#include "app_util.h" + + +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 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 ble_gap_conn_params_t m_current_conn_params; /**< Connection parameters received in the most recent Connect event. */ +APP_TIMER_DEF(m_conn_params_timer_id); /**< Connection parameters timer. */ + +static bool m_change_param = false; + +static bool is_conn_params_ok(ble_gap_conn_params_t * p_conn_params) +{ + // Check if interval is within the acceptable range. + // NOTE: Using max_conn_interval in the received event data because this contains + // the client's connection interval. + if ( + (p_conn_params->max_conn_interval >= m_preferred_conn_params.min_conn_interval) + && + (p_conn_params->max_conn_interval <= m_preferred_conn_params.max_conn_interval) + ) + { + return true; + } + else + { + return false; + } +} + + +static void update_timeout_handler(void * p_context) +{ + UNUSED_PARAMETER(p_context); + + if (m_conn_handle != BLE_CONN_HANDLE_INVALID) + { + // Check if we have reached the maximum number of attempts + m_update_count++; + if (m_update_count <= m_conn_params_config.max_conn_params_update_count) + { + uint32_t err_code; + + // Parameters are not ok, send connection parameters update request. + err_code = sd_ble_gap_conn_param_update(m_conn_handle, &m_preferred_conn_params); + if ((err_code != NRF_SUCCESS) && (m_conn_params_config.error_handler != NULL)) + { + m_conn_params_config.error_handler(err_code); + } + } + else + { + m_update_count = 0; + + // Negotiation failed, disconnect automatically if this has been configured + if (m_conn_params_config.disconnect_on_fail) + { + uint32_t err_code; + + err_code = sd_ble_gap_disconnect(m_conn_handle, BLE_HCI_CONN_INTERVAL_UNACCEPTABLE); + if ((err_code != NRF_SUCCESS) && (m_conn_params_config.error_handler != NULL)) + { + m_conn_params_config.error_handler(err_code); + } + } + + // Notify the application that the procedure has failed + if (m_conn_params_config.evt_handler != NULL) + { + ble_conn_params_evt_t evt; + + evt.evt_type = BLE_CONN_PARAMS_EVT_FAILED; + m_conn_params_config.evt_handler(&evt); + } + } + } +} + + +uint32_t ble_conn_params_init(const ble_conn_params_init_t * p_init) +{ + uint32_t err_code; + + m_conn_params_config = *p_init; + m_change_param = false; + if (p_init->p_conn_params != NULL) + { + m_preferred_conn_params = *p_init->p_conn_params; + + // Set the connection params in stack + err_code = sd_ble_gap_ppcp_set(&m_preferred_conn_params); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + else + { + // Fetch the connection params from stack + err_code = sd_ble_gap_ppcp_get(&m_preferred_conn_params); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + } + + m_conn_handle = BLE_CONN_HANDLE_INVALID; + m_update_count = 0; + + return app_timer_create(&m_conn_params_timer_id, + APP_TIMER_MODE_SINGLE_SHOT, + update_timeout_handler); +} + + +uint32_t ble_conn_params_stop(void) +{ + return app_timer_stop(m_conn_params_timer_id); +} + + +static void conn_params_negotiation(void) +{ + // Start negotiation if the received connection parameters are not acceptable + if (!is_conn_params_ok(&m_current_conn_params)) + { + uint32_t err_code; + uint32_t timeout_ticks; + + if (m_change_param) + { + // Notify the application that the procedure has failed + if (m_conn_params_config.evt_handler != NULL) + { + ble_conn_params_evt_t evt; + + evt.evt_type = BLE_CONN_PARAMS_EVT_FAILED; + m_conn_params_config.evt_handler(&evt); + } + } + else + { + if (m_update_count == 0) + { + // First connection parameter update + timeout_ticks = m_conn_params_config.first_conn_params_update_delay; + } + else + { + timeout_ticks = m_conn_params_config.next_conn_params_update_delay; + } + + 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)) + { + m_conn_params_config.error_handler(err_code); + } + } + } + else + { + // Notify the application that the procedure has succeded + if (m_conn_params_config.evt_handler != NULL) + { + ble_conn_params_evt_t evt; + + evt.evt_type = BLE_CONN_PARAMS_EVT_SUCCEEDED; + m_conn_params_config.evt_handler(&evt); + } + } + m_change_param = false; +} + + +static void on_connect(ble_evt_t * p_ble_evt) +{ + // Save connection parameters + m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle; + m_current_conn_params = p_ble_evt->evt.gap_evt.params.connected.conn_params; + m_update_count = 0; // Connection parameter negotiation should re-start every connection + + // Check if we shall handle negotiation on connect + if (m_conn_params_config.start_on_notify_cccd_handle == BLE_GATT_HANDLE_INVALID) + { + conn_params_negotiation(); + } +} + + +static void on_disconnect(ble_evt_t * p_ble_evt) +{ + uint32_t err_code; + + m_conn_handle = BLE_CONN_HANDLE_INVALID; + + // Stop timer if running + m_update_count = 0; // Connection parameters updates should happen during every connection + + err_code = app_timer_stop(m_conn_params_timer_id); + if ((err_code != NRF_SUCCESS) && (m_conn_params_config.error_handler != NULL)) + { + m_conn_params_config.error_handler(err_code); + } +} + + +static void on_write(ble_evt_t * p_ble_evt) +{ + ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; + + // Check if this the correct CCCD + if ( + (p_evt_write->handle == m_conn_params_config.start_on_notify_cccd_handle) + && + (p_evt_write->len == 2) + ) + { + // Check if this is a 'start notification' + if (ble_srv_is_notification_enabled(p_evt_write->data)) + { + // Do connection parameter negotiation if necessary + conn_params_negotiation(); + } + else + { + uint32_t err_code; + + // Stop timer if running + err_code = app_timer_stop(m_conn_params_timer_id); + if ((err_code != NRF_SUCCESS) && (m_conn_params_config.error_handler != NULL)) + { + m_conn_params_config.error_handler(err_code); + } + } + } +} + + +static void on_conn_params_update(ble_evt_t * p_ble_evt) +{ + // Copy the parameters + m_current_conn_params = p_ble_evt->evt.gap_evt.params.conn_param_update.conn_params; + + conn_params_negotiation(); +} + + +void ble_conn_params_on_ble_evt(ble_evt_t * p_ble_evt) +{ + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + on_connect(p_ble_evt); + break; + + case BLE_GAP_EVT_DISCONNECTED: + on_disconnect(p_ble_evt); + break; + + case BLE_GATTS_EVT_WRITE: + on_write(p_ble_evt); + break; + + case BLE_GAP_EVT_CONN_PARAM_UPDATE: + on_conn_params_update(p_ble_evt); + break; + + default: + // No implementation needed. + break; + } +} + + +uint32_t ble_conn_params_change_conn_params(ble_gap_conn_params_t * new_params) +{ + uint32_t err_code; + + m_preferred_conn_params = *new_params; + // Set the connection params in stack + err_code = sd_ble_gap_ppcp_set(&m_preferred_conn_params); + if (err_code == NRF_SUCCESS) + { + if (!is_conn_params_ok(&m_current_conn_params)) + { + m_change_param = true; + err_code = sd_ble_gap_conn_param_update(m_conn_handle, &m_preferred_conn_params); + m_update_count = 1; + } + else + { + // Notify the application that the procedure has succeded + if (m_conn_params_config.evt_handler != NULL) + { + ble_conn_params_evt_t evt; + + evt.evt_type = BLE_CONN_PARAMS_EVT_SUCCEEDED; + m_conn_params_config.evt_handler(&evt); + } + err_code = NRF_SUCCESS; + } + } + return err_code; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.h new file mode 100644 index 0000000000..998357371c --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.h @@ -0,0 +1,111 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_sdk_lib_conn_params Connection Parameters Negotiation + * @{ + * @ingroup ble_sdk_lib + * @brief Module for initiating and executing a connection parameters negotiation procedure. + */ + +#ifndef BLE_CONN_PARAMS_H__ +#define BLE_CONN_PARAMS_H__ + +#include +#include "ble.h" +#include "ble_srv_common.h" + +/**@brief Connection Parameters Module event type. */ +typedef enum +{ + BLE_CONN_PARAMS_EVT_FAILED , /**< Negotiation procedure failed. */ + BLE_CONN_PARAMS_EVT_SUCCEEDED /**< Negotiation procedure succeeded. */ +} ble_conn_params_evt_type_t; + +/**@brief Connection Parameters Module event. */ +typedef struct +{ + ble_conn_params_evt_type_t evt_type; /**< Type of event. */ +} ble_conn_params_evt_t; + +/**@brief Connection Parameters Module event handler type. */ +typedef void (*ble_conn_params_evt_handler_t) (ble_conn_params_evt_t * p_evt); + +/**@brief Connection Parameters Module init structure. This contains all options and data needed for + * initialization of the connection parameters negotiation module. */ +typedef struct +{ + ble_gap_conn_params_t * p_conn_params; /**< Pointer to the connection parameters desired by the application. When calling ble_conn_params_init, if this parameter is set to NULL, the connection parameters will be fetched from host. */ + uint32_t first_conn_params_update_delay; /**< Time from initiating event (connect or start of notification) to first time sd_ble_gap_conn_param_update is called (in number of timer ticks). */ + uint32_t next_conn_params_update_delay; /**< Time between each call to sd_ble_gap_conn_param_update after the first (in number of timer ticks). Recommended value 30 seconds as per BLUETOOTH SPECIFICATION Version 4.0. */ + uint8_t max_conn_params_update_count; /**< Number of attempts before giving up the negotiation. */ + uint16_t start_on_notify_cccd_handle; /**< If procedure is to be started when notification is started, set this to the handle of the corresponding CCCD. Set to BLE_GATT_HANDLE_INVALID if procedure is to be started on connect event. */ + bool disconnect_on_fail; /**< Set to TRUE if a failed connection parameters update shall cause an automatic disconnection, set to FALSE otherwise. */ + ble_conn_params_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Connection Parameters. */ + ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ +} ble_conn_params_init_t; + + +/**@brief Function for initializing the Connection Parameters module. + * + * @note If the negotiation procedure should be triggered when notification/indication of + * any characteristic is enabled by the peer, then this function must be called after + * having initialized the services. + * + * @param[in] p_init This contains information needed to initialize this module. + * + * @return NRF_SUCCESS on successful initialization, otherwise an error code. + */ +uint32_t ble_conn_params_init(const ble_conn_params_init_t * p_init); + +/**@brief Function for stopping the Connection Parameters module. + * + * @details This function is intended to be used by the application to clean up the connection + * parameters update module. This will stop the connection parameters update timer if + * running, thereby preventing any impending connection parameters update procedure. This + * function must be called by the application when it needs to clean itself up (for + * example, before disabling the bluetooth SoftDevice) so that an unwanted timer expiry + * event can be avoided. + * + * @return NRF_SUCCESS on successful initialization, otherwise an error code. + */ +uint32_t ble_conn_params_stop(void); + +/**@brief Function for changing the current connection parameters to a new set. + * + * @details Use this function to change the connection parameters to a new set of parameter + * (ie different from the ones given at init of the module). + * This function is usefull for scenario where most of the time the application + * needs a relatively big connection interval, and just sometimes, for a temporary + * period requires shorter connection interval, for example to transfer a higher + * amount of data. + * If the given parameters does not match the current connection's parameters + * this function initiates a new negotiation. + * + * @param[in] new_params This contains the new connections parameters to setup. + * + * @return NRF_SUCCESS on successful initialization, otherwise an error code. + */ +uint32_t ble_conn_params_change_conn_params(ble_gap_conn_params_t *new_params); + +/**@brief Function for handling the Application's BLE Stack events. + * + * @details Handles all events from the BLE stack that are of interest to this module. + * + * @param[in] p_ble_evt The event received from the BLE stack. + */ +void ble_conn_params_on_ble_evt(ble_evt_t * p_ble_evt); + +#endif // BLE_CONN_PARAMS_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.c new file mode 100644 index 0000000000..0e119df40d --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.c @@ -0,0 +1,387 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "ble_conn_state.h" +#include +#include +#include +#include "ble.h" +#include "sdk_mapped_flags.h" +#include "app_error.h" + + +#if defined(__CC_ARM) + #pragma push + #pragma anon_unions +#elif defined(__ICCARM__) + #pragma language=extended +#elif defined(__GNUC__) + /* anonymous unions are enabled by default */ +#endif + + +#define BLE_CONN_STATE_N_DEFAULT_FLAGS 5 /**< The number of flags kept for each connection, excluding user flags. */ +#define BLE_CONN_STATE_N_FLAGS (BLE_CONN_STATE_N_DEFAULT_FLAGS + BLE_CONN_STATE_N_USER_FLAGS) /**< The number of flags kept for each connection, including user flags. */ + + +/**@brief Structure containing all the flag collections maintained by the Connection State module. + */ +typedef struct +{ + sdk_mapped_flags_t valid_flags; /**< Flags indicating which connection handles are valid. */ + sdk_mapped_flags_t connected_flags; /**< Flags indicating which connections are connected, since disconnected connection handles will not immediately be invalidated. */ + sdk_mapped_flags_t central_flags; /**< Flags indicating in which connections the local device is the central. */ + sdk_mapped_flags_t encrypted_flags; /**< Flags indicating which connections are encrypted. */ + sdk_mapped_flags_t mitm_protected_flags; /**< Flags indicating which connections have encryption with protection from man-in-the-middle attacks. */ + sdk_mapped_flags_t user_flags[BLE_CONN_STATE_N_USER_FLAGS]; /**< Flags that can be reserved by the user. The flags will be cleared when a connection is invalidated, otherwise, the user is wholly responsible for the flag states. */ +} ble_conn_state_flag_collections_t; + + +/**@brief Structure containing the internal state of the Connection State module. + */ +typedef struct +{ + uint32_t acquired_flags; /**< Bitmap for keeping track of which user flags have been acquired. */ + uint16_t valid_conn_handles[SDK_MAPPED_FLAGS_N_KEYS]; /**< List of connection handles used as keys for the sdk_mapped_flags module. */ + union + { + ble_conn_state_flag_collections_t flags; /**< Flag collections kept by the Connection State module. */ + sdk_mapped_flags_t flag_array[BLE_CONN_STATE_N_FLAGS]; /**< Flag collections as array to allow use of @ref sdk_mapped_flags_bulk_update_by_key() when setting all flags. */ + }; +} ble_conn_state_t; + + +#if defined(__CC_ARM) + #pragma pop +#elif defined(__ICCARM__) + /* leave anonymous unions enabled */ +#elif defined(__GNUC__) + /* anonymous unions are enabled by default */ +#endif + + +static ble_conn_state_t m_bcs = {0}; /**< Instantiation of the internal state. */ + + +/**@brief Function for resetting all internal memory to the values it had at initialization. + */ +void bcs_internal_state_reset(void) +{ + memset( &m_bcs, 0, sizeof(ble_conn_state_t) ); +} + + +/**@brief Function for activating a connection record. + * + * @param p_record The record to activate. + * @param conn_handle The connection handle to copy into the record. + * @param role The role of the connection. + * + * @return whether the record was activated successfully. + */ +static bool record_activate(uint16_t conn_handle) +{ + uint16_t available_index = sdk_mapped_flags_first_key_index_get(~m_bcs.flags.valid_flags); + + if (available_index != SDK_MAPPED_FLAGS_INVALID_INDEX) + { + m_bcs.valid_conn_handles[available_index] = conn_handle; + sdk_mapped_flags_update_by_key(m_bcs.valid_conn_handles, + &m_bcs.flags.connected_flags, + conn_handle, + 1); + sdk_mapped_flags_update_by_key(m_bcs.valid_conn_handles, + &m_bcs.flags.valid_flags, + conn_handle, + 1); + + return true; + } + + return false; +} + + +/**@brief Function for marking a connection record as invalid and resetting the values. + * + * @param p_record The record to invalidate. + */ +static void record_invalidate(uint16_t conn_handle) +{ + sdk_mapped_flags_bulk_update_by_key(m_bcs.valid_conn_handles, + m_bcs.flag_array, + BLE_CONN_STATE_N_FLAGS, + conn_handle, + 0); +} + + +/**@brief Function for marking a connection as disconnected. See @ref BLE_CONN_STATUS_DISCONNECTED. + * + * @param p_record The record of the connection to set as disconnected. + */ +static void record_set_disconnected(uint16_t conn_handle) +{ + sdk_mapped_flags_update_by_key(m_bcs.valid_conn_handles, + &m_bcs.flags.connected_flags, + conn_handle, + 0); +} + + +/**@brief Function for invalidating records with a @ref BLE_CONN_STATUS_DISCONNECTED + * connection status + */ +static void record_purge_disconnected() +{ + sdk_mapped_flags_key_list_t disconnected_list; + + disconnected_list = sdk_mapped_flags_key_list_get( + m_bcs.valid_conn_handles, + (~m_bcs.flags.connected_flags) & (m_bcs.flags.valid_flags)); + + for (uint32_t i = 0; i < disconnected_list.len; i++) + { + record_invalidate(disconnected_list.flag_keys[i]); + } +} + + +/**@brief Function for checking if a user flag has been acquired. + * + * @param[in] flag_id Which flag to check. + * + * @return Whether the flag has been acquired. + */ +static bool user_flag_is_acquired(ble_conn_state_user_flag_id_t flag_id) +{ + return ((m_bcs.acquired_flags & (1 << flag_id)) != 0); +} + + +/**@brief Function for marking a user flag as acquired. + * + * @param[in] flag_id Which flag to mark. + */ +static void user_flag_acquire(ble_conn_state_user_flag_id_t flag_id) +{ + m_bcs.acquired_flags |= (1 << flag_id); +} + + +void ble_conn_state_init(void) +{ + bcs_internal_state_reset(); +} + + +void ble_conn_state_on_ble_evt(ble_evt_t * p_ble_evt) +{ + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + record_purge_disconnected(); + + if ( !record_activate(p_ble_evt->evt.gap_evt.conn_handle) ) + { + // No more records available. Should not happen. + APP_ERROR_HANDLER(NRF_ERROR_NO_MEM); + } + else + { + bool is_central = + (p_ble_evt->evt.gap_evt.params.connected.role == BLE_GAP_ROLE_CENTRAL); + + sdk_mapped_flags_update_by_key(m_bcs.valid_conn_handles, + &m_bcs.flags.central_flags, + p_ble_evt->evt.gap_evt.conn_handle, + is_central); + } + + break; + + case BLE_GAP_EVT_DISCONNECTED: + record_set_disconnected(p_ble_evt->evt.gap_evt.conn_handle); + break; + + case BLE_GAP_EVT_CONN_SEC_UPDATE: + sdk_mapped_flags_update_by_key( + m_bcs.valid_conn_handles, + &m_bcs.flags.encrypted_flags, + p_ble_evt->evt.gap_evt.conn_handle, + (p_ble_evt->evt.gap_evt.params.conn_sec_update.conn_sec.sec_mode.lv > 1)); + sdk_mapped_flags_update_by_key( + m_bcs.valid_conn_handles, + &m_bcs.flags.mitm_protected_flags, + p_ble_evt->evt.gap_evt.conn_handle, + (p_ble_evt->evt.gap_evt.params.conn_sec_update.conn_sec.sec_mode.lv > 2)); + break; + } +} + + +bool ble_conn_state_valid(uint16_t conn_handle) +{ + return sdk_mapped_flags_get_by_key(m_bcs.valid_conn_handles, + m_bcs.flags.valid_flags, + conn_handle); +} + + +uint8_t ble_conn_state_role(uint16_t conn_handle) +{ + uint8_t role = BLE_GAP_ROLE_INVALID; + + if ( sdk_mapped_flags_get_by_key(m_bcs.valid_conn_handles, m_bcs.flags.valid_flags, conn_handle) ) + { + bool central = sdk_mapped_flags_get_by_key(m_bcs.valid_conn_handles, + m_bcs.flags.central_flags, + conn_handle); + + role = central ? BLE_GAP_ROLE_CENTRAL : BLE_GAP_ROLE_PERIPH; + } + + return role; +} + + +ble_conn_state_status_t ble_conn_state_status(uint16_t conn_handle) +{ + ble_conn_state_status_t conn_status = BLE_CONN_STATUS_INVALID; + bool valid = sdk_mapped_flags_get_by_key(m_bcs.valid_conn_handles, + m_bcs.flags.valid_flags, + conn_handle); + + if (valid) + { + bool connected = sdk_mapped_flags_get_by_key(m_bcs.valid_conn_handles, + m_bcs.flags.connected_flags, + conn_handle); + + conn_status = connected ? BLE_CONN_STATUS_CONNECTED : BLE_CONN_STATUS_DISCONNECTED; + } + + return conn_status; +} + + +bool ble_conn_state_encrypted(uint16_t conn_handle) +{ + return sdk_mapped_flags_get_by_key(m_bcs.valid_conn_handles, + m_bcs.flags.encrypted_flags, + conn_handle); +} + + +bool ble_conn_state_mitm_protected(uint16_t conn_handle) +{ + return sdk_mapped_flags_get_by_key(m_bcs.valid_conn_handles, + m_bcs.flags.mitm_protected_flags, + conn_handle); +} + + +uint32_t ble_conn_state_n_connections(void) +{ + return sdk_mapped_flags_n_flags_set(m_bcs.flags.connected_flags); +} + + +uint32_t ble_conn_state_n_centrals(void) +{ + return sdk_mapped_flags_n_flags_set((m_bcs.flags.central_flags) & (m_bcs.flags.connected_flags)); +} + + +uint32_t ble_conn_state_n_peripherals(void) +{ + return sdk_mapped_flags_n_flags_set((~m_bcs.flags.central_flags) & (m_bcs.flags.connected_flags)); +} + + +sdk_mapped_flags_key_list_t ble_conn_state_conn_handles(void) +{ + return sdk_mapped_flags_key_list_get(m_bcs.valid_conn_handles, m_bcs.flags.valid_flags); +} + + +sdk_mapped_flags_key_list_t ble_conn_state_central_handles(void) +{ + return sdk_mapped_flags_key_list_get(m_bcs.valid_conn_handles, + (m_bcs.flags.central_flags) & (m_bcs.flags.connected_flags)); +} + + +sdk_mapped_flags_key_list_t ble_conn_state_periph_handles(void) +{ + return sdk_mapped_flags_key_list_get(m_bcs.valid_conn_handles, + (~m_bcs.flags.central_flags) & (m_bcs.flags.connected_flags)); +} + + +ble_conn_state_user_flag_id_t ble_conn_state_user_flag_acquire(void) +{ + for (ble_conn_state_user_flag_id_t i = BLE_CONN_STATE_USER_FLAG0; + i < BLE_CONN_STATE_N_USER_FLAGS; + i++) + { + if ( !user_flag_is_acquired(i) ) + { + user_flag_acquire(i); + return i; + } + } + + return BLE_CONN_STATE_USER_FLAG_INVALID; +} + + +bool ble_conn_state_user_flag_get(uint16_t conn_handle, ble_conn_state_user_flag_id_t flag_id) +{ + if (user_flag_is_acquired(flag_id)) + { + return sdk_mapped_flags_get_by_key(m_bcs.valid_conn_handles, + m_bcs.flags.user_flags[flag_id], + conn_handle); + } + else + { + return false; + } +} + + +void ble_conn_state_user_flag_set(uint16_t conn_handle, + ble_conn_state_user_flag_id_t flag_id, + bool value) +{ + if (user_flag_is_acquired(flag_id)) + { + sdk_mapped_flags_update_by_key(m_bcs.valid_conn_handles, + &m_bcs.flags.user_flags[flag_id], + conn_handle, + value); + } +} + + +sdk_mapped_flags_t ble_conn_state_user_flag_collection(ble_conn_state_user_flag_id_t flag_id) +{ + if ( user_flag_is_acquired(flag_id) ) + { + return m_bcs.flags.user_flags[flag_id]; + } + else + { + return 0; + } +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.h new file mode 100644 index 0000000000..653f7c423a --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.h @@ -0,0 +1,275 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** + * @file + * + * @defgroup ble_conn_state Connection state + * @ingroup ble_sdk_lib + * @{ + * @brief Module for storing data on BLE connections. + * + * @details This module stores certain states for each connection, which can be queried by + * connection handle. The module uses BLE events to keep the states updated. + * + * In addition to the preprogrammed states, this module can also keep track of a number of + * binary user states, or user flags. These are reset to 0 for new connections, but + * otherwise not touched by this module. + * + * This module uses the @ref sdk_mapped_flags module, with connection handles as keys and + * the connection states as flags. + * + * @note A connection handle is not immediately invalidated when it is disconnected. Certain states, + * such as the role, can still be queried until the next time a new connection is established + * to any device. + * + * To function properly, this module must be provided with BLE events from the SoftDevice + * through the @ref ble_conn_state_on_ble_evt() function. This module should be the first + * to receive BLE events if they are dispatched to multiple modules. + */ + +#ifndef BLE_CONN_STATE_H__ +#define BLE_CONN_STATE_H__ + +#include +#include +#include "ble.h" +#include "sdk_mapped_flags.h" + +/**@brief Connection handle statuses. + */ +typedef enum +{ + BLE_CONN_STATUS_INVALID, /**< The connection handle is invalid. */ + BLE_CONN_STATUS_DISCONNECTED, /**< The connection handle refers to a connection that has been disconnected, but not yet invalidated. */ + BLE_CONN_STATUS_CONNECTED, /**< The connection handle refers to an active connection. */ +} ble_conn_state_status_t; + +#define BLE_CONN_STATE_N_USER_FLAGS 24 /**< The number of available user flags. */ + + +/**@brief One ID for each user flag collection. + * + * @details These IDs are used to identify user flag collections in the API calls. + */ +typedef enum +{ + BLE_CONN_STATE_USER_FLAG0 = 0, + BLE_CONN_STATE_USER_FLAG1, + BLE_CONN_STATE_USER_FLAG2, + BLE_CONN_STATE_USER_FLAG3, + BLE_CONN_STATE_USER_FLAG4, + BLE_CONN_STATE_USER_FLAG5, + BLE_CONN_STATE_USER_FLAG6, + BLE_CONN_STATE_USER_FLAG7, + BLE_CONN_STATE_USER_FLAG8, + BLE_CONN_STATE_USER_FLAG9, + BLE_CONN_STATE_USER_FLAG10, + BLE_CONN_STATE_USER_FLAG11, + BLE_CONN_STATE_USER_FLAG12, + BLE_CONN_STATE_USER_FLAG13, + BLE_CONN_STATE_USER_FLAG14, + BLE_CONN_STATE_USER_FLAG15, + BLE_CONN_STATE_USER_FLAG16, + BLE_CONN_STATE_USER_FLAG17, + BLE_CONN_STATE_USER_FLAG18, + BLE_CONN_STATE_USER_FLAG19, + BLE_CONN_STATE_USER_FLAG20, + BLE_CONN_STATE_USER_FLAG21, + BLE_CONN_STATE_USER_FLAG22, + BLE_CONN_STATE_USER_FLAG23, + BLE_CONN_STATE_USER_FLAG_INVALID, +} ble_conn_state_user_flag_id_t; + + +/** + * @defgroup ble_conn_state_functions BLE connection state functions + * @{ + */ + + +/**@brief Function for initializing or resetting the module. + * + * @details This function sets all states to their default, removing all records of connection handles. + */ +void ble_conn_state_init(void); + + +/**@brief Function for providing BLE SoftDevice events to the connection state module. + * + * @param[in] p_ble_evt The SoftDevice event. + */ +void ble_conn_state_on_ble_evt(ble_evt_t * p_ble_evt); + + +/**@brief Function for querying whether a connection handle represents a valid connection. + * + * @details A connection might be valid and have a BLE_CONN_STATUS_DISCONNECTED status. + * Those connections are invalidated after a new connection occurs. + * + * @param[in] conn_handle Handle of the connection. + * + * @retval true If conn_handle represents a valid connection, thus a connection for which + we have a record. + * @retval false If conn_handle is @ref BLE_GAP_ROLE_INVALID, or if it has never been recorded. + */ +bool ble_conn_state_valid(uint16_t conn_handle); + + +/**@brief Function for querying the role of the local device in a connection. + * + * @param[in] conn_handle Handle of the connection to get the role for. + * + * @return The role of the local device in the connection (see @ref BLE_GAP_ROLES). + * If conn_handle is not valid, the function returns BLE_GAP_ROLE_INVALID. + */ +uint8_t ble_conn_state_role(uint16_t conn_handle); + + +/**@brief Function for querying the status of a connection. + * + * @param[in] conn_handle Handle of the connection. + * + * @return The status of the connection. + * If conn_handle is not valid, the function returns BLE_CONN_STATE_INVALID. + */ +ble_conn_state_status_t ble_conn_state_status(uint16_t conn_handle); + + +/**@brief Function for querying whether a connection is encrypted. + * + * @param[in] conn_handle Handle of connection to get the encryption state for. + * + * @retval true If the connection is encrypted. + * @retval false If the connection is not encrypted or conn_handle is invalid. + */ +bool ble_conn_state_encrypted(uint16_t conn_handle); + + +/**@brief Function for querying whether a connection encryption is protected from Man in the Middle + * attacks. + * + * @param[in] conn_handle Handle of connection to get the MITM state for. + * + * @retval true If the connection is encrypted with MITM protection. + * @retval false If the connection is not encrypted, or encryption is not MITM protected, or + * conn_handle is invalid. + */ +bool ble_conn_state_mitm_protected(uint16_t conn_handle); + + +/**@brief Function for querying the total number of connections. + * + * @return The total number of valid connections for which the module has a record. + */ +uint32_t ble_conn_state_n_connections(void); + + +/**@brief Function for querying the total number of connections in which the role of the local + * device is @ref BLE_GAP_ROLE_CENTRAL. + * + * @return The number of connections in which the role of the local device is + * @ref BLE_GAP_ROLE_CENTRAL. + */ +uint32_t ble_conn_state_n_centrals(void); + + +/**@brief Function for querying the total number of connections in which the role of the local + * device is @ref BLE_GAP_ROLE_PERIPH. + * + * @return The number of connections in which the role of the local device is + * @ref BLE_GAP_ROLE_PERIPH. + */ +uint32_t ble_conn_state_n_peripherals(void); + + +/**@brief Function for obtaining a list of all connection handles for which the module has a record. + * + * @details This function takes into account connections whose state is BLE_CONN_STATUS_DISCONNECTED. + * + * @return A list of all valid connection handles for which the module has a record. + */ +sdk_mapped_flags_key_list_t ble_conn_state_conn_handles(void); + + +/**@brief Function for obtaining a list of connection handles in which the role of the local + * device is @ref BLE_GAP_ROLE_CENTRAL. + * + * @details This function takes into account connections whose state is BLE_CONN_STATUS_DISCONNECTED. + * + * @return A list of all valid connection handles for which the module has a record and in which + * the role of local device is @ref BLE_GAP_ROLE_CENTRAL. + */ +sdk_mapped_flags_key_list_t ble_conn_state_central_handles(void); + + +/**@brief Function for obtaining the handle for the connection in which the role of the local device + * is @ref BLE_GAP_ROLE_PERIPH. + * + * @details This function takes into account connections whose state is BLE_CONN_STATUS_DISCONNECTED. + * + * @return A list of all valid connection handles for which the module has a record and in which + * the role of local device is @ref BLE_GAP_ROLE_PERIPH. + */ +sdk_mapped_flags_key_list_t ble_conn_state_periph_handles(void); + + +/**@brief Function for obtaining exclusive access to one of the user flag collections. + * + * @details The acquired collection contains one flag for each connection. These flags can be set + * and read individually for each connection. + * + * The state of user flags will not be modified by the connection state module, except to + * set it to 0 for a connection when that connection is invalidated. + * + * @return The ID of the acquired flag, or BLE_CONN_STATE_USER_FLAG_INVALID if none are available. + */ +ble_conn_state_user_flag_id_t ble_conn_state_user_flag_acquire(void); + + +/**@brief Function for reading the value of a user flag. + * + * @param[in] conn_handle Handle of connection to get the flag state for. + * @param[in] flag_id Which flag to get the state for. + * + * @return The state of the flag. If conn_handle is invalid, the function returns false. + */ +bool ble_conn_state_user_flag_get(uint16_t conn_handle, ble_conn_state_user_flag_id_t flag_id); + + +/**@brief Function for setting the value of a user flag. + * + * @param[in] conn_handle Handle of connection to set the flag state for. + * @param[in] flag_id Which flag to set the state for. + * @param[in] value Value to set the flag state to. + */ +void ble_conn_state_user_flag_set(uint16_t conn_handle, + ble_conn_state_user_flag_id_t flag_id, + bool value); + + +/**@brief Function for getting the state of a user flag for all connection handles. + * + * @details The returned collection can be used with the @ref sdk_mapped_flags API. The returned + * collection is a copy, so modifying it has no effect on the conn_state module. + * + * @param[in] flag_id Which flag to get states for. + * + * @return The collection of flag states. The collection is always all zeros when the flag_id is + * unregistered. + */ +sdk_mapped_flags_t ble_conn_state_user_flag_collection(ble_conn_state_user_flag_id_t flag_id); + +/** @} */ +/** @} */ + +#endif /* BLE_CONN_STATE_H__ */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_date_time.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_date_time.h new file mode 100644 index 0000000000..38b274d85f --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_date_time.h @@ -0,0 +1,76 @@ +/* Copyright (c) 2011 Nordic Semiconductor. All Rights Reserved. +* +* The information contained herein is property of Nordic Semiconductor ASA. +* Terms and conditions of usage are described in detail in NORDIC +* SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. +* +* Licensees are granted free, non-transferable use of the information. NO +* WARRANTY of ANY KIND is provided. This heading must NOT be removed from +* the file. +*/ + +/* Attention! +* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile +* qualification listings, this section of source code must not be modified. +*/ + +/** @file + * @brief Contains definition of ble_date_time structure. + */ + +/** @file + * + * @defgroup ble_sdk_srv_date_time BLE Date Time characteristic type + * @{ + * @ingroup ble_sdk_lib + * @brief Definition of ble_date_time_t type. + */ + +#ifndef BLE_DATE_TIME_H__ +#define BLE_DATE_TIME_H__ + +#include + +/**@brief Date and Time structure. */ +typedef struct +{ + uint16_t year; + uint8_t month; + uint8_t day; + uint8_t hours; + uint8_t minutes; + uint8_t seconds; +} ble_date_time_t; + +static __INLINE uint8_t ble_date_time_encode(const ble_date_time_t * p_date_time, + uint8_t * p_encoded_data) +{ + uint8_t len = uint16_encode(p_date_time->year, p_encoded_data); + + p_encoded_data[len++] = p_date_time->month; + p_encoded_data[len++] = p_date_time->day; + p_encoded_data[len++] = p_date_time->hours; + p_encoded_data[len++] = p_date_time->minutes; + p_encoded_data[len++] = p_date_time->seconds; + + return len; +} + +static __INLINE uint8_t ble_date_time_decode(ble_date_time_t * p_date_time, + const uint8_t * p_encoded_data) +{ + uint8_t len = sizeof(uint16_t); + + p_date_time->year = uint16_decode(p_encoded_data); + p_date_time->month = p_encoded_data[len++]; + p_date_time->day = p_encoded_data[len++]; + p_date_time->hours = p_encoded_data[len++]; + p_date_time->minutes = p_encoded_data[len++]; + p_date_time->seconds = p_encoded_data[len++]; + + return len; +} + +#endif // BLE_DATE_TIME_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_gatt_db.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_gatt_db.h new file mode 100644 index 0000000000..bfe3aebcd1 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_gatt_db.h @@ -0,0 +1,49 @@ +/* Copyright (c) 2016 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + */ + + /**@file + * + * @defgroup ble_sdk_lib_gatt_db GATT Database Service Structure + * @{ + * @ingroup app_common + */ + +#ifndef BLE_GATT_DB_H__ +#define BLE_GATT_DB_H__ + +#include +#include "ble.h" +#include "ble_gattc.h" + +#define BLE_GATT_DB_MAX_CHARS 5 /**< The maximum number of characteristics present in a service record. */ + +/**@brief Structure for holding the characteristic and the handle of its CCCD present on a server. + */ +typedef struct +{ + ble_gattc_char_t characteristic; /**< Structure containing information about the characteristic. */ + uint16_t cccd_handle; /**< CCCD Handle value for this characteristic. This will be set to BLE_GATT_HANDLE_INVALID if a CCCD is not present at the server. */ +} ble_gatt_db_char_t; + +/**@brief Structure for holding information about the service and the characteristics present on a + * server. + */ +typedef struct +{ + ble_uuid_t srv_uuid; /**< UUID of the service. */ + uint8_t char_count; /**< Number of characteristics present in the service. */ + ble_gattc_handle_range_t handle_range; /**< Service Handle Range. */ + ble_gatt_db_char_t charateristics[BLE_GATT_DB_MAX_CHARS]; /**< Array of information related to the characteristics present in the service. This list can extend further than one. */ +} ble_gatt_db_srv_t; + +#endif /* BLE_GATT_DB_H__ */ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_sensor_location.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_sensor_location.h new file mode 100644 index 0000000000..4fdbbf6199 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_sensor_location.h @@ -0,0 +1,40 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + /* Attention! +* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile +* qualification listings, this section of source code must not be modified. +*/ + +#ifndef BLE_SENSOR_LOCATION_H__ +#define BLE_SENSOR_LOCATION_H__ + +typedef enum { + BLE_SENSOR_LOCATION_OTHER = 0 , /**<-- Other */ + BLE_SENSOR_LOCATION_TOP_OF_SHOE = 1 , /**<-- Top of shoe */ + BLE_SENSOR_LOCATION_IN_SHOE = 2 , /**<-- In shoe */ + BLE_SENSOR_LOCATION_HIP = 3 , /**<-- Hip */ + BLE_SENSOR_LOCATION_FRONT_WHEEL = 4 , /**<-- Front Wheel */ + BLE_SENSOR_LOCATION_LEFT_CRANK = 5 , /**<-- Left Crank */ + BLE_SENSOR_LOCATION_RIGHT_CRANK = 6 , /**<-- Right Crank */ + BLE_SENSOR_LOCATION_LEFT_PEDAL = 7 , /**<-- Left Pedal */ + BLE_SENSOR_LOCATION_RIGHT_PEDAL = 8 , /**<-- Right Pedal */ + BLE_SENSOR_LOCATION_FRONT_HUB = 9 , /**<-- Front Hub */ + BLE_SENSOR_LOCATION_REAR_DROPOUT = 10, /**<-- Rear Dropout */ + BLE_SENSOR_LOCATION_CHAINSTAY = 11, /**<-- Chainstay */ + BLE_SENSOR_LOCATION_REAR_WHEEL = 12, /**<-- Rear Wheel */ + BLE_SENSOR_LOCATION_REAR_HUB = 13, /**<-- Rear Hub */ +}ble_sensor_location_t; + +#define BLE_NB_MAX_SENSOR_LOCATIONS 14 + +#endif // BLE_SENSOR_LOCATION_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.c new file mode 100644 index 0000000000..364798d196 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.c @@ -0,0 +1,197 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/* Attention! +* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile +* qualification listings, this section of source code must not be modified. +*/ + +#include "ble_srv_common.h" +#include +#include "nordic_common.h" +#include "app_error.h" +#include "ble.h" + +uint8_t ble_srv_report_ref_encode(uint8_t * p_encoded_buffer, + const ble_srv_report_ref_t * p_report_ref) +{ + uint8_t len = 0; + + p_encoded_buffer[len++] = p_report_ref->report_id; + p_encoded_buffer[len++] = p_report_ref->report_type; + + APP_ERROR_CHECK_BOOL(len == BLE_SRV_ENCODED_REPORT_REF_LEN); + return len; +} + + +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->p_str = (uint8_t *)p_ascii; +} + + +/**@brief Function for setting security requirements of a characteristic. + * + * @param[in] level required security level. + * @param[out] p_perm Characteristic security requirements. + * + * @return encoded security level and security mode. + */ +static inline void set_security_req(security_req_t level, ble_gap_conn_sec_mode_t * p_perm) +{ + + + BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(p_perm); + switch (level) + { + case SEC_NO_ACCESS: + BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(p_perm); + break; + case SEC_OPEN: + BLE_GAP_CONN_SEC_MODE_SET_OPEN(p_perm); + break; + case SEC_JUST_WORKS: + BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(p_perm); + break; + case SEC_MITM: + BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM(p_perm); + break; + case SEC_SIGNED: + BLE_GAP_CONN_SEC_MODE_SET_SIGNED_NO_MITM(p_perm); + break; + case SEC_SIGNED_MITM: + BLE_GAP_CONN_SEC_MODE_SET_SIGNED_WITH_MITM(p_perm); + break; + } + return; +} + + +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; + ble_gatts_attr_md_t user_descr_attr_md; + ble_gatts_attr_md_t cccd_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(ble_gatts_attr_md_t)); + set_security_req(p_char_props->read_access, &attr_md.read_perm); + set_security_req(p_char_props->write_access, & attr_md.write_perm); + 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_user ? BLE_GATTS_VLOC_USER : BLE_GATTS_VLOC_STACK); + + + memset(&char_md, 0, sizeof(ble_gatts_char_md_t)); + if ((p_char_props->char_props.notify == 1)||(p_char_props->char_props.indicate == 1)) + { + + memset(&cccd_md, 0, sizeof(cccd_md)); + set_security_req(p_char_props->cccd_write_access, &cccd_md.write_perm); + 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(ble_gatts_attr_t)); + 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; + } + if (p_char_props->p_user_descr != NULL) + { + memset(&user_descr_attr_md, 0, sizeof(ble_gatts_attr_md_t)); + char_md.char_user_desc_max_size = p_char_props->p_user_descr->max_size; + char_md.char_user_desc_size = p_char_props->p_user_descr->size; + char_md.p_char_user_desc = p_char_props->p_user_descr->p_char_user_desc; + + char_md.p_user_desc_md = &user_descr_attr_md; + + set_security_req(p_char_props->p_user_descr->read_access, &user_descr_attr_md.read_perm); + set_security_req(p_char_props->p_user_descr->write_access, &user_descr_attr_md.write_perm); + + user_descr_attr_md.rd_auth = (p_char_props->p_user_descr->is_defered_read ? 1 : 0); + user_descr_attr_md.wr_auth = (p_char_props->p_user_descr->is_defered_write ? 1 : 0); + user_descr_attr_md.vlen = (p_char_props->p_user_descr->is_var_len ? 1 : 0); + user_descr_attr_md.vloc = (p_char_props->p_user_descr->is_value_user ? BLE_GATTS_VLOC_USER : BLE_GATTS_VLOC_STACK); + } + if (p_char_props->p_presentation_format != NULL) + { + char_md.p_char_pf = p_char_props->p_presentation_format; + } + return sd_ble_gatts_characteristic_add(service_handle, + &char_md, + &attr_char_value, + p_char_handle); +} + + +uint32_t descriptor_add(uint16_t char_handle, + ble_add_descr_params_t * p_descr_props, + uint16_t * p_descr_handle) +{ + ble_gatts_attr_t descr_params; + ble_uuid_t desc_uuid; + ble_gatts_attr_md_t attr_md; + + memset(&descr_params, 0, sizeof(descr_params)); + if (p_descr_props->uuid_type == 0) + { + desc_uuid.type = BLE_UUID_TYPE_BLE; + } + else + { + desc_uuid.type = p_descr_props->uuid_type; + } + desc_uuid.uuid = p_descr_props->uuid; + descr_params.p_uuid = &desc_uuid; + + set_security_req(p_descr_props->read_access, &attr_md.read_perm); + set_security_req(p_descr_props->write_access,&attr_md.write_perm); + + attr_md.rd_auth = (p_descr_props->is_defered_read ? 1 : 0); + attr_md.wr_auth = (p_descr_props->is_defered_write ? 1 : 0); + attr_md.vlen = (p_descr_props->is_var_len ? 1 : 0); + attr_md.vloc = (p_descr_props->is_value_user ? BLE_GATTS_VLOC_USER : BLE_GATTS_VLOC_STACK); + descr_params.p_attr_md = &attr_md; + + descr_params.init_len = p_descr_props->init_len; + descr_params.init_offs = p_descr_props->init_offs; + descr_params.max_len = p_descr_props->max_len; + descr_params.p_value = p_descr_props->p_value; + + return sd_ble_gatts_descriptor_add(char_handle, &descr_params, p_descr_handle); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.h new file mode 100644 index 0000000000..7942454b1f --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.h @@ -0,0 +1,367 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_sdk_srv_common Common service definitions + * @{ + * @ingroup ble_sdk_srv + * @brief Constants, type definitions, and functions that are common to all services. + */ + +#ifndef BLE_SRV_COMMON_H__ +#define BLE_SRV_COMMON_H__ + +#include +#include +#include "ble_types.h" +#include "app_util.h" +#include "ble.h" +#include "ble_gap.h" +#include "ble_gatt.h" + +/** @defgroup UUID_SERVICES Service UUID definitions + * @{ */ +#define BLE_UUID_ALERT_NOTIFICATION_SERVICE 0x1811 /**< Alert Notification service UUID. */ +#define BLE_UUID_BATTERY_SERVICE 0x180F /**< Battery service UUID. */ +#define BLE_UUID_BLOOD_PRESSURE_SERVICE 0x1810 /**< Blood Pressure service UUID. */ +#define BLE_UUID_CURRENT_TIME_SERVICE 0x1805 /**< Current Time service UUID. */ +#define BLE_UUID_CYCLING_SPEED_AND_CADENCE 0x1816 /**< Cycling Speed and Cadence service UUID. */ +#define BLE_UUID_LOCATION_AND_NAVIGATION_SERVICE 0x1819 /**< Location and Navigation service UUID. */ +#define BLE_UUID_DEVICE_INFORMATION_SERVICE 0x180A /**< Device Information service UUID. */ +#define BLE_UUID_GLUCOSE_SERVICE 0x1808 /**< Glucose service UUID. */ +#define BLE_UUID_HEALTH_THERMOMETER_SERVICE 0x1809 /**< Health Thermometer service UUID. */ +#define BLE_UUID_HEART_RATE_SERVICE 0x180D /**< Heart Rate service UUID. */ +#define BLE_UUID_HUMAN_INTERFACE_DEVICE_SERVICE 0x1812 /**< Human Interface Device service UUID. */ +#define BLE_UUID_IMMEDIATE_ALERT_SERVICE 0x1802 /**< Immediate Alert service UUID. */ +#define BLE_UUID_LINK_LOSS_SERVICE 0x1803 /**< Link Loss service UUID. */ +#define BLE_UUID_NEXT_DST_CHANGE_SERVICE 0x1807 /**< Next Dst Change service UUID. */ +#define BLE_UUID_PHONE_ALERT_STATUS_SERVICE 0x180E /**< Phone Alert Status service UUID. */ +#define BLE_UUID_REFERENCE_TIME_UPDATE_SERVICE 0x1806 /**< Reference Time Update 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_TX_POWER_SERVICE 0x1804 /**< TX Power service UUID. */ +#define BLE_UUID_IPSP_SERVICE 0x1820 /**< Internet Protocol Support service UUID. */ +#define BLE_UUID_BMS_SERVICE 0x181E /**< BOND MANAGEMENT service UUID*/ +#define BLE_UUID_CGM_SERVICE 0x181F /**< Contiunous Glucose Monitoring service UUID*/ +#define BLE_UUID_PLX_SERVICE 0x1822 /**< Pulse Oximeter Service UUID*/ + + +/** @} */ + +/** @defgroup UUID_CHARACTERISTICS Characteristic UUID definitions + * @{ */ +#define BLE_UUID_REMOVABLE_CHAR 0x2A3A /**< Removable characteristic UUID. */ +#define BLE_UUID_SERVICE_REQUIRED_CHAR 0x2A3B /**< Service Required characteristic UUID. */ +#define BLE_UUID_ALERT_CATEGORY_ID_CHAR 0x2A43 /**< Alert Category Id characteristic UUID. */ +#define BLE_UUID_ALERT_CATEGORY_ID_BIT_MASK_CHAR 0x2A42 /**< Alert Category Id Bit Mask characteristic UUID. */ +#define BLE_UUID_ALERT_LEVEL_CHAR 0x2A06 /**< Alert Level characteristic UUID. */ +#define BLE_UUID_ALERT_NOTIFICATION_CONTROL_POINT_CHAR 0x2A44 /**< Alert Notification Control Point characteristic UUID. */ +#define BLE_UUID_ALERT_STATUS_CHAR 0x2A3F /**< Alert Status characteristic UUID. */ +#define BLE_UUID_BATTERY_LEVEL_CHAR 0x2A19 /**< Battery Level characteristic UUID. */ +#define BLE_UUID_BLOOD_PRESSURE_FEATURE_CHAR 0x2A49 /**< Blood Pressure Feature characteristic UUID. */ +#define BLE_UUID_BLOOD_PRESSURE_MEASUREMENT_CHAR 0x2A35 /**< Blood Pressure Measurement characteristic UUID. */ +#define BLE_UUID_BODY_SENSOR_LOCATION_CHAR 0x2A38 /**< Body Sensor Location characteristic UUID. */ +#define BLE_UUID_BOOT_KEYBOARD_INPUT_REPORT_CHAR 0x2A22 /**< Boot Keyboard Input Report characteristic UUID. */ +#define BLE_UUID_BOOT_KEYBOARD_OUTPUT_REPORT_CHAR 0x2A32 /**< Boot Keyboard Output Report characteristic UUID. */ +#define BLE_UUID_BOOT_MOUSE_INPUT_REPORT_CHAR 0x2A33 /**< Boot Mouse Input Report characteristic UUID. */ +#define BLE_UUID_CURRENT_TIME_CHAR 0x2A2B /**< Current Time characteristic UUID. */ +#define BLE_UUID_DATE_TIME_CHAR 0x2A08 /**< Date Time characteristic UUID. */ +#define BLE_UUID_DAY_DATE_TIME_CHAR 0x2A0A /**< Day Date Time characteristic UUID. */ +#define BLE_UUID_DAY_OF_WEEK_CHAR 0x2A09 /**< Day Of Week characteristic UUID. */ +#define BLE_UUID_DST_OFFSET_CHAR 0x2A0D /**< Dst Offset characteristic UUID. */ +#define BLE_UUID_EXACT_TIME_256_CHAR 0x2A0C /**< Exact Time 256 characteristic UUID. */ +#define BLE_UUID_FIRMWARE_REVISION_STRING_CHAR 0x2A26 /**< Firmware Revision String characteristic UUID. */ +#define BLE_UUID_GLUCOSE_FEATURE_CHAR 0x2A51 /**< Glucose Feature characteristic UUID. */ +#define BLE_UUID_GLUCOSE_MEASUREMENT_CHAR 0x2A18 /**< Glucose Measurement characteristic UUID. */ +#define BLE_UUID_GLUCOSE_MEASUREMENT_CONTEXT_CHAR 0x2A34 /**< Glucose Measurement Context characteristic UUID. */ +#define BLE_UUID_HARDWARE_REVISION_STRING_CHAR 0x2A27 /**< Hardware Revision String characteristic UUID. */ +#define BLE_UUID_HEART_RATE_CONTROL_POINT_CHAR 0x2A39 /**< Heart Rate Control Point characteristic UUID. */ +#define BLE_UUID_HEART_RATE_MEASUREMENT_CHAR 0x2A37 /**< Heart Rate Measurement characteristic UUID. */ +#define BLE_UUID_HID_CONTROL_POINT_CHAR 0x2A4C /**< Hid Control Point characteristic UUID. */ +#define BLE_UUID_HID_INFORMATION_CHAR 0x2A4A /**< Hid Information characteristic UUID. */ +#define BLE_UUID_IEEE_REGULATORY_CERTIFICATION_DATA_LIST_CHAR 0x2A2A /**< IEEE Regulatory Certification Data List characteristic UUID. */ +#define BLE_UUID_INTERMEDIATE_CUFF_PRESSURE_CHAR 0x2A36 /**< Intermediate Cuff Pressure characteristic UUID. */ +#define BLE_UUID_INTERMEDIATE_TEMPERATURE_CHAR 0x2A1E /**< Intermediate Temperature characteristic UUID. */ +#define BLE_UUID_LOCAL_TIME_INFORMATION_CHAR 0x2A0F /**< Local Time Information characteristic UUID. */ +#define BLE_UUID_MANUFACTURER_NAME_STRING_CHAR 0x2A29 /**< Manufacturer Name String characteristic UUID. */ +#define BLE_UUID_MEASUREMENT_INTERVAL_CHAR 0x2A21 /**< Measurement Interval characteristic UUID. */ +#define BLE_UUID_MODEL_NUMBER_STRING_CHAR 0x2A24 /**< Model Number String characteristic UUID. */ +#define BLE_UUID_UNREAD_ALERT_CHAR 0x2A45 /**< Unread Alert characteristic UUID. */ +#define BLE_UUID_NEW_ALERT_CHAR 0x2A46 /**< New Alert characteristic UUID. */ +#define BLE_UUID_PNP_ID_CHAR 0x2A50 /**< PNP Id characteristic UUID. */ +#define BLE_UUID_PROTOCOL_MODE_CHAR 0x2A4E /**< Protocol Mode characteristic UUID. */ +#define BLE_UUID_RECORD_ACCESS_CONTROL_POINT_CHAR 0x2A52 /**< Record Access Control Point characteristic UUID. */ +#define BLE_UUID_REFERENCE_TIME_INFORMATION_CHAR 0x2A14 /**< Reference Time Information characteristic UUID. */ +#define BLE_UUID_REPORT_CHAR 0x2A4D /**< Report characteristic UUID. */ +#define BLE_UUID_REPORT_MAP_CHAR 0x2A4B /**< Report Map characteristic UUID. */ +#define BLE_UUID_RINGER_CONTROL_POINT_CHAR 0x2A40 /**< Ringer Control Point characteristic UUID. */ +#define BLE_UUID_RINGER_SETTING_CHAR 0x2A41 /**< Ringer Setting characteristic UUID. */ +#define BLE_UUID_SCAN_INTERVAL_WINDOW_CHAR 0x2A4F /**< Scan Interval Window characteristic UUID. */ +#define BLE_UUID_SCAN_REFRESH_CHAR 0x2A31 /**< Scan Refresh characteristic UUID. */ +#define BLE_UUID_SERIAL_NUMBER_STRING_CHAR 0x2A25 /**< Serial Number String characteristic UUID. */ +#define BLE_UUID_SOFTWARE_REVISION_STRING_CHAR 0x2A28 /**< Software Revision String characteristic UUID. */ +#define BLE_UUID_SUPPORTED_NEW_ALERT_CATEGORY_CHAR 0x2A47 /**< Supported New Alert Category characteristic UUID. */ +#define BLE_UUID_SUPPORTED_UNREAD_ALERT_CATEGORY_CHAR 0x2A48 /**< Supported Unread Alert Category characteristic UUID. */ +#define BLE_UUID_SYSTEM_ID_CHAR 0x2A23 /**< System Id characteristic UUID. */ +#define BLE_UUID_TEMPERATURE_MEASUREMENT_CHAR 0x2A1C /**< Temperature Measurement characteristic UUID. */ +#define BLE_UUID_TEMPERATURE_TYPE_CHAR 0x2A1D /**< Temperature Type characteristic UUID. */ +#define BLE_UUID_TIME_ACCURACY_CHAR 0x2A12 /**< Time Accuracy characteristic UUID. */ +#define BLE_UUID_TIME_SOURCE_CHAR 0x2A13 /**< Time Source characteristic UUID. */ +#define BLE_UUID_TIME_UPDATE_CONTROL_POINT_CHAR 0x2A16 /**< Time Update Control Point characteristic UUID. */ +#define BLE_UUID_TIME_UPDATE_STATE_CHAR 0x2A17 /**< Time Update State characteristic UUID. */ +#define BLE_UUID_TIME_WITH_DST_CHAR 0x2A11 /**< Time With Dst characteristic UUID. */ +#define BLE_UUID_TIME_ZONE_CHAR 0x2A0E /**< Time Zone characteristic UUID. */ +#define BLE_UUID_TX_POWER_LEVEL_CHAR 0x2A07 /**< TX Power Level characteristic UUID. */ +#define BLE_UUID_CSC_FEATURE_CHAR 0x2A5C /**< Cycling Speed and Cadence Feature characteristic UUID. */ +#define BLE_UUID_CSC_MEASUREMENT_CHAR 0x2A5B /**< Cycling Speed and Cadence Measurement characteristic UUID. */ +#define BLE_UUID_RSC_FEATURE_CHAR 0x2A54 /**< Running Speed and Cadence Feature characteristic UUID. */ +#define BLE_UUID_SC_CTRLPT_CHAR 0x2A55 /**< Speed and Cadence Control Point UUID. */ +#define BLE_UUID_RSC_MEASUREMENT_CHAR 0x2A53 /**< Running Speed and Cadence Measurement characteristic UUID. */ +#define BLE_UUID_SENSOR_LOCATION_CHAR 0x2A5D /**< Sensor Location characteristic UUID. */ +#define BLE_UUID_EXTERNAL_REPORT_REF_DESCR 0x2907 /**< External Report Reference descriptor UUID. */ +#define BLE_UUID_REPORT_REF_DESCR 0x2908 /**< Report Reference descriptor UUID. */ +#define BLE_UUID_LN_FEATURE_CHAR 0x2A6A /**< Location Navigation Service, Feature characteristic UUID. */ +#define BLE_UUID_LN_POSITION_QUALITY_CHAR 0x2A69 /**< Location Navigation Service, Position quality UUID. */ +#define BLE_UUID_LN_LOCATION_AND_SPEED_CHAR 0x2A67 /**< Location Navigation Service, Location and Speed characteristic UUID. */ +#define BLE_UUID_LN_NAVIGATION_CHAR 0x2A68 /**< Location Navigation Service, Navigation characteristic UUID. */ +#define BLE_UUID_LN_CONTROL_POINT_CHAR 0x2A6B /**< Location Navigation Service, Control point characteristic UUID. */ +#define BLE_UUID_BMS_CTRLPT 0x2AA4 /**< BMS Control Point characteristic UUID. */ +#define BLE_UUID_BMS_FEATURE 0x2AA5 /**< BMS Feature characteristic UUID. */ +#define BLE_UUID_CGM_MEASUREMENT 0x2AA7 /**< CGM Service, Measurement characteristic UUID*/ +#define BLE_UUID_CGM_FEATURE 0x2AA8 /**< CGM Service, Feature characteristic UUID*/ +#define BLE_UUID_CGM_STATUS 0x2AA9 /**< CGM Service, Status characteristic UUID*/ +#define BLE_UUID_CGM_SESSION_START_TIME 0x2AAA /**< CGM Service, session start time characteristic UUID*/ +#define BLE_UUID_CGM_SESSION_RUN_TIME 0x2AAB /**< CGM Service, session run time characteristic UUID*/ +#define BLE_UUID_CGM_SPECIFIC_OPS_CTRLPT 0x2AAC /**< CGM Service, specific ops ctrlpt characteristic UUID*/ +#define BLE_UUID_PLX_SPOT_CHECK_MEAS 0x2A5E /**< PLX Service, spot check measurement characteristic UUID*/ +#define BLE_UUID_PLX_CONTINUOUS_MEAS 0x2A5F /**< PLX Service, continuous measurement characteristic UUID*/ +#define BLE_UUID_PLX_FEATURES 0x2A60 /**< PLX Service, feature characteristic UUID*/ + + + + + +/** @} */ + +/** @defgroup ALERT_LEVEL_VALUES Definitions for the Alert Level characteristic values + * @{ */ +#define BLE_CHAR_ALERT_LEVEL_NO_ALERT 0x00 /**< No Alert. */ +#define BLE_CHAR_ALERT_LEVEL_MILD_ALERT 0x01 /**< Mild Alert. */ +#define BLE_CHAR_ALERT_LEVEL_HIGH_ALERT 0x02 /**< High Alert. */ +/** @} */ + +#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. */ + +/**@brief Type definition for error handler function that will be called in case of an error in + * a service or a service library module. */ +typedef void (*ble_srv_error_handler_t) (uint32_t nrf_error); + + + +/**@brief Value of a Report Reference descriptor. + * + * @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. + */ +typedef struct +{ + 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 (see @ref BLE_HIDS_REPORT_TYPE) */ +} ble_srv_report_ref_t; + +/**@brief UTF-8 string data type. + * + * @note The type can only hold a pointer to the string data (i.e. not the actual data). + */ +typedef struct +{ + uint16_t length; /**< String length. */ + uint8_t * p_str; /**< String data. */ +} ble_srv_utf8_str_t; + + +/**@brief Security settings structure. + * @details This structure contains the security options needed during initialization of the + * service. + */ +typedef struct +{ + ble_gap_conn_sec_mode_t read_perm; /**< Read permissions. */ + ble_gap_conn_sec_mode_t write_perm; /**< Write permissions. */ +} ble_srv_security_mode_t; + +/**@brief Security settings structure. + * @details This structure contains the security options needed during initialization of the + * service. It can be used when the characteristics contains a CCCD. + */ +typedef struct +{ + 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 write_perm; /**< Write permissions. */ +} ble_srv_cccd_security_mode_t; + +/**@brief Function for decoding a CCCD value, and then testing if notification is + * enabled. + * + * @param[in] p_encoded_data Buffer where the encoded CCCD is stored. + * + * @retval TRUE If notification is enabled. + * @retval FALSE Otherwise. + */ +static __INLINE bool ble_srv_is_notification_enabled(uint8_t const * p_encoded_data) +{ + uint16_t cccd_value = uint16_decode(p_encoded_data); + return ((cccd_value & BLE_GATT_HVX_NOTIFICATION) != 0); +} + +/**@brief Function for decoding a CCCD value, and then testing if indication is + * enabled. + * + * @param[in] p_encoded_data Buffer where the encoded CCCD is stored. + * + * @retval TRUE If indication is enabled. + * @retval FALSE Otherwise. + */ +static __INLINE bool ble_srv_is_indication_enabled(uint8_t const * p_encoded_data) +{ + uint16_t cccd_value = uint16_decode(p_encoded_data); + return ((cccd_value & BLE_GATT_HVX_INDICATION) != 0); +} + +/**@brief Function for encoding a Report Reference Descriptor. + * + * @param[in] p_encoded_buffer The buffer of the encoded data. + * @param[in] p_report_ref Report Reference value to be encoded. + * + * @return Length of the encoded data. + */ +uint8_t ble_srv_report_ref_encode(uint8_t * p_encoded_buffer, + const ble_srv_report_ref_t * p_report_ref); + +/**@brief Function for making a UTF-8 structure refer to an ASCII string. + * + * @param[out] p_utf8 UTF-8 structure to be set. + * @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); + + +/**@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 Characteristic User Descriptor parameters. + * @details This structure contains the parameters for User Descriptor. + */ +typedef struct +{ + uint16_t max_size; /**< Maximum size of the user descriptor*/ + uint16_t size; /**< Size of the user descriptor*/ + uint8_t *p_char_user_desc; /**< User descriptor content, pointer to a UTF-8 encoded string (non-NULL terminated)*/ + bool is_var_len; /**< Indicates if the user descriptor has variable length.*/ + ble_gatt_char_props_t char_props; /**< user descriptor 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 user descriptor.*/ + security_req_t write_access; /**< Security requirement for writing the user descriptor.*/ + bool is_value_user; /**< Indicate if the content of the characteristic is to be stored in the application (user) or in the stack.*/ +}ble_add_char_user_desc_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_user; /**< Indicate if the content of the characteristic is to be stored in the application (user) or in the stack.*/ + ble_add_char_user_desc_t *p_user_descr; /**< Pointer to user descriptor if needed*/ + ble_gatts_char_pf_t *p_presentation_format; /**< Pointer to characteristic format if needed*/ +} ble_add_char_params_t; + + +/**@brief Add descriptor parameters structure. + * @details This structure contains the parameters needed to use the @ref descriptor_add function. + */ +typedef struct +{ + uint16_t uuid; /**< descriptor 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.*/ + bool is_defered_read; /**< Indicate if deferred read operations are supported.*/ + bool is_defered_write; /**< Indicate if deferred write operations are supported.*/ + bool is_var_len; /**< Indicates if the descriptor value has variable length.*/ + security_req_t read_access; /**< Security requirement for reading the descriptor value.*/ + security_req_t write_access; /**< Security requirement for writing the descriptor value.*/ + bool is_value_user; /**< Indicate if the content of the characteristic is to be stored in the application (user) or in the stack.*/ + uint16_t init_len; /**< Initial descriptor value length in bytes. */ + uint16_t init_offs; /**< Initial descriptor value offset in bytes. If different from zero, the first init_offs bytes of the attribute value will be left uninitialized. */ + uint16_t max_len; /**< Maximum descriptor value length in bytes, see @ref BLE_GATTS_ATTR_LENS_MAX for maximum values. */ + uint8_t* p_value; /**< Pointer to the value of the descriptor*/ +} ble_add_descr_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); + + +/**@brief Function for adding a characteristic's descriptor to a given characteristic. + * + * @param[in] char_handle Handle of the characteristic to which the descriptor is to be added, if @ref BLE_GATT_HANDLE_INVALID is used, it will be placed sequentially. + * @param[in] p_descr_props Information needed to add the descriptor. + * @param[out] p_descr_handle Handle of the added descriptor. + * + * @retval NRF_SUCCESS If the characteristic was added successfully. Otherwise, an error code is returned. + */ +uint32_t descriptor_add(uint16_t char_handle, + ble_add_descr_params_t * p_descr_props, + uint16_t * p_descr_handle); + + +#endif // BLE_SRV_COMMON_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/config/device_manager_cnfg.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/config/device_manager_cnfg.h new file mode 100644 index 0000000000..9aff537f30 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/config/device_manager_cnfg.h @@ -0,0 +1,98 @@ +/* Copyright (C) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + /** + * @file device_manager_cnfg.h + * + * @cond + * @defgroup device_manager_cnfg Device Manager Configuration + * @ingroup device_manager + * @{ + * + * @brief Defines application specific configuration for Device Manager. + * + * @details All configurations that are specific to application have been defined + * here. Application should configuration that best suits its requirements. + */ + +#ifndef DEVICE_MANAGER_CNFG_H__ +#define DEVICE_MANAGER_CNFG_H__ + +/** + * @defgroup device_manager_inst Device Manager Instances + * @{ + */ +/** + * @brief Maximum applications that Device Manager can support. + * + * @details Maximum application that the Device Manager can support. + * Currently only one application can be supported. + * Minimum value : 1 + * Maximum value : 1 + * Dependencies : None. + */ +#define DEVICE_MANAGER_MAX_APPLICATIONS 1 + +/** + * @brief Maximum connections that Device Manager should simultaneously manage. + * + * @details Maximum connections that Device Manager should simultaneously manage. + * Minimum value : 1 + * Maximum value : Maximum links supported by SoftDevice. + * Dependencies : None. + */ +#define DEVICE_MANAGER_MAX_CONNECTIONS 1 + + +/** + * @brief Maximum bonds that Device Manager should manage. + * + * @details Maximum bonds that Device Manager should manage. + * Minimum value : 1 + * Maximum value : 254. + * Dependencies : None. + * @note In case of GAP Peripheral role, the Device Manager will accept bonding procedure + * requests from peers even if this limit is reached, but bonding information will not + * be stored. In such cases, application will be notified with DM_DEVICE_CONTEXT_FULL + * as event result at the completion of the security procedure. + */ +#define DEVICE_MANAGER_MAX_BONDS 7 + + +/** + * @brief Maximum Characteristic Client Descriptors used for GATT Server. + * + * @details Maximum Characteristic Client Descriptors used for GATT Server. + * Minimum value : 1 + * Maximum value : 254. + * Dependencies : None. + */ +#define DM_GATT_CCCD_COUNT 2 + + +/** + * @brief Size of application context. + * + * @details Size of application context that Device Manager should manage for each bonded device. + * Size had to be a multiple of word size. + * Minimum value : 4. + * Maximum value : 256. + * Dependencies : Needed only if Application Context saving is used by the application. + * @note If set to zero, its an indication that application context is not required to be managed + * by the module. + */ +#define DEVICE_MANAGER_APP_CONTEXT_SIZE 0 + +/* @} */ +/* @} */ +/** @endcond */ +#endif // DEVICE_MANAGER_CNFG_H__ + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager.h new file mode 100644 index 0000000000..9aa465d259 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager.h @@ -0,0 +1,888 @@ +/* Copyright (C) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** + * @file device_manager.h + * + * @defgroup device_manager Device Manager + * @ingroup ble_sdk_lib + * @{ + * @brief Device Manager Application Interface Abstraction. + * + * @details The Device Manager module manages Active and Bonded Peers. Management of peer includes + * book keeping of contextual information like the Security Keys, GATT + * configuration and any application specific information. + * + * Active Peers are devices which are connected, and may or may not be bonded. + * Bonded Peers are devices which are bonded, and may or may not be Active (Connected). + * Active Bonded Peer refers to a device which is connected and bonded. + * + * Paired Devices refers to peer devices that are connected and have necessary context + * establishment/exchange for the current connection session. On disconnect, + * all contextual information is flushed. For example, SMP Information Exchanged during + * pairing and GATT Configuration is not retained on disconnection. + * + * Note that this module allows management of contextual information but + * does not provide an interface for connection management. Therefore, entering connectible + * mode, connection establishment, or disconnection of a link with peer is not in scope + * of this module. + * + * For bonded peers, the contextual information is required to be retained on disconnection + * and power cycling. Persistent storage of contextual information is handled by the + * module. This module categorizes the contextual information into 3 categories: + * - Bonding Information + * Bond information is the information exchanged between local and peer device to + * establish a bond. It also includes peer identification information, + * like the peer address or the IRK or both. From here on this category of information + * is referred to as Device Context. + * - Service/Protocol Information + * Service/Protocol information is the information retained for the peer to save on one-time + * procedures like the GATT Service Discovery procedures and Service Configurations. + * It allows devices to resume data exchange on subsequent reconnection without having + * to perform initial set-up procedures each time. From here on this category is + * referred to as Service Context. + * - Application Information + * Application information is the context that the application would like to associate with + * each of the bonded device. For example, if the application chooses to rank its peers + * in order to manage them better, the rank information could be treated as + * Application Information. This storage space is provided to save the application from + * maintaining a mapping table with each Device Instance and Application Information. + * However, if the application have no use for this, it is possible to not + * use or employ this at compile time. From here on this category of information is + * referred to as Application Context. + */ + + +#ifndef DEVICE_MANAGER_H__ +#define DEVICE_MANAGER_H__ + +#include +#include +#include "sdk_common.h" +#include "ble.h" +#include "ble_gap.h" +#include "device_manager_cnfg.h" + +/** + * @defgroup dm_service_cntext_types Service/Protocol Types + * + * @brief Describes the possible types of Service/Protocol Contexts for a bonded/peer device. + * + * @details Possible Service/Protocol context per peer device. The Device Manager provides the + * functionality of persistently storing the Service/Protocol context and can automatically + * load them when needed. + * For example system attributes for a GATT Server. Based on the nature of the application, + * not all service types may be needed. The application can specify + * only the service/protocol context it wants to use at the time of registration. + * @{ + */ +#define DM_PROTOCOL_CNTXT_NONE 0x00 /**< No Service Context, this implies the application does not want to associate any service/protocol context with the peer device */ +#define DM_PROTOCOL_CNTXT_GATT_SRVR_ID 0x01 /**< GATT Server Service Context, this implies the application does associate GATT Server with the peer device and this information will be loaded when needed for a bonded device */ +#define DM_PROTOCOL_CNTXT_GATT_CLI_ID 0x02 /**< GATT Client Service Context, this implies the application does associate GATT Client with the peer device and this information will be loaded when needed for a bonded device */ +#define DM_PROTOCOL_CNTXT_ALL \ + (DM_PROTOCOL_CNTXT_GATT_SRVR_ID | DM_PROTOCOL_CNTXT_GATT_CLI_ID) /**< All Service/Protocol Context, this implies that the application wants to associate all Service/Protocol Information with the bonded device. This is configurable based on system requirements. If the application has only one type of service, this define could be altered to reflect the same. */ +/** @} */ + + +/** + * @defgroup dm_events Device Manager Events + * + * @brief This section describes the device manager events that are notified to the application. + * + * @details The Device Manager notifies the application of various asynchronous events using the + * asynchronous event notification callback. All events has been categorized into: + * a. General. + * b. Link Status. + * c. Context Management. + * + * In the callback, these events are notified along with handle that uniquely identifies: + * application instance, active instance (if applicable), device instance + * bonding instance, (if applicable) and service instance. + * Not all events are pertaining to an active connection, for example a context deletion event could occur even if the peer + * is not connected. Also, general category of events may not be pertaining to any specific peer. + * See also \ref dm_event_cb_t and \ref dm_register. + * @{ + */ +/** + * @defgroup general_events General Events + * + * @brief General or miscellaneous events. + * + * @details This category of events are general events not pertaining to a peer or context. + * + * @{ + */ +#define DM_EVT_RFU 0x00 /**< Reserved for future use, is never notified. */ +#define DM_EVT_ERROR 0x01 /**< Device Manager Event Error. */ +/** @} */ + +/** + * @defgroup link_status_events Link Status Events + * + * @brief Link Status Events. + * + * @details This category of events notify the application of the link status. Event result associated + * with the event is provided along with the event in the callback to provide more details of + * whether a procedure succeeded or failed and assist the application in decision making of + * how to proceed. For example if a DM_DEVICE_CONNECT_IND is indicated with NRF_SUCCESS + * result, the application may want to proceed with discovering and association with + * service of the peer. However, if indicated with a failure result, the application may + * want to take an alternate action such as reattempting to connect or go into a + * sleep mode. + * + * @{ + */ +#define DM_EVT_CONNECTION 0x11 /**< Indicates that link with the peer is established. */ +#define DM_EVT_DISCONNECTION 0x12 /**< Indicates that link with peer is torn down. */ +#define DM_EVT_SECURITY_SETUP 0x13 /**< Security procedure for link started indication */ +#define DM_EVT_SECURITY_SETUP_COMPLETE 0x14 /**< Security procedure for link completion indication. */ +#define DM_EVT_LINK_SECURED 0x15 /**< Indicates that link with the peer is secured. For bonded devices, subsequent reconnections with bonded peer will result only in this event when the link is secured and setup procedures will not occur unless the bonding information is either lost or deleted on either or both sides. */ +#define DM_EVT_SECURITY_SETUP_REFRESH 0x16 /**< Indicates that the security on the link was re-established. */ +/** @} */ + +/** + * @defgroup context_mgmt_events Context Management Events + * + * @brief Context Management Events. + * + * @details These events notify the application of the status of context loading and storing. + * + * @{ + */ +#define DM_EVT_DEVICE_CONTEXT_LOADED 0x21 /**< Indicates that device context for a peer is loaded. */ +#define DM_EVT_DEVICE_CONTEXT_STORED 0x22 /**< Indicates that device context is stored persistently. */ +#define DM_EVT_DEVICE_CONTEXT_DELETED 0x23 /**< Indicates that device context is deleted. */ +#define DM_EVT_SERVICE_CONTEXT_LOADED 0x31 /**< Indicates that service context for a peer is loaded. */ +#define DM_EVT_SERVICE_CONTEXT_STORED 0x32 /**< Indicates that service context is stored persistently. */ +#define DM_EVT_SERVICE_CONTEXT_DELETED 0x33 /**< Indicates that service context is deleted. */ +#define DM_EVT_APPL_CONTEXT_LOADED 0x41 /**< Indicates that application context for a peer is loaded. */ +#define DM_EVT_APPL_CONTEXT_STORED 0x42 /**< Indicates that application context is stored persistently. */ +#define DM_EVT_APPL_CONTEXT_DELETED 0x43 /**< Indicates that application context is deleted. */ +/** @} */ +/** @} */ + +#define DM_INVALID_ID 0xFF /**< Invalid instance idenitifer. */ + +/** + * @defgroup dm_data_structure Device Manager Data Types + * + * @brief This section describes all the data types exposed by the module to the application. + * @{ + */ + +/** + * @brief Application Instance. + * + * @details Application instance uniquely identifies an application. The identifier is allocated by + * the device manager when application registers with the module. The application is + * expected to identify itself with this instance identifier when initiating subsequent + * requests. Application should use the utility API \ref dm_application_instance_set in + * order to set its application instance in dm_handle_t needed for all subsequent APIs. + * See also \ref dm_register. + */ +typedef uint8_t dm_application_instance_t; + +/** + * @brief Connection Instance. + * + * @details Identifies connection instance for an active device. This instance is allocated by the + * device manager when a connection is established and is notified with DM_EVT_CONNECTION + * with the event result NRF_SUCCESS. + */ +typedef uint8_t dm_connection_instance_t; + +/** + * @brief Device Instance. + * + * @details Uniquely identifies a bonded peer device. The peer device may or may not be connected. + * In case of the central: The bonded device instance to identify the peer is allocated when bonding procedure is initiated by the central using dm_security_setup_req. + * In case of the peripheral: When the bonding procedure is successful, the DM_EVT_SECURITY_SETUP_COMPLETE event with success event result, is received. + * In case the module cannot add more bonded devices, no instance is allocated, this is indicated by an appropriate error code for the API/event as the case may be. Application can choose to disconnect the link. + */ +typedef uint8_t dm_device_instance_t; + +/** + * @brief Service Instance. + * + * @details Uniquely identifies a peer device. The peer device may or may not be connected. This + * instance is allocated by the device manager when a device is bonded and is notified + * when security procedures have been initiated. + * Security Procedures initiation is notified with DM_SECURITY_SETUP_IND with + * success event result. In case the event result indicates that the module cannot add more + * bonded devices, no instance is allocated. Application can chose to disconnect the link. + */ +typedef uint8_t dm_service_instance_t; + +/** + * @brief Service/Protocol Type Identifier. + * + * @details Uniquely identifies a service or a protocol type. Service/Protocol Type identification + * is needed as each service/protocol can have its own contextual data. + * This allows the peer to access more than one service at a time. \ref dm_service_cntext_types describes the + * list of services/protocols supported. + */ +typedef uint8_t service_type_t; + +/**@brief Device Manager Master identification and encryption information. */ +typedef struct dm_enc_key +{ + ble_gap_enc_info_t enc_info; /**< GAP encryption information. */ + ble_gap_master_id_t master_id; /**< Master identification. */ +} dm_enc_key_t; + +/** @brief Device Manager identity and address information. */ +typedef struct dm_id_key +{ + ble_gap_irk_t id_info; /**< Identity information. */ + ble_gap_addr_t id_addr_info; /**< Identity address information. */ +} dm_id_key_t; + +/** @brief Device Manager signing information. */ +typedef struct dm_sign_key +{ + ble_gap_sign_info_t sign_key; /**< GAP signing information. */ +} dm_sign_key_t; + +/** @brief Security keys. */ +typedef struct dm_sec_keyset +{ + union + { + dm_enc_key_t * p_enc_key; /**< Pointer to Device Manager encryption information structure. */ + } enc_key; + dm_id_key_t * p_id_key; /**< Identity key, or NULL. */ + dm_sign_key_t * p_sign_key; /**< Signing key, or NULL. */ +} dm_sec_keys_t; + +/** @brief Device Manager security key set. */ +typedef struct +{ + dm_sec_keys_t keys_periph; /**< Keys distributed by the device in the Peripheral role. */ + dm_sec_keys_t keys_central; /**< Keys distributed by the device in the Central role. */ +} dm_sec_keyset_t; + +/** + * @brief Device Handle used for unique identification of each peer. + * + * @details This data type is used to uniquely identify each peer device. A peer device could be + * active and/or bonded. Therefore an instance for active and bonded is provided. + * However, the application is expected to treat this is an opaque structure and use this for + * all API interactions once stored on appropriate events. + * See \ref dm_events. + */ +typedef struct device_handle +{ + dm_application_instance_t appl_id; /**< Identifies the application instances for the device that is being managed. */ + dm_connection_instance_t connection_id; /**< Identifies the active connection instance. */ + dm_device_instance_t device_id; /**< Identifies peer instance in the data base. */ + dm_service_instance_t service_id; /**< Service instance identifier. */ +} dm_handle_t; + +/** + * @brief Definition of Data Context. + * + * @details Defines contextual data format, it consists of context data length and pointer to data. + */ +typedef struct +{ + uint32_t flags; /**< Additional flags identifying data. */ + uint32_t len; /**< Length of data. */ + uint8_t * p_data; /**< Pointer to contextual data, a copy is made of the data. */ +} dm_context_t; + + +/** + * @brief Device Context. + * + * @details Defines "device context" type for a device managed by device manager. + */ +typedef dm_context_t dm_device_context_t; + +/** + * @brief Service Context. + * + * @details Service context data for a service identified by the 'service_type' field. + */ +typedef struct +{ + service_type_t service_type; /**< Identifies the service/protocol to which the context data is related. */ + dm_context_t context_data; /**< Contains length and pointer to context data */ +} dm_service_context_t; + +/** + * @brief Application context. + * + * @details The application context can be used by the application to map any application level + * information that is to be mapped with a particular peer. + * For bonded peers, this information will be stored by the bond manager persistently. + * Note that the device manager treats this information as an + * opaque block of bytes. + * Necessary APIs to get and set this context for a peer have been provided. + */ +typedef dm_context_t dm_application_context_t; + +/** + * @brief Event parameters. + * + * @details Defines event parameters for each of the events notified by the module. + */ +typedef union +{ + ble_gap_evt_t * p_gap_param; /**< All events that are triggered in device manager as a result of GAP events, like connection, disconnection and security procedures are accompanied with GAP parameters. */ + dm_application_context_t * p_app_context; /**< All events that are associated with application context procedures of store, load, and deletion have this as event parameter. */ + dm_service_context_t * p_service_context; /**< All events that are associated with service context procedures of store, load and deletion have this as event parameter. */ + dm_device_context_t * p_device_context; /**< All events that are associated with device context procedures of store, load and deletion have this as event parameter. */ +} dm_event_param_t; + +/** + * @brief Asynchronous events details notified to the application by the module. + * + * @details Defines event type along with event parameters notified to the application by the + * module. + */ +typedef struct +{ + uint8_t event_id; /**< Identifies the event. See \ref dm_events for details on event types and their significance. */ + dm_event_param_t event_param; /**< Event parameters. Can be NULL if the event does not have any parameters. */ + uint16_t event_paramlen; /**< Length of the event parameters, is zero if the event does not have any parameters. */ +} dm_event_t; + +/** + * @brief Event notification callback registered by application with the module. + * + * @details Event notification callback registered by application with the module when registering + * the module using \ref dm_register API. + * + * @param[in] p_handle Identifies the peer for which the event is being notified. + * @param[in] p_event Identifies the event, any associated parameters and parameter length. + * See \ref dm_events for details on event types and their significance. + * @param[in,out] event_result Provide additional information on the event. + * In addition to SDK error codes there is also a return value + * indicating if maximum number of connections has been reached when connecting or bonding. + * + * @retval NRF_SUCCESS on success, or a failure to indicate if it could handle the event + * successfully. There is no action taken in case application returns a failure. + */ +typedef ret_code_t (*dm_event_cb_t)(dm_handle_t const * p_handle, + dm_event_t const * p_event, + ret_code_t event_result); + +/** + * @brief Initialization Parameters. + * + * @details Indicates the application parameters. Currently this only encompasses clearing + * all persistent data. + */ +typedef struct +{ + bool clear_persistent_data; /**< Set to true in case the module should clear all persistent data. */ +} dm_init_param_t; + +/** + * @brief Application Registration Parameters. + * + * @details Parameters needed by the module when registering with it. + */ +typedef struct +{ + dm_event_cb_t evt_handler; /**< Event Handler to be registered. It will receive asynchronous notification from the module, see \ref dm_events for asynchronous events. */ + uint8_t service_type; /**< Bit mask identifying services that the application intends to support for all peers. */ + ble_gap_sec_params_t sec_param; /**< Security parameters to be used for the application. */ +} dm_application_param_t; + +/** + * @brief Defines possible security status/states. + * + * @details Defines possible security status/states of a link when requested by application using + * the \ref dm_security_status_req. + */ +typedef enum +{ + NOT_ENCRYPTED, /**< The link is not secured. */ + ENCRYPTION_IN_PROGRESS, /**< Link security is being established.*/ + ENCRYPTED /**< The link is secure.*/ +} dm_security_status_t; +/** @} */ + +/** + * @defgroup dm_api Device Module APIs + * + * @brief This section describes APIs exposed by the module. + * + * @details This section describes APIs exposed by the module. The APIs have been categorized to provide + * better and specific look up for developers. Categories are: + * - Set up APIs. + * - Context Management APIs. + * - Utility APIs. + * + * MSCs describe usage of these APIs. + * See @ref dm_msc. + * @{ + */ +/** + * @defgroup dm_setup_api Device Module Set-up APIs + * + * @brief Initialization & registration APIs that are pre-requisite for all other module procedures. + * @details This section describes the Module Initialization and Registration APIs needed to be set up by + * the application before device manager can start managing devices and device contexts + * for the application. + * + * @{ + */ + +/** + * @brief Module Initialization Routine. + * + * @details Function for initializing the module. Must called before any other APIs of the module are used. + * + * @param[in] p_init_param Initialization parameters. + * + * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. + * + * @note It is mandatory that pstorage is initialized before initializing this module. + */ +ret_code_t dm_init(dm_init_param_t const * p_init_param); + +/** + * @brief Function for registering the application. + * + * @details This routine is used by the application to register for asynchronous events with the + * device manager. During registration the application also indicates the services that it + * intends to support on this instance. It is possible to register multiple times with the + * device manager. At least one instance shall be registered with the device manager after + * the module has been initialized. + * Maximum number of application instances device manager can support is determined + * by DM_MAX_APPLICATIONS. + * + * All applications must be registered before initiating or accepting connections from the peer. + * + * @param[in] p_appl_param Application parameters. + * @param[out] p_appl_instance Application Instance Identifier in case registration is successful. + * + * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. + * @retval NRF_ERROR_INVALID_STATE If the API is called without module initialization. + * @retval NRF_ERROR_NO_MEM If module cannot support more applications. + * + * @note Currently only one application instance is supported by the module. + */ +ret_code_t dm_register(dm_application_instance_t * p_appl_instance, + dm_application_param_t const * p_appl_param); + +/** + * @brief Function for handling BLE events. + * + * @details BLE Event Handler for the module. This routine should be called from BLE stack event + * dispatcher for the module to work as expected. + * + * @param[in] p_ble_evt BLE stack event being dispatched to the function. + * + */ +void dm_ble_evt_handler(ble_evt_t * p_ble_evt); + +/** @} */ + + +/** + * @defgroup dm_security_api APIs to set up or read status of security on a link. + * + * @brief This section describes APIs to set up Security. These APIs require that the peer is + * connected before the procedures can be requested. + * + * @details This group allows application to request security procedures + * or get the status of the security on a link. + * @{ + */ +/** + * @brief Function for requesting setting up security on a link. + * + * @details This API initiates security procedures with a peer device. + * @note For the GAP Central role, in case peer is not bonded, request to bond/pair is + * initiated. If it is bonded, the link is re-encrypted using the existing bond information. + * For the GAP peripheral role, a Slave security request is sent. + * @details If a pairing procedure is initiated successfully, application is notified of + * @ref DM_EVT_SECURITY_SETUP_COMPLETE. A result indicating success or failure is notified along with the event. + * In case the link is re-encrypted using existing bond information, @ref DM_EVT_LINK_SECURED is + * notified to the application. + * + * @param[in] p_handle Identifies the link on which security is desired. + * + * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. + * @retval NRF_ERROR_INVALID_STATE If the API is called without module initialization and/or + * application registration. + * @retval NRF_ERROR_NULL If p_handle is NULL. + * @retval NRF_ERROR_INVALID_ADDR If the peer is not identified by the handle provided by the application + * or if the peer is not connected when this procedure is requested. + */ +ret_code_t dm_security_setup_req(dm_handle_t * p_handle); + +/** + * @brief Function for reading the status of the security on a link. + * + * @details This API allows application to query status of security on a link. + * + * @param[in] p_handle Identifies the link on which security is desired. + * @param[out] p_status Pointer where security status is provided to the application. + * See \ref dm_security_status_t for possible statuses that can be expected. + * + * @retval NRF_SUCCESS Or appropriate error code indicating reason for failure. + * @retval NRF_ERROR_INVALID_STATE If the API is called without module initialization and/or + * application registration. + * @retval NRF_ERROR_NULL If p_handle or p_status is NULL. + * @retval NRF_ERROR_INVALID_ADDR If peer is not identified by the handle provided by the application + * or if peer is not connected when this procedure is requested. + */ +ret_code_t dm_security_status_req(dm_handle_t const * p_handle, dm_security_status_t * p_status); + +/** + * @brief Function for creating the whitelist. + * + * @details This API allows application to create whitelist based on bonded peer devices in module + * data base. + * + * @param[in] p_handle Identifies the application requesting whitelist creation. + * @param[in,out] p_whitelist Pointer where created whitelist is provided to the application. + * + * @note 'addr_count' and 'irk_count' fields of the structure should be populated with the maximum + * number of devices that the application wishes to request in the whitelist. + * If the number of bonded devices is less than requested, the fields are updated with that number of devices. + * If the number of devices are more than requested, the module will populate the list + * with devices in the order the bond was established with the peer devices. Also, if this routine is + * called when a connection exists with one or more peer devices, + * those connected devices are not added to the whitelist. + * + * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. + * @retval NRF_ERROR_INVALID_STATE If the API is called without module initialization and/or + * application registration. + * @retval NRF_ERROR_NULL If p_handle or p_whitelist is NULL. + */ +ret_code_t dm_whitelist_create(dm_application_instance_t const * p_handle, + ble_gap_whitelist_t * p_whitelist); + +/** @} */ + + +/** + * @defgroup dm_cntxt_mgmt_api Context Management APIs + * + * @brief Utility APIs offered by the device manager to get information about the peer if and + * when needed. + * + * @details This group of API allow the application to access information that is not required to be + * maintained by the application but may be needed. Hence it is possible to get the + * information from the module instead of mapping all the information with a device + * context. + * @{ + */ + +ret_code_t dm_device_add(dm_handle_t * p_handle, + dm_device_context_t const * p_context); + +/** + * @brief Function for deleting a peer device context and all related information from the database. + * + * @details Delete peer device context and all related information from database. If + * this API returns NRF_SUCCESS, DM_EVT_DEVICE_CONTEXT_DELETED event is notified to the + * application. Event result notified along with the event indicates success or failure + * of this procedure. + * + * @param[in] p_handle Identifies the peer device to be deleted. + * + * @retval NRF_SUCCESS on success, else an error code indicating reason for failure. + * @retval NRF_ERROR_INVALID_STATE In the API is called without module initialization and/or + * application registration. + * @retval NRF_ERROR_NULL If p_handle is NULL. + * @retval NRF_ERROR_INVALID_ADDR If peer is not identified the handle provided by the application. + * + * @note Deleting device context results in deleting service and application context for the + * bonded device. The respective events DM_EVT_SERVICE_CONTEXT_DELETED and + * DM_EVT_APPL_CONTEXT_DELETED are not notified to the application. + */ +ret_code_t dm_device_delete(dm_handle_t const * p_handle); + +/** + * @brief Function for deleting all peer device context and all related information from the database. + * + * @details Delete peer device context and all related information from database. If + * this API returns NRF_SUCCESS, DM_EVT_DEVICE_CONTEXT_DELETED event is notified to the + * application for each device that is deleted from the data base. Event result + * notified along with the event indicates success or failure of this procedure. + * + * @param[in] p_handle Identifies application instance that is requesting + * the deletion of all bonded devices. + * + * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. + * @retval NRF_ERROR_INVALID_STATE If the API is called without module initialization and/or + * application registration. + * @retval NRF_ERROR_NULL If p_handle is NULL. + * @retval NRF_ERROR_INVALID_ADDR If peer is not identified the handle provided by the application. + * + * @note Deleting device context results in deleting both service and application context for the + * bonded device. The respective events DM_EVT_SERVICE_CONTEXT_DELETED and + * DM_EVT_APPL_CONTEXT_DELETED are not notified to the application. + */ +ret_code_t dm_device_delete_all(dm_application_instance_t const * p_handle); + +/** + * @brief Function for setting Service Context for a peer device identified by 'p_handle' parameter. + * + * @details This API allows application to Set Service Context for a peer device identified by the + * 'p_handle' parameter. This API is useful when the Service Context cannot be requested + * from the SoftDevice, but needs to be assembled by the application or an another module. + * (or when service context is exchanged in an out of band way.) + * This API could also be used to trigger a storing of service context into persistent + * memory. If this is desired, a NULL pointer could be passed to the p_context. + * + * @param[in] p_handle Identifies peer device for which the procedure is requested. + * @param[in] p_context Service context being set. The context information includes length of + * data and pointer to the contextual data being set. The memory pointed to by + * the pointer to data is assumed to be resident when API is being called and + * can be freed or reused once the set procedure is complete. Set procedure + * completion is indicated by the event \ref DM_EVT_SERVICE_CONTEXT_STORED. + * The Event result is notified along with the event and indicates success or failure of + * this procedure. + * + * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. + * @retval NRF_ERROR_INVALID_STATE If the API is called without module initialization and/or + * application registration. + * @retval NRF_ERROR_NULL If p_handle is NULL. + * @retval NRF_ERROR_INVALID_ADDR If the peer is not identified by the handle provided by the application. + */ +ret_code_t dm_service_context_set(dm_handle_t const * p_handle, + dm_service_context_t const * p_context); + +/** + * @brief Function for getting Service Context for a peer device identified by 'p_handle' parameter. + * + * @details Get Service Context for a peer device identified by the 'p_handle' parameter. If + * this API returns NRF_SUCCESS, DM_EVT_SERVICE_CONTEXT_LOADED event is notified to the + * application. The event result is notified along with the event indicates success or failure + * of this procedure. + * + * @param[in] p_handle Identifies peer device for which procedure is requested. + * @param[in] p_context Application context being requested. The context information includes length + * of the data and a pointer to the data. Note that requesting a 'get' + * of application does not need to provide memory, the pointer to data will be + * pointing to service data and hence no data movement is involved. + * + * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. + * @retval NRF_ERROR_INVALID_STATE In case API is called without module initialization and/or + * application registration. + * @retval NRF_ERROR_NULL If p_handle is NULL. + * @retval NRF_ERROR_INVALID_ADDR If the peer is not identified by the handle provided by the application. + */ +ret_code_t dm_service_context_get(dm_handle_t const * p_handle, + dm_service_context_t * p_context); + +/** + * @brief Function for deleting a Service Context for a peer device identified by the 'p_handle' parameter. + * + * @details This API allows application to delete a Service Context identified for a peer device + * identified by the 'p_handle' parameter. If this API returns NRF_SUCCESS, + * DM_EVT_SERVICE_CONTEXT_DELETED event is notified to the application. + * Event result is notified along with the event and indicates success or failure of this + * procedure. + * + * @param[in] p_handle Identifies peer device for which procedure is requested. + * + * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. + * @retval NRF_ERROR_INVALID_STATE If the API is called without module initialization and/or + * application registration. + * @retval NRF_ERROR_NULL If p_handle is NULL. + * @retval NRF_ERROR_INVALID_ADDR If the peer is not identified by the handle provided by the application. + */ +ret_code_t dm_service_context_delete(dm_handle_t const * p_handle); + +/** + * @brief Function for setting Application Context for a peer device identified by the 'p_handle' parameter. + * + * @details This application allows the setting of the application context for the peer device identified by + * the 'p_handle'. Application context is stored persistently by the module and can be + * requested by the application at any time using the \ref dm_application_context_get + * API. Note that this procedure is permitted only for bonded devices. If the + * device is not bonded, application context cannot be set. However, it is not mandatory + * that the bonded device is connected when requesting this procedure. + * + * @param[in] p_handle Identifies peer device for which procedure is requested. + * + * @param[in] p_context Application context being set. The context information includes length of the + * data and pointer to the contextual data being set. The memory pointed to by + * the data pointer is assumed to be resident when API is being called and + * can be freed or reused once the set procedure is complete. Set procedure + * completion is notified by the event \ref DM_EVT_APPL_CONTEXT_STORED. + * The event result is notified along with the event and indicates success or + * failure of this procedure. + * + * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. + * @retval NRF_ERROR_INVALID_STATE If the API is called without module initialization and/or + * application registration. + * @retval NRF_ERROR_NULL If p_handle and/or p_context is NULL. + * @retval NRF_ERROR_INVALID_ADDR If peer is not identified the handle provided by the application. + * + * @note The API returns FEATURE_NOT_ENABLED in case DEVICE_MANAGER_APP_CONTEXT_SIZE is set to zero. + */ +ret_code_t dm_application_context_set(dm_handle_t const * p_handle, + dm_application_context_t const * p_context); + +/** + * @brief Function for getting Application Context for a peer device identified by the 'p_handle' parameter. + * + * @details Get Application Context for a peer device identified by the 'p_handle' parameter. If + * this API returns NRF_SUCCESS, DM_EVT_APPL_CONTEXT_LOADED event is notified to the + * application. Event result notified along with the event indicates success or failure + * of this procedure. + * + * @param[in] p_handle Identifies peer device for which procedure is requested. + * @param[in] p_context Application context being requested. The context information includes + * length of data and pointer to the contextual data is provided. + * + * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. + * @retval NRF_ERROR_INVALID_STATE If the API is called without module initialization and/or + * application registration. + * @retval NRF_ERROR_NULL If p_handle and/or p_context is NULL. + * @retval NRF_ERROR_INVALID_ADDR If the peer is not identified by the handle provided by the application. + * @retval DM_NO_APP_CONTEXT If no application context was set that can be fetched. + * + * @note The API returns FEATURE_NOT_ENABLED in case DEVICE_MANAGER_APP_CONTEXT_SIZE is set to + * zero. + */ +ret_code_t dm_application_context_get(dm_handle_t const * p_handle, + dm_application_context_t * p_context); + +/** + * @brief Function for deleting Application Context for a peer device identified by the 'p_handle' parameter. + * + * @details Delete Application Context for a peer device identified by the 'p_handle' parameter. If + * this API returns NRF_SUCCESS, DM_EVT_APPL_CONTEXT_DELETED event is notified to the + * application. The event result notified along with the event and indicates success or failure + * of this procedure. + * + * @param[in] p_handle Identifies peer device for which procedure is requested. + * + * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. + * @retval NRF_ERROR_INVALID_STATE If the API is called without module initialization and/or + * application registration. + * @retval NRF_ERROR_NULL If the p_handle is NULL. + * @retval NRF_ERROR_INVALID_ADDR If peer is not identified the handle provided by the application. + * @retval DM_NO_APP_CONTEXT If no application context was set that can be deleted. + * + * @note The API returns FEATURE_NOT_ENABLED if the DEVICE_MANAGER_APP_CONTEXT_SIZE is set to zero. + */ +ret_code_t dm_application_context_delete(dm_handle_t const * p_handle); + +/** @} */ + + +/** + * @defgroup utility_api Utility APIs + * @{ + * @brief This section describes the utility APIs offered by the module. + * + * @details APIs defined in this section are utility or assisting/helper APIs. + */ +/** + * @brief Function for Setting/Copying Application instance to Device Manager handle. + * + * @param[in] p_appl_instance Application instance to be set. + * @param[out] p_handle Device Manager handle for which the instance is to be copied. + * + * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. + * @retval NRF_ERROR_INVALID_STATE If the API is called without module initialization and/or + * application registration. + * @retval NRF_ERROR_NULL If p_handle and/or p_addr is NULL. + */ +ret_code_t dm_application_instance_set(dm_application_instance_t const * p_appl_instance, + dm_handle_t * p_handle); + +/** + * @brief Function for getting a peer's device address. + * + * @param[in] p_handle Identifies the peer device whose address is requested. Can not be NULL. + * @param[out] p_addr Pointer where address is to be copied. Can not be NULL. + * + * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. + * @retval NRF_ERROR_INVALID_STATE If the API is called without module initialization and/or + * application registration. + * @retval NRF_ERROR_NULL If p_handle and/or p_addr is NULL. + * @retval NRF_ERROR_NOT_FOUND If the peer could not be identified. + */ +ret_code_t dm_peer_addr_get(dm_handle_t const * p_handle, + ble_gap_addr_t * p_addr); + +/** + * @brief Function for setting/updating a peer's device address. + * + * @param[in] p_handle Identifies the peer device whose address is requested to be set/updated. + * @param[out] p_addr Address to be set/updated. + * + * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. + * @retval NRF_ERROR_INVALID_STATE If the API is called without module initialization and/or + * application registration. + * @retval NRF_ERROR_NULL If p_handle and/or p_addr is NULL. + * @retval NRF_ERROR_INVALID_ADDR If the peer is not identified by the handle provided by the application. + * @retval NRF_ERROR_INVALID_PARAM If this procedure is requested while connected to the peer or if the address + * type was set to BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE. + * + * @note Setting or updating a peer's device address is permitted + * only for a peer that is bonded and disconnected. + * @note Updated address is reflected only after DM_EVT_DEVICE_CONTEXT_STORED is notified to the + * application for this bonded device instance. In order to avoid abnormal behaviour, it is + * recommended to not invite/initiate connections on the updated address unless this event + * has been notified. + */ +ret_code_t dm_peer_addr_set(dm_handle_t const * p_handle, + ble_gap_addr_t const * p_addr); + +/** + * @brief Function for initializing Device Manager handle. + * + * @param[in] p_handle Device Manager handle to be initialized. + * + * @retval NRF_SUCCESS On success. + * @retval NRF_ERROR_NULL If p_handle is NULL. + * + * @note This routine is permitted before initialization of the module. + */ +ret_code_t dm_handle_initialize(dm_handle_t * p_handle); + +/** + * @brief Function for getting distributed keys for a device. + * + * @param[in] p_handle Device Manager handle identifying the peer. + * @param[out] p_key_dist Pointer to distributed keys. + * + * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. + * @retval NRF_ERROR_INVALID_STATE If the API is called without module initialization and/or + * application registration. + * @retval NRF_ERROR_NULL If the p_handle and/or p_key_dist pointer is NULL. + * @retval NRF_ERROR_INVALID_ADDR If the peer is not identified by the handle provided by the application. + */ +ret_code_t dm_distributed_keys_get(dm_handle_t const * p_handle, + dm_sec_keyset_t * p_key_dist); + +/** + * @brief Function for getting the corresponding dm_handle_t based on the connection handle. + * + * @param[in] conn_handle Connection handle as provided by the SoftDevice. + * @param[in,out] p_handle Pointer to the p_handle containg the application instance for the + * registered application. If the application instance is valid then + * the p_handle will be filled with requested data. + * + * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. + * @retval NRF_ERROR_NULL If the p_handle pointer is NULL. + * @retval NRF_ERROR_NOT_FOUND If no p_handle is found for the provided connection handle. + */ +ret_code_t dm_handle_get(uint16_t conn_handle, dm_handle_t * p_handle); + +/** @} */ +/** @} */ +/** @} */ +#endif // DEVICE_MANAGER_H__ + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager_peripheral.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager_peripheral.c new file mode 100644 index 0000000000..738151edfb --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager_peripheral.c @@ -0,0 +1,2943 @@ +/* Copyright (C) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "device_manager.h" +#include "app_trace.h" +#include "pstorage.h" +#include "ble_hci.h" +#include "app_error.h" + +#if defined ( __CC_ARM ) + #ifndef __ALIGN + #define __ALIGN(x) __align(x) /**< Forced aligment keyword for ARM Compiler */ + #endif +#elif defined ( __ICCARM__ ) + #ifndef __ALIGN + #define __ALIGN(x) /**< Forced aligment keyword for IAR Compiler */ + #endif +#elif defined ( __GNUC__ ) + #ifndef __ALIGN + #define __ALIGN(x) __attribute__((aligned(x))) /**< Forced aligment keyword for GNU Compiler */ + #endif +#endif + +#define INVALID_ADDR_TYPE 0xFF /**< Identifier for an invalid address type. */ +#define EDIV_INIT_VAL 0xFFFF /**< Initial value for diversifier. */ + +/** + * @defgroup device_manager_app_states Connection Manager Application States + * @{ + */ +#define STATE_CONTROL_PROCEDURE_IN_PROGRESS 0x01 /**< State where a security procedure is ongoing. */ +#define STATE_QUEUED_CONTROL_REQUEST 0x02 /**< State where it is known if there is any queued security request or not. */ +/** @} */ + +/** + * @defgroup device_manager_conn_inst_states Connection Manager Connection Instances States. + * @{ + */ +#define STATE_IDLE 0x01 /**< State where connection instance is free. */ +#define STATE_CONNECTED 0x02 /**< State where connection is successfully established. */ +#define STATE_PAIRING 0x04 /**< State where pairing procedure is in progress. This state is used for pairing and bonding, as pairing is needed for both. */ +#define STATE_BONDED 0x08 /**< State where device is bonded. */ +#define STATE_DISCONNECTING 0x10 /**< State where disconnection is in progress, application will be notified first, but no further active procedures on the link. */ +#define STATE_PAIRING_PENDING 0x20 /**< State where pairing request is pending on the link. */ +#define STATE_BOND_INFO_UPDATE 0x40 /**< State where information has been updated, update the flash. */ +#define STATE_LINK_ENCRYPTED 0x80 /**< State where link is encrypted. */ +/** @} */ + +/** + * @defgroup device_manager_peer_id_defines Peer Identification Information Defines. + * + * @brief These defines are used to know which of the peer identification is applicable for a peer. + * + * @details These defines are used for peer identification. Here, bit map is used because it is + * possible that the application has both IRK and address for identification. + * @{ + */ +#define UNASSIGNED 0xFF /**< Peer instance is unassigned/unused. */ +#define IRK_ENTRY 0x01 /**< Peer instance has IRK as identification information. */ +#define ADDR_ENTRY 0x02 /**< Peer instance has address as identification information. */ +#define SERVICE_CONTEXT_ENTRY 0x04 /**< Peer instance has service context set. */ +#define APP_CONTEXT_ENTRY 0x08 /**< Peer instance has an application context set. */ +/** @} */ + +/**@brief Device store state identifiers. */ +typedef enum +{ + STORE_ALL_CONTEXT, /**< Store all context. */ + FIRST_BOND_STORE, /**< Store bond. */ + UPDATE_PEER_ADDR /**< Update peer address. */ +} device_store_state_t; + +/** + * @defgroup device_manager_context_offsets Context Offsets + * @{ + * + * @brief Context offsets each of the context information in persistent memory. + * + * @details Below is a layout showing how each how the context information is stored in persistent + * memory. + * + * All Device context is stored in the flash as follows: + * +---------+---------+---------+------------------+----------------+--------------------+ + * | Block / Device ID + Layout of stored information in storage block | + * +---------+---------+---------+------------------+----------------+--------------------+ + * | Block 0 | Device 0| Peer Id | Bond Information | Service Context| Application Context| + * +---------+---------+---------+------------------+----------------+--------------------+ + * | Block 1 | Device 1| Peer Id | Bond Information | Service Context| Application Context| + * +---------+---------+---------+------------------+----------------+--------------------+ + * | ... | .... | + * +---------+---------+---------+------------------+----------------+--------------------+ + * | Block N | Device N| Peer Id | Bond Information | Service Context| Application Context| + * +---------+---------+---------+------------------+----------------+--------------------+ + * + * The following defines are used to get offset of each of the components within a block. + */ + +#define PEER_ID_STORAGE_OFFSET 0 /**< Offset at which peer id is stored in the block. */ +#define BOND_STORAGE_OFFSET PEER_ID_SIZE /**< Offset at which bond information is stored in the block. */ +#define SERVICE_STORAGE_OFFSET (BOND_STORAGE_OFFSET + BOND_SIZE) /**< Offset at which service context is stored in the block. */ +#define APP_CONTEXT_STORAGE_OFFSET (SERVICE_STORAGE_OFFSET + SERVICE_CONTEXT_SIZE) /**< Offset at which application context is stored in the block. */ +/** @} */ + +/** + * @defgroup device_manager_context_size Context size. + * @{ + * + * @brief This group defines the size of each of the context information. + */ +#define PEER_ID_SIZE (sizeof(peer_id_t)) /**< Size of peer identification information. */ +#define BOND_SIZE (sizeof(bond_context_t)) /**< Size of bond information. */ +#define DEVICE_CONTEXT_SIZE (PEER_ID_SIZE + BOND_SIZE) /**< Size of Device context, include peer identification and bond information. */ +#define GATTS_SERVICE_CONTEXT_SIZE (sizeof(dm_gatts_context_t)) /**< Size of GATTS service context. */ +#define GATTC_SERVICE_CONTEXT_SIZE (sizeof(dm_gatt_client_context_t)) /**< Size of GATTC service context. */ +#define SERVICE_CONTEXT_SIZE (GATTS_SERVICE_CONTEXT_SIZE + GATTC_SERVICE_CONTEXT_SIZE) /**< Combined size of GATTS and GATTC service contexts. */ +#define APP_CONTEXT_MIN_SIZE 4 /**< Minimum size for application context data. */ +#if (DEVICE_MANAGER_APP_CONTEXT_SIZE != 0) +#define APP_CONTEXT_SIZE (sizeof(uint32_t) + DEVICE_MANAGER_APP_CONTEXT_SIZE) /**< Size of application context including length field. */ +#else //DEVICE_MANAGER_APP_CONTEXT_SIZE +#define APP_CONTEXT_SIZE 0 /**< Size of application context. */ +#endif // DEVICE_MANAGER_APP_CONTEXT_SIZE +#define ALL_CONTEXT_SIZE (DEVICE_CONTEXT_SIZE + SERVICE_CONTEXT_SIZE + APP_CONTEXT_SIZE) /**< Size of all contexts. */ +/** @} */ + + +/** + * @defgroup device_manager_log Module's Log Macros + * + * @details Macros used for creating module logs which can be useful in understanding handling + * of events or actions on API requests. These are intended for debugging purposes and + * can be disabled by defining the DM_DISABLE_LOGS. + * + * @note That if ENABLE_DEBUG_LOG_SUPPORT is disabled, having DM_DISABLE_LOGS has no effect. + * @{ + */ +#define nDM_DISABLE_LOGS /**< Enable this macro to disable any logs from this module. */ + +#ifndef DM_DISABLE_LOGS +#define DM_LOG app_trace_log /**< Used for logging details. */ +#define DM_ERR app_trace_log /**< Used for logging errors in the module. */ +#define DM_TRC app_trace_log /**< Used for getting trace of execution in the module. */ +#define DM_DUMP app_trace_dump /**< Used for dumping octet information to get details of bond information etc. */ +#else //DM_DISABLE_LOGS +#define DM_DUMP(...) /**< Disables dumping of octet streams. */ +#define DM_LOG(...) /**< Disables detailed logs. */ +#define DM_ERR(...) /**< Disables error logs. */ +#define DM_TRC(...) /**< Disables traces. */ +#endif //DM_DISABLE_LOGS +/** @} */ + +/** + * @defgroup device_manager_mutex_lock_unlock Module's Mutex Lock/Unlock Macros. + * + * @details Macros used to lock and unlock modules. Currently the SDK does not use mutexes but + * framework is provided in case need arises to use an alternative architecture. + * @{ + */ +#define DM_MUTEX_LOCK() SDK_MUTEX_LOCK(m_dm_mutex) /**< Lock module using mutex. */ +#define DM_MUTEX_UNLOCK() SDK_MUTEX_UNLOCK(m_dm_mutex) /**< Unlock module using mutex. */ +/** @} */ + + +/** + * @defgroup device_manager_misc_defines Miscellaneous defines used across the module. + * @{ + */ +#define DM_GATT_ATTR_SIZE 6 /**< Size of each GATT attribute to be stored persistently. */ +#define DM_GATT_SERVER_ATTR_MAX_SIZE ((DM_GATT_ATTR_SIZE * DM_GATT_CCCD_COUNT) + 2) /**< Maximum size of GATT attributes to be stored.*/ +#define DM_SERVICE_CONTEXT_COUNT (DM_PROTOCOL_CNTXT_ALL + 1) /**< Maximum number of service contexts. */ +#define DM_EVT_DEVICE_CONTEXT_BASE 0x20 /**< Base for device context base. */ +#define DM_EVT_SERVICE_CONTEXT_BASE 0x30 /**< Base for service context base. */ +#define DM_EVT_APP_CONTEXT_BASE 0x40 /**< Base for application context base. */ +#define DM_LOAD_OPERATION_ID 0x01 /**< Load operation identifier. */ +#define DM_STORE_OPERATION_ID 0x02 /**< Store operation identifier. */ +#define DM_CLEAR_OPERATION_ID 0x03 /**< Clear operation identifier. */ +/** @} */ + +#define DM_GATTS_INVALID_SIZE 0xFFFFFFFF /**< Identifer for GATTS invalid size. */ + +/** + * @defgroup api_param_check API Parameters check macros. + * + * @details Macros for verifying parameters passed to the module in the APIs. These macros + * could be mapped to nothing in the final version of the code in order to save execution + * time and program size. + * @{ + */ + +//#define DM_DISABLE_API_PARAM_CHECK /**< Macro to disable API parameters check. */ + +#undef NULL_PARAM_CHECK +#undef VERIFY_MODULE_INITIALIZED +#undef VERIFY_MODULE_INITIALIZED_VOID +#undef VERIFY_APP_REGISTERED +#undef VERIFY_APP_REGISTERED_VOID +#undef VERIFY_CONNECTION_INSTANCE +#undef VERIFY_DEVICE_INSTANCE + +#ifndef DM_DISABLE_API_PARAM_CHECK + +/**@brief Macro for verifying NULL parameters are not passed to API. + * + * @param[in] PARAM Parameter checked for NULL. + * + * @retval (NRF_ERROR_NULL | DEVICE_MANAGER_ERR_BASE) when @ref PARAM is NULL. + */ +#define NULL_PARAM_CHECK(PARAM) \ + if ((PARAM) == NULL) \ + { \ + return (NRF_ERROR_NULL | DEVICE_MANAGER_ERR_BASE); \ + } +/**@} */ + + +/**@brief Macro for verifying module's initialization status. + * + * @retval (NRF_ERROR_INVALID_STATE | DEVICE_MANAGER_ERR_BASE) when module is not initialized. + */ +#define VERIFY_MODULE_INITIALIZED() \ + do \ + { \ + if (!m_module_initialized) \ + { \ + return (NRF_ERROR_INVALID_STATE | DEVICE_MANAGER_ERR_BASE); \ + } \ + } while (0) + + +/**@brief Macro for verifying module's initialization status. Returns in case it is not initialized. + */ +#define VERIFY_MODULE_INITIALIZED_VOID() \ + do \ + { \ + if (!m_module_initialized) \ + { \ + return; \ + } \ + } while (0) + + +/**@brief Macro for verifying that the application is registered. + * + * @param[in] X Application instance identifier. + * + * @retval (NRF_ERROR_INVALID_STATE | DEVICE_MANAGER_ERR_BASE) when module API is called without + * registering an application with the module. + */ +#define VERIFY_APP_REGISTERED(X) \ + do \ + { \ + if (((X) >= DEVICE_MANAGER_MAX_APPLICATIONS) || \ + (m_application_table[(X)].ntf_cb == NULL)) \ + { \ + return (NRF_ERROR_INVALID_STATE | DEVICE_MANAGER_ERR_BASE); \ + } \ + } while (0) + + +/**@brief Macro for verifying that the application is registered. Returns in case it is not + * registered. + * + * @param[in] X Application instance identifier. + */ +#define VERIFY_APP_REGISTERED_VOID(X) \ + do \ + { \ + if (((X) >= DEVICE_MANAGER_MAX_APPLICATIONS) || \ + (m_application_table[(X)].ntf_cb == NULL)) \ + { \ + return; \ + } \ + } while (0) + + +/**@brief Macro for verifying connection instance is allocated. + * + * @param[in] X Connection instance identifier. + * + * @retval (NRF_ERROR_INVALID_ADDR | DEVICE_MANAGER_ERR_BASE) when connection instance is not + * allocated. + */ +#define VERIFY_CONNECTION_INSTANCE(X) \ + do \ + { \ + if (((X) >= DEVICE_MANAGER_MAX_CONNECTIONS) || \ + (m_connection_table[(X)].state == STATE_IDLE)) \ + { \ + return (NRF_ERROR_INVALID_ADDR | DEVICE_MANAGER_ERR_BASE); \ + } \ + } while (0) + + +/**@brief Macro for verifying if device instance is allocated. + * + * @param[in] X Device instance identifier. + * + * @retval (NRF_ERROR_INVALID_ADDR | DEVICE_MANAGER_ERR_BASE) when device instance is not allocated. + */ +#define VERIFY_DEVICE_INSTANCE(X) \ + do \ + { \ + if (((X) >= DEVICE_MANAGER_MAX_BONDS) || \ + (m_peer_table[(X)].id_bitmap == UNASSIGNED)) \ + { \ + return (NRF_ERROR_INVALID_ADDR | DEVICE_MANAGER_ERR_BASE); \ + } \ + } while (0) + +/**@brief Macro for verifying if device is bonded and thus can store data persistantly. + * + * @param[in] X Connection instance identifier. + * + * @retval (NRF_ERROR_INVALID_STATE | DEVICE_MANAGER_ERR_BASE) when device is not bonded. + */ +#define VERIFY_DEVICE_BOND(X) \ + do \ + { \ + if ((m_connection_table[(X)].state & STATE_BONDED) != STATE_BONDED)\ + { \ + return (NRF_ERROR_INVALID_STATE | DEVICE_MANAGER_ERR_BASE); \ + } \ + } while (0) +#else +#define NULL_PARAM_CHECK(X) +#define VERIFY_MODULE_INITIALIZED() +#define VERIFY_MODULE_INITIALIZED_VOID() +#define VERIFY_APP_REGISTERED(X) +#define VERIFY_APP_REGISTERED_VOID(X) +#define VERIFY_CONNECTION_INSTANCE(X) +#define VERIFY_DEVICE_INSTANCE(X) +#endif //DM_DISABLE_API_PARAM_CHECK +/** @} */ + +#define INVALID_CONTEXT_LEN 0xFFFFFFFF /**< Identifier for invalid context length. */ +/**@brief Macro for checking that application context size is greater that minimal size. + * + * @param[in] X Size of application context. + * + * @retval (NRF_ERROR_INVALID_PARAM) when size is smaller than minimun required size. + */ +#define SIZE_CHECK_APP_CONTEXT(X) \ + if ((X) < (APP_CONTEXT_MIN_SIZE)) \ + { \ + return NRF_ERROR_INVALID_PARAM; \ + } + + +/** + * @defgroup dm_data_types Module's internal data types. + * + * @brief This section describes a module's internal data structures. + * @{ + */ +/**@brief Peer identification information. + */ +typedef struct +{ + ble_gap_id_key_t peer_id; /**< IRK and/or address of peer. */ + uint16_t ediv; /**< Peer's encrypted diversifier. */ + uint8_t id_bitmap; /**< Contains information if above field is valid. */ +} peer_id_t; + +STATIC_ASSERT(sizeof(peer_id_t) % 4 == 0); /**< Check to ensure Peer identification information is a multiple of 4. */ + +/**@brief Portion of bonding information exchanged by a device during bond creation that needs to + * be stored persistently. + * + * @note An entry is not made in this table unless device is bonded. + */ +typedef struct +{ + ble_gap_enc_key_t peer_enc_key; /**< Local LTK info, central IRK and address */ +} bond_context_t; + +STATIC_ASSERT(sizeof(bond_context_t) % 4 == 0); /**< Check to ensure bond information is a multiple of 4. */ + +/**@brief GATT Server Attributes size and data. + */ +typedef struct +{ + uint32_t flags; /**< Flags identifying the stored attributes. */ + uint32_t size; /**< Size of stored attributes. */ + uint8_t attributes[DM_GATT_SERVER_ATTR_MAX_SIZE]; /**< Array to hold the server attributes. */ +} dm_gatts_context_t; + +STATIC_ASSERT(sizeof(dm_gatts_context_t) % 4 == 0); /**< Check to ensure GATT Server Attributes size and data information is a multiple of 4. */ + +/**@brief GATT Client context information. Placeholder for now. + */ +typedef struct +{ + void * p_dummy; /**< Placeholder, currently unused. */ +} dm_gatt_client_context_t; + +STATIC_ASSERT(sizeof(dm_gatt_client_context_t) % 4 == 0); /**< Check to ensure GATT Client context information is a multiple of 4. */ +STATIC_ASSERT((DEVICE_MANAGER_APP_CONTEXT_SIZE % 4) == 0); /**< Check to ensure device manager application context information is a multiple of 4. */ + +/**@brief Connection instance definition. Maintains information with respect to an active peer. + */ +typedef struct +{ + ble_gap_addr_t peer_addr; /**< Peer identification information. This information is retained as long as the connection session exists, once disconnected, for non-bonded devices this information is not stored persistently. */ + uint16_t conn_handle; /**< Connection handle for the device. */ + uint8_t state; /**< Link state. */ + uint8_t bonded_dev_id; /**< In case the device is bonded, this points to the corresponding bonded device. This index can be used to index service and bond context as well. */ +} connection_instance_t; + +/**@brief Application instance definition. Maintains information with respect to a registered + * application. + */ +typedef struct +{ + dm_event_cb_t ntf_cb; /**< Callback registered with the application. */ + ble_gap_sec_params_t sec_param; /**< Local security parameters registered by the application. */ + uint8_t state; /**< Application state. Currently this is used only for knowing if any security procedure is in progress and/or a security procedure is pending to be requested. */ + uint8_t service; /**< Service registered by the application. */ +} application_instance_t; + +/**@brief Function for performing necessary action of storing each of the service context as + * registered by the application. + * + * @param[in] p_block_handle Storage block identifier. + * @param[in] p_handle Device handle identifying device that is stored. + * + * @retval Operation result code. + */ +typedef ret_code_t (* service_context_access_t)(pstorage_handle_t const * p_block_handle, + dm_handle_t const * p_handle); + +/**@brief Function for performing necessary action of applying the context information. + * + * @param[in] p_handle Device handle identifying device that is stored. + * + * @retval Operation result code. + */ +typedef ret_code_t (* service_context_apply_t)(dm_handle_t * p_handle); + +/**@brief Function for performing necessary functions of storing or updating. + * + * @param[in] p_dest Destination address where data is stored persistently. + * @param[in] p_src Source address containing data to be stored. + * @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. + * + * @retval Operation result code. + */ +typedef uint32_t (* storage_operation)(pstorage_handle_t * p_dest, + uint8_t * p_src, + pstorage_size_t size, + pstorage_size_t offset); +/** @} */ + +/** + * @defgroup dm_tables Module's internal tables. + * + * @brief This section describes the module's internal tables and the static global variables + * needed for its functionality. + * @{ + */ +#if (DEVICE_MANAGER_APP_CONTEXT_SIZE != 0) +static uint8_t * m_app_context_table[DEVICE_MANAGER_MAX_BONDS]; /**< Table to remember application contexts of bonded devices. */ +#endif //DEVICE_MANAGER_APP_CONTEXT_SIZE +__ALIGN(sizeof(uint32_t)) +static peer_id_t m_peer_table[DEVICE_MANAGER_MAX_BONDS] ; /**< Table to maintain bonded devices' identification information, an instance is allocated in the table when a device is bonded and freed when bond information is deleted. */ +__ALIGN(sizeof(uint32_t)) +static bond_context_t m_bond_table[DEVICE_MANAGER_MAX_CONNECTIONS]; /**< Table to maintain bond information for active peers. */ +static dm_gatts_context_t m_gatts_table[DEVICE_MANAGER_MAX_CONNECTIONS]; /**< Table for service information for active connection instances. */ +static connection_instance_t m_connection_table[DEVICE_MANAGER_MAX_CONNECTIONS]; /**< Table to maintain active peer information. An instance is allocated in the table when a new connection is established and freed on disconnection. */ +static application_instance_t m_application_table[DEVICE_MANAGER_MAX_APPLICATIONS]; /**< Table to maintain application instances. */ +static pstorage_handle_t m_storage_handle; /**< Persistent storage handle for blocks requested by the module. */ +static uint32_t m_peer_addr_update; /**< 32-bit bitmap to remember peer device address update. */ +static ble_gap_id_key_t m_local_id_info; /**< ID information of central in case resolvable address is used. */ +static bool m_module_initialized = false; /**< State indicating if module is initialized or not. */ +static uint8_t m_irk_index_table[DEVICE_MANAGER_MAX_BONDS]; /**< List maintaining IRK index list. */ + +SDK_MUTEX_DEFINE(m_dm_mutex) /**< Mutex variable. Currently unused, this declaration does not occupy any space in RAM. */ +/** @} */ + +static __INLINE ret_code_t no_service_context_store(pstorage_handle_t const * p_block_handle, + dm_handle_t const * p_handle); + +static __INLINE ret_code_t gatts_context_store(pstorage_handle_t const * p_block_handle, + dm_handle_t const * p_handle); + +static __INLINE ret_code_t gattc_context_store(pstorage_handle_t const * p_block_handle, + dm_handle_t const * p_handle); + +static __INLINE ret_code_t gattsc_context_store(pstorage_handle_t const * p_block_handle, + dm_handle_t const * p_handle); + +static __INLINE ret_code_t no_service_context_load(pstorage_handle_t const * p_block_handle, + dm_handle_t const * p_handle); + +static __INLINE ret_code_t gatts_context_load(pstorage_handle_t const * p_block_handle, + dm_handle_t const * p_handle); + +static __INLINE ret_code_t gattc_context_load(pstorage_handle_t const * p_block_handle, + dm_handle_t const * p_handle); + +static __INLINE ret_code_t gattsc_context_load(pstorage_handle_t const * p_block_handle, + dm_handle_t const * p_handle); + +static __INLINE ret_code_t no_service_context_apply(dm_handle_t * p_handle); + +static __INLINE ret_code_t gatts_context_apply(dm_handle_t * p_handle); + +static __INLINE ret_code_t gattc_context_apply(dm_handle_t * p_handle); + +static __INLINE ret_code_t gattsc_context_apply(dm_handle_t * p_handle); + + +/**< Array of function pointers based on the types of service registered. */ +const service_context_access_t m_service_context_store[DM_SERVICE_CONTEXT_COUNT] = +{ + no_service_context_store, /**< Dummy function, when there is no service context registered. */ + gatts_context_store, /**< GATT Server context store function. */ + gattc_context_store, /**< GATT Client context store function. */ + gattsc_context_store /**< GATT Server & Client context store function. */ +}; + + +/**< Array of function pointers based on the types of service registered. */ +const service_context_access_t m_service_context_load[DM_SERVICE_CONTEXT_COUNT] = +{ + no_service_context_load, /**< Dummy function, when there is no service context registered. */ + gatts_context_load, /**< GATT Server context load function. */ + gattc_context_load, /**< GATT Client context load function. */ + gattsc_context_load /**< GATT Server & Client context load function. */ +}; + + +/**< Array of function pointers based on the types of service registered. */ +const service_context_apply_t m_service_context_apply[DM_SERVICE_CONTEXT_COUNT] = +{ + no_service_context_apply, /**< Dummy function, when there is no service context registered. */ + gatts_context_apply, /**< GATT Server context apply function. */ + gattc_context_apply, /**< GATT Client context apply function. */ + gattsc_context_apply /**< GATT Server & Client context apply function. */ +}; + + +const uint32_t m_context_init_len = 0xFFFFFFFF; /**< Constant used to update the initial value for context in the flash. */ + +/**@brief Function for setting update status for the device identified by 'index'. + * + * @param[in] index Device identifier. + */ +static __INLINE void update_status_bit_set(uint32_t index) +{ + m_peer_addr_update |= (BIT_0 << index); +} + + +/**@brief Function for resetting update status for device identified by 'index'. + * + * @param[in] index Device identifier. + */ +static __INLINE void update_status_bit_reset(uint32_t index) +{ + m_peer_addr_update &= (~((uint32_t)BIT_0 << index)); +} + + +/**@brief Function for providing update status for the device identified by 'index'. + * + * @param[in] index Device identifier. + * + * @retval true if the bit is set, false otherwise. + */ +static __INLINE bool update_status_bit_is_set(uint32_t index) +{ + return ((m_peer_addr_update & (BIT_0 << index)) ? true : false); +} + + +/**@brief Function for initialiasing the application instance identified by 'index'. + * + * @param[in] index Device identifier. + */ +static __INLINE void application_instance_init(uint32_t index) +{ + DM_TRC("[DM]: Initializing Application Instance 0x%08X.\r\n", index); + + m_application_table[index].ntf_cb = NULL; + m_application_table[index].state = 0x00; + m_application_table[index].service = 0x00; +} + + +/**@brief Function for initialiasing the connection instance identified by 'index'. + * + * @param[in] index Device identifier. + */ +static __INLINE void connection_instance_init(uint32_t index) +{ + DM_TRC("[DM]: Initializing Connection Instance 0x%08X.\r\n", index); + + m_connection_table[index].state = STATE_IDLE; + m_connection_table[index].conn_handle = BLE_CONN_HANDLE_INVALID; + m_connection_table[index].bonded_dev_id = DM_INVALID_ID; + + memset(&m_connection_table[index].peer_addr, 0, sizeof (ble_gap_addr_t)); +} + + +/**@brief Function for initialiasing the peer device instance identified by 'index'. + * + * @param[in] index Device identifier. + */ +static __INLINE void peer_instance_init(uint32_t index) +{ + DM_TRC("[DM]: Initializing Peer Instance 0x%08X.\r\n", index); + + memset(m_peer_table[index].peer_id.id_addr_info.addr, 0, BLE_GAP_ADDR_LEN); + memset(m_peer_table[index].peer_id.id_info.irk, 0, BLE_GAP_SEC_KEY_LEN); + + //Initialize the address type to invalid. + m_peer_table[index].peer_id.id_addr_info.addr_type = INVALID_ADDR_TYPE; + + //Initialize the identification bit map to unassigned. + m_peer_table[index].id_bitmap = UNASSIGNED; + + // Initialize diversifier. + m_peer_table[index].ediv = EDIV_INIT_VAL; + + + //Reset the status bit. + update_status_bit_reset(index); + +#if (DEVICE_MANAGER_APP_CONTEXT_SIZE != 0) + //Initialize the application context for bond device. + m_app_context_table[index] = NULL; +#endif //DEVICE_MANAGER_APP_CONTEXT_SIZE +} + + +/**@brief Function for searching connection instance matching the connection handle and the state + * requested. + * + * @details Connection handle and state information is used to get a connection instance, it + * is possible to ignore the connection handle by using BLE_CONN_HANDLE_INVALID. + * + * @param[in] conn_handle Connection handle. + * @param[in] state Connection instance state. + * @param[out] p_instance Connection instance. + * + * @retval NRF_SUCCESS Operation success. + * @retval NRF_ERROR_INVALID_STATE Operation failure. Invalid state + * @retval NRF_ERROR_NOT_FOUND Operation failure. Not found + */ +static ret_code_t connection_instance_find(uint16_t conn_handle, + uint8_t state, + uint32_t * p_instance) +{ + ret_code_t err_code; + uint32_t index; + + err_code = NRF_ERROR_INVALID_STATE; + + for (index = 0; index < DEVICE_MANAGER_MAX_CONNECTIONS; index++) + { + //Search only based on the state. + if (state & m_connection_table[index].state) + { + //Ignore the connection handle. + if ((conn_handle == BLE_CONN_HANDLE_INVALID) || + (conn_handle == m_connection_table[index].conn_handle)) + { + //Search for matching connection handle. + (*p_instance) = index; + err_code = NRF_SUCCESS; + + break; + } + else + { + err_code = NRF_ERROR_NOT_FOUND; + } + } + } + + return err_code; +} + + +/**@brief Function for allocating device instance for a bonded device. + * + * @param[out] p_device_index Device index. + * @param[in] p_addr Peer identification information. + * + * @retval NRF_SUCCESS Operation success. + * @retval DM_DEVICE_CONTEXT_FULL Operation failure. + */ +static __INLINE ret_code_t device_instance_allocate(uint8_t * p_device_index, + ble_gap_addr_t const * p_addr) +{ + ret_code_t err_code; + uint32_t index; + + err_code = DM_DEVICE_CONTEXT_FULL; + + for (index = 0; index < DEVICE_MANAGER_MAX_BONDS; index++) + { + DM_TRC("[DM]:[DI 0x%02X]: Device type 0x%02X.\r\n", + index, m_peer_table[index].peer_id.id_addr_info.addr_type); + DM_TRC("[DM]: Device Addr 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X.\r\n", + m_peer_table[index].peer_id.id_addr_info.addr[0], + m_peer_table[index].peer_id.id_addr_info.addr[1], + m_peer_table[index].peer_id.id_addr_info.addr[2], + m_peer_table[index].peer_id.id_addr_info.addr[3], + m_peer_table[index].peer_id.id_addr_info.addr[4], + m_peer_table[index].peer_id.id_addr_info.addr[5]); + + if (m_peer_table[index].id_bitmap == UNASSIGNED) + { + if (p_addr->addr_type != BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE) + { + m_peer_table[index].id_bitmap &= (~ADDR_ENTRY); + m_peer_table[index].peer_id.id_addr_info = (*p_addr); + } + else + { + m_peer_table[index].id_bitmap &= (~IRK_ENTRY); + } + + (*p_device_index) = index; + err_code = NRF_SUCCESS; + + DM_LOG("[DM]: Allocated device instance 0x%02X\r\n", index); + + break; + } + } + + return err_code; +} + + +/**@brief Function for freeing a device instance allocated for bonded device. + * + * @param[in] device_index Device index. + * + * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. + */ +static __INLINE ret_code_t device_instance_free(uint32_t device_index) +{ + ret_code_t err_code; + pstorage_handle_t block_handle; + + //Get the block handle. + err_code = pstorage_block_identifier_get(&m_storage_handle, device_index, &block_handle); + + if (err_code == NRF_SUCCESS) + { + DM_TRC("[DM]:[DI 0x%02X]: Freeing Instance.\r\n", device_index); + + //Request clearing of the block. + err_code = pstorage_clear(&block_handle, ALL_CONTEXT_SIZE); + + if (err_code == NRF_SUCCESS) + { + peer_instance_init(device_index); + } + } + + return err_code; +} + + +/**@brief Function for searching for the device in the bonded device list. + * + * @param[in] p_addr Peer identification information. + * @param[out] p_device_index Device index. + * + * @retval NRF_SUCCESS Operation success. + * @retval NRF_ERROR_NOT_FOUND Operation failure. + */ +static ret_code_t device_instance_find(ble_gap_addr_t const * p_addr, uint32_t * p_device_index, uint16_t ediv) +{ + ret_code_t err_code; + uint32_t index; + + err_code = NRF_ERROR_NOT_FOUND; + + if (NULL != p_addr) + { + DM_TRC("[DM]: Searching for device 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X.\r\n", + p_addr->addr[0], + p_addr->addr[1], + p_addr->addr[2], + p_addr->addr[3], + p_addr->addr[4], + p_addr->addr[5]); + } + + for (index = 0; index < DEVICE_MANAGER_MAX_BONDS; index++) + { + DM_TRC("[DM]:[DI 0x%02X]: Device type 0x%02X.\r\n", + index, m_peer_table[index].peer_id.id_addr_info.addr_type); + DM_TRC("[DM]: Device Addr 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X.\r\n", + m_peer_table[index].peer_id.id_addr_info.addr[0], + m_peer_table[index].peer_id.id_addr_info.addr[1], + m_peer_table[index].peer_id.id_addr_info.addr[2], + m_peer_table[index].peer_id.id_addr_info.addr[3], + m_peer_table[index].peer_id.id_addr_info.addr[4], + m_peer_table[index].peer_id.id_addr_info.addr[5]); + + if (((NULL == p_addr) && (ediv == m_peer_table[index].ediv)) || + ((NULL != p_addr) && (memcmp(&m_peer_table[index].peer_id.id_addr_info, p_addr, sizeof(ble_gap_addr_t)) == 0))) + { + DM_LOG("[DM]: Found device at instance 0x%02X\r\n", index); + + (*p_device_index) = index; + err_code = NRF_SUCCESS; + + break; + } + } + + return err_code; +} + + +/**@brief Function for notifying connection manager event to the application. + * + * @param[in] p_handle Device handle identifying device. + * @param[in] p_event Connection manager event details. + * @param[in] event_result Event result code. + */ +static __INLINE void app_evt_notify(dm_handle_t const * const p_handle, + dm_event_t const * const p_event, + uint32_t event_result) +{ + dm_event_cb_t app_cb = m_application_table[0].ntf_cb; + + DM_MUTEX_UNLOCK(); + + DM_TRC("[DM]: Notifying application of event 0x%02X\r\n", p_event->event_id); + + //No need to do any kind of return value processing thus can be supressed. + UNUSED_VARIABLE(app_cb(p_handle, p_event, event_result)); + + DM_MUTEX_LOCK(); +} + + +/**@brief Function for allocating instance. + * + * @details The instance identifier is provided in the 'p_instance' parameter if the routine + * succeeds. + * + * @param[out] p_instance Connection instance. + * + * @retval NRF_SUCCESS Operation success. + * @retval NRF_ERROR_NO_MEM Operation failure. No memory. + */ +static __INLINE uint32_t connection_instance_allocate(uint32_t * p_instance) +{ + uint32_t err_code; + + DM_TRC("[DM]: Request to allocation connection instance\r\n"); + + err_code = connection_instance_find(BLE_CONN_HANDLE_INVALID, STATE_IDLE, p_instance); + + if (err_code == NRF_SUCCESS) + { + DM_LOG("[DM]:[%02X]: Connection Instance Allocated.\r\n", (*p_instance)); + m_connection_table[*p_instance].state = STATE_CONNECTED; + } + else + { + DM_LOG("[DM]: No free connection instances available\r\n"); + err_code = NRF_ERROR_NO_MEM; + } + + return err_code; +} + + +/**@brief Function for freeing instance. Instance identifier is provided in the parameter + * 'p_instance' in case the routine succeeds. + * + * @param[in] p_instance Connection instance. + */ +static __INLINE void connection_instance_free(uint32_t const * p_instance) +{ + DM_TRC("[DM]:[CI 0x%02X]: Freeing connection instance\r\n", (*p_instance)); + + if (m_connection_table[*p_instance].state != STATE_IDLE) + { + DM_LOG("[DM]:[%02X]: Freed connection instance.\r\n", (*p_instance)); + connection_instance_init(*p_instance); + } +} + + +/**@brief Function for storage operation dummy handler. + * + * @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 + * 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] offset Offset in bytes to be applied when writing to the block. + * For example, if within a block of 100 bytes, application wishes to + * write 20 bytes at offset of 12, then this field should be set to 12. + * Should be word aligned. + * + * @retval NRF_SUCCESS Operation success. + */ +static uint32_t storage_operation_dummy_handler(pstorage_handle_t * p_dest, + uint8_t * p_src, + pstorage_size_t size, + pstorage_size_t offset) +{ + return NRF_SUCCESS; +} + + +/**@brief Function for saving the device context persistently. + * + * @param[in] p_handle Device handle identifying device. + * @param[in] state Device store state. + */ +static __INLINE void device_context_store(dm_handle_t const * p_handle, device_store_state_t state) +{ + pstorage_handle_t block_handle; + storage_operation store_fn; + ret_code_t err_code; + + DM_LOG("[DM]: --> device_context_store\r\n"); + + err_code = pstorage_block_identifier_get(&m_storage_handle, + p_handle->device_id, + &block_handle); + + if (err_code == NRF_SUCCESS) + { + if ((STATE_BOND_INFO_UPDATE == + (m_connection_table[p_handle->connection_id].state & STATE_BOND_INFO_UPDATE)) || + (state == UPDATE_PEER_ADDR)) + { + DM_LOG("[DM]:[DI %02X]:[CI %02X]: -> Updating bonding information.\r\n", + p_handle->device_id, p_handle->connection_id); + + store_fn = pstorage_update; + } + else if (state == FIRST_BOND_STORE) + { + DM_LOG("[DM]:[DI %02X]:[CI %02X]: -> Storing bonding information.\r\n", + p_handle->device_id, p_handle->connection_id); + + store_fn = pstorage_store; + } + else + { + DM_LOG("[DM]:[DI %02X]:[CI %02X]: -> No update in bonding information.\r\n", + p_handle->device_id, p_handle->connection_id); + + //No operation needed. + store_fn = storage_operation_dummy_handler; + } + + //Store the peer id. + err_code = store_fn(&block_handle, + (uint8_t *)&m_peer_table[p_handle->device_id], + PEER_ID_SIZE, + PEER_ID_STORAGE_OFFSET); + + if ((err_code == NRF_SUCCESS) && (state != UPDATE_PEER_ADDR)) + { + m_connection_table[p_handle->connection_id].state &= (~STATE_BOND_INFO_UPDATE); + + //Store the bond information. + err_code = store_fn(&block_handle, + (uint8_t *)&m_bond_table[p_handle->connection_id], + BOND_SIZE, + BOND_STORAGE_OFFSET); + + if (err_code != NRF_SUCCESS) + { + DM_ERR("[DM]:[0x%02X]:Failed to store bond information, reason 0x%08X\r\n", + p_handle->device_id, err_code); + } + } + + if (state != UPDATE_PEER_ADDR) + { + //Store the service information + err_code = m_service_context_store[m_application_table[p_handle->appl_id].service] + ( + &block_handle, + p_handle + ); + + if (err_code != NRF_SUCCESS) + { + //Notify application of an error event. + DM_ERR("[DM]: Failed to store service context, reason %08X\r\n", err_code); + } + } + } + + if (err_code != NRF_SUCCESS) + { + //Notify application of an error event. + DM_ERR("[DM]: Failed to store device context, reason %08X\r\n", err_code); + } +} + + +/**@brief Function for storing when there is no service registered. + * + * @param[in] p_block_handle Storage block identifier. + * @param[in] p_handle Device handle identifying device that is loaded. + * + * @retval NRF_SUCCESS + */ +static __INLINE ret_code_t no_service_context_store(pstorage_handle_t const * p_block_handle, + dm_handle_t const * p_handle) +{ + DM_LOG("[DM]: --> no_service_context_store\r\n"); + + return NRF_SUCCESS; +} + + +/**@brief Function for storing GATT Server context. + * + * @param[in] p_block_handle Storage block identifier. + * @param[in] p_handle Device handle identifying device that is stored. + * + * @retval NRF_SUCCESS Operation success. + */ +static __INLINE ret_code_t gatts_context_store(pstorage_handle_t const * p_block_handle, + dm_handle_t const * p_handle) +{ + storage_operation store_fn; + uint32_t attr_flags = BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS | BLE_GATTS_SYS_ATTR_FLAG_USR_SRVCS; + uint16_t attr_len = DM_GATT_SERVER_ATTR_MAX_SIZE; + uint8_t sys_data[DM_GATT_SERVER_ATTR_MAX_SIZE]; + + DM_LOG("[DM]: --> gatts_context_store\r\n"); + + uint32_t err_code = sd_ble_gatts_sys_attr_get( + m_connection_table[p_handle->connection_id].conn_handle, + sys_data, + &attr_len, + attr_flags); + + if (err_code == NRF_SUCCESS) + { + if (memcmp(m_gatts_table[p_handle->connection_id].attributes, sys_data, attr_len) == 0) + { + //No store operation is needed. + DM_LOG("[DM]:[0x%02X]: No change in GATTS Context information.\r\n", + p_handle->device_id); + + if ((m_connection_table[p_handle->connection_id].state & STATE_CONNECTED) != + STATE_CONNECTED) + { + DM_LOG("[DM]:[0x%02X]: Resetting GATTS for active instance.\r\n", + p_handle->connection_id); + + //Reset GATTS information for the current context. + memset(&m_gatts_table[p_handle->connection_id], 0, sizeof(dm_gatts_context_t)); + } + } + else + { + if (m_gatts_table[p_handle->connection_id].size != 0) + { + //There is data already stored in persistent memory, therefore an update is needed. + DM_LOG("[DM]:[0x%02X]: Updating stored service context\r\n", p_handle->device_id); + + store_fn = pstorage_update; + } + else + { + //Fresh write, a store is needed. + DM_LOG("[DM]:[0x%02X]: Storing service context\r\n", p_handle->device_id); + + store_fn = pstorage_store; + } + + m_gatts_table[p_handle->connection_id].flags = attr_flags; + m_gatts_table[p_handle->connection_id].size = attr_len; + memcpy(m_gatts_table[p_handle->connection_id].attributes, sys_data, attr_len); + + DM_DUMP((uint8_t *)&m_gatts_table[p_handle->connection_id], sizeof(dm_gatts_context_t)); + + DM_LOG("[DM]:[0x%02X]: GATTS Data size 0x%08X\r\n", + p_handle->device_id, + m_gatts_table[p_handle->connection_id].size); + + //Store GATTS information. + err_code = store_fn((pstorage_handle_t *)p_block_handle, + (uint8_t *)&m_gatts_table[p_handle->connection_id], + GATTS_SERVICE_CONTEXT_SIZE, + SERVICE_STORAGE_OFFSET); + + if (err_code != NRF_SUCCESS) + { + DM_ERR("[DM]:[0x%02X]:Failed to store service context, reason 0x%08X\r\n", + p_handle->device_id, + err_code); + } + else + { + DM_LOG("[DM]: Service context successfully stored.\r\n"); + } + } + } + + return NRF_SUCCESS; +} + + +/**@brief Function for storing GATT Client context. + * + * @param[in] p_block_handle Storage block identifier. + * @param[in] p_handle Device handle identifying device that is stored. + * + * @retval NRF_SUCCESS Operation success. + */ +static __INLINE ret_code_t gattc_context_store(pstorage_handle_t const * p_block_handle, + dm_handle_t const * p_handle) +{ + DM_LOG("[DM]: --> gattc_context_store\r\n"); + + return NRF_SUCCESS; +} + + +/**@brief Function for storing GATT Server & Client context. + * + * @param[in] p_block_handle Storage block identifier. + * @param[in] p_handle Device handle identifying device that is stored. + * + * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. + */ +static __INLINE ret_code_t gattsc_context_store(pstorage_handle_t const * p_block_handle, + dm_handle_t const * p_handle) +{ + DM_LOG("[DM]: --> gattsc_context_store\r\n"); + + ret_code_t err_code = gatts_context_store(p_block_handle, p_handle); + + if (NRF_SUCCESS == err_code) + { + err_code = gattc_context_store(p_block_handle, p_handle); + } + + return err_code; +} + + +/**@brief Function for loading when there is no service registered. + * + * @param[in] p_block_handle Storage block identifier. + * @param[in] p_handle Device handle identifying device that is loaded. + * + * @retval NRF_SUCCESS + */ +static __INLINE ret_code_t no_service_context_load(pstorage_handle_t const * p_block_handle, + dm_handle_t const * p_handle) +{ + DM_LOG("[DM]: --> no_service_context_load\r\n"); + + return NRF_SUCCESS; +} + + +/**@brief Function for loading GATT Server context. + * + * @param[in] p_block_handle Storage block identifier. + * @param[in] p_handle Device handle identifying device that is loaded. + * + * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. + */ +static __INLINE ret_code_t gatts_context_load(pstorage_handle_t const * p_block_handle, + dm_handle_t const * p_handle) +{ + DM_LOG("[DM]:[CI 0x%02X]:[DI 0x%02X]: --> gatts_context_load\r\n", + p_handle->connection_id, + p_handle->device_id); + + ret_code_t err_code = pstorage_load((uint8_t *)&m_gatts_table[p_handle->connection_id], + (pstorage_handle_t *)p_block_handle, + GATTS_SERVICE_CONTEXT_SIZE, + SERVICE_STORAGE_OFFSET); + + if (err_code == NRF_SUCCESS) + { + DM_LOG("[DM]:[%02X]:[Block ID 0x%08X]: Service context loaded, size 0x%08X\r\n", + p_handle->connection_id, + p_block_handle->block_id, + m_gatts_table[p_handle->connection_id].size); + DM_DUMP((uint8_t *)&m_gatts_table[p_handle->connection_id], sizeof(dm_gatts_context_t)); + + if (m_gatts_table[p_handle->connection_id].size == DM_GATTS_INVALID_SIZE) + { + m_gatts_table[p_handle->connection_id].size = 0; + } + } + else + { + DM_ERR("[DM]:[%02X]: Failed to load Service context, reason %08X\r\n", + p_handle->connection_id, + err_code); + } + + return err_code; +} + + +/**@brief Function for loading GATT Client context. + * + * @param[in] p_block_handle Storage block identifier. + * @param[in] p_handle Device handle identifying device that is loaded. + * + * @retval NRF_SUCCESS + */ +static __INLINE ret_code_t gattc_context_load(pstorage_handle_t const * p_block_handle, + dm_handle_t const * p_handle) +{ + DM_LOG("[DM]: --> gattc_context_load\r\n"); + + return NRF_SUCCESS; +} + + +/**@brief Function for loading GATT Server & Client context. + * + * @param[in] p_block_handle Storage block identifier. + * @param[in] p_handle Device handle identifying device that is loaded. + * + * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. + */ +static __INLINE ret_code_t gattsc_context_load(pstorage_handle_t const * p_block_handle, + dm_handle_t const * p_handle) +{ + DM_LOG("[DM]: --> gattsc_context_load\r\n"); + + ret_code_t err_code = gatts_context_load(p_block_handle, p_handle); + + if (NRF_SUCCESS == err_code) + { + err_code = gattc_context_load(p_block_handle, p_handle); + } + + return err_code; +} + + +/**@brief Function for applying when there is no service registered. + * + * @param[in] p_handle Device handle identifying device that is applied. + * + * @retval NRF_SUCCESS + */ +static __INLINE ret_code_t no_service_context_apply(dm_handle_t * p_handle) +{ + DM_LOG("[DM]: --> no_service_context_apply\r\n"); + DM_LOG("[DM]:[CI 0x%02X]: No Service context\r\n", p_handle->connection_id); + + return NRF_SUCCESS; +} + + +/**@brief Function for applying GATT Server context. + * + * @param[in] p_handle Device handle identifying device that is applied. + * + * @retval NRF_SUCCESS On success. + * @retval DM_SERVICE_CONTEXT_NOT_APPLIED On failure. + */ +static __INLINE ret_code_t gatts_context_apply(dm_handle_t * p_handle) +{ + uint32_t err_code; + + uint8_t * p_gatts_context = NULL; + uint16_t context_len = 0; + uint32_t context_flags = 0; + + DM_LOG("[DM]: --> gatts_context_apply\r\n"); + DM_LOG("[DM]:[CI 0x%02X]: State 0x%02X, Size 0x%08X\r\n", + p_handle->connection_id, + m_connection_table[p_handle->connection_id].state, + m_gatts_table[p_handle->connection_id].size); + + if ((m_gatts_table[p_handle->connection_id].size != 0) && + ( + ((m_connection_table[p_handle->connection_id].state & STATE_LINK_ENCRYPTED) == STATE_LINK_ENCRYPTED) && + ((m_connection_table[p_handle->connection_id].state & STATE_BOND_INFO_UPDATE) + != STATE_BOND_INFO_UPDATE) + ) + ) + { + DM_LOG("[DM]: Setting stored context.\r\n"); + + p_gatts_context = &m_gatts_table[p_handle->connection_id].attributes[0]; + context_len = m_gatts_table[p_handle->connection_id].size; + context_flags = m_gatts_table[p_handle->connection_id].flags; + } + + err_code = sd_ble_gatts_sys_attr_set(m_connection_table[p_handle->connection_id].conn_handle, + p_gatts_context, + context_len, + context_flags); + + if (err_code == NRF_ERROR_INVALID_DATA) + { + // Indication that the ATT table has changed. Restore the system attributes to system + // services only and send a service changed indication if possible. + context_flags = BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS; + err_code = sd_ble_gatts_sys_attr_set(m_connection_table[p_handle->connection_id].conn_handle, + p_gatts_context, + context_len, + context_flags); + } + + if (err_code != NRF_SUCCESS) + { + DM_LOG("[DM]: Failed to set system attributes, reason 0x%08X.\r\n", err_code); + + err_code = DM_SERVICE_CONTEXT_NOT_APPLIED; + } + + if (context_flags == BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS) + { + err_code = sd_ble_gatts_service_changed(m_connection_table[p_handle->connection_id].conn_handle, + 0x000C, + 0xFFFF); + if (err_code != NRF_SUCCESS) + { + DM_LOG("[DM]: Failed to send Service Changed indication, reason 0x%08X.\r\n", err_code); + if ((err_code != BLE_ERROR_INVALID_CONN_HANDLE) && + (err_code != NRF_ERROR_INVALID_STATE) && + (err_code != BLE_ERROR_NO_TX_PACKETS) && + (err_code != NRF_ERROR_BUSY)) + { + // Those errors can be expected when sending trying to send Service Changed + // Indication if the CCCD is not set to indicate. Thus set the returning error + // code to success. + err_code = NRF_SUCCESS; + } + else + { + err_code = DM_SERVICE_CONTEXT_NOT_APPLIED; + } + } + } + + return err_code; +} + + +/**@brief Function for applying GATT Client context. + * + * @param[in] p_handle Device handle identifying device that is applied. + * + * @retval NRF_SUCCESS On success. + */ +static __INLINE ret_code_t gattc_context_apply(dm_handle_t * p_handle) +{ + DM_LOG("[DM]: --> gattc_context_apply\r\n"); + + return NRF_SUCCESS; +} + + +/**@brief Function for applying GATT Server & Client context. + * + * @param[in] p_handle Device handle identifying device that is applied. + * + * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. + */ +static __INLINE ret_code_t gattsc_context_apply(dm_handle_t * p_handle) +{ + uint32_t err_code; + + DM_LOG("[DM]: --> gattsc_context_apply\r\n"); + + err_code = gatts_context_apply(p_handle); + + if (err_code == NRF_SUCCESS) + { + err_code = gattc_context_apply(p_handle); + } + + return err_code; +} + + +/**@brief Function for pstorage module callback. + * + * @param[in] p_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 of data provided by the application for the operation. + */ +static void dm_pstorage_cb_handler(pstorage_handle_t * p_handle, + uint8_t op_code, + uint32_t result, + uint8_t * p_data, + uint32_t data_len) +{ + VERIFY_APP_REGISTERED_VOID(0); + + if (data_len > ALL_CONTEXT_SIZE) + { + //Clearing of all bonds at initialization, no event is generated. + return; + } + + DM_MUTEX_LOCK(); + + dm_event_t dm_event; + dm_handle_t dm_handle; + dm_context_t context_data; + pstorage_handle_t block_handle; + uint32_t index_count; + uint32_t err_code; + + bool app_notify = true; + + err_code = dm_handle_initialize(&dm_handle); + APP_ERROR_CHECK(err_code); + + dm_handle.appl_id = 0; + dm_event.event_id = 0x00; + + //Construct the event which it is related to. + + //Initialize context data information and length. + context_data.p_data = p_data; + context_data.len = data_len; + + for (uint32_t index = 0; index < DEVICE_MANAGER_MAX_BONDS; index++) + { + err_code = pstorage_block_identifier_get(&m_storage_handle, index, &block_handle); + if ((err_code == NRF_SUCCESS) && + ( + (memcmp(p_handle, &block_handle, sizeof(pstorage_handle_t)) == 0) + ) + ) + { + dm_handle.device_id = index; + break; + } + } + + if (dm_handle.device_id != DM_INVALID_ID) + { + if (op_code == PSTORAGE_CLEAR_OP_CODE) + { + if (data_len == ALL_CONTEXT_SIZE) + { + dm_event.event_id = DM_EVT_DEVICE_CONTEXT_BASE; + } + else + { + dm_event.event_id = DM_EVT_APP_CONTEXT_BASE; + } + } + else + { + //Update or store operation. + //Context is identified based on the pointer value. Device context, application context + //and service context all have their own value range. + index_count = ((uint32_t)(p_data - (uint8_t *)m_peer_table)) / PEER_ID_SIZE; + + if (index_count < DEVICE_MANAGER_MAX_BONDS) + { + dm_event.event_param.p_device_context = &context_data; + + //Only the peer identification is stored, not bond information. Hence do not notify + //the application yet, unless the store operation resulted in a failure. + if ((result == NRF_SUCCESS) && + ( + (update_status_bit_is_set(dm_handle.device_id) == false) + ) + ) + { + app_notify = false; + } + else + { + //Reset update status since update is complete. + update_status_bit_reset(dm_handle.device_id); + + //Notify application of error in storing the context. + dm_event.event_id = DM_EVT_DEVICE_CONTEXT_BASE; + } + } + else + { + index_count = ((uint32_t)(p_data - (uint8_t *)m_bond_table)) / BOND_SIZE; + + if (index_count < DEVICE_MANAGER_MAX_CONNECTIONS) + { + DM_LOG("[DM]:[0x%02X]:[0x%02X]: Bond context Event\r\n", + dm_handle.device_id, + dm_handle.connection_id); + + dm_event.event_param.p_device_context = &context_data; + dm_event.event_id = DM_EVT_DEVICE_CONTEXT_BASE; + dm_handle.connection_id = index_count; + + ble_gap_sec_keyset_t keys_exchanged; + keys_exchanged.keys_peer.p_enc_key = NULL; + keys_exchanged.keys_peer.p_id_key = &m_local_id_info; + keys_exchanged.keys_own.p_enc_key = &m_bond_table[index_count].peer_enc_key; + keys_exchanged.keys_own.p_id_key = &m_peer_table[dm_handle.device_id].peer_id; + + //Context information updated to provide the keys. + context_data.p_data = (uint8_t *)&keys_exchanged; + context_data.len = sizeof(ble_gap_sec_keyset_t); + } + else + { + index_count = ((uint32_t)(p_data - (uint8_t *)m_gatts_table)) / + GATTS_SERVICE_CONTEXT_SIZE; + + if (index_count < DEVICE_MANAGER_MAX_CONNECTIONS) + { + DM_LOG("[DM]:[0x%02X]:[0x%02X]: Service context Event\r\n", + dm_handle.device_id, + dm_handle.connection_id); + + //Notify application. + dm_event.event_id = DM_EVT_SERVICE_CONTEXT_BASE; + dm_handle.connection_id = index_count; + dm_handle.service_id = DM_PROTOCOL_CNTXT_GATT_SRVR_ID; + + //Reset the service context now that it was successfully written to the + //application and the link is disconnected. + if ((m_connection_table[index_count].state & STATE_CONNECTED) != + STATE_CONNECTED) + { + DM_LOG("[DM]:[0x%02X]:[0x%02X]: Resetting bond information for " + "active instance.\r\n", + dm_handle.device_id, + dm_handle.connection_id); + + memset(&m_gatts_table[dm_handle.connection_id], + 0, + sizeof(dm_gatts_context_t)); + } + } + else + { + DM_LOG("[DM]:[0x%02X]:[0x%02X]: App context Event\r\n", + dm_handle.device_id, + dm_handle.connection_id); + + app_notify = false; + dm_event.event_id = DM_EVT_APP_CONTEXT_BASE; +#if (DEVICE_MANAGER_APP_CONTEXT_SIZE != 0) + + if (p_data == (uint8_t *)(&m_context_init_len)) + { + //Context data is deleted. + //This is a workaround to get the right event as on delete operation + //update operation is used instead of clear. + op_code = PSTORAGE_CLEAR_OP_CODE; + app_notify = true; + } + else if (m_app_context_table[dm_handle.device_id] == p_data) + { + app_notify = true; + dm_event.event_param.p_app_context = &context_data; + + //Verify if the device is connected, if yes set connection instance. + for (uint32_t index = 0; + index < DEVICE_MANAGER_MAX_CONNECTIONS; + index++) + { + if (dm_handle.device_id == m_connection_table[index].bonded_dev_id) + { + dm_handle.connection_id = index; + break; + } + } + } + else + { + //No implementation needed. + } +#endif //DEVICE_MANAGER_APP_CONTEXT_SIZE + } + } + } + } + + if (app_notify == true) + { + if (op_code == PSTORAGE_CLEAR_OP_CODE) + { + dm_event.event_id |= DM_CLEAR_OPERATION_ID; + } + else if (op_code == PSTORAGE_LOAD_OP_CODE) + { + dm_event.event_id |= DM_LOAD_OPERATION_ID; + } + else + { + dm_event.event_id |= DM_STORE_OPERATION_ID; + } + + dm_event.event_param.p_app_context = &context_data; + app_evt_notify(&dm_handle, &dm_event, result); + } + } + + DM_MUTEX_UNLOCK(); +} + + +ret_code_t dm_init(dm_init_param_t const * const p_init_param) +{ + pstorage_module_param_t param; + pstorage_handle_t block_handle; + ret_code_t err_code; + uint32_t index; + + DM_LOG("[DM]: >> dm_init.\r\n"); + + NULL_PARAM_CHECK(p_init_param); + + SDK_MUTEX_INIT(m_dm_mutex); + + DM_MUTEX_LOCK(); + + for (index = 0; index < DEVICE_MANAGER_MAX_APPLICATIONS; index++) + { + application_instance_init(index); + } + + for (index = 0; index < DEVICE_MANAGER_MAX_CONNECTIONS; index++) + { + connection_instance_init(index); + } + + memset(m_gatts_table, 0, sizeof(m_gatts_table)); + + //Initialization of all device instances. + for (index = 0; index < DEVICE_MANAGER_MAX_BONDS; index++) + { + peer_instance_init(index); + m_irk_index_table[index] = DM_INVALID_ID; + } + + //All context with respect to a particular device is stored contiguously. + param.block_size = ALL_CONTEXT_SIZE; + param.block_count = DEVICE_MANAGER_MAX_BONDS; + param.cb = dm_pstorage_cb_handler; + + err_code = pstorage_register(¶m, &m_storage_handle); + + if (err_code == NRF_SUCCESS) + { + m_module_initialized = true; + + if (p_init_param->clear_persistent_data == false) + { + DM_LOG("[DM]: Storage handle 0x%08X.\r\n", m_storage_handle.block_id); + + //Copy bonded peer device address and IRK to RAM table. + + //Bonded devices are stored in range (0,DEVICE_MANAGER_MAX_BONDS-1). The remaining + //range is for active connections that may or may not be bonded. + for (index = 0; index < DEVICE_MANAGER_MAX_BONDS; index++) + { + err_code = pstorage_block_identifier_get(&m_storage_handle, index, &block_handle); + + //Issue read request if you successfully get the block identifier. + if (err_code == NRF_SUCCESS) + { + DM_TRC("[DM]:[0x%02X]: Block handle 0x%08X.\r\n", index, block_handle.block_id); + + err_code = pstorage_load((uint8_t *)&m_peer_table[index], + &block_handle, + sizeof(peer_id_t), + 0); + + if (err_code != NRF_SUCCESS) + { + // In case a peer device could not be loaded successfully, rest of the + // initialization procedure are skipped and an error is sent to the + // application. + DM_ERR( + "[DM]: Failed to load peer device %08X from storage, reason %08X.\r\n", + index, + err_code); + + m_module_initialized = false; + break; + } + else + { + DM_TRC("[DM]:[DI 0x%02X]: Device type 0x%02X.\r\n", + index, + m_peer_table[index].peer_id.id_addr_info.addr_type); + DM_TRC("[DM]: Device Addr 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X.\r\n", + m_peer_table[index].peer_id.id_addr_info.addr[0], + m_peer_table[index].peer_id.id_addr_info.addr[1], + m_peer_table[index].peer_id.id_addr_info.addr[2], + m_peer_table[index].peer_id.id_addr_info.addr[3], + m_peer_table[index].peer_id.id_addr_info.addr[4], + m_peer_table[index].peer_id.id_addr_info.addr[5]); + } + } + else + { + //In case a peer device could not be loaded successfully, rest of the + //initialization procedure are skipped and an error is sent to the application. + DM_LOG("[DM]: Failed to get block handle for instance %08X, reason %08X.\r\n", + index, + err_code); + + m_module_initialized = false; + break; + } + } + } + else + { + err_code = pstorage_clear(&m_storage_handle, (param.block_size * param.block_count)); + DM_ERR("[DM]: Successfully requested clear of persistent data.\r\n"); + } + } + else + { + DM_ERR("[DM]: Failed to register with storage module, reason 0x%08X.\r\n", err_code); + } + + DM_MUTEX_UNLOCK(); + + DM_TRC("[DM]: << dm_init.\r\n"); + + return err_code; +} + + +ret_code_t dm_register(dm_application_instance_t * p_appl_instance, + dm_application_param_t const * p_appl_param) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_appl_instance); + NULL_PARAM_CHECK(p_appl_param); + NULL_PARAM_CHECK(p_appl_param->evt_handler); + + DM_MUTEX_LOCK(); + + DM_LOG("[DM]: >> dm_register.\r\n"); + + uint32_t err_code; + + //Verify if an application instance is available. Currently only one instance is supported. + if (m_application_table[0].ntf_cb == NULL) + { + DM_LOG("[DM]: Application Instance allocated.\r\n"); + + //Mark instance as allocated. + m_application_table[0].ntf_cb = p_appl_param->evt_handler; + m_application_table[0].sec_param = p_appl_param->sec_param; + m_application_table[0].service = p_appl_param->service_type; + + m_application_table[0].sec_param.kdist_peer.enc = 0; + m_application_table[0].sec_param.kdist_peer.id = 1; + m_application_table[0].sec_param.kdist_peer.sign = 0; + m_application_table[0].sec_param.kdist_own.enc = 1; + m_application_table[0].sec_param.kdist_own.id = 1; + m_application_table[0].sec_param.kdist_own.sign = 0; + //Populate application's instance variable with the assigned allocation instance. + *p_appl_instance = 0; + err_code = NRF_SUCCESS; + } + else + { + err_code = (NRF_ERROR_NO_MEM | DEVICE_MANAGER_ERR_BASE); + } + + DM_MUTEX_UNLOCK(); + + DM_TRC("[DM]: << dm_register.\r\n"); + + return err_code; +} + + +ret_code_t dm_security_setup_req(dm_handle_t * p_handle) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_handle); + VERIFY_APP_REGISTERED(p_handle->appl_id); + VERIFY_CONNECTION_INSTANCE(p_handle->connection_id); + + DM_MUTEX_LOCK(); + + DM_LOG("[DM]: >> dm_security_setup_req\r\n"); + + uint32_t err_code = (NRF_ERROR_INVALID_STATE | DEVICE_MANAGER_ERR_BASE); + + if ((m_connection_table[p_handle->connection_id].state & STATE_CONNECTED) == STATE_CONNECTED) + { + err_code = sd_ble_gap_authenticate(m_connection_table[p_handle->connection_id].conn_handle, + &m_application_table[0].sec_param); + } + + DM_TRC("[DM]: << dm_security_setup_req, 0x%08X\r\n", err_code); + + DM_MUTEX_UNLOCK(); + + return err_code; +} + + +ret_code_t dm_security_status_req(dm_handle_t const * p_handle, + dm_security_status_t * p_status) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_handle); + NULL_PARAM_CHECK(p_status); + VERIFY_APP_REGISTERED(p_handle->appl_id); + VERIFY_CONNECTION_INSTANCE(p_handle->connection_id); + + DM_MUTEX_LOCK(); + + DM_LOG("[DM]: >> dm_security_status_req\r\n"); + + if ((m_connection_table[p_handle->connection_id].state & STATE_PAIRING) || + (m_connection_table[p_handle->connection_id].state & STATE_PAIRING_PENDING)) + { + (*p_status) = ENCRYPTION_IN_PROGRESS; + } + else if (m_connection_table[p_handle->connection_id].state & STATE_LINK_ENCRYPTED) + { + (*p_status) = ENCRYPTED; + } + else + { + (*p_status) = NOT_ENCRYPTED; + } + + DM_TRC("[DM]: << dm_security_status_req\r\n"); + + DM_MUTEX_UNLOCK(); + + return NRF_SUCCESS; +} + + +ret_code_t dm_whitelist_create(dm_application_instance_t const * p_handle, + ble_gap_whitelist_t * p_whitelist) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_handle); + NULL_PARAM_CHECK(p_whitelist); + NULL_PARAM_CHECK(p_whitelist->pp_addrs); + NULL_PARAM_CHECK(p_whitelist->pp_irks); + VERIFY_APP_REGISTERED(*p_handle); + + DM_MUTEX_LOCK(); + + DM_LOG("[DM]: >> dm_whitelist_create\r\n"); + + uint32_t addr_count = 0; + uint32_t irk_count = 0; + bool connected = false; + + for (uint32_t index = 0; index < DEVICE_MANAGER_MAX_BONDS; index++) + { + connected = false; + + for (uint32_t c_index = 0; c_index < DEVICE_MANAGER_MAX_CONNECTIONS; c_index++) + { + if ((index == m_connection_table[c_index].bonded_dev_id) && + ((m_connection_table[c_index].state & STATE_CONNECTED) == STATE_CONNECTED)) + { + connected = true; + break; + } + } + + if (connected == false) + { + if ((irk_count < p_whitelist->irk_count) && + ((m_peer_table[index].id_bitmap & IRK_ENTRY) == 0)) + { + p_whitelist->pp_irks[irk_count] = &m_peer_table[index].peer_id.id_info; + m_irk_index_table[irk_count] = index; + irk_count++; + } + + if ((addr_count < p_whitelist->addr_count) && + (m_peer_table[index].id_bitmap & ADDR_ENTRY) == 0) + { + p_whitelist->pp_addrs[addr_count] = &m_peer_table[index].peer_id.id_addr_info; + addr_count++; + } + } + } + + p_whitelist->addr_count = addr_count; + p_whitelist->irk_count = irk_count; + + DM_LOG("[DM]: Created whitelist, number of IRK = 0x%02X, number of addr = 0x%02X\r\n", + irk_count, + addr_count); + + DM_TRC("[DM]: << dm_whitelist_create\r\n"); + + DM_MUTEX_UNLOCK(); + + return NRF_SUCCESS; +} + + +ret_code_t dm_device_add(dm_handle_t * p_handle, + dm_device_context_t const * p_context) +{ + return (API_NOT_IMPLEMENTED | DEVICE_MANAGER_ERR_BASE); +} + + +ret_code_t dm_device_delete(dm_handle_t const * p_handle) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_handle); + VERIFY_APP_REGISTERED(p_handle->appl_id); + VERIFY_DEVICE_INSTANCE(p_handle->device_id); + + DM_MUTEX_LOCK(); + + DM_TRC("[DM]: >> dm_device_delete\r\n"); + + uint32_t err_code = device_instance_free(p_handle->device_id); + + DM_TRC("[DM]: << dm_device_delete\r\n"); + + DM_MUTEX_UNLOCK(); + + return err_code; +} + + +ret_code_t dm_device_delete_all(dm_application_instance_t const * p_handle) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_handle); + VERIFY_APP_REGISTERED((*p_handle)); + + DM_MUTEX_LOCK(); + + uint32_t err_code = NRF_SUCCESS; + + DM_TRC("[DM]: >> dm_device_delete_all\r\n"); + + for (uint32_t index = 0; index < DEVICE_MANAGER_MAX_BONDS; index++) + { + if (m_peer_table[index].id_bitmap != UNASSIGNED) + { + err_code = device_instance_free(index); + } + } + + DM_TRC("[DM]: << dm_device_delete_all\r\n"); + + DM_MUTEX_UNLOCK(); + + return err_code; +} + + +ret_code_t dm_service_context_set(dm_handle_t const * p_handle, + dm_service_context_t const * p_context) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_handle); + NULL_PARAM_CHECK(p_context); + VERIFY_APP_REGISTERED(p_handle->appl_id); + VERIFY_CONNECTION_INSTANCE(p_handle->connection_id); + VERIFY_DEVICE_INSTANCE(p_handle->device_id); + + DM_MUTEX_LOCK(); + + DM_TRC("[DM]: >> dm_service_context_set\r\n"); + + if ((p_context->context_data.p_data != NULL) && + ( + (p_context->context_data.len != 0) && + (p_context->context_data.len < DM_GATT_SERVER_ATTR_MAX_SIZE) + ) + ) + { + if (p_context->service_type == DM_PROTOCOL_CNTXT_GATT_SRVR_ID) + { + memcpy(m_gatts_table[p_handle->connection_id].attributes, + p_context->context_data.p_data, + p_context->context_data.len); + } + } + + pstorage_handle_t block_handle; + uint32_t err_code = pstorage_block_identifier_get(&m_storage_handle, + p_handle->device_id, + &block_handle); + + err_code = m_service_context_store[p_context->service_type](&block_handle, p_handle); + + DM_TRC("[DM]: << dm_service_context_set\r\n"); + + DM_MUTEX_UNLOCK(); + + return err_code; +} + + +ret_code_t dm_service_context_get(dm_handle_t const * p_handle, + dm_service_context_t * p_context) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_handle); + NULL_PARAM_CHECK(p_context); + VERIFY_APP_REGISTERED(p_handle->appl_id); + VERIFY_DEVICE_INSTANCE(p_handle->device_id); + + if ((m_connection_table[p_handle->connection_id].state & STATE_CONNECTED) != STATE_CONNECTED) + { + DM_TRC("[DM]: Device must be connected to get context. \r\n"); + + return (FEATURE_NOT_ENABLED | DEVICE_MANAGER_ERR_BASE); + } + + DM_MUTEX_LOCK(); + + DM_TRC("[DM]: >> dm_service_context_get\r\n"); + + if (p_context->service_type == DM_PROTOCOL_CNTXT_GATT_SRVR_ID) + { + p_context->context_data.p_data = m_gatts_table[p_handle->connection_id].attributes; + p_context->context_data.len = m_gatts_table[p_handle->connection_id].size; + } + + pstorage_handle_t block_handle; + uint32_t err_code = pstorage_block_identifier_get(&m_storage_handle, + p_handle->device_id, + &block_handle); + + err_code = m_service_context_load[p_context->service_type](&block_handle, p_handle); + + if (p_context->service_type == DM_PROTOCOL_CNTXT_GATT_SRVR_ID) + { + p_context->context_data.p_data = m_gatts_table[p_handle->connection_id].attributes; + p_context->context_data.len = m_gatts_table[p_handle->connection_id].size; + } + + DM_TRC("[DM]: << dm_service_context_get\r\n"); + + DM_MUTEX_UNLOCK(); + + return err_code; +} + + +ret_code_t dm_service_context_delete(dm_handle_t const * p_handle) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_handle); + VERIFY_APP_REGISTERED(p_handle->appl_id); + VERIFY_DEVICE_INSTANCE(p_handle->device_id); + + DM_LOG("[DM]: Context delete is not supported yet.\r\n"); + + return (API_NOT_IMPLEMENTED | DEVICE_MANAGER_ERR_BASE); +} + + +ret_code_t dm_application_context_set(dm_handle_t const * p_handle, + dm_application_context_t const * p_context) +{ +#if (DEVICE_MANAGER_APP_CONTEXT_SIZE != 0) + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_handle); + NULL_PARAM_CHECK(p_context); + NULL_PARAM_CHECK(p_context->p_data); + VERIFY_APP_REGISTERED(p_handle->appl_id); + VERIFY_DEVICE_INSTANCE(p_handle->device_id); + VERIFY_DEVICE_BOND(p_handle->connection_id); + SIZE_CHECK_APP_CONTEXT(p_context->len); + + DM_MUTEX_LOCK(); + + DM_TRC("[DM]: >> dm_application_context_set\r\n"); + + uint32_t err_code; + uint32_t context_len; + pstorage_handle_t block_handle; + + storage_operation store_fn = pstorage_store; + + err_code = pstorage_block_identifier_get(&m_storage_handle, + p_handle->device_id, + &block_handle); + + if (err_code == NRF_SUCCESS) + { + err_code = pstorage_load((uint8_t *)&context_len, + &block_handle, + sizeof(uint32_t), + APP_CONTEXT_STORAGE_OFFSET); + + if ((err_code == NRF_SUCCESS) && (context_len != INVALID_CONTEXT_LEN)) + { + //Data already exists. Need an update. + store_fn = pstorage_update; + + DM_LOG("[DM]:[DI 0x%02X]: Updating existing application context, existing len 0x%08X, " + "new length 0x%08X.\r\n", + p_handle->device_id, + context_len, + p_context->len); + } + else + { + DM_LOG("[DM]: Storing application context.\r\n"); + } + + //Store/update context length. + err_code = store_fn(&block_handle, + (uint8_t *)(&p_context->len), + sizeof(uint32_t), + APP_CONTEXT_STORAGE_OFFSET); + + if (err_code == NRF_SUCCESS) + { + //Update context data is used for application context as flash is never + //cleared if a delete of application context is called. + err_code = pstorage_update(&block_handle, + p_context->p_data, + DEVICE_MANAGER_APP_CONTEXT_SIZE, + (APP_CONTEXT_STORAGE_OFFSET + sizeof(uint32_t))); + if (err_code == NRF_SUCCESS) + { + m_app_context_table[p_handle->device_id] = p_context->p_data; + } + } + } + + DM_TRC("[DM]: << dm_application_context_set\r\n"); + + DM_MUTEX_UNLOCK(); + + return err_code; + +#else //DEVICE_MANAGER_APP_CONTEXT_SIZE + return (FEATURE_NOT_ENABLED | DEVICE_MANAGER_ERR_BASE); +#endif //DEVICE_MANAGER_APP_CONTEXT_SIZE +} + + +ret_code_t dm_application_context_get(dm_handle_t const * p_handle, + dm_application_context_t * p_context) +{ +#if (DEVICE_MANAGER_APP_CONTEXT_SIZE != 0) + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_handle); + NULL_PARAM_CHECK(p_context); + VERIFY_APP_REGISTERED(p_handle->appl_id); + VERIFY_DEVICE_INSTANCE(p_handle->device_id); + + DM_MUTEX_LOCK(); + + DM_TRC("[DM]: >> dm_application_context_get\r\n"); + + uint32_t context_len; + uint32_t err_code; + pstorage_handle_t block_handle; + + //Check if the context exists. + if (NULL == p_context->p_data) + { + p_context->p_data = m_app_context_table[p_handle->device_id]; + } + else + { + m_app_context_table[p_handle->device_id] = p_context->p_data; + } + + err_code = pstorage_block_identifier_get(&m_storage_handle, + p_handle->device_id, + &block_handle); + + if (err_code == NRF_SUCCESS) + { + err_code = pstorage_load((uint8_t *)&context_len, + &block_handle, + sizeof(uint32_t), + APP_CONTEXT_STORAGE_OFFSET); + + if ((err_code == NRF_SUCCESS) && (context_len != INVALID_CONTEXT_LEN)) + { + err_code = pstorage_load(p_context->p_data, + &block_handle, + DEVICE_MANAGER_APP_CONTEXT_SIZE, + (APP_CONTEXT_STORAGE_OFFSET + sizeof(uint32_t))); + if (err_code == NRF_SUCCESS) + { + p_context->len = context_len; + } + } + else + { + err_code = DM_NO_APP_CONTEXT; + } + } + + DM_TRC("[DM]: << dm_application_context_get\r\n"); + + DM_MUTEX_UNLOCK(); + + return err_code; + +#else //DEVICE_MANAGER_APP_CONTEXT_SIZE + return (FEATURE_NOT_ENABLED | DEVICE_MANAGER_ERR_BASE); +#endif //DEVICE_MANAGER_APP_CONTEXT_SIZE +} + + +ret_code_t dm_application_context_delete(const dm_handle_t * p_handle) +{ +#if (DEVICE_MANAGER_APP_CONTEXT_SIZE != 0) + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_handle); + VERIFY_APP_REGISTERED(p_handle->appl_id); + VERIFY_DEVICE_INSTANCE(p_handle->device_id); + + DM_MUTEX_LOCK(); + + DM_TRC("[DM]: >> dm_application_context_delete\r\n"); + + uint32_t err_code; + uint32_t context_len; + pstorage_handle_t block_handle; + + err_code = pstorage_block_identifier_get(&m_storage_handle, + p_handle->device_id, + &block_handle); + + if (err_code == NRF_SUCCESS) + { + err_code = pstorage_load((uint8_t *)&context_len, + &block_handle, + sizeof(uint32_t), + APP_CONTEXT_STORAGE_OFFSET); + + if (context_len != m_context_init_len) + { + err_code = pstorage_update(&block_handle, + (uint8_t *)&m_context_init_len, + sizeof(uint32_t), + APP_CONTEXT_STORAGE_OFFSET); + + if (err_code != NRF_SUCCESS) + { + DM_ERR("[DM]: Failed to delete application context, reason 0x%08X\r\n", err_code); + } + else + { + m_app_context_table[p_handle->device_id] = NULL; + } + } + } + + DM_TRC("[DM]: << dm_application_context_delete\r\n"); + + DM_MUTEX_UNLOCK(); + + return err_code; +#else //DEVICE_MANAGER_APP_CONTEXT_SIZE + return (FEATURE_NOT_ENABLED | DEVICE_MANAGER_ERR_BASE); +#endif //DEVICE_MANAGER_APP_CONTEXT_SIZE +} + + +ret_code_t dm_application_instance_set(dm_application_instance_t const * p_appl_instance, + dm_handle_t * p_handle) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_handle); + NULL_PARAM_CHECK(p_appl_instance); + VERIFY_APP_REGISTERED((*p_appl_instance)); + + p_handle->appl_id = (*p_appl_instance); + + return NRF_SUCCESS; +} + + +uint32_t dm_handle_initialize(dm_handle_t * p_handle) +{ + NULL_PARAM_CHECK(p_handle); + + p_handle->appl_id = DM_INVALID_ID; + p_handle->connection_id = DM_INVALID_ID; + p_handle->device_id = DM_INVALID_ID; + p_handle->service_id = DM_INVALID_ID; + + return NRF_SUCCESS; +} + + +ret_code_t dm_peer_addr_set(dm_handle_t const * p_handle, + ble_gap_addr_t const * p_addr) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_handle); + NULL_PARAM_CHECK(p_addr); + VERIFY_APP_REGISTERED(p_handle->appl_id); + VERIFY_DEVICE_INSTANCE(p_handle->device_id); + + DM_MUTEX_LOCK(); + + DM_TRC("[DM]: >> dm_peer_addr_set\r\n"); + + ret_code_t err_code; + + if ((p_handle->connection_id == DM_INVALID_ID) && + (p_addr->addr_type != BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE)) + { + m_peer_table[p_handle->device_id].peer_id.id_addr_info = (*p_addr); + update_status_bit_set(p_handle->device_id); + device_context_store(p_handle, UPDATE_PEER_ADDR); + err_code = NRF_SUCCESS; + } + else + { + err_code = (NRF_ERROR_INVALID_PARAM | DEVICE_MANAGER_ERR_BASE); + } + + DM_TRC("[DM]: << dm_peer_addr_set\r\n"); + + DM_MUTEX_UNLOCK(); + + return err_code; +} + + +ret_code_t dm_peer_addr_get(dm_handle_t const * p_handle, + ble_gap_addr_t * p_addr) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_handle); + NULL_PARAM_CHECK(p_addr); + VERIFY_APP_REGISTERED(p_handle->appl_id); + + DM_MUTEX_LOCK(); + + DM_TRC("[DM]: >> dm_peer_addr_get\r\n"); + + ret_code_t err_code; + + err_code = (NRF_ERROR_NOT_FOUND | DEVICE_MANAGER_ERR_BASE); + + if (p_handle->device_id == DM_INVALID_ID) + { + if ((p_handle->connection_id != DM_INVALID_ID) && + ((m_connection_table[p_handle->connection_id].state & STATE_CONNECTED) == + STATE_CONNECTED)) + { + DM_TRC("[DM]:[CI 0x%02X]: Address get for non bonded active connection.\r\n", + p_handle->connection_id); + + (*p_addr) = m_connection_table[p_handle->connection_id].peer_addr; + err_code = NRF_SUCCESS; + } + } + else + { + if ((m_peer_table[p_handle->device_id].id_bitmap & ADDR_ENTRY) == 0) + { + DM_TRC("[DM]:[DI 0x%02X]: Address get for bonded device.\r\n", + p_handle->device_id); + + (*p_addr) = m_peer_table[p_handle->device_id].peer_id.id_addr_info; + err_code = NRF_SUCCESS; + } + } + + DM_TRC("[DM]: << dm_peer_addr_get\r\n"); + + DM_MUTEX_UNLOCK(); + + return err_code; +} + + +ret_code_t dm_distributed_keys_get(dm_handle_t const * p_handle, + dm_sec_keyset_t * p_key_dist) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_handle); + NULL_PARAM_CHECK(p_key_dist); + VERIFY_APP_REGISTERED(p_handle->appl_id); + VERIFY_DEVICE_INSTANCE(p_handle->device_id); + + DM_MUTEX_LOCK(); + + DM_TRC("[DM]: >> dm_distributed_keys_get\r\n"); + + ret_code_t err_code; + ble_gap_enc_key_t peer_enc_key; + pstorage_handle_t block_handle; + + err_code = NRF_ERROR_NOT_FOUND; + p_key_dist->keys_central.enc_key.p_enc_key = NULL; + p_key_dist->keys_central.p_id_key = (dm_id_key_t *)&m_peer_table[p_handle->device_id].peer_id; + p_key_dist->keys_central.p_sign_key = NULL; + p_key_dist->keys_periph.p_id_key = (dm_id_key_t *)&m_local_id_info; + p_key_dist->keys_periph.p_sign_key = NULL; + p_key_dist->keys_periph.enc_key.p_enc_key = (dm_enc_key_t *)&peer_enc_key; + + if ((m_peer_table[p_handle->device_id].id_bitmap & IRK_ENTRY) == 0) + { +// p_key_dist->keys_periph.p_id_key->id_addr_info.addr_type = INVALID_ADDR_TYPE; + } + + err_code = pstorage_block_identifier_get(&m_storage_handle, p_handle->device_id, &block_handle); + if (err_code == NRF_SUCCESS) + { + + err_code = pstorage_load((uint8_t *)&peer_enc_key, + &block_handle, + BOND_SIZE, + BOND_STORAGE_OFFSET); + + if (err_code == NRF_SUCCESS) + { + p_key_dist->keys_central.enc_key.p_enc_key = NULL; + p_key_dist->keys_central.p_id_key = (dm_id_key_t *)&m_peer_table[p_handle->device_id].peer_id; + p_key_dist->keys_central.p_sign_key = NULL; + p_key_dist->keys_periph.p_id_key = (dm_id_key_t *)&m_local_id_info; + p_key_dist->keys_periph.p_sign_key = NULL; + p_key_dist->keys_periph.enc_key.p_enc_key = (dm_enc_key_t *)&peer_enc_key; + } + } + + DM_TRC("[DM]: << dm_distributed_keys_get\r\n"); + + DM_MUTEX_UNLOCK(); + + return err_code; +} + + +/**@brief Function for loading bond information for a connection instance. + */ +void bond_data_load(dm_handle_t * p_handle) +{ + pstorage_handle_t block_handle; + + uint32_t err_code = pstorage_block_identifier_get(&m_storage_handle, + p_handle->device_id, + &block_handle); + if (err_code == NRF_SUCCESS) + { + DM_LOG( + "[DM]:[%02X]:[Block ID 0x%08X]:Loading bond information at %p, size 0x%08X, offset 0x%08X.\r\n", + p_handle->connection_id, + block_handle.block_id, + &m_bond_table[p_handle->connection_id], + BOND_SIZE, + BOND_STORAGE_OFFSET); + + err_code = pstorage_load((uint8_t *)&m_bond_table[p_handle->connection_id], + &block_handle, + BOND_SIZE, + BOND_STORAGE_OFFSET); + + if (err_code != NRF_SUCCESS) + { + DM_ERR("[DM]:[%02X]: Failed to load Bond information, reason %08X\r\n", + p_handle->connection_id, + err_code); + } + + DM_LOG( + "[DM]:[%02X]:Loading service context at %p, size 0x%08X, offset 0x%08X.\r\n", + p_handle->connection_id, + &m_gatts_table[p_handle->connection_id], + sizeof(dm_gatts_context_t), + SERVICE_STORAGE_OFFSET); + + err_code = m_service_context_load[m_application_table[0].service]( + &block_handle, + p_handle); + + if (err_code != NRF_SUCCESS) + { + DM_ERR( + "[DM]:[%02X]: Failed to load service information, reason %08X\r\n", + p_handle->connection_id, + err_code); + } + } + else + { + DM_ERR("[DM]:[%02X]: Failed to get block identifier for " + "device %08X, reason %08X.\r\n", p_handle->connection_id, p_handle->device_id, err_code); + } +} + + +void dm_ble_evt_handler(ble_evt_t * p_ble_evt) +{ + uint32_t err_code; + uint32_t index; + uint32_t device_index = DM_INVALID_ID; + bool notify_app = false; + dm_handle_t handle; + dm_event_t event; + uint32_t event_result; + ble_gap_enc_info_t * p_enc_info = NULL; + + VERIFY_MODULE_INITIALIZED_VOID(); + VERIFY_APP_REGISTERED_VOID(0); + DM_MUTEX_LOCK(); + + err_code = dm_handle_initialize(&handle); + APP_ERROR_CHECK(err_code); + + event_result = NRF_SUCCESS; + err_code = NRF_SUCCESS; + event.event_param.p_gap_param = &p_ble_evt->evt.gap_evt; + event.event_paramlen = sizeof(ble_gap_evt_t); + handle.device_id = DM_INVALID_ID; + handle.appl_id = 0; + index = 0x00; + + if (p_ble_evt->header.evt_id != BLE_GAP_EVT_CONNECTED) + { + err_code = connection_instance_find(p_ble_evt->evt.gap_evt.conn_handle, + STATE_CONNECTED, + &index); + + if (err_code == NRF_SUCCESS) + { + handle.device_id = m_connection_table[index].bonded_dev_id; + handle.connection_id = index; + } + } + + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + //Allocate connection instance for a new connection. + err_code = connection_instance_allocate(&index); + + //Connection instance is successfully allocated. + if (err_code == NRF_SUCCESS) + { + //Application notification related information. + notify_app = true; + event.event_id = DM_EVT_CONNECTION; + handle.connection_id = index; + + m_connection_table[index].conn_handle = p_ble_evt->evt.gap_evt.conn_handle; + m_connection_table[index].state = STATE_CONNECTED; + m_connection_table[index].peer_addr = + p_ble_evt->evt.gap_evt.params.connected.peer_addr; + + if (p_ble_evt->evt.gap_evt.params.connected.irk_match == 1) + { + if (m_irk_index_table[p_ble_evt->evt.gap_evt.params.connected.irk_match_idx] != DM_INVALID_ID) + { + device_index = m_irk_index_table[p_ble_evt->evt.gap_evt.params.connected.irk_match_idx]; + err_code = NRF_SUCCESS; + } + } + else + { + //Use the device address to check if the device exists in the bonded device list. + err_code = device_instance_find(&p_ble_evt->evt.gap_evt.params.connected.peer_addr, + &device_index, EDIV_INIT_VAL); + } + + if (err_code == NRF_SUCCESS) + { + m_connection_table[index].bonded_dev_id = device_index; + m_connection_table[index].state |= STATE_BONDED; + handle.device_id = device_index; + + bond_data_load(&handle); + } + } + break; + + case BLE_GAP_EVT_DISCONNECTED: + //Disconnection could be peer or self initiated hence disconnecting and connecting + //both states are permitted, however, connection handle must be known. + DM_LOG("[DM]: Disconnect Reason 0x%04X\r\n", + p_ble_evt->evt.gap_evt.params.disconnected.reason); + + m_connection_table[index].state &= (~STATE_CONNECTED); + + if ((m_connection_table[index].state & STATE_BONDED) == STATE_BONDED) + { + if ((m_connection_table[index].state & STATE_LINK_ENCRYPTED) == STATE_LINK_ENCRYPTED) + { + //Write bond information persistently. + device_context_store(&handle, STORE_ALL_CONTEXT); + } + } + else + { + //Free any allocated instances for devices that is not bonded. + if (handle.device_id != DM_INVALID_ID) + { + peer_instance_init(handle.device_id); + handle.device_id = DM_INVALID_ID; + } + } + + m_connection_table[index].state = STATE_DISCONNECTING; + notify_app = true; + event.event_id = DM_EVT_DISCONNECTION; + + break; + + case BLE_GAP_EVT_SEC_INFO_REQUEST: + DM_LOG("[DM]: >> BLE_GAP_EVT_SEC_INFO_REQUEST\r\n"); + + //If the device is already bonded, respond with existing info, else NULL. + if (m_connection_table[index].bonded_dev_id == DM_INVALID_ID) + { + //Find device based on div. + err_code = device_instance_find(NULL,&device_index, p_ble_evt->evt.gap_evt.params.sec_info_request.master_id.ediv); + if (err_code == NRF_SUCCESS) + { + //Load needed bonding information. + m_connection_table[index].bonded_dev_id = device_index; + m_connection_table[index].state |= STATE_BONDED; + handle.device_id = device_index; + bond_data_load(&handle); + } + } + + if (m_connection_table[index].bonded_dev_id != DM_INVALID_ID) + { + p_enc_info = &m_bond_table[index].peer_enc_key.enc_info; + DM_DUMP((uint8_t *)p_enc_info, sizeof(ble_gap_enc_info_t)); + } + + err_code = sd_ble_gap_sec_info_reply(p_ble_evt->evt.gap_evt.conn_handle, + p_enc_info, + &m_peer_table[index].peer_id.id_info, + NULL); + + if (err_code != NRF_SUCCESS) + { + DM_ERR("[DM]:[CI %02X]:[DI %02X]: Security information response failed, reason " + "0x%08X\r\n", index, m_connection_table[index].bonded_dev_id, err_code); + } + break; + + case BLE_GAP_EVT_SEC_PARAMS_REQUEST: + DM_LOG("[DM]: >> BLE_GAP_EVT_SEC_PARAMS_REQUEST\r\n"); + + event.event_id = DM_EVT_SECURITY_SETUP; + + m_connection_table[index].state |= STATE_PAIRING; + notify_app = true; + + if (m_connection_table[index].bonded_dev_id == DM_INVALID_ID) + { + //Assign a peer index as a new bond or update existing bonds. + err_code = device_instance_allocate((uint8_t *)&device_index, + &m_connection_table[index].peer_addr); + + //Allocation successful. + if (err_code == NRF_SUCCESS) + { + DM_LOG("[DM]:[CI 0x%02X]:[DI 0x%02X]: Bonded!\r\n",index, device_index); + + handle.device_id = device_index; + m_connection_table[index].bonded_dev_id = device_index; + } + else + { + DM_LOG("[DM]: Security parameter request failed, reason 0x%08X.\r\n", err_code); + event_result = err_code; + notify_app = true; + } + + ble_gap_sec_keyset_t keys_exchanged; + + DM_LOG("[DM]: 0x%02X, 0x%02X, 0x%02X, 0x%02X\r\n", + p_ble_evt->evt.gap_evt.params.sec_params_request.peer_params.kdist_peer.enc, + p_ble_evt->evt.gap_evt.params.sec_params_request.peer_params.kdist_own.id, + p_ble_evt->evt.gap_evt.params.sec_params_request.peer_params.kdist_peer.sign, + p_ble_evt->evt.gap_evt.params.sec_params_request.peer_params.bond); + + keys_exchanged.keys_peer.p_enc_key = NULL; + keys_exchanged.keys_peer.p_id_key = &m_peer_table[m_connection_table[index].bonded_dev_id].peer_id; + keys_exchanged.keys_peer.p_sign_key = NULL; + keys_exchanged.keys_peer.p_pk = NULL; + keys_exchanged.keys_own.p_enc_key = &m_bond_table[index].peer_enc_key; + keys_exchanged.keys_own.p_id_key = NULL; + keys_exchanged.keys_own.p_sign_key = NULL; + keys_exchanged.keys_own.p_pk = NULL; + + err_code = sd_ble_gap_sec_params_reply(p_ble_evt->evt.gap_evt.conn_handle, + BLE_GAP_SEC_STATUS_SUCCESS, + &m_application_table[0].sec_param, + &keys_exchanged); + + if (err_code != NRF_SUCCESS) + { + DM_LOG("[DM]: Security parameter reply request failed, reason 0x%08X.\r\n", err_code); + event_result = err_code; + notify_app = false; + } + + } + else + { + //Bond/key refresh. + DM_LOG("[DM]: !!! Bond/key refresh !!!\r\n"); + //Set the update flag for bond data. + m_connection_table[index].state |= STATE_BOND_INFO_UPDATE; + event.event_id = DM_EVT_SECURITY_SETUP_REFRESH; + + err_code = sd_ble_gap_sec_params_reply(p_ble_evt->evt.gap_evt.conn_handle, + BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP, + NULL, + NULL); + + if (err_code != NRF_SUCCESS) + { + DM_LOG("[DM]: Security parameter reply request failed, reason 0x%08X.\r\n", err_code); + event_result = err_code; + notify_app = false; + } + + } + break; + + case BLE_GAP_EVT_AUTH_STATUS: + { + DM_LOG("[DM]: >> BLE_GAP_EVT_AUTH_STATUS, status %08X\r\n", + p_ble_evt->evt.gap_evt.params.auth_status.auth_status); + + m_application_table[0].state &= (~STATE_CONTROL_PROCEDURE_IN_PROGRESS); + m_connection_table[index].state &= (~STATE_PAIRING); + event.event_id = DM_EVT_SECURITY_SETUP_COMPLETE; + notify_app = true; + + if (p_ble_evt->evt.gap_evt.params.auth_status.auth_status != BLE_GAP_SEC_STATUS_SUCCESS) + { + // In case of key refresh attempt, since this behavior is now rejected, we don't do anything here + if ((m_connection_table[index].state & STATE_BOND_INFO_UPDATE) + != STATE_BOND_INFO_UPDATE) + { + // Free the allocation as bonding failed. + ret_code_t result = device_instance_free(m_connection_table[index].bonded_dev_id); + (void) result; + event_result = p_ble_evt->evt.gap_evt.params.auth_status.auth_status; + } + } + else + { + DM_DUMP((uint8_t *)&p_ble_evt->evt.gap_evt.params.auth_status, + sizeof(ble_gap_evt_auth_status_t)); + DM_DUMP((uint8_t *)&m_bond_table[index], sizeof(bond_context_t)); + + if (p_ble_evt->evt.gap_evt.params.auth_status.bonded == 1) + { + if (handle.device_id != DM_INVALID_ID) + { + m_connection_table[index].state |= STATE_BONDED; + + //IRK and/or public address is shared, update it. + if (p_ble_evt->evt.gap_evt.params.auth_status.kdist_peer.id == 1) + { + m_peer_table[handle.device_id].id_bitmap &= (~IRK_ENTRY); + } + + if (m_connection_table[index].bonded_dev_id != DM_INVALID_ID) + { + DM_LOG("[DM]:[CI 0x%02X]:[DI 0x%02X]: Bonded!\r\n", + index, + handle.device_id); + + if (m_connection_table[index].peer_addr.addr_type != + BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE) + { + m_peer_table[handle.device_id].peer_id.id_addr_info = + m_connection_table[index].peer_addr; + m_peer_table[handle.device_id].id_bitmap &= (~ADDR_ENTRY); + + DM_DUMP((uint8_t *)&m_peer_table[handle.device_id].peer_id.id_addr_info, + sizeof(m_peer_table[handle.device_id].peer_id.id_addr_info)); + } + else + { + // Here we must fetch the keys from the keyset distributed. + m_peer_table[handle.device_id].ediv = m_bond_table[index].peer_enc_key.master_id.ediv; + m_peer_table[handle.device_id].id_bitmap &= (~IRK_ENTRY); + } + + device_context_store(&handle, FIRST_BOND_STORE); + } + } + } + else + { + //Pairing request, no need to touch the bonding info. + } + } + break; + } + + case BLE_GAP_EVT_CONN_SEC_UPDATE: + DM_LOG("[DM]: >> BLE_GAP_EVT_CONN_SEC_UPDATE, Mode 0x%02X, Level 0x%02X\r\n", + p_ble_evt->evt.gap_evt.params.conn_sec_update.conn_sec.sec_mode.sm, + p_ble_evt->evt.gap_evt.params.conn_sec_update.conn_sec.sec_mode.lv); + + if ((p_ble_evt->evt.gap_evt.params.conn_sec_update.conn_sec.sec_mode.lv == 1) && + (p_ble_evt->evt.gap_evt.params.conn_sec_update.conn_sec.sec_mode.sm == 1) && + ((m_connection_table[index].state & STATE_BONDED) == STATE_BONDED)) + { + //Lost bond case, generate a security refresh event! + memset(m_gatts_table[index].attributes, 0, DM_GATT_SERVER_ATTR_MAX_SIZE); + + event.event_id = DM_EVT_SECURITY_SETUP_REFRESH; + m_connection_table[index].state |= STATE_PAIRING_PENDING; + m_connection_table[index].state |= STATE_BOND_INFO_UPDATE; + m_application_table[0].state |= STATE_QUEUED_CONTROL_REQUEST; + } + else + { + m_connection_table[index].state |= STATE_LINK_ENCRYPTED; + event.event_id = DM_EVT_LINK_SECURED; + + //Apply service context. + err_code = m_service_context_apply[m_application_table[0].service](&handle); + + if (err_code != NRF_SUCCESS) + { + DM_ERR("[DM]:[CI 0x%02X]:[DI 0x%02X]: Failed to apply service context\r\n", + handle.connection_id, + handle.device_id); + + event_result = DM_SERVICE_CONTEXT_NOT_APPLIED; + } + } + event_result = NRF_SUCCESS; + notify_app = true; + + break; + + case BLE_GATTS_EVT_SYS_ATTR_MISSING: + DM_LOG("[DM]: >> BLE_GATTS_EVT_SYS_ATTR_MISSING\r\n"); + + //Apply service context. + event_result = m_service_context_apply[m_application_table[0].service](&handle); + break; + + case BLE_GAP_EVT_SEC_REQUEST: + DM_LOG("[DM]: >> BLE_GAP_EVT_SEC_REQUEST\r\n"); + + //Verify if the device is already bonded, and if it is bonded, initiate encryption. + //If the device is not bonded, an instance needs to be allocated in order to initiate + //bonding. The application have to initiate the procedure, the module will not do this + //automatically. + event.event_id = DM_EVT_SECURITY_SETUP; + notify_app = true; + + break; + + default: + break; + } + + if (notify_app) + { + app_evt_notify(&handle, &event, event_result); + + //Freeing the instance after the event is notified so the application can get the context. + if (event.event_id == DM_EVT_DISCONNECTION) + { + //Free the instance. + connection_instance_free(&index); + } + } + + UNUSED_VARIABLE(err_code); + + DM_MUTEX_UNLOCK(); +} + + +ret_code_t dm_handle_get(uint16_t conn_handle, dm_handle_t * p_handle) +{ + ret_code_t err_code; + uint32_t index; + + NULL_PARAM_CHECK(p_handle); + VERIFY_APP_REGISTERED(p_handle->appl_id); + + p_handle->device_id = DM_INVALID_ID; + + err_code = NRF_ERROR_NOT_FOUND; + + for (index = 0; index < DEVICE_MANAGER_MAX_CONNECTIONS; index++) + { + //Search for matching connection handle. + if (conn_handle == m_connection_table[index].conn_handle) + { + p_handle->connection_id = index; + p_handle->device_id = m_connection_table[index].bonded_dev_id; + + err_code = NRF_SUCCESS; + break; + } + } + return err_code; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.c new file mode 100644 index 0000000000..fdd5a9b6a8 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.c @@ -0,0 +1,568 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#include "gatt_cache_manager.h" + +#include "ble_gap.h" +#include "ble_conn_state.h" +#include "peer_manager_types.h" +#include "peer_manager_internal.h" +#include "peer_database.h" +#include "id_manager.h" +#include "security_dispatcher.h" +#include "gatts_cache_manager.h" +#include "gattc_cache_manager.h" +#include "sdk_common.h" + +/**@brief Structure containing the module variable(s) of the GCM module. + */ +typedef struct +{ + gcm_evt_handler_t evt_handler; /**< The event handler to use for outbound GSCM events. */ + ble_conn_state_user_flag_id_t flag_id_local_db_update_pending; /**< Flag ID for flag collection to keep track of which connections need a local DB update procedure. */ + ble_conn_state_user_flag_id_t flag_id_local_db_apply_pending; /**< Flag ID for flag collection to keep track of which connections need a local DB apply procedure. */ + ble_conn_state_user_flag_id_t flag_id_service_changed_pending; /**< Flag ID for flag collection to keep track of which connections need to be sent a service changed indication. */ + ble_conn_state_user_flag_id_t flag_id_service_changed_sent; /**< Flag ID for flag collection to keep track of which connections have been sent a service changed indication and are waiting for a handle value confirmation. */ +} gcm_t; + +static gcm_t m_gcm; /**< Instantiation of module variable(s). */ + +#define MODULE_INITIALIZED (m_gcm.evt_handler != NULL) +#include "sdk_macros.h" + + +static void service_changed_pending_flags_check(void); + +/**@brief Function for resetting the module variable(s) of the GSCM module. + * + * @param[out] The instance to reset. + */ +static void internal_state_reset(gcm_t * p_gcm) +{ + memset(p_gcm, 0, sizeof(gcm_t)); +} + + +/**@brief Function for checking a write event for whether a CCCD was written during the write + * operation. + * + * @param[in] p_write_evt The parameters of the write event. + * + * @return Whether the write was on a CCCD. + */ +static bool cccd_written(ble_gatts_evt_write_t * p_write_evt) +{ + return ( (p_write_evt->op == BLE_GATTS_OP_WRITE_REQ) + && (p_write_evt->uuid.type == BLE_UUID_TYPE_BLE) + && (p_write_evt->uuid.uuid == BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG) + ); +} + + +/**@brief Function for performing the local DB update procedure in an event context, where no return + * code can be given. + * + * @details This function will do the procedure, and check the result, set a flag if needed, and + * send an event if needed. + * + * @param[in] conn_handle The connection to perform the procedure on. + */ +static void local_db_apply_in_evt(uint16_t conn_handle) +{ + bool set_procedure_as_pending = false; + ret_code_t err_code; + gcm_evt_t event; + + if (conn_handle == BLE_CONN_HANDLE_INVALID) + { + return; + } + + err_code = gscm_local_db_cache_apply(conn_handle); + + switch(err_code) + { + case NRF_SUCCESS: + event.evt_id = GCM_EVT_LOCAL_DB_CACHE_APPLIED; + event.peer_id = im_peer_id_get_by_conn_handle(conn_handle); + event.params.local_db_cache_applied.conn_handle = conn_handle; + + m_gcm.evt_handler(&event); + break; + + case NRF_ERROR_BUSY: + set_procedure_as_pending = true; + break; + + case NRF_ERROR_INVALID_DATA: + event.evt_id = GCM_EVT_ERROR_LOCAL_DB_CACHE_APPLY; + event.peer_id = im_peer_id_get_by_conn_handle(conn_handle); + event.params.error_local_db_cache_apply.conn_handle = conn_handle; + + m_gcm.evt_handler(&event); + break; + + case BLE_ERROR_INVALID_CONN_HANDLE: + /* Do nothing */ + break; + + default: + event.evt_id = GCM_EVT_ERROR_UNEXPECTED; + event.peer_id = im_peer_id_get_by_conn_handle(conn_handle); + event.params.error_unexpected.conn_handle = conn_handle; + event.params.error_unexpected.error = err_code; + + m_gcm.evt_handler(&event); + break; + } + + ble_conn_state_user_flag_set(conn_handle, m_gcm.flag_id_local_db_apply_pending, set_procedure_as_pending); +} + + +/**@brief Function for performing the local DB apply procedure in an event context, where no return + * code can be given. + * + * @details This function will do the procedure, and check the result, set a flag if needed, and + * send an event if needed. + * + * @param[in] conn_handle The connection to perform the procedure on. + */ +static void local_db_update_in_evt(uint16_t conn_handle) +{ + gcm_evt_t event; + bool set_procedure_as_pending = false; + ret_code_t err_code = gscm_local_db_cache_update(conn_handle); + + switch(err_code) + { + case NRF_SUCCESS: + event.evt_id = GCM_EVT_LOCAL_DB_CACHE_UPDATED; + event.params.local_db_cache_applied.conn_handle = conn_handle; + event.peer_id = im_peer_id_get_by_conn_handle(conn_handle); + + m_gcm.evt_handler(&event); + break; + + case BLE_ERROR_INVALID_CONN_HANDLE: + /* Do nothing */ + break; + + case NRF_ERROR_BUSY: + set_procedure_as_pending = true; + break; + + case NRF_ERROR_DATA_SIZE: + event.evt_id = GCM_EVT_ERROR_DATA_SIZE; + event.params.error_data_size.conn_handle = conn_handle; + event.peer_id = im_peer_id_get_by_conn_handle(conn_handle); + + m_gcm.evt_handler(&event); + break; + + case NRF_ERROR_NO_MEM: + event.evt_id = GCM_EVT_ERROR_STORAGE_FULL; + event.params.error_no_mem.conn_handle = conn_handle; + event.peer_id = im_peer_id_get_by_conn_handle(conn_handle); + + m_gcm.evt_handler(&event); + break; + + default: + event.evt_id = GCM_EVT_ERROR_UNEXPECTED; + event.peer_id = im_peer_id_get_by_conn_handle(conn_handle); + event.params.error_unexpected.conn_handle = conn_handle; + event.params.error_unexpected.error = err_code; + + m_gcm.evt_handler(&event); + break; + } + + ble_conn_state_user_flag_set(conn_handle, m_gcm.flag_id_local_db_update_pending, set_procedure_as_pending); +} + + +/**@brief Function for sending a service changed indication in an event context, where no return + * code can be given. + * + * @details This function will do the procedure, and check the result, set a flag if needed, and + * send an event if needed. + * + * @param[in] conn_handle The connection to perform the procedure on. + */ +static void service_changed_send_in_evt(uint16_t conn_handle) +{ + gcm_evt_t event; + bool sc_pending_state = true; + bool sc_sent_state = false; + ret_code_t err_code = gscm_service_changed_ind_send(conn_handle); + + switch(err_code) + { + case NRF_SUCCESS: + sc_sent_state = true; + + event.evt_id = GCM_EVT_SERVICE_CHANGED_IND_SENT; + event.peer_id = im_peer_id_get_by_conn_handle(conn_handle); + event.params.service_changed_ind_sent.conn_handle = conn_handle; + + m_gcm.evt_handler(&event); + break; + + case NRF_ERROR_BUSY: + // Do nothing. + break; + + case NRF_ERROR_INVALID_STATE: + // CCCDs not enabled. Drop indication. + // Fallthrough. + + case NRF_ERROR_NOT_SUPPORTED: + // Service changed not supported. Drop indication. + sc_pending_state = false; + gscm_db_change_notification_done(im_peer_id_get_by_conn_handle(conn_handle)); + break; + + case BLE_ERROR_GATTS_SYS_ATTR_MISSING: + local_db_apply_in_evt(conn_handle); + break; + + case BLE_ERROR_INVALID_CONN_HANDLE: + // Do nothing. + break; + + default: + event.evt_id = GCM_EVT_ERROR_UNEXPECTED; + event.params.error_unexpected.conn_handle = conn_handle; + event.params.error_unexpected.error = err_code; + event.peer_id = im_peer_id_get_by_conn_handle(conn_handle); + + m_gcm.evt_handler(&event); + break; + } + + ble_conn_state_user_flag_set(conn_handle, m_gcm.flag_id_service_changed_pending, sc_pending_state); + ble_conn_state_user_flag_set(conn_handle, m_gcm.flag_id_service_changed_sent, sc_sent_state); +} + + +/**@brief Callback function for events from the GATT Cache Server Manager module. + * + * @param[in] p_event The event from the GATT Cache Server Manager module. + */ +static void gscm_evt_handler(gscm_evt_t const * p_event) +{ + gcm_evt_t event; + event.peer_id = p_event->peer_id; + + switch (p_event->evt_id) + { + case GSCM_EVT_LOCAL_DB_CACHE_STORED: + event.evt_id = GCM_EVT_LOCAL_DB_CACHE_STORED; + + m_gcm.evt_handler(&event); + local_db_apply_in_evt(im_conn_handle_get(p_event->peer_id)); + break; + + case GSCM_EVT_LOCAL_DB_CACHE_UPDATED: + event.evt_id = GCM_EVT_LOCAL_DB_CACHE_UPDATED; + event.params.local_db_cache_updated.conn_handle = p_event->params.local_db_cache_updated.conn_handle; + + m_gcm.evt_handler(&event); + break; + + case GSCM_EVT_SC_STATE_STORED: + if (p_event->params.sc_state_stored.state) + { + uint16_t conn_handle = im_conn_handle_get(p_event->peer_id); + if (conn_handle != BLE_CONN_HANDLE_INVALID) + { + ble_conn_state_user_flag_set(conn_handle, m_gcm.flag_id_service_changed_pending, true); + service_changed_pending_flags_check(); + } + } + break; + } +} + + +/**@brief Callback function for events from the GATT Cache Client Manager module. + * + * @param[in] p_event The event from the GATT Cache Client Manager module. + */ +static void gccm_evt_handler(gccm_evt_t const * p_event) +{ + +} + + +/**@brief Callback function for events from the Identity Manager module. + * + * @param[in] p_event The event from the Identity Manager module. + */ +static void im_evt_handler(im_evt_t const * p_event) +{ + switch (p_event->evt_id) + { + case IM_EVT_BONDED_PEER_CONNECTED: + local_db_apply_in_evt(p_event->conn_handle); + if (gscm_service_changed_ind_needed(p_event->conn_handle)) + { + ble_conn_state_user_flag_set(p_event->conn_handle, m_gcm.flag_id_service_changed_pending, true); + } + break; + default: + break; + } +} + + +/**@brief Callback function for events from the Security Dispatcher module. + * + * @param[in] p_event The event from the Security Dispatcher module. + */ +static void smd_evt_handler(smd_evt_t const * p_event) +{ + switch (p_event->evt_id) + { + case SMD_EVT_BONDING_INFO_STORED: + local_db_update_in_evt(p_event->conn_handle); + break; + default: + break; + } +} + + +ret_code_t gcm_init(gcm_evt_handler_t evt_handler) +{ + VERIFY_PARAM_NOT_NULL(evt_handler); + + ret_code_t err_code; + + err_code = gscm_init(gscm_evt_handler); + VERIFY_SUCCESS(err_code); + + err_code = gccm_init(gccm_evt_handler); + VERIFY_SUCCESS(err_code); + + internal_state_reset(&m_gcm); + m_gcm.evt_handler = evt_handler; + + err_code = im_register(im_evt_handler); + VERIFY_SUCCESS(err_code); + + err_code = smd_register(smd_evt_handler); + VERIFY_SUCCESS(err_code); + + + m_gcm.flag_id_local_db_update_pending = ble_conn_state_user_flag_acquire(); + m_gcm.flag_id_local_db_apply_pending = ble_conn_state_user_flag_acquire(); + m_gcm.flag_id_service_changed_pending = ble_conn_state_user_flag_acquire(); + m_gcm.flag_id_service_changed_sent = ble_conn_state_user_flag_acquire(); + + if ((m_gcm.flag_id_local_db_update_pending == BLE_CONN_STATE_USER_FLAG_INVALID) + || (m_gcm.flag_id_local_db_apply_pending == BLE_CONN_STATE_USER_FLAG_INVALID) + || (m_gcm.flag_id_service_changed_pending == BLE_CONN_STATE_USER_FLAG_INVALID) + || (m_gcm.flag_id_service_changed_sent == BLE_CONN_STATE_USER_FLAG_INVALID)) + { + err_code = NRF_ERROR_INTERNAL; + } + + return err_code; +} + + +/**@brief Function for performing the Local DB apply procedure if it is pending on any connections. + */ +static void apply_pending_flags_check(void) +{ + sdk_mapped_flags_t apply_pending_flags; + + apply_pending_flags = ble_conn_state_user_flag_collection(m_gcm.flag_id_local_db_apply_pending); + if (sdk_mapped_flags_any_set(apply_pending_flags)) + { + sdk_mapped_flags_key_list_t conn_handle_list; + conn_handle_list = ble_conn_state_conn_handles(); + + for (uint32_t i = 0; i < conn_handle_list.len; i++) + { + if (ble_conn_state_user_flag_get(conn_handle_list.flag_keys[i], m_gcm.flag_id_local_db_apply_pending)) + { + local_db_apply_in_evt(conn_handle_list.flag_keys[i]); + } + } + } +} + + +/**@brief Function for performing the Local DB update procedure if it is pending on any connections. + */ +static void update_pending_flags_check(void) +{ + sdk_mapped_flags_t update_pending_flags; + + update_pending_flags = ble_conn_state_user_flag_collection(m_gcm.flag_id_local_db_update_pending); + if (sdk_mapped_flags_any_set(update_pending_flags)) + { + sdk_mapped_flags_key_list_t conn_handle_list; + conn_handle_list = ble_conn_state_conn_handles(); + + for (uint32_t i = 0; i < conn_handle_list.len; i++) + { + if (ble_conn_state_user_flag_get(conn_handle_list.flag_keys[i], m_gcm.flag_id_local_db_update_pending)) + { + local_db_update_in_evt(conn_handle_list.flag_keys[i]); + } + } + } +} + + +/**@brief Function for sending service changed indications if it is pending on any connections. + */ +static void service_changed_pending_flags_check(void) +{ + sdk_mapped_flags_t service_changed_pending_flags; + + service_changed_pending_flags = ble_conn_state_user_flag_collection(m_gcm.flag_id_service_changed_pending); + if (sdk_mapped_flags_any_set(service_changed_pending_flags)) + { + sdk_mapped_flags_key_list_t conn_handle_list; + conn_handle_list = ble_conn_state_conn_handles(); + + for (uint32_t i = 0; i < conn_handle_list.len; i++) + { + if ( ble_conn_state_user_flag_get(conn_handle_list.flag_keys[i], + m_gcm.flag_id_service_changed_pending) + && !ble_conn_state_user_flag_get(conn_handle_list.flag_keys[i], + m_gcm.flag_id_service_changed_sent)) + { + service_changed_send_in_evt(conn_handle_list.flag_keys[i]); + } + } + } +} + + +/**@brief Callback function for BLE events from the SoftDevice. + * + * @param[in] p_ble_evt The BLE event from the SoftDevice. + */ +void gcm_ble_evt_handler(ble_evt_t * p_ble_evt) +{ + gcm_evt_t event; + + switch(p_ble_evt->header.evt_id) + { + case BLE_GATTS_EVT_SYS_ATTR_MISSING: + local_db_apply_in_evt(p_ble_evt->evt.gatts_evt.conn_handle); + break; + + case BLE_GATTS_EVT_SC_CONFIRM: + event.evt_id = GCM_EVT_SERVICE_CHANGED_IND_CONFIRMED; + event.peer_id = im_peer_id_get_by_conn_handle(p_ble_evt->evt.gatts_evt.conn_handle); + event.params.service_changed_ind_sent.conn_handle = p_ble_evt->evt.gatts_evt.conn_handle; + + gscm_db_change_notification_done(event.peer_id); + ble_conn_state_user_flag_set(p_ble_evt->evt.gatts_evt.conn_handle, m_gcm.flag_id_service_changed_pending, false); + + m_gcm.evt_handler(&event); + break; + + case BLE_GATTS_EVT_WRITE: + if (cccd_written(&p_ble_evt->evt.gatts_evt.params.write)) + { + local_db_update_in_evt(p_ble_evt->evt.gatts_evt.conn_handle); + } + break; + } + + apply_pending_flags_check(); + update_pending_flags_check(); + service_changed_pending_flags_check(); +} + + +ret_code_t gcm_remote_db_store(pm_peer_id_t peer_id, + ble_gatt_db_srv_t * p_remote_db, + uint32_t n_services) +{ + VERIFY_MODULE_INITIALIZED(); + + return gccm_remote_db_store(peer_id, p_remote_db, n_services); +} + + +ret_code_t gcm_remote_db_retrieve(pm_peer_id_t peer_id, + ble_gatt_db_srv_t * p_remote_db, + uint32_t * p_n_services) +{ + VERIFY_MODULE_INITIALIZED(); + VERIFY_PARAM_NOT_NULL(p_remote_db); + + return gccm_remote_db_retrieve(peer_id, p_remote_db, p_n_services); +} + + +ret_code_t gcm_local_db_cache_update(uint16_t conn_handle) +{ + VERIFY_MODULE_INITIALIZED(); + + ret_code_t err_code = gscm_local_db_cache_update(conn_handle); + bool set_procedure_as_pending = false; + + if (err_code == NRF_ERROR_BUSY) + { + set_procedure_as_pending = true; + err_code = NRF_SUCCESS; + } + + ble_conn_state_user_flag_set(conn_handle, m_gcm.flag_id_local_db_update_pending, set_procedure_as_pending); + + return err_code; +} + + +ret_code_t gcm_local_db_cache_set(pm_peer_id_t peer_id, pm_peer_data_local_gatt_db_t * p_local_db) +{ + VERIFY_MODULE_INITIALIZED(); + + return gscm_local_db_cache_set(peer_id, p_local_db); +} + + +ret_code_t gcm_local_db_cache_get(pm_peer_id_t peer_id, pm_peer_data_local_gatt_db_t * p_local_db) +{ + VERIFY_MODULE_INITIALIZED(); + + return gscm_local_db_cache_get(peer_id, p_local_db); +} + + +void gcm_local_database_has_changed(void) +{ + gscm_local_database_has_changed(); + + sdk_mapped_flags_key_list_t conn_handles = ble_conn_state_conn_handles(); + + for (uint16_t i = 0; i < conn_handles.len; i++) + { + if (im_peer_id_get_by_conn_handle(conn_handles.flag_keys[i]) == PM_PEER_ID_INVALID) + { + ble_conn_state_user_flag_set(conn_handles.flag_keys[i], m_gcm.flag_id_service_changed_pending, true); + } + } + + service_changed_pending_flags_check(); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.h new file mode 100644 index 0000000000..1464563263 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.h @@ -0,0 +1,209 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#ifndef GATT_CACHE_MANAGER_H__ +#define GATT_CACHE_MANAGER_H__ + +#include +#include "sdk_errors.h" +#include "ble.h" +#include "ble_gap.h" +#include "peer_manager_types.h" + + + +/** + * @cond NO_DOXYGEN + * @defgroup gatt_cache_manager GATT Cache Manager + * @ingroup peer_manager + * @{ + * @brief An internal module of @ref peer_manager. A module for managing persistent storing of GATT + * attributes. + */ + + +/**@brief Events that can come from the GATT Cache Manager module. + */ +typedef enum +{ + GCM_EVT_LOCAL_DB_CACHE_STORED, /**< The persistent cache for the local database has been updated with provided values, for one peer. */ + GCM_EVT_LOCAL_DB_CACHE_UPDATED, /**< The persistent cache for the local database has been updated with values from the SoftDevice, for one peer. */ + GCM_EVT_LOCAL_DB_CACHE_APPLIED, /**< The SoftDevice has been given local database values from the persistent cache, for one peer. */ + GCM_EVT_ERROR_LOCAL_DB_CACHE_APPLY, /**< The stored local database values for a peer were rejected by the SoftDevice, which means the database has changed. */ + GCM_EVT_REMOTE_DB_CACHE_UPDATED, /**< The persistent cache for the remote database has been updated with provided values, for one peer. */ + GCM_EVT_SERVICE_CHANGED_IND_SENT, /**< A service changed indication has been sent to a peer. */ + GCM_EVT_SERVICE_CHANGED_IND_CONFIRMED, /**< A sent service changed indication has been confirmed by a peer. */ + GCM_EVT_ERROR_DATA_SIZE, /**< An operation failed because the write buffer of the Peer Database module was not large enough. This is a fatal error. */ + GCM_EVT_ERROR_STORAGE_FULL, /**< An operation failed because there was no available storage room in persistent storage. Please free up room, and the operation will automatically continue. */ + GCM_EVT_ERROR_UNEXPECTED, /**< An operation failed with an unexpected error. The error is provided. This is possibly a fatal error. */ +} gcm_evt_id_t; + + +/**@brief A structure meant to be used for event parameters for multiple event types. + */ +typedef struct +{ + uint16_t conn_handle; /**< The connection handle. Likely the connection handle an event pertains to. */ +} gcm_evt_param_conn_handle_t; + + +/**@brief Structure containing an event from the GCM module. + */ +typedef struct +{ + gcm_evt_id_t evt_id; /**< The type of event this is. */ + pm_peer_id_t peer_id; /**< The peer ID this event pertains to. */ + union + { + gcm_evt_param_conn_handle_t local_db_cache_updated; + gcm_evt_param_conn_handle_t local_db_cache_applied; + gcm_evt_param_conn_handle_t error_local_db_cache_apply; + gcm_evt_param_conn_handle_t service_changed_ind_sent; + gcm_evt_param_conn_handle_t service_changed_ind_confirmed; + gcm_evt_param_conn_handle_t error_data_size; + gcm_evt_param_conn_handle_t error_no_mem; + struct + { + uint16_t conn_handle; /**< The handle of the connection the event pertains to. */ + ret_code_t error; /**< The unexpected error that occurred. */ + } error_unexpected; + } params; /**< Event specific parameters. Chosen based on evt_id. */ +} gcm_evt_t; + +/**@brief Event handler for events from the GATT Cache Manager module. + * + * @param[in] event The event that has happened. + * @param[in] peer The id of the peer the event pertains to. + * @param[in] flags The data the event pertains to. + */ +typedef void (*gcm_evt_handler_t)(gcm_evt_t const * p_event); + + +/**@brief Function for initializing the GATT Cache Manager module. + * + * @param[in] evt_handler Callback for events from the GATT Cache Manager module. + * + * @retval NRF_SUCCESS Initialization was successful. + * @retval NRF_ERROR_NULL evt_handler was NULL. + */ +ret_code_t gcm_init(gcm_evt_handler_t evt_handler); + + +/**@brief Function for dispatching SoftDevice events to the GATT Cache Manager module. + * + * @param[in] p_ble_evt The SoftDevice event. + */ +void gcm_ble_evt_handler(ble_evt_t * p_ble_evt); + + + +/**@brief Function for storing a discovered remote database persistently. + * + * @param[in] peer_id Peer to store the database for. + * @param[in] p_remote_db Database values to store as an array. Can be NULL if n_services is 0. + * @param[in] n_services Number of services in p_remote_db array. If 0, values are cleared. + * + * @retval NRF_SUCCESS Store procedure successfully started. + * @retval NRF_ERROR_NOT_FOUND The peer id is invalid or unallocated. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + */ +ret_code_t gcm_remote_db_store(pm_peer_id_t peer_id, + ble_gatt_db_srv_t * p_remote_db, + uint32_t n_services); + + +/**@brief Function for retrieving a persistently stored remote database. + * + * @param[in] peer_id Peer to retrieve data for. + * @param[out] p_remote_db If p_n_services was large enough: Copied database values. + * @param[inout] p_n_services In: Size of provided p_remote_db array. Out: Size of data in flash. + * + * @note p_n_services is always updated with the size of the data to be retrieved. The data is only + * copied if p_remote_db is large enough (p_n_services is large enough initially). + * + * @retval NRF_SUCCESS Data retrieved successfully. + * @retval NRF_ERROR_NOT_FOUND The peer ID is invalid or unallocated. + * @retval NRF_ERROR_NULL p_remote_db is NULL. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + */ +ret_code_t gcm_remote_db_retrieve(pm_peer_id_t peer_id, + ble_gatt_db_srv_t * p_remote_db, + uint32_t * p_n_services); + + +/**@brief Function for triggering local GATT database data to be stored persistently. Values are + * retrieved from SoftDevice and written to persistent storage. + * + * @note This function is only needed when you want to override the regular functionality of the + * module, e.g. to immediately store to flash instead of waiting for the native logic to + * perform the update. + * + * @param[in] conn_handle Connection handle to perform update on. + * + * @retval NRF_SUCCESS Store operation started. + * @retval BLE_ERROR_INVALID_CONN_HANDLE conn_handle does not refer to an active, bonded connection. + * @retval NRF_ERROR_DATA_SIZE Write buffer not large enough. Call will never work with + * this GATT database. + * @retval NRF_ERROR_NO_MEM No room in persistent_storage. Free up space; the + * operation will be automatically reattempted after the + * next compression procedure + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + */ +ret_code_t gcm_local_db_cache_update(uint16_t conn_handle); + + +/**@brief Function for setting new values in the local database cache. + * + * @note If the peer is connected, the values will also be applied immediately to the connection. + * @note This function is only needed when you want to override the regular functionality of the + * module. + * @note The data in the pointer must be available until the GCM_EVT_LOCAL_DB_CACHE_SET event is + * received. + * + * @param[in] peer_id Peer to set values for. + * @param[in] p_local_db Database values to apply. If NULL, the values will instead be cleared. + * + * @retval NRF_SUCCESS Operation started, and values were applied (if connected). + * @retval NRF_ERROR_NOT_FOUND The peer ID was invalid or unallocated. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + */ +ret_code_t gcm_local_db_cache_set(pm_peer_id_t peer_id, pm_peer_data_local_gatt_db_t * p_local_db); + + +/**@brief Function for retrieving values in the local database cache. + * + * @note This function is not needed for regular operation of the module. + * + * @param[in] peer_id Peer to get values for. + * @param[out] p_local_db Database values. + * + * @retval NRF_SUCCESS Values retrieved successfully. + * @retval NRF_ERROR_NOT_FOUND The peer ID was invalid or unallocated. + * @retval NRF_ERROR_NULL p_local_db was NULL. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + */ +ret_code_t gcm_local_db_cache_get(pm_peer_id_t peer_id, pm_peer_data_local_gatt_db_t * p_local_db); + + +/**@brief Function for manually informing that the local database has changed. + * + * @details This causes a service changed notification to be sent to all bonded peers that + * subscribe to it. + */ +void gcm_local_database_has_changed(void); + +/** @} + * @endcond + */ + +#endif /* GATT_CACHE_MANAGER_H__ */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.c new file mode 100644 index 0000000000..095921de11 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.c @@ -0,0 +1,112 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#include "gattc_cache_manager.h" + +#include "ble_gap.h" +#include "ble_conn_state.h" +#include "peer_manager_types.h" +#include "peer_database.h" +#include "id_manager.h" +#include "sdk_common.h" + +#define MAX_SIMUL_SEC_PROCEDURES 2 + +typedef struct +{ + gccm_evt_handler_t evt_handler; +} gccm_t; + +static gccm_t m_gccm; + +#define MODULE_INITIALIZED (m_gccm.evt_handler != NULL) +#include "sdk_macros.h" + +static void internal_state_reset(gccm_t * gccm) +{ + memset(gccm, 0, sizeof(gccm_t)); +} + + +/**@brief Event handler for events from the peer_database module. + * + * @param[in] p_event The event that has happend with peer id and flags. + */ +static void pdb_evt_handler(pdb_evt_t const * p_event) +{ + gccm_evt_t gccm_evt; + gccm_evt.evt_id = GCCM_EVT_REMOTE_DB_STORED; + gccm_evt.peer_id = p_event->peer_id; + m_gccm.evt_handler(&gccm_evt); +} + + +ret_code_t gccm_init(gccm_evt_handler_t evt_handler) +{ + ret_code_t err_code; + if (evt_handler == NULL) + { + err_code = NRF_ERROR_NULL; + } + else + { + err_code = pdb_register(pdb_evt_handler); + if (err_code == NRF_SUCCESS) + { + internal_state_reset(&m_gccm); + m_gccm.evt_handler = evt_handler; + } + } + return err_code; +} + + +ret_code_t gccm_remote_db_store(pm_peer_id_t peer_id, + ble_gatt_db_srv_t * p_remote_db, + uint32_t n_services) +{ + VERIFY_MODULE_INITIALIZED(); + VERIFY_PARAM_NOT_NULL(p_remote_db); + + // Initialize the peer_data + pm_peer_data_const_t peer_data; + memset(&peer_data, 0, sizeof(peer_data)); + peer_data.data_id = PM_PEER_DATA_ID_GATT_REMOTE; + peer_data.p_remote_gatt_db = p_remote_db; + peer_data.length_words = PM_REMOTE_DB_N_WORDS(n_services); + + return pdb_raw_store(peer_id, &peer_data, NULL); +} + + +ret_code_t gccm_remote_db_retrieve(pm_peer_id_t peer_id, + ble_gatt_db_srv_t * p_remote_db, + uint32_t * p_n_services) +{ + VERIFY_MODULE_INITIALIZED(); + VERIFY_PARAM_NOT_NULL(p_remote_db); + VERIFY_PARAM_NOT_NULL(p_n_services); + + // Initialize the peer_data + pm_peer_data_t peer_data; + memset(&peer_data, 0, sizeof(peer_data)); + peer_data.data_id = PM_PEER_DATA_ID_GATT_REMOTE; + peer_data.p_remote_gatt_db = p_remote_db; + peer_data.length_words = PM_REMOTE_DB_N_WORDS(*p_n_services); + + ret_code_t err_code = pdb_raw_read(peer_id, PM_PEER_DATA_ID_GATT_REMOTE, &peer_data); + + *p_n_services = PM_REMOTE_DB_N_SERVICES(peer_data.length_words); + + return err_code; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.h new file mode 100644 index 0000000000..c095a6d069 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.h @@ -0,0 +1,105 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#ifndef GATTC_CACHE_MANAGER_H__ +#define GATTC_CACHE_MANAGER_H__ + +#include +#include "sdk_errors.h" +#include "ble.h" +#include "ble_gap.h" +#include "peer_manager_types.h" + + +/** + * @cond NO_DOXYGEN + * @defgroup gattc_cache_manager GATT Client Cache Manager + * @ingroup peer_manager + * @{ + * @brief An internal module of @ref peer_manager. A module for managing persistent storing of GATT + * attributes pertaining to the GATT client role of the local device. + */ + + +/**@brief Events that can come from the GATT Cache Manager module. + */ +typedef enum +{ + GCCM_EVT_REMOTE_DB_UPDATED, /**< Values for the specified data has been updated in persistent storage. */ + GCCM_EVT_REMOTE_DB_STORED, /**< New values for the specified data has been written in persistent storage. */ +} gccm_evt_id_t; + + +typedef struct +{ + gccm_evt_id_t evt_id; + pm_peer_id_t peer_id; +} gccm_evt_t; + +/**@brief Event handler for events from the GATT Client Cache Manager module. + * + * @param[in] event The event that has happened. + * @param[in] peer The id of the peer the event pertains to. + * @param[in] flags The data the event pertains to. + */ +typedef void (*gccm_evt_handler_t)(gccm_evt_t const * p_event); + + +/**@brief Function for initializing the GATT Client Cache Manager module. + * + * @param[in] evt_handler Callback for events from the GATT Client Cache Manager module. + * + * @retval NRF_SUCCESS Initialization was successful. + * @retval NRF_ERROR_NULL evt_handler was NULL. + */ +ret_code_t gccm_init(gccm_evt_handler_t evt_handler); + + +/**@brief Function for storing a discovered remote database persistently. + * + * @param[in] peer_id Peer to store the database for. + * @param[in] p_remote_db Database values to store as an array. Can be NULL if n_services is 0. + * @param[in] n_services Number of services in p_remote_db array. If 0, values are cleared. + * + * @retval NRF_SUCCESS Store procedure successfully started. + * @retval NRF_ERROR_NOT_FOUND The peer id is invalid or unallocated. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + */ +ret_code_t gccm_remote_db_store(pm_peer_id_t peer_id, + ble_gatt_db_srv_t * p_remote_db, + uint32_t n_services); + + +/**@brief Function for retrieving a persistently stored remote database. + * + * @param[in] peer_id Peer to retrieve data for. + * @param[out] p_remote_db If p_n_services was large enough: Copied database values. + * @param[inout] p_n_services In: Size of provided p_remote_db array. Out: Size of data in flash. + * + * @note p_n_services is always updated with the size of the data to be retrieved. The data is only + * copied if p_remote_db is large enough (p_n_services is large enough initially). + * + * @retval NRF_SUCCESS Data retrieved successfully. + * @retval NRF_ERROR_NOT_FOUND The peer ID is invalid or unallocated. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + */ +ret_code_t gccm_remote_db_retrieve(pm_peer_id_t peer_id, + ble_gatt_db_srv_t * p_remote_db, + uint32_t * p_n_services); + + +/** @} + * @endcond + */ + +#endif /* GATTC_CACHE_MANAGER_H__ */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.c new file mode 100644 index 0000000000..19c46327a5 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.c @@ -0,0 +1,369 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#include "gatts_cache_manager.h" + +#include +#include "ble_gap.h" +#include "ble_conn_state.h" +#include "peer_manager_types.h" +#include "peer_manager_internal.h" +#include "peer_database.h" +#include "id_manager.h" +#include "sdk_common.h" + +#define SYS_ATTR_SYS (BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS) /**< Shorthand define for the flag for system attributes. */ +#define SYS_ATTR_USR (BLE_GATTS_SYS_ATTR_FLAG_USR_SRVCS) /**< Shorthand define for the flag for user attributes. */ +#define SYS_ATTR_BOTH (SYS_ATTR_SYS | SYS_ATTR_USR) /**< Shorthand define for the combined flags for system and user attributes. */ + + +/**@brief Structure containing the module variable(s) of the GSCM module. + */ +typedef struct +{ + gscm_evt_handler_t evt_handler; /**< The event handler to use for outbound GSCM events. */ + pm_peer_id_t current_sc_store_peer_id; +} gscm_t; + +static gscm_t m_gscm = +{ + .current_sc_store_peer_id = PM_PEER_ID_INVALID, +}; /**< Instantiation of module variable(s). */ + +#define MODULE_INITIALIZED (m_gscm.evt_handler != NULL) +#include "sdk_macros.h" + + +/**@brief Function for resetting the module variable(s) of the GSCM module. + * + * @param[out] p_gscm The instance to reset. + */ +static void internal_state_reset(gscm_t * p_gscm) +{ + memset(p_gscm, 0, sizeof(gscm_t)); + p_gscm->current_sc_store_peer_id = PM_PEER_ID_INVALID; +} + + +//lint -save -e550 +/**@brief Function for storing service_changed_pending = true to flash for all peers, in sequence. + * + * This function aborts if it gets @ref NRF_ERROR_BUSY when trying to store. A subsequent call will + * continue where the last call was aborted. + */ +static void service_changed_pending_set(void) +{ + VERIFY_MODULE_INITIALIZED_VOID(); + static const bool service_changed_pending = true; + ret_code_t err_code; + + //lint -save -e65 -e64 + pm_peer_data_const_t peer_data = + { + .data_id = PM_PEER_DATA_ID_SERVICE_CHANGED_PENDING, + .length_words = PM_SC_STATE_N_WORDS(), + .p_service_changed_pending = &service_changed_pending, + }; + //lint -restore + + err_code = pdb_raw_store(m_gscm.current_sc_store_peer_id, &peer_data, NULL); + while((m_gscm.current_sc_store_peer_id != PM_PEER_ID_INVALID) && (err_code != NRF_ERROR_BUSY)) + { + m_gscm.current_sc_store_peer_id = pdb_next_peer_id_get(m_gscm.current_sc_store_peer_id); + err_code = pdb_raw_store(m_gscm.current_sc_store_peer_id, &peer_data, NULL); + } +} +//lint -restore + + + +/**@brief Event handler for events from the peer_database module. + * + * @param[in] p_event The event that has happend with peer id and flags. + */ +static void pdb_evt_handler(pdb_evt_t const * p_event) +{ + if (p_event->evt_id == PDB_EVT_RAW_STORED) + { + if (p_event->data_id == PM_PEER_DATA_ID_SERVICE_CHANGED_PENDING) + { + ret_code_t err_code; + pm_peer_data_flash_t peer_data; + + err_code = pdb_read_buf_get(p_event->peer_id, PM_PEER_DATA_ID_SERVICE_CHANGED_PENDING, &peer_data, NULL); + + if (err_code == NRF_SUCCESS) + { + gscm_evt_t gscm_evt; + gscm_evt.evt_id = GSCM_EVT_SC_STATE_STORED; + gscm_evt.peer_id = p_event->peer_id; + gscm_evt.params.sc_state_stored.state = &peer_data.p_service_changed_pending; + + m_gscm.evt_handler(&gscm_evt); + } + } + } + + if (m_gscm.current_sc_store_peer_id != PM_PEER_ID_INVALID) + { + service_changed_pending_set(); + } +} + + +ret_code_t gscm_init(gscm_evt_handler_t evt_handler) +{ + ret_code_t err_code; + if (evt_handler == NULL) + { + err_code = NRF_ERROR_NULL; + } + else + { + err_code = pdb_register(pdb_evt_handler); + if (err_code == NRF_SUCCESS) + { + internal_state_reset(&m_gscm); + m_gscm.evt_handler = evt_handler; + } + } + return err_code; +} + + +ret_code_t gscm_local_db_cache_update(uint16_t conn_handle) +{ + VERIFY_MODULE_INITIALIZED(); + + pm_peer_id_t peer_id = im_peer_id_get_by_conn_handle(conn_handle); + ret_code_t err_code; + + if (peer_id == PM_PEER_ID_INVALID) + { + return BLE_ERROR_INVALID_CONN_HANDLE; + } + else + { + pm_peer_data_t peer_data; + uint16_t n_bufs = 1; + bool retry_with_bigger_buffer = false; + + do + { + retry_with_bigger_buffer = false; + + err_code = pdb_write_buf_get(peer_id, PM_PEER_DATA_ID_GATT_LOCAL, n_bufs++, &peer_data); + if (err_code == NRF_SUCCESS) + { + pm_peer_data_local_gatt_db_t * p_local_gatt_db = peer_data.p_local_gatt_db; + + p_local_gatt_db->flags = SYS_ATTR_BOTH; + + err_code = sd_ble_gatts_sys_attr_get(conn_handle, &p_local_gatt_db->data[0], &p_local_gatt_db->len, p_local_gatt_db->flags); + + if (err_code == NRF_SUCCESS) + { + err_code = pdb_write_buf_store(peer_id, PM_PEER_DATA_ID_GATT_LOCAL); + } + else + { + if (err_code == NRF_ERROR_DATA_SIZE) + { + // The sys attributes are bigger than the requested write buffer. + retry_with_bigger_buffer = true; + } + else if (err_code == NRF_ERROR_NOT_FOUND) + { + // There are no sys attributes in the GATT db, so nothing needs to be stored. + err_code = NRF_SUCCESS; + } + + ret_code_t err_code_release = pdb_write_buf_release(peer_id, PM_PEER_DATA_ID_GATT_LOCAL); + if (err_code_release != NRF_SUCCESS) + { + err_code = NRF_ERROR_INTERNAL; + } + } + } + else if (err_code == NRF_ERROR_INVALID_PARAM) + { + // The sys attributes are bigger than the entire write buffer. + err_code = NRF_ERROR_DATA_SIZE; + } + } while (retry_with_bigger_buffer); + } + + return err_code; +} + + +ret_code_t gscm_local_db_cache_apply(uint16_t conn_handle) +{ + VERIFY_MODULE_INITIALIZED(); + + pm_peer_id_t peer_id = im_peer_id_get_by_conn_handle(conn_handle); + ret_code_t err_code; + pm_peer_data_flash_t peer_data; + uint8_t const * p_sys_attr_data = NULL; + uint16_t sys_attr_len = 0; + uint32_t sys_attr_flags = (SYS_ATTR_BOTH); + bool all_attributes_applied = true; + + if (peer_id != PM_PEER_ID_INVALID) + { + err_code = pdb_read_buf_get(peer_id, PM_PEER_DATA_ID_GATT_LOCAL, &peer_data, NULL); + if (err_code == NRF_SUCCESS) + { + pm_peer_data_local_gatt_db_t const * p_local_gatt_db; + + p_local_gatt_db = peer_data.p_local_gatt_db; + p_sys_attr_data = p_local_gatt_db->data; + sys_attr_len = p_local_gatt_db->len; + sys_attr_flags = p_local_gatt_db->flags; + } + } + + do + { + err_code = sd_ble_gatts_sys_attr_set(conn_handle, p_sys_attr_data, sys_attr_len, sys_attr_flags); + + if (err_code == NRF_ERROR_NO_MEM) + { + err_code = NRF_ERROR_BUSY; + } + else if (err_code == NRF_ERROR_INVALID_STATE) + { + err_code = NRF_SUCCESS; + } + else if (err_code == NRF_ERROR_INVALID_DATA) + { + all_attributes_applied = false; + + if (sys_attr_flags & SYS_ATTR_USR) + { + // Try setting only system attributes. + sys_attr_flags = SYS_ATTR_SYS; + } + else if (p_sys_attr_data || sys_attr_len) + { + // Try reporting that none exist. + p_sys_attr_data = NULL; + sys_attr_len = 0; + sys_attr_flags = SYS_ATTR_BOTH; + } + else + { + err_code = NRF_ERROR_INTERNAL; + } + } + } while (err_code == NRF_ERROR_INVALID_DATA); + + if (!all_attributes_applied) + { + err_code = NRF_ERROR_INVALID_DATA; + } + + return err_code; +} + + +ret_code_t gscm_local_db_cache_set(pm_peer_id_t peer_id, pm_peer_data_local_gatt_db_t * p_local_db) +{ + VERIFY_MODULE_INITIALIZED(); + + pm_peer_data_const_t peer_data; + + memset(&peer_data, 0, sizeof(pm_peer_data_const_t)); + peer_data.data_id = PM_PEER_DATA_ID_GATT_LOCAL; + peer_data.p_local_gatt_db = p_local_db; + + return pdb_raw_store(peer_id, &peer_data, NULL); +} + + +ret_code_t gscm_local_db_cache_get(pm_peer_id_t peer_id, pm_peer_data_local_gatt_db_t * p_local_db) +{ + VERIFY_MODULE_INITIALIZED(); + + pm_peer_data_t peer_data; + memset(&peer_data, 0, sizeof(pm_peer_data_t)); + peer_data.p_local_gatt_db = p_local_db; + + return pdb_raw_read(peer_id, PM_PEER_DATA_ID_GATT_LOCAL, &peer_data); +} + + +void gscm_local_database_has_changed(void) +{ + VERIFY_MODULE_INITIALIZED_VOID(); + m_gscm.current_sc_store_peer_id = pdb_next_peer_id_get(PM_PEER_ID_INVALID); + service_changed_pending_set(); +} + + +bool gscm_service_changed_ind_needed(uint16_t conn_handle) +{ + ret_code_t err_code; + pm_peer_data_flash_t peer_data; + pm_peer_id_t peer_id = im_peer_id_get_by_conn_handle(conn_handle); + + err_code = pdb_read_buf_get(peer_id, PM_PEER_DATA_ID_SERVICE_CHANGED_PENDING, &peer_data, NULL); + + if (err_code != NRF_SUCCESS) + { + return false; + } + + return &peer_data.p_service_changed_pending; +} + + +ret_code_t gscm_service_changed_ind_send(uint16_t conn_handle) +{ + static uint16_t start_handle = 0x0000; + const uint16_t end_handle = 0xFFFF; + ret_code_t err_code; + + do + { + err_code = sd_ble_gatts_service_changed(conn_handle, start_handle, end_handle); + if (err_code == BLE_ERROR_INVALID_ATTR_HANDLE) + { + start_handle += 1; + } + } while (err_code == BLE_ERROR_INVALID_ATTR_HANDLE); + + return err_code; +} + + +void gscm_db_change_notification_done(pm_peer_id_t peer_id) +{ + VERIFY_MODULE_INITIALIZED_VOID(); + + static const bool service_changed_pending = false; + + //lint -save -e65 -e64 + pm_peer_data_const_t peer_data = + { + .data_id = PM_PEER_DATA_ID_SERVICE_CHANGED_PENDING, + .length_words = PM_SC_STATE_N_WORDS(), + .p_service_changed_pending = &service_changed_pending, + }; + //lint -restore + + // Don't need to check return code, because all error conditions can be ignored. + //lint -save -e550 + (void) pdb_raw_store(peer_id, &peer_data, NULL); + //lint -restore +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.h new file mode 100644 index 0000000000..505fe25a9e --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.h @@ -0,0 +1,201 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#ifndef GATTS_CACHE_MANAGER_H__ +#define GATTS_CACHE_MANAGER_H__ + +#include +#include "sdk_errors.h" +#include "ble.h" +#include "ble_gap.h" +#include "peer_manager_types.h" + + + +/** + * @cond NO_DOXYGEN + * @defgroup gatts_cache_manager GATT Server Cache Manager + * @ingroup peer_manager + * @{ + * @brief An internal module of @ref peer_manager. A module for managing persistent storing of GATT + * attributes pertaining to the GATT server role of the local device. + */ + + +/**@brief Events that can come from the GATT Server Cache Manager module. + */ +typedef enum +{ + GSCM_EVT_LOCAL_DB_CACHE_STORED, /**< The persistent cache for the local database has been updated with provided values, for one peer. */ + GSCM_EVT_LOCAL_DB_CACHE_UPDATED, /**< The persistent cache for the local database has been updated with values from the SoftDevice, for one peer. */ + GSCM_EVT_SC_STATE_STORED, /**< The service changed pending flag in persistent storage has been updated, for one peer. */ +} gscm_evt_id_t; + + +/**@brief Structure containing an event from the GSCM module. + */ +typedef struct +{ + gscm_evt_id_t evt_id; /**< The type of event this is. */ + pm_peer_id_t peer_id; /**< The peer ID this event pertains to. */ + union + { + struct + { + uint16_t conn_handle; /**< The connection this event pertains to. */ + } local_db_cache_updated; + struct + { + bool state; /**< The newly stored state of the Service Changed pending flag. */ + } sc_state_stored; + } params; /**< Event parameters specific to certain event types. */ +} gscm_evt_t; + +/**@brief Event handler for events from the GATT Server Cache Manager module. + * + * @param[in] event The event that has happened. + * @param[in] peer The id of the peer the event pertains to. + * @param[in] flags The data the event pertains to. + */ +typedef void (*gscm_evt_handler_t)(gscm_evt_t const * p_event); + + +/**@brief Function for initializing the GATT Server Cache Manager module. + * + * @param[in] evt_handler Callback for events from the GATT Server Cache Manager module. + * + * @retval NRF_SUCCESS Initialization was successful. + * @retval NRF_ERROR_NULL evt_handler was NULL. + */ +ret_code_t gscm_init(gscm_evt_handler_t evt_handler); + + +/**@brief Function for triggering local GATT database data to be stored persistently. Values are + * retrieved from the SoftDevice and written to persistent storage. + * + * @param[in] conn_handle Connection handle to perform update on. + * + * @retval NRF_SUCCESS Store operation started. + * @retval BLE_ERROR_INVALID_CONN_HANDLE conn_handle does not refer to an active connection with a + * bonded peer. + * @retval NRF_ERROR_BUSY Unable to perform operation at this time. Reattempt later. + * @retval NRF_ERROR_DATA_SIZE Write buffer not large enough. Call will never work with + * this GATT database. + * @retval NRF_ERROR_NO_MEM No room in persistent_storage. Free up space; the + * operation will be automatically reattempted after the + * next compression procedure + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + */ +ret_code_t gscm_local_db_cache_update(uint16_t conn_handle); + + +/**@brief Function for applying stored local GATT database data to the SoftDevice. Values are + * retrieved from persistent storage and given to the SoftDevice. + * + * @param[in] conn_handle Connection handle to apply values to. + * + * @retval NRF_SUCCESS Store operation started. + * @retval BLE_ERROR_INVALID_CONN_HANDLE conn_handle does not refer to an active connection with a + * bonded peer. + * @retval NRF_ERROR_INVALID_DATA The stored data was rejected by the SoftDevice, which + * probably means that the local database has changed. The + * system part of the sys_attributes was attempted applied, + * so service changed indications can be sent to subscribers. + * @retval NRF_ERROR_BUSY Unable to perform operation at this time. Reattempt later. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + * @return An unexpected return value from an internal function call. + */ +ret_code_t gscm_local_db_cache_apply(uint16_t conn_handle); + + +/**@brief Function for setting new values in the local database cache. + * + * @note If the peer is connected, the values will also be applied immediately to the connection. + * @note The data in the pointer must be available until the GSCM_EVT_LOCAL_DB_STORED event is + * received. + * + * @param[in] peer_id Peer to set values for. + * @param[in] p_local_db Database values to apply. If NULL, the values will instead be cleared. + * + * @retval NRF_SUCCESS Operation started, and values were applied (if connected). + * @retval NRF_ERROR_NOT_FOUND The peer ID was invalid or unallocated. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + * @return An unexpected return value from an internal function call. + */ +ret_code_t gscm_local_db_cache_set(pm_peer_id_t peer_id, pm_peer_data_local_gatt_db_t * p_local_db); + + +/**@brief Function for retrieving values in the local database cache. + * + * @param[in] peer_id Peer to get values for. + * @param[inout] p_local_db Where to store the data. The length field needs to reflect the + * available buffer space. On a successful read, the length field is + * updated to match the length of the read data. + * + * @retval NRF_SUCCESS Values retrieved successfully. + * @retval NRF_ERROR_NOT_FOUND The peer ID was invalid or unallocated. + * @retval NRF_ERROR_NULL p_local_db was NULL. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + */ +ret_code_t gscm_local_db_cache_get(pm_peer_id_t peer_id, pm_peer_data_local_gatt_db_t * p_local_db); + + +/**@brief Function for storing the fact that the local database has changed, for all currently + * bonded peers. + * + * @note This will cause a later call to @ref gscm_service_changed_ind_needed to return true for + * a connection with a currently bonded peer. + */ +void gscm_local_database_has_changed(void); + + +/**@brief Function for checking if a service changed indication should be sent. + * + * @param[in] conn_handle The connection to check. + * + * @return true if a service changed indication should be sent, false if not. + */ +bool gscm_service_changed_ind_needed(uint16_t conn_handle); + + +/**@brief Function for sending a service changed indication to a connected peer. + * + * @param[in] conn_handle The connection to send the indication on. + * + * @retval NRF_SUCCESS Indication sent or not needed. + * @retval BLE_ERROR_INVALID_CONN_HANDLE conn_handle does not refer to an active connection. + * @retval NRF_ERROR_BUSY Unable to send indication at this time. Reattempt later. + * @retval BLE_ERROR_GATTS_SYS_ATTR_MISSING Information missing. Apply local cache, then reattempt. + * @retval NRF_ERROR_INVALID_PARAM From @ref sd_ble_gatts_service_changed. Unexpected. + * @retval NRF_ERROR_NOT_SUPPORTED Service changed characteristic is not present. + * @retval NRF_ERROR_INVALID_STATE Service changed cannot be indicated to this peer + * because the peer has not subscribed to it. + */ +ret_code_t gscm_service_changed_ind_send(uint16_t conn_handle); + + +/**@brief Function for specifying that a peer has been made aware of the latest local database + * change. + * + * @note After calling this, a later call to @ref gscm_service_changed_ind_needed will to return + * false for this peer unless @ref gscm_local_database_has_changed is called again. + * + * @param[in] peer_id The connection to send the indication on. + */ +void gscm_db_change_notification_done(pm_peer_id_t peer_id); + +/** @} + * @endcond +*/ + +#endif /* GATTS_CACHE_MANAGER_H__ */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.c new file mode 100644 index 0000000000..d54f275324 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.c @@ -0,0 +1,731 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#include "id_manager.h" + +#include +#include "nrf_soc.h" +#include "ble_gap.h" +#include "ble_conn_state.h" +#include "peer_manager_types.h" +#include "peer_database.h" +#include "nordic_common.h" +#include "sdk_common.h" + +#define IM_MAX_CONN_HANDLES 8 +#define IM_NO_INVALID_CONN_HANDLES 0xFF +#define MAX_REGISTRANTS 3 +#define WHITELIST_MAX_COUNT MAX(BLE_GAP_WHITELIST_ADDR_MAX_COUNT, \ + BLE_GAP_WHITELIST_IRK_MAX_COUNT) +#define IM_ADDR_CLEARTEXT_LENGTH 3 +#define IM_ADDR_CIPHERTEXT_LENGTH 3 + +typedef struct +{ + pm_peer_id_t peer_id; + uint16_t conn_handle; + ble_gap_addr_t peer_address; +} im_connection_t; + +typedef struct +{ + im_evt_handler_t evt_handlers[MAX_REGISTRANTS]; + uint8_t n_registrants; + im_connection_t connections[8]; + pm_peer_id_t irk_whitelist_peer_ids[BLE_GAP_WHITELIST_IRK_MAX_COUNT]; + ble_gap_irk_t whitelist_irks[BLE_GAP_WHITELIST_IRK_MAX_COUNT]; + ble_gap_addr_t whitelist_addrs[BLE_GAP_WHITELIST_ADDR_MAX_COUNT]; + uint8_t n_irk_whitelist_peer_ids; + ble_conn_state_user_flag_id_t conn_state_user_flag_id; +} im_t; + +static im_t m_im = {.n_registrants = 0}; + +#define MODULE_INITIALIZED (m_im.n_registrants > 0) +#include "sdk_macros.h" + +static void internal_state_reset() +{ + memset(&m_im, 0, sizeof(im_t)); + m_im.n_registrants = 0; + m_im.n_irk_whitelist_peer_ids = 0; + m_im.conn_state_user_flag_id = BLE_CONN_STATE_USER_FLAG_INVALID; + for (uint32_t i = 0; i < IM_MAX_CONN_HANDLES; i++) + { + m_im.connections[i].conn_handle = BLE_CONN_HANDLE_INVALID; + } +} + + +/**@brief Function for sending an event to all registered event handlers. + * + * @param[in] p_event The event to distribute. + */ +static void evt_send(im_evt_t * p_event) +{ + for (uint32_t i = 0; i < m_im.n_registrants; i++) + { + m_im.evt_handlers[i](p_event); + } +} + +/**@brief Function finding a free position in m_im.connections. + * + * @detail All connection handles in the m_im.connections array are checked against the connection + * state module. The index of the first one that is not a connection handle for a current + * connection is returned. This position in the array can safely be used for a new connection. + * + * @return Either the index of a free position in the array or IM_NO_INVALID_CONN_HANDLES if no free + position exists. + */ +uint8_t get_free_connection() +{ + for (uint32_t i = 0; i < IM_MAX_CONN_HANDLES; i++) + { + // Query the connection state module to check if the connection handle does not belong to a + // valid connection. + if (!ble_conn_state_user_flag_get(m_im.connections[i].conn_handle, m_im.conn_state_user_flag_id)) + { + return i; + } + } + // If all connection handles belong to a valid connection, return IM_NO_INVALID_CONN_HANDLES. + return IM_NO_INVALID_CONN_HANDLES; +} + + +/**@brief Function finding a particular connection handle m_im.connections. + * + * @param[in] conn_handle The handle to find. + * + * @return Either the index of the conn_handle in the array or IM_NO_INVALID_CONN_HANDLES if the + * handle was not found. + */ +uint8_t get_connection_by_conn_handle(uint16_t conn_handle) +{ + if (ble_conn_state_user_flag_get(conn_handle, m_im.conn_state_user_flag_id)) + { + for (uint32_t i = 0; i < IM_MAX_CONN_HANDLES; i++) + { + if (m_im.connections[i].conn_handle == conn_handle) + { + return i; + } + } + } + // If all connection handles belong to a valid connection, return IM_NO_INVALID_CONN_HANDLES. + return IM_NO_INVALID_CONN_HANDLES; +} + + +/**@brief Function for registering a new connection instance. + * + * @param[in] conn_handle The handle of the new connection. + * @param[in] p_ble_addr The address used to connect. + * + * @return Either the index of the new connection in the array or IM_NO_INVALID_CONN_HANDLES if no + * free position exists. + */ +uint8_t new_connection(uint16_t conn_handle, ble_gap_addr_t * p_ble_addr) +{ + uint8_t conn_index = IM_NO_INVALID_CONN_HANDLES; + + if ((p_ble_addr != NULL) && (conn_handle != BLE_CONN_HANDLE_INVALID)) + { + ble_conn_state_user_flag_set(conn_handle, m_im.conn_state_user_flag_id, true); + + conn_index = get_connection_by_conn_handle(conn_handle); + if (conn_index == IM_NO_INVALID_CONN_HANDLES) + { + conn_index = get_free_connection(); + } + + if (conn_index != IM_NO_INVALID_CONN_HANDLES) + { + m_im.connections[conn_index].conn_handle = conn_handle; + m_im.connections[conn_index].peer_id = PM_PEER_ID_INVALID; + m_im.connections[conn_index].peer_address = *p_ble_addr; + } + } + return conn_index; +} + + +/**@brief Function checking the validity of an IRK + * + * @detail An all-zero IRK is not valid. This function will check if a given IRK is valid. + * + * @param[in] irk The IRK for which the validity is going to be checked. + * + * @retval true The IRK is valid. + * @retval false The IRK is invalid. + */ +bool is_valid_irk(ble_gap_irk_t const * irk) +{ + for (uint32_t i = 0; i < BLE_GAP_SEC_KEY_LEN; i++) + { + if (irk->irk[i] != 0) + { + return true; + } + } + return false; +} + + +/**@brief Function for comparing two addresses to determine if they are identical + * + * @note The address type need to be identical, as well as every bit in the address itself. + * + * @param[in] p_addr1 The first address to be compared. + * @param[in] p_addr2 The second address to be compared. + * + * @retval true The addresses are identical. + * @retval false The addresses are not identical. + */ +bool addr_compare(ble_gap_addr_t const * p_addr1, ble_gap_addr_t const * p_addr2) +{ + if ((p_addr1 == NULL) || (p_addr2 == NULL)) + { + return false; + } + + // Check that the addr type is identical, return false if it is not + if (p_addr1->addr_type != p_addr2->addr_type) + { + return false; + } + // Check if the addr bytes are is identical + return (memcmp(p_addr1->addr, p_addr2->addr, BLE_GAP_ADDR_LEN) == 0); +} + + +void im_ble_evt_handler(ble_evt_t * ble_evt) +{ + ret_code_t err_code; + switch (ble_evt->header.evt_id) + { + case BLE_GAP_EVT_CONNECTED: + { + pm_peer_id_t bonded_matching_peer_id = PM_PEER_ID_INVALID; + + if (ble_evt->evt.gap_evt.params.connected.irk_match == 1) + { + // The peer was matched using a whitelist. + bonded_matching_peer_id + = m_im.irk_whitelist_peer_ids[ble_evt->evt.gap_evt.params.connected.irk_match_idx]; + } + else if ( ble_evt->evt.gap_evt.params.connected.peer_addr.addr_type + != BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE) + { + /* Search the database for bonding data matching the one that triggered the event. + * Public and static addresses can be matched on address alone, while resolvable + * random addresses can be resolved agains known IRKs. Non-resolvable random addresses + * are never matching because they are not longterm form of identification. + */ + pm_peer_id_t compared_peer_id = pdb_next_peer_id_get(PM_PEER_ID_INVALID); + while ( (compared_peer_id != PM_PEER_ID_INVALID) + && (bonded_matching_peer_id == PM_PEER_ID_INVALID)) + { + pm_peer_data_flash_t compared_data; + switch (ble_evt->evt.gap_evt.params.connected.peer_addr.addr_type) + { + case BLE_GAP_ADDR_TYPE_PUBLIC: + /* fall-through */ + case BLE_GAP_ADDR_TYPE_RANDOM_STATIC: + err_code = pdb_read_buf_get(compared_peer_id, + PM_PEER_DATA_ID_BONDING, + &compared_data, + NULL); + if ((err_code == NRF_SUCCESS) && + addr_compare(&ble_evt->evt.gap_evt.params.connected.peer_addr, + &compared_data.p_bonding_data->peer_id.id_addr_info) + ) + { + bonded_matching_peer_id = compared_peer_id; + } + break; + + case BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE: + err_code = pdb_read_buf_get(compared_peer_id, + PM_PEER_DATA_ID_BONDING, + &compared_data, + NULL); + if (err_code == NRF_SUCCESS && + im_address_resolve(&ble_evt->evt.gap_evt.params.connected.peer_addr, + &compared_data.p_bonding_data->peer_id.id_info) + ) + { + bonded_matching_peer_id = compared_peer_id; + } + break; + + case BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE: + // Should not happen. + break; + + default: + break; + } + compared_peer_id = pdb_next_peer_id_get(compared_peer_id); + } + } + uint8_t new_index = new_connection(ble_evt->evt.gap_evt.conn_handle, &ble_evt->evt.gap_evt.params.connected.peer_addr); + UNUSED_VARIABLE(new_index); + + if (bonded_matching_peer_id != PM_PEER_ID_INVALID) + { + im_new_peer_id(ble_evt->evt.gap_evt.conn_handle, bonded_matching_peer_id); + + // Send a bonded peer event + im_evt_t im_evt; + im_evt.conn_handle = ble_evt->evt.gap_evt.conn_handle; + im_evt.evt_id = IM_EVT_BONDED_PEER_CONNECTED; + evt_send(&im_evt); + } + } + } +} + + +/**@brief Function to compare two sets of bonding data to check if they belong to the same device. + * @note Invalid irks will never match even though they are identical. + * + * @param[in] p_bonding_data1 First bonding data for comparison + * @param[in] p_bonding_data2 Second bonding data for comparison + * + * @return True if the input matches, false if it does not. + */ +bool is_duplicate_bonding_data(pm_peer_data_bonding_t const * p_bonding_data1, + pm_peer_data_bonding_t const * p_bonding_data2) +{ + bool valid_irk = is_valid_irk(&p_bonding_data1->peer_id.id_info); + bool duplicate_irk = valid_irk && + (memcmp(p_bonding_data1->peer_id.id_info.irk, + p_bonding_data2->peer_id.id_info.irk, + BLE_GAP_SEC_KEY_LEN) == 0 + ); + bool duplicate_addr = addr_compare(&p_bonding_data1->peer_id.id_addr_info, + &p_bonding_data2->peer_id.id_addr_info + ); + return duplicate_irk || duplicate_addr; +} + + +/**@brief Event handler for events from the peer_database module. + * + * @param[in] p_event The event that has happend with peer id and flags. + */ +static void pdb_evt_handler(pdb_evt_t const * p_event) +{ + ret_code_t err_code; + if ((p_event != NULL) && (p_event->evt_id == PDB_EVT_WRITE_BUF_STORED)) + { + // If new data about peer id has been stored it is compared to other peers peer ids in + // search of duplicates. + if (p_event->data_id == PM_PEER_DATA_ID_BONDING) + { + pm_peer_data_flash_t written_data; + err_code = pdb_read_buf_get(p_event->peer_id, PM_PEER_DATA_ID_BONDING, &written_data, NULL); + if (err_code == NRF_SUCCESS) + { + pm_peer_id_t compared_peer_id = pdb_next_peer_id_get(PM_PEER_ID_INVALID); + while (compared_peer_id != PM_PEER_ID_INVALID) + { + pm_peer_data_flash_t compared_data; + err_code = pdb_read_buf_get(compared_peer_id, + PM_PEER_DATA_ID_BONDING, + &compared_data, + NULL); + if ( err_code == NRF_SUCCESS && + p_event->peer_id != compared_peer_id && + is_duplicate_bonding_data(written_data.p_bonding_data, + compared_data.p_bonding_data) + ) + { + im_evt_t im_evt; + im_evt.conn_handle = im_conn_handle_get(p_event->peer_id); + im_evt.evt_id = IM_EVT_DUPLICATE_ID; + im_evt.params.duplicate_id.peer_id_1 = p_event->peer_id; + im_evt.params.duplicate_id.peer_id_2 = compared_peer_id; + evt_send(&im_evt); + } + compared_peer_id = pdb_next_peer_id_get(compared_peer_id); + } + } + } + } +} + + +ret_code_t im_register(im_evt_handler_t evt_handler) +{ + VERIFY_PARAM_NOT_NULL(evt_handler); + ret_code_t err_code = NRF_SUCCESS; + + if (!MODULE_INITIALIZED) + { + internal_state_reset(); + m_im.conn_state_user_flag_id = ble_conn_state_user_flag_acquire(); + if (m_im.conn_state_user_flag_id == BLE_CONN_STATE_USER_FLAG_INVALID) + { + err_code = NRF_ERROR_NO_MEM; + } + else + { + err_code = pdb_register(pdb_evt_handler); + } + } + if (err_code == NRF_SUCCESS) + { + if ((m_im.n_registrants < MAX_REGISTRANTS)) + { + m_im.evt_handlers[m_im.n_registrants++] = evt_handler; + } + else + { + err_code = NRF_ERROR_NO_MEM; + } + } + return err_code; +} + + +pm_peer_id_t im_peer_id_get_by_conn_handle(uint16_t conn_handle) +{ + uint8_t conn_index = get_connection_by_conn_handle(conn_handle); + + if (MODULE_INITIALIZED && (conn_index != IM_NO_INVALID_CONN_HANDLES)) + { + return m_im.connections[conn_index].peer_id; + } + + return PM_PEER_ID_INVALID; +} + + +ret_code_t im_ble_addr_get(uint16_t conn_handle, ble_gap_addr_t * p_ble_addr) +{ + VERIFY_MODULE_INITIALIZED(); + VERIFY_PARAM_NOT_NULL(p_ble_addr); + + uint8_t conn_index = get_connection_by_conn_handle(conn_handle); + if (conn_index != IM_NO_INVALID_CONN_HANDLES) + { + *p_ble_addr = m_im.connections[conn_index].peer_address; + return NRF_SUCCESS; + } + + return NRF_ERROR_NOT_FOUND; +} + + +bool im_master_ids_compare(ble_gap_master_id_t const * p_master_id1, + ble_gap_master_id_t const * p_master_id2) +{ + if(!im_master_id_is_valid(p_master_id1)) + { + return false; + } + if (p_master_id1->ediv != p_master_id2->ediv) + { + return false; + } + return (memcmp(p_master_id1->rand, p_master_id2->rand, BLE_GAP_SEC_RAND_LEN) == 0); +} + + +pm_peer_id_t im_peer_id_get_by_master_id(ble_gap_master_id_t * p_master_id) +{ + ret_code_t err_code; + // For each stored peer, check if the master_id match p_master_id + pm_peer_id_t compared_peer_id = pdb_next_peer_id_get(PM_PEER_ID_INVALID); + while (compared_peer_id != PM_PEER_ID_INVALID) + { + pm_peer_data_flash_t compared_data; + ble_gap_master_id_t const * p_compared_master_id; + + err_code = pdb_read_buf_get(compared_peer_id, PM_PEER_DATA_ID_BONDING, &compared_data, NULL); + if (err_code == NRF_SUCCESS) + { + p_compared_master_id = &compared_data.p_bonding_data->own_ltk.master_id; + if (im_master_ids_compare(p_master_id, p_compared_master_id)) + { + // If a matching master_id is found return the peer_id + return compared_peer_id; + } + p_compared_master_id = &compared_data.p_bonding_data->peer_ltk.master_id; + if (im_master_ids_compare(p_master_id, p_compared_master_id)) + { + // If a matching master_id is found return the peer_id + return compared_peer_id; + } + } + compared_peer_id = pdb_next_peer_id_get(compared_peer_id); + } + // If no matching master_id is found return the PM_PEER_ID_INVALID + return PM_PEER_ID_INVALID; +} + + +pm_peer_id_t im_peer_id_get_by_irk_match_idx(uint8_t irk_match_idx) +{ + // Verify that the requested idx is within the list + if (irk_match_idx < m_im.n_irk_whitelist_peer_ids) + { + // Return the peer_id from the white list + return m_im.irk_whitelist_peer_ids[irk_match_idx]; + } + else + { + // Return PM_PEER_ID_INVALID to indicate that there was no peer with the requested idx + return PM_PEER_ID_INVALID; + } +} + + +uint16_t im_conn_handle_get(pm_peer_id_t peer_id) +{ + for (uint32_t i = 0; i < IM_MAX_CONN_HANDLES; i++) + { + if (peer_id == m_im.connections[i].peer_id) + { + return m_im.connections[i].conn_handle; + } + } + return BLE_CONN_HANDLE_INVALID; +} + + +bool im_master_id_is_valid(ble_gap_master_id_t const * p_master_id) +{ + if (p_master_id->ediv != 0) + { + return true; + } + for (uint32_t i = 0; i < BLE_GAP_SEC_RAND_LEN; i++) + { + if (p_master_id->rand[i] != 0) + { + return true; + } + } + return false; +} + + +/**@brief Function to set the peer ID associated with a connection handle. + * + * @param[in] conn_handle The connection handle. + * @param[in] peer_id The peer ID to associate with @c conn_handle. + */ +static void peer_id_set(uint16_t conn_handle, pm_peer_id_t peer_id) +{ + uint8_t conn_index = get_connection_by_conn_handle(conn_handle); + if (conn_index != IM_NO_INVALID_CONN_HANDLES) + { + m_im.connections[conn_index].peer_id = peer_id; + } +} + + +void im_new_peer_id(uint16_t conn_handle, pm_peer_id_t peer_id) +{ + peer_id_set(conn_handle, peer_id); +} + + +ret_code_t im_peer_free(pm_peer_id_t peer_id) +{ + VERIFY_MODULE_INITIALIZED(); + + uint16_t conn_handle = im_conn_handle_get(peer_id); + ret_code_t err_code = pdb_peer_free(peer_id); + if ((conn_handle != BLE_CONN_HANDLE_INVALID) && (err_code == NRF_SUCCESS)) + { + peer_id_set(conn_handle, PM_PEER_ID_INVALID); + } + return err_code; +} + + +ret_code_t im_whitelist_create(pm_peer_id_t * p_peer_ids, + uint8_t n_peer_ids, + ble_gap_whitelist_t * p_whitelist) +{ + VERIFY_MODULE_INITIALIZED(); + VERIFY_PARAM_NOT_NULL(p_whitelist); + ret_code_t err_code; + p_whitelist->addr_count = 0; + p_whitelist->irk_count = 0; + m_im.n_irk_whitelist_peer_ids = 0; + for (uint32_t peer_index = 0; peer_index < n_peer_ids; peer_index++) + { + uint16_t conn_handle = im_conn_handle_get(p_peer_ids[peer_index]); + if (ble_conn_state_status(conn_handle) != BLE_CONN_STATUS_CONNECTED) + { + pm_peer_data_flash_t peer_data; + err_code = pdb_read_buf_get(p_peer_ids[peer_index], PM_PEER_DATA_ID_BONDING, &peer_data, NULL); + if (err_code == NRF_ERROR_INVALID_PARAM || err_code == NRF_ERROR_NOT_FOUND) + { + return NRF_ERROR_INVALID_PARAM; + } + if (p_whitelist->pp_addrs != NULL && + peer_data.p_bonding_data->peer_id.id_addr_info.addr_type + != BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE && + peer_data.p_bonding_data->peer_id.id_addr_info.addr_type + != BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE + ) + { + memcpy(m_im.whitelist_addrs[peer_index].addr, + peer_data.p_bonding_data->peer_id.id_addr_info.addr, + BLE_GAP_ADDR_LEN + ); + m_im.whitelist_addrs[peer_index].addr_type = + peer_data.p_bonding_data->peer_id.id_addr_info.addr_type; + p_whitelist->pp_addrs[peer_index] = &m_im.whitelist_addrs[peer_index]; + p_whitelist->addr_count++; + } + if (p_whitelist->pp_irks != NULL && + is_valid_irk(&(peer_data.p_bonding_data->peer_id.id_info)) + ) + { + memcpy(m_im.whitelist_irks[peer_index].irk, + peer_data.p_bonding_data->peer_id.id_info.irk, + BLE_GAP_SEC_KEY_LEN + ); + p_whitelist->pp_irks[peer_index] = &m_im.whitelist_irks[peer_index]; + p_whitelist->irk_count++; + m_im.irk_whitelist_peer_ids[peer_index] = p_peer_ids[peer_index]; + m_im.n_irk_whitelist_peer_ids++; + } + } + } + return NRF_SUCCESS; +} + + +ret_code_t im_whitelist_custom(ble_gap_whitelist_t const * p_whitelist) +{ + ret_code_t err_code; + + pm_peer_id_t new_irk_whitelist_peer_ids[BLE_GAP_WHITELIST_IRK_MAX_COUNT]; + uint32_t n_new_irk_whitelist_peer_ids = 0; + VERIFY_PARAM_NOT_NULL(p_whitelist); + for (uint32_t i = 0; i < BLE_GAP_WHITELIST_IRK_MAX_COUNT; i++) + { + new_irk_whitelist_peer_ids[i] = PM_PEER_ID_INVALID; + } + pm_peer_id_t compared_peer_id = pdb_next_peer_id_get(PM_PEER_ID_INVALID); + while (compared_peer_id != PM_PEER_ID_INVALID) + { + pm_peer_data_flash_t compared_data; + err_code = pdb_read_buf_get(compared_peer_id, PM_PEER_DATA_ID_BONDING, &compared_data, NULL); + if (err_code == NRF_SUCCESS) + { + for (uint32_t i = 0; i < p_whitelist->irk_count; i++) + { + bool valid_irk = is_valid_irk(&compared_data.p_bonding_data->peer_id.id_info); + bool duplicate_irk = valid_irk && + (memcmp(p_whitelist->pp_irks[i]->irk, + compared_data.p_bonding_data->peer_id.id_info.irk, + BLE_GAP_SEC_KEY_LEN) == 0 + ); + if (duplicate_irk) + { + new_irk_whitelist_peer_ids[i] = compared_peer_id; + n_new_irk_whitelist_peer_ids++; + } + } + } + compared_peer_id = pdb_next_peer_id_get(compared_peer_id); + } + if (n_new_irk_whitelist_peer_ids != p_whitelist->irk_count) + { + return NRF_ERROR_NOT_FOUND; + } + else + { + for (uint32_t i = 0; i < n_new_irk_whitelist_peer_ids; i++) + { + m_im.irk_whitelist_peer_ids[i] = new_irk_whitelist_peer_ids[i]; + } + m_im.n_irk_whitelist_peer_ids = n_new_irk_whitelist_peer_ids; + return NRF_SUCCESS; + } +} + + +/**@brief Function for calculating the ah() hash function described in Bluetooth core specification + * 4.2 section 3.H.2.2.2. + * + * @detail BLE uses a hash function to calculate the first half of a resolvable address + * from the second half of the address and an irk. This function will use the ECB + * periferal to hash these data acording to the Bluetooth core specification. + * + * @note The ECB expect little endian input and output. + * This function expect big endian and will reverse the data as necessary. + * + * @param[in] p_k The key used in the hash function. + * For address resolution this is should be the irk. + * The array must have a length of 16. + * @param[in] p_r The rand used in the hash function. For generating a new address + * this would be a random number. For resolving a resolvable address + * this would be the last half of the address being resolved. + * The array must have a length of 3. + * @param[out] p_local_hash The result of the hash operation. For address resolution this + * will match the first half of the address being resolved if and only + * if the irk used in the hash function is the same one used to generate + * the address. + * The array must have a length of 16. + */ +void ah(uint8_t const * p_k, uint8_t const * p_r, uint8_t * p_local_hash) +{ + ret_code_t err_code; + nrf_ecb_hal_data_t ecb_hal_data; + for (uint32_t i = 0; i < SOC_ECB_KEY_LENGTH; i++) + { + ecb_hal_data.key[i] = p_k[SOC_ECB_KEY_LENGTH - 1 - i]; + } + memset(ecb_hal_data.cleartext, 0, SOC_ECB_KEY_LENGTH - IM_ADDR_CLEARTEXT_LENGTH); + + for (uint32_t i = 0; i < IM_ADDR_CLEARTEXT_LENGTH; i++) + { + ecb_hal_data.cleartext[SOC_ECB_KEY_LENGTH - 1 - i] = p_r[i]; + } + + err_code = sd_ecb_block_encrypt(&ecb_hal_data); // Can only return NRF_SUCCESS. + UNUSED_VARIABLE(err_code); + + for (uint32_t i = 0; i < IM_ADDR_CIPHERTEXT_LENGTH; i++) + { + p_local_hash[i] = ecb_hal_data.ciphertext[SOC_ECB_KEY_LENGTH - 1 - i]; + } +} + + +bool im_address_resolve(ble_gap_addr_t const * p_addr, ble_gap_irk_t const * p_irk) +{ + if (p_addr->addr_type != BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE) + { + return false; + } + uint8_t hash[IM_ADDR_CIPHERTEXT_LENGTH]; + uint8_t local_hash[IM_ADDR_CIPHERTEXT_LENGTH]; + uint8_t prand[IM_ADDR_CLEARTEXT_LENGTH]; + memcpy(hash, p_addr->addr, IM_ADDR_CIPHERTEXT_LENGTH); + memcpy(prand, &p_addr->addr[IM_ADDR_CIPHERTEXT_LENGTH], IM_ADDR_CLEARTEXT_LENGTH); + ah(p_irk->irk, prand, local_hash); + + return (memcmp(hash, local_hash, IM_ADDR_CIPHERTEXT_LENGTH) == 0); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.h new file mode 100644 index 0000000000..683ea9b633 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.h @@ -0,0 +1,242 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#ifndef PEER_ID_MANAGER_H__ +#define PEER_ID_MANAGER_H__ + +#include +#include "sdk_errors.h" +#include "ble.h" +#include "ble_gap.h" +#include "peer_manager_types.h" + + +/** + * @cond NO_DOXYGEN + * @defgroup id_manager ID Manager + * @ingroup peer_manager + * @{ + * @brief An internal module of @ref peer_manager. A module for keeping track of peer identities + * (IRK and peer address). + */ + + +/**@brief Events that can come from the ID Manager module. + */ +typedef enum +{ + IM_EVT_DUPLICATE_ID, /**< The ID Manager module has detected that two stored peers represent the same peer. */ + IM_EVT_BONDED_PEER_CONNECTED, /**< A connected peer has been identified as one of the bonded peers. This can happen immediately on connection, or at a later time. */ +} im_evt_id_t; + + +typedef struct +{ + im_evt_id_t evt_id; + uint16_t conn_handle; + union + { + struct + { + pm_peer_id_t peer_id_1; + pm_peer_id_t peer_id_2; + } duplicate_id; + } params; +} im_evt_t; + + +/**@brief Event handler for events from the ID Manager module. + * + * @param[in] p_event The event that has happened. + */ +typedef void (*im_evt_handler_t)(im_evt_t const * p_event); + +/**@brief Function for registering for events from the ID Manager module. + * + * @note This will also initialize the module if needed. + * + * @param[in] evt_handler Callback for events from the ID Manager module. + * + * @retval NRF_SUCCESS Registration was successful. + * @retval NRF_ERROR_NO_MEM No more registrations possible. + * @retval NRF_ERROR_NULL evt_handler was NULL. + */ +ret_code_t im_register(im_evt_handler_t evt_handler); + + +/**@brief Function for dispatching SoftDevice events to the ID Manager module. + * + * @param[in] p_ble_evt The SoftDevice event. + */ +void im_ble_evt_handler(ble_evt_t * p_ble_evt); + + +/**@brief Function for getting the corresponding peer ID from a connection handle. + * + * @param[in] conn_handle The connection handle. + * + * @return The corresponding peer ID, or @ref PM_PEER_ID_INVALID if none could be resolved. + */ +pm_peer_id_t im_peer_id_get_by_conn_handle(uint16_t conn_handle); + + +/**@brief Function for getting the corresponding peer ID from a master ID (EDIV and rand). + * + * @param[in] p_master_id The master ID. + * + * @return The corresponding peer ID, or @ref PM_PEER_ID_INVALID if none could be resolved. + */ +pm_peer_id_t im_peer_id_get_by_master_id(ble_gap_master_id_t * p_master_id); + + +/**@brief Function for getting the corresponding peer ID from an IRK match index, see @ref + * ble_gap_evt_connected_t. + * + * @param[in] irk_match_idx The IRK match index. + * + * @return The corresponding peer ID, or @ref PM_PEER_ID_INVALID if none could be resolved. + */ +pm_peer_id_t im_peer_id_get_by_irk_match_idx(uint8_t irk_match_idx); + + +/**@brief Function for getting the corresponding connection handle from a peer ID. + * + * @param[in] peer_id The peer ID. + * + * @return The corresponding connection handle, or @ref BLE_CONN_HANDLE_INVALID if none could be + * resolved. + */ +uint16_t im_conn_handle_get(pm_peer_id_t peer_id); + + +/**@brief Function for comparing two master ids + * @note Two invalid master IDs will not match. + * + * @param[in] p_master_id1 First master id for comparison + * @param[in] p_master_id2 Second master id for comparison + * + * @return True if the input matches, false if it does not. + */ +bool im_master_ids_compare(ble_gap_master_id_t const * p_master_id1, + ble_gap_master_id_t const * p_master_id2); + + +/**@brief Function for getting the BLE address used by the peer when connecting. + * + * @param[in] conn_handle The connection handle. + * @param[out] p_ble_addr The BLE address used by the peer when the connection specified by + * conn_handle was established. + * + * @retval NRF_SUCCESS The address was found and copied. + * @retval NRF_ERROR_INVALID_STATE Module not initialized. + * @retval BLE_ERROR_CONN_HANDLE_INVALID conn_handle does not refer to an active connection. + * @retval NRF_ERROR_NULL p_ble_addr was NULL. + */ +ret_code_t im_ble_addr_get(uint16_t conn_handle, ble_gap_addr_t * p_ble_addr); + + +/**@brief Function for checking whether a master ID is valid or invalid + * + * @param[in] p_master_id The master ID. + * + * @retval true The master id is valid. + * @retval true The master id is invalid (i.e. all zeros). + */ +bool im_master_id_is_valid(ble_gap_master_id_t const * p_master_id); + + +/**@brief Function for reporting that a new peer ID has been allocated for a specified connection. + * + * @param[in] conn_handle The connection. + * @param[in] peer_id The new peer ID. + */ +void im_new_peer_id(uint16_t conn_handle, pm_peer_id_t peer_id); + + +/**@brief Function for deleting all of a peer's data from flash and disassociating it from any + * connection handles it is associated with. + * + * @param[in] peer_id The peer to free. + * + * @return Any error code returned by @ref pdb_peer_free. + */ +ret_code_t im_peer_free(pm_peer_id_t peer_id); + + +/**@brief Function for informing this module of what whitelist will be used. + * + * @details This function is meant to be used when the app wants to use a custom whitelist. + * When using peer manager, this function must be used if a custom whitelist is used. + * Only whitelisted IRKs are of any importance for this function. + * + * @note When using a whitelist, always use the whitelist created/set by the most recent + * call to @ref im_whitelist_create or to this function, whichever happened most recently. + * @note Do not call this function while scanning with another whitelist. + * @note Do not add any irks to the whitelist that are not present in the bonding data of a peer in + * the peer database. + * @note The whitelist is not altered in any way by calling this function. Only the internal state + * of the module is changed. + * + * @param[in] p_whitelist The whitelist. + * + * @retval NRF_SUCCESS Whitelist successfully set. + * @retval NRF_ERROR_NULL p_whitelist was NULL. + * @retval NRF_ERROR_NOT_FOUND One or more of the whitelists irks was not found in the peer_database. + */ +ret_code_t im_whitelist_custom(ble_gap_whitelist_t const * p_whitelist); + + +/** + * @brief Function for constructing a whitelist for use when advertising. + * + * @note When advertising with whitelist, always use the whitelist created/set by the most recent + * call to this function or to @ref im_whitelist_custom, whichever happened most recently. + * @note Do not call this function while advertising with another whitelist. + * + * @param[in] p_peer_ids The ids of the peers to be added to the whitelist. + * @param[in] n_peer_ids The number of peer ids in p_peer_ids. + * @param[in,out] p_whitelist The constructed whitelist. Note that p_adv_whitelist->pp_addrs + * must be NULL or point to an array with size @ref + * BLE_GAP_WHITELIST_ADDR_MAX_COUNT and p_adv_whitelist->pp_irks + * must be NULL or point to an array with size @ref + * BLE_GAP_WHITELIST_IRK_MAX_COUNT. + * + * @retval NRF_SUCCESS Whitelist successfully created. + * @retval NRF_ERROR_NULL p_whitelist was NULL. + */ +ret_code_t im_whitelist_create(pm_peer_id_t * p_peer_ids, + uint8_t n_peer_ids, + ble_gap_whitelist_t * p_whitelist); + +/** + * @brief Function for resolving a resolvable address with an identity resolution key (IRK). + * + * @details This function will use the ECB peripheral to resolve a resolvable address. + * This can be used to resolve the identity of a device distributing a random + * resolvable address based on any IRKs you have received earlier. If an address is + * resolved by an IRK, the device disributing the address must also know the IRK. + * + * @param[in] p_addr A random resolvable address. + * @param[in] p_irk An identity resolution key (IRK). + * + * @retval true The irk used matched the one used to create the address. + * @retval false The irk used did not match the one used to create the address, or an argument was + * NULL. + */ +bool im_address_resolve(ble_gap_addr_t const * p_addr, ble_gap_irk_t const * p_irk); + +/** @} + * @endcond + */ + +#endif /* PEER_ID_MANAGER_H__ */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data.c new file mode 100644 index 0000000000..02398bca90 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data.c @@ -0,0 +1,65 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#include "peer_data.h" + +#include "peer_manager_types.h" +#include "fds.h" +#include "sdk_common.h" + + +void peer_data_parts_get(pm_peer_data_const_t const * p_peer_data, fds_record_chunk_t * p_chunks, uint16_t * p_n_chunks) +{ + if (p_n_chunks == NULL) + { + } + else if ((p_peer_data == NULL) || (p_chunks == NULL)) + { + *p_n_chunks = 0; + } + else + { + p_chunks[0].p_data = p_peer_data->p_all_data; + p_chunks[0].length_words = p_peer_data->length_words; + *p_n_chunks = 1; + } +} + + +ret_code_t peer_data_deserialize(pm_peer_data_flash_t const * p_in_data, pm_peer_data_t * p_out_data) +{ + ret_code_t err_code = NRF_SUCCESS; + + if ((p_in_data == NULL) || (p_out_data == NULL)) + { + err_code = NRF_ERROR_NULL; + } + else + { + if (p_out_data->length_words < p_in_data->length_words) + { + p_out_data->length_words = p_in_data->length_words; + err_code = NRF_ERROR_NO_MEM; + } + else + { + p_out_data->length_words = p_in_data->length_words; + p_out_data->data_id = p_in_data->data_id; + + memcpy(p_out_data->p_all_data, p_in_data->p_all_data, p_in_data->length_words * 4); + } + } + return err_code; +} + + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data.h new file mode 100644 index 0000000000..36c8d93758 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data.h @@ -0,0 +1,57 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#ifndef PEER_DATA_H__ +#define PEER_DATA_H__ + +#include +#include "peer_manager_types.h" +#include "peer_manager_internal.h" +#include "fds.h" + + +/** + * @cond NO_DOXYGEN + * @defgroup peer_data Peer Data + * @ingroup peer_manager + * @{ + * @brief An internal module of @ref peer_manager. This module defines the structure of the data + * that is managed by the @ref peer_manager. It also provides functions for parsing the data. + */ + + +/**@brief Function for enumerating the separate (non-contiguous) parts of the peer data. + * + * @param[in] p_peer_data The peer data to enumerate. + * @param[out] p_chunks The resulting chunks. This must be an array of at least 2 elements. + * @param[out] p_n_chunks The number of chunks. If this is 0, something went wrong. + */ +void peer_data_parts_get(pm_peer_data_const_t const * p_peer_data, fds_record_chunk_t * p_chunks, uint16_t * p_n_chunks); + + +/**@brief Function for converting @ref pm_peer_data_flash_t into @ref pm_peer_data_t. + * + * @param[in] p_in_data The source data. + * @param[out] p_out_data The target data structure. + * + * @retval NRF_SUCCESS Successful conversion. + * @retval NRF_ERROR_NULL A parameter was NULL. + * @retval NRF_ERROR_NO_MEM A buffer was not large enough. + */ +ret_code_t peer_data_deserialize(pm_peer_data_flash_t const * p_in_data, pm_peer_data_t * p_out_data); + +/** @} + * @endcond + */ + +#endif /* PEER_DATA_H__ */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data_storage.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data_storage.c new file mode 100644 index 0000000000..5464d53aa3 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data_storage.c @@ -0,0 +1,760 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#include "peer_data_storage.h" + +#include +#include +#include "sdk_errors.h" +#include "peer_manager_types.h" +#include "peer_manager_internal.h" +#include "peer_id.h" +#include "peer_data.h" +#include "fds.h" +#include "sdk_common.h" + + +// The number of user that can register with the module. +#define MAX_REGISTRANTS 6 + +// Macro for verifying that param is not zero. +#define VERIFY_PARAM_NOT_ZERO(param) \ +do \ +{ \ + if (param == 0) \ + { \ + return NRF_ERROR_NULL; \ + } \ +} while(0) + + +// Macro for verifying that the peer id is within a valid range. +#define VERIFY_PEER_ID_IN_RANGE(id) \ +do \ +{ \ + if (id >= PM_PEER_ID_N_AVAILABLE_IDS) \ + { \ + return NRF_ERROR_INVALID_PARAM; \ + } \ +} while (0) + + +// Macro for verifying that the peer data id is withing a valid range. +#define VERIFY_PEER_DATA_ID_IN_RANGE(id) \ +do \ +{ \ + if (!PM_PEER_DATA_ID_IS_VALID(id)) \ + { \ + return NRF_ERROR_INVALID_PARAM; \ + } \ +} while (0) + + +// Macro for initializing the peer ID tracking system if it is not already initialized. +#define PEER_IDS_INITIALIZE() \ +do \ +{ \ + if (!m_pds.peer_ids_initialized) \ + { \ + peer_ids_init(); \ + } \ +} while (0) + + +typedef struct +{ + bool peer_ids_initialized; + pds_evt_handler_t evt_handlers[MAX_REGISTRANTS]; + uint8_t n_registrants; + bool clearing; + bool clear_queued; +} pds_t; + + +static pds_t m_pds = { .n_registrants = 0 }; + + +#define MODULE_INITIALIZED (m_pds.n_registrants > 0) /**< Expression which is true when the module is initialized. */ +#include "sdk_macros.h" + +static void internal_state_reset(pds_t * p_pds) +{ + memset(p_pds, 0, sizeof(pds_t)); +} + + +// Function for dispatching outbound events to all registered event handlers. +static void pds_evt_send(pds_evt_t * p_event) +{ + for (uint32_t i = 0; i < m_pds.n_registrants; i++) + { + m_pds.evt_handlers[i](p_event); + } +} + + +// Function to convert peer IDs to file IDs. +static uint16_t peer_id_to_file_id(pm_peer_id_t peer_id) +{ + return (uint16_t)(peer_id + PEER_ID_TO_FILE_ID); +} + + +// Function to convert peer data id to type id. +static pm_peer_id_t file_id_to_peer_id(uint16_t file_id) +{ + return (pm_peer_id_t)(file_id + FILE_ID_TO_PEER_ID); +} + + +// Function to convert peer data IDs to record keys. +static uint16_t peer_data_id_to_record_key(pm_peer_data_id_t peer_data_id) +{ + return (uint16_t)peer_data_id + (uint16_t)PEER_DATA_ID_TO_RECORD_KEY; +} + + +// Function to convert record keys to peer data IDs. +static pm_peer_data_id_t record_key_to_peer_data_id(uint16_t record_key) +{ + return (pm_peer_data_id_t)(record_key + RECORD_KEY_TO_PEER_DATA_ID); +} + + +// Function for clearing all peer data of one peer. +// These operations will be sent to FDS one at a time. +static void peer_data_clear() +{ + ret_code_t retval; + uint16_t file_id; + fds_record_desc_t desc; + fds_find_token_t token = {0}; + pm_peer_id_t peer_id = peer_id_get_next_deleted(PM_PEER_ID_INVALID); + + while ( (peer_id != PM_PEER_ID_INVALID) + && (fds_record_find_in_file(peer_id_to_file_id(peer_id), &desc, &token) + == FDS_ERR_NOT_FOUND)) + { + peer_id_free(peer_id); + peer_id = peer_id_get_next_deleted(peer_id); + } + + if (!m_pds.clearing && (peer_id != PM_PEER_ID_INVALID)) + { + file_id = peer_id_to_file_id(peer_id); + retval = fds_file_delete(file_id); + + if (retval == FDS_SUCCESS) + { + m_pds.clearing = true; + } + else if (retval == FDS_ERR_NO_SPACE_IN_QUEUES) + { + m_pds.clear_queued = true; + } + else + { + pds_evt_t pds_evt; + + pds_evt.evt_id = PDS_EVT_ERROR_UNEXPECTED; + pds_evt.peer_id = peer_id; + pds_evt.data_id = PM_PEER_DATA_ID_INVALID; + pds_evt.store_token = PM_STORE_TOKEN_INVALID; + pds_evt.result = retval; + + pds_evt_send(&pds_evt); + } + } +} + + +static ret_code_t find_fds_item(pm_peer_id_t peer_id, + pm_peer_data_id_t data_id, + fds_record_desc_t * const p_desc) +{ + fds_find_token_t find_tok = {0}; + + VERIFY_PEER_ID_IN_RANGE(peer_id); + VERIFY_PEER_DATA_ID_IN_RANGE(data_id); + // pp_record verified by caller. + + uint16_t file_id = peer_id_to_file_id(peer_id); + uint16_t record_key = peer_data_id_to_record_key(data_id); + + return fds_record_find(file_id, record_key, p_desc, &find_tok); +} + + +static void peer_ids_init() +{ + fds_record_desc_t record_desc; + fds_flash_record_t record; + fds_find_token_t find_tok = {0}; + + uint16_t const record_key = peer_data_id_to_record_key(PM_PEER_DATA_ID_BONDING); + + if (!m_pds.peer_ids_initialized) + { + while(fds_record_find_by_key(record_key, &record_desc, &find_tok) == FDS_SUCCESS) + { + pm_peer_id_t peer_id; + + // It is safe to ignore the return value since we just obtained + // this descriptor and also 'record' is different from NULL. + (void)fds_record_open(&record_desc, &record); + peer_id = file_id_to_peer_id(record.p_header->ic.file_id); + (void)fds_record_close(&record_desc); + + (void)peer_id_allocate(peer_id); + } + + m_pds.peer_ids_initialized = true; + } +} + + +static void fds_evt_handler(fds_evt_t const * const p_fds_evt) +{ + pds_evt_t pds_evt; + bool send_event = true; + + pds_evt.result = (p_fds_evt->result == FDS_SUCCESS); + + switch(p_fds_evt->id) + { + case FDS_EVT_WRITE: + pds_evt.evt_id = (p_fds_evt->result == FDS_SUCCESS) ? PDS_EVT_STORED : + PDS_EVT_ERROR_STORE; + + pds_evt.peer_id = file_id_to_peer_id(p_fds_evt->write.file_id); + pds_evt.data_id = record_key_to_peer_data_id(p_fds_evt->write.record_key); + pds_evt.result = p_fds_evt->result; + pds_evt.store_token = p_fds_evt->write.record_id; + break; + + case FDS_EVT_UPDATE: + pds_evt.evt_id = (p_fds_evt->result == FDS_SUCCESS) ? PDS_EVT_UPDATED : + PDS_EVT_ERROR_UPDATE; + + pds_evt.peer_id = file_id_to_peer_id(p_fds_evt->write.file_id); + pds_evt.data_id = record_key_to_peer_data_id(p_fds_evt->write.record_key); + pds_evt.result = p_fds_evt->result; + pds_evt.store_token = p_fds_evt->write.record_id; + break; + + case FDS_EVT_DEL_RECORD: + pds_evt.evt_id = (p_fds_evt->result == FDS_SUCCESS) ? PDS_EVT_CLEARED : + PDS_EVT_ERROR_CLEAR; + + pds_evt.peer_id = file_id_to_peer_id(p_fds_evt->del.file_id); + pds_evt.data_id = record_key_to_peer_data_id(p_fds_evt->del.record_key); + pds_evt.store_token = p_fds_evt->del.record_id; + break; + + case FDS_EVT_DEL_FILE: + { + if ((p_fds_evt->del.record_key == FDS_RECORD_KEY_DIRTY) && + (p_fds_evt->del.file_id != FDS_FILE_ID_INVALID)) + { + pds_evt.peer_id = file_id_to_peer_id(p_fds_evt->del.file_id); + pds_evt.data_id = record_key_to_peer_data_id(p_fds_evt->del.record_key); + + pds_evt.data_id = PM_PEER_DATA_ID_INVALID; + if (p_fds_evt->result == FDS_SUCCESS) + { + pds_evt.evt_id = PDS_EVT_PEER_ID_CLEAR; + peer_id_free(pds_evt.peer_id); + } + else + { + pds_evt.evt_id = PDS_EVT_ERROR_PEER_ID_CLEAR; + } + m_pds.clearing = false; + m_pds.clear_queued = false; + + peer_data_clear(); + } + } + break; + + case FDS_EVT_GC: + pds_evt.evt_id = PDS_EVT_COMPRESSED; + break; + + default: + send_event = false; + break; + } + + if (send_event) + { + pds_evt_send(&pds_evt); + } + + if (m_pds.clear_queued) + { + m_pds.clear_queued = false; + peer_data_clear(); + } +} + + +ret_code_t pds_register(pds_evt_handler_t evt_handler) +{ + if (m_pds.n_registrants >= MAX_REGISTRANTS) + { + return NRF_ERROR_NO_MEM; + } + + VERIFY_PARAM_NOT_NULL(evt_handler); + + if (!MODULE_INITIALIZED) + { + ret_code_t retval; + internal_state_reset(&m_pds); + peer_id_init(); + + retval = fds_register(fds_evt_handler); + if (retval != FDS_SUCCESS) + { + return NRF_ERROR_NO_MEM; + } + + retval = fds_init(); + if (retval != FDS_SUCCESS) + { + return NRF_ERROR_INTERNAL; + } + } + + m_pds.evt_handlers[m_pds.n_registrants] = evt_handler; + m_pds.n_registrants += 1; + + return NRF_SUCCESS; +} + + +ret_code_t pds_peer_data_read_ptr_get(pm_peer_id_t peer_id, + pm_peer_data_id_t data_id, + pm_peer_data_flash_t * p_data, + pm_store_token_t * p_token) +{ + ret_code_t retval; + + fds_flash_record_t record; + fds_record_desc_t record_desc; + + VERIFY_MODULE_INITIALIZED(); + VERIFY_PEER_ID_IN_RANGE(peer_id); + VERIFY_PEER_DATA_ID_IN_RANGE(data_id); + VERIFY_PARAM_NOT_NULL(p_data); + + retval = find_fds_item(peer_id, data_id, &record_desc); + if (retval != FDS_SUCCESS) + { + return NRF_ERROR_NOT_FOUND; + } + + // Shouldn't fail, unless the record was deleted. + (void)fds_record_open(&record_desc, &record); + + if (p_data != NULL) + { + p_data->data_id = data_id; + p_data->length_words = record.p_header->tl.length_words; + p_data->p_all_data = record.p_data; + } + + if (p_token != NULL) + { + *p_token = (uint32_t)record.p_header->record_id; + } + + // Shouldn't fail, unless the record was already closed. + (void)fds_record_close(&record_desc); + + return NRF_SUCCESS; +} + + +ret_code_t pds_peer_data_lock(pm_store_token_t store_token) +{ + VERIFY_MODULE_INITIALIZED(); + VERIFY_PARAM_NOT_ZERO(store_token); + + // TODO: Not implemented in fds yet. + + return NRF_SUCCESS; +} + + +ret_code_t pds_peer_data_verify(pm_store_token_t store_token) +{ + VERIFY_MODULE_INITIALIZED(); + VERIFY_PARAM_NOT_ZERO(store_token); + + // TODO: Not implemented in fds yet. + + return NRF_SUCCESS; +} + + +ret_code_t pds_peer_data_read(pm_peer_id_t peer_id, + pm_peer_data_id_t data_id, + pm_peer_data_t * p_data, + uint16_t * p_len_words) +{ + ret_code_t retval; + pm_peer_data_flash_t peer_data_flash; + + VERIFY_PEER_ID_IN_RANGE(peer_id); + VERIFY_PEER_DATA_ID_IN_RANGE(data_id); + VERIFY_PARAM_NOT_NULL(p_len_words); + VERIFY_PARAM_NOT_NULL(p_data); + + retval = pds_peer_data_read_ptr_get(peer_id, data_id, &peer_data_flash, NULL); + if (retval != NRF_SUCCESS) + { + return retval; + } + + if ((*p_len_words) == 0) + { + (*p_len_words) = peer_data_flash.length_words; + return NRF_SUCCESS; + } + else if ((*p_len_words) < peer_data_flash.length_words) + { + return NRF_ERROR_NO_MEM; + } + + VERIFY_PARAM_NOT_NULL(p_data->p_all_data); + + retval = peer_data_deserialize(&peer_data_flash, p_data); + + return retval; +} + + +ret_code_t pds_peer_data_write_prepare(pm_peer_data_const_t const * p_peer_data, + pm_prepare_token_t * p_prepare_token) +{ + ret_code_t retval; + + VERIFY_MODULE_INITIALIZED(); + VERIFY_PARAM_NOT_NULL(p_peer_data); + VERIFY_PEER_DATA_ID_IN_RANGE(p_peer_data->data_id); + //VERIFY_PARAM_NOT_NULL(p_prepare_token); redundant, see fds_reserve(). + + retval = fds_reserve((fds_reserve_token_t*)p_prepare_token, p_peer_data->length_words); + + switch (retval) + { + case FDS_SUCCESS: + return NRF_SUCCESS; + + case FDS_ERR_NULL_ARG: + return NRF_ERROR_NULL; + + case FDS_ERR_RECORD_TOO_LARGE: + return NRF_ERROR_INVALID_LENGTH; + + case FDS_ERR_NO_SPACE_IN_FLASH: + return NRF_ERROR_NO_MEM; + + default: + return NRF_ERROR_INTERNAL; + } +} + + +ret_code_t pds_peer_data_write_prepare_cancel(pm_prepare_token_t prepare_token) +{ + ret_code_t retval; + + VERIFY_MODULE_INITIALIZED(); + VERIFY_PARAM_NOT_ZERO(prepare_token); + + retval = fds_reserve_cancel((fds_reserve_token_t*)&prepare_token); + + switch (retval) + { + case FDS_SUCCESS: + return NRF_SUCCESS; + + case FDS_ERR_NULL_ARG: + return NRF_ERROR_NULL; + + default: + return NRF_ERROR_INTERNAL; + } +} + + +ret_code_t pds_peer_data_write_prepared(pm_peer_id_t peer_id, + pm_peer_data_const_t const * p_peer_data, + pm_prepare_token_t prepare_token, + pm_store_token_t * p_store_token) +{ + ret_code_t retval; + fds_record_t record; + fds_record_desc_t record_desc; + fds_record_chunk_t chunks[2]; + uint16_t n_chunks; + + VERIFY_MODULE_INITIALIZED(); + VERIFY_PEER_ID_IN_RANGE(peer_id); + VERIFY_PARAM_NOT_NULL(p_peer_data); + VERIFY_PEER_DATA_ID_IN_RANGE(p_peer_data->data_id); + VERIFY_PARAM_NOT_ZERO(prepare_token); + + // Create chunks. + peer_data_parts_get(p_peer_data, chunks, &n_chunks); + + // Prepare the record to be written. + record.file_id = peer_id_to_file_id(peer_id); + record.key = peer_data_id_to_record_key(p_peer_data->data_id); + record.data.p_chunks = chunks; + record.data.num_chunks = n_chunks; + + retval = fds_record_write_reserved(&record_desc, + &record, + (fds_reserve_token_t*)&prepare_token); + + if ((retval == FDS_SUCCESS) && (p_store_token != NULL)) + { + // If fds_record_write_reserved() returned sucessfully, it is safe + // to ignore the return value from fds_record_id_from_desc() since + // the descriptor is valid, and also p_store_token is different from NULL. + (void)fds_record_id_from_desc(&record_desc, (uint32_t*)p_store_token); + } + + switch (retval) + { + case FDS_SUCCESS: + return NRF_SUCCESS; + + case FDS_ERR_BUSY: + case FDS_ERR_NO_SPACE_IN_QUEUES: + return NRF_ERROR_BUSY; + + default: + return NRF_ERROR_INTERNAL; + } +} + + +ret_code_t pds_peer_data_write(pm_peer_id_t peer_id, + pm_peer_data_const_t const * p_peer_data, + pm_store_token_t * p_store_token) +{ + ret_code_t retval; + fds_record_t record; + fds_record_desc_t record_desc; + fds_record_chunk_t chunks[2]; + uint16_t n_chunks; + + VERIFY_MODULE_INITIALIZED(); + VERIFY_PEER_ID_IN_RANGE(peer_id); + VERIFY_PARAM_NOT_NULL(p_peer_data); + VERIFY_PEER_DATA_ID_IN_RANGE(p_peer_data->data_id); + + // Create chunks. + peer_data_parts_get(p_peer_data, chunks, &n_chunks); + + // Prepare the record to be written. + record.file_id = peer_id_to_file_id(peer_id); + record.key = peer_data_id_to_record_key(p_peer_data->data_id); + record.data.p_chunks = chunks; + record.data.num_chunks = n_chunks; + + retval = fds_record_write(&record_desc, &record); + + if ((retval == FDS_SUCCESS) && (p_store_token != NULL)) + { + // If fds_record_write() returned sucessfully, it is safe + // to ignore the return value from fds_record_id_from_desc() since + // the descriptor is valid, and also p_store_token is different from NULL. + (void)fds_record_id_from_desc(&record_desc, (uint32_t*)p_store_token); + } + + switch (retval) + { + case FDS_SUCCESS: + return NRF_SUCCESS; + + case FDS_ERR_BUSY: + case FDS_ERR_NO_SPACE_IN_QUEUES: + return NRF_ERROR_BUSY; + + case FDS_ERR_NO_SPACE_IN_FLASH: + return NRF_ERROR_NO_MEM; + + default: + return NRF_ERROR_INTERNAL; + } +} + + +ret_code_t pds_peer_data_update(pm_peer_id_t peer_id, + pm_peer_data_const_t const * p_peer_data, + pm_store_token_t old_token, + pm_store_token_t * p_store_token) +{ + ret_code_t retval; + fds_record_t record; + fds_record_desc_t record_desc; + fds_record_chunk_t chunks[2]; + uint16_t n_chunks; + + VERIFY_MODULE_INITIALIZED(); + VERIFY_PEER_ID_IN_RANGE(peer_id); + VERIFY_PARAM_NOT_NULL(p_peer_data); + VERIFY_PEER_DATA_ID_IN_RANGE(p_peer_data->data_id); + + // Create chunks. + peer_data_parts_get(p_peer_data, chunks, &n_chunks); + + // Prepare the record to be written. + record.file_id = peer_id_to_file_id(peer_id); + record.key = peer_data_id_to_record_key(p_peer_data->data_id); + record.data.p_chunks = chunks; + record.data.num_chunks = n_chunks; + + // Obtain the descriptor of the record to be updated. + // It is safe to ignore the return value if record_desc is different from NULL. + (void)fds_descriptor_from_rec_id(&record_desc, (uint32_t)old_token); + + retval = fds_record_update(&record_desc, &record); + + if ((retval == FDS_SUCCESS) && (p_store_token != NULL)) + { + // If fds_record_update() returned sucessfully, it is safe + // to ignore the return value from fds_record_id_from_desc() since + // the descriptor is valid, and also p_store_token is different from NULL. + (void)fds_record_id_from_desc(&record_desc, (uint32_t*)p_store_token); + } + + switch (retval) + { + case FDS_SUCCESS: + return NRF_SUCCESS; + + case FDS_ERR_BUSY: + case FDS_ERR_NO_SPACE_IN_QUEUES: + return NRF_ERROR_BUSY; + + case FDS_ERR_NO_SPACE_IN_FLASH: + return NRF_ERROR_NO_MEM; + + default: + return NRF_ERROR_INTERNAL; + } +} + +ret_code_t pds_peer_data_clear(pm_peer_id_t peer_id, pm_peer_data_id_t data_id) +{ + ret_code_t retval; + uint16_t file_id; + uint16_t record_key; + fds_record_desc_t record_desc; + fds_find_token_t find_tok = {0}; + + VERIFY_MODULE_INITIALIZED(); + VERIFY_PEER_ID_IN_RANGE(peer_id); + VERIFY_PEER_DATA_ID_IN_RANGE(data_id); + + file_id = peer_id_to_file_id(peer_id); + record_key = peer_data_id_to_record_key(data_id); + + retval = fds_record_find(file_id, record_key, &record_desc, &find_tok); + if(retval != FDS_SUCCESS) + { + return NRF_ERROR_NOT_FOUND; + } + + retval = fds_record_delete(&record_desc); + + switch (retval) + { + case FDS_SUCCESS: + return NRF_SUCCESS; + + case FDS_ERR_NO_SPACE_IN_QUEUES: + return NRF_ERROR_BUSY; + + default: + return NRF_ERROR_INTERNAL; + } +} + + +pm_peer_id_t pds_peer_id_allocate(void) +{ + if (!MODULE_INITIALIZED) + { + return PM_PEER_ID_INVALID; + } + PEER_IDS_INITIALIZE(); + return peer_id_allocate(PM_PEER_ID_INVALID); +} + + +ret_code_t pds_peer_id_free(pm_peer_id_t peer_id) +{ + VERIFY_MODULE_INITIALIZED(); + VERIFY_PEER_ID_IN_RANGE(peer_id); + PEER_IDS_INITIALIZE(); + + (void)peer_id_delete(peer_id); + peer_data_clear(); + + return NRF_SUCCESS; +} + + +bool pds_peer_id_is_allocated(pm_peer_id_t peer_id) +{ + if (!MODULE_INITIALIZED) + { + return false; + } + PEER_IDS_INITIALIZE(); + + return peer_id_is_allocated(peer_id); +} + + +pm_peer_id_t pds_next_peer_id_get(pm_peer_id_t prev_peer_id) +{ + if (!MODULE_INITIALIZED) + { + return PM_PEER_ID_INVALID; + } + PEER_IDS_INITIALIZE(); + + return peer_id_get_next_used(prev_peer_id); +} + + +uint32_t pds_n_peers(void) +{ + if (!MODULE_INITIALIZED) + { + return 0; + } + PEER_IDS_INITIALIZE(); + return peer_id_n_ids(); +} + +//lint -restore diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data_storage.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data_storage.h new file mode 100644 index 0000000000..c9c841d770 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data_storage.h @@ -0,0 +1,354 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#ifndef PEER_DATA_STORAGE_H__ +#define PEER_DATA_STORAGE_H__ + + +#include +#include "sdk_errors.h" +#include "ble_gap.h" +#include "peer_manager_types.h" +#include "peer_manager_internal.h" + + +/** + * @cond NO_DOXYGEN + * @defgroup peer_data_storage Peer Data Storage + * @ingroup peer_manager + * @{ + * @brief An internal module of @ref peer_manager. This module provides a Peer Manager-specific API + * to the persistent storage. + */ + +#define PDS_PREPARE_TOKEN_INVALID 0 /**< Invalid value for prepare token. */ + +enum +{ + PEER_ID_TO_FILE_ID = 0xC000, + FILE_ID_TO_PEER_ID = -PEER_ID_TO_FILE_ID, + PEER_DATA_ID_TO_RECORD_KEY = 0xC000, + RECORD_KEY_TO_PEER_DATA_ID = -PEER_DATA_ID_TO_RECORD_KEY, +}; + + +/**@brief The types of events that can come from the peer_data_storage module. + */ +typedef enum +{ + PDS_EVT_STORED, /**< The specified data has been successfully stored. */ + PDS_EVT_UPDATED, /**< The specified data has been successfully updated. */ + PDS_EVT_CLEARED, /**< The specified data has been successfully cleared. */ + PDS_EVT_ERROR_STORE, /**< The specified data could not be stored. */ + PDS_EVT_ERROR_UPDATE, /**< The specified data could not be updated. */ + PDS_EVT_ERROR_CLEAR, /**< The specified data could not be cleared. */ + PDS_EVT_PEER_ID_CLEAR, /**< The peer id has been successfully cleared. */ + PDS_EVT_ERROR_PEER_ID_CLEAR, /**< The peer id has been successfully cleared. */ + PDS_EVT_COMPRESSED, /**< A compress procedure has finished successfully. */ + PDS_EVT_ERROR_UNEXPECTED, /**< An unexpected, possibly fatal error occurred. The unexpected error is included in the event structure. */ +} pds_evt_id_t; + + +/**@brief Events that can come from the peer_data_storage module. + */ +typedef struct +{ + pds_evt_id_t evt_id; /**< The type of event. */ + pm_peer_id_t peer_id; /**< The peer the event pertains to. */ + pm_peer_data_id_t data_id; /**< The data the event pertains to. */ + pm_store_token_t store_token; /**< A unique identifier for the operation. Can be compare to the token received when starting the operation. */ + ret_code_t result; /**< The result of the operation, or the unexpected error. */ +} pds_evt_t; + + +/**@brief Event handler for events from the peer_data_storage module. + * + * @param[in] event The event that has happened. + * @param[in] peer_id The id of the peer the event pertains to. + * @param[in] flags The data the event pertains to. + */ +typedef void (*pds_evt_handler_t)(pds_evt_t const * p_event); + + +/**@brief Function for registering for events from the peer database. + * + * @note This function will initialize the module if it is not already initialized. + * + * @param[in] evt_handler Event handler to register. + * + * @retval NRF_SUCCESS Registration successful. + * @retval NRF_ERROR_NO_MEM No more event handlers can be registered. + * @retval NRF_ERROR_NULL evt_handler was NULL. + * @retval NRF_ERROR_INTERNAL An unexpected error happened. + * @retval NRF_ERROR_INTERNAL Unexpected error. + */ +ret_code_t pds_register(pds_evt_handler_t evt_handler); + + +/**@brief Function for retrieving a direct pointer to peer data in persistent storage. + * + * @param[in] peer_id The id of the peer whose data to read. + * @param[in] data_id Which data to get. + * @param[out] p_data The peer data pointer. + * @param[out] p_token Token that can be used to lock data in flash and check data validity. + * + * @retval NRF_SUCCESS The pointer was successfully retrieved. + * @retval NRF_ERROR_INVALID_PARAM Invalid data_id. + * @retval NRF_ERROR_NOT_FOUND The requested data was not found in persistent storage. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + */ +ret_code_t pds_peer_data_read_ptr_get(pm_peer_id_t peer_id, + pm_peer_data_id_t data_id, + pm_peer_data_flash_t * p_data, + pm_store_token_t * p_token); + + +#if 0 +// @TODO: Finish documentation +/**@brief Function to lock the flash data (to defer compression from invalidating data) + * + * @param[in] store_token The token representing the item to lock + * + * @retval NRF_SUCCESS Successfully locked + */ +ret_code_t pds_peer_data_lock(pm_store_token_t store_token); + + +/**@brief Function to verify flash data integrity + * + * @param[in] store_token The token representing the item to lock + * + * @retval NRF_SUCCESS The data integrity is valid. + * @retval NRF_ERROR_NULL The token is invalid. + * @retval NRF_ERROR_INVALID_DATA The data integrity is not valid. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + */ +ret_code_t pds_peer_data_verify(pm_store_token_t store_token); +#endif + + +/**@brief Function for retrieving peer data from persistent storage by making a copy. + * + * @param[in] peer_id The id of the peer whose data to read. + * @param[in] data_id Which piece of data to read. + * @param[out] p_data Pointer to the peer data. + * @param[in,out] p_len_words Length available to copy to (in words). + * If set to NULL, then no copy will be made and the + * length will be reflected in p_len_words after the call returns. + * + * @retval NRF_SUCCESS The read was successful. + * @retval NRF_ERROR_INVALID_PARAM Invalid data_id or peer_id. + * @retval NRF_ERROR_NULL Either \c p_data or \c p_len_words were \c NULL, or \c p_data + * contained a NULL pointer. + * @retval NRF_ERROR_NOT_FOUND The requested data was not found in persistent storage. + * @retval NRF_ERROR_NO_MEM The length of stored data too large to copy out. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + */ +ret_code_t pds_peer_data_read(pm_peer_id_t peer_id, + pm_peer_data_id_t data_id, + pm_peer_data_t * p_data, + uint16_t * p_len_words); + + +/**@brief Function for preparing persistent storage for a write. + * + * @details If this call succeeds, space is reserved in persistent storage, so the write will fit. + * + * @note If space has already been prepared for this peer_id/data_id pair, no new space will be + * reserved, unless the previous reservation had too small size. + * + * @param[in] p_peer_data Data to prepare for. The data needs not be ready, but length and type + * values must. + * @param[out] p_prepare_token A token identifying the prepared memory area. + * + * @retval NRF_SUCCESS The call was successful. + * @retval NRF_ERROR_NULL Either \c p_peer_data or \c p_prepare code were \c NULL. + * @retval NRF_ERROR_INVALID_PARAM Invalid data ID. + * @retval NRF_ERROR_INVALID_LENGTH Data length exceeds the maximum length allowed. + * @retval NRF_ERROR_NO_MEM No space available in persistent storage. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + * @retval NRF_ERROR_INTERNAL Internal error. + */ +ret_code_t pds_peer_data_write_prepare(pm_peer_data_const_t const * p_peer_data, + pm_prepare_token_t * p_prepare_token); + + +/**@brief Function for undoing a previous call to @ref pds_peer_data_write_prepare. + * + * @param[in] prepare_token A token identifying the prepared memory area to cancel. + * + * @retval NRF_SUCCESS The call was successful. + * @retval NRF_ERROR_NULL Invalid value for \c prepare_token. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + * @retval NRF_ERROR_INTERNAL Internal error. + */ +ret_code_t pds_peer_data_write_prepare_cancel(pm_prepare_token_t prepare_token); + + +/**@brief Function for writing prepared (reserved) peer data to persistent storage. + * + * @details Writing happens asynchronously. Expect a @ref PDS_EVT_STORED or @ref PDS_EVT_ERROR_STORE + * event. + * + * @param[in] peer_id The id of the peer the data pertains to. + * @param[in] p_peer_data The peer data. + * @param[in] prepare_token A token identifying the prepared memory area to write into. If + * the prepare token is invalid, e.g. PDS_PREPARE_TOKEN_INVALID, the + * prepare/write sequence will happen atomically. + * @param[out] p_store_token A token identifying this particular store operation. The token can be + * used to identify events pertaining to this operation. + * + * @retval NRF_SUCCESS The write was initiated successfully. + * @retval NRF_ERROR_INVALID_PARAM Invalid peer ID or data ID. + * @retval NRF_ERROR_NULL \c p_peer_data was \c NULL or contained a \c NULL pointer or + * \c prepare_token was zero. + * @retval NRF_ERROR_NO_MEM No space available in persistent storage. This can only happen + * if \c p_prepare_token is \c NULL. + * @retval NRF_ERROR_BUSY FDS or underlying modules are busy and can't take any + * more requests. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + * @retval NRF_ERROR_INTERNAL Internal error. + */ +ret_code_t pds_peer_data_write_prepared(pm_peer_id_t peer_id, + pm_peer_data_const_t const * p_peer_data, + pm_prepare_token_t prepare_token, + pm_store_token_t * p_store_token); + + +/**@brief Function for writing peer data to persistent storage. + * + * @details Writing happens asynchronously. Expect a @ref PDS_EVT_STORED or @ref PDS_EVT_ERROR_STORE + * event. + * + * @param[in] peer_id The id of the peer the data pertains to. + * @param[in] p_peer_data The peer data. + * @param[out] p_store_token A token identifying this particular store operation. The token can be + * used to identify events pertaining to this operation. + * + * @retval NRF_SUCCESS The write was initiated successfully. + * @retval NRF_ERROR_INVALID_PARAM Invalid data ID or peer ID. + * @retval NRF_ERROR_NULL \c p_peer_data was \c NULL or data contained a \c NULL pointer. + * @retval NRF_ERROR_NO_MEM No space available in persistent storage. + * @retval NRF_ERROR_BUSY FDS or underlying modules are busy and can't take any + * more requests. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + * @retval NRF_ERROR_INTERNAL Internal error. + */ +ret_code_t pds_peer_data_write(pm_peer_id_t peer_id, + pm_peer_data_const_t const * p_peer_data, + pm_store_token_t * p_store_token); + + +/**@brief Function for updating currently stored peer data to a new version + * + * @details Updating happens asynchronously. + * Expect a @ref PDS_EVT_STORED or @ref PDS_EVT_ERROR_STORE for the store token + * and a @ref PDS_EVT_ERROR_CLEAR or @ref PDS_EVT_ERROR_CLEAR for the old token + * + * @param[in] peer_id The peer which the data is associated to. + * @param[in] p_peer_data New data. + * @param[in] old_token Store token for the old data. + * @param[out] p_store_token Store token for the new data. + * + * @retval NRF_SUCESS The update was initiated successfully + * @retval NRF_ERROR_NULL \c p_peer_data was \c NULL or data contained a \c NULL pointer. + * @retval NRF_ERROR_NO_MEM No space available in persistent storage. + * @retval NRF_ERROR_BUSY FDS or underlying modules are busy and can't take any + * more requests at this moment. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + * @retval NRF_ERROR_INTERNAL Internal error. + */ +ret_code_t pds_peer_data_update(pm_peer_id_t peer_id, + pm_peer_data_const_t const * p_peer_data, + pm_store_token_t old_token, + pm_store_token_t * p_store_token); + + +/**@brief Function for clearing peer data from persistent storage. + * + * @details Clearing happens asynchronously. Expect a @ref PDS_EVT_CLEARED or @ref PDS_EVT_ERROR_CLEAR + * event. + * + * @param[in] peer_id The id of the peer the data pertains to. + * @param[in] data_id Which data to clear. + * + * @retval NRF_SUCCESS The clear was initiated successfully. + * @retval NRF_ERROR_INVALID_PARAM Data ID or peer ID was invalid. + * @retval NRF_ERROR_NOT_FOUND Nothing to clear for this peer ID. + * @retval NRF_ERROR_BUSY FDS or underlying modules are busy and can't take any + * more requests at this moment. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + * @retval NRF_ERROR_INTERNAL Internal error. + */ +ret_code_t pds_peer_data_clear(pm_peer_id_t peer_id, pm_peer_data_id_t data_id); + + +/**@brief Function for claiming an unused peer ID. + * + * @return The first unused peer ID. + * @retval PM_PEER_ID_INVALID If no peer ID is available or module is not initialized. + */ +pm_peer_id_t pds_peer_id_allocate(void); + + +/**@brief Function for freeing a peer ID and clearing all data associated with it in persistent + * storage. + * + * @param[in] peer_id Peer ID to free. + * + * @retval NRF_SUCCESS The clear was initiated successfully. + * @retval NRF_ERROR_INVALID_STATE Module not initialized. + * @retval NRF_ERROR_INVALID_PARAM Invalid peer ID. + */ +ret_code_t pds_peer_id_free(pm_peer_id_t peer_id); + + +/**@brief Function for finding out whether a peer ID is in use. + * + * @param[in] peer_id The peer ID to inquire about. + * + * @retval true peer_id is in use. + * @retval false peer_id is free, or the module is not initialized. + */ +bool pds_peer_id_is_allocated(pm_peer_id_t peer_id); + + +/**@brief Function for getting the next peer ID in the sequence of all used peer IDs. Can be + * used to loop through all used peer IDs. + * + * @note @ref PM_PEER_ID_INVALID is considered to be before the first and after the last ordinary + * peer ID. + * + * @param[in] prev_peer_id The previous peer ID. + * + * @return The next peer ID. + * @return The first ordinary peer ID if prev_peer_id was @ref PM_PEER_ID_INVALID. + * @retval PM_PEER_ID_INVALID if prev_peer_id was the last ordinary peer ID or the module + * is not initialized. + */ +pm_peer_id_t pds_next_peer_id_get(pm_peer_id_t prev_peer_id); + + +/**@brief Function for querying the number of valid peer IDs available. I.E the number of peers + * in persistent storage. + * + * @return The number of valid peer IDs, or 0 if module is not initialized. + */ +uint32_t pds_n_peers(void); + + +/** @} + * @endcond + */ + +#endif /* PEER_DATA_STORAGE_H__ */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_database.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_database.c new file mode 100644 index 0000000000..87ba30ff57 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_database.c @@ -0,0 +1,777 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#include "peer_database.h" + +#include +#include "app_util.h" +#include "peer_manager_types.h" +#include "peer_manager_internal.h" +#include "peer_data_storage.h" +#include "pm_buffer.h" +#include "sdk_common.h" + +#define MAX_REGISTRANTS 6 /**< The number of user that can register with the module. */ + +#define N_WRITE_BUFFERS 8 /**< The number of write buffers available. */ +#define N_WRITE_BUFFER_RECORDS (N_WRITE_BUFFERS) /**< The number of write buffer records. */ + +/**@brief Macro for verifying that the data ID is among the values eligible for using the write buffer. + * + * @param[in] data_id The data ID to verify. + */ +#define VERIFY_DATA_ID_WRITE_BUF(data_id) \ +do \ +{ \ + if (((data_id) != PM_PEER_DATA_ID_BONDING) && ((data_id) != PM_PEER_DATA_ID_GATT_LOCAL)) \ + { \ + return NRF_ERROR_INVALID_PARAM; \ + } \ +} while(0) + + +/**@brief Struct for keeping track of one write buffer, from allocation, until it is fully written + * or cancelled. + */ +typedef struct +{ + pm_peer_id_t peer_id; /**< The peer ID this buffer belongs to. */ + pm_peer_data_id_t data_id; /**< The data ID this buffer belongs to. */ + uint8_t buffer_block_id; /**< The index of the first (or only) buffer block containing peer data. */ + uint32_t n_bufs; /**< The number of buffer blocks containing peer data. */ + uint8_t store_busy : 1; /**< Flag indicating that the buffer was attempted written to flash, but a busy error was returned and the operation should be retried. */ + uint8_t store_flash_full : 1; /**< Flag indicating that the buffer was attempted written to flash, but a flash full error was returned and the operation should be retried after room has been made. */ + uint8_t store_requested : 1; /**< Flag indicating that the buffer is being written to flash. */ + pm_prepare_token_t prepare_token; /**< Token given by Peer Data Storage if room in flash has been reserved. */ + pm_store_token_t store_token; /**< Token given by Peer Data Storage when a flash write has been successfully requested. */ +} pdb_buffer_record_t; + +/**@brief Struct for keeping track of the state of the module. + */ +typedef struct +{ + pdb_evt_handler_t evt_handlers[MAX_REGISTRANTS]; /**< All registered event handlers. */ + uint8_t n_registrants; /**< The number of registered event handlers. */ + pm_buffer_t write_buffer; /**< The state of the write buffer. */ + pdb_buffer_record_t write_buffer_records[N_WRITE_BUFFER_RECORDS]; /**< The available write buffer records. */ + uint32_t n_writes; /**< The number of pending (Not yet successfully requested in Peer Data Storage) store operations. */ +} pdb_t; + +static pdb_t m_pdb = {.n_registrants = 0}; /**< The state of the module. */ + +#define MODULE_INITIALIZED (m_pdb.n_registrants > 0) /**< Expression which is true when the module is initialized. */ +#include "sdk_macros.h" + +/**@brief Function for invalidating a record of a write buffer allocation. + * + * @param[in] p_record The record to invalidate. + */ +static void write_buffer_record_invalidate(pdb_buffer_record_t * p_record) +{ + p_record->peer_id = PM_PEER_ID_INVALID; + p_record->data_id = PM_PEER_DATA_ID_INVALID; + p_record->buffer_block_id = BUFFER_INVALID_ID; + p_record->store_busy = false; + p_record->store_flash_full = false; + p_record->store_requested = false; + p_record->n_bufs = 0; + p_record->prepare_token = PDS_PREPARE_TOKEN_INVALID; + p_record->store_token = PM_STORE_TOKEN_INVALID; +} + + +/**@brief Function for finding a record of a write buffer allocation. + * + * @param[in] peer_id The peer ID in the record. + * @param[inout] p_index In: The starting index, out: The index of the record + * + * @return A pointer to the matching record, or NULL if none was found. + */ +static pdb_buffer_record_t * write_buffer_record_find_next(pm_peer_id_t peer_id, int * p_index) +{ + for (uint32_t i = *p_index; i < N_WRITE_BUFFER_RECORDS; i++) + { + if ((m_pdb.write_buffer_records[i].peer_id == peer_id)) + { + return &m_pdb.write_buffer_records[i]; + } + } + return NULL; +} + + +/**@brief Function for finding a record of a write buffer allocation. + * + * @param[in] peer_id The peer ID in the record. + * @param[in] data_id The data ID in the record. + * + * @return A pointer to the matching record, or NULL if none was found. + */ +static pdb_buffer_record_t * write_buffer_record_find(pm_peer_id_t peer_id, + pm_peer_data_id_t data_id) +{ + int index = 0; + pdb_buffer_record_t * p_record = write_buffer_record_find_next(peer_id, &index); + + while ((p_record != NULL) && (p_record->data_id != data_id)) + { + index++; + p_record = write_buffer_record_find_next(peer_id, &index); + } + + return p_record; +} + + +/**@brief Function for finding an available record for write buffer allocation. + * + * @return A pointer to the available record, or NULL if none was found. + */ +static pdb_buffer_record_t * write_buffer_record_find_unused(void) +{ + return write_buffer_record_find(PM_PEER_ID_INVALID, PM_PEER_DATA_ID_INVALID); +} + + +/**@brief Function for gracefully deactivating a write buffer record. + * + * @details This function will first release any buffers, then invalidate the record. + * + * @param[inout] p_write_buffer_record The record to release. + * + * @return A pointer to the matching record, or NULL if none was found. + */ +static void write_buffer_record_release(pdb_buffer_record_t * p_write_buffer_record) +{ + for (uint32_t i = 0; i < p_write_buffer_record->n_bufs; i++) + { + pm_buffer_release(&m_pdb.write_buffer, p_write_buffer_record->buffer_block_id + i); + } + + write_buffer_record_invalidate(p_write_buffer_record); +} + + +/**@brief Function for claiming and activating a write buffer record. + * + * @param[out] pp_write_buffer_record The claimed record. + * @param[in] peer_id The peer ID this record should have. + * @param[in] data_id The data ID this record should have. + */ +static void write_buffer_record_get(pdb_buffer_record_t ** pp_write_buffer_record, pm_peer_id_t peer_id, pm_peer_data_id_t data_id) +{ + if (pp_write_buffer_record == NULL) + { + return; + } + *pp_write_buffer_record = write_buffer_record_find_unused(); + if (*pp_write_buffer_record == NULL) + { + // This also means the buffer is full. + return; + } + (*pp_write_buffer_record)->peer_id = peer_id; + (*pp_write_buffer_record)->data_id = data_id; +} + + +/**@brief Function for dispatching outbound events to all registered event handlers. + * + * @param[in] p_event The event to dispatch. + */ +static void pdb_evt_send(pdb_evt_t * p_event) +{ + for (uint32_t i = 0; i < m_pdb.n_registrants; i++) + { + m_pdb.evt_handlers[i](p_event); + } +} + + +/**@brief Function for resetting the internal state of the Peer Database module. + * + * @param[out] p_event The event to dispatch. + */ +static void internal_state_reset(pdb_t * pdb) +{ + memset(pdb, 0, sizeof(pdb_t)); + for (uint32_t i = 0; i < N_WRITE_BUFFER_RECORDS; i++) + { + write_buffer_record_invalidate(&pdb->write_buffer_records[i]); + } +} + + +/**@brief Function for handling events from the Peer Data Storage module. + * + * @param[in] p_event The event to handle. + */ +static void pds_evt_handler(pds_evt_t const * p_event) +{ + ret_code_t err_code; + pdb_buffer_record_t * p_write_buffer_record; + bool retry_flash_full = false; + pdb_evt_t event = + { + .peer_id = p_event->peer_id, + .data_id = p_event->data_id, + }; + + p_write_buffer_record = write_buffer_record_find(p_event->peer_id, p_event->data_id); + + switch (p_event->evt_id) + { + case PDS_EVT_STORED: + case PDS_EVT_UPDATED: + if ( (p_write_buffer_record != NULL) + //&& (p_write_buffer_record->store_token == p_event->store_token) + && (p_write_buffer_record->store_requested)) + { + write_buffer_record_release(p_write_buffer_record); + event.evt_id = PDB_EVT_WRITE_BUF_STORED; + event.params.write_buf_stored_evt.update = (p_event->evt_id == PDS_EVT_UPDATED); + pdb_evt_send(&event); + } + else + { + event.evt_id = PDB_EVT_RAW_STORED; + event.params.raw_stored_evt.store_token = p_event->store_token; + pdb_evt_send(&event); + } + break; + case PDS_EVT_ERROR_STORE: + case PDS_EVT_ERROR_UPDATE: + if ( (p_write_buffer_record != NULL) + && (p_write_buffer_record->store_token == p_event->store_token) + && (p_write_buffer_record->store_requested)) + { + // Retry if internal buffer. + m_pdb.n_writes++; + p_write_buffer_record->store_requested = false; + p_write_buffer_record->store_busy = true; + } + else + { + event.evt_id = PDB_EVT_RAW_STORE_FAILED; + event.params.error_raw_store_evt.err_code = p_event->result; + pdb_evt_send(&event); + } + break; + case PDS_EVT_CLEARED: + event.evt_id = PDB_EVT_CLEARED; + pdb_evt_send(&event); + break; + case PDS_EVT_ERROR_CLEAR: + event.evt_id = PDB_EVT_CLEAR_FAILED; + event.params.clear_failed_evt.err_code = p_event->result; + pdb_evt_send(&event); + break; + case PDS_EVT_PEER_ID_CLEAR: + event.evt_id = PDB_EVT_PEER_FREED; + pdb_evt_send(&event); + break; + case PDS_EVT_ERROR_PEER_ID_CLEAR: + event.evt_id = PDB_EVT_PEER_FREE_FAILED; + event.params.peer_free_failed_evt.err_code = p_event->result; + pdb_evt_send(&event); + break; + case PDS_EVT_COMPRESSED: + retry_flash_full = true; + event.evt_id = PDB_EVT_COMPRESSED; + pdb_evt_send(&event); + break; + case PDS_EVT_ERROR_UNEXPECTED: + event.params.error_unexpected.err_code = p_event->result; + break; + default: + break; + } + + if (m_pdb.n_writes > 0) + { + for (uint32_t i = 0; i < N_WRITE_BUFFER_RECORDS; i++) + { + if ((m_pdb.write_buffer_records[i].store_busy) + || (m_pdb.write_buffer_records[i].store_flash_full && retry_flash_full)) + { + err_code = pdb_write_buf_store(m_pdb.write_buffer_records[i].peer_id, + m_pdb.write_buffer_records[i].data_id); + if (err_code != NRF_SUCCESS) + { + event.peer_id = m_pdb.write_buffer_records[i].peer_id; + event.data_id = m_pdb.write_buffer_records[i].data_id; + if (err_code == NRF_ERROR_NO_MEM) + { + event.evt_id = PDB_EVT_ERROR_NO_MEM; + } + else + { + event.evt_id = PDB_EVT_ERROR_UNEXPECTED; + event.params.error_unexpected.err_code = err_code; + } + + pdb_evt_send(&event); + break; + } + } + } + } +} + + +ret_code_t pdb_register(pdb_evt_handler_t evt_handler) +{ + if (m_pdb.n_registrants >= MAX_REGISTRANTS) + { + return NRF_ERROR_NO_MEM; + } + + VERIFY_PARAM_NOT_NULL(evt_handler); + + if (!MODULE_INITIALIZED) + { + ret_code_t err_code; + + internal_state_reset(&m_pdb); + err_code = pds_register(pds_evt_handler); + if (err_code != NRF_SUCCESS) + { + return NRF_ERROR_INTERNAL; + } + PM_BUFFER_INIT(&m_pdb.write_buffer, N_WRITE_BUFFERS, PDB_WRITE_BUF_SIZE, err_code); + if (err_code != NRF_SUCCESS) + { + return NRF_ERROR_INTERNAL; + } + } + + m_pdb.evt_handlers[m_pdb.n_registrants] = evt_handler; + m_pdb.n_registrants += 1; + + return NRF_SUCCESS; +} + + +pm_peer_id_t pdb_peer_allocate(void) +{ + if (!MODULE_INITIALIZED) + { + return PM_PEER_ID_INVALID; + } + + return pds_peer_id_allocate(); +} + + +ret_code_t pdb_peer_free(pm_peer_id_t peer_id) +{ + VERIFY_MODULE_INITIALIZED(); + ret_code_t err_code_in = NRF_SUCCESS; + ret_code_t err_code_out = NRF_SUCCESS; + + int index = 0; + pdb_buffer_record_t * p_record = write_buffer_record_find_next(peer_id, &index); + + while (p_record != NULL) + { + err_code_in = pdb_write_buf_release(peer_id, p_record->data_id); + + if ( (err_code_in != NRF_SUCCESS) + && (err_code_in != NRF_ERROR_NOT_FOUND)) + { + err_code_out = NRF_ERROR_INTERNAL; + } + + index++; + p_record = write_buffer_record_find_next(peer_id, &index); + } + + if (err_code_out == NRF_SUCCESS) + { + err_code_in = pds_peer_id_free(peer_id); + + if (err_code_in == NRF_SUCCESS) + { + // No action needed. + } + else if (err_code_in == NRF_ERROR_INVALID_PARAM) + { + err_code_out = NRF_ERROR_INVALID_PARAM; + } + else + { + err_code_out = NRF_ERROR_INTERNAL; + } + } + + return err_code_out; +} + + +ret_code_t pdb_read_buf_get(pm_peer_id_t peer_id, + pm_peer_data_id_t data_id, + pm_peer_data_flash_t * p_peer_data, + pm_store_token_t * p_token) +{ + VERIFY_MODULE_INITIALIZED(); + + return pds_peer_data_read_ptr_get(peer_id, data_id, p_peer_data, p_token); +} + + +static void peer_data_point_to_buffer(pm_peer_data_t * p_peer_data, pm_peer_data_id_t data_id, uint8_t * p_buffer_memory, uint16_t n_bufs) +{ + uint16_t n_bytes = n_bufs * PDB_WRITE_BUF_SIZE; + p_peer_data->data_id = data_id; + + p_peer_data->p_all_data = (pm_peer_data_bonding_t *)p_buffer_memory; + p_peer_data->length_words = BYTES_TO_WORDS(n_bytes); +} + + +static void peer_data_const_point_to_buffer(pm_peer_data_const_t * p_peer_data, pm_peer_data_id_t data_id, uint8_t * p_buffer_memory, uint32_t n_bufs) +{ + peer_data_point_to_buffer((pm_peer_data_t*)p_peer_data, data_id, p_buffer_memory, n_bufs); +} + + +static void write_buf_length_words_set(pm_peer_data_const_t * p_peer_data) +{ + switch (p_peer_data->data_id) + { + case PM_PEER_DATA_ID_BONDING: + p_peer_data->length_words = PM_BONDING_DATA_N_WORDS(); + break; + case PM_PEER_DATA_ID_SERVICE_CHANGED_PENDING: + p_peer_data->length_words = PM_SC_STATE_N_WORDS(); + break; + case PM_PEER_DATA_ID_PEER_RANK: + p_peer_data->length_words = PM_USAGE_INDEX_N_WORDS(); + break; + case PM_PEER_DATA_ID_GATT_LOCAL: + p_peer_data->length_words = PM_LOCAL_DB_N_WORDS(p_peer_data->p_local_gatt_db->len); + break; + default: + // No action needed. + break; + } +} + + +ret_code_t pdb_write_buf_get(pm_peer_id_t peer_id, + pm_peer_data_id_t data_id, + uint32_t n_bufs, + pm_peer_data_t * p_peer_data) +{ + VERIFY_MODULE_INITIALIZED(); + VERIFY_PARAM_NOT_NULL(p_peer_data); + VERIFY_DATA_ID_WRITE_BUF(data_id); + if ( (n_bufs == 0) + || (n_bufs > N_WRITE_BUFFERS) + || !pds_peer_id_is_allocated(peer_id)) + { + return NRF_ERROR_INVALID_PARAM; + } + + pdb_buffer_record_t * write_buffer_record; + uint8_t * p_buffer_memory; + bool new_record = false; + + write_buffer_record = write_buffer_record_find(peer_id, data_id); + + if ((write_buffer_record != NULL) && (write_buffer_record->n_bufs < n_bufs)) + { + // @TODO: Copy? + // Existing buffer is too small. + for (uint8_t i = 0; i < write_buffer_record->n_bufs; i++) + { + pm_buffer_release(&m_pdb.write_buffer, write_buffer_record->buffer_block_id + i); + } + write_buffer_record_invalidate(write_buffer_record); + write_buffer_record = NULL; + } + else if ((write_buffer_record != NULL) && write_buffer_record->n_bufs > n_bufs) + { + // Release excess blocks. + for (uint8_t i = n_bufs; i < write_buffer_record->n_bufs; i++) + { + pm_buffer_release(&m_pdb.write_buffer, write_buffer_record->buffer_block_id + i); + } + } + + if (write_buffer_record == NULL) + { + write_buffer_record_get(&write_buffer_record, peer_id, data_id); + if (write_buffer_record == NULL) + { + return NRF_ERROR_BUSY; + } + } + + if (write_buffer_record->buffer_block_id == BUFFER_INVALID_ID) + { + write_buffer_record->buffer_block_id = pm_buffer_block_acquire(&m_pdb.write_buffer, n_bufs); + + if (write_buffer_record->buffer_block_id == BUFFER_INVALID_ID) + { + write_buffer_record_invalidate(write_buffer_record); + return NRF_ERROR_BUSY; + } + + new_record = true; + } + + write_buffer_record->n_bufs = n_bufs; + + p_buffer_memory = pm_buffer_ptr_get(&m_pdb.write_buffer, write_buffer_record->buffer_block_id); + + if (p_buffer_memory == NULL) + { + return NRF_ERROR_INTERNAL; + } + + peer_data_point_to_buffer(p_peer_data, data_id, p_buffer_memory, n_bufs); + if (new_record && (data_id == PM_PEER_DATA_ID_GATT_LOCAL)) + { + p_peer_data->p_local_gatt_db->len = PM_LOCAL_DB_LEN(p_peer_data->length_words); + } + + return NRF_SUCCESS; +} + + +ret_code_t pdb_write_buf_release(pm_peer_id_t peer_id, pm_peer_data_id_t data_id) +{ + VERIFY_MODULE_INITIALIZED(); + + ret_code_t err_code = NRF_SUCCESS; + pdb_buffer_record_t * p_write_buffer_record; + p_write_buffer_record = write_buffer_record_find(peer_id, data_id); + + if (p_write_buffer_record == NULL) + { + return NRF_ERROR_NOT_FOUND; + } + + if (p_write_buffer_record->prepare_token != PDS_PREPARE_TOKEN_INVALID) + { + err_code = pds_peer_data_write_prepare_cancel(p_write_buffer_record->prepare_token); + if (err_code != NRF_SUCCESS) + { + err_code = NRF_ERROR_INTERNAL; + } + } + + write_buffer_record_release(p_write_buffer_record); + + return err_code; +} + + +ret_code_t pdb_write_buf_store_prepare(pm_peer_id_t peer_id, pm_peer_data_id_t data_id) +{ + VERIFY_MODULE_INITIALIZED(); + VERIFY_DATA_ID_WRITE_BUF(data_id); + + ret_code_t err_code = NRF_SUCCESS; + pdb_buffer_record_t * p_write_buffer_record; + p_write_buffer_record = write_buffer_record_find(peer_id, data_id); + + if (p_write_buffer_record == NULL) + { + return NRF_ERROR_NOT_FOUND; + } + + if (p_write_buffer_record->prepare_token == PDS_PREPARE_TOKEN_INVALID) + { + uint8_t * p_buffer_memory = pm_buffer_ptr_get(&m_pdb.write_buffer, p_write_buffer_record->buffer_block_id); + pm_peer_data_const_t peer_data = {.data_id = data_id}; + + if (p_buffer_memory == NULL) + { + return NRF_ERROR_INTERNAL; + } + + peer_data_const_point_to_buffer(&peer_data, data_id, p_buffer_memory, p_write_buffer_record->n_bufs); + + write_buf_length_words_set(&peer_data); + + err_code = pds_peer_data_write_prepare(&peer_data, &p_write_buffer_record->prepare_token); + if (err_code == NRF_ERROR_INVALID_LENGTH) + { + return NRF_ERROR_INTERNAL; + } + } + + return err_code; +} + + +static ret_code_t write_or_update(pm_peer_id_t peer_id, + pm_peer_data_id_t data_id, + pm_peer_data_const_t * p_peer_data, + pm_store_token_t * p_store_token, + pm_prepare_token_t prepare_token) +{ + pm_peer_data_flash_t old_peer_data; + pm_store_token_t old_store_token; + ret_code_t err_code = pds_peer_data_read_ptr_get(peer_id, data_id, &old_peer_data, &old_store_token); + + if (err_code == NRF_SUCCESS) + { + err_code = pds_peer_data_write_prepare_cancel(prepare_token); + if ((err_code == NRF_SUCCESS) || (err_code == NRF_ERROR_NULL)) + { + err_code = pds_peer_data_update(peer_id, p_peer_data, old_store_token, p_store_token); + } + else + { + err_code = NRF_ERROR_INTERNAL; + } + } + else if (err_code == NRF_ERROR_NOT_FOUND) + { + if (prepare_token == PDS_PREPARE_TOKEN_INVALID) + { + err_code = pds_peer_data_write(peer_id, p_peer_data, p_store_token); + } + else + { + err_code = pds_peer_data_write_prepared(peer_id, p_peer_data, prepare_token, p_store_token); + } + } + return err_code; +} + + +ret_code_t pdb_write_buf_store(pm_peer_id_t peer_id, + pm_peer_data_id_t data_id) +{ + VERIFY_MODULE_INITIALIZED(); + VERIFY_DATA_ID_WRITE_BUF(data_id); + + ret_code_t err_code = NRF_SUCCESS; + pdb_buffer_record_t * p_write_buffer_record; + uint8_t * p_buffer_memory; + pm_peer_data_const_t peer_data = {.data_id = data_id}; + + + p_write_buffer_record = write_buffer_record_find(peer_id, data_id); + + if (p_write_buffer_record == NULL) + { + return NRF_ERROR_NOT_FOUND; + } + + if (p_write_buffer_record->store_requested) + { + return NRF_SUCCESS; + } + + p_buffer_memory = pm_buffer_ptr_get(&m_pdb.write_buffer, p_write_buffer_record->buffer_block_id); + + if (p_buffer_memory == NULL) + { + return NRF_ERROR_INTERNAL; + } + + peer_data_const_point_to_buffer(&peer_data, data_id, p_buffer_memory, p_write_buffer_record->n_bufs); + + write_buf_length_words_set(&peer_data); + + err_code = write_or_update(peer_id, data_id, &peer_data, &p_write_buffer_record->store_token, p_write_buffer_record->prepare_token); + + if (p_write_buffer_record->store_busy && p_write_buffer_record->store_flash_full) + { + m_pdb.n_writes--; + } + + if (err_code == NRF_SUCCESS) + { + p_write_buffer_record->store_requested = true; + p_write_buffer_record->store_busy = false; + p_write_buffer_record->store_flash_full = false; + } + else + { + if (err_code == NRF_ERROR_BUSY) + { + m_pdb.n_writes++; + p_write_buffer_record->store_busy = true; + p_write_buffer_record->store_flash_full = false; + err_code = NRF_SUCCESS; + } + else if (err_code == NRF_ERROR_NO_MEM) + { + m_pdb.n_writes++; + p_write_buffer_record->store_busy = false; + p_write_buffer_record->store_flash_full = true; + } + else if ((err_code != NRF_ERROR_NO_MEM) && (err_code != NRF_ERROR_INVALID_PARAM)) + { + err_code = NRF_ERROR_INTERNAL; + } + } + + return err_code; +} + + +ret_code_t pdb_clear(pm_peer_id_t peer_id, pm_peer_data_id_t data_id) +{ + VERIFY_MODULE_INITIALIZED(); + + return pds_peer_data_clear(peer_id, data_id); +} + + +uint32_t pdb_n_peers(void) +{ + if (!MODULE_INITIALIZED) + { + return 0; + } + + return pds_n_peers(); +} + + +pm_peer_id_t pdb_next_peer_id_get(pm_peer_id_t prev_peer_id) +{ + if (!MODULE_INITIALIZED) + { + return PM_PEER_ID_INVALID; + } + + return pds_next_peer_id_get(prev_peer_id); +} + + +ret_code_t pdb_raw_read(pm_peer_id_t peer_id, + pm_peer_data_id_t data_id, + pm_peer_data_t * p_peer_data) +{ + VERIFY_MODULE_INITIALIZED(); + return pds_peer_data_read(peer_id, data_id, p_peer_data, &p_peer_data->length_words); +} + + +ret_code_t pdb_raw_store(pm_peer_id_t peer_id, + pm_peer_data_const_t * p_peer_data, + pm_store_token_t * p_store_token) +{ + VERIFY_MODULE_INITIALIZED(); + + return write_or_update(peer_id, p_peer_data->data_id, p_peer_data, p_store_token, PDS_PREPARE_TOKEN_INVALID); +} + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_database.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_database.h new file mode 100644 index 0000000000..328ab26799 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_database.h @@ -0,0 +1,358 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#ifndef PEER_DATABASE_H__ +#define PEER_DATABASE_H__ + +#include +#include "peer_manager_types.h" +#include "peer_manager_internal.h" +#include "sdk_errors.h" + +/** + * @cond NO_DOXYGEN + * @defgroup peer_database Peer Database + * @ingroup peer_manager + * @{ + * @brief An internal module of @ref peer_manager. A module for simple management of reading and + * writing of peer data into persistent storage. + * + */ + +#define PDB_WRITE_BUF_SIZE (sizeof(pm_peer_data_bonding_t)) + +/**@brief Events that can come from the peer_database module. + */ +typedef enum +{ + PDB_EVT_WRITE_BUF_STORED, /**< A @ref pdb_write_buf_store operation has completed successfully. */ + PDB_EVT_RAW_STORED, /**< A @ref pdb_raw_store operation has completed successfully. */ + PDB_EVT_RAW_STORE_FAILED, /**< A @ref pdb_raw_store operation has failed. */ + PDB_EVT_CLEARED, /**< A @ref pdb_clear operation has completed successfully. */ + PDB_EVT_CLEAR_FAILED, /**< A @ref pdb_clear operation has failed. */ + PDB_EVT_PEER_FREED, /**< A @ref pdb_peer_free operation has completed successfully. All associated data has been erased. */ + PDB_EVT_PEER_FREE_FAILED, /**< A @ref pdb_peer_free operation has failed. */ + PDB_EVT_COMPRESSED, /**< A compress procedure has completed. */ + PDB_EVT_ERROR_NO_MEM, /**< An operation is blocked because the flash is full. It will be reattempted automatically after the next compress procedure. */ + PDB_EVT_ERROR_UNEXPECTED, /**< An unexpected error occurred. This is a fatal error. */ +} pdb_evt_id_t; + +/**@brief Events that can come from the peer_database module. + */ +typedef struct +{ + pdb_evt_id_t evt_id; /**< The event that has happened. */ + pm_peer_id_t peer_id; /**< The id of the peer the event pertains to. */ + pm_peer_data_id_t data_id; /**< The data the event pertains to. */ + union + { + struct + { + bool update; /**< If true, an existing value was overwritten. */ + } write_buf_stored_evt; /**< Additional information pertaining to the @ref PDB_EVT_WRITE_BUF_STORED event. */ + struct + { + pm_store_token_t store_token; /**< A token identifying the store operation this event pertains to. */ + } raw_stored_evt; /**< Additional information pertaining to the @ref PDB_EVT_RAW_STORED event. */ + struct + { + pm_store_token_t store_token; /**< A token identifying the store operation this event pertains to. */ + ret_code_t err_code; /**< Error code specifying what went wrong. */ + } error_raw_store_evt; /**< Additional information pertaining to the @ref PDB_EVT_RAW_STORE_FAILED event. */ + struct + { + ret_code_t err_code; /**< The error that occurred. */ + } clear_failed_evt; /**< Additional information pertaining to the @ref PDB_EVT_CLEAR_FAILED event. */ + struct + { + ret_code_t err_code; /**< The error that occurred. */ + } peer_free_failed_evt; /**< Additional information pertaining to the @ref PDB_EVT_PEER_FREE_FAILED event. */ + struct + { + ret_code_t err_code; /**< The unexpected error that occurred. */ + } error_unexpected; /**< Additional information pertaining to the @ref PDB_EVT_ERROR_UNEXPECTED event. */ + } params; +} pdb_evt_t; + +/**@brief Event handler for events from the peer_data_storage module. + * + * @param[in] p_event The event that has happened. + */ +typedef void (*pdb_evt_handler_t)(pdb_evt_t const * p_event); + + +/**@brief Function for registering for events from the peer database. + * + * @note This function will initialize the module if it is not already initialized. + * + * @param[in] evt_handler Event handler to register. + * + * @retval NRF_SUCCESS Registration successful. + * @retval NRF_ERROR_NO_MEM No more event handlers can be registered. + * @retval NRF_ERROR_NULL evt_handler was NULL. + * @retval NRF_ERROR_INTERNAL An unexpected error happened. + */ +ret_code_t pdb_register(pdb_evt_handler_t evt_handler); + + +/**@brief Function for allocating persistent bond storage for a peer. + * + * @return The ID of the newly allocated storage. + * @retval PM_PEER_ID_INVALID If no peer ID is available. + */ +pm_peer_id_t pdb_peer_allocate(void); + + +/**@brief Function for freeing a peer's persistent bond storage. + * + * @note This function will call @ref pdb_write_buf_release on the data for this peer. + * + * @param[in] peer_id ID to be freed. + * + * @retval NRF_SUCCESS Peer ID was released and clear operation was initiated successfully. + * @retval NRF_ERROR_INVALID_PARAM Peer ID was invalid. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + */ +ret_code_t pdb_peer_free(pm_peer_id_t peer_id); + + +/**@brief Function for retrieving pointers to read-only peer data. + * + * @note Reading this pointer is not safe in the strictest sense. If a safe read is required: + * - Disable interrupts + * - Call this function. If the return code is @ref NRF_SUCCESS, the following read is safe. + * - Read memory. + * - Enable interrupts. + * @note This buffer does not need to be released. It is a pointer directly to flash. + * + * @param[in] peer_id ID of peer to retrieve data for. + * @param[in] data_id Which piece of data to get. + * @param[out] p_peer_data Pointer to immutable peer data. + * @param[out] p_token Token that can be used to lock data in flash and check data validity. + * + * @retval NRF_SUCCESS Data retrieved successfully. + * @retval NRF_ERROR_INVALID_PARAM Data ID or Peer ID was invalid or unallocated. + * @retval NRF_ERROR_NULL p_peer_data was NULL. + * @retval NRF_ERROR_NOT_FOUND This data was not found for this peer ID. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + */ +ret_code_t pdb_read_buf_get(pm_peer_id_t peer_id, + pm_peer_data_id_t data_id, + pm_peer_data_flash_t * p_peer_data, + pm_store_token_t * p_token); + + +/**@brief Function for retrieving pointers to a write buffer for peer data. + * + * @details This function will provide pointers to a buffer of the data. The data buffer will not be + * written to persistent storage until @ref pdb_write_buf_store is called. The buffer is + * released by calling either @ref pdb_write_buf_release, @ref pdb_write_buf_store, or + * @ref pdb_peer_free. + * + * When the data_id refers to a variable length data type, the available size is written + * to the data, both the top-level, and any internal length fields. + * + * @note Calling this function on a peer_id/data_id pair that already has a buffer created will + * give the same buffer, not create a new one. If n_bufs was increased since last time, the + * buffer might be relocated to be able to provide additional room. In this case, the data + * will be copied. If n_bufs was increased since last time, this function might return @ref + * NRF_ERROR_BUSY. In that case, the buffer is automatically released. + * + * @param[in] peer_id ID of peer to get a write buffer for. + * @param[in] data_id Which piece of data to get. + * @param[in] n_bufs The number of contiguous buffers needed. + * @param[out] p_peer_data Pointers to mutable peer data. + * + * @retval NRF_SUCCESS Data retrieved successfully. + * @retval NRF_ERROR_INVALID_PARAM Data ID or Peer ID was invalid or unallocated, or n_bufs was 0 + * or more than the total available buffers. + * @retval NRF_ERROR_NULL p_peer_data was NULL. + * @retval NRF_ERROR_BUSY Not enough buffer(s) available. + * @retval NRF_ERROR_INTERNAL Unexpected internal error. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + */ +ret_code_t pdb_write_buf_get(pm_peer_id_t peer_id, + pm_peer_data_id_t data_id, + uint32_t n_bufs, + pm_peer_data_t * p_peer_data); + + +/**@brief Function for freeing a write buffer allocated with @ref pdb_write_buf_get. + * + * @note This function will not write peer data to persistent memory. Data in released buffer will + * be lost. + * + * @note This function will undo any previous call to @ref pdb_write_buf_store_prepare for this + * piece of data. + * + * @param[in] peer_id ID of peer to release buffer for. + * @param[in] data_id Which piece of data to release buffer for. + * + * @retval NRF_SUCCESS Successfully released buffer. + * @retval NRF_ERROR_NOT_FOUND No buffer was allocated for this peer ID/data ID pair. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + * @retval NRF_ERROR_INTERNAL Unexpected internal error. + */ +ret_code_t pdb_write_buf_release(pm_peer_id_t peer_id, pm_peer_data_id_t data_id); + + +/**@brief Function for reserving space in persistent storage for data in a buffer. + * + * @note This function only works for data which has a write buffer allocated. If the write buffer + * is released, this prepare is undone. + * + * @note If space has already been reserved for this data, nothing is done. + * + * @param[in] peer_id The peer whose data to reserve space for. + * @param[in] data_id The type of data to reserve space for. + * + * @retval NRF_SUCCESS Successfully reserved space in persistent storage. + * @retval NRF_ERROR_NO_MEM Not enough room in persistent storage. + * @retval NRF_ERROR_BUSY Could not process request at this time. Reattempt later. + * @retval NRF_ERROR_NOT_FOUND No buffer has been allocated for this peer ID/data ID pair. + * @retval NRF_ERROR_INVALID_PARAM Data ID or Peer ID was invalid or unallocated. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + */ +ret_code_t pdb_write_buf_store_prepare(pm_peer_id_t peer_id, pm_peer_data_id_t data_id); + + +/**@brief Function for writing data into persistent storage. Writing happens asynchronously. + * + * @note This will unlock the data after it has been written. + * + * @param[in] peer_id ID of peer to store data for. + * @param[in] data_id Which piece of data to store. + * + * @retval NRF_SUCCESS Data storing was successfully started. + * @retval NRF_ERROR_NO_MEM No space available in persistent storage. Please clear some + * space, the operation will be reattempted after the next compress + * procedure. This error will not happen if + * @ref pdb_write_buf_store_prepare is called beforehand. + * @retval NRF_ERROR_INVALID_PARAM Data ID was invalid. + * @retval NRF_ERROR_NOT_FOUND No buffer has been allocated for this peer ID/data ID pair. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + * @retval NRF_ERROR_INTERNAL Unexpected internal error. + */ +ret_code_t pdb_write_buf_store(pm_peer_id_t peer_id, + pm_peer_data_id_t data_id); + + +/**@brief Function for clearing data from persistent storage. + * + * @param[in] peer_id ID of peer to clear data for. + * @param[in] data_id Which piece of data to clear. + * + * @retval NRF_SUCCESS The clear was initiated successfully. + * @retval NRF_ERROR_INVALID_PARAM Data ID or peer ID was invalid. + * @retval NRF_ERROR_NOT_FOUND Nothing to clear for this peer ID/data ID combination. + * @retval NRF_ERROR_BUSY Underlying modules are busy and can't take any more requests at + * this moment. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + * @retval NRF_ERROR_INTERNAL Internal error. + */ +ret_code_t pdb_clear(pm_peer_id_t peer_id, pm_peer_data_id_t data_id); + + +/**@brief Function for querying the number of valid peer IDs available. I.E the number of peers + * in persistent storage. + * + * @return The number of valid peer IDs. + */ +uint32_t pdb_n_peers(void); + + +/**@brief Function for getting the next peer ID in the sequence of all used peer IDs. Can be + * used to loop through all used peer IDs. + * + * @note @ref PM_PEER_ID_INVALID is considered to be before the first and after the last ordinary + * peer ID. + * + * @param[in] prev_peer_id The previous peer ID. + * + * @return The next peer ID. + * @return The first ordinary peer ID if prev_peer_id was @ref PM_PEER_ID_INVALID. + * @retval PM_PEER_ID_INVALID if prev_peer_id was the last ordinary peer ID. + */ +pm_peer_id_t pdb_next_peer_id_get(pm_peer_id_t prev_peer_id); + + +/**@brief Function for updating currently stored peer data to a new version + * + * @details Updating happens asynchronously. + * Expect a @ref PDS_EVT_STORED or @ref PDS_EVT_ERROR_STORE for the store token + * and a @ref PDS_EVT_ERROR_CLEAR or @ref PDS_EVT_ERROR_CLEAR for the old token + * + * @param[in] peer_data New data + * @param[in] old_token Store token for the old data + * @param[out] p_store_token Store token for the new data + * + * @retval NRF_SUCESS The update was initiated successfully + * @retval NRF_ERROR_NOT_FOUND The old store token was invalid. + * @retval NRF_ERROR_NULL Data contained a NULL pointer. + * @retval NRF_ERROR_NO_MEM No space available in persistent storage. + * @retval NRF_ERROR_BUSY FDS or underlying modules are busy and can't take any + * more requests + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + */ +ret_code_t pdb_peer_data_update(pm_peer_data_const_t peer_data, + pm_store_token_t old_token, + pm_store_token_t * p_store_token); + + +/**@brief Function for reading data directly from persistent storage to external memory. + * + * @param[in] peer_id ID of peer to read data for. + * @param[in] data_id Which piece of data to read. + * @param[inout] p_peer_data Where to store the data. If the data to be read has variable length, + * the appropriate length field needs to reflect the available buffer + * space. On a successful read, the length field is updated to match the + * length of the read data. + * + * @retval NRF_SUCCESS Data successfully read. + * @retval NRF_ERROR_INVALID_PARAM Data ID or Peer ID was invalid or unallocated. + * @retval NRF_ERROR_NULL p_peer_data contained a NULL pointer. + * @retval NRF_ERROR_NOT_FOUND This data was not found for this peer ID. + * @retval NRF_ERROR_DATA_SIZE The provided buffer was not large enough. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + */ +ret_code_t pdb_raw_read(pm_peer_id_t peer_id, + pm_peer_data_id_t data_id, + pm_peer_data_t * p_peer_data); + + +/**@brief Function for writing data directly to persistent storage from external memory. + * + * @param[in] peer_id ID of peer to write data for. + * @param[in] p_peer_data Data to store. + * @param[out] p_store_token A token identifying this particular store operation. The token can be + * used to identify events pertaining to this operation. + * + * @retval NRF_SUCCESS Data successfully written. + * @retval NRF_ERROR_INVALID_PARAM Data ID or Peer ID was invalid or unallocated. + * @retval NRF_ERROR_NULL p_peer_data contained a NULL pointer. + * @retval NRF_ERROR_NO_MEM No space available in persistent storage. + * @retval NRF_ERROR_INVALID_LENGTH Data length above the maximum allowed. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + * @retval NRF_ERROR_BUSY Unable to perform operation at this time. + */ +ret_code_t pdb_raw_store(pm_peer_id_t peer_id, + pm_peer_data_const_t * p_peer_data, + pm_store_token_t * p_store_token); + +/** @} + * @endcond + */ + +#endif /* PEER_DATABASE_H__ */ + + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_id.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_id.c new file mode 100644 index 0000000000..63d676a888 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_id.c @@ -0,0 +1,159 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#include "peer_id.h" + +#include +#include +#include "sdk_errors.h" +#include "peer_manager_types.h" +#include "pm_mutex.h" + + +typedef struct +{ + uint8_t active_peer_ids[MUTEX_STORAGE_SIZE(PM_PEER_ID_N_AVAILABLE_IDS)]; /**< Bitmap designating which peer IDs are in use. */ + uint8_t deleted_peer_ids[MUTEX_STORAGE_SIZE(PM_PEER_ID_N_AVAILABLE_IDS)]; /**< Bitmap designating which peer IDs are marked for deletion. */ +} pi_t; + + +static pi_t m_pi = {{0}, {0}}; + + +static void internal_state_reset(pi_t * p_pi) +{ + memset(p_pi, 0, sizeof(pi_t)); +} + + +void peer_id_init(void) +{ + internal_state_reset(&m_pi); + pm_mutex_init(m_pi.active_peer_ids, PM_PEER_ID_N_AVAILABLE_IDS); + pm_mutex_init(m_pi.deleted_peer_ids, PM_PEER_ID_N_AVAILABLE_IDS); +} + + +static pm_peer_id_t claim(pm_peer_id_t peer_id, uint8_t * mutex_group) +{ + pm_peer_id_t allocated_peer_id = PM_PEER_ID_INVALID; + if (peer_id == PM_PEER_ID_INVALID) + { + allocated_peer_id = pm_mutex_lock_first_available(mutex_group, PM_PEER_ID_N_AVAILABLE_IDS); + if (allocated_peer_id == PM_PEER_ID_N_AVAILABLE_IDS) + { + allocated_peer_id = PM_PEER_ID_INVALID; + } + } + else if (peer_id < PM_PEER_ID_N_AVAILABLE_IDS) + { + bool lock_success = pm_mutex_lock(mutex_group, peer_id); + allocated_peer_id = lock_success ? peer_id : PM_PEER_ID_INVALID; + } + return allocated_peer_id; +} + + +static void release(pm_peer_id_t peer_id, uint8_t * mutex_group) +{ + if (peer_id < PM_PEER_ID_N_AVAILABLE_IDS) + { + pm_mutex_unlock(mutex_group, peer_id); + } +} + + +pm_peer_id_t peer_id_allocate(pm_peer_id_t peer_id) +{ + return claim(peer_id, m_pi.active_peer_ids); +} + + +bool peer_id_delete(pm_peer_id_t peer_id) +{ + if (peer_id == PM_PEER_ID_INVALID) + { + return false; + } + pm_peer_id_t deleted_id = claim(peer_id, m_pi.deleted_peer_ids); + return (deleted_id == peer_id); +} + + +void peer_id_free(pm_peer_id_t peer_id) +{ + release(peer_id, m_pi.active_peer_ids); + release(peer_id, m_pi.deleted_peer_ids); +} + + +bool peer_id_is_allocated(pm_peer_id_t peer_id) +{ + if (peer_id < PM_PEER_ID_N_AVAILABLE_IDS) + { + return pm_mutex_lock_status_get(m_pi.active_peer_ids, peer_id); + } + return false; +} + + +bool peer_id_is_deleted(pm_peer_id_t peer_id) +{ + if (peer_id < PM_PEER_ID_N_AVAILABLE_IDS) + { + return pm_mutex_lock_status_get(m_pi.deleted_peer_ids, peer_id); + } + return false; +} + + +pm_peer_id_t next_id_get(pm_peer_id_t prev_peer_id, uint8_t * mutex_group) +{ + pm_peer_id_t i = (prev_peer_id == PM_PEER_ID_INVALID) ? 0 : (prev_peer_id + 1); + for (; i < PM_PEER_ID_N_AVAILABLE_IDS; i++) + { + if (pm_mutex_lock_status_get(mutex_group, i)) + { + return i; + } + } + + return PM_PEER_ID_INVALID; +} + + +pm_peer_id_t peer_id_get_next_used(pm_peer_id_t prev_peer_id) +{ + return next_id_get(prev_peer_id, m_pi.active_peer_ids); +} + + +pm_peer_id_t peer_id_get_next_deleted(pm_peer_id_t prev_peer_id) +{ + return next_id_get(prev_peer_id, m_pi.deleted_peer_ids); +} + + +uint32_t peer_id_n_ids(void) +{ + uint32_t n_ids = 0; + + for (pm_peer_id_t i = 0; i < PM_PEER_ID_N_AVAILABLE_IDS; i++) + { + n_ids += pm_mutex_lock_status_get(m_pi.active_peer_ids, i); + } + + return n_ids; +} + + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_id.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_id.h new file mode 100644 index 0000000000..678eb7e1e7 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_id.h @@ -0,0 +1,132 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#ifndef PEER_ID_H__ +#define PEER_ID_H__ + + +#include +#include "sdk_errors.h" +#include "ble_gap.h" +#include "peer_manager_types.h" + + +/** + * @cond NO_DOXYGEN + * @defgroup peer_id Peer IDs + * @ingroup peer_manager + * @{ + * @brief An internal module of @ref peer_manager. This module keeps track of which peer IDs are in + * use and which are free. + */ + + +/**@brief Function for initializing the module. + */ +void peer_id_init(void); + + +/**@brief Function for claiming an unused peer ID. + * + * @param peer_id The peer ID to allocate. If this is @ref PM_PEER_ID_INVALID, the first available + * will be allocated. + * + * @return The allocated peer ID. + * @retval PM_PEER_ID_INVALID If no peer ID could be allocated or module is not initialized. + */ +pm_peer_id_t peer_id_allocate(pm_peer_id_t peer_id); + + +/**@brief Function for marking a peer ID for deletion. + * + * @param peer_id The peer ID to delete. + * + * @retval true Deletion was successful. + * @retval false Peer ID already marked for deletion, peer_id was PM_PEER_ID_INVALID, or module is + * not initialized. + */ +bool peer_id_delete(pm_peer_id_t peer_id); + + +/**@brief Function for freeing a peer ID and clearing all data associated with it in persistent + * storage. + * + * @param[in] peer_id Peer ID to free. + */ +void peer_id_free(pm_peer_id_t peer_id); + + +/**@brief Function for finding out whether a peer ID is marked for deletion. + * + * @param[in] peer_id The peer ID to inquire about. + * + * @retval true peer_id is in marked for deletion. + * @retval false peer_id is not marked for deletion, or the module is not initialized. + */ +bool peer_id_is_deleted(pm_peer_id_t peer_id); + + +/**@brief Function for finding out whether a peer ID is in use. + * + * @param[in] peer_id The peer ID to inquire about. + * + * @retval true peer_id is in use. + * @retval false peer_id is free, or the module is not initialized. + */ +bool peer_id_is_allocated(pm_peer_id_t peer_id); + + +/**@brief Function for getting the next peer ID in the sequence of all used peer IDs. Can be + * used to loop through all used peer IDs. + * + * @note @ref PM_PEER_ID_INVALID is considered to be before the first and after the last ordinary + * peer ID. + * + * @param[in] prev_peer_id The previous peer ID. + * + * @return The next peer ID. + * @return The first used peer ID if prev_peer_id was @ref PM_PEER_ID_INVALID. + * @retval PM_PEER_ID_INVALID if prev_peer_id was the last ordinary peer ID or the module is + * not initialized. + */ +pm_peer_id_t peer_id_get_next_used(pm_peer_id_t prev_peer_id); + + +/**@brief Function for getting the next peer ID in the sequence of all peer IDs marked for deletion. + * Can be used to loop through all peer IDs marked for deletion. + * + * @note @ref PM_PEER_ID_INVALID is considered to be before the first and after the last ordinary + * peer ID. + * + * @param[in] prev_peer_id The previous peer ID. + * + * @return The next peer ID. + * @return The first used peer ID if prev_peer_id was @ref PM_PEER_ID_INVALID. + * @retval PM_PEER_ID_INVALID if prev_peer_id was the last ordinary peer ID or the module is + * not initialized. + */ +pm_peer_id_t peer_id_get_next_deleted(pm_peer_id_t prev_peer_id); + + +/**@brief Function for querying the number of valid peer IDs available. I.E the number of peers + * in persistent storage. + * + * @return The number of valid peer IDs, or 0 if module is not initialized. + */ +uint32_t peer_id_n_ids(void); + +/** @} + * @endcond + */ + +#endif /* PEER_ID_H__ */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager.c new file mode 100644 index 0000000000..8fc5e092f5 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager.c @@ -0,0 +1,1012 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#include "peer_manager.h" +#include +#include "app_util.h" +#include "security_manager.h" +#include "gatt_cache_manager.h" +#include "peer_database.h" +#include "id_manager.h" +#include "ble_conn_state.h" +#include "sdk_common.h" +#include "peer_manager_internal.h" + +#define MODULE_INITIALIZED m_pm.initialized +#include "sdk_macros.h" + + +#define MAX_REGISTRANTS 3 /**< The number of event handlers that can be registered with the module. */ + + +/**@brief Internal state of the module. + */ +typedef struct +{ + uint8_t initialized : 1; /**< Whether or not @ref pm_init has been called successfully. */ + uint8_t peer_rank_initialized : 1; /**< Whether or not @ref rank_init has been called successfully. */ + uint8_t deleting_all : 1; /**< True from when @ref pm_peers_delete is called until all peers have been deleted. */ + pm_store_token_t peer_rank_token; /**< The store token of an ongoing peer rank update via a call to @ref pm_peer_rank_highest. If @ref PM_STORE_TOKEN_INVALID, there is no ongoing update. */ + uint32_t current_highest_peer_rank; /**< The current highest peer rank. Used by @ref pm_peer_rank_highest. */ + pm_peer_id_t highest_ranked_peer; /**< The peer with the highest peer rank. Used by @ref pm_peer_rank_highest. */ + pm_evt_handler_t evt_handlers[MAX_REGISTRANTS]; /**< The subscribers to Peer Manager events, as registered through @ref pm_register. */ + uint8_t n_registrants; /**< The number of event handlers registered through @ref pm_register. */ + ble_conn_state_user_flag_id_t pairing_flag_id; /**< The flag ID for which connections are paired. */ + ble_conn_state_user_flag_id_t bonding_flag_id; /**< The flag ID for which connections are bonded. */ +} pm_t; + + +/**@brief Instantiation of Peer Manager internal state. + */ +static pm_t m_pm = +{ + .initialized = 0, + .peer_rank_initialized = 0, +}; + +/**@brief Function for sending a Peer Manager event to all subscribers. + * + * @param[in] p_pm_evt The event to send. + */ +static void evt_send(pm_evt_t * p_pm_evt) +{ + for (int i = 0; i < m_pm.n_registrants; i++) + { + m_pm.evt_handlers[i](p_pm_evt); + } +} + + +/**@brief Event handler for events from the Peer Database module. + * + * @param[in] p_pdb_evt The incoming Peer Database event. + */ +static void pdb_evt_handler(pdb_evt_t const * p_pdb_evt) +{ + bool send_evt = true; + pm_evt_t pm_evt; + + memset(&pm_evt, 0, sizeof(pm_evt_t)); + pm_evt.peer_id = p_pdb_evt->peer_id; + pm_evt.conn_handle = im_conn_handle_get(pm_evt.peer_id); + + switch (p_pdb_evt->evt_id) + { + case PDB_EVT_WRITE_BUF_STORED: + pm_evt.evt_id = PM_EVT_PEER_DATA_UPDATE_SUCCEEDED; + pm_evt.params.peer_data_update_succeeded.data_id = p_pdb_evt->data_id; + pm_evt.params.peer_data_update_succeeded.action = PM_PEER_DATA_OP_UPDATE; + pm_evt.params.peer_data_update_succeeded.token = PM_STORE_TOKEN_INVALID; + pm_evt.params.peer_data_update_succeeded.flash_changed = true; + break; + + case PDB_EVT_RAW_STORED: + pm_evt.evt_id = PM_EVT_PEER_DATA_UPDATE_SUCCEEDED; + pm_evt.params.peer_data_update_succeeded.data_id = p_pdb_evt->data_id; + pm_evt.params.peer_data_update_succeeded.action = PM_PEER_DATA_OP_UPDATE; + pm_evt.params.peer_data_update_succeeded.token + = p_pdb_evt->params.raw_stored_evt.store_token; + pm_evt.params.peer_data_update_succeeded.flash_changed = true; + + if( (m_pm.peer_rank_token != PM_STORE_TOKEN_INVALID) + && (m_pm.peer_rank_token == p_pdb_evt->params.raw_stored_evt.store_token)) + { + m_pm.peer_rank_token = PM_STORE_TOKEN_INVALID; + m_pm.highest_ranked_peer = pm_evt.peer_id; + + pm_evt.params.peer_data_update_succeeded.token = PM_STORE_TOKEN_INVALID; + } + break; + + case PDB_EVT_RAW_STORE_FAILED: + pm_evt.evt_id = PM_EVT_PEER_DATA_UPDATE_FAILED; + pm_evt.params.peer_data_update_failed.data_id = p_pdb_evt->data_id; + pm_evt.params.peer_data_update_failed.action = PM_PEER_DATA_OP_UPDATE; + pm_evt.params.peer_data_update_failed.token + = p_pdb_evt->params.error_raw_store_evt.store_token; + pm_evt.params.peer_data_update_failed.error + = p_pdb_evt->params.error_raw_store_evt.err_code; + + if( (m_pm.peer_rank_token != PM_STORE_TOKEN_INVALID) + && (m_pm.peer_rank_token == p_pdb_evt->params.raw_stored_evt.store_token)) + { + m_pm.peer_rank_token = PM_STORE_TOKEN_INVALID; + m_pm.current_highest_peer_rank -= 1; + + pm_evt.params.peer_data_update_succeeded.token = PM_STORE_TOKEN_INVALID; + } + break; + + case PDB_EVT_CLEARED: + pm_evt.evt_id = PM_EVT_PEER_DATA_UPDATE_SUCCEEDED; + pm_evt.params.peer_data_update_succeeded.data_id = p_pdb_evt->data_id; + pm_evt.params.peer_data_update_succeeded.action = PM_PEER_DATA_OP_DELETE; + pm_evt.params.peer_data_update_succeeded.token = PM_STORE_TOKEN_INVALID; + break; + + case PDB_EVT_CLEAR_FAILED: + pm_evt.evt_id = PM_EVT_PEER_DATA_UPDATE_FAILED; + pm_evt.params.peer_data_update_failed.data_id = p_pdb_evt->data_id; + pm_evt.params.peer_data_update_failed.action = PM_PEER_DATA_OP_DELETE; + pm_evt.params.peer_data_update_failed.error + = p_pdb_evt->params.clear_failed_evt.err_code; + break; + + case PDB_EVT_PEER_FREED: + pm_evt.evt_id = PM_EVT_PEER_DELETE_SUCCEEDED; + if (m_pm.deleting_all && (pdb_next_peer_id_get(PM_PEER_ID_INVALID) == PM_PEER_ID_INVALID)) + { + // pm_peers_delete() has been called and this is the last peer to be deleted. + + m_pm.deleting_all = false; + + pm_evt_t pm_delete_all_evt; + memset(&pm_delete_all_evt, 0, sizeof(pm_evt_t)); + pm_delete_all_evt.evt_id = PM_EVT_PEERS_DELETE_SUCCEEDED; + pm_delete_all_evt.peer_id = PM_PEER_ID_INVALID; + pm_delete_all_evt.conn_handle = BLE_CONN_HANDLE_INVALID; + + evt_send(&pm_delete_all_evt); + } + break; + + case PDB_EVT_PEER_FREE_FAILED: + pm_evt.evt_id = PM_EVT_PEER_DELETE_FAILED; + pm_evt.params.peer_delete_failed.error + = p_pdb_evt->params.peer_free_failed_evt.err_code; + if (m_pm.deleting_all) + { + // pm_peers_delete() has been called and has thus failed. + + m_pm.deleting_all = false; + + pm_evt_t pm_delete_all_evt; + memset(&pm_delete_all_evt, 0, sizeof(pm_evt_t)); + pm_delete_all_evt.evt_id = PM_EVT_PEERS_DELETE_FAILED; + pm_delete_all_evt.peer_id = PM_PEER_ID_INVALID; + pm_delete_all_evt.conn_handle = BLE_CONN_HANDLE_INVALID; + pm_delete_all_evt.params.peers_delete_failed_evt.error + = p_pdb_evt->params.peer_free_failed_evt.err_code; + + evt_send(&pm_delete_all_evt); + } + break; + + case PDB_EVT_COMPRESSED: + send_evt = false; + // Do nothing + break; + + case PDB_EVT_ERROR_NO_MEM: + pm_evt.evt_id = PM_EVT_STORAGE_FULL; + break; + + case PDB_EVT_ERROR_UNEXPECTED: + pm_evt.evt_id = PM_EVT_ERROR_UNEXPECTED; + break; + + default: + send_evt = false; + break; + } + + if (send_evt) + { + evt_send(&pm_evt); + } +} + + +/**@brief Event handler for events from the Security Manager module. + * + * @param[in] p_sm_evt The incoming Security Manager event. + */ +static void sm_evt_handler(sm_evt_t const * p_sm_evt) +{ + bool find_peer_id = true; + bool send_evt = true; + pm_evt_t pm_evt; + memset(&pm_evt, 0, sizeof(pm_evt_t)); + pm_evt.conn_handle = p_sm_evt->conn_handle; + + switch (p_sm_evt->evt_id) + { + case SM_EVT_SLAVE_SECURITY_REQ: + find_peer_id = false; + send_evt = false; + break; + + case SM_EVT_SEC_PROCEDURE_START: + { + pm_evt.evt_id = PM_EVT_CONN_SEC_START; + bool pairing = p_sm_evt->params.sec_procedure_start.procedure + != PM_LINK_SECURED_PROCEDURE_ENCRYPTION; + bool bonding = p_sm_evt->params.sec_procedure_start.procedure + == PM_LINK_SECURED_PROCEDURE_BONDING; + ble_conn_state_user_flag_set(p_sm_evt->conn_handle, m_pm.pairing_flag_id, pairing); + ble_conn_state_user_flag_set(p_sm_evt->conn_handle, m_pm.bonding_flag_id, bonding); + break; + } + + case SM_EVT_PAIRING_SUCCESS: + pm_evt.evt_id = PM_EVT_CONN_SEC_SUCCEEDED; + pm_evt.params.conn_sec_succeeded.procedure = + p_sm_evt->params.pairing_success.bonded + ? PM_LINK_SECURED_PROCEDURE_BONDING + : PM_LINK_SECURED_PROCEDURE_PAIRING; + ble_conn_state_user_flag_set(p_sm_evt->conn_handle, m_pm.pairing_flag_id, true); + ble_conn_state_user_flag_set(p_sm_evt->conn_handle, + m_pm.bonding_flag_id, + p_sm_evt->params.pairing_success.bonded + ); + break; + + case SM_EVT_PAIRING_FAIL: + pm_evt.evt_id = PM_EVT_CONN_SEC_FAILED; + pm_evt.params.conn_sec_failed.procedure = + ble_conn_state_user_flag_get(p_sm_evt->conn_handle, m_pm.bonding_flag_id) + ? PM_LINK_SECURED_PROCEDURE_BONDING + : PM_LINK_SECURED_PROCEDURE_PAIRING; + pm_evt.params.conn_sec_failed.error_src + = p_sm_evt->params.pairing_failed.error_src; + pm_evt.params.conn_sec_failed.error + = p_sm_evt->params.pairing_failed.error; + break; + + case SM_EVT_LINK_ENCRYPTION_UPDATE: + if (!ble_conn_state_user_flag_get(p_sm_evt->conn_handle, m_pm.pairing_flag_id)) + { + pm_evt.evt_id = PM_EVT_CONN_SEC_SUCCEEDED; + pm_evt.params.conn_sec_succeeded.procedure = PM_LINK_SECURED_PROCEDURE_ENCRYPTION; + } + else + { + find_peer_id = false; + send_evt = false; + } + break; + + case SM_EVT_LINK_ENCRYPTION_FAILED: + pm_evt.evt_id = PM_EVT_CONN_SEC_FAILED; + pm_evt.params.conn_sec_failed.procedure + = PM_LINK_SECURED_PROCEDURE_ENCRYPTION; + pm_evt.params.conn_sec_failed.error_src + = p_sm_evt->params.link_encryption_failed.error_src; + pm_evt.params.conn_sec_failed.error + = p_sm_evt->params.link_encryption_failed.error; + break; + + case SM_EVT_BONDING_INFO_STORED: + pm_evt.evt_id = PM_EVT_PEER_DATA_UPDATE_SUCCEEDED; + pm_evt.peer_id = p_sm_evt->params.bonding_info_stored.peer_id; + pm_evt.params.peer_data_update_succeeded.data_id = PM_PEER_DATA_ID_BONDING; + pm_evt.params.peer_data_update_succeeded.action = PM_PEER_DATA_OP_UPDATE; + find_peer_id = false; + break; + + case SM_EVT_ERROR_BONDING_INFO: + pm_evt.evt_id = PM_EVT_PEER_DATA_UPDATE_FAILED; + pm_evt.peer_id = p_sm_evt->params.error_bonding_info.peer_id; + pm_evt.params.peer_data_update_failed.data_id = PM_PEER_DATA_ID_BONDING; + pm_evt.params.peer_data_update_failed.action = PM_PEER_DATA_OP_UPDATE; + pm_evt.params.peer_data_update_failed.error + = p_sm_evt->params.error_bonding_info.error; + find_peer_id = false; + break; + + case SM_EVT_ERROR_UNEXPECTED: + pm_evt.evt_id = PM_EVT_ERROR_UNEXPECTED; + pm_evt.params.error_unexpected.error = p_sm_evt->params.error_unexpected.error; + break; + + case SM_EVT_ERROR_NO_MEM: + pm_evt.evt_id = PM_EVT_STORAGE_FULL; + break; + + case SM_EVT_ERROR_SMP_TIMEOUT: + pm_evt.evt_id = PM_EVT_CONN_SEC_FAILED; + pm_evt.params.conn_sec_failed.procedure + = ble_conn_state_user_flag_get(p_sm_evt->conn_handle, m_pm.bonding_flag_id) + ? PM_LINK_SECURED_PROCEDURE_BONDING + : PM_LINK_SECURED_PROCEDURE_PAIRING; + pm_evt.params.conn_sec_failed.error_src = BLE_GAP_SEC_STATUS_SOURCE_LOCAL; + pm_evt.params.conn_sec_failed.error = PM_CONN_SEC_ERROR_SMP_TIMEOUT; + break; + + case SM_EVT_CONN_SEC_CONFIG_REQ: + pm_evt.evt_id = PM_EVT_CONN_SEC_CONFIG_REQ; + break; + + default: + send_evt = false; + break; + } + + if (find_peer_id) + { + pm_evt.peer_id = im_peer_id_get_by_conn_handle(p_sm_evt->conn_handle); + } + + if (send_evt) + { + evt_send(&pm_evt); + } +} + + +/**@brief Event handler for events from the GATT Cache Manager module. + * + * @param[in] p_gcm_evt The incoming GATT Cache Manager event. + */ +static void gcm_evt_handler(gcm_evt_t const * p_gcm_evt) +{ + + bool send_evt = true; + pm_evt_t pm_evt; + + memset(&pm_evt, 0, sizeof(pm_evt_t)); + pm_evt.peer_id = p_gcm_evt->peer_id; + pm_evt.conn_handle = im_conn_handle_get(pm_evt.peer_id); + + switch (p_gcm_evt->evt_id) + { + case GCM_EVT_LOCAL_DB_CACHE_STORED: + pm_evt.evt_id = PM_EVT_PEER_DATA_UPDATE_SUCCEEDED; + pm_evt.params.peer_data_update_succeeded.action = PM_PEER_DATA_OP_UPDATE; + pm_evt.params.peer_data_update_succeeded.data_id = PM_PEER_DATA_ID_GATT_LOCAL; + break; + + case GCM_EVT_LOCAL_DB_CACHE_UPDATED: + pm_evt.evt_id = PM_EVT_PEER_DATA_UPDATE_SUCCEEDED; + pm_evt.params.peer_data_update_succeeded.action = PM_PEER_DATA_OP_UPDATE; + pm_evt.params.peer_data_update_succeeded.data_id = PM_PEER_DATA_ID_GATT_LOCAL; + break; + + case GCM_EVT_LOCAL_DB_CACHE_APPLIED: + pm_evt.evt_id = PM_EVT_LOCAL_DB_CACHE_APPLIED; + break; + + case GCM_EVT_ERROR_LOCAL_DB_CACHE_APPLY: + pm_evt.evt_id = PM_EVT_LOCAL_DB_CACHE_APPLY_FAILED; + break; + + case GCM_EVT_REMOTE_DB_CACHE_UPDATED: + pm_evt.evt_id = PM_EVT_PEER_DATA_UPDATE_SUCCEEDED; + pm_evt.params.peer_data_update_succeeded.action = PM_PEER_DATA_OP_UPDATE; + pm_evt.params.peer_data_update_succeeded.data_id = PM_PEER_DATA_ID_GATT_REMOTE; + break; + + case GCM_EVT_SERVICE_CHANGED_IND_SENT: + pm_evt.evt_id = PM_EVT_SERVICE_CHANGED_IND_SENT; + break; + + case GCM_EVT_SERVICE_CHANGED_IND_CONFIRMED: + pm_evt.evt_id = PM_EVT_SERVICE_CHANGED_IND_CONFIRMED; + break; + + case GCM_EVT_ERROR_DATA_SIZE: + send_evt = false; + break; + + case GCM_EVT_ERROR_STORAGE_FULL: + pm_evt.evt_id = PM_EVT_STORAGE_FULL; + break; + + case GCM_EVT_ERROR_UNEXPECTED: + pm_evt.evt_id = PM_EVT_ERROR_UNEXPECTED; + pm_evt.params.error_unexpected.error = p_gcm_evt->params.error_unexpected.error; + pm_evt.conn_handle = p_gcm_evt->params.error_unexpected.conn_handle; + break; + } + + if (send_evt) + { + evt_send(&pm_evt); + } +} + + +/**@brief Event handler for events from the ID Manager module. + * + * @param[in] p_im_evt The incoming ID Manager event. + */ +static void im_evt_handler(im_evt_t const * p_im_evt) +{ + pm_evt_t pm_evt; + ret_code_t err_code; + + switch (p_im_evt->evt_id) + { + case IM_EVT_DUPLICATE_ID: + // Attempt to delete the duplicate data to free space and avoid finding old data when + // scanning in the future + err_code = pm_peer_delete(p_im_evt->params.duplicate_id.peer_id_2); + UNUSED_VARIABLE(err_code); + break; + + case IM_EVT_BONDED_PEER_CONNECTED: + ble_conn_state_user_flag_set(p_im_evt->conn_handle, m_pm.bonding_flag_id, true); + memset(&pm_evt, 0, sizeof(pm_evt_t)); + pm_evt.conn_handle = p_im_evt->conn_handle; + pm_evt.peer_id = im_peer_id_get_by_conn_handle(p_im_evt->conn_handle); + pm_evt.evt_id = PM_EVT_BONDED_PEER_CONNECTED; + evt_send(&pm_evt); + break; + } +} + + +void pm_on_ble_evt(ble_evt_t * p_ble_evt) +{ + VERIFY_MODULE_INITIALIZED_VOID(); + + im_ble_evt_handler(p_ble_evt); + sm_ble_evt_handler(p_ble_evt); + gcm_ble_evt_handler(p_ble_evt); +} + + +/**@brief Function for resetting the internal state of this module. + */ +static void internal_state_reset() +{ + memset(&m_pm, 0, sizeof(m_pm)); + m_pm.highest_ranked_peer = PM_PEER_ID_INVALID; + m_pm.peer_rank_token = PM_STORE_TOKEN_INVALID; + m_pm.pairing_flag_id = BLE_CONN_STATE_USER_FLAG_INVALID; + m_pm.bonding_flag_id = BLE_CONN_STATE_USER_FLAG_INVALID; +} + + +ret_code_t pm_init(void) +{ + ret_code_t err_code; + + err_code = pdb_register(pdb_evt_handler); + if (err_code != NRF_SUCCESS) + { + if (err_code != NRF_ERROR_INVALID_STATE) + { + err_code = NRF_ERROR_INTERNAL; + } + return err_code; + } + + err_code = sm_register(sm_evt_handler); + if (err_code != NRF_SUCCESS) + { + return NRF_ERROR_INTERNAL; + } + + err_code = gcm_init(gcm_evt_handler); + if (err_code != NRF_SUCCESS) + { + return NRF_ERROR_INTERNAL; + } + + err_code = im_register(im_evt_handler); + if (err_code != NRF_SUCCESS) + { + return NRF_ERROR_INTERNAL; + } + + internal_state_reset(); + + m_pm.pairing_flag_id = ble_conn_state_user_flag_acquire(); + if (m_pm.pairing_flag_id == BLE_CONN_STATE_USER_FLAG_INVALID) + { + return NRF_ERROR_INTERNAL; + } + + m_pm.bonding_flag_id = ble_conn_state_user_flag_acquire(); + if (m_pm.bonding_flag_id == BLE_CONN_STATE_USER_FLAG_INVALID) + { + return NRF_ERROR_INTERNAL; + } + + m_pm.peer_rank_initialized = false; + m_pm.initialized = true; + + return NRF_SUCCESS; +} + + +ret_code_t pm_register(pm_evt_handler_t event_handler) +{ + VERIFY_MODULE_INITIALIZED(); + + if (m_pm.n_registrants >= MAX_REGISTRANTS) + { + return NRF_ERROR_NO_MEM; + } + + m_pm.evt_handlers[m_pm.n_registrants] = event_handler; + m_pm.n_registrants += 1; + + return NRF_SUCCESS; +} + + +ret_code_t pm_sec_params_set(ble_gap_sec_params_t * p_sec_params) +{ + VERIFY_MODULE_INITIALIZED(); + + ret_code_t err_code; + + err_code = sm_sec_params_set(p_sec_params); + + if (err_code == NRF_ERROR_INVALID_STATE) + { + err_code = NRF_ERROR_INTERNAL; + } + + return err_code; +} + + +ret_code_t pm_conn_secure(uint16_t conn_handle, bool force_repairing) +{ + VERIFY_MODULE_INITIALIZED(); + + ret_code_t err_code; + + err_code = sm_link_secure(conn_handle, force_repairing); + + return err_code; +} + + +void pm_conn_sec_config_reply(uint16_t conn_handle, pm_conn_sec_config_t * p_conn_sec_config) +{ + sm_conn_sec_config_reply(conn_handle, p_conn_sec_config); +} + + +ret_code_t pm_sec_params_reply(uint16_t conn_handle, ble_gap_sec_params_t * p_sec_params) +{ + VERIFY_MODULE_INITIALIZED(); + return NRF_SUCCESS; +} + + +void pm_local_database_has_changed(void) +{ + VERIFY_MODULE_INITIALIZED_VOID(); + gcm_local_database_has_changed(); +} + + +ret_code_t pm_whitelist_create(pm_peer_id_t * p_peer_ids, + uint8_t n_peer_ids, + ble_gap_whitelist_t * p_whitelist) +{ + VERIFY_MODULE_INITIALIZED(); + return im_whitelist_create(p_peer_ids, n_peer_ids, p_whitelist); +} + + +ret_code_t pm_whitelist_custom(ble_gap_whitelist_t * p_whitelist) +{ + VERIFY_MODULE_INITIALIZED(); + return im_whitelist_custom(p_whitelist); +} + + +ret_code_t pm_conn_sec_status_get(uint16_t conn_handle, pm_conn_sec_status_t * p_conn_sec_status) +{ + VERIFY_MODULE_INITIALIZED(); + VERIFY_PARAM_NOT_NULL(p_conn_sec_status); + + ble_conn_state_status_t status = ble_conn_state_status(conn_handle); + + if (status == BLE_CONN_STATUS_INVALID) + { + return BLE_ERROR_INVALID_CONN_HANDLE; + } + + p_conn_sec_status->connected = (status == BLE_CONN_STATUS_CONNECTED); + p_conn_sec_status->bonded = ble_conn_state_user_flag_get(conn_handle, m_pm.bonding_flag_id); + p_conn_sec_status->encrypted = ble_conn_state_encrypted(conn_handle); + p_conn_sec_status->mitm_protected = ble_conn_state_mitm_protected(conn_handle); + return NRF_SUCCESS; +} + + +ret_code_t pm_lesc_public_key_set(ble_gap_lesc_p256_pk_t * p_public_key) +{ + VERIFY_MODULE_INITIALIZED(); + return sm_lesc_public_key_set(p_public_key); +} + + +ret_code_t pm_conn_handle_get(pm_peer_id_t peer_id, uint16_t * p_conn_handle) +{ + VERIFY_MODULE_INITIALIZED(); + VERIFY_PARAM_NOT_NULL(p_conn_handle); + *p_conn_handle = im_conn_handle_get(peer_id); + return NRF_SUCCESS; +} + + +ret_code_t pm_peer_id_get(uint16_t conn_handle, pm_peer_id_t * p_peer_id) +{ + VERIFY_MODULE_INITIALIZED(); + VERIFY_PARAM_NOT_NULL(p_peer_id); + *p_peer_id = im_peer_id_get_by_conn_handle(conn_handle); + return NRF_SUCCESS; +} + + +uint32_t pm_peer_count(void) +{ + if (!MODULE_INITIALIZED) + { + return 0; + } + return pdb_n_peers(); +} + + +pm_peer_id_t pm_next_peer_id_get(pm_peer_id_t prev_peer_id) +{ + if (!MODULE_INITIALIZED) + { + return PM_PEER_ID_INVALID; + } + return pdb_next_peer_id_get(prev_peer_id); +} + + +ret_code_t pm_peer_data_load(pm_peer_id_t peer_id, + pm_peer_data_id_t data_id, + void * p_data, + uint16_t * p_length) +{ + VERIFY_MODULE_INITIALIZED(); + VERIFY_PARAM_NOT_NULL(p_data); + VERIFY_PARAM_NOT_NULL(p_length); + if (ALIGN_NUM(4, *p_length) != *p_length) + { + return NRF_ERROR_INVALID_PARAM; + } + + pm_peer_data_t peer_data; + memset(&peer_data, 0, sizeof(peer_data)); + peer_data.length_words = BYTES_TO_WORDS(*p_length); + peer_data.data_id = data_id; + peer_data.p_all_data = p_data; + + ret_code_t err_code = pdb_raw_read(peer_id, data_id, &peer_data); + + *p_length = peer_data.length_words * BYTES_PER_WORD; + + return err_code; +} + + +ret_code_t pm_peer_data_bonding_load(pm_peer_id_t peer_id, + pm_peer_data_bonding_t * p_data) +{ + uint16_t length = sizeof(pm_peer_data_bonding_t); + return pm_peer_data_load(peer_id, + PM_PEER_DATA_ID_BONDING, + p_data, + &length); +} + + +ret_code_t pm_peer_data_remote_db_load(pm_peer_id_t peer_id, + ble_gatt_db_srv_t * p_data, + uint16_t * p_length) +{ + return pm_peer_data_load(peer_id, + PM_PEER_DATA_ID_GATT_REMOTE, + p_data, + p_length); +} + + +ret_code_t pm_peer_data_app_data_load(pm_peer_id_t peer_id, + uint8_t * p_data, + uint16_t * p_length) +{ + return pm_peer_data_load(peer_id, + PM_PEER_DATA_ID_APPLICATION, + p_data, + p_length); +} + + +ret_code_t pm_peer_data_store(pm_peer_id_t peer_id, + pm_peer_data_id_t data_id, + void const * p_data, + uint16_t length, + pm_store_token_t * p_token) +{ + VERIFY_MODULE_INITIALIZED(); + VERIFY_PARAM_NOT_NULL(p_data); + if (ALIGN_NUM(4, length) != length) + { + return NRF_ERROR_INVALID_PARAM; + } + + pm_peer_data_const_t peer_data; + memset(&peer_data, 0, sizeof(peer_data)); + peer_data.length_words = BYTES_TO_WORDS(length); + peer_data.data_id = data_id; + peer_data.p_all_data = p_data; + + return pdb_raw_store(peer_id, &peer_data, p_token); +} + + +ret_code_t pm_peer_data_bonding_store(pm_peer_id_t peer_id, + pm_peer_data_bonding_t const * p_data, + pm_store_token_t * p_token) +{ + return pm_peer_data_store(peer_id, + PM_PEER_DATA_ID_BONDING, + p_data, + ALIGN_NUM(4, sizeof(pm_peer_data_bonding_t)), + p_token); +} + + +ret_code_t pm_peer_data_remote_db_store(pm_peer_id_t peer_id, + ble_gatt_db_srv_t const * p_data, + uint16_t length, + pm_store_token_t * p_token) +{ + return pm_peer_data_store(peer_id, + PM_PEER_DATA_ID_GATT_REMOTE, + p_data, + length, + p_token); +} + + +ret_code_t pm_peer_data_app_data_store(pm_peer_id_t peer_id, + uint8_t const * p_data, + uint16_t length, + pm_store_token_t * p_token) +{ + return pm_peer_data_store(peer_id, + PM_PEER_DATA_ID_APPLICATION, + p_data, + length, + p_token); +} + + +ret_code_t pm_peer_data_delete(pm_peer_id_t peer_id, pm_peer_data_id_t data_id) +{ + VERIFY_MODULE_INITIALIZED(); + + if (data_id == PM_PEER_DATA_ID_BONDING) + { + return NRF_ERROR_INVALID_PARAM; + } + + return pdb_clear(peer_id, data_id); +} + + +ret_code_t pm_peer_new(pm_peer_id_t * p_new_peer_id, + pm_peer_data_bonding_t * p_bonding_data, + pm_store_token_t * p_token) +{ + VERIFY_MODULE_INITIALIZED(); + VERIFY_PARAM_NOT_NULL(p_bonding_data); + VERIFY_PARAM_NOT_NULL(p_new_peer_id); + ret_code_t err_code; + + *p_new_peer_id = pdb_peer_allocate(); + if (*p_new_peer_id == PM_PEER_ID_INVALID) + { + return NRF_ERROR_NO_MEM; + } + + pm_peer_data_const_t peer_data; + memset(&peer_data, 0, sizeof(pm_peer_data_const_t)); + peer_data.length_words = BYTES_TO_WORDS(sizeof(pm_peer_data_bonding_t)); + peer_data.data_id = PM_PEER_DATA_ID_BONDING; + peer_data.p_bonding_data = p_bonding_data; + + err_code = pm_peer_data_bonding_store(*p_new_peer_id, p_bonding_data, p_token); + if (err_code != NRF_SUCCESS) + { + ret_code_t err_code_free = im_peer_free(*p_new_peer_id); + if (err_code_free != NRF_SUCCESS) + { + err_code = NRF_ERROR_INTERNAL; + } + } + return err_code; +} + + +ret_code_t pm_peer_delete(pm_peer_id_t peer_id) +{ + VERIFY_MODULE_INITIALIZED(); + + return im_peer_free(peer_id); +} + + +ret_code_t pm_peers_delete(void) +{ + VERIFY_MODULE_INITIALIZED(); + + m_pm.deleting_all = true; + + pm_peer_id_t current_peer_id = pdb_next_peer_id_get(PM_PEER_ID_INVALID); + while (current_peer_id != PM_PEER_ID_INVALID) + { + ret_code_t err_code = pm_peer_delete(current_peer_id); + if (err_code != NRF_SUCCESS) + { + return NRF_ERROR_INTERNAL; + } + + current_peer_id = pdb_next_peer_id_get(current_peer_id); + } + + return NRF_SUCCESS; +} + + +ret_code_t pm_peer_ranks_get(pm_peer_id_t * p_highest_ranked_peer, + uint32_t * p_highest_rank, + pm_peer_id_t * p_lowest_ranked_peer, + uint32_t * p_lowest_rank) +{ + VERIFY_MODULE_INITIALIZED(); + + pm_peer_id_t peer_id = pdb_next_peer_id_get(PM_PEER_ID_INVALID); + uint32_t peer_rank = 0; + //lint -save -e65 -e64 + pm_peer_data_t peer_data = {.length_words = BYTES_TO_WORDS(sizeof(peer_rank)), + .p_peer_rank = &peer_rank}; + //lint -restore + ret_code_t err_code = pdb_raw_read(peer_id, PM_PEER_DATA_ID_PEER_RANK, &peer_data); + uint32_t highest_rank = 0; + uint32_t lowest_rank = 0xFFFFFFFF; + pm_peer_id_t highest_ranked_peer = PM_PEER_ID_INVALID; + pm_peer_id_t lowest_ranked_peer = PM_PEER_ID_INVALID; + + if (err_code == NRF_ERROR_INVALID_PARAM) + { + // No peer IDs exist. + return NRF_ERROR_NOT_FOUND; + } + + while ((err_code == NRF_SUCCESS) || (err_code == NRF_ERROR_NOT_FOUND)) + { + if (err_code == NRF_ERROR_NOT_FOUND) + { + peer_rank = 0; + } + if (peer_rank >= highest_rank) + { + highest_rank = peer_rank; + highest_ranked_peer = peer_id; + } + if (peer_rank < lowest_rank) + { + lowest_rank = peer_rank; + lowest_ranked_peer = peer_id; + } + peer_id = pdb_next_peer_id_get(peer_id); + err_code = pdb_raw_read(peer_id, PM_PEER_DATA_ID_PEER_RANK, &peer_data); + } + if (peer_id == PM_PEER_ID_INVALID) + { + err_code = NRF_SUCCESS; + if (p_highest_ranked_peer != NULL) + { + *p_highest_ranked_peer = highest_ranked_peer; + } + if (p_highest_rank != NULL) + { + *p_highest_rank = highest_rank; + } + if (p_lowest_ranked_peer != NULL) + { + *p_lowest_ranked_peer = lowest_ranked_peer; + } + if (p_lowest_rank != NULL) + { + *p_lowest_rank = lowest_rank; + } + } + else + { + err_code = NRF_ERROR_INTERNAL; + } + return err_code; +} + + +/**@brief Function for initializing peer rank statistics. + */ +static void rank_init(void) +{ + ret_code_t err_code = pm_peer_ranks_get(&m_pm.highest_ranked_peer, + &m_pm.current_highest_peer_rank, + NULL, + NULL); + if ((err_code == NRF_SUCCESS) || (err_code == NRF_ERROR_NOT_FOUND)) + { + m_pm.peer_rank_initialized = true; + } +} + + +ret_code_t pm_peer_rank_highest(pm_peer_id_t peer_id) +{ + VERIFY_MODULE_INITIALIZED(); + + ret_code_t err_code; + //lint -save -e65 -e64 + pm_peer_data_const_t peer_data = {.length_words = BYTES_TO_WORDS(sizeof(m_pm.current_highest_peer_rank)), + .data_id = PM_PEER_DATA_ID_PEER_RANK, + .p_peer_rank = &m_pm.current_highest_peer_rank}; + //lint -restore + + + if (!m_pm.peer_rank_initialized) + { + rank_init(); + } + + if (!m_pm.peer_rank_initialized || (m_pm.peer_rank_token != PM_STORE_TOKEN_INVALID)) + { + err_code = NRF_ERROR_BUSY; + } + else + { + if ((peer_id == m_pm.highest_ranked_peer) && (m_pm.current_highest_peer_rank > 0)) + { + pm_evt_t pm_evt; + + // The reported peer is already regarded as highest (provided it has an index at all) + err_code = NRF_SUCCESS; + + memset(&pm_evt, 0, sizeof(pm_evt)); + pm_evt.evt_id = PM_EVT_PEER_DATA_UPDATE_SUCCEEDED; + pm_evt.conn_handle = im_conn_handle_get(peer_id); + pm_evt.peer_id = peer_id; + pm_evt.params.peer_data_update_succeeded.data_id = PM_PEER_DATA_ID_PEER_RANK; + pm_evt.params.peer_data_update_succeeded.action = PM_PEER_DATA_OP_UPDATE; + pm_evt.params.peer_data_update_succeeded.token = PM_STORE_TOKEN_INVALID; + pm_evt.params.peer_data_update_succeeded.flash_changed = false; + + evt_send(&pm_evt); + } + else + { + m_pm.current_highest_peer_rank += 1; + err_code = pdb_raw_store(peer_id, &peer_data, &m_pm.peer_rank_token); + if (err_code != NRF_SUCCESS) + { + m_pm.peer_rank_token = PM_STORE_TOKEN_INVALID; + m_pm.current_highest_peer_rank -= 1; + if ((err_code != NRF_ERROR_BUSY) && (err_code != NRF_ERROR_NO_MEM)) + { + err_code = NRF_ERROR_INTERNAL; + } + } + } + } + return err_code; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager.h new file mode 100644 index 0000000000..6bade2c7f8 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager.h @@ -0,0 +1,699 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +/** + * @file peer_manager.h + * + * @defgroup peer_manager Peer Manager + * @ingroup ble_sdk_lib + * @{ + * @brief Module for managing BLE bonding, which includes controlling encryption and pairing + * procedures as well as persistently storing different pieces of data that must be stored + * when bonded. + * + * @details The API consists of functions for configuring the pairing and encryption behavior of the + * device and functions for manipulating the stored data. + */ + + +#ifndef PEER_MANAGER_H__ +#define PEER_MANAGER_H__ + +#include +#include +#include "sdk_common.h" +#include "ble.h" +#include "ble_gap.h" +#include "peer_manager_types.h" +#include "peer_database.h" + + + +/**@brief Security status of a connection. + */ +typedef struct +{ + uint8_t connected : 1; /**< @brief The connection is active (not disconnected). */ + uint8_t encrypted : 1; /**< @brief Communication on this link is encrypted. */ + uint8_t mitm_protected : 1; /**< @brief The encrypted communication is also protected against man-in-the-middle attacks. */ + uint8_t bonded : 1; /**< @brief The peer is bonded with us. */ +} pm_conn_sec_status_t; + + +/**@brief Types of events that can come from the @ref peer_manager module. + */ +typedef enum +{ + PM_EVT_BONDED_PEER_CONNECTED, /**< @brief A connected peer has been identified as one with which we have a bond. When performing bonding with a peer for the first time, this event will not be sent until a new connection is established with the peer. When we are central, this event is always sent when the Peer Manager receives the @ref BLE_GAP_EVT_CONNECTED event. When we are peripheral, this event might in rare cases arrive later. */ + PM_EVT_CONN_SEC_START, /**< @brief A security procedure has started on a link, initiated either locally or remotely. The security procedure is using the last parameters provided via @ref pm_sec_params_set. This event is always followed by either a @ref PM_EVT_CONN_SEC_SUCCEEDED or a @ref PM_EVT_CONN_SEC_FAILED event. This is an informational event; no action is needed for the procedure to proceed. */ + PM_EVT_CONN_SEC_SUCCEEDED, /**< @brief A link has been encrypted, either as a result of a call to @ref pm_conn_secure or a result of an action by the peer. The event structure contains more information about the circumstances. This event might contain a peer ID with the value @ref PM_PEER_ID_INVALID, which means that the peer (central) used an address that could not be identified, but it used an encryption key (LTK) that is present in the database. */ + PM_EVT_CONN_SEC_FAILED, /**< @brief A pairing or encryption procedure has failed. In some cases, this means that security is not possible on this link (temporarily or permanently). How to handle this error depends on the application. */ + PM_EVT_CONN_SEC_CONFIG_REQ, /**< @brief The peer (central) has requested pairing, but a bond already exists with that peer. Reply by calling @ref pm_conn_sec_config_reply before the event handler returns. If no reply is sent, a default is used. */ + PM_EVT_STORAGE_FULL, /**< @brief There is no more room for peer data in flash storage. To solve this problem, delete data that is not needed anymore and run a garbage collection procedure in FDS. */ + PM_EVT_ERROR_UNEXPECTED, /**< @brief An unrecoverable error happened inside Peer Manager. An operation failed with the provided error. */ + PM_EVT_PEER_DATA_UPDATE_SUCCEEDED, /**< @brief A piece of peer data was stored, updated, or cleared in flash storage. This event is sent for all successful changes to peer data, also those initiated internally in Peer Manager. To identify an operation, compare the store token in the event with the store token received during the initiating function call. Events from internally initiated changes might have invalid store tokens. */ + PM_EVT_PEER_DATA_UPDATE_FAILED, /**< @brief A piece of peer data could not be stored, updated, or cleared in flash storage. This event is sent instead of @ref PM_EVT_PEER_DATA_UPDATE_SUCCEEDED for the failed operation. */ + PM_EVT_PEER_DELETE_SUCCEEDED, /**< @brief A peer was cleared from flash storage, for example because a call to @ref pm_peer_delete succeeded. This event can also be sent as part of a call to @ref pm_peers_delete or internal cleanup. */ + PM_EVT_PEER_DELETE_FAILED, /**< @brief A peer could not be cleared from flash storage. This event is sent instead of @ref PM_EVT_PEER_DELETE_SUCCEEDED for the failed operation. */ + PM_EVT_PEERS_DELETE_SUCCEEDED, /**< @brief A call to @ref pm_peers_delete has completed successfully. Flash storage now contains no peer data. */ + PM_EVT_PEERS_DELETE_FAILED, /**< @brief A call to @ref pm_peers_delete has failed, which means that at least one of the peers could not be deleted. Other peers might have been deleted, or might still be queued to be deleted. No more @ref PM_EVT_PEERS_DELETE_SUCCEEDED or @ref PM_EVT_PEERS_DELETE_FAILED events are sent until the next time @ref pm_peers_delete is called. */ + PM_EVT_LOCAL_DB_CACHE_APPLIED, /**< @brief Local database values for a peer (taken from flash storage) have been provided to the SoftDevice. */ + PM_EVT_LOCAL_DB_CACHE_APPLY_FAILED, /**< @brief Local database values for a peer (taken from flash storage) were rejected by the SoftDevice, which means that either the database has changed or the user has manually set the local database to an invalid value (using @ref pm_peer_data_store). */ + PM_EVT_SERVICE_CHANGED_IND_SENT, /**< @brief A service changed indication has been sent to a peer, as a result of a call to @ref pm_local_database_has_changed. This event will be followed by a @ref PM_EVT_SERVICE_CHANGED_IND_CONFIRMED event if the peer acknowledges the indication. */ + PM_EVT_SERVICE_CHANGED_IND_CONFIRMED, /**< @brief A service changed indication that was sent has been confirmed by a peer. The peer can now be considered aware that the local database has changed. */ +} pm_evt_id_t; + + +/**@brief Parameters specific to the @ref PM_EVT_CONN_SEC_SUCCEEDED event. + */ +typedef struct +{ + pm_conn_sec_procedure_t procedure; /**< @brief The procedure that led to securing the link. */ +} pm_conn_secured_evt_t; + + +/**@brief Parameters specific to the @ref PM_EVT_CONN_SEC_FAILED event. + */ +typedef struct +{ + pm_conn_sec_procedure_t procedure; /**< @brief The procedure that failed. */ + pm_sec_error_code_t error; /**< @brief An error code that describes the failure. */ + uint8_t error_src; /**< @brief The party that raised the error, see @ref BLE_GAP_SEC_STATUS_SOURCES. */ +} pm_conn_secure_failed_evt_t; + + +/**@brief Actions that can be performed to peer data in persistent storage. + */ +typedef enum +{ + PM_PEER_DATA_OP_UPDATE, /**< @brief Writing or overwriting the data. */ + PM_PEER_DATA_OP_DELETE, /**< @brief Removing the data. */ +} pm_peer_data_op_t; + + +/**@brief Parameters specific to the @ref PM_EVT_PEER_DATA_UPDATE_SUCCEEDED event. + */ +typedef struct +{ + pm_peer_data_id_t data_id; /**< @brief The type of the data that was changed. */ + pm_peer_data_op_t action; /**< @brief What happened to the data. */ + uint8_t flash_changed : 1; /**< @brief If this is false, no operation was done in flash, because the value was already what it should be. Please note that in certain scenarios, this flag will be true even if the new value is the same as the old. */ + pm_store_token_t token; /**< @brief Token that identifies the operation. For @ref PM_PEER_DATA_OP_DELETE actions, this token can be disregarded. For @ref PM_PEER_DATA_OP_UPDATE actions, compare this token with the token that is received from a call to a @ref PM_PEER_DATA_FUNCTIONS function. */ +} pm_peer_data_update_succeeded_evt_t; + + +/**@brief Parameters specific to the @ref PM_EVT_PEER_DATA_UPDATE_FAILED event. + */ +typedef struct +{ + pm_peer_data_id_t data_id; /**< @brief The type of the data that was supposed to be changed. */ + pm_peer_data_op_t action; /**< @brief The action that failed. */ + pm_store_token_t token; /**< @brief Token that identifies the operation. For @ref PM_PEER_DATA_OP_DELETE actions, this token can be disregarded. For @ref PM_PEER_DATA_OP_UPDATE actions, compare this token with the token that is received from a call to a @ref PM_PEER_DATA_FUNCTIONS function. */ + ret_code_t error; /**< @brief An error code that describes the failure. */ +} pm_peer_data_update_failed_t; + + +/**@brief Standard parameters for failure events. + */ +typedef struct +{ + ret_code_t error; /**< @brief The error that occurred. */ +} pm_failure_evt_t; + + +/**@brief An event from the @ref peer_manager module. + * + * @details The structure contains both standard parameters and parameters that are specific to some events. + */ +typedef struct +{ + pm_evt_id_t evt_id; /**< @brief The type of the event. */ + uint16_t conn_handle; /**< @brief The connection that this event pertains to, or @ref BLE_CONN_HANDLE_INVALID. */ + pm_peer_id_t peer_id; /**< @brief The bonded peer that this event pertains to, or @ref PM_PEER_ID_INVALID. */ + union + { + pm_conn_secured_evt_t conn_sec_succeeded; /**< @brief Parameters specific to the @ref PM_EVT_CONN_SEC_SUCCEEDED event. */ + pm_conn_secure_failed_evt_t conn_sec_failed; /**< @brief Parameters specific to the @ref PM_EVT_CONN_SEC_FAILED event. */ + pm_peer_data_update_succeeded_evt_t peer_data_update_succeeded; /**< @brief Parameters specific to the @ref PM_EVT_PEER_DATA_UPDATE_SUCCEEDED event. */ + pm_peer_data_update_failed_t peer_data_update_failed; /**< @brief Parameters specific to the @ref PM_EVT_PEER_DATA_UPDATE_FAILED event. */ + pm_failure_evt_t peer_delete_failed; /**< @brief Parameters specific to the @ref PM_EVT_PEER_DELETE_FAILED event. */ + pm_failure_evt_t peers_delete_failed_evt; /**< @brief Parameters specific to the @ref PM_EVT_PEERS_DELETE_FAILED event. */ + pm_failure_evt_t error_unexpected; /**< @brief Parameters specific to the @ref PM_EVT_PEER_DELETE_FAILED event. */ + } params; +} pm_evt_t; + + +/**@brief Event handler for events from the @ref peer_manager module. + * + * @sa pm_register + * + * @param[in] p_event The event that has occurred. + */ +typedef void (*pm_evt_handler_t)(pm_evt_t const * p_event); + + +/**@brief Function for initializing the Peer Manager. + * + * @details You must initialize the Peer Manager before you can call any other Peer Manager + * functions. + * + * @retval NRF_SUCCESS If initialization was successful. + * @retval NRF_ERROR_INTERNAL If another error occurred. + */ +ret_code_t pm_init(void); + + +/**@brief Function for registering an event handler with the Peer Manager. + * + * @param[in] event_handler Callback for events from the @ref peer_manager module. @p event_handler + * is called for every event that the Peer Manager sends after this + * function is called. + * + * @retval NRF_SUCCESS If initialization was successful. + * @retval NRF_ERROR_NULL If @p event_handler was NULL. + * @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized. + */ +ret_code_t pm_register(pm_evt_handler_t event_handler); + + +/**@brief Function for providing pairing and bonding parameters to use for pairing procedures. + * + * @details Until this function is called, all bonding procedures that are initiated by the + * peer are rejected. + * + * This function can be called multiple times with different parameters, even with NULL as + * @p p_sec_params, in which case the Peer Manager starts rejecting all procedures again. + * + * @param[in] p_sec_params Security parameters to be used for subsequent security procedures. + * + * @retval NRF_SUCCESS If the parameters were set successfully. + * @retval NRF_ERROR_INVALID_PARAM If the combination of parameters is invalid. + * @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized. + * @retval NRF_ERROR_INTERNAL If another error occurred. + */ +ret_code_t pm_sec_params_set(ble_gap_sec_params_t * p_sec_params); + + +/**@brief Function for passing BLE events to the Peer Manager. + * + * @details For the module to work as expected, this function must be called with each BLE event + * from the SoftDevice. It must be called after @ref ble_conn_state_on_ble_evt, but before + * the application processes the event. + * + * Calling this function before @ref pm_init is safe, but without effect. + * + * @param[in] p_ble_evt BLE stack event that is dispatched to the function. + */ +void pm_on_ble_evt(ble_evt_t * p_ble_evt); + + +/**@brief Function for establishing encryption on a connection, and optionally establishing a bond. + * + * @details This function attempts to secure the link that is specified by @p conn_handle. It uses + * the parameters that were previously provided in a call to @ref pm_sec_params_set. + * + * If the connection is a master connection, calling this function starts a security + * procedure on the link. If we have keys from a previous bonding procedure with this peer + * and the keys meet the security requirements in the currently active sec_params, the + * function attempts to establish encryption with the existing keys. If no key exists, the + * function attempts to pair and bond according to the currently active sec_params. + * + * If the function completes successfully, a @ref PM_EVT_CONN_SEC_START event is sent. + * The procedure might be queued, in which case the @ref PM_EVT_CONN_SEC_START event is + * delayed until the procedure is initiated in the SoftDevice. + * + * If the connection is a slave connection, the function sends a security request to + * the peer (master). It is up to the peer then to initiate pairing or encryption. + * If the peer ignores the request, a @ref BLE_GAP_EVT_TIMEOUT event occurs + * with the source @ref BLE_GAP_TIMEOUT_SRC_SECURITY_REQUEST. Otherwise, the peer initiates + * security, in which case things happen as if the peer had initiated security itself. + * See @ref PM_EVT_CONN_SEC_START for information about peer-initiated security. + * + * @param[in] conn_handle Connection handle of the link as provided by the SoftDevice. + * @param[in] force_repairing Whether to force a pairing procedure even if there is an existing + * encryption key. This argument is relevant only for + * the central role. Recommended value: false. + * + * @retval NRF_SUCCESS If the operation completed successfully. + * @retval NRF_ERROR_TIMEOUT If there was an SMP time-out, so that no more SMP + * operations can be performed on this link. + * @retval BLE_ERROR_INVALID_CONN_HANDLE If the connection handle is invalid. + * @retval NRF_ERROR_NOT_FOUND If the security parameters have not been set. + * @retval NRF_ERROR_NO_MEM If there is no more space in flash. + * @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized, or the peer is + * disconnected or in the process of disconnecting. + * @retval NRF_ERROR_INTERNAL If another error occurred. + */ +ret_code_t pm_conn_secure(uint16_t conn_handle, bool force_repairing); + + +/**@brief Function for providing security configuration for a link. + * + * @details This function is optional, and must be called in reply to a @ref + * PM_EVT_CONN_SEC_CONFIG_REQ event, before the Peer Manager event handler returns. If it + * is not called in time, a default configuration is used. See @ref pm_conn_sec_config_t + * for the value of the default. + * + * @param[in] conn_handle The connection to set the configuration for. + * @param[in] p_conn_sec_config The configuration. + */ +void pm_conn_sec_config_reply(uint16_t conn_handle, pm_conn_sec_config_t * p_conn_sec_config); + + +/**@brief Function for manually informing that the local database has changed. + * + * @details This function sends a service changed indication to all bonded and/or connected peers + * that subscribe to this indication. If a bonded peer is not connected, the indication is + * sent when it reconnects. Every time an indication is sent, a @ref + * PM_EVT_SERVICE_CHANGED_IND_SENT event occurs, followed by a @ref + * PM_EVT_SERVICE_CHANGED_IND_CONFIRMED when the peer sends its confirmation. Peers that + * are not subscribed to the service changed indication when this function is called do not + * receive an indication, and no events are sent to the user. Likewise, if the service + * changed characteristic is not present in the local database, this no indications are + * sent peers, and no events are sent to the user. + */ +void pm_local_database_has_changed(void); + + +/**@brief Function for getting the security status of a connection. + * + * @param[in] conn_handle Connection handle of the link as provided by the SoftDevice. + * @param[out] p_conn_sec_status Security status of the link. + * + * @retval NRF_SUCCESS If pairing was initiated successfully. + * @retval BLE_ERROR_INVALID_CONN_HANDLE If the connection handle is invalid. + * @retval NRF_ERROR_NULL If @p p_conn_sec_status was NULL. + * @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized. + */ +ret_code_t pm_conn_sec_status_get(uint16_t conn_handle, pm_conn_sec_status_t * p_conn_sec_status); + + +/**@brief Experimental function for specifying the public key to use for LESC operations. + * + * @details This function can be called multiple times. The specified public key will be used for + * all subsequent LESC (LE Secure Connections) operations until the next time this function + * is called. + * + * @note The key must continue to reside in application memory as it is not copied by Peer Manager. + * + * @param[in] p_public_key The public key to use for all subsequent LESC operations. + * + * @retval NRF_SUCCESS Pairing initiated successfully. + * @retval NRF_ERROR_INVALID_STATE Peer Manager is not initialized. + */ +ret_code_t pm_lesc_public_key_set(ble_gap_lesc_p256_pk_t * p_public_key); + + +/** + * @brief Function for constructing a whitelist for use when advertising. + * + * @details This function constructs a whitelist that contains the addresses and IRKs of the + * provided peer IDs. If @p p_peer_ids is NULL, the first (lowest) 8 peer IDs are chosen. + * If @ref ble_gap_whitelist_t.pp_addrs in @p p_whitelist is NULL, the whitelist contains + * only IRKs, and vice versa. + * + * @note When using a whitelist, always use the whitelist that was created or set by the most recent + * call to this function or to @ref pm_whitelist_custom. + * @note Do not call this function while advertising or scanning with another whitelist. + * + * @param[in] p_peer_ids The IDs of the peers to be added to the whitelist, or NULL. + * @param[in] n_peer_ids The number of peer IDs in @p p_peer_ids. + * @param[in,out] p_whitelist The constructed whitelist. Note that @p p_whitelist->pp_addrs + * must be NULL or point to an array with size @ref + * BLE_GAP_WHITELIST_ADDR_MAX_COUNT and @p p_whitelist->pp_irks + * must be NULL or point to an array with size @ref + * BLE_GAP_WHITELIST_IRK_MAX_COUNT. + * + * @retval NRF_SUCCESS If the whitelist was created successfully. + * @retval NRF_ERROR_NULL If @p p_whitelist was NULL. + * @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized. + */ +ret_code_t pm_whitelist_create(pm_peer_id_t * p_peer_ids, + uint8_t n_peer_ids, + ble_gap_whitelist_t * p_whitelist); + + +/** + * @brief Function for informing the Peer Manager of what whitelist should be used. + * + * @details This function should be used if the application wants to use a whitelist that is + * created in the application. When using Peer Manager, this function must be called to + * inform that the custom whitelist should be used instead of the one in Peer Manager. + * + * @note When using a whitelist, always use the whitelist that was created or set by the most recent + * call to this function or to @ref pm_whitelist_create. + * @note Do not call this function while advertising or scanning with another whitelist. + * @note Do not add any IRKs to the whitelist that are not present in the Peer Manager's persistent + * storage. + * + * @param[in] p_whitelist The whitelist. + * + * @retval NRF_SUCCESS If the operation completed successfully. + * @retval NRF_ERROR_NULL If @p p_whitelist was NULL. + * @retval NRF_ERROR_NOT_FOUND If one or more of the whitelist's IRKs was not found in the Peer + * Manager's persistent storage. + * @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized. + */ +ret_code_t pm_whitelist_custom(ble_gap_whitelist_t * p_whitelist); + + +/** + * @brief Function for getting the connection handle of the connection with a bonded peer. + * + * @param[in] peer_id The peer ID of the bonded peer. + * @param[out] p_conn_handle Connection handle, or @ref BLE_ERROR_INVALID_CONN_HANDLE if the peer + * is not connected. + * + * @retval NRF_SUCCESS If the connection handle was determined successfully. + * @retval NRF_ERROR_NULL If @p p_conn_handle was NULL. + * @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized. + */ +ret_code_t pm_conn_handle_get(pm_peer_id_t peer_id, uint16_t * p_conn_handle); + + +/**@brief Function for getting the peer ID of a connected peer. + * + * @param[in] conn_handle Connection handle. + * @param[out] p_peer_id Peer ID, or @ref PM_PEER_ID_INVALID if the peer is not bonded or + * @p conn_handle does not refer to a connection. + * + * @retval NRF_SUCCESS If the peer ID was retrieved successfully. + * @retval NRF_ERROR_NULL If @p p_peer_id was NULL. + * @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized. + */ +ret_code_t pm_peer_id_get(uint16_t conn_handle, pm_peer_id_t * p_peer_id); + + +/**@brief Function for getting the next peer ID in the sequence of all used peer IDs. + * + * @details This function can be used to loop through all used peer IDs. The order in which + * peer IDs are returned should be considered unpredictable. @ref PM_PEER_ID_INVALID + * is considered to be before the first and after the last used peer ID. + * + * @details To loop through all peer IDs exactly once, use the following constuct: + * @code{c} + * pm_peer_id_t current_peer_id = pm_next_peer_id_get(PM_PEER_ID_INVALID); + * while (current_peer_id != PM_PEER_ID_INVALID) + * { + * // Do something with current_peer_id. + * current_peer_id = pm_next_peer_id_get(current_peer_id) + * } + * @endcode + * + * @param[in] prev_peer_id The previous peer ID. + * + * @return The next peer ID. If @p prev_peer_id was @ref PM_PEER_ID_INVALID, the + * next peer ID is the first used peer ID. If @p prev_peer_id was the last + * used peer ID, the function returns @ref PM_PEER_ID_INVALID. + */ +pm_peer_id_t pm_next_peer_id_get(pm_peer_id_t prev_peer_id); + + +/**@brief Function for querying the number of valid peer IDs that are available. + * + * @details This function returns the number of peers for which there is data in persistent storage. + * + * @return The number of valid peer IDs. + */ +uint32_t pm_peer_count(void); + + + + +/**@anchor PM_PEER_DATA_FUNCTIONS + * @name Functions (Peer Data) + * Functions for manipulating peer data. + * @{ + */ + +/** + * @{ + */ + +/**@brief Function for retrieving stored data of a peer. + * + * @note The length of the provided buffer must be a multiple of 4. + * + * @param[in] peer_id Peer ID to get data for. + * @param[in] data_id Which type of data to read. + * @param[out] p_data Where to put the retrieved data. + * @param[inout] p_len In: The length in bytes of @p p_data. + * Out: The length in bytes of the read data, if the read was successful. + * + * @retval NRF_SUCCESS If the data was read successfully. + * @retval NRF_ERROR_INVALID_PARAM If the the data type or the peer ID was invalid or unallocated, + * or if the length in @p p_length was not a multiple of 4. + * @retval NRF_ERROR_NULL If a pointer parameter was NULL. + * @retval NRF_ERROR_NOT_FOUND If no stored data was found for this peer ID/data ID combination. + * @retval NRF_ERROR_DATA_SIZE If the provided buffer was not large enough. + * @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized. + */ +ret_code_t pm_peer_data_load(pm_peer_id_t peer_id, + pm_peer_data_id_t data_id, + void * p_data, + uint16_t * p_len); + +/**@brief Function for reading a peer's bonding data (@ref PM_PEER_DATA_ID_BONDING). + * @details See @ref pm_peer_data_load for parameters and return values. */ +ret_code_t pm_peer_data_bonding_load(pm_peer_id_t peer_id, + pm_peer_data_bonding_t * p_data); + +/**@brief Function for reading a peer's remote DB values. (@ref PM_PEER_DATA_ID_GATT_REMOTE). + * @details See @ref pm_peer_data_load for parameters and return values. */ +ret_code_t pm_peer_data_remote_db_load(pm_peer_id_t peer_id, + ble_gatt_db_srv_t * p_data, + uint16_t * p_len); + +/**@brief Function for reading a peer's application data. (@ref PM_PEER_DATA_ID_APPLICATION). + * @details See @ref pm_peer_data_load for parameters and return values. */ +ret_code_t pm_peer_data_app_data_load(pm_peer_id_t peer_id, + uint8_t * p_data, + uint16_t * p_len); +/** @}*/ + + +/** + * @{ + */ + +/**@brief Function for setting or updating stored data of a peer. + * + * @note Writing the data to persistent storage happens asynchronously. Therefore, the buffer + * that contains the data must be kept alive until the operation has completed. + * + * @note The data written using this function may later be overwritten as a result of internal + * operations in the Peer Manager. A Peer Manager event is sent each time data is updated, + * regardless of whether the operation originated internally or from action by the user. + * + * @param[in] peer_id Peer ID to set data for. + * @param[in] data_id Which type of data to set. + * @param[in] p_data New value to set. + * @param[in] len The length in bytes of @p p_data. + * @param[out] p_token A token that identifies this particular store operation. The token can be + * used to identify events that pertain to this operation. This parameter can + * be NULL. + * + * @retval NRF_SUCCESS If the data is scheduled to be written to persistent storage. + * @retval NRF_ERROR_NULL If @p p_data is NULL. + * @retval NRF_ERROR_NOT_FOUND If no peer was found for the peer ID. + * @retval NRF_ERROR_BUSY If the underlying flash handler is busy with other flash + * operations. Try again after receiving a Peer Manager event. + * @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized. + */ +ret_code_t pm_peer_data_store(pm_peer_id_t peer_id, + pm_peer_data_id_t data_id, + void const * p_data, + uint16_t len, + pm_store_token_t * p_token); + +/**@brief Function for setting or updating a peer's bonding data (@ref PM_PEER_DATA_ID_BONDING). + * @details See @ref pm_peer_data_store for parameters and return values. */ +ret_code_t pm_peer_data_bonding_store(pm_peer_id_t peer_id, + pm_peer_data_bonding_t const * p_data, + pm_store_token_t * p_token); + +/**@brief Function for setting or updating a peer's remote DB values. (@ref PM_PEER_DATA_ID_GATT_REMOTE). + * @details See @ref pm_peer_data_store for parameters and return values. */ +ret_code_t pm_peer_data_remote_db_store(pm_peer_id_t peer_id, + ble_gatt_db_srv_t const * p_data, + uint16_t len, + pm_store_token_t * p_token); + +/**@brief Function for setting or updating a peer's application data. (@ref PM_PEER_DATA_ID_APPLICATION). + * @details See @ref pm_peer_data_store for parameters and return values. */ +ret_code_t pm_peer_data_app_data_store(pm_peer_id_t peer_id, + uint8_t const * p_data, + uint16_t len, + pm_store_token_t * p_token); +/** @}*/ + + +/** + * @{ + */ + +/**@brief Function for deleting a peer's stored pieces of data. + * + * @details This function deletes specific data that is stored for a peer. Note that bonding data + * cannot be cleared separately. + * + * To delete all data for a peer (including bonding data), use @ref pm_peer_delete. + * + * @note Clearing data in persistent storage happens asynchronously. + * + * @param[in] peer_id Peer ID to clear data for. + * @param[in] data_id Which data to clear. + * + * @retval NRF_SUCCESS If the clear procedure was initiated successfully. + * @retval NRF_ERROR_INVALID_PARAM If @p data_id was PM_PEER_DATA_ID_BONDING or invalid, or + * @p peer_id was invalid. + * @retval NRF_ERROR_NOT_FOUND If there was no data to clear for this peer ID/data ID combination. + * @retval NRF_ERROR_BUSY If the underlying flash handler is busy with other flash + * operations. Try again after receiving a Peer Manager event. + * @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized. + * @retval NRF_ERROR_INTERNAL If another error occurred. + */ +ret_code_t pm_peer_data_delete(pm_peer_id_t peer_id, pm_peer_data_id_t data_id); + + +/**@brief Function for manually adding a peer to the persistent storage. + * + * @details This function allocates a new peer ID and stores bonding data for the new peer. The + * bonding data is necessary to prevent ambiguity/inconsistency in peer data. + * + * @param[in] p_bonding_data The bonding data of the new peer (must contain a public/static + * address or a non-zero IRK). + * @param[out] p_new_peer_id Peer ID for the new peer, or an existing peer if a match was found. + * @param[out] p_token A token that identifies this particular store operation (storing the + * bonding data). The token can be used to identify events that pertain + * to this operation. This parameter can be NULL. + * + * @retval NRF_SUCCESS If the store operation for bonding data was initiated successfully. + * @retval NRF_ERROR_NULL If @p p_bonding_data or @p p_new_peer_id is NULL. + * @retval NRF_ERROR_NO_MEM If there is no more space in persistent storage, so that the new + * peer cannot be allocated. + * @retval NRF_ERROR_BUSY If the underlying flash handler is busy with other flash + * operations. Try again after receiving a Peer Manager event. + * @retval NRF_ERROR_INVALID_PARAM If the bonding data is invalid. + * @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized. + */ +ret_code_t pm_peer_new(pm_peer_id_t * p_new_peer_id, + pm_peer_data_bonding_t * p_bonding_data, + pm_store_token_t * p_token); + + +/**@brief Function for freeing persistent storage for a peer. + * + * @details This function deletes every piece of data that is associated with the specified peer and + * frees the peer ID to be used for another peer. The deletion happens asynchronously, and + * the peer ID is not freed until the data is deleted. When the operation finishes, a @ref + * PM_EVT_PEER_DELETE_SUCCEEDED or @ref PM_EVT_PEER_DELETE_FAILED event is sent. + * + * @warning Use this function only when not connected to or connectable for the peer that is being + * deleted. If the peer is or becomes connected or data is manually written in flash during + * this procedure (until the success or failure event happens), the behavior is undefined. + * + * @param[in] peer_id Peer ID to be freed and have all associated data deleted. + * + * @retval NRF_SUCCESS If the operation was initiated successfully. + * @retval NRF_ERROR_INVALID_PARAM If the peer ID was not valid. + * @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized. + */ +ret_code_t pm_peer_delete(pm_peer_id_t peer_id); + + +/**@brief Function for deleting all data stored for all peers. + * + * @details This function sends either a @ref PM_EVT_PEERS_DELETE_SUCCEEDED or a @ref + * PM_EVT_PEERS_DELETE_FAILED event. In addition, a @ref PM_EVT_PEER_DELETE_SUCCEEDED or + * @ref PM_EVT_PEER_DELETE_FAILED event is sent for each deleted peer. + * + * @note No event is sent when there is no peer data in flash. + * + * @warning Use this function only when not connected or connectable. If a peer is or becomes + * connected or a @ref PM_PEER_DATA_FUNCTIONS function is used during this procedure (until + * the success or failure event happens), the behavior is undefined. + * + * @retval NRF_SUCCESS If the deletion process was initiated successfully. + * @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized. + * @retval NRF_ERROR_INTERNAL If another error occurred. + */ +ret_code_t pm_peers_delete(void); +/** @}*/ + + +/** + * @{ + */ + + +/**@brief Function for finding the highest and lowest ranked peers. + * + * @details The rank is saved in persistent storage under the data ID @ref PM_PEER_DATA_ID_PEER_RANK. + * + * @details The interpretation of rank is up to the user, because the rank is only updated by + * calling @ref pm_peer_rank_highest or by manipulating the value using a @ref + * PM_PEER_DATA_FUNCTIONS function. + * + * @note Any argument that is NULL is ignored. + * + * @param[out] p_highest_ranked_peer The peer ID with the highest rank of all peers, for example, + * the most recently used peer. + * @param[out] p_highest_rank The highest rank. + * @param[out] p_lowest_ranked_peer The peer ID with the lowest rank of all peers, for example, + * the least recently used peer. + * @param[out] p_lowest_rank The lowest rank. + * + * @retval NRF_SUCCESS If the operation completed successfully. + * @retval NRF_ERROR_NOT_FOUND If no peers were found. + * @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized. + * @retval NRF_ERROR_INTERNAL If another error occurred. + */ +ret_code_t pm_peer_ranks_get(pm_peer_id_t * p_highest_ranked_peer, + uint32_t * p_highest_rank, + pm_peer_id_t * p_lowest_ranked_peer, + uint32_t * p_lowest_rank); + + +/**@brief Function for updating the rank of a peer to be highest among all stored peers. + * + * @details If this function returns @ref NRF_SUCCESS, either a @ref PM_EVT_PEER_DATA_UPDATE_SUCCEEDED or a + * @ref PM_EVT_PEER_DATA_UPDATE_FAILED event is sent with a @ref + * PM_STORE_TOKEN_INVALID store token when the operation is complete. Until the operation + * is complete, this function returns @ref NRF_ERROR_BUSY. + * + * When the operation is complete, the peer is the highest ranked peer as reported by + * @ref pm_peer_ranks_get. + * + * @note The @ref PM_EVT_PEER_DATA_UPDATE_SUCCEEDED event can arrive before the function returns if the peer + * is already ranked highest. In this case, the @ref pm_peer_data_update_succeeded_evt_t::flash_changed flag + * in the event will be false. + * + * @param[in] peer_id The peer to rank highest. + * + * @retval NRF_SUCCESS If the peer's rank is, or will be updated to be highest. + * @retval NRF_ERROR_BUSY If the underlying flash handler is busy with other flash + * operations, or if a previous call to this function has not + * completed. Try again after receiving a Peer Manager event. + * @retval NRF_ERROR_INTERNAL If another error occurred. + * @retval NRF_ERROR_INVALID_STATE If the Peer Manager is not initialized. + */ +ret_code_t pm_peer_rank_highest(pm_peer_id_t peer_id); + +/** @}*/ + +/** @} */ + +/** @} */ + +#endif // PEER_MANAGER_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_internal.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_internal.h new file mode 100644 index 0000000000..46055a9796 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_internal.h @@ -0,0 +1,147 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#ifndef PEER_MANAGER_INTERNAL_H__ +#define PEER_MANAGER_INTERNAL_H__ + +#include +#include "sdk_errors.h" +#include "ble.h" +#include "ble_gap.h" +#include "peer_manager_types.h" + + +/** + * @cond NO_DOXYGEN + * @file peer_manager_types.h + * + * @addtogroup peer_manager + * @brief File containing definitions used solely inside the Peer Manager's modules. + * @{ + */ + +ANON_UNIONS_ENABLE + +/**@brief One piece of data associated with a peer, together with its type. + * + * @note This type is deprecated. + */ +typedef struct +{ + uint16_t length_words; /**< @brief The length of the data in words. */ + pm_peer_data_id_t data_id; /**< @brief ID that specifies the type of data (defines which member of the union is used). */ + union + { + pm_peer_data_bonding_t * p_bonding_data; /**< @brief The exchanged bond information in addition to metadata of the bonding. */ + uint32_t * p_peer_rank; /**< @brief A value locally assigned to this peer. Its interpretation is up to the user. The rank is not set automatically by the Peer Manager, but it is assigned by the user using either @ref pm_peer_rank_highest or a @ref PM_PEER_DATA_FUNCTIONS function. */ + bool * p_service_changed_pending; /**< @brief Whether a service changed indication should be sent to the peer. */ + pm_peer_data_local_gatt_db_t * p_local_gatt_db; /**< @brief Persistent information pertaining to a peer GATT client. */ + ble_gatt_db_srv_t * p_remote_gatt_db; /**< @brief Persistent information pertaining to a peer GATT server. */ + uint8_t * p_application_data; /**< @brief Arbitrary data to associate with the peer. This data can be freely used by the application. */ + void * p_all_data; /**< @brief Generic access pointer to the data. It is used only to handle the data without regard to type. */ + }; /**< @brief The data. */ +} pm_peer_data_t; + + +/**@brief Immutable version of @ref pm_peer_data_t. + * + * @note This type is deprecated. + */ +typedef struct +{ + uint16_t length_words; /**< @brief The length of the data in words. */ + pm_peer_data_id_t data_id; /**< @brief ID that specifies the type of data (defines which member of the union is used). */ + union + { + pm_peer_data_bonding_t const * p_bonding_data; /**< @brief Immutable @ref pm_peer_data_t::p_bonding_data. */ + uint32_t const * p_peer_rank; /**< @brief Immutable @ref pm_peer_data_t::p_peer_rank. */ + bool const * p_service_changed_pending; /**< @brief Immutable @ref pm_peer_data_t::p_service_changed_pending. */ + pm_peer_data_local_gatt_db_t const * p_local_gatt_db; /**< @brief Immutable @ref pm_peer_data_t::p_local_gatt_db. */ + ble_gatt_db_srv_t const * p_remote_gatt_db; /**< @brief Immutable @ref pm_peer_data_t::p_remote_gatt_db. */ + uint8_t const * p_application_data; /**< @brief Immutable @ref pm_peer_data_t::p_application_data. */ + void const * p_all_data; /**< @brief Immutable @ref pm_peer_data_t::p_all_data. */ + }; /**< @brief The data. */ +} pm_peer_data_const_t; + +ANON_UNIONS_DISABLE + + +/**@brief Version of @ref pm_peer_data_t that reflects the structure of peer data in flash. + * + * @note This type is deprecated. + */ +typedef pm_peer_data_const_t pm_peer_data_flash_t; + + +/**@brief Macro for calculating the flash size of bonding data. + * + * @return The number of words that the data takes in flash. + */ +#define PM_BONDING_DATA_N_WORDS() BYTES_TO_WORDS(sizeof(pm_peer_data_bonding_t)) + + +/**@brief Macro for calculating the flash size of service changed pending state. + * + * @return The number of words that the data takes in flash. + */ +#define PM_SC_STATE_N_WORDS() BYTES_TO_WORDS(sizeof(bool)) + + +/**@brief Macro for calculating the flash size of local GATT database data. + * + * @param[in] local_db_len The length, in bytes, of the database as reported by the SoftDevice. + * + * @return The number of words that the data takes in flash. + */ +#define PM_LOCAL_DB_N_WORDS(local_db_len) \ + BYTES_TO_WORDS((local_db_len) + PM_LOCAL_DB_LEN_OVERHEAD_BYTES) + + +/**@brief Macro for calculating the length of a local GATT database attribute array. + * + * @param[in] n_words The number of words that the data takes in flash. + * + * @return The length of the database attribute array. + */ +#define PM_LOCAL_DB_LEN(n_words) (((n_words) * BYTES_PER_WORD) - PM_LOCAL_DB_LEN_OVERHEAD_BYTES) + + +/**@brief Macro for calculating the flash size of remote GATT database data. + * + * @param[in] service_count The number of services in the service array. + * + * @return The number of words that the data takes in flash. + */ +#define PM_REMOTE_DB_N_WORDS(service_count) BYTES_TO_WORDS(sizeof(ble_gatt_db_srv_t) * (service_count)) + + +/**@brief Macro for calculating the flash size of remote GATT database data. + * + * @param[in] n_words The length in number of words. + * + * @return The number of words that the data takes in flash. + */ +#define PM_REMOTE_DB_N_SERVICES(n_words) (((n_words) * BYTES_PER_WORD) / sizeof(ble_gatt_db_srv_t)) + + +/**@brief Function for calculating the flash size of the usage index. + * + * @return The number of words that the data takes in flash. + */ +#define PM_USAGE_INDEX_N_WORDS() BYTES_TO_WORDS(sizeof(uint32_t)) + +/** @} + * @endcond + */ + +#endif /* PEER_MANAGER_INTERNAL_H__ */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_types.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_types.h new file mode 100644 index 0000000000..00cb89cf03 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_types.h @@ -0,0 +1,170 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +/** + * @file peer_manager_types.h + * + * @addtogroup peer_manager + * @{ + */ + +#ifndef PEER_MANAGER_TYPES_H__ +#define PEER_MANAGER_TYPES_H__ + +#include +#include +#include +#include "nrf.h" +#include "ble_gap.h" +#include "ble_hci.h" +#include "app_util.h" +#include "app_util_platform.h" +#include "ble_gatt_db.h" + + +/**@brief Handle to uniquely identify a peer for which we have persistently stored data. + */ +typedef uint16_t pm_peer_id_t; + +/**@brief Type that is used for write prepares (used to reserve space in flash). + */ +typedef uint32_t pm_prepare_token_t; + +/**@brief Type that is used to hold a reference to a stored item in flash. + */ +typedef uint32_t pm_store_token_t; + +/**@brief Errors from security procedures in Peer Manager. + * + * @details Possible values are defined in @ref PM_SEC_ERRORS and @ref BLE_GAP_SEC_STATUS. + */ +typedef uint16_t pm_sec_error_code_t; + + +//lint -emacro(516,PM_LOCAL_DB_LEN_OVERHEAD_BYTES) + +#define PM_PEER_ID_INVALID 0xFFFF /**< @brief Invalid value for @ref pm_peer_id_t. */ +#define PM_STORE_TOKEN_INVALID 0 /**< @brief Invalid value for store token. */ +#define PM_PEER_ID_N_AVAILABLE_IDS 256 /**< @brief The number of available peer IDs. */ +#define PM_LOCAL_DB_LEN_OVERHEAD_BYTES offsetof(pm_peer_data_local_gatt_db_t, data) /**< @brief The static-length part of the local GATT data struct. */ + + +#define PM_CONN_SEC_ERROR_BASE 0x1000 /**< @brief The base for Peer Manager defined errors. See @ref PM_SEC_ERRORS and @ref pm_sec_error_code_t. */ + + +/**@defgroup PM_SEC_ERRORS Peer Manager defined security errors + * + * @details The first 256 numbers in this range correspond to the status codes in + * @ref BLE_HCI_STATUS_CODES. + * @{ */ +#define PM_CONN_SEC_ERROR_PIN_OR_KEY_MISSING (PM_CONN_SEC_ERROR_BASE + 0x06) /**< @brief Encryption failed because the peripheral has lost the LTK for this bond. See also @ref BLE_HCI_STATUS_CODE_PIN_OR_KEY_MISSING and Table 3.7 ("Pairing Failed Reason Codes") in the Bluetooth Core Specification 4.2, section 3.H.3.5.5 (@linkBLEcore). */ +#define PM_CONN_SEC_ERROR_MIC_FAILURE (PM_CONN_SEC_ERROR_BASE + 0x3D) /**< @brief Encryption ended with disconnection because of mismatching keys or a stray packet during a procedure. See the SoftDevice GAP Message Sequence Charts on encryption (@linkBLEMSCgap), the Bluetooth Core Specification 4.2, sections 6.B.5.1.3.1 and 3.H.3.5.5 (@linkBLEcore), and @ref BLE_HCI_CONN_TERMINATED_DUE_TO_MIC_FAILURE. */ +#define PM_CONN_SEC_ERROR_DISCONNECT (PM_CONN_SEC_ERROR_BASE + 0x100) /**< @brief Pairing or encryption did not finish before the link disconnected for an unrelated reason. */ +#define PM_CONN_SEC_ERROR_SMP_TIMEOUT (PM_CONN_SEC_ERROR_BASE + 0x101) /**< @brief Pairing/bonding could not start because an SMP time-out has already happened on this link. This means that no more pairing or bonding can happen on this link. To be able to pair or bond, the link must be disconnected and then reconnected. See Bluetooth Core Specification 4.2 section 3.H.3.4 (@linkBLEcore). */ + /** @} */ + + + +/**@defgroup PM_PEER_ID_VERSIONS All versions of Peer IDs. + * @brief The data ID for each iteration of the data formats in flash. + * @details Each time the format (in flash) of a piece of peer data changes, the data ID will also + * be updated. This list of defines is a record of each data ID that has ever existed, and + * code that caters to legacy formats can find the relevant IDs here. + * @{ */ +#define PM_PEER_DATA_ID_FIRST_VX 0 /**< @brief The smallest data ID. */ +#define PM_PEER_DATA_ID_BONDING_V1 0 /**< @brief The data ID of the first version of bonding data. */ +#define PM_PEER_DATA_ID_BONDING_V2 7 /**< @brief The data ID of the second version of bonding data. */ +#define PM_PEER_DATA_ID_SERVICE_CHANGED_PENDING_V1 1 /**< @brief The data ID of the first version of the service changed pending flag. */ +#define PM_PEER_DATA_ID_GATT_LOCAL_V1 2 /**< @brief The data ID of the first version of local GATT data. */ +#define PM_PEER_DATA_ID_GATT_LOCAL_V2 8 /**< @brief The data ID of the second version of local GATT data. */ +#define PM_PEER_DATA_ID_GATT_REMOTE_V1 3 /**< @brief The data ID of the first version of remote GATT data. */ +#define PM_PEER_DATA_ID_APPLICATION_V1 4 /**< @brief The data ID of the first version of application data. */ +#define PM_PEER_DATA_ID_GATT_REMOTE_V2 5 /**< @brief The data ID of the second version of remote GATT data. */ +#define PM_PEER_DATA_ID_PEER_RANK_V1 6 /**< @brief The data ID of the first version of the rank. */ +#define PM_PEER_DATA_ID_LAST_VX 9 /**< @brief The data ID after the last valid one. */ +#define PM_PEER_DATA_ID_INVALID_VX 0xFF /**< @brief A data ID guaranteed to be invalid. */ +/**@}*/ + + +/**@brief The different types of data associated with a peer. + */ +typedef enum +{ + PM_PEER_DATA_ID_FIRST = PM_PEER_DATA_ID_FIRST_VX, /**< @brief The smallest data ID. */ + PM_PEER_DATA_ID_BONDING = PM_PEER_DATA_ID_BONDING_V2, /**< @brief The data ID for bonding data. See @ref pm_peer_data_bonding_t. */ + PM_PEER_DATA_ID_SERVICE_CHANGED_PENDING = PM_PEER_DATA_ID_SERVICE_CHANGED_PENDING_V1, /**< @brief The data ID for service changed state. */ + PM_PEER_DATA_ID_GATT_LOCAL = PM_PEER_DATA_ID_GATT_LOCAL_V2, /**< @brief The data ID for local GATT data (sys attributes). See @ref pm_peer_data_local_gatt_db_t. */ + PM_PEER_DATA_ID_GATT_REMOTE = PM_PEER_DATA_ID_GATT_REMOTE_V2, /**< @brief The data ID for remote GATT data. */ + PM_PEER_DATA_ID_PEER_RANK = PM_PEER_DATA_ID_PEER_RANK_V1, /**< @brief The data ID for peer rank. See @ref pm_peer_rank_highest. */ + PM_PEER_DATA_ID_APPLICATION = PM_PEER_DATA_ID_APPLICATION_V1, /**< @brief The data ID for application data. */ + PM_PEER_DATA_ID_LAST = PM_PEER_DATA_ID_LAST_VX, /**< @brief One more than the highest data ID. */ + PM_PEER_DATA_ID_INVALID = PM_PEER_DATA_ID_INVALID_VX, /**< @brief A data ID guaranteed to be invalid. */ +} pm_peer_data_id_t; + + +/**@brief Different procedures that can lead to an encrypted link. + */ +typedef enum +{ + PM_LINK_SECURED_PROCEDURE_ENCRYPTION, /**< @brief Using an LTK that was shared during a previous bonding procedure to encrypt the link. */ + PM_LINK_SECURED_PROCEDURE_BONDING, /**< @brief A pairing procedure, followed by a bonding procedure. */ + PM_LINK_SECURED_PROCEDURE_PAIRING, /**< @brief A pairing procedure with no bonding. */ +} pm_conn_sec_procedure_t; + + +/**@brief Configuration of a security procedure. + */ +typedef struct +{ + bool allow_repairing; /** @brief Whether to allow the peer to pair if it wants to, but is already bonded. If this is false, the procedure is rejected, and no more events are sent. Default: false. */ +} pm_conn_sec_config_t; + + +/**@brief Data associated with a bond to a peer. + */ +typedef struct +{ + uint8_t own_role; /**< @brief The role of the local device during bonding. */ + ble_gap_id_key_t peer_id; /**< @brief The peer's peer address and identity resolution key. */ + ble_gap_enc_key_t peer_ltk; /**< @brief The peer's long-term encryption key. */ + ble_gap_enc_key_t own_ltk; /**< @brief Locally generated long-term encryption key, distributed to the peer. */ +} pm_peer_data_bonding_t; + + + +/**@brief Data on a local GATT database. + */ +typedef struct +{ + uint32_t flags; /**< @brief Flags that describe the database attributes. */ + uint16_t len; /**< @brief Size of the attribute array. */ + uint8_t data[]; /**< @brief Array to hold the database attributes. */ +} pm_peer_data_local_gatt_db_t; + + +/**@brief Macro to check whether a data type is valid, thus one of the valid enum values. + * + * @param[in] data_id The data type to check. + */ +#define PM_PEER_DATA_ID_IS_VALID(data_id) \ + ( ((data_id) == PM_PEER_DATA_ID_BONDING) \ + || ((data_id) == PM_PEER_DATA_ID_SERVICE_CHANGED_PENDING)\ + || ((data_id) == PM_PEER_DATA_ID_GATT_LOCAL) \ + || ((data_id) == PM_PEER_DATA_ID_GATT_REMOTE) \ + || ((data_id) == PM_PEER_DATA_ID_PEER_RANK) \ + || ((data_id) == PM_PEER_DATA_ID_APPLICATION)) + + + /** @} */ + +#endif /* PEER_MANAGER_TYPES_H__ */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_buffer.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_buffer.c new file mode 100644 index 0000000000..935ddcc3d8 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_buffer.c @@ -0,0 +1,122 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#include "pm_buffer.h" + +#include +#include +#include "nrf_error.h" +#include "pm_mutex.h" + + +#define BUFFER_IS_VALID(p_buffer) ((p_buffer != NULL) \ + && (p_buffer->p_memory != NULL) \ + && (p_buffer->p_mutex != NULL)) + + + +ret_code_t pm_buffer_init(pm_buffer_t * p_buffer, + uint8_t * p_buffer_memory, + uint32_t buffer_memory_size, + uint8_t * p_mutex_memory, + uint32_t mutex_memory_size, + uint32_t n_blocks, + uint32_t block_size) +{ + if ( (p_buffer != NULL) + && (p_buffer_memory != NULL) + && (p_mutex_memory != NULL) + && (buffer_memory_size >= (n_blocks*block_size)) + && (mutex_memory_size >= MUTEX_STORAGE_SIZE(n_blocks)) + && (n_blocks != 0) + && (block_size != 0)) + { + p_buffer->p_memory = p_buffer_memory; + p_buffer->p_mutex = p_mutex_memory; + p_buffer->n_blocks = n_blocks; + p_buffer->block_size = block_size; + pm_mutex_init(p_buffer->p_mutex, n_blocks); + + return NRF_SUCCESS; + } + else + { + return NRF_ERROR_INVALID_PARAM; + } +} + + +uint8_t pm_buffer_block_acquire(pm_buffer_t * p_buffer, uint32_t n_blocks) +{ + if (!BUFFER_IS_VALID(p_buffer)) + { + return ( BUFFER_INVALID_ID ); + } + + uint8_t first_locked_mutex = BUFFER_INVALID_ID; + + for (uint8_t i = 0; i < p_buffer->n_blocks; i++) + { + if (pm_mutex_lock(p_buffer->p_mutex, i)) + { + if (first_locked_mutex == BUFFER_INVALID_ID) + { + first_locked_mutex = i; + } + if ((i - first_locked_mutex + 1) == n_blocks) + { + return first_locked_mutex; + } + } + else if (first_locked_mutex != BUFFER_INVALID_ID) + { + for (uint8_t j = first_locked_mutex; j < i; j++) + { + pm_buffer_release(p_buffer, j); + } + first_locked_mutex = BUFFER_INVALID_ID; + } + } + + return ( BUFFER_INVALID_ID ); +} + + +uint8_t * pm_buffer_ptr_get(pm_buffer_t * p_buffer, uint8_t id) +{ + if (!BUFFER_IS_VALID(p_buffer)) + { + return ( NULL ); + } + + if ( (id != BUFFER_INVALID_ID) + && pm_mutex_lock_status_get(p_buffer->p_mutex, id) ) + { + return ( &p_buffer->p_memory[id*p_buffer->block_size] ); + } + else + { + return ( NULL ); + } +} + + +void pm_buffer_release(pm_buffer_t * p_buffer, uint8_t id) +{ + if ( BUFFER_IS_VALID(p_buffer) + && (id != BUFFER_INVALID_ID) + && pm_mutex_lock_status_get(p_buffer->p_mutex, id)) + { + pm_mutex_unlock(p_buffer->p_mutex, id); + } +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_buffer.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_buffer.h new file mode 100644 index 0000000000..de0ef5008d --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_buffer.h @@ -0,0 +1,115 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#ifndef BUFFER_H__ +#define BUFFER_H__ + +#include +#include "sdk_errors.h" +#include "pm_mutex.h" + + +/** + * @cond NO_DOXYGEN + * @defgroup pm_buffer Buffer + * @ingroup peer_manager + * @{ + * @brief An internal module of @ref peer_manager. This module provides a simple buffer. + */ + + +#define BUFFER_INVALID_ID 0xFF + +#define PM_BUFFER_INIT(p_buffer, n_blocks, block_size, err_code) \ +do \ +{ \ + static uint8_t buffer_memory[(n_blocks) * (block_size)]; \ + static uint8_t mutex_memory[MUTEX_STORAGE_SIZE(n_blocks)]; \ + err_code = pm_buffer_init((p_buffer), \ + buffer_memory, \ + (n_blocks) * (block_size), \ + mutex_memory, \ + MUTEX_STORAGE_SIZE(n_blocks), \ + (n_blocks), \ + (block_size)); \ +} while(0) + + +typedef struct +{ + uint8_t * p_memory; /**< The storage for all buffer entries. The size of the buffer must be n_blocks*block_size. */ + uint8_t * p_mutex; /**< A mutex group with one mutex for each buffer entry. */ + uint32_t n_blocks; /**< The number of allocatable blocks in the buffer. */ + uint32_t block_size; /**< The size of each block in the buffer. */ +} pm_buffer_t; + +/**@brief Function for initializing a buffer instance. + * + * @param[out] p_buffer The buffer instance to initialize. + * @param[in] p_buffer_memory The memory this buffer will use. + * @param[in] buffer_memory_size The size of p_buffer_memory. This must be at least + * n_blocks*block_size. + * @param[in] p_mutex_memory The memory for the mutexes. This must be at least + * @ref MUTEX_STORAGE_SIZE(n_blocks). + * @param[in] mutex_memory_size The size of p_mutex_memory. + * @param[in] n_blocks The number of blocks in the buffer. + * @param[in] block_size The size of each block. + * + * @retval NRF_SUCCESS Successfully initialized buffer instance. + * @retval NRF_ERROR_INVALID_PARAM A parameter was 0 or NULL or a size was too small. + */ +ret_code_t pm_buffer_init(pm_buffer_t * p_buffer, + uint8_t * p_buffer_memory, + uint32_t buffer_memory_size, + uint8_t * p_mutex_memory, + uint32_t mutex_memory_size, + uint32_t n_blocks, + uint32_t block_size); + + +/**@brief Function for acquiring a buffer block in a buffer. + * + * @param[in] p_buffer The buffer instance acquire from. + * @param[in] n_blocks The number of contiguous blocks to acquire. + * + * @return The id of the acquired block, if successful. + * @retval BUFFER_INVALID_ID If unsuccessful. + */ +uint8_t pm_buffer_block_acquire(pm_buffer_t * p_buffer, uint32_t n_blocks); + + +/**@brief Function for getting a pointer to a specific buffer block. + * + * @param[in] p_buffer The buffer instance get from. + * @param[in] id The id of the buffer to get the pointer for. + * + * @return A pointer to the buffer for the specified id, if the id is valid. + * @retval NULL If the id is invalid. + */ +uint8_t * pm_buffer_ptr_get(pm_buffer_t * p_buffer, uint8_t id); + + +/**@brief Function for releasing a buffer block. + * + * @param[in] p_buffer The buffer instance containing the block to release. + * @param[in] id The id of the block to release. + */ +void pm_buffer_release(pm_buffer_t * p_buffer, uint8_t id); + + +#endif // BUFFER_H__ + +/** + * @} + * @endcond + */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_mutex.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_mutex.c new file mode 100644 index 0000000000..d448b4118f --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_mutex.c @@ -0,0 +1,115 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#include "pm_mutex.h" + +#include +#include +#include "nrf_error.h" +#include "app_util_platform.h" + + + +/**@brief Locks the mutex defined by the mask. + * + * @param p_mutex pointer to the mutex storage. + * @param mutex_mask the mask identifying the mutex position. + * + * @retval true if the mutex could be locked. + * @retval false if the mutex was already locked. + */ +static bool lock_by_mask(uint8_t * p_mutex, uint8_t mutex_mask) +{ + bool success = false; + + if ( (*p_mutex & mutex_mask) == 0 ) + { + CRITICAL_REGION_ENTER(); + if ( (*p_mutex & mutex_mask) == 0 ) + { + *p_mutex |= mutex_mask; + + success = true; + } + CRITICAL_REGION_EXIT(); + } + + return ( success ); +} + + +void pm_mutex_init(uint8_t * p_mutex, uint16_t mutex_size) +{ + if (p_mutex != NULL) + { + memset(&p_mutex[0], 0, MUTEX_STORAGE_SIZE(mutex_size)); + } +} + + +bool pm_mutex_lock(uint8_t * p_mutex, uint16_t mutex_id) +{ + if (p_mutex != NULL) + { + return ( lock_by_mask(&(p_mutex[mutex_id >> 3]), (1 << (mutex_id & 0x07))) ); + } + else + { + return false; + } +} + + +void pm_mutex_unlock(uint8_t * p_mutex, uint16_t mutex_id) +{ + uint8_t mutex_base = mutex_id >> 3; + uint8_t mutex_mask = (1 << (mutex_id & 0x07)); + + if ((p_mutex != NULL) + && (p_mutex[mutex_base] & mutex_mask)) + { + CRITICAL_REGION_ENTER(); + p_mutex[mutex_base] &= ~mutex_mask; + CRITICAL_REGION_EXIT(); + } +} + + +uint16_t pm_mutex_lock_first_available(uint8_t * p_mutex, uint16_t mutex_size) +{ + if (p_mutex != NULL) + { + for ( uint16_t i = 0; i < mutex_size; i++ ) + { + if ( lock_by_mask(&(p_mutex[i >> 3]), 1 << (i & 0x07)) ) + { + return ( i ); + } + } + } + + return ( mutex_size ); +} + + +bool pm_mutex_lock_status_get(uint8_t * p_mutex, uint16_t mutex_id) +{ + if (p_mutex != NULL) + { + return ( (p_mutex[mutex_id >> 3] & (1 << (mutex_id & 0x07))) ); + } + else + { + return true; + } +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_mutex.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_mutex.h new file mode 100644 index 0000000000..5dba183245 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_mutex.h @@ -0,0 +1,90 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#ifndef MUTEX_H__ +#define MUTEX_H__ + + +#include +#include + +/** + * @cond NO_DOXYGEN + * @defgroup pm_mutex Mutex + * @ingroup peer_manager + * @{ + * @brief An internal module of @ref peer_manager. This module provides thread-safe mutexes. + */ + + +/**@brief Defines the storage size of a specified mutex group. + * + * @param number_of_mutexes the number of mutexes in the group. + */ +#define MUTEX_STORAGE_SIZE(number_of_mutexes) ((7 + (number_of_mutexes)) >> 3) + + +/**@brief Initializes a mutex group. + * + * @param[in] p_mutex Pointer to the mutex group. See @ref MUTEX_STORAGE_SIZE(). + * @param[in] mutex_size The size of the mutex group in number of mutexes. + */ +void pm_mutex_init(uint8_t * p_mutex, uint16_t mutex_size); + + +/**@brief Locks the mutex specified by the bit id. + * + * @param[inout] p_mutex Pointer to the mutex group. + * @param[in] mutex_bit_id The bit id of the mutex. + * + * @retval true if it was possible to lock the mutex. + * @retval false otherwise. + */ +bool pm_mutex_lock(uint8_t * p_mutex, uint16_t mutex_bit_id); + + +/**@brief Locks the first unlocked mutex within the mutex group. + * + * @param[in, out] p_mutex Pointer to the mutex group. + * @param[in] mutex_size The size of the mutex group. + * + * @return The first unlocked mutex id in the group. + * @retval group-size if there was no unlocked mutex available. + */ +uint16_t pm_mutex_lock_first_available(uint8_t * p_mutex, uint16_t mutex_size); + + +/**@brief Unlocks the mutex specified by the bit id. + * + * @param[in, out] p_mutex Pointer to the mutex group. + * @param[in] mutex_bit_id The bit id of the mutex. + */ +void pm_mutex_unlock(uint8_t * p_mutex, uint16_t mutex_bit_id); + + +/**@brief Gets the locking status of the specified mutex. + * + * @param[in, out] p_mutex Pointer to the mutex group. + * @param[in] mutex_bit_id The bit id of the mutex. + * + * @retval true if the mutex was locked. + * @retval false otherwise. + */ +bool pm_mutex_lock_status_get(uint8_t * p_mutex, uint16_t mutex_bit_id); + + +#endif // MUTEX_H__ + +/** @} + * @endcond + */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.c new file mode 100644 index 0000000000..0526638a86 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.c @@ -0,0 +1,884 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#include "security_dispatcher.h" + +#include +#include "ble.h" +#include "ble_gap.h" +#include "ble_conn_state.h" +#include "peer_manager_types.h" +#include "peer_database.h" +#include "id_manager.h" +#include "sdk_common.h" + + +#define MAX_REGISTRANTS 3 /**< The number of user that can register with the module. */ + + +typedef struct +{ + smd_evt_handler_t evt_handlers[MAX_REGISTRANTS]; + uint8_t n_registrants; + ble_conn_state_user_flag_id_t flag_id_sec_proc; + ble_conn_state_user_flag_id_t flag_id_sec_proc_pairing; + ble_conn_state_user_flag_id_t flag_id_sec_proc_new_peer; + ble_gap_lesc_p256_pk_t peer_pk; +} smd_t; + + +static smd_t m_smd = +{ + .flag_id_sec_proc = BLE_CONN_STATE_USER_FLAG_INVALID, + .flag_id_sec_proc_pairing = BLE_CONN_STATE_USER_FLAG_INVALID, + .flag_id_sec_proc_new_peer = BLE_CONN_STATE_USER_FLAG_INVALID, +}; + + +#define MODULE_INITIALIZED (m_smd.n_registrants > 0) /**< Expression which is true when the module is initialized. */ +#include "sdk_macros.h" + + +static void evt_send(smd_evt_t * p_event) +{ + for (int i = 0; i < m_smd.n_registrants; i++) + { + m_smd.evt_handlers[i](p_event); + } +} + + +static void sec_start_send(uint16_t conn_handle, pm_conn_sec_procedure_t procedure) +{ + smd_evt_t evt = + { + .evt_id = SMD_EVT_SEC_PROCEDURE_START, + .conn_handle = conn_handle, + .params = {.sec_procedure_start = {.procedure = procedure}} + }; + evt_send(&evt); +} + + +/**@brief Event handler for events from the peer_database module. + * + * @param[in] p_event The event that has happened. + */ +static void pdb_evt_handler(pdb_evt_t const * p_event) +{ + if ((p_event->evt_id == PDB_EVT_WRITE_BUF_STORED) && (p_event->data_id == PM_PEER_DATA_ID_BONDING)) + { + smd_evt_t evt = + { + .evt_id = SMD_EVT_BONDING_INFO_STORED, + .conn_handle = im_conn_handle_get(p_event->peer_id), + .params = {.bonding_info_stored = + { + .peer_id = p_event->peer_id, + }} + }; + evt_send(&evt); + } +} + + +/**@brief Function for processing the @ref BLE_GAP_EVT_SEC_PARAMS_REQUEST event from the SoftDevice. + * + * @param[in] p_gap_evt The event from the SoftDevice. + */ +static void sec_params_request_process(ble_gap_evt_t * p_gap_evt) +{ + smd_evt_t evt = + { + .evt_id = SMD_EVT_PARAMS_REQ, + .conn_handle = p_gap_evt->conn_handle + }; + evt_send(&evt); + return; +} + + +/**@brief Function for administrative actions to be taken when a security process has been attempted. + * + * @param[in] conn_handle The connection the security process was attempted on. + * @param[in] peer_id The peer ID given to the connected peer. + * @param[in] success Whether the process was started successfully. + * @param[in] pairing Whether the process was a pairing process. + * @param[in] new_peer_created Whether a new peer was created during the process attempt. + */ +static void sec_proc_start(uint16_t conn_handle, + pm_peer_id_t peer_id, + bool success, + bool pairing, + bool new_peer_created) +{ + ble_conn_state_user_flag_set(conn_handle, m_smd.flag_id_sec_proc, success); + + if (success) + { + ble_conn_state_user_flag_set(conn_handle, m_smd.flag_id_sec_proc_pairing, pairing); + ble_conn_state_user_flag_set(conn_handle, m_smd.flag_id_sec_proc_new_peer, new_peer_created); + + if(new_peer_created) + { + im_new_peer_id(conn_handle, peer_id); + } + } + else + { + if(new_peer_created) + { + ret_code_t err_code = im_peer_free(peer_id); // Attempt to free allocated peer. + UNUSED_VARIABLE(err_code); + } + } +} + + + +/**@brief Function for processing the @ref BLE_GAP_EVT_SEC_INFO_REQUEST event from the SoftDevice. + * + * @param[in] p_gap_evt The event from the SoftDevice. + */ +static void sec_info_request_process(ble_gap_evt_t * p_gap_evt) +{ + ret_code_t err_code; + ble_gap_enc_info_t const * p_enc_info = NULL; + pm_peer_data_flash_t peer_data; + pm_peer_id_t peer_id = im_peer_id_get_by_master_id(&p_gap_evt->params.sec_info_request.master_id); + smd_evt_t evt; + + evt.conn_handle = p_gap_evt->conn_handle; + + if (peer_id == PM_PEER_ID_INVALID) + { + peer_id = im_peer_id_get_by_conn_handle(p_gap_evt->conn_handle); + } + + if (peer_id != PM_PEER_ID_INVALID) + { + err_code = pdb_read_buf_get(peer_id, PM_PEER_DATA_ID_BONDING, &peer_data, NULL); + + if (err_code == NRF_SUCCESS) + { + // There is stored bonding data for this peer. + ble_gap_enc_key_t const * p_existing_key = &peer_data.p_bonding_data->own_ltk; + + if ( p_existing_key->enc_info.lesc + || (im_master_ids_compare(&p_existing_key->master_id, + &p_gap_evt->params.sec_info_request.master_id))) + { + p_enc_info = &p_existing_key->enc_info; + } + } + } + + // All return values from the following can be safely ignored. + err_code = sd_ble_gap_sec_info_reply(p_gap_evt->conn_handle, p_enc_info, NULL, NULL); + + if (err_code != NRF_SUCCESS) + { + evt.evt_id = SMD_EVT_ERROR_UNEXPECTED; + evt.params.error_unexpected.error = err_code; + + evt_send(&evt); + } + else if (p_enc_info == NULL) + { + evt.evt_id = SMD_EVT_LINK_ENCRYPTION_FAILED; + evt.params.link_encryption_failed.error = PM_CONN_SEC_ERROR_PIN_OR_KEY_MISSING; + evt.params.link_encryption_failed.error_src = BLE_GAP_SEC_STATUS_SOURCE_LOCAL; + + evt_send(&evt); + + sec_proc_start(p_gap_evt->conn_handle, peer_id, false, false, false); + } + else + { + sec_start_send(p_gap_evt->conn_handle, PM_LINK_SECURED_PROCEDURE_ENCRYPTION); + + sec_proc_start(p_gap_evt->conn_handle, peer_id, err_code == NRF_SUCCESS, false, false); + } + + + return; +} + + +/**@brief Function for processing the @ref BLE_GAP_EVT_SEC_REQUEST event from the SoftDevice. + * + * @param[in] p_gap_evt The event from the SoftDevice. + */ +static void sec_request_process(ble_gap_evt_t * p_gap_evt) +{ + smd_evt_t evt = + { + .evt_id = SMD_EVT_SLAVE_SECURITY_REQ, + .conn_handle = p_gap_evt->conn_handle, + .params = + { + .slave_security_req = + { + .bond = p_gap_evt->params.sec_request.bond, + .mitm = p_gap_evt->params.sec_request.mitm, + } + } + }; + evt_send(&evt); + return; +} + + +/**@brief Function for processing the @ref BLE_GAP_EVT_AUTH_STATUS event from the SoftDevice, when + * the auth_status is success. + * + * @param[in] p_gap_evt The event from the SoftDevice. + */ +static void auth_status_success_process(ble_gap_evt_t * p_gap_evt) +{ + ret_code_t err_code = NRF_SUCCESS; + uint8_t role = ble_conn_state_role(p_gap_evt->conn_handle); + pm_peer_id_t peer_id = im_peer_id_get_by_conn_handle(p_gap_evt->conn_handle); + ble_gap_sec_kdist_t kdist_own = p_gap_evt->params.auth_status.kdist_own; + ble_gap_sec_kdist_t kdist_peer = p_gap_evt->params.auth_status.kdist_peer; + + ble_conn_state_user_flag_set(p_gap_evt->conn_handle, m_smd.flag_id_sec_proc, false); + + if (role == BLE_GAP_ROLE_INVALID) + { + /* Unlikely, but maybe possible? */ + return; + } + + if (p_gap_evt->params.auth_status.bonded) + { + + err_code = pdb_write_buf_store(peer_id, PM_PEER_DATA_ID_BONDING); + if (err_code != NRF_SUCCESS) + { + /* Unexpected */ + smd_evt_t error_evt; + + error_evt.evt_id = SMD_EVT_ERROR_BONDING_INFO; + error_evt.conn_handle = p_gap_evt->conn_handle; + error_evt.params.error_bonding_info.peer_id = peer_id; + error_evt.params.error_bonding_info.error = err_code; + + evt_send(&error_evt); + } + + } + else if (ble_conn_state_user_flag_get(p_gap_evt->conn_handle, m_smd.flag_id_sec_proc_new_peer)) + { + ret_code_t err_code_free = im_peer_free(peer_id); + UNUSED_VARIABLE(err_code_free); // Errors can be safely ignored. + } + + smd_evt_t pairing_success_evt; + + pairing_success_evt.evt_id = SMD_EVT_PAIRING_SUCCESS; + pairing_success_evt.conn_handle = p_gap_evt->conn_handle; + pairing_success_evt.params.pairing_success.bonded = p_gap_evt->params.auth_status.bonded; + pairing_success_evt.params.pairing_success.mitm = p_gap_evt->params.auth_status.sm1_levels.lv3; + pairing_success_evt.params.pairing_success.kdist_own = kdist_own; + pairing_success_evt.params.pairing_success.kdist_peer = kdist_peer; + + evt_send(&pairing_success_evt); + return; +} + + +/**@brief Function for cleaning up after a failed pairing procedure. + * + * @param[in] conn_handle The handle of the connection the pairing procedure happens on. + * @param[in] peer_id The peer id used in the pairing procedure. + * @param[in] error The error the procedure failed with. + * @param[in] error_src The party that raised the error. See @ref BLE_GAP_SEC_STATUS_SOURCES. + */ +static void pairing_failure(uint16_t conn_handle, + pm_peer_id_t peer_id, + pm_sec_error_code_t error, + uint8_t error_src) +{ + ret_code_t err_code = NRF_SUCCESS; + + smd_evt_t evt = + { + .evt_id = SMD_EVT_PAIRING_FAIL, + .conn_handle = conn_handle, + .params = + { + .pairing_failed = + { + .error = error, + .error_src = error_src, + } + } + }; + + if(ble_conn_state_user_flag_get(conn_handle, m_smd.flag_id_sec_proc_new_peer)) + { + // The peer_id was created during the procedure, and should be freed, because no data is + // stored under it. + err_code = im_peer_free(peer_id); // Attempt to free allocated peer. + UNUSED_VARIABLE(err_code); + } + else + { + err_code = pdb_write_buf_release(peer_id, PM_PEER_DATA_ID_BONDING); + if ((err_code != NRF_SUCCESS) && (err_code == NRF_ERROR_NOT_FOUND /* No buffer was allocated */)) + { + smd_evt_t error_evt; + error_evt.evt_id = SMD_EVT_ERROR_UNEXPECTED; + error_evt.conn_handle = conn_handle; + error_evt.params.error_unexpected.error = err_code; + evt_send(&error_evt); + } + } + + ble_conn_state_user_flag_set(conn_handle, m_smd.flag_id_sec_proc, false); + + evt_send(&evt); + return; +} + + +/**@brief Function for cleaning up after a failed encryption procedure. + * + * @param[in] conn_handle The handle of the connection the encryption procedure happens on. + * @param[in] error The error the procedure failed with. + * @param[in] error_src The party that raised the error. See @ref BLE_GAP_SEC_STATUS_SOURCES. + */ +static void encryption_failure(uint16_t conn_handle, + pm_sec_error_code_t error, + uint8_t error_src) +{ + smd_evt_t evt = + { + .evt_id = SMD_EVT_LINK_ENCRYPTION_FAILED, + .conn_handle = conn_handle, + .params = + { + .link_encryption_failed = + { + .error = error, + .error_src = error_src, + } + } + }; + + ble_conn_state_user_flag_set(conn_handle, m_smd.flag_id_sec_proc, false); + + evt_send(&evt); + return; +} + + +/**@brief Function for possibly cleaning up after a failed pairing or encryption procedure. + * + * @param[in] conn_handle The handle of the connection the pairing procedure happens on. + * @param[in] peer_id The peer id used in the pairing procedure. + * @param[in] error The error the procedure failed with. + * @param[in] error_src The party that raised the error. See @ref BLE_GAP_SEC_STATUS_SOURCES. + */ +static void link_secure_failure(uint16_t conn_handle, + pm_sec_error_code_t error, + uint8_t error_src) +{ + if (ble_conn_state_user_flag_get(conn_handle, m_smd.flag_id_sec_proc)) + { + pm_peer_id_t peer_id = im_peer_id_get_by_conn_handle(conn_handle); + + if (peer_id != PM_PEER_ID_INVALID) + { + if (ble_conn_state_user_flag_get(conn_handle, m_smd.flag_id_sec_proc_pairing)) + { + pairing_failure(conn_handle, peer_id, error, error_src); + } + else + { + encryption_failure(conn_handle, error, error_src); + } + } + } +} + + +/**@brief Function for processing the @ref BLE_GAP_EVT_DISCONNECT event from the SoftDevice. + * + * @param[in] p_gap_evt The event from the SoftDevice. + */ +static void disconnect_process(ble_gap_evt_t * p_gap_evt) +{ + pm_sec_error_code_t error = (p_gap_evt->params.disconnected.reason + == BLE_HCI_CONN_TERMINATED_DUE_TO_MIC_FAILURE) + ? PM_CONN_SEC_ERROR_MIC_FAILURE : PM_CONN_SEC_ERROR_DISCONNECT; + + link_secure_failure(p_gap_evt->conn_handle, error, BLE_GAP_SEC_STATUS_SOURCE_LOCAL); +} + + +/**@brief Function for processing the @ref BLE_GAP_EVT_AUTH_STATUS event from the SoftDevice, when + * the auth_status is failure. + * + * @param[in] p_gap_evt The event from the SoftDevice. + */ +static void auth_status_failure_process(ble_gap_evt_t * p_gap_evt) +{ + link_secure_failure(p_gap_evt->conn_handle, + p_gap_evt->params.auth_status.auth_status, + p_gap_evt->params.auth_status.error_src); +} + + +/**@brief Function for processing the @ref BLE_GAP_EVT_AUTH_STATUS event from the SoftDevice. + * + * @param[in] p_gap_evt The event from the SoftDevice. + */ +static void auth_status_process(ble_gap_evt_t * p_gap_evt) +{ + switch (p_gap_evt->params.auth_status.auth_status) + { + case BLE_GAP_SEC_STATUS_SUCCESS: + auth_status_success_process(p_gap_evt); + break; + + default: + auth_status_failure_process(p_gap_evt); + break; + } +} + + +/**@brief Function for processing the @ref BLE_GAP_EVT_CONN_SEC_UPDATE event from the SoftDevice. + * + * @param[in] p_gap_evt The event from the SoftDevice. + */ +static void conn_sec_update_process(ble_gap_evt_t * p_gap_evt) +{ + if (ble_conn_state_encrypted(p_gap_evt->conn_handle)) + { + if (!ble_conn_state_user_flag_get(p_gap_evt->conn_handle, m_smd.flag_id_sec_proc_pairing)) + { + ble_conn_state_user_flag_set(p_gap_evt->conn_handle, m_smd.flag_id_sec_proc, false); + } + + smd_evt_t evt; + + evt.conn_handle = p_gap_evt->conn_handle; + evt.evt_id = SMD_EVT_LINK_ENCRYPTION_UPDATE; + evt.params.link_encryption_update.mitm_protected + = ble_conn_state_mitm_protected(p_gap_evt->conn_handle); + evt_send(&evt); + } + else + { + encryption_failure(p_gap_evt->conn_handle, + PM_CONN_SEC_ERROR_PIN_OR_KEY_MISSING, + BLE_GAP_SEC_STATUS_SOURCE_REMOTE); + } +} + + +/**@brief Funtion for initializing a BLE Connection State user flag. + * + * @param[out] flag_id The flag to initialize. + */ +static void flag_id_init(ble_conn_state_user_flag_id_t * p_flag_id) +{ + if (*p_flag_id == BLE_CONN_STATE_USER_FLAG_INVALID) + { + *p_flag_id = ble_conn_state_user_flag_acquire(); + } +} + + +ret_code_t smd_register(smd_evt_handler_t evt_handler) +{ + ret_code_t err_code = NRF_SUCCESS; + if (evt_handler == NULL) + { + err_code = NRF_ERROR_NULL; + } + else + { + if (!MODULE_INITIALIZED) + { + flag_id_init(&m_smd.flag_id_sec_proc); + flag_id_init(&m_smd.flag_id_sec_proc_pairing); + flag_id_init(&m_smd.flag_id_sec_proc_new_peer); + + if (m_smd.flag_id_sec_proc_new_peer == BLE_CONN_STATE_USER_FLAG_INVALID) + { + err_code = NRF_ERROR_INTERNAL; + } + else + { + err_code = pdb_register(pdb_evt_handler); + } + } + if ((err_code == NRF_SUCCESS)) + { + if ((m_smd.n_registrants < MAX_REGISTRANTS)) + { + m_smd.evt_handlers[m_smd.n_registrants++] = evt_handler; + } + else + { + err_code = NRF_ERROR_NO_MEM; + } + } + } + return err_code; +} + + +ret_code_t smd_params_reply(uint16_t conn_handle, + ble_gap_sec_params_t * p_sec_params, + ble_gap_lesc_p256_pk_t * p_public_key) +{ + VERIFY_MODULE_INITIALIZED(); + + uint8_t role = ble_conn_state_role(conn_handle); + pm_peer_id_t peer_id = PM_PEER_ID_INVALID; + ret_code_t err_code = NRF_SUCCESS; + uint8_t sec_status = BLE_GAP_SEC_STATUS_SUCCESS; + ble_gap_sec_keyset_t sec_keyset; + bool new_peer_created = false; + + memset(&sec_keyset, 0, sizeof(ble_gap_sec_keyset_t)); + + if (role == BLE_GAP_ROLE_INVALID) + { + return BLE_ERROR_INVALID_CONN_HANDLE; + } + + if (p_sec_params == NULL) + { + // NULL params means reject pairing. + sec_status = BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP; + } + else if (p_sec_params->bond) + { + // Bonding is to be performed, prepare to receive bonding data. + pm_peer_data_t peer_data; + + peer_id = im_peer_id_get_by_conn_handle(conn_handle); + + if (peer_id == PM_PEER_ID_INVALID) + { + // Peer is unknown to us, allocate a new peer ID for it. + peer_id = pdb_peer_allocate(); + if (peer_id != PM_PEER_ID_INVALID) + { + new_peer_created = true; + } + else + { + err_code = NRF_ERROR_INTERNAL; + } + } + + if (err_code == NRF_SUCCESS) + { + // Peer ID is ready, acquire a memory buffer to receive bonding data into. + err_code = pdb_write_buf_get(peer_id, PM_PEER_DATA_ID_BONDING, 1, &peer_data); + if (err_code == NRF_SUCCESS) + { + memset(peer_data.p_bonding_data, 0, sizeof(pm_peer_data_bonding_t)); + + peer_data.p_bonding_data->own_role = role; + + sec_keyset.keys_own.p_enc_key = &peer_data.p_bonding_data->own_ltk; + sec_keyset.keys_own.p_pk = p_public_key; + sec_keyset.keys_peer.p_enc_key = &peer_data.p_bonding_data->peer_ltk; + sec_keyset.keys_peer.p_id_key = &peer_data.p_bonding_data->peer_id; + sec_keyset.keys_peer.p_pk = &m_smd.peer_pk; + + ret_code_t err_code_addr = im_ble_addr_get(conn_handle, &peer_data.p_bonding_data->peer_id.id_addr_info); // Retrieve the address the peer used during connection establishment. This address will be overwritten if ID is shared. Should not fail. + UNUSED_VARIABLE(err_code_addr); + + // Buffer is OK, reserve room in flash for the data. + err_code = pdb_write_buf_store_prepare(peer_id, PM_PEER_DATA_ID_BONDING); + } + } + } + else + { + // Pairing only, no action needed. + } + + if (err_code == NRF_SUCCESS) + { + // Everything OK, reply to SoftDevice. If an error happened, the user is given an + // opportunity to change the parameters and retry the call. + if (role == BLE_GAP_ROLE_CENTRAL) + { + err_code = sd_ble_gap_sec_params_reply(conn_handle, sec_status, NULL, &sec_keyset); + } + else + { + err_code = sd_ble_gap_sec_params_reply(conn_handle, sec_status, p_sec_params, &sec_keyset); + + if ((p_sec_params != NULL) && (err_code == NRF_SUCCESS)) + { + pm_conn_sec_procedure_t procedure = p_sec_params->bond + ? PM_LINK_SECURED_PROCEDURE_BONDING + : PM_LINK_SECURED_PROCEDURE_PAIRING; + sec_start_send(conn_handle, procedure); + } + } + } + + sec_proc_start(conn_handle, + peer_id, + (err_code == NRF_SUCCESS) && (sec_status != BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP), + true, + new_peer_created); + + return err_code; +} + + +static ret_code_t link_secure_central_existing_peer(uint16_t conn_handle, + ble_gap_sec_params_t * p_sec_params, + bool force_repairing, + pm_peer_id_t peer_id, + pm_conn_sec_procedure_t * procedure) +{ + pm_peer_data_flash_t peer_data; + pm_peer_data_t dummy_peer_data; + ret_code_t err_code; + ble_gap_enc_key_t const * p_existing_key = NULL; + bool lesc = false; + + err_code = pdb_read_buf_get(peer_id, PM_PEER_DATA_ID_BONDING, &peer_data, NULL); + + if (err_code == NRF_SUCCESS) + { + // Use peer's key since they are peripheral. + p_existing_key = &(peer_data.p_bonding_data->peer_ltk); + + lesc = peer_data.p_bonding_data->own_ltk.enc_info.lesc; + if (lesc) // LESC was used during bonding. + { + // For LESC, always use own key. + p_existing_key = &(peer_data.p_bonding_data->own_ltk); + } + } + + if (!force_repairing + && (err_code == NRF_SUCCESS) + && (p_existing_key != NULL) + && (lesc || im_master_id_is_valid(&(p_existing_key->master_id)))) /* There is a valid LTK stored. */ + //&& (p_existing_key->enc_info.auth >= p_sec_params->mitm) /* The requested MITM security is at or below the existing level. */ + //&& (!p_sec_params->mitm || (lesc >= p_sec_params->lesc))) /* The requested LESC security is at or below the existing level. We only care about LESC if MITM is required. */ + { + err_code = sd_ble_gap_encrypt(conn_handle, &(p_existing_key->master_id), &(p_existing_key->enc_info)); + + *procedure = PM_LINK_SECURED_PROCEDURE_ENCRYPTION; + } + else if ((err_code == NRF_SUCCESS) || (err_code == NRF_ERROR_NOT_FOUND)) + { + /* Re-pairing is needed, because there is no LTK available or the existing key is not + secure enough */ + err_code = NRF_SUCCESS; + + if (p_sec_params->bond) + { + err_code = pdb_write_buf_get(peer_id, PM_PEER_DATA_ID_BONDING, 1, &dummy_peer_data); + if (err_code == NRF_SUCCESS) + { + err_code = pdb_write_buf_store_prepare(peer_id, PM_PEER_DATA_ID_BONDING); + } + } + + if (err_code == NRF_SUCCESS) + { + err_code = sd_ble_gap_authenticate(conn_handle, p_sec_params); + } + + if (err_code != NRF_SUCCESS) + { + ret_code_t err_code_release = pdb_write_buf_release(peer_id, PM_PEER_DATA_ID_BONDING); + if ((err_code_release != NRF_SUCCESS) && (err_code_release != NRF_ERROR_NOT_FOUND)) + { + err_code = NRF_ERROR_INTERNAL; + } + } + } + + sec_proc_start(conn_handle, + peer_id, + err_code == NRF_SUCCESS, + *procedure != PM_LINK_SECURED_PROCEDURE_ENCRYPTION, + false); + + return err_code; +} + + +static ret_code_t link_secure_central_new_peer(uint16_t conn_handle, + ble_gap_sec_params_t * p_sec_params) +{ + pm_peer_id_t peer_id = pdb_peer_allocate(); + pm_peer_data_t dummy_peer_data; + ret_code_t err_code; + + if (peer_id != PM_PEER_ID_INVALID) + { + err_code = pdb_write_buf_get(peer_id, PM_PEER_DATA_ID_BONDING, 1, &dummy_peer_data); + if (err_code == NRF_SUCCESS) + { + err_code = pdb_write_buf_store_prepare(peer_id, PM_PEER_DATA_ID_BONDING); + } + + if (err_code == NRF_SUCCESS) + { + err_code = sd_ble_gap_authenticate(conn_handle, p_sec_params); + } + + if (err_code != NRF_SUCCESS) + { + ret_code_t err_code_free = pdb_write_buf_release(peer_id, PM_PEER_DATA_ID_BONDING); + if ((err_code_free != NRF_SUCCESS) && (err_code_free != NRF_ERROR_NOT_FOUND)) + { + err_code = NRF_ERROR_INTERNAL; + } + } + } + else + { + err_code = NRF_ERROR_INTERNAL; + } + + sec_proc_start(conn_handle, + peer_id, + err_code == NRF_SUCCESS, + true, + peer_id != PM_PEER_ID_INVALID); + + return err_code; +} + + +static ret_code_t link_secure_central(uint16_t conn_handle, + ble_gap_sec_params_t * p_sec_params, + bool force_repairing) +{ + ret_code_t err_code; + pm_peer_id_t peer_id; + + if (p_sec_params == NULL) + { + return sd_ble_gap_authenticate(conn_handle, NULL); + } + + pm_conn_sec_procedure_t procedure = p_sec_params->bond ? PM_LINK_SECURED_PROCEDURE_BONDING + : PM_LINK_SECURED_PROCEDURE_PAIRING; + + peer_id = im_peer_id_get_by_conn_handle(conn_handle); + + if (peer_id != PM_PEER_ID_INVALID) + { + // There is already data in flash for this peer. + err_code = link_secure_central_existing_peer(conn_handle, + p_sec_params, + force_repairing, + peer_id, + &procedure); + } + else if (p_sec_params->bond) + { + // New peer is required. + err_code = link_secure_central_new_peer(conn_handle, p_sec_params); + } + else + { + // No bonding, only pairing. + err_code = sd_ble_gap_authenticate(conn_handle, p_sec_params); + + sec_proc_start(conn_handle, peer_id, err_code == NRF_SUCCESS, true, false); + } + + if (err_code == NRF_SUCCESS) + { + sec_start_send(conn_handle, procedure); + } + + return err_code; +} + + +static ret_code_t link_secure_peripheral(uint16_t conn_handle, ble_gap_sec_params_t * p_sec_params) +{ + VERIFY_PARAM_NOT_NULL(p_sec_params); + + ret_code_t err_code = sd_ble_gap_authenticate(conn_handle, p_sec_params); + + return err_code; +} + + +ret_code_t smd_link_secure(uint16_t conn_handle, + ble_gap_sec_params_t * p_sec_params, + bool force_repairing) +{ + VERIFY_MODULE_INITIALIZED(); + + uint8_t role = ble_conn_state_role(conn_handle); + + switch (role) + { + case BLE_GAP_ROLE_CENTRAL: + return link_secure_central(conn_handle, p_sec_params, force_repairing); + + case BLE_GAP_ROLE_PERIPH: + return link_secure_peripheral(conn_handle, p_sec_params); + + default: + return BLE_ERROR_INVALID_CONN_HANDLE; + } +} + + +void smd_ble_evt_handler(ble_evt_t * p_ble_evt) +{ + switch (p_ble_evt->header.evt_id) + { + case BLE_GAP_EVT_DISCONNECTED: + disconnect_process(&(p_ble_evt->evt.gap_evt)); + break; + + case BLE_GAP_EVT_SEC_PARAMS_REQUEST: + sec_params_request_process(&(p_ble_evt->evt.gap_evt)); + break; + + case BLE_GAP_EVT_SEC_INFO_REQUEST: + sec_info_request_process(&(p_ble_evt->evt.gap_evt)); + break; + + case BLE_GAP_EVT_SEC_REQUEST: + sec_request_process(&(p_ble_evt->evt.gap_evt)); + break; + + case BLE_GAP_EVT_AUTH_STATUS: + auth_status_process(&(p_ble_evt->evt.gap_evt)); + break; + + case BLE_GAP_EVT_CONN_SEC_UPDATE: + conn_sec_update_process(&(p_ble_evt->evt.gap_evt)); + break; + }; +} + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.h new file mode 100644 index 0000000000..8593c3b7dc --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.h @@ -0,0 +1,254 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#ifndef SECURITY_DISPATCHER_H__ +#define SECURITY_DISPATCHER_H__ + +#include +#include "sdk_errors.h" +#include "ble.h" +#include "ble_gap.h" +#include "peer_manager_types.h" + + +/** + * @cond NO_DOXYGEN + * @defgroup security_dispatcher Security Dispatcher + * @ingroup peer_manager + * @{ + * @brief An internal module of @ref peer_manager. A module for streamlining pairing, bonding, and + * encryption, including flash storage of shared data. + * + */ + + +/**@brief Events that can come from the Security Dispatcher module. + */ +typedef enum +{ + SMD_EVT_PARAMS_REQ, /**< Parameters are required for a pairing procedure on the specified connection. The user must provide them using @ref smd_params_reply. */ + SMD_EVT_SLAVE_SECURITY_REQ, /**< The peer (slave) has requested link encryption. Call @ref smd_link_secure to honor the request. The data in the event structure must be used in the parameters. */ + SMD_EVT_SEC_PROCEDURE_START, /**< A security procedure has started. */ + SMD_EVT_PAIRING_SUCCESS, /**< A pairing procedure (and bonding if applicable) has completed with success. */ + SMD_EVT_PAIRING_FAIL, /**< A pairing procedure has failed which means no encryption and no bond could be established. */ + SMD_EVT_LINK_ENCRYPTION_UPDATE, /**< The security level of the link has been updated. The link is encrypted. */ + SMD_EVT_LINK_ENCRYPTION_FAILED, /**< An attempt to start encryption on an unencrypted link failed because the peripheral did not have the correct keys. If the peer is the peripheral, the force_repairing flag should be set when reattempting @ref smd_link_secure. */ + SMD_EVT_BONDING_INFO_STORED, /**< Information exchanged during bonding with a peer has been stored persistently. */ + SMD_EVT_ERROR_BONDING_INFO, /**< Information exchanged during bonding with a peer could not be stored persistently, because of an unexpected error. */ + // SMD_EVT_ERROR_NO_MEM, /**< An operation failed because there was no available storage room in persistent storage. Please free up room, and the operation will automatically continue. */ + SMD_EVT_ERROR_UNEXPECTED, /**< An operation failed with an unexpected error. The error is provided. This is possibly a fatal error. */ +} smd_evt_id_t; + + +/**@brief Events parameters specific to the @ref SMD_EVT_SLAVE_SECURITY_REQ event. + */ +typedef struct +{ + bool bond; + bool mitm; +} smd_evt_slave_security_req_t; + + +/**@brief Events parameters specific to the @ref SMD_EVT_SEC_PROCEDURE_START event. + */ +typedef struct +{ + pm_conn_sec_procedure_t procedure; /**< The procedure that has started. */ +} smd_evt_sec_procedure_start_t; + + +/**@brief Events parameters specific to the @ref SMD_EVT_PAIRING_SUCCESS event. + */ +typedef struct +{ + bool bonded; /**< Whether bonding was performed. */ + bool mitm; /**< Whether MITM protection was used during pairing. */ + ble_gap_sec_kdist_t kdist_own; /**< Which keys were distributed to the peer. Only relevant if bonding was performed. */ + ble_gap_sec_kdist_t kdist_peer; /**< Which keys were distributed by the peer. Only relevant if bonding was performed. */ +} smd_evt_pairing_success_t; + + +/**@brief Events parameters specific to the @ref SMD_EVT_PAIRING_FAIL event. + */ +typedef struct +{ + pm_sec_error_code_t error; /**< What went wrong. */ + uint8_t error_src; /**< The party that raised the error, see @ref BLE_GAP_SEC_STATUS_SOURCES. */ +} smd_evt_pairing_failed_t; + + +/**@brief Events parameters specific to the @ref SMD_EVT_LINK_ENCRYPTION_UPDATE event. + */ +typedef struct +{ + bool mitm_protected; /**< Whether the link is now MITM protected. */ +} smd_evt_link_encryption_update_t; + + +/**@brief Events parameters specific to the @ref SMD_EVT_LINK_ENCRYPTION_FAILED event. + */ +typedef struct +{ + pm_sec_error_code_t error; /**< What went wrong. */ + uint8_t error_src; /**< The party that raised the error, see @ref BLE_GAP_SEC_STATUS_SOURCES. */ +} smd_evt_link_encryption_failed_t; + + +/**@brief Events parameters specific to the @ref SMD_EVT_BONDING_INFO_STORED event. + */ +typedef struct +{ + pm_peer_id_t peer_id; /**< The peer this event pertains to. */ +} smd_evt_bonding_info_stored_t; + + +/**@brief Events parameters specific to the @ref SMD_EVT_ERROR_BONDING_INFO event. + */ +typedef struct +{ + pm_peer_id_t peer_id; /**< The peer this event pertains to, if previously bonded. @ref PM_PEER_ID_INVALID if no successful bonding has happened with the peer before. */ + ret_code_t error; /**< The unexpected error that occurred. */ +} smd_evt_error_bonding_info_t; + + +// typedef struct +// { + // pm_peer_id_t peer_id; /**< The peer this event pertains to. */ +// } smd_evt_error_no_mem_t; + + +/**@brief Events parameters specific to the @ref SMD_EVT_ERROR_UNEXPECTED event. + */ +typedef struct +{ + ret_code_t error; /**< The unexpected error that occurred. */ +} smd_evt_error_unexpected_t; + + +typedef union +{ + smd_evt_slave_security_req_t slave_security_req; + smd_evt_sec_procedure_start_t sec_procedure_start; + smd_evt_pairing_success_t pairing_success; + smd_evt_pairing_failed_t pairing_failed; + smd_evt_link_encryption_update_t link_encryption_update; + smd_evt_link_encryption_failed_t link_encryption_failed; + smd_evt_bonding_info_stored_t bonding_info_stored; + smd_evt_error_bonding_info_t error_bonding_info; + // smd_evt_error_no_mem_t error_no_mem; + smd_evt_error_unexpected_t error_unexpected; +} smd_evt_params_t; /**< Event specific parameters. Chosen based on evt_id. */ + + +/**@brief Structure describing events from the Security Dispatcher module. + */ +typedef struct +{ + smd_evt_id_t evt_id; /**< The type of event. */ + uint16_t conn_handle; /**< The connection this event pertains to. */ + smd_evt_params_t params; /**< Event specific parameters. Chosen based on evt_id. */ +} smd_evt_t; + + + +/**@brief Event handler for events from the Security Dispatcher module. + * + * @param[in] p_event The event that has happened. + */ +typedef void (*smd_evt_handler_t)(smd_evt_t const * p_event); + + +/**@brief Function for registering with the Security Dispatcher module. This function also + * initializes the module if uninitialized. + * + * @param[in] evt_handler Callback for events from the Security Dispatcher module. + * + * @retval NRF_SUCCESS Registration was successful. + * @retval NRF_ERROR_NO_MEM No more registrations possible. + * @retval NRF_ERROR_NULL evt_handler was NULL. + */ +ret_code_t smd_register(smd_evt_handler_t evt_handler); + + +/**@brief Function for dispatching SoftDevice events to the Security Dispatcher module. + * + * @param[in] ble_evt The SoftDevice event. + */ +void smd_ble_evt_handler(ble_evt_t * ble_evt); + + +/**@brief Function for providing pairing and bonding parameters to use for the current pairing + * procedure on a connection. + * + * @note If this function returns an @ref NRF_ERROR_NULL, @ref NRF_ERROR_INVALID_PARAM, @ref + * BLE_ERROR_INVALID_CONN_HANDLE, or @ref NRF_ERROR_NO_MEM, this function can be called again + * after corrective action. + * + * @note To reject a request, call this function with NULL p_sec_params. + * + * @param[in] conn_handle The connection handle of the connection the pairing is happening on. + * @param[in] p_sec_params The security parameters to use for this link. + * @param[in] p_public_key A pointer to the public key to use if using LESC, or NULL. + * + * @retval NRF_SUCCESS Success. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized, or no parameters have been + * requested on that conn_handle, or this error originates + * from the SoftDevice. + * @retval NRF_ERROR_INVALID_PARAM Invalid combination of parameters (not including conn_handle). + * @retval NRF_ERROR_TIMEOUT There has been an SMP timeout, so no more SMP operations + * can be performed on this link. + * @retval BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle. + * @retval NRF_ERROR_NO_MEM No more room in flash. Fix and reattempt later. + * @retval NRF_ERROR_BUSY No write buffer. Reattempt later. + */ +ret_code_t smd_params_reply(uint16_t conn_handle, + ble_gap_sec_params_t * p_sec_params, + ble_gap_lesc_p256_pk_t * p_public_key); + + +/**@brief Function for initiating security on the link, with the specified parameters. + * + * @note If the connection is a peripheral connection, this will send a security request to the + * master, but the master is not obligated to initiate pairing or encryption in response. + * @note If the connection is a central connection and a key is available, the parameters will be + * used to determine whether to re-pair or to encrypt using the existing key. If no key is + * available, pairing will be started. + * + * @param[in] conn_handle Handle of the connection to initiate pairing on. + * @param[in] p_sec_params The security parameters to use for this link. As a central, this can + * be NULL to reject a slave security request. + * @param[in] force_repairing Whether to force a pairing procedure to happen regardless of whether + * an encryption key already exists. This argument is only relevant for + * the central role. Recommended value: false + * + * @retval NRF_SUCCESS Success. + * @retval NRF_ERROR_NULL p_sec_params was NULL (peripheral only). + * @retval NRF_ERROR_INVALID_STATE Module is not initialized, or this error originates from + * the SoftDevice. + * @retval NRF_ERROR_INVALID_PARAM Invalid combination of parameters (not including conn_handle). + * @retval NRF_ERROR_BUSY Unable to initiate procedure at this time. + * @retval NRF_ERROR_TIMEOUT There has been an SMP timeout, so no more SMP operations + * can be performed on this link. + * @retval BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle. + * @retval NRF_ERROR_NO_MEM No more room in flash. + * @retval NRF_ERROR_INTERNAL No more available peer IDs. + */ +ret_code_t smd_link_secure(uint16_t conn_handle, + ble_gap_sec_params_t * p_sec_params, + bool force_repairing); + +/** @} + * @endcond + */ + +#endif /* SECURITY_DISPATCHER_H__ */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_manager.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_manager.c new file mode 100644 index 0000000000..99e4539288 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_manager.c @@ -0,0 +1,553 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#include "security_manager.h" +#include +#include "security_dispatcher.h" +#include "peer_database.h" +#include "ble_conn_state.h" +#include "sdk_common.h" +#include "id_manager.h" + +#define MAX_REGISTRANTS 3 /**< The number of user that can register with the module. */ + +typedef struct +{ + sm_evt_handler_t evt_handlers[MAX_REGISTRANTS]; + uint8_t n_registrants; + ble_conn_state_user_flag_id_t flag_id_link_secure_pending_busy; + ble_conn_state_user_flag_id_t flag_id_link_secure_pending_flash_full; + ble_conn_state_user_flag_id_t flag_id_link_secure_force_repairing; + ble_conn_state_user_flag_id_t flag_id_link_secure_null_params; + ble_conn_state_user_flag_id_t flag_id_params_reply_pending_busy; + ble_conn_state_user_flag_id_t flag_id_params_reply_pending_flash_full; + ble_conn_state_user_flag_id_t flag_id_reject_pairing; + bool pdb_evt_handler_registered; + bool sec_params_valid; + ble_gap_sec_params_t sec_params; + ble_gap_lesc_p256_pk_t * p_public_key; +} sm_t; + +static sm_t m_sm = {.flag_id_link_secure_pending_busy = BLE_CONN_STATE_USER_FLAG_INVALID, + .flag_id_link_secure_pending_flash_full = BLE_CONN_STATE_USER_FLAG_INVALID, + .flag_id_link_secure_force_repairing = BLE_CONN_STATE_USER_FLAG_INVALID, + .flag_id_link_secure_null_params = BLE_CONN_STATE_USER_FLAG_INVALID, + .flag_id_params_reply_pending_busy = BLE_CONN_STATE_USER_FLAG_INVALID, + .flag_id_params_reply_pending_flash_full = BLE_CONN_STATE_USER_FLAG_INVALID, + .flag_id_reject_pairing = BLE_CONN_STATE_USER_FLAG_INVALID}; + +#define MODULE_INITIALIZED (m_sm.n_registrants > 0) /**< Expression which is true when the module is initialized. */ +#include "sdk_macros.h" + +static void evt_send(sm_evt_t * p_event) +{ + for (uint32_t i = 0; i < m_sm.n_registrants; i++) + { + m_sm.evt_handlers[i](p_event); + } +} + + +static void flags_set_from_err_code(uint16_t conn_handle, ret_code_t err_code, bool params_reply) +{ + bool flag_value_flash_full = false; + bool flag_value_busy = false; + + if ( (err_code == NRF_ERROR_NO_MEM) + || (err_code == NRF_ERROR_BUSY) + || (err_code == NRF_SUCCESS)) + { + if ((err_code == NRF_ERROR_NO_MEM)) + { + flag_value_busy = false; + flag_value_flash_full = true; + } + else if (err_code == NRF_ERROR_BUSY) + { + flag_value_busy = true; + flag_value_flash_full = false; + } + else if (err_code == NRF_SUCCESS) + { + flag_value_busy = false; + flag_value_flash_full = false; + } + + if (params_reply) + { + ble_conn_state_user_flag_set(conn_handle, + m_sm.flag_id_params_reply_pending_flash_full, + flag_value_flash_full); + ble_conn_state_user_flag_set(conn_handle, + m_sm.flag_id_params_reply_pending_busy, + flag_value_busy); + ble_conn_state_user_flag_set(conn_handle, + m_sm.flag_id_link_secure_pending_flash_full, + false); + ble_conn_state_user_flag_set(conn_handle, + m_sm.flag_id_link_secure_pending_busy, + false); + } + else + { + ble_conn_state_user_flag_set(conn_handle, + m_sm.flag_id_link_secure_pending_flash_full, + flag_value_flash_full); + ble_conn_state_user_flag_set(conn_handle, + m_sm.flag_id_link_secure_pending_busy, + flag_value_busy); + } + } +} + + +static void events_send_from_err_code(uint16_t conn_handle, ret_code_t err_code) +{ + if ((err_code != NRF_SUCCESS) && (err_code != NRF_ERROR_BUSY)) + { + sm_evt_t evt = + { + .conn_handle = conn_handle, + .params = {.error_unexpected = { + .error = err_code + }} + }; + if (err_code == NRF_ERROR_TIMEOUT) + { + evt.evt_id = SM_EVT_ERROR_SMP_TIMEOUT; + } + else if (err_code == NRF_ERROR_NO_MEM) + { + evt.evt_id = SM_EVT_ERROR_NO_MEM; + } + else + { + evt.evt_id = SM_EVT_ERROR_UNEXPECTED; + } + evt_send(&evt); + } +} + + +static ret_code_t link_secure(uint16_t conn_handle, bool null_params, bool force_repairing, bool send_events) +{ + ret_code_t err_code; + + if (!null_params && !m_sm.sec_params_valid) + { + return NRF_ERROR_NOT_FOUND; + } + + if(null_params) + { + err_code = smd_link_secure(conn_handle, NULL, force_repairing); + } + else + { + err_code = smd_link_secure(conn_handle, &m_sm.sec_params, force_repairing); + } + + flags_set_from_err_code(conn_handle, err_code, false); + + if (send_events) + { + events_send_from_err_code(conn_handle, err_code); + } + + switch (err_code) + { + case NRF_ERROR_BUSY: + ble_conn_state_user_flag_set(conn_handle, m_sm.flag_id_link_secure_null_params, null_params); + ble_conn_state_user_flag_set(conn_handle, m_sm.flag_id_link_secure_force_repairing, force_repairing); + err_code = NRF_SUCCESS; + break; + case NRF_ERROR_NO_MEM: + ble_conn_state_user_flag_set(conn_handle, m_sm.flag_id_link_secure_null_params, null_params); + ble_conn_state_user_flag_set(conn_handle, m_sm.flag_id_link_secure_force_repairing, force_repairing); + break; + case NRF_SUCCESS: + case NRF_ERROR_TIMEOUT: + case BLE_ERROR_INVALID_CONN_HANDLE: + case NRF_ERROR_INVALID_STATE: + /* No action */ + break; + default: + err_code = NRF_ERROR_INTERNAL; + break; + } + + return err_code; +} + + +static void send_config_req(uint16_t conn_handle) +{ + sm_evt_t sm_evt; + memset(&sm_evt, 0, sizeof(sm_evt)); + + sm_evt.evt_id = SM_EVT_CONN_SEC_CONFIG_REQ; + sm_evt.conn_handle = conn_handle; + + evt_send(&sm_evt); +} + + +static void smd_params_reply_perform(uint16_t conn_handle) +{ + ret_code_t err_code; + + if ( (ble_conn_state_role(conn_handle) == BLE_GAP_ROLE_PERIPH) + && im_peer_id_get_by_conn_handle(conn_handle) != PM_PEER_ID_INVALID) + { + // Bond already exists. Reject the pairing request if the user doesn't intervene. + ble_conn_state_user_flag_set(conn_handle, m_sm.flag_id_reject_pairing, true); + send_config_req(conn_handle); + } + else + { + ble_conn_state_user_flag_set(conn_handle, m_sm.flag_id_reject_pairing, false); + } + + if ( m_sm.sec_params_valid + && !ble_conn_state_user_flag_get(conn_handle, m_sm.flag_id_reject_pairing)) + { + err_code = smd_params_reply(conn_handle, &m_sm.sec_params, m_sm.p_public_key); + } + else + { + err_code = smd_params_reply(conn_handle, NULL, NULL); + } + + flags_set_from_err_code(conn_handle, err_code, true); + events_send_from_err_code(conn_handle, err_code); +} + + +static void smd_evt_handler(smd_evt_t const * p_event) +{ + switch(p_event->evt_id) + { + case SMD_EVT_PARAMS_REQ: + smd_params_reply_perform(p_event->conn_handle); + break; + case SMD_EVT_SLAVE_SECURITY_REQ: + { + bool null_params = false; + if (!m_sm.sec_params_valid) + { + null_params = true; + } + else if ((bool)m_sm.sec_params.bond < (bool)p_event->params.slave_security_req.bond) + { + null_params = true; + } + else if ((bool)m_sm.sec_params.mitm < (bool)p_event->params.slave_security_req.mitm) + { + null_params = true; + } + ret_code_t err_code = link_secure(p_event->conn_handle, null_params, false, true); + UNUSED_VARIABLE(err_code); // It is acceptable to ignore the return code because it is + // acceptable to ignore a security request. + } + /* fallthrough */ + case SMD_EVT_PAIRING_SUCCESS: + case SMD_EVT_PAIRING_FAIL: + case SMD_EVT_LINK_ENCRYPTION_UPDATE: + case SMD_EVT_LINK_ENCRYPTION_FAILED: + case SMD_EVT_BONDING_INFO_STORED: + case SMD_EVT_ERROR_BONDING_INFO: + case SMD_EVT_ERROR_UNEXPECTED: + case SMD_EVT_SEC_PROCEDURE_START: + { + sm_evt_t evt; + evt.evt_id = (sm_evt_id_t)p_event->evt_id; + evt.conn_handle = p_event->conn_handle; + evt.params = p_event->params; + + evt_send(&evt); + } + break; + } +} + + +static void link_secure_pending_process(ble_conn_state_user_flag_id_t flag_id) +{ + sdk_mapped_flags_t flag_collection = ble_conn_state_user_flag_collection(flag_id); + if (sdk_mapped_flags_any_set(flag_collection)) + { + sdk_mapped_flags_key_list_t conn_handle_list = ble_conn_state_conn_handles(); + + for (uint32_t i = 0; i < conn_handle_list.len; i++) + { + bool pending = ble_conn_state_user_flag_get(conn_handle_list.flag_keys[i], flag_id); + if (pending) + { + bool force_repairing = ble_conn_state_user_flag_get(conn_handle_list.flag_keys[i], m_sm.flag_id_link_secure_force_repairing); + bool null_params = ble_conn_state_user_flag_get(conn_handle_list.flag_keys[i], m_sm.flag_id_link_secure_null_params); + + ret_code_t err_code = link_secure(conn_handle_list.flag_keys[i], null_params, force_repairing, true); // If this fails, it will be automatically retried. + UNUSED_VARIABLE(err_code); + } + } + } +} + + +static void params_reply_pending_process(ble_conn_state_user_flag_id_t flag_id) +{ + sdk_mapped_flags_t flag_collection = ble_conn_state_user_flag_collection(flag_id); + if (sdk_mapped_flags_any_set(flag_collection)) + { + sdk_mapped_flags_key_list_t conn_handle_list = ble_conn_state_conn_handles(); + + for (uint32_t i = 0; i < conn_handle_list.len; i++) + { + bool pending = ble_conn_state_user_flag_get(conn_handle_list.flag_keys[i], flag_id); + if (pending) + { + smd_params_reply_perform(conn_handle_list.flag_keys[i]); + } + } + } +} + + + +static void pdb_evt_handler(pdb_evt_t const * p_event) +{ + switch (p_event->evt_id) + { + case PDB_EVT_COMPRESSED: + params_reply_pending_process(m_sm.flag_id_params_reply_pending_flash_full); + link_secure_pending_process(m_sm.flag_id_link_secure_pending_flash_full); + /* fallthrough */ + case PDB_EVT_WRITE_BUF_STORED: + case PDB_EVT_RAW_STORED: + case PDB_EVT_RAW_STORE_FAILED: + case PDB_EVT_CLEARED: + case PDB_EVT_CLEAR_FAILED: + case PDB_EVT_PEER_FREED: + case PDB_EVT_PEER_FREE_FAILED: + params_reply_pending_process(m_sm.flag_id_params_reply_pending_busy); + link_secure_pending_process(m_sm.flag_id_link_secure_pending_busy); + break; + case PDB_EVT_ERROR_NO_MEM: + case PDB_EVT_ERROR_UNEXPECTED: + break; + } +} + + +/**@brief Funtion for initializing a BLE Connection State user flag. + * + * @param[out] flag_id The flag to initialize. + */ +static void flag_id_init(ble_conn_state_user_flag_id_t * p_flag_id) +{ + if (*p_flag_id == BLE_CONN_STATE_USER_FLAG_INVALID) + { + *p_flag_id = ble_conn_state_user_flag_acquire(); + } +} + + +ret_code_t sm_register(sm_evt_handler_t evt_handler) +{ + VERIFY_PARAM_NOT_NULL(evt_handler); + + ret_code_t err_code = NRF_SUCCESS; + + if (!MODULE_INITIALIZED) + { + flag_id_init(&m_sm.flag_id_link_secure_pending_busy); + flag_id_init(&m_sm.flag_id_link_secure_pending_flash_full); + flag_id_init(&m_sm.flag_id_link_secure_force_repairing); + flag_id_init(&m_sm.flag_id_link_secure_null_params); + flag_id_init(&m_sm.flag_id_params_reply_pending_busy); + flag_id_init(&m_sm.flag_id_params_reply_pending_flash_full); + flag_id_init(&m_sm.flag_id_reject_pairing); + + if (m_sm.flag_id_reject_pairing == BLE_CONN_STATE_USER_FLAG_INVALID) + { + return NRF_ERROR_INTERNAL; + } + if (!m_sm.pdb_evt_handler_registered) + { + err_code = pdb_register(pdb_evt_handler); + if (err_code != NRF_SUCCESS) + { + return NRF_ERROR_INTERNAL; + } + m_sm.pdb_evt_handler_registered = true; + } + err_code = smd_register(smd_evt_handler); + if (err_code != NRF_SUCCESS) + { + return NRF_ERROR_INTERNAL; + } + } + if (err_code == NRF_SUCCESS) + { + if ((m_sm.n_registrants < MAX_REGISTRANTS)) + { + m_sm.evt_handlers[m_sm.n_registrants++] = evt_handler; + } + else + { + err_code = NRF_ERROR_NO_MEM; + } + } + return err_code; +} + + +void sm_ble_evt_handler(ble_evt_t * p_ble_evt) +{ + VERIFY_MODULE_INITIALIZED_VOID(); + + smd_ble_evt_handler(p_ble_evt); + + link_secure_pending_process(m_sm.flag_id_link_secure_pending_busy); +} + + +static bool sec_params_verify(ble_gap_sec_params_t * p_sec_params) +{ + // NULL check. + if (p_sec_params == NULL) + { + return false; + } + + // OOB not allowed unless MITM. + if (!p_sec_params->mitm && p_sec_params->oob) + { + return false; + } + + // IO Capabilities must be one of the valid values from @ref BLE_GAP_IO_CAPS. + if (p_sec_params->io_caps > BLE_GAP_IO_CAPS_KEYBOARD_DISPLAY) + { + return false; + } + + // Must have either IO capabilities or OOB if MITM. + if (p_sec_params->mitm && (p_sec_params->io_caps == BLE_GAP_IO_CAPS_NONE) && !p_sec_params->oob) + { + return false; + } + + // Minimum key size cannot be larger than maximum key size. + if (p_sec_params->min_key_size > p_sec_params->max_key_size) + { + return false; + } + + // Key size cannot be below 7 bytes. + if (p_sec_params->min_key_size < 7) + { + return false; + } + + // Key size cannot be above 16 bytes. + if (p_sec_params->max_key_size > 16) + { + return false; + } + + // Signing is not supported. + if (p_sec_params->kdist_own.sign || p_sec_params->kdist_peer.sign) + { + return false; + } + + // link bit must be 0. + if (p_sec_params->kdist_own.link || p_sec_params->kdist_peer.link) + { + return false; + } + + // If bonding is not enabled, no keys can be distributed. + if (!p_sec_params->bond && ( p_sec_params->kdist_own.enc + || p_sec_params->kdist_own.id + || p_sec_params->kdist_peer.enc + || p_sec_params->kdist_peer.id)) + { + return false; + } + + // If bonding is enabled, one or more keys must be distributed. + if ( p_sec_params->bond + && !p_sec_params->kdist_own.enc + && !p_sec_params->kdist_own.id + && !p_sec_params->kdist_peer.enc + && !p_sec_params->kdist_peer.id) + { + return false; + } + + return true; +} + + +ret_code_t sm_sec_params_set(ble_gap_sec_params_t * p_sec_params) +{ + VERIFY_MODULE_INITIALIZED(); + + if (p_sec_params == NULL) + { + m_sm.sec_params_valid = false; + return NRF_SUCCESS; + } + else if (sec_params_verify(p_sec_params)) + { + m_sm.sec_params = *p_sec_params; + m_sm.sec_params_valid = true; + return NRF_SUCCESS; + } + else + { + return NRF_ERROR_INVALID_PARAM; + } +} + + +void sm_conn_sec_config_reply(uint16_t conn_handle, pm_conn_sec_config_t * p_conn_sec_config) +{ + ble_conn_state_user_flag_set(conn_handle, m_sm.flag_id_reject_pairing, !p_conn_sec_config->allow_repairing); +} + + +ret_code_t sm_lesc_public_key_set(ble_gap_lesc_p256_pk_t * p_public_key) +{ + VERIFY_MODULE_INITIALIZED(); + m_sm.p_public_key = p_public_key; + return NRF_SUCCESS; +} + + +ret_code_t sm_sec_params_reply(uint16_t conn_handle, ble_gap_sec_params_t * p_sec_params) +{ + VERIFY_MODULE_INITIALIZED(); + return NRF_SUCCESS; +} + + +ret_code_t sm_link_secure(uint16_t conn_handle, bool force_repairing) +{ + VERIFY_MODULE_INITIALIZED(); + ret_code_t err_code = link_secure(conn_handle, false, force_repairing, false); + return err_code; +} + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_manager.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_manager.h new file mode 100644 index 0000000000..a144df1de0 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_manager.h @@ -0,0 +1,192 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#ifndef SECURITY_MANAGER_H__ +#define SECURITY_MANAGER_H__ + +#include +#include "sdk_errors.h" +#include "ble.h" +#include "ble_gap.h" +#include "peer_manager_types.h" +#include "security_dispatcher.h" + + +/** + * @cond NO_DOXYGEN + * @defgroup security_manager Security Manager + * @ingroup peer_manager + * @{ + * @brief An internal module of @ref peer_manager. A module for streamlining pairing, bonding, and + * encryption, including flash storage of shared data. + */ + + +/**@brief Events that can come from the Security Manager module. + */ +typedef enum +{ + // SM_EVT_PARAMS_REQ = SMD_EVT_PARAMS_REQ, /**< Parameters are required for a pairing procedure on the specified connection. The user must provide them using @ref sm_sec_params_set or @ref sm_sec_params_reply (only this procedure, currently unimplemented). */ + SM_EVT_SLAVE_SECURITY_REQ = SMD_EVT_SLAVE_SECURITY_REQ, /**< The peer (peripheral) has requested link encryption, which has been enabled. */ + SM_EVT_SEC_PROCEDURE_START = SMD_EVT_SEC_PROCEDURE_START, /**< A security procedure has started. */ + SM_EVT_PAIRING_SUCCESS = SMD_EVT_PAIRING_SUCCESS, /**< A pairing procedure (and bonding if applicable) has completed with success. */ + SM_EVT_PAIRING_FAIL = SMD_EVT_PAIRING_FAIL, /**< A pairing procedure has failed which means no encryption and no bond could be established. */ + SM_EVT_LINK_ENCRYPTION_UPDATE = SMD_EVT_LINK_ENCRYPTION_UPDATE, /**< The security level of the link has been updated. The link is encrypted. */ + SM_EVT_LINK_ENCRYPTION_FAILED = SMD_EVT_LINK_ENCRYPTION_FAILED, /**< An attempt to start encryption on an unencrypted link failed because the peripheral did not have the correct keys. If the peer is the peripheral, the force_repairing flag should be set when reattempting @ref sm_link_secure. */ + SM_EVT_BONDING_INFO_STORED = SMD_EVT_BONDING_INFO_STORED, /**< Information exchanged during bonding with a peer has been stored persistently. */ + SM_EVT_ERROR_BONDING_INFO = SMD_EVT_ERROR_BONDING_INFO, /**< Information exchanged during bonding with a peer could not be stored persistently, because of an unexpected error. */ + SM_EVT_ERROR_UNEXPECTED = SMD_EVT_ERROR_UNEXPECTED, /**< An operation failed with an unexpected error. The error is provided. This is possibly a fatal error. */ + SM_EVT_ERROR_NO_MEM /*= SMD_EVT_ERROR_NO_MEM*/, /**< An operation failed because there was no available storage room in persistent storage. Please free up room and the operation will automatically continue after the next compression. */ + SM_EVT_ERROR_SMP_TIMEOUT, /**< An operation failed because there has been an SMP timeout on the link, which entails that no more security operations can be performed on it. */ + SM_EVT_CONN_SEC_CONFIG_REQ, /**< The peer (central) has requested pairing, but a bond already exists with that peer. Reply by calling @ref sm_conn_sec_config_reply before the event handler returns. If no reply is sent, a default is used. */ +} sm_evt_id_t; + + +typedef struct +{ + sm_evt_id_t evt_id; + uint16_t conn_handle; + smd_evt_params_t params; +} sm_evt_t; + + + +/**@brief Event handler for events from the Security Manager module. + * + * @param[in] event The event that has happened. + * @param[in] conn_handle The connection handle the event pertains to. + */ +typedef void (*sm_evt_handler_t)(sm_evt_t const * p_event); + + +/**@brief Function for registering with the Security Manager module. This function also + * initializes the module if uninitialized. + * + * @param[in] evt_handler Callback for events from the Security Manager module. + * + * @retval NRF_SUCCESS Registration was successful. + * @retval NRF_ERROR_NO_MEM No more registrations possible. + * @retval NRF_ERROR_NULL evt_handler was NULL. + * @retval NRF_ERROR_INTERNAL An unexpected error occurred. + */ +ret_code_t sm_register(sm_evt_handler_t evt_handler); + + +/**@brief Function for dispatching SoftDevice events to the Security Manager module. + * + * @param[in] ble_evt The SoftDevice event. + */ +void sm_ble_evt_handler(ble_evt_t * ble_evt); + + +/**@brief Function for providing pairing and bonding parameters to use for pairing procedures. + * + * @details Until this is called, all bonding procedures initiated by the peer will be rejected. + * This function can be called multiple times, even with NULL p_sec_params, in which case + * it will go back to rejecting all procedures. + * + * @param[in] p_sec_params The security parameters to use for this link. Can be NULL to reject + * all pairing procedures. + * + * @retval NRF_SUCCESS Success. + * @retval NRF_ERROR_INVALID_PARAM Invalid combination of parameters. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + */ +ret_code_t sm_sec_params_set(ble_gap_sec_params_t * p_sec_params); + + +/**@brief Function for providing security configuration for a link. + * + * @details This function is optional, and must be called in reply to a @ref + * SM_EVT_CONN_SEC_CONFIG_REQ event, before the Peer Manager event handler returns. If it + * is not called in time, a default configuration is used. See @ref pm_conn_sec_config_t + * for the value of the default. + * + * @param[in] conn_handle The connection to set the configuration for. + * @param[in] p_conn_sec_config The configuration. + */ +void sm_conn_sec_config_reply(uint16_t conn_handle, pm_conn_sec_config_t * p_conn_sec_config); + + +/**@brief Experimental function for specifying the public key to use for LESC operations. + * + * @details This function can be called multiple times. The specified public key will be used for + * all subsequent LESC (LE Secure Connections) operations until the next time this function + * is called. + * + * @note The key must continue to reside in application memory as it is not copied by Peer Manager. + * + * @param[in] p_public_key The public key to use for all subsequent LESC operations. + * + * @retval NRF_SUCCESS Pairing initiated successfully. + * @retval NRF_ERROR_INVALID_STATE Peer Manager is not initialized. + */ +ret_code_t sm_lesc_public_key_set(ble_gap_lesc_p256_pk_t * p_public_key); + + +/**@brief Function for providing pairing and bonding parameters to use for the current pairing + * procedure on a connection. + * + * @warning This function is not yet implemented. + * + * @note If this function returns an @ref NRF_ERROR_NULL, @ref NRF_ERROR_INVALID_PARAM, @ref + * BLE_ERROR_INVALID_CONN_HANDLE, or @ref NRF_ERROR_NO_MEM, this function can be called again + * after corrective action. + * + * @note To reject a request, call this function with NULL p_sec_params. + * + * @param[in] conn_handle The connection handle of the connection the pairing is happening on. + * @param[in] p_sec_params The security parameters to use for this link. + * + * @retval NRF_SUCCESS Success. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized, or no parameters have been + * requested on that conn_handle, or this error originates + * from the SoftDevice. + * @retval NRF_ERROR_INVALID_PARAM Invalid combination of parameters (not including conn_handle). + * @retval NRF_ERROR_TIMEOUT There has been an SMP timeout, so no more SMP operations + * can be performed on this link. + * @retval BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle. + * @retval NRF_ERROR_NO_MEM No more room in flash. Fix and reattempt later. + * @retval NRF_ERROR_BUSY No write buffer. Reattempt later. + */ +ret_code_t sm_sec_params_reply(uint16_t conn_handle, ble_gap_sec_params_t * p_sec_params); + + +/**@brief Function for initiating security on the link, with the specified parameters. + * + * @note If the connection is a peripheral connection, this will send a security request to the + * master, but the master is not obligated to initiate pairing or encryption in response. + * @note If the connection is a central connection and a key is available, the parameters will be + * used to determine whether to re-pair or to encrypt using the existing key. If no key is + * available, pairing will be started. + * + * @param[in] conn_handle Handle of the connection to initiate pairing on. + * @param[in] force_repairing Whether to force a pairing procedure to happen regardless of whether + * an encryption key already exists. This argument is only relevant for + * the central role. Recommended value: false + * + * @retval NRF_SUCCESS Success. + * @retval NRF_ERROR_TIMEOUT There has been an SMP timeout, so no more SMP operations + * can be performed on this link. + * @retval BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle. + * @retval NRF_ERROR_NOT_FOUND Security parameters have not been set. + * @retval NRF_ERROR_INVALID_STATE Module is not initialized. + * @retval NRF_ERROR_INTERNAL An unexpected error occurred. + */ +ret_code_t sm_link_secure(uint16_t conn_handle, bool force_repairing); + +/** @} + * @endcond + */ + +#endif /* SECURITY_MANAGER_H__ */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.c new file mode 100644 index 0000000000..5f59690b16 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.c @@ -0,0 +1,306 @@ +/* + * 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_flash.h" +#include +#include +#include +#include "nrf_soc.h" +#include "nordic_common.h" +#include "nrf_error.h" +#include "nrf.h" +#include "app_util.h" + + +static volatile bool m_radio_active = false; /**< TRUE if radio is active (or about to become active), FALSE otherwise. */ + + +uint16_t ble_flash_crc16_compute(uint8_t * p_data, uint16_t size, uint16_t * p_crc) +{ + uint16_t i; + uint16_t crc = (p_crc == NULL) ? 0xffff : *p_crc; + + for (i = 0; i < size; i++) + { + crc = (unsigned char)(crc >> 8) | (crc << 8); + crc ^= p_data[i]; + crc ^= (unsigned char)(crc & 0xff) >> 4; + crc ^= (crc << 8) << 4; + crc ^= ((crc & 0xff) << 4) << 1; + } + return crc; +} + + +/**@brief Function for erasing a page in flash. + * + * @param[in] p_page Pointer to first word in page to be erased. + */ +static void flash_page_erase(uint32_t * p_page) +{ + // Turn on flash erase enable and wait until the NVMC is ready. + NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Een << NVMC_CONFIG_WEN_Pos); + while (NRF_NVMC->READY == NVMC_READY_READY_Busy) + { + // Do nothing. + } + + // Erase page. + NRF_NVMC->ERASEPAGE = (uint32_t)p_page; + while (NRF_NVMC->READY == NVMC_READY_READY_Busy) + { + // Do nothing. + } + + // Turn off flash erase enable and wait until the NVMC is ready. + NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos); + while (NRF_NVMC->READY == NVMC_READY_READY_Busy) + { + // Do nothing + } +} + + +/**@brief Function for writing one word to flash. Unprotected write, which can interfere with radio communication. + * + * @details This function DOES NOT use the m_radio_active variable, but will force the write even + * when the radio is active. To be used only from @ref ble_flash_page_write. + * + * @note Flash location to be written must have been erased previously. + * + * @param[in] p_address Pointer to flash location to be written. + * @param[in] value Value to write to flash. + */ +static void flash_word_unprotected_write(uint32_t * p_address, uint32_t value) +{ + // Turn on flash write enable and wait until the NVMC is ready. + NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos); + while (NRF_NVMC->READY == NVMC_READY_READY_Busy) + { + // Do nothing. + } + *p_address = value; + + // Wait flash write to finish + while (NRF_NVMC->READY == NVMC_READY_READY_Busy) + { + // Do nothing. + } + + // Turn off flash write enable and wait until the NVMC is ready. + NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos); + while (NRF_NVMC->READY == NVMC_READY_READY_Busy) + { + // Do nothing. + } +} + + +/**@brief Function for writing one word to flash. + * + * @note Flash location to be written must have been erased previously. + * + * @param[in] p_address Pointer to flash location to be written. + * @param[in] value Value to write to flash. + */ +static void flash_word_write(uint32_t * p_address, uint32_t value) +{ + // If radio is active, wait for it to become inactive. + while (m_radio_active) + { + // Do nothing (just wait for radio to become inactive). + (void) sd_app_evt_wait(); + } + + // Turn on flash write enable and wait until the NVMC is ready. + NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos); + while (NRF_NVMC->READY == NVMC_READY_READY_Busy) + { + // Do nothing. + } + + *p_address = value; + // Wait flash write to finish + while (NRF_NVMC->READY == NVMC_READY_READY_Busy) + { + // Do nothing. + } + // Turn off flash write enable and wait until the NVMC is ready. + NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos); + while (NRF_NVMC->READY == NVMC_READY_READY_Busy) + { + // Do nothing + } +} + + +uint32_t ble_flash_word_write(uint32_t * p_address, uint32_t value) +{ + flash_word_write(p_address, value); + return NRF_SUCCESS; +} + + +uint32_t ble_flash_block_write(uint32_t * p_address, uint32_t * p_in_array, uint16_t word_count) +{ + uint16_t i; + + for (i = 0; i < word_count; i++) + { + flash_word_write(p_address, p_in_array[i]); + p_address++; + } + + return NRF_SUCCESS; +} + + +uint32_t ble_flash_page_erase(uint8_t page_num) +{ + uint32_t * p_page = (uint32_t *)(BLE_FLASH_PAGE_SIZE * page_num); + flash_page_erase(p_page); + + return NRF_SUCCESS; +} + + +uint32_t ble_flash_page_write(uint8_t page_num, uint32_t * p_in_array, uint8_t word_count) +{ + int i; + uint32_t * p_page; + uint32_t * p_curr_addr; + uint16_t in_data_crc; + uint16_t flash_crc; + uint32_t flash_header; + + p_page = (uint32_t *)(BLE_FLASH_PAGE_SIZE * page_num); + p_curr_addr = p_page; + + // Calculate CRC of the data to write. + in_data_crc = ble_flash_crc16_compute((uint8_t *)p_in_array, + word_count * sizeof(uint32_t), + NULL); + + // Compare the calculated to the one in flash. + flash_header = *p_curr_addr; + flash_crc = (uint16_t)flash_header; + + if (flash_crc == in_data_crc) + { + // Data is the same as the data already stored in flash, return without modifying flash. + return NRF_SUCCESS; + } + + // Erase flash page + flash_page_erase(p_page); + + // Reserve space for magic number (for detecting if flash content is valid). + p_curr_addr++; + + // Reserve space for saving word_count. + p_curr_addr++; + + // Write data + for (i = 0; i < word_count; i++) + { + flash_word_unprotected_write(p_curr_addr, p_in_array[i]); + p_curr_addr++; + } + + // Write number of elements. + flash_word_write(p_page + 1, (uint32_t)(word_count)); + + // Write magic number and CRC to indicate that flash content is valid. + flash_header = BLE_FLASH_MAGIC_NUMBER | (uint32_t)in_data_crc; + flash_word_write(p_page, flash_header); + + return NRF_SUCCESS; +} + + +uint32_t ble_flash_page_read(uint8_t page_num, uint32_t * p_out_array, uint8_t * p_word_count) +{ + int byte_count; + uint32_t * p_page; + uint32_t * p_curr_addr; + uint32_t flash_header; + uint32_t calc_header; + uint16_t calc_crc; + uint32_t tmp; + + p_page = (uint32_t *)(BLE_FLASH_PAGE_SIZE * page_num); + p_curr_addr = p_page; + + // Check if block is valid + flash_header = *p_curr_addr; + tmp = flash_header & 0xFFFF0000; + if (tmp != BLE_FLASH_MAGIC_NUMBER) + { + *p_word_count = 0; + return NRF_ERROR_NOT_FOUND; + } + p_curr_addr++; + + // Read number of elements + *p_word_count = (uint8_t)(*(p_curr_addr)); + p_curr_addr++; + + // Read data + byte_count = (*p_word_count) * sizeof(uint32_t); + memcpy(p_out_array, p_curr_addr, byte_count); + + // Check CRC + calc_crc = ble_flash_crc16_compute((uint8_t *)p_out_array, + (*p_word_count) * sizeof(uint32_t), + NULL); + calc_header = BLE_FLASH_MAGIC_NUMBER | (uint32_t)calc_crc; + + if (calc_header != flash_header) + { + return NRF_ERROR_NOT_FOUND; + } + + return NRF_SUCCESS; +} + + +uint32_t ble_flash_page_addr(uint8_t page_num, uint32_t ** pp_page_addr) +{ + *pp_page_addr = (uint32_t *)(BLE_FLASH_PAGE_SIZE * page_num); + return NRF_SUCCESS; +} + + +void ble_flash_on_radio_active_evt(bool radio_active) +{ + m_radio_active = radio_active; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.h new file mode 100644 index 0000000000..52d0024d08 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.h @@ -0,0 +1,162 @@ +/* + * 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. + * + */ + +/** @file + * + * @defgroup ble_flash_module Flash Manager + * @{ + * @ingroup ble_sdk_lib + * @brief Module for accessing flash memory. + * + * @details It contains functions for reading, writing and erasing one page in flash. + * + * The module uses the first 32 bits of the flash page to write a magic number in order to + * determine if the page has been written or not. + * + * @note Be careful not to use a page number in the SoftDevice area (which currently occupies the + * range 0 to 127), or in your application space! In both cases, this would end up + * with a hard fault. + */ + +#ifndef BLE_FLASH_H__ +#define BLE_FLASH_H__ + +#include +#include +#include "nrf.h" + +#define BLE_FLASH_PAGE_SIZE ((uint16_t)NRF_FICR->CODEPAGESIZE) /**< Size of one flash page. */ +#define BLE_FLASH_MAGIC_NUMBER 0x45DE0000 /**< Magic value to identify if flash contains valid data. */ +#define BLE_FLASH_EMPTY_MASK 0xFFFFFFFF /**< Bit mask that defines an empty address in flash. */ + + +/**@brief Macro for getting the end of the flash available for application. + * + * @details The result flash page number indicates the end boundary of the flash available + * to the application. If a bootloader is used, the end will be the start of the + * bootloader region. Otherwise, the end will be the size of the flash. + */ +#define BLE_FLASH_PAGE_END \ + ((NRF_UICR->NRFFW[0] != BLE_FLASH_EMPTY_MASK) \ + ? (NRF_UICR->NRFFW[0] / BLE_FLASH_PAGE_SIZE) \ + : NRF_FICR->CODESIZE) + +/**@brief Function for erasing the specified flash page, and then writes the given data to this page. + * + * @warning This operation blocks the CPU. DO NOT use while in a connection! + * + * @param[in] page_num Page number to update. + * @param[in] p_in_array Pointer to a RAM area containing the elements to write in flash. + * This area has to be 32 bits aligned. + * @param[in] word_count Number of 32 bits words to write in flash. + * + * @return NRF_SUCCESS on successful flash write, otherwise an error code. + */ +uint32_t ble_flash_page_write(uint8_t page_num, uint32_t * p_in_array, uint8_t word_count); + +/**@brief Function for reading data from flash to RAM. + * + * @param[in] page_num Page number to read. + * @param[out] p_out_array Pointer to a RAM area where the found data will be written. + * This area has to be 32 bits aligned. + * @param[out] p_word_count Number of 32 bits words read. + * + * @return NRF_SUCCESS on successful upload, NRF_ERROR_NOT_FOUND if no valid data has been found + * in flash (first 32 bits not equal to the MAGIC_NUMBER+CRC). + */ +uint32_t ble_flash_page_read(uint8_t page_num, uint32_t * p_out_array, uint8_t * p_word_count); + +/**@brief Function for erasing a flash page. + * + * @note This operation blocks the CPU, so it should not be done while the radio is running! + * + * @param[in] page_num Page number to erase. + * + * @return NRF_SUCCESS on success, an error_code otherwise. + */ +uint32_t ble_flash_page_erase(uint8_t page_num); + +/**@brief Function for writing one word to flash. + * + * @note Flash location to be written must have been erased previously. + * + * @param[in] p_address Pointer to flash location to be written. + * @param[in] value Value to write to flash. + * + * @return NRF_SUCCESS. + */ +uint32_t ble_flash_word_write(uint32_t * p_address, uint32_t value); + +/**@brief Function for writing a data block to flash. + * + * @note Flash locations to be written must have been erased previously. + * + * @param[in] p_address Pointer to start of flash location to be written. + * @param[in] p_in_array Pointer to start of flash block to be written. + * @param[in] word_count Number of words to be written. + * + * @return NRF_SUCCESS. + */ +uint32_t ble_flash_block_write(uint32_t * p_address, uint32_t * p_in_array, uint16_t word_count); + +/**@brief Function for computing pointer to start of specified flash page. + * + * @param[in] page_num Page number. + * @param[out] pp_page_addr Pointer to start of flash page. + * + * @return NRF_SUCCESS. + */ +uint32_t ble_flash_page_addr(uint8_t page_num, uint32_t ** pp_page_addr); + +/**@brief Function for calculating a 16 bit CRC using the CRC-16-CCITT scheme. + * + * @param[in] p_data Pointer to data on which the CRC is to be calulated. + * @param[in] size Number of bytes on which the CRC is to be calulated. + * @param[in] p_crc Initial CRC value (if NULL, a preset value is used as the initial value). + * + * @return Calculated CRC. + */ +uint16_t ble_flash_crc16_compute(uint8_t * p_data, uint16_t size, uint16_t * p_crc); + +/**@brief Function for handling flashing module Radio Notification event. + * + * @note For flash writing to work safely while in a connection or while advertising, this function + * MUST be called from the Radio Notification module's event handler (see + * @ref ble_radio_notification for details). + * + * @param[in] radio_active TRUE if radio is active (or about to become active), FALSE otherwise. + */ +void ble_flash_on_radio_active_evt(bool radio_active); + +#endif // BLE_FLASH_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/config/nrf_drv_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/config/nrf_drv_config.h new file mode 100644 index 0000000000..6fcba3826e --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/config/nrf_drv_config.h @@ -0,0 +1,484 @@ +/* + * 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_DRV_CONFIG_H +#define NRF_DRV_CONFIG_H + +/** + * Provide a non-zero value here in applications that need to use several + * peripherals with the same ID that are sharing certain resources + * (for example, SPI0 and TWI0). Obviously, such peripherals cannot be used + * simultaneously. Therefore, this definition allows to initialize the driver + * for another peripheral from a given group only after the previously used one + * is uninitialized. Normally, this is not possible, because interrupt handlers + * are implemented in individual drivers. + * This functionality requires a more complicated interrupt handling and driver + * initialization, hence it is not always desirable to use it. + */ +#define PERIPHERAL_RESOURCE_SHARING_ENABLED 0 + +/* CLOCK */ +#define CLOCK_ENABLED 0 + +#if (CLOCK_ENABLED == 1) +#define CLOCK_CONFIG_XTAL_FREQ NRF_CLOCK_XTALFREQ_Default +#define CLOCK_CONFIG_LF_SRC NRF_CLOCK_LFCLK_Xtal +#define CLOCK_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#endif + +/* GPIOTE */ +#define GPIOTE_ENABLED 0 + +#if (GPIOTE_ENABLED == 1) +#define GPIOTE_CONFIG_USE_SWI_EGU false +#define GPIOTE_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#define GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS 1 +#endif + +/* TIMER */ +#define TIMER0_ENABLED 0 + +#if (TIMER0_ENABLED == 1) +#define TIMER0_CONFIG_FREQUENCY NRF_TIMER_FREQ_16MHz +#define TIMER0_CONFIG_MODE TIMER_MODE_MODE_Timer +#define TIMER0_CONFIG_BIT_WIDTH TIMER_BITMODE_BITMODE_32Bit +#define TIMER0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define TIMER0_INSTANCE_INDEX 0 +#endif + +#define TIMER1_ENABLED 0 + +#if (TIMER1_ENABLED == 1) +#define TIMER1_CONFIG_FREQUENCY NRF_TIMER_FREQ_16MHz +#define TIMER1_CONFIG_MODE TIMER_MODE_MODE_Timer +#define TIMER1_CONFIG_BIT_WIDTH TIMER_BITMODE_BITMODE_16Bit +#define TIMER1_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define TIMER1_INSTANCE_INDEX (TIMER0_ENABLED) +#endif + +#define TIMER2_ENABLED 0 + +#if (TIMER2_ENABLED == 1) +#define TIMER2_CONFIG_FREQUENCY NRF_TIMER_FREQ_16MHz +#define TIMER2_CONFIG_MODE TIMER_MODE_MODE_Timer +#define TIMER2_CONFIG_BIT_WIDTH TIMER_BITMODE_BITMODE_16Bit +#define TIMER2_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define TIMER2_INSTANCE_INDEX (TIMER1_ENABLED+TIMER0_ENABLED) +#endif + +#define TIMER3_ENABLED 0 + +#if (TIMER3_ENABLED == 1) +#define TIMER3_CONFIG_FREQUENCY NRF_TIMER_FREQ_16MHz +#define TIMER3_CONFIG_MODE TIMER_MODE_MODE_Timer +#define TIMER3_CONFIG_BIT_WIDTH TIMER_BITMODE_BITMODE_16Bit +#define TIMER3_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define TIMER3_INSTANCE_INDEX (TIMER2_ENABLED+TIMER1_ENABLED+TIMER0_ENABLED) +#endif + +#define TIMER4_ENABLED 0 + +#if (TIMER4_ENABLED == 1) +#define TIMER4_CONFIG_FREQUENCY NRF_TIMER_FREQ_16MHz +#define TIMER4_CONFIG_MODE TIMER_MODE_MODE_Timer +#define TIMER4_CONFIG_BIT_WIDTH TIMER_BITMODE_BITMODE_16Bit +#define TIMER4_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define TIMER4_INSTANCE_INDEX (TIMER3_ENABLED+TIMER2_ENABLED+TIMER1_ENABLED+TIMER0_ENABLED) +#endif + + +#define TIMER_COUNT (TIMER0_ENABLED + TIMER1_ENABLED + TIMER2_ENABLED + TIMER3_ENABLED + TIMER4_ENABLED) + +/* RTC */ +#define RTC0_ENABLED 0 + +#if (RTC0_ENABLED == 1) +#define RTC0_CONFIG_FREQUENCY 32678 +#define RTC0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#define RTC0_CONFIG_RELIABLE false + +#define RTC0_INSTANCE_INDEX 0 +#endif + +#define RTC1_ENABLED 0 + +#if (RTC1_ENABLED == 1) +#define RTC1_CONFIG_FREQUENCY 32768 +#define RTC1_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#define RTC1_CONFIG_RELIABLE false + +#define RTC1_INSTANCE_INDEX (RTC0_ENABLED) +#endif + +#define RTC2_ENABLED 0 + +#if (RTC2_ENABLED == 1) +#define RTC2_CONFIG_FREQUENCY 32768 +#define RTC2_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#define RTC2_CONFIG_RELIABLE false + +#define RTC2_INSTANCE_INDEX (RTC0_ENABLED+RTC1_ENABLED) +#endif + + +#define RTC_COUNT (RTC0_ENABLED+RTC1_ENABLED+RTC2_ENABLED) + +#define NRF_MAXIMUM_LATENCY_US 2000 + +/* RNG */ +#define RNG_ENABLED 0 + +#if (RNG_ENABLED == 1) +#define RNG_CONFIG_ERROR_CORRECTION true +#define RNG_CONFIG_POOL_SIZE 8 +#define RNG_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#endif + +/* PWM */ + +#define PWM0_ENABLED 0 + +#if (PWM0_ENABLED == 1) +#define PWM0_CONFIG_OUT0_PIN 2 +#define PWM0_CONFIG_OUT1_PIN 3 +#define PWM0_CONFIG_OUT2_PIN 4 +#define PWM0_CONFIG_OUT3_PIN 5 +#define PWM0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#define PWM0_CONFIG_BASE_CLOCK NRF_PWM_CLK_1MHz +#define PWM0_CONFIG_COUNT_MODE NRF_PWM_MODE_UP +#define PWM0_CONFIG_TOP_VALUE 1000 +#define PWM0_CONFIG_LOAD_MODE NRF_PWM_LOAD_COMMON +#define PWM0_CONFIG_STEP_MODE NRF_PWM_STEP_AUTO + +#define PWM0_INSTANCE_INDEX 0 +#endif + +#define PWM1_ENABLED 0 + +#if (PWM1_ENABLED == 1) +#define PWM1_CONFIG_OUT0_PIN 2 +#define PWM1_CONFIG_OUT1_PIN 3 +#define PWM1_CONFIG_OUT2_PIN 4 +#define PWM1_CONFIG_OUT3_PIN 5 +#define PWM1_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#define PWM1_CONFIG_BASE_CLOCK NRF_PWM_CLK_1MHz +#define PWM1_CONFIG_COUNT_MODE NRF_PWM_MODE_UP +#define PWM1_CONFIG_TOP_VALUE 1000 +#define PWM1_CONFIG_LOAD_MODE NRF_PWM_LOAD_COMMON +#define PWM1_CONFIG_STEP_MODE NRF_PWM_STEP_AUTO + +#define PWM1_INSTANCE_INDEX (PWM0_ENABLED) +#endif + +#define PWM2_ENABLED 0 + +#if (PWM2_ENABLED == 1) +#define PWM2_CONFIG_OUT0_PIN 2 +#define PWM2_CONFIG_OUT1_PIN 3 +#define PWM2_CONFIG_OUT2_PIN 4 +#define PWM2_CONFIG_OUT3_PIN 5 +#define PWM2_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#define PWM2_CONFIG_BASE_CLOCK NRF_PWM_CLK_1MHz +#define PWM2_CONFIG_COUNT_MODE NRF_PWM_MODE_UP +#define PWM2_CONFIG_TOP_VALUE 1000 +#define PWM2_CONFIG_LOAD_MODE NRF_PWM_LOAD_COMMON +#define PWM2_CONFIG_STEP_MODE NRF_PWM_STEP_AUTO + +#define PWM2_INSTANCE_INDEX (PWM0_ENABLED + PWM1_ENABLED) +#endif + +#define PWM_COUNT (PWM0_ENABLED + PWM1_ENABLED + PWM2_ENABLED) + +/* SPI */ +#define SPI0_ENABLED 0 + +#if (SPI0_ENABLED == 1) +#define SPI0_USE_EASY_DMA 0 + +#define SPI0_CONFIG_SCK_PIN 2 +#define SPI0_CONFIG_MOSI_PIN 3 +#define SPI0_CONFIG_MISO_PIN 4 +#define SPI0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define SPI0_INSTANCE_INDEX 0 +#endif + +#define SPI1_ENABLED 0 + +#if (SPI1_ENABLED == 1) +#define SPI1_USE_EASY_DMA 0 + +#define SPI1_CONFIG_SCK_PIN 2 +#define SPI1_CONFIG_MOSI_PIN 3 +#define SPI1_CONFIG_MISO_PIN 4 +#define SPI1_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define SPI1_INSTANCE_INDEX (SPI0_ENABLED) +#endif + +#define SPI2_ENABLED 0 + +#if (SPI2_ENABLED == 1) +#define SPI2_USE_EASY_DMA 0 + +#define SPI2_CONFIG_SCK_PIN 2 +#define SPI2_CONFIG_MOSI_PIN 3 +#define SPI2_CONFIG_MISO_PIN 4 +#define SPI2_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define SPI2_INSTANCE_INDEX (SPI0_ENABLED + SPI1_ENABLED) +#endif + +#define SPI_COUNT (SPI0_ENABLED + SPI1_ENABLED + SPI2_ENABLED) + +/* SPIS */ +#define SPIS0_ENABLED 0 + +#if (SPIS0_ENABLED == 1) +#define SPIS0_CONFIG_SCK_PIN 2 +#define SPIS0_CONFIG_MOSI_PIN 3 +#define SPIS0_CONFIG_MISO_PIN 4 +#define SPIS0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define SPIS0_INSTANCE_INDEX 0 +#endif + +#define SPIS1_ENABLED 0 + +#if (SPIS1_ENABLED == 1) +#define SPIS1_CONFIG_SCK_PIN 2 +#define SPIS1_CONFIG_MOSI_PIN 3 +#define SPIS1_CONFIG_MISO_PIN 4 +#define SPIS1_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define SPIS1_INSTANCE_INDEX SPIS0_ENABLED +#endif + +#define SPIS2_ENABLED 0 + +#if (SPIS2_ENABLED == 1) +#define SPIS2_CONFIG_SCK_PIN 2 +#define SPIS2_CONFIG_MOSI_PIN 3 +#define SPIS2_CONFIG_MISO_PIN 4 +#define SPIS2_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define SPIS2_INSTANCE_INDEX (SPIS0_ENABLED + SPIS1_ENABLED) +#endif + +#define SPIS_COUNT (SPIS0_ENABLED + SPIS1_ENABLED + SPIS2_ENABLED) + +/* UART */ +#define UART0_ENABLED 0 + +#if (UART0_ENABLED == 1) +#define UART0_CONFIG_HWFC NRF_UART_HWFC_DISABLED +#define UART0_CONFIG_PARITY NRF_UART_PARITY_EXCLUDED +#define UART0_CONFIG_BAUDRATE NRF_UART_BAUDRATE_115200 +#define UART0_CONFIG_PSEL_TXD 0 +#define UART0_CONFIG_PSEL_RXD 0 +#define UART0_CONFIG_PSEL_CTS 0 +#define UART0_CONFIG_PSEL_RTS 0 +#define UART0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#ifdef NRF52 +#define UART0_CONFIG_USE_EASY_DMA false +//Compile time flag +#define UART_EASY_DMA_SUPPORT 1 +#define UART_LEGACY_SUPPORT 1 +#endif //NRF52 +#endif + +#define TWI0_ENABLED 0 + +#if (TWI0_ENABLED == 1) +#define TWI0_USE_EASY_DMA 0 + +#define TWI0_CONFIG_FREQUENCY NRF_TWI_FREQ_100K +#define TWI0_CONFIG_SCL 0 +#define TWI0_CONFIG_SDA 1 +#define TWI0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define TWI0_INSTANCE_INDEX 0 +#endif + +#define TWI1_ENABLED 0 + +#if (TWI1_ENABLED == 1) +#define TWI1_USE_EASY_DMA 0 + +#define TWI1_CONFIG_FREQUENCY NRF_TWI_FREQ_100K +#define TWI1_CONFIG_SCL 0 +#define TWI1_CONFIG_SDA 1 +#define TWI1_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define TWI1_INSTANCE_INDEX (TWI0_ENABLED) +#endif + +#define TWI_COUNT (TWI0_ENABLED + TWI1_ENABLED) + +/* TWIS */ +#define TWIS0_ENABLED 0 + +#if (TWIS0_ENABLED == 1) + #define TWIS0_CONFIG_ADDR0 0 + #define TWIS0_CONFIG_ADDR1 0 /* 0: Disabled */ + #define TWIS0_CONFIG_SCL 0 + #define TWIS0_CONFIG_SDA 1 + #define TWIS0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + + #define TWIS0_INSTANCE_INDEX 0 +#endif + +#define TWIS1_ENABLED 0 + +#if (TWIS1_ENABLED == 1) + #define TWIS1_CONFIG_ADDR0 0 + #define TWIS1_CONFIG_ADDR1 0 /* 0: Disabled */ + #define TWIS1_CONFIG_SCL 0 + #define TWIS1_CONFIG_SDA 1 + #define TWIS1_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + + #define TWIS1_INSTANCE_INDEX (TWIS0_ENABLED) +#endif + +#define TWIS_COUNT (TWIS0_ENABLED + TWIS1_ENABLED) +/* For more documentation see nrf_drv_twis.h file */ +#define TWIS_ASSUME_INIT_AFTER_RESET_ONLY 0 +/* For more documentation see nrf_drv_twis.h file */ +#define TWIS_NO_SYNC_MODE 0 + +/* QDEC */ +#define QDEC_ENABLED 0 + +#if (QDEC_ENABLED == 1) +#define QDEC_CONFIG_REPORTPER NRF_QDEC_REPORTPER_10 +#define QDEC_CONFIG_SAMPLEPER NRF_QDEC_SAMPLEPER_16384us +#define QDEC_CONFIG_PIO_A 1 +#define QDEC_CONFIG_PIO_B 2 +#define QDEC_CONFIG_PIO_LED 3 +#define QDEC_CONFIG_LEDPRE 511 +#define QDEC_CONFIG_LEDPOL NRF_QDEC_LEPOL_ACTIVE_HIGH +#define QDEC_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#define QDEC_CONFIG_DBFEN false +#define QDEC_CONFIG_SAMPLE_INTEN false +#endif + +/* ADC */ +#define ADC_ENABLED 0 + +#if (ADC_ENABLED == 1) +#define ADC_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#endif + + +/* SAADC */ +#define SAADC_ENABLED 0 + +#if (SAADC_ENABLED == 1) +#define SAADC_CONFIG_RESOLUTION NRF_SAADC_RESOLUTION_10BIT +#define SAADC_CONFIG_OVERSAMPLE NRF_SAADC_OVERSAMPLE_DISABLED +#define SAADC_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#endif + +/* PDM */ +#define PDM_ENABLED 0 + +#if (PDM_ENABLED == 1) +#define PDM_CONFIG_MODE NRF_PDM_MODE_MONO +#define PDM_CONFIG_EDGE NRF_PDM_EDGE_LEFTFALLING +#define PDM_CONFIG_CLOCK_FREQ NRF_PDM_FREQ_1032K +#define PDM_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#endif + +/* COMP */ +#define COMP_ENABLED 0 + +#if (COMP_ENABLED == 1) +#define COMP_CONFIG_REF NRF_COMP_REF_Int1V8 +#define COMP_CONFIG_MAIN_MODE NRF_COMP_MAIN_MODE_SE +#define COMP_CONFIG_SPEED_MODE NRF_COMP_SP_MODE_High +#define COMP_CONFIG_HYST NRF_COMP_HYST_NoHyst +#define COMP_CONFIG_ISOURCE NRF_COMP_ISOURCE_Off +#define COMP_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#define COMP_CONFIG_INPUT NRF_COMP_INPUT_0 +#endif + +/* LPCOMP */ +#define LPCOMP_ENABLED 0 + +#if (LPCOMP_ENABLED == 1) +#define LPCOMP_CONFIG_REFERENCE NRF_LPCOMP_REF_SUPPLY_4_8 +#define LPCOMP_CONFIG_DETECTION NRF_LPCOMP_DETECT_DOWN +#define LPCOMP_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#define LPCOMP_CONFIG_INPUT NRF_LPCOMP_INPUT_0 +#endif + +/* WDT */ +#define WDT_ENABLED 0 + +#if (WDT_ENABLED == 1) +#define WDT_CONFIG_BEHAVIOUR NRF_WDT_BEHAVIOUR_RUN_SLEEP +#define WDT_CONFIG_RELOAD_VALUE 2000 +#define WDT_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_HIGH +#endif + +/* SWI EGU */ +#ifdef NRF52 + #define EGU_ENABLED 0 +#endif + +/* I2S */ +#define I2S_ENABLED 0 + +#if (I2S_ENABLED == 1) +#define I2S_CONFIG_SCK_PIN 22 +#define I2S_CONFIG_LRCK_PIN 23 +#define I2S_CONFIG_MCK_PIN NRF_DRV_I2S_PIN_NOT_USED +#define I2S_CONFIG_SDOUT_PIN 24 +#define I2S_CONFIG_SDIN_PIN 25 +#define I2S_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_HIGH +#define I2S_CONFIG_MASTER NRF_I2S_MODE_MASTER +#define I2S_CONFIG_FORMAT NRF_I2S_FORMAT_I2S +#define I2S_CONFIG_ALIGN NRF_I2S_ALIGN_LEFT +#define I2S_CONFIG_SWIDTH NRF_I2S_SWIDTH_16BIT +#define I2S_CONFIG_CHANNELS NRF_I2S_CHANNELS_STEREO +#define I2S_CONFIG_MCK_SETUP NRF_I2S_MCK_32MDIV8 +#define I2S_CONFIG_RATIO NRF_I2S_RATIO_256X +#endif + +#include "nrf_drv_config_validation.h" + +#endif // NRF_DRV_CONFIG_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/config/nrf_drv_config_validation.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/config/nrf_drv_config_validation.h new file mode 100644 index 0000000000..ece8d94904 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/config/nrf_drv_config_validation.h @@ -0,0 +1,103 @@ +/* + * 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_DRV_CONFIG_VALIDATION_H +#define NRF_DRV_CONFIG_VALIDATION_H + +#ifdef NRF52 + +#if (!PERIPHERAL_RESOURCE_SHARING_ENABLED) && \ + ((SPI0_ENABLED + SPIS0_ENABLED + TWI0_ENABLED + TWIS0_ENABLED) > 1) +#error "Peripherals overlap. SPI0, SPIS0, TWI0, TWIS0 - only one of these can be enabled." +#endif + +#if (!PERIPHERAL_RESOURCE_SHARING_ENABLED) && \ + ((SPI1_ENABLED + SPIS1_ENABLED + TWI1_ENABLED + TWIS1_ENABLED) > 1) +#error "Peripherals overlap. SPI1, SPIS1, TWI1, TWIS1 - only one of these can be enabled." +#endif + +#if (!PERIPHERAL_RESOURCE_SHARING_ENABLED) && \ + ((SPI2_ENABLED + SPIS2_ENABLED) > 1) +#error "Peripherals overlap. SPI2, SPIS2 - only one of these can be enabled." +#endif + +#if (!PERIPHERAL_RESOURCE_SHARING_ENABLED) && \ + ((COMP_ENABLED + LPCOMP_ENABLED) > 1) +#error "COMP and LPCOMP cannot be enabled together. Peripherals overlap." +#endif + +#else //NRF51 + +#if (TWIS0_ENABLED + TWIS1_ENABLED) > 0 +#error "TWIS not present in nRF51." +#endif + +#if SPIS0_ENABLED > 0 +#error "SPIS0 instance not present in nRF51." +#endif + +#if (SPI2_ENABLED + SPIS2_ENABLED) > 0 +#error "SPI2/SPIS2 instance not present in nRF51." +#endif + +#if RTC2_ENABLED +#error "RTC2 not present in NRF51." +#endif + +#if (TIMER3_ENABLED + TIMER4_ENABLED) > 0 +#error "TIMER3 and TIMER4 not present in nRF51." +#endif + +#if (!PERIPHERAL_RESOURCE_SHARING_ENABLED) && \ + ((SPI0_ENABLED + TWI0_ENABLED) > 1) +#error "Peripherals overlap. SPI0, TWI0 - only one of these can be enabled." +#endif + +#if (!PERIPHERAL_RESOURCE_SHARING_ENABLED) && \ + ((SPI1_ENABLED + SPIS1_ENABLED + TWI1_ENABLED) > 1) +#error "Peripherals overlap. SPI1, SPIS1, TWI1 - only one of these can be enabled." +#endif + +#if SAADC_ENABLED > 0 +#error "SAADC not present in nRF51." +#endif + +#if I2S_ENABLED > 0 +#error "I2S not present in nRF51." +#endif +#if COMP_ENABLED > 0 +#error "COMP not present in nRF51." +#endif + +#endif //NRF51 + +#endif // NRF_DRV_CONFIG_VALIDATION_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/delay/nrf_delay.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/delay/nrf_delay.c new file mode 100644 index 0000000000..e8b561a968 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/delay/nrf_delay.c @@ -0,0 +1,26 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include +#include "compiler_abstraction.h" +#include "nrf.h" +#include "nrf_delay.h" + +/*lint --e{438} "Variable not used" */ +void nrf_delay_ms(uint32_t volatile number_of_ms) +{ + while(number_of_ms != 0) + { + number_of_ms--; + nrf_delay_us(999); + } +} diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf_delay.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/delay/nrf_delay.h similarity index 67% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf_delay.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/delay/nrf_delay.h index be65762455..c68bd9a941 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf_delay.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/delay/nrf_delay.h @@ -1,43 +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 #define _NRF_DELAY_H #include "nrf.h" -#ifdef __cplusplus -extern "C" { -#endif /** * @brief Function for delaying execution for number of microseconds. * @@ -194,8 +159,8 @@ __STATIC_INLINE void nrf_delay_us(uint32_t volatile number_of_us) #elif defined ( __GNUC__ ) -__STATIC_INLINE void nrf_delay_us(uint32_t volatile number_of_us) __attribute__((always_inline)); -__STATIC_INLINE void nrf_delay_us(uint32_t volatile number_of_us) +static void __INLINE nrf_delay_us(uint32_t volatile number_of_us) __attribute__((always_inline)); +static void __INLINE nrf_delay_us(uint32_t volatile number_of_us) { register uint32_t delay __ASM ("r0") = number_of_us; __ASM volatile ( @@ -209,8 +174,8 @@ __ASM volatile ( " NOP\n" " NOP\n" " NOP\n" - " NOP\n" - " NOP\n" + " NOP\n" + " NOP\n" " NOP\n" " NOP\n" " NOP\n" @@ -274,7 +239,4 @@ __ASM volatile ( void nrf_delay_ms(uint32_t volatile number_of_ms); -#ifdef __cplusplus -} -#endif #endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.c new file mode 100644 index 0000000000..4a58ee3417 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.c @@ -0,0 +1,93 @@ +/* + * 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. + * + */ + +/** + * @file + * @brief Implementation of AES ECB driver + */ + + +//lint -e438 + +#include +#include +#include +#include "nrf.h" +#include "nrf_ecb.h" + +static uint8_t ecb_data[48]; ///< ECB data structure for RNG peripheral to access. +static uint8_t* ecb_key; ///< Key: Starts at ecb_data +static uint8_t* ecb_cleartext; ///< Cleartext: Starts at ecb_data + 16 bytes. +static uint8_t* ecb_ciphertext; ///< Ciphertext: Starts at ecb_data + 32 bytes. + +bool nrf_ecb_init(void) +{ + ecb_key = ecb_data; + ecb_cleartext = ecb_data + 16; + ecb_ciphertext = ecb_data + 32; + + NRF_ECB->ECBDATAPTR = (uint32_t)ecb_data; + return true; +} + + +bool nrf_ecb_crypt(uint8_t * dest_buf, const uint8_t * src_buf) +{ + uint32_t counter = 0x1000000; + if(src_buf != ecb_cleartext) + { + memcpy(ecb_cleartext,src_buf,16); + } + NRF_ECB->EVENTS_ENDECB = 0; + NRF_ECB->TASKS_STARTECB = 1; + while(NRF_ECB->EVENTS_ENDECB == 0) + { + counter--; + if(counter == 0) + { + return false; + } + } + NRF_ECB->EVENTS_ENDECB = 0; + if(dest_buf != ecb_ciphertext) + { + memcpy(dest_buf,ecb_ciphertext,16); + } + return true; +} + +void nrf_ecb_set_key(const uint8_t * key) +{ + memcpy(ecb_key,key,16); +} + + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.h new file mode 100644 index 0000000000..85c21ffbb1 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.h @@ -0,0 +1,85 @@ +/* + * 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. + * + */ + +/** + * @file + * @brief ECB driver API. + */ + +#ifndef NRF_ECB_H__ +#define NRF_ECB_H__ + +/** + * @defgroup nrf_ecb AES ECB encryption + * @{ + * @ingroup nrf_drivers + * @brief Driver for the AES Electronic Code Book (ECB) peripheral. + * + * To encrypt and decrypt data, the peripheral must first be powered on + * using @ref nrf_ecb_init. Next, the key must be set using @ref nrf_ecb_set_key. + */ + +#include + +/** + * @brief Function for initializing and powering on the ECB peripheral. + * + * This function allocates memory for the ECBDATAPTR. + * @retval true If initialization was successful. + * @retval false If powering on failed. + */ +bool nrf_ecb_init(void); + +/** + * @brief Function for encrypting and decrypting 16-byte data using current key. + * + * This function avoids unnecessary copying of data if the parameters point to the + * correct locations in the ECB data structure. + * + * @param dst Result of encryption/decryption. 16 bytes will be written. + * @param src Source with 16-byte data to be encrypted/decrypted. + * + * @retval true If the encryption operation completed. + * @retval false If the encryption operation did not complete. + */ +bool nrf_ecb_crypt(uint8_t * dst, const uint8_t * src); + +/** + * @brief Function for setting the key to be used for encryption and decryption. + * + * @param key Pointer to the key. 16 bytes will be read. + */ +void nrf_ecb_set_key(const uint8_t * key); + +#endif // NRF_ECB_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpio.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpio.h new file mode 100644 index 0000000000..5f95a48912 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpio.h @@ -0,0 +1,667 @@ +/* + * 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_GPIO_H__ +#define NRF_GPIO_H__ + +#include "nrf.h" +#include + +/** + * @defgroup nrf_gpio GPIO abstraction + * @{ + * @ingroup nrf_drivers + * @brief GPIO pin abstraction and port abstraction for reading and writing byte-wise to GPIO ports. + * + * Here, the GPIO ports are defined as follows: + * - Port 0 -> pin 0-7 + * - Port 1 -> pin 8-15 + * - Port 2 -> pin 16-23 + * - Port 3 -> pin 24-31 + */ + +#define NUMBER_OF_PINS 32 + +/** + * @brief Enumerator used for selecting between port 0 - 3. + */ +typedef enum +{ + NRF_GPIO_PORT_SELECT_PORT0 = 0, ///< Port 0 (GPIO pin 0-7) + NRF_GPIO_PORT_SELECT_PORT1, ///< Port 1 (GPIO pin 8-15) + NRF_GPIO_PORT_SELECT_PORT2, ///< Port 2 (GPIO pin 16-23) + NRF_GPIO_PORT_SELECT_PORT3, ///< Port 3 (GPIO pin 24-31) +} nrf_gpio_port_select_t; + +/** + * @brief Enumerator used for setting the direction of a GPIO port. + */ +typedef enum +{ + NRF_GPIO_PORT_DIR_OUTPUT, ///< Output + NRF_GPIO_PORT_DIR_INPUT ///< Input +} nrf_gpio_port_dir_t; + +/** + * @brief Pin direction definitions. + */ +typedef enum +{ + NRF_GPIO_PIN_DIR_INPUT = GPIO_PIN_CNF_DIR_Input, ///< Input + NRF_GPIO_PIN_DIR_OUTPUT = GPIO_PIN_CNF_DIR_Output ///< Output +} nrf_gpio_pin_dir_t; + +/** + * @brief Connection of input buffer + */ +typedef enum +{ + NRF_GPIO_PIN_INPUT_CONNECT = GPIO_PIN_CNF_INPUT_Connect, ///< Connect input buffer + NRF_GPIO_PIN_INPUT_DISCONNECT = GPIO_PIN_CNF_INPUT_Disconnect ///< Disconnect input buffer +} nrf_gpio_pin_input_t; + +/** + * @brief Enumerator used for selecting the pin to be pulled down or up at the time of pin configuration + */ +typedef enum +{ + NRF_GPIO_PIN_NOPULL = GPIO_PIN_CNF_PULL_Disabled, ///< Pin pullup resistor disabled + NRF_GPIO_PIN_PULLDOWN = GPIO_PIN_CNF_PULL_Pulldown, ///< Pin pulldown resistor enabled + NRF_GPIO_PIN_PULLUP = GPIO_PIN_CNF_PULL_Pullup, ///< Pin pullup resistor enabled +} nrf_gpio_pin_pull_t; + +/** + * @brief Enumerator used for selecting output drive mode + */ +typedef enum +{ + NRF_GPIO_PIN_S0S1 = GPIO_PIN_CNF_DRIVE_S0S1, ///< !< Standard '0', standard '1' + NRF_GPIO_PIN_H0S1 = GPIO_PIN_CNF_DRIVE_H0S1, ///< !< High drive '0', standard '1' + NRF_GPIO_PIN_S0H1 = GPIO_PIN_CNF_DRIVE_S0H1, ///< !< Standard '0', high drive '1' + NRF_GPIO_PIN_H0H1 = GPIO_PIN_CNF_DRIVE_H0H1, ///< !< High drive '0', high 'drive '1'' + NRF_GPIO_PIN_D0S1 = GPIO_PIN_CNF_DRIVE_D0S1, ///< !< Disconnect '0' standard '1' + NRF_GPIO_PIN_D0H1 = GPIO_PIN_CNF_DRIVE_D0H1, ///< !< Disconnect '0', high drive '1' + NRF_GPIO_PIN_S0D1 = GPIO_PIN_CNF_DRIVE_S0D1, ///< !< Standard '0'. disconnect '1' + NRF_GPIO_PIN_H0D1 = GPIO_PIN_CNF_DRIVE_H0D1, ///< !< High drive '0', disconnect '1' +} nrf_gpio_pin_drive_t; + +/** + * @brief Enumerator used for selecting the pin to sense high or low level on the pin input. + */ +typedef enum +{ + NRF_GPIO_PIN_NOSENSE = GPIO_PIN_CNF_SENSE_Disabled, ///< Pin sense level disabled. + NRF_GPIO_PIN_SENSE_LOW = GPIO_PIN_CNF_SENSE_Low, ///< Pin sense low level. + NRF_GPIO_PIN_SENSE_HIGH = GPIO_PIN_CNF_SENSE_High, ///< Pin sense high level. +} nrf_gpio_pin_sense_t; + + +/** + * @brief Function for configuring the GPIO pin range as outputs with normal drive strength. + * This function can be used to configure pin range as simple output with gate driving GPIO_PIN_CNF_DRIVE_S0S1 (normal cases). + * + * @param pin_range_start specifies the start number (inclusive) in the range of pin numbers to be configured (allowed values 0-30) + * + * @param pin_range_end specifies the end number (inclusive) in the range of pin numbers to be configured (allowed values 0-30) + * + * @note For configuring only one pin as output use @ref nrf_gpio_cfg_output + * Sense capability on the pin is disabled, and input is disconnected from the buffer as the pins are configured as output. + */ +__STATIC_INLINE void nrf_gpio_range_cfg_output(uint32_t pin_range_start, uint32_t pin_range_end); + +/** + * @brief Function for configuring the GPIO pin range as inputs with given initial value set, hiding inner details. + * This function can be used to configure pin range as simple input. + * + * @param pin_range_start specifies the start number (inclusive) in the range of pin numbers to be configured (allowed values 0-30) + * + * @param pin_range_end specifies the end number (inclusive) in the range of pin numbers to be configured (allowed values 0-30) + * + * @param pull_config State of the pin range pull resistor (no pull, pulled down or pulled high) + * + * @note For configuring only one pin as input use @ref nrf_gpio_cfg_input + * Sense capability on the pin is disabled, and input is connected to buffer so that the GPIO->IN register is readable + */ +__STATIC_INLINE void nrf_gpio_range_cfg_input(uint32_t pin_range_start, uint32_t pin_range_end, nrf_gpio_pin_pull_t pull_config); + +/** + * @brief Pin configuration function + * + * The main pin configuration function. + * This function allows to set any aspect in PIN_CNF register. + * @param pin_number Specifies the pin number (allowed values 0-31). + * @param dir Pin direction + * @param input Connect or disconnect input buffer + * @param pull Pull configuration + * @param drive Drive configuration + * @param sense Pin sensing mechanism + */ +__STATIC_INLINE void nrf_gpio_cfg( + uint32_t pin_number, + nrf_gpio_pin_dir_t dir, + nrf_gpio_pin_input_t input, + nrf_gpio_pin_pull_t pull, + nrf_gpio_pin_drive_t drive, + nrf_gpio_pin_sense_t sense); + +/** + * @brief Function for configuring the given GPIO pin number as output with given initial value set, hiding inner details. + * This function can be used to configure pin range as simple input with gate driving GPIO_PIN_CNF_DRIVE_S0S1 (normal cases). + * + * @param pin_number specifies the pin number (allowed values 0-31) + * + * @note Sense capability on the pin is disabled, and input is disconnected from the buffer as the pins are configured as output. + */ +__STATIC_INLINE void nrf_gpio_cfg_output(uint32_t pin_number); + +/** + * @brief Function for configuring the given GPIO pin number as input with given initial value set, hiding inner details. + * This function can be used to configure pin range as simple input with gate driving GPIO_PIN_CNF_DRIVE_S0S1 (normal cases). + * + * @param pin_number Specifies the pin number (allowed values 0-30). + * @param pull_config State of the pin range pull resistor (no pull, pulled down or pulled high). + * + * @note Sense capability on the pin is disabled, and input is connected to buffer so that the GPIO->IN register is readable + */ +__STATIC_INLINE void nrf_gpio_cfg_input(uint32_t pin_number, nrf_gpio_pin_pull_t pull_config); + +/** + * @brief Function for reseting pin configuration to its default state. + * + * @param pin_number Specifies the pin number (allowed values 0-31). + */ +__STATIC_INLINE void nrf_gpio_cfg_default(uint32_t pin_number); + +/** + * @brief Function for configuring the given GPIO pin number as a watcher. Only input is connected. + * + * @param pin_number Specifies the pin number (allowed values 0-31). + * + */ +__STATIC_INLINE void nrf_gpio_cfg_watcher(uint32_t pin_number); + +/** + * @brief Function for disconnecting input for the given GPIO. + * + * @param pin_number Specifies the pin number (allowed values 0-31). + * + */ +__STATIC_INLINE void nrf_gpio_input_disconnect(uint32_t pin_number); + +/** + * @brief Function for configuring the given GPIO pin number as input with given initial value set, hiding inner details. + * This function can be used to configure pin range as simple input with gate driving GPIO_PIN_CNF_DRIVE_S0S1 (normal cases). + * Sense capability on the pin is configurable, and input is connected to buffer so that the GPIO->IN register is readable. + * + * @param pin_number Specifies the pin number (allowed values 0-30). + * @param pull_config State of the pin pull resistor (no pull, pulled down or pulled high). + * @param sense_config Sense level of the pin (no sense, sense low or sense high). + */ +__STATIC_INLINE void nrf_gpio_cfg_sense_input(uint32_t pin_number, nrf_gpio_pin_pull_t pull_config, nrf_gpio_pin_sense_t sense_config); + +/** + * @brief Function for configuring sense level for the given GPIO. + * + * @param pin_number Specifies the pin number of gpio pin numbers to be configured (allowed values 0-30). + * @param sense_config Sense configuration. + * + */ +__STATIC_INLINE void nrf_gpio_cfg_sense_set(uint32_t pin_number, nrf_gpio_pin_sense_t sense_config); + +/** + * @brief Function for setting the direction for a GPIO pin. + * + * @param pin_number specifies the pin number (0-31) for which to + * set the direction. + * + * @param direction specifies the direction + */ +__STATIC_INLINE void nrf_gpio_pin_dir_set(uint32_t pin_number, nrf_gpio_pin_dir_t direction); + +/** + * @brief Function for setting a GPIO pin. + * + * Note that the pin must be configured as an output for this + * function to have any effect. + * + * @param pin_number Specifies the pin number (0-31) to set. + */ +__STATIC_INLINE void nrf_gpio_pin_set(uint32_t pin_number); + +/** + * @brief Function for setting GPIO pins. + * + * Note that the pins must be configured as outputs for this + * function to have any effect. + * + * @param pin_mask Specifies the pins to set. + */ +__STATIC_INLINE void nrf_gpio_pins_set(uint32_t pin_mask); + +/** + * @brief Function for clearing a GPIO pin. + * + * Note that the pin must be configured as an output for this + * function to have any effect. + * + * @param pin_number Specifies the pin number (0-31) to clear. + */ +__STATIC_INLINE void nrf_gpio_pin_clear(uint32_t pin_number); + +/** + * @brief Function for clearing GPIO pins. + * + * Note that the pins must be configured as outputs for this + * function to have any effect. + * + * @param pin_mask Specifies the pins to clear. + */ +__STATIC_INLINE void nrf_gpio_pins_clear(uint32_t pin_mask); + +/** + * @brief Function for toggling a GPIO pin. + * + * Note that the pin must be configured as an output for this + * function to have any effect. + * + * @param pin_number Specifies the pin number (0-31) to toggle. + */ +__STATIC_INLINE void nrf_gpio_pin_toggle(uint32_t pin_number); + +/** + * @brief Function for toggling GPIO pins. + * + * Note that the pins must be configured as outputs for this + * function to have any effect. + * + * @param pin_mask Specifies the pins to toggle. + */ +__STATIC_INLINE void nrf_gpio_pins_toggle(uint32_t pin_mask); + +/** + * @brief Function for writing a value to a GPIO pin. + * + * Note that the pin must be configured as an output for this + * function to have any effect. + * + * @param pin_number specifies the pin number (0-31) to + * write. + * + * @param value specifies the value to be written to the pin. + * @arg 0 clears the pin + * @arg >=1 sets the pin. + */ +__STATIC_INLINE void nrf_gpio_pin_write(uint32_t pin_number, uint32_t value); + +/** + * @brief Function for reading the input level of a GPIO pin. + * + * Note that the pin must have input connected for the value + * returned from this function to be valid. + * + * @param pin_number specifies the pin number (0-31) to + * read. + * + * @return + * @retval 0 if the pin input level is low. + * @retval 1 if the pin input level is high. + * @retval > 1 should never occur. + */ +__STATIC_INLINE uint32_t nrf_gpio_pin_read(uint32_t pin_number); + +/** + * @brief Function for reading the input level of all GPIO pins. + * + * Note that the pin must have input connected for the value + * returned from this function to be valid. + * + * @retval Status of input of all pins + */ +__STATIC_INLINE uint32_t nrf_gpio_pins_read(void); + +/** + * @brief Function for reading the sense configuration of a GPIO pin. + * + * @param pin_number specifies the pin number (0-31) to + * read. + * + * @retval Sense configuration + */ +__STATIC_INLINE nrf_gpio_pin_sense_t nrf_gpio_pin_sense_get(uint32_t pin_number); + +/** + * @brief Generic function for writing a single byte of a 32 bit word at a given + * address. + * + * This function should not be called from outside the nrf_gpio + * abstraction layer. + * + * @param word_address is the address of the word to be written. + * + * @param byte_no is the word byte number (0-3) to be written. + * + * @param value is the value to be written to byte "byte_no" of word + * at address "word_address" + */ +__STATIC_INLINE void nrf_gpio_word_byte_write(volatile uint32_t * word_address, uint8_t byte_no, uint8_t value); + +/** + * @brief Generic function for reading a single byte of a 32 bit word at a given + * address. + * + * This function should not be called from outside the nrf_gpio + * abstraction layer. + * + * @param word_address is the address of the word to be read. + * + * @param byte_no is the byte number (0-3) of the word to be read. + * + * @return byte "byte_no" of word at address "word_address". + */ +__STATIC_INLINE uint8_t nrf_gpio_word_byte_read(const volatile uint32_t* word_address, uint8_t byte_no); + +/** + * @brief Function for setting the direction of a port. + * + * @param port is the port for which to set the direction. + * + * @param dir direction to be set for this port. + */ +__STATIC_INLINE void nrf_gpio_port_dir_set(nrf_gpio_port_select_t port, nrf_gpio_port_dir_t dir); + +/** + * @brief Function for reading a GPIO port. + * + * @param port is the port to read. + * + * @return the input value on this port. + */ +__STATIC_INLINE uint8_t nrf_gpio_port_read(nrf_gpio_port_select_t port); + +/** + * @brief Function for writing to a GPIO port. + * + * @param port is the port to write. + * + * @param value is the value to write to this port. + * + * @sa nrf_gpio_port_dir_set() + */ +__STATIC_INLINE void nrf_gpio_port_write(nrf_gpio_port_select_t port, uint8_t value); + +/** + * @brief Function for setting individual pins on GPIO port. + * + * @param port is the port for which to set the pins. + * + * @param set_mask is a mask specifying which pins to set. A bit + * set to 1 indicates that the corresponding port pin shall be + * set. + * + * @sa nrf_gpio_port_dir_set() + */ +__STATIC_INLINE void nrf_gpio_port_set(nrf_gpio_port_select_t port, uint8_t set_mask); + +/** + * @brief Function for clearing individual pins on GPIO port. + * + * @param port is the port for which to clear the pins. + * + * @param clr_mask is a mask specifying which pins to clear. A bit + * set to 1 indicates that the corresponding port pin shall be + * cleared. + * + * @sa nrf_gpio_port_dir_set() + */ +__STATIC_INLINE void nrf_gpio_port_clear(nrf_gpio_port_select_t port, uint8_t clr_mask); + +#ifndef SUPPRESS_INLINE_IMPLEMENTATION +__STATIC_INLINE void nrf_gpio_range_cfg_output(uint32_t pin_range_start, uint32_t pin_range_end) +{ + /*lint -e{845} // A zero has been given as right argument to operator '|'" */ + for (; pin_range_start <= pin_range_end; pin_range_start++) + { + nrf_gpio_cfg_output(pin_range_start); + } +} + +__STATIC_INLINE void nrf_gpio_range_cfg_input(uint32_t pin_range_start, uint32_t pin_range_end, nrf_gpio_pin_pull_t pull_config) +{ + /*lint -e{845} // A zero has been given as right argument to operator '|'" */ + for (; pin_range_start <= pin_range_end; pin_range_start++) + { + nrf_gpio_cfg_input(pin_range_start, pull_config); + } +} + +__STATIC_INLINE void nrf_gpio_cfg( + uint32_t pin_number, + nrf_gpio_pin_dir_t dir, + nrf_gpio_pin_input_t input, + nrf_gpio_pin_pull_t pull, + nrf_gpio_pin_drive_t drive, + nrf_gpio_pin_sense_t sense) +{ + NRF_GPIO->PIN_CNF[pin_number] = ((uint32_t)dir << GPIO_PIN_CNF_DIR_Pos) + | ((uint32_t)input << GPIO_PIN_CNF_INPUT_Pos) + | ((uint32_t)pull << GPIO_PIN_CNF_PULL_Pos) + | ((uint32_t)drive << GPIO_PIN_CNF_DRIVE_Pos) + | ((uint32_t)sense << GPIO_PIN_CNF_SENSE_Pos); +} + +__STATIC_INLINE void nrf_gpio_cfg_output(uint32_t pin_number) +{ + nrf_gpio_cfg( + pin_number, + NRF_GPIO_PIN_DIR_OUTPUT, + NRF_GPIO_PIN_INPUT_DISCONNECT, + NRF_GPIO_PIN_NOPULL, + NRF_GPIO_PIN_S0S1, + NRF_GPIO_PIN_NOSENSE); +} + +__STATIC_INLINE void nrf_gpio_cfg_input(uint32_t pin_number, nrf_gpio_pin_pull_t pull_config) +{ + nrf_gpio_cfg( + pin_number, + NRF_GPIO_PIN_DIR_INPUT, + NRF_GPIO_PIN_INPUT_CONNECT, + pull_config, + NRF_GPIO_PIN_S0S1, + NRF_GPIO_PIN_NOSENSE); +} + +__STATIC_INLINE void nrf_gpio_cfg_default(uint32_t pin_number) +{ + nrf_gpio_cfg( + pin_number, + NRF_GPIO_PIN_DIR_INPUT, + NRF_GPIO_PIN_INPUT_DISCONNECT, + NRF_GPIO_PIN_NOPULL, + NRF_GPIO_PIN_S0S1, + NRF_GPIO_PIN_NOSENSE); +} + +__STATIC_INLINE void nrf_gpio_cfg_watcher(uint32_t pin_number) +{ + /*lint -e{845} // A zero has been given as right argument to operator '|'" */ + uint32_t cnf = NRF_GPIO->PIN_CNF[pin_number] & ~GPIO_PIN_CNF_INPUT_Msk; + NRF_GPIO->PIN_CNF[pin_number] = cnf | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos); +} + +__STATIC_INLINE void nrf_gpio_input_disconnect(uint32_t pin_number) +{ + /*lint -e{845} // A zero has been given as right argument to operator '|'" */ + uint32_t cnf = NRF_GPIO->PIN_CNF[pin_number] & ~GPIO_PIN_CNF_INPUT_Msk; + NRF_GPIO->PIN_CNF[pin_number] = cnf | (GPIO_PIN_CNF_INPUT_Disconnect << GPIO_PIN_CNF_INPUT_Pos); +} + +__STATIC_INLINE void nrf_gpio_cfg_sense_input(uint32_t pin_number, nrf_gpio_pin_pull_t pull_config, nrf_gpio_pin_sense_t sense_config) +{ + nrf_gpio_cfg( + pin_number, + NRF_GPIO_PIN_DIR_INPUT, + NRF_GPIO_PIN_INPUT_CONNECT, + pull_config, + NRF_GPIO_PIN_S0S1, + sense_config); +} + +__STATIC_INLINE void nrf_gpio_cfg_sense_set(uint32_t pin_number, nrf_gpio_pin_sense_t sense_config) +{ + /*lint -e{845} // A zero has been given as right argument to operator '|'" */ + //uint32_t cnf = NRF_GPIO->PIN_CNF[pin_number] & ~GPIO_PIN_CNF_SENSE_Msk; + NRF_GPIO->PIN_CNF[pin_number] &= ~GPIO_PIN_CNF_SENSE_Msk; + NRF_GPIO->PIN_CNF[pin_number] |= (sense_config << GPIO_PIN_CNF_SENSE_Pos); +} + +__STATIC_INLINE void nrf_gpio_pin_dir_set(uint32_t pin_number, nrf_gpio_pin_dir_t direction) +{ + if(direction == NRF_GPIO_PIN_DIR_INPUT) + { + nrf_gpio_cfg( + pin_number, + NRF_GPIO_PIN_DIR_INPUT, + NRF_GPIO_PIN_INPUT_CONNECT, + NRF_GPIO_PIN_NOPULL, + NRF_GPIO_PIN_S0S1, + NRF_GPIO_PIN_NOSENSE); + } + else + { + NRF_GPIO->DIRSET = (1UL << pin_number); + } +} + +__STATIC_INLINE void nrf_gpio_pin_set(uint32_t pin_number) +{ + NRF_GPIO->OUTSET = (1UL << pin_number); +} + +__STATIC_INLINE void nrf_gpio_pins_set(uint32_t pin_mask) +{ + NRF_GPIO->OUTSET = pin_mask; +} + +__STATIC_INLINE void nrf_gpio_pin_clear(uint32_t pin_number) +{ + NRF_GPIO->OUTCLR = (1UL << pin_number); +} + +__STATIC_INLINE void nrf_gpio_pins_clear(uint32_t pin_mask) +{ + NRF_GPIO->OUTCLR = pin_mask; +} + +__STATIC_INLINE void nrf_gpio_pin_toggle(uint32_t pin_number) +{ + nrf_gpio_pins_toggle(1UL << pin_number); +} + +__STATIC_INLINE void nrf_gpio_pins_toggle(uint32_t pin_mask) +{ + uint32_t pins_state = NRF_GPIO->OUT; + NRF_GPIO->OUTSET = (~pins_state & pin_mask); + NRF_GPIO->OUTCLR = ( pins_state & pin_mask); +} + +__STATIC_INLINE void nrf_gpio_pin_write(uint32_t pin_number, uint32_t value) +{ + if (value == 0) + { + nrf_gpio_pin_clear(pin_number); + } + else + { + nrf_gpio_pin_set(pin_number); + } +} + +__STATIC_INLINE uint32_t nrf_gpio_pin_read(uint32_t pin_number) +{ + return ((NRF_GPIO->IN >> pin_number) & 1UL); +} + +__STATIC_INLINE uint32_t nrf_gpio_pins_read(void) +{ + return NRF_GPIO->IN; +} + +__STATIC_INLINE nrf_gpio_pin_sense_t nrf_gpio_pin_sense_get(uint32_t pin_number) +{ + return (nrf_gpio_pin_sense_t)((NRF_GPIO->PIN_CNF[pin_number] & GPIO_PIN_CNF_SENSE_Msk) >> GPIO_PIN_CNF_SENSE_Pos); +} + +__STATIC_INLINE void nrf_gpio_word_byte_write(volatile uint32_t * word_address, uint8_t byte_no, uint8_t value) +{ + *((volatile uint8_t*)(word_address) + byte_no) = value; +} + +__STATIC_INLINE uint8_t nrf_gpio_word_byte_read(const volatile uint32_t* word_address, uint8_t byte_no) +{ + return (*((const volatile uint8_t*)(word_address) + byte_no)); +} + +__STATIC_INLINE void nrf_gpio_port_dir_set(nrf_gpio_port_select_t port, nrf_gpio_port_dir_t dir) +{ + if (dir == NRF_GPIO_PORT_DIR_OUTPUT) + { + nrf_gpio_word_byte_write(&NRF_GPIO->DIRSET, port, 0xFF); + } + else + { + nrf_gpio_range_cfg_input(port*8, (port+1)*8-1, NRF_GPIO_PIN_NOPULL); + } +} + +__STATIC_INLINE uint8_t nrf_gpio_port_read(nrf_gpio_port_select_t port) +{ + return nrf_gpio_word_byte_read(&NRF_GPIO->IN, port); +} + +__STATIC_INLINE void nrf_gpio_port_write(nrf_gpio_port_select_t port, uint8_t value) +{ + nrf_gpio_word_byte_write(&NRF_GPIO->OUT, port, value); +} + +__STATIC_INLINE void nrf_gpio_port_set(nrf_gpio_port_select_t port, uint8_t set_mask) +{ + nrf_gpio_word_byte_write(&NRF_GPIO->OUTSET, port, set_mask); +} + +__STATIC_INLINE void nrf_gpio_port_clear(nrf_gpio_port_select_t port, uint8_t clr_mask) +{ + nrf_gpio_word_byte_write(&NRF_GPIO->OUTCLR, port, clr_mask); +} +#endif //SUPPRESS_INLINE_IMPLEMENTATION +/** @} */ + +#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpiote.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpiote.h new file mode 100644 index 0000000000..405559ff0e --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpiote.h @@ -0,0 +1,411 @@ +/* + * 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_GPIOTE_H__ +#define NRF_GPIOTE_H__ + +#include "nrf.h" +#include +#include +#include + +/** +* @defgroup nrf_gpiote_abs GPIOTE abstraction +* @{ +* @ingroup nrf_gpiote +* @brief GPIOTE abstraction for configuration of channels. +*/ +#ifdef NRF51 +#define NUMBER_OF_GPIO_TE 4 +#elif defined(NRF52) +#define NUMBER_OF_GPIO_TE 8 +#else +#error "Chip family not specified" +#endif + + /** + * @enum nrf_gpiote_polarity_t + * @brief Polarity for the GPIOTE channel. + */ +typedef enum +{ + NRF_GPIOTE_POLARITY_LOTOHI = GPIOTE_CONFIG_POLARITY_LoToHi, ///< Low to high. + NRF_GPIOTE_POLARITY_HITOLO = GPIOTE_CONFIG_POLARITY_HiToLo, ///< High to low. + NRF_GPIOTE_POLARITY_TOGGLE = GPIOTE_CONFIG_POLARITY_Toggle ///< Toggle. +} nrf_gpiote_polarity_t; + + + /** + * @enum nrf_gpiote_outinit_t + * @brief Initial output value for the GPIOTE channel. + */ +typedef enum +{ + NRF_GPIOTE_INITIAL_VALUE_LOW = GPIOTE_CONFIG_OUTINIT_Low, ///< Low to high. + NRF_GPIOTE_INITIAL_VALUE_HIGH = GPIOTE_CONFIG_OUTINIT_High ///< High to low. +} nrf_gpiote_outinit_t; + +/** + * @brief Tasks. + */ +typedef enum /*lint -save -e30 -esym(628,__INTADDR__) */ +{ + NRF_GPIOTE_TASKS_OUT_0 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[0]), /**< Out task 0.*/ + NRF_GPIOTE_TASKS_OUT_1 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[1]), /**< Out task 1.*/ + NRF_GPIOTE_TASKS_OUT_2 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[2]), /**< Out task 2.*/ + NRF_GPIOTE_TASKS_OUT_3 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[3]), /**< Out task 3.*/ +#if (NUMBER_OF_GPIO_TE == 8) + NRF_GPIOTE_TASKS_OUT_4 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[4]), /**< Out task 4.*/ + NRF_GPIOTE_TASKS_OUT_5 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[5]), /**< Out task 5.*/ + NRF_GPIOTE_TASKS_OUT_6 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[6]), /**< Out task 6.*/ + NRF_GPIOTE_TASKS_OUT_7 = offsetof(NRF_GPIOTE_Type, TASKS_OUT[7]), /**< Out task 7.*/ +#endif +#ifdef NRF52 + NRF_GPIOTE_TASKS_SET_0 = offsetof(NRF_GPIOTE_Type, TASKS_SET[0]), /**< Set task 0.*/ + NRF_GPIOTE_TASKS_SET_1 = offsetof(NRF_GPIOTE_Type, TASKS_SET[1]), /**< Set task 1.*/ + NRF_GPIOTE_TASKS_SET_2 = offsetof(NRF_GPIOTE_Type, TASKS_SET[2]), /**< Set task 2.*/ + NRF_GPIOTE_TASKS_SET_3 = offsetof(NRF_GPIOTE_Type, TASKS_SET[3]), /**< Set task 3.*/ + NRF_GPIOTE_TASKS_SET_4 = offsetof(NRF_GPIOTE_Type, TASKS_SET[4]), /**< Set task 4.*/ + NRF_GPIOTE_TASKS_SET_5 = offsetof(NRF_GPIOTE_Type, TASKS_SET[5]), /**< Set task 5.*/ + NRF_GPIOTE_TASKS_SET_6 = offsetof(NRF_GPIOTE_Type, TASKS_SET[6]), /**< Set task 6.*/ + NRF_GPIOTE_TASKS_SET_7 = offsetof(NRF_GPIOTE_Type, TASKS_SET[7]), /**< Set task 7.*/ + NRF_GPIOTE_TASKS_CLR_0 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[0]), /**< Clear task 0.*/ + NRF_GPIOTE_TASKS_CLR_1 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[1]), /**< Clear task 1.*/ + NRF_GPIOTE_TASKS_CLR_2 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[2]), /**< Clear task 2.*/ + NRF_GPIOTE_TASKS_CLR_3 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[3]), /**< Clear task 3.*/ + NRF_GPIOTE_TASKS_CLR_4 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[4]), /**< Clear task 4.*/ + NRF_GPIOTE_TASKS_CLR_5 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[5]), /**< Clear task 5.*/ + NRF_GPIOTE_TASKS_CLR_6 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[6]), /**< Clear task 6.*/ + NRF_GPIOTE_TASKS_CLR_7 = offsetof(NRF_GPIOTE_Type, TASKS_CLR[7]), /**< Clear task 7.*/ +#endif + /*lint -restore*/ +} nrf_gpiote_tasks_t; + +/** + * @brief Events. + */ +typedef enum /*lint -save -e30 -esym(628,__INTADDR__) */ +{ + NRF_GPIOTE_EVENTS_IN_0 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[0]), /**< In event 0.*/ + NRF_GPIOTE_EVENTS_IN_1 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[1]), /**< In event 1.*/ + NRF_GPIOTE_EVENTS_IN_2 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[2]), /**< In event 2.*/ + NRF_GPIOTE_EVENTS_IN_3 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[3]), /**< In event 3.*/ +#if (NUMBER_OF_GPIO_TE == 8) + NRF_GPIOTE_EVENTS_IN_4 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[4]), /**< In event 4.*/ + NRF_GPIOTE_EVENTS_IN_5 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[5]), /**< In event 5.*/ + NRF_GPIOTE_EVENTS_IN_6 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[6]), /**< In event 6.*/ + NRF_GPIOTE_EVENTS_IN_7 = offsetof(NRF_GPIOTE_Type, EVENTS_IN[7]), /**< In event 7.*/ +#endif + NRF_GPIOTE_EVENTS_PORT = offsetof(NRF_GPIOTE_Type, EVENTS_PORT), /**< Port event.*/ + /*lint -restore*/ +} nrf_gpiote_events_t; + +/** + * @enum nrf_gpiote_int_t + * @brief GPIOTE interrupts. + */ +typedef enum +{ + NRF_GPIOTE_INT_IN0_MASK = GPIOTE_INTENSET_IN0_Msk, /**< GPIOTE interrupt from IN0. */ + NRF_GPIOTE_INT_IN1_MASK = GPIOTE_INTENSET_IN1_Msk, /**< GPIOTE interrupt from IN1. */ + NRF_GPIOTE_INT_IN2_MASK = GPIOTE_INTENSET_IN2_Msk, /**< GPIOTE interrupt from IN2. */ + NRF_GPIOTE_INT_IN3_MASK = GPIOTE_INTENSET_IN3_Msk, /**< GPIOTE interrupt from IN3. */ +#if (NUMBER_OF_GPIO_TE == 8) + NRF_GPIOTE_INT_IN4_MASK = GPIOTE_INTENSET_IN4_Msk, /**< GPIOTE interrupt from IN4. */ + NRF_GPIOTE_INT_IN5_MASK = GPIOTE_INTENSET_IN5_Msk, /**< GPIOTE interrupt from IN5. */ + NRF_GPIOTE_INT_IN6_MASK = GPIOTE_INTENSET_IN6_Msk, /**< GPIOTE interrupt from IN6. */ + NRF_GPIOTE_INT_IN7_MASK = GPIOTE_INTENSET_IN7_Msk, /**< GPIOTE interrupt from IN7. */ +#endif + NRF_GPIOTE_INT_PORT_MASK = (int)GPIOTE_INTENSET_PORT_Msk, /**< GPIOTE interrupt from PORT event. */ +} nrf_gpiote_int_t; + +#if (NUMBER_OF_GPIO_TE == 4) +#define NRF_GPIOTE_INT_IN_MASK (NRF_GPIOTE_INT_IN0_MASK | NRF_GPIOTE_INT_IN1_MASK |\ + NRF_GPIOTE_INT_IN2_MASK | NRF_GPIOTE_INT_IN3_MASK) +#elif (NUMBER_OF_GPIO_TE == 8) +#define NRF_GPIOTE_INT_IN_MASK (NRF_GPIOTE_INT_IN0_MASK | NRF_GPIOTE_INT_IN1_MASK |\ + NRF_GPIOTE_INT_IN2_MASK | NRF_GPIOTE_INT_IN3_MASK |\ + NRF_GPIOTE_INT_IN4_MASK | NRF_GPIOTE_INT_IN5_MASK |\ + NRF_GPIOTE_INT_IN6_MASK | NRF_GPIOTE_INT_IN7_MASK) +#else +#error "Unexpected number of GPIO Tasks and Events" +#endif +/** + * @brief Function for activating a specific GPIOTE task. + * + * @param[in] task Task. + */ +__STATIC_INLINE void nrf_gpiote_task_set(nrf_gpiote_tasks_t task); + +/** + * @brief Function for getting the address of a specific GPIOTE task. + * + * @param[in] task Task. + * + * @returns Address. + */ +__STATIC_INLINE uint32_t nrf_gpiote_task_addr_get(nrf_gpiote_tasks_t task); + +/** + * @brief Function for getting the state of a specific GPIOTE event. + * + * @param[in] event Event. + */ +__STATIC_INLINE bool nrf_gpiote_event_is_set(nrf_gpiote_events_t event); + +/** + * @brief Function for clearing a specific GPIOTE event. + * + * @param[in] event Event. + */ +__STATIC_INLINE void nrf_gpiote_event_clear(nrf_gpiote_events_t event); + +/** + * @brief Function for getting the address of a specific GPIOTE event. + * + * @param[in] event Event. + * + * @return Address + */ +__STATIC_INLINE uint32_t nrf_gpiote_event_addr_get(nrf_gpiote_events_t event); + +/**@brief Function for enabling interrupts. + * + * @param[in] mask Interrupt mask to be enabled. + */ +__STATIC_INLINE void nrf_gpiote_int_enable(uint32_t mask); + +/**@brief Function for disabling interrupts. + * + * @param[in] mask Interrupt mask to be disabled. + */ +__STATIC_INLINE void nrf_gpiote_int_disable(uint32_t mask); + +/**@brief Function for checking if interrupts are enabled. + * + * @param[in] mask Mask of interrupt flags to check. + * + * @return Mask with enabled interrupts. + */ +__STATIC_INLINE uint32_t nrf_gpiote_int_is_enabled(uint32_t mask); + +/**@brief Function for enabling a GPIOTE event. + * + * @param[in] idx Task-Event index. + */ +__STATIC_INLINE void nrf_gpiote_event_enable(uint32_t idx); + +/**@brief Function for disabling a GPIOTE event. + * + * @param[in] idx Task-Event index. + */ +__STATIC_INLINE void nrf_gpiote_event_disable(uint32_t idx); + +/**@brief Function for configuring a GPIOTE event. + * + * @param[in] idx Task-Event index. + * @param[in] pin Pin associated with event. + * @param[in] polarity Transition that should generate an event. + */ +__STATIC_INLINE void nrf_gpiote_event_configure(uint32_t idx, uint32_t pin, + nrf_gpiote_polarity_t polarity); + +/**@brief Function for getting the pin associated with a GPIOTE event. + * + * @param[in] idx Task-Event index. + * + * @return Pin number. + */ +__STATIC_INLINE uint32_t nrf_gpiote_event_pin_get(uint32_t idx); + +/**@brief Function for getting the polarity associated with a GPIOTE event. + * + * @param[in] idx Task-Event index. + * + * @return Polarity. + */ +__STATIC_INLINE nrf_gpiote_polarity_t nrf_gpiote_event_polarity_get(uint32_t idx); + +/**@brief Function for enabling a GPIOTE task. + * + * @param[in] idx Task-Event index. + */ +__STATIC_INLINE void nrf_gpiote_task_enable(uint32_t idx); + +/**@brief Function for disabling a GPIOTE task. + * + * @param[in] idx Task-Event index. + */ +__STATIC_INLINE void nrf_gpiote_task_disable(uint32_t idx); + +/**@brief Function for configuring a GPIOTE task. + * @note Function is not configuring mode field so task is disabled after this function is called. + * + * @param[in] idx Task-Event index. + * @param[in] pin Pin associated with event. + * @param[in] polarity Transition that should generate an event. + * @param[in] init_val Initial value of pin. + */ +__STATIC_INLINE void nrf_gpiote_task_configure(uint32_t idx, uint32_t pin, + nrf_gpiote_polarity_t polarity, + nrf_gpiote_outinit_t init_val); + +/**@brief Function for forcing a specific state on the pin connected to GPIOTE. + * + * @param[in] idx Task-Event index. + * @param[in] init_val Pin state. + */ +__STATIC_INLINE void nrf_gpiote_task_force(uint32_t idx, nrf_gpiote_outinit_t init_val); + +/**@brief Function for resetting a GPIOTE task event configuration to the default state. + * + * @param[in] idx Task-Event index. + */ +__STATIC_INLINE void nrf_gpiote_te_default(uint32_t idx); + +#ifndef SUPPRESS_INLINE_IMPLEMENTATION +__STATIC_INLINE void nrf_gpiote_task_set(nrf_gpiote_tasks_t task) +{ + *(__IO uint32_t *)((uint32_t)NRF_GPIOTE + task) = 0x1UL; +} + +__STATIC_INLINE uint32_t nrf_gpiote_task_addr_get(nrf_gpiote_tasks_t task) +{ + return ((uint32_t)NRF_GPIOTE + task); +} + +__STATIC_INLINE bool nrf_gpiote_event_is_set(nrf_gpiote_events_t event) +{ + return (*(uint32_t *)nrf_gpiote_event_addr_get(event) == 0x1UL) ? true : false; +} + +__STATIC_INLINE void nrf_gpiote_event_clear(nrf_gpiote_events_t event) +{ + *(uint32_t *)nrf_gpiote_event_addr_get(event) = 0; +#if __CORTEX_M == 0x04 + volatile uint32_t dummy = *((volatile uint32_t *)nrf_gpiote_event_addr_get(event)); + (void)dummy; +#endif +} + +__STATIC_INLINE uint32_t nrf_gpiote_event_addr_get(nrf_gpiote_events_t event) +{ + return ((uint32_t)NRF_GPIOTE + event); +} + +__STATIC_INLINE void nrf_gpiote_int_enable(uint32_t mask) +{ + NRF_GPIOTE->INTENSET = mask; +} + +__STATIC_INLINE void nrf_gpiote_int_disable(uint32_t mask) +{ + NRF_GPIOTE->INTENCLR = mask; +} + +__STATIC_INLINE uint32_t nrf_gpiote_int_is_enabled(uint32_t mask) +{ + return (NRF_GPIOTE->INTENSET & mask); +} + +__STATIC_INLINE void nrf_gpiote_event_enable(uint32_t idx) +{ + NRF_GPIOTE->CONFIG[idx] |= GPIOTE_CONFIG_MODE_Event; +} + +__STATIC_INLINE void nrf_gpiote_event_disable(uint32_t idx) +{ + NRF_GPIOTE->CONFIG[idx] &= ~GPIOTE_CONFIG_MODE_Event; +} + +__STATIC_INLINE void nrf_gpiote_event_configure(uint32_t idx, uint32_t pin, nrf_gpiote_polarity_t polarity) +{ + NRF_GPIOTE->CONFIG[idx] &= ~(GPIOTE_CONFIG_PSEL_Msk | GPIOTE_CONFIG_POLARITY_Msk); + NRF_GPIOTE->CONFIG[idx] |= ((pin << GPIOTE_CONFIG_PSEL_Pos) & GPIOTE_CONFIG_PSEL_Msk) | + ((polarity << GPIOTE_CONFIG_POLARITY_Pos) & GPIOTE_CONFIG_POLARITY_Msk); +} + +__STATIC_INLINE uint32_t nrf_gpiote_event_pin_get(uint32_t idx) +{ + return ((NRF_GPIOTE->CONFIG[idx] & GPIOTE_CONFIG_PSEL_Msk) >> GPIOTE_CONFIG_PSEL_Pos); +} + +__STATIC_INLINE nrf_gpiote_polarity_t nrf_gpiote_event_polarity_get(uint32_t idx) +{ + return (nrf_gpiote_polarity_t)((NRF_GPIOTE->CONFIG[idx] & GPIOTE_CONFIG_POLARITY_Msk) >> GPIOTE_CONFIG_POLARITY_Pos); +} + +__STATIC_INLINE void nrf_gpiote_task_enable(uint32_t idx) +{ + uint32_t final_config = NRF_GPIOTE->CONFIG[idx] | GPIOTE_CONFIG_MODE_Task; + /* Workaround for the OUTINIT PAN. When nrf_gpiote_task_config() is called a glitch happens + on the GPIO if the GPIO in question is already assigned to GPIOTE and the pin is in the + correct state in GPIOTE but not in the OUT register. */ + /* Configure channel to Pin31, not connected to the pin, and configure as a tasks that will set it to proper level */ + NRF_GPIOTE->CONFIG[idx] = final_config | ((31 << GPIOTE_CONFIG_PSEL_Pos) & GPIOTE_CONFIG_PSEL_Msk); + __NOP(); + __NOP(); + __NOP(); + NRF_GPIOTE->CONFIG[idx] = final_config; +} + +__STATIC_INLINE void nrf_gpiote_task_disable(uint32_t idx) +{ + NRF_GPIOTE->CONFIG[idx] &= ~GPIOTE_CONFIG_MODE_Task; +} + +__STATIC_INLINE void nrf_gpiote_task_configure(uint32_t idx, uint32_t pin, + nrf_gpiote_polarity_t polarity, + nrf_gpiote_outinit_t init_val) +{ + NRF_GPIOTE->CONFIG[idx] &= ~(GPIOTE_CONFIG_PSEL_Msk | + GPIOTE_CONFIG_POLARITY_Msk | + GPIOTE_CONFIG_OUTINIT_Msk); + + NRF_GPIOTE->CONFIG[idx] |= ((pin << GPIOTE_CONFIG_PSEL_Pos) & GPIOTE_CONFIG_PSEL_Msk) | + ((polarity << GPIOTE_CONFIG_POLARITY_Pos) & GPIOTE_CONFIG_POLARITY_Msk) | + ((init_val << GPIOTE_CONFIG_OUTINIT_Pos) & GPIOTE_CONFIG_OUTINIT_Msk); +} + +__STATIC_INLINE void nrf_gpiote_task_force(uint32_t idx, nrf_gpiote_outinit_t init_val) +{ + NRF_GPIOTE->CONFIG[idx] = (NRF_GPIOTE->CONFIG[idx] & ~GPIOTE_CONFIG_OUTINIT_Msk) + | ((init_val << GPIOTE_CONFIG_OUTINIT_Pos) & GPIOTE_CONFIG_OUTINIT_Msk); +} + +__STATIC_INLINE void nrf_gpiote_te_default(uint32_t idx) +{ + NRF_GPIOTE->CONFIG[idx] = 0; +} +#endif //SUPPRESS_INLINE_IMPLEMENTATION +/** @} */ + +#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.c new file mode 100644 index 0000000000..f2a53e16cb --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.c @@ -0,0 +1,136 @@ +/* + * 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. + * + */ + +/** + *@file + *@brief NMVC driver implementation + */ + +#include +#include "nrf.h" +#include "nrf_nvmc.h" + + +void nrf_nvmc_page_erase(uint32_t address) +{ + // Enable erase. + NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Een; + while (NRF_NVMC->READY == NVMC_READY_READY_Busy) + { + } + + // Erase the page + NRF_NVMC->ERASEPAGE = address; + while (NRF_NVMC->READY == NVMC_READY_READY_Busy) + { + } + + NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren; + while (NRF_NVMC->READY == NVMC_READY_READY_Busy) + { + } +} + + +void nrf_nvmc_write_byte(uint32_t address, uint8_t value) +{ + uint32_t byte_shift = address & (uint32_t)0x03; + uint32_t address32 = address & ~byte_shift; // Address to the word this byte is in. + uint32_t value32 = (*(uint32_t*)address32 & ~((uint32_t)0xFF << (byte_shift << (uint32_t)3))); + value32 = value32 + ((uint32_t)value << (byte_shift << 3)); + + // Enable write. + NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos); + while (NRF_NVMC->READY == NVMC_READY_READY_Busy) + { + } + + *(uint32_t*)address32 = value32; + while(NRF_NVMC->READY == NVMC_READY_READY_Busy) + { + } + + NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos); + { + } +} + +void nrf_nvmc_write_word(uint32_t address, uint32_t value) +{ + // Enable write. + NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen; + while (NRF_NVMC->READY == NVMC_READY_READY_Busy){ + } + + *(uint32_t*)address = value; + while (NRF_NVMC->READY == NVMC_READY_READY_Busy){ + } + + NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren; + while (NRF_NVMC->READY == NVMC_READY_READY_Busy) + { + } +} + +void nrf_nvmc_write_bytes(uint32_t address, const uint8_t * src, uint32_t num_bytes) +{ + uint32_t i; + for(i=0;iCONFIG = NVMC_CONFIG_WEN_Wen; + while (NRF_NVMC->READY == NVMC_READY_READY_Busy) + { + } + + for(i=0;iREADY == NVMC_READY_READY_Busy) + { + } + } + + NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren; + while (NRF_NVMC->READY == NVMC_READY_READY_Busy) + { + } +} + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.h new file mode 100644 index 0000000000..747ed629b0 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.h @@ -0,0 +1,109 @@ +/* + * 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. + * + */ + +/** + * @file + * @brief NMVC driver API. + */ + +#ifndef NRF_NVMC_H__ +#define NRF_NVMC_H__ + +#include + + +/** + * @defgroup nrf_nvmc Non-volatile memory controller + * @{ + * @ingroup nrf_drivers + * @brief Driver for the NVMC peripheral. + * + * This driver allows writing to the non-volatile memory (NVM) regions + * of the chip. In order to write to NVM the controller must be powered + * on and the relevant page must be erased. + * + */ + + +/** + * @brief Erase a page in flash. This is required before writing to any + * address in the page. + * + * @param address Start address of the page. + */ +void nrf_nvmc_page_erase(uint32_t address); + + +/** + * @brief Write a single byte to flash. + * + * The function reads the word containing the byte, and then + * rewrites the entire word. + * + * @param address Address to write to. + * @param value Value to write. + */ +void nrf_nvmc_write_byte(uint32_t address , uint8_t value); + + +/** + * @brief Write a 32-bit word to flash. + * @param address Address to write to. + * @param value Value to write. + */ +void nrf_nvmc_write_word(uint32_t address, uint32_t value); + + +/** + * @brief Write consecutive bytes to flash. + * + * @param address Address to write to. + * @param src Pointer to data to copy from. + * @param num_bytes Number of bytes in src to write. + */ +void nrf_nvmc_write_bytes(uint32_t address, const uint8_t * src, uint32_t num_bytes); + + +/** + * @brief Write consecutive words to flash. + * + * @param address Address to write to. + * @param src Pointer to data to copy from. + * @param num_words Number of bytes in src to write. + */ +void nrf_nvmc_write_words(uint32_t address, const uint32_t * src, uint32_t num_words); + + +#endif // NRF_NVMC_H__ +/** @} */ + + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_pdm.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_pdm.h new file mode 100644 index 0000000000..09af76916a --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_pdm.h @@ -0,0 +1,379 @@ +/* + * 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_PDM_H_ +#define NRF_PDM_H_ + +/** + * @defgroup nrf_pdm_hal PDM HAL + * @{ + * @ingroup nrf_pdm + * + * @brief @tagAPI52 Hardware abstraction layer for accessing the pulse density modulation (PDM) peripheral. + */ + +#include +#include +#include "nrf.h" +#include "nrf_assert.h" + + +#define NRF_PDM_GAIN_MINIMUM 0x00 +#define NRF_PDM_GAIN_DEFAULT 0x28 +#define NRF_PDM_GAIN_MAXIMUM 0x50 + +typedef uint8_t nrf_pdm_gain_t; + + +/** + * @brief PDM tasks. + */ +typedef enum /*lint -save -e30 -esym(628,__INTADDR__) */ +{ + NRF_PDM_TASK_START = offsetof(NRF_PDM_Type, TASKS_START), ///< Starts continuous PDM transfer. + NRF_PDM_TASK_STOP = offsetof(NRF_PDM_Type, TASKS_STOP) ///< Stops PDM transfer. +} nrf_pdm_task_t; + + +/** + * @brief PDM events. + */ +typedef enum /*lint -save -e30 -esym(628,__INTADDR__) */ +{ + NRF_PDM_EVENT_STARTED = offsetof(NRF_PDM_Type, EVENTS_STARTED), ///< PDM transfer has started. + NRF_PDM_EVENT_STOPPED = offsetof(NRF_PDM_Type, EVENTS_STOPPED), ///< PDM transfer has finished. + NRF_PDM_EVENT_END = offsetof(NRF_PDM_Type, EVENTS_END) ///< The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM. +} nrf_pdm_event_t; + + +/** + * @brief PDM interrupt masks. + */ +typedef enum +{ + NRF_PDM_INT_STARTED = PDM_INTENSET_STARTED_Msk, ///< Interrupt on EVENTS_STARTED event. + NRF_PDM_INT_STOPPED = PDM_INTENSET_STOPPED_Msk, ///< Interrupt on EVENTS_STOPPED event. + NRF_PDM_INT_END = PDM_INTENSET_END_Msk ///< Interrupt on EVENTS_END event. +} nrf_pdm_int_mask_t; + +/** + * @brief PDM clock frequency. + */ +typedef enum +{ + NRF_PDM_FREQ_1000K = PDM_PDMCLKCTRL_FREQ_1000K, ///< PDM_CLK = 1.000 MHz. + NRF_PDM_FREQ_1032K = PDM_PDMCLKCTRL_FREQ_Default, ///< PDM_CLK = 1.032 MHz. + NRF_PDM_FREQ_1067K = PDM_PDMCLKCTRL_FREQ_1067K ///< PDM_CLK = 1.067 MHz. +} nrf_pdm_freq_t; + + +/** + * @brief PDM operation mode. + */ +typedef enum +{ + NRF_PDM_MODE_STEREO = PDM_MODE_OPERATION_Stereo, ///< Sample and store one pair (Left + Right) of 16-bit samples per RAM word. + NRF_PDM_MODE_MONO = PDM_MODE_OPERATION_Mono ///< Sample and store two successive Left samples (16 bit each) per RAM word. +} nrf_pdm_mode_t; + + +/** + * @brief PDM sampling mode. + */ +typedef enum +{ + NRF_PDM_EDGE_LEFTFALLING = PDM_MODE_EDGE_LeftFalling, ///< Left (or mono) is sampled on falling edge of PDM_CLK. + NRF_PDM_EDGE_LEFTRISING = PDM_MODE_EDGE_LeftRising ///< Left (or mono) is sampled on rising edge of PDM_CLK. +} nrf_pdm_edge_t; + + +/** + * @brief Function for triggering a PDM task. + * + * @param[in] pdm_task PDM task. + */ +__STATIC_INLINE void nrf_pdm_task_trigger(nrf_pdm_task_t pdm_task) +{ + *((volatile uint32_t *)((uint8_t *)NRF_PDM + (uint32_t)pdm_task)) = 0x1UL; +} + + +/** + * @brief Function for getting the address of a PDM task register. + * + * @param[in] pdm_task PDM task. + * + * @return Address of the specified PDM task. + */ +__STATIC_INLINE uint32_t nrf_pdm_task_address_get(nrf_pdm_task_t pdm_task) +{ + return (uint32_t)((uint8_t *)NRF_PDM + (uint32_t)pdm_task); +} + + +/** + * @brief Function for getting the state of a PDM event. + * + * @param[in] pdm_event PDM event. + * + * @return State of the specified PDM event. + */ +__STATIC_INLINE bool nrf_pdm_event_check(nrf_pdm_event_t pdm_event) +{ + return (bool)*(volatile uint32_t *)((uint8_t *)NRF_PDM + (uint32_t)pdm_event); +} + + +/** + * @brief Function for clearing a PDM event. + * + * @param[in] pdm_event PDM event. + */ +__STATIC_INLINE void nrf_pdm_event_clear(nrf_pdm_event_t pdm_event) +{ + *((volatile uint32_t *)((uint8_t *)NRF_PDM + (uint32_t)pdm_event)) = 0x0UL; +} + + +/** + * @brief Function for getting the address of a PDM event register. + * + * @param[in] pdm_event PDM event. + * + * @return Address of the specified PDM event. + */ +__STATIC_INLINE volatile uint32_t * nrf_pdm_event_address_get(nrf_pdm_event_t pdm_event) +{ + return (volatile uint32_t *)((uint8_t *)NRF_PDM + (uint32_t)pdm_event); +} + + +/** + * @brief Function for enabling PDM interrupts. + * + * @param[in] pdm_int_mask Interrupts to enable. + */ +__STATIC_INLINE void nrf_pdm_int_enable(uint32_t pdm_int_mask) +{ + NRF_PDM->INTENSET = pdm_int_mask; +} + + +/** + * @brief Function for retrieving the state of PDM interrupts. + * + * @param[in] pdm_int_mask Interrupts to check. + * + * @retval true If all specified interrupts are enabled. + * @retval false If at least one of the given interrupts is not enabled. + */ +__STATIC_INLINE bool nrf_pdm_int_enable_check(uint32_t pdm_int_mask) +{ + return (bool)(NRF_PDM->INTENSET & pdm_int_mask); +} + + +/** + * @brief Function for disabling interrupts. + * + * @param pdm_int_mask Interrupts to disable. + */ +__STATIC_INLINE void nrf_pdm_int_disable(uint32_t pdm_int_mask) +{ + NRF_PDM->INTENCLR = pdm_int_mask; +} + + +/** + * @brief Function for enabling the PDM peripheral. + * + * The PDM peripheral must be enabled before use. + */ +__STATIC_INLINE void nrf_pdm_enable(void) +{ + NRF_PDM->ENABLE = (PDM_ENABLE_ENABLE_Enabled << PDM_ENABLE_ENABLE_Pos); +} + + +/** + * @brief Function for disabling the PDM peripheral. + */ +__STATIC_INLINE void nrf_pdm_disable(void) +{ + NRF_PDM->ENABLE = (PDM_ENABLE_ENABLE_Disabled << PDM_ENABLE_ENABLE_Pos); +} + + +/** + * @brief Function for checking if the PDM peripheral is enabled. + * + * @retval true If the PDM peripheral is enabled. + * @retval false If the PDM peripheral is not enabled. + */ +__STATIC_INLINE bool nrf_pdm_enable_check(void) +{ + return (NRF_PDM->ENABLE == (PDM_ENABLE_ENABLE_Enabled << PDM_ENABLE_ENABLE_Pos)); +} + + +/** + * @brief Function for setting the PDM operation mode. + * + * @param[in] pdm_mode PDM operation mode. + * @param[in] pdm_edge PDM sampling mode. + */ +__STATIC_INLINE void nrf_pdm_mode_set(nrf_pdm_mode_t pdm_mode, nrf_pdm_edge_t pdm_edge) +{ + NRF_PDM->MODE = ((pdm_mode << PDM_MODE_OPERATION_Pos) & PDM_MODE_OPERATION_Msk) + | ((pdm_edge << PDM_MODE_EDGE_Pos) & PDM_MODE_EDGE_Msk); +} + + +/** + * @brief Function for getting the PDM operation mode. + * + * @param[out] p_pdm_mode PDM operation mode. + * @param[out] p_pdm_edge PDM sampling mode. + */ +__STATIC_INLINE void nrf_pdm_mode_get(nrf_pdm_mode_t * p_pdm_mode, nrf_pdm_edge_t * p_pdm_edge) +{ + uint32_t mode = NRF_PDM->MODE; + *p_pdm_mode = (nrf_pdm_mode_t)((mode & PDM_MODE_OPERATION_Msk ) >> PDM_MODE_OPERATION_Pos); + *p_pdm_edge = (nrf_pdm_edge_t)((mode & PDM_MODE_EDGE_Msk ) >> PDM_MODE_EDGE_Pos); +} + + +/** + * @brief Function for setting the PDM clock frequency. + * + * @param[in] pdm_freq PDM clock frequency. + */ +__STATIC_INLINE void nrf_pdm_clock_set(nrf_pdm_freq_t pdm_freq) +{ + NRF_PDM->PDMCLKCTRL = ((pdm_freq << PDM_PDMCLKCTRL_FREQ_Pos) & PDM_PDMCLKCTRL_FREQ_Msk); +} + + +/** + * @brief Function for getting the PDM clock frequency. + */ +__STATIC_INLINE nrf_pdm_freq_t nrf_pdm_clock_get(void) +{ + return (nrf_pdm_freq_t) ((NRF_PDM->PDMCLKCTRL << PDM_PDMCLKCTRL_FREQ_Pos) & PDM_PDMCLKCTRL_FREQ_Msk); +} + + +/** + * @brief Function for setting up the PDM pins. + * + * @param[in] psel_clk CLK pin number. + * @param[in] psel_din DIN pin number. + */ +__STATIC_INLINE void nrf_pdm_psel_connect(uint32_t psel_clk, uint32_t psel_din) +{ + NRF_PDM->PSEL.CLK = ((psel_clk << PDM_PSEL_CLK_PIN_Pos) & PDM_PSEL_CLK_PIN_Msk) + | ((PDM_PSEL_CLK_CONNECT_Connected << PDM_PSEL_CLK_CONNECT_Pos) & PDM_PSEL_CLK_CONNECT_Msk); + NRF_PDM->PSEL.DIN = ((psel_din << PDM_PSEL_DIN_PIN_Pos) & PDM_PSEL_DIN_PIN_Msk) + | ((PDM_PSEL_DIN_CONNECT_Connected << PDM_PSEL_CLK_CONNECT_Pos) & PDM_PSEL_DIN_CONNECT_Msk); +} + +/** + * @brief Function for disconnecting the PDM pins. + */ +__STATIC_INLINE void nrf_pdm_psel_disconnect() +{ + NRF_PDM->PSEL.CLK = ((PDM_PSEL_CLK_CONNECT_Disconnected << PDM_PSEL_CLK_CONNECT_Pos) + & PDM_PSEL_CLK_CONNECT_Msk); + NRF_PDM->PSEL.DIN = ((PDM_PSEL_DIN_CONNECT_Disconnected << PDM_PSEL_DIN_CONNECT_Pos) + & PDM_PSEL_DIN_CONNECT_Msk); +} + + +/** + * @brief Function for setting the PDM gain. + * + * @param[in] gain_l Left channel gain. + * @param[in] gain_r Right channel gain. + */ +__STATIC_INLINE void nrf_pdm_gain_set(nrf_pdm_gain_t gain_l, nrf_pdm_gain_t gain_r) +{ + NRF_PDM->GAINL = gain_l; + NRF_PDM->GAINR = gain_r; +} + + +/** + * @brief Function for getting the PDM gain. + * + * @param[out] p_gain_l Left channel gain. + * @param[out] p_gain_r Right channel gain. + */ +__STATIC_INLINE void nrf_pdm_gain_get(nrf_pdm_gain_t * p_gain_l, nrf_pdm_gain_t * p_gain_r) +{ + *p_gain_l = NRF_PDM->GAINL; + *p_gain_r = NRF_PDM->GAINR; +} + + +/** + * @brief Function for setting the PDM sample buffer. + * + * @param[in] p_buffer Pointer to the RAM address where samples should be written with EasyDMA. + * @param[in] num Number of samples to allocate memory for in EasyDMA mode. + * + * The amount of allocated RAM depends on the operation mode. + * - For stereo mode: N 32-bit words. + * - For mono mode: Ceil(N/2) 32-bit words. + */ +__STATIC_INLINE void nrf_pdm_buffer_set(uint32_t * p_buffer, uint32_t num) +{ + NRF_PDM->SAMPLE.PTR = (uint32_t)p_buffer; + NRF_PDM->SAMPLE.MAXCNT = num; +} + +/** + * @brief Function for getting the current PDM sample buffer address. + * + * @return Pointer to the current sample buffer. + */ +__STATIC_INLINE uint32_t * nrf_pdm_buffer_get() +{ + return (uint32_t *)NRF_PDM->SAMPLE.PTR; +} + + +/** + *@} + **/ + +#endif /* NRF_PDM_H_ */ diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf_delay.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_temp.h similarity index 57% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf_delay.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_temp.h index 9756e7b7d9..bae99f5a32 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF52832/nrf_delay.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_temp.h @@ -30,17 +30,46 @@ * */ -#include -#include "compiler_abstraction.h" -#include "nrf.h" -#include "nrf_delay.h" +#ifndef NRF_TEMP_H__ +#define NRF_TEMP_H__ -/*lint --e{438} "Variable not used" */ -void nrf_delay_ms(uint32_t volatile number_of_ms) +#include "nrf.h" + +/** +* @defgroup nrf_temperature TEMP (temperature) abstraction +* @{ +* @ingroup nrf_drivers temperature_example +* @brief Temperature module init and read functions. +* +*/ + +/**@cond NO_DOXYGEN */ +#define MASK_SIGN (0x00000200UL) +#define MASK_SIGN_EXTENSION (0xFFFFFC00UL) + +/** + * @brief Function for preparing the temp module for temperature measurement. + * + * This function initializes the TEMP module and writes to the hidden configuration register. + */ +static __INLINE void nrf_temp_init(void) { - while(number_of_ms != 0) - { - number_of_ms--; - nrf_delay_us(999); - } + /**@note Workaround for PAN_028 rev2.0A anomaly 31 - TEMP: Temperature offset value has to be manually loaded to the TEMP module */ + *(uint32_t *) 0x4000C504 = 0; } + +/** + * @brief Function for reading temperature measurement. + * + * The function reads the 10 bit 2's complement value and transforms it to a 32 bit 2's complement value. + */ +static __INLINE int32_t nrf_temp_read(void) +{ + /**@note Workaround for PAN_028 rev2.0A anomaly 28 - TEMP: Negative measured values are not represented correctly */ + return ((NRF_TEMP->TEMP & MASK_SIGN) != 0) ? (NRF_TEMP->TEMP | MASK_SIGN_EXTENSION) : (NRF_TEMP->TEMP); +} +/**@endcond */ + +/** @} */ + +#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_wdt.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_wdt.h new file mode 100644 index 0000000000..a3c245b409 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_wdt.h @@ -0,0 +1,319 @@ +/* + * 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. + * + */ + +/** + * @defgroup nrf_wdt_hal WDT HAL + * @{ + * @ingroup nrf_wdt + * + * @brief Hardware access layer for accessing the watchdog timer (WDT) peripheral. + */ + +#ifndef NRF_WDT_H__ +#define NRF_WDT_H__ + +#include +#include +#include + +#include "nrf.h" + +#define NRF_WDT_CHANNEL_NUMBER 0x8UL +#define NRF_WDT_RR_VALUE 0x6E524635UL /* Fixed value, shouldn't be modified.*/ + +#define NRF_WDT_TASK_SET 1UL +#define NRF_WDT_EVENT_CLEAR 0UL + +/** + * @enum nrf_wdt_task_t + * @brief WDT tasks. + */ +typedef enum +{ + /*lint -save -e30 -esym(628,__INTADDR__)*/ + NRF_WDT_TASK_START = offsetof(NRF_WDT_Type, TASKS_START), /**< Task for starting WDT. */ + /*lint -restore*/ +} nrf_wdt_task_t; + +/** + * @enum nrf_wdt_event_t + * @brief WDT events. + */ +typedef enum +{ + /*lint -save -e30*/ + NRF_WDT_EVENT_TIMEOUT = offsetof(NRF_WDT_Type, EVENTS_TIMEOUT), /**< Event from WDT time-out. */ + /*lint -restore*/ +} nrf_wdt_event_t; + +/** + * @enum nrf_wdt_behaviour_t + * @brief WDT behavior in CPU SLEEP or HALT mode. + */ +typedef enum +{ + NRF_WDT_BEHAVIOUR_RUN_SLEEP = WDT_CONFIG_SLEEP_Msk, /**< WDT will run when CPU is in SLEEP mode. */ + NRF_WDT_BEHAVIOUR_RUN_HALT = WDT_CONFIG_HALT_Msk, /**< WDT will run when CPU is in HALT mode. */ + NRF_WDT_BEHAVIOUR_RUN_SLEEP_HALT = WDT_CONFIG_SLEEP_Msk | WDT_CONFIG_HALT_Msk, /**< WDT will run when CPU is in SLEEP or HALT mode. */ + NRF_WDT_BEHAVIOUR_PAUSE_SLEEP_HALT = 0, /**< WDT will be paused when CPU is in SLEEP or HALT mode. */ +} nrf_wdt_behaviour_t; + +/** + * @enum nrf_wdt_rr_register_t + * @brief WDT reload request registers. + */ +typedef enum +{ + NRF_WDT_RR0 = 0, /**< Reload request register 0. */ + NRF_WDT_RR1, /**< Reload request register 1. */ + NRF_WDT_RR2, /**< Reload request register 2. */ + NRF_WDT_RR3, /**< Reload request register 3. */ + NRF_WDT_RR4, /**< Reload request register 4. */ + NRF_WDT_RR5, /**< Reload request register 5. */ + NRF_WDT_RR6, /**< Reload request register 6. */ + NRF_WDT_RR7 /**< Reload request register 7. */ +} nrf_wdt_rr_register_t; + +/** + * @enum nrf_wdt_int_mask_t + * @brief WDT interrupts. + */ +typedef enum +{ + NRF_WDT_INT_TIMEOUT_MASK = WDT_INTENSET_TIMEOUT_Msk, /**< WDT interrupt from time-out event. */ +} nrf_wdt_int_mask_t; + +/** + * @brief Function for configuring the watchdog behavior when the CPU is sleeping or halted. + * + * @param behaviour Watchdog behavior when CPU is in SLEEP or HALT mode. + */ +__STATIC_INLINE void nrf_wdt_behaviour_set(nrf_wdt_behaviour_t behaviour) +{ + NRF_WDT->CONFIG = behaviour; +} + + +/** + * @brief Function for starting the watchdog. + * + * @param[in] task Task. + */ +__STATIC_INLINE void nrf_wdt_task_trigger(nrf_wdt_task_t task) +{ + *((volatile uint32_t *)((uint8_t *)NRF_WDT + task)) = NRF_WDT_TASK_SET; +} + + +/** + * @brief Function for clearing the WDT event. + * + * @param[in] event Event. + */ +__STATIC_INLINE void nrf_wdt_event_clear(nrf_wdt_event_t event) +{ + *((volatile uint32_t *)((uint8_t *)NRF_WDT + (uint32_t)event)) = NRF_WDT_EVENT_CLEAR; +} + + +/** + * @brief Function for retrieving the state of the WDT event. + * + * @param[in] event Event. + * + * @retval true If the event is set. + * @retval false If the event is not set. + */ +__STATIC_INLINE bool nrf_wdt_event_check(nrf_wdt_event_t event) +{ + return (bool)*((volatile uint32_t *)((uint8_t *)NRF_WDT + event)); +} + + +/** + * @brief Function for enabling a specific interrupt. + * + * @param[in] int_mask Interrupt. + */ +__STATIC_INLINE void nrf_wdt_int_enable(uint32_t int_mask) +{ + NRF_WDT->INTENSET = int_mask; +} + + +/** + * @brief Function for retrieving the state of given interrupt. + * + * @param[in] int_mask Interrupt. + * + * @retval true Interrupt is enabled. + * @retval false Interrupt is not enabled. + */ +__STATIC_INLINE bool nrf_wdt_int_enable_check(uint32_t int_mask) +{ + return (bool)(NRF_WDT->INTENSET & int_mask); +} + + +/** + * @brief Function for disabling a specific interrupt. + * + * @param[in] int_mask Interrupt. + */ +__STATIC_INLINE void nrf_wdt_int_disable(uint32_t int_mask) +{ + NRF_WDT->INTENCLR = int_mask; +} + + +/** + * @brief Function for returning the address of a specific WDT task register. + * + * @param[in] task Task. + */ +__STATIC_INLINE uint32_t nrf_wdt_task_address_get(nrf_wdt_task_t task) +{ + return ((uint32_t)NRF_WDT + task); +} + + +/** + * @brief Function for returning the address of a specific WDT event register. + * + * @param[in] event Event. + * + * @retval address of requested event register + */ +__STATIC_INLINE uint32_t nrf_wdt_event_address_get(nrf_wdt_event_t event) +{ + return ((uint32_t)NRF_WDT + event); +} + + +/** + * @brief Function for retrieving the watchdog status. + * + * @retval true If the watchdog is started. + * @retval false If the watchdog is not started. + */ +__STATIC_INLINE bool nrf_wdt_started(void) +{ + return (bool)(NRF_WDT->RUNSTATUS); +} + + +/** + * @brief Function for retrieving the watchdog reload request status. + * + * @param[in] rr_register Reload request register to check. + * + * @retval true If a reload request is running. + * @retval false If no reload request is running. + */ +__STATIC_INLINE bool nrf_wdt_request_status(nrf_wdt_rr_register_t rr_register) +{ + return (bool)(((NRF_WDT->REQSTATUS) >> rr_register) & 0x1UL); +} + + +/** + * @brief Function for setting the watchdog reload value. + * + * @param[in] reload_value Watchdog counter initial value. + */ +__STATIC_INLINE void nrf_wdt_reload_value_set(uint32_t reload_value) +{ + NRF_WDT->CRV = reload_value; +} + + +/** + * @brief Function for retrieving the watchdog reload value. + * + * @retval Reload value. + */ +__STATIC_INLINE uint32_t nrf_wdt_reload_value_get(void) +{ + return (uint32_t)NRF_WDT->CRV; +} + + +/** + * @brief Function for enabling a specific reload request register. + * + * @param[in] rr_register Reload request register to enable. + */ +__STATIC_INLINE void nrf_wdt_reload_request_enable(nrf_wdt_rr_register_t rr_register) +{ + NRF_WDT->RREN |= 0x1UL << rr_register; +} + + +/** + * @brief Function for disabling a specific reload request register. + * + * @param[in] rr_register Reload request register to disable. + */ +__STATIC_INLINE void nrf_wdt_reload_request_disable(nrf_wdt_rr_register_t rr_register) +{ + NRF_WDT->RREN &= ~(0x1UL << rr_register); +} + + +/** + * @brief Function for retrieving the status of a specific reload request register. + * + * @param[in] rr_register Reload request register to check. + * + * @retval true If the reload request register is enabled. + * @retval false If the reload request register is not enabled. + */ +__STATIC_INLINE bool nrf_wdt_reload_request_is_enabled(nrf_wdt_rr_register_t rr_register) +{ + return (bool)(NRF_WDT->RREN & (0x1UL << rr_register)); +} + + +/** + * @brief Function for setting a specific reload request register. + * + * @param[in] rr_register Reload request register to set. + */ +__STATIC_INLINE void nrf_wdt_reload_request_set(nrf_wdt_rr_register_t rr_register) +{ + NRF_WDT->RR[rr_register] = NRF_WDT_RR_VALUE; +} + + +#endif + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/config/pstorage_platform.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/config/pstorage_platform.h new file mode 100644 index 0000000000..efb2c3b364 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/config/pstorage_platform.h @@ -0,0 +1,92 @@ +/* + * 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. + * + */ + + /** @cond To make doxygen skip this file */ + +/** @file + * This header contains defines with respect persistent storage that are specific to + * persistent storage implementation and application use case. + */ +#ifndef PSTORAGE_PL_H__ +#define PSTORAGE_PL_H__ + +#include +#include "nrf.h" + +static __INLINE uint16_t pstorage_flash_page_size() +{ + return (uint16_t)NRF_FICR->CODEPAGESIZE; +} + +#define PSTORAGE_FLASH_PAGE_SIZE pstorage_flash_page_size() /**< Size of one flash page. */ +#define PSTORAGE_FLASH_EMPTY_MASK 0xFFFFFFFF /**< Bit mask that defines an empty address in flash. */ + +static __INLINE uint32_t pstorage_flash_page_end() +{ + uint32_t bootloader_addr = NRF_UICR->NRFFW[0]; + + return ((bootloader_addr != PSTORAGE_FLASH_EMPTY_MASK) ? + (bootloader_addr/ PSTORAGE_FLASH_PAGE_SIZE) : NRF_FICR->CODESIZE); +} + +#define PSTORAGE_FLASH_PAGE_END pstorage_flash_page_end() + +#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_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. */ +#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_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 10 /**< Maximum number of flash access commands that can be maintained by the module for all applications. Configurable. */ + + +/** Abstracts persistently memory block identifier. */ +typedef uint32_t pstorage_block_t; + +typedef struct +{ + uint32_t module_id; /**< Module ID.*/ + pstorage_block_t block_id; /**< Block ID.*/ +} pstorage_handle_t; + +typedef uint16_t pstorage_size_t; /** Size of length and offset fields. */ + +/**@brief Handles Flash Access Result Events. To be called in the system event dispatcher of the application. */ +void pstorage_sys_event_handler (uint32_t sys_evt); + +#endif // PSTORAGE_PL_H__ + +/** @} */ +/** @endcond */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.c new file mode 100644 index 0000000000..f72de0fc6c --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.c @@ -0,0 +1,1592 @@ +/* + * 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 "pstorage.h" +#include +#include +#include +#include "nordic_common.h" +#include "nrf_error.h" +#include "nrf_assert.h" +#include "nrf.h" +#include "nrf_soc.h" +#include "app_util.h" +#include "app_error.h" + +#define INVALID_OPCODE 0x00 /**< Invalid op code identifier. */ +#define SOC_MAX_WRITE_SIZE PSTORAGE_FLASH_PAGE_SIZE /**< Maximum write size allowed for a single call to \ref sd_flash_write as specified in the SoC API. */ +#define RAW_MODE_APP_ID (PSTORAGE_NUM_OF_PAGES + 1) /**< Application id for raw mode. */ + +#if defined(NRF52) +#define SD_CMD_MAX_TRIES 1000 /**< Number of times to try a softdevice flash operatoion, specific for nRF52 to account for longest time of flash page erase*/ +#else +#define SD_CMD_MAX_TRIES 3 /**< Number of times to try a softdevice flash operation when the @ref NRF_EVT_FLASH_OPERATION_ERROR sys_evt is received. */ +#endif /* defined(NRF52) */ + +#define MASK_TAIL_SWAP_DONE (1 << 0) /**< Flag for checking if the tail restore area has been written to swap page. */ +#define MASK_SINGLE_PAGE_OPERATION (1 << 1) /**< Flag for checking if command is a single flash page operation. */ +#define MASK_MODULE_INITIALIZED (1 << 2) /**< Flag for checking if the module has been initialized. */ +#define MASK_FLASH_API_ERR_BUSY (1 << 3) /**< Flag for checking if flash API returned NRF_ERROR_BUSY. */ + +/** + * @defgroup api_param_check API Parameters check macros. + * + * @details Macros that verify parameters passed to the module in the APIs. These macros + * could be mapped to nothing in final code versions to save execution and size. + * + * @{ + */ + +/**@brief Check if the input pointer is NULL, if so it returns NRF_ERROR_NULL. + */ +#define NULL_PARAM_CHECK(PARAM) \ + if ((PARAM) == NULL) \ + { \ + return NRF_ERROR_NULL; \ + } + +/**@brief Verifies that the module identifier supplied by the application is within permissible + * range. + */ +#define MODULE_ID_RANGE_CHECK(ID) \ + if ((((ID)->module_id) >= PSTORAGE_NUM_OF_PAGES) || \ + (m_app_table[(ID)->module_id].cb == NULL)) \ + { \ + return NRF_ERROR_INVALID_PARAM; \ + } + +/**@brief Verifies that the block identifier supplied by the application is within the permissible + * range. + */ +#define BLOCK_ID_RANGE_CHECK(ID) \ + if (((ID)->block_id) >= (m_app_table[(ID)->module_id].base_id + \ + (m_app_table[(ID)->module_id].block_count * MODULE_BLOCK_SIZE(ID)))) \ + { \ + return NRF_ERROR_INVALID_PARAM; \ + } + +/**@brief Verifies that the block size requested by the application can be supported by the module. + */ +#define BLOCK_SIZE_CHECK(X) \ + if (((X) > PSTORAGE_MAX_BLOCK_SIZE) || ((X) < PSTORAGE_MIN_BLOCK_SIZE)) \ + { \ + return NRF_ERROR_INVALID_PARAM; \ + } + +/**@brief Verifies the block size requested by the application in registration API. + */ +#define BLOCK_COUNT_CHECK(COUNT, SIZE) \ + if (((COUNT) == 0) || \ + ((m_next_page_addr + ((COUNT) *(SIZE)) > PSTORAGE_SWAP_ADDR))) \ + { \ + return NRF_ERROR_INVALID_PARAM; \ + } + +/**@brief Verifies the size parameter provided by the application in API. + */ +#define SIZE_CHECK(ID, SIZE) \ + if(((SIZE) == 0) || ((SIZE) > MODULE_BLOCK_SIZE(ID))) \ + { \ + return NRF_ERROR_INVALID_PARAM; \ + } + +/**@brief Verifies the offset parameter provided by the application in API. + */ +#define OFFSET_CHECK(ID, OFFSET, SIZE) \ + if(((SIZE) + (OFFSET)) > MODULE_BLOCK_SIZE(ID)) \ + { \ + return NRF_ERROR_INVALID_PARAM; \ + } + +#ifdef PSTORAGE_RAW_MODE_ENABLE + +/**@brief Verifies the module identifier supplied by the application. + */ +#define MODULE_RAW_HANDLE_CHECK(ID) \ + if ((((ID)->module_id) != RAW_MODE_APP_ID)) \ + { \ + return NRF_ERROR_INVALID_PARAM; \ + } + +#endif // PSTORAGE_RAW_MODE_ENABLE + +/**@} */ + + +/**@brief Verify module's initialization status. + * + * @details Verify module's initialization status. Returns NRF_ERROR_INVALID_STATE when a + * module API is called without initializing the module. + */ +#define VERIFY_MODULE_INITIALIZED() \ + do \ + { \ + if (!(m_flags & MASK_MODULE_INITIALIZED)) \ + { \ + return NRF_ERROR_INVALID_STATE; \ + } \ + } while(0) + +/**@brief Macro to fetch the block size registered for the module. */ +#define MODULE_BLOCK_SIZE(ID) (m_app_table[(ID)->module_id].block_size) + +/**@brief Main state machine of the component. */ +typedef enum +{ + STATE_IDLE, /**< State for being idle (no command execution in progress). */ + STATE_STORE, /**< State for storing data when using store/update API. */ + STATE_DATA_ERASE_WITH_SWAP, /**< State for erasing the data page when using update/clear API when use of swap page is required. */ + STATE_DATA_ERASE, /**< State for erasing the data page when using update/clear API without the need to use the swap page. */ + STATE_ERROR /**< State entered when command processing is terminated abnormally. */ +} pstorage_state_t; + +/**@brief Sub state machine contained by @ref STATE_DATA_ERASE_WITH_SWAP super state machine. */ +typedef enum +{ + STATE_ERASE_SWAP, /**< State for erasing the swap page when using the update/clear API. */ + STATE_WRITE_DATA_TO_SWAP, /**< State for writing the data page into the swap page when using update/clear API. */ + STATE_ERASE_DATA_PAGE, /**< State for erasing data page when using update/clear API. */ + STATE_RESTORE_TAIL, /**< State for restoring tail (end) of backed up data from swap to data page when using update/clear API. */ + STATE_RESTORE_HEAD, /**< State for restoring head (beginning) of backed up data from swap to data page when using update/clear API. */ + SWAP_SUB_STATE_MAX /**< Enumeration upper bound. */ +} flash_swap_sub_state_t; + +/**@brief Application registration information. + * + * @details Defines application specific information that the application needs to maintain to be able + * to process requests from each one of them. + */ +typedef struct +{ + pstorage_ntf_cb_t cb; /**< Callback registered with the module to be notified of result of flash access. */ + pstorage_block_t base_id; /**< Base block ID assigned to the module. */ + pstorage_size_t block_size; /**< Size of block for the module. */ + pstorage_size_t block_count; /**< Number of blocks requested by the application. */ +} pstorage_module_table_t; + + +#ifdef PSTORAGE_RAW_MODE_ENABLE +/**@brief Application registration information. + * + * @details Defines application specific information that the application registered for raw mode. + */ +typedef struct +{ + pstorage_ntf_cb_t cb; /**< Callback registered with the module to be notified of the result of flash access. */ +} pstorage_raw_module_table_t; +#endif // PSTORAGE_RAW_MODE_ENABLE + + +/**@brief Defines command queue element. + * + * @details Defines command queue element. Each element encapsulates needed information to process + * a flash access command. + */ +typedef struct +{ + uint8_t op_code; /**< Identifies the flash access operation being queued. Element is free if op-code is INVALID_OPCODE. */ + pstorage_size_t size; /**< Identifies the size in bytes requested for the operation. */ + pstorage_size_t offset; /**< Offset requested by the application for the access operation. */ + pstorage_handle_t storage_addr; /**< Address/Identifier for persistent memory. */ + uint8_t * p_data_addr; /**< Address/Identifier for data memory. This is assumed to be resident memory. */ +} cmd_queue_element_t; + + +/**@brief Defines command queue, an element is free if the op_code field is not invalid. + * + * @details Defines commands enqueued for flash access. At any point in time, this queue has one or + * more flash access operations pending if the count field is not zero. When the queue is + * not empty, the rp (read pointer) field points to the flash access command in progress + * or, if none is in progress, the command to be requested next. The queue implements a + * simple first in first out algorithm. Data addresses are assumed to be resident. + */ +typedef struct +{ + uint8_t rp; /**< Read pointer, pointing to flash access that is ongoing or to be requested next. */ + uint8_t count; /**< Number of elements in the queue. */ + cmd_queue_element_t cmd[PSTORAGE_CMD_QUEUE_SIZE]; /**< Array to maintain flash access operation details. */ +} cmd_queue_t; + +static cmd_queue_t m_cmd_queue; /**< Flash operation request queue. */ +static pstorage_size_t m_next_app_instance; /**< Points to the application module instance that can be allocated next. */ +static uint32_t m_next_page_addr; /**< Points to the flash address that can be allocated to a module next. This is needed as blocks of a module that can span across flash pages. */ +static pstorage_state_t m_state; /**< Main state tracking variable. */ +static flash_swap_sub_state_t m_swap_sub_state; /**< Flash swap erase when swap used state tracking variable. */ +static uint32_t m_head_word_size; /**< Head restore area size in words. */ +static uint32_t m_tail_word_size; /**< Tail restore area size in words. */ +static uint32_t m_current_page_id; /**< Variable for tracking the flash page being processed. */ +static uint32_t m_num_of_command_retries; /**< Variable for tracking flash operation retries upon flash operation failures. */ +static pstorage_module_table_t m_app_table[PSTORAGE_NUM_OF_PAGES]; /**< Registered application information table. */ +static uint32_t m_num_of_bytes_written; /**< Variable for tracking the number of bytes written by the store operation. */ +static uint32_t m_app_data_size; /**< Variable for storing the application command size parameter internally. */ +static uint32_t m_flags = 0; /**< Storage for boolean flags for state tracking. */ + +#ifdef PSTORAGE_RAW_MODE_ENABLE +static pstorage_raw_module_table_t m_raw_app_table; /**< Registered application information table for raw mode. */ +#endif // PSTORAGE_RAW_MODE_ENABLE + +// Required forward declarations. +static void cmd_process(void); +static void store_operation_execute(void); +static void app_notify(uint32_t result, cmd_queue_element_t * p_elem); +static void cmd_queue_element_init(uint32_t index); +static void cmd_queue_dequeue(void); +static void sm_state_change(pstorage_state_t new_state); +static void swap_sub_state_state_change(flash_swap_sub_state_t new_state); + +/**@brief Function for consuming a command queue element. + * + * @details Function for consuming a command queue element, which has been fully processed. + */ +static void command_queue_element_consume(void) +{ + // Initialize/free the element as it is now processed. + cmd_queue_element_init(m_cmd_queue.rp); + + // Adjust command queue state tracking variables. + --(m_cmd_queue.count); + if (++(m_cmd_queue.rp) == PSTORAGE_CMD_QUEUE_SIZE) + { + m_cmd_queue.rp = 0; + } +} + + +/**@brief Function for executing the finalization procedure for the command executed. + * + * @details Function for executing the finalization procedure for command executed, which includes + * notifying the application of command completion, consuming the command queue element, + * and changing the internal state. + */ +static void command_end_procedure_run(void) +{ + app_notify(NRF_SUCCESS, &m_cmd_queue.cmd[m_cmd_queue.rp]); + + command_queue_element_consume(); + + sm_state_change(STATE_IDLE); +} + + +/**@brief Function for idle state entry actions. + * + * @details Function for idle state entry actions, which include resetting relevant state data and + * scheduling any possible queued flash access operation. + */ +static void state_idle_entry_run(void) +{ + m_num_of_command_retries = 0; + m_num_of_bytes_written = 0; + + // Schedule any possible queued flash access operation. + cmd_queue_dequeue(); +} + + +/**@brief Function for notifying an application of command completion and transitioning to an error + * state. + * + * @param[in] result Result code of the operation for the application. + */ +static void app_notify_error_state_transit(uint32_t result) +{ + app_notify(result, &m_cmd_queue.cmd[m_cmd_queue.rp]); + sm_state_change(STATE_ERROR); +} + + +/**@brief Function for processing flash API error code. + * + * @param[in] err_code Error code from the flash API. + */ +static void flash_api_err_code_process(uint32_t err_code) +{ + switch (err_code) + { + case NRF_SUCCESS: + break; + + case NRF_ERROR_BUSY: + // Flash access operation was not accepted and must be reissued upon flash operation + // complete event. + m_flags |= MASK_FLASH_API_ERR_BUSY; + break; + + default: + // Complete the operation with appropriate result code and transit to an error state. + app_notify_error_state_transit(err_code); + break; + } +} + +/**@brief Function for writing data to flash. + * + * @param[in] p_dst Pointer to start of flash location to be written. + * @param[in] p_src Pointer to buffer with data to be written. + * @param[in] size_in_words Number of 32-bit words to write. + */ +static void flash_write(uint32_t * const p_dst, + uint32_t const * const p_src, + uint32_t size_in_words) +{ + flash_api_err_code_process(sd_flash_write(p_dst, p_src, size_in_words)); +} + + +/**@brief Function for writing data to flash upon store command. + * + * @details Function for writing data to flash upon executing store command. Data is written to + * flash in reverse order, meaning starting at the end. If the data that is to be written + * is greater than the flash page size, it will be fragmented to fit the flash page size. + */ +static void store_cmd_flash_write_execute(void) +{ + const cmd_queue_element_t * p_cmd = &m_cmd_queue.cmd[m_cmd_queue.rp]; + + if (p_cmd->size > SOC_MAX_WRITE_SIZE) + { + const uint32_t offset = p_cmd->size - PSTORAGE_FLASH_PAGE_SIZE; + flash_write((uint32_t *)(p_cmd->storage_addr.block_id + p_cmd->offset + offset), + (uint32_t *)(p_cmd->p_data_addr + offset), + PSTORAGE_FLASH_PAGE_SIZE / sizeof(uint32_t)); + + m_num_of_bytes_written = PSTORAGE_FLASH_PAGE_SIZE; + } + else + { + flash_write((uint32_t *)(p_cmd->storage_addr.block_id + p_cmd->offset), + (uint32_t *)(p_cmd->p_data_addr), + p_cmd->size / sizeof(uint32_t)); + + m_num_of_bytes_written = p_cmd->size; + } +} + + +/**@brief Function for store state entry action. + * + * @details Function for store state entry action, which includes writing data to a flash page. + */ +static void state_store_entry_run(void) +{ + store_cmd_flash_write_execute(); +} + + +/**@brief Function for data erase with swap state entry actions. + * + * @details Function for data erase with swap state entry actions. This includes adjusting relevant + * state and data variables and transitioning to the correct sub state. + */ +static void state_data_erase_swap_entry_run(void) +{ + m_flags &= ~MASK_TAIL_SWAP_DONE; + + const cmd_queue_element_t * p_cmd = &m_cmd_queue.cmd[m_cmd_queue.rp]; + const pstorage_block_t cmd_block_id = p_cmd->storage_addr.block_id; + + const uint32_t clear_start_page_id = cmd_block_id / PSTORAGE_FLASH_PAGE_SIZE; + m_current_page_id = clear_start_page_id; + + // @note: No need to include p_cmd->offset when calculating clear_end_page_id as: + // - clear API does not include offset parameter + // - update and store APIs are limited to operate on single block boundary thus the boolean + // clause ((m_head_word_size == 0) && is_more_than_one_page) below in this function will never + // evaluate as true as if is_more_than_one_page == true m_head_word_size is always != 0 + const uint32_t clear_end_page_id = (cmd_block_id + p_cmd->size - 1u) / + PSTORAGE_FLASH_PAGE_SIZE; + + if (clear_start_page_id == clear_end_page_id) + { + m_flags |= MASK_SINGLE_PAGE_OPERATION; + } + else + { + m_flags &= ~MASK_SINGLE_PAGE_OPERATION; + } + + if ((m_head_word_size == 0) && !(m_flags & MASK_SINGLE_PAGE_OPERATION)) + { + // No head restore required and clear/update area is shared by multiple flash pages, which + // means the current flash page does not have any tail area to restore. You can proceed with + // data page erase directly as no swap is needed for the current flash page. + swap_sub_state_state_change(STATE_ERASE_DATA_PAGE); + } + else + { + swap_sub_state_state_change(STATE_ERASE_SWAP); + } +} + + +/**@brief Function for erasing flash page. + * + * @param[in] page_number Page number of the page to be erased. + */ +static void flash_page_erase(uint32_t page_number) +{ + flash_api_err_code_process(sd_flash_page_erase(page_number)); +} + + +/**@brief Function for data erase state entry action. + * + * @details Function for data erase state entry action, which includes erasing the data flash page. + */ +static void state_data_erase_entry_run(void) +{ + flash_page_erase(m_current_page_id); +} + + +/**@brief Function for dispatching the correct application main state entry action. + */ +static void state_entry_action_run(void) +{ + switch (m_state) + { + case STATE_IDLE: + state_idle_entry_run(); + break; + + case STATE_STORE: + state_store_entry_run(); + break; + + case STATE_DATA_ERASE_WITH_SWAP: + state_data_erase_swap_entry_run(); + break; + + case STATE_DATA_ERASE: + state_data_erase_entry_run(); + break; + + default: + // No action needed. + break; + } +} + + +/**@brief Function for changing application main state and dispatching state entry action. + * + * @param[in] new_state New application main state to transit to. + */ +static void sm_state_change(pstorage_state_t new_state) +{ + m_state = new_state; + state_entry_action_run(); +} + + +/**@brief Function for swap erase state entry action. + * + * @details Function for swap erase state entry action, which includes erasing swap flash + * page. + */ +static void state_swap_erase_entry_run(void) +{ + flash_page_erase(PSTORAGE_SWAP_ADDR / PSTORAGE_FLASH_PAGE_SIZE); +} + + +/**@brief Function for write data to the swap state entry action. + * + * @details Function for write data to the swap state entry action, which includes writing the + * current data page to the swap flash page. + */ +static void state_write_data_swap_entry_run(void) +{ + // @note: There is room for further optimization here as there is only need to write the + // whole flash page to swap area if there is both head and tail area to be restored. In any + // other case we can omit some data from the head or end of the page as that is the clear area. + flash_write((uint32_t *)(PSTORAGE_SWAP_ADDR), + (uint32_t *)(m_current_page_id * PSTORAGE_FLASH_PAGE_SIZE), + PSTORAGE_FLASH_PAGE_SIZE / sizeof(uint32_t)); +} + + +/**@brief Function for erase data page state entry action. + * + * @details Function for erase data page state entry action, which includes erasing the data flash + * page. + */ +static void state_erase_data_page_entry_run(void) +{ + flash_page_erase(m_current_page_id); +} + + +/**@brief Function for restore tail state entry action. + * + * @details Function for restore tail state entry action, which includes writing the tail section + * back from swap to the data page. + */ +static void state_restore_tail_entry_run(void) +{ + const cmd_queue_element_t * p_cmd = &m_cmd_queue.cmd[m_cmd_queue.rp]; + const pstorage_block_t cmd_block_id = p_cmd->storage_addr.block_id; + + const uint32_t tail_offset = (cmd_block_id + p_cmd->size + p_cmd->offset) % + PSTORAGE_FLASH_PAGE_SIZE; + + flash_write((uint32_t *)(cmd_block_id + p_cmd->size + p_cmd->offset), + (uint32_t *)(PSTORAGE_SWAP_ADDR + tail_offset), + m_tail_word_size); +} + + +/**@brief Function for restore head state entry action. + * + * @details Function for restore head state entry action, which includes writing the head section + * back from swap to the data page. + */ +static void state_restore_head_entry_run(void) +{ + flash_write((uint32_t *)((m_current_page_id - 1u) * PSTORAGE_FLASH_PAGE_SIZE), + (uint32_t *)PSTORAGE_SWAP_ADDR, + m_head_word_size); +} + + +/**@brief Function for dispatching the correct swap sub state entry action. + */ +static void swap_sub_state_entry_action_run(void) +{ + static void (* const swap_sub_state_sm_lut[SWAP_SUB_STATE_MAX])(void) = + { + state_swap_erase_entry_run, + state_write_data_swap_entry_run, + state_erase_data_page_entry_run, + state_restore_tail_entry_run, + state_restore_head_entry_run + }; + + swap_sub_state_sm_lut[m_swap_sub_state](); +} + + +/**@brief Function for changing the swap sub state and dispatching state entry action. + * + * @param[in] new_state New swap sub state to transit to. + */ +static void swap_sub_state_state_change(flash_swap_sub_state_t new_state) +{ + m_swap_sub_state = new_state; + swap_sub_state_entry_action_run(); +} + + +/**@brief Function for initializing the command queue element. + * + * @param[in] index Index of the element to be initialized. + */ +static void cmd_queue_element_init(uint32_t index) +{ + // Internal function and checks on range of index can be avoided. + m_cmd_queue.cmd[index].op_code = INVALID_OPCODE; + m_cmd_queue.cmd[index].size = 0; + m_cmd_queue.cmd[index].storage_addr.module_id = PSTORAGE_NUM_OF_PAGES; + m_cmd_queue.cmd[index].storage_addr.block_id = 0; + m_cmd_queue.cmd[index].p_data_addr = NULL; + m_cmd_queue.cmd[index].offset = 0; +} + + +/**@brief Function for initializing the command queue. + */ +static void cmd_queue_init(void) +{ + m_cmd_queue.rp = 0; + m_cmd_queue.count = 0; + + for (uint32_t cmd_index = 0; cmd_index < PSTORAGE_CMD_QUEUE_SIZE; ++cmd_index) + { + cmd_queue_element_init(cmd_index); + } +} + + +/**@brief Function for enqueuing, and possibly dispatching, a flash access operation. + * + * @param[in] opcode Identifies the operation requested to be enqueued. + * @param[in] p_storage_addr Identifies the module and flash address on which the operation is + * requested. + * @param[in] p_data_addr Identifies the data address for flash access. + * @param[in] size Size in bytes of data requested for the access operation. + * @param[in] offset Offset within the flash memory block at which operation is requested. + * + * @retval NRF_SUCCESS Upon success. + * @retval NRF_ERROR_NO_MEM Upon failure, when no space is available in the command queue. + */ +static uint32_t cmd_queue_enqueue(uint8_t opcode, + pstorage_handle_t * p_storage_addr, + uint8_t * p_data_addr, + pstorage_size_t size, + pstorage_size_t offset) +{ + uint32_t err_code; + + if (m_cmd_queue.count != PSTORAGE_CMD_QUEUE_SIZE) + { + // Enqueue the command if it the queue is not full. + uint32_t write_index = m_cmd_queue.rp + m_cmd_queue.count; + + if (write_index >= PSTORAGE_CMD_QUEUE_SIZE) + { + write_index -= PSTORAGE_CMD_QUEUE_SIZE; + } + + m_cmd_queue.cmd[write_index].op_code = opcode; + m_cmd_queue.cmd[write_index].p_data_addr = p_data_addr; + m_cmd_queue.cmd[write_index].storage_addr = (*p_storage_addr); + m_cmd_queue.cmd[write_index].size = size; + m_cmd_queue.cmd[write_index].offset = offset; + + m_cmd_queue.count++; + + if (m_state == STATE_IDLE) + { + cmd_process(); + } + + err_code = NRF_SUCCESS; + } + else + { + err_code = NRF_ERROR_NO_MEM; + } + + return err_code; +} + + +/**@brief Function for dequeing a possible pending flash access operation. + */ +static void cmd_queue_dequeue(void) +{ + if ((m_cmd_queue.count != 0)) + { + cmd_process(); + } +} + + +/**@brief Function for notifying an application of command completion. + * + * @param[in] result Result code of the operation for the application. + * @param[in] p_elem Pointer to the command queue element for which this result was received. + */ +static void app_notify(uint32_t result, cmd_queue_element_t * p_elem) +{ + pstorage_ntf_cb_t ntf_cb; + const uint8_t op_code = p_elem->op_code; + +#ifdef PSTORAGE_RAW_MODE_ENABLE + if (p_elem->storage_addr.module_id == RAW_MODE_APP_ID) + { + ntf_cb = m_raw_app_table.cb; + } + else +#endif // PSTORAGE_RAW_MODE_ENABLE + { + ntf_cb = m_app_table[p_elem->storage_addr.module_id].cb; + } + + ntf_cb(&p_elem->storage_addr, op_code, result, p_elem->p_data_addr, m_app_data_size); +} + + +/**@brief Function for evaluating if a data page swap is required for the tail section on the + * current page. + * + * @retval true If data page swap is required. + * @retval false If data page swap is not required. + */ +static bool is_tail_data_page_swap_required(void) +{ + bool ret_value; + + // Extract id of the last page command is executed upon. + const cmd_queue_element_t * p_cmd = &m_cmd_queue.cmd[m_cmd_queue.rp]; + const pstorage_block_t cmd_block_id = p_cmd->storage_addr.block_id; + const uint32_t last_page_id = (cmd_block_id + p_cmd->size + p_cmd->offset - 1u) / + PSTORAGE_FLASH_PAGE_SIZE; + + // If tail section area exists and the current page is the last page then tail data page swap is + // required. + if ((m_tail_word_size != 0) && (m_current_page_id == last_page_id)) + { + ret_value = true; + } + else + { + ret_value = false; + } + + return ret_value; +} + + +/**@brief Function for performing post processing for the update and clear commands. + * + * @details Function for performing post processing for the update and clear commands, which implies + * executing the correct execution path depending on the command. + */ +static void clear_post_processing_run(void) +{ + const cmd_queue_element_t * p_cmd = &m_cmd_queue.cmd[m_cmd_queue.rp]; + + if (p_cmd->op_code != PSTORAGE_UPDATE_OP_CODE) + { + command_end_procedure_run(); + } + else + { + store_operation_execute(); + } +} + + +/**@brief Function for doing swap sub state exit action. + */ +static void swap_sub_sm_exit_action_run(void) +{ + clear_post_processing_run(); +} + + +/**@brief Function for evaluating if the page erase operation is required for the current page. + * + * @retval true If page erase is required. + * @retval false If page erase is not required. + */ +static bool is_page_erase_required(void) +{ + bool ret; + + const cmd_queue_element_t * p_cmd = &m_cmd_queue.cmd[m_cmd_queue.rp]; + const pstorage_block_t cmd_block_id = p_cmd->storage_addr.block_id; + const uint32_t id_last_page_to_be_cleared = (cmd_block_id + p_cmd->size + + p_cmd->offset - 1u) / + PSTORAGE_FLASH_PAGE_SIZE; + + // True if: + // - current page is not the last page OR + // - current page is the last page AND no tail exists + if ((m_current_page_id < id_last_page_to_be_cleared) || + ((m_current_page_id == id_last_page_to_be_cleared) && (m_tail_word_size == 0))) + { + ret = true; + } + else + { + ret = false; + } + + return ret; +} + + +/**@brief Function for reissuing the last flash operation request, which was rejected by the flash + * API, in swap sub sate. + */ +static void swap_sub_state_err_busy_process(void) +{ + // Reissue the request by doing a self transition to the current state. + m_flags &= ~MASK_FLASH_API_ERR_BUSY; + swap_sub_state_state_change(m_swap_sub_state); +} + + +/**@brief Function for doing restore head state action upon flash operation success event. + * + * @details Function for doing restore head state action upon flash operation success event, which + * includes making a state transition depending on the current state. + */ +static void head_restore_state_run(void) +{ + if (!(m_flags & MASK_FLASH_API_ERR_BUSY)) + { + if (is_tail_data_page_swap_required()) + { + // Additional data page needs to be swapped for tail section as we are clearing a block, + // which is shared between 2 flash pages. + + // Adjust variables to ensure correct state transition path is taken after the tail + // section swap has completed. + m_head_word_size = 0; + m_flags |= MASK_TAIL_SWAP_DONE; + + swap_sub_state_state_change(STATE_ERASE_SWAP); + } + else if (is_page_erase_required()) + { + // Additional page erase operation is required. + + // Adjust variable to ensure correct state transition path is taken after the additional + // page erase operation has completed. + m_head_word_size = 0; + swap_sub_state_state_change(STATE_ERASE_DATA_PAGE); + } + else if (m_tail_word_size != 0) + { + // Proceed with restoring tail from swap to data page. + swap_sub_state_state_change(STATE_RESTORE_TAIL); + } + else + { + // Swap statemachine execution end reached. + swap_sub_sm_exit_action_run(); + } + } + else + { + // As operation request was rejected by the flash API reissue the request. + swap_sub_state_err_busy_process(); + } +} + + +/**@brief Function for doing restore tail state action upon flash operation success event. + */ +static void tail_restore_state_run(void) +{ + if (!(m_flags & MASK_FLASH_API_ERR_BUSY)) + { + swap_sub_sm_exit_action_run(); + } + else + { + // As operation request was rejected by the flash API reissue the request. + swap_sub_state_err_busy_process(); + } +} + + +/**@brief Function for doing data page erase state action upon a flash operation success event. + * + * @details Function for doing data page erase state action upon a flash operation success event, + * which includes making a state transit to a new state depending on the current state. + */ +static void data_page_erase_state_run(void) +{ + if (!(m_flags & MASK_FLASH_API_ERR_BUSY)) + { + ++m_current_page_id; + + if (m_head_word_size != 0) + { + swap_sub_state_state_change(STATE_RESTORE_HEAD); + } + else if (is_page_erase_required()) + { + // Additional page erase operation is required. + swap_sub_state_state_change(STATE_ERASE_DATA_PAGE); + } + else if (m_tail_word_size != 0) + { + if (!(m_flags & MASK_TAIL_SWAP_DONE)) + { + // Tail area restore is required and we have not yet written the relevant data page + // to swap area. Start the process of writing the data page to swap. + m_flags |= MASK_TAIL_SWAP_DONE; + + swap_sub_state_state_change(STATE_ERASE_SWAP); + } + else + { + // Tail area restore is required and we have already written the relevant data page + // to swap area. Proceed by restoring the tail area. + swap_sub_state_state_change(STATE_RESTORE_TAIL); + } + } + else + { + swap_sub_sm_exit_action_run(); + } + } + else + { + // As operation request was rejected by the flash API reissue the request. + swap_sub_state_err_busy_process(); + } +} + + +/**@brief Function for doing data to swap write state action upon flash operation success event. + */ +static void data_to_swap_write_state_run(void) +{ + if (!(m_flags & MASK_FLASH_API_ERR_BUSY)) + { + // If the operation is executed only on 1 single flash page it automatically means that tail + // area is written to the swap, which we store to flags. + if (m_flags & MASK_SINGLE_PAGE_OPERATION) + { + m_flags |= MASK_TAIL_SWAP_DONE; + } + + swap_sub_state_state_change(STATE_ERASE_DATA_PAGE); + } + else + { + // As operation request was rejected by the flash API reissue the request. + swap_sub_state_err_busy_process(); + } +} + + +/**@brief Function for doing swap erase state action upon flash operation success event. + */ +static void swap_erase_state_run(void) +{ + if (!(m_flags & MASK_FLASH_API_ERR_BUSY)) + { + swap_sub_state_state_change(STATE_WRITE_DATA_TO_SWAP); + } + else + { + // As operation request was rejected by the flash API reissue the request. + swap_sub_state_err_busy_process(); + } +} + + +/**@brief Function for dispatching the correct state action for data erase with a swap composite +* state upon a flash operation success event. + */ +static void swap_sub_state_sm_run(void) +{ + static void (* const swap_sub_state_sm_lut[SWAP_SUB_STATE_MAX])(void) = + { + swap_erase_state_run, + data_to_swap_write_state_run, + data_page_erase_state_run, + tail_restore_state_run, + head_restore_state_run + }; + + swap_sub_state_sm_lut[m_swap_sub_state](); +} + + +/**@brief Function for reissuing the last flash operation request, which was rejected by the flash + * API, in main sate. + */ +static void main_state_err_busy_process(void) +{ + // Reissue the request by doing a self transition to the current state. + m_flags &= ~MASK_FLASH_API_ERR_BUSY; + sm_state_change(m_state); +} + + +/**@brief Function for doing erase state action upon flash operation success event. + * + * @details Function for doing erase state action upon flash operation success event, which includes + * making a state transition depending on the current state. + */ +static void erase_sub_state_sm_run(void) +{ + if (!(m_flags & MASK_FLASH_API_ERR_BUSY)) + { + // Clear operation request has succeeded. + ++m_current_page_id; + + if (!is_page_erase_required()) + { + clear_post_processing_run(); + } + else + { + // All required flash pages have not yet been erased, issue erase by doing a self + // transit. + sm_state_change(m_state); + } + } + else + { + // As operation request was rejected by the flash API reissue the request. + main_state_err_busy_process(); + } +} + + +/**@brief Function for doing store state action upon flash operation success event. + */ +static void store_sub_state_sm_run(void) +{ + if (!(m_flags & MASK_FLASH_API_ERR_BUSY)) + { + // As write operation request has succeeded, adjust the size tracking state information + // accordingly. + cmd_queue_element_t * p_cmd = &m_cmd_queue.cmd[m_cmd_queue.rp]; + p_cmd->size -= m_num_of_bytes_written; + + if (p_cmd->size == 0) + { + command_end_procedure_run(); + } + else + { + store_cmd_flash_write_execute(); + } + } + else + { + // As operation request was rejected by the flash API reissue the request. + main_state_err_busy_process(); + } +} + + +/**@brief Function for doing action upon flash operation success event. + */ +static void flash_operation_success_run(void) +{ + switch (m_state) + { + case STATE_STORE: + store_sub_state_sm_run(); + break; + + case STATE_DATA_ERASE: + erase_sub_state_sm_run(); + break; + + case STATE_DATA_ERASE_WITH_SWAP: + swap_sub_state_sm_run(); + break; + + default: + // No implementation needed. + break; + } +} + + +/**@brief Function for doing action upon flash operation failure event. + * + * @details Function for doing action upon flash operation failure event, which includes retrying + * the last operation or if retry count has been reached completing the operation with + * appropriate result code and transitioning to an error state. + * + * @note The command is not removed from the command queue, which will result to stalling of the + * command pipeline and the appropriate application recovery procedure for this is to reset + * the system by issuing @ref pstorage_init which will also result to flushing of the + * command queue. + */ +static void flash_operation_failure_run(void) +{ + if (++m_num_of_command_retries != SD_CMD_MAX_TRIES) + { + // Retry the last operation by doing a self transition to the current state. + + if (m_state != STATE_DATA_ERASE_WITH_SWAP) + { + sm_state_change(m_state); + } + else + { + swap_sub_state_state_change(m_swap_sub_state); + } + } + else + { + // Complete the operation with appropriate result code and transit to an error state. + app_notify_error_state_transit(NRF_ERROR_TIMEOUT); + } +} + + +/**@brief Function for handling flash access result events. + * + * @param[in] sys_evt System event to be handled. + */ +void pstorage_sys_event_handler(uint32_t sys_evt) +{ + if (m_state != STATE_IDLE && m_state != STATE_ERROR) + { + switch (sys_evt) + { + case NRF_EVT_FLASH_OPERATION_SUCCESS: + flash_operation_success_run(); + break; + + case NRF_EVT_FLASH_OPERATION_ERROR: + if (!(m_flags & MASK_FLASH_API_ERR_BUSY)) + { + flash_operation_failure_run(); + } + else + { + // As our last flash operation request was rejected by the flash API reissue the + // request by doing same code execution path as for flash operation sucess + // event. This will promote code reuse in the implementation. + flash_operation_success_run(); + } + break; + + default: + // No implementation needed. + break; + } + + } +} + + +/**@brief Function for calculating the tail area size in number of 32-bit words. + * + * @param[in] cmd_end_of_storage_address End of storage area within the scope of the command. + * @param[in] end_of_storage_address End of allocated storage area for the application. + */ +static void tail_word_size_calculate(pstorage_size_t cmd_end_of_storage_address, + pstorage_size_t end_of_storage_address) +{ + // Two different cases to resolve when calculating correct size for restore tail section: + // 1) End of storage area and command end area are in the same page. + // 2) End of storage area and command end area are not in the same page. + + const uint32_t end_of_storage_area_page = end_of_storage_address / + PSTORAGE_FLASH_PAGE_SIZE; + const uint32_t command_end_of_storage_area_page = cmd_end_of_storage_address / + PSTORAGE_FLASH_PAGE_SIZE; + + if (end_of_storage_area_page == command_end_of_storage_area_page) + { + //lint -e{573} suppress "Signed-unsigned mix with divide". + m_tail_word_size = (end_of_storage_address - cmd_end_of_storage_address) / sizeof(uint32_t); + } + else + { + //lint -e{573} suppress "Signed-unsigned mix with divide". + m_tail_word_size = (PSTORAGE_FLASH_PAGE_SIZE - + (cmd_end_of_storage_address % PSTORAGE_FLASH_PAGE_SIZE)) / + sizeof(uint32_t); + } +} + + +/**@brief Function for executing the clear operation. + */ +static void clear_operation_execute(void) +{ + const cmd_queue_element_t * p_cmd = &m_cmd_queue.cmd[m_cmd_queue.rp]; + const pstorage_block_t cmd_block_id = p_cmd->storage_addr.block_id; + + const pstorage_size_t block_size = m_app_table[p_cmd->storage_addr.module_id].block_size; + const pstorage_size_t block_count = m_app_table[p_cmd->storage_addr.module_id].block_count; + const pstorage_block_t block_base_id = m_app_table[p_cmd->storage_addr.module_id].base_id; + + const bool is_start_address_page_aligned = (cmd_block_id % PSTORAGE_FLASH_PAGE_SIZE) == 0; + + // Calculate the end (1 beyond allocated area) for complete storage area and to the area only + // within scope of this command. + const pstorage_block_t end_of_storage_address = block_base_id + (block_size * block_count); + const pstorage_block_t cmd_end_of_storage_address = cmd_block_id + p_cmd->size + p_cmd->offset; + + // Zero tail to make sure no extra erase is done erroneously. + m_tail_word_size = 0; + + // If the following is true no swap access is needed: + // - 1st logical test covers the case of: clear/update 1 complete single page. + // - 2nd logical test covers the case of: + // 1) Clear/update last allocated page and page is not full (page can't be shared between + // multiple clients so the end of the page is unused area). + // 2) Clear/update all allocated storage. + if ((is_start_address_page_aligned && (p_cmd->size == PSTORAGE_FLASH_PAGE_SIZE)) || + (is_start_address_page_aligned && (cmd_end_of_storage_address == end_of_storage_address) && + (p_cmd->offset == 0)) || (p_cmd->storage_addr.module_id == RAW_MODE_APP_ID)) + { + // Nothing to put to the swap and we can just erase the pages(s). + + m_current_page_id = cmd_block_id / PSTORAGE_FLASH_PAGE_SIZE; + + sm_state_change(STATE_DATA_ERASE); + } + else + { + // Not all the blocks for the module can be cleared, we need to use swap page for storing + // data temporarily. + + m_head_word_size = ((cmd_block_id + p_cmd->offset) % PSTORAGE_FLASH_PAGE_SIZE) / + sizeof(uint32_t); + + const bool is_cmd_end_address_page_aligned = ((cmd_end_of_storage_address % + PSTORAGE_FLASH_PAGE_SIZE) == 0); + if ((cmd_end_of_storage_address != end_of_storage_address) && + !is_cmd_end_address_page_aligned) + { + // When command area is not equal to end of the storage allocation area and not ending + // to page boundary there is a need to restore the tail area. + tail_word_size_calculate(cmd_end_of_storage_address, end_of_storage_address); + } + + sm_state_change(STATE_DATA_ERASE_WITH_SWAP); + } +} + + +/**@brief Function for executing the store operation. + */ +static void store_operation_execute(void) +{ + sm_state_change(STATE_STORE); +} + + +/**@brief Function for executing the update operation. + */ +static void update_operation_execute(void) +{ + clear_operation_execute(); +} + + +/**@brief Function for dispatching the flash access operation. + */ +static void cmd_process(void) +{ + const cmd_queue_element_t * p_cmd = &m_cmd_queue.cmd[m_cmd_queue.rp]; + m_app_data_size = p_cmd->size; + + switch (p_cmd->op_code) + { + case PSTORAGE_STORE_OP_CODE: + store_operation_execute(); + break; + + case PSTORAGE_CLEAR_OP_CODE: + clear_operation_execute(); + break; + + case PSTORAGE_UPDATE_OP_CODE: + update_operation_execute(); + break; + + default: + // No action required. + break; + } +} + + +uint32_t pstorage_init(void) +{ + cmd_queue_init(); + + m_next_app_instance = 0; + m_next_page_addr = PSTORAGE_DATA_START_ADDR; + m_current_page_id = 0; + + for (uint32_t index = 0; index < PSTORAGE_NUM_OF_PAGES; index++) + { + m_app_table[index].cb = NULL; + m_app_table[index].block_size = 0; + m_app_table[index].block_count = 0; + } + +#ifdef PSTORAGE_RAW_MODE_ENABLE + m_raw_app_table.cb = NULL; +#endif //PSTORAGE_RAW_MODE_ENABLE + + m_state = STATE_IDLE; + m_num_of_command_retries = 0; + m_flags = 0; + m_num_of_bytes_written = 0; + m_flags |= MASK_MODULE_INITIALIZED; + + return NRF_SUCCESS; +} + + +uint32_t pstorage_register(pstorage_module_param_t * p_module_param, + pstorage_handle_t * p_block_id) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_module_param); + NULL_PARAM_CHECK(p_block_id); + NULL_PARAM_CHECK(p_module_param->cb); + BLOCK_SIZE_CHECK(p_module_param->block_size); + BLOCK_COUNT_CHECK(p_module_param->block_count, p_module_param->block_size); + + if (!((p_module_param->block_size % sizeof(uint32_t)) == 0)) + { + return NRF_ERROR_INVALID_PARAM; + } + + if (m_next_app_instance == PSTORAGE_NUM_OF_PAGES) + { + return NRF_ERROR_NO_MEM; + } + + p_block_id->module_id = m_next_app_instance; + p_block_id->block_id = m_next_page_addr; + + m_app_table[m_next_app_instance].base_id = p_block_id->block_id; + m_app_table[m_next_app_instance].cb = p_module_param->cb; + m_app_table[m_next_app_instance].block_size = p_module_param->block_size; + m_app_table[m_next_app_instance].block_count = p_module_param->block_count; + + // Calculate number of flash pages allocated for the device and adjust next free page address. + /*lint -save -e666 */ + const uint32_t page_count = CEIL_DIV((p_module_param->block_size * p_module_param->block_count), + PSTORAGE_FLASH_PAGE_SIZE); + /*lint -restore */ + m_next_page_addr += page_count * PSTORAGE_FLASH_PAGE_SIZE; + + ++m_next_app_instance; + + return NRF_SUCCESS; +} + + +uint32_t pstorage_block_identifier_get(pstorage_handle_t * p_base_id, + pstorage_size_t block_num, + pstorage_handle_t * p_block_id) +{ + pstorage_handle_t temp_id; + + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_base_id); + NULL_PARAM_CHECK(p_block_id); + MODULE_ID_RANGE_CHECK(p_base_id); + + temp_id = (*p_base_id); + temp_id.block_id += (block_num * MODULE_BLOCK_SIZE(p_base_id)); + + BLOCK_ID_RANGE_CHECK(&temp_id); + + (*p_block_id) = temp_id; + + return NRF_SUCCESS; +} + + +uint32_t pstorage_store(pstorage_handle_t * p_dest, + uint8_t * p_src, + pstorage_size_t size, + pstorage_size_t offset) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_src); + NULL_PARAM_CHECK(p_dest); + MODULE_ID_RANGE_CHECK(p_dest); + BLOCK_ID_RANGE_CHECK(p_dest); + SIZE_CHECK(p_dest, size); + OFFSET_CHECK(p_dest, offset, size); + + if ((!is_word_aligned(p_src)) || + (!is_word_aligned((void *)(uint32_t)offset)) || + (!is_word_aligned((uint32_t *)p_dest->block_id))) + { + return NRF_ERROR_INVALID_ADDR; + } + + return cmd_queue_enqueue(PSTORAGE_STORE_OP_CODE, p_dest, p_src, size, offset); +} + + +uint32_t pstorage_update(pstorage_handle_t * p_dest, + uint8_t * p_src, + pstorage_size_t size, + pstorage_size_t offset) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_src); + NULL_PARAM_CHECK(p_dest); + MODULE_ID_RANGE_CHECK(p_dest); + BLOCK_ID_RANGE_CHECK(p_dest); + SIZE_CHECK(p_dest, size); + OFFSET_CHECK(p_dest, offset, size); + + if ((!is_word_aligned(p_src)) || + (!is_word_aligned((void *)(uint32_t)offset)) || + (!is_word_aligned((uint32_t *)p_dest->block_id))) + { + return NRF_ERROR_INVALID_ADDR; + } + + return cmd_queue_enqueue(PSTORAGE_UPDATE_OP_CODE, p_dest, p_src, size, offset); +} + + +uint32_t pstorage_load(uint8_t * p_dest, + pstorage_handle_t * p_src, + pstorage_size_t size, + pstorage_size_t offset) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_src); + NULL_PARAM_CHECK(p_dest); + MODULE_ID_RANGE_CHECK(p_src); + BLOCK_ID_RANGE_CHECK(p_src); + SIZE_CHECK(p_src, size); + OFFSET_CHECK(p_src, offset, size); + + if ((!is_word_aligned(p_dest)) || + (!is_word_aligned((void *)(uint32_t)offset)) || + (!is_word_aligned((uint32_t *)p_src->block_id))) + { + return NRF_ERROR_INVALID_ADDR; + } + + memcpy(p_dest, (((uint8_t *)p_src->block_id) + offset), size); + + m_app_table[p_src->module_id].cb(p_src, PSTORAGE_LOAD_OP_CODE, NRF_SUCCESS, p_dest, size); + + return NRF_SUCCESS; +} + + +uint32_t pstorage_clear(pstorage_handle_t * p_dest, pstorage_size_t size) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_dest); + MODULE_ID_RANGE_CHECK(p_dest); + BLOCK_ID_RANGE_CHECK(p_dest); + + if ((!is_word_aligned((uint32_t *)p_dest->block_id))) + { + return NRF_ERROR_INVALID_ADDR; + } + + // Check is the area starting from block_id multiple of block_size. + if ( + !( + ((p_dest->block_id - m_app_table[p_dest->module_id].base_id) % + m_app_table[p_dest->module_id].block_size) == 0 + ) + ) + { + return NRF_ERROR_INVALID_PARAM; + } + + // Check is requested size multiple of registered block size or 0. + if (((size % m_app_table[p_dest->module_id].block_size) != 0) || (size == 0)) + { + return NRF_ERROR_INVALID_PARAM; + } + + const uint32_t registered_allocation_size = m_app_table[p_dest->module_id].block_size * + m_app_table[p_dest->module_id].block_count; + + const pstorage_block_t clear_request_end_address = p_dest->block_id + size; + const pstorage_block_t allocation_end_address = m_app_table[p_dest->module_id].base_id + + registered_allocation_size; + // Check if request would lead to a buffer overrun. + if (clear_request_end_address > allocation_end_address) + { + return NRF_ERROR_INVALID_PARAM; + } + + return cmd_queue_enqueue(PSTORAGE_CLEAR_OP_CODE, p_dest, NULL, size, 0); +} + + +uint32_t pstorage_access_status_get(uint32_t * p_count) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_count); + + (*p_count) = m_cmd_queue.count; + + return NRF_SUCCESS; +} + +#ifdef PSTORAGE_RAW_MODE_ENABLE + +uint32_t pstorage_raw_register(pstorage_module_param_t * p_module_param, + pstorage_handle_t * p_block_id) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_module_param); + NULL_PARAM_CHECK(p_block_id); + NULL_PARAM_CHECK(p_module_param->cb); + + if (m_raw_app_table.cb != NULL) + { + return NRF_ERROR_NO_MEM; + } + + p_block_id->module_id = RAW_MODE_APP_ID; + m_raw_app_table.cb = p_module_param->cb; + + return NRF_SUCCESS; +} + + +uint32_t pstorage_raw_store(pstorage_handle_t * p_dest, + uint8_t * p_src, + pstorage_size_t size, + pstorage_size_t offset) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_src); + NULL_PARAM_CHECK(p_dest); + MODULE_RAW_HANDLE_CHECK(p_dest); + + if (size == 0) + { + return NRF_ERROR_INVALID_PARAM; + } + + // Verify word alignment. + if ((!is_word_aligned(p_src)) || + (!is_word_aligned((void *)(uint32_t)size)) || + (!is_word_aligned((void *)(uint32_t)offset)) || + (!is_word_aligned((void *)(p_dest->block_id)))) + { + return NRF_ERROR_INVALID_ADDR; + } + + return cmd_queue_enqueue(PSTORAGE_STORE_OP_CODE, p_dest, p_src, size, offset); +} + + +uint32_t pstorage_raw_clear(pstorage_handle_t * p_dest, pstorage_size_t size) +{ + VERIFY_MODULE_INITIALIZED(); + NULL_PARAM_CHECK(p_dest); + MODULE_RAW_HANDLE_CHECK(p_dest); + + if ((!is_word_aligned((uint32_t *)p_dest->block_id))) + { + return NRF_ERROR_INVALID_ADDR; + } + + return cmd_queue_enqueue(PSTORAGE_CLEAR_OP_CODE, p_dest, NULL, size, 0); +} + +#endif // PSTORAGE_RAW_MODE_ENABLE diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.h new file mode 100644 index 0000000000..7ecd77b314 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.h @@ -0,0 +1,401 @@ +/* + * 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. + * + */ + +/**@file + * + * @defgroup persistent_storage Persistent Storage Interface + * @{ + * @ingroup app_common + * @brief Abstracted flash interface. + * + * @details An abstracted interface is provided by the module to easily port the application and + * SDK modules to an alternate option. This ensures that the SDK and application are moved + * to alternate persistent storage instead of the one provided by default. + */ + +#ifndef PSTORAGE_H__ +#define PSTORAGE_H__ + +#include "pstorage_platform.h" + + +/**@defgroup ps_opcode Persistent Storage Access Operation Codes + * @{ + * @brief Persistent Storage Access Operation Codes. + * + * @details Persistent Storage Access Operation Codes are used by Persistent storage operation + * completion callback @ref pstorage_ntf_cb_t to identify the operation type requested by + * the application. + */ +#define PSTORAGE_STORE_OP_CODE 0x01 /**< Store Operation type. */ +#define PSTORAGE_LOAD_OP_CODE 0x02 /**< Load Operation type. */ +#define PSTORAGE_CLEAR_OP_CODE 0x03 /**< Clear Operation type. */ +#define PSTORAGE_UPDATE_OP_CODE 0x04 /**< Update Operation type. */ + +/**@} */ + +/**@defgroup pstorage_data_types Persistent Memory Interface Data Types + * @{ + * @brief Data Types needed for interfacing with persistent memory. + * + * @details Data Types needed for interfacing with persistent memory. + */ + +/**@brief Persistent storage operation completion callback function type. + * + * @details The persistent storage operation completion callback is used by the interface to report + * success or failure of a flash operation. Since data is not copied for a store operation, + * a callback is an indication that the resident memory can now be reused or freed. + * + * @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, + uint8_t op_code, + uint32_t result, + uint8_t * p_data, + uint32_t data_len); + +/**@brief Struct containing module registration context. */ +typedef struct +{ + 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, and each entry is 64 bytes in size, + * it can request 10 blocks with a block size of 64 bytes. The module can also request one block that is 640 bytes depending + * on how it would like to access or alter the memory in persistent memory. + * The first option is preferred when it is a single entry that needs to be updated often and doesn't impact the other entries. + * The second option is preferred when table entries are not changed individually but have a common point of loading and storing + * data. */ + pstorage_size_t block_count; /** Number of blocks requested by the module; minimum values is 1. */ +} pstorage_module_param_t; + +/**@} */ + +/**@defgroup pstorage_routines Persistent Storage Access Routines + * @{ + * @brief Functions/Interface SDK modules used to persistently store data. + * + * @details Interface for the Application and SDK modules to load/store information persistently. + * Note: While implementation of each of the persistent storage access functions + * depends on the system and is specific to system/solution, the signature of the + * interface routines should not be altered. + */ + +/**@brief Function for initializing the module. + * + * @details Function for initializing the module. This function is called once before any other APIs + * of the module are used. + * + * @retval NRF_SUCCESS Operation success. + */ +uint32_t pstorage_init(void); + +/**@brief Function for registering with persistent storage interface. + * + * @param[in] p_module_param Module registration parameter. + * @param[out] p_block_id Block identifier to identify persistent memory blocks when + * registration succeeds. Application is expected to use the block IDs + * for subsequent operations on requested persistent memory. Maximum + * registrations permitted is determined by the configuration of the + * parameter PSTORAGE_NUM_OF_PAGES. If more than one memory block is + * requested, the identifier provided here is the base identifier for the + * first block and used to identify the subsequent block. The application + * uses \@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. This way 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. Additional registrations can't be + * supported. + */ +uint32_t pstorage_register(pstorage_module_param_t * p_module_param, + pstorage_handle_t * p_block_id); + +/**@brief Function for getting block ID with reference to base block identifier provided at the time + * of registration. + * + * @details Function to get the block ID with reference to base block identifier provided at the + * time of registration. + * If more than one memory block was requested when registering, the identifier provided + * here is the base identifier for the first block which is used to identify subsequent + * blocks. The application shall use this routine to get the block identifier, providing + * input as 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. + * 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] block_num Block Number, with first block numbered zero. + * @param[out] p_block_id Block identifier for the block number requested when the API succeeds. + * + * @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. + */ +uint32_t pstorage_block_identifier_get(pstorage_handle_t * p_base_id, + pstorage_size_t block_num, + pstorage_handle_t * p_block_id); + +/**@brief Function for persistently storing data of length 'size' contained in the 'p_src' address + * in the 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. API assumes this to be 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 and size + + * offset must be <= block size. + * @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, then 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 the 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_store(pstorage_handle_t * p_dest, + uint8_t * p_src, + pstorage_size_t size, + pstorage_size_t offset); + +/**@brief Function for updating persistently stored data of length 'size' contained in the 'p_src' + * address in the storage module at 'p_dest' address. + * + * @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 + * memory and no intermediate copy of data is made by the API. + * @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. + * For example, if within a block of 100 bytes, the application wishes to + * write 20 bytes at an offset of 12 bytes, then 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 the 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_update(pstorage_handle_t * p_dest, + uint8_t * p_src, + pstorage_size_t size, + pstorage_size_t offset); + +/**@brief Function for loading persistently stored data of length 'size' from 'p_src' address + * 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_src Source where data is loaded from persistent memory. + * @param[in] size Size of data to be loaded from persistent memory expressed in bytes. + * Should be word aligned. + * @param[in] offset Offset in bytes, to be applied when loading from the block. + * For example, if within a block of 100 bytes, the application wishes to + * load 20 bytes from offset of 12 bytes, then this field should be set to 12. + * Should 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. + */ +uint32_t pstorage_load(uint8_t * p_dest, + pstorage_handle_t * p_src, + pstorage_size_t size, + pstorage_size_t offset); + +/**@brief Function for clearing data in persistent memory. + * + * @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. + * 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 the application module is used (blocks * block size) in combination with + * the identifier for the first block in the module, all blocks in the + * module will be erased. Must be multiple of block size. + * + * @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. + * + * @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_clear(pstorage_handle_t * p_base_id, pstorage_size_t size); + +/**@brief Function for getting the number of pending operations with the module. + * + * @param[out] p_count Number of storage operations pending with the module. If 0, there are no + * outstanding requests. + * + * @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. + */ +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 + +/**@} */ +/**@} */ + +#endif // PSTORAGE_H__ + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader.c new file mode 100644 index 0000000000..82205be837 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader.c @@ -0,0 +1,382 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "bootloader.h" +#include "bootloader_types.h" +#include "bootloader_util.h" +#include "bootloader_settings.h" +#include "dfu.h" +#include "dfu_transport.h" +#include "nrf.h" +#include "app_error.h" +#include "nrf_sdm.h" +#include "nrf_mbr.h" +#include "nordic_common.h" +#include "crc16.h" +#include "pstorage.h" +#include "app_scheduler.h" +#include "nrf_delay.h" +#include "sdk_common.h" + +#define IRQ_ENABLED 0x01 /**< Field identifying if an interrupt is enabled. */ +#define MAX_NUMBER_INTERRUPTS 32 /**< Maximum number of interrupts available. */ + +/**@brief Enumeration for specifying current bootloader status. + */ +typedef enum +{ + BOOTLOADER_UPDATING, /**< Bootloader status for indicating that an update is in progress. */ + BOOTLOADER_SETTINGS_SAVING, /**< Bootloader status for indicating that saving of bootloader settings is in progress. */ + BOOTLOADER_COMPLETE, /**< Bootloader status for indicating that all operations for the update procedure has completed and it is safe to reset the system. */ + BOOTLOADER_TIMEOUT, /**< Bootloader status field for indicating that a timeout has occured and current update process should be aborted. */ + BOOTLOADER_RESET, /**< Bootloader status field for indicating that a reset has been requested and current update process should be aborted. */ +} bootloader_status_t; + +static pstorage_handle_t m_bootsettings_handle; /**< Pstorage handle to use for registration and identifying the bootloader module on subsequent calls to the pstorage module for load and store of bootloader setting in flash. */ +static bootloader_status_t m_update_status; /**< Current update status for the bootloader module to ensure correct behaviour when updating settings and when update completes. */ + +/**@brief Function for handling callbacks from pstorage module. + * + * @details Handles pstorage results for clear and storage operation. For detailed description of + * the parameters provided with the callback, please refer to \ref pstorage_ntf_cb_t. + */ +static void pstorage_callback_handler(pstorage_handle_t * p_handle, + uint8_t op_code, + uint32_t result, + uint8_t * p_data, + uint32_t data_len) +{ + // If we are in BOOTLOADER_SETTINGS_SAVING state and we receive an PSTORAGE_STORE_OP_CODE + // response then settings has been saved and update has completed. + if ((m_update_status == BOOTLOADER_SETTINGS_SAVING) && (op_code == PSTORAGE_STORE_OP_CODE)) + { + m_update_status = BOOTLOADER_COMPLETE; + } + + APP_ERROR_CHECK(result); +} + + +/**@brief Function for waiting for events. + * + * @details This function will place the chip in low power mode while waiting for events from + * the SoftDevice or other peripherals. When interrupted by an event, it will call the + * @ref app_sched_execute function to process the received event. This function will return + * when the final state of the firmware update is reached OR when a tear down is in + * progress. + */ +static void wait_for_events(void) +{ + for (;;) + { + // Wait in low power state for any events. + uint32_t err_code = sd_app_evt_wait(); + APP_ERROR_CHECK(err_code); + + // Event received. Process it from the scheduler. + app_sched_execute(); + + if ((m_update_status == BOOTLOADER_COMPLETE) || + (m_update_status == BOOTLOADER_TIMEOUT) || + (m_update_status == BOOTLOADER_RESET)) + { + // When update has completed or a timeout/reset occured we will return. + return; + } + } +} + + +bool bootloader_app_is_valid(uint32_t app_addr) +{ + const bootloader_settings_t * p_bootloader_settings; + + // There exists an application in CODE region 1. + if (*((uint32_t *)app_addr) == EMPTY_FLASH_MASK) + { + return false; + } + + bool success = false; + + bootloader_util_settings_get(&p_bootloader_settings); + + // The application in CODE region 1 is flagged as valid during update. + if (p_bootloader_settings->bank_0 == BANK_VALID_APP) + { + uint16_t image_crc = 0; + + // A stored crc value of 0 indicates that CRC checking is not used. + if (p_bootloader_settings->bank_0_crc != 0) + { + image_crc = crc16_compute((uint8_t *)DFU_BANK_0_REGION_START, + p_bootloader_settings->bank_0_size, + NULL); + } + + success = (image_crc == p_bootloader_settings->bank_0_crc); + } + + return success; +} + + +static void bootloader_settings_save(bootloader_settings_t * p_settings) +{ + uint32_t err_code = pstorage_clear(&m_bootsettings_handle, sizeof(bootloader_settings_t)); + APP_ERROR_CHECK(err_code); + + err_code = pstorage_store(&m_bootsettings_handle, + (uint8_t *)p_settings, + sizeof(bootloader_settings_t), + 0); + APP_ERROR_CHECK(err_code); +} + + +void bootloader_dfu_update_process(dfu_update_status_t update_status) +{ + static bootloader_settings_t settings; + const bootloader_settings_t * p_bootloader_settings; + + bootloader_util_settings_get(&p_bootloader_settings); + + if (update_status.status_code == DFU_UPDATE_APP_COMPLETE) + { + settings.bank_0_crc = update_status.app_crc; + settings.bank_0_size = update_status.app_size; + settings.bank_0 = BANK_VALID_APP; + settings.bank_1 = BANK_INVALID_APP; + + m_update_status = BOOTLOADER_SETTINGS_SAVING; + bootloader_settings_save(&settings); + } + else if (update_status.status_code == DFU_UPDATE_SD_COMPLETE) + { + settings.bank_0_crc = update_status.app_crc; + settings.bank_0_size = update_status.sd_size + + update_status.bl_size + + update_status.app_size; + settings.bank_0 = BANK_VALID_SD; + settings.bank_1 = BANK_INVALID_APP; + settings.sd_image_size = update_status.sd_size; + settings.bl_image_size = update_status.bl_size; + settings.app_image_size = update_status.app_size; + settings.sd_image_start = update_status.sd_image_start; + + m_update_status = BOOTLOADER_SETTINGS_SAVING; + bootloader_settings_save(&settings); + } + else if (update_status.status_code == DFU_UPDATE_BOOT_COMPLETE) + { + settings.bank_0 = p_bootloader_settings->bank_0; + settings.bank_0_crc = p_bootloader_settings->bank_0_crc; + settings.bank_0_size = p_bootloader_settings->bank_0_size; + settings.bank_1 = BANK_VALID_BOOT; + settings.sd_image_size = update_status.sd_size; + settings.bl_image_size = update_status.bl_size; + settings.app_image_size = update_status.app_size; + + m_update_status = BOOTLOADER_SETTINGS_SAVING; + bootloader_settings_save(&settings); + } + else if (update_status.status_code == DFU_UPDATE_SD_SWAPPED) + { + if (p_bootloader_settings->bank_0 == BANK_VALID_SD) + { + settings.bank_0_crc = 0; + settings.bank_0_size = 0; + settings.bank_0 = BANK_INVALID_APP; + } + // This handles cases where SoftDevice was not updated, hence bank0 keeps its settings. + else + { + settings.bank_0 = p_bootloader_settings->bank_0; + settings.bank_0_crc = p_bootloader_settings->bank_0_crc; + settings.bank_0_size = p_bootloader_settings->bank_0_size; + } + + settings.bank_1 = BANK_INVALID_APP; + settings.sd_image_size = 0; + settings.bl_image_size = 0; + settings.app_image_size = 0; + + m_update_status = BOOTLOADER_SETTINGS_SAVING; + bootloader_settings_save(&settings); + } + else if (update_status.status_code == DFU_TIMEOUT) + { + // Timeout has occurred. Close the connection with the DFU Controller. + uint32_t err_code = dfu_transport_close(); + APP_ERROR_CHECK(err_code); + + m_update_status = BOOTLOADER_TIMEOUT; + } + else if (update_status.status_code == DFU_BANK_0_ERASED) + { + settings.bank_0_crc = 0; + settings.bank_0_size = 0; + settings.bank_0 = BANK_INVALID_APP; + settings.bank_1 = p_bootloader_settings->bank_1; + + bootloader_settings_save(&settings); + } + else if (update_status.status_code == DFU_RESET) + { + m_update_status = BOOTLOADER_RESET; + } + else + { + // No implementation needed. + } +} + + +uint32_t bootloader_init(void) +{ + uint32_t err_code; + pstorage_module_param_t storage_params = {.cb = pstorage_callback_handler}; + + err_code = pstorage_init(); + VERIFY_SUCCESS(err_code); + + m_bootsettings_handle.block_id = BOOTLOADER_SETTINGS_ADDRESS; + err_code = pstorage_register(&storage_params, &m_bootsettings_handle); + + return err_code; +} + + +uint32_t bootloader_dfu_start(void) +{ + uint32_t err_code; + + // Clear swap if banked update is used. + err_code = dfu_init(); + VERIFY_SUCCESS(err_code); + + err_code = dfu_transport_update_start(); + + wait_for_events(); + + return err_code; +} + + +/**@brief Function for disabling all interrupts before jumping from bootloader to application. + */ +static void interrupts_disable(void) +{ + uint32_t interrupt_setting_mask; + uint32_t irq = 0; // We start from first interrupt, i.e. interrupt 0. + + // Fetch the current interrupt settings. + interrupt_setting_mask = NVIC->ISER[0]; + + for (; irq < MAX_NUMBER_INTERRUPTS; irq++) + { + if (interrupt_setting_mask & (IRQ_ENABLED << irq)) + { + // The interrupt was enabled, and hence disable it. + NVIC_DisableIRQ((IRQn_Type)irq); + } + } +} + + +void bootloader_app_start(uint32_t app_addr) +{ + // If the applications CRC has been checked and passed, the magic number will be written and we + // can start the application safely. + uint32_t err_code = sd_softdevice_disable(); + APP_ERROR_CHECK(err_code); + + interrupts_disable(); + + err_code = sd_softdevice_vector_table_base_set(CODE_REGION_1_START); + APP_ERROR_CHECK(err_code); + + bootloader_util_app_start(CODE_REGION_1_START); +} + + +bool bootloader_dfu_sd_in_progress(void) +{ + const bootloader_settings_t * p_bootloader_settings; + + bootloader_util_settings_get(&p_bootloader_settings); + + if (p_bootloader_settings->bank_0 == BANK_VALID_SD || + p_bootloader_settings->bank_1 == BANK_VALID_BOOT) + { + return true; + } + + return false; +} + + +uint32_t bootloader_dfu_sd_update_continue(void) +{ + uint32_t err_code; + + if ((dfu_sd_image_validate() == NRF_SUCCESS) && + (dfu_bl_image_validate() == NRF_SUCCESS)) + { + return NRF_SUCCESS; + } + + // Ensure that flash operations are not executed within the first 100 ms seconds to allow + // a debugger to be attached. + nrf_delay_ms(100); + + err_code = dfu_sd_image_swap(); + APP_ERROR_CHECK(err_code); + + err_code = dfu_sd_image_validate(); + APP_ERROR_CHECK(err_code); + + err_code = dfu_bl_image_swap(); + APP_ERROR_CHECK(err_code); + + return err_code; +} + + +uint32_t bootloader_dfu_sd_update_finalize(void) +{ + dfu_update_status_t update_status = {DFU_UPDATE_SD_SWAPPED, }; + + bootloader_dfu_update_process(update_status); + + wait_for_events(); + + return NRF_SUCCESS; +} + + +void bootloader_settings_get(bootloader_settings_t * const p_settings) +{ + const bootloader_settings_t * p_bootloader_settings; + + bootloader_util_settings_get(&p_bootloader_settings); + + p_settings->bank_0 = p_bootloader_settings->bank_0; + p_settings->bank_0_crc = p_bootloader_settings->bank_0_crc; + p_settings->bank_0_size = p_bootloader_settings->bank_0_size; + p_settings->bank_1 = p_bootloader_settings->bank_1; + p_settings->sd_image_size = p_bootloader_settings->sd_image_size; + p_settings->bl_image_size = p_bootloader_settings->bl_image_size; + p_settings->app_image_size = p_bootloader_settings->app_image_size; + p_settings->sd_image_start = p_bootloader_settings->sd_image_start; +} + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader.h new file mode 100644 index 0000000000..aa6125876f --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader.h @@ -0,0 +1,97 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/**@file + * + * @defgroup nrf_bootloader Bootloader API. + * @{ + * + * @brief Bootloader module interface. + */ + +#ifndef BOOTLOADER_H__ +#define BOOTLOADER_H__ + +#include +#include +#include "bootloader_types.h" +#include + +/**@brief Function for initializing the Bootloader. + * + * @retval NRF_SUCCESS If bootloader was succesfully initialized. + */ +uint32_t bootloader_init(void); + +/**@brief Function for validating application region in flash. + * + * @param[in] app_addr Address to the region in flash where the application is stored. + * + * @retval true If Application region is valid. + * @retval false If Application region is not valid. + */ +bool bootloader_app_is_valid(uint32_t app_addr); + +/**@brief Function for starting the Device Firmware Update. + * + * @retval NRF_SUCCESS If new application image was successfully transferred. + */ +uint32_t bootloader_dfu_start(void); + +/**@brief Function for exiting bootloader and booting into application. + * + * @details This function will disable SoftDevice and all interrupts before jumping to application. + * The SoftDevice vector table base for interrupt forwarding will be set the application + * address. + * + * @param[in] app_addr Address to the region where the application is stored. + */ +void bootloader_app_start(uint32_t app_addr); + +/**@brief Function for retrieving the bootloader settings. + * + * @param[out] p_settings A copy of the current bootloader settings is returned in the structure + * provided. + */ +void bootloader_settings_get(bootloader_settings_t * const p_settings); + +/**@brief Function for processing DFU status update. + * + * @param[in] update_status DFU update status. + */ +void bootloader_dfu_update_process(dfu_update_status_t update_status); + +/**@brief Function getting state of SoftDevice update in progress. + * After a successfull SoftDevice transfer the system restarts in orderto disable SoftDevice + * and complete the update. + * + * @retval true A SoftDevice update is in progress. This indicates that second stage + * of a SoftDevice update procedure can be initiated. + * @retval false No SoftDevice update is in progress. + */ +bool bootloader_dfu_sd_in_progress(void); + +/**@brief Function for continuing the Device Firmware Update of a SoftDevice. + * + * @retval NRF_SUCCESS If the final stage of SoftDevice update was successful. + */ +uint32_t bootloader_dfu_sd_update_continue(void); + +/**@brief Function for finalizing the Device Firmware Update of a SoftDevice. + * + * @retval NRF_SUCCESS If the final stage of SoftDevice update was successful. + */ +uint32_t bootloader_dfu_sd_update_finalize(void); + +#endif // BOOTLOADER_H__ + +/**@} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.c new file mode 100644 index 0000000000..19707ec53c --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.c @@ -0,0 +1,63 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "bootloader_settings.h" +#include +#include + +#if defined ( __CC_ARM ) + +uint8_t m_boot_settings[CODE_PAGE_SIZE] __attribute__((at(BOOTLOADER_SETTINGS_ADDRESS))) __attribute__((used)); /**< This variable reserves a codepage for bootloader specific settings, to ensure the compiler doesn't locate any code or variables at his location. */ +uint32_t m_uicr_bootloader_start_address __attribute__((at(NRF_UICR_BOOT_START_ADDRESS))) = BOOTLOADER_REGION_START; /**< This variable makes the linker script write the bootloader start address to the UICR register. This value will be written in the HEX file and thus written to UICR when the bootloader is flashed into the chip. */ + +#elif defined ( __GNUC__ ) + +uint8_t m_boot_settings[CODE_PAGE_SIZE] __attribute__ ((section(".bootloaderSettings"))); /**< This variable reserves a codepage for bootloader specific settings, to ensure the compiler doesn't locate any code or variables at his location. */ +volatile uint32_t m_uicr_bootloader_start_address __attribute__ ((section(".uicrBootStartAddress"))) = BOOTLOADER_REGION_START; /**< This variable ensures that the linker script will write the bootloader start address to the UICR register. This value will be written in the HEX file and thus written to UICR when the bootloader is flashed into the chip. */ + +#elif defined ( __ICCARM__ ) + +__no_init uint8_t m_boot_settings[CODE_PAGE_SIZE] @ BOOTLOADER_SETTINGS_ADDRESS; /**< This variable reserves a codepage for bootloader specific settings, to ensure the compiler doesn't locate any code or variables at his location. */ +__root const uint32_t m_uicr_bootloader_start_address @ NRF_UICR_BOOT_START_ADDRESS = BOOTLOADER_REGION_START; /**< This variable ensures that the linker script will write the bootloader start address to the UICR register. This value will be written in the HEX file and thus written to UICR when the bootloader is flashed into the chip. */ + +#endif + +#if defined ( NRF52 ) +#if defined ( __CC_ARM ) + +uint8_t m_mbr_params_page[CODE_PAGE_SIZE] __attribute__((at(BOOTLOADER_MBR_PARAMS_PAGE_ADDRESS))) __attribute__((used)); /**< This variable reserves a codepage for mbr parameters, to ensure the compiler doesn't locate any code or variables at his location. */ +uint32_t m_uicr_mbr_params_page_address __attribute__((at(NRF_UICR_MBR_PARAMS_PAGE_ADDRESS))) + = BOOTLOADER_MBR_PARAMS_PAGE_ADDRESS; /**< This variable makes the linker script write the mbr parameters page address to the UICR register. This value will be written in the HEX file and thus written to the UICR when the bootloader is flashed into the chip */ + +#elif defined (__GNUC__ ) + +uint8_t m_mbr_params_page[CODE_PAGE_SIZE] __attribute__ ((section(".mbrParamsPage"))); /**< This variable reserves a codepage for mbr parameters, to ensure the compiler doesn't locate any code or variables at his location. */ +volatile uint32_t m_uicr_mbr_params_page_address __attribute__ ((section(".uicrMbrParamsPageAddress"))) + = BOOTLOADER_MBR_PARAMS_PAGE_ADDRESS; /**< This variable makes the linker script write the mbr parameters page address to the UICR register. This value will be written in the HEX file and thus written to the UICR when the bootloader is flashed into the chip */ + +#elif defined (__ICCARM__ ) + +__no_init uint8_t m_mbr_params_page[CODE_PAGE_SIZE] @ BOOTLOADER_MBR_PARAMS_PAGE_ADDRESS; /**< This variable reserves a codepage for bootloader specific settings, to ensure the compiler doesn't locate any code or variables at his location. */ +__root const uint32_t m_uicr_mbr_params_page_address @ NRF_UICR_MBR_PARAMS_PAGE_ADDRESS = BOOTLOADER_MBR_PARAMS_PAGE_ADDRESS; /**< This variable ensures that the linker script will write the bootloader start address to the UICR register. This value will be written in the HEX file and thus written to UICR when the bootloader is flashed into the chip. */ + +#endif +#endif //defined ( NRF52 ) + + +void bootloader_util_settings_get(const bootloader_settings_t ** pp_bootloader_settings) +{ + // Read only pointer to bootloader settings in flash. + bootloader_settings_t const * const p_bootloader_settings = + (bootloader_settings_t *)&m_boot_settings[0]; + + *pp_bootloader_settings = p_bootloader_settings; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.h new file mode 100644 index 0000000000..645b7f4e6e --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.h @@ -0,0 +1,35 @@ +/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + /**@file + * + * @defgroup nrf_bootloader_settings Bootloader settings API. + * @{ + * + * @brief Bootloader settings module interface. + */ + +#ifndef BOOTLOADER_SETTINGS_H__ +#define BOOTLOADER_SETTINGS_H__ + +#include +#include "bootloader_types.h" + +/**@brief Function for getting the bootloader settings. + * + * @param[out] pp_bootloader_settings Bootloader settings. + */ +void bootloader_util_settings_get(const bootloader_settings_t ** pp_bootloader_settings); + +#endif // BOOTLOADER_SETTINGS_H__ + +/**@} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_types.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_types.h new file mode 100644 index 0000000000..da3ce2c0b7 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_types.h @@ -0,0 +1,59 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/**@file + * + * @defgroup nrf_bootloader_types Types and definitions. + * @{ + * + * @ingroup nrf_bootloader + * + * @brief Bootloader module type and definitions. + */ + +#ifndef BOOTLOADER_TYPES_H__ +#define BOOTLOADER_TYPES_H__ + +#include + +#define BOOTLOADER_DFU_START 0xB1 + +#define BOOTLOADER_SVC_APP_DATA_PTR_GET 0x02 + +/**@brief DFU Bank state code, which indicates wether the bank contains: A valid image, invalid image, or an erased flash. + */ +typedef enum +{ + BANK_VALID_APP = 0x01, + BANK_VALID_SD = 0xA5, + BANK_VALID_BOOT = 0xAA, + BANK_ERASED = 0xFE, + BANK_INVALID_APP = 0xFF, +} bootloader_bank_code_t; + +/**@brief Structure holding bootloader settings for application and bank data. + */ +typedef struct +{ + bootloader_bank_code_t bank_0; /**< Variable to store if bank 0 contains a valid application. */ + uint16_t bank_0_crc; /**< If bank is valid, this field will contain a valid CRC of the total image. */ + bootloader_bank_code_t bank_1; /**< Variable to store if bank 1 has been erased/prepared for new image. Bank 1 is only used in Banked Update scenario. */ + uint32_t bank_0_size; /**< Size of active image in bank0 if present, otherwise 0. */ + uint32_t sd_image_size; /**< Size of SoftDevice image in bank0 if bank_0 code is BANK_VALID_SD. */ + uint32_t bl_image_size; /**< Size of Bootloader image in bank0 if bank_0 code is BANK_VALID_SD. */ + uint32_t app_image_size; /**< Size of Application image in bank0 if bank_0 code is BANK_VALID_SD. */ + uint32_t sd_image_start; /**< Location in flash where SoftDevice image is stored for SoftDevice update. */ +} bootloader_settings_t; + +#endif // BOOTLOADER_TYPES_H__ + +/**@} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_util.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_util.c new file mode 100644 index 0000000000..8912805b13 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_util.c @@ -0,0 +1,152 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "bootloader_util.h" +#include +#include + + +/** + * @brief Function for aborting current application/bootloader jump to to other app/bootloader. + * + * @details This functions will use the address provide to swap the stack pointer and then load + * the address of the reset handler to be executed. It will check current system mode + * (thread/handler) and if in thread mode it will reset into other application. + * If in handler mode \ref isr_abort will be executed to ensure correct exit of handler + * mode and jump into reset handler of other application. + * + * @param[in] start_addr Start address of other application. This address must point to the + initial stack pointer of the application. + * + * @note This function will never return but issue a reset into provided application. + */ +#if defined ( __CC_ARM ) +__asm static void bootloader_util_reset(uint32_t start_addr) +{ + LDR R5, [R0] ; Get App initial MSP for bootloader. + MSR MSP, R5 ; Set the main stack pointer to the applications MSP. + LDR R0, [R0, #0x04] ; Load Reset handler into R0. This will be first argument to branch instruction (BX). + + MOVS R4, #0xFF ; Load ones to R4. + SXTB R4, R4 ; Sign extend R4 to obtain 0xFFFFFFFF instead of 0xFF. + MRS R5, IPSR ; Load IPSR to R5 to check for handler or thread mode. + CMP R5, #0x00 ; Compare, if 0 then we are in thread mode and can continue to reset handler of bootloader. + BNE isr_abort ; If not zero we need to exit current ISR and jump to reset handler of bootloader. + + MOV LR, R4 ; Clear the link register and set to ones to ensure no return, R4 = 0xFFFFFFFF. + BX R0 ; Branch to reset handler of bootloader. + +isr_abort + ; R4 contains ones from line above. Will be popped as R12 when exiting ISR (Cleaning up the registers). + MOV R5, R4 ; Fill with ones before jumping to reset handling. We be popped as LR when exiting ISR. Ensures no return to application. + MOV R6, R0 ; Move address of reset handler to R6. Will be popped as PC when exiting ISR. Ensures the reset handler will be executed when exist ISR. + MOVS r7, #0x21 ; Move MSB reset value of xPSR to R7. Will be popped as xPSR when exiting ISR. xPSR is 0x21000000 thus MSB is 0x21. + REV r7, r7 ; Reverse byte order to put 0x21 as MSB. + PUSH {r4-r7} ; Push everything to new stack to allow interrupt handler to fetch it on exiting the ISR. + + MOVS R4, #0x00 ; Fill with zeros before jumping to reset handling. We be popped as R0 when exiting ISR (Cleaning up of the registers). + MOVS R5, #0x00 ; Fill with zeros before jumping to reset handling. We be popped as R1 when exiting ISR (Cleaning up of the registers). + MOVS R6, #0x00 ; Fill with zeros before jumping to reset handling. We be popped as R2 when exiting ISR (Cleaning up of the registers). + MOVS R7, #0x00 ; Fill with zeros before jumping to reset handling. We be popped as R3 when exiting ISR (Cleaning up of the registers). + PUSH {r4-r7} ; Push zeros (R4-R7) to stack to prepare for exiting the interrupt routine. + + MOVS R0, #0xF9 ; Move the execution return command into register, 0xFFFFFFF9. + SXTB R0, R0 ; Sign extend R0 to obtain 0xFFFFFFF9 instead of 0xF9. + BX R0 ; No return - Handler mode will be exited. Stack will be popped and execution will continue in reset handler initializing other application. + ALIGN +} +#elif defined ( __GNUC__ ) +static inline void bootloader_util_reset(uint32_t start_addr) +{ + __asm volatile( + "ldr r0, [%0]\t\n" // Get App initial MSP for bootloader. + "msr msp, r0\t\n" // Set the main stack pointer to the applications MSP. + "ldr r0, [%0, #0x04]\t\n" // Load Reset handler into R0. + + "movs r4, #0xFF\t\n" // Move ones to R4. + "sxtb r4, r4\t\n" // Sign extend R4 to obtain 0xFFFFFFFF instead of 0xFF. + + "mrs r5, IPSR\t\n" // Load IPSR to R5 to check for handler or thread mode. + "cmp r5, #0x00\t\n" // Compare, if 0 then we are in thread mode and can continue to reset handler of bootloader. + "bne isr_abort\t\n" // If not zero we need to exit current ISR and jump to reset handler of bootloader. + + "mov lr, r4\t\n" // Clear the link register and set to ones to ensure no return. + "bx r0\t\n" // Branch to reset handler of bootloader. + + "isr_abort: \t\n" + + "mov r5, r4\t\n" // Fill with ones before jumping to reset handling. Will be popped as LR when exiting ISR. Ensures no return to application. + "mov r6, r0\t\n" // Move address of reset handler to R6. Will be popped as PC when exiting ISR. Ensures the reset handler will be executed when exist ISR. + "movs r7, #0x21\t\n" // Move MSB reset value of xPSR to R7. Will be popped as xPSR when exiting ISR. xPSR is 0x21000000 thus MSB is 0x21. + "rev r7, r7\t\n" // Reverse byte order to put 0x21 as MSB. + "push {r4-r7}\t\n" // Push everything to new stack to allow interrupt handler to fetch it on exiting the ISR. + + "movs r4, #0x00\t\n" // Fill with zeros before jumping to reset handling. We be popped as R0 when exiting ISR (Cleaning up of the registers). + "movs r5, #0x00\t\n" // Fill with zeros before jumping to reset handling. We be popped as R1 when exiting ISR (Cleaning up of the registers). + "movs r6, #0x00\t\n" // Fill with zeros before jumping to reset handling. We be popped as R2 when exiting ISR (Cleaning up of the registers). + "movs r7, #0x00\t\n" // Fill with zeros before jumping to reset handling. We be popped as R3 when exiting ISR (Cleaning up of the registers). + "push {r4-r7}\t\n" // Push zeros (R4-R7) to stack to prepare for exiting the interrupt routine. + + "movs r0, #0xF9\t\n" // Move the execution return command into register, 0xFFFFFFF9. + "sxtb r0, r0\t\n" // Sign extend R0 to obtain 0xFFFFFFF9 instead of 0xF9. + "bx r0\t\n" // No return - Handler mode will be exited. Stack will be popped and execution will continue in reset handler initializing other application. + ".align\t\n" + :: "r" (start_addr) // Argument list for the gcc assembly. start_addr is %0. + : "r0", "r4", "r5", "r6", "r7" // List of register maintained manually. + ); +} +#elif defined ( __ICCARM__ ) +static inline void bootloader_util_reset(uint32_t start_addr) +{ + asm("ldr r5, [%0]\n" // Get App initial MSP for bootloader. + "msr msp, r5\n" // Set the main stack pointer to the applications MSP. + "ldr r0, [%0, #0x04]\n" // Load Reset handler into R0. + + "movs r4, #0x00\n" // Load zero into R4. + "mvns r4, r4\n" // Invert R4 to ensure it contain ones. + + "mrs r5, IPSR\n" // Load IPSR to R5 to check for handler or thread mode + "cmp r5, #0x00\n" // Compare, if 0 then we are in thread mode and can continue to reset handler of bootloader. + "bne.n isr_abort\n" // If not zero we need to exit current ISR and jump to reset handler of bootloader. + + "mov lr, r4\n" // Clear the link register and set to ones to ensure no return. + "bx r0\n" // Branch to reset handler of bootloader. + + "isr_abort: \n" + // R4 contains ones from line above. We be popped as R12 when exiting ISR (Cleaning up the registers). + "mov r5, r4\n" // Fill with ones before jumping to reset handling. Will be popped as LR when exiting ISR. Ensures no return to application. + "mov r6, r0\n" // Move address of reset handler to R6. Will be popped as PC when exiting ISR. Ensures the reset handler will be executed when exist ISR. + "movs r7, #0x21\n" // Move MSB reset value of xPSR to R7. Will be popped as xPSR when exiting ISR. xPSR is 0x21000000 thus MSB is 0x21. + "rev r7, r7\n" // Reverse byte order to put 0x21 as MSB. + "push {r4-r7}\n" // Push everything to new stack to allow interrupt handler to fetch it on exiting the ISR. + + "movs r4, #0x00\n" // Fill with zeros before jumping to reset handling. We be popped as R0 when exiting ISR (Cleaning up of the registers). + "movs r5, #0x00\n" // Fill with zeros before jumping to reset handling. We be popped as R1 when exiting ISR (Cleaning up of the registers). + "movs r6, #0x00\n" // Fill with zeros before jumping to reset handling. We be popped as R2 when exiting ISR (Cleaning up of the registers). + "movs r7, #0x00\n" // Fill with zeros before jumping to reset handling. We be popped as R3 when exiting ISR (Cleaning up of the registers). + "push {r4-r7}\n" // Push zeros (R4-R7) to stack to prepare for exiting the interrupt routine. + + "movs r0, #0x06\n" // Load 0x06 into R6 to prepare for exec return command. + "mvns r0, r0\n" // Invert 0x06 to obtain EXEC_RETURN, 0xFFFFFFF9. + "bx r0\n" // No return - Handler mode will be exited. Stack will be popped and execution will continue in reset handler initializing other application. + :: "r" (start_addr) // Argument list for the IAR assembly. start_addr is %0. + : "r0", "r4", "r5", "r6", "r7"); // List of register maintained manually. +} +#else +#error Compiler not supported. +#endif + + +void bootloader_util_app_start(uint32_t start_addr) +{ + bootloader_util_reset(start_addr); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_util.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_util.h new file mode 100644 index 0000000000..1e09e2d346 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_util.h @@ -0,0 +1,38 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + /**@file + * + * @defgroup nrf_bootloader_util Bootloader util API. + * @{ + * + * @brief Bootloader util module interface. + */ + +#ifndef BOOTLOADER_UTIL_H__ +#define BOOTLOADER_UTIL_H__ + +#include +#include "bootloader_types.h" + +/**@brief Function for starting the application (or bootloader) at the provided address. + * + * @param[in] start_addr Start address. + * + * @note This function will never retrun. Instead it will reset into the application of the + * provided address. + */ +void bootloader_util_app_start(uint32_t start_addr); + +#endif // BOOTLOADER_UTIL_H__ + +/**@} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu.h new file mode 100644 index 0000000000..9832180902 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu.h @@ -0,0 +1,134 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/**@file + * + * @defgroup nrf_dfu Device Firmware Update API. + * @{ + * + * @brief Device Firmware Update module interface. + */ + +#ifndef DFU_H__ +#define DFU_H__ + +#include +#include +#include + + +/**@brief DFU event callback for asynchronous calls. + * + * @param[in] packet Packet type for which this callback is related. START_PACKET, DATA_PACKET. + * @param[in] result Operation result code. NRF_SUCCESS when a queued operation was successful. + * @param[in] p_data Pointer to the data to which the operation is related. + */ +typedef void (*dfu_callback_t)(uint32_t packet, uint32_t result, uint8_t * p_data); + +/**@brief Function for initializing the Device Firmware Update module. + * + * @return NRF_SUCCESS on success, an error_code otherwise. + */ +uint32_t dfu_init(void); + +/**@brief Function for registering a callback listener for \ref dfu_data_pkt_handle callbacks. + * + * @param[in] callback_handler Callback handler for receiving DFU events on completed operations + * of DFU packets. + */ +void dfu_register_callback(dfu_callback_t callback_handler); + +/**@brief Function for setting the DFU image size. + * + * @details Function sets the DFU image size. This function must be called when an update is started + * in order to notify the DFU of the new image size. If multiple images are to be + * transferred within the same update context then this function must be called with size + * information for each image being transfered. + * If an image type is not being transfered, e.g. SoftDevice but no Application , then the + * image size for application must be zero. + * + * @param[in] p_packet Pointer to the DFU packet containing information on DFU update process to + * be started. + * + * @return NRF_SUCCESS on success, an error_code otherwise. + */ +uint32_t dfu_start_pkt_handle(dfu_update_packet_t * p_packet); + +/**@brief Function for handling DFU data packets. + * + * @param[in] p_packet Pointer to the DFU packet. + * + * @return NRF_SUCCESS on success, an error_code otherwise. + */ +uint32_t dfu_data_pkt_handle(dfu_update_packet_t * p_packet); + +/**@brief Function for handling DFU init packets. + * + * @return NRF_SUCCESS on success, an error_code otherwise. + */ +uint32_t dfu_init_pkt_handle(dfu_update_packet_t * p_packet); + +/**@brief Function for validating a transferred image after the transfer has completed. + * + * @return NRF_SUCCESS on success, an error_code otherwise. + */ +uint32_t dfu_image_validate(void); + +/**@brief Function for activating the transfered image after validation has successfully completed. + * + * @return NRF_SUCCESS on success, an error_code otherwise. + */ +uint32_t dfu_image_activate(void); + +/**@brief Function for reseting the current update procedure and return to initial state. + * + * @details This function call will result in a system reset to ensure correct system behavior. + * The reset will might be scheduled to execute at a later point in time to ensure pending + * flash operations has completed. + */ +void dfu_reset(void); + +/**@brief Function for validating that new bootloader has been correctly installed. + * + * @return NRF_SUCCESS if install was successful. NRF_ERROR_NULL if the images differs. + */ +uint32_t dfu_bl_image_validate(void); + +/**@brief Function for validating that new SoftDevicehas been correctly installed. + * + * @return NRF_SUCCESS if install was successful. NRF_ERROR_NULL if the images differs. + */ +uint32_t dfu_sd_image_validate(void); + +/**@brief Function for swapping existing bootloader with newly received. + * + * @return NRF_SUCCESS on succesfull swapping. For error code please refer to + * \ref sd_mbr_command_copy_bl_t. + */ +uint32_t dfu_bl_image_swap(void); + +/**@brief Function for swapping existing SoftDevice with newly received. + * + * @return NRF_SUCCESS on succesfull swapping. For error code please refer to + * \ref sd_mbr_command_copy_sd_t. + */ +uint32_t dfu_sd_image_swap(void); + +/**@brief Function for handling DFU init packet complete. + * + * @return NRF_SUCCESS on success, an error_code otherwise. + */ +uint32_t dfu_init_pkt_complete(void); + +#endif // DFU_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_app_handler.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_app_handler.c new file mode 100644 index 0000000000..806df80899 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_app_handler.c @@ -0,0 +1,192 @@ +/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "dfu_app_handler.h" +#include +#include "bootloader_util.h" +#include "nrf.h" +#include "nrf_sdm.h" +#include "ble_gatt.h" +#include "ble_gatts.h" +#include "app_error.h" +#include "dfu_ble_svc.h" +#include "device_manager.h" +#include "nrf_delay.h" + +#define IRQ_ENABLED 0x01 /**< Field that identifies if an interrupt is enabled. */ +#define MAX_NUMBER_INTERRUPTS 32 /**< Maximum number of interrupts available. */ + +static void dfu_app_reset_prepare(void); /**< Forward declaration of default reset handler. */ +static dfu_app_reset_prepare_t m_reset_prepare = dfu_app_reset_prepare; /**< Callback function to application to prepare for system reset. Allows application to clean up service and memory before reset. */ +static dfu_ble_peer_data_t m_peer_data; /**< Peer data to be used for data exchange when resetting into DFU mode. */ +static dm_handle_t m_dm_handle; /**< Device Manager handle with instance IDs of current BLE connection. */ + + +/**@brief Function for reset_prepare handler if the application has not registered a handler. + */ +static void dfu_app_reset_prepare(void) +{ + // Reset prepare should be handled by application. + // This function can be extended to include default handling if application does not implement + // own handler. +} + + +/**@brief Function for disabling all interrupts before jumping from bootloader to application. + */ +static void interrupts_disable(void) +{ + uint32_t interrupt_setting_mask; + uint32_t irq; + + // Fetch the current interrupt settings. + interrupt_setting_mask = NVIC->ISER[0]; + + // Loop from interrupt 0 for disabling of all interrupts. + for (irq = 0; irq < MAX_NUMBER_INTERRUPTS; irq++) + { + if (interrupt_setting_mask & (IRQ_ENABLED << irq)) + { + // The interrupt was enabled, hence disable it. + NVIC_DisableIRQ((IRQn_Type)irq); + } + } +} + + +/**@brief Function for providing peer information to DFU for re-establishing a bonded connection in + * DFU mode. + * + * @param[in] conn_handle Connection handle for the connection requesting DFU mode. + */ +static void dfu_app_peer_data_set(uint16_t conn_handle) +{ + uint32_t err_code; + dm_sec_keyset_t key_set; + uint32_t app_context_data = 0; + dm_application_context_t app_context; + + +/** [DFU bond sharing] */ + err_code = dm_handle_get(conn_handle, &m_dm_handle); + if (err_code == NRF_SUCCESS) + { + err_code = dm_distributed_keys_get(&m_dm_handle, &key_set); + if (err_code == NRF_SUCCESS) + { + APP_ERROR_CHECK(err_code); + + m_peer_data.addr = key_set.keys_central.p_id_key->id_addr_info; + m_peer_data.irk = key_set.keys_central.p_id_key->id_info; + m_peer_data.enc_key.enc_info = key_set.keys_periph.enc_key.p_enc_key->enc_info; + m_peer_data.enc_key.master_id = key_set.keys_periph.enc_key.p_enc_key->master_id; + + err_code = dfu_ble_svc_peer_data_set(&m_peer_data); + APP_ERROR_CHECK(err_code); + + app_context_data = (DFU_APP_ATT_TABLE_CHANGED << DFU_APP_ATT_TABLE_POS); + app_context.len = sizeof(app_context_data); + app_context.p_data = (uint8_t *)&app_context_data; + app_context.flags = 0; + + err_code = dm_application_context_set(&m_dm_handle, &app_context); + APP_ERROR_CHECK(err_code); + } + else + { + // Keys were not available, thus we have a non-encrypted connection. + err_code = dm_peer_addr_get(&m_dm_handle, &m_peer_data.addr); + APP_ERROR_CHECK(err_code); + + err_code = dfu_ble_svc_peer_data_set(&m_peer_data); + APP_ERROR_CHECK(err_code); + } + } +/** [DFU bond sharing] */ +} + + +/**@brief Function for preparing the reset, disabling SoftDevice, and jumping to the bootloader. + * + * @param[in] conn_handle Connection handle for peer requesting to enter DFU mode. + */ +static void bootloader_start(uint16_t conn_handle) +{ + uint32_t err_code; + uint16_t sys_serv_attr_len = sizeof(m_peer_data.sys_serv_attr); + + err_code = sd_ble_gatts_sys_attr_get(conn_handle, + m_peer_data.sys_serv_attr, + &sys_serv_attr_len, + BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS); + if (err_code != NRF_SUCCESS) + { + // Any error at this stage means the system service attributes could not be fetched. + // This means the service changed indication cannot be sent in DFU mode, but connection + // is still possible to establish. + } + + m_reset_prepare(); + + err_code = sd_power_gpregret_set(BOOTLOADER_DFU_START); + APP_ERROR_CHECK(err_code); + + err_code = sd_softdevice_disable(); + APP_ERROR_CHECK(err_code); + + err_code = sd_softdevice_vector_table_base_set(NRF_UICR->NRFFW[0]); + APP_ERROR_CHECK(err_code); + + dfu_app_peer_data_set(conn_handle); + + NVIC_ClearPendingIRQ(SWI2_IRQn); + interrupts_disable(); + bootloader_util_app_start(NRF_UICR->NRFFW[0]); +} + + +void dfu_app_on_dfu_evt(ble_dfu_t * p_dfu, ble_dfu_evt_t * p_evt) +{ + switch (p_evt->ble_dfu_evt_type) + { + case BLE_DFU_START: + // Starting the bootloader - will cause reset. + bootloader_start(p_dfu->conn_handle); + break; + + default: + { + // Unsupported event received from DFU Service. + // Send back BLE_DFU_RESP_VAL_NOT_SUPPORTED message to peer. + uint32_t err_code = ble_dfu_response_send(p_dfu, + BLE_DFU_START_PROCEDURE, + BLE_DFU_RESP_VAL_NOT_SUPPORTED); + APP_ERROR_CHECK(err_code); + } + break; + } +} + + +void dfu_app_reset_prepare_set(dfu_app_reset_prepare_t reset_prepare_func) +{ + m_reset_prepare = reset_prepare_func; +} + + +void dfu_app_dm_appl_instance_set(dm_application_instance_t app_instance) +{ + uint32_t err_code; + + err_code = dm_application_instance_set(&app_instance, &m_dm_handle); + APP_ERROR_CHECK(err_code); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_app_handler.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_app_handler.h new file mode 100644 index 0000000000..e923186c99 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_app_handler.h @@ -0,0 +1,86 @@ +/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup nrf_dfu_app_handler DFU BLE packet handling in application + * @{ + * + * @brief Handling of DFU BLE packets in the application. + * + * @details This module implements the handling of DFU packets for switching + * from an application to the bootloader and start DFU mode. The DFU + * packets are transmitted over BLE. + * This module handles only the StartDFU packet, which allows a BLE + * application to expose support for the DFU Service. + * The actual DFU Service runs in a dedicated environment after a BLE + * disconnect and reset of the \nRFXX device. + * The host must reconnect and continue the update procedure with + * access to the full DFU Service. + * + * @note The application must propagate DFU events to this module by calling + * @ref dfu_app_on_dfu_evt from the @ref ble_dfu_evt_handler_t callback. + */ + +#ifndef DFU_APP_HANDLER_H__ +#define DFU_APP_HANDLER_H__ + +#include "ble_dfu.h" +#include "nrf_svc.h" +#include "bootloader_types.h" +#include "device_manager.h" + +#define DFU_APP_ATT_TABLE_POS 0 /**< Position for the ATT table changed setting. */ +#define DFU_APP_ATT_TABLE_CHANGED 1 /**< Value indicating that the ATT table might have changed. This value will be set in the application-specific context in Device Manager when entering DFU mode. */ + +/**@brief DFU application reset_prepare function. This function is a callback that allows the + * application to prepare for an upcoming application reset. + */ +typedef void (*dfu_app_reset_prepare_t)(void); + +/**@brief Function for handling events from the DFU Service. + * + * @details The application must inject this function into the DFU Service or propagate DFU events + * to the dfu_app_handler module by calling this function in the application-specific DFU event + * handler. + * + * @param[in] p_dfu Pointer to the DFU Service structure to which the include event relates. + * @param[in] p_evt Pointer to the DFU event. + */ +void dfu_app_on_dfu_evt(ble_dfu_t * p_dfu, ble_dfu_evt_t * p_evt); + +/**@brief Function for registering a function to prepare a reset. + * + * @details The provided function is executed before resetting the system into bootloader/DFU + * mode. By registering this function, the caller is notified before the reset and can + * thus prepare the application for reset. For example, the application can gracefully + * disconnect any peers on BLE, turn of LEDS, ensure that all pending flash operations + * have completed, and so on. + * + * @param[in] reset_prepare_func Function to be executed before a reset. + */ +void dfu_app_reset_prepare_set(dfu_app_reset_prepare_t reset_prepare_func); + +/**@brief Function for setting the Device Manager application instance. + * + * @details This function allows to set the @ref dm_application_instance_t value that is returned by the + * Device Manager when the application registers using @ref dm_register. + * If this function is not called, it is not be possible to share bonding information + * from the application to the bootloader/DFU when entering DFU mode. + * + * @param[in] app_instance Value for the application instance in use. + */ +void dfu_app_dm_appl_instance_set(dm_application_instance_t app_instance); + +#endif // DFU_APP_HANDLER_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_bank_internal.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_bank_internal.h new file mode 100644 index 0000000000..ac2b520fdb --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_bank_internal.h @@ -0,0 +1,87 @@ +/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/**@file + * + * @defgroup dfu_bank_internal Device Firmware Update internal header for bank handling in DFU. + * @{ + * + * @brief Device Firmware Update Bank handling module interface. + * + * @details This header is intended for shared definition and functions between single and dual bank + * implementations used for DFU support. It is not supposed to be used for external access + * to the DFU module. + * + */ +#ifndef DFU_BANK_INTERNAL_H__ +#define DFU_BANK_INTERNAL_H__ + +#include + +/**@brief States of the DFU state machine. */ +typedef enum +{ + DFU_STATE_INIT_ERROR, /**< State for: dfu_init(...) error. */ + DFU_STATE_IDLE, /**< State for: idle. */ + DFU_STATE_PREPARING, /**< State for: preparing, indicates that the flash is being erased and no data packets can be processed. */ + DFU_STATE_RDY, /**< State for: ready. */ + DFU_STATE_RX_INIT_PKT, /**< State for: receiving initialization packet. */ + DFU_STATE_RX_DATA_PKT, /**< State for: receiving data packet. */ + DFU_STATE_VALIDATE, /**< State for: validate. */ + DFU_STATE_WAIT_4_ACTIVATE /**< State for: waiting for dfu_image_activate(). */ +} dfu_state_t; + +#define APP_TIMER_PRESCALER 0 /**< Value of the RTC1 PRESCALER register. */ +#define DFU_TIMEOUT_INTERVAL APP_TIMER_TICKS(120000, APP_TIMER_PRESCALER) /**< DFU timeout interval in units of timer ticks. */ + +#define IS_UPDATING_SD(START_PKT) ((START_PKT).dfu_update_mode & DFU_UPDATE_SD) /**< Macro for determining if a SoftDevice update is ongoing. */ +#define IS_UPDATING_BL(START_PKT) ((START_PKT).dfu_update_mode & DFU_UPDATE_BL) /**< Macro for determining if a Bootloader update is ongoing. */ +#define IS_UPDATING_APP(START_PKT) ((START_PKT).dfu_update_mode & DFU_UPDATE_APP) /**< Macro for determining if a Application update is ongoing. */ +#define IMAGE_WRITE_IN_PROGRESS() (m_data_received > 0) /**< Macro for determining if an image write is in progress. */ +#define IS_WORD_SIZED(SIZE) ((SIZE & (sizeof(uint32_t) - 1)) == 0) /**< Macro for checking that the provided is word sized. */ + +/**@cond NO_DOXYGEN */ +static uint32_t m_data_received; /**< Amount of received data. */ +/**@endcond */ + +/**@brief Type definition of function used for preparing of the bank before receiving of a + * software image. + * + * @param[in] image_size Size of software image being received. + */ +typedef void (*dfu_bank_prepare_t)(uint32_t image_size); + +/**@brief Type definition of function used for handling clear complete of the bank before + * receiving of a software image. + */ +typedef void (*dfu_bank_cleared_t)(void); + +/**@brief Type definition of function used for activating of the software image received. + * + * @return NRF_SUCCESS If the image has been successfully activated any other NRF_ERROR code in + * case of a failure. + */ +typedef uint32_t (*dfu_bank_activate_t)(void); + +/**@brief Structure for holding of function pointers for needed prepare and activate procedure for + * the requested update procedure. + */ +typedef struct +{ + dfu_bank_prepare_t prepare; /**< Function pointer to the prepare function called on start of update procedure. */ + dfu_bank_cleared_t cleared; /**< Function pointer to the cleared function called after prepare function completes. */ + dfu_bank_activate_t activate; /**< Function pointer to the activate function called on finalizing the update procedure. */ +} dfu_bank_func_t; + +#endif // DFU_BANK_INTERNAL_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_ble_svc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_ble_svc.h new file mode 100644 index 0000000000..d1cc44057f --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_ble_svc.h @@ -0,0 +1,80 @@ +/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup nrf_dfu_ble_svc DFU BLE SVC + * @{ + * + * @brief DFU BLE SVC in bootloader. The DFU BLE SuperVisor Calls allow an application to execute + * functions in the installed bootloader. + * + * @details This module implements handling of SuperVisor Calls in the bootloader. + * SuperVisor Calls allow for an application to execute calls into the bootloader. + * Currently, it is possible to exchange bonding information (like keys) from the + * application to a bootloader supporting DFU OTA using BLE, so the update process can be + * done through an already existing bond. + * + * @note The application must make sure that all SuperVisor Calls (SVC) are forwarded to the + * bootloader to ensure correct behavior. Forwarding of SVCs to the bootloader is + * done using the SoftDevice SVC @ref sd_softdevice_vector_table_base_set with the value + * present in @c NRF_UICR->NRFFW[0]. + */ + +#ifndef DFU_BLE_SVC_H__ +#define DFU_BLE_SVC_H__ + +#include "nrf_svc.h" +#include +#include "ble_gap.h" +#include "nrf.h" +#include "nrf_soc.h" +#include "nrf_error_sdm.h" + +#define BOOTLOADER_SVC_BASE 0x0 /**< The number of the lowest SVC number reserved for the bootloader. */ +#define SYSTEM_SERVICE_ATT_SIZE 8 /**< Size of the system service attribute length including CRC-16 at the end. */ + +/**@brief The SVC numbers used by the SVC functions in the SoC library. */ +enum BOOTLOADER_SVCS +{ + DFU_BLE_SVC_PEER_DATA_SET = BOOTLOADER_SVC_BASE, /**< SVC number for the setting of peer data call. */ + BOOTLOADER_SVC_LAST +}; + +/**@brief DFU Peer data structure. + * + * @details This structure contains peer data needed for connection to a bonded device during DFU. + * The peer data must be provided by the application to the bootloader during buttonless + * update. See @ref dfu_ble_svc_peer_data_set. It contains bond information about the + * desired DFU peer. + */ +typedef struct +{ + ble_gap_addr_t addr; /**< BLE GAP address of the device that initiated the DFU process. */ + ble_gap_irk_t irk; /**< IRK of the device that initiated the DFU process if this device uses Private Resolvable Addresses. */ + ble_gap_enc_key_t enc_key; /**< Encryption key structure containing encrypted diversifier and LTK for re-establishing the bond. */ + uint8_t sys_serv_attr[SYSTEM_SERVICE_ATT_SIZE]; /**< System service attributes for restoring of Service Changed Indication setting in DFU mode. */ +} dfu_ble_peer_data_t; + +/**@brief SVC Function for setting peer data containing address, IRK, and LTK to establish bonded + * connection in DFU mode. + * + * @param[in] p_peer_data Pointer to the peer data containing keys for the connection. + * + * @retval NRF_ERROR_NULL If a NULL pointer was provided as argument. + * @retval NRF_SUCCESS If the function completed successfully. + */ +SVCALL(DFU_BLE_SVC_PEER_DATA_SET, uint32_t, dfu_ble_svc_peer_data_set(dfu_ble_peer_data_t * p_peer_data)); + +#endif // DFU_BLE_SVC_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_ble_svc_internal.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_ble_svc_internal.h new file mode 100644 index 0000000000..6f05fbf886 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_ble_svc_internal.h @@ -0,0 +1,43 @@ +/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup nrf_dfu_ble_svc_internal DFU BLE SVC internal + * @{ + * + * @brief DFU BLE SVC internal functions in bootloader. The DFU BLE SuperVisor Calls allow an + * application to execute functions in the installed bootloader. This interface provides + * internal Bootloader DFU functions for retrieving data exchanged through SuperVisor Calls. + * + */ + +#ifndef DFU_BLE_SVC_INTERNAL_H__ +#define DFU_BLE_SVC_INTERNAL_H__ + +#include +#include "dfu_ble_svc.h" +#include "ble_gap.h" + +/**@brief Internal bootloader/DFU function for retrieving peer data provided from application. + * + * @param[out] p_peer_data Peer data set by application to be used for DFU connection. + * + * @retval NRF_SUCCESS If peer data is valid and can be used for connection. + * @retval NRF_ERROR_NULL If p_peer_data is a NULL pointer. + * @retval NRF_ERROR_INVALID_DATA If peer data is not available or invalid. + */ +uint32_t dfu_ble_peer_data_get(dfu_ble_peer_data_t * p_peer_data); + +#endif // DFU_BLE_SVC_INTERNAL_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_init.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_init.h new file mode 100644 index 0000000000..33a85f20d0 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_init.h @@ -0,0 +1,134 @@ +/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/**@file + * + * @defgroup nrf_dfu_init Init packet handling in DFU + * @{ + * + * @brief Device Firmware Update module type and function declaration for init packet handling. + * + * @details This header contains basic functionality for performing safety checks on software + * updates for \nRFXX based devices. It provides a skeleton for pre-checking an init packet + * to ensure the following image is compatible with this device. A safety check should + * always be performed to prevent accidental flashing of unsupported applications or a + * wrong combination of application and SoftDevice. + * The device information contains information such as: + * - Device type (2 bytes), for example Heart Rate. The device type is a number defined by + * the customer. It can be located in UICR or FICR. + * - Device revision (2 bytes), for example major revision 1, minor revision 0. The device + * revision is a number defined by the customer. It can be located in UICR or FICR. + * - List of SoftDevices supported by this application, for example + * 0x0049 = S110v6_0_0 + * 0xFFFE = S110 development (any SoftDevice accepted), + * - CRC or hash of firmware image + * + * @note This module does not support security features such as image signing, but the corresponding + * implementation allows for such extensions. + * If the init packet is signed by a trusted source, it must be decrypted before it can be + * processed. + */ + +#ifndef DFU_INIT_H__ +#define DFU_INIT_H__ + +#include +#include "nrf.h" + +/**@brief Structure contained in an init packet. Contains information on device type, revision, and + * supported SoftDevices. + */ +typedef struct +{ + uint16_t device_type; /**< Device type (2 bytes), for example Heart Rate. This number must be defined by the customer before production. It can be located in UICR or FICR. */ + uint16_t device_rev; /**< Device revision (2 bytes), for example major revision 1, minor revision 0. This number must be defined by the customer before production. It can be located in UICR or FICR. */ + uint32_t app_version; /**< Application version for the image software. This field allows for additional checking, for example ensuring that a downgrade is not allowed. */ + uint16_t softdevice_len; /**< Number of different SoftDevice revisions compatible with this application. The list of SoftDevice firmware IDs is defined in @ref softdevice. */ + uint16_t softdevice[1]; /**< Variable length array of SoftDevices compatible with this application. The length of the array is specified in the length field. SoftDevice firmware id 0xFFFE indicates any SoftDevice. */ +} dfu_init_packet_t; + +/**@brief Structure holding basic device information settings. + */ +typedef struct +{ + uint16_t device_type; /**< Device type (2 bytes), for example Heart Rate. This number must be defined by the customer before production. It can be located in UICR or FICR. */ + uint16_t device_rev; /**< Device revision (2 bytes), for example major revision 1, minor revision 0. This number must be defined by the customer before production. It can be located in UICR or FICR. */ +} dfu_device_info_t; + +/** The device info offset can be modified to place the device info settings at a different location. + * If the customer reserved UICR location is used for other application specific data, the offset + * must be updated to avoid collision with that data. + */ +/** [DFU UICR DEV offset] */ +#define UICR_CUSTOMER_DEVICE_INFO_OFFSET 0x0 /**< Device info offset inside the customer UICR reserved area. Customers may change this value to place the device information in a user-preferred location. */ +/** [DFU UICR DEV offset] */ + +#define UICR_CUSTOMER_RESERVED_OFFSET 0x80 /**< Customer reserved area in the UICR. The area from UICR + 0x80 is reserved for customer usage. */ +#define DFU_DEVICE_INFO_BASE (NRF_UICR_BASE + \ + UICR_CUSTOMER_RESERVED_OFFSET + \ + UICR_CUSTOMER_DEVICE_INFO_OFFSET) /**< The device information base address inside of UICR. */ +#define DFU_DEVICE_INFO ((dfu_device_info_t *)DFU_DEVICE_INFO_BASE) /**< The memory mapped structure for device information data. */ + +#define DFU_DEVICE_TYPE_EMPTY ((uint16_t)0xFFFF) /**< Mask indicating no device type is present in UICR. 0xFFFF is default flash pattern when not written with data. */ +#define DFU_DEVICE_REVISION_EMPTY ((uint16_t)0xFFFF) /**< Mask indicating no device revision is present in UICR. 0xFFFF is default flash pattern when not written with data. */ +#define DFU_SOFTDEVICE_ANY ((uint16_t)0xFFFE) /**< Mask indicating that any SoftDevice is allowed for updating this application. Allows for easy development. Not to be used in production images. */ + + +/**@brief DFU prevalidate call for pre-checking the received init packet. + * + * @details Pre-validation will safety check the firmware image to be transfered in second stage. + * The function currently checks the device type, device revision, application firmware + * version, and supported SoftDevices. More checks should be added according to + * customer-specific requirements. + * + * @param[in] p_init_data Pointer to the init packet. If the init packet is encrypted or signed, + * it must first be decrypted before being checked. + * @param[in] init_data_len Length of the init data. + * + * @retval NRF_SUCCESS If the pre-validation succeeded, that means the image is + * supported by the device and it is considered to come from a + * trusted source (signing). + * @retval NRF_ERROR_INVALID_DATA If the pre-validation failed, that means the image is not + * supported by the device or comes from an un-trusted source + * (signing). + * @retval NRF_ERROR_INVALID_LENGTH If the size of the init packet is not within the limits of + * the init packet handler. + */ +uint32_t dfu_init_prevalidate(uint8_t * p_init_data, uint32_t init_data_len); + +/**@brief DFU postvalidate call for post-checking the received image using the init packet. + * + * @details Post-validation can verify the integrity check the firmware image received before + * activating the image. + * Checks performed can be: + * - A simple CRC as shown in the corresponding implementation of this API in the file + * dfu_init_template.c + * - A hash for better verification of the image. + * - A signature to ensure the image originates from a trusted source. + * Checks are intended to be expanded for customer-specific requirements. + * + * @param[in] p_image Pointer to the received image. The init data provided in the call + * \ref dfu_init_prevalidate will be used for validating the image. + * @param[in] image_len Length of the image data. + * + * @retval NRF_SUCCESS If the post-validation succeeded, that meant the integrity of the + * image has been verified and the image originates from a trusted + * source (signing). + * @retval NRF_ERROR_INVALID_DATA If the post-validation failed, that meant the post check of the + * image failed such as the CRC is not matching the image transfered + * or the verification of the image fails (signing). + */ +uint32_t dfu_init_postvalidate(uint8_t * p_image, uint32_t image_len); + +#endif // DFU_INIT_H__ + +/**@} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_init_template.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_init_template.c new file mode 100644 index 0000000000..598340c4d6 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_init_template.c @@ -0,0 +1,155 @@ +/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/**@file + * + * @defgroup nrf_dfu_init_template Template file with an DFU init packet handling example. + * @{ + * + * @ingroup nrf_dfu + * + * @brief This file contains a template on how to implement DFU init packet handling. + * + * @details The template shows how device type and revision can be used for a safety check of the + * received image. It shows how validation can be performed in two stages: + * - Stage 1: Pre-check of firmware image before transfer to ensure the firmware matches: + * - Device Type. + * - Device Revision. + * Installed SoftDevice. + * This template can be extended with additional checks according to needs. + * For example, such a check could be the origin of the image (trusted source) + * based on a signature scheme. + * - Stage 2: Post-check of the image after image transfer but before installing firmware. + * For example, such a check could be an integrity check in form of hashing or + * verification of a signature. + * In this template, a simple CRC check is carried out. + * The CRC check can be replaced with other mechanisms, like signing. + * + * @note This module does not support security features such as image signing, but the + * implementation allows for such extension. + * If the init packet is signed by a trusted source, it must be decrypted before it can be + * processed. + */ + +#include "dfu_init.h" +#include +#include +#include +#include "nrf_error.h" +#include "crc16.h" + +#define DFU_INIT_PACKET_EXT_LENGTH_MIN 2 //< Minimum length of the extended init packet. The extended init packet may contain a CRC, a HASH, or other data. This value must be changed according to the requirements of the system. The template uses a minimum value of two in order to hold a CRC. */ +#define DFU_INIT_PACKET_EXT_LENGTH_MAX 10 //< Maximum length of the extended init packet. The extended init packet may contain a CRC, a HASH, or other data. This value must be changed according to the requirements of the system. The template uses a maximum value of 10 in order to hold a CRC and any padded data on transport layer without overflow. */ + +static uint8_t m_extended_packet[DFU_INIT_PACKET_EXT_LENGTH_MAX]; //< Data array for storage of the extended data received. The extended data follows the normal init data of type \ref dfu_init_packet_t. Extended data can be used for a CRC, hash, signature, or other data. */ +static uint8_t m_extended_packet_length; //< Length of the extended data received with init packet. */ + + +uint32_t dfu_init_prevalidate(uint8_t * p_init_data, uint32_t init_data_len) +{ + uint32_t i = 0; + + // In order to support signing or encryption then any init packet decryption function / library + // should be called from here or implemented at this location. + + // Length check to ensure valid data are parsed. + if (init_data_len < sizeof(dfu_init_packet_t)) + { + return NRF_ERROR_INVALID_LENGTH; + } + + // Current template uses clear text data so they can be casted for pre-check. + dfu_init_packet_t * p_init_packet = (dfu_init_packet_t *)p_init_data; + + m_extended_packet_length = ((uint32_t)p_init_data + init_data_len) - + (uint32_t)&p_init_packet->softdevice[p_init_packet->softdevice_len]; + if (m_extended_packet_length < DFU_INIT_PACKET_EXT_LENGTH_MIN) + { + return NRF_ERROR_INVALID_LENGTH; + } + + if (((uint32_t)p_init_data + init_data_len) < + (uint32_t)&p_init_packet->softdevice[p_init_packet->softdevice_len]) + { + return NRF_ERROR_INVALID_LENGTH; + } + + memcpy(m_extended_packet, + &p_init_packet->softdevice[p_init_packet->softdevice_len], + m_extended_packet_length); + +/** [DFU init application version] */ + // To support application versioning, this check should be updated. + // This template allows for any application to be installed. However, + // customers can place a revision number at the bottom of the application + // to be verified by the bootloader. This can be done at a location + // relative to the application, for example the application start + // address + 0x0100. +/** [DFU init application version] */ + + // First check to verify the image to be transfered matches the device type. + // If no Device type is present in DFU_DEVICE_INFO then any image will be accepted. + if ((DFU_DEVICE_INFO->device_type != DFU_DEVICE_TYPE_EMPTY) && + (p_init_packet->device_type != DFU_DEVICE_INFO->device_type)) + { + return NRF_ERROR_INVALID_DATA; + } + + // Second check to verify the image to be transfered matches the device revision. + // If no Device revision is present in DFU_DEVICE_INFO then any image will be accepted. + if ((DFU_DEVICE_INFO->device_rev != DFU_DEVICE_REVISION_EMPTY) && + (p_init_packet->device_rev != DFU_DEVICE_INFO->device_rev)) + { + return NRF_ERROR_INVALID_DATA; + } + + // Third check: Check the array of supported SoftDevices by this application. + // If the installed SoftDevice does not match any SoftDevice in the list then an + // error is returned. + while (i < p_init_packet->softdevice_len) + { + if (p_init_packet->softdevice[i] == DFU_SOFTDEVICE_ANY || + p_init_packet->softdevice[i++] == SD_FWID_GET(MBR_SIZE)) + { + return NRF_SUCCESS; + } + } + + // No matching SoftDevice found - Return NRF_ERROR_INVALID_DATA. + return NRF_ERROR_INVALID_DATA; +} + + +uint32_t dfu_init_postvalidate(uint8_t * p_image, uint32_t image_len) +{ + uint16_t image_crc; + uint16_t received_crc; + + // In order to support hashing (and signing) then the (decrypted) hash should be fetched and + // the corresponding hash should be calculated over the image at this location. + // If hashing (or signing) is added to the system then the CRC validation should be removed. + + // calculate CRC from active block. + image_crc = crc16_compute(p_image, image_len, NULL); + + // Decode the received CRC from extended data. + received_crc = uint16_decode((uint8_t *)&m_extended_packet[0]); + + // Compare the received and calculated CRC. + if (image_crc != received_crc) + { + return NRF_ERROR_INVALID_DATA; + } + + return NRF_SUCCESS; +} + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_transport.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_transport.h new file mode 100644 index 0000000000..130beb3800 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_transport.h @@ -0,0 +1,40 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/**@file + * + * @defgroup nrf_dfu_transport DFU transport API. + * @{ + * + * @brief DFU transport module interface. + */ + +#ifndef DFU_TRANSPORT_H__ +#define DFU_TRANSPORT_H__ + +#include + +/**@brief Function for starting the update of Device Firmware. + * + * @retval NRF_SUCCESS Operation success. + */ +uint32_t dfu_transport_update_start(void); + +/**@brief Function for closing the transport layer. + * + * @retval NRF_SUCCESS Operation success. + */ +uint32_t dfu_transport_close(void); + +#endif // DFU_TRANSPORT_H__ + +/**@} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_types.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_types.h new file mode 100644 index 0000000000..9a4f70585d --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_types.h @@ -0,0 +1,168 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/**@file + * + * @defgroup nrf_dfu_types Types and definitions. + * @{ + * + * @ingroup nrf_dfu + * + * @brief Device Firmware Update module type and definitions. + */ + +#ifndef DFU_TYPES_H__ +#define DFU_TYPES_H__ + +#include +#include "nrf_sdm.h" +#include "nrf_mbr.h" +#include "nrf.h" +#include "app_util.h" + +#define NRF_UICR_BOOT_START_ADDRESS (NRF_UICR_BASE + 0x14) /**< Register where the bootloader start address is stored in the UICR register. */ + +#if defined(NRF52) +#define NRF_UICR_MBR_PARAMS_PAGE_ADDRESS (NRF_UICR_BASE + 0x18) /**< Register where the mbr params page is stored in the UICR register. (Only in use in nRF52 MBR).*/ +#endif + +#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. */ + +#ifdef NRF51 + +#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. */ + +#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_SETTINGS_ADDRESS 0x0003FC00 /**< The field specifies the page location of the bootloader settings address. */ + +#endif + + + +#elif NRF52 + +#define BOOTLOADER_REGION_START 0x0007A000 /**< 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 BOOTLOADER_MBR_PARAMS_PAGE_ADDRESS 0x0007E000 /**< The field specifies the page location of the mbr params page 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. */ + +#ifndef DFU_APP_DATA_RESERVED +#define DFU_APP_DATA_RESERVED CODE_PAGE_SIZE * 0 /**< Size of Application Data that must be preserved between application updates. This value must be a multiple of page size. Page size is 0x400 (1024d) bytes, thus this value must be 0x0000, 0x0400, 0x0800, 0x0C00, 0x1000, etc. */ +#endif + +#define DFU_IMAGE_MAX_SIZE_FULL (DFU_REGION_TOTAL_SIZE - DFU_APP_DATA_RESERVED) /**< Maximum size of an application, excluding save data from the application. */ + +#define DFU_IMAGE_MAX_SIZE_BANKED (((DFU_IMAGE_MAX_SIZE_FULL) - \ + (DFU_IMAGE_MAX_SIZE_FULL % (2 * CODE_PAGE_SIZE)))/2) /**< Maximum size of an application, excluding save data from the application. */ + +#define DFU_BL_IMAGE_MAX_SIZE (BOOTLOADER_SETTINGS_ADDRESS - BOOTLOADER_REGION_START) /**< Maximum size of a bootloader, excluding save data from the current bootloader. */ + +#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 EMPTY_FLASH_MASK 0xFFFFFFFF /**< Bit mask that defines an empty address in flash. */ + +#define INVALID_PACKET 0x00 /**< Invalid packet identifies. */ +#define INIT_PACKET 0x01 /**< Packet identifies for initialization packet. */ +#define STOP_INIT_PACKET 0x02 /**< Packet identifies for stop initialization packet. Used when complete init packet has been received so that the init packet can be used for pre validaiton. */ +#define START_PACKET 0x03 /**< Packet identifies for the Data Start Packet. */ +#define DATA_PACKET 0x04 /**< Packet identifies for a Data Packet. */ +#define STOP_DATA_PACKET 0x05 /**< Packet identifies for the Data Stop Packet. */ + +#define DFU_UPDATE_SD 0x01 /**< Bit field indicating update of SoftDevice is ongoing. */ +#define DFU_UPDATE_BL 0x02 /**< Bit field indicating update of bootloader is ongoing. */ +#define DFU_UPDATE_APP 0x04 /**< Bit field indicating update of application is ongoing. */ + +#define DFU_INIT_RX 0x00 /**< Op Code identifies for receiving init packet. */ +#define DFU_INIT_COMPLETE 0x01 /**< Op Code identifies for transmission complete of init packet. */ + +// Safe guard to ensure during compile time that the DFU_APP_DATA_RESERVED is a multiple of page size. +STATIC_ASSERT((((DFU_APP_DATA_RESERVED) & (CODE_PAGE_SIZE - 1)) == 0x00)); + +/**@brief Structure holding a start packet containing update mode and image sizes. + */ +typedef struct +{ + uint8_t dfu_update_mode; /**< Packet type, used to identify the content of the received packet referenced by data packet. */ + uint32_t sd_image_size; /**< Size of the SoftDevice image to be transferred. Zero if no SoftDevice image will be transfered. */ + uint32_t bl_image_size; /**< Size of the Bootloader image to be transferred. Zero if no Bootloader image will be transfered. */ + uint32_t app_image_size; /**< Size of the application image to be transmitted. Zero if no Bootloader image will be transfered. */ +} dfu_start_packet_t; + +/**@brief Structure holding a bootloader init/data packet received. + */ +typedef struct +{ + uint32_t packet_length; /**< Packet length of the data packet. Each data is word size, meaning length of 4 is 4 words, not bytes. */ + uint32_t * p_data_packet; /**< Data Packet received. Each data is a word size entry. */ +} dfu_data_packet_t; + +/**@brief Structure for holding dfu update packet. Packet type indicate the type of packet. + */ +typedef struct +{ + uint32_t packet_type; /**< Packet type, used to identify the content of the received packet referenced by data packet. */ + union + { + dfu_data_packet_t data_packet; /**< Used when packet type is INIT_PACKET or DATA_PACKET. Packet contains data received for init or data. */ + dfu_start_packet_t * start_packet; /**< Used when packet type is START_DATA_PACKET. Will contain information on software to be updtaed, i.e. SoftDevice, Bootloader and/or Application along with image sizes. */ + } params; +} dfu_update_packet_t; + +/**@brief DFU status error codes. +*/ +typedef enum +{ + DFU_UPDATE_APP_COMPLETE, /**< Status update of application complete.*/ + DFU_UPDATE_SD_COMPLETE, /**< Status update of SoftDevice update complete. Note that this solely indicates that a new SoftDevice has been received and stored in bank 0 and 1. */ + DFU_UPDATE_SD_SWAPPED, /**< Status update of SoftDevice update complete. Note that this solely indicates that a new SoftDevice has been received and stored in bank 0 and 1. */ + DFU_UPDATE_BOOT_COMPLETE, /**< Status update complete.*/ + DFU_BANK_0_ERASED, /**< Status bank 0 erased.*/ + DFU_TIMEOUT, /**< Status timeout.*/ + DFU_RESET /**< Status Reset to indicate current update procedure has been aborted and system should reset. */ +} dfu_update_status_code_t; + +/**@brief Structure holding DFU complete event. +*/ +typedef struct +{ + dfu_update_status_code_t status_code; /**< Device Firmware Update status. */ + uint16_t app_crc; /**< CRC of the recieved application. */ + uint32_t sd_size; /**< Size of the recieved SoftDevice. */ + uint32_t bl_size; /**< Size of the recieved BootLoader. */ + uint32_t app_size; /**< Size of the recieved Application. */ + uint32_t sd_image_start; /**< Location in flash where the received SoftDevice image is stored. */ +} dfu_update_status_t; + +/**@brief Update complete handler type. */ +typedef void (*dfu_complete_handler_t)(dfu_update_status_t dfu_update_status); + +#endif // DFU_TYPES_H__ + +/**@} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/hci_transport/hci_mem_pool_internal.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/hci_transport/hci_mem_pool_internal.h new file mode 100644 index 0000000000..f5c963822e --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/hci_transport/hci_mem_pool_internal.h @@ -0,0 +1,32 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup memory_pool_internal Memory Pool Internal + * @{ + * @ingroup memory_pool + * + * @brief Memory pool internal definitions + */ + +#ifndef MEM_POOL_INTERNAL_H__ +#define MEM_POOL_INTERNAL_H__ + +#define TX_BUF_SIZE 32u /**< TX buffer size in bytes. */ +#define RX_BUF_SIZE 600u /**< RX buffer size in bytes. */ + +#define RX_BUF_QUEUE_SIZE 2u /**< RX buffer element size. */ + +#endif // MEM_POOL_INTERNAL_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/hci_transport/hci_transport_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/hci_transport/hci_transport_config.h new file mode 100644 index 0000000000..748b1ce67d --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/hci_transport/hci_transport_config.h @@ -0,0 +1,45 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/**@file + * + * @defgroup ble_sdk_bootloader_hci_congfig HCI Transport Layer Configuration + * @{ + * @ingroup dfu_bootloader_api + * @brief Definition of HCI Transport Layer configurable parameters + */ + +#ifndef HCI_TRANSPORT_CONFIG_H__ +#define HCI_TRANSPORT_CONFIG_H__ + +#include "boards.h" /**< Default include for boards.h which means that default pin numbers will be used for RX, TX, CTS, and RTS on the UART. Other pin number can be used if desired. */ + +/** This section covers configurable parameters for the HCI Transport SLIP layer. */ +#define HCI_SLIP_UART_RX_PIN_NUMBER RX_PIN_NUMBER /**< Defines the UART RX pin number. The default pin for the board is chosen, but can be overwritten. */ + +#define HCI_SLIP_UART_TX_PIN_NUMBER TX_PIN_NUMBER /**< Defines the UART TX pin number. The default pin for the board is chosen, but can be overwritten. */ + +#define HCI_SLIP_UART_RTS_PIN_NUMBER RTS_PIN_NUMBER /**< Defines the UART RTS pin number. The default pin for the board is chosen, but can be overwritten. */ + +#define HCI_SLIP_UART_CTS_PIN_NUMBER CTS_PIN_NUMBER /**< Defines the UART CTS pin number. The default pin for the board is chosen, but can be overwritten. */ + +#define HCI_SLIP_UART_MODE APP_UART_FLOW_CONTROL_DISABLED /**< Defines the UART mode to be used. Use UART Low Power with Flow Control - Valid values are defined in \ref app_uart_flow_control_t. For further information on the UART Low Power mode, please refer to: \ref app_uart . */ + +#define HCI_SLIP_UART_BAUDRATE UART_BAUDRATE_BAUDRATE_Baud38400 /**< Defines the UART Baud rate. Default is 38400 baud. */ + +/** This section covers configurable parameters for the HCI Transport layer that are used for calculating correct value for the retransmission timer timeout. */ +#define MAX_PACKET_SIZE_IN_BITS 8000u /**< Maximum size of a single application packet in bits. */ +#define USED_BAUD_RATE 38400u /**< The used uart baudrate. */ + +#endif // HCI_TRANSPORT_CONFIG_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/crc16/crc16.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/crc16/crc16.c new file mode 100644 index 0000000000..5e0220a171 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/crc16/crc16.c @@ -0,0 +1,31 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "crc16.h" + +#include + +uint16_t crc16_compute(uint8_t const * p_data, uint32_t size, uint16_t const * p_crc) +{ + uint16_t crc = (p_crc == NULL) ? 0xFFFF : *p_crc; + + for (uint32_t i = 0; i < size; i++) + { + crc = (uint8_t)(crc >> 8) | (crc << 8); + crc ^= p_data[i]; + crc ^= (uint8_t)(crc & 0xFF) >> 4; + crc ^= (crc << 8) << 4; + crc ^= ((crc & 0xFF) << 4) << 1; + } + + return crc; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/crc16/crc16.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/crc16/crc16.h similarity index 77% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/crc16/crc16.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/crc16/crc16.h index 57f6251354..aae81e2e46 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/crc16/crc16.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/crc16/crc16.h @@ -16,7 +16,8 @@ * @{ * @ingroup hci_transport * - * @brief This module implements the CRC-16 calculation in the blocks. + * @brief This module implements CRC-16-CCITT (polynomial 0x1021) with 0xFFFF initial value. + * The data can be passed in multiple blocks. */ #ifndef CRC16_H__ @@ -24,27 +25,19 @@ #include -#ifdef __cplusplus -extern "C" { -#endif - /**@brief Function for calculating CRC-16 in blocks. * - * Feed each consecutive data block into this function, along with the current value of p_crc as - * returned by the previous call of this function. The first call of this function should pass NULL + * Feed each consecutive data block into this function, along with the current value of p_crc as + * returned by the previous call of this function. The first call of this function should pass NULL * as the initial value of the crc in p_crc. * * @param[in] p_data The input data block for computation. * @param[in] size The size of the input data block in bytes. - * @param[in] p_crc The previous calculated CRC-16 value or NULL if first call. + * @param[in] p_crc The previous calculated CRC-16 value or NULL if first call. * * @return The updated CRC-16 value, based on the input supplied. */ -uint16_t crc16_compute(const uint8_t * p_data, uint32_t size, const uint16_t * p_crc); - -#ifdef __cplusplus -} -#endif +uint16_t crc16_compute(uint8_t const * p_data, uint32_t size, uint16_t const * p_crc); #endif // CRC16_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/experimental_section_vars/section_vars.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/experimental_section_vars/section_vars.h new file mode 100644 index 0000000000..f97168176a --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/experimental_section_vars/section_vars.h @@ -0,0 +1,263 @@ +/* Copyright (c) 2016 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef SECTION_VARS_H__ +#define SECTION_VARS_H__ + + +/** + * @defgroup section_vars Section variables + * @ingroup app_common + * @{ + * + * @brief Section variables. + */ + +#if defined(__ICCARM__) +// Enable IAR language extensions +#pragma language=extended +#endif + + +// Macro to delay macro expansion. +#define NRF_PRAGMA(x) _Pragma(#x) + + +/**@brief Macro to register a named section. + * + * @param[in] section_name Name of the section to register. + */ +#if defined(__CC_ARM) + +// Not required by this compiler. +#define NRF_SECTION_VARS_REGISTER_SECTION(section_name) + +#elif defined(__GNUC__) + +// Not required by this compiler. +#define NRF_SECTION_VARS_REGISTER_SECTION(section_name) + +#elif defined(__ICCARM__) + +#define NRF_SECTION_VARS_REGISTER_SECTION(section_name) NRF_PRAGMA(section = #section_name) + +#endif + + +/*lint -save -e27 */ + +/**@brief Macro to obtain the linker symbol for the beginning of a given section. + * + * @details The symbol that this macro resolves to is used to obtain a section start address. + * + * @param[in] section_name Name of the section. + */ +#if defined(__CC_ARM) + +#define NRF_SECTION_VARS_START_SYMBOL(section_name) section_name ## $$Base + +#elif defined(__GNUC__) + +#define NRF_SECTION_VARS_START_SYMBOL(section_name) __start_ ## section_name + +#elif defined(__ICCARM__) + +#define NRF_SECTION_VARS_START_SYMBOL(section_name) __section_begin(#section_name) + +#endif + + +/**@brief Macro to obtain the linker symbol for the end of a given section. + * + * @details The symbol that this macro resolves to is used to obtain a section end address. + * + * @param[in] section_name Name of the section. + */ +#if defined(__CC_ARM) + +#define NRF_SECTION_VARS_END_SYMBOL(section_name) section_name ## $$Limit + +#elif defined(__GNUC__) + +#define NRF_SECTION_VARS_END_SYMBOL(section_name) __stop_ ## section_name + +#elif defined(__ICCARM__) + +#define NRF_SECTION_VARS_END_SYMBOL(section_name) __section_end(#section_name) + +#endif + +/*lint -restore */ + + +/**@brief Macro for retrieving the length of a given section, in bytes. + * + * @param[in] section_name Name of the section. + */ +#if defined(__CC_ARM) + +#define NRF_SECTION_VARS_LENGTH(section_name) \ + ((uint32_t)&NRF_SECTION_VARS_END_SYMBOL(section_name) - (uint32_t)&NRF_SECTION_VARS_START_SYMBOL(section_name)) + +#elif defined(__GNUC__) + + #define NRF_SECTION_VARS_LENGTH(section_name) \ + ((uint32_t)&NRF_SECTION_VARS_END_SYMBOL(section_name) - (uint32_t)&NRF_SECTION_VARS_START_SYMBOL(section_name)) + +#elif defined(__ICCARM__) + + #define NRF_SECTION_VARS_LENGTH(section_name) \ + ((uint32_t)NRF_SECTION_VARS_END_SYMBOL(section_name) - (uint32_t)NRF_SECTION_VARS_START_SYMBOL(section_name)) + +#endif + + +/**@brief Macro to obtain the start address of a named section. + * + * param[in] section_name Name of the section. + */ +#if defined(__CC_ARM) + +#define NRF_SECTION_VARS_START_ADDR(section_name) (uint32_t)&NRF_SECTION_VARS_START_SYMBOL(section_name) + +#elif defined(__GNUC__) + +#define NRF_SECTION_VARS_START_ADDR(section_name) (uint32_t)&NRF_SECTION_VARS_START_SYMBOL(section_name) + +#elif defined(__ICCARM__) + +#define NRF_SECTION_VARS_START_ADDR(section_name) (uint32_t)iar_ ## section_name ## _start + +#endif + + +/*@brief Macro to obtain the end address of a named section. + * + * @param[in] section_name Name of the section. + */ +#if defined(__CC_ARM) + +#define NRF_SECTION_VARS_END_ADDR(section_name) (uint32_t)&NRF_SECTION_VARS_END_SYMBOL(section_name) + +#elif defined(__GNUC__) + +#define NRF_SECTION_VARS_END_ADDR(section_name) (uint32_t)&NRF_SECTION_VARS_END_SYMBOL(section_name) + +#elif defined(__ICCARM__) + +#define NRF_SECTION_VARS_END_ADDR(section_name) (uint32_t)iar_ ## section_name ## _end + +#endif + + +/**@brief Macro to extern a named section start and stop symbols. + * + * @note These declarations are required for GCC and Keil linkers (but not for IAR's). + * + * @param[in] type_name Name of the type stored in the section. + * @param[in] section_name Name of the section. + */ +#if defined(__CC_ARM) + +#define NRF_SECTION_VARS_REGISTER_SYMBOLS(type_name, section_name) \ + extern type_name * NRF_SECTION_VARS_START_SYMBOL(section_name); \ + extern void * NRF_SECTION_VARS_END_SYMBOL(section_name) + +#elif defined(__GNUC__) + +#define NRF_SECTION_VARS_REGISTER_SYMBOLS(type_name, section_name) \ + extern type_name * NRF_SECTION_VARS_START_SYMBOL(section_name); \ + extern void * NRF_SECTION_VARS_END_SYMBOL(section_name) + +#elif defined(__ICCARM__) + +// No symbol registration required for IAR. +#define NRF_SECTION_VARS_REGISTER_SYMBOLS(type_name, section_name) \ + extern void * iar_ ## section_name ## _start = __section_begin(#section_name); \ + extern void * iar_ ## section_name ## _end = __section_end(#section_name) + +#endif + + +/**@brief Macro to declare a variable to be placed in a named section. + * + * @details Declares a variable to be placed in a named section. This macro ensures that its symbol + * is not stripped by the linker because of optimizations. + * + * @warning The order with which variables are placed in a section is implementation dependant. + * Generally, variables are placed in a section depending on the order with which they + * are found by the linker. + * + * @warning The symbols added in the named section must be word aligned to prevent padding. + * + * @param[in] section_name Name of the section. + * @param[in] type_def Datatype of the variable to place in the given section. + */ +#if defined(__CC_ARM) + +#define NRF_SECTION_VARS_ADD(section_name, type_def) \ + static type_def __attribute__ ((section(#section_name))) __attribute__((used)) + +#elif defined(__GNUC__) + +#define NRF_SECTION_VARS_ADD(section_name, type_def) \ + static type_def __attribute__ ((section("."#section_name))) __attribute__((used)) + +#elif defined(__ICCARM__) + +#define NRF_SECTION_VARS_ADD(section_name, type_def) \ + __root type_def @ #section_name + +#endif + + +/**@brief Macro to get symbol from named section. + * + * @warning The stored symbol can only be resolved using this macro if the + * type of the data is word aligned. The operation of acquiring + * the stored symbol relies on sizeof of the stored type, no + * padding can exist in the named section in between individual + * stored items or this macro will fail. + * + * @param[in] i Index of item in section. + * @param[in] type_name Type name of item in section. + * @param[in] section_name Name of the section. + */ +#if defined(__CC_ARM) + +#define NRF_SECTION_VARS_GET(i, type_name, section_name) \ + (type_name*)(NRF_SECTION_VARS_START_ADDR(section_name) + i * sizeof(type_name)) + +#elif defined(__GNUC__) + +#define NRF_SECTION_VARS_GET(i, type_name, section_name) \ + (type_name*)(NRF_SECTION_VARS_START_ADDR(section_name) + i * sizeof(type_name)) + +#elif defined(__ICCARM__) + +#define NRF_SECTION_VARS_GET(i, type_name, section_name) \ + (type_name*)(NRF_SECTION_VARS_START_ADDR(section_name) + i * sizeof(type_name)) + +#endif + + +/**@brief Macro to get number of items in named section. + * + * @param[in] type_name Type name of item in section. + * @param[in] section_name Name of the section. + */ +#define NRF_SECTION_VARS_COUNT(type_name, section_name) \ + NRF_SECTION_VARS_LENGTH(section_name) / sizeof(type_name) + +/** @} */ + +#endif // SECTION_VARS_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/config/fds_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/config/fds_config.h new file mode 100644 index 0000000000..207f326f4c --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/config/fds_config.h @@ -0,0 +1,63 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef FDS_CONFIG_H__ +#define FDS_CONFIG_H__ + + /** + * @file fds_config.h + * + * @defgroup flash_data_storage_config Configuration options + * @ingroup flash_data_storage + * @{ + * @brief Configuration options for FDS. + */ + +/**@brief Configures the size of the internal queue. */ +#define FDS_OP_QUEUE_SIZE (4) + +/**@brief Determines how many @ref fds_record_chunk_t structures can be buffered at any time. */ +#define FDS_CHUNK_QUEUE_SIZE (8) + +/**@brief Configures the maximum number of callbacks that can be registered. */ +#define FDS_MAX_USERS (3) + +/**@brief Configures the number of virtual flash pages to use. + * + * The total amount of flash memory that is used by FDS amounts to + * @ref FDS_VIRTUAL_PAGES * @ref FDS_VIRTUAL_PAGE_SIZE * 4 bytes. + * On nRF51 ICs, this defaults to 3 * 256 * 4 bytes = 3072 bytes. + * On nRF52 ICs, it defaults to 3 * 1024 * 4 bytes = 12288 bytes. + * + * One of the virtual pages is reserved by the system for garbage collection. Therefore, the + * minimum is two virtual pages: one page to store data and one page to be used by the system for + * garbage collection. + */ +#define FDS_VIRTUAL_PAGES (3) + +/**@brief Configures the size of a virtual page of flash memory, expressed in number of + * 4-byte words. + * + * By default, a virtual page is the same size as a physical page. Therefore, the default size + * is 1024 bytes for nRF51 ICs and 4096 bytes for nRF52 ICs. + * + * The size of a virtual page must be a multiple of the size of a physical page. + */ +#if defined(NRF51) + #define FDS_VIRTUAL_PAGE_SIZE (256) +#elif defined(NRF52) + #define FDS_VIRTUAL_PAGE_SIZE (1024) +#endif + +/** @} */ + +#endif // FDS_CONFIG_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds.c new file mode 100644 index 0000000000..e3b9b028e3 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds.c @@ -0,0 +1,2058 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "fds.h" +#include "fds_config.h" +#include "fds_internal_defs.h" + +#include +#include +#include +#include "fstorage.h" +#include "app_util.h" +#include "nrf_error.h" + +#if defined(FDS_CRC_ENABLED) + #include "crc16.h" +#endif + + +static void fs_event_handler(fs_evt_t const * const evt, fs_ret_t result); + +// Our fstorage configuration. +FS_REGISTER_CFG(fs_config_t fs_config) = +{ + .callback = fs_event_handler, + .num_pages = FDS_PHY_PAGES, + // We register with the highest priority in order to be assigned + // the pages with the highest memory address (closest to the bootloader). + .priority = 0xFF +}; + +// Used to flag a record as dirty, i.e. ready for garbage collection. +static fds_tl_t const m_fds_tl_dirty = +{ + .record_key = FDS_RECORD_KEY_DIRTY, + .length_words = 0xFFFF // Leave the record length field unchanged in flash. +}; + +// Internal status flags. +static uint8_t m_flags; + +// The number of registered users and their callback functions. +static uint8_t m_users; +static fds_cb_t m_cb_table[FDS_MAX_USERS]; + +// The latest (largest) record ID written so far. +static uint32_t m_latest_rec_id; + +// The internal queues. +static fds_op_queue_t m_op_queue; +static fds_chunk_queue_t m_chunk_queue; + +// Structures used to hold informations about virtual pages. +static fds_page_t m_pages[FDS_MAX_PAGES]; +static fds_swap_page_t m_swap_page; + +// Garbage collection data. +static fds_gc_data_t m_gc; + + +static void flag_set(fds_flags_t flag) +{ + CRITICAL_SECTION_ENTER(); + m_flags |= flag; + CRITICAL_SECTION_EXIT(); +} + + +static void flag_clear(fds_flags_t flag) +{ + CRITICAL_SECTION_ENTER(); + m_flags &= ~(flag); + CRITICAL_SECTION_EXIT(); +} + + +static bool flag_is_set(fds_flags_t flag) +{ + return (m_flags & flag); +} + + +static void event_send(fds_evt_t const * const p_evt) +{ + for (uint32_t user = 0; user < FDS_MAX_USERS; user++) + { + if (m_cb_table[user] != NULL) + { + m_cb_table[user](p_evt); + } + } +} + + +static void event_prepare(fds_op_t const * const p_op, fds_evt_t * const p_evt) +{ + switch (p_op->op_code) + { + case FDS_OP_INIT: + p_evt->id = FDS_EVT_INIT; + break; + + case FDS_OP_WRITE: + p_evt->id = FDS_EVT_WRITE; + p_evt->write.file_id = p_op->write.header.ic.file_id; + p_evt->write.record_key = p_op->write.header.tl.record_key; + p_evt->write.record_id = p_op->write.header.record_id; + break; + + case FDS_OP_UPDATE: + p_evt->id = FDS_EVT_UPDATE; + p_evt->write.file_id = p_op->write.header.ic.file_id; + p_evt->write.record_key = p_op->write.header.tl.record_key; + p_evt->write.record_id = p_op->write.header.record_id; + p_evt->write.is_record_updated = (p_op->write.step == FDS_OP_WRITE_DONE); + break; + + case FDS_OP_DEL_RECORD: + p_evt->id = FDS_EVT_DEL_RECORD; + p_evt->del.file_id = p_op->del.file_id; + p_evt->del.record_key = p_op->del.record_key; + p_evt->del.record_id = p_op->del.record_to_delete; + break; + + case FDS_OP_DEL_FILE: + p_evt->id = FDS_EVT_DEL_FILE; + p_evt->del.file_id = p_op->del.file_id; + p_evt->del.record_key = FDS_RECORD_KEY_DIRTY; + break; + + case FDS_OP_GC: + p_evt->id = FDS_EVT_GC; + break; + + default: + // Should not happen. + break; + } +} + + +static bool header_is_valid(fds_header_t const * const p_header) +{ + return ((p_header->ic.file_id != FDS_FILE_ID_INVALID) && + (p_header->tl.record_key != FDS_RECORD_KEY_DIRTY)); +} + + +static bool address_is_valid(uint32_t const * const p_addr) +{ + return ((p_addr != NULL) && + (p_addr >= fs_config.p_start_addr) && + (p_addr <= fs_config.p_end_addr) && + (is_word_aligned(p_addr))); +} + + +static bool chunk_is_aligned(fds_record_chunk_t const * const p_chunk, uint32_t num_chunks) +{ + for (uint32_t i = 0; i < num_chunks; i++) + { + if (!is_word_aligned(p_chunk[i].p_data)) + { + return false; + } + } + return true; +} + + +// Reads a page tag, and determines if the page is used to store data or as swap. +static fds_page_type_t page_identify(uint32_t const * const p_page_addr) +{ + if (p_page_addr[FDS_PAGE_TAG_WORD_0] != FDS_PAGE_TAG_MAGIC) + { + return FDS_PAGE_UNDEFINED; + } + + switch (p_page_addr[FDS_PAGE_TAG_WORD_1]) + { + case FDS_PAGE_TAG_SWAP: + return FDS_PAGE_SWAP; + + case FDS_PAGE_TAG_DATA: + return FDS_PAGE_DATA; + + default: + return FDS_PAGE_UNDEFINED; + } +} + + +static bool page_is_erased(uint32_t const * const p_page_addr) +{ + for (uint32_t i = 0; i < FDS_PAGE_SIZE; i++) + { + if (*(p_page_addr + i) != FDS_ERASED_WORD) + { + return false; + } + } + + return true; +} + + +// NOTE: Must be called from within a critical section. +static bool page_has_space(uint16_t page, uint16_t length_words) +{ + length_words += m_pages[page].write_offset; + length_words += m_pages[page].words_reserved; + return (length_words < FDS_PAGE_SIZE); +} + + +// Given a pointer to a record, find the index of the page on which it is stored. +// Returns FDS_SUCCESS if the page is found, FDS_ERR_NOT_FOUND otherwise. +static ret_code_t page_from_record(uint16_t * const p_page, uint32_t const * const p_rec) +{ + ret_code_t ret = FDS_ERR_NOT_FOUND; + + CRITICAL_SECTION_ENTER(); + for (uint16_t i = 0; i < FDS_MAX_PAGES; i++) + { + if ((p_rec > m_pages[i].p_addr) && + (p_rec < m_pages[i].p_addr + FDS_PAGE_SIZE)) + { + ret = FDS_SUCCESS; + *p_page = i; + break; + } + } + CRITICAL_SECTION_EXIT(); + + return ret; +} + + +// Scan a page to determine how many words have been written to it. +// This information is used to set the page write offset during initialization. +// Additionally, this function updates the latest record ID as it proceeds. +// If an invalid record header is found, the can_gc argument is set to true. +static void page_scan(uint32_t const * p_addr, + uint16_t * const words_written, + bool * const can_gc) +{ + uint32_t const * const p_end_addr = p_addr + FDS_PAGE_SIZE; + bool dirty_record_found = false; + + p_addr += FDS_PAGE_TAG_SIZE; + *words_written = FDS_PAGE_TAG_SIZE; + + while ((p_addr < p_end_addr) && (*p_addr != FDS_ERASED_WORD)) + { + // NOTE: Skip records with a dirty key or with a missing file ID. + fds_header_t const * const p_header = (fds_header_t*)p_addr; + + if (!header_is_valid(p_header)) + { + dirty_record_found = true; + } + else + { + // Update the latest (largest) record ID. + if (p_header->record_id > m_latest_rec_id) + { + m_latest_rec_id = p_header->record_id; + } + } + + // Jump to the next record. + p_addr += (FDS_HEADER_SIZE + p_header->tl.length_words); + *words_written += (FDS_HEADER_SIZE + p_header->tl.length_words); + } + + if (can_gc != NULL) + { + *can_gc = dirty_record_found; + } +} + + +static void page_offsets_update(fds_page_t * const p_page, uint16_t length_words) +{ + p_page->write_offset += (FDS_HEADER_SIZE + length_words); + p_page->words_reserved -= (FDS_HEADER_SIZE + length_words); +} + + +// Tags a page as swap, i.e., reserved for GC. +static ret_code_t page_tag_write_swap() +{ + // Needs to be statically allocated since it will be written to flash. + static uint32_t const page_tag_swap[] = {FDS_PAGE_TAG_MAGIC, FDS_PAGE_TAG_SWAP}; + return fs_store(&fs_config, m_swap_page.p_addr, page_tag_swap, FDS_PAGE_TAG_SIZE); +} + + +// Tags a page as data, i.e, ready for storage. +static ret_code_t page_tag_write_data(uint32_t const * const p_page_addr) +{ + // Needs to be statically allocated since it will be written to flash. + static uint32_t const page_tag_data[] = {FDS_PAGE_TAG_MAGIC, FDS_PAGE_TAG_DATA}; + return fs_store(&fs_config, p_page_addr, page_tag_data, FDS_PAGE_TAG_SIZE); +} + + +// Reserve space on a page. +// NOTE: this function takes into the account the space required for the record header. +static ret_code_t write_space_reserve(uint16_t length_words, uint16_t * p_page) +{ + bool space_reserved = false; + uint16_t const total_len_words = length_words + FDS_HEADER_SIZE; + + if (total_len_words >= FDS_PAGE_SIZE - FDS_PAGE_TAG_SIZE) + { + return FDS_ERR_RECORD_TOO_LARGE; + } + + CRITICAL_SECTION_ENTER(); + for (uint16_t page = 0; page < FDS_MAX_PAGES; page++) + { + if ((m_pages[page].page_type == FDS_PAGE_DATA) && + (page_has_space(page, total_len_words))) + { + space_reserved = true; + *p_page = page; + + m_pages[page].words_reserved += total_len_words; + break; + } + } + CRITICAL_SECTION_EXIT(); + + return (space_reserved) ? FDS_SUCCESS : FDS_ERR_NO_SPACE_IN_FLASH; +} + + +// Undo a write_space_reserve() call. +// NOTE: Must be called within a critical section. +static void write_space_free(uint16_t length_words, uint16_t page) +{ + m_pages[page].words_reserved -= (length_words + FDS_HEADER_SIZE); +} + + +static uint32_t record_id_new(void) +{ + CRITICAL_SECTION_ENTER(); + m_latest_rec_id++; + CRITICAL_SECTION_EXIT(); + return m_latest_rec_id; +} + + +// Given a page and a record, finds the next valid record on that page. If p_record is NULL, +// search from the beginning of the page, otherwise, resume searching from the address +// pointed by p_record. Returns true if a record is found, returns false otherwise. +// If no record is found, p_record is unchanged. +static bool record_find_next(uint16_t page, uint32_t const ** p_record) +{ + fds_header_t const * p_header; + uint32_t const * p_next_rec = (*p_record); + + // If this is not the first invocation on this page, then jump to the next record. + // Otherwise, start searching from the beginning of the page. + if (p_next_rec != NULL) + { + p_header = ((fds_header_t*)p_next_rec); + p_next_rec += (FDS_HEADER_SIZE + p_header->tl.length_words); + } + else + { + p_next_rec = m_pages[page].p_addr + FDS_PAGE_TAG_SIZE; + } + + // Read records from the page, until a valid record is found or the end of the page is + // reached. The argument p_record is only updated if a valid record is found. + while ((p_next_rec < (m_pages[page].p_addr + FDS_PAGE_SIZE) && + *p_next_rec != FDS_ERASED_WORD)) + { + p_header = (fds_header_t*)p_next_rec; + + if (header_is_valid(p_header)) + { + *p_record = p_next_rec; + return true; + } + else + { + // The record is not valid, jump to the next. + p_next_rec += (FDS_HEADER_SIZE + (p_header->tl.length_words)); + } + } + + // No more valid records on this page. + return false; +} + + +// Find a record given its descriptor and retrive the page in which the record is stored. +// NOTE: Do not pass NULL as an argument for p_page. +static bool record_find_by_desc(fds_record_desc_t * const p_desc, uint16_t * const p_page) +{ + // If the gc_run_count field in the descriptor matches our counter, then the record has + // not been moved. If the address is valid, and the record ID matches, there is no need + // to find the record again. Only lookup the page in which the record is stored. + + if ((address_is_valid(p_desc->p_record)) && + (p_desc->gc_run_count == m_gc.run_count) && + (p_desc->record_id == ((fds_header_t*)p_desc->p_record)->record_id)) + { + return (page_from_record(p_page, p_desc->p_record) == FDS_SUCCESS); + } + + // Otherwise, find the record in flash. + for (*p_page = 0; *p_page < FDS_MAX_PAGES; (*p_page)++) + { + // Set p_record to NULL to make record_find_next() search from the beginning of the page. + uint32_t const * p_record = NULL; + + while (record_find_next(*p_page, &p_record)) + { + fds_header_t const * const p_header = (fds_header_t*)p_record; + if (p_header->record_id == p_desc->record_id) + { + p_desc->p_record = p_record; + p_desc->gc_run_count = m_gc.run_count; + return true; + } + } + } + + return false; +} + + +// Search for a record and return its descriptor. +// If p_file_id is NULL, only the record key will be used for matching. +// If p_record_key is NULL, only the file ID will be used for matching. +// If both are NULL, it will iterate through all records. +static ret_code_t record_find(uint16_t const * const p_file_id, + uint16_t const * const p_record_key, + fds_record_desc_t * const p_desc, + fds_find_token_t * const p_token) +{ + if (!flag_is_set(FDS_FLAG_INITIALIZED)) + { + return FDS_ERR_NOT_INITIALIZED; + } + + if (p_desc == NULL || p_token == NULL) + { + return FDS_ERR_NULL_ARG; + } + + // Begin (or resume) searching for a record. + for (; p_token->page < FDS_MAX_PAGES; p_token->page++) + { + if (m_pages[p_token->page].page_type != FDS_PAGE_DATA) + { + // Skip this page. + continue; + } + + while (record_find_next(p_token->page, &p_token->p_addr)) + { + fds_header_t const * const p_header = (fds_header_t*)p_token->p_addr; + + // A valid record was found, check its header for a match. + if ((p_file_id != NULL) && + (p_header->ic.file_id != *p_file_id)) + { + continue; + } + + if ((p_record_key != NULL) && + (p_header->tl.record_key != *p_record_key)) + { + continue; + } + + // Record found; update the descriptor. + p_desc->record_id = p_header->record_id; + p_desc->p_record = p_token->p_addr; + p_desc->gc_run_count = m_gc.run_count; + + return FDS_SUCCESS; + } + + // We have scanned an entire page. Set the address in the token to NULL + // so that it will be updated in the next iteration. + p_token->p_addr = NULL; + } + + return FDS_ERR_NOT_FOUND; +} + + +// Retrieve basic statistics about dirty records on a page. +static void dirty_records_stat(uint16_t page, + uint16_t * const p_dirty_records, + uint16_t * const p_word_count) +{ + fds_header_t const * p_header; + uint32_t const * p_rec; + + p_rec = m_pages[page].p_addr + FDS_PAGE_TAG_SIZE; + + while ((p_rec < (m_pages[page].p_addr + FDS_PAGE_SIZE)) && + (*p_rec != FDS_ERASED_WORD)) + { + p_header = (fds_header_t*)p_rec; + + if (!header_is_valid(p_header)) + { + (*p_dirty_records) += 1; + (*p_word_count) += p_header->tl.length_words; + } + else + { + p_rec += (FDS_HEADER_SIZE + (p_header->tl.length_words)); + } + } +} + + +// Advances one position in the queue. +// Returns true if the queue is not empty. +static bool queue_advance(void) +{ + // Reset the current element. + memset(&m_op_queue.op[m_op_queue.rp], 0x00, sizeof(fds_op_t)); + + if (m_op_queue.count != 0) + { + // Advance in the queue, wrapping around if necessary. + m_op_queue.rp = (m_op_queue.rp + 1) % FDS_OP_QUEUE_SIZE; + m_op_queue.count--; + } + + return (m_op_queue.count != 0); +} + + +// Given a pointer to an element in the chunk queue, computes the pointer to +// the next element in the queue. Handles wrap around. +void chunk_queue_next(fds_record_chunk_t ** pp_chunk) +{ + if ((*pp_chunk) != &m_chunk_queue.chunk[FDS_CHUNK_QUEUE_SIZE - 1]) + { + (*pp_chunk)++; + return; + } + + *pp_chunk = &m_chunk_queue.chunk[0]; +} + + +// Retrieve the current chunk, and advance the queue. +static void chunk_queue_get_and_advance(fds_record_chunk_t ** pp_chunk) +{ + if (m_chunk_queue.count != 0) + { + // Point to the current chunk and advance the queue. + *pp_chunk = &m_chunk_queue.chunk[m_chunk_queue.rp]; + + m_chunk_queue.rp = (m_chunk_queue.rp + 1) % FDS_CHUNK_QUEUE_SIZE; + m_chunk_queue.count--; + } +} + + +static void chunk_queue_skip(fds_op_t const * const p_op) +{ + if ((p_op->op_code == FDS_OP_WRITE) || + (p_op->op_code == FDS_OP_UPDATE)) + { + m_chunk_queue.rp += p_op->write.chunk_count; + m_chunk_queue.count -= p_op->write.chunk_count; + } +} + + +// Enqueue an operation. +static bool op_enqueue(fds_op_t const * const p_op, + uint32_t num_chunks, + fds_record_chunk_t const * const p_chunk) +{ + uint32_t idx; + bool ret = false; + + CRITICAL_SECTION_ENTER(); + if ((m_op_queue.count <= FDS_OP_QUEUE_SIZE - 1) && + (m_chunk_queue.count <= FDS_CHUNK_QUEUE_SIZE - num_chunks)) + { + idx = (m_op_queue.count + m_op_queue.rp) % FDS_OP_QUEUE_SIZE; + + m_op_queue.op[idx] = *p_op; + m_op_queue.count++; + + if (num_chunks != 0) + { + idx = (m_chunk_queue.count + m_chunk_queue.rp) % FDS_CHUNK_QUEUE_SIZE; + + fds_record_chunk_t * p_chunk_dst; + p_chunk_dst = &m_chunk_queue.chunk[idx]; + + for (uint32_t i = 0; i < num_chunks; i++) + { + *p_chunk_dst = p_chunk[i]; + chunk_queue_next(&p_chunk_dst); + } + + m_chunk_queue.count += num_chunks; + } + + ret = true; + } + CRITICAL_SECTION_EXIT(); + + return ret; +} + + +// This function is called during initialization to setup the page structure (m_pages) and +// provide additional information regarding eventual further initialization steps. +static fds_init_opts_t pages_init() +{ + uint32_t ret = NO_PAGES; + // The index of the page being initialized in m_pages[]. + uint16_t page = 0; + + for (uint16_t i = 0; i < FDS_VIRTUAL_PAGES; i++) + { + uint32_t const * const p_page_addr = fs_config.p_start_addr + (i * FDS_PAGE_SIZE); + fds_page_type_t const page_type = page_identify(p_page_addr); + + switch (page_type) + { + case FDS_PAGE_UNDEFINED: + if (page_is_erased(p_page_addr)) + { + if (m_swap_page.p_addr != NULL) + { + // If a swap page is already set, flag the page as erased (in m_pages) + // and try to tag it as data (in flash) later on during initialization. + m_pages[page].page_type = FDS_PAGE_ERASED; + m_pages[page].p_addr = p_page_addr; + m_pages[page].write_offset = FDS_PAGE_TAG_SIZE; + + // This is a candidate for a potential new swap page, in case the + // current swap is going to be promoted to complete a GC instance. + m_gc.cur_page = page; + page++; + } + else + { + // If there is no swap page yet, use this one. + m_swap_page.p_addr = p_page_addr; + m_swap_page.write_offset = FDS_PAGE_TAG_SIZE; + } + + ret |= PAGE_ERASED; + } + break; + + case FDS_PAGE_DATA: + m_pages[page].page_type = FDS_PAGE_DATA; + m_pages[page].p_addr = p_page_addr; + // Scan the page to compute its write offset and determine whether or not the page + // can be garbage collected. Additionally, update the latest kwown record ID. + page_scan(p_page_addr, &m_pages[page].write_offset, &m_pages[page].can_gc); + + ret |= PAGE_DATA; + page++; + + break; + + case FDS_PAGE_SWAP: + m_swap_page.p_addr = p_page_addr; + // If the swap is promoted, this offset should be kept, otherwise, + // it should be set to FDS_PAGE_TAG_SIZE. + page_scan(p_page_addr, &m_swap_page.write_offset, NULL); + + ret |= (m_swap_page.write_offset == FDS_PAGE_TAG_SIZE) ? + SWAP_EMPTY : SWAP_DIRTY; + break; + + default: + // Shouldn't happen. + break; + } + } + + return (fds_init_opts_t)ret; +} + + +// Write the first part of a record header (the key and length). +static ret_code_t record_header_write_begin(fds_op_t * const p_op, uint32_t * const p_addr) +{ + ret_code_t ret; + ret = fs_store(&fs_config, p_addr + FDS_OFFSET_TL, + (uint32_t*)&p_op->write.header.tl, FDS_HEADER_SIZE_TL); + + // Write the record ID next. + p_op->write.step = FDS_OP_WRITE_RECORD_ID; + + return (ret == FS_SUCCESS) ? FDS_SUCCESS : FDS_ERR_BUSY; +} + + +static ret_code_t record_header_write_id(fds_op_t * const p_op, uint32_t * const p_addr) +{ + ret_code_t ret; + ret = fs_store(&fs_config, p_addr + FDS_OFFSET_ID, + (uint32_t*)&p_op->write.header.record_id, FDS_HEADER_SIZE_ID); + + // If this record has zero chunk, write the last part of the header directly. + // Otherwise, write the record chunks next. + p_op->write.step = (p_op->write.chunk_count != 0) ? FDS_OP_WRITE_CHUNKS : + FDS_OP_WRITE_HEADER_FINALIZE; + + return (ret == FS_SUCCESS) ? FDS_SUCCESS : FDS_ERR_BUSY; +} + + +static ret_code_t record_header_write_finalize(fds_op_t * const p_op, uint32_t * const p_addr) +{ + ret_code_t ret; + ret = fs_store(&fs_config, p_addr + FDS_OFFSET_IC, + (uint32_t*)&p_op->write.header.ic, FDS_HEADER_SIZE_IC); + + // If this is a simple write operation, then this is the last step. + // If this is an update instead, delete the old record next. + p_op->write.step = (p_op->op_code == FDS_OP_UPDATE) ? FDS_OP_WRITE_FLAG_DIRTY : + FDS_OP_WRITE_DONE; + + return (ret == FS_SUCCESS) ? FDS_SUCCESS : FDS_ERR_BUSY; +} + + +static ret_code_t record_header_flag_dirty(uint32_t * const p_record) +{ + // Flag the record as dirty. + fs_ret_t ret = fs_store(&fs_config, p_record, + (uint32_t*)&m_fds_tl_dirty, FDS_HEADER_SIZE_TL); + + return (ret == FS_SUCCESS) ? FDS_SUCCESS : FDS_ERR_BUSY; +} + + +static ret_code_t record_find_and_delete(fds_op_t * const p_op) +{ + ret_code_t ret; + uint16_t page; + fds_record_desc_t desc = {0}; + + desc.record_id = p_op->del.record_to_delete; + + if (record_find_by_desc(&desc, &page)) + { + fds_header_t const * const p_header = (fds_header_t const *)desc.p_record; + + // Copy the record key and file ID, so that they can be returned in the event. + // In case this function is run as part of an update, there is no need to copy + // the file ID and record key since they are present in the header stored + // in the queue element. + + p_op->del.file_id = p_header->ic.file_id; + p_op->del.record_key = p_header->tl.record_key; + + // Flag the record as dirty. + ret = record_header_flag_dirty((uint32_t*)desc.p_record); + + // This page can now be garbage collected. + m_pages[page].can_gc = true; + } + else + { + // The record never existed, or it has already been deleted. + ret = FDS_ERR_NOT_FOUND; + } + + return ret; +} + + +// Finds a record within a file and flags it as dirty. +static ret_code_t file_find_and_delete(fds_op_t * const p_op) +{ + ret_code_t ret; + fds_record_desc_t desc; + + // This token must persist across calls. + static fds_find_token_t tok = {0}; + + // Pass NULL to ignore the record key. + ret = record_find(&p_op->del.file_id, NULL, &desc, &tok); + + if (ret == FDS_SUCCESS) + { + // A record was found: flag it as dirty. + ret = record_header_flag_dirty((uint32_t*)desc.p_record); + + // This page can now be garbage collected. + m_pages[tok.page].can_gc = true; + } + else // FDS_ERR_NOT_FOUND + { + // No more records were found. Zero the token, so that it can be reused. + memset(&tok, 0x00, sizeof(fds_find_token_t)); + } + + return ret; +} + + +// Writes a record chunk to flash and advances the chunk queue. Additionally, decrements +// the number of chunks left to write for this operation and accumulates the offset. +static ret_code_t record_write_chunk(fds_op_t * const p_op, uint32_t * const p_addr) +{ + ret_code_t ret; + fds_record_chunk_t * p_chunk = NULL; + + // Retrieve the next chunk to be written. + chunk_queue_get_and_advance(&p_chunk); + + ret = fs_store(&fs_config, p_addr + p_op->write.chunk_offset, + p_chunk->p_data, p_chunk->length_words); + + // Accumulate the offset. + p_op->write.chunk_offset += p_chunk->length_words; + + // Decrement the number of chunks left to write. + // NOTE: If chunk_count is initially zero, this function is not called + // because this step is skipped entirely. See record_header_write_id(). + p_op->write.chunk_count--; + + if (p_op->write.chunk_count == 0) + { + // All record chunks have been written; write the last part of + // the record header to finalize the write operation. + p_op->write.step = FDS_OP_WRITE_HEADER_FINALIZE; + } + + return (ret == NRF_SUCCESS) ? FDS_SUCCESS : FDS_ERR_BUSY; +} + + +#if defined(FDS_CRC_ENABLED) + +static bool crc_verify_success(uint16_t crc, uint16_t len_words, uint32_t const * const p_data) +{ + uint16_t computed_crc; + + // The CRC is computed on the entire record, except the CRC field itself. + // The record header is 12 bytes, out of these we have to skip bytes 6 to 8 where the + // CRC itself is stored. Then we compute the CRC for the rest of the record, from byte 8 of + // the header (where the record ID begins) to the end of the record data. + computed_crc = crc16_compute((uint8_t const *)p_data, 6, NULL); + computed_crc = crc16_compute((uint8_t const *)p_data + 8, + (FDS_HEADER_SIZE_ID + len_words) * sizeof(uint32_t), + &computed_crc); + + return (computed_crc == crc); +} + +#endif + + +static void gc_init(void) +{ + m_gc.run_count++; + m_gc.cur_page = 0; + m_gc.resume = false; + + // Setup which pages to GC. Defer checking for open records and the can_gc flag, + // as other operations might change those while GC is running. + for (uint16_t i = 0; i < FDS_MAX_PAGES; i++) + { + m_gc.do_gc_page[i] = (m_pages[i].page_type == FDS_PAGE_DATA); + } +} + + +// Obtain the next page to be garbage collected. +// Returns true if there are pages left to garbage collect, returns false otherwise. +static bool gc_page_next(uint16_t * const p_next_page) +{ + bool ret = false; + + for (uint16_t i = 0; i < FDS_MAX_PAGES; i++) + { + if (m_gc.do_gc_page[i]) + { + // Do not attempt to GC this page again. + m_gc.do_gc_page[i] = false; + + // Only GC pages with no open records and with some records which have been deleted. + if ((m_pages[i].records_open == 0) && (m_pages[i].can_gc == true)) + { + *p_next_page = i; + ret = true; + break; + } + } + } + + return ret; +} + + +static ret_code_t gc_swap_erase(void) +{ + m_gc.state = GC_DISCARD_SWAP; + m_swap_page.write_offset = FDS_PAGE_TAG_SIZE; + + return fs_erase(&fs_config, m_swap_page.p_addr, FDS_PHY_PAGES_IN_VPAGE); +} + + +// Erase the page being garbage collected, or erase the swap in case there are any open +// records on the page being garbage collected. +static ret_code_t gc_page_erase(void) +{ + uint32_t ret; + uint16_t const gc = m_gc.cur_page; + + if (m_pages[gc].records_open == 0) + { + ret = fs_erase(&fs_config, m_pages[gc].p_addr, FDS_PHY_PAGES_IN_VPAGE); + m_gc.state = GC_ERASE_PAGE; + } + else + { + // If there are open records, stop garbage collection on this page. + // Discard the swap and try to garbage collect another page. + ret = gc_swap_erase(); + } + + return ret; +} + + +// Copy the current record to swap. +static ret_code_t gc_record_copy(void) +{ + fds_header_t const * const p_header = (fds_header_t*)m_gc.p_record_src; + uint32_t const * const p_dest = m_swap_page.p_addr + m_swap_page.write_offset; + uint16_t const record_len = FDS_HEADER_SIZE + p_header->tl.length_words; + + m_gc.state = GC_COPY_RECORD; + + // Copy the record to swap; it is guaranteed to fit in the destination page, + // so there is no need to check its size. This will either succeed or timeout. + return fs_store(&fs_config, p_dest, m_gc.p_record_src, record_len); +} + + +static ret_code_t gc_record_find_next(void) +{ + ret_code_t ret; + + // Find the next valid record to copy. + if (record_find_next(m_gc.cur_page, &m_gc.p_record_src)) + { + ret = gc_record_copy(); + } + else + { + // No more records left to copy on this page; swap pages. + ret = gc_page_erase(); + } + + return ret; +} + + +// Promote the swap by tagging it as a data page. +static ret_code_t gc_swap_promote(void) +{ + m_gc.state = GC_PROMOTE_SWAP; + return page_tag_write_data(m_pages[m_gc.cur_page].p_addr); +} + + +// Tag the page just garbage collected as swap. +static ret_code_t gc_tag_new_swap(void) +{ + m_gc.state = GC_TAG_NEW_SWAP; + m_gc.p_record_src = NULL; + return page_tag_write_swap(); +} + + +static ret_code_t gc_next_page(void) +{ + if (!gc_page_next(&m_gc.cur_page)) + { + // No pages left to GC; GC has terminated. Reset the state. + m_gc.state = GC_BEGIN; + m_gc.cur_page = 0; + m_gc.p_record_src = NULL; + + return FDS_OP_COMPLETED; + } + + return gc_record_find_next(); +} + + +// Update the swap page offeset after a record has been successfully copied to it. +static void gc_update_swap_offset(void) +{ + fds_header_t const * const p_header = (fds_header_t*)m_gc.p_record_src; + uint16_t const record_len = FDS_HEADER_SIZE + p_header->tl.length_words; + + m_swap_page.write_offset += record_len; +} + + +static void gc_swap_pages(void) +{ + // The page being garbage collected will be the new swap page, + // and the current swap will be used as a data page (promoted). + uint32_t const * const p_addr = m_swap_page.p_addr; + + m_swap_page.p_addr = m_pages[m_gc.cur_page].p_addr; + m_pages[m_gc.cur_page].p_addr = p_addr; + + // Keep the offset for this page, but reset it for the swap. + m_pages[m_gc.cur_page].write_offset = m_swap_page.write_offset; + m_swap_page.write_offset = FDS_PAGE_TAG_SIZE; +} + + +static void gc_state_advance(void) +{ + switch (m_gc.state) + { + case GC_BEGIN: + gc_init(); + m_gc.state = GC_NEXT_PAGE; + break; + + // A record was successfully copied. + case GC_COPY_RECORD: + gc_update_swap_offset(); + m_gc.state = GC_FIND_NEXT_RECORD; + break; + + // A page was successfully erased. Prepare to promote the swap. + case GC_ERASE_PAGE: + gc_swap_pages(); + m_gc.state = GC_PROMOTE_SWAP; + break; + + // Swap was discarded because the page being GC'ed had open records. + case GC_DISCARD_SWAP: + // Swap was sucessfully promoted. + case GC_PROMOTE_SWAP: + // Prepare to tag the page just GC'ed as swap. + m_gc.state = GC_TAG_NEW_SWAP; + break; + + case GC_TAG_NEW_SWAP: + m_gc.state = GC_NEXT_PAGE; + break; + + default: + // Should not happen. + break; + } +} + + +// Initialize the filesystem. +static ret_code_t init_execute(uint32_t prev_ret, fds_op_t * const p_op) +{ + ret_code_t ret = FDS_ERR_INTERNAL; + + if (prev_ret != FS_SUCCESS) + { + // A previous operation has timed out. + flag_clear(FDS_FLAG_INITIALIZING); + return FDS_ERR_OPERATION_TIMEOUT; + } + + switch (p_op->init.step) + { + case FDS_OP_INIT_TAG_SWAP: + // The page write offset was determined previously by pages_init(). + ret = page_tag_write_swap(); + p_op->init.step = FDS_OP_INIT_TAG_DATA; + break; + + case FDS_OP_INIT_TAG_DATA: + { + // Tag remaining erased pages as data. + bool write_reqd = false; + for (uint16_t i = 0; i < FDS_MAX_PAGES; i++) + { + if (m_pages[i].page_type == FDS_PAGE_ERASED) + { + ret = page_tag_write_data(m_pages[i].p_addr); + m_pages[i].page_type = FDS_PAGE_DATA; + write_reqd = true; + break; + } + } + if (!write_reqd) + { + flag_set(FDS_FLAG_INITIALIZED); + flag_clear(FDS_FLAG_INITIALIZING); + return FDS_OP_COMPLETED; + } + } + break; + + case FDS_OP_INIT_ERASE_SWAP: + ret = fs_erase(&fs_config, m_swap_page.p_addr, FDS_PHY_PAGES_IN_VPAGE); + // If the swap is going to be discarded then reset its write_offset. + m_swap_page.write_offset = FDS_PAGE_TAG_SIZE; + p_op->init.step = FDS_OP_INIT_TAG_SWAP; + break; + + case FDS_OP_INIT_PROMOTE_SWAP: + { + // When promoting the swap, keep the write_offset set by pages_init(). + ret = page_tag_write_data(m_swap_page.p_addr); + + uint16_t const gc = m_gc.cur_page; + uint32_t const * const p_old_swap = m_swap_page.p_addr; + + // Execute the swap. + m_swap_page.p_addr = m_pages[gc].p_addr; + m_pages[gc].p_addr = p_old_swap; + + // Copy the offset from the swap to the new page. + m_pages[gc].write_offset = m_swap_page.write_offset; + m_swap_page.write_offset = FDS_PAGE_TAG_SIZE; + + m_pages[gc].page_type = FDS_PAGE_DATA; + p_op->init.step = FDS_OP_INIT_TAG_SWAP; + } + break; + + default: + // Should not happen. + break; + } + + if (ret != FDS_SUCCESS) + { + // fstorage queue was full. + flag_clear(FDS_FLAG_INITIALIZING); + return FDS_ERR_BUSY; + } + + return FDS_OP_EXECUTING; +} + + +// Executes write and update operations. +static ret_code_t write_execute(uint32_t prev_ret, fds_op_t * const p_op) +{ + ret_code_t ret; + uint32_t * p_write_addr; + fds_page_t * const p_page = &m_pages[p_op->write.page]; + + // This must persist across calls. + static fds_record_desc_t desc = {0}; + + if (prev_ret != FS_SUCCESS) + { + // The previous operation has timed out, update offsets. + page_offsets_update(p_page, p_op->write.header.tl.length_words); + return FDS_ERR_OPERATION_TIMEOUT; + } + + // Compute the address where to write data. + p_write_addr = (uint32_t*)(p_page->p_addr + p_page->write_offset); + + // Execute the current step of the operation, and set one to be executed next. + switch (p_op->write.step) + { + case FDS_OP_WRITE_FIND_RECORD: + { + // The first step of updating a record constists of locating the copy to be deleted. + // If the old copy couldn't be found for any reason then the update should fail. + // This prevents duplicates when queuing multiple updates of the same record. + + uint16_t page; + desc.p_record = NULL; + desc.record_id = p_op->write.record_to_delete; + + if (!record_find_by_desc(&desc, &page)) + { + return FDS_ERR_NOT_FOUND; + } + // Setting the step is redundant since we are falling through. + } + // Fallthrough to FDS_OP_WRITE_HEADER_BEGIN. + + case FDS_OP_WRITE_HEADER_BEGIN: + ret = record_header_write_begin(p_op, p_write_addr); + break; + + case FDS_OP_WRITE_RECORD_ID: + ret = record_header_write_id(p_op, p_write_addr); + break; + + case FDS_OP_WRITE_CHUNKS: + ret = record_write_chunk(p_op, p_write_addr); + break; + + case FDS_OP_WRITE_HEADER_FINALIZE: + ret = record_header_write_finalize(p_op, p_write_addr); + break; + + case FDS_OP_WRITE_FLAG_DIRTY: + ret = record_header_flag_dirty((uint32_t*)desc.p_record); + p_op->write.step = FDS_OP_WRITE_DONE; + break; + + case FDS_OP_WRITE_DONE: + ret = FDS_OP_COMPLETED; + +#if defined(FDS_CRC_ENABLED) + if (flag_is_set(FDS_FLAG_VERIFY_CRC)) + { + if (!crc_verify_success(p_op->write.header.ic.crc16, + p_op->write.header.tl.length_words, + p_write_addr)) + { + ret = FDS_ERR_CRC_CHECK_FAILED; + } + } +#endif + break; + + default: + ret = FDS_ERR_INTERNAL; + break; + } + + // An operation has either completed or failed. It may have failed because fstorage + // ran out of memory, or because the user tried to delete a record which did not exist. + if (ret != FDS_OP_EXECUTING) + { + // There won't be another callback for this operation, so update the page offset now. + page_offsets_update(p_page, p_op->write.header.tl.length_words); + } + + return ret; +} + + +static ret_code_t delete_execute(uint32_t prev_ret, fds_op_t * const p_op) +{ + ret_code_t ret; + + if (prev_ret != FS_SUCCESS) + { + return FDS_ERR_OPERATION_TIMEOUT; + } + + switch (p_op->del.step) + { + case FDS_OP_DEL_RECORD_FLAG_DIRTY: + ret = record_find_and_delete(p_op); + p_op->del.step = FDS_OP_DEL_DONE; + break; + + case FDS_OP_DEL_FILE_FLAG_DIRTY: + ret = file_find_and_delete(p_op); + if (ret == FDS_ERR_NOT_FOUND) + { + // No more records could be found. + // There won't be another callback for this operation, so return now. + ret = FDS_OP_COMPLETED; + } + break; + + case FDS_OP_DEL_DONE: + ret = FDS_OP_COMPLETED; + break; + + default: + ret = FDS_ERR_INTERNAL; + break; + } + + return ret; +} + + +static ret_code_t gc_execute(uint32_t prev_ret) +{ + ret_code_t ret; + + if (prev_ret != FS_SUCCESS) + { + return FDS_ERR_OPERATION_TIMEOUT; + } + + if (m_gc.resume) + { + m_gc.resume = false; + } + else + { + gc_state_advance(); + } + + switch (m_gc.state) + { + case GC_NEXT_PAGE: + ret = gc_next_page(); + break; + + case GC_FIND_NEXT_RECORD: + ret = gc_record_find_next(); + break; + + case GC_COPY_RECORD: + ret = gc_record_copy(); + break; + + case GC_ERASE_PAGE: + ret = gc_page_erase(); + break; + + case GC_PROMOTE_SWAP: + ret = gc_swap_promote(); + break; + + case GC_TAG_NEW_SWAP: + ret = gc_tag_new_swap(); + break; + + default: + // Should not happen. + ret = FDS_ERR_INTERNAL; + break; + } + + // Either FDS_OP_EXECUTING, FDS_OP_COMPLETED, FDS_ERR_BUSY or FDS_ERR_INTERNAL. + return ret; +} + + +static void queue_process(fs_ret_t result) +{ + ret_code_t ret; + fds_op_t * const p_op = &m_op_queue.op[m_op_queue.rp]; + + switch (p_op->op_code) + { + case FDS_OP_INIT: + ret = init_execute(result, p_op); + break; + + case FDS_OP_WRITE: + case FDS_OP_UPDATE: + ret = write_execute(result, p_op); + break; + + case FDS_OP_DEL_RECORD: + case FDS_OP_DEL_FILE: + ret = delete_execute(result, p_op); + break; + + case FDS_OP_GC: + ret = gc_execute(result); + break; + + default: + ret = FDS_ERR_INTERNAL; + break; + } + + if (ret != FDS_OP_EXECUTING) + { + fds_evt_t evt; + + if (ret == FDS_OP_COMPLETED) + { + evt.result = FDS_SUCCESS; + } + else + { + // Either FDS_ERR_BUSY, FDS_ERR_OPERATION_TIMEOUT, + // FDS_ERR_CRC_CHECK_FAILED or FDS_ERR_NOT_FOUND. + evt.result = ret; + + // If this operation had any chunks in the queue, skip them. + chunk_queue_skip(p_op); + } + + event_prepare(p_op, &evt); + event_send(&evt); + + // Advance the queue, and if there are any queued operations, process them. + if (queue_advance()) + { + queue_process(FS_SUCCESS); + } + else + { + // No more elements in the queue. Clear the FDS_FLAG_PROCESSING flag, + // so that new operation can start processing the queue. + flag_clear(FDS_FLAG_PROCESSING); + } + } +} + + +static void queue_start(void) +{ + if (!flag_is_set(FDS_FLAG_PROCESSING)) + { + flag_set(FDS_FLAG_PROCESSING); + queue_process(FS_SUCCESS); + } +} + + +static void fs_event_handler(fs_evt_t const * const p_evt, fs_ret_t result) +{ + queue_process(result); +} + + +// Enqueues write and update operations. +static ret_code_t write_enqueue(fds_record_desc_t * const p_desc, + fds_record_t const * const p_record, + fds_reserve_token_t const * const p_tok, + fds_op_code_t op_code) +{ + ret_code_t ret; + fds_op_t op; + uint16_t page; + uint16_t crc = 0; + uint16_t length_words = 0; + + if (!flag_is_set(FDS_FLAG_INITIALIZED)) + { + return FDS_ERR_NOT_INITIALIZED; + } + + if (p_record == NULL) + { + return FDS_ERR_NULL_ARG; + } + + if ((p_record->file_id == FDS_FILE_ID_INVALID) || + (p_record->key == FDS_RECORD_KEY_DIRTY)) + { + return FDS_ERR_INVALID_ARG; + } + + if (!chunk_is_aligned(p_record->data.p_chunks, + p_record->data.num_chunks)) + { + return FDS_ERR_UNALIGNED_ADDR; + } + + // No space was previously reserved for this operation. + if (p_tok == NULL) + { + // Compute the total length of the record. + for (uint32_t i = 0; i < p_record->data.num_chunks; i++) + { + length_words += p_record->data.p_chunks[i].length_words; + } + + // Find a page where to write data. + ret = write_space_reserve(length_words, &page); + + if (ret != FDS_SUCCESS) + { + // There is either not enough flash space available (FDS_ERR_NO_SPACE_IN_FLASH) or + // the record exceeds the virtual page size (FDS_ERR_RECORD_TOO_LARGE). + return ret; + } + } + else + { + page = p_tok->page; + length_words = p_tok->length_words; + } + + // Initialize the operation. + op.op_code = op_code; + op.write.step = FDS_OP_WRITE_HEADER_BEGIN; + op.write.page = page; + op.write.chunk_count = p_record->data.num_chunks; + op.write.chunk_offset = FDS_OFFSET_DATA; + op.write.header.record_id = record_id_new(); + op.write.header.ic.file_id = p_record->file_id; + op.write.header.tl.record_key = p_record->key; + op.write.header.tl.length_words = length_words; + + if (op_code == FDS_OP_UPDATE) + { + op.write.step = FDS_OP_WRITE_FIND_RECORD; + // Save the record ID of the record to be updated. + op.write.record_to_delete = p_desc->record_id; + } + +#if defined (FDS_CRC_ENABLED) + // First, compute the CRC for the first 6 bytes of the header which contain the + // record key, length and file ID, then, compute the CRC of the record ID (4 bytes). + crc = crc16_compute((uint8_t*)&op.write.header, 6, NULL); + crc = crc16_compute((uint8_t*)&op.write.header.record_id, 4, &crc); + + for (uint32_t i = 0; i < p_record->data.num_chunks; i++) + { + // Compute the CRC for the record data. + crc = crc16_compute((uint8_t*)p_record->data.p_chunks[i].p_data, + p_record->data.p_chunks[i].length_words * sizeof(uint32_t), &crc); + } +#endif + + op.write.header.ic.crc16 = crc; + + // Attempt to enqueue the operation. + if (!op_enqueue(&op, p_record->data.num_chunks, p_record->data.p_chunks)) + { + // No space availble in the queues. Cancel the reservation of flash space. + CRITICAL_SECTION_ENTER(); + write_space_free(length_words, page); + CRITICAL_SECTION_EXIT(); + + return FDS_ERR_NO_SPACE_IN_QUEUES; + } + + // Initialize the record descriptor, if provided. + if (p_desc != NULL) + { + p_desc->p_record = NULL; + // Don't invoke record_id_new() again ! + p_desc->record_id = op.write.header.record_id; + p_desc->record_is_open = false; + p_desc->gc_run_count = m_gc.run_count; + } + + // Start processing the queue, if necessary. + queue_start(); + + return FDS_SUCCESS; +} + + +ret_code_t fds_register(fds_cb_t cb) +{ + ret_code_t ret; + + CRITICAL_SECTION_ENTER(); + if (m_users == FDS_MAX_USERS) + { + ret = FDS_ERR_USER_LIMIT_REACHED; + } + else + { + m_cb_table[m_users] = cb; + m_users++; + + ret = FDS_SUCCESS; + } + CRITICAL_SECTION_EXIT(); + + return ret; +} + + +ret_code_t fds_init(void) +{ + fds_evt_t const evt_success = { .id = FDS_EVT_INIT, .result = FDS_SUCCESS }; + + // No initialization is necessary. Notify the application immediately. + if (flag_is_set(FDS_FLAG_INITIALIZED)) + { + event_send(&evt_success); + return FDS_SUCCESS; + } + + if (flag_is_set(FDS_FLAG_INITIALIZING)) + { + return FDS_SUCCESS; + } + + flag_set(FDS_FLAG_INITIALIZING); + + (void)fs_init(); + + // Initialize the page structure (m_pages), and determine which + // initialization steps are required given the current state of the filesystem. + fds_init_opts_t init_opts = pages_init(); + + if (init_opts == NO_PAGES) + { + return FDS_ERR_NO_PAGES; + } + + if (init_opts == ALREADY_INSTALLED) + { + // No initialization is necessary. Notify the application immediately. + flag_set(FDS_FLAG_INITIALIZED); + flag_clear(FDS_FLAG_INITIALIZING); + + event_send(&evt_success); + return FDS_SUCCESS; + } + + fds_op_t op; + op.op_code = FDS_OP_INIT; + + switch (init_opts) + { + case FRESH_INSTALL: + case TAG_SWAP: + op.init.step = FDS_OP_INIT_TAG_SWAP; + break; + + case PROMOTE_SWAP: + case PROMOTE_SWAP_INST: + op.init.step = FDS_OP_INIT_PROMOTE_SWAP; + break; + + case DISCARD_SWAP: + op.init.step = FDS_OP_INIT_ERASE_SWAP; + break; + + case TAG_DATA: + case TAG_DATA_INST: + op.init.step = FDS_OP_INIT_TAG_DATA; + break; + + default: + // Should not happen. + break; + } + + // This cannot fail since it will be the first operation in the queue. + (void)op_enqueue(&op, 0, NULL); + + queue_start(); + + return FDS_SUCCESS; +} + + +ret_code_t fds_record_open(fds_record_desc_t * const p_desc, + fds_flash_record_t * const p_flash_rec) +{ + uint16_t page; + + if ((p_desc == NULL) || (p_flash_rec == NULL)) + { + return FDS_ERR_NULL_ARG; + } + + // Find the record if necessary. + if (record_find_by_desc(p_desc, &page)) + { + fds_header_t const * const p_header = (fds_header_t*)p_desc->p_record; + +#if defined(FDS_CRC_ENABLED) + if (!crc_verify_success(p_header->ic.crc16, + p_header->tl.length_words, + p_desc->p_record)) + { + return FDS_ERR_CRC_CHECK_FAILED; + } +#endif + + CRITICAL_SECTION_ENTER(); + m_pages[page].records_open++; + CRITICAL_SECTION_EXIT(); + + // Initialize p_flash_rec. + p_flash_rec->p_header = p_header; + p_flash_rec->p_data = (p_desc->p_record + FDS_HEADER_SIZE); + + // Set the record as open in the descriptor. + p_desc->record_is_open = true; + + return FDS_SUCCESS; + } + + // The record could not be found. + // It either never existed or it has been deleted. + return FDS_ERR_NOT_FOUND; +} + + +ret_code_t fds_record_close(fds_record_desc_t * const p_desc) +{ + ret_code_t ret; + uint16_t page; + + if (p_desc == NULL) + { + return FDS_ERR_NULL_ARG; + } + + if (record_find_by_desc((fds_record_desc_t*)p_desc, &page)) + { + CRITICAL_SECTION_ENTER(); + if ((m_pages[page].records_open > 0) && (p_desc->record_is_open)) + { + + m_pages[page].records_open--; + p_desc->record_is_open = false; + + ret = FDS_SUCCESS; + } + else + { + ret = FDS_ERR_NO_OPEN_RECORDS; + } + CRITICAL_SECTION_EXIT(); + } + else + { + ret = FDS_ERR_NOT_FOUND; + } + + return ret; +} + + +ret_code_t fds_reserve(fds_reserve_token_t * const p_tok, uint16_t length_words) +{ + ret_code_t ret; + uint16_t page; + + if (!flag_is_set(FDS_FLAG_INITIALIZED)) + { + return FDS_ERR_NOT_INITIALIZED; + } + + if (p_tok == NULL) + { + return FDS_ERR_NULL_ARG; + } + + ret = write_space_reserve(length_words, &page); + + if (ret == FDS_SUCCESS) + { + p_tok->page = page; + p_tok->length_words = length_words; + } + + return ret; +} + + +ret_code_t fds_reserve_cancel(fds_reserve_token_t * const p_tok) +{ + ret_code_t ret; + + if (!flag_is_set(FDS_FLAG_INITIALIZED)) + { + return FDS_ERR_NOT_INITIALIZED; + } + + if (p_tok == NULL) + { + return FDS_ERR_NULL_ARG; + } + + if (p_tok->page > FDS_MAX_PAGES) + { + // The page does not exist. This shouldn't happen. + return FDS_ERR_INVALID_ARG; + } + + fds_page_t const * const p_page = &m_pages[p_tok->page]; + + CRITICAL_SECTION_ENTER(); + if (p_page->words_reserved - (FDS_HEADER_SIZE + p_tok->length_words) >= 0) + { + // Free reserved space. + write_space_free(p_tok->length_words, p_tok->page); + + // Clean the token. + p_tok->page = 0; + p_tok->length_words = 0; + ret = FDS_SUCCESS; + } + else + { + // We are trying to cancel a reservation of more words than how many are + // currently reserved on the page. Clearly, this shouldn't happen. + ret = FDS_ERR_INVALID_ARG; + } + CRITICAL_SECTION_EXIT(); + + return ret; +} + + +ret_code_t fds_record_write(fds_record_desc_t * const p_desc, + fds_record_t const * const p_record) +{ + return write_enqueue(p_desc, p_record, NULL, FDS_OP_WRITE); +} + + +ret_code_t fds_record_write_reserved(fds_record_desc_t * const p_desc, + fds_record_t const * const p_record, + fds_reserve_token_t const * const p_tok) +{ + // A NULL token is not allowed when writing to a reserved space. + if (p_tok == NULL) + { + return FDS_ERR_NULL_ARG; + } + + return write_enqueue(p_desc, p_record, p_tok, FDS_OP_WRITE); +} + + +ret_code_t fds_record_update(fds_record_desc_t * const p_desc, + fds_record_t const * const p_record) +{ + // A NULL descriptor is not allowed when updating a record. + if (p_desc == NULL) + { + return FDS_ERR_NULL_ARG; + } + + return write_enqueue(p_desc, p_record, NULL, FDS_OP_UPDATE); +} + + +ret_code_t fds_record_delete(fds_record_desc_t * const p_desc) +{ + fds_op_t op; + + if (!flag_is_set(FDS_FLAG_INITIALIZED)) + { + return FDS_ERR_NOT_INITIALIZED; + } + + if (p_desc == NULL) + { + return FDS_ERR_NULL_ARG; + } + + op.op_code = FDS_OP_DEL_RECORD; + op.del.step = FDS_OP_DEL_RECORD_FLAG_DIRTY; + op.del.record_to_delete = p_desc->record_id; + + if (op_enqueue(&op, 0, NULL)) + { + queue_start(); + return FDS_SUCCESS; + } + + return FDS_ERR_NO_SPACE_IN_QUEUES; +} + + +ret_code_t fds_file_delete(uint16_t file_id) +{ + fds_op_t op; + + if (!flag_is_set(FDS_FLAG_INITIALIZED)) + { + return FDS_ERR_NOT_INITIALIZED; + } + + if (file_id == FDS_FILE_ID_INVALID) + { + return FDS_ERR_INVALID_ARG; + } + + op.op_code = FDS_OP_DEL_FILE; + op.del.step = FDS_OP_DEL_FILE_FLAG_DIRTY; + op.del.file_id = file_id; + + if (op_enqueue(&op, 0, NULL)) + { + queue_start(); + return FDS_SUCCESS; + } + + return FDS_ERR_NO_SPACE_IN_QUEUES; +} + + +ret_code_t fds_gc(void) +{ + fds_op_t op; + + if (!flag_is_set(FDS_FLAG_INITIALIZED)) + { + return FDS_ERR_NOT_INITIALIZED; + } + + op.op_code = FDS_OP_GC; + + if (op_enqueue(&op, 0, NULL)) + { + if (m_gc.state != GC_BEGIN) + { + // Resume GC by retrying the last step. + m_gc.resume = true; + } + + queue_start(); + return FDS_SUCCESS; + } + + return FDS_ERR_NO_SPACE_IN_QUEUES; +} + + +ret_code_t fds_record_iterate(fds_record_desc_t * const p_desc, + fds_find_token_t * const p_token) +{ + return record_find(NULL, NULL, p_desc, p_token); +} + + +ret_code_t fds_record_find(uint16_t file_id, + uint16_t record_key, + fds_record_desc_t * const p_desc, + fds_find_token_t * const p_token) +{ + return record_find(&file_id, &record_key, p_desc, p_token); +} + + +ret_code_t fds_record_find_by_key(uint16_t record_key, + fds_record_desc_t * const p_desc, + fds_find_token_t * const p_token) +{ + return record_find(NULL, &record_key, p_desc, p_token); +} + + +ret_code_t fds_record_find_in_file(uint16_t file_id, + fds_record_desc_t * const p_desc, + fds_find_token_t * const p_token) +{ + return record_find(&file_id, NULL, p_desc, p_token); +} + + +ret_code_t fds_descriptor_from_rec_id(fds_record_desc_t * const p_desc, + uint32_t record_id) +{ + if (p_desc == NULL) + { + return FDS_ERR_NULL_ARG; + } + + // Zero the descriptor and set the record_id field. + memset(p_desc, 0x00, sizeof(fds_record_desc_t)); + p_desc->record_id = record_id; + + return FDS_SUCCESS; +} + + +ret_code_t fds_record_id_from_desc(fds_record_desc_t const * const p_desc, + uint32_t * const p_record_id) +{ + if ((p_desc == NULL) || (p_record_id == NULL)) + { + return FDS_ERR_NULL_ARG; + } + + *p_record_id = p_desc->record_id; + + return FDS_SUCCESS; +} + + +ret_code_t fds_stat(fds_stat_t * const p_stat) +{ + uint16_t const words_in_page = FDS_PAGE_SIZE - FDS_PAGE_TAG_SIZE; + // The largest number of free contiguous words on any page. + uint16_t contig_words = 0; + + if (!flag_is_set(FDS_FLAG_INITIALIZED)) + { + return FDS_ERR_NOT_INITIALIZED; + } + + if (p_stat == NULL) + { + return FDS_ERR_NULL_ARG; + } + + memset(p_stat, 0x00, sizeof(fds_stat_t)); + + for (uint16_t i = 0; i < FDS_MAX_PAGES; i++) + { + uint32_t const * p_record = NULL; + uint16_t const words_used = m_pages[i].write_offset + m_pages[i].words_reserved; + + p_stat->open_records += m_pages[i].records_open; + p_stat->words_used += words_used; + contig_words = (words_in_page - words_used); + + if (contig_words > p_stat->largest_contig) + { + p_stat->largest_contig = contig_words; + } + + while (record_find_next(i, &p_record)) + { + p_stat->valid_records++; + } + + dirty_records_stat(i, &p_stat->dirty_records, &p_stat->freeable_words); + } + + return FDS_SUCCESS; +} + + +#if defined(FDS_CRC_ENABLED) + +ret_code_t fds_verify_crc_on_writes(bool enable) +{ + if (enable) + { + flag_set(FDS_FLAG_VERIFY_CRC); + } + else + { + flag_clear(FDS_FLAG_VERIFY_CRC); + } + + return FDS_SUCCESS; +} + +#endif + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds.h new file mode 100644 index 0000000000..6795f1c20a --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds.h @@ -0,0 +1,733 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef FDS_H__ +#define FDS_H__ + +/** + * @defgroup flash_data_storage Flash Data Storage + * @ingroup app_common + * @{ + * + * @brief Flash Data Storage (FDS). + * + * @details Flash Data Storage is a minimalistic, record-oriented file system for the on-chip + * flash. Files are stored as a collection of records of variable length. FDS supports + * synchronous read operations and asynchronous write operations (write, update, + * and delete). FDS can be used from multiple threads. + */ + +#include +#include +#include "sdk_errors.h" + + +/**@brief Invalid file ID. + * + * This value must not be used as a file ID by the application. + */ +#define FDS_FILE_ID_INVALID (0xFFFF) + + +/**@brief Record key for deleted records. + * + * This key is used to flag a record as "dirty", which means that it should be removed during + * the next garbage collection. This value must not be used as a record key by the application. + */ +#define FDS_RECORD_KEY_DIRTY (0x0000) + + +/**@brief FDS return values. + */ +enum +{ + FDS_SUCCESS = NRF_SUCCESS, //!< The operation completed successfully. + FDS_ERR_OPERATION_TIMEOUT, //!< Error. The operation timed out. + FDS_ERR_NOT_INITIALIZED, //!< Error. The module has not been initialized. + FDS_ERR_UNALIGNED_ADDR, //!< Error. The input data is not aligned to a word boundary. + FDS_ERR_INVALID_ARG, //!< Error. The parameter contains invalid data. + FDS_ERR_NULL_ARG, //!< Error. The parameter is NULL. + FDS_ERR_NO_OPEN_RECORDS, //!< Error. The record is not open, so it cannot be closed. + FDS_ERR_NO_SPACE_IN_FLASH, //!< Error. There is no space in flash memory. + FDS_ERR_NO_SPACE_IN_QUEUES, //!< Error. There is no space in the internal queues. + FDS_ERR_RECORD_TOO_LARGE, //!< Error. The record exceeds the maximum allowed size. + FDS_ERR_NOT_FOUND, //!< Error. The record was not found. + FDS_ERR_NO_PAGES, //!< Error. No flash pages are available. + FDS_ERR_USER_LIMIT_REACHED, //!< Error. The maximum number of users has been reached. + FDS_ERR_CRC_CHECK_FAILED, //!< Error. The CRC check failed. + FDS_ERR_BUSY, //!< Error. The underlying flash subsystem was busy. + FDS_ERR_INTERNAL, //!< Error. An internal error occurred. +}; + + +/**@brief Part of the record metadata. + * + * Contains the record key and the length of the record data. + */ +typedef struct +{ + uint16_t record_key; //!< The record key (must be in the range 0x0001 - 0xBFFF). + uint16_t length_words; //!< The length of the record data (in 4-byte words). +} fds_tl_t; + + +/**@brief Part of the record metadata. + * + * Contains the ID of the file that the record belongs to and the CRC16 check value of the record. + */ +typedef struct +{ + uint16_t file_id; //!< The ID of the file that the record belongs to. + + /**@brief CRC16 check value. + * + * The CRC is calculated over the entire record as stored in flash (including the record + * metadata except the CRC field itself). The CRC standard employed is CRC-16-CCITT. + */ + uint16_t crc16; +} fds_ic_t; + + +/**@brief The record metadata as stored in flash. + */ +typedef struct +{ + fds_tl_t tl; //!< See @ref fds_tl_t. + fds_ic_t ic; //!< See @ref fds_ic_t. + uint32_t record_id; //!< The unique record ID (32 bits). +} fds_header_t; + + +/**@brief The record descriptor structure that is used to manipulate records. + * + * This structure is used by the FDS module. You must provide the descriptor to the module when + * you manipulate existing records. However, you should never modify it or use any of its fields. + * + * @note Never reuse the same descriptor for different records. + */ +typedef struct +{ + uint32_t record_id; //!< The unique record ID. + uint32_t const * p_record; //!< The last known location of the record in flash. + uint16_t gc_run_count; //!< Number of times garbage collection has been run. + bool record_is_open; //!< Whether the record is currently open. +} fds_record_desc_t; + + +/**@brief Structure that can be used to read the contents of a record stored in flash. + * + * This structure does not reflect the physical layout of a record in flash, but it points + * to the locations where the record header (metadata) and the record data are stored. + */ +typedef struct +{ + fds_header_t const * p_header; //!< Location of the record header in flash. + void const * p_data; //!< Location of the record data in flash. +} fds_flash_record_t; + + +/**@brief A chunk of record data to be written to flash. + * + * @p p_data must be aligned to a word boundary. Make sure to keep it in + * memory until the operation has completed, which is indicated by the respective FDS event. + */ +typedef struct +{ + void const * p_data; //!< Pointer to the data to store. Must be word-aligned. + uint16_t length_words; //!< Length of data pointed to by @p p_data (in 4-byte words). +} fds_record_chunk_t; + + +/**@brief A record to be written to flash. + */ +typedef struct +{ + uint16_t file_id; //!< The ID of the file that the record belongs to. + uint16_t key; //!< The record key. + struct + { + fds_record_chunk_t const * p_chunks; //!< The chunks that make up the record data. + uint16_t num_chunks; //!< The number of chunks that make up the data. + } data; +} fds_record_t; + + +/**@brief A token to a reserved space in flash, created by @ref fds_reserve. + * + * This token can be used to write the record in the reserved space (@ref fds_record_write_reserved) + * or to cancel the reservation (@ref fds_reserve_cancel). + */ +typedef struct +{ + uint16_t page; //!< The logical ID of the page where space was reserved. + uint16_t length_words; //!< The amount of space reserved (in 4-byte words). +} fds_reserve_token_t; + + +/**@brief A token to keep information about the progress of @ref fds_record_find, + * @ref fds_record_find_by_key, and @ref fds_record_find_in_file. + * + * @note Always zero-initialize the token before using it for the first time. + * @note Never reuse the same token to search for different records. + */ +typedef struct +{ + uint32_t const * p_addr; + uint16_t page; +} fds_find_token_t; + + +/**@brief FDS event IDs. + */ +typedef enum +{ + FDS_EVT_INIT, //!< Event for @ref fds_init. + FDS_EVT_WRITE, //!< Event for @ref fds_record_write and @ref fds_record_write_reserved. + FDS_EVT_UPDATE, //!< Event for @ref fds_record_update. + FDS_EVT_DEL_RECORD, //!< Event for @ref fds_record_delete. + FDS_EVT_DEL_FILE, //!< Event for @ref fds_file_delete. + FDS_EVT_GC //!< Event for @ref fds_gc. +} fds_evt_id_t; + + +#if defined(__CC_ARM) + #pragma push + #pragma anon_unions +#elif defined(__ICCARM__) + #pragma language=extended +#elif defined(__GNUC__) + /* anonymous unions are enabled by default */ +#endif + +/**@brief An FDS event. + */ +typedef struct +{ + fds_evt_id_t id; //!< The event ID. See @ref fds_evt_id_t. + ret_code_t result; //!< The result of the operation related to this event. + union + { + struct + { + /* Currently not used. */ + uint16_t pages_not_mounted; + } init; + struct + { + uint32_t record_id; + uint16_t file_id; + uint16_t record_key; + bool is_record_updated; + } write; //!< Information for @ref FDS_EVT_WRITE and @ref FDS_EVT_UPDATE events. + struct + { + uint32_t record_id; + uint16_t file_id; + uint16_t record_key; + uint16_t records_deleted_count; + } del; //!< Information for @ref FDS_EVT_DEL_RECORD and @ref FDS_EVT_DEL_FILE events. + struct + { + /* Currently not used. */ + uint16_t pages_skipped; + uint16_t space_reclaimed; + } gc; + }; +} fds_evt_t; + +#if defined(__CC_ARM) + #pragma pop +#elif defined(__ICCARM__) + /* leave anonymous unions enabled */ +#elif defined(__GNUC__) + /* anonymous unions are enabled by default */ +#endif + + +/**@brief File system statistics. */ +typedef struct +{ + uint16_t open_records; //!< The number of open records. + uint16_t valid_records; //!< The number of valid records. + uint16_t dirty_records; //!< The number of deleted ("dirty") records. + uint16_t words_reserved; //!< The number of words reserved by @ref fds_reserve(). + + /**@brief The number of words written to flash, including those reserved for future writes. + */ + uint16_t words_used; + + /**@brief The largest number of free contiguous words in the file system. + * + * This number determines the largest record that can be stored by FDS. + * It takes into account all reservations for future writes. + */ + uint16_t largest_contig; + + /**@brief The largest number of words that can be reclaimed by garbage collection. + * + * The actual amount of space freed by garbage collection might be less than this value if + * records are open while garbage collection is run. + */ + uint16_t freeable_words; +} fds_stat_t; + + +/**@brief FDS event handler function prototype. + * + * @param p_evt The event. + */ +typedef void (*fds_cb_t)(fds_evt_t const * const p_evt); + + +/**@brief Function for registering an FDS event handler. + * + * The maximum amount of handlers that can be registered can be configured by changing the value + * of @ref FDS_MAX_USERS in fds_config.h. + * + * @param[in] cb The event handler function. + * + * @retval FDS_SUCCESS If the event handler was registered successfully. + * @retval FDS_ERR_USER_LIMIT_REACHED If the maximum number of registered callbacks is reached. + */ +ret_code_t fds_register(fds_cb_t cb); + + +/**@brief Function for initializing the module. + * + * This function initializes the module and installs the file system (unless it is installed + * already). + * + * This function is asynchronous. Completion is reported through an event. Make sure to call + * @ref fds_register before calling @ref fds_init so that you receive the completion event. + * + * @retval FDS_SUCCESS If the operation was queued successfully. + * @retval FDS_ERR_NO_PAGES If there is no space available in flash memory to install the + * file system. + */ +ret_code_t fds_init(void); + + +/**@brief Function for writing a record to flash. + * + * There are no restrictions on the file ID and the record key, except that the record key must be + * different from @ref FDS_RECORD_KEY_DIRTY and the file ID must be different from + * @ref FDS_FILE_ID_INVALID. In particular, no restrictions are made regarding the uniqueness of + * the file ID or the record key. All records with the same file ID are grouped into one file. + * If no file with the specified ID exists, it is created. There can be multiple records with the + * same record key in a file. + * + * Record data can consist of multiple chunks. The data must be aligned to a 4 byte boundary, and + * because it is not buffered internally, it must be kept in memory until the callback for the + * operation has been received. The length of the data must not exceed @ref FDS_VIRTUAL_PAGE_SIZE + * words minus 14 bytes. + * + * This function is asynchronous. Completion is reported through an event that is sent to + * the registered event handler function. + * + * @param[out] p_desc The descriptor of the record that was written. Pass NULL if you do not + * need the descriptor. + * @param[in] p_record The record to be written to flash. + * + * @retval FDS_SUCCESS If the operation was queued successfully. + * @retval FDS_ERR_NOT_INITIALIZED If the module is not initialized. + * @retval FDS_ERR_NULL_ARG If @p p_record is NULL. + * @retval FDS_ERR_INVALID_ARG If the file ID or the record key is invalid. + * @retval FDS_ERR_UNALIGNED_ADDR If the record data is not aligned to a 4 byte boundary. + * @retval FDS_ERR_RECORD_TOO_LARGE If the record data exceeds the maximum length. + * @retval FDS_ERR_NO_SPACE_IN_QUEUES If the operation queue is full or there are more record + * chunks than can be buffered. + * @retval FDS_ERR_NO_SPACE_IN_FLASH If there is not enough free space in flash to store the + * record. + */ +ret_code_t fds_record_write(fds_record_desc_t * const p_desc, + fds_record_t const * const p_record); + + +/**@brief Function for reserving space in flash. + * + * This function can be used to reserve space in flash memory. To write a record into the reserved + * space, use @ref fds_record_write_reserved. Alternatively, use @ref fds_reserve_cancel to cancel + * a reservation. + * + * Note that this function does not write any data to flash. + * + * @param[out] p_token A token that can be used to write a record in the reserved space or + * cancel the reservation. + * @param[in] length_words The length of the record data (in 4-byte words). + * + * @retval FDS_SUCCESS If the flash space was reserved successfully. + * @retval FDS_ERR_NOT_INITIALIZED If the module is not initialized. + * @retval FDS_ERR_NULL_ARG If @p p_token is NULL instead of a valid token address. + * @retval FDS_ERR_RECORD_TOO_LARGE If the record length exceeds the maximum length. + * @retval FDS_ERR_NO_SPACE_IN_FLASH If there is not enough free space in flash to store the + * record. + */ +ret_code_t fds_reserve(fds_reserve_token_t * const p_token, uint16_t length_words); + + +/**@brief Function for canceling an @ref fds_reserve operation. + * + * @param[in] p_token The token that identifies the reservation, produced by @ref fds_reserve. + * + * @retval FDS_SUCCESS If the reservation was canceled. + * @retval FDS_ERR_NOT_INITIALIZED If the module is not initialized. + * @retval FDS_ERR_NULL_ARG If @p p_token is NULL instead of a valid token address. + * @retval FDS_ERR_INVALID_ARG If @p p_token contains invalid data. + */ +ret_code_t fds_reserve_cancel(fds_reserve_token_t * const p_token); + + +/**@brief Function for writing a record to a space in flash that was reserved using + * @ref fds_reserve. + * + * There are no restrictions on the file ID and the record key, except that the record key must be + * different from @ref FDS_RECORD_KEY_DIRTY and the file ID must be different from + * @ref FDS_FILE_ID_INVALID. In particular, no restrictions are made regarding the uniqueness of + * the file ID or the record key. All records with the same file ID are grouped into one file. + * If no file with the specified ID exists, it is created. There can be multiple records with the + * same record key in a file. + * + * Record data can consist of multiple chunks. The data must be aligned to a 4 byte boundary, and + * because it is not buffered internally, it must be kept in memory until the callback for the + * operation has been received. The length of the data must not exceed @ref FDS_VIRTUAL_PAGE_SIZE + * words minus 14 bytes. + * + * This function is asynchronous. Completion is reported through an event that is sent to the + * registered event handler function. + * + * @note + * This function behaves similarly to @ref fds_record_write, with the exception that it never + * fails with the error @ref FDS_ERR_NO_SPACE_IN_FLASH. + * + * @param[out] p_desc The descriptor of the record that was written. Pass NULL if you do not + * need the descriptor. + * @param[in] p_record The record to be written to flash. + * @param[in] p_token The token that identifies the space reserved in flash. + * + * @retval FDS_SUCCESS If the operation was queued successfully. + * @retval FDS_ERR_NOT_INITIALIZED If the module is not initialized. + * @retval FDS_ERR_NULL_ARG If @p p_token is NULL instead of a valid token address. + * @retval FDS_ERR_INVALID_ARG If the file ID or the record key is invalid. + * @retval FDS_ERR_UNALIGNED_ADDR If the record data is not aligned to a 4 byte boundary. + * @retval FDS_ERR_RECORD_TOO_LARGE If the record data exceeds the maximum length. + * @retval FDS_ERR_NO_SPACE_IN_QUEUES If the operation queue is full or there are more record + * chunks than can be buffered. + */ +ret_code_t fds_record_write_reserved(fds_record_desc_t * const p_desc, + fds_record_t const * const p_record, + fds_reserve_token_t const * const p_token); + + +/**@brief Function for deleting a record. + * + * Deleted records cannot be located using @ref fds_record_find, @ref fds_record_find_by_key, or + * @ref fds_record_find_in_file. Additionally, they can no longer be opened using + * @ref fds_record_open. + * + * Note that deleting a record does not free the space it occupies in flash memory. + * To reclaim flash space used by deleted records, call @ref fds_gc to run garbage collection. + * + * This function is asynchronous. Completion is reported through an event that is sent to the + * registered event handler function. + * + * @param[in] p_desc The descriptor of the record that should be deleted. + * + * @retval FDS_SUCCESS If the operation was queued successfully. + * @retval FDS_ERR_NOT_INITIALIZED If the module is not initialized. + * @retval FDS_ERR_NULL_ARG If the specified record descriptor @p p_desc is NULL. + * @retval FDS_ERR_NO_SPACE_IN_QUEUES If the operation queue is full. + */ +ret_code_t fds_record_delete(fds_record_desc_t * const p_desc); + + +/**@brief Function for deleting all records in a file. + * + * This function deletes a file, including all its records. Deleted records cannot be located + * using @ref fds_record_find, @ref fds_record_find_by_key, or @ref fds_record_find_in_file. + * Additionally, they can no longer be opened using @ref fds_record_open. + * + * Note that deleting records does not free the space they occupy in flash memory. + * To reclaim flash space used by deleted records, call @ref fds_gc to run garbage collection. + * + * This function is asynchronous. Completion is reported through an event that is sent to the + * registered event handler function. + * + * @param[in] file_id The ID of the file to be deleted. + * + * @retval FDS_SUCCESS If the operation was queued successfully. + * @retval FDS_ERR_NOT_INITIALIZED If the module is not initialized. + * @retval FDS_ERR_INVALID_ARG If the specified @p file_id is invalid. + * @retval FDS_ERR_NO_SPACE_IN_QUEUES If the operation queue is full. + */ +ret_code_t fds_file_delete(uint16_t file_id); + + +/**@brief Function for updating a record. + * + * Updating a record first writes a new record (@p p_record) to flash and then deletes the + * old record (identified by @p p_desc). + * + * There are no restrictions on the file ID and the record key, except that the record key must be + * different from @ref FDS_RECORD_KEY_DIRTY and the file ID must be different from + * @ref FDS_FILE_ID_INVALID. In particular, no restrictions are made regarding the uniqueness of + * the file ID or the record key. All records with the same file ID are grouped into one file. + * If no file with the specified ID exists, it is created. There can be multiple records with the + * same record key in a file. + * + * Record data can consist of multiple chunks. The data must be aligned to a 4 byte boundary, and + * because it is not buffered internally, it must be kept in memory until the callback for the + * operation has been received. The length of the data must not exceed @ref FDS_VIRTUAL_PAGE_SIZE + * words minus 14 bytes. + * + * This function is asynchronous. Completion is reported through an event that is sent to the + * registered event handler function. + * + * @param[in, out] p_desc The descriptor of the record to update. When the function + * returns with FDS_SUCCESS, this parameter contains the + * descriptor of the newly written record. + * @param[in] p_record The updated record to be written to flash. + * + * @retval FDS_SUCCESS If the operation was queued successfully. + * @retval FDS_ERR_NOT_INITIALIZED If the module is not initialized. + * @retval FDS_ERR_INVALID_ARG If the file ID or the record key is invalid. + * @retval FDS_ERR_UNALIGNED_ADDR If the record data is not aligned to a 4 byte boundary. + * @retval FDS_ERR_RECORD_TOO_LARGE If the record data exceeds the maximum length. + * @retval FDS_ERR_NO_SPACE_IN_QUEUES If the operation queue is full or there are more record + * chunks than can be buffered. + * @retval FDS_ERR_NO_SPACE_IN_FLASH If there is not enough free space in flash to store the + * updated record. + */ +ret_code_t fds_record_update(fds_record_desc_t * const p_desc, + fds_record_t const * const p_record); + + +/**@brief Function for iterating through all records in flash. + * + * To search for the next record, call the function again and supply the same @ref fds_find_token_t + * structure to resume searching from the last record that was found. + * + * Note that the order with which records are iterated is not defined. + * + * @param[out] p_desc The descriptor of the record that was found. + * @param[out] p_token A token containing information about the progress of the operation. + * + * @retval FDS_SUCCESS If a record was found. + * @retval FDS_ERR_NOT_INITIALIZED If the module is not initialized. + * @retval FDS_ERR_NULL_ARG If @p p_desc or @p p_token is NULL. + * @retval FDS_ERR_NOT_FOUND If no matching record was found. + */ +ret_code_t fds_record_iterate(fds_record_desc_t * const p_desc, + fds_find_token_t * const p_token); + + +/**@brief Function for searching for records with a given record key in a file. + * + * This function finds the first record in a file that has the given record key. To search for the + * next record with the same key in the file, call the function again and supply the same + * @ref fds_find_token_t structure to resume searching from the last record that was found. + * + * @param[in] file_id The file ID. + * @param[in] record_key The record key. + * @param[out] p_desc The descriptor of the record that was found. + * @param[out] p_token A token containing information about the progress of the operation. + * + * @retval FDS_SUCCESS If a record was found. + * @retval FDS_ERR_NOT_INITIALIZED If the module is not initialized. + * @retval FDS_ERR_NULL_ARG If @p p_desc or @p p_token is NULL. + * @retval FDS_ERR_NOT_FOUND If no matching record was found. + */ +ret_code_t fds_record_find(uint16_t file_id, + uint16_t record_key, + fds_record_desc_t * const p_desc, + fds_find_token_t * const p_token); + + +/**@brief Function for searching for records with a given record key. + * + * This function finds the first record with a given record key, independent of the file it + * belongs to. To search for the next record with the same key, call the function again and supply + * the same @ref fds_find_token_t structure to resume searching from the last record that was found. + * + * @param[in] record_key The record key. + * @param[out] p_desc The descriptor of the record that was found. + * @param[out] p_token A token containing information about the progress of the operation. + * + * @retval FDS_SUCCESS If a record was found. + * @retval FDS_ERR_NOT_INITIALIZED If the module is not initialized. + * @retval FDS_ERR_NULL_ARG If @p p_desc or @p p_token is NULL. + * @retval FDS_ERR_NOT_FOUND If no record with the given key was found. + */ +ret_code_t fds_record_find_by_key(uint16_t record_key, + fds_record_desc_t * const p_desc, + fds_find_token_t * const p_token); + + +/**@brief Function for searching for any record in a file. + * + * This function finds the first record in a file, independent of its record key. + * To search for the next record in the same file, call the function again and supply the same + * @ref fds_find_token_t structure to resume searching from the last record that was found. + * + * @param[in] file_id The file ID. + * @param[out] p_desc The descriptor of the record that was found. + * @param[out] p_token A token containing information about the progress of the operation. + * + * @retval FDS_SUCCESS If a record was found. + * @retval FDS_ERR_NOT_INITIALIZED If the module is not initialized. + * @retval FDS_ERR_NULL_ARG If @p p_desc or @p p_token is NULL. + * @retval FDS_ERR_NOT_FOUND If no matching record was found. + */ +ret_code_t fds_record_find_in_file(uint16_t file_id, + fds_record_desc_t * const p_desc, + fds_find_token_t * const p_token); + + +/**@brief Function for opening a record for reading. + * + * This function opens a record that is stored in flash, so that it can be read. The function + * initializes an @ref fds_flash_record_t structure, which can be used to access the record data as + * well as its associated metadata. The pointers provided in the @ref fds_flash_record_t structure + * are pointers to flash memory. + * + * Opening a record with @ref fds_record_open prevents garbage collection to run on the virtual + * flash page in which record is stored, so that the contents of the memory pointed by fields in + * @ref fds_flash_record_t are guaranteed to remain unmodified as long as the record is kept open. + * + * When you are done reading a record, call @ref fds_record_close to close it. Garbage collection + * can then reclaim space on the virtual page where the record is stored. Note that you must + * provide the same descriptor for @ref fds_record_close as you did for this function. + * + * @param[in] p_desc The descriptor of the record to open. + * @param[out] p_flash_record The record, as stored in flash. + * + * @retval FDS_SUCCESS If the record was opened successfully. + * @retval FDS_ERR_NULL_ARG If @p p_desc or @p p_flash_record is NULL. + * @retval FDS_ERR_NOT_FOUND If the record was not found. It might have been deleted, or + * it might not have been written yet. + * @retval FDS_ERR_CRC_CHECK_FAILED If the CRC check for the record failed. + */ +ret_code_t fds_record_open(fds_record_desc_t * const p_desc, + fds_flash_record_t * const p_flash_record); + + +/**@brief Function for closing a record. + * + * Closing a record allows garbage collection to run on the virtual page in which the record is + * stored (if no other records remain open on that page). The descriptor passed as an argument + * must be the same as the one used to open the record using @ref fds_record_open. + * + * Note that closing a record does not invalidate its descriptor. You can still supply the + * descriptor to all functions that accept a record descriptor as a parameter. + * + * @param[in] p_desc The descriptor of the record to close. + * + * @retval FDS_SUCCESS If the record was closed successfully. + * @retval FDS_ERR_NULL_ARG If @p p_desc is NULL. + * @retval FDS_ERR_NO_OPEN_RECORDS If the record is not open. + * @retval FDS_ERR_NOT_FOUND If the record could not be found. + */ +ret_code_t fds_record_close(fds_record_desc_t * const p_desc); + + +/**@brief Function for running garbage collection. + * + * Garbage collection reclaims the flash space that is occupied by records that have been deleted, + * or that failed to be completely written due to, for example, a power loss. + * + * This function is asynchronous. Completion is reported through an event that is sent to the + * registered event handler function. + * + * @retval FDS_SUCCESS If the operation was queued successfully. + * @retval FDS_ERR_NOT_INITIALIZED If the module is not initialized. + * @retval FDS_ERR_NO_SPACE_IN_QUEUES If the operation queue is full. + */ +ret_code_t fds_gc(void); + + +/**@brief Function for obtaining a descriptor from a record ID. + * + * This function can be used to reconstruct a descriptor from a record ID, like the one that is + * passed to the callback function. + * + * @note + * This function does not check whether a record with the given record ID exists. + * If a non-existing record ID is supplied, the resulting descriptor is invalid and will cause + * other functions to fail when it is supplied as parameter. + * + * @param[out] p_desc The descriptor of the record with the given record ID. + * @param[in] record_id The record ID for which a descriptor should be returned. + * + * @retval FDS_SUCCESS If a descriptor was returned. + * @retval FDS_ERR_NULL_ARG If @p p_desc is NULL. + */ +ret_code_t fds_descriptor_from_rec_id(fds_record_desc_t * const p_desc, + uint32_t record_id); + + +/**@brief Function for obtaining a record ID from a record descriptor. + * + * This function can be used to extract a record ID from a descriptor. For example, you could use + * it in the callback function to compare the record ID of an event to the record IDs of the + * records for which you have a descriptor. + * + * @warning + * This function does not check whether the record descriptor is valid. If the descriptor is not + * initialized or has been tampered with, the resulting record ID might be invalid. + * + * @param[in] p_desc The descriptor from which the record ID should be extracted. + * @param[out] p_record_id The record ID that is contained in the given descriptor. + * + * @retval FDS_SUCCESS If a record ID was returned. + * @retval FDS_ERR_NULL_ARG If @p p_desc or @p p_record_id is NULL. + */ +ret_code_t fds_record_id_from_desc(fds_record_desc_t const * const p_desc, + uint32_t * const p_record_id); + + +/**@brief Function for retrieving file system statistics. + * + * This function retrieves file system statistics, such as the number of open records, the space + * that can be reclaimed by garbage collection, and others. + * + * @param[out] p_stat File system statistics. + * + * @retval FDS_SUCCESS If the statistics were returned successfully. + * @retval FDS_ERR_NOT_INITIALIZED If the module is not initialized. + * @retval FDS_ERR_NULL_ARG If @p p_stat is NULL. + */ +ret_code_t fds_stat(fds_stat_t * const p_stat); + + +#if defined(FDS_CRC_ENABLED) + +/**@brief Function for enabling and disabling CRC verification for write operations. + * + * CRC verification ensures that data that is queued for writing does not change before the write + * actually happens. Use this function to enable or disable CRC verification. If verification is + * enabled, the error @ref FDS_ERR_CRC_CHECK_FAILED is returned in the event for + * @ref fds_record_write, @ref fds_record_write_reserved, or @ref fds_record_update if + * verification fails. + * + * @note + * CRC verification is enabled or disabled globally, thus for all users of the FDS module. + * + * @param[in] enabled 1 to enable CRC verification. 0 to disable CRC verification. + * + * @retval FDS_SUCCESS If CRC verification was enabled or disabled successfully. + */ +ret_code_t fds_verify_crc_on_writes(bool enabled); + +#endif + +/** @} */ + +#endif // FDS_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds_internal_defs.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds_internal_defs.h new file mode 100644 index 0000000000..6f96463458 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds_internal_defs.h @@ -0,0 +1,305 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef FDS_INTERNAL_DEFS_H__ +#define FDS_INTERNAL_DEFS_H__ + +#include +#include +#include "fds_config.h" + +#if defined (FDS_THREADS) + #include "nrf_soc.h" + #include "app_util_platform.h" +#endif + +#define FDS_PAGE_TAG_SIZE (2) // Page tag size, in 4-byte words. +#define FDS_PAGE_TAG_WORD_0 (0) // Offset of the first word in the page tag from the page address. +#define FDS_PAGE_TAG_WORD_1 (1) // Offset of the second word in the page tag from the page address. + +// Page tag constants +#define FDS_PAGE_TAG_MAGIC (0xDEADC0DE) +#define FDS_PAGE_TAG_SWAP (0xF11E01FF) +#define FDS_PAGE_TAG_DATA (0xF11E01FE) + +#define FDS_ERASED_WORD (0xFFFFFFFF) + +#define FDS_OFFSET_TL (0) // Offset of TL from the record base address, in 4-byte words. +#define FDS_OFFSET_IC (1) // Offset of IC from the record base address, in 4-byte words. +#define FDS_OFFSET_ID (2) // Offset of ID from the record base address, in 4-byte words. +#define FDS_OFFSET_DATA (3) // Offset of the data (chunks) from the record base address, in 4-byte words. + +#define FDS_HEADER_SIZE_TL (1) // Size of the TL part of the header, in 4-byte words. +#define FDS_HEADER_SIZE_IC (1) // Size of the IC part of the header, in 4-byte words. +#define FDS_HEADER_SIZE_ID (1) // Size of the record ID in the header, in 4-byte words. +#define FDS_HEADER_SIZE (3) // Size of the whole header, in 4-byte words. + +#define FDS_OP_EXECUTING (FS_SUCCESS) +#define FDS_OP_COMPLETED (0x1D1D) + +// The size of a physical page, in 4-byte words. +#if defined(NRF51) + #define FDS_PHY_PAGE_SIZE (256) +#elif defined(NRF52) + #define FDS_PHY_PAGE_SIZE (1024) +#endif + +// The number of physical pages to be used. This value is configured indirectly. +#define FDS_PHY_PAGES ((FDS_VIRTUAL_PAGES * FDS_VIRTUAL_PAGE_SIZE) / FDS_PHY_PAGE_SIZE) + +// The size of a virtual page, in number of physical pages. +#define FDS_PHY_PAGES_IN_VPAGE (FDS_VIRTUAL_PAGE_SIZE / FDS_PHY_PAGE_SIZE) + +// The number of pages available to store data; which is the total minus one (the swap). +#define FDS_MAX_PAGES (FDS_VIRTUAL_PAGES - 1) + + // Just a shorter name for the size, in words, of a virtual page. +#define FDS_PAGE_SIZE (FDS_VIRTUAL_PAGE_SIZE) + + +#if (FDS_VIRTUAL_PAGE_SIZE % FDS_PHY_PAGE_SIZE != 0) + #error "FDS_VIRTUAL_PAGE_SIZE must be a multiple of the size of a physical page." +#endif + +#if (FDS_VIRTUAL_PAGES < 2) + #error "FDS requires at least two virtual pages." +#endif + + +// FDS internal status flags. +typedef enum +{ + FDS_FLAG_INITIALIZING = (1 << 0), // The module is initializing. + FDS_FLAG_INITIALIZED = (1 << 1), // The module is initialized. + FDS_FLAG_PROCESSING = (1 << 2), // The queue is being processed. + FDS_FLAG_VERIFY_CRC = (1 << 3), // Verify CRC upon writing a record. +} fds_flags_t; + + +// Page types. +typedef enum +{ + FDS_PAGE_DATA, // Page is ready for storage. + FDS_PAGE_SWAP, // Page is reserved for garbage collection. + FDS_PAGE_ERASED, // Page is erased. + FDS_PAGE_UNDEFINED, // Undefined page type. +} fds_page_type_t; + + +typedef struct +{ + fds_page_type_t page_type; // The page type. + uint32_t const * p_addr; // The address of the page. + uint16_t write_offset; // The page write offset, in 4-byte words. + uint16_t words_reserved; // The amount of words reserved by fds_write_reserve(). + uint16_t records_open; // The number of records opened using fds_open(). + bool can_gc; // Indicates that there are some records that have been deleted. +} fds_page_t; + + +typedef struct +{ + uint32_t const * p_addr; + uint16_t write_offset; +} fds_swap_page_t; + + +// FDS op-codes. +typedef enum +{ + FDS_OP_NONE, + FDS_OP_INIT, // Initialize the module. + FDS_OP_WRITE, // Write a record to flash. + FDS_OP_UPDATE, // Update a record. + FDS_OP_DEL_RECORD, // Delete a record. + FDS_OP_DEL_FILE, // Delete a file. + FDS_OP_GC // Run garbage collection. +} fds_op_code_t; + + +typedef enum +{ + FDS_OP_INIT_TAG_SWAP, + FDS_OP_INIT_TAG_DATA, + FDS_OP_INIT_ERASE_SWAP, + FDS_OP_INIT_PROMOTE_SWAP, +} fds_init_step_t; + + +typedef enum +{ + FDS_OP_WRITE_HEADER_BEGIN, // Write the record key and length. + FDS_OP_WRITE_HEADER_FINALIZE, // Write the file ID and CRC. + FDS_OP_WRITE_RECORD_ID, // Write the record ID. + FDS_OP_WRITE_CHUNKS, // Write the record data. + FDS_OP_WRITE_FIND_RECORD, + FDS_OP_WRITE_FLAG_DIRTY, // Flag a record as dirty (as part of an update operation). + FDS_OP_WRITE_DONE, +} fds_write_step_t; + + +typedef enum +{ + FDS_OP_DEL_RECORD_FLAG_DIRTY, // Flag a record as dirty. + FDS_OP_DEL_FILE_FLAG_DIRTY, // Flag multiple records as dirty. + FDS_OP_DEL_DONE, +} fds_delete_step_t; + + +#if defined(__CC_ARM) + #pragma push + #pragma anon_unions +#elif defined(__ICCARM__) + #pragma language=extended +#elif defined(__GNUC__) + // anonymous unions are enabled by default +#endif + +typedef struct +{ + fds_op_code_t op_code; // The opcode for the operation. + union + { + struct + { + fds_init_step_t step; // The current step the operation is at. + } init; + struct + { + fds_header_t header; + fds_write_step_t step; // The current step the operation is at. + uint16_t page; // The page the flash space for this command was reserved. + uint16_t chunk_offset; // Offset used for writing record chunks, in 4-byte words. + uint8_t chunk_count; // Number of chunks to be written. + uint32_t record_to_delete; // The record to delete in case this is an update. + } write; + struct + { + fds_delete_step_t step; + uint16_t file_id; + uint16_t record_key; + uint32_t record_to_delete; + } del; + }; +} fds_op_t; + +#if defined(__CC_ARM) + #pragma pop +#elif defined(__ICCARM__) + // leave anonymous unions enabled +#elif defined(__GNUC__) + // anonymous unions are enabled by default +#endif + + +typedef struct +{ + fds_op_t op[FDS_OP_QUEUE_SIZE]; // Queued flash operations. + uint32_t rp; // The index of the command being executed. + uint32_t count; // Number of elements in the queue. +} fds_op_queue_t; + + +typedef struct +{ + fds_record_chunk_t chunk[FDS_CHUNK_QUEUE_SIZE]; + uint32_t rp; + uint32_t count; +} fds_chunk_queue_t; + + +enum +{ + PAGE_ERASED = 0x1, + PAGE_DATA = 0x2, + SWAP_EMPTY = 0x4, + SWAP_DIRTY = 0x8, +}; + + +typedef enum +{ + // This is a fatal error. + NO_PAGES, + + // All pages are erased. Perform a fresh installation. + FRESH_INSTALL = (PAGE_ERASED), + + // Swap is missing. Tag an erased page as swap. + TAG_SWAP = (PAGE_ERASED | PAGE_DATA), + + // Swap is empty. Tag all erased pages as data. + TAG_DATA = (PAGE_ERASED | SWAP_EMPTY), + + // Swap is empty. Tag all remaining erased pages as data. + TAG_DATA_INST = (PAGE_ERASED | PAGE_DATA | SWAP_EMPTY), + + // The swap is dirty. This indicates that the device powered off during GC. However, since there + // is also an erased page, it is possible to assume that that page had been entirely garbage + // collected. Hence, tag the swap as data, one erased page as swap and any remaining pages as data. + PROMOTE_SWAP = (PAGE_ERASED | SWAP_DIRTY), + + // Similar to the above. Tag the swap as data, one erased page as swap, and any remain + // pages as data. + PROMOTE_SWAP_INST = (PAGE_ERASED | PAGE_DATA | SWAP_DIRTY), + + // The swap is dirty (written) and there are no erased pages. This indicates that the device + // was powered off during GC. It is safe to discard (erase) the swap, since data that was + // swapped out lies in one of the valid pages. + DISCARD_SWAP = (PAGE_DATA | SWAP_DIRTY), + + // Do nothing. + ALREADY_INSTALLED = (PAGE_DATA | SWAP_EMPTY), + +} fds_init_opts_t; + + +typedef enum +{ + GC_BEGIN, // Begin GC. + GC_NEXT_PAGE, // GC a page. + GC_FIND_NEXT_RECORD, // Find a valid record to copy. + GC_COPY_RECORD, // Copy a valid record to swap. + GC_ERASE_PAGE, // Erase the page being garbage collected. + GC_DISCARD_SWAP, // Erase (discard) the swap page. + GC_PROMOTE_SWAP, // Tag the swap as valid. + GC_TAG_NEW_SWAP // Tag a freshly erased (GCed) page as swap. +} fds_gc_state_t; + + +// Holds garbage collection status and related data. +typedef struct +{ + fds_gc_state_t state; // The current GC step. + uint16_t cur_page; // The current page being garbage collected. + uint32_t const * p_record_src; // The current record being copied to swap. + uint16_t run_count; // Total number of times GC was run. + bool do_gc_page[FDS_MAX_PAGES]; // Controls which pages to garbage collect. + bool resume; // Whether or not GC should be resumed. +} fds_gc_data_t; + + +// Macros to enable and disable application interrupts. +#if defined (FDS_THREADS) + + #define CRITICAL_SECTION_ENTER() CRITICAL_REGION_ENTER() + #define CRITICAL_SECTION_EXIT() CRITICAL_REGION_EXIT() + +#else + + #define CRITICAL_SECTION_ENTER() + #define CRITICAL_SECTION_EXIT() + +#endif + + +#endif // FDS_INTERNAL_DEFS_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/config/fstorage_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/config/fstorage_config.h new file mode 100644 index 0000000000..71ffcadeb0 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/config/fstorage_config.h @@ -0,0 +1,59 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef FS_CONFIG_H__ +#define FS_CONFIG_H__ + +/** + * @defgroup fstorage_config fstorage configuration + * @ingroup fstorage + * @{ + * + * @brief fstorage configuration options. + */ + + +/**@brief Configures the size of fstorage internal queue. + * @details Increase this if there are many users, or if it is likely that many operation will be + * queued at once without waiting for the previous operations to complete. In general, + * increase the queue size if you frequently receive @ref FS_ERR_QUEUE_FULL errors when + * calling @ref fs_store or @ref fs_erase. + */ +#define FS_QUEUE_SIZE (4) + +/**@brief Configures how many times should fstorage attempt to execute an operation if + * the SoftDevice fails to schedule flash access due to high BLE activity. + * @details Increase this value if fstorage events return the @ref FS_ERR_OPERATION_TIMEOUT error + * often. + */ +#define FS_OP_MAX_RETRIES (3) + + +/**@brief Configures the maximum number of words to be written to flash in a single operation. + * If data length exceeds this value, the data will be written down in several chunks, + * as necessary. + * + * @details Tweaking this value can increase the chances of the SoftDevice being able to fit + * flash operations in between radio activity. This value is bound by the maximum number + * of words which the SoftDevice can write to flash in a single call to + * @ref sd_flash_write, which is 256 words for nRF51 ICs and 1024 words for nRF52 ICs. + */ +#if defined (NRF51) + #define FS_MAX_WRITE_SIZE_WORDS (256) +#elif defined (NRF52) + #define FS_MAX_WRITE_SIZE_WORDS (1024) +#endif + +/** @} */ + +#endif // FS_CONFIG_H__ + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage.c new file mode 100644 index 0000000000..071cba50c5 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage.c @@ -0,0 +1,494 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "fstorage.h" +#include "fstorage_config.h" +#include "fstorage_internal_defs.h" + +#include +#include +#include +#include "nrf_error.h" +#include "nrf_soc.h" + + +static uint8_t m_flags; // fstorage status flags. +static fs_op_queue_t m_queue; // Queue of requested operations. +static uint8_t m_retry_count; // Number of times the last flash operation was retried. + + +// Sends events to the application. +static void send_event(fs_op_t const * const p_op, fs_ret_t result) +{ + fs_evt_t evt; + memset(&evt, 0x00, sizeof(fs_evt_t)); + + switch (p_op->op_code) + { + case FS_OP_STORE: + evt.id = FS_EVT_STORE; + evt.store.p_data = p_op->store.p_dest; + evt.store.length_words = p_op->store.length_words; + break; + + case FS_OP_ERASE: + evt.id = FS_EVT_ERASE; + evt.erase.first_page = p_op->erase.page - p_op->erase.pages_erased; + evt.erase.last_page = p_op->erase.page; + break; + + default: + // Should not happen. + break; + } + + p_op->p_config->callback(&evt, result); +} + + +// Checks that a configuration is non-NULL and within section variable bounds. +static bool check_config(fs_config_t const * const config) +{ + if ((config != NULL) && + (FS_SECTION_VARS_START_ADDR <= (uint32_t)config) && + (FS_SECTION_VARS_END_ADDR > (uint32_t)config)) + { + return true; + } + + return false; +} + + +// Executes a store operation. +static uint32_t store_execute(fs_op_t const * const p_op) +{ + uint16_t chunk_len; + + if ((p_op->store.length_words - p_op->store.offset) < FS_MAX_WRITE_SIZE_WORDS) + { + chunk_len = p_op->store.length_words - p_op->store.offset; + } + else + { + chunk_len = FS_MAX_WRITE_SIZE_WORDS; + } + + return sd_flash_write((uint32_t*)p_op->store.p_dest + p_op->store.offset, + (uint32_t*)p_op->store.p_src + p_op->store.offset, + chunk_len); +} + + +// Executes an erase operation. +static uint32_t erase_execute(fs_op_t const * const p_op) +{ + return sd_flash_page_erase(p_op->erase.page); +} + + +// Advances the queue, wrapping around if necessary. +// If no elements are left in the queue, clears the FS_FLAG_PROCESSING flag. +static void queue_advance(void) +{ + if (--m_queue.count == 0) + { + m_flags &= ~FS_FLAG_PROCESSING; + } + + if (++m_queue.rp == FS_QUEUE_SIZE) + { + m_queue.rp = 0; + } +} + + +// Processes the current element in the queue. If the queue is empty, does nothing. +static void queue_process(void) +{ + uint32_t ret; + fs_op_t * const p_op = &m_queue.op[m_queue.rp]; + + if (m_queue.count > 0) + { + switch (p_op->op_code) + { + case FS_OP_STORE: + ret = store_execute(p_op); + break; + + case FS_OP_ERASE: + ret = erase_execute(p_op); + break; + + default: + ret = FS_ERR_INTERNAL; + break; + } + + // There is a pending flash operation which was not initiated by this module. + // Stop processing the queue and wait for a system event. + if (ret == NRF_ERROR_BUSY) + { + m_flags &= ~FS_FLAG_PROCESSING; + m_flags |= FS_FLAG_FLASH_REQ_PENDING; + } + else if (ret != NRF_SUCCESS) + { + // An error has occurred. + send_event(p_op, FS_ERR_INTERNAL); + } + else + { + // Operation is executing. + } + } +} + + +// Starts processing the queue if there are no pending flash operations, both inside and +// outside this module. Returns immediately otherwise. +static void queue_start(void) +{ + if (!(m_flags & FS_FLAG_PROCESSING) && + !(m_flags & FS_FLAG_FLASH_REQ_PENDING)) + { + m_flags |= FS_FLAG_PROCESSING; + queue_process(); + } +} + + +// Flash operation success callback handler. Keeps track of the progress of an operation. +// If it has finished, advances the queue and notifies the application. +static void on_operation_success(fs_op_t * const p_op) +{ + m_retry_count = 0; + + switch (p_op->op_code) + { + case FS_OP_STORE: + { + uint16_t chunk_len; + + if ((p_op->store.length_words - p_op->store.offset) < FS_MAX_WRITE_SIZE_WORDS) + { + chunk_len = p_op->store.length_words - p_op->store.offset; + } + else + { + chunk_len = FS_MAX_WRITE_SIZE_WORDS; + } + + p_op->store.offset += chunk_len; + + if (p_op->store.offset == p_op->store.length_words) + { + // The operation has finished. + send_event(p_op, FS_SUCCESS); + queue_advance(); + } + } + break; + + case FS_OP_ERASE: + { + p_op->erase.page++; + p_op->erase.pages_erased++; + + if (p_op->erase.pages_erased == p_op->erase.pages_to_erase) + { + send_event(p_op, FS_SUCCESS); + queue_advance(); + } + } + break; + + default: + // Should not happen. + break; + } +} + + +// Flash operation failure callback handler. If the maximum number of retries has +// been reached, notifies the application and advances the queue. +static void on_operation_failure(fs_op_t const * const p_op) +{ + if (++m_retry_count > FS_OP_MAX_RETRIES) + { + m_retry_count = 0; + + send_event(p_op, FS_ERR_OPERATION_TIMEOUT); + queue_advance(); + } +} + + +// Retrieves a pointer to the next free element in the queue. +// Additionally, increases the number of elements stored in the queue. +static bool queue_get_next_free(fs_op_t ** p_op) +{ + uint32_t idx; + + if (m_queue.count == FS_QUEUE_SIZE) + { + return false; + } + + idx = ((m_queue.rp + m_queue.count) < FS_QUEUE_SIZE) ? + (m_queue.rp + m_queue.count) : 0; + + m_queue.count++; + + // Zero the element so that unassigned fields will be zero. + memset(&m_queue.op[idx], 0x00, sizeof(fs_op_t)); + + *p_op = &m_queue.op[idx]; + + return true; +} + + +fs_ret_t fs_init(void) +{ + uint32_t const users = FS_SECTION_VARS_COUNT; + uint32_t const * p_current_end = FS_PAGE_END_ADDR; + uint32_t index_max = 0x00; + uint32_t index_last = 0xFFFFFFFF; + + if (m_flags & FS_FLAG_INITIALIZED) + { + return FS_SUCCESS; + } + + #if 0 + // Check for configurations with duplicate priority. + for (uint32_t i = 0; i < users; i++) + { + for (uint32_t j = i + 1; j < users; j++) + { + fs_config_t const * const p_config_i = FS_SECTION_VARS_GET(i); + fs_config_t const * const p_config_j = FS_SECTION_VARS_GET(j); + + if (p_config_i->page_order == p_config_j->page_order) + { + // Error. + return FS_ERR_INVALID_CFG; + } + } + } + #endif + + // Assign pages to registered users, beginning with the ones with the highest + // priority, which will be assigned pages with the highest memory address. + + for (uint32_t i = 0; i < users; i++) + { + uint8_t max_priority = 0x00; + + for (uint32_t j = 0; j < users; j++) + { + fs_config_t * const p_config = FS_SECTION_VARS_GET(j); + + // Skip the one assigned during last iteration. + if (j == index_last) + { + continue; + } + + if (p_config->priority >= max_priority) + { + max_priority = p_config->priority; + index_max = j; + } + } + + fs_config_t * const p_config = FS_SECTION_VARS_GET(index_max); + + p_config->p_end_addr = p_current_end; + p_config->p_start_addr = p_current_end - (p_config->num_pages * FS_PAGE_SIZE_WORDS); + + p_current_end = p_config->p_start_addr; + + index_last = index_max; + } + + m_flags |= FS_FLAG_INITIALIZED; + + return FS_SUCCESS; +} + + +fs_ret_t fs_store(fs_config_t const * const p_config, + uint32_t const * const p_dest, + uint32_t const * const p_src, + uint16_t const length_words) +{ + fs_op_t * p_op; + + if (!(m_flags & FS_FLAG_INITIALIZED)) + { + return FS_ERR_NOT_INITIALIZED; + } + + if (!check_config(p_config)) + { + return FS_ERR_INVALID_CFG; + } + + if ((p_src == NULL) || (p_dest == NULL)) + { + return FS_ERR_NULL_ARG; + } + + // Check that both pointers are word aligned. + if (((uint32_t)p_src & 0x03) || + ((uint32_t)p_dest & 0x03)) + { + return FS_ERR_UNALIGNED_ADDR; + } + + // Check that the operation doesn't go outside the client's memory boundaries. + if ((p_config->p_start_addr > p_dest) || + (p_config->p_end_addr < (p_dest + length_words))) + { + return FS_ERR_INVALID_ADDR; + } + + if (length_words == 0) + { + return FS_ERR_INVALID_ARG; + } + + if (!queue_get_next_free(&p_op)) + { + return FS_ERR_QUEUE_FULL; + } + + // Initialize the operation. + p_op->p_config = p_config; + p_op->op_code = FS_OP_STORE; + p_op->store.p_src = p_src; + p_op->store.p_dest = p_dest; + p_op->store.length_words = length_words; + + queue_start(); + + return FS_SUCCESS; +} + + +fs_ret_t fs_erase(fs_config_t const * const p_config, + uint32_t const * const p_page_addr, + uint16_t const num_pages) +{ + fs_op_t * p_op; + + if (!(m_flags & FS_FLAG_INITIALIZED)) + { + return FS_ERR_NOT_INITIALIZED; + } + + if (!check_config(p_config)) + { + return FS_ERR_INVALID_CFG; + } + + if (p_page_addr == NULL) + { + return FS_ERR_NULL_ARG; + } + + // Check that the page is aligned to a page boundary. + if (((uint32_t)p_page_addr % FS_PAGE_SIZE) != 0) + { + return FS_ERR_UNALIGNED_ADDR; + } + + // Check that the operation doesn't go outside the client's memory boundaries. + if ((p_page_addr < p_config->p_start_addr) || + (p_page_addr + (FS_PAGE_SIZE_WORDS * num_pages) > p_config->p_end_addr)) + { + return FS_ERR_INVALID_ADDR; + } + + if (num_pages == 0) + { + return FS_ERR_INVALID_ARG; + } + + if (!queue_get_next_free(&p_op)) + { + return FS_ERR_QUEUE_FULL; + } + + // Initialize the operation. + p_op->p_config = p_config; + p_op->op_code = FS_OP_ERASE; + p_op->erase.page = ((uint32_t)p_page_addr / FS_PAGE_SIZE); + p_op->erase.pages_to_erase = num_pages; + + queue_start(); + + return FS_SUCCESS; +} + + +fs_ret_t fs_queued_op_count_get(uint32_t * const p_op_count) +{ + if (p_op_count == NULL) + { + return FS_ERR_NULL_ARG; + } + + *p_op_count = m_queue.count; + + return FS_SUCCESS; +} + + +void fs_sys_event_handler(uint32_t sys_evt) +{ + fs_op_t * const p_op = &m_queue.op[m_queue.rp]; + + if (m_flags & FS_FLAG_PROCESSING) + { + // A flash operation was initiated by this module. Handle the result. + switch (sys_evt) + { + case NRF_EVT_FLASH_OPERATION_SUCCESS: + on_operation_success(p_op); + break; + + case NRF_EVT_FLASH_OPERATION_ERROR: + on_operation_failure(p_op); + break; + } + } + else if ((m_flags & FS_FLAG_FLASH_REQ_PENDING)) + { + // A flash operation was initiated outside this module. + // A callback which indicates that it has finished was received. + m_flags &= ~FS_FLAG_FLASH_REQ_PENDING; + + // If there are any elements left in the queue, set FS_FLAG_PROCESSING. + if (m_queue.count > 0) + { + m_flags |= FS_FLAG_PROCESSING; + } + } + + // Resume processing the queue, if necessary. + queue_process(); +} + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage.h new file mode 100644 index 0000000000..df186548f4 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage.h @@ -0,0 +1,235 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef FSTORAGE_H__ +#define FSTORAGE_H__ + +/** + * @defgroup fstorage fstorage + * @ingroup app_common + * @{ + * + * @brief Module which provides functionality to store data to flash and erase flash pages. + */ + +#include +#include "section_vars.h" + + +/**@brief fstorage return values. */ +typedef enum +{ + FS_SUCCESS, + FS_ERR_NOT_INITIALIZED, //!< Error. The module is not initialized. + FS_ERR_INVALID_CFG, //!< Error. Invalid fstorage configuration. + FS_ERR_NULL_ARG, //!< Error. Argument is NULL. + FS_ERR_INVALID_ARG, //!< Error. Argument contains invalid data. + FS_ERR_INVALID_ADDR, //!< Error. Address out of bounds. + FS_ERR_UNALIGNED_ADDR, //!< Error. Unaligned address. + FS_ERR_QUEUE_FULL, //!< Error. Queue is full. + FS_ERR_OPERATION_TIMEOUT, //!< Error. The operation has timed out. + FS_ERR_INTERNAL, //!< Error. Internal error. +} fs_ret_t; + + +/**@brief fstorage event IDs. */ +typedef enum +{ + FS_EVT_STORE, //!< Event for @ref fs_store. + FS_EVT_ERASE //!< Event for @ref fs_erase. +} fs_evt_id_t; + + +#if defined(__CC_ARM) + #pragma push + #pragma anon_unions +#elif defined(__ICCARM__) + #pragma language=extended +#elif defined(__GNUC__) + /* anonymous unions are enabled by default */ +#endif + +/**@brief An fstorage event. */ +typedef struct +{ + fs_evt_id_t id; //!< The event ID. + union + { + struct + { + uint32_t const * p_data; //!< Pointer to the data stored in flash. + uint16_t length_words; //!< Length of the data, in 4-byte words. + } store; + struct + { + uint16_t first_page; //!< First page erased. + uint16_t last_page; //!< Last page erased. + } erase; + }; +} fs_evt_t; + +#if defined(__CC_ARM) + #pragma pop +#elif defined(__ICCARM__) + /* leave anonymous unions enabled */ +#elif defined(__GNUC__) + /* anonymous unions are enabled by default */ +#endif + + +/**@brief fstorage event handler function prototype. + * + * @param[in] evt The event. + * @param[in] result The result of the operation. + */ +typedef void (*fs_cb_t)(fs_evt_t const * const evt, fs_ret_t result); + + +/**@brief fstorage application-specific configuration. + * + * @details Specifies the callback to invoke when an operation completes, the number of flash pages + * requested by the application and the priority with which these are to be assigned, with + * respect to other applications. Additionally, the configuration specifies the boundaries + * of the flash space assigned to an application. The configuration must be provided as an + * argument when invoking @ref fs_store and @ref fs_erase. + * + * @note The fields @p p_start_addr and @p p_end_address are set by @ref fs_init, based on the + * value of the field @p priority. + */ +typedef struct +{ + /**@brief The beginning of the flash space assigned to the application which registered this + * configuration. This field is set by @ref fs_init. + */ + uint32_t const * p_start_addr; + + /**@brief The end of the flash space assigned to the application which registered this + * configuration. This field is set by @ref fs_init. + */ + uint32_t const * p_end_addr; + + fs_cb_t const callback; //!< Callback to run when a flash operation has completed. + uint8_t const num_pages; //!< The number of flash pages requested. + + /**@brief The priority with which fstorage should assign flash pages to this application, + * with respect to other applications. Applications with higher priority will be + * assigned flash pages with a higher memory address. The highest priority is + * reserved. Must be unique among configurations. + */ + uint8_t const priority; +} fs_config_t; + + +/**@brief Macro for registering with an fstorage configuration. + * Applications which use fstorage must register with the module using this macro. + * Registering involves defining a variable which holds the configuration of fstorage + * specific to the application which invokes the macro. + * + * @details This macro places the configuration variable in a section named "fs_data" that + * fstorage uses during initialization and regular operation. + * + * @param[in] cfg_var A @e definition of a @ref fs_config_t variable. + */ +#define FS_REGISTER_CFG(cfg_var) NRF_SECTION_VARS_ADD(fs_data, cfg_var) + + +/**@brief Function for initializing the module. + * + * @details This functions assigns pages in flash according to all registered configurations. + * + * @retval FS_SUCCESS If the module was successfully initialized. + */ +fs_ret_t fs_init(void); + + +/**@brief Function for storing data in flash. + * + * @details Copies @p length_words words from @p p_src to the location pointed by @p p_dest. + * If the length of the data exceeds @ref FS_MAX_WRITE_SIZE_WORDS, the data will be + * written down in several chunks, as necessary. Only one event will be sent to the + * application upon completion. Both the source and the destination of the data must be + * word aligned. This function is asynchronous, completion is reported via an event sent + * the the callback function specified in the supplied configuration. + * + * @warning The data to be written to flash has to be kept in memory until the operation has + * terminated, i.e., an event is received. + * + * @param[in] p_config fstorage configuration registered by the application. + * @param[in] p_dest The address in flash memory where to store the data. + * @param[in] p_src Pointer to the data to store in flash. + * @param[in] length_words Length of the data to store, in words. + * + * @retval FS_SUCCESS If the operation was queued successfully. + * @retval FS_ERR_NOT_INITIALIZED If the module is not initialized. + * @retval FS_ERR_INVALID_CFG If @p p_config is NULL or contains invalid data. + * @retval FS_ERR_NULL_ARG If @p p_dest or @p p_src are NULL. + * @retval FS_ERR_INVALID_ARG If @p length_words is zero. + * @retval FS_ERR_INVALID_ADDR If @p p_dest or @p p_src are outside of the flash memory + * boundaries specified in @p p_config. + * @retval FS_ERR_UNALIGNED_ADDR If @p p_dest or @p p_src are not aligned to a word boundary. + * @retval FS_ERR_QUEUE_FULL If the internal operation queue is full. + */ +fs_ret_t fs_store(fs_config_t const * const p_config, + uint32_t const * const p_dest, + uint32_t const * const p_src, + uint16_t length_words); + + +/**@brief Function for erasing flash pages. + * + * @details Starting from the page at @p p_page_addr, erases @p num_pages flash pages. + * @p p_page_addr must be aligned to a page boundary. All pages to be erased must be + * within the bounds specified in the supplied fstorage configuration. + * This function is asynchronous. Completion is reported via an event. + * + * @param[in] p_config fstorage configuration registered by the application. + * @param[in] p_page_addr Address of the page to erase. Must be aligned to a page boundary. + * @param[in] num_pages Number of pages to erase. May not be zero. + * + * @retval FS_SUCCESS If the operation was queued successfully. + * @retval FS_ERR_NOT_INITIALIZED If the module is not initialized. + * @retval FS_ERR_INVALID_CFG If @p p_config is NULL or contains invalid data. + * @retval FS_ERR_NULL_ARG If @p p_page_addr is NULL. + * @retval FS_ERR_INVALID_ARG If @p num_pages is zero. + * @retval FS_ERR_INVALID_ADDR If the operation would go beyond the flash memory boundaries + * specified in @p p_config. + * @retval FS_ERR_UNALIGNED_ADDR If @p p_page_addr is not aligned to a page boundary. + * @retval FS_ERR_QUEUE_FULL If the internal operation queue is full. + */ +fs_ret_t fs_erase(fs_config_t const * const p_config, + uint32_t const * const p_page_addr, + uint16_t num_pages); + + +/**@brief Function for retrieving the number of queued flash operations. + * + * @param[out] p_op_count The number of queued flash operations. + * + * @retval FS_SUCCESS If the number of queued operations was retrieved successfully. + * @retval FS_ERR_NULL_ARG If @p p_op_count is NULL. + */ +fs_ret_t fs_queued_op_count_get(uint32_t * const p_op_count); + + +/**@brief Function for handling system events from the SoftDevice. + * + * @details If any of the modules used by the application rely on fstorage, the application should + * dispatch system events to fstorage using this function. + * + * @param[in] sys_evt System event from the SoftDevice. + */ +void fs_sys_event_handler(uint32_t sys_evt); + + +/** @} */ + +#endif // FSTORAGE_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage_internal_defs.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage_internal_defs.h new file mode 100644 index 0000000000..fc29693088 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage_internal_defs.h @@ -0,0 +1,135 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef FSTORAGE_INTERNAL_DEFS_H__ +#define FSTORAGE_INTERNAL_DEFS_H__ + +#include "nrf.h" + + +#define FS_FLAG_INITIALIZED (1 << 0) // The module has been initialized. +#define FS_FLAG_PROCESSING (1 << 1) // The module is processing flash operations. +// The module is waiting for a flash operation initiated by another module to complete. +#define FS_FLAG_FLASH_REQ_PENDING (1 << 2) + +#define FS_ERASED_WORD (0xFFFFFFFF) + +// Helper macros for section variables. +#define FS_SECTION_VARS_GET(i) NRF_SECTION_VARS_GET((i), fs_config_t, fs_data) +#define FS_SECTION_VARS_COUNT NRF_SECTION_VARS_COUNT(fs_config_t, fs_data) +#define FS_SECTION_VARS_START_ADDR NRF_SECTION_VARS_START_ADDR(fs_data) +#define FS_SECTION_VARS_END_ADDR NRF_SECTION_VARS_END_ADDR(fs_data) + + +// Register the section 'fs_data'. +//lint -save -e19 +NRF_SECTION_VARS_REGISTER_SECTION(fs_data); +//lint -restore + +// Declare symbols into the 'fs_data' section. +NRF_SECTION_VARS_REGISTER_SYMBOLS(fs_config_t, fs_data); +//lint -esym(526,fs_dataBase) +//lint -esym(526,fs_dataLimit) + + +// fstorage op-codes. +typedef enum +{ + FS_OP_NONE, // No operation. + FS_OP_STORE, // Store data. + FS_OP_ERASE // Erase one or more flash pages. +} fs_op_code_t; + + +#if defined(__CC_ARM) + #pragma push + #pragma anon_unions +#elif defined(__ICCARM__) + #pragma language=extended +#elif defined(__GNUC__) + // anonymous unions are enabled by default. +#endif + +// fstorage operation. +// Encapsulates details of a flash operation to be executed by this module. +typedef struct +{ + fs_config_t const * p_config; // Application-specific fstorage configuration. + fs_op_code_t op_code; // ID of the operation. + union + { + struct + { + uint32_t const * p_src; // Pointer to the data to be written to flash. + uint32_t const * p_dest; // Destination of the data in flash. + uint16_t length_words; // Length of the data to be written, in words. + uint16_t offset; // Write offset. + } store; + struct + { + uint16_t page; + uint16_t pages_erased; + uint16_t pages_to_erase; + } erase; + }; +} fs_op_t; + +#if defined(__CC_ARM) + #pragma pop +#elif defined(__ICCARM__) + // leave anonymous unions enabled. +#elif defined(__GNUC__) + // anonymous unions are enabled by default. +#endif + + +// Queue of requested operations. +// This queue holds flash operations requested to the module. +// The data to be written to flash must be kept in memory until the write operation +// is completed, i.e., an event indicating completion is received. +typedef struct +{ + fs_op_t op[FS_QUEUE_SIZE]; // Queue elements. + uint32_t rp; // Index of the operation being processed. + uint32_t count; // Number of elements in the queue. +} fs_op_queue_t; + + +// Size of a flash page in bytes. +#if defined (NRF51) + #define FS_PAGE_SIZE (1024) +#elif defined (NRF52) + #define FS_PAGE_SIZE (4096) +#endif + + +// Size of a flash page in words. +#define FS_PAGE_SIZE_WORDS (FS_PAGE_SIZE / sizeof(uint32_t)) + + +// Function to obtain the end of the flash space available to fstorage. +static uint32_t const * fs_flash_page_end_addr() +{ + uint32_t const bootloader_addr = NRF_UICR->NRFFW[0]; + + return (uint32_t*)((bootloader_addr != FS_ERASED_WORD) ? bootloader_addr : + NRF_FICR->CODESIZE * FS_PAGE_SIZE); +} + + +// Macro to obtain the address of the last page. +// If there is a bootloader present the bootloader address read from UICR +// will act as the page beyond the end of the available flash storage. +#define FS_PAGE_END_ADDR (fs_flash_page_end_addr()) + + +#endif //__FSTORAGE_INTERNAL_DEFS_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage_nosd.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage_nosd.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/config/hci_mem_pool_internal.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/config/hci_mem_pool_internal.h new file mode 100644 index 0000000000..f1fa77fea6 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/config/hci_mem_pool_internal.h @@ -0,0 +1,32 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup memory_pool_internal Memory Pool Internal + * @{ + * @ingroup memory_pool + * + * @brief Memory pool internal definitions + */ + +#ifndef MEM_POOL_INTERNAL_H__ +#define MEM_POOL_INTERNAL_H__ + +#define TX_BUF_SIZE 600u /**< TX buffer size in bytes. */ +#define RX_BUF_SIZE TX_BUF_SIZE /**< RX buffer size in bytes. */ + +#define RX_BUF_QUEUE_SIZE 4u /**< RX buffer element size. */ + +#endif // MEM_POOL_INTERNAL_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/config/hci_transport_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/config/hci_transport_config.h new file mode 100644 index 0000000000..86a55e32a9 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/config/hci_transport_config.h @@ -0,0 +1,40 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @brief Definition of HCI Transport Layer configurable parameters + */ + +#ifndef HCI_TRANSPORT_CFG_H__ +#define HCI_TRANSPORT_CFG_H__ + +/** This section covers configurable parameters for the HCI Transport SLIP layer. */ +#define HCI_SLIP_UART_RX_PIN_NUMBER 1 /**< Defines the UART RX pin number. The default pin for the board is chosen, but can be overwritten. */ + +#define HCI_SLIP_UART_TX_PIN_NUMBER 2 /**< Defines the UART TX pin number. The default pin for the board is chosen, but can be overwritten. */ + +#define HCI_SLIP_UART_RTS_PIN_NUMBER 3 /**< Defines the UART RTS pin number. The default pin for the board is chosen, but can be overwritten. */ + +#define HCI_SLIP_UART_CTS_PIN_NUMBER 4 /**< Defines the UART CTS pin number. The default pin for the board is chosen, but can be overwritten. */ + +#define HCI_SLIP_UART_MODE APP_UART_FLOW_CONTROL_ENABLED /**< Defines the UART mode to be used. Use UART Low Power with Flow Control - Valid values are defined in \ref app_uart_flow_control_t. For further information on the UART Low Power mode, please refer to: \ref app_uart . */ + +#define HCI_SLIP_UART_BAUDRATE UART_BAUDRATE_BAUDRATE_Baud38400 /**< Defines the UART Baud rate. Default is 38400 baud. */ + +/** This section covers configurable parameters for the HCI Transport layer that are used for calculating correct value for the retransmission timer timeout. */ +#define MAX_PACKET_SIZE_IN_BITS 8000u /**< Maximum size of a single application packet in bits. */ +#define USED_BAUD_RATE 38400u /**< The used uart baudrate. */ + +#endif // HCI_TRANSPORT_CFG_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/hci_mem_pool.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/hci_mem_pool.c new file mode 100644 index 0000000000..5213f327bb --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/hci_mem_pool.c @@ -0,0 +1,235 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "hci_mem_pool.h" +#include "hci_mem_pool_internal.h" +#include +#include + +/**@brief RX buffer element instance structure. + */ +typedef struct +{ + uint8_t rx_buffer[RX_BUF_SIZE]; /**< RX buffer memory array. */ + uint32_t length; /**< Length of the RX buffer memory array. */ +} rx_buffer_elem_t; + +/**@brief RX buffer queue element instance structure. + */ +typedef struct +{ + rx_buffer_elem_t * p_buffer; /**< Pointer to RX buffer element. */ + uint32_t free_window_count; /**< Free space element count. */ + uint32_t free_available_count; /**< Free area element count. */ + uint32_t read_available_count; /**< Read area element count. */ + uint32_t write_index; /**< Write position index. */ + uint32_t read_index; /**< Read position index. */ + uint32_t free_index; /**< Free position index. */ +} rx_buffer_queue_t; + +static bool m_is_tx_allocated; /**< Boolean value to determine if the TX buffer is allocated. */ +static rx_buffer_elem_t m_rx_buffer_elem_queue[RX_BUF_QUEUE_SIZE]; /**< RX buffer element instances. */ +static rx_buffer_queue_t m_rx_buffer_queue; /**< RX buffer queue element instance. */ + + +uint32_t hci_mem_pool_open(void) +{ + m_is_tx_allocated = false; + m_rx_buffer_queue.p_buffer = m_rx_buffer_elem_queue; + m_rx_buffer_queue.free_window_count = RX_BUF_QUEUE_SIZE; + m_rx_buffer_queue.free_available_count = 0; + m_rx_buffer_queue.read_available_count = 0; + m_rx_buffer_queue.write_index = 0; + m_rx_buffer_queue.read_index = 0; + m_rx_buffer_queue.free_index = 0; + + return NRF_SUCCESS; +} + + +uint32_t hci_mem_pool_close(void) +{ + return NRF_SUCCESS; +} + + +uint32_t hci_mem_pool_tx_alloc(void ** pp_buffer) +{ + static uint8_t tx_buffer[TX_BUF_SIZE]; + + uint32_t err_code; + + if (pp_buffer == NULL) + { + return NRF_ERROR_NULL; + } + + if (!m_is_tx_allocated) + { + m_is_tx_allocated = true; + *pp_buffer = tx_buffer; + err_code = NRF_SUCCESS; + } + else + { + err_code = NRF_ERROR_NO_MEM; + } + + return err_code; +} + + +uint32_t hci_mem_pool_tx_free(void) +{ + m_is_tx_allocated = false; + + return NRF_SUCCESS; +} + + +uint32_t hci_mem_pool_rx_produce(uint32_t length, void ** pp_buffer) +{ + uint32_t err_code; + + if (pp_buffer == NULL) + { + return NRF_ERROR_NULL; + } + *pp_buffer = NULL; + + if (m_rx_buffer_queue.free_window_count != 0) + { + if (length <= RX_BUF_SIZE) + { + --(m_rx_buffer_queue.free_window_count); + ++(m_rx_buffer_queue.read_available_count); + + *pp_buffer = + m_rx_buffer_queue.p_buffer[m_rx_buffer_queue.write_index].rx_buffer; + + m_rx_buffer_queue.free_index |= (1u << m_rx_buffer_queue.write_index); + + // @note: Adjust the write_index making use of the fact that the buffer size is of + // power of two and two's complement arithmetic. For details refer example to book + // "Making embedded systems: Elicia White". + m_rx_buffer_queue.write_index = + (m_rx_buffer_queue.write_index + 1u) & (RX_BUF_QUEUE_SIZE - 1u); + + err_code = NRF_SUCCESS; + } + else + { + err_code = NRF_ERROR_DATA_SIZE; + } + } + else + { + err_code = NRF_ERROR_NO_MEM; + } + + return err_code; +} + + +uint32_t hci_mem_pool_rx_consume(uint8_t * p_buffer) +{ + uint32_t err_code; + uint32_t consume_index; + uint32_t start_index; + + if (m_rx_buffer_queue.free_available_count != 0) + { + // Find the buffer that has been freed - + // Start at read_index minus free_available_count and then increment until read index. + err_code = NRF_ERROR_INVALID_ADDR; + consume_index = (m_rx_buffer_queue.read_index - m_rx_buffer_queue.free_available_count) & + (RX_BUF_QUEUE_SIZE - 1u); + start_index = consume_index; + + do + { + if (m_rx_buffer_queue.p_buffer[consume_index].rx_buffer == p_buffer) + { + m_rx_buffer_queue.free_index ^= (1u << consume_index); + err_code = NRF_SUCCESS; + break; + } + else + { + consume_index = (consume_index + 1u) & (RX_BUF_QUEUE_SIZE - 1u); + } + } + while (consume_index != m_rx_buffer_queue.read_index); + + while (!(m_rx_buffer_queue.free_index & (1 << start_index)) && + (m_rx_buffer_queue.free_available_count != 0)) + { + --(m_rx_buffer_queue.free_available_count); + ++(m_rx_buffer_queue.free_window_count); + start_index = (consume_index + 1u) & (RX_BUF_QUEUE_SIZE - 1u); + } + } + else + { + err_code = NRF_ERROR_NO_MEM; + } + + return err_code; +} + + +uint32_t hci_mem_pool_rx_data_size_set(uint32_t length) +{ + // @note: Adjust the write_index making use of the fact that the buffer size is of power + // of two and two's complement arithmetic. For details refer example to book + // "Making embedded systems: Elicia White". + const uint32_t index = (m_rx_buffer_queue.write_index - 1u) & (RX_BUF_QUEUE_SIZE - 1u); + m_rx_buffer_queue.p_buffer[index].length = length; + + return NRF_SUCCESS; +} + + +uint32_t hci_mem_pool_rx_extract(uint8_t ** pp_buffer, uint32_t * p_length) +{ + uint32_t err_code; + + if ((pp_buffer == NULL) || (p_length == NULL)) + { + return NRF_ERROR_NULL; + } + + if (m_rx_buffer_queue.read_available_count != 0) + { + --(m_rx_buffer_queue.read_available_count); + ++(m_rx_buffer_queue.free_available_count); + + *pp_buffer = + m_rx_buffer_queue.p_buffer[m_rx_buffer_queue.read_index].rx_buffer; + *p_length = + m_rx_buffer_queue.p_buffer[m_rx_buffer_queue.read_index].length; + + // @note: Adjust the write_index making use of the fact that the buffer size is of power + // of two and two's complement arithmetic. For details refer example to book + // "Making embedded systems: Elicia White". + m_rx_buffer_queue.read_index = + (m_rx_buffer_queue.read_index + 1u) & (RX_BUF_QUEUE_SIZE - 1u); + + err_code = NRF_SUCCESS; + } + else + { + err_code = NRF_ERROR_NO_MEM; + } + + return err_code; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/hci_mem_pool.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/hci_mem_pool.h new file mode 100644 index 0000000000..bc178d0bac --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/hci_mem_pool.h @@ -0,0 +1,132 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup memory_pool Memory pool + * @{ + * @ingroup app_common + * + * @brief Memory pool implementation + * + * Memory pool implementation, based on circular buffer data structure, which supports asynchronous + * processing of RX data. The current default implementation supports 1 TX buffer and 4 RX buffers. + * The memory managed by the pool is allocated from static storage instead of heap. The internal + * design of the circular buffer implementing the RX memory layout is illustrated in the picture + * below. + * + * @image html memory_pool.png "Circular buffer design" + * + * The expected call order for the RX APIs is as follows: + * - hci_mem_pool_rx_produce + * - hci_mem_pool_rx_data_size_set + * - hci_mem_pool_rx_extract + * - hci_mem_pool_rx_consume + * + * @warning If the above mentioned expected call order is violated the end result can be undefined. + * + * \par Component specific configuration options + * + * The following compile time configuration options are available to suit various implementations: + * - TX_BUF_SIZE TX buffer size in bytes. + * - RX_BUF_SIZE RX buffer size in bytes. + * - RX_BUF_QUEUE_SIZE RX buffer element size. + */ + +#ifndef HCI_MEM_POOL_H__ +#define HCI_MEM_POOL_H__ + +#include +#include "nrf_error.h" + +/**@brief Function for opening the module. + * + * @retval NRF_SUCCESS Operation success. + */ +uint32_t hci_mem_pool_open(void); + +/**@brief Function for closing the module. + * + * @retval NRF_SUCCESS Operation success. + */ +uint32_t hci_mem_pool_close(void); + +/**@brief Function for allocating requested amount of TX memory. + * + * @param[out] pp_buffer Pointer to the allocated memory. + * + * @retval NRF_SUCCESS Operation success. Memory was allocated. + * @retval NRF_ERROR_NO_MEM Operation failure. No memory available for allocation. + * @retval NRF_ERROR_NULL Operation failure. NULL pointer supplied. + */ +uint32_t hci_mem_pool_tx_alloc(void ** pp_buffer); + +/**@brief Function for freeing previously allocated TX memory. + * + * @note Memory management follows the FIFO principle meaning that free() order must match the + * alloc(...) order, which is the reason for omitting exact memory block identifier as an + * input parameter. + * + * @retval NRF_SUCCESS Operation success. Memory was freed. + */ +uint32_t hci_mem_pool_tx_free(void); + +/**@brief Function for producing a free RX memory block for usage. + * + * @note Upon produce request amount being 0, NRF_SUCCESS is returned. + * + * @param[in] length Amount, in bytes, of free memory to be produced. + * @param[out] pp_buffer Pointer to the allocated memory. + * + * @retval NRF_SUCCESS Operation success. Free RX memory block produced. + * @retval NRF_ERROR_NO_MEM Operation failure. No suitable memory available for allocation. + * @retval NRF_ERROR_DATA_SIZE Operation failure. Request size exceeds limit. + * @retval NRF_ERROR_NULL Operation failure. NULL pointer supplied. + */ +uint32_t hci_mem_pool_rx_produce(uint32_t length, void ** pp_buffer); + +/**@brief Function for setting the length of the last produced RX memory block. + * + * @warning If call to this API is omitted the end result is that the following call to + * mem_pool_rx_extract will return incorrect data in the p_length output parameter. + * + * @param[in] length Amount, in bytes, of actual memory used. + * + * @retval NRF_SUCCESS Operation success. Length was set. + */ +uint32_t hci_mem_pool_rx_data_size_set(uint32_t length); + +/**@brief Function for extracting a packet, which has been filled with read data, for further + * processing. + * + * @param[out] pp_buffer Pointer to the packet data. + * @param[out] p_length Length of packet data in bytes. + * + * @retval NRF_SUCCESS Operation success. + * @retval NRF_ERROR_NO_MEM Operation failure. No packet available to extract. + * @retval NRF_ERROR_NULL Operation failure. NULL pointer supplied. + */ +uint32_t hci_mem_pool_rx_extract(uint8_t ** pp_buffer, uint32_t * p_length); + +/**@brief Function for freeing previously extracted packet, which has been filled with read data. + * + * @param[in] p_buffer Pointer to consumed buffer. + * + * @retval NRF_SUCCESS Operation success. + * @retval NRF_ERROR_NO_MEM Operation failure. No packet available to free. + * @retval NRF_ERROR_INVALID_ADDR Operation failure. Not a valid pointer. + */ +uint32_t hci_mem_pool_rx_consume(uint8_t * p_buffer); + +#endif // HCI_MEM_POOL_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/scheduler/app_scheduler.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/scheduler/app_scheduler.c new file mode 100644 index 0000000000..b6f3e5ba96 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/scheduler/app_scheduler.c @@ -0,0 +1,227 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "app_scheduler.h" +#include +#include +#include +#include "nrf_soc.h" +#include "nrf_assert.h" +#include "app_util.h" +#include "app_util_platform.h" + +/**@brief Structure for holding a scheduled event header. */ +typedef struct +{ + app_sched_event_handler_t handler; /**< Pointer to event handler to receive the event. */ + uint16_t event_data_size; /**< Size of event data. */ +} event_header_t; + +STATIC_ASSERT(sizeof(event_header_t) <= APP_SCHED_EVENT_HEADER_SIZE); + +static event_header_t * m_queue_event_headers; /**< Array for holding the queue event headers. */ +static uint8_t * m_queue_event_data; /**< Array for holding the queue event data. */ +static volatile uint8_t m_queue_start_index; /**< Index of queue entry at the start of the queue. */ +static volatile uint8_t m_queue_end_index; /**< Index of queue entry at the end of the queue. */ +static uint16_t m_queue_event_size; /**< Maximum event size in queue. */ +static uint16_t m_queue_size; /**< Number of queue entries. */ + +#ifdef APP_SCHEDULER_WITH_PROFILER +static uint16_t m_max_queue_utilization; /**< Maximum observed queue utilization. */ +#endif + +/**@brief Function for incrementing a queue index, and handle wrap-around. + * + * @param[in] index Old index. + * + * @return New (incremented) index. + */ +static __INLINE uint8_t next_index(uint8_t index) +{ + return (index < m_queue_size) ? (index + 1) : 0; +} + + +static __INLINE uint8_t app_sched_queue_full() +{ + uint8_t tmp = m_queue_start_index; + return next_index(m_queue_end_index) == tmp; +} + +/**@brief Macro for checking if a queue is full. */ +#define APP_SCHED_QUEUE_FULL() app_sched_queue_full() + + +static __INLINE uint8_t app_sched_queue_empty() +{ + uint8_t tmp = m_queue_start_index; + return m_queue_end_index == tmp; +} + +/**@brief Macro for checking if a queue is empty. */ +#define APP_SCHED_QUEUE_EMPTY() app_sched_queue_empty() + + +uint32_t app_sched_init(uint16_t event_size, uint16_t queue_size, void * p_event_buffer) +{ + uint16_t data_start_index = (queue_size + 1) * sizeof(event_header_t); + + // Check that buffer is correctly aligned + if (!is_word_aligned(p_event_buffer)) + { + return NRF_ERROR_INVALID_PARAM; + } + + // Initialize event scheduler + m_queue_event_headers = p_event_buffer; + m_queue_event_data = &((uint8_t *)p_event_buffer)[data_start_index]; + m_queue_end_index = 0; + m_queue_start_index = 0; + m_queue_event_size = event_size; + m_queue_size = queue_size; + +#ifdef APP_SCHEDULER_WITH_PROFILER + m_max_queue_utilization = 0; +#endif + + return NRF_SUCCESS; +} + + +#ifdef APP_SCHEDULER_WITH_PROFILER +static void queue_utilization_check(void) +{ + uint16_t start = m_queue_start_index; + uint16_t end = m_queue_end_index; + uint16_t queue_utilization = (end >= start) ? (end - start) : + (m_queue_size + 1 - start + end); + + if (queue_utilization > m_max_queue_utilization) + { + m_max_queue_utilization = queue_utilization; + } +} + +uint16_t app_sched_queue_utilization_get(void) +{ + return m_max_queue_utilization; +} +#endif + + +uint32_t app_sched_event_put(void * p_event_data, + uint16_t event_data_size, + app_sched_event_handler_t handler) +{ + uint32_t err_code; + + if (event_data_size <= m_queue_event_size) + { + uint16_t event_index = 0xFFFF; + + CRITICAL_REGION_ENTER(); + + if (!APP_SCHED_QUEUE_FULL()) + { + event_index = m_queue_end_index; + m_queue_end_index = next_index(m_queue_end_index); + + #ifdef APP_SCHEDULER_WITH_PROFILER + // This function call must be protected with critical region because + // it modifies 'm_max_queue_utilization'. + queue_utilization_check(); + #endif + } + + CRITICAL_REGION_EXIT(); + + if (event_index != 0xFFFF) + { + // NOTE: This can be done outside the critical region since the event consumer will + // always be called from the main loop, and will thus never interrupt this code. + m_queue_event_headers[event_index].handler = handler; + if ((p_event_data != NULL) && (event_data_size > 0)) + { + memcpy(&m_queue_event_data[event_index * m_queue_event_size], + p_event_data, + event_data_size); + m_queue_event_headers[event_index].event_data_size = event_data_size; + } + else + { + m_queue_event_headers[event_index].event_data_size = 0; + } + + err_code = NRF_SUCCESS; + } + else + { + err_code = NRF_ERROR_NO_MEM; + } + } + else + { + err_code = NRF_ERROR_INVALID_LENGTH; + } + + return err_code; +} + + +/**@brief Function for reading the next event from specified event queue. + * + * @param[out] pp_event_data Pointer to pointer to event data. + * @param[out] p_event_data_size Pointer to size of event data. + * @param[out] p_event_handler Pointer to event handler function pointer. + * + * @return NRF_SUCCESS if new event, NRF_ERROR_NOT_FOUND if event queue is empty. + */ +static uint32_t app_sched_event_get(void ** pp_event_data, + uint16_t * p_event_data_size, + app_sched_event_handler_t * p_event_handler) +{ + uint32_t err_code = NRF_ERROR_NOT_FOUND; + + if (!APP_SCHED_QUEUE_EMPTY()) + { + uint16_t event_index; + + // NOTE: There is no need for a critical region here, as this function will only be called + // from app_sched_execute() from inside the main loop, so it will never interrupt + // app_sched_event_put(). Also, updating of (i.e. writing to) the start index will be + // an atomic operation. + event_index = m_queue_start_index; + m_queue_start_index = next_index(m_queue_start_index); + + *pp_event_data = &m_queue_event_data[event_index * m_queue_event_size]; + *p_event_data_size = m_queue_event_headers[event_index].event_data_size; + *p_event_handler = m_queue_event_headers[event_index].handler; + + err_code = NRF_SUCCESS; + } + + return err_code; +} + + +void app_sched_execute(void) +{ + void * p_event_data; + uint16_t event_data_size; + app_sched_event_handler_t event_handler; + + // Get next event (if any), and execute handler + while ((app_sched_event_get(&p_event_data, &event_data_size, &event_handler) == NRF_SUCCESS)) + { + event_handler(p_event_data, event_data_size); + } +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/scheduler/app_scheduler.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/scheduler/app_scheduler.h similarity index 94% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/scheduler/app_scheduler.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/scheduler/app_scheduler.h index 05117cb48f..079762c20c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/scheduler/app_scheduler.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/scheduler/app_scheduler.h @@ -39,7 +39,7 @@ * scheduler's queue. The app_sched_execute() function will pull this event and call its * handler in the main context. * - * @if (SD_S110 && !SD_S310) + * @if (PERIPHERAL) * For an example usage of the scheduler, see the implementations of * @ref ble_sdk_app_hids_mouse and @ref ble_sdk_app_hids_keyboard. * @endif @@ -52,6 +52,7 @@ #include #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()). */ @@ -131,6 +132,16 @@ uint32_t app_sched_event_put(void * p_event_data, uint16_t event_size, app_sched_event_handler_t handler); +#ifdef APP_SCHEDULER_WITH_PROFILER +/**@brief Function for getting the maximum observed queue utilization. + * + * Function for tuning the module and determining QUEUE_SIZE value and thus module RAM usage. + * + * @return Maximum number of events in queue observed so far. + */ +uint16_t app_sched_queue_utilization_get(void); +#endif + #ifdef APP_SCHEDULER_WITH_PAUSE /**@brief A function to pause the scheduler. * diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/timer/app_timer.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/timer/app_timer.h new file mode 100644 index 0000000000..11d38695fe --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/timer/app_timer.h @@ -0,0 +1,287 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup app_timer Application Timer + * @{ + * @ingroup app_common + * + * @brief Application timer functionality. + * + * @details This module enables the application to create multiple timer instances based on the RTC1 + * peripheral. Checking for time-outs and invokation of user time-out handlers is performed + * in the RTC1 interrupt handler. List handling is done using a software interrupt (SWI0). + * Both interrupt handlers are running in APP_LOW priority level. + * + * @details When calling app_timer_start() or app_timer_stop(), the timer operation is just queued, + * and the software interrupt is triggered. The actual timer start/stop operation is + * executed by the SWI0 interrupt handler. Since the SWI0 interrupt is running in APP_LOW, + * if the application code calling the timer function is running in APP_LOW or APP_HIGH, + * the timer operation will not be performed until the application handler has returned. + * This will be the case, for example, when stopping a timer from a time-out handler when not using + * the scheduler. + * + * @details Use the USE_SCHEDULER parameter of the APP_TIMER_INIT() macro to select if the + * @ref app_scheduler should be used or not. Even if the scheduler is + * not used, app_timer.h will include app_scheduler.h, so when + * compiling, app_scheduler.h must be available in one of the compiler include paths. + */ + +#ifndef APP_TIMER_H__ +#define APP_TIMER_H__ + +#include +#include +#include +#include "app_error.h" +#include "app_util.h" +#include "compiler_abstraction.h" + +#define APP_TIMER_CLOCK_FREQ 32768 /**< Clock frequency of the RTC timer used to implement the app timer module. */ +#define APP_TIMER_MIN_TIMEOUT_TICKS 5 /**< Minimum value of the timeout_ticks parameter of app_timer_start(). */ + +#define APP_TIMER_NODE_SIZE 32 /**< Size of app_timer.timer_node_t (used to allocate data). */ +#define APP_TIMER_USER_OP_SIZE 24 /**< Size of app_timer.timer_user_op_t (only for use inside APP_TIMER_BUF_SIZE()). */ +#define APP_TIMER_USER_SIZE 8 /**< Size of app_timer.timer_user_t (only for use inside APP_TIMER_BUF_SIZE()). */ +#define APP_TIMER_INT_LEVELS 3 /**< Number of interrupt levels from where timer operations may be initiated (only for use inside APP_TIMER_BUF_SIZE()). */ + +/**@brief Compute number of bytes required to hold the application timer data structures. + * + * @param[in] OP_QUEUE_SIZE Size of queues holding timer operations that are pending execution. + * Note that due to the queue implementation, this size must be one more + * than the size that is actually needed. + * + * @return Required application timer buffer size (in bytes). + */ +#define APP_TIMER_BUF_SIZE(OP_QUEUE_SIZE) \ + ( \ + ( \ + APP_TIMER_INT_LEVELS \ + * \ + (APP_TIMER_USER_SIZE + ((OP_QUEUE_SIZE) + 1) * APP_TIMER_USER_OP_SIZE) \ + ) \ + ) + +/**@brief Convert milliseconds to timer ticks. + * + * This macro uses 64-bit integer arithmetic, but as long as the macro parameters are + * constants (i.e. defines), the computation will be done by the preprocessor. + * + * When using this macro, ensure that the + * values provided as input result in an output value that is supported by the + * @ref app_timer_start function. For example, when the ticks for 1 ms is needed, the + * maximum possible value of PRESCALER must be 6, when @ref APP_TIMER_CLOCK_FREQ is 32768. + * This will result in a ticks value as 5. Any higher value for PRESCALER will result in a + * ticks value that is not supported by this module. + * + * @param[in] MS Milliseconds. + * @param[in] PRESCALER Value of the RTC1 PRESCALER register (must be the same value that was + * passed to APP_TIMER_INIT()). + * + * @return Number of timer ticks. + */ +#define APP_TIMER_TICKS(MS, PRESCALER)\ + ((uint32_t)ROUNDED_DIV((MS) * (uint64_t)APP_TIMER_CLOCK_FREQ, ((PRESCALER) + 1) * 1000)) + +typedef struct app_timer_t { uint32_t data[CEIL_DIV(APP_TIMER_NODE_SIZE, sizeof(uint32_t))]; } app_timer_t; + +/**@brief Timer ID type. + * Never declare a variable of this type, but use the macro @ref APP_TIMER_DEF instead.*/ +typedef app_timer_t * app_timer_id_t; + +/** + * @brief Create a timer identifier and statically allocate memory for the timer. + * + * @param timer_id Name of the timer identifier variable that will be used to control the timer. + */ +#define APP_TIMER_DEF(timer_id) \ + static app_timer_t timer_id##_data = { {0} }; \ + static const app_timer_id_t timer_id = &timer_id##_data + + +/**@brief Application time-out handler type. */ +typedef void (*app_timer_timeout_handler_t)(void * p_context); + +/**@brief Type of function for passing events from the timer module to the scheduler. */ +typedef uint32_t (*app_timer_evt_schedule_func_t) (app_timer_timeout_handler_t timeout_handler, + void * p_context); + +/**@brief Timer modes. */ +typedef enum +{ + APP_TIMER_MODE_SINGLE_SHOT, /**< The timer will expire only once. */ + APP_TIMER_MODE_REPEATED /**< The timer will restart each time it expires. */ +} app_timer_mode_t; + +/**@brief Initialize the application timer module. + * + * @details This macro handles dimensioning and allocation of the memory buffer required by the timer, + * making sure that the buffer is correctly aligned. It will also connect the timer module + * to the scheduler (if specified). + * + * @note This module assumes that the LFCLK is already running. If it is not, the module will + * be non-functional, since the RTC will not run. If you do not use a SoftDevice, you + * must start the LFCLK manually. See the rtc_example's lfclk_config() function + * for an example of how to do this. If you use a SoftDevice, the LFCLK is started on + * SoftDevice init. + * + * + * @param[in] PRESCALER Value of the RTC1 PRESCALER register. This will decide the + * timer tick rate. Set to 0 for no prescaling. + * @param[in] OP_QUEUES_SIZE Size of queues holding timer operations that are pending execution. + * @param[in] SCHEDULER_FUNC Pointer to scheduler event handler + * + * @note Since this macro allocates a buffer, it must only be called once (it is OK to call it + * several times as long as it is from the same location, for example, to do a re-initialization). + */ +/*lint -emacro(506, APP_TIMER_INIT) */ /* Suppress "Constant value Boolean */ +#define APP_TIMER_INIT(PRESCALER, OP_QUEUES_SIZE, SCHEDULER_FUNC) \ + do \ + { \ + static uint32_t APP_TIMER_BUF[CEIL_DIV(APP_TIMER_BUF_SIZE((OP_QUEUES_SIZE) + 1), \ + sizeof(uint32_t))]; \ + uint32_t ERR_CODE = app_timer_init((PRESCALER), \ + (OP_QUEUES_SIZE) + 1, \ + APP_TIMER_BUF, \ + SCHEDULER_FUNC); \ + APP_ERROR_CHECK(ERR_CODE); \ + } while (0) + + + +/**@brief Function for initializing the timer module. + * + * Normally, initialization should be done using the APP_TIMER_INIT() macro, because that macro will both + * allocate the buffers needed by the timer module (including aligning the buffers correctly) + * and take care of connecting the timer module to the scheduler (if specified). + * + * @param[in] prescaler Value of the RTC1 PRESCALER register. Set to 0 for no prescaling. + * @param[in] op_queues_size Size of queues holding timer operations that are pending + * execution. Note that due to the queue implementation, this size must + * be one more than the size that is actually needed. + * @param[in] p_buffer Pointer to memory buffer for internal use in the app_timer + * module. The size of the buffer can be computed using the + * APP_TIMER_BUF_SIZE() macro. The buffer must be aligned to a + * 4 byte boundary. + * @param[in] evt_schedule_func Function for passing time-out events to the scheduler. Point to + * app_timer_evt_schedule() to connect to the scheduler. Set to NULL + * to make the timer module call the time-out handler directly from + * the timer interrupt handler. + * + * @retval NRF_SUCCESS If the module was initialized successfully. + * @retval NRF_ERROR_INVALID_PARAM If a parameter was invalid (buffer not aligned to a 4 byte + * boundary or NULL). + */ +uint32_t app_timer_init(uint32_t prescaler, + uint8_t op_queues_size, + void * p_buffer, + app_timer_evt_schedule_func_t evt_schedule_func); + +/**@brief Function for creating a timer instance. + * + * @param[in] p_timer_id Pointer to timer identifier. + * @param[in] mode Timer mode. + * @param[in] timeout_handler Function to be executed when the timer expires. + * + * @retval NRF_SUCCESS If the timer was successfully created. + * @retval NRF_ERROR_INVALID_PARAM If a parameter was invalid. + * @retval NRF_ERROR_INVALID_STATE If the application timer module has not been initialized or + * the timer is running. + * + * @note This function does the timer allocation in the caller's context. It is also not protected + * by a critical region. Therefore care must be taken not to call it from several interrupt + * levels simultaneously. + * @note The function can be called again on the timer instance and will re-initialize the instance if + * the timer is not running. + * @attention The FreeRTOS and RTX app_timer implementation does not allow app_timer_create to + * be called on the previously initialized instance. + */ +uint32_t app_timer_create(app_timer_id_t const * p_timer_id, + app_timer_mode_t mode, + app_timer_timeout_handler_t timeout_handler); + +/**@brief Function for starting a timer. + * + * @param[in] timer_id Timer identifier. + * @param[in] timeout_ticks Number of ticks (of RTC1, including prescaling) to time-out event + * (minimum 5 ticks). + * @param[in] p_context General purpose pointer. Will be passed to the time-out handler when + * the timer expires. + * + * @retval NRF_SUCCESS If the timer was successfully started. + * @retval NRF_ERROR_INVALID_PARAM If a parameter was invalid. + * @retval NRF_ERROR_INVALID_STATE If the application timer module has not been initialized or the timer + * has not been created. + * @retval NRF_ERROR_NO_MEM If the timer operations queue was full. + * + * @note The minimum timeout_ticks value is 5. + * @note For multiple active timers, time-outs occurring in close proximity to each other (in the + * range of 1 to 3 ticks) will have a positive jitter of maximum 3 ticks. + * @note When calling this method on a timer that is already running, the second start operation + * is ignored. + */ +uint32_t app_timer_start(app_timer_id_t timer_id, uint32_t timeout_ticks, void * p_context); + +/**@brief Function for stopping the specified timer. + * + * @param[in] timer_id Timer identifier. + * + * @retval NRF_SUCCESS If the timer was successfully stopped. + * @retval NRF_ERROR_INVALID_PARAM If a parameter was invalid. + * @retval NRF_ERROR_INVALID_STATE If the application timer module has not been initialized or the timer + * has not been created. + * @retval NRF_ERROR_NO_MEM If the timer operations queue was full. + */ +uint32_t app_timer_stop(app_timer_id_t timer_id); + +/**@brief Function for stopping all running timers. + * + * @retval NRF_SUCCESS If all timers were successfully stopped. + * @retval NRF_ERROR_INVALID_STATE If the application timer module has not been initialized. + * @retval NRF_ERROR_NO_MEM If the timer operations queue was full. + */ +uint32_t app_timer_stop_all(void); + +/**@brief Function for returning the current value of the RTC1 counter. + * + * @param[out] p_ticks Current value of the RTC1 counter. + * + * @retval NRF_SUCCESS If the counter was successfully read. + */ +uint32_t app_timer_cnt_get(uint32_t * p_ticks); + +/**@brief Function for computing the difference between two RTC1 counter values. + * + * @param[in] ticks_to Value returned by app_timer_cnt_get(). + * @param[in] ticks_from Value returned by app_timer_cnt_get(). + * @param[out] p_ticks_diff Number of ticks from ticks_from to ticks_to. + * + * @retval NRF_SUCCESS If the counter difference was successfully computed. + */ +uint32_t app_timer_cnt_diff_compute(uint32_t ticks_to, + uint32_t ticks_from, + uint32_t * p_ticks_diff); + +#ifdef APP_TIMER_WITH_PROFILER +/**@brief Function for getting the maximum observed operation queue utilization. + * + * Function for tuning the module and determining OP_QUEUE_SIZE value and thus module RAM usage. + * + * @return Maximum number of events in queue observed so far. + */ +uint16_t app_timer_op_queue_utilization_get(void); +#endif + +#endif // APP_TIMER_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/trace/app_trace.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/trace/app_trace.c new file mode 100644 index 0000000000..74e3f5fa97 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/trace/app_trace.c @@ -0,0 +1,43 @@ +/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include +#include +#include +#include + + +#ifdef ENABLE_DEBUG_LOG_SUPPORT +#include "app_trace.h" +#include "nrf_log.h" + +void app_trace_init(void) +{ + (void)NRF_LOG_INIT(); +} + +void app_trace_dump(uint8_t * p_buffer, uint32_t len) +{ + app_trace_log("\r\n"); + for (uint32_t index = 0; index < len; index++) + { + app_trace_log("0x%02X ", p_buffer[index]); + } + app_trace_log("\r\n"); +} + +#endif // ENABLE_DEBUG_LOG_SUPPORT + +/** + *@} + **/ + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/trace/app_trace.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/trace/app_trace.h new file mode 100644 index 0000000000..bdf439ab36 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/trace/app_trace.h @@ -0,0 +1,56 @@ +#ifndef __DEBUG_H_ +#define __DEBUG_H_ + +#include +#include + +/** + * @defgroup app_trace Debug Logger + * @ingroup app_common + * @{ + * @brief Enables debug logs/ trace over UART. + * @details Enables debug logs/ trace over UART. Tracing is enabled only if + * ENABLE_DEBUG_LOG_SUPPORT is defined in the project. + */ +#ifdef ENABLE_DEBUG_LOG_SUPPORT +#include "nrf_log.h" +/** + * @brief Module Initialization. + * + * @details Initializes the module to use UART as trace output. + * + * @warning This function will configure UART using default board configuration. + * Do not call this function if UART is configured from a higher level in the application. + */ +void app_trace_init(void); + +/** + * @brief Log debug messages. + * + * @details This API logs messages over UART. The module must be initialized before using this API. + * + * @note Though this is currently a macro, it should be used used and treated as function. + */ +#define app_trace_log NRF_LOG_PRINTF + +/** + * @brief Dump auxiliary byte buffer to the debug trace. + * + * @details This API logs messages over UART. The module must be initialized before using this API. + * + * @param[in] p_buffer Buffer to be dumped on the debug trace. + * @param[in] len Size of the buffer. + */ +void app_trace_dump(uint8_t * p_buffer, uint32_t len); + +#else // ENABLE_DEBUG_LOG_SUPPORT + +#define app_trace_init(...) +#define app_trace_log(...) +#define app_trace_dump(...) + +#endif // ENABLE_DEBUG_LOG_SUPPORT + +/** @} */ + +#endif //__DEBUG_H_ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error.c new file mode 100644 index 0000000000..4a0933cadc --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error.c @@ -0,0 +1,124 @@ +/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup app_error Common application error handler + * @{ + * @ingroup app_common + * + * @brief Common application error handler. + */ + +#include "nrf.h" +#include +#include "app_error.h" +#include "nordic_common.h" +#include "sdk_errors.h" +#include "nrf_log.h" + +#ifdef DEBUG +#include "bsp.h" +#endif + + + +/**@brief Function for error handling, which is called when an error has occurred. + * + * @warning This handler is an example only and does not fit a final product. You need to analyze + * how your product is supposed to react in case of error. + * + * @param[in] error_code Error code supplied to the handler. + * @param[in] line_num Line number where the handler is called. + * @param[in] p_file_name Pointer to the file name. + */ + +/*lint -save -e14 */ +void app_error_handler(ret_code_t error_code, uint32_t line_num, const uint8_t * p_file_name) +{ + error_info_t error_info = + { + .line_num = line_num, + .p_file_name = p_file_name, + .err_code = error_code, + }; + app_error_fault_handler(NRF_FAULT_ID_SDK_ERROR, 0, (uint32_t)(&error_info)); + + UNUSED_VARIABLE(error_info); +} + +/*lint -save -e14 */ +void app_error_handler_bare(ret_code_t error_code) +{ + error_info_t error_info = + { + .line_num = 0, + .p_file_name = NULL, + .err_code = error_code, + }; + app_error_fault_handler(NRF_FAULT_ID_SDK_ERROR, 0, (uint32_t)(&error_info)); + + UNUSED_VARIABLE(error_info); +} + + +void app_error_save_and_stop(uint32_t id, uint32_t pc, uint32_t info) +{ + /* static error variables - in order to prevent removal by optimizers */ + static volatile struct + { + uint32_t fault_id; + uint32_t pc; + uint32_t error_info; + assert_info_t * p_assert_info; + error_info_t * p_error_info; + ret_code_t err_code; + uint32_t line_num; + const uint8_t * p_file_name; + } m_error_data = {0}; + + // The following variable helps Keil keep the call stack visible, in addition, it can be set to + // 0 in the debugger to continue executing code after the error check. + volatile bool loop = true; + UNUSED_VARIABLE(loop); + + m_error_data.fault_id = id; + m_error_data.pc = pc; + m_error_data.error_info = info; + + switch (id) + { + case NRF_FAULT_ID_SDK_ASSERT: + m_error_data.p_assert_info = (assert_info_t *)info; + m_error_data.line_num = m_error_data.p_assert_info->line_num; + m_error_data.p_file_name = m_error_data.p_assert_info->p_file_name; + break; + + case NRF_FAULT_ID_SDK_ERROR: + m_error_data.p_error_info = (error_info_t *)info; + m_error_data.err_code = m_error_data.p_error_info->err_code; + m_error_data.line_num = m_error_data.p_error_info->line_num; + m_error_data.p_file_name = m_error_data.p_error_info->p_file_name; + break; + } + + UNUSED_VARIABLE(m_error_data); + + // If printing is disrupted, remove the irq calls, or set the loop variable to 0 in the debugger. + __disable_irq(); + + while(loop); + + __enable_irq(); +} + +/*lint -restore */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error.h new file mode 100644 index 0000000000..351ae767a0 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error.h @@ -0,0 +1,201 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup app_error Common application error handler + * @{ + * @ingroup app_common + * + * @brief Common application error handler and macros for utilizing a common error handler. + */ + +#ifndef APP_ERROR_H__ +#define APP_ERROR_H__ + +#include +#include +#include +#include "nrf.h" +#include "sdk_errors.h" +#include "nordic_common.h" +#include "nrf_log.h" +#include "app_error_weak.h" + +#define NRF_FAULT_ID_SDK_RANGE_START 0x00004000 /**< The start of the range of error IDs defined in the SDK. */ + +/**@defgroup APP_ERROR_FAULT_IDS Fault ID types + * @{ */ +#define NRF_FAULT_ID_SDK_ERROR NRF_FAULT_ID_SDK_RANGE_START + 1 /**< An error stemming from a call to @ref APP_ERROR_CHECK or @ref APP_ERROR_CHECK_BOOL. The info parameter is a pointer to an @ref error_info_t variable. */ +#define NRF_FAULT_ID_SDK_ASSERT NRF_FAULT_ID_SDK_RANGE_START + 2 /**< An error stemming from a call to ASSERT (nrf_assert.h). The info parameter is a pointer to an @ref assert_info_t variable. */ +/**@} */ + +/**@brief Structure containing info about an error of the type @ref NRF_FAULT_ID_SDK_ERROR. + */ +typedef struct +{ + uint16_t line_num; /**< The line number where the error occurred. */ + uint8_t const * p_file_name; /**< The file in which the error occurred. */ + uint32_t err_code; /**< The error code representing the error that occurred. */ +} error_info_t; + +/**@brief Structure containing info about an error of the type @ref NRF_FAULT_ID_SDK_ASSERT. + */ +typedef struct +{ + uint16_t line_num; /**< The line number where the error occurred. */ + uint8_t const * p_file_name; /**< The file in which the error occurred. */ +} assert_info_t; + +/**@brief Function for error handling, which is called when an error has occurred. + * + * @param[in] error_code Error code supplied to the handler. + * @param[in] line_num Line number where the handler is called. + * @param[in] p_file_name Pointer to the file name. + */ +void app_error_handler(uint32_t error_code, uint32_t line_num, const uint8_t * p_file_name); + +/**@brief Function for error handling, which is called when an error has occurred. + * + * @param[in] error_code Error code supplied to the handler. + */ +void app_error_handler_bare(ret_code_t error_code); + +/**@brief Function for saving the parameters and entering an eternal loop, for debug purposes. + * + * @param[in] id Fault identifier. See @ref NRF_FAULT_IDS. + * @param[in] pc The program counter of the instruction that triggered the fault, or 0 if + * unavailable. + * @param[in] info Optional additional information regarding the fault. Refer to each fault + * identifier for details. + */ +void app_error_save_and_stop(uint32_t id, uint32_t pc, uint32_t info); + +/**@brief Function for printing all error info (using nrf_log). + * + * @details Nrf_log library must be initialized using NRF_LOG_INIT macro before calling + * this function. + * + * @param[in] id Fault identifier. See @ref NRF_FAULT_IDS. + * @param[in] pc The program counter of the instruction that triggered the fault, or 0 if + * unavailable. + * @param[in] info Optional additional information regarding the fault. Refer to each fault + * identifier for details. + */ +static __INLINE void app_error_log(uint32_t id, uint32_t pc, uint32_t info) +{ + switch (id) + { + case NRF_FAULT_ID_SDK_ASSERT: + NRF_LOG(NRF_LOG_COLOR_RED "\n*** ASSERTION FAILED ***\n"); + if (((assert_info_t *)(info))->p_file_name) + { + NRF_LOG_PRINTF(NRF_LOG_COLOR_WHITE "Line Number: %u\n", (unsigned int) ((assert_info_t *)(info))->line_num); + NRF_LOG_PRINTF("File Name: %s\n", ((assert_info_t *)(info))->p_file_name); + } + NRF_LOG_PRINTF(NRF_LOG_COLOR_DEFAULT "\n"); + break; + + case NRF_FAULT_ID_SDK_ERROR: + NRF_LOG(NRF_LOG_COLOR_RED "\n*** APPLICATION ERROR *** \n" NRF_LOG_COLOR_WHITE); + if (((error_info_t *)(info))->p_file_name) + { + NRF_LOG_PRINTF("Line Number: %u\n", (unsigned int) ((error_info_t *)(info))->line_num); + NRF_LOG_PRINTF("File Name: %s\n", ((error_info_t *)(info))->p_file_name); + } + NRF_LOG_PRINTF("Error Code: 0x%X\n" NRF_LOG_COLOR_DEFAULT "\n", (unsigned int) ((error_info_t *)(info))->err_code); + break; + } +} + +/**@brief Function for printing all error info (using printf). + * + * @param[in] id Fault identifier. See @ref NRF_FAULT_IDS. + * @param[in] pc The program counter of the instruction that triggered the fault, or 0 if + * unavailable. + * @param[in] info Optional additional information regarding the fault. Refer to each fault + * identifier for details. + */ +//lint -save -e438 +static __INLINE void app_error_print(uint32_t id, uint32_t pc, uint32_t info) +{ + unsigned int tmp = id; + printf("app_error_print():\r\n"); + printf("Fault identifier: 0x%X\r\n", tmp); + printf("Program counter: 0x%X\r\n", tmp = pc); + printf("Fault information: 0x%X\r\n", tmp = info); + + switch (id) + { + case NRF_FAULT_ID_SDK_ASSERT: + printf("Line Number: %u\r\n", tmp = ((assert_info_t *)(info))->line_num); + printf("File Name: %s\r\n", ((assert_info_t *)(info))->p_file_name); + break; + + case NRF_FAULT_ID_SDK_ERROR: + printf("Line Number: %u\r\n", tmp = ((error_info_t *)(info))->line_num); + printf("File Name: %s\r\n", ((error_info_t *)(info))->p_file_name); + printf("Error Code: 0x%X\r\n", tmp = ((error_info_t *)(info))->err_code); + break; + } +} +//lint -restore + + +/**@brief Macro for calling error handler function. + * + * @param[in] ERR_CODE Error code supplied to the error handler. + */ +#ifdef DEBUG +#define APP_ERROR_HANDLER(ERR_CODE) \ + do \ + { \ + app_error_handler((ERR_CODE), __LINE__, (uint8_t*) __FILE__); \ + } while (0) +#else +#define APP_ERROR_HANDLER(ERR_CODE) \ + do \ + { \ + app_error_handler_bare((ERR_CODE)); \ + } while (0) +#endif +/**@brief Macro for calling error handler function if supplied error code any other than NRF_SUCCESS. + * + * @param[in] ERR_CODE Error code supplied to the error handler. + */ +#define APP_ERROR_CHECK(ERR_CODE) \ + do \ + { \ + const uint32_t LOCAL_ERR_CODE = (ERR_CODE); \ + if (LOCAL_ERR_CODE != NRF_SUCCESS) \ + { \ + APP_ERROR_HANDLER(LOCAL_ERR_CODE); \ + } \ + } while (0) + +/**@brief Macro for calling error handler function if supplied boolean value is false. + * + * @param[in] BOOLEAN_VALUE Boolean value to be evaluated. + */ +#define APP_ERROR_CHECK_BOOL(BOOLEAN_VALUE) \ + do \ + { \ + const uint32_t LOCAL_BOOLEAN_VALUE = (BOOLEAN_VALUE); \ + if (!LOCAL_BOOLEAN_VALUE) \ + { \ + APP_ERROR_HANDLER(0); \ + } \ + } while (0) + +#endif // APP_ERROR_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error_weak.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error_weak.c new file mode 100644 index 0000000000..edb7e652fd --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error_weak.c @@ -0,0 +1,53 @@ +/* Copyright (c) 2016 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "app_error.h" + +#ifdef DEBUG +#include "bsp.h" +#endif + +/*lint -save -e14 */ + +/** + * Function is implemented as weak so that it can be overwritten by custom application error handler + * when needed. + */ +__WEAK void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info) +{ + // On assert, the system can only recover with a reset. +#ifndef DEBUG + NVIC_SystemReset(); +#else + +#ifdef BSP_DEFINES_ONLY + LEDS_ON(LEDS_MASK); +#else + UNUSED_VARIABLE(bsp_indication_set(BSP_INDICATE_FATAL_ERROR)); + // This call can be used for debug purposes during application development. + // @note CAUTION: Activating this code will write the stack to flash on an error. + // This function should NOT be used in a final product. + // It is intended STRICTLY for development/debugging purposes. + // The flash write will happen EVEN if the radio is active, thus interrupting + // any communication. + // Use with care. Uncomment the line below to use. + //ble_debug_assert_handler(error_code, line_num, p_file_name); +#endif // BSP_DEFINES_ONLY + + app_error_save_and_stop(id, pc, info); + +#endif // DEBUG +} + +/*lint -restore */ + + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error_weak.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error_weak.h new file mode 100644 index 0000000000..e02f9826f7 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error_weak.h @@ -0,0 +1,51 @@ +/* Copyright (c) 2016 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef APP_ERROR_WEAK_H__ +#define APP_ERROR_WEAK_H__ + +/** @file + * + * @defgroup app_error Common application error handler + * @{ + * @ingroup app_common + * + * @brief Common application error handler. + */ + +/**@brief Callback function for asserts in the SoftDevice. + * + * @details A pointer to this function will be passed to the SoftDevice. This function will be + * called by the SoftDevice if certain unrecoverable errors occur within the + * application or SoftDevice. + * + * See @ref nrf_fault_handler_t for more details. + * + * @param[in] id Fault identifier. See @ref NRF_FAULT_IDS. + * @param[in] pc The program counter of the instruction that triggered the fault, or 0 if + * unavailable. + * @param[in] info Optional additional information regarding the fault. Refer to each fault + * identifier for details. + * + * @remarks Function is implemented as weak so that it can be overwritten by custom application + * error handler when needed. + */ +#ifdef __CC_ARM + void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info); +#else +__WEAK void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info); +#endif + + +/** @} */ + +#endif // APP_ERROR_WEAK_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util.h new file mode 100644 index 0000000000..56ccb1691d --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util.h @@ -0,0 +1,493 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup app_util Utility Functions and Definitions + * @{ + * @ingroup app_common + * + * @brief Various types and definitions available to all applications. + */ + +#ifndef APP_UTIL_H__ +#define APP_UTIL_H__ + +#include +#include +#include "compiler_abstraction.h" +#include "nrf.h" + +//lint -save -e27 -e10 -e19 +#if defined ( __CC_ARM ) +extern char STACK$$Base; +extern char STACK$$Length; +#define STACK_BASE &STACK$$Base +#define STACK_TOP ((void*)((uint32_t)STACK_BASE + (uint32_t)&STACK$$Length)) +#elif defined ( __ICCARM__ ) +extern char CSTACK$$Base; +extern char CSTACK$$Length; +#define STACK_BASE &CSTACK$$Base +#define STACK_TOP ((void*)((uint32_t)STACK_BASE + (uint32_t)&CSTACK$$Length)) +#elif defined ( __GNUC__ ) +extern uint32_t __StackTop; +extern uint32_t __StackLimit; +#define STACK_BASE &__StackLimit +#define STACK_TOP &__StackTop +#endif +//lint -restore + +enum +{ + UNIT_0_625_MS = 625, /**< Number of microseconds in 0.625 milliseconds. */ + UNIT_1_25_MS = 1250, /**< Number of microseconds in 1.25 milliseconds. */ + UNIT_10_MS = 10000 /**< Number of microseconds in 10 milliseconds. */ +}; + + +/**@brief Implementation specific macro for delayed macro expansion used in string concatenation +* +* @param[in] lhs Left hand side in concatenation +* @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 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 + +#define STATIC_ASSERT(EXPR) \ + ;enum { STRING_CONCATENATE(assert_line_, __LINE__) = 1/(!!(EXPR)) } + +#endif + + +/**@brief Implementation details for NUM_VAR_ARGS */ +#define NUM_VA_ARGS_IMPL( \ + _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, \ + _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, \ + _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, \ + _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, \ + _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, \ + _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, \ + _61, _62, N, ...) N + + +/**@brief Macro to get the number of arguments in a call variadic macro call + * + * param[in] ... List of arguments + * + * @retval Number of variadic arguments in the argument list + */ +#define NUM_VA_ARGS(...) NUM_VA_ARGS_IMPL(__VA_ARGS__, 63, 62, 61, \ + 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, \ + 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, \ + 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, \ + 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, \ + 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, \ + 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0) + + +/**@brief type for holding an encoded (i.e. little endian) 16 bit unsigned integer. */ +typedef uint8_t uint16_le_t[2]; + +/**@brief Type for holding an encoded (i.e. little endian) 32 bit unsigned integer. */ +typedef uint8_t uint32_le_t[4]; + +/**@brief Byte array type. */ +typedef struct +{ + uint16_t size; /**< Number of array entries. */ + uint8_t * p_data; /**< Pointer to array entries. */ +} uint8_array_t; + + +/**@brief Macro for performing rounded integer division (as opposed to truncating the result). + * + * @param[in] A Numerator. + * @param[in] B Denominator. + * + * @return Rounded (integer) result of dividing A by B. + */ +#define ROUNDED_DIV(A, B) (((A) + ((B) / 2)) / (B)) + + +/**@brief Macro for checking if an integer is a power of two. + * + * @param[in] A Number to be tested. + * + * @return true if value is power of two. + * @return false if value not power of two. + */ +#define IS_POWER_OF_TWO(A) ( ((A) != 0) && ((((A) - 1) & (A)) == 0) ) + + +/**@brief Macro for converting milliseconds to ticks. + * + * @param[in] TIME Number of milliseconds to convert. + * @param[in] RESOLUTION Unit to be converted to in [us/ticks]. + */ +#define MSEC_TO_UNITS(TIME, RESOLUTION) (((TIME) * 1000) / (RESOLUTION)) + + +/**@brief Macro for performing integer division, making sure the result is rounded up. + * + * @details One typical use for this is to compute the number of objects with size B is needed to + * hold A number of bytes. + * + * @param[in] A Numerator. + * @param[in] B Denominator. + * + * @return Integer result of dividing A by B, rounded up. + */ +#define CEIL_DIV(A, B) \ + (((A) + (B) - 1) / (B)) + + +/**@brief Macro for creating a buffer aligned to 4 bytes. + * + * @param[in] NAME Name of the buffor. + * @param[in] MIN_SIZE Size of this buffor (it will be rounded up to multiples of 4 bytes). + */ +#define WORD_ALIGNED_MEM_BUFF(NAME, MIN_SIZE) static uint32_t NAME[CEIL_DIV(MIN_SIZE, sizeof(uint32_t))] + + +/**@brief Macro for calculating the number of words that are needed to hold a number of bytes. + * + * @details Adds 3 and divides by 4. + * + * @param[in] n_bytes The number of bytes. + * + * @return The number of words that @p n_bytes take up (rounded up). + */ +#define BYTES_TO_WORDS(n_bytes) (((n_bytes) + 3) >> 2) + + +/**@brief The number of bytes in a word. + */ +#define BYTES_PER_WORD (4) + + +/**@brief Macro for increasing a number to the nearest (larger) multiple of another number. + * + * @param[in] alignment The number to align to. + * @param[in] number The number to align (increase). + * + * @return The aligned (increased) @p number. + */ +#define ALIGN_NUM(alignment, number) ((number - 1) + alignment - ((number - 1) % alignment)) + + +/**@brief Function for changing the value unit. + * + * @param[in] value Value to be rescaled. + * @param[in] old_unit_reversal Reversal of the incoming unit. + * @param[in] new_unit_reversal Reversal of the desired unit. + * + * @return Number of bytes written. + */ +static __INLINE uint64_t value_rescale(uint32_t value, uint32_t old_unit_reversal, uint16_t new_unit_reversal) +{ + return (uint64_t)ROUNDED_DIV((uint64_t)value * new_unit_reversal, old_unit_reversal); +} + +/**@brief Function for encoding a uint16 value. + * + * @param[in] value Value to be encoded. + * @param[out] p_encoded_data Buffer where the encoded data is to be written. + * + * @return Number of bytes written. + */ +static __INLINE uint8_t uint16_encode(uint16_t value, uint8_t * p_encoded_data) +{ + p_encoded_data[0] = (uint8_t) ((value & 0x00FF) >> 0); + p_encoded_data[1] = (uint8_t) ((value & 0xFF00) >> 8); + return sizeof(uint16_t); +} + +/**@brief Function for encoding a three-byte value. + * + * @param[in] value Value to be encoded. + * @param[out] p_encoded_data Buffer where the encoded data is to be written. + * + * @return Number of bytes written. + */ +static __INLINE uint8_t uint24_encode(uint32_t value, uint8_t * p_encoded_data) +{ + p_encoded_data[0] = (uint8_t) ((value & 0x000000FF) >> 0); + p_encoded_data[1] = (uint8_t) ((value & 0x0000FF00) >> 8); + p_encoded_data[2] = (uint8_t) ((value & 0x00FF0000) >> 16); + return 3; +} + +/**@brief Function for encoding a uint32 value. + * + * @param[in] value Value to be encoded. + * @param[out] p_encoded_data Buffer where the encoded data is to be written. + * + * @return Number of bytes written. + */ +static __INLINE uint8_t uint32_encode(uint32_t value, uint8_t * p_encoded_data) +{ + p_encoded_data[0] = (uint8_t) ((value & 0x000000FF) >> 0); + p_encoded_data[1] = (uint8_t) ((value & 0x0000FF00) >> 8); + p_encoded_data[2] = (uint8_t) ((value & 0x00FF0000) >> 16); + p_encoded_data[3] = (uint8_t) ((value & 0xFF000000) >> 24); + return sizeof(uint32_t); +} + +/**@brief Function for encoding a uint48 value. + * + * @param[in] value Value to be encoded. + * @param[out] p_encoded_data Buffer where the encoded data is to be written. + * + * @return Number of bytes written. + */ +static __INLINE uint8_t uint48_encode(uint64_t value, uint8_t * p_encoded_data) +{ + p_encoded_data[0] = (uint8_t) ((value & 0x0000000000FF) >> 0); + p_encoded_data[1] = (uint8_t) ((value & 0x00000000FF00) >> 8); + p_encoded_data[2] = (uint8_t) ((value & 0x000000FF0000) >> 16); + p_encoded_data[3] = (uint8_t) ((value & 0x0000FF000000) >> 24); + p_encoded_data[4] = (uint8_t) ((value & 0x00FF00000000) >> 32); + p_encoded_data[5] = (uint8_t) ((value & 0xFF0000000000) >> 40); + return 6; +} + +/**@brief Function for decoding a uint16 value. + * + * @param[in] p_encoded_data Buffer where the encoded data is stored. + * + * @return Decoded value. + */ +static __INLINE uint16_t uint16_decode(const uint8_t * p_encoded_data) +{ + return ( (((uint16_t)((uint8_t *)p_encoded_data)[0])) | + (((uint16_t)((uint8_t *)p_encoded_data)[1]) << 8 )); +} + +/**@brief Function for decoding a uint16 value in big-endian format. + * + * @param[in] p_encoded_data Buffer where the encoded data is stored. + * + * @return Decoded value. + */ +static __INLINE uint16_t uint16_big_decode(const uint8_t * p_encoded_data) +{ + return ( (((uint16_t)((uint8_t *)p_encoded_data)[0]) << 8 ) | + (((uint16_t)((uint8_t *)p_encoded_data)[1])) ); +} + +/**@brief Function for decoding a three-byte value. + * + * @param[in] p_encoded_data Buffer where the encoded data is stored. + * + * @return Decoded value (uint32_t). + */ +static __INLINE uint32_t uint24_decode(const uint8_t * p_encoded_data) +{ + return ( (((uint32_t)((uint8_t *)p_encoded_data)[0]) << 0) | + (((uint32_t)((uint8_t *)p_encoded_data)[1]) << 8) | + (((uint32_t)((uint8_t *)p_encoded_data)[2]) << 16)); +} + +/**@brief Function for decoding a uint32 value. + * + * @param[in] p_encoded_data Buffer where the encoded data is stored. + * + * @return Decoded value. + */ +static __INLINE uint32_t uint32_decode(const uint8_t * p_encoded_data) +{ + return ( (((uint32_t)((uint8_t *)p_encoded_data)[0]) << 0) | + (((uint32_t)((uint8_t *)p_encoded_data)[1]) << 8) | + (((uint32_t)((uint8_t *)p_encoded_data)[2]) << 16) | + (((uint32_t)((uint8_t *)p_encoded_data)[3]) << 24 )); +} + +/**@brief Function for decoding a uint32 value in big-endian format. + * + * @param[in] p_encoded_data Buffer where the encoded data is stored. + * + * @return Decoded value. + */ +static __INLINE uint32_t uint32_big_decode(const uint8_t * p_encoded_data) +{ + return ( (((uint32_t)((uint8_t *)p_encoded_data)[0]) << 24) | + (((uint32_t)((uint8_t *)p_encoded_data)[1]) << 16) | + (((uint32_t)((uint8_t *)p_encoded_data)[2]) << 8) | + (((uint32_t)((uint8_t *)p_encoded_data)[3]) << 0) ); +} + +/**@brief Function for encoding a uint32 value in big-endian format. + * + * @param[in] value Value to be encoded. + * @param[out] p_encoded_data Buffer where the encoded data will be written. + * + * @return Number of bytes written. + */ +static __INLINE uint8_t uint32_big_encode(uint32_t value, uint8_t * p_encoded_data) +{ +#ifdef NRF51 + p_encoded_data[0] = (uint8_t) ((value & 0xFF000000) >> 24); + p_encoded_data[1] = (uint8_t) ((value & 0x00FF0000) >> 16); + p_encoded_data[2] = (uint8_t) ((value & 0x0000FF00) >> 8); + p_encoded_data[3] = (uint8_t) ((value & 0x000000FF) >> 0); +#elif NRF52 + *(uint32_t *)p_encoded_data = __REV(value); +#endif + return sizeof(uint32_t); +} + +/**@brief Function for decoding a uint48 value. + * + * @param[in] p_encoded_data Buffer where the encoded data is stored. + * + * @return Decoded value. (uint64_t) + */ +static __INLINE uint64_t uint48_decode(const uint8_t * p_encoded_data) +{ + return ( (((uint64_t)((uint8_t *)p_encoded_data)[0]) << 0) | + (((uint64_t)((uint8_t *)p_encoded_data)[1]) << 8) | + (((uint64_t)((uint8_t *)p_encoded_data)[2]) << 16) | + (((uint64_t)((uint8_t *)p_encoded_data)[3]) << 24) | + (((uint64_t)((uint8_t *)p_encoded_data)[4]) << 32) | + (((uint64_t)((uint8_t *)p_encoded_data)[5]) << 40 )); +} + +/** @brief Function for converting the input voltage (in milli volts) into percentage of 3.0 Volts. + * + * @details The calculation is based on a linearized version of the battery's discharge + * curve. 3.0V returns 100% battery level. The limit for power failure is 2.1V and + * is considered to be the lower boundary. + * + * The discharge curve for CR2032 is non-linear. In this model it is split into + * 4 linear sections: + * - Section 1: 3.0V - 2.9V = 100% - 42% (58% drop on 100 mV) + * - Section 2: 2.9V - 2.74V = 42% - 18% (24% drop on 160 mV) + * - Section 3: 2.74V - 2.44V = 18% - 6% (12% drop on 300 mV) + * - Section 4: 2.44V - 2.1V = 6% - 0% (6% drop on 340 mV) + * + * These numbers are by no means accurate. Temperature and + * load in the actual application is not accounted for! + * + * @param[in] mvolts The voltage in mV + * + * @return Battery level in percent. +*/ +static __INLINE uint8_t battery_level_in_percent(const uint16_t mvolts) +{ + uint8_t battery_level; + + if (mvolts >= 3000) + { + battery_level = 100; + } + else if (mvolts > 2900) + { + battery_level = 100 - ((3000 - mvolts) * 58) / 100; + } + else if (mvolts > 2740) + { + battery_level = 42 - ((2900 - mvolts) * 24) / 160; + } + else if (mvolts > 2440) + { + battery_level = 18 - ((2740 - mvolts) * 12) / 300; + } + else if (mvolts > 2100) + { + battery_level = 6 - ((2440 - mvolts) * 6) / 340; + } + else + { + battery_level = 0; + } + + return battery_level; +} + +/**@brief Function for checking if a pointer value is aligned to a 4 byte boundary. + * + * @param[in] p Pointer value to be checked. + * + * @return TRUE if pointer is aligned to a 4 byte boundary, FALSE otherwise. + */ +static __INLINE bool is_word_aligned(void const* p) +{ + return (((uintptr_t)p & 0x03) == 0); +} + +/** + * @brief Function for checking if provided address is located in stack space. + * + * @param[in] ptr Pointer to be checked. + * + * @return true if address is in stack space, false otherwise. + */ +static __INLINE bool is_address_from_stack(void * ptr) +{ + if (((uint32_t)ptr >= (uint32_t)STACK_BASE) && + ((uint32_t)ptr < (uint32_t)STACK_TOP) ) + { + return true; + } + else + { + return false; + } +} + +#endif // APP_UTIL_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_bds.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_bds.h new file mode 100644 index 0000000000..aa0d01028a --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_bds.h @@ -0,0 +1,413 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup app_util Utility Functions and Definitions + * @{ + * @ingroup app_common + * + * @brief Various types and definitions available to all applications. + */ + +#ifndef APP_UTIL_BDS_H__ +#define APP_UTIL_BDS_H__ + +#include +#include +#include +#include "compiler_abstraction.h" +#include "app_util.h" +#include "ble_srv_common.h" +#include "nordic_common.h" + +typedef uint8_t nibble_t; +typedef uint32_t uint24_t; +typedef uint64_t uint40_t; + +/**@brief IEEE 11073-20601 Regulatory Certification Data List Structure */ +typedef struct +{ + uint8_t * p_list; /**< Pointer the byte array containing the encoded opaque structure based on IEEE 11073-20601 specification. */ + uint8_t list_len; /**< Length of the byte array. */ +} regcertdatalist_t; + +/**@brief SFLOAT format (IEEE-11073 16-bit FLOAT, meaning 4 bits for exponent (base 10) and 12 bits mantissa) */ +typedef struct +{ + int8_t exponent; /**< Base 10 exponent, should be using only 4 bits */ + int16_t mantissa; /**< Mantissa, should be using only 12 bits */ +} sfloat_t; + +/**@brief Date and Time structure. */ +typedef struct +{ + uint16_t year; + uint8_t month; + uint8_t day; + uint8_t hours; + uint8_t minutes; + uint8_t seconds; +} ble_date_time_t; + + +/**@brief Function for encoding a uint16 value. + * + * @param[in] p_value Value to be encoded. + * @param[out] p_encoded_data Buffer where the encoded data is to be written. + * + * @return Number of bytes written. + */ +static __INLINE uint8_t bds_uint16_encode(const uint16_t * p_value, uint8_t * p_encoded_data) +{ + p_encoded_data[0] = (uint8_t) ((*p_value & 0x00FF) >> 0); + p_encoded_data[1] = (uint8_t) ((*p_value & 0xFF00) >> 8); + return sizeof(uint16_t); +} + +static __INLINE uint8_t bds_int16_encode(const int16_t * p_value, uint8_t * p_encoded_data) +{ + uint16_t tmp = *p_value; + return bds_uint16_encode(&tmp, p_encoded_data); +} + +/**@brief Function for encoding a uint24 value. + * + * @param[in] p_value Value to be encoded. + * @param[out] p_encoded_data Buffer where the encoded data is to be written. + * + * @return Number of bytes written. + */ +static __INLINE uint8_t bds_uint24_encode(const uint32_t * p_value, uint8_t * p_encoded_data) +{ + p_encoded_data[0] = (uint8_t) ((*p_value & 0x000000FF) >> 0); + p_encoded_data[1] = (uint8_t) ((*p_value & 0x0000FF00) >> 8); + p_encoded_data[2] = (uint8_t) ((*p_value & 0x00FF0000) >> 16); + return (3); +} + + +/**@brief Function for encoding a uint32 value. + * + * @param[in] p_value Value to be encoded. + * @param[out] p_encoded_data Buffer where the encoded data is to be written. + * + * @return Number of bytes written. + */ +static __INLINE uint8_t bds_uint32_encode(const uint32_t * p_value, uint8_t * p_encoded_data) +{ + p_encoded_data[0] = (uint8_t) ((*p_value & 0x000000FF) >> 0); + p_encoded_data[1] = (uint8_t) ((*p_value & 0x0000FF00) >> 8); + p_encoded_data[2] = (uint8_t) ((*p_value & 0x00FF0000) >> 16); + p_encoded_data[3] = (uint8_t) ((*p_value & 0xFF000000) >> 24); + return sizeof(uint32_t); +} + + +/**@brief Function for encoding a uint40 value. + * + * @param[in] p_value Value to be encoded. + * @param[out] p_encoded_data Buffer where the encoded data is to be written. + * + * @return Number of bytes written. + */ +static __INLINE uint8_t bds_uint40_encode(const uint64_t * p_value, uint8_t * p_encoded_data) +{ + p_encoded_data[0] = (uint8_t) ((*p_value & 0x00000000000000FF) >> 0); + p_encoded_data[1] = (uint8_t) ((*p_value & 0x000000000000FF00) >> 8); + p_encoded_data[2] = (uint8_t) ((*p_value & 0x0000000000FF0000) >> 16); + p_encoded_data[3] = (uint8_t) ((*p_value & 0x00000000FF000000) >> 24); + p_encoded_data[4] = (uint8_t) ((*p_value & 0x000000FF00000000) >> 32); + return 5; +} + +/**@brief Function for encoding a sfloat value. + * + * @param[in] p_value Value to be encoded. + * @param[out] p_encoded_data Buffer where the encoded data is to be written. + * + * @return Number of bytes written. + */ +static __INLINE uint8_t bds_sfloat_encode(const sfloat_t * p_value, uint8_t * p_encoded_data) +{ + uint16_t encoded_val; + + encoded_val = ((p_value->exponent << 12) & 0xF000) | + ((p_value->mantissa << 0) & 0x0FFF); + + return(bds_uint16_encode(&encoded_val, p_encoded_data)); +} + + +/**@brief Function for encoding a uint8_array value. + * + * @param[in] p_value Value to be encoded. + * @param[out] p_encoded_data Buffer where the encoded data is to be written. + */ +static __INLINE uint8_t bds_uint8_array_encode(const uint8_array_t * p_value, + uint8_t * p_encoded_data) +{ + memcpy(p_encoded_data, p_value->p_data, p_value->size); + return p_value->size; +} + + +/**@brief Function for encoding a utf8_str value. + * + * @param[in] p_value Value to be encoded. + * @param[out] p_encoded_data Buffer where the encoded data is to be written. + + */ +static __INLINE uint8_t bds_ble_srv_utf8_str_encode(const ble_srv_utf8_str_t * p_value, + uint8_t * p_encoded_data) +{ + memcpy(p_encoded_data, p_value->p_str, p_value->length); + return p_value->length; +} + +/**@brief Function for encoding a regcertdatalist value. + * + * @param[in] p_value Value to be encoded. + * @param[out] p_encoded_data Buffer where the encoded data is to be written. + + */ +static __INLINE uint8_t bds_regcertdatalist_encode(const regcertdatalist_t * p_value, + uint8_t * p_encoded_data) +{ + memcpy(p_encoded_data, p_value->p_list, p_value->list_len); + return p_value->list_len; +} + + +/**@brief Function for decoding a date_time value. + * + * @param[in] p_date_time pointer to the date_time structure to encode. + * @param[in] p_encoded_data pointer to the encoded data + * @return length of the encoded field. + */ +static __INLINE uint8_t bds_ble_date_time_encode(const ble_date_time_t * p_date_time, + uint8_t * p_encoded_data) +{ + uint8_t len = bds_uint16_encode(&p_date_time->year, &p_encoded_data[0]); + + p_encoded_data[len++] = p_date_time->month; + p_encoded_data[len++] = p_date_time->day; + p_encoded_data[len++] = p_date_time->hours; + p_encoded_data[len++] = p_date_time->minutes; + p_encoded_data[len++] = p_date_time->seconds; + + return len; +} + + +/**@brief Function for decoding a uint16 value. + * + * @param[in] len length of the field to be decoded. + * @param[in] p_encoded_data Buffer where the encoded data is stored. + * @param[in] p_decoded_val pointer to the decoded value + * @return length of the decoded field. + */ +static __INLINE uint8_t bds_uint16_decode(const uint8_t len, + const uint8_t * p_encoded_data, + uint16_t * p_decoded_val) +{ + UNUSED_VARIABLE(len); + *p_decoded_val = (((uint16_t)((uint8_t *)p_encoded_data)[0])) | + (((uint16_t)((uint8_t *)p_encoded_data)[1]) << 8 ); + return (sizeof(uint16_t)); +} + + +/**@brief Function for decoding a int16 value. + * + * @param[in] len length of the field to be decoded. + * @param[in] p_encoded_data Buffer where the encoded data is stored. + * @param[in] p_decoded_val pointer to the decoded value + * @return length of the decoded field. + */ +static __INLINE uint8_t bds_int16_decode(const uint8_t len, + const uint8_t * p_encoded_data, + int16_t * p_decoded_val) +{ + UNUSED_VARIABLE(len); + uint16_t tmp = 0; + uint8_t retval = bds_uint16_decode(len, p_encoded_data, &tmp); + *p_decoded_val = (int16_t)tmp; + return retval; +} + + +/**@brief Function for decoding a uint24 value. + * + * @param[in] len length of the field to be decoded. + * @param[in] p_encoded_data Buffer where the encoded data is stored. + * @param[in] p_decoded_val pointer to the decoded value + * + * @return length of the decoded field. + */ +static __INLINE uint8_t bds_uint24_decode(const uint8_t len, + const uint8_t * p_encoded_data, + uint32_t * p_decoded_val) +{ + UNUSED_VARIABLE(len); + *p_decoded_val = (((uint32_t)((uint8_t *)p_encoded_data)[0]) << 0) | + (((uint32_t)((uint8_t *)p_encoded_data)[1]) << 8) | + (((uint32_t)((uint8_t *)p_encoded_data)[2]) << 16); + return (3); +} + + +/**@brief Function for decoding a uint32 value. + * + * @param[in] len length of the field to be decoded. + * @param[in] p_encoded_data Buffer where the encoded data is stored. + * @param[in] p_decoded_val pointer to the decoded value + * + * @return length of the decoded field. + */ +static __INLINE uint8_t bds_uint32_decode(const uint8_t len, + const uint8_t * p_encoded_data, + uint32_t * p_decoded_val) +{ + UNUSED_VARIABLE(len); + *p_decoded_val = (((uint32_t)((uint8_t *)p_encoded_data)[0]) << 0) | + (((uint32_t)((uint8_t *)p_encoded_data)[1]) << 8) | + (((uint32_t)((uint8_t *)p_encoded_data)[2]) << 16) | + (((uint32_t)((uint8_t *)p_encoded_data)[3]) << 24 ); + return (sizeof(uint32_t)); +} + + +/**@brief Function for decoding a uint40 value. + * + * @param[in] len length of the field to be decoded. + * @param[in] p_encoded_data Buffer where the encoded data is stored. + * @param[in] p_decoded_val pointer to the decoded value + * + * @return length of the decoded field. + */ +static __INLINE uint8_t bds_uint40_decode(const uint8_t len, + const uint8_t * p_encoded_data, + uint64_t * p_decoded_val) +{ + UNUSED_VARIABLE(len); + *p_decoded_val = (((uint64_t)((uint8_t *)p_encoded_data)[0]) << 0) | + (((uint64_t)((uint8_t *)p_encoded_data)[1]) << 8) | + (((uint64_t)((uint8_t *)p_encoded_data)[2]) << 16) | + (((uint64_t)((uint8_t *)p_encoded_data)[3]) << 24 )| + (((uint64_t)((uint8_t *)p_encoded_data)[4]) << 32 ); + return (40); +} + + +/**@brief Function for decoding a sfloat value. + * + * @param[in] len length of the field to be decoded. + * @param[in] p_encoded_data Buffer where the encoded data is stored. + * @param[in] p_decoded_val pointer to the decoded value + * + * @return length of the decoded field. + + */ +static __INLINE uint8_t bds_sfloat_decode(const uint8_t len, + const uint8_t * p_encoded_data, + sfloat_t * p_decoded_val) +{ + + p_decoded_val->exponent = 0; + bds_uint16_decode(len, p_encoded_data, (uint16_t*)&p_decoded_val->mantissa); + p_decoded_val->exponent = (uint8_t)((p_decoded_val->mantissa & 0xF000) >> 12); + p_decoded_val->mantissa &= 0x0FFF; + return len; +} + + +/**@brief Function for decoding a uint8_array value. + * + * @param[in] len length of the field to be decoded. + * @param[in] p_encoded_data Buffer where the encoded data is stored. + * @param[in] p_decoded_val pointer to the decoded value + * + * @return length of the decoded field. + */ +static __INLINE uint8_t bds_uint8_array_decode(const uint8_t len, + const uint8_t * p_encoded_data, + uint8_array_t * p_decoded_val) +{ + memcpy(p_decoded_val->p_data, p_encoded_data, len); + p_decoded_val->size = len; + return p_decoded_val->size; +} + + +/**@brief Function for decoding a utf8_str value. + * + * @param[in] len length of the field to be decoded. + * @param[in] p_encoded_data Buffer where the encoded data is stored. + * @param[in] p_decoded_val pointer to the decoded value + * + * @return length of the decoded field. + */ +static __INLINE uint8_t bds_ble_srv_utf8_str_decode(const uint8_t len, + const uint8_t * p_encoded_data, + ble_srv_utf8_str_t * p_decoded_val) +{ + p_decoded_val->p_str = (uint8_t*)p_encoded_data; + p_decoded_val->length = len; + return p_decoded_val->length; +} + + +/**@brief Function for decoding a regcertdatalist value. + * + * @param[in] len length of the field to be decoded. + * @param[in] p_encoded_data Buffer where the encoded data is stored. + * @param[in] p_decoded_val pointer to the decoded value + * + * @return length of the decoded field. + */ +static __INLINE uint8_t bds_regcertdatalist_decode(const uint8_t len, + const uint8_t * p_encoded_data, + regcertdatalist_t * p_decoded_val) +{ + memcpy(p_decoded_val->p_list, p_encoded_data, len); + p_decoded_val->list_len = len; + return p_decoded_val->list_len; +} + + +/**@brief Function for decoding a date_time value. + * + * @param[in] len length of the field to be decoded. + * @param[in] p_encoded_data Buffer where the encoded data is stored. + * @param[in] p_date_time pointer to the decoded value + * + * @return length of the decoded field. + */ +static __INLINE uint8_t bds_ble_date_time_decode(const uint8_t len, + const uint8_t * p_encoded_data, + ble_date_time_t * p_date_time) +{ + UNUSED_VARIABLE(len); + uint8_t pos = bds_uint16_decode(len, &p_encoded_data[0], &p_date_time->year); + p_date_time->month = p_encoded_data[pos++]; + p_date_time->day = p_encoded_data[pos++]; + p_date_time->hours = p_encoded_data[pos++]; + p_date_time->minutes = p_encoded_data[pos++]; + p_date_time->seconds = p_encoded_data[pos++]; + + return pos; +} + +#endif // APP_UTIL_BDS_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_platform.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_platform.c new file mode 100644 index 0000000000..baaa320929 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_platform.c @@ -0,0 +1,60 @@ +/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "app_util_platform.h" + +static uint32_t m_in_critical_region = 0; + +void app_util_disable_irq(void) +{ + __disable_irq(); + m_in_critical_region++; +} + +void app_util_enable_irq(void) +{ + m_in_critical_region--; + if (m_in_critical_region == 0) + { + __enable_irq(); + } +} + +void app_util_critical_region_enter(uint8_t *p_nested) +{ +#ifdef NRF52 + ASSERT(APP_LEVEL_PRIVILEGED == privilege_level_get()) +#endif + +#if defined(SOFTDEVICE_PRESENT) + /* return value can be safely ignored */ + (void) sd_nvic_critical_region_enter(p_nested); +#else + app_util_disable_irq(); +#endif +} + +void app_util_critical_region_exit(uint8_t nested) +{ +#ifdef NRF52 + ASSERT(APP_LEVEL_PRIVILEGED == privilege_level_get()) +#endif + +#if defined(SOFTDEVICE_PRESENT) + /* return value can be safely ignored */ + (void) sd_nvic_critical_region_exit(nested); +#else + app_util_enable_irq(); +#endif +} + + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_platform.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_platform.h new file mode 100644 index 0000000000..4c79be4e73 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_platform.h @@ -0,0 +1,211 @@ +/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/**@file + * + * @defgroup app_util_platform Utility Functions and Definitions (Platform) + * @{ + * @ingroup app_common + * + * @brief Various types and definitions available to all applications when using SoftDevice. + */ + +#ifndef APP_UTIL_PLATFORM_H__ +#define APP_UTIL_PLATFORM_H__ + +#include +#include "compiler_abstraction.h" +#include "nrf.h" +#ifdef SOFTDEVICE_PRESENT +#include "nrf_soc.h" +#include "nrf_nvic.h" +#endif +#include "nrf_assert.h" +#include "app_error.h" + +#if defined(NRF51) +#define _PRIO_SD_HIGH 0 +#define _PRIO_APP_HIGH 1 +#define _PRIO_APP_MID 1 +#define _PRIO_SD_LOW 2 +#define _PRIO_APP_LOW 3 +#define _PRIO_APP_LOWEST 3 +#define _PRIO_THREAD 4 +#elif defined(NRF52) +#define _PRIO_SD_HIGH 0 +#define _PRIO_SD_MID 1 +#define _PRIO_APP_HIGH 2 +#define _PRIO_APP_MID 3 +#define _PRIO_SD_LOW 4 +#define _PRIO_SD_LOWEST 5 +#define _PRIO_APP_LOW 6 +#define _PRIO_APP_LOWEST 7 +#define _PRIO_THREAD 15 +#else + #error "No platform defined" +#endif + +/**@brief The interrupt priorities available to the application while the SoftDevice is active. */ +typedef enum +{ +#ifdef SOFTDEVICE_PRESENT + APP_IRQ_PRIORITY_HIGHEST = _PRIO_SD_HIGH, +#else + APP_IRQ_PRIORITY_HIGHEST = _PRIO_APP_HIGH, +#endif + APP_IRQ_PRIORITY_HIGH = _PRIO_APP_HIGH, +#ifndef SOFTDEVICE_PRESENT + APP_IRQ_PRIORITY_MID = _PRIO_SD_LOW, +#else + APP_IRQ_PRIORITY_MID = _PRIO_APP_MID, +#endif + APP_IRQ_PRIORITY_LOW = _PRIO_APP_LOW, + APP_IRQ_PRIORITY_LOWEST = _PRIO_APP_LOWEST, + APP_IRQ_PRIORITY_THREAD = _PRIO_THREAD /**< "Interrupt level" when running in Thread Mode. */ +} app_irq_priority_t; + +/*@brief The privilege levels available to applications in Thread Mode */ +typedef enum +{ + APP_LEVEL_UNPRIVILEGED, + APP_LEVEL_PRIVILEGED +} app_level_t; + +/**@cond NO_DOXYGEN */ +#define EXTERNAL_INT_VECTOR_OFFSET 16 +/**@endcond */ + +#define PACKED(TYPE) __packed TYPE + +void app_util_critical_region_enter (uint8_t *p_nested); +void app_util_critical_region_exit (uint8_t nested); + +/**@brief Macro for entering a critical region. + * + * @note Due to implementation details, there must exist one and only one call to + * CRITICAL_REGION_EXIT() for each call to CRITICAL_REGION_ENTER(), and they must be located + * in the same scope. + */ +#ifdef SOFTDEVICE_PRESENT +#define CRITICAL_REGION_ENTER() \ + { \ + uint8_t __CR_NESTED = 0; \ + app_util_critical_region_enter(&__CR_NESTED); +#else +#define CRITICAL_REGION_ENTER() app_util_critical_region_enter(NULL) +#endif + +/**@brief Macro for leaving a critical region. + * + * @note Due to implementation details, there must exist one and only one call to + * CRITICAL_REGION_EXIT() for each call to CRITICAL_REGION_ENTER(), and they must be located + * in the same scope. + */ +#ifdef SOFTDEVICE_PRESENT +#define CRITICAL_REGION_EXIT() \ + app_util_critical_region_exit(__CR_NESTED); \ + } +#else +#define CRITICAL_REGION_EXIT() app_util_critical_region_exit(0) +#endif + +/* Workaround for Keil 4 */ +#ifndef IPSR_ISR_Msk +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ +#endif + + + +/**@brief Macro to enable anonymous unions from a certain point in the code. + */ +#if defined(__CC_ARM) + #define ANON_UNIONS_ENABLE _Pragma("push") \ + _Pragma("anon_unions") +#elif defined(__ICCARM__) + #define ANON_UNIONS_ENABLE _Pragma("language=extended") +#else + #define ANON_UNIONS_ENABLE + // No action will be taken. + // For GCC anonymous unions are enabled by default. +#endif + +/**@brief Macro to disable anonymous unions from a certain point in the code. + * @note Call only after first calling @ref ANON_UNIONS_ENABLE. + */ +#if defined(__CC_ARM) + #define ANON_UNIONS_DISABLE _Pragma("pop") +#elif defined(__ICCARM__) + #define ANON_UNIONS_DISABLE + // for IAR leave anonymous unions enabled +#else + #define ANON_UNIONS_DISABLE + // No action will be taken. + // For GCC anonymous unions are enabled by default. +#endif + + +/* Workaround for Keil 4 */ +#ifndef CONTROL_nPRIV_Msk +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ +#endif + +/**@brief Function for finding the current interrupt level. + * + * @return Current interrupt level. + * @retval APP_IRQ_PRIORITY_HIGH We are running in Application High interrupt level. + * @retval APP_IRQ_PRIORITY_LOW We are running in Application Low interrupt level. + * @retval APP_IRQ_PRIORITY_THREAD We are running in Thread Mode. + */ +static __INLINE uint8_t current_int_priority_get(void) +{ + uint32_t isr_vector_num = __get_IPSR() & IPSR_ISR_Msk ; + if (isr_vector_num > 0) + { + int32_t irq_type = ((int32_t)isr_vector_num - EXTERNAL_INT_VECTOR_OFFSET); + return (NVIC_GetPriority((IRQn_Type)irq_type) & 0xFF); + } + else + { + return APP_IRQ_PRIORITY_THREAD; + } +} + +/**@brief Function for finding out the current privilege level. + * + * @return Current privilege level. + * @retval APP_LEVEL_UNPRIVILEGED We are running in unprivileged level. + * @retval APP_LEVEL_PRIVILEGED We are running in privileged level. + */ +static __INLINE uint8_t privilege_level_get(void) +{ +#if defined(NRF51) + /* the Cortex-M0 has no concept of privilege */ + return APP_LEVEL_PRIVILEGED; +#elif defined(NRF52) + uint32_t isr_vector_num = __get_IPSR() & IPSR_ISR_Msk ; + if (0 == isr_vector_num) + { + /* Thread Mode, check nPRIV */ + int32_t control = __get_CONTROL(); + return control & CONTROL_nPRIV_Msk ? APP_LEVEL_UNPRIVILEGED : APP_LEVEL_PRIVILEGED; + } + else + { + /* Handler Mode, always privileged */ + return APP_LEVEL_PRIVILEGED; + } +#endif +} + +#endif // APP_UTIL_PLATFORM_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/common.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/common.h new file mode 100644 index 0000000000..44abd5b131 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/common.h @@ -0,0 +1,38 @@ + /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef COMMON_H +#define COMMON_H + +/*lint ++flb "Enter library region" */ + +#include +#include + +/* @file +* @brief Common header file for generic macros and definitions + * + */ + +/* + * GPIO glue macros, this can be used to define a pin number in source/header file and use that macro for pin + * configuration using this expansion. + * example: + * #define RESET_PIN 8 + * NRF_GPIO->PINCNF(RESET_PIN) = XXX ; // Expanded NRF_GPIO->PIN_CNF[8] = XXX + */ +#define PINX_GLUE(x, y, z) x##y##_##z /*!< first level glue for pin macros */ +#define PINCNF(p) PINX_GLUE(PIN,p,CNF) /*!< gpio configure pin number 'p' */ +#define PINOUT(p) PINX_GLUE(PIN,p,OUT) /*!< gpio out pin number 'p' */ + +/*lint --flb "Leave library region" */ +#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nordic_common.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nordic_common.h new file mode 100644 index 0000000000..bf256e0fa9 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nordic_common.h @@ -0,0 +1,108 @@ +/* Copyright (c) 2008 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + */ + +/** @file + * @brief Common defines and macros for firmware developed by Nordic Semiconductor. + */ + +#ifndef NORDIC_COMMON_H__ +#define NORDIC_COMMON_H__ + +/** The upper 8 bits of a 32 bit value */ +//lint -emacro(572,MSB) // Suppress warning 572 "Excessive shift value" +#define MSB_32(a) (((a) & 0xFF000000) >> 24) +/** The lower 8 bits (of a 32 bit value) */ +#define LSB_32(a) ((a) & 0x000000FF) + +/** The upper 8 bits of a 16 bit value */ +//lint -emacro(572,MSB_16) // Suppress warning 572 "Excessive shift value" +#define MSB_16(a) (((a) & 0xFF00) >> 8) +/** The lower 8 bits (of a 16 bit value) */ +#define LSB_16(a) ((a) & 0x00FF) + +/** Leaves the minimum of the two 32-bit arguments */ +/*lint -emacro(506, MIN) */ /* Suppress "Constant value Boolean */ +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +/** Leaves the maximum of the two 32-bit arguments */ +/*lint -emacro(506, MAX) */ /* Suppress "Constant value Boolean */ +#define MAX(a, b) ((a) < (b) ? (b) : (a)) + +/** Concatenates two parameters. Useful as a second level of indirection, + * when a parameter can be macro itself. */ +#define CONCAT_2(p1, p2) p1##p2 +/** Concatenates three parameters. Useful as a second level of indirection, + * when a parameter can be macro itself. */ +#define CONCAT_3(p1, p2, p3) p1##p2##p3 + +/**@brief Set a bit in the uint32 word. + * + * @param[in] W Word whose bit is being set. + * @param[in] B Bit number in the word to be set. + */ +#define SET_BIT(W,B) ((W) |= (uint32_t)(1U << (B))) + + +/**@brief Clears a bit in the uint32 word. + * + * @param[in] W Word whose bit is to be cleared. + * @param[in] B Bit number in the word to be cleared. + */ +#define CLR_BIT(W, B) ((W) &= (~((uint32_t)1 << (B)))) + + +/**@brief Checks if a bit is set. + * + * @param[in] W Word whose bit is to be checked. + * @param[in] B Bit number in the word to be checked. + * + * @retval 1 if bit is set. + * @retval 0 if bit is not set. + */ +#define IS_SET(W,B) (((W) >> (B)) & 1) + +#define BIT_0 0x01 /**< The value of bit 0 */ +#define BIT_1 0x02 /**< The value of bit 1 */ +#define BIT_2 0x04 /**< The value of bit 2 */ +#define BIT_3 0x08 /**< The value of bit 3 */ +#define BIT_4 0x10 /**< The value of bit 4 */ +#define BIT_5 0x20 /**< The value of bit 5 */ +#define BIT_6 0x40 /**< The value of bit 6 */ +#define BIT_7 0x80 /**< The value of bit 7 */ +#define BIT_8 0x0100 /**< The value of bit 8 */ +#define BIT_9 0x0200 /**< The value of bit 9 */ +#define BIT_10 0x0400 /**< The value of bit 10 */ +#define BIT_11 0x0800 /**< The value of bit 11 */ +#define BIT_12 0x1000 /**< The value of bit 12 */ +#define BIT_13 0x2000 /**< The value of bit 13 */ +#define BIT_14 0x4000 /**< The value of bit 14 */ +#define BIT_15 0x8000 /**< The value of bit 15 */ +#define BIT_16 0x00010000 /**< The value of bit 16 */ +#define BIT_17 0x00020000 /**< The value of bit 17 */ +#define BIT_18 0x00040000 /**< The value of bit 18 */ +#define BIT_19 0x00080000 /**< The value of bit 19 */ +#define BIT_20 0x00100000 /**< The value of bit 20 */ +#define BIT_21 0x00200000 /**< The value of bit 21 */ +#define BIT_22 0x00400000 /**< The value of bit 22 */ +#define BIT_23 0x00800000 /**< The value of bit 23 */ +#define BIT_24 0x01000000 /**< The value of bit 24 */ +#define BIT_25 0x02000000 /**< The value of bit 25 */ +#define BIT_26 0x04000000 /**< The value of bit 26 */ +#define BIT_27 0x08000000 /**< The value of bit 27 */ +#define BIT_28 0x10000000 /**< The value of bit 28 */ +#define BIT_29 0x20000000 /**< The value of bit 29 */ +#define BIT_30 0x40000000 /**< The value of bit 30 */ +#define BIT_31 0x80000000 /**< The value of bit 31 */ + +#define UNUSED_VARIABLE(X) ((void)(X)) +#define UNUSED_PARAMETER(X) UNUSED_VARIABLE(X) +#define UNUSED_RETURN_VALUE(X) UNUSED_VARIABLE(X) + +#endif // NORDIC_COMMON_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.c new file mode 100644 index 0000000000..d84a23935e --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.c @@ -0,0 +1,28 @@ +/* Copyright (c) 2006 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ +#include "nrf_assert.h" +#include "app_error.h" +#include "nordic_common.h" + +#if defined(DEBUG_NRF) +void assert_nrf_callback(uint16_t line_num, const uint8_t * file_name) +{ + assert_info_t assert_info = + { + .line_num = line_num, + .p_file_name = file_name, + }; + app_error_fault_handler(NRF_FAULT_ID_SDK_ASSERT, 0, (uint32_t)(&assert_info)); + + UNUSED_VARIABLE(assert_info); +} +#endif /* DEBUG_NRF */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h new file mode 100644 index 0000000000..91a6f4b251 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2006 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is confidential property of Nordic Semiconductor. The use, + * copying, transfer or disclosure of such information is prohibited except by express written + * agreement with Nordic Semiconductor. + * + */ + +/** @file + * @brief Utilities for verifying program logic + */ + +#ifndef NRF_ASSERT_H_ +#define NRF_ASSERT_H_ + +#include +#include "nrf.h" +#include "app_error.h" + +#if defined(DEBUG_NRF) || defined(DEBUG_NRF_USER) + +/** @brief Function for handling assertions. + * + * + * @note + * This function is called when an assertion has triggered. + * + * + * @post + * All hardware is put into an idle non-emitting state (in particular the radio is highly + * important to switch off since the radio might be in a state that makes it send + * packets continiously while a typical final infinit ASSERT loop is executing). + * + * + * @param line_num The line number where the assertion is called + * @param file_name Pointer to the file name + */ +void assert_nrf_callback(uint16_t line_num, const uint8_t *file_name); + +/*lint -emacro(506, ASSERT) */ /* Suppress "Constant value Boolean */ +/*lint -emacro(774, ASSERT) */ /* Suppress "Boolean within 'if' always evaluates to True" */ \ + +/** @brief Function for checking intended for production code. + * + * Check passes if "expr" evaluates to true. */ +#define ASSERT(expr) \ +if (expr) \ +{ \ +} \ +else \ +{ \ + assert_nrf_callback((uint16_t)__LINE__, (uint8_t *)__FILE__); \ +} +#else +#define ASSERT(expr) //!< Assert empty when disabled +__WEAK void assert_nrf_callback(uint16_t line_num, const uint8_t *file_name); +#endif /* defined(DEBUG_NRF) || defined(DEBUG_NRF_USER) */ + +#endif /* NRF_ASSERT_H_ */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_log.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_log.c new file mode 100644 index 0000000000..e3d1600387 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_log.c @@ -0,0 +1,425 @@ +#include "nrf.h" +#include "nrf_log.h" +#include "nrf_error.h" +#include +#include +#include + +#if defined(NRF_LOG_USES_RTT) && NRF_LOG_USES_RTT == 1 + +#include +#include + +static char buf_normal_up[BUFFER_SIZE_UP]; +static char buf_down[BUFFER_SIZE_DOWN]; + +uint32_t log_rtt_init(void) +{ + static bool initialized = false; + if (initialized) + { + return NRF_SUCCESS; + } + + if (SEGGER_RTT_ConfigUpBuffer(LOG_TERMINAL_NORMAL, + "Normal", + buf_normal_up, + BUFFER_SIZE_UP, + SEGGER_RTT_MODE_NO_BLOCK_TRIM + ) + != 0) + { + return NRF_ERROR_INVALID_STATE; + } + + if (SEGGER_RTT_ConfigDownBuffer(LOG_TERMINAL_INPUT, + "Input", + buf_down, + BUFFER_SIZE_DOWN, + SEGGER_RTT_MODE_NO_BLOCK_SKIP + ) + != 0) + { + return NRF_ERROR_INVALID_STATE; + } + + initialized = true; + + return NRF_SUCCESS; +} + +// Forward declaration of SEGGER RTT vprintf function +int SEGGER_RTT_vprintf(unsigned BufferIndex, const char * sFormat, va_list * pParamList); + +void log_rtt_printf(int terminal_index, char * format_msg, ...) +{ + //lint -save -e526 -e628 -e530 + va_list p_args; + va_start(p_args, format_msg); + (void)SEGGER_RTT_vprintf(terminal_index, format_msg, &p_args); + va_end(p_args); + //lint -restore +} + +__INLINE void log_rtt_write_string(int terminal_index, int num_args, ...) +{ + const char* msg; + //lint -save -e516 -e530 + va_list p_args; + va_start(p_args, num_args); + //lint -restore + + for (int i = 0; i < num_args; i++) + { + //lint -save -e26 -e10 -e64 -e526 -e628 -e530 + msg = va_arg(p_args, const char*); + //lint -restore + (void)SEGGER_RTT_WriteString(terminal_index, msg); + } + va_end(p_args); +} + +void log_rtt_write_hex(int terminal_index, uint32_t value) +{ + char temp[11]; + temp[0] = '0'; + temp[1] = 'x'; + temp[10] = 0; // Null termination + uint8_t nibble; + uint8_t i = 8; + + while(i-- != 0) + { + nibble = (value >> (4 * i)) & 0x0F; + temp[9-i] = (nibble > 9) ? ('A' + nibble - 10) : ('0' + nibble); + } + + (void)SEGGER_RTT_WriteString(terminal_index, temp); +} + +void log_rtt_write_hex_char(int terminal_index, uint8_t value) +{ + char temp[3]; + temp[2] = 0; // Null termination + uint8_t nibble; + uint8_t i = 2; + + while(i-- != 0) + { + nibble = (value >> (4 * i)) & 0x0F; + temp[1-i] = (nibble > 9) ? ('A' + nibble - 10) : ('0' + nibble); + } + + (void)SEGGER_RTT_WriteString(terminal_index, temp); +} + +__INLINE int log_rtt_has_input() +{ + return SEGGER_RTT_HasKey(); +} + +uint32_t log_rtt_read_input(char * c) +{ + int r; + + r = SEGGER_RTT_Read(LOG_TERMINAL_INPUT, c, 1); + if (r == 1) + return NRF_SUCCESS; + else + return NRF_ERROR_NULL; +} + +#elif defined(NRF_LOG_USES_UART) && NRF_LOG_USES_UART == 1 + +#include "app_uart.h" +#include "app_error.h" +#include +#include +#include "nrf.h" +#include "bsp.h" + +#define MAX_TEST_DATA_BYTES (15U) /**< max number of test bytes to be used for tx and rx. */ +#define UART_TX_BUF_SIZE 512 /**< UART TX buffer size. */ +#define UART_RX_BUF_SIZE 1 /**< UART RX buffer size. */ + +static uint8_t m_uart_data; +static bool m_uart_has_input; + +void uart_error_cb(app_uart_evt_t * p_event) +{ + if (p_event->evt_type == APP_UART_COMMUNICATION_ERROR) + { + APP_ERROR_HANDLER(p_event->data.error_communication); + } + else if (p_event->evt_type == APP_UART_FIFO_ERROR) + { + APP_ERROR_HANDLER(p_event->data.error_code); + } +} + +uint32_t log_uart_init() +{ + static bool initialized = false; + if (initialized) + { + return NRF_SUCCESS; + } + + uint32_t err_code; + const app_uart_comm_params_t comm_params = + { + RX_PIN_NUMBER, + TX_PIN_NUMBER, + RTS_PIN_NUMBER, + CTS_PIN_NUMBER, + APP_UART_FLOW_CONTROL_ENABLED, + false, + UART_BAUDRATE_BAUDRATE_Baud115200 + }; + + APP_UART_FIFO_INIT(&comm_params, + UART_RX_BUF_SIZE, + UART_TX_BUF_SIZE, + uart_error_cb, + APP_IRQ_PRIORITY_LOW, + err_code); + + initialized = true; + + return err_code; +} + +//lint -save -e530 -e64 +void log_uart_printf(const char * format_msg, ...) +{ + va_list p_args; + va_start(p_args, format_msg); + (void)vprintf(format_msg, p_args); + va_end(p_args); +} + +__INLINE void log_uart_write_string_many(int num_args, ...) +{ + const char* msg; + va_list p_args; + va_start(p_args, num_args); + + for (int i = 0; i < num_args; i++) + { + msg = va_arg(p_args, const char*); + log_uart_write_string(msg); + } + va_end(p_args); +} + +__INLINE void log_uart_write_string(const char* msg) +{ + while( *msg ) + { + (void)app_uart_put(*msg++); + } +} +//lint -restore + +void log_uart_write_hex(uint32_t value) +{ + uint8_t nibble; + uint8_t i = 8; + + (void)app_uart_put('0'); + (void)app_uart_put('x'); + while( i-- != 0 ) + { + nibble = (value >> (4 * i)) & 0x0F; + (void)app_uart_put( (nibble > 9) ? ('A' + nibble - 10) : ('0' + nibble) ); + } +} + +void log_uart_write_hex_char(uint8_t c) +{ + uint8_t nibble; + uint8_t i = 2; + + while( i-- != 0 ) + { + nibble = (c >> (4 * i)) & 0x0F; + (void)app_uart_put( (nibble > 9) ? ('A' + nibble - 10) : ('0' + nibble) ); + } +} + +__INLINE int log_uart_has_input() +{ + if (m_uart_has_input) return 1; + if (app_uart_get(&m_uart_data) == NRF_SUCCESS) + { + m_uart_has_input = true; + return 1; + } + return 0; +} + +uint32_t log_uart_read_input(char * c) +{ + if (m_uart_has_input) + { + *c = (char)m_uart_data; + m_uart_has_input = false; + return NRF_SUCCESS; + } + if (app_uart_get((uint8_t *)c) == NRF_SUCCESS) + { + return NRF_SUCCESS; + } + return NRF_ERROR_NULL; +} + +#elif defined(NRF_LOG_USES_RAW_UART) && NRF_LOG_USES_RAW_UART == 1 + +#include "app_uart.h" +#include +#include +#include "bsp.h" + +uint32_t log_raw_uart_init() +{ + // Disable UART + NRF_UART0->ENABLE = UART_ENABLE_ENABLE_Disabled; + + // Configure RX/TX pins + nrf_gpio_cfg_output( TX_PIN_NUMBER ); + nrf_gpio_cfg_input(RX_PIN_NUMBER, NRF_GPIO_PIN_NOPULL); + + // Set a default baud rate of UART0_CONFIG_BAUDRATE + NRF_UART0->PSELTXD = TX_PIN_NUMBER; + NRF_UART0->BAUDRATE = UART0_CONFIG_BAUDRATE; + + NRF_UART0->PSELRTS = 0xFFFFFFFF; + NRF_UART0->PSELCTS = 0xFFFFFFFF; + + // Disable parity and interrupt + NRF_UART0->CONFIG = (UART_CONFIG_PARITY_Excluded << UART_CONFIG_PARITY_Pos ); + NRF_UART0->CONFIG |= (UART_CONFIG_HWFC_Disabled << UART_CONFIG_HWFC_Pos ); + + // Re-enable the UART + NRF_UART0->ENABLE = UART_ENABLE_ENABLE_Enabled; + NRF_UART0->INTENSET = 0; + NRF_UART0->TASKS_STARTTX = 1; + NRF_UART0->TASKS_STARTRX = 1; + + return NRF_SUCCESS; +} + +void log_raw_uart_printf(const char * format_msg, ...) +{ + static char buffer[256]; + + va_list p_args; + va_start(p_args, format_msg); + sprintf(buffer, format_msg, p_args); + va_end(p_args); + + log_raw_uart_write_string(buffer); +} + +__INLINE void log_raw_uart_write_char(const char c) +{ + NRF_UART0->TXD = c; + while( NRF_UART0->EVENTS_TXDRDY != 1 ); + NRF_UART0->EVENTS_TXDRDY = 0; +} + +__INLINE void log_raw_uart_write_string_many(int num_args, ...) +{ + + const char* msg; + va_list p_args; + va_start(p_args, num_args); + + for (int i = 0; i < num_args; i++) + { + msg = va_arg(p_args, const char*); + log_raw_uart_write_string(msg); + } + va_end(p_args); +} + +__INLINE void log_raw_uart_write_string(const char* msg) +{ + while( *msg ) + { + NRF_UART0->TXD = *msg++; + while( NRF_UART0->EVENTS_TXDRDY != 1 ); + NRF_UART0->EVENTS_TXDRDY = 0; + } +} + +void log_raw_uart_write_hex(uint32_t value) +{ + uint8_t nibble; + uint8_t i = 8; + + log_raw_uart_write_string( "0x" ); + while( i-- != 0 ) + { + nibble = (value >> (4 * i)) & 0x0F; + log_raw_uart_write_char( (nibble > 9) ? ('A' + nibble - 10) : ('0' + nibble) ); + } +} + +void log_raw_uart_write_hex_char(uint8_t c) +{ + uint8_t nibble; + uint8_t i = 2; + + while( i-- != 0 ) + { + nibble = (c >> (4 * i)) & 0x0F; + log_raw_uart_write_hex( (nibble > 9) ? ('A' + nibble - 10) : ('0' + nibble) ); + } +} + +__INLINE int log_raw_uart_has_input() +{ + return 0; +} + +uint32_t log_raw_uart_read_input(char * c) +{ + return NRF_ERROR_NULL; +} + +#endif // NRF_LOG_USES_RAW_UART == 1 + + +const char* log_hex_char(const char c) +{ + static volatile char hex_string[3]; + hex_string[2] = 0; // Null termination + uint8_t nibble; + uint8_t i = 2; + while(i-- != 0) + { + nibble = (c >> (4 * i)) & 0x0F; + hex_string[1-i] = (nibble > 9) ? ('A' + nibble - 10) : ('0' + nibble); + } + return (const char*) hex_string; +} + +const char* log_hex(uint32_t value) +{ + static volatile char hex_string[11]; + hex_string[0] = '0'; + hex_string[1] = 'x'; + hex_string[10] = 0; + uint8_t nibble; + uint8_t i = 8; + + while(i-- != 0) + { + nibble = (value >> (4 * i)) & 0x0F; + hex_string[9-i] = (nibble > 9) ? ('A' + nibble - 10) : ('0' + nibble); + } + + return (const char*)hex_string; +} + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_log.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_log.h new file mode 100644 index 0000000000..2019e81b3b --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_log.h @@ -0,0 +1,699 @@ +#ifndef NRF_LOG_H_ +#define NRF_LOG_H_ + +#ifndef DOXYGEN + +#include +#include +#include + +#ifndef NRF_LOG_USES_RTT +#define NRF_LOG_USES_RTT 0 +#endif + +#ifndef NRF_LOG_USES_UART +#define NRF_LOG_USES_UART 0 +#endif + +#ifndef NRF_LOG_USES_RAW_UART +#define NRF_LOG_USES_RAW_UART 0 +#endif + +#ifndef NRF_LOG_USES_COLORS + #define NRF_LOG_USES_COLORS 1 +#endif + +#if NRF_LOG_USES_COLORS == 1 + #define NRF_LOG_COLOR_DEFAULT "\x1B[0m" + #define NRF_LOG_COLOR_BLACK "\x1B[1;30m" + #define NRF_LOG_COLOR_RED "\x1B[1;31m" + #define NRF_LOG_COLOR_GREEN "\x1B[1;32m" + #define NRF_LOG_COLOR_YELLOW "\x1B[1;33m" + #define NRF_LOG_COLOR_BLUE "\x1B[1;34m" + #define NRF_LOG_COLOR_MAGENTA "\x1B[1;35m" + #define NRF_LOG_COLOR_CYAN "\x1B[1;36m" + #define NRF_LOG_COLOR_WHITE "\x1B[1;37m" +#else + #define NRF_LOG_COLOR_DEFAULT + #define NRF_LOG_COLOR_BLACK + #define NRF_LOG_COLOR_RED + #define NRF_LOG_COLOR_GREEN + #define NRF_LOG_COLOR_YELLOW + #define NRF_LOG_COLOR_BLUE + #define NRF_LOG_COLOR_MAGENTA + #define NRF_LOG_COLOR_CYAN + #define NRF_LOG_COLOR_WHITE +#endif + +#if defined(NRF_LOG_USES_RTT) && NRF_LOG_USES_RTT == 1 + +#define LOG_TERMINAL_NORMAL (0) +#define LOG_TERMINAL_ERROR (1) +#define LOG_TERMINAL_INPUT (0) + +/**@brief Function for initializing the SEGGER RTT logger. + * + * @details See segger.com + * for information about SEGGER Real Time Transfer (RTT). + * + * This function is available only when NRF_LOG_USES_RTT is defined as 1. + * + * @note Do not call this function directly. Use the macro @ref NRF_LOG_INIT instead. + * + * @retval NRF_SUCCESS If initialization was successful. + * @retval NRF_ERROR Otherwise. + */ +uint32_t log_rtt_init(void); + +/**@brief Function for writing a printf string using RTT. + * + * @details The printf implementation in SEGGER's RTT is more efficient than + * the standard implementation. However, printf requires more processor time + * than other logging functions. Therefore, applications that require logging + * but need it to interfere as little as possible with the execution, should + * avoid using printf. + * + * This function is available only when NRF_LOG_USES_RTT is defined as 1. + * + * @note Do not call this function directly. Use one of the following macros instead: + * - @ref NRF_LOG_PRINTF + * - @ref NRF_LOG_PRINTF_DEBUG + * - @ref NRF_LOG_PRINTF_ERROR + * + * @param terminal_index Segger RTT terminal index to use as output. + * @param format_msg Printf format string. + */ +void log_rtt_printf(int terminal_index, char * format_msg, ...); + +/**@brief Function for writing a string using RTT. + * + * @details The string to write must be null-terminated, but the null termination will not be stored + * in the ring buffer. + * The impact of running this function should be very low compared to writing to UART. + * + * This function is available only when NRF_LOG_USES_RTT is defined as 1. + * + * @note Do not call this function directly. Use one of the following macros instead: + * - @ref NRF_LOG + * - @ref NRF_LOG_DEBUG + * - @ref NRF_LOG_ERROR + * + * @param terminal_index Segger RTT terminal index to use as output. + * @param num_args Number of arguments. + */ +void log_rtt_write_string(int terminal_index, int num_args, ...); + +/**@brief Function for writing an integer as HEX using RTT. + * + * The output data is formatted as, for example, 0x89ABCDEF. + * + * This function is available only when NRF_LOG_USES_RTT is defined as 1. + * + * @note Do not call this function directly. Use one of the following macros instead: + * - @ref NRF_LOG_HEX + * - @ref NRF_LOG_HEX_DEBUG + * - @ref NRF_LOG_HEX_ERROR + * + * @param terminal_index Segger RTT terminal index to use as output. + * @param value Integer value to be printed as HEX. + */ +void log_rtt_write_hex(int terminal_index, uint32_t value); + +/**@brief Function for writing a single character as HEX using RTT. + * + * The output string is formatted as, for example, AA. + * + * This function is available only when NRF_LOG_USES_RTT is defined as 1. + * + * @note Do not call this function directly. Use one of the following macros instead: + * - @ref NRF_LOG_HEX_CHAR + * - @ref NRF_LOG_HEX_CHAR_DEBUG + * - @ref NRF_LOG_HEX_CHAR_ERROR + * + * @param terminal_index Segger RTT terminal index to use as output. + * @param value Character to print as HEX. + */ +void log_rtt_write_hex_char(int terminal_index, uint8_t value); + +/**@brief Function for checking if data is available in the input buffer. + * + * This function is available only when NRF_LOG_USES_RTT is defined as 1. + * + * @note Do not call this function directly. Use @ref NRF_LOG_HAS_INPUT instead. + * + * @retval 1 If characters are available to read. + * @retval 0 If no characters are available. + */ +int log_rtt_has_input(void); + +/**@brief Function for reading one character from the input buffer. + * + * @param[out] p_char Pointer where to store the character. + * + * This function is available only when NRF_LOG_USES_RTT is defined as 1. + * + * @note Do not call this function directly. Use @ref NRF_LOG_READ_INPUT instead. + * + * @retval NRF_SUCCESS If the character was read out. + * @retval NRF_ERROR_INVALID_DATA If no character could be read. + */ +uint32_t log_rtt_read_input(char* p_char); + +#define NRF_LOG_INIT() log_rtt_init() /*!< Initialize the module. */ + +#define NRF_LOG_PRINTF(...) log_rtt_printf(LOG_TERMINAL_NORMAL, ##__VA_ARGS__) /*!< Print a log message using printf. */ +#define NRF_LOG_PRINTF_DEBUG(...) log_rtt_printf(LOG_TERMINAL_NORMAL, ##__VA_ARGS__) /*!< If DEBUG is set, print a log message using printf. */ +#define NRF_LOG_PRINTF_ERROR(...) log_rtt_printf(LOG_TERMINAL_ERROR, ##__VA_ARGS__) /*!< Print a log message using printf to the error stream. */ + +#define NRF_LOG(...) log_rtt_write_string(LOG_TERMINAL_NORMAL, NUM_VA_ARGS(__VA_ARGS__), ##__VA_ARGS__) /*!< Print a log message. The input string must be null-terminated. */ +#define NRF_LOG_DEBUG(...) log_rtt_write_string(LOG_TERMINAL_NORMAL, NUM_VA_ARGS(__VA_ARGS__), ##__VA_ARGS__) /*!< If DEBUG is set, print a log message. The input string must be null-terminated. */ +#define NRF_LOG_ERROR(...) log_rtt_write_string(LOG_TERMINAL_ERROR, NUM_VA_ARGS(__VA_ARGS__), ##__VA_ARGS__) /*!< Print a log message to the error stream. The input string must be null-terminated. */ + +#define NRF_LOG_HEX(val) log_rtt_write_hex(LOG_TERMINAL_NORMAL, val) /*!< Log an integer as HEX value (example output: 0x89ABCDEF). */ +#define NRF_LOG_HEX_DEBUG(val) log_rtt_write_hex(LOG_TERMINAL_NORMAL, val) /*!< If DEBUG is set, log an integer as HEX value (example output: 0x89ABCDEF). */ +#define NRF_LOG_HEX_ERROR(val) log_rtt_write_hex(LOG_TERMINAL_ERROR, val) /*!< Log an integer as HEX value to the error stream (example output: 0x89ABCDEF). */ + +#define NRF_LOG_HEX_CHAR(val) log_rtt_write_hex_char(LOG_TERMINAL_NORMAL, val) /*!< Log a character as HEX value (example output: AA). */ +#define NRF_LOG_HEX_CHAR_DEBUG(val) log_rtt_write_hex_char(LOG_TERMINAL_NORMAL, val) /*!< If DEBUG is set, log a character as HEX value (example output: AA). */ +#define NRF_LOG_HEX_CHAR_ERROR(val) log_rtt_write_hex_char(LOG_TERMINAL_ERROR, val) /*!< Log a character as HEX value to the error stream (example output: AA). */ + +#define NRF_LOG_HAS_INPUT() log_rtt_has_input() /*!< Check if the input buffer has unconsumed characters. */ +#define NRF_LOG_READ_INPUT(p_char) log_rtt_read_input(p_char) /*!< Consume a character from the input buffer. */ + +#if !defined(DEBUG) && !defined(DOXYGEN) + +#undef NRF_LOG_DEBUG +#define NRF_LOG_DEBUG(...) + +#undef NRF_LOG_STR_DEBUG +#define NRF_LOG_STR_DEBUG(...) + +#undef NRF_LOG_HEX_DEBUG +#define NRF_LOG_HEX_DEBUG(...) + +#undef NRF_LOG_HEX_CHAR_DEBUG +#define NRF_LOG_HEX_CHAR_DEBUG(...) + +#endif // !defined(DEBUG) && !defined(DOXYGEN) + +#elif defined(NRF_LOG_USES_UART) && NRF_LOG_USES_UART == 1 + +/**@brief Function for initializing the UART logger. + * + * This function is available only when NRF_LOG_USES_UART is defined as 1. + * + * @note Do not call this function directly. Use the macro @ref NRF_LOG_INIT instead. + * + * @retval NRF_SUCCESS If initialization was successful. + * @retval NRF_ERROR Otherwise. + */ +uint32_t log_uart_init(void); + +/**@brief Function for logging a printf string to UART. + * + * @details Printf requires more processor time + * than other logging functions. Therefore, applications that require logging + * but need it to interfere as little as possible with the execution, should + * avoid using printf. + * + * This function is available only when NRF_LOG_USES_UART is defined as 1. + * + * @note This function is non-blocking. If too much data is sent to the UART, + * some characters might be skipped. + * + * @note Do not call this function directly. Use one of the following macros instead: + * - @ref NRF_LOG_PRINTF + * - @ref NRF_LOG_PRINTF_DEBUG + * - @ref NRF_LOG_PRINTF_ERROR + * + * @param format_msg Printf format string. + */ +void log_uart_printf(const char * format_msg, ...); + +/**@brief Function for logging a single character to UART. + * + * This function is available only when NRF_LOG_USES_UART is defined as 1. + * + * @param c Character. + */ +void log_uart_write_char(const char c); + +/**@brief Function for logging null-terminated strings to UART. + * + * @details This function is more efficient than using printf. + * The null termination will not be logged. + * + * This function is available only when NRF_LOG_USES_UART is defined as 1. + * + * @note Do not call this function directly. Use one of the following macros instead: + * - @ref NRF_LOG + * - @ref NRF_LOG_DEBUG + * - @ref NRF_LOG_ERROR + * + * @param num_args Number of arguments. + */ +void log_uart_write_string_many(int num_args, ...); + + +/**@brief Function for logging a null-terminated string to UART. + * + * @details This function is more efficient than using printf. + * The null termination will not be logged. + * + * This function is available only when NRF_LOG_USES_UART is defined as 1. + * + * @note Do not call this function directly. Use one of the following macros instead: + * - @ref NRF_LOG + * - @ref NRF_LOG_DEBUG + * - @ref NRF_LOG_ERROR + * + * @param msg Null-terminated string. + */ +void log_uart_write_string(const char* msg); + + +/**@brief Function for logging an integer value as HEX to UART. + * + * @details The output data is formatted as, for example, 0x89ABCDEF. + * This function is more efficient than printf. + * + * This function is available only when NRF_LOG_USES_UART is defined as 1. + * + * @note This function is non-blocking. If too much data is sent to the UART, + * some characters might be skipped. + * + * @note Do not call this function directly. Use one of the following macros instead: + * - @ref NRF_LOG_HEX + * - @ref NRF_LOG_HEX_DEBUG + * - @ref NRF_LOG_HEX_ERROR + * + * @param value Integer value to be printed as HEX. + */ +void log_uart_write_hex(uint32_t value); + +/**@brief Function for logging a single character as HEX to UART. + * + * @details The output string is formatted as, for example, AA. + * + * This function is available only when NRF_LOG_USES_UART is defined as 1. + * + * @note This function is non-blocking. If too much data is sent to the UART, + * some characters might be skipped. + * + * @note Do not call this function directly. Use one of the following macros instead: + * - @ref NRF_LOG_HEX_CHAR + * - @ref NRF_LOG_HEX_CHAR_DEBUG + * - @ref NRF_LOG_HEX_CHAR_ERROR + * + * @param c Character. + */ +void log_uart_write_hex_char(uint8_t c); + +/**@brief Function for checking if data is available in the input buffer. + * + * This function is available only when NRF_LOG_USES_UART is defined as 1. + * + * @note Do not call this function directly. Use @ref NRF_LOG_HAS_INPUT instead. + * + * @retval 1 If characters are available to read. + * @retval 0 If no characters are available. + */ +int log_uart_has_input(void); + +/**@brief Function for reading one character from the input buffer. + * + * @param[out] p_char Pointer where to store the character. + * + * This function is available only when NRF_LOG_USES_UART is defined as 1. + * + * @note Do not call this function directly. Use NRF_LOG_READ_INPUT instead. + * + * @retval NRF_SUCCESS If the character was read out. + * @retval NRF_ERROR_INVALID_DATA If no character could be read. + */ +uint32_t log_uart_read_input(char* p_char); + + +#define NRF_LOG_INIT() log_uart_init() /*!< Initialize the module. */ + +#define NRF_LOG_PRINTF(...) log_uart_printf(__VA_ARGS__) /*!< Print a log message using printf. */ +#define NRF_LOG_PRINTF_DEBUG(...) log_uart_printf(__VA_ARGS__) /*!< If DEBUG is set, print a log message using printf. */ +#define NRF_LOG_PRINTF_ERROR(...) log_uart_printf(__VA_ARGS__) /*!< Print a log message using printf to the error stream. */ + +#define NRF_LOG(...) log_uart_write_string_many(NUM_VA_ARGS(__VA_ARGS__), ##__VA_ARGS__) /*!< Print a log message. The input string must be null-terminated. */ +#define NRF_LOG_DEBUG(...) log_uart_write_string_many(NUM_VA_ARGS(__VA_ARGS__), ##__VA_ARGS__) /*!< If DEBUG is set, print a log message. The input string must be null-terminated. */ +#define NRF_LOG_ERROR(...) log_uart_write_string_many(NUM_VA_ARGS(__VA_ARGS__), ##__VA_ARGS__) /*!< Print a log message to the error stream. The input string must be null-terminated. */ + +#define NRF_LOG_HEX(val) log_uart_write_hex(val) /*!< Log an integer as HEX value (example output: 0x89ABCDEF). */ +#define NRF_LOG_HEX_DEBUG(val) log_uart_write_hex(val) /*!< If DEBUG is set, log an integer as HEX value (example output: 0x89ABCDEF). */ +#define NRF_LOG_HEX_ERROR(val) log_uart_write_hex(val) /*!< Log an integer as HEX value to the error stream (example output: 0x89ABCDEF). */ + +#define NRF_LOG_HEX_CHAR(val) log_uart_write_hex_char(val) /*!< Log a character as HEX value (example output: AA). */ +#define NRF_LOG_HEX_CHAR_DEBUG(val) log_uart_write_hex_char(val) /*!< If DEBUG is set, log a character as HEX value (example output: AA). */ +#define NRF_LOG_HEX_CHAR_ERROR(val) log_uart_write_hex_char(val) /*!< Log a character as HEX value to the error stream (example output: AA). */ + +#define NRF_LOG_HAS_INPUT() log_uart_has_input() /*!< Check if the input buffer has unconsumed characters. */ +#define NRF_LOG_READ_INPUT(p_char) log_uart_read_input(p_char) /*!< Consume a character from the input buffer. */ + +#if !defined(DEBUG) && !defined(DOXYGEN) + +#undef NRF_LOG_DEBUG +#define NRF_LOG_DEBUG(...) + +#undef NRF_LOG_PRINTF_DEBUG +#define NRF_LOG_PRINTF_DEBUG(...) + +#undef NRF_LOG_STR_DEBUG +#define NRF_LOG_STR_DEBUG(...) + +#undef NRF_LOG_HEX_DEBUG +#define NRF_LOG_HEX_DEBUG(...) + +#undef NRF_LOG_HEX_CHAR_DEBUG +#define NRF_LOG_HEX_CHAR_DEBUG(...) + +#endif // !defined(DEBUG) && !defined(DOXYGEN) + +#elif defined(NRF_LOG_USES_RAW_UART) && NRF_LOG_USES_RAW_UART == 1 + +/**@brief Function for initializing the raw UART logger. + * + * This function is available only when NRF_LOG_USES_RAW_UART is defined as 1. + * + * @note Do not call this function directly. Use the macro @ref NRF_LOG_INIT instead. + * + * @retval NRF_SUCCESS If initialization was successful. + * @retval NRF_ERROR Otherwise. + */ +uint32_t log_raw_uart_init(void); + +/**@brief Function for logging a printf string to raw UART. + * + * @details Printf requires more processor time + * than other logging functions. Therefore, applications that require logging + * but need it to interfere as little as possible with the execution, should + * avoid using printf. + * + * This function is available only when NRF_LOG_USES_RAW_UART is defined as 1. + * + * @note This function is non-blocking. If too much data is sent to the UART, + * some characters might be skipped. + * + * @note Do not call this function directly. Use one of the following macros instead: + * - @ref NRF_LOG_PRINTF + * - @ref NRF_LOG_PRINTF_DEBUG + * - @ref NRF_LOG_PRINTF_ERROR + * + * @param format_msg Printf format string. + */ +void log_raw_uart_printf(const char * format_msg, ...); + +/**@brief Function for logging a single character to raw UART. + * + * This function is available only when NRF_LOG_USES_RAW_UART is defined as 1. + * + * @param c Character. + */ +void log_raw_uart_write_char(const char c); + +/**@brief Function for logging null-terminated strings to raw UART. + * + * @details This function is more efficient than using printf. + * The null termination will not be logged. + * + * This function is available only when NRF_LOG_USES_RAW_UART is defined as 1. + * + * @note Do not call this function directly. Use one of the following macros instead: + * - @ref NRF_LOG + * - @ref NRF_LOG_DEBUG + * - @ref NRF_LOG_ERROR + * + * @param num_args Number of arguments. + */ +void log_raw_uart_write_string_many(int num_args, ...); + + +/**@brief Function for logging a null-terminated string to raw UART. + * + * @details This function is more efficient than using printf. + * The null termination will not be logged. + * + * This function is available only when NRF_LOG_USES_RAW_UART is defined as 1. + * + * @note Do not call this function directly. Use one of the following macros instead: + * - @ref NRF_LOG + * - @ref NRF_LOG_DEBUG + * - @ref NRF_LOG_ERROR + * + * @param str Null-terminated string. + */ +void log_raw_uart_write_string(const char * str); + +/**@brief Function for logging an integer value as HEX to raw UART. + * + * @details The output data is formatted as, for example, 0x89ABCDEF. + * This function is more efficient than printf. + * + * This function is available only when NRF_LOG_USES_RAW_UART is defined as 1. + * + * @note This function is non-blocking. If too much data is sent to the UART, + * some characters might be skipped. + * + * @note Do not call this function directly. Use one of the following macros instead: + * - @ref NRF_LOG_HEX + * - @ref NRF_LOG_HEX_DEBUG + * - @ref NRF_LOG_HEX_ERROR + * + * @param value Integer value to be printed as HEX. + */ +void log_raw_uart_write_hex(uint32_t value); + +/**@brief Function for logging a single character as HEX to raw UART. + * + * @details The output string is formatted as, for example, AA. + * + * This function is available only when NRF_LOG_USES_RAW_UART is defined as 1. + * + * @note This function is non-blocking. If too much data is sent to the UART, + * some characters might be skipped. + * + * @note Do not call this function directly. Use one of the following macros instead: + * - @ref NRF_LOG_HEX_CHAR + * - @ref NRF_LOG_HEX_CHAR_DEBUG + * - @ref NRF_LOG_HEX_CHAR_ERROR + * + * @param c Character. + */ +void log_raw_uart_write_hex_char(uint8_t c); + +/**@brief Function for checking if data is available in the input buffer. + * + * This function is available only when NRF_LOG_USES_RAW_UART is defined as 1. + * + * @note Do not call this function directly. Use @ref NRF_LOG_HAS_INPUT instead. + * + * @retval 1 If characters are available to read. + * @retval 0 If no characters are available. + */ +int log_raw_uart_has_input(void); + +/**@brief Function for reading one character from the input buffer. + * + * @param[out] p_char Pointer where to store the character. + * + * This function is available only when NRF_LOG_USES_RAW_UART is defined as 1. + * + * @note Do not call this function directly. Use NRF_LOG_READ_INPUT instead. + * + * @retval NRF_SUCCESS If the character was read out. + * @retval NRF_ERROR_INVALID_DATA If no character could be read. + */ + +uint32_t log_raw_uart_read_input(char* p_char); + +#define NRF_LOG_INIT() log_raw_uart_init() /*!< nitialize the module. */ + +#define NRF_LOG_PRINTF(...) log_raw_uart_printf(__VA_ARGS__) /*!< Print a log message using printf. */ +#define NRF_LOG_PRINTF_DEBUG(...) log_raw_uart_printf(__VA_ARGS__) /*!< If DEBUG is set, print a log message using printf. */ +#define NRF_LOG_PRINTF_ERROR(...) log_raw_uart_printf(__VA_ARGS__) /*!< Print a log message using printf to the error stream. */ + +#define NRF_LOG(...) log_raw_uart_write_string_many(NUM_VA_ARGS(__VA_ARGS__), ##__VA_ARGS__) /*!< Print a log message. The input string must be null-terminated. */ +#define NRF_LOG_DEBUG(...) log_raw_uart_write_string_many(NUM_VA_ARGS(__VA_ARGS__), ##__VA_ARGS__) /*!< If DEBUG is set, print a log message. The input string must be null-terminated. */ +#define NRF_LOG_ERROR(...) log_raw_uart_write_string_many(NUM_VA_ARGS(__VA_ARGS__), ##__VA_ARGS__) /*!< Print a log message to the error stream. The input string must be null-terminated. */ + +#define NRF_LOG_HEX(val) log_raw_uart_write_hex(val) /*!< Log an integer as HEX value (example output: 0x89ABCDEF). */ +#define NRF_LOG_HEX_DEBUG(val) log_raw_uart_write_hex(val) /*!< If DEBUG is set, log an integer as HEX value (example output: 0x89ABCDEF). */ +#define NRF_LOG_HEX_ERROR(val) log_raw_uart_write_hex(val) /*!< Log an integer as HEX value to the error stream (example output: 0x89ABCDEF). */ + +#define NRF_LOG_HEX_CHAR(val) log_raw_uart_write_hex_char(val) /*!< Log a character as HEX value (example output: AA). */ +#define NRF_LOG_HEX_CHAR_DEBUG(val) log_raw_uart_write_hex_char(val) /*!< If DEBUG is set, log a character as HEX value (example output: AA). */ +#define NRF_LOG_HEX_CHAR_ERROR(val) log_raw_uart_write_hex_char(val) /*!< Log a character as HEX value to the error stream (example output: AA). */ + +#define NRF_LOG_HAS_INPUT() log_raw_uart_has_input() /*!< Check if the input buffer has unconsumed characters. */ +#define NRF_LOG_READ_INPUT(p_char) log_raw_uart_read_input(p_char) /*!< Consume a character from the input buffer. */ + +#if !defined(DEBUG) && !defined(DOXYGEN) + +#undef NRF_LOG_DEBUG +#define NRF_LOG_DEBUG(...) + +#undef NRF_LOG_PRINTF_DEBUG +#define NRF_LOG_PRINTF_DEBUG(...) + +#undef NRF_LOG_STR_DEBUG +#define NRF_LOG_STR_DEBUG(...) + +#undef NRF_LOG_HEX_DEBUG +#define NRF_LOG_HEX_DEBUG(...) + +#undef NRF_LOG_HEX_CHAR_DEBUG +#define NRF_LOG_HEX_CHAR_DEBUG(...) + +#endif // !defined(DEBUG) && !defined(DOXYGEN) + +#else + +#include "nrf_error.h" +#include "nordic_common.h" + +// Empty definitions + +#define NRF_LOG_INIT() NRF_SUCCESS +#define NRF_LOG(...) +#define NRF_LOG_DEBUG(...) +#define NRF_LOG_ERROR(...) + +#define NRF_LOG_PRINTF(...) +#define NRF_LOG_PRINTF_DEBUG(...) +#define NRF_LOG_PRINTF_ERROR(...) + +#define NRF_LOG_HEX(val) +#define NRF_LOG_HEX_DEBUG(val) +#define NRF_LOG_HEX_ERROR(val) + +#define NRF_LOG_HEX_CHAR(val) +#define NRF_LOG_HEX_CHAR_DEBUG(val) +#define NRF_LOG_HEX_CHAR_ERROR(val) + +#define NRF_LOG_HAS_INPUT() 0 +#define NRF_LOG_READ_INPUT(ignore) NRF_SUCCESS + +#endif + +/**@brief Function for writing HEX values. + * + * @note This function not thread-safe. It is written for convenience. + * If you log from different application contexts, you might get different results. + * + * @retval NULL By default. + */ +const char* log_hex(uint32_t value); + +/**@brief Function for writing HEX characters. + * + * @note This function not thread-safe. It is written for convenience. + * If you log from different application contexts, you might get different results. + * + * @retval NULL By default. + */ +const char* log_hex_char(const char value); + + + + +#else // DOXYGEN + +/** @defgroup nrf_log UART/RTT logging + * @{ + * @ingroup app_common + * + * @brief Library to output logging information over SEGGER's Real Time Transfer + * (RTT), UART, or raw UART. + * + * This library provides macros that call the respective functions depending on + * which protocol is used. Define LOG_USES_RTT=1 to enable logging over RTT, + * NRF_LOG_USES_UART=1 to enable logging over UART, or NRF_LOG_USES_RAW_UART=1 + * to enable logging over raw UART. One of these defines must be set for any of + * the macros to have effect. If you choose to not output information, all + * logging macros can be left in the code without any cost; they will just be + * ignored. + */ + + + +/**@brief Macro for initializing the logger. + * + * @retval NRF_SUCCESS If initialization was successful. + * @retval NRF_ERROR Otherwise. + */ +uint32_t NRF_LOG_INIT(void); + +/**@brief Macro for logging null-terminated strings. + * + * @details This function is more efficient than using printf. + * The null termination will not be logged. + * + * @param msg Null-terminated string. + */ +void NRF_LOG(const char* msg); + +/**@brief Macro for logging a printf string. + * + * @details Printf requires more processor time + * than other logging functions. Therefore, applications that require logging + * but need it to interfere as little as possible with the execution, should + * avoid using printf. + * + * @note When NRF_LOG_USES_UART is set to 1, this macro is non-blocking. + * If too much data is sent, some characters might be skipped. + * + * @param format_msg Printf format string. + * @param ... Additional arguments replacing format specifiers in format_msg. + */ +void NRF_LOG_PRINTF(const char * format_msg, ...); + +/**@brief Macro for logging an integer value as HEX. + * + * @details The output data is formatted as, for example, 0x89ABCDEF. + * This function is more efficient than printf. + * + * @note When NRF_LOG_USES_UART is set to 1, this macro is non-blocking. + * If too much data is sent, some characters might be skipped. + * + * @param value Integer value to be printed as HEX. + */ +void NRF_LOG_HEX(uint32_t value); + +/**@brief Macro for logging a single character as HEX. + * + * @details The output string is formatted as, for example, AA. + * + * @note When NRF_LOG_USES_UART is set to 1, this macro is non-blocking. + * If too much data is sent, some characters might be skipped. + * + * @param c Character. + */ +void NRF_LOG_HEX_CHAR(uint8_t c); + +/**@brief Macro for checking if data is available in the input buffer. + * + * @note When NRF_LOG_USES_UART is set to 1, this macro is non-blocking. + * If too much data is sent, some characters might be skipped. + * + * @retval 1 If characters are available to read. + * @retval 0 If no characters are available. + */ +int NRF_LOG_HAS_INPUT(void); + +/**@brief Macro for reading one character from the input buffer. + * + * @param[out] p_char Pointer where to store the character. + * + * @retval NRF_SUCCESS If the character was read out. + * @retval NRF_ERROR_INVALID_DATA If no character could be read. + */ +uint32_t NRF_LOG_READ_INPUT(char* p_char); + +/** @} */ +#endif // DOXYGEN +#endif // NRF_LOG_H_ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_common.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_common.h new file mode 100644 index 0000000000..2aa3e69f90 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_common.h @@ -0,0 +1,174 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @cond */ +/**@file + * + * @ingroup experimental_api + * @defgroup sdk_common SDK Common Header + * @breif All common headers needed for SDK examples will be included here so that application + * developer does not have to include headers on him/herself. + * @{ + */ + +#ifndef SDK_COMMON_H__ +#define SDK_COMMON_H__ + +#include +#include +#include +#include "nordic_common.h" +#include "compiler_abstraction.h" +#include "sdk_os.h" +#include "sdk_errors.h" +#include "app_util.h" + +/**@brief Macro for verifying that the module is initialized. It will cause the function to return + * if not. + * + * @param[in] param The variable to check if is NULL. + */ +#ifndef DISABLE_PARAM_CHECK +#define VERIFY_PARAM_NOT_NULL(param) \ +do \ +{ \ + if (param == NULL) \ + { \ + return NRF_ERROR_NULL; \ + } \ +} while(0) +#else +#define VERIFY_PARAM_NOT_NULL() +#endif /* DISABLE_PARAM_CHECK */ + + +/**@brief Macro for verifying that the module is initialized. It will cause the function to return + * if not. + * + * @param[in] param The variable to check if is NULL. + */ +#ifndef DISABLE_PARAM_CHECK +#define VERIFY_PARAM_NOT_NULL_VOID(param) \ +do \ +{ \ + if (param == NULL) \ + { \ + return; \ + } \ +} while(0) +#else +#define VERIFY_PARAM_NOT_NULL_VOID() +#endif /* DISABLE_PARAM_CHECK */ + + +/**@brief Macro for verifying that a function returned NRF_SUCCESS. Will return the err code + * if not. + * + * @param[in] err_code The error code to check. + */ +#ifndef DISABLE_PARAM_CHECK +#define VERIFY_SUCCESS(err_code) \ +do \ +{ \ + if (err_code != NRF_SUCCESS) \ + { \ + return err_code; \ + } \ +} while(0) +#else +#define VERIFY_SUCCESS() +#endif /* DISABLE_PARAM_CHECK */ + + +/**@brief Macro for verifying that a function returned NRF_SUCCESS. Will return if not. + * + * @param[in] err_code The error code to check. + */ +#ifndef DISABLE_PARAM_CHECK +#define VERIFY_SUCCESS_VOID(err_code) \ +do \ +{ \ + if (err_code != NRF_SUCCESS) \ + { \ + return; \ + } \ +} while(0) +#else +#define VERIFY_SUCCESS_VOID() +#endif /* DISABLE_PARAM_CHECK */ + + +/**@brief Macro for verifying statement to be true. Will return err_code if not. +* +* @param[in] statement Statement to test. +* @param[in] err_code Error value to return if test was invalid. +* +* @retval err_code if test fails. +*/ +#define VERIFY_TRUE(statement, err_code) \ +do \ +{ \ + if (!(statement)) \ + { \ + return err_code; \ + } \ +} while(0) + + +/**@brief Macro for verifying statement to be true. Will return if not. +* +* @param[in] statement Statement to test. +*/ +#define VERIFY_TRUE_VOID(statement) \ +do \ +{ \ + if (!(statement)) \ + { \ + return; \ + } \ +} while(0) + + +/**@brief Macro for verifying statement to be false. Will return err_code if not. +* +* @param[in] statement Statement to test. +* @param[in] err_code Error value to return if test was invalid. +* +* @retval err_code if test fails. +*/ +#define VERIFY_FALSE(statement, err_code) \ +do \ +{ \ + if ((statement)) \ + { \ + return err_code; \ + } \ +} while(0) + + +/**@brief Macro for verifying statement to be false. Will return if not. +* +* @param[in] statement Statement to test. +*/ +#define VERIFY_FALSE_VOID(statement) \ +do \ +{ \ + if ((statement)) \ + { \ + return; \ + } \ +} while(0) + +/** @} */ +/** @endcond */ +#endif // SDK_COMMON_H__ + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_errors.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_errors.h new file mode 100644 index 0000000000..757c10f902 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_errors.h @@ -0,0 +1,115 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/**@file + * + * @defgroup sdk_error SDK Error codes + * @{ + * @ingroup app_common + * @{ + * @details Error codes are 32-bit unsigned integers with the most significant 16-bit reserved for + * identifying the module where the error occurred while the least least significant LSB + * are used to provide the cause or nature of error. Each module is assigned a 16-bit + * unsigned integer. Which it will use to identify all errors that occurred in it. 16-bit + * LSB range is with module id as the MSB in the 32-bit error code is reserved for the + * module. As an example, if 0x8800 identifies a certain SDK module, all values from + * 0x88000000 - 0x8800FFFF are reserved for this module. + * It should be noted that common error reasons have been assigned values to make it + * possible to decode error reason easily. As an example, lets module uninitialized has + * been assigned an error code 0x000A0. Then, if application encounters an error code + * 0xZZZZ00A0, it knows that it accessing a certain module without initializing it. + * Apart from this, each module is allowed to define error codes that are not covered by + * the common ones, however, these values are defined in a range that does not conflict + * with common error values. For module, specific error however, it is possible that the + * same error value is used by two different modules to indicated errors of very different + * nature. If error is already defined by the NRF common error codes, these are reused. + * A range is reserved for application as well, it can use this range for defining + * application specific errors. + * + * @note Success code, NRF_SUCCESS, does not include any module identifier. + + */ + +#ifndef SDK_ERRORS_H__ +#define SDK_ERRORS_H__ + +#include +#include "nrf_error.h" + +/** + * @defgroup sdk_err_base Base defined for SDK Modules + * @{ + */ +#define SDK_ERROR_BASE (NRF_ERROR_BASE_NUM + 0x8000) /**< Base value defined for SDK module identifiers. */ +#define SDK_COMMON_ERROR_BASE (NRF_ERROR_BASE_NUM + 0x0080) /**< Base error value to be used for SDK error values. */ +/* @} */ + +/** + * @defgroup sdk_module_codes Codes reserved as identification for module where the error occurred. + * @{ + */ +#define DEVICE_MANAGER_ERR_BASE (0x8000) +#define MEMORY_MANAGER_ERR_BASE (0x8100) +/* @} */ + + +/** + * @defgroup sdk_iot_errors Codes reserved as identification for IoT errors. + * @{ + */ +#define IOT_ERR_BASE_START (0xA000) +#define IOT_ERR_BASE_STOP (0xAFFF) +/* @} */ + + +/** + * @defgroup sdk_common_errors Codes reserved as identification for common errors. + * @{ + */ +#define MODULE_NOT_INITIALZED (SDK_COMMON_ERROR_BASE + 0x0000) +#define MUTEX_INIT_FAILED (SDK_COMMON_ERROR_BASE + 0x0001) +#define MUTEX_LOCK_FAILED (SDK_COMMON_ERROR_BASE + 0x0002) +#define MUTEX_UNLOCK_FAILED (SDK_COMMON_ERROR_BASE + 0x0003) +#define MUTEX_COND_INIT_FAILED (SDK_COMMON_ERROR_BASE + 0x0004) +#define MODULE_ALREADY_INITIALIZED (SDK_COMMON_ERROR_BASE + 0x0005) +#define API_NOT_IMPLEMENTED (SDK_COMMON_ERROR_BASE + 0x0010) +#define FEATURE_NOT_ENABLED (SDK_COMMON_ERROR_BASE + 0x0011) +/* @} */ + + +/** + * @defgroup dm_specific_errors Error / status codes specific to device manager. + * @{ + */ +#define DM_NO_APP_CONTEXT (DEVICE_MANAGER_ERR_BASE + 0x0040) +#define DM_SERVICE_CONTEXT_NOT_APPLIED (DEVICE_MANAGER_ERR_BASE + 0x0041) +#define DM_CONTEXT_INFO_LOST (DEVICE_MANAGER_ERR_BASE + 0x0042) +#define DM_DEVICE_CONTEXT_FULL (DEVICE_MANAGER_ERR_BASE + 0x0043) +/* @} */ + +/** + * @brief API Result. + * + * @details Indicates success or failure of an API procedure. In case of failure, a comprehensive + * error code indicating cause or reason for failure is provided. + * + * Though called an API result, it could used in Asynchronous notifications callback along + * with asynchronous callback as event result. This mechanism is employed when an event + * marks the end of procedure initiated using API. API result, in this case, will only be + * an indicative of whether the procedure has been requested successfully. + */ +typedef uint32_t ret_code_t; +/** @} */ +/** @} */ + +#endif // SDK_ERRORS_H__ + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_macros.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_macros.h new file mode 100644 index 0000000000..b662aa53af --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_macros.h @@ -0,0 +1,72 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @cond */ +/**@file + * + * @ingroup sdk_util + * @defgroup sdk_common_macros SDK Common Header + * @breif Macros for parameter checking and similar tasks + * @{ + */ + +#ifndef SDK_MACROS_H__ +#define SDK_MACROS_H__ + +/**@brief Macro for verifying that the module is initialized. It will cause the function to return + * @ref NRF_ERROR_INVALID_STATE if not. + */ +#ifdef DISABLE_PARAM_CHECK +#define VERIFY_MODULE_INITIALIZED() +#else +#ifdef MODULE_INITIALIZED +#define VERIFY_MODULE_INITIALIZED() \ +do \ +{ \ + if (!MODULE_INITIALIZED) \ + { \ + return NRF_ERROR_INVALID_STATE; \ + } \ +} while(0) +#else +#define VERIFY_MODULE_INITIALIZED() +#endif /* MODULE_INITIALIZED */ +#endif /* DISABLE_PARAM_CHECK */ + + +/**@brief Macro for verifying that the module is initialized. It will cause the function to return + * if not. + */ +#ifdef DISABLE_PARAM_CHECK +#define VERIFY_MODULE_INITIALIZED_VOID() +#else +#ifdef MODULE_INITIALIZED +#define VERIFY_MODULE_INITIALIZED_VOID() \ +do \ +{ \ + if (!MODULE_INITIALIZED) \ + { \ + return; \ + } \ +} while(0) +#else +#define VERIFY_MODULE_INITIALIZED_VOID() +#endif /* MODULE_INITIALIZED */ +#endif /* DISABLE_PARAM_CHECK */ + + + + +/** @} */ +/** @endcond */ +#endif // SDK_MACROS_H__ + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_mapped_flags.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_mapped_flags.c new file mode 100644 index 0000000000..efadca2f67 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_mapped_flags.c @@ -0,0 +1,161 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "sdk_mapped_flags.h" +#include +#include +#include +#include "compiler_abstraction.h" + + +/**@brief Function for setting the state of a flag to true. + * + * @note This function does not check whether the index is valid. + * + * @param[in] p_flags The collection of flags to modify. + * @param[in] index The index of the flag to modify. + */ +static __INLINE void sdk_mapped_flags_set_by_index(sdk_mapped_flags_t * p_flags, uint16_t index) +{ + *p_flags |= (1U << index); +} + + +/**@brief Function for setting the state of a flag to false. + * + * @note This function does not check whether the index is valid. + * + * @param[in] p_flags The collection of flags to modify. + * @param[in] index The index of the flag to modify. + */ +static __INLINE void sdk_mapped_flags_clear_by_index(sdk_mapped_flags_t * p_flags, uint16_t index) +{ + *p_flags &= ~(1U << index); +} + + +/**@brief Function for getting the state of a flag. + * + * @note This function does not check whether the index is valid. + * + * @param[in] p_flags The collection of flags to read. + * @param[in] index The index of the flag to get. + */ +static __INLINE bool sdk_mapped_flags_get_by_index(sdk_mapped_flags_t flags, uint16_t index) +{ + return ((flags & (1 << index)) != 0); +} + + + +uint16_t sdk_mapped_flags_first_key_index_get(sdk_mapped_flags_t flags) +{ + for (uint16_t i = 0; i < SDK_MAPPED_FLAGS_N_KEYS; i++) + { + if (sdk_mapped_flags_get_by_index(flags, i)) + { + return i; + } + } + return SDK_MAPPED_FLAGS_INVALID_INDEX; +} + + +void sdk_mapped_flags_update_by_key(uint16_t * p_keys, + sdk_mapped_flags_t * p_flags, + uint16_t key, + bool value) +{ + sdk_mapped_flags_bulk_update_by_key(p_keys, p_flags, 1, key, value); +} + + +void sdk_mapped_flags_bulk_update_by_key(uint16_t * p_keys, + sdk_mapped_flags_t * p_flags, + uint32_t n_flag_collections, + uint16_t key, + bool value) +{ + if ((p_keys != NULL) && (p_flags != NULL) && (n_flag_collections > 0)) + { + for (uint32_t i = 0; i < SDK_MAPPED_FLAGS_N_KEYS; i++) + { + if (p_keys[i] == key) + { + for (uint32_t j = 0; j < n_flag_collections; j++) + { + if (value) + { + sdk_mapped_flags_set_by_index(&p_flags[j], i); + } + else + { + sdk_mapped_flags_clear_by_index(&p_flags[j], i); + } + } + return; + } + } + } +} + + +bool sdk_mapped_flags_get_by_key(uint16_t * p_keys, sdk_mapped_flags_t flags, uint16_t key) +{ + if (p_keys != NULL) + { + for (uint32_t i = 0; i < SDK_MAPPED_FLAGS_N_KEYS; i++) + { + if (p_keys[i] == key) + { + return sdk_mapped_flags_get_by_index(flags, i); + } + } + } + return false; +} + + +sdk_mapped_flags_key_list_t sdk_mapped_flags_key_list_get(uint16_t * p_keys, + sdk_mapped_flags_t flags) +{ + sdk_mapped_flags_key_list_t key_list; + key_list.len = 0; + + if (p_keys != NULL) + { + for (uint32_t i = 0; i < SDK_MAPPED_FLAGS_N_KEYS; i++) + { + if (sdk_mapped_flags_get_by_index(flags, i)) + { + key_list.flag_keys[key_list.len++] = p_keys[i]; + } + } + } + + return key_list; +} + + +uint32_t sdk_mapped_flags_n_flags_set(sdk_mapped_flags_t flags) +{ + uint32_t n_flags_set = 0; + + for (uint32_t i = 0; i < SDK_MAPPED_FLAGS_N_KEYS; i++) + { + if (sdk_mapped_flags_get_by_index(flags, i)) + { + n_flags_set += 1; + } + } + return n_flags_set; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_mapped_flags.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_mapped_flags.h new file mode 100644 index 0000000000..6007eb2baf --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_mapped_flags.h @@ -0,0 +1,153 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef SDK_MAPPED_FLAGS_H__ +#define SDK_MAPPED_FLAGS_H__ + +#include +#include +#include "app_util.h" +#include "compiler_abstraction.h" + +/** + * @file + * @defgroup sdk_mapped_flags Mapped flags + * @ingroup app_common + * @{ + * @brief Module for writing and reading flags that are associated + * with keys. + * + * @details The flags are represented as bits in a bitmap called a flag collection. The keys + * are uint16_t. Each flag collection contains all flags of the same type, one flag for + * each key. + * + * The mapped flags module does not keep the flag states, nor the list of keys. These are + * provided in the API calls. A key's index in the key list determines which bit in the + * flag collection is associated with it. This module does not ever edit the key list, and + * does not edit flags except in function calls that take the flag collection as a pointer. + * + */ + +#define SDK_MAPPED_FLAGS_N_KEYS 8 /**< The number of keys to keep flags for. This is also the number of flags in a flag collection. If changing this value, you might also need change the width of the sdk_mapped_flags_t type. */ +#define SDK_MAPPED_FLAGS_N_KEYS_PER_BYTE 8 /**< The number of flags that fit in one byte. */ +#define SDK_MAPPED_FLAGS_INVALID_INDEX 0xFFFF /**< A flag index guaranteed to be invalid. */ + +typedef uint8_t sdk_mapped_flags_t; /**< The bitmap to hold flags. Each flag is one bit, and each bit represents the flag state associated with one key. */ + + +// Test whether the flag collection type is large enough to hold all the flags. If this fails, +// reduce SDK_MAPPED_FLAGS_N_KEYS or increase the size of sdk_mapped_flags_t. +STATIC_ASSERT(( + sizeof(sdk_mapped_flags_t)*SDK_MAPPED_FLAGS_N_KEYS_PER_BYTE) >= SDK_MAPPED_FLAGS_N_KEYS); + + +/**@brief Type used to present a subset of the registered keys. + */ +typedef struct +{ + uint32_t len; /**< The length of the list. */ + uint16_t flag_keys[SDK_MAPPED_FLAGS_N_KEYS]; /**< The list of keys. */ +} sdk_mapped_flags_key_list_t; + + +/**@brief Function for getting the first index at which the flag is true in the provided + * collection. + * + * @param[in] flags The flag collection to search for a flag set to true. + * + * @return The first index that has its flag set to true. If none were found, the + * function returns @ref SDK_MAPPED_FLAGS_INVALID_INDEX. + */ +uint16_t sdk_mapped_flags_first_key_index_get(sdk_mapped_flags_t flags); + + +/**@brief Function for updating the state of a flag. + * + * @param[in] p_keys The list of associated keys (assumed to have a length of + * @ref SDK_MAPPED_FLAGS_N_KEYS). + * @param[out] p_flags The flag collection to modify. + * @param[in] key The key to modify the flag of. + * @param[in] value The state to set the flag to. + */ +void sdk_mapped_flags_update_by_key(uint16_t * p_keys, + sdk_mapped_flags_t * p_flags, + uint16_t key, + bool value); + + +/**@brief Function for updating the state of the same flag in multiple flag collections. + * + * @details The key and value are the same for all flag collections in the p_flags array. + * + * @param[in] p_keys The list of associated keys (assumed to have a length of + * @ref SDK_MAPPED_FLAGS_N_KEYS). + * @param[out] p_flags The flag collections to modify. + * @param[out] n_flag_collections The number of flag collections in p_flags. + * @param[in] key The key to modify the flag of. + * @param[in] value The state to set the flag to. + */ +void sdk_mapped_flags_bulk_update_by_key(uint16_t * p_keys, + sdk_mapped_flags_t * p_flags, + uint32_t n_flag_collections, + uint16_t key, + bool value); + + +/**@brief Function for getting the state of a specific flag. + * + * @param[in] p_keys The list of associated keys (assumed to have a length of + * @ref SDK_MAPPED_FLAGS_N_KEYS). + * @param[in] flags The flag collection to read from. + * @param[in] key The key to get the flag for. + * + * @return The state of the flag. + */ +bool sdk_mapped_flags_get_by_key(uint16_t * p_keys, sdk_mapped_flags_t flags, uint16_t key); + + +/**@brief Function for getting a list of all keys that have a specific flag set to true. + * + * @param[in] p_keys The list of associated keys (assumed to have a length of + * @ref SDK_MAPPED_FLAGS_N_KEYS). + * @param[in] flags The flag collection to search. + * + * @return The list of keys. + */ +sdk_mapped_flags_key_list_t sdk_mapped_flags_key_list_get(uint16_t * p_keys, + sdk_mapped_flags_t flags); + + +/**@brief Function for getting the number of keys that have a specific flag set to true. + * + * @param[in] flags The flag collection to search. + * + * @return The number of keys. + */ +uint32_t sdk_mapped_flags_n_flags_set(sdk_mapped_flags_t flags); + + +/**@brief Function for querying whether any flags in the collection are set. + * + * @param[in] flags The flag collection to query. + * + * @retval true If one or more flags are set to true. + * @retval false Otherwise. + */ +static __INLINE bool sdk_mapped_flags_any_set(sdk_mapped_flags_t flags) +{ + return (flags != 0); +} + + +/** @} */ + +#endif /* SDK_MAPPED_FLAGS_H__ */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_os.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_os.h new file mode 100644 index 0000000000..ff871cfb3b --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_os.h @@ -0,0 +1,40 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + /** @cond */ +/**@file + * + * @defgroup sdk_os SDK OS Abstraction + * @ingroup experimental_api + * @details In order to made SDK modules independent of use of an embedded OS, and permit + * application with varied task architecture, SDK abstracts the OS specific + * elements here in order to make all other modules agnostic to the OS or task + * architecture. + * @{ + */ + +#ifndef SDK_OS_H__ +#define SDK_OS_H__ + +#define SDK_MUTEX_DEFINE(X) +#define SDK_MUTEX_INIT(X) +#define SDK_MUTEX_LOCK(X) +#define SDK_MUTEX_UNLOCK(X) + +/** + * @defgroup os_data_type Data types. + */ + +/** @} */ +/** @endcond */ +#endif // SDK_OS_H__ + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_resources.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_resources.h new file mode 100644 index 0000000000..9974b3d89e --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_resources.h @@ -0,0 +1,50 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + */ + +/** @file + * @brief Definition file for resource usage by SoftDevice, ESB and Gazell. + */ + +#ifndef APP_RESOURCES_H__ +#define APP_RESOURCES_H__ + +#ifdef SOFTDEVICE_PRESENT + #include "nrf_sd_def.h" +#else + #define SD_PPI_RESTRICTED 0uL /**< 1 if PPI peripheral is restricted, 0 otherwise. */ + #define SD_PPI_CHANNELS_USED 0uL /**< PPI channels utilized by SotfDevice (not available to th spplication). */ + #define SD_PPI_GROUPS_USED 0uL /**< PPI groups utilized by SotfDevice (not available to th spplication). */ + #define SD_TIMERS_USED 0uL /**< Timers used by SoftDevice. */ + #define SD_SWI_USED 0uL /**< Software interrupts used by SoftDevice. */ +#endif + +#ifdef GAZELL_PRESENT + #include "nrf_gzll_resources.h" +#else + #define GZLL_PPI_CHANNELS_USED 0uL /**< PPI channels utilized by Gazell (not available to th spplication). */ + #define GZLL_TIMERS_USED 0uL /**< Timers used by Gazell. */ + #define GZLL_SWI_USED 0uL /**< Software interrupts used by Gazell */ +#endif + +#ifdef ESB_PRESENT + #include "nrf_esb_resources.h" +#else + #define ESB_PPI_CHANNELS_USED 0uL /**< PPI channels utilized by ESB (not available to th spplication). */ + #define ESB_TIMERS_USED 0uL /**< Timers used by ESB. */ + #define ESB_SWI_USED 0uL /**< Software interrupts used by ESB */ +#endif + +#define NRF_PPI_CHANNELS_USED (SD_PPI_CHANNELS_USED | GZLL_PPI_CHANNELS_USED | ESB_PPI_CHANNELS_USED) +#define NRF_PPI_GROUPS_USED (SD_PPI_GROUPS_USED) +#define NRF_SWI_USED (SD_SWI_USED | GZLL_SWI_USED | ESB_SWI_USED) +#define NRF_TIMERS_USED (SD_TIMERS_USED | GZLL_TIMERS_USED | ESB_TIMERS_USED) + +#endif // APP_RESOURCES_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/ant_stack_handler_types.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/ant_stack_handler_types.h new file mode 100644 index 0000000000..2a43d8fa4f --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/ant_stack_handler_types.h @@ -0,0 +1,73 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/**@file + * + * @defgroup ant_stack_handler_types Types definitions for ANT support in SoftDevice handler. + * @{ + * @ingroup softdevice_handler + * @brief This file contains the declarations of types required for ANT stack support. These + * types will be defined when the preprocessor define ANT_STACK_SUPPORT_REQD is defined. + */ + +#ifndef ANT_STACK_HANDLER_TYPES_H__ +#define ANT_STACK_HANDLER_TYPES_H__ + +#ifdef ANT_STACK_SUPPORT_REQD + +#include + +#define ANT_STACK_EVT_MSG_BUF_SIZE 32 /**< Size of ANT event message buffer. This will be provided to the SoftDevice while fetching an event. */ +#define ANT_STACK_EVT_STRUCT_SIZE (sizeof(ant_evt_t)) /**< Size of the @ref ant_evt_t structure. This will be used by the @ref softdevice_handler to internal event buffer size needed. */ + +/**@brief ANT stack event type. */ +typedef struct +{ + union + { + uint32_t ulForceAlign; ///< force the evt_buffer to be 4-byte aligned, required for some casting to ANT_MESSAGE. + uint8_t evt_buffer[ANT_STACK_EVT_MSG_BUF_SIZE]; ///< Event message buffer. + } msg; + uint8_t channel; ///< Channel number. + uint8_t event; ///< Event code. +} ant_evt_t; + +/**@brief Application ANT stack event handler type. */ +typedef void (*ant_evt_handler_t) (ant_evt_t * p_ant_evt); + +/**@brief Function for registering for ANT events. + * + * @details The application should use this function to register for receiving ANT events from + * the SoftDevice. If the application does not call this function, then any ANT event + * that may be generated by the SoftDevice will NOT be fetched. Once the application has + * registered for the events, it is not possible to possible to cancel the registration. + * However, it is possible to register a different function for handling the events at + * any point of time. + * + * @param[in] ant_evt_handler Function to be called for each received ANT event. + * + * @retval NRF_SUCCESS Successful registration. + * @retval NRF_ERROR_NULL Null pointer provided as input. + */ +uint32_t softdevice_ant_evt_handler_set(ant_evt_handler_t ant_evt_handler); + +#else + +// The ANT Stack support is not required. + +#define ANT_STACK_EVT_STRUCT_SIZE 0 /**< Since the ANT stack support is not required, this is equated to 0, so that the @ref softdevice_handler.h can compute the internal event buffer size without having to care for ANT events.*/ + +#endif // ANT_STACK_SUPPORT_REQD + +#endif // ANT_STACK_HANDLER_TYPES_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/app_ram_base.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/app_ram_base.h new file mode 100644 index 0000000000..fb817cb99d --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/app_ram_base.h @@ -0,0 +1,176 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +// ble_enable param app_ram_base + +#define APP_RAM_BASE_CENTRAL_LINKS_0_PERIPH_LINKS_0_SEC_COUNT_0_MID_BW 0x20001870 +#define APP_RAM_BASE_CENTRAL_LINKS_0_PERIPH_LINKS_0_SEC_COUNT_0_MID_BW 0x20001870 +#define APP_RAM_BASE_CENTRAL_LINKS_0_PERIPH_LINKS_1_SEC_COUNT_0_MID_BW 0x20001fe8 +#define APP_RAM_BASE_CENTRAL_LINKS_0_PERIPH_LINKS_1_SEC_COUNT_0_MID_BW 0x20001fe8 +#define APP_RAM_BASE_CENTRAL_LINKS_1_PERIPH_LINKS_0_SEC_COUNT_0_MID_BW 0x20001ce0 +#define APP_RAM_BASE_CENTRAL_LINKS_1_PERIPH_LINKS_0_SEC_COUNT_0_LOW_BW 0x20001c98 +#define APP_RAM_BASE_CENTRAL_LINKS_1_PERIPH_LINKS_0_SEC_COUNT_1_MID_BW 0x20001eb0 +#define APP_RAM_BASE_CENTRAL_LINKS_1_PERIPH_LINKS_0_SEC_COUNT_1_LOW_BW 0x20001e68 +#define APP_RAM_BASE_CENTRAL_LINKS_1_PERIPH_LINKS_1_SEC_COUNT_0_MID_BW 0x20002418 +#define APP_RAM_BASE_CENTRAL_LINKS_1_PERIPH_LINKS_1_SEC_COUNT_0_LOW_BW 0x200023d0 +#define APP_RAM_BASE_CENTRAL_LINKS_1_PERIPH_LINKS_1_SEC_COUNT_1_MID_BW 0x200025e0 +#define APP_RAM_BASE_CENTRAL_LINKS_1_PERIPH_LINKS_1_SEC_COUNT_1_LOW_BW 0x200025a0 +#define APP_RAM_BASE_CENTRAL_LINKS_2_PERIPH_LINKS_0_SEC_COUNT_0_MID_BW 0x20002110 +#define APP_RAM_BASE_CENTRAL_LINKS_2_PERIPH_LINKS_0_SEC_COUNT_0_LOW_BW 0x20002080 +#define APP_RAM_BASE_CENTRAL_LINKS_2_PERIPH_LINKS_0_SEC_COUNT_1_MID_BW 0x200022d8 +#define APP_RAM_BASE_CENTRAL_LINKS_2_PERIPH_LINKS_0_SEC_COUNT_1_LOW_BW 0x20002250 +#define APP_RAM_BASE_CENTRAL_LINKS_2_PERIPH_LINKS_0_SEC_COUNT_2_MID_BW 0x200024a8 +#define APP_RAM_BASE_CENTRAL_LINKS_2_PERIPH_LINKS_0_SEC_COUNT_2_LOW_BW 0x20002418 +#define APP_RAM_BASE_CENTRAL_LINKS_2_PERIPH_LINKS_1_SEC_COUNT_0_MID_BW 0x20002840 +#define APP_RAM_BASE_CENTRAL_LINKS_2_PERIPH_LINKS_1_SEC_COUNT_0_LOW_BW 0x200027b8 +#define APP_RAM_BASE_CENTRAL_LINKS_2_PERIPH_LINKS_1_SEC_COUNT_1_MID_BW 0x20002a10 +#define APP_RAM_BASE_CENTRAL_LINKS_2_PERIPH_LINKS_1_SEC_COUNT_1_LOW_BW 0x20002980 +#define APP_RAM_BASE_CENTRAL_LINKS_2_PERIPH_LINKS_1_SEC_COUNT_2_MID_BW 0x20002bd8 +#define APP_RAM_BASE_CENTRAL_LINKS_2_PERIPH_LINKS_1_SEC_COUNT_2_LOW_BW 0x20002b50 +#define APP_RAM_BASE_CENTRAL_LINKS_3_PERIPH_LINKS_0_SEC_COUNT_0_MID_BW 0x20002538 +#define APP_RAM_BASE_CENTRAL_LINKS_3_PERIPH_LINKS_0_SEC_COUNT_0_LOW_BW 0x20002468 +#define APP_RAM_BASE_CENTRAL_LINKS_3_PERIPH_LINKS_0_SEC_COUNT_1_MID_BW 0x20002708 +#define APP_RAM_BASE_CENTRAL_LINKS_3_PERIPH_LINKS_0_SEC_COUNT_1_LOW_BW 0x20002638 +#define APP_RAM_BASE_CENTRAL_LINKS_3_PERIPH_LINKS_0_SEC_COUNT_2_MID_BW 0x200028d0 +#define APP_RAM_BASE_CENTRAL_LINKS_3_PERIPH_LINKS_0_SEC_COUNT_2_LOW_BW 0x20002800 +#define APP_RAM_BASE_CENTRAL_LINKS_3_PERIPH_LINKS_0_SEC_COUNT_3_MID_BW 0x20002aa0 +#define APP_RAM_BASE_CENTRAL_LINKS_3_PERIPH_LINKS_0_SEC_COUNT_3_LOW_BW 0x200029d0 +#define APP_RAM_BASE_CENTRAL_LINKS_3_PERIPH_LINKS_1_SEC_COUNT_0_MID_BW 0x20002c70 +#define APP_RAM_BASE_CENTRAL_LINKS_3_PERIPH_LINKS_1_SEC_COUNT_0_LOW_BW 0x20002ba0 +#define APP_RAM_BASE_CENTRAL_LINKS_3_PERIPH_LINKS_1_SEC_COUNT_1_MID_BW 0x20002e40 +#define APP_RAM_BASE_CENTRAL_LINKS_3_PERIPH_LINKS_1_SEC_COUNT_1_LOW_BW 0x20002d68 +#define APP_RAM_BASE_CENTRAL_LINKS_3_PERIPH_LINKS_1_SEC_COUNT_2_MID_BW 0x20003008 +#define APP_RAM_BASE_CENTRAL_LINKS_3_PERIPH_LINKS_1_SEC_COUNT_2_LOW_BW 0x20002f38 +#define APP_RAM_BASE_CENTRAL_LINKS_3_PERIPH_LINKS_1_SEC_COUNT_3_MID_BW 0x200031d8 +#define APP_RAM_BASE_CENTRAL_LINKS_3_PERIPH_LINKS_1_SEC_COUNT_3_LOW_BW 0x20003100 +#define APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_0_SEC_COUNT_0_MID_BW 0x20002968 +#define APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_0_SEC_COUNT_0_LOW_BW 0x20002850 +#define APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_0_SEC_COUNT_1_MID_BW 0x20002b30 +#define APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_0_SEC_COUNT_1_LOW_BW 0x20002a18 +#define APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_0_SEC_COUNT_2_MID_BW 0x20002d00 +#define APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_0_SEC_COUNT_2_LOW_BW 0x20002be8 +#define APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_0_SEC_COUNT_3_MID_BW 0x20002ec8 +#define APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_0_SEC_COUNT_3_LOW_BW 0x20002db0 +#define APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_0_SEC_COUNT_4_MID_BW 0x20003098 +#define APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_0_SEC_COUNT_4_LOW_BW 0x20002f80 +#define APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_1_SEC_COUNT_0_MID_BW 0x200030a0 +#define APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_1_SEC_COUNT_0_LOW_BW 0x20002f88 +#define APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_1_SEC_COUNT_1_MID_BW 0x20003268 +#define APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_1_SEC_COUNT_1_LOW_BW 0x20003150 +#define APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_1_SEC_COUNT_2_MID_BW 0x20003438 +#define APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_1_SEC_COUNT_2_LOW_BW 0x20003320 +#define APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_1_SEC_COUNT_3_MID_BW 0x20003600 +#define APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_1_SEC_COUNT_3_LOW_BW 0x200034e8 +#define APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_1_SEC_COUNT_4_MID_BW 0x200037d0 +#define APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_1_SEC_COUNT_4_LOW_BW 0x200036b8 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_0_SEC_COUNT_0_MID_BW 0x20002d98 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_0_SEC_COUNT_0_LOW_BW 0x20002c38 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_0_SEC_COUNT_1_MID_BW 0x20002f60 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_0_SEC_COUNT_1_LOW_BW 0x20002e00 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_0_SEC_COUNT_2_MID_BW 0x20003130 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_0_SEC_COUNT_2_LOW_BW 0x20002fd0 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_0_SEC_COUNT_3_MID_BW 0x200032f8 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_0_SEC_COUNT_3_LOW_BW 0x20003198 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_0_SEC_COUNT_4_MID_BW 0x200034c8 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_0_SEC_COUNT_4_LOW_BW 0x20003368 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_0_SEC_COUNT_5_MID_BW 0x20003690 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_0_SEC_COUNT_5_LOW_BW 0x20003530 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_1_SEC_COUNT_0_MID_BW 0x200034c8 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_1_SEC_COUNT_0_LOW_BW 0x20003370 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_1_SEC_COUNT_1_MID_BW 0x20003698 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_1_SEC_COUNT_1_LOW_BW 0x20003538 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_1_SEC_COUNT_2_MID_BW 0x20003860 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_1_SEC_COUNT_2_LOW_BW 0x20003708 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_1_SEC_COUNT_3_MID_BW 0x20003a30 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_1_SEC_COUNT_3_LOW_BW 0x200038d0 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_1_SEC_COUNT_4_MID_BW 0x20003bf8 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_1_SEC_COUNT_4_LOW_BW 0x20003aa0 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_1_SEC_COUNT_5_MID_BW 0x20003dc8 +#define APP_RAM_BASE_CENTRAL_LINKS_5_PERIPH_LINKS_1_SEC_COUNT_5_LOW_BW 0x20003c68 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_0_SEC_COUNT_0_MID_BW 0x200031c0 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_0_SEC_COUNT_0_LOW_BW 0x20003020 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_0_SEC_COUNT_1_MID_BW 0x20003390 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_0_SEC_COUNT_1_LOW_BW 0x200031e8 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_0_SEC_COUNT_2_MID_BW 0x20003558 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_0_SEC_COUNT_2_LOW_BW 0x200033b8 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_0_SEC_COUNT_3_MID_BW 0x20003728 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_0_SEC_COUNT_3_LOW_BW 0x20003580 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_0_SEC_COUNT_4_MID_BW 0x200038f0 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_0_SEC_COUNT_4_LOW_BW 0x20003750 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_0_SEC_COUNT_5_MID_BW 0x20003ac0 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_0_SEC_COUNT_5_LOW_BW 0x20003918 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_0_SEC_COUNT_6_MID_BW 0x20003c88 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_0_SEC_COUNT_6_LOW_BW 0x20003ae8 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_1_SEC_COUNT_0_MID_BW 0x200038f8 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_1_SEC_COUNT_0_LOW_BW 0x20003750 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_1_SEC_COUNT_1_MID_BW 0x20003ac0 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_1_SEC_COUNT_1_LOW_BW 0x20003920 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_1_SEC_COUNT_2_MID_BW 0x20003c90 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_1_SEC_COUNT_2_LOW_BW 0x20003ae8 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_1_SEC_COUNT_3_MID_BW 0x20003e58 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_1_SEC_COUNT_3_LOW_BW 0x20003cb8 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_1_SEC_COUNT_4_MID_BW 0x20004028 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_1_SEC_COUNT_4_LOW_BW 0x20003e80 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_1_SEC_COUNT_5_MID_BW 0x200041f0 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_1_SEC_COUNT_5_LOW_BW 0x20004050 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_1_SEC_COUNT_6_MID_BW 0x200043c0 +#define APP_RAM_BASE_CENTRAL_LINKS_6_PERIPH_LINKS_1_SEC_COUNT_6_LOW_BW 0x20004218 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_0_SEC_COUNT_0_MID_BW 0x200035f0 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_0_SEC_COUNT_0_LOW_BW 0x20003408 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_0_SEC_COUNT_1_MID_BW 0x200037b8 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_0_SEC_COUNT_1_LOW_BW 0x200035d0 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_0_SEC_COUNT_2_MID_BW 0x20003988 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_0_SEC_COUNT_2_LOW_BW 0x200037a0 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_0_SEC_COUNT_3_MID_BW 0x20003b50 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_0_SEC_COUNT_3_LOW_BW 0x20003968 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_0_SEC_COUNT_4_MID_BW 0x20003d20 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_0_SEC_COUNT_4_LOW_BW 0x20003b38 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_0_SEC_COUNT_5_MID_BW 0x20003ee8 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_0_SEC_COUNT_5_LOW_BW 0x20003d00 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_0_SEC_COUNT_6_MID_BW 0x200040b8 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_0_SEC_COUNT_6_LOW_BW 0x20003ed0 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_0_SEC_COUNT_7_MID_BW 0x20004280 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_0_SEC_COUNT_7_LOW_BW 0x20004098 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_1_SEC_COUNT_0_MID_BW 0x20003d28 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_1_SEC_COUNT_0_LOW_BW 0x20003b38 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_1_SEC_COUNT_1_MID_BW 0x20003ef0 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_1_SEC_COUNT_1_LOW_BW 0x20003d08 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_1_SEC_COUNT_2_MID_BW 0x200040c0 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_1_SEC_COUNT_2_LOW_BW 0x20003ed0 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_1_SEC_COUNT_3_MID_BW 0x20004288 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_1_SEC_COUNT_3_LOW_BW 0x200040a0 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_1_SEC_COUNT_4_MID_BW 0x20004458 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_1_SEC_COUNT_4_LOW_BW 0x20004268 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_1_SEC_COUNT_5_MID_BW 0x20004620 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_1_SEC_COUNT_5_LOW_BW 0x20004438 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_1_SEC_COUNT_6_MID_BW 0x200047f0 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_1_SEC_COUNT_6_LOW_BW 0x20004600 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_1_SEC_COUNT_7_MID_BW 0x200049b8 +#define APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_1_SEC_COUNT_7_LOW_BW 0x200047d0 +#define APP_RAM_BASE_CENTRAL_LINKS_8_PERIPH_LINKS_0_SEC_COUNT_0_MID_BW 0x20003a18 +#define APP_RAM_BASE_CENTRAL_LINKS_8_PERIPH_LINKS_0_SEC_COUNT_0_LOW_BW 0x200037e8 +#define APP_RAM_BASE_CENTRAL_LINKS_8_PERIPH_LINKS_0_SEC_COUNT_1_MID_BW 0x20003be8 +#define APP_RAM_BASE_CENTRAL_LINKS_8_PERIPH_LINKS_0_SEC_COUNT_1_LOW_BW 0x200039b8 +#define APP_RAM_BASE_CENTRAL_LINKS_8_PERIPH_LINKS_0_SEC_COUNT_2_MID_BW 0x20003db0 +#define APP_RAM_BASE_CENTRAL_LINKS_8_PERIPH_LINKS_0_SEC_COUNT_2_LOW_BW 0x20003b80 +#define APP_RAM_BASE_CENTRAL_LINKS_8_PERIPH_LINKS_0_SEC_COUNT_3_MID_BW 0x20003f80 +#define APP_RAM_BASE_CENTRAL_LINKS_8_PERIPH_LINKS_0_SEC_COUNT_3_LOW_BW 0x20003d50 +#define APP_RAM_BASE_CENTRAL_LINKS_8_PERIPH_LINKS_0_SEC_COUNT_4_MID_BW 0x20004148 +#define APP_RAM_BASE_CENTRAL_LINKS_8_PERIPH_LINKS_0_SEC_COUNT_4_LOW_BW 0x20003f18 +#define APP_RAM_BASE_CENTRAL_LINKS_8_PERIPH_LINKS_0_SEC_COUNT_5_MID_BW 0x20004318 +#define APP_RAM_BASE_CENTRAL_LINKS_8_PERIPH_LINKS_0_SEC_COUNT_5_LOW_BW 0x200040e8 +#define APP_RAM_BASE_CENTRAL_LINKS_8_PERIPH_LINKS_0_SEC_COUNT_6_MID_BW 0x200044e0 +#define APP_RAM_BASE_CENTRAL_LINKS_8_PERIPH_LINKS_0_SEC_COUNT_6_LOW_BW 0x200042b0 +#define APP_RAM_BASE_CENTRAL_LINKS_8_PERIPH_LINKS_0_SEC_COUNT_7_MID_BW 0x200046b0 +#define APP_RAM_BASE_CENTRAL_LINKS_8_PERIPH_LINKS_0_SEC_COUNT_7_LOW_BW 0x20004480 +#define APP_RAM_BASE_CENTRAL_LINKS_8_PERIPH_LINKS_0_SEC_COUNT_8_MID_BW 0x20004878 +#define APP_RAM_BASE_CENTRAL_LINKS_8_PERIPH_LINKS_0_SEC_COUNT_8_LOW_BW 0x20004648 diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/ble_stack_handler_types.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/ble_stack_handler_types.h new file mode 100644 index 0000000000..ff600f25d9 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/ble_stack_handler_types.h @@ -0,0 +1,64 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/**@file + * + * @defgroup ble_stack_handler_types Types definitions for BLE support in SoftDevice handler. + * @{ + * @ingroup softdevice_handler + * @brief This file contains the declarations of types required for BLE stack support. These + * types will be defined when the preprocessor define BLE_STACK_SUPPORT_REQD is defined. + */ + +#ifndef BLE_STACK_HANDLER_TYPES_H__ +#define BLE_STACK_HANDLER_TYPES_H__ + +#ifdef BLE_STACK_SUPPORT_REQD + +#include +#include "ble.h" +#include "nrf_sdm.h" +#include "app_error.h" +#include "app_util.h" + +#define BLE_STACK_EVT_MSG_BUF_SIZE (sizeof(ble_evt_t) + (GATT_MTU_SIZE_DEFAULT)) /**< Size of BLE event message buffer. This will be provided to the SoftDevice while fetching an event. */ +#define BLE_STACK_HANDLER_SCHED_EVT_SIZE 0 /**< The size of the scheduler event used by SoftDevice handler when passing BLE events using the @ref app_scheduler. */ + +/**@brief Application stack event handler type. */ +typedef void (*ble_evt_handler_t) (ble_evt_t * p_ble_evt); + +/**@brief Function for registering for BLE events. + * + * @details The application should use this function to register for receiving BLE events from + * the SoftDevice. If the application does not call this function, then any BLE event + * that may be generated by the SoftDevice will NOT be fetched. Once the application has + * registered for the events, it is not possible to cancel the registration. + * However, it is possible to register a different function for handling the events at + * any point of time. + * + * @param[in] ble_evt_handler Function to be called for each received BLE event. + * + * @retval NRF_SUCCESS Successful registration. + * @retval NRF_ERROR_NULL Null pointer provided as input. + */ +uint32_t softdevice_ble_evt_handler_set(ble_evt_handler_t ble_evt_handler); + +#else + +#define BLE_STACK_EVT_MSG_BUF_SIZE 0 /**< Since the BLE stack support is not required, this is equated to 0, so that the @ref softdevice_handler.h can compute the internal event buffer size without having to care for BLE events.*/ +#define BLE_STACK_HANDLER_SCHED_EVT_SIZE 0 + +#endif // BLE_STACK_SUPPORT_REQD + +#endif // BLE_STACK_HANDLER_TYPES_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.c new file mode 100644 index 0000000000..82da1a142a --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.c @@ -0,0 +1,490 @@ +/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "softdevice_handler.h" +#include +#include +#include +#include +#include "nordic_common.h" +#include "app_error.h" +#include "nrf_assert.h" +#include "nrf_nvic.h" +#include "nrf.h" +#include "nrf_log.h" +#include "sdk_common.h" +#include "nrf_drv_config.h" +#if CLOCK_ENABLED +#include "nrf_drv_clock.h" +#endif + +#if defined(ANT_STACK_SUPPORT_REQD) && defined(BLE_STACK_SUPPORT_REQD) + #include "ant_interface.h" +#elif defined(ANT_STACK_SUPPORT_REQD) + #include "ant_interface.h" +#elif defined(BLE_STACK_SUPPORT_REQD) + #include "ble.h" +#endif + + +#if defined(NRF_LOG_USES_RTT) && NRF_LOG_USES_RTT == 1 +#define SD_HANDLER_LOG(...) NRF_LOG_PRINTF(__VA_ARGS__) +#else +#define SD_HANDLER_LOG(...) +#endif + +#if defined(NRF_LOG_USES_RTT) && NRF_LOG_USES_RTT == 1 +#define SD_HANDLER_LOG_INIT() NRF_LOG_INIT() +#else +#define SD_HANDLER_LOG_INIT() +#endif + + + +#define RAM_START_ADDRESS 0x20000000 +#define SOFTDEVICE_EVT_IRQ SD_EVT_IRQn /**< SoftDevice Event IRQ number. Used for both protocol events and SoC events. */ +#define SOFTDEVICE_EVT_IRQHandler SD_EVT_IRQHandler +#define RAM_TOTAL_SIZE ((NRF_FICR->INFO.RAM)*1024) +#define RAM_END_ADDRESS (RAM_START_ADDRESS + RAM_TOTAL_SIZE) + + +#define SOFTDEVICE_VS_UUID_COUNT 0 +#define SOFTDEVICE_GATTS_ATTR_TAB_SIZE BLE_GATTS_ATTR_TAB_SIZE_DEFAULT +#define SOFTDEVICE_GATTS_SRV_CHANGED 0 +#define SOFTDEVICE_PERIPH_CONN_COUNT 1 +#define SOFTDEVICE_CENTRAL_CONN_COUNT 4 +#define SOFTDEVICE_CENTRAL_SEC_COUNT 1 + +/* Global nvic state instance, required by nrf_nvic.h */ +nrf_nvic_state_t nrf_nvic_state; + +static softdevice_evt_schedule_func_t m_evt_schedule_func; /**< Pointer to function for propagating SoftDevice events to the scheduler. */ + +static volatile bool m_softdevice_enabled = false; /**< Variable to indicate whether the SoftDevice is enabled. */ + +#ifdef BLE_STACK_SUPPORT_REQD +// The following three definitions is needed only if BLE events are needed to be pulled from the stack. +static uint8_t * mp_ble_evt_buffer; /**< Buffer for receiving BLE events from the SoftDevice. */ +static uint16_t m_ble_evt_buffer_size; /**< Size of BLE event buffer. */ +static ble_evt_handler_t m_ble_evt_handler; /**< Application event handler for handling BLE events. */ +#endif + +#ifdef ANT_STACK_SUPPORT_REQD +// The following two definition is needed only if ANT events are needed to be pulled from the stack. +static ant_evt_t m_ant_evt_buffer; /**< Buffer for receiving ANT events from the SoftDevice. */ +static ant_evt_handler_t m_ant_evt_handler; /**< Application event handler for handling ANT events. */ +#endif + +static sys_evt_handler_t m_sys_evt_handler; /**< Application event handler for handling System (SOC) events. */ + + +/**@brief Callback function for asserts in the SoftDevice. + * + * @details A pointer to this function will be passed to the SoftDevice. This function will be + * called by the SoftDevice if certain unrecoverable errors occur within the + * application or SoftDevice. + * + * See @ref nrf_fault_handler_t for more details. + * + * @param[in] id Fault identifier. See @ref NRF_FAULT_IDS. + * @param[in] pc The program counter of the instruction that triggered the fault. + * @param[in] info Optional additional information regarding the fault. Refer to each fault + * identifier for details. + */ +void softdevice_fault_handler(uint32_t id, uint32_t pc, uint32_t info) +{ + app_error_fault_handler(id, pc, info); +} + + +void intern_softdevice_events_execute(void) +{ + if (!m_softdevice_enabled) + { + // SoftDevice not enabled. This can be possible if the SoftDevice was enabled by the + // application without using this module's API (i.e softdevice_handler_init) + + return; + } +#if CLOCK_ENABLED + bool no_more_soc_evts = false; +#else + bool no_more_soc_evts = (m_sys_evt_handler == NULL); +#endif +#ifdef BLE_STACK_SUPPORT_REQD + bool no_more_ble_evts = (m_ble_evt_handler == NULL); +#endif +#ifdef ANT_STACK_SUPPORT_REQD + bool no_more_ant_evts = (m_ant_evt_handler == NULL); +#endif + + for (;;) + { + uint32_t err_code; + + if (!no_more_soc_evts) + { + uint32_t evt_id; + + // Pull event from SOC. + err_code = sd_evt_get(&evt_id); + + if (err_code == NRF_ERROR_NOT_FOUND) + { + no_more_soc_evts = true; + } + else if (err_code != NRF_SUCCESS) + { + APP_ERROR_HANDLER(err_code); + } + else + { + // Call application's SOC event handler. +#if CLOCK_ENABLED + nrf_drv_clock_on_soc_event(evt_id); + if (m_sys_evt_handler) + { + m_sys_evt_handler(evt_id); + } +#else + m_sys_evt_handler(evt_id); +#endif + } + } + +#ifdef BLE_STACK_SUPPORT_REQD + // Fetch BLE Events. + if (!no_more_ble_evts) + { + // Pull event from stack + uint16_t evt_len = m_ble_evt_buffer_size; + + err_code = sd_ble_evt_get(mp_ble_evt_buffer, &evt_len); + if (err_code == NRF_ERROR_NOT_FOUND) + { + no_more_ble_evts = true; + } + else if (err_code != NRF_SUCCESS) + { + APP_ERROR_HANDLER(err_code); + } + else + { + // Call application's BLE stack event handler. + m_ble_evt_handler((ble_evt_t *)mp_ble_evt_buffer); + } + } +#endif + +#ifdef ANT_STACK_SUPPORT_REQD + // Fetch ANT Events. + if (!no_more_ant_evts) + { + // Pull event from stack + err_code = sd_ant_event_get(&m_ant_evt_buffer.channel, + &m_ant_evt_buffer.event, + m_ant_evt_buffer.msg.evt_buffer); + if (err_code == NRF_ERROR_NOT_FOUND) + { + no_more_ant_evts = true; + } + else if (err_code != NRF_SUCCESS) + { + APP_ERROR_HANDLER(err_code); + } + else + { + // Call application's ANT stack event handler. + m_ant_evt_handler(&m_ant_evt_buffer); + } + } +#endif + + if (no_more_soc_evts) + { + // There are no remaining System (SOC) events to be fetched from the SoftDevice. +#if defined(ANT_STACK_SUPPORT_REQD) && defined(BLE_STACK_SUPPORT_REQD) + // Check if there are any remaining BLE and ANT events. + if (no_more_ble_evts && no_more_ant_evts) + { + break; + } +#elif defined(BLE_STACK_SUPPORT_REQD) + // Check if there are any remaining BLE events. + if (no_more_ble_evts) + { + break; + } +#elif defined(ANT_STACK_SUPPORT_REQD) + // Check if there are any remaining ANT events. + if (no_more_ant_evts) + { + break; + } +#else + // No need to check for BLE or ANT events since there is no support for BLE and ANT + // required. + break; +#endif + } + } +} + +bool softdevice_handler_isEnabled(void) +{ + return m_softdevice_enabled; +} + +uint32_t softdevice_handler_init(nrf_clock_lf_cfg_t * p_clock_lf_cfg, + void * p_ble_evt_buffer, + uint16_t ble_evt_buffer_size, + softdevice_evt_schedule_func_t evt_schedule_func) +{ + uint32_t err_code; + + SD_HANDLER_LOG_INIT(); + + // Save configuration. +#if defined (BLE_STACK_SUPPORT_REQD) + // Check that buffer is not NULL. + if (p_ble_evt_buffer == NULL) + { + return NRF_ERROR_INVALID_PARAM; + } + + // Check that buffer is correctly aligned. + if (!is_word_aligned(p_ble_evt_buffer)) + { + return NRF_ERROR_INVALID_PARAM; + } + + mp_ble_evt_buffer = (uint8_t *)p_ble_evt_buffer; + m_ble_evt_buffer_size = ble_evt_buffer_size; +#else + // The variables p_ble_evt_buffer and ble_evt_buffer_size is not needed if BLE Stack support + // is not required. + UNUSED_PARAMETER(p_ble_evt_buffer); + UNUSED_PARAMETER(ble_evt_buffer_size); +#endif + + m_evt_schedule_func = evt_schedule_func; + + // Initialize SoftDevice. +#if defined(S212) || defined(S332) + err_code = sd_softdevice_enable(p_clock_lf_cfg, softdevice_fault_handler, ANT_LICENSE_KEY); +#else + err_code = sd_softdevice_enable(p_clock_lf_cfg, softdevice_fault_handler); +#endif + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + m_softdevice_enabled = true; + + // Enable BLE event interrupt (interrupt priority has already been set by the stack). +#ifdef SOFTDEVICE_PRESENT + return sd_nvic_EnableIRQ((IRQn_Type)SOFTDEVICE_EVT_IRQ); +#else + //In case of Serialization NVIC must be accessed directly. + NVIC_EnableIRQ(SOFTDEVICE_EVT_IRQ); + return NRF_SUCCESS; +#endif +} + + +uint32_t softdevice_handler_sd_disable(void) +{ + uint32_t err_code = sd_softdevice_disable(); + + m_softdevice_enabled = !(err_code == NRF_SUCCESS); + + return err_code; +} + + +#ifdef BLE_STACK_SUPPORT_REQD +uint32_t softdevice_ble_evt_handler_set(ble_evt_handler_t ble_evt_handler) +{ + VERIFY_PARAM_NOT_NULL(ble_evt_handler); + + m_ble_evt_handler = ble_evt_handler; + + return NRF_SUCCESS; +} +#endif + + +#ifdef ANT_STACK_SUPPORT_REQD +uint32_t softdevice_ant_evt_handler_set(ant_evt_handler_t ant_evt_handler) +{ + VERIFY_PARAM_NOT_NULL(ant_evt_handler); + + m_ant_evt_handler = ant_evt_handler; + + return NRF_SUCCESS; +} +#endif + + +uint32_t softdevice_sys_evt_handler_set(sys_evt_handler_t sys_evt_handler) +{ + VERIFY_PARAM_NOT_NULL(sys_evt_handler); + + m_sys_evt_handler = sys_evt_handler; + + return NRF_SUCCESS; +} + + +/**@brief Function for handling the Application's BLE Stack events interrupt. + * + * @details This function is called whenever an event is ready to be pulled. + */ +void SOFTDEVICE_EVT_IRQHandler(void) +{ + if (m_evt_schedule_func != NULL) + { + uint32_t err_code = m_evt_schedule_func(); + APP_ERROR_CHECK(err_code); + } + else + { + intern_softdevice_events_execute(); + } +} + +#if defined(BLE_STACK_SUPPORT_REQD) +uint32_t softdevice_enable_get_default_config(uint8_t central_links_count, + uint8_t periph_links_count, + ble_enable_params_t * p_ble_enable_params) +{ + memset(p_ble_enable_params, 0, sizeof(ble_enable_params_t)); + p_ble_enable_params->common_enable_params.vs_uuid_count = 1; + p_ble_enable_params->gatts_enable_params.attr_tab_size = SOFTDEVICE_GATTS_ATTR_TAB_SIZE; + p_ble_enable_params->gatts_enable_params.service_changed = SOFTDEVICE_GATTS_SRV_CHANGED; + p_ble_enable_params->gap_enable_params.periph_conn_count = periph_links_count; + p_ble_enable_params->gap_enable_params.central_conn_count = central_links_count; + if (p_ble_enable_params->gap_enable_params.central_conn_count != 0) + { + p_ble_enable_params->gap_enable_params.central_sec_count = SOFTDEVICE_CENTRAL_SEC_COUNT; + } + + return NRF_SUCCESS; +} + + +#if defined(NRF_LOG_USES_RTT) && NRF_LOG_USES_RTT == 1 +static inline uint32_t ram_total_size_get(void) +{ +#ifdef NRF51 + uint32_t size_ram_blocks = (uint32_t)NRF_FICR->SIZERAMBLOCKS; + uint32_t total_ram_size = size_ram_blocks; + total_ram_size = total_ram_size*(NRF_FICR->NUMRAMBLOCK); + return total_ram_size; +#elif defined (NRF52) + return RAM_TOTAL_SIZE; +#endif /* NRF51 */ +} + +/*lint --e{528} -save suppress 528: symbol not referenced */ +/**@brief Function for finding the end address of the RAM. + * + * @retval ram_end_address Address of the end of the RAM. + */ +static inline uint32_t ram_end_address_get(void) +{ + uint32_t ram_end_address = (uint32_t)RAM_START_ADDRESS; + ram_end_address+= ram_total_size_get(); + return ram_end_address; +} +/*lint -restore*/ +#endif //ENABLE_DEBUG_LOG_SUPPORT + +/*lint --e{10} --e{19} --e{27} --e{40} --e{529} -save suppress Error 27: Illegal character */ +uint32_t sd_check_ram_start(uint32_t sd_req_ram_start) +{ +#if (defined(S130) || defined(S132) || defined(S332)) +#if defined ( __CC_ARM ) + extern uint32_t Image$$RW_IRAM1$$Base; + const volatile uint32_t ram_start = (uint32_t) &Image$$RW_IRAM1$$Base; +#elif defined ( __ICCARM__ ) + extern uint32_t __ICFEDIT_region_RAM_start__; + volatile uint32_t ram_start = (uint32_t) &__ICFEDIT_region_RAM_start__; +#elif defined ( __GNUC__ ) + extern uint32_t __data_start__; + volatile uint32_t ram_start = (uint32_t) &__data_start__; +#endif//__CC_ARM + if (ram_start != sd_req_ram_start) + { +#if defined(NRF_LOG_USES_RTT) && NRF_LOG_USES_RTT == 1 + uint32_t app_ram_size= ram_end_address_get(); + SD_HANDLER_LOG("RAM START ADDR 0x%x should be adjusted to 0x%x\r\n", + ram_start, + sd_req_ram_start); + app_ram_size -= sd_req_ram_start; + SD_HANDLER_LOG("RAM SIZE should be adjusted to 0x%x \r\n", + app_ram_size); +#endif //NRF_LOG_USES_RTT + return NRF_SUCCESS; + } +#endif//defined(S130) || defined(S132) || defined(S332) + return NRF_SUCCESS; +} + +uint32_t softdevice_enable(ble_enable_params_t * p_ble_enable_params) +{ +#if (defined(S130) || defined(S132) || defined(S332)) + uint32_t err_code; + uint32_t app_ram_base; + +#if defined ( __CC_ARM ) + extern uint32_t Image$$RW_IRAM1$$Base; + const volatile uint32_t ram_start = (uint32_t) &Image$$RW_IRAM1$$Base; +#elif defined ( __ICCARM__ ) + extern uint32_t __ICFEDIT_region_RAM_start__; + volatile uint32_t ram_start = (uint32_t) &__ICFEDIT_region_RAM_start__; +#elif defined ( __GNUC__ ) + extern uint32_t __data_start__; + volatile uint32_t ram_start = (uint32_t) &__data_start__; +#endif + + app_ram_base = ram_start; + SD_HANDLER_LOG("sd_ble_enable: RAM START at 0x%x\r\n", + app_ram_base); + err_code = sd_ble_enable(p_ble_enable_params, &app_ram_base); + +#if defined(NRF_LOG_USES_RTT) && NRF_LOG_USES_RTT == 1 + if (app_ram_base != ram_start) + { + uint32_t app_ram_size= ram_end_address_get(); + SD_HANDLER_LOG("sd_ble_enable: app_ram_base should be adjusted to 0x%x\r\n", + app_ram_base); + app_ram_size -= app_ram_base; + SD_HANDLER_LOG("ram size should be adjusted to 0x%x \r\n", + app_ram_size); + } + else if (err_code != NRF_SUCCESS) + { + SD_HANDLER_LOG("sd_ble_enable: error 0x%x\r\n", err_code); + while(1); + } +#endif // NRF_LOG_USES_RTT + return err_code; +#else + return NRF_SUCCESS; +#endif //defined(S130) || defined(S132) || defined(S332) + +} +/*lint -restore*/ + +#endif //BLE_STACK_SUPPORT_REQD diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.h new file mode 100644 index 0000000000..62b8bea0f3 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.h @@ -0,0 +1,213 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup softdevice_handler SoftDevice Event Handler + * @{ + * @ingroup app_common + * @brief API for initializing and disabling the SoftDevice + * + * @details This API contains the functions and defines exposed by the @ref lib_softdevice_handler. + * For more information on the library and how the application should use it, please refer + * @ref lib_softdevice_handler. + * + * @note Use the USE_SCHEDULER parameter of the SOFTDEVICE_HANDLER_INIT() macro to select if + * the @ref app_scheduler is to be used or not. + * + * @note Even if the scheduler is not used, softdevice_handler.h will include app_scheduler.h. + * So when compiling, app_scheduler.h must be available in one of the compiler include + * paths. + */ + +#ifndef SOFTDEVICE_HANDLER_H__ +#define SOFTDEVICE_HANDLER_H__ + +#include +#include "nordic_common.h" +#include "nrf_sdm.h" +#include "app_error.h" +#include "app_util.h" +#include "ble_stack_handler_types.h" +#include "ant_stack_handler_types.h" +#if defined(BLE_STACK_SUPPORT_REQD) + #include "ble.h" +#endif +#include "app_ram_base.h" +#define SOFTDEVICE_SCHED_EVT_SIZE 0 /**< Size of button events being passed through the scheduler (is to be used for computing the maximum size of scheduler events). For SoftDevice events, this size is 0, since the events are being pulled in the event handler. */ +#define SYS_EVT_MSG_BUF_SIZE sizeof(uint32_t) /**< Size of System (SOC) event message buffer. */ + + +#define CHECK_RAM_START_ADDR_INTERN(CENTRAL_LINK_COUNT, PERIPHERAL_LINK_COUNT) \ + do{ \ + uint32_t app_ram_start_addr = APP_RAM_BASE_CENTRAL_LINKS_##CENTRAL_LINK_COUNT##_PERIPH_LINKS_##PERIPHERAL_LINK_COUNT##_SEC_COUNT_0_MID_BW; \ + err_code = sd_check_ram_start(app_ram_start_addr); \ + APP_ERROR_CHECK(err_code); \ + } while (0) + +/** @brief Macro for checking the RAM requirement of the SoftDevice */ +#define CHECK_RAM_START_ADDR(C_LINK_CNT, P_LINK_CNT) CHECK_RAM_START_ADDR_INTERN(C_LINK_CNT, P_LINK_CNT) + + +/**@brief Function for checking the RAM requirement of the SoftDevice. + * + * @details Call this function to check if the project settings have the correct RAM start address in respect to what the SoftDevice requires. + * + * @note This function is called using the CHECK_RAM_START_ADDR_INTERN macro and should not be called directly. + */ +uint32_t sd_check_ram_start(uint32_t sd_req_ram_start); + +/**@brief Type of function for passing events from the stack handler module to the scheduler. */ +typedef uint32_t (*softdevice_evt_schedule_func_t) (void); + +/**@brief Application System (SOC) event handler type. */ +typedef void (*sys_evt_handler_t) (uint32_t evt_id); + + +/**@brief Macro for initializing the stack event handler. + * + * @details It will handle dimensioning and allocation of the memory buffer required for reading + * events from the stack, making sure the buffer is correctly aligned. It will also + * connect the stack event handler to the scheduler/RTOS (if specified). + * + * @param[in] CLOCK_SOURCE Low frequency clock source and accuracy (type nrf_clock_lf_cfg_t_t, + * see sd_softdevice_enable() for details). + * @param[in] EVT_HANDLER scheduler/RTOS event handler function. + * + * @note Since this macro allocates a buffer, it must only be called once (it is OK to call it + * several times as long as it is from the same location, that is to do a + * reinitialization). + */ +/*lint -emacro(506, SOFTDEVICE_HANDLER_INIT) */ /* Suppress "Constant value Boolean */ +#define SOFTDEVICE_HANDLER_INIT(CLOCK_SOURCE, \ + EVT_HANDLER) \ + do \ + { \ + static uint32_t BLE_EVT_BUFFER[CEIL_DIV(BLE_STACK_EVT_MSG_BUF_SIZE, sizeof(uint32_t))]; \ + uint32_t ERR_CODE; \ + ERR_CODE = softdevice_handler_init((CLOCK_SOURCE), \ + BLE_EVT_BUFFER, \ + sizeof(BLE_EVT_BUFFER), \ + EVT_HANDLER); \ + APP_ERROR_CHECK(ERR_CODE); \ + } while (0) + +/** + * @brief Function for retrieving the information about SD state + * + * The information about current state of softdevice. + * @retval false SD is not initialized and SD commands should not be called. + * @retval true SD is already initialized + */ +bool softdevice_handler_isEnabled(void); + +/**@brief Function for initializing the stack handler module. + * + * @details Enables the SoftDevice and the stack event interrupt handler. + * + * @note This function must be called before calling any function in the SoftDevice API. + * + * @note Normally initialization should be done using the SOFTDEVICE_HANDLER_INIT() macro, + * as that will both allocate the event buffer, and also align the buffer correctly. + * + * @param[in] p_clock_lf_cfg Low frequency clock source to be used by the SoftDevice. + * @param[in] p_ble_evt_buffer Buffer for holding one BLE stack event. Since heap is not being + * used, this buffer must be provided by the application. The + * buffer must be large enough to hold the biggest stack event the + * application is supposed to handle. The buffer must be aligned to + * a 4 byte boundary. This parameter is unused if BLE stack support + * is not required. + * @param[in] ble_evt_buffer_size Size of SoftDevice BLE event buffer. This parameter is unused if + * BLE stack support is not required. + * @param[in] evt_schedule_func Function for passing events to the scheduler. Point to + * ble_ant_stack_evt_schedule() to connect to the scheduler. + * Set to NULL to make the stack handler module call the event + * handler directly from the stack event interrupt handler. + * + * @retval NRF_SUCCESS Successful initialization. + * @retval NRF_ERROR_INVALID_PARAM Invalid parameter (buffer not aligned to a 4 byte + * boundary) or NULL. + */ +uint32_t softdevice_handler_init(nrf_clock_lf_cfg_t * p_clock_lf_cfg, + void * p_ble_evt_buffer, + uint16_t ble_evt_buffer_size, + softdevice_evt_schedule_func_t evt_schedule_func); + + +/**@brief Function for disabling the SoftDevice. + * + * @details This function will disable the SoftDevice. It will also update the internal state + * of this module. + */ +uint32_t softdevice_handler_sd_disable(void); + + +/**@brief Function for registering for System (SOC) events. + * + * @details The application should use this function to register for receiving System (SOC) + * events from the SoftDevice. If the application does not call this function, then any + * System (SOC) events that may be generated by the SoftDevice will NOT be fetched. Once + * the application has registered for the events, it is not possible to possible to + * cancel the registration. However, it is possible to register a different function for + * handling the events at any point of time. + * + * @param[in] sys_evt_handler Function to be called for each received System (SOC) event. + * + * @retval NRF_SUCCESS Successful registration. + * @retval NRF_ERROR_NULL Null pointer provided as input. + */ +uint32_t softdevice_sys_evt_handler_set(sys_evt_handler_t sys_evt_handler); + +#if defined(BLE_STACK_SUPPORT_REQD) +/**@brief Function for fetching the default enable parameters for the SoftDevice. + * + * @details The default enable parameters will work for most projects in the SDK. + * They are not optimized with regards to RAM use. This function is meant as a way to abstract the + * details of p_ble_enable_params needed by @ref softdevice_enable. You might want to tweak + * the struct returned by this function or fill in the entire ble_enable_params_t + * instead of fetching it from this function. + * + * @param[in] central_links_count Number of central links used by the application. + * @param[in] periph_links_count Number of peripheral links used by the application. + * @param[out] p_ble_enable_params Default ble_enable_params_t to be used by @ref softdevice_enable. + * + * @retval NRF_SUCCESS If the operation was successful. + */ +uint32_t softdevice_enable_get_default_config(uint8_t central_links_count, + uint8_t periph_links_count, + ble_enable_params_t * p_ble_enable_params); + +/**@brief Function for enabling the SoftDevice. + * + * @details This function calls the @ref sd_ble_enable SVC call. It has been abstracted to give + * feedback on the app_ram_base. If the app_ram_base is too low, this function will + * return an error. Using a app_ram_base that is too high will not fail, but will + * result in RAM that is never used. If the DEBUG macro is enabled, this + * function will provide the correct app_ram_base as mandated by the SoftDevice. + * This is useful to tweak the RAM use of your application. + * + * @param[in] p_ble_enable_params Parameters for configuring links and bandwidths. + * + * @retval NRF_SUCCESS If the operation was successful. + */ +uint32_t softdevice_enable(ble_enable_params_t * p_ble_enable_params); +#endif //BLE_STACK_SUPPORT_REQD +// Functions for connecting the Stack Event Handler to the scheduler: +/**@cond NO_DOXYGEN */ +void intern_softdevice_events_execute(void); + + +/**@endcond */ + +#endif // SOFTDEVICE_HANDLER_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler_appsh.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler_appsh.c new file mode 100644 index 0000000000..eacb33d2df --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler_appsh.c @@ -0,0 +1,26 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "softdevice_handler_appsh.h" +#include "app_scheduler.h" +#include + +void softdevice_evt_get(void * p_event_data, uint16_t event_size) +{ + APP_ERROR_CHECK_BOOL(event_size == 0); + intern_softdevice_events_execute(); +} + +uint32_t softdevice_evt_schedule(void) +{ + return app_sched_event_put(NULL, 0, softdevice_evt_get); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler_appsh.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler_appsh.h new file mode 100644 index 0000000000..ec78973987 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler_appsh.h @@ -0,0 +1,24 @@ +/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef SOFTDEVICE_HANDLER_APPSH_H +#define SOFTDEVICE_HANDLER_APPSH_H + +#include "softdevice_handler.h" +#include + +#define SOFTDEVICE_HANDLER_APPSH_INIT(CLOCK_SOURCE,USE_SCHEDULER) \ + SOFTDEVICE_HANDLER_INIT(CLOCK_SOURCE,(USE_SCHEDULER) ? softdevice_evt_schedule : NULL) + +uint32_t softdevice_evt_schedule(void); + +#endif //SOFTDEVICE_HANDLER_APPSH_H From 2eaa468c50f23b92b546dee1a1fecaf0be5fc391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C5=82=C4=85bek=2C=20Andrzej?= Date: Wed, 15 Jun 2016 17:51:40 +0100 Subject: [PATCH 08/67] Added missing SDK drivers, added SOFTDEVICE_PRESENT macros in targets definitions. --- hal/targets.json | 6 +- .../sdk/drivers_nrf/clock/nrf_drv_clock.c | 479 ++++++++++++++++++ .../sdk/drivers_nrf/clock/nrf_drv_clock.h | 246 +++++++++ .../sdk/drivers_nrf/common/nrf_drv_common.c | 208 ++++++++ .../sdk/drivers_nrf/common/nrf_drv_common.h | 194 +++++++ .../sdk/drivers_nrf/hal/nrf_clock.h | 414 +++++++++++++++ 6 files changed, 1544 insertions(+), 3 deletions(-) create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/clock/nrf_drv_clock.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/clock/nrf_drv_clock.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/common/nrf_drv_common.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/common/nrf_drv_common.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_clock.h diff --git a/hal/targets.json b/hal/targets.json index 4beaec92bc..477f0bc083 100644 --- a/hal/targets.json +++ b/hal/targets.json @@ -1100,7 +1100,7 @@ "inherits": ["Target"], "core": "Cortex-M0", "OVERRIDE_BOOTLOADER_FILENAME": "nrf51822_bootloader.hex", - "macros": ["NRF51", "TARGET_NRF51822"], + "macros": ["NRF51", "TARGET_NRF51822", "SOFTDEVICE_PRESENT"], "MERGE_BOOTLOADER": false, "extra_labels": ["NORDIC", "MCU_NRF51", "MCU_NRF51822", "NRF5"], "OUTPUT_EXT": "hex", @@ -1738,11 +1738,11 @@ "MCU_NRF52": { "inherits": ["Target"], "core": "Cortex-M4F", - "macros": ["NRF52", "TARGET_NRF52832"], + "macros": ["NRF52", "TARGET_NRF52832", "SOFTDEVICE_PRESENT"], "extra_labels": ["NORDIC", "MCU_NRF52", "MCU_NRF52832", "NRF5"], "OUTPUT_EXT": "hex", "is_disk_virtual": true, - "supported_toolchains": ["ARM", "GCC_ARM"], + "supported_toolchains": ["GCC_ARM"], "public": false, "detect_code": ["1101"], "program_cycle_s": 6, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/clock/nrf_drv_clock.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/clock/nrf_drv_clock.c new file mode 100644 index 0000000000..2d18431ad0 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/clock/nrf_drv_clock.c @@ -0,0 +1,479 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "nrf_drv_clock.h" +#include "nrf_error.h" +#include "nordic_common.h" + +#ifdef SOFTDEVICE_PRESENT +#include "nrf_sdm.h" +#include "nrf_soc.h" +#include "app_util_platform.h" +#else +#include "app_util_platform.h" +#endif // SOFTDEVICE_PRESENT + +/*lint -save -e652 */ +#define NRF_CLOCK_LFCLK_RC CLOCK_LFCLKSRC_SRC_RC +#define NRF_CLOCK_LFCLK_Xtal CLOCK_LFCLKSRC_SRC_Xtal +#define NRF_CLOCK_LFCLK_Synth CLOCK_LFCLKSRC_SRC_Synth +/*lint -restore */ + +#define INT_MAX 0xFFFFFFFF + +#if (CLOCK_CONFIG_LF_SRC == NRF_CLOCK_LFCLK_RC) && !defined(SOFTDEVICE_PRESENT) +#define CALIBRATION_SUPPORT 1 +#else +#define CALIBRATION_SUPPORT 0 +#endif +typedef enum +{ + CAL_STATE_IDLE, + CAL_STATE_CT, + CAL_STATE_HFCLK_REQ, + CAL_STATE_CAL, + CAL_STATE_ABORT, +} nrf_drv_clock_cal_state_t; + +/**@brief CLOCK control block. */ +typedef struct +{ + volatile uint32_t hfclk_requests; /*< High-frequency clock request counter. */ + volatile nrf_drv_clock_handler_item_t * p_hf_head; + bool module_initialized; /*< Indicate the state of module */ + volatile bool hfclk_on; /*< High-frequency clock state. */ +#ifndef SOFTDEVICE_PRESENT + volatile bool lfclk_on; /*< Low-frequency clock state. */ + uint32_t lfclk_requests; /*< Low-frequency clock request counter. */ + volatile nrf_drv_clock_handler_item_t * p_lf_head; +#if CALIBRATION_SUPPORT + nrf_drv_clock_handler_item_t cal_hfclk_started_handler_item; + nrf_drv_clock_event_handler_t cal_done_handler; + volatile nrf_drv_clock_cal_state_t cal_state; +#endif //CALIBRATION_SUPPORT +#endif //SOFTDEVICE_PRESENT +}nrf_drv_clock_cb_t; + +static nrf_drv_clock_cb_t m_clock_cb; + +#ifndef SOFTDEVICE_PRESENT +/**@brief Function for starting LFCLK. This function will return immediately without waiting for start. + */ +static void lfclk_start(void) +{ + nrf_clock_event_clear(NRF_CLOCK_EVENT_LFCLKSTARTED); + nrf_clock_int_enable(NRF_CLOCK_INT_LF_STARTED_MASK); + nrf_clock_task_trigger(NRF_CLOCK_TASK_LFCLKSTART); +} + +/**@brief Function for stopping LFCLK and calibration (if it was set up). + */ +static void lfclk_stop(void) +{ +#if CALIBRATION_SUPPORT + (void)nrf_drv_clock_calibration_abort(); +#endif //CALIBRATION_SUPPORT + + nrf_clock_task_trigger(NRF_CLOCK_TASK_LFCLKSTOP); + while (nrf_clock_lf_is_running()) + {} +} +#endif +static void hfclk_start(void) +{ +#ifndef SOFTDEVICE_PRESENT + nrf_clock_event_clear(NRF_CLOCK_EVENT_HFCLKSTARTED); + nrf_clock_int_enable(NRF_CLOCK_INT_HF_STARTED_MASK); + nrf_clock_task_trigger(NRF_CLOCK_TASK_HFCLKSTART); +#else + UNUSED_VARIABLE(sd_clock_hfclk_request()); +#endif +} + +static void hfclk_stop(void) +{ +#ifndef SOFTDEVICE_PRESENT + nrf_clock_task_trigger(NRF_CLOCK_TASK_HFCLKSTOP); + while (nrf_clock_hf_is_running(NRF_CLOCK_HFCLK_HIGH_ACCURACY)) + {} +#else + UNUSED_VARIABLE(sd_clock_hfclk_release()); +#endif +} + +ret_code_t nrf_drv_clock_init(void) +{ + uint32_t result = NRF_SUCCESS; + + if (m_clock_cb.module_initialized) + { + return MODULE_ALREADY_INITIALIZED; + } + + m_clock_cb.p_hf_head = NULL; + m_clock_cb.hfclk_requests = 0; +#ifndef SOFTDEVICE_PRESENT + m_clock_cb.p_lf_head = NULL; + m_clock_cb.lfclk_requests = 0; + nrf_clock_xtalfreq_set(CLOCK_CONFIG_XTAL_FREQ); + nrf_clock_lf_src_set((nrf_clock_lfclk_t)CLOCK_CONFIG_LF_SRC); + nrf_drv_common_irq_enable(POWER_CLOCK_IRQn, CLOCK_CONFIG_IRQ_PRIORITY); +#if CALIBRATION_SUPPORT + m_clock_cb.cal_state = CAL_STATE_IDLE; +#endif // CALIBRATION_SUPPORT +#else // SOFTDEVICE_PRESENT + uint8_t is_enabled; + result = sd_softdevice_is_enabled(&is_enabled); + if((result == NRF_SUCCESS) && !is_enabled) + { + result = NRF_ERROR_SOFTDEVICE_NOT_ENABLED; + } +#endif // SOFTDEVICE_PRESENT + m_clock_cb.module_initialized = true; + return result; +} + +void nrf_drv_clock_uninit(void) +{ + ASSERT(m_clock_cb.module_initialized); +#ifndef SOFTDEVICE_PRESENT + nrf_drv_common_irq_disable(POWER_CLOCK_IRQn); + nrf_clock_int_disable(0xFFFFFFFF); + lfclk_stop(); +#endif + hfclk_stop(); + m_clock_cb.module_initialized = false; +} + +static void item_enqueue(nrf_drv_clock_handler_item_t ** p_head, + nrf_drv_clock_handler_item_t * p_item) +{ + if (*p_head) + { + p_item->p_next = *p_head; + *p_head = p_item; + } + else + { + p_item->p_next = NULL; + *p_head = p_item; + } +} + +static nrf_drv_clock_handler_item_t * item_dequeue(nrf_drv_clock_handler_item_t ** p_head) +{ + nrf_drv_clock_handler_item_t * p_item = *p_head; + if (p_item) + { + *p_head = p_item->p_next; + } + + return p_item; +} + +void nrf_drv_clock_lfclk_request(nrf_drv_clock_handler_item_t * p_handler_item) +{ + ASSERT(m_clock_cb.module_initialized); +#ifndef SOFTDEVICE_PRESENT + ASSERT(m_clock_cb.lfclk_requests != INT_MAX); + CRITICAL_REGION_ENTER(); + if (m_clock_cb.lfclk_on) + { + if (p_handler_item) + { + p_handler_item->event_handler(NRF_DRV_CLOCK_EVT_LFCLK_STARTED); + } + } + else + { + + if (p_handler_item) + { + item_enqueue((nrf_drv_clock_handler_item_t **)&m_clock_cb.p_lf_head, p_handler_item); + } + if (m_clock_cb.lfclk_requests == 0) + { + lfclk_start(); + } + } + m_clock_cb.lfclk_requests++; + CRITICAL_REGION_EXIT(); +#else + if (p_handler_item) + { + p_handler_item->event_handler(NRF_DRV_CLOCK_EVT_LFCLK_STARTED); + } +#endif // SOFTDEVICE_PRESENT +} + + +void nrf_drv_clock_lfclk_release(void) +{ + ASSERT(m_clock_cb.module_initialized); +#ifndef SOFTDEVICE_PRESENT + ASSERT(m_clock_cb.lfclk_requests > 0); + + CRITICAL_REGION_ENTER(); + m_clock_cb.lfclk_requests--; + if (m_clock_cb.lfclk_requests == 0) + { + lfclk_stop(); + m_clock_cb.lfclk_on = false; + m_clock_cb.p_lf_head = NULL; + } + CRITICAL_REGION_EXIT(); +#endif // SOFTDEVICE_PRESENT +} + + +bool nrf_drv_clock_lfclk_is_running(void) +{ + ASSERT(m_clock_cb.module_initialized); + bool result; +#ifndef SOFTDEVICE_PRESENT + result = nrf_clock_lf_is_running(); +#else + result = true; +#endif + return result; +} + +void nrf_drv_clock_hfclk_request(nrf_drv_clock_handler_item_t * p_handler_item) +{ + ASSERT(m_clock_cb.module_initialized); + ASSERT(m_clock_cb.hfclk_requests != INT_MAX); + + CRITICAL_REGION_ENTER(); + if (m_clock_cb.hfclk_on) + { + if (p_handler_item) + { + p_handler_item->event_handler(NRF_DRV_CLOCK_EVT_HFCLK_STARTED); + } + } + else + { + if (p_handler_item) + { + item_enqueue((nrf_drv_clock_handler_item_t **)&m_clock_cb.p_hf_head, p_handler_item); + } + if (m_clock_cb.hfclk_requests == 0) + { + hfclk_start(); + } + } + m_clock_cb.hfclk_requests++; + CRITICAL_REGION_EXIT(); +} + +void nrf_drv_clock_hfclk_release(void) +{ + ASSERT(m_clock_cb.module_initialized); + ASSERT(m_clock_cb.hfclk_requests > 0); + + //disable interrupts CLOCK or SoftDevice events + CRITICAL_REGION_ENTER(); + m_clock_cb.hfclk_requests--; + if (m_clock_cb.hfclk_requests == 0) + { + hfclk_stop(); + m_clock_cb.hfclk_on = false; + m_clock_cb.p_hf_head = NULL; + } + CRITICAL_REGION_EXIT(); + //enable interrupts CLOCK or SoftDevice events +} + +bool nrf_drv_clock_hfclk_is_running(void) +{ + bool result; + ASSERT(m_clock_cb.module_initialized); +#ifndef SOFTDEVICE_PRESENT + result = nrf_clock_hf_is_running(NRF_CLOCK_HFCLK_HIGH_ACCURACY); +#else + uint32_t is_running; + UNUSED_VARIABLE(sd_clock_hfclk_is_running(&is_running)); + result = is_running ? true : false; +#endif + return result; +} + +#if CALIBRATION_SUPPORT +static void clock_calibration_hf_started(nrf_drv_clock_evt_type_t event) +{ + if (m_clock_cb.cal_state == CAL_STATE_ABORT) + { + nrf_drv_clock_hfclk_release(); + m_clock_cb.cal_state = CAL_STATE_IDLE; + if (m_clock_cb.cal_done_handler) + { + m_clock_cb.cal_done_handler(NRF_DRV_CLOCK_EVT_CAL_ABORTED); + } + } + else + { + nrf_clock_int_enable(NRF_CLOCK_INT_DONE_MASK); + m_clock_cb.cal_state = CAL_STATE_CAL; + nrf_clock_task_trigger(NRF_CLOCK_TASK_CAL); + } +} +#endif + +ret_code_t nrf_drv_clock_calibration_start(uint8_t interval, nrf_drv_clock_event_handler_t handler) +{ +#if CALIBRATION_SUPPORT + ASSERT(m_clock_cb.cal_state == CAL_STATE_IDLE); + ret_code_t ret = NRF_SUCCESS; + if (m_clock_cb.lfclk_on == false) + { + ret = NRF_ERROR_INVALID_STATE; + } + else if (m_clock_cb.cal_state == CAL_STATE_IDLE) + { + m_clock_cb.cal_done_handler = handler; + m_clock_cb.cal_hfclk_started_handler_item.event_handler = clock_calibration_hf_started; + if (interval == 0) + { + m_clock_cb.cal_state = CAL_STATE_HFCLK_REQ; + nrf_drv_clock_hfclk_request(&m_clock_cb.cal_hfclk_started_handler_item); + } + else + { + m_clock_cb.cal_state = CAL_STATE_CT; + nrf_clock_cal_timer_timeout_set(interval); + nrf_clock_int_enable(NRF_CLOCK_INT_CTTO_MASK); + nrf_clock_task_trigger(NRF_CLOCK_TASK_CTSTART); + } + } + else + { + ret = NRF_ERROR_BUSY; + } + return ret; +#else //CALIBRATION_SUPPORT + return NRF_ERROR_FORBIDDEN; +#endif +} + + +ret_code_t nrf_drv_clock_calibration_abort(void) +{ +#if CALIBRATION_SUPPORT + CRITICAL_REGION_ENTER(); + switch(m_clock_cb.cal_state) + { + case CAL_STATE_CT: + nrf_clock_int_disable(NRF_CLOCK_INT_CTTO_MASK); + nrf_clock_task_trigger(NRF_CLOCK_TASK_CTSTOP); + m_clock_cb.cal_state = CAL_STATE_IDLE; + if (m_clock_cb.cal_done_handler) + { + m_clock_cb.cal_done_handler(NRF_DRV_CLOCK_EVT_CAL_ABORTED); + } + break; + case CAL_STATE_HFCLK_REQ: + /* fall through. */ + case CAL_STATE_CAL: + m_clock_cb.cal_state = CAL_STATE_ABORT; + break; + default: + break; + } + CRITICAL_REGION_EXIT(); + return NRF_SUCCESS; +#else //CALIBRATION_SUPPORT + return NRF_ERROR_FORBIDDEN; +#endif +} + +ret_code_t nrf_drv_clock_is_calibrating(bool * p_is_calibrating) +{ +#if CALIBRATION_SUPPORT + ASSERT(m_clock_cb.module_initialized); + *p_is_calibrating = (m_clock_cb.cal_state != CAL_STATE_IDLE); + return NRF_SUCCESS; +#else //CALIBRATION_SUPPORT + return NRF_ERROR_FORBIDDEN; +#endif +} + +static __INLINE void clock_clk_started_notify(nrf_drv_clock_handler_item_t **p_head, + nrf_drv_clock_evt_type_t evt_type) +{ + while(1) + { + nrf_drv_clock_handler_item_t * p_item = item_dequeue(p_head); + if (p_item) + { + p_item->event_handler(evt_type); + } + else + { + break; + } + } +} + +#ifndef SOFTDEVICE_PRESENT +void POWER_CLOCK_IRQHandler(void) +{ + if (nrf_clock_event_check(NRF_CLOCK_EVENT_HFCLKSTARTED)) + { + nrf_clock_event_clear(NRF_CLOCK_EVENT_HFCLKSTARTED); + nrf_clock_int_disable(NRF_CLOCK_INT_HF_STARTED_MASK); + m_clock_cb.hfclk_on = true; + clock_clk_started_notify((nrf_drv_clock_handler_item_t **)&m_clock_cb.p_hf_head, NRF_DRV_CLOCK_EVT_HFCLK_STARTED); + } + if (nrf_clock_event_check(NRF_CLOCK_EVENT_LFCLKSTARTED)) + { + nrf_clock_event_clear(NRF_CLOCK_EVENT_LFCLKSTARTED); + nrf_clock_int_disable(NRF_CLOCK_INT_LF_STARTED_MASK); + m_clock_cb.lfclk_on = true; + clock_clk_started_notify((nrf_drv_clock_handler_item_t **)&m_clock_cb.p_lf_head, NRF_DRV_CLOCK_EVT_LFCLK_STARTED); + } +#if CALIBRATION_SUPPORT + if (nrf_clock_event_check(NRF_CLOCK_EVENT_CTTO)) + { + nrf_clock_event_clear(NRF_CLOCK_EVENT_CTTO); + nrf_clock_int_disable(NRF_CLOCK_INT_CTTO_MASK); + nrf_drv_clock_hfclk_request(&m_clock_cb.cal_hfclk_started_handler_item); + } + + if (nrf_clock_event_check(NRF_CLOCK_EVENT_DONE)) + { + nrf_clock_event_clear(NRF_CLOCK_EVENT_DONE); + nrf_clock_int_disable(NRF_CLOCK_INT_DONE_MASK); + + nrf_drv_clock_hfclk_release(); + nrf_drv_clock_evt_type_t evt_type = (m_clock_cb.cal_state == CAL_STATE_ABORT) ? + NRF_DRV_CLOCK_EVT_CAL_ABORTED : NRF_DRV_CLOCK_EVT_CAL_DONE; + m_clock_cb.cal_state = CAL_STATE_IDLE; + if (m_clock_cb.cal_done_handler) + { + m_clock_cb.cal_done_handler(evt_type); + } + } +#endif //CALIBRATION_SUPPORT +} +#else +void nrf_drv_clock_on_soc_event(uint32_t evt_id) +{ + if (evt_id == NRF_EVT_HFCLKSTARTED) + { + clock_clk_started_notify((nrf_drv_clock_handler_item_t **)&m_clock_cb.p_hf_head, NRF_DRV_CLOCK_EVT_HFCLK_STARTED); + } +} +#endif // SOFTDEVICE_PRESENT + +#undef NRF_CLOCK_LFCLK_RC +#undef NRF_CLOCK_LFCLK_Xtal +#undef NRF_CLOCK_LFCLK_Synth diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/clock/nrf_drv_clock.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/clock/nrf_drv_clock.h new file mode 100644 index 0000000000..d0a650cf09 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/clock/nrf_drv_clock.h @@ -0,0 +1,246 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef NRF_DRV_CLOCK_H__ +#define NRF_DRV_CLOCK_H__ + +#include +#include +#include "sdk_errors.h" +#include "nrf_assert.h" +#include "nrf_clock.h" +#include "nrf_drv_config.h" +#include "nrf_drv_common.h" + +/** + * + * @addtogroup nrf_clock Clock HAL and driver + * @ingroup nrf_drivers + * @brief Clock APIs. + * @details The clock HAL provides basic APIs for accessing the registers of the clock. + * The clock driver provides APIs on a higher level. + * + * @defgroup nrf_clock_drv Clock driver + * @{ + * @ingroup nrf_clock + * @brief Driver for managing the low-frequency clock (LFCLK) and the high-frequency clock (HFCLK). + */ + +/** + * @brief Clock events. + */ +typedef enum +{ + NRF_DRV_CLOCK_EVT_HFCLK_STARTED, ///< HFCLK has been started. + NRF_DRV_CLOCK_EVT_LFCLK_STARTED, ///< LFCLK has been started. + NRF_DRV_CLOCK_EVT_CAL_DONE, ///< Calibration is done. + NRF_DRV_CLOCK_EVT_CAL_ABORTED, ///< Calibration has been aborted. +} nrf_drv_clock_evt_type_t; + +/** + * @brief Clock event handler. + * + * @param[in] event Event. + */ +typedef void (*nrf_drv_clock_event_handler_t)(nrf_drv_clock_evt_type_t event); + +// Forward declaration of the nrf_drv_clock_handler_item_t type. +typedef struct nrf_drv_clock_handler_item_s nrf_drv_clock_handler_item_t; + +struct nrf_drv_clock_handler_item_s +{ + nrf_drv_clock_handler_item_t * p_next; ///< A pointer to the next handler that should be called when the clock is started. + nrf_drv_clock_event_handler_t event_handler; ///< Function to be called when the clock is started. +}; + +/** + * @brief Function for initializing the nrf_drv_clock module. + * + * After initialization, the module is in power off state (clocks are not requested). + * + * @retval NRF_SUCCESS If the procedure was successful. + * @retval MODULE_ALREADY_INITIALIZED If the driver was already initialized. + * @retval NRF_ERROR_SOFTDEVICE_NOT_ENABLED If the SoftDevice was not enabled. + */ +ret_code_t nrf_drv_clock_init(void); + +/** + * @brief Function for uninitializing the clock module. + * + */ +void nrf_drv_clock_uninit(void); + +/** + * @brief Function for requesting the LFCLK. + * + * The low-frequency clock can be requested by different modules + * or contexts. The driver ensures that the clock will be started only when it is requested + * the first time. If the clock is not ready but it was already started, the handler item that is + * provided as an input parameter is added to the list of handlers that will be notified + * when the clock is started. If the clock is already enabled, user callback is called from the + * current context. + * + * The first request will start the selected LFCLK source. If an event handler is + * provided, it will be called once the LFCLK is started. If the LFCLK was already started at this + * time, the event handler will be called from the context of this function. Additionally, + * the @ref nrf_drv_clock_lfclk_is_running function can be polled to check if the clock has started. + * + * @note When a SoftDevice is enabled, the LFCLK is always running and the driver cannot control it. + * + * @note The handler item provided by the user cannot be an automatic variable. + * + * @param[in] p_handler_item A pointer to the event handler structure. + */ +void nrf_drv_clock_lfclk_request(nrf_drv_clock_handler_item_t * p_handler_item); + +/** + * @brief Function for releasing the LFCLK. + * + * If there are no more requests, the LFCLK source will be stopped. + * + * @note When a SoftDevice is enabled, the LFCLK is always running. + */ +void nrf_drv_clock_lfclk_release(void); + +/** + * @brief Function for checking the LFCLK state. + * + * @retval true If the LFCLK is running. + * @retval false If the LFCLK is not running. + */ +bool nrf_drv_clock_lfclk_is_running(void); + +/** + * @brief Function for requesting the high-accuracy source HFCLK. + * + * The high-accuracy source + * can be requested by different modules or contexts. The driver ensures that the high-accuracy + * clock will be started only when it is requested the first time. If the clock is not ready + * but it was already started, the handler item that is provided as an input parameter is added + * to the list of handlers that will be notified when the clock is started. + * + * If an event handler is provided, it will be called once the clock is started. If the clock was already + * started at this time, the event handler will be called from the context of this function. Additionally, + * the @ref nrf_drv_clock_hfclk_is_running function can be polled to check if the clock has started. + * + * @note If a SoftDevice is running, the clock is managed by the SoftDevice and all requests are handled by + * the SoftDevice. This function cannot be called from all interrupt priority levels in that case. + * @note The handler item provided by the user cannot be an automatic variable. + * + * @param[in] p_handler_item A pointer to the event handler structure. + */ +void nrf_drv_clock_hfclk_request(nrf_drv_clock_handler_item_t * p_handler_item); + +/** + * @brief Function for releasing the high-accuracy source HFCLK. + * + * If there are no more requests, the high-accuracy source will be released. + */ +void nrf_drv_clock_hfclk_release(void); + +/** + * @brief Function for checking the HFCLK state. + * + * @retval true If the HFCLK is running (for \nRFXX XTAL source). + * @retval false If the HFCLK is not running. + */ +bool nrf_drv_clock_hfclk_is_running(void); + +/** + * @brief Function for starting a single calibration process. + * + * This function can also delay the start of calibration by a user-specified value. The delay will use + * a low-power timer that is part of the CLOCK module. @ref nrf_drv_clock_is_calibrating can be called to + * check if calibration is still in progress. If a handler is provided, the user can be notified when + * calibration is completed. The ext calibration can be started from the handler context. + * + * The calibration process consists of three phases: + * - Delay (optional) + * - Requesting the high-accuracy HFCLK + * - Hardware-supported calibration + * + * @param[in] delay Time after which the calibration will be started (in 0.25 s units). + * @param[in] handler NULL or user function to be called when calibration is completed or aborted. + * + * @retval NRF_SUCCESS If the procedure was successful. + * @retval NRF_ERROR_FORBIDDEN If a SoftDevice is present or the selected LFCLK source is not an RC oscillator. + * @retval NRF_ERROR_INVALID_STATE If the low-frequency clock is off. + * @retval NRF_ERROR_BUSY If calibration is in progress. + */ +ret_code_t nrf_drv_clock_calibration_start(uint8_t delay, nrf_drv_clock_event_handler_t handler); + +/** + * @brief Function for aborting calibration. + * + * This function aborts on-going calibration. If calibration was started, it cannot be stopped. If a handler + * was provided by @ref nrf_drv_clock_calibration_start, this handler will be called once + * aborted calibration is completed. @ref nrf_drv_clock_is_calibrating can also be used to check + * if the system is calibrating. + * + * @retval NRF_SUCCESS If the procedure was successful. + * @retval NRF_ERROR_FORBIDDEN If a SoftDevice is present or the selected LFCLK source is not an RC oscillator. + */ +ret_code_t nrf_drv_clock_calibration_abort(void); + +/** + * @brief Function for checking if calibration is in progress. + * + * This function indicates that the system is + * in calibration if it is in any of the calibration process phases (see @ref nrf_drv_clock_calibration_start). + * + * @param[out] p_is_calibrating True if calibration is in progress, false if not. + * + * @retval NRF_SUCCESS If the procedure was successful. + * @retval NRF_ERROR_FORBIDDEN If a SoftDevice is present or the selected LFCLK source is not an RC oscillator. + */ +ret_code_t nrf_drv_clock_is_calibrating(bool * p_is_calibrating); + +/**@brief Function for returning a requested task address for the clock driver module. + * + * @param[in] task One of the peripheral tasks. + * + * @return Task address. + */ +__STATIC_INLINE uint32_t nrf_drv_clock_ppi_task_addr(nrf_clock_task_t task); + +/**@brief Function for returning a requested event address for the clock driver module. + * + * @param[in] event One of the peripheral events. + * + * @return Event address. + */ +__STATIC_INLINE uint32_t nrf_drv_clock_ppi_event_addr(nrf_clock_event_t event); + +/** + * @brief Function called by the SoftDevice handler if an @ref nrf_soc event is received from the SoftDevice. + */ +#ifdef SOFTDEVICE_PRESENT +void nrf_drv_clock_on_soc_event(uint32_t evt_id); +#endif +/** + *@} + **/ + +#ifndef SUPPRESS_INLINE_IMPLEMENTATION +__STATIC_INLINE uint32_t nrf_drv_clock_ppi_task_addr(nrf_clock_task_t task) +{ + return nrf_clock_task_address_get(task); +} + +__STATIC_INLINE uint32_t nrf_drv_clock_ppi_event_addr(nrf_clock_event_t event) +{ + return nrf_clock_event_address_get(event); +} +#endif //SUPPRESS_INLINE_IMPLEMENTATION + +/*lint --flb "Leave library region" */ +#endif // NRF_CLOCK_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/common/nrf_drv_common.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/common/nrf_drv_common.c new file mode 100644 index 0000000000..8aa1ce1e42 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/common/nrf_drv_common.c @@ -0,0 +1,208 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include +#include "nrf_drv_common.h" +#include "nrf_assert.h" +#include "app_util_platform.h" + +#ifdef SOFTDEVICE_PRESENT +#include "nrf_soc.h" +#endif + + +#if PERIPHERAL_RESOURCE_SHARING_ENABLED + +typedef struct { + nrf_drv_irq_handler_t handler; + bool acquired; +} shared_resource_t; + +// SPIM0, SPIS0, SPI0, TWIM0, TWIS0, TWI0 +#if (SPI0_ENABLED || SPIS0_ENABLED || TWI0_ENABLED || TWIS0_ENABLED) + #define SERIAL_BOX_0_IN_USE + // [this checking may need a different form in unit tests, hence macro] + #ifndef IS_SERIAL_BOX_0 + #define IS_SERIAL_BOX_0(p_per_base) (p_per_base == NRF_SPI0) + #endif + + static shared_resource_t m_serial_box_0 = { .acquired = false }; + void SPI0_TWI0_IRQHandler(void) + { + ASSERT(m_serial_box_0.handler); + m_serial_box_0.handler(); + } +#endif // (SPI0_ENABLED || SPIS0_ENABLED || TWI0_ENABLED || TWIS0_ENABLED) + +// SPIM1, SPIS1, SPI1, TWIM1, TWIS1, TWI1 +#if (SPI1_ENABLED || SPIS1_ENABLED || TWI1_ENABLED || TWIS1_ENABLED) + #define SERIAL_BOX_1_IN_USE + // [this checking may need a different form in unit tests, hence macro] + #ifndef IS_SERIAL_BOX_1 + #define IS_SERIAL_BOX_1(p_per_base) (p_per_base == NRF_SPI1) + #endif + + static shared_resource_t m_serial_box_1 = { .acquired = false }; + void SPI1_TWI1_IRQHandler(void) + { + ASSERT(m_serial_box_1.handler); + m_serial_box_1.handler(); + } +#endif // (SPI1_ENABLED || SPIS1_ENABLED || TWI1_ENABLED || TWIS1_ENABLED) + +// SPIM2, SPIS2, SPI2 +#if (SPI2_ENABLED || SPIS2_ENABLED) + #define SERIAL_BOX_2_IN_USE + // [this checking may need a different form in unit tests, hence macro] + #ifndef IS_SERIAL_BOX_2 + #define IS_SERIAL_BOX_2(p_per_base) (p_per_base == NRF_SPI2) + #endif + + static shared_resource_t m_serial_box_2 = { .acquired = false }; + void SPIM2_SPIS2_SPI2_IRQHandler(void) + { + ASSERT(m_serial_box_2.handler); + m_serial_box_2.handler(); + } +#endif // (SPI2_ENABLED || SPIS2_ENABLED) + +// COMP, LPCOMP +#if (COMP_ENABLED || LPCOMP_ENABLED) + #define COMP_LPCOMP_IN_USE + + #ifndef IS_COMP_LPCOMP + #define IS_COMP_LPCOMP(p_per_base) ((p_per_base) == NRF_LPCOMP) + #endif + + static shared_resource_t m_comp_lpcomp = { .acquired = false }; + void LPCOMP_IRQHandler(void) + { + ASSERT(m_comp_lpcomp.handler); + m_comp_lpcomp.handler(); + } +#endif // (COMP_ENABLED || LPCOMP_ENABLED) + +#if defined(SERIAL_BOX_0_IN_USE) || \ + defined(SERIAL_BOX_1_IN_USE) || \ + defined(SERIAL_BOX_2_IN_USE) || \ + defined(COMP_LPCOMP_IN_USE) +static ret_code_t acquire_shared_resource(shared_resource_t * p_resource, + nrf_drv_irq_handler_t handler) +{ + bool busy = false; + + CRITICAL_REGION_ENTER(); + if (p_resource->acquired) + { + busy = true; + } + else + { + p_resource->acquired = true; + } + CRITICAL_REGION_EXIT(); + + if (busy) + { + return NRF_ERROR_BUSY; + } + + p_resource->handler = handler; + return NRF_SUCCESS; +} +#endif + +ret_code_t nrf_drv_common_per_res_acquire(void const * p_per_base, + nrf_drv_irq_handler_t handler) +{ +#ifdef SERIAL_BOX_0_IN_USE + if (IS_SERIAL_BOX_0(p_per_base)) + { + return acquire_shared_resource(&m_serial_box_0, handler); + } +#endif + +#ifdef SERIAL_BOX_1_IN_USE + if (IS_SERIAL_BOX_1(p_per_base)) + { + return acquire_shared_resource(&m_serial_box_1, handler); + } +#endif + +#ifdef SERIAL_BOX_2_IN_USE + if (IS_SERIAL_BOX_2(p_per_base)) + { + return acquire_shared_resource(&m_serial_box_2, handler); + } +#endif + +#ifdef COMP_LPCOMP_IN_USE + if (IS_COMP_LPCOMP(p_per_base)) + { + return acquire_shared_resource(&m_comp_lpcomp, handler); + } +#endif + + return NRF_ERROR_INVALID_PARAM; +} + +void nrf_drv_common_per_res_release(void const * p_per_base) +{ +#ifdef SERIAL_BOX_0_IN_USE + if (IS_SERIAL_BOX_0(p_per_base)) + { + m_serial_box_0.acquired = false; + } + else +#endif + +#ifdef SERIAL_BOX_1_IN_USE + if (IS_SERIAL_BOX_1(p_per_base)) + { + m_serial_box_1.acquired = false; + } + else +#endif + +#ifdef SERIAL_BOX_2_IN_USE + if (IS_SERIAL_BOX_2(p_per_base)) + { + m_serial_box_2.acquired = false; + } + else +#endif + +#ifdef COMP_LPCOMP_IN_USE + if (IS_COMP_LPCOMP(p_per_base)) + { + m_comp_lpcomp.acquired = false; + } + else +#endif + + {} +} + +#endif // PERIPHERAL_RESOURCE_SHARING_ENABLED + + +void nrf_drv_common_irq_enable(IRQn_Type IRQn, uint8_t priority) +{ + +#ifdef SOFTDEVICE_PRESENT + ASSERT((priority == APP_IRQ_PRIORITY_LOW) || (priority == APP_IRQ_PRIORITY_HIGH)); +#endif + + NVIC_SetPriority(IRQn, priority); + NVIC_ClearPendingIRQ(IRQn); + NVIC_EnableIRQ(IRQn); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/common/nrf_drv_common.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/common/nrf_drv_common.h new file mode 100644 index 0000000000..77785d8f54 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/common/nrf_drv_common.h @@ -0,0 +1,194 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef NRF_DRV_COMMON_H__ +#define NRF_DRV_COMMON_H__ + +#include +#include +#include "nrf.h" +#include "sdk_errors.h" +#include "nrf_drv_config.h" + + +/** + * @brief Offset of event registers in every peripheral instance + * + * This is the offset where event registers start in the every peripheral. + */ +#define NRF_DRV_COMMON_EVREGS_OFFSET 0x100U + +/** + * @brief Driver state. + */ +typedef enum +{ + NRF_DRV_STATE_UNINITIALIZED, /**< Uninitialized. */ + NRF_DRV_STATE_INITIALIZED, /**< Initialized but powered off. */ + NRF_DRV_STATE_POWERED_ON +} nrf_drv_state_t; + +/** + * @brief Driver power state selection. + */ +typedef enum +{ + NRF_DRV_PWR_CTRL_ON, /**< Power on request. */ + NRF_DRV_PWR_CTRL_OFF /**< Power off request. */ +} nrf_drv_pwr_ctrl_t; + +/** + * @brief IRQ handler type. + */ +typedef void (*nrf_drv_irq_handler_t)(void); + + +#if PERIPHERAL_RESOURCE_SHARING_ENABLED + +/** + * @brief Function for acquiring shared peripheral resources associated with + * the specified peripheral. + * + * Certain resources and registers are shared among peripherals that have + * the same ID (for example: SPI0, SPIM0, SPIS0, TWI0, TWIM0, and TWIS0). + * Only one of them can be utilized at a given time. This function reserves + * proper resources to be used by the specified peripheral. + * If PERIPHERAL_RESOURCE_SHARING_ENABLED is set to a non-zero value, IRQ + * handlers for peripherals that are sharing resources with others are + * implemented by the nrf_drv_common module instead of individual drivers. + * The drivers must then specify their interrupt handling routines and + * register them by using this function. + * + * @param[in] p_per_base Requested peripheral base pointer. + * @param[in] handler Interrupt handler to register. May be NULL + * if interrupts are not used for the peripheral. + * + * @retval NRF_SUCCESS If resources were acquired successfully. + * @retval NRF_ERROR_BUSY If resources were already acquired. + * @retval NRF_ERROR_INVALID_PARAM If the specified peripheral is not enabled + * or the peripheral does not share resources + * with other peripherals. + */ +ret_code_t nrf_drv_common_per_res_acquire(void const * p_per_base, + nrf_drv_irq_handler_t handler); + +/** + * @brief Function for releasing shared resources reserved previously by + * @ref nrf_drv_common_per_res_acquire() for the specified peripheral. + * + * @param[in] p_per_base Requested peripheral base pointer. + */ +void nrf_drv_common_per_res_release(void const * p_per_base); + +#endif // PERIPHERAL_RESOURCE_SHARING_ENABLED + + +/** + * @brief Function sets priority and enables NVIC interrupt + * + * @note Function checks if correct priority is used when softdevice is present + * + * @param[in] IRQn Interrupt id + * @param[in] priority Interrupt priority + */ +void nrf_drv_common_irq_enable(IRQn_Type IRQn, uint8_t priority); + +/** + * @brief Function disables NVIC interrupt + * + * @param[in] IRQn Interrupt id + */ +__STATIC_INLINE void nrf_drv_common_irq_disable(IRQn_Type IRQn); + +/** + * @brief Convert bit position to event code + * + * Function for converting the bit position in INTEN register to event code + * that is equivalent to the offset of the event register from the beginning + * of peripheral instance. + * + * For example the result of this function can be casted directly to + * the types like @ref nrf_twis_event_t or @ref nrf_rng_events_t... + * + * @param bit Bit position in INTEN register + * @return Event code to be casted to the right enum type or to be used in functions like + * @ref nrf_rng_event_get + * + * @sa nrf_drv_event_to_bitpos + */ +__STATIC_INLINE uint32_t nrf_drv_bitpos_to_event(uint32_t bit); + +/** + * @brief Convert event code to bit position + * + * This function can be used to get bit position in INTEN register from event code. + * + * @param event Event code that may be casted from enum values from types like + * @ref nrf_twis_event_t or @ref nrf_rng_events_t + * @return Bit position in INTEN register that corresponds to the given code. + * + * @sa nrf_drv_bitpos_to_event + */ +__STATIC_INLINE uint32_t nrf_drv_event_to_bitpos(uint32_t event); + +/** + * @brief Get interrupt number connected with given instance + * + * Function returns interrupt number for a given instance of any peripheral. + * @param[in] pinst Pointer to peripheral registry + * @return Interrupt number + */ +__STATIC_INLINE IRQn_Type nrf_drv_get_IRQn(void const * const pinst); + +/** + * @brief Check if given object is in RAM + * + * Function for analyzing if given location is placed in RAM. + * This function is used to determine if we have address that can be supported by EasyDMA. + * @param[in] ptr Pointer to the object + * @retval true Object is located in RAM + * @retval false Object is not located in RAM + */ +__STATIC_INLINE bool nrf_drv_is_in_RAM(void const * const ptr); + + +#ifndef SUPPRESS_INLINE_IMPLEMENTATION + +__STATIC_INLINE void nrf_drv_common_irq_disable(IRQn_Type IRQn) +{ + NVIC_DisableIRQ(IRQn); +} + +__STATIC_INLINE uint32_t nrf_drv_bitpos_to_event(uint32_t bit) +{ + return NRF_DRV_COMMON_EVREGS_OFFSET + bit * sizeof(uint32_t); +} + +__STATIC_INLINE uint32_t nrf_drv_event_to_bitpos(uint32_t event) +{ + return (event - NRF_DRV_COMMON_EVREGS_OFFSET) / sizeof(uint32_t); +} + +__STATIC_INLINE IRQn_Type nrf_drv_get_IRQn(void const * const pinst) +{ + uint8_t ret = (uint8_t)((uint32_t)pinst>>12U); + return (IRQn_Type) ret; +} + +__STATIC_INLINE bool nrf_drv_is_in_RAM(void const * const ptr) +{ + return ((((uintptr_t)ptr) & 0xE0000000u) == 0x20000000u); +} + +#endif // SUPPRESS_INLINE_IMPLEMENTATION + +#endif // NRF_DRV_COMMON_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_clock.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_clock.h new file mode 100644 index 0000000000..d61d260387 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_clock.h @@ -0,0 +1,414 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef NRF_CLOCK_H__ +#define NRF_CLOCK_H__ + +#include +#include + +#include "nrf.h" + +/** + * @defgroup nrf_clock_hal Clock HAL + * @{ + * @ingroup nrf_clock + * @brief Hardware access layer for managing the low-frequency clock (LFCLK) and the high-frequency clock (HFCLK). + */ + +#define NRF_CLOCK_TASK_TRIGGER (1UL) +#define NRF_CLOCK_EVENT_CLEAR (0UL) + +/** + * @brief Low-frequency clock sources. + * @details Used by LFCLKSRC, LFCLKSTAT, and LFCLKSRCCOPY registers. + */ +typedef enum +{ + NRF_CLOCK_LFCLK_RC = CLOCK_LFCLKSRC_SRC_RC, /**< Internal 32 kHz RC oscillator. */ + NRF_CLOCK_LFCLK_Xtal = CLOCK_LFCLKSRC_SRC_Xtal, /**< External 32 kHz crystal. */ + NRF_CLOCK_LFCLK_Synth = CLOCK_LFCLKSRC_SRC_Synth /**< Internal 32 kHz synthesizer from HFCLK system clock. */ +} nrf_clock_lfclk_t; + +/** + * @brief High-frequency clock sources. + */ +typedef enum +{ + NRF_CLOCK_HFCLK_LOW_ACCURACY = CLOCK_HFCLKSTAT_SRC_RC, /**< Internal 16 MHz RC oscillator. */ + NRF_CLOCK_HFCLK_HIGH_ACCURACY = CLOCK_HFCLKSTAT_SRC_Xtal /**< External 16 MHz/32 MHz crystal oscillator. */ +} nrf_clock_hfclk_t; + +/** + * @brief Trigger status of task LFCLKSTART/HFCLKSTART. + * @details Used by LFCLKRUN and HFCLKRUN registers. + */ +typedef enum +{ + NRF_CLOCK_START_TASK_NOT_TRIGGERED = CLOCK_LFCLKRUN_STATUS_NotTriggered, /**< Task LFCLKSTART/HFCLKSTART has not been triggered. */ + NRF_CLOCK_START_TASK_TRIGGERED = CLOCK_LFCLKRUN_STATUS_Triggered /**< Task LFCLKSTART/HFCLKSTART has been triggered. */ +} nrf_clock_start_task_status_t; + +/** + * @brief Crystal frequency selection. + */ +typedef enum +{ +#ifdef NRF51 + NRF_CLOCK_XTALFREQ_Default = CLOCK_XTALFREQ_XTALFREQ_16MHz, /**< Default. 32 MHz. */ + NRF_CLOCK_XTALFREQ_16MHz = CLOCK_XTALFREQ_XTALFREQ_16MHz, /**< 16 MHz crystal. */ + NRF_CLOCK_XTALFREQ_32MHz = CLOCK_XTALFREQ_XTALFREQ_32MHz /**< 32 MHz crystal. */ +#elif defined NRF52 + NRF_CLOCK_XTALFREQ_Default, /**< Default. 64MHz. */ +#endif +} nrf_clock_xtalfreq_t; + +/** + * @brief Interrupts. + */ +typedef enum +{ + NRF_CLOCK_INT_HF_STARTED_MASK = CLOCK_INTENSET_HFCLKSTARTED_Msk, /**< Interrupt on HFCLKSTARTED event. */ + NRF_CLOCK_INT_LF_STARTED_MASK = CLOCK_INTENSET_LFCLKSTARTED_Msk, /**< Interrupt on LFCLKSTARTED event. */ + NRF_CLOCK_INT_DONE_MASK = CLOCK_INTENSET_DONE_Msk, /**< Interrupt on DONE event. */ + NRF_CLOCK_INT_CTTO_MASK = CLOCK_INTENSET_CTTO_Msk /**< Interrupt on CTTO event. */ +} nrf_clock_int_mask_t; + +/** + * @brief Tasks. + * + * @details The NRF_CLOCK_TASK_LFCLKSTOP task cannot be set when the low-frequency clock is not running. + * The NRF_CLOCK_TASK_HFCLKSTOP task cannot be set when the high-frequency clock is not running. + */ +typedef enum /*lint -save -e30 -esym(628,__INTADDR__) */ +{ + NRF_CLOCK_TASK_HFCLKSTART = offsetof(NRF_CLOCK_Type, TASKS_HFCLKSTART), /**< Start HFCLK clock source.*/ + NRF_CLOCK_TASK_HFCLKSTOP = offsetof(NRF_CLOCK_Type, TASKS_HFCLKSTOP), /**< Stop HFCLK clock source.*/ + NRF_CLOCK_TASK_LFCLKSTART = offsetof(NRF_CLOCK_Type, TASKS_LFCLKSTART), /**< Start LFCLK clock source.*/ + NRF_CLOCK_TASK_LFCLKSTOP = offsetof(NRF_CLOCK_Type, TASKS_LFCLKSTOP), /**< Stop LFCLK clock source.*/ + NRF_CLOCK_TASK_CAL = offsetof(NRF_CLOCK_Type, TASKS_CAL), /**< Start calibration of LFCLK RC oscillator.*/ + NRF_CLOCK_TASK_CTSTART = offsetof(NRF_CLOCK_Type, TASKS_CTSTART), /**< Start calibration timer.*/ + NRF_CLOCK_TASK_CTSTOP = offsetof(NRF_CLOCK_Type, TASKS_CTSTOP) /**< Stop calibration timer.*/ +} nrf_clock_task_t; /*lint -restore */ + +/** + * @brief Events. + */ +typedef enum /*lint -save -e30 -esym(628,__INTADDR__) */ +{ + NRF_CLOCK_EVENT_HFCLKSTARTED = offsetof(NRF_CLOCK_Type, EVENTS_HFCLKSTARTED), /**< HFCLK oscillator started.*/ + NRF_CLOCK_EVENT_LFCLKSTARTED = offsetof(NRF_CLOCK_Type, EVENTS_LFCLKSTARTED), /**< LFCLK oscillator started.*/ + NRF_CLOCK_EVENT_DONE = offsetof(NRF_CLOCK_Type, EVENTS_DONE), /**< Calibration of LFCLK RC oscillator completed.*/ + NRF_CLOCK_EVENT_CTTO = offsetof(NRF_CLOCK_Type, EVENTS_CTTO) /**< Calibration timer time-out.*/ +} nrf_clock_event_t; /*lint -restore */ + +/** + * @brief Function for enabling a specific interrupt. + * + * @param[in] int_mask Interrupt. + */ +__STATIC_INLINE void nrf_clock_int_enable(uint32_t int_mask); + +/** + * @brief Function for disabling a specific interrupt. + * + * @param[in] int_mask Interrupt. + */ +__STATIC_INLINE void nrf_clock_int_disable(uint32_t int_mask); + +/** + * @brief Function for retrieving the state of a specific interrupt. + * + * @param[in] int_mask Interrupt. + * + * @retval true If the interrupt is enabled. + * @retval false If the interrupt is not enabled. + */ +__STATIC_INLINE bool nrf_clock_int_enable_check(nrf_clock_int_mask_t int_mask); + +/** + * @brief Function for retrieving the address of a specific task. + * @details This function can be used by the PPI module. + * + * @param[in] task Task. + * + * @return Address of the requested task register. + */ +__STATIC_INLINE uint32_t nrf_clock_task_address_get(nrf_clock_task_t task); + +/** + * @brief Function for setting a specific task. + * + * @param[in] task Task. + */ +__STATIC_INLINE void nrf_clock_task_trigger(nrf_clock_task_t task); + +/** + * @brief Function for retrieving the address of a specific event. + * @details This function can be used by the PPI module. + * + * @param[in] event Event. + * + * @return Address of the requested event register. + */ +__STATIC_INLINE uint32_t nrf_clock_event_address_get(nrf_clock_event_t event); + +/** + * @brief Function for clearing a specific event. + * + * @param[in] event Event. + */ +__STATIC_INLINE void nrf_clock_event_clear(nrf_clock_event_t event); + +/** + * @brief Function for retrieving the state of a specific event. + * + * @param[in] event Event. + * + * @retval true If the event is set. + * @retval false If the event is not set. + */ +__STATIC_INLINE bool nrf_clock_event_check(nrf_clock_event_t event); + +/** + * @brief Function for changing the low-frequency clock source. + * @details This function cannot be called when the low-frequency clock is running. + * + * @param[in] source New low-frequency clock source. + * + */ +__STATIC_INLINE void nrf_clock_lf_src_set(nrf_clock_lfclk_t source); + +/** + * @brief Function for retrieving the selected source for the low-frequency clock. + * + * @retval NRF_CLOCK_LFCLK_RC If the internal 32 kHz RC oscillator is the selected source for the low-frequency clock. + * @retval NRF_CLOCK_LFCLK_Xtal If an external 32 kHz crystal oscillator is the selected source for the low-frequency clock. + * @retval NRF_CLOCK_LFCLK_Synth If the internal 32 kHz synthesizer from the HFCLK is the selected source for the low-frequency clock. + */ +__STATIC_INLINE nrf_clock_lfclk_t nrf_clock_lf_src_get(void); + +/** + * @brief Function for retrieving the active source of the low-frequency clock. + * + * @retval NRF_CLOCK_LFCLK_RC If the internal 32 kHz RC oscillator is the active source of the low-frequency clock. + * @retval NRF_CLOCK_LFCLK_Xtal If an external 32 kHz crystal oscillator is the active source of the low-frequency clock. + * @retval NRF_CLOCK_LFCLK_Synth If the internal 32 kHz synthesizer from the HFCLK is the active source of the low-frequency clock. + */ +__STATIC_INLINE nrf_clock_lfclk_t nrf_clock_lf_actv_src_get(void); + +/** + * @brief Function for retrieving the clock source for the LFCLK clock when the task LKCLKSTART is triggered. + * + * @retval NRF_CLOCK_LFCLK_RC If the internal 32 kHz RC oscillator is running and generating the LFCLK clock. + * @retval NRF_CLOCK_LFCLK_Xtal If an external 32 kHz crystal oscillator is running and generating the LFCLK clock. + * @retval NRF_CLOCK_LFCLK_Synth If the internal 32 kHz synthesizer from the HFCLK is running and generating the LFCLK clock. + */ +__STATIC_INLINE nrf_clock_lfclk_t nrf_clock_lf_srccopy_get(void); + +/** + * @brief Function for retrieving the state of the LFCLK clock. + * + * @retval false If the LFCLK clock is not running. + * @retval true If the LFCLK clock is running. + */ +__STATIC_INLINE bool nrf_clock_lf_is_running(void); + +/** + * @brief Function for retrieving the trigger status of the task LFCLKSTART. + * + * @retval NRF_CLOCK_START_TASK_NOT_TRIGGERED If the task LFCLKSTART has not been triggered. + * @retval NRF_CLOCK_START_TASK_TRIGGERED If the task LFCLKSTART has been triggered. + */ +__STATIC_INLINE nrf_clock_start_task_status_t nrf_clock_lf_start_task_status_get(void); + +/** + * @brief Function for retrieving the active source of the high-frequency clock. + * + * @retval NRF_CLOCK_HFCLK_LOW_ACCURACY If the internal 16 MHz RC oscillator is the active source of the high-frequency clock. + * @retval NRF_CLOCK_HFCLK_HIGH_ACCURACY If an external 16 MHz/32 MHz crystal oscillator is the active source of the high-frequency clock. + */ +__STATIC_INLINE nrf_clock_hfclk_t nrf_clock_hf_src_get(void); + +/** + * @brief Function for retrieving the state of the HFCLK clock. + * + * @param[in] clk_src Clock source to be checked. + * + * @retval false If the HFCLK clock is not running. + * @retval true If the HFCLK clock is running. + */ +__STATIC_INLINE bool nrf_clock_hf_is_running(nrf_clock_hfclk_t clk_src); + +/** + * @brief Function for retrieving the trigger status of the task HFCLKSTART. + * + * @retval NRF_CLOCK_START_TASK_NOT_TRIGGERED If the task HFCLKSTART has not been triggered. + * @retval NRF_CLOCK_START_TASK_TRIGGERED If the task HFCLKSTART has been triggered. + */ +__STATIC_INLINE nrf_clock_start_task_status_t nrf_clock_hf_start_task_status_get(void); + +/** + * @brief Function for retrieving the frequency selection of the external crystal. + * + * @retval NRF_CLOCK_XTALFREQ_16MHz If a 16 MHz crystal is used as source for the HFCLK oscillator. + * @retval NRF_CLOCK_XTALFREQ_32MHz If a 32 MHz crystal is used as source for the HFCLK oscillator. + */ +__STATIC_INLINE nrf_clock_xtalfreq_t nrf_clock_xtalfreq_get(void); + +/** + * @brief Function for changing the frequency selection of the external crystal. + * + * @param[in] xtalfreq New frequency selection for the external crystal. + */ +__STATIC_INLINE void nrf_clock_xtalfreq_set(nrf_clock_xtalfreq_t xtalfreq); + +/** + * @brief Function for changing the calibration timer interval. + * + * @param[in] interval New calibration timer interval in 0.25 s resolution (range: 0.25 seconds to 31.75 seconds). + */ +__STATIC_INLINE void nrf_clock_cal_timer_timeout_set(uint32_t interval); + +#ifndef SUPPRESS_INLINE_IMPLEMENTATION + +__STATIC_INLINE void nrf_clock_int_enable(uint32_t int_mask) +{ + NRF_CLOCK->INTENSET = int_mask; +} + +__STATIC_INLINE void nrf_clock_int_disable(uint32_t int_mask) +{ + NRF_CLOCK->INTENCLR = int_mask; +} + +__STATIC_INLINE bool nrf_clock_int_enable_check(nrf_clock_int_mask_t int_mask) +{ + return (bool)(NRF_CLOCK->INTENCLR & int_mask); +} + +__STATIC_INLINE uint32_t nrf_clock_task_address_get(nrf_clock_task_t task) +{ + return ((uint32_t )NRF_CLOCK + task); +} + +__STATIC_INLINE void nrf_clock_task_trigger(nrf_clock_task_t task) +{ + *((volatile uint32_t *)((uint8_t *)NRF_CLOCK + task)) = NRF_CLOCK_TASK_TRIGGER; +} + +__STATIC_INLINE uint32_t nrf_clock_event_address_get(nrf_clock_event_t event) +{ + return ((uint32_t)NRF_CLOCK + event); +} + +__STATIC_INLINE void nrf_clock_event_clear(nrf_clock_event_t event) +{ + *((volatile uint32_t *)((uint8_t *)NRF_CLOCK + event)) = NRF_CLOCK_EVENT_CLEAR; +#if __CORTEX_M == 0x04 + volatile uint32_t dummy = *((volatile uint32_t *)((uint8_t *)NRF_CLOCK + event)); + (void)dummy; +#endif +} + +__STATIC_INLINE bool nrf_clock_event_check(nrf_clock_event_t event) +{ + return (bool)*((volatile uint32_t *)((uint8_t *)NRF_CLOCK + event)); +} + +__STATIC_INLINE void nrf_clock_lf_src_set(nrf_clock_lfclk_t source) +{ + NRF_CLOCK->LFCLKSRC = + (uint32_t)((source << CLOCK_LFCLKSRC_SRC_Pos) & CLOCK_LFCLKSRC_SRC_Msk); +} + +__STATIC_INLINE nrf_clock_lfclk_t nrf_clock_lf_src_get(void) +{ + return (nrf_clock_lfclk_t)((NRF_CLOCK->LFCLKSRC & + CLOCK_LFCLKSRC_SRC_Msk) >> CLOCK_LFCLKSRC_SRC_Pos); +} + +__STATIC_INLINE nrf_clock_lfclk_t nrf_clock_lf_actv_src_get(void) +{ + return (nrf_clock_lfclk_t)((NRF_CLOCK->LFCLKSTAT & + CLOCK_LFCLKSTAT_SRC_Msk) >> CLOCK_LFCLKSTAT_SRC_Pos); +} + +__STATIC_INLINE nrf_clock_lfclk_t nrf_clock_lf_srccopy_get(void) +{ + return (nrf_clock_lfclk_t)((NRF_CLOCK->LFCLKSRCCOPY & + CLOCK_LFCLKSRCCOPY_SRC_Msk) >> CLOCK_LFCLKSRCCOPY_SRC_Pos); +} + +__STATIC_INLINE bool nrf_clock_lf_is_running(void) +{ + return ((NRF_CLOCK->LFCLKSTAT & + CLOCK_LFCLKSTAT_STATE_Msk) >> CLOCK_LFCLKSTAT_STATE_Pos); +} + +__STATIC_INLINE nrf_clock_start_task_status_t nrf_clock_lf_start_task_status_get(void) +{ + return (nrf_clock_start_task_status_t)((NRF_CLOCK->LFCLKRUN & + CLOCK_LFCLKRUN_STATUS_Msk) >> + CLOCK_LFCLKRUN_STATUS_Pos); +} + +__STATIC_INLINE nrf_clock_hfclk_t nrf_clock_hf_src_get(void) +{ + return (nrf_clock_hfclk_t)((NRF_CLOCK->HFCLKSTAT & + CLOCK_HFCLKSTAT_SRC_Msk) >> CLOCK_HFCLKSTAT_SRC_Pos); +} + +__STATIC_INLINE bool nrf_clock_hf_is_running(nrf_clock_hfclk_t clk_src) +{ + return (NRF_CLOCK->HFCLKSTAT & (CLOCK_HFCLKSTAT_STATE_Msk | CLOCK_HFCLKSTAT_SRC_Msk)) == + (CLOCK_HFCLKSTAT_STATE_Msk | (clk_src << CLOCK_HFCLKSTAT_SRC_Pos)); +} + +__STATIC_INLINE nrf_clock_start_task_status_t nrf_clock_hf_start_task_status_get(void) +{ + return (nrf_clock_start_task_status_t)((NRF_CLOCK->HFCLKRUN & + CLOCK_HFCLKRUN_STATUS_Msk) >> + CLOCK_HFCLKRUN_STATUS_Pos); +} + +__STATIC_INLINE nrf_clock_xtalfreq_t nrf_clock_xtalfreq_get(void) +{ +#ifdef NRF51 + return (nrf_clock_xtalfreq_t)((NRF_CLOCK->XTALFREQ & + CLOCK_XTALFREQ_XTALFREQ_Msk) >> CLOCK_XTALFREQ_XTALFREQ_Pos); +#elif defined NRF52 + return NRF_CLOCK_XTALFREQ_Default; +#endif +} + +__STATIC_INLINE void nrf_clock_xtalfreq_set(nrf_clock_xtalfreq_t xtalfreq) +{ +#ifdef NRF51 + NRF_CLOCK->XTALFREQ = + (uint32_t)((xtalfreq << CLOCK_XTALFREQ_XTALFREQ_Pos) & CLOCK_XTALFREQ_XTALFREQ_Msk); +#elif defined NRF52 + return; +#endif +} + +__STATIC_INLINE void nrf_clock_cal_timer_timeout_set(uint32_t interval) +{ + NRF_CLOCK->CTIV = ((interval << CLOCK_CTIV_CTIV_Pos) & CLOCK_CTIV_CTIV_Msk); +} + +#endif // SUPPRESS_INLINE_IMPLEMENTATION + +/** + *@} + **/ +#endif // NRF_CLOCK_H__ From 96a175973d074fd4719a9b2e3518117442e330fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C5=82=C4=85bek=2C=20Andrzej?= Date: Wed, 15 Jun 2016 18:06:13 +0100 Subject: [PATCH 09/67] Updated device definition file for NRF52_DK target. --- .../TARGET_NRF52_DK/device.h | 25 ++----------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TARGET_NRF52_DK/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TARGET_NRF52_DK/device.h index 8a2fd55d6b..2427e752ea 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TARGET_NRF52_DK/device.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TARGET_NRF52_DK/device.h @@ -1,3 +1,5 @@ +// The 'features' section in 'target.json' is now used to create the device's hardware preprocessor switches. +// Check the 'features' section of the target description in 'targets.json' for more details. /* mbed Microcontroller Library * Copyright (c) 2006-2013 ARM Limited * @@ -16,43 +18,20 @@ #ifndef MBED_DEVICE_H #define MBED_DEVICE_H -#define DEVICE_PORTIN 1 -#define DEVICE_PORTOUT 1 -#define DEVICE_PORTINOUT 1 -#define DEVICE_INTERRUPTIN 1 -#define DEVICE_ANALOGIN 1 -#define DEVICE_ANALOGOUT 0 -#define DEVICE_SERIAL 1 -#define DEVICE_I2C 1 -#define DEVICE_I2CSLAVE 0 -#define DEVICE_SPI 1 -#define DEVICE_SPISLAVE 1 -#define DEVICE_CAN 0 -#define DEVICE_RTC 0 -#define DEVICE_ETHERNET 0 -#define DEVICE_PWMOUT 1 -#define DEVICE_SEMIHOST 0 -#define DEVICE_LOCALFILESYSTEM 0 -#define DEVICE_SLEEP 1 -#define DEVICE_DEBUG_AWARENESS 0 -#define DEVICE_STDIO_MESSAGES 0 -#define DEVICE_ERROR_PATTERN 1 - -#define DEVICE_LOWPOWERTIMER 1 #include "objects.h" From df6bd2f66cd69eb8610e61fbac0896d21c4fc381 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C5=82=C4=85bek=2C=20Andrzej?= Date: Wed, 15 Jun 2016 20:56:03 +0100 Subject: [PATCH 10/67] Changed the drivers HAL implementations to the ones using NRF5 SDK, moved nrf_drv_config.h to MCU specific targets, updated lists of device features, so non-compiling stuff is excluded from build. --- hal/targets.json | 4 +- .../TARGET_MCU_NRF51822/analogin_api.c | 4 + .../TARGET_MCU_NRF51822/gpio_api.c | 58 -- .../TARGET_MCU_NRF51822/gpio_irq_api.c | 127 --- .../TARGET_MCU_NRF51822/gpio_object.h | 56 - .../TARGET_NRF5/TARGET_MCU_NRF51822/i2c_api.c | 309 ------ .../TARGET_NRF5/TARGET_MCU_NRF51822/objects.h | 86 -- .../TARGET_MCU_NRF51822/port_api.c | 84 -- .../TARGET_MCU_NRF51822/pwmout_api.c | 421 +++----- .../sdk}/nrf_drv_config.h | 44 +- .../TARGET_MCU_NRF51822/serial_api.c | 306 ------ .../TARGET_NRF5/TARGET_MCU_NRF51822/spi_api.c | 286 ------ .../TARGET_MCU_NRF51822/twi_config.h | 20 - .../TARGET_MCU_NRF51822/twi_master.c | 304 ------ .../TARGET_MCU_NRF51822/twi_master.h | 112 -- .../TARGET_MCU_NRF51822/us_ticker.c | 602 ----------- .../TARGET_MCU_NRF52832/analogin_api.c | 4 + .../TARGET_MCU_NRF52832/gpio_api.c | 58 -- .../TARGET_MCU_NRF52832/gpio_irq_api.c | 127 --- .../TARGET_NRF5/TARGET_MCU_NRF52832/i2c_api.c | 311 ------ .../TARGET_MCU_NRF52832/pwmout_api.c | 294 +----- .../TARGET_MCU_NRF52832/sdk/nrf_drv_config.h | 488 +++++++++ .../TARGET_MCU_NRF52832/serial_api.c | 305 ------ .../TARGET_NRF5/TARGET_MCU_NRF52832/sleep.c | 32 - .../TARGET_NRF5/TARGET_MCU_NRF52832/spi_api.c | 243 ----- .../TARGET_MCU_NRF52832/us_ticker.c | 277 ----- .../hal/TARGET_NORDIC/TARGET_NRF5/gpio_api.c | 245 +++++ .../{TARGET_MCU_NRF52832 => }/gpio_object.h | 22 +- .../hal/TARGET_NORDIC/TARGET_NRF5/i2c_api.c | 277 +++++ .../hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c | 66 ++ .../{TARGET_MCU_NRF52832 => }/objects.h | 31 +- .../{TARGET_MCU_NRF52832 => }/pinmap.c | 0 .../{TARGET_MCU_NRF52832 => }/port_api.c | 0 .../hal/TARGET_NORDIC/TARGET_NRF5/rtc_api.c | 69 ++ .../pinmap.c => rtc_common.h} | 30 +- .../sdk/drivers_nrf/gpiote/nrf_drv_gpiote.c | 580 +++++++++++ .../sdk/drivers_nrf/gpiote/nrf_drv_gpiote.h | 309 ++++++ .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ppi.h | 402 ++++++++ .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_rtc.h | 304 ++++++ .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spi.h | 334 ++++++ .../sdk/drivers_nrf/hal/nrf_spim.h | 520 ++++++++++ .../sdk/drivers_nrf/hal/nrf_timer.h | 576 +++++++++++ .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_twi.h | 402 ++++++++ .../sdk/drivers_nrf/hal/nrf_uart.h | 471 +++++++++ .../sdk/drivers_nrf/hal/nrf_uarte.h | 534 ++++++++++ .../sdk/drivers_nrf/ppi/nrf_drv_ppi.c | 427 ++++++++ .../sdk/drivers_nrf/ppi/nrf_drv_ppi.h | 284 +++++ .../sdk/drivers_nrf/rtc/nrf_drv_rtc.c | 290 ++++++ .../sdk/drivers_nrf/rtc/nrf_drv_rtc.h | 325 ++++++ .../sdk/drivers_nrf/spi_master/nrf_drv_spi.c | 655 ++++++++++++ .../sdk/drivers_nrf/spi_master/nrf_drv_spi.h | 368 +++++++ .../sdk/drivers_nrf/timer/nrf_drv_timer.c | 280 +++++ .../sdk/drivers_nrf/timer/nrf_drv_timer.h | 372 +++++++ .../sdk/drivers_nrf/twi_master/nrf_drv_twi.c | 972 ++++++++++++++++++ .../sdk/drivers_nrf/twi_master/nrf_drv_twi.h | 384 +++++++ .../sdk/drivers_nrf/uart/nrf_drv_uart.c | 851 +++++++++++++++ .../sdk/drivers_nrf/uart/nrf_drv_uart.h | 293 ++++++ .../TARGET_NRF5/sdk/libraries/pwm/app_pwm.c | 876 ++++++++++++++++ .../TARGET_NRF5/sdk/libraries/pwm/app_pwm.h | 295 ++++++ .../TARGET_NORDIC/TARGET_NRF5/serial_api.c | 469 +++++++++ .../{TARGET_MCU_NRF51822 => }/sleep.c | 0 .../hal/TARGET_NORDIC/TARGET_NRF5/spi_api.c | 218 ++++ .../hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c | 145 +++ 63 files changed, 13281 insertions(+), 4357 deletions(-) delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/gpio_api.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/gpio_irq_api.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/gpio_object.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/i2c_api.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/objects.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/port_api.c rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{sdk/drivers_nrf/config => TARGET_MCU_NRF51822/sdk}/nrf_drv_config.h (94%) delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/serial_api.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/spi_api.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/twi_config.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/twi_master.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/twi_master.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/us_ticker.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/gpio_api.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/gpio_irq_api.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/i2c_api.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/serial_api.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sleep.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/spi_api.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/us_ticker.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/gpio_api.c rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF52832 => }/gpio_object.h (74%) create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/i2c_api.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF52832 => }/objects.h (72%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF52832 => }/pinmap.c (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF52832 => }/port_api.c (100%) create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/rtc_api.c rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822/pinmap.c => rtc_common.h} (57%) create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/gpiote/nrf_drv_gpiote.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/gpiote/nrf_drv_gpiote.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ppi.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_rtc.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spi.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spim.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_timer.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_twi.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_uart.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_uarte.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ppi/nrf_drv_ppi.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ppi/nrf_drv_ppi.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/rtc/nrf_drv_rtc.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/rtc/nrf_drv_rtc.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/timer/nrf_drv_timer.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/timer/nrf_drv_timer.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/uart/nrf_drv_uart.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/uart/nrf_drv_uart.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/pwm/app_pwm.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/pwm/app_pwm.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/serial_api.c rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => }/sleep.c (100%) create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/spi_api.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c diff --git a/hal/targets.json b/hal/targets.json index 477f0bc083..670543d345 100644 --- a/hal/targets.json +++ b/hal/targets.json @@ -1388,7 +1388,7 @@ "supported_form_factors": ["ARDUINO"], "inherits": ["MCU_NRF51_32K"], "progen": {"target": "nrf51-dk"}, - "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"] + "device_has": ["ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "SERIAL", "RTC", "SERIAL_ASYNCH", "SLEEP"] }, "NRF51_DK_BOOT": { "supported_form_factors": ["ARDUINO"], @@ -1764,6 +1764,6 @@ "supported_form_factors": ["ARDUINO"], "inherits": ["MCU_NRF52"], "progen": {"target": "nrf52-dk"}, - "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"] + "device_has": ["ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP"] } } diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c index 77b1ddcd38..44d5342831 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c @@ -18,6 +18,8 @@ #include "cmsis.h" #include "pinmap.h" +#ifdef DEVICE_ANALOGIN + #define ANALOGIN_MEDIAN_FILTER 1 #define ADC_10BIT_RANGE 0x3FF #define ADC_RANGE ADC_10BIT_RANGE @@ -79,3 +81,5 @@ float analogin_read(analogin_t *obj) uint16_t value = analogin_read_u16(obj); return (float)value * (1.0f / (float)ADC_RANGE); } + +#endif // DEVICE_ANALOGIN diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/gpio_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/gpio_api.c deleted file mode 100644 index eb077c9f10..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/gpio_api.c +++ /dev/null @@ -1,58 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "mbed_assert.h" -#include "gpio_api.h" -#include "pinmap.h" - -void gpio_init(gpio_t *obj, PinName pin) -{ - obj->pin = pin; - if (pin == (PinName)NC) { - return; - } - - obj->mask = (1ul << pin); - - obj->reg_set = &NRF_GPIO->OUTSET; - obj->reg_clr = &NRF_GPIO->OUTCLR; - obj->reg_in = &NRF_GPIO->IN; - obj->reg_dir = &NRF_GPIO->DIR; -} - -void gpio_mode(gpio_t *obj, PinMode mode) -{ - pin_mode(obj->pin, mode); -} - -void gpio_dir(gpio_t *obj, PinDirection direction) -{ - MBED_ASSERT(obj->pin != (PinName)NC); - switch (direction) { - case PIN_INPUT: - NRF_GPIO->PIN_CNF[obj->pin] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos); - break; - case PIN_OUTPUT: - NRF_GPIO->PIN_CNF[obj->pin] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); - break; - } -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/gpio_irq_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/gpio_irq_api.c deleted file mode 100644 index 9d2fcad2c4..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/gpio_irq_api.c +++ /dev/null @@ -1,127 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include -#include "cmsis.h" - -#include "gpio_irq_api.h" -#include "mbed_error.h" - -#define CHANNEL_NUM 31 - -static uint32_t channel_ids[CHANNEL_NUM] = {0}; //each pin will be given an id, if id is 0 the pin can be ignored. -static uint8_t channel_enabled[CHANNEL_NUM] = {0}; -static uint32_t portRISE = 0; -static uint32_t portFALL = 0; -static gpio_irq_handler irq_handler; - -#ifdef __cplusplus -extern "C" { -#endif -void GPIOTE_IRQHandler(void) -{ - volatile uint32_t newVal = NRF_GPIO->IN; - - if ((NRF_GPIOTE->EVENTS_PORT != 0) && ((NRF_GPIOTE->INTENSET & GPIOTE_INTENSET_PORT_Msk) != 0)) { - NRF_GPIOTE->EVENTS_PORT = 0; - - for (uint8_t i = 0; i<31; i++) { - if (channel_ids[i]>0) { - if (channel_enabled[i]) { - if( ((newVal>>i)&1) && ( ( (NRF_GPIO->PIN_CNF[i] >>GPIO_PIN_CNF_SENSE_Pos) & GPIO_PIN_CNF_SENSE_Low) != GPIO_PIN_CNF_SENSE_Low) && ( (portRISE>>i)&1) ){ - irq_handler(channel_ids[i], IRQ_RISE); - } else if ((((newVal >> i) & 1) == 0) && - (((NRF_GPIO->PIN_CNF[i] >> GPIO_PIN_CNF_SENSE_Pos) & GPIO_PIN_CNF_SENSE_Low) == GPIO_PIN_CNF_SENSE_Low) && - ((portFALL >> i) & 1)) { - irq_handler(channel_ids[i], IRQ_FALL); - } - } - - if (NRF_GPIO->PIN_CNF[i] & GPIO_PIN_CNF_SENSE_Msk) { - NRF_GPIO->PIN_CNF[i] &= ~(GPIO_PIN_CNF_SENSE_Msk); - - if (newVal >> i & 1) { - NRF_GPIO->PIN_CNF[i] |= (GPIO_PIN_CNF_SENSE_Low << GPIO_PIN_CNF_SENSE_Pos); - } else { - NRF_GPIO->PIN_CNF[i] |= (GPIO_PIN_CNF_SENSE_High << GPIO_PIN_CNF_SENSE_Pos); - } - } - } - } - } -} - -#ifdef __cplusplus -} -#endif - -int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32_t id) -{ - if (pin == NC) { - return -1; - } - - irq_handler = handler; - obj->ch = pin; - NRF_GPIOTE->EVENTS_PORT = 0; - channel_ids[pin] = id; - channel_enabled[pin] = 1; - NRF_GPIOTE->INTENSET = GPIOTE_INTENSET_PORT_Set << GPIOTE_INTENSET_PORT_Pos; - - NVIC_SetPriority(GPIOTE_IRQn, 3); - NVIC_EnableIRQ (GPIOTE_IRQn); - return 0; -} - -void gpio_irq_free(gpio_irq_t *obj) -{ - channel_ids[obj->ch] = 0; -} - -void gpio_irq_set(gpio_irq_t *obj, gpio_irq_event event, uint32_t enable) -{ - NRF_GPIO->PIN_CNF[obj->ch] &= ~(GPIO_PIN_CNF_SENSE_Msk); - if (enable) { - if (event == IRQ_RISE) { - portRISE |= (1 << obj->ch); - } else if (event == IRQ_FALL) { - portFALL |= (1 << obj->ch); - } - } else { - if (event == IRQ_RISE) { - portRISE &= ~(1 << obj->ch); - } else if (event == IRQ_FALL) { - portFALL &= ~(1 << obj->ch); - } - } - - if (((portRISE >> obj->ch) & 1) || ((portFALL >> obj->ch) & 1)) { - if ((NRF_GPIO->IN >> obj->ch) & 1) { - NRF_GPIO->PIN_CNF[obj->ch] |= (GPIO_PIN_CNF_SENSE_Low << GPIO_PIN_CNF_SENSE_Pos); // | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos); - } else { - NRF_GPIO->PIN_CNF[obj->ch] |= (GPIO_PIN_CNF_SENSE_High << GPIO_PIN_CNF_SENSE_Pos); //| (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos); - } - } -} - -void gpio_irq_enable(gpio_irq_t *obj) -{ - channel_enabled[obj->ch] = 1; -} - -void gpio_irq_disable(gpio_irq_t *obj) -{ - channel_enabled[obj->ch] = 0; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/gpio_object.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/gpio_object.h deleted file mode 100644 index fe6d6c1e05..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/gpio_object.h +++ /dev/null @@ -1,56 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef MBED_GPIO_OBJECT_H -#define MBED_GPIO_OBJECT_H - -#include "mbed_assert.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct { - PinName pin; - uint32_t mask; - - __IO uint32_t *reg_dir; - __IO uint32_t *reg_set; - __IO uint32_t *reg_clr; - __I uint32_t *reg_in; -} gpio_t; - -static inline void gpio_write(gpio_t *obj, int value) { - MBED_ASSERT(obj->pin != (PinName)NC); - if (value) - *obj->reg_set = obj->mask; - else - *obj->reg_clr = obj->mask; -} - -static inline int gpio_read(gpio_t *obj) { - MBED_ASSERT(obj->pin != (PinName)NC); - return ((*obj->reg_in & obj->mask) ? 1 : 0); -} - -static inline int gpio_is_connected(const gpio_t *obj) { - return obj->pin != (PinName)NC; -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/i2c_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/i2c_api.c deleted file mode 100644 index 06c4b8b457..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/i2c_api.c +++ /dev/null @@ -1,309 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "mbed_assert.h" -#include "i2c_api.h" -#include "cmsis.h" -#include "pinmap.h" -#include "twi_master.h" -#include "mbed_error.h" - -// nRF51822's I2C_0 and SPI_0 (I2C_1, SPI_1 and SPIS1) share the same address. -// They can't be used at the same time. So we use two global variable to track the usage. -// See nRF51822 address information at nRF51822_PS v2.0.pdf - Table 15 Peripheral instance reference -volatile i2c_spi_peripheral_t i2c0_spi0_peripheral = {0, 0, 0, 0}; -volatile i2c_spi_peripheral_t i2c1_spi1_peripheral = {0, 0, 0, 0}; - -void i2c_interface_enable(i2c_t *obj) -{ - obj->i2c->ENABLE = (TWI_ENABLE_ENABLE_Enabled << TWI_ENABLE_ENABLE_Pos); -} - -void twi_master_init(i2c_t *obj, PinName sda, PinName scl, int frequency) -{ - NRF_GPIO->PIN_CNF[scl] = ((GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos) | - (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) | - (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) | - (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) | - (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos)); - - NRF_GPIO->PIN_CNF[sda] = ((GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos) | - (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) | - (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) | - (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) | - (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos)); - - obj->i2c->PSELSCL = scl; - obj->i2c->PSELSDA = sda; - // set default frequency at 100k - i2c_frequency(obj, frequency); - i2c_interface_enable(obj); -} - -void i2c_init(i2c_t *obj, PinName sda, PinName scl) -{ - NRF_TWI_Type *i2c = NULL; - - if (i2c0_spi0_peripheral.usage == I2C_SPI_PERIPHERAL_FOR_I2C && - i2c0_spi0_peripheral.sda_mosi == (uint8_t)sda && - i2c0_spi0_peripheral.scl_miso == (uint8_t)scl) { - // The I2C with the same pins is already initialized - i2c = (NRF_TWI_Type *)I2C_0; - obj->peripheral = 0x1; - } else if (i2c1_spi1_peripheral.usage == I2C_SPI_PERIPHERAL_FOR_I2C && - i2c1_spi1_peripheral.sda_mosi == (uint8_t)sda && - i2c1_spi1_peripheral.scl_miso == (uint8_t)scl) { - // The I2C with the same pins is already initialized - i2c = (NRF_TWI_Type *)I2C_1; - obj->peripheral = 0x2; - } else if (i2c0_spi0_peripheral.usage == 0) { - i2c0_spi0_peripheral.usage = I2C_SPI_PERIPHERAL_FOR_I2C; - i2c0_spi0_peripheral.sda_mosi = (uint8_t)sda; - i2c0_spi0_peripheral.scl_miso = (uint8_t)scl; - - i2c = (NRF_TWI_Type *)I2C_0; - obj->peripheral = 0x1; - } else if (i2c1_spi1_peripheral.usage == 0) { - i2c1_spi1_peripheral.usage = I2C_SPI_PERIPHERAL_FOR_I2C; - i2c1_spi1_peripheral.sda_mosi = (uint8_t)sda; - i2c1_spi1_peripheral.scl_miso = (uint8_t)scl; - - i2c = (NRF_TWI_Type *)I2C_1; - obj->peripheral = 0x2; - } else { - // No available peripheral - error("No available I2C"); - } - - twi_master_init_and_clear(i2c); - - obj->i2c = i2c; - obj->scl = scl; - obj->sda = sda; - obj->i2c->EVENTS_ERROR = 0; - obj->i2c->ENABLE = TWI_ENABLE_ENABLE_Disabled << TWI_ENABLE_ENABLE_Pos; - obj->i2c->POWER = 0; - - for (int i = 0; i<100; i++) { - } - - obj->i2c->POWER = 1; - twi_master_init(obj, sda, scl, 100000); -} - -void i2c_reset(i2c_t *obj) -{ - obj->i2c->EVENTS_ERROR = 0; - obj->i2c->ENABLE = TWI_ENABLE_ENABLE_Disabled << TWI_ENABLE_ENABLE_Pos; - obj->i2c->POWER = 0; - for (int i = 0; i<100; i++) { - } - - obj->i2c->POWER = 1; - twi_master_init(obj, obj->sda, obj->scl, obj->freq); -} - -int i2c_start(i2c_t *obj) -{ - int status = 0; - i2c_reset(obj); - obj->address_set = 0; - return status; -} - -int i2c_stop(i2c_t *obj) -{ - int timeOut = 100000; - obj->i2c->EVENTS_STOPPED = 0; - // write the stop bit - obj->i2c->TASKS_STOP = 1; - while (!obj->i2c->EVENTS_STOPPED) { - timeOut--; - if (timeOut<0) { - return 1; - } - } - obj->address_set = 0; - i2c_reset(obj); - return 0; -} - -int i2c_do_write(i2c_t *obj, int value) -{ - int timeOut = 100000; - obj->i2c->TXD = value; - while (!obj->i2c->EVENTS_TXDSENT) { - timeOut--; - if (timeOut<0) { - return 1; - } - } - obj->i2c->EVENTS_TXDSENT = 0; - return 0; -} - -int i2c_do_read(i2c_t *obj, char *data, int last) -{ - int timeOut = 100000; - - if (last) { - // To trigger stop task when a byte is received, - // must be set before resume task. - obj->i2c->SHORTS = 2; - } - - obj->i2c->TASKS_RESUME = 1; - - while (!obj->i2c->EVENTS_RXDREADY) { - timeOut--; - if (timeOut<0) { - return 1; - } - } - obj->i2c->EVENTS_RXDREADY = 0; - *data = obj->i2c->RXD; - - return 0; -} - -void i2c_frequency(i2c_t *obj, int hz) -{ - if (hz<250000) { - obj->freq = 100000; - obj->i2c->FREQUENCY = (TWI_FREQUENCY_FREQUENCY_K100 << TWI_FREQUENCY_FREQUENCY_Pos); - } else if (hz<400000) { - obj->freq = 250000; - obj->i2c->FREQUENCY = (TWI_FREQUENCY_FREQUENCY_K250 << TWI_FREQUENCY_FREQUENCY_Pos); - } else { - obj->freq = 400000; - obj->i2c->FREQUENCY = (TWI_FREQUENCY_FREQUENCY_K400 << TWI_FREQUENCY_FREQUENCY_Pos); - } -} - -int checkError(i2c_t *obj) -{ - if (obj->i2c->EVENTS_ERROR == 1) { - if (obj->i2c->ERRORSRC & TWI_ERRORSRC_ANACK_Msk) { - obj->i2c->EVENTS_ERROR = 0; - obj->i2c->TASKS_STOP = 1; - return I2C_ERROR_BUS_BUSY; - } - - obj->i2c->EVENTS_ERROR = 0; - obj->i2c->TASKS_STOP = 1; - return I2C_ERROR_NO_SLAVE; - } - return 0; -} - -int i2c_read(i2c_t *obj, int address, char *data, int length, int stop) -{ - int status, count, errorResult; - obj->i2c->ADDRESS = (address >> 1); - obj->i2c->SHORTS = 1; // to trigger suspend task when a byte is received - obj->i2c->EVENTS_RXDREADY = 0; - obj->i2c->TASKS_STARTRX = 1; - - // Read in all except last byte - for (count = 0; count < (length - 1); count++) { - status = i2c_do_read(obj, &data[count], 0); - if (status) { - errorResult = checkError(obj); - i2c_reset(obj); - if (errorResult<0) { - return errorResult; - } - return count; - } - } - - // read in last byte - status = i2c_do_read(obj, &data[length - 1], 1); - if (status) { - i2c_reset(obj); - return length - 1; - } - // If not repeated start, send stop. - if (stop) { - while (!obj->i2c->EVENTS_STOPPED) { - } - obj->i2c->EVENTS_STOPPED = 0; - } - return length; -} - -int i2c_write(i2c_t *obj, int address, const char *data, int length, int stop) -{ - int status, errorResult; - obj->i2c->ADDRESS = (address >> 1); - obj->i2c->SHORTS = 0; - obj->i2c->TASKS_STARTTX = 1; - - for (int i = 0; iaddress_set) { - obj->address_set = 1; - obj->i2c->ADDRESS = (data >> 1); - - if (data & 1) { - obj->i2c->EVENTS_RXDREADY = 0; - obj->i2c->SHORTS = 1; - obj->i2c->TASKS_STARTRX = 1; - } else { - obj->i2c->SHORTS = 0; - obj->i2c->TASKS_STARTTX = 1; - } - } else { - status = i2c_do_write(obj, data); - if (status) { - i2c_reset(obj); - } - } - return (1 - status); -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/objects.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/objects.h deleted file mode 100644 index a87e1d7687..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/objects.h +++ /dev/null @@ -1,86 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef MBED_OBJECTS_H -#define MBED_OBJECTS_H - -#include "cmsis.h" -#include "PortNames.h" -#include "PeripheralNames.h" -#include "PinNames.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define I2C_SPI_PERIPHERAL_FOR_I2C 1 -#define I2C_SPI_PERIPHERAL_FOR_SPI 2 - -typedef struct { - uint8_t usage; // I2C: 1, SPI: 2 - uint8_t sda_mosi; - uint8_t scl_miso; - uint8_t sclk; -} i2c_spi_peripheral_t; - -struct serial_s { - NRF_UART_Type *uart; - int index; -}; - -struct spi_s { - NRF_SPI_Type *spi; - NRF_SPIS_Type *spis; - uint8_t peripheral; -}; - -struct port_s { - __IO uint32_t *reg_cnf; - __IO uint32_t *reg_out; - __I uint32_t *reg_in; - PortName port; - uint32_t mask; -}; - -struct pwmout_s { - PWMName pwm; - PinName pin; -}; - -struct i2c_s { - NRF_TWI_Type *i2c; - PinName sda; - PinName scl; - int freq; - uint8_t address_set; - uint8_t peripheral; -}; - -struct analogin_s { - ADCName adc; - uint8_t adc_pin; -}; - -struct gpio_irq_s { - uint32_t ch; -}; - -#include "gpio_object.h" - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/port_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/port_api.c deleted file mode 100644 index 4168a7845c..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/port_api.c +++ /dev/null @@ -1,84 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "port_api.h" -#include "pinmap.h" -#include "gpio_api.h" - -PinName port_pin(PortName port, int pin_n) -{ - return (PinName)(pin_n); -} - -void port_init(port_t *obj, PortName port, int mask, PinDirection dir) -{ - obj->port = port; - obj->mask = mask; - - obj->reg_out = &NRF_GPIO->OUT; - obj->reg_in = &NRF_GPIO->IN; - obj->reg_cnf = NRF_GPIO->PIN_CNF; - - port_dir(obj, dir); -} - -void port_mode(port_t *obj, PinMode mode) -{ - uint32_t i; - // The mode is set per pin: reuse pinmap logic - for (i = 0; i<31; i++) { - if (obj->mask & (1 << i)) { - pin_mode(port_pin(obj->port, i), mode); - } - } -} - -void port_dir(port_t *obj, PinDirection dir) -{ - int i; - switch (dir) { - case PIN_INPUT: - for (i = 0; i<31; i++) { - if (obj->mask & (1 << i)) { - obj->reg_cnf[i] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos); - } - } - break; - case PIN_OUTPUT: - for (i = 0; i<31; i++) { - if (obj->mask & (1 << i)) { - obj->reg_cnf[i] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); - } - } - break; - } -} - -void port_write(port_t *obj, int value) -{ - *obj->reg_out = value; -} - -int port_read(port_t *obj) -{ - return (*obj->reg_in); -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c index 1ebe182dd5..063b94d37b 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c @@ -14,305 +14,160 @@ * limitations under the License. */ #include "mbed_assert.h" +#include "mbed_error.h" #include "pwmout_api.h" #include "cmsis.h" #include "pinmap.h" -#include "mbed_error.h" -#define NO_PWMS 3 -#define TIMER_PRECISION 4 //4us ticks -#define TIMER_PRESCALER 6 //4us ticks = 16Mhz/(2**6) -static const PinMap PinMap_PWM[] = { - {p0, PWM_1, 1}, - {p1, PWM_1, 1}, - {p2, PWM_1, 1}, - {p3, PWM_1, 1}, - {p4, PWM_1, 1}, - {p5, PWM_1, 1}, - {p6, PWM_1, 1}, - {p7, PWM_1, 1}, - {p8, PWM_1, 1}, - {p9, PWM_1, 1}, - {p10, PWM_1, 1}, - {p11, PWM_1, 1}, - {p12, PWM_1, 1}, - {p13, PWM_1, 1}, - {p14, PWM_1, 1}, - {p15, PWM_1, 1}, - {p16, PWM_1, 1}, - {p17, PWM_1, 1}, - {p18, PWM_1, 1}, - {p19, PWM_1, 1}, - {p20, PWM_1, 1}, - {p21, PWM_1, 1}, - {p22, PWM_1, 1}, - {p23, PWM_1, 1}, - {p24, PWM_1, 1}, - {p25, PWM_1, 1}, - {p28, PWM_1, 1}, - {p29, PWM_1, 1}, - {p30, PWM_1, 1}, - {NC, NC, 0} -}; +#if DEVICE_PWMOUT -static NRF_TIMER_Type *Timers[1] = { - NRF_TIMER2 -}; +#include "nrf.h" +#include "nrf_drv_timer.h" +#include "app_pwm.h" -uint16_t PERIOD = 20000 / TIMER_PRECISION; //20ms -uint8_t PWM_taken[NO_PWMS] = {0, 0, 0}; -uint16_t PULSE_WIDTH[NO_PWMS] = {1, 1, 1}; //set to 1 instead of 0 -uint16_t ACTUAL_PULSE[NO_PWMS] = {0, 0, 0}; +#define PWM_INSTANCE_COUNT 2 +#define PWM_CHANNELS_PER_INSTANCE 2 +#define PWM_DEFAULT_PERIOD_US 20000 +#define PWM_PERIOD_MIN 3 - -/** @brief Function for handling timer 2 peripheral interrupts. - */ -#ifdef __cplusplus -extern "C" { -#endif -void TIMER2_IRQHandler(void) +typedef struct { - NRF_TIMER2->EVENTS_COMPARE[3] = 0; - NRF_TIMER2->CC[3] = PERIOD; + const app_pwm_t * const instance; + NRF_TIMER_Type * const timer_reg; + uint8_t channels_allocated; + uint32_t pins[PWM_CHANNELS_PER_INSTANCE]; + uint16_t period_us; + uint16_t duty_ticks[PWM_CHANNELS_PER_INSTANCE]; +} pwm_t; - if (PWM_taken[0]) { - NRF_TIMER2->CC[0] = PULSE_WIDTH[0]; - } - if (PWM_taken[1]) { - NRF_TIMER2->CC[1] = PULSE_WIDTH[1]; - } - if (PWM_taken[2]) { - NRF_TIMER2->CC[2] = PULSE_WIDTH[2]; - } - NRF_TIMER2->TASKS_START = 1; +APP_PWM_INSTANCE(m_pwm_instance_0, 1); //PWM0: Timer 1 +APP_PWM_INSTANCE(m_pwm_instance_1, 2); //PWM1: Timer 2 + + +static pwm_t m_pwm[] = { + {.instance = &m_pwm_instance_0, .timer_reg = NRF_TIMER1, .channels_allocated = 0}, + {.instance = &m_pwm_instance_1, .timer_reg = NRF_TIMER2, .channels_allocated = 0} + }; + +static inline void pwm_ticks_set(pwm_t* pwm, uint8_t channel, uint16_t ticks) +{ + pwm->duty_ticks[channel] = ticks; + while (app_pwm_channel_duty_ticks_set(pwm->instance, channel, ticks) != NRF_SUCCESS); } -#ifdef __cplusplus -} -#endif -/** @brief Function for initializing the Timer peripherals. - */ -void timer_init(uint8_t pwmChoice) +static void pwm_reinit(pwm_t * pwm) { - NRF_TIMER_Type *timer = Timers[0]; - timer->TASKS_STOP = 0; - - if (pwmChoice == 0) { - timer->POWER = 0; - timer->POWER = 1; - timer->MODE = TIMER_MODE_MODE_Timer; - timer->BITMODE = TIMER_BITMODE_BITMODE_16Bit << TIMER_BITMODE_BITMODE_Pos; - timer->PRESCALER = TIMER_PRESCALER; - timer->CC[3] = PERIOD; - } - - timer->CC[pwmChoice] = PULSE_WIDTH[pwmChoice]; - - //high priority application interrupt - NVIC_SetPriority(TIMER2_IRQn, 1); - NVIC_EnableIRQ(TIMER2_IRQn); - - timer->TASKS_START = 0x01; -} - -static void timer_free() -{ - NRF_TIMER_Type *timer = Timers[0]; - for(uint8_t i = 1; i < NO_PWMS; i++){ - if(PWM_taken[i]){ - break; - } - if((i == NO_PWMS - 1) && (!PWM_taken[i])) - timer->TASKS_STOP = 0x01; - } -} - - -/** @brief Function for initializing the GPIO Tasks/Events peripheral. - */ -void gpiote_init(PinName pin, uint8_t channel_number) -{ - // Connect GPIO input buffers and configure PWM_OUTPUT_PIN_NUMBER as an output. - NRF_GPIO->PIN_CNF[pin] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); - NRF_GPIO->OUTCLR = (1UL << pin); - // Configure GPIOTE channel 0 to toggle the PWM pin state - // @note Only one GPIOTE task can be connected to an output pin. - /* Configure channel to Pin31, not connected to the pin, and configure as a tasks that will set it to proper level */ - NRF_GPIOTE->CONFIG[channel_number] = (GPIOTE_CONFIG_MODE_Task << GPIOTE_CONFIG_MODE_Pos) | - (31UL << GPIOTE_CONFIG_PSEL_Pos) | - (GPIOTE_CONFIG_POLARITY_HiToLo << GPIOTE_CONFIG_POLARITY_Pos); - /* Three NOPs are required to make sure configuration is written before setting tasks or getting events */ - __NOP(); - __NOP(); - __NOP(); - /* Launch the task to take the GPIOTE channel output to the desired level */ - NRF_GPIOTE->TASKS_OUT[channel_number] = 1; - - /* Finally configure the channel as the caller expects. If OUTINIT works, the channel is configured properly. - If it does not, the channel output inheritance sets the proper level. */ - NRF_GPIOTE->CONFIG[channel_number] = (GPIOTE_CONFIG_MODE_Task << GPIOTE_CONFIG_MODE_Pos) | - ((uint32_t)pin << GPIOTE_CONFIG_PSEL_Pos) | - ((uint32_t)GPIOTE_CONFIG_POLARITY_Toggle << GPIOTE_CONFIG_POLARITY_Pos) | - ((uint32_t)GPIOTE_CONFIG_OUTINIT_Low << GPIOTE_CONFIG_OUTINIT_Pos); // ((uint32_t)GPIOTE_CONFIG_OUTINIT_High << - // GPIOTE_CONFIG_OUTINIT_Pos);// - - /* Three NOPs are required to make sure configuration is written before setting tasks or getting events */ - __NOP(); - __NOP(); - __NOP(); -} - -static void gpiote_free(PinName pin,uint8_t channel_number) -{ - NRF_GPIOTE->TASKS_OUT[channel_number] = 0; - NRF_GPIOTE->CONFIG[channel_number] = 0; - NRF_GPIO->PIN_CNF[pin] = (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos); - -} - -/** @brief Function for initializing the Programmable Peripheral Interconnect peripheral. - */ -static void ppi_init(uint8_t pwm) -{ - //using ppi channels 0-7 (only 0-7 are available) - uint8_t channel_number = 2 * pwm; - NRF_TIMER_Type *timer = Timers[0]; - - // Configure PPI channel 0 to toggle ADVERTISING_LED_PIN_NO on every TIMER1 COMPARE[0] match - NRF_PPI->CH[channel_number].TEP = (uint32_t)&NRF_GPIOTE->TASKS_OUT[pwm]; - NRF_PPI->CH[channel_number + 1].TEP = (uint32_t)&NRF_GPIOTE->TASKS_OUT[pwm]; - NRF_PPI->CH[channel_number].EEP = (uint32_t)&timer->EVENTS_COMPARE[pwm]; - NRF_PPI->CH[channel_number + 1].EEP = (uint32_t)&timer->EVENTS_COMPARE[3]; - - // Enable PPI channels. - NRF_PPI->CHEN |= (1 << channel_number) | - (1 << (channel_number + 1)); -} - -static void ppi_free(uint8_t pwm) -{ - //using ppi channels 0-7 (only 0-7 are available) - uint8_t channel_number = 2*pwm; - - // Disable PPI channels. - NRF_PPI->CHEN &= (~(1 << channel_number)) - & (~(1 << (channel_number+1))); -} - -void setModulation(pwmout_t *obj, uint8_t toggle, uint8_t high) -{ - if (high) { - NRF_GPIOTE->CONFIG[obj->pwm] |= ((uint32_t)GPIOTE_CONFIG_OUTINIT_High << GPIOTE_CONFIG_OUTINIT_Pos); - if (toggle) { - NRF_GPIOTE->CONFIG[obj->pwm] |= (GPIOTE_CONFIG_MODE_Task << GPIOTE_CONFIG_MODE_Pos) | - ((uint32_t)GPIOTE_CONFIG_POLARITY_Toggle << GPIOTE_CONFIG_POLARITY_Pos); - } else { - NRF_GPIOTE->CONFIG[obj->pwm] &= ~((uint32_t)GPIOTE_CONFIG_POLARITY_Toggle << GPIOTE_CONFIG_POLARITY_Pos); - NRF_GPIOTE->CONFIG[obj->pwm] |= ((uint32_t)GPIOTE_CONFIG_POLARITY_LoToHi << GPIOTE_CONFIG_POLARITY_Pos); - } - } else { - NRF_GPIOTE->CONFIG[obj->pwm] &= ~((uint32_t)GPIOTE_CONFIG_OUTINIT_High << GPIOTE_CONFIG_OUTINIT_Pos); - - if (toggle) { - NRF_GPIOTE->CONFIG[obj->pwm] |= (GPIOTE_CONFIG_MODE_Task << GPIOTE_CONFIG_MODE_Pos) | - ((uint32_t)GPIOTE_CONFIG_POLARITY_Toggle << GPIOTE_CONFIG_POLARITY_Pos); - } else { - NRF_GPIOTE->CONFIG[obj->pwm] &= ~((uint32_t)GPIOTE_CONFIG_POLARITY_Toggle << GPIOTE_CONFIG_POLARITY_Pos); - NRF_GPIOTE->CONFIG[obj->pwm] |= ((uint32_t)GPIOTE_CONFIG_POLARITY_HiToLo << GPIOTE_CONFIG_POLARITY_Pos); + app_pwm_uninit(pwm->instance); + app_pwm_config_t pwm_cfg = APP_PWM_DEFAULT_CONFIG_2CH(pwm->period_us, + pwm->pins[0], + pwm->pins[1]); + app_pwm_init(pwm->instance, &pwm_cfg, NULL); + app_pwm_enable(pwm->instance); + + for (uint8_t channel = 0; channel < PWM_CHANNELS_PER_INSTANCE; ++channel) { + if ((pwm->channels_allocated & (1 << channel)) && (pwm->pins[channel] != APP_PWM_NOPIN)) { + app_pwm_channel_duty_ticks_set(pwm->instance, channel, pwm->duty_ticks[channel]); } } } void pwmout_init(pwmout_t *obj, PinName pin) { - // determine the channel - uint8_t pwmOutSuccess = 0; - PWMName pwm = (PWMName)pinmap_peripheral(pin, PinMap_PWM); + if (pin == NC) { + error("PwmOut init failed. Invalid pin name."); + } + + // Check if pin is already initialized and find the next free channel. + uint8_t free_instance = 0xFF; + uint8_t free_channel = 0xFF; - MBED_ASSERT(pwm != (PWMName)NC); - - if (PWM_taken[(uint8_t)pwm]) { - for (uint8_t i = 1; !pwmOutSuccess && (ipwm = pwm; - obj->pin = pin; - - gpiote_init(pin, (uint8_t)pwm); - ppi_init((uint8_t)pwm); - - if (pwm == 0) { - NRF_POWER->TASKS_CONSTLAT = 1; + // Init / reinit PWM instance. + m_pwm[free_instance].pins[free_channel] = (uint32_t) pin; + m_pwm[free_instance].duty_ticks[free_channel] = 0; + if (!m_pwm[free_instance].channels_allocated) { + m_pwm[free_instance].period_us = PWM_DEFAULT_PERIOD_US; + for (uint8_t channel = 1; channel < PWM_CHANNELS_PER_INSTANCE; ++channel) { + m_pwm[free_instance].pins[channel] = APP_PWM_NOPIN; + m_pwm[free_instance].duty_ticks[channel] = 0; + } + app_pwm_config_t pwm_cfg = APP_PWM_DEFAULT_CONFIG_1CH(PWM_DEFAULT_PERIOD_US, pin); + app_pwm_init(m_pwm[free_instance].instance, &pwm_cfg, NULL); + app_pwm_enable(m_pwm[free_instance].instance); } + else { + pwm_reinit(&m_pwm[free_instance]); + } + m_pwm[free_instance].channels_allocated |= (1 << free_channel); - timer_init((uint8_t)pwm); - - //default to 20ms: standard for servos, and fine for e.g. brightness control - pwmout_period_ms(obj, 20); - pwmout_write (obj, 0); + obj->pin = pin; + obj->pwm_struct = (void *) &m_pwm[free_instance]; + obj->pwm_channel = free_channel; } -void pwmout_free(pwmout_t* obj) { +void pwmout_free(pwmout_t *obj) +{ MBED_ASSERT(obj->pwm != (PWMName)NC); - pwmout_write(obj, 0); - PWM_taken[obj->pwm] = 0; - timer_free(); - ppi_free(obj->pwm); - gpiote_free(obj->pin,obj->pwm); + MBED_ASSERT(obj->pwm_channel < PWM_CHANNELS_PER_INSTANCE); + + pwm_t * pwm = (pwm_t *) obj->pwm_struct; + pwm->channels_allocated &= ~(1 << obj->pwm_channel); + pwm->pins[obj->pwm_channel] = APP_PWM_NOPIN; + pwm->duty_ticks[obj->pwm_channel] = 0; + + app_pwm_uninit(pwm->instance); + if (pwm->channels_allocated) { + pwm_reinit(pwm); + } + + obj->pwm_struct = NULL; } void pwmout_write(pwmout_t *obj, float value) { - uint16_t oldPulseWidth; - - NRF_TIMER2->EVENTS_COMPARE[3] = 0; - NRF_TIMER2->TASKS_STOP = 1; - - if (value < 0.0f) { - value = 0.0; - } else if (value > 1.0f) { - value = 1.0; + pwm_t * pwm = (pwm_t *) obj->pwm_struct; + if (value > 1.0f) { + value = 1.0f; } - - oldPulseWidth = ACTUAL_PULSE[obj->pwm]; - ACTUAL_PULSE[obj->pwm] = PULSE_WIDTH[obj->pwm] = value * PERIOD; - - if (PULSE_WIDTH[obj->pwm] == 0) { - PULSE_WIDTH[obj->pwm] = 1; - setModulation(obj, 0, 0); - } else if (PULSE_WIDTH[obj->pwm] == PERIOD) { - PULSE_WIDTH[obj->pwm] = PERIOD - 1; - setModulation(obj, 0, 1); - } else if ((oldPulseWidth == 0) || (oldPulseWidth == PERIOD)) { - setModulation(obj, 1, oldPulseWidth == PERIOD); - } - - NRF_TIMER2->INTENSET = TIMER_INTENSET_COMPARE3_Msk; - NRF_TIMER2->SHORTS = TIMER_SHORTS_COMPARE3_CLEAR_Msk | TIMER_SHORTS_COMPARE3_STOP_Msk; - NRF_TIMER2->TASKS_START = 1; + uint16_t ticks = (uint16_t)((float)app_pwm_cycle_ticks_get(pwm->instance) * value); } float pwmout_read(pwmout_t *obj) { - return ((float)PULSE_WIDTH[obj->pwm] / (float)PERIOD); + pwm_t * pwm = (pwm_t *) obj->pwm_struct; + MBED_ASSERT(pwm != NULL); + return ((float)pwm->duty_ticks[obj->pwm_channel] / (float)app_pwm_cycle_ticks_get(pwm->instance)); } void pwmout_period(pwmout_t *obj, float seconds) @@ -325,24 +180,15 @@ void pwmout_period_ms(pwmout_t *obj, int ms) pwmout_period_us(obj, ms * 1000); } -// Set the PWM period, keeping the duty cycle the same. void pwmout_period_us(pwmout_t *obj, int us) { - uint32_t periodInTicks = us / TIMER_PRECISION; - - NRF_TIMER2->EVENTS_COMPARE[3] = 0; - NRF_TIMER2->TASKS_STOP = 1; - - if (periodInTicks>((1 << 16) - 1)) { - PERIOD = (1 << 16) - 1; //131ms - } else if (periodInTicks<5) { - PERIOD = 5; - } else { - PERIOD = periodInTicks; + pwm_t * pwm = (pwm_t *) obj->pwm_struct; + MBED_ASSERT(pwm != NULL); + if (us < PWM_PERIOD_MIN) { + us = PWM_PERIOD_MIN; } - NRF_TIMER2->INTENSET = TIMER_INTENSET_COMPARE3_Msk; - NRF_TIMER2->SHORTS = TIMER_SHORTS_COMPARE3_CLEAR_Msk | TIMER_SHORTS_COMPARE3_STOP_Msk; - NRF_TIMER2->TASKS_START = 1; + pwm->period_us = (uint32_t)us; + pwm_reinit(pwm); } void pwmout_pulsewidth(pwmout_t *obj, float seconds) @@ -357,24 +203,11 @@ void pwmout_pulsewidth_ms(pwmout_t *obj, int ms) void pwmout_pulsewidth_us(pwmout_t *obj, int us) { - uint32_t pulseInTicks = us / TIMER_PRECISION; - uint16_t oldPulseWidth = ACTUAL_PULSE[obj->pwm]; - - NRF_TIMER2->EVENTS_COMPARE[3] = 0; - NRF_TIMER2->TASKS_STOP = 1; - - ACTUAL_PULSE[obj->pwm] = PULSE_WIDTH[obj->pwm] = pulseInTicks; - - if (PULSE_WIDTH[obj->pwm] == 0) { - PULSE_WIDTH[obj->pwm] = 1; - setModulation(obj, 0, 0); - } else if (PULSE_WIDTH[obj->pwm] == PERIOD) { - PULSE_WIDTH[obj->pwm] = PERIOD - 1; - setModulation(obj, 0, 1); - } else if ((oldPulseWidth == 0) || (oldPulseWidth == PERIOD)) { - setModulation(obj, 1, oldPulseWidth == PERIOD); - } - NRF_TIMER2->INTENSET = TIMER_INTENSET_COMPARE3_Msk; - NRF_TIMER2->SHORTS = TIMER_SHORTS_COMPARE3_CLEAR_Msk | TIMER_SHORTS_COMPARE3_STOP_Msk; - NRF_TIMER2->TASKS_START = 1; + pwm_t * pwm = (pwm_t *) obj->pwm_struct; + MBED_ASSERT(pwm); + + uint16_t ticks = nrf_timer_us_to_ticks((uint32_t)us, nrf_timer_frequency_get(pwm->timer_reg)); + pwm_ticks_set(pwm, obj->pwm_channel, ticks); } + +#endif // DEVICE_PWMOUT diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/config/nrf_drv_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h similarity index 94% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/config/nrf_drv_config.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h index 6fcba3826e..31df5d63a5 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/config/nrf_drv_config.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h @@ -44,10 +44,10 @@ * This functionality requires a more complicated interrupt handling and driver * initialization, hence it is not always desirable to use it. */ -#define PERIPHERAL_RESOURCE_SHARING_ENABLED 0 +#define PERIPHERAL_RESOURCE_SHARING_ENABLED 1 /* CLOCK */ -#define CLOCK_ENABLED 0 +#define CLOCK_ENABLED 1 #if (CLOCK_ENABLED == 1) #define CLOCK_CONFIG_XTAL_FREQ NRF_CLOCK_XTALFREQ_Default @@ -56,16 +56,20 @@ #endif /* GPIOTE */ -#define GPIOTE_ENABLED 0 +#define GPIOTE_ENABLED 1 #if (GPIOTE_ENABLED == 1) #define GPIOTE_CONFIG_USE_SWI_EGU false #define GPIOTE_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW -#define GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS 1 +#define GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS 8 #endif /* TIMER */ +#ifdef SOFTDEVICE_PRESENT #define TIMER0_ENABLED 0 +#else +#define TIMER0_ENABLED 1 +#endif #if (TIMER0_ENABLED == 1) #define TIMER0_CONFIG_FREQUENCY NRF_TIMER_FREQ_16MHz @@ -76,7 +80,7 @@ #define TIMER0_INSTANCE_INDEX 0 #endif -#define TIMER1_ENABLED 0 +#define TIMER1_ENABLED 1 #if (TIMER1_ENABLED == 1) #define TIMER1_CONFIG_FREQUENCY NRF_TIMER_FREQ_16MHz @@ -87,7 +91,7 @@ #define TIMER1_INSTANCE_INDEX (TIMER0_ENABLED) #endif -#define TIMER2_ENABLED 0 +#define TIMER2_ENABLED 1 #if (TIMER2_ENABLED == 1) #define TIMER2_CONFIG_FREQUENCY NRF_TIMER_FREQ_16MHz @@ -134,7 +138,7 @@ #define RTC0_INSTANCE_INDEX 0 #endif -#define RTC1_ENABLED 0 +#define RTC1_ENABLED 1 #if (RTC1_ENABLED == 1) #define RTC1_CONFIG_FREQUENCY 32768 @@ -224,7 +228,7 @@ #define PWM_COUNT (PWM0_ENABLED + PWM1_ENABLED + PWM2_ENABLED) /* SPI */ -#define SPI0_ENABLED 0 +#define SPI0_ENABLED 1 #if (SPI0_ENABLED == 1) #define SPI0_USE_EASY_DMA 0 @@ -237,7 +241,7 @@ #define SPI0_INSTANCE_INDEX 0 #endif -#define SPI1_ENABLED 0 +#define SPI1_ENABLED 1 #if (SPI1_ENABLED == 1) #define SPI1_USE_EASY_DMA 0 @@ -302,17 +306,17 @@ #define SPIS_COUNT (SPIS0_ENABLED + SPIS1_ENABLED + SPIS2_ENABLED) /* UART */ -#define UART0_ENABLED 0 +#define UART0_ENABLED 1 #if (UART0_ENABLED == 1) -#define UART0_CONFIG_HWFC NRF_UART_HWFC_DISABLED +#define UART0_CONFIG_HWFC NRF_UART_HWFC_ENABLED #define UART0_CONFIG_PARITY NRF_UART_PARITY_EXCLUDED -#define UART0_CONFIG_BAUDRATE NRF_UART_BAUDRATE_115200 -#define UART0_CONFIG_PSEL_TXD 0 -#define UART0_CONFIG_PSEL_RXD 0 -#define UART0_CONFIG_PSEL_CTS 0 -#define UART0_CONFIG_PSEL_RTS 0 -#define UART0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#define UART0_CONFIG_BAUDRATE NRF_UART_BAUDRATE_9600 +#define UART0_CONFIG_PSEL_TXD 9 +#define UART0_CONFIG_PSEL_RXD 11 +#define UART0_CONFIG_PSEL_CTS 10 +#define UART0_CONFIG_PSEL_RTS 8 +#define UART0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_HIGH #ifdef NRF52 #define UART0_CONFIG_USE_EASY_DMA false //Compile time flag @@ -321,7 +325,7 @@ #endif //NRF52 #endif -#define TWI0_ENABLED 0 +#define TWI0_ENABLED 1 #if (TWI0_ENABLED == 1) #define TWI0_USE_EASY_DMA 0 @@ -334,7 +338,7 @@ #define TWI0_INSTANCE_INDEX 0 #endif -#define TWI1_ENABLED 0 +#define TWI1_ENABLED 1 #if (TWI1_ENABLED == 1) #define TWI1_USE_EASY_DMA 0 @@ -397,7 +401,7 @@ #endif /* ADC */ -#define ADC_ENABLED 0 +#define ADC_ENABLED 1 #if (ADC_ENABLED == 1) #define ADC_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/serial_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/serial_api.c deleted file mode 100644 index e48c929ded..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/serial_api.c +++ /dev/null @@ -1,306 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// math.h required for floating point operations for baud rate calculation -//#include -#include -#include "mbed_assert.h" - -#include "serial_api.h" -#include "cmsis.h" -#include "pinmap.h" - -/****************************************************************************** - * INITIALIZATION - ******************************************************************************/ -#define UART_NUM 1 - -static uint32_t serial_irq_ids[UART_NUM] = {0}; -static uart_irq_handler irq_handler; -static const int acceptedSpeeds[18][2] = { - {1200, UART_BAUDRATE_BAUDRATE_Baud1200}, - {2400, UART_BAUDRATE_BAUDRATE_Baud2400}, - {4800, UART_BAUDRATE_BAUDRATE_Baud4800}, - {9600, UART_BAUDRATE_BAUDRATE_Baud9600}, - {14400, UART_BAUDRATE_BAUDRATE_Baud14400}, - {19200, UART_BAUDRATE_BAUDRATE_Baud19200}, - {28800, UART_BAUDRATE_BAUDRATE_Baud28800}, - {31250, (0x00800000UL) /* 31250 baud */}, - {38400, UART_BAUDRATE_BAUDRATE_Baud38400}, - {56000, (0x00E51000UL) /* 56000 baud */}, - {57600, UART_BAUDRATE_BAUDRATE_Baud57600}, - {76800, UART_BAUDRATE_BAUDRATE_Baud76800}, - {115200, UART_BAUDRATE_BAUDRATE_Baud115200}, - {230400, UART_BAUDRATE_BAUDRATE_Baud230400}, - {250000, UART_BAUDRATE_BAUDRATE_Baud250000}, - {460800, UART_BAUDRATE_BAUDRATE_Baud460800}, - {921600, UART_BAUDRATE_BAUDRATE_Baud921600}, - {1000000, UART_BAUDRATE_BAUDRATE_Baud1M} -}; - -int stdio_uart_inited = 0; -serial_t stdio_uart; - - -void serial_init(serial_t *obj, PinName tx, PinName rx) { - UARTName uart = UART_0; - obj->uart = (NRF_UART_Type *)uart; - - //pin configurations -- - NRF_GPIO->OUT |= (1 << tx); - NRF_GPIO->OUT |= (1 << RTS_PIN_NUMBER); - NRF_GPIO->DIR |= (1 << tx); //TX_PIN_NUMBER); - NRF_GPIO->DIR |= (1 << RTS_PIN_NUMBER); - - NRF_GPIO->DIR &= ~(1 << rx); //RX_PIN_NUMBER); - NRF_GPIO->DIR &= ~(1 << CTS_PIN_NUMBER); - - - // set default baud rate and format - serial_baud (obj, 9600); - serial_format(obj, 8, ParityNone, 1); - - obj->uart->ENABLE = (UART_ENABLE_ENABLE_Enabled << UART_ENABLE_ENABLE_Pos); - obj->uart->TASKS_STARTTX = 1; - obj->uart->TASKS_STARTRX = 1; - obj->uart->EVENTS_RXDRDY = 0; - // dummy write needed or TXDRDY trails write rather than leads write. - // pins are disconnected so nothing is physically transmitted on the wire - obj->uart->PSELTXD = 0xFFFFFFFF; - obj->uart->EVENTS_TXDRDY = 0; - obj->uart->TXD = 0; - while (obj->uart->EVENTS_TXDRDY != 1); - - obj->index = 0; - - obj->uart->PSELRTS = RTS_PIN_NUMBER; - obj->uart->PSELTXD = tx; //TX_PIN_NUMBER; - obj->uart->PSELCTS = CTS_PIN_NUMBER; - obj->uart->PSELRXD = rx; //RX_PIN_NUMBER; - - // set rx/tx pins in PullUp mode - if (tx != NC) { - pin_mode(tx, PullUp); - } - if (rx != NC) { - pin_mode(rx, PullUp); - } - - if (uart == STDIO_UART) { - stdio_uart_inited = 1; - memcpy(&stdio_uart, obj, sizeof(serial_t)); - } -} - -void serial_free(serial_t *obj) -{ - serial_irq_ids[obj->index] = 0; -} - -// serial_baud -// set the baud rate, taking in to account the current SystemFrequency -void serial_baud(serial_t *obj, int baudrate) -{ - if (baudrate<=1200) { - obj->uart->BAUDRATE = UART_BAUDRATE_BAUDRATE_Baud1200; - return; - } - - for (int i = 1; i<17; i++) { - if (baudrateuart->BAUDRATE = acceptedSpeeds[i - 1][1]; - return; - } - } - obj->uart->BAUDRATE = UART_BAUDRATE_BAUDRATE_Baud1M; -} - -void serial_format(serial_t *obj, int data_bits, SerialParity parity, int stop_bits) -{ - // 0: 1 stop bits, 1: 2 stop bits - // int parity_enable, parity_select; - switch (parity) { - case ParityNone: - obj->uart->CONFIG = 0; - break; - default: - obj->uart->CONFIG = (UART_CONFIG_PARITY_Included << UART_CONFIG_PARITY_Pos); - return; - } - //no Flow Control -} - -//****************************************************************************** -// * INTERRUPT HANDLING -//****************************************************************************** -static inline void uart_irq(uint32_t iir, uint32_t index) -{ - SerialIrq irq_type; - switch (iir) { - case 1: - irq_type = TxIrq; - break; - case 2: - irq_type = RxIrq; - break; - - default: - return; - } - - if (serial_irq_ids[index] != 0) { - irq_handler(serial_irq_ids[index], irq_type); - } -} - -#ifdef __cplusplus -extern "C" { -#endif -void UART0_IRQHandler() -{ - uint32_t irtype = 0; - - if((NRF_UART0->INTENSET & 0x80) && NRF_UART0->EVENTS_TXDRDY) { - irtype = 1; - } else if((NRF_UART0->INTENSET & 0x04) && NRF_UART0->EVENTS_RXDRDY) { - irtype = 2; - } - uart_irq(irtype, 0); -} - -#ifdef __cplusplus -} -#endif -void serial_irq_handler(serial_t *obj, uart_irq_handler handler, uint32_t id) -{ - irq_handler = handler; - serial_irq_ids[obj->index] = id; -} - -void serial_irq_set(serial_t *obj, SerialIrq irq, uint32_t enable) -{ - IRQn_Type irq_n = (IRQn_Type)0; - - switch ((int)obj->uart) { - case UART_0: - irq_n = UART0_IRQn; - break; - } - - if (enable) { - switch (irq) { - case RxIrq: - obj->uart->INTENSET = (UART_INTENSET_RXDRDY_Msk); - break; - case TxIrq: - obj->uart->INTENSET = (UART_INTENSET_TXDRDY_Msk); - break; - } - NVIC_SetPriority(irq_n, 3); - NVIC_EnableIRQ(irq_n); - } else { // disable - // maseked writes to INTENSET dont disable and masked writes to - // INTENCLR seemed to clear the entire register, not bits. - // Added INTEN to memory map and seems to allow set and clearing of specific bits as desired - int all_disabled = 0; - switch (irq) { - case RxIrq: - obj->uart->INTENCLR = (UART_INTENCLR_RXDRDY_Msk); - all_disabled = (obj->uart->INTENCLR & (UART_INTENCLR_TXDRDY_Msk)) == 0; - break; - case TxIrq: - obj->uart->INTENCLR = (UART_INTENCLR_TXDRDY_Msk); - all_disabled = (obj->uart->INTENCLR & (UART_INTENCLR_RXDRDY_Msk)) == 0; - break; - } - - if (all_disabled) { - NVIC_DisableIRQ(irq_n); - } - } -} - -//****************************************************************************** -//* READ/WRITE -//****************************************************************************** -int serial_getc(serial_t *obj) -{ - while (!serial_readable(obj)) { - } - - obj->uart->EVENTS_RXDRDY = 0; - - return (uint8_t)obj->uart->RXD; -} - -void serial_putc(serial_t *obj, int c) -{ - while (!serial_writable(obj)) { - } - - obj->uart->EVENTS_TXDRDY = 0; - obj->uart->TXD = (uint8_t)c; -} - -int serial_readable(serial_t *obj) -{ - return (obj->uart->EVENTS_RXDRDY == 1); -} - -int serial_writable(serial_t *obj) -{ - return (obj->uart->EVENTS_TXDRDY == 1); -} - -void serial_break_set(serial_t *obj) -{ - obj->uart->TASKS_SUSPEND = 1; -} - -void serial_break_clear(serial_t *obj) -{ - obj->uart->TASKS_STARTTX = 1; - obj->uart->TASKS_STARTRX = 1; -} - -void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, PinName txflow) -{ - - if (type == FlowControlRTSCTS || type == FlowControlRTS) { - NRF_GPIO->DIR |= (1<uart->PSELRTS = rxflow; - - obj->uart->CONFIG |= 0x01; // Enable HWFC - } - - if (type == FlowControlRTSCTS || type == FlowControlCTS) { - NRF_GPIO->DIR &= ~(1<uart->PSELCTS = txflow; - - obj->uart->CONFIG |= 0x01; // Enable HWFC; - } - - if (type == FlowControlNone) { - obj->uart->PSELRTS = 0xFFFFFFFF; // Disable RTS - obj->uart->PSELCTS = 0xFFFFFFFF; // Disable CTS - - obj->uart->CONFIG &= ~0x01; // Enable HWFC; - } -} - -void serial_clear(serial_t *obj) { -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/spi_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/spi_api.c deleted file mode 100644 index 35ad304b85..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/spi_api.c +++ /dev/null @@ -1,286 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -//#include -#include "mbed_assert.h" -#include "spi_api.h" -#include "cmsis.h" -#include "pinmap.h" -#include "mbed_error.h" - -#define SPIS_MESSAGE_SIZE 1 -volatile uint8_t m_tx_buf[SPIS_MESSAGE_SIZE] = {0}; -volatile uint8_t m_rx_buf[SPIS_MESSAGE_SIZE] = {0}; - -// nRF51822's I2C_0 and SPI_0 (I2C_1, SPI_1 and SPIS1) share the same address. -// They can't be used at the same time. So we use two global variable to track the usage. -// See nRF51822 address information at nRF51822_PS v2.0.pdf - Table 15 Peripheral instance reference -extern volatile i2c_spi_peripheral_t i2c0_spi0_peripheral; // from i2c_api.c -extern volatile i2c_spi_peripheral_t i2c1_spi1_peripheral; - -void spi_init(spi_t *obj, PinName mosi, PinName miso, PinName sclk, PinName ssel) -{ - SPIName spi; - - if (ssel == NC && i2c0_spi0_peripheral.usage == I2C_SPI_PERIPHERAL_FOR_SPI && - i2c0_spi0_peripheral.sda_mosi == (uint8_t)mosi && - i2c0_spi0_peripheral.scl_miso == (uint8_t)miso && - i2c0_spi0_peripheral.sclk == (uint8_t)sclk) { - // The SPI with the same pins is already initialized - spi = SPI_0; - obj->peripheral = 0x1; - } else if (ssel == NC && i2c1_spi1_peripheral.usage == I2C_SPI_PERIPHERAL_FOR_SPI && - i2c1_spi1_peripheral.sda_mosi == (uint8_t)mosi && - i2c1_spi1_peripheral.scl_miso == (uint8_t)miso && - i2c1_spi1_peripheral.sclk == (uint8_t)sclk) { - // The SPI with the same pins is already initialized - spi = SPI_1; - obj->peripheral = 0x2; - } else if (i2c1_spi1_peripheral.usage == 0) { - i2c1_spi1_peripheral.usage = I2C_SPI_PERIPHERAL_FOR_SPI; - i2c1_spi1_peripheral.sda_mosi = (uint8_t)mosi; - i2c1_spi1_peripheral.scl_miso = (uint8_t)miso; - i2c1_spi1_peripheral.sclk = (uint8_t)sclk; - - spi = SPI_1; - obj->peripheral = 0x2; - } else if (i2c0_spi0_peripheral.usage == 0) { - i2c0_spi0_peripheral.usage = I2C_SPI_PERIPHERAL_FOR_SPI; - i2c0_spi0_peripheral.sda_mosi = (uint8_t)mosi; - i2c0_spi0_peripheral.scl_miso = (uint8_t)miso; - i2c0_spi0_peripheral.sclk = (uint8_t)sclk; - - spi = SPI_0; - obj->peripheral = 0x1; - } else { - // No available peripheral - error("No available SPI"); - } - - if (ssel==NC) { - obj->spi = (NRF_SPI_Type *)spi; - obj->spis = (NRF_SPIS_Type *)NC; - } else { - obj->spi = (NRF_SPI_Type *)NC; - obj->spis = (NRF_SPIS_Type *)spi; - } - - // pin out the spi pins - if (ssel != NC) { //slave - obj->spis->POWER = 0; - obj->spis->POWER = 1; - - NRF_GPIO->PIN_CNF[mosi] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos); - NRF_GPIO->PIN_CNF[miso] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos); - NRF_GPIO->PIN_CNF[sclk] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos); - NRF_GPIO->PIN_CNF[ssel] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos); - - obj->spis->PSELMOSI = mosi; - obj->spis->PSELMISO = miso; - obj->spis->PSELSCK = sclk; - obj->spis->PSELCSN = ssel; - - obj->spis->EVENTS_END = 0; - obj->spis->EVENTS_ACQUIRED = 0; - obj->spis->MAXRX = SPIS_MESSAGE_SIZE; - obj->spis->MAXTX = SPIS_MESSAGE_SIZE; - obj->spis->TXDPTR = (uint32_t)&m_tx_buf[0]; - obj->spis->RXDPTR = (uint32_t)&m_rx_buf[0]; - obj->spis->SHORTS = (SPIS_SHORTS_END_ACQUIRE_Enabled << SPIS_SHORTS_END_ACQUIRE_Pos); - - spi_format(obj, 8, 0, 1); // 8 bits, mode 0, slave - } else { //master - obj->spi->POWER = 0; - obj->spi->POWER = 1; - - //NRF_GPIO->DIR |= (1<PIN_CNF[mosi] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); - obj->spi->PSELMOSI = mosi; - - NRF_GPIO->PIN_CNF[sclk] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); - obj->spi->PSELSCK = sclk; - - //NRF_GPIO->DIR &= ~(1<PIN_CNF[miso] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos); - - obj->spi->PSELMISO = miso; - - obj->spi->EVENTS_READY = 0U; - - spi_format(obj, 8, 0, 0); // 8 bits, mode 0, master - spi_frequency(obj, 1000000); - } -} - -void spi_free(spi_t *obj) -{ -} - -static inline void spi_disable(spi_t *obj, int slave) -{ - if (slave) { - obj->spis->ENABLE = (SPIS_ENABLE_ENABLE_Disabled << SPIS_ENABLE_ENABLE_Pos); - } else { - obj->spi->ENABLE = (SPI_ENABLE_ENABLE_Disabled << SPI_ENABLE_ENABLE_Pos); - } -} - -static inline void spi_enable(spi_t *obj, int slave) -{ - if (slave) { - obj->spis->ENABLE = (SPIS_ENABLE_ENABLE_Enabled << SPIS_ENABLE_ENABLE_Pos); - } else { - obj->spi->ENABLE = (SPI_ENABLE_ENABLE_Enabled << SPI_ENABLE_ENABLE_Pos); - } -} - -void spi_format(spi_t *obj, int bits, int mode, int slave) -{ - uint32_t config_mode = 0; - spi_disable(obj, slave); - - if (bits != 8) { - error("Only 8bits SPI supported"); - } - - switch (mode) { - case 0: - config_mode = (SPI_CONFIG_CPHA_Leading << SPI_CONFIG_CPHA_Pos) | (SPI_CONFIG_CPOL_ActiveHigh << SPI_CONFIG_CPOL_Pos); - break; - case 1: - config_mode = (SPI_CONFIG_CPHA_Trailing << SPI_CONFIG_CPHA_Pos) | (SPI_CONFIG_CPOL_ActiveHigh << SPI_CONFIG_CPOL_Pos); - break; - case 2: - config_mode = (SPI_CONFIG_CPHA_Leading << SPI_CONFIG_CPHA_Pos) | (SPI_CONFIG_CPOL_ActiveLow << SPI_CONFIG_CPOL_Pos); - break; - case 3: - config_mode = (SPI_CONFIG_CPHA_Trailing << SPI_CONFIG_CPHA_Pos) | (SPI_CONFIG_CPOL_ActiveLow << SPI_CONFIG_CPOL_Pos); - break; - default: - error("SPI format error"); - break; - } - //default to msb first - if (slave) { - obj->spis->CONFIG = (config_mode | (SPI_CONFIG_ORDER_MsbFirst << SPI_CONFIG_ORDER_Pos)); - } else { - obj->spi->CONFIG = (config_mode | (SPI_CONFIG_ORDER_MsbFirst << SPI_CONFIG_ORDER_Pos)); - } - - spi_enable(obj, slave); -} - -void spi_frequency(spi_t *obj, int hz) -{ - if ((int)obj->spi==NC) { - return; - } - spi_disable(obj, 0); - - if (hz<250000) { //125Kbps - obj->spi->FREQUENCY = (uint32_t) SPI_FREQUENCY_FREQUENCY_K125; - } else if (hz<500000) { //250Kbps - obj->spi->FREQUENCY = (uint32_t) SPI_FREQUENCY_FREQUENCY_K250; - } else if (hz<1000000) { //500Kbps - obj->spi->FREQUENCY = (uint32_t) SPI_FREQUENCY_FREQUENCY_K500; - } else if (hz<2000000) { //1Mbps - obj->spi->FREQUENCY = (uint32_t) SPI_FREQUENCY_FREQUENCY_M1; - } else if (hz<4000000) { //2Mbps - obj->spi->FREQUENCY = (uint32_t) SPI_FREQUENCY_FREQUENCY_M2; - } else if (hz<8000000) { //4Mbps - obj->spi->FREQUENCY = (uint32_t) SPI_FREQUENCY_FREQUENCY_M4; - } else { //8Mbps - obj->spi->FREQUENCY = (uint32_t) SPI_FREQUENCY_FREQUENCY_M8; - } - - spi_enable(obj, 0); -} - -static inline int spi_readable(spi_t *obj) -{ - return (obj->spi->EVENTS_READY == 1); -} - -static inline int spi_writeable(spi_t *obj) -{ - return (obj->spi->EVENTS_READY == 0); -} - -static inline int spi_read(spi_t *obj) -{ - while (!spi_readable(obj)) { - } - - obj->spi->EVENTS_READY = 0; - return (int)obj->spi->RXD; -} - -int spi_master_write(spi_t *obj, int value) -{ - while (!spi_writeable(obj)) { - } - obj->spi->TXD = (uint32_t)value; - return spi_read(obj); -} - -//static inline int spis_writeable(spi_t *obj) { -// return (obj->spis->EVENTS_ACQUIRED==1); -//} - -int spi_slave_receive(spi_t *obj) -{ - return obj->spis->EVENTS_END; -} - -int spi_slave_read(spi_t *obj) -{ - return m_rx_buf[0]; -} - -void spi_slave_write(spi_t *obj, int value) -{ - m_tx_buf[0] = value & 0xFF; - obj->spis->TASKS_RELEASE = 1; - obj->spis->EVENTS_ACQUIRED = 0; - obj->spis->EVENTS_END = 0; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/twi_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/twi_config.h deleted file mode 100644 index a5ad887d14..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/twi_config.h +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ -#ifndef TWI_MASTER_CONFIG -#define TWI_MASTER_CONFIG - -#include "PinNames.h" - -#define TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER (I2C_SCL0) -#define TWI_MASTER_CONFIG_DATA_PIN_NUMBER (I2C_SDA0) - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/twi_master.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/twi_master.c deleted file mode 100644 index d7a02f0541..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/twi_master.c +++ /dev/null @@ -1,304 +0,0 @@ -/* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -#include "twi_master.h" -#include "twi_config.h" -#include -#include -#include "nrf.h" -#include "nrf_delay.h" - -/* Max cycles approximately to wait on RXDREADY and TXDREADY event, - * This is optimized way instead of using timers, this is not power aware. */ -#define MAX_TIMEOUT_LOOPS (20000UL) /**< MAX while loops to wait for RXD/TXD event */ - -static bool twi_master_write(uint8_t * data, uint8_t data_length, bool issue_stop_condition, NRF_TWI_Type* twi) -{ - uint32_t timeout = MAX_TIMEOUT_LOOPS; /* max loops to wait for EVENTS_TXDSENT event*/ - - if (data_length == 0) - { - /* Return false for requesting data of size 0 */ - return false; - } - - twi->TXD = *data++; - twi->TASKS_STARTTX = 1; - - /** @snippet [TWI HW master write] */ - while (true) - { - while (twi->EVENTS_TXDSENT == 0 && twi->EVENTS_ERROR == 0 && (--timeout)) - { - // Do nothing. - } - - if (timeout == 0 || NRF_TWI1->EVENTS_ERROR != 0) - { - // Recover the peripheral as indicated by PAN 56: "TWI: TWI module lock-up." found at - // Product Anomaly Notification document found at - // https://www.nordicsemi.com/eng/Products/Bluetooth-R-low-energy/nRF51822/#Downloads - twi->EVENTS_ERROR = 0; - twi->ENABLE = TWI_ENABLE_ENABLE_Disabled << TWI_ENABLE_ENABLE_Pos; - twi->POWER = 0; - nrf_delay_us(5); - twi->POWER = 1; - twi->ENABLE = TWI_ENABLE_ENABLE_Enabled << TWI_ENABLE_ENABLE_Pos; - - (void)twi_master_init_and_clear(twi); - - return false; - } - twi->EVENTS_TXDSENT = 0; - if (--data_length == 0) - { - break; - } - - twi->TXD = *data++; - } - /** @snippet [TWI HW master write] */ - - if (issue_stop_condition) - { - twi->EVENTS_STOPPED = 0; - twi->TASKS_STOP = 1; - /* Wait until stop sequence is sent */ - while(twi->EVENTS_STOPPED == 0) - { - // Do nothing. - } - } - return true; -} - - -/** @brief Function for read by twi_master. - */ -static bool twi_master_read(uint8_t * data, uint8_t data_length, bool issue_stop_condition, NRF_TWI_Type* twi) -{ - uint32_t timeout = MAX_TIMEOUT_LOOPS; /* max loops to wait for RXDREADY event*/ - - if (data_length == 0) - { - /* Return false for requesting data of size 0 */ - return false; - } - else if (data_length == 1) - { - NRF_PPI->CH[0].TEP = (uint32_t)&twi->TASKS_STOP; - } - else - { - NRF_PPI->CH[0].TEP = (uint32_t)&twi->TASKS_SUSPEND; - } - - NRF_PPI->CHENSET = PPI_CHENSET_CH0_Msk; - twi->EVENTS_RXDREADY = 0; - twi->TASKS_STARTRX = 1; - - /** @snippet [TWI HW master read] */ - while (true) - { - while (twi->EVENTS_RXDREADY == 0 && NRF_TWI1->EVENTS_ERROR == 0 && (--timeout)) - { - // Do nothing. - } - twi->EVENTS_RXDREADY = 0; - - if (timeout == 0 || twi->EVENTS_ERROR != 0) - { - // Recover the peripheral as indicated by PAN 56: "TWI: TWI module lock-up." found at - // Product Anomaly Notification document found at - // https://www.nordicsemi.com/eng/Products/Bluetooth-R-low-energy/nRF51822/#Downloads - twi->EVENTS_ERROR = 0; - twi->ENABLE = TWI_ENABLE_ENABLE_Disabled << TWI_ENABLE_ENABLE_Pos; - twi->POWER = 0; - nrf_delay_us(5); - twi->POWER = 1; - twi->ENABLE = TWI_ENABLE_ENABLE_Enabled << TWI_ENABLE_ENABLE_Pos; - - (void)twi_master_init_and_clear(twi); - - return false; - } - - *data++ = NRF_TWI1->RXD; - - /* Configure PPI to stop TWI master before we get last BB event */ - if (--data_length == 1) - { - NRF_PPI->CH[0].TEP = (uint32_t)&NRF_TWI1->TASKS_STOP; - } - - if (data_length == 0) - { - break; - } - - // Recover the peripheral as indicated by PAN 56: "TWI: TWI module lock-up." found at - // Product Anomaly Notification document found at - // https://www.nordicsemi.com/eng/Products/Bluetooth-R-low-energy/nRF51822/#Downloads - nrf_delay_us(20); - twi->TASKS_RESUME = 1; - } - /** @snippet [TWI HW master read] */ - - /* Wait until stop sequence is sent */ - while(twi->EVENTS_STOPPED == 0) - { - // Do nothing. - } - twi->EVENTS_STOPPED = 0; - - NRF_PPI->CHENCLR = PPI_CHENCLR_CH0_Msk; - return true; -} - - -/** - * @brief Function for detecting stuck slaves (SDA = 0 and SCL = 1) and tries to clear the bus. - * - * @return - * @retval false Bus is stuck. - * @retval true Bus is clear. - */ -static bool twi_master_clear_bus(NRF_TWI_Type* twi) -{ - uint32_t twi_state; - bool bus_clear; - uint32_t clk_pin_config; - uint32_t data_pin_config; - - // Save and disable TWI hardware so software can take control over the pins. - twi_state = twi->ENABLE; - twi->ENABLE = TWI_ENABLE_ENABLE_Disabled << TWI_ENABLE_ENABLE_Pos; - - clk_pin_config = \ - NRF_GPIO->PIN_CNF[TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER]; - NRF_GPIO->PIN_CNF[TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER] = \ - (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) \ - | (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) \ - | (GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) \ - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) \ - | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); - - data_pin_config = \ - NRF_GPIO->PIN_CNF[TWI_MASTER_CONFIG_DATA_PIN_NUMBER]; - NRF_GPIO->PIN_CNF[TWI_MASTER_CONFIG_DATA_PIN_NUMBER] = \ - (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) \ - | (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) \ - | (GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) \ - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) \ - | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); - - TWI_SDA_HIGH(); - TWI_SCL_HIGH(); - TWI_DELAY(); - - if ((TWI_SDA_READ() == 1) && (TWI_SCL_READ() == 1)) - { - bus_clear = true; - } - else - { - uint_fast8_t i; - bus_clear = false; - - // Clock max 18 pulses worst case scenario(9 for master to send the rest of command and 9 - // for slave to respond) to SCL line and wait for SDA come high. - for (i=18; i--;) - { - TWI_SCL_LOW(); - TWI_DELAY(); - TWI_SCL_HIGH(); - TWI_DELAY(); - - if (TWI_SDA_READ() == 1) - { - bus_clear = true; - break; - } - } - } - - NRF_GPIO->PIN_CNF[TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER] = clk_pin_config; - NRF_GPIO->PIN_CNF[TWI_MASTER_CONFIG_DATA_PIN_NUMBER] = data_pin_config; - - twi->ENABLE = twi_state; - - return bus_clear; -} - - -/** @brief Function for initializing the twi_master. - */ -bool twi_master_init_and_clear(NRF_TWI_Type* twi) -{ - /* To secure correct signal levels on the pins used by the TWI - master when the system is in OFF mode, and when the TWI master is - disabled, these pins must be configured in the GPIO peripheral. - */ - NRF_GPIO->PIN_CNF[TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER] = \ - (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) \ - | (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) \ - | (GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) \ - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) \ - | (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos); - - NRF_GPIO->PIN_CNF[TWI_MASTER_CONFIG_DATA_PIN_NUMBER] = \ - (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) \ - | (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) \ - | (GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) \ - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) \ - | (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos); - - twi->EVENTS_RXDREADY = 0; - twi->EVENTS_TXDSENT = 0; - twi->PSELSCL = TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER; - twi->PSELSDA = TWI_MASTER_CONFIG_DATA_PIN_NUMBER; - twi->FREQUENCY = TWI_FREQUENCY_FREQUENCY_K100 << TWI_FREQUENCY_FREQUENCY_Pos; - NRF_PPI->CH[0].EEP = (uint32_t)&twi->EVENTS_BB; - NRF_PPI->CH[0].TEP = (uint32_t)&twi->TASKS_SUSPEND; - NRF_PPI->CHENCLR = PPI_CHENCLR_CH0_Msk; - twi->ENABLE = TWI_ENABLE_ENABLE_Enabled << TWI_ENABLE_ENABLE_Pos; - - return twi_master_clear_bus(twi); -} - - -/** @brief Function for transfer by twi_master. - */ -bool twi_master_transfer(uint8_t address, - uint8_t * data, - uint8_t data_length, - bool issue_stop_condition, - NRF_TWI_Type* twi) -{ - bool transfer_succeeded = false; - if (data_length > 0 && twi_master_clear_bus(twi)) - { - twi->ADDRESS = (address >> 1); - - if ((address & TWI_READ_BIT)) - { - transfer_succeeded = twi_master_read(data, data_length, issue_stop_condition, twi); - } - else - { - transfer_succeeded = twi_master_write(data, data_length, issue_stop_condition, twi); - } - } - return transfer_succeeded; -} - -/*lint --flb "Leave library region" */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/twi_master.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/twi_master.h deleted file mode 100644 index 6a6593f87b..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/twi_master.h +++ /dev/null @@ -1,112 +0,0 @@ - /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -#ifndef TWI_MASTER_H -#define TWI_MASTER_H - - -#ifdef __cplusplus -extern "C" { -#endif - -/*lint ++flb "Enter library region" */ - -#include -#include - -#include "nrf51.h" - -/** @file -* @brief Software controlled TWI Master driver. -* -* -* @defgroup lib_driver_twi_master Software controlled TWI Master driver -* @{ -* @ingroup nrf_drivers -* @brief Software controlled TWI Master driver. -* -* Supported features: -* - Repeated start -* - No multi-master -* - Only 7-bit addressing -* - Supports clock stretching (with optional SMBus style slave timeout) -* - Tries to handle slaves stuck in the middle of transfer -*/ - -#define TWI_READ_BIT (0x01) //!< If this bit is set in the address field, transfer direction is from slave to master. - -#define TWI_ISSUE_STOP ((bool)true) //!< Parameter for @ref twi_master_transfer -#define TWI_DONT_ISSUE_STOP ((bool)false) //!< Parameter for @ref twi_master_transfer - -/* These macros are needed to see if the slave is stuck and we as master send dummy clock cycles to end its wait */ -/*lint -e717 -save "Suppress do {} while (0) for these macros" */ -/*lint ++flb "Enter library region" */ -#define TWI_SCL_HIGH() do { NRF_GPIO->OUTSET = (1UL << TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER); } while(0) /*!< Pulls SCL line high */ -#define TWI_SCL_LOW() do { NRF_GPIO->OUTCLR = (1UL << TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER); } while(0) /*!< Pulls SCL line low */ -#define TWI_SDA_HIGH() do { NRF_GPIO->OUTSET = (1UL << TWI_MASTER_CONFIG_DATA_PIN_NUMBER); } while(0) /*!< Pulls SDA line high */ -#define TWI_SDA_LOW() do { NRF_GPIO->OUTCLR = (1UL << TWI_MASTER_CONFIG_DATA_PIN_NUMBER); } while(0) /*!< Pulls SDA line low */ -#define TWI_SDA_INPUT() do { NRF_GPIO->DIRCLR = (1UL << TWI_MASTER_CONFIG_DATA_PIN_NUMBER); } while(0) /*!< Configures SDA pin as input */ -#define TWI_SDA_OUTPUT() do { NRF_GPIO->DIRSET = (1UL << TWI_MASTER_CONFIG_DATA_PIN_NUMBER); } while(0) /*!< Configures SDA pin as output */ -#define TWI_SCL_OUTPUT() do { NRF_GPIO->DIRSET = (1UL << TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER); } while(0) /*!< Configures SCL pin as output */ -/*lint -restore */ - -#define TWI_SDA_READ() ((NRF_GPIO->IN >> TWI_MASTER_CONFIG_DATA_PIN_NUMBER) & 0x1UL) /*!< Reads current state of SDA */ -#define TWI_SCL_READ() ((NRF_GPIO->IN >> TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER) & 0x1UL) /*!< Reads current state of SCL */ - -#define TWI_DELAY() nrf_delay_us(4) /*!< Time to wait when pin states are changed. For fast-mode the delay can be zero and for standard-mode 4 us delay is sufficient. */ - - -/** - * @brief Function for initializing TWI bus IO pins and checks if the bus is operational. - * - * Both pins are configured as Standard-0, No-drive-1 (open drain). - * - * @param twi The TWI interface to use - either NRF_TWI0 or NRF_TWI1 - * @return - * @retval true TWI bus is clear for transfers. - * @retval false TWI bus is stuck. - */ -bool twi_master_init_and_clear(NRF_TWI_Type* twi); - -/** - * @brief Function for transferring data over TWI bus. - * - * If TWI master detects even one NACK from the slave or timeout occurs, STOP condition is issued - * and the function returns false. - * Bit 0 (@ref TWI_READ_BIT) in the address parameter controls transfer direction; - * - If 1, master reads data_length number of bytes from the slave - * - If 0, master writes data_length number of bytes to the slave. - * - * @note Make sure at least data_length number of bytes is allocated in data if TWI_READ_BIT is set. - * @note @ref TWI_ISSUE_STOP - * - * @param address Data transfer direction (LSB) / Slave address (7 MSBs). - * @param data Pointer to data. - * @param data_length Number of bytes to transfer. - * @param issue_stop_condition If @ref TWI_ISSUE_STOP, STOP condition is issued before exiting function. If @ref TWI_DONT_ISSUE_STOP, STOP condition is not issued before exiting function. If transfer failed for any reason, STOP condition will be issued in any case. - * @param twi The TWI interface to use - either NRF_TWI0 or NRF_TWI1 - * @return - * @retval true Data transfer succeeded without errors. - * @retval false Data transfer failed. - */ -bool twi_master_transfer(uint8_t address, uint8_t *data, uint8_t data_length, bool issue_stop_condition, NRF_TWI_Type* twi); - -/** - *@} - **/ - -#ifdef __cplusplus -} -#endif - -/*lint --flb "Leave library region" */ -#endif //TWI_MASTER_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/us_ticker.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/us_ticker.c deleted file mode 100644 index abbe793a52..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/us_ticker.c +++ /dev/null @@ -1,602 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include -#include -#include "us_ticker_api.h" -#include "cmsis.h" -#include "PeripheralNames.h" -#include "nrf_delay.h" -#include "toolchain.h" - -/* - * Note: The micro-second timer API on the nRF51 platform is implemented using - * the RTC counter run at 32kHz (sourced from an external oscillator). This is - * a trade-off between precision and power. Running a normal 32-bit MCU counter - * at high frequency causes the average power consumption to rise to a few - * hundred micro-amps, which is prohibitive for typical low-power BLE - * applications. - * A 32kHz clock doesn't offer the precision needed for keeping u-second time, - * but we're assuming that this will not be a problem for the average user. - */ - -#define MAX_RTC_COUNTER_VAL 0x00FFFFFF /**< Maximum value of the RTC counter. */ -#define RTC_CLOCK_FREQ (uint32_t)(32768) -#define RTC1_IRQ_PRI 3 /**< Priority of the RTC1 interrupt (used - * for checking for timeouts and executing - * timeout handlers). This must be the same - * as APP_IRQ_PRIORITY_LOW; taken from the - * Nordic SDK. */ -#define MAX_RTC_TASKS_DELAY 47 /**< Maximum delay until an RTC task is executed. */ - -#define FUZZY_RTC_TICKS 2 /* RTC COMPARE occurs when a CC register is N and the RTC - * COUNTER value transitions from N-1 to N. If we're trying to - * setup a callback for a time which will arrive very shortly, - * there are limits to how short the callback interval may be for us - * to rely upon the RTC Compare trigger. If the COUNTER is N, - * writing N+2 to a CC register is guaranteed to trigger a COMPARE - * event at N+2. */ - -#define RTC_UNITS_TO_MICROSECONDS(RTC_UNITS) (((RTC_UNITS) * (uint64_t)1000000) / RTC_CLOCK_FREQ) -#define MICROSECONDS_TO_RTC_UNITS(MICROS) ((((uint64_t)(MICROS) * RTC_CLOCK_FREQ) + 999999) / 1000000) - -static bool us_ticker_inited = false; -static volatile uint32_t overflowCount; /**< The number of times the 24-bit RTC counter has overflowed. */ -static volatile bool us_ticker_callbackPending = false; -static uint32_t us_ticker_callbackTimestamp; -static bool os_tick_started = false; /**< flag indicating if the os_tick has started */ -/** - * The value previously set in the capture compare register of channel 1 - */ -static uint32_t previous_tick_cc_value = 0; - -/* - RTX provide the following definitions which are used by the tick code: - * os_trv: The number (minus 1) of clock cycle between two tick. - * os_clockrate: Time duration between two ticks (in us). - * OS_Tick_Handler: The function which handle a tick event. - This function is special because it never returns. - Those definitions are used by the code which handle the os tick. - To allow compilation of us_ticker programs without RTOS, those symbols are - exported from this module as weak ones. - */ -MBED_WEAK uint32_t const os_trv; -MBED_WEAK uint32_t const os_clockrate; -MBED_WEAK void OS_Tick_Handler() { } - -static inline void rtc1_enableCompareInterrupt(void) -{ - NRF_RTC1->EVTENCLR = RTC_EVTEN_COMPARE0_Msk; - NRF_RTC1->INTENSET = RTC_INTENSET_COMPARE0_Msk; -} - -static inline void rtc1_disableCompareInterrupt(void) -{ - NRF_RTC1->INTENCLR = RTC_INTENSET_COMPARE0_Msk; - NRF_RTC1->EVTENCLR = RTC_EVTEN_COMPARE0_Msk; -} - -static inline void rtc1_enableOverflowInterrupt(void) -{ - NRF_RTC1->EVTENCLR = RTC_EVTEN_OVRFLW_Msk; - NRF_RTC1->INTENSET = RTC_INTENSET_OVRFLW_Msk; -} - -static inline void rtc1_disableOverflowInterrupt(void) -{ - NRF_RTC1->INTENCLR = RTC_INTENSET_OVRFLW_Msk; - NRF_RTC1->EVTENCLR = RTC_EVTEN_OVRFLW_Msk; -} - -static inline void invokeCallback(void) -{ - us_ticker_callbackPending = false; - rtc1_disableCompareInterrupt(); - us_ticker_irq_handler(); -} - -/** - * @brief Function for starting the RTC1 timer. The RTC timer is expected to - * keep running--some interrupts may be disabled temporarily. - */ -static void rtc1_start() -{ - NRF_RTC1->PRESCALER = 0; /* for no pre-scaling. */ - - rtc1_enableOverflowInterrupt(); - - NVIC_SetPriority(RTC1_IRQn, RTC1_IRQ_PRI); - NVIC_ClearPendingIRQ(RTC1_IRQn); - NVIC_EnableIRQ(RTC1_IRQn); - - NRF_RTC1->TASKS_START = 1; - nrf_delay_us(MAX_RTC_TASKS_DELAY); -} - -/** - * @brief Function for stopping the RTC1 timer. We don't expect to call this. - */ -void rtc1_stop(void) -{ - // If the os tick has been started, RTC1 shouldn't be stopped - // In that case, us ticker and overflow interrupt are disabled. - if (os_tick_started) { - rtc1_disableCompareInterrupt(); - rtc1_disableOverflowInterrupt(); - } else { - NVIC_DisableIRQ(RTC1_IRQn); - rtc1_disableCompareInterrupt(); - rtc1_disableOverflowInterrupt(); - - NRF_RTC1->TASKS_STOP = 1; - nrf_delay_us(MAX_RTC_TASKS_DELAY); - - NRF_RTC1->TASKS_CLEAR = 1; - nrf_delay_us(MAX_RTC_TASKS_DELAY); - } -} - -/** - * @brief Function for returning the current value of the RTC1 counter. - * - * @return Current RTC1 counter as a 64-bit value with 56-bit precision (even - * though the underlying counter is 24-bit) - */ -static inline uint64_t rtc1_getCounter64(void) -{ - if (NRF_RTC1->EVENTS_OVRFLW) { - overflowCount++; - NRF_RTC1->EVENTS_OVRFLW = 0; - NRF_RTC1->EVTENCLR = RTC_EVTEN_OVRFLW_Msk; - } - return ((uint64_t)overflowCount << 24) | NRF_RTC1->COUNTER; -} - -/** - * @brief Function for returning the current value of the RTC1 counter. - * - * @return Current RTC1 counter as a 32-bit value (even though the underlying counter is 24-bit) - */ -static inline uint32_t rtc1_getCounter(void) -{ - return rtc1_getCounter64(); -} - -/** - * @brief Function for handling the RTC1 interrupt for us ticker (capture compare channel 0 and overflow). - * - * @details Checks for timeouts, and executes timeout handlers for expired timers. - */ -void us_ticker_handler(void) -{ - if (NRF_RTC1->EVENTS_OVRFLW) { - overflowCount++; - NRF_RTC1->EVENTS_OVRFLW = 0; - NRF_RTC1->EVTENCLR = RTC_EVTEN_OVRFLW_Msk; - } - if (NRF_RTC1->EVENTS_COMPARE[0]) { - NRF_RTC1->EVENTS_COMPARE[0] = 0; - NRF_RTC1->EVTENCLR = RTC_EVTEN_COMPARE0_Msk; - if (us_ticker_callbackPending && ((int)(us_ticker_callbackTimestamp - rtc1_getCounter()) <= 0)) - invokeCallback(); - } -} - -void us_ticker_init(void) -{ - if (us_ticker_inited) { - return; - } - - rtc1_start(); - us_ticker_inited = true; -} - -uint32_t us_ticker_read() -{ - if (!us_ticker_inited) { - us_ticker_init(); - } - - /* Return a pseudo microsecond counter value. This is only as precise as the - * 32khz low-freq clock source, but could be adequate.*/ - return RTC_UNITS_TO_MICROSECONDS(rtc1_getCounter64()); -} - -/** - * Setup the us_ticker callback interrupt to go at the given timestamp. - * - * @Note: Only one callback is pending at any time. - * - * @Note: If a callback is pending, and this function is called again, the new - * callback-time overrides the existing callback setting. It is the caller's - * responsibility to ensure that this function is called to setup a callback for - * the earliest timeout. - * - * @Note: If this function is used to setup an interrupt which is immediately - * pending--such as for 'now' or a time in the past,--then the callback is - * invoked a few ticks later. - */ -void us_ticker_set_interrupt(timestamp_t timestamp) -{ - if (!us_ticker_inited) { - us_ticker_init(); - } - - /* - * The argument to this function is a 32-bit microsecond timestamp for when - * a callback should be invoked. On the nRF51, we use an RTC timer running - * at 32kHz to implement a low-power us-ticker. This results in a problem - * based on the fact that 1000000 is not a multiple of 32768. - * - * Going from a micro-second based timestamp to a 32kHz based RTC-time is a - * linear mapping; but this mapping doesn't preserve wraparounds--i.e. when - * the 32-bit micro-second timestamp wraps around unfortunately the - * underlying RTC counter doesn't. The result is that timestamp expiry - * checks on micro-second timestamps don't yield the same result when - * applied on the corresponding RTC timestamp values. - * - * One solution is to translate the incoming 32-bit timestamp into a virtual - * 64-bit timestamp based on the knowledge of system-uptime, and then use - * this wraparound-free 64-bit value to do a linear mapping to RTC time. - * System uptime on an nRF is maintained using the 24-bit RTC counter. We - * track the overflow count to extend the 24-bit hardware counter by an - * additional 32 bits. RTC_UNITS_TO_MICROSECONDS() converts this into - * microsecond units (in 64-bits). - */ - const uint64_t currentTime64 = RTC_UNITS_TO_MICROSECONDS(rtc1_getCounter64()); - uint64_t timestamp64 = (currentTime64 & ~(uint64_t)0xFFFFFFFFULL) + timestamp; - if (((uint32_t)currentTime64 > 0x80000000) && (timestamp < 0x80000000)) { - timestamp64 += (uint64_t)0x100000000ULL; - } - uint32_t newCallbackTime = MICROSECONDS_TO_RTC_UNITS(timestamp64); - - /* Check for repeat setup of an existing callback. This is actually not - * important; the following code should work even without this check. */ - if (us_ticker_callbackPending && (newCallbackTime == us_ticker_callbackTimestamp)) { - return; - } - - /* Check for callbacks which are immediately (or will *very* shortly become) pending. - * Even if they are immediately pending, they are scheduled to trigger a few - * ticks later. This keeps things simple by invoking the callback from an - * independent interrupt context. */ - if ((int)(newCallbackTime - rtc1_getCounter()) <= (int)FUZZY_RTC_TICKS) { - newCallbackTime = rtc1_getCounter() + FUZZY_RTC_TICKS; - } - - NRF_RTC1->CC[0] = newCallbackTime & MAX_RTC_COUNTER_VAL; - us_ticker_callbackTimestamp = newCallbackTime; - if (!us_ticker_callbackPending) { - us_ticker_callbackPending = true; - rtc1_enableCompareInterrupt(); - } -} - -void us_ticker_disable_interrupt(void) -{ - if (us_ticker_callbackPending) { - rtc1_disableCompareInterrupt(); - us_ticker_callbackPending = false; - } -} - -void us_ticker_clear_interrupt(void) -{ - NRF_RTC1->EVENTS_OVRFLW = 0; - NRF_RTC1->EVENTS_COMPARE[0] = 0; -} - - -#if defined (__CC_ARM) /* ARMCC Compiler */ - -__asm void RTC1_IRQHandler(void) -{ - IMPORT OS_Tick_Handler - IMPORT us_ticker_handler - - /** - * Chanel 1 of RTC1 is used by RTX as a systick. - * If the compare event on channel 1 is set, then branch to OS_Tick_Handler. - * Otherwise, just execute us_ticker_handler. - * This function has to be written in assembly and tagged as naked because OS_Tick_Handler - * will never return. - * A c function would put lr on the stack before calling OS_Tick_Handler and this value - * would never been dequeued. - * - * \code - * void RTC1_IRQHandler(void) { - if(NRF_RTC1->EVENTS_COMPARE[1]) { - // never return... - OS_Tick_Handler(); - } else { - us_ticker_handler(); - } - } - * \endcode - */ - ldr r0,=0x40011144 - ldr r1, [r0, #0] - cmp r1, #0 - beq US_TICKER_HANDLER - bl OS_Tick_Handler -US_TICKER_HANDLER - push {r3, lr} - bl us_ticker_handler - pop {r3, pc} - nop /* padding */ -} - -#elif defined (__GNUC__) /* GNU Compiler */ - -__attribute__((naked)) void RTC1_IRQHandler(void) -{ - /** - * Chanel 1 of RTC1 is used by RTX as a systick. - * If the compare event on channel 1 is set, then branch to OS_Tick_Handler. - * Otherwise, just execute us_ticker_handler. - * This function has to be written in assembly and tagged as naked because OS_Tick_Handler - * will never return. - * A c function would put lr on the stack before calling OS_Tick_Handler and this value - * would never been dequeued. - * - * \code - * void RTC1_IRQHandler(void) { - if(NRF_RTC1->EVENTS_COMPARE[1]) { - // never return... - OS_Tick_Handler(); - } else { - us_ticker_handler(); - } - } - * \endcode - */ - __asm__ ( - "ldr r0,=0x40011144\n" - "ldr r1, [r0, #0]\n" - "cmp r1, #0\n" - "beq US_TICKER_HANDLER\n" - "bl OS_Tick_Handler\n" - "US_TICKER_HANDLER:\n" - "push {r3, lr}\n" - "bl us_ticker_handler\n" - "pop {r3, pc}\n" - "nop" - ); -} - -#else - -#error Compiler not supported. -#error Provide a definition of RTC1_IRQHandler. - -/* - * Chanel 1 of RTC1 is used by RTX as a systick. - * If the compare event on channel 1 is set, then branch to OS_Tick_Handler. - * Otherwise, just execute us_ticker_handler. - * This function has to be written in assembly and tagged as naked because OS_Tick_Handler - * will never return. - * A c function would put lr on the stack before calling OS_Tick_Handler and this value - * will never been dequeued. After a certain time a stack overflow will happen. - * - * \code - * void RTC1_IRQHandler(void) { - if(NRF_RTC1->EVENTS_COMPARE[1]) { - // never return... - OS_Tick_Handler(); - } else { - us_ticker_handler(); - } - } - * \endcode - */ - -#endif - -/** - * Return the next number of clock cycle needed for the next tick. - * @note This function has been carrefuly optimized for a systick occuring every 1000us. - */ -static uint32_t get_next_tick_cc_delta() { - uint32_t delta = 0; - - if (os_clockrate != 1000) { - // In RTX, by default SYSTICK is is used. - // A tick event is generated every os_trv + 1 clock cycles of the system timer. - delta = os_trv + 1; - } else { - // If the clockrate is set to 1000us then 1000 tick should happen every second. - // Unfortunatelly, when clockrate is set to 1000, os_trv is equal to 31. - // If (os_trv + 1) is used as the delta value between two ticks, 1000 ticks will be - // generated in 32000 clock cycle instead of 32768 clock cycles. - // As a result, if a user schedule an OS timer to start in 100s, the timer will start - // instead after 97.656s - // The code below fix this issue, a clock rate of 1000s will generate 1000 ticks in 32768 - // clock cycles. - // The strategy is simple, for 1000 ticks: - // * 768 ticks will occur 33 clock cycles after the previous tick - // * 232 ticks will occur 32 clock cycles after the previous tick - // By default every delta is equal to 33. - // Every five ticks (20%, 200 delta in one second), the delta is equal to 32 - // The remaining (32) deltas equal to 32 are distributed using primes numbers. - static uint32_t counter = 0; - if ((counter % 5) == 0 || (counter % 31) == 0 || (counter % 139) == 0 || (counter == 503)) { - delta = 32; - } else { - delta = 33; - } - ++counter; - if (counter == 1000) { - counter = 0; - } - } - return delta; -} - -static inline void clear_tick_interrupt() { - NRF_RTC1->EVENTS_COMPARE[1] = 0; - NRF_RTC1->EVTENCLR = (1 << 17); -} - -/** - * Indicate if a value is included in a range which can be wrapped. - * @param begin start of the range - * @param end end of the range - * @param val value to check - * @return true if the value is included in the range and false otherwise. - */ -static inline bool is_in_wrapped_range(uint32_t begin, uint32_t end, uint32_t val) { - // regular case, begin < end - // return true if begin <= val < end - if (begin < end) { - if (begin <= val && val < end) { - return true; - } else { - return false; - } - } else { - // In this case end < begin because it has wrap around the limits - // return false if end < val < begin - if (end < val && val < begin) { - return false; - } else { - return true; - } - } - -} - -/** - * Register the next tick. - */ -static void register_next_tick() { - previous_tick_cc_value = NRF_RTC1->CC[1]; - uint32_t delta = get_next_tick_cc_delta(); - uint32_t new_compare_value = (previous_tick_cc_value + delta) & MAX_RTC_COUNTER_VAL; - - // Disable irq directly for few cycles, - // Validation of the new CC value against the COUNTER, - // Setting the new CC value and enabling CC IRQ should be an atomic operation - // Otherwise, there is a possibility to set an invalid CC value because - // the RTC1 keeps running. - // This code is very short 20-38 cycles in the worst case, it shouldn't - // disturb softdevice. - __disable_irq(); - uint32_t current_counter = NRF_RTC1->COUNTER; - - // If an overflow occur, set the next tick in COUNTER + delta clock cycles - if (is_in_wrapped_range(previous_tick_cc_value, new_compare_value, current_counter) == false) { - new_compare_value = current_counter + delta; - } - NRF_RTC1->CC[1] = new_compare_value; - - // set the interrupt of CC channel 1 and reenable IRQs - NRF_RTC1->INTENSET = RTC_INTENSET_COMPARE1_Msk; - __enable_irq(); -} - -/** - * Initialize alternative hardware timer as RTX kernel timer - * This function is directly called by RTX. - * @note this function shouldn't be called directly. - * @return IRQ number of the alternative hardware timer - */ -int os_tick_init (void) -{ - NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos); - NRF_CLOCK->EVENTS_LFCLKSTARTED = 0; - NRF_CLOCK->TASKS_LFCLKSTART = 1; - - while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0) { - // wait for the low frequency clock start - } - - NRF_RTC1->PRESCALER = 0; /* for no pre-scaling. */ - - NVIC_SetPriority(RTC1_IRQn, RTC1_IRQ_PRI); - NVIC_ClearPendingIRQ(RTC1_IRQn); - NVIC_EnableIRQ(RTC1_IRQn); - - NRF_RTC1->TASKS_START = 1; - nrf_delay_us(MAX_RTC_TASKS_DELAY); - - NRF_RTC1->CC[1] = 0; - clear_tick_interrupt(); - register_next_tick(); - - os_tick_started = true; - - return RTC1_IRQn; -} - -/** - * Acknowledge the tick interrupt. - * This function is called by the function OS_Tick_Handler of RTX. - * @note this function shouldn't be called directly. - */ -void os_tick_irqack(void) -{ - clear_tick_interrupt(); - register_next_tick(); -} - -/** - * Returns the overflow flag of the alternative hardware timer. - * @note This function is exposed by RTX kernel. - * @return 1 if the timer has overflowed and 0 otherwise. - */ -uint32_t os_tick_ovf(void) { - uint32_t current_counter = NRF_RTC1->COUNTER; - uint32_t next_tick_cc_value = NRF_RTC1->CC[1]; - - return is_in_wrapped_range(previous_tick_cc_value, next_tick_cc_value, current_counter) ? 0 : 1; -} - -/** - * Return the value of the alternative hardware timer. - * @note The documentation is not very clear about what is expected as a result, - * is it an ascending counter, a descending one ? - * None of this is specified. - * The default systick is a descending counter and this function return values in - * descending order, even if the internal counter used is an ascending one. - * @return the value of the alternative hardware timer. - */ -uint32_t os_tick_val(void) { - uint32_t current_counter = NRF_RTC1->COUNTER; - uint32_t next_tick_cc_value = NRF_RTC1->CC[1]; - - // do not use os_tick_ovf because its counter value can be different - if(is_in_wrapped_range(previous_tick_cc_value, next_tick_cc_value, current_counter)) { - if (next_tick_cc_value > previous_tick_cc_value) { - return next_tick_cc_value - current_counter; - } else if(current_counter <= next_tick_cc_value) { - return next_tick_cc_value - current_counter; - } else { - return next_tick_cc_value + (MAX_RTC_COUNTER_VAL - current_counter); - } - } else { - // use (os_trv + 1) has the base step, can be totally inacurate ... - uint32_t clock_cycles_by_tick = os_trv + 1; - - // if current counter has wrap arround, add the limit to it. - if (current_counter < next_tick_cc_value) { - current_counter = current_counter + MAX_RTC_COUNTER_VAL; - } - - return clock_cycles_by_tick - ((current_counter - next_tick_cc_value) % clock_cycles_by_tick); - } - - return 0; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/analogin_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/analogin_api.c index c97ed15857..af4929d8ed 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/analogin_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/analogin_api.c @@ -18,6 +18,8 @@ #include "cmsis.h" #include "pinmap.h" +#ifdef DEVICE_ANALOGIN + #define ANALOGIN_MEDIAN_FILTER 1 #define ADC_10BIT_RANGE 0x3FF #define ADC_RANGE ADC_10BIT_RANGE @@ -80,3 +82,5 @@ float analogin_read(analogin_t *obj) uint16_t value = analogin_read_u16(obj); return (float)value * (1.0f / (float)ADC_RANGE); } + +#endif // DEVICE_ANALOGIN diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/gpio_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/gpio_api.c deleted file mode 100644 index eb077c9f10..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/gpio_api.c +++ /dev/null @@ -1,58 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "mbed_assert.h" -#include "gpio_api.h" -#include "pinmap.h" - -void gpio_init(gpio_t *obj, PinName pin) -{ - obj->pin = pin; - if (pin == (PinName)NC) { - return; - } - - obj->mask = (1ul << pin); - - obj->reg_set = &NRF_GPIO->OUTSET; - obj->reg_clr = &NRF_GPIO->OUTCLR; - obj->reg_in = &NRF_GPIO->IN; - obj->reg_dir = &NRF_GPIO->DIR; -} - -void gpio_mode(gpio_t *obj, PinMode mode) -{ - pin_mode(obj->pin, mode); -} - -void gpio_dir(gpio_t *obj, PinDirection direction) -{ - MBED_ASSERT(obj->pin != (PinName)NC); - switch (direction) { - case PIN_INPUT: - NRF_GPIO->PIN_CNF[obj->pin] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos); - break; - case PIN_OUTPUT: - NRF_GPIO->PIN_CNF[obj->pin] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); - break; - } -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/gpio_irq_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/gpio_irq_api.c deleted file mode 100644 index 9d2fcad2c4..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/gpio_irq_api.c +++ /dev/null @@ -1,127 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include -#include "cmsis.h" - -#include "gpio_irq_api.h" -#include "mbed_error.h" - -#define CHANNEL_NUM 31 - -static uint32_t channel_ids[CHANNEL_NUM] = {0}; //each pin will be given an id, if id is 0 the pin can be ignored. -static uint8_t channel_enabled[CHANNEL_NUM] = {0}; -static uint32_t portRISE = 0; -static uint32_t portFALL = 0; -static gpio_irq_handler irq_handler; - -#ifdef __cplusplus -extern "C" { -#endif -void GPIOTE_IRQHandler(void) -{ - volatile uint32_t newVal = NRF_GPIO->IN; - - if ((NRF_GPIOTE->EVENTS_PORT != 0) && ((NRF_GPIOTE->INTENSET & GPIOTE_INTENSET_PORT_Msk) != 0)) { - NRF_GPIOTE->EVENTS_PORT = 0; - - for (uint8_t i = 0; i<31; i++) { - if (channel_ids[i]>0) { - if (channel_enabled[i]) { - if( ((newVal>>i)&1) && ( ( (NRF_GPIO->PIN_CNF[i] >>GPIO_PIN_CNF_SENSE_Pos) & GPIO_PIN_CNF_SENSE_Low) != GPIO_PIN_CNF_SENSE_Low) && ( (portRISE>>i)&1) ){ - irq_handler(channel_ids[i], IRQ_RISE); - } else if ((((newVal >> i) & 1) == 0) && - (((NRF_GPIO->PIN_CNF[i] >> GPIO_PIN_CNF_SENSE_Pos) & GPIO_PIN_CNF_SENSE_Low) == GPIO_PIN_CNF_SENSE_Low) && - ((portFALL >> i) & 1)) { - irq_handler(channel_ids[i], IRQ_FALL); - } - } - - if (NRF_GPIO->PIN_CNF[i] & GPIO_PIN_CNF_SENSE_Msk) { - NRF_GPIO->PIN_CNF[i] &= ~(GPIO_PIN_CNF_SENSE_Msk); - - if (newVal >> i & 1) { - NRF_GPIO->PIN_CNF[i] |= (GPIO_PIN_CNF_SENSE_Low << GPIO_PIN_CNF_SENSE_Pos); - } else { - NRF_GPIO->PIN_CNF[i] |= (GPIO_PIN_CNF_SENSE_High << GPIO_PIN_CNF_SENSE_Pos); - } - } - } - } - } -} - -#ifdef __cplusplus -} -#endif - -int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32_t id) -{ - if (pin == NC) { - return -1; - } - - irq_handler = handler; - obj->ch = pin; - NRF_GPIOTE->EVENTS_PORT = 0; - channel_ids[pin] = id; - channel_enabled[pin] = 1; - NRF_GPIOTE->INTENSET = GPIOTE_INTENSET_PORT_Set << GPIOTE_INTENSET_PORT_Pos; - - NVIC_SetPriority(GPIOTE_IRQn, 3); - NVIC_EnableIRQ (GPIOTE_IRQn); - return 0; -} - -void gpio_irq_free(gpio_irq_t *obj) -{ - channel_ids[obj->ch] = 0; -} - -void gpio_irq_set(gpio_irq_t *obj, gpio_irq_event event, uint32_t enable) -{ - NRF_GPIO->PIN_CNF[obj->ch] &= ~(GPIO_PIN_CNF_SENSE_Msk); - if (enable) { - if (event == IRQ_RISE) { - portRISE |= (1 << obj->ch); - } else if (event == IRQ_FALL) { - portFALL |= (1 << obj->ch); - } - } else { - if (event == IRQ_RISE) { - portRISE &= ~(1 << obj->ch); - } else if (event == IRQ_FALL) { - portFALL &= ~(1 << obj->ch); - } - } - - if (((portRISE >> obj->ch) & 1) || ((portFALL >> obj->ch) & 1)) { - if ((NRF_GPIO->IN >> obj->ch) & 1) { - NRF_GPIO->PIN_CNF[obj->ch] |= (GPIO_PIN_CNF_SENSE_Low << GPIO_PIN_CNF_SENSE_Pos); // | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos); - } else { - NRF_GPIO->PIN_CNF[obj->ch] |= (GPIO_PIN_CNF_SENSE_High << GPIO_PIN_CNF_SENSE_Pos); //| (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos); - } - } -} - -void gpio_irq_enable(gpio_irq_t *obj) -{ - channel_enabled[obj->ch] = 1; -} - -void gpio_irq_disable(gpio_irq_t *obj) -{ - channel_enabled[obj->ch] = 0; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/i2c_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/i2c_api.c deleted file mode 100644 index 17989f3d0a..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/i2c_api.c +++ /dev/null @@ -1,311 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "mbed_assert.h" -#include "mbed_error.h" -#include "i2c_api.h" -#include "cmsis.h" -#include "pinmap.h" - -// nRF51822's I2C_0 and SPI_0 (I2C_1, SPI_1 and SPIS1) share the same address. -// They can't be used at the same time. So we use two global variable to track the usage. -// See nRF51822 address information at nRF51822_PS v2.0.pdf - Table 15 Peripheral instance reference -volatile i2c_spi_peripheral_t i2c0_spi0_peripheral = {0, 0, 0, 0}; -volatile i2c_spi_peripheral_t i2c1_spi1_peripheral = {0, 0, 0, 0}; - -void i2c_interface_enable(i2c_t *obj) -{ - obj->i2c->ENABLE = (TWI_ENABLE_ENABLE_Enabled << TWI_ENABLE_ENABLE_Pos); -} - -void twi_master_init(i2c_t *obj, PinName sda, PinName scl, int frequency) -{ - NRF_GPIO->PIN_CNF[scl] = ((GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos) | - (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) | - (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) | - (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) | - (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos)); - - NRF_GPIO->PIN_CNF[sda] = ((GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos) | - (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) | - (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) | - (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) | - (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos)); - - obj->i2c->PSELSCL = scl; - obj->i2c->PSELSDA = sda; - // set default frequency at 100k - i2c_frequency(obj, frequency); - i2c_interface_enable(obj); -} - -void i2c_init(i2c_t *obj, PinName sda, PinName scl) -{ - // Initialize variable to avoid compiler warnings - NRF_TWI_Type *i2c = (NRF_TWI_Type *)I2C_0; - - if (i2c0_spi0_peripheral.usage == I2C_SPI_PERIPHERAL_FOR_I2C && - i2c0_spi0_peripheral.sda_mosi == (uint8_t)sda && - i2c0_spi0_peripheral.scl_miso == (uint8_t)scl) { - // The I2C with the same pins is already initialized - i2c = (NRF_TWI_Type *)I2C_0; - obj->peripheral = 0x1; - } else if (i2c1_spi1_peripheral.usage == I2C_SPI_PERIPHERAL_FOR_I2C && - i2c1_spi1_peripheral.sda_mosi == (uint8_t)sda && - i2c1_spi1_peripheral.scl_miso == (uint8_t)scl) { - // The I2C with the same pins is already initialized - i2c = (NRF_TWI_Type *)I2C_1; - obj->peripheral = 0x2; - } else if (i2c0_spi0_peripheral.usage == 0) { - i2c0_spi0_peripheral.usage = I2C_SPI_PERIPHERAL_FOR_I2C; - i2c0_spi0_peripheral.sda_mosi = (uint8_t)sda; - i2c0_spi0_peripheral.scl_miso = (uint8_t)scl; - - i2c = (NRF_TWI_Type *)I2C_0; - obj->peripheral = 0x1; - } else if (i2c1_spi1_peripheral.usage == 0) { - i2c1_spi1_peripheral.usage = I2C_SPI_PERIPHERAL_FOR_I2C; - i2c1_spi1_peripheral.sda_mosi = (uint8_t)sda; - i2c1_spi1_peripheral.scl_miso = (uint8_t)scl; - - i2c = (NRF_TWI_Type *)I2C_1; - obj->peripheral = 0x2; - } else { - // No available peripheral - error("No available I2C"); - } - - obj->i2c = i2c; - obj->scl = scl; - obj->sda = sda; - obj->i2c->EVENTS_ERROR = 0; - obj->i2c->ENABLE = TWI_ENABLE_ENABLE_Disabled << TWI_ENABLE_ENABLE_Pos; -// TODO: usage on nrf52 ? -// obj->i2c->POWER = 0; - - for (int i = 0; i<100; i++) { - } - -// TODO: usage on nrf52 ? -// obj->i2c->POWER = 1; - twi_master_init(obj, sda, scl, 100000); -} - -void i2c_reset(i2c_t *obj) -{ - obj->i2c->EVENTS_ERROR = 0; - obj->i2c->ENABLE = TWI_ENABLE_ENABLE_Disabled << TWI_ENABLE_ENABLE_Pos; -// TODO: usage on nrf52 ? -// obj->i2c->POWER = 0; - for (int i = 0; i<100; i++) { - } - -// TODO: usage on nrf52 ? -// obj->i2c->POWER = 1; - twi_master_init(obj, obj->sda, obj->scl, obj->freq); -} - -int i2c_start(i2c_t *obj) -{ - int status = 0; - i2c_reset(obj); - obj->address_set = 0; - return status; -} - -int i2c_stop(i2c_t *obj) -{ - int timeOut = 100000; - obj->i2c->EVENTS_STOPPED = 0; - // write the stop bit - obj->i2c->TASKS_STOP = 1; - while (!obj->i2c->EVENTS_STOPPED) { - timeOut--; - if (timeOut<0) { - return 1; - } - } - obj->address_set = 0; - i2c_reset(obj); - return 0; -} - -int i2c_do_write(i2c_t *obj, int value) -{ - int timeOut = 100000; - obj->i2c->TXD = value; - while (!obj->i2c->EVENTS_TXDSENT) { - timeOut--; - if (timeOut<0) { - return 1; - } - } - obj->i2c->EVENTS_TXDSENT = 0; - return 0; -} - -int i2c_do_read(i2c_t *obj, char *data, int last) -{ - int timeOut = 100000; - - if (last) { - // To trigger stop task when a byte is received, - // must be set before resume task. - obj->i2c->SHORTS = 2; - } - - obj->i2c->TASKS_RESUME = 1; - - while (!obj->i2c->EVENTS_RXDREADY) { - timeOut--; - if (timeOut<0) { - return 1; - } - } - obj->i2c->EVENTS_RXDREADY = 0; - *data = obj->i2c->RXD; - - return 0; -} - -void i2c_frequency(i2c_t *obj, int hz) -{ - if (hz<250000) { - obj->freq = 100000; - obj->i2c->FREQUENCY = (TWI_FREQUENCY_FREQUENCY_K100 << TWI_FREQUENCY_FREQUENCY_Pos); - } else if (hz<400000) { - obj->freq = 250000; - obj->i2c->FREQUENCY = (TWI_FREQUENCY_FREQUENCY_K250 << TWI_FREQUENCY_FREQUENCY_Pos); - } else { - obj->freq = 400000; - obj->i2c->FREQUENCY = (TWI_FREQUENCY_FREQUENCY_K400 << TWI_FREQUENCY_FREQUENCY_Pos); - } -} - -int checkError(i2c_t *obj) -{ - if (obj->i2c->EVENTS_ERROR == 1) { - if (obj->i2c->ERRORSRC & TWI_ERRORSRC_ANACK_Msk) { - obj->i2c->EVENTS_ERROR = 0; - obj->i2c->TASKS_STOP = 1; - return I2C_ERROR_BUS_BUSY; - } - - obj->i2c->EVENTS_ERROR = 0; - obj->i2c->TASKS_STOP = 1; - return I2C_ERROR_NO_SLAVE; - } - return 0; -} - -int i2c_read(i2c_t *obj, int address, char *data, int length, int stop) -{ - int status, count, errorResult; - obj->i2c->ADDRESS = (address >> 1); - obj->i2c->SHORTS = 1; // to trigger suspend task when a byte is received - obj->i2c->EVENTS_RXDREADY = 0; - obj->i2c->TASKS_STARTRX = 1; - - // Read in all except last byte - for (count = 0; count < (length - 1); count++) { - status = i2c_do_read(obj, &data[count], 0); - if (status) { - errorResult = checkError(obj); - i2c_reset(obj); - if (errorResult<0) { - return errorResult; - } - return count; - } - } - - // read in last byte - status = i2c_do_read(obj, &data[length - 1], 1); - if (status) { - i2c_reset(obj); - return length - 1; - } - // If not repeated start, send stop. - if (stop) { - while (!obj->i2c->EVENTS_STOPPED) { - } - obj->i2c->EVENTS_STOPPED = 0; - } - return length; -} - -int i2c_write(i2c_t *obj, int address, const char *data, int length, int stop) -{ - int status, errorResult; - obj->i2c->ADDRESS = (address >> 1); - obj->i2c->SHORTS = 0; - obj->i2c->TASKS_STARTTX = 1; - - for (int i = 0; iaddress_set) { - obj->address_set = 1; - obj->i2c->ADDRESS = (data >> 1); - - if (data & 1) { - obj->i2c->EVENTS_RXDREADY = 0; - obj->i2c->SHORTS = 1; - obj->i2c->TASKS_STARTRX = 1; - } else { - obj->i2c->SHORTS = 0; - obj->i2c->TASKS_STARTTX = 1; - } - } else { - status = i2c_do_write(obj, data); - if (status) { - i2c_reset(obj); - } - } - return (1 - status); -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c index 6d5883f141..cf28491102 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c @@ -19,331 +19,51 @@ #include "cmsis.h" #include "pinmap.h" -#define NO_PWMS 3 -#define TIMER_PRECISION 4 //4us ticks -#define TIMER_PRESCALER 6 //4us ticks = 16Mhz/(2**6) -static const PinMap PinMap_PWM[] = { - {p0, PWM_1, 1}, - {p1, PWM_1, 1}, - {p2, PWM_1, 1}, - {p3, PWM_1, 1}, - {p4, PWM_1, 1}, - {p5, PWM_1, 1}, - {p6, PWM_1, 1}, - {p7, PWM_1, 1}, - {p8, PWM_1, 1}, - {p9, PWM_1, 1}, - {p10, PWM_1, 1}, - {p11, PWM_1, 1}, - {p12, PWM_1, 1}, - {p13, PWM_1, 1}, - {p14, PWM_1, 1}, - {p15, PWM_1, 1}, - {p16, PWM_1, 1}, - {p17, PWM_1, 1}, - {p18, PWM_1, 1}, - {p19, PWM_1, 1}, - {p20, PWM_1, 1}, - {p21, PWM_1, 1}, - {p22, PWM_1, 1}, - {p23, PWM_1, 1}, - {p24, PWM_1, 1}, - {p25, PWM_1, 1}, - {p28, PWM_1, 1}, - {p29, PWM_1, 1}, - {p30, PWM_1, 1}, - {NC, NC, 0} -}; +#if DEVICE_PWMOUT -static NRF_TIMER_Type *Timers[1] = { - NRF_TIMER2 -}; +// TODO - provide an implementation. -uint16_t PERIOD = 20000 / TIMER_PRECISION; //20ms -uint8_t PWM_taken[NO_PWMS] = {0, 0, 0}; -uint16_t PULSE_WIDTH[NO_PWMS] = {1, 1, 1}; //set to 1 instead of 0 -uint16_t ACTUAL_PULSE[NO_PWMS] = {0, 0, 0}; - - -/** @brief Function for handling timer 2 peripheral interrupts. - */ -#ifdef __cplusplus -extern "C" { -#endif -void TIMER2_IRQHandler(void) -{ - NRF_TIMER2->EVENTS_COMPARE[3] = 0; - NRF_TIMER2->CC[3] = PERIOD; - - if (PWM_taken[0]) { - NRF_TIMER2->CC[0] = PULSE_WIDTH[0]; - } - if (PWM_taken[1]) { - NRF_TIMER2->CC[1] = PULSE_WIDTH[1]; - } - if (PWM_taken[2]) { - NRF_TIMER2->CC[2] = PULSE_WIDTH[2]; - } - - NRF_TIMER2->TASKS_START = 1; -} - -#ifdef __cplusplus -} -#endif -/** @brief Function for initializing the Timer peripherals. - */ -void timer_init(uint8_t pwmChoice) -{ - NRF_TIMER_Type *timer = Timers[0]; - timer->TASKS_STOP = 0; - - if (pwmChoice == 0) { -// TODO: understand this for nrf52 -// timer->POWER = 0; -// timer->POWER = 1; - timer->MODE = TIMER_MODE_MODE_Timer; - timer->BITMODE = TIMER_BITMODE_BITMODE_16Bit << TIMER_BITMODE_BITMODE_Pos; - timer->PRESCALER = TIMER_PRESCALER; - timer->CC[3] = PERIOD; - } - - timer->CC[pwmChoice] = PULSE_WIDTH[pwmChoice]; - - //high priority application interrupt - NVIC_SetPriority(TIMER2_IRQn, 1); - NVIC_EnableIRQ(TIMER2_IRQn); - - timer->TASKS_START = 0x01; -} - -/** @brief Function for initializing the GPIO Tasks/Events peripheral. - */ -void gpiote_init(PinName pin, uint8_t channel_number) -{ - // Connect GPIO input buffers and configure PWM_OUTPUT_PIN_NUMBER as an output. - NRF_GPIO->PIN_CNF[pin] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); - NRF_GPIO->OUTCLR = (1UL << pin); - // Configure GPIOTE channel 0 to toggle the PWM pin state - // @note Only one GPIOTE task can be connected to an output pin. - /* Configure channel to Pin31, not connected to the pin, and configure as a tasks that will set it to proper level */ - NRF_GPIOTE->CONFIG[channel_number] = (GPIOTE_CONFIG_MODE_Task << GPIOTE_CONFIG_MODE_Pos) | - (31UL << GPIOTE_CONFIG_PSEL_Pos) | - (GPIOTE_CONFIG_POLARITY_HiToLo << GPIOTE_CONFIG_POLARITY_Pos); - /* Three NOPs are required to make sure configuration is written before setting tasks or getting events */ - __NOP(); - __NOP(); - __NOP(); - /* Launch the task to take the GPIOTE channel output to the desired level */ - NRF_GPIOTE->TASKS_OUT[channel_number] = 1; - - /* Finally configure the channel as the caller expects. If OUTINIT works, the channel is configured properly. - If it does not, the channel output inheritance sets the proper level. */ - NRF_GPIOTE->CONFIG[channel_number] = (GPIOTE_CONFIG_MODE_Task << GPIOTE_CONFIG_MODE_Pos) | - ((uint32_t)pin << GPIOTE_CONFIG_PSEL_Pos) | - ((uint32_t)GPIOTE_CONFIG_POLARITY_Toggle << GPIOTE_CONFIG_POLARITY_Pos) | - ((uint32_t)GPIOTE_CONFIG_OUTINIT_Low << GPIOTE_CONFIG_OUTINIT_Pos); // ((uint32_t)GPIOTE_CONFIG_OUTINIT_High << - // GPIOTE_CONFIG_OUTINIT_Pos);// - - /* Three NOPs are required to make sure configuration is written before setting tasks or getting events */ - __NOP(); - __NOP(); - __NOP(); -} - -/** @brief Function for initializing the Programmable Peripheral Interconnect peripheral. - */ -static void ppi_init(uint8_t pwm) -{ - //using ppi channels 0-7 (only 0-7 are available) - uint8_t channel_number = 2 * pwm; - NRF_TIMER_Type *timer = Timers[0]; - - // Configure PPI channel 0 to toggle ADVERTISING_LED_PIN_NO on every TIMER1 COMPARE[0] match - NRF_PPI->CH[channel_number].TEP = (uint32_t)&NRF_GPIOTE->TASKS_OUT[pwm]; - NRF_PPI->CH[channel_number + 1].TEP = (uint32_t)&NRF_GPIOTE->TASKS_OUT[pwm]; - NRF_PPI->CH[channel_number].EEP = (uint32_t)&timer->EVENTS_COMPARE[pwm]; - NRF_PPI->CH[channel_number + 1].EEP = (uint32_t)&timer->EVENTS_COMPARE[3]; - - // Enable PPI channels. - NRF_PPI->CHEN |= (1 << channel_number) | - (1 << (channel_number + 1)); -} - -void setModulation(pwmout_t *obj, uint8_t toggle, uint8_t high) -{ - if (high) { - NRF_GPIOTE->CONFIG[obj->pwm] |= ((uint32_t)GPIOTE_CONFIG_OUTINIT_High << GPIOTE_CONFIG_OUTINIT_Pos); - if (toggle) { - NRF_GPIOTE->CONFIG[obj->pwm] |= (GPIOTE_CONFIG_MODE_Task << GPIOTE_CONFIG_MODE_Pos) | - ((uint32_t)GPIOTE_CONFIG_POLARITY_Toggle << GPIOTE_CONFIG_POLARITY_Pos); - } else { - NRF_GPIOTE->CONFIG[obj->pwm] &= ~((uint32_t)GPIOTE_CONFIG_POLARITY_Toggle << GPIOTE_CONFIG_POLARITY_Pos); - NRF_GPIOTE->CONFIG[obj->pwm] |= ((uint32_t)GPIOTE_CONFIG_POLARITY_LoToHi << GPIOTE_CONFIG_POLARITY_Pos); - } - } else { - NRF_GPIOTE->CONFIG[obj->pwm] &= ~((uint32_t)GPIOTE_CONFIG_OUTINIT_High << GPIOTE_CONFIG_OUTINIT_Pos); - - if (toggle) { - NRF_GPIOTE->CONFIG[obj->pwm] |= (GPIOTE_CONFIG_MODE_Task << GPIOTE_CONFIG_MODE_Pos) | - ((uint32_t)GPIOTE_CONFIG_POLARITY_Toggle << GPIOTE_CONFIG_POLARITY_Pos); - } else { - NRF_GPIOTE->CONFIG[obj->pwm] &= ~((uint32_t)GPIOTE_CONFIG_POLARITY_Toggle << GPIOTE_CONFIG_POLARITY_Pos); - NRF_GPIOTE->CONFIG[obj->pwm] |= ((uint32_t)GPIOTE_CONFIG_POLARITY_HiToLo << GPIOTE_CONFIG_POLARITY_Pos); - } - } -} +//#include "nrf_pwm.h" void pwmout_init(pwmout_t *obj, PinName pin) { - // determine the channel - uint8_t pwmOutSuccess = 0; - PWMName pwm = (PWMName)pinmap_peripheral(pin, PinMap_PWM); - - MBED_ASSERT(pwm != (PWMName)NC); - - if (PWM_taken[(uint8_t)pwm]) { - for (uint8_t i = 1; !pwmOutSuccess && (ipwm = pwm; - obj->pin = pin; - - gpiote_init(pin, (uint8_t)pwm); - ppi_init((uint8_t)pwm); - - if (pwm == 0) { - NRF_POWER->TASKS_CONSTLAT = 1; - } - - timer_init((uint8_t)pwm); - - //default to 20ms: standard for servos, and fine for e.g. brightness control - pwmout_period_ms(obj, 20); - pwmout_write (obj, 0); } void pwmout_free(pwmout_t *obj) { - MBED_ASSERT(obj->pwm != (PWMName)NC); - PWM_taken[obj->pwm] = 0; - pwmout_write(obj, 0); } -void pwmout_write(pwmout_t *obj, float value) +void pwmout_write(pwmout_t *obj, float percent) { - uint16_t oldPulseWidth; - - NRF_TIMER2->EVENTS_COMPARE[3] = 0; - NRF_TIMER2->TASKS_STOP = 1; - - if (value < 0.0f) { - value = 0.0; - } else if (value > 1.0f) { - value = 1.0; - } - - oldPulseWidth = ACTUAL_PULSE[obj->pwm]; - ACTUAL_PULSE[obj->pwm] = PULSE_WIDTH[obj->pwm] = value * PERIOD; - - if (PULSE_WIDTH[obj->pwm] == 0) { - PULSE_WIDTH[obj->pwm] = 1; - setModulation(obj, 0, 0); - } else if (PULSE_WIDTH[obj->pwm] == PERIOD) { - PULSE_WIDTH[obj->pwm] = PERIOD - 1; - setModulation(obj, 0, 1); - } else if ((oldPulseWidth == 0) || (oldPulseWidth == PERIOD)) { - setModulation(obj, 1, oldPulseWidth == PERIOD); - } - - NRF_TIMER2->INTENSET = TIMER_INTENSET_COMPARE3_Msk; - NRF_TIMER2->SHORTS = TIMER_SHORTS_COMPARE3_CLEAR_Msk | TIMER_SHORTS_COMPARE3_STOP_Msk; - NRF_TIMER2->TASKS_START = 1; } float pwmout_read(pwmout_t *obj) { - return ((float)PULSE_WIDTH[obj->pwm] / (float)PERIOD); + return 0.0f; } void pwmout_period(pwmout_t *obj, float seconds) { - pwmout_period_us(obj, seconds * 1000000.0f); } void pwmout_period_ms(pwmout_t *obj, int ms) { - pwmout_period_us(obj, ms * 1000); } -// Set the PWM period, keeping the duty cycle the same. void pwmout_period_us(pwmout_t *obj, int us) { - (void) obj; // Avoid compiler warnings - uint32_t periodInTicks = us / TIMER_PRECISION; - - NRF_TIMER2->EVENTS_COMPARE[3] = 0; - NRF_TIMER2->TASKS_STOP = 1; - - if (periodInTicks>((1 << 16) - 1)) { - PERIOD = (1 << 16) - 1; //131ms - } else if (periodInTicks<5) { - PERIOD = 5; - } else { - PERIOD = periodInTicks; - } - NRF_TIMER2->INTENSET = TIMER_INTENSET_COMPARE3_Msk; - NRF_TIMER2->SHORTS = TIMER_SHORTS_COMPARE3_CLEAR_Msk | TIMER_SHORTS_COMPARE3_STOP_Msk; - NRF_TIMER2->TASKS_START = 1; } void pwmout_pulsewidth(pwmout_t *obj, float seconds) { - pwmout_pulsewidth_us(obj, seconds * 1000000.0f); } void pwmout_pulsewidth_ms(pwmout_t *obj, int ms) { - pwmout_pulsewidth_us(obj, ms * 1000); } void pwmout_pulsewidth_us(pwmout_t *obj, int us) { - uint32_t pulseInTicks = us / TIMER_PRECISION; - uint16_t oldPulseWidth = ACTUAL_PULSE[obj->pwm]; - - NRF_TIMER2->EVENTS_COMPARE[3] = 0; - NRF_TIMER2->TASKS_STOP = 1; - - ACTUAL_PULSE[obj->pwm] = PULSE_WIDTH[obj->pwm] = pulseInTicks; - - if (PULSE_WIDTH[obj->pwm] == 0) { - PULSE_WIDTH[obj->pwm] = 1; - setModulation(obj, 0, 0); - } else if (PULSE_WIDTH[obj->pwm] == PERIOD) { - PULSE_WIDTH[obj->pwm] = PERIOD - 1; - setModulation(obj, 0, 1); - } else if ((oldPulseWidth == 0) || (oldPulseWidth == PERIOD)) { - setModulation(obj, 1, oldPulseWidth == PERIOD); - } - NRF_TIMER2->INTENSET = TIMER_INTENSET_COMPARE3_Msk; - NRF_TIMER2->SHORTS = TIMER_SHORTS_COMPARE3_CLEAR_Msk | TIMER_SHORTS_COMPARE3_STOP_Msk; - NRF_TIMER2->TASKS_START = 1; } + +#endif // DEVICE_PWMOUT diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h new file mode 100644 index 0000000000..bdf509e0a5 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h @@ -0,0 +1,488 @@ +/* + * 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_DRV_CONFIG_H +#define NRF_DRV_CONFIG_H + +/** + * Provide a non-zero value here in applications that need to use several + * peripherals with the same ID that are sharing certain resources + * (for example, SPI0 and TWI0). Obviously, such peripherals cannot be used + * simultaneously. Therefore, this definition allows to initialize the driver + * for another peripheral from a given group only after the previously used one + * is uninitialized. Normally, this is not possible, because interrupt handlers + * are implemented in individual drivers. + * This functionality requires a more complicated interrupt handling and driver + * initialization, hence it is not always desirable to use it. + */ +#define PERIPHERAL_RESOURCE_SHARING_ENABLED 1 + +/* CLOCK */ +#define CLOCK_ENABLED 1 + +#if (CLOCK_ENABLED == 1) +#define CLOCK_CONFIG_XTAL_FREQ NRF_CLOCK_XTALFREQ_Default +#define CLOCK_CONFIG_LF_SRC NRF_CLOCK_LFCLK_Xtal +#define CLOCK_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#endif + +/* GPIOTE */ +#define GPIOTE_ENABLED 1 + +#if (GPIOTE_ENABLED == 1) +#define GPIOTE_CONFIG_USE_SWI_EGU false +#define GPIOTE_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#define GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS 8 +#endif + +/* TIMER */ +#ifdef SOFTDEVICE_PRESENT +#define TIMER0_ENABLED 0 +#else +#define TIMER0_ENABLED 1 +#endif + +#if (TIMER0_ENABLED == 1) +#define TIMER0_CONFIG_FREQUENCY NRF_TIMER_FREQ_16MHz +#define TIMER0_CONFIG_MODE TIMER_MODE_MODE_Timer +#define TIMER0_CONFIG_BIT_WIDTH TIMER_BITMODE_BITMODE_32Bit +#define TIMER0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define TIMER0_INSTANCE_INDEX 0 +#endif + +#define TIMER1_ENABLED 1 + +#if (TIMER1_ENABLED == 1) +#define TIMER1_CONFIG_FREQUENCY NRF_TIMER_FREQ_16MHz +#define TIMER1_CONFIG_MODE TIMER_MODE_MODE_Timer +#define TIMER1_CONFIG_BIT_WIDTH TIMER_BITMODE_BITMODE_16Bit +#define TIMER1_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define TIMER1_INSTANCE_INDEX (TIMER0_ENABLED) +#endif + +#define TIMER2_ENABLED 1 + +#if (TIMER2_ENABLED == 1) +#define TIMER2_CONFIG_FREQUENCY NRF_TIMER_FREQ_16MHz +#define TIMER2_CONFIG_MODE TIMER_MODE_MODE_Timer +#define TIMER2_CONFIG_BIT_WIDTH TIMER_BITMODE_BITMODE_16Bit +#define TIMER2_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define TIMER2_INSTANCE_INDEX (TIMER1_ENABLED+TIMER0_ENABLED) +#endif + +#define TIMER3_ENABLED 0 + +#if (TIMER3_ENABLED == 1) +#define TIMER3_CONFIG_FREQUENCY NRF_TIMER_FREQ_16MHz +#define TIMER3_CONFIG_MODE TIMER_MODE_MODE_Timer +#define TIMER3_CONFIG_BIT_WIDTH TIMER_BITMODE_BITMODE_16Bit +#define TIMER3_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define TIMER3_INSTANCE_INDEX (TIMER2_ENABLED+TIMER1_ENABLED+TIMER0_ENABLED) +#endif + +#define TIMER4_ENABLED 0 + +#if (TIMER4_ENABLED == 1) +#define TIMER4_CONFIG_FREQUENCY NRF_TIMER_FREQ_16MHz +#define TIMER4_CONFIG_MODE TIMER_MODE_MODE_Timer +#define TIMER4_CONFIG_BIT_WIDTH TIMER_BITMODE_BITMODE_16Bit +#define TIMER4_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define TIMER4_INSTANCE_INDEX (TIMER3_ENABLED+TIMER2_ENABLED+TIMER1_ENABLED+TIMER0_ENABLED) +#endif + + +#define TIMER_COUNT (TIMER0_ENABLED + TIMER1_ENABLED + TIMER2_ENABLED + TIMER3_ENABLED + TIMER4_ENABLED) + +/* RTC */ +#define RTC0_ENABLED 0 + +#if (RTC0_ENABLED == 1) +#define RTC0_CONFIG_FREQUENCY 32678 +#define RTC0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#define RTC0_CONFIG_RELIABLE false + +#define RTC0_INSTANCE_INDEX 0 +#endif + +#define RTC1_ENABLED 1 + +#if (RTC1_ENABLED == 1) +#define RTC1_CONFIG_FREQUENCY 32768 +#define RTC1_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#define RTC1_CONFIG_RELIABLE false + +#define RTC1_INSTANCE_INDEX (RTC0_ENABLED) +#endif + +#define RTC2_ENABLED 0 + +#if (RTC2_ENABLED == 1) +#define RTC2_CONFIG_FREQUENCY 32768 +#define RTC2_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#define RTC2_CONFIG_RELIABLE false + +#define RTC2_INSTANCE_INDEX (RTC0_ENABLED+RTC1_ENABLED) +#endif + + +#define RTC_COUNT (RTC0_ENABLED+RTC1_ENABLED+RTC2_ENABLED) + +#define NRF_MAXIMUM_LATENCY_US 2000 + +/* RNG */ +#define RNG_ENABLED 0 + +#if (RNG_ENABLED == 1) +#define RNG_CONFIG_ERROR_CORRECTION true +#define RNG_CONFIG_POOL_SIZE 8 +#define RNG_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#endif + +/* PWM */ + +#define PWM0_ENABLED 1 + +#if (PWM0_ENABLED == 1) +#define PWM0_CONFIG_OUT0_PIN 2 +#define PWM0_CONFIG_OUT1_PIN 3 +#define PWM0_CONFIG_OUT2_PIN 4 +#define PWM0_CONFIG_OUT3_PIN 5 +#define PWM0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#define PWM0_CONFIG_BASE_CLOCK NRF_PWM_CLK_1MHz +#define PWM0_CONFIG_COUNT_MODE NRF_PWM_MODE_UP +#define PWM0_CONFIG_TOP_VALUE 1000 +#define PWM0_CONFIG_LOAD_MODE NRF_PWM_LOAD_COMMON +#define PWM0_CONFIG_STEP_MODE NRF_PWM_STEP_AUTO + +#define PWM0_INSTANCE_INDEX 0 +#endif + +#define PWM1_ENABLED 0 + +#if (PWM1_ENABLED == 1) +#define PWM1_CONFIG_OUT0_PIN 2 +#define PWM1_CONFIG_OUT1_PIN 3 +#define PWM1_CONFIG_OUT2_PIN 4 +#define PWM1_CONFIG_OUT3_PIN 5 +#define PWM1_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#define PWM1_CONFIG_BASE_CLOCK NRF_PWM_CLK_1MHz +#define PWM1_CONFIG_COUNT_MODE NRF_PWM_MODE_UP +#define PWM1_CONFIG_TOP_VALUE 1000 +#define PWM1_CONFIG_LOAD_MODE NRF_PWM_LOAD_COMMON +#define PWM1_CONFIG_STEP_MODE NRF_PWM_STEP_AUTO + +#define PWM1_INSTANCE_INDEX (PWM0_ENABLED) +#endif + +#define PWM2_ENABLED 0 + +#if (PWM2_ENABLED == 1) +#define PWM2_CONFIG_OUT0_PIN 2 +#define PWM2_CONFIG_OUT1_PIN 3 +#define PWM2_CONFIG_OUT2_PIN 4 +#define PWM2_CONFIG_OUT3_PIN 5 +#define PWM2_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#define PWM2_CONFIG_BASE_CLOCK NRF_PWM_CLK_1MHz +#define PWM2_CONFIG_COUNT_MODE NRF_PWM_MODE_UP +#define PWM2_CONFIG_TOP_VALUE 1000 +#define PWM2_CONFIG_LOAD_MODE NRF_PWM_LOAD_COMMON +#define PWM2_CONFIG_STEP_MODE NRF_PWM_STEP_AUTO + +#define PWM2_INSTANCE_INDEX (PWM0_ENABLED + PWM1_ENABLED) +#endif + +#define PWM_COUNT (PWM0_ENABLED + PWM1_ENABLED + PWM2_ENABLED) + +/* SPI */ +#define SPI0_ENABLED 1 + +#if (SPI0_ENABLED == 1) +#define SPI0_USE_EASY_DMA 0 + +#define SPI0_CONFIG_SCK_PIN 2 +#define SPI0_CONFIG_MOSI_PIN 3 +#define SPI0_CONFIG_MISO_PIN 4 +#define SPI0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define SPI0_INSTANCE_INDEX 0 +#endif + +#define SPI1_ENABLED 1 + +#if (SPI1_ENABLED == 1) +#define SPI1_USE_EASY_DMA 0 + +#define SPI1_CONFIG_SCK_PIN 2 +#define SPI1_CONFIG_MOSI_PIN 3 +#define SPI1_CONFIG_MISO_PIN 4 +#define SPI1_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define SPI1_INSTANCE_INDEX (SPI0_ENABLED) +#endif + +#define SPI2_ENABLED 0 + +#if (SPI2_ENABLED == 1) +#define SPI2_USE_EASY_DMA 0 + +#define SPI2_CONFIG_SCK_PIN 2 +#define SPI2_CONFIG_MOSI_PIN 3 +#define SPI2_CONFIG_MISO_PIN 4 +#define SPI2_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define SPI2_INSTANCE_INDEX (SPI0_ENABLED + SPI1_ENABLED) +#endif + +#define SPI_COUNT (SPI0_ENABLED + SPI1_ENABLED + SPI2_ENABLED) + +/* SPIS */ +#define SPIS0_ENABLED 0 + +#if (SPIS0_ENABLED == 1) +#define SPIS0_CONFIG_SCK_PIN 2 +#define SPIS0_CONFIG_MOSI_PIN 3 +#define SPIS0_CONFIG_MISO_PIN 4 +#define SPIS0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define SPIS0_INSTANCE_INDEX 0 +#endif + +#define SPIS1_ENABLED 0 + +#if (SPIS1_ENABLED == 1) +#define SPIS1_CONFIG_SCK_PIN 2 +#define SPIS1_CONFIG_MOSI_PIN 3 +#define SPIS1_CONFIG_MISO_PIN 4 +#define SPIS1_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define SPIS1_INSTANCE_INDEX SPIS0_ENABLED +#endif + +#define SPIS2_ENABLED 0 + +#if (SPIS2_ENABLED == 1) +#define SPIS2_CONFIG_SCK_PIN 2 +#define SPIS2_CONFIG_MOSI_PIN 3 +#define SPIS2_CONFIG_MISO_PIN 4 +#define SPIS2_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define SPIS2_INSTANCE_INDEX (SPIS0_ENABLED + SPIS1_ENABLED) +#endif + +#define SPIS_COUNT (SPIS0_ENABLED + SPIS1_ENABLED + SPIS2_ENABLED) + +/* UART */ +#define UART0_ENABLED 1 + +#if (UART0_ENABLED == 1) +#define UART0_CONFIG_HWFC NRF_UART_HWFC_ENABLED +#define UART0_CONFIG_PARITY NRF_UART_PARITY_EXCLUDED +#define UART0_CONFIG_BAUDRATE NRF_UART_BAUDRATE_9600 +#define UART0_CONFIG_PSEL_TXD 6 +#define UART0_CONFIG_PSEL_RXD 8 +#define UART0_CONFIG_PSEL_CTS 7 +#define UART0_CONFIG_PSEL_RTS 5 +#define UART0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_HIGH +#ifdef NRF52 +#define UART0_CONFIG_USE_EASY_DMA false +//Compile time flag +#define UART_EASY_DMA_SUPPORT 1 +#define UART_LEGACY_SUPPORT 1 +#endif //NRF52 +#endif + +#define TWI0_ENABLED 1 + +#if (TWI0_ENABLED == 1) +#define TWI0_USE_EASY_DMA 0 + +#define TWI0_CONFIG_FREQUENCY NRF_TWI_FREQ_100K +#define TWI0_CONFIG_SCL 0 +#define TWI0_CONFIG_SDA 1 +#define TWI0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define TWI0_INSTANCE_INDEX 0 +#endif + +#define TWI1_ENABLED 1 + +#if (TWI1_ENABLED == 1) +#define TWI1_USE_EASY_DMA 0 + +#define TWI1_CONFIG_FREQUENCY NRF_TWI_FREQ_100K +#define TWI1_CONFIG_SCL 0 +#define TWI1_CONFIG_SDA 1 +#define TWI1_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + +#define TWI1_INSTANCE_INDEX (TWI0_ENABLED) +#endif + +#define TWI_COUNT (TWI0_ENABLED + TWI1_ENABLED) + +/* TWIS */ +#define TWIS0_ENABLED 0 + +#if (TWIS0_ENABLED == 1) + #define TWIS0_CONFIG_ADDR0 0 + #define TWIS0_CONFIG_ADDR1 0 /* 0: Disabled */ + #define TWIS0_CONFIG_SCL 0 + #define TWIS0_CONFIG_SDA 1 + #define TWIS0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + + #define TWIS0_INSTANCE_INDEX 0 +#endif + +#define TWIS1_ENABLED 0 + +#if (TWIS1_ENABLED == 1) + #define TWIS1_CONFIG_ADDR0 0 + #define TWIS1_CONFIG_ADDR1 0 /* 0: Disabled */ + #define TWIS1_CONFIG_SCL 0 + #define TWIS1_CONFIG_SDA 1 + #define TWIS1_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW + + #define TWIS1_INSTANCE_INDEX (TWIS0_ENABLED) +#endif + +#define TWIS_COUNT (TWIS0_ENABLED + TWIS1_ENABLED) +/* For more documentation see nrf_drv_twis.h file */ +#define TWIS_ASSUME_INIT_AFTER_RESET_ONLY 0 +/* For more documentation see nrf_drv_twis.h file */ +#define TWIS_NO_SYNC_MODE 0 + +/* QDEC */ +#define QDEC_ENABLED 0 + +#if (QDEC_ENABLED == 1) +#define QDEC_CONFIG_REPORTPER NRF_QDEC_REPORTPER_10 +#define QDEC_CONFIG_SAMPLEPER NRF_QDEC_SAMPLEPER_16384us +#define QDEC_CONFIG_PIO_A 1 +#define QDEC_CONFIG_PIO_B 2 +#define QDEC_CONFIG_PIO_LED 3 +#define QDEC_CONFIG_LEDPRE 511 +#define QDEC_CONFIG_LEDPOL NRF_QDEC_LEPOL_ACTIVE_HIGH +#define QDEC_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#define QDEC_CONFIG_DBFEN false +#define QDEC_CONFIG_SAMPLE_INTEN false +#endif + +/* ADC */ +#define ADC_ENABLED 0 + +#if (ADC_ENABLED == 1) +#define ADC_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#endif + + +/* SAADC */ +#define SAADC_ENABLED 1 + +#if (SAADC_ENABLED == 1) +#define SAADC_CONFIG_RESOLUTION NRF_SAADC_RESOLUTION_10BIT +#define SAADC_CONFIG_OVERSAMPLE NRF_SAADC_OVERSAMPLE_DISABLED +#define SAADC_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#endif + +/* PDM */ +#define PDM_ENABLED 0 + +#if (PDM_ENABLED == 1) +#define PDM_CONFIG_MODE NRF_PDM_MODE_MONO +#define PDM_CONFIG_EDGE NRF_PDM_EDGE_LEFTFALLING +#define PDM_CONFIG_CLOCK_FREQ NRF_PDM_FREQ_1032K +#define PDM_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#endif + +/* COMP */ +#define COMP_ENABLED 0 + +#if (COMP_ENABLED == 1) +#define COMP_CONFIG_REF NRF_COMP_REF_Int1V8 +#define COMP_CONFIG_MAIN_MODE NRF_COMP_MAIN_MODE_SE +#define COMP_CONFIG_SPEED_MODE NRF_COMP_SP_MODE_High +#define COMP_CONFIG_HYST NRF_COMP_HYST_NoHyst +#define COMP_CONFIG_ISOURCE NRF_COMP_ISOURCE_Off +#define COMP_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#define COMP_CONFIG_INPUT NRF_COMP_INPUT_0 +#endif + +/* LPCOMP */ +#define LPCOMP_ENABLED 0 + +#if (LPCOMP_ENABLED == 1) +#define LPCOMP_CONFIG_REFERENCE NRF_LPCOMP_REF_SUPPLY_4_8 +#define LPCOMP_CONFIG_DETECTION NRF_LPCOMP_DETECT_DOWN +#define LPCOMP_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW +#define LPCOMP_CONFIG_INPUT NRF_LPCOMP_INPUT_0 +#endif + +/* WDT */ +#define WDT_ENABLED 0 + +#if (WDT_ENABLED == 1) +#define WDT_CONFIG_BEHAVIOUR NRF_WDT_BEHAVIOUR_RUN_SLEEP +#define WDT_CONFIG_RELOAD_VALUE 2000 +#define WDT_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_HIGH +#endif + +/* SWI EGU */ +#ifdef NRF52 + #define EGU_ENABLED 0 +#endif + +/* I2S */ +#define I2S_ENABLED 0 + +#if (I2S_ENABLED == 1) +#define I2S_CONFIG_SCK_PIN 22 +#define I2S_CONFIG_LRCK_PIN 23 +#define I2S_CONFIG_MCK_PIN NRF_DRV_I2S_PIN_NOT_USED +#define I2S_CONFIG_SDOUT_PIN 24 +#define I2S_CONFIG_SDIN_PIN 25 +#define I2S_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_HIGH +#define I2S_CONFIG_MASTER NRF_I2S_MODE_MASTER +#define I2S_CONFIG_FORMAT NRF_I2S_FORMAT_I2S +#define I2S_CONFIG_ALIGN NRF_I2S_ALIGN_LEFT +#define I2S_CONFIG_SWIDTH NRF_I2S_SWIDTH_16BIT +#define I2S_CONFIG_CHANNELS NRF_I2S_CHANNELS_STEREO +#define I2S_CONFIG_MCK_SETUP NRF_I2S_MCK_32MDIV8 +#define I2S_CONFIG_RATIO NRF_I2S_RATIO_256X +#endif + +#include "nrf_drv_config_validation.h" + +#endif // NRF_DRV_CONFIG_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/serial_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/serial_api.c deleted file mode 100644 index 7abccc2e45..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/serial_api.c +++ /dev/null @@ -1,305 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// math.h required for floating point operations for baud rate calculation -//#include -#include - -#include "mbed_assert.h" -#include "serial_api.h" -#include "cmsis.h" -#include "pinmap.h" - -/****************************************************************************** - * INITIALIZATION - ******************************************************************************/ -#define UART_NUM 1 - -static uint32_t serial_irq_ids[UART_NUM] = {0}; -static uart_irq_handler irq_handler; -static const uint32_t acceptedSpeeds[17][2] = { - {1200, UART_BAUDRATE_BAUDRATE_Baud1200}, - {2400, UART_BAUDRATE_BAUDRATE_Baud2400}, - {4800, UART_BAUDRATE_BAUDRATE_Baud4800}, - {9600, UART_BAUDRATE_BAUDRATE_Baud9600}, - {14400, UART_BAUDRATE_BAUDRATE_Baud14400}, - {19200, UART_BAUDRATE_BAUDRATE_Baud19200}, - {28800, UART_BAUDRATE_BAUDRATE_Baud28800}, - {31250, (0x00800000UL) /* 31250 baud */}, - {38400, UART_BAUDRATE_BAUDRATE_Baud38400}, - {57600, UART_BAUDRATE_BAUDRATE_Baud57600}, - {76800, UART_BAUDRATE_BAUDRATE_Baud76800}, - {115200, UART_BAUDRATE_BAUDRATE_Baud115200}, - {230400, UART_BAUDRATE_BAUDRATE_Baud230400}, - {250000, UART_BAUDRATE_BAUDRATE_Baud250000}, - {460800, UART_BAUDRATE_BAUDRATE_Baud460800}, - {921600, UART_BAUDRATE_BAUDRATE_Baud921600}, - {1000000, UART_BAUDRATE_BAUDRATE_Baud1M} -}; - -int stdio_uart_inited = 0; -serial_t stdio_uart; - -void serial_init(serial_t *obj, PinName tx, PinName rx) { - UARTName uart = UART_0; - obj->uart = (NRF_UART_Type *)uart; - - //pin configurations -- - NRF_GPIO->DIR |= (1 << tx); //TX_PIN_NUMBER); - NRF_GPIO->DIR |= (1 << RTS_PIN_NUMBER); - - NRF_GPIO->DIR &= ~(1 << rx); //RX_PIN_NUMBER); - NRF_GPIO->DIR &= ~(1 << CTS_PIN_NUMBER); - - - // set default baud rate and format - serial_baud (obj, 9600); - serial_format(obj, 8, ParityNone, 1); - - obj->uart->ENABLE = (UART_ENABLE_ENABLE_Enabled << UART_ENABLE_ENABLE_Pos); - obj->uart->TASKS_STARTTX = 1; - obj->uart->TASKS_STARTRX = 1; - obj->uart->EVENTS_RXDRDY = 0; - // dummy write needed or TXDRDY trails write rather than leads write. - // pins are disconnected so nothing is physically transmitted on the wire - obj->uart->TXD = 0; - - obj->index = 0; - - obj->uart->PSELRTS = RTS_PIN_NUMBER; - obj->uart->PSELTXD = tx; //TX_PIN_NUMBER; - obj->uart->PSELCTS = CTS_PIN_NUMBER; - obj->uart->PSELRXD = rx; //RX_PIN_NUMBER; - - // set rx/tx pins in PullUp mode - if (tx != NC) { - pin_mode(tx, PullUp); - } - if (rx != NC) { - pin_mode(rx, PullUp); - } - - if (uart == STDIO_UART) { - stdio_uart_inited = 1; - memcpy(&stdio_uart, obj, sizeof(serial_t)); - } -} - -void serial_free(serial_t *obj) -{ - serial_irq_ids[obj->index] = 0; -} - -// serial_baud -// set the baud rate, taking in to account the current SystemFrequency -void serial_baud(serial_t *obj, int baudrate) -{ - if (baudrate<=1200) { - obj->uart->BAUDRATE = UART_BAUDRATE_BAUDRATE_Baud1200; - return; - } - - for (int i = 1; i<17; i++) { - if (baudrateuart->BAUDRATE = acceptedSpeeds[i - 1][1]; - return; - } - } - obj->uart->BAUDRATE = UART_BAUDRATE_BAUDRATE_Baud1M; -} - -void serial_format(serial_t *obj, int data_bits, SerialParity parity, int stop_bits) -{ - /* Avoid compiler warnings */ - (void) data_bits; - (void) stop_bits; - - // 0: 1 stop bits, 1: 2 stop bits - // int parity_enable, parity_select; - switch (parity) { - case ParityNone: - obj->uart->CONFIG = 0; - break; - default: - obj->uart->CONFIG = (UART_CONFIG_PARITY_Included << UART_CONFIG_PARITY_Pos); - return; - } - //no Flow Control -} - -//****************************************************************************** -// * INTERRUPT HANDLING -//****************************************************************************** -static inline void uart_irq(uint32_t iir, uint32_t index) -{ - SerialIrq irq_type; - switch (iir) { - case 1: - irq_type = TxIrq; - break; - case 2: - irq_type = RxIrq; - break; - - default: - return; - } - - if (serial_irq_ids[index] != 0) { - irq_handler(serial_irq_ids[index], irq_type); - } -} - -#ifdef __cplusplus -extern "C" { -#endif -void UART0_IRQHandler() -{ - uint32_t irtype = 0; - - if((NRF_UART0->INTENSET & 0x80) && NRF_UART0->EVENTS_TXDRDY) { - irtype = 1; - } else if((NRF_UART0->INTENSET & 0x04) && NRF_UART0->EVENTS_RXDRDY) { - irtype = 2; - } - uart_irq(irtype, 0); -} - -#ifdef __cplusplus -} -#endif -void serial_irq_handler(serial_t *obj, uart_irq_handler handler, uint32_t id) -{ - irq_handler = handler; - serial_irq_ids[obj->index] = id; -} - -void serial_irq_set(serial_t *obj, SerialIrq irq, uint32_t enable) -{ - IRQn_Type irq_n = (IRQn_Type)0; - - switch ((int)obj->uart) { - case UART_0: - irq_n = UART0_IRQn; - break; - } - - if (enable) { - switch (irq) { - case RxIrq: - obj->uart->INTENSET = (UART_INTENSET_RXDRDY_Msk); - break; - case TxIrq: - obj->uart->INTENSET = (UART_INTENSET_TXDRDY_Msk); - break; - } - NVIC_SetPriority(irq_n, 3); - NVIC_EnableIRQ(irq_n); - } else { // disable - // maseked writes to INTENSET dont disable and masked writes to - // INTENCLR seemed to clear the entire register, not bits. - // Added INTEN to memory map and seems to allow set and clearing of specific bits as desired - int all_disabled = 0; - switch (irq) { - case RxIrq: - obj->uart->INTENCLR = (UART_INTENCLR_RXDRDY_Msk); - all_disabled = (obj->uart->INTENCLR & (UART_INTENCLR_TXDRDY_Msk)) == 0; - break; - case TxIrq: - obj->uart->INTENCLR = (UART_INTENCLR_TXDRDY_Msk); - all_disabled = (obj->uart->INTENCLR & (UART_INTENCLR_RXDRDY_Msk)) == 0; - break; - } - - if (all_disabled) { - NVIC_DisableIRQ(irq_n); - } - } -} - -//****************************************************************************** -//* READ/WRITE -//****************************************************************************** -int serial_getc(serial_t *obj) -{ - while (!serial_readable(obj)) { - } - - obj->uart->EVENTS_RXDRDY = 0; - - return (uint8_t)obj->uart->RXD; -} - -void serial_putc(serial_t *obj, int c) -{ - while (!serial_writable(obj)) { - } - - obj->uart->EVENTS_TXDRDY = 0; - obj->uart->TXD = (uint8_t)c; -} - -int serial_readable(serial_t *obj) -{ - return (obj->uart->EVENTS_RXDRDY == 1); -} - -int serial_writable(serial_t *obj) -{ - return (obj->uart->EVENTS_TXDRDY == 1); -} - -void serial_break_set(serial_t *obj) -{ - obj->uart->TASKS_SUSPEND = 1; -} - -void serial_break_clear(serial_t *obj) -{ - obj->uart->TASKS_STARTTX = 1; - obj->uart->TASKS_STARTRX = 1; -} - -void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, PinName txflow) -{ - - if (type == FlowControlRTSCTS || type == FlowControlRTS) { - NRF_GPIO->DIR |= (1<uart->PSELRTS = rxflow; - - obj->uart->CONFIG |= 0x01; // Enable HWFC - } - - if (type == FlowControlRTSCTS || type == FlowControlCTS) { - NRF_GPIO->DIR &= ~(1<uart->PSELCTS = txflow; - - obj->uart->CONFIG |= 0x01; // Enable HWFC; - } - - if (type == FlowControlNone) { - obj->uart->PSELRTS = 0xFFFFFFFF; // Disable RTS - obj->uart->PSELCTS = 0xFFFFFFFF; // Disable CTS - - obj->uart->CONFIG &= ~0x01; // Enable HWFC; - } -} - -void serial_clear(serial_t *obj) { - /* Avoid compiler warnings */ - (void) obj; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sleep.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sleep.c deleted file mode 100644 index 44aa8ae59c..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sleep.c +++ /dev/null @@ -1,32 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2006-2015 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "sleep_api.h" -#include "cmsis.h" -#include "mbed_interface.h" - -void sleep(void) -{ - // ensure debug is disconnected if semihost is enabled.... - NRF_POWER->TASKS_LOWPWR = 1; - // wait for interrupt - __WFE(); -} - -void deepsleep(void) -{ - sleep(); - // NRF_POWER->SYSTEMOFF=1; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/spi_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/spi_api.c deleted file mode 100644 index c26590587d..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/spi_api.c +++ /dev/null @@ -1,243 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -//#include -#include "mbed_assert.h" -#include "mbed_error.h" -#include "spi_api.h" -#include "cmsis.h" -#include "pinmap.h" - -#define SPIS_MESSAGE_SIZE 1 -volatile uint8_t m_tx_buf[SPIS_MESSAGE_SIZE] = {0}; -volatile uint8_t m_rx_buf[SPIS_MESSAGE_SIZE] = {0}; - -// nRF51822's I2C_0 and SPI_0 (I2C_1, SPI_1 and SPIS1) share the same address. -// They can't be used at the same time. So we use two global variable to track the usage. -// See nRF51822 address information at nRF51822_PS v2.0.pdf - Table 15 Peripheral instance reference -extern volatile i2c_spi_peripheral_t i2c0_spi0_peripheral; // from i2c_api.c -extern volatile i2c_spi_peripheral_t i2c1_spi1_peripheral; - -void spi_init(spi_t *obj, PinName mosi, PinName miso, PinName sclk, PinName ssel) -{ - SPIName spi = SPI_0; // Initialize to avoid compiler warnings - - if (ssel == NC && i2c0_spi0_peripheral.usage == I2C_SPI_PERIPHERAL_FOR_SPI && - i2c0_spi0_peripheral.sda_mosi == (uint8_t)mosi && - i2c0_spi0_peripheral.scl_miso == (uint8_t)miso && - i2c0_spi0_peripheral.sclk == (uint8_t)sclk) { - // The SPI with the same pins is already initialized - spi = SPI_0; - obj->peripheral = 0x1; - } else if (ssel == NC && i2c1_spi1_peripheral.usage == I2C_SPI_PERIPHERAL_FOR_SPI && - i2c1_spi1_peripheral.sda_mosi == (uint8_t)mosi && - i2c1_spi1_peripheral.scl_miso == (uint8_t)miso && - i2c1_spi1_peripheral.sclk == (uint8_t)sclk) { - // The SPI with the same pins is already initialized - spi = SPI_1; - obj->peripheral = 0x2; - } else if (i2c1_spi1_peripheral.usage == 0) { - i2c1_spi1_peripheral.usage = I2C_SPI_PERIPHERAL_FOR_SPI; - i2c1_spi1_peripheral.sda_mosi = (uint8_t)mosi; - i2c1_spi1_peripheral.scl_miso = (uint8_t)miso; - i2c1_spi1_peripheral.sclk = (uint8_t)sclk; - - spi = SPI_1; - obj->peripheral = 0x2; - } else if (i2c0_spi0_peripheral.usage == 0) { - i2c0_spi0_peripheral.usage = I2C_SPI_PERIPHERAL_FOR_SPI; - i2c0_spi0_peripheral.sda_mosi = (uint8_t)mosi; - i2c0_spi0_peripheral.scl_miso = (uint8_t)miso; - i2c0_spi0_peripheral.sclk = (uint8_t)sclk; - - spi = SPI_0; - obj->peripheral = 0x1; - } else { - // No available peripheral - error("No available SPI"); - } - - if (ssel==NC) { - obj->spi = (NRF_SPI_Type *)spi; - obj->spis = (NRF_SPIS_Type *)NC; - } else { - obj->spi = (NRF_SPI_Type *)NC; - obj->spis = (NRF_SPIS_Type *)spi; - } - - //master -// TODO: understand implication of this on nrf52 -// obj->spi->POWER = 0; -// obj->spi->POWER = 1; - - //NRF_GPIO->DIR |= (1<PIN_CNF[mosi] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); - obj->spi->PSELMOSI = mosi; - - NRF_GPIO->PIN_CNF[sclk] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); - obj->spi->PSELSCK = sclk; - - //NRF_GPIO->DIR &= ~(1<PIN_CNF[miso] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos); - - obj->spi->PSELMISO = miso; - - obj->spi->EVENTS_READY = 0U; - -// spi_format(obj, 8, 0, SPI_MSB); // 8 bits, mode 0, master - spi_frequency(obj, 1000000); -} - -void spi_free(spi_t *obj) -{ - (void) obj; // Avoid compiler warnings -} - -static inline void spi_disable(spi_t *obj, int slave) -{ - obj->spi->ENABLE = (SPI_ENABLE_ENABLE_Disabled << SPI_ENABLE_ENABLE_Pos); -} - -static inline void spi_enable(spi_t *obj, int slave) -{ - obj->spi->ENABLE = (SPI_ENABLE_ENABLE_Enabled << SPI_ENABLE_ENABLE_Pos); -} - -void spi_format(spi_t *obj, int bits, int mode, int slave) -{ - uint32_t config_mode = 0; - spi_disable(obj, slave); - - if (bits != 8) { - error("Only 8bits SPI supported"); - } - - switch (mode) { - case 0: - config_mode = (SPI_CONFIG_CPHA_Leading << SPI_CONFIG_CPHA_Pos) | (SPI_CONFIG_CPOL_ActiveHigh << SPI_CONFIG_CPOL_Pos); - break; - case 1: - config_mode = (SPI_CONFIG_CPHA_Trailing << SPI_CONFIG_CPHA_Pos) | (SPI_CONFIG_CPOL_ActiveHigh << SPI_CONFIG_CPOL_Pos); - break; - case 2: - config_mode = (SPI_CONFIG_CPHA_Leading << SPI_CONFIG_CPHA_Pos) | (SPI_CONFIG_CPOL_ActiveLow << SPI_CONFIG_CPOL_Pos); - break; - case 3: - config_mode = (SPI_CONFIG_CPHA_Trailing << SPI_CONFIG_CPHA_Pos) | (SPI_CONFIG_CPOL_ActiveLow << SPI_CONFIG_CPOL_Pos); - break; - default: - error("SPI format error"); - break; - } - - //obj->spi->CONFIG = (config_mode | (((order == SPI_MSB) ? SPI_CONFIG_ORDER_MsbFirst : SPI_CONFIG_ORDER_LsbFirst) << SPI_CONFIG_ORDER_Pos)); - - //default to msb first - if (slave) { - obj->spis->CONFIG = (config_mode | (SPI_CONFIG_ORDER_MsbFirst << SPI_CONFIG_ORDER_Pos)); - } else { - obj->spi->CONFIG = (config_mode | (SPI_CONFIG_ORDER_MsbFirst << SPI_CONFIG_ORDER_Pos)); - } - - spi_enable(obj, slave); -} - -void spi_frequency(spi_t *obj, int hz) -{ - if ((int)obj->spi==NC) { - return; - } - spi_disable(obj, 0); - - if (hz<250000) { //125Kbps - obj->spi->FREQUENCY = (uint32_t) SPI_FREQUENCY_FREQUENCY_K125; - } else if (hz<500000) { //250Kbps - obj->spi->FREQUENCY = (uint32_t) SPI_FREQUENCY_FREQUENCY_K250; - } else if (hz<1000000) { //500Kbps - obj->spi->FREQUENCY = (uint32_t) SPI_FREQUENCY_FREQUENCY_K500; - } else if (hz<2000000) { //1Mbps - obj->spi->FREQUENCY = (uint32_t) SPI_FREQUENCY_FREQUENCY_M1; - } else if (hz<4000000) { //2Mbps - obj->spi->FREQUENCY = (uint32_t) SPI_FREQUENCY_FREQUENCY_M2; - } else if (hz<8000000) { //4Mbps - obj->spi->FREQUENCY = (uint32_t) SPI_FREQUENCY_FREQUENCY_M4; - } else { //8Mbps - obj->spi->FREQUENCY = (uint32_t) SPI_FREQUENCY_FREQUENCY_M8; - } - - spi_enable(obj, 0); -} - -static inline int spi_readable(spi_t *obj) -{ - return (obj->spi->EVENTS_READY == 1); -} - -static inline int spi_writeable(spi_t *obj) -{ - return (obj->spi->EVENTS_READY == 0); -} - -static inline int spi_read(spi_t *obj) -{ - while (!spi_readable(obj)) { - } - - obj->spi->EVENTS_READY = 0; - return (int)obj->spi->RXD; -} - -int spi_master_write(spi_t *obj, int value) -{ - while (!spi_writeable(obj)) { - } - obj->spi->TXD = (uint32_t)value; - return spi_read(obj); -} - -//static inline int spis_writeable(spi_t *obj) { -// return (obj->spis->EVENTS_ACQUIRED==1); -//} - -int spi_slave_receive(spi_t *obj) -{ - return obj->spis->EVENTS_END; -} - -int spi_slave_read(spi_t *obj) -{ - (void) obj; // Avoid compiler warnings - return m_rx_buf[0]; -} - -void spi_slave_write(spi_t *obj, int value) -{ - m_tx_buf[0] = value & 0xFF; - obj->spis->TASKS_RELEASE = 1; - obj->spis->EVENTS_ACQUIRED = 0; - obj->spis->EVENTS_END = 0; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/us_ticker.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/us_ticker.c deleted file mode 100644 index db558a7883..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/us_ticker.c +++ /dev/null @@ -1,277 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include -#include -#include "us_ticker_api.h" -#include "cmsis.h" -#include "PeripheralNames.h" -#include "nrf_delay.h" - -/* - * Note: The micro-second timer API on the nRF51 platform is implemented using - * the RTC counter run at 32kHz (sourced from an external oscillator). This is - * a trade-off between precision and power. Running a normal 32-bit MCU counter - * at high frequency causes the average power consumption to rise to a few - * hundred micro-amps, which is prohibitive for typical low-power BLE - * applications. - * A 32kHz clock doesn't offer the precision needed for keeping u-second time, - * but we're assuming that this will not be a problem for the average user. - */ - -#define MAX_RTC_COUNTER_VAL 0x00FFFFFF /**< Maximum value of the RTC counter. */ -#define RTC_CLOCK_FREQ (uint32_t)(32768) -#define RTC1_IRQ_PRI 3 /**< Priority of the RTC1 interrupt (used - * for checking for timeouts and executing - * timeout handlers). This must be the same - * as APP_IRQ_PRIORITY_LOW; taken from the - * Nordic SDK. */ -#define MAX_RTC_TASKS_DELAY 47 /**< Maximum delay until an RTC task is executed. */ - -#define FUZZY_RTC_TICKS 2 /* RTC COMPARE occurs when a CC register is N and the RTC - * COUNTER value transitions from N-1 to N. If we're trying to - * setup a callback for a time which will arrive very shortly, - * there are limits to how short the callback interval may be for us - * to rely upon the RTC Compare trigger. If the COUNTER is N, - * writing N+2 to a CC register is guaranteed to trigger a COMPARE - * event at N+2. */ - -#define RTC_UNITS_TO_MICROSECONDS(RTC_UNITS) (((RTC_UNITS) * (uint64_t)1000000) / RTC_CLOCK_FREQ) -#define MICROSECONDS_TO_RTC_UNITS(MICROS) ((((uint64_t)(MICROS) * RTC_CLOCK_FREQ) + 999999) / 1000000) - -static bool us_ticker_inited = false; -static volatile bool us_ticker_callbackPending = false; -static uint32_t us_ticker_callbackTimestamp; -volatile uint32_t overflowCount; /**< The number of times the 24-bit RTC counter has overflowed. */ - -static inline void rtc1_enableCompareInterrupt(void) -{ - NRF_RTC1->EVTENCLR = RTC_EVTEN_COMPARE0_Msk; - NRF_RTC1->INTENSET = RTC_INTENSET_COMPARE0_Msk; -} - -static inline void rtc1_disableCompareInterrupt(void) -{ - NRF_RTC1->INTENCLR = RTC_INTENSET_COMPARE0_Msk; - NRF_RTC1->EVTENCLR = RTC_EVTEN_COMPARE0_Msk; -} - -static inline void rtc1_enableOverflowInterrupt(void) -{ - NRF_RTC1->EVTENCLR = RTC_EVTEN_OVRFLW_Msk; - NRF_RTC1->INTENSET = RTC_INTENSET_OVRFLW_Msk; -} - -static inline void rtc1_disableOverflowInterrupt(void) -{ - NRF_RTC1->INTENCLR = RTC_INTENSET_OVRFLW_Msk; - NRF_RTC1->EVTENCLR = RTC_EVTEN_OVRFLW_Msk; -} - -static inline void invokeCallback(void) -{ - us_ticker_callbackPending = false; - rtc1_disableCompareInterrupt(); - us_ticker_irq_handler(); -} - -/** - * @brief Function for starting the RTC1 timer. The RTC timer is expected to - * keep running--some interrupts may be disabled temporarily. - */ -static void rtc1_start() -{ - NRF_RTC1->PRESCALER = 0; /* for no pre-scaling. */ - - rtc1_enableOverflowInterrupt(); - - NVIC_SetPriority(RTC1_IRQn, RTC1_IRQ_PRI); - NVIC_ClearPendingIRQ(RTC1_IRQn); - NVIC_EnableIRQ(RTC1_IRQn); - - NRF_RTC1->TASKS_START = 1; - nrf_delay_us(MAX_RTC_TASKS_DELAY); -} - -/** - * @brief Function for stopping the RTC1 timer. We don't expect to call this. - */ -void rtc1_stop(void) -{ - NVIC_DisableIRQ(RTC1_IRQn); - rtc1_disableCompareInterrupt(); - rtc1_disableOverflowInterrupt(); - - NRF_RTC1->TASKS_STOP = 1; - nrf_delay_us(MAX_RTC_TASKS_DELAY); - - NRF_RTC1->TASKS_CLEAR = 1; - nrf_delay_us(MAX_RTC_TASKS_DELAY); -} - -/** - * @brief Function for returning the current value of the RTC1 counter. - * - * @return Current RTC1 counter as a 64-bit value with 56-bit precision (even - * though the underlying counter is 24-bit) - */ -static inline uint64_t rtc1_getCounter64(void) -{ - if (NRF_RTC1->EVENTS_OVRFLW) { - overflowCount++; - NRF_RTC1->EVENTS_OVRFLW = 0; - NRF_RTC1->EVTENCLR = RTC_EVTEN_OVRFLW_Msk; - } - return ((uint64_t)overflowCount << 24) | NRF_RTC1->COUNTER; -} - -/** - * @brief Function for returning the current value of the RTC1 counter. - * - * @return Current RTC1 counter as a 32-bit value (even though the underlying counter is 24-bit) - */ -uint32_t rtc1_getCounter(void) -{ - return rtc1_getCounter64(); -} - -/** - * @brief Function for handling the RTC1 interrupt. - * - * @details Checks for timeouts, and executes timeout handlers for expired timers. - */ -void RTC1_IRQHandler(void) -{ - if (NRF_RTC1->EVENTS_OVRFLW) { - overflowCount++; - NRF_RTC1->EVENTS_OVRFLW = 0; - NRF_RTC1->EVTENCLR = RTC_EVTEN_OVRFLW_Msk; - } - if (NRF_RTC1->EVENTS_COMPARE[0] && us_ticker_callbackPending && ((int)(us_ticker_callbackTimestamp - rtc1_getCounter()) <= 0)) { - NRF_RTC1->EVENTS_COMPARE[0] = 0; - NRF_RTC1->EVTENCLR = RTC_EVTEN_COMPARE0_Msk; - invokeCallback(); - } - if (NRF_RTC1->EVENTS_COMPARE[1]) { - // Compare[1] used by lp ticker - NRF_RTC1->EVENTS_COMPARE[1] = 0; - NRF_RTC1->EVTENCLR = RTC_EVTEN_COMPARE1_Msk; - } -} - -void us_ticker_init(void) -{ - if (us_ticker_inited) { - return; - } - - rtc1_start(); - us_ticker_inited = true; -} - -uint32_t us_ticker_read() -{ - if (!us_ticker_inited) { - us_ticker_init(); - } - - /* Return a pseudo microsecond counter value. This is only as precise as the - * 32khz low-freq clock source, but could be adequate.*/ - return RTC_UNITS_TO_MICROSECONDS(rtc1_getCounter64()); -} - -/** - * Setup the us_ticker callback interrupt to go at the given timestamp. - * - * @Note: Only one callback is pending at any time. - * - * @Note: If a callback is pending, and this function is called again, the new - * callback-time overrides the existing callback setting. It is the caller's - * responsibility to ensure that this function is called to setup a callback for - * the earliest timeout. - * - * @Note: If this function is used to setup an interrupt which is immediately - * pending--such as for 'now' or a time in the past,--then the callback is - * invoked a few ticks later. - */ -void us_ticker_set_interrupt(timestamp_t timestamp) -{ - if (!us_ticker_inited) { - us_ticker_init(); - } - - /* - * The argument to this function is a 32-bit microsecond timestamp for when - * a callback should be invoked. On the nRF51, we use an RTC timer running - * at 32kHz to implement a low-power us-ticker. This results in a problem - * based on the fact that 1000000 is not a multiple of 32768. - * - * Going from a micro-second based timestamp to a 32kHz based RTC-time is a - * linear mapping; but this mapping doesn't preserve wraparounds--i.e. when - * the 32-bit micro-second timestamp wraps around unfortunately the - * underlying RTC counter doesn't. The result is that timestamp expiry - * checks on micro-second timestamps don't yield the same result when - * applied on the corresponding RTC timestamp values. - * - * One solution is to translate the incoming 32-bit timestamp into a virtual - * 64-bit timestamp based on the knowledge of system-uptime, and then use - * this wraparound-free 64-bit value to do a linear mapping to RTC time. - * System uptime on an nRF is maintained using the 24-bit RTC counter. We - * track the overflow count to extend the 24-bit hardware counter by an - * additional 32 bits. RTC_UNITS_TO_MICROSECONDS() converts this into - * microsecond units (in 64-bits). - */ - const uint64_t currentTime64 = RTC_UNITS_TO_MICROSECONDS(rtc1_getCounter64()); - uint64_t timestamp64 = (currentTime64 & ~(uint64_t)0xFFFFFFFFULL) + timestamp; - if (((uint32_t)currentTime64 > 0x80000000) && (timestamp < 0x80000000)) { - timestamp64 += (uint64_t)0x100000000ULL; - } - uint32_t newCallbackTime = MICROSECONDS_TO_RTC_UNITS(timestamp64); - - /* Check for repeat setup of an existing callback. This is actually not - * important; the following code should work even without this check. */ - if (us_ticker_callbackPending && (newCallbackTime == us_ticker_callbackTimestamp)) { - return; - } - - /* Check for callbacks which are immediately (or will *very* shortly become) pending. - * Even if they are immediately pending, they are scheduled to trigger a few - * ticks later. This keeps things simple by invoking the callback from an - * independent interrupt context. */ - if ((int)(newCallbackTime - rtc1_getCounter()) <= (int)FUZZY_RTC_TICKS) { - newCallbackTime = rtc1_getCounter() + FUZZY_RTC_TICKS; - } - - NRF_RTC1->CC[0] = newCallbackTime & MAX_RTC_COUNTER_VAL; - us_ticker_callbackTimestamp = newCallbackTime; - if (!us_ticker_callbackPending) { - us_ticker_callbackPending = true; - rtc1_enableCompareInterrupt(); - } -} - -void us_ticker_disable_interrupt(void) -{ - if (us_ticker_callbackPending) { - rtc1_disableCompareInterrupt(); - us_ticker_callbackPending = false; - } -} - -void us_ticker_clear_interrupt(void) -{ - NRF_RTC1->EVENTS_OVRFLW = 0; - NRF_RTC1->EVENTS_COMPARE[0] = 0; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/gpio_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/gpio_api.c new file mode 100644 index 0000000000..f9d281ecaf --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/gpio_api.c @@ -0,0 +1,245 @@ +/* mbed Microcontroller Library + * Copyright (c) 2006-2013 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "mbed_assert.h" +#include "gpio_api.h" +#include "gpio_irq_api.h" +#include "pinmap.h" +#include "nrf_drv_gpiote.h" + + +#define GPIO_PIN_COUNT 31 + +typedef enum { + GPIO_NOT_USED = 0, + GPIO_USED = 1, + GPIO_USED_IRQ = 2, + GPIO_USED_IRQ_DISABLED = 3 +} gpio_usage_t; + +typedef struct { + bool used_as_gpio : 1; + PinDirection direction : 1; + bool init_high : 1; + PinMode pull : 2; + bool used_as_irq : 1; + bool irq_fall : 1; + bool irq_rise : 1; +} gpio_cfg_t; + +uint32_t m_gpio_initialized; +gpio_cfg_t m_gpio_cfg[GPIO_PIN_COUNT]; + + +/*********** + GPIO IRQ +***********/ + +static gpio_irq_handler m_irq_handler; +static uint32_t m_channel_ids[GPIO_PIN_COUNT] = {0}; +uint32_t m_gpio_irq_enabled; + + +static void gpiote_irq_handler(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action) +{ + nrf_gpio_pin_sense_t sense = nrf_gpio_pin_sense_get(pin); + gpio_irq_event event = (sense == NRF_GPIO_PIN_SENSE_LOW) ? IRQ_RISE : IRQ_FALL; + + if (m_gpio_irq_enabled & (1UL << pin)) { + if (((event == IRQ_RISE) && m_gpio_cfg[pin].irq_rise) + || ((event == IRQ_FALL) && m_gpio_cfg[pin].irq_fall)) { + m_irq_handler(m_channel_ids[pin], event); + } + } +} + + +void gpio_init(gpio_t *obj, PinName pin) +{ + obj->pin = pin; + if (pin == (PinName)NC) { + return; + } + MBED_ASSERT((uint32_t)pin < GPIO_PIN_COUNT); + (void) nrf_drv_gpiote_init(); + + m_gpio_cfg[obj->pin].used_as_gpio = true; +} + + +int gpio_read(gpio_t *obj) +{ + MBED_ASSERT(obj->pin != (PinName)NC); + if (m_gpio_cfg[obj->pin].direction == PIN_OUTPUT) { + return ((NRF_GPIO->OUTSET & (1UL << obj->pin)) ? 1 : 0); + } else { + return nrf_gpio_pin_read(obj->pin); + } +} + + +static void gpio_apply_config(uint8_t pin) +{ + if (m_gpio_initialized & (1UL << pin)) { + if ((m_gpio_cfg[pin].direction == PIN_OUTPUT) && (!m_gpio_cfg[pin].used_as_irq)) { + nrf_drv_gpiote_out_uninit(pin); + } + else { + nrf_drv_gpiote_in_uninit(pin); + } + } + + if (m_gpio_cfg[pin].used_as_gpio || m_gpio_cfg[pin].used_as_irq) { + if ((m_gpio_cfg[pin].direction == PIN_INPUT) + || (m_gpio_cfg[pin].used_as_irq)) { + //Configure as input. + nrf_drv_gpiote_in_config_t cfg; + + cfg.hi_accuracy = false; + cfg.is_watcher = false; + cfg.sense = NRF_GPIOTE_POLARITY_TOGGLE; + if (m_gpio_cfg[pin].used_as_irq) { + cfg.pull = NRF_GPIO_PIN_PULLUP; + nrf_drv_gpiote_in_init(pin, &cfg, gpiote_irq_handler); + if ((m_gpio_irq_enabled & (1 << pin)) + && (m_gpio_cfg[pin].irq_rise || m_gpio_cfg[pin].irq_fall)) + { + nrf_drv_gpiote_in_event_enable(pin, false); + } + } + else { + switch(m_gpio_cfg[pin].pull) { + case PullUp: + cfg.pull = NRF_GPIO_PIN_PULLUP; + break; + case PullDown: + cfg.pull = NRF_GPIO_PIN_PULLDOWN; + break; + default: + cfg.pull = NRF_GPIO_PIN_NOPULL; + break; + } + nrf_drv_gpiote_in_init(pin, &cfg, NULL); + } + } + else { + // Configure as output. + nrf_drv_gpiote_out_config_t cfg = GPIOTE_CONFIG_OUT_SIMPLE(m_gpio_cfg[pin].init_high); + nrf_drv_gpiote_out_init(pin, &cfg); + } + m_gpio_initialized |= (1UL << pin); + } + else { + m_gpio_initialized &= ~(1UL << pin); + } +} + + +void gpio_mode(gpio_t *obj, PinMode mode) +{ + MBED_ASSERT(obj->pin <= GPIO_PIN_COUNT); + m_gpio_cfg[obj->pin].pull = mode; + gpio_apply_config(obj->pin); +} + + +void gpio_dir(gpio_t *obj, PinDirection direction) +{ + MBED_ASSERT(obj->pin <= GPIO_PIN_COUNT); + m_gpio_cfg[obj->pin].direction = direction; + gpio_apply_config(obj->pin); +} + + +/*********** + GPIO IRQ +***********/ + +int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32_t id) +{ + if (pin == NC) { + return -1; + } + MBED_ASSERT((uint32_t)pin < GPIO_PIN_COUNT); + (void) nrf_drv_gpiote_init(); + + m_gpio_cfg[pin].used_as_irq = true; + m_channel_ids[pin] = id; + obj->ch = pin; + m_irq_handler = handler; + m_channel_ids[pin] = id; + + gpio_apply_config(pin); + return 1; +} + + +void gpio_irq_free(gpio_irq_t *obj) +{ + nrf_drv_gpiote_in_uninit(obj->ch); + m_gpio_cfg[obj->ch].used_as_irq = false; + m_channel_ids[obj->ch] = 0; + + gpio_apply_config(obj->ch); +} + + +void gpio_irq_set(gpio_irq_t *obj, gpio_irq_event event, uint32_t enable) +{ + bool event_enabled_before = false; + if ((m_gpio_irq_enabled & (1 << obj->ch)) + && (m_gpio_cfg[obj->ch].irq_rise || m_gpio_cfg[obj->ch].irq_fall)) { + event_enabled_before = true; + } + + if (event == IRQ_RISE) { + m_gpio_cfg[obj->ch].irq_rise = enable ? true : false; + } + else if (event == IRQ_FALL) { + m_gpio_cfg[obj->ch].irq_fall = enable ? true : false; + } + + bool event_enabled_after = false; + if ((m_gpio_irq_enabled & (1 << obj->ch)) + && (m_gpio_cfg[obj->ch].irq_rise || m_gpio_cfg[obj->ch].irq_fall)) { + event_enabled_after = true; + } + + if (event_enabled_before != event_enabled_after) { + if (event_enabled_after) { + nrf_drv_gpiote_in_event_enable(obj->ch,false); + } else { + nrf_drv_gpiote_in_event_disable(obj->ch); + } + } +} + + +void gpio_irq_enable(gpio_irq_t *obj) +{ + m_gpio_irq_enabled |= (1 << obj->ch); + if (m_gpio_cfg[obj->ch].irq_rise || m_gpio_cfg[obj->ch].irq_fall) { + nrf_drv_gpiote_in_event_enable(obj->ch, true); + } +} + + +void gpio_irq_disable(gpio_irq_t *obj) +{ + m_gpio_irq_enabled &= ~(1 << obj->ch); + if (m_gpio_cfg[obj->ch].irq_rise || m_gpio_cfg[obj->ch].irq_fall) { + nrf_drv_gpiote_in_event_enable(obj->ch, false); + } +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/gpio_object.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/gpio_object.h similarity index 74% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/gpio_object.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/gpio_object.h index fe6d6c1e05..f7b621a9ed 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/gpio_object.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/gpio_object.h @@ -18,31 +18,23 @@ #include "mbed_assert.h" +#include "nrf_gpio.h" + #ifdef __cplusplus extern "C" { #endif typedef struct { PinName pin; - uint32_t mask; - - __IO uint32_t *reg_dir; - __IO uint32_t *reg_set; - __IO uint32_t *reg_clr; - __I uint32_t *reg_in; } gpio_t; static inline void gpio_write(gpio_t *obj, int value) { MBED_ASSERT(obj->pin != (PinName)NC); - if (value) - *obj->reg_set = obj->mask; - else - *obj->reg_clr = obj->mask; -} - -static inline int gpio_read(gpio_t *obj) { - MBED_ASSERT(obj->pin != (PinName)NC); - return ((*obj->reg_in & obj->mask) ? 1 : 0); + if (value) { + nrf_gpio_pin_set(obj->pin); + } else { + nrf_gpio_pin_clear(obj->pin); + } } static inline int gpio_is_connected(const gpio_t *obj) { diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/i2c_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/i2c_api.c new file mode 100644 index 0000000000..5fc4720c5e --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/i2c_api.c @@ -0,0 +1,277 @@ +/* mbed Microcontroller Library + * Copyright (c) 2013 Nordic Semiconductor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "mbed_assert.h" +#include "mbed_error.h" +#include "i2c_api.h" +#include "nrf_drv_twi.h" +#include "app_util_platform.h" + +#if DEVICE_I2C + +#if DEVICE_I2C_ASYNCH + #define TWI_IDX(obj) ((obj)->i2c.twi_idx) +#else + #define TWI_IDX(obj) ((obj)->twi_idx) +#endif +#define TWI_INFO(obj) (&m_twi_info[TWI_IDX(obj)]) + +typedef struct { + bool initialized; + nrf_drv_twi_config_t config; + volatile bool transfer_finished; + + #if DEVICE_I2C_ASYNCH + volatile uint32_t events; + void (*handler)(void); + uint32_t event_mask; + #endif +} twi_info_t; +static twi_info_t m_twi_info[TWI_COUNT]; + +static nrf_drv_twi_t const m_twi_instances[TWI_COUNT] = { +#if TWI0_ENABLED + NRF_DRV_TWI_INSTANCE(0), +#endif +#if TWI1_ENABLED + NRF_DRV_TWI_INSTANCE(1), +#endif +}; + +static void twi_event_handler(nrf_drv_twi_evt_t const *event, void *context) +{ + twi_info_t * twi_info = TWI_INFO((i2c_t *)context); + twi_info->transfer_finished = true; + +#if DEVICE_I2C_ASYNCH + switch (event->type) { + case NRF_DRV_TWI_EVT_DONE: + twi_info->events |= I2C_EVENT_TRANSFER_COMPLETE; + break; + + case NRF_DRV_TWI_EVT_ADDRESS_NACK: + twi_info->events |= I2C_EVENT_ERROR_NO_SLAVE; + break; + + case NRF_DRV_TWI_EVT_DATA_NACK: + twi_info->events |= I2C_EVENT_ERROR; + break; + } + + if (twi_info->handler) { + twi_info->handler(); + } +#endif // DEVICE_I2C_ASYNCH +} + +static uint8_t twi_address(int i2c_address) +{ + // The TWI driver requires 7-bit slave address (without R/W bit). + return (i2c_address >> 1); +} + +void i2c_init(i2c_t *obj, PinName sda, PinName scl) +{ + int i; + for (i = 0; i < TWI_COUNT; ++i) { + if (m_twi_info[i].initialized && + m_twi_info[i].config.sda == (uint32_t)sda && + m_twi_info[i].config.scl == (uint32_t)scl) { + TWI_IDX(obj) = i; + TWI_INFO(obj)->config.frequency = NRF_TWI_FREQ_100K; + i2c_reset(obj); + return; + } + } + + nrf_drv_twi_config_t const config = { + .scl = scl, + .sda = sda, + .frequency = NRF_TWI_FREQ_100K, + .interrupt_priority = APP_IRQ_PRIORITY_LOW, + }; + + for (i = 0; i < TWI_COUNT; ++i) { + if (!m_twi_info[i].initialized) { + nrf_drv_twi_t const *twi = &m_twi_instances[i]; + ret_code_t ret_code = + nrf_drv_twi_init(twi, &config, twi_event_handler, obj); + if (ret_code == NRF_SUCCESS) { + TWI_IDX(obj) = i; + TWI_INFO(obj)->initialized = true; + TWI_INFO(obj)->config = config; + + nrf_drv_twi_enable(twi); + return; + } + } + } + + // No available peripheral + error("No available I2C"); +} + +void i2c_reset(i2c_t *obj) +{ + twi_info_t *twi_info = TWI_INFO(obj); + nrf_drv_twi_t const *twi = &m_twi_instances[TWI_IDX(obj)]; + + nrf_drv_twi_uninit(twi); + nrf_drv_twi_init(twi, &twi_info->config, twi_event_handler, obj); + nrf_drv_twi_enable(twi); +} + +int i2c_start(i2c_t *obj) +{ + (void)obj; + + return -1; // Not implemented. +} + +int i2c_stop(i2c_t *obj) +{ + (void)obj; + + return -1; // Not implemented. +} + +void i2c_frequency(i2c_t *obj, int hz) +{ + twi_info_t *twi_info = TWI_INFO(obj); + nrf_drv_twi_t const *twi = &m_twi_instances[TWI_IDX(obj)]; + + if (hz < 250000) { + twi_info->config.frequency = NRF_TWI_FREQ_100K; + } else if (hz < 400000) { + twi_info->config.frequency = NRF_TWI_FREQ_250K; + } else { + twi_info->config.frequency = NRF_TWI_FREQ_400K; + } + nrf_twi_frequency_set(twi->reg.p_twi, twi_info->config.frequency); +} + +int i2c_read(i2c_t *obj, int address, char *data, int length, int stop) +{ + (void)stop; + + twi_info_t *twi_info = TWI_INFO(obj); + nrf_drv_twi_t const *twi = &m_twi_instances[TWI_IDX(obj)]; + + twi_info->transfer_finished = false; + ret_code_t ret_code = nrf_drv_twi_rx(twi, twi_address(address), + (uint8_t *)data, length); + if (ret_code != NRF_SUCCESS) { + return 0; + } + while (!twi_info->transfer_finished) {} + return nrf_drv_twi_data_count_get(twi); +} + +int i2c_write(i2c_t *obj, int address, const char *data, int length, int stop) +{ + twi_info_t *twi_info = TWI_INFO(obj); + nrf_drv_twi_t const *twi = &m_twi_instances[TWI_IDX(obj)]; + + twi_info->transfer_finished = false; + ret_code_t ret_code = nrf_drv_twi_tx(twi, twi_address(address), + (uint8_t const *)data, length, (stop == 0)); + if (ret_code != NRF_SUCCESS) { + return 0; + } + while (!twi_info->transfer_finished) {} + return nrf_drv_twi_data_count_get(twi); +} + +int i2c_byte_read(i2c_t *obj, int last) +{ + (void)obj; + (void)last; + + return -1; // Not implemented. +} + +int i2c_byte_write(i2c_t *obj, int data) +{ + (void)obj; + (void)data; + + return -1; // Not implemented. +} + + +#if DEVICE_I2C_ASYNCH + +void i2c_transfer_asynch(i2c_t *obj, void *tx, size_t tx_length, + void *rx, size_t rx_length, uint32_t address, + uint32_t stop, uint32_t handler, + uint32_t event, DMAUsage hint) +{ + (void)stop; + (void)hint; + + if (i2c_active(obj)) { + return; + } + if ((tx_length == 0) && (rx_length == 0)) { + return; + } + + twi_info_t *twi_info = TWI_INFO(obj); + twi_info->events = 0; + twi_info->handler = (void (*)(void))handler; + twi_info->event_mask = event; + + uint8_t twi_addr = twi_address(address); + nrf_drv_twi_t const *twi = &m_twi_instances[TWI_IDX(obj)]; + + if ((tx_length > 0) && (rx_length == 0)) { + nrf_drv_twi_xfer_desc_t const xfer = + NRF_DRV_TWI_XFER_DESC_TX(twi_addr, (uint8_t *)tx, tx_length); + nrf_drv_twi_xfer(twi, &xfer, + stop ? 0 : NRF_DRV_TWI_FLAG_TX_NO_STOP); + } + else if ((tx_length == 0) && (rx_length > 0)) { + nrf_drv_twi_xfer_desc_t const xfer = + NRF_DRV_TWI_XFER_DESC_RX(twi_addr, rx, rx_length); + nrf_drv_twi_xfer(twi, &xfer, 0); + } + else if ((tx_length > 0) && (rx_length > 0)) { + nrf_drv_twi_xfer_desc_t const xfer = + NRF_DRV_TWI_XFER_DESC_TXRX(twi_addr, + (uint8_t *)tx, tx_length, rx, rx_length); + nrf_drv_twi_xfer(twi, &xfer, 0); + } +} + +uint32_t i2c_irq_handler_asynch(i2c_t *obj) +{ + twi_info_t *twi_info = TWI_INFO(obj); + return (twi_info->events & twi_info->event_mask); +} + +uint8_t i2c_active(i2c_t *obj) +{ + nrf_drv_twi_t const *twi = &m_twi_instances[TWI_IDX(obj)]; + return nrf_drv_twi_is_busy(twi); +} + +void i2c_abort_asynch(i2c_t *obj) +{ + i2c_reset(obj); +} + +#endif // DEVICE_I2C_ASYNCH + +#endif // DEVICE_I2C diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c new file mode 100644 index 0000000000..ca292114ea --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c @@ -0,0 +1,66 @@ +/* mbed Microcontroller Library + * Copyright (c) 2015 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "lp_ticker_api.h" + +#if DEVICE_LOWPOWERTIMER + +#include "rtc_common.h" +#include "sleep_api.h" + +void lp_ticker_init(void) +{ + rtc_common_init(); +} + +uint32_t lp_ticker_read(void) +{ + return rtc_common_32bit_ticks_get(); +} + +void lp_ticker_set_interrupt(uint32_t now, uint32_t time) +{ + (void)now; + // The passed 32-bit 'time' value is wrapped properly by the driver, so it + // is usable by the 24-bit counter. + ret_code_t result = nrf_drv_rtc_cc_set(&m_rtc_common, LP_TICKER_CC_CHANNEL, + time, true); + if (result != NRF_SUCCESS) + { + MBED_ASSERT(false); + } +} + +uint32_t lp_ticker_get_overflows_counter(void) +{ + // Cut out the part of 'm_rtc_common_overflows' used by + // 'rtc_common_32bit_ticks_get()'. + return (m_rtc_common_overflows >> (32 - RTC_COUNTER_BITS)); +} + +uint32_t lp_ticker_get_compare_match(void) +{ + return nrf_rtc_cc_get(m_rtc_common.p_reg, LP_TICKER_CC_CHANNEL); +} + +void lp_ticker_sleep_until(uint32_t now, uint32_t time) +{ + lp_ticker_set_interrupt(now, time); + sleep_t sleep_obj; + mbed_enter_sleep(&sleep_obj); + mbed_exit_sleep(&sleep_obj); +} + +#endif // DEVICE_LOWPOWERTIMER diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/objects.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/objects.h similarity index 72% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/objects.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/objects.h index 3c2a093dd4..88090c3cca 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/objects.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/objects.h @@ -21,29 +21,19 @@ #include "PeripheralNames.h" #include "PinNames.h" +#include "nrf_drv_spi.h" + #ifdef __cplusplus extern "C" { #endif -#define I2C_SPI_PERIPHERAL_FOR_I2C 1 -#define I2C_SPI_PERIPHERAL_FOR_SPI 2 - -typedef struct { - uint8_t usage; // I2C: 1, SPI: 2 - uint8_t sda_mosi; - uint8_t scl_miso; - uint8_t sclk; -} i2c_spi_peripheral_t; - struct serial_s { - NRF_UART_Type *uart; - int index; }; struct spi_s { - NRF_SPI_Type *spi; - NRF_SPIS_Type *spis; - uint8_t peripheral; + nrf_drv_spi_t *p_spi; + volatile bool busy; + bool async_mode; }; struct port_s { @@ -55,17 +45,14 @@ struct port_s { }; struct pwmout_s { - PWMName pwm; + PWMName pwm_name; PinName pin; + uint8_t pwm_channel; + void * pwm_struct; }; struct i2c_s { - NRF_TWI_Type *i2c; - PinName sda; - PinName scl; - int freq; - uint8_t address_set; - uint8_t peripheral; + uint8_t twi_idx; }; struct analogin_s { diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pinmap.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/pinmap.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pinmap.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/pinmap.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/port_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/port_api.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/port_api.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/port_api.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/rtc_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/rtc_api.c new file mode 100644 index 0000000000..4792335375 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/rtc_api.c @@ -0,0 +1,69 @@ +/* mbed Microcontroller Library + * Copyright (c) 2013 Nordic Semiconductor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "rtc_api.h" + +#if DEVICE_RTC + +#include "rtc_common.h" +#include "nrf_drv_clock.h" +#include "app_util_platform.h" + +static time_t m_time_base; + +void rtc_init(void) +{ + rtc_common_init(); +} + +void rtc_free(void) +{ + // A common counter is used for RTC, lp_ticker and us_ticker, so it can't be + // disabled here, but this does not cause any extra cost. Besides, currently + // this function is not used by RTC API in mbed-drivers. +} + +int rtc_isenabled(void) +{ + return m_rtc_common_enabled; +} + +static uint32_t rtc_seconds_get(void) +{ + // Convert current counter value to seconds. + uint32_t seconds = nrf_drv_rtc_counter_get(&m_rtc_common) / RTC_INPUT_FREQ; + // Add proper amount of seconds for each registered overflow of the counter. + uint32_t seconds_per_overflow = (1 << RTC_COUNTER_BITS) / RTC_INPUT_FREQ; + return (seconds + (m_rtc_common_overflows * seconds_per_overflow)); +} + +time_t rtc_read(void) +{ + return m_time_base + rtc_seconds_get(); +} + +void rtc_write(time_t t) +{ + uint32_t seconds; + do { + seconds = rtc_seconds_get(); + m_time_base = t - seconds; + // If the number of seconds indicated by the counter changed during the + // update of the time base, just repeat the update, now using the new + // number of seconds. + } while (seconds != rtc_seconds_get()); +} + +#endif // DEVICE_RTC diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pinmap.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/rtc_common.h similarity index 57% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pinmap.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/rtc_common.h index 44ca32c039..43ec5ff512 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pinmap.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/rtc_common.h @@ -1,5 +1,5 @@ /* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited + * Copyright (c) 2015 ARM Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,20 +13,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "mbed_assert.h" -#include "pinmap.h" -#include "mbed_error.h" -void pin_function(PinName pin, int function) -{ -} +#ifndef RTC_COMMON_H +#define RTC_COMMON_H -void pin_mode(PinName pin, PinMode mode) -{ - MBED_ASSERT(pin != (PinName)NC); +#include "nrf_drv_rtc.h" - uint32_t pin_number = (uint32_t)pin; +#define RTC_COUNTER_BITS 24 - NRF_GPIO->PIN_CNF[pin_number] &= ~GPIO_PIN_CNF_PULL_Msk; - NRF_GPIO->PIN_CNF[pin_number] |= (mode << GPIO_PIN_CNF_PULL_Pos); -} +#define LP_TICKER_CC_CHANNEL 0 +#define US_TICKER_CC_CHANNEL 1 + +extern nrf_drv_rtc_t const m_rtc_common; +extern bool m_rtc_common_enabled; +extern uint32_t volatile m_rtc_common_overflows; + +void rtc_common_init(void); +uint32_t rtc_common_32bit_ticks_get(void); + +#endif // RTC_COMMON_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/gpiote/nrf_drv_gpiote.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/gpiote/nrf_drv_gpiote.c new file mode 100644 index 0000000000..6dfe91a204 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/gpiote/nrf_drv_gpiote.c @@ -0,0 +1,580 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "nrf_drv_gpiote.h" +#include "nrf_drv_common.h" +#include "nrf_drv_config.h" +#include "app_util_platform.h" +#include "nrf_assert.h" + +#define FORBIDDEN_HANDLER_ADDRESS ((nrf_drv_gpiote_evt_handler_t)UINT32_MAX) +#define PIN_NOT_USED (-1) +#define PIN_USED (-2) +#define NO_CHANNELS (-1) +#define SENSE_FIELD_POS (6) +#define SENSE_FIELD_MASK (0xC0) + +/** + * @brief Macro for conveting task-event index to an address of an event register. + * + * Macro utilizes the fact that registers are grouped together in ascending order. + */ +#define TE_IDX_TO_EVENT_ADDR(idx) (nrf_gpiote_events_t)((uint32_t)NRF_GPIOTE_EVENTS_IN_0+(sizeof(uint32_t)*(idx))) + +/** + * @brief Macro for conveting task-event index to an address of a task register. + * + * Macro utilizes the fact that registers are grouped together in ascending order. + */ +#define TE_IDX_TO_TASK_ADDR(idx) (nrf_gpiote_tasks_t)((uint32_t)NRF_GPIOTE_TASKS_OUT_0+(sizeof(uint32_t)*(idx))) + +//lint -save -e661 +typedef struct +{ + nrf_drv_gpiote_evt_handler_t handlers[NUMBER_OF_GPIO_TE+GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS]; + int8_t pin_assignments[NUMBER_OF_PINS]; + int8_t port_handlers_pins[GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS]; + nrf_drv_state_t state; +} gpiote_control_block_t; + +static gpiote_control_block_t m_cb; + +__STATIC_INLINE bool pin_in_use(uint32_t pin) +{ + return (m_cb.pin_assignments[pin] != PIN_NOT_USED); +} + +__STATIC_INLINE bool pin_in_use_as_non_task_out(uint32_t pin) +{ + return (m_cb.pin_assignments[pin] == PIN_USED); +} + +__STATIC_INLINE bool pin_in_use_by_te(uint32_t pin) +{ + return (m_cb.pin_assignments[pin] >= 0 && m_cb.pin_assignments[pin] < NUMBER_OF_GPIO_TE) ? true : false; +} + +__STATIC_INLINE bool pin_in_use_by_port(uint32_t pin) +{ + return (m_cb.pin_assignments[pin] >= NUMBER_OF_GPIO_TE); +} + +__STATIC_INLINE bool pin_in_use_by_gpiote(uint32_t pin) +{ + return (m_cb.pin_assignments[pin] >= 0); +} + +__STATIC_INLINE void pin_in_use_by_te_set(uint32_t pin, + uint32_t channel_id, + nrf_drv_gpiote_evt_handler_t handler, + bool is_channel) +{ + m_cb.pin_assignments[pin] = channel_id; + m_cb.handlers[channel_id] = handler; + if (!is_channel) + { + m_cb.port_handlers_pins[channel_id-NUMBER_OF_GPIO_TE] = (int8_t)pin; + } +} + +__STATIC_INLINE void pin_in_use_set(uint32_t pin) +{ + m_cb.pin_assignments[pin] = PIN_USED; +} + +__STATIC_INLINE void pin_in_use_clear(uint32_t pin) +{ + m_cb.pin_assignments[pin] = PIN_NOT_USED; +} + +__STATIC_INLINE int8_t channel_port_get(uint32_t pin) +{ + return m_cb.pin_assignments[pin]; +} + +__STATIC_INLINE nrf_drv_gpiote_evt_handler_t channel_handler_get(uint32_t channel) +{ + return m_cb.handlers[channel]; +} + +static int8_t channel_port_alloc(uint32_t pin,nrf_drv_gpiote_evt_handler_t handler, bool channel) +{ + int8_t channel_id = NO_CHANNELS; + uint32_t i; + + uint32_t start_idx = channel ? 0 : NUMBER_OF_GPIO_TE; + uint32_t end_idx = channel ? NUMBER_OF_GPIO_TE : (NUMBER_OF_GPIO_TE+GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS); + //critical section + + for (i = start_idx; i < end_idx; i++) + { + if (m_cb.handlers[i] == FORBIDDEN_HANDLER_ADDRESS) + { + pin_in_use_by_te_set(pin, i, handler, channel); + channel_id = i; + break; + } + } + //critical section + return channel_id; +} + +static void channel_free(uint8_t channel_id) +{ + m_cb.handlers[channel_id] = FORBIDDEN_HANDLER_ADDRESS; + if (channel_id >= NUMBER_OF_GPIO_TE) + { + m_cb.port_handlers_pins[channel_id-NUMBER_OF_GPIO_TE] = (int8_t)PIN_NOT_USED; + } +} + +ret_code_t nrf_drv_gpiote_init(void) +{ + if (m_cb.state != NRF_DRV_STATE_UNINITIALIZED) + { + return NRF_ERROR_INVALID_STATE; + } + + uint8_t i; + for (i = 0; i < NUMBER_OF_PINS; i++) + { + pin_in_use_clear(i); + } + for (i = 0; i < (NUMBER_OF_GPIO_TE+GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS); i++) + { + channel_free(i); + } + + nrf_drv_common_irq_enable(GPIOTE_IRQn, GPIOTE_CONFIG_IRQ_PRIORITY); + nrf_gpiote_int_enable(GPIOTE_INTENSET_PORT_Msk); + m_cb.state = NRF_DRV_STATE_INITIALIZED; + + return NRF_SUCCESS; +} + +bool nrf_drv_gpiote_is_init(void) +{ + return (m_cb.state != NRF_DRV_STATE_UNINITIALIZED) ? true : false; +} + +void nrf_drv_gpiote_uninit(void) +{ + ASSERT(m_cb.state!=NRF_DRV_STATE_UNINITIALIZED); + + uint32_t i; + for (i = 0; i < NUMBER_OF_PINS; i++) + { + if (pin_in_use_as_non_task_out(i)) + { + nrf_drv_gpiote_out_uninit(i); + } + else if( pin_in_use_by_gpiote(i)) + { + /* Disable gpiote_in is having the same effect on out pin as gpiote_out_uninit on + * so it can be called on all pins used by GPIOTE. + */ + nrf_drv_gpiote_in_uninit(i); + } + } + m_cb.state = NRF_DRV_STATE_UNINITIALIZED; +} + +ret_code_t nrf_drv_gpiote_out_init(nrf_drv_gpiote_pin_t pin, + nrf_drv_gpiote_out_config_t const * p_config) +{ + ASSERT(pin < NUMBER_OF_PINS); + ASSERT(m_cb.state == NRF_DRV_STATE_INITIALIZED); + ASSERT(p_config); + + ret_code_t result = NRF_SUCCESS; + + if (pin_in_use(pin)) + { + result = NRF_ERROR_INVALID_STATE; + } + else + { + if (p_config->task_pin) + { + int8_t channel = channel_port_alloc(pin, NULL, true); + + if (channel != NO_CHANNELS) + { + nrf_gpiote_task_configure(channel, pin, p_config->action, p_config->init_state); + } + else + { + result = NRF_ERROR_NO_MEM; + } + } + else + { + pin_in_use_set(pin); + } + + if (result == NRF_SUCCESS) + { + if (p_config->init_state == NRF_GPIOTE_INITIAL_VALUE_HIGH) + { + nrf_gpio_pin_set(pin); + } + else + { + nrf_gpio_pin_clear(pin); + } + + nrf_gpio_cfg_output(pin); + } + } + + return result; +} + +void nrf_drv_gpiote_out_uninit(nrf_drv_gpiote_pin_t pin) +{ + ASSERT(pin < NUMBER_OF_PINS); + ASSERT(pin_in_use(pin)); + + if (pin_in_use_by_te(pin)) + { + channel_free((uint8_t)channel_port_get(pin)); + nrf_gpiote_te_default(channel_port_get(pin)); + } + pin_in_use_clear(pin); + + nrf_gpio_cfg_default(pin); +} + +void nrf_drv_gpiote_out_set(nrf_drv_gpiote_pin_t pin) +{ + ASSERT(pin < NUMBER_OF_PINS); + ASSERT(pin_in_use(pin)); + ASSERT(!pin_in_use_by_te(pin)) + + nrf_gpio_pin_set(pin); +} + +void nrf_drv_gpiote_out_clear(nrf_drv_gpiote_pin_t pin) +{ + ASSERT(pin < NUMBER_OF_PINS); + ASSERT(pin_in_use(pin)); + ASSERT(!pin_in_use_by_te(pin)) + + nrf_gpio_pin_clear(pin); +} + +void nrf_drv_gpiote_out_toggle(nrf_drv_gpiote_pin_t pin) +{ + ASSERT(pin < NUMBER_OF_PINS); + ASSERT(pin_in_use(pin)); + ASSERT(!pin_in_use_by_te(pin)) + + nrf_gpio_pin_toggle(pin); +} + +void nrf_drv_gpiote_out_task_enable(nrf_drv_gpiote_pin_t pin) +{ + ASSERT(pin < NUMBER_OF_PINS); + ASSERT(pin_in_use(pin)); + ASSERT(pin_in_use_by_te(pin)) + + nrf_gpiote_task_enable(m_cb.pin_assignments[pin]); +} + +void nrf_drv_gpiote_out_task_disable(nrf_drv_gpiote_pin_t pin) +{ + ASSERT(pin < NUMBER_OF_PINS); + ASSERT(pin_in_use(pin)); + ASSERT(pin_in_use_by_te(pin)) + + nrf_gpiote_task_disable(m_cb.pin_assignments[pin]); +} + +uint32_t nrf_drv_gpiote_out_task_addr_get(nrf_drv_gpiote_pin_t pin) +{ + ASSERT(pin < NUMBER_OF_PINS); + ASSERT(pin_in_use_by_te(pin)); + + nrf_gpiote_tasks_t task = TE_IDX_TO_TASK_ADDR(channel_port_get(pin)); + return nrf_gpiote_task_addr_get(task); +} + +void nrf_drv_gpiote_out_task_force(nrf_drv_gpiote_pin_t pin, uint8_t state) +{ + ASSERT(pin < NUMBER_OF_PINS); + ASSERT(pin_in_use(pin)); + ASSERT(pin_in_use_by_te(pin)); + + nrf_gpiote_outinit_t init_val = state ? NRF_GPIOTE_INITIAL_VALUE_HIGH : NRF_GPIOTE_INITIAL_VALUE_LOW; + nrf_gpiote_task_force(m_cb.pin_assignments[pin], init_val); +} + +void nrf_drv_gpiote_out_task_trigger(nrf_drv_gpiote_pin_t pin) +{ + ASSERT(pin < NUMBER_OF_PINS); + ASSERT(pin_in_use(pin)); + ASSERT(pin_in_use_by_te(pin)); + + nrf_gpiote_tasks_t task = TE_IDX_TO_TASK_ADDR(channel_port_get(pin));; + nrf_gpiote_task_set(task); +} + +ret_code_t nrf_drv_gpiote_in_init(nrf_drv_gpiote_pin_t pin, + nrf_drv_gpiote_in_config_t const * p_config, + nrf_drv_gpiote_evt_handler_t evt_handler) +{ + ASSERT(pin < NUMBER_OF_PINS); + ret_code_t result = NRF_SUCCESS; + /* Only one GPIOTE channel can be assigned to one physical pin. */ + if (pin_in_use_by_gpiote(pin)) + { + result = NRF_ERROR_INVALID_STATE; + } + else + { + int8_t channel = channel_port_alloc(pin, evt_handler, p_config->hi_accuracy); + if (channel != NO_CHANNELS) + { + if (p_config->is_watcher) + { + nrf_gpio_cfg_watcher(pin); + } + else + { + nrf_gpio_cfg_input(pin,p_config->pull); + } + + if (p_config->hi_accuracy) + { + nrf_gpiote_event_configure(channel, pin,p_config->sense); + } + else + { + m_cb.port_handlers_pins[channel-NUMBER_OF_GPIO_TE] |= (p_config->sense)<< SENSE_FIELD_POS; + } + } + else + { + result = NRF_ERROR_NO_MEM; + } + } + return result; +} + +void nrf_drv_gpiote_in_event_enable(nrf_drv_gpiote_pin_t pin, bool int_enable) +{ + ASSERT(pin < NUMBER_OF_PINS); + ASSERT(pin_in_use_by_gpiote(pin)); + if (pin_in_use_by_port(pin)) + { + uint8_t pin_and_sense = m_cb.port_handlers_pins[channel_port_get(pin)-NUMBER_OF_GPIO_TE]; + nrf_gpiote_polarity_t polarity = (nrf_gpiote_polarity_t)(pin_and_sense >> SENSE_FIELD_POS); + nrf_gpio_pin_sense_t sense; + if (polarity == NRF_GPIOTE_POLARITY_TOGGLE) + { + /* read current pin state and set for next sense to oposit */ + sense = (nrf_gpio_pins_read() & (1 << pin)) ? + NRF_GPIO_PIN_SENSE_LOW : NRF_GPIO_PIN_SENSE_HIGH; + } + else + { + sense = (polarity == NRF_GPIOTE_POLARITY_LOTOHI) ? + NRF_GPIO_PIN_SENSE_HIGH : NRF_GPIO_PIN_SENSE_LOW; + } + nrf_gpio_cfg_sense_set(pin,sense); + } + else if(pin_in_use_by_te(pin)) + { + int32_t channel = (int32_t)channel_port_get(pin); + nrf_gpiote_events_t event = TE_IDX_TO_EVENT_ADDR(channel); + + nrf_gpiote_event_enable(channel); + + nrf_gpiote_event_clear(event); + if (int_enable) + { + nrf_drv_gpiote_evt_handler_t handler = channel_handler_get(channel_port_get(pin)); + // Enable the interrupt only if event handler was provided. + if (handler) + { + nrf_gpiote_int_enable(1 << channel); + } + } + } +} + +void nrf_drv_gpiote_in_event_disable(nrf_drv_gpiote_pin_t pin) +{ + ASSERT(pin < NUMBER_OF_PINS); + ASSERT(pin_in_use_by_gpiote(pin)); + if (pin_in_use_by_port(pin)) + { + nrf_gpio_cfg_sense_set(pin,NRF_GPIO_PIN_NOSENSE); + } + else if(pin_in_use_by_te(pin)) + { + int32_t channel = (int32_t)channel_port_get(pin); + nrf_gpiote_event_disable(channel); + nrf_gpiote_int_disable(1 << channel); + } +} + +void nrf_drv_gpiote_in_uninit(nrf_drv_gpiote_pin_t pin) +{ + ASSERT(pin < NUMBER_OF_PINS); + ASSERT(pin_in_use_by_gpiote(pin)); + nrf_drv_gpiote_in_event_disable(pin); + if(pin_in_use_by_te(pin)) + { + nrf_gpiote_te_default(channel_port_get(pin)); + } + nrf_gpio_cfg_default(pin); + channel_free((uint8_t)channel_port_get(pin)); + pin_in_use_clear(pin); +} + +bool nrf_drv_gpiote_in_is_set(nrf_drv_gpiote_pin_t pin) +{ + ASSERT(pin < NUMBER_OF_PINS); + return nrf_gpio_pin_read(pin) ? true : false; +} + +uint32_t nrf_drv_gpiote_in_event_addr_get(nrf_drv_gpiote_pin_t pin) +{ + ASSERT(pin < NUMBER_OF_PINS); + ASSERT(pin_in_use_by_te(pin)); + + nrf_gpiote_events_t event = TE_IDX_TO_EVENT_ADDR(channel_port_get(pin)); + return nrf_gpiote_event_addr_get(event); +} + +void GPIOTE_IRQHandler(void) +{ + uint32_t status = 0; + uint32_t input = 0; + + /* collect status of all GPIOTE pin events. Processing is done once all are collected and cleared.*/ + uint32_t i; + nrf_gpiote_events_t event = NRF_GPIOTE_EVENTS_IN_0; + uint32_t mask = (uint32_t)NRF_GPIOTE_INT_IN0_MASK; + for (i = 0; i < NUMBER_OF_GPIO_TE; i++) + { + if (nrf_gpiote_event_is_set(event) && nrf_gpiote_int_is_enabled(mask)) + { + nrf_gpiote_event_clear(event); + status |= mask; + } + mask <<= 1; + /* Incrementing to next event, utilizing the fact that events are grouped together + * in ascending order. */ + event = (nrf_gpiote_events_t)((uint32_t)event + sizeof(uint32_t)); + } + + /* collect PORT status event, if event is set read pins state. Processing is postponed to the + * end of interrupt. */ + if (nrf_gpiote_event_is_set(NRF_GPIOTE_EVENTS_PORT)) + { + nrf_gpiote_event_clear(NRF_GPIOTE_EVENTS_PORT); + status |= (uint32_t)NRF_GPIOTE_INT_PORT_MASK; + input = nrf_gpio_pins_read(); + } + + /* Process pin events. */ + if (status & NRF_GPIOTE_INT_IN_MASK) + { + mask = (uint32_t)NRF_GPIOTE_INT_IN0_MASK; + for (i = 0; i < NUMBER_OF_GPIO_TE; i++) + { + if (mask & status) + { + nrf_drv_gpiote_pin_t pin = nrf_gpiote_event_pin_get(i); + nrf_gpiote_polarity_t polarity = nrf_gpiote_event_polarity_get(i); + nrf_drv_gpiote_evt_handler_t handler = channel_handler_get(i); + handler(pin,polarity); + } + mask <<= 1; + } + } + + if (status & (uint32_t)NRF_GPIOTE_INT_PORT_MASK) + { + /* Process port event. */ + uint8_t repeat = 0; + uint32_t toggle_mask = 0; + uint32_t pins_to_check = 0xFFFFFFFFuL; + + do + { + repeat = 0; + for (i = 0; i < GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS; i++) + { + uint8_t pin_and_sense = m_cb.port_handlers_pins[i]; + nrf_drv_gpiote_pin_t pin = (pin_and_sense & ~SENSE_FIELD_MASK); + + if ((m_cb.port_handlers_pins[i] != PIN_NOT_USED) + && ((1UL << pin) & pins_to_check)) + { + nrf_gpiote_polarity_t polarity = + (nrf_gpiote_polarity_t)((pin_and_sense & SENSE_FIELD_MASK) >> SENSE_FIELD_POS); + nrf_drv_gpiote_evt_handler_t handler = channel_handler_get(channel_port_get(pin)); + if (handler || polarity == NRF_GPIOTE_POLARITY_TOGGLE) + { + mask = 1 << pin; + if (polarity == NRF_GPIOTE_POLARITY_TOGGLE) + { + toggle_mask |= mask; + } + nrf_gpio_pin_sense_t sense = nrf_gpio_pin_sense_get(pin); + + if (((mask & input) && (sense==NRF_GPIO_PIN_SENSE_HIGH)) || + (!(mask & input) && (sense==NRF_GPIO_PIN_SENSE_LOW)) ) + { + if (polarity == NRF_GPIOTE_POLARITY_TOGGLE) + { + nrf_gpio_pin_sense_t next_sense = (sense == NRF_GPIO_PIN_SENSE_HIGH) ? + NRF_GPIO_PIN_SENSE_LOW : NRF_GPIO_PIN_SENSE_HIGH; + nrf_gpio_cfg_sense_set(pin, next_sense); + ++repeat; + } + if (handler) + { + handler(pin, polarity); + } + } + } + } + } + + if (repeat) + { + // When one of the pins in low-accuracy and toggle mode becomes active, + // it's sense mode is inverted to clear the internal SENSE signal. + // State of any other enabled low-accuracy input in toggle mode must be checked + // explicitly, because it does not trigger the interrput when SENSE signal is active. + // For more information about SENSE functionality, refer to Product Specification. + uint32_t new_input = nrf_gpio_pins_read(); + if (new_input == input) + { + //No change. + repeat = 0; + } + else + { + input = new_input; + pins_to_check = toggle_mask; + } + } + } + while (repeat); + } +} +//lint -restore diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/gpiote/nrf_drv_gpiote.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/gpiote/nrf_drv_gpiote.h new file mode 100644 index 0000000000..9a7fc341b1 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/gpiote/nrf_drv_gpiote.h @@ -0,0 +1,309 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef NRF_DRV_GPIOTE__ +#define NRF_DRV_GPIOTE__ + +/** + * @addtogroup nrf_gpiote GPIOTE abstraction and driver + * @ingroup nrf_drivers + * @brief GPIOTE APIs. + * @defgroup nrf_drv_gpiote GPIOTE driver + * @{ + * @ingroup nrf_gpiote + * @brief GPIOTE driver for managing input and output pins. + */ + +#include "nrf_gpiote.h" +#include "nrf_gpio.h" +#include "nrf_drv_config.h" +#include "sdk_errors.h" +#include +#include + +/**@brief Input pin configuration. */ +typedef struct +{ + nrf_gpiote_polarity_t sense; /**< Transition that triggers interrupt. */ + nrf_gpio_pin_pull_t pull; /**< Pulling mode. */ + bool is_watcher; /**< True when the input pin is tracking an output pin. */ + bool hi_accuracy;/**< True when high accuracy (IN_EVENT) is used. */ +} nrf_drv_gpiote_in_config_t; + +/**@brief Macro for configuring a pin to use a GPIO IN or PORT EVENT to detect low-to-high transition. + * @details Set hi_accu to true to use IN_EVENT. */ +#define GPIOTE_CONFIG_IN_SENSE_LOTOHI(hi_accu) \ + { \ + .is_watcher = false, \ + .hi_accuracy = hi_accu, \ + .pull = NRF_GPIO_PIN_NOPULL, \ + .sense = NRF_GPIOTE_POLARITY_LOTOHI, \ + } + +/**@brief Macro for configuring a pin to use a GPIO IN or PORT EVENT to detect high-to-low transition. + * @details Set hi_accu to true to use IN_EVENT. */ +#define GPIOTE_CONFIG_IN_SENSE_HITOLO(hi_accu) \ + { \ + .is_watcher = false, \ + .hi_accuracy = hi_accu, \ + .pull = NRF_GPIO_PIN_NOPULL, \ + .sense = NRF_GPIOTE_POLARITY_HITOLO, \ + } + +/**@brief Macro for configuring a pin to use a GPIO IN or PORT EVENT to detect any change on the pin. + * @details Set hi_accu to true to use IN_EVENT.*/ +#define GPIOTE_CONFIG_IN_SENSE_TOGGLE(hi_accu) \ + { \ + .is_watcher = false, \ + .hi_accuracy = hi_accu, \ + .pull = NRF_GPIO_PIN_NOPULL, \ + .sense = NRF_GPIOTE_POLARITY_TOGGLE, \ + } + +/**@brief Output pin configuration. */ +typedef struct +{ + nrf_gpiote_polarity_t action; /**< Configuration of the pin task. */ + nrf_gpiote_outinit_t init_state; /**< Initial state of the output pin. */ + bool task_pin; /**< True if the pin is controlled by a GPIOTE task. */ +} nrf_drv_gpiote_out_config_t; + +/**@brief Macro for configuring a pin to use as output. GPIOTE is not used for the pin. */ +#define GPIOTE_CONFIG_OUT_SIMPLE(init_high) \ + { \ + .init_state = init_high ? NRF_GPIOTE_INITIAL_VALUE_HIGH : NRF_GPIOTE_INITIAL_VALUE_LOW, \ + .task_pin = false, \ + } + +/**@brief Macro for configuring a pin to use the GPIO OUT TASK to change the state from high to low. + * @details The task will clear the pin. Therefore, the pin is set initially. */ +#define GPIOTE_CONFIG_OUT_TASK_LOW \ + { \ + .init_state = NRF_GPIOTE_INITIAL_VALUE_HIGH, \ + .task_pin = true, \ + .action = NRF_GPIOTE_POLARITY_HITOLO, \ + } + +/**@brief Macro for configuring a pin to use the GPIO OUT TASK to change the state from low to high. + * @details The task will set the pin. Therefore, the pin is cleared initially. */ +#define GPIOTE_CONFIG_OUT_TASK_HIGH \ + { \ + .init_state = NRF_GPIOTE_INITIAL_VALUE_LOW, \ + .task_pin = true, \ + .action = NRF_GPIOTE_POLARITY_LOTOHI, \ + } + +/**@brief Macro for configuring a pin to use the GPIO OUT TASK to toggle the pin state. + * @details The initial pin state must be provided. */ +#define GPIOTE_CONFIG_OUT_TASK_TOGGLE(init_high) \ + { \ + .init_state = init_high ? NRF_GPIOTE_INITIAL_VALUE_HIGH : NRF_GPIOTE_INITIAL_VALUE_LOW, \ + .task_pin = true, \ + .action = NRF_GPIOTE_POLARITY_TOGGLE, \ + } + +/** @brief Pin. */ +typedef uint32_t nrf_drv_gpiote_pin_t; + +/** + * @brief Pin event handler prototype. + * @param pin Pin that triggered this event. + * @param action Action that lead to triggering this event. + */ +typedef void (*nrf_drv_gpiote_evt_handler_t)(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action); + +/** + * @brief Function for initializing the GPIOTE module. + * + * @details Only static configuration is supported to prevent the shared + * resource being customized by the initiator. + * + * @retval NRF_SUCCESS If initialization was successful. + * @retval NRF_ERROR_INVALID_STATE If the driver was already initialized. + */ +ret_code_t nrf_drv_gpiote_init(void); + +/** + * @brief Function for checking if the GPIOTE module is initialized. + * + * @details The GPIOTE module is a shared module. Therefore, you should check if + * the module is already initialized and skip initialization if it is. + * + * @retval true If the module is already initialized. + * @retval false If the module is not initialized. + */ +bool nrf_drv_gpiote_is_init(void); + +/** + * @brief Function for uninitializing the GPIOTE module. + */ +void nrf_drv_gpiote_uninit(void); + +/** + * @brief Function for initializing a GPIOTE output pin. + * @details The output pin can be controlled by the CPU or by PPI. The initial + * configuration specifies which mode is used. If PPI mode is used, the driver + * attempts to allocate one of the available GPIOTE channels. If no channel is + * available, an error is returned. + * + * @param[in] pin Pin. + * @param[in] p_config Initial configuration. + * + * @retval NRF_SUCCESS If initialization was successful. + * @retval NRF_ERROR_INVALID_STATE If the driver is not initialized or the pin is already used. + * @retval NRF_ERROR_NO_MEM If no GPIOTE channel is available. + */ +ret_code_t nrf_drv_gpiote_out_init(nrf_drv_gpiote_pin_t pin, + nrf_drv_gpiote_out_config_t const * p_config); + +/** + * @brief Function for uninitializing a GPIOTE output pin. + * @details The driver frees the GPIOTE channel if the output pin was using one. + * + * @param[in] pin Pin. + */ +void nrf_drv_gpiote_out_uninit(nrf_drv_gpiote_pin_t pin); + +/** + * @brief Function for setting a GPIOTE output pin. + * + * @param[in] pin Pin. + */ +void nrf_drv_gpiote_out_set(nrf_drv_gpiote_pin_t pin); + +/** + * @brief Function for clearing a GPIOTE output pin. + * + * @param[in] pin Pin. + */ +void nrf_drv_gpiote_out_clear(nrf_drv_gpiote_pin_t pin); + +/** + * @brief Function for toggling a GPIOTE output pin. + * + * @param[in] pin Pin. + */ +void nrf_drv_gpiote_out_toggle(nrf_drv_gpiote_pin_t pin); + +/** + * @brief Function for enabling a GPIOTE output pin task. + * + * @param[in] pin Pin. + */ +void nrf_drv_gpiote_out_task_enable(nrf_drv_gpiote_pin_t pin); + +/** + * @brief Function for disabling a GPIOTE output pin task. + * + * @param[in] pin Pin. + */ +void nrf_drv_gpiote_out_task_disable(nrf_drv_gpiote_pin_t pin); + +/** + * @brief Function for getting the address of a configurable GPIOTE task. + * + * @param[in] pin Pin. + */ +uint32_t nrf_drv_gpiote_out_task_addr_get(nrf_drv_gpiote_pin_t pin); + +/** + * @brief Function for initializing a GPIOTE input pin. + * @details The input pin can act in two ways: + * - lower accuracy but low power (high frequency clock not needed) + * - higher accuracy (high frequency clock required) + * + * The initial configuration specifies which mode is used. + * If high-accuracy mode is used, the driver attempts to allocate one + * of the available GPIOTE channels. If no channel is + * available, an error is returned. + * In low accuracy mode SENSE feature is used. In this case only one active pin + * can be detected at a time. It can be worked around by setting all of the used + * low accuracy pins to toggle mode. + * For more information about SENSE functionality, refer to Product Specification. + * + * @param[in] pin Pin. + * @param[in] p_config Initial configuration. + * @param[in] evt_handler User function to be called when the configured transition occurs. + * + * @retval NRF_SUCCESS If initialization was successful. + * @retval NRF_ERROR_INVALID_STATE If the driver is not initialized or the pin is already used. + * @retval NRF_ERROR_NO_MEM If no GPIOTE channel is available. + */ +ret_code_t nrf_drv_gpiote_in_init(nrf_drv_gpiote_pin_t pin, + nrf_drv_gpiote_in_config_t const * p_config, + nrf_drv_gpiote_evt_handler_t evt_handler); + +/** + * @brief Function for uninitializing a GPIOTE input pin. + * @details The driver frees the GPIOTE channel if the input pin was using one. + * + * @param[in] pin Pin. + */ +void nrf_drv_gpiote_in_uninit(nrf_drv_gpiote_pin_t pin); + +/** + * @brief Function for enabling sensing of a GPIOTE input pin. + * + * @details If the input pin is configured as high-accuracy pin, the function + * enables an IN_EVENT. Otherwise, the function enables the GPIO sense mechanism. + * Note that a PORT event is shared between multiple pins, therefore the + * interrupt is always enabled. + * + * @param[in] pin Pin. + * @param[in] int_enable True to enable the interrupt. Always valid for a high-accuracy pin. + */ +void nrf_drv_gpiote_in_event_enable(nrf_drv_gpiote_pin_t pin, bool int_enable); + +/** + * @brief Function for disabling a GPIOTE input pin. + * + * @param[in] pin Pin. + */ +void nrf_drv_gpiote_in_event_disable(nrf_drv_gpiote_pin_t pin); + +/** + * @brief Function for checking if a GPIOTE input pin is set. + * + * @param[in] pin Pin. + * @retval true If the input pin is set. + * @retval false If the input pin is not set. + */ +bool nrf_drv_gpiote_in_is_set(nrf_drv_gpiote_pin_t pin); + +/** + * @brief Function for getting the address of a GPIOTE input pin event. + * @details If the pin is configured to use low-accuracy mode, the address of the PORT event is returned. + * + * @param[in] pin Pin. + */ +uint32_t nrf_drv_gpiote_in_event_addr_get(nrf_drv_gpiote_pin_t pin); + +/** + * @brief Function for forcing a specific state on the pin configured as task. + * + * @param[in] pin Pin. + * @param[in] state Pin state. + */ +void nrf_drv_gpiote_out_task_force(nrf_drv_gpiote_pin_t pin, uint8_t state); + +/** + * @brief Function for triggering the task manually. + * + * @param[in] pin Pin. + */ +void nrf_drv_gpiote_out_task_trigger(nrf_drv_gpiote_pin_t pin); + +/** + *@} + **/ + +#endif //NRF_DRV_GPIOTE__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ppi.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ppi.h new file mode 100644 index 0000000000..f7fcf47fde --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ppi.h @@ -0,0 +1,402 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef NRF_PPI_H__ +#define NRF_PPI_H__ + +#include +#include "nrf.h" + +/** + * @defgroup nrf_ppi_hal PPI HAL + * @{ + * @ingroup nrf_ppi + * @brief Hardware access layer for setting up Programmable Peripheral Interconnect (PPI) channels. + */ + +#define NRF_PPI_TASK_SET (1UL) + +/** + * @enum nrf_ppi_channel_t + * @brief PPI channels. + */ +typedef enum +{ + NRF_PPI_CHANNEL0 = PPI_CHEN_CH0_Pos, /**< Channel 0. */ + NRF_PPI_CHANNEL1 = PPI_CHEN_CH1_Pos, /**< Channel 1. */ + NRF_PPI_CHANNEL2 = PPI_CHEN_CH2_Pos, /**< Channel 2. */ + NRF_PPI_CHANNEL3 = PPI_CHEN_CH3_Pos, /**< Channel 3. */ + NRF_PPI_CHANNEL4 = PPI_CHEN_CH4_Pos, /**< Channel 4. */ + NRF_PPI_CHANNEL5 = PPI_CHEN_CH5_Pos, /**< Channel 5. */ + NRF_PPI_CHANNEL6 = PPI_CHEN_CH6_Pos, /**< Channel 6. */ + NRF_PPI_CHANNEL7 = PPI_CHEN_CH7_Pos, /**< Channel 7. */ + NRF_PPI_CHANNEL8 = PPI_CHEN_CH8_Pos, /**< Channel 8. */ + NRF_PPI_CHANNEL9 = PPI_CHEN_CH9_Pos, /**< Channel 9. */ + NRF_PPI_CHANNEL10 = PPI_CHEN_CH10_Pos, /**< Channel 10. */ + NRF_PPI_CHANNEL11 = PPI_CHEN_CH11_Pos, /**< Channel 11. */ + NRF_PPI_CHANNEL12 = PPI_CHEN_CH12_Pos, /**< Channel 12. */ + NRF_PPI_CHANNEL13 = PPI_CHEN_CH13_Pos, /**< Channel 13. */ + NRF_PPI_CHANNEL14 = PPI_CHEN_CH14_Pos, /**< Channel 14. */ + NRF_PPI_CHANNEL15 = PPI_CHEN_CH15_Pos, /**< Channel 15. */ +#ifdef NRF52 + NRF_PPI_CHANNEL16 = PPI_CHEN_CH16_Pos, /**< Channel 16. */ + NRF_PPI_CHANNEL17 = PPI_CHEN_CH17_Pos, /**< Channel 17. */ + NRF_PPI_CHANNEL18 = PPI_CHEN_CH18_Pos, /**< Channel 18. */ + NRF_PPI_CHANNEL19 = PPI_CHEN_CH19_Pos, /**< Channel 19. */ +#endif + NRF_PPI_CHANNEL20 = PPI_CHEN_CH20_Pos, /**< Channel 20. */ + NRF_PPI_CHANNEL21 = PPI_CHEN_CH21_Pos, /**< Channel 21. */ + NRF_PPI_CHANNEL22 = PPI_CHEN_CH22_Pos, /**< Channel 22. */ + NRF_PPI_CHANNEL23 = PPI_CHEN_CH23_Pos, /**< Channel 23. */ + NRF_PPI_CHANNEL24 = PPI_CHEN_CH24_Pos, /**< Channel 24. */ + NRF_PPI_CHANNEL25 = PPI_CHEN_CH25_Pos, /**< Channel 25. */ + NRF_PPI_CHANNEL26 = PPI_CHEN_CH26_Pos, /**< Channel 26. */ + NRF_PPI_CHANNEL27 = PPI_CHEN_CH27_Pos, /**< Channel 27. */ + NRF_PPI_CHANNEL28 = PPI_CHEN_CH28_Pos, /**< Channel 28. */ + NRF_PPI_CHANNEL29 = PPI_CHEN_CH29_Pos, /**< Channel 29. */ + NRF_PPI_CHANNEL30 = PPI_CHEN_CH30_Pos, /**< Channel 30. */ + NRF_PPI_CHANNEL31 = PPI_CHEN_CH31_Pos /**< Channel 31. */ +} nrf_ppi_channel_t; + +/** + * @enum nrf_ppi_channel_group_t + * @brief PPI channel groups. + */ +typedef enum +{ + NRF_PPI_CHANNEL_GROUP0 = 0, /**< Channel group 0. */ + NRF_PPI_CHANNEL_GROUP1 = 1, /**< Channel group 1. */ + NRF_PPI_CHANNEL_GROUP2 = 2, /**< Channel group 2. */ + NRF_PPI_CHANNEL_GROUP3 = 3, /**< Channel group 3. */ +#ifdef NRF52 + NRF_PPI_CHANNEL_GROUP4 = 4, /**< Channel group 4. */ + NRF_PPI_CHANNEL_GROUP5 = 5 /**< Channel group 5. */ +#endif +} nrf_ppi_channel_group_t; + +/** + * @enum nrf_ppi_channel_include_t + * @brief Definition of which PPI channels belong to a group. + */ +typedef enum +{ + NRF_PPI_CHANNEL_EXCLUDE = PPI_CHG_CH0_Excluded, /**< Channel excluded from a group. */ + NRF_PPI_CHANNEL_INCLUDE = PPI_CHG_CH0_Included /**< Channel included in a group. */ +} nrf_ppi_channel_include_t; + +/** + * @enum nrf_ppi_channel_enable_t + * @brief Definition if a PPI channel is enabled. + */ +typedef enum +{ + NRF_PPI_CHANNEL_DISABLED = PPI_CHEN_CH0_Disabled, /**< Channel disabled. */ + NRF_PPI_CHANNEL_ENABLED = PPI_CHEN_CH0_Enabled /**< Channel enabled. */ +} nrf_ppi_channel_enable_t; + +/** + * @enum nrf_ppi_task_t + * @brief PPI tasks. + */ +typedef enum +{ + /*lint -save -e30 -esym(628,__INTADDR__)*/ + NRF_PPI_TASK_CHG0_EN = offsetof(NRF_PPI_Type, TASKS_CHG[0].EN), /**< Task for enabling channel group 0 */ + NRF_PPI_TASK_CHG0_DIS = offsetof(NRF_PPI_Type, TASKS_CHG[0].DIS), /**< Task for disabling channel group 0 */ + NRF_PPI_TASK_CHG1_EN = offsetof(NRF_PPI_Type, TASKS_CHG[1].EN), /**< Task for enabling channel group 1 */ + NRF_PPI_TASK_CHG1_DIS = offsetof(NRF_PPI_Type, TASKS_CHG[1].DIS), /**< Task for disabling channel group 1 */ + NRF_PPI_TASK_CHG2_EN = offsetof(NRF_PPI_Type, TASKS_CHG[2].EN), /**< Task for enabling channel group 2 */ + NRF_PPI_TASK_CHG2_DIS = offsetof(NRF_PPI_Type, TASKS_CHG[2].DIS), /**< Task for disabling channel group 2 */ + NRF_PPI_TASK_CHG3_EN = offsetof(NRF_PPI_Type, TASKS_CHG[3].EN), /**< Task for enabling channel group 3 */ + NRF_PPI_TASK_CHG3_DIS = offsetof(NRF_PPI_Type, TASKS_CHG[3].DIS), /**< Task for disabling channel group 3 */ +#ifdef NRF52 + NRF_PPI_TASK_CHG4_EN = offsetof(NRF_PPI_Type, TASKS_CHG[4].EN), /**< Task for enabling channel group 4 */ + NRF_PPI_TASK_CHG4_DIS = offsetof(NRF_PPI_Type, TASKS_CHG[4].DIS), /**< Task for disabling channel group 4 */ + NRF_PPI_TASK_CHG5_EN = offsetof(NRF_PPI_Type, TASKS_CHG[5].EN), /**< Task for enabling channel group 5 */ + NRF_PPI_TASK_CHG5_DIS = offsetof(NRF_PPI_Type, TASKS_CHG[5].DIS) /**< Task for disabling channel group 5 */ +#endif + /*lint -restore*/ +} nrf_ppi_task_t; + +/** + * @brief Function for enabling a given PPI channel. + * + * @details This function enables only one channel. + * + * @param[in] channel Channel to enable. + * + * */ +__STATIC_INLINE void nrf_ppi_channel_enable(nrf_ppi_channel_t channel) +{ + NRF_PPI->CHENSET = PPI_CHENSET_CH0_Set << ((uint32_t) channel); +} + + +/** + * @brief Function for disabling a given PPI channel. + * + * @details This function disables only one channel. + * + * @param[in] channel Channel to disable. + */ +__STATIC_INLINE void nrf_ppi_channel_disable(nrf_ppi_channel_t channel) +{ + NRF_PPI->CHENCLR = PPI_CHENCLR_CH0_Clear << ((uint32_t) channel); +} + + +/** + * @brief Function for checking if a given PPI channel is enabled. + * + * @details This function checks only one channel. + * + * @param[in] channel Channel to check. + * + * @retval NRF_PPI_CHANNEL_ENABLED If the channel is enabled. + * @retval NRF_PPI_CHANNEL_DISABLED If the channel is not enabled. + * + */ +__STATIC_INLINE nrf_ppi_channel_enable_t nrf_ppi_channel_enable_get(nrf_ppi_channel_t channel) +{ + if (NRF_PPI->CHEN & (PPI_CHEN_CH0_Msk << ((uint32_t) channel))) + { + return NRF_PPI_CHANNEL_ENABLED; + } + else + { + return NRF_PPI_CHANNEL_DISABLED; + } +} + + +/** + * @brief Function for disabling all PPI channels. + */ +__STATIC_INLINE void nrf_ppi_channel_disable_all(void) +{ + NRF_PPI->CHENCLR = ((uint32_t)0xFFFFFFFFuL); +} + +/** + * @brief Function for disabling multiple PPI channels. + * + * @param[in] mask Channel mask. + */ +__STATIC_INLINE void nrf_ppi_channels_disable(uint32_t mask) +{ + NRF_PPI->CHENCLR = mask; +} + +/** + * @brief Function for setting up event and task endpoints for a given PPI channel. + * + * @param[in] eep Event register address. + * + * @param[in] tep Task register address. + * + * @param[in] channel Channel to which the given endpoints are assigned. + */ +__STATIC_INLINE void nrf_ppi_channel_endpoint_setup(nrf_ppi_channel_t channel, + uint32_t eep, + uint32_t tep) +{ + NRF_PPI->CH[(uint32_t) channel].EEP = eep; + NRF_PPI->CH[(uint32_t) channel].TEP = tep; +} + +#ifdef NRF52 +/** + * @brief Function for setting up task endpoint for a given PPI fork. + * + * @param[in] fork_tep Task register address. + * + * @param[in] channel Channel to which the given fork endpoint is assigned. + */ +__STATIC_INLINE void nrf_ppi_fork_endpoint_setup(nrf_ppi_channel_t channel, + uint32_t fork_tep) +{ + NRF_PPI->FORK[(uint32_t) channel].TEP = fork_tep; +} + +/** + * @brief Function for setting up event and task endpoints for a given PPI channel and fork. + * + * @param[in] eep Event register address. + * + * @param[in] tep Task register address. + * + * @param[in] fork_tep Fork task register address (register value). + * + * @param[in] channel Channel to which the given endpoints are assigned. + */ +__STATIC_INLINE void nrf_ppi_channel_and_fork_endpoint_setup(nrf_ppi_channel_t channel, + uint32_t eep, + uint32_t tep, + uint32_t fork_tep) +{ + nrf_ppi_channel_endpoint_setup(channel, eep, tep); + nrf_ppi_fork_endpoint_setup(channel, fork_tep); +} +#endif + +/** + * @brief Function for including a PPI channel in a channel group. + * + * @details This function adds only one channel to the group. + * + * @param[in] channel Channel to be included in the group. + * + * @param[in] channel_group Channel group. + * + */ +__STATIC_INLINE void nrf_ppi_channel_include_in_group(nrf_ppi_channel_t channel, + nrf_ppi_channel_group_t channel_group) +{ + NRF_PPI->CHG[(uint32_t) channel_group] = + NRF_PPI->CHG[(uint32_t) channel_group] | (PPI_CHG_CH0_Included << ((uint32_t) channel)); +} + +/** + * @brief Function for including multiple PPI channels in a channel group. + * + * @details This function adds all specified channels to the group. + * + * @param[in] channel_mask Channels to be included in the group. + * + * @param[in] channel_group Channel group. + * + */ +__STATIC_INLINE void nrf_ppi_channels_include_in_group(uint32_t channel_mask, + nrf_ppi_channel_group_t channel_group) +{ + NRF_PPI->CHG[(uint32_t) channel_group] = + NRF_PPI->CHG[(uint32_t) channel_group] | (channel_mask); +} + + +/** + * @brief Function for removing a PPI channel from a channel group. + * + * @details This function removes only one channel from the group. + * + * @param[in] channel Channel to be removed from the group. + * + * @param[in] channel_group Channel group. + */ +__STATIC_INLINE void nrf_ppi_channel_remove_from_group(nrf_ppi_channel_t channel, + nrf_ppi_channel_group_t channel_group) +{ + NRF_PPI->CHG[(uint32_t) channel_group] = + NRF_PPI->CHG[(uint32_t) channel_group] & ~(PPI_CHG_CH0_Included << ((uint32_t) channel)); +} + +/** + * @brief Function for removing multiple PPI channels from a channel group. + * + * @details This function removes all specified channels from the group. + * + * @param[in] channel_mask Channels to be removed from the group. + * + * @param[in] channel_group Channel group. + */ +__STATIC_INLINE void nrf_ppi_channels_remove_from_group(uint32_t channel_mask, + nrf_ppi_channel_group_t channel_group) +{ + NRF_PPI->CHG[(uint32_t) channel_group] = + NRF_PPI->CHG[(uint32_t) channel_group] & ~(channel_mask); +} + + +/** + * @brief Function for removing all PPI channels from a channel group. + * + * @param[in] group Channel group. + * + */ +__STATIC_INLINE void nrf_ppi_channel_group_clear(nrf_ppi_channel_group_t group) +{ + NRF_PPI->CHG[(uint32_t) group] = 0; +} + + +/** + * @brief Function for enabling a channel group. + * + * @param[in] group Channel group. + * + */ +__STATIC_INLINE void nrf_ppi_group_enable(nrf_ppi_channel_group_t group) +{ + NRF_PPI->TASKS_CHG[(uint32_t) group].EN = NRF_PPI_TASK_SET; +} + + +/** + * @brief Function for disabling a channel group. + * + * @param[in] group Channel group. + * + */ +__STATIC_INLINE void nrf_ppi_group_disable(nrf_ppi_channel_group_t group) +{ + NRF_PPI->TASKS_CHG[(uint32_t) group].DIS = NRF_PPI_TASK_SET; +} + + +/** + * @brief Function for setting a PPI task. + * + * @param[in] ppi_task PPI task to set. + */ +__STATIC_INLINE void nrf_ppi_task_trigger(nrf_ppi_task_t ppi_task) +{ + *((volatile uint32_t *) ((uint8_t *) NRF_PPI_BASE + (uint32_t) ppi_task)) = NRF_PPI_TASK_SET; +} + + +/** + * @brief Function for returning the address of a specific PPI task register. + * + * @param[in] ppi_task PPI task. + */ +__STATIC_INLINE uint32_t * nrf_ppi_task_address_get(nrf_ppi_task_t ppi_task) +{ + return (uint32_t *) ((uint8_t *) NRF_PPI_BASE + (uint32_t) ppi_task); +} + +/** + * @brief Function for returning the PPI enable task address of a specific group. + * + * @param[in] group PPI group. + */ +__STATIC_INLINE uint32_t * nrf_ppi_task_group_enable_address_get(nrf_ppi_channel_group_t group) +{ + return (uint32_t *) &NRF_PPI->TASKS_CHG[(uint32_t) group].EN; +} + +/** + * @brief Function for returning the PPI disable task address of a specific group. + * + * @param[in] group PPI group. + */ +__STATIC_INLINE uint32_t * nrf_ppi_task_group_disable_address_get(nrf_ppi_channel_group_t group) +{ + return (uint32_t *) &NRF_PPI->TASKS_CHG[(uint32_t) group].DIS; +} + + +/** + *@} + **/ + +/*lint --flb "Leave library region" */ +#endif // NRF_PPI_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_rtc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_rtc.h new file mode 100644 index 0000000000..32e4d2f178 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_rtc.h @@ -0,0 +1,304 @@ +/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** + * @file + * @brief RTC HAL API. + */ + +#ifndef NRF_RTC_H +#define NRF_RTC_H + +/** + * @defgroup nrf_rtc_hal RTC HAL + * @{ + * @ingroup nrf_rtc + * @brief Hardware access layer for managing the real time counter (RTC). + */ + +#include +#include +#include +#include "nrf.h" +#include "nrf_assert.h" + +/** + * @brief Macro for getting the number of compare channels available + * in a given RTC instance. + */ +#ifdef NRF51 + #define NRF_RTC_CC_CHANNEL_COUNT(id) 4 +#else + #define NRF_RTC_CC_CHANNEL_COUNT(id) ((id) == 0 ? 3 : 4) +#endif + +#define RTC_INPUT_FREQ 32768 /**< Input frequency of the RTC instance. */ + +/**< Macro for wrapping values to RTC capacity. */ +#define RTC_WRAP(val) (val & RTC_COUNTER_COUNTER_Msk) + +#define RTC_CHANNEL_INT_MASK(ch) ((uint32_t)NRF_RTC_INT_COMPARE0_MASK << ch) +#define RTC_CHANNEL_EVENT_ADDR(ch) (nrf_rtc_event_t)(NRF_RTC_EVENT_COMPARE_0 + ch*sizeof(uint32_t)) +/** + * @enum nrf_rtc_task_t + * @brief RTC tasks. + */ +typedef enum +{ + /*lint -save -e30*/ + NRF_RTC_TASK_START = offsetof(NRF_RTC_Type,TASKS_START), /**< Start. */ + NRF_RTC_TASK_STOP = offsetof(NRF_RTC_Type,TASKS_STOP), /**< Stop. */ + NRF_RTC_TASK_CLEAR = offsetof(NRF_RTC_Type,TASKS_CLEAR), /**< Clear. */ + NRF_RTC_TASK_TRIGGER_OVERFLOW = offsetof(NRF_RTC_Type,TASKS_TRIGOVRFLW),/**< Trigger overflow. */ + /*lint -restore*/ +} nrf_rtc_task_t; + +/** + * @enum nrf_rtc_event_t + * @brief RTC events. + */ +typedef enum +{ + /*lint -save -e30*/ + NRF_RTC_EVENT_TICK = offsetof(NRF_RTC_Type,EVENTS_TICK), /**< Tick event. */ + NRF_RTC_EVENT_OVERFLOW = offsetof(NRF_RTC_Type,EVENTS_OVRFLW), /**< Overflow event. */ + NRF_RTC_EVENT_COMPARE_0 = offsetof(NRF_RTC_Type,EVENTS_COMPARE[0]), /**< Compare 0 event. */ + NRF_RTC_EVENT_COMPARE_1 = offsetof(NRF_RTC_Type,EVENTS_COMPARE[1]), /**< Compare 1 event. */ + NRF_RTC_EVENT_COMPARE_2 = offsetof(NRF_RTC_Type,EVENTS_COMPARE[2]), /**< Compare 2 event. */ + NRF_RTC_EVENT_COMPARE_3 = offsetof(NRF_RTC_Type,EVENTS_COMPARE[3]) /**< Compare 3 event. */ + /*lint -restore*/ +} nrf_rtc_event_t; + +/** + * @enum nrf_rtc_int_t + * @brief RTC interrupts. + */ +typedef enum +{ + NRF_RTC_INT_TICK_MASK = RTC_INTENSET_TICK_Msk, /**< RTC interrupt from tick event. */ + NRF_RTC_INT_OVERFLOW_MASK = RTC_INTENSET_OVRFLW_Msk, /**< RTC interrupt from overflow event. */ + NRF_RTC_INT_COMPARE0_MASK = RTC_INTENSET_COMPARE0_Msk, /**< RTC interrupt from compare event on channel 0. */ + NRF_RTC_INT_COMPARE1_MASK = RTC_INTENSET_COMPARE1_Msk, /**< RTC interrupt from compare event on channel 1. */ + NRF_RTC_INT_COMPARE2_MASK = RTC_INTENSET_COMPARE2_Msk, /**< RTC interrupt from compare event on channel 2. */ + NRF_RTC_INT_COMPARE3_MASK = RTC_INTENSET_COMPARE3_Msk /**< RTC interrupt from compare event on channel 3. */ +} nrf_rtc_int_t; + +/**@brief Function for setting a compare value for a channel. + * + * @param[in] p_rtc Pointer to the instance register structure. + * @param[in] ch Channel. + * @param[in] cc_val Compare value to set. + */ +__STATIC_INLINE void nrf_rtc_cc_set(NRF_RTC_Type * p_rtc, uint32_t ch, uint32_t cc_val); + +/**@brief Function for returning the compare value for a channel. + * + * @param[in] p_rtc Pointer to the instance register structure. + * @param[in] ch Channel. + * + * @return COMPARE[ch] value. + */ +__STATIC_INLINE uint32_t nrf_rtc_cc_get(NRF_RTC_Type * p_rtc, uint32_t ch); + +/**@brief Function for enabling interrupts. + * + * @param[in] p_rtc Pointer to the instance register structure. + * @param[in] mask Interrupt mask to be enabled. + */ +__STATIC_INLINE void nrf_rtc_int_enable(NRF_RTC_Type * p_rtc, uint32_t mask); + +/**@brief Function for disabling interrupts. + * + * @param[in] p_rtc Pointer to the instance register structure. + * @param[in] mask Interrupt mask to be disabled. + */ +__STATIC_INLINE void nrf_rtc_int_disable(NRF_RTC_Type * p_rtc, uint32_t mask); + +/**@brief Function for checking if interrupts are enabled. + * + * @param[in] p_rtc Pointer to the instance register structure. + * @param[in] mask Mask of interrupt flags to check. + * + * @return Mask with enabled interrupts. + */ +__STATIC_INLINE uint32_t nrf_rtc_int_is_enabled(NRF_RTC_Type * p_rtc, uint32_t mask); + +/**@brief Function for returning the status of currently enabled interrupts. + * + * @param[in] p_rtc Pointer to the instance register structure. + * + * @return Value in INTEN register. + */ +__STATIC_INLINE uint32_t nrf_rtc_int_get(NRF_RTC_Type * p_rtc); + +/**@brief Function for checking if an event is pending. + * + * @param[in] p_rtc Pointer to the instance register structure. + * @param[in] event Address of the event. + * + * @return Mask of pending events. + */ +__STATIC_INLINE uint32_t nrf_rtc_event_pending(NRF_RTC_Type * p_rtc, nrf_rtc_event_t event); + +/**@brief Function for clearing an event. + * + * @param[in] p_rtc Pointer to the instance register structure. + * @param[in] event Event to clear. + */ +__STATIC_INLINE void nrf_rtc_event_clear(NRF_RTC_Type * p_rtc, nrf_rtc_event_t event); + +/**@brief Function for returning a counter value. + * + * @param[in] p_rtc Pointer to the instance register structure. + * + * @return Counter value. + */ +__STATIC_INLINE uint32_t nrf_rtc_counter_get(NRF_RTC_Type * p_rtc); + +/**@brief Function for setting a prescaler value. + * + * @param[in] p_rtc Pointer to the instance register structure. + * @param[in] val Value to set the prescaler to. + */ +__STATIC_INLINE void nrf_rtc_prescaler_set(NRF_RTC_Type * p_rtc, uint32_t val); + +/**@brief Function for returning the address of an event. + * + * @param[in] p_rtc Pointer to the instance register structure. + * @param[in] event Requested event. + * + * @return Address of the requested event register. + */ +__STATIC_INLINE uint32_t nrf_rtc_event_address_get(NRF_RTC_Type * p_rtc, nrf_rtc_event_t event); + +/**@brief Function for returning the address of a task. + * + * @param[in] p_rtc Pointer to the instance register structure. + * @param[in] task Requested task. + * + * @return Address of the requested task register. + */ +__STATIC_INLINE uint32_t nrf_rtc_task_address_get(NRF_RTC_Type * p_rtc, nrf_rtc_task_t task); + +/**@brief Function for starting a task. + * + * @param[in] p_rtc Pointer to the instance register structure. + * @param[in] task Requested task. + */ +__STATIC_INLINE void nrf_rtc_task_trigger(NRF_RTC_Type * p_rtc, nrf_rtc_task_t task); + +/**@brief Function for enabling events. + * + * @param[in] p_rtc Pointer to the instance register structure. + * @param[in] mask Mask of event flags to enable. + */ +__STATIC_INLINE void nrf_rtc_event_enable(NRF_RTC_Type * p_rtc, uint32_t mask); + +/**@brief Function for disabling an event. + * + * @param[in] p_rtc Pointer to the instance register structure. + * @param[in] event Requested event. + */ +__STATIC_INLINE void nrf_rtc_event_disable(NRF_RTC_Type * p_rtc, uint32_t event); + +/** + *@} + **/ + + +#ifndef SUPPRESS_INLINE_IMPLEMENTATION + +__STATIC_INLINE void nrf_rtc_cc_set(NRF_RTC_Type * p_rtc, uint32_t ch, uint32_t cc_val) +{ + p_rtc->CC[ch] = cc_val; +} + +__STATIC_INLINE uint32_t nrf_rtc_cc_get(NRF_RTC_Type * p_rtc, uint32_t ch) +{ + return p_rtc->CC[ch]; +} + +__STATIC_INLINE void nrf_rtc_int_enable(NRF_RTC_Type * p_rtc, uint32_t mask) +{ + p_rtc->INTENSET = mask; +} + +__STATIC_INLINE void nrf_rtc_int_disable(NRF_RTC_Type * p_rtc, uint32_t mask) +{ + p_rtc->INTENCLR = mask; +} + +__STATIC_INLINE uint32_t nrf_rtc_int_is_enabled(NRF_RTC_Type * p_rtc, uint32_t mask) +{ + return (p_rtc->INTENSET & mask); +} + +__STATIC_INLINE uint32_t nrf_rtc_int_get(NRF_RTC_Type * p_rtc) +{ + return p_rtc->INTENSET; +} + +__STATIC_INLINE uint32_t nrf_rtc_event_pending(NRF_RTC_Type * p_rtc, nrf_rtc_event_t event) +{ + return *(volatile uint32_t *)((uint8_t *)p_rtc + (uint32_t)event); +} + +__STATIC_INLINE void nrf_rtc_event_clear(NRF_RTC_Type * p_rtc, nrf_rtc_event_t event) +{ + *((volatile uint32_t *)((uint8_t *)p_rtc + (uint32_t)event)) = 0; +#if __CORTEX_M == 0x04 + volatile uint32_t dummy = *((volatile uint32_t *)((uint8_t *)p_rtc + (uint32_t)event)); + (void)dummy; +#endif +} + +__STATIC_INLINE uint32_t nrf_rtc_counter_get(NRF_RTC_Type * p_rtc) +{ + return p_rtc->COUNTER; +} + +__STATIC_INLINE void nrf_rtc_prescaler_set(NRF_RTC_Type * p_rtc, uint32_t val) +{ + ASSERT(val <= (RTC_PRESCALER_PRESCALER_Msk >> RTC_PRESCALER_PRESCALER_Pos)); + p_rtc->PRESCALER = val; +} +__STATIC_INLINE uint32_t rtc_prescaler_get(NRF_RTC_Type * p_rtc) +{ + return p_rtc->PRESCALER; +} + +__STATIC_INLINE uint32_t nrf_rtc_event_address_get(NRF_RTC_Type * p_rtc, nrf_rtc_event_t event) +{ + return (uint32_t)p_rtc + event; +} + +__STATIC_INLINE uint32_t nrf_rtc_task_address_get(NRF_RTC_Type * p_rtc, nrf_rtc_task_t task) +{ + return (uint32_t)p_rtc + task; +} + +__STATIC_INLINE void nrf_rtc_task_trigger(NRF_RTC_Type * p_rtc, nrf_rtc_task_t task) +{ + *(__IO uint32_t *)((uint32_t)p_rtc + task) = 1; +} + +__STATIC_INLINE void nrf_rtc_event_enable(NRF_RTC_Type * p_rtc, uint32_t mask) +{ + p_rtc->EVTENSET = mask; +} +__STATIC_INLINE void nrf_rtc_event_disable(NRF_RTC_Type * p_rtc, uint32_t mask) +{ + p_rtc->EVTENCLR = mask; +} +#endif + +#endif /* NRF_RTC_H */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spi.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spi.h new file mode 100644 index 0000000000..2d3897d77f --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spi.h @@ -0,0 +1,334 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** + * @defgroup nrf_spi_hal SPI HAL + * @{ + * @ingroup nrf_spi_master + * + * @brief Hardware access layer for accessing the SPI peripheral. + */ + +#ifndef NRF_SPI_H__ +#define NRF_SPI_H__ + +#include +#include +#include + +#include "nrf.h" + + +/** + * @brief This value can be used as a parameter for the @ref nrf_spi_pins_set + * function to specify that a given SPI signal (SCK, MOSI, or MISO) + * shall not be connected to a physical pin. + */ +#define NRF_SPI_PIN_NOT_CONNECTED 0xFFFFFFFF + + +/** + * @brief SPI events. + */ +typedef enum +{ + /*lint -save -e30*/ + NRF_SPI_EVENT_READY = offsetof(NRF_SPI_Type, EVENTS_READY) ///< TXD byte sent and RXD byte received. + /*lint -restore*/ +} nrf_spi_event_t; + +/** + * @brief SPI interrupts. + */ +typedef enum +{ + NRF_SPI_INT_READY_MASK = SPI_INTENSET_READY_Msk ///< Interrupt on READY event. +} nrf_spi_int_mask_t; + +/** + * @brief SPI data rates. + */ +typedef enum +{ + NRF_SPI_FREQ_125K = SPI_FREQUENCY_FREQUENCY_K125, ///< 125 kbps. + NRF_SPI_FREQ_250K = SPI_FREQUENCY_FREQUENCY_K250, ///< 250 kbps. + NRF_SPI_FREQ_500K = SPI_FREQUENCY_FREQUENCY_K500, ///< 500 kbps. + NRF_SPI_FREQ_1M = SPI_FREQUENCY_FREQUENCY_M1, ///< 1 Mbps. + NRF_SPI_FREQ_2M = SPI_FREQUENCY_FREQUENCY_M2, ///< 2 Mbps. + NRF_SPI_FREQ_4M = SPI_FREQUENCY_FREQUENCY_M4, ///< 4 Mbps. + // [conversion to 'int' needed to prevent compilers from complaining + // that the provided value (0x80000000UL) is out of range of "int"] + NRF_SPI_FREQ_8M = (int)SPI_FREQUENCY_FREQUENCY_M8 ///< 8 Mbps. +} nrf_spi_frequency_t; + +/** + * @brief SPI modes. + */ +typedef enum +{ + NRF_SPI_MODE_0, ///< SCK active high, sample on leading edge of clock. + NRF_SPI_MODE_1, ///< SCK active high, sample on trailing edge of clock. + NRF_SPI_MODE_2, ///< SCK active low, sample on leading edge of clock. + NRF_SPI_MODE_3 ///< SCK active low, sample on trailing edge of clock. +} nrf_spi_mode_t; + +/** + * @brief SPI bit orders. + */ +typedef enum +{ + NRF_SPI_BIT_ORDER_MSB_FIRST = SPI_CONFIG_ORDER_MsbFirst, ///< Most significant bit shifted out first. + NRF_SPI_BIT_ORDER_LSB_FIRST = SPI_CONFIG_ORDER_LsbFirst ///< Least significant bit shifted out first. +} nrf_spi_bit_order_t; + + +/** + * @brief Function for clearing a specific SPI event. + * + * @param[in] p_spi SPI instance. + * @param[in] spi_event Event to clear. + */ +__STATIC_INLINE void nrf_spi_event_clear(NRF_SPI_Type * p_spi, + nrf_spi_event_t spi_event); + +/** + * @brief Function for checking the state of a specific SPI event. + * + * @param[in] p_spi SPI instance. + * @param[in] spi_event Event to check. + * + * @retval true If the event is set. + * @retval false If the event is not set. + */ +__STATIC_INLINE bool nrf_spi_event_check(NRF_SPI_Type * p_spi, + nrf_spi_event_t spi_event); + +/** + * @brief Function for getting the address of a specific SPI event register. + * + * @param[in] p_spi SPI instance. + * @param[in] spi_event Requested event. + * + * @return Address of the specified event register. + */ +__STATIC_INLINE uint32_t * nrf_spi_event_address_get(NRF_SPI_Type * p_spi, + nrf_spi_event_t spi_event); + +/** + * @brief Function for enabling specified interrupts. + * + * @param[in] p_spi SPI instance. + * @param[in] spi_int_mask Interrupts to enable. + */ +__STATIC_INLINE void nrf_spi_int_enable(NRF_SPI_Type * p_spi, + uint32_t spi_int_mask); + +/** + * @brief Function for disabling specified interrupts. + * + * @param[in] p_spi SPI instance. + * @param[in] spi_int_mask Interrupts to disable. + */ +__STATIC_INLINE void nrf_spi_int_disable(NRF_SPI_Type * p_spi, + uint32_t spi_int_mask); + +/** + * @brief Function for retrieving the state of a given interrupt. + * + * @param[in] p_spi SPI instance. + * @param[in] spi_int Interrupt to check. + * + * @retval true If the interrupt is enabled. + * @retval false If the interrupt is not enabled. + */ +__STATIC_INLINE bool nrf_spi_int_enable_check(NRF_SPI_Type * p_spi, + nrf_spi_int_mask_t spi_int); + +/** + * @brief Function for enabling the SPI peripheral. + * + * @param[in] p_spi SPI instance. + */ +__STATIC_INLINE void nrf_spi_enable(NRF_SPI_Type * p_spi); + +/** + * @brief Function for disabling the SPI peripheral. + * + * @param[in] p_spi SPI instance. + */ +__STATIC_INLINE void nrf_spi_disable(NRF_SPI_Type * p_spi); + +/** + * @brief Function for configuring SPI pins. + * + * If a given signal is not needed, pass the @ref NRF_SPI_PIN_NOT_CONNECTED + * value instead of its pin number. + * + * @param[in] p_spi SPI instance. + * @param[in] sck_pin SCK pin number. + * @param[in] mosi_pin MOSI pin number. + * @param[in] miso_pin MISO pin number. + */ +__STATIC_INLINE void nrf_spi_pins_set(NRF_SPI_Type * p_spi, + uint32_t sck_pin, + uint32_t mosi_pin, + uint32_t miso_pin); + +/** + * @brief Function for writing data to the SPI transmitter register. + * + * @param[in] p_spi SPI instance. + * @param[in] data TX data to send. + */ +__STATIC_INLINE void nrf_spi_txd_set(NRF_SPI_Type * p_spi, uint8_t data); + +/** + * @brief Function for reading data from the SPI receiver register. + * + * @param[in] p_spi SPI instance. + * + * @return RX data received. + */ +__STATIC_INLINE uint8_t nrf_spi_rxd_get(NRF_SPI_Type * p_spi); + +/** + * @brief Function for setting the SPI master data rate. + * + * @param[in] p_spi SPI instance. + * @param[in] frequency SPI frequency. + */ +__STATIC_INLINE void nrf_spi_frequency_set(NRF_SPI_Type * p_spi, + nrf_spi_frequency_t frequency); + +/** + * @brief Function for setting the SPI configuration. + * + * @param[in] p_spi SPI instance. + * @param[in] spi_mode SPI mode. + * @param[in] spi_bit_order SPI bit order. + */ +__STATIC_INLINE void nrf_spi_configure(NRF_SPI_Type * p_spi, + nrf_spi_mode_t spi_mode, + nrf_spi_bit_order_t spi_bit_order); + + +#ifndef SUPPRESS_INLINE_IMPLEMENTATION + +__STATIC_INLINE void nrf_spi_event_clear(NRF_SPI_Type * p_spi, + nrf_spi_event_t spi_event) +{ + *((volatile uint32_t *)((uint8_t *)p_spi + (uint32_t)spi_event)) = 0x0UL; +} + +__STATIC_INLINE bool nrf_spi_event_check(NRF_SPI_Type * p_spi, + nrf_spi_event_t spi_event) +{ + return (bool)*(volatile uint32_t *)((uint8_t *)p_spi + (uint32_t)spi_event); +} + +__STATIC_INLINE uint32_t * nrf_spi_event_address_get(NRF_SPI_Type * p_spi, + nrf_spi_event_t spi_event) +{ + return (uint32_t *)((uint8_t *)p_spi + (uint32_t)spi_event); +} + +__STATIC_INLINE void nrf_spi_int_enable(NRF_SPI_Type * p_spi, + uint32_t spi_int_mask) +{ + p_spi->INTENSET = spi_int_mask; +} + +__STATIC_INLINE void nrf_spi_int_disable(NRF_SPI_Type * p_spi, + uint32_t spi_int_mask) +{ + p_spi->INTENCLR = spi_int_mask; +} + +__STATIC_INLINE bool nrf_spi_int_enable_check(NRF_SPI_Type * p_spi, + nrf_spi_int_mask_t spi_int) +{ + return (bool)(p_spi->INTENSET & spi_int); +} + +__STATIC_INLINE void nrf_spi_enable(NRF_SPI_Type * p_spi) +{ + p_spi->ENABLE = (SPI_ENABLE_ENABLE_Enabled << SPI_ENABLE_ENABLE_Pos); +} + +__STATIC_INLINE void nrf_spi_disable(NRF_SPI_Type * p_spi) +{ + p_spi->ENABLE = (SPI_ENABLE_ENABLE_Disabled << SPI_ENABLE_ENABLE_Pos); +} + +__STATIC_INLINE void nrf_spi_pins_set(NRF_SPI_Type * p_spi, + uint32_t sck_pin, + uint32_t mosi_pin, + uint32_t miso_pin) +{ + p_spi->PSELSCK = sck_pin; + p_spi->PSELMOSI = mosi_pin; + p_spi->PSELMISO = miso_pin; +} + +__STATIC_INLINE void nrf_spi_txd_set(NRF_SPI_Type * p_spi, uint8_t data) +{ + p_spi->TXD = data; +} + +__STATIC_INLINE uint8_t nrf_spi_rxd_get(NRF_SPI_Type * p_spi) +{ + return p_spi->RXD; +} + +__STATIC_INLINE void nrf_spi_frequency_set(NRF_SPI_Type * p_spi, + nrf_spi_frequency_t frequency) +{ + p_spi->FREQUENCY = frequency; +} + +__STATIC_INLINE void nrf_spi_configure(NRF_SPI_Type * p_spi, + nrf_spi_mode_t spi_mode, + nrf_spi_bit_order_t spi_bit_order) +{ + uint32_t config = (spi_bit_order == NRF_SPI_BIT_ORDER_MSB_FIRST ? + SPI_CONFIG_ORDER_MsbFirst : SPI_CONFIG_ORDER_LsbFirst); + switch (spi_mode) + { + default: + case NRF_SPI_MODE_0: + config |= (SPI_CONFIG_CPOL_ActiveHigh << SPI_CONFIG_CPOL_Pos) | + (SPI_CONFIG_CPHA_Leading << SPI_CONFIG_CPHA_Pos); + break; + + case NRF_SPI_MODE_1: + config |= (SPI_CONFIG_CPOL_ActiveHigh << SPI_CONFIG_CPOL_Pos) | + (SPI_CONFIG_CPHA_Trailing << SPI_CONFIG_CPHA_Pos); + break; + + case NRF_SPI_MODE_2: + config |= (SPI_CONFIG_CPOL_ActiveLow << SPI_CONFIG_CPOL_Pos) | + (SPI_CONFIG_CPHA_Leading << SPI_CONFIG_CPHA_Pos); + break; + + case NRF_SPI_MODE_3: + config |= (SPI_CONFIG_CPOL_ActiveLow << SPI_CONFIG_CPOL_Pos) | + (SPI_CONFIG_CPHA_Trailing << SPI_CONFIG_CPHA_Pos); + break; + } + p_spi->CONFIG = config; +} + +#endif // SUPPRESS_INLINE_IMPLEMENTATION + +#endif // NRF_SPI_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spim.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spim.h new file mode 100644 index 0000000000..279f483df6 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spim.h @@ -0,0 +1,520 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** + * @defgroup nrf_spim_hal SPIM HAL + * @{ + * @ingroup nrf_spi_master + * + * @brief Hardware access layer for accessing the SPIM peripheral. + */ + +#ifndef NRF_SPIM_H__ +#define NRF_SPIM_H__ + +#include +#include +#include + +#include "nrf.h" + + +/** + * @brief This value can be used as a parameter for the @ref nrf_spim_pins_set + * function to specify that a given SPI signal (SCK, MOSI, or MISO) + * shall not be connected to a physical pin. + */ +#define NRF_SPIM_PIN_NOT_CONNECTED 0xFFFFFFFF + + +/** + * @brief SPIM tasks. + */ +typedef enum +{ + /*lint -save -e30*/ + NRF_SPIM_TASK_START = offsetof(NRF_SPIM_Type, TASKS_START), ///< Start SPI transaction. + NRF_SPIM_TASK_STOP = offsetof(NRF_SPIM_Type, TASKS_STOP), ///< Stop SPI transaction. + NRF_SPIM_TASK_SUSPEND = offsetof(NRF_SPIM_Type, TASKS_SUSPEND), ///< Suspend SPI transaction. + NRF_SPIM_TASK_RESUME = offsetof(NRF_SPIM_Type, TASKS_RESUME) ///< Resume SPI transaction. + /*lint -restore*/ +} nrf_spim_task_t; + +/** + * @brief SPIM events. + */ +typedef enum +{ + /*lint -save -e30*/ + NRF_SPIM_EVENT_STOPPED = offsetof(NRF_SPIM_Type, EVENTS_STOPPED), ///< SPI transaction has stopped. + NRF_SPIM_EVENT_ENDRX = offsetof(NRF_SPIM_Type, EVENTS_ENDRX), ///< End of RXD buffer reached. +#ifdef NRF52 + NRF_SPIM_EVENT_END = offsetof(NRF_SPIM_Type, EVENTS_END), ///< End of RXD buffer and TXD buffer reached. +#endif + NRF_SPIM_EVENT_ENDTX = offsetof(NRF_SPIM_Type, EVENTS_ENDTX), ///< End of TXD buffer reached. + NRF_SPIM_EVENT_STARTED = offsetof(NRF_SPIM_Type, EVENTS_STARTED) ///< Transaction started. + /*lint -restore*/ +} nrf_spim_event_t; + +#ifdef NRF52 +/** + * @brief SPIM shortcuts. + */ +typedef enum +{ + NRF_SPIM_SHORT_END_START_MASK = SPIM_SHORTS_END_START_Msk ///< Shortcut between END event and START task. +} nrf_spim_short_mask_t; +#endif + +/** + * @brief SPIM interrupts. + */ +typedef enum +{ + NRF_SPIM_INT_STOPPED_MASK = SPIM_INTENSET_STOPPED_Msk, ///< Interrupt on STOPPED event. + NRF_SPIM_INT_ENDRX_MASK = SPIM_INTENSET_ENDRX_Msk, ///< Interrupt on ENDRX event. +#ifdef NRF52 + NRF_SPIM_INT_END_MASK = SPIM_INTENSET_END_Msk, ///< Interrupt on END event. +#endif + NRF_SPIM_INT_ENDTX_MASK = SPIM_INTENSET_ENDTX_Msk, ///< Interrupt on ENDTX event. + NRF_SPIM_INT_STARTED_MASK = SPIM_INTENSET_STARTED_Msk ///< Interrupt on STARTED event. +} nrf_spim_int_mask_t; + +/** + * @brief SPI master data rates. + */ +typedef enum +{ + NRF_SPIM_FREQ_125K = SPIM_FREQUENCY_FREQUENCY_K125, ///< 125 kbps. + NRF_SPIM_FREQ_250K = SPIM_FREQUENCY_FREQUENCY_K250, ///< 250 kbps. + NRF_SPIM_FREQ_500K = SPIM_FREQUENCY_FREQUENCY_K500, ///< 500 kbps. + NRF_SPIM_FREQ_1M = SPIM_FREQUENCY_FREQUENCY_M1, ///< 1 Mbps. + NRF_SPIM_FREQ_2M = SPIM_FREQUENCY_FREQUENCY_M2, ///< 2 Mbps. + NRF_SPIM_FREQ_4M = SPIM_FREQUENCY_FREQUENCY_M4, ///< 4 Mbps. + // [conversion to 'int' needed to prevent compilers from complaining + // that the provided value (0x80000000UL) is out of range of "int"] + NRF_SPIM_FREQ_8M = (int)SPIM_FREQUENCY_FREQUENCY_M8 ///< 8 Mbps. +} nrf_spim_frequency_t; + +/** + * @brief SPI modes. + */ +typedef enum +{ + NRF_SPIM_MODE_0, ///< SCK active high, sample on leading edge of clock. + NRF_SPIM_MODE_1, ///< SCK active high, sample on trailing edge of clock. + NRF_SPIM_MODE_2, ///< SCK active low, sample on leading edge of clock. + NRF_SPIM_MODE_3 ///< SCK active low, sample on trailing edge of clock. +} nrf_spim_mode_t; + +/** + * @brief SPI bit orders. + */ +typedef enum +{ + NRF_SPIM_BIT_ORDER_MSB_FIRST = SPIM_CONFIG_ORDER_MsbFirst, ///< Most significant bit shifted out first. + NRF_SPIM_BIT_ORDER_LSB_FIRST = SPIM_CONFIG_ORDER_LsbFirst ///< Least significant bit shifted out first. +} nrf_spim_bit_order_t; + + +/** + * @brief Function for activating a specific SPIM task. + * + * @param[in] p_spim SPIM instance. + * @param[in] spim_task Task to activate. + */ +__STATIC_INLINE void nrf_spim_task_trigger(NRF_SPIM_Type * p_spim, + nrf_spim_task_t spim_task); + +/** + * @brief Function for getting the address of a specific SPIM task register. + * + * @param[in] p_spim SPIM instance. + * @param[in] spim_task Requested task. + * + * @return Address of the specified task register. + */ +__STATIC_INLINE uint32_t nrf_spim_task_address_get(NRF_SPIM_Type * p_spim, + nrf_spim_task_t spim_task); + +/** + * @brief Function for clearing a specific SPIM event. + * + * @param[in] p_spim SPIM instance. + * @param[in] spim_event Event to clear. + */ +__STATIC_INLINE void nrf_spim_event_clear(NRF_SPIM_Type * p_spim, + nrf_spim_event_t spim_event); + +/** + * @brief Function for checking the state of a specific SPIM event. + * + * @param[in] p_spim SPIM instance. + * @param[in] spim_event Event to check. + * + * @retval true If the event is set. + * @retval false If the event is not set. + */ +__STATIC_INLINE bool nrf_spim_event_check(NRF_SPIM_Type * p_spim, + nrf_spim_event_t spim_event); + +/** + * @brief Function for getting the address of a specific SPIM event register. + * + * @param[in] p_spim SPIM instance. + * @param[in] spim_event Requested event. + * + * @return Address of the specified event register. + */ +__STATIC_INLINE uint32_t nrf_spim_event_address_get(NRF_SPIM_Type * p_spim, + nrf_spim_event_t spim_event); +#ifdef NRF52 +/** + * @brief Function for enabling specified shortcuts. + * + * @param[in] p_spim SPIM instance. + * @param[in] spim_shorts_mask Shortcuts to enable. + */ +__STATIC_INLINE void nrf_spim_shorts_enable(NRF_SPIM_Type * p_spim, + uint32_t spim_shorts_mask); + +/** + * @brief Function for disabling specified shortcuts. + * + * @param[in] p_spim SPIM instance. + * @param[in] spim_shorts_mask Shortcuts to disable. + */ +__STATIC_INLINE void nrf_spim_shorts_disable(NRF_SPIM_Type * p_spim, + uint32_t spim_shorts_mask); + +/** + * @brief Function for getting shorts setting. + * + * @param[in] p_spim SPIM instance. + */ +__STATIC_INLINE uint32_t nrf_spim_shorts_get(NRF_SPIM_Type * p_spim); +#endif +/** + * @brief Function for enabling specified interrupts. + * + * @param[in] p_spim SPIM instance. + * @param[in] spim_int_mask Interrupts to enable. + */ +__STATIC_INLINE void nrf_spim_int_enable(NRF_SPIM_Type * p_spim, + uint32_t spim_int_mask); + +/** + * @brief Function for disabling specified interrupts. + * + * @param[in] p_spim SPIM instance. + * @param[in] spim_int_mask Interrupts to disable. + */ +__STATIC_INLINE void nrf_spim_int_disable(NRF_SPIM_Type * p_spim, + uint32_t spim_int_mask); + +/** + * @brief Function for retrieving the state of a given interrupt. + * + * @param[in] p_spim SPIM instance. + * @param[in] spim_int Interrupt to check. + * + * @retval true If the interrupt is enabled. + * @retval false If the interrupt is not enabled. + */ +__STATIC_INLINE bool nrf_spim_int_enable_check(NRF_SPIM_Type * p_spim, + nrf_spim_int_mask_t spim_int); + +/** + * @brief Function for enabling the SPIM peripheral. + * + * @param[in] p_spim SPIM instance. + */ +__STATIC_INLINE void nrf_spim_enable(NRF_SPIM_Type * p_spim); + +/** + * @brief Function for disabling the SPIM peripheral. + * + * @param[in] p_spim SPIM instance. + */ +__STATIC_INLINE void nrf_spim_disable(NRF_SPIM_Type * p_spim); + +/** + * @brief Function for configuring SPIM pins. + * + * If a given signal is not needed, pass the @ref NRF_SPIM_PIN_NOT_CONNECTED + * value instead of its pin number. + * + * @param[in] p_spim SPIM instance. + * @param[in] sck_pin SCK pin number. + * @param[in] mosi_pin MOSI pin number. + * @param[in] miso_pin MISO pin number. + */ +__STATIC_INLINE void nrf_spim_pins_set(NRF_SPIM_Type * p_spim, + uint32_t sck_pin, + uint32_t mosi_pin, + uint32_t miso_pin); + +/** + * @brief Function for setting the SPI master data rate. + * + * @param[in] p_spim SPIM instance. + * @param[in] frequency SPI frequency. + */ +__STATIC_INLINE void nrf_spim_frequency_set(NRF_SPIM_Type * p_spim, + nrf_spim_frequency_t frequency); + +/** + * @brief Function for setting the transmit buffer. + * + * @param[in] p_spim SPIM instance. + * @param[in] p_buffer Pointer to the buffer with data to send. + * @param[in] length Maximum number of data bytes to transmit. + */ +__STATIC_INLINE void nrf_spim_tx_buffer_set(NRF_SPIM_Type * p_spim, + uint8_t const * p_buffer, + uint8_t length); + +/** + * @brief Function for setting the receive buffer. + * + * @param[in] p_spim SPIM instance. + * @param[in] p_buffer Pointer to the buffer for received data. + * @param[in] length Maximum number of data bytes to receive. + */ +__STATIC_INLINE void nrf_spim_rx_buffer_set(NRF_SPIM_Type * p_spim, + uint8_t * p_buffer, + uint8_t length); + +/** + * @brief Function for setting the SPI configuration. + * + * @param[in] p_spim SPIM instance. + * @param[in] spi_mode SPI mode. + * @param[in] spi_bit_order SPI bit order. + */ +__STATIC_INLINE void nrf_spim_configure(NRF_SPIM_Type * p_spim, + nrf_spim_mode_t spi_mode, + nrf_spim_bit_order_t spi_bit_order); + +/** + * @brief Function for setting the over-read character. + * + * @param[in] p_spim SPIM instance. + * @param[in] orc Over-read character that is clocked out in case of + * an over-read of the TXD buffer. + */ +__STATIC_INLINE void nrf_spim_orc_set(NRF_SPIM_Type * p_spim, + uint8_t orc); + +#ifdef NRF52 +/** + * @brief Function for enabling the TX list feature. + * + * @param[in] p_spim SPIM instance. + */ +__STATIC_INLINE void nrf_spim_tx_list_enable(NRF_SPIM_Type * p_spim); + +/** + * @brief Function for disabling the TX list feature. + * + * @param[in] p_spim SPIM instance. + */ +__STATIC_INLINE void nrf_spim_tx_list_disable(NRF_SPIM_Type * p_spim); + +/** + * @brief Function for enabling the RX list feature. + * + * @param[in] p_spim SPIM instance. + */ +__STATIC_INLINE void nrf_spim_rx_list_enable(NRF_SPIM_Type * p_spim); + +/** + * @brief Function for disabling the RX list feature. + * + * @param[in] p_spim SPIM instance. + */ +__STATIC_INLINE void nrf_spim_rx_list_disable(NRF_SPIM_Type * p_spim); +#endif +#ifndef SUPPRESS_INLINE_IMPLEMENTATION + +__STATIC_INLINE void nrf_spim_task_trigger(NRF_SPIM_Type * p_spim, + nrf_spim_task_t spim_task) +{ + *((volatile uint32_t *)((uint8_t *)p_spim + (uint32_t)spim_task)) = 0x1UL; +} + +__STATIC_INLINE uint32_t nrf_spim_task_address_get(NRF_SPIM_Type * p_spim, + nrf_spim_task_t spim_task) +{ + return (uint32_t)((uint8_t *)p_spim + (uint32_t)spim_task); +} + +__STATIC_INLINE void nrf_spim_event_clear(NRF_SPIM_Type * p_spim, + nrf_spim_event_t spim_event) +{ + *((volatile uint32_t *)((uint8_t *)p_spim + (uint32_t)spim_event)) = 0x0UL; +} + +__STATIC_INLINE bool nrf_spim_event_check(NRF_SPIM_Type * p_spim, + nrf_spim_event_t spim_event) +{ + return (bool)*(volatile uint32_t *)((uint8_t *)p_spim + (uint32_t)spim_event); +} + +__STATIC_INLINE uint32_t nrf_spim_event_address_get(NRF_SPIM_Type * p_spim, + nrf_spim_event_t spim_event) +{ + return (uint32_t)((uint8_t *)p_spim + (uint32_t)spim_event); +} + +#ifdef NRF52 +__STATIC_INLINE void nrf_spim_shorts_enable(NRF_SPIM_Type * p_spim, + uint32_t spim_shorts_mask) +{ + p_spim->SHORTS |= spim_shorts_mask; +} + +__STATIC_INLINE void nrf_spim_shorts_disable(NRF_SPIM_Type * p_spim, + uint32_t spim_shorts_mask) +{ + p_spim->SHORTS &= ~(spim_shorts_mask); +} + +__STATIC_INLINE uint32_t nrf_spim_shorts_get(NRF_SPIM_Type * p_spim) +{ + return p_spim->SHORTS; +} +#endif +__STATIC_INLINE void nrf_spim_int_enable(NRF_SPIM_Type * p_spim, + uint32_t spim_int_mask) +{ + p_spim->INTENSET = spim_int_mask; +} + +__STATIC_INLINE void nrf_spim_int_disable(NRF_SPIM_Type * p_spim, + uint32_t spim_int_mask) +{ + p_spim->INTENCLR = spim_int_mask; +} + +__STATIC_INLINE bool nrf_spim_int_enable_check(NRF_SPIM_Type * p_spim, + nrf_spim_int_mask_t spim_int) +{ + return (bool)(p_spim->INTENSET & spim_int); +} + +__STATIC_INLINE void nrf_spim_enable(NRF_SPIM_Type * p_spim) +{ + p_spim->ENABLE = (SPIM_ENABLE_ENABLE_Enabled << SPIM_ENABLE_ENABLE_Pos); +} + +__STATIC_INLINE void nrf_spim_disable(NRF_SPIM_Type * p_spim) +{ + p_spim->ENABLE = (SPIM_ENABLE_ENABLE_Disabled << SPIM_ENABLE_ENABLE_Pos); +} + +__STATIC_INLINE void nrf_spim_pins_set(NRF_SPIM_Type * p_spim, + uint32_t sck_pin, + uint32_t mosi_pin, + uint32_t miso_pin) +{ + p_spim->PSEL.SCK = sck_pin; + p_spim->PSEL.MOSI = mosi_pin; + p_spim->PSEL.MISO = miso_pin; +} + +__STATIC_INLINE void nrf_spim_frequency_set(NRF_SPIM_Type * p_spim, + nrf_spim_frequency_t frequency) +{ + p_spim->FREQUENCY = frequency; +} + +__STATIC_INLINE void nrf_spim_tx_buffer_set(NRF_SPIM_Type * p_spim, + uint8_t const * p_buffer, + uint8_t length) +{ + p_spim->TXD.PTR = (uint32_t)p_buffer; + p_spim->TXD.MAXCNT = length; +} + +__STATIC_INLINE void nrf_spim_rx_buffer_set(NRF_SPIM_Type * p_spim, + uint8_t * p_buffer, + uint8_t length) +{ + p_spim->RXD.PTR = (uint32_t)p_buffer; + p_spim->RXD.MAXCNT = length; +} + +__STATIC_INLINE void nrf_spim_configure(NRF_SPIM_Type * p_spim, + nrf_spim_mode_t spi_mode, + nrf_spim_bit_order_t spi_bit_order) +{ + uint32_t config = (spi_bit_order == NRF_SPIM_BIT_ORDER_MSB_FIRST ? + SPIM_CONFIG_ORDER_MsbFirst : SPIM_CONFIG_ORDER_LsbFirst); + switch (spi_mode) + { + default: + case NRF_SPIM_MODE_0: + config |= (SPIM_CONFIG_CPOL_ActiveHigh << SPIM_CONFIG_CPOL_Pos) | + (SPIM_CONFIG_CPHA_Leading << SPIM_CONFIG_CPHA_Pos); + break; + + case NRF_SPIM_MODE_1: + config |= (SPIM_CONFIG_CPOL_ActiveHigh << SPIM_CONFIG_CPOL_Pos) | + (SPIM_CONFIG_CPHA_Trailing << SPIM_CONFIG_CPHA_Pos); + break; + + case NRF_SPIM_MODE_2: + config |= (SPIM_CONFIG_CPOL_ActiveLow << SPIM_CONFIG_CPOL_Pos) | + (SPIM_CONFIG_CPHA_Leading << SPIM_CONFIG_CPHA_Pos); + break; + + case NRF_SPIM_MODE_3: + config |= (SPIM_CONFIG_CPOL_ActiveLow << SPIM_CONFIG_CPOL_Pos) | + (SPIM_CONFIG_CPHA_Trailing << SPIM_CONFIG_CPHA_Pos); + break; + } + p_spim->CONFIG = config; +} + +__STATIC_INLINE void nrf_spim_orc_set(NRF_SPIM_Type * p_spim, + uint8_t orc) +{ + p_spim->ORC = orc; +} + +#ifdef NRF52 +__STATIC_INLINE void nrf_spim_tx_list_enable(NRF_SPIM_Type * p_spim) +{ + p_spim->TXD.LIST = 1; +} + +__STATIC_INLINE void nrf_spim_tx_list_disable(NRF_SPIM_Type * p_spim) +{ + p_spim->TXD.LIST = 0; +} + +__STATIC_INLINE void nrf_spim_rx_list_enable(NRF_SPIM_Type * p_spim) +{ + p_spim->RXD.LIST = 1; +} + +__STATIC_INLINE void nrf_spim_rx_list_disable(NRF_SPIM_Type * p_spim) +{ + p_spim->RXD.LIST = 0; +} +#endif +#endif // SUPPRESS_INLINE_IMPLEMENTATION + +#endif // NRF_SPIM_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_timer.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_timer.h new file mode 100644 index 0000000000..3da5160e78 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_timer.h @@ -0,0 +1,576 @@ +/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** + * @defgroup nrf_timer_hal Timer HAL + * @{ + * @ingroup nrf_timer + * + * @brief Hardware access layer for accessing the timer peripheral. + */ + +#ifndef NRF_TIMER_H__ +#define NRF_TIMER_H__ + +#include +#include +#include + +#include "nrf.h" +#include "nrf_assert.h" + + +/** + * @brief Macro for validating the correctness of the BIT_WIDTH setting. + */ +#ifdef NRF51 + /** + * In the nRF51 Series, timer instance 0 supports all available bit widths. + * The other two instances support only 8 and 16 bits. + */ + #define NRF_TIMER_IS_BIT_WIDTH_VALID(p_timer, bit_width) \ + ((p_timer == NRF_TIMER0) || (bit_width <= NRF_TIMER_BIT_WIDTH_16)) +#else + /** + * In the nRF52 Series, all timer instances support all available bit widths. + */ + #define NRF_TIMER_IS_BIT_WIDTH_VALID(p_timer, bit_width) true +#endif + +/** + * @brief Macro for getting the number of capture/compare channels available + * in a given timer instance. + */ +#ifdef NRF51 + #define NRF_TIMER_CC_CHANNEL_COUNT(id) 4 +#else + #define NRF_TIMER_CC_CHANNEL_COUNT(id) ((id) <= 2 ? 4 : 6) +#endif + + +/** + * @brief Timer tasks. + */ +typedef enum +{ + /*lint -save -e30 -esym(628,__INTADDR__)*/ + NRF_TIMER_TASK_START = offsetof(NRF_TIMER_Type, TASKS_START), ///< Task for starting the timer. + NRF_TIMER_TASK_STOP = offsetof(NRF_TIMER_Type, TASKS_STOP), ///< Task for stopping the timer. + NRF_TIMER_TASK_COUNT = offsetof(NRF_TIMER_Type, TASKS_COUNT), ///< Task for incrementing the timer (in counter mode). + NRF_TIMER_TASK_CLEAR = offsetof(NRF_TIMER_Type, TASKS_CLEAR), ///< Task for resetting the timer value. + NRF_TIMER_TASK_SHUTDOWN = offsetof(NRF_TIMER_Type, TASKS_SHUTDOWN), ///< Task for powering off the timer. + NRF_TIMER_TASK_CAPTURE0 = offsetof(NRF_TIMER_Type, TASKS_CAPTURE[0]), ///< Task for capturing the timer value on channel 0. + NRF_TIMER_TASK_CAPTURE1 = offsetof(NRF_TIMER_Type, TASKS_CAPTURE[1]), ///< Task for capturing the timer value on channel 1. + NRF_TIMER_TASK_CAPTURE2 = offsetof(NRF_TIMER_Type, TASKS_CAPTURE[2]), ///< Task for capturing the timer value on channel 2. + NRF_TIMER_TASK_CAPTURE3 = offsetof(NRF_TIMER_Type, TASKS_CAPTURE[3]), ///< Task for capturing the timer value on channel 3. +#ifdef NRF52 + NRF_TIMER_TASK_CAPTURE4 = offsetof(NRF_TIMER_Type, TASKS_CAPTURE[4]), ///< Task for capturing the timer value on channel 4. + NRF_TIMER_TASK_CAPTURE5 = offsetof(NRF_TIMER_Type, TASKS_CAPTURE[5]), ///< Task for capturing the timer value on channel 5. +#endif + /*lint -restore*/ +} nrf_timer_task_t; + +/** + * @brief Timer events. + */ +typedef enum +{ + /*lint -save -e30*/ + NRF_TIMER_EVENT_COMPARE0 = offsetof(NRF_TIMER_Type, EVENTS_COMPARE[0]), ///< Event from compare channel 0. + NRF_TIMER_EVENT_COMPARE1 = offsetof(NRF_TIMER_Type, EVENTS_COMPARE[1]), ///< Event from compare channel 1. + NRF_TIMER_EVENT_COMPARE2 = offsetof(NRF_TIMER_Type, EVENTS_COMPARE[2]), ///< Event from compare channel 2. + NRF_TIMER_EVENT_COMPARE3 = offsetof(NRF_TIMER_Type, EVENTS_COMPARE[3]), ///< Event from compare channel 3. +#ifdef NRF52 + NRF_TIMER_EVENT_COMPARE4 = offsetof(NRF_TIMER_Type, EVENTS_COMPARE[4]), ///< Event from compare channel 4. + NRF_TIMER_EVENT_COMPARE5 = offsetof(NRF_TIMER_Type, EVENTS_COMPARE[5]), ///< Event from compare channel 5. +#endif + /*lint -restore*/ +} nrf_timer_event_t; + +/** + * @brief Types of timer shortcuts. + */ +typedef enum +{ + NRF_TIMER_SHORT_COMPARE0_STOP_MASK = TIMER_SHORTS_COMPARE0_STOP_Msk, ///< Shortcut for stopping the timer based on compare 0. + NRF_TIMER_SHORT_COMPARE1_STOP_MASK = TIMER_SHORTS_COMPARE1_STOP_Msk, ///< Shortcut for stopping the timer based on compare 1. + NRF_TIMER_SHORT_COMPARE2_STOP_MASK = TIMER_SHORTS_COMPARE2_STOP_Msk, ///< Shortcut for stopping the timer based on compare 2. + NRF_TIMER_SHORT_COMPARE3_STOP_MASK = TIMER_SHORTS_COMPARE3_STOP_Msk, ///< Shortcut for stopping the timer based on compare 3. +#ifdef NRF52 + NRF_TIMER_SHORT_COMPARE4_STOP_MASK = TIMER_SHORTS_COMPARE4_STOP_Msk, ///< Shortcut for stopping the timer based on compare 4. + NRF_TIMER_SHORT_COMPARE5_STOP_MASK = TIMER_SHORTS_COMPARE5_STOP_Msk, ///< Shortcut for stopping the timer based on compare 5. +#endif + NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK = TIMER_SHORTS_COMPARE0_CLEAR_Msk, ///< Shortcut for clearing the timer based on compare 0. + NRF_TIMER_SHORT_COMPARE1_CLEAR_MASK = TIMER_SHORTS_COMPARE1_CLEAR_Msk, ///< Shortcut for clearing the timer based on compare 1. + NRF_TIMER_SHORT_COMPARE2_CLEAR_MASK = TIMER_SHORTS_COMPARE2_CLEAR_Msk, ///< Shortcut for clearing the timer based on compare 2. + NRF_TIMER_SHORT_COMPARE3_CLEAR_MASK = TIMER_SHORTS_COMPARE3_CLEAR_Msk, ///< Shortcut for clearing the timer based on compare 3. +#ifdef NRF52 + NRF_TIMER_SHORT_COMPARE4_CLEAR_MASK = TIMER_SHORTS_COMPARE4_CLEAR_Msk, ///< Shortcut for clearing the timer based on compare 4. + NRF_TIMER_SHORT_COMPARE5_CLEAR_MASK = TIMER_SHORTS_COMPARE5_CLEAR_Msk, ///< Shortcut for clearing the timer based on compare 5. +#endif +} nrf_timer_short_mask_t; + +/** + * @brief Timer modes. + */ +typedef enum +{ + NRF_TIMER_MODE_TIMER = TIMER_MODE_MODE_Timer, ///< Timer mode: timer. + NRF_TIMER_MODE_COUNTER = TIMER_MODE_MODE_Counter, ///< Timer mode: counter. +#ifdef NRF52 + NRF_TIMER_MODE_LOW_POWER_COUNTER = TIMER_MODE_MODE_LowPowerCounter, ///< Timer mode: low-power counter. +#endif +} nrf_timer_mode_t; + +/** + * @brief Timer bit width. + */ +typedef enum +{ + NRF_TIMER_BIT_WIDTH_8 = TIMER_BITMODE_BITMODE_08Bit, ///< Timer bit width 8 bit. + NRF_TIMER_BIT_WIDTH_16 = TIMER_BITMODE_BITMODE_16Bit, ///< Timer bit width 16 bit. + NRF_TIMER_BIT_WIDTH_24 = TIMER_BITMODE_BITMODE_24Bit, ///< Timer bit width 24 bit. + NRF_TIMER_BIT_WIDTH_32 = TIMER_BITMODE_BITMODE_32Bit ///< Timer bit width 32 bit. +} nrf_timer_bit_width_t; + +/** + * @brief Timer prescalers. + */ +typedef enum +{ + NRF_TIMER_FREQ_16MHz = 0, ///< Timer frequency 16 MHz. + NRF_TIMER_FREQ_8MHz, ///< Timer frequency 8 MHz. + NRF_TIMER_FREQ_4MHz, ///< Timer frequency 4 MHz. + NRF_TIMER_FREQ_2MHz, ///< Timer frequency 2 MHz. + NRF_TIMER_FREQ_1MHz, ///< Timer frequency 1 MHz. + NRF_TIMER_FREQ_500kHz, ///< Timer frequency 500 kHz. + NRF_TIMER_FREQ_250kHz, ///< Timer frequency 250 kHz. + NRF_TIMER_FREQ_125kHz, ///< Timer frequency 125 kHz. + NRF_TIMER_FREQ_62500Hz, ///< Timer frequency 62500 Hz. + NRF_TIMER_FREQ_31250Hz ///< Timer frequency 31250 Hz. +} nrf_timer_frequency_t; + +/** + * @brief Timer capture/compare channels. + */ +typedef enum +{ + NRF_TIMER_CC_CHANNEL0 = 0, ///< Timer capture/compare channel 0. + NRF_TIMER_CC_CHANNEL1, ///< Timer capture/compare channel 1. + NRF_TIMER_CC_CHANNEL2, ///< Timer capture/compare channel 2. + NRF_TIMER_CC_CHANNEL3, ///< Timer capture/compare channel 3. +#ifdef NRF52 + NRF_TIMER_CC_CHANNEL4, ///< Timer capture/compare channel 4. + NRF_TIMER_CC_CHANNEL5, ///< Timer capture/compare channel 5. +#endif +} nrf_timer_cc_channel_t; + +/** + * @brief Timer interrupts. + */ +typedef enum +{ + NRF_TIMER_INT_COMPARE0_MASK = TIMER_INTENSET_COMPARE0_Msk, ///< Timer interrupt from compare event on channel 0. + NRF_TIMER_INT_COMPARE1_MASK = TIMER_INTENSET_COMPARE1_Msk, ///< Timer interrupt from compare event on channel 1. + NRF_TIMER_INT_COMPARE2_MASK = TIMER_INTENSET_COMPARE2_Msk, ///< Timer interrupt from compare event on channel 2. + NRF_TIMER_INT_COMPARE3_MASK = TIMER_INTENSET_COMPARE3_Msk, ///< Timer interrupt from compare event on channel 3. +#ifdef NRF52 + NRF_TIMER_INT_COMPARE4_MASK = TIMER_INTENSET_COMPARE4_Msk, ///< Timer interrupt from compare event on channel 4. + NRF_TIMER_INT_COMPARE5_MASK = TIMER_INTENSET_COMPARE5_Msk, ///< Timer interrupt from compare event on channel 5. +#endif +} nrf_timer_int_mask_t; + + +/** + * @brief Function for activating a specific timer task. + * + * @param[in] p_timer Timer instance. + * @param[in] task Task to activate. + */ +__STATIC_INLINE void nrf_timer_task_trigger(NRF_TIMER_Type * p_timer, + nrf_timer_task_t task); + +/** + * @brief Function for getting the address of a specific timer task register. + * + * @param[in] p_timer Timer instance. + * @param[in] task Requested task. + * + * @return Address of the specified task register. + */ +__STATIC_INLINE uint32_t * nrf_timer_task_address_get(NRF_TIMER_Type * p_timer, + nrf_timer_task_t task); + +/** + * @brief Function for clearing a specific timer event. + * + * @param[in] p_timer Timer instance. + * @param[in] event Event to clear. + */ +__STATIC_INLINE void nrf_timer_event_clear(NRF_TIMER_Type * p_timer, + nrf_timer_event_t event); + +/** + * @brief Function for checking the state of a specific timer event. + * + * @param[in] p_timer Timer instance. + * @param[in] event Event to check. + * + * @retval true If the event is set. + * @retval false If the event is not set. + */ +__STATIC_INLINE bool nrf_timer_event_check(NRF_TIMER_Type * p_timer, + nrf_timer_event_t event); + +/** + * @brief Function for getting the address of a specific timer event register. + * + * @param[in] p_timer Timer instance. + * @param[in] event Requested event. + * + * @return Address of the specified event register. + */ +__STATIC_INLINE uint32_t * nrf_timer_event_address_get(NRF_TIMER_Type * p_timer, + nrf_timer_event_t event); + +/** + * @brief Function for enabling specified shortcuts. + * + * @param[in] p_timer Timer instance. + * @param[in] timer_shorts_mask Shortcuts to enable. + */ +__STATIC_INLINE void nrf_timer_shorts_enable(NRF_TIMER_Type * p_timer, + uint32_t timer_shorts_mask); + +/** + * @brief Function for disabling specified shortcuts. + * + * @param[in] p_timer Timer instance. + * @param[in] timer_shorts_mask Shortcuts to disable. + */ +__STATIC_INLINE void nrf_timer_shorts_disable(NRF_TIMER_Type * p_timer, + uint32_t timer_shorts_mask); + +/** + * @brief Function for enabling specified interrupts. + * + * @param[in] p_timer Timer instance. + * @param[in] timer_int_mask Interrupts to enable. + */ +__STATIC_INLINE void nrf_timer_int_enable(NRF_TIMER_Type * p_timer, + uint32_t timer_int_mask); + +/** + * @brief Function for disabling specified interrupts. + * + * @param[in] p_timer Timer instance. + * @param[in] timer_int_mask Interrupts to disable. + */ +__STATIC_INLINE void nrf_timer_int_disable(NRF_TIMER_Type * p_timer, + uint32_t timer_int_mask); + +/** + * @brief Function for retrieving the state of a given interrupt. + * + * @param[in] p_timer Timer instance. + * @param[in] timer_int Interrupt to check. + * + * @retval true If the interrupt is enabled. + * @retval false If the interrupt is not enabled. + */ +__STATIC_INLINE bool nrf_timer_int_enable_check(NRF_TIMER_Type * p_timer, + uint32_t timer_int); + +/** + * @brief Function for setting the timer mode. + * + * @param[in] p_timer Timer instance. + * @param[in] mode Timer mode. + */ +__STATIC_INLINE void nrf_timer_mode_set(NRF_TIMER_Type * p_timer, + nrf_timer_mode_t mode); + +/** + * @brief Function for retrieving the timer mode. + * + * @param[in] p_timer Timer instance. + * + * @return Timer mode. + */ +__STATIC_INLINE nrf_timer_mode_t nrf_timer_mode_get(NRF_TIMER_Type * p_timer); + +/** + * @brief Function for setting the timer bit width. + * + * @param[in] p_timer Timer instance. + * @param[in] bit_width Timer bit width. + */ +__STATIC_INLINE void nrf_timer_bit_width_set(NRF_TIMER_Type * p_timer, + nrf_timer_bit_width_t bit_width); + +/** + * @brief Function for retrieving the timer bit width. + * + * @param[in] p_timer Timer instance. + * + * @return Timer bit width. + */ +__STATIC_INLINE nrf_timer_bit_width_t nrf_timer_bit_width_get(NRF_TIMER_Type * p_timer); + +/** + * @brief Function for setting the timer frequency. + * + * @param[in] p_timer Timer instance. + * @param[in] frequency Timer frequency. + */ +__STATIC_INLINE void nrf_timer_frequency_set(NRF_TIMER_Type * p_timer, + nrf_timer_frequency_t frequency); + +/** + * @brief Function for retrieving the timer frequency. + * + * @param[in] p_timer Timer instance. + * + * @return Timer frequency. + */ +__STATIC_INLINE nrf_timer_frequency_t nrf_timer_frequency_get(NRF_TIMER_Type * p_timer); + +/** + * @brief Function for writing the capture/compare register for a specified channel. + * + * @param[in] p_timer Timer instance. + * @param[in] cc_channel Requested capture/compare channel. + * @param[in] cc_value Value to write to the capture/compare register. + */ +__STATIC_INLINE void nrf_timer_cc_write(NRF_TIMER_Type * p_timer, + nrf_timer_cc_channel_t cc_channel, + uint32_t cc_value); + +/** + * @brief Function for retrieving the capture/compare value for a specified channel. + * + * @param[in] p_timer Timer instance. + * @param[in] cc_channel Requested capture/compare channel. + * + * @return Value from the requested capture/compare register. + */ +__STATIC_INLINE uint32_t nrf_timer_cc_read(NRF_TIMER_Type * p_timer, + nrf_timer_cc_channel_t cc_channel); + +/** + * @brief Function for getting a specific timer capture task. + * + * @param[in] channel Capture channel. + * + * @return Capture task. + */ +__STATIC_INLINE nrf_timer_task_t nrf_timer_capture_task_get(uint32_t channel); + +/** + * @brief Function for getting a specific timer compare event. + * + * @param[in] channel Compare channel. + * + * @return Compare event. + */ +__STATIC_INLINE nrf_timer_event_t nrf_timer_compare_event_get(uint32_t channel); + +/** + * @brief Function for getting a specific timer compare interrupt. + * + * @param[in] channel Compare channel. + * + * @return Compare interrupt. + */ +__STATIC_INLINE nrf_timer_int_mask_t nrf_timer_compare_int_get(uint32_t channel); + +/** + * @brief Function for calculating the number of timer ticks for a given time + * (in microseconds) and timer frequency. + * + * @param[in] time_us Time in microseconds. + * @param[in] frequency Timer frequency. + * + * @return Number of timer ticks. + */ +__STATIC_INLINE uint32_t nrf_timer_us_to_ticks(uint32_t time_us, + nrf_timer_frequency_t frequency); + +/** + * @brief Function for calculating the number of timer ticks for a given time + * (in milliseconds) and timer frequency. + * + * @param[in] time_ms Time in milliseconds. + * @param[in] frequency Timer frequency. + * + * @return Number of timer ticks. + */ +__STATIC_INLINE uint32_t nrf_timer_ms_to_ticks(uint32_t time_ms, + nrf_timer_frequency_t frequency); + + +#ifndef SUPPRESS_INLINE_IMPLEMENTATION + +__STATIC_INLINE void nrf_timer_task_trigger(NRF_TIMER_Type * p_timer, + nrf_timer_task_t task) +{ + *((volatile uint32_t *)((uint8_t *)p_timer + (uint32_t)task)) = 0x1UL; +} + +__STATIC_INLINE uint32_t * nrf_timer_task_address_get(NRF_TIMER_Type * p_timer, + nrf_timer_task_t task) +{ + return (uint32_t *)((uint8_t *)p_timer + (uint32_t)task); +} + +__STATIC_INLINE void nrf_timer_event_clear(NRF_TIMER_Type * p_timer, + nrf_timer_event_t event) +{ + *((volatile uint32_t *)((uint8_t *)p_timer + (uint32_t)event)) = 0x0UL; +} + +__STATIC_INLINE bool nrf_timer_event_check(NRF_TIMER_Type * p_timer, + nrf_timer_event_t event) +{ + return (bool)*(volatile uint32_t *)((uint8_t *)p_timer + (uint32_t)event); +} + +__STATIC_INLINE uint32_t * nrf_timer_event_address_get(NRF_TIMER_Type * p_timer, + nrf_timer_event_t event) +{ + return (uint32_t *)((uint8_t *)p_timer + (uint32_t)event); +} + +__STATIC_INLINE void nrf_timer_shorts_enable(NRF_TIMER_Type * p_timer, + uint32_t timer_shorts_mask) +{ + p_timer->SHORTS |= timer_shorts_mask; +} + +__STATIC_INLINE void nrf_timer_shorts_disable(NRF_TIMER_Type * p_timer, + uint32_t timer_shorts_mask) +{ + p_timer->SHORTS &= ~(timer_shorts_mask); +} + +__STATIC_INLINE void nrf_timer_int_enable(NRF_TIMER_Type * p_timer, + uint32_t timer_int_mask) +{ + p_timer->INTENSET = timer_int_mask; +} + +__STATIC_INLINE void nrf_timer_int_disable(NRF_TIMER_Type * p_timer, + uint32_t timer_int_mask) +{ + p_timer->INTENCLR = timer_int_mask; +} + +__STATIC_INLINE bool nrf_timer_int_enable_check(NRF_TIMER_Type * p_timer, + uint32_t timer_int) +{ + return (bool)(p_timer->INTENSET & timer_int); +} + +__STATIC_INLINE void nrf_timer_mode_set(NRF_TIMER_Type * p_timer, + nrf_timer_mode_t mode) +{ + p_timer->MODE = (p_timer->MODE & ~TIMER_MODE_MODE_Msk) | + ((mode << TIMER_MODE_MODE_Pos) & TIMER_MODE_MODE_Msk); +} + +__STATIC_INLINE nrf_timer_mode_t nrf_timer_mode_get(NRF_TIMER_Type * p_timer) +{ + return (nrf_timer_mode_t)(p_timer->MODE); +} + +__STATIC_INLINE void nrf_timer_bit_width_set(NRF_TIMER_Type * p_timer, + nrf_timer_bit_width_t bit_width) +{ + p_timer->BITMODE = (p_timer->BITMODE & ~TIMER_BITMODE_BITMODE_Msk) | + ((bit_width << TIMER_BITMODE_BITMODE_Pos) & + TIMER_BITMODE_BITMODE_Msk); +} + +__STATIC_INLINE nrf_timer_bit_width_t nrf_timer_bit_width_get(NRF_TIMER_Type * p_timer) +{ + return (nrf_timer_bit_width_t)(p_timer->BITMODE); +} + +__STATIC_INLINE void nrf_timer_frequency_set(NRF_TIMER_Type * p_timer, + nrf_timer_frequency_t frequency) +{ + p_timer->PRESCALER = (p_timer->PRESCALER & ~TIMER_PRESCALER_PRESCALER_Msk) | + ((frequency << TIMER_PRESCALER_PRESCALER_Pos) & + TIMER_PRESCALER_PRESCALER_Msk); +} + +__STATIC_INLINE nrf_timer_frequency_t nrf_timer_frequency_get(NRF_TIMER_Type * p_timer) +{ + return (nrf_timer_frequency_t)(p_timer->PRESCALER); +} + +__STATIC_INLINE void nrf_timer_cc_write(NRF_TIMER_Type * p_timer, + nrf_timer_cc_channel_t cc_channel, + uint32_t cc_value) +{ + p_timer->CC[cc_channel] = cc_value; +} + +__STATIC_INLINE uint32_t nrf_timer_cc_read(NRF_TIMER_Type * p_timer, + nrf_timer_cc_channel_t cc_channel) +{ + return (uint32_t)p_timer->CC[cc_channel]; +} + +__STATIC_INLINE nrf_timer_task_t nrf_timer_capture_task_get(uint32_t channel) +{ + return (nrf_timer_task_t) + ((uint32_t)NRF_TIMER_TASK_CAPTURE0 + (channel * sizeof(uint32_t))); +} + +__STATIC_INLINE nrf_timer_event_t nrf_timer_compare_event_get(uint32_t channel) +{ + return (nrf_timer_event_t) + ((uint32_t)NRF_TIMER_EVENT_COMPARE0 + (channel * sizeof(uint32_t))); +} + +__STATIC_INLINE nrf_timer_int_mask_t nrf_timer_compare_int_get(uint32_t channel) +{ + return (nrf_timer_int_mask_t) + ((uint32_t)NRF_TIMER_INT_COMPARE0_MASK << channel); +} + +__STATIC_INLINE uint32_t nrf_timer_us_to_ticks(uint32_t time_us, + nrf_timer_frequency_t frequency) +{ + // The "frequency" parameter here is actually the prescaler value, and the + // timer runs at the following frequency: f = 16 MHz / 2^prescaler. + uint32_t prescaler = (uint32_t)frequency; + ASSERT(time_us <= (UINT32_MAX / 16UL)); + return ((time_us * 16UL) >> prescaler); +} + +__STATIC_INLINE uint32_t nrf_timer_ms_to_ticks(uint32_t time_ms, + nrf_timer_frequency_t frequency) +{ + // The "frequency" parameter here is actually the prescaler value, and the + // timer runs at the following frequency: f = 16000 kHz / 2^prescaler. + uint32_t prescaler = (uint32_t)frequency; + ASSERT(time_ms <= (UINT32_MAX / 16000UL)); + return ((time_ms * 16000UL) >> prescaler); +} + +#endif // SUPPRESS_INLINE_IMPLEMENTATION + +#endif // NRF_TIMER_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_twi.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_twi.h new file mode 100644 index 0000000000..8cf448ba9a --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_twi.h @@ -0,0 +1,402 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef NRF_TWI_H__ +#define NRF_TWI_H__ + +/** + * @defgroup nrf_twi_hal TWI HAL + * @{ + * @ingroup nrf_twi_master + * + * @brief Hardware access layer for managing the TWI peripheral. + */ + +#include +#include +#include + +#include "nrf.h" + +/** + * @brief TWI tasks. + */ +typedef enum +{ + /*lint -save -e30*/ + NRF_TWI_TASK_STARTRX = offsetof(NRF_TWI_Type, TASKS_STARTRX), ///< Start TWI receive sequence. + NRF_TWI_TASK_STARTTX = offsetof(NRF_TWI_Type, TASKS_STARTTX), ///< Start TWI transmit sequence. + NRF_TWI_TASK_STOP = offsetof(NRF_TWI_Type, TASKS_STOP), ///< Stop TWI transaction. + NRF_TWI_TASK_SUSPEND = offsetof(NRF_TWI_Type, TASKS_SUSPEND), ///< Suspend TWI transaction. + NRF_TWI_TASK_RESUME = offsetof(NRF_TWI_Type, TASKS_RESUME) ///< Resume TWI transaction. + /*lint -restore*/ +} nrf_twi_task_t; + +/** + * @brief TWI events. + */ +typedef enum +{ + /*lint -save -e30*/ + NRF_TWI_EVENT_STOPPED = offsetof(NRF_TWI_Type, EVENTS_STOPPED), ///< TWI stopped. + NRF_TWI_EVENT_RXDREADY = offsetof(NRF_TWI_Type, EVENTS_RXDREADY), ///< TWI RXD byte received. + NRF_TWI_EVENT_TXDSENT = offsetof(NRF_TWI_Type, EVENTS_TXDSENT), ///< TWI TXD byte sent. + NRF_TWI_EVENT_ERROR = offsetof(NRF_TWI_Type, EVENTS_ERROR), ///< TWI error. + NRF_TWI_EVENT_BB = offsetof(NRF_TWI_Type, EVENTS_BB), ///< TWI byte boundary, generated before each byte that is sent or received. + NRF_TWI_EVENT_SUSPENDED = offsetof(NRF_TWI_Type, EVENTS_SUSPENDED) ///< TWI entered the suspended state. + /*lint -restore*/ +} nrf_twi_event_t; + +/** + * @brief TWI shortcuts. + */ +typedef enum +{ + NRF_TWI_SHORT_BB_SUSPEND_MASK = TWI_SHORTS_BB_SUSPEND_Msk, ///< Shortcut between BB event and SUSPEND task. + NRF_TWI_SHORT_BB_STOP_MASK = TWI_SHORTS_BB_STOP_Msk, ///< Shortcut between BB event and STOP task. +} nrf_twi_short_mask_t; + +/** + * @brief TWI interrupts. + */ +typedef enum +{ + NRF_TWI_INT_STOPPED_MASK = TWI_INTENSET_STOPPED_Msk, ///< Interrupt on STOPPED event. + NRF_TWI_INT_RXDREADY_MASK = TWI_INTENSET_RXDREADY_Msk, ///< Interrupt on RXDREADY event. + NRF_TWI_INT_TXDSENT_MASK = TWI_INTENSET_TXDSENT_Msk, ///< Interrupt on TXDSENT event. + NRF_TWI_INT_ERROR_MASK = TWI_INTENSET_ERROR_Msk, ///< Interrupt on ERROR event. + NRF_TWI_INT_BB_MASK = TWI_INTENSET_BB_Msk, ///< Interrupt on BB event. + NRF_TWI_INT_SUSPENDED_MASK = TWI_INTENSET_SUSPENDED_Msk ///< Interrupt on SUSPENDED event. +} nrf_twi_int_mask_t; + +/** + * @brief TWI error source. + */ +typedef enum +{ + NRF_TWI_ERROR_ADDRESS_NACK = TWI_ERRORSRC_ANACK_Msk, ///< NACK received after sending the address. + NRF_TWI_ERROR_DATA_NACK = TWI_ERRORSRC_DNACK_Msk, ///< NACK received after sending a data byte. + NRF_TWI_ERROR_OVERRUN = TWI_ERRORSRC_OVERRUN_Msk ///< Overrun error. + /**< A new byte was received before the previous byte was read + * from the RXD register (previous data is lost). */ +} nrf_twi_error_t; + +/** + * @brief TWI master clock frequency. + */ +typedef enum +{ + NRF_TWI_FREQ_100K = TWI_FREQUENCY_FREQUENCY_K100, ///< 100 kbps. + NRF_TWI_FREQ_250K = TWI_FREQUENCY_FREQUENCY_K250, ///< 250 kbps. + NRF_TWI_FREQ_400K = TWI_FREQUENCY_FREQUENCY_K400 ///< 400 kbps. +} nrf_twi_frequency_t; + + +/** + * @brief Function for activating a specific TWI task. + * + * @param[in] p_twi TWI instance. + * @param[in] task Task to activate. + */ +__STATIC_INLINE void nrf_twi_task_trigger(NRF_TWI_Type * p_twi, + nrf_twi_task_t task); + +/** + * @brief Function for getting the address of a specific TWI task register. + * + * @param[in] p_twi TWI instance. + * @param[in] task Requested task. + * + * @return Address of the specified task register. + */ +__STATIC_INLINE uint32_t * nrf_twi_task_address_get(NRF_TWI_Type * p_twi, + nrf_twi_task_t task); + +/** + * @brief Function for clearing a specific TWI event. + * + * @param[in] p_twi TWI instance. + * @param[in] event Event to clear. + */ +__STATIC_INLINE void nrf_twi_event_clear(NRF_TWI_Type * p_twi, + nrf_twi_event_t event); + +/** + * @brief Function for checking the state of a specific event. + * + * @param[in] p_twi TWI instance. + * @param[in] event Event to check. + * + * @retval true If the event is set. + * @retval false If the event is not set. + */ +__STATIC_INLINE bool nrf_twi_event_check(NRF_TWI_Type * p_twi, + nrf_twi_event_t event); + +/** + * @brief Function for getting the address of a specific TWI event register. + * + * @param[in] p_twi TWI instance. + * @param[in] event Requested event. + * + * @return Address of the specified event register. + */ +__STATIC_INLINE uint32_t * nrf_twi_event_address_get(NRF_TWI_Type * p_twi, + nrf_twi_event_t event); + +/** + * @brief Function for enabling specified shortcuts. + * + * @param[in] p_twi TWI instance. + * @param[in] shorts_mask Shortcuts to enable. + */ +__STATIC_INLINE void nrf_twi_shorts_enable(NRF_TWI_Type * p_twi, + uint32_t shorts_mask); + +/** + * @brief Function for disabling specified shortcuts. + * + * @param[in] p_twi TWI instance. + * @param[in] shorts_mask Shortcuts to disable. + */ +__STATIC_INLINE void nrf_twi_shorts_disable(NRF_TWI_Type * p_twi, + uint32_t shorts_mask); + +/** + * @brief Function for enabling specified interrupts. + * + * @param[in] p_twi TWI instance. + * @param[in] int_mask Interrupts to enable. + */ +__STATIC_INLINE void nrf_twi_int_enable(NRF_TWI_Type * p_twi, + uint32_t int_mask); + +/** + * @brief Function for disabling specified interrupts. + * + * @param[in] p_twi TWI instance. + * @param[in] int_mask Interrupts to disable. + */ +__STATIC_INLINE void nrf_twi_int_disable(NRF_TWI_Type * p_twi, + uint32_t int_mask); + +/** + * @brief Function for retrieving the state of a given interrupt. + * + * @param[in] p_twi TWI instance. + * @param[in] int_mask Interrupt to check. + * + * @retval true If the interrupt is enabled. + * @retval false If the interrupt is not enabled. + */ +__STATIC_INLINE bool nrf_twi_int_enable_check(NRF_TWI_Type * p_twi, + nrf_twi_int_mask_t int_mask); + +/** + * @brief Function for enabling the TWI peripheral. + * + * @param[in] p_twi TWI instance. + */ +__STATIC_INLINE void nrf_twi_enable(NRF_TWI_Type * p_twi); + +/** + * @brief Function for disabling the TWI peripheral. + * + * @param[in] p_twi TWI instance. + */ +__STATIC_INLINE void nrf_twi_disable(NRF_TWI_Type * p_twi); + +/** + * @brief Function for configuring TWI pins. + * + * + * @param[in] p_twi TWI instance. + * @param[in] scl_pin SCL pin number. + * @param[in] sda_pin SDA pin number. + */ +__STATIC_INLINE void nrf_twi_pins_set(NRF_TWI_Type * p_twi, + uint32_t scl_pin, + uint32_t sda_pin); + +/** + * @brief Function for setting the TWI master clock frequency. + * + * @param[in] p_twi TWI instance. + * @param[in] frequency TWI frequency. + */ +__STATIC_INLINE void nrf_twi_frequency_set(NRF_TWI_Type * p_twi, + nrf_twi_frequency_t frequency); + +/** + * @brief Function for checking the TWI error source. + * + * The error flags are cleared after reading. + * + * @param[in] p_twi TWI instance. + * + * @return Mask with error source flags. + */ +__STATIC_INLINE uint32_t nrf_twi_errorsrc_get_and_clear(NRF_TWI_Type * p_twi); + +/** + * @brief Function for setting the address to be used in TWI transfers. + * + * @param[in] p_twi TWI instance. + * @param[in] address Address to be used in transfers. + */ +__STATIC_INLINE void nrf_twi_address_set(NRF_TWI_Type * p_twi, uint8_t address); + +/** + * @brief Function for reading data received by TWI. + * + * @param[in] p_twi TWI instance. + * + * @return Received data. + */ +__STATIC_INLINE uint8_t nrf_twi_rxd_get(NRF_TWI_Type * p_twi); + +/** + * @brief Function for writing data to be transmitted by TWI. + * + * @param[in] p_twi TWI instance. + * @param[in] data Data to be transmitted. + */ +__STATIC_INLINE void nrf_twi_txd_set(NRF_TWI_Type * p_twi, uint8_t data); + +__STATIC_INLINE void nrf_twi_shorts_set(NRF_TWI_Type * p_twi, + uint32_t shorts_mask); + +/** + * @} + */ + + +#ifndef SUPPRESS_INLINE_IMPLEMENTATION + +__STATIC_INLINE void nrf_twi_task_trigger(NRF_TWI_Type * p_twi, + nrf_twi_task_t task) +{ + *((volatile uint32_t *)((uint8_t *)p_twi + (uint32_t)task)) = 0x1UL; +} + +__STATIC_INLINE uint32_t * nrf_twi_task_address_get(NRF_TWI_Type * p_twi, + nrf_twi_task_t task) +{ + return (uint32_t *)((uint8_t *)p_twi + (uint32_t)task); +} + +__STATIC_INLINE void nrf_twi_event_clear(NRF_TWI_Type * p_twi, + nrf_twi_event_t event) +{ + *((volatile uint32_t *)((uint8_t *)p_twi + (uint32_t)event)) = 0x0UL; +} + +__STATIC_INLINE bool nrf_twi_event_check(NRF_TWI_Type * p_twi, + nrf_twi_event_t event) +{ + return (bool)*(volatile uint32_t *)((uint8_t *)p_twi + (uint32_t)event); +} + +__STATIC_INLINE uint32_t * nrf_twi_event_address_get(NRF_TWI_Type * p_twi, + nrf_twi_event_t event) +{ + return (uint32_t *)((uint8_t *)p_twi + (uint32_t)event); +} + +__STATIC_INLINE void nrf_twi_shorts_enable(NRF_TWI_Type * p_twi, + uint32_t shorts_mask) +{ + p_twi->SHORTS |= shorts_mask; +} + +__STATIC_INLINE void nrf_twi_shorts_disable(NRF_TWI_Type * p_twi, + uint32_t shorts_mask) +{ + p_twi->SHORTS &= ~(shorts_mask); +} + +__STATIC_INLINE void nrf_twi_int_enable(NRF_TWI_Type * p_twi, + uint32_t int_mask) +{ + p_twi->INTENSET = int_mask; +} + +__STATIC_INLINE void nrf_twi_int_disable(NRF_TWI_Type * p_twi, + uint32_t int_mask) +{ + p_twi->INTENCLR = int_mask; +} + +__STATIC_INLINE bool nrf_twi_int_enable_check(NRF_TWI_Type * p_twi, + nrf_twi_int_mask_t int_mask) +{ + return (bool)(p_twi->INTENSET & int_mask); +} + +__STATIC_INLINE void nrf_twi_enable(NRF_TWI_Type * p_twi) +{ + p_twi->ENABLE = (TWI_ENABLE_ENABLE_Enabled << TWI_ENABLE_ENABLE_Pos); +} + +__STATIC_INLINE void nrf_twi_disable(NRF_TWI_Type * p_twi) +{ + p_twi->ENABLE = (TWI_ENABLE_ENABLE_Disabled << TWI_ENABLE_ENABLE_Pos); +} + +__STATIC_INLINE void nrf_twi_pins_set(NRF_TWI_Type * p_twi, + uint32_t scl_pin, + uint32_t sda_pin) +{ + p_twi->PSELSCL = scl_pin; + p_twi->PSELSDA = sda_pin; +} + +__STATIC_INLINE void nrf_twi_frequency_set(NRF_TWI_Type * p_twi, + nrf_twi_frequency_t frequency) +{ + p_twi->FREQUENCY = frequency; +} + +__STATIC_INLINE uint32_t nrf_twi_errorsrc_get_and_clear(NRF_TWI_Type * p_twi) +{ + uint32_t error_source = p_twi->ERRORSRC; + + // [error flags are cleared by writing '1' on their position] + p_twi->ERRORSRC = error_source; + + return error_source; +} + +__STATIC_INLINE void nrf_twi_address_set(NRF_TWI_Type * p_twi, uint8_t address) +{ + p_twi->ADDRESS = address; +} + +__STATIC_INLINE uint8_t nrf_twi_rxd_get(NRF_TWI_Type * p_twi) +{ + return (uint8_t)p_twi->RXD; +} + +__STATIC_INLINE void nrf_twi_txd_set(NRF_TWI_Type * p_twi, uint8_t data) +{ + p_twi->TXD = data; +} + +__STATIC_INLINE void nrf_twi_shorts_set(NRF_TWI_Type * p_twi, + uint32_t shorts_mask) +{ + p_twi->SHORTS = shorts_mask; +} + +#endif // SUPPRESS_INLINE_IMPLEMENTATION + +#endif // NRF_TWI_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_uart.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_uart.h new file mode 100644 index 0000000000..4cac9402b7 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_uart.h @@ -0,0 +1,471 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ +#ifndef NRF_UART_H__ +#define NRF_UART_H__ + +#include "nrf.h" +#include +#include +#include + +/** + * @defgroup nrf_uart_hal UART HAL + * @{ + * @ingroup nrf_uart + * + * @brief Hardware access layer for accessing the UART peripheral. + */ + +#define NRF_UART_PSEL_DISCONNECTED 0xFFFFFFFF + +/** + * @enum nrf_uart_task_t + * @brief UART tasks. + */ +typedef enum +{ + /*lint -save -e30 -esym(628,__INTADDR__)*/ + NRF_UART_TASK_STARTRX = offsetof(NRF_UART_Type, TASKS_STARTRX), /**< Task for starting reception. */ + NRF_UART_TASK_STOPRX = offsetof(NRF_UART_Type, TASKS_STOPRX), /**< Task for stopping reception. */ + NRF_UART_TASK_STARTTX = offsetof(NRF_UART_Type, TASKS_STARTTX), /**< Task for starting transmission. */ + NRF_UART_TASK_STOPTX = offsetof(NRF_UART_Type, TASKS_STOPTX), /**< Task for stopping transmission. */ + NRF_UART_TASK_SUSPEND = offsetof(NRF_UART_Type, TASKS_SUSPEND), /**< Task for suspending UART. */ + /*lint -restore*/ +} nrf_uart_task_t; + +/** + * @enum nrf_uart_event_t + * @brief UART events. + */ +typedef enum +{ + /*lint -save -e30*/ + NRF_UART_EVENT_CTS = offsetof(NRF_UART_Type, EVENTS_CTS), /**< Event from CTS line activation. */ + NRF_UART_EVENT_NCTS = offsetof(NRF_UART_Type, EVENTS_NCTS), /**< Event from CTS line deactivation. */ + NRF_UART_EVENT_RXDRDY = offsetof(NRF_UART_Type, EVENTS_RXDRDY),/**< Event from data ready in RXD. */ + NRF_UART_EVENT_TXDRDY = offsetof(NRF_UART_Type, EVENTS_TXDRDY),/**< Event from data sent from TXD. */ + NRF_UART_EVENT_ERROR = offsetof(NRF_UART_Type, EVENTS_ERROR), /**< Event from error detection. */ + NRF_UART_EVENT_RXTO = offsetof(NRF_UART_Type, EVENTS_RXTO) /**< Event from receiver timeout. */ + /*lint -restore*/ +} nrf_uart_event_t; + +/** + * @enum nrf_uart_int_mask_t + * @brief UART interrupts. + */ +typedef enum +{ + /*lint -save -e30*/ + NRF_UART_INT_MASK_CTS = UART_INTENCLR_CTS_Msk, /**< CTS line activation interrupt. */ + NRF_UART_INT_MASK_NCTS = UART_INTENCLR_NCTS_Msk, /**< CTS line deactivation interrupt. */ + NRF_UART_INT_MASK_RXDRDY = UART_INTENCLR_RXDRDY_Msk, /**< Data ready in RXD interrupt. */ + NRF_UART_INT_MASK_TXDRDY = UART_INTENCLR_TXDRDY_Msk, /**< Data sent from TXD interrupt. */ + NRF_UART_INT_MASK_ERROR = UART_INTENCLR_ERROR_Msk, /**< Error detection interrupt. */ + NRF_UART_INT_MASK_RXTO = UART_INTENCLR_RXTO_Msk /**< Receiver timeout interrupt. */ + /*lint -restore*/ +} nrf_uart_int_mask_t; + +/** + * @enum nrf_uart_baudrate_t + * @brief Baudrates supported by UART. + */ +typedef enum +{ +#ifdef NRF52 + NRF_UART_BAUDRATE_1200 = UARTE_BAUDRATE_BAUDRATE_Baud1200, /**< 1200 baud. */ + NRF_UART_BAUDRATE_2400 = UARTE_BAUDRATE_BAUDRATE_Baud2400, /**< 2400 baud. */ + NRF_UART_BAUDRATE_4800 = UARTE_BAUDRATE_BAUDRATE_Baud4800, /**< 4800 baud. */ + NRF_UART_BAUDRATE_9600 = UARTE_BAUDRATE_BAUDRATE_Baud9600, /**< 9600 baud. */ + NRF_UART_BAUDRATE_14400 = UARTE_BAUDRATE_BAUDRATE_Baud14400, /**< 14400 baud. */ + NRF_UART_BAUDRATE_19200 = UARTE_BAUDRATE_BAUDRATE_Baud19200, /**< 19200 baud. */ + NRF_UART_BAUDRATE_28800 = UARTE_BAUDRATE_BAUDRATE_Baud28800, /**< 28800 baud. */ + NRF_UART_BAUDRATE_38400 = UARTE_BAUDRATE_BAUDRATE_Baud38400, /**< 38400 baud. */ + NRF_UART_BAUDRATE_57600 = UARTE_BAUDRATE_BAUDRATE_Baud57600, /**< 57600 baud. */ + NRF_UART_BAUDRATE_76800 = UARTE_BAUDRATE_BAUDRATE_Baud76800, /**< 76800 baud. */ + NRF_UART_BAUDRATE_115200 = UARTE_BAUDRATE_BAUDRATE_Baud115200, /**< 115200 baud. */ + NRF_UART_BAUDRATE_230400 = UARTE_BAUDRATE_BAUDRATE_Baud230400, /**< 230400 baud. */ + NRF_UART_BAUDRATE_250000 = UARTE_BAUDRATE_BAUDRATE_Baud250000, /**< 250000 baud. */ + NRF_UART_BAUDRATE_460800 = UARTE_BAUDRATE_BAUDRATE_Baud460800, /**< 460800 baud. */ + NRF_UART_BAUDRATE_921600 = UARTE_BAUDRATE_BAUDRATE_Baud921600, /**< 921600 baud. */ + NRF_UART_BAUDRATE_1000000 = UARTE_BAUDRATE_BAUDRATE_Baud1M, /**< 1000000 baud. */ +#else + NRF_UART_BAUDRATE_1200 = UART_BAUDRATE_BAUDRATE_Baud1200, /**< 1200 baud. */ + NRF_UART_BAUDRATE_2400 = UART_BAUDRATE_BAUDRATE_Baud2400, /**< 2400 baud. */ + NRF_UART_BAUDRATE_4800 = UART_BAUDRATE_BAUDRATE_Baud4800, /**< 4800 baud. */ + NRF_UART_BAUDRATE_9600 = UART_BAUDRATE_BAUDRATE_Baud9600, /**< 9600 baud. */ + NRF_UART_BAUDRATE_14400 = UART_BAUDRATE_BAUDRATE_Baud14400, /**< 14400 baud. */ + NRF_UART_BAUDRATE_19200 = UART_BAUDRATE_BAUDRATE_Baud19200, /**< 19200 baud. */ + NRF_UART_BAUDRATE_28800 = UART_BAUDRATE_BAUDRATE_Baud28800, /**< 28800 baud. */ + NRF_UART_BAUDRATE_38400 = UART_BAUDRATE_BAUDRATE_Baud38400, /**< 38400 baud. */ + NRF_UART_BAUDRATE_57600 = UART_BAUDRATE_BAUDRATE_Baud57600, /**< 57600 baud. */ + NRF_UART_BAUDRATE_76800 = UART_BAUDRATE_BAUDRATE_Baud76800, /**< 76800 baud. */ + NRF_UART_BAUDRATE_115200 = UART_BAUDRATE_BAUDRATE_Baud115200, /**< 115200 baud. */ + NRF_UART_BAUDRATE_230400 = UART_BAUDRATE_BAUDRATE_Baud230400, /**< 230400 baud. */ + NRF_UART_BAUDRATE_250000 = UART_BAUDRATE_BAUDRATE_Baud250000, /**< 250000 baud. */ + NRF_UART_BAUDRATE_460800 = UART_BAUDRATE_BAUDRATE_Baud460800, /**< 460800 baud. */ + NRF_UART_BAUDRATE_921600 = UART_BAUDRATE_BAUDRATE_Baud921600, /**< 921600 baud. */ + NRF_UART_BAUDRATE_1000000 = UART_BAUDRATE_BAUDRATE_Baud1M, /**< 1000000 baud. */ +#endif +} nrf_uart_baudrate_t; + +/** + * @enum nrf_uart_error_mask_t + * @brief Types of UART error masks. + */ +typedef enum +{ + NRF_UART_ERROR_OVERRUN_MASK = UART_ERRORSRC_OVERRUN_Msk, /**< Overrun error. */ + NRF_UART_ERROR_PARITY_MASK = UART_ERRORSRC_PARITY_Msk, /**< Parity error. */ + NRF_UART_ERROR_FRAMING_MASK = UART_ERRORSRC_FRAMING_Msk, /**< Framing error. */ + NRF_UART_ERROR_BREAK_MASK = UART_ERRORSRC_BREAK_Msk, /**< Break error. */ +} nrf_uart_error_mask_t; + +/** + * @enum nrf_uart_parity_t + * @brief Types of UART parity modes. + */ +typedef enum +{ + NRF_UART_PARITY_EXCLUDED = UART_CONFIG_PARITY_Excluded << UART_CONFIG_PARITY_Pos, /**< Parity excluded. */ + NRF_UART_PARITY_INCLUDED = UART_CONFIG_PARITY_Included << UART_CONFIG_PARITY_Pos, /**< Parity included. */ +} nrf_uart_parity_t; + +/** + * @enum nrf_uart_hwfc_t + * @brief Types of UART flow control modes. + */ +typedef enum +{ + NRF_UART_HWFC_DISABLED = UART_CONFIG_HWFC_Disabled, /**< HW flow control disabled. */ + NRF_UART_HWFC_ENABLED = UART_CONFIG_HWFC_Enabled, /**< HW flow control enabled. */ +} nrf_uart_hwfc_t; + +/** + * @brief Function for clearing a specific UART event. + * + * @param[in] p_reg UART instance. + * @param[in] event Event to clear. + */ +__STATIC_INLINE void nrf_uart_event_clear(NRF_UART_Type * p_reg, nrf_uart_event_t event); + +/** + * @brief Function for checking the state of a specific UART event. + * + * @param[in] p_reg UART instance. + * @param[in] event Event to check. + * + * @retval True if event is set, False otherwise. + */ +__STATIC_INLINE bool nrf_uart_event_check(NRF_UART_Type * p_reg, nrf_uart_event_t event); + +/** + * @brief Function for returning the address of a specific UART event register. + * + * @param[in] p_reg UART instance. + * @param[in] event Desired event. + * + * @retval Address of specified event register. + */ +__STATIC_INLINE uint32_t nrf_uart_event_address_get(NRF_UART_Type * p_reg, + nrf_uart_event_t event); + +/** + * @brief Function for enabling a specific interrupt. + * + * @param p_reg Instance. + * @param int_mask Interrupts to enable. + */ +__STATIC_INLINE void nrf_uart_int_enable(NRF_UART_Type * p_reg, uint32_t int_mask); + +/** + * @brief Function for retrieving the state of a given interrupt. + * + * @param p_reg Instance. + * @param int_mask Mask of interrupt to check. + * + * @retval true If the interrupt is enabled. + * @retval false If the interrupt is not enabled. + */ +__STATIC_INLINE bool nrf_uart_int_enable_check(NRF_UART_Type * p_reg, uint32_t int_mask); + +/** + * @brief Function for disabling specific interrupts. + * + * @param p_reg Instance. + * @param int_mask Interrupts to disable. + */ +__STATIC_INLINE void nrf_uart_int_disable(NRF_UART_Type * p_reg, uint32_t int_mask); + +/** + * @brief Function for getting error source mask. Function is clearing error source flags after reading. + * + * @param p_reg Instance. + * @return Mask with error source flags. + */ +__STATIC_INLINE uint32_t nrf_uart_errorsrc_get_and_clear(NRF_UART_Type * p_reg); + +/** + * @brief Function for enabling UART. + * + * @param p_reg Instance. + */ +__STATIC_INLINE void nrf_uart_enable(NRF_UART_Type * p_reg); + +/** + * @brief Function for disabling UART. + * + * @param p_reg Instance. + */ +__STATIC_INLINE void nrf_uart_disable(NRF_UART_Type * p_reg); + +/** + * @brief Function for configuring TX/RX pins. + * + * @param p_reg Instance. + * @param pseltxd TXD pin number. + * @param pselrxd RXD pin number. + */ +__STATIC_INLINE void nrf_uart_txrx_pins_set(NRF_UART_Type * p_reg, uint32_t pseltxd, uint32_t pselrxd); + +/** + * @brief Function for disconnecting TX/RX pins. + * + * @param p_reg Instance. + */ +__STATIC_INLINE void nrf_uart_txrx_pins_disconnect(NRF_UART_Type * p_reg); + +/** + * @brief Function for getting TX pin. + * + * @param p_reg Instance. + */ +__STATIC_INLINE uint32_t nrf_uart_tx_pin_get(NRF_UART_Type * p_reg); + +/** + * @brief Function for getting RX pin. + * + * @param p_reg Instance. + */ +__STATIC_INLINE uint32_t nrf_uart_rx_pin_get(NRF_UART_Type * p_reg); + +/** + * @brief Function for getting RTS pin. + * + * @param p_reg Instance. + */ +__STATIC_INLINE uint32_t nrf_uart_rts_pin_get(NRF_UART_Type * p_reg); + +/** + * @brief Function for getting CTS pin. + * + * @param p_reg Instance. + */ +__STATIC_INLINE uint32_t nrf_uart_cts_pin_get(NRF_UART_Type * p_reg); + + +/** + * @brief Function for configuring flow control pins. + * + * @param p_reg Instance. + * @param pselrts RTS pin number. + * @param pselcts CTS pin number. + */ +__STATIC_INLINE void nrf_uart_hwfc_pins_set(NRF_UART_Type * p_reg, + uint32_t pselrts, + uint32_t pselcts); + +/** + * @brief Function for disconnecting flow control pins. + * + * @param p_reg Instance. + */ +__STATIC_INLINE void nrf_uart_hwfc_pins_disconnect(NRF_UART_Type * p_reg); + +/** + * @brief Function for reading RX data. + * + * @param p_reg Instance. + * @return Received byte. + */ +__STATIC_INLINE uint8_t nrf_uart_rxd_get(NRF_UART_Type * p_reg); + +/** + * @brief Function for setting Tx data. + * + * @param p_reg Instance. + * @param txd Byte. + */ +__STATIC_INLINE void nrf_uart_txd_set(NRF_UART_Type * p_reg, uint8_t txd); + +/** + * @brief Function for starting an UART task. + * + * @param p_reg Instance. + * @param task Task. + */ +__STATIC_INLINE void nrf_uart_task_trigger(NRF_UART_Type * p_reg, nrf_uart_task_t task); + +/** + * @brief Function for returning the address of a specific task register. + * + * @param p_reg Instance. + * @param task Task. + * + * @return Task address. + */ +__STATIC_INLINE uint32_t nrf_uart_task_address_get(NRF_UART_Type * p_reg, nrf_uart_task_t task); + +/** + * @brief Function for configuring UART. + * + * @param p_reg Instance. + * @param hwfc Hardware flow control. Enabled if true. + * @param parity Parity. Included if true. + */ +__STATIC_INLINE void nrf_uart_configure(NRF_UART_Type * p_reg, + nrf_uart_parity_t parity, + nrf_uart_hwfc_t hwfc); + +/** + * @brief Function for setting UART baudrate. + * + * @param p_reg Instance. + * @param baudrate Baudrate. + */ +__STATIC_INLINE void nrf_uart_baudrate_set(NRF_UART_Type * p_reg, nrf_uart_baudrate_t baudrate); + +#ifndef SUPPRESS_INLINE_IMPLEMENTATION +__STATIC_INLINE void nrf_uart_event_clear(NRF_UART_Type * p_reg, nrf_uart_event_t event) +{ + *((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event)) = 0x0UL; + +} + +__STATIC_INLINE bool nrf_uart_event_check(NRF_UART_Type * p_reg, nrf_uart_event_t event) +{ + return (bool)*(volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event); +} + +__STATIC_INLINE uint32_t nrf_uart_event_address_get(NRF_UART_Type * p_reg, + nrf_uart_event_t event) +{ + return (uint32_t)((uint8_t *)p_reg + (uint32_t)event); +} + +__STATIC_INLINE void nrf_uart_int_enable(NRF_UART_Type * p_reg, uint32_t int_mask) +{ + p_reg->INTENSET = int_mask; +} + +__STATIC_INLINE bool nrf_uart_int_enable_check(NRF_UART_Type * p_reg, uint32_t int_mask) +{ + return (bool)(p_reg->INTENSET & int_mask); +} + +__STATIC_INLINE void nrf_uart_int_disable(NRF_UART_Type * p_reg, uint32_t int_mask) +{ + p_reg->INTENCLR = int_mask; +} + +__STATIC_INLINE uint32_t nrf_uart_errorsrc_get_and_clear(NRF_UART_Type * p_reg) +{ + uint32_t errsrc_mask = p_reg->ERRORSRC; + p_reg->ERRORSRC = errsrc_mask; + return errsrc_mask; +} + +__STATIC_INLINE void nrf_uart_enable(NRF_UART_Type * p_reg) +{ + p_reg->ENABLE = UART_ENABLE_ENABLE_Enabled; +} + +__STATIC_INLINE void nrf_uart_disable(NRF_UART_Type * p_reg) +{ + p_reg->ENABLE = UART_ENABLE_ENABLE_Disabled; +} + +__STATIC_INLINE void nrf_uart_txrx_pins_set(NRF_UART_Type * p_reg, uint32_t pseltxd, uint32_t pselrxd) +{ + p_reg->PSELTXD = pseltxd; + p_reg->PSELRXD = pselrxd; +} + +__STATIC_INLINE void nrf_uart_txrx_pins_disconnect(NRF_UART_Type * p_reg) +{ + nrf_uart_txrx_pins_set(p_reg, NRF_UART_PSEL_DISCONNECTED, NRF_UART_PSEL_DISCONNECTED); +} + +__STATIC_INLINE uint32_t nrf_uart_tx_pin_get(NRF_UART_Type * p_reg) +{ + return p_reg->PSELTXD; +} + +__STATIC_INLINE uint32_t nrf_uart_rx_pin_get(NRF_UART_Type * p_reg) +{ + return p_reg->PSELRXD; +} + +__STATIC_INLINE uint32_t nrf_uart_rts_pin_get(NRF_UART_Type * p_reg) +{ + return p_reg->PSELRTS; +} + +__STATIC_INLINE uint32_t nrf_uart_cts_pin_get(NRF_UART_Type * p_reg) +{ + return p_reg->PSELCTS; +} + +__STATIC_INLINE void nrf_uart_hwfc_pins_set(NRF_UART_Type * p_reg, uint32_t pselrts, uint32_t pselcts) +{ + p_reg->PSELRTS = pselrts; + p_reg->PSELCTS = pselcts; +} + +__STATIC_INLINE void nrf_uart_hwfc_pins_disconnect(NRF_UART_Type * p_reg) +{ + nrf_uart_hwfc_pins_set(p_reg, NRF_UART_PSEL_DISCONNECTED, NRF_UART_PSEL_DISCONNECTED); +} + +__STATIC_INLINE uint8_t nrf_uart_rxd_get(NRF_UART_Type * p_reg) +{ + return p_reg->RXD; +} + +__STATIC_INLINE void nrf_uart_txd_set(NRF_UART_Type * p_reg, uint8_t txd) +{ + p_reg->TXD = txd; +} + +__STATIC_INLINE void nrf_uart_task_trigger(NRF_UART_Type * p_reg, nrf_uart_task_t task) +{ + *((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)task)) = 0x1UL; +} + +__STATIC_INLINE uint32_t nrf_uart_task_address_get(NRF_UART_Type * p_reg, nrf_uart_task_t task) +{ + return (uint32_t)p_reg + (uint32_t)task; +} + +__STATIC_INLINE void nrf_uart_configure(NRF_UART_Type * p_reg, + nrf_uart_parity_t parity, + nrf_uart_hwfc_t hwfc) +{ + p_reg->CONFIG = (uint32_t)parity | (uint32_t)hwfc; +} + +__STATIC_INLINE void nrf_uart_baudrate_set(NRF_UART_Type * p_reg, nrf_uart_baudrate_t baudrate) +{ + p_reg->BAUDRATE = baudrate; +} +#endif //SUPPRESS_INLINE_IMPLEMENTATION +/** @} */ +#endif //NRF_UART_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_uarte.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_uarte.h new file mode 100644 index 0000000000..8a4d42e7db --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_uarte.h @@ -0,0 +1,534 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ +#ifndef NRF_UARTE_H__ +#define NRF_UARTE_H__ + +#include "nrf.h" +#include +#include +#include + +#define NRF_UARTE_PSEL_DISCONNECTED 0xFFFFFFFF + +/** + * @defgroup nrf_uarte_hal UARTE HAL + * @{ + * @ingroup nrf_uart + * + * @brief Hardware access layer for accessing the UARTE peripheral. + */ + +/** + * @enum nrf_uarte_task_t + * @brief UARTE tasks. + */ +typedef enum +{ + /*lint -save -e30*/ + NRF_UARTE_TASK_STARTRX = offsetof(NRF_UARTE_Type, TASKS_STARTRX),///< Start UART receiver. + NRF_UARTE_TASK_STOPRX = offsetof(NRF_UARTE_Type, TASKS_STOPRX), ///< Stop UART receiver. + NRF_UARTE_TASK_STARTTX = offsetof(NRF_UARTE_Type, TASKS_STARTTX),///< Start UART transmitter. + NRF_UARTE_TASK_STOPTX = offsetof(NRF_UARTE_Type, TASKS_STOPTX), ///< Stop UART transmitter. + NRF_UARTE_TASK_FLUSHRX = offsetof(NRF_UARTE_Type, TASKS_FLUSHRX) ///< Flush RX FIFO in RX buffer. + /*lint -restore*/ +} nrf_uarte_task_t; + +/** + * @enum nrf_uarte_event_t + * @brief UARTE events. + */ +typedef enum +{ + /*lint -save -e30*/ + NRF_UARTE_EVENT_CTS = offsetof(NRF_UARTE_Type, EVENTS_CTS), ///< CTS is activated. + NRF_UARTE_EVENT_NCTS = offsetof(NRF_UARTE_Type, EVENTS_NCTS), ///< CTS is deactivated. + NRF_UARTE_EVENT_ENDRX = offsetof(NRF_UARTE_Type, EVENTS_ENDRX), ///< Receive buffer is filled up. + NRF_UARTE_EVENT_ENDTX = offsetof(NRF_UARTE_Type, EVENTS_ENDTX), ///< Last TX byte transmitted. + NRF_UARTE_EVENT_ERROR = offsetof(NRF_UARTE_Type, EVENTS_ERROR), ///< Error detected. + NRF_UARTE_EVENT_RXTO = offsetof(NRF_UARTE_Type, EVENTS_RXTO), ///< Receiver timeout. + NRF_UARTE_EVENT_RXSTARTED = offsetof(NRF_UARTE_Type, EVENTS_RXSTARTED),///< Receiver has started. + NRF_UARTE_EVENT_TXSTARTED = offsetof(NRF_UARTE_Type, EVENTS_TXSTARTED),///< Transmitter has started. + NRF_UARTE_EVENT_TXSTOPPED = offsetof(NRF_UARTE_Type, EVENTS_TXSTOPPED) ///< Transmitted stopped. + /*lint -restore*/ +} nrf_uarte_event_t; + +/** + * @brief Types of UARTE shortcuts. + */ +typedef enum +{ + NRF_UARTE_SHORT_ENDRX_STARTRX = UARTE_SHORTS_ENDRX_STARTRX_Msk,///< Shortcut between ENDRX event and STARTRX task. + NRF_UARTE_SHORT_ENDRX_STOPRX = UARTE_SHORTS_ENDRX_STOPRX_Msk, ///< Shortcut between ENDRX event and STOPRX task. +} nrf_uarte_short_t; + + +/** + * @enum nrf_uarte_int_mask_t + * @brief UARTE interrupts. + */ +typedef enum +{ + NRF_UARTE_INT_CTS_MASK = UARTE_INTENSET_CTS_Msk, ///< Interrupt on CTS event. + NRF_UARTE_INT_NCTSRX_MASK = UARTE_INTENSET_NCTS_Msk, ///< Interrupt on NCTS event. + NRF_UARTE_INT_ENDRX_MASK = UARTE_INTENSET_ENDRX_Msk, ///< Interrupt on ENDRX event. + NRF_UARTE_INT_ENDTX_MASK = UARTE_INTENSET_ENDTX_Msk, ///< Interrupt on ENDTX event. + NRF_UARTE_INT_ERROR_MASK = UARTE_INTENSET_ERROR_Msk, ///< Interrupt on ERROR event. + NRF_UARTE_INT_RXTO_MASK = UARTE_INTENSET_RXTO_Msk, ///< Interrupt on RXTO event. + NRF_UARTE_INT_RXSTARTED_MASK = UARTE_INTENSET_RXSTARTED_Msk,///< Interrupt on RXSTARTED event. + NRF_UARTE_INT_TXSTARTED_MASK = UARTE_INTENSET_TXSTARTED_Msk,///< Interrupt on TXSTARTED event. + NRF_UARTE_INT_TXSTOPPED_MASK = UARTE_INTENSET_TXSTOPPED_Msk ///< Interrupt on TXSTOPPED event. +} nrf_uarte_int_mask_t; + +/** + * @enum nrf_uarte_baudrate_t + * @brief Baudrates supported by UARTE. + */ +typedef enum +{ + NRF_UARTE_BAUDRATE_1200 = UARTE_BAUDRATE_BAUDRATE_Baud1200, ///< 1200 baud. + NRF_UARTE_BAUDRATE_2400 = UARTE_BAUDRATE_BAUDRATE_Baud2400, ///< 2400 baud. + NRF_UARTE_BAUDRATE_4800 = UARTE_BAUDRATE_BAUDRATE_Baud4800, ///< 4800 baud. + NRF_UARTE_BAUDRATE_9600 = UARTE_BAUDRATE_BAUDRATE_Baud9600, ///< 9600 baud. + NRF_UARTE_BAUDRATE_14400 = UARTE_BAUDRATE_BAUDRATE_Baud14400, ///< 14400 baud. + NRF_UARTE_BAUDRATE_19200 = UARTE_BAUDRATE_BAUDRATE_Baud19200, ///< 19200 baud. + NRF_UARTE_BAUDRATE_28800 = UARTE_BAUDRATE_BAUDRATE_Baud28800, ///< 28800 baud. + NRF_UARTE_BAUDRATE_38400 = UARTE_BAUDRATE_BAUDRATE_Baud38400, ///< 38400 baud. + NRF_UARTE_BAUDRATE_57600 = UARTE_BAUDRATE_BAUDRATE_Baud57600, ///< 57600 baud. + NRF_UARTE_BAUDRATE_76800 = UARTE_BAUDRATE_BAUDRATE_Baud76800, ///< 76800 baud. + NRF_UARTE_BAUDRATE_115200 = UARTE_BAUDRATE_BAUDRATE_Baud115200, ///< 115200 baud. + NRF_UARTE_BAUDRATE_230400 = UARTE_BAUDRATE_BAUDRATE_Baud230400, ///< 230400 baud. + NRF_UARTE_BAUDRATE_250000 = UARTE_BAUDRATE_BAUDRATE_Baud250000, ///< 250000 baud. + NRF_UARTE_BAUDRATE_460800 = UARTE_BAUDRATE_BAUDRATE_Baud460800, ///< 460800 baud. + NRF_UARTE_BAUDRATE_921600 = UARTE_BAUDRATE_BAUDRATE_Baud921600, ///< 921600 baud. + NRF_UARTE_BAUDRATE_1000000 = UARTE_BAUDRATE_BAUDRATE_Baud1M, ///< 1000000 baud. +} nrf_uarte_baudrate_t; + +/** + * @enum nrf_uarte_error_mask_t + * @brief Types of UARTE error masks. + */ +typedef enum +{ + NRF_UARTE_ERROR_OVERRUN_MASK = UARTE_ERRORSRC_OVERRUN_Msk, ///< Overrun error. + NRF_UARTE_ERROR_PARITY_MASK = UARTE_ERRORSRC_PARITY_Msk, ///< Parity error. + NRF_UARTE_ERROR_FRAMING_MASK = UARTE_ERRORSRC_FRAMING_Msk, ///< Framing error. + NRF_UARTE_ERROR_BREAK_MASK = UARTE_ERRORSRC_BREAK_Msk, ///< Break error. +} nrf_uarte_error_mask_t; + +/** + * @enum nrf_uarte_parity_t + * @brief Types of UARTE parity modes. + */ +typedef enum +{ + NRF_UARTE_PARITY_EXCLUDED = UARTE_CONFIG_PARITY_Excluded << UARTE_CONFIG_PARITY_Pos, ///< Parity excluded. + NRF_UARTE_PARITY_INCLUDED = UARTE_CONFIG_PARITY_Included << UARTE_CONFIG_PARITY_Pos, ///< Parity included. +} nrf_uarte_parity_t; + +/** + * @enum nrf_uarte_hwfc_t + * @brief Types of UARTE flow control modes. + */ +typedef enum +{ + NRF_UARTE_HWFC_DISABLED = UARTE_CONFIG_HWFC_Disabled << UARTE_CONFIG_HWFC_Pos, ///< HW flow control disabled. + NRF_UARTE_HWFC_ENABLED = UARTE_CONFIG_HWFC_Enabled << UARTE_CONFIG_HWFC_Pos, ///< HW flow control enabled. +} nrf_uarte_hwfc_t; + + +/** + * @brief Function for clearing a specific UARTE event. + * + * @param[in] p_reg UARTE instance. + * @param[in] event Event to clear. + */ +__STATIC_INLINE void nrf_uarte_event_clear(NRF_UARTE_Type * p_reg, nrf_uarte_event_t event); + +/** + * @brief Function for checking the state of a specific UARTE event. + * + * @param[in] p_reg UARTE instance. + * @param[in] event Event to check. + * + * @retval True if event is set, False otherwise. + */ +__STATIC_INLINE bool nrf_uarte_event_check(NRF_UARTE_Type * p_reg, nrf_uarte_event_t event); + +/** + * @brief Function for returning the address of a specific UARTE event register. + * + * @param[in] p_reg UARTE instance. + * @param[in] event Desired event. + * + * @retval Address of specified event register. + */ +__STATIC_INLINE uint32_t nrf_uarte_event_address_get(NRF_UARTE_Type * p_reg, + nrf_uarte_event_t event); + +/** + * @brief Function for enabling UARTE shortcuts. + * + * @param p_reg UARTE instance. + * @param shorts_mask Shortcuts to enable. + */ +__STATIC_INLINE void nrf_uarte_shorts_enable(NRF_UARTE_Type * p_reg, uint32_t shorts_mask); + +/** + * @brief Function for disabling UARTE shortcuts. + * + * @param p_reg UARTE instance. + * @param shorts_mask Shortcuts to disable. + */ +__STATIC_INLINE void nrf_uarte_shorts_disable(NRF_UARTE_Type * p_reg, uint32_t shorts_mask); + +/** + * @brief Function for enabling UARTE interrupts. + * + * @param p_reg Instance. + * @param int_mask Interrupts to enable. + */ +__STATIC_INLINE void nrf_uarte_int_enable(NRF_UARTE_Type * p_reg, uint32_t int_mask); + +/** + * @brief Function for retrieving the state of a given interrupt. + * + * @param p_reg Instance. + * @param int_mask Mask of interrupt to check. + * + * @retval true If the interrupt is enabled. + * @retval false If the interrupt is not enabled. + */ +__STATIC_INLINE bool nrf_uarte_int_enable_check(NRF_UARTE_Type * p_reg, nrf_uarte_int_mask_t int_mask); + +/** + * @brief Function for disabling specific interrupts. + * + * @param p_reg Instance. + * @param int_mask Interrupts to disable. + */ +__STATIC_INLINE void nrf_uarte_int_disable(NRF_UARTE_Type * p_reg, uint32_t int_mask); + +/** + * @brief Function for getting error source mask. Function is clearing error source flags after reading. + * + * @param p_reg Instance. + * @return Mask with error source flags. + */ +__STATIC_INLINE uint32_t nrf_uarte_errorsrc_get_and_clear(NRF_UARTE_Type * p_reg); + +/** + * @brief Function for enabling UARTE. + * + * @param p_reg Instance. + */ +__STATIC_INLINE void nrf_uarte_enable(NRF_UARTE_Type * p_reg); + +/** + * @brief Function for disabling UARTE. + * + * @param p_reg Instance. + */ +__STATIC_INLINE void nrf_uarte_disable(NRF_UARTE_Type * p_reg); + +/** + * @brief Function for configuring TX/RX pins. + * + * @param p_reg Instance. + * @param pseltxd TXD pin number. + * @param pselrxd RXD pin number. + */ +__STATIC_INLINE void nrf_uarte_txrx_pins_set(NRF_UARTE_Type * p_reg, uint32_t pseltxd, uint32_t pselrxd); + +/** + * @brief Function for disconnecting TX/RX pins. + * + * @param p_reg Instance. + */ +__STATIC_INLINE void nrf_uarte_txrx_pins_disconnect(NRF_UARTE_Type * p_reg); + +/** + * @brief Function for getting TX pin. + * + * @param p_reg Instance. + */ +__STATIC_INLINE uint32_t nrf_uarte_tx_pin_get(NRF_UARTE_Type * p_reg); + +/** + * @brief Function for getting RX pin. + * + * @param p_reg Instance. + */ +__STATIC_INLINE uint32_t nrf_uarte_rx_pin_get(NRF_UARTE_Type * p_reg); + +/** + * @brief Function for getting RTS pin. + * + * @param p_reg Instance. + */ +__STATIC_INLINE uint32_t nrf_uarte_rts_pin_get(NRF_UARTE_Type * p_reg); + +/** + * @brief Function for getting CTS pin. + * + * @param p_reg Instance. + */ +__STATIC_INLINE uint32_t nrf_uarte_cts_pin_get(NRF_UARTE_Type * p_reg); + + +/** + * @brief Function for configuring flow control pins. + * + * @param p_reg Instance. + * @param pselrts RTS pin number. + * @param pselcts CTS pin number. + */ +__STATIC_INLINE void nrf_uarte_hwfc_pins_set(NRF_UARTE_Type * p_reg, + uint32_t pselrts, + uint32_t pselcts); + +/** + * @brief Function for disconnecting flow control pins. + * + * @param p_reg Instance. + */ +__STATIC_INLINE void nrf_uarte_hwfc_pins_disconnect(NRF_UARTE_Type * p_reg); + +/** + * @brief Function for starting an UARTE task. + * + * @param p_reg Instance. + * @param task Task. + */ +__STATIC_INLINE void nrf_uarte_task_trigger(NRF_UARTE_Type * p_reg, nrf_uarte_task_t task); + +/** + * @brief Function for returning the address of a specific task register. + * + * @param p_reg Instance. + * @param task Task. + * + * @return Task address. + */ +__STATIC_INLINE uint32_t nrf_uarte_task_address_get(NRF_UARTE_Type * p_reg, nrf_uarte_task_t task); + +/** + * @brief Function for configuring UARTE. + * + * @param p_reg Instance. + * @param hwfc Hardware flow control. Enabled if true. + * @param parity Parity. Included if true. + */ +__STATIC_INLINE void nrf_uarte_configure(NRF_UARTE_Type * p_reg, + nrf_uarte_parity_t parity, + nrf_uarte_hwfc_t hwfc); + + +/** + * @brief Function for setting UARTE baudrate. + * + * @param p_reg Instance. + * @param baudrate Baudrate. + */ +__STATIC_INLINE void nrf_uarte_baudrate_set(NRF_UARTE_Type * p_reg, nrf_uarte_baudrate_t baudrate); + +/** + * @brief Function for setting the transmit buffer. + * + * @param[in] p_reg Instance. + * @param[in] p_buffer Pointer to the buffer with data to send. + * @param[in] length Maximum number of data bytes to transmit. + */ +__STATIC_INLINE void nrf_uarte_tx_buffer_set(NRF_UARTE_Type * p_reg, + uint8_t const * p_buffer, + uint8_t length); + +/** + * @brief Function for getting number of bytes transmitted in the last transaction. + * + * @param[in] p_reg Instance. + * + * @retval Amount of bytes transmitted. + */ +__STATIC_INLINE uint32_t nrf_uarte_tx_amount_get(NRF_UARTE_Type * p_reg); + +/** + * @brief Function for setting the receive buffer. + * + * @param[in] p_reg Instance. + * @param[in] p_buffer Pointer to the buffer for received data. + * @param[in] length Maximum number of data bytes to receive. + */ +__STATIC_INLINE void nrf_uarte_rx_buffer_set(NRF_UARTE_Type * p_reg, + uint8_t * p_buffer, + uint8_t length); + +/** + * @brief Function for getting number of bytes received in the last transaction. + * + * @param[in] p_reg Instance. + * + * @retval Amount of bytes received. + */ +__STATIC_INLINE uint32_t nrf_uarte_rx_amount_get(NRF_UARTE_Type * p_reg); + +#ifndef SUPPRESS_INLINE_IMPLEMENTATION +__STATIC_INLINE void nrf_uarte_event_clear(NRF_UARTE_Type * p_reg, nrf_uarte_event_t event) +{ + *((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event)) = 0x0UL; + +} + +__STATIC_INLINE bool nrf_uarte_event_check(NRF_UARTE_Type * p_reg, nrf_uarte_event_t event) +{ + return (bool)*(volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event); +} + +__STATIC_INLINE uint32_t nrf_uarte_event_address_get(NRF_UARTE_Type * p_reg, + nrf_uarte_event_t event) +{ + return (uint32_t)((uint8_t *)p_reg + (uint32_t)event); +} + +__STATIC_INLINE void nrf_uarte_shorts_enable(NRF_UARTE_Type * p_reg, uint32_t shorts_mask) +{ + p_reg->SHORTS |= shorts_mask; +} + +__STATIC_INLINE void nrf_uarte_shorts_disable(NRF_UARTE_Type * p_reg, uint32_t shorts_mask) +{ + p_reg->SHORTS &= ~(shorts_mask); +} + +__STATIC_INLINE void nrf_uarte_int_enable(NRF_UARTE_Type * p_reg, uint32_t int_mask) +{ + p_reg->INTENSET = int_mask; +} + +__STATIC_INLINE bool nrf_uarte_int_enable_check(NRF_UARTE_Type * p_reg, nrf_uarte_int_mask_t int_mask) +{ + return (bool)(p_reg->INTENSET & int_mask); +} + +__STATIC_INLINE void nrf_uarte_int_disable(NRF_UARTE_Type * p_reg, uint32_t int_mask) +{ + p_reg->INTENCLR = int_mask; +} + +__STATIC_INLINE uint32_t nrf_uarte_errorsrc_get_and_clear(NRF_UARTE_Type * p_reg) +{ + uint32_t errsrc_mask = p_reg->ERRORSRC; + p_reg->ERRORSRC = errsrc_mask; + return errsrc_mask; +} + +__STATIC_INLINE void nrf_uarte_enable(NRF_UARTE_Type * p_reg) +{ + p_reg->ENABLE = UARTE_ENABLE_ENABLE_Enabled; +} + +__STATIC_INLINE void nrf_uarte_disable(NRF_UARTE_Type * p_reg) +{ + p_reg->ENABLE = UARTE_ENABLE_ENABLE_Disabled; +} + +__STATIC_INLINE void nrf_uarte_txrx_pins_set(NRF_UARTE_Type * p_reg, uint32_t pseltxd, uint32_t pselrxd) +{ + p_reg->PSEL.TXD = pseltxd; + p_reg->PSEL.RXD = pselrxd; +} + +__STATIC_INLINE void nrf_uarte_txrx_pins_disconnect(NRF_UARTE_Type * p_reg) +{ + nrf_uarte_txrx_pins_set(p_reg, NRF_UARTE_PSEL_DISCONNECTED, NRF_UARTE_PSEL_DISCONNECTED); +} + +__STATIC_INLINE uint32_t nrf_uarte_tx_pin_get(NRF_UARTE_Type * p_reg) +{ + return p_reg->PSEL.TXD; +} + +__STATIC_INLINE uint32_t nrf_uarte_rx_pin_get(NRF_UARTE_Type * p_reg) +{ + return p_reg->PSEL.RXD; +} + +__STATIC_INLINE uint32_t nrf_uarte_rts_pin_get(NRF_UARTE_Type * p_reg) +{ + return p_reg->PSEL.RTS; +} + +__STATIC_INLINE uint32_t nrf_uarte_cts_pin_get(NRF_UARTE_Type * p_reg) +{ + return p_reg->PSEL.CTS; +} + +__STATIC_INLINE void nrf_uarte_hwfc_pins_set(NRF_UARTE_Type * p_reg, uint32_t pselrts, uint32_t pselcts) +{ + p_reg->PSEL.RTS = pselrts; + p_reg->PSEL.CTS = pselcts; +} + +__STATIC_INLINE void nrf_uarte_hwfc_pins_disconnect(NRF_UARTE_Type * p_reg) +{ + nrf_uarte_hwfc_pins_set(p_reg, NRF_UARTE_PSEL_DISCONNECTED, NRF_UARTE_PSEL_DISCONNECTED); +} + +__STATIC_INLINE void nrf_uarte_task_trigger(NRF_UARTE_Type * p_reg, nrf_uarte_task_t task) +{ + *((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)task)) = 0x1UL; +} + +__STATIC_INLINE uint32_t nrf_uarte_task_address_get(NRF_UARTE_Type * p_reg, nrf_uarte_task_t task) +{ + return (uint32_t)p_reg + (uint32_t)task; +} + +__STATIC_INLINE void nrf_uarte_configure(NRF_UARTE_Type * p_reg, + nrf_uarte_parity_t parity, + nrf_uarte_hwfc_t hwfc) +{ + p_reg->CONFIG = (uint32_t)parity | (uint32_t)hwfc; +} + +__STATIC_INLINE void nrf_uarte_baudrate_set(NRF_UARTE_Type * p_reg, nrf_uarte_baudrate_t baudrate) +{ + p_reg->BAUDRATE = baudrate; +} + +__STATIC_INLINE void nrf_uarte_tx_buffer_set(NRF_UARTE_Type * p_reg, + uint8_t const * p_buffer, + uint8_t length) +{ + p_reg->TXD.PTR = (uint32_t)p_buffer; + p_reg->TXD.MAXCNT = length; +} + +__STATIC_INLINE uint32_t nrf_uarte_tx_amount_get(NRF_UARTE_Type * p_reg) +{ + return p_reg->TXD.AMOUNT; +} + +__STATIC_INLINE void nrf_uarte_rx_buffer_set(NRF_UARTE_Type * p_reg, + uint8_t * p_buffer, + uint8_t length) +{ + p_reg->RXD.PTR = (uint32_t)p_buffer; + p_reg->RXD.MAXCNT = length; +} + +__STATIC_INLINE uint32_t nrf_uarte_rx_amount_get(NRF_UARTE_Type * p_reg) +{ + return p_reg->RXD.AMOUNT; +} +#endif //SUPPRESS_INLINE_IMPLEMENTATION +/** @} */ +#endif //NRF_UARTE_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ppi/nrf_drv_ppi.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ppi/nrf_drv_ppi.c new file mode 100644 index 0000000000..e487279de8 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ppi/nrf_drv_ppi.c @@ -0,0 +1,427 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include + +#include "nrf.h" +#include "nrf_drv_ppi.h" +#include "nrf_drv_common.h" +#include "nrf_ppi.h" +#include "app_util_platform.h" +#include "sdk_common.h" + + +static nrf_drv_state_t m_drv_state; /**< Driver state */ +static uint32_t m_channels_allocated; /**< Bitmap representing channels availability. 1 when a channel is allocated, 0 otherwise. */ +static uint8_t m_groups_allocated; /**< Bitmap representing groups availability. 1 when a group is allocated, 0 otherwise.*/ + + +/**@brief Compute a group mask (needed for driver internals, not used for NRF_PPI registers). + * @param[in] group Group number to transform to a mask. + * @retval Group mask. + */ +__STATIC_INLINE uint32_t group_to_mask(nrf_ppi_channel_group_t group) +{ + return (1uL << (uint32_t) group); +} + + +/**@brief Check whether a channel is a programmable channel and can be used by an application. + * @param[in] channel Channel to check. + * @retval true The channel is a programmable application channel. + * false The channel is used by a SoftDevice or is preprogrammed. + */ +__STATIC_INLINE bool is_programmable_app_channel(nrf_ppi_channel_t channel) +{ + return ((NRF_PPI_PROG_APP_CHANNELS_MASK & nrf_drv_ppi_channel_to_mask(channel)) != 0); +} + + +/**@brief Check whether a channels can be used by an application. + * @param[in] channel Channel mask to check. + * @retval true All specified channels can be used by an application. + * false At least one specified channel is used by a SoftDevice. + */ +__STATIC_INLINE bool are_app_channels(uint32_t channel_mask) +{ + //lint -e(587) + return ((~(NRF_PPI_ALL_APP_CHANNELS_MASK) & channel_mask) == 0); +} + + +/**@brief Check whether a channel can be used by an application. + * @param[in] channel Channel to check. + * @retval true The channel can be used by an application. + * false The channel is used by a SoftDevice. + */ +__STATIC_INLINE bool is_app_channel(nrf_ppi_channel_t channel) +{ + return are_app_channels(nrf_drv_ppi_channel_to_mask(channel)); +} + + +/**@brief Check whether a channel group can be used by an application. + * @param[in] group Group to check. + * @retval true The group is an application group. + * false The group is not an application group (this group either does not exist or + * it is used by a SoftDevice). + */ +__STATIC_INLINE bool is_app_group(nrf_ppi_channel_group_t group) +{ + return ((NRF_PPI_ALL_APP_GROUPS_MASK & group_to_mask(group)) != 0); +} + + +/**@brief Check whether a channel is allocated. + * @param[in] channel_num Channel number to check. + * @retval true The channel is allocated. + * false The channel is not allocated. + */ +__STATIC_INLINE bool is_allocated_channel(nrf_ppi_channel_t channel) +{ + return ((m_channels_allocated & nrf_drv_ppi_channel_to_mask(channel)) != 0); +} + + +/**@brief Set channel allocated indication. + * @param[in] channel_num Specifies the channel to set the "allocated" indication. + */ +__STATIC_INLINE void channel_allocated_set(nrf_ppi_channel_t channel) +{ + m_channels_allocated |= nrf_drv_ppi_channel_to_mask(channel); +} + + +/**@brief Clear channel allocated indication. + * @param[in] channel_num Specifies the channel to clear the "allocated" indication. + */ +__STATIC_INLINE void channel_allocated_clr(nrf_ppi_channel_t channel) +{ + m_channels_allocated &= ~nrf_drv_ppi_channel_to_mask(channel); +} + + +/**@brief Clear all allocated channels. + */ +__STATIC_INLINE void channel_allocated_clr_all(void) +{ + m_channels_allocated &= ~NRF_PPI_ALL_APP_CHANNELS_MASK; +} + + +/**@brief Check whether a group is allocated. + * @param[in] group_num Group number to check. + * @retval true The group is allocated. + * false The group is not allocated. + */ +__STATIC_INLINE bool is_allocated_group(nrf_ppi_channel_group_t group) +{ + return ((m_groups_allocated & group_to_mask(group)) != 0); +} + + +/**@brief Set group allocated indication. + * @param[in] group_num Specifies the group to set the "allocated" indication. + */ +__STATIC_INLINE void group_allocated_set(nrf_ppi_channel_group_t group) +{ + m_groups_allocated |= group_to_mask(group); +} + + +/**@brief Clear group allocated indication. + * @param[in] group_num Specifies the group to clear the "allocated" indication. + */ +__STATIC_INLINE void group_allocated_clr(nrf_ppi_channel_group_t group) +{ + m_groups_allocated &= ~group_to_mask(group); +} + + +/**@brief Clear all allocated groups. + */ +__STATIC_INLINE void group_allocated_clr_all() +{ + m_groups_allocated &= ~NRF_PPI_ALL_APP_GROUPS_MASK; +} + + +uint32_t nrf_drv_ppi_init(void) +{ + uint32_t err_code; + + if (m_drv_state == NRF_DRV_STATE_UNINITIALIZED) + { + m_drv_state = NRF_DRV_STATE_INITIALIZED; + err_code = NRF_SUCCESS; + } + else + { + err_code = MODULE_ALREADY_INITIALIZED; + } + + return err_code; +} + + +uint32_t nrf_drv_ppi_uninit(void) +{ + uint32_t mask = NRF_PPI_ALL_APP_GROUPS_MASK; + nrf_ppi_channel_group_t group; + + if (m_drv_state == NRF_DRV_STATE_UNINITIALIZED) + { + return NRF_ERROR_INVALID_STATE; + } + + m_drv_state = NRF_DRV_STATE_UNINITIALIZED; + + // Disable all channels and groups + nrf_ppi_channels_disable(NRF_PPI_ALL_APP_CHANNELS_MASK); + + for (group = NRF_PPI_CHANNEL_GROUP0; mask != 0; mask &= ~group_to_mask(group), group++) + { + if(mask & group_to_mask(group)) + { + nrf_ppi_channel_group_clear(group); + } + } + channel_allocated_clr_all(); + group_allocated_clr_all(); + return NRF_SUCCESS; +} + + +uint32_t nrf_drv_ppi_channel_alloc(nrf_ppi_channel_t * p_channel) +{ + uint32_t err_code; + nrf_ppi_channel_t channel; + uint32_t mask = 0; + + err_code = NRF_ERROR_NO_MEM; + + mask = NRF_PPI_PROG_APP_CHANNELS_MASK; + for (channel = NRF_PPI_CHANNEL0; mask != 0; mask &= ~nrf_drv_ppi_channel_to_mask(channel), channel++) + { + CRITICAL_REGION_ENTER(); + if ((mask & nrf_drv_ppi_channel_to_mask(channel)) && (!is_allocated_channel(channel))) + { + channel_allocated_set(channel); + *p_channel = channel; + err_code = NRF_SUCCESS; + } + CRITICAL_REGION_EXIT(); + if (err_code == NRF_SUCCESS) + { + break; + } + } + + return err_code; +} + + +uint32_t nrf_drv_ppi_channel_free(nrf_ppi_channel_t channel) +{ + if (!is_programmable_app_channel(channel)) + { + return NRF_ERROR_INVALID_PARAM; + } + // First disable this channel + nrf_ppi_channel_disable(channel); + CRITICAL_REGION_ENTER(); + channel_allocated_clr(channel); + CRITICAL_REGION_EXIT(); + return NRF_SUCCESS; +} + + +uint32_t nrf_drv_ppi_channel_assign(nrf_ppi_channel_t channel, uint32_t eep, uint32_t tep) +{ + VERIFY_PARAM_NOT_NULL((uint32_t *)eep); + VERIFY_PARAM_NOT_NULL((uint32_t *)tep); + + if (!is_programmable_app_channel(channel)) + { + return NRF_ERROR_INVALID_PARAM; + } + if (!is_allocated_channel(channel)) + { + return NRF_ERROR_INVALID_STATE; + } + + nrf_ppi_channel_endpoint_setup(channel, eep, tep); + return NRF_SUCCESS; +} + +uint32_t nrf_drv_ppi_channel_fork_assign(nrf_ppi_channel_t channel, uint32_t fork_tep) +{ +#ifdef NRF51 + return NRF_ERROR_NOT_SUPPORTED; +#else + if (!is_programmable_app_channel(channel)) + { + return NRF_ERROR_INVALID_PARAM; + } + if (!is_allocated_channel(channel)) + { + return NRF_ERROR_INVALID_STATE; + } + nrf_ppi_fork_endpoint_setup(channel, fork_tep); + return NRF_SUCCESS; +#endif +} + +uint32_t nrf_drv_ppi_channel_enable(nrf_ppi_channel_t channel) +{ + if (!is_app_channel(channel)) + { + return NRF_ERROR_INVALID_PARAM; + } + if (is_programmable_app_channel(channel) && !is_allocated_channel(channel)) + { + return NRF_ERROR_INVALID_STATE; + } + nrf_ppi_channel_enable(channel); + return NRF_SUCCESS; +} + + +uint32_t nrf_drv_ppi_channel_disable(nrf_ppi_channel_t channel) +{ + if (!is_app_channel(channel)) + { + return NRF_ERROR_INVALID_PARAM; + } + if (is_programmable_app_channel(channel) && !is_allocated_channel(channel)) + { + return NRF_ERROR_INVALID_STATE; + } + nrf_ppi_channel_disable(channel); + return NRF_SUCCESS; +} + + +uint32_t nrf_drv_ppi_group_alloc(nrf_ppi_channel_group_t * p_group) +{ + uint32_t err_code; + uint32_t mask = 0; + nrf_ppi_channel_group_t group; + + err_code = NRF_ERROR_NO_MEM; + + mask = NRF_PPI_ALL_APP_GROUPS_MASK; + for (group = NRF_PPI_CHANNEL_GROUP0; mask != 0; mask &= ~group_to_mask(group), group++) + { + CRITICAL_REGION_ENTER(); + if ((mask & group_to_mask(group)) && (!is_allocated_group(group))) + { + group_allocated_set(group); + *p_group = group; + err_code = NRF_SUCCESS; + } + CRITICAL_REGION_EXIT(); + if (err_code == NRF_SUCCESS) + { + break; + } + } + + return err_code; +} + + +uint32_t nrf_drv_ppi_group_free(nrf_ppi_channel_group_t group) +{ + if (!is_app_group(group)) + { + return NRF_ERROR_INVALID_PARAM; + } + if (!is_allocated_group(group)) + { + return NRF_ERROR_INVALID_STATE; + } + else + nrf_ppi_group_disable(group); + CRITICAL_REGION_ENTER(); + group_allocated_clr(group); + CRITICAL_REGION_EXIT(); + return NRF_SUCCESS; +} + + +uint32_t nrf_drv_ppi_group_enable(nrf_ppi_channel_group_t group) +{ + if (!is_app_group(group)) + { + return NRF_ERROR_INVALID_PARAM; + } + if (!is_allocated_group(group)) + { + return NRF_ERROR_INVALID_STATE; + } + nrf_ppi_group_enable(group); + return NRF_SUCCESS; +} + + +uint32_t nrf_drv_ppi_group_disable(nrf_ppi_channel_group_t group) +{ + if (!is_app_group(group)) + { + return NRF_ERROR_INVALID_PARAM; + } + nrf_ppi_group_disable(group); + return NRF_SUCCESS; +} + +uint32_t nrf_drv_ppi_channels_remove_from_group(uint32_t channel_mask, + nrf_ppi_channel_group_t group) +{ + if (!is_app_group(group)) + { + return NRF_ERROR_INVALID_PARAM; + } + if (!is_allocated_group(group)) + { + return NRF_ERROR_INVALID_STATE; + } + if (!are_app_channels(channel_mask)) + { + return NRF_ERROR_INVALID_PARAM; + } + CRITICAL_REGION_ENTER(); + nrf_ppi_channels_remove_from_group(channel_mask, group); + CRITICAL_REGION_EXIT(); + return NRF_SUCCESS; +} + +uint32_t nrf_drv_ppi_channels_include_in_group(uint32_t channel_mask, + nrf_ppi_channel_group_t group) +{ + if (!is_app_group(group)) + { + return NRF_ERROR_INVALID_PARAM; + } + if (!is_allocated_group(group)) + { + return NRF_ERROR_INVALID_STATE; + } + if (!are_app_channels(channel_mask)) + { + return NRF_ERROR_INVALID_PARAM; + } + CRITICAL_REGION_ENTER(); + nrf_ppi_channels_include_in_group(channel_mask, group); + CRITICAL_REGION_EXIT(); + return NRF_SUCCESS; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ppi/nrf_drv_ppi.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ppi/nrf_drv_ppi.h new file mode 100644 index 0000000000..bd1c743879 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ppi/nrf_drv_ppi.h @@ -0,0 +1,284 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef NRF_DRV_PPI_H +#define NRF_DRV_PPI_H + +/*lint ++flb "Enter library region" */ +#include "sdk_errors.h" +#include "nrf_ppi.h" +#include +#include + +/** @file + * + * @addtogroup nrf_ppi PPI HAL and driver + * @ingroup nrf_drivers + * @brief Programmable Peripheral Interconnect (PPI) APIs. + * + * @details The PPI HAL provides basic APIs for accessing the registers of the PPI. + * The PPI driver provides APIs on a higher level. + * + * @defgroup lib_driver_ppi PPI driver + * @{ + * @ingroup nrf_ppi + * + * @brief Programmable Peripheral Interconnect (PPI) driver. + */ + +#include "sdk_resources.h" + +#ifdef NRF52 + + #define NRF_PPI_ALL_APP_CHANNELS_MASK ((uint32_t)0xFFFFFFFFuL & ~(NRF_PPI_CHANNELS_USED)) /**< All PPI channels available to the application. */ + #define NRF_PPI_PROG_APP_CHANNELS_MASK ((uint32_t)0x000FFFFFuL & ~(NRF_PPI_CHANNELS_USED)) /**< Programmable PPI channels available to the application. */ + #define NRF_PPI_ALL_APP_GROUPS_MASK ((uint32_t)0x0000003FuL & ~(NRF_PPI_GROUPS_USED)) /**< All PPI groups available to the application. */ + +#else + + #define NRF_PPI_ALL_APP_CHANNELS_MASK ((uint32_t)0xFFF0FFFFuL & ~(NRF_PPI_CHANNELS_USED)) /**< All PPI channels available to the application. */ + #define NRF_PPI_PROG_APP_CHANNELS_MASK ((uint32_t)0x0000FFFFuL & ~(NRF_PPI_CHANNELS_USED)) /**< Programmable PPI channels available to the application. */ + #define NRF_PPI_ALL_APP_GROUPS_MASK ((uint32_t)0x0000000FuL & ~(NRF_PPI_GROUPS_USED)) /**< All PPI groups available to the application. */ + +#endif + + +/**@brief Function for initializing PPI module. + * + * @retval NRF_SUCCESS If the module was successfully initialized. + * @retval MODULE_ALREADY_INITIALIZED If the module has already been initialized. + */ +uint32_t nrf_drv_ppi_init(void); + +/**@brief Function for uninitializing the PPI module. + * + * This function also disables all channels and clears the channel groups. + * + * @retval NRF_SUCCESS If the module was successfully uninitialized. + * @retval NRF_ERROR_INVALID_STATE If the module has not been initialized yet. + * @retval NRF_ERROR_INTERNAL If the channels or groups could not be disabled. + */ +uint32_t nrf_drv_ppi_uninit(void); + +/**@brief Function for allocating a PPI channel. + * @details This function allocates the first unused PPI channel. + * + * @param[out] p_channel Pointer to the PPI channel that has been allocated. + * + * @retval NRF_SUCCESS If the channel was successfully allocated. + * @retval NRF_ERROR_NO_MEM If there is no available channel to be used. + */ +uint32_t nrf_drv_ppi_channel_alloc(nrf_ppi_channel_t * p_channel); + +/**@brief Function for freeing a PPI channel. + * @details This function also disables the chosen channel. + * + * @param[in] channel PPI channel to be freed. + * + * @retval NRF_SUCCESS If the channel was successfully freed. + * @retval NRF_ERROR_INVALID_PARAM If the channel is not user-configurable. + */ +uint32_t nrf_drv_ppi_channel_free(nrf_ppi_channel_t channel); + +/**@brief Function for assigning task and event endpoints to the PPI channel. + * + * @param[in] channel PPI channel to be assigned endpoints. + * + * @param[in] eep Event endpoint address. + * + * @param[in] tep Task endpoint address. + * + * @retval NRF_SUCCESS If the channel was successfully assigned. + * @retval NRF_ERROR_INVALID_STATE If the channel is not allocated for the user. + * @retval NRF_ERROR_INVALID_PARAM If the channel is not user-configurable. + */ +uint32_t nrf_drv_ppi_channel_assign(nrf_ppi_channel_t channel, uint32_t eep, uint32_t tep); + +/**@brief Function for assigning or clearing fork endpoint to the PPI channel. + * + * @param[in] channel PPI channel to be assigned endpoints. + * + * @param[in] fork_tep Fork task endpoint address or 0 to clear. + * + * @retval NRF_SUCCESS If the channel was successfully assigned. + * @retval NRF_ERROR_INVALID_STATE If the channel is not allocated for the user. + * @retval NRF_ERROR_INVALID_PARAM If the channel is not user-configurable. + * @retval NRF_ERROR_NOT_SUPPORTED If function is not supported. + */ +uint32_t nrf_drv_ppi_channel_fork_assign(nrf_ppi_channel_t channel, uint32_t fork_tep); + +/**@brief Function for enabling a PPI channel. + * + * @param[in] channel PPI channel to be enabled. + * + * @retval NRF_SUCCESS If the channel was successfully enabled. + * @retval NRF_ERROR_INVALID_STATE If the user-configurable channel is not allocated. + * @retval NRF_ERROR_INVALID_PARAM If the channel cannot be enabled by the user. + */ +uint32_t nrf_drv_ppi_channel_enable(nrf_ppi_channel_t channel); + +/**@brief Function for disabling a PPI channel. + * + * @param[in] channel PPI channel to be disabled. + * + * @retval NRF_SUCCESS If the channel was successfully disabled. + * @retval NRF_ERROR_INVALID_STATE If the user-configurable channel is not allocated. + * @retval NRF_ERROR_INVALID_PARAM If the channel cannot be disabled by the user. + */ +uint32_t nrf_drv_ppi_channel_disable(nrf_ppi_channel_t channel); + +/**@brief Function for allocating a PPI channel group. + * @details This function allocates the first unused PPI group. + * + * @param[out] p_group Pointer to the PPI channel group that has been allocated. + * + * @retval NRF_SUCCESS If the channel group was successfully allocated. + * @retval NRF_ERROR_NO_MEM If there is no available channel group to be used. + */ +uint32_t nrf_drv_ppi_group_alloc(nrf_ppi_channel_group_t * p_group); + +/**@brief Function for freeing a PPI channel group. + * @details This function also disables the chosen group. + * + * @param[in] group PPI channel group to be freed. + * + * @retval NRF_SUCCESS If the channel group was successfully freed. + * @retval NRF_ERROR_INVALID_PARAM If the channel group is not user-configurable. + */ +uint32_t nrf_drv_ppi_group_free(nrf_ppi_channel_group_t group); + +/**@brief Compute a channel mask for NRF_PPI registers. + * + * @param[in] channel Channel number to transform to a mask. + * + * @retval Channel mask. + */ +__STATIC_INLINE uint32_t nrf_drv_ppi_channel_to_mask(nrf_ppi_channel_t channel) +{ + return (1uL << (uint32_t) channel); +} + +/**@brief Function for including multiple PPI channels in a channel group. + * + * @param[in] channel_mask PPI channels to be added. + * @param[in] group Channel group in which to include the channels. + * + * @retval NRF_SUCCESS If the channels was successfully included. + */ +uint32_t nrf_drv_ppi_channels_include_in_group(uint32_t channel_mask, + nrf_ppi_channel_group_t group); + +/**@brief Function for including a PPI channel in a channel group. + * + * @param[in] channel PPI channel to be added. + * @param[in] group Channel group in which to include the channel. + * + * @retval NRF_SUCCESS If the channel was successfully included. + */ +__STATIC_INLINE uint32_t nrf_drv_ppi_channel_include_in_group(nrf_ppi_channel_t channel, + nrf_ppi_channel_group_t group) +{ + return nrf_drv_ppi_channels_include_in_group(nrf_drv_ppi_channel_to_mask(channel), group); +} + +/**@brief Function for removing multiple PPI channels from a channel group. + * + * @param[in] channel_mask PPI channels to be removed. + * @param[in] group Channel group from which to remove the channels. + * + * @retval NRF_SUCCESS If the channel was successfully removed. + */ +uint32_t nrf_drv_ppi_channels_remove_from_group(uint32_t channel_mask, + nrf_ppi_channel_group_t group); + +/**@brief Function for removing a PPI channel from a channel group. + * + * @param[in] channel PPI channel to be removed. + * @param[in] group Channel group from which to remove the channel. + * + * @retval NRF_SUCCESS If the channel was successfully removed. + */ +__STATIC_INLINE uint32_t nrf_drv_ppi_channel_remove_from_group(nrf_ppi_channel_t channel, + nrf_ppi_channel_group_t group) +{ + return nrf_drv_ppi_channels_remove_from_group(nrf_drv_ppi_channel_to_mask(channel), group); +} + +/**@brief Function for clearing a PPI channel group. + * + * @param[in] group Channel group to be cleared. + * + * @retval NRF_SUCCESS If the group was successfully cleared. + */ +__STATIC_INLINE uint32_t nrf_drv_ppi_group_clear(nrf_ppi_channel_group_t group) +{ + return nrf_drv_ppi_channels_remove_from_group(NRF_PPI_ALL_APP_CHANNELS_MASK, group); +} + +/**@brief Function for enabling a PPI channel group. + * + * @param[in] group Channel group to be enabled. + * + * @retval NRF_SUCCESS If the group was successfully enabled. + */ +uint32_t nrf_drv_ppi_group_enable(nrf_ppi_channel_group_t group); + +/**@brief Function for disabling a PPI channel group. + * + * @param[in] group Channel group to be disabled. + * + * @retval NRF_SUCCESS If the group was successfully disabled. + */ +uint32_t nrf_drv_ppi_group_disable(nrf_ppi_channel_group_t group); + +/** + * @brief Function for getting the address of a PPI task. + * + * @param[in] task Task. + * + * @retval Task address. + */ +__STATIC_INLINE uint32_t nrf_drv_ppi_task_addr_get(nrf_ppi_task_t task) +{ + return (uint32_t) nrf_ppi_task_address_get(task); +} + +/** + * @brief Function for getting the address of a PPI group enable task. + * + * @param[in] group PPI channel group + * + * @retval Task address. + */ +__STATIC_INLINE uint32_t nrf_drv_ppi_task_addr_group_enable_get(nrf_ppi_channel_group_t group) +{ + return (uint32_t) nrf_ppi_task_group_enable_address_get(group); +} + +/** + * @brief Function for getting the address of a PPI group enable task. + * + * @param[in] group PPI channel group + * + * @retval Task address. + */ +__STATIC_INLINE uint32_t nrf_drv_ppi_task_addr_group_disable_get(nrf_ppi_channel_group_t group) +{ + return (uint32_t) nrf_ppi_task_group_disable_address_get(group); +} + +/** + *@} + **/ + +/*lint --flb "Leave library region" */ +#endif // NRF_DRV_PPI_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/rtc/nrf_drv_rtc.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/rtc/nrf_drv_rtc.c new file mode 100644 index 0000000000..0af7ad3204 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/rtc/nrf_drv_rtc.c @@ -0,0 +1,290 @@ +/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "nrf_drv_rtc.h" +#include "nrf_rtc.h" +#include "nrf_assert.h" +#include "app_util_platform.h" + +/**@brief RTC driver instance control block structure. */ +typedef struct +{ + nrf_drv_state_t state; /**< Instance state. */ + bool reliable; /**< Reliable mode flag. */ + uint8_t tick_latency; /**< Maximum length of interrupt handler in ticks (max 7.7 ms). */ +} nrf_drv_rtc_cb_t; + +// User callbacks local storage. +static nrf_drv_rtc_handler_t m_handlers[RTC_COUNT]; +static nrf_drv_rtc_cb_t m_cb[RTC_COUNT]; + +static const nrf_drv_rtc_config_t m_default_config[] = { +#if RTC0_ENABLED + NRF_DRV_RTC_DEFAULT_CONFIG(0), +#endif +#if RTC1_ENABLED + NRF_DRV_RTC_DEFAULT_CONFIG(1), +#endif +#if RTC2_ENABLED + NRF_DRV_RTC_DEFAULT_CONFIG(2) +#endif +}; + +ret_code_t nrf_drv_rtc_init(nrf_drv_rtc_t const * const p_instance, + nrf_drv_rtc_config_t const * p_config, + nrf_drv_rtc_handler_t handler) +{ + if (handler) + { + m_handlers[p_instance->instance_id] = handler; + } + else + { + return NRF_ERROR_INVALID_PARAM; + } + + if (p_config == NULL) + { + p_config = &m_default_config[p_instance->instance_id]; + } + + if (m_cb[p_instance->instance_id].state != NRF_DRV_STATE_UNINITIALIZED) + { + return NRF_ERROR_INVALID_STATE; + } + + nrf_drv_common_irq_enable(p_instance->irq, p_config->interrupt_priority); + nrf_rtc_prescaler_set(p_instance->p_reg, p_config->prescaler); + m_cb[p_instance->instance_id].reliable = p_config->reliable; + m_cb[p_instance->instance_id].tick_latency = p_config->tick_latency; + m_cb[p_instance->instance_id].state = NRF_DRV_STATE_INITIALIZED; + + return NRF_SUCCESS; +} + +void nrf_drv_rtc_uninit(nrf_drv_rtc_t const * const p_instance) +{ + uint32_t mask = NRF_RTC_INT_TICK_MASK | + NRF_RTC_INT_OVERFLOW_MASK | + NRF_RTC_INT_COMPARE0_MASK | + NRF_RTC_INT_COMPARE1_MASK | + NRF_RTC_INT_COMPARE2_MASK | + NRF_RTC_INT_COMPARE3_MASK; + ASSERT(m_cb[p_instance->instance_id].state != NRF_DRV_STATE_UNINITIALIZED); + + nrf_drv_common_irq_disable(p_instance->irq); + + nrf_rtc_task_trigger(p_instance->p_reg, NRF_RTC_TASK_STOP); + nrf_rtc_event_disable(p_instance->p_reg, mask); + nrf_rtc_int_disable(p_instance->p_reg, mask); + + m_cb[p_instance->instance_id].state = NRF_DRV_STATE_UNINITIALIZED; +} + +void nrf_drv_rtc_enable(nrf_drv_rtc_t const * const p_instance) +{ + ASSERT(m_cb[p_instance->instance_id].state == NRF_DRV_STATE_INITIALIZED); + + nrf_rtc_task_trigger(p_instance->p_reg, NRF_RTC_TASK_START); + m_cb[p_instance->instance_id].state = NRF_DRV_STATE_POWERED_ON; +} + +void nrf_drv_rtc_disable(nrf_drv_rtc_t const * const p_instance) +{ + ASSERT(m_cb[p_instance->instance_id].state == NRF_DRV_STATE_POWERED_ON); + + nrf_rtc_task_trigger(p_instance->p_reg, NRF_RTC_TASK_STOP); + m_cb[p_instance->instance_id].state = NRF_DRV_STATE_INITIALIZED; +} + +ret_code_t nrf_drv_rtc_cc_disable(nrf_drv_rtc_t const * const p_instance, uint32_t channel) +{ + ASSERT(m_cb[p_instance->instance_id].state != NRF_DRV_STATE_UNINITIALIZED); + ASSERT(channelcc_channel_count); + + uint32_t int_mask = RTC_CHANNEL_INT_MASK(channel); + nrf_rtc_event_t event = RTC_CHANNEL_EVENT_ADDR(channel); + + nrf_rtc_event_disable(p_instance->p_reg,int_mask); + if (nrf_rtc_int_is_enabled(p_instance->p_reg,int_mask)) + { + nrf_rtc_int_disable(p_instance->p_reg,int_mask); + if (nrf_rtc_event_pending(p_instance->p_reg,event)) + { + nrf_rtc_event_clear(p_instance->p_reg,event); + return NRF_ERROR_TIMEOUT; + } + } + return NRF_SUCCESS; +} + +ret_code_t nrf_drv_rtc_cc_set(nrf_drv_rtc_t const * const p_instance, + uint32_t channel, + uint32_t val, + bool enable_irq) +{ + ASSERT(m_cb[p_instance->instance_id].state != NRF_DRV_STATE_UNINITIALIZED); + ASSERT(channelcc_channel_count); + + uint32_t int_mask = RTC_CHANNEL_INT_MASK(channel); + nrf_rtc_event_t event = RTC_CHANNEL_EVENT_ADDR(channel); + + nrf_rtc_event_disable(p_instance->p_reg, int_mask); + nrf_rtc_int_disable(p_instance->p_reg, int_mask); + + val = RTC_WRAP(val); + if (m_cb[p_instance->instance_id].reliable) + { + nrf_rtc_cc_set(p_instance->p_reg,channel,val); + uint32_t cnt = nrf_rtc_counter_get(p_instance->p_reg); + int32_t diff = cnt - val; + if (cnt < val) + { + diff += RTC_COUNTER_COUNTER_Msk; + } + if (diff < m_cb[p_instance->instance_id].tick_latency) + { + return NRF_ERROR_TIMEOUT; + } + } + else + { + nrf_rtc_cc_set(p_instance->p_reg,channel,val); + } + + if (enable_irq) + { + nrf_rtc_event_clear(p_instance->p_reg,event); + nrf_rtc_int_enable(p_instance->p_reg, int_mask); + } + nrf_rtc_event_enable(p_instance->p_reg,int_mask); + + return NRF_SUCCESS; +} + +void nrf_drv_rtc_tick_enable(nrf_drv_rtc_t const * const p_instance, bool enable_irq) +{ + nrf_rtc_event_t event = NRF_RTC_EVENT_TICK; + uint32_t mask = NRF_RTC_INT_TICK_MASK; + + nrf_rtc_event_clear(p_instance->p_reg, event); + nrf_rtc_event_enable(p_instance->p_reg, mask); + if (enable_irq) + { + nrf_rtc_int_enable(p_instance->p_reg, mask); + } +} + +void nrf_drv_rtc_tick_disable(nrf_drv_rtc_t const * const p_instance) +{ + uint32_t mask = NRF_RTC_INT_TICK_MASK; + + nrf_rtc_event_disable(p_instance->p_reg, mask); + nrf_rtc_int_disable(p_instance->p_reg, mask); +} + +void nrf_drv_rtc_overflow_enable(nrf_drv_rtc_t const * const p_instance, bool enable_irq) +{ + nrf_rtc_event_t event = NRF_RTC_EVENT_OVERFLOW; + uint32_t mask = NRF_RTC_INT_OVERFLOW_MASK; + + nrf_rtc_event_clear(p_instance->p_reg, event); + nrf_rtc_event_enable(p_instance->p_reg, mask); + if (enable_irq) + { + nrf_rtc_int_enable(p_instance->p_reg, mask); + } +} +void nrf_drv_rtc_overflow_disable(nrf_drv_rtc_t const * const p_instance) +{ + uint32_t mask = NRF_RTC_INT_OVERFLOW_MASK; + nrf_rtc_event_disable(p_instance->p_reg, mask); + nrf_rtc_int_disable(p_instance->p_reg, mask); +} + +uint32_t nrf_drv_rtc_max_ticks_get(nrf_drv_rtc_t const * const p_instance) +{ + ASSERT(m_cb[p_instance->instance_id].reliable); + uint32_t ticks; + if (m_cb[p_instance->instance_id].reliable) + { + ticks = RTC_COUNTER_COUNTER_Msk - m_cb[p_instance->instance_id].tick_latency; + } + else + { + ticks = RTC_COUNTER_COUNTER_Msk; + } + return ticks; +} + +/**@brief Generic function for handling RTC interrupt + * + * @param[in] p_reg Pointer to instance register structure. + * @param[in] instance_id Index of instance. + */ +__STATIC_INLINE void nrf_drv_rtc_int_handler(NRF_RTC_Type * p_reg, + uint32_t instance_id, + uint32_t channel_count) +{ + uint32_t i; + uint32_t int_mask = (uint32_t)NRF_RTC_INT_COMPARE0_MASK; + nrf_rtc_event_t event = NRF_RTC_EVENT_COMPARE_0; + + for (i = 0; i < channel_count; i++) + { + if (nrf_rtc_int_is_enabled(p_reg,int_mask) && nrf_rtc_event_pending(p_reg,event)) + { + nrf_rtc_event_disable(p_reg,int_mask); + nrf_rtc_int_disable(p_reg,int_mask); + nrf_rtc_event_clear(p_reg,event); + m_handlers[instance_id]((nrf_drv_rtc_int_type_t)i); + } + int_mask <<= 1; + event = (nrf_rtc_event_t)((uint32_t)event + sizeof(uint32_t)); + } + event = NRF_RTC_EVENT_TICK; + if (nrf_rtc_int_is_enabled(p_reg,NRF_RTC_INT_TICK_MASK) && + nrf_rtc_event_pending(p_reg, event)) + { + nrf_rtc_event_clear(p_reg, event); + m_handlers[instance_id](NRF_DRV_RTC_INT_TICK); + } + + event = NRF_RTC_EVENT_OVERFLOW; + if (nrf_rtc_int_is_enabled(p_reg,NRF_RTC_INT_OVERFLOW_MASK) && + nrf_rtc_event_pending(p_reg, event)) + { + nrf_rtc_event_clear(p_reg,event); + m_handlers[instance_id](NRF_DRV_RTC_INT_OVERFLOW); + } +} + +#if RTC0_ENABLED +void RTC0_IRQHandler(void) +{ + nrf_drv_rtc_int_handler(NRF_RTC0,RTC0_INSTANCE_INDEX, NRF_RTC_CC_CHANNEL_COUNT(0)); +} +#endif + +#if RTC1_ENABLED +void RTC1_IRQHandler(void) +{ + nrf_drv_rtc_int_handler(NRF_RTC1,RTC1_INSTANCE_INDEX, NRF_RTC_CC_CHANNEL_COUNT(1)); +} +#endif + +#if RTC2_ENABLED +void RTC2_IRQHandler(void) +{ + nrf_drv_rtc_int_handler(NRF_RTC2,RTC2_INSTANCE_INDEX, NRF_RTC_CC_CHANNEL_COUNT(2)); +} +#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/rtc/nrf_drv_rtc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/rtc/nrf_drv_rtc.h new file mode 100644 index 0000000000..c7148c89c6 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/rtc/nrf_drv_rtc.h @@ -0,0 +1,325 @@ +/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef NRF_DRV_RTC_H +#define NRF_DRV_RTC_H + + +#include "nordic_common.h" +#include "nrf_drv_config.h" +#include "nrf_drv_common.h" +#include "nrf_rtc.h" +#include "sdk_errors.h" + +/** + * @addtogroup nrf_rtc RTC HAL and driver + * @ingroup nrf_drivers + * @brief Real timer counter (RTC) APIs. + * @details The RTC HAL provides basic APIs for accessing the registers of the real time counter (RTC). + * The RTC driver provides APIs on a higher level. + * + * @defgroup nrf_drv_rtc RTC driver + * @{ + * @ingroup nrf_rtc + * @brief Real timer counter (RTC) driver. + */ + +/**@brief Macro to convert microseconds into ticks. */ +#define RTC_US_TO_TICKS(us,freq) ((us*freq)/1000000) + +/** + * @enum nrf_drv_rtc_int_type_t + * @brief RTC driver interrupt types. + */ +typedef enum +{ + NRF_DRV_RTC_INT_COMPARE0 = 0, /**< Interrupt from COMPARE0 event. */ + NRF_DRV_RTC_INT_COMPARE1 = 1, /**< Interrupt from COMPARE1 event. */ + NRF_DRV_RTC_INT_COMPARE2 = 2, /**< Interrupt from COMPARE2 event. */ + NRF_DRV_RTC_INT_COMPARE3 = 3, /**< Interrupt from COMPARE3 event. */ + NRF_DRV_RTC_INT_TICK = 4, /**< Interrupt from TICK event. */ + NRF_DRV_RTC_INT_OVERFLOW = 5 /**< Interrupt from OVERFLOW event. */ +} nrf_drv_rtc_int_type_t; + +/**@brief RTC driver instance structure. */ +typedef struct +{ + NRF_RTC_Type * p_reg; /**< Pointer to instance register set. */ + IRQn_Type irq; /**< Instance IRQ ID. */ + uint8_t instance_id; /**< Instance index. */ + uint8_t cc_channel_count; /**< Number of capture/compare channels. */ +} nrf_drv_rtc_t; + +/**@brief Macro for creating RTC driver instance.*/ +#define NRF_DRV_RTC_INSTANCE(id) \ +{ \ + .p_reg = CONCAT_2(NRF_RTC, id), \ + .irq = CONCAT_3(RTC, id, _IRQn), \ + .instance_id = CONCAT_3(RTC, id, _INSTANCE_INDEX),\ + .cc_channel_count = NRF_RTC_CC_CHANNEL_COUNT(id), \ +} + +/**@brief RTC driver instance configuration structure. */ +typedef struct +{ + uint16_t prescaler; /**< Prescaler. */ + uint8_t interrupt_priority; /**< Interrupt priority. */ + uint8_t tick_latency; /**< Maximum length of interrupt handler in ticks (max 7.7 ms). */ + bool reliable; /**< Reliable mode flag. */ +} nrf_drv_rtc_config_t; + +/**@brief RTC instance default configuration. */ +#define NRF_DRV_RTC_DEFAULT_CONFIG(id) \ +{ \ + .prescaler = (uint16_t)(RTC_INPUT_FREQ / CONCAT_3(RTC, id, _CONFIG_FREQUENCY))-1, \ + .interrupt_priority = CONCAT_3(RTC, id, _CONFIG_IRQ_PRIORITY), \ + .reliable = CONCAT_3(RTC, id, _CONFIG_RELIABLE), \ + .tick_latency = RTC_US_TO_TICKS(NRF_MAXIMUM_LATENCY_US, CONCAT_3(RTC, id, _CONFIG_FREQUENCY)), \ +} + +/**@brief RTC driver instance handler type. */ +typedef void (*nrf_drv_rtc_handler_t)(nrf_drv_rtc_int_type_t int_type); + +/**@brief Function for initializing the RTC driver instance. + * + * After initialization, the instance is in power off state. + * + * @param[in] p_instance Pointer to the instance. + * @param[in] p_config Initial configuration. Default configuration used if NULL. + * @param[in] handler User's event handler. + * + * @retval NRF_SUCCESS If successfully initialized. + * @retval NRF_ERROR_INVALID_PARAM If no handler was provided. + * @retval NRF_ERROR_INVALID_STATE If the instance is already initialized. + */ +ret_code_t nrf_drv_rtc_init(nrf_drv_rtc_t const * const p_instance, + nrf_drv_rtc_config_t const * p_config, + nrf_drv_rtc_handler_t handler); + +/**@brief Function for uninitializing the RTC driver instance. + * + * After uninitialization, the instance is in idle state. The hardware should return to the state + * before initialization. The function asserts if the instance is in idle state. + * + * @param[in] p_instance Pointer to the instance. + */ +void nrf_drv_rtc_uninit(nrf_drv_rtc_t const * const p_instance); + +/**@brief Function for enabling the RTC driver instance. + * + * @note Function asserts if instance is enabled. + * + * @param[in] p_instance Pointer to the instance. + */ +void nrf_drv_rtc_enable(nrf_drv_rtc_t const * const p_instance); + +/**@brief Function for disabling the RTC driver instance. + * + * @note Function asserts if instance is disabled. + * + * @param[in] p_instance Pointer to instance. + */ +void nrf_drv_rtc_disable(nrf_drv_rtc_t const * const p_instance); + +/**@brief Function for setting a compare channel. + * + * The function asserts if the instance is not initialized or if the channel parameter is + * wrong. The function powers on the instance if the instance was in power off state. + * + * The driver is not entering a critical section when configuring RTC, which means that it can be + * preempted for a certain amount of time. When the driver was preempted and the value to be set + * is short in time, there is a risk that the driver sets a compare value that is + * behind. If RTCn_CONFIG_RELIABLE is 1 for the given instance, the Reliable mode handles that case. + * However, to detect if the requested value is behind, this mode makes the following assumptions: + * - The maximum preemption time in ticks (8-bit value) is known and is less than 7.7 ms + * (for prescaler = 0, RTC frequency 32 kHz). + * - The requested absolute compare value is not bigger than (0x00FFFFFF)-tick_latency. It is + * the user's responsibility to ensure that. + * + * @param[in] p_instance Pointer to the instance. + * @param[in] channel One of the instance's channels. + * @param[in] val Absolute value to be set in the compare register. + * @param[in] enable_irq True to enable the interrupt. False to disable the interrupt. + * + * @retval NRF_SUCCESS If the procedure was successful. + * @retval NRF_ERROR_TIMEOUT If the compare was not set because the request value is behind the current counter + * value. This error can only be reported if RTCn_CONFIG_RELIABLE = 1. + */ +ret_code_t nrf_drv_rtc_cc_set(nrf_drv_rtc_t const * const p_instance, + uint32_t channel, + uint32_t val, + bool enable_irq); + +/**@brief Function for disabling a channel. + * + * This function disables channel events and channel interrupts. The function asserts if the instance is not + * initialized or if the channel parameter is wrong. + * + * @param[in] p_instance Pointer to the instance. + * @param[in] channel One of the instance's channels. + * + * @retval NRF_SUCCESS If the procedure was successful. + * @retval NRF_ERROR_TIMEOUT If an interrupt was pending on the requested channel. + */ +ret_code_t nrf_drv_rtc_cc_disable(nrf_drv_rtc_t const * const p_instance, uint32_t channel); + +/**@brief Function for enabling tick. + * + * This function enables the tick event and optionally the interrupt. The function asserts if the instance is not + * powered on. + * + * @param[in] p_instance Pointer to the instance. + * @param[in] enable_irq True to enable the interrupt. False to disable the interrupt. + */ +void nrf_drv_rtc_tick_enable(nrf_drv_rtc_t const * const p_instance, bool enable_irq); + +/**@brief Function for disabling tick. + * + * This function disables the tick event and interrupt. + * + * @param[in] p_instance Pointer to the instance. + */ +void nrf_drv_rtc_tick_disable(nrf_drv_rtc_t const * const p_instance); + +/**@brief Function for enabling overflow. + * + * This function enables the overflow event and optionally the interrupt. The function asserts if the instance is + * not powered on. + * + * @param[in] p_instance Pointer to the instance. + * @param[in] enable_irq True to enable the interrupt. False to disable the interrupt. + */ +void nrf_drv_rtc_overflow_enable(nrf_drv_rtc_t const * const p_instance, bool enable_irq); + +/**@brief Function for disabling overflow. + * + * This function disables the overflow event and interrupt. + * + * @param[in] p_instance Pointer to the instance. + */ +void nrf_drv_rtc_overflow_disable(nrf_drv_rtc_t const * const p_instance); + +/**@brief Function for getting the maximum relative ticks value that can be set in the compare channel. + * + * When a SoftDevice is used, it occupies the highest level interrupt, so that the application code can be + * interrupted at any moment for a certain period of time. If Reliable mode is enabled, the provided + * maximum latency is taken into account and the return value is smaller than the RTC counter + * resolution. If Reliable mode is disabled, the return value equals the counter resolution. + * + * @param[in] p_instance Pointer to the instance. + * + * @retval ticks Maximum ticks value. + */ +uint32_t nrf_drv_rtc_max_ticks_get(nrf_drv_rtc_t const * const p_instance); + +/**@brief Function for disabling all instance interrupts. + * + * @param[in] p_instance Pointer to the instance. + * @param[in] p_mask Pointer to the location where the mask is filled. + */ +__STATIC_INLINE void nrf_drv_rtc_int_disable(nrf_drv_rtc_t const * const p_instance, + uint32_t * p_mask); + +/**@brief Function for enabling instance interrupts. + * + * @param[in] p_instance Pointer to the instance. + * @param[in] mask Mask of interrupts to enable. + */ +__STATIC_INLINE void nrf_drv_rtc_int_enable(nrf_drv_rtc_t const * const p_instance, uint32_t mask); + +/**@brief Function for retrieving the current counter value. + * + * This function asserts if the instance is not powered on or if p_val is NULL. + * + * @param[in] p_instance Pointer to the instance. + * + * @retval value Counter value. + */ +__STATIC_INLINE uint32_t nrf_drv_rtc_counter_get(nrf_drv_rtc_t const * const p_instance); + +/**@brief Function for clearing the counter value. + * + * This function asserts if the instance is not powered on. + * + * @param[in] p_instance Pointer to the instance. + */ +__STATIC_INLINE void nrf_drv_rtc_counter_clear(nrf_drv_rtc_t const * const p_instance); + +/**@brief Function for returning a requested task address for the RTC driver instance. + * + * This function asserts if the output pointer is NULL. The task address can be used by the PPI module. + * + * @param[in] p_instance Pointer to the instance. + * @param[in] task One of the peripheral tasks. + * + * @retval Address of task register. + */ +__STATIC_INLINE uint32_t nrf_drv_rtc_task_address_get(nrf_drv_rtc_t const * const p_instance, + nrf_rtc_task_t task); + +/**@brief Function for returning a requested event address for the RTC driver instance. + * + * This function asserts if the output pointer is NULL. The event address can be used by the PPI module. + * + * @param[in] p_instance Pointer to the instance. + * @param[in] event One of the peripheral events. + * + * @retval Address of event register. + */ +__STATIC_INLINE uint32_t nrf_drv_rtc_event_address_get(nrf_drv_rtc_t const * const p_instance, + nrf_rtc_event_t event); +#ifndef SUPPRESS_INLINE_IMPLEMENTATION + +__STATIC_INLINE void nrf_drv_rtc_int_disable(nrf_drv_rtc_t const * const p_instance, + uint32_t * p_mask) +{ + *p_mask = nrf_rtc_int_get(p_instance->p_reg); + nrf_rtc_int_disable(p_instance->p_reg, NRF_RTC_INT_TICK_MASK | + NRF_RTC_INT_OVERFLOW_MASK | + NRF_RTC_INT_COMPARE0_MASK | + NRF_RTC_INT_COMPARE1_MASK | + NRF_RTC_INT_COMPARE2_MASK | + NRF_RTC_INT_COMPARE3_MASK); +} + +__STATIC_INLINE void nrf_drv_rtc_int_enable(nrf_drv_rtc_t const * const p_instance, uint32_t mask) +{ + nrf_rtc_int_enable(p_instance->p_reg, mask); +} + +__STATIC_INLINE uint32_t nrf_drv_rtc_counter_get(nrf_drv_rtc_t const * const p_instance) +{ + return nrf_rtc_counter_get(p_instance->p_reg); +} + +__STATIC_INLINE void nrf_drv_rtc_counter_clear(nrf_drv_rtc_t const * const p_instance) +{ + nrf_rtc_task_trigger(p_instance->p_reg,NRF_RTC_TASK_CLEAR); +} + +__STATIC_INLINE uint32_t nrf_drv_rtc_task_address_get(nrf_drv_rtc_t const * const p_instance, + nrf_rtc_task_t task) +{ + return nrf_rtc_task_address_get(p_instance->p_reg, task); +} + +__STATIC_INLINE uint32_t nrf_drv_rtc_event_address_get(nrf_drv_rtc_t const * const p_instance, + nrf_rtc_event_t event) +{ + return nrf_rtc_event_address_get(p_instance->p_reg, event); +} +#endif /* SUPPRESS_INLINE_IMPLEMENTATION */ + +/** + *@} + **/ +#endif /* NRF_DRV_RTC_H */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.c new file mode 100644 index 0000000000..61f8527616 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.c @@ -0,0 +1,655 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "nrf_drv_spi.h" +#include "nrf_drv_common.h" +#include "nrf_gpio.h" +#include "nrf_assert.h" +#include "app_util_platform.h" + + +#ifndef NRF52 + // Make sure SPIx_USE_EASY_DMA is 0 for nRF51 (if a common + // "nrf_drv_config.h" file is provided for nRF51 and nRF52). + #undef SPI0_USE_EASY_DMA + #define SPI0_USE_EASY_DMA 0 + #undef SPI1_USE_EASY_DMA + #define SPI1_USE_EASY_DMA 0 + #undef SPI2_USE_EASY_DMA + #define SPI2_USE_EASY_DMA 0 +#endif + +// This set of macros makes it possible to exclude parts of code when one type +// of supported peripherals is not used. +#if ((SPI0_ENABLED && SPI0_USE_EASY_DMA) || \ + (SPI1_ENABLED && SPI1_USE_EASY_DMA) || \ + (SPI2_ENABLED && SPI2_USE_EASY_DMA)) + #define SPIM_IN_USE +#endif +#if ((SPI0_ENABLED && !SPI0_USE_EASY_DMA) || \ + (SPI1_ENABLED && !SPI1_USE_EASY_DMA) || \ + (SPI2_ENABLED && !SPI2_USE_EASY_DMA)) + #define SPI_IN_USE +#endif +#if defined(SPIM_IN_USE) && defined(SPI_IN_USE) + // SPIM and SPI combined + #define CODE_FOR_SPIM(code) if (p_instance->use_easy_dma) { code } + #define CODE_FOR_SPI(code) else { code } +#elif defined(SPIM_IN_USE) && !defined(SPI_IN_USE) + // SPIM only + #define CODE_FOR_SPIM(code) { code } + #define CODE_FOR_SPI(code) +#elif !defined(SPIM_IN_USE) && defined(SPI_IN_USE) + // SPI only + #define CODE_FOR_SPIM(code) + #define CODE_FOR_SPI(code) { code } +#else + #error "Wrong configuration." +#endif + +#ifdef SPIM_IN_USE +#ifdef NRF52_PAN_23 +#define END_INT_MASK (NRF_SPIM_INT_ENDTX_MASK | NRF_SPIM_INT_ENDRX_MASK) +#else +#define END_INT_MASK NRF_SPIM_INT_END_MASK +#endif +#endif + +// Control block - driver instance local data. +typedef struct +{ + nrf_drv_spi_handler_t handler; + nrf_drv_spi_evt_t evt; // Keep the struct that is ready for event handler. Less memcpy. + nrf_drv_state_t state; + volatile bool transfer_in_progress; + + // [no need for 'volatile' attribute for the following members, as they + // are not concurrently used in IRQ handlers and main line code] + uint8_t ss_pin; + uint8_t orc; + uint8_t bytes_transferred; + + bool tx_done : 1; + bool rx_done : 1; +} spi_control_block_t; +static spi_control_block_t m_cb[SPI_COUNT]; + +static nrf_drv_spi_config_t const m_default_config[SPI_COUNT] = { +#if SPI0_ENABLED + NRF_DRV_SPI_DEFAULT_CONFIG(0), +#endif +#if SPI1_ENABLED + NRF_DRV_SPI_DEFAULT_CONFIG(1), +#endif +#if SPI2_ENABLED + NRF_DRV_SPI_DEFAULT_CONFIG(2), +#endif +}; + +#if PERIPHERAL_RESOURCE_SHARING_ENABLED + #define IRQ_HANDLER_NAME(n) irq_handler_for_instance_##n + #define IRQ_HANDLER(n) static void IRQ_HANDLER_NAME(n)(void) + + #if SPI0_ENABLED + IRQ_HANDLER(0); + #endif + #if SPI1_ENABLED + IRQ_HANDLER(1); + #endif + #if SPI2_ENABLED + IRQ_HANDLER(2); + #endif + static nrf_drv_irq_handler_t const m_irq_handlers[SPI_COUNT] = { + #if SPI0_ENABLED + IRQ_HANDLER_NAME(0), + #endif + #if SPI1_ENABLED + IRQ_HANDLER_NAME(1), + #endif + #if SPI2_ENABLED + IRQ_HANDLER_NAME(2), + #endif + }; +#else + #define IRQ_HANDLER(n) void SPI##n##_IRQ_HANDLER(void) +#endif // PERIPHERAL_RESOURCE_SHARING_ENABLED + + +ret_code_t nrf_drv_spi_init(nrf_drv_spi_t const * const p_instance, + nrf_drv_spi_config_t const * p_config, + nrf_drv_spi_handler_t handler) +{ + spi_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; + + if (p_cb->state != NRF_DRV_STATE_UNINITIALIZED) + { + return NRF_ERROR_INVALID_STATE; + } + +#if PERIPHERAL_RESOURCE_SHARING_ENABLED + if (nrf_drv_common_per_res_acquire(p_instance->p_registers, + m_irq_handlers[p_instance->drv_inst_idx]) != NRF_SUCCESS) + { + return NRF_ERROR_BUSY; + } +#endif + + if (p_config == NULL) + { + p_config = &m_default_config[p_instance->drv_inst_idx]; + } + + p_cb->handler = handler; + + uint32_t mosi_pin; + uint32_t miso_pin; + // Configure pins used by the peripheral: + // - SCK - output with initial value corresponding with the SPI mode used: + // 0 - for modes 0 and 1 (CPOL = 0), 1 - for modes 2 and 3 (CPOL = 1); + // according to the reference manual guidelines this pin and its input + // buffer must always be connected for the SPI to work. + if (p_config->mode <= NRF_DRV_SPI_MODE_1) + { + nrf_gpio_pin_clear(p_config->sck_pin); + } + else + { + nrf_gpio_pin_set(p_config->sck_pin); + } + NRF_GPIO->PIN_CNF[p_config->sck_pin] = + (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos) + | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) + | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) + | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) + | (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos); + // - MOSI (optional) - output with initial value 0, + if (p_config->mosi_pin != NRF_DRV_SPI_PIN_NOT_USED) + { + mosi_pin = p_config->mosi_pin; + nrf_gpio_pin_clear(mosi_pin); + nrf_gpio_cfg_output(mosi_pin); + } + else + { + mosi_pin = NRF_SPI_PIN_NOT_CONNECTED; + } + // - MISO (optional) - input, + if (p_config->miso_pin != NRF_DRV_SPI_PIN_NOT_USED) + { + miso_pin = p_config->miso_pin; + nrf_gpio_cfg_input(miso_pin, NRF_GPIO_PIN_NOPULL); + } + else + { + miso_pin = NRF_SPI_PIN_NOT_CONNECTED; + } + // - Slave Select (optional) - output with initial value 1 (inactive). + if (p_config->ss_pin != NRF_DRV_SPI_PIN_NOT_USED) + { + nrf_gpio_pin_set(p_config->ss_pin); + nrf_gpio_cfg_output(p_config->ss_pin); + } + m_cb[p_instance->drv_inst_idx].ss_pin = p_config->ss_pin; + + CODE_FOR_SPIM + ( + NRF_SPIM_Type * p_spim = p_instance->p_registers; + nrf_spim_pins_set(p_spim, p_config->sck_pin, mosi_pin, miso_pin); + nrf_spim_frequency_set(p_spim, + (nrf_spim_frequency_t)p_config->frequency); + nrf_spim_configure(p_spim, + (nrf_spim_mode_t)p_config->mode, + (nrf_spim_bit_order_t)p_config->bit_order); + + nrf_spim_orc_set(p_spim, p_config->orc); + + if (p_cb->handler) + { + nrf_spim_int_enable(p_spim, END_INT_MASK | NRF_SPIM_INT_STOPPED_MASK); + } + + nrf_spim_enable(p_spim); + ) + CODE_FOR_SPI + ( + NRF_SPI_Type * p_spi = p_instance->p_registers; + nrf_spi_pins_set(p_spi, p_config->sck_pin, mosi_pin, miso_pin); + nrf_spi_frequency_set(p_spi, + (nrf_spi_frequency_t)p_config->frequency); + nrf_spi_configure(p_spi, + (nrf_spi_mode_t)p_config->mode, + (nrf_spi_bit_order_t)p_config->bit_order); + + m_cb[p_instance->drv_inst_idx].orc = p_config->orc; + + if (p_cb->handler) + { + nrf_spi_int_enable(p_spi, NRF_SPI_INT_READY_MASK); + } + + nrf_spi_enable(p_spi); + ) + + if (p_cb->handler) + { + nrf_drv_common_irq_enable(p_instance->irq, p_config->irq_priority); + } + + p_cb->transfer_in_progress = false; + p_cb->state = NRF_DRV_STATE_INITIALIZED; + + return NRF_SUCCESS; +} + +void nrf_drv_spi_uninit(nrf_drv_spi_t const * const p_instance) +{ + spi_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; + ASSERT(p_cb->state != NRF_DRV_STATE_UNINITIALIZED); + + if (p_cb->handler) + { + nrf_drv_common_irq_disable(p_instance->irq); + } + + #define DISABLE_ALL 0xFFFFFFFF + + CODE_FOR_SPIM + ( + NRF_SPIM_Type * p_spim = p_instance->p_registers; + if (p_cb->handler) + { + nrf_spim_int_disable(p_spim, DISABLE_ALL); + if (p_cb->transfer_in_progress) + { + // Ensure that SPI is not performing any transfer. + nrf_spim_task_trigger(p_spim, NRF_SPIM_TASK_STOP); + while (!nrf_spim_event_check(p_spim, NRF_SPIM_EVENT_STOPPED)) {} + p_cb->transfer_in_progress = false; + } + } + nrf_spim_disable(p_spim); + ) + CODE_FOR_SPI + ( + NRF_SPI_Type * p_spi = p_instance->p_registers; + if (p_cb->handler) + { + nrf_spi_int_disable(p_spi, DISABLE_ALL); + } + nrf_spi_disable(p_spi); + ) + #undef DISABLE_ALL + +#if PERIPHERAL_RESOURCE_SHARING_ENABLED + nrf_drv_common_per_res_release(p_instance->p_registers); +#endif + + p_cb->state = NRF_DRV_STATE_UNINITIALIZED; +} + +ret_code_t nrf_drv_spi_transfer(nrf_drv_spi_t const * const p_instance, + uint8_t const * p_tx_buffer, + uint8_t tx_buffer_length, + uint8_t * p_rx_buffer, + uint8_t rx_buffer_length) +{ + nrf_drv_spi_xfer_desc_t xfer_desc; + xfer_desc.p_tx_buffer = p_tx_buffer; + xfer_desc.p_rx_buffer = p_rx_buffer; + xfer_desc.tx_length = tx_buffer_length; + xfer_desc.rx_length = rx_buffer_length; + + return nrf_drv_spi_xfer(p_instance, &xfer_desc, 0); +} + +static void finish_transfer(spi_control_block_t * p_cb) +{ + // If Slave Select signal is used, this is the time to deactivate it. + if (p_cb->ss_pin != NRF_DRV_SPI_PIN_NOT_USED) + { + nrf_gpio_pin_set(p_cb->ss_pin); + } + + // By clearing this flag before calling the handler we allow subsequent + // transfers to be started directly from the handler function. + p_cb->transfer_in_progress = false; + p_cb->evt.type = NRF_DRV_SPI_EVENT_DONE; + p_cb->handler(&p_cb->evt); +} + +#ifdef SPI_IN_USE +// This function is called from IRQ handler or, in blocking mode, directly +// from the 'nrf_drv_spi_transfer' function. +// It returns true as long as the transfer should be continued, otherwise (when +// there is nothing more to send/receive) it returns false. +static bool transfer_byte(NRF_SPI_Type * p_spi, spi_control_block_t * p_cb) +{ + // Read the data byte received in this transfer and store it in RX buffer, + // if needed. + volatile uint8_t rx_data = nrf_spi_rxd_get(p_spi); + if (p_cb->bytes_transferred < p_cb->evt.data.done.rx_length) + { + p_cb->evt.data.done.p_rx_buffer[p_cb->bytes_transferred] = rx_data; + } + + ++p_cb->bytes_transferred; + + // Check if there are more bytes to send or receive and write proper data + // byte (next one from TX buffer or over-run character) to the TXD register + // when needed. + // NOTE - we've already used 'p_cb->bytes_transferred + 1' bytes from our + // buffers, because we take advantage of double buffering of TXD + // register (so in effect one byte is still being transmitted now); + // see how the transfer is started in the 'nrf_drv_spi_transfer' + // function. + uint16_t bytes_used = p_cb->bytes_transferred + 1; + if (bytes_used < p_cb->evt.data.done.tx_length) + { + nrf_spi_txd_set(p_spi, p_cb->evt.data.done.p_tx_buffer[bytes_used]); + return true; + } + else if (bytes_used < p_cb->evt.data.done.rx_length) + { + nrf_spi_txd_set(p_spi, p_cb->orc); + return true; + } + + return (p_cb->bytes_transferred < p_cb->evt.data.done.tx_length || + p_cb->bytes_transferred < p_cb->evt.data.done.rx_length); +} + +static void spi_xfer(NRF_SPI_Type * p_spi, + spi_control_block_t * p_cb, + nrf_drv_spi_xfer_desc_t const * p_xfer_desc) +{ + p_cb->bytes_transferred = 0; + nrf_spi_int_disable(p_spi, NRF_SPI_INT_READY_MASK); + + nrf_spi_event_clear(p_spi, NRF_SPI_EVENT_READY); + + // Start the transfer by writing some byte to the TXD register; + // if TX buffer is not empty, take the first byte from this buffer, + // otherwise - use over-run character. + nrf_spi_txd_set(p_spi, + (p_xfer_desc->tx_length > 0 ? p_xfer_desc->p_tx_buffer[0] : p_cb->orc)); + + // TXD register is double buffered, so next byte to be transmitted can + // be written immediately, if needed, i.e. if TX or RX transfer is to + // be more that 1 byte long. Again - if there is something more in TX + // buffer send it, otherwise use over-run character. + if (p_xfer_desc->tx_length > 1) + { + nrf_spi_txd_set(p_spi, p_xfer_desc->p_tx_buffer[1]); + } + else if (p_xfer_desc->rx_length > 1) + { + nrf_spi_txd_set(p_spi, p_cb->orc); + } + + // For blocking mode (user handler not provided) wait here for READY + // events (indicating that the byte from TXD register was transmitted + // and a new incoming byte was moved to the RXD register) and continue + // transaction until all requested bytes are transferred. + // In non-blocking mode - IRQ service routine will do this stuff. + if (p_cb->handler) + { + nrf_spi_int_enable(p_spi, NRF_SPI_INT_READY_MASK); + } + else + { + do { + while (!nrf_spi_event_check(p_spi, NRF_SPI_EVENT_READY)) {} + nrf_spi_event_clear(p_spi, NRF_SPI_EVENT_READY); + } while (transfer_byte(p_spi, p_cb)); + if (p_cb->ss_pin != NRF_DRV_SPI_PIN_NOT_USED) + { + nrf_gpio_pin_set(p_cb->ss_pin); + } + } +} +#endif // SPI_IN_USE + +#ifdef SPIM_IN_USE +__STATIC_INLINE void spim_int_enable(NRF_SPIM_Type * p_spim, bool enable) +{ + if (!enable) + { + nrf_spim_int_disable(p_spim, END_INT_MASK | NRF_SPIM_INT_STOPPED_MASK); + } + else + { + nrf_spim_int_enable(p_spim, END_INT_MASK | NRF_SPIM_INT_STOPPED_MASK); + } +} + +__STATIC_INLINE void spim_list_enable_handle(NRF_SPIM_Type * p_spim, uint32_t flags) +{ +#ifndef NRF52_PAN_46 + if (NRF_DRV_SPI_FLAG_TX_POSTINC & flags) + { + nrf_spim_tx_list_enable(p_spim); + } + else + { + nrf_spim_tx_list_disable(p_spim); + } + + if (NRF_DRV_SPI_FLAG_RX_POSTINC & flags) + { + nrf_spim_rx_list_enable(p_spim); + } + else + { + nrf_spim_rx_list_disable(p_spim); + } +#endif +} + +static ret_code_t spim_xfer(NRF_SPIM_Type * p_spim, + spi_control_block_t * p_cb, + nrf_drv_spi_xfer_desc_t const * p_xfer_desc, + uint32_t flags) +{ + // EasyDMA requires that transfer buffers are placed in Data RAM region; + // signal error if they are not. + if ((p_xfer_desc->p_tx_buffer != NULL && !nrf_drv_is_in_RAM(p_xfer_desc->p_tx_buffer)) || + (p_xfer_desc->p_rx_buffer != NULL && !nrf_drv_is_in_RAM(p_xfer_desc->p_rx_buffer))) + { + p_cb->transfer_in_progress = false; + return NRF_ERROR_INVALID_ADDR; + } + + nrf_spim_tx_buffer_set(p_spim, p_xfer_desc->p_tx_buffer, p_xfer_desc->tx_length); + nrf_spim_rx_buffer_set(p_spim, p_xfer_desc->p_rx_buffer, p_xfer_desc->rx_length); + +#ifdef NRF52_PAN_23 + nrf_spim_event_clear(p_spim, NRF_SPIM_EVENT_ENDTX); + nrf_spim_event_clear(p_spim, NRF_SPIM_EVENT_ENDRX); +#else + nrf_spim_event_clear(p_spim, NRF_SPIM_EVENT_END); +#endif + nrf_spim_event_clear(p_spim, NRF_SPIM_EVENT_STOPPED); + + spim_list_enable_handle(p_spim, flags); + + if (!(flags & NRF_DRV_SPI_FLAG_HOLD_XFER)) + { + nrf_spim_task_trigger(p_spim, NRF_SPIM_TASK_START); + } + + if (!p_cb->handler) + { +#ifdef NRF52_PAN_23 + while (!nrf_spim_event_check(p_spim, NRF_SPIM_EVENT_ENDTX) || + !nrf_spim_event_check(p_spim, NRF_SPIM_EVENT_ENDRX)) {} +#else + while (!nrf_spim_event_check(p_spim, NRF_SPIM_EVENT_END)){} +#endif + // Stop the peripheral after transaction is finished. + nrf_spim_task_trigger(p_spim, NRF_SPIM_TASK_STOP); + while (!nrf_spim_event_check(p_spim, NRF_SPIM_EVENT_STOPPED)) {} + if (p_cb->ss_pin != NRF_DRV_SPI_PIN_NOT_USED) + { + nrf_gpio_pin_set(p_cb->ss_pin); + } + } + else + { + spim_int_enable(p_spim, !(flags & NRF_DRV_SPI_FLAG_NO_XFER_EVT_HANDLER)); + } + return NRF_SUCCESS; +} +#endif + +ret_code_t nrf_drv_spi_xfer(nrf_drv_spi_t const * const p_instance, + nrf_drv_spi_xfer_desc_t const * p_xfer_desc, + uint32_t flags) +{ + spi_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; + ASSERT(p_cb->state != NRF_DRV_STATE_UNINITIALIZED); + ASSERT(p_tx_buffer != NULL || tx_buffer_length == 0); + ASSERT(p_rx_buffer != NULL || rx_buffer_length == 0); + + if (p_cb->transfer_in_progress) + { + return NRF_ERROR_BUSY; + } + else + { + if (p_cb->handler && !(flags & (NRF_DRV_SPI_FLAG_REPEATED_XFER | NRF_DRV_SPI_FLAG_NO_XFER_EVT_HANDLER))) + { + p_cb->transfer_in_progress = true; + } + } + + p_cb->evt.data.done = *p_xfer_desc; + p_cb->tx_done = false; + p_cb->rx_done = false; + + if (p_cb->ss_pin != NRF_DRV_SPI_PIN_NOT_USED) + { + nrf_gpio_pin_clear(p_cb->ss_pin); + } + CODE_FOR_SPIM + ( + return spim_xfer(p_instance->p_registers, p_cb, p_xfer_desc, flags); + ) + CODE_FOR_SPI + ( + if (flags) + { + p_cb->transfer_in_progress = false; + return NRF_ERROR_NOT_SUPPORTED; + } + spi_xfer(p_instance->p_registers, p_cb, p_xfer_desc); + return NRF_SUCCESS; + ) +} +#ifdef SPIM_IN_USE +static void irq_handler_spim(NRF_SPIM_Type * p_spim, spi_control_block_t * p_cb) +{ + ASSERT(p_cb->handler); + +#ifdef NRF52_PAN_23 + if (nrf_spim_event_check(p_spim, NRF_SPIM_EVENT_STOPPED)) + { + nrf_spim_event_clear(p_spim, NRF_SPIM_EVENT_STOPPED); + finish_transfer(p_cb); + } + else + { + if (nrf_spim_event_check(p_spim, NRF_SPIM_EVENT_ENDTX)) + { + nrf_spim_event_clear(p_spim, NRF_SPIM_EVENT_ENDTX); + p_cb->tx_done = true; + } + if (nrf_spim_event_check(p_spim, NRF_SPIM_EVENT_ENDRX)) + { + nrf_spim_event_clear(p_spim, NRF_SPIM_EVENT_ENDRX); + p_cb->rx_done = true; + } + if (p_cb->tx_done && p_cb->rx_done) + { + nrf_spim_task_trigger(p_spim, NRF_SPIM_TASK_STOP); + } + } +#else + if (nrf_spim_event_check(p_spim, NRF_SPIM_EVENT_END)) + { + nrf_spim_event_clear(p_spim, NRF_SPIM_EVENT_END); + finish_transfer(p_cb); + } +#endif +} + +uint32_t nrf_drv_spi_start_task_get(nrf_drv_spi_t const * p_instance) +{ + NRF_SPIM_Type * p_spim = (NRF_SPIM_Type *)p_instance->p_registers; + return nrf_spim_task_address_get(p_spim, NRF_SPIM_TASK_START); +} + +uint32_t nrf_drv_spi_end_event_get(nrf_drv_spi_t const * p_instance) +{ + NRF_SPIM_Type * p_spim = (NRF_SPIM_Type *)p_instance->p_registers; + return nrf_spim_event_address_get(p_spim, NRF_SPIM_EVENT_END); +} +#endif // SPIM_IN_USE + +#ifdef SPI_IN_USE +static void irq_handler_spi(NRF_SPI_Type * p_spi, spi_control_block_t * p_cb) +{ + ASSERT(p_cb->handler); + + nrf_spi_event_clear(p_spi, NRF_SPI_EVENT_READY); + + if (!transfer_byte(p_spi, p_cb)) + { + finish_transfer(p_cb); + } +} +#endif // SPI_IN_USE + +#if SPI0_ENABLED +IRQ_HANDLER(0) +{ + spi_control_block_t * p_cb = &m_cb[SPI0_INSTANCE_INDEX]; + #if SPI0_USE_EASY_DMA + irq_handler_spim(NRF_SPIM0, p_cb); + #else + irq_handler_spi(NRF_SPI0, p_cb); + #endif +} +#endif // SPI0_ENABLED + +#if SPI1_ENABLED +IRQ_HANDLER(1) +{ + spi_control_block_t * p_cb = &m_cb[SPI1_INSTANCE_INDEX]; + #if SPI1_USE_EASY_DMA + irq_handler_spim(NRF_SPIM1, p_cb); + #else + irq_handler_spi(NRF_SPI1, p_cb); + #endif +} +#endif // SPI1_ENABLED + +#if SPI2_ENABLED +IRQ_HANDLER(2) +{ + spi_control_block_t * p_cb = &m_cb[SPI2_INSTANCE_INDEX]; + #if SPI2_USE_EASY_DMA + irq_handler_spim(NRF_SPIM2, p_cb); + #else + irq_handler_spi(NRF_SPI2, p_cb); + #endif +} +#endif // SPI2_ENABLED diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.h new file mode 100644 index 0000000000..aa63a3a728 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.h @@ -0,0 +1,368 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/**@file + * @addtogroup nrf_spi Serial peripheral interface (SPI) + * @ingroup nrf_drivers + * @brief Serial peripheral interface (SPI) APIs. + * + * + * @addtogroup nrf_spi_master SPI master HAL and driver + * @ingroup nrf_spi + * @brief SPI master APIs. + */ + +#ifndef NRF_DRV_SPI_H__ +#define NRF_DRV_SPI_H__ + +#include "nordic_common.h" +#include "nrf_drv_config.h" +#include "nrf_spi.h" +#include "nrf_spim.h" +#include "sdk_errors.h" + +#if defined(NRF52) + #define NRF_DRV_SPI_PERIPHERAL(id) \ + (CONCAT_3(SPI, id, _USE_EASY_DMA) == 1 ? \ + (void *)CONCAT_2(NRF_SPIM, id) \ + : (void *)CONCAT_2(NRF_SPI, id)) + #define SPI2_IRQ SPIM2_SPIS2_SPI2_IRQn + #define SPI2_IRQ_HANDLER SPIM2_SPIS2_SPI2_IRQHandler +#else + #define NRF_DRV_SPI_PERIPHERAL(id) (void *)CONCAT_2(NRF_SPI, id) +#endif +#define SPI0_IRQ SPI0_TWI0_IRQn +#define SPI0_IRQ_HANDLER SPI0_TWI0_IRQHandler +#define SPI1_IRQ SPI1_TWI1_IRQn +#define SPI1_IRQ_HANDLER SPI1_TWI1_IRQHandler + + +/** + * @defgroup nrf_drv_spi_master SPI master driver + * @{ + * @ingroup nrf_spi_master + * + * @brief Multi-instance SPI master driver. + */ + +/** + * @brief SPI master driver instance data structure. + */ +typedef struct +{ + void * p_registers; ///< Pointer to the structure with SPI/SPIM peripheral instance registers. + IRQn_Type irq; ///< SPI/SPIM peripheral instance IRQ number. + uint8_t drv_inst_idx; ///< Driver instance index. + bool use_easy_dma; ///< True if the peripheral with EasyDMA (SPIM) shall be used. +} nrf_drv_spi_t; + +/** + * @brief Macro for creating an SPI master driver instance. + */ +#define NRF_DRV_SPI_INSTANCE(id) \ +{ \ + .p_registers = NRF_DRV_SPI_PERIPHERAL(id), \ + .irq = CONCAT_3(SPI, id, _IRQ), \ + .drv_inst_idx = CONCAT_3(SPI, id, _INSTANCE_INDEX), \ + .use_easy_dma = CONCAT_3(SPI, id, _USE_EASY_DMA) \ +} + +/** + * @brief This value can be provided instead of a pin number for signals MOSI, + * MISO, and Slave Select to specify that the given signal is not used and + * therefore does not need to be connected to a pin. + */ +#define NRF_DRV_SPI_PIN_NOT_USED 0xFF + +/** + * @brief SPI data rates. + */ +typedef enum +{ + NRF_DRV_SPI_FREQ_125K = NRF_SPI_FREQ_125K, ///< 125 kbps. + NRF_DRV_SPI_FREQ_250K = NRF_SPI_FREQ_250K, ///< 250 kbps. + NRF_DRV_SPI_FREQ_500K = NRF_SPI_FREQ_500K, ///< 500 kbps. + NRF_DRV_SPI_FREQ_1M = NRF_SPI_FREQ_1M, ///< 1 Mbps. + NRF_DRV_SPI_FREQ_2M = NRF_SPI_FREQ_2M, ///< 2 Mbps. + NRF_DRV_SPI_FREQ_4M = NRF_SPI_FREQ_4M, ///< 4 Mbps. + NRF_DRV_SPI_FREQ_8M = NRF_SPI_FREQ_8M ///< 8 Mbps. +} nrf_drv_spi_frequency_t; + +/** + * @brief SPI modes. + */ +typedef enum +{ + NRF_DRV_SPI_MODE_0 = NRF_SPI_MODE_0, ///< SCK active high, sample on leading edge of clock. + NRF_DRV_SPI_MODE_1 = NRF_SPI_MODE_1, ///< SCK active high, sample on trailing edge of clock. + NRF_DRV_SPI_MODE_2 = NRF_SPI_MODE_2, ///< SCK active low, sample on leading edge of clock. + NRF_DRV_SPI_MODE_3 = NRF_SPI_MODE_3 ///< SCK active low, sample on trailing edge of clock. +} nrf_drv_spi_mode_t; + +/** + * @brief SPI bit orders. + */ +typedef enum +{ + NRF_DRV_SPI_BIT_ORDER_MSB_FIRST = NRF_SPI_BIT_ORDER_MSB_FIRST, ///< Most significant bit shifted out first. + NRF_DRV_SPI_BIT_ORDER_LSB_FIRST = NRF_SPI_BIT_ORDER_LSB_FIRST ///< Least significant bit shifted out first. +} nrf_drv_spi_bit_order_t; + +/** + * @brief SPI master driver instance configuration structure. + */ +typedef struct +{ + uint8_t sck_pin; ///< SCK pin number. + uint8_t mosi_pin; ///< MOSI pin number (optional). + /**< Set to @ref NRF_DRV_SPI_PIN_NOT_USED + * if this signal is not needed. */ + uint8_t miso_pin; ///< MISO pin number (optional). + /**< Set to @ref NRF_DRV_SPI_PIN_NOT_USED + * if this signal is not needed. */ + uint8_t ss_pin; ///< Slave Select pin number (optional). + /**< Set to @ref NRF_DRV_SPI_PIN_NOT_USED + * if this signal is not needed. The driver + * supports only active low for this signal. + * If the signal should be active high, + * it must be controlled externally. */ + uint8_t irq_priority; ///< Interrupt priority. + uint8_t orc; ///< Over-run character. + /**< This character is used when all bytes from the TX buffer are sent, + but the transfer continues due to RX. */ + nrf_drv_spi_frequency_t frequency; ///< SPI frequency. + nrf_drv_spi_mode_t mode; ///< SPI mode. + nrf_drv_spi_bit_order_t bit_order; ///< SPI bit order. +} nrf_drv_spi_config_t; + +/** + * @brief SPI master instance default configuration. + */ +#define NRF_DRV_SPI_DEFAULT_CONFIG(id) \ +{ \ + .sck_pin = CONCAT_3(SPI, id, _CONFIG_SCK_PIN), \ + .mosi_pin = CONCAT_3(SPI, id, _CONFIG_MOSI_PIN), \ + .miso_pin = CONCAT_3(SPI, id, _CONFIG_MISO_PIN), \ + .ss_pin = NRF_DRV_SPI_PIN_NOT_USED, \ + .irq_priority = CONCAT_3(SPI, id, _CONFIG_IRQ_PRIORITY), \ + .orc = 0xFF, \ + .frequency = NRF_DRV_SPI_FREQ_4M, \ + .mode = NRF_DRV_SPI_MODE_0, \ + .bit_order = NRF_DRV_SPI_BIT_ORDER_MSB_FIRST, \ +} + +#define NRF_DRV_SPI_FLAG_TX_POSTINC (1UL << 0) /**< TX buffer address incremented after transfer. */ +#define NRF_DRV_SPI_FLAG_RX_POSTINC (1UL << 1) /**< RX buffer address incremented after transfer. */ +#define NRF_DRV_SPI_FLAG_NO_XFER_EVT_HANDLER (1UL << 2) /**< Interrupt after each transfer is suppressed, and the event handler is not called. */ +#define NRF_DRV_SPI_FLAG_HOLD_XFER (1UL << 3) /**< Set up the transfer but do not start it. */ +#define NRF_DRV_SPI_FLAG_REPEATED_XFER (1UL << 4) /**< Flag indicating that the transfer will be executed multiple times. */ + +/** + * @brief Single transfer descriptor structure. + */ +typedef struct +{ + uint8_t const * p_tx_buffer; ///< Pointer to TX buffer. + uint8_t tx_length; ///< TX buffer length. + uint8_t * p_rx_buffer; ///< Pointer to RX buffer. + uint8_t rx_length; ///< RX buffer length. +}nrf_drv_spi_xfer_desc_t; + + +/** + * @brief Macro for setting up single transfer descriptor. + * + * This macro is for internal use only. + */ +#define NRF_DRV_SPI_SINGLE_XFER(p_tx, tx_len, p_rx, rx_len) \ + { \ + .p_tx_buffer = (uint8_t const *)(p_tx), \ + .tx_length = (tx_len), \ + .p_rx_buffer = (p_rx), \ + .rx_length = (rx_len), \ + } + +/** + * @brief Macro for setting duplex TX RX transfer. + */ +#define NRF_DRV_SPI_XFER_TRX(p_tx_buf, tx_length, p_rx_buf, rx_length) \ + NRF_DRV_SPI_SINGLE_XFER(p_tx_buf, tx_length, p_rx_buf, rx_length) + +/** + * @brief Macro for setting TX transfer. + */ +#define NRF_DRV_SPI_XFER_TX(p_buf, length) \ + NRF_DRV_SPI_SINGLE_XFER(p_buf, length, NULL, 0) + +/** + * @brief Macro for setting RX transfer. + */ +#define NRF_DRV_SPI_XFER_RX(p_buf, length) \ + NRF_DRV_SPI_SINGLE_XFER(NULL, 0, p_buf, length) + +/** + * @brief SPI master driver event types, passed to the handler routine provided + * during initialization. + */ +typedef enum +{ + NRF_DRV_SPI_EVENT_DONE, ///< Transfer done. +} nrf_drv_spi_evt_type_t; + +typedef struct +{ + nrf_drv_spi_evt_type_t type; ///< Event type. + union + { + nrf_drv_spi_xfer_desc_t done; ///< Event data for DONE event. + } data; +} nrf_drv_spi_evt_t; + +/** + * @brief SPI master driver event handler type. + */ +typedef void (*nrf_drv_spi_handler_t)(nrf_drv_spi_evt_t const * p_event); + + +/** + * @brief Function for initializing the SPI master driver instance. + * + * This function configures and enables the specified peripheral. + * + * @param[in] p_instance Pointer to the instance structure. + * @param[in] p_config Pointer to the structure with the initial configuration. + * If NULL, the default configuration is used. + * @param handler Event handler provided by the user. If NULL, transfers + * will be performed in blocking mode. + * + * @retval NRF_SUCCESS If initialization was successful. + * @retval NRF_ERROR_INVALID_STATE If the driver was already initialized. + * @retval NRF_ERROR_BUSY If some other peripheral with the same + * instance ID is already in use. This is + * possible only if PERIPHERAL_RESOURCE_SHARING_ENABLED + * is set to a value other than zero. + */ +ret_code_t nrf_drv_spi_init(nrf_drv_spi_t const * const p_instance, + nrf_drv_spi_config_t const * p_config, + nrf_drv_spi_handler_t handler); + +/** + * @brief Function for uninitializing the SPI master driver instance. + * + * @param[in] p_instance Pointer to the instance structure. + */ +void nrf_drv_spi_uninit(nrf_drv_spi_t const * const p_instance); + +/** + * @brief Function for starting the SPI data transfer. + * + * If an event handler was provided in the @ref nrf_drv_spi_init call, this function + * returns immediately and the handler is called when the transfer is done. + * Otherwise, the transfer is performed in blocking mode, which means that this function + * returns when the transfer is finished. + * + * @note Peripherals using EasyDMA (for example, SPIM) require the transfer buffers + * to be placed in the Data RAM region. If they are not and an SPIM instance is + * used, this function will fail with the error code NRF_ERROR_INVALID_ADDR. + * + * @param[in] p_instance Pointer to the instance structure. + * @param[in] p_tx_buffer Pointer to the transmit buffer. Can be NULL + * if there is nothing to send. + * @param tx_buffer_length Length of the transmit buffer. + * @param[in] p_rx_buffer Pointer to the receive buffer. Can be NULL + * if there is nothing to receive. + * @param rx_buffer_length Length of the receive buffer. + * + * @retval NRF_SUCCESS If the operation was successful. + * @retval NRF_ERROR_BUSY If a previously started transfer has not finished + * yet. + * @retval NRF_ERROR_INVALID_ADDR If the provided buffers are not placed in the Data + * RAM region. + */ +ret_code_t nrf_drv_spi_transfer(nrf_drv_spi_t const * const p_instance, + uint8_t const * p_tx_buffer, + uint8_t tx_buffer_length, + uint8_t * p_rx_buffer, + uint8_t rx_buffer_length); + + +/** + * @brief Function for starting the SPI data transfer with additional option flags. + * + * Function enables customizing the transfer by using option flags. + * + * Additional options are provided using the flags parameter: + * + * - @ref NRF_DRV_SPI_FLAG_TX_POSTINC and @ref NRF_DRV_SPI_FLAG_RX_POSTINC: + * Post-incrementation of buffer addresses. Supported only by SPIM. + * - @ref NRF_DRV_SPI_FLAG_HOLD_XFER: Driver is not starting the transfer. Use this + * flag if the transfer is triggered externally by PPI. Supported only by SPIM. Use + * @ref nrf_drv_twi_start_task_get to get the address of the start task. + * - @ref NRF_DRV_SPI_FLAG_NO_XFER_EVT_HANDLER: No user event handler after transfer + * completion. This also means no interrupt at the end of the transfer. Supported only by SPIM. + * If @ref NRF_DRV_SPI_FLAG_NO_XFER_EVT_HANDLER is used, the driver does not set the instance into + * busy state, so you must ensure that the next transfers are set up when SPIM is not active. + * @ref nrf_drv_spi_end_event_get function can be used to detect end of transfer. Option can be used + * together with @ref NRF_DRV_SPI_FLAG_REPEATED_XFER to prepare a sequence of SPI transfers + * without interruptions. + * - @ref NRF_DRV_SPI_FLAG_REPEATED_XFER: Prepare for repeated transfers. You can set + * up a number of transfers that will be triggered externally (for example by PPI). An example is + * a TXRX transfer with the options @ref NRF_DRV_SPI_FLAG_RX_POSTINC, + * @ref NRF_DRV_SPI_FLAG_NO_XFER_EVT_HANDLER, and @ref NRF_DRV_SPI_FLAG_REPEATED_XFER. After the + * transfer is set up, a set of transfers can be triggered by PPI that will read, for example, + * the same register of an external component and put it into a RAM buffer without any interrupts. + * @ref nrf_drv_spi_end_event_get can be used to get the address of the END event, which can be + * used to count the number of transfers. If @ref NRF_DRV_SPI_FLAG_REPEATED_XFER is used, + * the driver does not set the instance into busy state, so you must ensure that the next + * transfers are set up when SPIM is not active. Supported only by SPIM. + * @note Function is intended to be used only in non-blocking mode. + * + * @param p_instance SPI instance. + * @param p_xfer_desc Pointer to the transfer descriptor. + * @param flags Transfer options (0 for default settings). + * + * @retval NRF_SUCCESS If the procedure was successful. + * @retval NRF_ERROR_BUSY If the driver is not ready for a new transfer. + * @retval NRF_ERROR_NOT_SUPPORTED If the provided parameters are not supported. + * @retval NRF_ERROR_INVALID_ADDR If the provided buffers are not placed in the Data + * RAM region. + */ +ret_code_t nrf_drv_spi_xfer(nrf_drv_spi_t const * const p_instance, + nrf_drv_spi_xfer_desc_t const * p_xfer_desc, + uint32_t flags); + +/** + * @brief Function for returning the address of a SPIM start task. + * + * This function should be used if @ref nrf_drv_spi_xfer was called with the flag @ref NRF_DRV_SPI_FLAG_HOLD_XFER. + * In that case, the transfer is not started by the driver, but it must be started externally by PPI. + * + * @param[in] p_instance SPI instance. + * + * @return Start task address. + */ +uint32_t nrf_drv_spi_start_task_get(nrf_drv_spi_t const * p_instance); + +/** + * @brief Function for returning the address of a END SPIM event. + * + * A END event can be used to detect the end of a transfer if the @ref NRF_DRV_SPI_FLAG_NO_XFER_EVT_HANDLER + * option is used. + * + * @param[in] p_instance SPI instance. + * + * @return END event address. + */ +uint32_t nrf_drv_spi_end_event_get(nrf_drv_spi_t const * p_instance); +#endif // NRF_DRV_SPI_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/timer/nrf_drv_timer.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/timer/nrf_drv_timer.c new file mode 100644 index 0000000000..41985d2fef --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/timer/nrf_drv_timer.c @@ -0,0 +1,280 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "nrf_drv_timer.h" +#include "nrf_drv_common.h" +#include "app_util_platform.h" + +#if (TIMER_COUNT == 0) + #error "No TIMER instances enabled in the driver configuration file." +#endif + + +/**@brief Timer control block. */ +typedef struct +{ + nrf_timer_event_handler_t handler; + void * context; + nrf_drv_state_t state; +} timer_control_block_t; + +static timer_control_block_t m_cb[TIMER_COUNT]; + +static const nrf_drv_timer_config_t m_default_config[TIMER_COUNT] = { +#if TIMER0_ENABLED + NRF_DRV_TIMER_DEFAULT_CONFIG(0), +#endif +#if TIMER1_ENABLED + NRF_DRV_TIMER_DEFAULT_CONFIG(1), +#endif +#if TIMER2_ENABLED + NRF_DRV_TIMER_DEFAULT_CONFIG(2), +#endif +#if TIMER3_ENABLED + NRF_DRV_TIMER_DEFAULT_CONFIG(3), +#endif +#if TIMER4_ENABLED + NRF_DRV_TIMER_DEFAULT_CONFIG(4), +#endif +}; + + +ret_code_t nrf_drv_timer_init(nrf_drv_timer_t const * const p_instance, + nrf_drv_timer_config_t const * p_config, + nrf_timer_event_handler_t timer_event_handler) +{ + timer_control_block_t * p_cb = &m_cb[p_instance->instance_id]; + +#ifdef SOFTDEVICE_PRESENT + ASSERT(p_instance->p_reg != NRF_TIMER0); +#endif + ASSERT(NRF_TIMER_IS_BIT_WIDTH_VALID(p_instance->p_reg, p_config->bit_width)); + + if (p_cb->state != NRF_DRV_STATE_UNINITIALIZED) + { + return NRF_ERROR_INVALID_STATE; + } + + if (timer_event_handler == NULL) + { + return NRF_ERROR_INVALID_PARAM; + } + + if (p_config == NULL) + { + p_config = &m_default_config[p_instance->instance_id]; + } + + p_cb->handler = timer_event_handler; + p_cb->context = p_config->p_context; + + uint8_t i; + for (i = 0; i < p_instance->cc_channel_count; ++i) + { + nrf_timer_event_clear(p_instance->p_reg, + nrf_timer_compare_event_get(i)); + } + + nrf_drv_common_irq_enable(nrf_drv_get_IRQn(p_instance->p_reg), + p_config->interrupt_priority); + + nrf_timer_mode_set(p_instance->p_reg, p_config->mode); + nrf_timer_bit_width_set(p_instance->p_reg, p_config->bit_width); + nrf_timer_frequency_set(p_instance->p_reg, p_config->frequency); + + p_cb->state = NRF_DRV_STATE_INITIALIZED; + + return NRF_SUCCESS; +} + +void nrf_drv_timer_uninit(nrf_drv_timer_t const * const p_instance) +{ + nrf_drv_common_irq_disable(nrf_drv_get_IRQn(p_instance->p_reg)); + + #define DISABLE_ALL UINT32_MAX + nrf_timer_shorts_disable(p_instance->p_reg, DISABLE_ALL); + nrf_timer_int_disable(p_instance->p_reg, DISABLE_ALL); + #undef DISABLE_ALL + + nrf_drv_timer_disable(p_instance); + + m_cb[p_instance->instance_id].state = NRF_DRV_STATE_UNINITIALIZED; +} + +void nrf_drv_timer_enable(nrf_drv_timer_t const * const p_instance) +{ + ASSERT(m_cb[p_instance->instance_id].state == NRF_DRV_STATE_INITIALIZED); + nrf_timer_task_trigger(p_instance->p_reg, NRF_TIMER_TASK_START); + m_cb[p_instance->instance_id].state = NRF_DRV_STATE_POWERED_ON; +} + +void nrf_drv_timer_disable(nrf_drv_timer_t const * const p_instance) +{ + ASSERT(m_cb[p_instance->instance_id].state == NRF_DRV_STATE_POWERED_ON); + nrf_timer_task_trigger(p_instance->p_reg, NRF_TIMER_TASK_SHUTDOWN); + m_cb[p_instance->instance_id].state = NRF_DRV_STATE_INITIALIZED; +} + +void nrf_drv_timer_resume(nrf_drv_timer_t const * const p_instance) +{ + ASSERT(m_cb[p_instance->instance_id].state == NRF_DRV_STATE_POWERED_ON); + nrf_timer_task_trigger(p_instance->p_reg, NRF_TIMER_TASK_START); +} + +void nrf_drv_timer_pause(nrf_drv_timer_t const * const p_instance) +{ + ASSERT(m_cb[p_instance->instance_id].state == NRF_DRV_STATE_POWERED_ON); + nrf_timer_task_trigger(p_instance->p_reg, NRF_TIMER_TASK_STOP); +} + +void nrf_drv_timer_clear(nrf_drv_timer_t const * const p_instance) +{ + ASSERT(m_cb[p_instance->instance_id].state != NRF_DRV_STATE_UNINITIALIZED); + nrf_timer_task_trigger(p_instance->p_reg, NRF_TIMER_TASK_CLEAR); +} + +void nrf_drv_timer_increment(nrf_drv_timer_t const * const p_instance) +{ + ASSERT(m_cb[p_instance->instance_id].state == NRF_DRV_STATE_POWERED_ON); + ASSERT(nrf_timer_mode_get(p_instance->p_reg) != NRF_TIMER_MODE_TIMER); + + nrf_timer_task_trigger(p_instance->p_reg, NRF_TIMER_TASK_COUNT); +} + +uint32_t nrf_drv_timer_capture(nrf_drv_timer_t const * const p_instance, + nrf_timer_cc_channel_t cc_channel) +{ + ASSERT(m_cb[p_instance->instance_id].state == NRF_DRV_STATE_POWERED_ON); + ASSERT(cc_channel < p_instance->cc_channel_count); + + nrf_timer_task_trigger(p_instance->p_reg, + nrf_timer_capture_task_get(cc_channel)); + return nrf_timer_cc_read(p_instance->p_reg, cc_channel); +} + +void nrf_drv_timer_compare(nrf_drv_timer_t const * const p_instance, + nrf_timer_cc_channel_t cc_channel, + uint32_t cc_value, + bool enable_int) +{ + nrf_timer_int_mask_t timer_int = nrf_timer_compare_int_get(cc_channel); + + if (enable_int) + { + nrf_timer_int_enable(p_instance->p_reg, timer_int); + } + else + { + nrf_timer_int_disable(p_instance->p_reg, timer_int); + } + + nrf_timer_cc_write(p_instance->p_reg, cc_channel, cc_value); +} + +void nrf_drv_timer_extended_compare(nrf_drv_timer_t const * const p_instance, + nrf_timer_cc_channel_t cc_channel, + uint32_t cc_value, + nrf_timer_short_mask_t timer_short_mask, + bool enable_int) +{ + nrf_timer_shorts_disable(p_instance->p_reg, + (TIMER_SHORTS_COMPARE0_STOP_Msk << cc_channel) | + (TIMER_SHORTS_COMPARE0_CLEAR_Msk << cc_channel)); + + nrf_timer_shorts_enable(p_instance->p_reg, timer_short_mask); + + (void)nrf_drv_timer_compare(p_instance, + cc_channel, + cc_value, + enable_int); +} + +void nrf_drv_timer_compare_int_enable(nrf_drv_timer_t const * const p_instance, + uint32_t channel) +{ + ASSERT(m_cb[p_instance->instance_id].state != NRF_DRV_STATE_UNINITIALIZED); + ASSERT(channel < p_instance->cc_channel_count); + + nrf_timer_event_clear(p_instance->p_reg, + nrf_timer_compare_event_get(channel)); + nrf_timer_int_enable(p_instance->p_reg, + nrf_timer_compare_int_get(channel)); +} + +void nrf_drv_timer_compare_int_disable(nrf_drv_timer_t const * const p_instance, + uint32_t channel) +{ + ASSERT(m_cb[p_instance->instance_id].state != NRF_DRV_STATE_UNINITIALIZED); + ASSERT(channel < p_instance->cc_channel_count); + + nrf_timer_int_disable(p_instance->p_reg, + nrf_timer_compare_int_get(channel)); +} + +static void irq_handler(NRF_TIMER_Type * p_reg, + timer_control_block_t * p_cb, + uint8_t channel_count) +{ + uint8_t i; + for (i = 0; i < channel_count; ++i) + { + nrf_timer_event_t event = nrf_timer_compare_event_get(i); + nrf_timer_int_mask_t int_mask = nrf_timer_compare_int_get(i); + + if (nrf_timer_event_check(p_reg, event) && + nrf_timer_int_enable_check(p_reg, int_mask)) + { + nrf_timer_event_clear(p_reg, event); + p_cb->handler(event, p_cb->context); + } + } +} + +#if TIMER0_ENABLED +void TIMER0_IRQHandler(void) +{ + irq_handler(NRF_TIMER0, &m_cb[TIMER0_INSTANCE_INDEX], + NRF_TIMER_CC_CHANNEL_COUNT(0)); +} +#endif + +#if TIMER1_ENABLED +void TIMER1_IRQHandler(void) +{ + irq_handler(NRF_TIMER1, &m_cb[TIMER1_INSTANCE_INDEX], + NRF_TIMER_CC_CHANNEL_COUNT(1)); +} +#endif + +#if TIMER2_ENABLED +void TIMER2_IRQHandler(void) +{ + irq_handler(NRF_TIMER2, &m_cb[TIMER2_INSTANCE_INDEX], + NRF_TIMER_CC_CHANNEL_COUNT(2)); +} +#endif + +#if TIMER3_ENABLED +void TIMER3_IRQHandler(void) +{ + irq_handler(NRF_TIMER3, &m_cb[TIMER3_INSTANCE_INDEX], + NRF_TIMER_CC_CHANNEL_COUNT(3)); +} +#endif + +#if TIMER4_ENABLED +void TIMER4_IRQHandler(void) +{ + irq_handler(NRF_TIMER4, &m_cb[TIMER4_INSTANCE_INDEX], + NRF_TIMER_CC_CHANNEL_COUNT(4)); +} +#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/timer/nrf_drv_timer.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/timer/nrf_drv_timer.h new file mode 100644 index 0000000000..25d3bf84ba --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/timer/nrf_drv_timer.h @@ -0,0 +1,372 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/**@file + * @addtogroup nrf_timer Timer HAL and driver + * @ingroup nrf_drivers + * @brief Timer APIs. + * @details The timer HAL provides basic APIs for accessing the registers + * of the timer. The timer driver provides APIs on a higher level. + * + * @defgroup lib_driver_timer Timer driver + * @{ + * @ingroup nrf_timer + * @brief Multi-instance timer driver. + */ + +#ifndef NRF_DRV_TIMER_H__ +#define NRF_DRV_TIMER_H__ + +#include "nordic_common.h" +#include "nrf_drv_config.h" +#include "nrf_timer.h" +#include "sdk_errors.h" +#include "nrf_assert.h" + +/** + * @brief Timer driver instance data structure. + */ +typedef struct +{ + NRF_TIMER_Type * p_reg; ///< Pointer to the structure with TIMER peripheral instance registers. + uint8_t instance_id; ///< Driver instance index. + uint8_t cc_channel_count; ///< Number of capture/compare channels. +} nrf_drv_timer_t; + +/** + * @brief Macro for creating a timer driver instance. + */ +#define NRF_DRV_TIMER_INSTANCE(id) \ +{ \ + .p_reg = CONCAT_2(NRF_TIMER, id), \ + .instance_id = CONCAT_3(TIMER, id, _INSTANCE_INDEX), \ + .cc_channel_count = NRF_TIMER_CC_CHANNEL_COUNT(id), \ +} + +/** + * @brief Timer driver instance configuration structure. + */ +typedef struct +{ + nrf_timer_frequency_t frequency; ///< Frequency. + nrf_timer_mode_t mode; ///< Mode of operation. + nrf_timer_bit_width_t bit_width; ///< Bit width. + uint8_t interrupt_priority; ///< Interrupt priority. + void * p_context; ///< Context passed to interrupt handler. +} nrf_drv_timer_config_t; + +#define TIMER_CONFIG_FREQUENCY(id) CONCAT_3(TIMER, id, _CONFIG_FREQUENCY) +#define TIMER_CONFIG_MODE(id) CONCAT_3(TIMER, id, _CONFIG_MODE) +#define TIMER_CONFIG_BIT_WIDTH(id) CONCAT_3(TIMER, id, _CONFIG_BIT_WIDTH) +#define TIMER_CONFIG_IRQ_PRIORITY(id) CONCAT_3(TIMER, id, _CONFIG_IRQ_PRIORITY) + +/** + * @brief Timer driver instance default configuration. + */ +#define NRF_DRV_TIMER_DEFAULT_CONFIG(id) \ +{ \ + .frequency = TIMER_CONFIG_FREQUENCY(id), \ + .mode = (nrf_timer_mode_t)TIMER_CONFIG_MODE(id), \ + .bit_width = (nrf_timer_bit_width_t)TIMER_CONFIG_BIT_WIDTH(id), \ + .interrupt_priority = TIMER_CONFIG_IRQ_PRIORITY(id), \ + .p_context = NULL \ +} + +/** + * @brief Timer driver event handler type. + * + * @param[in] event_type Timer event. + * @param[in] p_context General purpose parameter set during initialization of + * the timer. This parameter can be used to pass + * additional information to the handler function, for + * example, the timer ID. + */ +typedef void (* nrf_timer_event_handler_t)(nrf_timer_event_t event_type, + void * p_context); + +/** + * @brief Function for initializing the timer. + * + * @param[in] p_instance Timer instance. + * @param[in] p_config Initial configuration. + * If NULL, the default configuration is used. + * @param[in] timer_event_handler Event handler provided by the user. + * Must not be NULL. + * + * @retval NRF_SUCCESS If initialization was successful. + * @retval NRF_ERROR_INVALID_STATE If the instance is already initialized. + * @retval NRF_ERROR_INVALID_PARAM If no handler was provided. + */ +ret_code_t nrf_drv_timer_init(nrf_drv_timer_t const * const p_instance, + nrf_drv_timer_config_t const * p_config, + nrf_timer_event_handler_t timer_event_handler); + +/** + * @brief Function for uninitializing the timer. + * + * @param[in] p_instance Timer instance. + */ +void nrf_drv_timer_uninit(nrf_drv_timer_t const * const p_instance); + +/** + * @brief Function for turning on the timer. + * + * @param[in] p_instance Timer instance. + */ +void nrf_drv_timer_enable(nrf_drv_timer_t const * const p_instance); + +/** + * @brief Function for turning off the timer. + * + * Note that the timer will allow to enter the lowest possible SYSTEM_ON state + * only after this function is called. + * + * @param[in] p_instance Timer instance. + */ +void nrf_drv_timer_disable(nrf_drv_timer_t const * const p_instance); + +/** + * @brief Function for pausing the timer. + * + * @param[in] p_instance Timer instance. + */ +void nrf_drv_timer_pause(nrf_drv_timer_t const * const p_instance); + +/** + * @brief Function for resuming the timer. + * + * @param[in] p_instance Timer instance. + */ +void nrf_drv_timer_resume(nrf_drv_timer_t const * const p_instance); + +/** + * @brief Function for clearing the timer. + * + * @param[in] p_instance Timer instance. + */ +void nrf_drv_timer_clear(nrf_drv_timer_t const * const p_instance); + +/** + * @brief Function for incrementing the timer. + * + * @param[in] p_instance Timer instance. + */ +void nrf_drv_timer_increment(nrf_drv_timer_t const * const p_instance); + +/** + * @brief Function for returning the address of a specific timer task. + * + * @param[in] p_instance Timer instance. + * @param[in] timer_task Timer task. + * + * @return Task address. + */ +__STATIC_INLINE uint32_t nrf_drv_timer_task_address_get( + nrf_drv_timer_t const * const p_instance, + nrf_timer_task_t timer_task); + +/** + * @brief Function for returning the address of a specific timer capture task. + * + * @param[in] p_instance Timer instance. + * @param[in] channel Capture channel number. + * + * @return Task address. + */ +__STATIC_INLINE uint32_t nrf_drv_timer_capture_task_address_get( + nrf_drv_timer_t const * const p_instance, + uint32_t channel); + +/** + * @brief Function for returning the address of a specific timer event. + * + * @param[in] p_instance Timer instance. + * @param[in] timer_event Timer event. + * + * @return Event address. + */ +__STATIC_INLINE uint32_t nrf_drv_timer_event_address_get( + nrf_drv_timer_t const * const p_instance, + nrf_timer_event_t timer_event); + +/** + * @brief Function for returning the address of a specific timer compare event. + * + * @param[in] p_instance Timer instance. + * @param[in] channel Compare channel number. + * + * @return Event address. + */ +__STATIC_INLINE uint32_t nrf_drv_timer_compare_event_address_get( + nrf_drv_timer_t const * const p_instance, + uint32_t channel); + +/** + * @brief Function for capturing the timer value. + * + * @param[in] p_instance Timer instance. + * @param[in] cc_channel Capture channel number. + * + * @return Captured value. + */ +uint32_t nrf_drv_timer_capture(nrf_drv_timer_t const * const p_instance, + nrf_timer_cc_channel_t cc_channel); + +/** + * @brief Function for returning the capture value from a specific channel. + * + * Use this function to read channel values when PPI is used for capturing. + * + * @param[in] p_instance Timer instance. + * @param[in] cc_channel Capture channel number. + * + * @return Captured value. + */ +__STATIC_INLINE uint32_t nrf_drv_timer_capture_get( + nrf_drv_timer_t const * const p_instance, + nrf_timer_cc_channel_t cc_channel); + +/** + * @brief Function for setting the timer channel in compare mode. + * + * @param[in] p_instance Timer instance. + * @param[in] cc_channel Compare channel number. + * @param[in] cc_value Compare value. + * @param[in] enable_int Enable or disable the interrupt for the compare channel. + */ +void nrf_drv_timer_compare(nrf_drv_timer_t const * const p_instance, + nrf_timer_cc_channel_t cc_channel, + uint32_t cc_value, + bool enable_int); + +/** + * @brief Function for setting the timer channel in extended compare mode. + * + * @param[in] p_instance Timer instance. + * @param[in] cc_channel Compare channel number. + * @param[in] cc_value Compare value. + * @param[in] timer_short_mask Shortcut between the compare event on the channel + * and the timer task (STOP or CLEAR). + * @param[in] enable_int Enable or disable the interrupt for the compare + * channel. + */ +void nrf_drv_timer_extended_compare(nrf_drv_timer_t const * const p_instance, + nrf_timer_cc_channel_t cc_channel, + uint32_t cc_value, + nrf_timer_short_mask_t timer_short_mask, + bool enable_int); + +/** + * @brief Function for converting time in microseconds to timer ticks. + * + * @param[in] p_instance Timer instance. + * @param[in] time_us Time in microseconds. + * + * @return Number of ticks. + */ +__STATIC_INLINE uint32_t nrf_drv_timer_us_to_ticks( + nrf_drv_timer_t const * const p_instance, + uint32_t time_us); + +/** + * @brief Function for converting time in milliseconds to timer ticks. + * + * @param[in] p_instance Timer instance. + * @param[in] time_ms Time in milliseconds. + * + * @return Number of ticks. + */ +__STATIC_INLINE uint32_t nrf_drv_timer_ms_to_ticks( + nrf_drv_timer_t const * const p_instance, + uint32_t time_ms); + +/** + * @brief Function for enabling timer compare interrupt. + * + * @param[in] p_instance Timer instance. + * @param[in] channel Compare channel. + */ +void nrf_drv_timer_compare_int_enable(nrf_drv_timer_t const * const p_instance, + uint32_t channel); + +/** + * @brief Function for disabling timer compare interrupt. + * + * @param[in] p_instance Timer instance. + * @param[in] channel Compare channel. + */ +void nrf_drv_timer_compare_int_disable(nrf_drv_timer_t const * const p_instance, + uint32_t channel); + + +#ifndef SUPPRESS_INLINE_IMPLEMENTATION + +__STATIC_INLINE uint32_t nrf_drv_timer_task_address_get( + nrf_drv_timer_t const * const p_instance, + nrf_timer_task_t timer_task) +{ + return (uint32_t)nrf_timer_task_address_get(p_instance->p_reg, timer_task); +} + +__STATIC_INLINE uint32_t nrf_drv_timer_capture_task_address_get( + nrf_drv_timer_t const * const p_instance, + uint32_t channel) +{ + ASSERT(channel < p_instance->cc_channel_count); + return (uint32_t)nrf_timer_task_address_get(p_instance->p_reg, + nrf_timer_capture_task_get(channel)); +} + +__STATIC_INLINE uint32_t nrf_drv_timer_event_address_get( + nrf_drv_timer_t const * const p_instance, + nrf_timer_event_t timer_event) +{ + return (uint32_t)nrf_timer_event_address_get(p_instance->p_reg, timer_event); +} + +__STATIC_INLINE uint32_t nrf_drv_timer_compare_event_address_get( + nrf_drv_timer_t const * const p_instance, + uint32_t channel) +{ + ASSERT(channel < p_instance->cc_channel_count); + return (uint32_t)nrf_timer_event_address_get(p_instance->p_reg, + nrf_timer_compare_event_get(channel)); +} + +__STATIC_INLINE uint32_t nrf_drv_timer_capture_get( + nrf_drv_timer_t const * const p_instance, + nrf_timer_cc_channel_t cc_channel) +{ + return nrf_timer_cc_read(p_instance->p_reg, cc_channel); +} + +__STATIC_INLINE uint32_t nrf_drv_timer_us_to_ticks( + nrf_drv_timer_t const * const p_instance, + uint32_t timer_us) +{ + return nrf_timer_us_to_ticks(timer_us, + nrf_timer_frequency_get(p_instance->p_reg)); +} + +__STATIC_INLINE uint32_t nrf_drv_timer_ms_to_ticks( + nrf_drv_timer_t const * const p_instance, + uint32_t timer_ms) +{ + return nrf_timer_ms_to_ticks(timer_ms, + nrf_timer_frequency_get(p_instance->p_reg)); +} + +#endif // SUPPRESS_INLINE_IMPLEMENTATION + +#endif // NRF_DRV_TIMER_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.c new file mode 100644 index 0000000000..709fac5fb7 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.c @@ -0,0 +1,972 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "nrf_drv_twi.h" +#include "nrf_drv_common.h" +#include "nrf_gpio.h" +#include "nrf_assert.h" +#include "app_util_platform.h" +#include "nrf_delay.h" + +#include + +#define TWI0_IRQ_HANDLER SPI0_TWI0_IRQHandler +#define TWI1_IRQ_HANDLER SPI1_TWI1_IRQHandler + +#if (defined(TWIM_IN_USE) && defined(TWI_IN_USE)) + // TWIM and TWI combined + #define CODE_FOR_TWIM(code) if (p_instance->use_easy_dma) { code } + #define CODE_FOR_TWI(code) else { code } +#elif (defined(TWIM_IN_USE) && !defined(TWI_IN_USE)) + // TWIM only + #define CODE_FOR_TWIM(code) { code } + #define CODE_FOR_TWI(code) +#elif (!defined(TWIM_IN_USE) && defined(TWI_IN_USE)) + // TWI only + #define CODE_FOR_TWIM(code) + #define CODE_FOR_TWI(code) { code } +#else + #error "Wrong configuration." +#endif + +// All interrupt flags +#define DISABLE_ALL 0xFFFFFFFF + +#define SCL_PIN_CONF ((GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) \ + | (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) \ + | (GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) \ + | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) \ + | (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos)) + +#define SDA_PIN_CONF SCL_PIN_CONF + +#define SCL_PIN_CONF_CLR ((GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) \ + | (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos) \ + | (GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) \ + | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) \ + | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos)) + +#define SDA_PIN_CONF_CLR SCL_PIN_CONF_CLR + +// Control block - driver instance local data. +typedef struct +{ + nrf_drv_twi_evt_handler_t handler; + void * p_context; + volatile uint32_t int_mask; + nrf_drv_twi_xfer_desc_t xfer_desc; + uint32_t flags; + uint8_t * p_curr_buf; + uint8_t curr_length; + bool curr_no_stop; + nrf_drv_state_t state; + bool error; + volatile bool busy; + bool repeated; + uint8_t bytes_transferred; +} twi_control_block_t; + +static twi_control_block_t m_cb[TWI_COUNT]; + +static nrf_drv_twi_config_t const m_default_config[TWI_COUNT] = { +#if TWI0_ENABLED + NRF_DRV_TWI_DEFAULT_CONFIG(0), +#endif +#if TWI1_ENABLED + NRF_DRV_TWI_DEFAULT_CONFIG(1), +#endif +}; + +#if PERIPHERAL_RESOURCE_SHARING_ENABLED + #define IRQ_HANDLER_NAME(n) irq_handler_for_instance_##n + #define IRQ_HANDLER(n) static void IRQ_HANDLER_NAME(n)(void) + + #if TWI0_ENABLED + IRQ_HANDLER(0); + #endif + #if TWI1_ENABLED + IRQ_HANDLER(1); + #endif + static nrf_drv_irq_handler_t const m_irq_handlers[TWI_COUNT] = { + #if TWI0_ENABLED + IRQ_HANDLER_NAME(0), + #endif + #if TWI1_ENABLED + IRQ_HANDLER_NAME(1), + #endif + }; +#else + #define IRQ_HANDLER(n) void SPI##n##_TWI##n##_IRQHandler(void) +#endif // PERIPHERAL_RESOURCE_SHARING_ENABLED + +static void twi_clear_bus(nrf_drv_twi_t const * const p_instance, + nrf_drv_twi_config_t const * p_config) +{ + NRF_GPIO->PIN_CNF[p_config->scl] = SCL_PIN_CONF; + NRF_GPIO->PIN_CNF[p_config->sda] = SDA_PIN_CONF; + + nrf_gpio_pin_set(p_config->scl); + nrf_gpio_pin_set(p_config->sda); + + NRF_GPIO->PIN_CNF[p_config->scl] = SCL_PIN_CONF_CLR; + NRF_GPIO->PIN_CNF[p_config->sda] = SDA_PIN_CONF_CLR; + + nrf_delay_us(4); + + for(int i = 0; i < 9; i++) + { + if (nrf_gpio_pin_read(p_config->sda)) + { + if(i == 0) + { + return; + } + else + { + break; + } + } + nrf_gpio_pin_clear(p_config->scl); + nrf_delay_us(4); + nrf_gpio_pin_set(p_config->scl); + nrf_delay_us(4); + } + nrf_gpio_pin_clear(p_config->sda); + nrf_delay_us(4); + nrf_gpio_pin_set(p_config->sda); +} + +ret_code_t nrf_drv_twi_init(nrf_drv_twi_t const * p_instance, + nrf_drv_twi_config_t const * p_config, + nrf_drv_twi_evt_handler_t event_handler, + void * p_context) +{ + twi_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; + + if (p_cb->state != NRF_DRV_STATE_UNINITIALIZED) + { + return NRF_ERROR_INVALID_STATE; + } + + if (p_config == NULL) + { + p_config = &m_default_config[p_instance->drv_inst_idx]; + } + +#if PERIPHERAL_RESOURCE_SHARING_ENABLED + if (nrf_drv_common_per_res_acquire(p_instance->reg.p_twi, + m_irq_handlers[p_instance->drv_inst_idx]) != NRF_SUCCESS) + { + return NRF_ERROR_BUSY; + } +#endif // PERIPHERAL_RESOURCE_SHARING_ENABLED + + p_cb->handler = event_handler; + p_cb->p_context = p_context; + p_cb->int_mask = 0; + p_cb->repeated = false; + p_cb->busy = false; + + twi_clear_bus(p_instance, p_config); + + /* To secure correct signal levels on the pins used by the TWI + master when the system is in OFF mode, and when the TWI master is + disabled, these pins must be configured in the GPIO peripheral. + */ + NRF_GPIO->PIN_CNF[p_config->scl] = SCL_PIN_CONF; + NRF_GPIO->PIN_CNF[p_config->sda] = SDA_PIN_CONF; + + CODE_FOR_TWIM + ( + NRF_TWIM_Type * p_twim = p_instance->reg.p_twim; + nrf_twim_pins_set(p_twim, p_config->scl, p_config->sda); + nrf_twim_frequency_set(p_twim, + (nrf_twim_frequency_t)p_config->frequency); + ) + CODE_FOR_TWI + ( + NRF_TWI_Type * p_twi = p_instance->reg.p_twi; + nrf_twi_pins_set(p_twi, p_config->scl, p_config->sda); + nrf_twi_frequency_set(p_twi, + (nrf_twi_frequency_t)p_config->frequency); + ) + + if (p_cb->handler) + { + CODE_FOR_TWIM + ( + nrf_drv_common_irq_enable(nrf_drv_get_IRQn((void *)p_instance->reg.p_twim), + p_config->interrupt_priority); + ) + CODE_FOR_TWI + ( + nrf_drv_common_irq_enable(nrf_drv_get_IRQn((void *)p_instance->reg.p_twi), + p_config->interrupt_priority); + ) + } + + p_cb->state = NRF_DRV_STATE_INITIALIZED; + + return NRF_SUCCESS; +} + +void nrf_drv_twi_uninit(nrf_drv_twi_t const * p_instance) +{ + twi_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; + ASSERT(p_cb->state != NRF_DRV_STATE_UNINITIALIZED); + + if (p_cb->handler) + { + CODE_FOR_TWIM + ( + nrf_drv_common_irq_disable(nrf_drv_get_IRQn((void *)p_instance->reg.p_twim)); + ) + CODE_FOR_TWI + ( + nrf_drv_common_irq_disable(nrf_drv_get_IRQn((void *)p_instance->reg.p_twi)); + ) + } + nrf_drv_twi_disable(p_instance); + +#if PERIPHERAL_RESOURCE_SHARING_ENABLED + nrf_drv_common_per_res_release(p_instance->reg.p_twi); +#endif + + p_cb->state = NRF_DRV_STATE_UNINITIALIZED; +} + +void nrf_drv_twi_enable(nrf_drv_twi_t const * p_instance) +{ + twi_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; + ASSERT(p_cb->state == NRF_DRV_STATE_INITIALIZED); + + CODE_FOR_TWIM + ( + NRF_TWIM_Type * p_twim = p_instance->reg.p_twim; + + nrf_twim_enable(p_twim); + ) + CODE_FOR_TWI + ( + NRF_TWI_Type * p_twi = p_instance->reg.p_twi; + + nrf_twi_enable(p_twi); + ) + + p_cb->state = NRF_DRV_STATE_POWERED_ON; +} + +void nrf_drv_twi_disable(nrf_drv_twi_t const * p_instance) +{ + twi_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; + ASSERT(p_cb->state != NRF_DRV_STATE_UNINITIALIZED); + + CODE_FOR_TWIM + ( + NRF_TWIM_Type * p_twim = p_instance->reg.p_twim; + p_cb->int_mask = 0; + nrf_twim_int_disable(p_twim, DISABLE_ALL); + nrf_twim_shorts_disable(p_twim, DISABLE_ALL); + nrf_twim_disable(p_twim); + ) + CODE_FOR_TWI + ( + NRF_TWI_Type * p_twi = p_instance->reg.p_twi; + nrf_twi_int_disable(p_twi, DISABLE_ALL); + nrf_twi_shorts_disable(p_twi, DISABLE_ALL); + nrf_twi_disable(p_twi); + ) + + p_cb->state = NRF_DRV_STATE_INITIALIZED; +} + +#ifdef TWI_IN_USE +static bool twi_send_byte(NRF_TWI_Type * p_twi, + uint8_t const * p_data, + uint8_t length, + uint8_t * p_bytes_transferred, + bool no_stop) +{ + if (*p_bytes_transferred < length) + { + nrf_twi_txd_set(p_twi, p_data[*p_bytes_transferred]); + ++(*p_bytes_transferred); + } + else + { + if (no_stop) + { + nrf_twi_task_trigger(p_twi, NRF_TWI_TASK_SUSPEND); + return false; + } + else + { + nrf_twi_task_trigger(p_twi, NRF_TWI_TASK_STOP); + } + } + return true; +} + +static void twi_receive_byte(NRF_TWI_Type * p_twi, + uint8_t * p_data, + uint8_t length, + uint8_t * p_bytes_transferred) +{ + if (*p_bytes_transferred < length) + { + p_data[*p_bytes_transferred] = nrf_twi_rxd_get(p_twi); + + ++(*p_bytes_transferred); + + if (*p_bytes_transferred == length-1) + { + nrf_twi_shorts_set(p_twi, NRF_TWI_SHORT_BB_STOP_MASK); + } + else if (*p_bytes_transferred == length) + { + return; + } + + nrf_twi_task_trigger(p_twi, NRF_TWI_TASK_RESUME); + } +} + +static bool twi_transfer(NRF_TWI_Type * p_twi, + bool * p_error, + uint8_t * p_bytes_transferred, + uint8_t * p_data, + uint8_t length, + bool no_stop) +{ + bool do_stop_check; + + if ((*p_error == true) || (*p_bytes_transferred == length)) + { + do_stop_check = true; + } + else + { + do_stop_check = false; + } + + if (*p_error) + { + nrf_twi_event_clear(p_twi, NRF_TWI_EVENT_ERROR); + nrf_twi_event_clear(p_twi, NRF_TWI_EVENT_TXDSENT); + nrf_twi_event_clear(p_twi, NRF_TWI_EVENT_RXDREADY); + } + else if (nrf_twi_event_check(p_twi, NRF_TWI_EVENT_ERROR)) + { + nrf_twi_event_clear(p_twi, NRF_TWI_EVENT_ERROR); + nrf_twi_task_trigger(p_twi, NRF_TWI_TASK_STOP); + *p_error = true; + } + else + { + if (nrf_twi_event_check(p_twi, NRF_TWI_EVENT_TXDSENT)) + { + nrf_twi_event_clear(p_twi, NRF_TWI_EVENT_TXDSENT); + if (nrf_twi_event_check(p_twi, NRF_TWI_EVENT_ERROR)) + { + nrf_twi_event_clear(p_twi, NRF_TWI_EVENT_ERROR); + nrf_twi_task_trigger(p_twi, NRF_TWI_TASK_STOP); + *p_error = true; + } + else + { + if (!twi_send_byte(p_twi, p_data, length, p_bytes_transferred, no_stop)) + { + return false; + } + } + } + else if (nrf_twi_event_check(p_twi, NRF_TWI_EVENT_RXDREADY)) + { + nrf_twi_event_clear(p_twi, NRF_TWI_EVENT_RXDREADY); + if (nrf_twi_event_check(p_twi, NRF_TWI_EVENT_ERROR)) + { + nrf_twi_event_clear(p_twi, NRF_TWI_EVENT_ERROR); + nrf_twi_task_trigger(p_twi, NRF_TWI_TASK_STOP); + *p_error = true; + } + else + { + twi_receive_byte(p_twi, p_data, length, p_bytes_transferred); + } + } + } + + if (do_stop_check && nrf_twi_event_check(p_twi, NRF_TWI_EVENT_STOPPED)) + { + nrf_twi_event_clear(p_twi, NRF_TWI_EVENT_STOPPED); + return false; + } + + return true; +} + +static ret_code_t twi_tx_start_transfer(twi_control_block_t * p_cb, + NRF_TWI_Type * p_twi, + uint8_t const * p_data, + uint8_t length, + bool no_stop) +{ + ret_code_t ret_code = NRF_SUCCESS; + + nrf_twi_event_clear(p_twi, NRF_TWI_EVENT_STOPPED); + nrf_twi_event_clear(p_twi, NRF_TWI_EVENT_ERROR); + nrf_twi_event_clear(p_twi, NRF_TWI_EVENT_TXDSENT); + nrf_twi_event_clear(p_twi, NRF_TWI_EVENT_RXDREADY); + nrf_twi_shorts_set(p_twi, 0); + + p_cb->bytes_transferred = 0; + p_cb->error = false; + + // In case TWI is suspended resume its operation. + nrf_twi_task_trigger(p_twi, NRF_TWI_TASK_RESUME); + nrf_twi_task_trigger(p_twi, NRF_TWI_TASK_STARTTX); + + (void)twi_send_byte(p_twi, p_data, length, &p_cb->bytes_transferred, no_stop); + + if (p_cb->handler) + { + p_cb->int_mask = NRF_TWI_INT_STOPPED_MASK | + NRF_TWI_INT_ERROR_MASK | + NRF_TWI_INT_TXDSENT_MASK | + NRF_TWI_INT_RXDREADY_MASK; + nrf_twi_int_enable(p_twi, p_cb->int_mask); + } + else + { + while (twi_transfer(p_twi, &p_cb->error, &p_cb->bytes_transferred, (uint8_t *)p_data, length, no_stop)) + {} + + if (p_cb->error) + { + ret_code = NRF_ERROR_INTERNAL; + } + } + return ret_code; +} + +static ret_code_t twi_rx_start_transfer(twi_control_block_t * p_cb, + NRF_TWI_Type * p_twi, + uint8_t const * p_data, + uint8_t length) +{ + ret_code_t ret_code = NRF_SUCCESS; + + nrf_twi_event_clear(p_twi, NRF_TWI_EVENT_STOPPED); + nrf_twi_event_clear(p_twi, NRF_TWI_EVENT_ERROR); + nrf_twi_event_clear(p_twi, NRF_TWI_EVENT_TXDSENT); + nrf_twi_event_clear(p_twi, NRF_TWI_EVENT_RXDREADY); + + p_cb->bytes_transferred = 0; + p_cb->error = false; + + if (length == 1) + { + nrf_twi_shorts_set(p_twi, NRF_TWI_SHORT_BB_STOP_MASK); + } + else + { + nrf_twi_shorts_set(p_twi, NRF_TWI_SHORT_BB_SUSPEND_MASK); + } + // In case TWI is suspended resume its operation. + nrf_twi_task_trigger(p_twi, NRF_TWI_TASK_RESUME); + nrf_twi_task_trigger(p_twi, NRF_TWI_TASK_STARTRX); + + if (p_cb->handler) + { + p_cb->int_mask = NRF_TWI_INT_STOPPED_MASK | + NRF_TWI_INT_ERROR_MASK | + NRF_TWI_INT_TXDSENT_MASK | + NRF_TWI_INT_RXDREADY_MASK; + nrf_twi_int_enable(p_twi, p_cb->int_mask); + } + else + { + while (twi_transfer(p_twi, &p_cb->error, &p_cb->bytes_transferred, (uint8_t*)p_data, length, false)) + {} + + if (p_cb->error) + { + ret_code = NRF_ERROR_INTERNAL; + } + } + return ret_code; +} + +__STATIC_INLINE ret_code_t twi_xfer(twi_control_block_t * p_cb, + NRF_TWI_Type * p_twi, + nrf_drv_twi_xfer_desc_t const * p_xfer_desc, + uint32_t flags) +{ + ret_code_t ret = NRF_SUCCESS; + + /* Block TWI interrupts to ensure that function is not interrupted by TWI interrupt. */ + nrf_twi_int_disable(p_twi, DISABLE_ALL); + + if (p_cb->busy) + { + nrf_twi_int_enable(p_twi, p_cb->int_mask); + return NRF_ERROR_BUSY; + } + else + { + p_cb->busy = (NRF_DRV_TWI_FLAG_NO_XFER_EVT_HANDLER & flags) ? false : true; + } + + if (flags & NRF_DRV_TWI_FLAG_HOLD_XFER) + { + return NRF_ERROR_NOT_SUPPORTED; + } + + p_cb->flags = flags; + p_cb->xfer_desc = *p_xfer_desc; + p_cb->curr_length = p_xfer_desc->primary_length; + p_cb->p_curr_buf = p_xfer_desc->p_primary_buf; + nrf_twi_address_set(p_twi, p_xfer_desc->address); + + if (p_xfer_desc->type != NRF_DRV_TWI_XFER_RX) + { + p_cb->curr_no_stop = ((p_xfer_desc->type == NRF_DRV_TWI_XFER_TX) && + !(flags & NRF_DRV_TWI_FLAG_TX_NO_STOP)) ? false : true; + ret = twi_tx_start_transfer(p_cb, p_twi, p_xfer_desc->p_primary_buf, p_xfer_desc->primary_length, p_cb->curr_no_stop); + } + else + { + p_cb->curr_no_stop = false; + ret = twi_rx_start_transfer(p_cb, p_twi, p_xfer_desc->p_primary_buf, p_xfer_desc->primary_length); + } + if (p_cb->handler == NULL) + { + p_cb->busy = false; + } + return ret; +} +#endif + +#ifdef TWIM_IN_USE +__STATIC_INLINE void twim_list_enable_handle(NRF_TWIM_Type * p_twim, uint32_t flags) +{ + if (NRF_DRV_TWI_FLAG_TX_POSTINC & flags) + { + nrf_twim_tx_list_enable(p_twim); + } + else + { + nrf_twim_tx_list_disable(p_twim); + } + + if (NRF_DRV_TWI_FLAG_RX_POSTINC & flags) + { + nrf_twim_rx_list_enable(p_twim); + } + else + { + nrf_twim_rx_list_disable(p_twim); + } +#ifndef NRF52_PAN_46 +#endif +} +__STATIC_INLINE ret_code_t twim_xfer(twi_control_block_t * p_cb, + NRF_TWIM_Type * p_twim, + nrf_drv_twi_xfer_desc_t const * p_xfer_desc, + uint32_t flags) +{ + ret_code_t ret = NRF_SUCCESS; + nrf_twim_task_t start_task = NRF_TWIM_TASK_STARTTX; + nrf_twim_event_t evt_to_wait = NRF_TWIM_EVENT_STOPPED; + + if (!nrf_drv_is_in_RAM(p_xfer_desc->p_primary_buf)) + { + return NRF_ERROR_INVALID_ADDR; + } + /* Block TWI interrupts to ensure that function is not interrupted by TWI interrupt. */ + nrf_twim_int_disable(p_twim, DISABLE_ALL); + if (p_cb->busy) + { + nrf_twim_int_enable(p_twim, p_cb->int_mask); + return NRF_ERROR_BUSY; + } + else + { + + p_cb->busy = ((NRF_DRV_TWI_FLAG_NO_XFER_EVT_HANDLER & flags) || + (NRF_DRV_TWI_FLAG_REPEATED_XFER & flags)) ? false: true; + } + + p_cb->xfer_desc = *p_xfer_desc; + p_cb->repeated = (flags & NRF_DRV_TWI_FLAG_REPEATED_XFER) ? true : false; + nrf_twim_address_set(p_twim, p_xfer_desc->address); + + nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_STOPPED); + nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_ERROR); + + twim_list_enable_handle(p_twim, flags); + switch (p_xfer_desc->type) + { + case NRF_DRV_TWI_XFER_TXTX: + ASSERT(!(flags & NRF_DRV_TWI_FLAG_REPEATED_XFER)); + ASSERT(!(flags & NRF_DRV_TWI_FLAG_HOLD_XFER)); + ASSERT(!(flags & NRF_DRV_TWI_FLAG_NO_XFER_EVT_HANDLER)); + if (!nrf_drv_is_in_RAM(p_xfer_desc->p_secondary_buf)) + { + return NRF_ERROR_INVALID_ADDR; + } + nrf_twim_shorts_set(p_twim, NRF_TWIM_SHORT_LASTTX_SUSPEND_MASK); + nrf_twim_tx_buffer_set(p_twim, p_xfer_desc->p_primary_buf, p_xfer_desc->primary_length); + nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_TXSTARTED); + nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_LASTTX); + nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_SUSPENDED); + nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_RESUME); + nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_STARTTX); + while(!nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_TXSTARTED)) + {} + nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_TXSTARTED); + nrf_twim_tx_buffer_set(p_twim, p_xfer_desc->p_secondary_buf, p_xfer_desc->secondary_length); + p_cb->int_mask = NRF_TWIM_INT_SUSPENDED_MASK | NRF_TWIM_INT_ERROR_MASK; + break; + case NRF_DRV_TWI_XFER_TXRX: + nrf_twim_tx_buffer_set(p_twim, p_xfer_desc->p_primary_buf, p_xfer_desc->primary_length); + nrf_twim_rx_buffer_set(p_twim, p_xfer_desc->p_secondary_buf, p_xfer_desc->secondary_length); + nrf_twim_shorts_set(p_twim, NRF_TWIM_SHORT_LASTTX_STARTRX_MASK | + NRF_TWIM_SHORT_LASTRX_STOP_MASK); + p_cb->int_mask = NRF_TWIM_INT_STOPPED_MASK | NRF_TWIM_INT_ERROR_MASK; + break; + case NRF_DRV_TWI_XFER_TX: + nrf_twim_tx_buffer_set(p_twim, p_xfer_desc->p_primary_buf, p_xfer_desc->primary_length); + if (NRF_DRV_TWI_FLAG_TX_NO_STOP & flags) + { + nrf_twim_shorts_set(p_twim, NRF_TWIM_SHORT_LASTTX_SUSPEND_MASK); + p_cb->int_mask = NRF_TWIM_INT_SUSPENDED_MASK | NRF_TWIM_INT_ERROR_MASK; + nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_SUSPENDED); + evt_to_wait = NRF_TWIM_EVENT_SUSPENDED; + } + else + { + nrf_twim_shorts_set(p_twim, NRF_TWIM_SHORT_LASTTX_STOP_MASK); + p_cb->int_mask = NRF_TWIM_INT_STOPPED_MASK | NRF_TWIM_INT_ERROR_MASK; + } + nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_RESUME); + break; + case NRF_DRV_TWI_XFER_RX: + nrf_twim_rx_buffer_set(p_twim, p_xfer_desc->p_primary_buf, p_xfer_desc->primary_length); + nrf_twim_shorts_set(p_twim, NRF_TWIM_SHORT_LASTRX_STOP_MASK); + p_cb->int_mask = NRF_TWIM_INT_STOPPED_MASK | NRF_TWIM_INT_ERROR_MASK; + start_task = NRF_TWIM_TASK_STARTRX; + nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_RESUME); + break; + default: + ret = NRF_ERROR_INVALID_PARAM; + break; + } + + if (!(flags & NRF_DRV_TWI_FLAG_HOLD_XFER) && (p_xfer_desc->type != NRF_DRV_TWI_XFER_TXTX)) + { + nrf_twim_task_trigger(p_twim, start_task); + } + + if (p_cb->handler) + { + if (flags & NRF_DRV_TWI_FLAG_NO_XFER_EVT_HANDLER) + { + p_cb->int_mask = NRF_TWIM_INT_ERROR_MASK; + } + nrf_twim_int_enable(p_twim, p_cb->int_mask); + } + else + { + while (!nrf_twim_event_check(p_twim, evt_to_wait)) + { + if (nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_ERROR)) + { + nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_ERROR); + nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_RESUME); + nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_STOP); + evt_to_wait = NRF_TWIM_EVENT_STOPPED; + } + } + + uint32_t errorsrc = nrf_twim_errorsrc_get_and_clear(p_twim); + + p_cb->busy = false; + + if (errorsrc) + { + ret = NRF_ERROR_INTERNAL; + } + } + return ret; +} +#endif + +ret_code_t nrf_drv_twi_xfer(nrf_drv_twi_t const * p_instance, + nrf_drv_twi_xfer_desc_t const * p_xfer_desc, + uint32_t flags) +{ + ret_code_t ret = NRF_SUCCESS; + twi_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; + + // TXRX and TXTX transfers are support only in non-blocking mode. + ASSERT( !((p_cb->handler == NULL) && (p_xfer_desc->type == NRF_DRV_TWI_XFER_TXRX))); + ASSERT( !((p_cb->handler == NULL) && (p_xfer_desc->type == NRF_DRV_TWI_XFER_TXTX))); + + CODE_FOR_TWIM + ( + ret = twim_xfer(p_cb, (NRF_TWIM_Type *)p_instance->reg.p_twim, p_xfer_desc, flags); + ) + CODE_FOR_TWI + ( + if ( (NRF_DRV_TWI_FLAG_TX_POSTINC | NRF_DRV_TWI_FLAG_RX_POSTINC) & flags) + { + return NRF_ERROR_NOT_SUPPORTED; + } + ret = twi_xfer(p_cb, (NRF_TWI_Type *)p_instance->reg.p_twi, p_xfer_desc, flags); + ) + return ret; +} + +ret_code_t nrf_drv_twi_tx(nrf_drv_twi_t const * p_instance, + uint8_t address, + uint8_t const * p_data, + uint8_t length, + bool no_stop) +{ + nrf_drv_twi_xfer_desc_t xfer = NRF_DRV_TWI_XFER_DESC_TX(address, (uint8_t*)p_data, length); + + return nrf_drv_twi_xfer(p_instance, &xfer, no_stop ? NRF_DRV_TWI_FLAG_TX_NO_STOP : 0); +} + +ret_code_t nrf_drv_twi_rx(nrf_drv_twi_t const * p_instance, + uint8_t address, + uint8_t * p_data, + uint8_t length) +{ + nrf_drv_twi_xfer_desc_t xfer = NRF_DRV_TWI_XFER_DESC_RX(address, p_data, length); + return nrf_drv_twi_xfer(p_instance, &xfer, 0); +} + +uint32_t nrf_drv_twi_data_count_get(nrf_drv_twi_t const * const p_instance) +{ + CODE_FOR_TWIM + ( + ASSERT(false); + return 0; + ) + CODE_FOR_TWI + ( + return m_cb[p_instance->drv_inst_idx].bytes_transferred; + ) +} +uint32_t nrf_drv_twi_start_task_get(nrf_drv_twi_t const * p_instance, nrf_drv_twi_xfer_type_t xfer_type) +{ + CODE_FOR_TWIM + ( + return (uint32_t)nrf_twim_task_address_get(p_instance->reg.p_twim, + (xfer_type != NRF_DRV_TWI_XFER_RX) ? NRF_TWIM_TASK_STARTTX : NRF_TWIM_TASK_STARTRX); + ) + CODE_FOR_TWI + ( + return (uint32_t)nrf_twi_task_address_get(p_instance->reg.p_twi, + (xfer_type != NRF_DRV_TWI_XFER_RX) ? NRF_TWI_TASK_STARTTX : NRF_TWI_TASK_STARTRX); + ) +} + +uint32_t nrf_drv_twi_stopped_event_get(nrf_drv_twi_t const * p_instance) +{ + CODE_FOR_TWIM + ( + return (uint32_t)nrf_twim_event_address_get(p_instance->reg.p_twim, NRF_TWIM_EVENT_STOPPED); + ) + CODE_FOR_TWI + ( + return (uint32_t)nrf_twi_event_address_get(p_instance->reg.p_twi, NRF_TWI_EVENT_STOPPED); + ) +} + +#ifdef TWIM_IN_USE +static void irq_handler_twim(NRF_TWIM_Type * p_twim, twi_control_block_t * p_cb) +{ + ASSERT(p_cb->handler); + + if (nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_ERROR)) + { + nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_ERROR); + if (!nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_STOPPED)) + { + nrf_twim_int_disable(p_twim, p_cb->int_mask); + p_cb->int_mask = NRF_TWIM_INT_STOPPED_MASK; + nrf_twim_int_enable(p_twim, p_cb->int_mask); + + nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_RESUME); + nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_STOP); + return; + } + } + + nrf_drv_twi_evt_t event; + + if (nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_STOPPED)) + { + nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_STOPPED); + event.xfer_desc = p_cb->xfer_desc; + if (p_cb->error) + { + + event.xfer_desc.primary_length = (p_cb->xfer_desc.type == NRF_DRV_TWI_XFER_RX) ? + (uint8_t)nrf_twim_rxd_amount_get(p_twim) : (uint8_t)nrf_twim_txd_amount_get(p_twim); + event.xfer_desc.secondary_length = (p_cb->xfer_desc.type == NRF_DRV_TWI_XFER_TXRX) ? + (uint8_t)nrf_twim_rxd_amount_get(p_twim) : (uint8_t)nrf_twim_txd_amount_get(p_twim); + + } + nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_LASTTX); + nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_LASTRX); + if (!p_cb->repeated || p_cb->error) + { + nrf_twim_shorts_set(p_twim, 0); + p_cb->int_mask = 0; + nrf_twim_int_disable(p_twim, DISABLE_ALL); + } + } + else + { + nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_SUSPENDED); + if (p_cb->xfer_desc.type == NRF_DRV_TWI_XFER_TX) + { + event.xfer_desc = p_cb->xfer_desc; + if (!p_cb->repeated) + { + nrf_twim_shorts_set(p_twim, 0); + p_cb->int_mask = 0; + nrf_twim_int_disable(p_twim, DISABLE_ALL); + } + } + else + { + nrf_twim_shorts_set(p_twim, NRF_TWIM_SHORT_LASTTX_STOP_MASK); + p_cb->int_mask = NRF_TWIM_INT_STOPPED_MASK | NRF_TWIM_INT_ERROR_MASK; + nrf_twim_int_disable(p_twim, DISABLE_ALL); + nrf_twim_int_enable(p_twim, p_cb->int_mask); + nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_STARTTX); + nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_RESUME); + return; + } + } + + uint32_t errorsrc = nrf_twim_errorsrc_get_and_clear(p_twim); + if (errorsrc & NRF_TWIM_ERROR_ADDRESS_NACK) + { + event.type = NRF_DRV_TWI_EVT_ADDRESS_NACK; + } + else if (errorsrc & NRF_TWIM_ERROR_DATA_NACK) + { + event.type = NRF_DRV_TWI_EVT_DATA_NACK; + } + else + { + event.type = NRF_DRV_TWI_EVT_DONE; + } + + if (!p_cb->repeated) + { + p_cb->busy = false; + } + p_cb->handler(&event, p_cb->p_context); +} +#endif // TWIM_IN_USE + +#ifdef TWI_IN_USE +static void irq_handler_twi(NRF_TWI_Type * p_twi, twi_control_block_t * p_cb) +{ + ASSERT(p_cb->handler); + + if (twi_transfer(p_twi, &p_cb->error, &p_cb->bytes_transferred, p_cb->p_curr_buf, p_cb->curr_length, p_cb->curr_no_stop )) + { + return; + } + + if (!p_cb->error && + ((p_cb->xfer_desc.type == NRF_DRV_TWI_XFER_TXRX) || + (p_cb->xfer_desc.type == NRF_DRV_TWI_XFER_TXTX)) && + p_cb->p_curr_buf == p_cb->xfer_desc.p_primary_buf) + { + p_cb->p_curr_buf = p_cb->xfer_desc.p_secondary_buf; + p_cb->curr_length = p_cb->xfer_desc.secondary_length; + p_cb->curr_no_stop = (p_cb->flags & NRF_DRV_TWI_FLAG_TX_NO_STOP); + + if (p_cb->xfer_desc.type == NRF_DRV_TWI_XFER_TXTX) + { + (void)twi_tx_start_transfer(p_cb, p_twi, p_cb->p_curr_buf, p_cb->curr_length, p_cb->curr_no_stop); + } + else + { + (void)twi_rx_start_transfer(p_cb, p_twi, p_cb->p_curr_buf, p_cb->curr_length); + } + } + else + { + nrf_drv_twi_evt_t event; + event.xfer_desc = p_cb->xfer_desc; + + if (p_cb->error) + { + uint32_t errorsrc = nrf_twi_errorsrc_get_and_clear(p_twi); + if (errorsrc & NRF_TWI_ERROR_ADDRESS_NACK) + { + event.type = NRF_DRV_TWI_EVT_ADDRESS_NACK; + } + else if (errorsrc & NRF_TWI_ERROR_DATA_NACK) + { + event.type = NRF_DRV_TWI_EVT_DATA_NACK; + } + } + else + { + event.type = NRF_DRV_TWI_EVT_DONE; + } + + p_cb->busy = false; + + if (!(NRF_DRV_TWI_FLAG_NO_XFER_EVT_HANDLER & p_cb->flags)) + { + p_cb->handler(&event, p_cb->p_context); + } + } + +} +#endif // TWI_IN_USE + +#if TWI0_ENABLED +IRQ_HANDLER(0) +{ + #if (TWI0_USE_EASY_DMA == 1) && defined(NRF52) + irq_handler_twim(NRF_TWIM0, + #else + irq_handler_twi(NRF_TWI0, + #endif + &m_cb[TWI0_INSTANCE_INDEX]); +} +#endif // TWI0_ENABLED + +#if TWI1_ENABLED +IRQ_HANDLER(1) +{ + #if (TWI1_USE_EASY_DMA == 1) + irq_handler_twim(NRF_TWIM1, + #else + irq_handler_twi(NRF_TWI1, + #endif + &m_cb[TWI1_INSTANCE_INDEX]); +} +#endif // TWI1_ENABLED diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.h new file mode 100644 index 0000000000..ee3b70c188 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.h @@ -0,0 +1,384 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** + * + * @defgroup nrf_twi Two-wire interface (TWI) + * @ingroup nrf_drivers + * @brief Two-wire interface (TWI) APIs. + * + * @defgroup nrf_twi_master TWI master HAL and driver + * @ingroup nrf_twi + * @brief TWI master APIs. + * @details The TWI and TWIM HALs provide basic APIs for accessing the registers of the TWI and TWIM peripherals, respectively. + * + * The TWI master driver provides APIs on a higher level. + * + */ + +#ifndef NRF_DRV_TWI_H__ +#define NRF_DRV_TWI_H__ + +#include "nordic_common.h" +#include "nrf_drv_config.h" + +// This set of macros makes it possible to exclude parts of code when one type +// of supported peripherals is not used. +#if ((TWI0_ENABLED == 1 && TWI0_USE_EASY_DMA == 1) || \ + (TWI1_ENABLED == 1 && TWI1_USE_EASY_DMA == 1)) + #define TWIM_IN_USE +#endif +#if ((TWI0_ENABLED == 1 && TWI0_USE_EASY_DMA != 1) || \ + (TWI1_ENABLED == 1 && TWI1_USE_EASY_DMA != 1)) + #define TWI_IN_USE +#endif + +#include "nrf_twi.h" +#ifdef TWIM_IN_USE + #include "nrf_twim.h" +#endif +#include "sdk_errors.h" + +#if defined(NRF52) + #define NRF_DRV_TWI_PERIPHERAL(id) \ + (CONCAT_3(TWI, id, _USE_EASY_DMA) == 1 ? \ + (void *)CONCAT_2(NRF_TWIM, id) \ + : (void *)CONCAT_2(NRF_TWI, id)) +#else + #define NRF_DRV_TWI_PERIPHERAL(id) (void *)CONCAT_2(NRF_TWI, id) +#endif + +/** + * @defgroup nrf_drv_twi TWI master driver + * @{ + * @ingroup nrf_twi_master + * @brief Multi-instance TWI master driver. + */ + +/** + * @brief Structure for the TWI master driver instance. + */ +typedef struct +{ + union + { +#ifdef TWIM_IN_USE + NRF_TWIM_Type * p_twim; ///< Pointer to a structure with TWIM registers. +#endif + NRF_TWI_Type * p_twi; ///< Pointer to a structure with TWI registers. + } reg; + uint8_t drv_inst_idx; ///< Driver instance index. + bool use_easy_dma; ///< True if the peripheral with EasyDMA (TWIM) shall be used. +} nrf_drv_twi_t; + +/** + * @brief Macro for creating a TWI master driver instance. + */ +#define NRF_DRV_TWI_INSTANCE(id) \ +{ \ + .reg = {NRF_DRV_TWI_PERIPHERAL(id)}, \ + .drv_inst_idx = CONCAT_3(TWI, id, _INSTANCE_INDEX), \ + .use_easy_dma = CONCAT_3(TWI, id, _USE_EASY_DMA) \ +} + +/** + * @brief Structure for the TWI master driver instance configuration. + */ +typedef struct +{ + uint32_t scl; ///< SCL pin number. + uint32_t sda; ///< SDA pin number. + nrf_twi_frequency_t frequency; ///< TWI frequency. + uint8_t interrupt_priority; ///< Interrupt priority. +} nrf_drv_twi_config_t; + +/** + * @brief TWI master driver instance default configuration. + */ +#define NRF_DRV_TWI_DEFAULT_CONFIG(id) \ +{ \ + .frequency = CONCAT_3(TWI, id, _CONFIG_FREQUENCY), \ + .scl = CONCAT_3(TWI, id, _CONFIG_SCL), \ + .sda = CONCAT_3(TWI, id, _CONFIG_SDA), \ + .interrupt_priority = CONCAT_3(TWI, id, _CONFIG_IRQ_PRIORITY) \ +} + +#define NRF_DRV_TWI_FLAG_TX_POSTINC (1UL << 0) /**< TX buffer address incremented after transfer. */ +#define NRF_DRV_TWI_FLAG_RX_POSTINC (1UL << 1) /**< RX buffer address incremented after transfer. */ +#define NRF_DRV_TWI_FLAG_NO_XFER_EVT_HANDLER (1UL << 2) /**< Interrupt after each transfer is suppressed, and the event handler is not called. */ +#define NRF_DRV_TWI_FLAG_HOLD_XFER (1UL << 3) /**< Set up the transfer but do not start it. */ +#define NRF_DRV_TWI_FLAG_REPEATED_XFER (1UL << 4) /**< Flag indicating that the transfer will be executed multiple times. */ +#define NRF_DRV_TWI_FLAG_TX_NO_STOP (1UL << 5) /**< Flag indicating that the TX transfer will not end with a stop condition. */ + +/** + * @brief TWI master driver event types. + */ +typedef enum +{ + NRF_DRV_TWI_EVT_DONE, ///< Transfer completed event. + NRF_DRV_TWI_EVT_ADDRESS_NACK, ///< Error event: NACK received after sending the address. + NRF_DRV_TWI_EVT_DATA_NACK ///< Error event: NACK received after sending a data byte. +} nrf_drv_twi_evt_type_t; + +/** + * @brief TWI master driver transfer types. + */ +typedef enum +{ + NRF_DRV_TWI_XFER_TX, ///< TX transfer. + NRF_DRV_TWI_XFER_RX, ///< RX transfer. + NRF_DRV_TWI_XFER_TXRX, ///< TX transfer followed by RX transfer with repeated start. + NRF_DRV_TWI_XFER_TXTX ///< TX transfer followed by TX transfer with repeated start. +} nrf_drv_twi_xfer_type_t; + +/** + * @brief Structure for a TWI transfer descriptor. + */ +typedef struct +{ + nrf_drv_twi_xfer_type_t type; ///< Type of transfer. + uint8_t address; ///< Slave address. + uint8_t primary_length; ///< Number of bytes transferred. + uint8_t secondary_length; ///< Number of bytes transferred. + uint8_t * p_primary_buf; ///< Pointer to transferred data. + uint8_t * p_secondary_buf; ///< Pointer to transferred data. +} nrf_drv_twi_xfer_desc_t; + + +/**@brief Macro for setting the TX transfer descriptor. */ +#define NRF_DRV_TWI_XFER_DESC_TX(addr, p_data, length) \ + { \ + .type = NRF_DRV_TWI_XFER_TX, \ + .address = addr, \ + .primary_length = length, \ + .p_primary_buf = p_data, \ + } + +/**@brief Macro for setting the RX transfer descriptor. */ +#define NRF_DRV_TWI_XFER_DESC_RX(addr, p_data, length) \ + { \ + .type = NRF_DRV_TWI_XFER_RX, \ + .address = addr, \ + .primary_length = length, \ + .p_primary_buf = p_data, \ + } + +/**@brief Macro for setting the TXRX transfer descriptor. */ +#define NRF_DRV_TWI_XFER_DESC_TXRX(addr, p_tx, tx_len, p_rx, rx_len) \ + { \ + .type = NRF_DRV_TWI_XFER_TXRX, \ + .address = addr, \ + .primary_length = tx_len, \ + .secondary_length = rx_len, \ + .p_primary_buf = p_tx, \ + .p_secondary_buf = p_rx, \ + } + +/**@brief Macro for setting the TXTX transfer descriptor. */ +#define NRF_DRV_TWI_XFER_DESC_TXTX(addr, p_tx, tx_len, p_tx2, tx_len2) \ + { \ + .type = NRF_DRV_TWI_XFER_TXTX, \ + .address = addr, \ + .primary_length = tx_len, \ + .secondary_length = tx_len2, \ + .p_primary_buf = p_tx, \ + .p_secondary_buf = p_tx2, \ + } + +/** + * @brief Structure for a TWI event. + */ +typedef struct +{ + nrf_drv_twi_evt_type_t type; ///< Event type. + nrf_drv_twi_xfer_desc_t xfer_desc; ///< Transfer details. +} nrf_drv_twi_evt_t; + +/** + * @brief TWI event handler prototype. + */ +typedef void (* nrf_drv_twi_evt_handler_t)(nrf_drv_twi_evt_t const * p_event, + void * p_context); + +/** + * @brief Function for initializing the TWI instance. + * + * @param[in] p_instance TWI instance. + * @param[in] p_config Initial configuration. If NULL, the default configuration is used. + * @param[in] event_handler Event handler provided by the user. If NULL, blocking mode is enabled. + * @param[in] p_context Context passed to event handler. + * + * @retval NRF_SUCCESS If initialization was successful. + * @retval NRF_ERROR_INVALID_STATE If the driver is in invalid state. + * @retval NRF_ERROR_BUSY If some other peripheral with the same + * instance ID is already in use. This is + * possible only if PERIPHERAL_RESOURCE_SHARING_ENABLED + * is set to a value other than zero. + */ +ret_code_t nrf_drv_twi_init(nrf_drv_twi_t const * p_instance, + nrf_drv_twi_config_t const * p_config, + nrf_drv_twi_evt_handler_t event_handler, + void * p_context); + +/** + * @brief Function for uninitializing the TWI instance. + * + * @param[in] p_instance TWI instance. + */ +void nrf_drv_twi_uninit(nrf_drv_twi_t const * p_instance); + +/** + * @brief Function for enabling the TWI instance. + * + * @param[in] p_instance TWI instance. + */ +void nrf_drv_twi_enable(nrf_drv_twi_t const * p_instance); + +/** + * @brief Function for disabling the TWI instance. + * + * @param[in] p_instance TWI instance. + */ +void nrf_drv_twi_disable(nrf_drv_twi_t const * p_instance); + +/** + * @brief Function for sending data to a TWI slave. + * + * The transmission will be stopped when an error occurs. If a transfer is ongoing, + * the function returns the error code @ref NRF_ERROR_BUSY. + * + * @param[in] p_instance TWI instance. + * @param[in] address Address of a specific slave device (only 7 LSB). + * @param[in] p_data Pointer to a transmit buffer. + * @param[in] length Number of bytes to send. + * @param[in] no_stop If set, the stop condition is not generated on the bus + * after the transfer has completed successfully (allowing + * for a repeated start in the next transfer). + * + * @retval NRF_SUCCESS If the procedure was successful. + * @retval NRF_ERROR_BUSY If the driver is not ready for a new transfer. + * @retval NRF_ERROR_INTERNAL If an error was detected by hardware. + */ +ret_code_t nrf_drv_twi_tx(nrf_drv_twi_t const * p_instance, + uint8_t address, + uint8_t const * p_data, + uint8_t length, + bool no_stop); + +/** + * @brief Function for reading data from a TWI slave. + * + * The transmission will be stopped when an error occurs. If a transfer is ongoing, + * the function returns the error code @ref NRF_ERROR_BUSY. + * + * @param[in] p_instance TWI instance. + * @param[in] address Address of a specific slave device (only 7 LSB). + * @param[in] p_data Pointer to a receive buffer. + * @param[in] length Number of bytes to be received. + * + * @retval NRF_SUCCESS If the procedure was successful. + * @retval NRF_ERROR_BUSY If the driver is not ready for a new transfer. + * @retval NRF_ERROR_INTERNAL If an error was detected by hardware. + */ +ret_code_t nrf_drv_twi_rx(nrf_drv_twi_t const * p_instance, + uint8_t address, + uint8_t * p_data, + uint8_t length); + +/** + * @brief Function for preparing a TWI transfer. + * + * The following transfer types can be configured (@ref nrf_drv_twi_xfer_desc_t::type): + * - @ref NRF_DRV_TWI_XFER_TXRX: Write operation followed by a read operation (without STOP condition in between). + * - @ref NRF_DRV_TWI_XFER_TXTX: Write operation followed by a write operation (without STOP condition in between). + * - @ref NRF_DRV_TWI_XFER_TX: Write operation (with or without STOP condition). + * - @ref NRF_DRV_TWI_XFER_RX: Read operation (with STOP condition). + * + * Additional options are provided using the flags parameter: + * - @ref NRF_DRV_TWI_FLAG_TX_POSTINC and @ref NRF_DRV_TWI_FLAG_RX_POSTINC: Post-incrementation of buffer addresses. Supported only by TWIM. + * - @ref NRF_DRV_TWI_FLAG_NO_XFER_EVT_HANDLER: No user event handler after transfer completion. In most cases, this also means no interrupt at the end of the transfer. + * - @ref NRF_DRV_TWI_FLAG_HOLD_XFER: Driver is not starting the transfer. Use this flag if the transfer is triggered externally by PPI. Supported only by TWIM. + * Use @ref nrf_drv_twi_start_task_get to get the address of the start task. + * - @ref NRF_DRV_TWI_FLAG_REPEATED_XFER: Prepare for repeated transfers. You can set up a number of transfers that will be triggered externally (for example by PPI). + * An example is a TXRX transfer with the options @ref NRF_DRV_TWI_FLAG_RX_POSTINC, @ref NRF_DRV_TWI_FLAG_NO_XFER_EVT_HANDLER, and @ref NRF_DRV_TWI_FLAG_REPEATED_XFER. + * After the transfer is set up, a set of transfers can be triggered by PPI that will read, for example, the same register of an + * external component and put it into a RAM buffer without any interrupts. @ref nrf_drv_twi_stopped_event_get can be used to get the + * address of the STOPPED event, which can be used to count the number of transfers. If @ref NRF_DRV_TWI_FLAG_REPEATED_XFER is used, + * the driver does not set the instance into busy state, so you must ensure that the next transfers are set up + * when TWIM is not active. Supported only by TWIM. + * - @ref NRF_DRV_TWI_FLAG_TX_NO_STOP: No stop condition after TX transfer. + * + * @note + * Some flag combinations are invalid: + * - @ref NRF_DRV_TWI_FLAG_TX_NO_STOP with @ref nrf_drv_twi_xfer_desc_t::type different than @ref NRF_DRV_TWI_XFER_TX + * - @ref NRF_DRV_TWI_FLAG_REPEATED_XFER with @ref nrf_drv_twi_xfer_desc_t::type set to @ref NRF_DRV_TWI_XFER_TXTX + * + * If @ref nrf_drv_twi_xfer_desc_t::type is set to @ref NRF_DRV_TWI_XFER_TX and the @ref NRF_DRV_TWI_FLAG_TX_NO_STOP and @ref NRF_DRV_TWI_FLAG_REPEATED_XFER + * flags are set, two tasks must be used to trigger a transfer: TASKS_RESUME followed by TASKS_STARTTX. If no stop condition is generated, + * TWIM is in SUSPENDED state. Therefore, it must be resumed before the transfer can be started. + * + * @note + * This function should be used only if the instance is configured to work in non-blocking mode. If the function is used in blocking mode, the driver asserts. + * @note If you are using this function with TWI, the only supported flag is @ref NRF_DRV_TWI_FLAG_TX_NO_STOP. All other flags require TWIM. + * + * @param[in] p_instance TWI instance. + * @param[in] p_xfer_desc Pointer to the transfer descriptor. + * @param[in] flags Transfer options (0 for default settings). + * + * @retval NRF_SUCCESS If the procedure was successful. + * @retval NRF_ERROR_BUSY If the driver is not ready for a new transfer. + * @retval NRF_ERROR_NOT_SUPPORTED If the provided parameters are not supported. + */ +ret_code_t nrf_drv_twi_xfer(nrf_drv_twi_t const * p_instance, + nrf_drv_twi_xfer_desc_t const * p_xfer_desc, + uint32_t flags); + +/** + * @brief Function for getting the transferred data count. + * + * This function provides valid results only in legacy mode. + * + * @param[in] p_instance TWI instance. + * + * @return Data count. + */ +uint32_t nrf_drv_twi_data_count_get(nrf_drv_twi_t const * const p_instance); + +/** + * @brief Function for returning the address of a TWI/TWIM start task. + * + * This function should be used if @ref nrf_drv_twi_xfer was called with the flag @ref NRF_DRV_TWI_FLAG_HOLD_XFER. + * In that case, the transfer is not started by the driver, but it must be started externally by PPI. + * + * @param[in] p_instance TWI instance. + * @param[in] xfer_type Transfer type used in the last call of the @ref nrf_drv_twi_xfer function. + * + * @return Start task address (TX or RX) depending on the value of xfer_type. + */ +uint32_t nrf_drv_twi_start_task_get(nrf_drv_twi_t const * p_instance, nrf_drv_twi_xfer_type_t xfer_type); + +/** + * @brief Function for returning the address of a STOPPED TWI/TWIM event. + * + * A STOPPED event can be used to detect the end of a transfer if the @ref NRF_DRV_TWI_FLAG_NO_XFER_EVT_HANDLER + * option is used. + * + * @param[in] p_instance TWI instance. + * + * @return STOPPED event address. + */ +uint32_t nrf_drv_twi_stopped_event_get(nrf_drv_twi_t const * p_instance); +/** + *@} + **/ + +#endif // NRF_DRV_TWI_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/uart/nrf_drv_uart.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/uart/nrf_drv_uart.c new file mode 100644 index 0000000000..a62cff1dd6 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/uart/nrf_drv_uart.c @@ -0,0 +1,851 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "nrf_drv_uart.h" +#include "nrf_assert.h" +#include "nordic_common.h" +#include "nrf_drv_common.h" +#include "nrf_gpio.h" +#include "app_util_platform.h" + +// This set of macros makes it possible to exclude parts of code, when one type +// of supported peripherals is not used. +#ifdef NRF51 +#define UART_IN_USE +#elif defined(NRF52) +#if (UART_EASY_DMA_SUPPORT == 1) +#define UARTE_IN_USE +#endif +#if (UART_LEGACY_SUPPORT == 1) +#define UART_IN_USE +#endif +#endif + + +#if (defined(UARTE_IN_USE) && defined(UART_IN_USE)) + // UARTE and UART combined + #define CODE_FOR_UARTE(code) if (m_cb.use_easy_dma) { code } + #define CODE_FOR_UART(code) else { code } +#elif (defined(UARTE_IN_USE) && !defined(UART_IN_USE)) + // UARTE only + #define CODE_FOR_UARTE(code) { code } + #define CODE_FOR_UART(code) +#elif (!defined(UARTE_IN_USE) && defined(UART_IN_USE)) + // UART only + #define CODE_FOR_UARTE(code) + #define CODE_FOR_UART(code) { code } +#else + #error "Wrong configuration." +#endif + +#ifndef IS_EASY_DMA_RAM_ADDRESS + #define IS_EASY_DMA_RAM_ADDRESS(addr) (((uint32_t)addr & 0xFFFF0000) == 0x20000000) +#endif + +#define TX_COUNTER_ABORT_REQ_VALUE 256 + +typedef struct +{ + void * p_context; + nrf_uart_event_handler_t handler; + uint8_t const * p_tx_buffer; + uint8_t * p_rx_buffer; + uint8_t * p_rx_secondary_buffer; + volatile uint16_t tx_counter; + uint8_t tx_buffer_length; + uint8_t rx_buffer_length; + uint8_t rx_secondary_buffer_length; + volatile uint8_t rx_counter; + bool rx_enabled; + nrf_drv_state_t state; +#if (defined(UARTE_IN_USE) && defined(UART_IN_USE)) + bool use_easy_dma; +#endif +} uart_control_block_t; + +static uart_control_block_t m_cb; +static const nrf_drv_uart_config_t m_default_config = NRF_DRV_UART_DEFAULT_CONFIG; + +__STATIC_INLINE void apply_config(nrf_drv_uart_config_t const * p_config) +{ + nrf_gpio_pin_set(p_config->pseltxd); + nrf_gpio_cfg_output(p_config->pseltxd); + nrf_gpio_cfg_input(p_config->pselrxd, NRF_GPIO_PIN_NOPULL); + + CODE_FOR_UARTE + ( + nrf_uarte_baudrate_set(NRF_UARTE0, (nrf_uarte_baudrate_t)p_config->baudrate); + nrf_uarte_configure(NRF_UARTE0, (nrf_uarte_parity_t)p_config->parity, + (nrf_uarte_hwfc_t)p_config->hwfc); + nrf_uarte_txrx_pins_set(NRF_UARTE0, p_config->pseltxd, p_config->pselrxd); + if (p_config->hwfc == NRF_UART_HWFC_ENABLED) + { + nrf_gpio_cfg_input(p_config->pselcts, NRF_GPIO_PIN_NOPULL); + nrf_gpio_pin_set(p_config->pselrts); + nrf_gpio_cfg_output(p_config->pselrts); + nrf_uarte_hwfc_pins_set(NRF_UARTE0, p_config->pselrts, p_config->pselcts); + } + ) + CODE_FOR_UART + ( + nrf_uart_baudrate_set(NRF_UART0, p_config->baudrate); + nrf_uart_configure(NRF_UART0, p_config->parity, p_config->hwfc); + nrf_uart_txrx_pins_set(NRF_UART0, p_config->pseltxd, p_config->pselrxd); + if (p_config->hwfc == NRF_UART_HWFC_ENABLED) + { + nrf_gpio_cfg_input(p_config->pselcts, NRF_GPIO_PIN_NOPULL); + nrf_gpio_pin_set(p_config->pselrts); + nrf_gpio_cfg_output(p_config->pselrts); + nrf_uart_hwfc_pins_set(NRF_UART0, p_config->pselrts, p_config->pselcts); + } + ) +} + +__STATIC_INLINE void interrupts_enable(uint8_t interrupt_priority) +{ + CODE_FOR_UARTE + ( + nrf_uarte_event_clear(NRF_UARTE0, NRF_UARTE_EVENT_ENDRX); + nrf_uarte_event_clear(NRF_UARTE0, NRF_UARTE_EVENT_ENDTX); + nrf_uarte_event_clear(NRF_UARTE0, NRF_UARTE_EVENT_ERROR); + nrf_uarte_event_clear(NRF_UARTE0, NRF_UARTE_EVENT_RXTO); + nrf_uarte_int_enable(NRF_UARTE0, NRF_UARTE_INT_ENDRX_MASK | + NRF_UARTE_INT_ENDTX_MASK | + NRF_UARTE_INT_ERROR_MASK | + NRF_UARTE_INT_RXTO_MASK); + ) + CODE_FOR_UART + ( + nrf_uart_event_clear(NRF_UART0, NRF_UART_EVENT_TXDRDY); + nrf_uart_event_clear(NRF_UART0, NRF_UART_EVENT_RXTO); + nrf_uart_int_enable(NRF_UART0, NRF_UART_INT_MASK_TXDRDY | + NRF_UART_INT_MASK_RXTO); + ) + nrf_drv_common_irq_enable(UART0_IRQn, interrupt_priority); +} + +__STATIC_INLINE void interrupts_disable(void) +{ + CODE_FOR_UARTE + ( + nrf_uarte_int_disable(NRF_UARTE0, NRF_UARTE_INT_ENDRX_MASK | + NRF_UARTE_INT_ENDTX_MASK | + NRF_UARTE_INT_ERROR_MASK | + NRF_UARTE_INT_RXTO_MASK); + ) + CODE_FOR_UART + ( + nrf_uart_int_disable(NRF_UART0, NRF_UART_INT_MASK_RXDRDY | + NRF_UART_INT_MASK_TXDRDY | + NRF_UART_INT_MASK_ERROR | + NRF_UART_INT_MASK_RXTO); + ) + nrf_drv_common_irq_disable(UART0_IRQn); +} + +__STATIC_INLINE void pins_to_default(void) +{ + /* Reset pins to default states */ + uint32_t txd; + uint32_t rxd; + uint32_t rts; + uint32_t cts; + + CODE_FOR_UARTE + ( + txd = nrf_uarte_tx_pin_get(NRF_UARTE0); + rxd = nrf_uarte_rx_pin_get(NRF_UARTE0); + rts = nrf_uarte_rts_pin_get(NRF_UARTE0); + cts = nrf_uarte_cts_pin_get(NRF_UARTE0); + nrf_uarte_txrx_pins_disconnect(NRF_UARTE0); + nrf_uarte_hwfc_pins_disconnect(NRF_UARTE0); + ) + CODE_FOR_UART + ( + txd = nrf_uart_tx_pin_get(NRF_UART0); + rxd = nrf_uart_rx_pin_get(NRF_UART0); + rts = nrf_uart_rts_pin_get(NRF_UART0); + cts = nrf_uart_cts_pin_get(NRF_UART0); + nrf_uart_txrx_pins_disconnect(NRF_UART0); + nrf_uart_hwfc_pins_disconnect(NRF_UART0); + ) + + nrf_gpio_cfg_default(txd); + nrf_gpio_cfg_default(rxd); + + if (cts != NRF_UART_PSEL_DISCONNECTED) + { + nrf_gpio_cfg_default(cts); + } + + if (rts != NRF_UART_PSEL_DISCONNECTED) + { + nrf_gpio_cfg_default(rts); + } + +} + +__STATIC_INLINE void uart_enable(void) +{ + CODE_FOR_UARTE(nrf_uarte_enable(NRF_UARTE0);) + CODE_FOR_UART(nrf_uart_enable(NRF_UART0);); +} + +__STATIC_INLINE void uart_disable(void) +{ + CODE_FOR_UARTE(nrf_uarte_disable(NRF_UARTE0);) + CODE_FOR_UART(nrf_uart_disable(NRF_UART0);); +} + +ret_code_t nrf_drv_uart_init(nrf_drv_uart_config_t const * p_config, + nrf_uart_event_handler_t event_handler) +{ + if (m_cb.state != NRF_DRV_STATE_UNINITIALIZED) + { + return NRF_ERROR_INVALID_STATE; + } + + if (p_config == NULL) + { + p_config = &m_default_config; + } +#if (defined(UARTE_IN_USE) && defined(UART_IN_USE)) + m_cb.use_easy_dma = p_config->use_easy_dma; +#endif + apply_config(p_config); + + m_cb.handler = event_handler; + m_cb.p_context = p_config->p_context; + + if (m_cb.handler) + { + interrupts_enable(p_config->interrupt_priority); + } + + uart_enable(); + m_cb.rx_buffer_length = 0; + m_cb.rx_secondary_buffer_length = 0; + m_cb.tx_buffer_length = 0; + m_cb.state = NRF_DRV_STATE_INITIALIZED; + m_cb.rx_enabled = false; + return NRF_SUCCESS; +} + +void nrf_drv_uart_uninit(void) +{ + uart_disable(); + + if (m_cb.handler) + { + interrupts_disable(); + } + + pins_to_default(); + + m_cb.state = NRF_DRV_STATE_UNINITIALIZED; + m_cb.handler = NULL; +} + +#if defined(UART_IN_USE) +__STATIC_INLINE void tx_byte(void) +{ + nrf_uart_event_clear(NRF_UART0, NRF_UART_EVENT_TXDRDY); + uint8_t txd = m_cb.p_tx_buffer[m_cb.tx_counter]; + m_cb.tx_counter++; + nrf_uart_txd_set(NRF_UART0, txd); +} + +__STATIC_INLINE ret_code_t nrf_drv_uart_tx_for_uart() +{ + ret_code_t err_code = NRF_SUCCESS; + + nrf_uart_event_clear(NRF_UART0, NRF_UART_EVENT_TXDRDY); + nrf_uart_task_trigger(NRF_UART0, NRF_UART_TASK_STARTTX); + + tx_byte(); + + if (m_cb.handler == NULL) + { + while (m_cb.tx_counter < (uint16_t) m_cb.tx_buffer_length) + { + while (!nrf_uart_event_check(NRF_UART0, NRF_UART_EVENT_TXDRDY) && + m_cb.tx_counter != TX_COUNTER_ABORT_REQ_VALUE) + { + } + if (m_cb.tx_counter != TX_COUNTER_ABORT_REQ_VALUE) + { + tx_byte(); + } + } + + if (m_cb.tx_counter == TX_COUNTER_ABORT_REQ_VALUE) + { + err_code = NRF_ERROR_FORBIDDEN; + } + else + { + while (!nrf_uart_event_check(NRF_UART0, NRF_UART_EVENT_TXDRDY)) + { + } + nrf_uart_task_trigger(NRF_UART0, NRF_UART_TASK_STOPTX); + } + m_cb.tx_buffer_length = 0; + } + + return err_code; +} +#endif + +#if defined(UARTE_IN_USE) +__STATIC_INLINE ret_code_t nrf_drv_uart_tx_for_uarte() +{ + ret_code_t err_code = NRF_SUCCESS; + + nrf_uarte_event_clear(NRF_UARTE0, NRF_UARTE_EVENT_ENDTX); + nrf_uarte_event_clear(NRF_UARTE0, NRF_UARTE_EVENT_TXSTOPPED); + nrf_uarte_tx_buffer_set(NRF_UARTE0, m_cb.p_tx_buffer, m_cb.tx_buffer_length); + nrf_uarte_task_trigger(NRF_UARTE0, NRF_UARTE_TASK_STARTTX); + + if (m_cb.handler == NULL) + { + bool endtx; + bool txstopped; + do + { + endtx = nrf_uarte_event_check(NRF_UARTE0, NRF_UARTE_EVENT_ENDTX); + txstopped = nrf_uarte_event_check(NRF_UARTE0, NRF_UARTE_EVENT_TXSTOPPED); + } + while ((!endtx) && (!txstopped)); + + if (txstopped) + { + err_code = NRF_ERROR_FORBIDDEN; + } + m_cb.tx_buffer_length = 0; + } + + return err_code; +} +#endif + +ret_code_t nrf_drv_uart_tx(uint8_t const * const p_data, uint8_t length) +{ + ASSERT(m_cb.state == NRF_DRV_STATE_INITIALIZED); + ASSERT(length>0); + ASSERT(p_data); + + CODE_FOR_UARTE + ( + // EasyDMA requires that transfer buffers are placed in DataRAM, + // signal error if the are not. + if (!IS_EASY_DMA_RAM_ADDRESS(p_data)) + { + return NRF_ERROR_INVALID_ADDR; + } + ) + + if (nrf_drv_uart_tx_in_progress()) + { + return NRF_ERROR_BUSY; + } + m_cb.tx_buffer_length = length; + m_cb.p_tx_buffer = p_data; + m_cb.tx_counter = 0; + + CODE_FOR_UARTE + ( + return nrf_drv_uart_tx_for_uarte(); + ) + CODE_FOR_UART + ( + return nrf_drv_uart_tx_for_uart(); + ) +} + +bool nrf_drv_uart_tx_in_progress(void) +{ + return (m_cb.tx_buffer_length != 0); +} + +#if defined(UART_IN_USE) +__STATIC_INLINE void rx_enable(void) +{ + nrf_uart_event_clear(NRF_UART0, NRF_UART_EVENT_ERROR); + nrf_uart_event_clear(NRF_UART0, NRF_UART_EVENT_RXDRDY); + nrf_uart_task_trigger(NRF_UART0, NRF_UART_TASK_STARTRX); +} + +__STATIC_INLINE void rx_byte(void) +{ + if (!m_cb.rx_buffer_length) + { + nrf_uart_event_clear(NRF_UART0, NRF_UART_EVENT_RXDRDY); + // Byte received when buffer is not set - data lost. + (void) nrf_uart_rxd_get(NRF_UART0); + return; + } + nrf_uart_event_clear(NRF_UART0, NRF_UART_EVENT_RXDRDY); + m_cb.p_rx_buffer[m_cb.rx_counter] = nrf_uart_rxd_get(NRF_UART0); + m_cb.rx_counter++; +} + +__STATIC_INLINE ret_code_t nrf_drv_uart_rx_for_uart(uint8_t * p_data, uint8_t length, bool second_buffer) +{ + if ((!m_cb.rx_enabled) && (!second_buffer)) + { + rx_enable(); + } + if (m_cb.handler == NULL) + { + nrf_uart_event_clear(NRF_UART0, NRF_UART_EVENT_RXTO); + + bool rxrdy; + bool rxto; + bool error; + do + { + do + { + error = nrf_uart_event_check(NRF_UART0, NRF_UART_EVENT_ERROR); + rxrdy = nrf_uart_event_check(NRF_UART0, NRF_UART_EVENT_RXDRDY); + rxto = nrf_uart_event_check(NRF_UART0, NRF_UART_EVENT_RXTO); + } while ((!rxrdy) && (!rxto) && (!error)); + + if (error || rxto) + { + break; + } + rx_byte(); + } while (m_cb.rx_buffer_length > m_cb.rx_counter); + + m_cb.rx_buffer_length = 0; + if (error) + { + return NRF_ERROR_INTERNAL; + } + + if (rxto) + { + return NRF_ERROR_FORBIDDEN; + } + + if (m_cb.rx_enabled) + { + nrf_uart_task_trigger(NRF_UART0, NRF_UART_TASK_STARTRX); + } + else + { + // Skip stopping RX if driver is forced to be enabled. + nrf_uart_task_trigger(NRF_UART0, NRF_UART_TASK_STOPRX); + } + } + else + { + nrf_uart_int_enable(NRF_UART0, NRF_UART_INT_MASK_RXDRDY | NRF_UART_INT_MASK_ERROR); + } + return NRF_SUCCESS; +} +#endif + +#if defined(UARTE_IN_USE) +__STATIC_INLINE ret_code_t nrf_drv_uart_rx_for_uarte(uint8_t * p_data, uint8_t length, bool second_buffer) +{ + nrf_uarte_event_clear(NRF_UARTE0, NRF_UARTE_EVENT_ENDRX); + nrf_uarte_event_clear(NRF_UARTE0, NRF_UARTE_EVENT_RXTO); + nrf_uarte_rx_buffer_set(NRF_UARTE0, p_data, length); + if (!second_buffer) + { + nrf_uarte_task_trigger(NRF_UARTE0, NRF_UARTE_TASK_STARTRX); + } + else + { + nrf_uarte_shorts_enable(NRF_UARTE0, NRF_UARTE_SHORT_ENDRX_STARTRX); + } + + if (m_cb.handler == NULL) + { + bool endrx; + bool rxto; + bool error; + do { + endrx = nrf_uarte_event_check(NRF_UARTE0, NRF_UARTE_EVENT_ENDRX); + rxto = nrf_uarte_event_check(NRF_UARTE0, NRF_UARTE_EVENT_RXTO); + error = nrf_uarte_event_check(NRF_UARTE0, NRF_UARTE_EVENT_ERROR); + }while ((!endrx) && (!rxto) && (!error)); + + m_cb.rx_buffer_length = 0; + + if (error) + { + return NRF_ERROR_INTERNAL; + } + + if (rxto) + { + return NRF_ERROR_FORBIDDEN; + } + } + else + { + nrf_uarte_int_enable(NRF_UARTE0, NRF_UARTE_INT_ERROR_MASK | NRF_UARTE_INT_ENDRX_MASK); + } + return NRF_SUCCESS; +} +#endif + +ret_code_t nrf_drv_uart_rx(uint8_t * p_data, uint8_t length) +{ + ASSERT(m_cb.state == NRF_DRV_STATE_INITIALIZED); + ASSERT(length>0); + + CODE_FOR_UARTE + ( + // EasyDMA requires that transfer buffers are placed in DataRAM, + // signal error if the are not. + if (!IS_EASY_DMA_RAM_ADDRESS(p_data)) + { + return NRF_ERROR_INVALID_ADDR; + } + ) + + bool second_buffer = false; + + if (m_cb.handler) + { + CODE_FOR_UARTE + ( + nrf_uarte_int_disable(NRF_UARTE0, NRF_UARTE_INT_ERROR_MASK | NRF_UARTE_INT_ENDRX_MASK); + ) + CODE_FOR_UART + ( + nrf_uart_int_disable(NRF_UART0, NRF_UART_INT_MASK_RXDRDY | NRF_UART_INT_MASK_ERROR); + ) + } + if (m_cb.rx_buffer_length != 0) + { + if (m_cb.rx_secondary_buffer_length != 0) + { + if (m_cb.handler) + { + CODE_FOR_UARTE + ( + nrf_uarte_int_enable(NRF_UARTE0, NRF_UARTE_INT_ERROR_MASK | NRF_UARTE_INT_ENDRX_MASK); + ) + CODE_FOR_UART + ( + nrf_uart_int_enable(NRF_UART0, NRF_UART_INT_MASK_RXDRDY | NRF_UART_INT_MASK_ERROR); + ) + } + return NRF_ERROR_BUSY; + } + second_buffer = true; + } + + if (!second_buffer) + { + m_cb.rx_buffer_length = length; + m_cb.p_rx_buffer = p_data; + m_cb.rx_counter = 0; + m_cb.rx_secondary_buffer_length = 0; + } + else + { + m_cb.p_rx_secondary_buffer = p_data; + m_cb.rx_secondary_buffer_length = length; + } + + CODE_FOR_UARTE + ( + return nrf_drv_uart_rx_for_uarte(p_data, length, second_buffer); + ) + CODE_FOR_UART + ( + return nrf_drv_uart_rx_for_uart(p_data, length, second_buffer); + ) +} + +void nrf_drv_uart_rx_enable(void) +{ + //Easy dma mode does not support enabling receiver without setting up buffer. + CODE_FOR_UARTE + ( + ASSERT(false); + ) + CODE_FOR_UART + ( + if (!m_cb.rx_enabled) + { + rx_enable(); + m_cb.rx_enabled = true; + } + ) +} + +void nrf_drv_uart_rx_disable(void) +{ + //Easy dma mode does not support enabling receiver without setting up buffer. + CODE_FOR_UARTE + ( + ASSERT(false); + ) + CODE_FOR_UART + ( + nrf_uart_task_trigger(NRF_UART0, NRF_UART_TASK_STOPRX); + m_cb.rx_enabled = false; + ) +} + +uint32_t nrf_drv_uart_errorsrc_get(void) +{ + uint32_t errsrc; + CODE_FOR_UARTE + ( + nrf_uarte_event_clear(NRF_UARTE0, NRF_UARTE_EVENT_ERROR); + errsrc = nrf_uarte_errorsrc_get_and_clear(NRF_UARTE0); + ) + CODE_FOR_UART + ( + nrf_uart_event_clear(NRF_UART0, NRF_UART_EVENT_ERROR); + errsrc = nrf_uart_errorsrc_get_and_clear(NRF_UART0); + ) + return errsrc; +} + +__STATIC_INLINE void rx_done_event(uint8_t bytes, uint8_t * p_data) +{ + nrf_drv_uart_event_t event; + + event.type = NRF_DRV_UART_EVT_RX_DONE; + event.data.rxtx.bytes = bytes; + event.data.rxtx.p_data = p_data; + + m_cb.handler(&event,m_cb.p_context); +} + +__STATIC_INLINE void tx_done_event(uint8_t bytes) +{ + nrf_drv_uart_event_t event; + + event.type = NRF_DRV_UART_EVT_TX_DONE; + event.data.rxtx.bytes = bytes; + event.data.rxtx.p_data = (uint8_t *)m_cb.p_tx_buffer; + + m_cb.tx_buffer_length = 0; + + m_cb.handler(&event,m_cb.p_context); +} + +void nrf_drv_uart_tx_abort(void) +{ + CODE_FOR_UARTE + ( + nrf_uarte_event_clear(NRF_UARTE0, NRF_UARTE_EVENT_TXSTOPPED); + nrf_uarte_task_trigger(NRF_UARTE0, NRF_UARTE_TASK_STOPTX); + if (m_cb.handler == NULL) + { + while(!nrf_uarte_event_check(NRF_UARTE0, NRF_UARTE_EVENT_TXSTOPPED)); + } + ) + CODE_FOR_UART + ( + nrf_uart_task_trigger(NRF_UART0, NRF_UART_TASK_STOPTX); + if (m_cb.handler) + { + tx_done_event(m_cb.tx_counter); + } + else + { + m_cb.tx_counter = TX_COUNTER_ABORT_REQ_VALUE; + } + ) +} + +void nrf_drv_uart_rx_abort(void) +{ + CODE_FOR_UARTE + ( + nrf_uarte_task_trigger(NRF_UARTE0, NRF_UARTE_TASK_STOPRX); + ) + CODE_FOR_UART + ( + nrf_uart_int_disable(NRF_UART0, NRF_UART_INT_MASK_RXDRDY | NRF_UART_INT_MASK_ERROR); + nrf_uart_task_trigger(NRF_UART0, NRF_UART_TASK_STOPRX); + ) +} + + +#if defined(UART_IN_USE) +__STATIC_INLINE void uart_irq_handler() +{ + if (nrf_uart_int_enable_check(NRF_UART0, NRF_UART_INT_MASK_ERROR) && + nrf_uart_event_check(NRF_UART0, NRF_UART_EVENT_ERROR)) + { + nrf_drv_uart_event_t event; + nrf_uart_event_clear(NRF_UART0, NRF_UART_EVENT_ERROR); + nrf_uart_int_disable(NRF_UART0, NRF_UART_INT_MASK_RXDRDY | NRF_UART_INT_MASK_ERROR); + if (!m_cb.rx_enabled) + { + nrf_uart_task_trigger(NRF_UART0, NRF_UART_TASK_STOPRX); + } + event.type = NRF_DRV_UART_EVT_ERROR; + event.data.error.error_mask = nrf_uart_errorsrc_get_and_clear(NRF_UART0); + event.data.error.rxtx.bytes = m_cb.rx_buffer_length; + event.data.error.rxtx.p_data = m_cb.p_rx_buffer; + + //abort transfer + m_cb.rx_buffer_length = 0; + m_cb.rx_secondary_buffer_length = 0; + + m_cb.handler(&event,m_cb.p_context); + } + else if (nrf_uart_int_enable_check(NRF_UART0, NRF_UART_INT_MASK_RXDRDY) && + nrf_uart_event_check(NRF_UART0, NRF_UART_EVENT_RXDRDY)) + { + rx_byte(); + if (m_cb.rx_buffer_length == m_cb.rx_counter) + { + if (m_cb.rx_secondary_buffer_length) + { + uint8_t * p_data = m_cb.p_rx_buffer; + uint8_t rx_counter = m_cb.rx_counter; + + //Switch to secondary buffer. + m_cb.rx_buffer_length = m_cb.rx_secondary_buffer_length; + m_cb.p_rx_buffer = m_cb.p_rx_secondary_buffer; + m_cb.rx_secondary_buffer_length = 0; + m_cb.rx_counter = 0; + rx_done_event(rx_counter, p_data); + } + else + { + if (!m_cb.rx_enabled) + { + nrf_uart_task_trigger(NRF_UART0, NRF_UART_TASK_STOPRX); + } + nrf_uart_int_disable(NRF_UART0, NRF_UART_INT_MASK_RXDRDY | NRF_UART_INT_MASK_ERROR); + m_cb.rx_buffer_length = 0; + rx_done_event(m_cb.rx_counter, m_cb.p_rx_buffer); + } + } + } + + if (nrf_uart_event_check(NRF_UART0, NRF_UART_EVENT_TXDRDY)) + { + if (m_cb.tx_counter < (uint16_t) m_cb.tx_buffer_length) + { + tx_byte(); + } + else + { + nrf_uart_event_clear(NRF_UART0, NRF_UART_EVENT_TXDRDY); + if (m_cb.tx_buffer_length) + { + tx_done_event(m_cb.tx_buffer_length); + } + } + } + + if (nrf_uart_event_check(NRF_UART0, NRF_UART_EVENT_RXTO)) + { + nrf_uart_event_clear(NRF_UART0, NRF_UART_EVENT_RXTO); + + // RXTO event may be triggered as a result of abort call. In th + if (m_cb.rx_enabled) + { + nrf_uart_task_trigger(NRF_UART0, NRF_UART_TASK_STARTRX); + } + if (m_cb.rx_buffer_length) + { + m_cb.rx_buffer_length = 0; + rx_done_event(m_cb.rx_counter, m_cb.p_rx_buffer); + } + } +} +#endif + +#if defined(UARTE_IN_USE) +__STATIC_INLINE void uarte_irq_handler() +{ + if (nrf_uarte_event_check(NRF_UARTE0, NRF_UARTE_EVENT_ERROR)) + { + nrf_drv_uart_event_t event; + + nrf_uarte_event_clear(NRF_UARTE0, NRF_UARTE_EVENT_ERROR); + + event.type = NRF_DRV_UART_EVT_ERROR; + event.data.error.error_mask = nrf_uarte_errorsrc_get_and_clear(NRF_UARTE0); + event.data.error.rxtx.bytes = nrf_uarte_rx_amount_get(NRF_UARTE0); + event.data.error.rxtx.p_data = m_cb.p_rx_buffer; + + //abort transfer + m_cb.rx_buffer_length = 0; + m_cb.rx_secondary_buffer_length = 0; + + m_cb.handler(&event,m_cb.p_context); + } + else if (nrf_uarte_event_check(NRF_UARTE0, NRF_UARTE_EVENT_ENDRX)) + { + nrf_uarte_event_clear(NRF_UARTE0, NRF_UARTE_EVENT_ENDRX); + uint8_t amount = nrf_uarte_rx_amount_get(NRF_UARTE0); + // If the transfer was stopped before completion, amount of transfered bytes + // will not be equal to the buffer length. Interrupted trunsfer is ignored. + if (amount == m_cb.rx_buffer_length) + { + if (m_cb.rx_secondary_buffer_length) + { + uint8_t * p_data = m_cb.p_rx_buffer; + nrf_uarte_shorts_disable(NRF_UARTE0, NRF_UARTE_SHORT_ENDRX_STARTRX); + m_cb.rx_buffer_length = m_cb.rx_secondary_buffer_length; + m_cb.p_rx_buffer = m_cb.p_rx_secondary_buffer; + m_cb.rx_secondary_buffer_length = 0; + rx_done_event(amount, p_data); + } + else + { + m_cb.rx_buffer_length = 0; + rx_done_event(amount, m_cb.p_rx_buffer); + } + } + } + + if (nrf_uarte_event_check(NRF_UARTE0, NRF_UARTE_EVENT_RXTO)) + { + nrf_uarte_event_clear(NRF_UARTE0, NRF_UARTE_EVENT_RXTO); + if (m_cb.rx_buffer_length) + { + m_cb.rx_buffer_length = 0; + rx_done_event(nrf_uarte_rx_amount_get(NRF_UARTE0), m_cb.p_rx_buffer); + } + } + + if (nrf_uarte_event_check(NRF_UARTE0, NRF_UARTE_EVENT_ENDTX)) + { + nrf_uarte_event_clear(NRF_UARTE0, NRF_UARTE_EVENT_ENDTX); + if (m_cb.tx_buffer_length) + { + tx_done_event(nrf_uarte_tx_amount_get(NRF_UARTE0)); + } + } +} +#endif + +void UART0_IRQHandler(void) +{ + CODE_FOR_UARTE + ( + uarte_irq_handler(); + ) + CODE_FOR_UART + ( + uart_irq_handler(); + ) +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/uart/nrf_drv_uart.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/uart/nrf_drv_uart.h new file mode 100644 index 0000000000..53c9498259 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/uart/nrf_drv_uart.h @@ -0,0 +1,293 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/**@file + * @addtogroup nrf_uart UART driver and HAL + * @ingroup nrf_drivers + * @brief UART API. + * @details The UART driver provides APIs for utilizing the UART peripheral. + * + * @defgroup nrf_drv_uart UART driver + * @{ + * @ingroup nrf_uart + * + * @brief UART driver. + */ + +#ifndef NRF_DRV_UART_H +#define NRF_DRV_UART_H + +#include "nrf_uart.h" +#ifdef NRF52 +#include "nrf_uarte.h" +#endif + +#include "sdk_errors.h" +#include "nrf_drv_config.h" + +/** + * @brief Types of UART driver events. + */ +typedef enum +{ + NRF_DRV_UART_EVT_TX_DONE, ///< Requested TX transfer completed. + NRF_DRV_UART_EVT_RX_DONE, ///< Requested RX transfer completed. + NRF_DRV_UART_EVT_ERROR, ///< Error reported by UART peripheral. +} nrf_drv_uart_evt_type_t; + +/**@brief Structure for UART configuration. */ +typedef struct +{ + uint32_t pseltxd; ///< TXD pin number. + uint32_t pselrxd; ///< RXD pin number. + uint32_t pselcts; ///< CTS pin number. + uint32_t pselrts; ///< RTS pin number. + void * p_context; ///< Context passed to interrupt handler. + nrf_uart_hwfc_t hwfc; ///< Flow control configuration. + nrf_uart_parity_t parity; ///< Parity configuration. + nrf_uart_baudrate_t baudrate; ///< Baudrate. + uint8_t interrupt_priority; ///< Interrupt priority. +#ifdef NRF52 + bool use_easy_dma; +#endif +} nrf_drv_uart_config_t; + +/**@brief UART default configuration. */ +#ifdef NRF52 +#if !UART_LEGACY_SUPPORT +#define DEFAULT_CONFIG_USE_EASY_DMA true +#elif !UART_EASY_DMA_SUPPORT +#define DEFAULT_CONFIG_USE_EASY_DMA false +#else +#define DEFAULT_CONFIG_USE_EASY_DMA UART0_CONFIG_USE_EASY_DMA +#endif +#define NRF_DRV_UART_DEFAULT_CONFIG \ + { \ + .pseltxd = UART0_CONFIG_PSEL_TXD, \ + .pselrxd = UART0_CONFIG_PSEL_RXD, \ + .pselcts = UART0_CONFIG_PSEL_CTS, \ + .pselrts = UART0_CONFIG_PSEL_RTS, \ + .p_context = NULL, \ + .hwfc = UART0_CONFIG_HWFC, \ + .parity = UART0_CONFIG_PARITY, \ + .baudrate = UART0_CONFIG_BAUDRATE, \ + .interrupt_priority = UART0_CONFIG_IRQ_PRIORITY, \ + .use_easy_dma = DEFAULT_CONFIG_USE_EASY_DMA \ + } +#else +#define NRF_DRV_UART_DEFAULT_CONFIG \ + { \ + .pseltxd = UART0_CONFIG_PSEL_TXD, \ + .pselrxd = UART0_CONFIG_PSEL_RXD, \ + .pselcts = UART0_CONFIG_PSEL_CTS, \ + .pselrts = UART0_CONFIG_PSEL_RTS, \ + .p_context = NULL, \ + .hwfc = UART0_CONFIG_HWFC, \ + .parity = UART0_CONFIG_PARITY, \ + .baudrate = UART0_CONFIG_BAUDRATE, \ + .interrupt_priority = UART0_CONFIG_IRQ_PRIORITY \ + } +#endif + +/**@brief Structure for UART transfer completion event. */ +typedef struct +{ + uint8_t * p_data; ///< Pointer to memory used for transfer. + uint8_t bytes; ///< Number of bytes transfered. +} nrf_drv_uart_xfer_evt_t; + +/**@brief Structure for UART error event. */ +typedef struct +{ + nrf_drv_uart_xfer_evt_t rxtx; ///< Transfer details includes number of bytes transfered. + uint32_t error_mask;///< Mask of error flags that generated the event. +} nrf_drv_uart_error_evt_t; + +/**@brief Structure for UART event. */ +typedef struct +{ + nrf_drv_uart_evt_type_t type; ///< Event type. + union + { + nrf_drv_uart_xfer_evt_t rxtx; ///< Data provided for transfer completion events. + nrf_drv_uart_error_evt_t error;///< Data provided for error event. + } data; +} nrf_drv_uart_event_t; + +/** + * @brief UART interrupt event handler. + * + * @param[in] p_event Pointer to event structure. Event is allocated on the stack so it is available + * only within the context of the event handler. + * @param[in] p_context Context passed to interrupt handler, set on initialization. + */ +typedef void (*nrf_uart_event_handler_t)(nrf_drv_uart_event_t * p_event, void * p_context); + +/** + * @brief Function for initializing the UART driver. + * + * This function configures and enables UART. After this function GPIO pins are controlled by UART. + * + * @param[in] p_config Initial configuration. Default configuration used if NULL. + * @param[in] event_handler Event handler provided by the user. If not provided driver works in + * blocking mode. + * + * @retval NRF_SUCCESS If initialization was successful. + * @retval NRF_ERROR_INVALID_STATE If driver is already initialized. + */ +ret_code_t nrf_drv_uart_init(nrf_drv_uart_config_t const * p_config, + nrf_uart_event_handler_t event_handler); + +/** + * @brief Function for uninitializing the UART driver. + */ +void nrf_drv_uart_uninit(void); + +/** + * @brief Function for getting the address of a specific UART task. + * + * @param[in] task Task. + * + * @return Task address. + */ +__STATIC_INLINE uint32_t nrf_drv_uart_task_address_get(nrf_uart_task_t task); + +/** + * @brief Function for getting the address of a specific UART event. + * + * @param[in] event Event. + * + * @return Event address. + */ +__STATIC_INLINE uint32_t nrf_drv_uart_event_address_get(nrf_uart_event_t event); + +/** + * @brief Function for sending data over UART. + * + * If an event handler was provided in nrf_drv_uart_init() call, this function + * returns immediately and the handler is called when the transfer is done. + * Otherwise, the transfer is performed in blocking mode, i.e. this function + * returns when the transfer is finished. Blocking mode is not using interrupt so + * there is no context switching inside the function. + * + * @note Peripherals using EasyDMA (i.e. UARTE) require that the transfer buffers + * are placed in the Data RAM region. If they are not and UARTE instance is + * used, this function will fail with error code NRF_ERROR_INVALID_ADDR. + * + * @param[in] p_data Pointer to data. + * @param[in] length Number of bytes to send. + * + * @retval NRF_SUCCESS If initialization was successful. + * @retval NRF_ERROR_BUSY If driver is already transferring. + * @retval NRF_ERROR_FORBIDDEN If the transfer was aborted from a different context + * (blocking mode only, also see @ref nrf_drv_uart_rx_disable). + * @retval NRF_ERROR_INVALID_ADDR If p_data does not point to RAM buffer (UARTE only). + */ +ret_code_t nrf_drv_uart_tx(uint8_t const * const p_data, uint8_t length); + +/** + * @brief Function for checking if UART is currently transmitting. + * + * @retval true If UART is transmitting. + * @retval false If UART is not transmitting. + */ +bool nrf_drv_uart_tx_in_progress(void); + +/** + * @brief Function for aborting any ongoing transmission. + * @note @ref NRF_DRV_UART_EVT_TX_DONE event will be generated in non-blocking mode. Event will + * contain number of bytes sent until abort was called. If Easy DMA is not used event will be + * called from the function context. If Easy DMA is used it will be called from UART interrupt + * context. + */ +void nrf_drv_uart_tx_abort(void); + +/** + * @brief Function for receiving data over UART. + * + * If an event handler was provided in the nrf_drv_uart_init() call, this function + * returns immediately and the handler is called when the transfer is done. + * Otherwise, the transfer is performed in blocking mode, i.e. this function + * returns when the transfer is finished. Blocking mode is not using interrupt so + * there is no context switching inside the function. + * The receive buffer pointer is double buffered in non-blocking mode. The secondary + * buffer can be set immediately after starting the transfer and will be filled + * when the primary buffer is full. The double buffering feature allows + * receiving data continuously. + * + * @note Peripherals using EasyDMA (i.e. UARTE) require that the transfer buffers + * are placed in the Data RAM region. If they are not and UARTE instance is + * used, this function will fail with error code NRF_ERROR_INVALID_ADDR. + * @param[in] p_data Pointer to data. + * @param[in] length Number of bytes to receive. + * + * @retval NRF_SUCCESS If initialization was successful. + * @retval NRF_ERROR_BUSY If the driver is already receiving + * (and the secondary buffer has already been set + * in non-blocking mode). + * @retval NRF_ERROR_FORBIDDEN If the transfer was aborted from a different context + * (blocking mode only, also see @ref nrf_drv_uart_rx_disable). + * @retval NRF_ERROR_INTERNAL If UART peripheral reported an error. + * @retval NRF_ERROR_INVALID_ADDR If p_data does not point to RAM buffer (UARTE only). + */ +ret_code_t nrf_drv_uart_rx(uint8_t * p_data, uint8_t length); + +/** + * @brief Function for enabling receiver. + * + * UART has 6 byte long RX FIFO and it will be used to store incoming data. If user will not call + * UART receive function before FIFO is filled, overrun error will encounter. Enabling receiver + * without specifying RX buffer is supported only in UART mode (without Easy DMA). Receiver must be + * explicitly closed by the user @sa nrf_drv_uart_rx_disable. Function asserts if mode is wrong. + */ +void nrf_drv_uart_rx_enable(void); + +/** + * @brief Function for disabling receiver. + * + * Function must be called to close the receiver after it has been explicitly enabled by + * @sa nrf_drv_uart_rx_enable. Feature is supported only in UART mode (without Easy DMA). Function + * asserts if mode is wrong. + */ +void nrf_drv_uart_rx_disable(void); + +/** + * @brief Function for aborting any ongoing reception. + * @note @ref NRF_DRV_UART_EVT_RX_DONE event will be generated in non-blocking mode. Event will + * contain number of bytes received until abort was called. If Easy DMA is not used event will be + * called from the function context. If Easy DMA is used it will be called from UART interrupt + * context. + */ +void nrf_drv_uart_rx_abort(void); + +/** + * @brief Function for reading error source mask. Mask contains values from @ref nrf_uart_error_mask_t. + * @note Function should be used in blocking mode only. In case of non-blocking mode error event is + * generated. Function clears error sources after reading. + * + * @retval Mask of reported errors. + */ +uint32_t nrf_drv_uart_errorsrc_get(void); + +#ifndef SUPPRESS_INLINE_IMPLEMENTATION +__STATIC_INLINE uint32_t nrf_drv_uart_task_address_get(nrf_uart_task_t task) +{ + return nrf_uart_task_address_get(NRF_UART0, task); +} + +__STATIC_INLINE uint32_t nrf_drv_uart_event_address_get(nrf_uart_event_t event) +{ + return nrf_uart_event_address_get(NRF_UART0, event); +} +#endif //SUPPRESS_INLINE_IMPLEMENTATION +#endif //NRF_DRV_UART_H +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/pwm/app_pwm.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/pwm/app_pwm.c new file mode 100644 index 0000000000..db5c810419 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/pwm/app_pwm.c @@ -0,0 +1,876 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "app_pwm.h" +#include "nrf_drv_timer.h" +#include "nrf_drv_ppi.h" +#include "nrf_drv_common.h" +#include "nrf_drv_gpiote.h" +#include "nrf_gpiote.h" +#include "nrf_gpio.h" +#include "app_util.h" +#include "app_util_platform.h" +#include "nrf_assert.h" + +#define APP_PWM_CHANNEL_INITIALIZED 1 +#define APP_PWM_CHANNEL_UNINITIALIZED 0 + +#define APP_PWM_CHANNEL_ENABLED 1 +#define APP_PWM_CHANNEL_DISABLED 0 + +#define TIMER_PRESCALER_MAX 9 +#define TIMER_MAX_PULSEWIDTH_US_ON_16M 4095 + +#define APP_PWM_REQUIRED_PPI_CHANNELS_PER_INSTANCE 2 +#define APP_PWM_REQUIRED_PPI_CHANNELS_PER_CHANNEL 2 + +#define UNALLOCATED 0xFFFFFFFFUL +#define BUSY_STATE_CHANGING 0xFE +#define BUSY_STATE_IDLE 0xFF + +#define PWM_MAIN_CC_CHANNEL 2 +#define PWM_SECONDARY_CC_CHANNEL 3 + +#ifdef NRF52 + static bool m_use_ppi_delay_workaround; +#endif + + +/** + * @brief PWM busy status + * + * Stores the number of a channel being currently updated. + * + */ +static volatile uint8_t m_pwm_busy[TIMER_COUNT]; + + +/** + * @brief New duty cycle value + * + * When the channel duty cycle reaches this value, the update process is complete. + */ +static volatile uint32_t m_pwm_target_value[TIMER_COUNT]; + + +/** + * @brief PWM ready counter + * + * The value in this counter is decremented in every PWM cycle after initiating the update. + * If an event handler function was specified by the user, it is being called + * after two cycle events (at least one full PWM cycle). + */ +volatile uint8_t m_pwm_ready_counter[TIMER_COUNT][APP_PWM_CHANNELS_PER_INSTANCE]; + +/** + * @brief Pointers to instances + * + * This array connects any active timer instance number with the pointer to the PWM instance. + * It is used by the interrupt runtime. + */ +static const app_pwm_t * m_instances[TIMER_COUNT]; + +// Macros for getting the polarity of given instance/channel. +#define POLARITY_ACTIVE(INST,CH) (( ((INST)->p_cb)->channels_cb[(CH)].polarity == \ + APP_PWM_POLARITY_ACTIVE_LOW)?(0):(1)) +#define POLARITY_INACTIVE(INST,CH) (( ((INST)->p_cb)->channels_cb[(CH)].polarity == \ + APP_PWM_POLARITY_ACTIVE_LOW)?(1):(0)) + +//lint -save -e534 + +/** + * @brief Workaround for PAN-73. + * + * @param[in] timer Timer. + * @param[in] enable Enable or disable. + */ +static void pan73_workaround(NRF_TIMER_Type * p_timer, bool enable) +{ +#ifdef NRF51 + if (p_timer == NRF_TIMER0) + { + *(uint32_t *)0x40008C0C = (enable ? 1 : 0); + } + else if (p_timer == NRF_TIMER1) + { + *(uint32_t *)0x40009C0C = (enable ? 1 : 0); + } + else if (p_timer == NRF_TIMER2) + { + *(uint32_t *)0x4000AC0C = (enable ? 1 : 0); + } +#endif + return; +} + +bool app_pwm_busy_check(app_pwm_t const * const p_instance) +{ + uint8_t busy_state = (m_pwm_busy[p_instance->p_timer->instance_id]); + bool busy = true; + if (busy_state != BUSY_STATE_IDLE) + { + if (busy_state != BUSY_STATE_CHANGING) + { + if (nrf_drv_timer_capture_get(p_instance->p_timer, (nrf_timer_cc_channel_t) busy_state) + == m_pwm_target_value[p_instance->p_timer->instance_id]) + { + m_pwm_busy[p_instance->p_timer->instance_id] = BUSY_STATE_IDLE; + busy = false; + } + } + } + else + { + busy = false; + } + return busy; +} + + +/** + * @brief Function for enabling the IRQ for a given PWM instance. + * + * @param[in] p_instance PWM instance. + */ +__STATIC_INLINE void pwm_irq_enable(app_pwm_t const * const p_instance) +{ + nrf_drv_timer_compare_int_enable(p_instance->p_timer, PWM_MAIN_CC_CHANNEL); +} + + +/** + * @brief Function for disabling the IRQ for a given PWM instance. + * + * @param[in] p_instance PWM instance. + */ +__STATIC_INLINE void pwm_irq_disable(app_pwm_t const * const p_instance) +{ + nrf_drv_timer_compare_int_disable(p_instance->p_timer, PWM_MAIN_CC_CHANNEL); +} + + +/** + * @brief Function for disabling PWM channel PPI. + * + * @param[in] p_instance PWM instance. + */ +__STATIC_INLINE void pwm_channel_ppi_disable(app_pwm_t const * const p_instance, uint8_t channel) +{ + app_pwm_cb_t * p_cb = p_instance->p_cb; + + nrf_drv_ppi_channel_disable(p_cb->channels_cb[channel].ppi_channels[0]); + nrf_drv_ppi_channel_disable(p_cb->channels_cb[channel].ppi_channels[1]); +} + + +/** + * @brief Function for disabling PWM PPI. + * + * @param[in] p_instance PWM instance. + */ +__STATIC_INLINE void pwm_ppi_disable(app_pwm_t const * const p_instance) +{ + app_pwm_cb_t * p_cb = p_instance->p_cb; + + nrf_drv_ppi_channel_disable(p_cb->ppi_channels[0]); + nrf_drv_ppi_channel_disable(p_cb->ppi_channels[1]); +} + + +/** + * @brief This function is called on interrupt after duty set. + * + * @param[in] timer Timer used by PWM. + * @param[in] timer_instance_id Timer index. + */ +void pwm_ready_tick(nrf_timer_event_t event_type, void * p_context) +{ + uint32_t timer_instance_id = (uint32_t)p_context; + uint8_t disable = 1; + + for (uint8_t channel = 0; channel < APP_PWM_CHANNELS_PER_INSTANCE; ++channel) + { + if (m_pwm_ready_counter[timer_instance_id][channel]) + { + --m_pwm_ready_counter[timer_instance_id][channel]; + if (!m_pwm_ready_counter[timer_instance_id][channel]) + { + app_pwm_cb_t * p_cb = m_instances[timer_instance_id]->p_cb; + p_cb->p_ready_callback(timer_instance_id); + } + else + { + disable = 0; + } + } + } + + if (disable) + { + pwm_irq_disable(m_instances[timer_instance_id]); + } +} + + +/** + * @brief Function for resource de-allocation. + * + * @param[in] p_instance PWM instance. + */ +//lint -e{650} +static void pwm_dealloc(app_pwm_t const * const p_instance) +{ + app_pwm_cb_t * p_cb = p_instance->p_cb; + + for (uint8_t i = 0; i < APP_PWM_REQUIRED_PPI_CHANNELS_PER_INSTANCE; ++i) + { + if (p_cb->ppi_channels[i] != (nrf_ppi_channel_t)(uint8_t)(UNALLOCATED)) + { + nrf_drv_ppi_channel_free(p_cb->ppi_channels[i]); + } + } + if (p_cb->ppi_group != (nrf_ppi_channel_group_t)UNALLOCATED) + { + nrf_drv_ppi_group_free(p_cb->ppi_group); + } + + for (uint8_t ch = 0; ch < APP_PWM_CHANNELS_PER_INSTANCE; ++ch) + { + for (uint8_t i = 0; i < APP_PWM_REQUIRED_PPI_CHANNELS_PER_CHANNEL; ++i) + { + if (p_cb->channels_cb[ch].ppi_channels[i] != (nrf_ppi_channel_t)UNALLOCATED) + { + nrf_drv_ppi_channel_free(p_cb->channels_cb[ch].ppi_channels[i]); + p_cb->channels_cb[ch].ppi_channels[i] = (nrf_ppi_channel_t)UNALLOCATED; + } + } + if (p_cb->channels_cb[ch].gpio_pin != UNALLOCATED) + { + nrf_drv_gpiote_out_uninit(p_cb->channels_cb[ch].gpio_pin); + p_cb->channels_cb[ch].gpio_pin = UNALLOCATED; + } + p_cb->channels_cb[ch].initialized = APP_PWM_CHANNEL_UNINITIALIZED; + } + nrf_drv_timer_uninit(p_instance->p_timer); + return; +} + + +/** + * @brief PWM state transition from (0%, 100%) to 0% or 100%. + * + * @param[in] p_instance PWM instance. + * @param[in] channel PWM channel number. + * @param[in] ticks Number of clock ticks. + */ +static void pwm_transition_n_to_0or100(app_pwm_t const * const p_instance, + uint8_t channel, uint16_t ticks) +{ + app_pwm_cb_t * p_cb = p_instance->p_cb; + app_pwm_channel_cb_t * p_ch_cb = &p_cb->channels_cb[channel]; + nrf_ppi_channel_group_t p_ppigrp = p_cb->ppi_group; + + pwm_ppi_disable(p_instance); + nrf_drv_ppi_group_clear(p_ppigrp); + nrf_drv_ppi_channels_include_in_group( + nrf_drv_ppi_channel_to_mask(p_ch_cb->ppi_channels[0]) | + nrf_drv_ppi_channel_to_mask(p_ch_cb->ppi_channels[1]), + p_ppigrp); + + if (!ticks) + { + nrf_drv_ppi_channel_assign(p_cb->ppi_channels[0], + nrf_drv_timer_compare_event_address_get(p_instance->p_timer, channel), + nrf_drv_ppi_task_addr_group_disable_get(p_ppigrp)); + nrf_drv_timer_compare(p_instance->p_timer, (nrf_timer_cc_channel_t) PWM_SECONDARY_CC_CHANNEL, 0, false); + m_pwm_target_value[p_instance->p_timer->instance_id] = + nrf_drv_timer_capture_get(p_instance->p_timer, (nrf_timer_cc_channel_t) channel); + nrf_drv_ppi_channel_assign(p_cb->ppi_channels[1], + nrf_drv_timer_compare_event_address_get(p_instance->p_timer, channel), + nrf_drv_timer_capture_task_address_get(p_instance->p_timer, PWM_SECONDARY_CC_CHANNEL)); + } + else + { + ticks = p_cb->period; + nrf_drv_ppi_channel_assign(p_cb->ppi_channels[0], + nrf_drv_timer_compare_event_address_get(p_instance->p_timer, PWM_MAIN_CC_CHANNEL), + nrf_drv_ppi_task_addr_group_disable_get(p_ppigrp)); + // Set secondary CC channel to non-zero value: + nrf_drv_timer_compare(p_instance->p_timer, (nrf_timer_cc_channel_t) PWM_SECONDARY_CC_CHANNEL, 1, false); + m_pwm_target_value[p_instance->p_timer->instance_id] = 0; + // The captured value will be equal to 0, because timer clear on main PWM CC channel compare is enabled. + nrf_drv_ppi_channel_assign(p_cb->ppi_channels[1], + nrf_drv_timer_compare_event_address_get(p_instance->p_timer, PWM_MAIN_CC_CHANNEL), + nrf_drv_timer_capture_task_address_get(p_instance->p_timer, PWM_SECONDARY_CC_CHANNEL)); + } + + nrf_drv_ppi_channel_enable(p_cb->ppi_channels[0]); + nrf_drv_ppi_channel_enable(p_cb->ppi_channels[1]); + + p_ch_cb->pulsewidth = ticks; + m_pwm_busy[p_instance->p_timer->instance_id] = PWM_SECONDARY_CC_CHANNEL; +} + + +/** + * @brief PWM state transition from (0%, 100%) to (0%, 100%). + * + * @param[in] p_instance PWM instance. + * @param[in] channel PWM channel number. + * @param[in] ticks Number of clock ticks. + */ +static void pwm_transition_n_to_m(app_pwm_t const * const p_instance, + uint8_t channel, uint16_t ticks) +{ + app_pwm_cb_t * p_cb = p_instance->p_cb; + app_pwm_channel_cb_t * p_ch_cb = &p_cb->channels_cb[channel]; + nrf_ppi_channel_group_t p_ppigrp = p_cb->ppi_group; + + pwm_ppi_disable(p_instance); + nrf_drv_ppi_group_clear(p_ppigrp); + nrf_drv_ppi_channels_include_in_group( + nrf_drv_ppi_channel_to_mask(p_cb->ppi_channels[0]) | + nrf_drv_ppi_channel_to_mask(p_cb->ppi_channels[1]), + p_ppigrp); + + nrf_drv_ppi_channel_assign(p_cb->ppi_channels[0], + nrf_drv_timer_compare_event_address_get(p_instance->p_timer, PWM_SECONDARY_CC_CHANNEL), + nrf_drv_timer_capture_task_address_get(p_instance->p_timer, channel)); + +#ifdef NRF52 + if (ticks + ((nrf_timer_frequency_get(p_instance->p_timer->p_reg) == + (m_use_ppi_delay_workaround ? NRF_TIMER_FREQ_8MHz : NRF_TIMER_FREQ_16MHz) ) ? 1 : 0) + < p_ch_cb->pulsewidth) +#else + if (ticks + ((nrf_timer_frequency_get(p_instance->p_timer->p_reg) == NRF_TIMER_FREQ_16MHz) ? 1 : 0) + < p_ch_cb->pulsewidth) +#endif + { + // For lower value, we need one more transition. Timer task delay is included. + // If prescaler is disabled, one tick must be added because of 1 PCLK16M clock cycle delay. + nrf_drv_ppi_channel_assign(p_cb->ppi_channels[1], + nrf_drv_timer_compare_event_address_get(p_instance->p_timer, PWM_SECONDARY_CC_CHANNEL), + nrf_drv_gpiote_out_task_addr_get(p_ch_cb->gpio_pin)); + } + else + { + nrf_drv_ppi_channel_remove_from_group(p_cb->ppi_channels[1], p_ppigrp); + } + p_ch_cb->pulsewidth = ticks; + nrf_drv_timer_compare(p_instance->p_timer, (nrf_timer_cc_channel_t) PWM_SECONDARY_CC_CHANNEL, ticks, false); + nrf_drv_ppi_group_enable(p_ppigrp); + + m_pwm_target_value[p_instance->p_timer->instance_id] = ticks; + m_pwm_busy[p_instance->p_timer->instance_id] = channel; +} + + +/** + * @brief PWM state transition from 0% or 100% to (0%, 100%). + * + * @param[in] p_instance PWM instance. + * @param[in] channel PWM channel number. + * @param[in] ticks Number of clock ticks. + */ +static void pwm_transition_0or100_to_n(app_pwm_t const * const p_instance, + uint8_t channel, uint16_t ticks) +{ + app_pwm_cb_t * p_cb = p_instance->p_cb; + app_pwm_channel_cb_t * p_ch_cb = &p_cb->channels_cb[channel]; + nrf_ppi_channel_group_t p_ppigrp = p_cb->ppi_group; + nrf_timer_cc_channel_t pwm_ch_cc = (nrf_timer_cc_channel_t)(channel); + + pwm_ppi_disable(p_instance); + pwm_channel_ppi_disable(p_instance, channel); + + nrf_drv_timer_compare(p_instance->p_timer, pwm_ch_cc, ticks, false); + nrf_drv_ppi_group_clear(p_ppigrp); + nrf_drv_ppi_channels_include_in_group( + nrf_drv_ppi_channel_to_mask(p_ch_cb->ppi_channels[0])| + nrf_drv_ppi_channel_to_mask(p_ch_cb->ppi_channels[1]), + p_ppigrp); + + if (!p_ch_cb->pulsewidth) + { + // Channel is at 0%. + nrf_drv_ppi_channel_assign(p_cb->ppi_channels[0], + nrf_drv_timer_compare_event_address_get(p_instance->p_timer, channel), + nrf_drv_ppi_task_addr_group_enable_get(p_ppigrp)); + nrf_drv_timer_compare(p_instance->p_timer, (nrf_timer_cc_channel_t) PWM_SECONDARY_CC_CHANNEL, 0, false); + m_pwm_target_value[p_instance->p_timer->instance_id] = + nrf_drv_timer_capture_get(p_instance->p_timer, (nrf_timer_cc_channel_t) channel); + nrf_drv_ppi_channel_assign(p_cb->ppi_channels[1], + nrf_drv_timer_compare_event_address_get(p_instance->p_timer, channel), + nrf_drv_timer_capture_task_address_get(p_instance->p_timer, PWM_SECONDARY_CC_CHANNEL)); + + } + else + { + // Channel is at 100%. + nrf_drv_ppi_channel_assign(p_cb->ppi_channels[0], + nrf_drv_timer_compare_event_address_get(p_instance->p_timer, PWM_MAIN_CC_CHANNEL), + nrf_drv_ppi_task_addr_group_enable_get(p_ppigrp)); + // Set secondary CC channel to non-zero value: + nrf_drv_timer_compare(p_instance->p_timer, (nrf_timer_cc_channel_t) PWM_SECONDARY_CC_CHANNEL, 1, false); + m_pwm_target_value[p_instance->p_timer->instance_id] = 0; + // The captured value will be equal to 0, because timer clear on main PWM CC channel compare is enabled. + nrf_drv_ppi_channel_assign(p_cb->ppi_channels[1], + nrf_drv_timer_compare_event_address_get(p_instance->p_timer, PWM_MAIN_CC_CHANNEL), + nrf_drv_timer_capture_task_address_get(p_instance->p_timer, PWM_SECONDARY_CC_CHANNEL)); + } + nrf_drv_ppi_channel_enable(p_cb->ppi_channels[0]); + nrf_drv_ppi_channel_enable(p_cb->ppi_channels[1]); + + p_ch_cb->pulsewidth = ticks; + m_pwm_busy[p_instance->p_timer->instance_id] = PWM_SECONDARY_CC_CHANNEL; +} + + +/** + * @brief PWM state transition from 0% or 100% to 0% or 100%. + * + * @param[in] p_instance PWM instance. + * @param[in] channel PWM channel number. + * @param[in] ticks Number of clock ticks. + */ +static void pwm_transition_0or100_to_0or100(app_pwm_t const * const p_instance, + uint8_t channel, uint16_t ticks) +{ + app_pwm_cb_t * p_cb = p_instance->p_cb; + app_pwm_channel_cb_t * p_ch_cb = &p_cb->channels_cb[channel]; + nrf_timer_cc_channel_t pwm_ch_cc = (nrf_timer_cc_channel_t)(channel); + + pwm_ppi_disable(p_instance); + pwm_channel_ppi_disable(p_instance, channel); + if (!ticks) + { + // Set to 0%. + nrf_drv_gpiote_out_task_force(p_ch_cb->gpio_pin, POLARITY_INACTIVE(p_instance, channel)); + } + else if (ticks >= p_cb->period) + { + // Set to 100%. + ticks = p_cb->period; + nrf_drv_gpiote_out_task_force(p_ch_cb->gpio_pin, POLARITY_ACTIVE(p_instance, channel)); + } + nrf_drv_timer_compare(p_instance->p_timer, pwm_ch_cc, ticks, false); + p_ch_cb->pulsewidth = ticks; + + m_pwm_busy[p_instance->p_timer->instance_id] = BUSY_STATE_IDLE; + return; +} + + +ret_code_t app_pwm_channel_duty_ticks_set(app_pwm_t const * const p_instance, + uint8_t channel, + uint16_t ticks) +{ + app_pwm_cb_t * p_cb = p_instance->p_cb; + app_pwm_channel_cb_t * p_ch_cb = &p_cb->channels_cb[channel]; + + ASSERT(channel < APP_PWM_CHANNELS_PER_INSTANCE); + ASSERT(p_ch_cb->initialized == APP_PWM_CHANNEL_INITIALIZED); + + if (p_cb->state != NRF_DRV_STATE_POWERED_ON) + { + return NRF_ERROR_INVALID_STATE; + } + if (ticks == p_ch_cb->pulsewidth) + { + if (p_cb->p_ready_callback) + { + p_cb->p_ready_callback(p_instance->p_timer->instance_id); + } + return NRF_SUCCESS; // No action required. + } + if (app_pwm_busy_check(p_instance)) + { + return NRF_ERROR_BUSY; // PPI channels for synchronization are still in use. + } + + m_pwm_busy[p_instance->p_timer->instance_id] = BUSY_STATE_CHANGING; + + // Pulse width change sequence: + if (!p_ch_cb->pulsewidth || p_ch_cb->pulsewidth >= p_cb->period) + { + // Channel is disabled (0%) or at 100%. + if (!ticks || ticks >= p_cb->period) + { + // Set to 0 or 100%. + pwm_transition_0or100_to_0or100(p_instance, channel, ticks); + } + else + { + // Other value. + pwm_transition_0or100_to_n(p_instance, channel, ticks); + } + } + else + { + // Channel is at other value. + if (!ticks || ticks >= p_cb->period) + { + // Disable channel (set to 0%) or set to 100%. + pwm_transition_n_to_0or100(p_instance, channel, ticks); + } + else + { + // Set to any other value. + pwm_transition_n_to_m(p_instance, channel, ticks); + } + } + if (p_instance->p_cb->p_ready_callback) + { + //PWM ready interrupt handler will be called after one full period. + m_pwm_ready_counter[p_instance->p_timer->instance_id][channel] = 2; + pwm_irq_enable(p_instance); + } + return NRF_SUCCESS; +} + +uint16_t app_pwm_channel_duty_ticks_get(app_pwm_t const * const p_instance, uint8_t channel) +{ + app_pwm_cb_t * p_cb = p_instance->p_cb; + app_pwm_channel_cb_t * p_ch_cb = &p_cb->channels_cb[channel]; + + return p_ch_cb->pulsewidth; +} + +uint16_t app_pwm_cycle_ticks_get(app_pwm_t const * const p_instance) +{ + app_pwm_cb_t * p_cb = p_instance->p_cb; + + return (uint16_t)p_cb->period; +} + +ret_code_t app_pwm_channel_duty_set(app_pwm_t const * const p_instance, + uint8_t channel, app_pwm_duty_t duty) +{ + uint32_t ticks = ((uint32_t)app_pwm_cycle_ticks_get(p_instance) * (uint32_t)duty) / 100UL; + return app_pwm_channel_duty_ticks_set(p_instance, channel, ticks); +} + + +app_pwm_duty_t app_pwm_channel_duty_get(app_pwm_t const * const p_instance, uint8_t channel) +{ + uint32_t value = ((uint32_t)app_pwm_channel_duty_ticks_get(p_instance, channel) * 100UL) \ + / (uint32_t)app_pwm_cycle_ticks_get(p_instance); + + return (app_pwm_duty_t)value; +} + + +/** + * @brief Function for initializing the PWM channel. + * + * @param[in] p_instance PWM instance. + * @param[in] channel Channel number. + * @param[in] pin GPIO pin number. + * + * @retval NRF_SUCCESS If initialization was successful. + * @retval NRF_ERROR_NO_MEM If there were not enough free resources. + * @retval NRF_ERROR_INVALID_STATE If the timer is already in use or initialization failed. + */ +static ret_code_t app_pwm_channel_init(app_pwm_t const * const p_instance, uint8_t channel, + uint32_t pin, app_pwm_polarity_t polarity) +{ + ASSERT(channel < APP_PWM_CHANNELS_PER_INSTANCE); + app_pwm_cb_t * p_cb = p_instance->p_cb; + app_pwm_channel_cb_t * p_channel_cb = &p_cb->channels_cb[channel]; + + if (p_cb->state != NRF_DRV_STATE_UNINITIALIZED) + { + return NRF_ERROR_INVALID_STATE; + } + + p_channel_cb->pulsewidth = 0; + p_channel_cb->polarity = polarity; + ret_code_t err_code; + + /* GPIOTE setup: */ + nrf_drv_gpiote_out_config_t out_cfg = GPIOTE_CONFIG_OUT_TASK_TOGGLE( POLARITY_INACTIVE(p_instance, channel) ); + err_code = nrf_drv_gpiote_out_init((nrf_drv_gpiote_pin_t)pin,&out_cfg); + if (err_code != NRF_SUCCESS) + { + return NRF_ERROR_NO_MEM; + } + p_cb->channels_cb[channel].gpio_pin = pin; + + // Set output to inactive state. + if (polarity) + { + nrf_gpio_pin_clear(pin); + } + else + { + nrf_gpio_pin_set(pin); + } + + /* PPI setup: */ + for (uint8_t i = 0; i < APP_PWM_REQUIRED_PPI_CHANNELS_PER_CHANNEL; ++i) + { + if (nrf_drv_ppi_channel_alloc(&p_channel_cb->ppi_channels[i]) != NRF_SUCCESS) + { + return NRF_ERROR_NO_MEM; // Resource de-allocation is done by callee. + } + } + + nrf_drv_ppi_channel_disable(p_channel_cb->ppi_channels[0]); + nrf_drv_ppi_channel_disable(p_channel_cb->ppi_channels[1]); + nrf_drv_ppi_channel_assign(p_channel_cb->ppi_channels[0], + nrf_drv_timer_compare_event_address_get(p_instance->p_timer, channel), + nrf_drv_gpiote_out_task_addr_get(p_channel_cb->gpio_pin)); + nrf_drv_ppi_channel_assign(p_channel_cb->ppi_channels[1], + nrf_drv_timer_compare_event_address_get(p_instance->p_timer, PWM_MAIN_CC_CHANNEL), + nrf_drv_gpiote_out_task_addr_get(p_channel_cb->gpio_pin)); + + p_channel_cb->initialized = APP_PWM_CHANNEL_INITIALIZED; + m_pwm_ready_counter[p_instance->p_timer->instance_id][channel] = 0; + + return NRF_SUCCESS; +} + + +/** + * @brief Function for calculating target timer frequency, which will allow to set given period length. + * + * @param[in] period_us Desired period in microseconds. + * + * @retval Timer frequency. + */ +__STATIC_INLINE nrf_timer_frequency_t pwm_calculate_timer_frequency(uint32_t period_us) +{ + uint32_t f = (uint32_t) NRF_TIMER_FREQ_16MHz; + uint32_t min = (uint32_t) NRF_TIMER_FREQ_31250Hz; + + while ((period_us > TIMER_MAX_PULSEWIDTH_US_ON_16M) && (f < min)) + { + period_us >>= 1; + ++f; + } + +#ifdef NRF52 + if ((m_use_ppi_delay_workaround) && (f == (uint32_t) NRF_TIMER_FREQ_16MHz)) + { + f = (uint32_t) NRF_TIMER_FREQ_8MHz; + } +#endif + + return (nrf_timer_frequency_t) f; +} + + +ret_code_t app_pwm_init(app_pwm_t const * const p_instance, app_pwm_config_t const * const p_config, + app_pwm_callback_t p_ready_callback) +{ + ASSERT(p_instance); + + if (!p_config) + { + return NRF_ERROR_INVALID_DATA; + } + + app_pwm_cb_t * p_cb = p_instance->p_cb; + + if (p_cb->state != NRF_DRV_STATE_UNINITIALIZED) + { + return NRF_ERROR_INVALID_STATE; + } + + uint32_t err_code = nrf_drv_ppi_init(); + if ((err_code != NRF_SUCCESS) && (err_code != MODULE_ALREADY_INITIALIZED)) + { + return NRF_ERROR_NO_MEM; + } + + + if (!nrf_drv_gpiote_is_init()) + { + err_code = nrf_drv_gpiote_init(); + if (err_code != NRF_SUCCESS) + { + return NRF_ERROR_INTERNAL; + } + } + +#ifdef NRF52 + if (((*(uint32_t *)0xF0000FE8) & 0x000000F0) == 0x30) + { + m_use_ppi_delay_workaround = false; + } + else + { + m_use_ppi_delay_workaround = true; + } +#endif + + // Innitialize resource status: + p_cb->ppi_channels[0] = (nrf_ppi_channel_t)UNALLOCATED; + p_cb->ppi_channels[1] = (nrf_ppi_channel_t)UNALLOCATED; + p_cb->ppi_group = (nrf_ppi_channel_group_t)UNALLOCATED; + + for (uint8_t i = 0; i < APP_PWM_CHANNELS_PER_INSTANCE; ++i) + { + p_cb->channels_cb[i].initialized = APP_PWM_CHANNEL_UNINITIALIZED; + p_cb->channels_cb[i].ppi_channels[0] = (nrf_ppi_channel_t)UNALLOCATED; + p_cb->channels_cb[i].ppi_channels[1] = (nrf_ppi_channel_t)UNALLOCATED; + p_cb->channels_cb[i].gpio_pin = UNALLOCATED; + } + + // Allocate PPI channels and groups: + for (uint8_t i = 0; i < APP_PWM_REQUIRED_PPI_CHANNELS_PER_INSTANCE; ++i) + { + if (nrf_drv_ppi_channel_alloc(&p_cb->ppi_channels[i]) != NRF_SUCCESS) + { + pwm_dealloc(p_instance); + return NRF_ERROR_NO_MEM; + } + } + if (nrf_drv_ppi_group_alloc(&p_cb->ppi_group) != NRF_SUCCESS) + { + pwm_dealloc(p_instance); + return NRF_ERROR_NO_MEM; + } + + // Initialize channels: + for (uint8_t i = 0; i < APP_PWM_CHANNELS_PER_INSTANCE; ++i) + { + if (p_config->pins[i] != APP_PWM_NOPIN) + { + err_code = app_pwm_channel_init(p_instance, i, p_config->pins[i], p_config->pin_polarity[i]); + if (err_code != NRF_SUCCESS) + { + pwm_dealloc(p_instance); + return err_code; + } + app_pwm_channel_duty_ticks_set(p_instance, i, 0); + } + } + + // Initialize timer: + nrf_timer_frequency_t timer_freq = pwm_calculate_timer_frequency(p_config->period_us); + nrf_drv_timer_config_t timer_cfg = { + .frequency = timer_freq, + .mode = NRF_TIMER_MODE_TIMER, + .bit_width = NRF_TIMER_BIT_WIDTH_16, + .interrupt_priority = APP_IRQ_PRIORITY_LOW, + .p_context = (void *) (uint32_t) p_instance->p_timer->instance_id + }; + err_code = nrf_drv_timer_init(p_instance->p_timer, &timer_cfg, + pwm_ready_tick); + if (err_code != NRF_SUCCESS) + { + pwm_dealloc(p_instance); + return err_code; + } + + uint32_t ticks = nrf_drv_timer_us_to_ticks(p_instance->p_timer, p_config->period_us); + p_cb->period = ticks; + nrf_drv_timer_clear(p_instance->p_timer); + nrf_drv_timer_extended_compare(p_instance->p_timer, (nrf_timer_cc_channel_t) PWM_MAIN_CC_CHANNEL, + ticks, NRF_TIMER_SHORT_COMPARE2_CLEAR_MASK, true); + nrf_drv_timer_compare_int_disable(p_instance->p_timer, PWM_MAIN_CC_CHANNEL); + + p_cb->p_ready_callback = p_ready_callback; + m_instances[p_instance->p_timer->instance_id] = p_instance; + m_pwm_busy[p_instance->p_timer->instance_id] = BUSY_STATE_IDLE; + p_cb->state = NRF_DRV_STATE_INITIALIZED; + + return NRF_SUCCESS; +} + + +void app_pwm_enable(app_pwm_t const * const p_instance) +{ + app_pwm_cb_t * p_cb = p_instance->p_cb; + + ASSERT(p_cb->state != NRF_DRV_STATE_UNINITIALIZED); + + for (uint32_t channel = 0; channel < APP_PWM_CHANNELS_PER_INSTANCE; ++channel) + { + app_pwm_channel_cb_t * p_ch_cb = &p_cb->channels_cb[channel]; + m_pwm_ready_counter[p_instance->p_timer->instance_id][channel] = 0; + if (p_ch_cb->initialized) + { + nrf_drv_gpiote_out_task_force(p_ch_cb->gpio_pin, POLARITY_INACTIVE(p_instance, channel)); + nrf_drv_gpiote_out_task_enable(p_ch_cb->gpio_pin); + p_ch_cb->pulsewidth = 0; + } + } + m_pwm_busy[p_instance->p_timer->instance_id] = BUSY_STATE_IDLE; + pan73_workaround(p_instance->p_timer->p_reg, true); + nrf_drv_timer_clear(p_instance->p_timer); + nrf_drv_timer_enable(p_instance->p_timer); + + p_cb->state = NRF_DRV_STATE_POWERED_ON; + return; +} + + +void app_pwm_disable(app_pwm_t const * const p_instance) +{ + app_pwm_cb_t * p_cb = p_instance->p_cb; + + ASSERT(p_cb->state != NRF_DRV_STATE_UNINITIALIZED); + + nrf_drv_timer_disable(p_instance->p_timer); + pwm_irq_disable(p_instance); + for (uint8_t ppi_channel = 0; ppi_channel < APP_PWM_REQUIRED_PPI_CHANNELS_PER_INSTANCE; ++ppi_channel) + { + nrf_drv_ppi_channel_disable(p_cb->ppi_channels[ppi_channel]); + } + for (uint8_t channel = 0; channel < APP_PWM_CHANNELS_PER_INSTANCE; ++channel) + { + app_pwm_channel_cb_t * p_ch_cb = &p_cb->channels_cb[channel]; + if (p_ch_cb->initialized) + { + uint8_t polarity = POLARITY_INACTIVE(p_instance, channel); + if (polarity) + { + nrf_gpio_pin_set(p_ch_cb->gpio_pin); + } + else + { + nrf_gpio_pin_clear(p_ch_cb->gpio_pin); + } + nrf_drv_gpiote_out_task_disable(p_ch_cb->gpio_pin); + nrf_drv_ppi_channel_disable(p_ch_cb->ppi_channels[0]); + nrf_drv_ppi_channel_disable(p_ch_cb->ppi_channels[1]); + } + } + pan73_workaround(p_instance->p_timer->p_reg, false); + + p_cb->state = NRF_DRV_STATE_INITIALIZED; + return; +} + + +ret_code_t app_pwm_uninit(app_pwm_t const * const p_instance) +{ + app_pwm_cb_t * p_cb = p_instance->p_cb; + + if (p_cb->state == NRF_DRV_STATE_POWERED_ON) + { + app_pwm_disable(p_instance); + } + else if (p_cb->state == NRF_DRV_STATE_UNINITIALIZED) + { + return NRF_ERROR_INVALID_STATE; + } + pwm_dealloc(p_instance); + + p_cb->state = NRF_DRV_STATE_UNINITIALIZED; + return NRF_SUCCESS; +} + + +//lint -restore diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/pwm/app_pwm.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/pwm/app_pwm.h new file mode 100644 index 0000000000..7c619f1951 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/pwm/app_pwm.h @@ -0,0 +1,295 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup app_pwm Pulse-width modulation (PWM) + * @{ + * @ingroup app_common + * + * @brief Module for generating a pulse-width modulated output signal. + * + * @details This module provides a PWM implementation using timers, GPIOTE, and PPI. + * + * Resource usage: + * - 2 PPI channels per instance + 2 PPI channels per PWM channel. + * - 1 PPI group per instance. + * - 1 GPIOTE channel per PWM channel. + * + * For example, a PWM instance with two channels will consume 2+4 PPI channels, 1 PPI group, and 2 GPIOTE channels. + * + * The maximum number of PWM channels per instance is 2. + */ + +#ifndef APP_PWM_H__ +#define APP_PWM_H__ + +#include +#include "sdk_errors.h" +#include "nrf_drv_timer.h" +#include "nrf_drv_common.h" +#include "nrf_drv_ppi.h" + + +#define APP_PWM_NOPIN 0xFFFFFFFF + +/** @brief Number of channels for one timer instance (fixed to 2 due to timer properties).*/ +#define APP_PWM_CHANNELS_PER_INSTANCE 2 + +/**@brief Macro for creating a PWM instance. */ +#define APP_PWM_INSTANCE(name, num) \ + const nrf_drv_timer_t m_pwm_##name##_timer = NRF_DRV_TIMER_INSTANCE(num); \ + app_pwm_cb_t m_pwm_##name##_cb; \ + /*lint -e{545}*/ \ + const app_pwm_t name = { \ + .p_cb = &m_pwm_##name##_cb, \ + .p_timer = &m_pwm_##name##_timer, \ + } + + +/**@brief PWM instance default configuration (1 channel). */ +#define APP_PWM_DEFAULT_CONFIG_1CH(period_in_us, pin) \ + { \ + .pins = {pin, APP_PWM_NOPIN}, \ + .pin_polarity = {APP_PWM_POLARITY_ACTIVE_LOW, APP_PWM_POLARITY_ACTIVE_LOW}, \ + .num_of_channels = 1, \ + .period_us = period_in_us \ + } + +/**@brief PWM instance default configuration (2 channels). */ +#define APP_PWM_DEFAULT_CONFIG_2CH(period_in_us, pin0, pin1) \ + { \ + .pins = {pin0, pin1}, \ + .pin_polarity = {APP_PWM_POLARITY_ACTIVE_LOW, APP_PWM_POLARITY_ACTIVE_LOW}, \ + .num_of_channels = 2, \ + .period_us = period_in_us \ + } + +typedef uint16_t app_pwm_duty_t; + +/** + * @brief PWM callback that is executed when a PWM duty change has been completed. + * + * @param[in] pwm_id PWM instance ID. + */ +typedef void (* app_pwm_callback_t)(uint32_t); + +/** + * @brief Channel polarity. + */ +typedef enum +{ + APP_PWM_POLARITY_ACTIVE_LOW = 0, + APP_PWM_POLARITY_ACTIVE_HIGH = 1 +} app_pwm_polarity_t; + +/**@brief PWM configuration structure used for initialization. */ +typedef struct +{ + uint32_t pins[APP_PWM_CHANNELS_PER_INSTANCE]; //!< Pins configured as PWM output. + app_pwm_polarity_t pin_polarity[APP_PWM_CHANNELS_PER_INSTANCE]; //!< Polarity of active state on pin. + uint32_t num_of_channels; //!< Number of channels that can be used. + uint32_t period_us; //!< PWM signal output period to configure (in microseconds). +} app_pwm_config_t; + + +/** + * @cond (NODOX) + * @defgroup app_pwm_internal Auxiliary internal types declarations + * @{ + * @internal + * + * @brief Module for internal usage inside the library only + * + * There are some definitions that must be included in the header file because + * of the way the library is set up. In this way, the are accessible to the user. + * However, any functions and variables defined here may change at any time + * without a warning, so you should not access them directly. + */ + + /** + * @brief PWM channel instance + * + * This structure holds all data needed by a single PWM channel. + */ + typedef struct + { + uint32_t gpio_pin; //!< Pin that is used by this PWM channel. + uint32_t pulsewidth; //!< The copy of duty currently set (in ticks). + nrf_ppi_channel_t ppi_channels[2]; //!< PPI channels used by the PWM channel to clear and set the output. + app_pwm_polarity_t polarity; //!< The active state of the pin. + uint8_t initialized; //!< The internal information if the selected channel was initialized. + } app_pwm_channel_cb_t; + + /** + * @brief Variable part of PWM instance + * + * This structure holds instance data that may change. + */ + typedef struct + { + app_pwm_channel_cb_t channels_cb[APP_PWM_CHANNELS_PER_INSTANCE]; //!< Channels data + uint32_t period; //!< Selected period in ticks + app_pwm_callback_t p_ready_callback; //!< Callback function called on PWM readiness + nrf_ppi_channel_t ppi_channels[2]; //!< PPI channels used temporary while changing duty + nrf_ppi_channel_group_t ppi_group; //!< PPI group used to synchronize changes on channels + nrf_drv_state_t state; //!< Current driver status + } app_pwm_cb_t; +/** @} + * @endcond + */ + + +/**@brief PWM instance structure. */ +typedef struct +{ + app_pwm_cb_t *p_cb; //!< Pointer to control block internals. + nrf_drv_timer_t const * const p_timer; //!< Timer used by this PWM instance. +} app_pwm_t; + +/** + * @brief Function for checking if the PWM instance is busy updating the duty cycle. + * + * @param[in] p_instance PWM instance. + * + * @retval True If the PWM instance is ready for duty cycle changes. + * @retval False If a change operation is in progress. + */ +bool app_pwm_busy_check(app_pwm_t const * const p_instance); + +/** + * @brief Function for initializing a PWM instance. + * + * @param[in] p_instance PWM instance. + * @param[in] p_config Initial configuration. + * @param[in] p_ready_callback Pointer to ready callback function (or NULL to disable). + * + * @retval NRF_SUCCESS If initialization was successful. + * @retval NRF_ERROR_NO_MEM If there were not enough free resources. + * @retval NRF_ERROR_INVALID_PARAM If an invalid configuration structure was passed. + * @retval NRF_ERROR_INVALID_STATE If the timer/PWM is already in use or if initialization failed. + */ +ret_code_t app_pwm_init(app_pwm_t const * const p_instance, app_pwm_config_t const * const p_config, + app_pwm_callback_t p_ready_callback); + + +/** + * @brief Function for uninitializing a PWM instance and releasing the allocated resources. + * + * @param[in] p_instance PWM instance. + * + * @retval NRF_SUCCESS If uninitialization was successful. + * @retval NRF_ERROR_INVALID_STATE If the given instance was not initialized. + */ +ret_code_t app_pwm_uninit(app_pwm_t const * const p_instance); + +/** + * @brief Function for enabling a PWM instance after initialization. + * + * @param[in] p_instance PWM instance. + */ +void app_pwm_enable(app_pwm_t const * const p_instance); + +/** + * @brief Function for disabling a PWM instance after initialization. + * + * @param[in] p_instance PWM instance. + */ +void app_pwm_disable(app_pwm_t const * const p_instance); + +/** + * @brief Function for setting the PWM channel duty cycle in percents. + * + * A duty cycle change requires one full PWM clock period to finish. + * If another change is attempted for any channel of given instance before + * the current change is complete, the new attempt will result in the error + * NRF_ERROR_BUSY. + * + * @param[in] p_instance PWM instance. + * @param[in] channel Channel number. + * @param[in] duty Duty cycle (0 - 100). + * + * @retval NRF_SUCCESS If the operation was successful. + * @retval NRF_ERROR_BUSY If the PWM is not ready yet. + * @retval NRF_ERROR_INVALID_STATE If the given instance was not initialized. + * + */ +ret_code_t app_pwm_channel_duty_set(app_pwm_t const * const p_instance, + uint8_t channel, app_pwm_duty_t duty); + +/** + * @brief Function for retrieving the PWM channel duty cycle in percents. + * + * @param[in] p_instance PWM instance. + * @param[in] channel Channel number. + * + * @return Duty cycle value. + */ +app_pwm_duty_t app_pwm_channel_duty_get(app_pwm_t const * const p_instance, uint8_t channel); + + +/** + * @name Functions accessing values in ticks + * + * Auxiliary functions that allow to get values in actual timer ticks. + * @{ + */ + + /** + * @brief Function for setting PWM channel duty cycle in clock ticks. + * + * @note Duty cycle changes require one full PWM clock period to finish. + * Until that, the next change attempt (for any channel of given instance) + * will result in an NRF_ERROR_BUSY error. + * + * @param[in] p_instance PWM instance. + * @param[in] channel Channel number. + * @param[in] ticks Number of PWM clock ticks. + * + * @retval NRF_SUCCESS If the operation was successful. + * @retval NRF_ERROR_BUSY If PWM is not ready yet. + * @retval NRF_ERROR_INVALID_STATE If the given instance was not initialized. + */ + ret_code_t app_pwm_channel_duty_ticks_set(app_pwm_t const * const p_instance, + uint8_t channel, + uint16_t ticks); + + + /** + * @brief Function for retrieving the PWM channel duty cycle in ticks. + * + * This function retrieves the real, currently set duty cycle in ticks. + * For one full PWM cycle the value might be different than the value set by the last + * @ref app_pwm_channel_duty_ticks_set function call. + * + * @param[in] p_instance PWM instance. + * @param[in] channel Channel number. + * + * @return Number of ticks set for selected channel. + * + */ + uint16_t app_pwm_channel_duty_ticks_get(app_pwm_t const * const p_instance, uint8_t channel); + + /** + * @brief Function for returning the number of ticks in a whole cycle. + * + * @param[in] p_instance PWM instance. + * + * @return Number of ticks that corresponds to 100% of the duty cycle. + */ + uint16_t app_pwm_cycle_ticks_get(app_pwm_t const * const p_instance); +/** @} */ + + +#endif + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/serial_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/serial_api.c new file mode 100644 index 0000000000..311a46f1b3 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/serial_api.c @@ -0,0 +1,469 @@ +/* mbed Microcontroller Library + * Copyright (c) 2013 Nordic Semiconductor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include "mbed_assert.h" +#include "mbed_error.h" +#include "serial_api.h" +#include "nrf_drv_uart.h" +#include "app_util_platform.h" +#include "nrf_gpio.h" + +#if DEVICE_SERIAL_ASYNCH +#define SERIAL_S(obj) (&obj->serial) +#else +#define SERIAL_S(obj) (obj) +#endif + +#define UART_INSTANCE_COUNT 1 +#define UART_INSTANCE NRF_UART0 +#define UART_INSTANCE_ID 0 +#define UART_IRQn UART0_IRQn +#define UART_CB uart_cb[UART_INSTANCE_ID] + +int stdio_uart_inited = 0; +serial_t stdio_uart; + +static nrf_drv_uart_config_t uart_config = NRF_DRV_UART_DEFAULT_CONFIG; + +typedef struct { + volatile bool tx_active; + volatile bool rx_active; + bool async_mode; + bool initialized; + uint8_t irqs_enabled; + uint32_t irq_context; + uart_irq_handler irq_handler; + uint32_t registered_events; + uint32_t event_flags; + void (*async_handler)(); + uint8_t *rx_buffer; + uint8_t rx_pos; + uint8_t rx_length; +} uart_ctlblock_t; + +static uart_ctlblock_t uart_cb[UART_INSTANCE_COUNT]; + +static nrf_uart_baudrate_t baud_translate(int rate) +{ + nrf_uart_baudrate_t baud; + + if (rate < 57600) { + if (rate < 14400) { + if (rate < 2400) { + baud = NRF_UART_BAUDRATE_1200; + } else if (rate < 4800) { + baud = NRF_UART_BAUDRATE_2400; + } else if (rate < 9600) { + baud = NRF_UART_BAUDRATE_4800; + } else { + baud = NRF_UART_BAUDRATE_9600; + } + } else { + if (rate < 19200) { + baud = NRF_UART_BAUDRATE_14400; + } else if (rate < 28800) { + baud = NRF_UART_BAUDRATE_19200; + } else if (rate < 38400) { + baud = NRF_UART_BAUDRATE_28800; + } else { + baud = NRF_UART_BAUDRATE_38400; + } + } + } else { + if (rate < 250000) { + if (rate < 76800) { + baud = NRF_UART_BAUDRATE_57600; + } else if (rate < 115200) { + baud = NRF_UART_BAUDRATE_76800; + } else if (rate < 230400) { + baud = NRF_UART_BAUDRATE_115200; + } else { + baud = NRF_UART_BAUDRATE_230400; + } + } else { + if (rate < 460800) { + baud = NRF_UART_BAUDRATE_250000; + } else if (rate < 921600) { + baud = NRF_UART_BAUDRATE_460800; + } else if (rate < 1000000) { + baud = NRF_UART_BAUDRATE_921600; + } else { + baud = NRF_UART_BAUDRATE_1000000; + } + } + } + return baud; +} + +void serial_baud(serial_t *obj, int baudrate) +{ + (void)obj; + uart_config.baudrate = baud_translate(baudrate); + + // Reconfigure UART peripheral. + nrf_uart_baudrate_set(UART_INSTANCE, uart_config.baudrate); +} + +void uart_event_handler(nrf_drv_uart_event_t *p_event, void *p_context) +{ + (void)p_context; + if (p_event->type == NRF_DRV_UART_EVT_TX_DONE) { + UART_CB.tx_active = false; + if (UART_CB.async_mode) { + if (UART_CB.async_handler) { + UART_CB.event_flags |= SERIAL_EVENT_TX_COMPLETE; + UART_CB.async_handler(); + } + } + else { + if (UART_CB.irqs_enabled & (1 << NRF_DRV_UART_EVT_TX_DONE)) { + if (UART_CB.irq_handler) { + UART_CB.irq_handler(UART_CB.irq_context, TxIrq); + } + } + } + } + if (p_event->type == NRF_DRV_UART_EVT_RX_DONE) { + if (UART_CB.async_mode) { + bool rx_end = true; + if (UART_CB.registered_events & SERIAL_EVENT_RX_CHARACTER_MATCH) { + serial_t *serial = (serial_t *)(uart_config.p_context); + uint8_t *rx_buffer = (uint8_t *)(serial->rx_buff.buffer); + uint8_t last_char = rx_buffer[serial->rx_buff.pos]; + + ++serial->rx_buff.pos; + if (last_char == serial->char_match) { + UART_CB.event_flags |= SERIAL_EVENT_RX_CHARACTER_MATCH; + serial->char_found = 1; + } + else { + if (serial->rx_buff.pos < serial->rx_buff.length) { + rx_end = false; + nrf_drv_uart_rx(&rx_buffer[serial->rx_buff.pos], 1); + } + } + } + + if (rx_end && UART_CB.async_handler) { + UART_CB.rx_active = false; + UART_CB.event_flags |= SERIAL_EVENT_RX_COMPLETE; + UART_CB.async_handler(); + } + } + else { + UART_CB.rx_active = false; + if (UART_CB.irqs_enabled & (1 << NRF_DRV_UART_EVT_RX_DONE)) { + if (UART_CB.irq_handler) { + UART_CB.irq_handler(UART_CB.irq_context, RxIrq); + } + } + } + } + if (p_event->type == NRF_DRV_UART_EVT_ERROR) { + if (UART_CB.async_mode && p_event->data.error.error_mask) { + if (UART_CB.async_handler) { + UART_CB.event_flags |= SERIAL_EVENT_ERROR; + if (p_event->data.error.error_mask & NRF_UART_ERROR_PARITY_MASK) { + UART_CB.event_flags |= SERIAL_EVENT_RX_PARITY_ERROR; + } + if (p_event->data.error.error_mask & NRF_UART_ERROR_FRAMING_MASK) { + UART_CB.event_flags |= SERIAL_EVENT_RX_FRAMING_ERROR; + } + if (p_event->data.error.error_mask & NRF_UART_ERROR_OVERRUN_MASK) { + UART_CB.event_flags |= SERIAL_EVENT_RX_OVERRUN_ERROR; + } + UART_CB.async_handler(); + } + } + } +} + +void serial_init(serial_t *obj, PinName tx, PinName rx) +{ + uart_config.pseltxd = + (tx == NC) ? NRF_UART_PSEL_DISCONNECTED : (uint32_t)tx; + uart_config.pselrxd = + (rx == NC) ? NRF_UART_PSEL_DISCONNECTED : (uint32_t)rx; + uart_config.p_context = (void *)obj; + if (UART_CB.initialized) { + // Reconfigure RX/TX pins only. + nrf_uart_txrx_pins_set(UART_INSTANCE, + uart_config.pseltxd, uart_config.pselrxd); + return; + } + + memset(&UART_CB, 0, sizeof(uart_ctlblock_t)); + ret_code_t err_code = nrf_drv_uart_init(&uart_config, uart_event_handler); + if (err_code == NRF_SUCCESS) { + UART_CB.initialized = true; + nrf_drv_uart_rx_enable(); + + stdio_uart_inited = 1; + memcpy(&stdio_uart, obj, sizeof(serial_t)); + } + else { + error("UART init failure."); + } +} + +void serial_free(serial_t *obj) +{ + (void)obj; + if (UART_CB.initialized) { + nrf_drv_uart_uninit(); + UART_CB.initialized = false; + } +} + +int serial_writable(serial_t *obj) +{ + (void)obj; + if (!UART_CB.async_mode) { + return true; + } + return !UART_CB.tx_active; +} + +int serial_readable(serial_t *obj) +{ + (void)obj; + return nrf_uart_event_check(UART_INSTANCE, NRF_UART_EVENT_RXDRDY); +} + +void serial_putc(serial_t *obj, int c) +{ + (void)obj; + UART_CB.async_mode = false; + UART_CB.tx_active = true; + uint8_t data = c; + nrf_drv_uart_tx(&data, 1); + + while (UART_CB.tx_active) { + } +} + +int serial_getc(serial_t *obj) +{ + (void)obj; + UART_CB.async_mode = false; + UART_CB.rx_active = true; + uint8_t data; + nrf_drv_uart_rx(&data, 1); + + while (UART_CB.rx_active) { + } + return (int)data; +} + +void serial_irq_handler(serial_t *obj, uart_irq_handler handler, uint32_t id) +{ + (void)obj; + UART_CB.irq_handler = handler; + UART_CB.irq_context = id; +} + +void serial_irq_set(serial_t *obj, SerialIrq irq, uint32_t enable) +{ + (void)obj; + if (enable) { + switch (irq) { + case RxIrq: + UART_CB.irqs_enabled |= (1 << NRF_DRV_UART_EVT_RX_DONE); + break; + case TxIrq: + UART_CB.irqs_enabled |= (1 << NRF_DRV_UART_EVT_TX_DONE); + break; + } + } else { + switch (irq) { + case RxIrq: + UART_CB.irqs_enabled &= ~(1 << NRF_DRV_UART_EVT_RX_DONE); + break; + case TxIrq: + UART_CB.irqs_enabled &= ~(1 << NRF_DRV_UART_EVT_TX_DONE); + break; + } + } +} + +#if DEVICE_SERIAL_ASYNCH + +int serial_tx_asynch(serial_t *obj, const void *tx, size_t tx_length, + uint8_t tx_width, uint32_t handler, uint32_t event, + DMAUsage hint) +{ + (void)obj; + (void)tx_width; + (void)hint; + if (UART_CB.tx_active) { + return 0; + } + // TX length is limited to 255 in uart driver. + if (tx_length > 255) { + tx_length = 255; + } + + UART_CB.async_mode = true; + UART_CB.tx_active = true; + UART_CB.registered_events &= ~SERIAL_EVENT_TX_ALL; + UART_CB.registered_events |= event; + UART_CB.async_handler = (void(*)())handler; + if (nrf_drv_uart_tx((uint8_t *)tx, (uint8_t)tx_length) == NRF_SUCCESS) { + return tx_length; + } + return 0; +} + +void serial_rx_asynch(serial_t *obj, void *rx, size_t rx_length, + uint8_t rx_width, uint32_t handler, uint32_t event, + uint8_t char_match, DMAUsage hint) +{ + (void)rx_width; + (void)hint; + if (UART_CB.rx_active || !rx_length) { + return; + } + // RX length is limited to 255 in uart driver. + if (rx_length > 255) { + rx_length = 255; + } + + UART_CB.async_mode = true; + UART_CB.rx_active = true; + if (char_match == SERIAL_RESERVED_CHAR_MATCH) { + event &= ~SERIAL_EVENT_RX_CHARACTER_MATCH; + } + UART_CB.registered_events &= ~SERIAL_EVENT_RX_ALL; + UART_CB.registered_events |= event; + UART_CB.async_handler = (void(*)())handler; + if (event & SERIAL_EVENT_RX_CHARACTER_MATCH) { + obj->char_match = char_match; + obj->rx_buff.buffer = rx; + obj->rx_buff.length = rx_length; + obj->rx_buff.pos = 0; + obj->rx_buff.width = 8; + nrf_drv_uart_rx((uint8_t *)rx, 1); + } else { + nrf_drv_uart_rx((uint8_t *)rx, (uint8_t)rx_length); + } +} + +uint8_t serial_tx_active(serial_t *obj) +{ + (void)obj; + return UART_CB.tx_active; +} + +uint8_t serial_rx_active(serial_t *obj) +{ + (void)obj; + return UART_CB.rx_active; +} + +int serial_irq_handler_asynch(serial_t *obj) +{ + (void)obj; + uint32_t result = UART_CB.registered_events & UART_CB.event_flags; + UART_CB.event_flags &= (~result); + return result; +} + +void serial_tx_abort_asynch(serial_t *obj) +{ + (void)obj; + nrf_drv_uart_tx_abort(); +} + +void serial_rx_abort_asynch(serial_t *obj) +{ + (void)obj; + nrf_drv_uart_rx_abort(); +} + +#endif + +void serial_format(serial_t *obj, + int data_bits, SerialParity parity, int stop_bits) +{ + (void)obj; + (void)data_bits; + (void)stop_bits; + if (parity == ParityNone) { + uart_config.parity = NRF_UART_PARITY_EXCLUDED; + } else { + uart_config.parity = NRF_UART_PARITY_INCLUDED; + } + + // Reconfigure UART peripheral. + nrf_uart_configure(UART_INSTANCE, uart_config.parity, uart_config.hwfc); +} + +void serial_break_set(serial_t *obj) +{ + (void)obj; + nrf_uart_task_trigger(UART_INSTANCE, NRF_UART_TASK_SUSPEND); + nrf_uart_txrx_pins_disconnect(UART_INSTANCE); + nrf_gpio_pin_set(uart_config.pseltxd); + nrf_gpio_pin_clear(uart_config.pseltxd); +} + +void serial_break_clear(serial_t *obj) +{ + (void)obj; + nrf_gpio_pin_set(uart_config.pseltxd); + nrf_uart_txrx_pins_set(UART_INSTANCE, + uart_config.pseltxd, uart_config.pselrxd); + nrf_uart_task_trigger(UART_INSTANCE, NRF_UART_TASK_STARTTX); + nrf_uart_task_trigger(UART_INSTANCE, NRF_UART_TASK_STARTRX); + +} + +void serial_set_flow_control(serial_t *obj, + FlowControl type, PinName rxflow, PinName txflow) +{ + (void)obj; + if (type == FlowControlNone) { + uart_config.hwfc = NRF_UART_HWFC_DISABLED; + rxflow = NC; + txflow = NC; + } else { + uart_config.hwfc = NRF_UART_HWFC_ENABLED; + if (type == FlowControlRTS) { + txflow = NC; + } else if (type == FlowControlCTS) { + rxflow = NC; + } + } + uart_config.pselrts = + (rxflow == NC) ? NRF_UART_PSEL_DISCONNECTED : (uint32_t)rxflow; + uart_config.pselcts = + (txflow == NC) ? NRF_UART_PSEL_DISCONNECTED : (uint32_t)txflow; + + // Reconfigure UART peripheral. + if (uart_config.hwfc == NRF_UART_HWFC_ENABLED) { + nrf_gpio_cfg_input(uart_config.pselcts, NRF_GPIO_PIN_NOPULL); + nrf_gpio_pin_set(uart_config.pselrts); + nrf_gpio_cfg_output(uart_config.pselrts); + nrf_uart_hwfc_pins_set(UART_INSTANCE, + uart_config.pselrts, uart_config.pselcts); + } + nrf_uart_configure(UART_INSTANCE, uart_config.parity, uart_config.hwfc); +} + +void serial_clear(serial_t *obj) +{ + (void)obj; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sleep.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sleep.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sleep.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sleep.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/spi_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/spi_api.c new file mode 100644 index 0000000000..affd19f4e8 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/spi_api.c @@ -0,0 +1,218 @@ +/* mbed Microcontroller Library + * Copyright (c) 2013 Nordic Semiconductor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +//#include + +#include "spi_api.h" +#include "cmsis.h" +#include "pinmap.h" +#include "mbed_assert.h" +#include "mbed_error.h" +#include "nrf_drv_spi.h" +#include "app_util_platform.h" + +#if DEVICE_SPI + +#define SPI_MESSAGE_SIZE 1 +volatile uint8_t m_tx_buf[SPI_MESSAGE_SIZE] = {0}; +volatile uint8_t m_rx_buf[SPI_MESSAGE_SIZE] = {0}; + +static nrf_drv_spi_config_t m_config = NRF_DRV_SPI_DEFAULT_CONFIG(1); +static nrf_drv_spi_t spi1 = NRF_DRV_SPI_INSTANCE(1); + +typedef void (*user_handler_t)(void); +static user_handler_t m_user_handler; +static uint32_t m_event; +static spi_t * m_spi_struct; + +#if DEVICE_SPI_ASYNCH + #define SPI_S(obj) (&obj->spi) + #define SPI_DRV(obj) (obj->spi.p_spi) +#else + #define SPI_S(obj) (obj) + #define SPI_DRV(obj) (obj->p_spi) +#endif + +static void master_event_handler(nrf_drv_spi_evt_t const * event) +{ + if (event->type == NRF_DRV_SPI_EVENT_DONE) { + SPI_S(m_spi_struct)->busy = false; + if (SPI_S(m_spi_struct)->async_mode) { + m_user_handler(); + } + } +} + +void spi_init(spi_t *obj, PinName mosi, PinName miso, PinName sclk) +{ + m_config.sck_pin = sclk; + m_config.mosi_pin = mosi; + m_config.miso_pin = miso; + + SPI_S(obj)->busy = false; + m_spi_struct = obj; + + SPI_DRV(obj) = &spi1; + (void)nrf_drv_spi_init(&spi1, &m_config, master_event_handler); +} + +void spi_free(spi_t *obj) +{ + nrf_drv_spi_uninit(&spi1); +} + +int spi_busy(spi_t *obj) +{ + return (int)(SPI_S(obj)->busy); +} + +static nrf_drv_spi_mode_t mode_translate(int mode) +{ + nrf_drv_spi_mode_t config_mode = NRF_DRV_SPI_MODE_0; + switch (mode) { + case 0: + config_mode = NRF_DRV_SPI_MODE_0; + break; + case 1: + config_mode = NRF_DRV_SPI_MODE_1; + break; + case 2: + config_mode = NRF_DRV_SPI_MODE_2; + break; + case 3: + config_mode = NRF_DRV_SPI_MODE_3; + break; + default: + error("SPI format error"); + break; + } + return config_mode; +} + +static nrf_drv_spi_frequency_t freq_translate(int hz) +{ + nrf_drv_spi_frequency_t frequency; + if (hz<250000) { //125Kbps + frequency = NRF_DRV_SPI_FREQ_125K; + } else if (hz<500000) { //250Kbps + frequency = NRF_DRV_SPI_FREQ_250K; + } else if (hz<1000000) { //500Kbps + frequency = NRF_DRV_SPI_FREQ_500K; + } else if (hz<2000000) { //1Mbps + frequency = NRF_DRV_SPI_FREQ_1M; + } else if (hz<4000000) { //2Mbps + frequency = NRF_DRV_SPI_FREQ_2M; + } else if (hz<8000000) { //4Mbps + frequency = NRF_DRV_SPI_FREQ_4M; + } else { //8Mbps + frequency = NRF_DRV_SPI_FREQ_8M; + } + return frequency; +} + +void spi_format(spi_t *obj, int bits, int mode, spi_bitorder_t order) +{ + if (bits != 8) { + error("Only 8bits SPI supported"); + } + + m_config.bit_order = ((order == SPI_MSB) ? NRF_DRV_SPI_BIT_ORDER_MSB_FIRST : NRF_DRV_SPI_BIT_ORDER_LSB_FIRST); + nrf_drv_spi_mode_t config_mode = mode_translate(mode); + + if (m_config.mode != config_mode) { + nrf_drv_spi_uninit(&spi1); + m_config.mode = config_mode; + (void)nrf_drv_spi_init(&spi1, &m_config, master_event_handler); + } + +} + +void spi_frequency(spi_t *obj, int hz) +{ + nrf_drv_spi_frequency_t frequency = freq_translate(hz); + + if (frequency != m_config.frequency) { + nrf_drv_spi_uninit(&spi1); + m_config.frequency = frequency; + (void)nrf_drv_spi_init(&spi1, &m_config, master_event_handler); + } +} + +int spi_master_write(spi_t *obj, int value) +{ + while (SPI_S(obj)->busy); + m_tx_buf[0] = value; + SPI_S(obj)->async_mode = false; + SPI_S(obj)->busy = true; + + (void)nrf_drv_spi_transfer(SPI_DRV(obj), (uint8_t const *) m_tx_buf, 1, + (uint8_t *) m_rx_buf, 1); + + while (SPI_S(obj)->busy); + return m_rx_buf[0]; +} + +int spi_slave_receive(spi_t *obj) +{ + return 0; +} + +int spi_slave_read(spi_t *obj) +{ + return 0; +} + +void spi_slave_write(spi_t *obj, int value) +{ + (void) obj; + (void) value; +} + +#if DEVICE_SPI_ASYNCH + + +void spi_master_transfer(spi_t *obj, + void *tx, size_t tx_length, + void *rx, size_t rx_length, + uint32_t handler, + uint32_t event, + DMAUsage hint) +{ + m_user_handler = (user_handler_t)handler; + m_event = event; + + SPI_S(obj)->async_mode = true; + SPI_S(obj)->busy = true; + (void)nrf_drv_spi_transfer(SPI_DRV(obj), (uint8_t const *) tx, tx_length, + (uint8_t *) rx, rx_length); +} + +uint32_t spi_irq_handler_asynch(spi_t *obj) +{ + return m_event & SPI_EVENT_COMPLETE; +} + +uint8_t spi_active(spi_t *obj) +{ + return SPI_S(obj)->busy; +} + +void spi_abort_asynch(spi_t *obj) +{ + nrf_drv_spi_abort(SPI_DRV(obj)); +} +#endif + +#endif // DEVICE_SPI diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c new file mode 100644 index 0000000000..b35670ceae --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c @@ -0,0 +1,145 @@ +/* mbed Microcontroller Library + * Copyright (c) 2013 Nordic Semiconductor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "us_ticker_api.h" +#include "rtc_common.h" +#include "app_util.h" + + +//------------------------------------------------------------------------------ +// Common stuff used also by lp_ticker and rtc_api (see "rtc_common.h"). +// +#include "nrf_drv_clock.h" +#include "app_util_platform.h" + +nrf_drv_rtc_t const m_rtc_common = NRF_DRV_RTC_INSTANCE(1); +bool m_rtc_common_enabled = false; +uint32_t volatile m_rtc_common_overflows = 0; + +static void irq_handler(nrf_drv_rtc_int_type_t int_type) +{ + if (int_type == (NRF_DRV_RTC_INT_COMPARE0 + US_TICKER_CC_CHANNEL)) { + us_ticker_irq_handler(); + } + else if (int_type == NRF_DRV_RTC_INT_OVERFLOW) { + ++m_rtc_common_overflows; + } +} + +void rtc_common_init(void) +{ + if (m_rtc_common_enabled) { + return; + } + + (void)nrf_drv_clock_init(); + // RTC is driven by the low frequency (32.768 kHz) clock, a proper request + // must be made to have it running. + nrf_drv_clock_lfclk_request(NULL); + + nrf_drv_rtc_config_t const config = { + .prescaler = 0, // no prescaling + .interrupt_priority = APP_IRQ_PRIORITY_LOW, + .reliable = false + }; + if (nrf_drv_rtc_init(&m_rtc_common, &config, irq_handler) != NRF_SUCCESS) { + MBED_ASSERT(false); // initialization failed + return; + } + nrf_drv_rtc_overflow_enable(&m_rtc_common, true); + + nrf_drv_rtc_enable(&m_rtc_common); + m_rtc_common_enabled = true; +} + +uint32_t rtc_common_32bit_ticks_get(void) +{ + uint32_t ticks = nrf_drv_rtc_counter_get(&m_rtc_common); + // The counter used for time measurements is less than 32 bit wide, + // so its value is complemented with the number of registered overflows + // of the counter. + ticks += (m_rtc_common_overflows << RTC_COUNTER_BITS); + return ticks; +} +//------------------------------------------------------------------------------ + + +void us_ticker_init(void) +{ + rtc_common_init(); +} + +static uint64_t us_ticker_64bit_get(void) +{ + uint32_t ticks = rtc_common_32bit_ticks_get(); + // [ticks -> microseconds] + return ROUNDED_DIV(((uint64_t)ticks) * 1000000, RTC_INPUT_FREQ); +} + +uint32_t us_ticker_read() +{ + return (uint32_t)us_ticker_64bit_get(); +} + +void us_ticker_set_interrupt(timestamp_t timestamp) +{ + // The internal counter is clocked with a frequency that cannot be easily + // multiplied to 1 MHz, therefore besides the translation of values + // (microsecond <-> ticks) a special care of overflows handling must be + // taken. Here the 32-bit timestamp value is complemented with information + // about current the system up time of (ticks + number of overflows of tick + // counter on upper bits, converted to microseconds), and such 64-bit value + // is then translated to counter ticks. Finally, the lower 24 bits of thus + // calculated value is written to the counter compare register to prepare + // the interrupt generation. + uint64_t current_time64 = us_ticker_64bit_get(); + // [add upper 32 bits from the current time to the timestamp value] + uint64_t timestamp64 = timestamp + (current_time64 & ~(uint64_t)0xFFFFFFFF); + // [if the original timestamp value happens to be after the 32 bit counter + // of microsends overflows, correct the upper 32 bits accordingly] + if (timestamp < (uint32_t)(current_time64 & 0xFFFFFFFF)) { + timestamp64 += ((uint64_t)1 << 32); + } + // [microseconds -> ticks, always round the result up to avoid too early + // interrupt generation] + uint32_t compare_value = + (uint32_t)CEIL_DIV((timestamp64) * RTC_INPUT_FREQ, 1000000); + + // The COMPARE event occurs when the value in compare register is N and + // the counter value changes from N-1 to N. Therefore, the minimal safe + // difference between the compare value to be set and the current counter + // value is 2 ticks. This guarantees that the compare trigger is properly + // setup before the compare condition occurs. + uint32_t closest_safe_compare = rtc_common_32bit_ticks_get() + 2; + if ((int)(compare_value - closest_safe_compare) <= 0) { + compare_value = closest_safe_compare; + } + ret_code_t result = nrf_drv_rtc_cc_set(&m_rtc_common, US_TICKER_CC_CHANNEL, + compare_value, true); + if (result != NRF_SUCCESS) { + MBED_ASSERT(false); + } +} + +void us_ticker_disable_interrupt(void) +{ + nrf_drv_rtc_cc_disable(&m_rtc_common, US_TICKER_CC_CHANNEL); +} + +void us_ticker_clear_interrupt(void) +{ + // No implementation needed. Interrupt flags are cleared by IRQ handler + // in 'nrf_drv_rtc'. +} From 082fd409cec3071f4d508dca6774a7e1a7e319cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C5=82=C4=85bek=2C=20Andrzej?= Date: Wed, 15 Jun 2016 21:43:38 +0100 Subject: [PATCH 11/67] Added LF clock starting code to SysInit. --- .../TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c | 10 ++++++++++ .../TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.c | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c index 3414e5b38d..165b67f431 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c @@ -94,6 +94,16 @@ void SystemInit(void) } *(uint32_t volatile *)0x4006EC14 = 0xC0; } + + // Start the external 32khz crystal oscillator. + NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << 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. + } } diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.c b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.c index 72e067cad7..4b101c519a 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.c +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.c @@ -187,6 +187,16 @@ void SystemInit(void) #endif SystemCoreClockUpdate(); + + // Start the external 32khz crystal oscillator. + NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << 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. + } } From 52b9563e5634808f6d54334876a51293ace1e0e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C5=82=C4=85bek=2C=20Andrzej?= Date: Thu, 16 Jun 2016 12:09:24 +0100 Subject: [PATCH 12/67] Added modifications in SDK drivers needed for mbed HAL implementation. --- .../sdk/drivers_nrf/spi_master/nrf_drv_spi.c | 51 +++++++++++++++---- .../sdk/drivers_nrf/spi_master/nrf_drv_spi.h | 3 ++ .../sdk/drivers_nrf/twi_master/nrf_drv_twi.c | 6 +++ .../sdk/drivers_nrf/twi_master/nrf_drv_twi.h | 10 ++++ 4 files changed, 61 insertions(+), 9 deletions(-) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.c index 61f8527616..0ff45aaa40 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.c @@ -80,6 +80,7 @@ typedef struct bool tx_done : 1; bool rx_done : 1; + bool abort : 1; } spi_control_block_t; static spi_control_block_t m_cb[SPI_COUNT]; @@ -202,7 +203,7 @@ ret_code_t nrf_drv_spi_init(nrf_drv_spi_t const * const p_instance, CODE_FOR_SPIM ( - NRF_SPIM_Type * p_spim = p_instance->p_registers; + NRF_SPIM_Type * p_spim = (NRF_SPIM_Type * ) p_instance->p_registers; nrf_spim_pins_set(p_spim, p_config->sck_pin, mosi_pin, miso_pin); nrf_spim_frequency_set(p_spim, (nrf_spim_frequency_t)p_config->frequency); @@ -221,7 +222,7 @@ ret_code_t nrf_drv_spi_init(nrf_drv_spi_t const * const p_instance, ) CODE_FOR_SPI ( - NRF_SPI_Type * p_spi = p_instance->p_registers; + NRF_SPI_Type * p_spi = (NRF_SPI_Type * ) p_instance->p_registers; nrf_spi_pins_set(p_spi, p_config->sck_pin, mosi_pin, miso_pin); nrf_spi_frequency_set(p_spi, (nrf_spi_frequency_t)p_config->frequency); @@ -264,7 +265,7 @@ void nrf_drv_spi_uninit(nrf_drv_spi_t const * const p_instance) CODE_FOR_SPIM ( - NRF_SPIM_Type * p_spim = p_instance->p_registers; + NRF_SPIM_Type * p_spim = (NRF_SPIM_Type * ) p_instance->p_registers; if (p_cb->handler) { nrf_spim_int_disable(p_spim, DISABLE_ALL); @@ -280,7 +281,7 @@ void nrf_drv_spi_uninit(nrf_drv_spi_t const * const p_instance) ) CODE_FOR_SPI ( - NRF_SPI_Type * p_spi = p_instance->p_registers; + NRF_SPI_Type * p_spi = (NRF_SPI_Type * ) p_instance->p_registers; if (p_cb->handler) { nrf_spi_int_disable(p_spi, DISABLE_ALL); @@ -352,6 +353,19 @@ static bool transfer_byte(NRF_SPI_Type * p_spi, spi_control_block_t * p_cb) // see how the transfer is started in the 'nrf_drv_spi_transfer' // function. uint16_t bytes_used = p_cb->bytes_transferred + 1; + + if (p_cb->abort) + { + if (bytes_used < p_cb->evt.data.done.tx_length) + { + p_cb->evt.data.done.tx_length = bytes_used; + } + if (bytes_used < p_cb->evt.data.done.rx_length) + { + p_cb->evt.data.done.rx_length = bytes_used; + } + } + if (bytes_used < p_cb->evt.data.done.tx_length) { nrf_spi_txd_set(p_spi, p_cb->evt.data.done.p_tx_buffer[bytes_used]); @@ -371,8 +385,8 @@ static void spi_xfer(NRF_SPI_Type * p_spi, spi_control_block_t * p_cb, nrf_drv_spi_xfer_desc_t const * p_xfer_desc) { - p_cb->bytes_transferred = 0; nrf_spi_int_disable(p_spi, NRF_SPI_INT_READY_MASK); + p_cb->bytes_transferred = 0; nrf_spi_event_clear(p_spi, NRF_SPI_EVENT_READY); @@ -516,8 +530,8 @@ ret_code_t nrf_drv_spi_xfer(nrf_drv_spi_t const * const p_instance, { spi_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; ASSERT(p_cb->state != NRF_DRV_STATE_UNINITIALIZED); - ASSERT(p_tx_buffer != NULL || tx_buffer_length == 0); - ASSERT(p_rx_buffer != NULL || rx_buffer_length == 0); + ASSERT(p_xfer_desc->p_tx_buffer != NULL || p_xfer_desc->tx_length == 0); + ASSERT(p_xfer_desc->p_rx_buffer != NULL || p_xfer_desc->rx_length == 0); if (p_cb->transfer_in_progress) { @@ -534,6 +548,7 @@ ret_code_t nrf_drv_spi_xfer(nrf_drv_spi_t const * const p_instance, p_cb->evt.data.done = *p_xfer_desc; p_cb->tx_done = false; p_cb->rx_done = false; + p_cb->abort = false; if (p_cb->ss_pin != NRF_DRV_SPI_PIN_NOT_USED) { @@ -541,7 +556,7 @@ ret_code_t nrf_drv_spi_xfer(nrf_drv_spi_t const * const p_instance, } CODE_FOR_SPIM ( - return spim_xfer(p_instance->p_registers, p_cb, p_xfer_desc, flags); + return spim_xfer((NRF_SPIM_Type * ) p_instance->p_registers, p_cb, p_xfer_desc, flags); ) CODE_FOR_SPI ( @@ -550,10 +565,28 @@ ret_code_t nrf_drv_spi_xfer(nrf_drv_spi_t const * const p_instance, p_cb->transfer_in_progress = false; return NRF_ERROR_NOT_SUPPORTED; } - spi_xfer(p_instance->p_registers, p_cb, p_xfer_desc); + spi_xfer((NRF_SPI_Type * ) p_instance->p_registers, p_cb, p_xfer_desc); return NRF_SUCCESS; ) } + +void nrf_drv_spi_abort(nrf_drv_spi_t const * p_instance) +{ + spi_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; + ASSERT(p_cb->state != NRF_DRV_STATE_UNINITIALIZED); + + CODE_FOR_SPIM + ( + nrf_spim_task_trigger(p_spim, NRF_SPIM_TASK_STOP); + while (!nrf_spim_event_check(p_spim, NRF_SPIM_EVENT_STOPPED)) {} + p_cb->transfer_in_progress = false; + ) + CODE_FOR_SPI + ( + p_cb->abort = true; + ) +} + #ifdef SPIM_IN_USE static void irq_handler_spim(NRF_SPIM_Type * p_spim, spi_control_block_t * p_cb) { diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.h index aa63a3a728..15dfdfd6e7 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.h @@ -363,6 +363,9 @@ uint32_t nrf_drv_spi_start_task_get(nrf_drv_spi_t const * p_instance); * @return END event address. */ uint32_t nrf_drv_spi_end_event_get(nrf_drv_spi_t const * p_instance); + +void nrf_drv_spi_abort(nrf_drv_spi_t const * p_instance); + #endif // NRF_DRV_SPI_H__ /** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.c index 709fac5fb7..60a5b4ec16 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.c @@ -737,6 +737,12 @@ ret_code_t nrf_drv_twi_xfer(nrf_drv_twi_t const * p_instance, return ret; } +bool nrf_drv_twi_is_busy(nrf_drv_twi_t const * p_instance) +{ + twi_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; + return p_cb->busy; +} + ret_code_t nrf_drv_twi_tx(nrf_drv_twi_t const * p_instance, uint8_t address, uint8_t const * p_data, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.h index ee3b70c188..0825a288ca 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.h @@ -342,6 +342,16 @@ ret_code_t nrf_drv_twi_xfer(nrf_drv_twi_t const * p_instance, nrf_drv_twi_xfer_desc_t const * p_xfer_desc, uint32_t flags); +/** + * @brief Function for checking the TWI driver state. + * + * @param[in] p_instance TWI instance. + * + * @retval true If the TWI driver is currently busy performing a transfer. + * @retval false If the TWI driver is ready for a new transfer. + */ +bool nrf_drv_twi_is_busy(nrf_drv_twi_t const * p_instance); + /** * @brief Function for getting the transferred data count. * From 4fcffd40b15c566a4e4212b6ae5d2b9d427ef4e2 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Thu, 16 Jun 2016 16:42:51 +0100 Subject: [PATCH 13/67] fix pwm hal implemenation for nRF51. PwmOut::pwm renamed to PwmOut::pwm_name --- hal/targets.json | 2 +- .../TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hal/targets.json b/hal/targets.json index 670543d345..a8a42e1f4b 100644 --- a/hal/targets.json +++ b/hal/targets.json @@ -1388,7 +1388,7 @@ "supported_form_factors": ["ARDUINO"], "inherits": ["MCU_NRF51_32K"], "progen": {"target": "nrf51-dk"}, - "device_has": ["ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "SERIAL", "RTC", "SERIAL_ASYNCH", "SLEEP"] + "device_has": ["ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "RTC", "SERIAL_ASYNCH", "SLEEP"] }, "NRF51_DK_BOOT": { "supported_form_factors": ["ARDUINO"], diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c index 063b94d37b..a703c85fdb 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c @@ -138,7 +138,7 @@ void pwmout_init(pwmout_t *obj, PinName pin) void pwmout_free(pwmout_t *obj) { - MBED_ASSERT(obj->pwm != (PWMName)NC); + MBED_ASSERT(obj->pwm_name != (PWMName)NC); MBED_ASSERT(obj->pwm_channel < PWM_CHANNELS_PER_INSTANCE); pwm_t * pwm = (pwm_t *) obj->pwm_struct; From 441a66530278643804f49fab8d3cb4c788f2323d Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Thu, 16 Jun 2016 18:53:39 +0100 Subject: [PATCH 14/67] fix implemet pwm_write --- .../TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c index a703c85fdb..2b4d27f3c6 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c @@ -160,7 +160,8 @@ void pwmout_write(pwmout_t *obj, float value) if (value > 1.0f) { value = 1.0f; } - uint16_t ticks = (uint16_t)((float)app_pwm_cycle_ticks_get(pwm->instance) * value); + + app_pwm_channel_duty_set(pwm->instance, obj->pwm_channel, (app_pwm_duty_t)(value * 100.0f) ); } float pwmout_read(pwmout_t *obj) From c8dc17aa4f3207c2d81ca455452d080929567a9e Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Fri, 17 Jun 2016 11:00:24 +0100 Subject: [PATCH 15/67] Import radio notification from the nordic SDK (required y BLE implementation). --- .../ble_radio_notification.c | 81 +++++++++++++++++++ .../ble_radio_notification.h | 67 +++++++++++++++ 2 files changed, 148 insertions(+) create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.c new file mode 100644 index 0000000000..cb719aec98 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.c @@ -0,0 +1,81 @@ +/* + * 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_radio_notification.h" +#include +#include "nrf_nvic.h" + + +static bool m_radio_active = false; /**< Current radio state. */ +static ble_radio_notification_evt_handler_t m_evt_handler = NULL; /**< Application event handler for handling Radio Notification events. */ + + +void SWI1_IRQHandler(void) +{ + m_radio_active = !m_radio_active; + if (m_evt_handler != NULL) + { + m_evt_handler(m_radio_active); + } +} + + +uint32_t ble_radio_notification_init(uint32_t irq_priority, + uint8_t distance, + ble_radio_notification_evt_handler_t evt_handler) +{ + uint32_t err_code; + + m_evt_handler = evt_handler; + + // Initialize Radio Notification software interrupt + err_code = sd_nvic_ClearPendingIRQ(SWI1_IRQn); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + err_code = sd_nvic_SetPriority(SWI1_IRQn, irq_priority); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + err_code = sd_nvic_EnableIRQ(SWI1_IRQn); + if (err_code != NRF_SUCCESS) + { + return err_code; + } + + // Configure the event + return sd_radio_notification_cfg_set(NRF_RADIO_NOTIFICATION_TYPE_INT_ON_BOTH, distance); +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.h new file mode 100644 index 0000000000..3849d183c5 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.h @@ -0,0 +1,67 @@ +/* + * 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. + * + */ + +/** @file + * + * @defgroup ble_radio_notification Radio Notification Event Handler + * @{ + * @ingroup ble_sdk_lib + * @brief Module for propagating Radio Notification events to the application. + */ + +#ifndef BLE_RADIO_NOTIFICATION_H__ +#define BLE_RADIO_NOTIFICATION_H__ + +#include +#include +#include "nrf_soc.h" + + +/**@brief Application radio notification event handler type. */ +typedef void (*ble_radio_notification_evt_handler_t) (bool radio_active); + +/**@brief Function for initializing the Radio Notification module. + * + * @param[in] irq_priority Interrupt priority for the Radio Notification interrupt handler. + * @param[in] distance The time from an Active event until the radio is activated. + * @param[in] evt_handler Handler to be executed when a radio notification event has been + * received. + * + * @return NRF_SUCCESS on successful initialization, otherwise an error code. + */ +uint32_t ble_radio_notification_init(uint32_t irq_priority, + uint8_t distance, + ble_radio_notification_evt_handler_t evt_handler); + +#endif // BLE_RADIO_NOTIFICATION_H__ + +/** @} */ From 7ad0af3265a163c37b9a8e36939383b2b21dc43a Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Fri, 17 Jun 2016 11:02:37 +0100 Subject: [PATCH 16/67] Enable BLE feature on NRF51 and nrf52. Update softdevice references. Add BLE and softdevice related macros. Add specific macros for NRF52_DK. --- hal/targets.json | 64 ++++++++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 27 deletions(-) diff --git a/hal/targets.json b/hal/targets.json index 4beaec92bc..e140916c4e 100644 --- a/hal/targets.json +++ b/hal/targets.json @@ -1100,7 +1100,14 @@ "inherits": ["Target"], "core": "Cortex-M0", "OVERRIDE_BOOTLOADER_FILENAME": "nrf51822_bootloader.hex", - "macros": ["NRF51", "TARGET_NRF51822"], + "macros": [ + "NRF51", + "TARGET_NRF51822", + "BLE_STACK_SUPPORT_REQD", + "SOFTDEVICE_PRESENT", + "S130", + "BLE_STACK_SUPPORT_REQD" + ], "MERGE_BOOTLOADER": false, "extra_labels": ["NORDIC", "MCU_NRF51", "MCU_NRF51822", "NRF5"], "OUTPUT_EXT": "hex", @@ -1110,29 +1117,9 @@ "MERGE_SOFT_DEVICE": true, "EXPECTED_SOFTDEVICES_WITH_OFFSETS": [ { - "boot": "s130_nrf51_1.0.0_bootloader.hex", - "name": "s130_nrf51_1.0.0_softdevice.hex", - "offset": 114688 - }, - { - "boot": "s110_nrf51822_8.0.0_bootloader.hex", - "name": "s110_nrf51822_8.0.0_softdevice.hex", - "offset": 98304 - }, - { - "boot": "s110_nrf51822_7.1.0_bootloader.hex", - "name": "s110_nrf51822_7.1.0_softdevice.hex", - "offset": 90112 - }, - { - "boot": "s110_nrf51822_7.0.0_bootloader.hex", - "name": "s110_nrf51822_7.0.0_softdevice.hex", - "offset": 90112 - }, - { - "boot": "s110_nrf51822_6.0.0_bootloader.hex", - "name": "s110_nrf51822_6.0.0_softdevice.hex", - "offset": 81920 + "boot": "", + "name": "s130_nrf51_2.0.0_softdevice.hex", + "offset": 110592 } ], "detect_code": ["1070"], @@ -1140,7 +1127,8 @@ "function": "MCU_NRF51Code.binary_hook", "toolchains": ["ARM_STD", "GCC_ARM"] }, - "program_cycle_s": 6 + "program_cycle_s": 6, + "features": ["BLE"] }, "MCU_NRF51_16K_BASE": { "inherits": ["MCU_NRF51"], @@ -1738,7 +1726,7 @@ "MCU_NRF52": { "inherits": ["Target"], "core": "Cortex-M4F", - "macros": ["NRF52", "TARGET_NRF52832"], + "macros": ["NRF52", "TARGET_NRF52832", "BLE_STACK_SUPPORT_REQD", "SOFTDEVICE_PRESENT"], "extra_labels": ["NORDIC", "MCU_NRF52", "MCU_NRF52832", "NRF5"], "OUTPUT_EXT": "hex", "is_disk_virtual": true, @@ -1758,12 +1746,34 @@ "function": "MCU_NRF51Code.binary_hook", "toolchains": ["ARM_STD", "GCC_ARM"] }, - "MERGE_BOOTLOADER": false + "MERGE_BOOTLOADER": false, + "features": ["BLE"] }, "NRF52_DK": { "supported_form_factors": ["ARDUINO"], "inherits": ["MCU_NRF52"], "progen": {"target": "nrf52-dk"}, + "macros_add": [ + "BOARD_PCA10040", + "NRF52_PAN_12", + "NRF52_PAN_15", + "NRF52_PAN_58", + "NRF52_PAN_55", + "NRF52_PAN_54", + "NRF52_PAN_31", + "NRF52_PAN_30", + "NRF52_PAN_51", + "NRF52_PAN_36", + "NRF52_PAN_53", + "S132", + "CONFIG_GPIO_AS_PINRESET", + "BLE_STACK_SUPPORT_REQD", + "SWI_DISABLE0", + "NRF52_PAN_20", + "NRF52_PAN_64", + "NRF52_PAN_62", + "NRF52_PAN_63" + ], "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"] } } From 1b826f286b7b60ba5c02ac23c64ea4b8a61b2f27 Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Fri, 17 Jun 2016 11:13:23 +0100 Subject: [PATCH 17/67] Namespace softdevice headers to avoid conflict wih other headers. --- .../s130/headers/{ble.h => nrf_ble.h} | 20 ++--- .../s130/headers/{ble_err.h => nrf_ble_err.h} | 0 .../softdevice/s130/headers/nrf_ble_gap.h} | 22 ++--- .../softdevice/s130/headers/nrf_ble_gatt.h} | 28 +++---- .../softdevice/s130/headers/nrf_ble_gattc.h} | 80 +++++++++---------- .../headers/{ble_gatts.h => nrf_ble_gatts.h} | 16 ++-- .../s130/headers/{ble_hci.h => nrf_ble_hci.h} | 26 +++--- .../softdevice/s130/headers/nrf_ble_l2cap.h} | 12 +-- .../softdevice/s130/headers/nrf_ble_ranges.h} | 24 +++--- .../softdevice/s130/headers/nrf_ble_types.h} | 26 +++--- .../s132/headers/{ble.h => nrf_ble.h} | 20 ++--- .../s132/headers/{ble_err.h => nrf_ble_err.h} | 0 .../softdevice/s132/headers/nrf_ble_gap.h} | 22 ++--- .../softdevice/s132/headers/nrf_ble_gatt.h} | 28 +++---- .../softdevice/s132/headers/nrf_ble_gattc.h} | 80 +++++++++---------- .../headers/{ble_gatts.h => nrf_ble_gatts.h} | 16 ++-- .../s132/headers/{ble_hci.h => nrf_ble_hci.h} | 26 +++--- .../softdevice/s132/headers/nrf_ble_l2cap.h} | 12 +-- .../softdevice/s132/headers/nrf_ble_ranges.h} | 24 +++--- .../softdevice/s132/headers/nrf_ble_types.h} | 26 +++--- .../sdk/ble/ble_advertising/ble_advertising.h | 10 +-- .../ble/ble_db_discovery/ble_db_discovery.c | 26 +++--- .../ble/ble_db_discovery/ble_db_discovery.h | 34 ++++---- .../TARGET_NRF5/sdk/ble/ble_racp/ble_racp.h | 7 +- .../sdk/ble/ble_services/ble_dfu/ble_dfu.c | 8 +- .../sdk/ble/ble_services/ble_dfu/ble_dfu.h | 6 +- .../TARGET_NRF5/sdk/ble/common/ble_advdata.c | 22 ++--- .../TARGET_NRF5/sdk/ble/common/ble_advdata.h | 2 +- .../sdk/ble/common/ble_conn_params.c | 4 +- .../sdk/ble/common/ble_conn_params.h | 6 +- .../sdk/ble/common/ble_conn_state.c | 2 +- .../sdk/ble/common/ble_conn_state.h | 2 +- .../TARGET_NRF5/sdk/ble/common/ble_gatt_db.h | 10 +-- .../sdk/ble/common/ble_srv_common.c | 4 +- .../sdk/ble/common/ble_srv_common.h | 14 ++-- .../sdk/ble/device_manager/device_manager.h | 29 ++++--- .../device_manager_peripheral.c | 48 +++++------ .../sdk/ble/peer_manager/gatt_cache_manager.c | 2 +- .../sdk/ble/peer_manager/gatt_cache_manager.h | 6 +- .../ble/peer_manager/gattc_cache_manager.c | 2 +- .../ble/peer_manager/gattc_cache_manager.h | 8 +- .../ble/peer_manager/gatts_cache_manager.c | 2 +- .../ble/peer_manager/gatts_cache_manager.h | 6 +- .../sdk/ble/peer_manager/id_manager.c | 2 +- .../sdk/ble/peer_manager/id_manager.h | 36 ++++++++- .../sdk/ble/peer_manager/peer_data_storage.h | 2 +- .../sdk/ble/peer_manager/peer_id.h | 4 +- .../sdk/ble/peer_manager/peer_manager.h | 4 +- .../ble/peer_manager/peer_manager_internal.h | 4 +- .../sdk/ble/peer_manager/peer_manager_types.h | 4 +- .../ble/peer_manager/security_dispatcher.c | 5 +- .../ble/peer_manager/security_dispatcher.h | 6 +- .../sdk/ble/peer_manager/security_manager.h | 4 +- .../bootloader_dfu/dfu_app_handler.c | 8 +- .../libraries/bootloader_dfu/dfu_ble_svc.h | 24 +++--- .../sdk/libraries/util/app_error.c | 2 + .../ble_stack_handler_types.h | 2 +- .../softdevice_handler/softdevice_handler.c | 4 +- .../softdevice_handler/softdevice_handler.h | 6 +- 59 files changed, 458 insertions(+), 427 deletions(-) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/{ble.h => nrf_ble.h} (99%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/{ble_err.h => nrf_ble_err.h} (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gap.h => TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gap.h} (99%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gatt.h => TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gatt.h} (98%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gattc.h => TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gattc.h} (98%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/{ble_gatts.h => nrf_ble_gatts.h} (99%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/{ble_hci.h => nrf_ble_hci.h} (97%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_l2cap.h => TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_l2cap.h} (97%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_ranges.h => TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_ranges.h} (97%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_types.h => TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_types.h} (99%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/{ble.h => nrf_ble.h} (99%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/{ble_err.h => nrf_ble_err.h} (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gap.h => TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gap.h} (99%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gatt.h => TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gatt.h} (98%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gattc.h => TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gattc.h} (98%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/{ble_gatts.h => nrf_ble_gatts.h} (99%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/{ble_hci.h => nrf_ble_hci.h} (97%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_l2cap.h => TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_l2cap.h} (97%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_ranges.h => TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_ranges.h} (97%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_types.h => TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_types.h} (99%) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble.h similarity index 99% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble.h index 593be948e0..3449a01bdb 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble.h @@ -44,16 +44,16 @@ */ -#ifndef BLE_H__ -#define BLE_H__ +#ifndef NRF_BLE_H__ +#define NRF_BLE_H__ -#include "ble_ranges.h" -#include "ble_types.h" -#include "ble_gap.h" -#include "ble_l2cap.h" -#include "ble_gatt.h" -#include "ble_gattc.h" -#include "ble_gatts.h" +#include "nrf_ble_ranges.h" +#include "nrf_ble_types.h" +#include "nrf_ble_gap.h" +#include "nrf_ble_l2cap.h" +#include "nrf_ble_gatt.h" +#include "nrf_ble_gattc.h" +#include "nrf_ble_gatts.h" #ifdef __cplusplus extern "C" { @@ -624,7 +624,7 @@ SVCALL(SD_BLE_OPT_GET, uint32_t, sd_ble_opt_get(uint32_t opt_id, ble_opt_t *p_op #ifdef __cplusplus } #endif -#endif /* BLE_H__ */ +#endif /* NRF_BLE_H__ */ /** @} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_err.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_err.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_err.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_err.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gap.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gap.h similarity index 99% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gap.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gap.h index ad0fd304db..c34ea5c126 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gap.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gap.h @@ -40,11 +40,11 @@ @brief Definitions and prototypes for the GAP interface. */ -#ifndef BLE_GAP_H__ -#define BLE_GAP_H__ +#ifndef NRF_BLE_GAP_H__ +#define NRF_BLE_GAP_H__ -#include "ble_types.h" -#include "ble_ranges.h" +#include "nrf_ble_types.h" +#include "nrf_ble_ranges.h" #include "nrf_svc.h" #ifdef __cplusplus @@ -659,8 +659,8 @@ typedef struct typedef struct { uint8_t passkey[BLE_GAP_PASSKEY_LEN]; /**< 6-digit passkey in ASCII ('0'-'9' digits only). */ - uint8_t match_request : 1; /**< If 1 requires the application to report the match using @ref sd_ble_gap_auth_key_reply - with either @ref BLE_GAP_AUTH_KEY_TYPE_NONE if there is no match or + uint8_t match_request : 1; /**< If 1 requires the application to report the match using @ref sd_ble_gap_auth_key_reply + with either @ref BLE_GAP_AUTH_KEY_TYPE_NONE if there is no match or @ref BLE_GAP_AUTH_KEY_TYPE_PASSKEY if there is a match. */ } ble_gap_evt_passkey_display_t; @@ -680,7 +680,7 @@ typedef struct /**@brief Event structure for @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST. */ typedef struct { - ble_gap_lesc_p256_pk_t *p_pk_peer; /**< LE Secure Connections remote P-256 Public Key. This will point to the application-supplied memory + ble_gap_lesc_p256_pk_t *p_pk_peer; /**< LE Secure Connections remote P-256 Public Key. This will point to the application-supplied memory inside the keyset during the call to @ref sd_ble_gap_sec_params_reply. */ uint8_t oobd_req :1; /**< LESC OOB data required. A call to @ref sd_ble_gap_lesc_oob_data_set is required to complete the procedure. */ } ble_gap_evt_lesc_dhkey_request_t; @@ -720,7 +720,7 @@ typedef struct ble_gap_enc_key_t *p_enc_key; /**< Encryption Key, or NULL. */ ble_gap_id_key_t *p_id_key; /**< Identity Key, or NULL. */ ble_gap_sign_info_t *p_sign_key; /**< Signing Key, or NULL. */ - ble_gap_lesc_p256_pk_t *p_pk; /**< LE Secure Connections P-256 Public Key. When in debug mode the application must use the value defined + ble_gap_lesc_p256_pk_t *p_pk; /**< LE Secure Connections P-256 Public Key. When in debug mode the application must use the value defined in the Core Bluetooth Specification v4.2 Vol.3, Part H, Section 2.3.5.6.1 */ } ble_gap_sec_keys_t; @@ -1367,8 +1367,8 @@ SVCALL(SD_BLE_GAP_AUTHENTICATE, uint32_t, sd_ble_gap_authenticate(uint16_t conn_ * @param[in] sec_status Security status, see @ref BLE_GAP_SEC_STATUS. * @param[in] p_sec_params Pointer to a @ref ble_gap_sec_params_t security parameters structure. In the central role this must be set to NULL, as the parameters have * already been provided during a previous call to @ref sd_ble_gap_authenticate. - * @param[in,out] p_sec_keyset Pointer to a @ref ble_gap_sec_keyset_t security keyset structure. Any keys generated and/or distributed as a result of the ongoing security procedure - * will be stored into the memory referenced by the pointers inside this structure. The keys will be stored and available to the application + * @param[in,out] p_sec_keyset Pointer to a @ref ble_gap_sec_keyset_t security keyset structure. Any keys generated and/or distributed as a result of the ongoing security procedure + * will be stored into the memory referenced by the pointers inside this structure. The keys will be stored and available to the application * upon reception of a @ref BLE_GAP_EVT_AUTH_STATUS event. * Note that the SoftDevice expects the application to provide memory for storing the * peer's keys. So it must be ensured that the relevant pointers inside this structure are not NULL. The pointers to the local key @@ -1735,7 +1735,7 @@ SVCALL(SD_BLE_GAP_CONNECT_CANCEL, uint32_t, sd_ble_gap_connect_cancel(void)); #ifdef __cplusplus } #endif -#endif // BLE_GAP_H__ +#endif // NRF_BLE_GAP_H__ /** @} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gatt.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gatt.h similarity index 98% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gatt.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gatt.h index 8d915ee76a..9d100a6f31 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gatt.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gatt.h @@ -1,26 +1,26 @@ -/* +/* * 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. - * + * * 4. This software must only be used in a processor manufactured by Nordic * Semiconductor ASA, or in a processor manufactured by a third party that * is used in combination with a processor manufactured by Nordic Semiconductor. - * - * + * + * * 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 @@ -31,7 +31,7 @@ * 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. - * + * */ /** @@ -40,11 +40,11 @@ @brief Common definitions and prototypes for the GATT interfaces. */ -#ifndef BLE_GATT_H__ -#define BLE_GATT_H__ +#ifndef NRF_BLE_GATT_H__ +#define NRF_BLE_GATT_H__ -#include "ble_types.h" -#include "ble_ranges.h" +#include "nrf_ble_types.h" +#include "nrf_ble_ranges.h" #ifdef __cplusplus extern "C" { @@ -202,7 +202,7 @@ typedef struct #ifdef __cplusplus } #endif -#endif // BLE_GATT_H__ +#endif // NRF_BLE_GATT_H__ /** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gattc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gattc.h similarity index 98% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gattc.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gattc.h index 3515063a9b..e899086eba 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gattc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gattc.h @@ -1,26 +1,26 @@ -/* +/* * 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. - * + * * 4. This software must only be used in a processor manufactured by Nordic * Semiconductor ASA, or in a processor manufactured by a third party that * is used in combination with a processor manufactured by Nordic Semiconductor. - * - * + * + * * 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 @@ -31,7 +31,7 @@ * 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. - * + * */ /** @@ -40,12 +40,12 @@ @brief Definitions and prototypes for the GATT Client interface. */ -#ifndef BLE_GATTC_H__ -#define BLE_GATTC_H__ +#ifndef NRF_BLE_GATTC_H__ +#define NRF_BLE_GATTC_H__ -#include "ble_gatt.h" -#include "ble_types.h" -#include "ble_ranges.h" +#include "nrf_ble_gatt.h" +#include "nrf_ble_types.h" +#include "nrf_ble_ranges.h" #include "nrf_svc.h" #ifdef __cplusplus @@ -215,10 +215,10 @@ typedef struct } ble_gattc_evt_attr_info_disc_rsp_t; /**@brief GATT read by UUID handle value pair. */ -typedef struct +typedef struct { uint16_t handle; /**< Attribute Handle. */ - uint8_t *p_value; /**< Pointer to value, variable length (length available as value_len in @ref ble_gattc_evt_char_val_by_uuid_read_rsp_t). + uint8_t *p_value; /**< Pointer to value, variable length (length available as value_len in @ref ble_gattc_evt_char_val_by_uuid_read_rsp_t). Please note that this pointer is absolute to the memory provided by the user when retrieving the event, so it will effectively point to a location inside the handle_value array. */ } ble_gattc_handle_value_t; @@ -305,7 +305,7 @@ typedef struct /**@brief Initiate or continue a GATT Primary Service Discovery procedure. * - * @details This function initiates or resumes a Primary Service discovery procedure, starting from the supplied handle. + * @details This function initiates or resumes a Primary Service discovery procedure, starting from the supplied handle. * If the last service has not been reached, this function must be called again with an updated start handle value to continue the search. * * @note If any of the discovered services have 128-bit UUIDs which are not present in the table provided to ble_vs_uuids_assign, a UUID structure with @@ -314,11 +314,11 @@ typedef struct * @events * @event{@ref BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP} * @endevents - * + * * @mscs * @mmsc{@ref BLE_GATTC_PRIM_SRVC_DISC_MSC} * @endmscs - * + * * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. * @param[in] start_handle Handle to start searching from. * @param[in] p_srvc_uuid Pointer to the service UUID to be found. If it is NULL, all primary services will be returned. @@ -340,11 +340,11 @@ SVCALL(SD_BLE_GATTC_PRIMARY_SERVICES_DISCOVER, uint32_t, sd_ble_gattc_primary_se * @events * @event{@ref BLE_GATTC_EVT_REL_DISC_RSP} * @endevents - * + * * @mscs * @mmsc{@ref BLE_GATTC_REL_DISC_MSC} * @endmscs - * + * * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. * @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on. * @@ -373,7 +373,7 @@ SVCALL(SD_BLE_GATTC_RELATIONSHIPS_DISCOVER, uint32_t, sd_ble_gattc_relationships * @mscs * @mmsc{@ref BLE_GATTC_CHAR_DISC_MSC} * @endmscs - * + * * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. * @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on. * @@ -398,7 +398,7 @@ SVCALL(SD_BLE_GATTC_CHARACTERISTICS_DISCOVER, uint32_t, sd_ble_gattc_characteris * @mscs * @mmsc{@ref BLE_GATTC_DESC_DISC_MSC} * @endmscs - * + * * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. * @param[in] p_handle_range A pointer to the range of handles of the Characteristic to perform this procedure on. * @@ -419,11 +419,11 @@ SVCALL(SD_BLE_GATTC_DESCRIPTORS_DISCOVER, uint32_t, sd_ble_gattc_descriptors_dis * @events * @event{BLE_GATTC_EVT_DESC_DISC_RSP} * @endevents - * + * * @mscs * @mmsc{@ref BLE_GATTC_READ_UUID_MSC} * @endmscs - * + * * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. * @param[in] p_uuid Pointer to a Characteristic value UUID to read. * @param[in] p_handle_range A pointer to the range of handles to perform this procedure on. @@ -440,17 +440,17 @@ SVCALL(SD_BLE_GATTC_CHAR_VALUE_BY_UUID_READ, uint32_t, sd_ble_gattc_char_value_b /**@brief Initiate or continue a GATT Read (Long) Characteristic or Descriptor procedure. * * @details This function initiates or resumes a GATT Read (Long) Characteristic or Descriptor procedure. If the Characteristic or Descriptor - * to be read is longer than ATT_MTU - 1, this function must be called multiple times with appropriate offset to read the + * to be read is longer than ATT_MTU - 1, this function must be called multiple times with appropriate offset to read the * complete value. * * @events * @event{@ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP} * @endevents - * + * * @mscs * @mmsc{@ref BLE_GATTC_VALUE_READ_MSC} * @endmscs - * + * * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. * @param[in] handle The handle of the attribute to be read. * @param[in] offset Offset into the attribute value to be read. @@ -465,16 +465,16 @@ SVCALL(SD_BLE_GATTC_READ, uint32_t, sd_ble_gattc_read(uint16_t conn_handle, uint /**@brief Initiate a GATT Read Multiple Characteristic Values procedure. * - * @details This function initiates a GATT Read Multiple Characteristic Values procedure. + * @details This function initiates a GATT Read Multiple Characteristic Values procedure. * * @events * @event{@ref BLE_GATTC_EVT_CHAR_VALS_READ_RSP} * @endevents - * + * * @mscs * @mmsc{@ref BLE_GATTC_READ_MULT_MSC} * @endmscs - * + * * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. * @param[in] p_handles A pointer to the handle(s) of the attribute(s) to be read. * @param[in] handle_count The number of handles in p_handles. @@ -490,24 +490,24 @@ SVCALL(SD_BLE_GATTC_CHAR_VALUES_READ, uint32_t, sd_ble_gattc_char_values_read(ui /**@brief Perform a Write (Characteristic Value or Descriptor, with or without response, signed or not, long or reliable) procedure. * - * @details This function can perform all write procedures described in GATT. + * @details This function can perform all write procedures described in GATT. * - * @note It is important to note that a write without response will consume an application buffer, and will therefore - * generate a @ref BLE_EVT_TX_COMPLETE event when the packet has been transmitted. A write (with response) on the other hand will use the - * standard client internal buffer and thus will only generate a @ref BLE_GATTC_EVT_WRITE_RSP event as soon as the write response + * @note It is important to note that a write without response will consume an application buffer, and will therefore + * generate a @ref BLE_EVT_TX_COMPLETE event when the packet has been transmitted. A write (with response) on the other hand will use the + * standard client internal buffer and thus will only generate a @ref BLE_GATTC_EVT_WRITE_RSP event as soon as the write response * has been received from the peer. Please see the documentation of @ref sd_ble_tx_packet_count_get for more details. * * @events * @event{@ref BLE_GATTC_EVT_WRITE_RSP, Generated when using write request or queued writes.} * @endevents - * + * * @mscs * @mmsc{@ref BLE_GATTC_VALUE_WRITE_MSC} * @mmsc{@ref BLE_GATTC_VALUE_LONG_WRITE_MSC} * @mmsc{@ref BLE_GATTC_VALUE_RELIABLE_WRITE_MSC} * @mmsc{@ref BLE_COMMON_APP_BUFF_MSC} * @endmscs - * + * * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. * @param[in] p_write_params A pointer to a write parameters structure. * @@ -524,11 +524,11 @@ SVCALL(SD_BLE_GATTC_WRITE, uint32_t, sd_ble_gattc_write(uint16_t conn_handle, bl /**@brief Send a Handle Value Confirmation to the GATT Server. - * + * * @mscs * @mmsc{@ref BLE_GATTC_HVI_MSC} * @endmscs - * + * * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. * @param[in] handle The handle of the attribute in the indication. * @@ -561,7 +561,7 @@ SVCALL(SD_BLE_GATTC_ATTR_INFO_DISCOVER, uint32_t, sd_ble_gattc_attr_info_discove #ifdef __cplusplus } #endif -#endif /* BLE_GATTC_H__ */ +#endif /* NRF_BLE_GATTC_H__ */ /** @} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gatts.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gatts.h similarity index 99% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gatts.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gatts.h index 93db0b35c2..b86be97de9 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gatts.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gatts.h @@ -40,14 +40,14 @@ @brief Definitions and prototypes for the GATTS interface. */ -#ifndef BLE_GATTS_H__ -#define BLE_GATTS_H__ +#ifndef NRF_BLE_GATTS_H__ +#define NRF_BLE_GATTS_H__ -#include "ble_types.h" -#include "ble_ranges.h" -#include "ble_l2cap.h" -#include "ble_gap.h" -#include "ble_gatt.h" +#include "nrf_ble_types.h" +#include "nrf_ble_ranges.h" +#include "nrf_ble_l2cap.h" +#include "nrf_ble_gap.h" +#include "nrf_ble_gatt.h" #include "nrf_svc.h" #ifdef __cplusplus @@ -715,7 +715,7 @@ SVCALL(SD_BLE_GATTS_ATTR_GET, uint32_t, sd_ble_gatts_attr_get(uint16_t handle, b #ifdef __cplusplus } #endif -#endif // BLE_GATTS_H__ +#endif // NRF_BLE_GATTS_H__ /** @} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_hci.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_hci.h similarity index 97% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_hci.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_hci.h index 4a9620ce21..720a4fdf8f 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_hci.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_hci.h @@ -1,26 +1,26 @@ -/* +/* * 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. - * + * * 4. This software must only be used in a processor manufactured by Nordic * Semiconductor ASA, or in a processor manufactured by a third party that * is used in combination with a processor manufactured by Nordic Semiconductor. - * - * + * + * * 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 @@ -31,17 +31,17 @@ * 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 BLE_COMMON + @addtogroup BLE_COMMON @{ */ -#ifndef BLE_HCI_H__ -#define BLE_HCI_H__ +#ifndef NRF_BLE_HCI_H__ +#define NRF_BLE_HCI_H__ #ifdef __cplusplus extern "C" { #endif @@ -126,6 +126,6 @@ extern "C" { #ifdef __cplusplus } #endif -#endif // BLE_HCI_H__ +#endif // NRF_BLE_HCI_H__ /** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_l2cap.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_l2cap.h similarity index 97% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_l2cap.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_l2cap.h index 8a68ed90c8..a98feaec64 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_l2cap.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_l2cap.h @@ -40,12 +40,12 @@ @brief Definitions and prototypes for the L2CAP interface. */ -#ifndef BLE_L2CAP_H__ -#define BLE_L2CAP_H__ +#ifndef NRF_BLE_L2CAP_H__ +#define NRF_BLE_L2CAP_H__ -#include "ble_types.h" -#include "ble_ranges.h" -#include "ble_err.h" +#include "nrf_ble_types.h" +#include "nrf_ble_ranges.h" +#include "nrf_ble_err.h" #include "nrf_svc.h" #ifdef __cplusplus @@ -195,7 +195,7 @@ SVCALL(SD_BLE_L2CAP_TX, uint32_t, sd_ble_l2cap_tx(uint16_t conn_handle, ble_l2ca #ifdef __cplusplus } #endif -#endif // BLE_L2CAP_H__ +#endif // NRF_BLE_L2CAP_H__ /** @} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_ranges.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_ranges.h similarity index 97% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_ranges.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_ranges.h index 2e5ff7b299..3beaaefd35 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_ranges.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_ranges.h @@ -1,26 +1,26 @@ -/* +/* * 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. - * + * * 4. This software must only be used in a processor manufactured by Nordic * Semiconductor ASA, or in a processor manufactured by a third party that * is used in combination with a processor manufactured by Nordic Semiconductor. - * - * + * + * * 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 @@ -31,7 +31,7 @@ * 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,8 +54,8 @@ which defines names of each individual SVC code based on the range start value. */ -#ifndef BLE_RANGES_H__ -#define BLE_RANGES_H__ +#ifndef NRF_BLE_RANGES_H__ +#define NRF_BLE_RANGES_H__ #ifdef __cplusplus extern "C" { @@ -118,7 +118,7 @@ extern "C" { #ifdef __cplusplus } #endif -#endif /* BLE_RANGES_H__ */ +#endif /* NRF_BLE_RANGES_H__ */ /** @} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_types.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_types.h similarity index 99% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_types.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_types.h index 23e23a150e..95f0f65d80 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_types.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_types.h @@ -1,26 +1,26 @@ -/* +/* * 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. - * + * * 4. This software must only be used in a processor manufactured by Nordic * Semiconductor ASA, or in a processor manufactured by a third party that * is used in combination with a processor manufactured by Nordic Semiconductor. - * - * + * + * * 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 @@ -31,7 +31,7 @@ * 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. - * + * */ /** @@ -43,8 +43,8 @@ @brief Common types and macro definitions for the BLE SoftDevice. */ -#ifndef BLE_TYPES_H__ -#define BLE_TYPES_H__ +#ifndef NRF_BLE_TYPES_H__ +#define NRF_BLE_TYPES_H__ #include @@ -181,7 +181,7 @@ extern "C" { /** @brief 128 bit UUID values. */ typedef struct -{ +{ uint8_t uuid128[16]; /**< Little-Endian UUID bytes. */ } ble_uuid128_t; @@ -197,7 +197,7 @@ typedef struct } #endif -#endif /* BLE_TYPES_H__ */ +#endif /* NRF_BLE_TYPES_H__ */ /** @} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble.h similarity index 99% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble.h index 593be948e0..3449a01bdb 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble.h @@ -44,16 +44,16 @@ */ -#ifndef BLE_H__ -#define BLE_H__ +#ifndef NRF_BLE_H__ +#define NRF_BLE_H__ -#include "ble_ranges.h" -#include "ble_types.h" -#include "ble_gap.h" -#include "ble_l2cap.h" -#include "ble_gatt.h" -#include "ble_gattc.h" -#include "ble_gatts.h" +#include "nrf_ble_ranges.h" +#include "nrf_ble_types.h" +#include "nrf_ble_gap.h" +#include "nrf_ble_l2cap.h" +#include "nrf_ble_gatt.h" +#include "nrf_ble_gattc.h" +#include "nrf_ble_gatts.h" #ifdef __cplusplus extern "C" { @@ -624,7 +624,7 @@ SVCALL(SD_BLE_OPT_GET, uint32_t, sd_ble_opt_get(uint32_t opt_id, ble_opt_t *p_op #ifdef __cplusplus } #endif -#endif /* BLE_H__ */ +#endif /* NRF_BLE_H__ */ /** @} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_err.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_err.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_err.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_err.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gap.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gap.h similarity index 99% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gap.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gap.h index ad0fd304db..c34ea5c126 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gap.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gap.h @@ -40,11 +40,11 @@ @brief Definitions and prototypes for the GAP interface. */ -#ifndef BLE_GAP_H__ -#define BLE_GAP_H__ +#ifndef NRF_BLE_GAP_H__ +#define NRF_BLE_GAP_H__ -#include "ble_types.h" -#include "ble_ranges.h" +#include "nrf_ble_types.h" +#include "nrf_ble_ranges.h" #include "nrf_svc.h" #ifdef __cplusplus @@ -659,8 +659,8 @@ typedef struct typedef struct { uint8_t passkey[BLE_GAP_PASSKEY_LEN]; /**< 6-digit passkey in ASCII ('0'-'9' digits only). */ - uint8_t match_request : 1; /**< If 1 requires the application to report the match using @ref sd_ble_gap_auth_key_reply - with either @ref BLE_GAP_AUTH_KEY_TYPE_NONE if there is no match or + uint8_t match_request : 1; /**< If 1 requires the application to report the match using @ref sd_ble_gap_auth_key_reply + with either @ref BLE_GAP_AUTH_KEY_TYPE_NONE if there is no match or @ref BLE_GAP_AUTH_KEY_TYPE_PASSKEY if there is a match. */ } ble_gap_evt_passkey_display_t; @@ -680,7 +680,7 @@ typedef struct /**@brief Event structure for @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST. */ typedef struct { - ble_gap_lesc_p256_pk_t *p_pk_peer; /**< LE Secure Connections remote P-256 Public Key. This will point to the application-supplied memory + ble_gap_lesc_p256_pk_t *p_pk_peer; /**< LE Secure Connections remote P-256 Public Key. This will point to the application-supplied memory inside the keyset during the call to @ref sd_ble_gap_sec_params_reply. */ uint8_t oobd_req :1; /**< LESC OOB data required. A call to @ref sd_ble_gap_lesc_oob_data_set is required to complete the procedure. */ } ble_gap_evt_lesc_dhkey_request_t; @@ -720,7 +720,7 @@ typedef struct ble_gap_enc_key_t *p_enc_key; /**< Encryption Key, or NULL. */ ble_gap_id_key_t *p_id_key; /**< Identity Key, or NULL. */ ble_gap_sign_info_t *p_sign_key; /**< Signing Key, or NULL. */ - ble_gap_lesc_p256_pk_t *p_pk; /**< LE Secure Connections P-256 Public Key. When in debug mode the application must use the value defined + ble_gap_lesc_p256_pk_t *p_pk; /**< LE Secure Connections P-256 Public Key. When in debug mode the application must use the value defined in the Core Bluetooth Specification v4.2 Vol.3, Part H, Section 2.3.5.6.1 */ } ble_gap_sec_keys_t; @@ -1367,8 +1367,8 @@ SVCALL(SD_BLE_GAP_AUTHENTICATE, uint32_t, sd_ble_gap_authenticate(uint16_t conn_ * @param[in] sec_status Security status, see @ref BLE_GAP_SEC_STATUS. * @param[in] p_sec_params Pointer to a @ref ble_gap_sec_params_t security parameters structure. In the central role this must be set to NULL, as the parameters have * already been provided during a previous call to @ref sd_ble_gap_authenticate. - * @param[in,out] p_sec_keyset Pointer to a @ref ble_gap_sec_keyset_t security keyset structure. Any keys generated and/or distributed as a result of the ongoing security procedure - * will be stored into the memory referenced by the pointers inside this structure. The keys will be stored and available to the application + * @param[in,out] p_sec_keyset Pointer to a @ref ble_gap_sec_keyset_t security keyset structure. Any keys generated and/or distributed as a result of the ongoing security procedure + * will be stored into the memory referenced by the pointers inside this structure. The keys will be stored and available to the application * upon reception of a @ref BLE_GAP_EVT_AUTH_STATUS event. * Note that the SoftDevice expects the application to provide memory for storing the * peer's keys. So it must be ensured that the relevant pointers inside this structure are not NULL. The pointers to the local key @@ -1735,7 +1735,7 @@ SVCALL(SD_BLE_GAP_CONNECT_CANCEL, uint32_t, sd_ble_gap_connect_cancel(void)); #ifdef __cplusplus } #endif -#endif // BLE_GAP_H__ +#endif // NRF_BLE_GAP_H__ /** @} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gatt.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gatt.h similarity index 98% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gatt.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gatt.h index 8d915ee76a..9d100a6f31 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gatt.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gatt.h @@ -1,26 +1,26 @@ -/* +/* * 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. - * + * * 4. This software must only be used in a processor manufactured by Nordic * Semiconductor ASA, or in a processor manufactured by a third party that * is used in combination with a processor manufactured by Nordic Semiconductor. - * - * + * + * * 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 @@ -31,7 +31,7 @@ * 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. - * + * */ /** @@ -40,11 +40,11 @@ @brief Common definitions and prototypes for the GATT interfaces. */ -#ifndef BLE_GATT_H__ -#define BLE_GATT_H__ +#ifndef NRF_BLE_GATT_H__ +#define NRF_BLE_GATT_H__ -#include "ble_types.h" -#include "ble_ranges.h" +#include "nrf_ble_types.h" +#include "nrf_ble_ranges.h" #ifdef __cplusplus extern "C" { @@ -202,7 +202,7 @@ typedef struct #ifdef __cplusplus } #endif -#endif // BLE_GATT_H__ +#endif // NRF_BLE_GATT_H__ /** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gattc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gattc.h similarity index 98% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gattc.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gattc.h index 3515063a9b..e899086eba 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_gattc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gattc.h @@ -1,26 +1,26 @@ -/* +/* * 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. - * + * * 4. This software must only be used in a processor manufactured by Nordic * Semiconductor ASA, or in a processor manufactured by a third party that * is used in combination with a processor manufactured by Nordic Semiconductor. - * - * + * + * * 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 @@ -31,7 +31,7 @@ * 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. - * + * */ /** @@ -40,12 +40,12 @@ @brief Definitions and prototypes for the GATT Client interface. */ -#ifndef BLE_GATTC_H__ -#define BLE_GATTC_H__ +#ifndef NRF_BLE_GATTC_H__ +#define NRF_BLE_GATTC_H__ -#include "ble_gatt.h" -#include "ble_types.h" -#include "ble_ranges.h" +#include "nrf_ble_gatt.h" +#include "nrf_ble_types.h" +#include "nrf_ble_ranges.h" #include "nrf_svc.h" #ifdef __cplusplus @@ -215,10 +215,10 @@ typedef struct } ble_gattc_evt_attr_info_disc_rsp_t; /**@brief GATT read by UUID handle value pair. */ -typedef struct +typedef struct { uint16_t handle; /**< Attribute Handle. */ - uint8_t *p_value; /**< Pointer to value, variable length (length available as value_len in @ref ble_gattc_evt_char_val_by_uuid_read_rsp_t). + uint8_t *p_value; /**< Pointer to value, variable length (length available as value_len in @ref ble_gattc_evt_char_val_by_uuid_read_rsp_t). Please note that this pointer is absolute to the memory provided by the user when retrieving the event, so it will effectively point to a location inside the handle_value array. */ } ble_gattc_handle_value_t; @@ -305,7 +305,7 @@ typedef struct /**@brief Initiate or continue a GATT Primary Service Discovery procedure. * - * @details This function initiates or resumes a Primary Service discovery procedure, starting from the supplied handle. + * @details This function initiates or resumes a Primary Service discovery procedure, starting from the supplied handle. * If the last service has not been reached, this function must be called again with an updated start handle value to continue the search. * * @note If any of the discovered services have 128-bit UUIDs which are not present in the table provided to ble_vs_uuids_assign, a UUID structure with @@ -314,11 +314,11 @@ typedef struct * @events * @event{@ref BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP} * @endevents - * + * * @mscs * @mmsc{@ref BLE_GATTC_PRIM_SRVC_DISC_MSC} * @endmscs - * + * * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. * @param[in] start_handle Handle to start searching from. * @param[in] p_srvc_uuid Pointer to the service UUID to be found. If it is NULL, all primary services will be returned. @@ -340,11 +340,11 @@ SVCALL(SD_BLE_GATTC_PRIMARY_SERVICES_DISCOVER, uint32_t, sd_ble_gattc_primary_se * @events * @event{@ref BLE_GATTC_EVT_REL_DISC_RSP} * @endevents - * + * * @mscs * @mmsc{@ref BLE_GATTC_REL_DISC_MSC} * @endmscs - * + * * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. * @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on. * @@ -373,7 +373,7 @@ SVCALL(SD_BLE_GATTC_RELATIONSHIPS_DISCOVER, uint32_t, sd_ble_gattc_relationships * @mscs * @mmsc{@ref BLE_GATTC_CHAR_DISC_MSC} * @endmscs - * + * * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. * @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on. * @@ -398,7 +398,7 @@ SVCALL(SD_BLE_GATTC_CHARACTERISTICS_DISCOVER, uint32_t, sd_ble_gattc_characteris * @mscs * @mmsc{@ref BLE_GATTC_DESC_DISC_MSC} * @endmscs - * + * * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. * @param[in] p_handle_range A pointer to the range of handles of the Characteristic to perform this procedure on. * @@ -419,11 +419,11 @@ SVCALL(SD_BLE_GATTC_DESCRIPTORS_DISCOVER, uint32_t, sd_ble_gattc_descriptors_dis * @events * @event{BLE_GATTC_EVT_DESC_DISC_RSP} * @endevents - * + * * @mscs * @mmsc{@ref BLE_GATTC_READ_UUID_MSC} * @endmscs - * + * * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. * @param[in] p_uuid Pointer to a Characteristic value UUID to read. * @param[in] p_handle_range A pointer to the range of handles to perform this procedure on. @@ -440,17 +440,17 @@ SVCALL(SD_BLE_GATTC_CHAR_VALUE_BY_UUID_READ, uint32_t, sd_ble_gattc_char_value_b /**@brief Initiate or continue a GATT Read (Long) Characteristic or Descriptor procedure. * * @details This function initiates or resumes a GATT Read (Long) Characteristic or Descriptor procedure. If the Characteristic or Descriptor - * to be read is longer than ATT_MTU - 1, this function must be called multiple times with appropriate offset to read the + * to be read is longer than ATT_MTU - 1, this function must be called multiple times with appropriate offset to read the * complete value. * * @events * @event{@ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP} * @endevents - * + * * @mscs * @mmsc{@ref BLE_GATTC_VALUE_READ_MSC} * @endmscs - * + * * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. * @param[in] handle The handle of the attribute to be read. * @param[in] offset Offset into the attribute value to be read. @@ -465,16 +465,16 @@ SVCALL(SD_BLE_GATTC_READ, uint32_t, sd_ble_gattc_read(uint16_t conn_handle, uint /**@brief Initiate a GATT Read Multiple Characteristic Values procedure. * - * @details This function initiates a GATT Read Multiple Characteristic Values procedure. + * @details This function initiates a GATT Read Multiple Characteristic Values procedure. * * @events * @event{@ref BLE_GATTC_EVT_CHAR_VALS_READ_RSP} * @endevents - * + * * @mscs * @mmsc{@ref BLE_GATTC_READ_MULT_MSC} * @endmscs - * + * * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. * @param[in] p_handles A pointer to the handle(s) of the attribute(s) to be read. * @param[in] handle_count The number of handles in p_handles. @@ -490,24 +490,24 @@ SVCALL(SD_BLE_GATTC_CHAR_VALUES_READ, uint32_t, sd_ble_gattc_char_values_read(ui /**@brief Perform a Write (Characteristic Value or Descriptor, with or without response, signed or not, long or reliable) procedure. * - * @details This function can perform all write procedures described in GATT. + * @details This function can perform all write procedures described in GATT. * - * @note It is important to note that a write without response will consume an application buffer, and will therefore - * generate a @ref BLE_EVT_TX_COMPLETE event when the packet has been transmitted. A write (with response) on the other hand will use the - * standard client internal buffer and thus will only generate a @ref BLE_GATTC_EVT_WRITE_RSP event as soon as the write response + * @note It is important to note that a write without response will consume an application buffer, and will therefore + * generate a @ref BLE_EVT_TX_COMPLETE event when the packet has been transmitted. A write (with response) on the other hand will use the + * standard client internal buffer and thus will only generate a @ref BLE_GATTC_EVT_WRITE_RSP event as soon as the write response * has been received from the peer. Please see the documentation of @ref sd_ble_tx_packet_count_get for more details. * * @events * @event{@ref BLE_GATTC_EVT_WRITE_RSP, Generated when using write request or queued writes.} * @endevents - * + * * @mscs * @mmsc{@ref BLE_GATTC_VALUE_WRITE_MSC} * @mmsc{@ref BLE_GATTC_VALUE_LONG_WRITE_MSC} * @mmsc{@ref BLE_GATTC_VALUE_RELIABLE_WRITE_MSC} * @mmsc{@ref BLE_COMMON_APP_BUFF_MSC} * @endmscs - * + * * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. * @param[in] p_write_params A pointer to a write parameters structure. * @@ -524,11 +524,11 @@ SVCALL(SD_BLE_GATTC_WRITE, uint32_t, sd_ble_gattc_write(uint16_t conn_handle, bl /**@brief Send a Handle Value Confirmation to the GATT Server. - * + * * @mscs * @mmsc{@ref BLE_GATTC_HVI_MSC} * @endmscs - * + * * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on. * @param[in] handle The handle of the attribute in the indication. * @@ -561,7 +561,7 @@ SVCALL(SD_BLE_GATTC_ATTR_INFO_DISCOVER, uint32_t, sd_ble_gattc_attr_info_discove #ifdef __cplusplus } #endif -#endif /* BLE_GATTC_H__ */ +#endif /* NRF_BLE_GATTC_H__ */ /** @} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gatts.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gatts.h similarity index 99% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gatts.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gatts.h index 93db0b35c2..b86be97de9 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gatts.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gatts.h @@ -40,14 +40,14 @@ @brief Definitions and prototypes for the GATTS interface. */ -#ifndef BLE_GATTS_H__ -#define BLE_GATTS_H__ +#ifndef NRF_BLE_GATTS_H__ +#define NRF_BLE_GATTS_H__ -#include "ble_types.h" -#include "ble_ranges.h" -#include "ble_l2cap.h" -#include "ble_gap.h" -#include "ble_gatt.h" +#include "nrf_ble_types.h" +#include "nrf_ble_ranges.h" +#include "nrf_ble_l2cap.h" +#include "nrf_ble_gap.h" +#include "nrf_ble_gatt.h" #include "nrf_svc.h" #ifdef __cplusplus @@ -715,7 +715,7 @@ SVCALL(SD_BLE_GATTS_ATTR_GET, uint32_t, sd_ble_gatts_attr_get(uint16_t handle, b #ifdef __cplusplus } #endif -#endif // BLE_GATTS_H__ +#endif // NRF_BLE_GATTS_H__ /** @} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_hci.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_hci.h similarity index 97% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_hci.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_hci.h index 4a9620ce21..720a4fdf8f 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_hci.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_hci.h @@ -1,26 +1,26 @@ -/* +/* * 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. - * + * * 4. This software must only be used in a processor manufactured by Nordic * Semiconductor ASA, or in a processor manufactured by a third party that * is used in combination with a processor manufactured by Nordic Semiconductor. - * - * + * + * * 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 @@ -31,17 +31,17 @@ * 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 BLE_COMMON + @addtogroup BLE_COMMON @{ */ -#ifndef BLE_HCI_H__ -#define BLE_HCI_H__ +#ifndef NRF_BLE_HCI_H__ +#define NRF_BLE_HCI_H__ #ifdef __cplusplus extern "C" { #endif @@ -126,6 +126,6 @@ extern "C" { #ifdef __cplusplus } #endif -#endif // BLE_HCI_H__ +#endif // NRF_BLE_HCI_H__ /** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_l2cap.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_l2cap.h similarity index 97% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_l2cap.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_l2cap.h index 8a68ed90c8..a98feaec64 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_l2cap.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_l2cap.h @@ -40,12 +40,12 @@ @brief Definitions and prototypes for the L2CAP interface. */ -#ifndef BLE_L2CAP_H__ -#define BLE_L2CAP_H__ +#ifndef NRF_BLE_L2CAP_H__ +#define NRF_BLE_L2CAP_H__ -#include "ble_types.h" -#include "ble_ranges.h" -#include "ble_err.h" +#include "nrf_ble_types.h" +#include "nrf_ble_ranges.h" +#include "nrf_ble_err.h" #include "nrf_svc.h" #ifdef __cplusplus @@ -195,7 +195,7 @@ SVCALL(SD_BLE_L2CAP_TX, uint32_t, sd_ble_l2cap_tx(uint16_t conn_handle, ble_l2ca #ifdef __cplusplus } #endif -#endif // BLE_L2CAP_H__ +#endif // NRF_BLE_L2CAP_H__ /** @} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_ranges.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_ranges.h similarity index 97% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_ranges.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_ranges.h index 2e5ff7b299..3beaaefd35 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_ranges.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_ranges.h @@ -1,26 +1,26 @@ -/* +/* * 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. - * + * * 4. This software must only be used in a processor manufactured by Nordic * Semiconductor ASA, or in a processor manufactured by a third party that * is used in combination with a processor manufactured by Nordic Semiconductor. - * - * + * + * * 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 @@ -31,7 +31,7 @@ * 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,8 +54,8 @@ which defines names of each individual SVC code based on the range start value. */ -#ifndef BLE_RANGES_H__ -#define BLE_RANGES_H__ +#ifndef NRF_BLE_RANGES_H__ +#define NRF_BLE_RANGES_H__ #ifdef __cplusplus extern "C" { @@ -118,7 +118,7 @@ extern "C" { #ifdef __cplusplus } #endif -#endif /* BLE_RANGES_H__ */ +#endif /* NRF_BLE_RANGES_H__ */ /** @} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_types.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_types.h similarity index 99% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_types.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_types.h index 23e23a150e..95f0f65d80 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble_types.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_types.h @@ -1,26 +1,26 @@ -/* +/* * 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. - * + * * 4. This software must only be used in a processor manufactured by Nordic * Semiconductor ASA, or in a processor manufactured by a third party that * is used in combination with a processor manufactured by Nordic Semiconductor. - * - * + * + * * 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 @@ -31,7 +31,7 @@ * 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. - * + * */ /** @@ -43,8 +43,8 @@ @brief Common types and macro definitions for the BLE SoftDevice. */ -#ifndef BLE_TYPES_H__ -#define BLE_TYPES_H__ +#ifndef NRF_BLE_TYPES_H__ +#define NRF_BLE_TYPES_H__ #include @@ -181,7 +181,7 @@ extern "C" { /** @brief 128 bit UUID values. */ typedef struct -{ +{ uint8_t uuid128[16]; /**< Little-Endian UUID bytes. */ } ble_uuid128_t; @@ -197,7 +197,7 @@ typedef struct } #endif -#endif /* BLE_TYPES_H__ */ +#endif /* NRF_BLE_TYPES_H__ */ /** @} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_advertising/ble_advertising.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_advertising/ble_advertising.h index 09605e557d..b0ed7827de 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_advertising/ble_advertising.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_advertising/ble_advertising.h @@ -17,7 +17,7 @@ * @ingroup ble_sdk_lib * @brief Module for handling connectable BLE advertising. * - * @details The Advertising Module handles connectable advertising for your application. It can + * @details The Advertising Module handles connectable advertising for your application. It can * be configured with advertising modes to suit most typical use cases. * Your main application can react to changes in advertising modes * if an event handler is provided. @@ -34,8 +34,8 @@ #define BLE_ADVERTISING_H__ #include -#include "ble_gattc.h" -#include "ble.h" +#include "nrf_ble_gattc.h" +#include "nrf_ble.h" #include "nrf_error.h" #include "ble_advdata.h" @@ -116,7 +116,7 @@ typedef struct #define BLE_ADV_FAST_ENABLED true #define BLE_ADV_FAST_DISABLED false - + #define BLE_ADV_SLOW_ENABLED true #define BLE_ADV_SLOW_DISABLED false @@ -176,7 +176,7 @@ uint32_t ble_advertising_init(ble_advdata_t const * p_advdata, * @param[in] advertising_mode Advertising mode. * * @retval @ref NRF_SUCCESS On success, else an error code indicating reason for failure. - * @retval @ref NRF_ERROR_INVALID_STATE + * @retval @ref NRF_ERROR_INVALID_STATE */ uint32_t ble_advertising_start(ble_adv_mode_t advertising_mode); diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.c index 6285810603..a3eff8d9d2 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.c @@ -11,7 +11,7 @@ #include "ble_db_discovery.h" #include -#include "ble.h" +#include "nrf_ble.h" #include "nrf_log.h" #include "sdk_common.h" @@ -291,8 +291,8 @@ static void on_srv_disc_completion(ble_db_discovery_t * p_db_discovery, * @param[in] p_db_discovery The pointer to the DB Discovery structure. * @param[in] p_after_char The pointer to the last discovered characteristic. * - * @retval True if a characteristic discovery is required. - * @retval False if a characteristic discovery is NOT required. + * @retval True if a characteristic discovery is required. + * @retval False if a characteristic discovery is NOT required. */ static bool is_char_discovery_reqd(ble_db_discovery_t * const p_db_discovery, ble_gattc_char_t * p_after_char) @@ -307,7 +307,7 @@ static bool is_char_discovery_reqd(ble_db_discovery_t * const p_db_discovery, // present. Hence a characteristic discovery is required. return true; } - + return false; } @@ -317,7 +317,7 @@ static bool is_char_discovery_reqd(ble_db_discovery_t * const p_db_discovery, * @details This function finds out if there is a possibility of existence of descriptors between * current characteristic and the next characteristic. If so, this function will compute * the handle range on which the descriptors may be present and will return it. - * If the current characteristic is the last known characteristic, then this function + * If the current characteristic is the last known characteristic, then this function * will use the service end handle to find out if the current characteristic can have * descriptors. * @@ -352,7 +352,7 @@ static bool is_desc_discovery_reqd(ble_db_discovery_t * p_db_discovery, } p_handle_range->start_handle = p_curr_char->characteristic.handle_value + 1; - + // Since the current characteristic is the last characteristic in the service, the end // handle should be the end handle of the service. p_handle_range->end_handle = @@ -443,7 +443,7 @@ static uint32_t descriptors_discover(ble_db_discovery_t * const p_db_discovery, ble_gattc_handle_range_t handle_range; ble_gatt_db_char_t * p_curr_char_being_discovered; ble_gatt_db_srv_t * p_srv_being_discovered; - bool is_discovery_reqd = false; + bool is_discovery_reqd = false; p_srv_being_discovered = &(p_db_discovery->services[p_db_discovery->curr_srv_ind]); @@ -583,7 +583,7 @@ static void on_characteristic_discovery_rsp(ble_db_discovery_t * const p_db_d { uint32_t err_code; ble_gatt_db_srv_t * p_srv_being_discovered; - bool perform_desc_discov = false; + bool perform_desc_discov = false; if (p_ble_gattc_evt->conn_handle != p_db_discovery->conn_handle) { @@ -600,7 +600,7 @@ static void on_characteristic_discovery_rsp(ble_db_discovery_t * const p_db_d // Find out the number of characteristics that were previously discovered (in earlier // characteristic discovery responses, if any). uint8_t num_chars_prev_disc = p_srv_being_discovered->char_count; - + // Find out the number of characteristics that are currently discovered (in the // characteristic discovery response being handled). uint8_t num_chars_curr_disc = p_char_disc_rsp_evt->count; @@ -628,9 +628,9 @@ static void on_characteristic_discovery_rsp(ble_db_discovery_t * const p_db_d p_srv_being_discovered->charateristics[i].cccd_handle = BLE_GATT_HANDLE_INVALID; } - + ble_gattc_char_t * p_last_known_char; - + p_last_known_char = &(p_srv_being_discovered->charateristics[i - 1].characteristic); // If no more characteristic discovery is required, or if the maximum number of supported @@ -826,7 +826,7 @@ uint32_t ble_db_discovery_init(const ble_db_discovery_evt_handler_t evt_handler) m_evt_handler = evt_handler; return err_code; - + } @@ -880,7 +880,7 @@ uint32_t ble_db_discovery_start(ble_db_discovery_t * const p_db_discovery, DB_LOG("[DB]: Starting discovery of service with UUID 0x%x for Connection handle %d\r\n", p_srv_being_discovered->srv_uuid.uuid, conn_handle); - + uint32_t err_code; err_code = sd_ble_gattc_primary_services_discover(conn_handle, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.h index f964e1e97d..adff289653 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.h @@ -19,7 +19,7 @@ * * @details This module contains the APIs and types exposed by the DB Discovery module. These APIs * and types can be used by the application to perform discovery of a service and its - * characteristics at the peer server. This module can also be used to discover the + * characteristics at the peer server. This module can also be used to discover the * desired services in multiple remote devices. * * @warning The maximum number of characteristics per service that can be discovered by this module @@ -42,8 +42,8 @@ #define BLE_DB_DISCOVERY_H__ #include -#include "ble_gattc.h" -#include "ble.h" +#include "nrf_ble_gattc.h" +#include "nrf_ble.h" #include "nrf_error.h" #include "ble_srv_common.h" #include "ble_gatt_db.h" @@ -66,7 +66,7 @@ typedef enum /**@brief Structure for holding the information related to the GATT database at the server. * - * @details This module identifies a remote database. Use one instance of this structure per + * @details This module identifies a remote database. Use one instance of this structure per * connection. * * @warning This structure must be zero-initialized. @@ -103,7 +103,7 @@ typedef void (* ble_db_discovery_evt_handler_t)(ble_db_discovery_evt_t * p_evt); /**@brief Function for initializing the DB Discovery module. * - * @param[in] evt_handler Event handler to be called by the DB discovery module when any event + * @param[in] evt_handler Event handler to be called by the DB discovery module when any event * related to discovery of the registered service occurs. * * @retval NRF_SUCCESS On successful initialization. @@ -125,48 +125,48 @@ uint32_t ble_db_discovery_close(void); /**@brief Function for registering with the DB Discovery module. * - * @details The application can use this function to inform which service it is interested in + * @details The application can use this function to inform which service it is interested in * discovering at the server. * * @param[in] p_uuid Pointer to the UUID of the service to be discovered at the server. * - * @note The total number of services that can be discovered by this module is @ref - * BLE_DB_DISCOVERY_MAX_SRV. This effectively means that the maximum number of - * registrations possible is equal to the @ref BLE_DB_DISCOVERY_MAX_SRV. + * @note The total number of services that can be discovered by this module is @ref + * BLE_DB_DISCOVERY_MAX_SRV. This effectively means that the maximum number of + * registrations possible is equal to the @ref BLE_DB_DISCOVERY_MAX_SRV. * * @retval NRF_SUCCESS Operation success. * @retval NRF_ERROR_NULL When a NULL pointer is passed as input. - * @retval NRF_ERROR_INVALID_STATE If this function is called without calling the + * @retval NRF_ERROR_INVALID_STATE If this function is called without calling the * @ref ble_db_discovery_init. * @retval NRF_ERROR_NO_MEM The maximum number of registrations allowed by this module * has been reached. */ uint32_t ble_db_discovery_evt_register(const ble_uuid_t * const p_uuid); - + /**@brief Function for starting the discovery of the GATT database at the server. * * @warning p_db_discovery structure must be zero-initialized. * * @param[out] p_db_discovery Pointer to the DB Discovery structure. - * @param[in] conn_handle The handle of the connection for which the discovery should be + * @param[in] conn_handle The handle of the connection for which the discovery should be * started. * * @retval NRF_SUCCESS Operation success. * @retval NRF_ERROR_NULL When a NULL pointer is passed as input. - * @retval NRF_ERROR_INVALID_STATE If this function is called without calling the - * @ref ble_db_discovery_init, or without calling + * @retval NRF_ERROR_INVALID_STATE If this function is called without calling the + * @ref ble_db_discovery_init, or without calling * @ref ble_db_discovery_evt_register. - * @retval NRF_ERROR_BUSY If a discovery is already in progress for the current + * @retval NRF_ERROR_BUSY If a discovery is already in progress for the current * connection. * - * @return This API propagates the error code returned by the + * @return This API propagates the error code returned by the * SoftDevice API @ref sd_ble_gattc_primary_services_discover. */ uint32_t ble_db_discovery_start(ble_db_discovery_t * const p_db_discovery, uint16_t conn_handle); - + /**@brief Function for handling the Application's BLE Stack events. * * @param[in,out] p_db_discovery Pointer to the DB Discovery structure. diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_racp/ble_racp.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_racp/ble_racp.h index d3296e47f1..c81cda822b 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_racp/ble_racp.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_racp/ble_racp.h @@ -22,9 +22,9 @@ #include #include -#include "ble.h" -#include "ble_types.h" -#include "ble.h" +#include "nrf_ble.h" +#include "nrf_ble_types.h" +#include "nrf_ble.h" /**@brief Record Access Control Point opcodes. */ #define RACP_OPCODE_RESERVED 0 /**< Record Access Control Point opcode - Reserved for future use. */ @@ -93,4 +93,3 @@ uint8_t ble_racp_encode(const ble_racp_value_t * p_racp_val, uint8_t * p_data); #endif // BLE_RACP_H__ /** @} */ - diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.c index 635d211dad..d6e0b6b321 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.c @@ -11,8 +11,8 @@ */ #include "ble_dfu.h" -#include "ble_types.h" -#include "ble_gatts.h" +#include "nrf_ble_types.h" +#include "nrf_ble_gatts.h" #include "ble_srv_common.h" #include #include "sdk_common.h" @@ -314,7 +314,7 @@ static uint32_t on_ctrl_pt_write(ble_dfu_t * p_dfu, ble_gatts_evt_write_t * p_bl (ble_dfu_procedure_t) p_ble_write_evt->data[0], BLE_DFU_RESP_VAL_OPER_FAILED); } - + ble_dfu_evt.evt.ble_dfu_pkt_write.len = 1; ble_dfu_evt.evt.ble_dfu_pkt_write.p_data = &(p_ble_write_evt->data[1]); @@ -401,7 +401,7 @@ static void on_rw_authorize_req(ble_dfu_t * p_dfu, ble_evt_t * p_ble_evt) (p_authorize_request->type == BLE_GATTS_AUTHORIZE_TYPE_WRITE) && (p_authorize_request->request.write.handle == p_dfu->dfu_ctrl_pt_handles.value_handle) - && + && (p_ble_evt->evt.gatts_evt.params.authorize_request.request.write.op != BLE_GATTS_OP_PREP_WRITE_REQ) && (p_ble_evt->evt.gatts_evt.params.authorize_request.request.write.op != BLE_GATTS_OP_EXEC_WRITE_REQ_NOW) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.h index 906febc43f..ac7500494c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.h @@ -28,9 +28,9 @@ #define BLE_DFU_H__ #include -#include "ble_gatts.h" -#include "ble_gap.h" -#include "ble.h" +#include "nrf_ble_gatts.h" +#include "nrf_ble_gap.h" +#include "nrf_ble.h" #include "ble_srv_common.h" #define BLE_DFU_SERVICE_UUID 0x1530 /**< The UUID of the DFU Service. */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.c index 44827bdc05..ee031689fc 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.c @@ -11,7 +11,7 @@ */ #include "ble_advdata.h" -#include "ble_gap.h" +#include "nrf_ble_gap.h" #include "ble_srv_common.h" #include "sdk_common.h" @@ -156,7 +156,7 @@ static uint32_t name_encode(const ble_advdata_t * p_advdata, err_code = sd_ble_gap_device_name_get(&p_encoded_data[(*p_offset) + ADV_AD_DATA_OFFSET], &actual_length); VERIFY_SUCCESS(err_code); - + // Check if device intend to use short name and it can fit available data size. if ((p_advdata->name_type == BLE_ADVDATA_FULL_NAME) && (actual_length <= rem_adv_data_len)) { @@ -312,7 +312,7 @@ static uint32_t uuid_list_sized_encode(const ble_advdata_uuid_list_t * p_uuid_li uint32_t err_code; uint8_t encoded_size; ble_uuid_t uuid = p_uuid_list->p_uuids[i]; - + // Find encoded uuid size. err_code = sd_ble_uuid_encode(&uuid, &encoded_size, NULL); VERIFY_SUCCESS(err_code); @@ -321,7 +321,7 @@ static uint32_t uuid_list_sized_encode(const ble_advdata_uuid_list_t * p_uuid_li if (encoded_size == uuid_size) { uint8_t heading_bytes = (is_heading_written) ? 0 : ADV_AD_DATA_OFFSET; - + // Check for buffer overflow if (((*p_offset) + encoded_size + heading_bytes) > max_size) { @@ -405,9 +405,9 @@ static uint32_t conn_int_check(const ble_advdata_conn_int_t *p_conn_int) } // Check Maximum Connection Interval. - if ((p_conn_int->max_conn_interval < 0x0006) || + if ((p_conn_int->max_conn_interval < 0x0006) || ( - (p_conn_int->max_conn_interval > 0x0c80) && + (p_conn_int->max_conn_interval > 0x0c80) && (p_conn_int->max_conn_interval != 0xffff) ) ) @@ -483,10 +483,10 @@ static uint32_t manuf_specific_data_encode(const ble_advdata_manuf_data_t * p_ma *p_offset += ADV_LENGTH_FIELD_SIZE; p_encoded_data[*p_offset] = BLE_GAP_AD_TYPE_MANUFACTURER_SPECIFIC_DATA; *p_offset += ADV_AD_TYPE_FIELD_SIZE; - + // Encode Company Identifier. *p_offset += uint16_encode(p_manuf_sp_data->company_identifier, &p_encoded_data[*p_offset]); - + // Encode additional manufacturer specific data. if (p_manuf_sp_data->data.size > 0) { @@ -571,7 +571,7 @@ uint32_t adv_data_encode(ble_advdata_t const * const p_advdata, max_size); VERIFY_SUCCESS(err_code); } - + // Encode Security Manager TK value if (NULL != p_advdata->p_tk_value) { @@ -605,7 +605,7 @@ uint32_t adv_data_encode(ble_advdata_t const * const p_advdata, { err_code = flags_encode(p_advdata->flags, p_encoded_data, p_len, max_size); VERIFY_SUCCESS(err_code); - } + } // Encode TX power level. if (p_advdata->p_tx_power_level != NULL) @@ -616,7 +616,7 @@ uint32_t adv_data_encode(ble_advdata_t const * const p_advdata, max_size); VERIFY_SUCCESS(err_code); } - + // Encode 'more available' uuid list. if (p_advdata->uuids_more_available.uuid_cnt > 0) { diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.h index dcf4f92f0c..1e9094b13d 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.h @@ -25,7 +25,7 @@ #include #include #include -#include "ble.h" +#include "nrf_ble.h" #include "app_util.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.c index ddc1ba924f..9579ebba1c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.c @@ -13,7 +13,7 @@ #include "ble_conn_params.h" #include #include "nordic_common.h" -#include "ble_hci.h" +#include "nrf_ble_hci.h" #include "app_timer.h" #include "ble_srv_common.h" #include "app_util.h" @@ -35,7 +35,7 @@ static bool is_conn_params_ok(ble_gap_conn_params_t * p_conn_params) // the client's connection interval. if ( (p_conn_params->max_conn_interval >= m_preferred_conn_params.min_conn_interval) - && + && (p_conn_params->max_conn_interval <= m_preferred_conn_params.max_conn_interval) ) { diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.h index 998357371c..9c0f38ac95 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.h @@ -22,7 +22,7 @@ #define BLE_CONN_PARAMS_H__ #include -#include "ble.h" +#include "nrf_ble.h" #include "ble_srv_common.h" /**@brief Connection Parameters Module event type. */ @@ -58,7 +58,7 @@ typedef struct /**@brief Function for initializing the Connection Parameters module. * - * @note If the negotiation procedure should be triggered when notification/indication of + * @note If the negotiation procedure should be triggered when notification/indication of * any characteristic is enabled by the peer, then this function must be called after * having initialized the services. * @@ -83,7 +83,7 @@ uint32_t ble_conn_params_stop(void); /**@brief Function for changing the current connection parameters to a new set. * - * @details Use this function to change the connection parameters to a new set of parameter + * @details Use this function to change the connection parameters to a new set of parameter * (ie different from the ones given at init of the module). * This function is usefull for scenario where most of the time the application * needs a relatively big connection interval, and just sometimes, for a temporary diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.c index 0e119df40d..8ee0226dc5 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.c @@ -14,7 +14,7 @@ #include #include #include -#include "ble.h" +#include "nrf_ble.h" #include "sdk_mapped_flags.h" #include "app_error.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.h index 653f7c423a..f74ab85861 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.h @@ -42,7 +42,7 @@ #include #include -#include "ble.h" +#include "nrf_ble.h" #include "sdk_mapped_flags.h" /**@brief Connection handle statuses. diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_gatt_db.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_gatt_db.h index bfe3aebcd1..15c010041a 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_gatt_db.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_gatt_db.h @@ -8,20 +8,20 @@ * WARRANTY of ANY KIND is provided. This heading must NOT be removed from * the file. */ - + /**@file * * @defgroup ble_sdk_lib_gatt_db GATT Database Service Structure * @{ * @ingroup app_common */ - + #ifndef BLE_GATT_DB_H__ #define BLE_GATT_DB_H__ #include -#include "ble.h" -#include "ble_gattc.h" +#include "nrf_ble.h" +#include "nrf_ble_gattc.h" #define BLE_GATT_DB_MAX_CHARS 5 /**< The maximum number of characteristics present in a service record. */ @@ -38,7 +38,7 @@ typedef struct */ typedef struct { - ble_uuid_t srv_uuid; /**< UUID of the service. */ + ble_uuid_t srv_uuid; /**< UUID of the service. */ uint8_t char_count; /**< Number of characteristics present in the service. */ ble_gattc_handle_range_t handle_range; /**< Service Handle Range. */ ble_gatt_db_char_t charateristics[BLE_GATT_DB_MAX_CHARS]; /**< Array of information related to the characteristics present in the service. This list can extend further than one. */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.c index 364798d196..caae48d6b2 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.c @@ -11,7 +11,7 @@ */ /* Attention! -* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile +* To maintain compliance with Nordic Semiconductor ASA�s Bluetooth profile * qualification listings, this section of source code must not be modified. */ @@ -19,7 +19,7 @@ #include #include "nordic_common.h" #include "app_error.h" -#include "ble.h" +#include "nrf_ble.h" uint8_t ble_srv_report_ref_encode(uint8_t * p_encoded_buffer, const ble_srv_report_ref_t * p_report_ref) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.h index 7942454b1f..26374ee95e 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.h @@ -23,11 +23,11 @@ #include #include -#include "ble_types.h" +#include "nrf_ble_types.h" #include "app_util.h" -#include "ble.h" -#include "ble_gap.h" -#include "ble_gatt.h" +#include "nrf_ble.h" +#include "nrf_ble_gap.h" +#include "nrf_ble_gatt.h" /** @defgroup UUID_SERVICES Service UUID definitions * @{ */ @@ -169,7 +169,7 @@ 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 that maps the parent characteristic to the Report ID(s) and * Report Type(s) defined within a Report Map characteristic. @@ -225,7 +225,7 @@ static __INLINE bool ble_srv_is_notification_enabled(uint8_t const * p_encoded_d uint16_t cccd_value = uint16_decode(p_encoded_data); return ((cccd_value & BLE_GATT_HVX_NOTIFICATION) != 0); } - + /**@brief Function for decoding a CCCD value, and then testing if indication is * enabled. * @@ -333,7 +333,7 @@ typedef struct } ble_add_descr_params_t; -/**@brief Function for adding a characteristic to a given service. +/**@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. diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager.h index 9aa465d259..99bf9e68d0 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager.h @@ -30,7 +30,7 @@ * all contextual information is flushed. For example, SMP Information Exchanged during * pairing and GATT Configuration is not retained on disconnection. * - * Note that this module allows management of contextual information but + * Note that this module allows management of contextual information but * does not provide an interface for connection management. Therefore, entering connectible * mode, connection establishment, or disconnection of a link with peer is not in scope * of this module. @@ -67,8 +67,8 @@ #include #include #include "sdk_common.h" -#include "ble.h" -#include "ble_gap.h" +#include "nrf_ble.h" +#include "nrf_ble_gap.h" #include "device_manager_cnfg.h" /** @@ -79,7 +79,7 @@ * @details Possible Service/Protocol context per peer device. The Device Manager provides the * functionality of persistently storing the Service/Protocol context and can automatically * load them when needed. - * For example system attributes for a GATT Server. Based on the nature of the application, + * For example system attributes for a GATT Server. Based on the nature of the application, * not all service types may be needed. The application can specify * only the service/protocol context it wants to use at the time of registration. * @{ @@ -193,7 +193,7 @@ typedef uint8_t dm_application_instance_t; /** * @brief Connection Instance. * - * @details Identifies connection instance for an active device. This instance is allocated by the + * @details Identifies connection instance for an active device. This instance is allocated by the * device manager when a connection is established and is notified with DM_EVT_CONNECTION * with the event result NRF_SUCCESS. */ @@ -254,7 +254,7 @@ typedef struct dm_sign_key /** @brief Security keys. */ typedef struct dm_sec_keyset { - union + union { dm_enc_key_t * p_enc_key; /**< Pointer to Device Manager encryption information structure. */ } enc_key; @@ -364,7 +364,7 @@ typedef struct * @param[in] p_handle Identifies the peer for which the event is being notified. * @param[in] p_event Identifies the event, any associated parameters and parameter length. * See \ref dm_events for details on event types and their significance. - * @param[in,out] event_result Provide additional information on the event. + * @param[in,out] event_result Provide additional information on the event. * In addition to SDK error codes there is also a return value * indicating if maximum number of connections has been reached when connecting or bonding. * @@ -423,7 +423,7 @@ typedef enum * - Context Management APIs. * - Utility APIs. * - * MSCs describe usage of these APIs. + * MSCs describe usage of these APIs. * See @ref dm_msc. * @{ */ @@ -462,7 +462,7 @@ ret_code_t dm_init(dm_init_param_t const * p_init_param); * Maximum number of application instances device manager can support is determined * by DM_MAX_APPLICATIONS. * - * All applications must be registered before initiating or accepting connections from the peer. + * All applications must be registered before initiating or accepting connections from the peer. * * @param[in] p_appl_param Application parameters. * @param[out] p_appl_instance Application Instance Identifier in case registration is successful. @@ -551,7 +551,7 @@ ret_code_t dm_security_status_req(dm_handle_t const * p_handle, dm_security_stat * @param[in,out] p_whitelist Pointer where created whitelist is provided to the application. * * @note 'addr_count' and 'irk_count' fields of the structure should be populated with the maximum - * number of devices that the application wishes to request in the whitelist. + * number of devices that the application wishes to request in the whitelist. * If the number of bonded devices is less than requested, the fields are updated with that number of devices. * If the number of devices are more than requested, the module will populate the list * with devices in the order the bond was established with the peer devices. Also, if this routine is @@ -686,7 +686,7 @@ ret_code_t dm_service_context_get(dm_handle_t const * p_handle, * * @details This API allows application to delete a Service Context identified for a peer device * identified by the 'p_handle' parameter. If this API returns NRF_SUCCESS, - * DM_EVT_SERVICE_CONTEXT_DELETED event is notified to the application. + * DM_EVT_SERVICE_CONTEXT_DELETED event is notified to the application. * Event result is notified along with the event and indicates success or failure of this * procedure. * @@ -830,7 +830,7 @@ ret_code_t dm_peer_addr_get(dm_handle_t const * p_handle, * @retval NRF_ERROR_INVALID_PARAM If this procedure is requested while connected to the peer or if the address * type was set to BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE. * - * @note Setting or updating a peer's device address is permitted + * @note Setting or updating a peer's device address is permitted * only for a peer that is bonded and disconnected. * @note Updated address is reflected only after DM_EVT_DEVICE_CONTEXT_STORED is notified to the * application for this bonded device instance. In order to avoid abnormal behaviour, it is @@ -871,8 +871,8 @@ ret_code_t dm_distributed_keys_get(dm_handle_t const * p_handle, * @brief Function for getting the corresponding dm_handle_t based on the connection handle. * * @param[in] conn_handle Connection handle as provided by the SoftDevice. - * @param[in,out] p_handle Pointer to the p_handle containg the application instance for the - * registered application. If the application instance is valid then + * @param[in,out] p_handle Pointer to the p_handle containg the application instance for the + * registered application. If the application instance is valid then * the p_handle will be filled with requested data. * * @retval NRF_SUCCESS On success, else an error code indicating reason for failure. @@ -885,4 +885,3 @@ ret_code_t dm_handle_get(uint16_t conn_handle, dm_handle_t * p_handle); /** @} */ /** @} */ #endif // DEVICE_MANAGER_H__ - diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager_peripheral.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager_peripheral.c index 738151edfb..e6e0b872a5 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager_peripheral.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager_peripheral.c @@ -12,7 +12,7 @@ #include "device_manager.h" #include "app_trace.h" #include "pstorage.h" -#include "ble_hci.h" +#include "nrf_ble_hci.h" #include "app_error.h" #if defined ( __CC_ARM ) @@ -189,7 +189,7 @@ typedef enum * @defgroup api_param_check API Parameters check macros. * * @details Macros for verifying parameters passed to the module in the APIs. These macros - * could be mapped to nothing in the final version of the code in order to save execution + * could be mapped to nothing in the final version of the code in order to save execution * time and program size. * @{ */ @@ -362,7 +362,7 @@ typedef enum /**@brief Peer identification information. */ typedef struct -{ +{ ble_gap_id_key_t peer_id; /**< IRK and/or address of peer. */ uint16_t ediv; /**< Peer's encrypted diversifier. */ uint8_t id_bitmap; /**< Contains information if above field is valid. */ @@ -602,11 +602,11 @@ static __INLINE void application_instance_init(uint32_t index) static __INLINE void connection_instance_init(uint32_t index) { DM_TRC("[DM]: Initializing Connection Instance 0x%08X.\r\n", index); - + m_connection_table[index].state = STATE_IDLE; m_connection_table[index].conn_handle = BLE_CONN_HANDLE_INVALID; m_connection_table[index].bonded_dev_id = DM_INVALID_ID; - + memset(&m_connection_table[index].peer_addr, 0, sizeof (ble_gap_addr_t)); } @@ -618,7 +618,7 @@ static __INLINE void connection_instance_init(uint32_t index) static __INLINE void peer_instance_init(uint32_t index) { DM_TRC("[DM]: Initializing Peer Instance 0x%08X.\r\n", index); - + memset(m_peer_table[index].peer_id.id_addr_info.addr, 0, BLE_GAP_ADDR_LEN); memset(m_peer_table[index].peer_id.id_info.irk, 0, BLE_GAP_SEC_KEY_LEN); @@ -735,7 +735,7 @@ static __INLINE ret_code_t device_instance_allocate(uint8_t * p_dev err_code = NRF_SUCCESS; DM_LOG("[DM]: Allocated device instance 0x%02X\r\n", index); - + break; } } @@ -789,7 +789,7 @@ static ret_code_t device_instance_find(ble_gap_addr_t const * p_addr, uint32_t * uint32_t index; err_code = NRF_ERROR_NOT_FOUND; - + if (NULL != p_addr) { DM_TRC("[DM]: Searching for device 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X.\r\n", @@ -872,12 +872,12 @@ static __INLINE uint32_t connection_instance_allocate(uint32_t * p_instance) if (err_code == NRF_SUCCESS) { - DM_LOG("[DM]:[%02X]: Connection Instance Allocated.\r\n", (*p_instance)); + DM_LOG("[DM]:[%02X]: Connection Instance Allocated.\r\n", (*p_instance)); m_connection_table[*p_instance].state = STATE_CONNECTED; } else { - DM_LOG("[DM]: No free connection instances available\r\n"); + DM_LOG("[DM]: No free connection instances available\r\n"); err_code = NRF_ERROR_NO_MEM; } @@ -2716,7 +2716,7 @@ void dm_ble_evt_handler(ble_evt_t * p_ble_evt) p_ble_evt->evt.gap_evt.params.sec_params_request.peer_params.bond); keys_exchanged.keys_peer.p_enc_key = NULL; - keys_exchanged.keys_peer.p_id_key = &m_peer_table[m_connection_table[index].bonded_dev_id].peer_id; + keys_exchanged.keys_peer.p_id_key = &m_peer_table[m_connection_table[index].bonded_dev_id].peer_id; keys_exchanged.keys_peer.p_sign_key = NULL; keys_exchanged.keys_peer.p_pk = NULL; keys_exchanged.keys_own.p_enc_key = &m_bond_table[index].peer_enc_key; @@ -2726,7 +2726,7 @@ void dm_ble_evt_handler(ble_evt_t * p_ble_evt) err_code = sd_ble_gap_sec_params_reply(p_ble_evt->evt.gap_evt.conn_handle, BLE_GAP_SEC_STATUS_SUCCESS, - &m_application_table[0].sec_param, + &m_application_table[0].sec_param, &keys_exchanged); if (err_code != NRF_SUCCESS) @@ -2735,19 +2735,19 @@ void dm_ble_evt_handler(ble_evt_t * p_ble_evt) event_result = err_code; notify_app = false; } - + } else { - //Bond/key refresh. + //Bond/key refresh. DM_LOG("[DM]: !!! Bond/key refresh !!!\r\n"); //Set the update flag for bond data. m_connection_table[index].state |= STATE_BOND_INFO_UPDATE; event.event_id = DM_EVT_SECURITY_SETUP_REFRESH; - + err_code = sd_ble_gap_sec_params_reply(p_ble_evt->evt.gap_evt.conn_handle, BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP, - NULL, + NULL, NULL); if (err_code != NRF_SUCCESS) @@ -2756,7 +2756,7 @@ void dm_ble_evt_handler(ble_evt_t * p_ble_evt) event_result = err_code; notify_app = false; } - + } break; @@ -2846,7 +2846,7 @@ void dm_ble_evt_handler(ble_evt_t * p_ble_evt) { //Lost bond case, generate a security refresh event! memset(m_gatts_table[index].attributes, 0, DM_GATT_SERVER_ATTR_MAX_SIZE); - + event.event_id = DM_EVT_SECURITY_SETUP_REFRESH; m_connection_table[index].state |= STATE_PAIRING_PENDING; m_connection_table[index].state |= STATE_BOND_INFO_UPDATE; @@ -2863,7 +2863,7 @@ void dm_ble_evt_handler(ble_evt_t * p_ble_evt) if (err_code != NRF_SUCCESS) { DM_ERR("[DM]:[CI 0x%02X]:[DI 0x%02X]: Failed to apply service context\r\n", - handle.connection_id, + handle.connection_id, handle.device_id); event_result = DM_SERVICE_CONTEXT_NOT_APPLIED; @@ -2871,7 +2871,7 @@ void dm_ble_evt_handler(ble_evt_t * p_ble_evt) } event_result = NRF_SUCCESS; notify_app = true; - + break; case BLE_GATTS_EVT_SYS_ATTR_MISSING: @@ -2883,14 +2883,14 @@ void dm_ble_evt_handler(ble_evt_t * p_ble_evt) case BLE_GAP_EVT_SEC_REQUEST: DM_LOG("[DM]: >> BLE_GAP_EVT_SEC_REQUEST\r\n"); - + //Verify if the device is already bonded, and if it is bonded, initiate encryption. - //If the device is not bonded, an instance needs to be allocated in order to initiate - //bonding. The application have to initiate the procedure, the module will not do this + //If the device is not bonded, an instance needs to be allocated in order to initiate + //bonding. The application have to initiate the procedure, the module will not do this //automatically. event.event_id = DM_EVT_SECURITY_SETUP; notify_app = true; - + break; default: diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.c index fdd5a9b6a8..29fcd74a84 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.c @@ -13,7 +13,7 @@ #include "gatt_cache_manager.h" -#include "ble_gap.h" +#include "nrf_ble_gap.h" #include "ble_conn_state.h" #include "peer_manager_types.h" #include "peer_manager_internal.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.h index 1464563263..eeff17235e 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.h @@ -16,8 +16,8 @@ #include #include "sdk_errors.h" -#include "ble.h" -#include "ble_gap.h" +#include "nrf_ble.h" +#include "nrf_ble_gap.h" #include "peer_manager_types.h" @@ -202,7 +202,7 @@ ret_code_t gcm_local_db_cache_get(pm_peer_id_t peer_id, pm_peer_data_local_gatt_ */ void gcm_local_database_has_changed(void); -/** @} +/** @} * @endcond */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.c index 095921de11..08e402a3c7 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.c @@ -13,7 +13,7 @@ #include "gattc_cache_manager.h" -#include "ble_gap.h" +#include "nrf_ble_gap.h" #include "ble_conn_state.h" #include "peer_manager_types.h" #include "peer_database.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.h index c095a6d069..a9acf0bf3f 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.h @@ -16,8 +16,8 @@ #include #include "sdk_errors.h" -#include "ble.h" -#include "ble_gap.h" +#include "nrf_ble.h" +#include "nrf_ble_gap.h" #include "peer_manager_types.h" @@ -98,8 +98,8 @@ ret_code_t gccm_remote_db_retrieve(pm_peer_id_t peer_id, uint32_t * p_n_services); -/** @} - * @endcond +/** @} + * @endcond */ #endif /* GATTC_CACHE_MANAGER_H__ */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.c index 19c46327a5..4acb4294c8 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.c @@ -14,7 +14,7 @@ #include "gatts_cache_manager.h" #include -#include "ble_gap.h" +#include "nrf_ble_gap.h" #include "ble_conn_state.h" #include "peer_manager_types.h" #include "peer_manager_internal.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.h index 505fe25a9e..bf2f9f1894 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.h @@ -16,8 +16,8 @@ #include #include "sdk_errors.h" -#include "ble.h" -#include "ble_gap.h" +#include "nrf_ble.h" +#include "nrf_ble_gap.h" #include "peer_manager_types.h" @@ -194,7 +194,7 @@ ret_code_t gscm_service_changed_ind_send(uint16_t conn_handle); */ void gscm_db_change_notification_done(pm_peer_id_t peer_id); -/** @} +/** @} * @endcond */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.c index d54f275324..28ab3bb640 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.c @@ -15,7 +15,7 @@ #include #include "nrf_soc.h" -#include "ble_gap.h" +#include "nrf_ble_gap.h" #include "ble_conn_state.h" #include "peer_manager_types.h" #include "peer_database.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.h index 683ea9b633..da4a909755 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.h @@ -16,8 +16,8 @@ #include #include "sdk_errors.h" -#include "ble.h" -#include "ble_gap.h" +#include "nrf_ble.h" +#include "nrf_ble_gap.h" #include "peer_manager_types.h" @@ -235,6 +235,38 @@ ret_code_t im_whitelist_create(pm_peer_id_t * p_peer_ids, */ bool im_address_resolve(ble_gap_addr_t const * p_addr, ble_gap_irk_t const * p_irk); +/**@brief Function for calculating the ah() hash function described in Bluetooth core specification + * 4.2 section 3.H.2.2.2. + * + * @detail BLE uses a hash function to calculate the first half of a resolvable address + * from the second half of the address and an irk. This function will use the ECB + * periferal to hash these data acording to the Bluetooth core specification. + * + * @note The ECB expect little endian input and output. + * This function expect big endian and will reverse the data as necessary. + * + * @param[in] p_k The key used in the hash function. + * For address resolution this is should be the irk. + * The array must have a length of 16. + * @param[in] p_r The rand used in the hash function. For generating a new address + * this would be a random number. For resolving a resolvable address + * this would be the last half of the address being resolved. + * The array must have a length of 3. + * @param[out] p_local_hash The result of the hash operation. For address resolution this + * will match the first half of the address being resolved if and only + * if the irk used in the hash function is the same one used to generate + * the address. + * The array must have a length of 16. + * + * @note ====IMPORTANT==== + * This is a special modification to the original nRF5x SDK required by the mbed BLE API + * to be able to generate BLE private resolvable addresses. This function is used by + * the BLE API implementation for nRF5xSecurityManager::getAddressFromBondTable() in the + * ble-nrf52832 yotta module. + * ================= + */ +void ah(uint8_t const * p_k, uint8_t const * p_r, uint8_t * p_local_hash); + /** @} * @endcond */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data_storage.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data_storage.h index c9c841d770..859e143606 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data_storage.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data_storage.h @@ -17,7 +17,7 @@ #include #include "sdk_errors.h" -#include "ble_gap.h" +#include "nrf_ble_gap.h" #include "peer_manager_types.h" #include "peer_manager_internal.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_id.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_id.h index 678eb7e1e7..1d7de22ba2 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_id.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_id.h @@ -17,7 +17,7 @@ #include #include "sdk_errors.h" -#include "ble_gap.h" +#include "nrf_ble_gap.h" #include "peer_manager_types.h" @@ -125,7 +125,7 @@ pm_peer_id_t peer_id_get_next_deleted(pm_peer_id_t prev_peer_id); */ uint32_t peer_id_n_ids(void); -/** @} +/** @} * @endcond */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager.h index 6bade2c7f8..34cb6716a6 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager.h @@ -32,8 +32,8 @@ #include #include #include "sdk_common.h" -#include "ble.h" -#include "ble_gap.h" +#include "nrf_ble.h" +#include "nrf_ble_gap.h" #include "peer_manager_types.h" #include "peer_database.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_internal.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_internal.h index 46055a9796..a10bb7fcc3 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_internal.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_internal.h @@ -16,8 +16,8 @@ #include #include "sdk_errors.h" -#include "ble.h" -#include "ble_gap.h" +#include "nrf_ble.h" +#include "nrf_ble_gap.h" #include "peer_manager_types.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_types.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_types.h index 00cb89cf03..ac7fe6f656 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_types.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_types.h @@ -25,8 +25,8 @@ #include #include #include "nrf.h" -#include "ble_gap.h" -#include "ble_hci.h" +#include "nrf_ble_gap.h" +#include "nrf_ble_hci.h" #include "app_util.h" #include "app_util_platform.h" #include "ble_gatt_db.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.c index 0526638a86..946f388c3c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.c @@ -14,8 +14,8 @@ #include "security_dispatcher.h" #include -#include "ble.h" -#include "ble_gap.h" +#include "nrf_ble.h" +#include "nrf_ble_gap.h" #include "ble_conn_state.h" #include "peer_manager_types.h" #include "peer_database.h" @@ -881,4 +881,3 @@ void smd_ble_evt_handler(ble_evt_t * p_ble_evt) break; }; } - diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.h index 8593c3b7dc..9ffaa8b0d0 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.h @@ -16,8 +16,8 @@ #include #include "sdk_errors.h" -#include "ble.h" -#include "ble_gap.h" +#include "nrf_ble.h" +#include "nrf_ble_gap.h" #include "peer_manager_types.h" @@ -247,7 +247,7 @@ ret_code_t smd_link_secure(uint16_t conn_handle, ble_gap_sec_params_t * p_sec_params, bool force_repairing); -/** @} +/** @} * @endcond */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_manager.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_manager.h index a144df1de0..d3aedbbcdf 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_manager.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_manager.h @@ -16,8 +16,8 @@ #include #include "sdk_errors.h" -#include "ble.h" -#include "ble_gap.h" +#include "nrf_ble.h" +#include "nrf_ble_gap.h" #include "peer_manager_types.h" #include "security_dispatcher.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_app_handler.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_app_handler.c index 806df80899..341cd2214b 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_app_handler.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_app_handler.c @@ -15,8 +15,8 @@ #include "bootloader_util.h" #include "nrf.h" #include "nrf_sdm.h" -#include "ble_gatt.h" -#include "ble_gatts.h" +#include "nrf_ble_gatt.h" +#include "nrf_ble_gatts.h" #include "app_error.h" #include "dfu_ble_svc.h" #include "device_manager.h" @@ -165,7 +165,7 @@ void dfu_app_on_dfu_evt(ble_dfu_t * p_dfu, ble_dfu_evt_t * p_evt) default: { - // Unsupported event received from DFU Service. + // Unsupported event received from DFU Service. // Send back BLE_DFU_RESP_VAL_NOT_SUPPORTED message to peer. uint32_t err_code = ble_dfu_response_send(p_dfu, BLE_DFU_START_PROCEDURE, @@ -186,7 +186,7 @@ void dfu_app_reset_prepare_set(dfu_app_reset_prepare_t reset_prepare_func) void dfu_app_dm_appl_instance_set(dm_application_instance_t app_instance) { uint32_t err_code; - + err_code = dm_application_instance_set(&app_instance, &m_dm_handle); APP_ERROR_CHECK(err_code); } diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_ble_svc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_ble_svc.h index d1cc44057f..54bdfa9e51 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_ble_svc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_ble_svc.h @@ -9,39 +9,39 @@ * the file. * */ - + /** @file * - * @defgroup nrf_dfu_ble_svc DFU BLE SVC + * @defgroup nrf_dfu_ble_svc DFU BLE SVC * @{ * * @brief DFU BLE SVC in bootloader. The DFU BLE SuperVisor Calls allow an application to execute - * functions in the installed bootloader. + * functions in the installed bootloader. * - * @details This module implements handling of SuperVisor Calls in the bootloader. + * @details This module implements handling of SuperVisor Calls in the bootloader. * SuperVisor Calls allow for an application to execute calls into the bootloader. - * Currently, it is possible to exchange bonding information (like keys) from the - * application to a bootloader supporting DFU OTA using BLE, so the update process can be + * Currently, it is possible to exchange bonding information (like keys) from the + * application to a bootloader supporting DFU OTA using BLE, so the update process can be * done through an already existing bond. * - * @note The application must make sure that all SuperVisor Calls (SVC) are forwarded to the - * bootloader to ensure correct behavior. Forwarding of SVCs to the bootloader is - * done using the SoftDevice SVC @ref sd_softdevice_vector_table_base_set with the value + * @note The application must make sure that all SuperVisor Calls (SVC) are forwarded to the + * bootloader to ensure correct behavior. Forwarding of SVCs to the bootloader is + * done using the SoftDevice SVC @ref sd_softdevice_vector_table_base_set with the value * present in @c NRF_UICR->NRFFW[0]. */ - + #ifndef DFU_BLE_SVC_H__ #define DFU_BLE_SVC_H__ #include "nrf_svc.h" #include -#include "ble_gap.h" +#include "nrf_ble_gap.h" #include "nrf.h" #include "nrf_soc.h" #include "nrf_error_sdm.h" #define BOOTLOADER_SVC_BASE 0x0 /**< The number of the lowest SVC number reserved for the bootloader. */ -#define SYSTEM_SERVICE_ATT_SIZE 8 /**< Size of the system service attribute length including CRC-16 at the end. */ +#define SYSTEM_SERVICE_ATT_SIZE 8 /**< Size of the system service attribute length including CRC-16 at the end. */ /**@brief The SVC numbers used by the SVC functions in the SoC library. */ enum BOOTLOADER_SVCS diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error.c index 4a0933cadc..89a6cb27d9 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error.c @@ -43,6 +43,7 @@ */ /*lint -save -e14 */ +#if 0 void app_error_handler(ret_code_t error_code, uint32_t line_num, const uint8_t * p_file_name) { error_info_t error_info = @@ -55,6 +56,7 @@ void app_error_handler(ret_code_t error_code, uint32_t line_num, const uint8_t * UNUSED_VARIABLE(error_info); } +#endif /*lint -save -e14 */ void app_error_handler_bare(ret_code_t error_code) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/ble_stack_handler_types.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/ble_stack_handler_types.h index ff600f25d9..f931cffaac 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/ble_stack_handler_types.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/ble_stack_handler_types.h @@ -25,7 +25,7 @@ #ifdef BLE_STACK_SUPPORT_REQD #include -#include "ble.h" +#include "nrf_ble.h" #include "nrf_sdm.h" #include "app_error.h" #include "app_util.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.c index 82da1a142a..5f9f9aa0ae 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.c @@ -32,7 +32,7 @@ #elif defined(ANT_STACK_SUPPORT_REQD) #include "ant_interface.h" #elif defined(BLE_STACK_SUPPORT_REQD) - #include "ble.h" + #include "nrf_ble.h" #endif @@ -437,7 +437,7 @@ uint32_t sd_check_ram_start(uint32_t sd_req_ram_start) #endif //NRF_LOG_USES_RTT return NRF_SUCCESS; } -#endif//defined(S130) || defined(S132) || defined(S332) +#endif//defined(S130) || defined(S132) || defined(S332) return NRF_SUCCESS; } diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.h index 62b8bea0f3..02932db356 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.h @@ -40,7 +40,7 @@ #include "ble_stack_handler_types.h" #include "ant_stack_handler_types.h" #if defined(BLE_STACK_SUPPORT_REQD) - #include "ble.h" + #include "nrf_ble.h" #endif #include "app_ram_base.h" #define SOFTDEVICE_SCHED_EVT_SIZE 0 /**< Size of button events being passed through the scheduler (is to be used for computing the maximum size of scheduler events). For SoftDevice events, this size is 0, since the events are being pulled in the event handler. */ @@ -124,7 +124,7 @@ bool softdevice_handler_isEnabled(void); * used, this buffer must be provided by the application. The * buffer must be large enough to hold the biggest stack event the * application is supposed to handle. The buffer must be aligned to - * a 4 byte boundary. This parameter is unused if BLE stack support + * a 4 byte boundary. This parameter is unused if BLE stack support * is not required. * @param[in] ble_evt_buffer_size Size of SoftDevice BLE event buffer. This parameter is unused if * BLE stack support is not required. @@ -182,7 +182,7 @@ uint32_t softdevice_sys_evt_handler_set(sys_evt_handler_t sys_evt_handler); * * @retval NRF_SUCCESS If the operation was successful. */ -uint32_t softdevice_enable_get_default_config(uint8_t central_links_count, +uint32_t softdevice_enable_get_default_config(uint8_t central_links_count, uint8_t periph_links_count, ble_enable_params_t * p_ble_enable_params); From 38671de942c7192ada24275b35d5a1b97ad67eba Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Fri, 17 Jun 2016 11:18:24 +0100 Subject: [PATCH 18/67] Remove unused BLE services. --- .../ble/ble_services/ble_ancs_c/ble_ancs_c.c | 812 ---------- .../ble/ble_services/ble_ancs_c/ble_ancs_c.h | 419 ----- .../ble/ble_services/ble_ans_c/ble_ans_c.c | 544 ------- .../ble/ble_services/ble_ans_c/ble_ans_c.h | 348 ----- .../sdk/ble/ble_services/ble_bas/ble_bas.c | 316 ---- .../sdk/ble/ble_services/ble_bas/ble_bas.h | 133 -- .../ble/ble_services/ble_bas_c/ble_bas_c.c | 370 ----- .../ble/ble_services/ble_bas_c/ble_bas_c.h | 212 --- .../sdk/ble/ble_services/ble_bps/ble_bps.c | 439 ------ .../sdk/ble/ble_services/ble_bps/ble_bps.h | 161 -- .../sdk/ble/ble_services/ble_cscs/ble_cscs.c | 443 ------ .../sdk/ble/ble_services/ble_cscs/ble_cscs.h | 161 -- .../ble/ble_services/ble_cscs/ble_sc_ctrlpt.c | 638 -------- .../ble/ble_services/ble_cscs/ble_sc_ctrlpt.h | 211 --- .../ble/ble_services/ble_cts_c/ble_cts_c.c | 340 ---- .../ble/ble_services/ble_cts_c/ble_cts_c.h | 219 --- .../sdk/ble/ble_services/ble_dis/ble_dis.c | 277 ---- .../sdk/ble/ble_services/ble_dis/ble_dis.h | 98 -- .../sdk/ble/ble_services/ble_gls/ble_gls.c | 1273 --------------- .../sdk/ble/ble_services/ble_gls/ble_gls.h | 264 ---- .../sdk/ble/ble_services/ble_gls/ble_gls_db.c | 112 -- .../sdk/ble/ble_services/ble_gls/ble_gls_db.h | 84 - .../sdk/ble/ble_services/ble_hids/ble_hids.c | 1380 ----------------- .../sdk/ble/ble_services/ble_hids/ble_hids.h | 314 ---- .../sdk/ble/ble_services/ble_hrs/ble_hrs.c | 440 ------ .../sdk/ble/ble_services/ble_hrs/ble_hrs.h | 192 --- .../ble/ble_services/ble_hrs_c/ble_hrs_c.c | 331 ---- .../ble/ble_services/ble_hrs_c/ble_hrs_c.h | 215 --- .../sdk/ble/ble_services/ble_hts/ble_hts.c | 428 ----- .../sdk/ble/ble_services/ble_hts/ble_hts.h | 160 -- .../sdk/ble/ble_services/ble_ias/ble_ias.c | 173 --- .../sdk/ble/ble_services/ble_ias/ble_ias.h | 113 -- .../ble/ble_services/ble_ias_c/ble_ias_c.c | 189 --- .../ble/ble_services/ble_ias_c/ble_ias_c.h | 168 -- .../sdk/ble/ble_services/ble_lbs/ble_lbs.c | 228 --- .../sdk/ble/ble_services/ble_lbs/ble_lbs.h | 104 -- .../ble/ble_services/ble_lbs_c/ble_lbs_c.c | 362 ----- .../ble/ble_services/ble_lbs_c/ble_lbs_c.h | 191 --- .../sdk/ble/ble_services/ble_lls/ble_lls.c | 214 --- .../sdk/ble/ble_services/ble_lls/ble_lls.h | 116 -- .../sdk/ble/ble_services/ble_nus/ble_nus.c | 295 ---- .../sdk/ble/ble_services/ble_nus/ble_nus.h | 114 -- .../ble/ble_services/ble_nus_c/ble_nus_c.c | 212 --- .../ble/ble_services/ble_nus_c/ble_nus_c.h | 192 --- .../sdk/ble/ble_services/ble_rscs/ble_rscs.c | 385 ----- .../sdk/ble/ble_services/ble_rscs/ble_rscs.h | 144 -- .../ble/ble_services/ble_rscs_c/ble_rscs_c.c | 360 ----- .../ble/ble_services/ble_rscs_c/ble_rscs_c.h | 149 -- .../sdk/ble/ble_services/ble_tps/ble_tps.c | 139 -- .../sdk/ble/ble_services/ble_tps/ble_tps.h | 86 - .../experimental_ble_lns/ble_ln_common.h | 58 - .../experimental_ble_lns/ble_ln_cp.c | 806 ---------- .../experimental_ble_lns/ble_ln_cp.h | 219 --- .../experimental_ble_lns/ble_ln_db.c | 127 -- .../experimental_ble_lns/ble_ln_db.h | 86 - .../experimental_ble_lns/ble_lns.c | 1001 ------------ .../experimental_ble_lns/ble_lns.h | 328 ---- 57 files changed, 17893 deletions(-) delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ancs_c/ble_ancs_c.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ancs_c/ble_ancs_c.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ans_c/ble_ans_c.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ans_c/ble_ans_c.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas/ble_bas.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas/ble_bas.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas_c/ble_bas_c.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas_c/ble_bas_c.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bps/ble_bps.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bps/ble_bps.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_cscs.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_cscs.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_sc_ctrlpt.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_sc_ctrlpt.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cts_c/ble_cts_c.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cts_c/ble_cts_c.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dis/ble_dis.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dis/ble_dis.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls_db.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls_db.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hids/ble_hids.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hids/ble_hids.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs/ble_hrs.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs/ble_hrs.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs_c/ble_hrs_c.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs_c/ble_hrs_c.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hts/ble_hts.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hts/ble_hts.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias/ble_ias.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias/ble_ias.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias_c/ble_ias_c.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias_c/ble_ias_c.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs/ble_lbs.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs/ble_lbs.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs_c/ble_lbs_c.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs_c/ble_lbs_c.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lls/ble_lls.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lls/ble_lls.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus/ble_nus.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus/ble_nus.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus_c/ble_nus_c.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus_c/ble_nus_c.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs/ble_rscs.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs/ble_rscs.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs_c/ble_rscs_c.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs_c/ble_rscs_c.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_tps/ble_tps.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_tps/ble_tps.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_common.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_cp.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_cp.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_db.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_db.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_lns.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_lns.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ancs_c/ble_ancs_c.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ancs_c/ble_ancs_c.c deleted file mode 100644 index 4ad72136c6..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ancs_c/ble_ancs_c.c +++ /dev/null @@ -1,812 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - */ - -/* Disclaimer: This client implementation of the Apple Notification Center Service can and will be changed at any time by Nordic Semiconductor ASA. - * Server implementations such as the ones found in iOS can be changed at any time by Apple and may cause this client implementation to stop working. - */ - -#include "ble_ancs_c.h" -#include "ble_err.h" -#include "ble_srv_common.h" -#include "nrf_assert.h" -#include "device_manager.h" -#include "ble_db_discovery.h" -#include "app_error.h" -#include "app_trace.h" -#include "sdk_common.h" - -#define BLE_ANCS_NOTIF_EVT_ID_INDEX 0 /**< Index of the Event ID field when parsing notifications. */ -#define BLE_ANCS_NOTIF_FLAGS_INDEX 1 /**< Index of the Flags field when parsing notifications. */ -#define BLE_ANCS_NOTIF_CATEGORY_ID_INDEX 2 /**< Index of the Category ID field when parsing notifications. */ -#define BLE_ANCS_NOTIF_CATEGORY_CNT_INDEX 3 /**< Index of the Category Count field when parsing notifications. */ -#define BLE_ANCS_NOTIF_NOTIF_UID 4 /**< Index of the Notification UID field when patsin notifications. */ - -#define ANCS_LOG NRF_LOG_PRINTF_DEBUG /**< Debug logger macro that will be used in this file to do logging of important information over UART. */ - -#define START_HANDLE_DISCOVER 0x0001 /**< Value of start handle during discovery. */ - -#define TX_BUFFER_MASK 0x07 /**< TX buffer mask. Must be a mask of contiguous zeroes followed by a contiguous sequence of ones: 000...111. */ -#define TX_BUFFER_SIZE (TX_BUFFER_MASK + 1) /**< Size of send buffer, which is 1 higher than the mask. */ -#define WRITE_MESSAGE_LENGTH 20 /**< Length of the write message for CCCD/control point. */ -#define BLE_CCCD_NOTIFY_BIT_MASK 0x0001 /**< Enable notification bit. */ - -#define BLE_ANCS_MAX_DISCOVERED_CENTRALS DEVICE_MANAGER_MAX_BONDS /**< Maximum number of discovered services that can be stored in the flash. This number should be identical to maximum number of bonded peer devices. */ - -#define TIME_STRING_LEN 15 /**< Unicode Technical Standard (UTS) #35 date format pattern "yyyyMMdd'T'HHmmSS" + "'\0'". */ - -#define DISCOVERED_SERVICE_DB_SIZE \ - CEIL_DIV(sizeof(ble_ancs_c_service_t) * BLE_ANCS_MAX_DISCOVERED_CENTRALS, sizeof(uint32_t)) /**< Size of bonded peer's database in word size (4 byte). */ - - -/**@brief ANCS request types. - */ -typedef enum -{ - READ_REQ = 1, /**< Type identifying that this tx_message is a read request. */ - WRITE_REQ /**< Type identifying that this tx_message is a write request. */ -} ancs_tx_request_t; - - -/**@brief Structure for writing a message to the central, i.e. Control Point or CCCD. - */ -typedef struct -{ - uint8_t gattc_value[WRITE_MESSAGE_LENGTH]; /**< The message to write. */ - ble_gattc_write_params_t gattc_params; /**< GATTC parameters for this message. */ -} write_params_t; - - -/**@brief Structure for holding data to be transmitted to the connected master. - */ -typedef struct -{ - uint16_t conn_handle; /**< Connection handle to be used when transmitting this message. */ - ancs_tx_request_t type; /**< Type of this message, i.e. read or write message. */ - union - { - uint16_t read_handle; /**< Read request message. */ - write_params_t write_req; /**< Write request message. */ - } req; -} tx_message_t; - - -static tx_message_t m_tx_buffer[TX_BUFFER_SIZE]; /**< Transmit buffer for messages to be transmitted to the Notification Provider. */ -static uint32_t m_tx_insert_index = 0; /**< Current index in the transmit buffer where the next message should be inserted. */ -static uint32_t m_tx_index = 0; /**< Current index in the transmit buffer from where the next message to be transmitted resides. */ - - -/**@brief 128-bit service UUID for the Apple Notification Center Service. - */ -const ble_uuid128_t ble_ancs_base_uuid128 = -{ - { - // 7905F431-B5CE-4E99-A40F-4B1E122D00D0 - 0xd0, 0x00, 0x2d, 0x12, 0x1e, 0x4b, 0x0f, 0xa4, - 0x99, 0x4e, 0xce, 0xb5, 0x31, 0xf4, 0x05, 0x79 - } -}; - - -/**@brief 128-bit control point UUID. - */ -const ble_uuid128_t ble_ancs_cp_base_uuid128 = -{ - { - // 69d1d8f3-45e1-49a8-9821-9BBDFDAAD9D9 - 0xd9, 0xd9, 0xaa, 0xfd, 0xbd, 0x9b, 0x21, 0x98, - 0xa8, 0x49, 0xe1, 0x45, 0xf3, 0xd8, 0xd1, 0x69 - } -}; - -/**@brief 128-bit notification source UUID. -*/ -const ble_uuid128_t ble_ancs_ns_base_uuid128 = -{ - { - // 9FBF120D-6301-42D9-8C58-25E699A21DBD - 0xbd, 0x1d, 0xa2, 0x99, 0xe6, 0x25, 0x58, 0x8c, - 0xd9, 0x42, 0x01, 0x63, 0x0d, 0x12, 0xbf, 0x9f - - } -}; - -/**@brief 128-bit data source UUID. -*/ -const ble_uuid128_t ble_ancs_ds_base_uuid128 = -{ - { - // 22EAC6E9-24D6-4BB5-BE44-B36ACE7C7BFB - 0xfb, 0x7b, 0x7c, 0xce, 0x6a, 0xb3, 0x44, 0xbe, - 0xb5, 0x4b, 0xd6, 0x24, 0xe9, 0xc6, 0xea, 0x22 - } -}; - - -/**@brief Function for handling Disconnected event received from the SoftDevice. - * - * @details This function check if the disconnect event is happening on the link - * associated with the current instance of the module, if so it will set its - * conn_handle to invalid. - * - * @param[in] p_ancs Pointer to the ANCS client structure. - * @param[in] p_ble_evt Pointer to the BLE event received. - */ -static void on_disconnected(ble_ancs_c_t * p_ancs, const ble_evt_t * p_ble_evt) -{ - if (p_ancs->conn_handle == p_ble_evt->evt.gap_evt.conn_handle) - { - p_ancs->conn_handle = BLE_CONN_HANDLE_INVALID; - } -} - - -void ble_ancs_c_on_db_disc_evt(ble_ancs_c_t * p_ancs, ble_db_discovery_evt_t * p_evt) -{ - ANCS_LOG("[ANCS]: Database Discovery handler called with event 0x%x\r\n", p_evt->evt_type); - - ble_ancs_c_evt_t evt; - ble_gatt_db_char_t * p_chars; - - p_chars = p_evt->params.discovered_db.charateristics; - - // Check if the ANCS Service was discovered. - if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE && - p_evt->params.discovered_db.srv_uuid.uuid == ANCS_UUID_SERVICE && - p_evt->params.discovered_db.srv_uuid.type == p_ancs->service.service.uuid.type) - { - // Find the handles of the ANCS characteristic. - uint32_t i; - - for (i = 0; i < p_evt->params.discovered_db.char_count; i++) - { - switch (p_chars[i].characteristic.uuid.uuid) - { - case ANCS_UUID_CHAR_CONTROL_POINT: - ANCS_LOG("[ANCS]: Control Point Characteristic found.\n\r"); - memcpy(&evt.service.control_point_char, - &p_chars[i].characteristic, - sizeof(ble_gattc_char_t)); - break; - - case ANCS_UUID_CHAR_DATA_SOURCE: - ANCS_LOG("[ANCS]: Data Source Characteristic found.\n\r"); - memcpy(&evt.service.data_source_char, - &p_chars[i].characteristic, - sizeof(ble_gattc_char_t)); - evt.service.data_source_cccd.handle = p_chars[i].cccd_handle; - break; - - case ANCS_UUID_CHAR_NOTIFICATION_SOURCE: - ANCS_LOG("[ANCS]: Notification point Characteristic found.\n\r"); - memcpy(&evt.service.notif_source_char, - &p_chars[i].characteristic, - sizeof(ble_gattc_char_t)); - evt.service.notif_source_cccd.handle = p_chars[i].cccd_handle; - break; - - default: - break; - } - } - evt.evt_type = BLE_ANCS_C_EVT_DISCOVERY_COMPLETE; - evt.conn_handle = p_evt->conn_handle; - p_ancs->evt_handler(&evt); - } - else - { - evt.evt_type = BLE_ANCS_C_EVT_DISCOVERY_FAILED; - p_ancs->evt_handler(&evt); - } -} - - -/**@brief Function for passing any pending request from the buffer to the stack. - */ -static void tx_buffer_process(void) -{ - if (m_tx_index != m_tx_insert_index) - { - uint32_t err_code; - - if (m_tx_buffer[m_tx_index].type == READ_REQ) - { - err_code = sd_ble_gattc_read(m_tx_buffer[m_tx_index].conn_handle, - m_tx_buffer[m_tx_index].req.read_handle, - 0); - } - else - { - err_code = sd_ble_gattc_write(m_tx_buffer[m_tx_index].conn_handle, - &m_tx_buffer[m_tx_index].req.write_req.gattc_params); - } - if (err_code == NRF_SUCCESS) - { - ++m_tx_index; - m_tx_index &= TX_BUFFER_MASK; - } - } -} - - -/**@brief Function for parsing command id and notification id. - * Used in the @ref parse_get_notif_attrs_response state machine. - * - * @details UID and command ID will be received only once at the beginning of the first - * GATTC notification of a new attribute request for a given iOS notification. - * - * @param[in] p_ancs Pointer to an ANCS instance to which the event belongs. - * @param[in] p_data_src Pointer to data that was received from the Notification Provider. - * @param[in] index Pointer to an index that helps us keep track of the current data to be parsed. - * - * @return The next parse state. - */ -static ble_ancs_c_parse_state_t command_id_and_notif_parse(ble_ancs_c_t * p_ancs, - const uint8_t * p_data_src, - uint32_t * index) -{ - ble_ancs_c_command_id_values_t command_id; - - command_id = (ble_ancs_c_command_id_values_t) p_data_src[(*index)++]; - - if(command_id != BLE_ANCS_COMMAND_ID_GET_NOTIF_ATTRIBUTES) - { - ANCS_LOG("[ANCS]: Invalid Command ID"); - return DONE; - } - - p_ancs->evt.attr.notif_uid = uint32_decode(&p_data_src[*index]); - *index += sizeof(uint32_t); - return ATTR_ID; - -} - -/**@brief Function for parsing the id of an iOS attribute. - * Used in the @ref parse_get_notif_attrs_response state machine. - * - * @details We only request attributes that are registered with @ref ble_ancs_c_attr_add - * once they have been reveiced we stop parsing. - * - * @param[in] p_ancs Pointer to an ANCS instance to which the event belongs. - * @param[in] p_data_src Pointer to data that was received from the Notification Provider. - * @param[in] index Pointer to an index that helps us keep track of the current data to be parsed. - * - * @return The next parse state. - */ -static ble_ancs_c_parse_state_t attr_id_parse(ble_ancs_c_t * p_ancs, - const uint8_t * p_data_src, - uint32_t * index) -{ - p_ancs->evt.attr.attr_id = (ble_ancs_c_notif_attr_id_values_t) p_data_src[(*index)++]; - p_ancs->evt.attr.p_attr_data = p_ancs->ancs_attr_list[p_ancs->evt.attr.attr_id].p_attr_data; - - if (p_ancs->expected_number_of_attrs == 0) - { - ANCS_LOG("[ANCS]: All requested attributes received\n\r"); - // (*index)++; - return DONE; - } - else if (p_ancs->ancs_attr_list[p_ancs->evt.attr.attr_id].get == true) - { - ANCS_LOG("[ANCS]: Attribute ID %i \n\r", p_ancs->evt.attr.attr_id); - return ATTR_LEN1; - } - else - { - p_ancs->expected_number_of_attrs--; - return ATTR_ID; - } -} - - -/**@brief Function for parsing the length of an iOS attribute. - * Used in the @ref parse_get_notif_attrs_response state machine. - * - * @details The Length is 2 bytes. Since there is a chance we reveice the bytes in two different - * GATTC notifications, we parse only the first byte here and then set the state machine - * ready to parse the next byte. - * - * @param[in] p_ancs Pointer to an ANCS instance to which the event belongs. - * @param[in] p_data_src Pointer to data that was received from the Notification Provider. - * @param[in] index Pointer to an index that helps us keep track of the current data to be parsed. - * - * @return The next parse state. - */ -static ble_ancs_c_parse_state_t attr_len1_parse(ble_ancs_c_t * p_ancs, const uint8_t * p_data_src, uint32_t * index) -{ - p_ancs->evt.attr.attr_len = p_data_src[(*index)++]; - return ATTR_LEN2; -} - -/**@brief Function for parsing the length of an iOS attribute. - * Used in the @ref parse_get_notif_attrs_response state machine. - * - * @details Second byte of the length field. If the length is zero, it means that the attribute is not - * present and the state machine is set to parse the next attribute. - * - * @param[in] p_ancs Pointer to an ANCS instance to which the event belongs. - * @param[in] p_data_src Pointer to data that was received from the Notification Provider. - * @param[in] index Pointer to an index that helps us keep track of the current data to be parsed. - * - * @return The next parse state. - */ -static ble_ancs_c_parse_state_t attr_len2_parse(ble_ancs_c_t * p_ancs, const uint8_t * p_data_src, uint32_t * index) -{ - p_ancs->evt.attr.attr_len |= (p_data_src[(*index)++] << 8); - p_ancs->current_attr_index = 0; - - if (p_ancs->evt.attr.attr_len != 0) - { - return ATTR_DATA; - } - else - { - ANCS_LOG("[ANCS]: Attribute LEN %i \n\r", p_ancs->evt.attr.attr_len); - p_ancs->evt.evt_type = BLE_ANCS_C_EVT_NOTIF_ATTRIBUTE; - p_ancs->evt_handler(&p_ancs->evt); - return ATTR_ID; - } -} - -/**@brief Function for parsing the data of an iOS attribute. - * Used in the @ref parse_get_notif_attrs_response state machine. - * - * @details Read the data of the attribute into our local buffer. - * - * @param[in] p_ancs Pointer to an ANCS instance to which the event belongs. - * @param[in] p_data_src Pointer to data that was received from the Notification Provider. - * @param[in] index Pointer to an index that helps us keep track of the current data to be parsed. - * - * @return The next parse state. - */ -static ble_ancs_c_parse_state_t attr_data_parse(ble_ancs_c_t * p_ancs, const uint8_t * p_data_src, uint32_t * index) -{ - // We have not reached the end of the attribute, nor our max allocated internal size. - // Proceed with copying data over to our buffer. - if ( (p_ancs->current_attr_index < p_ancs->ancs_attr_list[p_ancs->evt.attr.attr_id].attr_len) - && (p_ancs->current_attr_index < p_ancs->evt.attr.attr_len)) - { - p_ancs->evt.attr.p_attr_data[p_ancs->current_attr_index++] = p_data_src[(*index)++]; - } - - // We have reached the end of the attribute, or our max allocated internal size. - // Stop copying data over to our buffer. NUL-terminate at the current index. - if ( (p_ancs->current_attr_index == p_ancs->evt.attr.attr_len) || - (p_ancs->current_attr_index == p_ancs->ancs_attr_list[p_ancs->evt.attr.attr_id].attr_len)) - { - p_ancs->evt.attr.p_attr_data[p_ancs->current_attr_index] = '\0'; - - // If our max buffer size is smaller than the remaining attribute data, we must - // increase index to skip the data until the start of the next attribute. - if (p_ancs->current_attr_index < p_ancs->evt.attr.attr_len) - { - (*index) += (p_ancs->evt.attr.attr_len - p_ancs->current_attr_index); - } - ANCS_LOG("[ANCS]: Attribute finished!\n\r"); - p_ancs->evt.evt_type = BLE_ANCS_C_EVT_NOTIF_ATTRIBUTE; - p_ancs->evt_handler(&p_ancs->evt); - return ATTR_ID; - } - return ATTR_DATA; -} - -/**@brief Function for parsing received notification attribute response data. - * - * @details The data that comes from the Notification Provider can be much longer than what - * would fit in a single GATTC notification. Therefore, this function relies on a - * state-oriented switch case. - * UID and command ID will be received only once at the beginning of the first - * GATTC notification of a new attribute request for a given iOS notification. - * After this, we can loop several ATTR_ID > LENGTH > DATA > ATTR_ID > LENGTH > DATA until - * we have received all attributes we wanted as a Notification Consumer. - * The Notification Provider can also simply stop sending attributes. - * - * |1 Byte | 4 Bytes |1 Byte |2 Bytes | X Bytes |1 Bytes| 2 Bytes| X Bytes - * +--------+-------------+-------+--------+- - - - - - - - - - +-------+--------+- - - - - - - - * | CMD_ID | NOTIF_UID |ATTR_ID| LENGTH | DATA |ATTR_ID| LENGTH | DATA - * +--------+-------------+-------+--------+- - - - - - - - - - +-------+--------+- - - - - - - - * - * @param[in] p_ancs Pointer to an ANCS instance to which the event belongs. - * @param[in] p_data_src Pointer to data that was received from the Notification Provider. - * @param[in] hvx_len Length of the data that was received from the Notification Provider. - */ -static void parse_get_notif_attrs_response(ble_ancs_c_t * p_ancs, - const uint8_t * p_data_src, - const uint16_t hvx_data_len) -{ - uint32_t index; - - for (index = 0; index < hvx_data_len;) - { - switch (p_ancs->parse_state) - { - case COMMAND_ID_AND_NOTIF_UID: - p_ancs->parse_state = command_id_and_notif_parse(p_ancs, p_data_src, &index); - break; - - case ATTR_ID: - p_ancs->parse_state = attr_id_parse(p_ancs, p_data_src, &index); - break; - - case ATTR_LEN1: - p_ancs->parse_state = attr_len1_parse(p_ancs, p_data_src, &index); - break; - - case ATTR_LEN2: - p_ancs->parse_state = attr_len2_parse(p_ancs, p_data_src, &index); - break; - - case ATTR_DATA: - p_ancs->parse_state = attr_data_parse(p_ancs, p_data_src, &index); - break; - - case DONE: - ANCS_LOG("[ANCS]: State: Done \n\r"); - index = hvx_data_len; - break; - - default: - // Default case will never trigger intentionally. Go to the DONE state to minimize the consequences. - p_ancs->parse_state = DONE; - break; - } - } -} - - -/**@brief Function for checking if data in an iOS notification is out of bounds. - * - * @param[in] notif An iOS notification. - * - * @retval NRF_SUCCESS If the notification is within bounds. - * @retval NRF_ERROR_INVALID_PARAM If the notification is out of bounds. - */ -static uint32_t ble_ancs_verify_notification_format(const ble_ancs_c_evt_notif_t * notif) -{ - if( (notif->evt_id >= BLE_ANCS_NB_OF_EVT_ID) - || (notif->category_id >= BLE_ANCS_NB_OF_CATEGORY_ID)) - { - return NRF_ERROR_INVALID_PARAM; - } - return NRF_SUCCESS; -} - -/**@brief Function for receiving and validating notifications received from the Notification Provider. - * - * @param[in] p_ancs Pointer to an ANCS instance to which the event belongs. - * @param[in] p_data_src Pointer to data that was received from the Notification Provider. - * @param[in] hvx_len Length of the data that was received by the Notification Provider. - */ -static void parse_notif(const ble_ancs_c_t * p_ancs, - const uint8_t * p_data_src, - const uint16_t hvx_data_len) -{ - ble_ancs_c_evt_t ancs_evt; - uint32_t err_code; - if (hvx_data_len != BLE_ANCS_NOTIFICATION_DATA_LENGTH) - { - ancs_evt.evt_type = BLE_ANCS_C_EVT_INVALID_NOTIF; - p_ancs->evt_handler(&ancs_evt); - } - - /*lint --e{415} --e{416} -save suppress Warning 415: possible access out of bond */ - ancs_evt.notif.evt_id = - (ble_ancs_c_evt_id_values_t) p_data_src[BLE_ANCS_NOTIF_EVT_ID_INDEX]; - - ancs_evt.notif.evt_flags.silent = - (p_data_src[BLE_ANCS_NOTIF_FLAGS_INDEX] >> BLE_ANCS_EVENT_FLAG_SILENT) & 0x01; - - ancs_evt.notif.evt_flags.important = - (p_data_src[BLE_ANCS_NOTIF_FLAGS_INDEX] >> BLE_ANCS_EVENT_FLAG_IMPORTANT) & 0x01; - - ancs_evt.notif.evt_flags.pre_existing = - (p_data_src[BLE_ANCS_NOTIF_FLAGS_INDEX] >> BLE_ANCS_EVENT_FLAG_PREEXISTING) & 0x01; - - ancs_evt.notif.evt_flags.positive_action = - (p_data_src[BLE_ANCS_NOTIF_FLAGS_INDEX] >> BLE_ANCS_EVENT_FLAG_POSITIVE_ACTION) & 0x01; - - ancs_evt.notif.evt_flags.negative_action = - (p_data_src[BLE_ANCS_NOTIF_FLAGS_INDEX] >> BLE_ANCS_EVENT_FLAG_NEGATIVE_ACTION) & 0x01; - - ancs_evt.notif.category_id = - (ble_ancs_c_category_id_values_t) p_data_src[BLE_ANCS_NOTIF_CATEGORY_ID_INDEX]; - - ancs_evt.notif.category_count = p_data_src[BLE_ANCS_NOTIF_CATEGORY_CNT_INDEX]; - ancs_evt.notif.notif_uid = uint32_decode(&p_data_src[BLE_ANCS_NOTIF_NOTIF_UID]); - /*lint -restore*/ - - err_code = ble_ancs_verify_notification_format(&ancs_evt.notif); - if (err_code == NRF_SUCCESS) - { - ancs_evt.evt_type = BLE_ANCS_C_EVT_NOTIF; - } - else - { - ancs_evt.evt_type = BLE_ANCS_C_EVT_INVALID_NOTIF; - } - - p_ancs->evt_handler(&ancs_evt); -} - - -/**@brief Function for receiving and validating notifications received from the Notification Provider. - * - * @param[in] p_ancs Pointer to an ANCS instance to which the event belongs. - * @param[in] p_ble_evt Bluetooth stack event. - */ -static void on_evt_gattc_notif(ble_ancs_c_t * p_ancs, const ble_evt_t * p_ble_evt) -{ - const ble_gattc_evt_hvx_t * p_notif = &p_ble_evt->evt.gattc_evt.params.hvx; - - if(p_ble_evt->evt.gattc_evt.conn_handle != p_ancs->conn_handle) - { - return; - } - - if (p_notif->handle == p_ancs->service.notif_source_char.handle_value) - { - parse_notif(p_ancs, p_notif->data, p_notif->len); - } - else if (p_notif->handle == p_ancs->service.data_source_char.handle_value) - { - parse_get_notif_attrs_response(p_ancs, p_notif->data, p_notif->len); - } - else - { - // No applicable action. - } -} - -/**@brief Function for handling write response events. - * - * @param[in] p_ancs_c Pointer to the Battery Service Client Structure. - * @param[in] p_ble_evt Pointer to the SoftDevice event. - */ -static void on_write_rsp(ble_ancs_c_t * p_ancs, const ble_evt_t * p_ble_evt) -{ - // Check if the event if on the link for this instance - if (p_ancs->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) - { - return; - } - // Check if there is any message to be sent across to the peer and send it. - tx_buffer_process(); -} - - -void ble_ancs_c_on_ble_evt(ble_ancs_c_t * p_ancs, const ble_evt_t * p_ble_evt) -{ - uint16_t evt = p_ble_evt->header.evt_id; - - switch (evt) - { - case BLE_GATTC_EVT_WRITE_RSP: - on_write_rsp(p_ancs, p_ble_evt); - break; - - case BLE_GATTC_EVT_HVX: - on_evt_gattc_notif(p_ancs, p_ble_evt); - break; - case BLE_GAP_EVT_DISCONNECTED: - on_disconnected(p_ancs, p_ble_evt); - break; - default: - break; - } -} - - -uint32_t ble_ancs_c_init(ble_ancs_c_t * p_ancs, const ble_ancs_c_init_t * p_ancs_init) -{ - uint32_t err_code; - - //Verify that the parameters needed for to initialize this instance of ANCS are not NULL. - VERIFY_PARAM_NOT_NULL(p_ancs); - VERIFY_PARAM_NOT_NULL(p_ancs_init); - VERIFY_PARAM_NOT_NULL(p_ancs_init->evt_handler); - - p_ancs->parse_state = COMMAND_ID_AND_NOTIF_UID; - p_ancs->p_data_dest = NULL; - p_ancs->current_attr_index = 0; - - p_ancs->evt_handler = p_ancs_init->evt_handler; - p_ancs->error_handler = p_ancs_init->error_handler; - p_ancs->conn_handle = BLE_CONN_HANDLE_INVALID; - - p_ancs->service.data_source_cccd.uuid.uuid = BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG; - p_ancs->service.notif_source_cccd.uuid.uuid = BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG; - - // Make sure instance of service is clear. GATT handles inside the service and characteristics are set to @ref BLE_GATT_HANDLE_INVALID. - memset(&p_ancs->service, 0, sizeof(ble_ancs_c_service_t)); - memset(m_tx_buffer, 0, TX_BUFFER_SIZE); - - // Assign UUID types. - err_code = sd_ble_uuid_vs_add(&ble_ancs_base_uuid128, &p_ancs->service.service.uuid.type); - VERIFY_SUCCESS(err_code); - - err_code = sd_ble_uuid_vs_add(&ble_ancs_cp_base_uuid128, &p_ancs->service.control_point_char.uuid.type); - VERIFY_SUCCESS(err_code); - - err_code = sd_ble_uuid_vs_add(&ble_ancs_ns_base_uuid128, &p_ancs->service.notif_source_char.uuid.type); - VERIFY_SUCCESS(err_code); - - err_code = sd_ble_uuid_vs_add(&ble_ancs_ds_base_uuid128, &p_ancs->service.data_source_char.uuid.type); - VERIFY_SUCCESS(err_code); - - // Assign UUID to the service. - p_ancs->service.service.uuid.uuid = ANCS_UUID_SERVICE; - p_ancs->service.service.uuid.type = p_ancs->service.service.uuid.type; - - return ble_db_discovery_evt_register(&p_ancs->service.service.uuid); -} - - -/**@brief Function for creating a TX message for writing a CCCD. - * - * @param[in] conn_handle Connection handle on which to perform the configuration. - * @param[in] handle_cccd Handle of the CCCD. - * @param[in] enable Enable or disable GATTC notifications. - * - * @retval NRF_SUCCESS If the message was created successfully. - * @retval NRF_ERROR_INVALID_PARAM If one of the input parameters was invalid. - */ -static uint32_t cccd_configure(const uint16_t conn_handle, const uint16_t handle_cccd, bool enable) -{ - tx_message_t * p_msg; - uint16_t cccd_val = enable ? BLE_CCCD_NOTIFY_BIT_MASK : 0; - - p_msg = &m_tx_buffer[m_tx_insert_index++]; - m_tx_insert_index &= TX_BUFFER_MASK; - - p_msg->req.write_req.gattc_params.handle = handle_cccd; - p_msg->req.write_req.gattc_params.len = 2; - p_msg->req.write_req.gattc_params.p_value = p_msg->req.write_req.gattc_value; - p_msg->req.write_req.gattc_params.offset = 0; - p_msg->req.write_req.gattc_params.write_op = BLE_GATT_OP_WRITE_REQ; - p_msg->req.write_req.gattc_value[0] = LSB_16(cccd_val); - p_msg->req.write_req.gattc_value[1] = MSB_16(cccd_val); - p_msg->conn_handle = conn_handle; - p_msg->type = WRITE_REQ; - - tx_buffer_process(); - return NRF_SUCCESS; -} - - -uint32_t ble_ancs_c_notif_source_notif_enable(const ble_ancs_c_t * p_ancs) -{ - ANCS_LOG("[ANCS]: Enable Notification Source notifications. writing to handle: %i \n\r", - p_ancs->service.notif_source_cccd.handle); - return cccd_configure(p_ancs->conn_handle, p_ancs->service.notif_source_cccd.handle, true); -} - - -uint32_t ble_ancs_c_notif_source_notif_disable(const ble_ancs_c_t * p_ancs) -{ - return cccd_configure(p_ancs->conn_handle, p_ancs->service.notif_source_cccd.handle, false); -} - - -uint32_t ble_ancs_c_data_source_notif_enable(const ble_ancs_c_t * p_ancs) -{ - ANCS_LOG("[ANCS]: Enable Data Source notifications. Writing to handle: %i \n\r", - p_ancs->service.data_source_cccd.handle); - return cccd_configure(p_ancs->conn_handle, p_ancs->service.data_source_cccd.handle, true); -} - - -uint32_t ble_ancs_c_data_source_notif_disable(const ble_ancs_c_t * p_ancs) -{ - return cccd_configure(p_ancs->conn_handle, p_ancs->service.data_source_cccd.handle, false); -} - - -uint32_t ble_ancs_get_notif_attrs(ble_ancs_c_t * p_ancs, - const uint32_t p_uid) -{ - tx_message_t * p_msg; - - uint32_t index = 0; - p_ancs->number_of_requested_attr = 0; - p_msg = &m_tx_buffer[m_tx_insert_index++]; - m_tx_insert_index &= TX_BUFFER_MASK; - - p_msg->req.write_req.gattc_params.handle = p_ancs->service.control_point_char.handle_value; - p_msg->req.write_req.gattc_params.p_value = p_msg->req.write_req.gattc_value; - p_msg->req.write_req.gattc_params.offset = 0; - p_msg->req.write_req.gattc_params.write_op = BLE_GATT_OP_WRITE_REQ; - - //Encode Command ID. - p_msg->req.write_req.gattc_value[index++] = BLE_ANCS_COMMAND_ID_GET_NOTIF_ATTRIBUTES; - - //Encode Notification UID. - index += uint32_encode(p_uid, &p_msg->req.write_req.gattc_value[index]); - - //Encode Attribute ID. - for (uint32_t attr = 0; attr < BLE_ANCS_NB_OF_ATTRS; attr++) - { - if (p_ancs->ancs_attr_list[attr].get == true) - { - p_msg->req.write_req.gattc_value[index++] = attr; - if ((attr == BLE_ANCS_NOTIF_ATTR_ID_TITLE) || - (attr == BLE_ANCS_NOTIF_ATTR_ID_SUBTITLE) || - (attr == BLE_ANCS_NOTIF_ATTR_ID_MESSAGE)) - { - //Encode Length field, only applicable for Title, Subtitle and Message - index += uint16_encode(p_ancs->ancs_attr_list[attr].attr_len, - &p_msg->req.write_req.gattc_value[index]); - } - p_ancs->number_of_requested_attr++; - } - } - p_msg->req.write_req.gattc_params.len = index; - p_msg->conn_handle = p_ancs->conn_handle; - p_msg->type = WRITE_REQ; - p_ancs->expected_number_of_attrs = p_ancs->number_of_requested_attr; - - tx_buffer_process(); - - return NRF_SUCCESS; -} - - -uint32_t ble_ancs_c_attr_add(ble_ancs_c_t * p_ancs, - const ble_ancs_c_notif_attr_id_values_t id, - uint8_t * p_data, - const uint16_t len) -{ - VERIFY_PARAM_NOT_NULL(p_data); - - if((len == 0) || (len > BLE_ANCS_ATTR_DATA_MAX)) - { - return NRF_ERROR_INVALID_LENGTH; - } - - p_ancs->ancs_attr_list[id].get = true; - p_ancs->ancs_attr_list[id].attr_len = len; - p_ancs->ancs_attr_list[id].p_attr_data = p_data; - - return NRF_SUCCESS; -} - - -uint32_t ble_ancs_c_request_attrs(ble_ancs_c_t * p_ancs, - const ble_ancs_c_evt_notif_t * p_notif) -{ - uint32_t err_code; - err_code = ble_ancs_verify_notification_format(p_notif); - VERIFY_SUCCESS(err_code); - - err_code = ble_ancs_get_notif_attrs(p_ancs, p_notif->notif_uid); - p_ancs->parse_state = COMMAND_ID_AND_NOTIF_UID; - VERIFY_SUCCESS(err_code); - - return NRF_SUCCESS; -} - -uint32_t ble_ancs_c_handles_assign(ble_ancs_c_t * p_ancs, - const uint16_t conn_handle, - const ble_ancs_c_service_t * p_peer_handles) -{ - VERIFY_PARAM_NOT_NULL(p_ancs); - - p_ancs->conn_handle = conn_handle; - - if(p_peer_handles != NULL) - { - p_ancs->service.control_point_char.handle_value = p_peer_handles->control_point_char.handle_value; - p_ancs->service.data_source_cccd.handle = p_peer_handles->data_source_cccd.handle; - p_ancs->service.data_source_char.handle_value = p_peer_handles->data_source_char.handle_value; - p_ancs->service.notif_source_cccd.handle = p_peer_handles->notif_source_cccd.handle; - p_ancs->service.notif_source_char.handle_value = p_peer_handles->notif_source_char.handle_value; - } - - return NRF_SUCCESS; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ancs_c/ble_ancs_c.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ancs_c/ble_ancs_c.h deleted file mode 100644 index 8028455987..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ancs_c/ble_ancs_c.h +++ /dev/null @@ -1,419 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - */ - -/** @file - * - * @defgroup ble_sdk_srv_ancs_c Apple Notification Service client - * @{ - * @ingroup ble_sdk_srv - * - * @brief Apple Notification Center Service Client Module. - * - * @details Disclaimer: This client implementation of the Apple Notification Center Service can - * be changed at any time by Nordic Semiconductor ASA. Server implementations such as the - * ones found in iOS can be changed at any time by Apple and may cause this client - * implementation to stop working. - * - * This module implements the Apple Notification Center Service (ANCS) client. - * This client can be used as a Notification Consumer (NC) that receives data - * notifications from a Notification Provider (NP). The NP is typically an iOS - * device acting as a server. For terminology and up-to-date specs, see - * http://developer.apple.com. - * - * The term "notification" is used in two different meanings: - * - An iOS notification is the data received from the Notification Provider. - * - A GATTC notification is a way to transfer data with Bluetooth Smart. - * In this module, we receive iOS notifications using GATTC notifications. - * We use the full term (iOS notification or GATTC notification) where required to avoid confusion. - * - * Upon initializing the module, you must add the different iOS notification attributes you - * would like to receive for iOS notifications. @ref ble_ancs_c_attr_add. - * - * Once a connection is established with a central device, the module does a service discovery to - * discover the ANVS server handles. If this succeeds (@ref BLE_ANCS_C_EVT_DISCOVERY_COMPLETE) - * The handles for the CTS server are part of the @ref ble_ancs_c_evt_t structure and must be - * assigned to a ANCS_C instance using the @ref ble_ancs_c_handles_assign function. For more - * information about service discovery, see the ble_discovery module documentation - * @ref lib_ble_db_discovery. - * - * The application can now subscribe to iOS notifications using - * @ref ble_ancs_c_notif_source_notif_enable. They arrive in the @ref BLE_ANCS_C_EVT_NOTIF event. - * @ref ble_ancs_c_request_attrs can be used to request attributes for the notifications. They - * arrive in the @ref BLE_ANCS_C_EVT_NOTIF_ATTRIBUTE event. - * - * @msc - * hscale = "1.5"; - * Application, ANCS_C; - * |||; - * Application=>ANCS_C [label = "ble_ancs_c_attr_add(attribute)"]; - * Application=>ANCS_C [label = "ble_ancs_c_init(ancs_instance, event_handler)"]; - * ...; - * Application<<=ANCS_C [label = "BLE_ANCS_C_EVT_DISCOVERY_COMPLETE"]; - * Application=>ANCS_C [label = "ble_ancs_c_handles_assign(ancs_instance, conn_handle, service_handles)"]; - * Application=>ANCS_C [label = "ble_ancs_c_notif_source_notif_enable(ancs_instance)"]; - * Application=>ANCS_C [label = "ble_ancs_c_data_source_notif_enable(ancs_instance)"]; - * |||; - * ...; - * |||; - * Application<<=ANCS_C [label = "BLE_ANCS_C_EVT_NOTIF"]; - * |||; - * ...; - * |||; - * Application=>ANCS_C [label = "ble_ancs_c_request_attrs(attr_id, buffer)"]; - * Application<<=ANCS_C [label = "BLE_ANCS_C_EVT_NOTIF_ATTRIBUTE"]; - * |||; - * @endmsc - * - * @note The application must propagate BLE stack events to this module - * by calling ble_ancs_c_on_ble_evt() from the @ref softdevice_handler callback. - */ -#ifndef BLE_ANCS_C_H__ -#define BLE_ANCS_C_H__ - - -#include "ble_types.h" -#include "ble_srv_common.h" -#include "device_manager.h" -#include "ble_db_discovery.h" - - -#define BLE_ANCS_ATTR_DATA_MAX 32 /**< Maximum data length of an iOS notification attribute. */ -#define BLE_ANCS_NB_OF_CATEGORY_ID 12 /**< Number of iOS notification categories: Other, Incoming Call, Missed Call, Voice Mail, Social, Schedule, Email, News, Health And Fitness, Business And Finance, Location, Entertainment. */ -#define BLE_ANCS_NB_OF_ATTRS 8 /**< Number of iOS notification attributes: AppIdentifier, Title, Subtitle, Message, MessageSize, Date, PositiveActionLabel, NegativeActionLabel. */ -#define BLE_ANCS_NB_OF_EVT_ID 3 /**< Number of iOS notification events: Added, Modified, Removed.*/ - -/** @brief Length of the iOS notification data. - * - * @details 8 bytes: - * Event ID |Event flags |Category ID |Category count|Notification UID - * ---------|------------|------------|--------------|---------------- - * 1 byte | 1 byte | 1 byte | 1 byte | 4 bytes - */ -#define BLE_ANCS_NOTIFICATION_DATA_LENGTH 8 - -#define ANCS_UUID_SERVICE 0xF431 /**< 16-bit service UUID for the Apple Notification Center Service. */ -#define ANCS_UUID_CHAR_CONTROL_POINT 0xD8F3 /**< 16-bit control point UUID. */ -#define ANCS_UUID_CHAR_DATA_SOURCE 0xC6E9 /**< 16-bit data source UUID. */ -#define ANCS_UUID_CHAR_NOTIFICATION_SOURCE 0x120D /**< 16-bit notification source UUID. */ - -#define BLE_ANCS_EVENT_FLAG_SILENT 0 /**< 0b.......1 Silent: First (LSB) bit is set. All flags can be active at the same time.*/ -#define BLE_ANCS_EVENT_FLAG_IMPORTANT 1 /**< 0b......1. Important: Second (LSB) bit is set. All flags can be active at the same time.*/ -#define BLE_ANCS_EVENT_FLAG_PREEXISTING 2 /**< 0b.....1.. Pre-existing: Third (LSB) bit is set. All flags can be active at the same time.*/ -#define BLE_ANCS_EVENT_FLAG_POSITIVE_ACTION 3 /**< 0b....1... Positive action: Fourth (LSB) bit is set. All flags can be active at the same time.*/ -#define BLE_ANCS_EVENT_FLAG_NEGATIVE_ACTION 4 /**< 0b...1.... Negative action: Fifth (LSB) bit is set. All flags can be active at the same time. */ - - -/**@brief Event types that are passed from client to application on an event. */ -typedef enum -{ - BLE_ANCS_C_EVT_DISCOVERY_COMPLETE, /**< A successful connection has been established and the service was found on the connected peer. */ - BLE_ANCS_C_EVT_DISCOVERY_FAILED, /**< It was not possible to discover the service or characteristics of the connected peer. */ - BLE_ANCS_C_EVT_NOTIF, /**< An iOS notification was received on the notification source control point. */ - BLE_ANCS_C_EVT_INVALID_NOTIF, /**< An iOS notification was received on the notification source control point, but the format is invalid. */ - BLE_ANCS_C_EVT_NOTIF_ATTRIBUTE /**< A received iOS notification attribute has been parsed. */ -} ble_ancs_c_evt_type_t; - -/**@brief Category IDs for iOS notifications. */ -typedef enum -{ - BLE_ANCS_CATEGORY_ID_OTHER, /**< The iOS notification belongs to the "other" category. */ - BLE_ANCS_CATEGORY_ID_INCOMING_CALL, /**< The iOS notification belongs to the "Incoming Call" category. */ - BLE_ANCS_CATEGORY_ID_MISSED_CALL, /**< The iOS notification belongs to the "Missed Call" category. */ - BLE_ANCS_CATEGORY_ID_VOICE_MAIL, /**< The iOS notification belongs to the "Voice Mail" category. */ - BLE_ANCS_CATEGORY_ID_SOCIAL, /**< The iOS notification belongs to the "Social" category. */ - BLE_ANCS_CATEGORY_ID_SCHEDULE, /**< The iOS notification belongs to the "Schedule" category. */ - BLE_ANCS_CATEGORY_ID_EMAIL, /**< The iOS notification belongs to the "E-mail" category. */ - BLE_ANCS_CATEGORY_ID_NEWS, /**< The iOS notification belongs to the "News" category. */ - BLE_ANCS_CATEGORY_ID_HEALTH_AND_FITNESS, /**< The iOS notification belongs to the "Health and Fitness" category. */ - BLE_ANCS_CATEGORY_ID_BUSINESS_AND_FINANCE, /**< The iOS notification belongs to the "Buisness and Finance" category. */ - BLE_ANCS_CATEGORY_ID_LOCATION, /**< The iOS notification belongs to the "Location" category. */ - BLE_ANCS_CATEGORY_ID_ENTERTAINMENT /**< The iOS notification belongs to the "Entertainment" category. */ -} ble_ancs_c_category_id_values_t; - -/**@brief Event IDs for iOS notifications. */ -typedef enum -{ - BLE_ANCS_EVENT_ID_NOTIFICATION_ADDED, /**< The iOS notification was added. */ - BLE_ANCS_EVENT_ID_NOTIFICATION_MODIFIED, /**< The iOS notification was modified. */ - BLE_ANCS_EVENT_ID_NOTIFICATION_REMOVED /**< The iOS notification was removed. */ -} ble_ancs_c_evt_id_values_t; - -/**@brief Control point command IDs that the Notification Consumer can send to the Notification Provider. */ -typedef enum -{ - BLE_ANCS_COMMAND_ID_GET_NOTIF_ATTRIBUTES, /**< Requests attributes to be sent from the NP to the NC for a given notification. */ - BLE_ANCS_COMMAND_ID_GET_APP_ATTRIBUTES, /**< Requests attributes to be sent from the NP to the NC for a given iOS App. */ - BLE_ANCS_COMMAND_ID_GET_PERFORM_NOTIF_ACTION, /**< Requests an action to be performed on a given notification, for example dismiss an alarm. */ -} ble_ancs_c_command_id_values_t; - -/**@brief IDs for iOS notification attributes. */ -typedef enum -{ - BLE_ANCS_NOTIF_ATTR_ID_APP_IDENTIFIER, /**< Identifies that the attribute data is of an "App Identifier" type. */ - BLE_ANCS_NOTIF_ATTR_ID_TITLE, /**< Identifies that the attribute data is a "Title". */ - BLE_ANCS_NOTIF_ATTR_ID_SUBTITLE, /**< Identifies that the attribute data is a "Subtitle". */ - BLE_ANCS_NOTIF_ATTR_ID_MESSAGE, /**< Identifies that the attribute data is a "Message". */ - BLE_ANCS_NOTIF_ATTR_ID_MESSAGE_SIZE, /**< Identifies that the attribute data is a "Message Size". */ - BLE_ANCS_NOTIF_ATTR_ID_DATE, /**< Identifies that the attribute data is a "Date". */ - BLE_ANCS_NOTIF_ATTR_ID_POSITIVE_ACTION_LABEL, /**< The notification has a "Positive action" that can be executed associated with it. */ - BLE_ANCS_NOTIF_ATTR_ID_NEGATIVE_ACTION_LABEL, /**< The notification has a "Negative action" that can be executed associated with it. */ -} ble_ancs_c_notif_attr_id_values_t; - - -/**@brief Flags for iOS notifications. */ -typedef struct -{ - uint8_t silent : 1; /**< If this flag is set, the notification has a low priority. */ - uint8_t important : 1; /**< If this flag is set, the notification has a high priority. */ - uint8_t pre_existing : 1; /**< If this flag is set, the notification is pre-existing. */ - uint8_t positive_action : 1; /**< If this flag is set, the notification has a positive action that can be taken. */ - uint8_t negative_action : 1; /**< If this flag is set, the notification has a negative action that can be taken. */ -} ble_ancs_c_notif_flags_t; - - -/**@brief Parsing states for received iOS notification attributes. - */ -typedef enum -{ - COMMAND_ID_AND_NOTIF_UID, /**< Parsing the command ID and the notification UID. */ - ATTR_ID, /**< Parsing attribute ID. */ - ATTR_LEN1, /**< Parsing the LSB of the attribute length. */ - ATTR_LEN2, /**< Parsing the MSB of the attribute length. */ - ATTR_DATA, /**< Parsing the attribute data. */ - DONE /**< Parsing is done. */ -} ble_ancs_c_parse_state_t; - - -/**@brief iOS notification structure. */ -typedef struct -{ - ble_ancs_c_evt_id_values_t evt_id; /**< Whether the notification was added, removed, or modified. */ - ble_ancs_c_notif_flags_t evt_flags; /**< Bitmask to signal if a special condition applies to the notification, for example, "Silent" or "Important". */ - ble_ancs_c_category_id_values_t category_id; /**< Classification of the notification type, for example, email or location. */ - uint8_t category_count; /**< Current number of active notifications for this category ID. */ - uint32_t notif_uid; /**< Notification UID. */ -} ble_ancs_c_evt_notif_t; - - -/**@brief iOS notification attribute structure for incomming attributes. */ -typedef struct -{ - uint32_t notif_uid; /**< UID of the notification that the attribute belongs to.*/ - uint16_t attr_len; /**< Length of the received attribute data. */ - ble_ancs_c_notif_attr_id_values_t attr_id; /**< Classification of the attribute type, for example, title or date. */ - uint8_t * p_attr_data; /**< Pointer to where the memory is allocated for storing incoming attributes. */ -} ble_ancs_c_evt_notif_attr_t; - - -/**@brief iOS notification attribute content wanted by our application. */ -typedef struct -{ - bool get; /**< Boolean to determine if this attribute will be requested from the Notification Provider. */ - ble_ancs_c_notif_attr_id_values_t attr_id; /**< Attribute ID: AppIdentifier(0), Title(1), Subtitle(2), Message(3), MessageSize(4), Date(5), PositiveActionLabel(6), NegativeActionLabel(7). */ - uint16_t attr_len; /**< Length of the attribute. If more data is received from the Notification Provider, all data beyond this length is discarded. */ - uint8_t * p_attr_data; /**< Pointer to where the memory is allocated for storing incoming attributes. */ -} ble_ancs_c_attr_list_t; - - -/**@brief Structure used for holding the Apple Notification Center Service found during the - discovery process. - */ -typedef struct -{ - ble_gattc_service_t service; /**< The GATT Service holding the discovered Apple Notification Center Service. (0xF431). */ - ble_gattc_char_t control_point_char; /**< ANCS Control Point Characteristic. Allows interaction with the peer (0xD8F3). */ - ble_gattc_char_t notif_source_char; /**< ANCS Notification Source Characteristic. Keeps track of arrival, modification, and removal of notifications (0x120D). */ - ble_gattc_desc_t notif_source_cccd; /**< ANCS Notification Source Characteristic Descriptor. Enables or Disables GATT notifications */ - ble_gattc_char_t data_source_char; /**< ANCS Data Source Characteristic, where attribute data for the notifications is received from peer (0xC6E9). */ - ble_gattc_desc_t data_source_cccd; /**< ANCS Data Source Characteristic Descriptor. Enables or Disables GATT notifications */ -} ble_ancs_c_service_t; - - -/**@brief ANCS client module event structure. - * - * @details The structure contains the event that should be handled by the main application. - */ -typedef struct -{ - ble_ancs_c_evt_type_t evt_type; /**< Type of event.*/ - uint16_t conn_handle; /**< Connection handle on which the ANCS service was discovered on the peer device. This will be filled if the evt_type is @ref BLE_ANCS_C_EVT_DISCOVERY_COMPLETE.*/ - ble_ancs_c_evt_notif_t notif; /**< iOS notification. Will be filled if evt_type is @ref BLE_ANCS_C_EVT_NOTIF. */ - ble_ancs_c_evt_notif_attr_t attr; /**< Currently received attribute for a given notification. Will be filled if the evt_type is @ref BLE_ANCS_C_EVT_NOTIF_ATTRIBUTE. */ - ble_ancs_c_service_t service; /**< Info on the discovered Alert Notification Service discovered. This will be filled if the evt_type is @ref BLE_ANCS_C_EVT_DISCOVERY_COMPLETE.*/ - uint32_t error_code; /**< Additional status or error code if the event was caused by a stack error or GATT status, for example, during service discovery. */ -} ble_ancs_c_evt_t; - - -/**@brief iOS notification event handler type. */ -typedef void (*ble_ancs_c_evt_handler_t) (ble_ancs_c_evt_t * p_evt); - - -/**@brief iOS notification structure, which contains various status information for the client. */ -typedef struct -{ - ble_ancs_c_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Apple Notification client application. */ - ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ - uint16_t conn_handle; /**< Handle of the current connection. Set with @ref ble_ancs_c_handles_assign when connected. */ - ble_ancs_c_service_t service; /**< Struct to store the different handles and UUIDs related to the service. */ - ble_ancs_c_attr_list_t ancs_attr_list[BLE_ANCS_NB_OF_ATTRS]; /**< For all attributes; contains whether they should be requested upon attribute request and the length and buffer of where to store attribute data. */ - uint32_t number_of_requested_attr; /**< The number of attributes that will be requested upon a iOS notification attribute request is made. */ - uint32_t expected_number_of_attrs; /**< The number of attributes expected upon receiving attributes. Keeps track of when to stop reading incoming attributes. */ - ble_ancs_c_parse_state_t parse_state; /**< ANCS notification attribute parsing state. */ - uint8_t * p_data_dest; /**< Attribute that the parsed data will be copied into. */ - uint16_t current_attr_index; /**< Variable to keep track of how much (for a given attribute) we are done parsing. */ - ble_ancs_c_evt_t evt; /**< The event is filled with several iteration of the parse_get_notif_attrs_response function when requesting iOS notification attributes. So we must allocate memory for it here.*/ -} ble_ancs_c_t; - - -/**@brief Apple Notification client init structure, which contains all options and data needed for - * initialization of the client.*/ -typedef struct -{ - ble_ancs_c_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Battery Service. */ - ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ -} ble_ancs_c_init_t; - - -/**@brief Apple Notification Center Service UUIDs. */ -extern const ble_uuid128_t ble_ancs_base_uuid128; /**< Service UUID. */ -extern const ble_uuid128_t ble_ancs_cp_base_uuid128; /**< Control point UUID. */ -extern const ble_uuid128_t ble_ancs_ns_base_uuid128; /**< Notification source UUID. */ -extern const ble_uuid128_t ble_ancs_ds_base_uuid128; /**< Data source UUID. */ - - -/**@brief Function for handling the application's BLE Stack events. - * - * @details Handles all events from the BLE stack that are of interest to the ANCS client. - * - * @param[in] p_ancs ANCS client structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -void ble_ancs_c_on_ble_evt(ble_ancs_c_t * p_ancs, const ble_evt_t * p_ble_evt); - - -/**@brief Function for handling events from the database discovery module. - * - * @details This function will handle an event from the database discovery module, and determine - * if it relates to the discovery of ANCS at the peer. If so, it will - * call the application's event handler indicating that ANCS has been - * discovered at the peer. It also populates the event with the service related - * information before providing it to the application. - * - * @param[in] p_ancs Pointer to the ANCS client structure. - * @param[in] p_evt Pointer to the event received from the database discovery module. - */ - void ble_ancs_c_on_db_disc_evt(ble_ancs_c_t * p_ancs, ble_db_discovery_evt_t * p_evt); - - -/**@brief Function for initializing the ANCS client. - * - * @param[out] p_ancs ANCS client structure. This structure must be - * supplied by the application. It is initialized by this function - * and will later be used to identify this particular client instance. - * @param[in] p_ancs_init Information needed to initialize the client. - * - * @retval NRF_SUCCESS If the client was initialized successfully. Otherwise, an error code is returned. - */ -uint32_t ble_ancs_c_init(ble_ancs_c_t * p_ancs, const ble_ancs_c_init_t * p_ancs_init); - - -/**@brief Function for writing to the CCCD to enable notifications from the Apple Notification Service. - * - * @param[in] p_ancs iOS notification structure. This structure must be supplied by - * the application. It identifies the particular client instance to use. - * - * @retval NRF_SUCCESS If writing to the CCCD was successful. Otherwise, an error code is returned. - */ -uint32_t ble_ancs_c_notif_source_notif_enable(const ble_ancs_c_t * p_ancs); - - -/**@brief Function for writing to the CCCD to enable data source notifications from the ANCS. - * - * @param[in] p_ancs iOS notification structure. This structure must be supplied by - * the application. It identifies the particular client instance to use. - * - * @retval NRF_SUCCESS If writing to the CCCD was successful. Otherwise, an error code is returned. - */ -uint32_t ble_ancs_c_data_source_notif_enable(const ble_ancs_c_t * p_ancs); - - -/**@brief Function for writing to the CCCD to disable notifications from the ANCS. - * - * @param[in] p_ancs iOS notification structure. This structure must be supplied by - * the application. It identifies the particular client instance to use. - * - * @retval NRF_SUCCESS If writing to the CCCD was successful. Otherwise, an error code is returned. - */ -uint32_t ble_ancs_c_notif_source_notif_disable(const ble_ancs_c_t * p_ancs); - - -/**@brief Function for writing to the CCCD to disable data source notifications from the ANCS. - * - * @param[in] p_ancs iOS notification structure. This structure must be supplied by - * the application. It identifies the particular client instance to use. - * - * @retval NRF_SUCCESS If writing to the CCCD was successful. Otherwise, an error code is returned. - */ -uint32_t ble_ancs_c_data_source_notif_disable(const ble_ancs_c_t * p_ancs); - - -/**@brief Function for registering attributes that will be requested if ble_ancs_c_request_attrs - * is called. - * - * @param[in] p_ancs ANCS client instance on which the attribute will be registered. - * @param[in] id ID of the attribute that will be added. - * @param[in] p_data Pointer to a buffer where the data of the attribute can be stored. - * @param[in] len Length of the buffer where the data of the attribute can be stored. - - * @retval NRF_SUCCESS If all operations were successful. Otherwise, an error code is returned. - */ -uint32_t ble_ancs_c_attr_add(ble_ancs_c_t * p_ancs, - const ble_ancs_c_notif_attr_id_values_t id, - uint8_t * p_data, - const uint16_t len); - - -/**@brief Function for requesting attributes for a notification. - * - * @param[in] p_ancs iOS notification structure. This structure must be supplied by - * the application. It identifies the particular client instance to use. - * @param[in] p_notif Pointer to the notification whose attributes will be requested from - * the Notification Provider. - * - * @retval NRF_SUCCESS If all operations were successful. Otherwise, an error code is returned. - */ -uint32_t ble_ancs_c_request_attrs(ble_ancs_c_t * p_ancs, - const ble_ancs_c_evt_notif_t * p_notif); - - -/**@brief Function for assigning handle to a this instance of ancs_c. - * - * @details Call this function when a link has been established with a peer to - * associate this link to this instance of the module. This makes it - * possible to handle several link and associate each link to a particular - * instance of this module. The connection handle and attribute handles will be - * provided from the discovery event @ref BLE_ANCS_C_EVT_DISCOVERY_COMPLETE. - * - * @param[in] p_ancs Pointer to the ANCS client structure instance to associate with these - * handles. - * @param[in] conn_handle Connection handle to associated with the given ANCS Instance. - * @param[in] p_service Attribute handles on the ANCS server that you want this ANCS client to - * interact with. - * - * @retval NRF_SUCCESS If the operation was successful. - * @retval NRF_ERROR_NULL If a p_ancs was a NULL pointer. - */ -uint32_t ble_ancs_c_handles_assign(ble_ancs_c_t * p_ancs, const uint16_t conn_handle, const ble_ancs_c_service_t * p_service); - -#endif // BLE_ANCS_C_H__ - -/** @} */ - diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ans_c/ble_ans_c.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ans_c/ble_ans_c.c deleted file mode 100644 index a8ace029ab..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ans_c/ble_ans_c.c +++ /dev/null @@ -1,544 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - */ - -/* Attention! -* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile -* qualification listings, this section of source code must not be modified. -*/ - -#include "ble_ans_c.h" -#include -#include -#include "ble_err.h" -#include "ble_srv_common.h" -#include "nordic_common.h" -#include "nrf_assert.h" -#include "ble_db_discovery.h" - - -#define NOTIFICATION_DATA_LENGTH 2 /**< The mandatory length of notification data. After the mandatory data, the optional message is located. */ -#define READ_DATA_LENGTH_MIN 1 /**< Minimum data length in a valid Alert Notification Read Response message. */ - -#define TX_BUFFER_MASK 0x07 /**< TX Buffer mask, must be a mask of contiguous zeroes, followed by contiguous sequence of ones: 000...111. */ -#define TX_BUFFER_SIZE (TX_BUFFER_MASK + 1) /**< Size of send buffer, which is 1 higher than the mask. */ -#define WRITE_MESSAGE_LENGTH 2 /**< Length of the write message for CCCD/control point. */ - - -typedef enum -{ - READ_REQ = 1, /**< Type identifying that this tx_message is a read request. */ - WRITE_REQ /**< Type identifying that this tx_message is a write request. */ -} ans_tx_request_t; - - -/**@brief Structure for writing a message to the central, i.e. Control Point or CCCD. - */ -typedef struct -{ - uint8_t gattc_value[WRITE_MESSAGE_LENGTH]; /**< The message to write. */ - ble_gattc_write_params_t gattc_params; /**< GATTC parameters for this message. */ -} write_params_t; - -/**@brief Structure for holding data to be transmitted to the connected central. - */ -typedef struct -{ - uint16_t conn_handle; /**< Connection handle to be used when transmitting this message. */ - ans_tx_request_t type; /**< Type of this message, i.e. read or write message. */ - union - { - uint16_t read_handle; /**< Read request message. */ - write_params_t write_req; /**< Write request message. */ - } req; -} tx_message_t; - -static tx_message_t m_tx_buffer[TX_BUFFER_SIZE]; /**< Transmit buffer for messages to be transmitted to the central. */ -static uint32_t m_tx_insert_index = 0; /**< Current index in the transmit buffer where next message should be inserted. */ -static uint32_t m_tx_index = 0; /**< Current index in the transmit buffer from where the next message to be transmitted resides. */ - - -/**@brief Function for passing any pending request from the buffer to the stack. - */ -static void tx_buffer_process(void) -{ - if (m_tx_index != m_tx_insert_index) - { - uint32_t err_code; - - if (m_tx_buffer[m_tx_index].type == READ_REQ) - { - err_code = sd_ble_gattc_read(m_tx_buffer[m_tx_index].conn_handle, - m_tx_buffer[m_tx_index].req.read_handle, - 0); - } - else - { - err_code = sd_ble_gattc_write(m_tx_buffer[m_tx_index].conn_handle, - &m_tx_buffer[m_tx_index].req.write_req.gattc_params); - } - if (err_code == NRF_SUCCESS) - { - ++m_tx_index; - m_tx_index &= TX_BUFFER_MASK; - } - } -} - - -/** @brief Function for copying a characteristic. - */ -static void char_set(ble_gattc_char_t * p_dest_char, const ble_gattc_char_t * p_source_char) -{ - memcpy(p_dest_char, p_source_char, sizeof(ble_gattc_char_t)); -} - -static void char_cccd_set(ble_gattc_desc_t * p_cccd, const uint16_t cccd_handle) -{ - p_cccd->handle = cccd_handle; -} - -/** @brief Function to check that all handles required by the client to use the server are present. - */ -static bool is_valid_ans_srv_discovered(const ble_ans_c_service_t * p_srv) -{ - if ((p_srv->alert_notif_ctrl_point.handle_value == BLE_GATT_HANDLE_INVALID) || - (p_srv->suported_new_alert_cat.handle_value == BLE_GATT_HANDLE_INVALID) || - (p_srv->suported_unread_alert_cat.handle_value == BLE_GATT_HANDLE_INVALID) || - (p_srv->new_alert.handle_value == BLE_GATT_HANDLE_INVALID) || - (p_srv->unread_alert_status.handle_value == BLE_GATT_HANDLE_INVALID) || - (p_srv->new_alert_cccd.handle == BLE_GATT_HANDLE_INVALID) || - (p_srv->unread_alert_cccd.handle == BLE_GATT_HANDLE_INVALID) - ) - { - // At least one required characteristic is missing on the server side. - return false; - } - return true; -} - - -void ble_ans_c_on_db_disc_evt(ble_ans_c_t * p_ans, const ble_db_discovery_evt_t * p_evt) -{ - ble_ans_c_evt_t evt; - - memset(&evt, 0, sizeof(ble_ans_c_evt_t)); - evt.conn_handle = p_evt->conn_handle; - evt.evt_type = BLE_ANS_C_EVT_DISCOVERY_FAILED; - - // Check if the Alert Notification Service was discovered. - if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE - && - p_evt->params.discovered_db.srv_uuid.uuid == BLE_UUID_ALERT_NOTIFICATION_SERVICE - && - p_evt->params.discovered_db.srv_uuid.type == BLE_UUID_TYPE_BLE) - { - // Find the characteristics inside the service. - for (uint8_t i = 0; i < p_evt->params.discovered_db.char_count; i++) - { - const ble_gatt_db_char_t * p_char = &(p_evt->params.discovered_db.charateristics[i]); - - switch (p_char->characteristic.uuid.uuid) - { - case BLE_UUID_ALERT_NOTIFICATION_CONTROL_POINT_CHAR: - NRF_LOG_PRINTF("[ANS] Found Ctrlpt \n\r"); - char_set(&evt.data.service.alert_notif_ctrl_point, &p_char->characteristic); - break; - - case BLE_UUID_UNREAD_ALERT_CHAR: - NRF_LOG_PRINTF("[ANS] Found Unread Alert \n\r"); - char_set(&evt.data.service.unread_alert_status, &p_char->characteristic); - char_cccd_set(&evt.data.service.unread_alert_cccd, - p_char->cccd_handle); - break; - - case BLE_UUID_NEW_ALERT_CHAR: - NRF_LOG_PRINTF("[ANS] Found New Alert \n\r"); - char_set(&evt.data.service.new_alert, &p_char->characteristic); - char_cccd_set(&evt.data.service.new_alert_cccd, - p_char->cccd_handle); - break; - - case BLE_UUID_SUPPORTED_UNREAD_ALERT_CATEGORY_CHAR: - NRF_LOG_PRINTF("[ANS] Found supported unread alert category \n\r"); - char_set(&evt.data.service.suported_unread_alert_cat, &p_char->characteristic); - break; - - case BLE_UUID_SUPPORTED_NEW_ALERT_CATEGORY_CHAR: - NRF_LOG_PRINTF("[ANS] Found supported new alert category \n\r"); - char_set(&evt.data.service.suported_new_alert_cat, &p_char->characteristic); - break; - - default: - // No implementation needed. - break; - } - } - if (is_valid_ans_srv_discovered(&evt.data.service)) - { - evt.evt_type = BLE_ANS_C_EVT_DISCOVERY_COMPLETE; - } - } - p_ans->evt_handler(&evt); -} - - -/**@brief Function for receiving and validating notifications received from the central. - */ -static void event_notify(ble_ans_c_t * p_ans, const ble_evt_t * p_ble_evt) -{ - uint32_t message_length; - ble_ans_c_evt_t event; - ble_ans_alert_notification_t * p_alert = &event.data.alert; - const ble_gattc_evt_hvx_t * p_notification = &p_ble_evt->evt.gattc_evt.params.hvx; - - // Message is not valid -> ignore. - event.evt_type = BLE_ANS_C_EVT_NOTIFICATION; - if (p_notification->len < NOTIFICATION_DATA_LENGTH) - { - return; - } - message_length = p_notification->len - NOTIFICATION_DATA_LENGTH; - - if (p_notification->handle == p_ans->service.new_alert.handle_value) - { - BLE_UUID_COPY_INST(event.uuid, p_ans->service.new_alert.uuid); - } - else if (p_notification->handle == p_ans->service.unread_alert_status.handle_value) - { - BLE_UUID_COPY_INST(event.uuid, p_ans->service.unread_alert_status.uuid); - } - else - { - // Nothing to process. - return; - } - - p_alert->alert_category = p_notification->data[0]; - p_alert->alert_category_count = p_notification->data[1]; //lint !e415 - p_alert->alert_msg_length = (message_length > p_ans->message_buffer_size) - ? p_ans->message_buffer_size - : message_length; - p_alert->p_alert_msg_buf = p_ans->p_message_buffer; - - memcpy(p_alert->p_alert_msg_buf, - &p_notification->data[NOTIFICATION_DATA_LENGTH], - p_alert->alert_msg_length); //lint !e416 - - p_ans->evt_handler(&event); -} - - -/**@brief Function for handling write response events. - */ -static void event_write_rsp(ble_ans_c_t * p_ans, const ble_evt_t * p_ble_evt) -{ - tx_buffer_process(); -} - - -/**@brief Function for validating and passing the response to the application, - * when a read response is received. - */ -static void event_read_rsp(ble_ans_c_t * p_ans, const ble_evt_t * p_ble_evt) -{ - ble_ans_c_evt_t event; - const ble_gattc_evt_read_rsp_t * p_response; - - p_response = &p_ble_evt->evt.gattc_evt.params.read_rsp; - event.evt_type = BLE_ANS_C_EVT_READ_RESP; - - if (p_response->len < READ_DATA_LENGTH_MIN) - { - tx_buffer_process(); - return; - } - - if (p_response->handle == p_ans->service.suported_new_alert_cat.handle_value) - { - BLE_UUID_COPY_INST(event.uuid, p_ans->service.suported_new_alert_cat.uuid); - } - else if (p_response->handle == p_ans->service.suported_unread_alert_cat.handle_value) - { - BLE_UUID_COPY_INST(event.uuid, p_ans->service.suported_unread_alert_cat.uuid); - } - else - { - // Bad response, ignore. - tx_buffer_process(); - return; - } - - event.data.settings = *(ble_ans_alert_settings_t *)(p_response->data); - - if (p_response->len == READ_DATA_LENGTH_MIN) - { - // Those must default to 0, if they are not returned by central. - event.data.settings.ans_high_prioritized_alert_support = 0; - event.data.settings.ans_instant_message_support = 0; - } - - p_ans->evt_handler(&event); - - tx_buffer_process(); -} - - -/**@brief Function for disconnecting and cleaning the current service. - */ -static void event_disconnect(ble_ans_c_t * p_ans, ble_evt_t const * p_ble_evt) -{ - if (p_ans->conn_handle == p_ble_evt->evt.gap_evt.conn_handle) - { - p_ans->conn_handle = BLE_CONN_HANDLE_INVALID; - - // Clearing all data for the service will also set all handle values to @ref BLE_GATT_HANDLE_INVALID - memset(&p_ans->service, 0, sizeof(ble_ans_c_service_t)); - - // There was a valid instance of IAS on the peer. Send an event to the - // application, so that it can do any clean up related to this module. - ble_ans_c_evt_t evt; - - evt.evt_type = BLE_ANS_C_EVT_DISCONN_COMPLETE; - p_ans->evt_handler(&evt); - } -} - - -/**@brief Function for handling of BLE stack events. - */ -void ble_ans_c_on_ble_evt(ble_ans_c_t * p_ans, const ble_evt_t * p_ble_evt) -{ - switch (p_ble_evt->header.evt_id) - { - case BLE_GATTC_EVT_HVX: - event_notify(p_ans, p_ble_evt); - break; - - case BLE_GATTC_EVT_WRITE_RSP: - event_write_rsp(p_ans, p_ble_evt); - break; - - case BLE_GATTC_EVT_READ_RSP: - event_read_rsp(p_ans, p_ble_evt); - break; - - case BLE_GAP_EVT_DISCONNECTED: - event_disconnect(p_ans, p_ble_evt); - break; - } -} - - -uint32_t ble_ans_c_init(ble_ans_c_t * p_ans, const ble_ans_c_init_t * p_ans_init) -{ - VERIFY_PARAM_NOT_NULL(p_ans); - VERIFY_PARAM_NOT_NULL(p_ans_init); - VERIFY_PARAM_NOT_NULL(p_ans_init->evt_handler); - - // clear all handles - memset(p_ans, 0, sizeof(ble_ans_c_t)); - memset(m_tx_buffer, 0, TX_BUFFER_SIZE); - p_ans->conn_handle = BLE_CONN_HANDLE_INVALID; - - p_ans->evt_handler = p_ans_init->evt_handler; - p_ans->error_handler = p_ans_init->error_handler; - p_ans->message_buffer_size = p_ans_init->message_buffer_size; - p_ans->p_message_buffer = p_ans_init->p_message_buffer; - - BLE_UUID_BLE_ASSIGN(p_ans->service.service.uuid, BLE_UUID_ALERT_NOTIFICATION_SERVICE); - BLE_UUID_BLE_ASSIGN(p_ans->service.new_alert.uuid, BLE_UUID_NEW_ALERT_CHAR); - BLE_UUID_BLE_ASSIGN(p_ans->service.alert_notif_ctrl_point.uuid, - BLE_UUID_ALERT_NOTIFICATION_CONTROL_POINT_CHAR); - BLE_UUID_BLE_ASSIGN(p_ans->service.unread_alert_status.uuid, BLE_UUID_UNREAD_ALERT_CHAR); - BLE_UUID_BLE_ASSIGN(p_ans->service.suported_new_alert_cat.uuid, - BLE_UUID_SUPPORTED_NEW_ALERT_CATEGORY_CHAR); - BLE_UUID_BLE_ASSIGN(p_ans->service.suported_unread_alert_cat.uuid, - BLE_UUID_SUPPORTED_UNREAD_ALERT_CATEGORY_CHAR); - - BLE_UUID_BLE_ASSIGN(p_ans->service.new_alert_cccd.uuid, BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG); - BLE_UUID_BLE_ASSIGN(p_ans->service.unread_alert_cccd.uuid, - BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG); - - return ble_db_discovery_evt_register(&p_ans->service.service.uuid); -} - - -/**@brief Function for creating a TX message for writing a CCCD. - */ -static uint32_t cccd_configure(uint16_t conn_handle, uint16_t handle_cccd, bool enable) -{ - tx_message_t * p_msg; - uint16_t cccd_val = enable ? BLE_GATT_HVX_NOTIFICATION : 0; - - p_msg = &m_tx_buffer[m_tx_insert_index++]; - m_tx_insert_index &= TX_BUFFER_MASK; - - p_msg->req.write_req.gattc_params.handle = handle_cccd; - p_msg->req.write_req.gattc_params.len = WRITE_MESSAGE_LENGTH; - p_msg->req.write_req.gattc_params.p_value = p_msg->req.write_req.gattc_value; - p_msg->req.write_req.gattc_params.offset = 0; - p_msg->req.write_req.gattc_params.write_op = BLE_GATT_OP_WRITE_REQ; - p_msg->req.write_req.gattc_value[0] = LSB_16(cccd_val); - p_msg->req.write_req.gattc_value[1] = MSB_16(cccd_val); - p_msg->conn_handle = conn_handle; - p_msg->type = WRITE_REQ; - - tx_buffer_process(); - return NRF_SUCCESS; -} - - -uint32_t ble_ans_c_enable_notif_new_alert(const ble_ans_c_t * p_ans) -{ - if (p_ans->conn_handle == BLE_CONN_HANDLE_INVALID) - { - return NRF_ERROR_INVALID_STATE; - } - else - { - return cccd_configure(p_ans->conn_handle, - p_ans->service.new_alert_cccd.handle, - true); - } -} - - -uint32_t ble_ans_c_disable_notif_new_alert(const ble_ans_c_t * p_ans) -{ - return cccd_configure(p_ans->conn_handle, - p_ans->service.new_alert_cccd.handle, - false); -} - - -uint32_t ble_ans_c_enable_notif_unread_alert(const ble_ans_c_t * p_ans) -{ - if ( p_ans->conn_handle == BLE_CONN_HANDLE_INVALID) - { - return NRF_ERROR_INVALID_STATE; - } - return cccd_configure(p_ans->conn_handle, - p_ans->service.unread_alert_cccd.handle, - true); -} - - -uint32_t ble_ans_c_disable_notif_unread_alert(const ble_ans_c_t * p_ans) -{ - return cccd_configure(p_ans->conn_handle, - p_ans->service.unread_alert_cccd.handle, - false); -} - - -uint32_t ble_ans_c_control_point_write(const ble_ans_c_t * p_ans, - const ble_ans_control_point_t * p_control_point) -{ - tx_message_t * p_msg; - - p_msg = &m_tx_buffer[m_tx_insert_index++]; - m_tx_insert_index &= TX_BUFFER_MASK; - - p_msg->req.write_req.gattc_params.handle = p_ans->service.alert_notif_ctrl_point.handle_value; - p_msg->req.write_req.gattc_params.len = WRITE_MESSAGE_LENGTH; - p_msg->req.write_req.gattc_params.p_value = p_msg->req.write_req.gattc_value; - p_msg->req.write_req.gattc_params.offset = 0; - p_msg->req.write_req.gattc_params.write_op = BLE_GATT_OP_WRITE_REQ; - p_msg->req.write_req.gattc_value[0] = p_control_point->command; - p_msg->req.write_req.gattc_value[1] = p_control_point->category; - p_msg->conn_handle = p_ans->conn_handle; - p_msg->type = WRITE_REQ; - - tx_buffer_process(); - return NRF_SUCCESS; -} - - -uint32_t ble_ans_c_new_alert_read(const ble_ans_c_t * p_ans) -{ - tx_message_t * msg; - - msg = &m_tx_buffer[m_tx_insert_index++]; - m_tx_insert_index &= TX_BUFFER_MASK; - - msg->req.read_handle = p_ans->service.suported_new_alert_cat.handle_value; - msg->conn_handle = p_ans->conn_handle; - msg->type = READ_REQ; - - tx_buffer_process(); - return NRF_SUCCESS; -} - - -uint32_t ble_ans_c_unread_alert_read(const ble_ans_c_t * p_ans) -{ - tx_message_t * msg; - - msg = &m_tx_buffer[m_tx_insert_index++]; - m_tx_insert_index &= TX_BUFFER_MASK; - - msg->req.read_handle = p_ans->service.suported_unread_alert_cat.handle_value; - msg->conn_handle = p_ans->conn_handle; - msg->type = READ_REQ; - - tx_buffer_process(); - return NRF_SUCCESS; -} - - -uint32_t ble_ans_c_new_alert_notify(const ble_ans_c_t * p_ans, ble_ans_category_id_t category_id) -{ - ble_ans_control_point_t control_point; - - control_point.command = ANS_NOTIFY_NEW_INCOMING_ALERT_IMMEDIATELY; - control_point.category = category_id; - - return ble_ans_c_control_point_write(p_ans, &control_point); -} - - -uint32_t ble_ans_c_unread_alert_notify(const ble_ans_c_t * p_ans, ble_ans_category_id_t category_id) -{ - ble_ans_control_point_t control_point; - - control_point.command = ANS_NOTIFY_UNREAD_CATEGORY_STATUS_IMMEDIATELY; - control_point.category = category_id; - - return ble_ans_c_control_point_write(p_ans, &control_point); -} - - -uint32_t ble_ans_c_handles_assign(ble_ans_c_t * p_ans, - const uint16_t conn_handle, - const ble_ans_c_service_t * p_peer_handles) -{ - VERIFY_PARAM_NOT_NULL(p_ans); - - if (!is_valid_ans_srv_discovered(p_peer_handles)) - { - return NRF_ERROR_INVALID_PARAM; - } - p_ans->conn_handle = conn_handle; - - if (p_peer_handles != NULL) - { - // Copy the handles from the discovered characteristics over to the provided client instance. - char_set(&p_ans->service.alert_notif_ctrl_point, &p_peer_handles->alert_notif_ctrl_point); - char_set(&p_ans->service.suported_new_alert_cat, &p_peer_handles->suported_new_alert_cat); - char_set(&p_ans->service.suported_unread_alert_cat, &p_peer_handles->suported_unread_alert_cat); - char_set(&p_ans->service.new_alert, &p_peer_handles->new_alert); - char_cccd_set(&p_ans->service.new_alert_cccd, p_peer_handles->new_alert_cccd.handle); - char_set(&p_ans->service.unread_alert_status, &p_peer_handles->unread_alert_status); - char_cccd_set(&p_ans->service.unread_alert_cccd, p_peer_handles->unread_alert_cccd.handle); - } - - return NRF_SUCCESS; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ans_c/ble_ans_c.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ans_c/ble_ans_c.h deleted file mode 100644 index d79867d4a6..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ans_c/ble_ans_c.h +++ /dev/null @@ -1,348 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - */ - -/** @file - * - * @defgroup ble_sdk_srv_ans_c Alert Notification Service Client - * @{ - * @ingroup ble_sdk_srv - * @brief Alert Notification module. - * - * @details This module implements the Alert Notification Client according to the - * Alert Notification Profile. - * - * @note The application must propagate BLE stack events to the Alert Notification Client module - * by calling ble_ans_c_on_ble_evt() from the @ref softdevice_handler callback. - * - * @note Attention! - * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile - * qualification listings, this section of source code must not be modified. - */ -#ifndef BLE_ANS_C_H__ -#define BLE_ANS_C_H__ - -#include "ble.h" -#include "ble_gatts.h" -#include "ble_types.h" -#include "sdk_common.h" -#include "ble_srv_common.h" -#include "ble_db_discovery.h" - - -// Forward declaration of the ble_ans_c_t type. -typedef struct ble_ans_c_s ble_ans_c_t; - -/** Alerts types as defined in the alert category id; UUID: 0x2A43. */ -typedef enum -{ - ANS_TYPE_SIMPLE_ALERT = 0, /**< General text alert or non-text alert.*/ - ANS_TYPE_EMAIL = 1, /**< Alert when email messages arrives.*/ - ANS_TYPE_NEWS = 2, /**< News feeds such as RSS, Atom.*/ - ANS_TYPE_NOTIFICATION_CALL = 3, /**< Incoming call.*/ - ANS_TYPE_MISSED_CALL = 4, /**< Missed call.*/ - ANS_TYPE_SMS_MMS = 5, /**< SMS/MMS message arrives.*/ - ANS_TYPE_VOICE_MAIL = 6, /**< Voice mail.*/ - ANS_TYPE_SCHEDULE = 7, /**< Alert occurred on calendar, planner.*/ - ANS_TYPE_HIGH_PRIORITIZED_ALERT = 8, /**< Alert that should be handled as high priority.*/ - ANS_TYPE_INSTANT_MESSAGE = 9, /**< Alert for incoming instant messages.*/ - ANS_TYPE_ALL_ALERTS = 0xFF /**< Identifies All Alerts. */ -} ble_ans_category_id_t; - -/** Alerts notification control point commands as defined in the Alert Notification Specification; - * UUID: 0x2A44. - */ -typedef enum -{ - ANS_ENABLE_NEW_INCOMING_ALERT_NOTIFICATION = 0, /**< Enable New Incoming Alert Notification.*/ - ANS_ENABLE_UNREAD_CATEGORY_STATUS_NOTIFICATION = 1, /**< Enable Unread Category Status Notification.*/ - ANS_DISABLE_NEW_INCOMING_ALERT_NOTIFICATION = 2, /**< Disable New Incoming Alert Notification.*/ - ANS_DISABLE_UNREAD_CATEGORY_STATUS_NOTIFICATION = 3, /**< Disable Unread Category Status Notification.*/ - ANS_NOTIFY_NEW_INCOMING_ALERT_IMMEDIATELY = 4, /**< Notify New Incoming Alert immediately.*/ - ANS_NOTIFY_UNREAD_CATEGORY_STATUS_IMMEDIATELY = 5, /**< Notify Unread Category Status immediately.*/ -} ble_ans_command_id_t; - -/**@brief Alert Notification Event types that are passed from client to application on an event. */ -typedef enum -{ - BLE_ANS_C_EVT_DISCOVERY_COMPLETE, /**< A successful connection has been established and the characteristics of the server has been fetched. */ - BLE_ANS_C_EVT_DISCOVERY_FAILED, /**< It was not possible to discover service or characteristics of the connected peer. */ - BLE_ANS_C_EVT_DISCONN_COMPLETE, /**< The connection has been taken down. */ - BLE_ANS_C_EVT_NOTIFICATION, /**< A valid Alert Notification has been received from the server.*/ - BLE_ANS_C_EVT_READ_RESP, /**< A read response has been received from the server.*/ - BLE_ANS_C_EVT_WRITE_RESP /**< A write response has been received from the server.*/ -} ble_ans_c_evt_type_t; - -/**@brief Alert Notification Control Point structure. */ -typedef struct -{ - ble_ans_command_id_t command; /**< The command to be written to the control point, see @ref ble_ans_command_id_t. */ - ble_ans_category_id_t category; /**< The category for the control point for which the command applies, see @ref ble_ans_category_id_t. */ -} ble_ans_control_point_t; - -/**@brief Alert Notification Setting structure containing the supported alerts in the service. - * - *@details - * The structure contains bit fields describing which alerts that are supported: - * 0 = Unsupported - * 1 = Supported - */ -typedef struct -{ - uint8_t ans_simple_alert_support : 1; /**< Support for General text alert or non-text alert.*/ - uint8_t ans_email_support : 1; /**< Support for Alert when email messages arrives.*/ - uint8_t ans_news_support : 1; /**< Support for News feeds such as RSS, Atom.*/ - uint8_t ans_notification_call_support : 1; /**< Support for Incoming call.*/ - uint8_t ans_missed_call_support : 1; /**< Support for Missed call.*/ - uint8_t ans_sms_mms_support : 1; /**< Support for SMS/MMS message arrives.*/ - uint8_t ans_voice_mail_support : 1; /**< Support for Voice mail.*/ - uint8_t ans_schedule_support : 1; /**< Support for Alert occurred on calendar, planner.*/ - uint8_t ans_high_prioritized_alert_support : 1; /**< Support for Alert that should be handled as high priority.*/ - uint8_t ans_instant_message_support : 1; /**< Support for Alert for incoming instant messages.*/ - uint8_t reserved : 6; /**< Reserved for future use. */ -} ble_ans_alert_settings_t; - -/**@brief Alert Notification structure - */ -typedef struct -{ - uint8_t alert_category; /**< Alert category to which this alert belongs.*/ - uint8_t alert_category_count; /**< Number of alerts in the category. */ - uint32_t alert_msg_length; /**< Length of optional text message send by the server. */ - uint8_t * p_alert_msg_buf; /**< Pointer to buffer containing the optional text message. */ -} ble_ans_alert_notification_t; - - -/**@brief Struct to hold information on the Alert Notification Service if found on the server. -*/ -typedef struct -{ - ble_gattc_service_t service; /**< The GATT service holding the discovered Alert Notification Service. */ - ble_gattc_char_t alert_notif_ctrl_point; /**< Characteristic for the Alert Notification Control Point. @ref BLE_UUID_ALERT_NOTIFICATION_CONTROL_POINT_CHAR */ - ble_gattc_char_t suported_new_alert_cat; /**< Characteristic for the Supported New Alert category. @ref BLE_UUID_SUPPORTED_NEW_ALERT_CATEGORY_CHAR */ - ble_gattc_char_t suported_unread_alert_cat; /**< Characteristic for the Unread Alert category. @ref BLE_UUID_SUPPORTED_UNREAD_ALERT_CATEGORY_CHAR */ - ble_gattc_char_t new_alert; /**< Characteristic for the New Alert Notification. @ref BLE_UUID_NEW_ALERT_CHAR */ - ble_gattc_desc_t new_alert_cccd; /**< Characteristic Descriptor for New Alert Category. Enables or Disables GATT notifications */ - ble_gattc_char_t unread_alert_status; /**< Characteristic for the Unread Alert Notification. @ref BLE_UUID_UNREAD_ALERT_CHAR */ - ble_gattc_desc_t unread_alert_cccd; /**< Characteristic Descriptor for Unread Alert Category. Enables or Disables GATT notifications */ -} ble_ans_c_service_t; - - -/**@brief Alert Notification Event structure - * - * @details The structure contains the event that should be handled, as well as - * additional information. - */ -typedef struct -{ - ble_ans_c_evt_type_t evt_type; /**< Type of event. */ - uint16_t conn_handle; /**< Connection handle on which the ANS service was discovered on the peer device. This will be filled if the evt_type is @ref BLE_ANS_C_EVT_DISCOVERY_COMPLETE.*/ - ble_uuid_t uuid; /**< UUID of the event in case of an alert or notification. */ - union - { - ble_ans_alert_settings_t settings; /**< Setting returned from server on read request. */ - ble_ans_alert_notification_t alert; /**< Alert Notification data sent by the server. */ - uint32_t error_code; /**< Additional status/error code if the event was caused by a stack error or gatt status, e.g. during service discovery. */ - ble_ans_c_service_t service; /**< Info on the discovered Alert Notification Service discovered. This will be filled if the evt_type is @ref BLE_ANS_C_EVT_DISCOVERY_COMPLETE.*/ - } data; -} ble_ans_c_evt_t; - -/**@brief Alert Notification event handler type. */ -typedef void (*ble_ans_c_evt_handler_t) (ble_ans_c_evt_t * p_evt); - - -/**@brief Alert Notification structure. This contains various status information for the client. */ -struct ble_ans_c_s -{ - ble_ans_c_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Alert Notification Client Application. */ - ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ - uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ - uint8_t central_handle; /**< Handle for the currently connected central if peer is bonded. */ - uint8_t service_handle; /**< Handle to the service in the database to use for this instance. */ - uint32_t message_buffer_size; /**< Size of message buffer to hold the additional text messages received on notifications. */ - uint8_t * p_message_buffer; /**< Pointer to the buffer to be used for additional text message handling. */ - ble_ans_c_service_t service; /**< Struct to store the different handles and UUIDs related to the service. */ -}; - -/**@brief Alert Notification init structure. This contains all options and data needed for - * initialization of the client.*/ -typedef struct -{ - ble_ans_c_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Battery Service. */ - ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ - uint32_t message_buffer_size; /**< Size of buffer to handle messages. */ - uint8_t * p_message_buffer; /**< Pointer to buffer for passing messages. */ -} ble_ans_c_init_t; - - -/**@brief Function for handling events from the database discovery module. - * - * @details Call this function when getting a callback event from the DB discovery modue. - * This function will handle an event from the database discovery module, and determine - * if it relates to the discovery of heart rate service at the peer. If so, it will - * call the application's event handler indicating that the heart rate service has been - * discovered at the peer. It also populates the event with the service related - * information before providing it to the application. - * - * @param[in] p_ans Pointer to the Alert Notification client structure instance that will handle - * the discovery. - * @param[in] p_evt Pointer to the event received from the database discovery module. - */ -void ble_ans_c_on_db_disc_evt(ble_ans_c_t * p_ans, const ble_db_discovery_evt_t * p_evt); - - -/**@brief Function for handling the Application's BLE Stack events. - * - * @details Handles all events from the BLE stack of interest to the Alert Notification Client. - * - * @param[in] p_ans Alert Notification Client structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -void ble_ans_c_on_ble_evt(ble_ans_c_t * p_ans, const ble_evt_t * p_ble_evt); - - -/**@brief Function for initializing the Alert Notification Client. - * - * @param[out] p_ans Alert Notification Client structure. This structure will have to be - * supplied by the application. It will be initialized by this function, - * and will later be used to identify this particular client instance. - * @param[in] p_ans_init Information needed to initialize the client. - * - * @return NRF_SUCCESS on successful initialization of client, otherwise an error code. - */ -uint32_t ble_ans_c_init(ble_ans_c_t * p_ans, const ble_ans_c_init_t * p_ans_init); - - -/**@brief Function for writing the to CCCD to enable new alert notifications from the Alert Notification Service. - * - * @param[in] p_ans Alert Notification structure. This structure will have to be supplied by - * the application. It identifies the particular client instance to use. - * - * @return NRF_SUCCESS on successful writing of the CCCD, otherwise an error code. - */ -uint32_t ble_ans_c_enable_notif_new_alert(const ble_ans_c_t * p_ans); - - -/**@brief Function for writing to the CCCD to enable unread alert notifications from the Alert Notification Service. - * - * @param[in] p_ans Alert Notification structure. This structure will have to be supplied by - * the application. It identifies the particular client instance to use. - * - * @return NRF_SUCCESS on successful writing of the CCCD, otherwise an error code. - */ -uint32_t ble_ans_c_enable_notif_unread_alert(const ble_ans_c_t * p_ans); - - -/**@brief Function for writing to the CCCD to disable new alert notifications from the Alert Notification Service. - * - * @param[in] p_ans Alert Notification structure. This structure will have to be supplied by - * the application. It identifies the particular client instance to use. - * - * @return NRF_SUCCESS on successful writing of the CCCD, otherwise an error code. - */ -uint32_t ble_ans_c_disable_notif_new_alert(const ble_ans_c_t * p_ans); - - -/**@brief Function for writing to the CCCD to disable unread alert notifications from the Alert Notification Service. - * - * @param[in] p_ans Alert Notification structure. This structure will have to be supplied by - * the application. It identifies the particular client instance to use. - * - * @return NRF_SUCCESS on successful writing of the CCCD, otherwise an error code. - */ -uint32_t ble_ans_c_disable_notif_unread_alert(const ble_ans_c_t * p_ans); - - -/**@brief Function for writing to the Alert Notification Control Point to specify alert notification behavior in the - * Alert Notification Service on the Central. - * - * @param[in] p_ans Alert Notification structure. This structure will have to be - * supplied by the application. It identifies the particular client - * instance to use. - * @param[in] p_control_point Alert Notification Control Point structure. This structure - * specifies the values to write to the Alert Notification Control - * Point, UUID 0x2A44. - * - * @return NRF_SUCCESS on successful writing of the Control Point, otherwise an error code. - */ -uint32_t ble_ans_c_control_point_write(const ble_ans_c_t * p_ans, - const ble_ans_control_point_t * p_control_point); - - -/**@brief Function for reading the Supported New Alert characteristic value of the service. - * The value describes the alerts supported in the central. - * - * @param[in] p_ans Alert Notification structure. This structure will have to be supplied by - * the application. It identifies the particular client instance to use. - * - * @return NRF_SUCCESS on successful transmission of the read request, otherwise an error code. - */ -uint32_t ble_ans_c_new_alert_read(const ble_ans_c_t * p_ans); - - -/**@brief Function for reading the Supported Unread Alert characteristic value of the service. - * The value describes the alerts supported in the central. - * - * @param[in] p_ans Alert Notification structure. This structure will have to be supplied by - * the application. It identifies the particular client instance to use. - * - * @return NRF_SUCCESS on successful transmission of the read request, otherwise an error code. - */ -uint32_t ble_ans_c_unread_alert_read(const ble_ans_c_t * p_ans); - - -/**@brief Function for requesting the peer to notify the New Alert characteristics immediately. - * - * @param[in] p_ans Alert Notification structure. This structure will have to be supplied by - * the application. It identifies the particular client instance to use. - * @param[in] category The category ID for which the peer should notify the client. - * - * @return NRF_SUCCESS on successful transmission of the read request, otherwise an error code. - */ -uint32_t ble_ans_c_new_alert_notify(const ble_ans_c_t * p_ans, ble_ans_category_id_t category); - - -/**@brief Function for requesting the peer to notify the Unread Alert characteristics immediately. - * - * @param[in] p_ans Alert Notification structure. This structure will have to be supplied by - * the application. It identifies the particular client instance to use. - * @param[in] category The category ID for which the peer should notify the client. - * - * @return NRF_SUCCESS on successful transmission of the read request, otherwise an error code. - */ -uint32_t ble_ans_c_unread_alert_notify(const ble_ans_c_t * p_ans, ble_ans_category_id_t category); - - -/**@brief Function for assigning a handles to a an instance of ans_c. - * - * @details Call this function when a link has been established with a peer to - * associate this link to an instance of the module. This makes it - * possible to handle several link and associate each link to a particular - * instance of the ans_c module. The connection handle and attribute handles will be - * provided from the discovery event @ref BLE_ANS_C_EVT_DISCOVERY_COMPLETE. - * - * @param[in] p_ans Pointer to the Alert Notification client structure instance to - * associate with the handles. - * @param[in] conn_handle Connection handle to associated with the given Alert Notification Client - * Instance. - * @param[in] p_peer_handles Attribute handles on the ANS server that you want this ANS client to - * interact with. - * - */ -uint32_t ble_ans_c_handles_assign(ble_ans_c_t * p_ans, - const uint16_t conn_handle, - const ble_ans_c_service_t * p_peer_handles); - - - -#endif // BLE_ANS_C_H__ - -/** @} */ - diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas/ble_bas.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas/ble_bas.c deleted file mode 100644 index 2922a3a5b8..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas/ble_bas.c +++ /dev/null @@ -1,316 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/* Attention! -* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile -* qualification listings, this section of source code must not be modified. -*/ - -#include "ble_bas.h" -#include -#include "nordic_common.h" -#include "ble_srv_common.h" -#include "app_util.h" - - -#define INVALID_BATTERY_LEVEL 255 - - -/**@brief Function for handling the Connect event. - * - * @param[in] p_bas Battery Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_connect(ble_bas_t * p_bas, ble_evt_t * p_ble_evt) -{ - p_bas->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; -} - - -/**@brief Function for handling the Disconnect event. - * - * @param[in] p_bas Battery Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_disconnect(ble_bas_t * p_bas, ble_evt_t * p_ble_evt) -{ - UNUSED_PARAMETER(p_ble_evt); - p_bas->conn_handle = BLE_CONN_HANDLE_INVALID; -} - - -/**@brief Function for handling the Write event. - * - * @param[in] p_bas Battery Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_write(ble_bas_t * p_bas, ble_evt_t * p_ble_evt) -{ - if (p_bas->is_notification_supported) - { - ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; - - if ( - (p_evt_write->handle == p_bas->battery_level_handles.cccd_handle) - && - (p_evt_write->len == 2) - ) - { - // CCCD written, call application event handler - if (p_bas->evt_handler != NULL) - { - ble_bas_evt_t evt; - - if (ble_srv_is_notification_enabled(p_evt_write->data)) - { - evt.evt_type = BLE_BAS_EVT_NOTIFICATION_ENABLED; - } - else - { - evt.evt_type = BLE_BAS_EVT_NOTIFICATION_DISABLED; - } - - p_bas->evt_handler(p_bas, &evt); - } - } - } -} - - -void ble_bas_on_ble_evt(ble_bas_t * p_bas, ble_evt_t * p_ble_evt) -{ - if (p_bas == NULL || p_ble_evt == NULL) - { - return; - } - - switch (p_ble_evt->header.evt_id) - { - case BLE_GAP_EVT_CONNECTED: - on_connect(p_bas, p_ble_evt); - break; - - case BLE_GAP_EVT_DISCONNECTED: - on_disconnect(p_bas, p_ble_evt); - break; - - case BLE_GATTS_EVT_WRITE: - on_write(p_bas, p_ble_evt); - break; - - default: - // No implementation needed. - break; - } -} - - -/**@brief Function for adding the Battery Level characteristic. - * - * @param[in] p_bas Battery Service structure. - * @param[in] p_bas_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t battery_level_char_add(ble_bas_t * p_bas, const ble_bas_init_t * p_bas_init) -{ - uint32_t err_code; - ble_gatts_char_md_t char_md; - ble_gatts_attr_md_t cccd_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - uint8_t initial_battery_level; - uint8_t encoded_report_ref[BLE_SRV_ENCODED_REPORT_REF_LEN]; - uint8_t init_len; - - // Add Battery Level characteristic - if (p_bas->is_notification_supported) - { - memset(&cccd_md, 0, sizeof(cccd_md)); - - // According to BAS_SPEC_V10, the read operation on cccd should be possible without - // authentication. - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); - cccd_md.write_perm = p_bas_init->battery_level_char_attr_md.cccd_write_perm; - cccd_md.vloc = BLE_GATTS_VLOC_STACK; - } - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.read = 1; - char_md.char_props.notify = (p_bas->is_notification_supported) ? 1 : 0; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = (p_bas->is_notification_supported) ? &cccd_md : NULL; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_BATTERY_LEVEL_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.read_perm = p_bas_init->battery_level_char_attr_md.read_perm; - attr_md.write_perm = p_bas_init->battery_level_char_attr_md.write_perm; - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - initial_battery_level = p_bas_init->initial_batt_level; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = sizeof(uint8_t); - attr_char_value.init_offs = 0; - attr_char_value.max_len = sizeof(uint8_t); - attr_char_value.p_value = &initial_battery_level; - - err_code = sd_ble_gatts_characteristic_add(p_bas->service_handle, &char_md, - &attr_char_value, - &p_bas->battery_level_handles); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - if (p_bas_init->p_report_ref != NULL) - { - // Add Report Reference descriptor - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_REPORT_REF_DESCR); - - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.read_perm = p_bas_init->battery_level_report_read_perm; - BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.write_perm); - - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - init_len = ble_srv_report_ref_encode(encoded_report_ref, p_bas_init->p_report_ref); - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = init_len; - attr_char_value.init_offs = 0; - attr_char_value.max_len = attr_char_value.init_len; - attr_char_value.p_value = encoded_report_ref; - - err_code = sd_ble_gatts_descriptor_add(p_bas->battery_level_handles.value_handle, - &attr_char_value, - &p_bas->report_ref_handle); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - else - { - p_bas->report_ref_handle = BLE_GATT_HANDLE_INVALID; - } - - return NRF_SUCCESS; -} - - -uint32_t ble_bas_init(ble_bas_t * p_bas, const ble_bas_init_t * p_bas_init) -{ - if (p_bas == NULL || p_bas_init == NULL) - { - return NRF_ERROR_NULL; - } - - uint32_t err_code; - ble_uuid_t ble_uuid; - - // Initialize service structure - p_bas->evt_handler = p_bas_init->evt_handler; - p_bas->conn_handle = BLE_CONN_HANDLE_INVALID; - p_bas->is_notification_supported = p_bas_init->support_notification; - p_bas->battery_level_last = INVALID_BATTERY_LEVEL; - - // Add service - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_BATTERY_SERVICE); - - err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &ble_uuid, &p_bas->service_handle); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add battery level characteristic - return battery_level_char_add(p_bas, p_bas_init); -} - - -uint32_t ble_bas_battery_level_update(ble_bas_t * p_bas, uint8_t battery_level) -{ - if (p_bas == NULL) - { - return NRF_ERROR_NULL; - } - - uint32_t err_code = NRF_SUCCESS; - ble_gatts_value_t gatts_value; - - if (battery_level != p_bas->battery_level_last) - { - // Initialize value struct. - memset(&gatts_value, 0, sizeof(gatts_value)); - - gatts_value.len = sizeof(uint8_t); - gatts_value.offset = 0; - gatts_value.p_value = &battery_level; - - // Update database. - err_code = sd_ble_gatts_value_set(p_bas->conn_handle, - p_bas->battery_level_handles.value_handle, - &gatts_value); - if (err_code == NRF_SUCCESS) - { - // Save new battery value. - p_bas->battery_level_last = battery_level; - } - else - { - return err_code; - } - - // Send value if connected and notifying. - if ((p_bas->conn_handle != BLE_CONN_HANDLE_INVALID) && p_bas->is_notification_supported) - { - ble_gatts_hvx_params_t hvx_params; - - memset(&hvx_params, 0, sizeof(hvx_params)); - - hvx_params.handle = p_bas->battery_level_handles.value_handle; - hvx_params.type = BLE_GATT_HVX_NOTIFICATION; - hvx_params.offset = gatts_value.offset; - hvx_params.p_len = &gatts_value.len; - hvx_params.p_data = gatts_value.p_value; - - err_code = sd_ble_gatts_hvx(p_bas->conn_handle, &hvx_params); - } - else - { - err_code = NRF_ERROR_INVALID_STATE; - } - } - - return err_code; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas/ble_bas.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas/ble_bas.h deleted file mode 100644 index 7673a7c300..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas/ble_bas.h +++ /dev/null @@ -1,133 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/** @file - * - * @defgroup ble_sdk_srv_bas Battery Service - * @{ - * @ingroup ble_sdk_srv - * @brief Battery Service module. - * - * @details This module implements the Battery Service with the Battery Level characteristic. - * During initialization it adds the Battery Service and Battery Level characteristic - * to the BLE stack database. Optionally it can also add a Report Reference descriptor - * to the Battery Level characteristic (used when including the Battery Service in - * the HID service). - * - * If specified, the module will support notification of the Battery Level characteristic - * through the ble_bas_battery_level_update() function. - * If an event handler is supplied by the application, the Battery Service will - * generate Battery Service events to the application. - * - * @note The application must propagate BLE stack events to the Battery Service module by calling - * ble_bas_on_ble_evt() from the @ref softdevice_handler callback. - * - * @note Attention! - * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile - * qualification listings, this section of source code must not be modified. - */ - -#ifndef BLE_BAS_H__ -#define BLE_BAS_H__ - -#include -#include -#include "ble.h" -#include "ble_srv_common.h" - -/**@brief Battery Service event type. */ -typedef enum -{ - BLE_BAS_EVT_NOTIFICATION_ENABLED, /**< Battery value notification enabled event. */ - BLE_BAS_EVT_NOTIFICATION_DISABLED /**< Battery value notification disabled event. */ -} ble_bas_evt_type_t; - -/**@brief Battery Service event. */ -typedef struct -{ - ble_bas_evt_type_t evt_type; /**< Type of event. */ -} ble_bas_evt_t; - -// Forward declaration of the ble_bas_t type. -typedef struct ble_bas_s ble_bas_t; - -/**@brief Battery Service event handler type. */ -typedef void (*ble_bas_evt_handler_t) (ble_bas_t * p_bas, ble_bas_evt_t * p_evt); - -/**@brief Battery Service init structure. This contains all options and data needed for - * initialization of the service.*/ -typedef struct -{ - ble_bas_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Battery Service. */ - bool support_notification; /**< TRUE if notification of Battery Level measurement is supported. */ - ble_srv_report_ref_t * p_report_ref; /**< If not NULL, a Report Reference descriptor with the specified value will be added to the Battery Level characteristic */ - uint8_t initial_batt_level; /**< Initial battery level */ - ble_srv_cccd_security_mode_t battery_level_char_attr_md; /**< Initial security level for battery characteristics attribute */ - ble_gap_conn_sec_mode_t battery_level_report_read_perm; /**< Initial security level for battery report read attribute */ -} ble_bas_init_t; - -/**@brief Battery Service structure. This contains various status information for the service. */ -struct ble_bas_s -{ - ble_bas_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Battery Service. */ - uint16_t service_handle; /**< Handle of Battery Service (as provided by the BLE stack). */ - ble_gatts_char_handles_t battery_level_handles; /**< Handles related to the Battery Level characteristic. */ - uint16_t report_ref_handle; /**< Handle of the Report Reference descriptor. */ - uint8_t battery_level_last; /**< Last Battery Level measurement passed to the Battery Service. */ - uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ - bool is_notification_supported; /**< TRUE if notification of Battery Level is supported. */ -}; - -/**@brief Function for initializing the Battery Service. - * - * @param[out] p_bas Battery Service structure. This structure will have to be supplied by - * the application. It will be initialized by this function, and will later - * be used to identify this particular service instance. - * @param[in] p_bas_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. - */ -uint32_t ble_bas_init(ble_bas_t * p_bas, const ble_bas_init_t * p_bas_init); - -/**@brief Function for handling the Application's BLE Stack events. - * - * @details Handles all events from the BLE stack of interest to the Battery Service. - * - * @note For the requirements in the BAS specification to be fulfilled, - * ble_bas_battery_level_update() must be called upon reconnection if the - * battery level has changed while the service has been disconnected from a bonded - * client. - * - * @param[in] p_bas Battery Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -void ble_bas_on_ble_evt(ble_bas_t * p_bas, ble_evt_t * p_ble_evt); - -/**@brief Function for updating the battery level. - * - * @details The application calls this function after having performed a battery measurement. If - * notification has been enabled, the battery level characteristic is sent to the client. - * - * @note For the requirements in the BAS specification to be fulfilled, - * this function must be called upon reconnection if the battery level has changed - * while the service has been disconnected from a bonded client. - * - * @param[in] p_bas Battery Service structure. - * @param[in] battery_level New battery measurement value (in percent of full capacity). - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -uint32_t ble_bas_battery_level_update(ble_bas_t * p_bas, uint8_t battery_level); - -#endif // BLE_BAS_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas_c/ble_bas_c.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas_c/ble_bas_c.c deleted file mode 100644 index 08aff9f330..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas_c/ble_bas_c.c +++ /dev/null @@ -1,370 +0,0 @@ -/* - * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is confidential property of Nordic Semiconductor. The use, - * copying, transfer or disclosure of such information is prohibited except by express written - * agreement with Nordic Semiconductor. - * - */ - -#include "ble_bas_c.h" -#include "ble_db_discovery.h" -#include "ble_types.h" -#include "ble_srv_common.h" -#include "ble_gattc.h" -#include "app_trace.h" -#include "sdk_common.h" - -#define LOG app_trace_log /**< Debug logger macro that will be used in this file to do logging of important information over UART. */ -#define TX_BUFFER_MASK 0x07 /**< TX Buffer mask, must be a mask of contiguous zeroes, followed by contiguous sequence of ones: 000...111. */ -#define TX_BUFFER_SIZE (TX_BUFFER_MASK + 1) /**< Size of the send buffer, which is 1 higher than the mask. */ -#define WRITE_MESSAGE_LENGTH BLE_CCCD_VALUE_LEN /**< Length of the write message for CCCD. */ - -typedef enum -{ - READ_REQ, /**< Type identifying that this tx_message is a read request. */ - WRITE_REQ /**< Type identifying that this tx_message is a write request. */ -} tx_request_t; - -/**@brief Structure for writing a message to the peer, i.e. CCCD. - */ -typedef struct -{ - uint8_t gattc_value[WRITE_MESSAGE_LENGTH]; /**< The message to write. */ - ble_gattc_write_params_t gattc_params; /**< The GATTC parameters for this message. */ -} write_params_t; - -/**@brief Structure for holding the data that will be transmitted to the connected central. - */ -typedef struct -{ - uint16_t conn_handle; /**< Connection handle to be used when transmitting this message. */ - tx_request_t type; /**< Type of message. (read or write). */ - union - { - uint16_t read_handle; /**< Read request handle. */ - write_params_t write_req; /**< Write request message. */ - } req; -} tx_message_t; - - -static tx_message_t m_tx_buffer[TX_BUFFER_SIZE]; /**< Transmit buffer for the messages that will be transmitted to the central. */ -static uint32_t m_tx_insert_index = 0; /**< Current index in the transmit buffer where the next message should be inserted. */ -static uint32_t m_tx_index = 0; /**< Current index in the transmit buffer containing the next message to be transmitted. */ - -/**@brief Function for passing any pending request from the buffer to the stack. - */ -static void tx_buffer_process(void) -{ - if (m_tx_index != m_tx_insert_index) - { - uint32_t err_code; - - if (m_tx_buffer[m_tx_index].type == READ_REQ) - { - err_code = sd_ble_gattc_read(m_tx_buffer[m_tx_index].conn_handle, - m_tx_buffer[m_tx_index].req.read_handle, - 0); - } - else - { - err_code = sd_ble_gattc_write(m_tx_buffer[m_tx_index].conn_handle, - &m_tx_buffer[m_tx_index].req.write_req.gattc_params); - } - if (err_code == NRF_SUCCESS) - { - LOG("[BAS_C]: SD Read/Write API returns Success..\r\n"); - m_tx_index++; - m_tx_index &= TX_BUFFER_MASK; - } - else - { - LOG("[BAS_C]: SD Read/Write API returns error. This message sending will be " - "attempted again..\r\n"); - } - } -} - - -/**@brief Function for handling write response events. - * - * @param[in] p_bas_c Pointer to the Battery Service Client Structure. - * @param[in] p_ble_evt Pointer to the SoftDevice event. - */ -static void on_write_rsp(ble_bas_c_t * p_bas_c, const ble_evt_t * p_ble_evt) -{ - // Check if the event if on the link for this instance - if (p_bas_c->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) - { - return; - } - // Check if there is any message to be sent across to the peer and send it. - tx_buffer_process(); -} - - -/**@brief Function for handling read response events. - * - * @details This function will validate the read response and raise the appropriate - * event to the application. - * - * @param[in] p_bas_c Pointer to the Battery Service Client Structure. - * @param[in] p_ble_evt Pointer to the SoftDevice event. - */ -static void on_read_rsp(ble_bas_c_t * p_bas_c, const ble_evt_t * p_ble_evt) -{ - const ble_gattc_evt_read_rsp_t * p_response; - - // Check if the event if on the link for this instance - if (p_bas_c->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) - { - return; - } - - p_response = &p_ble_evt->evt.gattc_evt.params.read_rsp; - - if (p_response->handle == p_bas_c->peer_bas_db.bl_handle) - { - ble_bas_c_evt_t evt; - - evt.conn_handle = p_ble_evt->evt.gattc_evt.conn_handle; - evt.evt_type = BLE_BAS_C_EVT_BATT_READ_RESP; - - evt.params.battery_level = p_response->data[0]; - - p_bas_c->evt_handler(p_bas_c, &evt); - } - // Check if there is any buffered transmissions and send them. - tx_buffer_process(); -} - - -/**@brief Function for handling Handle Value Notification received from the SoftDevice. - * - * @details This function will handle the Handle Value Notification received from the SoftDevice - * and checks if it is a notification of the Battery Level measurement from the peer. If - * so, this function will decode the battery level measurement and send it to the - * application. - * - * @param[in] p_ble_bas_c Pointer to the Battery Service Client structure. - * @param[in] p_ble_evt Pointer to the BLE event received. - */ -static void on_hvx(ble_bas_c_t * p_ble_bas_c, const ble_evt_t * p_ble_evt) -{ - // Check if the event if on the link for this instance - if (p_ble_bas_c->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) - { - return; - } - // Check if this notification is a battery level notification. - if (p_ble_evt->evt.gattc_evt.params.hvx.handle == p_ble_bas_c->peer_bas_db.bl_handle) - { - if (p_ble_evt->evt.gattc_evt.params.hvx.len == 1) - { - ble_bas_c_evt_t ble_bas_c_evt; - ble_bas_c_evt.conn_handle = p_ble_evt->evt.gattc_evt.conn_handle; - ble_bas_c_evt.evt_type = BLE_BAS_C_EVT_BATT_NOTIFICATION; - - ble_bas_c_evt.params.battery_level = p_ble_evt->evt.gattc_evt.params.hvx.data[0]; - - p_ble_bas_c->evt_handler(p_ble_bas_c, &ble_bas_c_evt); - } - } -} - - -void ble_bas_on_db_disc_evt(ble_bas_c_t * p_ble_bas_c, const ble_db_discovery_evt_t * p_evt) -{ - // Check if the Battery Service was discovered. - if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE - && - p_evt->params.discovered_db.srv_uuid.uuid == BLE_UUID_BATTERY_SERVICE - && - p_evt->params.discovered_db.srv_uuid.type == BLE_UUID_TYPE_BLE) - { - // Find the CCCD Handle of the Battery Level characteristic. - uint8_t i; - - ble_bas_c_evt_t evt; - evt.evt_type = BLE_BAS_C_EVT_DISCOVERY_COMPLETE; - evt.conn_handle = p_evt->conn_handle; - for (i = 0; i < p_evt->params.discovered_db.char_count; i++) - { - if (p_evt->params.discovered_db.charateristics[i].characteristic.uuid.uuid == - BLE_UUID_BATTERY_LEVEL_CHAR) - { - // Found Battery Level characteristic. Store CCCD handle and break. - evt.params.bas_db.bl_cccd_handle = - p_evt->params.discovered_db.charateristics[i].cccd_handle; - evt.params.bas_db.bl_handle = - p_evt->params.discovered_db.charateristics[i].characteristic.handle_value; - break; - } - } - - LOG("[BAS_C]: Battery Service discovered at peer.\r\n"); - - //If the instance has been assigned prior to db_discovery, assign the db_handles - if(p_ble_bas_c->conn_handle != BLE_CONN_HANDLE_INVALID) - { - if ((p_ble_bas_c->peer_bas_db.bl_cccd_handle == BLE_GATT_HANDLE_INVALID)&& - (p_ble_bas_c->peer_bas_db.bl_handle == BLE_GATT_HANDLE_INVALID)) - { - p_ble_bas_c->peer_bas_db = evt.params.bas_db; - } - } - p_ble_bas_c->evt_handler(p_ble_bas_c, &evt); - } - else - { - LOG("[BAS_C]: Battery Service discovery failure at peer. \r\n"); - } -} - - -/**@brief Function for creating a message for writing to the CCCD. - */ -static uint32_t cccd_configure(uint16_t conn_handle, uint16_t handle_cccd, bool notification_enable) -{ - LOG("[BAS_C]: Configuring CCCD. CCCD Handle = %d, Connection Handle = %d\r\n", - handle_cccd,conn_handle); - - tx_message_t * p_msg; - uint16_t cccd_val = notification_enable ? BLE_GATT_HVX_NOTIFICATION : 0; - - p_msg = &m_tx_buffer[m_tx_insert_index++]; - m_tx_insert_index &= TX_BUFFER_MASK; - - p_msg->req.write_req.gattc_params.handle = handle_cccd; - p_msg->req.write_req.gattc_params.len = WRITE_MESSAGE_LENGTH; - p_msg->req.write_req.gattc_params.p_value = p_msg->req.write_req.gattc_value; - p_msg->req.write_req.gattc_params.offset = 0; - p_msg->req.write_req.gattc_params.write_op = BLE_GATT_OP_WRITE_REQ; - p_msg->req.write_req.gattc_value[0] = LSB_16(cccd_val); - p_msg->req.write_req.gattc_value[1] = MSB_16(cccd_val); - p_msg->conn_handle = conn_handle; - p_msg->type = WRITE_REQ; - - tx_buffer_process(); - return NRF_SUCCESS; -} - - -uint32_t ble_bas_c_init(ble_bas_c_t * p_ble_bas_c, ble_bas_c_init_t * p_ble_bas_c_init) -{ - VERIFY_PARAM_NOT_NULL(p_ble_bas_c); - VERIFY_PARAM_NOT_NULL(p_ble_bas_c_init); - - ble_uuid_t bas_uuid; - - bas_uuid.type = BLE_UUID_TYPE_BLE; - bas_uuid.uuid = BLE_UUID_BATTERY_SERVICE; - - p_ble_bas_c->conn_handle = BLE_CONN_HANDLE_INVALID; - p_ble_bas_c->peer_bas_db.bl_cccd_handle = BLE_GATT_HANDLE_INVALID; - p_ble_bas_c->peer_bas_db.bl_handle = BLE_GATT_HANDLE_INVALID; - p_ble_bas_c->evt_handler = p_ble_bas_c_init->evt_handler; - - return ble_db_discovery_evt_register(&bas_uuid); -} - - -/**@brief Function for handling Disconnected event received from the SoftDevice. - * - * @details This function check if the disconnect event is happening on the link - * associated with the current instance of the module, if so it will set its - * conn_handle to invalid. - * - * @param[in] p_ble_bas_c Pointer to the Battery Service Client structure. - * @param[in] p_ble_evt Pointer to the BLE event received. - */ -static void on_disconnected(ble_bas_c_t * p_ble_bas_c, const ble_evt_t * p_ble_evt) -{ - if (p_ble_bas_c->conn_handle == p_ble_evt->evt.gap_evt.conn_handle) - { - p_ble_bas_c->conn_handle = BLE_CONN_HANDLE_INVALID; - p_ble_bas_c->peer_bas_db.bl_cccd_handle = BLE_GATT_HANDLE_INVALID; - p_ble_bas_c->peer_bas_db.bl_handle = BLE_GATT_HANDLE_INVALID; - } -} - - -void ble_bas_c_on_ble_evt(ble_bas_c_t * p_ble_bas_c, const ble_evt_t * p_ble_evt) -{ - if ((p_ble_bas_c == NULL) || (p_ble_evt == NULL)) - { - return; - } - - switch (p_ble_evt->header.evt_id) - { - case BLE_GATTC_EVT_HVX: - on_hvx(p_ble_bas_c, p_ble_evt); - break; - - case BLE_GATTC_EVT_WRITE_RSP: - on_write_rsp(p_ble_bas_c, p_ble_evt); - break; - - case BLE_GATTC_EVT_READ_RSP: - on_read_rsp(p_ble_bas_c, p_ble_evt); - break; - - case BLE_GAP_EVT_DISCONNECTED: - on_disconnected(p_ble_bas_c, p_ble_evt); - break; - - default: - break; - } -} - - -uint32_t ble_bas_c_bl_notif_enable(ble_bas_c_t * p_ble_bas_c) -{ - VERIFY_PARAM_NOT_NULL(p_ble_bas_c); - - if (p_ble_bas_c->conn_handle == BLE_CONN_HANDLE_INVALID) - { - return NRF_ERROR_INVALID_STATE; - } - - return cccd_configure(p_ble_bas_c->conn_handle, p_ble_bas_c->peer_bas_db.bl_cccd_handle, true); -} - - -uint32_t ble_bas_c_bl_read(ble_bas_c_t * p_ble_bas_c) -{ - VERIFY_PARAM_NOT_NULL(p_ble_bas_c); - if (p_ble_bas_c->conn_handle == BLE_CONN_HANDLE_INVALID) - { - return NRF_ERROR_INVALID_STATE; - } - - tx_message_t * msg; - - msg = &m_tx_buffer[m_tx_insert_index++]; - m_tx_insert_index &= TX_BUFFER_MASK; - - msg->req.read_handle = p_ble_bas_c->peer_bas_db.bl_handle; - msg->conn_handle = p_ble_bas_c->conn_handle; - msg->type = READ_REQ; - - tx_buffer_process(); - return NRF_SUCCESS; -} - - -uint32_t ble_bas_c_handles_assign(ble_bas_c_t * p_ble_bas_c, - uint16_t conn_handle, - ble_bas_c_db_t * p_peer_handles) -{ - VERIFY_PARAM_NOT_NULL(p_ble_bas_c); - - p_ble_bas_c->conn_handle = conn_handle; - if (p_peer_handles != NULL) - { - p_ble_bas_c->peer_bas_db = *p_peer_handles; - } - return NRF_SUCCESS; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas_c/ble_bas_c.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas_c/ble_bas_c.h deleted file mode 100644 index d56fa1febf..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bas_c/ble_bas_c.h +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is confidential property of Nordic Semiconductor. The use, - * copying, transfer or disclosure of such information is prohibited except by express written - * agreement with Nordic Semiconductor. - * - */ - -/**@file - * - * @defgroup ble_sdk_srv_bas_c Battery Service Client - * @{ - * @ingroup ble_sdk_srv - * @brief Battery Service Client module. - * - * @details This module contains APIs to read and interact with the Battery Service of a remote - * device. - * - * @note The application must propagate BLE stack events to this module by calling - * ble_hrs_c_on_ble_evt(). - * - */ - -#ifndef BLE_BAS_C_H__ -#define BLE_BAS_C_H__ - -#include -#include "ble.h" -#include "ble_db_discovery.h" - -/** - * @defgroup bas_c_enums Enumerations - * @{ - */ - -/**@brief Battery Service Client event type. */ -typedef enum -{ - BLE_BAS_C_EVT_DISCOVERY_COMPLETE, /**< Event indicating that the Battery Service has been discovered at the peer. */ - BLE_BAS_C_EVT_BATT_NOTIFICATION, /**< Event indicating that a notification of the Battery Level characteristic has been received from the peer. */ - BLE_BAS_C_EVT_BATT_READ_RESP /**< Event indicating that a read response on Battery Level characteristic has been received from peer. */ -} ble_bas_c_evt_type_t; - -/** @} */ - -/** - * @defgroup bas_c_structs Structures - * @{ - */ - - -/**@brief Structure containing the handles related to the Battery Service found on the peer. */ -typedef struct -{ - uint16_t bl_cccd_handle; /**< Handle of the CCCD of the Battery Level characteristic. */ - uint16_t bl_handle; /**< Handle of the Battery Level characteristic as provided by the SoftDevice. */ -} ble_bas_c_db_t; - -/**@brief Battery Service Client Event structure. */ -typedef struct -{ - ble_bas_c_evt_type_t evt_type; /**< Event Type. */ - uint16_t conn_handle; /**< Connection handle relevent to this event.*/ - union - { - ble_bas_c_db_t bas_db; /**< Battery Service related handles found on the peer device. This will be filled if the evt_type is @ref BLE_BAS_C_EVT_DISCOVERY_COMPLETE.*/ - uint8_t battery_level; /**< Battery level received from peer. This field will be used for the events @ref BLE_BAS_C_EVT_BATT_NOTIFICATION and @ref BLE_BAS_C_EVT_BATT_READ_RESP.*/ - } params; -} ble_bas_c_evt_t; - -/** @} */ - -/** - * @defgroup bas_c_types Types - * @{ - */ - -// Forward declaration of the ble_bas_t type. -typedef struct ble_bas_c_s ble_bas_c_t; - -/**@brief Event handler type. - * - * @details This is the type of the event handler that should be provided by the application - * of this module in order to receive events. - */ -typedef void (* ble_bas_c_evt_handler_t) (ble_bas_c_t * p_bas_bas_c, ble_bas_c_evt_t * p_evt); - -/** @} */ - -/** - * @addtogroup bas_c_structs - * @{ - */ - -/**@brief Battery Service Client structure. - - */ -struct ble_bas_c_s -{ - uint16_t conn_handle; /**< Connection handle as provided by the SoftDevice. */ - ble_bas_c_db_t peer_bas_db; /**< Handles related to BAS on the peer*/ - ble_bas_c_evt_handler_t evt_handler; /**< Application event handler to be called when there is an event related to the Battery service. */ -}; - -/**@brief Battery Service Client initialization structure. - */ -typedef struct -{ - ble_bas_c_evt_handler_t evt_handler; /**< Event handler to be called by the Battery Service Client module whenever there is an event related to the Battery Service. */ -} ble_bas_c_init_t; - -/** @} */ - -/** - * @defgroup bas_c_functions Functions - * @{ - */ - -/**@brief Function for initializing the Battery Service Client module. - * - * @details This function will initialize the module and set up Database Discovery to discover - * the Battery Service. After calling this function, call @ref ble_db_discovery_start - * to start discovery once a link with a peer has been established. - * - * @param[out] p_ble_bas_c Pointer to the Battery Service client structure. - * @param[in] p_ble_bas_c_init Pointer to the Battery Service initialization structure containing - * the initialization information. - * - * @retval NRF_SUCCESS Operation success. - * @retval NRF_ERROR_NULL A parameter is NULL. - * Otherwise, an error code returned by @ref ble_db_discovery_evt_register. - */ -uint32_t ble_bas_c_init(ble_bas_c_t * p_ble_bas_c, ble_bas_c_init_t * p_ble_bas_c_init); - - -/**@brief Function for handling BLE events from the SoftDevice. - * - * @details This function will handle the BLE events received from the SoftDevice. If the BLE - * event is relevant for the Battery Service Client module, then it is used to update - * interval variables and, if necessary, send events to the application. - * - * @note This function must be called by the application. - * - * @param[in] p_ble_bas_c Pointer to the Battery Service client structure. - * @param[in] p_ble_evt Pointer to the BLE event. - */ -void ble_bas_c_on_ble_evt(ble_bas_c_t * p_ble_bas_c, const ble_evt_t * p_ble_evt); - - -/**@brief Function for enabling notifications on the Battery Level characteristic. - * - * @details This function will enable to notification of the Battery Level characteristic at the - * peer by writing to the CCCD of the Battery Level Characteristic. - * - * @param p_ble_bas_c Pointer to the Battery Service client structure. - * - * @retval NRF_SUCCESS If the SoftDevice has been requested to write to the CCCD of the peer. - * NRF_ERROR_NULL Parameter is NULL. - * Otherwise, an error code returned by the SoftDevice API @ref - * sd_ble_gattc_write. - */ -uint32_t ble_bas_c_bl_notif_enable(ble_bas_c_t * p_ble_bas_c); - - -/**@brief Function for reading the Battery Level characteristic. - * - * @param p_ble_bas_c Pointer to the Battery Service client structure. - * - * @retval NRF_SUCCESS If the read request was successfully queued to be sent to peer. - */ -uint32_t ble_bas_c_bl_read(ble_bas_c_t * p_ble_bas_c); - - -/**@brief Function for handling events from the database discovery module. - * - * @details Call this function when getting a callback event from the DB discovery modue. - * This function will handle an event from the database discovery module, and determine - * if it relates to the discovery of Battery service at the peer. If so, it will - * call the application's event handler indicating that the Battery service has been - * discovered at the peer. It also populates the event with the service related - * information before providing it to the application. - * - * @param p_ble_bas_c Pointer to the Battery Service client structure. - * @param[in] p_evt Pointer to the event received from the database discovery module. - * - */ -void ble_bas_on_db_disc_evt(ble_bas_c_t * p_ble_bas_c, const ble_db_discovery_evt_t * p_evt); - - -/**@brief Function for assigning handles to a this instance of bas_c. - * - * @details Call this function when a link has been established with a peer to - * associate this link to this instance of the module. This makes it - * possible to handle several link and associate each link to a particular - * instance of this module. The connection handle and attribute handles will be - * provided from the discovery event @ref BLE_BAS_C_EVT_DISCOVERY_COMPLETE. - * - * @param[in] p_ble_bas_c Pointer to the Battery client structure instance to associate. - * @param[in] conn_handle Connection handle to associated with the given Battery Client Instance. - * @param[in] p_peer_handles Attribute handles on the BAS server you want this BAS client to - * interact with. - */ -uint32_t ble_bas_c_handles_assign(ble_bas_c_t * p_ble_bas_c, - uint16_t conn_handle, - ble_bas_c_db_t * p_peer_handles); - -/** @} */ // End tag for Function group. - -#endif // BLE_BAS_C_H__ - -/** @} */ // End tag for the file. diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bps/ble_bps.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bps/ble_bps.c deleted file mode 100644 index a3b89ade1a..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bps/ble_bps.c +++ /dev/null @@ -1,439 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/* Attention! -* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile -* qualification listings, this section of source code must not be modified. -*/ - -#include "ble_bps.h" -#include -#include "nordic_common.h" -#include "ble_l2cap.h" -#include "ble_srv_common.h" -#include "app_util.h" - - -#define OPCODE_LENGTH 1 /**< Length of opcode inside Blood Pressure Measurement packet. */ -#define HANDLE_LENGTH 2 /**< Length of handle inside Blood Pressure Measurement packet. */ -#define MAX_BPM_LEN (BLE_L2CAP_MTU_DEF - OPCODE_LENGTH - HANDLE_LENGTH) /**< Maximum size of a transmitted Blood Pressure Measurement. */ - -// Blood Pressure Measurement Flags bits -#define BPS_MEAS_BLOOD_PRESSURE_UNITS_FLAG_BIT (0x01 << 0) /**< Blood Pressure Units Flag bit. */ -#define BPS_MEAS_TIME_STAMP_FLAG_BIT (0x01 << 1) /**< Time Stamp Flag bit. */ -#define BPS_MEAS_PULSE_RATE_FLAG_BIT (0x01 << 2) /**< Pulse Rate Flag bit. */ -#define BPS_MEAS_USER_ID_FLAG_BIT (0x01 << 3) /**< User ID Flag bit. */ -#define BPS_MEAS_MEASUREMENT_STATUS_FLAG_BIT (0x01 << 4) /**< Measurement Status Flag bit. */ - - -/**@brief Function for handling the Connect event. - * - * @param[in] p_bps Blood Pressure Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_connect(ble_bps_t * p_bps, ble_evt_t * p_ble_evt) -{ - p_bps->conn_handle = p_ble_evt->evt.gatts_evt.conn_handle; -} - - -/**@brief Function for handling the Disconnect event. - * - * @param[in] p_bps Blood Pressure Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_disconnect(ble_bps_t * p_bps, ble_evt_t * p_ble_evt) -{ - UNUSED_PARAMETER(p_ble_evt); - p_bps->conn_handle = BLE_CONN_HANDLE_INVALID; -} - - -/**@brief Function for handling the write events to the Blood Pressure Measurement characteristic. - * - * @param[in] p_bps Blood Pressure Service structure. - * @param[in] p_evt_write Write event received from the BLE stack. - */ -static void on_cccd_write(ble_bps_t * p_bps, ble_gatts_evt_write_t * p_evt_write) -{ - if (p_evt_write->len == 2) - { - // CCCD written, update indication state - if (p_bps->evt_handler != NULL) - { - ble_bps_evt_t evt; - - if (ble_srv_is_indication_enabled(p_evt_write->data)) - { - evt.evt_type = BLE_BPS_EVT_INDICATION_ENABLED; - } - else - { - evt.evt_type = BLE_BPS_EVT_INDICATION_DISABLED; - } - - p_bps->evt_handler(p_bps, &evt); - } - } -} - - -/**@brief Function for handling the Write event. - * - * @param[in] p_bps Blood Pressure Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_write(ble_bps_t * p_bps, ble_evt_t * p_ble_evt) -{ - ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; - - if (p_evt_write->handle == p_bps->meas_handles.cccd_handle) - { - on_cccd_write(p_bps, p_evt_write); - } -} - - -/**@brief Function for handling the HVC event. - * - * @details Handles HVC events from the BLE stack. - * - * @param[in] p_bps Blood Pressure Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_hvc(ble_bps_t * p_bps, ble_evt_t * p_ble_evt) -{ - ble_gatts_evt_hvc_t * p_hvc = &p_ble_evt->evt.gatts_evt.params.hvc; - - if (p_hvc->handle == p_bps->meas_handles.value_handle) - { - ble_bps_evt_t evt; - - evt.evt_type = BLE_BPS_EVT_INDICATION_CONFIRMED; - p_bps->evt_handler(p_bps, &evt); - } -} - - -void ble_bps_on_ble_evt(ble_bps_t * p_bps, ble_evt_t * p_ble_evt) -{ - switch (p_ble_evt->header.evt_id) - { - case BLE_GAP_EVT_CONNECTED: - on_connect(p_bps, p_ble_evt); - break; - - case BLE_GAP_EVT_DISCONNECTED: - on_disconnect(p_bps, p_ble_evt); - break; - - case BLE_GATTS_EVT_WRITE: - on_write(p_bps, p_ble_evt); - break; - - case BLE_GATTS_EVT_HVC: - on_hvc(p_bps, p_ble_evt); - break; - - default: - // No implementation needed. - break; - } -} - - -/**@brief Function for encoding a Blood Pressure Measurement. - * - * @param[in] p_bps Blood Pressure Service structure. - * @param[in] p_bps_meas Measurement to be encoded. - * @param[out] p_encoded_buffer Buffer where the encoded data will be written. - * - * @return Size of encoded data. - */ -static uint8_t bps_measurement_encode(ble_bps_t * p_bps, - ble_bps_meas_t * p_bps_meas, - uint8_t * p_encoded_buffer) -{ - uint8_t flags = 0; - uint8_t len = 1; - uint16_t encoded_sfloat; - - // Set measurement units flag - if (p_bps_meas->blood_pressure_units_in_kpa) - { - flags |= BPS_MEAS_BLOOD_PRESSURE_UNITS_FLAG_BIT; - } - - // Blood Pressure Measurement - Systolic - encoded_sfloat = ((p_bps_meas->blood_pressure_systolic.exponent << 12) & 0xF000) | - ((p_bps_meas->blood_pressure_systolic.mantissa << 0) & 0x0FFF); - len += uint16_encode(encoded_sfloat, &p_encoded_buffer[len]); - - // Blood Pressure Measurement - Diastolic - encoded_sfloat = ((p_bps_meas->blood_pressure_diastolic.exponent << 12) & 0xF000) | - ((p_bps_meas->blood_pressure_diastolic.mantissa << 0) & 0x0FFF); - len += uint16_encode(encoded_sfloat, &p_encoded_buffer[len]); - - // Blood Pressure Measurement - Mean Arterial Pressure - encoded_sfloat = ((p_bps_meas->mean_arterial_pressure.exponent << 12) & 0xF000) | - ((p_bps_meas->mean_arterial_pressure.mantissa << 0) & 0x0FFF); - len += uint16_encode(encoded_sfloat, &p_encoded_buffer[len]); - - // Time Stamp field - if (p_bps_meas->time_stamp_present) - { - flags |= BPS_MEAS_TIME_STAMP_FLAG_BIT; - len += ble_date_time_encode(&p_bps_meas->time_stamp, &p_encoded_buffer[len]); - } - - // Pulse Rate - if (p_bps_meas->pulse_rate_present) - { - flags |= BPS_MEAS_PULSE_RATE_FLAG_BIT; - - encoded_sfloat = ((p_bps_meas->pulse_rate.exponent << 12) & 0xF000) | - ((p_bps_meas->pulse_rate.mantissa << 0) & 0x0FFF); - len += uint16_encode(encoded_sfloat, &p_encoded_buffer[len]); - } - - // User ID - if (p_bps_meas->user_id_present) - { - flags |= BPS_MEAS_USER_ID_FLAG_BIT; - p_encoded_buffer[len++] = p_bps_meas->user_id; - } - - // Measurement Status - if (p_bps_meas->measurement_status_present) - { - flags |= BPS_MEAS_MEASUREMENT_STATUS_FLAG_BIT; - len += uint16_encode(p_bps_meas->measurement_status, &p_encoded_buffer[len]); - } - - // Flags field - p_encoded_buffer[0] = flags; - - return len; -} - - -/**@brief Function for adding Blood Pressure Measurement characteristics. - * - * @param[in] p_bps Blood Pressure Service structure. - * @param[in] p_bps_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t bps_measurement_char_add(ble_bps_t * p_bps, const ble_bps_init_t * p_bps_init) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_md_t cccd_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - ble_bps_meas_t initial_bpm; - uint8_t encoded_bpm[MAX_BPM_LEN]; - - memset(&cccd_md, 0, sizeof(cccd_md)); - - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); - cccd_md.vloc = BLE_GATTS_VLOC_STACK; - cccd_md.write_perm = p_bps_init->bps_meas_attr_md.cccd_write_perm; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.indicate = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = &cccd_md; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_BLOOD_PRESSURE_MEASUREMENT_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.read_perm = p_bps_init->bps_meas_attr_md.read_perm; - attr_md.write_perm = p_bps_init->bps_meas_attr_md.write_perm; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 1; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - memset(&initial_bpm, 0, sizeof(initial_bpm)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = bps_measurement_encode(p_bps, &initial_bpm, encoded_bpm); - attr_char_value.init_offs = 0; - attr_char_value.max_len = MAX_BPM_LEN; - attr_char_value.p_value = encoded_bpm; - - return sd_ble_gatts_characteristic_add(p_bps->service_handle, - &char_md, - &attr_char_value, - &p_bps->meas_handles); -} - - -/**@brief Function for adding Blood Pressure Feature characteristics. - * - * @param[in] p_bps Blood Pressure Service structure. - * @param[in] p_bps_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t bps_feature_char_add(ble_bps_t * p_bps, const ble_bps_init_t * p_bps_init) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - uint8_t init_value_encoded[2]; - uint8_t init_value_len; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.read = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = NULL; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_BLOOD_PRESSURE_FEATURE_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.read_perm = p_bps_init->bps_feature_attr_md.read_perm; - attr_md.write_perm = p_bps_init->bps_feature_attr_md.write_perm; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - init_value_len = uint16_encode(p_bps_init->feature, init_value_encoded); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = init_value_len; - attr_char_value.init_offs = 0; - attr_char_value.max_len = init_value_len; - attr_char_value.p_value = init_value_encoded; - - return sd_ble_gatts_characteristic_add(p_bps->service_handle, - &char_md, - &attr_char_value, - &p_bps->feature_handles); -} - - -uint32_t ble_bps_init(ble_bps_t * p_bps, const ble_bps_init_t * p_bps_init) -{ - uint32_t err_code; - ble_uuid_t ble_uuid; - - // Initialize service structure - p_bps->evt_handler = p_bps_init->evt_handler; - p_bps->conn_handle = BLE_CONN_HANDLE_INVALID; - p_bps->feature = p_bps_init->feature; - - // Add service - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_BLOOD_PRESSURE_SERVICE); - - err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &ble_uuid, &p_bps->service_handle); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add measurement characteristic - err_code = bps_measurement_char_add(p_bps, p_bps_init); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add feature characteristic - err_code = bps_feature_char_add(p_bps, p_bps_init); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - return NRF_SUCCESS; -} - - -uint32_t ble_bps_measurement_send(ble_bps_t * p_bps, ble_bps_meas_t * p_bps_meas) -{ - uint32_t err_code; - - // Send value if connected - if (p_bps->conn_handle != BLE_CONN_HANDLE_INVALID) - { - uint8_t encoded_bps_meas[MAX_BPM_LEN]; - uint16_t len; - uint16_t hvx_len; - ble_gatts_hvx_params_t hvx_params; - - len = bps_measurement_encode(p_bps, p_bps_meas, encoded_bps_meas); - hvx_len = len; - - memset(&hvx_params, 0, sizeof(hvx_params)); - - hvx_params.handle = p_bps->meas_handles.value_handle; - hvx_params.type = BLE_GATT_HVX_INDICATION; - hvx_params.offset = 0; - hvx_params.p_len = &hvx_len; - hvx_params.p_data = encoded_bps_meas; - - err_code = sd_ble_gatts_hvx(p_bps->conn_handle, &hvx_params); - if ((err_code == NRF_SUCCESS) && (hvx_len != len)) - { - err_code = NRF_ERROR_DATA_SIZE; - } - } - else - { - err_code = NRF_ERROR_INVALID_STATE; - } - - return err_code; -} - - -uint32_t ble_bps_is_indication_enabled(ble_bps_t * p_bps, bool * p_indication_enabled) -{ - uint32_t err_code; - uint8_t cccd_value_buf[BLE_CCCD_VALUE_LEN]; - ble_gatts_value_t gatts_value; - - // Initialize value struct. - memset(&gatts_value, 0, sizeof(gatts_value)); - - gatts_value.len = BLE_CCCD_VALUE_LEN; - gatts_value.offset = 0; - gatts_value.p_value = cccd_value_buf; - - err_code = sd_ble_gatts_value_get(p_bps->conn_handle, - p_bps->meas_handles.cccd_handle, - &gatts_value); - if (err_code == NRF_SUCCESS) - { - *p_indication_enabled = ble_srv_is_indication_enabled(cccd_value_buf); - } - return err_code; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bps/ble_bps.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bps/ble_bps.h deleted file mode 100644 index 04404e6ce0..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_bps/ble_bps.h +++ /dev/null @@ -1,161 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - */ - -/** @file - * - * @defgroup ble_sdk_srv_bps Blood Pressure Service - * @{ - * @ingroup ble_sdk_srv - * @brief Blood Pressure Service module. - * - * @details This module implements the Blood Pressure Service. - * - * If an event handler is supplied by the application, the Blood Pressure - * Service will generate Blood Pressure Service events to the application. - * - * @note The application must propagate BLE stack events to the Blood Pressure Service - * module by calling ble_bps_on_ble_evt() from the @ref softdevice_handler function. - * - * @note Attention! - * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile - * qualification listings, this section of source code must not be modified. - */ - -#ifndef BLE_BPS_H__ -#define BLE_BPS_H__ - -#include -#include -#include "ble.h" -#include "ble_srv_common.h" -#include "ble_date_time.h" - -// Blood Pressure Feature bits -#define BLE_BPS_FEATURE_BODY_MOVEMENT_BIT (0x01 << 0) /**< Body Movement Detection Support bit. */ -#define BLE_BPS_FEATURE_CUFF_FIT_BIT (0x01 << 1) /**< Cuff Fit Detection Support bit. */ -#define BLE_BPS_FEATURE_IRREGULAR_PULSE_BIT (0x01 << 2) /**< Irregular Pulse Detection Support bit. */ -#define BLE_BPS_FEATURE_PULSE_RATE_RANGE_BIT (0x01 << 3) /**< Pulse Rate Range Detection Support bit. */ -#define BLE_BPS_FEATURE_MEASUREMENT_POSITION_BIT (0x01 << 4) /**< Measurement Position Detection Support bit. */ -#define BLE_BPS_FEATURE_MULTIPLE_BOND_BIT (0x01 << 5) /**< Multiple Bond Support bit. */ - -/**@brief Blood Pressure Service event type. */ -typedef enum -{ - BLE_BPS_EVT_INDICATION_ENABLED, /**< Blood Pressure value indication enabled event. */ - BLE_BPS_EVT_INDICATION_DISABLED, /**< Blood Pressure value indication disabled event. */ - BLE_BPS_EVT_INDICATION_CONFIRMED /**< Confirmation of a blood pressure measurement indication has been received. */ -} ble_bps_evt_type_t; - -/**@brief Blood Pressure Service event. */ -typedef struct -{ - ble_bps_evt_type_t evt_type; /**< Type of event. */ -} ble_bps_evt_t; - -// Forward declaration of the ble_bps_t type. -typedef struct ble_bps_s ble_bps_t; - -/**@brief Blood Pressure Service event handler type. */ -typedef void (*ble_bps_evt_handler_t) (ble_bps_t * p_bps, ble_bps_evt_t * p_evt); - -/**@brief SFLOAT format (IEEE-11073 16-bit FLOAT, defined as a 16-bit vlue with 12-bit mantissa and - * 4-bit exponent. */ -typedef struct -{ - int8_t exponent; /**< Base 10 exponent, only 4 bits */ - int16_t mantissa; /**< Mantissa, only 12 bits */ -} ieee_float16_t; - -/**@brief Blood Pressure Service init structure. This contains all options and data - * needed for initialization of the service. */ -typedef struct -{ - ble_bps_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Blood Pressure Service. */ - ble_srv_cccd_security_mode_t bps_meas_attr_md; /**< Initial security level for blood pressure measurement attribute */ - ble_srv_security_mode_t bps_feature_attr_md; /**< Initial security level for blood pressure feature attribute */ - uint16_t feature; /**< Initial value for blood pressure feature */ -} ble_bps_init_t; - -/**@brief Blood Pressure Service structure. This contains various status information for - * the service. */ -struct ble_bps_s -{ - ble_bps_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Blood Pressure Service. */ - uint16_t service_handle; /**< Handle of Blood Pressure Service (as provided by the BLE stack). */ - ble_gatts_char_handles_t meas_handles; /**< Handles related to the Blood Pressure Measurement characteristic. */ - ble_gatts_char_handles_t feature_handles; /**< Handles related to the Blood Pressure Feature characteristic. */ - uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ - uint16_t feature; /**< Value of Blood Pressure feature. */ -}; - -/**@brief Blood Pressure Service measurement structure. This contains a Blood Pressure - * measurement. */ -typedef struct ble_bps_meas_s -{ - bool blood_pressure_units_in_kpa; /**< Blood Pressure Units Flag, 0=mmHg, 1=kPa */ - bool time_stamp_present; /**< Time Stamp Flag, 0=not present, 1=present. */ - bool pulse_rate_present; /**< Pulse Rate Flag, 0=not present, 1=present. */ - bool user_id_present; /**< User ID Flag, 0=not present, 1=present. */ - bool measurement_status_present; /**< Measurement Status Flag, 0=not present, 1=present. */ - ieee_float16_t blood_pressure_systolic; /**< Blood Pressure Measurement Compound Value - Systolic. */ - ieee_float16_t blood_pressure_diastolic; /**< Blood Pressure Measurement Compound Value - Diastolic . */ - ieee_float16_t mean_arterial_pressure; /**< Blood Pressure Measurement Compound Value - Mean Arterial Pressure. */ - ble_date_time_t time_stamp; /**< Time Stamp. */ - ieee_float16_t pulse_rate; /**< Pulse Rate. */ - uint8_t user_id; /**< User ID. */ - uint16_t measurement_status; /**< Measurement Status. */ -} ble_bps_meas_t; - -/**@brief Function for initializing the Blood Pressure Service. - * - * @param[out] p_bps Blood Pressure Service structure. This structure will have to - * be supplied by the application. It will be initialized by this function, - * and will later be used to identify this particular service instance. - * @param[in] p_bps_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. - */ -uint32_t ble_bps_init(ble_bps_t * p_bps, const ble_bps_init_t * p_bps_init); - -/**@brief Function for handling the Application's BLE Stack events. - * - * @details Handles all events from the BLE stack of interest to the Blood Pressure Service. - * - * @param[in] p_bps Blood Pressure Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -void ble_bps_on_ble_evt(ble_bps_t * p_bps, ble_evt_t * p_ble_evt); - -/**@brief Function for sending blood pressure measurement if indication has been enabled. - * - * @details The application calls this function after having performed a Blood Pressure - * measurement. If indication has been enabled, the measurement data is encoded and - * sent to the client. - * - * @param[in] p_bps Blood Pressure Service structure. - * @param[in] p_bps_meas Pointer to new blood pressure measurement. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -uint32_t ble_bps_measurement_send(ble_bps_t * p_bps, ble_bps_meas_t * p_bps_meas); - -/**@brief Function for checking if indication of Blood Pressure Measurement is currently enabled. - * - * @param[in] p_bps Blood Pressure Service structure. - * @param[out] p_indication_enabled TRUE if indication is enabled, FALSE otherwise. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -uint32_t ble_bps_is_indication_enabled(ble_bps_t * p_bps, bool * p_indication_enabled); - -#endif // BLE_BPS_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_cscs.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_cscs.c deleted file mode 100644 index 490c891af1..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_cscs.c +++ /dev/null @@ -1,443 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/* Attention! -* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile -* qualification listings, this section of source code must not be modified. -*/ - -#include "ble_cscs.h" -#include -#include "nordic_common.h" -#include "ble_l2cap.h" -#include "ble_srv_common.h" -#include "app_util.h" - -#define OPCODE_LENGTH 1 /**< Length of opcode inside Cycling Speed and Cadence Measurement packet. */ -#define HANDLE_LENGTH 2 /**< Length of handle inside Cycling Speed and Cadence Measurement packet. */ -#define MAX_CSCM_LEN (BLE_L2CAP_MTU_DEF - OPCODE_LENGTH - HANDLE_LENGTH) /**< Maximum size of a transmitted Cycling Speed and Cadence Measurement. */ - -// Cycling Speed and Cadence Measurement flag bits -#define CSC_MEAS_FLAG_MASK_WHEEL_REV_DATA_PRESENT (0x01 << 0) /**< Wheel revolution data present flag bit. */ -#define CSC_MEAS_FLAG_MASK_CRANK_REV_DATA_PRESENT (0x01 << 1) /**< Crank revolution data present flag bit. */ - - -/**@brief Function for handling the Connect event. - * - * @param[in] p_cscs Cycling Speed and Cadence Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_connect(ble_cscs_t * p_cscs, ble_evt_t * p_ble_evt) -{ - p_cscs->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; -} - - -/**@brief Function for handling the Disconnect event. - * - * @param[in] p_cscs Cycling Speed and Cadence Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_disconnect(ble_cscs_t * p_cscs, ble_evt_t * p_ble_evt) -{ - UNUSED_PARAMETER(p_ble_evt); - p_cscs->conn_handle = BLE_CONN_HANDLE_INVALID; -} - - -/**@brief Function for handling write events to the CSCS Measurement characteristic. - * - * @param[in] p_cscs Cycling Speed and Cadence Service structure. - * @param[in] p_evt_write Write event received from the BLE stack. - */ -static void on_meas_cccd_write(ble_cscs_t * p_cscs, ble_gatts_evt_write_t * p_evt_write) -{ - if (p_evt_write->len == 2) - { - // CCCD written, update notification state - if (p_cscs->evt_handler != NULL) - { - ble_cscs_evt_t evt; - - if (ble_srv_is_notification_enabled(p_evt_write->data)) - { - evt.evt_type = BLE_CSCS_EVT_NOTIFICATION_ENABLED; - } - else - { - evt.evt_type = BLE_CSCS_EVT_NOTIFICATION_DISABLED; - } - - p_cscs->evt_handler(p_cscs, &evt); - } - } -} - - -/**@brief Function for handling the Write event. - * - * @param[in] p_cscs Cycling Speed and Cadence Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_write(ble_cscs_t * p_cscs, ble_evt_t * p_ble_evt) -{ - ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; - - if (p_evt_write->handle == p_cscs->meas_handles.cccd_handle) - { - on_meas_cccd_write(p_cscs, p_evt_write); - } -} - - -void ble_cscs_on_ble_evt(ble_cscs_t * p_cscs, ble_evt_t * p_ble_evt) -{ - ble_sc_ctrlpt_on_ble_evt(&(p_cscs->ctrl_pt), p_ble_evt); - - switch (p_ble_evt->header.evt_id) - { - case BLE_GAP_EVT_CONNECTED: - on_connect(p_cscs, p_ble_evt); - break; - - case BLE_GAP_EVT_DISCONNECTED: - on_disconnect(p_cscs, p_ble_evt); - break; - - case BLE_GATTS_EVT_WRITE: - on_write(p_cscs, p_ble_evt); - break; - - default: - // No implementation needed. - break; - } -} - - -/**@brief Function for encoding a CSCS Measurement. - * - * @param[in] p_cscs Cycling Speed and Cadence Service structure. - * @param[in] p_csc_measurement Measurement to be encoded. - * @param[out] p_encoded_buffer Buffer where the encoded data will be written. - * - * @return Size of encoded data. - */ -static uint8_t csc_measurement_encode(ble_cscs_t * p_cscs, - ble_cscs_meas_t * p_csc_measurement, - uint8_t * p_encoded_buffer) -{ - uint8_t flags = 0; - uint8_t len = 1; - - // Cumulative Wheel Revolutions and Last Wheel Event Time Fields - if (p_cscs->feature & BLE_CSCS_FEATURE_WHEEL_REV_BIT) - { - if (p_csc_measurement->is_wheel_rev_data_present) - { - flags |= CSC_MEAS_FLAG_MASK_WHEEL_REV_DATA_PRESENT; - len += uint32_encode(p_csc_measurement->cumulative_wheel_revs, &p_encoded_buffer[len]); - len += uint16_encode(p_csc_measurement->last_wheel_event_time, &p_encoded_buffer[len]); - } - } - - // Cumulative Crank Revolutions and Last Crank Event Time Fields - if (p_cscs->feature & BLE_CSCS_FEATURE_CRANK_REV_BIT) - { - if (p_csc_measurement->is_crank_rev_data_present) - { - flags |= CSC_MEAS_FLAG_MASK_CRANK_REV_DATA_PRESENT; - len += uint16_encode(p_csc_measurement->cumulative_crank_revs, &p_encoded_buffer[len]); - len += uint16_encode(p_csc_measurement->last_crank_event_time, &p_encoded_buffer[len]); - } - } - - // Flags Field - p_encoded_buffer[0] = flags; - - return len; -} - - -/**@brief Function for adding CSC Measurement characteristics. - * - * @param[in] p_cscs Cycling Speed and Cadence Service structure. - * @param[in] p_cscs_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t csc_measurement_char_add(ble_cscs_t * p_cscs, const ble_cscs_init_t * p_cscs_init) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_md_t cccd_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - ble_cscs_meas_t initial_scm; - uint8_t encoded_scm[MAX_CSCM_LEN]; - memset(&cccd_md, 0, sizeof(cccd_md)); - - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); - cccd_md.write_perm = p_cscs_init->csc_meas_attr_md.cccd_write_perm; - cccd_md.vloc = BLE_GATTS_VLOC_STACK; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.notify = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = &cccd_md; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_CSC_MEASUREMENT_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.read_perm ); - - BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.write_perm); - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 1; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = csc_measurement_encode(p_cscs, &initial_scm, encoded_scm); - attr_char_value.init_offs = 0; - attr_char_value.max_len = MAX_CSCM_LEN; - attr_char_value.p_value = encoded_scm; - - return sd_ble_gatts_characteristic_add(p_cscs->service_handle, - &char_md, - &attr_char_value, - &p_cscs->meas_handles); -} - - -/**@brief Function for adding CSC Feature characteristics. - * - * @param[in] p_cscs Cycling Speed and Cadence Service structure. - * @param[in] p_cscs_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t csc_feature_char_add(ble_cscs_t * p_cscs, const ble_cscs_init_t * p_cscs_init) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - uint8_t init_value_encoded[2]; - uint8_t init_value_len; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.read = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = NULL; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_CSC_FEATURE_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.read_perm = p_cscs_init->csc_feature_attr_md.read_perm; - - BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.write_perm); - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - init_value_len = uint16_encode(p_cscs_init->feature, &init_value_encoded[0]); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = init_value_len; - attr_char_value.init_offs = 0; - attr_char_value.max_len = init_value_len; - attr_char_value.p_value = init_value_encoded; - - return sd_ble_gatts_characteristic_add(p_cscs->service_handle, - &char_md, - &attr_char_value, - &p_cscs->feature_handles); -} - - -/**@brief Function for adding CSC Sensor Location characteristic. - * - * @param[in] p_cscs Cycling Speed and Cadence Service structure. - * @param[in] p_cscs_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t csc_sensor_loc_char_add(ble_cscs_t * p_cscs, const ble_cscs_init_t * p_cscs_init) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - uint8_t init_value_len; - uint8_t encoded_init_value[1]; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.read = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = NULL; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_SENSOR_LOCATION_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.read_perm = p_cscs_init->csc_sensor_loc_attr_md.read_perm; - BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.write_perm); - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - init_value_len = sizeof(uint8_t); - if (p_cscs_init->sensor_location != NULL) - { - encoded_init_value[0] = *p_cscs_init->sensor_location; - } - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = init_value_len; - attr_char_value.init_offs = 0; - attr_char_value.max_len = init_value_len; - attr_char_value.p_value = encoded_init_value; - - return sd_ble_gatts_characteristic_add(p_cscs->service_handle, - &char_md, - &attr_char_value, - &p_cscs->sensor_loc_handles); -} - - -uint32_t ble_cscs_init(ble_cscs_t * p_cscs, const ble_cscs_init_t * p_cscs_init) -{ - uint32_t err_code; - ble_uuid_t ble_uuid; - ble_cs_ctrlpt_init_t sc_ctrlpt_init; - - // Initialize service structure - p_cscs->evt_handler = p_cscs_init->evt_handler; - p_cscs->conn_handle = BLE_CONN_HANDLE_INVALID; - p_cscs->feature = p_cscs_init->feature; - - // Add service - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_CYCLING_SPEED_AND_CADENCE); - - err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, - &ble_uuid, - &p_cscs->service_handle); - - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add cycling speed and cadence measurement characteristic - err_code = csc_measurement_char_add(p_cscs, p_cscs_init); - - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add cycling speed and cadence feature characteristic - err_code = csc_feature_char_add(p_cscs, p_cscs_init); - - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add Sensor Location characteristic (optional) - if (p_cscs_init->sensor_location != NULL) - { - err_code = csc_sensor_loc_char_add(p_cscs, p_cscs_init); - - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - - - // Add speed and cadence control point characteristic - sc_ctrlpt_init.error_handler = p_cscs_init->error_handler; - sc_ctrlpt_init.size_list_supported_locations = p_cscs_init->size_list_supported_locations; - sc_ctrlpt_init.supported_functions = p_cscs_init->ctrplt_supported_functions; - sc_ctrlpt_init.evt_handler = p_cscs_init->ctrlpt_evt_handler; - sc_ctrlpt_init.list_supported_locations = p_cscs_init->list_supported_locations; - sc_ctrlpt_init.sc_ctrlpt_attr_md = p_cscs_init->csc_ctrlpt_attr_md; - sc_ctrlpt_init.sensor_location_handle = p_cscs->sensor_loc_handles.value_handle; - sc_ctrlpt_init.service_handle = p_cscs->service_handle; - - return ble_sc_ctrlpt_init(&p_cscs->ctrl_pt, &sc_ctrlpt_init); -} - - -uint32_t ble_cscs_measurement_send(ble_cscs_t * p_cscs, ble_cscs_meas_t * p_measurement) -{ - uint32_t err_code; - - // Send value if connected and notifying - if (p_cscs->conn_handle != BLE_CONN_HANDLE_INVALID) - { - uint8_t encoded_csc_meas[MAX_CSCM_LEN]; - uint16_t len; - uint16_t hvx_len; - ble_gatts_hvx_params_t hvx_params; - - len = csc_measurement_encode(p_cscs, p_measurement, encoded_csc_meas); - hvx_len = len; - - memset(&hvx_params, 0, sizeof(hvx_params)); - - hvx_params.handle = p_cscs->meas_handles.value_handle; - hvx_params.type = BLE_GATT_HVX_NOTIFICATION; - hvx_params.offset = 0; - hvx_params.p_len = &hvx_len; - hvx_params.p_data = encoded_csc_meas; - - err_code = sd_ble_gatts_hvx(p_cscs->conn_handle, &hvx_params); - if ((err_code == NRF_SUCCESS) && (hvx_len != len)) - { - err_code = NRF_ERROR_DATA_SIZE; - } - } - else - { - err_code = NRF_ERROR_INVALID_STATE; - } - - return err_code; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_cscs.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_cscs.h deleted file mode 100644 index 5517ccb74d..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_cscs.h +++ /dev/null @@ -1,161 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/** @file - * - * @defgroup ble_sdk_srv_csc Cycling Speed and Cadence Service - * @{ - * @ingroup ble_sdk_srv - * @brief Cycling Speed and Cadence Service module. - * - * @details This module implements the Cycling Speed and Cadence Service. If enabled, notification - * of the Cycling Speead and Candence Measurement is performed when the application - * calls ble_cscs_measurement_send(). - * - * To use this service, you need to provide the the supported features (@ref BLE_CSCS_FEATURES). - * If you choose to support Wheel revolution data (feature bit @ref BLE_CSCS_FEATURE_WHEEL_REV_BIT), - * you then need to support the 'setting of cumulative value' operation by the supporting the - * Speed and Cadence Control Point (@ref ble_sdk_srv_sc_ctrlpt) by setting the @ref BLE_SRV_SC_CTRLPT_CUM_VAL_OP_SUPPORTED - * bit of the ctrplt_supported_functions in the @ref ble_cscs_init_t structure. - * If you want to support the 'start autocalibration' control point feature, you need, after the @ref BLE_SC_CTRLPT_EVT_START_CALIBRATION - * has been received and the auto calibration is finished, to call the @ref ble_sc_ctrlpt_rsp_send to indicate that the operation is finished - * and thus be able to receive new control point operations. - * If you want to support the 'sensor location' related operation, you need to provide a list of supported location in the - * @ref ble_cscs_init_t structure. - * - * - * @note The application or the service using this module must propagate BLE stack events to the - * Cycling Speead and Candence Service module by calling ble_cscs_on_ble_evt() from the - * from the @ref softdevice_handler function. This service will forward the event to the @ref ble_sdk_srv_sc_ctrlpt module. - * - * @note Attention! - * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile - * qualification listings, this section of source code must not be modified. - */ - -#ifndef BLE_CSCS_H__ -#define BLE_CSCS_H__ - -#include -#include -#include "ble.h" -#include "ble_srv_common.h" -#include "ble_sc_ctrlpt.h" -#include "ble_sensor_location.h" - -/** @defgroup BLE_CSCS_FEATURES Cycling Speed and Cadence Service feature bits - * @{ */ -#define BLE_CSCS_FEATURE_WHEEL_REV_BIT (0x01 << 0) /**< Wheel Revolution Data Supported bit. */ -#define BLE_CSCS_FEATURE_CRANK_REV_BIT (0x01 << 1) /**< Crank Revolution Data Supported bit. */ -#define BLE_CSCS_FEATURE_MULTIPLE_SENSORS_BIT (0x01 << 2) /**< Multiple Sensor Locations Supported bit. */ -/** @} */ - -/**@brief Cycling Speed and Cadence Service event type. */ -typedef enum -{ - BLE_CSCS_EVT_NOTIFICATION_ENABLED, /**< Cycling Speed and Cadence value notification enabled event. */ - BLE_CSCS_EVT_NOTIFICATION_DISABLED /**< Cycling Speed and Cadence value notification disabled event. */ -} ble_cscs_evt_type_t; - -/**@brief Cycling Speed and Cadence Service event. */ -typedef struct -{ - ble_cscs_evt_type_t evt_type; /**< Type of event. */ -} ble_cscs_evt_t; - -// Forward declaration of the ble_csc_t type. -typedef struct ble_cscs_s ble_cscs_t; - -/**@brief Cycling Speed and Cadence Service event handler type. */ -typedef void (*ble_cscs_evt_handler_t) (ble_cscs_t * p_cscs, ble_cscs_evt_t * p_evt); - -/**@brief Cycling Speed and Cadence Service init structure. This contains all options and data -* needed for initialization of the service. */ -typedef struct -{ - ble_cscs_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Cycling Speed and Cadence Service. */ - ble_srv_cccd_security_mode_t csc_meas_attr_md; /**< Initial security level for cycling speed and cadence measurement attribute */ - ble_srv_cccd_security_mode_t csc_ctrlpt_attr_md; /**< Initial security level for cycling speed and cadence control point attribute */ - ble_srv_security_mode_t csc_feature_attr_md; /**< Initial security level for feature attribute */ - uint16_t feature; /**< Initial value for features of sensor @ref BLE_CSCS_FEATURES. */ - uint8_t ctrplt_supported_functions; /**< Supported control point functionalities see @ref BLE_SRV_SC_CTRLPT_SUPP_FUNC. */ - ble_sc_ctrlpt_evt_handler_t ctrlpt_evt_handler; /**< Event handler */ - ble_sensor_location_t *list_supported_locations; /**< List of supported sensor locations.*/ - uint8_t size_list_supported_locations; /**< Number of supported sensor locations in the list.*/ - ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ - ble_sensor_location_t *sensor_location; /**< Initial Sensor Location, if NULL, sensor_location characteristic is not added*/ - ble_srv_cccd_security_mode_t csc_sensor_loc_attr_md; /**< Initial security level for sensor location attribute */ -} ble_cscs_init_t; - -/**@brief Cycling Speed and Cadence Service structure. This contains various status information for - * the service. */ -struct ble_cscs_s -{ - ble_cscs_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Cycling Speed and Cadence Service. */ - uint16_t service_handle; /**< Handle of Cycling Speed and Cadence Service (as provided by the BLE stack). */ - ble_gatts_char_handles_t meas_handles; /**< Handles related to the Cycling Speed and Cadence Measurement characteristic. */ - ble_gatts_char_handles_t feature_handles; /**< Handles related to the Cycling Speed and Cadence feature characteristic. */ - ble_gatts_char_handles_t sensor_loc_handles; /**< Handles related to the Cycling Speed and Cadence Sensor Location characteristic. */ - uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ - uint16_t feature; /**< Bit mask of features available on sensor. */ - ble_sc_ctrlpt_t ctrl_pt; /**< data for speed and cadence control point */ -}; - -/**@brief Cycling Speed and Cadence Service measurement structure. This contains a Cycling Speed and - * Cadence Service measurement. */ -typedef struct ble_cscs_meas_s -{ - bool is_wheel_rev_data_present; /**< True if Wheel Revolution Data is present in the measurement. */ - bool is_crank_rev_data_present; /**< True if Crank Revolution Data is present in the measurement. */ - uint32_t cumulative_wheel_revs; /**< Cumulative Wheel Revolutions. */ - uint16_t last_wheel_event_time; /**< Last Wheel Event Time. */ - uint16_t cumulative_crank_revs; /**< Cumulative Crank Revolutions. */ - uint16_t last_crank_event_time; /**< Last Crank Event Time. */ -} ble_cscs_meas_t; - -/**@brief Function for initializing the Cycling Speed and Cadence Service. - * - * @param[out] p_cscs Cycling Speed and Cadence Service structure. This structure will have to - * be supplied by the application. It will be initialized by this function, - * and will later be used to identify this particular service instance. - * @param[in] p_cscs_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. - */ -uint32_t ble_cscs_init(ble_cscs_t * p_cscs, const ble_cscs_init_t * p_cscs_init); - -/**@brief Function for handling the Application's BLE Stack events. - * - * @details Handles all events from the BLE stack of interest to the Cycling Speed and Cadence - * Service. - * - * @param[in] p_cscs Cycling Speed and Cadence Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -void ble_cscs_on_ble_evt(ble_cscs_t * p_cscs, ble_evt_t * p_ble_evt); - -/**@brief Function for sending cycling speed and cadence measurement if notification has been enabled. - * - * @details The application calls this function after having performed a Cycling Speed and Cadence - * Service measurement. If notification has been enabled, the measurement data is encoded - * and sent to the client. - * - * @param[in] p_cscs Cycling Speed and Cadence Service structure. - * @param[in] p_measurement Pointer to new cycling speed and cadence measurement. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -uint32_t ble_cscs_measurement_send(ble_cscs_t * p_cscs, ble_cscs_meas_t * p_measurement); - -#endif // BLE_CSCS_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_sc_ctrlpt.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_sc_ctrlpt.c deleted file mode 100644 index 5d1c4e63aa..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_sc_ctrlpt.c +++ /dev/null @@ -1,638 +0,0 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/* Attention! - * To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile - * qualification listings, this section of source code must not be modified. - */ - -#include "ble_sc_ctrlpt.h" -#include -#include "nordic_common.h" -#include "ble_l2cap.h" -#include "ble_srv_common.h" -#include "app_util.h" - -#define SC_CTRLPT_NACK_PROC_ALREADY_IN_PROGRESS (BLE_GATT_STATUS_ATTERR_APP_BEGIN + 0) -#define SC_CTRLPT_NACK_CCCD_IMPROPERLY_CONFIGURED (BLE_GATT_STATUS_ATTERR_APP_BEGIN + 1) - -uint32_t ble_sc_ctrlpt_init(ble_sc_ctrlpt_t * p_sc_ctrlpt, - const ble_cs_ctrlpt_init_t * p_sc_ctrlpt_init) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_md_t cccd_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - - p_sc_ctrlpt->conn_handle = BLE_CONN_HANDLE_INVALID; - p_sc_ctrlpt->procedure_status = BLE_SCPT_NO_PROC_IN_PROGRESS; - - p_sc_ctrlpt->size_list_supported_locations = p_sc_ctrlpt_init->size_list_supported_locations; - - if ((p_sc_ctrlpt_init->size_list_supported_locations != 0) && - (p_sc_ctrlpt_init->list_supported_locations != NULL)) - { - memcpy(p_sc_ctrlpt->list_supported_locations, - p_sc_ctrlpt_init->list_supported_locations, - p_sc_ctrlpt->size_list_supported_locations * sizeof(ble_sensor_location_t)); - } - - p_sc_ctrlpt->service_handle = p_sc_ctrlpt_init->service_handle; - p_sc_ctrlpt->evt_handler = p_sc_ctrlpt_init->evt_handler; - p_sc_ctrlpt->supported_functions = p_sc_ctrlpt_init->supported_functions; - p_sc_ctrlpt->sensor_location_handle = p_sc_ctrlpt_init->sensor_location_handle; - p_sc_ctrlpt->error_handler = p_sc_ctrlpt_init->error_handler; - - memset(&cccd_md, 0, sizeof(cccd_md)); - - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); - cccd_md.write_perm = p_sc_ctrlpt_init->sc_ctrlpt_attr_md.cccd_write_perm; - cccd_md.vloc = BLE_GATTS_VLOC_STACK; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.indicate = 1; - char_md.char_props.write = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = &cccd_md; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_SC_CTRLPT_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.read_perm); - attr_md.write_perm = p_sc_ctrlpt_init->sc_ctrlpt_attr_md.write_perm; - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 1; - attr_md.vlen = 1; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = 0; - attr_char_value.init_offs = 0; - attr_char_value.max_len = BLE_SC_CTRLPT_MAX_LEN; - attr_char_value.p_value = 0; - - return sd_ble_gatts_characteristic_add(p_sc_ctrlpt->service_handle, - &char_md, - &attr_char_value, - &p_sc_ctrlpt->sc_ctrlpt_handles); -} - - -/**@brief Decode an incoming control point write. - * - * @param[in] rcvd_val received write value - * @param[in] len value length - * @param[out] decoded_ctrlpt decoded control point structure - */ -static uint32_t sc_ctrlpt_decode(uint8_t * p_rcvd_val, - uint8_t len, - ble_sc_ctrlpt_val_t * p_write_val) -{ - int pos = 0; - - if (len < BLE_SC_CTRLPT_MIN_LEN) - { - return NRF_ERROR_INVALID_PARAM; - } - - p_write_val->opcode = (ble_scpt_operator_t) p_rcvd_val[pos++]; - - switch (p_write_val->opcode) - { - case BLE_SCPT_REQUEST_SUPPORTED_SENSOR_LOCATIONS: - break; - - case BLE_SCPT_START_AUTOMATIC_CALIBRATION: - break; - - case BLE_SCPT_UPDATE_SENSOR_LOCATION: - p_write_val->location = (ble_sensor_location_t)p_rcvd_val[pos]; - break; - - case BLE_SCPT_SET_CUMULATIVE_VALUE: - p_write_val->cumulative_value = uint32_decode(&(p_rcvd_val[pos])); - break; - - default: - return NRF_ERROR_INVALID_PARAM; - } - return NRF_SUCCESS; -} - - -/**@brief encode a control point response indication. - * - * @param[in] p_sc_ctrlpt SC Ctrlpt structure. - * @param[in] p_ctrlpt_rsp structure containing response data to be encoded - * @param[out] p_data pointer where data needs to be written - * @return size of encoded data - */ -static int ctrlpt_rsp_encode(ble_sc_ctrlpt_t * p_sc_ctrlpt, - ble_sc_ctrlpt_rsp_t * p_ctrlpt_rsp, - uint8_t * p_data) -{ - int len = 0; - - p_data[len++] = BLE_SCPT_RESPONSE_CODE; - p_data[len++] = p_ctrlpt_rsp->opcode; - p_data[len++] = p_ctrlpt_rsp->status; - - if (p_ctrlpt_rsp->status == BLE_SCPT_SUCCESS) - { - switch (p_ctrlpt_rsp->opcode) - { - case BLE_SCPT_REQUEST_SUPPORTED_SENSOR_LOCATIONS: - { - int i; - for (i = 0; i < p_sc_ctrlpt->size_list_supported_locations; i++) - { - p_data[len++] = p_sc_ctrlpt->list_supported_locations[i]; - } - break; - } - - default: - // No implementation needed. - break; - } - } - return len; -} - - -/**@brief check if a given sensor location is supported or not. - * - * @param[in] p_sc_ctrlpt SC Ctrlpt structure. - * @param[in] location sensor location to check. - * @return true if the given location is found in the list of supported locations, false otherwise. - */ -static bool is_location_supported(ble_sc_ctrlpt_t * p_sc_ctrlpt, ble_sensor_location_t location) -{ - int i; - - for (i = 0; i < p_sc_ctrlpt->size_list_supported_locations; i++) - { - if (p_sc_ctrlpt->list_supported_locations[i] == location) - { - return true; - } - } - return false; -} - - -/**@brief check if the cccd is configured - * - * @param[in] p_sc_ctrlpt SC Ctrlpt structure. - * @return true if the sc_control point's cccd is correctly configured, false otherwise. - */ -static bool is_cccd_configured(ble_sc_ctrlpt_t * p_sc_ctrlpt) -{ - uint32_t err_code; - uint8_t cccd_value_buf[BLE_CCCD_VALUE_LEN]; - bool is_sccp_indic_enabled = false; - ble_gatts_value_t gatts_value; - - // Initialize value struct. - memset(&gatts_value, 0, sizeof(gatts_value)); - - gatts_value.len = BLE_CCCD_VALUE_LEN; - gatts_value.offset = 0; - gatts_value.p_value = cccd_value_buf; - - err_code = sd_ble_gatts_value_get(p_sc_ctrlpt->conn_handle, - p_sc_ctrlpt->sc_ctrlpt_handles.cccd_handle, - &gatts_value); - if (err_code != NRF_SUCCESS) - { - // Report error to application - if (p_sc_ctrlpt->error_handler != NULL) - { - p_sc_ctrlpt->error_handler(err_code); - } - } - - is_sccp_indic_enabled = ble_srv_is_indication_enabled(cccd_value_buf); - - return is_sccp_indic_enabled; -} - - -/**@brief sends a control point indication. - * - * @param[in] p_sc_ctrlpt SC Ctrlpt structure. - */ -static void sc_ctrlpt_resp_send(ble_sc_ctrlpt_t * p_sc_ctrlpt) -{ - uint16_t hvx_len; - ble_gatts_hvx_params_t hvx_params; - uint32_t err_code; - - if ((p_sc_ctrlpt->procedure_status == BLE_SCPT_INDICATION_PENDING)) - { - hvx_len = p_sc_ctrlpt->response.len; - memset(&hvx_params, 0, sizeof(hvx_params)); - - hvx_params.handle = p_sc_ctrlpt->sc_ctrlpt_handles.value_handle; - hvx_params.type = BLE_GATT_HVX_INDICATION; - hvx_params.offset = 0; - hvx_params.p_len = &hvx_len; - hvx_params.p_data = p_sc_ctrlpt->response.encoded_ctrl_rsp; - - err_code = sd_ble_gatts_hvx(p_sc_ctrlpt->conn_handle, &hvx_params); - - // Error handling - if ((err_code == NRF_SUCCESS) && (hvx_len != p_sc_ctrlpt->response.len)) - { - err_code = NRF_ERROR_DATA_SIZE; - } - - switch (err_code) - { - case NRF_SUCCESS: - p_sc_ctrlpt->procedure_status = BLE_SCPT_IND_CONFIRM_PENDING; - // Wait for HVC event - break; - - case BLE_ERROR_NO_TX_PACKETS: - // Wait for TX_COMPLETE event to retry transmission - p_sc_ctrlpt->procedure_status = BLE_SCPT_INDICATION_PENDING; - break; - - default: - // Report error to application - p_sc_ctrlpt->procedure_status = BLE_SCPT_NO_PROC_IN_PROGRESS; - if (p_sc_ctrlpt->error_handler != NULL) - { - p_sc_ctrlpt->error_handler(err_code); - } - break; - } - } -} - - -/**@brief Handle a write event to the Speed and Cadence Control Point. - * - * @param[in] p_sc_ctrlpt SC Ctrlpt structure. - * @param[in] p_evt_write WRITE event to be handled. - */ -static void on_ctrlpt_write(ble_sc_ctrlpt_t * p_sc_ctrlpt, - ble_gatts_evt_write_t * p_evt_write) -{ - ble_sc_ctrlpt_val_t rcvd_ctrlpt = - { BLE_SCPT_RESPONSE_CODE , 0, BLE_SENSOR_LOCATION_OTHER }; - - ble_sc_ctrlpt_rsp_t rsp; - uint32_t err_code; - ble_gatts_rw_authorize_reply_params_t auth_reply; - ble_sc_ctrlpt_evt_t evt; - - auth_reply.type = BLE_GATTS_AUTHORIZE_TYPE_WRITE; - auth_reply.params.write.offset = 0; - auth_reply.params.write.len = 0; - auth_reply.params.write.p_data = NULL; - auth_reply.params.write.gatt_status = BLE_GATT_STATUS_SUCCESS; - auth_reply.params.write.update = 1; - - if (is_cccd_configured(p_sc_ctrlpt)) - { - if (p_sc_ctrlpt->procedure_status == BLE_SCPT_NO_PROC_IN_PROGRESS) - { - auth_reply.params.write.gatt_status = BLE_GATT_STATUS_SUCCESS; - } - else - { - auth_reply.params.write.gatt_status = SC_CTRLPT_NACK_PROC_ALREADY_IN_PROGRESS; - } - } - else - { - auth_reply.params.write.gatt_status = SC_CTRLPT_NACK_CCCD_IMPROPERLY_CONFIGURED; - } - - err_code = sd_ble_gatts_rw_authorize_reply(p_sc_ctrlpt->conn_handle, &auth_reply); - if (err_code != NRF_SUCCESS) - { - // Report error to application. - if (p_sc_ctrlpt->error_handler != NULL) - { - p_sc_ctrlpt->error_handler(err_code); - } - } - - if (auth_reply.params.write.gatt_status != BLE_GATT_STATUS_SUCCESS) - { - return; - } - - p_sc_ctrlpt->procedure_status = BLE_SCPT_INDICATION_PENDING; - rsp.status = BLE_SCPT_OP_CODE_NOT_SUPPORTED; - - err_code = sc_ctrlpt_decode(p_evt_write->data, p_evt_write->len, &rcvd_ctrlpt); - if (err_code != NRF_SUCCESS) - { - rsp.opcode = rcvd_ctrlpt.opcode; - rsp.status = BLE_SCPT_OP_CODE_NOT_SUPPORTED; - } - else - { - rsp.opcode = rcvd_ctrlpt.opcode; - - switch (rcvd_ctrlpt.opcode) - { - case BLE_SCPT_REQUEST_SUPPORTED_SENSOR_LOCATIONS: - if ((p_sc_ctrlpt->supported_functions & - BLE_SRV_SC_CTRLPT_SENSOR_LOCATIONS_OP_SUPPORTED) == - BLE_SRV_SC_CTRLPT_SENSOR_LOCATIONS_OP_SUPPORTED) - { - rsp.status = BLE_SCPT_SUCCESS; - } - else - { - rsp.status = BLE_SCPT_OP_CODE_NOT_SUPPORTED; - } - break; - - case BLE_SCPT_UPDATE_SENSOR_LOCATION: - if ((p_sc_ctrlpt->supported_functions & - BLE_SRV_SC_CTRLPT_SENSOR_LOCATIONS_OP_SUPPORTED) == - BLE_SRV_SC_CTRLPT_SENSOR_LOCATIONS_OP_SUPPORTED) - { - if (is_location_supported(p_sc_ctrlpt, rcvd_ctrlpt.location)) - { - ble_gatts_value_t gatts_value; - uint8_t rcvd_location = (uint8_t)rcvd_ctrlpt.location; - rsp.status = BLE_SCPT_SUCCESS; - - // Initialize value struct. - memset(&gatts_value, 0, sizeof(gatts_value)); - - gatts_value.len = sizeof(uint8_t); - gatts_value.offset = 0; - gatts_value.p_value = &rcvd_location; - - evt.evt_type = BLE_SC_CTRLPT_EVT_UPDATE_LOCATION; - evt.params.update_location = rcvd_ctrlpt.location; - if (p_sc_ctrlpt->evt_handler != NULL) - { - rsp.status = p_sc_ctrlpt->evt_handler(p_sc_ctrlpt, &evt); - } - if (rsp.status == BLE_SCPT_SUCCESS) - { - err_code = sd_ble_gatts_value_set(p_sc_ctrlpt->conn_handle, - p_sc_ctrlpt->sensor_location_handle, - &gatts_value); - if (err_code != NRF_SUCCESS) - { - // Report error to application - if (p_sc_ctrlpt->error_handler != NULL) - { - p_sc_ctrlpt->error_handler(err_code); - } - rsp.status = BLE_SCPT_OPERATION_FAILED; - } - } - } - else - { - rsp.status = BLE_SCPT_INVALID_PARAMETER; - } - } - else - { - rsp.status = BLE_SCPT_OP_CODE_NOT_SUPPORTED; - } - break; - - case BLE_SCPT_SET_CUMULATIVE_VALUE: - if ((p_sc_ctrlpt->supported_functions & - BLE_SRV_SC_CTRLPT_CUM_VAL_OP_SUPPORTED) == - BLE_SRV_SC_CTRLPT_CUM_VAL_OP_SUPPORTED) - { - rsp.status = BLE_SCPT_SUCCESS; - - evt.evt_type = BLE_SC_CTRLPT_EVT_SET_CUMUL_VALUE; - evt.params.cumulative_value = rcvd_ctrlpt.cumulative_value; - if (p_sc_ctrlpt->evt_handler != NULL) - { - rsp.status = p_sc_ctrlpt->evt_handler(p_sc_ctrlpt, &evt); - } - } - else - { - rsp.status = BLE_SCPT_OP_CODE_NOT_SUPPORTED; - } - break; - - case BLE_SCPT_START_AUTOMATIC_CALIBRATION: - if ((p_sc_ctrlpt->supported_functions & - BLE_SRV_SC_CTRLPT_START_CALIB_OP_SUPPORTED) == - BLE_SRV_SC_CTRLPT_START_CALIB_OP_SUPPORTED) - { - p_sc_ctrlpt->procedure_status = BLE_SCPT_AUTOMATIC_CALIB_IN_PROGRESS; - evt.evt_type = BLE_SC_CTRLPT_EVT_START_CALIBRATION; - if (p_sc_ctrlpt->evt_handler != NULL) - { - rsp.status = p_sc_ctrlpt->evt_handler(p_sc_ctrlpt, &evt); - if (rsp.status != BLE_SCPT_SUCCESS) - { - p_sc_ctrlpt->procedure_status = BLE_SCPT_INDICATION_PENDING; // If the application returns an error, the response is to be sent right away and the calibration is considered as not started. - } - } - } - else - { - rsp.status = BLE_SCPT_OP_CODE_NOT_SUPPORTED; - } - break; - - default: - rsp.status = BLE_SCPT_OP_CODE_NOT_SUPPORTED; - break; - } - - } - - p_sc_ctrlpt->response.len = ctrlpt_rsp_encode(p_sc_ctrlpt, &rsp, - p_sc_ctrlpt->response.encoded_ctrl_rsp); - - - if (p_sc_ctrlpt->procedure_status == BLE_SCPT_INDICATION_PENDING) - { - sc_ctrlpt_resp_send(p_sc_ctrlpt); - } -} - - -/**@brief Authorize WRITE request event handler. - * - * @details Handles WRITE events from the BLE stack. - * - * @param[in] p_sc_ctrlpt SC Ctrlpt structure. - * @param[in] p_gatts_evt GATTS Event received from the BLE stack. - * - */ -static void on_rw_authorize_request(ble_sc_ctrlpt_t * p_sc_ctrlpt, ble_gatts_evt_t * p_gatts_evt) -{ - ble_gatts_evt_rw_authorize_request_t * p_auth_req = &p_gatts_evt->params.authorize_request; - if (p_auth_req->type == BLE_GATTS_AUTHORIZE_TYPE_WRITE) - { - if ( (p_gatts_evt->params.authorize_request.request.write.op - != BLE_GATTS_OP_PREP_WRITE_REQ) - && (p_gatts_evt->params.authorize_request.request.write.op - != BLE_GATTS_OP_EXEC_WRITE_REQ_NOW) - && (p_gatts_evt->params.authorize_request.request.write.op - != BLE_GATTS_OP_EXEC_WRITE_REQ_CANCEL) - ) - { - if (p_auth_req->request.write.handle == p_sc_ctrlpt->sc_ctrlpt_handles.value_handle) - { - on_ctrlpt_write(p_sc_ctrlpt, &p_auth_req->request.write); - } - } - } -} - - -/**@brief Tx Complete event handler. - * - * @details Tx Complete event handler. - * Handles WRITE events from the BLE stack and if an indication was pending try sending it - * again. - * - * @param[in] p_sc_ctrlpt SC Ctrlpt structure. - * - */ -static void on_tx_complete(ble_sc_ctrlpt_t * p_sc_ctrlpt) -{ - if (p_sc_ctrlpt->procedure_status == BLE_SCPT_INDICATION_PENDING) - { - sc_ctrlpt_resp_send(p_sc_ctrlpt); - } -} - - -/**@brief Function for handling the Connect event. - * - * @param[in] p_sc_ctrlpt SC Ctrlpt structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_connect(ble_sc_ctrlpt_t * p_sc_ctrlpt, ble_evt_t * p_ble_evt) -{ - p_sc_ctrlpt->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; - p_sc_ctrlpt->procedure_status = BLE_SCPT_NO_PROC_IN_PROGRESS; -} - - -/**@brief Function for handling the Disconnect event. - * - * @param[in] p_sc_ctrlpt SC Ctrlpt structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_disconnect(ble_sc_ctrlpt_t * p_sc_ctrlpt, ble_evt_t * p_ble_evt) -{ - UNUSED_PARAMETER(p_ble_evt); - p_sc_ctrlpt->conn_handle = BLE_CONN_HANDLE_INVALID; - p_sc_ctrlpt->procedure_status = BLE_SCPT_NO_PROC_IN_PROGRESS; -} - - -/**@brief Function for handling the BLE_GATTS_EVT_HVC event. - * - * @param[in] p_sc_ctrlpt SC Ctrlpt structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_sc_hvc_confirm(ble_sc_ctrlpt_t * p_sc_ctrlpt, ble_evt_t * p_ble_evt) -{ - if (p_ble_evt->evt.gatts_evt.params.hvc.handle == p_sc_ctrlpt->sc_ctrlpt_handles.value_handle) - { - if (p_sc_ctrlpt->procedure_status == BLE_SCPT_IND_CONFIRM_PENDING) - { - p_sc_ctrlpt->procedure_status = BLE_SCPT_NO_PROC_IN_PROGRESS; - } - } -} - - -void ble_sc_ctrlpt_on_ble_evt(ble_sc_ctrlpt_t * p_sc_ctrlpt, ble_evt_t * p_ble_evt) -{ - switch (p_ble_evt->header.evt_id) - { - case BLE_GAP_EVT_CONNECTED: - on_connect(p_sc_ctrlpt, p_ble_evt); - break; - - case BLE_GAP_EVT_DISCONNECTED: - on_disconnect(p_sc_ctrlpt, p_ble_evt); - break; - - case BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST: - on_rw_authorize_request(p_sc_ctrlpt, &p_ble_evt->evt.gatts_evt); - break; - - case BLE_GATTS_EVT_HVC: - on_sc_hvc_confirm(p_sc_ctrlpt, p_ble_evt); - break; - - case BLE_EVT_TX_COMPLETE: - on_tx_complete(p_sc_ctrlpt); - break; - - default: - break; - } -} - - -uint32_t ble_sc_ctrlpt_rsp_send(ble_sc_ctrlpt_t * p_sc_ctrlpt, ble_scpt_response_t response_status) -{ - uint32_t err_code = NRF_SUCCESS; - ble_sc_ctrlpt_rsp_t rsp; - uint8_t encoded_ctrl_rsp[BLE_SC_CTRLPT_MAX_LEN]; - uint16_t hvx_len; - ble_gatts_hvx_params_t hvx_params; - - if (p_sc_ctrlpt->procedure_status != BLE_SCPT_AUTOMATIC_CALIB_IN_PROGRESS) - { - return NRF_ERROR_INVALID_STATE; - } - rsp.status = response_status; - rsp.opcode = BLE_SCPT_START_AUTOMATIC_CALIBRATION; - hvx_len = ctrlpt_rsp_encode(p_sc_ctrlpt, &rsp, encoded_ctrl_rsp); - - // Send indication - memset(&hvx_params, 0, sizeof(hvx_params)); - - hvx_params.handle = p_sc_ctrlpt->sc_ctrlpt_handles.value_handle; - hvx_params.type = BLE_GATT_HVX_INDICATION; - hvx_params.offset = 0; - hvx_params.p_len = &hvx_len; - hvx_params.p_data = encoded_ctrl_rsp; - - err_code = sd_ble_gatts_hvx(p_sc_ctrlpt->conn_handle, &hvx_params); - - if (err_code == NRF_SUCCESS) - { - p_sc_ctrlpt->procedure_status = BLE_SCPT_NO_PROC_IN_PROGRESS; - } - return err_code; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_sc_ctrlpt.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_sc_ctrlpt.h deleted file mode 100644 index fc5ac9bb27..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cscs/ble_sc_ctrlpt.h +++ /dev/null @@ -1,211 +0,0 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/** @file - * - * @defgroup ble_sdk_srv_sc_ctrlpt Speed and Cadence Control Point - * @{ - * @ingroup ble_sdk_srv - * @brief Speed and Cadence Control Point module. - * - * @details This module implements the Speed and Cadence control point behavior. It is used - * by the @ref ble_sdk_srv_csc module and the ble_sdk_srv_rsc module for control point - * mechanisms like setting a cumulative value, Start an automatic calibration, - * Update the sensor location or request the supported locations. - * - * @note Attention! - * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile - * qualification listings, this section of source code must not be modified. - */ - -#ifndef BLE_SC_CTRLPT_H__ -#define BLE_SC_CTRLPT_H__ - -#include -#include -#include "ble.h" -#include "ble_srv_common.h" -#include "ble_sensor_location.h" - -#define BLE_SC_CTRLPT_MAX_LEN 19 /**< maximum lenght for Speed and cadence control point characteristic value. */ -#define BLE_SC_CTRLPT_MIN_LEN 1 /**< minimum length for Speed and cadence control point characteristic value. */ - -// Forward declaration of the ble_sc_ctrlpt_t type. -typedef struct ble_sc_ctrlpt_s ble_sc_ctrlpt_t; - - -/**@brief Speed and Cadence Control Point event type. */ -typedef enum -{ - BLE_SC_CTRLPT_EVT_UPDATE_LOCATION, /**< rcvd update location opcode (the control point handles the change of location automatically, the event just informs the application in case it needs to adjust its algorithm). */ - BLE_SC_CTRLPT_EVT_SET_CUMUL_VALUE, /**< rcvd set cumulative value opcode, it is then up to the application to use the new cumulative value. */ - BLE_SC_CTRLPT_EVT_START_CALIBRATION, /**< rcvd start calibration opcode, the application needs, at the end ot the calibration to call ble_sc_ctrlpt_send_rsp. */ -} ble_sc_ctrlpt_evt_type_t; - - -/**@brief Speed and Cadence Control point event. */ -typedef struct -{ - ble_sc_ctrlpt_evt_type_t evt_type; /**< Type of event. */ - union - { - ble_sensor_location_t update_location; - uint32_t cumulative_value; - }params; -} ble_sc_ctrlpt_evt_t; - - -/** Speed and Cadence Control Point operator code (see RSC service specification)*/ -typedef enum { - BLE_SCPT_SET_CUMULATIVE_VALUE = 0x01, /**< Operator to set a given cumulative value. */ - BLE_SCPT_START_AUTOMATIC_CALIBRATION = 0x02, /**< Operator to start automatic calibration. */ - BLE_SCPT_UPDATE_SENSOR_LOCATION = 0x03, /**< Operator to update the sensor location. */ - BLE_SCPT_REQUEST_SUPPORTED_SENSOR_LOCATIONS = 0x04, /**< Operator to request the supported sensor locations. */ - BLE_SCPT_RESPONSE_CODE = 0x10, /**< Response Code. */ -} ble_scpt_operator_t; - - -/** Speed and Cadence Control Point response parameter (see RSC service specification)*/ -typedef enum { - BLE_SCPT_SUCCESS = 0x01, /**< Sucess Response. */ - BLE_SCPT_OP_CODE_NOT_SUPPORTED = 0x02, /**< Error Response received opcode not supported. */ - BLE_SCPT_INVALID_PARAMETER = 0x03, /**< Error Response received parameter invalid. */ - BLE_SCPT_OPERATION_FAILED = 0x04, /**< Error Response operation failed. */ -} ble_scpt_response_t; - - -/** Speed and Cadence Control Point procedure status (indicates is a procedure is in progress or not and which procedure is in progress*/ -typedef enum { - BLE_SCPT_NO_PROC_IN_PROGRESS = 0x00, /**< No procedure in progress. */ - BLE_SCPT_AUTOMATIC_CALIB_IN_PROGRESS = 0x01, /**< Automatic Calibration is in progress. */ - BLE_SCPT_INDICATION_PENDING = 0x02, /**< Control Point Indication is pending. */ - BLE_SCPT_IND_CONFIRM_PENDING = 0x03, /**< Waiting for the indication confirmation. */ -}ble_scpt_procedure_status_t; - -/**@brief Speed and Cadence Control point event handler type. */ -typedef ble_scpt_response_t (*ble_sc_ctrlpt_evt_handler_t) (ble_sc_ctrlpt_t * p_sc_ctrlpt, - ble_sc_ctrlpt_evt_t * p_evt); - - -typedef struct{ - ble_scpt_operator_t opcode; - uint32_t cumulative_value; - ble_sensor_location_t location; -}ble_sc_ctrlpt_val_t; - - -typedef struct{ - ble_scpt_operator_t opcode; - ble_scpt_response_t status; - ble_sensor_location_t location_list[BLE_NB_MAX_SENSOR_LOCATIONS]; -}ble_sc_ctrlpt_rsp_t; - - -/** - * \defgroup BLE_SRV_SC_CTRLPT_SUPP_FUNC Control point functionalities. - *@{ - */ -#define BLE_SRV_SC_CTRLPT_SENSOR_LOCATIONS_OP_SUPPORTED 0x01 /**< Support for sensor location related operations */ -#define BLE_SRV_SC_CTRLPT_CUM_VAL_OP_SUPPORTED 0x02 /**< Support for setting cumulative value related operations */ -#define BLE_SRV_SC_CTRLPT_START_CALIB_OP_SUPPORTED 0x04 /**< Support for starting calibration related operations */ -/** - *@} - */ - -/**@brief Speed and Cadence Control Point init structure. This contains all options and data -* needed for initialization of the Speed and Cadence Control Point module. */ -typedef struct -{ - ble_srv_cccd_security_mode_t sc_ctrlpt_attr_md; /**< Initial security level for cycling speed and cadence control point attribute */ - uint8_t supported_functions; /**< supported control point functionalities see @ref BLE_SRV_SC_CTRLPT_SUPP_FUNC. */ - uint16_t service_handle; /**< Handle of the parent service (as provided by the BLE stack). */ - ble_sc_ctrlpt_evt_handler_t evt_handler; /**< event handler */ - ble_sensor_location_t *list_supported_locations; /**< list of supported sensor locations.*/ - uint8_t size_list_supported_locations; /**< number of supported sensor locations in the list.*/ - uint16_t sensor_location_handle; /**< handle for the sensor location characteristic (if sensor_location related operation are supported).*/ - ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ -} ble_cs_ctrlpt_init_t; - - -/**@brief Speed and Cadence Control Point response indication structure. */ -typedef struct -{ - ble_scpt_response_t status; /**< control point response status .*/ - uint8_t len; /**< control point response length .*/ - uint8_t encoded_ctrl_rsp[BLE_SC_CTRLPT_MAX_LEN]; /**< control point encoded response.*/ -}ble_sc_ctrlpt_resp_t; - - -/**@brief Speed and Cadence Control Point structure. This contains various status information for - * the Speed and Cadence Control Point behavior. */ -struct ble_sc_ctrlpt_s -{ - uint8_t supported_functions; /**< supported control point functionalities see @ref BLE_SRV_SC_CTRLPT_SUPP_FUNC. */ - uint16_t service_handle; /**< Handle of the parent service (as provided by the BLE stack). */ - ble_gatts_char_handles_t sc_ctrlpt_handles; /**< Handles related to the Speed and Cadence Control Point characteristic. */ - uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ - ble_sensor_location_t list_supported_locations[BLE_NB_MAX_SENSOR_LOCATIONS]; /**< list of supported sensor locations.*/ - uint8_t size_list_supported_locations; /**< number of supported sensor locations in the list.*/ - ble_sc_ctrlpt_evt_handler_t evt_handler; /**< Handle of the parent service (as provided by the BLE stack). */ - uint16_t sensor_location_handle; /**< handle for the sensor location characteristic (if sensor_location related operation are supported).*/ - ble_scpt_procedure_status_t procedure_status; /**< status of possible procedure*/ - ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ - ble_sc_ctrlpt_resp_t response; /**< pending response data.*/ -}; - -#define SCPT_OPCODE_POS 0 /**< Request opcode position. */ -#define SCPT_PARAMETER_POS 1 /**< Request parameter position. */ - -#define SCPT_RESPONSE_REQUEST_OPCODE_POS 1 /**< Response position of requested opcode. */ -#define SCPT_RESPONSE_CODE_POS 2 /**< Response position of response code. */ -#define SCPT_RESPONSE_PARAMETER 3 /**< Response position of response parameter. */ - -#define SCPT_MIN_RESPONSE_SIZE 3 /**< Minimum size for control point response. */ -#define SCPT_MAX_RESPONSE_SIZE (SCPT_MIN_RESPONSE_SIZE + NB_MAX_SENSOR_LOCATIONS) /**< Maximum size for control point response. */ - - -/**@brief Function for Initializing the Speed and Cadence Control Point. - * - * @details Function for Initializing the Speed and Cadence Control Point. - * @param[in] p_sc_ctrlpt Speed and Cadence Control Point structure. - * @param[in] p_sc_ctrlpt_init Information needed to initialize the control point behavior. - * - * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. - */ -uint32_t ble_sc_ctrlpt_init(ble_sc_ctrlpt_t * p_sc_ctrlpt, - const ble_cs_ctrlpt_init_t * p_sc_ctrlpt_init); - - -/**@brief Function for sending a control point response. - * - * @details Function for sending a control point response when the control point received was - * BLE_SCPT_START_AUTOMATIC_CALIBRATION. To be called after the calibration procedure is finished. - * - * @param[in] p_sc_ctrlpt Speed and Cadence Control Point structure. - * @param[in] response_status status to include in the control point response. - */ -uint32_t ble_sc_ctrlpt_rsp_send(ble_sc_ctrlpt_t * p_sc_ctrlpt, ble_scpt_response_t response_status); - - -/**@brief Speed and Cadence Control Point BLE stack event handler. - * - * @details Handles all events from the BLE stack of interest to the Speed and Cadence Control Point. - * - * @param[in] p_sc_ctrlpt Speed and Cadence Control Point structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -void ble_sc_ctrlpt_on_ble_evt(ble_sc_ctrlpt_t * p_sc_ctrlpt, ble_evt_t * p_ble_evt); - - -#endif // BLE_SC_CTRLPT_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cts_c/ble_cts_c.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cts_c/ble_cts_c.c deleted file mode 100644 index 5d3b730a37..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cts_c/ble_cts_c.c +++ /dev/null @@ -1,340 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -#include -#include "ble.h" -#include "ble_srv_common.h" -#include "ble_gattc.h" -#include "ble_cts_c.h" -#include "ble_date_time.h" -#include "ble_db_discovery.h" -#include "nrf_log.h" -#include "nrf_log.h" -#include "sdk_common.h" - -#define CTS_LOG NRF_LOG_PRINTF_DEBUG /**< Debug logger macro that will be used in this file to do logging of important information over UART. */ -#define CTS_YEAR_MIN 1582 /**< The lowest valid Current Time year is the year when the western calendar was introduced. */ -#define CTS_YEAR_MAX 9999 /**< The highest possible Current Time. */ - -#define CTS_C_CURRENT_TIME_EXPECTED_LENGTH 10 /**< | Year |Month |Day |Hours |Minutes |Seconds |Weekday |Fraction|Reason | - | 2 bytes |1 byte |1 byte |1 byte |1 byte |1 byte |1 byte |1 byte |1 byte | = 10 bytes. */ - - -/**@brief Function for handling events from the database discovery module. - * - * @details This function will handle an event from the database discovery module, and determine - * if it relates to the discovery of Current Time Service at the peer. If so, it will - * call the application's event handler indicating that the Current Time Service has been - * discovered at the peer. It also populates the event with the service related - * information before providing it to the application. - * - * @param[in] p_evt Pointer to the event received from the database discovery module. - * - */ -void ble_cts_c_on_db_disc_evt(ble_cts_c_t * p_cts, ble_db_discovery_evt_t * p_evt) -{ - CTS_LOG("[CTS]: Database Discovery handler called with event 0x%x\r\n", p_evt->evt_type); - - ble_cts_c_evt_t evt; - const ble_gatt_db_char_t * p_chars = p_evt->params.discovered_db.charateristics; - - evt.evt_type = BLE_CTS_C_EVT_DISCOVERY_FAILED; - evt.conn_handle = p_evt->conn_handle; - - // Check if the Current Time Service was discovered. - if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE && - p_evt->params.discovered_db.srv_uuid.uuid == BLE_UUID_CURRENT_TIME_SERVICE && - p_evt->params.discovered_db.srv_uuid.type == BLE_UUID_TYPE_BLE) - { - - // Find the handles of the Current Time characteristic. - uint32_t i; - - for (i = 0; i < p_evt->params.discovered_db.char_count; i++) - { - if (p_evt->params.discovered_db.charateristics[i].characteristic.uuid.uuid == - BLE_UUID_CURRENT_TIME_CHAR) - { - // Found Current Time characteristic. Store CCCD and value handle and break. - evt.params.char_handles.cts_handle = p_chars->characteristic.handle_value; - evt.params.char_handles.cts_cccd_handle = p_chars->cccd_handle; - break; - } - } - - CTS_LOG("[CTS]: Current Time Service discovered at peer.\r\n"); - - evt.evt_type = BLE_CTS_C_EVT_DISCOVERY_COMPLETE; - } - p_cts->evt_handler(p_cts, &evt); -} - - -uint32_t ble_cts_c_init(ble_cts_c_t * p_cts, ble_cts_c_init_t const * p_cts_init) -{ - //Verify that the parameters needed for to initialize this instance of CTS are not NULL. - VERIFY_PARAM_NOT_NULL(p_cts); - VERIFY_PARAM_NOT_NULL(p_cts_init); - VERIFY_PARAM_NOT_NULL(p_cts_init->error_handler); - VERIFY_PARAM_NOT_NULL(p_cts_init->evt_handler); - - static ble_uuid_t cts_uuid; - - BLE_UUID_BLE_ASSIGN(cts_uuid, BLE_UUID_CURRENT_TIME_SERVICE); - - p_cts->evt_handler = p_cts_init->evt_handler; - p_cts->error_handler = p_cts_init->error_handler; - p_cts->conn_handle = BLE_CONN_HANDLE_INVALID; - p_cts->char_handles.cts_handle = BLE_GATT_HANDLE_INVALID; - p_cts->char_handles.cts_cccd_handle = BLE_GATT_HANDLE_INVALID; - - return ble_db_discovery_evt_register(&cts_uuid); -} - - -/**@brief Function for decoding a read from the current time characteristic. - * - * @param[in] p_time Current Time structure. - * @param[in] p_data Pointer to the buffer containing the current time. - * @param[in] length length of the buffer containing the current time. - * - * @return NRF_SUCCESS if the time struct is valid. - * @return NRF_ERROR_DATA_SIZE if length does not match the expected size of the data. - */ -static uint32_t current_time_decode(current_time_char_t * p_time, - const uint8_t * p_data, - const uint32_t length) -{ - //lint -save -e415 -e416 "Access of out of bounds pointer" "Creation of out of bounds pointer" - - if (length != CTS_C_CURRENT_TIME_EXPECTED_LENGTH) - { - // Return to prevent accessing out of bounds data. - return NRF_ERROR_DATA_SIZE; - } - - CTS_LOG("Current Time read response data: %02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X \r\n", - p_data[0], - p_data[1], - p_data[2], - p_data[3], - p_data[4], - p_data[5], - p_data[6], - p_data[7], - p_data[8], - p_data[9]); - - uint32_t index = 0; - - // Date. - index += ble_date_time_decode(&p_time->exact_time_256.day_date_time.date_time, p_data); - - // Day of week. - p_time->exact_time_256.day_date_time.day_of_week = p_data[index++]; - - // Fractions of a second. - p_time->exact_time_256.fractions256 = p_data[index++]; - - // Reason for updating the time. - p_time->adjust_reason.manual_time_update = (p_data[index] >> 0) & 0x01; - p_time->adjust_reason.external_reference_time_update = (p_data[index] >> 1) & 0x01; - p_time->adjust_reason.change_of_time_zone = (p_data[index] >> 2) & 0x01; - p_time->adjust_reason.change_of_daylight_savings_time = (p_data[index] >> 3) & 0x01; - - - //lint -restore - return NRF_SUCCESS; -} - - -/**@brief Function for decoding a read from the current time characteristic. - * - * @param[in] p_time Current Time struct. - * - * @return NRF_SUCCESS if the time struct is valid. - * @return NRF_ERROR_INVALID_DATA if the time is out of bounds. - */ -static uint32_t current_time_validate(current_time_char_t * p_time) -{ - // Year. - if ( (p_time->exact_time_256.day_date_time.date_time.year > CTS_YEAR_MAX) - || ((p_time->exact_time_256.day_date_time.date_time.year < CTS_YEAR_MIN) - && (p_time->exact_time_256.day_date_time.date_time.year != 0))) - { - return NRF_ERROR_INVALID_DATA; - } - - // Month. - if (p_time->exact_time_256.day_date_time.date_time.month > 12) - { - return NRF_ERROR_INVALID_DATA; - } - - // Day. - if (p_time->exact_time_256.day_date_time.date_time.day > 31) - { - return NRF_ERROR_INVALID_DATA; - } - - // Hours. - if (p_time->exact_time_256.day_date_time.date_time.hours > 23) - { - return NRF_ERROR_INVALID_DATA; - } - - // Minutes. - if (p_time->exact_time_256.day_date_time.date_time.minutes > 59) - { - return NRF_ERROR_INVALID_DATA; - } - - // Seconds. - if (p_time->exact_time_256.day_date_time.date_time.seconds > 59) - { - return NRF_ERROR_INVALID_DATA; - } - - // Day of week. - if (p_time->exact_time_256.day_date_time.day_of_week > 7) - { - return NRF_ERROR_INVALID_DATA; - } - - return NRF_SUCCESS; -} - - -/**@brief Function for reading the current time. The time is decoded, then it is validated. - * Depending on the outcome the cts event handler will be called with - * the current time event or an invalid time event. - * - * @param[in] p_cts Current Time Service client structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void current_time_read(ble_cts_c_t * p_cts, const ble_evt_t * p_ble_evt) -{ - ble_cts_c_evt_t evt; - uint32_t err_code = NRF_SUCCESS; - - // Check if the event is on the same connection as this cts instance - if (p_cts->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) - { - return; - } - - if (p_ble_evt->evt.gattc_evt.gatt_status == BLE_GATT_STATUS_SUCCESS) - { - err_code = current_time_decode(&evt.params.current_time, - p_ble_evt->evt.gattc_evt.params.read_rsp.data, - p_ble_evt->evt.gattc_evt.params.read_rsp.len); - - if (err_code != NRF_SUCCESS) - { - // The data length was invalid, decoding was not completed. - evt.evt_type = BLE_CTS_C_EVT_INVALID_TIME; - } - else - { - // Verify That the time is valid. - err_code = current_time_validate(&evt.params.current_time); - - if (err_code != NRF_SUCCESS) - { - // Invalid time received. - evt.evt_type = BLE_CTS_C_EVT_INVALID_TIME; - } - else - { - // Valid time reveiced. - evt.evt_type = BLE_CTS_C_EVT_CURRENT_TIME; - } - } - p_cts->evt_handler(p_cts, &evt); - } -} - - -/**@brief Function for handling the Disconnect event. - * - * @param[in] p_cts Current Time Service client structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_disconnect(ble_cts_c_t * p_cts, ble_evt_t const * p_ble_evt) -{ - if (p_cts->conn_handle == p_ble_evt->evt.gap_evt.conn_handle) - { - p_cts->conn_handle = BLE_CONN_HANDLE_INVALID; - } - - if (ble_cts_c_is_cts_discovered(p_cts)) - { - // There was a valid instance of cts on the peer. Send an event to the - // application, so that it can do any clean up related to this module. - ble_cts_c_evt_t evt; - - evt.evt_type = BLE_CTS_C_EVT_DISCONN_COMPLETE; - - p_cts->evt_handler(p_cts, &evt); - p_cts->char_handles.cts_handle = BLE_GATT_HANDLE_INVALID; - p_cts->char_handles.cts_cccd_handle = BLE_GATT_HANDLE_INVALID; - } -} - - -void ble_cts_c_on_ble_evt(ble_cts_c_t * p_cts, ble_evt_t const * p_ble_evt) -{ - CTS_LOG("[CTS]: BLE event handler called with event 0x%x\r\n", p_ble_evt->header.evt_id); - - switch (p_ble_evt->header.evt_id) - { - case BLE_GATTC_EVT_READ_RSP: - current_time_read(p_cts, p_ble_evt); - break; - - case BLE_GAP_EVT_DISCONNECTED: - on_disconnect(p_cts, p_ble_evt); - break; - - default: - // No implementation needed. - break; - } -} - - -uint32_t ble_cts_c_current_time_read(ble_cts_c_t const * p_cts) -{ - if (!ble_cts_c_is_cts_discovered(p_cts)) - { - return NRF_ERROR_NOT_FOUND; - } - - return sd_ble_gattc_read(p_cts->conn_handle, p_cts->char_handles.cts_handle, 0); -} - - -uint32_t ble_cts_c_handles_assign(ble_cts_c_t * p_cts, - const uint16_t conn_handle, - const ble_cts_c_handles_t * p_peer_handles) -{ - VERIFY_PARAM_NOT_NULL(p_cts); - - p_cts->conn_handle = conn_handle; - if (p_peer_handles != NULL) - { - p_cts->char_handles.cts_cccd_handle = p_peer_handles->cts_cccd_handle; - p_cts->char_handles.cts_handle = p_peer_handles->cts_handle; - } - - return NRF_SUCCESS; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cts_c/ble_cts_c.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cts_c/ble_cts_c.h deleted file mode 100644 index ea453e2ed6..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_cts_c/ble_cts_c.h +++ /dev/null @@ -1,219 +0,0 @@ -/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/** @file - * - * @defgroup ble_sdk_srv_cts_c Current Time Service client - * @{ - * @ingroup ble_sdk_srv - * @brief Current Time Service client module. - * - * @details This module implements the Current Time Service (CTS) client-peripheral role of - * the Time Profile. After security is established, the module tries to discover the - * Current Time Service and Characteristic on the central side. If this succeeds, - * the application can trigger a read of the current time from the connected server. - * - * The module informs the application about a successful discovery using the - * @ref BLE_CTS_C_EVT_DISCOVERY_COMPLETE event. The handles for the CTS server is now - * available in the @ref ble_cts_c_evt_t structure. These handles must be assigned to an - * instance of CTS_C, using @ref ble_cts_c_handles_assign. For more information about - * service discovery, see the ble_discovery module documentation @ref lib_ble_db_discovery. - * - * The application can then use the function @ref ble_cts_c_current_time_read to read the - * current time. If the read succeeds, it will trigger either a - * @ref BLE_CTS_C_EVT_CURRENT_TIME event or a @ref BLE_CTS_C_EVT_INVALID_TIME event - * (depending on if the data that was read was actually a valid time), which is then sent - * to the application. The current time is then available in the params field of the - * passed @ref ble_cts_c_evt_t structure. - * - * @note The application must propagate BLE stack events to this module by calling - * ble_cts_c_on_ble_evt() from the @ref softdevice_handler callback function. - */ - -#ifndef BLE_CTS_C_H__ -#define BLE_CTS_C_H__ - -#include "ble_srv_common.h" -#include "ble_gattc.h" -#include "ble.h" -#include "ble_date_time.h" -#include "ble_db_discovery.h" -#include - - -/**@brief "Day Date Time" field of the "Exact Time 256" field of the Current Time Characteristic. */ -typedef struct -{ - ble_date_time_t date_time; - uint8_t day_of_week; -} day_date_time_t; - -/**@brief "Exact Time 256" field of the Current Time Characteristic. */ -typedef struct -{ - day_date_time_t day_date_time; - uint8_t fractions256; -} exact_time_256_t; - -/**@brief "Adjust Reason" field of the Current Time Characteristic. */ -typedef struct -{ - uint8_t manual_time_update : 1; - uint8_t external_reference_time_update : 1; - uint8_t change_of_time_zone : 1; - uint8_t change_of_daylight_savings_time : 1; -} adjust_reason_t; - -/**@brief Data structure for the Current Time Characteristic. */ -typedef struct -{ - exact_time_256_t exact_time_256; - adjust_reason_t adjust_reason; -} current_time_char_t; - -// Forward declaration of the ble_cts_c_t type. -typedef struct ble_cts_c_s ble_cts_c_t; - -/**@brief Current Time Service client event type. */ -typedef enum -{ - BLE_CTS_C_EVT_DISCOVERY_COMPLETE, /**< The Current Time Service was found at the peer. */ - BLE_CTS_C_EVT_DISCOVERY_FAILED, /**< The Current Time Service was not found at the peer. */ - BLE_CTS_C_EVT_DISCONN_COMPLETE, /**< Event indicating that the Current Time Service client module has finished processing the BLE_GAP_EVT_DISCONNECTED event. This event is raised only if a valid instance of the Current Time Service was found at the server. The event can be used by the application to do clean up related to the Current Time Service client.*/ - BLE_CTS_C_EVT_CURRENT_TIME, /**< A new current time reading has been received. */ - BLE_CTS_C_EVT_INVALID_TIME /**< The current time value received from the peer is invalid.*/ -} ble_cts_c_evt_type_t; - -/**@brief Structure containing the handles related to the Heart Rate Service found on the peer. */ -typedef struct -{ - uint16_t cts_handle; /**< Handle of the Current Time characteristic as provided by the SoftDevice. */ - uint16_t cts_cccd_handle; /**< Handle of the CCCD of the Current Time characteristic. */ -} ble_cts_c_handles_t; - -/**@brief Current Time Service client event. */ -typedef struct -{ - ble_cts_c_evt_type_t evt_type; /**< Type of event. */ - uint16_t conn_handle; /**< Connection handle on which the CTS service was discovered on the peer device. This will be filled if the evt_type is @ref BLE_CTS_C_EVT_DISCOVERY_COMPLETE.*/ - union - { - current_time_char_t current_time; /**< Current Time Characteristic data. This will be filled when the evt_type is @ref BLE_CTS_C_EVT_CURRENT_TIME. */ - ble_cts_c_handles_t char_handles; /**< Current Time related handles found on the peer device. This will be filled when the evt_type is @ref BLE_HRS_C_EVT_DISCOVERY_COMPLETE.*/ - } params; -} ble_cts_c_evt_t; - -/**@brief Current Time Service client event handler type. */ -typedef void (* ble_cts_c_evt_handler_t) (ble_cts_c_t * p_cts, ble_cts_c_evt_t * p_evt); - - -/**@brief Current Time Service client structure. This structure contains status information for the client. */ -struct ble_cts_c_s -{ - ble_cts_c_evt_handler_t evt_handler; /**< Event handler to be called for handling events from the Current Time Service client. */ - ble_srv_error_handler_t error_handler; /**< Function to be called if an error occurs. */ - ble_cts_c_handles_t char_handles; /**< Handles of Current Time Characteristic at the peer (handles are provided by the BLE stack through the DB Discovery module). */ - uint16_t conn_handle; /**< Handle of the current connection. BLE_CONN_HANDLE_INVALID if not in a connection. */ -}; - -/**@brief Current Time Service client init structure. This structure contains all options and data needed for initialization of the client.*/ -typedef struct -{ - ble_cts_c_evt_handler_t evt_handler; /**< Event handler to be called for handling events from the Current Time Service client. */ - ble_srv_error_handler_t error_handler; /**< Function to be called if an error occurs. */ -} ble_cts_c_init_t; - - -/**@brief Function for initializing the Current Time Service client. - * - * @details This function must be used by the application to initialize the Current Time Service client. - * - * @param[out] p_cts Current Time Service client structure. This structure must - * be supplied by the application. It is initialized by this - * function and can later be used to identify this particular client - * instance. - * @param[in] p_cts_init Information needed to initialize the Current Time Service client. - * - * @retval NRF_SUCCESS If the service was initialized successfully. - */ -uint32_t ble_cts_c_init(ble_cts_c_t * p_cts, const ble_cts_c_init_t * p_cts_init); - - -/**@brief Function for handling events from the database discovery module. - * - * @details This function will handle an event from the database discovery module, and determine - * if it relates to the discovery of CTS at the peer. If so, it will - * call the application's event handler indicating that CTS has been - * discovered. It also populates the event with the service related - * information before providing it to the application. - * - * @param[in] p_cts Pointer to the CTS client structure. - * @param[in] p_evt Pointer to the event received from the database discovery module. - */ - void ble_cts_c_on_db_disc_evt(ble_cts_c_t * p_cts, ble_db_discovery_evt_t * p_evt); - - -/**@brief Function for handling the application's BLE stack events. - * - * @details This function handles all events from the BLE stack that are of interest to the - * Current Time Service client. This is a callback function that must be dispatched - * from main application context. - * - * @param[in] p_cts Current Time Service client structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -void ble_cts_c_on_ble_evt(ble_cts_c_t * p_cts, const ble_evt_t * p_ble_evt); - - -/**@brief Function for checking whether the peer's Current Time Service instance and the Current Time - * Characteristic have been discovered. - * - * @param[in] p_cts Current Time Service client structure. - */ -static __INLINE bool ble_cts_c_is_cts_discovered(const ble_cts_c_t * p_cts) -{ - return (p_cts->char_handles.cts_handle != BLE_GATT_HANDLE_INVALID); -} - - -/**@brief Function for reading the peer's Current Time Service Current Time Characteristic. - * - * @param[in] p_cts Current Time Service client structure. - * - * @retval NRF_SUCCESS If the operation is successful. Otherwise, an error code is returned. - */ -uint32_t ble_cts_c_current_time_read(ble_cts_c_t const * p_cts); - - -/**@brief Function for assigning handles to a this instance of cts_c. - * - * @details Call this function when a link has been established with a peer to - * associate the link to this instance of the module. This makes it - * possible to handle several links and associate each link to a particular - * instance of this module. The connection handle and attribute handles will be - * provided from the discovery event @ref BLE_CTS_C_EVT_DISCOVERY_COMPLETE. - * - * @param[in] p_cts Pointer to the CTS client structure instance to associate. - * @param[in] conn_handle Connection handle to associated with the given CTS instance. - * @param[in] p_peer_handles Attribute handles for the CTS server you want this CTS client to - * interact with. - * - * @retval NRF_SUCCESS If the operation was successful. - * @retval NRF_ERROR_NULL If a p_cts was a NULL pointer. - */ -uint32_t ble_cts_c_handles_assign(ble_cts_c_t * p_cts, - const uint16_t conn_handle, - const ble_cts_c_handles_t * p_peer_handles); - -#endif // BLE_CTS_C_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dis/ble_dis.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dis/ble_dis.c deleted file mode 100644 index 72abc58784..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dis/ble_dis.c +++ /dev/null @@ -1,277 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/* Attention! -* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile -* qualification listings, this section of source code must not be modified. -*/ - -#include "ble_dis.h" - -#include -#include -#include "app_error.h" -#include "ble_gatts.h" -#include "nordic_common.h" -#include "ble_srv_common.h" -#include "app_util.h" - - -#define BLE_DIS_SYS_ID_LEN 8 /**< Length of System ID Characteristic Value. */ -#define BLE_DIS_PNP_ID_LEN 7 /**< Length of Pnp ID Characteristic Value. */ - -static uint16_t service_handle; -static ble_gatts_char_handles_t manufact_name_handles; -static ble_gatts_char_handles_t model_num_handles; -static ble_gatts_char_handles_t serial_num_handles; -static ble_gatts_char_handles_t hw_rev_handles; -static ble_gatts_char_handles_t fw_rev_handles; -static ble_gatts_char_handles_t sw_rev_handles; -static ble_gatts_char_handles_t sys_id_handles; -static ble_gatts_char_handles_t reg_cert_data_list_handles; -static ble_gatts_char_handles_t pnp_id_handles; - - -/**@brief Function for encoding a System ID. - * - * @param[out] p_encoded_buffer Buffer where the encoded data will be written. - * @param[in] p_sys_id System ID to be encoded. - */ -static void sys_id_encode(uint8_t * p_encoded_buffer, const ble_dis_sys_id_t * p_sys_id) -{ - APP_ERROR_CHECK_BOOL(p_sys_id != NULL); - APP_ERROR_CHECK_BOOL(p_encoded_buffer != NULL); - - p_encoded_buffer[0] = (p_sys_id->manufacturer_id & 0x00000000FF); - p_encoded_buffer[1] = (p_sys_id->manufacturer_id & 0x000000FF00) >> 8; - p_encoded_buffer[2] = (p_sys_id->manufacturer_id & 0x0000FF0000) >> 16; - p_encoded_buffer[3] = (p_sys_id->manufacturer_id & 0x00FF000000) >> 24; - p_encoded_buffer[4] = (p_sys_id->manufacturer_id & 0xFF00000000) >> 32; - - p_encoded_buffer[5] = (p_sys_id->organizationally_unique_id & 0x0000FF); - p_encoded_buffer[6] = (p_sys_id->organizationally_unique_id & 0x00FF00) >> 8; - p_encoded_buffer[7] = (p_sys_id->organizationally_unique_id & 0xFF0000) >> 16; -} - - -/**@brief Function for encoding a PnP ID. - * - * @param[out] p_encoded_buffer Buffer where the encoded data will be written. - * @param[in] p_pnp_id PnP ID to be encoded. - */ -static void pnp_id_encode(uint8_t * p_encoded_buffer, const ble_dis_pnp_id_t * p_pnp_id) -{ - uint8_t len = 0; - - APP_ERROR_CHECK_BOOL(p_pnp_id != NULL); - APP_ERROR_CHECK_BOOL(p_encoded_buffer != NULL); - - p_encoded_buffer[len++] = p_pnp_id->vendor_id_source; - - len += uint16_encode(p_pnp_id->vendor_id, &p_encoded_buffer[len]); - len += uint16_encode(p_pnp_id->product_id, &p_encoded_buffer[len]); - len += uint16_encode(p_pnp_id->product_version, &p_encoded_buffer[len]); - - APP_ERROR_CHECK_BOOL(len == BLE_DIS_PNP_ID_LEN); -} - - -/**@brief Function for adding the Characteristic. - * - * @param[in] uuid UUID of characteristic to be added. - * @param[in] p_char_value Initial value of characteristic to be added. - * @param[in] char_len Length of initial value. This will also be the maximum value. - * @param[in] dis_attr_md Security settings of characteristic to be added. - * @param[out] p_handles Handles of new characteristic. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t char_add(uint16_t uuid, - uint8_t * p_char_value, - uint16_t char_len, - const ble_srv_security_mode_t * dis_attr_md, - ble_gatts_char_handles_t * p_handles) -{ - ble_uuid_t ble_uuid; - ble_gatts_char_md_t char_md; - ble_gatts_attr_t attr_char_value; - ble_gatts_attr_md_t attr_md; - - APP_ERROR_CHECK_BOOL(p_char_value != NULL); - APP_ERROR_CHECK_BOOL(char_len > 0); - - // The ble_gatts_char_md_t structure uses bit fields. So we reset the memory to zero. - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.read = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = NULL; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, uuid); - - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.read_perm = dis_attr_md->read_perm; - attr_md.write_perm = dis_attr_md->write_perm; - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = char_len; - attr_char_value.init_offs = 0; - attr_char_value.max_len = char_len; - attr_char_value.p_value = p_char_value; - - return sd_ble_gatts_characteristic_add(service_handle, &char_md, &attr_char_value, p_handles); -} - - -uint32_t ble_dis_init(const ble_dis_init_t * p_dis_init) -{ - uint32_t err_code; - ble_uuid_t ble_uuid; - - // Add service - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_DEVICE_INFORMATION_SERVICE); - - err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &ble_uuid, &service_handle); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add characteristics - if (p_dis_init->manufact_name_str.length > 0) - { - err_code = char_add(BLE_UUID_MANUFACTURER_NAME_STRING_CHAR, - p_dis_init->manufact_name_str.p_str, - p_dis_init->manufact_name_str.length, - &p_dis_init->dis_attr_md, - &manufact_name_handles); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - if (p_dis_init->model_num_str.length > 0) - { - err_code = char_add(BLE_UUID_MODEL_NUMBER_STRING_CHAR, - p_dis_init->model_num_str.p_str, - p_dis_init->model_num_str.length, - &p_dis_init->dis_attr_md, - &model_num_handles); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - if (p_dis_init->serial_num_str.length > 0) - { - err_code = char_add(BLE_UUID_SERIAL_NUMBER_STRING_CHAR, - p_dis_init->serial_num_str.p_str, - p_dis_init->serial_num_str.length, - &p_dis_init->dis_attr_md, - &serial_num_handles); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - if (p_dis_init->hw_rev_str.length > 0) - { - err_code = char_add(BLE_UUID_HARDWARE_REVISION_STRING_CHAR, - p_dis_init->hw_rev_str.p_str, - p_dis_init->hw_rev_str.length, - &p_dis_init->dis_attr_md, - &hw_rev_handles); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - if (p_dis_init->fw_rev_str.length > 0) - { - err_code = char_add(BLE_UUID_FIRMWARE_REVISION_STRING_CHAR, - p_dis_init->fw_rev_str.p_str, - p_dis_init->fw_rev_str.length, - &p_dis_init->dis_attr_md, - &fw_rev_handles); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - if (p_dis_init->sw_rev_str.length > 0) - { - err_code = char_add(BLE_UUID_SOFTWARE_REVISION_STRING_CHAR, - p_dis_init->sw_rev_str.p_str, - p_dis_init->sw_rev_str.length, - &p_dis_init->dis_attr_md, - &sw_rev_handles); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - if (p_dis_init->p_sys_id != NULL) - { - uint8_t encoded_sys_id[BLE_DIS_SYS_ID_LEN]; - - sys_id_encode(encoded_sys_id, p_dis_init->p_sys_id); - err_code = char_add(BLE_UUID_SYSTEM_ID_CHAR, - encoded_sys_id, - BLE_DIS_SYS_ID_LEN, - &p_dis_init->dis_attr_md, - &sys_id_handles); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - if (p_dis_init->p_reg_cert_data_list != NULL) - { - err_code = char_add(BLE_UUID_IEEE_REGULATORY_CERTIFICATION_DATA_LIST_CHAR, - p_dis_init->p_reg_cert_data_list->p_list, - p_dis_init->p_reg_cert_data_list->list_len, - &p_dis_init->dis_attr_md, - ®_cert_data_list_handles); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - if (p_dis_init->p_pnp_id != NULL) - { - uint8_t encoded_pnp_id[BLE_DIS_PNP_ID_LEN]; - - pnp_id_encode(encoded_pnp_id, p_dis_init->p_pnp_id); - err_code = char_add(BLE_UUID_PNP_ID_CHAR, - encoded_pnp_id, - BLE_DIS_PNP_ID_LEN, - &p_dis_init->dis_attr_md, - &pnp_id_handles); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - - return NRF_SUCCESS; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dis/ble_dis.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dis/ble_dis.h deleted file mode 100644 index 603c611123..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dis/ble_dis.h +++ /dev/null @@ -1,98 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/** @file - * - * @defgroup ble_sdk_srv_dis Device Information Service - * @{ - * @ingroup ble_sdk_srv - * @brief Device Information Service module. - * - * @details This module implements the Device Information Service. - * During initialization it adds the Device Information Service to the BLE stack database. - * It then encodes the supplied information, and adds the curresponding characteristics. - * - * @note Attention! - * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile - * qualification listings, this section of source code must not be modified. - */ - -#ifndef BLE_DIS_H__ -#define BLE_DIS_H__ - -#include -#include "ble_srv_common.h" - -/** @defgroup DIS_VENDOR_ID_SRC_VALUES Vendor ID Source values - * @{ - */ -#define BLE_DIS_VENDOR_ID_SRC_BLUETOOTH_SIG 1 /**< Vendor ID assigned by Bluetooth SIG. */ -#define BLE_DIS_VENDOR_ID_SRC_USB_IMPL_FORUM 2 /**< Vendor ID assigned by USB Implementer's Forum. */ -/** @} */ - -/**@brief System ID parameters */ -typedef struct -{ - uint64_t manufacturer_id; /**< Manufacturer ID. Only 5 LSOs shall be used. */ - uint32_t organizationally_unique_id; /**< Organizationally unique ID. Only 3 LSOs shall be used. */ -} ble_dis_sys_id_t; - -/**@brief IEEE 11073-20601 Regulatory Certification Data List Structure */ -typedef struct -{ - uint8_t * p_list; /**< Pointer the byte array containing the encoded opaque structure based on IEEE 11073-20601 specification. */ - uint8_t list_len; /**< Length of the byte array. */ -} ble_dis_reg_cert_data_list_t; - -/**@brief PnP ID parameters */ -typedef struct -{ - uint8_t vendor_id_source; /**< Vendor ID Source. see @ref DIS_VENDOR_ID_SRC_VALUES. */ - uint16_t vendor_id; /**< Vendor ID. */ - uint16_t product_id; /**< Product ID. */ - uint16_t product_version; /**< Product Version. */ -} ble_dis_pnp_id_t; - -/**@brief Device Information Service init structure. This contains all possible characteristics - * needed for initialization of the service. - */ -typedef struct -{ - ble_srv_utf8_str_t manufact_name_str; /**< Manufacturer Name String. */ - ble_srv_utf8_str_t model_num_str; /**< Model Number String. */ - ble_srv_utf8_str_t serial_num_str; /**< Serial Number String. */ - ble_srv_utf8_str_t hw_rev_str; /**< Hardware Revision String. */ - ble_srv_utf8_str_t fw_rev_str; /**< Firmware Revision String. */ - ble_srv_utf8_str_t sw_rev_str; /**< Software Revision String. */ - ble_dis_sys_id_t * p_sys_id; /**< System ID. */ - ble_dis_reg_cert_data_list_t * p_reg_cert_data_list; /**< IEEE 11073-20601 Regulatory Certification Data List. */ - ble_dis_pnp_id_t * p_pnp_id; /**< PnP ID. */ - ble_srv_security_mode_t dis_attr_md; /**< Initial Security Setting for Device Information Characteristics. */ -} ble_dis_init_t; - -/**@brief Function for initializing the Device Information Service. - * - * @details This call allows the application to initialize the device information service. - * It adds the DIS service and DIS characteristics to the database, using the initial - * values supplied through the p_dis_init parameter. Characteristics which are not to be - * added, shall be set to NULL in p_dis_init. - * - * @param[in] p_dis_init The structure containing the values of characteristics needed by the - * service. - * - * @return NRF_SUCCESS on successful initialization of service. - */ -uint32_t ble_dis_init(const ble_dis_init_t * p_dis_init); - -#endif // BLE_DIS_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls.c deleted file mode 100644 index e3b3b68abe..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls.c +++ /dev/null @@ -1,1273 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - */ - -/* Attention! -* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile -* qualification listings, this section of source code must not be modified. -*/ - -#include "ble_gls.h" -#include -#include "ble_srv_common.h" -#include "ble_racp.h" -#include "ble_gls_db.h" - - -#define OPERAND_FILTER_TYPE_SEQ_NUM 0x01 /**< Filter data using Sequence Number criteria. */ -#define OPERAND_FILTER_TYPE_FACING_TIME 0x02 /**< Filter data using User Facing Time criteria. */ -#define OPERAND_FILTER_TYPE_RFU_START 0x07 /**< Start of filter types reserved For Future Use range */ -#define OPERAND_FILTER_TYPE_RFU_END 0xFF /**< End of filter types reserved For Future Use range */ - -#define OPCODE_LENGTH 1 /**< Length of opcode inside Glucose Measurement packet. */ -#define HANDLE_LENGTH 2 /**< Length of handle inside Glucose Measurement packet. */ -#define MAX_GLM_LEN (BLE_L2CAP_MTU_DEF - OPCODE_LENGTH - HANDLE_LENGTH) /**< Maximum size of a transmitted Glucose Measurement. */ - -#define GLS_NACK_PROC_ALREADY_IN_PROGRESS BLE_GATT_STATUS_ATTERR_APP_BEGIN + 0 /**< Reply when a requested procedure is already in progress. */ -#define GLS_NACK_CCCD_IMPROPERLY_CONFIGURED BLE_GATT_STATUS_ATTERR_APP_BEGIN + 1 /**< Reply when the a s CCCD is improperly configured. */ - -/**@brief Glucose Service communication state. */ -typedef enum -{ - STATE_NO_COMM, /**< The service is not in a communicating state. */ - STATE_RACP_PROC_ACTIVE, /**< Processing requested data. */ - STATE_RACP_RESPONSE_PENDING, /**< There is a RACP indication waiting to be sent. */ - STATE_RACP_RESPONSE_IND_VERIF /**< Waiting for a verification of a RACP indication. */ -} gls_state_t; - -static gls_state_t m_gls_state; /**< Current communication state. */ -static uint16_t m_next_seq_num; /**< Sequence number of the next database record. */ -static uint8_t m_racp_proc_operator; /**< Operator of current request. */ -static uint16_t m_racp_proc_seq_num; /**< Sequence number of current request. */ -static uint8_t m_racp_proc_record_ndx; /**< Current record index. */ -static uint8_t m_racp_proc_records_reported; /**< Number of reported records. */ -static uint8_t m_racp_proc_records_reported_since_txcomplete; /**< Number of reported records since last TX_COMPLETE event. */ -static ble_racp_value_t m_pending_racp_response; /**< RACP response to be sent. */ -static uint8_t m_pending_racp_response_operand[2]; /**< Operand of RACP response to be sent. */ - - -/**@brief Function for setting the GLS communication state. - * - * @param[in] new_state New communication state. - */ -static void state_set(gls_state_t new_state) -{ - m_gls_state = new_state; -} - - -/**@brief Function for setting the next sequence number by reading the last record in the data base. - * - * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. - */ -static uint32_t next_sequence_number_set(void) -{ - uint16_t num_records; - ble_gls_rec_t rec; - - num_records = ble_gls_db_num_records_get(); - if (num_records > 0) - { - // Get last record - uint32_t err_code = ble_gls_db_record_get(num_records - 1, &rec); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - m_next_seq_num = rec.meas.sequence_number + 1; - } - else - { - m_next_seq_num = 0; - } - - return NRF_SUCCESS; -} - - -/**@brief Function for encoding a Glucose measurement. - * - * @param[in] p_meas Measurement to be encoded. - * @param[out] p_encoded_buffer Pointer to buffer where the encoded measurement is to be stored. - * - * @return Size of encoded measurement. - */ -static uint8_t gls_meas_encode(const ble_gls_meas_t * p_meas, uint8_t * p_encoded_buffer) -{ - uint8_t len = 0; - - p_encoded_buffer[len++] = p_meas->flags; - - len += uint16_encode(p_meas->sequence_number, &p_encoded_buffer[len]); - len += ble_date_time_encode(&p_meas->base_time, &p_encoded_buffer[len]); - - if (p_meas->flags & BLE_GLS_MEAS_FLAG_TIME_OFFSET) - { - len += uint16_encode(p_meas->time_offset, &p_encoded_buffer[len]); - } - - if (p_meas->flags & BLE_GLS_MEAS_FLAG_CONC_TYPE_LOC) - { - uint16_t encoded_concentration; - - encoded_concentration = ((p_meas->glucose_concentration.exponent << 12) & 0xF000) | - ((p_meas->glucose_concentration.mantissa << 0) & 0x0FFF); - - p_encoded_buffer[len++] = (uint8_t)(encoded_concentration); - p_encoded_buffer[len++] = (uint8_t)(encoded_concentration >> 8); - p_encoded_buffer[len++] = (p_meas->sample_location << 4) | (p_meas->type & 0x0F); - } - - if (p_meas->flags & BLE_GLS_MEAS_FLAG_SENSOR_STATUS) - { - len += uint16_encode(p_meas->sensor_status_annunciation, &p_encoded_buffer[len]); - } - - return len; -} - - -/**@brief Function for adding the characteristic for a glucose measurement. - * - * @param[in] p_gls Service instance. - * - * @return NRF_SUCCESS if characteristic was successfully added, otherwise an error code. - */ -static uint32_t glucose_measurement_char_add(ble_gls_t * p_gls) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_md_t cccd_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - ble_gls_rec_t initial_gls_rec_value; - uint8_t encoded_gls_meas[MAX_GLM_LEN]; - uint8_t num_recs; - memset(&cccd_md, 0, sizeof(cccd_md)); - - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); - BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&cccd_md.write_perm); - cccd_md.vloc = BLE_GATTS_VLOC_STACK; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.notify = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = &cccd_md; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_GLUCOSE_MEASUREMENT_CHAR); - memset(&attr_md, 0, sizeof(attr_md)); - - BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.read_perm); - BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.write_perm); - - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 1; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - memset(&initial_gls_rec_value, 0, sizeof(initial_gls_rec_value)); - - num_recs = ble_gls_db_num_records_get(); - if (num_recs > 0) - { - uint32_t err_code = ble_gls_db_record_get(num_recs - 1, &initial_gls_rec_value); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = gls_meas_encode(&initial_gls_rec_value.meas, encoded_gls_meas); - attr_char_value.init_offs = 0; - attr_char_value.max_len = MAX_GLM_LEN; - attr_char_value.p_value = encoded_gls_meas; - - return sd_ble_gatts_characteristic_add(p_gls->service_handle, - &char_md, - &attr_char_value, - &p_gls->glm_handles); -} - - -/**@brief Function for adding the characteristic for a glucose feature. - * - * @param[in] p_gls Service instance. - * - * @return NRF_SUCCESS if characteristic was successfully added, otherwise an error code. - */ -static uint32_t glucose_feature_char_add(ble_gls_t * p_gls) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - uint8_t encoded_initial_feature[2]; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.read = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = NULL; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_GLUCOSE_FEATURE_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&attr_md.read_perm); - BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.write_perm); - - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - encoded_initial_feature[0] = (uint8_t)(p_gls->feature); - encoded_initial_feature[1] = (uint8_t)((p_gls->feature) >> 8); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = sizeof (uint16_t); - attr_char_value.init_offs = 0; - attr_char_value.max_len = sizeof (uint16_t); - attr_char_value.p_value = encoded_initial_feature; - - return sd_ble_gatts_characteristic_add(p_gls->service_handle, - &char_md, - &attr_char_value, - &p_gls->glf_handles); -} - - -/**@brief Function for adding the characteristic for a record access control point. - * - * @param[in] p_gls Service instance. - * - * @return NRF_SUCCESS if characteristic was successfully added, otherwise an error code. - */ -static uint32_t record_access_control_point_char_add(ble_gls_t * p_gls) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_md_t cccd_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - - memset(&cccd_md, 0, sizeof(cccd_md)); - - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); - BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&cccd_md.write_perm); - cccd_md.vloc = BLE_GATTS_VLOC_STACK; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.indicate = 1; - char_md.char_props.write = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = &cccd_md; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_RECORD_ACCESS_CONTROL_POINT_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.read_perm); - BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&attr_md.write_perm); - - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 1; - attr_md.vlen = 1; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = 0; - attr_char_value.init_offs = 0; - attr_char_value.max_len = BLE_L2CAP_MTU_DEF; - attr_char_value.p_value = 0; - - return sd_ble_gatts_characteristic_add(p_gls->service_handle, - &char_md, - &attr_char_value, - &p_gls->racp_handles); -} - - -uint32_t ble_gls_init(ble_gls_t * p_gls, const ble_gls_init_t * p_gls_init) -{ - uint32_t err_code; - ble_uuid_t ble_uuid; - - // Initialize data base - err_code = ble_gls_db_init(); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - err_code = next_sequence_number_set(); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Initialize service structure - p_gls->evt_handler = p_gls_init->evt_handler; - p_gls->error_handler = p_gls_init->error_handler; - p_gls->feature = p_gls_init->feature; - p_gls->is_context_supported = p_gls_init->is_context_supported; - p_gls->conn_handle = BLE_CONN_HANDLE_INVALID; - - - // Initialize global variables - state_set(STATE_NO_COMM); - m_racp_proc_records_reported_since_txcomplete = 0; - - // Add service - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_GLUCOSE_SERVICE); - - err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &ble_uuid, &p_gls->service_handle); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add glucose measurement characteristic - err_code = glucose_measurement_char_add(p_gls); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add glucose measurement feature characteristic - err_code = glucose_feature_char_add(p_gls); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add record control access point characteristic - err_code = record_access_control_point_char_add(p_gls); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - return NRF_SUCCESS; -} - - -/**@brief Function for sending a response from the Record Access Control Point. - * - * @param[in] p_gls Service instance. - * @param[in] p_racp_val RACP value to be sent. - */ -static void racp_send(ble_gls_t * p_gls, ble_racp_value_t * p_racp_val) -{ - uint32_t err_code; - uint8_t encoded_resp[25]; - uint8_t len; - uint16_t hvx_len; - ble_gatts_hvx_params_t hvx_params; - - if ( - (m_gls_state != STATE_RACP_RESPONSE_PENDING) - && - (m_racp_proc_records_reported_since_txcomplete > 0) - ) - { - state_set(STATE_RACP_RESPONSE_PENDING); - return; - } - - // Send indication - len = ble_racp_encode(p_racp_val, encoded_resp); - hvx_len = len; - - memset(&hvx_params, 0, sizeof(hvx_params)); - - hvx_params.handle = p_gls->racp_handles.value_handle; - hvx_params.type = BLE_GATT_HVX_INDICATION; - hvx_params.offset = 0; - hvx_params.p_len = &hvx_len; - hvx_params.p_data = encoded_resp; - - err_code = sd_ble_gatts_hvx(p_gls->conn_handle, &hvx_params); - - // Error handling - if ((err_code == NRF_SUCCESS) && (hvx_len != len)) - { - err_code = NRF_ERROR_DATA_SIZE; - } - switch (err_code) - { - case NRF_SUCCESS: - // Wait for HVC event - state_set(STATE_RACP_RESPONSE_IND_VERIF); - break; - - case BLE_ERROR_NO_TX_PACKETS: - // Wait for TX_COMPLETE event to retry transmission - state_set(STATE_RACP_RESPONSE_PENDING); - break; - - case NRF_ERROR_INVALID_STATE: - // Make sure state machine returns to the default state - state_set(STATE_NO_COMM); - break; - - default: - // Report error to application - if (p_gls->error_handler != NULL) - { - p_gls->error_handler(err_code); - } - - // Make sure state machine returns to the default state - state_set(STATE_NO_COMM); - break; - } -} - - -/**@brief Function for sending a RACP response containing a Response Code Op Code and a Response Code Value. - * - * @param[in] p_gls Service instance. - * @param[in] opcode RACP Op Code. - * @param[in] value RACP Response Code Value. - */ -static void racp_response_code_send(ble_gls_t * p_gls, uint8_t opcode, uint8_t value) -{ - m_pending_racp_response.opcode = RACP_OPCODE_RESPONSE_CODE; - m_pending_racp_response.operator = RACP_OPERATOR_NULL; - m_pending_racp_response.operand_len = 2; - m_pending_racp_response.p_operand = m_pending_racp_response_operand; - - m_pending_racp_response_operand[0] = opcode; - m_pending_racp_response_operand[1] = value; - - racp_send(p_gls, &m_pending_racp_response); -} - - -/**@brief Function for sending a glucose measurement/context. - * - * @param[in] p_gls Service instance. - * @param[in] p_rec Measurement to be sent. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t glucose_meas_send(ble_gls_t * p_gls, ble_gls_rec_t * p_rec) -{ - uint32_t err_code; - uint8_t encoded_glm[MAX_GLM_LEN]; - uint16_t len; - uint16_t hvx_len; - ble_gatts_hvx_params_t hvx_params; - - len = gls_meas_encode(&p_rec->meas, encoded_glm); - hvx_len = len; - - memset(&hvx_params, 0, sizeof (hvx_params)); - - hvx_params.handle = p_gls->glm_handles.value_handle; - hvx_params.type = BLE_GATT_HVX_NOTIFICATION; - hvx_params.offset = 0; - hvx_params.p_len = &hvx_len; - hvx_params.p_data = encoded_glm; - - err_code = sd_ble_gatts_hvx(p_gls->conn_handle, &hvx_params); - if (err_code == NRF_SUCCESS) - { - if (hvx_len != len) - { - err_code = NRF_ERROR_DATA_SIZE; - } - else - { - // Measurement successfully sent - m_racp_proc_records_reported++; - m_racp_proc_records_reported_since_txcomplete++; - } - } - - return err_code; -} - - -/**@brief Function for responding to the ALL operation. - * - * @param[in] p_gls Service instance. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t racp_report_records_all(ble_gls_t * p_gls) -{ - uint16_t total_records = ble_gls_db_num_records_get(); - - if (m_racp_proc_record_ndx >= total_records) - { - state_set(STATE_NO_COMM); - } - else - { - uint32_t err_code; - ble_gls_rec_t rec; - - err_code = ble_gls_db_record_get(m_racp_proc_record_ndx, &rec); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - err_code = glucose_meas_send(p_gls, &rec); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - - return NRF_SUCCESS; -} - - -/**@brief Function for responding to the FIRST or the LAST operation. - * - * @param[in] p_gls Service instance. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t racp_report_records_first_last(ble_gls_t * p_gls) -{ - uint32_t err_code; - ble_gls_rec_t rec; - uint16_t total_records; - - total_records = ble_gls_db_num_records_get(); - - if ((m_racp_proc_records_reported != 0) || (total_records == 0)) - { - state_set(STATE_NO_COMM); - } - else - { - if (m_racp_proc_operator == RACP_OPERATOR_FIRST) - { - err_code = ble_gls_db_record_get(0, &rec); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - else if (m_racp_proc_operator == RACP_OPERATOR_LAST) - { - err_code = ble_gls_db_record_get(total_records - 1, &rec); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - - err_code = glucose_meas_send(p_gls, &rec); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - - return NRF_SUCCESS; -} - - -/**@brief Function for responding to the GREATER_OR_EQUAL operation. - * - * @param[in] p_gls Service instance. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t racp_report_records_greater_or_equal(ble_gls_t * p_gls) -{ - uint16_t total_records = ble_gls_db_num_records_get(); - - while (m_racp_proc_record_ndx < total_records) - { - uint32_t err_code; - ble_gls_rec_t rec; - - err_code = ble_gls_db_record_get(m_racp_proc_record_ndx, &rec); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - if (rec.meas.sequence_number >= m_racp_proc_seq_num) - { - err_code = glucose_meas_send(p_gls, &rec); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - break; - } - m_racp_proc_record_ndx++; - } - if (m_racp_proc_record_ndx == total_records) - { - state_set(STATE_NO_COMM); - } - - return NRF_SUCCESS; -} - - -/**@brief Function for informing that the REPORT RECORDS procedure is completed. - * - * @param[in] p_gls Service instance. - */ -static void racp_report_records_completed(ble_gls_t * p_gls) -{ - uint8_t resp_code_value; - - if (m_racp_proc_records_reported > 0) - { - resp_code_value = RACP_RESPONSE_SUCCESS; - } - else - { - resp_code_value = RACP_RESPONSE_NO_RECORDS_FOUND; - } - - racp_response_code_send(p_gls, RACP_OPCODE_REPORT_RECS, resp_code_value); -} - - -/**@brief Function for the RACP report records procedure. - * - * @param[in] p_gls Service instance. - */ -static void racp_report_records_procedure(ble_gls_t * p_gls) -{ - uint32_t err_code; - - while (m_gls_state == STATE_RACP_PROC_ACTIVE) - { - // Execute requested procedure - switch (m_racp_proc_operator) - { - case RACP_OPERATOR_ALL: - err_code = racp_report_records_all(p_gls); - break; - - case RACP_OPERATOR_FIRST: - case RACP_OPERATOR_LAST: - err_code = racp_report_records_first_last(p_gls); - break; - - case RACP_OPERATOR_GREATER_OR_EQUAL: - err_code = racp_report_records_greater_or_equal(p_gls); - break; - - default: - // Report error to application - if (p_gls->error_handler != NULL) - { - p_gls->error_handler(NRF_ERROR_INTERNAL); - } - - // Make sure state machine returns to the default state - state_set(STATE_NO_COMM); - return; - } - - // Error handling - switch (err_code) - { - case NRF_SUCCESS: - if (m_gls_state == STATE_RACP_PROC_ACTIVE) - { - m_racp_proc_record_ndx++; - } - else - { - racp_report_records_completed(p_gls); - } - break; - - case BLE_ERROR_NO_TX_PACKETS: - // Wait for TX_COMPLETE event to resume transmission - return; - - case NRF_ERROR_INVALID_STATE: - // Notification is probably not enabled. Ignore request. - state_set(STATE_NO_COMM); - return; - - default: - // Report error to application - if (p_gls->error_handler != NULL) - { - p_gls->error_handler(err_code); - } - - // Make sure state machine returns to the default state - state_set(STATE_NO_COMM); - return; - } - } -} - - -/**@brief Function for testing if the received request is to be executed. - * - * @param[in] p_racp_request Request to be checked. - * @param[out] p_response_code Response code to be sent in case the request is rejected. - * RACP_RESPONSE_RESERVED is returned if the received message is - * to be rejected without sending a response. - * - * @return TRUE if the request is to be executed, FALSE if it is to be rejected. - * If it is to be rejected, p_response_code will contain the response code to be - * returned to the central. - */ -static bool is_request_to_be_executed(const ble_racp_value_t * p_racp_request, - uint8_t * p_response_code) -{ - *p_response_code = RACP_RESPONSE_RESERVED; - - if (p_racp_request->opcode == RACP_OPCODE_ABORT_OPERATION) - { - if (m_gls_state == STATE_RACP_PROC_ACTIVE) - { - if (p_racp_request->operator != RACP_OPERATOR_NULL) - { - *p_response_code = RACP_RESPONSE_INVALID_OPERATOR; - } - else if (p_racp_request->operand_len != 0) - { - *p_response_code = RACP_RESPONSE_INVALID_OPERAND; - } - else - { - *p_response_code = RACP_RESPONSE_SUCCESS; - } - } - else - { - *p_response_code = RACP_RESPONSE_ABORT_FAILED; - } - } - else if (m_gls_state != STATE_NO_COMM) - { - return false; - } - // Supported opcodes. - else if ((p_racp_request->opcode == RACP_OPCODE_REPORT_RECS) || - (p_racp_request->opcode == RACP_OPCODE_REPORT_NUM_RECS)) - { - switch (p_racp_request->operator) - { - // Operators WITHOUT a filter. - case RACP_OPERATOR_ALL: - case RACP_OPERATOR_FIRST: - case RACP_OPERATOR_LAST: - if (p_racp_request->operand_len != 0) - { - *p_response_code = RACP_RESPONSE_INVALID_OPERAND; - } - break; - - // Operators WITH a filter. - case RACP_OPERATOR_GREATER_OR_EQUAL: - if (p_racp_request->p_operand[0] == OPERAND_FILTER_TYPE_SEQ_NUM) - { - if (p_racp_request->operand_len != 3) - { - *p_response_code = RACP_RESPONSE_INVALID_OPERAND; - } - } - else if (p_racp_request->p_operand[0] == OPERAND_FILTER_TYPE_FACING_TIME) - { - *p_response_code = RACP_RESPONSE_OPERAND_UNSUPPORTED; - } - else if (p_racp_request->p_operand[0] >= OPERAND_FILTER_TYPE_RFU_START) - { - *p_response_code = RACP_RESPONSE_OPERAND_UNSUPPORTED; - } - else - { - *p_response_code = RACP_RESPONSE_INVALID_OPERAND; - } - break; - - // Unsupported operators. - case RACP_OPERATOR_LESS_OR_EQUAL: - case RACP_OPERATOR_RANGE: - *p_response_code = RACP_RESPONSE_OPERATOR_UNSUPPORTED; - break; - - // Invalid operators. - case RACP_OPERATOR_NULL: - default: - if (p_racp_request->operator >= RACP_OPERATOR_RFU_START) - { - *p_response_code = RACP_RESPONSE_OPERATOR_UNSUPPORTED; - } - else - { - *p_response_code = RACP_RESPONSE_INVALID_OPERATOR; - } - break; - } - } - // Unsupported opcodes, - else if (p_racp_request->opcode == RACP_OPCODE_DELETE_RECS) - { - *p_response_code = RACP_RESPONSE_OPCODE_UNSUPPORTED; - } - // Unknown opcodes. - else - { - *p_response_code = RACP_RESPONSE_OPCODE_UNSUPPORTED; - } - - // NOTE: The computation of the return value will change slightly when deferred write has been - // implemented in the stack. - return (*p_response_code == RACP_RESPONSE_RESERVED); -} - - -/**@brief Function for processing a REPORT RECORDS request. - * - * @param[in] p_gls Service instance. - * @param[in] p_racp_request Request to be executed. - */ -static void report_records_request_execute(ble_gls_t * p_gls, ble_racp_value_t * p_racp_request) -{ - uint16_t seq_num = (p_racp_request->p_operand[2] << 8) | p_racp_request->p_operand[1]; - - state_set(STATE_RACP_PROC_ACTIVE); - - m_racp_proc_record_ndx = 0; - m_racp_proc_operator = p_racp_request->operator; - m_racp_proc_records_reported = 0; - m_racp_proc_seq_num = seq_num; - - racp_report_records_procedure(p_gls); -} - - -/**@brief Function for processing a REPORT NUM RECORDS request. - * - * @param[in] p_gls Service instance. - * @param[in] p_racp_request Request to be executed. - */ -static void report_num_records_request_execute(ble_gls_t * p_gls, ble_racp_value_t * p_racp_request) -{ - uint16_t total_records; - uint16_t num_records; - - total_records = ble_gls_db_num_records_get(); - num_records = 0; - - if (p_racp_request->operator == RACP_OPERATOR_ALL) - { - num_records = total_records; - } - else if (p_racp_request->operator == RACP_OPERATOR_GREATER_OR_EQUAL) - { - uint16_t seq_num; - uint16_t i; - - seq_num = (p_racp_request->p_operand[2] << 8) | p_racp_request->p_operand[1]; - - for (i = 0; i < total_records; i++) - { - uint32_t err_code; - ble_gls_rec_t rec; - - err_code = ble_gls_db_record_get(i, &rec); - if (err_code != NRF_SUCCESS) - { - if (p_gls->error_handler != NULL) - { - p_gls->error_handler(err_code); - } - return; - } - - if (rec.meas.sequence_number >= seq_num) - { - num_records++; - } - } - } - else if ((p_racp_request->operator == RACP_OPERATOR_FIRST) || - (p_racp_request->operator == RACP_OPERATOR_LAST)) - { - if (total_records > 0) - { - num_records = 1; - } - } - - m_pending_racp_response.opcode = RACP_OPCODE_NUM_RECS_RESPONSE; - m_pending_racp_response.operator = RACP_OPERATOR_NULL; - m_pending_racp_response.operand_len = sizeof(uint16_t); - m_pending_racp_response.p_operand = m_pending_racp_response_operand; - - m_pending_racp_response_operand[0] = num_records & 0xFF; - m_pending_racp_response_operand[1] = num_records >> 8; - - racp_send(p_gls, &m_pending_racp_response); -} - - -/**@brief Function for checking if the CCCDs are configured. - * - * @param[in] p_gls Service instance. - * @param[in] p_are_cccd_configured boolean indicating if both cccds are configured - */ -uint32_t ble_gls_are_cccd_configured(ble_gls_t * p_gls, bool * p_are_cccd_configured) -{ - uint32_t err_code; - uint8_t cccd_value_buf[BLE_CCCD_VALUE_LEN]; - bool is_glm_notif_enabled = false; - bool is_racp_indic_enabled = false; - ble_gatts_value_t gatts_value; - - // Initialize value struct. - memset(&gatts_value, 0, sizeof(gatts_value)); - - gatts_value.len = BLE_CCCD_VALUE_LEN; - gatts_value.offset = 0; - gatts_value.p_value = cccd_value_buf; - - err_code = sd_ble_gatts_value_get(p_gls->conn_handle, - p_gls->glm_handles.cccd_handle, - &gatts_value); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - is_glm_notif_enabled = ble_srv_is_notification_enabled(cccd_value_buf); - - err_code = sd_ble_gatts_value_get(p_gls->conn_handle, - p_gls->racp_handles.cccd_handle, - &gatts_value); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - is_racp_indic_enabled = ble_srv_is_indication_enabled(cccd_value_buf); - if (is_racp_indic_enabled & is_glm_notif_enabled) - { - *p_are_cccd_configured = true; - } - else - { - *p_are_cccd_configured = false; - } - return NRF_SUCCESS; -} - - -/**@brief Function for handling a write event to the Record Access Control Point. - * - * @param[in] p_gls Service instance. - * @param[in] p_evt_write WRITE event to be handled. - */ -static void on_racp_value_write(ble_gls_t * p_gls, ble_gatts_evt_write_t * p_evt_write) -{ - ble_racp_value_t racp_request; - uint8_t response_code; - ble_gatts_rw_authorize_reply_params_t auth_reply; - bool are_cccd_configured; - uint32_t err_code; - - auth_reply.type = BLE_GATTS_AUTHORIZE_TYPE_WRITE; - auth_reply.params.write.offset = 0; - auth_reply.params.write.len = 0; - auth_reply.params.write.p_data = NULL; - - err_code = ble_gls_are_cccd_configured(p_gls, &are_cccd_configured); - if (err_code != NRF_SUCCESS) - { - if (p_gls->error_handler != NULL) - { - p_gls->error_handler(err_code); - } - return; - } - - if (!are_cccd_configured) - { - auth_reply.params.write.gatt_status = GLS_NACK_CCCD_IMPROPERLY_CONFIGURED; - err_code = sd_ble_gatts_rw_authorize_reply(p_gls->conn_handle, - &auth_reply); - - if (err_code != NRF_SUCCESS) - { - if (p_gls->error_handler != NULL) - { - p_gls->error_handler(err_code); - } - } - return; - } - - // Decode request. - ble_racp_decode(p_evt_write->len, p_evt_write->data, &racp_request); - - // Check if request is to be executed. - if (is_request_to_be_executed(&racp_request, &response_code)) - { - auth_reply.params.write.gatt_status = BLE_GATT_STATUS_SUCCESS; - auth_reply.params.write.update = 1; - - err_code = sd_ble_gatts_rw_authorize_reply(p_gls->conn_handle, - &auth_reply); - - if (err_code != NRF_SUCCESS) - { - if (p_gls->error_handler != NULL) - { - p_gls->error_handler(err_code); - } - return; - } - // Execute request. - if (racp_request.opcode == RACP_OPCODE_REPORT_RECS) - { - report_records_request_execute(p_gls, &racp_request); - } - else if (racp_request.opcode == RACP_OPCODE_REPORT_NUM_RECS) - { - report_num_records_request_execute(p_gls, &racp_request); - } - } - else if (response_code != RACP_RESPONSE_RESERVED) - { - auth_reply.params.write.gatt_status = BLE_GATT_STATUS_SUCCESS; - auth_reply.params.write.update = 1; - err_code = sd_ble_gatts_rw_authorize_reply(p_gls->conn_handle, - &auth_reply); - - if (err_code != NRF_SUCCESS) - { - if (p_gls->error_handler != NULL) - { - p_gls->error_handler(err_code); - } - return; - } - - // Abort any running procedure. - state_set(STATE_NO_COMM); - - // Respond with error code. - racp_response_code_send(p_gls, racp_request.opcode, response_code); - } - else - { - auth_reply.params.write.gatt_status = GLS_NACK_PROC_ALREADY_IN_PROGRESS; - err_code = sd_ble_gatts_rw_authorize_reply(p_gls->conn_handle, - &auth_reply); - - if (err_code != NRF_SUCCESS) - { - if (p_gls->error_handler != NULL) - { - p_gls->error_handler(err_code); - } - return; - } - } -} - - -/**@brief Function for handling the Glucose measurement CCCD write event. - * - * @param[in] p_gls Service instance. - * @param[in] p_evt_write WRITE event to be handled. - */ -static void on_glm_cccd_write(ble_gls_t * p_gls, ble_gatts_evt_write_t * p_evt_write) -{ - if (p_evt_write->len == 2) - { - // CCCD written, update notification state - ble_gls_evt_t evt; - - if (ble_srv_is_notification_enabled(p_evt_write->data)) - { - evt.evt_type = BLE_GLS_EVT_NOTIFICATION_ENABLED; - } - else - { - evt.evt_type = BLE_GLS_EVT_NOTIFICATION_DISABLED; - } - - if (p_gls->evt_handler != NULL) - { - p_gls->evt_handler(p_gls, &evt); - } - } -} - - -/**@brief Function for handling the WRITE event. - * - * @details Handles WRITE events from the BLE stack. - * - * @param[in] p_gls Glucose Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_write(ble_gls_t * p_gls, ble_evt_t * p_ble_evt) -{ - ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; - - if (p_evt_write->handle == p_gls->glm_handles.cccd_handle) - { - on_glm_cccd_write(p_gls, p_evt_write); - } - else if (p_evt_write->handle == p_gls->racp_handles.value_handle) - { - on_racp_value_write(p_gls, p_evt_write); - } -} - - -/**@brief Function for handling the TX_COMPLETE event. - * - * @details Handles TX_COMPLETE events from the BLE stack. - * - * @param[in] p_gls Glucose Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_tx_complete(ble_gls_t * p_gls, ble_evt_t * p_ble_evt) -{ - m_racp_proc_records_reported_since_txcomplete = 0; - - if (m_gls_state == STATE_RACP_RESPONSE_PENDING) - { - racp_send(p_gls, &m_pending_racp_response); - } - else if (m_gls_state == STATE_RACP_PROC_ACTIVE) - { - racp_report_records_procedure(p_gls); - } -} - - -/**@brief Function for handling the HVC event. - * - * @details Handles HVC events from the BLE stack. - * - * @param[in] p_gls Glucose Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_hvc(ble_gls_t * p_gls, ble_evt_t * p_ble_evt) -{ - ble_gatts_evt_hvc_t * p_hvc = &p_ble_evt->evt.gatts_evt.params.hvc; - - if (p_hvc->handle == p_gls->racp_handles.value_handle) - { - if (m_gls_state == STATE_RACP_RESPONSE_IND_VERIF) - { - // Indication has been acknowledged. Return to default state. - state_set(STATE_NO_COMM); - } - else - { - // We did not expect this event in this state. Report error to application. - if (p_gls->error_handler != NULL) - { - p_gls->error_handler(NRF_ERROR_INVALID_STATE); - } - } - } -} - - -static void on_rw_authorize_request(ble_gls_t * p_gls, ble_gatts_evt_t * p_gatts_evt) -{ - ble_gatts_evt_rw_authorize_request_t * p_auth_req = &p_gatts_evt->params.authorize_request; - if (p_auth_req->type == BLE_GATTS_AUTHORIZE_TYPE_WRITE) - { - if ( (p_gatts_evt->params.authorize_request.request.write.op - != BLE_GATTS_OP_PREP_WRITE_REQ) - && (p_gatts_evt->params.authorize_request.request.write.op - != BLE_GATTS_OP_EXEC_WRITE_REQ_NOW) - && (p_gatts_evt->params.authorize_request.request.write.op - != BLE_GATTS_OP_EXEC_WRITE_REQ_CANCEL) - ) - { - if (p_auth_req->request.write.handle == p_gls->racp_handles.value_handle) - { - on_racp_value_write(p_gls, &p_auth_req->request.write); - } - } - } -} - -void ble_gls_on_ble_evt(ble_gls_t * p_gls, ble_evt_t * p_ble_evt) -{ - switch (p_ble_evt->header.evt_id) - { - case BLE_GAP_EVT_CONNECTED: - p_gls->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; - state_set(STATE_NO_COMM); - break; - - case BLE_GAP_EVT_DISCONNECTED: - p_gls->conn_handle = BLE_CONN_HANDLE_INVALID; - break; - - case BLE_GATTS_EVT_WRITE: - on_write(p_gls, p_ble_evt); - break; - - case BLE_EVT_TX_COMPLETE: - on_tx_complete(p_gls, p_ble_evt); - break; - - case BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST: - on_rw_authorize_request(p_gls, &p_ble_evt->evt.gatts_evt); - break; - - case BLE_GATTS_EVT_HVC: - on_hvc(p_gls, p_ble_evt); - break; - - default: - // No implementation needed. - break; - } -} - - -uint32_t ble_gls_glucose_new_meas(ble_gls_t * p_gls, ble_gls_rec_t * p_rec) -{ - p_rec->meas.sequence_number = m_next_seq_num++; - return ble_gls_db_record_add(p_rec); -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls.h deleted file mode 100644 index 8c33805f8b..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls.h +++ /dev/null @@ -1,264 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - */ - -/** @file - * - * @defgroup ble_sdk_srv_gls Glucose Service - * @{ - * @ingroup ble_sdk_srv - * @brief Glucose Service module. - * - * @details This module implements the Glucose Service. - * - * @note The application must propagate BLE stack events to the Glucose Service module by calling - * ble_gls_on_ble_evt() from the @ref softdevice_handler callback. - * - * @note Attention! - * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile - * qualification listings, this section of source code must not be modified. - */ - -#ifndef BLE_GLS_H__ -#define BLE_GLS_H__ - -#include -#include -#include "ble.h" -#include "ble_srv_common.h" -#include "ble_date_time.h" - -/**@brief Glucose feature */ -#define BLE_GLS_FEATURE_LOW_BATT 0x0001 /**< Low Battery Detection During Measurement Supported */ -#define BLE_GLS_FEATURE_MALFUNC 0x0002 /**< Sensor Malfunction Detection Supported */ -#define BLE_GLS_FEATURE_SAMPLE_SIZE 0x0004 /**< Sensor Sample Size Supported */ -#define BLE_GLS_FEATURE_INSERT_ERR 0x0008 /**< Sensor Strip Insertion Error Detection Supported */ -#define BLE_GLS_FEATURE_TYPE_ERR 0x0010 /**< Sensor Strip Type Error Detection Supported */ -#define BLE_GLS_FEATURE_RES_HIGH_LOW 0x0020 /**< Sensor Result High-Low Detection Supported */ -#define BLE_GLS_FEATURE_TEMP_HIGH_LOW 0x0040 /**< Sensor Temperature High-Low Detection Supported */ -#define BLE_GLS_FEATURE_READ_INT 0x0080 /**< Sensor Read Interrupt Detection Supported */ -#define BLE_GLS_FEATURE_GENERAL_FAULT 0x0100 /**< General Device Fault Supported */ -#define BLE_GLS_FEATURE_TIME_FAULT 0x0200 /**< Time Fault Supported */ -#define BLE_GLS_FEATURE_MULTI_BOND 0x0400 /**< Multiple Bond Supported */ - -/**@brief Glucose measurement flags */ -#define BLE_GLS_MEAS_FLAG_TIME_OFFSET 0x01 /**< Time Offset Present */ -#define BLE_GLS_MEAS_FLAG_CONC_TYPE_LOC 0x02 /**< Glucose Concentration, Type, and Sample Location Present */ -#define BLE_GLS_MEAS_FLAG_UNITS_KG_L 0x00 /**< Glucose Concentration Units kg/L */ -#define BLE_GLS_MEAS_FLAG_UNITS_MOL_L 0x04 /**< Glucose Concentration Units mol/L */ -#define BLE_GLS_MEAS_FLAG_SENSOR_STATUS 0x08 /**< Sensor Status Annunciation Present */ -#define BLE_GLS_MEAS_FLAG_CONTEXT_INFO 0x10 /**< Context Information Follows */ - -/**@brief Glucose measurement type */ -#define BLE_GLS_MEAS_TYPE_CAP_BLOOD 1 /**< Capillary whole blood */ -#define BLE_GLS_MEAS_TYPE_CAP_PLASMA 2 /**< Capillary plasma */ -#define BLE_GLS_MEAS_TYPE_VEN_BLOOD 3 /**< Venous whole blood */ -#define BLE_GLS_MEAS_TYPE_VEN_PLASMA 4 /**< Venous plasma */ -#define BLE_GLS_MEAS_TYPE_ART_BLOOD 5 /**< Arterial whole blood */ -#define BLE_GLS_MEAS_TYPE_ART_PLASMA 6 /**< Arterial plasma */ -#define BLE_GLS_MEAS_TYPE_UNDET_BLOOD 7 /**< Undetermined whole blood */ -#define BLE_GLS_MEAS_TYPE_UNDET_PLASMA 8 /**< Undetermined plasma */ -#define BLE_GLS_MEAS_TYPE_FLUID 9 /**< Interstitial fluid (ISF) */ -#define BLE_GLS_MEAS_TYPE_CONTROL 10 /**< Control solution */ - -/**@brief Glucose measurement location */ -#define BLE_GLS_MEAS_LOC_FINGER 1 /**< Finger */ -#define BLE_GLS_MEAS_LOC_AST 2 /**< Alternate Site Test (AST) */ -#define BLE_GLS_MEAS_LOC_EAR 3 /**< Earlobe */ -#define BLE_GLS_MEAS_LOC_CONTROL 4 /**< Control solution */ -#define BLE_GLS_MEAS_LOC_NOT_AVAIL 15 /**< Sample Location value not available */ - -/**@brief Glucose sensor status annunciation */ -#define BLE_GLS_MEAS_STATUS_BATT_LOW 0x0001 /**< Device battery low at time of measurement */ -#define BLE_GLS_MEAS_STATUS_SENSOR_FAULT 0x0002 /**< Sensor malfunction or faulting at time of measurement */ -#define BLE_GLS_MEAS_STATUS_SAMPLE_SIZE 0x0004 /**< Sample size for blood or control solution insufficient at time of measurement */ -#define BLE_GLS_MEAS_STATUS_STRIP_INSERT 0x0008 /**< Strip insertion error */ -#define BLE_GLS_MEAS_STATUS_STRIP_TYPE 0x0010 /**< Strip type incorrect for device */ -#define BLE_GLS_MEAS_STATUS_RESULT_HIGH 0x0020 /**< Sensor result higher than the device can process */ -#define BLE_GLS_MEAS_STATUS_RESULT_LOW 0x0040 /**< Sensor result lower than the device can process */ -#define BLE_GLS_MEAS_STATUS_TEMP_HIGH 0x0080 /**< Sensor temperature too high for valid test/result at time of measurement */ -#define BLE_GLS_MEAS_STATUS_TEMP_LOW 0x0100 /**< Sensor temperature too low for valid test/result at time of measurement */ -#define BLE_GLS_MEAS_STATUS_STRIP_PULL 0x0200 /**< Sensor read interrupted because strip was pulled too soon at time of measurement */ -#define BLE_GLS_MEAS_STATUS_GENERAL_FAULT 0x0400 /**< General device fault has occurred in the sensor */ -#define BLE_GLS_MEAS_STATUS_TIME_FAULT 0x0800 /**< Time fault has occurred in the sensor and time may be inaccurate */ - -/**@brief Glucose measurement context flags */ -#define BLE_GLS_CONTEXT_FLAG_CARB 0x01 /**< Carbohydrate id and carbohydrate present */ -#define BLE_GLS_CONTEXT_FLAG_MEAL 0x02 /**< Meal present */ -#define BLE_GLS_CONTEXT_FLAG_TESTER 0x04 /**< Tester-health present */ -#define BLE_GLS_CONTEXT_FLAG_EXERCISE 0x08 /**< Exercise duration and exercise intensity present */ -#define BLE_GLS_CONTEXT_FLAG_MED 0x10 /**< Medication ID and medication present */ -#define BLE_GLS_CONTEXT_FLAG_MED_KG 0x00 /**< Medication value units, kilograms */ -#define BLE_GLS_CONTEXT_FLAG_MED_L 0x20 /**< Medication value units, liters */ -#define BLE_GLS_CONTEXT_FLAG_HBA1C 0x40 /**< Hba1c present */ -#define BLE_GLS_CONTEXT_FLAG_EXT 0x80 /**< Extended flags present */ - -/**@brief Glucose measurement context carbohydrate ID */ -#define BLE_GLS_CONTEXT_CARB_BREAKFAST 1 /**< Breakfast */ -#define BLE_GLS_CONTEXT_CARB_LUNCH 2 /**< Lunch */ -#define BLE_GLS_CONTEXT_CARB_DINNER 3 /**< Dinner */ -#define BLE_GLS_CONTEXT_CARB_SNACK 4 /**< Snack */ -#define BLE_GLS_CONTEXT_CARB_DRINK 5 /**< Drink */ -#define BLE_GLS_CONTEXT_CARB_SUPPER 6 /**< Supper */ -#define BLE_GLS_CONTEXT_CARB_BRUNCH 7 /**< Brunch */ - -/**@brief Glucose measurement context meal */ -#define BLE_GLS_CONTEXT_MEAL_PREPRANDIAL 1 /**< Preprandial (before meal) */ -#define BLE_GLS_CONTEXT_MEAL_POSTPRANDIAL 2 /**< Postprandial (after meal) */ -#define BLE_GLS_CONTEXT_MEAL_FASTING 3 /**< Fasting */ -#define BLE_GLS_CONTEXT_MEAL_CASUAL 4 /**< Casual (snacks, drinks, etc.) */ -#define BLE_GLS_CONTEXT_MEAL_BEDTIME 5 /**< Bedtime */ - -/**@brief Glucose measurement context tester */ -#define BLE_GLS_CONTEXT_TESTER_SELF 1 /**< Self */ -#define BLE_GLS_CONTEXT_TESTER_PRO 2 /**< Health care professional */ -#define BLE_GLS_CONTEXT_TESTER_LAB 3 /**< Lab test */ -#define BLE_GLS_CONTEXT_TESTER_NOT_AVAIL 15 /**< Tester value not available */ - -/**@brief Glucose measurement context health */ -#define BLE_GLS_CONTEXT_HEALTH_MINOR 1 /**< Minor health issues */ -#define BLE_GLS_CONTEXT_HEALTH_MAJOR 2 /**< Major health issues */ -#define BLE_GLS_CONTEXT_HEALTH_MENSES 3 /**< During menses */ -#define BLE_GLS_CONTEXT_HEALTH_STRESS 4 /**< Under stress */ -#define BLE_GLS_CONTEXT_HEALTH_NONE 5 /**< No health issues */ -#define BLE_GLS_CONTEXT_HEALTH_NOT_AVAIL 15 /**< Health value not available */ - -/**@brief Glucose measurement context medication ID */ -#define BLE_GLS_CONTEXT_MED_RAPID 1 /**< Rapid acting insulin */ -#define BLE_GLS_CONTEXT_MED_SHORT 2 /**< Short acting insulin */ -#define BLE_GLS_CONTEXT_MED_INTERMED 3 /**< Intermediate acting insulin */ -#define BLE_GLS_CONTEXT_MED_LONG 4 /**< Long acting insulin */ -#define BLE_GLS_CONTEXT_MED_PREMIX 5 /**< Pre-mixed insulin */ - -/**@brief SFLOAT format (IEEE-11073 16-bit FLOAT, meaning 4 bits for exponent (base 10) and 12 bits mantissa) */ -typedef struct -{ - int8_t exponent; /**< Base 10 exponent, should be using only 4 bits */ - int16_t mantissa; /**< Mantissa, should be using only 12 bits */ -} sfloat_t; - -/**@brief Glucose Service event type. */ -typedef enum -{ - BLE_GLS_EVT_NOTIFICATION_ENABLED, /**< Glucose value notification enabled event. */ - BLE_GLS_EVT_NOTIFICATION_DISABLED /**< Glucose value notification disabled event. */ -} ble_gls_evt_type_t; - -/**@brief Glucose Service event. */ -typedef struct -{ - ble_gls_evt_type_t evt_type; /**< Type of event. */ -} ble_gls_evt_t; - -// Forward declaration of the ble_gls_t type. -typedef struct ble_gls_s ble_gls_t; - -/**@brief Glucose Service event handler type. */ -typedef void (*ble_gls_evt_handler_t) (ble_gls_t * p_gls, ble_gls_evt_t * p_evt); - -/**@brief Glucose Measurement structure. This contains glucose measurement value. */ -typedef struct -{ - uint8_t flags; /**< Flags */ - uint16_t sequence_number; /**< Sequence number */ - ble_date_time_t base_time; /**< Time stamp */ - int16_t time_offset; /**< Time offset */ - sfloat_t glucose_concentration; /**< Glucose concentration */ - uint8_t type; /**< Type */ - uint8_t sample_location; /**< Sample location */ - uint16_t sensor_status_annunciation; /**< Sensor status annunciation */ -} ble_gls_meas_t; - -/**@brief Glucose measurement context structure */ -typedef struct -{ - uint8_t flags; /**< Flags */ - uint8_t extended_flags; /**< Extended Flags */ - uint8_t carbohydrate_id; /**< Carbohydrate ID */ - sfloat_t carbohydrate; /**< Carbohydrate */ - uint8_t meal; /**< Meal */ - uint8_t tester_and_health; /**< Tester and health */ - uint16_t exercise_duration; /**< Exercise Duration */ - uint8_t exercise_intensity; /**< Exercise Intensity */ - uint8_t medication_id; /**< Medication ID */ - sfloat_t medication; /**< Medication */ - uint16_t hba1c; /**< HbA1c */ -} ble_gls_meas_context_t; - -/**@brief Glucose measurement record */ -typedef struct -{ - ble_gls_meas_t meas; /**< Glucose measurement */ - ble_gls_meas_context_t context; /**< Glucose measurement context */ -} ble_gls_rec_t; - -/**@brief Glucose Service init structure. This contains all options and data needed for - * initialization of the service. */ -typedef struct -{ - ble_gls_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Glucose Service. */ - ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ - uint16_t feature; /**< Glucose Feature value indicating supported features. */ - bool is_context_supported; /**< Determines if optional Glucose Measurement Context is to be supported. */ -} ble_gls_init_t; - -/**@brief Glucose Service structure. This contains various status information for the service. */ -struct ble_gls_s -{ - ble_gls_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Glucose Service. */ - ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ - uint16_t service_handle; /**< Handle of Glucose Service (as provided by the BLE stack). */ - ble_gatts_char_handles_t glm_handles; /**< Handles related to the Glucose Measurement characteristic. */ - ble_gatts_char_handles_t glm_context_handles; /**< Handles related to the Glucose Measurement Context characteristic. */ - ble_gatts_char_handles_t glf_handles; /**< Handles related to the Glucose Feature characteristic. */ - ble_gatts_char_handles_t racp_handles; /**< Handles related to the Record Access Control Point characteristic. */ - uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ - uint16_t feature; - bool is_context_supported; -}; - -/**@brief Function for initializing the Glucose Service. - * - * @details This call allows the application to initialize the Glucose Service. - * - * @param[out] p_gls Glucose Service structure. This structure will have to be supplied by - * the application. It will be initialized by this function, and will later - * be used to identify this particular service instance. - * @param[in] p_gls_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. - */ -uint32_t ble_gls_init(ble_gls_t * p_gls, const ble_gls_init_t * p_gls_init); - -/**@brief Function for handling the Application's BLE Stack events. - * - * @details Handles all events from the BLE stack of interest to the Glucose Service. - * - * @param[in] p_gls Glucose Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -void ble_gls_on_ble_evt(ble_gls_t * p_gls, ble_evt_t * p_ble_evt); - -/**@brief Function for reporting a new glucose measurement to the glucose service module. - * - * @details The application calls this function after having performed a new glucose measurement. - * The new measurement is recorded in the RACP database. - * - * @param[in] p_gls Glucose Service structure. - * @param[in] p_rec Pointer to glucose record (measurement plus context). - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -uint32_t ble_gls_glucose_new_meas(ble_gls_t * p_gls, ble_gls_rec_t * p_rec); - -#endif // BLE_GLS_H__ - -/** @} */ - diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls_db.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls_db.c deleted file mode 100644 index 0f7d1a9dc5..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls_db.c +++ /dev/null @@ -1,112 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - */ - -#include "ble_gls_db.h" - - -typedef struct -{ - bool in_use_flag; - ble_gls_rec_t record; -} database_entry_t; - -static database_entry_t m_database[BLE_GLS_DB_MAX_RECORDS]; -static uint8_t m_database_crossref[BLE_GLS_DB_MAX_RECORDS]; -static uint16_t m_num_records; - - -uint32_t ble_gls_db_init(void) -{ - int i; - - for (i = 0; i < BLE_GLS_DB_MAX_RECORDS; i++) - { - m_database[i].in_use_flag = false; - m_database_crossref[i] = 0xFF; - } - - m_num_records = 0; - - return NRF_SUCCESS; -} - - -uint16_t ble_gls_db_num_records_get(void) -{ - return m_num_records; -} - - -uint32_t ble_gls_db_record_get(uint8_t rec_ndx, ble_gls_rec_t * p_rec) -{ - if (rec_ndx >= m_num_records) - { - return NRF_ERROR_INVALID_PARAM; - } - - // copy record to the specified memory - *p_rec = m_database[m_database_crossref[rec_ndx]].record; - - return NRF_SUCCESS; -} - - -uint32_t ble_gls_db_record_add(ble_gls_rec_t * p_rec) -{ - int i; - - if (m_num_records == BLE_GLS_DB_MAX_RECORDS) - { - return NRF_ERROR_NO_MEM; - } - - // find next available database entry - for (i = 0; i < BLE_GLS_DB_MAX_RECORDS; i++) - { - if (!m_database[i].in_use_flag) - { - m_database[i].in_use_flag = true; - m_database[i].record = *p_rec; - - m_database_crossref[m_num_records] = i; - m_num_records++; - - return NRF_SUCCESS; - } - } - - return NRF_ERROR_NO_MEM; -} - - -uint32_t ble_gls_db_record_delete(uint8_t rec_ndx) -{ - int i; - - if (rec_ndx >= m_num_records) - { - return NRF_ERROR_NOT_FOUND; - } - - // free entry - m_database[m_database_crossref[rec_ndx]].in_use_flag = false; - - // decrease number of records - m_num_records--; - - // remove cross reference index - for (i = rec_ndx; i < m_num_records; i++) - { - m_database_crossref[i] = m_database_crossref[i + 1]; - } - - return NRF_SUCCESS; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls_db.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls_db.h deleted file mode 100644 index 2f2f4f9df2..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_gls/ble_gls_db.h +++ /dev/null @@ -1,84 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - */ - -/** @file - * - * @defgroup ble_sdk_srv_gls_db Glucose Database Service - * @{ - * @ingroup ble_sdk_srv - * @brief Glucose Service module. - * - * @details This module implements at database of stored glucose measurement values. - * - * @note Attention! - * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile - * qualification listings, These APIs must not be modified. However, the corresponding - * functions' implementations can be modified. - */ - -#ifndef BLE_GLS_DB_H__ -#define BLE_GLS_DB_H__ - -#include -#include "ble_gls.h" - -#define BLE_GLS_DB_MAX_RECORDS 20 - -/**@brief Function for initializing the glucose record database. - * - * @details This call initializes the database holding glucose records. - * - * @return NRF_SUCCESS on success. - */ -uint32_t ble_gls_db_init(void); - -/**@brief Function for getting the number of records in the database. - * - * @details This call returns the number of records in the database. - * - * @return Number of records in the database. - */ -uint16_t ble_gls_db_num_records_get(void); - -/**@brief Function for getting a record from the database. - * - * @details This call returns a specified record from the database. - * - * @param[in] record_num Index of the record to retrieve. - * @param[out] p_rec Pointer to record structure where retrieved record is copied to. - * - * @return NRF_SUCCESS on success. - */ -uint32_t ble_gls_db_record_get(uint8_t record_num, ble_gls_rec_t * p_rec); - -/**@brief Function for adding a record at the end of the database. - * - * @details This call adds a record as the last record in the database. - * - * @param[in] p_rec Pointer to record to add to database. - * - * @return NRF_SUCCESS on success. - */ -uint32_t ble_gls_db_record_add(ble_gls_rec_t * p_rec); - -/**@brief Function for deleting a database entry. - * - * @details This call deletes an record from the database. - * - * @param[in] record_num Index of record to delete. - * - * @return NRF_SUCCESS on success. - */ -uint32_t ble_gls_db_record_delete(uint8_t record_num); - -#endif // BLE_GLS_DB_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hids/ble_hids.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hids/ble_hids.c deleted file mode 100644 index 240a25f5a5..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hids/ble_hids.c +++ /dev/null @@ -1,1380 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/* Attention! -* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile -* qualification listings, this section of source code must not be modified. -*/ - -#include "ble_hids.h" -#include -#include "app_error.h" -#include "nordic_common.h" -#include "ble_srv_common.h" -#include "app_util.h" - - -// Protocol Mode values -#define PROTOCOL_MODE_BOOT 0x00 /**< Boot Protocol Mode. */ -#define PROTOCOL_MODE_REPORT 0x01 /**< Report Protocol Mode. */ - -// HID Control Point values -#define HIDS_CONTROL_POINT_SUSPEND 0 /**< Suspend command. */ -#define HIDS_CONTROL_POINT_EXIT_SUSPEND 1 /**< Exit Suspend command. */ - -#define DEFAULT_PROTOCOL_MODE PROTOCOL_MODE_REPORT /**< Default value for the Protocol Mode characteristic. */ -#define INITIAL_VALUE_HID_CONTROL_POINT HIDS_CONTROL_POINT_SUSPEND /**< Initial value for the HID Control Point characteristic. */ - -#define ENCODED_HID_INFORMATION_LEN 4 /**< Maximum size of an encoded HID Information characteristic. */ - -#define BOOT_KB_INPUT_REPORT_MAX_SIZE 8 /**< Maximum size of a Boot Keyboard Input Report (as per Appendix B in Device Class Definition for Human Interface Devices (HID), Version 1.11). */ -#define BOOT_KB_OUTPUT_REPORT_MAX_SIZE 1 /**< Maximum size of a Boot Keyboard Output Report (as per Appendix B in Device Class Definition for Human Interface Devices (HID), Version 1.11). */ -#define BOOT_MOUSE_INPUT_REPORT_MIN_SIZE 3 /**< Minimum size of a Boot Mouse Input Report (as per Appendix B in Device Class Definition for Human Interface Devices (HID), Version 1.11). */ -#define BOOT_MOUSE_INPUT_REPORT_MAX_SIZE 8 /**< Maximum size of a Boot Mouse Input Report (as per Appendix B in Device Class Definition for Human Interface Devices (HID), Version 1.11). */ - - -/**@brief Function for making a HID Service characteristic id. - * - * @param[in] uuid UUID of characteristic. - * @param[in] rep_type Type of report. - * @param[in] rep_index Index of the characteristic. - * - * @return HID Service characteristic id structure. - */ -static ble_hids_char_id_t make_char_id(uint16_t uuid, uint8_t rep_type, uint8_t rep_index) -{ - ble_hids_char_id_t char_id = {0}; - - char_id.uuid = uuid; - char_id.rep_type = rep_type; - char_id.rep_index = rep_index; - - return char_id; -} - - -/**@brief Function for handling the Connect event. - * - * @param[in] p_hids HID Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_connect(ble_hids_t * p_hids, ble_evt_t * p_ble_evt) -{ - uint32_t err_code; - uint8_t default_protocol_mode; - ble_gatts_value_t gatts_value; - - p_hids->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; - - if (p_hids->protocol_mode_handles.value_handle) - { - // Set Protocol Mode characteristic value to default value - default_protocol_mode = DEFAULT_PROTOCOL_MODE; - - // Initialize value struct. - memset(&gatts_value, 0, sizeof(gatts_value)); - - gatts_value.len = sizeof(uint8_t); - gatts_value.offset = 0; - gatts_value.p_value = &default_protocol_mode; - - err_code = sd_ble_gatts_value_set(p_hids->conn_handle, - p_hids->protocol_mode_handles.value_handle, - &gatts_value); - if ((err_code != NRF_SUCCESS) && (p_hids->error_handler != NULL)) - { - p_hids->error_handler(err_code); - } - } -} - - -/**@brief Function for handling the Disconnect event. - * - * @param[in] p_hids HID Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_disconnect(ble_hids_t * p_hids, ble_evt_t * p_ble_evt) -{ - UNUSED_PARAMETER(p_ble_evt); - p_hids->conn_handle = BLE_CONN_HANDLE_INVALID; -} - - -/**@brief Function for handling write events to the HID Control Point value. - * - * @param[in] p_hids HID Service structure. - * @param[in] p_evt_write Write event received from the BLE stack. - */ -static void on_control_point_write(ble_hids_t * p_hids, ble_gatts_evt_write_t * p_evt_write) -{ - if ((p_evt_write->len == 1) && (p_hids->evt_handler != NULL)) - { - ble_hids_evt_t evt; - - // HID Control Point written, propagate event to application - switch (p_evt_write->data[0]) - { - case HIDS_CONTROL_POINT_SUSPEND: - evt.evt_type = BLE_HIDS_EVT_HOST_SUSP; - break; - - case HIDS_CONTROL_POINT_EXIT_SUSPEND: - evt.evt_type = BLE_HIDS_EVT_HOST_EXIT_SUSP; - break; - - default: - // Illegal Control Point value, ignore - return; - } - - p_hids->evt_handler(p_hids, &evt); - } -} - - -/**@brief Function for handling write events to the Protocol Mode value. - * - * @param[in] p_hids HID Service structure. - * @param[in] p_evt_write Write event received from the BLE stack. - */ -static void on_protocol_mode_write(ble_hids_t * p_hids, ble_gatts_evt_write_t * p_evt_write) -{ - if ((p_evt_write->len == 1) && (p_hids->evt_handler != NULL)) - { - ble_hids_evt_t evt; - - // HID Protocol Mode written, propagate event to application - switch (p_evt_write->data[0]) - { - case PROTOCOL_MODE_BOOT: - evt.evt_type = BLE_HIDS_EVT_BOOT_MODE_ENTERED; - break; - - case PROTOCOL_MODE_REPORT: - evt.evt_type = BLE_HIDS_EVT_REPORT_MODE_ENTERED; - break; - - default: - // Illegal Protocol Mode value, ignore - return; - } - - p_hids->evt_handler(p_hids, &evt); - } -} - - -/**@brief Function for handling write events to a report CCCD. - * - * @param[in] p_hids HID Service structure. - * @param[in] p_char_id Id of report characteristic. - * @param[in] p_evt_write Write event received from the BLE stack. - */ -static void on_report_cccd_write(ble_hids_t * p_hids, - ble_hids_char_id_t * p_char_id, - ble_gatts_evt_write_t * p_evt_write) -{ - if (p_evt_write->len == 2) - { - // CCCD written, update notification state - if (p_hids->evt_handler != NULL) - { - ble_hids_evt_t evt; - - if (ble_srv_is_notification_enabled(p_evt_write->data)) - { - evt.evt_type = BLE_HIDS_EVT_NOTIF_ENABLED; - } - else - { - evt.evt_type = BLE_HIDS_EVT_NOTIF_DISABLED; - } - evt.params.notification.char_id = *p_char_id; - - p_hids->evt_handler(p_hids, &evt); - } - } -} - - -/**@brief Function for handling write events to a report value. - * - * @param[in] p_hids HID Service structure. - * @param[in] p_char_id Id of report characteristic. - */ -static void on_report_value_write(ble_hids_t * p_hids, - ble_evt_t * p_ble_evt, - ble_hids_char_id_t * p_char_id) -{ - if (p_hids->evt_handler != NULL) - { - ble_hids_evt_t evt; - - evt.evt_type = BLE_HIDS_EVT_REP_CHAR_WRITE; - evt.params.char_write.char_id = *p_char_id; - evt.params.char_write.offset = p_ble_evt->evt.gatts_evt.params.write.offset; - evt.params.char_write.len = p_ble_evt->evt.gatts_evt.params.write.len; - evt.params.char_write.data = p_ble_evt->evt.gatts_evt.params.write.data; - - p_hids->evt_handler(p_hids, &evt); - } -} - -/**@brief Handle authorize read events to a report value. - * - * @param[in] p_hids HID Service structure. - * @param[in] p_char_id Id of report characteristic. - */ -static void on_report_value_read_auth(ble_hids_t * p_hids, - ble_hids_char_id_t * p_char_id, - ble_evt_t * p_ble_evt) -{ - if (p_hids->evt_handler != NULL) - { - ble_hids_evt_t evt; - - evt.evt_type = BLE_HIDS_EVT_REPORT_READ; - evt.params.char_auth_read.char_id = *p_char_id; - evt.p_ble_evt = p_ble_evt; - - p_hids->evt_handler(p_hids, &evt); - } -} - -/**@brief Function for finding the Characteristic Id of a characteristic corresponding to a CCCD handle. - * - * @param[in] p_hids HID Service structure. - * @param[in] handle Handle to search for. - * @param[out] p_char_id Id of report characteristic. - * - * @return TRUE if CCCD handle was found, FALSE otherwise. - */ -static bool inp_rep_cccd_identify(ble_hids_t * p_hids, - uint16_t handle, - ble_hids_char_id_t * p_char_id) -{ - uint8_t i; - - for (i = 0; i < p_hids->inp_rep_count; i++) - { - if (handle == p_hids->inp_rep_array[i].char_handles.cccd_handle) - { - *p_char_id = make_char_id(BLE_UUID_REPORT_CHAR, BLE_HIDS_REP_TYPE_INPUT, i); - return true; - } - } - - return false; -} - - -/**@brief Function for finding the Characteristic Id of a characteristic corresponding to a value handle. - * - * @param[in] p_hids HID Service structure. - * @param[in] handle Handle to search for. - * @param[out] p_char_id Id of report characteristic. - * - * @return TRUE if value handle was found, FALSE otherwise. - */ -static bool rep_value_identify(ble_hids_t * p_hids, - uint16_t handle, - ble_hids_char_id_t * p_char_id) -{ - uint8_t i; - - for (i = 0; i < p_hids->inp_rep_count; i++) - { - if (handle == p_hids->inp_rep_array[i].char_handles.value_handle) - { - *p_char_id = make_char_id(BLE_UUID_REPORT_CHAR, BLE_HIDS_REP_TYPE_INPUT, i); - return true; - } - } - - for (i = 0; i < p_hids->outp_rep_count; i++) - { - if (handle == p_hids->outp_rep_array[i].char_handles.value_handle) - { - *p_char_id = make_char_id(BLE_UUID_REPORT_CHAR, BLE_HIDS_REP_TYPE_OUTPUT, i); - return true; - } - } - - for (i = 0; i < p_hids->feature_rep_count; i++) - { - if (handle == p_hids->feature_rep_array[i].char_handles.value_handle) - { - *p_char_id = make_char_id(BLE_UUID_REPORT_CHAR, BLE_HIDS_REP_TYPE_FEATURE, i); - return true; - } - } - - return false; -} - - -/**@brief Function for handling the Write event. - * - * @param[in] p_hids HID Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_write(ble_hids_t * p_hids, ble_evt_t * p_ble_evt) -{ - ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; - ble_hids_char_id_t char_id; - - if (p_evt_write->handle == p_hids->hid_control_point_handles.value_handle) - { - on_control_point_write(p_hids, p_evt_write); - } - else if (p_evt_write->handle == p_hids->protocol_mode_handles.value_handle) - { - on_protocol_mode_write(p_hids, p_evt_write); - } - else if (p_evt_write->handle == p_hids->boot_kb_inp_rep_handles.cccd_handle) - { - char_id = make_char_id(BLE_UUID_BOOT_KEYBOARD_INPUT_REPORT_CHAR, 0, 0); - on_report_cccd_write(p_hids, &char_id, p_evt_write); - } - else if (p_evt_write->handle == p_hids->boot_kb_inp_rep_handles.value_handle) - { - char_id = make_char_id(BLE_UUID_BOOT_KEYBOARD_INPUT_REPORT_CHAR, 0, 0); - on_report_value_write(p_hids, p_ble_evt, &char_id); - } - else if (p_evt_write->handle == p_hids->boot_mouse_inp_rep_handles.cccd_handle) - { - char_id = make_char_id(BLE_UUID_BOOT_MOUSE_INPUT_REPORT_CHAR, 0, 0); - on_report_cccd_write(p_hids, &char_id, p_evt_write); - } - else if (p_evt_write->handle == p_hids->boot_mouse_inp_rep_handles.value_handle) - { - char_id = make_char_id(BLE_UUID_BOOT_MOUSE_INPUT_REPORT_CHAR, 0, 0); - on_report_value_write(p_hids, p_ble_evt, &char_id); - } - else if (inp_rep_cccd_identify(p_hids, p_evt_write->handle, &char_id)) - { - on_report_cccd_write(p_hids, &char_id, p_evt_write); - } - else if (rep_value_identify(p_hids, p_evt_write->handle, &char_id)) - { - on_report_value_write(p_hids, p_ble_evt, &char_id); - } - else - { - // No implementation needed. - } -} - -/**@brief Read/write authorize request event handler. - * - * @param[in] p_hids HID Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_rw_authorize_request(ble_hids_t * p_hids, ble_evt_t * p_ble_evt) -{ - ble_gatts_evt_rw_authorize_request_t * evt_rw_auth = &p_ble_evt->evt.gatts_evt.params.authorize_request; - ble_hids_char_id_t char_id; - - if (evt_rw_auth->type != BLE_GATTS_AUTHORIZE_TYPE_READ) - { - // Unexpected operation - return; - } - - if (rep_value_identify(p_hids, evt_rw_auth->request.read.handle, &char_id)) - { - on_report_value_read_auth(p_hids, &char_id, p_ble_evt); - } -} - -void ble_hids_on_ble_evt(ble_hids_t * p_hids, ble_evt_t * p_ble_evt) -{ - switch (p_ble_evt->header.evt_id) - { - case BLE_GAP_EVT_CONNECTED: - on_connect(p_hids, p_ble_evt); - break; - - case BLE_GAP_EVT_DISCONNECTED: - on_disconnect(p_hids, p_ble_evt); - break; - - case BLE_GATTS_EVT_WRITE: - on_write(p_hids, p_ble_evt); - break; - - case BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST: - on_rw_authorize_request(p_hids, p_ble_evt); - break; - default: - // No implementation needed. - break; - } -} - - -/**@brief Function for adding Protocol Mode characteristics. - * - * @param[in] p_hids HID Service structure. - * @param[in] p_sec_mode Characteristic security settings. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t protocol_mode_char_add(ble_hids_t * p_hids, - const ble_srv_security_mode_t * p_sec_mode) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - uint8_t initial_protocol_mode; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.read = 1; - char_md.char_props.write_wo_resp = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = NULL; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_PROTOCOL_MODE_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.read_perm = p_sec_mode->read_perm; - attr_md.write_perm = p_sec_mode->write_perm; - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - initial_protocol_mode = DEFAULT_PROTOCOL_MODE; - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = sizeof(uint8_t); - attr_char_value.init_offs = 0; - attr_char_value.max_len = sizeof(uint8_t); - attr_char_value.p_value = &initial_protocol_mode; - - return sd_ble_gatts_characteristic_add(p_hids->service_handle, - &char_md, - &attr_char_value, - &p_hids->protocol_mode_handles); -} - - -/**@brief Function for adding report characteristics. - * - * @param[in] p_hids HID Service structure. - * @param[in] p_properties Report characteristic properties. - * @param[in] max_len Maximum length of report value. - * @param[in] p_rep_ref Report Reference descriptor. - * @param[in] p_rep_ref_attr_md Characteristic security settings. - * @param[in] is_read_resp Characteristic read authorization. - * @param[out] p_rep_char Handles of new characteristic. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t rep_char_add(ble_hids_t * p_hids, - ble_gatt_char_props_t * p_properties, - uint16_t max_len, - ble_srv_report_ref_t * p_rep_ref, - ble_srv_cccd_security_mode_t * p_rep_ref_attr_md, - bool is_read_resp, - ble_hids_rep_char_t * p_rep_char) -{ - uint32_t err_code; - ble_gatts_char_md_t char_md; - ble_gatts_attr_md_t cccd_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - uint8_t encoded_rep_ref[BLE_SRV_ENCODED_REPORT_REF_LEN]; - - // Add Report characteristic - if (p_properties->notify) - { - memset(&cccd_md, 0, sizeof(cccd_md)); - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); - cccd_md.write_perm = p_rep_ref_attr_md->cccd_write_perm; - cccd_md.vloc = BLE_GATTS_VLOC_STACK; - } - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props = *p_properties; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = (p_properties->notify) ? &cccd_md : NULL; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_REPORT_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.read_perm = p_rep_ref_attr_md->read_perm; - attr_md.write_perm = p_rep_ref_attr_md->write_perm; - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = is_read_resp ? 1 : 0; - attr_md.wr_auth = 0; - attr_md.vlen = 1; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = 0; - attr_char_value.init_offs = 0; - attr_char_value.max_len = max_len; - attr_char_value.p_value = NULL; - - err_code = sd_ble_gatts_characteristic_add(p_hids->service_handle, - &char_md, - &attr_char_value, - &p_rep_char->char_handles); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add Report Reference descriptor - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_REPORT_REF_DESCR); - - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.read_perm = p_rep_ref_attr_md->read_perm; - attr_md.write_perm = p_rep_ref_attr_md->write_perm; - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = ble_srv_report_ref_encode(encoded_rep_ref, p_rep_ref); - attr_char_value.init_offs = 0; - attr_char_value.max_len = attr_char_value.init_len; - attr_char_value.p_value = encoded_rep_ref; - - return sd_ble_gatts_descriptor_add(p_rep_char->char_handles.value_handle, - &attr_char_value, - &p_rep_char->ref_handle); -} - - -/**@brief Function for adding Report Map characteristics. - * - * @param[in] p_hids HID Service structure. - * @param[in] p_hids_init Service initialization structure. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t rep_map_char_add(ble_hids_t * p_hids, const ble_hids_init_t * p_hids_init) -{ - uint32_t err_code; - ble_gatts_char_md_t char_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - - // Add Report Map characteristic - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.read = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = NULL; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_REPORT_MAP_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.read_perm = p_hids_init->rep_map.security_mode.read_perm; - attr_md.write_perm = p_hids_init->rep_map.security_mode.write_perm; - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 1; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = p_hids_init->rep_map.data_len; - attr_char_value.init_offs = 0; - attr_char_value.max_len = p_hids_init->rep_map.data_len; - attr_char_value.p_value = p_hids_init->rep_map.p_data; - - err_code = sd_ble_gatts_characteristic_add(p_hids->service_handle, - &char_md, - &attr_char_value, - &p_hids->rep_map_handles); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - if (p_hids_init->rep_map.ext_rep_ref_num != 0 && p_hids_init->rep_map.p_ext_rep_ref == NULL) - { - return NRF_ERROR_INVALID_PARAM; - } - for (int i = 0; i < p_hids_init->rep_map.ext_rep_ref_num; ++i) - { - uint8_t encoded_rep_ref[sizeof(ble_uuid128_t)]; - uint8_t encoded_rep_ref_len; - - // Add External Report Reference descriptor - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_EXTERNAL_REPORT_REF_DESCR); - - memset(&attr_md, 0, sizeof(attr_md)); - - BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&attr_md.read_perm); - BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.write_perm); - - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - err_code = sd_ble_uuid_encode(&p_hids_init->rep_map.p_ext_rep_ref[i], - &encoded_rep_ref_len, - encoded_rep_ref); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = encoded_rep_ref_len; - attr_char_value.init_offs = 0; - attr_char_value.max_len = attr_char_value.init_len; - attr_char_value.p_value = encoded_rep_ref; - - err_code = sd_ble_gatts_descriptor_add(p_hids->rep_map_handles.value_handle, - &attr_char_value, - &p_hids->rep_map_ext_rep_ref_handle); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - - return NRF_SUCCESS; -} - - -/**@brief Function for adding Input Report characteristics. - * - * @param[in] p_hids HID Service structure. - * @param[in] uuid UUID of report characteristic to be added. - * @param[in] max_data_len Maximum length of report value. - * @param[in] p_sec_mode Characteristic security settings. - * @param[out] p_char_handles Handles of new characteristic. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t boot_inp_rep_char_add(ble_hids_t * p_hids, - uint16_t uuid, - uint16_t max_data_len, - const ble_srv_cccd_security_mode_t * p_sec_mode, - ble_gatts_char_handles_t * p_char_handles) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_md_t cccd_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - - memset(&cccd_md, 0, sizeof(cccd_md)); - - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); - cccd_md.write_perm = p_sec_mode->cccd_write_perm; - cccd_md.vloc = BLE_GATTS_VLOC_STACK; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.read = 1; - char_md.char_props.write = (p_sec_mode->write_perm.sm) ? 1 : 0; - char_md.char_props.notify = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = &cccd_md; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, uuid); - - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.read_perm = p_sec_mode->read_perm; - attr_md.write_perm = p_sec_mode->write_perm; - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = 0; - attr_char_value.init_offs = 0; - attr_char_value.max_len = max_data_len; - attr_char_value.p_value = NULL; - - return sd_ble_gatts_characteristic_add(p_hids->service_handle, - &char_md, - &attr_char_value, - p_char_handles); -} - - -/**@brief Function for adding Boot Keyboard Output Report characteristics. - * - * @param[in] p_hids HID Service structure. - * @param[in] p_hids_init Service initialization structure. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t boot_kb_outp_rep_char_add(ble_hids_t * p_hids, const ble_hids_init_t * p_hids_init) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.read = 1; - char_md.char_props.write = 1; - char_md.char_props.write_wo_resp = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = NULL; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_BOOT_KEYBOARD_OUTPUT_REPORT_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.read_perm = p_hids_init->security_mode_boot_kb_outp_rep.read_perm; - attr_md.write_perm = p_hids_init->security_mode_boot_kb_outp_rep.write_perm; - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = 0; - attr_char_value.init_offs = 0; - attr_char_value.max_len = BOOT_KB_OUTPUT_REPORT_MAX_SIZE; - attr_char_value.p_value = NULL; - - return sd_ble_gatts_characteristic_add(p_hids->service_handle, &char_md, &attr_char_value, - &p_hids->boot_kb_outp_rep_handles); -} - - -/**@brief Function for encoding a HID Information characteristic value. - * - * @param[out] p_encoded_buffer Buffer where the encoded data will be written. - * @param[in] p_hid_information Measurement to be encoded. - * - * @return Size of encoded data. - */ -static uint8_t encode_hid_information(uint8_t * p_encoded_buffer, - const ble_hids_hid_information_t * p_hid_information) -{ - uint8_t len = uint16_encode(p_hid_information->bcd_hid, p_encoded_buffer); - - p_encoded_buffer[len++] = p_hid_information->b_country_code; - p_encoded_buffer[len++] = p_hid_information->flags; - - APP_ERROR_CHECK_BOOL(len == ENCODED_HID_INFORMATION_LEN); - - return len; -} - - -/**@brief Function for adding HID Information characteristics. - * - * @param[in] p_hids HID Service structure. - * @param[in] p_hids_init Service initialization structure. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t hid_information_char_add(ble_hids_t * p_hids, const ble_hids_init_t * p_hids_init) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - uint8_t encoded_hid_information[ENCODED_HID_INFORMATION_LEN]; - uint8_t hid_info_len; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.read = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = NULL; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_HID_INFORMATION_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.read_perm = p_hids_init->hid_information.security_mode.read_perm; - attr_md.write_perm = p_hids_init->hid_information.security_mode.write_perm; - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - hid_info_len = encode_hid_information(encoded_hid_information, &p_hids_init->hid_information); - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = hid_info_len; - attr_char_value.init_offs = 0; - attr_char_value.max_len = attr_char_value.init_len; - attr_char_value.p_value = encoded_hid_information; - - return sd_ble_gatts_characteristic_add(p_hids->service_handle, &char_md, - &attr_char_value, - &p_hids->hid_information_handles); -} - - -/**@brief Function for adding HID Control Point characteristics. - * - * @param[in] p_hids HID Service structure. - * @param[in] p_sec_mode Characteristic security settings. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t hid_control_point_char_add(ble_hids_t * p_hids, - const ble_srv_security_mode_t * p_sec_mode) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - uint8_t initial_hid_control_point; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.write_wo_resp = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = NULL; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_HID_CONTROL_POINT_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.read_perm = p_sec_mode->read_perm; - attr_md.write_perm = p_sec_mode->write_perm; - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - initial_hid_control_point = INITIAL_VALUE_HID_CONTROL_POINT; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = sizeof(uint8_t); - attr_char_value.init_offs = 0; - attr_char_value.max_len = sizeof(uint8_t); - attr_char_value.p_value = &initial_hid_control_point; - - return sd_ble_gatts_characteristic_add(p_hids->service_handle, &char_md, - &attr_char_value, - &p_hids->hid_control_point_handles); -} - - -/**@brief Function for adding input report characteristics. - * - * @param[in] p_hids HID Service structure. - * @param[in] p_hids_init Service initialization structure. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t inp_rep_characteristics_add(ble_hids_t * p_hids, - const ble_hids_init_t * p_hids_init) -{ - if ((p_hids_init->inp_rep_count != 0) && (p_hids_init->p_inp_rep_array != NULL)) - { - uint8_t i; - - for (i = 0; i < p_hids_init->inp_rep_count; i++) - { - uint32_t err_code; - ble_hids_inp_rep_init_t * p_rep_init = &p_hids_init->p_inp_rep_array[i]; - ble_gatt_char_props_t properties; - - memset(&properties, 0, sizeof(properties)); - - properties.read = true; - properties.write = p_rep_init->security_mode.write_perm.sm ? 1 : 0; - properties.notify = true; - - err_code = rep_char_add(p_hids, - &properties, - p_rep_init->max_len, - &p_rep_init->rep_ref, - &p_rep_init->security_mode, - p_rep_init->read_resp, - &p_hids->inp_rep_array[i]); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - } - - return NRF_SUCCESS; -} - - -/**@brief Function for adding output report characteristics. - * - * @param[in] p_hids HID Service structure. - * @param[in] p_hids_init Service initialization structure. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t outp_rep_characteristics_add(ble_hids_t * p_hids, - const ble_hids_init_t * p_hids_init) -{ - if ((p_hids_init->outp_rep_count != 0) && (p_hids_init->p_outp_rep_array != NULL)) - { - uint8_t i; - - for (i = 0; i < p_hids_init->outp_rep_count; i++) - { - uint32_t err_code; - ble_hids_outp_rep_init_t * p_rep_init = &p_hids_init->p_outp_rep_array[i]; - ble_gatt_char_props_t properties; - - memset(&properties, 0, sizeof(properties)); - - properties.read = true; - properties.write = true; - properties.write_wo_resp = true; - - err_code = rep_char_add(p_hids, - &properties, - p_rep_init->max_len, - &p_rep_init->rep_ref, - &p_rep_init->security_mode, - p_rep_init->read_resp, - &p_hids->outp_rep_array[i]); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - } - - return NRF_SUCCESS; -} - - -/**@brief Function for adding feature report characteristics. - * - * @param[in] p_hids HID Service structure. - * @param[in] p_hids_init Service initialization structure. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t feature_rep_characteristics_add(ble_hids_t * p_hids, - const ble_hids_init_t * p_hids_init) -{ - if ((p_hids_init->feature_rep_count != 0) && (p_hids_init->p_feature_rep_array != NULL)) - { - uint8_t i; - - for (i = 0; i < p_hids_init->feature_rep_count; i++) - { - uint32_t err_code; - ble_hids_feature_rep_init_t * p_rep_init = &p_hids_init->p_feature_rep_array[i]; - ble_gatt_char_props_t properties; - - memset(&properties, 0, sizeof(properties)); - - properties.read = true; - properties.write = true; - - err_code = rep_char_add(p_hids, - &properties, - p_rep_init->max_len, - &p_rep_init->rep_ref, - &p_rep_init->security_mode, - p_rep_init->read_resp, - &p_hids->feature_rep_array[i]); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - } - - return NRF_SUCCESS; -} - - -/**@brief Function for adding included services. - * - * @param[in] p_hids HID Service structure. - * @param[in] p_hids_init Service initialization structure. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t includes_add(ble_hids_t * p_hids, const ble_hids_init_t * p_hids_init) -{ - uint32_t err_code; - uint8_t i; - uint16_t unused_include_handle; - - for (i = 0; i < p_hids_init->included_services_count; i++) - { - err_code = sd_ble_gatts_include_add(p_hids->service_handle, - p_hids_init->p_included_services_array[i], - &unused_include_handle); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - - return NRF_SUCCESS; -} - - -uint32_t ble_hids_init(ble_hids_t * p_hids, const ble_hids_init_t * p_hids_init) -{ - uint32_t err_code; - ble_uuid_t ble_uuid; - - if ((p_hids_init->inp_rep_count > BLE_HIDS_MAX_INPUT_REP) || - (p_hids_init->outp_rep_count > BLE_HIDS_MAX_OUTPUT_REP) || - (p_hids_init->feature_rep_count > BLE_HIDS_MAX_FEATURE_REP) - ) - { - return NRF_ERROR_INVALID_PARAM; - } - - // Initialize service structure. - p_hids->evt_handler = p_hids_init->evt_handler; - p_hids->error_handler = p_hids_init->error_handler; - p_hids->inp_rep_count = p_hids_init->inp_rep_count; - p_hids->outp_rep_count = p_hids_init->outp_rep_count; - p_hids->feature_rep_count = p_hids_init->feature_rep_count; - p_hids->conn_handle = BLE_CONN_HANDLE_INVALID; - - // Add service. - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_HUMAN_INTERFACE_DEVICE_SERVICE); - - err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, - &ble_uuid, - &p_hids->service_handle); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add includes. - err_code = includes_add(p_hids, p_hids_init); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - if (p_hids_init->is_kb || p_hids_init->is_mouse) - { - // Add Protocol Mode characteristic. - err_code = protocol_mode_char_add(p_hids, &p_hids_init->security_mode_protocol); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - - // Add Input Report characteristics (if any). - err_code = inp_rep_characteristics_add(p_hids, p_hids_init); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add Output Report characteristics (if any). - err_code = outp_rep_characteristics_add(p_hids, p_hids_init); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add Feature Report characteristic (if any). - err_code = feature_rep_characteristics_add(p_hids, p_hids_init); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add Report Map characteristic. - err_code = rep_map_char_add(p_hids, p_hids_init); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - if (p_hids_init->is_kb) - { - // Add Boot Keyboard Input Report characteristic. - err_code = boot_inp_rep_char_add(p_hids, - BLE_UUID_BOOT_KEYBOARD_INPUT_REPORT_CHAR, - BOOT_KB_INPUT_REPORT_MAX_SIZE, - &p_hids_init->security_mode_boot_kb_inp_rep, - &p_hids->boot_kb_inp_rep_handles); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add Boot Keyboard Output Report characteristic. - err_code = boot_kb_outp_rep_char_add(p_hids, p_hids_init); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - - if (p_hids_init->is_mouse) - { - // Add Boot Mouse Input Report characteristic. - err_code = boot_inp_rep_char_add(p_hids, - BLE_UUID_BOOT_MOUSE_INPUT_REPORT_CHAR, - BOOT_MOUSE_INPUT_REPORT_MAX_SIZE, - &p_hids_init->security_mode_boot_mouse_inp_rep, - &p_hids->boot_mouse_inp_rep_handles); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - - // Add HID Information characteristic. - err_code = hid_information_char_add(p_hids, p_hids_init); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add HID Control Point characteristic. - err_code = hid_control_point_char_add(p_hids, &p_hids_init->security_mode_ctrl_point); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - return NRF_SUCCESS; -} - - -uint32_t ble_hids_inp_rep_send(ble_hids_t * p_hids, - uint8_t rep_index, - uint16_t len, - uint8_t * p_data) -{ - uint32_t err_code; - - if (rep_index < p_hids->inp_rep_count) - { - ble_hids_rep_char_t * p_rep_char = &p_hids->inp_rep_array[rep_index]; - - if (p_hids->conn_handle != BLE_CONN_HANDLE_INVALID) - { - ble_gatts_hvx_params_t hvx_params; - uint16_t hvx_len = len; - - memset(&hvx_params, 0, sizeof(hvx_params)); - - hvx_params.handle = p_rep_char->char_handles.value_handle; - hvx_params.type = BLE_GATT_HVX_NOTIFICATION; - hvx_params.offset = 0; - hvx_params.p_len = &hvx_len; - hvx_params.p_data = p_data; - - err_code = sd_ble_gatts_hvx(p_hids->conn_handle, &hvx_params); - if ((err_code == NRF_SUCCESS) && (hvx_len != len)) - { - err_code = NRF_ERROR_DATA_SIZE; - } - } - else - { - err_code = NRF_ERROR_INVALID_STATE; - } - } - else - { - err_code = NRF_ERROR_INVALID_PARAM; - } - - return err_code; -} - - -uint32_t ble_hids_boot_kb_inp_rep_send(ble_hids_t * p_hids, uint16_t len, uint8_t * p_data) -{ - uint32_t err_code; - - if (p_hids->conn_handle != BLE_CONN_HANDLE_INVALID) - { - ble_gatts_hvx_params_t hvx_params; - uint16_t hvx_len = len; - - memset(&hvx_params, 0, sizeof(hvx_params)); - - hvx_params.handle = p_hids->boot_kb_inp_rep_handles.value_handle; - hvx_params.type = BLE_GATT_HVX_NOTIFICATION; - hvx_params.offset = 0; - hvx_params.p_len = &hvx_len; - hvx_params.p_data = p_data; - - err_code = sd_ble_gatts_hvx(p_hids->conn_handle, &hvx_params); - if ((err_code == NRF_SUCCESS) && (hvx_len != len)) - { - err_code = NRF_ERROR_DATA_SIZE; - } - } - else - { - err_code = NRF_ERROR_INVALID_STATE; - } - - return err_code; -} - - -uint32_t ble_hids_boot_mouse_inp_rep_send(ble_hids_t * p_hids, - uint8_t buttons, - int8_t x_delta, - int8_t y_delta, - uint16_t optional_data_len, - uint8_t * p_optional_data) -{ - uint32_t err_code; - - if (p_hids->conn_handle != BLE_CONN_HANDLE_INVALID) - { - uint16_t hvx_len = BOOT_MOUSE_INPUT_REPORT_MIN_SIZE + optional_data_len; - - if (hvx_len <= BOOT_MOUSE_INPUT_REPORT_MAX_SIZE) - { - uint8_t buffer[BOOT_MOUSE_INPUT_REPORT_MAX_SIZE]; - ble_gatts_hvx_params_t hvx_params; - - APP_ERROR_CHECK_BOOL(BOOT_MOUSE_INPUT_REPORT_MIN_SIZE == 3); - - // Build buffer - buffer[0] = buttons; - buffer[1] = (uint8_t)x_delta; - buffer[2] = (uint8_t)y_delta; - - if (optional_data_len > 0) - { - memcpy(&buffer[3], p_optional_data, optional_data_len); - } - - // Pass buffer to stack - memset(&hvx_params, 0, sizeof(hvx_params)); - - hvx_params.handle = p_hids->boot_mouse_inp_rep_handles.value_handle; - hvx_params.type = BLE_GATT_HVX_NOTIFICATION; - hvx_params.offset = 0; - hvx_params.p_len = &hvx_len; - hvx_params.p_data = buffer; - - err_code = sd_ble_gatts_hvx(p_hids->conn_handle, &hvx_params); - if ((err_code == NRF_SUCCESS) && - (hvx_len != BOOT_MOUSE_INPUT_REPORT_MIN_SIZE + optional_data_len) - ) - { - err_code = NRF_ERROR_DATA_SIZE; - } - } - else - { - err_code = NRF_ERROR_DATA_SIZE; - } - } - else - { - err_code = NRF_ERROR_INVALID_STATE; - } - - return err_code; -} - - -uint32_t ble_hids_outp_rep_get(ble_hids_t * p_hids, - uint8_t rep_index, - uint16_t len, - uint8_t offset, - uint8_t * p_outp_rep) -{ - ble_gatts_value_t gatts_value; - - // Initialize value struct. - memset(&gatts_value, 0, sizeof(gatts_value)); - - gatts_value.len = len; - gatts_value.offset = offset; - gatts_value.p_value = p_outp_rep; - - return sd_ble_gatts_value_get(p_hids->conn_handle, - p_hids->outp_rep_array[rep_index].char_handles.value_handle, - &gatts_value); -} - -/** - @} -*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hids/ble_hids.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hids/ble_hids.h deleted file mode 100644 index ff18e000ad..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hids/ble_hids.h +++ /dev/null @@ -1,314 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/** @file - * - * @defgroup ble_sdk_srv_hids Human Interface Device Service - * @{ - * @ingroup ble_sdk_srv - * @brief Human Interface Device Service module. - * - * @details This module implements the Human Interface Device Service with the corresponding set of - * characteristics. During initialization it adds the Human Interface Device Service and - * a set of characteristics as per the Human Interface Device Service specification and - * the user requirements to the BLE stack database. - * - * If enabled, notification of Input Report characteristics is performed when the - * application calls the corresponding ble_hids_xx_input_report_send() function. - * - * If an event handler is supplied by the application, the Human Interface Device Service - * will generate Human Interface Device Service events to the application. - * - * @note The application must propagate BLE stack events to the Human Interface Device Service - * module by calling ble_hids_on_ble_evt() from the @ref softdevice_handler callback. - * - * @note Attention! - * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile - * qualification listings, this section of source code must not be modified. - */ - -#ifndef BLE_HIDS_H__ -#define BLE_HIDS_H__ - -#include -#include -#include "ble.h" -#include "ble_srv_common.h" - -/** @name Report Type values - * @anchor BLE_HIDS_REPORT_TYPE @{ - */ -// Report Type values -#define BLE_HIDS_REP_TYPE_INPUT 1 -#define BLE_HIDS_REP_TYPE_OUTPUT 2 -#define BLE_HIDS_REP_TYPE_FEATURE 3 -/** @} */ - -// Maximum number of the various Report Types -#define BLE_HIDS_MAX_INPUT_REP 10 -#define BLE_HIDS_MAX_OUTPUT_REP 10 -#define BLE_HIDS_MAX_FEATURE_REP 10 - -// Information Flags -#define HID_INFO_FLAG_REMOTE_WAKE_MSK 0x01 -#define HID_INFO_FLAG_NORMALLY_CONNECTABLE_MSK 0x02 - -/**@brief HID Service characteristic id. */ -typedef struct -{ - uint16_t uuid; /**< UUID of characteristic. */ - uint8_t rep_type; /**< Type of report (only used for BLE_UUID_REPORT_CHAR, see @ref BLE_HIDS_REPORT_TYPE). */ - uint8_t rep_index; /**< Index of the characteristic (only used for BLE_UUID_REPORT_CHAR). */ -} ble_hids_char_id_t; - -/**@brief HID Service event type. */ -typedef enum -{ - BLE_HIDS_EVT_HOST_SUSP, /**< Suspend command received. */ - BLE_HIDS_EVT_HOST_EXIT_SUSP, /**< Exit suspend command received. */ - BLE_HIDS_EVT_NOTIF_ENABLED, /**< Notification enabled event. */ - BLE_HIDS_EVT_NOTIF_DISABLED, /**< Notification disabled event. */ - BLE_HIDS_EVT_REP_CHAR_WRITE, /**< A new value has been written to an Report characteristic. */ - BLE_HIDS_EVT_BOOT_MODE_ENTERED, /**< Boot mode entered. */ - BLE_HIDS_EVT_REPORT_MODE_ENTERED, /**< Report mode entered. */ - BLE_HIDS_EVT_REPORT_READ /**< Read with response */ -} ble_hids_evt_type_t; - -/**@brief HID Service event. */ -typedef struct -{ - ble_hids_evt_type_t evt_type; /**< Type of event. */ - union - { - struct - { - ble_hids_char_id_t char_id; /**< Id of characteristic for which notification has been started. */ - } notification; - struct - { - ble_hids_char_id_t char_id; /**< Id of characteristic having been written. */ - uint16_t offset; /**< Offset for the write operation. */ - uint16_t len; /**< Length of the incoming data. */ - uint8_t* data; /**< Incoming data, variable length */ - } char_write; - struct - { - ble_hids_char_id_t char_id; /**< Id of characteristic being read. */ - } char_auth_read; - } params; - ble_evt_t * p_ble_evt; /**< corresponding received ble event, NULL if not relevant */ -} ble_hids_evt_t; - -// Forward declaration of the ble_hids_t type. -typedef struct ble_hids_s ble_hids_t; - -/**@brief HID Service event handler type. */ -typedef void (*ble_hids_evt_handler_t) (ble_hids_t * p_hids, ble_hids_evt_t * p_evt); - -/**@brief HID Information characteristic value. */ -typedef struct -{ - uint16_t bcd_hid; /**< 16-bit unsigned integer representing version number of base USB HID Specification implemented by HID Device */ - uint8_t b_country_code; /**< Identifies which country the hardware is localized for. Most hardware is not localized and thus this value would be zero (0). */ - uint8_t flags; /**< See http://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.hid_information.xml */ - ble_srv_security_mode_t security_mode; /**< Security mode for the HID Information characteristic. */ -} ble_hids_hid_information_t; - -/**@brief HID Service Input Report characteristic init structure. This contains all options and - * data needed for initialization of one Input Report characteristic. */ -typedef struct -{ - uint16_t max_len; /**< Maximum length of characteristic value. */ - ble_srv_report_ref_t rep_ref; /**< Value of the Report Reference descriptor. */ - ble_srv_cccd_security_mode_t security_mode; /**< Security mode for the HID Input Report characteristic, including cccd. */ - uint8_t read_resp : 1; /**< Should application generate a response to read requests. */ -} ble_hids_inp_rep_init_t; - -/**@brief HID Service Output Report characteristic init structure. This contains all options and - * data needed for initialization of one Output Report characteristic. */ -typedef struct -{ - uint16_t max_len; /**< Maximum length of characteristic value. */ - ble_srv_report_ref_t rep_ref; /**< Value of the Report Reference descriptor. */ - ble_srv_cccd_security_mode_t security_mode; /**< Security mode for the HID Output Report characteristic, including cccd. */ - uint8_t read_resp : 1; /**< Should application generate a response to read requests. */ -} ble_hids_outp_rep_init_t; - -/**@brief HID Service Feature Report characteristic init structure. This contains all options and - * data needed for initialization of one Feature Report characteristic. */ -typedef struct -{ - uint16_t max_len; /**< Maximum length of characteristic value. */ - ble_srv_report_ref_t rep_ref; /**< Value of the Report Reference descriptor. */ - ble_srv_cccd_security_mode_t security_mode; /**< Security mode for the HID Service Feature Report characteristic, including cccd. */ - uint8_t read_resp : 1; /**< Should application generate a response to read requests. */ -} ble_hids_feature_rep_init_t; - -/**@brief HID Service Report Map characteristic init structure. This contains all options and data - * needed for initialization of the Report Map characteristic. */ -typedef struct -{ - uint8_t * p_data; /**< Report map data. */ - uint16_t data_len; /**< Length of report map data. */ - uint8_t ext_rep_ref_num; /**< Number of Optional External Report Reference descriptors. */ - ble_uuid_t * p_ext_rep_ref; /**< Optional External Report Reference descriptor (will be added if != NULL). */ - ble_srv_security_mode_t security_mode; /**< Security mode for the HID Service Report Map characteristic. */ -} ble_hids_rep_map_init_t; - -/**@brief HID Report characteristic structure. */ -typedef struct -{ - ble_gatts_char_handles_t char_handles; /**< Handles related to the Report characteristic. */ - uint16_t ref_handle; /**< Handle of the Report Reference descriptor. */ -} ble_hids_rep_char_t; - -/**@brief HID Service init structure. This contains all options and data needed for initialization - * of the service. */ -typedef struct -{ - ble_hids_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the HID Service. */ - ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ - bool is_kb; /**< TRUE if device is operating as a keyboard, FALSE if it is not. */ - bool is_mouse; /**< TRUE if device is operating as a mouse, FALSE if it is not. */ - uint8_t inp_rep_count; /**< Number of Input Report characteristics. */ - ble_hids_inp_rep_init_t * p_inp_rep_array; /**< Information about the Input Report characteristics. */ - uint8_t outp_rep_count; /**< Number of Output Report characteristics. */ - ble_hids_outp_rep_init_t * p_outp_rep_array; /**< Information about the Output Report characteristics. */ - uint8_t feature_rep_count; /**< Number of Feature Report characteristics. */ - ble_hids_feature_rep_init_t * p_feature_rep_array; /**< Information about the Feature Report characteristics. */ - ble_hids_rep_map_init_t rep_map; /**< Information nedeed for initialization of the Report Map characteristic. */ - ble_hids_hid_information_t hid_information; /**< Value of the HID Information characteristic. */ - uint8_t included_services_count; /**< Number of services to include in HID service. */ - uint16_t * p_included_services_array; /**< Array of services to include in HID service. */ - ble_srv_security_mode_t security_mode_protocol; /**< Security settings for HID service protocol attribute */ - ble_srv_security_mode_t security_mode_ctrl_point; /**< Security settings for HID service Control Point attribute */ - ble_srv_cccd_security_mode_t security_mode_boot_mouse_inp_rep; /**< Security settings for HID service Mouse input report attribute */ - ble_srv_cccd_security_mode_t security_mode_boot_kb_inp_rep; /**< Security settings for HID service Keyboard input report attribute */ - ble_srv_security_mode_t security_mode_boot_kb_outp_rep; /**< Security settings for HID service Keyboard output report attribute */ -} ble_hids_init_t; - -/**@brief HID Service structure. This contains various status information for the service. */ -struct ble_hids_s -{ - ble_hids_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the HID Service. */ - ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ - uint16_t service_handle; /**< Handle of HID Service (as provided by the BLE stack). */ - ble_gatts_char_handles_t protocol_mode_handles; /**< Handles related to the Protocol Mode characteristic (will only be created if ble_hids_init_t.is_kb or ble_hids_init_t.is_mouse is set). */ - uint8_t inp_rep_count; /**< Number of Input Report characteristics. */ - ble_hids_rep_char_t inp_rep_array[BLE_HIDS_MAX_INPUT_REP]; /**< Information about the Input Report characteristics. */ - uint8_t outp_rep_count; /**< Number of Output Report characteristics. */ - ble_hids_rep_char_t outp_rep_array[BLE_HIDS_MAX_OUTPUT_REP]; /**< Information about the Output Report characteristics. */ - uint8_t feature_rep_count; /**< Number of Feature Report characteristics. */ - ble_hids_rep_char_t feature_rep_array[BLE_HIDS_MAX_FEATURE_REP]; /**< Information about the Feature Report characteristics. */ - ble_gatts_char_handles_t rep_map_handles; /**< Handles related to the Report Map characteristic. */ - uint16_t rep_map_ext_rep_ref_handle; /**< Handle of the Report Map External Report Reference descriptor. */ - ble_gatts_char_handles_t boot_kb_inp_rep_handles; /**< Handles related to the Boot Keyboard Input Report characteristic (will only be created if ble_hids_init_t.is_kb is set). */ - ble_gatts_char_handles_t boot_kb_outp_rep_handles; /**< Handles related to the Boot Keyboard Output Report characteristic (will only be created if ble_hids_init_t.is_kb is set). */ - ble_gatts_char_handles_t boot_mouse_inp_rep_handles; /**< Handles related to the Boot Mouse Input Report characteristic (will only be created if ble_hids_init_t.is_mouse is set). */ - ble_gatts_char_handles_t hid_information_handles; /**< Handles related to the Report Map characteristic. */ - ble_gatts_char_handles_t hid_control_point_handles; /**< Handles related to the Report Map characteristic. */ - uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ -}; - -/**@brief Function for initializing the HID Service. - * - * @param[out] p_hids HID Service structure. This structure will have to be supplied by the - * application. It will be initialized by this function, and will later be - * used to identify this particular service instance. - * @param[in] p_hids_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. - */ -uint32_t ble_hids_init(ble_hids_t * p_hids, const ble_hids_init_t * p_hids_init); - -/**@brief Function for handling the Application's BLE Stack events. - * - * @details Handles all events from the BLE stack of interest to the HID Service. - * - * @param[in] p_hids HID Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -void ble_hids_on_ble_evt(ble_hids_t * p_hids, ble_evt_t * p_ble_evt); - -/**@brief Function for sending Input Report. - * - * @details Sends data on an Input Report characteristic. - * - * @param[in] p_hids HID Service structure. - * @param[in] rep_index Index of the characteristic (corresponding to the index in - * ble_hids_t.inp_rep_array as passed to ble_hids_init()). - * @param[in] len Length of data to be sent. - * @param[in] p_data Pointer to data to be sent. - * - * @return NRF_SUCCESS on successful sending of input report, otherwise an error code. - */ -uint32_t ble_hids_inp_rep_send(ble_hids_t * p_hids, - uint8_t rep_index, - uint16_t len, - uint8_t * p_data); - -/**@brief Function for sending Boot Keyboard Input Report. - * - * @details Sends data on an Boot Keyboard Input Report characteristic. - * - * @param[in] p_hids HID Service structure. - * @param[in] len Length of data to be sent. - * @param[in] p_data Pointer to data to be sent. - * - * @return NRF_SUCCESS on successful sending of the report, otherwise an error code. - */ -uint32_t ble_hids_boot_kb_inp_rep_send(ble_hids_t * p_hids, - uint16_t len, - uint8_t * p_data); - -/**@brief Function for sending Boot Mouse Input Report. - * - * @details Sends data on an Boot Mouse Input Report characteristic. - * - * @param[in] p_hids HID Service structure. - * @param[in] buttons State of mouse buttons. - * @param[in] x_delta Horizontal movement. - * @param[in] y_delta Vertical movement. - * @param[in] optional_data_len Length of optional part of Boot Mouse Input Report. - * @param[in] p_optional_data Optional part of Boot Mouse Input Report. - * - * @return NRF_SUCCESS on successful sending of the report, otherwise an error code. - */ -uint32_t ble_hids_boot_mouse_inp_rep_send(ble_hids_t * p_hids, - uint8_t buttons, - int8_t x_delta, - int8_t y_delta, - uint16_t optional_data_len, - uint8_t * p_optional_data); - -/**@brief Function for getting the current value of Output Report from the stack. - * - * @details Fetches the current value of the output report characteristic from the stack. - * - * @param[in] p_hids HID Service structure. - * @param[in] rep_index Index of the characteristic (corresponding to the index in - * ble_hids_t.outp_rep_array as passed to ble_hids_init()). - * @param[in] len Length of output report needed. - * @param[in] offset Offset in bytes to read from. - * @param[out] p_outp_rep Pointer to the output report. - * - * @return NRF_SUCCESS on successful read of the report, otherwise an error code. - */ -uint32_t ble_hids_outp_rep_get(ble_hids_t * p_hids, - uint8_t rep_index, - uint16_t len, - uint8_t offset, - uint8_t * p_outp_rep); - -#endif // BLE_HIDS_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs/ble_hrs.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs/ble_hrs.c deleted file mode 100644 index 4975f0736b..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs/ble_hrs.c +++ /dev/null @@ -1,440 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/* Attention! -* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile -* qualification listings, this section of source code must not be modified. -*/ - -#include "ble_hrs.h" -#include -#include "nordic_common.h" -#include "ble_l2cap.h" -#include "ble_srv_common.h" -#include "app_util.h" - - -#define OPCODE_LENGTH 1 /**< Length of opcode inside Heart Rate Measurement packet. */ -#define HANDLE_LENGTH 2 /**< Length of handle inside Heart Rate Measurement packet. */ -#define MAX_HRM_LEN (BLE_L2CAP_MTU_DEF - OPCODE_LENGTH - HANDLE_LENGTH) /**< Maximum size of a transmitted Heart Rate Measurement. */ - -#define INITIAL_VALUE_HRM 0 /**< Initial Heart Rate Measurement value. */ - -// Heart Rate Measurement flag bits -#define HRM_FLAG_MASK_HR_VALUE_16BIT (0x01 << 0) /**< Heart Rate Value Format bit. */ -#define HRM_FLAG_MASK_SENSOR_CONTACT_DETECTED (0x01 << 1) /**< Sensor Contact Detected bit. */ -#define HRM_FLAG_MASK_SENSOR_CONTACT_SUPPORTED (0x01 << 2) /**< Sensor Contact Supported bit. */ -#define HRM_FLAG_MASK_EXPENDED_ENERGY_INCLUDED (0x01 << 3) /**< Energy Expended Status bit. Feature Not Supported */ -#define HRM_FLAG_MASK_RR_INTERVAL_INCLUDED (0x01 << 4) /**< RR-Interval bit. */ - - -/**@brief Function for handling the Connect event. - * - * @param[in] p_hrs Heart Rate Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_connect(ble_hrs_t * p_hrs, ble_evt_t * p_ble_evt) -{ - p_hrs->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; -} - - -/**@brief Function for handling the Disconnect event. - * - * @param[in] p_hrs Heart Rate Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_disconnect(ble_hrs_t * p_hrs, ble_evt_t * p_ble_evt) -{ - UNUSED_PARAMETER(p_ble_evt); - p_hrs->conn_handle = BLE_CONN_HANDLE_INVALID; -} - - -/**@brief Function for handling write events to the Heart Rate Measurement characteristic. - * - * @param[in] p_hrs Heart Rate Service structure. - * @param[in] p_evt_write Write event received from the BLE stack. - */ -static void on_hrm_cccd_write(ble_hrs_t * p_hrs, ble_gatts_evt_write_t * p_evt_write) -{ - if (p_evt_write->len == 2) - { - // CCCD written, update notification state - if (p_hrs->evt_handler != NULL) - { - ble_hrs_evt_t evt; - - if (ble_srv_is_notification_enabled(p_evt_write->data)) - { - evt.evt_type = BLE_HRS_EVT_NOTIFICATION_ENABLED; - } - else - { - evt.evt_type = BLE_HRS_EVT_NOTIFICATION_DISABLED; - } - - p_hrs->evt_handler(p_hrs, &evt); - } - } -} - - -/**@brief Function for handling the Write event. - * - * @param[in] p_hrs Heart Rate Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_write(ble_hrs_t * p_hrs, ble_evt_t * p_ble_evt) -{ - ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; - - if (p_evt_write->handle == p_hrs->hrm_handles.cccd_handle) - { - on_hrm_cccd_write(p_hrs, p_evt_write); - } -} - - -void ble_hrs_on_ble_evt(ble_hrs_t * p_hrs, ble_evt_t * p_ble_evt) -{ - switch (p_ble_evt->header.evt_id) - { - case BLE_GAP_EVT_CONNECTED: - on_connect(p_hrs, p_ble_evt); - break; - - case BLE_GAP_EVT_DISCONNECTED: - on_disconnect(p_hrs, p_ble_evt); - break; - - case BLE_GATTS_EVT_WRITE: - on_write(p_hrs, p_ble_evt); - break; - - default: - // No implementation needed. - break; - } -} - - -/**@brief Function for encoding a Heart Rate Measurement. - * - * @param[in] p_hrs Heart Rate Service structure. - * @param[in] heart_rate Measurement to be encoded. - * @param[out] p_encoded_buffer Buffer where the encoded data will be written. - * - * @return Size of encoded data. - */ -static uint8_t hrm_encode(ble_hrs_t * p_hrs, uint16_t heart_rate, uint8_t * p_encoded_buffer) -{ - uint8_t flags = 0; - uint8_t len = 1; - int i; - - // Set sensor contact related flags - if (p_hrs->is_sensor_contact_supported) - { - flags |= HRM_FLAG_MASK_SENSOR_CONTACT_SUPPORTED; - } - if (p_hrs->is_sensor_contact_detected) - { - flags |= HRM_FLAG_MASK_SENSOR_CONTACT_DETECTED; - } - - // Encode heart rate measurement - if (heart_rate > 0xff) - { - flags |= HRM_FLAG_MASK_HR_VALUE_16BIT; - len += uint16_encode(heart_rate, &p_encoded_buffer[len]); - } - else - { - p_encoded_buffer[len++] = (uint8_t)heart_rate; - } - - // Encode rr_interval values - if (p_hrs->rr_interval_count > 0) - { - flags |= HRM_FLAG_MASK_RR_INTERVAL_INCLUDED; - } - for (i = 0; i < p_hrs->rr_interval_count; i++) - { - if (len + sizeof(uint16_t) > MAX_HRM_LEN) - { - // Not all stored rr_interval values can fit into the encoded hrm, - // move the remaining values to the start of the buffer. - memmove(&p_hrs->rr_interval[0], - &p_hrs->rr_interval[i], - (p_hrs->rr_interval_count - i) * sizeof(uint16_t)); - break; - } - len += uint16_encode(p_hrs->rr_interval[i], &p_encoded_buffer[len]); - } - p_hrs->rr_interval_count -= i; - - // Add flags - p_encoded_buffer[0] = flags; - - return len; -} - - -/**@brief Function for adding the Heart Rate Measurement characteristic. - * - * @param[in] p_hrs Heart Rate Service structure. - * @param[in] p_hrs_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t heart_rate_measurement_char_add(ble_hrs_t * p_hrs, - const ble_hrs_init_t * p_hrs_init) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_md_t cccd_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - uint8_t encoded_initial_hrm[MAX_HRM_LEN]; - - memset(&cccd_md, 0, sizeof(cccd_md)); - - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); - cccd_md.write_perm = p_hrs_init->hrs_hrm_attr_md.cccd_write_perm; - cccd_md.vloc = BLE_GATTS_VLOC_STACK; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.notify = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = &cccd_md; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_HEART_RATE_MEASUREMENT_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.read_perm = p_hrs_init->hrs_hrm_attr_md.read_perm; - attr_md.write_perm = p_hrs_init->hrs_hrm_attr_md.write_perm; - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 1; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = hrm_encode(p_hrs, INITIAL_VALUE_HRM, encoded_initial_hrm); - attr_char_value.init_offs = 0; - attr_char_value.max_len = MAX_HRM_LEN; - attr_char_value.p_value = encoded_initial_hrm; - - return sd_ble_gatts_characteristic_add(p_hrs->service_handle, - &char_md, - &attr_char_value, - &p_hrs->hrm_handles); -} - - -/**@brief Function for adding the Body Sensor Location characteristic. - * - * @param[in] p_hrs Heart Rate Service structure. - * @param[in] p_hrs_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t body_sensor_location_char_add(ble_hrs_t * p_hrs, const ble_hrs_init_t * p_hrs_init) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.read = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = NULL; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_BODY_SENSOR_LOCATION_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.read_perm = p_hrs_init->hrs_bsl_attr_md.read_perm; - attr_md.write_perm = p_hrs_init->hrs_bsl_attr_md.write_perm; - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = sizeof (uint8_t); - attr_char_value.init_offs = 0; - attr_char_value.max_len = sizeof (uint8_t); - attr_char_value.p_value = p_hrs_init->p_body_sensor_location; - - return sd_ble_gatts_characteristic_add(p_hrs->service_handle, - &char_md, - &attr_char_value, - &p_hrs->bsl_handles); -} - - -uint32_t ble_hrs_init(ble_hrs_t * p_hrs, const ble_hrs_init_t * p_hrs_init) -{ - uint32_t err_code; - ble_uuid_t ble_uuid; - - // Initialize service structure - p_hrs->evt_handler = p_hrs_init->evt_handler; - p_hrs->is_sensor_contact_supported = p_hrs_init->is_sensor_contact_supported; - p_hrs->conn_handle = BLE_CONN_HANDLE_INVALID; - p_hrs->is_sensor_contact_detected = false; - p_hrs->rr_interval_count = 0; - - // Add service - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_HEART_RATE_SERVICE); - - err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, - &ble_uuid, - &p_hrs->service_handle); - - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add heart rate measurement characteristic - err_code = heart_rate_measurement_char_add(p_hrs, p_hrs_init); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - if (p_hrs_init->p_body_sensor_location != NULL) - { - // Add body sensor location characteristic - err_code = body_sensor_location_char_add(p_hrs, p_hrs_init); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - - return NRF_SUCCESS; -} - - -uint32_t ble_hrs_heart_rate_measurement_send(ble_hrs_t * p_hrs, uint16_t heart_rate) -{ - uint32_t err_code; - - // Send value if connected and notifying - if (p_hrs->conn_handle != BLE_CONN_HANDLE_INVALID) - { - uint8_t encoded_hrm[MAX_HRM_LEN]; - uint16_t len; - uint16_t hvx_len; - ble_gatts_hvx_params_t hvx_params; - - len = hrm_encode(p_hrs, heart_rate, encoded_hrm); - hvx_len = len; - - memset(&hvx_params, 0, sizeof(hvx_params)); - - hvx_params.handle = p_hrs->hrm_handles.value_handle; - hvx_params.type = BLE_GATT_HVX_NOTIFICATION; - hvx_params.offset = 0; - hvx_params.p_len = &hvx_len; - hvx_params.p_data = encoded_hrm; - - err_code = sd_ble_gatts_hvx(p_hrs->conn_handle, &hvx_params); - if ((err_code == NRF_SUCCESS) && (hvx_len != len)) - { - err_code = NRF_ERROR_DATA_SIZE; - } - } - else - { - err_code = NRF_ERROR_INVALID_STATE; - } - - return err_code; -} - - -void ble_hrs_rr_interval_add(ble_hrs_t * p_hrs, uint16_t rr_interval) -{ - if (p_hrs->rr_interval_count == BLE_HRS_MAX_BUFFERED_RR_INTERVALS) - { - // The rr_interval buffer is full, delete the oldest value - memmove(&p_hrs->rr_interval[0], - &p_hrs->rr_interval[1], - (BLE_HRS_MAX_BUFFERED_RR_INTERVALS - 1) * sizeof(uint16_t)); - p_hrs->rr_interval_count--; - } - - // Add new value - p_hrs->rr_interval[p_hrs->rr_interval_count++] = rr_interval; -} - - -bool ble_hrs_rr_interval_buffer_is_full(ble_hrs_t * p_hrs) -{ - return (p_hrs->rr_interval_count == BLE_HRS_MAX_BUFFERED_RR_INTERVALS); -} - - -uint32_t ble_hrs_sensor_contact_supported_set(ble_hrs_t * p_hrs, bool is_sensor_contact_supported) -{ - // Check if we are connected to peer - if (p_hrs->conn_handle == BLE_CONN_HANDLE_INVALID) - { - p_hrs->is_sensor_contact_supported = is_sensor_contact_supported; - return NRF_SUCCESS; - } - else - { - return NRF_ERROR_INVALID_STATE; - } -} - - -void ble_hrs_sensor_contact_detected_update(ble_hrs_t * p_hrs, bool is_sensor_contact_detected) -{ - p_hrs->is_sensor_contact_detected = is_sensor_contact_detected; -} - - -uint32_t ble_hrs_body_sensor_location_set(ble_hrs_t * p_hrs, uint8_t body_sensor_location) -{ - ble_gatts_value_t gatts_value; - - // Initialize value struct. - memset(&gatts_value, 0, sizeof(gatts_value)); - - gatts_value.len = sizeof(uint8_t); - gatts_value.offset = 0; - gatts_value.p_value = &body_sensor_location; - - return sd_ble_gatts_value_set(p_hrs->conn_handle, p_hrs->bsl_handles.value_handle, &gatts_value); -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs/ble_hrs.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs/ble_hrs.h deleted file mode 100644 index 7936091db3..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs/ble_hrs.h +++ /dev/null @@ -1,192 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/** @file - * - * @defgroup ble_sdk_srv_hrs Heart Rate Service - * @{ - * @ingroup ble_sdk_srv - * @brief Heart Rate Service module. - * - * @details This module implements the Heart Rate Service with the Heart Rate Measurement, - * Body Sensor Location and Heart Rate Control Point characteristics. - * During initialization it adds the Heart Rate Service and Heart Rate Measurement - * characteristic to the BLE stack database. Optionally it also adds the - * Body Sensor Location and Heart Rate Control Point characteristics. - * - * If enabled, notification of the Heart Rate Measurement characteristic is performed - * when the application calls ble_hrs_heart_rate_measurement_send(). - * - * The Heart Rate Service also provides a set of functions for manipulating the - * various fields in the Heart Rate Measurement characteristic, as well as setting - * the Body Sensor Location characteristic value. - * - * If an event handler is supplied by the application, the Heart Rate Service will - * generate Heart Rate Service events to the application. - * - * @note The application must propagate BLE stack events to the Heart Rate Service module by calling - * ble_hrs_on_ble_evt() from the @ref softdevice_handler callback. - * - * @note Attention! - * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile - * qualification listings, this section of source code must not be modified. - */ - -#ifndef BLE_HRS_H__ -#define BLE_HRS_H__ - -#include -#include -#include "ble.h" -#include "ble_srv_common.h" - -// Body Sensor Location values -#define BLE_HRS_BODY_SENSOR_LOCATION_OTHER 0 -#define BLE_HRS_BODY_SENSOR_LOCATION_CHEST 1 -#define BLE_HRS_BODY_SENSOR_LOCATION_WRIST 2 -#define BLE_HRS_BODY_SENSOR_LOCATION_FINGER 3 -#define BLE_HRS_BODY_SENSOR_LOCATION_HAND 4 -#define BLE_HRS_BODY_SENSOR_LOCATION_EAR_LOBE 5 -#define BLE_HRS_BODY_SENSOR_LOCATION_FOOT 6 - -#define BLE_HRS_MAX_BUFFERED_RR_INTERVALS 20 /**< Size of RR Interval buffer inside service. */ - -/**@brief Heart Rate Service event type. */ -typedef enum -{ - BLE_HRS_EVT_NOTIFICATION_ENABLED, /**< Heart Rate value notification enabled event. */ - BLE_HRS_EVT_NOTIFICATION_DISABLED /**< Heart Rate value notification disabled event. */ -} ble_hrs_evt_type_t; - -/**@brief Heart Rate Service event. */ -typedef struct -{ - ble_hrs_evt_type_t evt_type; /**< Type of event. */ -} ble_hrs_evt_t; - -// Forward declaration of the ble_hrs_t type. -typedef struct ble_hrs_s ble_hrs_t; - -/**@brief Heart Rate Service event handler type. */ -typedef void (*ble_hrs_evt_handler_t) (ble_hrs_t * p_hrs, ble_hrs_evt_t * p_evt); - -/**@brief Heart Rate Service init structure. This contains all options and data needed for - * initialization of the service. */ -typedef struct -{ - ble_hrs_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Heart Rate Service. */ - bool is_sensor_contact_supported; /**< Determines if sensor contact detection is to be supported. */ - uint8_t * p_body_sensor_location; /**< If not NULL, initial value of the Body Sensor Location characteristic. */ - ble_srv_cccd_security_mode_t hrs_hrm_attr_md; /**< Initial security level for heart rate service measurement attribute */ - ble_srv_security_mode_t hrs_bsl_attr_md; /**< Initial security level for body sensor location attribute */ -} ble_hrs_init_t; - -/**@brief Heart Rate Service structure. This contains various status information for the service. */ -struct ble_hrs_s -{ - ble_hrs_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Heart Rate Service. */ - bool is_expended_energy_supported; /**< TRUE if Expended Energy measurement is supported. */ - bool is_sensor_contact_supported; /**< TRUE if sensor contact detection is supported. */ - uint16_t service_handle; /**< Handle of Heart Rate Service (as provided by the BLE stack). */ - ble_gatts_char_handles_t hrm_handles; /**< Handles related to the Heart Rate Measurement characteristic. */ - ble_gatts_char_handles_t bsl_handles; /**< Handles related to the Body Sensor Location characteristic. */ - ble_gatts_char_handles_t hrcp_handles; /**< Handles related to the Heart Rate Control Point characteristic. */ - uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ - bool is_sensor_contact_detected; /**< TRUE if sensor contact has been detected. */ - uint16_t rr_interval[BLE_HRS_MAX_BUFFERED_RR_INTERVALS]; /**< Set of RR Interval measurements since the last Heart Rate Measurement transmission. */ - uint16_t rr_interval_count; /**< Number of RR Interval measurements since the last Heart Rate Measurement transmission. */ -}; - -/**@brief Function for initializing the Heart Rate Service. - * - * @param[out] p_hrs Heart Rate Service structure. This structure will have to be supplied by - * the application. It will be initialized by this function, and will later - * be used to identify this particular service instance. - * @param[in] p_hrs_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. - */ -uint32_t ble_hrs_init(ble_hrs_t * p_hrs, const ble_hrs_init_t * p_hrs_init); - -/**@brief Function for handling the Application's BLE Stack events. - * - * @details Handles all events from the BLE stack of interest to the Heart Rate Service. - * - * @param[in] p_hrs Heart Rate Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -void ble_hrs_on_ble_evt(ble_hrs_t * p_hrs, ble_evt_t * p_ble_evt); - -/**@brief Function for sending heart rate measurement if notification has been enabled. - * - * @details The application calls this function after having performed a heart rate measurement. - * If notification has been enabled, the heart rate measurement data is encoded and sent to - * the client. - * - * @param[in] p_hrs Heart Rate Service structure. - * @param[in] heart_rate New heart rate measurement. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -uint32_t ble_hrs_heart_rate_measurement_send(ble_hrs_t * p_hrs, uint16_t heart_rate); - -/**@brief Function for adding a RR Interval measurement to the RR Interval buffer. - * - * @details All buffered RR Interval measurements will be included in the next heart rate - * measurement message, up to the maximum number of measurements that will fit into the - * message. If the buffer is full, the oldest measurement in the buffer will be deleted. - * - * @param[in] p_hrs Heart Rate Service structure. - * @param[in] rr_interval New RR Interval measurement (will be buffered until the next - * transmission of Heart Rate Measurement). - */ -void ble_hrs_rr_interval_add(ble_hrs_t * p_hrs, uint16_t rr_interval); - -/**@brief Function for checking if RR Interval buffer is full. - * - * @param[in] p_hrs Heart Rate Service structure. - * - * @return true if RR Interval buffer is full, false otherwise. - */ -bool ble_hrs_rr_interval_buffer_is_full(ble_hrs_t * p_hrs); - -/**@brief Function for setting the state of the Sensor Contact Supported bit. - * - * @param[in] p_hrs Heart Rate Service structure. - * @param[in] is_sensor_contact_supported New state of the Sensor Contact Supported bit. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -uint32_t ble_hrs_sensor_contact_supported_set(ble_hrs_t * p_hrs, bool is_sensor_contact_supported); - -/**@brief Function for setting the state of the Sensor Contact Detected bit. - * - * @param[in] p_hrs Heart Rate Service structure. - * @param[in] is_sensor_contact_detected TRUE if sensor contact is detected, FALSE otherwise. - */ -void ble_hrs_sensor_contact_detected_update(ble_hrs_t * p_hrs, bool is_sensor_contact_detected); - -/**@brief Function for setting the Body Sensor Location. - * - * @details Sets a new value of the Body Sensor Location characteristic. The new value will be sent - * to the client the next time the client reads the Body Sensor Location characteristic. - * - * @param[in] p_hrs Heart Rate Service structure. - * @param[in] body_sensor_location New Body Sensor Location. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -uint32_t ble_hrs_body_sensor_location_set(ble_hrs_t * p_hrs, uint8_t body_sensor_location); - -#endif // BLE_HRS_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs_c/ble_hrs_c.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs_c/ble_hrs_c.c deleted file mode 100644 index a17839e0dd..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs_c/ble_hrs_c.c +++ /dev/null @@ -1,331 +0,0 @@ -/* - * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is confidential property of Nordic Semiconductor. The use, - * copying, transfer or disclosure of such information is prohibited except by express written - * agreement with Nordic Semiconductor. - * - */ - -/**@cond To Make Doxygen skip documentation generation for this file. - * @{ - */ - -#include "ble_hrs_c.h" -#include "ble_db_discovery.h" -#include "ble_types.h" -#include "ble_srv_common.h" -#include "ble_gattc.h" -#include "app_trace.h" -#include "sdk_common.h" -#include "nrf_log.h" - -#define LOG NRF_LOG_PRINTF_DEBUG /**< Debug logger macro that will be used in this file to do logging of important information over UART. */ - -#define HRM_FLAG_MASK_HR_16BIT (0x01 << 0) /**< Bit mask used to extract the type of heart rate value. This is used to find if the received heart rate is a 16 bit value or an 8 bit value. */ - -#define TX_BUFFER_MASK 0x07 /**< TX Buffer mask, must be a mask of continuous zeroes, followed by continuous sequence of ones: 000...111. */ -#define TX_BUFFER_SIZE (TX_BUFFER_MASK + 1) /**< Size of send buffer, which is 1 higher than the mask. */ - -#define WRITE_MESSAGE_LENGTH BLE_CCCD_VALUE_LEN /**< Length of the write message for CCCD. */ -#define WRITE_MESSAGE_LENGTH BLE_CCCD_VALUE_LEN /**< Length of the write message for CCCD. */ - -typedef enum -{ - READ_REQ, /**< Type identifying that this tx_message is a read request. */ - WRITE_REQ /**< Type identifying that this tx_message is a write request. */ -} tx_request_t; - -/**@brief Structure for writing a message to the peer, i.e. CCCD. - */ -typedef struct -{ - uint8_t gattc_value[WRITE_MESSAGE_LENGTH]; /**< The message to write. */ - ble_gattc_write_params_t gattc_params; /**< GATTC parameters for this message. */ -} write_params_t; - -/**@brief Structure for holding data to be transmitted to the connected central. - */ -typedef struct -{ - uint16_t conn_handle; /**< Connection handle to be used when transmitting this message. */ - tx_request_t type; /**< Type of this message, i.e. read or write message. */ - union - { - uint16_t read_handle; /**< Read request message. */ - write_params_t write_req; /**< Write request message. */ - } req; -} tx_message_t; - - -static tx_message_t m_tx_buffer[TX_BUFFER_SIZE]; /**< Transmit buffer for messages to be transmitted to the central. */ -static uint32_t m_tx_insert_index = 0; /**< Current index in the transmit buffer where the next message should be inserted. */ -static uint32_t m_tx_index = 0; /**< Current index in the transmit buffer from where the next message to be transmitted resides. */ - - -/**@brief Function for passing any pending request from the buffer to the stack. - */ -static void tx_buffer_process(void) -{ - if (m_tx_index != m_tx_insert_index) - { - uint32_t err_code; - - if (m_tx_buffer[m_tx_index].type == READ_REQ) - { - err_code = sd_ble_gattc_read(m_tx_buffer[m_tx_index].conn_handle, - m_tx_buffer[m_tx_index].req.read_handle, - 0); - } - else - { - err_code = sd_ble_gattc_write(m_tx_buffer[m_tx_index].conn_handle, - &m_tx_buffer[m_tx_index].req.write_req.gattc_params); - } - if (err_code == NRF_SUCCESS) - { - LOG("[HRS_C]: SD Read/Write API returns Success..\r\n"); - m_tx_index++; - m_tx_index &= TX_BUFFER_MASK; - } - else - { - LOG("[HRS_C]: SD Read/Write API returns error. This message sending will be " - "attempted again..\r\n"); - } - } -} - - -/**@brief Function for handling write response events. - * - * @param[in] p_ble_hrs_c Pointer to the Heart Rate Client structure. - * @param[in] p_ble_evt Pointer to the BLE event received. - */ -static void on_write_rsp(ble_hrs_c_t * p_ble_hrs_c, const ble_evt_t * p_ble_evt) -{ - // Check if the event if on the link for this instance - if (p_ble_hrs_c->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) - { - return; - } - // Check if there is any message to be sent across to the peer and send it. - tx_buffer_process(); -} - - -/**@brief Function for handling Handle Value Notification received from the SoftDevice. - * - * @details This function will uses the Handle Value Notification received from the SoftDevice - * and checks if it is a notification of the heart rate measurement from the peer. If - * it is, this function will decode the heart rate measurement and send it to the - * application. - * - * @param[in] p_ble_hrs_c Pointer to the Heart Rate Client structure. - * @param[in] p_ble_evt Pointer to the BLE event received. - */ -static void on_hvx(ble_hrs_c_t * p_ble_hrs_c, const ble_evt_t * p_ble_evt) -{ - // Check if the event is on the link for this instance - if (p_ble_hrs_c->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) - { - LOG("[HRS_C]: received HVX on link 0x%x, not associated to this instance, ignore\r\n", - p_ble_evt->evt.gattc_evt.conn_handle); - return; - } - LOG("[HRS_C]: received HVX on handle 0x%x, hrm_handle 0x%x\r\n", - p_ble_evt->evt.gattc_evt.params.hvx.handle, - p_ble_hrs_c->peer_hrs_db.hrm_handle); - // Check if this is a heart rate notification. - if (p_ble_evt->evt.gattc_evt.params.hvx.handle == p_ble_hrs_c->peer_hrs_db.hrm_handle) - { - ble_hrs_c_evt_t ble_hrs_c_evt; - uint32_t index = 0; - - ble_hrs_c_evt.evt_type = BLE_HRS_C_EVT_HRM_NOTIFICATION; - ble_hrs_c_evt.conn_handle = p_ble_hrs_c->conn_handle; - - if (!(p_ble_evt->evt.gattc_evt.params.hvx.data[index++] & HRM_FLAG_MASK_HR_16BIT)) - { - // 8 Bit heart rate value received. - ble_hrs_c_evt.params.hrm.hr_value = p_ble_evt->evt.gattc_evt.params.hvx.data[index++]; //lint !e415 suppress Lint Warning 415: Likely access out of bond - } - else - { - // 16 bit heart rate value received. - ble_hrs_c_evt.params.hrm.hr_value = - uint16_decode(&(p_ble_evt->evt.gattc_evt.params.hvx.data[index])); - } - - p_ble_hrs_c->evt_handler(p_ble_hrs_c, &ble_hrs_c_evt); - } -} - - -/**@brief Function for handling Disconnected event received from the SoftDevice. - * - * @details This function check if the disconnect event is happening on the link - * associated with the current instance of the module, if so it will set its - * conn_handle to invalid. - * - * @param[in] p_ble_hrs_c Pointer to the Heart Rate Client structure. - * @param[in] p_ble_evt Pointer to the BLE event received. - */ -static void on_disconnected(ble_hrs_c_t * p_ble_hrs_c, const ble_evt_t * p_ble_evt) -{ - if (p_ble_hrs_c->conn_handle == p_ble_evt->evt.gap_evt.conn_handle) - { - p_ble_hrs_c->conn_handle = BLE_CONN_HANDLE_INVALID; - p_ble_hrs_c->peer_hrs_db.hrm_cccd_handle = BLE_GATT_HANDLE_INVALID; - p_ble_hrs_c->peer_hrs_db.hrm_handle = BLE_GATT_HANDLE_INVALID; - } -} - - -void ble_hrs_on_db_disc_evt(ble_hrs_c_t * p_ble_hrs_c, const ble_db_discovery_evt_t * p_evt) -{ - // Check if the Heart Rate Service was discovered. - if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE && - p_evt->params.discovered_db.srv_uuid.uuid == BLE_UUID_HEART_RATE_SERVICE && - p_evt->params.discovered_db.srv_uuid.type == BLE_UUID_TYPE_BLE) - { - // Find the CCCD Handle of the Heart Rate Measurement characteristic. - uint32_t i; - - ble_hrs_c_evt_t evt; - - evt.evt_type = BLE_HRS_C_EVT_DISCOVERY_COMPLETE; - evt.conn_handle = p_evt->conn_handle; - - for (i = 0; i < p_evt->params.discovered_db.char_count; i++) - { - if (p_evt->params.discovered_db.charateristics[i].characteristic.uuid.uuid == - BLE_UUID_HEART_RATE_MEASUREMENT_CHAR) - { - // Found Heart Rate characteristic. Store CCCD handle and break. - evt.params.peer_db.hrm_cccd_handle = - p_evt->params.discovered_db.charateristics[i].cccd_handle; - evt.params.peer_db.hrm_handle = - p_evt->params.discovered_db.charateristics[i].characteristic.handle_value; - break; - } - } - - LOG("[HRS_C]: Heart Rate Service discovered at peer.\r\n"); - //If the instance has been assigned prior to db_discovery, assign the db_handles - if(p_ble_hrs_c->conn_handle != BLE_CONN_HANDLE_INVALID) - { - if ((p_ble_hrs_c->peer_hrs_db.hrm_cccd_handle == BLE_GATT_HANDLE_INVALID)&& - (p_ble_hrs_c->peer_hrs_db.hrm_handle == BLE_GATT_HANDLE_INVALID)) - { - p_ble_hrs_c->peer_hrs_db = evt.params.peer_db; - } - } - - - p_ble_hrs_c->evt_handler(p_ble_hrs_c, &evt); - } -} - - -uint32_t ble_hrs_c_init(ble_hrs_c_t * p_ble_hrs_c, ble_hrs_c_init_t * p_ble_hrs_c_init) -{ - VERIFY_PARAM_NOT_NULL(p_ble_hrs_c); - VERIFY_PARAM_NOT_NULL(p_ble_hrs_c_init); - - ble_uuid_t hrs_uuid; - - hrs_uuid.type = BLE_UUID_TYPE_BLE; - hrs_uuid.uuid = BLE_UUID_HEART_RATE_SERVICE; - - - p_ble_hrs_c->evt_handler = p_ble_hrs_c_init->evt_handler; - p_ble_hrs_c->conn_handle = BLE_CONN_HANDLE_INVALID; - p_ble_hrs_c->peer_hrs_db.hrm_cccd_handle = BLE_GATT_HANDLE_INVALID; - p_ble_hrs_c->peer_hrs_db.hrm_handle = BLE_GATT_HANDLE_INVALID; - - return ble_db_discovery_evt_register(&hrs_uuid); -} - - -void ble_hrs_c_on_ble_evt(ble_hrs_c_t * p_ble_hrs_c, const ble_evt_t * p_ble_evt) -{ - if ((p_ble_hrs_c == NULL) || (p_ble_evt == NULL)) - { - return; - } - - switch (p_ble_evt->header.evt_id) - { - case BLE_GATTC_EVT_HVX: - on_hvx(p_ble_hrs_c, p_ble_evt); - break; - - case BLE_GATTC_EVT_WRITE_RSP: - on_write_rsp(p_ble_hrs_c, p_ble_evt); - break; - - case BLE_GAP_EVT_DISCONNECTED: - on_disconnected(p_ble_hrs_c, p_ble_evt); - break; - - default: - break; - } -} - - -/**@brief Function for creating a message for writing to the CCCD. - */ -static uint32_t cccd_configure(uint16_t conn_handle, uint16_t handle_cccd, bool enable) -{ - LOG("[HRS_C]: Configuring CCCD. CCCD Handle = %d, Connection Handle = %d\r\n", - handle_cccd,conn_handle); - - tx_message_t * p_msg; - uint16_t cccd_val = enable ? BLE_GATT_HVX_NOTIFICATION : 0; - - p_msg = &m_tx_buffer[m_tx_insert_index++]; - m_tx_insert_index &= TX_BUFFER_MASK; - - p_msg->req.write_req.gattc_params.handle = handle_cccd; - p_msg->req.write_req.gattc_params.len = WRITE_MESSAGE_LENGTH; - p_msg->req.write_req.gattc_params.p_value = p_msg->req.write_req.gattc_value; - p_msg->req.write_req.gattc_params.offset = 0; - p_msg->req.write_req.gattc_params.write_op = BLE_GATT_OP_WRITE_REQ; - p_msg->req.write_req.gattc_value[0] = LSB_16(cccd_val); - p_msg->req.write_req.gattc_value[1] = MSB_16(cccd_val); - p_msg->conn_handle = conn_handle; - p_msg->type = WRITE_REQ; - - tx_buffer_process(); - return NRF_SUCCESS; -} - - -uint32_t ble_hrs_c_hrm_notif_enable(ble_hrs_c_t * p_ble_hrs_c) -{ - VERIFY_PARAM_NOT_NULL(p_ble_hrs_c); - - return cccd_configure(p_ble_hrs_c->conn_handle, - p_ble_hrs_c->peer_hrs_db.hrm_cccd_handle, - true); -} - - -uint32_t ble_hrs_c_handles_assign(ble_hrs_c_t * p_ble_hrs_c, - uint16_t conn_handle, - const hrs_db_t * p_peer_hrs_handles) -{ - VERIFY_PARAM_NOT_NULL(p_ble_hrs_c); - - p_ble_hrs_c->conn_handle = conn_handle; - if (p_peer_hrs_handles != NULL) - { - p_ble_hrs_c->peer_hrs_db = *p_peer_hrs_handles; - } - return NRF_SUCCESS; -} -/** @} - * @endcond - */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs_c/ble_hrs_c.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs_c/ble_hrs_c.h deleted file mode 100644 index 4eadda27db..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hrs_c/ble_hrs_c.h +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is confidential property of Nordic Semiconductor. The use, - * copying, transfer or disclosure of such information is prohibited except by express written - * agreement with Nordic Semiconductor. - * - */ - -/**@file - * - * @defgroup ble_sdk_srv_hrs_c Heart Rate Service Client - * @{ - * @ingroup ble_sdk_srv - * @brief Heart Rate Service Client module. - * - * @details This module contains the APIs and types exposed by the Heart Rate Service Client - * module. These APIs and types can be used by the application to perform discovery of - * Heart Rate Service at the peer and interact with it. - * - * @warning Currently this module only has support for Heart Rate Measurement characteristic. This - * means that it will be able to enable notification of the characteristic at the peer and - * be able to receive Heart Rate Measurement notifications from the peer. It does not - * support the Body Sensor Location and the Heart Rate Control Point characteristics. - * When a Heart Rate Measurement is received, this module will decode only the - * Heart Rate Measurement Value (both 8 bit and 16 bit) field from it and provide it to - * the application. - * - * @note The application must propagate BLE stack events to this module by calling - * ble_hrs_c_on_ble_evt(). - * - */ - -#ifndef BLE_HRS_C_H__ -#define BLE_HRS_C_H__ - -#include -#include "ble.h" -#include "ble_db_discovery.h" - -/** - * @defgroup hrs_c_enums Enumerations - * @{ - */ - -/**@brief HRS Client event type. */ -typedef enum -{ - BLE_HRS_C_EVT_DISCOVERY_COMPLETE = 1, /**< Event indicating that the Heart Rate Service has been discovered at the peer. */ - BLE_HRS_C_EVT_HRM_NOTIFICATION /**< Event indicating that a notification of the Heart Rate Measurement characteristic has been received from the peer. */ -} ble_hrs_c_evt_type_t; - -/** @} */ - -/** - * @defgroup hrs_c_structs Structures - * @{ - */ - -/**@brief Structure containing the heart rate measurement received from the peer. */ -typedef struct -{ - uint16_t hr_value; /**< Heart Rate Value. */ -} ble_hrm_t; - - -/**@brief Structure containing the handles related to the Heart Rate Service found on the peer. */ -typedef struct -{ - uint16_t hrm_cccd_handle; /**< Handle of the CCCD of the Heart Rate Measurement characteristic. */ - uint16_t hrm_handle; /**< Handle of the Heart Rate Measurement characteristic as provided by the SoftDevice. */ -} hrs_db_t; - - -/**@brief Heart Rate Event structure. */ -typedef struct -{ - ble_hrs_c_evt_type_t evt_type; /**< Type of the event. */ - uint16_t conn_handle; /**< Connection handle on which the Heart Rate service was discovered on the peer device..*/ - union - { - hrs_db_t peer_db; /**< Heart Rate related handles found on the peer device.. This will be filled if the evt_type is @ref BLE_HRS_C_EVT_DISCOVERY_COMPLETE.*/ - ble_hrm_t hrm; /**< Heart rate measurement received. This will be filled if the evt_type is @ref BLE_HRS_C_EVT_HRM_NOTIFICATION. */ - } params; -} ble_hrs_c_evt_t; - -/** @} */ - -/** - * @defgroup hrs_c_types Types - * @{ - */ - -// Forward declaration of the ble_bas_t type. -typedef struct ble_hrs_c_s ble_hrs_c_t; - -/**@brief Event handler type. - * - * @details This is the type of the event handler that should be provided by the application - * of this module in order to receive events. - */ -typedef void (* ble_hrs_c_evt_handler_t) (ble_hrs_c_t * p_ble_hrs_c, ble_hrs_c_evt_t * p_evt); - -/** @} */ - -/** - * @addtogroup hrs_c_structs - * @{ - */ - -/**@brief Heart Rate Client structure. - */ -struct ble_hrs_c_s -{ - uint16_t conn_handle; /**< Connection handle as provided by the SoftDevice. */ - hrs_db_t peer_hrs_db; /**< Handles related to HRS on the peer*/ - ble_hrs_c_evt_handler_t evt_handler; /**< Application event handler to be called when there is an event related to the heart rate service. */ -}; - -/**@brief Heart Rate Client initialization structure. - */ -typedef struct -{ - ble_hrs_c_evt_handler_t evt_handler; /**< Event handler to be called by the Heart Rate Client module whenever there is an event related to the Heart Rate Service. */ -} ble_hrs_c_init_t; - -/** @} */ - -/** - * @defgroup hrs_c_functions Functions - * @{ - */ - -/**@brief Function for initializing the heart rate client module. - * - * @details This function will register with the DB Discovery module. There it - * registers for the Heart Rate Service. Doing so will make the DB Discovery - * module look for the presence of a Heart Rate Service instance at the peer when a - * discovery is started. - * - * @param[in] p_ble_hrs_c Pointer to the heart rate client structure. - * @param[in] p_ble_hrs_c_init Pointer to the heart rate initialization structure containing the - * initialization information. - * - * @retval NRF_SUCCESS On successful initialization. Otherwise an error code. This function - * propagates the error code returned by the Database Discovery module API - * @ref ble_db_discovery_evt_register. - */ -uint32_t ble_hrs_c_init(ble_hrs_c_t * p_ble_hrs_c, ble_hrs_c_init_t * p_ble_hrs_c_init); - -/**@brief Function for handling BLE events from the SoftDevice. - * - * @details This function will handle the BLE events received from the SoftDevice. If a BLE - * event is relevant to the Heart Rate Client module, then it uses it to update - * interval variables and, if necessary, send events to the application. - * - * @param[in] p_ble_hrs_c Pointer to the heart rate client structure. - * @param[in] p_ble_evt Pointer to the BLE event. - */ -void ble_hrs_c_on_ble_evt(ble_hrs_c_t * p_ble_hrs_c, const ble_evt_t * p_ble_evt); - - -/**@brief Function for requesting the peer to start sending notification of Heart Rate - * Measurement. - * - * @details This function will enable to notification of the Heart Rate Measurement at the peer - * by writing to the CCCD of the Heart Rate Measurement Characteristic. - * - * @param p_ble_hrs_c Pointer to the heart rate client structure. - * - * @retval NRF_SUCCESS If the SoftDevice has been requested to write to the CCCD of the peer. - * Otherwise, an error code. This function propagates the error code returned - * by the SoftDevice API @ref sd_ble_gattc_write. - */ -uint32_t ble_hrs_c_hrm_notif_enable(ble_hrs_c_t * p_ble_hrs_c); - - -/**@brief Function for handling events from the database discovery module. - * - * @details Call this function when getting a callback event from the DB discovery modue. - * This function will handle an event from the database discovery module, and determine - * if it relates to the discovery of heart rate service at the peer. If so, it will - * call the application's event handler indicating that the heart rate service has been - * discovered at the peer. It also populates the event with the service related - * information before providing it to the application. - * - * @param[in] p_ble_hrs_c Pointer to the heart rate client structure instance to associate. - * @param[in] p_evt Pointer to the event received from the database discovery module. - * - */ -void ble_hrs_on_db_disc_evt(ble_hrs_c_t * p_ble_hrs_c, const ble_db_discovery_evt_t * p_evt); - - -/**@brief Function for assigning a handles to a this instance of hrs_c. - * - * @details Call this function when a link has been established with a peer to - * associate this link to this instance of the module. This makes it - * possible to handle several link and associate each link to a particular - * instance of this module.The connection handle and attribute handles will be - * provided from the discovery event @ref BLE_HRS_C_EVT_DISCOVERY_COMPLETE. - * - * @param[in] p_ble_hrs_c Pointer to the heart rate client structure instance to associate. - * @param[in] conn_handle Connection handle to associated with the given Heart Rate Client Instance. - * @param[in] p_peer_hrs_handles Attribute handles for the HRS server you want this HRS_C client to - * interact with. - */ -uint32_t ble_hrs_c_handles_assign(ble_hrs_c_t * p_ble_hrs_c, - uint16_t conn_handle, - const hrs_db_t * p_peer_hrs_handles); - -/** @} */ // End tag for Function group. - -#endif // BLE_HRS_C_H__ - -/** @} */ // End tag for the file. diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hts/ble_hts.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hts/ble_hts.c deleted file mode 100644 index 1ac6bedb97..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hts/ble_hts.c +++ /dev/null @@ -1,428 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/* Attention! -* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile -* qualification listings, this section of source code must not be modified. -*/ - -#include "ble_hts.h" -#include -#include "nordic_common.h" -#include "ble_l2cap.h" -#include "ble_srv_common.h" -#include "app_util.h" - - -#define OPCODE_LENGTH 1 /**< Length of opcode inside Health Thermometer Measurement packet. */ -#define HANDLE_LENGTH 2 /**< Length of handle inside Health Thermometer Measurement packet. */ -#define MAX_HTM_LEN (BLE_L2CAP_MTU_DEF - OPCODE_LENGTH - HANDLE_LENGTH) /**< Maximum size of a transmitted Health Thermometer Measurement. */ - -// Health Thermometer Measurement flag bits -#define HTS_MEAS_FLAG_TEMP_UNITS_BIT (0x01 << 0) /**< Temperature Units flag. */ -#define HTS_MEAS_FLAG_TIME_STAMP_BIT (0x01 << 1) /**< Time Stamp flag. */ -#define HTS_MEAS_FLAG_TEMP_TYPE_BIT (0x01 << 2) /**< Temperature Type flag. */ - - -/**@brief Function for handling the Connect event. - * - * @param[in] p_hts Health Thermometer Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_connect(ble_hts_t * p_hts, ble_evt_t * p_ble_evt) -{ - p_hts->conn_handle = p_ble_evt->evt.gatts_evt.conn_handle; -} - - -/**@brief Function for handling the Disconnect event. - * - * @param[in] p_hts Health Thermometer Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_disconnect(ble_hts_t * p_hts, ble_evt_t * p_ble_evt) -{ - UNUSED_PARAMETER(p_ble_evt); - p_hts->conn_handle = BLE_CONN_HANDLE_INVALID; -} - - -/**@brief Function for handling write events to the Blood Pressure Measurement characteristic. - * - * @param[in] p_hts Health Thermometer Service structure. - * @param[in] p_evt_write Write event received from the BLE stack. - */ -static void on_cccd_write(ble_hts_t * p_hts, ble_gatts_evt_write_t * p_evt_write) -{ - if (p_evt_write->len == 2) - { - // CCCD written, update indication state - if (p_hts->evt_handler != NULL) - { - ble_hts_evt_t evt; - - if (ble_srv_is_indication_enabled(p_evt_write->data)) - { - evt.evt_type = BLE_HTS_EVT_INDICATION_ENABLED; - } - else - { - evt.evt_type = BLE_HTS_EVT_INDICATION_DISABLED; - } - - p_hts->evt_handler(p_hts, &evt); - } - } -} - - -/**@brief Function for handling the Write event. - * - * @param[in] p_hts Health Thermometer Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_write(ble_hts_t * p_hts, ble_evt_t * p_ble_evt) -{ - ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; - - if (p_evt_write->handle == p_hts->meas_handles.cccd_handle) - { - on_cccd_write(p_hts, p_evt_write); - } -} - - -/**@brief Function for handling the HVC event. - * - * @details Handles HVC events from the BLE stack. - * - * @param[in] p_hts Health Thermometer Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_hvc(ble_hts_t * p_hts, ble_evt_t * p_ble_evt) -{ - ble_gatts_evt_hvc_t * p_hvc = &p_ble_evt->evt.gatts_evt.params.hvc; - - if (p_hvc->handle == p_hts->meas_handles.value_handle) - { - ble_hts_evt_t evt; - - evt.evt_type = BLE_HTS_EVT_INDICATION_CONFIRMED; - p_hts->evt_handler(p_hts, &evt); - } -} - - -void ble_hts_on_ble_evt(ble_hts_t * p_hts, ble_evt_t * p_ble_evt) -{ - switch (p_ble_evt->header.evt_id) - { - case BLE_GAP_EVT_CONNECTED: - on_connect(p_hts, p_ble_evt); - break; - - case BLE_GAP_EVT_DISCONNECTED: - on_disconnect(p_hts, p_ble_evt); - break; - - case BLE_GATTS_EVT_WRITE: - on_write(p_hts, p_ble_evt); - break; - - case BLE_GATTS_EVT_HVC: - on_hvc(p_hts, p_ble_evt); - break; - - default: - // No implementation needed. - break; - } -} - - -/**@brief Function for encoding a Health Thermometer Measurement. - * - * @param[in] p_hts Health Thermometer Service structure. - * @param[in] p_hts_meas Measurement to be encoded. - * @param[out] p_encoded_buffer Buffer where the encoded data will be written. - * - * @return Size of encoded data. - */ -static uint8_t hts_measurement_encode(ble_hts_t * p_hts, - ble_hts_meas_t * p_hts_meas, - uint8_t * p_encoded_buffer) -{ - uint8_t flags = 0; - uint8_t len = 1; - uint32_t encoded_temp; - - // Flags field - if (p_hts_meas->temp_in_fahr_units) - { - flags |= HTS_MEAS_FLAG_TEMP_UNITS_BIT; - } - if (p_hts_meas->time_stamp_present) - { - flags |= HTS_MEAS_FLAG_TIME_STAMP_BIT; - } - - // Temperature Measurement Value field - if (p_hts_meas->temp_in_fahr_units) - { - flags |= HTS_MEAS_FLAG_TEMP_UNITS_BIT; - - encoded_temp = ((p_hts_meas->temp_in_fahr.exponent << 24) & 0xFF000000) | - ((p_hts_meas->temp_in_fahr.mantissa << 0) & 0x00FFFFFF); - } - else - { - encoded_temp = ((p_hts_meas->temp_in_celcius.exponent << 24) & 0xFF000000) | - ((p_hts_meas->temp_in_celcius.mantissa << 0) & 0x00FFFFFF); - } - len += uint32_encode(encoded_temp, &p_encoded_buffer[len]); - - // Time Stamp field - if (p_hts_meas->time_stamp_present) - { - flags |= HTS_MEAS_FLAG_TIME_STAMP_BIT; - len += ble_date_time_encode(&p_hts_meas->time_stamp, &p_encoded_buffer[len]); - } - - // Temperature Type field - if (p_hts_meas->temp_type_present) - { - flags |= HTS_MEAS_FLAG_TEMP_TYPE_BIT; - p_encoded_buffer[len++] = p_hts_meas->temp_type; - } - - // Flags field - p_encoded_buffer[0] = flags; - - return len; -} - - -/**@brief Function for adding Health Thermometer Measurement characteristics. - * - * @param[in] p_hts Health Thermometer Service structure. - * @param[in] p_hts_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t hts_measurement_char_add(ble_hts_t * p_hts, const ble_hts_init_t * p_hts_init) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_md_t cccd_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - ble_hts_meas_t initial_htm; - uint8_t encoded_htm[MAX_HTM_LEN]; - - memset(&cccd_md, 0, sizeof(cccd_md)); - - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); - cccd_md.vloc = BLE_GATTS_VLOC_STACK; - cccd_md.write_perm = p_hts_init->hts_meas_attr_md.cccd_write_perm; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.indicate = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = &cccd_md; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_TEMPERATURE_MEASUREMENT_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.read_perm = p_hts_init->hts_meas_attr_md.read_perm; - attr_md.write_perm = p_hts_init->hts_meas_attr_md.write_perm; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 1; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - memset(&initial_htm, 0, sizeof(initial_htm)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = hts_measurement_encode(p_hts, &initial_htm, encoded_htm); - attr_char_value.init_offs = 0; - attr_char_value.max_len = MAX_HTM_LEN; - attr_char_value.p_value = encoded_htm; - - return sd_ble_gatts_characteristic_add(p_hts->service_handle, - &char_md, - &attr_char_value, - &p_hts->meas_handles); -} - - -/**@brief Function for adding Temperature Type characteristics. - * - * @param[in] p_hts Health Thermometer Service structure. - * @param[in] p_hts_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t hts_temp_type_char_add(ble_hts_t * p_hts, const ble_hts_init_t * p_hts_init) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - uint8_t init_value_temp_type; - uint8_t init_value_encoded[1]; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.read = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = NULL; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_TEMPERATURE_TYPE_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.read_perm = p_hts_init->hts_temp_type_attr_md.read_perm; - attr_md.write_perm = p_hts_init->hts_temp_type_attr_md.write_perm; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - init_value_temp_type = p_hts_init->temp_type; - init_value_encoded[0] = init_value_temp_type; - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = sizeof (uint8_t); - attr_char_value.init_offs = 0; - attr_char_value.max_len = sizeof (uint8_t); - attr_char_value.p_value = init_value_encoded; - - return sd_ble_gatts_characteristic_add(p_hts->service_handle, - &char_md, - &attr_char_value, - &p_hts->temp_type_handles); -} - - -uint32_t ble_hts_init(ble_hts_t * p_hts, const ble_hts_init_t * p_hts_init) -{ - uint32_t err_code; - ble_uuid_t ble_uuid; - - // Initialize service structure - p_hts->evt_handler = p_hts_init->evt_handler; - p_hts->conn_handle = BLE_CONN_HANDLE_INVALID; - p_hts->temp_type = p_hts_init->temp_type; - - // Add service - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_HEALTH_THERMOMETER_SERVICE); - - err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &ble_uuid, &p_hts->service_handle); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add measurement characteristic - err_code = hts_measurement_char_add(p_hts, p_hts_init); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add temperature type characteristic - if (p_hts_init->temp_type_as_characteristic) - { - err_code = hts_temp_type_char_add(p_hts, p_hts_init); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - - return NRF_SUCCESS; -} - - -uint32_t ble_hts_measurement_send(ble_hts_t * p_hts, ble_hts_meas_t * p_hts_meas) -{ - uint32_t err_code; - - // Send value if connected - if (p_hts->conn_handle != BLE_CONN_HANDLE_INVALID) - { - uint8_t encoded_hts_meas[MAX_HTM_LEN]; - uint16_t len; - uint16_t hvx_len; - ble_gatts_hvx_params_t hvx_params; - - len = hts_measurement_encode(p_hts, p_hts_meas, encoded_hts_meas); - hvx_len = len; - - memset(&hvx_params, 0, sizeof(hvx_params)); - - hvx_params.handle = p_hts->meas_handles.value_handle; - hvx_params.type = BLE_GATT_HVX_INDICATION; - hvx_params.offset = 0; - hvx_params.p_len = &hvx_len; - hvx_params.p_data = encoded_hts_meas; - - err_code = sd_ble_gatts_hvx(p_hts->conn_handle, &hvx_params); - if ((err_code == NRF_SUCCESS) && (hvx_len != len)) - { - err_code = NRF_ERROR_DATA_SIZE; - } - } - else - { - err_code = NRF_ERROR_INVALID_STATE; - } - - return err_code; -} - - -uint32_t ble_hts_is_indication_enabled(ble_hts_t * p_hts, bool * p_indication_enabled) -{ - uint32_t err_code; - uint8_t cccd_value_buf[BLE_CCCD_VALUE_LEN]; - ble_gatts_value_t gatts_value; - - // Initialize value struct. - memset(&gatts_value, 0, sizeof(gatts_value)); - - gatts_value.len = BLE_CCCD_VALUE_LEN; - gatts_value.offset = 0; - gatts_value.p_value = cccd_value_buf; - - err_code = sd_ble_gatts_value_get(p_hts->conn_handle, - p_hts->meas_handles.cccd_handle, - &gatts_value); - if (err_code == NRF_SUCCESS) - { - *p_indication_enabled = ble_srv_is_indication_enabled(cccd_value_buf); - } - return err_code; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hts/ble_hts.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hts/ble_hts.h deleted file mode 100644 index f6d5723e25..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_hts/ble_hts.h +++ /dev/null @@ -1,160 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - */ - -/** @file - * - * @defgroup ble_sdk_srv_hts Health Thermometer Service - * @{ - * @ingroup ble_sdk_srv - * @brief Health Thermometer Service module. - * - * @details This module implements the Health Thermometer Service. - * - * If an event handler is supplied by the application, the Health Thermometer - * Service will generate Health Thermometer Service events to the application. - * - * @note The application must propagate BLE stack events to the Health Thermometer Service - * module by calling ble_hts_on_ble_evt() from the @ref softdevice_handler function. - * - * @note Attention! - * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile - * qualification listings, this section of source code must not be modified. - */ - -#ifndef BLE_HTS_H__ -#define BLE_HTS_H__ - -#include -#include -#include "ble.h" -#include "ble_srv_common.h" -#include "ble_date_time.h" - -// Temperature Type measurement locations -#define BLE_HTS_TEMP_TYPE_ARMPIT 1 -#define BLE_HTS_TEMP_TYPE_BODY 2 -#define BLE_HTS_TEMP_TYPE_EAR 3 -#define BLE_HTS_TEMP_TYPE_FINGER 4 -#define BLE_HTS_TEMP_TYPE_GI_TRACT 5 -#define BLE_HTS_TEMP_TYPE_MOUTH 6 -#define BLE_HTS_TEMP_TYPE_RECTUM 7 -#define BLE_HTS_TEMP_TYPE_TOE 8 -#define BLE_HTS_TEMP_TYPE_EAR_DRUM 9 - -/**@brief Health Thermometer Service event type. */ -typedef enum -{ - BLE_HTS_EVT_INDICATION_ENABLED, /**< Health Thermometer value indication enabled event. */ - BLE_HTS_EVT_INDICATION_DISABLED, /**< Health Thermometer value indication disabled event. */ - BLE_HTS_EVT_INDICATION_CONFIRMED /**< Confirmation of a temperature measurement indication has been received. */ -} ble_hts_evt_type_t; - -/**@brief Health Thermometer Service event. */ -typedef struct -{ - ble_hts_evt_type_t evt_type; /**< Type of event. */ -} ble_hts_evt_t; - -// Forward declaration of the ble_hts_t type. -typedef struct ble_hts_s ble_hts_t; - -/**@brief Health Thermometer Service event handler type. */ -typedef void (*ble_hts_evt_handler_t) (ble_hts_t * p_hts, ble_hts_evt_t * p_evt); - -/**@brief FLOAT format (IEEE-11073 32-bit FLOAT, defined as a 32-bit value with a 24-bit mantissa - * and an 8-bit exponent. */ -typedef struct -{ - int8_t exponent; /**< Base 10 exponent */ - int32_t mantissa; /**< Mantissa, should be using only 24 bits */ -} ieee_float32_t; - -/**@brief Health Thermometer Service init structure. This contains all options and data - * needed for initialization of the service. */ -typedef struct -{ - ble_hts_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Health Thermometer Service. */ - ble_srv_cccd_security_mode_t hts_meas_attr_md; /**< Initial security level for health thermometer measurement attribute */ - ble_srv_security_mode_t hts_temp_type_attr_md; /**< Initial security level for health thermometer tempearture type attribute */ - uint8_t temp_type_as_characteristic; /**< Set non-zero if temp type given as characteristic */ - uint8_t temp_type; /**< Temperature type if temperature characteristic is used */ -} ble_hts_init_t; - -/**@brief Health Thermometer Service structure. This contains various status information for - * the service. */ -struct ble_hts_s -{ - ble_hts_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Health Thermometer Service. */ - uint16_t service_handle; /**< Handle of Health Thermometer Service (as provided by the BLE stack). */ - ble_gatts_char_handles_t meas_handles; /**< Handles related to the Health Thermometer Measurement characteristic. */ - ble_gatts_char_handles_t temp_type_handles; /**< Handles related to the Health Thermometer Temperature Type characteristic. */ - uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ - uint8_t temp_type; /**< Temperature type indicates where the measurement was taken. */ -}; - -/**@brief Health Thermometer Service measurement structure. This contains a Health Thermometer - * measurement. */ -typedef struct ble_hts_meas_s -{ - bool temp_in_fahr_units; /**< True if Temperature is in Fahrenheit units, Celcius otherwise. */ - bool time_stamp_present; /**< True if Time Stamp is present. */ - bool temp_type_present; /**< True if Temperature Type is present. */ - ieee_float32_t temp_in_celcius; /**< Temperature Measurement Value (Celcius). */ - ieee_float32_t temp_in_fahr; /**< Temperature Measurement Value (Fahrenheit). */ - ble_date_time_t time_stamp; /**< Time Stamp. */ - uint8_t temp_type; /**< Temperature Type. */ -} ble_hts_meas_t; - -/**@brief Function for initializing the Health Thermometer Service. - * - * @param[out] p_hts Health Thermometer Service structure. This structure will have to - * be supplied by the application. It will be initialized by this function, - * and will later be used to identify this particular service instance. - * @param[in] p_hts_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. - */ -uint32_t ble_hts_init(ble_hts_t * p_hts, const ble_hts_init_t * p_hts_init); - -/**@brief Function for handling the Application's BLE Stack events. - * - * @details Handles all events from the BLE stack of interest to the Health Thermometer Service. - * - * @param[in] p_hts Health Thermometer Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -void ble_hts_on_ble_evt(ble_hts_t * p_hts, ble_evt_t * p_ble_evt); - -/**@brief Function for sending health thermometer measurement if indication has been enabled. - * - * @details The application calls this function after having performed a Health Thermometer - * measurement. If indication has been enabled, the measurement data is encoded and - * sent to the client. - * - * @param[in] p_hts Health Thermometer Service structure. - * @param[in] p_hts_meas Pointer to new health thermometer measurement. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -uint32_t ble_hts_measurement_send(ble_hts_t * p_hts, ble_hts_meas_t * p_hts_meas); - -/**@brief Function for checking if indication of Temperature Measurement is currently enabled. - * - * @param[in] p_hts Health Thermometer Service structure. - * @param[out] p_indication_enabled TRUE if indication is enabled, FALSE otherwise. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -uint32_t ble_hts_is_indication_enabled(ble_hts_t * p_hts, bool * p_indication_enabled); - -#endif // BLE_HTS_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias/ble_ias.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias/ble_ias.c deleted file mode 100644 index da33c5235c..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias/ble_ias.c +++ /dev/null @@ -1,173 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/* Attention! -* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile -* qualification listings, this section of source code must not be modified. -*/ - -#include "ble_ias.h" -#include -#include "ble_srv_common.h" - - -#define INITIAL_ALERT_LEVEL BLE_CHAR_ALERT_LEVEL_NO_ALERT - - -/**@brief Function for handling the Connect event. - * - * @param[in] p_ias Immediate Alert Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_connect(ble_ias_t * p_ias, ble_evt_t * p_ble_evt) -{ - p_ias->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; -} - -/**@brief Function for handling the Write event. - * - * @param[in] p_ias Immediate Alert Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_write(ble_ias_t * p_ias, ble_evt_t * p_ble_evt) -{ - ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; - - if ((p_evt_write->handle == p_ias->alert_level_handles.value_handle) && (p_evt_write->len == 1)) - { - // Alert level written, call application event handler - ble_ias_evt_t evt; - - evt.evt_type = BLE_IAS_EVT_ALERT_LEVEL_UPDATED; - evt.params.alert_level = p_evt_write->data[0]; - - p_ias->evt_handler(p_ias, &evt); - } -} - - -void ble_ias_on_ble_evt(ble_ias_t * p_ias, ble_evt_t * p_ble_evt) -{ - switch (p_ble_evt->header.evt_id) - { - case BLE_GAP_EVT_CONNECTED: - on_connect(p_ias, p_ble_evt); - break; - - case BLE_GATTS_EVT_WRITE: - on_write(p_ias, p_ble_evt); - break; - - default: - // No implementation needed. - break; - } -} - - -/**@brief Function for adding Alert Level characteristics. - * - * @param[in] p_ias Immediate Alert Service structure. - * @param[in] p_ias_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t alert_level_char_add(ble_ias_t * p_ias) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - uint8_t initial_alert_level; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.write_wo_resp = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = NULL; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_ALERT_LEVEL_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.read_perm); - BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&attr_md.write_perm); - - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - initial_alert_level = INITIAL_ALERT_LEVEL; - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = sizeof (uint8_t); - attr_char_value.init_offs = 0; - attr_char_value.max_len = sizeof (uint8_t); - attr_char_value.p_value = &initial_alert_level; - - return sd_ble_gatts_characteristic_add(p_ias->service_handle, - &char_md, - &attr_char_value, - &p_ias->alert_level_handles); -} - - -uint32_t ble_ias_init(ble_ias_t * p_ias, const ble_ias_init_t * p_ias_init) -{ - uint32_t err_code; - ble_uuid_t ble_uuid; - - // Initialize service structure - if (p_ias_init->evt_handler == NULL) - { - return NRF_ERROR_INVALID_PARAM; - } - p_ias->evt_handler = p_ias_init->evt_handler; - - // Add service - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_IMMEDIATE_ALERT_SERVICE); - - err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, - &ble_uuid, - &p_ias->service_handle); - - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add alert level characteristic - return alert_level_char_add(p_ias); -} - - -uint32_t ble_ias_alert_level_get(ble_ias_t * p_ias, uint8_t * p_alert_level) -{ - ble_gatts_value_t gatts_value; - - // Initialize value struct. - memset(&gatts_value, 0, sizeof(gatts_value)); - - gatts_value.len = sizeof(uint8_t); - gatts_value.offset = 0; - gatts_value.p_value = p_alert_level; - - return sd_ble_gatts_value_get(p_ias->conn_handle, - p_ias->alert_level_handles.value_handle, - &gatts_value); -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias/ble_ias.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias/ble_ias.h deleted file mode 100644 index 6089f596c7..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias/ble_ias.h +++ /dev/null @@ -1,113 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/** @file - * - * @defgroup ble_sdk_srv_ias Immediate Alert Service - * @{ - * @ingroup ble_sdk_srv - * @brief Immediate Alert Service module. - * - * @details This module implements the Immediate Alert Service with the Alert Level characteristic. - * During initialization it adds the Immediate Alert Service and Alert Level characteristic - * to the BLE stack database. - * - * The application must supply an event handler for receiving Immediate Alert Service - * events. Using this handler, the service will notify the application when the - * Alert Level characteristic value changes. - * - * The service also provides a function for letting the application poll the current - * value of the Alert Level characteristic. - * - * @note The application must propagate BLE stack events to the Immediate Alert Service - * module by calling ble_ias_on_ble_evt() from the @ref softdevice_handler callback. - * - * @note Attention! - * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile - * qualification listings, this section of source code must not be modified. -*/ - -#ifndef BLE_IAS_H__ -#define BLE_IAS_H__ - -#include -#include "ble.h" - -/**@brief Immediate Alert Service event type. */ -typedef enum -{ - BLE_IAS_EVT_ALERT_LEVEL_UPDATED /**< Alert Level Updated event. */ -} ble_ias_evt_type_t; - -/**@brief Immediate Alert Service event. */ -typedef struct -{ - ble_ias_evt_type_t evt_type; /**< Type of event. */ - union - { - uint8_t alert_level; /**< New Alert Level value. */ - } params; -} ble_ias_evt_t; - -// Forward declaration of the ble_ias_t type. -typedef struct ble_ias_s ble_ias_t; - -/**@brief Immediate Alert Service event handler type. */ -typedef void (*ble_ias_evt_handler_t) (ble_ias_t * p_ias, ble_ias_evt_t * p_evt); - -/**@brief Immediate Alert Service init structure. This contains all options and data needed for - * initialization of the service. */ -typedef struct -{ - ble_ias_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Immediate Alert Service. */ -} ble_ias_init_t; - -/**@brief Immediate Alert Service structure. This contains various status information for the - * service. */ -struct ble_ias_s -{ - ble_ias_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Immediate Alert Service. */ - uint16_t service_handle; /**< Handle of Immediate Alert Service (as provided by the BLE stack). */ - ble_gatts_char_handles_t alert_level_handles; /**< Handles related to the Alert Level characteristic. */ - uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ -}; - -/**@brief Function for initializing the Immediate Alert Service. - * - * @param[out] p_ias Immediate Alert Service structure. This structure will have to be - * supplied by the application. It will be initialized by this function, - * and will later be used to identify this particular service instance. - * @param[in] p_ias_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. - */ -uint32_t ble_ias_init(ble_ias_t * p_ias, const ble_ias_init_t * p_ias_init); - -/**@brief Function for handling the Application's BLE Stack events. - * - * @details Handles all events from the BLE stack of interest to the Immediate Alert Service. - * - * @param[in] p_ias Immediate Alert Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -void ble_ias_on_ble_evt(ble_ias_t * p_ias, ble_evt_t * p_ble_evt); - -/**@brief Function for getting current value of the Alert Level characteristic. - * - * @param[in] p_ias Immediate Alert Service structure. - * @param[out] p_alert_level Current Alert Level value. - */ -uint32_t ble_ias_alert_level_get(ble_ias_t * p_ias, uint8_t * p_alert_level); - -#endif // BLE_IAS_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias_c/ble_ias_c.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias_c/ble_ias_c.c deleted file mode 100644 index 749dbb6f80..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias_c/ble_ias_c.c +++ /dev/null @@ -1,189 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -#include "ble_ias_c.h" - -#include -#include "sdk_common.h" -#include "ble.h" -#include "ble_srv_common.h" -#include "ble_gattc.h" -#include "ble_db_discovery.h" - - -void ble_ias_c_on_db_disc_evt(ble_ias_c_t * p_ias_c, const ble_db_discovery_evt_t * p_evt) -{ - ble_ias_c_evt_t evt; - - memset(&evt, 0, sizeof(ble_ias_c_evt_t)); - evt.evt_type = BLE_IAS_C_EVT_DISCOVERY_FAILED; - evt.conn_handle = p_evt->conn_handle; - - const ble_gatt_db_char_t * p_chars = p_evt->params.discovered_db.charateristics; - - // Check if the Immediate Alert Service was discovered. - if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE - && - p_evt->params.discovered_db.srv_uuid.uuid == BLE_UUID_IMMEDIATE_ALERT_SERVICE - && - p_evt->params.discovered_db.srv_uuid.type == BLE_UUID_TYPE_BLE) - { - - uint32_t i; - - for (i = 0; i < p_evt->params.discovered_db.char_count; i++) - { - // The Alert Level characteristic in the Immediate Alert Service instance is found - // on peer. Check if it has the correct property 'Write without response'. - switch(p_chars[i].characteristic.uuid.uuid) - { - case BLE_UUID_ALERT_LEVEL_CHAR: - if(p_chars[i].characteristic.char_props.write_wo_resp) - { - // Found Alert Level characteristic inside the Immediate Alert Service. - memcpy(&evt.alert_level, - &p_chars[i].characteristic, - sizeof(ble_gattc_char_t)); - } - break; - - default: - break; - } - } - } - if (evt.alert_level.handle_value != BLE_GATT_HANDLE_INVALID) - { - evt.evt_type = BLE_IAS_C_EVT_DISCOVERY_COMPLETE; - } - - p_ias_c->evt_handler(p_ias_c, &evt); -} - - -uint32_t ble_ias_c_init(ble_ias_c_t * p_ias_c, ble_ias_c_init_t const * p_ias_c_init) -{ - VERIFY_PARAM_NOT_NULL(p_ias_c); - VERIFY_PARAM_NOT_NULL(p_ias_c_init->evt_handler); - VERIFY_PARAM_NOT_NULL(p_ias_c_init); - - p_ias_c->evt_handler = p_ias_c_init->evt_handler; - p_ias_c->error_handler = p_ias_c_init->error_handler; - p_ias_c->conn_handle = BLE_CONN_HANDLE_INVALID; - p_ias_c->alert_level_char.handle_value = BLE_GATT_HANDLE_INVALID; - - BLE_UUID_BLE_ASSIGN(p_ias_c->alert_level_char.uuid, BLE_UUID_ALERT_LEVEL_CHAR); - BLE_UUID_BLE_ASSIGN(p_ias_c->service_uuid, BLE_UUID_IMMEDIATE_ALERT_SERVICE); - - return ble_db_discovery_evt_register(&p_ias_c->service_uuid); -} - - - -/**@brief Function for handling the Disconnect event. - * - * @param[in] p_ias_c Immediate Alert Service client structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_disconnect(ble_ias_c_t * p_ias_c, ble_evt_t const * p_ble_evt) -{ - // The following values will be re-initialized when a new connection is made. - p_ias_c->conn_handle = BLE_CONN_HANDLE_INVALID; - - if (ble_ias_c_is_discovered(p_ias_c)) - { - // There was a valid instance of IAS on the peer. Send an event to the - // application, so that it can do any clean up related to this module. - ble_ias_c_evt_t evt; - - evt.evt_type = BLE_IAS_C_EVT_DISCONN_COMPLETE; - - p_ias_c->evt_handler(p_ias_c, &evt); - p_ias_c->alert_level_char.handle_value = BLE_GATT_HANDLE_INVALID; - } -} - - -void ble_ias_c_on_ble_evt(ble_ias_c_t * p_ias_c, ble_evt_t const * p_ble_evt) -{ - uint32_t err_code = NRF_SUCCESS; - - switch (p_ble_evt->header.evt_id) - { - case BLE_GAP_EVT_DISCONNECTED: - on_disconnect(p_ias_c, p_ble_evt); - break; - - default: - // No implementation needed. - break; - } - - if (err_code != NRF_SUCCESS && p_ias_c->error_handler != 0) - { - p_ias_c->error_handler(err_code); - } -} - - -/**@brief Function for performing a Write procedure. - * - * @param[in] conn_handle Handle of the connection on which to perform the write operation. - * @param[in] write_handle Handle of the attribute to be written. - * @param[in] length Length of data to be written. - * @param[in] p_value Data to be written. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t write_characteristic_value(uint16_t conn_handle, - uint16_t write_handle, - uint16_t length, - uint8_t * p_value) -{ - ble_gattc_write_params_t write_params; - - memset(&write_params, 0, sizeof(write_params)); - - write_params.handle = write_handle; - write_params.write_op = BLE_GATT_OP_WRITE_CMD; - write_params.offset = 0; - write_params.len = length; - write_params.p_value = p_value; - - return sd_ble_gattc_write(conn_handle, &write_params); -} - - -uint32_t ble_ias_c_send_alert_level(ble_ias_c_t const * p_ias_c, uint8_t alert_level) -{ - if (!ble_ias_c_is_discovered(p_ias_c)) - { - return NRF_ERROR_NOT_FOUND; - } - - return write_characteristic_value(p_ias_c->conn_handle, - p_ias_c->alert_level_char.handle_value, - sizeof(uint8_t), - &alert_level); -} - - -uint32_t ble_ias_c_handles_assign(ble_ias_c_t * p_ias_c, - const uint16_t conn_handle, - const uint16_t alert_level_handle) -{ - VERIFY_PARAM_NOT_NULL(p_ias_c); - - p_ias_c->conn_handle = conn_handle; - p_ias_c->alert_level_char.handle_value = alert_level_handle; - return NRF_SUCCESS; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias_c/ble_ias_c.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias_c/ble_ias_c.h deleted file mode 100644 index 7f263ee4a8..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_ias_c/ble_ias_c.h +++ /dev/null @@ -1,168 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/** @file - * - * @defgroup ble_sdk_srv_ias_c Immediate Alert Service Client - * @{ - * @ingroup ble_sdk_srv - * @brief Immediate Alert Service Client module - * - * @details This module implements the Immediate Alert Service client - locator role of the Find Me - * profile. On @ref BLE_GAP_EVT_CONNECTED event, this module starts discovery of the - * Immediate Alert Service with Alert Level characteristic at the peer. This module will - * indicate the application about a successful service & characteristic discovery using - * @ref BLE_IAS_C_EVT_DISCOVERY_COMPLETE event. The application can use @ref - * ble_ias_c_send_alert_level function to signal alerts to the peer. - * - * @note The application must propagate BLE stack events to this module by calling - * ble_ias_c_on_ble_evt() from the @ref softdevice_handler callback function. - */ - -#ifndef BLE_IAS_C_H__ -#define BLE_IAS_C_H__ - -#include -#include "ble_srv_common.h" -#include "ble_gattc.h" -#include "ble.h" -#include "ble_db_discovery.h" - -// Forward declaration of the ble_ias_c_t type. -typedef struct ble_ias_c_s ble_ias_c_t; - -/**@brief Immediate Alert Service client event type. */ -typedef enum -{ - BLE_IAS_C_EVT_DISCOVERY_COMPLETE, /**< Event indicating that the Immediate Alert Service is found at the peer. */ - BLE_IAS_C_EVT_DISCOVERY_FAILED, /**< Event indicating that the Immediate Alert Service is not found at the peer. */ - BLE_IAS_C_EVT_DISCONN_COMPLETE /**< Event indicating that the Immediate Alert Service client module has completed the processing of BLE_GAP_EVT_DISCONNECTED event. This event is raised only if a valid instance of IAS was found at the peer during the discovery phase. This event can be used the application to do clean up related to the IAS Client.*/ -} ble_ias_c_evt_type_t; - -/**@brief Immediate Alert Service client event. */ -typedef struct -{ - ble_ias_c_evt_type_t evt_type; /**< Type of event. */ - uint16_t conn_handle; /**< Connection handle on which the IAS service was discovered on the peer device. This will be filled if the evt_type is @ref BLE_IAS_C_EVT_DISCOVERY_COMPLETE.*/ - ble_gattc_char_t alert_level; /**< Info on the discovered Alert Level characteristic discovered. This will be filled if the evt_type is @ref BLE_IAS_C_EVT_DISCOVERY_COMPLETE.*/ -} ble_ias_c_evt_t; - -/**@brief Immediate Alert Service client event handler type. */ -typedef void (*ble_ias_c_evt_handler_t) (ble_ias_c_t * p_ias_c, ble_ias_c_evt_t * p_evt); - -/**@brief IAS Client structure. This contains various status information for the client. */ -struct ble_ias_c_s -{ - ble_ias_c_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Immediate Alert Service client. */ - ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ - uint16_t conn_handle; /**< Handle of the current connection. Set with @ref ble_ias_c_handles_assign when connected. */ - ble_uuid_t service_uuid; /**< The GATT Service holding the discovered Immediate Service. */ - ble_gattc_char_t alert_level_char; /**< IAS Alert Level Characteristic. Stores data about the alert characteristic found on the peer. */ -}; - -/**@brief IAS Client init structure. This contains all options and data needed for initialization of - * the client.*/ -typedef struct -{ - ble_ias_c_evt_handler_t evt_handler; /**< Event handler to be called for handling events from the Immediate Alert Service client. */ - ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ -} ble_ias_c_init_t; - -/**@brief Function for initializing the Immediate Alert Service client. - * - * @details This call allows the application to initialize the Immediate Alert Service client. - * - * @param[out] p_ias_c Immediate Alert Service client structure. This structure will have to - * be supplied by the application. It will be initialized by this - * function, and will later be used to identify this particular client - * instance. - * @param[in] p_ias_c_init Information needed to initialize the Immediate Alert Service client. - * - * @return NRF_SUCCESS on successful initialization of service. - */ -uint32_t ble_ias_c_init(ble_ias_c_t * p_ias_c, const ble_ias_c_init_t * p_ias_c_init); - -/**@brief Function for sending alert level to the peer. - * - * @details This function allows the application to send an alert to the peer. - * - * @param[in] p_ias_c Immediate Alert Service client structure. - * @param[in] alert_level Required alert level to be sent to the peer. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -uint32_t ble_ias_c_send_alert_level(const ble_ias_c_t * p_ias_c, uint8_t alert_level); - -/**@brief Function for handling the Application's BLE Stack events for Immediate Alert Service client. - * - * @details Handles all events from the BLE stack of interest to the Immediate Alert Service client. - * - * @param[in] p_ias_c Immediate Alert Service client structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -void ble_ias_c_on_ble_evt(ble_ias_c_t * p_ias_c, const ble_evt_t * p_ble_evt); - -/**@brief Function for checking whether the peer's Immediate Alert Service instance and the alert level - * characteristic have been discovered. - * - * @param[in] p_ias_c Immediate Alert Service client structure. - * - * @return TRUE if a handle has been assigned to alert_level_handle, meaning it must have been - * discovered. FALSE if the handle is invalid. - */ -static __INLINE bool ble_ias_c_is_discovered(const ble_ias_c_t * p_ias_c) -{ - return (p_ias_c->alert_level_char.handle_value != BLE_GATT_HANDLE_INVALID); -} - - -/**@brief Function for handling events from the database discovery module. - * - * @details Call this function when getting a callback event from the DB discovery modue. - * This function will handle an event from the database discovery module, and determine - * if it relates to the discovery of heart rate service at the peer. If so, it will - * call the application's event handler indicating that the heart rate service has been - * discovered at the peer. It also populates the event with the service related - * information before providing it to the application. - * - * @param[in] p_ias_c Pointer to the immediate alert client structure instance that will handle - * the discovery. - * @param[in] p_evt Pointer to the event received from the database discovery module. - * - */ -void ble_ias_c_on_db_disc_evt(ble_ias_c_t * p_ias_c, const ble_db_discovery_evt_t * p_evt); - - -/**@brief Function for assigning handles to an instance of ias_c. - * - * @details Call this function when a link has been established with a peer to - * associate this link to this instance of the module. This makes it - * possible to handle several links and associate each link to a particular - * instance of this module. The connection handle and attribute handles will be - * provided from the discovery event @ref BLE_IAS_C_EVT_DISCOVERY_COMPLETE. - * - * @param[in] p_ias_c Pointer to the IAS client structure instance to associate. - * @param[in] conn_handle Connection handle to associated with the given IAS Instance. - * @param[in] alert_level_handle Attribute handle on the IAS server that you want this IAS_C client to - * interact with. - * - * @retval NRF_SUCCESS If the operation was successful. - * @retval NRF_ERROR_NULL If a p_ias_c was a NULL pointer. - */ -uint32_t ble_ias_c_handles_assign(ble_ias_c_t * p_ias_c, - uint16_t conn_handle, - uint16_t alert_level_handle); - - -#endif // BLE_IAS_C_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs/ble_lbs.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs/ble_lbs.c deleted file mode 100644 index b8c381b8b7..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs/ble_lbs.c +++ /dev/null @@ -1,228 +0,0 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the license.txt file. - */ - -#include "ble_lbs.h" -#include "ble_srv_common.h" -#include "sdk_common.h" - - -/**@brief Function for handling the Connect event. - * - * @param[in] p_lbs LED Button Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_connect(ble_lbs_t * p_lbs, ble_evt_t * p_ble_evt) -{ - p_lbs->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; -} - - -/**@brief Function for handling the Disconnect event. - * - * @param[in] p_lbs LED Button Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_disconnect(ble_lbs_t * p_lbs, ble_evt_t * p_ble_evt) -{ - UNUSED_PARAMETER(p_ble_evt); - p_lbs->conn_handle = BLE_CONN_HANDLE_INVALID; -} - - -/**@brief Function for handling the Write event. - * - * @param[in] p_lbs LED Button Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_write(ble_lbs_t * p_lbs, ble_evt_t * p_ble_evt) -{ - ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; - - if ((p_evt_write->handle == p_lbs->led_char_handles.value_handle) && - (p_evt_write->len == 1) && - (p_lbs->led_write_handler != NULL)) - { - p_lbs->led_write_handler(p_lbs, p_evt_write->data[0]); - } -} - - -void ble_lbs_on_ble_evt(ble_lbs_t * p_lbs, ble_evt_t * p_ble_evt) -{ - switch (p_ble_evt->header.evt_id) - { - case BLE_GAP_EVT_CONNECTED: - on_connect(p_lbs, p_ble_evt); - break; - - case BLE_GAP_EVT_DISCONNECTED: - on_disconnect(p_lbs, p_ble_evt); - break; - - case BLE_GATTS_EVT_WRITE: - on_write(p_lbs, p_ble_evt); - break; - - default: - // No implementation needed. - break; - } -} - - -/**@brief Function for adding the LED Characteristic. - * - * @param[in] p_lbs LED Button Service structure. - * @param[in] p_lbs_init LED Button Service initialization structure. - * - * @retval NRF_SUCCESS on success, else an error value from the SoftDevice - */ -static uint32_t led_char_add(ble_lbs_t * p_lbs, const ble_lbs_init_t * p_lbs_init) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.read = 1; - char_md.char_props.write = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = NULL; - char_md.p_sccd_md = NULL; - - ble_uuid.type = p_lbs->uuid_type; - ble_uuid.uuid = LBS_UUID_LED_CHAR; - - memset(&attr_md, 0, sizeof(attr_md)); - - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.read_perm); - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.write_perm); - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = sizeof(uint8_t); - attr_char_value.init_offs = 0; - attr_char_value.max_len = sizeof(uint8_t); - attr_char_value.p_value = NULL; - - return sd_ble_gatts_characteristic_add(p_lbs->service_handle, - &char_md, - &attr_char_value, - &p_lbs->led_char_handles); -} - - -/**@brief Function for adding the Button Characteristic. - * - * @param[in] p_lbs LED Button Service structure. - * @param[in] p_lbs_init LED Button Service initialization structure. - * - * @retval NRF_SUCCESS on success, else an error value from the SoftDevice - */ -static uint32_t button_char_add(ble_lbs_t * p_lbs, const ble_lbs_init_t * p_lbs_init) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_md_t cccd_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - - memset(&cccd_md, 0, sizeof(cccd_md)); - - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.write_perm); - cccd_md.vloc = BLE_GATTS_VLOC_STACK; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.read = 1; - char_md.char_props.notify = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = &cccd_md; - char_md.p_sccd_md = NULL; - - ble_uuid.type = p_lbs->uuid_type; - ble_uuid.uuid = LBS_UUID_BUTTON_CHAR; - - memset(&attr_md, 0, sizeof(attr_md)); - - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.read_perm); - BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&attr_md.write_perm); - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = sizeof(uint8_t); - attr_char_value.init_offs = 0; - attr_char_value.max_len = sizeof(uint8_t); - attr_char_value.p_value = NULL; - - return sd_ble_gatts_characteristic_add(p_lbs->service_handle, - &char_md, - &attr_char_value, - &p_lbs->button_char_handles); -} - -uint32_t ble_lbs_init(ble_lbs_t * p_lbs, const ble_lbs_init_t * p_lbs_init) -{ - uint32_t err_code; - ble_uuid_t ble_uuid; - - // Initialize service structure. - p_lbs->conn_handle = BLE_CONN_HANDLE_INVALID; - p_lbs->led_write_handler = p_lbs_init->led_write_handler; - - // Add service. - ble_uuid128_t base_uuid = {LBS_UUID_BASE}; - err_code = sd_ble_uuid_vs_add(&base_uuid, &p_lbs->uuid_type); - VERIFY_SUCCESS(err_code); - - ble_uuid.type = p_lbs->uuid_type; - ble_uuid.uuid = LBS_UUID_SERVICE; - - err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &ble_uuid, &p_lbs->service_handle); - VERIFY_SUCCESS(err_code); - - // Add characteristics. - err_code = button_char_add(p_lbs, p_lbs_init); - VERIFY_SUCCESS(err_code); - - err_code = led_char_add(p_lbs, p_lbs_init); - VERIFY_SUCCESS(err_code); - - return NRF_SUCCESS; -} - -uint32_t ble_lbs_on_button_change(ble_lbs_t * p_lbs, uint8_t button_state) -{ - ble_gatts_hvx_params_t params; - uint16_t len = sizeof(button_state); - - memset(¶ms, 0, sizeof(params)); - params.type = BLE_GATT_HVX_NOTIFICATION; - params.handle = p_lbs->button_char_handles.value_handle; - params.p_data = &button_state; - params.p_len = &len; - - return sd_ble_gatts_hvx(p_lbs->conn_handle, ¶ms); -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs/ble_lbs.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs/ble_lbs.h deleted file mode 100644 index 8995c7997a..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs/ble_lbs.h +++ /dev/null @@ -1,104 +0,0 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/** @file - * - * @defgroup ble_sdk_srv_lbs LED Button Service Server - * @{ - * @ingroup ble_sdk_srv - * - * @brief LED Button Service Server module. - * - * @details This module implements a custom LED Button Service with an LED and Button Characteristics. - * During initialization, the module adds the LED Button Service and Characteristics - * to the BLE stack database. - * - * The application must supply an event handler for receiving LED Button Service - * events. Using this handler, the service notifies the application when the - * LED value changes. - * - * The service also provides a function for letting the application notify - * the state of the Button Characteristic to connected peers. - * - * @note The application must propagate BLE stack events to the LED Button Service - * module by calling ble_lbs_on_ble_evt() from the @ref softdevice_handler callback. -*/ - -#ifndef BLE_LBS_H__ -#define BLE_LBS_H__ - -#include -#include -#include "ble.h" -#include "ble_srv_common.h" - -#define LBS_UUID_BASE {0x23, 0xD1, 0xBC, 0xEA, 0x5F, 0x78, 0x23, 0x15, \ - 0xDE, 0xEF, 0x12, 0x12, 0x00, 0x00, 0x00, 0x00} -#define LBS_UUID_SERVICE 0x1523 -#define LBS_UUID_BUTTON_CHAR 0x1524 -#define LBS_UUID_LED_CHAR 0x1525 - -// Forward declaration of the ble_lbs_t type. -typedef struct ble_lbs_s ble_lbs_t; - -typedef void (*ble_lbs_led_write_handler_t) (ble_lbs_t * p_lbs, uint8_t new_state); - -/** @brief LED Button Service init structure. This structure contains all options and data needed for - * initialization of the service.*/ -typedef struct -{ - ble_lbs_led_write_handler_t led_write_handler; /**< Event handler to be called when the LED Characteristic is written. */ -} ble_lbs_init_t; - -/**@brief LED Button Service structure. This structure contains various status information for the service. */ -struct ble_lbs_s -{ - uint16_t service_handle; /**< Handle of LED Button Service (as provided by the BLE stack). */ - ble_gatts_char_handles_t led_char_handles; /**< Handles related to the LED Characteristic. */ - ble_gatts_char_handles_t button_char_handles; /**< Handles related to the Button Characteristic. */ - uint8_t uuid_type; /**< UUID type for the LED Button Service. */ - uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack). BLE_CONN_HANDLE_INVALID if not in a connection. */ - ble_lbs_led_write_handler_t led_write_handler; /**< Event handler to be called when the LED Characteristic is written. */ -}; - -/**@brief Function for initializing the LED Button Service. - * - * @param[out] p_lbs LED Button Service structure. This structure must be supplied by - * the application. It is initialized by this function and will later - * be used to identify this particular service instance. - * @param[in] p_lbs_init Information needed to initialize the service. - * - * @retval NRF_SUCCESS If the service was initialized successfully. Otherwise, an error code is returned. - */ -uint32_t ble_lbs_init(ble_lbs_t * p_lbs, const ble_lbs_init_t * p_lbs_init); - -/**@brief Function for handling the application's BLE stack events. - * - * @details This function handles all events from the BLE stack that are of interest to the LED Button Service. - * - * @param[in] p_lbs LED Button Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -void ble_lbs_on_ble_evt(ble_lbs_t * p_lbs, ble_evt_t * p_ble_evt); - -/**@brief Function for sending a button state notification. - * - * @param[in] p_lbs LED Button Service structure. - * @param[in] button_state New button state. - * - * @retval NRF_SUCCESS If the notification was sent successfully. Otherwise, an error code is returned. - */ -uint32_t ble_lbs_on_button_change(ble_lbs_t * p_lbs, uint8_t button_state); - -#endif // BLE_LBS_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs_c/ble_lbs_c.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs_c/ble_lbs_c.c deleted file mode 100644 index 7a3c140ce7..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs_c/ble_lbs_c.c +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is confidential property of Nordic Semiconductor. The use, - * copying, transfer or disclosure of such information is prohibited except by express written - * agreement with Nordic Semiconductor. - * - */ - - -#include "ble_lbs_c.h" -#include "ble_db_discovery.h" -#include "ble_types.h" -#include "ble_srv_common.h" -#include "ble_gattc.h" -#include "app_trace.h" -#include "sdk_common.h" -#include "nrf_log.h" - -#define LOG NRF_LOG_PRINTF_DEBUG /**< Debug logger macro that will be used in this file to do logging of important information over UART. */ - -#define TX_BUFFER_MASK 0x07 /**< TX Buffer mask, must be a mask of continuous zeroes, followed by continuous sequence of ones: 000...111. */ -#define TX_BUFFER_SIZE (TX_BUFFER_MASK + 1) /**< Size of send buffer, which is 1 higher than the mask. */ - -#define WRITE_MESSAGE_LENGTH BLE_CCCD_VALUE_LEN /**< Length of the write message for CCCD. */ -#define WRITE_MESSAGE_LENGTH BLE_CCCD_VALUE_LEN /**< Length of the write message for CCCD. */ - -typedef enum -{ - READ_REQ, /**< Type identifying that this tx_message is a read request. */ - WRITE_REQ /**< Type identifying that this tx_message is a write request. */ -} tx_request_t; - -/**@brief Structure for writing a message to the peer, i.e. CCCD. - */ -typedef struct -{ - uint8_t gattc_value[WRITE_MESSAGE_LENGTH]; /**< The message to write. */ - ble_gattc_write_params_t gattc_params; /**< GATTC parameters for this message. */ -} write_params_t; - -/**@brief Structure for holding data to be transmitted to the connected central. - */ -typedef struct -{ - uint16_t conn_handle; /**< Connection handle to be used when transmitting this message. */ - tx_request_t type; /**< Type of this message, i.e. read or write message. */ - union - { - uint16_t read_handle; /**< Read request message. */ - write_params_t write_req; /**< Write request message. */ - } req; -} tx_message_t; - - -static tx_message_t m_tx_buffer[TX_BUFFER_SIZE]; /**< Transmit buffer for messages to be transmitted to the central. */ -static uint32_t m_tx_insert_index = 0; /**< Current index in the transmit buffer where the next message should be inserted. */ -static uint32_t m_tx_index = 0; /**< Current index in the transmit buffer from where the next message to be transmitted resides. */ - - -/**@brief Function for passing any pending request from the buffer to the stack. - */ -static void tx_buffer_process(void) -{ - if (m_tx_index != m_tx_insert_index) - { - uint32_t err_code; - - if (m_tx_buffer[m_tx_index].type == READ_REQ) - { - err_code = sd_ble_gattc_read(m_tx_buffer[m_tx_index].conn_handle, - m_tx_buffer[m_tx_index].req.read_handle, - 0); - } - else - { - err_code = sd_ble_gattc_write(m_tx_buffer[m_tx_index].conn_handle, - &m_tx_buffer[m_tx_index].req.write_req.gattc_params); - } - if (err_code == NRF_SUCCESS) - { - LOG("[LBS_C]: SD Read/Write API returns Success..\r\n"); - m_tx_index++; - m_tx_index &= TX_BUFFER_MASK; - } - else - { - LOG("[LBS_C]: SD Read/Write API returns error. This message sending will be " - "attempted again..\r\n"); - } - } -} - - -/**@brief Function for handling write response events. - * - * @param[in] p_ble_lbs_c Pointer to the Led Button Client structure. - * @param[in] p_ble_evt Pointer to the BLE event received. - */ -static void on_write_rsp(ble_lbs_c_t * p_ble_lbs_c, const ble_evt_t * p_ble_evt) -{ - // Check if the event if on the link for this instance - if (p_ble_lbs_c->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) - { - return; - } - // Check if there is any message to be sent across to the peer and send it. - tx_buffer_process(); -} - - -/**@brief Function for handling Handle Value Notification received from the SoftDevice. - * - * @details This function will uses the Handle Value Notification received from the SoftDevice - * and checks if it is a notification of Button state from the peer. If - * it is, this function will decode the state of the button and send it to the - * application. - * - * @param[in] p_ble_lbs_c Pointer to the Led Button Client structure. - * @param[in] p_ble_evt Pointer to the BLE event received. - */ -static void on_hvx(ble_lbs_c_t * p_ble_lbs_c, const ble_evt_t * p_ble_evt) -{ - // Check if the event is on the link for this instance - if (p_ble_lbs_c->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) - { - return; - } - // Check if this is a Button notification. - if (p_ble_evt->evt.gattc_evt.params.hvx.handle == p_ble_lbs_c->peer_lbs_db.button_handle) - { - if (p_ble_evt->evt.gattc_evt.params.hvx.len == 1) - { - ble_lbs_c_evt_t ble_lbs_c_evt; - - ble_lbs_c_evt.evt_type = BLE_LBS_C_EVT_BUTTON_NOTIFICATION; - ble_lbs_c_evt.conn_handle = p_ble_lbs_c->conn_handle; - ble_lbs_c_evt.params.button.button_state = p_ble_evt->evt.gattc_evt.params.hvx.data[0]; - p_ble_lbs_c->evt_handler(p_ble_lbs_c, &ble_lbs_c_evt); - } - } -} - - -/**@brief Function for handling Disconnected event received from the SoftDevice. - * - * @details This function check if the disconnect event is happening on the link - * associated with the current instance of the module, if so it will set its - * conn_handle to invalid. - * - * @param[in] p_ble_lbs_c Pointer to the Led Button Client structure. - * @param[in] p_ble_evt Pointer to the BLE event received. - */ -static void on_disconnected(ble_lbs_c_t * p_ble_lbs_c, const ble_evt_t * p_ble_evt) -{ - if (p_ble_lbs_c->conn_handle == p_ble_evt->evt.gap_evt.conn_handle) - { - p_ble_lbs_c->conn_handle = BLE_CONN_HANDLE_INVALID; - p_ble_lbs_c->peer_lbs_db.button_cccd_handle = BLE_GATT_HANDLE_INVALID; - p_ble_lbs_c->peer_lbs_db.button_handle = BLE_GATT_HANDLE_INVALID; - p_ble_lbs_c->peer_lbs_db.led_handle = BLE_GATT_HANDLE_INVALID; - } -} - - -void ble_lbs_on_db_disc_evt(ble_lbs_c_t * p_ble_lbs_c, const ble_db_discovery_evt_t * p_evt) -{ - // Check if the Led Button Service was discovered. - if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE && - p_evt->params.discovered_db.srv_uuid.uuid == LBS_UUID_SERVICE && - p_evt->params.discovered_db.srv_uuid.type == p_ble_lbs_c->uuid_type) - { - ble_lbs_c_evt_t evt; - - evt.evt_type = BLE_LBS_C_EVT_DISCOVERY_COMPLETE; - evt.conn_handle = p_evt->conn_handle; - - uint32_t i; - for (i = 0; i < p_evt->params.discovered_db.char_count; i++) - { - const ble_gatt_db_char_t * p_char = &(p_evt->params.discovered_db.charateristics[i]); - switch(p_char->characteristic.uuid.uuid) - { - case LBS_UUID_LED_CHAR: - evt.params.peer_db.led_handle = p_char->characteristic.handle_value; - break; - case LBS_UUID_BUTTON_CHAR: - evt.params.peer_db.button_handle = p_char->characteristic.handle_value; - evt.params.peer_db.button_cccd_handle = p_char->cccd_handle; - break; - - default: - break; - } - } - - LOG("[LBS_C]: Led Button Service discovered at peer.\r\n"); - //If the instance has been assigned prior to db_discovery, assign the db_handles - if(p_ble_lbs_c->conn_handle != BLE_CONN_HANDLE_INVALID) - { - if ((p_ble_lbs_c->peer_lbs_db.led_handle == BLE_GATT_HANDLE_INVALID)&& - (p_ble_lbs_c->peer_lbs_db.button_handle == BLE_GATT_HANDLE_INVALID)&& - (p_ble_lbs_c->peer_lbs_db.button_cccd_handle == BLE_GATT_HANDLE_INVALID)) - { - p_ble_lbs_c->peer_lbs_db = evt.params.peer_db; - } - } - - p_ble_lbs_c->evt_handler(p_ble_lbs_c, &evt); - - } -} - - -uint32_t ble_lbs_c_init(ble_lbs_c_t * p_ble_lbs_c, ble_lbs_c_init_t * p_ble_lbs_c_init) -{ - uint32_t err_code; - ble_uuid_t lbs_uuid; - ble_uuid128_t lbs_base_uuid = {LBS_UUID_BASE}; - - VERIFY_PARAM_NOT_NULL(p_ble_lbs_c); - VERIFY_PARAM_NOT_NULL(p_ble_lbs_c_init); - VERIFY_PARAM_NOT_NULL(p_ble_lbs_c_init->evt_handler); - - p_ble_lbs_c->peer_lbs_db.button_cccd_handle = BLE_GATT_HANDLE_INVALID; - p_ble_lbs_c->peer_lbs_db.button_handle = BLE_GATT_HANDLE_INVALID; - p_ble_lbs_c->peer_lbs_db.led_handle = BLE_GATT_HANDLE_INVALID; - p_ble_lbs_c->conn_handle = BLE_CONN_HANDLE_INVALID; - p_ble_lbs_c->evt_handler = p_ble_lbs_c_init->evt_handler; - - err_code = sd_ble_uuid_vs_add(&lbs_base_uuid, &p_ble_lbs_c->uuid_type); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - VERIFY_SUCCESS(err_code); - - lbs_uuid.type = p_ble_lbs_c->uuid_type; - lbs_uuid.uuid = LBS_UUID_SERVICE; - - return ble_db_discovery_evt_register(&lbs_uuid); -} - -void ble_lbs_c_on_ble_evt(ble_lbs_c_t * p_ble_lbs_c, const ble_evt_t * p_ble_evt) -{ - if ((p_ble_lbs_c == NULL) || (p_ble_evt == NULL)) - { - return; - } - - switch (p_ble_evt->header.evt_id) - { - case BLE_GATTC_EVT_HVX: - on_hvx(p_ble_lbs_c, p_ble_evt); - break; - - case BLE_GATTC_EVT_WRITE_RSP: - on_write_rsp(p_ble_lbs_c, p_ble_evt); - break; - - case BLE_GAP_EVT_DISCONNECTED: - on_disconnected(p_ble_lbs_c, p_ble_evt); - break; - - default: - break; - } -} - - -/**@brief Function for configuring the CCCD. - * - * @param[in] conn_handle The connection handle on which to configure the CCCD. - * @param[in] handle_cccd The handle of the CCCD to be configured. - * @param[in] enable Whether to enable or disable the CCCD. - * - * @return NRF_SUCCESS if the CCCD configure was successfully sent to the peer. - */ -static uint32_t cccd_configure(uint16_t conn_handle, uint16_t handle_cccd, bool enable) -{ - LOG("[LBS_C]: Configuring CCCD. CCCD Handle = %d, Connection Handle = %d\r\n", - handle_cccd,conn_handle); - - tx_message_t * p_msg; - uint16_t cccd_val = enable ? BLE_GATT_HVX_NOTIFICATION : 0; - - p_msg = &m_tx_buffer[m_tx_insert_index++]; - m_tx_insert_index &= TX_BUFFER_MASK; - - p_msg->req.write_req.gattc_params.handle = handle_cccd; - p_msg->req.write_req.gattc_params.len = WRITE_MESSAGE_LENGTH; - p_msg->req.write_req.gattc_params.p_value = p_msg->req.write_req.gattc_value; - p_msg->req.write_req.gattc_params.offset = 0; - p_msg->req.write_req.gattc_params.write_op = BLE_GATT_OP_WRITE_REQ; - p_msg->req.write_req.gattc_value[0] = LSB_16(cccd_val); - p_msg->req.write_req.gattc_value[1] = MSB_16(cccd_val); - p_msg->conn_handle = conn_handle; - p_msg->type = WRITE_REQ; - - tx_buffer_process(); - return NRF_SUCCESS; -} - - -uint32_t ble_lbs_c_button_notif_enable(ble_lbs_c_t * p_ble_lbs_c) -{ - VERIFY_PARAM_NOT_NULL(p_ble_lbs_c); - - if (p_ble_lbs_c->conn_handle == BLE_CONN_HANDLE_INVALID) - { - return NRF_ERROR_INVALID_STATE; - } - - return cccd_configure(p_ble_lbs_c->conn_handle, - p_ble_lbs_c->peer_lbs_db.button_cccd_handle, - true); -} - - -uint32_t ble_lbs_led_status_send(ble_lbs_c_t * p_ble_lbs_c, uint8_t status) -{ - VERIFY_PARAM_NOT_NULL(p_ble_lbs_c); - - if (p_ble_lbs_c->conn_handle == BLE_CONN_HANDLE_INVALID) - { - return NRF_ERROR_INVALID_STATE; - } - - LOG("[LBS_C]: writing LED status 0x%x", status); - - tx_message_t * p_msg; - - p_msg = &m_tx_buffer[m_tx_insert_index++]; - m_tx_insert_index &= TX_BUFFER_MASK; - - p_msg->req.write_req.gattc_params.handle = p_ble_lbs_c->peer_lbs_db.led_handle; - p_msg->req.write_req.gattc_params.len = sizeof(status); - p_msg->req.write_req.gattc_params.p_value = p_msg->req.write_req.gattc_value; - p_msg->req.write_req.gattc_params.offset = 0; - p_msg->req.write_req.gattc_params.write_op = BLE_GATT_OP_WRITE_CMD; - p_msg->req.write_req.gattc_value[0] = status; - p_msg->conn_handle = p_ble_lbs_c->conn_handle; - p_msg->type = WRITE_REQ; - - tx_buffer_process(); - return NRF_SUCCESS; -} - -uint32_t ble_lbs_c_handles_assign(ble_lbs_c_t * p_ble_lbs_c, - uint16_t conn_handle, - const lbs_db_t * p_peer_handles) -{ - VERIFY_PARAM_NOT_NULL(p_ble_lbs_c); - - p_ble_lbs_c->conn_handle = conn_handle; - if (p_peer_handles != NULL) - { - p_ble_lbs_c->peer_lbs_db = *p_peer_handles; - } - return NRF_SUCCESS; -} - diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs_c/ble_lbs_c.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs_c/ble_lbs_c.h deleted file mode 100644 index b771a8035b..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lbs_c/ble_lbs_c.h +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright (c) 2016 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is confidential property of Nordic Semiconductor. The use, - * copying, transfer or disclosure of such information is prohibited except by express written - * agreement with Nordic Semiconductor. - * - */ - -/**@file - * - * @defgroup ble_sdk_srv_lbs_c LED Button Service Client - * @{ - * @ingroup ble_sdk_srv - * @brief The LED Button Service client can be used to set a LED, and read a button state on a - * LED button service server. - * - * @details This module contains the APIs and types exposed by the LED Button Service Client - * module. These APIs and types can be used by the application to perform discovery of - * LED Button Service at the peer and interact with it. - * - * @note The application must propagate BLE stack events to this module by calling - * ble_lbs_c_on_ble_evt(). - * - */ - -#ifndef BLE_LBS_C_H__ -#define BLE_LBS_C_H__ - -#include -#include "ble.h" -#include "ble_db_discovery.h" - -#define LBS_UUID_BASE {0x23, 0xD1, 0xBC, 0xEA, 0x5F, 0x78, 0x23, 0x15, \ - 0xDE, 0xEF, 0x12, 0x12, 0x00, 0x00, 0x00, 0x00} -#define LBS_UUID_SERVICE 0x1523 -#define LBS_UUID_BUTTON_CHAR 0x1524 -#define LBS_UUID_LED_CHAR 0x1525 - -/**@brief LBS Client event type. */ -typedef enum -{ - BLE_LBS_C_EVT_DISCOVERY_COMPLETE = 1, /**< Event indicating that the LED Button Service has been discovered at the peer. */ - BLE_LBS_C_EVT_BUTTON_NOTIFICATION /**< Event indicating that a notification of the LED Button Button characteristic has been received from the peer. */ -} ble_lbs_c_evt_type_t; - - -/**@brief Structure containing the Button value received from the peer. */ -typedef struct -{ - uint8_t button_state; /**< Button Value. */ -} ble_button_t; - - -/**@brief Structure containing the handles related to the LED Button Service found on the peer. */ -typedef struct -{ - uint16_t button_cccd_handle; /**< Handle of the CCCD of the Button characteristic. */ - uint16_t button_handle; /**< Handle of the Button characteristic as provided by the SoftDevice. */ - uint16_t led_handle; /**< Handle of the LED characteristic as provided by the SoftDevice. */ -} lbs_db_t; - - -/**@brief LED Button Event structure. */ -typedef struct -{ - ble_lbs_c_evt_type_t evt_type; /**< Type of the event. */ - uint16_t conn_handle; /**< Connection handle on which the event occured.*/ - union - { - ble_button_t button; /**< Button Value received. This will be filled if the evt_type is @ref BLE_LBS_C_EVT_BUTTON_NOTIFICATION. */ - lbs_db_t peer_db; /**< LED Button Service related handles found on the peer device. This will be filled if the evt_type is @ref BLE_LBS_C_EVT_DISCOVERY_COMPLETE.*/ - } params; -} ble_lbs_c_evt_t; - - -// Forward declaration of the ble_lbs_c_t type. -typedef struct ble_lbs_c_s ble_lbs_c_t; - -/**@brief Event handler type. - * - * @details This is the type of the event handler that should be provided by the application - * of this module in order to receive events. - */ -typedef void (* ble_lbs_c_evt_handler_t) (ble_lbs_c_t * p_ble_lbs_c, ble_lbs_c_evt_t * p_evt); - - -/**@brief LED Button Client structure. */ -struct ble_lbs_c_s -{ - uint16_t conn_handle; /**< Connection handle as provided by the SoftDevice. */ - lbs_db_t peer_lbs_db; /**< Handles related to LBS on the peer*/ - ble_lbs_c_evt_handler_t evt_handler; /**< Application event handler to be called when there is an event related to the LED Button service. */ - uint8_t uuid_type; /**< UUID type. */ -}; - -/**@brief LED Button Client initialization structure. */ -typedef struct -{ - ble_lbs_c_evt_handler_t evt_handler; /**< Event handler to be called by the LED Button Client module whenever there is an event related to the LED Button Service. */ -} ble_lbs_c_init_t; - - -/**@brief Function for initializing the LED Button client module. - * - * @details This function will register with the DB Discovery module. There it registers for the - * LED Button Service. Doing so will make the DB Discovery module look for the presence - * of a LED Button Service instance at the peer when a discovery is started. - * - * @param[in] p_ble_lbs_c Pointer to the LED Button client structure. - * @param[in] p_ble_lbs_c_init Pointer to the LED Button initialization structure containing the - * initialization information. - * - * @retval NRF_SUCCESS On successful initialization. Otherwise an error code. This function - * propagates the error code returned by the Database Discovery module API - * @ref ble_db_discovery_evt_register. - */ -uint32_t ble_lbs_c_init(ble_lbs_c_t * p_ble_lbs_c, ble_lbs_c_init_t * p_ble_lbs_c_init); - -/**@brief Function for handling BLE events from the SoftDevice. - * - * @details This function will handle the BLE events received from the SoftDevice. If a BLE event - * is relevant to the LED Button Client module, then it uses it to update interval - * variables and, if necessary, send events to the application. - * - * @param[in] p_ble_lbs_c Pointer to the LED button client structure. - * @param[in] p_ble_evt Pointer to the BLE event. - */ -void ble_lbs_c_on_ble_evt(ble_lbs_c_t * p_ble_lbs_c, const ble_evt_t * p_ble_evt); - - -/**@brief Function for requesting the peer to start sending notification of the Button - * Characteristic. - * - * @details This function will enable to notification of the Button at the peer - * by writing to the CCCD of the Button Characteristic. - * - * @param[in] p_ble_lbs_c Pointer to the LED Button Client structure. - * - * @retval NRF_SUCCESS If the SoftDevice has been requested to write to the CCCD of the peer. - * Otherwise, an error code. This function propagates the error code returned - * by the SoftDevice API @ref sd_ble_gattc_write. - * NRF_ERROR_INVALID_STATE if no connection handle has been assigned (@ref ble_lbs_c_handles_assign) - * NRF_ERROR_NULL if the given parameter is NULL - */ -uint32_t ble_lbs_c_button_notif_enable(ble_lbs_c_t * p_ble_lbs_c); - - -/**@brief Function for handling events from the database discovery module. - * - * @details Call this function when getting a callback event from the DB discovery module. This - * function will handle an event from the database discovery module, and determine if it - * relates to the discovery of LED Button service at the peer. If so, it will call the - * application's event handler indicating that the LED Button service has been discovered - * at the peer. It also populates the event with the service related information before - * providing it to the application. - * - * @param[in] p_ble_lbs_c Pointer to the LED Button client structure. - * @param[in] p_evt Pointer to the event received from the database discovery module. - */ -void ble_lbs_on_db_disc_evt(ble_lbs_c_t * p_ble_lbs_c, const ble_db_discovery_evt_t * p_evt); - - -/**@brief Function for assigning a Handles to this instance of lbs_c. - * - * @details Call this function when a link has been established with a peer to associate this link - * to this instance of the module. This makes it possible to handle several links and - * associate each link to a particular instance of this module. - * - * @param[in] p_ble_lbs_c Pointer to the LED Button client structure instance to associate. - * @param[in] conn_handle Connection handle to associate with the given LED Button Client Instance. - * @param[in] p_peer_handles LED Button Service handles found on the peer (from @ref BLE_LBS_C_EVT_DISCOVERY_COMPLETE event). - * - */ -uint32_t ble_lbs_c_handles_assign(ble_lbs_c_t * p_ble_lbs_c, - uint16_t conn_handle, - const lbs_db_t * p_peer_handles); - - -/**@brief Function for writing the LED status to the connected server. - * - * @param[in] p_ble_lbs_c Pointer to the LED Button client structure. - * @param[in] status LED status to send. - * - * @retval NRF_SUCCESS If the staus was sent successfully. Otherwise, an error code is returned. - */ -uint32_t ble_lbs_led_status_send(ble_lbs_c_t * p_ble_lbs_c, uint8_t status); - -#endif // BLE_LBS_C_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lls/ble_lls.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lls/ble_lls.c deleted file mode 100644 index bdc1ca87ec..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lls/ble_lls.c +++ /dev/null @@ -1,214 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/* Attention! -* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile -* qualification listings, this section of source code must not be modified. -*/ - -#include "ble_lls.h" -#include -#include "ble_hci.h" -#include "ble_srv_common.h" - - -/**@brief Function for handling the Connect event. - * - * @param[in] p_lls Link Loss Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_connect(ble_lls_t * p_lls, ble_evt_t * p_ble_evt) -{ - // Link reconnected, notify application with a no_alert event - ble_lls_evt_t evt; - - p_lls->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; - - evt.evt_type = BLE_LLS_EVT_LINK_LOSS_ALERT; - evt.params.alert_level = BLE_CHAR_ALERT_LEVEL_NO_ALERT; - p_lls->evt_handler(p_lls, &evt); -} - - -/**@brief Function for handling the Disconnect event. - * - * @param[in] p_lls Link Loss Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_disconnect(ble_lls_t * p_lls, ble_evt_t * p_ble_evt) -{ - uint8_t reason = p_ble_evt->evt.gap_evt.params.disconnected.reason; - - if (reason == BLE_HCI_CONNECTION_TIMEOUT) - { - // Link loss detected, notify application - uint32_t err_code; - ble_lls_evt_t evt; - - evt.evt_type = BLE_LLS_EVT_LINK_LOSS_ALERT; - - err_code = ble_lls_alert_level_get(p_lls, &evt.params.alert_level); - if (err_code == NRF_SUCCESS) - { - p_lls->evt_handler(p_lls, &evt); - } - else - { - if (p_lls->error_handler != NULL) - { - p_lls->error_handler(err_code); - } - } - } -} - - -/**@brief Function for handling the Authentication Status event. - * - * @param[in] p_lls Link Loss Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_auth_status(ble_lls_t * p_lls, ble_evt_t * p_ble_evt) -{ - if (p_ble_evt->evt.gap_evt.params.auth_status.auth_status == BLE_GAP_SEC_STATUS_SUCCESS) - { - ble_lls_evt_t evt; - - evt.evt_type = BLE_LLS_EVT_LINK_LOSS_ALERT; - evt.params.alert_level = BLE_CHAR_ALERT_LEVEL_NO_ALERT; - - p_lls->evt_handler(p_lls, &evt); - } -} - - -void ble_lls_on_ble_evt(ble_lls_t * p_lls, ble_evt_t * p_ble_evt) -{ - switch (p_ble_evt->header.evt_id) - { - case BLE_GAP_EVT_CONNECTED: - on_connect(p_lls, p_ble_evt); - break; - - case BLE_GAP_EVT_DISCONNECTED: - on_disconnect(p_lls, p_ble_evt); - break; - - case BLE_GAP_EVT_AUTH_STATUS: - on_auth_status(p_lls, p_ble_evt); - break; - - default: - // No implementation needed. - break; - } -} - - -/**@brief Function for adding Alert Level characteristics. - * - * @param[in] p_lls Link Loss Service structure. - * @param[in] p_lls_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t alert_level_char_add(ble_lls_t * p_lls, const ble_lls_init_t * p_lls_init) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - uint8_t initial_alert_level; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.read = 1; - char_md.char_props.write = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = NULL; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_ALERT_LEVEL_CHAR); - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.read_perm = p_lls_init->lls_attr_md.read_perm; - attr_md.write_perm = p_lls_init->lls_attr_md.write_perm; - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - initial_alert_level = p_lls_init->initial_alert_level; - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = sizeof (uint8_t); - attr_char_value.init_offs = 0; - attr_char_value.max_len = sizeof (uint8_t); - attr_char_value.p_value = &initial_alert_level; - - return sd_ble_gatts_characteristic_add(p_lls->service_handle, - &char_md, - &attr_char_value, - &p_lls->alert_level_handles); -} - - -uint32_t ble_lls_init(ble_lls_t * p_lls, const ble_lls_init_t * p_lls_init) -{ - uint32_t err_code; - ble_uuid_t ble_uuid; - - // Initialize service structure - if (p_lls_init->evt_handler == NULL) - { - return NRF_ERROR_INVALID_PARAM; - } - - p_lls->evt_handler = p_lls_init->evt_handler; - p_lls->error_handler = p_lls_init->error_handler; - - // Add service - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_LINK_LOSS_SERVICE); - - err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, - &ble_uuid, - &p_lls->service_handle); - - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add alert level characteristic - return alert_level_char_add(p_lls, p_lls_init); -} - - -uint32_t ble_lls_alert_level_get(ble_lls_t * p_lls, uint8_t * p_alert_level) -{ - ble_gatts_value_t gatts_value; - - // Initialize value struct. - memset(&gatts_value, 0, sizeof(gatts_value)); - - gatts_value.len = sizeof(uint8_t); - gatts_value.offset = 0; - gatts_value.p_value = p_alert_level; - - return sd_ble_gatts_value_get(p_lls->conn_handle, - p_lls->alert_level_handles.value_handle, - &gatts_value); -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lls/ble_lls.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lls/ble_lls.h deleted file mode 100644 index 8a3e2cb95b..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_lls/ble_lls.h +++ /dev/null @@ -1,116 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/** @file - * - * @defgroup ble_sdk_srv_lls Link Loss Service - * @{ - * @ingroup ble_sdk_srv - * @brief Link Loss Service module. - * - * @details This module implements the Link Loss Service with the Alert Level characteristic. - * During initialization it adds the Link Loss Service and Alert Level characteristic - * to the BLE stack database. - * - * The application must supply an event handler for receiving Link Loss Service - * events. Using this handler, the service will notify the application when the - * link has been lost, and which Alert Level has been set. - * - * The service also provides a function for letting the application poll the current - * value of the Alert Level characteristic. - * - * @note The application must propagate BLE stack events to the Link Loss Service - * module by calling ble_lls_on_ble_evt() from the @ref softdevice_handler callback. - * - * @note Attention! - * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile - * qualification listings, this section of source code must not be modified. -*/ - -#ifndef BLE_LLS_H__ -#define BLE_LLS_H__ - -#include -#include "ble.h" -#include "ble_srv_common.h" - -/**@brief Link Loss Service event type. */ -typedef enum -{ - BLE_LLS_EVT_LINK_LOSS_ALERT /**< Alert Level Updated event. */ -} ble_lls_evt_type_t; - -/**@brief Link Loss Service event. */ -typedef struct -{ - ble_lls_evt_type_t evt_type; /**< Type of event. */ - union - { - uint8_t alert_level; /**< New Alert Level value. */ - } params; -} ble_lls_evt_t; - -// Forward declaration of the ble_lls_t type. -typedef struct ble_lls_s ble_lls_t; - -/**@brief Link Loss Service event handler type. */ -typedef void (*ble_lls_evt_handler_t) (ble_lls_t * p_lls, ble_lls_evt_t * p_evt); - -/**@brief Link Loss Service init structure. This contains all options and data needed for initialization of the service. */ -typedef struct -{ - ble_lls_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Link Loss Service. */ - ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ - uint8_t initial_alert_level; /**< Initial value of the Alert Level characteristic. */ - ble_srv_security_mode_t lls_attr_md; /**< Initial Security Setting for Link Loss Service Characteristics. */ -} ble_lls_init_t; - -/**@brief Link Loss Service structure. This contains various status information for the service. */ -struct ble_lls_s -{ - ble_lls_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Link Loss Service. */ - ble_srv_error_handler_t error_handler; /**< Function to be called in case of an error. */ - uint16_t service_handle; /**< Handle of Link Loss Service (as provided by the BLE stack). */ - ble_gatts_char_handles_t alert_level_handles; /**< Handles related to the Alert Level characteristic. */ - uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ -}; - -/**@brief Function for initializing the Link Loss Service. - * - * @param[out] p_lls Link Loss Service structure. This structure will have to be supplied by - * the application. It will be initialized by this function, and will later - * be used to identify this particular service instance. - * @param[in] p_lls_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. - */ -uint32_t ble_lls_init(ble_lls_t * p_lls, const ble_lls_init_t * p_lls_init); - -/**@brief Function for handling the Application's BLE Stack events. - * - * @details Handles all events from the BLE stack of interest to the Link Loss Service. - * - * @param[in] p_lls Link Loss Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -void ble_lls_on_ble_evt(ble_lls_t * p_lls, ble_evt_t * p_ble_evt); - -/**@brief Function for getting current value of the Alert Level characteristic. - * - * @param[in] p_lls Link Loss Service structure. - * @param[out] p_alert_level Current Alert Level value. - */ -uint32_t ble_lls_alert_level_get(ble_lls_t * p_lls, uint8_t * p_alert_level); - -#endif // BLE_LLS_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus/ble_nus.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus/ble_nus.c deleted file mode 100644 index 3fb037bb4d..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus/ble_nus.c +++ /dev/null @@ -1,295 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -#include "ble_nus.h" -#include "ble_srv_common.h" -#include "sdk_common.h" - -#define BLE_UUID_NUS_TX_CHARACTERISTIC 0x0002 /**< The UUID of the TX Characteristic. */ -#define BLE_UUID_NUS_RX_CHARACTERISTIC 0x0003 /**< The UUID of the RX Characteristic. */ - -#define BLE_NUS_MAX_RX_CHAR_LEN BLE_NUS_MAX_DATA_LEN /**< Maximum length of the RX Characteristic (in bytes). */ -#define BLE_NUS_MAX_TX_CHAR_LEN BLE_NUS_MAX_DATA_LEN /**< Maximum length of the TX Characteristic (in bytes). */ - -#define NUS_BASE_UUID {{0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E}} /**< Used vendor specific UUID. */ - -/**@brief Function for handling the @ref BLE_GAP_EVT_CONNECTED event from the S110 SoftDevice. - * - * @param[in] p_nus Nordic UART Service structure. - * @param[in] p_ble_evt Pointer to the event received from BLE stack. - */ -static void on_connect(ble_nus_t * p_nus, ble_evt_t * p_ble_evt) -{ - p_nus->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; -} - - -/**@brief Function for handling the @ref BLE_GAP_EVT_DISCONNECTED event from the S110 SoftDevice. - * - * @param[in] p_nus Nordic UART Service structure. - * @param[in] p_ble_evt Pointer to the event received from BLE stack. - */ -static void on_disconnect(ble_nus_t * p_nus, ble_evt_t * p_ble_evt) -{ - UNUSED_PARAMETER(p_ble_evt); - p_nus->conn_handle = BLE_CONN_HANDLE_INVALID; -} - - -/**@brief Function for handling the @ref BLE_GATTS_EVT_WRITE event from the S110 SoftDevice. - * - * @param[in] p_nus Nordic UART Service structure. - * @param[in] p_ble_evt Pointer to the event received from BLE stack. - */ -static void on_write(ble_nus_t * p_nus, ble_evt_t * p_ble_evt) -{ - ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; - - if ( - (p_evt_write->handle == p_nus->rx_handles.cccd_handle) - && - (p_evt_write->len == 2) - ) - { - if (ble_srv_is_notification_enabled(p_evt_write->data)) - { - p_nus->is_notification_enabled = true; - } - else - { - p_nus->is_notification_enabled = false; - } - } - else if ( - (p_evt_write->handle == p_nus->tx_handles.value_handle) - && - (p_nus->data_handler != NULL) - ) - { - p_nus->data_handler(p_nus, p_evt_write->data, p_evt_write->len); - } - else - { - // Do Nothing. This event is not relevant for this service. - } -} - - -/**@brief Function for adding RX characteristic. - * - * @param[in] p_nus Nordic UART Service structure. - * @param[in] p_nus_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t rx_char_add(ble_nus_t * p_nus, const ble_nus_init_t * p_nus_init) -{ - /**@snippet [Adding proprietary characteristic to S110 SoftDevice] */ - ble_gatts_char_md_t char_md; - ble_gatts_attr_md_t cccd_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - - memset(&cccd_md, 0, sizeof(cccd_md)); - - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.write_perm); - - cccd_md.vloc = BLE_GATTS_VLOC_STACK; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.notify = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = &cccd_md; - char_md.p_sccd_md = NULL; - - ble_uuid.type = p_nus->uuid_type; - ble_uuid.uuid = BLE_UUID_NUS_RX_CHARACTERISTIC; - - memset(&attr_md, 0, sizeof(attr_md)); - - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.read_perm); - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.write_perm); - - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 1; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = sizeof(uint8_t); - attr_char_value.init_offs = 0; - attr_char_value.max_len = BLE_NUS_MAX_RX_CHAR_LEN; - - return sd_ble_gatts_characteristic_add(p_nus->service_handle, - &char_md, - &attr_char_value, - &p_nus->rx_handles); - /**@snippet [Adding proprietary characteristic to S110 SoftDevice] */ -} - - -/**@brief Function for adding TX characteristic. - * - * @param[in] p_nus Nordic UART Service structure. - * @param[in] p_nus_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t tx_char_add(ble_nus_t * p_nus, const ble_nus_init_t * p_nus_init) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.write = 1; - char_md.char_props.write_wo_resp = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = NULL; - char_md.p_sccd_md = NULL; - - ble_uuid.type = p_nus->uuid_type; - ble_uuid.uuid = BLE_UUID_NUS_TX_CHARACTERISTIC; - - memset(&attr_md, 0, sizeof(attr_md)); - - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.read_perm); - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.write_perm); - - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 1; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = 1; - attr_char_value.init_offs = 0; - attr_char_value.max_len = BLE_NUS_MAX_TX_CHAR_LEN; - - return sd_ble_gatts_characteristic_add(p_nus->service_handle, - &char_md, - &attr_char_value, - &p_nus->tx_handles); -} - - -void ble_nus_on_ble_evt(ble_nus_t * p_nus, ble_evt_t * p_ble_evt) -{ - if ((p_nus == NULL) || (p_ble_evt == NULL)) - { - return; - } - - switch (p_ble_evt->header.evt_id) - { - case BLE_GAP_EVT_CONNECTED: - on_connect(p_nus, p_ble_evt); - break; - - case BLE_GAP_EVT_DISCONNECTED: - on_disconnect(p_nus, p_ble_evt); - break; - - case BLE_GATTS_EVT_WRITE: - on_write(p_nus, p_ble_evt); - break; - - default: - // No implementation needed. - break; - } -} - - -uint32_t ble_nus_init(ble_nus_t * p_nus, const ble_nus_init_t * p_nus_init) -{ - uint32_t err_code; - ble_uuid_t ble_uuid; - ble_uuid128_t nus_base_uuid = NUS_BASE_UUID; - - VERIFY_PARAM_NOT_NULL(p_nus); - VERIFY_PARAM_NOT_NULL(p_nus_init); - - // Initialize the service structure. - p_nus->conn_handle = BLE_CONN_HANDLE_INVALID; - p_nus->data_handler = p_nus_init->data_handler; - p_nus->is_notification_enabled = false; - - /**@snippet [Adding proprietary Service to S110 SoftDevice] */ - // Add a custom base UUID. - err_code = sd_ble_uuid_vs_add(&nus_base_uuid, &p_nus->uuid_type); - VERIFY_SUCCESS(err_code); - - ble_uuid.type = p_nus->uuid_type; - ble_uuid.uuid = BLE_UUID_NUS_SERVICE; - - // Add the service. - err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, - &ble_uuid, - &p_nus->service_handle); - /**@snippet [Adding proprietary Service to S110 SoftDevice] */ - VERIFY_SUCCESS(err_code); - - // Add the RX Characteristic. - err_code = rx_char_add(p_nus, p_nus_init); - VERIFY_SUCCESS(err_code); - - // Add the TX Characteristic. - err_code = tx_char_add(p_nus, p_nus_init); - VERIFY_SUCCESS(err_code); - - return NRF_SUCCESS; -} - - -uint32_t ble_nus_string_send(ble_nus_t * p_nus, uint8_t * p_string, uint16_t length) -{ - ble_gatts_hvx_params_t hvx_params; - - VERIFY_PARAM_NOT_NULL(p_nus); - - if ((p_nus->conn_handle == BLE_CONN_HANDLE_INVALID) || (!p_nus->is_notification_enabled)) - { - return NRF_ERROR_INVALID_STATE; - } - - if (length > BLE_NUS_MAX_DATA_LEN) - { - return NRF_ERROR_INVALID_PARAM; - } - - memset(&hvx_params, 0, sizeof(hvx_params)); - - hvx_params.handle = p_nus->rx_handles.value_handle; - hvx_params.p_data = p_string; - hvx_params.p_len = &length; - hvx_params.type = BLE_GATT_HVX_NOTIFICATION; - - return sd_ble_gatts_hvx(p_nus->conn_handle, &hvx_params); -} - - diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus/ble_nus.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus/ble_nus.h deleted file mode 100644 index 23b7007f7a..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus/ble_nus.h +++ /dev/null @@ -1,114 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/**@file - * - * @defgroup ble_sdk_srv_nus Nordic UART Service - * @{ - * @ingroup ble_sdk_srv - * @brief Nordic UART Service implementation. - * - * @details The Nordic UART Service is a simple GATT-based service with TX and RX characteristics. - * Data received from the peer is passed to the application, and the data received - * from the application of this service is sent to the peer as Handle Value - * Notifications. This module demonstrates how to implement a custom GATT-based - * service and characteristics using the SoftDevice. The service - * is used by the application to send and receive ASCII text strings to and from the - * peer. - * - * @note The application must propagate SoftDevice events to the Nordic UART Service module - * by calling the ble_nus_on_ble_evt() function from the ble_stack_handler callback. - */ - -#ifndef BLE_NUS_H__ -#define BLE_NUS_H__ - -#include "ble.h" -#include "ble_srv_common.h" -#include -#include - -#define BLE_UUID_NUS_SERVICE 0x0001 /**< The UUID of the Nordic UART Service. */ -#define BLE_NUS_MAX_DATA_LEN (GATT_MTU_SIZE_DEFAULT - 3) /**< Maximum length of data (in bytes) that can be transmitted to the peer by the Nordic UART service module. */ - -/* Forward declaration of the ble_nus_t type. */ -typedef struct ble_nus_s ble_nus_t; - -/**@brief Nordic UART Service event handler type. */ -typedef void (*ble_nus_data_handler_t) (ble_nus_t * p_nus, uint8_t * p_data, uint16_t length); - -/**@brief Nordic UART Service initialization structure. - * - * @details This structure contains the initialization information for the service. The application - * must fill this structure and pass it to the service using the @ref ble_nus_init - * function. - */ -typedef struct -{ - ble_nus_data_handler_t data_handler; /**< Event handler to be called for handling received data. */ -} ble_nus_init_t; - -/**@brief Nordic UART Service structure. - * - * @details This structure contains status information related to the service. - */ -struct ble_nus_s -{ - uint8_t uuid_type; /**< UUID type for Nordic UART Service Base UUID. */ - uint16_t service_handle; /**< Handle of Nordic UART Service (as provided by the SoftDevice). */ - ble_gatts_char_handles_t tx_handles; /**< Handles related to the TX characteristic (as provided by the SoftDevice). */ - ble_gatts_char_handles_t rx_handles; /**< Handles related to the RX characteristic (as provided by the SoftDevice). */ - uint16_t conn_handle; /**< Handle of the current connection (as provided by the SoftDevice). BLE_CONN_HANDLE_INVALID if not in a connection. */ - bool is_notification_enabled; /**< Variable to indicate if the peer has enabled notification of the RX characteristic.*/ - ble_nus_data_handler_t data_handler; /**< Event handler to be called for handling received data. */ -}; - -/**@brief Function for initializing the Nordic UART Service. - * - * @param[out] p_nus Nordic UART Service structure. This structure must be supplied - * by the application. It is initialized by this function and will - * later be used to identify this particular service instance. - * @param[in] p_nus_init Information needed to initialize the service. - * - * @retval NRF_SUCCESS If the service was successfully initialized. Otherwise, an error code is returned. - * @retval NRF_ERROR_NULL If either of the pointers p_nus or p_nus_init is NULL. - */ -uint32_t ble_nus_init(ble_nus_t * p_nus, const ble_nus_init_t * p_nus_init); - -/**@brief Function for handling the Nordic UART Service's BLE events. - * - * @details The Nordic UART Service expects the application to call this function each time an - * event is received from the SoftDevice. This function processes the event if it - * is relevant and calls the Nordic UART Service event handler of the - * application if necessary. - * - * @param[in] p_nus Nordic UART Service structure. - * @param[in] p_ble_evt Event received from the SoftDevice. - */ -void ble_nus_on_ble_evt(ble_nus_t * p_nus, ble_evt_t * p_ble_evt); - -/**@brief Function for sending a string to the peer. - * - * @details This function sends the input string as an RX characteristic notification to the - * peer. - * - * @param[in] p_nus Pointer to the Nordic UART Service structure. - * @param[in] p_string String to be sent. - * @param[in] length Length of the string. - * - * @retval NRF_SUCCESS If the string was sent successfully. Otherwise, an error code is returned. - */ -uint32_t ble_nus_string_send(ble_nus_t * p_nus, uint8_t * p_string, uint16_t length); - -#endif // BLE_NUS_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus_c/ble_nus_c.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus_c/ble_nus_c.c deleted file mode 100644 index 1c856a90b5..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus_c/ble_nus_c.c +++ /dev/null @@ -1,212 +0,0 @@ -#include // definition of NULL - -#include "ble.h" -#include "ble_nus_c.h" -#include "ble_gattc.h" -#include "ble_srv_common.h" -#include "app_error.h" -#include "sdk_common.h" - - -void ble_nus_c_on_db_disc_evt(ble_nus_c_t * p_ble_nus_c, ble_db_discovery_evt_t * p_evt) -{ - ble_nus_c_evt_t nus_c_evt; - memset(&nus_c_evt,0,sizeof(ble_nus_c_evt_t)); - - ble_gatt_db_char_t * p_chars = p_evt->params.discovered_db.charateristics; - - // Check if the NUS was discovered. - if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE && - p_evt->params.discovered_db.srv_uuid.uuid == BLE_UUID_NUS_SERVICE && - p_evt->params.discovered_db.srv_uuid.type == p_ble_nus_c->uuid_type) - { - - uint32_t i; - - for (i = 0; i < p_evt->params.discovered_db.char_count; i++) - { - switch (p_chars[i].characteristic.uuid.uuid) - { - case BLE_UUID_NUS_TX_CHARACTERISTIC: - nus_c_evt.handles.nus_tx_handle = p_chars[i].characteristic.handle_value; - break; - - case BLE_UUID_NUS_RX_CHARACTERISTIC: - nus_c_evt.handles.nus_rx_handle = p_chars[i].characteristic.handle_value; - nus_c_evt.handles.nus_rx_cccd_handle = p_chars[i].cccd_handle; - break; - - default: - break; - } - } - if (p_ble_nus_c->evt_handler != NULL) - { - nus_c_evt.conn_handle = p_evt->conn_handle; - nus_c_evt.evt_type = BLE_NUS_C_EVT_DISCOVERY_COMPLETE; - p_ble_nus_c->evt_handler(p_ble_nus_c, &nus_c_evt); - } - } -} - -/**@brief Function for handling Handle Value Notification received from the SoftDevice. - * - * @details This function will uses the Handle Value Notification received from the SoftDevice - * and checks if it is a notification of the NUS RX characteristic from the peer. If - * it is, this function will decode the data and send it to the - * application. - * - * @param[in] p_ble_nus_c Pointer to the NUS Client structure. - * @param[in] p_ble_evt Pointer to the BLE event received. - */ -static void on_hvx(ble_nus_c_t * p_ble_nus_c, const ble_evt_t * p_ble_evt) -{ - // HVX can only occur from client sending. - if ( (p_ble_nus_c->handles.nus_rx_handle != BLE_GATT_HANDLE_INVALID) - && (p_ble_evt->evt.gattc_evt.params.hvx.handle == p_ble_nus_c->handles.nus_rx_handle) - && (p_ble_nus_c->evt_handler != NULL) - ) - { - ble_nus_c_evt_t ble_nus_c_evt; - - ble_nus_c_evt.evt_type = BLE_NUS_C_EVT_NUS_RX_EVT; - ble_nus_c_evt.p_data = (uint8_t *)p_ble_evt->evt.gattc_evt.params.hvx.data; - ble_nus_c_evt.data_len = p_ble_evt->evt.gattc_evt.params.hvx.len; - - p_ble_nus_c->evt_handler(p_ble_nus_c, &ble_nus_c_evt); - } -} - -uint32_t ble_nus_c_init(ble_nus_c_t * p_ble_nus_c, ble_nus_c_init_t * p_ble_nus_c_init) -{ - uint32_t err_code; - ble_uuid_t uart_uuid; - ble_uuid128_t nus_base_uuid = NUS_BASE_UUID; - - VERIFY_PARAM_NOT_NULL(p_ble_nus_c); - VERIFY_PARAM_NOT_NULL(p_ble_nus_c_init); - - err_code = sd_ble_uuid_vs_add(&nus_base_uuid, &p_ble_nus_c->uuid_type); - VERIFY_SUCCESS(err_code); - - uart_uuid.type = p_ble_nus_c->uuid_type; - uart_uuid.uuid = BLE_UUID_NUS_SERVICE; - - p_ble_nus_c->conn_handle = BLE_CONN_HANDLE_INVALID; - p_ble_nus_c->evt_handler = p_ble_nus_c_init->evt_handler; - p_ble_nus_c->handles.nus_rx_handle = BLE_GATT_HANDLE_INVALID; - p_ble_nus_c->handles.nus_tx_handle = BLE_GATT_HANDLE_INVALID; - - return ble_db_discovery_evt_register(&uart_uuid); -} - -void ble_nus_c_on_ble_evt(ble_nus_c_t * p_ble_nus_c, const ble_evt_t * p_ble_evt) -{ - if ((p_ble_nus_c == NULL) || (p_ble_evt == NULL)) - { - return; - } - - if ( (p_ble_nus_c->conn_handle != BLE_CONN_HANDLE_INVALID) - &&(p_ble_nus_c->conn_handle != p_ble_evt->evt.gap_evt.conn_handle) - ) - { - return; - } - - switch (p_ble_evt->header.evt_id) - { - case BLE_GATTC_EVT_HVX: - on_hvx(p_ble_nus_c, p_ble_evt); - break; - - case BLE_GAP_EVT_DISCONNECTED: - if (p_ble_evt->evt.gap_evt.conn_handle == p_ble_nus_c->conn_handle - && p_ble_nus_c->evt_handler != NULL) - { - ble_nus_c_evt_t nus_c_evt; - - nus_c_evt.evt_type = BLE_NUS_C_EVT_DISCONNECTED; - - p_ble_nus_c->conn_handle = BLE_CONN_HANDLE_INVALID; - p_ble_nus_c->evt_handler(p_ble_nus_c, &nus_c_evt); - } - break; - } -} - -/**@brief Function for creating a message for writing to the CCCD. - */ -static uint32_t cccd_configure(uint16_t conn_handle, uint16_t cccd_handle, bool enable) -{ - uint8_t buf[BLE_CCCD_VALUE_LEN]; - - buf[0] = enable ? BLE_GATT_HVX_NOTIFICATION : 0; - buf[1] = 0; - - const ble_gattc_write_params_t write_params = { - .write_op = BLE_GATT_OP_WRITE_REQ, - .flags = BLE_GATT_EXEC_WRITE_FLAG_PREPARED_WRITE, - .handle = cccd_handle, - .offset = 0, - .len = sizeof(buf), - .p_value = buf - }; - - return sd_ble_gattc_write(conn_handle, &write_params); -} - -uint32_t ble_nus_c_rx_notif_enable(ble_nus_c_t * p_ble_nus_c) -{ - VERIFY_PARAM_NOT_NULL(p_ble_nus_c); - - if ( (p_ble_nus_c->conn_handle == BLE_CONN_HANDLE_INVALID) - ||(p_ble_nus_c->handles.nus_rx_cccd_handle == BLE_GATT_HANDLE_INVALID) - ) - { - return NRF_ERROR_INVALID_STATE; - } - return cccd_configure(p_ble_nus_c->conn_handle,p_ble_nus_c->handles.nus_rx_cccd_handle, true); -} - -uint32_t ble_nus_c_string_send(ble_nus_c_t * p_ble_nus_c, uint8_t * p_string, uint16_t length) -{ - VERIFY_PARAM_NOT_NULL(p_ble_nus_c); - - if (length > BLE_NUS_MAX_DATA_LEN) - { - return NRF_ERROR_INVALID_PARAM; - } - if ( p_ble_nus_c->conn_handle == BLE_CONN_HANDLE_INVALID) - { - return NRF_ERROR_INVALID_STATE; - } - - const ble_gattc_write_params_t write_params = { - .write_op = BLE_GATT_OP_WRITE_CMD, - .flags = BLE_GATT_EXEC_WRITE_FLAG_PREPARED_WRITE, - .handle = p_ble_nus_c->handles.nus_tx_handle, - .offset = 0, - .len = length, - .p_value = p_string - }; - - return sd_ble_gattc_write(p_ble_nus_c->conn_handle, &write_params); -} - - -uint32_t ble_nus_c_handles_assign(ble_nus_c_t * p_ble_nus, - const uint16_t conn_handle, - const ble_nus_c_handles_t * p_peer_handles) -{ - VERIFY_PARAM_NOT_NULL(p_ble_nus); - - p_ble_nus->conn_handle = conn_handle; - if (p_peer_handles != NULL) - { - p_ble_nus->handles.nus_rx_cccd_handle = p_peer_handles->nus_rx_cccd_handle; - p_ble_nus->handles.nus_rx_handle = p_peer_handles->nus_rx_handle; - p_ble_nus->handles.nus_tx_handle = p_peer_handles->nus_tx_handle; - } - return NRF_SUCCESS; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus_c/ble_nus_c.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus_c/ble_nus_c.h deleted file mode 100644 index 578883ca47..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_nus_c/ble_nus_c.h +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is confidential property of Nordic Semiconductor. The use, - * copying, transfer or disclosure of such information is prohibited except by express written - * agreement with Nordic Semiconductor. - * - */ - -/**@file - * - * @defgroup ble_sdk_srv_nus_c Nordic UART Service Client - * @{ - * @ingroup ble_sdk_srv - * @brief Nordic UART Service Client module. - * - * @details This module contains the APIs and types exposed by the Nordic UART Service Client - * module. These APIs and types can be used by the application to perform discovery of - * the Nordic UART Service at the peer and interact with it. - * - * @note The application must propagate BLE stack events to this module by calling - * ble_nus_c_on_ble_evt(). - * - */ - - -#ifndef BLE_NUS_C_H__ -#define BLE_NUS_C_H__ - -#include -#include -#include "ble.h" -#include "ble_gatt.h" -#include "ble_db_discovery.h" - -#define NUS_BASE_UUID {{0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E}} /**< Used vendor specific UUID. */ -#define BLE_UUID_NUS_SERVICE 0x0001 /**< The UUID of the Nordic UART Service. */ -#define BLE_UUID_NUS_TX_CHARACTERISTIC 0x0002 /**< The UUID of the TX Characteristic. */ -#define BLE_UUID_NUS_RX_CHARACTERISTIC 0x0003 /**< The UUID of the RX Characteristic. */ - -#define BLE_NUS_MAX_DATA_LEN (GATT_MTU_SIZE_DEFAULT - 3) /**< Maximum length of data (in bytes) that can be transmitted to the peer by the Nordic UART service module. */ - - -/**@brief NUS Client event type. */ -typedef enum -{ - BLE_NUS_C_EVT_DISCOVERY_COMPLETE = 1, /**< Event indicating that the NUS service and its characteristics was found. */ - BLE_NUS_C_EVT_NUS_RX_EVT, /**< Event indicating that the central has received something from a peer. */ - BLE_NUS_C_EVT_DISCONNECTED /**< Event indicating that the NUS server has disconnected. */ -} ble_nus_c_evt_type_t; - - -/**@brief Handles on the connected peer device needed to interact with it. -*/ -typedef struct { - uint16_t nus_rx_handle; /**< Handle of the NUS RX characteristic as provided by a discovery. */ - uint16_t nus_rx_cccd_handle; /**< Handle of the CCCD of the NUS RX characteristic as provided by a discovery. */ - uint16_t nus_tx_handle; /**< Handle of the NUS TX characteristic as provided by a discovery. */ -} ble_nus_c_handles_t; - - -/**@brief Structure containing the NUS event data received from the peer. */ -typedef struct { - ble_nus_c_evt_type_t evt_type; - uint16_t conn_handle; - uint8_t * p_data; - uint8_t data_len; - ble_nus_c_handles_t handles; /**< Handles on which the Nordic Uart service characteristics was discovered on the peer device. This will be filled if the evt_type is @ref BLE_NUS_C_EVT_DISCOVERY_COMPLETE.*/ -} ble_nus_c_evt_t; - - -// Forward declaration of the ble_nus_t type. -typedef struct ble_nus_c_s ble_nus_c_t; - -/**@brief Event handler type. - * - * @details This is the type of the event handler that should be provided by the application - * of this module to receive events. - */ -typedef void (* ble_nus_c_evt_handler_t)(ble_nus_c_t * p_ble_nus_c, const ble_nus_c_evt_t * p_evt); - - -/**@brief NUS Client structure. - */ -struct ble_nus_c_s -{ - uint8_t uuid_type; /**< UUID type. */ - uint16_t conn_handle; /**< Handle of the current connection. Set with @ref ble_nus_c_handles_assign when connected. */ - ble_nus_c_handles_t handles; /**< Handles on the connected peer device needed to interact with it. */ - ble_nus_c_evt_handler_t evt_handler; /**< Application event handler to be called when there is an event related to the NUS. */ -}; - -/**@brief NUS Client initialization structure. - */ -typedef struct { - ble_nus_c_evt_handler_t evt_handler; -} ble_nus_c_init_t; - - -/**@brief Function for initializing the Nordic UART client module. - * - * @details This function registers with the Database Discovery module - * for the NUS. Doing so will make the Database Discovery - * module look for the presence of a NUS instance at the peer when a - * discovery is started. - * - * @param[in] p_ble_nus_c Pointer to the NUS client structure. - * @param[in] p_ble_nus_c_init Pointer to the NUS initialization structure containing the - * initialization information. - * - * @retval NRF_SUCCESS If the module was initialized successfully. Otherwise, an error - * code is returned. This function - * propagates the error code returned by the Database Discovery module API - * @ref ble_db_discovery_evt_register. - */ -uint32_t ble_nus_c_init(ble_nus_c_t * p_ble_nus_c, ble_nus_c_init_t * p_ble_nus_c_init); - - -/**@brief Function for handling events from the database discovery module. - * - * @details This function will handle an event from the database discovery module, and determine - * if it relates to the discovery of NUS at the peer. If so, it will - * call the application's event handler indicating that NUS has been - * discovered at the peer. It also populates the event with the service related - * information before providing it to the application. - * - * @param[in] p_ble_nus_c Pointer to the NUS client structure. - * @param[in] p_evt Pointer to the event received from the database discovery module. - */ - void ble_nus_c_on_db_disc_evt(ble_nus_c_t * p_ble_nus_c, ble_db_discovery_evt_t * p_evt); - - -/**@brief Function for handling BLE events from the SoftDevice. - * - * @details This function handles the BLE events received from the SoftDevice. If a BLE - * event is relevant to the NUS module, it is used to update - * internal variables and, if necessary, send events to the application. - * - * @param[in] p_ble_nus_c Pointer to the NUS client structure. - * @param[in] p_ble_evt Pointer to the BLE event. - */ -void ble_nus_c_on_ble_evt(ble_nus_c_t * p_ble_nus_c, const ble_evt_t * p_ble_evt); - -/**@brief Function for requesting the peer to start sending notification of RX characteristic. - * - * @details This function enables notifications of the NUS RX characteristic at the peer - * by writing to the CCCD of the NUS RX characteristic. - * - * @param p_ble_nus_c Pointer to the NUS client structure. - * - * @retval NRF_SUCCESS If the SoftDevice has been requested to write to the CCCD of the peer. - * Otherwise, an error code is returned. This function propagates the error - * code returned by the SoftDevice API @ref sd_ble_gattc_write. - */ -uint32_t ble_nus_c_rx_notif_enable(ble_nus_c_t * p_ble_nus_c); - -/**@brief Function for sending a string to the server. - * - * @details This function writes the TX characteristic of the server. - * - * @param[in] p_ble_nus_c Pointer to the NUS client structure. - * @param[in] p_string String to be sent. - * @param[in] length Length of the string. - * - * @retval NRF_SUCCESS If the string was sent successfully. Otherwise, an error code is returned. - */ -uint32_t ble_nus_c_string_send(ble_nus_c_t * p_ble_nus_c, uint8_t * p_string, uint16_t length); - - -/**@brief Function for assigning handles to a this instance of nus_c. - * - * @details Call this function when a link has been established with a peer to - * associate this link to this instance of the module. This makes it - * possible to handle several link and associate each link to a particular - * instance of this module. The connection handle and attribute handles will be - * provided from the discovery event @ref BLE_NUS_C_EVT_DISCOVERY_COMPLETE. - * - * @param[in] p_ble_nus_c Pointer to the NUS client structure instance to associate with these - * handles. - * @param[in] conn_handle Connection handle to associated with the given NUS Instance. - * @param[in] p_peer_handles Attribute handles on the NUS server that you want this NUS client to - * interact with. - * - * @retval NRF_SUCCESS If the operation was successful. - * @retval NRF_ERROR_NULL If a p_nus was a NULL pointer. - */ -uint32_t ble_nus_c_handles_assign(ble_nus_c_t * p_ble_nus_c, const uint16_t conn_handle, const ble_nus_c_handles_t * p_peer_handles); - - -#endif // BLE_NUS_C_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs/ble_rscs.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs/ble_rscs.c deleted file mode 100644 index eac2bf5667..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs/ble_rscs.c +++ /dev/null @@ -1,385 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/* Attention! -* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile -* qualification listings, this section of source code must not be modified. -*/ - -#include "ble_rscs.h" -#include -#include "nordic_common.h" -#include "ble_l2cap.h" -#include "ble_srv_common.h" -#include "app_util.h" - -#define OPCODE_LENGTH 1 /**< Length of opcode inside Running Speed and Cadence Measurement packet. */ -#define HANDLE_LENGTH 2 /**< Length of handle inside Running Speed and Cadence Measurement packet. */ -#define MAX_RSCM_LEN (BLE_L2CAP_MTU_DEF - OPCODE_LENGTH - HANDLE_LENGTH) /**< Maximum size of a transmitted Running Speed and Cadence Measurement. */ - -// Running Speed and Cadence Measurement flag bits -#define RSC_MEAS_FLAG_INSTANT_STRIDE_LEN_PRESENT (0x01 << 0) /**< Instantaneous Stride Length Present flag bit. */ -#define RSC_MEAS_FLAG_TOTAL_DISTANCE_PRESENT (0x01 << 1) /**< Total Distance Present flag bit. */ -#define RSC_MEAS_FLAG_WALKING_OR_RUNNING_BIT (0x01 << 2) /**< Walking or Running Status flag bit. */ - - -/**@brief Function for handling the Connect event. - * - * @param[in] p_rscs Running Speed and Cadence Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_connect(ble_rscs_t * p_rscs, ble_evt_t * p_ble_evt) -{ - p_rscs->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; -} - - -/**@brief Function for handling the Disconnect event. - * - * @param[in] p_rscs Running Speed and Cadence Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_disconnect(ble_rscs_t * p_rscs, ble_evt_t * p_ble_evt) -{ - UNUSED_PARAMETER(p_ble_evt); - p_rscs->conn_handle = BLE_CONN_HANDLE_INVALID; -} - - -/**@brief Function for handling the write events to the RSCS Measurement characteristic. - * - * @param[in] p_rscs Running Speed and Cadence Service structure. - * @param[in] p_evt_write Write event received from the BLE stack. - */ -static void on_meas_cccd_write(ble_rscs_t * p_rscs, ble_gatts_evt_write_t * p_evt_write) -{ - if (p_evt_write->len == 2) - { - // CCCD written, update notification state - if (p_rscs->evt_handler != NULL) - { - ble_rscs_evt_t evt; - - if (ble_srv_is_notification_enabled(p_evt_write->data)) - { - evt.evt_type = BLE_RSCS_EVT_NOTIFICATION_ENABLED; - } - else - { - evt.evt_type = BLE_RSCS_EVT_NOTIFICATION_DISABLED; - } - - p_rscs->evt_handler(p_rscs, &evt); - } - } -} - - -/**@brief Function for handling the Write event. - * - * @param[in] p_rscs Running Speed and Cadence Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_write(ble_rscs_t * p_rscs, ble_evt_t * p_ble_evt) -{ - ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; - - if (p_evt_write->handle == p_rscs->meas_handles.cccd_handle) - { - on_meas_cccd_write(p_rscs, p_evt_write); - } -} - - -void ble_rscs_on_ble_evt(ble_rscs_t * p_rscs, ble_evt_t * p_ble_evt) -{ - if (p_rscs == NULL || p_ble_evt == NULL) - { - return; - } - - switch (p_ble_evt->header.evt_id) - { - case BLE_GAP_EVT_CONNECTED: - on_connect(p_rscs, p_ble_evt); - break; - - case BLE_GAP_EVT_DISCONNECTED: - on_disconnect(p_rscs, p_ble_evt); - break; - - case BLE_GATTS_EVT_WRITE: - on_write(p_rscs, p_ble_evt); - break; - - default: - // No implementation needed. - break; - } -} - - -/**@brief Function for encoding a RSCS Measurement. - * - * @param[in] p_rscs Running Speed and Cadence Service structure. - * @param[in] p_rsc_measurement Measurement to be encoded. - * @param[out] p_encoded_buffer Buffer where the encoded data will be written. - * - * @return Size of encoded data. - */ -static uint8_t rsc_measurement_encode(const ble_rscs_t * p_rscs, - const ble_rscs_meas_t * p_rsc_measurement, - uint8_t * p_encoded_buffer) -{ - uint8_t flags = 0; - uint8_t len = 1; - - // Instantaneous speed field - len += uint16_encode(p_rsc_measurement->inst_speed, &p_encoded_buffer[len]); - - // Instantaneous cadence field - p_encoded_buffer[len++] = p_rsc_measurement->inst_cadence; - - // Instantaneous stride length field - if (p_rscs->feature & BLE_RSCS_FEATURE_INSTANT_STRIDE_LEN_BIT) - { - if (p_rsc_measurement->is_inst_stride_len_present) - { - flags |= RSC_MEAS_FLAG_INSTANT_STRIDE_LEN_PRESENT; - len += uint16_encode(p_rsc_measurement->inst_stride_length, - &p_encoded_buffer[len]); - } - } - - // Total distance field - if (p_rscs->feature & BLE_RSCS_FEATURE_TOTAL_DISTANCE_BIT) - { - if (p_rsc_measurement->is_total_distance_present) - { - flags |= RSC_MEAS_FLAG_TOTAL_DISTANCE_PRESENT; - len += uint32_encode(p_rsc_measurement->total_distance, &p_encoded_buffer[len]); - } - } - - // Flags field - if (p_rscs->feature & BLE_RSCS_FEATURE_WALKING_OR_RUNNING_STATUS_BIT) - { - if (p_rsc_measurement->is_running) - { - flags |= RSC_MEAS_FLAG_WALKING_OR_RUNNING_BIT; - } - } - p_encoded_buffer[0] = flags; - - return len; -} - - -/**@brief Function for adding RSC Measurement characteristics. - * - * @param[in] p_rscs Running Speed and Cadence Service structure. - * @param[in] p_rscs_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t rsc_measurement_char_add(ble_rscs_t * p_rscs, const ble_rscs_init_t * p_rscs_init) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_md_t cccd_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - uint8_t encoded_rcm[MAX_RSCM_LEN]; - - memset(&cccd_md, 0, sizeof(cccd_md)); - - BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm); - cccd_md.write_perm = p_rscs_init->rsc_meas_attr_md.cccd_write_perm; - cccd_md.vloc = BLE_GATTS_VLOC_STACK; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.notify = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = &cccd_md; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_RSC_MEASUREMENT_CHAR); - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.read_perm = p_rscs_init->rsc_meas_attr_md.read_perm; - attr_md.write_perm = p_rscs_init->rsc_meas_attr_md.write_perm; - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 1; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = rsc_measurement_encode(p_rscs, &p_rscs_init->initial_rcm, encoded_rcm); - attr_char_value.init_offs = 0; - attr_char_value.max_len = MAX_RSCM_LEN; - attr_char_value.p_value = encoded_rcm; - - return sd_ble_gatts_characteristic_add(p_rscs->service_handle, - &char_md, - &attr_char_value, - &p_rscs->meas_handles); -} - - -/**@brief Function for adding RSC Feature characteristics. - * - * @param[in] p_rscs Running Speed and Cadence Service structure. - * @param[in] p_rscs_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t rsc_feature_char_add(ble_rscs_t * p_rscs, const ble_rscs_init_t * p_rscs_init) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - uint16_t init_value_feature; - uint8_t init_value_encoded[2]; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.read = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = NULL; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_RSC_FEATURE_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.read_perm = p_rscs_init->rsc_feature_attr_md.read_perm; - attr_md.write_perm = p_rscs_init->rsc_feature_attr_md.write_perm; - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - init_value_feature = p_rscs_init->feature; - init_value_encoded[0] = init_value_feature & 0xFF; - init_value_encoded[1] = (init_value_feature >> 8) & 0xFF; - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = sizeof (uint16_t); - attr_char_value.init_offs = 0; - attr_char_value.max_len = sizeof (uint16_t); - attr_char_value.p_value = init_value_encoded; - - return sd_ble_gatts_characteristic_add(p_rscs->service_handle, - &char_md, - &attr_char_value, - &p_rscs->feature_handles); -} - - -uint32_t ble_rscs_init(ble_rscs_t * p_rscs, const ble_rscs_init_t * p_rscs_init) -{ - if (p_rscs == NULL || p_rscs_init == NULL) - { - return NRF_ERROR_NULL; - } - - uint32_t err_code; - ble_uuid_t ble_uuid; - - // Initialize service structure - p_rscs->evt_handler = p_rscs_init->evt_handler; - p_rscs->conn_handle = BLE_CONN_HANDLE_INVALID; - p_rscs->feature = p_rscs_init->feature; - - // Add service - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_RUNNING_SPEED_AND_CADENCE); - - err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, - &ble_uuid, - &p_rscs->service_handle); - - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add measurement characteristic - err_code = rsc_measurement_char_add(p_rscs, p_rscs_init); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add feature characteristic - err_code = rsc_feature_char_add(p_rscs, p_rscs_init); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - return NRF_SUCCESS; -} - - -uint32_t ble_rscs_measurement_send(ble_rscs_t * p_rscs, ble_rscs_meas_t * p_measurement) -{ - if (p_rscs == NULL || p_measurement == NULL) - { - return NRF_ERROR_NULL; - } - - uint32_t err_code; - - // Send value if connected and notifying - if (p_rscs->conn_handle != BLE_CONN_HANDLE_INVALID) - { - uint8_t encoded_rsc_meas[MAX_RSCM_LEN]; - uint16_t len; - uint16_t hvx_len; - ble_gatts_hvx_params_t hvx_params; - - len = rsc_measurement_encode(p_rscs, p_measurement, encoded_rsc_meas); - hvx_len = len; - - memset(&hvx_params, 0, sizeof(hvx_params)); - - hvx_params.handle = p_rscs->meas_handles.value_handle; - hvx_params.type = BLE_GATT_HVX_NOTIFICATION; - hvx_params.offset = 0; - hvx_params.p_len = &hvx_len; - hvx_params.p_data = encoded_rsc_meas; - - err_code = sd_ble_gatts_hvx(p_rscs->conn_handle, &hvx_params); - if ((err_code == NRF_SUCCESS) && (hvx_len != len)) - { - err_code = NRF_ERROR_DATA_SIZE; - } - } - else - { - err_code = NRF_ERROR_INVALID_STATE; - } - - return err_code; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs/ble_rscs.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs/ble_rscs.h deleted file mode 100644 index 4c5c2d99e2..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs/ble_rscs.h +++ /dev/null @@ -1,144 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/** @file - * - * @defgroup ble_sdk_srv_rsc Running Speed and Cadence Service - * @{ - * @ingroup ble_sdk_srv - * @brief Running Speed and Cadence Service module. - * - * @details This module implements the Running Speed and Cadence Service. If enabled, notification - * of the Running Speead and Candence Measurement is performed when the application - * calls ble_rscs_measurement_send(). - * - * If an event handler is supplied by the application, the Running Speed and Cadence - * Service will generate Running Speed and Cadence Service events to the application. - * - * @note The application must propagate BLE stack events to the Running Speead and Candence Service - * module by calling ble_rscs_on_ble_evt() from the @ref softdevice_handler function. - * - * @note Attention! - * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile - * qualification listings, this section of source code must not be modified. - */ - -#ifndef BLE_RSCS_H__ -#define BLE_RSCS_H__ - -#include -#include -#include "ble.h" -#include "ble_srv_common.h" - -/**@brief Running Speed and Cadence Service feature bits. */ -#define BLE_RSCS_FEATURE_INSTANT_STRIDE_LEN_BIT (0x01 << 0) /**< Instantaneous Stride Length Measurement Supported bit. */ -#define BLE_RSCS_FEATURE_TOTAL_DISTANCE_BIT (0x01 << 1) /**< Total Distance Measurement Supported bit. */ -#define BLE_RSCS_FEATURE_WALKING_OR_RUNNING_STATUS_BIT (0x01 << 2) /**< Walking or Running Status Supported bit. */ -#define BLE_RSCS_FEATURE_CALIBRATION_PROCEDURE_BIT (0x01 << 3) /**< Calibration Procedure Supported bit. */ -#define BLE_RSCS_FEATURE_MULTIPLE_SENSORS_BIT (0x01 << 4) /**< Multiple Sensor Locations Supported bit. */ - -/**@brief Running Speed and Cadence Service event type. */ -typedef enum -{ - BLE_RSCS_EVT_NOTIFICATION_ENABLED, /**< Running Speed and Cadence value notification enabled event. */ - BLE_RSCS_EVT_NOTIFICATION_DISABLED /**< Running Speed and Cadence value notification disabled event. */ -} ble_rscs_evt_type_t; - -/**@brief Running Speed and Cadence Service event. */ -typedef struct -{ - ble_rscs_evt_type_t evt_type; /**< Type of event. */ -} ble_rscs_evt_t; - -// Forward declaration of the ble_rsc types. -typedef struct ble_rscs_s ble_rscs_t; -typedef struct ble_rscs_meas_s ble_rscs_meas_t; - -/**@brief Running Speed and Cadence Service event handler type. */ -typedef void (*ble_rscs_evt_handler_t) (ble_rscs_t * p_rscs, ble_rscs_evt_t * p_evt); - -/**@brief Running Speed and Cadence Service measurement structure. This contains a Running Speed and - * Cadence measurement. */ -struct ble_rscs_meas_s -{ - bool is_inst_stride_len_present; /**< True if Instantaneous Stride Length is present in the measurement. */ - bool is_total_distance_present; /**< True if Total Distance is present in the measurement. */ - bool is_running; /**< True if running, False if walking. */ - uint16_t inst_speed; /**< Instantaneous Speed. */ - uint8_t inst_cadence; /**< Instantaneous Cadence. */ - uint16_t inst_stride_length; /**< Instantaneous Stride Length. */ - uint32_t total_distance; /**< Total Distance. */ -}; - -/**@brief Running Speed and Cadence Service init structure. This contains all options and data - * needed for initialization of the service. */ -typedef struct -{ - ble_rscs_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Running Speed and Cadence Service. */ - ble_srv_cccd_security_mode_t rsc_meas_attr_md; /**< Initial security level for running speed and cadence measurement attribute */ - ble_srv_security_mode_t rsc_feature_attr_md; /**< Initial security level for feature attribute */ - uint16_t feature; /**< Initial value for features of sensor. */ - ble_rscs_meas_t initial_rcm; /**< Initial Running Speed Cadence Measurement.*/ -} ble_rscs_init_t; - -/**@brief Running Speed and Cadence Service structure. This contains various status information for - * the service. */ -struct ble_rscs_s -{ - ble_rscs_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Running Speed and Cadence Service. */ - uint16_t service_handle; /**< Handle of Running Speed and Cadence Service (as provided by the BLE stack). */ - ble_gatts_char_handles_t meas_handles; /**< Handles related to the Running Speed and Cadence Measurement characteristic. */ - ble_gatts_char_handles_t feature_handles; /**< Handles related to the Running Speed and Cadence feature characteristic. */ - uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ - uint16_t feature; /**< Bit mask of features available on sensor. */ -}; - - - -/**@brief Function for initializing the Running Speed and Cadence Service. - * - * @param[out] p_rscs Running Speed and Cadence Service structure. This structure will have to - * be supplied by the application. It will be initialized by this function, - * and will later be used to identify this particular service instance. - * @param[in] p_rscs_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. - */ -uint32_t ble_rscs_init(ble_rscs_t * p_rscs, const ble_rscs_init_t * p_rscs_init); - -/**@brief Function for handling the Application's BLE Stack events. - * - * @details Handles all events from the BLE stack of interest to the Running Speed and Cadence - * Service. - * - * @param[in] p_rscs Running Speed and Cadence Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -void ble_rscs_on_ble_evt(ble_rscs_t * p_rscs, ble_evt_t * p_ble_evt); - -/**@brief Function for sending running speed and cadence measurement if notification has been enabled. - * - * @details The application calls this function after having performed a Running Speed and Cadence - * measurement. If notification has been enabled, the measurement data is encoded and sent - * to the client. - * - * @param[in] p_rscs Running Speed and Cadence Service structure. - * @param[in] p_measurement Pointer to new running speed and cadence measurement. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -uint32_t ble_rscs_measurement_send(ble_rscs_t * p_rscs, ble_rscs_meas_t * p_measurement); - -#endif // BLE_RSCS_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs_c/ble_rscs_c.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs_c/ble_rscs_c.c deleted file mode 100644 index c3ac834917..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs_c/ble_rscs_c.c +++ /dev/null @@ -1,360 +0,0 @@ -/* - * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is confidential property of Nordic Semiconductor. The use, - * copying, transfer or disclosure of such information is prohibited except by express written - * agreement with Nordic Semiconductor. - * - */ - -/**@cond To Make Doxygen skip documentation generation for this file. - * @{ - */ - -#include "ble_rscs_c.h" -#include "ble_db_discovery.h" -#include "ble_types.h" -#include "ble_srv_common.h" -#include "ble_gattc.h" -#include "app_trace.h" -#include "sdk_common.h" -#include "nrf_log.h" - -#define LOG NRF_LOG_PRINTF /**< Debug logger macro that will be used in this file to do logging of important information over UART or RTT. */ - -#define TX_BUFFER_MASK 0x07 /**< TX Buffer mask, must be a mask of continuous zeroes, followed by continuous sequence of ones: 000...111. */ -#define TX_BUFFER_SIZE (TX_BUFFER_MASK + 1) /**< Size of send buffer, which is 1 higher than the mask. */ - -#define WRITE_MESSAGE_LENGTH BLE_CCCD_VALUE_LEN /**< Length of the write message for CCCD. */ - -typedef enum -{ - READ_REQ, /**< Type identifying that this tx_message is a read request. */ - WRITE_REQ /**< Type identifying that this tx_message is a write request. */ -} tx_request_t; - -/**@brief Structure for writing a message to the peer, i.e. CCCD. - */ -typedef struct -{ - uint8_t gattc_value[WRITE_MESSAGE_LENGTH]; /**< The message to write. */ - ble_gattc_write_params_t gattc_params; /**< GATTC parameters for this message. */ -} write_params_t; - -/**@brief Structure for holding data to be transmitted to the connected central. - */ -typedef struct -{ - uint16_t conn_handle; /**< Connection handle to be used when transmitting this message. */ - tx_request_t type; /**< Type of this message, i.e. read or write message. */ - union - { - uint16_t read_handle; /**< Read request message. */ - write_params_t write_req; /**< Write request message. */ - } req; -} tx_message_t; - - -static tx_message_t m_tx_buffer[TX_BUFFER_SIZE]; /**< Transmit buffer for messages to be transmitted to the central. */ -static uint32_t m_tx_insert_index = 0; /**< Current index in the transmit buffer where the next message should be inserted. */ -static uint32_t m_tx_index = 0; /**< Current index in the transmit buffer from where the next message to be transmitted resides. */ - - -/**@brief Function for passing any pending request from the buffer to the stack. - */ -static void tx_buffer_process(void) -{ - if (m_tx_index != m_tx_insert_index) - { - uint32_t err_code; - - if (m_tx_buffer[m_tx_index].type == READ_REQ) - { - err_code = sd_ble_gattc_read(m_tx_buffer[m_tx_index].conn_handle, - m_tx_buffer[m_tx_index].req.read_handle, - 0); - } - else - { - err_code = sd_ble_gattc_write(m_tx_buffer[m_tx_index].conn_handle, - &m_tx_buffer[m_tx_index].req.write_req.gattc_params); - } - if (err_code == NRF_SUCCESS) - { - LOG("[RSCS_C]: SD Read/Write API returns Success.\r\n"); - m_tx_index++; - m_tx_index &= TX_BUFFER_MASK; - } - else - { - LOG("[RSCS_C]: SD Read/Write API returns error. This message sending will be " - "attempted again..\r\n"); - } - } -} - - -/**@brief Function for handling write response events. - * - * @param[in] p_ble_rscs_c Pointer to the Running Speed and Cadence Client structure. - * @param[in] p_ble_evt Pointer to the BLE event received. - */ -static void on_write_rsp(ble_rscs_c_t * p_ble_rscs_c, const ble_evt_t * p_ble_evt) -{ - // Check if the event if on the link for this instance - if (p_ble_rscs_c->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) - { - return; - } - // Check if there is any message to be sent across to the peer and send it. - tx_buffer_process(); -} - - -/**@brief Function for handling Handle Value Notification received from the SoftDevice. - * - * @details This function will uses the Handle Value Notification received from the SoftDevice - * and checks if it is a notification of the Running Speed and Cadence measurement from - * the peer. If it is, this function will decode the Running Speed measurement and send it - * to the application. - * - * @param[in] p_ble_rscs_c Pointer to the Running Speed and Cadence Client structure. - * @param[in] p_ble_evt Pointer to the BLE event received. - */ -static void on_hvx(ble_rscs_c_t * p_ble_rscs_c, const ble_evt_t * p_ble_evt) -{ - const ble_gattc_evt_hvx_t * p_notif = &p_ble_evt->evt.gattc_evt.params.hvx; - - // Check if the event if on the link for this instance - if (p_ble_rscs_c->conn_handle != p_ble_evt->evt.gattc_evt.conn_handle) - { - return; - } - - // Check if this is a Running Speed and Cadence notification. - if (p_ble_evt->evt.gattc_evt.params.hvx.handle == p_ble_rscs_c->peer_db.rsc_handle) - { - uint32_t index = 0; - ble_rscs_c_evt_t ble_rscs_c_evt; - ble_rscs_c_evt.evt_type = BLE_RSCS_C_EVT_RSC_NOTIFICATION; - ble_rscs_c_evt.conn_handle = p_ble_evt->evt.gattc_evt.conn_handle; - - //lint -save -e415 -e416 -e662 "Access of out of bounds pointer" "Creation of out of bounds pointer" - - // Flags field - ble_rscs_c_evt.params.rsc.is_inst_stride_len_present = p_notif->data[index] >> BLE_RSCS_INSTANT_STRIDE_LEN_PRESENT & 0x01; - ble_rscs_c_evt.params.rsc.is_total_distance_present = p_notif->data[index] >> BLE_RSCS_TOTAL_DISTANCE_PRESENT & 0x01; - ble_rscs_c_evt.params.rsc.is_running = p_notif->data[index] >> BLE_RSCS_WALKING_OR_RUNNING_STATUS_BIT & 0x01; - index++; - - // Instantaneous Speed - ble_rscs_c_evt.params.rsc.inst_speed = uint16_decode(&p_notif->data[index]); - index += sizeof(uint16_t); - - // Instantaneous Cadence - ble_rscs_c_evt.params.rsc.inst_cadence = p_notif->data[index]; - index++; - - // Instantaneous Stride Length - if (ble_rscs_c_evt.params.rsc.is_inst_stride_len_present == true) - { - ble_rscs_c_evt.params.rsc.inst_stride_length = uint16_decode(&p_notif->data[index]); - index += sizeof(uint16_t); - } - - // Total distance field - if (ble_rscs_c_evt.params.rsc.is_total_distance_present == true) - { - ble_rscs_c_evt.params.rsc.total_distance = uint32_decode(&p_notif->data[index]); - //index += sizeof(uint32_t); - } - - p_ble_rscs_c->evt_handler(p_ble_rscs_c, &ble_rscs_c_evt); - - //lint -restore - } -} - - -/**@brief Function for handling events from the database discovery module. - * - * @details This function will handle an event from the database discovery module, and determine - * if it relates to the discovery of heart rate service at the peer. If so, it will - * call the application's event handler indicating that the Running Speed and Cadence - * service has been discovered at the peer. It also populates the event with the service - * related information before providing it to the application. - * - * @param[in] p_evt Pointer to the event received from the database discovery module. - * - */ -void ble_rscs_on_db_disc_evt(ble_rscs_c_t * p_ble_rscs_c, const ble_db_discovery_evt_t * p_evt) -{ - // Check if the Heart Rate Service was discovered. - if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE && - p_evt->params.discovered_db.srv_uuid.uuid == BLE_UUID_RUNNING_SPEED_AND_CADENCE && - p_evt->params.discovered_db.srv_uuid.type == BLE_UUID_TYPE_BLE) - { - - ble_rscs_c_evt_t evt; - evt.conn_handle = p_evt->conn_handle; - - // Find the CCCD Handle of the Running Speed and Cadence characteristic. - uint32_t i; - - for (i = 0; i < p_evt->params.discovered_db.char_count; i++) - { - if (p_evt->params.discovered_db.charateristics[i].characteristic.uuid.uuid == - BLE_UUID_RSC_MEASUREMENT_CHAR) - { - // Found Running Speed and Cadence characteristic. Store CCCD handle and break. - evt.params.rscs_db.rsc_cccd_handle = - p_evt->params.discovered_db.charateristics[i].cccd_handle; - evt.params.rscs_db.rsc_handle = - p_evt->params.discovered_db.charateristics[i].characteristic.handle_value; - break; - } - } - - LOG("[rscs_c]: Running Speed and Cadence Service discovered at peer.\r\n"); - - //If the instance has been assigned prior to db_discovery, assign the db_handles - if(p_ble_rscs_c->conn_handle != BLE_CONN_HANDLE_INVALID) - { - if ((p_ble_rscs_c->peer_db.rsc_cccd_handle == BLE_GATT_HANDLE_INVALID)&& - (p_ble_rscs_c->peer_db.rsc_handle == BLE_GATT_HANDLE_INVALID)) - { - p_ble_rscs_c->peer_db = evt.params.rscs_db; - } - } - - evt.evt_type = BLE_RSCS_C_EVT_DISCOVERY_COMPLETE; - - p_ble_rscs_c->evt_handler(p_ble_rscs_c, &evt); - } -} - - -uint32_t ble_rscs_c_init(ble_rscs_c_t * p_ble_rscs_c, ble_rscs_c_init_t * p_ble_rscs_c_init) -{ - VERIFY_PARAM_NOT_NULL(p_ble_rscs_c); - VERIFY_PARAM_NOT_NULL(p_ble_rscs_c_init); - - ble_uuid_t rscs_uuid; - - rscs_uuid.type = BLE_UUID_TYPE_BLE; - rscs_uuid.uuid = BLE_UUID_RUNNING_SPEED_AND_CADENCE; - - p_ble_rscs_c->evt_handler = p_ble_rscs_c_init->evt_handler; - p_ble_rscs_c->conn_handle = BLE_CONN_HANDLE_INVALID; - p_ble_rscs_c->peer_db.rsc_cccd_handle = BLE_GATT_HANDLE_INVALID; - p_ble_rscs_c->peer_db.rsc_handle = BLE_GATT_HANDLE_INVALID; - - return ble_db_discovery_evt_register(&rscs_uuid); -} - - -uint32_t ble_rscs_c_handles_assign(ble_rscs_c_t * p_ble_rscs_c, - uint16_t conn_handle, - ble_rscs_c_db_t * p_peer_handles) -{ - VERIFY_PARAM_NOT_NULL(p_ble_rscs_c); - p_ble_rscs_c->conn_handle = conn_handle; - if (p_peer_handles != NULL) - { - p_ble_rscs_c->peer_db = *p_peer_handles; - } - - return NRF_SUCCESS; -} - - -/**@brief Function for handling Disconnected event received from the SoftDevice. - * - * @details This function check if the disconnect event is happening on the link - * associated with the current instance of the module, if so it will set its - * conn_handle to invalid. - * - * @param[in] p_ble_rscs_c Pointer to the RSC Client structure. - * @param[in] p_ble_evt Pointer to the BLE event received. - */ -static void on_disconnected(ble_rscs_c_t * p_ble_rscs_c, const ble_evt_t * p_ble_evt) -{ - if (p_ble_rscs_c->conn_handle == p_ble_evt->evt.gap_evt.conn_handle) - { - p_ble_rscs_c->conn_handle = BLE_CONN_HANDLE_INVALID; - p_ble_rscs_c->peer_db.rsc_cccd_handle = BLE_GATT_HANDLE_INVALID; - p_ble_rscs_c->peer_db.rsc_handle = BLE_GATT_HANDLE_INVALID; - } -} - - -void ble_rscs_c_on_ble_evt(ble_rscs_c_t * p_ble_rscs_c, const ble_evt_t * p_ble_evt) -{ - if ((p_ble_rscs_c == NULL) || (p_ble_evt == NULL)) - { - return; - } - - switch (p_ble_evt->header.evt_id) - { - case BLE_GATTC_EVT_HVX: - on_hvx(p_ble_rscs_c, p_ble_evt); - break; - - case BLE_GATTC_EVT_WRITE_RSP: - on_write_rsp(p_ble_rscs_c, p_ble_evt); - break; - - case BLE_GAP_EVT_DISCONNECTED: - on_disconnected(p_ble_rscs_c, p_ble_evt); - break; - - default: - break; - } -} - - -/**@brief Function for creating a message for writing to the CCCD. - */ -static uint32_t cccd_configure(uint16_t conn_handle, uint16_t handle_cccd, bool enable) -{ - LOG("[rscs_c]: Configuring CCCD. CCCD Handle = %d, Connection Handle = %d\r\n", - handle_cccd, conn_handle); - - tx_message_t * p_msg; - uint16_t cccd_val = enable ? BLE_GATT_HVX_NOTIFICATION : 0; - - p_msg = &m_tx_buffer[m_tx_insert_index++]; - m_tx_insert_index &= TX_BUFFER_MASK; - - p_msg->req.write_req.gattc_params.handle = handle_cccd; - p_msg->req.write_req.gattc_params.len = WRITE_MESSAGE_LENGTH; - p_msg->req.write_req.gattc_params.p_value = p_msg->req.write_req.gattc_value; - p_msg->req.write_req.gattc_params.offset = 0; - p_msg->req.write_req.gattc_params.write_op = BLE_GATT_OP_WRITE_REQ; - p_msg->req.write_req.gattc_value[0] = LSB_16(cccd_val); - p_msg->req.write_req.gattc_value[1] = MSB_16(cccd_val); - p_msg->conn_handle = conn_handle; - p_msg->type = WRITE_REQ; - - tx_buffer_process(); - return NRF_SUCCESS; -} - - -uint32_t ble_rscs_c_rsc_notif_enable(ble_rscs_c_t * p_ble_rscs_c) -{ - VERIFY_PARAM_NOT_NULL(p_ble_rscs_c); - - if (p_ble_rscs_c->conn_handle == BLE_CONN_HANDLE_INVALID) - { - return NRF_ERROR_INVALID_STATE; - } - - return cccd_configure(p_ble_rscs_c->conn_handle, p_ble_rscs_c->peer_db.rsc_cccd_handle, true); -} - -/** @} - * @endcond - */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs_c/ble_rscs_c.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs_c/ble_rscs_c.h deleted file mode 100644 index 27aa5e422c..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_rscs_c/ble_rscs_c.h +++ /dev/null @@ -1,149 +0,0 @@ -#ifndef BLE_RSCS_C_H__ -#define BLE_RSCS_C_H__ - -#include -#include -#include "ble.h" -#include "ble_db_discovery.h" - -/** - * @defgroup ble_sdk_srv_rscs_c Running Speed and Cadence Service Client - * @{ - * @ingroup ble_sdk_srv - * - * @details This module contains the APIs and types exposed by the Running Speed and Cadence - * Service Client module. These APIs and types can be used by the application to perform - * discovery of Running Speed and Cadence Service at the peer and interact with it. - * - * @note The application must propagate BLE stack events to this module by calling - * ble_rscs_c_on_ble_evt(). - */ - - -/**@brief Structure containing the handles related to the Running Speed and Cadence Service found on the peer. */ -typedef struct -{ - uint16_t rsc_cccd_handle; /**< Handle of the CCCD of the Running Speed and Cadence characteristic. */ - uint16_t rsc_handle; /**< Handle of the Running Speed and Cadence characteristic as provided by the SoftDevice. */ -} ble_rscs_c_db_t; - -/**@brief RSCS Client event type. */ -typedef enum -{ - BLE_RSCS_C_EVT_DISCOVERY_COMPLETE = 1, /**< Event indicating that the Running Speed and Cadence Service has been discovered at the peer. */ - BLE_RSCS_C_EVT_RSC_NOTIFICATION /**< Event indicating that a notification of the Running Speed and Cadence measurement characteristic has been received from the peer. */ -} ble_rscs_c_evt_type_t; - -#define BLE_RSCS_INSTANT_STRIDE_LEN_PRESENT 0x00 /**< Instantaneous Stride Length Measurement Supported bit. */ -#define BLE_RSCS_TOTAL_DISTANCE_PRESENT 0x01 /**< Total Distance Measurement Supported bit. */ -#define BLE_RSCS_WALKING_OR_RUNNING_STATUS_BIT 0x02 /**< Walking or Running Status Supported bit. */ - -/**@brief Structure containing the Running Speed and Cadence measurement received from the peer. */ -typedef struct -{ - bool is_inst_stride_len_present; /**< True if Instantaneous Stride Length is present in the measurement. */ - bool is_total_distance_present; /**< True if Total Distance is present in the measurement. */ - bool is_running; /**< True if running, False if walking. */ - uint16_t inst_speed; /**< Instantaneous Speed. */ - uint8_t inst_cadence; /**< Instantaneous Cadence. */ - uint16_t inst_stride_length; /**< Instantaneous Stride Length. */ - uint32_t total_distance; /**< Total Distance. */ -} ble_rsc_t; - -/**@brief Running Speed and Cadence Event structure. */ -typedef struct -{ - ble_rscs_c_evt_type_t evt_type; /**< Type of the event. */ - uint16_t conn_handle; /**< Connection handle on which the rscs_c event occured.*/ - union - { - ble_rscs_c_db_t rscs_db; /**< Running Speed and Cadence Service related handles found on the peer device. This will be filled if the evt_type is @ref BLE_RSCS_C_EVT_DISCOVERY_COMPLETE.*/ - ble_rsc_t rsc; /**< Running Speed and Cadence measurement received. This will be filled if the evt_type is @ref BLE_RSCS_C_EVT_RSC_NOTIFICATION. */ - } params; -} ble_rscs_c_evt_t; - -// Forward declaration of the ble_rscs_c_t type. -typedef struct ble_rscs_c_s ble_rscs_c_t; - - -/**@brief Event handler type. - * - * @details This is the type of the event handler that should be provided by the application - * of this module in order to receive events. - */ -typedef void (* ble_rscs_c_evt_handler_t) (ble_rscs_c_t * p_ble_rscs_c, ble_rscs_c_evt_t * p_evt); - -/**@brief Running Speed and Cadence client structure. - */ -struct ble_rscs_c_s -{ - uint16_t conn_handle; /**< Connection handle as provided by the SoftDevice. */ - ble_rscs_c_db_t peer_db; /**< Handles related to RSCS on the peer*/ - ble_rscs_c_evt_handler_t evt_handler; /**< Application event handler to be called when there is an event related to the Running Speed and Cadence service. */ -}; - -/**@brief Running Speed and Cadence client initialization structure. - */ -typedef struct -{ - ble_rscs_c_evt_handler_t evt_handler; /**< Event handler to be called by the Running Speed and Cadence Client module whenever there is an event related to the Running Speed and Cadence Service. */ -} ble_rscs_c_init_t; - - -/**@brief Function for initializing the Running Speed and Cadence Service Client module. - * - * @details This function will initialize the module and set up Database Discovery to discover - * the Running Speed and Cadence Service. After calling this function, call @ref ble_db_discovery_start - * to start discovery once a link with a peer has been established. - * - * @param[out] p_ble_rscs_c Pointer to the RSC Service client structure. - * @param[in] p_ble_rscs_c_init Pointer to the RSC Service initialization structure containing - * the initialization information. - * - * @retval NRF_SUCCESS Operation success. - * @retval NRF_ERROR_NULL A parameter is NULL. - * Otherwise, an error code returned by @ref ble_db_discovery_evt_register. - */ -uint32_t ble_rscs_c_init(ble_rscs_c_t * p_ble_rscs_c, ble_rscs_c_init_t * p_ble_rscs_c_init); - -void ble_rscs_c_on_ble_evt(ble_rscs_c_t * p_ble_rscs_c, const ble_evt_t * p_ble_evt); - -uint32_t ble_rscs_c_rsc_notif_enable(ble_rscs_c_t * p_ble_rscs_c); - - -/**@brief Function for handling events from the database discovery module. - * - * @details Call this function when getting a callback event from the DB discovery modue. - * This function will handle an event from the database discovery module, and determine - * if it relates to the discovery of Running Speed and Cadence service at the peer. If so, it will - * call the application's event handler indicating that the RSC service has been - * discovered at the peer. It also populates the event with the service related - * information before providing it to the application. - * - * @param p_ble_rscs_c Pointer to the Runnind Speed and Cadence Service client structure. - * @param[in] p_evt Pointer to the event received from the database discovery module. - * - */ -void ble_rscs_on_db_disc_evt(ble_rscs_c_t * p_ble_rscs_c, const ble_db_discovery_evt_t * p_evt); - - -/**@brief Function for assigning handles to a this instance of rscs_c. - * - * @details Call this function when a link has been established with a peer to - * associate this link to this instance of the module. This makes it - * possible to handle several link and associate each link to a particular - * instance of this module. The connection handle and attribute handles will be - * provided from the discovery event @ref BLE_RSCS_C_EVT_DISCOVERY_COMPLETE. - * - * @param[in] p_ble_rscs_c Pointer to the RSC client structure instance to associate. - * @param[in] conn_handle Connection handle to associated with the given RSCS Client Instance. - * @param[in] p_peer_handles Attribute handles on the RSCS server that you want this RSCS client to - * interact with. - */ -uint32_t ble_rscs_c_handles_assign(ble_rscs_c_t * p_ble_rscs_c, - uint16_t conn_handle, - ble_rscs_c_db_t * p_peer_handles); - -#endif // BLE_RSCS_C_H__ - -/** @} */ // End tag for the file. diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_tps/ble_tps.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_tps/ble_tps.c deleted file mode 100644 index 8b2c0c2075..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_tps/ble_tps.c +++ /dev/null @@ -1,139 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/* Attention! -* To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile -* qualification listings, this section of source code must not be modified. -*/ - -#include "ble_tps.h" -#include -#include "ble_srv_common.h" - - -/**@brief Function for handling the Connect event. - * - * @param[in] p_tps TX Power Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_connect(ble_tps_t * p_tps, ble_evt_t * p_ble_evt) -{ - p_tps->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; -} - - -void ble_tps_on_ble_evt(ble_tps_t * p_tps, ble_evt_t * p_ble_evt) -{ - switch (p_ble_evt->header.evt_id) - { - case BLE_GAP_EVT_CONNECTED: - on_connect(p_tps, p_ble_evt); - break; - - default: - // No implementation needed. - break; - } -} - - -/**@brief Function for adding TX Power Level characteristics. - * - * @param[in] p_tps TX Power Service structure. - * @param[in] p_tps_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static uint32_t tx_power_level_char_add(ble_tps_t * p_tps, - const ble_tps_init_t * p_tps_init) -{ - ble_gatts_char_md_t char_md; - ble_gatts_attr_t attr_char_value; - ble_uuid_t ble_uuid; - ble_gatts_attr_md_t attr_md; - - memset(&char_md, 0, sizeof(char_md)); - - char_md.char_props.read = 1; - char_md.p_char_user_desc = NULL; - char_md.p_char_pf = NULL; - char_md.p_user_desc_md = NULL; - char_md.p_cccd_md = NULL; - char_md.p_sccd_md = NULL; - - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_TX_POWER_LEVEL_CHAR); - - memset(&attr_md, 0, sizeof(attr_md)); - - attr_md.read_perm = p_tps_init->tps_attr_md.read_perm; - attr_md.write_perm = p_tps_init->tps_attr_md.write_perm; - attr_md.vloc = BLE_GATTS_VLOC_STACK; - attr_md.rd_auth = 0; - attr_md.wr_auth = 0; - attr_md.vlen = 0; - - memset(&attr_char_value, 0, sizeof(attr_char_value)); - - memset(&attr_char_value, 0, sizeof (attr_char_value)); - - attr_char_value.p_uuid = &ble_uuid; - attr_char_value.p_attr_md = &attr_md; - attr_char_value.init_len = sizeof (int8_t); - attr_char_value.init_offs = 0; - attr_char_value.max_len = sizeof (uint8_t); - attr_char_value.p_value = (uint8_t*)&p_tps_init->initial_tx_power_level; - - return sd_ble_gatts_characteristic_add(p_tps->service_handle, - &char_md, - &attr_char_value, - &p_tps->tx_power_level_handles); -} - - -uint32_t ble_tps_init(ble_tps_t * p_tps, const ble_tps_init_t * p_tps_init) -{ - uint32_t err_code; - ble_uuid_t ble_uuid; - - // Add service - BLE_UUID_BLE_ASSIGN(ble_uuid, BLE_UUID_TX_POWER_SERVICE); - - err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, - &ble_uuid, - &p_tps->service_handle); - - if (err_code != NRF_SUCCESS) - { - return err_code; - } - - // Add TX Power Level characteristic - return tx_power_level_char_add(p_tps, p_tps_init); -} - - -uint32_t ble_tps_tx_power_level_set(ble_tps_t * p_tps, int8_t tx_power_level) -{ - ble_gatts_value_t gatts_value; - - // Initialize value struct. - memset(&gatts_value, 0, sizeof(gatts_value)); - - gatts_value.len = sizeof(uint8_t); - gatts_value.offset = 0; - gatts_value.p_value = (uint8_t*)&tx_power_level; - - // Update database - return sd_ble_gatts_value_set(p_tps->conn_handle, - p_tps->tx_power_level_handles.value_handle, - &gatts_value); -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_tps/ble_tps.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_tps/ble_tps.h deleted file mode 100644 index f0b445496f..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_tps/ble_tps.h +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/** @file - * - * @defgroup ble_sdk_srv_tps TX Power Service - * @{ - * @ingroup ble_sdk_srv - * @brief TX Power Service module. - * - * @details This module implements the TX Power Service with the TX Power Level characteristic. - * During initialization it adds the TX Power Service and TX Power Level characteristic - * with the specified initial value to the BLE stack database. - * - * It provides a function for letting the application update the TX Power Level - * characteristic. - * - * @note Attention! - * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile - * qualification listings, this section of source code must not be modified. - */ - -#ifndef BLE_TPS_H__ -#define BLE_TPS_H__ - -#include -#include "ble.h" -#include "ble_srv_common.h" - -/**@brief TX Power Service init structure. This contains all options and data needed for - * initialization of the service. */ -typedef struct -{ - int8_t initial_tx_power_level; /**< Initial value of the TX Power Level characteristic (in dBm). */ - ble_srv_security_mode_t tps_attr_md; /**< Initial Security Setting for TX Power Service Characteristics. */ -} ble_tps_init_t; - -/**@brief TX Power Service structure. This contains various status information for the service. */ -typedef struct -{ - uint16_t service_handle; /**< Handle of TX Power Service (as provided by the BLE stack). */ - ble_gatts_char_handles_t tx_power_level_handles; /**< Handles related to the TX Power Level characteristic. */ - uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack, is BLE_CONN_HANDLE_INVALID if not in a connection). */ -} ble_tps_t; - -/**@brief Function for initializing the TX Power Service. - * - * @param[out] p_hrs TX Power Service structure. This structure will have to be supplied by - * the application. It will be initialized by this function, and will later - * be used to identify this particular service instance. - * @param[in] p_tps_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on successful initialization of service, otherwise an error code. - */ -uint32_t ble_tps_init(ble_tps_t * p_hrs, const ble_tps_init_t * p_tps_init); - -/**@brief Function for handling the Application's BLE Stack events. - * - * @details Handles all events from the BLE stack of interest to the TX Power Service. - * - * @param[in] p_tps TX Power Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -void ble_tps_on_ble_evt(ble_tps_t * p_tps, ble_evt_t * p_ble_evt); - -/**@brief Function for setting the state of the Sensor Contact Detected bit. - * - * @param[in] p_tps TX Power Service structure. - * @param[in] tx_power_level New TX Power Level (unit dBm, range -100 to 20). - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -uint32_t ble_tps_tx_power_level_set(ble_tps_t * p_tps, int8_t tx_power_level); - -#endif // BLE_TPS_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_common.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_common.h deleted file mode 100644 index 79729d5693..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_common.h +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/** @file - * - * @defgroup ble_sdk_srv_ln_common Location and Navigation common defines - * @{ - * @ingroup ble_sdk_srv - * @brief Location and Navigation common defines - * - * @details This module contains define values common to LNS and LNCP - */ - -#ifndef BLE_LNS_COMMON_H__ -#define BLE_LNS_COMMON_H__ - -#define BLE_LNS_INVALID_ROUTE 0xFFFF -#define BLE_LNS_NO_FIX 0xFF - -#define BLE_LNS_MAX_NUM_ROUTES 10 /**< The maximum number of routes. This affects memory usage only. */ -#define BLE_LNS_MAX_ROUTE_NAME_LEN (BLE_L2CAP_MTU_DEF-5) /**< The maximum length of length of a route name. */ -#define MAX_CTRL_POINT_RESP_PARAM_LEN BLE_LNS_MAX_ROUTE_NAME_LEN + 3 /**< Maximum length of a control point response. */ - -// Location and Navigation Service feature bits -#define BLE_LNS_FEATURE_INSTANT_SPEED_SUPPORTED (0x01 << 0) /**< Instaneous Speed Supported bit. */ -#define BLE_LNS_FEATURE_TOTAL_DISTANCE_SUPPORTED (0x01 << 1) /**< Total Distance Supported bit. */ -#define BLE_LNS_FEATURE_LOCATION_SUPPORTED (0x01 << 2) /**< Location Supported bit. */ -#define BLE_LNS_FEATURE_ELEVATION_SUPPORTED (0x01 << 3) /**< Elevation Supported bit. */ -#define BLE_LNS_FEATURE_HEADING_SUPPORTED (0x01 << 4) /**< Heading Supported bit. */ -#define BLE_LNS_FEATURE_ROLLING_TIME_SUPPORTED (0x01 << 5) /**< Rolling Time Supported bit. */ -#define BLE_LNS_FEATURE_UTC_TIME_SUPPORTED (0x01 << 6) /**< UTC Time Supported bit. */ -#define BLE_LNS_FEATURE_REMAINING_DISTANCE_SUPPORTED (0x01 << 7) /**< Remaining Distance Supported bit. */ -#define BLE_LNS_FEATURE_REMAINING_VERT_DISTANCE_SUPPORTED (0x01 << 8) /**< Remaining Vertical Distance Supported bit. */ -#define BLE_LNS_FEATURE_EST_TIME_OF_ARRIVAL_SUPPORTED (0x01 << 9) /**< Estimated Time of Arrival Supported bit. */ -#define BLE_LNS_FEATURE_NUM_SATS_IN_SOLUTION_SUPPORTED (0x01 << 10) /**< Number of Satellites in Solution Supported bit. */ -#define BLE_LNS_FEATURE_NUM_SATS_IN_VIEW_SUPPORTED (0x01 << 11) /**< Number of Satellites in View Supported bit. */ -#define BLE_LNS_FEATURE_TIME_TO_FIRST_FIX_SUPPORTED (0x01 << 12) /**< Time to First Fix Supported bit. */ -#define BLE_LNS_FEATURE_EST_HORZ_POS_ERROR_SUPPORTED (0x01 << 13) /**< Estimated Horizontal Position Error Supported bit. */ -#define BLE_LNS_FEATURE_EST_VERT_POS_ERROR_SUPPORTED (0x01 << 14) /**< Estimated Vertical Position Error Supported bit. */ -#define BLE_LNS_FEATURE_HORZ_DILUTION_OF_PRECISION_SUPPORTED (0x01 << 15) /**< Horizontal Dilution of Precision Supported bit. */ -#define BLE_LNS_FEATURE_VERT_DILUTION_OF_PRECISION_SUPPORTED (0x01 << 16) /**< Vertical Dilution of Precision Supported bit. */ -#define BLE_LNS_FEATURE_LOC_AND_SPEED_CONTENT_MASKING_SUPPORTED (0x01 << 17) /**< Location and Speed Characteristic Content Masking Supported bit. */ -#define BLE_LNS_FEATURE_FIX_RATE_SETTING_SUPPORTED (0x01 << 18) /**< Fix Rate Setting Supported bit. */ -#define BLE_LNS_FEATURE_ELEVATION_SETTING_SUPPORTED (0x01 << 19) /**< Elevation Setting Supported bit. */ -#define BLE_LNS_FEATURE_POSITION_STATUS_SUPPORTED (0x01 << 20) /**< Position Status Supported bit. */ - -#endif /* BLE_LNS_COMMON_H__ */ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_cp.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_cp.c deleted file mode 100644 index c927cead19..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_cp.c +++ /dev/null @@ -1,806 +0,0 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -#include "ble_ln_cp.h" -#include "ble_ln_db.h" -#include "ble_ln_common.h" -#include "sdk_common.h" - -#if 0 -/** - * @defgroup lncp_log Module's log macros - * - * @note LNCP_LOG will only log if DEBUG is set. - */ -#ifndef LNCP_DISABLE_LOGS -#define LNCP_LOG(format, ...) NRF_LOG_PRINTF_DEBUG("[LNCP] " format, ##__VA_ARGS__) /**< Debug logger macro */ -#define LNCP_ERR(format, ...) NRF_LOG_PRINTF_ERROR("[LNCP] " format, ##__VA_ARGS__) /**< Error logger macro */ -#else -#define LNCP_LOG(...) -#define LNCP_ERR(...) -#endif // LNCP_DISABLE_LOGS -#endif -#define LNCP_LOG(...) - -// Feature Mask bits -#define FEATURE_MASK_INSTANTANEOUS_SPEED (0x01 << 0) /**< Instantaneous Speed mask bit. */ -#define FEATURE_MASK_TOTAL_DISTANCE (0x01 << 1) /**< Total Distance mask bit. */ -#define FEATURE_MASK_LOCATION (0x01 << 2) /**< Location mask bit. */ -#define FEATURE_MASK_ELEVATION (0x01 << 3) /**< Elevation mask bit. */ -#define FEATURE_MASK_HEADING (0x01 << 4) /**< Heading mask bit. */ -#define FEATURE_MASK_ROLLING_TIME (0x01 << 5) /**< Rolling Time mask bit. */ -#define FEATURE_MASK_UTC_TIME (0x01 << 6) /**< UTC Time mask bit. */ - -// Data Control point parameter type lengths. -#define INT8_LEN 1 -#define INT16_LEN 2 -#define INT24_LEN 3 -#define INT32_LEN 4 - -#define OPCODE_LENGTH 1 /**< Length of opcode inside Location and Navigation Measurement packet. */ -#define HANDLE_LENGTH 2 /**< Length of handle inside Location and Navigation Measurement packet. */ - -static ble_lncp_rsp_code_t notify_app(ble_lncp_t const * p_lncp, ble_lncp_evt_t const * p_evt) -{ - ble_lncp_rsp_code_t rsp = LNCP_RSP_SUCCESS; - - if (p_lncp->evt_handler != NULL) - { - rsp = p_lncp->evt_handler(p_lncp, p_evt); - } - - return rsp; -} - - -static void resp_send(ble_lncp_t * p_lncp) -{ - // Send indication - uint16_t hvx_len; - uint8_t hvx_data[MAX_CTRL_POINT_RESP_PARAM_LEN]; - ble_gatts_hvx_params_t hvx_params; - uint32_t err_code; - - memset(&hvx_params, 0, sizeof(hvx_params)); - - hvx_len = 3 + p_lncp->pending_rsp.rsp_param_len; - hvx_data[0] = LNCP_OP_RESPONSE_CODE; - hvx_data[1] = p_lncp->pending_rsp.op_code; - hvx_data[2] = p_lncp->pending_rsp.rsp_code; - - memcpy(&hvx_data[3], &p_lncp->pending_rsp.rsp_param[0], p_lncp->pending_rsp.rsp_param_len); - - hvx_params.handle = p_lncp->ctrlpt_handles.value_handle; - hvx_params.type = BLE_GATT_HVX_INDICATION; - hvx_params.offset = 0; - hvx_params.p_len = &hvx_len; - hvx_params.p_data = hvx_data; - - err_code = sd_ble_gatts_hvx(p_lncp->conn_handle, &hvx_params); - - // Error handling - if ((err_code == NRF_SUCCESS) && (hvx_len != p_lncp->pending_rsp.rsp_param_len + 3)) - { - err_code = NRF_ERROR_DATA_SIZE; - } - - switch (err_code) - { - case NRF_SUCCESS: - p_lncp->procedure_status = LNCP_STATE_CONFIRMATION_PENDING; - // Wait for HVC event - break; - - case BLE_ERROR_NO_TX_PACKETS: - // Wait for TX_COMPLETE event to retry transmission - p_lncp->procedure_status = LNCP_STATE_INDICATION_PENDING; - break; - - default: - p_lncp->procedure_status = LNCP_STATE_INDICATION_PENDING; - // error - if (p_lncp->error_handler != NULL) - { - p_lncp->error_handler(err_code); - } - break; - } -} - - -static void on_connect(ble_lncp_t * p_lncp, ble_evt_t const * p_ble_evt) -{ - memset(&p_lncp->mask, 0, sizeof(ble_lncp_mask_t)); - p_lncp->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; - p_lncp->procedure_status = LNCP_STATE_NO_PROC_IN_PROGRESS; -} - - -static void on_disconnect(ble_lncp_t * p_lncp, ble_evt_t const * p_ble_evt) -{ - UNUSED_PARAMETER(p_ble_evt); - p_lncp->conn_handle = BLE_CONN_HANDLE_INVALID; - p_lncp->procedure_status = LNCP_STATE_NO_PROC_IN_PROGRESS; -} - - -static void on_hvc_confirm(ble_lncp_t * p_lncp, ble_evt_t const * p_ble_evt) -{ - if (p_ble_evt->evt.gatts_evt.params.hvc.handle == p_lncp->ctrlpt_handles.value_handle) - { - if (p_lncp->procedure_status == LNCP_STATE_CONFIRMATION_PENDING) - { - p_lncp->procedure_status = LNCP_STATE_NO_PROC_IN_PROGRESS; - } - else - { - if (p_lncp->error_handler != NULL) - { - p_lncp->error_handler(NRF_ERROR_INVALID_STATE); - } - } - } -} - - -static void on_tx_complete(ble_lncp_t * p_lncp) -{ - if (p_lncp->procedure_status == LNCP_STATE_INDICATION_PENDING) - { - resp_send(p_lncp); - } -} - - -/**@brief Handle write events to the control point cccd. - * - * @param[in] p_lncp Location and Navigation Service structure. - * @param[in] p_evt_write Write event received from the BLE stack. - */ -static void on_lncp_cccd_write(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) -{ - if (p_evt_write->len == BLE_CCCD_VALUE_LEN) - { - // CCCD written, update indications state - p_lncp->is_ctrlpt_indication_enabled = ble_srv_is_indication_enabled(p_evt_write->data); - } -} - - -/**@brief Handle write events to the navigation cccd. - * - * @param[in] p_lncp Location and Navigation Service structure. - * @param[in] p_evt_write Write event received from the BLE stack. - */ -static void on_nav_cccd_write(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) -{ - if (p_evt_write->len == BLE_CCCD_VALUE_LEN) - { - // CCCD written, update notification state - p_lncp->is_nav_notification_enabled = ble_srv_is_notification_enabled(p_evt_write->data); - } -} - - -/**@brief Event handler for control point write. - * - * @param[in] p_lncp Location and Navigation Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_set_cumulative_value(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) -{ - if ( !(p_lncp->available_features & BLE_LNS_FEATURE_TOTAL_DISTANCE_SUPPORTED) ) - { - p_lncp->pending_rsp.rsp_code = LNCP_RSP_OP_CODE_NOT_SUPPORTED; - return; - } - - if (p_evt_write->len != OPCODE_LENGTH + INT24_LEN) - { - p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; - return; - } - - const uint32_t total_distance = uint24_decode(&p_evt_write->data[1]); - - const ble_lncp_evt_t evt = { - .evt_type = LNCP_EVT_TOTAL_DISTANCE_SET, - .params.total_distance = total_distance - }; - p_lncp->pending_rsp.rsp_code = notify_app(p_lncp, &evt); - - if (p_lncp->pending_rsp.rsp_code == LNCP_RSP_SUCCESS) - { - p_lncp->total_distance = total_distance; - } - -} - - -/**@brief Event handler for control point write. - * - * @param[in] p_lncp Location and Navigation Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_mask_loc_speed_content(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) -{ - if ( !(p_lncp->available_features & BLE_LNS_FEATURE_LOC_AND_SPEED_CONTENT_MASKING_SUPPORTED) ) - { - p_lncp->pending_rsp.rsp_code = LNCP_RSP_OP_CODE_NOT_SUPPORTED; - return; - } - - if (p_evt_write->len != OPCODE_LENGTH + INT16_LEN) - { - p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; - return; - } - - uint16_t rcvd_mask = uint16_decode(&p_evt_write->data[1]); - - if(rcvd_mask > 0x7F) - { - p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; - return; - } - - const ble_lncp_evt_t evt = { - .evt_type = LNCP_EVT_MASK_SET, - .params.mask.flags = rcvd_mask - }; - p_lncp->pending_rsp.rsp_code = notify_app(p_lncp, &evt); - - if (p_lncp->pending_rsp.rsp_code == LNCP_RSP_SUCCESS) - { - p_lncp->mask.flags = rcvd_mask; - } -} - - -/**@brief Event handler for control point write. - * - * @param[in] p_lncp Location and Navigation Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_nav_control(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) -{ - if ( !(p_lncp->is_navigation_present) ) - { - p_lncp->pending_rsp.rsp_code = LNCP_RSP_OP_CODE_NOT_SUPPORTED; - return; - } - - if(p_evt_write->len != LNCP_NAV_CMD_LEN) - { - p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; - return; - } - - /*lint --e{415} --e{416} -save suppress Warning 415: possible access out of bond */ - const uint8_t data_buf = p_evt_write->data[1]; - /*lint -restore*/ - - if (data_buf > LNCP_NAV_CMD_MAX) - { - p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; - return; - } - - const ble_lncp_nav_cmd_t cmd = (ble_lncp_nav_cmd_t) data_buf; - - if (cmd == LNCP_CMD_NAV_START || cmd == LNCP_CMD_NAV_CONTINUE || cmd == LNCP_CMD_NAV_NEAREST) - { - p_lncp->is_navigation_running = true; - } - else if (cmd == LNCP_CMD_NAV_STOP || cmd == LNCP_CMD_NAV_PAUSE) - { - p_lncp->is_navigation_running = false; - } - - const ble_lncp_evt_t evt = { - .evt_type = LNCP_EVT_NAV_COMMAND, - .params.nav_cmd = cmd - }; - p_lncp->pending_rsp.rsp_code = notify_app(p_lncp, &evt); -} - - -/**@brief Event handler for control point write. - * - * @param[in] p_lncp Location and Navigation Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_req_num_routes(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) -{ - p_lncp->pending_rsp.rsp_code = LNCP_RSP_SUCCESS; - - if ( !(p_lncp->is_navigation_present) ) - { - p_lncp->pending_rsp.rsp_code = LNCP_RSP_OP_CODE_NOT_SUPPORTED; - return; - } - - if (p_evt_write->len != OPCODE_LENGTH) - { - p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; - return; - } - - const uint8_t num_records = ble_ln_db_num_records_get(); - p_lncp->pending_rsp.rsp_param_len = uint16_encode(num_records, &p_lncp->pending_rsp.rsp_param[0]); -} - - -/**@brief Event handler for control point write. - * - * @param[in] p_lncp Location and Navigation Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_req_name_of_route(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) -{ - uint8_t * p_name; - uint32_t err_code; - - p_lncp->pending_rsp.rsp_code = LNCP_RSP_SUCCESS; - - if ( !(p_lncp->is_navigation_present) ) - { - p_lncp->pending_rsp.rsp_code = LNCP_RSP_OP_CODE_NOT_SUPPORTED; - return; - } - - if(p_evt_write->len != OPCODE_LENGTH + INT16_LEN) - { - p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; - return; - } - - /*lint --e{415} --e{416} -save suppress Warning 415: possible access out of bond */ - const uint16_t route_num = uint16_decode(&p_evt_write->data[1]); - /*lint -restore*/ - - err_code = ble_ln_db_record_name_get(route_num, &p_name); - if (err_code != NRF_SUCCESS) - { - p_lncp->pending_rsp.rsp_code = LNCP_RSP_OPERATION_FAILED;; - return; - } - memcpy(&p_lncp->pending_rsp.rsp_param[0], p_name, BLE_LNS_MAX_ROUTE_NAME_LEN); - - p_lncp->pending_rsp.rsp_param_len = BLE_LNS_MAX_ROUTE_NAME_LEN; -} - - -/**@brief Event handler for control point write. - * - * @param[in] p_lncp Location and Navigation Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_select_route(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) -{ - if ( !(p_lncp->is_navigation_present)) - { - p_lncp->pending_rsp.rsp_code = LNCP_RSP_OP_CODE_NOT_SUPPORTED; - return; - } - - if(p_evt_write->len != OPCODE_LENGTH + INT16_LEN) - { - p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; - return; - } - - const uint16_t route_num = uint16_decode(&p_evt_write->data[1]); - const uint16_t stored_num = ble_ln_db_num_records_get(); - - if (route_num >= stored_num) - { - p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; - return; - } - - const ble_lncp_evt_t evt = { - .evt_type = LNCP_EVT_ROUTE_SELECTED, - .params.selected_route = route_num - }; - p_lncp->pending_rsp.rsp_code = notify_app(p_lncp, &evt); - - if (p_lncp->pending_rsp.rsp_code == LNCP_RSP_SUCCESS) - { - p_lncp->selected_route = route_num; - } -} - - -/**@brief Event handler for control point write. - * - * @param[in] p_lncp Location and Navigation Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_set_fix_rate(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) -{ - p_lncp->pending_rsp.rsp_code = LNCP_RSP_SUCCESS; - - if ( !(p_lncp->available_features & BLE_LNS_FEATURE_FIX_RATE_SETTING_SUPPORTED) ) - { - p_lncp->pending_rsp.rsp_code = LNCP_RSP_OP_CODE_NOT_SUPPORTED; - return; - } - - if (p_evt_write->len != OPCODE_LENGTH + INT8_LEN) - { - p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; - return; - } - - /*lint --e{415} --e{416} -save suppress Warning 415: possible access out of bond */ - const uint8_t fix_rate = p_evt_write->data[1]; - /*lint -restore*/ - - const ble_lncp_evt_t evt = { - .evt_type = LNCP_EVT_FIX_RATE_SET, - .params.fix_rate = fix_rate - }; - p_lncp->pending_rsp.rsp_code = notify_app(p_lncp, &evt); - - if (p_lncp->pending_rsp.rsp_code == LNCP_RSP_SUCCESS) - { - p_lncp->fix_rate = fix_rate; - } -} - - -/**@brief Event handler for control point write. - * - * @param[in] p_lncp Location and Navigation Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_set_elevation(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) -{ - p_lncp->pending_rsp.rsp_code = LNCP_RSP_SUCCESS; - - if ( !(p_lncp->available_features & BLE_LNS_FEATURE_ELEVATION_SETTING_SUPPORTED) ) - { - p_lncp->pending_rsp.rsp_code = LNCP_RSP_OP_CODE_NOT_SUPPORTED; - return; - } - - if (p_evt_write->len != OPCODE_LENGTH + INT24_LEN) - { - p_lncp->pending_rsp.rsp_code = LNCP_RSP_INVALID_PARAMETER; - return; - } - - const uint32_t elevation = uint24_decode(&p_evt_write->data[1]); - ble_lncp_evt_t evt = { - .evt_type = LNCP_EVT_ELEVATION_SET, - .params.elevation = elevation - }; - p_lncp->pending_rsp.rsp_code = notify_app(p_lncp, &evt); - - if (p_lncp->pending_rsp.rsp_code == LNCP_RSP_SUCCESS) - { - p_lncp->elevation = elevation; - } -} - - -/**@brief Handle write events to the Location and Navigation Service Control Point characteristic. - * - * @param[in] p_lncp Location and Navigation Service structure. - * @param[in] p_evt_write Write event received from the BLE stack. - */ -static void on_ctrlpt_write(ble_lncp_t * p_lncp, ble_gatts_evt_write_t const * p_evt_write) -{ - uint32_t err_code; - - p_lncp->pending_rsp.rsp_param_len = 0; - - ble_gatts_rw_authorize_reply_params_t write_authorize_reply; - memset(&write_authorize_reply, 0, sizeof(write_authorize_reply)); - - write_authorize_reply.type = BLE_GATTS_AUTHORIZE_TYPE_WRITE; - - if (p_lncp->is_ctrlpt_indication_enabled) - { - if (p_lncp->procedure_status == LNCP_STATE_NO_PROC_IN_PROGRESS) - { - write_authorize_reply.params.write.update = 1; - write_authorize_reply.params.write.gatt_status = BLE_GATT_STATUS_SUCCESS; - - // if the op code is navigation control, its cccd must be checked - if (p_evt_write->len > 0 && p_lncp->is_navigation_present) - { - if ( p_evt_write->data[0] == LNCP_OP_NAV_CONTROL - || p_evt_write->data[0] == LNCP_OP_REQ_NAME_OF_ROUTE - || p_evt_write->data[0] == LNCP_OP_REQ_NUM_ROUTES) - { - if (!p_lncp->is_nav_notification_enabled) - { - write_authorize_reply.params.write.gatt_status = LNCP_RSP_CCCD_CONFIG_IMPROPER; - } - } - } - } - else - { - write_authorize_reply.params.write.gatt_status = LNCP_RSP_PROC_ALR_IN_PROG; - } - } - else - { - write_authorize_reply.params.write.gatt_status = LNCP_RSP_CCCD_CONFIG_IMPROPER; - } - - // reply to the write authorization - do { - err_code = sd_ble_gatts_rw_authorize_reply(p_lncp->conn_handle, &write_authorize_reply); - if (err_code != NRF_SUCCESS && err_code != NRF_ERROR_BUSY) - { - if (p_lncp->error_handler != NULL) - { - p_lncp->error_handler(err_code); - } - } - } while (err_code == NRF_ERROR_BUSY); - - - if (write_authorize_reply.params.write.gatt_status != BLE_GATT_STATUS_SUCCESS) - { - return; - } - - // Start executing the control point write action - p_lncp->procedure_status = LNCP_STATE_INDICATION_PENDING; - if (p_evt_write->len > 0) - { - p_lncp->pending_rsp.op_code = (ble_lncp_op_code_t) p_evt_write->data[0]; - switch (p_lncp->pending_rsp.op_code) - { - case LNCP_OP_SET_CUMULATIVE_VALUE: - on_set_cumulative_value(p_lncp, p_evt_write); - break; - - case LNCP_OP_MASK_LOC_SPEED_CONTENT: - on_mask_loc_speed_content(p_lncp, p_evt_write); - break; - - case LNCP_OP_NAV_CONTROL: - on_nav_control(p_lncp, p_evt_write); - break; - - case LNCP_OP_REQ_NUM_ROUTES: - on_req_num_routes(p_lncp, p_evt_write); - break; - - case LNCP_OP_REQ_NAME_OF_ROUTE: - on_req_name_of_route(p_lncp, p_evt_write); - break; - - case LNCP_OP_SELECT_ROUTE: - on_select_route(p_lncp, p_evt_write); - break; - - case LNCP_OP_SET_FIX_RATE: - on_set_fix_rate(p_lncp, p_evt_write); - break; - - case LNCP_OP_SET_ELEVATION: - on_set_elevation(p_lncp, p_evt_write); - break; - - // Unrecognized Op Code - default: - p_lncp->pending_rsp.rsp_code = LNCP_RSP_OP_CODE_NOT_SUPPORTED; - break; - } - - resp_send(p_lncp); - } - else - { - p_lncp->procedure_status = LNCP_STATE_NO_PROC_IN_PROGRESS; - } -} - - -/**@brief Write authorization request event handler. - * - * @details The write authorization request event handler is only called when writing to the control point. - * - * @param[in] p_lncp Location and Navigation Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_rw_authorize_req(ble_lncp_t * p_lncp, ble_evt_t const * p_ble_evt) -{ - const ble_gatts_evt_rw_authorize_request_t * p_auth_req = - &p_ble_evt->evt.gatts_evt.params.authorize_request; - - if ( - (p_auth_req->type == BLE_GATTS_AUTHORIZE_TYPE_WRITE) - && - (p_auth_req->request.write.handle == p_lncp->ctrlpt_handles.value_handle) - && - (p_auth_req->request.write.op != BLE_GATTS_OP_PREP_WRITE_REQ) - && - (p_auth_req->request.write.op != BLE_GATTS_OP_EXEC_WRITE_REQ_NOW) - && - (p_auth_req->request.write.op != BLE_GATTS_OP_EXEC_WRITE_REQ_CANCEL) - ) - { - on_ctrlpt_write(p_lncp, &p_auth_req->request.write); - } - -} - - -/**@brief Write event handler. - * - * @param[in] p_lncp Location and Navigation Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_write(ble_lncp_t * p_lncp, ble_evt_t const * p_ble_evt) -{ - const ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; - - if (p_evt_write->handle == p_lncp->ctrlpt_handles.cccd_handle) - { - on_lncp_cccd_write(p_lncp, p_evt_write); - } - else if (p_evt_write->handle == p_lncp->navigation_handles.cccd_handle) - { - on_nav_cccd_write(p_lncp, p_evt_write); - } -} - - -void ble_lncp_on_ble_evt(ble_lncp_t * p_lncp, ble_evt_t const * p_ble_evt) -{ - VERIFY_PARAM_NOT_NULL_VOID(p_lncp); - VERIFY_PARAM_NOT_NULL_VOID(p_ble_evt); - - switch (p_ble_evt->header.evt_id) - { - case BLE_GAP_EVT_CONNECTED: - on_connect(p_lncp, p_ble_evt); - break; - - case BLE_GAP_EVT_DISCONNECTED: - if (p_ble_evt->evt.gap_evt.conn_handle == p_lncp->conn_handle) - { - on_disconnect(p_lncp, p_ble_evt); - } - break; - - case BLE_GATTS_EVT_WRITE: - if (p_ble_evt->evt.gatts_evt.conn_handle == p_lncp->conn_handle) - { - on_write(p_lncp, p_ble_evt); - } - break; - - case BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST: - if (p_ble_evt->evt.gatts_evt.conn_handle == p_lncp->conn_handle) - { - on_rw_authorize_req(p_lncp, p_ble_evt); - } - break; - - case BLE_GATTS_EVT_HVC: - if (p_ble_evt->evt.gatts_evt.conn_handle == p_lncp->conn_handle) - { - on_hvc_confirm(p_lncp, p_ble_evt); - } - break; - - case BLE_EVT_TX_COMPLETE: - on_tx_complete(p_lncp); - break; - - default: - // no implementation - break; - } -} - - -uint32_t ble_lncp_total_distance_get(ble_lncp_t const * p_lncp) -{ - if (p_lncp == NULL) - { - return 0; - } - - return p_lncp->total_distance; -} - - -uint32_t ble_lncp_elevation_get(ble_lncp_t const * p_lncp) -{ - if (p_lncp == NULL) - { - return 0; - } - - return p_lncp->elevation; -} - - -ble_lncp_mask_t ble_lncp_mask_get(ble_lncp_t const * p_lncp) -{ - if (p_lncp == NULL) - { - const ble_lncp_mask_t empty_mask = {0}; - return empty_mask; - } - - return p_lncp->mask; -} - - -bool ble_lncp_is_navigation_running(ble_lncp_t const * p_lncp) -{ - if (p_lncp == NULL) - { - return false; - } - - return p_lncp->is_navigation_running; -} - - -ret_code_t ble_lncp_init(ble_lncp_t * p_lncp, ble_lncp_init_t const * p_lncp_init) -{ - VERIFY_PARAM_NOT_NULL(p_lncp); - VERIFY_PARAM_NOT_NULL(p_lncp_init); - - ble_add_char_params_t add_char_params; - - memset(&add_char_params, 0, sizeof(add_char_params)); - - p_lncp->service_handle = p_lncp_init->service_handle; - p_lncp->evt_handler = p_lncp_init->evt_handler; - p_lncp->error_handler = p_lncp_init->error_handler; - p_lncp->available_features = p_lncp_init->available_features; - p_lncp->is_position_quality_present = p_lncp_init->is_position_quality_present; - p_lncp->is_navigation_present = p_lncp_init->is_navigation_present; - p_lncp->total_distance = p_lncp_init->total_distance; - p_lncp->elevation = p_lncp_init->elevation; - p_lncp->navigation_handles = p_lncp_init->navigation_handles; - - p_lncp->fix_rate = BLE_LNS_NO_FIX; - p_lncp->selected_route = BLE_LNS_INVALID_ROUTE; - - p_lncp->procedure_status = LNCP_STATE_NO_PROC_IN_PROGRESS; - p_lncp->conn_handle = BLE_CONN_HANDLE_INVALID; - p_lncp->is_navigation_running = false; - p_lncp->is_nav_notification_enabled = false; - p_lncp->is_ctrlpt_indication_enabled = false; - - memset(&p_lncp->mask, 0, sizeof(ble_lncp_mask_t)); - - add_char_params.uuid = BLE_UUID_LN_CONTROL_POINT_CHAR; - add_char_params.max_len = 0; - add_char_params.char_props.indicate = true; - add_char_params.char_props.write = true; - add_char_params.is_defered_write = true; - add_char_params.is_var_len = true; - add_char_params.max_len = BLE_L2CAP_MTU_DEF; - add_char_params.write_access = p_lncp_init->write_perm; - add_char_params.cccd_write_access = p_lncp_init->cccd_write_perm; - - LNCP_LOG("Initialized\n"); - - return characteristic_add(p_lncp->service_handle, - &add_char_params, - &p_lncp->ctrlpt_handles); -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_cp.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_cp.h deleted file mode 100644 index ee385efcd0..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_cp.h +++ /dev/null @@ -1,219 +0,0 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/** @file - * - * @defgroup ble_sdk_srv_lncp Location and Navigation Service Control Point - * @{ - * @ingroup ble_sdk_srv - * @brief Location and Navigation Service Control Point module - * - * @details This module implements the Location and Navigation Service Control Point behavior. - */ - -#ifndef BLE_LN_CTRLPT_H__ -#define BLE_LN_CTRLPT_H__ - -#include "ble_srv_common.h" -#include "sdk_common.h" - -#define BLE_LNS_MAX_ROUTE_NAME_LEN (BLE_L2CAP_MTU_DEF-5) /**< The maximum length of length of a route name. */ -#define MAX_CTRL_POINT_RESP_PARAM_LEN BLE_LNS_MAX_ROUTE_NAME_LEN + 3 /**< Maximum length of a control point response. */ - -typedef struct ble_lncp_s ble_lncp_t; - -/** @brief Location and Navigation event type. This list defines the possible events types from the Location and Navigation Service. */ -typedef enum -{ - LNCP_EVT_ELEVATION_SET, /**< Location and Navigation elevation was set. */ - LNCP_EVT_FIX_RATE_SET, /**< Fix rate was set. */ - LNCP_EVT_ROUTE_SELECTED, /**< A route was selected. */ - LNCP_EVT_NAV_COMMAND, /**< A navigation command was issued. */ - LNCP_EVT_MASK_SET, /**< Location and Speed feature mask was set. */ - LNCP_EVT_TOTAL_DISTANCE_SET /**< Location and Navigation total distance was set. */ -} ble_lncp_evt_type_t; - - -/** @brief Navigation commands. These commands can be sent to the control point and returned by an event callback. */ -typedef enum -{ - LNCP_CMD_NAV_STOP = 0x00, /**< When received, is_navigation_running in @ref ble_lns_s will be set to false. */ - LNCP_CMD_NAV_START = 0x01, /**< When received, is_navigation_running in @ref ble_lns_s will be set to true. */ - LNCP_CMD_NAV_PAUSE = 0x02, /**< When received, is_navigation_running in @ref ble_lns_s will be set to false. */ - LNCP_CMD_NAV_CONTINUE = 0x03, /**< When received, is_navigation_running in @ref ble_lns_s will be set to true. */ - LNCP_CMD_NAV_SKIP_WAYPOINT = 0x04, /**< When received, is_navigation_running in @ref ble_lns_s will not be affected. */ - LNCP_CMD_NAV_NEAREST = 0x05, /**< When received, is_navigation_running in @ref ble_lns_s will be set to true. */ -} ble_lncp_nav_cmd_t; -#define LNCP_NAV_CMD_MAX 0x05 -#define LNCP_NAV_CMD_LEN (OPCODE_LENGTH + 1) - - -#if defined(__CC_ARM) - #pragma push - #pragma anon_unions -#elif defined(__ICCARM__) - #pragma language=extended -#elif defined(__GNUC__) - /* anonymous unions are enabled by default */ -#endif - -/** @brief A mask can be used to temporarily enable and disable features of the Location and Speed characteristic.*/ -typedef union -{ - uint8_t flags; - struct - { - uint8_t instantaneous_speed :1; - uint8_t total_distance :1; - uint8_t location :1; - uint8_t elevation :1; - uint8_t heading :1; - uint8_t rolling_time :1; - uint8_t utc_time :1; - }; -} ble_lncp_mask_t; - -#if defined(__CC_ARM) - #pragma pop -#elif defined(__ICCARM__) - /* leave anonymous unions enabled */ -#elif defined(__GNUC__) - /* anonymous unions are enabled by default */ -#endif - -typedef struct -{ - ble_lncp_evt_type_t evt_type; - union - { - ble_lncp_mask_t mask; - ble_lncp_nav_cmd_t nav_cmd; - uint32_t total_distance; - uint8_t fix_rate; - uint16_t selected_route; - uint32_t elevation; - } params; -} ble_lncp_evt_t; - - -// Location and Navigation Control Point response values -typedef enum -{ - LNCP_RSP_RESERVED = 0x00, /**< Reserved for future use. */ - LNCP_RSP_SUCCESS = 0x01, /**< Success. */ - LNCP_RSP_OP_CODE_NOT_SUPPORTED = 0x02, /**< Op Code not supported. */ - LNCP_RSP_INVALID_PARAMETER = 0x03, /**< Invalid Parameter. */ - LNCP_RSP_OPERATION_FAILED = 0x04, /**< Operation Failed. */ - LNCP_RSP_PROC_ALR_IN_PROG = BLE_GATT_STATUS_ATTERR_CPS_PROC_ALR_IN_PROG, /**< Control point procedure is already in progress. */ - LNCP_RSP_CCCD_CONFIG_IMPROPER = BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR /**< CCCD is improperly configured. */ -} ble_lncp_rsp_code_t; - - -typedef ble_lncp_rsp_code_t (*ble_lncp_evt_handler_t) (ble_lncp_t const * p_lncp, ble_lncp_evt_t const * p_evt); - -// Location and Navigation Control Point Op Code values -typedef enum -{ - LNCP_OP_RESERVED = 0x00, /**< Reserved for future use. */ - LNCP_OP_SET_CUMULATIVE_VALUE = 0x01, /**< Set Cumulative Value. */ - LNCP_OP_MASK_LOC_SPEED_CONTENT = 0x02, /**< Mask Location and Speed Characteristic Content. */ - LNCP_OP_NAV_CONTROL = 0x03, /**< Navigation Control. */ - LNCP_OP_REQ_NUM_ROUTES = 0x04, /**< Request Number of Routes. */ - LNCP_OP_REQ_NAME_OF_ROUTE = 0x05, /**< Request Name of Route. */ - LNCP_OP_SELECT_ROUTE = 0x06, /**< Select Route. */ - LNCP_OP_SET_FIX_RATE = 0x07, /**< Set Fix Rate. */ - LNCP_OP_SET_ELEVATION = 0x08, /**< Set Elevation. */ - LNCP_OP_RESPONSE_CODE = 0x20 /**< Response code. */ -} ble_lncp_op_code_t; - - -/** @brief Location and Navigation Control Point procedure status */ -typedef enum -{ - LNCP_STATE_NO_PROC_IN_PROGRESS, /**< No procedure in progress. */ - LNCP_STATE_INDICATION_PENDING, /**< Control Point indication is pending. */ - LNCP_STATE_CONFIRMATION_PENDING, /**< Waiting for the indication confirmation. */ -} ble_lncp_procedure_status_t; - - -/** @brief Information included in a control point write response indication. */ -typedef struct -{ - ble_lncp_op_code_t op_code; /**< Opcode of the control point write action. */ - ble_lncp_rsp_code_t rsp_code; /**< Response code of the control point write action. */ - uint8_t rsp_param_len; - uint8_t rsp_param[MAX_CTRL_POINT_RESP_PARAM_LEN]; -} ble_lncp_rsp_t; - - -typedef struct -{ - uint16_t service_handle; - ble_lncp_evt_handler_t evt_handler; - ble_srv_error_handler_t error_handler; - - uint32_t available_features; /**< Value of the LN feature. */ - bool is_position_quality_present; /**< If set to true, the position quality characteristic will be added. Else not. */ - bool is_control_point_present; /**< If set to true, the control point characteristic will be added. Else not. */ - bool is_navigation_present; /**< If set to true, the navigation characteristic will be added. Else not. */ - ble_gatts_char_handles_t navigation_handles; - - uint32_t total_distance; - uint32_t elevation; - - security_req_t write_perm; - security_req_t cccd_write_perm; -} ble_lncp_init_t; - - -struct ble_lncp_s -{ - uint16_t conn_handle; - uint16_t service_handle; - ble_gatts_char_handles_t ctrlpt_handles; - ble_gatts_char_handles_t navigation_handles; - ble_lncp_evt_handler_t evt_handler; - ble_srv_error_handler_t error_handler; - ble_lncp_procedure_status_t procedure_status; - ble_lncp_rsp_t pending_rsp; - - ble_lncp_mask_t mask; - uint32_t total_distance; - uint32_t elevation; - uint8_t fix_rate; - uint16_t selected_route; - uint32_t available_features; /**< Value of the LN feature. */ - bool is_position_quality_present; /**< If set to true, the position quality characteristic will be added. Else not. */ - bool is_control_point_present; /**< If set to true, the control point characteristic will be added. Else not. */ - bool is_navigation_present; /**< If set to true, the navigation characteristic will be added. Else not. */ - bool is_navigation_running; /**< This variable can be set using the control point. Must be true to be able to send navigation updates. */ - - bool is_ctrlpt_indication_enabled; /**< True if indication is enabled on the Control Point characteristic. */ - bool is_nav_notification_enabled; /**< True if notification is enabled on the Navigation characteristic. */ -}; - - -void ble_lncp_on_ble_evt(ble_lncp_t * p_lncp, ble_evt_t const * p_ble_evt); - -uint32_t ble_lncp_total_distance_get(ble_lncp_t const * p_lncp); - -uint32_t ble_lncp_elevation_get(ble_lncp_t const * p_lncp); - -ble_lncp_mask_t ble_lncp_mask_get(ble_lncp_t const * p_lncp); - -bool ble_lncp_is_navigation_running(ble_lncp_t const * p_lncp); - -ret_code_t ble_lncp_init(ble_lncp_t * p_lncp, ble_lncp_init_t const * p_lncp_init); - -#endif //BLE_LN_CTRLPT_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_db.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_db.c deleted file mode 100644 index 99b4955275..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_db.c +++ /dev/null @@ -1,127 +0,0 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -#include "ble_ln_db.h" -#include "ble_ln_common.h" - -typedef struct -{ - bool in_use_flag; - ble_lns_route_t record; -} database_entry_t; - -static database_entry_t m_database[BLE_LNS_MAX_NUM_ROUTES]; -static uint8_t m_database_crossref[BLE_LNS_MAX_NUM_ROUTES]; -static uint16_t m_num_records; - -void ble_ln_db_init(void) -{ - int i; - - for (i = 0; i < BLE_LNS_MAX_NUM_ROUTES; i++) - { - m_database[i].in_use_flag = false; - m_database_crossref[i] = 0xFF; - } - - m_num_records = 0; -} - - -uint16_t ble_ln_db_num_records_get(void) -{ - return m_num_records; -} - - -ret_code_t ble_ln_db_record_get(uint8_t rec_ndx, ble_lns_route_t * p_rec) -{ - if (rec_ndx >= m_num_records) - { - return NRF_ERROR_INVALID_PARAM; - } - - // copy record to the specified memory - *p_rec = m_database[m_database_crossref[rec_ndx]].record; - - return NRF_SUCCESS; -} - - -ret_code_t ble_ln_db_record_name_get(uint8_t rec_ndx, uint8_t ** p_buf) -{ - if (rec_ndx >= m_num_records) - { - return NRF_ERROR_INVALID_PARAM; - } - - // copy record to the specified memory - *p_buf = m_database[m_database_crossref[rec_ndx]].record.route_name; - - return NRF_SUCCESS; -} - - -ret_code_t ble_ln_db_record_add(ble_lns_route_t * p_rec) -{ - int i; - - if (m_num_records == BLE_LNS_MAX_NUM_ROUTES) - { - return NRF_ERROR_NO_MEM; - } - - // find next available database entry - for (i = 0; i < BLE_LNS_MAX_NUM_ROUTES; i++) - { - if (!m_database[i].in_use_flag) - { - m_database[i].in_use_flag = true; - m_database[i].record = *p_rec; - - m_database[i].record.route_id = i; - m_database_crossref[m_num_records] = i; - p_rec->route_id = i; - - m_num_records++; - - return NRF_SUCCESS; - } - } - - return NRF_ERROR_NO_MEM; -} - - -ret_code_t ble_ln_db_record_delete(uint8_t rec_ndx) -{ - int i; - - if (rec_ndx >= m_num_records) - { - return NRF_ERROR_NOT_FOUND; - } - - // free entry - m_database[m_database_crossref[rec_ndx]].in_use_flag = false; - - // decrease number of records - m_num_records--; - - // remove cross reference index - for (i = rec_ndx; i < m_num_records; i++) - { - m_database_crossref[i] = m_database_crossref[i + 1]; - } - - return NRF_SUCCESS; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_db.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_db.h deleted file mode 100644 index 24046c311c..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_ln_db.h +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/** @file - * - * @defgroup ble_sdk_srv_ln_db Location and Navigation database - * @{ - * @ingroup ble_sdk_srv - * @brief Location and Navigation route database - */ - -#ifndef BLE_LN_DB__ -#define BLE_LN_DB__ - -#include "ble_lns.h" - -/**@brief Function for initializing the route database. - * - * @details This call initializes the database holding route records. - * - * @return NRF_SUCCESS on success. - */ -void ble_ln_db_init(void); - -/**@brief Function for getting the number of records in the database. - * - * @details This call returns the number of records in the database. - * - * @return Number of records in the database. - */ -uint16_t ble_ln_db_num_records_get(void); - -/**@brief Function for getting a record from the database. - * - * @details This call returns a specified record from the database. - * - * @param[in] record_num Index of the record to retrieve. - * @param[out] p_rec Pointer to record structure where retrieved record is copied to. - * - * @return NRF_SUCCESS on success. - */ -ret_code_t ble_ln_db_record_get(uint8_t record_num, ble_lns_route_t * p_rec); - -/**@brief Function for getting a record name from the database. - * - * @details This call returns a specified record name from the database. - * - * @param[in] rec_ndx Index of the record to retrieve. - * @param[out] p_buf Pointer to array where retrieved record name is copied to. - * - * @return NRF_SUCCESS on success. - */ -ret_code_t ble_ln_db_record_name_get(uint8_t rec_ndx, uint8_t ** p_buf); - -/**@brief Function for adding a record at the end of the database. - * - * @details This call adds a record as the last record in the database. - * - * @param[in] p_rec Pointer to record to add to database. - * - * @return NRF_SUCCESS on success. - */ -ret_code_t ble_ln_db_record_add(ble_lns_route_t * p_rec); - -/**@brief Function for deleting a database entry. - * - * @details This call deletes an record from the database. - * - * @param[in] record_num Index of record to delete. - * - * @return NRF_SUCCESS on success. - */ -ret_code_t ble_ln_db_record_delete(uint8_t record_num); - -#endif // BLE_LN_DB_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_lns.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_lns.c deleted file mode 100644 index d03a6f3850..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_lns.c +++ /dev/null @@ -1,1001 +0,0 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -#include "ble_lns.h" -#include "ble_ln_db.h" -#include "ble_ln_common.h" -#include "sdk_common.h" - -#if 0 -/** - * @defgroup lns_log Module's log macros - * - * @note LNS_LOG will only log if DEBUG is set. - */ -#ifndef LNS_DISABLE_LOGS -#define LNS_LOG(format, ...) NRF_LOG_PRINTF_DEBUG("[LNS] " format, ##__VA_ARGS__) /**< Debug logger macro */ -#define LNS_ERR(format, ...) NRF_LOG_PRINTF_ERROR("[LNS] " format, ##__VA_ARGS__) /**< Error logger macro */ -#else -#define LNS_LOG(...) -#define LNS_ERR(...) -#endif // LNS_DISABLE_LOGS -#endif -#define LNS_LOG(...) - -// Location and Speed flag bits -#define LOC_SPEED_FLAG_INSTANT_SPEED_PRESENT (0x01 << 0) /**< Instantaneous Speed Present bit. */ -#define LOC_SPEED_FLAG_TOTAL_DISTANCE_PRESENT (0x01 << 1) /**< Total Distance Present bit. */ -#define LOC_SPEED_FLAG_LOCATION_PRESENT (0x01 << 2) /**< Location Present bit. */ -#define LOC_SPEED_FLAG_ELEVATION_PRESENT (0x01 << 3) /**< Elevation Present bit. */ -#define LOC_SPEED_FLAG_HEADING_PRESENT (0x01 << 4) /**< Heading Present bit. */ -#define LOC_SPEED_FLAG_ROLLING_TIME_PRESENT (0x01 << 5) /**< Rolling Time Present bit. */ -#define LOC_SPEED_FLAG_UTC_TIME_PRESENT (0x01 << 6) /**< UTC Time Present bit. */ -#define LOC_SPEED_FLAG_POSITION_STATUS (0x03 << 7) /**< Position Status bits(2). */ -#define LOC_SPEED_FLAG_SPEED_AND_DIST_FORMAT (0x01 << 9) /**< Speed and Distance Format. */ -#define LOC_SPEED_FLAG_ELEVATION_SOURCE (0x03 << 10) /**< Elevation Source bits(2). */ -#define LOC_SPEED_FLAG_HEADING_SOURCE (0x01 << 12) /**< Heading Source. */ - -// Position Quality flag bits -#define POS_QUAL_FLAG_NUM_SATS_IN_SOLUTION_PRESENT (0x01 << 0) /**< Number of Satellites in Solution Present bit. */ -#define POS_QUAL_FLAG_NUM_SATS_IN_VIEW_PRESENT (0x01 << 1) /**< Number of Satellites in View Present bit. */ -#define POS_QUAL_FLAG_TIME_TO_FIRST_FIX_PRESESNT (0x01 << 2) /**< Time to First Fix Present bit. */ -#define POS_QUAL_FLAG_EHPE_PRESENT (0x01 << 3) /**< EHPE Present bit. */ -#define POS_QUAL_FLAG_EVPE_PRESENT (0x01 << 4) /**< EVPE Present bit. */ -#define POS_QUAL_FLAG_HDOP_PRESENT (0x01 << 5) /**< HDOP Present bit. */ -#define POS_QUAL_FLAG_VDOP_PRESENT (0x01 << 6) /**< VDOP Present bit. */ -#define POS_QUAL_FLAG_POSITION_STATUS (0x03 << 7) /**< Position Status bits(2). */ - -// Navigation flag bits -#define NAV_FLAG_REMAINING_DIST_PRESENT (0x01 << 0) /**< Remaining Distance Present bit. */ -#define NAV_FLAG_REAMINGING_VERT_DIST_PRESESNT (0x01 << 1) /**< Remaining Vertical Distance Present bit . */ -#define NAV_FLAG_ETA_PRESENT (0x01 << 2) /**< Estimated Time of Arrival Present bit. */ -#define NAV_FLAG_POSITION_STATUS (0x03 << 3) /**< Position Status bits(2). */ -#define NAV_FLAG_HEADING_SOURCE (0x01 << 5) /**< Heading Source bit. */ -#define NAV_FLAG_NAVIGATION_INDICATOR_TYPE (0x01 << 6) /**< Navigation Indicator Type bit. */ -#define NAV_FLAG_WAYPOINT_REACHED (0x01 << 7) /**< Waypoint Reached bit. */ -#define NAV_FLAG_DESTINATION_REACHED (0x01 << 8) /**< Destination Reached bit. */ - -#define BLE_LNS_NAV_MAX_LEN 19 /**< The length of a navigation notification when all features are enabled. See @ref ble_lns_navigation_t to see what this represents, or check https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.navigation.xml. */ - - -static void notification_buffer_process(ble_lns_t * p_lns) -{ - notification_t * p_notification; - - // See if a notification is pending - if (p_lns->pending_loc_speed_notifications[0].is_pending == true) - { - p_notification = &p_lns->pending_loc_speed_notifications[0]; - } - else if (p_lns->pending_loc_speed_notifications[1].is_pending == true) - { - p_notification = &p_lns->pending_loc_speed_notifications[1]; - } - else if (p_lns->pending_navigation_notification.is_pending == true) - { - p_notification = &p_lns->pending_navigation_notification; - } - else - { - p_notification = NULL; - } - - // send the notification if necessary - if (p_notification != NULL) - { - uint32_t err_code; - ble_gatts_hvx_params_t hvx_params; - - memset(&hvx_params, 0, sizeof(hvx_params)); - - uint16_t hvx_len = p_notification->len; - - hvx_params.handle = p_notification->handle; - hvx_params.type = BLE_GATT_HVX_NOTIFICATION; - hvx_params.offset = 0; - hvx_params.p_len = &hvx_len; - hvx_params.p_data = &p_notification->data[0]; - - err_code = sd_ble_gatts_hvx(p_lns->conn_handle, &hvx_params); - - if ((err_code == NRF_SUCCESS) && (hvx_len == p_notification->len)) - { - p_notification->is_pending = false; - } - } -} - - -/**@brief Connect event handler. - * - * @param[in] p_lns Location and Navigation Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_connect(ble_lns_t * p_lns, ble_evt_t const * p_ble_evt) -{ - p_lns->conn_handle = p_ble_evt->evt.gap_evt.conn_handle; - - // clear pending notifications - p_lns->pending_loc_speed_notifications[0].is_pending = false; - p_lns->pending_loc_speed_notifications[1].is_pending = false; - p_lns->pending_navigation_notification.is_pending = false; -} - - -/**@brief Disconnect event handler. - * - * @param[in] p_lns Location and Navigation Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_disconnect(ble_lns_t * p_lns, ble_evt_t const * p_ble_evt) -{ - if (p_lns->conn_handle != p_ble_evt->evt.gatts_evt.conn_handle) - { - return; - } - - p_lns->conn_handle = BLE_CONN_HANDLE_INVALID; -} - - -/**@brief Handle write events to the control point cccd. - * - * @param[in] p_lncp Location and Navigation Service structure. - * @param[in] p_evt_write Write event received from the BLE stack. - */ -static void on_ctrl_pt_cccd_write(ble_lns_t * p_lns, ble_gatts_evt_write_t const * p_evt_write) -{ - if (p_evt_write->len == BLE_CCCD_VALUE_LEN) - { - if (p_lns->evt_handler != NULL) - { - ble_lns_evt_t evt; - - if (ble_srv_is_indication_enabled(p_evt_write->data)) - { - evt.evt_type = BLE_LNS_CTRLPT_EVT_INDICATION_ENABLED;; - } - else - { - evt.evt_type = BLE_LNS_CTRLPT_EVT_INDICATION_DISABLED;; - } - - p_lns->evt_handler(p_lns, &evt); - } - } -} - - -/**@brief Handle write events to the Location and Speed cccd. - * - * @param[in] p_lns Location and Navigation Service structure. - * @param[in] p_evt_write Write event received from the BLE stack. - */ -static void on_loc_speed_cccd_write(ble_lns_t * p_lns, - ble_gatts_evt_write_t const * p_evt_write) -{ - if (p_evt_write->len == BLE_CCCD_VALUE_LEN) - { - // CCCD written, update notification state - p_lns->is_loc_speed_notification_enabled = ble_srv_is_notification_enabled(p_evt_write->data); - if (p_lns->evt_handler != NULL) - { - ble_lns_evt_t evt; - - if (p_lns->is_loc_speed_notification_enabled) - { - evt.evt_type = BLE_LNS_LOC_SPEED_EVT_NOTIFICATION_ENABLED; - } - else - { - evt.evt_type = BLE_LNS_LOC_SPEED_EVT_NOTIFICATION_DISABLED; - } - - p_lns->evt_handler(p_lns, &evt); - } - } -} - - -/**@brief Handle write events to the navigation cccd. - * - * @param[in] p_lns Location and Navigation Service structure. - * @param[in] p_evt_write Write event received from the BLE stack. - */ -static void on_nav_cccd_write(ble_lns_t * p_lns, - ble_gatts_evt_write_t const * p_evt_write) -{ - if (p_evt_write->len == BLE_CCCD_VALUE_LEN) - { - p_lns->is_nav_notification_enabled = ble_srv_is_notification_enabled(p_evt_write->data); - if (p_lns->evt_handler != NULL) - { - ble_lns_evt_t evt; - - if (p_lns->is_nav_notification_enabled) - { - evt.evt_type = BLE_LNS_NAVIGATION_EVT_NOTIFICATION_ENABLED; - } - else - { - evt.evt_type = BLE_LNS_NAVIGATION_EVT_NOTIFICATION_DISABLED; - } - - p_lns->evt_handler(p_lns, &evt); - } - } -} - - -/**@brief Write event handler. - * - * @param[in] p_lns Location and Navigation Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - */ -static void on_write(ble_lns_t * p_lns, ble_evt_t const * p_ble_evt) -{ - if (p_lns->conn_handle != p_ble_evt->evt.gatts_evt.conn_handle) - { - return; - } - - const ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; - - if (p_evt_write->handle == p_lns->ctrlpt_handles.cccd_handle) - { - on_ctrl_pt_cccd_write(p_lns, p_evt_write); - } - else if (p_evt_write->handle == p_lns->loc_speed_handles.cccd_handle) - { - on_loc_speed_cccd_write(p_lns, p_evt_write); - } - else if (p_evt_write->handle == p_lns->navigation_handles.cccd_handle) - { - on_nav_cccd_write(p_lns, p_evt_write); - } -} - - -/**@brief Tx Complete event handler. This is used to retry sending a packet. - * - * @details Tx Complete event handler. - * Handles WRITE events from the BLE stack and if an indication was pending try sending it - * again. - * - * @param[in] p_lns Location navigation structure. - */ -static void on_tx_complete(ble_lns_t * p_lns) -{ - notification_buffer_process(p_lns); -} - - -/**@brief Encode position quality. - * - * @param[in] p_lns Location and Navigation Service structure. - * @param[in] p_pos_qual Position quality data to be encoded. - * @param[out] p_encoded_buffer Buffer where the encoded data will be written. - * - * @return Size of encoded data. - */ -static uint8_t pos_qual_encode(ble_lns_t const * p_lns, - ble_lns_pos_quality_t const * p_pos_qual, - uint8_t * p_encoded_buffer) -{ - uint16_t flags = 0; - uint8_t len = 2; // flags are added at last - - flags |= ((uint16_t)p_pos_qual->position_status << 7) & POS_QUAL_FLAG_POSITION_STATUS; - - if (p_pos_qual->number_of_satellites_in_solution_present) - { - flags |= POS_QUAL_FLAG_NUM_SATS_IN_SOLUTION_PRESENT; - p_encoded_buffer[len++] = p_pos_qual->number_of_satellites_in_solution; - } - - if (p_pos_qual->number_of_satellites_in_view_present) - { - flags |= POS_QUAL_FLAG_NUM_SATS_IN_VIEW_PRESENT; - p_encoded_buffer[len++] = p_pos_qual->number_of_satellites_in_view; - } - - if (p_pos_qual->time_to_first_fix_present) - { - flags |= POS_QUAL_FLAG_TIME_TO_FIRST_FIX_PRESESNT; - len += uint16_encode(p_pos_qual->time_to_first_fix, &p_encoded_buffer[len]); - } - - if (p_pos_qual->ehpe_present) - { - flags |= POS_QUAL_FLAG_EHPE_PRESENT; - len += uint32_encode(p_pos_qual->ehpe, &p_encoded_buffer[len]); - } - - if (p_pos_qual->evpe_present) - { - flags |= POS_QUAL_FLAG_EVPE_PRESENT; - len += uint32_encode(p_pos_qual->evpe, &p_encoded_buffer[len]); - } - - if (p_pos_qual->hdop_present) - { - flags |= POS_QUAL_FLAG_HDOP_PRESENT; - p_encoded_buffer[len++] = p_pos_qual->hdop; - } - - if (p_pos_qual->vdop_present) - { - flags |= POS_QUAL_FLAG_VDOP_PRESENT; - p_encoded_buffer[len++] = p_pos_qual->vdop; - } - - // Flags field - uint16_encode(flags, &p_encoded_buffer[0]); //lint !e534 "Ignoring return value of function" - - return len; -} - - -/**@brief Encode Location and Speed data packet 1 - * - * @param[in] p_lns Location and Navigation Service structure. - * @param[in] p_loc_speed Location and Speed data to be encoded. - * @param[out] p_encoded_buffer Pointer to buffer buffer where encoded data will be written. - * - * @return Size of encoded data. - * - */ -static uint8_t loc_speed_encode_packet1(ble_lns_t const * p_lns, - ble_lns_loc_speed_t const * p_loc_speed, - uint8_t * p_encoded_buffer) -{ - uint16_t flags = 0; - uint8_t len = 2; - - const ble_lncp_mask_t mask = ble_lncp_mask_get(&p_lns->ctrl_pt); - - // Instantaneous Speed - if (p_lns->available_features & BLE_LNS_FEATURE_INSTANT_SPEED_SUPPORTED) - { - if (p_loc_speed->instant_speed_present && !mask.instantaneous_speed) - { - flags |= LOC_SPEED_FLAG_INSTANT_SPEED_PRESENT; - flags |= ((uint16_t)p_loc_speed->data_format<<9) & LOC_SPEED_FLAG_SPEED_AND_DIST_FORMAT; - len += uint16_encode(p_loc_speed->instant_speed, &p_encoded_buffer[len]); - } - } - - // Total Distance - if (p_lns->available_features & BLE_LNS_FEATURE_TOTAL_DISTANCE_SUPPORTED) - { - if (p_loc_speed->total_distance_present && !mask.total_distance) - { - const uint32_t total_distance = ble_lncp_total_distance_get(&p_lns->ctrl_pt); - flags |= LOC_SPEED_FLAG_TOTAL_DISTANCE_PRESENT; - len += uint24_encode(total_distance, &p_encoded_buffer[len]); - } - } - - // Location - if (p_lns->available_features & BLE_LNS_FEATURE_LOCATION_SUPPORTED) - { - if (p_loc_speed->location_present && !mask.location) - { - flags |= LOC_SPEED_FLAG_LOCATION_PRESENT; - flags |= ((uint16_t)p_loc_speed->position_status <<7) & LOC_SPEED_FLAG_POSITION_STATUS; - len += uint32_encode(p_loc_speed->latitude, &p_encoded_buffer[len]); - len += uint32_encode(p_loc_speed->longitude, &p_encoded_buffer[len]); - } - } - - // Flags field - uint16_encode(flags, &p_encoded_buffer[0]); //lint !e534 "Ignoring return value of function" - - return len; -} - - -/**@brief Encode Location and Speed data packet 2 - * - * @param[in] p_lns Location and Navigation Service structure. - * @param[in] p_loc_speed Location and Speed data to be encoded. - * @param[out] p_encoded_buffer Pointer to buffer buffer where encoded data will be written. - * - * @return Size of encoded data. - * - */ -static uint8_t loc_speed_encode_packet2(ble_lns_t const * p_lns, - ble_lns_loc_speed_t const * p_loc_speed, - uint8_t * p_encoded_buffer) -{ - uint16_t flags = 0; - uint8_t len = 2; - - const ble_lncp_mask_t mask = ble_lncp_mask_get(&p_lns->ctrl_pt); - - flags = 0; - len = 2; - - // Elevation - if (p_lns->available_features & BLE_LNS_FEATURE_ELEVATION_SUPPORTED) - { - if (p_loc_speed->elevation_present && !mask.elevation) - { - const uint32_t elevation = ble_lncp_elevation_get(&p_lns->ctrl_pt); - - flags |= LOC_SPEED_FLAG_ELEVATION_PRESENT; - flags |= ((uint16_t) p_loc_speed->elevation_source << 10) & LOC_SPEED_FLAG_ELEVATION_SOURCE; - len += uint24_encode(elevation, &p_encoded_buffer[len]); - } - } - - // Heading - if (p_lns->available_features & BLE_LNS_FEATURE_HEADING_SUPPORTED) - { - if (p_loc_speed->heading_present && !mask.heading) - { - flags |= LOC_SPEED_FLAG_HEADING_PRESENT; - flags |= ((uint16_t) p_loc_speed->heading_source << 12) & LOC_SPEED_FLAG_HEADING_SOURCE; - len += uint16_encode(p_loc_speed->heading, &p_encoded_buffer[len]); - } - } - - // Rolling Time - if (p_lns->available_features & BLE_LNS_FEATURE_ROLLING_TIME_SUPPORTED) - { - if ((p_loc_speed->rolling_time_present && !mask.rolling_time)) - { - flags |= LOC_SPEED_FLAG_ROLLING_TIME_PRESENT; - p_encoded_buffer[len++] = p_loc_speed->rolling_time; - } - } - - // UTC Time - if (p_lns->available_features & BLE_LNS_FEATURE_UTC_TIME_SUPPORTED) - { - if ((p_loc_speed->utc_time_time_present && !mask.utc_time)) - { - flags |= LOC_SPEED_FLAG_UTC_TIME_PRESENT; - len += ble_date_time_encode(&p_loc_speed->utc_time, &p_encoded_buffer[len]); - } - } - // Flags field - uint16_encode(flags, &p_encoded_buffer[0]); //lint !e534 "Ignoring return value of function" - - return len; -} - - -/**@brief Encode Navigation data. - * - * @param[in] p_lns Location and Navigation Service structure. - * @param[in] p_navigation Navigation data to be encoded. - * @param[out] p_encoded_buffer Buffer where the encoded data will be written. - * - * @return Size of encoded data. - */ -static uint8_t navigation_encode(ble_lns_t const * p_lns, - ble_lns_navigation_t const * p_navigation, - uint8_t * p_encoded_buffer) -{ - uint16_t flags = 0; - uint8_t len = 2; - - // Bearing - len += uint16_encode(p_navigation->bearing, &p_encoded_buffer[len]); - - // Heading - len += uint16_encode(p_navigation->heading, &p_encoded_buffer[len]); - - // Remaining Distance - if (p_lns->available_features & BLE_LNS_FEATURE_REMAINING_DISTANCE_SUPPORTED) - { - if (p_navigation->remaining_dist_present) - { - flags |= NAV_FLAG_REMAINING_DIST_PRESENT; - p_encoded_buffer[len++] = ((p_navigation->remaining_distance >> 0) & 0xFF); - p_encoded_buffer[len++] = ((p_navigation->remaining_distance >> 8) & 0xFF); - p_encoded_buffer[len++] = ((p_navigation->remaining_distance >> 16) & 0xFF); - } - } - - // Remaining Vertical Distance - if (p_lns->available_features & BLE_LNS_FEATURE_REMAINING_VERT_DISTANCE_SUPPORTED) - { - if (p_navigation->remaining_vert_dist_present) - { - flags |= NAV_FLAG_REAMINGING_VERT_DIST_PRESESNT; - p_encoded_buffer[len++] = ((p_navigation->remaining_vert_distance >> 0) & 0xFF); - p_encoded_buffer[len++] = ((p_navigation->remaining_vert_distance >> 8) & 0xFF); - p_encoded_buffer[len++] = ((p_navigation->remaining_vert_distance >> 16) & 0xFF); - } - } - - // Estimated Time of Arrival - if (p_lns->available_features & BLE_LNS_FEATURE_EST_TIME_OF_ARRIVAL_SUPPORTED) - { - if (p_navigation->eta_present) - { - flags |= NAV_FLAG_ETA_PRESENT; - len += ble_date_time_encode(&p_navigation->eta, &p_encoded_buffer[len]); - } - } - - flags |= ((uint16_t)p_navigation->position_status <<3) & NAV_FLAG_POSITION_STATUS; - flags |= ((uint16_t)p_navigation->heading_source <<5) & NAV_FLAG_HEADING_SOURCE; - flags |= ((uint16_t)p_navigation->navigation_indicator_type<<6)& NAV_FLAG_NAVIGATION_INDICATOR_TYPE; - flags |= ((uint16_t)p_navigation->waypoint_reached <<7)& NAV_FLAG_WAYPOINT_REACHED; - flags |= ((uint16_t)p_navigation->destination_reached <<8)& NAV_FLAG_DESTINATION_REACHED; - - // Flags field - uint16_encode(flags, &p_encoded_buffer[0]); //lint !e534 "Ignoring return value of function" - - return len; -} - - -/**@brief Add Location and Navigation Feature characteristic. - * - * @param[in] p_lns Location and Navigation Service structure. - * @param[in] p_lns_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static ret_code_t loc_and_nav_feature_char_add(ble_lns_t * p_lns, ble_lns_init_t const * p_lns_init) -{ - uint8_t init_value_encoded[sizeof(uint32_t)]; - uint8_t len; - ble_add_char_params_t add_char_params; - - len = uint32_encode(p_lns_init->available_features, init_value_encoded); - - memset(&add_char_params, 0, sizeof(add_char_params)); - - add_char_params.uuid = BLE_UUID_LN_FEATURE_CHAR; - add_char_params.max_len = len; - add_char_params.init_len = len; - add_char_params.p_init_value = &init_value_encoded[0]; - add_char_params.char_props.read = true; - add_char_params.read_access = p_lns_init->loc_nav_feature_security_req_read_perm; - - return characteristic_add(p_lns->service_handle, - &add_char_params, - &p_lns->feature_handles); -} - - -/**@brief Add Location and Speed characteristic. - * - * @param[in] p_lns Location and Navigation Service structure. - * @param[in] p_lns_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static ret_code_t loc_speed_char_add(ble_lns_t * p_lns, ble_lns_init_t const * p_lns_init) -{ - uint8_t encoded_initial_loc_speed1[BLE_L2CAP_MTU_DEF ]; - uint8_t len; - ble_add_char_params_t add_char_params; - - len = loc_speed_encode_packet1(p_lns, p_lns_init->p_location_speed, &encoded_initial_loc_speed1[0]); - - memset(&add_char_params, 0, sizeof(add_char_params)); - - add_char_params.uuid = BLE_UUID_LN_LOCATION_AND_SPEED_CHAR; - add_char_params.max_len = BLE_L2CAP_MTU_DEF ; - add_char_params.init_len = len; - add_char_params.p_init_value = &encoded_initial_loc_speed1[0]; - add_char_params.is_var_len = true; - add_char_params.char_props.notify = true; - add_char_params.cccd_write_access = p_lns_init->loc_speed_security_req_cccd_write_perm; - - return characteristic_add(p_lns->service_handle, - &add_char_params, - &p_lns->loc_speed_handles); -} - - -/**@brief Add Location and Navigation position quality characteristic. - * - * @param[in] p_lns Location and Navigation Service structure. - * @param[in] p_lns_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static ret_code_t pos_quality_char_add(ble_lns_t * p_lns, ble_lns_init_t const * p_lns_init) -{ - uint8_t len; - uint8_t init_value_encoded[BLE_L2CAP_MTU_DEF]; - ble_add_char_params_t add_char_params; - - len = pos_qual_encode(p_lns, p_lns_init->p_position_quality, init_value_encoded); - - memset(&add_char_params, 0, sizeof(add_char_params)); - - add_char_params.uuid = BLE_UUID_LN_POSITION_QUALITY_CHAR; - add_char_params.max_len = BLE_L2CAP_MTU_DEF ; - add_char_params.init_len = len; - add_char_params.p_init_value = init_value_encoded; - add_char_params.char_props.read = true; - add_char_params.read_access = p_lns_init->position_quality_security_req_read_perm; - - return characteristic_add(p_lns->service_handle, - &add_char_params, - &p_lns->pos_qual_handles); -} - - -/**@brief Add Navigation characteristic. - * - * @param[in] p_lns Location and Navigation Service structure. - * @param[in] p_lns_init Information needed to initialize the service. - * - * @return NRF_SUCCESS on success, otherwise an error code. - */ -static ret_code_t navigation_char_add(ble_lns_t * p_lns, ble_lns_init_t const * p_lns_init) -{ - ble_add_char_params_t add_char_params; - - memset(&add_char_params, 0, sizeof(add_char_params)); - - add_char_params.uuid = BLE_UUID_LN_NAVIGATION_CHAR; - add_char_params.max_len = BLE_LNS_NAV_MAX_LEN; - add_char_params.init_len = 0; - add_char_params.p_init_value = NULL; - add_char_params.char_props.notify = true; - add_char_params.cccd_write_access = p_lns_init->navigation_security_req_cccd_write_perm; - - return characteristic_add(p_lns->service_handle, - &add_char_params, - &p_lns->navigation_handles); -} - - -/** @brief Check if there is a mismatch in initialization parameters. - * - * @details It is possible to give an input which has an internal mismatch. Such a mismatch can arise in two different ways. - * One possibility is a mismatch between the characteristic present indicators and the available features specified. - * The other mismatch arises when no pointer to the characteristic data structure is specified. - * - * @param[in] p_lns_init The init structure which will be checked - * - * @return false if there is no mismatch. true if there is a mismatch - */ -static bool init_param_mismatch_present(ble_lns_init_t const * p_lns_init) -{ - if (p_lns_init->is_position_quality_present == false) - { - if (p_lns_init->available_features & - (BLE_LNS_FEATURE_NUM_SATS_IN_SOLUTION_SUPPORTED | - BLE_LNS_FEATURE_NUM_SATS_IN_VIEW_SUPPORTED | - BLE_LNS_FEATURE_TIME_TO_FIRST_FIX_SUPPORTED | - BLE_LNS_FEATURE_EST_HORZ_POS_ERROR_SUPPORTED | - BLE_LNS_FEATURE_EST_VERT_POS_ERROR_SUPPORTED | - BLE_LNS_FEATURE_HORZ_DILUTION_OF_PRECISION_SUPPORTED | - BLE_LNS_FEATURE_VERT_DILUTION_OF_PRECISION_SUPPORTED) - ) - { - return true; - } - if (p_lns_init->p_position_quality != NULL) - { - return true; - } - } - else if (p_lns_init->is_position_quality_present == true) - { - if (p_lns_init->p_position_quality == NULL) - { - return true; - } - } - - if (p_lns_init->is_control_point_present == false) - { - if (p_lns_init->available_features & - (BLE_LNS_FEATURE_LOC_AND_SPEED_CONTENT_MASKING_SUPPORTED | - BLE_LNS_FEATURE_FIX_RATE_SETTING_SUPPORTED | - BLE_LNS_FEATURE_ELEVATION_SETTING_SUPPORTED) - ) - { - return true; - } - } - - if (p_lns_init->is_navigation_present == false) - { - if (p_lns_init->available_features & - (BLE_LNS_FEATURE_REMAINING_DISTANCE_SUPPORTED | - BLE_LNS_FEATURE_REMAINING_VERT_DISTANCE_SUPPORTED | - BLE_LNS_FEATURE_EST_TIME_OF_ARRIVAL_SUPPORTED) - ) - { - return true; - } - if (p_lns_init->p_navigation != NULL) - { - return true; - } - } - else if (p_lns_init->is_navigation_present == true) - { - if (p_lns_init->p_navigation == NULL) - { - return true; - } - } - - // location and speed must always be specified - if (p_lns_init->p_location_speed == NULL) - { - return true; - } - - return false; -} - - -void ble_lns_on_ble_evt(ble_lns_t * p_lns, ble_evt_t const * p_ble_evt) -{ - VERIFY_PARAM_NOT_NULL_VOID(p_lns); - VERIFY_PARAM_NOT_NULL_VOID(p_ble_evt); - - ble_lncp_on_ble_evt(&p_lns->ctrl_pt, p_ble_evt); - - switch (p_ble_evt->header.evt_id) - { - case BLE_GAP_EVT_CONNECTED: - on_connect(p_lns, p_ble_evt); - break; - - case BLE_GAP_EVT_DISCONNECTED: - on_disconnect(p_lns, p_ble_evt); - break; - - case BLE_GATTS_EVT_WRITE: - on_write(p_lns, p_ble_evt); - break; - - case BLE_EVT_TX_COMPLETE: - on_tx_complete(p_lns); - break; - - default: - // no implementation - break; - } -} - - -ret_code_t ble_lns_init(ble_lns_t * p_lns, ble_lns_init_t const * p_lns_init) -{ - VERIFY_PARAM_NOT_NULL(p_lns); - VERIFY_PARAM_NOT_NULL(p_lns_init); - - if (init_param_mismatch_present(p_lns_init) == true) - { - return NRF_ERROR_INVALID_PARAM; - } - - uint32_t err_code; - ble_uuid_t service_uuid; - ble_lncp_init_t lncp_init; - - // Initialize service structure - p_lns->evt_handler = p_lns_init->evt_handler; - p_lns->error_handler = p_lns_init->error_handler; - p_lns->conn_handle = BLE_CONN_HANDLE_INVALID; - p_lns->available_features = p_lns_init->available_features; - p_lns->is_navigation_present = p_lns_init->is_navigation_present; - - // clear pending notifications - p_lns->pending_loc_speed_notifications[0].is_pending = false; - p_lns->pending_loc_speed_notifications[1].is_pending = false; - p_lns->pending_navigation_notification.is_pending = false; - - p_lns->p_location_speed = p_lns_init->p_location_speed; - p_lns->p_position_quality = p_lns_init->p_position_quality; - p_lns->p_navigation = p_lns_init->p_navigation; - - p_lns->is_loc_speed_notification_enabled = false; - p_lns->is_nav_notification_enabled = false; - - ble_ln_db_init(); - - // Add service - BLE_UUID_BLE_ASSIGN(service_uuid, BLE_UUID_LOCATION_AND_NAVIGATION_SERVICE); - - err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &service_uuid, &p_lns->service_handle); - VERIFY_SUCCESS(err_code); - - // Add location and navigation feature characteristic - err_code = loc_and_nav_feature_char_add(p_lns, p_lns_init); - VERIFY_SUCCESS(err_code); - - // Add location and speed characteristic - err_code = loc_speed_char_add(p_lns, p_lns_init); - VERIFY_SUCCESS(err_code); - - if (p_lns_init->is_position_quality_present) - { - // Add Position quality characteristic - err_code = pos_quality_char_add(p_lns, p_lns_init); - VERIFY_SUCCESS(err_code); - } - else - { - p_lns->pos_qual_handles.cccd_handle = BLE_GATT_HANDLE_INVALID; - p_lns->pos_qual_handles.sccd_handle = BLE_GATT_HANDLE_INVALID; - p_lns->pos_qual_handles.user_desc_handle = BLE_GATT_HANDLE_INVALID; - p_lns->pos_qual_handles.value_handle = BLE_GATT_HANDLE_INVALID; - } - - if (p_lns_init->is_navigation_present) - { - // Add navigation characteristic - err_code = navigation_char_add(p_lns, p_lns_init); - VERIFY_SUCCESS(err_code); - } - else - { - p_lns->navigation_handles.cccd_handle = BLE_GATT_HANDLE_INVALID; - p_lns->navigation_handles.sccd_handle = BLE_GATT_HANDLE_INVALID; - p_lns->navigation_handles.user_desc_handle = BLE_GATT_HANDLE_INVALID; - p_lns->navigation_handles.value_handle = BLE_GATT_HANDLE_INVALID; - } - - if (p_lns_init->is_control_point_present) - { - lncp_init.error_handler = p_lns_init->error_handler; - lncp_init.evt_handler = p_lns_init->lncp_evt_handler; - lncp_init.write_perm = p_lns_init->ctrl_point_security_req_write_perm; - lncp_init.cccd_write_perm = p_lns_init->ctrl_point_security_req_cccd_write_perm; - lncp_init.available_features = p_lns_init->available_features; - lncp_init.is_position_quality_present = p_lns_init->is_position_quality_present; - lncp_init.is_navigation_present = p_lns_init->is_navigation_present; - - lncp_init.total_distance = p_lns_init->p_location_speed->total_distance; - lncp_init.elevation = p_lns_init->p_location_speed->elevation; - - lncp_init.service_handle = p_lns->service_handle; - lncp_init.navigation_handles = p_lns->navigation_handles; - - // Add control pointer characteristic - err_code = ble_lncp_init(&p_lns->ctrl_pt, &lncp_init); - VERIFY_SUCCESS(err_code); - - memcpy(&p_lns->ctrlpt_handles, &p_lns->ctrl_pt.ctrlpt_handles, sizeof(ble_gatts_char_handles_t)); - } - - LNS_LOG("Initialized\n"); - - return NRF_SUCCESS; -} - - -ret_code_t ble_lns_loc_speed_send(ble_lns_t * p_lns) -{ - VERIFY_PARAM_NOT_NULL(p_lns); - - if (p_lns->conn_handle == BLE_CONN_HANDLE_INVALID) - { - return NRF_ERROR_INVALID_STATE; - } - - if (!p_lns->is_loc_speed_notification_enabled) - { - return NRF_ERROR_INVALID_STATE; - } - - notification_t * notif1 = &p_lns->pending_loc_speed_notifications[0]; - notification_t * notif2 = &p_lns->pending_loc_speed_notifications[1]; - - // clear previous unsent data. Previous data is invalid. - notif1->is_pending = false; - notif2->is_pending = false; - - // check if it is necessary to send packet 1 - if (p_lns->available_features & (BLE_LNS_FEATURE_INSTANT_SPEED_SUPPORTED - | BLE_LNS_FEATURE_TOTAL_DISTANCE_SUPPORTED - | BLE_LNS_FEATURE_LOCATION_SUPPORTED)) - { - // encode - notif1->len = loc_speed_encode_packet1(p_lns, p_lns->p_location_speed, ¬if1->data[0]); - notif1->handle = p_lns->loc_speed_handles.value_handle; - notif1->is_pending = true; - - // send - notification_buffer_process(p_lns); - } - - // check if it is necessary to send packet 2 - if (p_lns->available_features & (BLE_LNS_FEATURE_ELEVATION_SUPPORTED - | BLE_LNS_FEATURE_HEADING_SUPPORTED - | BLE_LNS_FEATURE_ROLLING_TIME_SUPPORTED - | BLE_LNS_FEATURE_UTC_TIME_SUPPORTED)) - { - notif2->len = loc_speed_encode_packet2(p_lns, p_lns->p_location_speed, ¬if2->data[0]); - notif2->handle = p_lns->loc_speed_handles.value_handle; - notif2->is_pending = true; - - // send - notification_buffer_process(p_lns); - } - - return NRF_SUCCESS; -} - - -ret_code_t ble_lns_navigation_send(ble_lns_t * p_lns) -{ - VERIFY_PARAM_NOT_NULL(p_lns); - - if (p_lns->conn_handle == BLE_CONN_HANDLE_INVALID) - { - return NRF_ERROR_INVALID_STATE; - } - - notification_t * notif = &p_lns->pending_navigation_notification; - - // clear previous unsent data. Previous data is invalid. - notif->is_pending = false; - - if (!p_lns->is_navigation_present) - { - return NRF_ERROR_NOT_SUPPORTED; - } - - if (!p_lns->is_nav_notification_enabled) - { - return NRF_ERROR_INVALID_STATE; - } - - if (!ble_lncp_is_navigation_running(&p_lns->ctrl_pt)) - { - return NRF_ERROR_INVALID_STATE; - } - - notif->len = navigation_encode(p_lns, p_lns->p_navigation, ¬if->data[0]); - notif->handle = p_lns->navigation_handles.value_handle; - notif->is_pending = true; - - notification_buffer_process(p_lns); - - return NRF_SUCCESS; -} - - -ret_code_t ble_lns_add_route(ble_lns_t * p_lns, ble_lns_route_t * p_route) -{ - VERIFY_PARAM_NOT_NULL(p_lns); - VERIFY_PARAM_NOT_NULL(p_route); - - if (p_lns->is_navigation_present == false) - { - return NRF_ERROR_NOT_SUPPORTED; - } - - return ble_ln_db_record_add(p_route); -} - - -ret_code_t ble_lns_remove_route(ble_lns_t * p_lns, uint16_t route_id) -{ - VERIFY_PARAM_NOT_NULL(p_lns); - - if (p_lns->is_navigation_present == false) - { - return NRF_ERROR_NOT_SUPPORTED; - } - - return ble_ln_db_record_delete(route_id); -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_lns.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_lns.h deleted file mode 100644 index 1810d37299..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/experimental_ble_lns/ble_lns.h +++ /dev/null @@ -1,328 +0,0 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -/** @file - * - * @defgroup ble_sdk_srv_lns Location and Navigation Service - * @{ - * @ingroup ble_sdk_srv - * @brief Location and Navigation Service module. - * - * @details This module implements the Location and Navigation Service with the Location and Speed, Position - * Quality, Feature, Control Point, and Navigation characteristics. - * - * If an event handler is supplied by the application, the Location and Navigation Service will - * generate Location and Navigation Service events to the application. - * - * @note The application must propagate BLE stack events to the Location and Navigation Service module by calling - * @ref ble_lns_on_ble_evt() from the from the ble_stack_handler callback. - */ - -#ifndef BLE_LNS_H__ -#define BLE_LNS_H__ - -#include "ble_srv_common.h" -#include "ble_date_time.h" -#include "ble_ln_common.h" -#include "ble_ln_cp.h" -#include "sdk_common.h" - -/** @brief Location and Navigation event type. This list defines the possible events types from the Location and Navigation Service. */ -typedef enum { - BLE_LNS_CTRLPT_EVT_INDICATION_ENABLED, /**< Control Point value indication was enabled. */ - BLE_LNS_CTRLPT_EVT_INDICATION_DISABLED, /**< Control Point value indication was disabled. */ - BLE_LNS_LOC_SPEED_EVT_NOTIFICATION_ENABLED, /**< Location and Speed value notification was enabled. */ - BLE_LNS_LOC_SPEED_EVT_NOTIFICATION_DISABLED, /**< Location and Speed value notification was disabled. */ - BLE_LNS_NAVIGATION_EVT_NOTIFICATION_ENABLED, /**< Navigation value notification was enabled. */ - BLE_LNS_NAVIGATION_EVT_NOTIFICATION_DISABLED, /**< Navigation value notification was disabled. */ -} ble_lns_evt_type_t; - -/** @brief Location and Navigation event structure. When an event occurs, the data structures of the module are automatically updated. */ -typedef struct { - ble_lns_evt_type_t evt_type; -} ble_lns_evt_t; - -// Forward declarations of the ble_lns types. -typedef struct ble_lns_init_s ble_lns_init_t; -typedef struct ble_lns_s ble_lns_t; -typedef struct ble_lns_loc_speed_s ble_lns_loc_speed_t; -typedef struct ble_lns_pos_quality_s ble_lns_pos_quality_t; -typedef struct ble_lns_navigation_s ble_lns_navigation_t; - - -typedef struct { - bool is_pending; - uint16_t handle; - uint16_t len; - uint8_t data[GATT_MTU_SIZE_DEFAULT]; -} notification_t; - - -/**@brief Location and Navigation Service event handler type. */ -typedef void (*ble_lns_evt_handler_t) (ble_lns_t const * p_lns, ble_lns_evt_t const * p_evt); - - -/**@brief Location and Navigation Service init structure. This structure contains all options and data needed to - * initialize the service. */ -struct ble_lns_init_s -{ - ble_lns_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Location and Navigation Service. */ - ble_lncp_evt_handler_t lncp_evt_handler; - ble_srv_error_handler_t error_handler; /**< Errors will be sent back to this function. */ - - bool is_position_quality_present; /**< If set to true, the position quality characteristic will be added. Else not. */ - bool is_control_point_present; /**< If set to true, the control point characteristic will be added. Else not. */ - bool is_navigation_present; /**< If set to true, the navigation characteristic will be added. Else not. */ - - security_req_t loc_nav_feature_security_req_read_perm; /**< Read security level of the LN Feature characteristic. */ - security_req_t loc_speed_security_req_cccd_write_perm; /**< CCCD write security level of the Write Location and Speed characteristic. */ - security_req_t position_quality_security_req_read_perm; /**< Read security level of the Position Quality characteristic. */ - security_req_t navigation_security_req_cccd_write_perm; /**< CCCD write security level of the Navigation characteristic. */ - security_req_t ctrl_point_security_req_write_perm; /**< Read security level of the LN Control Point characteristic. */ - security_req_t ctrl_point_security_req_cccd_write_perm; /**< CCCD write security level of the LN Control Point characteristic. */ - - uint32_t available_features; /**< Value of the LN feature. */ - ble_lns_loc_speed_t * p_location_speed; /**< Initial Location and Speed. */ - ble_lns_pos_quality_t * p_position_quality; /**< Initial Position Quality. */ - ble_lns_navigation_t * p_navigation; /**< Initial Navigation data structure. */ -}; - - -/**@brief Definition of a navigation route.*/ -typedef struct -{ - uint16_t route_id; - uint8_t route_name[BLE_LNS_MAX_ROUTE_NAME_LEN]; -} ble_lns_route_t; - - -/**@brief Location and Navigation Service structure. This structure contains various status information for the service. */ -struct ble_lns_s -{ - ble_lns_evt_handler_t evt_handler; /**< Event handler to be called for handling events in the Location and Navigation Service. */ - ble_srv_error_handler_t error_handler; /**< Error handler. */ - - bool is_navigation_present; /**< If set to true, the navigation characteristic is present. Else not. */ - - uint16_t conn_handle; /**< Handle of the current connection (as provided by the BLE stack; BLE_CONN_HANDLE_INVALID if not in a connection). */ - uint16_t service_handle; /**< Handle of Location and Navigation Service (as provided by the BLE stack). */ - ble_gatts_char_handles_t loc_speed_handles; /**< Handles related to the Location and Speed characteristic. */ - ble_gatts_char_handles_t feature_handles; /**< Handles related to the Location and Navigation Feature characteristic. */ - ble_gatts_char_handles_t navigation_handles; /**< Handles related to the Navigation characteristic. */ - ble_gatts_char_handles_t pos_qual_handles; /**< Handles related to the Position Quality characteristic. */ - ble_gatts_char_handles_t ctrlpt_handles; - uint32_t available_features; /**< Value of Location and Navigation feature. */ - - bool is_loc_speed_notification_enabled; /**< True if notification is enabled on the Location and Speed characteristic. */ - bool is_nav_notification_enabled; /**< True if notification is enabled on the Navigation characteristic. */ - - notification_t pending_loc_speed_notifications[2]; /**< This buffer holds location and speed notifications. */ - notification_t pending_navigation_notification; /**< This buffer holds navigation notifications. */ - ble_lns_loc_speed_t * p_location_speed; /**< Location and Speed. */ - ble_lns_pos_quality_t * p_position_quality; /**< Position measurement quality. */ - ble_lns_navigation_t * p_navigation; /**< Navigation data structure. */ - ble_lncp_t ctrl_pt; -}; - - -/** @brief Position status. This enumeration defines how to interpret the position data. */ -typedef enum -{ - BLE_LNS_NO_POSITION = 0, - BLE_LNS_POSITION_OK = 1, - BLE_LNS_ESTIMATED = 2, - BLE_LNS_LAST_KNOWN_POSITION = 3 -} ble_lns_pos_status_type_t; - - -/** @brief The format of the position and speed measurements. */ -typedef enum -{ - BLE_LNS_SPEED_DISTANCE_FORMAT_2D = 0, - BLE_LNS_SPEED_DISTANCE_FORMAT_3D = 1 -} ble_lns_speed_distance_format_t; - - -/** @brief Elevation source. */ -typedef enum -{ - BLE_LNS_ELEV_SOURCE_POSITIONING_SYSTEM = 0, - BLE_LNS_ELEV_SOURCE_BAROMETRIC = 1, - BLE_LNS_ELEV_SOURCE_DATABASE_SERVICE = 2, - BLE_LNS_ELEV_SOURCE_OTHER = 3 -} ble_lns_elevation_source_t; - - -/** @brief Heading source. */ -typedef enum -{ - BLE_LNS_HEADING_SOURCE_MOVEMENT = 0, - BLE_LNS_HEADING_SOURCE_COMPASS = 1 -} ble_lns_heading_source_t; - - -/**@brief Location and Speed data structure. */ -struct ble_lns_loc_speed_s -{ - bool instant_speed_present; /**< Instantaneous Speed present (0=not present, 1=present). */ - bool total_distance_present; /**< Total Distance present (0=not present, 1=present). */ - bool location_present; /**< Location present (0=not present, 1=present). */ - bool elevation_present; /**< Elevation present (0=not present, 1=present). */ - bool heading_present; /**< Heading present (0=not present, 1=present). */ - bool rolling_time_present; /**< Rolling Time present (0=not present, 1=present). */ - bool utc_time_time_present; /**< UTC Time present (0=not present, 1=present). */ - ble_lns_pos_status_type_t position_status; /**< Status of current position */ - ble_lns_speed_distance_format_t data_format; /**< Format of data (either 2D or 3D). */ - ble_lns_elevation_source_t elevation_source; /**< Source of the elevation measurement. */ - ble_lns_heading_source_t heading_source; /**< Source of the heading measurement. */ - uint16_t instant_speed; /**< Instantaneous Speed (1/10 meter per sec). */ - uint32_t total_distance; /**< Total Distance (meters), size=24 bits. */ - int32_t latitude; /**< Latitude (10e-7 degrees). */ - int32_t longitude; /**< Longitude (10e-7 degrees). */ - int32_t elevation; /**< Elevation (1/100 meters), size=24 bits. */ - uint16_t heading; /**< Heading (1/100 degrees). */ - uint8_t rolling_time; /**< Rolling Time (seconds). */ - ble_date_time_t utc_time; /**< UTC Time. */ -}; - - -/** @brief Position quality structure. */ -struct ble_lns_pos_quality_s -{ - bool number_of_satellites_in_solution_present; /**< The number of satellites present in solution (0=not present, 1=present). */ - bool number_of_satellites_in_view_present; /**< The number of satellites present in solution (0=not present, 1=present). */ - bool time_to_first_fix_present; /**< Time to the first position fix present (0=not present, 1=present). */ - bool ehpe_present; /**< Error in horizontal position estimate present (0=not present, 1=present). */ - bool evpe_present; /**< Error in vertical position estimate present (0=not present, 1=present). */ - bool hdop_present; /**< Horizontal dilution of precision present (0=not present, 1=present). */ - bool vdop_present; /**< Vertical dilution of precision present (0=not present, 1=present). */ - ble_lns_pos_status_type_t position_status; /**< Status of last measured position. */ - uint8_t number_of_satellites_in_solution; /**< The number of satellites in solution (unitless, with a resolution of 1). */ - uint8_t number_of_satellites_in_view; /**< The number of satellites in view (unitless, with a resolution of 1). */ - uint16_t time_to_first_fix; /**< Time to the first position fix (seconds, with a resolution of 1/10). */ - uint32_t ehpe; /**< Error in horizontal position estimate (meters, with a resolution of 1/100). */ - uint32_t evpe; /**< Error in vertical position estimate (meters, with a resolution of 1/100). */ - uint8_t hdop; /**< Horizontal dilution of precision (unitless, with a resolution of 2/10). */ - uint8_t vdop; /**< Vertical dilution of precision (unitless, with a resolution of 2/10). */ -}; - - -/** @brief Navigation indicator type. */ -typedef enum -{ - BLE_LNS_NAV_TO_WAYPOINT = 0, - BLE_LNS_NAV_TO_DESTINATION = 1 -} ble_lns_nav_indicator_type_t; - - -/**@brief Navigation data structure. */ -struct ble_lns_navigation_s -{ - bool remaining_dist_present; /**< Remaining Distance present (0=not present, 1=present). */ - bool remaining_vert_dist_present; /**< Remaining Vertical Distance present (0=not present, 1=present). */ - bool eta_present; /**< Estimated Time of Arrival present (0=not present, 1=present). */ - ble_lns_pos_status_type_t position_status; /**< Status of last measured position. */ - ble_lns_heading_source_t heading_source; /**< Source of the heading measurement. */ - ble_lns_nav_indicator_type_t navigation_indicator_type; /**< Navigation indicator type. */ - bool waypoint_reached; /**< Waypoint Reached (0=not reached, 1=reached). */ - bool destination_reached; /**< Destination Reached (0=not reached, 1=reached). */ - uint16_t bearing; /**< Bearing (1/100 degrees).*/ - uint16_t heading; /**< Heading (1/100 degrees), size=24 bit. */ - uint32_t remaining_distance; /**< Remaining Distance (1/10 meters), size=24 bit. */ - int32_t remaining_vert_distance; /**< Remaining Vertical Distance (1/100 meters), size=24 bit. */ - ble_date_time_t eta; /**< Estimated Time of Arrival. */ -}; - - -/**@brief Function for initializing the Location and Navigation Service. - * - * @param[out] p_lns Location and Navigation Service structure. This structure must be supplied by - * the application. It is initialized by this function, and will later - * be used to identify this particular service instance. - * @param[in] p_lns_init Information needed to initialize the service. - * - * @retval NRF_SUCCESS If the service was initialized successfully. - * @retval NRF_ERROR_NULL If a NULL parameter was provided. - * @retval NRF_INVALID_PARAMS If there is an inconsistency in the initialization structure. - * @return Otherwise, an error code from either sd_ble_gatts_service_add() or sd_ble_gatts_characteristic_add() is returned. - */ -ret_code_t ble_lns_init(ble_lns_t * p_lns, const ble_lns_init_t * p_lns_init); - -/**@brief Function for handling Location and Navigation Service BLE stack events. - * - * @details This function handles all events from the BLE stack that are of interest to the Location and Navigation Service. - * - * @note The function returns when a NULL parameter is provided. - * - * @param[in] p_lns Location and Navigation Service structure. - * @param[in] p_ble_evt Event received from the BLE stack. - * - */ -void ble_lns_on_ble_evt(ble_lns_t * p_lns, ble_evt_t const * p_ble_evt); - -/**@brief Function for sending location and speed data if notification has been enabled. - * - * @details The application calls this function after having performed a location and speed determination. - * If notification has been enabled, the location and speed data is encoded and sent to - * the client. - * - * @param[in] p_lns Location and Navigation Service structure holding the location and speed data. - * - * @retval NRF_SUCCESS If the data was sent successfully. - * @retval NRF_ERROR_NULL If a NULL parameter was provided. - * @retval NRF_ERROR_INVALID_STATE If notification is disabled. - */ -ret_code_t ble_lns_loc_speed_send(ble_lns_t * p_lns); - -/**@brief Function for sending navigation data if notification has been enabled. - * - * @details The application calls this function after having performed a navigation determination. - * If notification has been enabled, the navigation data is encoded and sent to - * the client. - * - * @param[in] p_lns Location and Navigation Service structure holding the navigation data. - * - * @retval NRF_SUCCESS If the data was sent successfully. - * @retval NRF_ERROR_NULL If a NULL parameter was provided. - * @retval NRF_ERROR_NOT_SUPPORTED If the navigation characteristic is absent. - * @retval NRF_ERROR_INVALID_STATE If navigation is not running or notification is disabled. - */ -ret_code_t ble_lns_navigation_send(ble_lns_t * p_lns); - -/**@brief Function for adding a route to the Location and Navigation Service. - * - * @param[in] p_lns Location and Navigation Service structure. - * @param[in,out] p_route The new route to be added. The route ID is updated. - * - * @retval NRF_SUCCESS If the route was added successfully. - * @retval NRF_ERROR_NULL If a NULL parameter was provided. - * @retval NRF_ERROR_NOT_SUPPORTED If the navigation characteristic is absent. - * @retval NRF_ERROR_NO_MEM If there is no memory left. - * @retval NRF_ERROR_INTERNAL If there is an inconsistency in the routes table. - */ -ret_code_t ble_lns_add_route(ble_lns_t * p_lns, ble_lns_route_t * p_route); - -/**@brief Function for removing a route from the Location and Navigation Service. - * - * @param[in] p_lns Location and Navigation Service structure. - * @param[in] route_id The ID of the route to be removed. - * - * @retval NRF_SUCCESS If the route was removed successfully. - * @retval NRF_ERROR_NULL If a NULL parameter was provided. - * @retval NRF_ERROR_NOT_SUPPORTED If the navigation characteristic is absent. - * @retval NRF_INVALID_PARAM If the route ID does not exist. - */ -ret_code_t ble_lns_remove_route(ble_lns_t * p_lns, uint16_t route_id); - -#endif // BLE_LNS_H__ - -/** @} */ From 10c803ee3b5c92c55aebe89e84784dc71436edba Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Fri, 17 Jun 2016 11:19:05 +0100 Subject: [PATCH 19/67] Add LF clock initialization in startup sequence. --- .../TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c | 8 ++++++++ .../TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.c | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c index 3414e5b38d..9130f7e600 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c @@ -94,6 +94,14 @@ void SystemInit(void) } *(uint32_t volatile *)0x4006EC14 = 0xC0; } + + NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos); + NRF_CLOCK->EVENTS_LFCLKSTARTED = 0; + NRF_CLOCK->TASKS_LFCLKSTART = 1; + + while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0) { + // wait for the low frequency clock start + } } diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.c b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.c index 72e067cad7..4ec4f62eaa 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.c +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.c @@ -187,6 +187,15 @@ void SystemInit(void) #endif SystemCoreClockUpdate(); + + NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos); + NRF_CLOCK->EVENTS_LFCLKSTARTED = 0; + NRF_CLOCK->TASKS_LFCLKSTART = 1; + + while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0) { + // wait for the low frequency clock start + } + } From 96b260446911a138aa1d37d75649c0b913aa0802 Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Fri, 17 Jun 2016 11:20:01 +0100 Subject: [PATCH 20/67] Remove obsolete softdevices. --- .../s110_nrf51822_8.0.0_licence_agreement.txt | 90 - .../s110_nrf51822_8.0.0_softdevice.hex | 5649 -------------- .../s130_nrf51_1.0.0_licence_agreement.txt | 90 - .../s130_nrf51_1.0.0_softdevice.hex | 6861 ---------------- .../s132_nrf52_2.0.0_softdevice.hex | 6918 ----------------- 5 files changed, 19608 deletions(-) delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s110_nrf51822_8_0_0/s110_nrf51822_8.0.0_licence_agreement.txt delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s110_nrf51822_8_0_0/s110_nrf51822_8.0.0_softdevice.hex delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_licence_agreement.txt delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_softdevice.hex delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/Lib/s132_nrf52_2_0_0/s132_nrf52_2.0.0_softdevice.hex diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s110_nrf51822_8_0_0/s110_nrf51822_8.0.0_licence_agreement.txt b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s110_nrf51822_8_0_0/s110_nrf51822_8.0.0_licence_agreement.txt deleted file mode 100644 index b01ccf590e..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s110_nrf51822_8_0_0/s110_nrf51822_8.0.0_licence_agreement.txt +++ /dev/null @@ -1,90 +0,0 @@ -S110/S120/S130 license agreement - -NORDIC SEMICONDUCTOR ASA SOFTDEVICE LICENSE AGREEMENT - -License Agreement for the Nordic Semiconductor ASA ("Nordic") S110, S120 and S130 Bluetooth SoftDevice software packages ("SoftDevice"). -You ("You" "Licensee") must carefully and thoroughly read this License Agreement ("Agreement"), and accept to adhere to this Agreement before -downloading, installing and/or using any software or content in the SoftDevice provided herewith. - -YOU ACCEPT THIS LICENSE AGREEMENT BY (A) CLICKING ACCEPT OR AGREE TO THIS LICENSE AGREEMENT, WHERE THIS -OPTION IS MADE AVAILABLE TO YOU; OR (B) BY ACTUALLY USING THE SOFTDEVICE, IN THIS CASE YOU AGREE THAT THE USE OF -THE SOFTDEVICE CONSTITUTES ACCEPTANCE OF THE LICENSING AGREEMENT FROM THAT POINT ONWARDS. - -IF YOU DO NOT AGREE TO BE BOUND BY THE TERMS OF THIS AGREEMENT, THEN DO NOT DOWNLOAD, INSTALL/COMPLETE -INSTALLATION OF, OR IN ANY OTHER WAY MAKE USE OF THE SOFTDEVICE. - -1. Grant of License -Subject to the terms in this Agreement Nordic grants Licensee a limited, non-exclusive, non-transferable, non-sub licensable, revocable license -("License"): (a) to use the SoftDevice solely in connection with a Nordic integrated circuit, and (b) to distribute the SoftDevice solely as integrated -in Licensee Product. Licensee shall not use the SoftDevice for any purpose other than specifically authorized herein. It is a material breach of this -agreement to use or modify the SoftDevice for use on any wireless connectivity integrated circuit other than a Nordic integrated circuit. - -2. Title -Nordic retains full rights, title, and ownership to the SoftDevice and any and all patents, copyrights, trade secrets, trade names, trademarks, and -other intellectual property rights in and to the SoftDevice. - -3. No Modifications or Reverse Engineering -Licensee shall not, modify, reverse engineer, disassemble, decompile or otherwise attempt to discover the source code of any non-source code -parts of the SoftDevice including, but not limited to pre-compiled hex files, binaries and object code. - -4. Distribution Restrictions -Except as set forward in Section 1 above, the Licensee may not disclose or distribute any or all parts of the SoftDevice to any third party. -Licensee agrees to provide reasonable security precautions to prevent unauthorized access to or use of the SoftDevice as proscribed herein. -Licensee also agrees that use of and access to the SoftDevice will be strictly limited to the employees and subcontractors of the Licensee -necessary for the performance of development, verification and production tasks under this Agreement. The Licensee is responsible for making -such employees and subcontractors comply with the obligations concerning use and non-disclosure of the SoftDevice. - -5. No Other Rights -Licensee shall use the SoftDevice only in compliance with this Agreement and shall refrain from using the SoftDevice in any way that may be -contrary to this Agreement. - -6. Fees -Nordic grants the License to the Licensee free of charge provided that the Licensee undertakes the obligations in the Agreement and warrants to -comply with the Agreement. - -7. DISCLAIMER OF WARRANTY -THE SOFTDEVICE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EXPRESS OR IMPLIED AND NEITHER NORDIC, ITS -LICENSORS OR AFFILIATES NOR THE COPYRIGHT HOLDERS MAKE ANY REPRESENTATIONS OR WARRANTIES, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR -THAT THE SOFTDEVICE WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. THERE -IS NO WARRANTY BY NORDIC OR BY ANY OTHER PARTY THAT THE FUNCTIONS CONTAINED IN THE SOFTDEVICE WILL MEET THE -REQUIREMENTS OF LICENSEE OR THAT THE OPERATION OF THE SOFTDEVICE WILL BE UNINTERRUPTED OR ERROR-FREE. -LICENSEE ASSUMES ALL RESPONSIBILITY AND RISK FOR THE SELECTION OF THE SOFTDEVICE TO ACHIEVE LICENSEE’S -INTENDED RESULTS AND FOR THE INSTALLATION, USE AND RESULTS OBTAINED FROM IT. - -8. No Support -Nordic is not obligated to furnish or make available to Licensee any further information, software, technical information, know-how, show-how, -bug-fixes or support. Nordic reserves the right to make changes to the SoftDevice without further notice. - -9. Limitation of Liability -In no event shall Nordic, its employees or suppliers, licensors or affiliates be liable for any lost profits, revenue, sales, data or costs of -procurement of substitute goods or services, property damage, personal injury, interruption of business, loss of business information or for any -special, direct, indirect, incidental, economic, punitive, special or consequential damages, however caused and whether arising under contract, -tort, negligence, or other theory of liability arising out of the use of or inability to use the SoftDevice, even if Nordic or its employees or suppliers, -licensors or affiliates are advised of the possibility of such damages. Because some countries/states/jurisdictions do not allow the exclusion or -limitation of liability, but may allow liability to be limited, in such cases, Nordic, its employees or licensors or affiliates’ liability shall be limited to -USD 50. - -10. Breach of Contract -Upon a breach of contract by the Licensee, Nordic and its licensor are entitled to damages in respect of any direct loss which can be reasonably -attributed to the breach by the Licensee. If the Licensee has acted with gross negligence or willful misconduct, the Licensee shall cover both -direct and indirect costs for Nordic and its licensors. - -11. Indemnity -Licensee undertakes to indemnify, hold harmless and defend Nordic and its directors, officers, affiliates, shareholders, licensors, employees and -agents from and against any claims or lawsuits, including attorney's fees, that arise or result of the Licensee’s execution of the License and which -is not due to causes for which Nordic is responsible. - -12. Governing Law -This Agreement shall be construed according to the laws of Norway, and hereby submits to the exclusive jurisdiction of the Oslo tingrett. - -13. Assignment -Licensee shall not assign this Agreement or any rights or obligations hereunder without the prior written consent of Nordic. - -14. Termination -Without prejudice to any other rights, Nordic may cancel this Agreement if Licensee does not abide by the terms and conditions of this -Agreement. Upon termination Licensee must promptly cease the use of the License and destroy all copies of the Licensed Technology and any -other material provided by Nordic or its affiliate, or produced by the Licensee in connection with the Agreement or the Licensed Technology. - -15. Third party beneficiaries -Nordic’s licensors are intended third party beneficiaries under this Agreement. \ No newline at end of file diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s110_nrf51822_8_0_0/s110_nrf51822_8.0.0_softdevice.hex b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s110_nrf51822_8_0_0/s110_nrf51822_8.0.0_softdevice.hex deleted file mode 100644 index 7551e41c5b..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s110_nrf51822_8_0_0/s110_nrf51822_8.0.0_softdevice.hex +++ /dev/null @@ -1,5649 +0,0 @@ -:020000040000FA -:10000000C0070000D1060000D1000000B1060000CA -:1000100000000000000000000000000000000000E0 -:100020000000000000000000000000005107000078 -:100030000000000000000000DB000000E500000000 -:10004000EF000000F9000000030100000D010000B6 -:1000500017010000210100002B0100003501000004 -:100060003F01000049010000530100005D01000054 -:1000700067010000710100007B01000085010000A4 -:100080008F01000099010000A3010000AD010000F4 -:10009000B7010000C1010000CB010000D501000044 -:1000A000DF010000E9010000F3010000FD01000094 -:1000B00007020000110200001B02000025020000E0 -:1000C0001FB5C046C04600F0EFFA04B00FB41FBD24 -:1000D00008205A49096809580847382057490968CB -:1000E000095808473C2055490968095808474020E5 -:1000F0005249096809580847442050490968095875 -:10010000084748204D490968095808474C204B4981 -:10011000096809580847502048490968095808479C -:100120005420464909680958084758204349096836 -:10013000095808475C204149096809580847602068 -:100140003E4909680958084764203C49096809582C -:100150000847682039490968095808476C20374919 -:100160000968095808477020344909680958084740 -:100170007420324909680958084778202F490968CE -:10018000095808477C202D490968095808478020EC -:100190002A490968095808478420284909680958E4 -:1001A0000847882025490968095808478C202349B1 -:1001B00009680958084790202049096809580847E4 -:1001C00094201E4909680958084798201B49096866 -:1001D000095808479C201949096809580847A02070 -:1001E0001649096809580847A4201449096809589C -:1001F0000847A8201149096809580847AC200F4949 -:10020000096809580847B0200C4909680958084787 -:10021000B4200A49096809580847B82007490968FD -:1002200009580847BC2005490968095808470000D3 -:1002300003480449024A034B7047000000000020B5 -:10024000C0070000C00700000122D84B5A6000BF61 -:10025000D74A1268002AFBD0016000BFD44A126856 -:10026000002AFBD00022D14B5A6000BFD04A12684E -:10027000002AFBD07047F0B505460E46174600240D -:1002800006E0A200B158A2005019FFF7DDFF641C80 -:10029000BC42F6D30020F0BD0120C043C549086030 -:1002A000401048607047014601229204086890425D -:1002B00001D9102070470020FCE7F0B505460C4638 -:1002C0001646002706E028462168FFF7BDFF2D1DD2 -:1002D000241D7F1CB742F6D3F0BD70B505460C4611 -:1002E0002E460BE0304600F075F9FF2C01D80024B3 -:1002F00001E0FF3C013C012080023618002CF1D1C6 -:1003000070BD0146012292044868904201D909203B -:100310007047A9484069401C01D10F20F8E7002030 -:10032000F6E7FEB504462068030000F037FA05043E -:100330002B4249598B00201DFFF7E3FF0546002D96 -:1003400001D02846FEBDFFF7A7FF0120C00200F044 -:1003500041F9042221469948FFF78DFF002801D07A -:100360000320EFE708222146944800F06DF90028A9 -:1003700006D1002192480068FFF766FF00F00CF9F3 -:100380000320DFE7A768E6686068019031463846D9 -:10039000FFF7A3FF324638460199FFF78EFFB20000 -:1003A0003846019900F050F9002800D1CAE703202F -:1003B000C8E700F0E3F9834800688349086041E03A -:1003C00060680190E668A0680090B200009901980A -:1003D00000F03AF90746002F00D1B3E70E20B1E74D -:1003E000201DFFF760FF0546002D01D02846A9E734 -:1003F0006068002807D1FFF74FFF0320800200F05C -:10040000E9F800F0C9F8FFF747FF0120C00200F04B -:10041000E1F8042221466948FFF72DFF002801D0AA -:1004200003208FE708222146644800F00DF90028D8 -:1004300006D1002162480068FFF706FF00F0ACF823 -:1004400003207FE700BF00207CE770B505460C461F -:10045000182D04D12068FFF764FF206002E001201E -:10046000206000BF00BF70BDF0B589B05248406940 -:1004700003905248806881000398081802900398FE -:10048000000B01900121090302984018401E000B47 -:1004900000900124002520462946019A00F0C4F866 -:1004A0000022401E91410791069001260027304608 -:1004B0003946009A00F0B8F80022401E914105919B -:1004C0000490049BDB43059AD2430698184307998E -:1004D00011430791069037490698086007984860CD -:1004E00009B0F0BD70B53448446934488568466841 -:1004F000AA003146204600F0A7F8002801D00020CD -:1005000070BD0120FCE72D484068002801D0012083 -:1005100000E000200546FFF7E5FF002807D0FFF7C1 -:10052000BBFE0320800200F055F800F035F8FFF71D -:100530009BFF002D0ED020484669204884684768FC -:1005400021463046FFF7C9FE224639463046FFF7BE -:10055000B4FE00BF00F020F810B5184844681A48EF -:100560000460204600F0DCF810BD15480068006803 -:10057000401C01D100BFFEE710480068002802D0EF -:10058000042806D101E0FFF7BEFFFFF7E5FF00BF3B -:10059000FEE700BF00BFFEE7BFF34F8F0B480C49DB -:1005A000C860BFF34F8F00BFFEE7000000E50140C9 -:1005B00000E40140000600400010001000080000A8 -:1005C000B8070000BC070000000000200400FA0586 -:1005D00000ED00E010B50146104B1A6808460223F2 -:1005E0000F4C636000BF0F4B1B68002BFBD0531CEC -:1005F00004D0904202D20A4B186101E0084B986087 -:1006000000BF084B1B68002BFBD00023044C636029 -:1006100000BF044B1B68002BFBD010BD0010001066 -:1006200000E5014000E4014010B5202A04DB01464A -:10063000203A9140002010BD914020239C1A03468F -:10064000E3401943904010BD034610B50B439B0790 -:100650000FD1042A0DD308C810C9121FA342F8D025 -:1006600018BA21BA884201D9012010BD0020C04328 -:1006700010BD002A03D0D30703D0521C07E000208E -:1006800010BD03780C78401C491C1B1B07D1037854 -:100690000C78401C491C1B1B01D1921EF1D118463D -:1006A00010BD70477047704710B500F007F810BDD7 -:1006B000014B1B68DB6818470000002019481A49E5 -:1006C0007047FFF7FBFFFFF7FBFC00BD20BFFDE716 -:1006D0001649174C24688C420BD1164B1B68994263 -:1006E0000CD1154B154A1360186810498842EDD09B -:1006F0000AE0134880F30888124B18470F4A13602A -:1007000018680A498842E1D080F308880E49884277 -:1007100004DD0E48026802210A4302605B68184744 -:100720000346DFE7C0070000C0070000FFFFFFFF30 -:10073000000C000014100010001000000000002049 -:10074000000400206B05000000200020240500406C -:100750000D48704502D1EFF3098101E0EFF3088104 -:10076000886902380078182802D1C046074A104725 -:10077000074A12682C3212681047000000B5054B7A -:10078000054A9B58984700BDFDFFFFFF4B04000042 -:1007900000000020001000000400000030B4744687 -:1007A000641E2578641CAB4204D3635D5B00E318D0 -:1007B00030BC18471D46F8E7000C00000010000090 -:1010000000150020CD64010025220000336401009A -:1010100000000000000000000000000000000000D0 -:101020000000000000000000000000003D6501001D -:101030000000000000000000252200002522000022 -:10104000A9650100AF6501002522000025220000EE -:101050002522000025220000252200002522000074 -:10106000B56501002522000025220000BB650100B6 -:1010700025220000C1650100C7650100CD650100A2 -:101080002522000025220000252200002522000044 -:101090002522000025220000252200002522000034 -:1010A000D3650100D965010025220000252200003A -:1010B0002522000025220000252200002522000014 -:1010C00000F002F815F0E3F90CA030C80838241835 -:1010D0002D18A246671EAB4654465D46AC4201D170 -:1010E00015F0D5F97E460F3E0FCCB64601263342A9 -:1010F00000D0FB1AA246AB4633431847B456010052 -:10110000E4560100103A02D378C878C1FAD85207E1 -:1011100001D330C830C101D504680C6070470000AD -:101120000023002400250026103A01D378C1FBD803 -:10113000520700D330C100D50B6070471FB5C046C1 -:10114000C04615F063F904B00FB41FBDF0B44046BB -:10115000494652465B460FB402A0013001B506482D -:10116000004700BF01BC86460FBC804689469246B8 -:101170009B46F0BC70470000C11000008269024924 -:101180008161024810447047911100000100000085 -:1011900001B41EB400B50BF0E6FF01B40198864619 -:1011A00001BC01B01EBD0000401E00BF00BF00BF5B -:1011B00000BF00BF00BF00BF00BF00BF00BF00BF37 -:1011C00000BFF1D17047000070B505460C461646C9 -:1011D00002E00FCC0FC5103E102EFAD2082E02D31B -:1011E00003CC03C5083E042E07D301CC01C5361F2E -:1011F00003E021782970641C6D1C761EF9D270BD45 -:101200008307FF22DB0E9A408907090E99400028C8 -:101210000BDA0007000F0838830828489B001818CD -:10122000C36993430B43C3617047830824489B0001 -:101230001B181868904308431860704710B504469F -:1012400000210120FFF7DCFF00211820FFF7D8FF65 -:1012500000210B20FFF7D4FF02211920FFF7D0FF58 -:1012600002210D20FFF7CCFF02210E20FFF7C8FF5F -:1012700002210F20FFF7C4FF0221C81FFFF7C0FFA4 -:1012800003211620FFF7BCFF03211520FFF7B8FF4D -:10129000204600F019F8002010BD6421018070473D -:1012A00010B500F020F810BD0648704710B500F0EA -:1012B00022F810BD704770477047000000ED00E055 -:1012C00000E400E003F9004370B505462D4C07200B -:1012D0002070A01CFFF7E1FF5920A080294620467E -:1012E00000F099FB70BD10B500F09EFB2549002071 -:1012F000891E087010BDF8B5224E0446B61E30781F -:1013000001270D46002807D0204660380B2808D852 -:10131000204600F03DFF2BE0602CF9D01A48086011 -:10132000F8BD20466C38032803D8204600F071FF32 -:101330001EE0204670381F2803D8204600F045F9EB -:1013400016E0204690380F2803D8204600F0E8F831 -:101350000EE02046A0380F2803D8204600F074F88D -:1013600006E02046B0380F2804D8204600F0CAF91D -:10137000286000E02F60602CD2D128680028CFD1EF -:101380003770F8BD1A000020013000000120244908 -:10139000C003086023490020087007202249C005C7 -:1013A0008860704770B51F4D04462878A04207D06A -:1013B000002C05D0002803D01CA14D2015F033F8D7 -:1013C0002878A0420ED000211D4A17482C70002C0E -:1013D00019D01C4B012C06D0022C0BD013A1682075 -:1013E00015F021F870BD11600221116053610321D5 -:1013F000090605E011600321116053610121C9054F -:101400008160416070BD116011600721C905816074 -:1014100070BD10B505A1712015F005F810BD0000D4 -:1014200080E100E02000002000F501407372635C61 -:1014300068616C5F63636D5F6161722E63000000C1 -:1014400000F500404001002010B5A038030015F061 -:10145000DBF80B070E172028313A414B525C650030 -:101460004B6808788A68194603F0E6F910BD888849 -:101470008A6883B20888194680B203F0ECF910BD7F -:1014800008884C68CB688A6880B2214603F0E7F987 -:1014900010BD08884B688A6880B2194603F0FBF9D2 -:1014A00010BD88888A6883B20888194680B203F024 -:1014B00007FA10BD88888A6883B20888194680B206 -:1014C00003F041FA10BD08884A6880B2114603F063 -:1014D00080FA10BD088982B2888883B208881946CC -:1014E00080B203F081FA10BD08884A6880B21146C4 -:1014F00003F09EFA10BD08894C6882B20888CB6858 -:1015000080B2214603F018FB10BD08884C68CB68F8 -:101510008A6880B2214603F02AFC10BD012010BD6C -:1015200010B59038030015F06FF809060F161D244A -:101530002C363F464E0088888A6883B20888194650 -:1015400080B204F031F910BD08884A6880B21146B3 -:1015500004F065F910BD08884A6880B2114604F0AD -:101560006AF910BD08884A6880B2114604F070F923 -:1015700010BD08884B688A6880B2194604F07BF970 -:1015800010BD088982B2888883B20888194680B263 -:1015900004F07AF910BD08894B6882B208881946B0 -:1015A00080B204F090F910BD08884A6880B21146F4 -:1015B00004F09BF910BD888882B20888114680B279 -:1015C00004F0EFF910BD012010BD10B57038030014 -:1015D00015F01AF81B0F15192125282F363B40440A -:1015E000484C53585F688D707980888D8D8D8D8FB4 -:1015F00096004A680878114608F0FDFD10BD08689D -:1016000008F04AFE10BD0C790B7B8A6808682146F9 -:1016100008F053FE10BD086808F011FF10BD08F077 -:1016200065FB10BD08884A6880B2114609F043F88E -:1016300010BD0A790888114680B209F0D3F810BDB0 -:10164000087840B209F0DCF810BD088880B209F0D3 -:10165000F0F810BD086809F0FEF810BD086801F048 -:10166000D2FB10BD086801F0FCFB10BD088982B2F6 -:1016700009C9194609F007F910BD05C9114609F055 -:1016800051F910BD08884A6880B211460AF0A6F9DF -:1016900010BD0C790888CB688A6880B221460AF0B0 -:1016A000C5FA10BD0B7908888A6880B219460AF01D -:1016B0006DFC10BD08884C68CB688A6880B22146F2 -:1016C0000AF0D5FC10BD08884A6880B211460AF0BD -:1016D00018FD10BD0B7908880A7A80B2194609F006 -:1016E00044F910BD088880B209F044F910BD062005 -:1016F00010BD08884A6880B2114609F042F910BD51 -:10170000012010BD10B5B02805D0B12808D0B228EE -:101710000BD0012010BD088880B20BF0FBF810BD83 -:10172000088880B20BF015F910BD08884B688A68EC -:1017300080B219460BF01EF910BD000010B5030071 -:1017400014F062FF0A0609060C0C0F0F06060612BB -:1017500008F0F4FA10BD0AF0C5FE10BD01F03EFA23 -:1017600010BD06F09FFA10BDFAA1FE4814F05BFE12 -:1017700010BD3EB5FC49054603C900900191FF200C -:10178000C33069460881F94A092310460A212838DE -:101790000BF0BFFD0024F6480BF0D9FD641CE4B249 -:1017A0000A2CF8D3F14801231A4602A990300BF015 -:1017B000A0F9002804D0FF20E6A13D3014F033FE4C -:1017C000686800F024FC00211E22084604F06CF931 -:1017D00008F0C3FC02222421E64801F07DFBE54825 -:1017E00001222C214C3001F077FBE2490B20B0396B -:1017F00001F0FEF9002804D0FF20D6A1513014F0EA -:1018000012FE0AF03EFE02F097F96B460022082114 -:10181000D9A008F07DFB002804D0FF20CDA15730CF -:1018200014F001FE284602F0E7FC002804D0FF2057 -:10183000C8A1593014F0F7FDF3218900D14814F004 -:10184000D3FCD04801214171022181710721C1716E -:101850003EBD10B5CB4CA0780A2804D3FF20BDA113 -:10186000903014F0E0FD20786021484300190021F9 -:101870000173417BF722C908C900C91C1140EF223E -:10188000114041730121E1700C3010BD70B50E465E -:1018900000211C4619801546030014F0B5FE0723ED -:1018A000050B1711231D23002246294630460AF056 -:1018B00037FE70BD22462946304608F095F870BDC7 -:1018C00022462946304601F0E2FF70BD22462946F5 -:1018D000304603F0EAFD70BD22462946304600F04E -:1018E00010FC70BDFF209BA1EF3014F09CFD032085 -:1018F00070BD70B5A34CE078002818D02078602126 -:1019000048430019407B00254007400F0119087922 -:10191000401E08712078401CC0B220700A2800D1F7 -:101920002570A078401CA0700BF097FEE57070BD8C -:101930009448C079002800D08BE7704770B5914D6E -:10194000A86800280CD0FFF7F3FF002862D06022BF -:10195000A968FFF739FCFFF7CCFF0020A860EFE78C -:101960006879002856D0FFF774FF044681484C3050 -:1019700001F0C2FA6060002804D17A4875A14A30AB -:1019800014F051FD606801F01AFB00280DD02046CC -:1019900007F00BFF6078010703D5C008C000401CAA -:1019A0002BE0744861684C302DE0724861684C301F -:1019B00001F0ABFA00F05AFB00282BD1FFF749FFEA -:1019C00004466C4801F098FA6060002804D1332086 -:1019D00060A1000114F027FD606801F0F4FA00280E -:1019E00014D060680088608020460AF0CCFD6078E2 -:1019F000010706D5C008C000801C6070FFF779FFA2 -:101A00009EE75C48616801F080FA99E7594861688F -:101A100001F07BFA70BD10B55B4CE160A0605B48E3 -:101A200000F032FC607010BD57490020087070470C -:101A300070B5574E0546706A94B00C46401C04D1F0 -:101A4000B06AC0430004000C0BD0306AC007C00F5E -:101A50002870706A14F0DBFBB06A2071000A6071B4 -:101A600014E02B206946087009A9684601F07BFA4A -:101A7000002804D03B4837A17E3814F0D4FC012064 -:101A8000287006220AA9204614F04FFB2878002867 -:101A900003D06079C0210843607114B070BDF0B507 -:101AA0003B4C0646206895B00D4637460837401C2B -:101AB00008D16068401C05D1A068401C02D1E068D4 -:101AC000401C11D02068314614F0A1FB6068311D24 -:101AD00014F09DFBA068394614F099FBE06831468C -:101AE0000C3114F094FB25E02B206946087009A9FD -:101AF000684601F038FA002804D01A4815A1553874 -:101B000014F091FC08220AA9304614F00EFB2B2099 -:101B10006946087009A9684601F025FA002804D032 -:101B200010480CA14E3814F07EFC08220AA9384651 -:101B300014F0FBFA20692E460836401C08D1606973 -:101B4000401C05D1A069401C02D1E069401C33D083 -:101B500020691FE07372635C686F73745F636F72F8 -:101B6000652E6300C3020000F866010094010020A6 -:101B70003D170000640800206E524635313832327D -:101B800000000000E8030020240000203D190000B0 -:101B900080000010294614F03AFB6069291D14F0FA -:101BA00036FBA069314614F032FBE06929460C315E -:101BB00014F02DFB15B0F0BD2B246846047009A964 -:101BC00001F0D1F9002803D0F649F74814F02BFCB6 -:101BD000082209AF28460AA914F0A7FA684604703B -:101BE00009A901F0C0F9002804D0EF48ED49C01D53 -:101BF00014F019FC0822391D304614F096FAD9E782 -:101C000070B5EA4C0546A068002804D0E648E549CE -:101C1000563014F008FCA56070BD10B50146E448CC -:101C200001F073F9E1498879401CC0B2887101283C -:101C300003D1E048407800F04BFB10BD70B504467E -:101C4000DD4816460D46814204D1D748D549CB30F0 -:101C500014F0E9FB012E05D0D348D249DA3014F054 -:101C6000E2FB70BD6620207000202072A58101205B -:101C7000A07370BD70B515460C460646FFF758FEBA -:101C800000280CD066210170468001210172216874 -:101C90000161A18881820573FFF72BFE70BD1321BE -:101CA000304608F09FFD70BDC2494968884201D2A4 -:101CB00010207047072101700020704770B5BD4C9F -:101CC00005462078002694B0002801D00820E4E6DC -:101CD000BA4A6260954201D21020DEE668680028A8 -:101CE00009D00921D82804D3C31C9B089B00834238 -:101CF00005D00846D1E60720000268600EE0012109 -:101D000009074B6B896B4B43AD49511A0122591A94 -:101D1000D202891A814201D20421EAE700F050FF81 -:101D20006178A06806F052F8E068401E07280BD8DA -:101D3000302269460A708870684607F007F9002863 -:101D400002D009A806F07CFA2846FFF712FD012010 -:101D500020703046A1E6F8B5044696480F46406824 -:101D6000814208D3002C01D0844204D3E01C8008B7 -:101D70008000A04201D01020F8BD8C488178002955 -:101D800011D0398800914178602251430D18287B89 -:101D90000C350007000F3B4600222946FFF776FD71 -:101DA000060004D015E0002038800520F8BD002C86 -:101DB00013D039880098814201D90C260DE028788B -:101DC0003B460007000F22462946FFF75FFD06004D -:101DD00005D00C2E01D0002038803046F8BD734C61 -:101DE0006078401CC0B260700A2801D10020607089 -:101DF000A078401EA07068784107490F01290ED0D5 -:101E0000022906D003291AD066496E4814F00BFB4C -:101E1000E3E7C006E1D46868FFF7FFFEDDE764484A -:101E200069684C3001F071F86079401CC0B2607193 -:101E30000128D2D15F48407800F04AFACDE7E07936 -:101E4000401CE071C9E7604A10B5904209D3594A75 -:101E50000124A4045268A04201D3904201D39142CC -:101E600001D2102010BD00F0FCFE10BD564B10B585 -:101E7000994209D34F4B0124A4045B68A14201D3CA -:101E8000994201D39A4201D2102010BD022803D0FA -:101E9000102801D0092010BD00F009FF0028FAD059 -:101EA000052010BD484B10B598420DD3414B01247D -:101EB000A4045B68A04201D3984205D3994203D39E -:101EC000002A03D09A4201D2102010BD00F015FF65 -:101ED0000028FAD0072010BD10B50446354894B04C -:101EE0004068844202D2102014B010BD0F2008A90F -:101EF000087369460BA801F036F80028F4D168464B -:101F0000007A207068464089608068468089A08099 -:101F10000020E9E710B500290BD0264A526891420B -:101F200002D30B68934201D2102010BD8A88002A88 -:101F300002D001F05AFE10BD092010BD10B5224A92 -:101F400094B091420ED31B4A01239B0452689942DC -:101F500001D3914206D3441E1E2C41D8994203D38B -:101F6000914201D21020BFE7012837D10878002420 -:101F7000C007C00F002803D003206946887001E025 -:101F80006846847038206946087009A9684600F0E0 -:101F9000EAFF002804D041200CA1C00014F043FA4D -:101FA0002046A1E7541B000093020000E803002034 -:101FB0006408002024000020FFFF0000001900201A -:101FC000000000200A040000008001007372635CBE -:101FD000686F73745F636F72652E6300072083E719 -:101FE0000246203A1F2AF9D807F0F9FF7CE710B51E -:101FF0005F4A5268914201D2102010BD0246203A39 -:102000001F2A02D808F065F810BD072010BD70B572 -:102010000546584C0020207020464619544846601A -:10202000E01C80088000A04204D0FF2052491330F9 -:1020300014F0F9F901200007C06AC0430006000E41 -:1020400003D14E480068401C03D04D484D49301A1A -:10205000C862A8B20122214604F039F9002804D050 -:10206000FF204549233014F0DEF970BDF0B595B07E -:102070003B2008A9087369460BA800F074FF0028EC -:1020800004D0FF203C496B3014F0CDF93E4E0024C3 -:102090006D4630E02F19B87DC10706D0400704D443 -:1020A00060004019C0880AF08DFB3848807900280C -:1020B0001FD0B87D80071CD560004019C088002261 -:1020C00006210AF09CFB002813D03C2108A80173CC -:1020D00060004019C1886846C18569460BA800F0B8 -:1020E00042FF06000BD0FF2023497F3014F09BF9FC -:1020F00005E0641CE4B268460079A042CAD83046C4 -:1021000058E5F7B505460078002700090C463E461D -:10211000062804D0FF201849A83014F084F9287A42 -:1021200000280ED0012814D0FF201349C93014F024 -:102130007AF90298002C068001D027806680002062 -:10214000FEBD02270926002C0ED0A889A080A87BFE -:1021500008E003271426002C06D02869E060A88A2E -:102160002082287B2072E4E702980680E7E70000DF -:102170002400002000190020CC1F000000100010D7 -:10218000000000200005004004300000E8030020AB -:1021900010B56038030014F037FA0A060A0F131856 -:1021A0001F252930353A0868FFF788FD10BD05C99D -:1021B0001146FFF7D0FD10BD0868FFF775FD10BD93 -:1021C00005C91146FFF73FFE10BD4B6808788A68C5 -:1021D0001946FFF74BFE10BD8A6809C91946FFF77B -:1021E00061FE10BD0868FFF777FE10BD08884A68D9 -:1021F00080B21146FFF78EFE10BD05C91146FFF7EC -:102200009DFE10BD05C91146FFF7F1FE10BD01206E -:1022100010BD0120704700000E4A12680C498A4226 -:102220000AD118470B4A1268094B9A4204D101B5EA -:102230000AF090FF03BC8E46074909680958084711 -:1022400006480749054A064B704700000000000099 -:10225000BEBAFECA7800002004000020001500204D -:102260000015002001203F49400608603E490860F3 -:102270003E490A68FF231B029A4383121A430A60ED -:10228000384980390860704710B502460420384943 -:1022900004E0C3005B181B79002B0AD00346401EE4 -:1022A000C0B2002BF5D133A1432014F0BCF8FF20BD -:1022B00010BDC300CA50002259184A718A71012208 -:1022C0000A7110BD2A4A0021C000801801717047B0 -:1022D00010B50446042803D326A1522014F0A3F815 -:1022E0002348E1000C182079012803D021A15320B4 -:1022F00014F099F86079A179401CC0B2814200D0F5 -:1023000060710120174940068031086010BD70B52A -:10231000164804250068164E0004800F1B4C022846 -:102320001AD014A1692014F07EF815E02078C100BD -:1023300088190279012A07D1427983799A4203D018 -:1023400042798271705880472078401CC0B220705A -:10235000042801D30020207028466D1EEDB200280D -:10236000E4D170BD80E100E080E200E018E400E02C -:10237000E00800207372635C736F635F7369676E5C -:10238000616C6C696E672E630000000034000020F1 -:1023900010B5EFF31080C407E40F72B6D24841784D -:1023A000491C41704078012801D10BF07BF9002CC9 -:1023B00000D162B610BD70B5CB4CE07800280AD1D0 -:1023C0000125E570FFF7E4FF0BF074F9002804D055 -:1023D00000200BF047F9002070BDC44865714560CE -:1023E000F9E770B5EFF31080C507ED0F72B6BE4C7C -:1023F0006078002803D1BEA18F2014F014F8607813 -:10240000401E60706078002801D10BF04FF9002D5C -:1024100000D162B670BD10B5B348C178002904D0B0 -:1024200000214171C170FFF7DCFF002010BD10B525 -:1024300004460BF03FF9AC49C978084000D00120B0 -:102440002060002010BDF8B50246A74C0026A671FA -:102450000820042101251027130014F0D5F80D08D9 -:102460000A0C0E101214161E262123252800257191 -:1024700022E0022001E021711EE020711CE02771A2 -:102480001AE02020F9E7012616E0FFF781FF0BF0A4 -:1024900011F90028FBD002260EE02171A5710BE096 -:1024A0002771FBE7202000E040202071F6E7FF20A5 -:1024B0008FA1763013F0B7FF0BF008F9002809D090 -:1024C0000BF00AF9B04205D130460BF008F90028AC -:1024D000FAD02CE001208007C560894900224A60BB -:1024E000884A9661814B02225A608560864802695B -:1024F000D243D206D517026910231A4302610F4650 -:102500006D1C00E020BF78680028FBD030460BF03F -:10251000E6F80028FAD0002D04D17B48026910218A -:102520008A43026171490220886000207860A079A6 -:1025300000280CD00BF0BEF805460BF01BF8734AD0 -:10254000002D02D0A260E06001E0E260A060002EF9 -:1025500001D100F0A5F8F8BD10B504460BF0B0F8B5 -:10256000002805D060490120C8704A78521C4A7082 -:102570002046FFF768FF10BDF8B5614DA86800263A -:10258000012802D1AE600BF06DF86868012800D117 -:102590006E6028680127544C012812D12E606079A2 -:1025A000002803D000200BF05DF866712078002829 -:1025B00007D00BF07FF8002803D0012080070761C7 -:1025C000A770286901282AD12E6100F05FF8012048 -:1025D00080074761A079002815D00BF06BF80090B8 -:1025E0000AF0C8FF0099002901D0E16800E0A16865 -:1025F000411A022901DA8A1C11DC0099002901D054 -:10260000E06000E0A060FFF7C3FE0BF053F8002885 -:1026100004D0012080070761A77000E02770E868F8 -:10262000012812D100F032F800F030F800F02EF856 -:10263000A078002804D1FF202DA1033013F0F3FE71 -:10264000EE60A6702670FFF7CCFEF8BD10B5264CE4 -:10265000E078002801D10BF029F80120810788617A -:1026600000F014F8A07800280BD0254CE068002872 -:1026700003D10BF034F80028F8D10020E06000F01E -:1026800005F800201949C043886010BD08B55020E6 -:10269000694608806A461088411E1180FAD208BD3A -:1026A000F8B5124819278760154900200860C860EE -:1026B0000BF000F8BE0701240B4D002802D0346156 -:1026C000AC7000E02C70FFF763FE084847600D49CE -:1026D00028798863FFF7DAFFB461FFF7D7FF08496D -:1026E000002008617461F8BD38000020000300403C -:1026F0007372635C736F635F636C6F636B2E6300F5 -:10270000000100400005004000ED00E0FFFFFF7FFA -:102710008107C90E002808DA0007000F0838800872 -:102720002E4A80008018C06904E080082C4A80008E -:1027300080180068C8400006800F704710B50D2053 -:10274000FFF7E6FFC4B20420C043FFF7E1FFC0B2C9 -:10275000844203D023A11A2013F065FE26490120EC -:10276000486010BD0121254A48031060244B002217 -:102770001A60244A5160244A1060244A11601F499B -:1027800080390860704701211C4A480310601F4AC5 -:1027900051601B4A002111601B490860704710B549 -:1027A00017490868012804D00EA1572013F03BFEFA -:1027B00010BD114880680022C0B20A600AF020FCF7 -:1027C00010BD10B50E4801680029FCD0FFF7E7FFE7 -:1027D00001200D494003086010BD000000ED00E03D -:1027E00000E400E07372635C736F635F68616C5F49 -:1027F000726E672E6300000000D5004080E100E0AB -:1028000000D1004000D3004080E200E000D0004052 -:1028100030B40121BC48C9020160CD1005604A03F3 -:102820000260BA4803681B021B0A036004680023A5 -:10283000240A24020460B6480468240A24020460BE -:10284000B448012444608460B34C23606360A36097 -:10285000B24B19601D601A60B14B19601A600121FA -:10286000016030BC704710B40121A748CA02026061 -:102870000B0203600C060460A64841608160A94811 -:1028800041680029FCD1A4490020086048608860A4 -:10289000A24802600360046010BC704701219F4899 -:1028A000C9020160C91001607047002805D00128E5 -:1028B00005D0022805D19C4870479C4870479C4829 -:1028C000704710B59BA18B2013F0ADFD002010BD0B -:1028D00070B500219E4C9F4D9F4A8F4B002808D019 -:1028E00001281DD0022822D092A1B32013F09BFD15 -:1028F00070BD01200004A060A86011601960974BB2 -:10290000C2039A60964A90607F4A00121060954810 -:10291000016086480160944801609448017070BD70 -:1029200001204004A060A8605160596070BD012082 -:102930008004A060A8609160996070BDF8B594466D -:10294000834A8B4F834D00240126002808D001289C -:1029500032D0022840D077A1E82013F064FDF8BD02 -:10296000891E0902090A0120000490603C64686025 -:102970006C4A1164012B1DD000217C4A7D4B5170A3 -:102980006146DC63DE637C4B5C6002249C60042453 -:102990001C61744B3D31196073490E605F4B8915A2 -:1029A00019606F4B58605E4801606C49C005486013 -:1029B0001670F8BD0121E0E70120704E4004704F11 -:1029C000012B04D13464506068603964F8BD9060B4 -:1029D000346468603964F8BD01206A4E80046A4F2F -:1029E000012BF4D1EEE74F484068704770B54A4D6F -:1029F00028680026564C012806D1A068C00303D5DC -:102A000001200004A0602E606868012809D1A06838 -:102A1000800306D501204004A0606E6001200BF009 -:102A200041FEA868012809D1A068400306D501200D -:102A30008004A060AE6002200BF034FE70BD10B5C3 -:102A40004A490878002818D00120444AC0079060FD -:102A5000434AC00B90602C4A00121060414A00208B -:102A60001060324A1060404A106008704A78002AAC -:102A700002D048700BF016FE10BD0320FAE70120CB -:102A8000424900060860704701202449000608609A -:102A9000704701203D4940050860704701201F49EB -:102AA00040050860704733490020C86388151B49FA -:102AB00008607047410A364AC005C00D5043801C6B -:102AC0005143400A0818704710B4324C430B63431B -:102AD0001B0C5C020C602E4C6343C31A2E485C0234 -:102AE00058432B4B400D4343E31A0124DB032404DA -:102AF0001B191B1613700A681018086010BC704769 -:102B000010B50BF0A2FE10BD80E100E008E400E08B -:102B100018E400E000B0004040B1004080E200E076 -:102B200000E100E000B5004048B1004040810040B5 -:102B300044B100407372635C72656D5F68616C5F85 -:102B40006576656E745F74696D65722E6300000052 -:102B500000B3004040B3004040B5004000F50140E4 -:102B60000083004040850040008200404800002073 -:102B700000B10040C08F00400085004004B100401B -:102B800004B5004008B1004008B5004000E200E094 -:102B9000093D0000378600006F0C010010B50BF0F6 -:102BA00040FE10BD00200449C8630120012181407E -:102BB000024A116000BF7047C01F004080E200E081 -:102BC00010B50CF097FA0AF059F9FEF7DFFB12F096 -:102BD00063FA0CF0F5FF0CF081FF10BD70B50C46E8 -:102BE000054603F0D5FA214628460EF026F870BDBA -:102BF00070B50D46040012D0002D10D021012846DA -:102C000013F0F0FA10225449284613F08EFA524875 -:102C100001210838018044804560002070BD0120FA -:102C200070BD70B54C4E00240546083E11E0716839 -:102C300020014018817BAA7B914209D1C17BEA7BAC -:102C4000914205D10C22294613F042FA002806D001 -:102C5000641C30888442EADB0020C04370BD2046FB -:102C600070BD70B50D4606000AD0002D08D03A4C54 -:102C7000083C20886188401C884203D9042070BD2C -:102C8000102070BD3046FFF7CCFF002801DB401C50 -:102C90000AE020886168000140181022314613F0D4 -:102CA00044FA2088401C20802870002070BD70B538 -:102CB00014460D001FD0002C1DD00021A170022849 -:102CC00002D0102817D108E068782978000208435C -:102CD00011D00121A17010800BE02846FFF7A1FF61 -:102CE000002808DB401CA070687B297B0002084399 -:102CF0002080002070BD012070BD70B505461446CF -:102D00000E000AD000203070A878012807D004D91E -:102D1000114908390A8890420BD9012070BD002C56 -:102D200004D0287820702888000A5070022008708B -:102D300010E0002C0CD049680001411810222046F8 -:102D4000103913F0F2F9287820732888000A60738C -:102D500010203070002070BD540000205A4910B57A -:102D6000884207D301218904884205D3574909685D -:102D7000884201D2102010BD0146012006F0E4FA7D -:102D800010BD30B5044693B000200D4607901421C5 -:102D90000BA813F029FA1C21684613F025FA6A469D -:102DA000112010770020507710780221084310700E -:102DB00007A80C90012008AA907245486A46108521 -:102DC0000AA80B902088108460885084A088908482 -:102DD000E088D084907FF9210840801C40084000A2 -:102DE000907708209086108708A80F9010AA0BA94A -:102DF000684600F083FF002803D110A800882880CF -:102E0000002013B030BD3EB5044608206946088056 -:102E10002D48844207D301208004844205D32B48E7 -:102E20000068844201D210203EBD2146012006F0F8 -:102E30008BFA0028F8D12088694688806088C8808D -:102E4000A0880881E088488107F05FF801AB6A46F6 -:102E5000002101F0E1FB694609880829E4D003203C -:102E60003EBD1FB504460020029008206946088137 -:102E700015480391844207D301208004844206D37D -:102E800012480068844202D2102004B010BD07F03E -:102E90003CF8014602AA0F4801F055FD0028F4D184 -:102EA00069460989082901D00320EEE769460988A7 -:102EB000218069464988618069468988A180694680 -:102EC000C988E180E1E700000080010028000020BF -:102ED000042A0000FFFF000010B5031D036000205E -:102EE000521E04E05C181C60401C2346C0B2904295 -:102EF000F8DB0020186010BD01460A680020002A97 -:102F000002D0104612680A60704702680A600160C9 -:102F10007047000000B51E2823D00BDC0C281CD005 -:102F20001FDC030013F070FB090F1D111D1D171787 -:102F300013151D00302814DD3A38030013F064FB2C -:102F4000030F11091100002000BD214800BD04201D -:102F500000BD0D2000BD0F2000BD082000BD1120C8 -:102F600000BD032000BD10B50C4605F0EFFF0028A2 -:102F70001ED0204605F064F9002816D022780E2ACB -:102F80000DD00F2A0BD0022A09D0032A07D0102A0D -:102F900009D010A17C2013F046FA002010BDA078C3 -:102FA000FFF7B8FF10BD112010BD0AA18220F2E783 -:102FB00008A18820EFE710B504F083FF10BD10B51D -:102FC00005F03EF910BD10B504F0D9FF10BD0000AA -:102FD000023000007372635C686F73745F686369CA -:102FE0002E63000070477047704770477047704706 -:102FF00070477047704770477047704770470000D0 -:1030000010FFFFFFDBE5B151008001006400FFFF0E -:1030100003B40148019001BD09000020002803D03D -:103020008178012939D101E0102070470188FE4ADA -:10303000881A914233D01BDCFC4A881A91422ED068 -:103040000BDC00292BD00320C002081A27D001284E -:1030500025D001210903401A07E001281FD00228CA -:103060001DD0FF281BD0FF380138002815D116E0ED -:10307000FF220132811A904211D008DC01280ED0C3 -:1030800002280CD0FE280AD0FF2806D107E001292B -:1030900005D0022903D0032901D0002070470F205A -:1030A000704700B50B2826D009DC030013F0ACFAFA -:1030B0000B1D2125251B25292325271F1B00112832 -:1030C0001BD008DC0C2816D00D281CD00F2814D0DB -:1030D000102808D10FE0822809D084280FD0852835 -:1030E0000FD0872811D0032000BD002000BD05208F -:1030F00000BDCF4800BD072000BD0F2000BD04204B -:1031000000BD062000BD0C2000BD0D20800200BDCA -:1031100070B500290BD0CB1FFA3B81241E46CDB2DF -:10312000112B1BD2012805D0022806D009E000206F -:1031300010701DE0FF20043001E0FF2003308142C9 -:1031400018D0330013F060FA111613131613161665 -:103150001316161613131313161316000846FF380A -:1031600081381F2803D9FF39FE39022902D815708A -:10317000002070BD1470072070BD00B5030013F06F -:1031800043FA060406040C080A0C002000BD1120B6 -:1031900000BD072000BD082000BD032000BD007851 -:1031A0000207120F04D0012A05D0022A0AD10EE02C -:1031B000000907D108E00009012805D0022803D042 -:1031C000032801D0072070470870002070470620B0 -:1031D0007047002807D0012807D0022807D003280D -:1031E00007D007207047002004E0112002E02120D2 -:1031F00000E0312008700020704738B50C4605000B -:103200004FD06946FFF7CBFF002822D12088032149 -:1032100089028843694609788907090D0843208097 -:103220006946681CFFF7BBFF002812D121880320E4 -:1032300000038143684600788007800C01432180A9 -:10324000A8784007820F2020012A03D0022A03D049 -:10325000072038BD814300E00143218088B2010589 -:10326000890F08D0012189038843A9780907C90F6C -:1032700089030843208080B28104890F0AD0A9788D -:103280004004C906C90F400CC903084320808004CC -:10329000800F02D12088400403D5208840210843B4 -:1032A0002080002038BD70B50446002008801546F7 -:1032B0006068FFF7A2FF002815D12189A08981420B -:1032C00010D861688978C90708D00121490288426D -:1032D00008D8491C12F0A3FF298009E0FF21FF3123 -:1032E000884201D90C2070BDFF30FF3003302880A8 -:1032F000002070BD10B5137804785B08E4075B000C -:10330000E40F23431370FD2423400478A407E40F43 -:10331000640023431370FB24234004786407E40F04 -:10332000A40023431370F724234004782407E40FF8 -:10333000E40023431370EF2423400478E406E40FF1 -:10334000240123431370DF2423400478A406E40FF0 -:103350006401234313700078BF244006C00F23404C -:10336000800103431370002906D00878C10701D1FA -:10337000800701D5012000E00020C0015906490E58 -:103380000843107010BD30B50A8803239B020488DF -:103390009A4323059D0F02D1A3049C0F01D09B0FDC -:1033A00000E001239B021A4303230A801B039A4374 -:1033B00003889804840F02D11805830F01D0800F71 -:1033C00000E00120000302430A8030BDF3B593B052 -:1033D0000D000FD0139800280FD01221284612F0AC -:1033E00001FF03AAFF21012003F0E7F8002426468D -:1033F00037467AE0102015B0F0BD0720FBE768469D -:10340000807D01280BD16846818A0520C002081AF8 -:1034100010D0012810D0022812D0032812D0042C7A -:1034200014D0052C15D113E002290000012800005A -:1034300003300000012400E002246846468A08E0C8 -:10344000032406E068460424478A02E0052400E0DD -:1034500006246846418A1398814246D12C74002E76 -:1034600041D00DAA0EA905200292019100901023CF -:103470000022FF21304603F041F9002823D168469D -:10348000808E2A46C0B20EA9FFF711FC00281AD17F -:10349000AE81002F27D00DA9052008AE0291009023 -:1034A000132300220196FF21384603F027F9002854 -:1034B00009D16846808EF11CC01EC0B22A1DFFF7DC -:1034C000F6FB002801D0032095E708A88178427810 -:1034D00008021043E881062C05D16846807DA87259 -:1034E0006846808A2881002085E703A803F06EF8EB -:1034F000002884D0FFF7D5FD7DE7002805D0F94AE4 -:10350000012903D0022903D003207047518800E02D -:103510009188814201D1002070470720704770B523 -:103520000C4605461C21204612F05CFE002020803F -:10353000002D08D0012D04D0EBA1F04812F073FF4C -:1035400070BD062000E00520A07070BD70B592B07F -:103550001546064601206A461071107453740846D9 -:1035600008300395029048889082FEF7E1F9040044 -:1035700019D06580172069468883203600940AABED -:103580007178023307AA01A80DF05FF9064660784A -:10359000000701D5FEF7ADF9002E0AD03046FFF73F -:1035A000ECFD12B070BD1321284607F01BF9032073 -:1035B000F7E708A800906846838B0422012128467B -:1035C00008F035FEEDE770B506468AB000200D46DE -:1035D00007900590069003A90490052402460291E5 -:1035E0000190102300942946304603F087F8002804 -:1035F0000DD108A804A9009102900194684683891E -:1036000000222946304602F095FE002801D0FFF73F -:1036100048FD0AB070BD10B50DF01DFB10BDF0B532 -:1036200089B000260546059600780C460827030059 -:1036300012F0EAFF0CFD070C3A0B77779EC2FCD81C -:10364000E8FD68680A38FEF7E8FA0DE1A88800236B -:1036500080B201220321009009F08CFA0290002C24 -:1036600004D0A648A0A16E3012F0DDFE029800281A -:1036700004D1A2489CA16F3012F0D5FE02980099A7 -:1036800008300CF017FDFEF753F9040007D06078FE -:103690003843607000986080FEF72BF9E6E0132154 -:1036A000009807F09FF8EFE0002C04D1BD208EA118 -:1036B000800012F0B8FE608800230122032109F087 -:1036C00059FA0090002804D18C4887A1883012F064 -:1036D000AAFE0099002008802A7994461EE0C300C3 -:1036E0005B199B6807936B469B8B1A0708D5DA0614 -:1036F00006D56046C20050194038C08F088006E0E9 -:103700005B0409D50871C2005019C08848806078F0 -:10371000384360700226A7E0401CC0B28445DED862 -:10372000A2E0E888694608800090002C04D1734824 -:103730006DA1983012F077FE2878062814D10098F1 -:10374000C00B11D0608800230122032109F012FA76 -:10375000060004D1694864A1A23012F064FE002082 -:103760003071A88870803BE06078384360707BE0FF -:10377000002C04D161485CA1B43012F054FE608882 -:1037800000230122032109F0F5F90090002804D15B -:103790005A4855A1B73012F046FE009808300DF097 -:1037A000ACFA0121484002D1E888C00B5CD00098F7 -:1037B00061880226C180D7E7002C04D14F484AA176 -:1037C000D03012F030FE608800230122032109F07E -:1037D000D1F9002804D1494843A1D33012F023FE87 -:1037E0000226C1E7002C04D144483FA1DC3012F08E -:1037F0001AFE0226618801222046FEF71FFA0120E8 -:103800000590B1E7A889002380B20122032100902E -:1038100009F0B0F90746002C04D0384832A1EE3048 -:1038200012F001FE002F07D12FA101E00FE016E0FA -:103830003248EF3012F0F7FD686802902889694637 -:103840008881012202A90098FEF714FA0CE0002CEE -:103850008AD16D2024A1C00012F0E5FD84E727483D -:1038600021A1FE3012F0DFFD002C0DD060780007A2 -:103870000AD50598002807D18420207020465822B8 -:1038800029460830FDF7A0FC304609B0F0BDF7B579 -:103890000C460546007A224688B00A320292921CF3 -:1038A00004920027811E16323E4601920B0012F050 -:1038B000ABFE08F605F548488DD1F4F5688800237D -:1038C0000122032109F056F90190002803D106A135 -:1038D0000B4812F0A8FD01980088002812D052274A -:1038E000072601E1000900207372635C676174744C -:1038F000735F636F72652E63000000006F0200004B -:103900008603000051271E26002C7DD06888A080E9 -:103910000120A071019802990079C0004019C08966 -:10392000FFF754FD002870D101980079C0004019BC -:10393000C089208101980079C0004019408AA08385 -:10394000F2E0698A0091062820D1E889C00B1DD0D9 -:1039500008462230512786B2002CD6D0A889049977 -:10396000FFF734FD002873D16888A0800220A07181 -:10397000A88920810120A072288AE08300982084F1 -:103980006969009A019812F0D0FBCDE0084620301A -:10399000502786B2002CB8D0A8890299FFF716FDEF -:1039A000002855D16888A080A889E080287A062858 -:1039B0000AD002202072288AA0830098E083204643 -:1039C00069692030009ADEE70120F3E76888002368 -:1039D0000122032109F0CEF80690688A009006982B -:1039E000002803D1FD49FE4812F01DFD069808305D -:1039F0000DF083F90121484002D1E889C00B26D09F -:103A00000098223086B201E073E021E05127002CBB -:103A100079D06888A080A8890499FFF7D7FC00288E -:103A200016D10220A071A88920810420A072288AC2 -:103A3000E083009820846969009A019812F075FB70 -:103A40000699002008710698A98941806CE003203E -:103A50000BB0F0BD688805F0D2FB019068880023A8 -:103A60000122032109F086F800900198002804D172 -:103A7000DB48DA492C3012F0D6FC0098002804D13B -:103A8000D748D6492D3012F0CEFC0098D549C088D1 -:103A9000884205D05127222604E01EE03FE035E0B1 -:103AA00050272026002C2ED06888A080502F07D0C9 -:103AB0000220A0712146287B0831FFF730FD33E05A -:103AC000287BA11DFFF72BFD6A8800230099019830 -:103AD000FFF73CFD0028BBD126E0C349A889C9886F -:103AE000814207D154270626002C0CD06888A0807C -:103AF0001AE008E053270826002C04D06888A0802C -:103B0000A889E08010E00A98068013E05527072670 -:103B1000002CF8D0A889A0800020A07104E08D209E -:103B2000AE49C00012F07FFC0A98002C068001D03C -:103B30002780668000208BE7AB4900200870704723 -:103B400030B585B00C4601F0E0F90546FF2804D1F8 -:103B5000A348A249953012F066FC00202080207115 -:103B60006080401EE0802046294608300CF096FA1E -:103B70006A462946012002F020FD102412E0684622 -:103B8000808800070ED56846C0882946FFF71BFDD0 -:103B900068468188FF2321438180C0882946019A95 -:103BA00002F036FE684602F011FD0028E7D005B0AD -:103BB00030BD0A46014610B5104608300CF082FAB6 -:103BC00010BD70B5002305461A46032108F0D2FF48 -:103BD000040004D182488149B73012F024FC204609 -:103BE000294608300CF066FA70BDF0B591B00C466D -:103BF000074605F004FB050005D02878222804D2EA -:103C0000082011B0F0BD7948FBE700231A460321D4 -:103C1000384608F0AFFF0646002C02D0A0880028E6 -:103C20000CD00120694608710220087400204874F5 -:103C3000002C05D0A0880883206802E00920E0E776 -:103C4000088305903046083003970290FDF770FE18 -:103C5000040018D0678017206946888320350094B7 -:103C60000AAB6978023307AA01A80CF0EEFD0546FD -:103C70006078000701D5FDF73CFE002D09D02846ED -:103C8000FFF77BFABDE71321384606F0ABFD0320B2 -:103C9000B7E708A800906846838B042201213846C4 -:103CA00008F0C5FA0021C943F180AAE7FFB585B045 -:103CB0000E9E7788384605F0A2FA054600231A467C -:103CC0000321384608F056FF0446002D03D143492E -:103CD000474812F0A8FB002C04D145483F49401C3E -:103CE00012F0A1FB0834089869460394C1C105A8E5 -:103CF0000DC8203569780CF017FAC6E5F0B5044612 -:103D0000002099B00D4601460D9010A881811646FD -:103D100001818180344A68469180018510A8018024 -:103D200068460187818581841078012808D002289F -:103D300006D0032804D0042802D0082019B0F0BD12 -:103D40002C4A944273D32C4F0121890438688C4249 -:103D500001D3844278D3274A954275D3012189043F -:103D60008D4201D385426FD36168002913D0214A67 -:103D7000914269D301229204914201D3814263D3DB -:103D800060892189884203D801225202914201D9D7 -:103D90000C20D3E70D9016AA0EA92846FFF783FA48 -:103DA0000028CBD1686880784007800F02280AD1AC -:103DB0006846008F8004800F05D02869002802D053 -:103DC0003968884240D30AA92069FFF716FA00280B -:103DD000B4D1206900281CD060780FE0E8380000DA -:103DE000EE030000FFFF0000000900200230000089 -:103DF0000C050000008001002800002080076846B4 -:103E0000008D03D58004800F68D002E08004800F0D -:103E100064D16846008D810618D58004800F6068E3 -:103E200006D0002812D0396888420DD302E00BE09A -:103E300000280BD0FE49884206D30121890488421C -:103E400004D33968884201D2102077E709A9606954 -:103E5000FFF7D3F900289CD16069002808D0684694 -:103E6000808C0105890F012938D18004800F35D05D -:103E70000BA9A069FFF7C1F900288AD16846808C98 -:103E800080062BD46846808D810627D4A16900293D -:103E900006D00105890F012920D18004800F1DD093 -:103EA000E068002804D00078002817D01C2815D21C -:103EB00004AA611C2046FFF71DFA0121890210A8FF -:103EC0000180012768468773DA49818104AA033299 -:103ED00017A92868FEF711FF002801D007202DE759 -:103EE00010A8007F15A9C01CC2B200200C9201903E -:103EF000FF32009003460291FF3203A8033210996B -:103F000002F0B3FA002826D110A9888A0F902A89D6 -:103F10002969C94801910092029010A90A8B6B8906 -:103F200028680E9902F0A1FA01007DD1C24800254F -:103F3000001F818868464174090A8174052104A81C -:103F40006A4623C210A82A46FF21808A0C9B02F0F1 -:103F5000F1F9002802D0FFF7A4F8EFE66846007CEC -:103F60000322C1090020920290430122920280188C -:103F70001490002928D0014610A801806846292104 -:103F8000877309028181058608A8007C0023410807 -:103F900060784900C007C00F014308A80174FD20E4 -:103FA00001406078A54A8007C00F4000014308A87F -:103FB00001740CA9022001910090029503A81099A8 -:103FC00002F053FA01002FD16068002828D0206940 -:103FD00000280DD10AA90EA8FFF7D5F9607880074F -:103FE00006D46946088D032109038843694608857C -:103FF000904968468773FE31818190492089891EE6 -:1040000012F00DF962680D9811AB019200900293C5 -:104010000A46002303A80A9902F027FA010003D1F7 -:104020002078C10603D400E086E080062AD56846E1 -:104030000586606900280DD109A90EA8FFF7A3F92C -:104040006846818C03208002814301208002091888 -:10405000684681846946888CC821084369468884FB -:1040600074488F73FF30888112AA0CA90220029233 -:10407000019100900023714A03A8099902F0F5F913 -:10408000010059D12078C00729D068460586A0696B -:1040900000280DD10BA90EA8FFF775F96846818D90 -:1040A000032080028143012080020918684681852F -:1040B0006846818D40200143684681858773604949 -:1040C000818113AA0CA90220029201910090002381 -:1040D0005A4A03A80B9902F0C8F901002CD1E068F4 -:1040E00000282DD010A8149901805549684687737F -:1040F000491C8181E16808A80A78027449784174F2 -:10410000E0684122418868464186E06800230179E1 -:1041100008A80175E068D200C18808A84175090A9D -:1041200081750CA8072101900091029503A81099B0 -:1041300002F09BF9010003D00F9800F0EAFEFDE5C4 -:104140003D480321001F0170002E0AD08088308076 -:1041500010A88088708010A80089B08010A880897D -:10416000F0800020EAE530B501248BB015460B46FF -:10417000012802D002281CD104E06846052184737E -:10418000C90203E02B4968468473891E8181002B94 -:1041900012D003210020890288430121890240189E -:1041A0006946888405AA04A91846FEF7A6FD0028DA -:1041B00004D007200BB030BD1020FBE76A46127C0C -:1041C0001D480092801E05A9FF3201910290FF3226 -:1041D000002303A80332099902F047F9002802D00E -:1041E000FEF75FFFE6E71448001F002D01D041886D -:1041F000298004700020DDE770B592B004460126E6 -:1042000008A886700F496846018410AA08A930469C -:10421000FFF7A9FF00284DD12078074DC0070024E3 -:104220002D1F002848D01C21684611F0DDFF0BE04F -:1042300000800100032800000409002003020000A0 -:10424000032900000118000068460178202001437E -:104250006846017008A88670F9496846018411947F -:104260000794817FF92001406846891C81770020EE -:1042700001466846017700200146684641770421DF -:104280008185C485018607A80A9011A80D9008A809 -:1042900009900EAA09A96846FFF730FD002809D148 -:1042A0006846008FE8806846808F2881401C6881BE -:1042B0002C70002012B070BDEC802C8110A80088FA -:1042C000F4E7F7B5DF4900260A789EB0012A04D04A -:1042D000022A02D0082021B0F0BD4A88824201D0D3 -:1042E0000620F8E71F98824201D10720F3E7012258 -:1042F00010A98A75D4488882002003239B020146B6 -:1043000099439302CB1810A90B8669468A81CF4A3C -:10431000CA8118A9887110A9888419A904916946CD -:10432000CA820690FF20087503A802F072F90024E3 -:104330002546274608AA052103A802F06DF90028A2 -:1043400010D082286FD1002C6FD0002D6DD010A816 -:104350008480C5800021017418A8807B11AC0128DD -:1043600065D06DE008A88079002F21D0012857D1B1 -:104370006846818CB44881421CD113AA0DA905203E -:104380006B4607C36846408C10230022FF2102F0D1 -:10439000B5F9002868D110A88089042801D0062822 -:1043A0004CD16846818E1F98814239D10F2092E707 -:1043B000012835D16846808C0521C902884202D087 -:1043C000491C88422CD19F4841886846408C8142D4 -:1043D00001D1012700E00027002C01D0002D10D0D2 -:1043E0001F9988421CD113AB0DAA05216E460EC63B -:1043F000044610230022FF2102F080F9002833D167 -:1044000001E035460CE010A88089022801D0102870 -:1044100014D1C0B21BAA0DA9FEF749FC00280DD18A -:104420006846468C86E71FE0FFE7052053E714A99E -:104430001BA8221DFEF761FC002801D003204AE7DB -:1044400010A8007C0023001DC2B210A8027420989E -:1044500002900194009215A81C9902F006F8002819 -:1044600002D1784902220A70FEF71BFE33E710B52D -:104470000B46401E86B084B203AA00211846FEF700 -:1044800039FF04AA052103A802920191009001239B -:104490000022FF21204601F04DFF04466846008AB5 -:1044A000012804D06D206A49000111F0BCFF2046AC -:1044B000FEF7F7FD06B010BDF0B5624F0446387840 -:1044C00087B00E46032804D0042802D0082007B085 -:1044D000F0BD04AA03A92046FEF7E5FE0500F6D1CB -:1044E000606880784007800F02280DD16846808977 -:1044F0008004800F08D02069002805D0554909683C -:10450000884201D21020E2E7208905AA6B46216982 -:1045100007C369460A8A63892068039901F0A5FFE9 -:10452000002802D0FEF7BDFDD1E7002E02D068467C -:10453000808A3080042038702846C8E738B50C00DF -:10454000054609D000236A46FF2102F039F9002808 -:1045500004D0FEF7A6FD38BD102038BD69462046C0 -:10456000FEF74BFE0028F8D1A078FF21C307DB0F30 -:104570002846009A02F04CF9EBE73EB50C0009D052 -:1045800002AB6A46FF2102F01BF9002804D0FEF7B7 -:1045900088FD3EBD10203EBD0321204611F022FEC5 -:1045A0006846008801A90005800FFEF712FE00286A -:1045B0000BD16846007920706846008801A9800404 -:1045C000800FFEF706FE002801D003203EBD68469E -:1045D00000796070A278EF20024068460088C10B25 -:1045E00009010A43F7210A404104C90FC9000A43DF -:1045F000A270F9210A40800601D5022000E00120C6 -:10460000400069460243097A50084000C907C90FB3 -:104610000843A07000203EBD7FB5144605220192DC -:1046200003AD029500930A462388FF2101F082FE24 -:10463000694689892180FEF734FD04B070BD000011 -:10464000052A00000009002002280000FFFF0000EA -:10465000E838000028000020F3B5002799B068462C -:104660000C4607873D4600291ED0E068002806D08A -:10467000A068002818D001886A4611870780199819 -:1046800004F0BDFD002812D0007822287ED31998AE -:1046900000F03BFC002300901A460321199808F013 -:1046A00069FA060009D104E010201BB0F0BDFD48F6 -:1046B000FBE7FD49FD4811F0B6FEA078012803D0C4 -:1046C000022801D00720F0E72088002808D0401EEB -:1046D00080B203AA009901F070FF002859D11DE0B3 -:1046E000F048401CE1E76946498A228891420BD292 -:1046F0006846807D0025012810D16846808AEC49F3 -:1047000088420BD1012509E0914203D1002D2AD026 -:104710006D1C01E0022D0BD0032D04D203A801F083 -:1047200055FF0028DFD082281BD0002831D11DE0A2 -:104730006946897D0129F1D16946DD4B8A8A5B1E74 -:10474000D11A9A420FD005DCDA48101A0BD0012892 -:10475000E4D108E0012906D0FF390129DED1032583 -:10476000E1E7022D15D10D2080029EE7E0680028C8 -:1047700016D00EA9052202910192009069460B8F76 -:10478000A2882088FF2101F0D5FD00E01EE000286E -:1047900002D0FEF786FC88E76846A168008F088093 -:1047A0006846008AC00601D5C3487EE707980028FE -:1047B00003D06846008B022801D0032075E70798D4 -:1047C000A1780078012903D0800710D408206CE775 -:1047D000C007FBD000220721199808F010F8002824 -:1047E00002D00725022004E0AE48801C5DE70225C8 -:1047F000032008A908702188684681851998083621 -:104800000A90099617216846818712AB02330FAAD6 -:10481000052108A800970CF018F8002802D0FEF730 -:10482000ACFC42E710A800906846838F042229461A -:10483000199807F0FCFC38E770B5064615460C469B -:104840000846FEF7EBFB002804D12A4621463046F5 -:10485000FFF789FCF2E610B5FFF733FD10BD70B528 -:104860001E4614460D0014D0002C12D06168002999 -:104870000FD00121FEF741FE002809D12068FEF784 -:10488000CDFB002804D1324621462846FFF736FAF0 -:10489000D4E61020D2E670B515460C000ED00221E9 -:1048A000FEF72BFE002808D12068FEF7B7FB002892 -:1048B00003D129462046FFF7FFFDBFE61020BDE6E5 -:1048C000F8B506467D480D46016814468A4231D344 -:1048D0006068002808D07A4A90422BD301229204C3 -:1048E000904201D3884225D37648864204D0304690 -:1048F00004F085FC00280CD0304600F006FB06468C -:10490000284600F0BFFA002804D16068002802D0D1 -:1049100012E06448F8BD00236A463146284601F09B -:104920004FFF002802D0FEF7BCFBF8BD68460088A8 -:10493000800601D41020F8BD6188224628466368AD -:10494000FFF76AFEF8BDF7B55C4E0746306886B0E3 -:104950001446824202D2102009B0F0BD384600F061 -:10496000D4FA05465748874201D0FF2D08D00023CE -:1049700004AA2946079801F023FF002826D101E068 -:104980004848E9E76846008AC00601D54A48E3E797 -:1049900003A9002002910527019000976288494BE6 -:1049A0002946079801F0AAFE00280FD161683268F5 -:1049B000914208D30191029000972388628829468A -:1049C000079801F09BFE694689892180FEF769FB03 -:1049D000C2E7002907D03C4B0A881B899A4202D8BB -:1049E0003048401C704737E610B586B004236C464B -:1049F000A382354BDC88002C07D01B898B4201D267 -:104A0000914204D92748401C54E5062052E56B46E4 -:104A100019825A820021009101911C800221997013 -:104A200005A9029104A903916946FFF715FE41E526 -:104A3000F3B50C4685B0812069460873002C1BD065 -:104A4000059804F0DCFB070018D03878222869D3D9 -:104A5000059800F05AFA049000220121059807F009 -:104A6000CEFE00280CD000231A460321059808F03A -:104A700081F805000AD105E0102028E5094826E55F -:104A8000112024E50849114811F0CDFC28460830D2 -:104A90000BF032FB06462078012819D0022838D0C6 -:104AA000072014E502300000E8380000E1080000AB -:104AB0000328000000280000013400002800002026 -:104AC00000800100FFFF000000090020840A0000B0 -:104AD000A18803AAFEF71CFB0028CED1B00721D580 -:104AE0006846007B00281FD1A079C0071CD0E06871 -:104AF000002205216B4607C36389228968880499CF -:104B000001F018FC6946087300280DD0FEF7C9FAB9 -:104B1000DDE4A18803AAFEF7FBFA0028ADD134201A -:104B2000064201D10820D2E46846037B2946384674 -:104B3000059AFEF70BFDCAE4FFB597B0002001907F -:104B40001F4615460C460E46179804F058FB0028E1 -:104B500004D00078222803D20820A6E5F448A4E572 -:104B6000B80801D00720A0E5032F00D1002717982F -:104B700000F0CBF90890002C1BD0022D77D3ED4824 -:104B8000006884427CD361190091012902D0491E3A -:104B9000814275D3AD1EAAB22146E74810F036F81F -:104BA00000991E394A7F0B7F11021943884267D151 -:104BB000ADB2E248B90702D50189491C00E00121E4 -:104BC00089B20091F90701D0078900E0DA4F03AA02 -:104BD0000899009801F0F1FC0DE0F078B17800023E -:104BE000084310284CD80199091D401880B2019043 -:104BF000A84245D82618002E60D07078317800027F -:104C0000084300998842E8D358E06946098A0A07B0 -:104C100054D5002C3FD0019AA618121D92B20992C9 -:104C2000F278B37812021A439446102A28D8099AC7 -:104C30006244AA4224D87278337812021A4390420E -:104C40001ED1C8061ED509980AAA052120186B4650 -:104C500007C3707831780002084363460022089940 -:104C600001F068FB002803D0FEF71BFA1DE507E002 -:104C7000F078B178000208436946098D884201D076 -:104C80000B2012E5F078B17800020843099940182A -:104C900080B2019006E0C90604D50899FEF793FC9E -:104CA0000028E3D16946088A1021884369460882B2 -:104CB000488AFF23049A089901F0AAFD03A801F08D -:104CC00085FC002803D16846408AB8429DD900235C -:104CD0001A460321179807F04DFF040003D19849A5 -:104CE000984811F0A0FB20880028BFD0012108A817 -:104CF00001700173002646732188684601862046AC -:104D00000830099017980A90FCF712FE05001BD096 -:104D10001798688017206946888010AB023301AA73 -:104D2000052108A800950BF090FD0746687800075C -:104D300004D584488249223011F075FB002F09D038 -:104D40003846FEF71AFAB0E41321179805F04AFD29 -:104D50000320AAE40EA8009068468388042201215B -:104D6000179807F064FA00288BD126809DE4F0B5EF -:104D700000248DB01F4615460E46002A04D0B908FF -:104D800004D007200DB0F0BD1020FBE7032F00D1A9 -:104D9000002700F0BAF80390FF2804D06749B8074D -:104DA00003D5488902E06248ECE70120FA0702D007 -:104DB0004989491E00E0604906AA8FB2039901F0B3 -:104DC000FCFB38E06946898B090734D504AB052123 -:104DD0000022029300910192574B039901F08EFC3F -:104DE000002821D1002E21D06A46128A2988A218D3 -:104DF0003019121D914234D36946CA8B0270120ACF -:104E000042700A8A8270120AC27004A90522001D2B -:104E10000092029101906946C88B0B8A0022039987 -:104E200001F06CFC002801D00320ABE76846008A43 -:104E30002018001D84B206A801F0C8FB002804D089 -:104E4000822806D0FEF72DF99CE76846C08BB84251 -:104E5000B8D9002C07D0002E10D02988A01C814280 -:104E600003D20C208EE705208CE7224631463248DB -:104E70000FF0CCFE31190870000A4870A41C2C8079 -:104E800000207FE700B585B06946FEF79FFA00284D -:104E90000AD16846007C030011F0B6FB08052F2FED -:104EA0002F2F08080531032005B000BD6846807823 -:104EB000012807D1684600880321C902401A1CD086 -:104EC00001281AD068468079012806D16846808872 -:104ED00015214902401A05280FD96846807A012811 -:104EE00011D16846018929200002081A05D002283C -:104EF00003D0032801D0042805D10F20D4E712A144 -:104F0000164811F090FA0020CEE710B507F028FE01 -:104F100010BD10B50C4601F023FB002803D00AA1F8 -:104F20000F4811F080FA2046FEF7BBF810BD0000D4 -:104F30000230000028000020FFFF000000090020D0 -:104F4000E83800003F0B00007372635C67617474A3 -:104F5000735F636F72652E63000000002202000021 -:104F6000BB060000F8B500780C46164610340E3625 -:104F7000069F022809D0032836D005287ED0FF20BE -:104F8000F6A1E53011F04FFAF8BDCD890A2068434B -:104F90000E30188031203880002AF5D0087B9581AA -:104FA000801FC7B21AE020886168308048780A788C -:104FB00000021043F080C8788A78000210433081E4 -:104FC000B21C3846091DFDF772FE002F01D00028E3 -:104FD00002D000203071708008340A3628466D1ED9 -:104FE000ADB20028DFD1F8BDCD890A2068430E306C -:104FF000188032203880002AF5D0087B9581401F28 -:10500000C7B243E0616822880878F2803279C3072A -:1050100052085200DB0F1A43FD231A408307DB0FAF -:105020005B001A43FB231A404307DB0F9B001A4324 -:10503000F7231A400307DB0FDB001A43EF231A4064 -:10504000C306DB0F1B011A43DF231A408306DB0F65 -:105050005B011A43BF231A404306DB0F9B011A432F -:105060003271C00970718A784B7810021843308110 -:1050700032463846C91CFDF71AFE00E00CE0002855 -:1050800002D00020B070308008340A3628466D1EE9 -:10509000ADB20028B6D1F8BD087BCD89801E86B29E -:1050A0003046083068431030188034203880002A99 -:1050B000F1D0174695811037E800D681C0190090CD -:1050C0000DE020883880009878603246616800984A -:1050D00011F02BF800980834801908370090284602 -:1050E0006D1EADB20028ECD1F8BDFFB581B00A9DB0 -:1050F0001E460C46002A05D0607AFF300130D08071 -:10510000E089108101980E270078030011F07CFAE5 -:105110000B7E0719293541536C7878787E00009210 -:10512000087B082805D0032803D091A1954811F0E9 -:105130007AF9378030200FE000990020888105B08F -:10514000F0BD0092087B042804D08E4888A114305A -:1051500011F069F937803120288000980028EBD1C0 -:10516000EDE70092087B042804D0932080A1800002 -:1051700011F059F937803220EEE70092087B0228BF -:1051800004D080487AA13A3011F04DF937803320AD -:10519000E2E7087B1746042804D07A4874A14C3013 -:1051A00011F041F91020308034202880002FC6D023 -:1051B0000020B88116E0207B1746052806D0062877 -:1051C00004D070486AA1603011F02DF912203080AF -:1051D00035202880002FB2D0E089B88100203882A5 -:1051E00001984088F881AAE70092087B072804D03C -:1051F00064485FA1713011F016F937803620ABE7B3 -:1052000033460095019800F00EFC98E72F2053A13B -:10521000000111F008F992E770B50C46054603F05D -:10522000EEFF002804D00078222803D2082070BDA9 -:10523000554870BD00231A460421284607F09AFC01 -:105240002060002801D0002070BD032070BDFFB594 -:105250008BB00D4607461720694608850E98032631 -:105260001446002805D10EA93846FFF7D5FF0028BF -:1052700034D1002D0BD000220321384607F0BFFAAD -:10528000002834D00E980078002830D108E020782B -:10529000092819D00F2823D030A13C4811F0C3F8B9 -:1052A0000E98A760801D03AA606002320AA92046FA -:1052B00000F00FFC002827D0030011F0A5F9071A11 -:1052C000182323211C1E23000726002231463846BE -:1052D00007F095FA0028E3D12B48801C0FB0F0BDF1 -:1052E00000220321384607F08AFA0028D8D111207D -:1052F000F4E70020F2E70820F0E72348401CEDE740 -:105300000720EBE70320E9E701A800906846038D3A -:1053100004223146384606F08AFF0028DED1002DEF -:10532000DCD00E990D70D9E730B587B01D460C461C -:10533000002A11D0042369460B7013888B81528890 -:10534000CA81A2788A7422880A8200236A46294682 -:10535000FFF77DFF07B030BD1020FBE77372635C81 -:1053600067617474635F636F72652E630000000091 -:105370007372635C67617474635F636F72652E63DD -:105380000000000025020000023000004F03000072 -:10539000F3B581B001980C4600780826030011F09F -:1053A00033F9125F47471B134B0A0A0A0A0A0A0A13 -:1053B0000A0A0A0A0A5F002C02D1F849F84808E0F4 -:1053C0006078304360703CE0002CF9D1F448F34938 -:1053D000083011F028F8F3E70198002380880122B3 -:1053E00087B20421384607F0C5FB0546002C04D0DF -:1053F0007520EA49C00011F016F8002D04D1E848E4 -:10540000E649143011F00FF83946A81D00F058FB9A -:10541000FCF78EFA040006D0607830436070678035 -:10542000FCF767FA0FE01321384605F0DBF915E0C9 -:10543000DB48DA49283002E0D948D8492D3010F04D -:10544000F2FF002C0AD06078000707D59320207067 -:105450002046582208300199FBF7B6FE0020FEBD19 -:10546000CF48CE493130EAE710B500210170801DE8 -:1054700000F023FB10BD0A4610B50146901D00F058 -:1054800027FB10BD70B5002305461A46042107F01E -:1054900071FB040004D1F920C049800010F0C3FF63 -:1054A0002946A01D00F00CFB70BDF7B5054684B081 -:1054B0000C4600206946088188806F8803460122D7 -:1054C0000421384607F056FB060004D1FD20B349FD -:1054D000800010F0A8FF002C03D0A7800020E080FF -:1054E0002081297A20461230C91E142700900B0013 -:1054F00011F08AF80FFEFDFC3809A95E657A2FB21B -:10550000C9E99191FC003078012804D0A3497020AA -:10551000143110F088FFA9896A46C8000E309080C7 -:1055200030201081002C13D0A18100200DE0C1009B -:10553000327909190A747288CA8182005319DA898A -:105540004A821A8A401C8A8280B2A1898142EED89E -:10555000F1E002A8009001AB22462946304600F057 -:105560002BFAE8E03078042804D08C49BD201431AF -:1055700010F059FFA8890622014650436A460E30B2 -:10558000908033201081002CE2D0A18100200BE01C -:10559000062141434F190919FA89CA81BA7C8A74D4 -:1055A0003A8A401C0A8280B2A1898142F0D8C2E0C6 -:1055B000307806280BD079491431D72005E03078AF -:1055C000062804D07549EB20143110F02CFFE8892F -:1055D00069461230888035200881002CB8D0A9890E -:1055E000A1817188E18126E03078072804D06B49D9 -:1055F000FF20143110F017FFA8896A4601460E30CB -:10560000908036201081002CA2D0A1812046AA894A -:105610000E30296954E0E8896946123080B2382298 -:1056200088800A81002C7ED0A989A181287A10283F -:1056300007D00221A173E9892182EA8929690098AA -:105640003EE00121F6E702A8009001AB2246294680 -:105650003046FFF787FC6EE03078082805D04F49C8 -:10566000FF201431EE3010F0DEFE684637218780CF -:105670000181002C5FD0A989A18100206082208255 -:105680000120A07357E03078092805D04349FF2056 -:105690001431FF3010F0C7FE288A69461430888024 -:1056A00037200881002C46D00421A173A989A1814B -:1056B000E9892182298A618220462A8A143069690F -:1056C00010F033FD37E030780A2804D033493548EC -:1056D000143110F0A8FE6846372187800181002C24 -:1056E00029D00521A1730020A08102E01EE003E083 -:1056F0000CE0208260821EE002A8009001AB2246EE -:1057000029463046FFF7F1FC15E00CE00D20694614 -:10571000392288800A81002C05D00120E0800020F9 -:105720002081207307E00699088019E01C481B4976 -:10573000A43010F078FE6846069980880880002C16 -:105740000ED0684600892080684680886080287A6C -:10575000032805D0102803D0112801D00020307074 -:10576000002007B0F0BDF7B5568815460F46002358 -:1057700082B01A460421304607F0FCF9040004D137 -:1057800007480649C43010F04EFEA41D33462A4691 -:1057900039460094029800F022FBD0E45C530000EC -:1057A0009503000013020000F7B58CB00D461446B7 -:1057B00007A90C98FFF730FD002812D1B64E01273B -:1057C000002C0FD00321684601701021818208A8A7 -:1057D00002460690204605A9FDF78FFA00280BD057 -:1057E00007207BE50821684601708581C681052177 -:1057F0008774C90201820BE00798A17801712188A2 -:105800004180684605218774C90201828581C6816D -:1058100002460121079B0C98FFF719FD5EE508B5CC -:1058200001236A4693709D4B13800A460223694602 -:10583000FFF77AFD08BD08B501236A469370974BC0 -:105840005B1C13800A4603236946FFF76DFD08BD04 -:1058500000B587B000290CD002236A4613700B886C -:1058600093814988D18100230421FFF7F0FC07B020 -:1058700000BD1020FBE710B5002903D00523FFF77A -:1058800053FD10BD072010BD70B588B00D461446FD -:10589000064607A9FFF7C0FC00280DD1002C0DD04B -:1058A0000621684601708581C481079B02465C80A1 -:1058B00006213046FFF7CBFC08B070BD05216846D5 -:1058C00001708581F1E710B588B000290BD007245D -:1058D0006B461C709A81049100236A462146FFF7AB -:1058E000B6FC08B010BD1020FBE770B500241722ED -:1058F00088B0002914D00D782B0010F085FE062307 -:10590000050519041B231522D21E93B2CA88002A4A -:1059100002D08E68002E03D09A4203D90C20CBE728 -:105920001020C9E7042D05D08A88002A0AD101E099 -:105930000620C1E7012D11D0022D05D0042D18D06D -:10594000052D23D00720B7E709236A4613704B883B -:105950009381CB88D381896804911DE00C236A462A -:1059600013704B889381CB88D38189680824049174 -:1059700012E00D236A4613704B8893818B88D38184 -:10598000CB88138289680924059105E00E236A46B5 -:105990001370497811730A2400232146FFF757FC3E -:1059A0008AE700B587B00F236A4613709181002300 -:1059B0001946FFF74CFC5AE7FEB50078089D1C46D7 -:1059C00016460F46012803D03549912010F02BFDD3 -:1059D000F889C0000E30208030202880387B001FDE -:1059E000C0B20190002E1DD0F889B081002516E0CC -:1059F000E8008419C0190090224641690E320198CE -:105A0000FDF755F9002802D000202074E0810098AD -:105A10006D1C008A60820098ADB2408AA082B08975 -:105A2000A842E5D8FEBD70B514461425049A1D8021 -:105A300037231380002C0ED0CA89A28100226282F3 -:105A40000078082808D0092810D00A2819D014494D -:105A5000144810F0E8FC70BD087B0C2804D01148F5 -:105A60000F490C3810F0DFFC012008E0087B0D28FE -:105A700004D00C480A49083810F0D5FC0420A07363 -:105A800070BD087B0E2804D006480549001F10F0A1 -:105A9000CAFC0520F3E70000FFFF00000228000019 -:105AA00070530000BB02000010B5FE4B5860197225 -:105AB0001A80C90010F098FB10BD002101807047CA -:105AC00010B50022D2430280032007F0F8FC10BD7D -:105AD0007047F0B50E460446017801208840F2492F -:105AE00099B008400090616815460888EF4A9042D6 -:105AF00006D0009A002A06D0EB4A521E104202D06D -:105B0000012019B0F0BD009A10430880002D12D07A -:105B1000002028702178EA1C0027681C01920B00E5 -:105B200010F072FD10F30E16233A59616F3CB4B0B9 -:105B30008AB8F2F1F0F320780B28EBD00420E0E7EC -:105B400002212970A1890170090A4170032097E0A0 -:105B500004212970A1890170090A41700198E18925 -:105B60000170090A417005208AE006212970A18987 -:105B70000170090A41700199E2890A70120A4A709B -:105B8000218A0171090A4171A28AE81DA16910F0F8 -:105B9000CCFAA08AC01D73E0082129702178082959 -:105BA00001D110212970A1890170090A4170019861 -:105BB000E1890170090A41700520308020466A1D84 -:105BC00002A91030FDF799F800287DD16946308888 -:105BD000097A401854E00A212970A1890170090A44 -:105BE000417003200BE00C212970A1890170090A82 -:105BF00041700198E1890170090A417005203080E7 -:105C00009CE0A08984464000401C81B230888842D4 -:105C10005AD3052958D30E202870002008E02369A4 -:105C200042009B5A521953701B0A401C937080B259 -:105C30006045F4D33180B9E09A48417A002973D0A5 -:105C4000491E4172217B4068C9004518A98828680F -:105C5000082240180838216910F067FA02216846C6 -:105C600001710021417128680390A988684601816B -:105C7000002101A8FFF78CFB0020A880002E00D097 -:105C8000308093E0297880221143297029784022BE -:105C90001143297029788909890112312970A18954 -:105CA0000170090A4170E289E81C216910F03DFA8F -:105CB000E089C01C3080287841063FD5C00975D0E6 -:105CC00001216846017200E02CE000214172318818 -:105CD000091D81810495E189019808180590001D2E -:105CE00006907048017A68460177002102A8FFF704 -:105CF0004FFB074630880C303080022F06D0002F33 -:105D000054D065E03DE033E01CE05EE06548694664 -:105D1000097F4268CB00D218037A994202D2918857 -:105D2000002902D0042753E02FE0417A491C417238 -:105D30001560308890800020308049E06168A0893B -:105D4000888033E029788909890116312970A18971 -:105D50000170090A41700198E1890170090A4170D6 -:105D6000228A681D616910F0E0F9208A401D46E72B -:105D700028788009800118302870207B6870022004 -:105D80007EE760680188090401D4052720E0C08807 -:105D9000A189884201D006271AE01E202870012020 -:105DA0003080606801884904490C0180009800280F -:105DB0000ED03C4800220088A1688300032007F031 -:105DC000D9FA61682078887007E0002030800327C6 -:105DD0006068009902888A430280384691E6FFB5E0 -:105DE0009FB0289D0E46002805D0172803D82A8882 -:105DF0002E4B9A4202D1072023B0F0BD32785306D1 -:105E000001D4D20901D00820F6E700226B461A71AE -:105E10005A7114463278431E1D939BB2189303ABFC -:105E20001A939706CB1CBF0E1B93821E711C3B005E -:105E300010F0EAFB209011EE66EE74EEB0EED4EEB8 -:105E4000EDEEECEEEBEEEAEEE9EEEEEEE8EEE7EE8E -:105E5000E6EEE5EE90EE05287CD10421684601715E -:105E6000A9780172F078B278010211436846418145 -:105E70003179417170788006800E0C282ED009DCB3 -:105E8000801E030010F0C0FB0919661C6621662401 -:105E90006627660012282AD00ADC0E2821D0102896 -:105EA000DAD121E00C090020FF710000FFFF0000A3 -:105EB00016281FD01828CFD11FE02878800701E0CE -:105EC00028784007002845DA45E128780007F9E7F7 -:105ED0002878C006F6E728788006F3E72878400699 -:105EE000F0E728780006EDE72888C005EAE728886B -:105EF000C004E7E728888004E4E728884004E1E755 -:105F00002A78920726D50328A6D105206A46107163 -:105F1000487809780002084310811CE12978490774 -:105F2000F0D5062816D3717890B2012902D0022943 -:105F300092D101E0022100E01021189106216A4669 -:105F400011710021118102AF189AB11C0237921C05 -:105F50001B921AE0B3E04A780B7812021A433A8097 -:105F6000801E891C1790BA1C1A911898FCF79FFE86 -:105F70001A991898189A091817986B46801A1A894E -:105F800080B2521C1A811B9ABF1D8242E3D900289D -:105F900086D1E0E028780007B4D51D98694682B222 -:105FA0000720087100200881701C0A3111E0437835 -:105FB00007781B023B430B80C37887781B023B4367 -:105FC0004B806F463B89121F5B1C001D92B23B81C8 -:105FD000091D042AEBD2002A71D1BCE02978C90638 -:105FE0006DD502286BD308206946087100204881CE -:105FF00070780872844692B2B01C1A9919E089E050 -:1060000090E07EE067E05BE030E025E019E013E03F -:10601000BCE0437807781B023B430B80831C4B603A -:106020006346D21A6F467B8960445B1C92B27B81C7 -:1060300008319445EDD9CEE7287880063FD509226E -:1060400003E0287840063AD50A2268460271AA88F9 -:106050000281189A428107E0287800062FD50B208C -:106060006A46107118981081039174E02988C90557 -:1060700025D5022823D30C206946087100204881C9 -:1060800070780872844692B2B01C1A9914E0437872 -:1060900007781B023B430B80C37887781B023B4386 -:1060A0004B80031D4B606346D21A6F467B89604468 -:1060B0005B1C92B27B8108319445E8D98BE763E0A1 -:1060C0002988C90460D501285ED10D216846017177 -:1060D000A98801813FE02988890455D5052853D333 -:1060E0000E2269460A71AA880A811B99401F4A78C4 -:1060F000097812020A4369464A818881701D04901A -:1061000029E0298849043FD501283DD10F2069465F -:10611000087120E02A88120436D44A780B781202DB -:106120001A43EA8003282FD332789206920E1B2A54 -:1061300026D011226B461A712A880123DB031A43E9 -:106140002A804A78097812020A4369460A81C01EE9 -:1061500048811B98039030788006800E1B2809D058 -:106160001D2807D00320229907F0A9F92888C00B21 -:10617000C003288001A82199FFF70AF920463BE6D1 -:1061800010226B461A71DCE70724F7E70824F5E7CD -:1061900000B597B0032806D16A461070019100211E -:1061A0006846FFF7F5F817B000BD000010B58B7812 -:1061B000002B11D082789A4207D10B88002B0BD08C -:1061C00003E08B79091D002B08D08B789A42F8D117 -:1061D00003880C88A342F4D1002010BD812010BD9B -:1061E000052826D0002A02D0012A0DD102E0098814 -:1061F000090501E009888904890F07D0012918D011 -:10620000022909D003290ED081207047002A01D02D -:10621000032070470220704703280AD0042808D0C2 -:10622000002804D007E0042803D0022803D005206A -:106230007047002070470F20704770B513880546DF -:1062400014460B8018061DD5FE481022807AA842FD -:1062500003D813430B80002070BDA06893430078DF -:10626000E840C007C00E03430B802078A178800768 -:10627000800D0843F4490FF0D2FFA0686943081865 -:10628000401C70BD906870BD37B569468B8813801F -:1062900019061BD5EB4C0125A47A9168844209D8D4 -:1062A000FE280FD1D80602D5A5406D1E00E00025BE -:1062B0000D7007E085400C78DB06DB0FAC438340B4 -:1062C0001C430C7010881021884310803EBDF8B527 -:1062D0000746C81C80080E468000B04201D08620C8 -:1062E000F8BD082A01D90E20F8BDD64D00202E6039 -:1062F000AF802881AA723446E88016E0E988491CFC -:10630000E980810610D48007A178800D0843CE492A -:106310000FF085FF206800F0BAFA2989401880B292 -:106320002881381A8019A0600C3420884107E5D4F0 -:106330000020F8BDFFB589B09F041646139DBF0C21 -:106340000193099800F095FA04000AD0207800061D -:1063500009D5BC48817A0A98814204D887200DB0BB -:10636000F0BD0120FBE7224669460A98FFF765FF6A -:106370000690002069460872052D14D0012221469E -:106380002846FFF72DFF0028E9D1207840060AD5DE -:10639000022168460172099981810188C1810682C2 -:1063A0004782129805900198000404D500273E46C4 -:1063B0000125079709E02078A1788007800D084320 -:1063C000A14907900FF02BFF0D46019840040AD514 -:1063D0000798A84207D12088E1788005800F000245 -:1063E0000843B04201D3AE4201D90720B7E7B8193C -:1063F00080B20190A84201D90D20B0E76846007A2A -:10640000002804D002A8FDF706F90028A7D10798B4 -:10641000A8420BD1208803210902884301998905EC -:10642000890F0902084320800198E0701498002821 -:1064300000D007801298002815D006983A46801997 -:1064400012990FF072FE224669460A98FFF7F5FE90 -:1064500069460888102188436946088022460099C9 -:106460000A98FFF711FF002079E7FFB5754D0C2260 -:10647000E8882968504383B00C180D9F724905982D -:106480000FF0CDFE0091049800F001FA29682A89E6 -:106490008E46611A0C310918944651188AB2A9889F -:1064A000914202D8842007B0F0BD6A46168A3206AF -:1064B00003D5B20601D58520F5E7EA88521C92B2D1 -:1064C000EA800E9B002B00D01A80B20601D5A7608F -:1064D00006E0604480B22881091A70460818A0605E -:1064E0002246FE200499FFF7CFFE0598A070009881 -:1064F000E07020880599800889058000890F08438D -:1065000003210902884300998905890F090208437C -:1065100004210843208003988078A07103980088A4 -:10652000A08000202073310601D5AC7A00E0012460 -:10653000B10600D5002700260EE0052100200191BC -:1065400002900097E88831460C9B069AFFF7F2FE0E -:106550000028A8D1761CF6B2A642EED30020A2E70E -:10656000F1B5009800F085F9060002D00025009CE6 -:1065700014E00120F8BD204600F07BF907460078C2 -:1065800031498007820DB87810430FF048FE386813 -:1065900000F07DF94019641C85B2A4B22948C18875 -:1065A000601E8142E7DC00992648491EC1800189AE -:1065B000491B018100203070F8BD002804D0401E26 -:1065C00010809170002070470120704710B504467C -:1065D00001881C48C288914201D3822010BD006806 -:1065E0000C22514342189079A07290882081108823 -:1065F000D1788005800F00020843A081A078211D7A -:10660000FFF71BFE20612088401C2080E0800020D6 -:1066100010BD012101827047F7B50546002084B006 -:10662000C043108068681746817868468170686842 -:1066300001886846018000218171288A2C88A04247 -:1066400005D303E0180900200102000004462C8253 -:1066500035E0288A401C2882301D6968FFF7A6FDB6 -:1066600000282AD139889248814201D1601E3880A1 -:106670006888A04228D33088F1788005800F000216 -:10668000084302906946301DFFF790FD002814D1A1 -:106690006989874881421BD0002231460598FFF75F -:1066A0009FFD002809D16A890298824205D1E968D4 -:1066B000B0680FF00DFD00280AD0641CA4B220467B -:1066C00000F0D7F80600C4D1641E2C828220EAE6CE -:1066D0007C80B079B871B088B8803078B1788007A4 -:1066E000800D084378810298B8813946287A32466D -:1066F0000831FFF7A2FD38610020D4E6FFB585B070 -:106700001C460F46059800F0B4F8050009D028781B -:10671000000608D56748807AB84204D8872009B0B7 -:10672000F0BD0120FBE707982A468605B60D6946AD -:106730003846FFF782FD07460E98052816D000223E -:106740002946FFF74DFD0028E9D1287840060DD5F0 -:106750000121684601710599018101884181868185 -:10676000C48101A8FCF757FF0028D8D12888AA784F -:106770008107890D11438005800FEA7800021043DC -:10678000079A964207D04C4A914204D3611E814237 -:1067900001DD0B20C3E7864201D90720BFE7801B3C -:1067A00082B2A24200D922461098002800D002806E -:1067B0000F98002802D0B9190FF0B7FC0020AEE7FF -:1067C000F8B51D4617460E4600F053F8040008D0F1 -:1067D0002078000607D53748807AB04203D8872052 -:1067E000F8BD0120F8BD224639463046FFF725FDA9 -:1067F000002D0BD02078A1788007800D08432E490A -:10680000884201D2012000E0002028700020F8BD5D -:10681000F8B51E4617460D4600F02BF8040008D0C8 -:106820002078000607D52348807AA84203D887201D -:10683000F8BD0120F8BD224639462846FFF724FD61 -:10684000FF2E14D02588A178A807800D08431A4987 -:106850000FF0E5FC002E03D1FF31FF31033189B287 -:10686000A170A80880008905890F084320800020B6 -:10687000F8BD1049CA88824207D3002805D00C22EF -:10688000096850430C38081870470020704703B55A -:106890000846694609888A0607D4090604D50549C9 -:1068A000897A4143491C88B20CBD00200CBD000010 -:1068B000FFFF00001809002001020000F8B507786A -:1068C0000D460446012F19D0072F02D00C2F19D1E5 -:1068D00014E0A068216906780B2E0BD0052006F085 -:1068E000EEFD052E0ED0782300220520216906F04A -:1068F00041FD07E0782300220620F8E70520216902 -:1069000006F0DDFD002D0ED000202870294620461F -:1069100004F0AEF9FE482978C05D884201D1032019 -:10692000F8BD0220F8BD0021204604F0A1F90020A6 -:10693000F8BD70B50E460C462036317901208AB07C -:106940001546002909D0012905D12978042902D149 -:106950000520107000200AB070BD6068019005A885 -:1069600002900D21C01C0FF03DFC032205A8A16878 -:106970000FF0DBFB01203071062069460870206AA9 -:10698000049029466846FFF799FFE4E770B50C4686 -:10699000154620310A790120062686B0002A2CD01F -:1069A000012A28D12978042925D169681022A068F4 -:1069B00001F0B4F96868C07B000606D5D44AA06827 -:1069C0001023103A014601F09EF91022A168E068F8 -:1069D00001F0A4F9A068C07B000606D5CC4AE068A7 -:1069E0001023103A014601F08EF92E70A0686860FD -:1069F000E068A860002006B070BD60680190C448DF -:106A0000203802900120087168460670206A0490C0 -:106A100029466846FFF752FFEDE7027B032A06D0BE -:106A2000002224235A540B78092B02D003E00420BF -:106A300070470A76CA61027B9300521C0273C150F0 -:106A400003207047F0B50E4615460C462036024628 -:106A500031790120072393B000290CD0012924D0DB -:106A600002292ED0032904D12978042901D12B70C1 -:106A7000002013B0F0BD01203071606800280DD0F7 -:106A8000A1690B7060684860206988606069C860AF -:106A9000206A08621046FFF7C0FFEAE70620287068 -:106AA000206968606069A86009E029780629E0D15A -:106AB0000220307104202870954820386860032037 -:106AC000D7E729780429D4D1A08910280AD9103809 -:106AD00080B2A081A1681023091805A86A6801F096 -:106AE00012F923E010282FD0C2B21020801AA1681A -:106AF0000DAF1190C0190FF018FB11980006000E91 -:106B000006D0401EC1B28020785438460FF06AFB90 -:106B1000626910230DA909A801F0F5F8102309A94D -:106B200005A86A6801F0EFF80320307160680190F1 -:106B300005A80290062069460870206A049029463C -:106B40006846FFF7BBFE94E710232269A168E2E7DD -:106B5000F0B50E460C4620363179012006278FB05D -:106B6000154600290BD0012932D0022905D12978F8 -:106B7000042902D10820107000200FB0F0BD217D43 -:106B800008A8CA07D20F02718807C10F08A80171AF -:106B90006846027041700722801CE1680FF0C5FA58 -:106BA00002A80722013021690FF0BFFA6068059042 -:106BB0000AA8069010236A46A16801F0A4F80120F3 -:106BC000307168460774206A0890294604A820E0BE -:106BD00029780429D1D1062205A8E1690FF0A5FA88 -:106BE00006A806220230A1690FF09FFA0020089043 -:106BF0006068019009A80290102305AA696801F055 -:106C000082F80220307168460770206A0490294695 -:106C10006846FFF753FEB0E770B50D460C462035C9 -:106C2000297901208CB01646002909D0012905D107 -:106C30003178042902D10920107000200CB070BDF9 -:106C40006068019006A802900822E1680FF06DFAD2 -:106C5000082208A8A1680FF068FA01202871062010 -:106C600069460870206A049031466846FFF726FEA0 -:106C7000E4E770B50D460C462035297901208CB02B -:106C80001646002908D00129D8D131780429D5D158 -:106C90000A2010700020D1E76068019006A80290D9 -:106CA0000822A1680FF041FA002008900990012005 -:106CB0002871062069460870206A049031466846AB -:106CC000FFF7FCFDBAE730B50B4620331C790120F5 -:106CD0008BB0002C09D0012C05D11178042902D1E8 -:106CE0000B20107000200BB030BD4868019005A843 -:106CF00002908C6868462578057564784475CC6880 -:106D0000257885756478C47500200690079001E0A9 -:106D10002867010008900120187106236846037057 -:106D2000086A049011466846FFF7C8FDDBE770B5B6 -:106D30000C462034034625790120002D0AD0012D70 -:106D400014D0022D05D111780A2902D10C2010701F -:106D5000002070BD01202071C868052202704A68B9 -:106D60004260F84A8260921CC2600BE015780B2DDD -:106D7000EFD102202071C868042404705268426078 -:106D80008A688260096A016201461846FFF745FE7B -:106D900070BD30B5011D02463132947803258379E8 -:106DA000ED432C4323408371DB070DD04B7954799D -:106DB00023404B710B79127913400B718278C9789B -:106DC0008A4200D9817030BD00224A710A71F5E70C -:106DD000F7B50C4686B00020694626460870203676 -:106DE000317901271E2015461F2977D24B007B449D -:106DF0009B885B009F441E0017023E0256026902F8 -:106E000088029A02D102F5022E03590371037F030F -:106E1000AE03C303CC03F7031A0464049A04AB045F -:106E2000DF04FE0410052A0565059B05C6058305DC -:106E300087058B056069002802D0007813287DD073 -:106E4000A0680590002849D0012168460170206A99 -:106E500004900321684601710A214171E0690290A2 -:106E600020790028EFD0059909780029E7D00C296E -:106E700064D20B000FF0C8FB0CFD1A4B90B5E8FC78 -:106E8000FBFAF9F807FD022828D16069002802D032 -:106E90000078082852D1022168460170206A0490C7 -:106EA00005984178684601710021B9E20620216AFF -:106EB00006F005FB20790728E6D1606900F050FF55 -:106EC00002280CD0606900F04BFF042807D06069ED -:106ED0000028B8D000780128D6D103E01BE2616910 -:106EE0000120087005980079C11F0A2901D30A20E2 -:106EF00050E06169072288706069059930300FF0B1 -:106F000014F90120307161690320087034E007280A -:106F1000BAD16069002896D001780929B4D10599C1 -:106F2000C978890707D1059949790029DFD10599E1 -:106F300089790029DBD105994A7900E04EE20146C2 -:106F400020314B7D9A43D2D1059A8B7D92799A4319 -:106F5000CDD1059A1279D31F0A2BC8D20979914253 -:106F600036D80722C01C05990FF0DFF801203071D8 -:106F700061690A200870032069460870206A04903D -:106F80006069313001906069001D029060691C30B9 -:106F90000390A1E22076F2E311288DD1606900F020 -:106FA000DFFE042804D0606900F0DAFE0B2893D1DC -:106FB0006069059910223730491C0FF0B6F86069F6 -:106FC000017804297CD12421095C8278914201D97D -:106FD0000620DFE70521017003203071684601704B -:106FE000E2E3112894D1606900F0BAFE062804D0CB -:106FF000606900F0B5FE0C288AD1E068002813D043 -:107000002069002810D060690178062910D00D2170 -:1070100001706069059910225730491C0FF085F8FE -:107020006069573009218CE100206946087072E1DF -:10703000072101706069059910224730491C0FF043 -:1070400074F860694730EDE70228F0D1606900F01C -:1070500087FE0028EBD0606900F082FE0128E6D0B0 -:10706000606900F07DFE05E0B1E08DE06CE02AE0B3 -:107070000AE0D6E00828DAD00521684601710598B3 -:1070800041786846417146E11128D0D160690028F5 -:10709000CDD001780E29CAD1C16A4078022810D01B -:1070A0000020142250431430085805991022491C1E -:1070B0000FF03BF80520216A00F040FE0F205EE053 -:1070C000F1E10120EDE70B28B1D160690028AED0D5 -:1070D00001780F29ABD1C16A4078022826D0002060 -:1070E000142250430C300958059842780A70807871 -:1070F00048706069C16A4078022819D000201422C3 -:1071000050431030085805990822C91C0FF00DF89B -:107110000520216A00F012FE60694178022909D039 -:1071200000220832825C5208520073E00120D7E747 -:107130000120E4E70122F4E7012100E00021083109 -:107140004254BCE30267010011289CD16069002809 -:1071500099D00178102996D1C16A4078022811D0BF -:107160000020142250431830085805991022491C59 -:107170000EF0DBFF0520216A00F0E0FD11206169BF -:107180000870B4E30120ECE7082884D16069002886 -:107190009DD00178112997D10599C06A497801706D -:1071A00060690599C06A0622401C891C0EF0BDFF6B -:1071B0000520216A00F0C2FD60694178022904D0EF -:1071C00000220832825CFD2323E00122F9E7112826 -:1071D000BBD160690028BBD001781229B5D1C16A42 -:1071E0004078022819D00020142250431C3008583F -:1071F00005991022491C0EF098FF0520216A00F025 -:107200009DFD60694178022909D000220832825C24 -:10721000FB231A40022991D18EE70120E4E70122E5 -:10722000F4E70720B6E6287801288ED160696968FE -:1072300014221C30F9F7C8FF6069017F002901D0D2 -:107240002176ACE30178032901D0032037E002273F -:10725000C77081794907490F8171017A4907490F40 -:107260000172417A4907490F41726069FFF791FD48 -:10727000377196E228780F28E3D107206946087015 -:10728000216A049191680291694608716169072237 -:10729000C91C02980EF049FF6169042008700020A3 -:1072A0003071BBE028780328CBD1606901780529CB -:1072B000696807D0082247300EF037FF042030718C -:1072C00005206FE208225730F6E728780328B8D166 -:1072D000606901780529696811D008224F300EF0E5 -:1072E00024FF052030716069006A00280AD002205E -:1072F0002870002028716069006AA860F9E00822FF -:107300005F30ECE704204DE22878022899D12879F3 -:10731000002801D0207642E36069A96801626069B3 -:10732000002901D1F949016206200BE228780F28D3 -:1073300087D1A868E0616069017805292BD04730C2 -:1073400007213171E16802220A706269126A4A609B -:10735000886060693030C8606069C01C086162691B -:10736000087D926A400812784000D207D20F10437D -:1073700008756269926A521C8A61FD221040626936 -:10738000D26A1278D207920F104308756069C06AFA -:10739000401CC86153E25730D2E728780828BAD198 -:1073A0006069017805291AD00B2101700720694610 -:1073B0000870206A0490E069029011200871029818 -:1073C0000321017051681022401C0EF0AEFE002116 -:1073D0006846FFF773FA00203071E06187E206210A -:1073E000E3E728780F2896D1072069460870206ABD -:1073F0000490A8680290112008710298042101707D -:1074000061690A78072A0ED0002232710C220A70B4 -:1074100061691022401C47310EF087FE002168464A -:10742000FFF74CFA63E21022401C57310EF07DFE4C -:1074300000216846FFF742FA0A203071E168032014 -:1074400008706069006A48606069573088606069E8 -:107450004730F3E128780828A1D1606969681022D3 -:1074600037300EF035FE002801D0042092E5606927 -:107470000078072817D00A203071E16803200870CF -:107480006069006A486060695730886060694730A9 -:10749000C860206A08620698FFF7BFFA074660696D -:1074A000FFF777FC6BE208207AE1287809289AD167 -:1074B0000B20307161696868897810224018511A70 -:1074C0000EF090FE082069460870206A04906868F3 -:1074D000019060698078087268E129780D29BBD134 -:1074E00061698979C90703D00C20307109203EE019 -:1074F0003071032770E228780E28ADD1606914221C -:10750000291D1C30F9F760FE6069018DC06A417267 -:10751000090A817260698178C06AC1716169CA6A49 -:10752000081D117AC909C9011172437962691943A9 -:107530008378D26A9B079B0F012B00D00023007930 -:107540009B01C00003431943117260694078012810 -:1075500076D0B4E160694178022901D0012100E0D0 -:1075600000210831405CC00707D00E20EAE06946E0 -:107570000870206A1146049019E11320B8E72878B2 -:107580000F2894D1A868E0610F2030710520EEE744 -:10759000287803288BD16069C16A4078022801D01D -:1075A000012000E000201422504310300858082227 -:1075B00069680EF0BAFD10203071E168062022697A -:1075C00008706069406A48606069C36A4078022850 -:1075D00001D0012000E00020142778431030185813 -:1075E000CA6088602BE128780C2886D16069C26A5D -:1075F0004078022801D0012000E0002014214843F7 -:107600000C30105802230932696800F07CFB11200D -:107610003071E168052008706069006A486060693F -:10762000C06A093088603948001F07E128780B28B4 -:10763000A7D161694878CA6A022802D0012001E016 -:1076400059E1002014235843143010588A7869688F -:107650000EF06BFD60694178C26A022901D00121F8 -:1076600000E00021142359431431525881785018F6 -:107670001022511A0EF0B6FD072069460870206AE4 -:107680000490E069029011200871029806210170AF -:107690006169CA6A4978022901D0012100E000210C -:1076A00014235943143151581022401C0EF03DFD53 -:1076B00000216846FFF702F90020E06112206FE028 -:1076C00028780F2891D1072168460170206A04901C -:1076D000906802900B2268460271029801706169FD -:1076E000CA6A4978022901D0012100E0002114234F -:1076F00059430C3151580A78427049788170616958 -:10770000CA6A4978022903D0012102E00867010012 -:10771000002114235943103151580822C01C0EF087 -:1077200004FD00216846FFF7C9F826E76069417843 -:10773000022901D0012100E000210831405C8007CE -:1077400003D5142030710A2011E71620D0E62878DE -:107750000F287AD1A868E061072069460870206A7E -:107760000490E069029011200871029808210170CC -:107770006169CA6A4978022902D0012101E011E158 -:10778000002114235943183151581022401C0EF087 -:10779000CCFC00216846FFF791F80020E06115203D -:1077A00030710A2069460870206A049029466846AC -:1077B000FFF784F82BE028780F2846D10720694688 -:1077C0000870206A0490906802900820087102985E -:1077D0000921017061690622C969097841706169EE -:1077E000801CC969491C0EF0A0FC00216846FFF707 -:1077F00065F8AAE760694178022901D0012200E01A -:1078000000220832805C400703D51720C8E70746EE -:10781000B5E0012953D070E028780F2815D1A86869 -:10782000E06118203071E168052008706069006A25 -:1078300048606069C06A09308860F848C860206A9A -:1078400008620698FFF7E9F8E1E76FE028780B286F -:107850006CD16069C16A4078022801D0012000E043 -:107860000020142250431C300858102269680EF082 -:107870005CFC072069460870206A0490E069029069 -:107880001120087102980A2101706169CA6A497859 -:10789000022901D0012100E00021142359431C31A9 -:1078A00051581022401C0EF040FC00216846FFF7A2 -:1078B00005F80020E0616069407801281DD1192099 -:1078C00016E660694278022A09D000210831411881 -:1078D000097800290DD0CA0703D00E2106E0012146 -:1078E000F4E7890701D5102100E01221017000277B -:1078F00072E0012A01D00D20FAE51C20F8E51D20D8 -:1079000030710B2033E62978102948D1F0E5606901 -:107910000178012943D0082941D00021317100F0BC -:1079200019FA0C2069460870206A049037E028781C -:107930000F2805D01020107003271B2030714BE05A -:10794000072168460170206A0490A868029002210D -:1079500068460171029805210170217E4170002165 -:107960006846FEF7ABFF0B2168460170206A049061 -:1079700029466846FEF7A2FF07461B203071012FFB -:107980000DD029E0012168460170206A049004218D -:1079900068460171217E41710020207612E0207E30 -:1079A00000280FD06169132008701A2030710A2056 -:1079B00069460870206A049029466846FEF77EFFF3 -:1079C000074609E06069002801D01421017068466B -:1079D0000078002800D021E5384609B0F0BDF7B5A1 -:1079E0000F4620373879012686B00C46002804D08F -:1079F000012828D002281CD197E02079012804D042 -:107A0000022811D0032814D10AE0A0684078012888 -:107A10000ED10620216A05F02CFD00287FD10CE054 -:107A2000A1681320087008E0A0684178022901D0FD -:107A3000052674E00078082871D1012038710A20E9 -:107A40006946087033E0089800780F2867D107214D -:107A500068460170206A049008988568029522792A -:107A60000220012A04D0022A29D0032A57D10FE08C -:107A70000646684606710B202870207B00214007CF -:107A8000400F68706846FEF719FFA068067045E071 -:107A900006466846067105202870207B6870002124 -:107AA0006846FEF70BFF3E710B2168460170206AA5 -:107AB000049068460899FEF701FF06462FE06846E5 -:107AC000017101202870207C6870607CC007C00FA5 -:107AD000A870A07C4007400FE870E17C2971C007C6 -:107AE0001FD0207D4007400F6871607D4007400F28 -:107AF000A87100216846FEF7E1FEA068072229462A -:107B000030300EF012FBE068017AA068203001717D -:107B1000A16828798870A16809200870002630467D -:107B20005BE70020A8716871E3E7A1681420087082 -:107B3000012168460170206A0490042168460171A1 -:107B4000217B41710021FEF7B9FEE7E7F0B585B072 -:107B50000F4605460124287B800040198038C66FF7 -:107B60003078411E0A290AD22C498000323140184F -:107B70008038C36F3A463146284698470446002C61 -:107B800001D0012C11D1287B401E0006000E287365 -:107B900001D00324DFE70D2069460870306A0490A5 -:107BA000002101966846FEF789FE032CD3D02046BB -:107BB00005B0F0BD70B515460A4604462946104684 -:107BC000FFF7C4FF0646002C0FD0207814280CD1F4 -:107BD000207E002806D000202870204629460C3040 -:107BE000FFF7B4FF204600F0B5F8304670BD70478F -:107BF00010B5012903D0022901D0052010BD417024 -:107C000000F0A8F8002010BD002809D0027E002A4C -:107C100006D00A4601460C31CCE700000667010099 -:107C20000120704730B5044687B00D46062005F0A8 -:107C300046FC2946052005F042FC2078142805D092 -:107C40000020694608702046FFF7DEFF07B030BD10 -:107C50007FB50E4600216A4611730178092903D0C9 -:107C60000A2903D0002407E0446900E08468002C5E -:107C700002D0217E002912D0154601462846FEF783 -:107C8000CCFE032809D1324629462046FFF792FF51 -:107C90006946097B002900D0042004B070BD254648 -:107CA0000C35EAE700B50023012285B005280CD089 -:107CB000062808D1684602700491022101714371BF -:107CC0000021FEF7FBFD05B000BD6846027004917F -:107CD0000271F4E710B590B00C4605216A461170A8 -:107CE000019022480290001D03900AA96846FFF700 -:107CF000AFFF002805D1102220460B990EF015FA8F -:107D0000002010B010BD30B505E05B1EDBB2CC5CCE -:107D1000D55C6C40C454002BF7D130BD10B50024A5 -:107D200009E00B78521E5B00234303700B78401C64 -:107D3000DC09D2B2491C002AF3D110BD70B50C4643 -:107D4000054605F0BCFB782300222146284605F0B5 -:107D500011FB70BD4178012900D0082101707047E6 -:107D6000002801D0007870470820704700670100A4 -:107D700038B50446002069460870204609F053FDD6 -:107D8000002803D1FBA1A3200EF04DFB204609F0F3 -:107D900099FC002803D1F7A1A8200EF044FB684607 -:107DA000007838BD70B5F84D002428462C77203077 -:107DB0008471C47101F09AF928464038047020306B -:107DC0008473847484772C75AC7170BD10B50C46C7 -:107DD000EE4982888A8042884A8000780870084686 -:107DE0000E38847009F050FC08F0FDFFFFF7DAFF51 -:107DF00020460BF013F8E449A8310846813809F011 -:107E0000ADFEE2480CF021FBE0480A3808F0FEFF26 -:107E1000002803D0D7A1C5200EF005FB01F066F9BC -:107E200010BD7CB50E461D46144601A909F008F8A0 -:107E3000002807D10AF091FB022803D1D248007D27 -:107E4000002801D001207CBD01988030807C09F0A1 -:107E50004DFC00280CD0684609F052FC0028F2D0F6 -:107E6000002C03D009F011FCA04206D200207CBDFA -:107E7000C0A1C7480EF0D7FAF8E7009809F0D8F883 -:107E80003146009809F0DBF8E2B22946009809F083 -:107E9000F0F909F045FC002804D1BD48B5A11E3019 -:107EA0000EF0C1FAB94C00250E3C6068A030417953 -:107EB000002902D045710BF0D8F860688030458306 -:107EC000C0E730B40179002904D0012907D030BCC3 -:107ED00000207047831D42880488022103E0428805 -:107EE0000488831D0121204630BC9AE7F8B51D4661 -:107EF00014460E4607460AF030FB022803D0A2487B -:107F0000007D002823D0A1480E3841684988398077 -:107F100040688030807C09F069FD002804D153203E -:107F200094A1C0000EF07FFA684609F069FD0028B0 -:107F30000DD0009809F0BAF83070022808D0012856 -:107F400006D093488BA167300EF06DFA0020F8BD83 -:107F50002946009809F0A4F92080002804D1552072 -:107F600084A1C0000EF05FFA09F05DFD002804D185 -:107F7000874880A160300EF056FA0120F8BD38B570 -:107F80000446831D821C6946FFF7B0FF00280DD010 -:107F90000020607168460078012808D0022806D0C9 -:107FA000FF2074A101300EF03EFA012038BD20718F -:107FB000FBE7F8B50AF0D1FA744D734C0E3D022878 -:107FC00002D0207D00287DD0207F0026102818D1E7 -:107FD000A079002803D067A16E480EF024FA6868E3 -:107FE00001464030827F92070BD526724988618115 -:107FF000C17F2173018CE181408C20820120A0711E -:108000002677614F203FB87C00285ED168686946BA -:108010008030807C09F007FC002805D0694668782C -:1080200009784018687004E05A4852A119300EF0DF -:10803000FAF9207D00283AD06868418852484038D3 -:10804000806D4088814204D00F204AA1C0010EF00B -:10805000EAF968688030807C09F0C8FC002804D107 -:108060004C4844A124300EF0DEF909F0EEFC002863 -:108070001DD068688030807CFFF77AFE69784018F0 -:10808000687041484038806D4030417A01290DD1F7 -:108090002670696849886180807A20710120B877EC -:1080A000207F102801D0282800D1267726756978EE -:1080B00000290AD06868428833484038C286018760 -:1080C000012000E001E0B8746E700AF029FA00287F -:1080D00005D1207D002802D0A878FAF7F9F8F8BD7C -:1080E000F8B50446FFF765FF274D0026203DA87E22 -:1080F000002808D0667010202070E87EA070287FCD -:10810000E070AE769AE0204F403F3878002808D0E3 -:108110002C22B91C20460EF008F80E2020703E706C -:108120008CE0A87B184F002815D0387F102808D085 -:10813000282806D0002804D0FF200EA1C2300EF05F -:1081400072F90120E070E87BA070287C60700F203D -:108150002070AE7372E00121204609F099FC0028DE -:108160001AD0387D002857D10021204609F090FC14 -:10817000F8BD00007372635C6C6C5F6374726C2E8C -:1081800073302E630000000094090020720000206C -:108190004F02000062070000A97CF8480090F848F0 -:1081A000002910D0017805290DD2491C0170667094 -:1081B0000D202070012028750622A01C00990DF0CA -:1081C000B4FFAE743AE0EE480670B879002812D0D9 -:1081D000387F002804D00120EA4940020EF023F93C -:1081E00066700120E54920700A221431A01C0DF0B0 -:1081F0009CFFBE7122E020460CF083F800281DD1C0 -:10820000A87C002802D0DE480178CEE7A87F0028AD -:1082100002D0387D002801D00020A9E7387F00284F -:1082200003D0D849D8480EF0FEF866700A202070B6 -:1082300006223946A01C0DF078FFAE77012097E7A3 -:108240004EE710B5CD4C343C2178002904D01321E1 -:108250000E2000F052FF10BDC9490088091D08F02A -:10826000EFFD002801D0022007E0C5484068014624 -:1082700020318A79012A02D00C20207105E00022E9 -:108280002271097E21724088E080012060711321F3 -:10829000E1700E21A170207010BDB84810B53438BF -:1082A0000178002904D024210E2000F026FF10BD03 -:1082B000012101702422C2700C220271417110BD93 -:1082C00070B5AE4C0546343C2078002804D03E21E1 -:1082D0000E2000F012FF70BD0AF03FF9002808D10F -:1082E0000AF03EF9002804D1A4480C30007F002891 -:1082F00001D00C2003E0287809F033FD0020207124 -:10830000012060713E21E170207070BD9B4810B566 -:1083100034380178002904D03C210E2000F0EDFE15 -:1083200010BD00210171012141713C22C270017018 -:1083300010BDF8B5914C343C2078002804D03B2186 -:108340000E2000F0DAFE13E70020A0710AF005F914 -:108350008A4E01250C36022802D0307D002840D0FC -:10836000874F694678688030807C09F073FA00286E -:1083700003D1844985480EF056F8307D002806D098 -:10838000A06D4030407A002801D0012600E0002690 -:1083900078688030807C09F029FB002804D17B4874 -:1083A000784908300EF03FF809F04FFB684031463D -:1083B000014316D07968FD2249882181217E400041 -:1083C000490849003143114001432176684600784D -:1083D000002802D00420014301E0FB200140217667 -:1083E000A5710020207165713B20E0702570BFE60B -:1083F00010B5624C343C2078002804D00E21084689 -:1084000000F07BFE10BD5E4906220831A01D0DF074 -:108410008CFE00202071012060710E21E17020701F -:1084200010BD70B5554C0546343C2078002804D06A -:1084300038210E2000F061FE70BD50480C30007FE6 -:10844000002807D00C202071012060713821E170D4 -:10845000207070BD287809F072FC28780CF05BF968 -:108460000020F0E770B5454D0446343D28780028DB -:1084700004D037210E2000F040FE70BD3F480C3084 -:10848000007F002801D00C200AE03D4E2188706852 -:108490004088884203D10AF060F8022807D0022001 -:1084A0002871012068713721E970287070BD7168EA -:1084B0007F2020310876487600208876A2788A715D -:1084C000E278CA7122790A72EAE710B52B4C343C83 -:1084D0002078002804D039210E2000F00EFE10BDB7 -:1084E0000AF03BF8032808D00AF03AF8032804D031 -:1084F00022480C30007F002801D00C2003E01F49E7 -:1085000000202C31C8712071012060713921E17087 -:10851000207010BD70B5194C0646343C20780028F8 -:1085200004D03A210E2000F0E8FD70BD0AF015F8E5 -:10853000032808D00AF014F8032804D00F480C30A0 -:10854000007F002801D00C2011E00C4D2C35E8797B -:1085500008280BD20001001910223146683000F0C3 -:10856000D6FDE879401CE871002000E0072020716A -:10857000012060713A21E170207070BD88090020EF -:108580006400002074810000210200001708000030 -:10859000F8B5FA4E04463078002804D03D210E206C -:1085A00000F0ABFDE4E5F5484030007F002801D045 -:1085B0000C2034E0F24D218868684088884203D15D -:1085C00009F0CBFF022801D0022028E06F68648800 -:1085D000FD883A896800B988401C844218D3E9486C -:1085E00041431046E84A50430DF019FE401EFF215A -:1085F00080B2F531884200D90846844200D2204634 -:10860000691C401C0DF00BFE6D1C6843401E85B2BA -:10861000E620C05D002800D1BD84F58000203071C7 -:10862000012070713D21F1703070A1E5F8B5D34C97 -:1086300005462078002804D035210E2000F05DFD8D -:1086400096E5CE484030007F002801D00C2016E08F -:10865000A878002801D0012804D1A888FF21F5318D -:10866000884201D912200AE0C54F298878684088DD -:10867000884203D109F071FF022807D0022020713F -:10868000012060713521E170207071E57968002664 -:108690000846C0310E70AA884A800122A0300271BB -:1086A000AA78012A00D000220A704079002801D05F -:1086B0000AF0DBFC2671E3E770B5B04C0546207884 -:1086C000002804D030210E2000F017FD55E709F0F6 -:1086D00044FF002804D1A9484030007F002801D081 -:1086E0000C2003E028780AF0E0FB00202071012034 -:1086F00060713021E17020703FE770B59F4C0546F6 -:108700002078002804D033210E2000F0F6FC34E756 -:1087100009F023FF002804D198484030007F00284A -:1087200001D00C2018E02978002911D00A290FD097 -:1087300014290DD01E290BD0282909D0322907D0A1 -:108740004B2905D0642903D0FF2901D0122003E072 -:1087500028460AF023FC002020710120607133219B -:10876000E170207009E770B5844C06462078251D1D -:10877000002804D032210E2000F0BFFCFDE6314677 -:10878000002009F0AEFA2870002805D17C480622A6 -:10879000314608300DF0C9FC012060713221E170D2 -:1087A0002070EAE670B5754C2178002904D031219B -:1087B0000E2000F0A2FCE0E600214156012504292C -:1087C00012D0002910D0081D0ED0001D0CD0001DA5 -:1087D0000AD0001D08D0001D06D00A3004D00A308F -:1087E00002D01220207103E0084606F079FD657181 -:1087F0003120E0702570C0E6FEB5604C0746207859 -:10880000002804D025210E2000F077FCFEBD38881A -:10881000694608F015FB594D01460020083500292E -:1088200004D002212171286028710FE00098009E79 -:108830000A30019060360020B07105222846019967 -:108840000DF073FCB0790028F5D13888E0800E2057 -:10885000A0702520E070012060712070FEBD10B571 -:10886000464C2078002804D005210E2000F045FC5D -:1088700010BD0020207108F008FFE08008F0D1FF53 -:108880002072012060710521E170207010BDF1B5EA -:108890003A4C2034A07B002804D010210F2000F097 -:1088A0002CFC65E4354D4035A8790C2610270028AE -:1088B00016D1287F002813D109F04FFE022824D1B9 -:1088C0002F4800994068098842888A421DD1014694 -:1088D000C0310A7A002A05D04030807F80070DD44D -:1088E000E6730EE05E22125C920707D406220A723B -:1088F000A0304079002801D00AF0B7FB2F77002084 -:10890000E07327740120A07332E40220F8E710B569 -:108910001A480178002904D00F210E2000F0EDFB49 -:1089200010BD00210171FF2181710021C943018126 -:1089300013490E310A7882728A8882814988C181FE -:10894000012141710E2282700F22C270017010BD90 -:1089500010B50A4C2078002804D02B210E2000F0FE -:10896000CCFB10BD0821A01D04F024FB00202071C9 -:10897000012060712B21E170207010BD540900208E -:1089800064000020C40900001027000070B5FA4DF3 -:1089900004462878002804D02A210E2000F0ADFBE0 -:1089A000EBE5F54810222146303800F0B0FBF248E4 -:1089B0001022A118203800F0AAFBEF4830380CF044 -:1089C000BCFBED49102210392C46A81D00F09FFB7E -:1089D000002020710E20A0702A20E070012060711C -:1089E0002070CAE5F8B50546E348E34C40300090F6 -:1089F000007F0C2628272034002801D0E6733EE0B3 -:108A0000A07B002804D028210F2000F076FB04E48E -:108A1000A87805280DD013280BD0142809D01528C4 -:108A200007D01A2805D0292803D03D2801D03B289B -:108A300003D12888D149884201D912201EE009F0CB -:108A40008CFD0228DAD1CE482A88406841889142BC -:108A500013D10146C0310A79002ACFD1AA784A71D0 -:108A600001220A710099A0300F770021E17340794B -:108A7000002804D00AF0F9FA01E00220E07327741C -:108A80000120A0735FE4F8B5BB4F064638783D1D62 -:108A9000002804D017210E2000F02FFB53E43146AC -:108AA000012009F01EF901242870002807D1B248DE -:108AB00006226030314605460DF037FBAC717C7103 -:108AC0001720F8703C703EE470B5AB4C0646207839 -:108AD000002804D00B210E2000F00FFB4DE509F01B -:108AE0003CFD032808D009F03BFD032804D0A24830 -:108AF0004030007F002801D00C2016E03378002B96 -:108B000003D0012B01D012200FE09B4DE035297AD4 -:108B1000082909D22846721C0C3006F097FB287AE7 -:108B2000401C2872002000E00720207101206071A5 -:108B30000B21E170207020E510B58F4C20780028C3 -:108B400004D00A210E2000F0D8FA16E709F005FD3E -:108B5000032808D009F004FD032804D086484030DB -:108B6000007F002801D00C2002E000F0BFFA0020B6 -:108B70002071012060710A21E1702070FDE610B5BE -:108B80000AF032F9002803D07E497F480DF04BFCF3 -:108B900008F04BFD0BF051FC002804D01720794958 -:108BA00040010DF040FC08F0ACFF002804D0B920D3 -:108BB000744980000DF037FC00F098FAFFF7F2F8E6 -:108BC0006D4800210171012141710222C2700170C2 -:108BD000D3E610B5684C2178002904D020210E205E -:108BE00000F08BFAC9E601781F290ED8411C0CD081 -:108BF000002121710278411C104609F08FF80120F4 -:108C000060712021E1702070B7E612202071F6E734 -:108C1000F8B5594C2178002904D01B210E2000F012 -:108C20006CFABFE401216171534E0C212171403671 -:108C3000317F00296FD10078514F0025012804D0E1 -:108C400000284AD01220207165E009F086FC002837 -:108C500003D109F085FC002804D009F07EFC02282D -:108C600022D058E008F08FFF002854D0307D002833 -:108C700051D1786801224580032108F0B4FB78685F -:108C800009F05AF97868923008F001FD002803D104 -:108C90003C493E480DF0C7FB0AF00BF9002839D0DB -:108CA00085203849C00015E009F05AFC002832D16F -:108CB000707F00282FD001282DD004282BD008F059 -:108CC00062FF002827D00AF0F4F8002822D02F48AD -:108CD0002C4918300DF0A7FB1CE009F03EFC0328DE -:108CE00004D009F03DFC03280FD014E000200AF066 -:108CF00005F800280FD12571307D00280BD1786848 -:108D00008030807CFFF734F805E0002009F0F6FFA2 -:108D1000002800D125711B20E0700120207041E463 -:108D200010B5154C2178002904D01A210E2000F02E -:108D3000E4F922E601781F290ED8411C0CD000214D -:108D400021710278411C104608F0FDFF012060717E -:108D50001A21E170207010E612202071F6E770B53C -:108D6000054E044630780C25002811D018210E201D -:108D700000F0C3F9AAE4000054090020FF0E00002F -:108D80006400002074810000D3020000240400006D -:108D900009F0E3FB03285AD009F0E2FB032856D080 -:108DA000E14A107F002852D16079002801D00128C3 -:108DB0002DD1A079002801D0012828D1A07B00283E -:108DC00005D0012803D0022801D003281FD1607BE1 -:108DD00000281CD0C0081AD161880120800381427C -:108DE00002D82388834203D9207901280FD119E0C2 -:108DF0002079002806D0012814D0022805D00328A5 -:108E000005D102E020290BD30CE0A02B0AD2207957 -:108E1000042805D12088202802D36188884201D9FE -:108E2000122514E0207950776079002802D00128BB -:108E300003D00CE0BD4A002105E0BB4A2032907906 -:108E4000002804D00121204608F0CEFE054601206E -:108E5000357170711821F170307037E470B5B24C13 -:108E60000546403C2078002804D02E210E2000F03A -:108E700044F92BE409F071FB0C22022815D1AA4811 -:108E8000007F002811D1A9482B88083841684888FC -:108E900083421AD10846C030037A002B05D1203115 -:108EA000C97E0F2903D0102901D0227103E00521CA -:108EB0000172002020710E20A0702E20E070288802 -:108EC000E08001206071207016E40220F2E770B5A6 -:108ED000954C0546403C2078002804D02D210E20DA -:108EE00000F00BF908E409F038FB0C21022814D13A -:108EF0008D48007F002810D18C4E2A88083E70686B -:108F000043889A4220D1C822125C002A05D13B2214 -:108F1000125C0F2A03D0102A01D021710AE010221E -:108F2000A91CD6300DF001F970680421C03001721F -:108F3000002020710E20A0702D20E0702888E08095 -:108F40000120607120700DE40220F2E710B5017875 -:108F50000B000DF059FB3F9E9E399E9E599E9E9E92 -:108F60009E3C3F9E9E8752559E9E999E9E9E432963 -:108F70009E2D319E9E9E9E359E9E9E955C9E9E47FA -:108F80009E4B4F9E21259E6C6064689E709E7F83E1 -:108F90007C788A8D74919E00801CFFF798FF76E0A4 -:108FA000801CFFF75BFF72E0801CFFF7D8FE6EE0CD -:108FB000801CFFF7B5FE6AE0801CFFF729FE66E023 -:108FC000801CFFF706FE62E0FFF7D9FD5FE0FFF7C8 -:108FD000B3FD5CE0801CFFF777FD58E0801CFFF7D5 -:108FE00052FD54E0801CFFF7FDFC50E0801CFFF7B1 -:108FF000CDFC4CE0FFF7ACFC49E0FFF788FC46E015 -:10900000801CFFF744FC42E0FFF729FC3FE0801C96 -:10901000FFF7F2FB3BE0801CFFF7C4FB37E0801C4E -:10902000FFF7A1FB33E0801CFFF767FB2FE0801CFC -:10903000FFF742FB2BE0801CFFF7F8FA27E0801CCB -:10904000FFF7A6FA23E0801CFFF764FA1FE0FFF7A2 -:109050003CFA1CE0801CFFF705FA18E0801CFFF7C3 -:10906000E0F914E0FFF7C4F911E0FFF762F90EE050 -:10907000801CFFF74BF90AE0801CFFF721F906E09E -:10908000801CFFF70AF902E0801CFFF7DAF80120E4 -:1090900073E4002071E470B52349244C054640393F -:1090A000083C0A460126403260682B000DF0ACFAFD -:1090B00005171A1A04171A000122002108F093F963 -:1090C000616800220846C0310A724A7209F067FFDF -:1090D000002803D016A11B480DF0A5F960E4167511 -:1090E00088655DE4174812A13330F5E70E4900208A -:1090F000C031C8612039087270470B4A203A937E0C -:10910000002B03D1D076117701209076704730B5CF -:10911000134606E0CC18203CE47FD51A44555B1E6C -:10912000DBB2002BF6D130BD940900206C0000208A -:109130007372635C6C6C5F6374726C2E73302E633D -:10914000000000005108000070B5FD4D040008D07B -:10915000012C10D0022C07D0032C05D0F9A17020CF -:1091600007E0F8A1672004E02878012803D0F5A1E2 -:109170006D200DF058F92C7070BD70B5F04D04469F -:1091800010280AD0112C16D028468178122C07D02E -:10919000132C0AD0EBA19F200BE0EAA1942008E059 -:1091A000112908D0E7A1992003E0112903D0E5A1F6 -:1091B0009C200DF038F9AC7070BD10B5E04894B04B -:1091C000007B002819D0172069460870DC4900A8E8 -:1091D00006220D3102300CF0A8FF09A96846F9F704 -:1091E000C2FE0446112805D0002C03D0D5A1BB2017 -:1091F0000DF019F9204614B010BD3220E4E710B587 -:1092000001220023114603F0B5FC10BDFFB595B057 -:109210001D460E460746FFF7F2FF04000AD02078ED -:10922000222804D3A07F8006C00FA84204D10820C2 -:1092300019B0F0BDC748FBE7372168460170478089 -:10924000002D05D00121017146711799817102E04D -:1092500000206946087109A96846F9F784FEA07FD5 -:10926000DF21084069010843A0770020E0E770B5DE -:109270000446084620380D4603000DF0C5F90A06DD -:109280000A11232C334249505761FF20ADA1083009 -:1092900052E02078202851D1FF20AAA10B304BE0CA -:1092A000A7480178032949D08078132846D0207830 -:1092B000242843D0252841D023283FD0FF20A1A136 -:1092C0000E3039E02078222838D0232836D8FF20E5 -:1092D0009CA1153030E0207822282FD0FF2099A1C2 -:1092E000193029E02078222828D0242826D02628C2 -:1092F00024D0272822D0292820D0FF2091A11C305B -:109300001AE02078252819D0FF208EA1233013E001 -:109310002078252812D0FF208AA126300CE0207862 -:1093200025280BD0FF2087A1293005E020782828A8 -:1093300004D0FF2083A12C300DF075F8257070BD8E -:10934000FF2080A12F30F7E730B5834C0B88834A8C -:10935000022801D0934204D09D1FA54225D20228A5 -:1093600002D04D88954203D04D88AD1FA5421CD236 -:109370004C88A34219D88B88FF25F435AB4214D80A -:10938000022802D0C888904205D0C888724D0A3899 -:109390002D1FA84209D2C888904208D0944206D016 -:1093A0005B1C63438000834201DB072030BD00204B -:1093B00030BDF0B56A49884245D36A4A0125AD04FB -:1093C0001368A84201D398423DD30279002A06D0FF -:1093D000082A02D8067B082E05D90720F0BD047B99 -:1093E000002CFAD0F6E7002A06D004688C422AD373 -:1093F000AC4201D39C4226D3002E06D084688C4216 -:1094000021D3AC4201D39C421DD300240CE005685B -:10941000A700ED598D4216D30127BF04BD4201D3E9 -:109420009D4210D3641CE4B2A242F0D80022012570 -:10943000AD040CE084689700E4598C4203D3AC423D -:1094400003D39C4201D21020F0BD521CD2B29642EE -:10945000F0D80020F0BDFFB50022099B002802D003 -:10946000994205DC58E0002902D1002004B0F0BD8B -:109470000920FBE7845C002C12D087187D78112D21 -:1094800043D010DC2B000DF0BFF80A401726262C25 -:109490002C2E2E363640835C002B30D1521CD2B29B -:1094A0008A42F8DBE1E71C2D2FDA123D2B000DF08C -:1094B000ABF8042C2C121A2C022CD9D1BB78039CAB -:1094C000072B237001D25B0701D40A20CEE7029B51 -:1094D00001241B7816E0E343DB0708E0012C08D0E9 -:1094E00013E00620C2E70F2523072D075B19002B89 -:1094F000F4D03046BAE7029B1B789C0701D50B20BD -:10950000B4E702242343029C2370835C521C9A1804 -:10951000D2B28A4202DDABE7192676028A42A9DB83 -:10952000A3E710B504780B46002C1FD001210E4A8A -:10953000012C1ED0022C22D0032C2AD125E00000C1 -:10954000740A00207372635C6761705F636F726599 -:109550002E630000023000007B0C0000FFFF0000C3 -:109560000080010028000020023200000021197054 -:1095700011E019708179890903290AD10BE019706A -:1095800081798909012904D105E019708179890956 -:1095900001D0104610BD411C0622581C0CF0C5FD20 -:1095A000002010BD08B51346002806D0FEA00068B4 -:1095B000009048796A468009105C18700622581C91 -:1095C0000CF0B3FD08BD30B50C46097895B02229E2 -:1095D00002D2082015B030BD282369460B704880A0 -:1095E000132A03D03B2A01D00720F3E708460A716B -:1095F00009A9F9F7B8FC050003D121212046FFF79E -:1096000036FE2846E6E700B595B0232369460B7081 -:109610004880108888805088C880D0884881908889 -:10962000088100208881C88109A96846F9F79BFC58 -:1096300015B000BD70B50C00064610D0FFF7DFFD79 -:10964000050003D1D949DA480CF0EDFEA68028893F -:10965000E0802889208168896081A889A08170BD07 -:1096600070B50E46050003D00021092003F027FF46 -:109670000120D04C022E207324D0032E04D0CC48DD -:10968000CA491E300CF0CFFECA4806210D3003F047 -:1096900091FCA07C8006800EA074FFF78EFDA08B4D -:1096A00000280ED0002D0CD08300012200210920BB -:1096B00003F060FE092804D0BD48BC4928300CF0F6 -:1096C000B2FE70BDBB480321103003F073FCA07CD8 -:1096D00040218006800E0843A074B6480C3002F08A -:1096E00015F9DAE77FB501A9012003F0C3FA0028D4 -:1096F00004D0AF48AD4967300CF095FEAE4E01A8DE -:1097000003F0C6FA050002D0052D4CD048E0029CBB -:10971000A07F01072CD520462230009068462346C2 -:10972000628E80882146343301F07BFA0546A07FA3 -:10973000F7210840A077002D05D0B5422FD09C48D6 -:109740009A49783029E0E17F480889074000C90F2D -:1097500008432021095D4007400FC9000843E07716 -:10976000207828281CD129212046FFF780FD17E00A -:109770004007C4D568462246808821460E32FFF74E -:1097800042FF0546A07FFB210840A077002D07D0AF -:10979000B54204D08648854992300CF044FE00253D -:1097A000284604B070BD0020FBE7F8B5040004D1E2 -:1097B000ED207E4980000CF036FE7220207060683B -:1097C00008250178091F0B000CF01EFF11F90A3D56 -:1097D0005FF83D0EF8F83E3D3D3D3DF986F93D0010 -:1097E00073487249AA3074E087883846FFF707FD4E -:1097F000060004D16E486D49B2300CF014FE60785A -:109800000421284360706B4CA07F0843A07721217E -:109810003046FFF72CFDB07F8007800F012801D173 -:10982000801EA080384602F057FE3846FBF72AFE1D -:109830003846FAF7C6F93946022003F040FEB07FF9 -:10984000EF210840B077F8BD86883046FFF7D7FC97 -:10985000002804D156485549D0300CF0E4FD60682A -:109860008078012804D052485049D2300CF0DBFDFA -:1098700060688179304602F04EFF0028E3D06178BD -:10988000294361706168C880F8BD87883846FFF752 -:10989000B6FC060004D146484449E3300CF0C3FD51 -:1098A00060783946284360706068C088308160689D -:1098B0000089708160684089B081022003F0FFFD5B -:1098C0000020B075FFF70EFF0028DDD001203749DA -:1098D00080020CF0A8FDF8BD80783C2815D0002748 -:1098E000022815D00026002804D031482F49F8302E -:1098F0000CF099FD0021084603F0E1FD002107204E -:1099000003F0DDFD002E05D046E001270026F1E73B -:109910000126EAE76078284360702648817F294362 -:109920008177002F38D160688688304601F055F87D -:109930000546807F6168800889798000012900D010 -:1099400002210843A87760680622C08A28816068DF -:10995000008B68816068408BA8816068C079E87579 -:1099600061682846183008310CF0DFFB6068062279 -:10997000807B68706168A81C0F310CF0D6FBA87F53 -:109980008107890F304602F090FDA87F8007800F85 -:10999000012801D10748868006480178032913D0A1 -:1099A0008078132814D00BE00302FF0144950000D7 -:1099B00013030000740A0020023000000CE00FE0E6 -:1099C000FF20FCA1453084E70120FFF7BDFBF8BD77 -:1099D0001120FFF7D2FBF8BD204601F02AFCF8BDAC -:1099E000607828436070F8BDF7B505460078002719 -:1099F00000090C463E4601287ED00022F14902288B -:109A00007BD0072804D00A2878D0EAA1EE482DE1BF -:109A1000686803780D2B31D006DC042B6FD0072B40 -:109A200036D00A2B6AD106E0122B38D0132B40D047 -:109A3000142BF7D1B2E011270726002C72D08088B2 -:109A4000A0806968FB238979A171E04905468A7F76 -:109A50001A408A77032103F0C5F80421284603F051 -:109A6000C1F80021284603F0BDF80221284603F082 -:109A7000B9F80121284603F0B5F8F9E001270926D5 -:109A8000002CDBD08088A080686880792072EFE0AD -:109A900012270E2680882146FFF7CCFDE8E01A2722 -:109AA0000726002CCAD04088A08068680079A07181 -:109AB000DEE081783C2936D010271E26002CBDD050 -:109AC0008088A0806868C08A20836868C08AE08235 -:109AD0006868008B60836868408BA0836968207D1C -:109AE000497F4008C9074000C90F084320756968CD -:109AF000C007C00F497F03E05FE08AE0ADE01CE0F3 -:109B000049084900084320756968A21DC8790831D1 -:109B1000FFF748FD69682246887B0D320F31FFF759 -:109B200041FD05E074E019270726002C70D0A271D2 -:109B3000A648F722817F11407DE01B272E26002CAE -:109B400066D0A1806968A21D0879491DFFF72AFD2A -:109B500068682030C07A60736868C0780428A07B89 -:109B600019D040084000A073F921084069681F22FD -:109B7000C9788907490F0843A07369684007C97A03 -:109B8000400FC9000843A073696820460F300C31AC -:109B90000CF0CBFA6CE001210843E4E71E270E2607 -:109BA000002C6DD0A1806868E21D407AA0716968C0 -:109BB0008878C91CFFF7F6FC5AE0287A012805D0FE -:109BC000022815D080487BA132384FE01D270E2691 -:109BD000002C55D06888A080A889E080E889208181 -:109BE000288A6081688AA0817848DF22817FA2E785 -:109BF00012270E266888FFF71DFD002C40D06878DC -:109C00004007400F032833D17048FD22817F92E73F -:109C100036E0287A03000CF0F7FC06041010202030 -:109C2000202619270726002C2AD0A1806748A27178 -:109C3000817F4908490081771AE019270726002CFF -:109C40001ED0A180287A012805D00320A0715F488A -:109C5000EF22817F6FE70220F8E721462846029A2B -:109C600001F04BFCFEBD532052A100010CF0DBFBC8 -:109C70000298002C068001D0278066800020FEBD5F -:109C800002980680FAE710B5504894B080781328FF -:109C900002D0082014B010BD22206946087009A91E -:109CA0006846F9F760F904460021072003F007FC35 -:109CB0002046EFE700B5454895B08078122801D0DE -:109CC0000820B5E41E216846017000218170C17032 -:109CD00009A9F9F748F90028F3D10021072003F07A -:109CE000EEFB1120FFF749FA0020A1E400B5374848 -:109CF00095B00078022801D0032818D11B2108A8AC -:109D000001730021817369460BA8F9F72CF900282B -:109D100004D1684640781B2801D0032088E4002144 -:109D2000084603F0CCFB68468078002801D0082064 -:109D30007EE40120FFF708FA002079E4F8B5234C0F -:109D400003000CF061FC0A068017808080804B3590 -:109D50006E80FFF7CBFF00282AD1F7F7E9FD002836 -:109D600026D02221017000210172F7F7C2FDA07FE9 -:109D7000012152E08EB23046FFF741FA050004D1CE -:109D800011480CA12E300CF04EFB287821280FD062 -:109D9000F7F7CEFD00281BD01221017002270772B1 -:109DA00046800020A875F7F7A4FDA07F3843A07770 -:109DB000F8BD00007372635C6761705F636F72650A -:109DC0002E630000FFFF000036050000740A00202B -:109DD000132229463046FFF7F6FBE9E7A578122D56 -:109DE00006D0132D07D0FA49FA480CF01CFBDFE728 -:109DF000FFF760FF01E0FFF746FF0028D8D1F7F733 -:109E000097FD0028D4D022210170122D07D0022105 -:109E10000172F7F76EFDA07F10210843C7E701210B -:109E2000F6E7A07C810901290BD0800904D0E9481C -:109E3000E74922300CF0F7FA03210020FFF710FC6D -:109E4000B6E70221F9E7E348E1492930CDE7F7B564 -:109E500014460D0004D1DF48DD4931300CF0E3FA3F -:109E600028780827012807D002281FD0D948D849C8 -:109E700062300CF0D8FAFEBD0098FFF7C0F906007A -:109E800004D1D448D24938300CF0CDFA0220B07554 -:109E90001030207060783843607007CD083407C4F4 -:109EA000CD482022817F11438177FEBD0098FFF7C6 -:109EB000A6F9060004D1C748C54946300CF0B3FAEC -:109EC000A988C648814208D1EA88824205D1132276 -:109ED00031460098FFF777FBFEBD814202D1E8884A -:109EE000002809D01220207060783843607007CDB8 -:109EF000083407C4002006E07823002202200099DD -:109F000003F038FA0120B075FEBDB34840897047B0 -:109F1000FFB591B01498F8F721FF00285DD1012416 -:109F2000684603218471C9028180002201A920466C -:109F3000FAF719F9002850D16846152184714902B1 -:109F4000818000261C2102A800960CF04DF901200A -:109F50000146684610310170002001466846417094 -:109F60008178F9273940891C21438170017A0225C3 -:109F70002943017212998186C6861F2101870C90A0 -:109F800011980F9001A80B9009AA0BA902A8F9F744 -:109F9000B5FE002821D168468F4E808CF08068463F -:109FA00084718F498180807809AA3840801C4108DB -:109FB0004900684681708586058713A80F900BA914 -:109FC00002A8F9F79BFE002807D16846808C3081F3 -:109FD00031460A311498F8F7D4FE15B0F0BD30B50B -:109FE0000C46804995B08C4241D37F4901229204AE -:109FF0000968944201D38C4239D3203800220125CC -:10A0000003000CF001FB06042F494D535C64002152 -:10A01000082003F02EFA002802D0112015B030BD20 -:10A0200024206946087000A80522A11C02300CF00B -:10A030007CF809A96846F8F796FF050002D0082DBC -:10A040000ED031E0082300221146184603F092F9A1 -:10A05000082829D05F485E49D6300CF0E4F923E0A7 -:10A060000620DBE76068002803D0884201D2102078 -:10A07000D4E73D2168460170218841806188818054 -:10A0800009A9F8F770FF05000ED1606800280BD011 -:10A090006946098D018007E0206801F079FC02E043 -:10A0A000204600F0D8FC05462846B7E73E2007E0EA -:10A0B000857000E0827009A9F8F755FFF3E73420B6 -:10A0C000694608702078C0076846F3D0F0E707209B -:10A0D000A4E730B50C46444995B009688C4201D2DA -:10A0E00010209BE7203803000CF08EFA0504212194 -:10A0F000232132002088FFF782F8002804D000785E -:10A10000222803D2082089E7384887E725216846B6 -:10A1100001702188418009A9F8F725FF050015D1B4 -:10A120000AA905220231A01C0BF0FFFF0EE0062554 -:10A130000CE02068002805D0884201D2102505E0F7 -:10A1400001F01BFC24480025808BA080284665E791 -:10A15000072063E720481330704710B520211E48C0 -:10A160000CF040F80120FEF7EFFF1120FFF705F893 -:10A1700000211948C943818000218176E1218900AD -:10A18000818301460C300D310446F7F751FC12482B -:10A190000722214613300BF0C8FFFFF70EF8002806 -:10A1A00003D00B4912480CF03EF900F0D5FF10BD6A -:10A1B00010B504463C210CF015F8A07F8008800003 -:10A1C000A077202020700020A0752034607010BD82 -:10A1D000B49D00008C050000740A0020FFFF000001 -:10A1E000012A000000800100280000200230000049 -:10A1F000FB0600007047FEB50546FF480C4681424D -:10A2000007D301208004844205D3FC4800688442BF -:10A2100001D21020FEBD002D02D0012D32D126E04A -:10A22000F74908220F4668460BF07FFF3946204663 -:10A23000FFF777F90028EDD1FEF7BFFF060006D043 -:10A240000722694638460BF070FF3046FEBD207885 -:10A25000002801D0012805D1E94807223946C01D50 -:10A260000BF063FF0021092003F029F90FE00978C2 -:10A27000002907D0012905D0022905D0032903D0E0 -:10A28000E048FEBD0720FEBD0120FFF7E9F9DC48EC -:10A290000C3885760020FEBD10B5D8490968884283 -:10A2A00001D2102093E7D64902460C390B7B0D31C1 -:10A2B0001846FFF777F9002089E7FFB599B0054602 -:10A2C000002069460871087208A9087408751446C8 -:10A2D000CA480122C849920400681E46002D05D0D4 -:10A2E0008D420BD3954201D3854207D3002C08D071 -:10A2F0008C4203D3944204D3844202D210201DB076 -:10A30000F0BD2846204318D01F270CAB01AA0097A8 -:10A3100028461A99FFF79FF80028F0D10DAB02AA42 -:10A32000314620460097FFF796F80028E7D16846A7 -:10A33000007AC10703D00A20E1E70720DFE78007A2 -:10A3400005D568460079800701D50B20D7E703AF14 -:10A35000002D0FD01A20694608731A988873294671 -:10A36000F81C1A9A0BF0E1FE0EA903A8F8F7FBFD02 -:10A370000028C4D1002C0ED02021684601738673BA -:10A3800032462146F81C0BF0D0FE0EA903A8F8F7C0 -:10A39000EAFD0028B3D19A4908A8007C0C3948701E -:10A3A0000020ACE770B504460A2020700D46204618 -:10A3B000F8F7D9FD002805D139202070294620461C -:10A3C000F8F7D1FD70BDF7B500260C4605460B2702 -:10A3D0001AE02968B00009580978002903D001293A -:10A3E00001D00720FEBDA170296806220958E01C93 -:10A3F000491C0BF09AFE277020460299F8F7B3FD2E -:10A400000028EFD1761CF6B22879B042E1D80026B8 -:10A410003A270FE0A868B10041581022A01C0BF0A9 -:10A4200084FE277020460299F8F79DFD0028D9D1B7 -:10A43000761CF6B2287BB042ECD80020FEBDF0B509 -:10A44000044671A003C897B06B4B00271591149078 -:10A450009C4211D369480125AD040268AC4201D386 -:10A46000944209D32078012809D16168994203D325 -:10A47000A94204D3914202D2102017B0F0BD604926 -:10A480000C390A78012A0CD18A88614B9A4203D090 -:10A49000002806D0012804D08A7F13079B0F06D11D -:10A4A00001E00820E9E7D30701D1910701D5112088 -:10A4B000E3E7218A574B0A46203A9A4207D30128FC -:10A4C00075D1002973D1628A002A70D111E0022867 -:10A4D00001D0032801D1A02969D3012809D0484A15 -:10A4E0000C3A5278D20704D0628A002A5FD0B42A8C -:10A4F0005DD8002806D0012808D0022804D00328FF -:10A5000055D117E0002518E0022516E0002902D1F8 -:10A51000608A00280CD004256068007800280CD0E0 -:10A52000012809D0022807D0032805D03548A4E720 -:10A530000125F1E7032500E00127207A002806D055 -:10A54000012806D0022806D003287CD105E0002689 -:10A5500004E0012602E0022600E00326002D01D0DF -:10A56000022D14D1002E12D0E068FEF722FF002841 -:10A5700083D123480C384078800702D02148401E00 -:10A580007BE7022D03D1022E5DD0032E5BD0182174 -:10A5900068460170218A4180218A8180857118482E -:10A5A0000C38007B002803D001286FD104E04AE07A -:10A5B00000216846C17102E001206946C871684601 -:10A5C000077221780930012937D006210BF00AFEE5 -:10A5D00069460E74207D8207C107D20F4007C90F5C -:10A5E0005200C00F11438000014314A8405C69462B -:10A5F000C873002827D00FE0008001002800002049 -:10A60000800A002002320000070605040302010050 -:10A61000FFFF0000E13F000009A96846F8F7A3FC2E -:10A62000002884D109A96846FFF7BCFE0028A7D1FD -:10A63000002D0AD0022D08D010E061680622491CC6 -:10A640000BF073FDC4E7072017E7002E06D009AA18 -:10A650006946E068FFF7B7FE002891D11B206946E4 -:10A6600008700120887009A96846F8F77CFC00286A -:10A6700086D108A840791B2819D12B000BF0C4FF04 -:10A680000504040707040A00032001E00FE002208C -:10A69000FEF75AFD012D0CD0608A002809D0002257 -:10A6A00083001146104602F065FE002801D0032009 -:10A6B000E3E60020E1E6F3B5032687B00D46002966 -:10A6C0000AD0FA4885426FD301208004854203D323 -:10A6D000F7480068854267D30798FEF790FD0400AD -:10A6E00005D02078222804D2082009B0F0BDF14816 -:10A6F000FBE7A07F8707BF0F002D05D0294638460E -:10A70000FEF722FE0600F0D139460027EA4801296B -:10A7100007D0022931D0E949E9480BF084FE3046E0 -:10A72000E3E7A27D2946012A02D0827F920701D564 -:10A730001120DAE700291BD108216A46049711820B -:10A740000592418904AADF48FAF7FDF80028CCD128 -:10A750006846008A082801D00320C6E768460188B9 -:10A7600001814188418181888181C188C18102A99B -:10A77000079801F061FF0646D1E7A17D022916D1B5 -:10A78000807F800613D4002D04D0A07F40070CD416 -:10A79000002100E00121079801F08FFF0600BED1E3 -:10A7A000A775002DBBD004E01AE01126B7E7002DF5 -:10A7B00016D02A4621460798FEF725FF064611289F -:10A7C000ADD1A07F4007AAD42046082229460E30EA -:10A7D0000BF0ABFCA07F04210843A07700269EE786 -:10A7E000102082E770B50C460546FEF708FD010013 -:10A7F00004D022462846FEF7E6FE70BDAD4870BD87 -:10A8000000B50146143195B0192901D2810707D04E -:10A8100001461E3104D00A3102D0072015B000BD18 -:10A82000312269460A70887009A96846F8F79BFBCF -:10A83000F4E701B582B00220694608809E4802AB69 -:10A8400000896A460021F9F7E7FE6946098802296E -:10A8500000D003200EBD1CB50021009102216A46E4 -:10A860001180934901900968884201D210201CBDD3 -:10A87000914801899348FAF766F8694609880229E0 -:10A88000F5D003201CBDF0B50E46884985B01746AB -:10A8900005468E4207D386480122920400689642FC -:10A8A00004D3864202D2102005B0F0BD1F2F01D97B -:10A8B0000C20F9E7804C8D4226D3954201D3854286 -:10A8C00022D3E08803A9F9F758FE0028ECD12878B4 -:10A8D00069464873E08803A9F9F730FE0028E3D100 -:10A8E0006946009008780221084369460870497B50 -:10A8F000090703D00821084369460870E0886946C3 -:10A90000F9F7B5FD0028CFD169468F80E08833463E -:10A9100001AA0021F9F780FE69468988B942C3D0AF -:10A920000320C1E71CB50C4600210091019122884B -:10A9300069460A805E4901900968002801D0884272 -:10A9400001D38C4201D210201CBD002801D0002A66 -:10A9500009D059486A46C1885A48F9F7F4FF694650 -:10A96000098821801CBD0C201CBD10B50123FEF7F9 -:10A970004DFC2CE4002310B51A461946FEF746FCA0 -:10A9800025E430B505464A4895B000680C4681423A -:10A9900002D2102015B030BD2846FEF730FC00284A -:10A9A00007D00178222902D3807F800603D40820B3 -:10A9B000F0E74048EEE7132168460170458009A999 -:10A9C000F8F7D1FA0028E5D108AA0A2151567F29C3 -:10A9D00001D02170DEE70520DCE7F8B5012304464D -:10A9E0001A46194602F0C6F8074601231A46022104 -:10A9F000204602F0BFF8064601231A4604212046ED -:10AA000002F0B8F8054601231A460321204602F059 -:10AA1000B1F80446002F03D128492B480BF003FD61 -:10AA2000002E04D1AD20254980000BF0FCFC002D48 -:10AA300004D125482149801C0BF0F5FC002C04D1E1 -:10AA400021481E49C01C0BF0EEFC22213846FEF7BF -:10AA50000EFC3846F8BD10B50446006800280CD03E -:10AA60001249884207D301218904884205D310493D -:10AA70000968884201D2102014E400F071FFA08818 -:10AA80000D4CA083A07E01280DD10021092002F0E9 -:10AA9000F0FC002800D00120A17C8909012915D0F3 -:10AAA0000321FEF7DDFD002006E400000080010028 -:10AAB0002800002002300000740A0020B49D00002D -:10AAC000C6090000FFFF0000B30200000221E8E712 -:10AAD00030B5F74B9A4207D301239B049A4205D322 -:10AAE000F44B1B689A4201D2102030BD1578EB065A -:10AAF0005B0F042B07D85478072C04D39378102BC2 -:10AB000001D8A34201D2072030BDD3785B0702D41D -:10AB100013795B0701D5062030BDC37FAC075B0806 -:10AB20005B00E40F2343C3770878EF2318401378C2 -:10AB30009B06DB0F1B0118430870F12318401378A4 -:10AB4000DB065B0F5B001843087050780873002029 -:10AB500030BD30B500240C70C378DB07DB0F0B7001 -:10AB6000C578AD07ED0F6D002B430B70C5786D07F1 -:10AB7000ED0FAD002B430B7014700179C907C90F9D -:10AB8000117003799B07DB0F5B001943117000798B -:10AB90004007C00F80000143117030BD70B51446EE -:10ABA0000D460646F6F7C4FE002809D0A221017022 -:10ABB000142221460830F6F707FBF6F79AFE70BD1F -:10ABC000132229463046FEF7FEFC70BD70B51446D0 -:10ABD0000E460546F6F7ACFE002809D0222101708A -:10ABE00045802178017261784172F6F782FE70BD6E -:10ABF000132231462846FEF7E6FC70BD10B5AE4C78 -:10AC0000207C00280CD1204621461038FDF762F840 -:10AC1000002803D0A9A1F2200BF005FC012020742C -:10AC200010BD70B594B015460C462C226946189E8E -:10AC30000A704880002B17D00822194601A80BF093 -:10AC400074FA68468581102231460E300BF06DFA99 -:10AC500009A96846F8F787F9002803D1A17F1022D7 -:10AC60001143A17714B070BD002001900290E8E775 -:10AC7000F0B50646008A97B080B20D460190FEF707 -:10AC8000BEFA04468C48317848380746E8370990C0 -:10AC90000B000BF0B9FC0EFCFB48085F8798B8D995 -:10ACA000FAF9F8F7F6FC002301221946019801F0A1 -:10ACB00061FF050004D1FF2080A130300BF0B3FB11 -:10ACC000002C04D1FF207DA131300BF0ACFB387E8D -:10ACD000C00904D078486030C06DA86112E02B2014 -:10ACE000694608720BA902A8F8F73DF9002804D0BC -:10ACF000FF2072A13C300BF096FB74490C980BF0CE -:10AD00008EFAA9617068A862B068E862A07F8007C7 -:10AD1000800F012820780DD0252804D0FF2067A1BE -:10AD20004D300BF080FB324621460198FFF736FF8D -:10AD300017B0F0BD2528F6D0222806D0242804D04C -:10AD4000FF205EA146300BF06EFB25212046FEF76A -:10AD50008EFAE8E7002301221946019801F00AFF64 -:10AD6000060004D1FF2055A158300BF05CFB002CED -:10AD700004D1FF2051A159300BF055FB2078252834 -:10AD800004D03078012108433070D1E702202870C8 -:10AD9000B068A860B068002802D000202871C7E71A -:10ADA0000120FBE72B2069460870434968464C396F -:10ADB000F8F7D9F8002804D0FF2040A178300BF034 -:10ADC00032FB03201BE02A206946087000A81022ED -:10ADD000023071680BF0A9F904A810220230B168A2 -:10ADE0000BF0A3F9344968464C39F8F7BCF8002851 -:10ADF00004D0FF2031A189300BF015FB042028700E -:10AE00000998686094E7B068002804D1FF202BA15E -:10AE100095300BF008FBE07F400704D5FF2027A109 -:10AE200096300BF000FBB06806220A3800903379A8 -:10AE30000421019801F0FBF90028A6D0FF201FA1F2 -:10AE40009B300BF0F0FA73E7002C04D1FF201BA11C -:10AE5000A3300BF0E8FA2046223010220546716834 -:10AE60000BF063F928212046FEF701FAA07F800746 -:10AE7000800F022814D100231A462146009501981C -:10AE800006E04BE1BAE0B0E095E03FE071E05FE161 -:10AE9000FFF7C7FE11281BD029212046FEF7E7F94E -:10AEA000E07F317A4007400FC9000843E0773FE771 -:10AEB0000080010028000020400B00207372635CBA -:10AEC0006761705F7365632E6300000040420F008E -:10AED000A07F000704D5FF20FD49B0300BF0A3FA96 -:10AEE000A07F08210843A0770020608620463430E8 -:10AEF0000BF078F9E07FFD220146C9071040890F69 -:10AF00000843E077307A2034207011E700230122D3 -:10AF10001946019801F02EFE040004D1FF20EC49EF -:10AF2000CD300BF080FA2B2069460872E94902A85F -:10AF3000F8F719F8002804D0FF20E549D2300BF0CB -:10AF400072FAE4488188204621300176090A417668 -:10AF50000E2129702146FC316960017E2974407EF2 -:10AF60006874DC482C30A860103030346C61E860C4 -:10AF7000DEE6002C04D1FF20D549E6300BF053FA71 -:10AF80002078212893D93079012802D0022808D1CD -:10AF900003E0E07F04210843E077387E0121084385 -:10AFA0003876324621460198FFF7F8FD23212046E6 -:10AFB000FEF75DF9BCE601220421019801F01FFCB7 -:10AFC0000028A2D0002301221946019801F0D2FDE9 -:10AFD000040003D1BE49C0480BF025FA0F202870A9 -:10AFE000172028716E34AC60A2E60421019801F0AC -:10AFF00056FC002889D11020287099E600230122F0 -:10B000001946019801F0B6FD050004D18720B0492A -:10B0100080000BF008FA2E462036307E41064DD5D2 -:10B02000A17F8F07BF0FC00713D029468031486F1B -:10B0300000280ED0027CF37DD207D20F5B001A43AA -:10B040000274486F5108E27F4900D207D20F1143C2 -:10B050000174307E000713D52A468032116F002913 -:10B060000ED0087CF37DC007C00F5B001843087446 -:10B07000116FE27F40084000D207D20F10430874DE -:10B08000307E80070BD5F8204259002A07D0012FC7 -:10B0900005D02946307C31311032FEF783FA307EFC -:10B0A000C0060BD5F8204259002A07D0012F05D140 -:10B0B0002946307C31311032FEF774FA0523684698 -:10B0C0000370357E4570834822216038019A0170F3 -:10B0D0004178C908C900C91C417042800372457299 -:10B0E000F6F78EFD2078252809D021280BD07A4844 -:10B0F00077495B300BF097F92078222803D9222179 -:10B100002046FEF7B4F80021019801F06BFD0028FD -:10B1100000D10DE670486E49633092E674686D4D5B -:10B1200020786035092802D00A28F2D10BE0E168C6 -:10B13000002902D02846F7F7E8FE2169002902D04D -:10B140002846F7F7E2FE21462846F7F7DEFEEFE550 -:10B1500061485F49883074E65E4810B504222821B2 -:10B160006030F7F7B9FE5B480024EC30017E4906F9 -:10B17000490E01764038C465FCF739FD55493C312C -:10B1800008461038F6F78BFC52484C30047410BD5A -:10B1900070B50D46FEF733F8040004D14E484C4913 -:10B1A000A7300BF040F9FF21053128460BF01CF8C1 -:10B1B000A07F8007800F01280CD00221284688300C -:10B1C000FCF716FD002804D043484149AC300BF091 -:10B1D0002AF970BD0121F1E70A46014610B5104673 -:10B1E0008830FCF71FFD10BD70B5054611200C46D8 -:10B1F0000870002161702121495D002908D00329D0 -:10B200000ED0042910D034483149C6300BF00BF968 -:10B2100020780009012802D9E87FC008607070BD5D -:10B220000007000F203002E00007000F30302070D0 -:10B23000EEE7F0B504464068082601789BB008297F -:10B240000DD00B2903D00C294BD1012181716068ED -:10B2500087883846FDF7D3FF05004CD147E0478883 -:10B260003846FDF7CCFF050004D1172018494001EE -:10B270000BF0D9F82878212833D0282833D16068FA -:10B2800002210C3000F050FF00282CD0606808210B -:10B29000001D00F049FF002825D02D2168460170CF -:10B2A000478029461022223101A80AF03EFF0FA94B -:10B2B0006846F7F758FE002804D007480449EF30E5 -:10B2C0000BF0B1F8A87F10210843A877292105E0E9 -:10B2D000BCAE0000F40A0020030200002846FDF77F -:10B2E000C6FF1BB0F0BD607830436070F9E7FE49DF -:10B2F000FE480BF098F8A87FEF210840A87729783E -:10B3000021290FD061688A79002A02D08978002922 -:10B3100012D08007800F022849D0F448F249343017 -:10B320000BF081F8FEF7DEF90028DAD0EF48EE499D -:10B330003F300BF078F8D4E7607830436070E87FF6 -:10B34000C00701D0042100E00321212041552878C5 -:10B3500029280BD03946062002F0B1F82878242895 -:10B36000E0D122212846FDF782FFDBE700230122FE -:10B370001946384601F0FEFB040004D1C920DA4921 -:10B3800080000BF050F825212846FDF770FF0D20B6 -:10B3900008A90871204609A98830FCF735FC022865 -:10B3A000C0D00028BED0D148CF491D30B8E7607862 -:10B3B00030436070B6E7F7B58AB015460646FDF72C -:10B3C0001EFF002841D0017822293ED323293CD0FA -:10B3D000C17F490739D4807F8007800F01280DD0B5 -:10B3E000002301220021304601F0C4FB0746C0487B -:10B3F0000290F7F781FD040007D101E00123F0E797 -:10B40000BA48B94959300BF00EF8002F1FD08837D1 -:10B4100067610298F7F770FD07460298F7F76CFD31 -:10B4200009212170266225710B99E760A1602061D6 -:10B4300003A92046FCF70CFC022806D0002804D003 -:10B44000AA48A94975300AF0EEFF0DB0F0BD002002 -:10B4500007466061E4E730B5002387B00546012266 -:10B46000194601F087FB04462846FDF7C8FE007820 -:10B4700022281BD9002C04D19C489B4981300AF01A -:10B48000D2FF0F21684601701721017120466E30EE -:10B49000029069461A30FCF7B7FB022806D0002854 -:10B4A00004D0E520904980000AF0BDFF07B030BD10 -:10B4B00030B5002387B005460122194601F05AFB3A -:10B4C00004462846FDF79BFE00782228EED9002C82 -:10B4D00004D18648844993300AF0A5FF10206946BC -:10B4E000087020468830FCF78FFB0028DED0E9206A -:10B4F0007D4980000AF097FFD8E7F7B50546007848 -:10B500000027000982B00C463E4602287ED007285C -:10B5100002D00A284AD14AE068680178082907D091 -:10B520000B2930D00C292ED070486F49D33060E100 -:10B5300014271A26002C6AD04088A080FDF75FFEF1 -:10B540000090002804D169486749AF300AF06BFFCA -:10B5500000980099C07DA21D1831FEF723F8686895 -:10B5600008228089E081696820461030091D0AF0B0 -:10B57000DCFD207E01210843F92108402076009857 -:10B580004021807F47E018270826002CD3D08088F0 -:10B59000A080FDF734FE050004D1F7205249800059 -:10B5A0000AF041FFA11D2846FFF71EFE23E1002CF3 -:10B5B00001D0288BA080287A01287DD0022804D0D1 -:10B5C00003282FD048494B4813E11C270726002C9D -:10B5D000B1D0A088FDF713FE0090002804D1FD2013 -:10B5E000414980000AF01FFF287B8007800F012857 -:10B5F000A07914D040084000A071FD210840297BAB -:10B600004907C90F49000843A07101E0E3E0DFE00A -:10B6100000988021807F084300998877EBE0012122 -:10B620000843E9E713270B26002C84D0A088FDF7F8 -:10B63000E6FD00900023A0880122194601F09AFA45 -:10B6400005460098002804D12A48274960380AF0A6 -:10B65000EAFE002D04D181202349C0000AF0E3FE58 -:10B660000098807F8007800F012859D0E86A817890 -:10B670008907890F0129A17954D049084900A1718E -:10B680008278FD255207D20F294052001143A17143 -:10B69000E322114002785207D20E1143A171DF223A -:10B6A00011404278D207920E1143A1710021E1713D -:10B6B000C1782172427900E037E00179607AD307DE -:10B6C00040084000DB0F18439307DB0F28405B0066 -:10B6D00018435207FB23D20F1840920010436072A8 -:10B6E000A07A4008400007E0BCAE00000E03000056 -:10B6F000540B002067040000CA07D20F10438A07CA -:10B70000D20F2840520049071043C90F1840890042 -:10B710000843A0720098007823286CD92621AFE056 -:10B72000A86AA4E701221143A9E7297BFE48022960 -:10B7300010D017270C26002C4AD0012911D003293C -:10B740001ED004291FD005291DD0F849F8480AF059 -:10B750006AFE23E019270726002C4CD00121A17195 -:10B7600005E00121A171E17989088900E171017E7B -:10B77000CA094906D201890E49000A4302760DE042 -:10B780000220A07106E0687B0007000F8030A071E6 -:10B79000052918D0E07980088000E071A088FDF7C5 -:10B7A0002EFD05460078212825D0232804D0E04826 -:10B7B000DE490C300AF037FEA088002101F012FAB1 -:10B7C000222128465DE0E07980088000401CE4E703 -:10B7D0000498068015E0002C01D06888A080287AA3 -:10B7E000032828D004280FD005284DD0D048CF49B1 -:10B7F00064300AF018FE0498002C068001D02780DF -:10B800006680002005B0F0BD15270C26002CDFD087 -:10B810000023A0880122194601F0ACF9050004D1EB -:10B82000C348C2492A300AF0FEFD0622A11DA869BC -:10B8300009F0DCF9DFE716270726002CC8D0A0881E -:10B84000FDF7DDFC00900023A0880122194601F0DD -:10B8500091F905460098002801D0002D04D1B44884 -:10B86000B24938300AF0DFFD2878C00601D5022041 -:10B8700000E00120A071009800782328BBD927217F -:10B880000098FDF7F4FCB6E717270C26002C9FD094 -:10B89000A088FDF7B4FC00906D7A002804D1A4487C -:10B8A000A2494B300AF0BFFD0621A01D0AF09AFC08 -:10B8B0000020A071207A032108432072FB21084058 -:10B8C0000099C97FC907490F08432072680692D5BD -:10B8D000E07904210843E071A07AE90740084000BC -:10B8E000C90F0843E17A2A0749084900D20F1143DA -:10B8F000FD22AB07DB0F10405B001843A072E80687 -:10B90000C00F114040000143E17274E710B50446D6 -:10B91000807990B08009012804D04D20834900012E -:10B920000AF081FDFFF76AF90120694608707E4838 -:10B930000AA9A0380190201D0290601C0B90684657 -:10B94000FCF786F9002804D07948784987300AF056 -:10B950006AFD0322601C0B990AF0E7FB10B010BDD2 -:10B9600010B5714CA03C002805D00146102220469D -:10B970000AF0DBFB0120207410BD10B50446FFF770 -:10B980003DF969491022A03920460AF0CEFB10BDCE -:10B9900070B50025644C00281CD06649884207D346 -:10B9A00001218904884205D363490968884201D28C -:10B9B00010250DE0062109F003F9411C07D05A4972 -:10B9C0004039C865207E80210843207600E00725A5 -:10B9D000284670BD207E4006400EF6E7F3B50020F5 -:10B9E00089B00D46029000290AD0524885421CD3E6 -:10B9F00001208004854203D34F480068854214D358 -:10BA00000998FDF7FCFB060003D03078222815D1F9 -:10BA100002E04A480BB0F0BD002D08D1B07FC1094B -:10BA200003D08007800F022801D01020F2E7B07FFA -:10BA3000C10601D4000703D5002D01D00820E9E795 -:10BA40003948007EC00712D1F07F400701D50D2094 -:10BA5000E0E7002201231146099801F08BF8070066 -:10BA600005D0B07F8007800F022802D00BE01120A4 -:10BA7000D0E7002D07D02A4639463046FFF728F890 -:10BA800002900028C6D128488C38F7F735FA040010 -:10BA900003D126492A480AF0C6FC0A2020700998DA -:10BAA000206238468830A060B07FFB218007800F7D -:10BAB000012829D0002D4CD002202071381DE060D3 -:10BAC00038780007400F20743878C006C00F6074C3 -:10BAD000A07C2A788008D2078000D20F1043A0747F -:10BAE0000840F17F01AAC907490F0843A074A8784C -:10BAF000E07469462846FFF72CF8684600792075FF -:10BB000068460078607528E001202071207B2A7843 -:10BB10008008D2078000D20F104320730840297894 -:10BB20008907C90F89000DE0E00B0020BCAE0000C2 -:10BB300053040000008001002800002002300000B3 -:10BB4000630500000843207324213046FDF78FFB76 -:10BB50000BE0032020710520207325213046FDF7DE -:10BB600086FBB07F4006400EB07703A92046FCF765 -:10BB70006FF8022805D0002803D0FD49FD480AF0DF -:10BB800052FC029846E7FFB581B00A9D06461C4666 -:10BB90001746142128460AF027FB0B980021016064 -:10BBA000F8070ED0F44920680968884239D312306A -:10BBB00028602068143068602068A8600B982168AD -:10BBC0000160B80726D56068002803D0EA490968F3 -:10BBD000884226D3029900290AD0FC3600280ED0CC -:10BBE00031461030FDF79DFC00281BD1606810E045 -:10BBF000002816D0E86080366068B0670AE0FEF77B -:10BC0000A9FA0146072230460AF08FFAFEF7F6FF3E -:10BC1000DA48E860780707D5D749A06809688842FC -:10BC200001D21020EEE528610020EBE5FFB5D44AF3 -:10BC30000E4607CA97B002AB07C3002700970197CB -:10BC40001798FDF7DCFA050005D02878262804D0DF -:10BC500008201BB0F0BDCB48FBE700231A4619466D -:10BC6000179800F087FF040004D1C248C049803013 -:10BC70000AF0D9FBA87F8007800F1690012814D006 -:10BC8000022824D0BB48BA4999300AF0CCFB0121E4 -:10BC90000022852E31D01EDC002E26D0812E26D00B -:10BCA000822E26D0832E1ED125E0002EEFD12146F4 -:10BCB0002846199AFEF70CFF0028CAD119988078F7 -:10BCC000009019980078C007C00F0190DFE719981D -:10BCD000002808D1DBE7862E11D0882E11D0892EBE -:10BCE00011D08A2E11D00720B3E710460EE0084687 -:10BCF0000CE002200AE0032008E0052006E0062010 -:10BD000004E0082002E0092000E00A20002222715D -:10BD100001216A461176211D0791002801D020716A -:10BD2000FAE0169801280CD0A66AE06A02220121E6 -:10BD300010900020A0602846173002291AD0012157 -:10BD400019E0E66AA06A1090032030702078FB2387 -:10BD5000C006C00F7070B07801221840009BF370CD -:10BD60008008019B800018430221B0700020707190 -:10BD70003071DEE70021890009190861681C022A78 -:10BD800001D0012100E00021890009190861B07883 -:10BD90008007800F01285ED1109880788007800F7F -:10BDA000012858D110980079844610984079009065 -:10BDB000169801281DD0317908A801747179017590 -:10BDC00008A8027C6046024008A8007D009908404F -:10BDD000139010433FD06C491A98884207D3012131 -:10BDE0008904884215D364490968884211D2102019 -:10BDF0002FE70CAA0DA91998FEF7ABFE08A8007C46 -:10BE000061460840307108A8007D009908407071B3 -:10BE1000D6E720463C3021460090F031169801913B -:10BE2000022834D000211A9B20460C33FFF7ABFECA -:10BE30000028DDD12046503021460090F43116987C -:10BE40000191012825D0002120461A9B139AFFF763 -:10BE50009AFE0028CCD110988078400702D4E87F61 -:10BE6000C0072BD0169902A8012914D0109909787F -:10BE70004900405A21780907490F4900C8408707FF -:10BE8000BF0F2AD0012F14D0022F0FD113E00121B0 -:10BE9000C9E70121D8E721780907490F4900405A2D -:10BEA000109909784900C8408707BF0F032F04D0B5 -:10BEB00004E0022711E001270FE00227169801286D -:10BEC0000BD1B078FB210840E97FC907490F08432F -:10BED000B07020780007400F3070207810224008A2 -:10BEE000400020701099D2434978C907C90E114308 -:10BEF00008402070C00623D4022F21D0012F21D06A -:10BF00000020A061E0612062606220461830A060DD -:10BF1000E87F40084000E877204606A98830FBF714 -:10BF200073FE002806D0022804D06F2010490001BB -:10BF30000AF079FA25212846FDF799F9002088E6CC -:10BF4000032008E020460D211B300AF04BF9204663 -:10BF50001830A060042069460875E87F0121084375 -:10BF6000E87705AA29461798FEF730FED4E70000C7 -:10BF7000BCAE00008E05000028000020400B002011 -:10BF8000606701000230000000800100F0B587B05A -:10BF900015460E0004460DD06A48854207D301209D -:10BFA0008004854206D368480068854202D210208A -:10BFB00007B0F0BD2046FDF722F9070004D038781D -:10BFC000272803D00820F3E76048F1E700231A464A -:10BFD0001946204600F0CEFD040003D15C495D48BF -:10BFE0000AF021FA0020002E05D0022E08D0012EE2 -:10BFF00011D00720DCE701216A461171A06018E02A -:10C00000234618336946A360087110222946184652 -:10C010000AF08BF80DE021461831A16069460871DD -:10C02000A061E061206260620621284608F0C8FD38 -:10C03000A0612078C10714D0400840002070022081 -:10C04000694608702046183002907030FBF7DCFD1E -:10C05000022806D0002804D03E483D4923300AF08B -:10C06000E2F925213846FDF702F90020A0E770B576 -:10C0700094B00D460646002B02D0072014B070BDC8 -:10C08000FDF7BDF8040007D02078222802D3A07F56 -:10C09000400603D40820F1E72C48EFE7002D19D023 -:10C0A0002D216846017046801022294601A80AF019 -:10C0B0003CF8E07F297C4008C9074000C90F0843CD -:10C0C000E077297C40078906400FC90EC900084364 -:10C0D000E07703E02E2168460170468009A9684692 -:10C0E000F6F741FF694609782D2905D1002803D1CB -:10C0F000A17F10221143A177A17FBF221140A17718 -:10C10000BCE710B50C46FDF77AF8002805D00E49BB -:10C1100009688C4203D2102010BD0C4810BD214686 -:10C12000FFF762F8002010BD05E00278401C002AED -:10C1300001D0002070470A46491E89B2002AF4D176 -:10C14000012070470080010028000020023000001C -:10C15000BCAE00000F07000030B50346072903D02E -:10C160000820DA781C7916E00720FAE707290BD0B7 -:10C170005500ED186D79072D01D0401EC0B2521C3C -:10C18000D2B20F2A07D105E05500ED186D79072DC1 -:10C19000F3D0F4E700222546641EE4B2002DE5D179 -:10C1A00030BDFFB581B00C461646114620460A9FA9 -:10C1B0000B9DFFF7D1FF00280AD020790F2803D369 -:10C1C000FEA1A0200AF02FF9A078C00907D019E03D -:10C1D000072E02D0112005B0F0BDFD48FBE7019805 -:10C1E0002880381D6880002068712871EF800498CD -:10C1F00028812846F6F7DFFE002803D1EFA1AD2005 -:10C200000AF011F9E07821794018491CC0B2217177 -:10C210000F2801D30F38C0B2400000194671817950 -:10C22000F12249084900114081710020D3E7FFB590 -:10C2300083B01C4616460F4600231A4602210C9D69 -:10C24000039800F097FC010008D033463A46019568 -:10C2500000940398FFF7A5FF07B0F0BDDC48801EEF -:10C26000FAE7F0B5054616460F4650888DB0002314 -:10C270000122022100F07EFC040003D1CFA1DF20C7 -:10C280000AF0D1F8002069460871A078400603D171 -:10C29000CAA1E3200AF0C7F8042F5ED32A78D0079A -:10C2A000C017401C06D161786B78994255D121782E -:10C2B000090752D00121142A46DA012A42D0122A53 -:10C2C00002D0132A40D128E00C2F3DD1A27852068B -:10C2D000520E012A38D0207800090001401C20703D -:10C2E000687860706846017168792A7901021143A3 -:10C2F00068460181E879AA790102114368464181C3 -:10C30000687A2A7A0102114368468181E87AAA7A1A -:10C31000010211436846C1811AE0062F14D120782A -:10C320000009000120707188012001F0C8F8022185 -:10C3300068460171C91E018168792A790102114399 -:10C3400068461FE0062F0AD06A461279002A1BD0E1 -:10C350007088324601A9FDF77AFD0DB0F0BD207856 -:10C360000009000120707188012001F0A8F8022165 -:10C370006846017168792A79010211436846018192 -:10C380000021C9434181E3E70028E6D0748868466C -:10C3900081766978C176022181830021C18304A856 -:10C3A00005220090062311462046FFF740FF002893 -:10C3B000D3D088A1D6200AF036F8CEE7F7B58CB0F6 -:10C3C00015460C990D98F9F7CEF9C0B2082851D14D -:10C3D000002069468885688800230122022100F038 -:10C3E000C9FB040004D1FF2074A163300AF01BF8DC -:10C3F00001230021E07822790BE046003619767996 -:10C400009E4201D1491CC9B2401CC0B20F2800D1C4 -:10C4100000201646521ED2B2002EEED1002902D1C3 -:10C4200017206946888504AB02330BAA00950C9946 -:10C430000D98F7F73BFC0006000E07D002281BD032 -:10C44000032817D0FF205DA1893011E06846808D58 -:10C4500000280FD002A901910090688804230122CE -:10C460002146FFF79EFE002804D0FF2053A176301E -:10C4700009F0D9FF0FB0F0BD68781021084368704B -:10C48000F8E70020584902464300401CCA520828D9 -:10C49000FAD3704700218170017809090901017000 -:10C4A00000214170C1700171704770B50D460023C5 -:10C4B0000122022100F05EFB040004D1FF203FA115 -:10C4C000CF3009F0B0FFA0786906C009C001490E5D -:10C4D0000843A07070BD704710B50146012000F000 -:10C4E000EEFF10BD3EB58DB2002301220221284689 -:10C4F00000F040FB040004D1FF2030A1E43009F03B -:10C5000092FF20786946000900012070022008701F -:10C5100036488880C88000222846FDF798FC3EBD3A -:10C52000F7B505460078002700090C463E4601286D -:10C5300004D0FF2021A1F33009F075FF287A0328E9 -:10C540000CD041201DA1C00009F06DFF0298002C05 -:10C55000068001D0278066800020FEBDEA89702712 -:10C5600010460A3086B2002C0AD06888A080A889BC -:10C570002081E28020460A30296909F0D6FDE5E7EE -:10C5800002980680E8E7F8B543680246D9799C79B5 -:10C59000090221435C7A1E7A25025C88981D354386 -:10C5A000241FA14238D11B79022B35D1042D34D060 -:10C5B000052D3DD0062D34D0402D19E07372635CFB -:10C5C0006C326361705F636F72652E630000000000 -:10C5D000043000007372635C6C326361705F636F80 -:10C5E00072652E6300000000000C0020FFFF0000B9 -:10C5F00012D3061D0F461446284600F0E9F9082814 -:10C600000AD01120207003202072A581E7812661C5 -:10C610006078082108436070F8BD001DFFF7CEFE6A -:10C62000F8BD031D50880A461946FEF7C4FEF8BD42 -:10C63000001DFFF716FEF8BD70B50D4600238CB047 -:10C6400006461A46022100F095FA040031D02078FF -:10C650000007000F01282ED01220694688746078E8 -:10C660000523801CC874082088822888C8826888AE -:10C670000883A8884883E888888302A90C20019150 -:10C6800000901A4621463046FFF78BFD00280ED158 -:10C69000F02300223146012000F06CFE20780009D2 -:10C6A0000001401C20706078801C607000200CB07D -:10C6B00070BDCD48FBE71120F9E770B50D460023AA -:10C6C0008CB006461A46022100F054FA040006D047 -:10C6D00020780007000F012803D00820E7E7C248B0 -:10C6E000E5E71321684681746178C1740221818273 -:10C6F000C58202A906200523019100901A46214611 -:10C700003046FFF74EFD0028D1D120780009000106 -:10C7100020700020CBE7F3B581B00D460023012245 -:10C720000221019800F026FA00260446002803D1D1 -:10C73000AE49AF4809F077FE2079A8423BD2AC4819 -:10C74000AA49401C09F06FFE35E0E07841000F195E -:10C75000401C7979C0B20091E0700F2801D100200F -:10C76000E0702079401E2071B879C00708D0009889 -:10C770000199042815D09D498220183109F053FEF3 -:10C78000B8790007410F08D0400F019904280CD058 -:10C7900096498F20183109F046FE009807280AD1E3 -:10C7A00007E00846FEF784FEEAE70846FEF753FE78 -:10C7B000F3E7761CF6B228466D1EEDB20028C4D110 -:10C7C0003046FEBD10B500230122022100F0D2F94F -:10C7D000040004D1B5208549800009F024FEE078EA -:10C7E00021794018C0B2E0700F2801D30F38E070F3 -:10C7F00000202071A07880210843A07010BDF8B5FA -:10C8000017460D4600231A46022100F0B3F9040032 -:10C8100005D0002D0CD0002F07D0062006E0072DF4 -:10C8200001D00820F8BD0720F8BD0820A84204D890 -:10C830006F486E49423009F0F6FD29462046FFF761 -:10C840008BFC0646002F28D0002E26D1E0782179D7 -:10C850001CE0420012195379072B03D093791B0770 -:10C860005B0F04D0401CC0B20F280CD00CE040007D -:10C8700000198079F12318406B071B0F1843907142 -:10C8800000290AD104E00020491EC9B20029E0D1E4 -:10C89000574856495A3009F0C6FD3046F8BDF8B53C -:10C8A0000D4600231A46022100F064F9040004D169 -:10C8B0004F484E49683009F0B6FD681E052804D37C -:10C8C0004B484A49693009F0AEFD0F21E2782079E2 -:10C8D000002310E0560036197779AF4206D1B179BE -:10C8E00049084900B1715B1CDBB21146521CD2B23F -:10C8F0000F2A00D100220646401EC0B2002EE9D108 -:10C900000F2905D248000019817901221143817154 -:10C910001846F8BD10B50446402801D2072010BDC6 -:10C9200000F056F8082802D03120000210BD002186 -:10C93000304802E0491C082903D24A00825A002AE2 -:10C94000F8D1082903D049004452002010BD04202A -:10C9500010BD10B5402801D2072010BD00F038F8F6 -:10C96000082805D00021234A40001152084610BD76 -:10C97000052010BDF0B58BB016460C00074607D059 -:10C98000002E05D06188402904D207200BB0F0BDED -:10C990001020FBE72088002801D0172801D90C209F -:10C9A000F4E7084600F014F808280FD0258803A8FB -:10C9B0002A463146023009F0B8FB01A8009062888F -:10C9C0002B4607213846FFF732FCDFE70520DDE77D -:10C9D00001460020074A02E0401C082803D2430019 -:10C9E000D35A8B42F8D1704702300000BCC500001A -:10C9F000AD020000000C0020F8B50546E54C079E8E -:10CA0000069821706270A370E6702071681C42085D -:10CA10005200E14B0021880000198446C261605C2D -:10CA200040008218002D0AD0002005E0664647002D -:10CA3000F669401CF353C0B2665C8642F6D8491CC6 -:10CA4000C9B20529E7D30026D21C9708B000BF0061 -:10CA500000198760304600F042F9A15D761C48431A -:10CA6000C219F6B2052EEFD3501B80B2F8BDF0B557 -:10CA70000546C84F8C460020FF247E5DA9009646DF -:10CA80000346CF190CE0F9695A008A5AC2498A4212 -:10CA900004D1401CC0B2FF2C00D11C465B1CDBB291 -:10CAA0009E42F0D86146002909D100280BD0002D04 -:10CAB00007D0B84949788E4203D2401EC0B2002840 -:10CAC00001D071460C70F0BD70B5B24C8D000023E2 -:10CAD0002D19615C09E0EC695E00A45B844202D11F -:10CAE0001370012070BD5B1CDBB29942F3D80020AB -:10CAF00070BDFEB51C4617460D46060008D0002D39 -:10CB000006D0F01C80088000B04203D01020FEBD8B -:10CB10000E20FEBD002F03D0002C01D0A74201D96A -:10CB20000720FEBD0094234622463946002001948A -:10CB3000FFF762FF2988814207D0814201D2042198 -:10CB400000E0092128800846FEBD009423462246C5 -:10CB5000394630460194FFF74FFF28800020FEBD84 -:10CB600010B5044600F0C5F8002801D0E0B210BDB1 -:10CB7000FF2010BDFFB50546874881B01E460C4614 -:10CB8000854204D0052C02D20398022802D300204B -:10CB900005B0F0BD002769460F7028466A46214659 -:10CBA000FFF792FF00280ED068460178204600F07B -:10CBB000A8F8002EECD00028EAD1284600F099F819 -:10CBC000002809D103E03846002EF6D1E0E7FF2027 -:10CBD00072A15C3009F027FC21462846039A00F038 -:10CBE0009CF8D5E7F8B505460C4600206A4E694624 -:10CBF0006E4F0870B5423BD0052C01D30720F8BD1D -:10CC00000A4621462846FFF75FFF002830D06846D5 -:10CC10000178204600F075F8230009F0F5FC0504C2 -:10CC2000090C11161B0001462846FEF7D5FA15E03F -:10CC3000FDF7E0FA12E001462846FFF74CFC0DE054 -:10CC400001462846F6F7B5FF08E001462846F8F702 -:10CC500012FC03E056A17B2009F0E5FB4D4A684633 -:10CC6000A10000788918C96940000E520020F8BD63 -:10CC70003846F8BD524A1268914201D210207047DE -:10CC8000052801D3072070470872002048727047BA -:10CC9000F8B504464A480068844201D21020F8BD25 -:10CCA000207A3C4A83009B18617A3B4D125C11E06C -:10CCB000DE694F00F65BAE420AD04A1C6272DA6946 -:10CCC0004B00D25A228000F01CF860600020F8BDB2 -:10CCD000491CC9B28A42EBD861720520F8BD0EB575 -:10CCE000384B40000ECB0091029301926946085ADE -:10CCF0000EBD28494978814201D9012070470020A2 -:10CD0000704770B50C460546FFF7E9FF214AA900B8 -:10CD1000891889686043401870BDF8B50C4606460E -:10CD200000206946134608706A4619462046FFF7F8 -:10CD30009EFE002500282BD0164A6846A1000078E8 -:10CD40008918C96940000E52684601782046FFF7ED -:10CD5000D8FF0546230009F057FC0504090C0F1401 -:10CD6000170029463046FEF713FA11E0FDF720FAC6 -:10CD70000EE0FFF78FFB0BE029463046F6F7E0FEAA -:10CD800006E0F8F771FB03E009A1622009F04BFB14 -:10CD90002846F8BD100C0020FFFF00007372635C92 -:10CDA000686F73745F636D2E6300000002300000D3 -:10CDB0007372635C686F73745F636D2E6300000051 -:10CDC000280000206C67010010B5014620220948A8 -:10CDD00009F0ABF907490020C877084610BD06499D -:10CDE000012048610548064A0168914201D10021AD -:10CDF00001607047400C00200005004078000020D2 -:10CE0000BEBAFECA8107C90E002808DA0007000F63 -:10CE100008388008C24A80008018C06904E0800891 -:10CE2000C04A800080180068C8400006800F704724 -:10CE3000BD4948788978884201D3401A02E021220E -:10CE4000511A0818C0B27047B74923314878897819 -:10CE5000884201D3401A02E02122511A0818C0B2B8 -:10CE60007047B149463148788978884201D3401AE1 -:10CE700002E02122511A0818C0B27047A94910B522 -:10CE80000C310868FF22120290430122D2031043A2 -:10CE90000860A54900202331487088702339487004 -:10CEA0008870463148708870A04808F0C8F89F48DC -:10CEB000401C08F0C4F8F5F741FC00F028F910BD5B -:10CEC00020207047B4E770B50C4605460026FFF7F2 -:10CED000AFFF9549A04214D30A46203A00232046CA -:10CEE000641EE4B200280BD08878105C2870887823 -:10CEF0006D1C401CC0B288702128F0D18B70EEE709 -:10CF0000012600F004F9304670BD202070479BE7F1 -:10CF100070B50C4605460026FFF796FF824923317F -:10CF2000A04214D30A46203A00232046641EE4B2ED -:10CF300000280BD08878105C287088786D1C401C05 -:10CF4000C0B288702128F0D18B70EEE7012600F086 -:10CF5000DEF8304670BD202101700020704710B50A -:10CF60000446FFF77EFF2070002010BD70B50C4610 -:10CF70000546FFF776FF6C494631A04215D30A46B5 -:10CF8000203A00232046641EE4B200280BD08878A3 -:10CF9000105C287088786D1C401CC0B288702128F5 -:10CFA000F0D18B70EEE7002400E0614C00F0AFF8A8 -:10CFB000204670BD70B50C460546212904D9FF20D6 -:10CFC0005CA1473009F02FFA55484068103840B24C -:10CFD000FFF718FFC6B20D20FFF714FFC0B286425C -:10CFE00007D2FF2053A14D3009F01DFA01E0F5F7FB -:10CFF000E8FB21462846FFF766FF0028F7D070BD02 -:10D00000F8B507464948484C401E474E007825462B -:10D0100046362335002806D1A9786878212200F009 -:10D020006BF800280ED0A1786078212200F064F817 -:10D03000002814D0B1787078212200F05DF8002823 -:10D0400028D033E038496878C91C0F546878401CF0 -:10D05000C0B26870212829D10020687026E03249CA -:10D06000607820390F546078401CC0B2607021286D -:10D0700001D1002060702D4F7F1E3878002815D018 -:10D08000A1786078212200F037F800280ED0002027 -:10D0900038700BE02449707826310F547078401CAA -:10D0A000C0B27070212801D100207070A978687812 -:10D0B000212200F021F800281DD0A17860782122DB -:10D0C00000F01AF8002816D0B1787078212200F00C -:10D0D00013F800280FD0F5F756FB144807F0B7FFF8 -:10D0E00001214903884203D016A1C12009F09BF910 -:10D0F0000E4807F0C4FFF8BD401C884205D090429E -:10D1000001D1002901D0002070470120704710B5DF -:10D11000064807F09CFF002801D1F5F723FB10BD5E -:10D1200000ED00E000E400E0800C00207D00002025 -:10D13000072000007372635C736F635F72616E64DB -:10D140002E6300007372635C736F635F72616E6461 -:10D150002E6300000C4908784A78401CC0B2904207 -:10D1600000D008707047094A074820BF40BF20BF61 -:10D170004178037843701368002B02D103788B4207 -:10D18000F3D00020704700007F00002000E200E0A4 -:10D19000FEB5F34C07466068FF213E0181552178BA -:10D1A000FF2913D00901083141583246491E08327F -:10D1B00009020192090A805800F0C8F9002802D03B -:10D1C0002478254615E06168207888552770FEBDD3 -:10D1D000E34842680198115828010090083010581F -:10D1E00000F0B4F9002806D1DD482C4641680098CB -:10D1F0000D5CFF2DECD1DA4821014068855547547C -:10D20000FEBD70B5D64A04460020157A53680AE080 -:10D210000201561C9E5DA64203D10C329A588A42E6 -:10D2200004D0401CC0B28542F2D8FF2070BDF8B5D2 -:10D23000CB4F3E7801F013FE0146FF2E68D034013B -:10D24000254678680835405900F080F9022802D94F -:10D25000786840595AE0C2494868025D0A70A11CCA -:10D26000425C002A0CD0521E425441590122D20580 -:10D2700089180902090A41513046FFF789FF30E059 -:10D28000631CC25C0092221D94468258002A10D072 -:10D2900001239B029A420FD99205920D43595703DD -:10D2A000DB191B021B0A43516346C3589A1A920AA0 -:10D2B00009E0FF21C1540AE0435952039A181202AF -:10D2C000120A4251002242543046FFF761FFA4483F -:10D2D0000C344168C26800980959800012580098BF -:10D2E00090479F4C2078FF2812D001F0B8FD0146EE -:10D2F0002078626800010830105800F027F90128F2 -:10D3000096D92078616800010830085801F09AFD2C -:10D31000F8BDF8B51C4615460E460746FF2B03D34D -:10D3200090A1D32009F07FF88D48FF21C7604560A8 -:10D3300004720674017000224270104604E002017B -:10D34000521C401CA954C0B2A042F8D3F8BD70B51D -:10D35000834C06466578207C854203D381A1E62074 -:10D3600009F061F8E068A90046506078401C6070E0 -:10D37000284670BDFFB581B01D46FF2401F06FFD4A -:10D38000774F064679780198814203D875A1F42039 -:10D3900009F049F872480021037A406810E00A0158 -:10D3A0009446521C825CFF2A24D0019FBA4205D1C8 -:10D3B00062460C328758029A97421DD0491CC9B266 -:10D3C0008B42ECD8FF2C17D021014B1C019AC25480 -:10D3D0000B33029AC250039B614F0022012B0ED0E7 -:10D3E0000B1DC25001239B029D4216D9AA05920D26 -:10D3F00008D008E00C46E1E7FF2005B0F0BD0B1DAA -:10D40000C550EFE71A4653039B190E461B02083618 -:10D410001B0AAA1A8351920A09E0002D00D10125A6 -:10D420006B039B191D022D0A0B460833C550891C3E -:10D4300042543D463E782046FFF7AAFE2878B04287 -:10D4400015D001F00CFD014628786A68000108300B -:10D45000105800F07BF8012807D928786968000186 -:10D460000830085801F0EEFC01E0FFF7E0FE0198FB -:10D47000C3E770B50C46054601F0F1FC06462146AF -:10D480002846FFF7BEFEFF2817D0354D0401204681 -:10D49000696808300858314600F058F8012109033E -:10D4A00040186968A41C095D400B002901D089025D -:10D4B0000818002800D1012070BD002070BDF3B510 -:10D4C00081B00F460198FFF79CFEFF282AD0244D1B -:10D4D0002E7869683246344604E0844205D02646F8 -:10D4E0002301CC5CFF2CF8D11CE0FF2C1AD0A64203 -:10D4F0001FD11001085C2870FF2818D001F0AFFC84 -:10D500002A780146120168680832805800F01EF837 -:10D51000012809D92878696800010830085801F005 -:10D5200091FC06E00020FEBDFFF781FE01E001F066 -:10D5300091FC39460198FFF79CFF22016968FF239F -:10D54000541C0B558A5C3301CA54FEBD401A0002BC -:10D550000121000AC905884200D900207047000057 -:10D56000CC0C00207372635C736F635F74696D65CC -:10D57000722E6300F0B500241C4A01211C4B0803E5 -:10D58000546018601B4B1C601B4C20601B480469D6 -:10D59000E443E406E617046910252C430461184CA3 -:10D5A0006160184D2960761C00E020BF1F68002FC5 -:10D5B000FBD0002E03D107691026B743076190689E -:10D5C0008005906801D5104A10436960A160002170 -:10D5D00019600121084A09031160F0BD10B5044625 -:10D5E000FFF7C8FF2060002010BD000000C500400C -:10D5F00080E100E000C1004080E200E000ED00E0DA -:10D6000000C3004000C0004000FCFFFF70B51F4990 -:10D610000A68002A17D000231D4601244A68521CBC -:10D620004A60092A00D34D600E792246B2400E6846 -:10D6300016420AD072B60B6893430B6062B6496813 -:10D640000160002070BD052070BD5B1C092BE5D377 -:10D650000FA1362008F0E7FEF5E70120104980050C -:10D6600008607047EFF31081CA07D20F72B601212C -:10D6700081400648036819430160002A00D162B660 -:10D68000EBE7024800210160416070478400002000 -:10D690007372635C736F635F6576742E6300000062 -:10D6A00000E200E001208107086070470120810747 -:10D6B000486070471048C068C00700D0012070471C -:10D6C0000D488068C00700D0012070470A484069B3 -:10D6D000C00700D0012070470748C069704706495D -:10D6E0008A69D20306D589698907890F814201D1E8 -:10D6F000012070470020704700040040F8B5F84C46 -:10D70000207BE17A88421CD00126F64D0027E07A82 -:10D71000215C14200A4642435019037C052B11D08A -:10D72000037C062B1CD0037C072B28D0437C012BC9 -:10D7300033D0EDA1EF4808F076FE207BE17A8842F5 -:10D74000E5D1F8BD0674E07A0A2807D0E07A401CDB -:10D75000E072491CC8B2AA5802210CE00020F7E789 -:10D760000674E07A0A2808D0E07A401CE072491C6E -:10D77000C8B2AA5803219047DFE70020F6E70674F5 -:10D78000E07A0A2807D0E07A401CE072491CC8B24F -:10D79000AA580821EFE70020F7E74774E07A0A2843 -:10D7A00007D0E07A401CE072491CC8B2AA58072191 -:10D7B000E1E70020F7E770B50024CF4E0620707235 -:10D7C000CE4825464477047738300473C472CC4879 -:10D7D00007F035FCCB480575F572CB49601E8860B3 -:10D7E0007571B570F57035717570C848643905701C -:10D7F00045701420604340180574641CE4B2052C85 -:10D80000F7D30120F5F764F80020F5F761F801205F -:10D81000B071F4F727FDBE48F4F736FDBD4C20701B -:10D82000BD48F4F731FD6070F4F7F2FF70BD10B53C -:10D83000F5F719F8B74C2078F4F744FD6078F4F761 -:10D8400041FDAD4C207A002803D0F4F7CAFD00203A -:10D85000207210BD70B5A84CA079002804D0A2A1F8 -:10D86000AE4808F0E0FD70BDE07A002803D19EA12B -:10D87000AB4808F0D8FD0126A6710025E572607A54 -:10D88000042114225043974A801801749E488168ED -:10D89000491C04D0691E81600120F5F719F80020A9 -:10D8A000F5F716F8F4F7FAFF07F00AFDF5F7FBF8BD -:10D8B0009C480560056001209B49C0030860F5F79E -:10D8C00071F992480078022804D0032804D1E07846 -:10D8D000002801D0A67000E0A570F5F7D0F870BD63 -:10D8E000034680490520142242435218203A127FF1 -:10D8F000002A04D0401E0006000EF4D17047142206 -:10D90000424351180A46803AD366012220390A77E9 -:10D910007047012805D0032805D1002903D1002034 -:10D9200070470029FBD010B4734C00236370774A12 -:10D93000002890700CD002280AD007291AD20800BB -:10D9400078440079001887441505070D0F1113005E -:10D95000D37003E01B2000E03A20D07001206070FB -:10D9600010BC70475820F8E77720F6E79620F4E7D8 -:10D97000B520F2E710BC0020704710B5634840782E -:10D98000F5F798F880B210BD411E1422504310B52F -:10D99000544A8418203C042902D8207F002803D14F -:10D9A00051A1624808F03FFD207F012804D0B32038 -:10D9B0004DA1800008F037FD0020207710BD70B524 -:10D9C0004E4C607F217F884201D1012500E0002577 -:10D9D000F5F709F8F5F76EF8617F227F914201D1E2 -:10D9E000012100E00021A942EBD170BDF7B5074647 -:10D9F000481E84468EB0C0B2142205905043394A66 -:10DA000085180495287C2D1D07282AD1344C002622 -:10DA1000E07A227B824221D0235C059A934201D195 -:10DA2000012601E0002E04D00A2811D0421CA25C7D -:10DA300022540A280ED0401C227BC0B28242EBD175 -:10DA4000002E0BD0207B002806D0207B401E04E057 -:10DA50000022ECE70020EFE70A202073049A01205F -:10DA600010746046244C042813D8142041431D48E8 -:10DA700008182038007F00280BD00498007C01286B -:10DA80000BD00498007C012803D01098807A0128DC -:10DA900007D015A1264808F0C6FC1098807A012806 -:10DAA0006FD104980F4B007C022845D00C4C207B92 -:10DAB0000A2872D0207BE17A401C884203D10AA157 -:10DAC0001C4808F0B0FC049901204874217B05989B -:10DAD0006054207B0A2864D0207B401C20731CE10A -:10DAE000D80D0020E80D00207372635C72656D2E06 -:10DAF00063000000CF0500006C0E0020A00D002088 -:10DB0000780E0020C00D00204C0E00208E0000205A -:10DB10002FD200008C000020FDD600007D02000006 -:10DB20005E02000000F5004080E200E0CB02000051 -:10DB30001503000022030000607A059A0146904216 -:10DB400006D0014614267043C018807C9042F8D15C -:10DB5000627A824208D1617A14225143C918897CC1 -:10DB600061720121A17207E014224243D2181426E7 -:10DB70007143927CC9188A74142206215043C0183C -:10DB800081741098007A062819D201007944097925 -:10DB900049188F440812100E0C0AE07A00288ED023 -:10DBA00091E700209AE700200FE0B4200DE07320F9 -:10DBB0000BE0322009E00A2007E0062005E0FF2004 -:10DBC000FDA1E03008F02FFC0020029010980168C1 -:10DBD0000298081A28601099097A002912D00221A7 -:10DBE000401A0102090A296010980268406810185A -:10DBF0000002000A68601098807A0228109803D00A -:10DC0000007B74E00421EBE7007A002813D00222A5 -:10DC1000029810188446109842686046083016181A -:10DC2000E848029A4078904202D9E278002A04D06B -:10DC30003046083005E00422EAE7029A801A80198B -:10DC40000830627A062A1CD0627A14235A43DE4BCB -:10DC5000D2185268914214D0DC4B0793617A142297 -:10DC60005143D94A89184A688968D21BC91B1202D4 -:10DC70000902120A090A90423AD89A4238D89942BF -:10DC800036D83818801B0002000A286010996044BA -:10DC9000CF4AC9680002000A9446421A01239B0534 -:10DCA00007929A4201D2104614E00A1A09929A4247 -:10DCB00001D207980EE0079A6346624503D9591AC4 -:10DCC0000818401C06E0099A624506D9181A40183F -:10DCD000401C4042002860DC03E0B7A1BD4808F0CA -:10DCE000A2FB286880190002000A686000202872E0 -:10DCF0006868082608300002000A68601098407AB8 -:10DD0000A8721098007A687203280ED200280CD0EE -:10DD1000FFF7D0FC002803D007E0002011B0F0BDD1 -:10DD200002983A210E1A32200290A6480178012961 -:10DD300001D0032909D141780298814205D9E078C0 -:10DD4000002802D10298081A861928689F4AC01B29 -:10DD5000844601026868090AC01B03021B0A029379 -:10DD60008E421AD81346914217D80299994214D874 -:10DD7000617A062915D0667A6146062203920092DE -:10DD80001422914B7243D2189368DB1B8B4216D836 -:10DD90000396967C062EF3D177E0059801F055F9AD -:10DDA000BBE70499022205980A74627A062A00D019 -:10DDB000627A8A7460720120A07211B0F0BD062EE2 -:10DDC00063D000223146944614227F4B4A43D21836 -:10DDD0005368DB1B834229D2917BAB7A99421FD8CF -:10DDE00004980521059C01747B4D287B0A2811D0DD -:10DDF000287BE97A401C884203D16FA1774808F05C -:10DE000012FB287B2C54287B0A2807D0287B401C37 -:10DE1000287382E7E87A0028EFD0F2E70020F7E7DE -:10DE200001218C46917C0629CED102E06046002873 -:10DE30002AD03546009114202A46424362480621E2 -:10DE4000171839741038007B0A28634816D0017BF4 -:10DE5000C07A491C814203D157A1614808F0E3FA16 -:10DE60005D48017B4554017B0A290BD0017B491C8D -:10DE70000173BD7C0098A842DDD106E0C07A00287D -:10DE8000EAD0EDE70021F3E70096049902204E4D19 -:10DE90000874607AB04207D1049900988874059894 -:10DEA00060720120A07221E00398062E0FD0062890 -:10DEB00003D141A14B4808F0B6FA0398142250430D -:10DEC0004019059981740499009888740EE0062819 -:10DED00003D139A1444808F0A6FA0398142250430C -:10DEE000401905998174049906208874012011B0A5 -:10DEF000F0BD70B50D463D4A441900210B46101A7D -:10DF00008B4103D22CA13A4808F08DFA394885425A -:10DF100003DD29A1384808F086FA3848854203DA3B -:10DF200025A1374808F07FFA3648844205DA002CEC -:10DF300001DB204670BD334800E03348201870BD37 -:10DF4000401E70B5C0B2142148431F494418607B7D -:10DF5000062813D201007944097949188F44020C2C -:10DF60000A080604002068E0B42010E073200EE0E8 -:10DF700032200CE00A200AE0062008E0FF200EA173 -:10DF8000E03008F050FA617B0020002955D00221D2 -:10DF90004018616840180002000AF4F78BFD0C2558 -:10DFA0006557124A441900210B46101A8B412FD293 -:10DFB00001A10F482AE000007372635C72656D2E48 -:10DFC000630000008E000020E80D0020FFFF3F00EE -:10DFD000FFFFFF000E070000D80D00200702000021 -:10DFE000C5030000DD030000E3030000FF7F841E83 -:10DFF000F50300000020A107F603000000E05EF832 -:10E00000F70300000080841E00807BE108F00BFA1B -:10E01000FB48854203DDFB49FB4808F004FAFB4856 -:10E02000854203DAF749FA4808F0FDF9F9488442D5 -:10E0300007DA002C03DB204670BD0421A8E7F54871 -:10E0400000E0F548201870BDF0B5064683B0F348EF -:10E050000190457A029534687068001B0702F04809 -:10E060003F0A001B0090062D2DD014202946414365 -:10E07000EC480122081884464168E9489205864622 -:10E08000081B904210D3631A93420DD30246704688 -:10E09000724503D900984018401C05E073450ED91D -:10E0A000411A0819401C404200280CDA60460295CB -:10E0B000857C0198C0790028D5D003B0F0BDD14946 -:10E0C000D94808F0B0F90298854226D01421484377 -:10E0D000D4490123401802908068D1499B058C46A1 -:10E0E000011B8646994210D3221A9A420DD36346E9 -:10E0F000614503D900997144491C06E019466245FF -:10E100002DD9091A0819401C4142002905DD029841 -:10E11000B17A807B814200D37446062D15D0C14967 -:10E120001420454368184268121B1202120ABA42B0 -:10E130000BD2B37A827B934200D38468857C0198AA -:10E14000C0790028B9D1062DEAD13068A042B4D0F8 -:10E15000E0190002000A3460706003B0F0BDA94904 -:10E16000B14808F060F9D8E7F0B5B049044648680E -:10E1700085B0C005C00D1CD0103840B200280CDAA4 -:10E180000207120F083A920892005118C9698007D5 -:10E19000C00EC1400806800F09E08108A44A89002A -:10E1A000891809688007C00EC1400806800F002842 -:10E1B00008D000272078002806D0012804D00020AD -:10E1C00005B0F0BD0127F5E72079062813D201003C -:10E1D0007944097949188F44020C0A080604002082 -:10E1E00018E0B42010E073200EE032200CE00A208A -:10E1F0000AE0062008E0FF208249E03008F013F929 -:10E2000021790020002905D002214618834D002FD6 -:10E2100002D003E00421F8E70020E871694602AA71 -:10E22000A068F4F751FC694608228A56E06801A903 -:10E2300080180122C01C1F2801DA019209E003AAFC -:10E24000F4F742FC6846007B002802D00198401C8D -:10E25000019000990198401808300002000A0190CE -:10E26000881B0002000A0090607969468872009855 -:10E270000390F4F7B8FB009A019B121A181A6D4923 -:10E2800012020002120A000A8A4216D8884214D8E2 -:10E290006846FFF7D9FE00990398814205D0881996 -:10E2A0000002000AF4F706FCA0600120E9790029C9 -:10E2B00086D0002FB0D005B0F0BD0020F6E7F3B552 -:10E2C0008FB05D480C460B9006F0C1FE5B4A0F997B -:10E2D000524F56185A4D203E00280BD05948007D09 -:10E2E000002803D058A15B4808F09DF82078012849 -:10E2F0007ED060E1687F0A280CD0687F297F401CAF -:10E30000884203D150A1544808F08DF820780128A4 -:10E3100004D00CE0287F0028F4D0F7E7F07F002835 -:10E3200003D049A14D4808F07EF80120F077697FBD -:10E330000F9814224A4E51438919087420780228F4 -:10E3400022D0687F14214843861920793072607981 -:10E35000707232460C323146A068F4F7B5FB0C20DF -:10E3600030560F2804DD1F3830733068401C306091 -:10E370000C217156301DE26801905018C01C1F28F6 -:10E3800070DA01200199FDE028494868C005C00DF8 -:10E3900021D0103840B200280CDA0207120F083AD8 -:10E3A000920892005118C9698007C00EC140080642 -:10E3B000800F09E081081E4A8900891809688007D2 -:10E3C000C00EC1400806800F002804D105201EA100 -:10E3D000000208F028F8687F1421484386190021BC -:10E3E000E0686A460691117006A9F4F76DFB00E03B -:10E3F000D7E06A46002010560F2834DD012033E0B4 -:10E400000020A107B8DF0000F603000000E05EF87E -:10E41000F70300000080841E00807BE16C0E00206A -:10E42000FFFFFF00E80D00200E07000000ED00E0F8 -:10E4300000E400E0FFFF3F00780E00209200002083 -:10E44000A00D0020C00D00207372635C72656D2EFC -:10E450006300000011050000EF040000F404000058 -:10E46000E00C002082E0002006994018079002206E -:10E47000B0722079307260797072A068311DC01C52 -:10E4800006911F2801DA012009E0F4F71DFB684618 -:10E490000078002804D0069806990068401C08609F -:10E4A000307A062813D201007944097949188F443B -:10E4B000020C0A08060400200FE0B4200DE07320CF -:10E4C0000BE0322009E00A2007E0062005E0FF20EB -:10E4D000FD49E03007F0A7FF00202179002943D053 -:10E4E00002214018069071680830081807990890B2 -:10E4F00009180698081A0C900020F871F4F773FABE -:10E5000004463060079820180002000AF060787A0C -:10E51000062825D0797A14204143EC480818406831 -:10E520000899029040180002000A0390707A694628 -:10E53000887402A8FFF788FD0299039A091B121B31 -:10E5400009021202E24B090A120A0C98994207D8F2 -:10E55000824205D80299069808180002000A306025 -:10E56000F8790028C8D110E00421BAE704AA01997B -:10E57000F4F7AAFA6846007C002804D001980199B3 -:10E580000068401C08602078B072687F0A2806D0B6 -:10E59000687F401C68770B9806F071FD47E000200B -:10E5A000F8E7F07F002804D0A320CAA1C00007F03C -:10E5B0003AFF0120F077CA490F98087420780228A2 -:10E5C00003D1C4A1C74807F02EFFC54E2079307291 -:10E5D0006079707232460C323146A068F4F774FAF2 -:10E5E0000C2030560F2804DD1F3830733068401C73 -:10E5F00030600C22B256301DE16801908818C01CB2 -:10E600001F2802DA012001990BE003AA0199F4F70F -:10E610005BFA6846007B002804D0019801990068E5 -:10E62000401C08602078B072AD4901200875687FF1 -:10E63000297F884224D07C7A062C23D0F4F7D3F9A2 -:10E6400014214C43A14961180A7C042A18D00A7C81 -:10E65000032A15D04B6889681B1A081A1B0200028E -:10E660009B4A1B0A000A082B0AD31146934207D87B -:10E67000884205D8687F297F884201D0F4F7FFF9E6 -:10E6800011B0F0BD687F297F8842F7D111B0F0BD8D -:10E6900010B50020F4F709F910BD10B50120F4F70A -:10E6A00004F910BDF1B5009802281ED08E4C607A96 -:10E6B000062803D187A18D4807F0B5FE0026A67174 -:10E6C0000125E572607A03211422804F5043C0195E -:10E6D0000174F4F7D9F9009800280BD0012829D04B -:10E6E000032879D07BA1824844E082480078F3F780 -:10E6F000EFFDF8BD8048007F002803D075A17F485A -:10E7000007F091FE65717C4D00202E60F4F7E0F873 -:10E71000A968481C04D0012300221846F4F70EF91A -:10E72000607A617A401CC0B2142251437A580121A8 -:10E730009047F8BD0120F4F7CBF8607900280DD0A0 -:10E740006D488068401C09D0607A617A401CC0B274 -:10E75000142251437A5806219047F8BD6648007F3D -:10E7600001280AD0022812D0032822D0042834D04D -:10E7700058A1634807F057FEF8BD2079002803D060 -:10E780002671F4F786F9E5705B480677F8BD207AC4 -:10E79000002802D1F3F7FCFD2572607A617A401CF3 -:10E7A000C0B2142251437A5800219047524806774C -:10E7B000F8BD514F0123397B78680022411A184671 -:10E7C000F4F7BCF82079002803D02671F4F761F93A -:10E7D000E57002203877F8BD19E0474E217870685F -:10E7E0000123411A00221846F4F7A8F8207A0028DD -:10E7F00002D1F3F7CDFD2572607A617A401CC0B278 -:10E80000142251437A58002190473577F8BD607A39 -:10E81000617A401CC0B2142251437A5805219047B6 -:10E82000F8BD10B5304C607A062803D129A13548CF -:10E8300007F0F9FD607A617A401CC0B2142251439E -:10E84000224A52580421904710BDF0B583B00620EB -:10E850000290F4F7C8F8244C0090617A2A4801909D -:10E86000062920D0617A1420414318480918097CF0 -:10E87000042918D0617A142251430818007C032817 -:10E880007BD0019900980B6849681B1A081A1B0273 -:10E8900000020F4A1B0A000A082B6ED3114693424E -:10E8A0006BD8884269D814488068401C03D009A1FD -:10E8B000164807F0B8FD00206071607A06282CD158 -:10E8C0006078002829D023E0B8DF0000E80D0020A0 -:10E8D000FFFF3F007372635C72656D2E6300000082 -:10E8E000C00D00201E0500006C0E00204F0500002A -:10E8F000A20500008C0000204C0E00205B050000EB -:10E9000096050000A90500005C0E0020E50500004A -:10E91000FE48C178417081780170607A062815D070 -:10E92000607A1421FA4A48438018007C04280DD1EB -:10E93000607A0290607A0121142358438018017490 -:10E94000607A58438018807C6072A172F14D687FB4 -:10E95000297FF14F884233D0F04E287F142148435D -:10E960008019007CC05D0128287F07D048438019AA -:10E97000007CC05D02282FD044E0FDE11421484313 -:10E980008019807A01280AD0287F0221142250435E -:10E990008019007CC155287F0A2808D009E0287F0B -:10E9A0000021142250438019007CC1552AE0002028 -:10E9B00001E0287F401C2877687F297F8842CCD1DE -:10E9C000D74D287D00284CD0287CC15D012928D056 -:10E9D000C05D022830D03AE0287F142148438019D6 -:10E9E000807A012803D0CFA1D14807F01CFD297FF0 -:10E9F00000201422514389198872297F51438919B3 -:10EA0000097CC855287F142148438219287F484330 -:10EA10008019017C0098FEF7E9FF287F0A28C8D1F9 -:10EA2000C5E7A97A012904D00221C1550020287523 -:10EA30000DE00021C1550AE0A87A012803D0B9A150 -:10EA4000BC4807F0F0FC0020A872297CC855287D3E -:10EA5000002806D0297CB24A0098FEF7C7FF0020A4 -:10EA60002875029806281ED014214843A84940184A -:10EA7000017C012917D107210174AF4D287B0A2899 -:10EA80003CD0287BE97A401C884203D1A5A1AB4841 -:10EA900007F0C9FC297B02986854287B0A2831D0EA -:10EAA000287B401C2873607A06287DD0A07A002835 -:10EAB0007BD00020A072617A1420414394480E1844 -:10EAC0009F49B56873680A46F6687C32CB679660E2 -:10EAD00055609C4D697E002916D00226617A142269 -:10EAE0008B4851430818407B06281BD2010079440B -:10EAF000097949188F440A1412100E0CE87A00287C -:10EB0000C4D0C7E70020CDE70426E7E700210FE0E7 -:10EB1000B4210DE073210BE0322109E00A2107E066 -:10EB2000062105E0FF208849E03007F07CFC002149 -:10EB30002973687E022801D0012810D12869009A23 -:10EB40004018821A1202120A3A2A08D932380321CE -:10EB500000026976000A28613220287308E0322911 -:10EB600006D2207A00280AD1F3F712FC012005E032 -:10EB7000207A002803D0F3F734FC00202072634988 -:10EB80000822487820700978012901D0032906D18C -:10EB900001212171297B884201D9421A0832A378C8 -:10EBA000002B00D0921C01E08DE09BE02179002930 -:10EBB00001D1002B5DD09446644A00990092019ADD -:10EBC000176852687F1A511A3F0209023F0A090A60 -:10EBD000BC451BD85D4A974218D8009A914215D877 -:10EBE000297B884223D92B69421A9A1A1202120AE7 -:10EBF000101880190002000A2A616860002914D0E8 -:10EC0000032028770006000E3ED14CE00020207142 -:10EC1000A070297B002925D028694018801900029E -:10EC2000000A6860022028772EE00120E9E781428F -:10EC30000BD92A69511889190902090A6960002843 -:10EC400001D00420DDE70220DBE7002B03D135A152 -:10EC50003F4807F0E8FB286980190002000A686055 -:10EC6000002004E0296989190902090A69602877E6 -:10EC700019E0287B00280FD02969081880190002A4 -:10EC8000000A686002202877286901238119002280 -:10EC90001846F3F753FE09E0286980190002000ABC -:10ECA0006860002028770120F3F712FE607A1421B3 -:10ECB000484317490C2240188256012300206968F6 -:10ECC000F3F73CFE0EE00120F3F702FE0020F3F71D -:10ECD000FFFDF3F7E3FD207A002803D0F3F781FB73 -:10ECE00000202072A078002804D0F3F7D2FE002084 -:10ECF000E070A0706078002804D00448C1784170AA -:10ED000081780170207900282BD023E08E0000202C -:10ED1000E80D0020A00D002091000020E00C002054 -:10ED2000C00D00207372635C72656D2E630000007D -:10ED30000706000023060000D80D0020350600005D -:10ED4000E00D00204C0E0020B8DF0000FFFF3F0068 -:10ED5000870600000020CF49E0700978002900D123 -:10ED60002071CD48017BC07A814203D0CB484078E6 -:10ED7000F3F7AEFA0120E07103B0F0BDF0B5C84C76 -:10ED80000746607A83B0062803D1C6A1C84807F0B9 -:10ED90004AFB607A1421C74E48438019007C03283F -:10EDA00003D0C0A1C44807F03EFBC44DA868401C76 -:10EDB00003D0BCA1C24807F036FB607A1421484357 -:10EDC00081190C20085600216A4600911171C01962 -:10EDD00001AA6946F3F778FE6A46042010560F2808 -:10EDE00001DD012000E0002000994018696840180A -:10EDF0000102090AA9606079002804D001230022D9 -:10EE00001846F3F79BFD03B0F0BD70B5AE4CAD4AAC -:10EE10000B1AA34214D3451AA54211D3934203D926 -:10EE2000101A43185B1C0BE0954204D9511A0818BC -:10EE3000401C434204E0A549A54807F0F4FA00232A -:10EE4000184670BD10B50146012300220220F3F7D9 -:10EE500075FD10BD10B50220F3F73AFD10BD10B5D9 -:10EE6000F3F7C1FD10BDF0B58D4D0446E87A83B0CF -:10EE7000002803D18BA1974807F0D5FA642C4DD315 -:10EE8000954900200246091B824147D39348417FA0 -:10EE9000007F814242D19248007D00283ED1687AAD -:10EEA0001421844F4843854EC519306801AA0019C2 -:10EEB0006946F3F709FE694604200856002802DD7A -:10EEC0000098401C0090A96800986B680A18D21A34 -:10EED0001202844B120A9A4220D8AA7C062A08D031 -:10EEE00014235A43D2195268511A0902090A81425D -:10EEF00014D3B068401C05D00120F3F7E9FC0020D2 -:10EF0000C043B060306800193060A86800994018AC -:10EF10000002000A7061012003B0F0BD002003B0C0 -:10EF2000F0BDF8B50646401EC5B2142061496843DD -:10EF30004418207C002803D15AA16B4807F073FACB -:10EF40006648017F407F81420CD0684A14234B43BE -:10EF50009B181B7CB3420CD00A290CD0491CC9B2A7 -:10EF60008142F3D15E48017D002964D0007CB0422B -:10EF700061D10020F8BD0021F1E7217C052905D0F1 -:10EF8000217C062902D0217C072928D10121217466 -:10EF9000C17A0023027B8A4221D00246565CAE42EF -:10EFA00001D1012301E0002B04D00A2911D04E1C0D -:10EFB000965D56540A290ED0491C167BC9B28E4262 -:10EFC000ECD1002B0BD0117B002906D0117B491E00 -:10EFD00004E00026ECE70021EFE70A211173617CD1 -:10EFE00000292AD06774C17A0023027B8A4224D088 -:10EFF000425CAA4201D1012301E0002B04D00A297E -:10F0000012D04A1C825C42540A290FD0491C027B50 -:10F01000C9B28A42ECD1002B0FD0027B0146002AF4 -:10F0200006D00A7B521E04E00022EBE70021EEE747 -:10F030000A220A7301E018480027217C01299CD18B -:10F04000617C002999D10120F8BD70B505461420D6 -:10F05000184A05216843801801740F4C207B0A2848 -:10F0600011D0207BE17A401C884203D11749204807 -:10F0700007F0D9F9207B2554207B0A2807D0207B74 -:10F08000401C207370BDE07A0028EFD0F2E700202A -:10F09000F7E700008E000020D80D00208C00002033 -:10F0A0006C0E00207372635C72656D2E630000004D -:10F0B000EA060000E80D0020EB0600004C0E0020E0 -:10F0C000EC060000FF7F841E0020A107B8DF0000CF -:10F0D0000E0700002D070000FF1FA107A00D002054 -:10F0E000C00D0020FFFF3F006A070000E00C002079 -:10F0F0000702000070B5FF4D00246C702C70AC61ED -:10F1000000F0CEFC284620304470C473AC6214304A -:10F110002C6305F094FF002804D0FF20F6A14E30A8 -:10F1200007F081F92C7770BD0B23DB4310B5C21AB1 -:10F13000F54998421FD008DC1C3222D00A2A20D080 -:10F14000142A1CD0182A08D117E0083011D004283E -:10F150000DD0082809D00C2805D0FF20E6A1753075 -:10F1600007F061F910BD04200CE000200AE0FC204B -:10F1700008E0F82006E0F42004E0F02002E0EC20B3 -:10F1800000E0D820C86010BD70B50125DF49022617 -:10F190000E60DF490022CA63CD63DE49C96A0907F0 -:10F1A0000ED4DC494031CB6ADB4A53620B6B93626D -:10F1B0004B6BD3628B6B1363C96BD30519435163DC -:10F1C000D14C002826D0012828D0FF20CAA1A13088 -:10F1D00007F029F9D148A063FF200430606325635C -:10F1E00003202061C849962040314860C1491C2055 -:10F1F0000856FFF799FFCB49C9488860C948CA49F2 -:10F2000080304160C9490160C9480660C949102081 -:10F21000486070BDC8486061C84803E0C848606184 -:10F22000C648801FA061D5E770B50C46B14D0146B8 -:10F230000622A81C06F079FF2C7270BDAD48203064 -:10F2400040787047AB4A517010707047F8B504466B -:10F250000D465079117900020843690009190884A4 -:10F260001F461646501C06F0C1FF317800020843C5 -:10F27000A90060502846083001268640002F0ED095 -:10F28000012F04D0FF209CA1E83007F0CCF8206BC0 -:10F29000304301460120A84001432163F8BD206BA3 -:10F2A000B043F6E770B50D460446082904D9FF209F -:10F2B00091A1F93007F0B7F80022A24809E09100C7 -:10F2C000635809180B6053001B191B8C0B62521CEE -:10F2D000D2B2AA42F3D3206B9A494031086070BD84 -:10F2E00010B50446FFF720FF8248047710BD81481F -:10F2F0002030007B704710B5834CC178616206F006 -:10F3000075FF0002E06110BD252808D0262808D02E -:10F31000272808D041000A2807D8091D06E0022145 -:10F3200005E01A2103E0502101E0891DC9B2764AA7 -:10F33000916075494031486170476E4988617047F6 -:10F3400070B5002818D002226A4C784B0320A272B4 -:10F35000F0331860734D72486860002001262075F4 -:10F3600000290BD0012910D002291BD0952062A1C1 -:10F37000800007F058F870BD0122E5E77248012AC5 -:10F3800001D0466070BD066070BD5A48012A006B0E -:10F3900005D00121490508432063696070BD012142 -:10F3A0000905F8E7A069002803D153A1674807F0D1 -:10F3B0003AF8A169A06A40186549886059486549CA -:10F3C0008030816060491031C1600120216BC00331 -:10F3D00001432163686047482030C67370BD08B59B -:10F3E0000C20694608705148002110380161564AC6 -:10F3F000012111610BE000BF00BF00BF00BF00BFD3 -:10F4000000BF00BF00BF6A461178491E11706946EF -:10F410000978002902D001690029ECD068460078FB -:10F42000002804D1494834A1203006F0FCFF08BD73 -:10F43000F8B53E4CF034206886083E48B600416876 -:10F44000C906CD0F10218160002727603549344857 -:10F450008860FFF7C4FF35481038076100F020FBD3 -:10F460002660002D02D0334910204860F8BD10B549 -:10F4700006F0BCFE00022449000AC86310BD2349FF -:10F48000022008602A49086070472049022080391C -:10F4900008607047304908707047164810B534301E -:10F4A00005F0D5FD002804D0284813A15A3006F0F5 -:10F4B000BAFF10BD0F4810B5343005F0E0FD10BDA7 -:10F4C00011494860704770B50A4D0446A86AA042C9 -:10F4D00004D31E4808A16B3006F0A5FF0120287355 -:10F4E0001C49002008392C6148601948446000F02C -:10F4F000DEFA70BD7C0E00207372635C68616C5F25 -:10F500007263732E630000000015004080E100E08C -:10F51000C01F004080000010001700405B06000084 -:10F520000040000400F50140408000401011004000 -:10F5300080E200E000130040060102002500030203 -:10F5400005010300001600400010004047020000C3 -:10F5500040850040488100409700002010B5FF48DA -:10F5600002210173C6210161FD4A00215160806AB8 -:10F57000FC49C630486000F09AFA10BD0121FA48F3 -:10F5800089058160F548026B8A430021026301739B -:10F590007047F64801214160C160F1490020486090 -:10F5A000F0494860ED4988627047F149402008629F -:10F5B000F0490A6802430A607047EE480168402239 -:10F5C00091430160EA49002008627047E9480168F8 -:10F5D000102291430160E849012088617047E749A2 -:10F5E0000020C861E34801681022114301607047A0 -:10F5F000E249CA69012A01D000207047DC4A9268BA -:10F600005206520E524202700020C861012070471B -:10F6100070B5D248D24D017B002902D0696801291A -:10F6200009D00024D5490A69012A06D00023807A2E -:10F63000012804D006E00124F4E74023F7E7CA6874 -:10F64000012A04D000221A43012802D004E020221B -:10F65000F9E74B68012B05D000231343C84A022861 -:10F6600002D007E01023F8E71668012E02D1CE6819 -:10F67000012E04D000261E43022802D007E00826EF -:10F68000F9E71268002A02D1CA68012A04D00022D0 -:10F690003243022802D005E00422F9E7002C01D011 -:10F6A000022300E000231343022807D14868012801 -:10F6B00004D16868012801D0012600E00026B14885 -:10F6C0001E4302681206120E02D04A69012A00D0B7 -:10F6D0000022A24C2034227300680006000E02D0E3 -:10F6E0008869012800D000206073A148006A0028C2 -:10F6F00003D000F0A8FA012800D00020A07300F089 -:10F70000C7F9002068603046F3E670B50C00054686 -:10F7100003D19D499D4806F086FEE00706D0012CE6 -:10F7200004D06D209849C00006F07DFE002D0ED05B -:10F7300002218A4801294172C4728E4809D00229E7 -:10F740000AD0924890491A3006F06DFED1E60121A8 -:10F75000EFE70168042201E001680822114301601B -:10F76000C7E670B57D4C0022E37A990701D54107C1 -:10F7700014D47A49DD062031002D05DA4D7B002DA9 -:10F7800002D08D7B002D09D01D0702D50D78002DEC -:10F7900004D15B0703D54978002900D10122637A9F -:10F7A0007449002B06D00225284010430CD0FFF7E7 -:10F7B0003FFE9EE66C4A76489060086880088000AC -:10F7C000086000F06DF994E6012B07D0022B0ED0F3 -:10F7D0006E486D496B3006F026FE8AE60868042202 -:10F7E0009043086000F05CF90120A07281E608688F -:10F7F00008229043086000F053F9A57279E6574952 -:10F8000008757047F8B5554F544D2037FA7B564C64 -:10F810000021286B002A31D00122D203A26090433C -:10F820002A46544D10632E685A4A102090600020DA -:10F8300028601014A060FFF7D2FD00F029F92E60B7 -:10F84000281460605349102048604448817A4A482F -:10F8500001290DD002290ED04C484FA1801F06F07F -:10F86000E2FD0020F8733D48007D022874D0F8BD09 -:10F8700001210160F5E701214160F2E73A4A906019 -:10F880000E462963FFF7C4FE044636482E754168CC -:10F8900069620068A862AA7A022A0AD16A78002AF4 -:10F8A00007D0334B403B5B681B7813402A789A4360 -:10F8B00008D03E70E20708D0084603F04AFD012157 -:10F8C000A86A09E001223A70F4E7A10601D50221F5 -:10F8D00002E0A10702D5002103F04BFD2448403887 -:10F8E00041680622A81C093106F0F2FB002809D164 -:10F8F0001F48297A403840680078C009814201D108 -:10F90000012000E0002078702046FFF72AFF2648FB -:10F91000007800280DD001284AD002285BD00328A7 -:10F9200078D01DA1214806F07EFDA87A022870D06B -:10F93000A3E0A00701D502F0EDFB200702D50120CE -:10F9400002F020FC600702D5002002F01BFCA0069C -:10F95000EBD502F07CFBE8E793E000007C0E002092 -:10F96000408100404085004000F50140008000409B -:10F9700040150040001200400010004000110040FF -:10F980000014004040160040F8F40000630300003B -:10F9900000400004001300407372635C68616C5F98 -:10F9A0007263732E6300000097000020E6040000DD -:10F9B000A00701D504F0BBFF200702D5012004F009 -:10F9C00021FF600702D5002004F01CFFA006ACD583 -:10F9D00004F0A4FEA9E7A007BF27002802DA3C40F4 -:10F9E000F3F702FB200703D53C400120F3F7FBFAB5 -:10F9F000600703D53C400020F3F7F5FAA00602D5D6 -:10FA00003C40F3F7EFFA60068FD5F3F7EEFA8CE798 -:10FA100000E012E0A00701D5F3F7EAFA200702D5CB -:10FA20000120F3F7E4FA600702D50020F3F7DFFACC -:10FA3000A00690D5F3F7DAFA77E7287B00281CD0E8 -:10FA40001F494E6002281FD0012803D01D491E48BF -:10FA500006F0E9FCA96A2869884204D81A481949BD -:10FA6000401C06F0E0FC2969184841600120296B20 -:10FA700080050143296316494860287D012800D08C -:10FA8000F5E6F3F7C5FAF8BD2969A86A4118EBE76E -:10FA900010480021C160016141604161816170478E -:10FAA0000D480021417281720121C17270470A48DC -:10FAB0000121026B89050A430263054841607047D2 -:10FAC0004081004098F90000FB04000040850040A0 -:10FAD00000F50140001100407C0E00202E4800215E -:10FAE00001704170704770B5064614460D460120FE -:10FAF000F1F758FC28490120284B08709E60DC6013 -:10FB00001D6170BDF8B504460120F1F74BFC224998 -:10FB10000120087021494C60214900264E600321D4 -:10FB2000204D0906A960204F002C0AD0012C03D0DB -:10FB30001EA1412006F077FC3E60032000066860AD -:10FB4000F8BD386001200006F9E710B512480178C9 -:10FB500000290ED00321134A0906916010494A6812 -:10FB60000021002A03D0154A1268427000E041705B -:10FB700001700020F1F716FC10BD0748017800293C -:10FB800007D007484068002802D00C480068C0B27F -:10FB900070474078704700009800002000F5004052 -:10FBA00000F1004000F5014000F200407372635C18 -:10FBB00068616C5F63636D2E6300000000F40040B9 -:10FBC0003A4800210170417010218170704770B572 -:10FBD000064614460D460220F1F7E4FB01203349A6 -:10FBE000334A0870E41E14619660556070BD10B50C -:10FBF0000220F1F7D7FB2D49012008702D48002184 -:10FC000001604160816001202B49C005486010BD42 -:10FC100010B5264C2078002811D001202649C005B7 -:10FC2000886000F034F80021002804D001206070C2 -:10FC30002248006801E061701020A070217000204F -:10FC4000F1F7B0FB10BD10B51848017800290BD0B2 -:10FC500018480068002805D000F019F8002800D0E6 -:10FC6000012010BD022010BD407810BD10B50F4816 -:10FC70000178002909D000F00AF8002803D00F48C5 -:10FC80000068C0B210BD102010BD807810BD0948BA -:10FC90000168002905D04168002902D08068002849 -:10FCA00001D0002070470120704700009A0000201A -:10FCB00000F5004000F1004000F5014000F4004074 -:10FCC000FFB593B0044600201D9E049015981C9D1E -:10FCD0001027082806D0E06901F014F8002809D0A0 -:10FCE0003770CCE028880921384328801F980227E4 -:10FCF000017016E0E169012088710521E269C902FD -:10FD00009180E1698872E169F9480881E169002020 -:10FD10008873288820210843288011211F980427F0 -:10FD200001701F980225801C0390307810900A20E3 -:10FD30003070204618301190F6F76BFC00206FE011 -:10FD40001598102809D1022D07D06846828A049997 -:10FD50000398401A8270110AC1706846C08A1699C9 -:10FD6000884203D9E349097A149106E0884204D114 -:10FD70001099002901D0317021E003990870000A20 -:10FD800048701E980088401BC01B83B2FF20C01B18 -:10FD9000984200D203460398149AC0190CA9009205 -:10FDA000019002912020015D6846C08A0022F6F78A -:10FDB000A5FC3070002806D0C0B2832862D0684607 -:10FDC000C08A208345E00F98002805D0C948006804 -:10FDD00000790A2830D33CE06846008EC119C9B2C8 -:10FDE0000491022D0FD01F99049A4978914203D1B2 -:10FDF0006A46128C824209D0BE480491006801789C -:10FE0000032909D027E008461F994870B9480068BF -:10FE10000178042906D008E000790A281BD20120C5 -:10FE20000F9009E06946C98A8180039904980818EF -:10FE300003900498281885B205AA14991198F6F72A -:10FE4000EBFB002805D11E980088401BB84200DB60 -:10FE500076E7022D0ED01598102807D1049A039941 -:10FE60006846808A891A8870000AC8701E980580C2 -:10FE7000002030709F4800680078032802D00020DE -:10FE800017B0F0BD0220FBE7F8B50446406B002632 -:10FE9000134600282BD0491F8DB2618F2A460832A5 -:10FEA000278F8A18BA4221D89A7840185F781102B1 -:10FEB00039430170090A41701A79DF781102394318 -:10FEC0008170090AC1700571290A41712A46591DBC -:10FED000801D06F02AF9608FAD1D401980B2608741 -:10FEE000626B002110180170417000E00926304655 -:10FEF000F8BD30B50B88048F9C4212D9446BE018D2 -:10FF00004478057824022C430BD0447905792402E7 -:10FF10002C436404640CA41D1B190B80106000208A -:10FF200030BD822030BDF7B588B000256846058217 -:10FF300005275DE00398417802780E021643417967 -:10FF4000027908021043000452D40A980123068063 -:10FF500005A802905B02002200970195304609999E -:10FF6000F6F7CCFB04004AD16846018A0183039866 -:10FF70004179027909021143437802781C02144343 -:10FF8000B4421ED10A041CD44B0401215B0C89032A -:10FF900000950B4301970295C17880780A020243CD -:10FFA00020460999F6F7C6F9040011D1039948795A -:10FFB0000A79000210430122D20310430871000A9B -:10FFC000487103AA06A90898FFF793FF0400CED052 -:10FFD0000399009501970295487809780002084333 -:10FFE00069468B8A00220999F6F7A4F9822C06D17A -:10FFF00003AA04A90898FFF77CFF04009AD068467A -:020000040001F9 -:10000000058209E003984179027909021143490404 -:10001000490C0171090A417103AA04A90898FFF764 -:1000200068FF0028EED0822C02D020460BB0F0BD35 -:100030000020FBE730B50446406B002597B0002850 -:100040000DD00B2268460270228F0281606B0391F3 -:10005000019000216846F3F7E2FA6846057065638F -:100060006587258717B030BDF8B50F460546696B23 -:100070000020069E144600290FD0012B0DD13246D8 -:1000800039462846FFF74FFF002806D1002C04D040 -:1000900032463946284600F044FEF8BD0022028070 -:1000A000C262831D0263C3614263428702872030BC -:1000B0000170704710B50022D24302800420FDF782 -:1000C000FEF910BD10B596B00446FFF7B3FF208EC1 -:1000D000002808D0012069460870E06A01900021DC -:1000E0006846F3F79CFA0020E062206316B010BD6A -:1000F00001280000B40E00200146098800200A07EC -:1001000000D501200A06120F01D002221043CA05B1 -:1001100001D5042210438A0501D510221043490558 -:1001200001D5202108437047FFB5A9B00600329DD4 -:10013000359C2B981F46229016D0007841060FD48C -:100140008106890E1E2909D021884A05520E0BD13D -:100150003A88172A08D3FE4A914205D0C10906D031 -:100160008006800E122802D003202DB0F0BD20465C -:100170002C302690F7492A980872002018AA03907C -:1001800010726A46107404AA0A60339A4A6020AA60 -:10019000908090812298007801908106681C1C90C4 -:1001A000701F1D902B98890EC21C2492224620326B -:1001B0001B92083A401C02920B0006F025FA1FFD24 -:1001C000FD11FD1FFD8EFDFCFDFBFDFAFDF9FDFCA3 -:1001D000FDF8FDFDFDF7FDF6FDFDFDFDFDF5FD0066 -:1001E000032E76D102E018A9087219E303202870C3 -:1001F0001C9917220A7000224A70CFE2052EF0D116 -:100200004178027808021043208320A98880249A2C -:100210005178127809021143618300287ED0884208 -:100220007CD800202072E080401E60840298F6F79F -:10023000F0F905202870A81C0190022000901BAA4C -:100240002A990298F6F7E8F9002868D118A8807C66 -:10025000012803D002206870102002E0012068709D -:1002600002202490002225A91CA8F2F746FD0028B0 -:100270002BD120A8007D2499814226D13A8800996B -:10028000801C511A814220DB10A8C18D0198017099 -:10029000090A417001991CA8891C01910099019AD1 -:1002A000891C009125A9F2F728FD20A8007D01995D -:1002B0001BAA091801910099081880B200902A9988 -:1002C0000298F6F7A9F90028CCD00098022826D089 -:1002D00064E272E018A9087261E2072E6DD34178DA -:1002E0000346027808021043208320A98880249ABC -:1002F0005178127809021143618300280ED0884298 -:100300000CD8012020725879197900020843E08046 -:1003100000202073E06900F0F5FC01E098E0A9E01E -:1003200000280ED1E169012088710521E269C90226 -:100330009180E1698872E16987480881E16900205C -:100340008873F01F60842298C01D60620298F6F7DF -:1003500060F907202870681C00900120019000209F -:1003600010A9C8852FE00198012814D0E069807990 -:10037000012830D000981E38417F007F09020143D8 -:1003800000980170090A41700098801C0090019843 -:10039000801C80B2019010A8C18D00980170090ADC -:1003A00041700098801C09E00AE296E13BE1DFE041 -:1003B00004E29BE077E036E016E2AFE000900198BF -:1003C000801C80B201901BAA2A990298F6F724F9A2 -:1003D000002803D007E010A8818DD1E73988019863 -:1003E000081A0428BFDA0198012843D0E06980790F -:1003F000012804D010A8818D5548814206D110A84B -:10040000818D00980170090A417009E000981E383A -:10041000417F027F0802009910430870000A48706B -:100420000198801CBAE1072E01D0152E76D14178B3 -:10043000027808021043208320A98880249A5178EA -:100440001278090211436183002801D0884201D942 -:1004500001203FE7012020720020E0802073052E5C -:100460000AD01D982299E269C0B2491DF2F71FFC1B -:10047000002801D00A202DE70020C04360841AA87C -:10048000019023A9229802970395009100780023F8 -:100490008206920E20462A99FFF712FC0390208BC9 -:1004A00020A988807BE1032EC0D1402220A98A8127 -:1004B0004178027808021043208320A988802A9975 -:1004C0001EAB1C9A02930192009139880022491EAA -:1004D0008BB21B990978F6F711F918A90872002850 -:1004E00033D10B20287010A8008F3FE0052E9DD13E -:1004F000802220A98A814178027808021043208353 -:10050000249984464A78097812020A43628420A911 -:1005100088801248824202D30720DBE6AFE03F200A -:100520008002024362842A981FAB1C9902930191B6 -:1005300000903888401E83B21B9801786046F6F719 -:10054000DDF818A9087200280CD08328AAD107E08A -:10055000FFFF0000B40E002001280000010200008F -:100560000220B8E00D20287010A8808F401C15E1F3 -:1005700001990C22C9095143C91CB14204D90198FF -:1005800040067CD5002009E1427803781002184328 -:1005900020AA9080844622980078400609D505203C -:1005A0006A46107422980078C00905D000201074A3 -:1005B0001DE106206A46107424981F902A9A009024 -:1005C0000023701A029383B21E9001921B9800229E -:1005D00001786046F5F7AEFE18A908720022694658 -:1005E0000A74832801D102200390229800784006E3 -:1005F0000DD52088C00506D520A9208B8988884282 -:1006000001D100206062002018A90872C6E0FF2115 -:10061000013120A88181808820831E9860841F98E2 -:1006200060621320B8E0052E29D3417802780802D1 -:10063000104320A98880218F002902D0FE4A9142D0 -:1006400006D10A216A4611740121C943218702E0BB -:1006500007216A46117422992A9A491D0192009134 -:1006600001221D990023D203029311438BB22499D6 -:100670004A78097812020A431B99097800E0C9E018 -:10068000F5F758FE18A90872002269460A7401227B -:10069000520220A98A81832808D0002809D0218FFE -:1006A000E54881427ED10020208778E08888208339 -:1006B0004DE7606B002808D031462046229AFFF7AC -:1006C000E3FB18A90872002869D12B463A46304648 -:1006D000229900F056FB039061E02298022E4078A8 -:1006E00001907DD1002801D0012879D108206946E8 -:1006F00008740198087521A800901B9800220178C1 -:100700002046019BFFF7B0FC6946002248758A75B8 -:10071000002802D10198012809D0208F002806D096 -:10072000002008740120800220A988810EE004A81E -:100730003399F2F774FF0390002069460874012092 -:10074000800220A988810398022807D0BB4800684E -:100750008079002805D018A908722BE00198208321 -:100760001DE00398002803D0812018A9087240E0FA -:1007700021A800901B98012201782046019BFFF7D9 -:1007800073FC18A9087220463499FFF753FC18A986 -:10079000087A002803D11920287001203880684683 -:1007A000007C00E03CE0002804D004A83399F2F774 -:1007B00036FF0390039800282ED01AE0062012E599 -:1007C0002078000713D5012E11D109216846017444 -:1007D000A188818204203499FCF771FE082100E091 -:1007E00005E020A88181CDE60198400612D50320BE -:1007F000039020A9208889890843208020A988891E -:100800004005400E04D026992B98086026988680D3 -:100810000398AAE40420E6E418A8007A00280ED081 -:100820000120287022980078687020A88088A8701D -:10083000000AE87018A8007A28710520388020A9DD -:100840002088898988432080E2E7FFB50746A1B068 -:1008500000201C903A7801209040794A7C68104032 -:1008600010AA1087744B22885B1C9A4203D0002880 -:1008700004D0100702D5012025B0F0BD249E002031 -:10088000307023980025028810A8028518A80575E5 -:100890006A4B68461972057404A8186020462C300B -:1008A0001B902A985860249E94463878721C052123 -:1008B000039201282DD0022808D003287DD130785A -:1008C000800980011D303070B889A08038780228F6 -:1008D00004D13078800980011B303070F01C1FAAD1 -:1008E00001900292009110A8008D0022C01E83B2D8 -:1008F0002020015DB889F5F701FF0028DED10398BB -:10090000B9890170090A417010A9888FC01C088537 -:1009100028E1787B18AA10753A7B012A02D0022AB6 -:10092000CCD1FCE022887F231B011A4010AB1A8730 -:10093000802A4AD006DC102A10D0202A0ED0402A65 -:100940000AD124E0FF3A013A65D0FF3A013A79D062 -:10095000FF3AFF3A022A76D00525A2E02078C006A9 -:1009600001D5082000E010201C9004206A46107475 -:10097000002090821AA81DAA1EAB03960192029035 -:1009800000933B8A20461C9AFFF79AF984E0228B59 -:100990003B8A9646934268D10A221C92002839D19C -:1009A000039801906046401E1FAA83B20292202045 -:1009B0000091015D0022704600E0BAE0F5F79EFE6E -:1009C000014618A801750B201AE0228B3B8A964637 -:1009D00093424AD10C221C92002862D103980190C4 -:1009E00060461FAA401E0292009183B22020015D42 -:1009F000628C7046F5F782FE014618A801750D203D -:100A0000307010A8818F491C01850421684601744B -:100A1000218B818245E0238B3A8A9C469A4224D1DD -:100A200012221C9200283CD1606A002813D00022B8 -:100A30006B4607C3638C07E0FEFF0000B40E002086 -:100A400009F800000DE04BE02020015D6046F5F75D -:100A500071FC18A9087513203070012010A90885B1 -:100A60001FE0398A228B914201D00425B6E016217D -:100A70001C91002815D11B98818802682046FFF739 -:100A800003FA18A9087500280BD11B983346016892 -:100A900080881AAA00F075F9054602281BD0042D9B -:100AA00019D01B988088002811D06846007C002847 -:100AB00004D004A82A99F2F7B2FD05460120694640 -:100AC00008741B981B990068059000208880002DF1 -:100AD00048D0052D2ED06846007C032878D07DE0D4 -:100AE00018211C91002806D0388A20832046B96836 -:100AF000FFF7A0FAD5E72046183000902020015DCE -:100B0000237E01222046FFF7AFFA18A908750028B6 -:100B1000ECD119203070012010A90885E6E7208863 -:100B200001214902084010A90887FF38FF38022830 -:100B300006D0052510A92088098F884320804DE024 -:100B4000208F9849884290D116201C90386900283F -:100B500005D06063B88A20870020608702E000200B -:100B6000C043208710A8008F7F21090102468A43D5 -:100B70000DD0782300220420B968FCF7FBFB3878FD -:100B8000A07010A92088098F0843208002E02188E6 -:100B9000814321806846007C002805D08248416856 -:100BA00004A8F2F73CFD054618A8007D002815D0E2 -:100BB0001C98707001203070208BB070000AF070AB -:100BC00018A8007D3071052110A8018506E0FFE717 -:100BD0007548416804A8F2F722FD05467248017A7B -:100BE00020884005400E22D11B98808800281ED006 -:100BF000239A0026138810AA1385249A2A9B6F46ED -:100C00004CC71B9A039412681AABFFF78DFA05467E -:100C100002280CD00120694608741B982A990068A4 -:100C2000059004A8F2F7FBFC05461B98868010A8E7 -:100C3000018D2398018028461EE600B597B0042850 -:100C400007D102206A461070019100216846F2F730 -:100C5000E6FC17B000BD10B5534C037800222168A4 -:100C6000012B02D0022B42D126E00B78002B01D0C1 -:100C7000042B03D10A712268032111702168838833 -:100C80000A79D200921D8B5221680A79D20008326B -:100C90008918C2880A80216803890A79D2000A3239 -:100CA0008B52428920680179C9000C314252216877 -:100CB0000879401C08711EE00A7482888A802168C5 -:100CC000C288CA80226801891181226841895181C4 -:100CD000C1682068C1606168F2F7A1FC0146022882 -:100CE00007D02068007C002802D1002903D0812091 -:100CF00010BD832010BD002010BD406B002800D027 -:100D0000012070478178012909D100880521C90295 -:100D1000884202D0491C884201D10020704705203A -:100D20007047F7B586B00024684615460F468481A3 -:100D300005261AE0049841780278090211432980B7 -:100D4000811D019602940091417902790B021343AF -:100D5000C178827809020A43417800780902084381 -:100D60003946F5F7E7FA002806D104AA03A9069840 -:100D7000FFF7BFF80028DDD0822800D1002009B09D -:100D8000F0BD10B51488844201D2052010BD17248F -:100D90001C701080421E581C491C05F0C6F900202A -:100DA00010BD0000FEFF0000B40E002010B540484A -:100DB00004F04DF9002801D00C2010BDFF211131A5 -:100DC0003C4805F011FA3B4901200870002048809A -:100DD000E03188718874887520310871344804F0D6 -:100DE0004EF9002010BD10B5314804F028F9002854 -:100DF00003D031A1312005F016FBFFF7D7FF002803 -:100E000003D02DA1382005F00EFB10BD10B504460F -:100E1000274804F01CF9002801D00C2010BD2549FA -:100E20000878002807D0002008702148216004F0CD -:100E300026F9002010BD1E4804F021F91F2010BD26 -:100E400070B505460C461A4804F001F9002801D097 -:100E50000C2070BD174A5088A84202D11078002893 -:100E600004D0134804F00BF9122070BD1048226022 -:100E700004F005F9002070BD10B504460C4804F0DC -:100E8000E6F8002801D00C2010BD0A48017800299E -:100E900007D00020C0432080054804F0F0F812205D -:100EA00010BD40882080024804F0E9F8002010BD01 -:100EB0009D000020C00E00207372635C6C6C5F6448 -:100EC000622E630010B5282105F08CF910BD70B5B5 -:100ED000054600780A0700090001120F1043287028 -:100EE0000B0005F091FB07050705070509050B0039 -:100EF000062408E00C2406E0222404E00024F2A1E9 -:100F0000572005F090FA68788009800120436870C6 -:100F100070BD00780007000F704710B50622C01C96 -:100F200005F003F910BD10B50622093005F0FDF8F3 -:100F300010BD0278BF23C9071A40490E0A43027048 -:100F4000704702785206520EC9010A430270704778 -:100F500070B515460E4604461F2A03D9DAA1A8200B -:100F600005F061FA20462A463146093005F0DDF8E1 -:100F70006078AD1D80098001A906890E0843607064 -:100F800070BD70B515460E4604461F2A03D9CEA182 -:100F9000CC2005F048FA20462A463146093005F0B3 -:100FA000C4F86078AD1D80098001A906890E084348 -:100FB000607070BD70B501780907090F03292ED044 -:100FC000052931D1411C827E0C46437E1102194312 -:100FD000037FC27D1D02037EC67E1B021343827DFA -:100FE000407835438006800E22281DD106291BD368 -:100FF0001920C001814217D8FF26F436B54213D814 -:10100000002A11D0082A0FD88A420DD28B420BD861 -:10101000617F227F09021143814207D904E04078B1 -:101020008006800E0C2801D0002070BD012070BD0C -:1010300000210A464254491C2229FBDB704710B5A7 -:1010400002788B07920892009B0F1A430270427835 -:10105000520952014270012908D0022906D0032901 -:1010600005D0FF2098A1EE3005F0DDF910BD01217B -:101070000A43427010BD10B502788B0792089200A7 -:101080009B0F1A43027042785209520142700129A3 -:1010900007D0022905D0032904D08BA18E4805F082 -:1010A000C2F910BD01210A43427010BD00788007CB -:1010B000800F70470278EF23C9071A40C90E0A4310 -:1010C0000270704770B50546C1700B0005F09CFAC0 -:1010D0000E080A0C0E1012120C14141212160C1810 -:1010E0000C2413E0082411E002240FE017240DE083 -:1010F0000D240BE0012409E0092407E0062405E0A3 -:101100007548002470A1A03005F08DF96878400979 -:1011100040012043687070BDC0787047017AC27981 -:10112000080210437047817A427A080210437047E0 -:10113000017BC27A08021043704781794279080224 -:101140001043704700797047817B427B080210434F -:10115000704770B5017AC37909021943431C857A37 -:101160001C46467A2B023343657926792C02344398 -:10117000C21C5A4E00798D1FB54214D8FF25F43594 -:10118000AB4210D800280ED008280CD888420AD2CA -:101190008C4208D8507A117A00020843B11D884267 -:1011A00001D8012070BD002070BD0B4610B5011D97 -:1011B0000522184604F0B9FF10BD817A427A080270 -:1011C0001043704701717047007970470B4610B5A6 -:1011D000011D0822184604F0A8FF10BD027B0A700A -:1011E000407B487070470B46014610B508220E310F -:1011F000184604F09AFF10BD0B46014610B50422B4 -:101200001631184604F091FF10BD10B50822001DDC -:1012100004F08BFF10BD10B504220C3004F085FFE4 -:1012200010BD017170474171090A81717047C17128 -:10123000090A017270470079704781794279080282 -:1012400010437047017AC279080210437047017158 -:101250007047017170470B4610B5011D08221846F2 -:1012600004F063FF10BD10B50822001D04F05DFFFF -:1012700010BD70B515460E4604461B2A03D912A1AF -:10128000174805F0D0F82A463146E01C04F04DFF1F -:101290006078E90640094001C90E0843607070BDDE -:1012A00070B5054640780E46C406E40E1B2C04D9E2 -:1012B0000B4805A10C3005F0B6F82246E91C304673 -:1012C00004F033FF204670BD7372635C756C5F7011 -:1012D00064752E6300000000070200007A0C000015 -:1012E000F7030000C1074008C207C90FD20F511809 -:1012F0004008C207D20F51184008C207D20F511838 -:101300004008C207D20F51184208D007C00F40183A -:101310005208D107C90F0918500840187047002219 -:1013200002808271C271C2720273427382738270D0 -:10133000C270027142714276828303464284203336 -:101340009A7102859A72C2750276C2730274DA7259 -:101350001A739A7319750284FF21603081709A752F -:10136000704770B504460020A083208C1E46484379 -:101370001546114604F061FF2084F000294604F070 -:101380004EFF401C80B20146192269439202E0835D -:10139000914201DD401EE0837D202946000204F0D9 -:1013A0003EFF401CA08470BD70B50546087B0E460C -:1013B000C006C00E08730020A87504463019007AD4 -:1013C000FFF790FF29194874A97D641C0818E4B23E -:1013D000A875052CF2D3C0B2252803D979A18A209B -:1013E00005F021F870BDF8B5044630302646274692 -:1013F0002546C036A03780350090032909D0002942 -:101400001AD0012924D0022902D1A11CFFF7CCFF58 -:10141000F8BD1146FFF783FF002028836883A88367 -:10142000E883288468847871E88538732621085514 -:10143000A08430703071F8BD0020E885B871A188B3 -:1014400023890A460098FFF78CFFA11C0098DDE76E -:101450000020E885B38A328AA1880098FFF781FFCF -:10146000F8BD70B5867D0D460446002E01D0252EB0 -:1014700001D9122070BD002A18D0287EE17D50438A -:101480000818252104F0CBFE0846E1754207520FEB -:10149000C908504B69189A5C097A8A4368D031466A -:1014A00004F0BDFE491CCAB2002007E0002070BD58 -:1014B000002803D02118097C511ACAB22118497C8E -:1014C00091423AD32918097AC943CB07DB17D21ABC -:1014D000521E1206120E35D08B07DB17D21A521E7F -:1014E0001206120E30D04B07DB17D21A521E12060C -:1014F000120E2CD00B07DB17D21A521E1206120E38 -:1015000028D0CB06DB17D21A521E1206120E24D098 -:101510008B06DB17D21A521E1206120E20D04B0673 -:10152000DB17D21A521E1206120E1CD00906C9175A -:10153000511A491E0A06120E18D0401C0528B7DBA6 -:101540001F2070BDC00013E0C000401C10E0C000B0 -:10155000801C0DE0C000C01C0AE0C000001D07E0B8 -:10156000C000401D04E0C000801D01E0C000C01D9F -:1015700020769BE738B505460C466846FEF738F8F6 -:1015800000281ED0694600200856207209216156A5 -:101590000022411A00D5494220356B798B420FDC7D -:1015A000FF2B0DD0A17A491CC9B2A172AB79994227 -:1015B00002D8617A7F2903D160720020A0720122D3 -:1015C000104638BD7372635C6C6C5F7574696C2E09 -:1015D000630000007667010010B5040004D0FF200E -:1015E000FAA1AB3004F01FFFFB4821464143FB4802 -:1015F000FF230918FF330022581C5A544254C81DB7 -:10160000FF30FA3002704270F448001FC378A342E2 -:1016100002D18270FF23C370EF48EF4BC01E081841 -:101620009B1EC91802700A7010BD70B5EB480026E9 -:10163000001F8670FF24C47035462846FFF7CCFF94 -:101640006D1C2D062D0EF8D00020E4490B229201CE -:10165000E14B43435B189B181E74401C0006000EB0 -:10166000F6D0DF48FFF7E4FC0021DD48FFF722FD5C -:101670000121DB48FFF7E3FCDA4804704470847012 -:10168000C4700471447170BDCFE71B20704730B542 -:101690000021D24A0B239B01CF4C4C43A418E418E1 -:1016A000247C002C05D0491C0906090EF4D000202A -:1016B00030BDC94C01254C43A218D21815740170D5 -:1016C000284630BD10B5044600F0D0F900280CD0F3 -:1016D0002046FFF781FFC0490B224C43BF49002041 -:1016E0006118920189180874012010BD10B50446D4 -:1016F00000F0BCF9002802D0BA484471012010BDA6 -:10170000034610B5B748B44940794843B349421835 -:101710001046FF30E130C17F807F04F0D5FF10BD5F -:1017200010B5B048AC4940790F224843AB49401846 -:10173000A949D239095CFF30FF3004F09FFF10BD8A -:1017400010B5044600F092F9002802D0A5480471B3 -:10175000012010BD034610B5A2489F4900794843B7 -:101760009E4942181046FF30E130C17F807F04F06F -:1017700098FF10BD70B59B4C97492079974D484311 -:101780004019C11DFF31F931FF30E130807F0F2258 -:1017900004F064FF002813D020798F494843401992 -:1017A000FF30FF3002300178491C01700178407829 -:1017B000814204D1884885A1773804F034FE0120A5 -:1017C00070BD884884490079484384494018FF30F7 -:1017D000E130C17F807F814201D10120704700202C -:1017E000704770B57F487C49007948437B49401871 -:1017F000FF30E130867FC57F0F242946304604F054 -:1018000026FF002801D0204670BD70066906400EF4 -:10181000490E884201D3401A01E0081A201AC0B2CA -:1018200070BD0F20704770B50C46054600F01EF9DC -:1018300000280ED0002020706748454367482818CC -:10184000FF30FF300230017842788A1A22704170EE -:10185000012070BD70B50C46054600F007F9002860 -:101860000BD05D4845435D482818FF30FF300230FB -:1018700001784078081A2070012070BD5849016035 -:10188000704710B5044600F0F1F8002802D0554822 -:101890000470012010BD5149091FCA78FF2A02D0E7 -:1018A0000021016007E08A784C492439012A02D0DE -:1018B000016001207047002070474848801E017871 -:1018C000012908D001210170464801784348001FD2 -:1018D000C170012070470020704710B5044600F029 -:1018E000C5F8002802D03F484470012010BD3B4994 -:1018F0003C4B091FCA785B789A4206D18A78203916 -:10190000002A02D001600120704700207047334850 -:10191000344A001FC1785278914209D1FF21C17029 -:10192000801C0178002903D000210170012070473C -:101930000020704729482B4A001FC17852789142F5 -:1019400004D18078002801D0002070470120704722 -:1019500010B5044600F08AF8002802D02148C4706F -:10196000012010BD034610B51E481B49C0784843EE -:101970001A494018C21DFF320B21FC328901401860 -:10198000C17B807B04F0A0FE10BD10B51548124944 -:10199000C0784843114940180B2189014118C97B7F -:1019A0000D4AD21E8018062204F068FE10BD0D48B4 -:1019B0000949C0784843094941180B20800108189B -:1019C000C17B807B81420FD1012070477372635CC1 -:1019D000646D5F712E630000D1020000F40F0020DF -:1019E000C51200209E0000200020EEE710B504463E -:1019F00000F03CF8002802D021488470012010BD7E -:101A0000034610B51E481F49807848431E494018B8 -:101A1000C21DFF320B21FC3289014018C17B807B43 -:101A200004F03FFE10BD10B51548164980780B2212 -:101A300048431549920140181249891E41188018DF -:101A4000807B062204F00AFE10BD0D480D49807807 -:101A500048430D4941180B2080010818C17B807B49 -:101A6000814201D10120B0E70020AEE7002805D176 -:101A70000648007C002801D00120A6E70020A4E74A -:101A80009E000020D1020000F40F0020B4120020BC -:101A9000F8B5FF4E0446B079002500280AD0002989 -:101AA0002DD1657010202070F079A070307AE07030 -:101AB000B57124E0F64F203F387A012804D0707ABF -:101AC000012810D00020F8BD002918D1657013201E -:101AD000EF4920701C221639A01C04F026FB0120BF -:101AE000A0713D720BE0002909D165701420E8490E -:101AF000207008220A31A01C04F017FB7572012027 -:101B0000F8BDF8B5E3480178002902D00C2630462C -:101B1000F8BD0026DE4D3446403D2E756E75EE75DF -:101B20002E76AE75294620396E730F464E734037B8 -:101B30007E717F218170687E002804D0FDF73DFD15 -:101B4000FEF766F86C763C72D14884711430FFF76A -:101B5000B9F9CF483C30FFF7B5F9D8E710B5CD4B10 -:101B600000221A70CA4B203B1A711A46603A11665D -:101B7000D065FFF7C6FF002804D0FF20C6A187303C -:101B800004F051FC10BDC2484038007D7047C04988 -:101B900010B54039C87B897B42078307D20FDB0F22 -:101BA000D218C007C00F101840000B0004F02CFD25 -:101BB000050B060B04080F00BB4906E0BB4810BD2F -:101BC000B949083101E0B8490839085A10BDFF2069 -:101BD000B1A1A73004F027FC002010BDAC48B449E7 -:101BE0004038008A48437047F8B5A94C0646407B08 -:101BF000403CE07337791346A773012F26D0308815 -:101C00002082A348B27B203882710546603D29704E -:101C100006221946681C04F088FAB0796873062217 -:101C2000F11DE81D04F081FA607B0126002800D038 -:101C3000667597486038407B002800D0A6753B0049 -:101C400004F0E2FC0506082549084B000020D7E710 -:101C500000211DE08E4801211430FFF738F98C482F -:101C6000E91D1430FFF75FF9687B002807D00128D1 -:101C700007D0FF2088A1EE3004F0D5FB0CE0002156 -:101C800000E0012182481430FFF75BF904E00621EF -:101C90007F481430FFF71BF90020E07520767C4860 -:101CA000691C1430FFF739F9794829781430FFF7A7 -:101CB00040F9774804213C30FFF709F97448691C62 -:101CC0003C30FFF72AF9724829783C30FFF731F9A8 -:101CD00026750020F8BD0221DAE7FF206EA1F8305A -:101CE000CAE770B56A4C0125403C0346257620467C -:101CF0002030007A002801D03A2070BD64480022CC -:101D0000803806789E4206D1E2750622401C04F017 -:101D10000CFAE57500E02276002070BD70B504462F -:101D20005B4D0020403DA87528462246323804F01D -:101D3000FCF92846203844730120A87570BD544929 -:101D400020390871704710B5514C0022403C627533 -:101D5000607302462046123804F0E7F901206075EE -:101D600010BD4B49203948717047F8B500F0A4FB0D -:101D7000474C0025403C607E002804D0FDF71DFC48 -:101D8000FDF746FF6576434F3D70FDF793FBA07B63 -:101D9000012804D00021084601F0A6FAF8BD002170 -:101DA000022001F0A1FA3A4C203C207A002809D008 -:101DB000374881790029F1D11321C17105720121C0 -:101DC0008171F8BD78780028FBD0314E0622803E24 -:101DD000707BE0733078A0753046F11D703004F0F0 -:101DE000A4F930460622711C773004F09EF93C209D -:101DF000A072012020727D70F8BD10B5244C403CCB -:101E0000E17BA07CCA0701D0C2070BD08A070FD59F -:101E100082070DD42620FDF777FAA07C0221084323 -:101E2000A07410BD2520FDF76FFAA07C0121F6E714 -:101E30004907F6D54007F4D42720FDF765FAA07CC2 -:101E40000421ECE770B5134E3078002872D1104CA5 -:101E5000403C207D00286DD0FDF71FFB0025A574B8 -:101E6000E57475702846FDF715FB0020FDF78CF929 -:101E70000D480D38FDF73FFA0B481038FDF7F7FA1B -:101E8000FDF76CFBFFF7B9FFFDF7FFFA012111E049 -:101E900068130020A40000207372635C6C6C5F61A7 -:101EA00064762E63000000008E6701009A8913009B -:101EB000710200000020FDF743FA0F210520FDF715 -:101EC000C1F92646403E3178701CFDF7ADF9A07B84 -:101ED00001280CD004280AD0607D002807D02146B4 -:101EE00012390846627B6630FFF732F86575A07DCF -:101EF000002807D0FE480146427B12399C30FFF78C -:101F000040F8A575306E0178002903D00178001DD6 -:101F1000FDF7C8F9F06D0178002906D0F44A401C9D -:101F2000C732FDF754FE01206076FDF7C3FA0020AA -:101F300070BDFFE70C20FBE7EE494860704770B5C5 -:101F4000050001D0FFF759FFE94C2034E07C002860 -:101F50000AD0A07B012804D19920E749C00004F0F1 -:101F600062FAFFF702FFE3E7002D0DD00221002007 -:101F7000FDF7E6F9DE4840300079032801D001285A -:101F800002D10220FDF73BFCE07D002600280DD0A9 -:101F9000D74D203D2846691C9430FEF7BEFF2846E9 -:101FA000691CBC30FEF7B9FFE6752676D048743060 -:101FB000FDF786FAA07B030004F026FB0504040469 -:101FC0000D04090001210846FDF79FFB03E0CA4903 -:101FD000CA4804F028FAE17BA07C81430120002953 -:101FE00003D1A17B012903D0E074C24908709FE7A7 -:101FF000A674FAE710B5FDF750FABE48007800283D -:1020000018D1BB482030007D002813D00020FFF7F6 -:1020100096FFB74840300079002809D001280FD03A -:10202000022805D003280BD0B349B54804F0FBF9CA -:10203000002010BD00F040FAFDF73CFA0C2010BD66 -:10204000F0F7E6FFF4E7AB49012048707047F8B5B8 -:10205000002400F0E0FF002824D0FF202D30FDF701 -:102060006CF9A44D2878A24F403701281DD00228D2 -:1020700001D0032834D0A2489F496B3004F0D3F933 -:10208000287800280DD0387900280AD0012808D0F7 -:10209000022838D0032836D099489749803004F078 -:1020A000C2F9F8BDFFF761FEF8BD914E2036B07B56 -:1020B000032815D0707E002803D0FDF798FDFDF7AA -:1020C00074FA8B48C430FDF7FBF9B07B012812D0BD -:1020D000042810D0B879012806D0032804D004E0E1 -:1020E0000120FFF72CFFCBE7102421460E200143EF -:1020F0000020FDF70AFB7879012801D1FDF76FFA7E -:1021000002202870BCE728780228CDD10120FDF7F5 -:1021100076FBF8BD70B5764840304079012801D192 -:1021200000F0D4F9724C2034607E002803D0FDF713 -:1021300044FAFDF76DFD00F06EFF00280CD06D4DE8 -:102140002878022804D06E486B49A33004F06BF95C -:10215000A07B012803D006E0FFF707FEE8E6992000 -:102160008000FDF7EAF80120FFF7E9FE2878002853 -:10217000F4D028780128F1D039205F49000104F01B -:1021800052F9D5E6F0B5074689B000200690FDF774 -:10219000AEF800900020019056480078022804D044 -:1021A00057485549F03004F03EF9514D40356879B3 -:1021B000012801D100F08AF94D48C430FEF7A9FE8C -:1021C0004B4E04462036002F70D03046A430FEF728 -:1021D000F1FE0028F8D0FDF731F80028F4D0707E29 -:1021E00000280AD005277F1EFFB2FDF72CFD02282C -:1021F0000FD0012800D0002001903D492046C43175 -:102200000C46643C030004F0FFF906A4A4A40CA44B -:1022100056A4002FE7D177203AA1C00004F003F9BB -:10222000E9E7B07B012841D004283FD0019A00980B -:10223000104304D1A879002801D0022836D168794A -:1022400001281DD1607A00281AD101206072087817 -:1022500006224006C00FA0722548C91C6B3003F04F -:1022600064FF244C224FA07871377F2804D1A92025 -:1022700024A1C00004F0D7F8A07838707F20A070A7 -:102280001B489C30FDF71CF91A480321017028797E -:10229000002860D001280AD002285CD0032806D08C -:1022A000164818A1E03804F0BEF854E051E00120CF -:1022B000FDF7A5FA4FE00E480F462038C978C079DF -:1022C000814230D10A4839792038027A91422AD1A4 -:1022D0007979427A914226D1B979827A914222D192 -:1022E000F979C27A91421ED1397A027B914211E08A -:1022F00008130020A4000020981E0100F60400002E -:10230000DE0200007372635C6C6C5F6164762E6346 -:102310000000000007D13978407B4906C90F81428F -:1023200001D1012100E00021B07B012801D0042867 -:1023300001D100290AD100280BD101990098084346 -:1023400004D1A879002801D0012802D1307E0028CC -:102350001FD001200690707E002803D0FDF72DF9D4 -:10236000FDF756FC0698002802D00120FFF7E7FD94 -:102370005D48017800290AD00178012907D000784A -:10238000032804D095205949C00004F04CF809B046 -:10239000F0BD55480422406855490F3003F0C5FE92 -:1023A000387806224006C10F4F4840680177F91C73 -:1023B0001D3003F0BAFE4C484D4940680322091D08 -:1023C000133003F0B2FE4848494A4068B97D817530 -:1023D0000F3A117ED37D09021943018311468B7E8A -:1023E0004F7E1B023B438380137FD77E1A023A4302 -:1023F000C2808A7F4B7F1102194301813C4905222B -:1024000010310A3003F091FE3948374A1130017912 -:102410005768C906C90EB97600794009F876287A56 -:10242000002809D0A07900283AD11320E0710020BB -:1024300020720120A07133E00020A8727888B08556 -:10244000387FE8732A48394606221D31833803F065 -:102450006CFE27490622F3390878A87508467730BC -:10246000491C03F062FEB888F087F888208038891C -:102470006080F87E20710198002860790BD00121DE -:1024800008436071FDF7F2FB61794000C907C90F8D -:102490000143617102E04008400060710120287230 -:1024A000114C0020207000F007F8FDF703F8012020 -:1024B000616800F019FF4EE710B5FDF76AF8FDF707 -:1024C0005DF8FCF7B5FFFCF7DAFF10BD064810B564 -:1024D000801CFDF78DF8002802D103497F20887009 -:1024E000FDF774F810BD0000A400002004230100D3 -:1024F000DB1300208107C90E002808DA0007000F4F -:1025000008388008F74A80008018C06904E0800815 -:10251000F54A800080180068C8400006800F7047A8 -:1025200010B500F03BFF10BD70B5F04C0546626879 -:10253000002908D0002A04D0FF20EDA10C3003F0C0 -:1025400072FF656070BD002A04D1FF20E8A112303F -:1025500003F069FF0020606070BDE948C07E7047ED -:10256000E7482830C07E704738B5E04C20680168E5 -:102570004978012925D001216846FAF7C9FC684647 -:102580000078E049000203F04AFE2068426AC06811 -:1025900012685118FBF7ADFC2168C860D84A206862 -:1025A00028320321904218D0028B002A15D0012234 -:1025B0004272017200210171021D017F00F0FBFED9 -:1025C00038BD7D21C068C900FBF793FC2168C86055 -:1025D000FFF7DDFA21680861E0E7028B521C0283F5 -:1025E0004172E6E7FFB5C64E85B0706A346805688B -:1025F00060680190306A0390298E0798401A80B273 -:1026000002900898002804D02746383720464830E2 -:1026100002E0371D2846A830009003203871059845 -:10262000002820D001287DD002285ED003287AD04F -:10263000AFA1B54803F0F7FE0898002807D0387915 -:10264000032804D0B048AAA1093003F0ECFEA16A27 -:102650007069FBF74EFCB860616A206A88427DD9D8 -:10266000009801601FE1306A002804D1A648A0A1AB -:102670007A3803F0D8FEA449288B373948434018EC -:10268000069900F0A6FEA0619F49A8883739484303 -:10269000069900F09EFEE061316A9B48891CA162A8 -:1026A0002A8B37384243A069974B121AE63BD2185F -:1026B0005118A162944BAA7D373B5A4340008018C1 -:1026C000FF30193020626062306A081AED21FF384D -:1026D000C90015388842AFD28C49884204D28A4852 -:1026E00083A15D3803F09FFEB6E0874A288B373A16 -:1026F000E16850430818069900F06BFEA06182491A -:10270000A88837394843069900F063FEE061306AD3 -:10271000002804D17C4876A1553803F084FEAE2011 -:10272000405B01E02CE05AE00028288B784AE16801 -:102730001DD050430818A169401AA0622169A06801 -:10274000734A4843A1694018A97D4000514340188D -:10275000FF3017302062A888504300E0A1E0E16913 -:10276000411A6F20C000081A6062A06A34E050432A -:102770000818A169401A3168D63849684018DCE762 -:10278000284680300190C08D002802D0306A002891 -:1027900004D15F4856A1401F03F045FEA8885C495C -:1027A000E3694843C01AA06201999C46CA8D216919 -:1027B000A368521A4B43A169591863465343C91879 -:1027C000AA7D534B49005A438918FF3117312162C2 -:1027D0006F21C900411A6162316A401A35E00898D8 -:1027E000002803D03420005D002878D1A88848490B -:1027F0004843E169401A02994843A0622846803064 -:102800000490C08D0028019829D0002804D03E48AB -:1028100037A1163803F007FE04983D4AC18D02988F -:102820000818E16948434000FF3017302062A8884B -:102830005043411A6F20C000081A606200F0AEFDDC -:1028400000281CD0A16A0398081AED21FF38C9009E -:102850005538884200D3EFE601203871ECE60028B5 -:1028600002D00398002804D1294821A11A3003F08E -:10287000DAFD0198A16AD6380818A062CCE7FBF708 -:102880009EF8726901461046FCF7BFFAA16A081A61 -:10289000ED21FF38C90050388842DCD2012009B050 -:1028A000F0BD0099086000981A4900688035081842 -:1028B000F860298B0798081A00B2002804DD0598F3 -:1028C000022801D0032000E00120787108983870B8 -:1028D0000898002820D03420005D00281CD0022059 -:1028E000DDE7000000ED00E000E400E0B4000020BF -:1028F0007372635C6C6C5F6C6D2E73302E630000C2 -:10290000F413002010270000190500002902000020 -:10291000E20400004B1700000898012148402034D1 -:102920006075317F3A46304600F045FD0020B6E73D -:1029300010B5FE4900280A68516A096807D0126874 -:102940008988FB4BD2695943891A03F068FC10BD92 -:10295000F8B5F64F38680468416A26460D68203697 -:10296000717D00290AD0618E2A8E914206D1407A6B -:10297000012803D1EF49F04803F055FDFBF71FF89C -:10298000014638684069FCF740FAFFF7D1FF2A8E0C -:10299000618E1318994202DB491C618602E0401CDB -:1029A00010186086B07D002806D19C21608E495B9E -:1029B000884201D1401C6086DC480168088B0328EE -:1029C00002D2401C088302E0618E982041532846C1 -:1029D00040300646C1898089081A298E401E401859 -:1029E00087B218E0D148EB7E00685B00406A00794E -:1029F0004100D248415AC05A401881B2207D00237C -:102A0000FFF7F0FD00280FD001280ED0CA48C949B1 -:102A10003A3003F008FD628EB81A00B20028E1DAFD -:102A20000820B07200F010FEF8BD608E401C608679 -:102A3000F1E770B5BD4D002168680162C27E1300E8 -:102A400003F0E2FD045656034A56426A14680268CF -:102A500011700268516000682030407D002808D164 -:102A6000FAF7ADFF69680968096CFCF7CEF9002830 -:102A700018DC6868228E0168498E914206D1214691 -:102A800080318B8B9A1ACA83238605E0891A9E228D -:102A900011530168498E21860268C1681164C168BA -:102AA000416111E068680168098E228E8B1A224606 -:102AB0008032D3830168098E218601680B6CC36064 -:102AC0000B6C4361886C9062204601F0D8FC0028B2 -:102AD0000DD098499A4808E0C1684161FFF7B2F902 -:102AE000002804D096489349801D03F09CFC70BDDB -:102AF000934890490D30F8E710B58C4A0B001268E6 -:102B000003F082FD0906090F1F0C2E2E082B2E0044 -:102B1000FFF78FFF10BD00F068FC10BDFCF772FEE0 -:102B200010BDD07E022806D0D07E032806D0FF201C -:102B30008049A3300EE0FFF70BFF10BDFFF714FD37 -:102B400010BDD07E0228F6D0D07E0328F6D0FF201C -:102B50007849AE3003F067FCF0E7FAF715FF10BDD7 -:102B6000FF207449BC3003F05EFC10BDF3B581B0AA -:102B70000E4601276D4D734C0B0003F045FD090611 -:102B80002F39392F40403939400001216D48FFF776 -:102B9000CBFC31460198FFF7AFFFE07E022826D13B -:102BA00068680568406A0668FAF7E7FEB188604A17 -:102BB0005143EA69891AD639E962B72802D26248D4 -:102BC000081803E0081A6049B7314018E8625F4806 -:102BD000E96A814200D80846E86205E00198FFF7FB -:102BE0008BFFE07E022802D1206820300775FEBDF1 -:102BF0002C600198FFF780FF00202860FEBDFF20B9 -:102C00004C495C3003F00FFCFEBD70B50C46064627 -:102C10000B0003F0F9FC09060D10100D1A1A101024 -:102C20001A00484801212830FFF77EFC2146304633 -:102C3000FFF762FF70BD43483C4D283028603046A6 -:102C4000FFF75AFF0020286070BDFF20394982300D -:102C500003F0E9FB70BDF0B5344C0020216885B06D -:102C600003258D76CA7E0746032A03D0C97E002934 -:102C700029D029E0087F002803D12E49344803F0E9 -:102C8000D2FB2068067F684605714571FAF797FE0A -:102C90000290FF20F53003900121684601706946DB -:102CA0003046FBF70CFB00E020BF2068007FFCF7FC -:102CB00038F90028F8D02068007FFAF765FE206810 -:102CC000077700F072FB012021688F7605B0F0BD18 -:102CD00016490A68907600E020BF0A68D07E002876 -:102CE00003D0D07E937E9842F6D0D07E002803D0C9 -:102CF00000200021917670470120FAE770B5114954 -:102D00000024CA7E094D032A03D02831CA7E032A33 -:102D10002ED12960002827D0012821D00C48054950 -:102D2000973003F080FB0020296813E0B4000020F6 -:102D3000E2040000F0280100F70500009E67010092 -:102D4000A1030000F4130020C4F8FFFF38120000B4 -:102D500072020000086048622860002C08D070BD34 -:102D60000320FFF7B5FF01E0FFF775FF0446DAE740 -:102D70000C2070BDF8B5F94F04461F25E67E3300E0 -:102D800003F042FC042920031B20F548844204D0B0 -:102D9000FF20F449FC3003F046FB02203C60FFF7C3 -:102DA00097FF002805D03968002008604862386025 -:102DB00011E00C25002038600AE00120FFF79EFF9B -:102DC000054603E0E749E84803F02DFB002D02D05B -:102DD000E07EB042D2D1E07E002804D0E248E14952 -:102DE000801D03F020FBF8BD10B5DD48FFF7C2FFE2 -:102DF000DB482830FFF7BEFFD94900205031087565 -:102E0000D649C91F4870D64948610A4628325061E0 -:102E100088769076D1494860086010BD70B5044648 -:102E20000120FFF767FBC5B20B20FFF763FBC0B2C1 -:102E3000854204D0FF20CB49C63003F0F4FA0120CC -:102E4000FFF758FBC5B21820FFF754FBC0B285420C -:102E500004D0FF20C349C73003F0E5FA0420C04383 -:102E6000FFF748FBC5B21920FFF744FBC0B285420B -:102E700004D0FF20BB49C83003F0D5FAB748B849A1 -:102E8000083804700020C87688760A462832D07642 -:102E90009076B24B012408331C711860486250626E -:102EA00008601060FFF7A0FF70BDAC4908310871E1 -:102EB0007047FEB5AA49CA7E08462830A74C002AAA -:102EC00002D1C27E002A03D0C97E022903D005E0C8 -:102ED000A648216006E0C17E002901D00C20FEBD7D -:102EE0002060A348FAF7FCFC216808779B4920681A -:102EF000C91F0160C91C4162007F002804D1AD20B8 -:102F00009849800003F08FFAFAF737FD9949884213 -:102F100000D20846FF30C83086B220680325C57647 -:102F2000FEF735FE21680861FEF758FE00270028ED -:102F300027D0FEF753FE21684A6A10600968012015 -:102F4000087001466846F9F7E3FF684600788A4949 -:102F5000000203F064F90191FAF731FD019971184B -:102F6000FAF7C7FF2168C8602068057245720771CB -:102F7000021D017F00F01FFA2068078300202760F0 -:102F8000FEBDFAF71CFD3146FAF7B3FF2168C860B1 -:102F900008680770096801204870E5E77047F8B5D0 -:102FA0006F4EF17E002904D131462831C97E0029B7 -:102FB00001D00C20F8BD0221F176694C674F5034E6 -:102FC0000837776234600025386025753979C07E0E -:102FD0004A006A4940008A5A085A2B46101881B2A2 -:102FE0002A462846FFF7FEFA002804D0CF205D4984 -:102FF000800003F018FA25610120A5602075658620 -:1030000025865748703085753968088E401E0886B9 -:1030100035830020F8BD10B5504801244068817EFA -:1030200003290CD001684978002906D0006A544968 -:10303000884202D90024FFF706F8204610BD00247C -:10304000FBE74648406802681178491C1170016A24 -:103050000068C26A914204D8007D012801D0012095 -:1030600070470020704700207047F8B53B4C3C4843 -:103070002060416A00680D68002634210E54A621A4 -:10308000495D00294BD1007D032848D1FAF797FC10 -:10309000014620684069FBF7B8FE00283FDDFFF7D6 -:1030A00047FC298E401C4118206802681186006880 -:1030B000018E9C22525B511A09B200292FDD012199 -:1030C0002030817528464030C1898089081A298EB0 -:1030D000401E401887B21BE0496A09794A00274917 -:1030E0008B5A028E007D9446EA7E5200895AC91896 -:1030F00089B201236246FFF775FA00280FD0012834 -:103100000FD002280BD01B481649193803F08BF951 -:1031100021680868028EBA1A12B2002ADCDA266028 -:10312000F8BD20680068018E491C0186F0E7F8B5FB -:103130000A4D00266A680128516A0C6853D1087943 -:103140000E4940000B5A1068077D032F1AD0027DEC -:10315000022A24D0007D012834D044E0B4000020AD -:10316000F4130020F0280100070200006D2B01007D -:103170000B2C0100F6050000102700009E670100DF -:10318000D98213000661106886609C20025BE07E95 -:103190004000085AC01881B2002303201BE02246D9 -:1031A0008032D78D0761E07E928B4000085AC018AC -:1031B00081B200230220FFF715FA6A680121126824 -:1031C00011750AE09C20025BE07E4000085AC0189E -:1031D00081B200230120FFF705FA002803D09C49A3 -:1031E0009C4803F020F9FAF735FB9B480078EFF78D -:1031F0006FF8686806830268218E51860068203067 -:103200008675F8BD38B5944C0021083460680D46C9 -:1032100000684278002A01D045701FE0007800283D -:1032200009D001216846F9F773FE684600788B499A -:10323000000202F0F4FF6068426AC0681268511828 -:10324000FAF757FE01466068C160057103214172BB -:10325000021D017F00F0AFF860680583FAF7FAFA03 -:103260007D480078EFF734F838BD7B4A10B5014649 -:10327000083250680B0003F0C7F9060D1504081753 -:103280000C31012100F0D1F807E00021106800F0B6 -:10329000CCF810BD0120FFF74AFF00210846FFF7D8 -:1032A00043F910BD032116E0416A02680968D36939 -:1032B00093608A886A4B5A430368DA600A46C032D0 -:1032C000D3890B83137B8B75138A8B80538ACB80B6 -:1032D000928A0A8102210068017510BD5D485C492F -:1032E000913003F0A0F810BD70B500280BD05A4CF7 -:1032F000083401280ED002281ED056485449B43054 -:1033000003F091F870BDFFF77DFF00210846FFF73D -:103310000BF970BD6068002501684D7000F045F83C -:103320000320F5F7B8FEFAF795FA4B486560007888 -:10333000EEF7CEFF656070BDFFF764FF606800F0D8 -:1033400034F800210846FFF7EFF80420F5F7A3FE54 -:1033500070BD414908314968CA7E022A08D10A680D -:103360001378002B04D150600968CA6A1018C8622B -:103370007047394A10B50832526800290CD001292B -:1033800007D0022907D033483149D93003F04BF830 -:1033900010BD801E00E0401F106210BD2E48083096 -:1033A0004068002800D0012070470021C176817656 -:1033B00001604162704710B50B46C17E847EA14218 -:1033C00004D011461846FAF77AFF10BDFFF7EDFF5B -:1033D00010BD024610B50020002905D00846504314 -:1033E000204902F01CFF401C10BD1B4810B50830DE -:1033F0004068C07E030003F007F9041515030B15A0 -:1034000001F05EF900280CD00F2017A1800106E022 -:10341000FEF7F0FD002804D0F12013A1800003F096 -:1034200002F810BD10A11448F9E710B504460029B0 -:1034300003D00020FFF77BFE03E007480078EEF79B -:1034400047FF2046FFF7B1FF0020F5F724FE10BD2F -:10345000F028010092060000AC00002010270000B8 -:10346000E204000040420F007372635C6C6C5F6C9E -:103470006D2E73302E630000CB030000F8B5FEF70D -:10348000B0F90446FEF756FAF84E0546706920304A -:10349000407D002809D0012827D002282AD00328FF -:1034A00032D0FF20F2A19A3037E0F0481830FEF712 -:1034B0001EFA002801D003200FE0EC481830FEF778 -:1034C00049F9002804D070695B21095C002908D003 -:1034D000E6481830FEF7D2F90120716920314875AD -:1034E0001DE002212030417519E0E0481830FEF758 -:1034F000C5F914E0DD481830FEF72CF900280ED18C -:10350000FF20DBA18C3008E0D8481830FEF7EFF937 -:10351000002804D1FF20D6A1943002F084FFB069C6 -:10352000F72201781140017072692032937DDB0728 -:103530001B0F1943FB2319400170D37DDB075B0F81 -:1035400019430170577DEF23022F04D0012F07D0BC -:10355000032F07D00CE0012C06D8002D04D007E083 -:103560006D1E2C43002C03D019401023194300E09A -:1035700019400170D17F002916D0517D012913D047 -:10358000BF48FBF79DFFBE480021283001767269D5 -:10359000916ED26E42610161B949B269FCF7A3FA3A -:1035A0000020FCF7AFFA03E0FBF78AFFFCF7CDFA47 -:1035B000B0690078C00606D4F0690078C00602D46D -:1035C000F079002806D0B079002803D101210846FF -:1035D000FCF79BF8032030703079002803D1FBF70B -:1035E000BDFF01203071F8BD70B5A0481C30FEF75A -:1035F000B9F901259D4C002802D00020607002E03E -:1036000065709F48E061606940300078002802D012 -:103610006078002805D0E069FBF752FFFCF795FAC7 -:1036200070BD9748FBF74CFF9548283005766269D6 -:10363000116F526F42610161914AE169FCF753FADF -:103640000120FCF75FFA70BD10B588490023486976 -:1036500002462030C3768377012049239854A03254 -:103660009279002A03D008700021022001E0002195 -:103670000320FFF7FAFD10BD70B57C4C6079C206DF -:103680002046406901468031002A01DA002202E02A -:10369000CA8DCB8BD218CA850246C0321379002B53 -:1036A00005D0034640331D8AC98B69181982617A97 -:1036B000002903D03D2001F051F94AE003462033B0 -:1036C000D97E042945D0217A002913D0480701D496 -:1036D000C80601D51E2030E0080701D53D202CE0AA -:1036E000C80705D1880703D461A1664802F09BFE94 -:1036F0002A2022E04030817D002905D0418A4D1CDE -:103700004582858AA9420FD2517A062902D0117AC0 -:10371000062905D1018B4A1C0283828A914203D279 -:10372000028AC1898A4201D3222006E09A7F8089D9 -:10373000002A0AD088420FD3082001F00FF96069EF -:103740002030C07E042804D006E0062804D33E20A2 -:10375000F3E7FFF779FF70BD0120207000210846D4 -:10376000FFF783FD70BD10B5404840690146203128 -:103770008A7F002A29D0012A27D0022A06D0032ACC -:1037800004D03BA1404802F04EFE10BDC97E032983 -:103790000FD0082919D001464031CA898989511AA8 -:1037A000891E89B2032900D303218030828B5118EE -:1037B00009E0014640318A89032A06D3028EC9896D -:1037C00080305118491C018310BD8030818BFAE78D -:1037D00000B5030002F018FF0604070B0F121217C2 -:1037E00000290ED00FE0891E02290AD90BE0891F9B -:1037F000012906D907E0082903D004E00B390C2978 -:1038000001D8012000BD002000BDFEB505461748C7 -:103810001830FEF740F8002804D11B4814A1D13815 -:1038200002F001FE114CA069FDF702FC0321A06922 -:10383000FDF721FCA069EF220178114001702946B3 -:10384000FDF740FC002601272B0002F0DDFE0E5C98 -:103850005C085C2C6060255C4C5C603C375C60699B -:103860006521095C002911D0062111E0C400002067 -:103870007372635C6C6C5F736C6176652E630000C1 -:1038800090140020430200005C080000C030417921 -:10389000A069FDF797FC3AE060698030417CA0693F -:1038A000FDF7D7FC33E06169A069B831FDF7ADFCE5 -:1038B0006169A0698C31FDF7AEFC28E00621A069A2 -:1038C000FDF7C5FC23E020690178A069FDF7A9FC9C -:1038D00020698188A069FDF7A6FC20694188A0695C -:1038E000FDF7A5FC13E00096019660696030007951 -:1038F000002803D069460878384308706946A069F3 -:10390000FDF7B1FC03E0F949F94802F08CFDFDF741 -:10391000D4FF002804D1F648F449801D02F083FD4D -:103920000C2D06D0072D03D0606940304682877584 -:10393000FEBD606940300683FEBDF0B5ED4CC82089 -:1039400061698DB0405C04280AD0052835D15C201F -:10395000405C00282AD0012060314871022026E016 -:1039600010226846D63101F030F86169102204A8AF -:10397000B03101F02AF8684601F0DFFB08AE8DCEC9 -:10398000616984250E4678360DC66F5000250D6797 -:103990004D67012540267554D74D88318DC5284681 -:1039A0000822093002F0C1FB052000E00D20FFF7DE -:1039B0002CFF61690020C03108720DB0F0BDF8B570 -:1039C000CC481830FDF767FF002848D0C94C207A52 -:1039D000002844D16069C421095C002500290ED06B -:1039E0002030C17E0120FFF7F3FE002807D1606977 -:1039F0002030C17E0420FFF7EBFE002806D060696E -:103A0000C921095C0126062907D00DE06069502113 -:103A10000D526030457102204EE02030C17E0420FE -:103A2000FFF7D6FE002813D0616908462030C27E19 -:103A3000921E130002F0E8FD166262621D6262626D -:103A400060621F6262622843626262626262466210 -:103A500060695E21095CC90702D0C0304572F8BDBB -:103A60000C20FFF7D2FE60694030817F31438177BF -:103A7000F8BD072020E0FDF79AFF0028F8D0606924 -:103A8000403005700B2017E0F9F741FA0C28EFD30E -:103A900060690821B830F9F73BFA002806D0606960 -:103AA00004218C30F9F734FA002804D1C72093A1FF -:103AB000C00002F0B8FC0420FFF7A7FEF8BDFFF736 -:103AC0003CFFF8BD00228A66CA66C6770A4678318E -:103AD000C8C9894878322838D26842632830C8C0BB -:103AE00008220D30091D02F020FB0620FFF78DFE95 -:103AF000606940308575F8BD0920DDE700F036FFCC -:103B0000F8BD70B57B4C3B216069095C08292FD159 -:103B10000146028EC0314B89521C9A4228D1227A2A -:103B2000002A25D10A8A83889A4207D14B8AC58800 -:103B3000AB4203D18B8A0589AB4209D043884B85C0 -:103B40008A854A8ACA858A8A0A860122E6210A5417 -:103B500001221146FDF747FC00210420FFF785FBF9 -:103B600060690021C92211542030C1760321817778 -:103B700070BD70B55F4C60692030C07E172803D0DF -:103B80005EA1624802F04FFC616900220B4640339F -:103B9000DA7608469A75E030867D0B240125002EE2 -:103BA00006D0837C002B14D1C4740275857410E098 -:103BB0001E7F002E07D01A774C88FA235C520276BB -:103BC0000C23837505E04E88FA235E520276057752 -:103BD00084752031CA7670BD70B5464CA0798007D7 -:103BE00036D5207A002833D160692030C17E01208B -:103BF000FFF7EEFD00282BD1A0690126C078002533 -:103C0000030002F001FD0E8585088537465F0A85B1 -:103C1000168526625285032152E060692030C07EFD -:103C2000052804D0394835A1333802F0FCFB60691F -:103C30000CE060692030C07E092804D033482FA1F1 -:103C40002D3802F0F0FB606956210D542030C57606 -:103C500070BD60692030C07E0B2804D02B4827A19E -:103C6000263802F0E0FB60695B210E540C21203005 -:103C7000C17670BD60692030C07E0F2804D0234813 -:103C80001EA11F3802F0CFFB60695B210E5410218A -:103C9000EDE760692030C07E102804D01B4817A1D2 -:103CA000183802F0C0FB12210AE060692030C07EA3 -:103CB000102804D0154811A1123802F0B4FB1421C9 -:103CC0006069D4E7FFF755FF70BD60690146C030F9 -:103CD000027A062A04D14031897F890700D505720E -:103CE000417A0629F0D1457270BD0000703801009C -:103CF000CD070000C4000020B81400207372635C7C -:103D00006C6C5F736C6176652E6300004C0500007F -:103D1000FD49FE4802F087FBE6E710B5FC4C606900 -:103D20002030C17E0020FFF753FD002803D1207A08 -:103D3000012108432072207A002808D1E069FDF7AC -:103D4000EBF961699122505405202031C87610BDED -:103D500010B5EF4C60690146C0314A7A002A06D09E -:103D6000097A062903D0217A012211432172217A8E -:103D7000002928D14030807F800715D4E069FDF705 -:103D80005AFA61694031C877E069FDF756FA61690E -:103D900040310884E069FDF755FA6169022240313B -:103DA0004884887F10438877606900220146C031CB -:103DB0000B7A062B00D10A724030837FDB0702D1D9 -:103DC00006234B72028310BDF8B5D14C60692030D8 -:103DD000C17E0020FFF7FCFC0125002807D16069A7 -:103DE0004030007F002802D1207A28432072207AB8 -:103DF000002830D160690026014640304682857532 -:103E0000B031E069FDF7EFF96169E0698831FDF7EC -:103E1000F3F960690146E030827D0827002A06D068 -:103E2000817C002913D1C774067585740FE04A8818 -:103E3000F8204252FA31E069FDF7C8F96169E0699A -:103E4000FF310331FDF7CAF96069E03087756069B9 -:103E50000F212030C176F8BD10B5AD4C606920301F -:103E6000C17E0020FFF7B4FC002803D1207A012195 -:103E700008432072207A002812D1E069FDF769F921 -:103E800000280ED0E069FDF75FF96169CA2250523F -:103E9000098E00F0D6FD002806D0282000F05EFD37 -:103EA00010BDFFF73AFF10BDE069FDF74BF96169FE -:103EB000C0310873E069FDF740F96169C031C8811C -:103EC000E069FDF72BF96169C0310882E069FDF70F -:103ED0002AF96169C0314882E069FDF729F9616911 -:103EE000D422505208202031C87610BDF8B5884C35 -:103EF000A079C00776D0207A002873D1606920307D -:103F0000C17E0120FFF764FC002863D1E069002531 -:103F1000C178022701260B0002F076FB0D1613086C -:103F2000415A5A445C575A192F545A00FDF74CF91C -:103F30006169C62250543B20475440314D828E75F2 -:103F400048E000F093FD45E0FFF786FF42E060693E -:103F50002030C17E0020FFF73BFC002802D1207AF0 -:103F600030432072207A002834D160690146403104 -:103F70004D828E750B2120300FE0606901462030A4 -:103F8000C27E0C2A02D0227A3A432272227A002A76 -:103F900020D1C57740310E770D21C1761AE0FFF7A9 -:103FA00013FF17E0606901462030C27E122A02D05A -:103FB000227A3A432272227A002A0BD140318D753F -:103FC0001721EAE7FFF7C4FE04E000F00DFD01E071 -:103FD000FFF7A3FE62690023106F516F401C594127 -:103FE00051671067F8BDF8B5494C05466069203047 -:103FF0008079012801D1FBF7E9FA012D14D160691C -:104000004021095C002903D12030C07F002801D065 -:10401000FBF79BFDFBF7BDFAFBF7B0FAFBF708FADD -:10402000FBF72DFAFBF746FA60790225C107012656 -:10403000002901D180070ED560692030817F0029D9 -:1040400002D0032902D006E0867700E085770021C0 -:104050000120FFF70AF960692030817F012903D12F -:104060006179090700D58577607A002803D100F0CF -:1040700027FDFFF7A4FC207900250028606902D005 -:104080008030058403E08030018C491C0184607914 -:10409000C00705D06069AC210D544030858104E033 -:1040A000616940318889401C8881E079002806D008 -:1040B0006169A031087B022806D8401C087360693A -:1040C000A030007B022806D9606901468030058453 -:1040D0004584A0310D7360692030C17E0020FFF758 -:1040E00077FB002804D160692030C07E072855D1B5 -:1040F00060690146C0310A7A062A4FD0497A0629FA -:104100004CD03E21095C05E0FC3C0100BA050000F2 -:10411000C4000020022941D1A030007B00283DD1FD -:10412000FDF74FFB002839D0FDF704FC002835D0FF -:1041300061690A468032508B01282FD90846A03089 -:10414000844646716038C7898389B81E834201DB83 -:10415000012002E0F81A401E80B2138CA789BB42EE -:1041600001D3012302E0FB1A5B1C9BB2984200D9E9 -:104170001846012801D163465D71C0310B78002BD0 -:1041800010D0528C49888A4201D3012102E0891A59 -:10419000491C89B2884205D9084603E061690120BB -:1041A000A0314D7161690A8E803110188883FFF744 -:1041B000DAFAFFF761FAFEF756FF002809D06069C6 -:1041C0000146FF3001300279002A02D14988C180BE -:1041D00006716069A0308571F8BD70B5F84C6069F2 -:1041E0002030407D00283ED0022810D1FDF7C2FAD1 -:1041F000002804D17120F349000102F014F962692A -:104200000023916ED06E491C58419166D06660695A -:10421000002520304575017D012904D10575A1795E -:1042200010221143A171C17C012915D1C574A07957 -:1042300008210843A071FDF76AFB002804D1E5209E -:10424000E049C00002F0EFF860690023816EC26EA1 -:10425000491C5A41C266816660692030817D01290E -:1042600002D0012181753FE585753DE570B5D44CDF -:104270000026E169012508788207920F0420012AAF -:1042800015D0022A13D0032A03D0217A01432172C8 -:104290002AE560780028FBD1606920308574A17917 -:1042A0002943A17122E0C6751EE5C5751CE5497854 -:1042B000CA0624D06278002AEAD1C906C90E1B2991 -:1042C00018D8617901436171FDF75FFB002804D1C3 -:1042D0003B20BC49400102F0A6F860690023016F51 -:1042E000426F491C5A41426701672030C17D012954 -:1042F000DBD1D8E7207A102108432072F4E460690A -:10430000F3E77CB504460020C0436946888001A8D5 -:10431000FCF7B2FD00287AD169468888FCF790FD49 -:10432000002803D0A749A84802F07DF8009801466C -:10433000E030827C0025002A08D0657010212170B1 -:10434000C17CA170017DE170857472E082799C4E20 -:10435000002A13D065700720207008E07169E620FC -:104360008D8445540A22A01CE83101F0DEFE00983D -:10437000E03080790028F1D1A5705AE0827D002AD2 -:1043800038D0827D130002F03FF90D2F2F2F2F2FF1 -:104390002F2F2F112F2F24082F0065700C21217033 -:1043A000017EA17071694988A18010E065700820C4 -:1043B00020707069082240886080201DFA3101F069 -:1043C000B4FEFF2100980331095AA181E0308575C0 -:1043D0002FE065700B212170017EA1707169498801 -:1043E000A180017FA171F2E7774876495D3002F044 -:1043F0001AF81EE0C81DF9300279002A08D01122EF -:1044000065702270811C89886180057111E012E05D -:10441000027A002A0FD012226570FF312270033118 -:1044200004E005720A8962804A89A280027A002A21 -:10443000F7D101207CBD00207CBD614800780128B7 -:1044400001D00C2070470020704770B55C4C0546C9 -:104450002078002804D05C485A49933001F0E3FFEB -:1044600000202561A07201202070FFF7E6FF0028E0 -:1044700004D0554853499E3001F0D5FF34E4F8B5D7 -:104480004F4F3978012901D00C20F8BD0126A62113 -:1044900078610E548030807CFDF752F900282FD0CF -:1044A00078698030807CFDF753FA002828D078693D -:1044B0008030807CFDF7E5F9002821D078698030D4 -:1044C000807CFDF70AFA00281AD0FAF7E6FF78692F -:1044D00000258030408B002827D039481830FDF760 -:1044E000DAF9002821D07869C421095C00291CD0A0 -:1044F0002030C17E0120FFF76BF9002802D014E0C4 -:104500001220F8BD78692030C17E0420FFF760F9E1 -:1045100000280AD1786950210D526030457102207F -:10452000FFF773F97869A03045717869E621095C75 -:10453000002903D1818CC288914200D8C188B981F9 -:1045400001468031CA8B521E93B20A8CD21892B2A5 -:104550000A8494460246A0321479002C02D04D847D -:10456000157102E04C8CE4184C8404464034A78951 -:10457000FF18A7814C8B012C01D8641C4C83002BA5 -:1045800000D015732030C07E0D4C04281ED0507909 -:1045900000281DD0A1898C451AD2FDF712F90028F8 -:1045A00016D060690146C0310A78002A10D08030E8 -:1045B000408C498888420BD3A570E6700AE0000061 -:1045C000C4000020FC3C010081080000A67001E04E -:1045D000A570E5706069A5210D543B21095C062991 -:1045E00001D0072918D1CA21028E095A511A09B2DD -:1045F000002911DB01460522CC310A3001F095FD7E -:10460000012202216069FCF7EEFE6069C9210D54A8 -:104610003B210D546030867160699E210A5A811CCD -:104620003030FCF71EFFA07800283DD16069C02122 -:10463000095C002901D0803045840120FAF7A4FDEF -:1046400060691330FAF713FF60690F30FAF753FE11 -:104650000120FAF71FFF61694020405C002803D168 -:104660003F20405C00280DD00A467831C8C9F9487F -:104670007832D26842632830C8C008220D30091D44 -:1046800001F053FDFAF701FF01210846FAF758FE41 -:1046900060698030806AFAF716FFFEF7A5FF60694F -:1046A0004030007AFAF730FE6571E571A571257228 -:1046B0006572257102202070FAF7FCFE0020F8BD1B -:1046C00010B5E54C2078022801D00C2010BDA07850 -:1046D000002803D00020FFF786FC17E0FAF7DDFE84 -:1046E00000F033F9606920308079012801D1FAF7B0 -:1046F00076FFA07A002809D0012807D0022807D029 -:10470000032805D0D549D64801F08DFE002010BD04 -:10471000EEF77EFCFAE7D0498872704710B5CE4CB0 -:104720002078032804D0CE48CC49293001F07BFE04 -:10473000606901212030827C002A06D00022827428 -:104740000175A27904231A43A271A2691378DB438D -:104750009B0707D1C37C002B04D1C174A07902212F -:104760000843A0711078C00606D4E0690078C0063E -:1047700002D4E07900280CD06078002809D1A07913 -:10478000002806D1FEF75DFC002802D0207A002820 -:1047900003D00120FFF727FC03E0FEF725FF00F020 -:1047A000D4F8207801280DD0A07A00280AD001285A -:1047B00008D0022807D0032805D0A948A7496830A7 -:1047C00001F031FE10BD0120FBF719F810BD10B546 -:1047D000A14C606920308079012812D1FAF7F6FEE9 -:1047E0006169881C3031FCF7C5FE002809D060697A -:1047F000C21D4388F93253812030007E107301209E -:10480000107210BD70B5944C05462078042804D071 -:1048100093489249803001F006FE617910200143EF -:104820006171002D50D0FBF7A8F96178012508438C -:10483000002811D160694021095C00290CD0E16990 -:104840004A78D20608D0097820300907C07DC90F00 -:10485000814201D165724EE0E078002809D0E0691C -:104860004178C90605D10078C00602D4FFF7AFFF32 -:1048700041E0FFF7ACFFE06900784007C10F6069D5 -:104880002030807D814205D0FFF7A7FC60790821A8 -:1048900008436071E06900780007C10F606920304B -:1048A000C07D814201D1FFF7E1FC6079284360714E -:1048B0000020E071A079000704D560692030C07E37 -:1048C000032818D0207A14E0022001436171E079B6 -:1048D000401CC0B2E07101280DD8606940300078FA -:1048E00000280CD05B484078C106C90E052906D2C5 -:1048F000C006002803D00120FFF775FB01E0FEF79A -:10490000BDFD207801280DD0A07A00280AD001280A -:1049100009D0022806D0032805D051484F49E2307B -:1049200001F081FD9FE40120FAF769FF9BE410B5D7 -:1049300049480078042804D049484849EA3001F041 -:1049400072FD0120FFF74FFB10BD10B501210020C3 -:10495000FAF7DBFE40490420087010BD3E494A22A8 -:104960004969505404202031C876704710B53A4C3C -:10497000C8206169405C00281CD0062806D0203180 -:10498000C97E0020FEF724FF002813D0606901468D -:10499000C0310A7A130001F037FE070D0D0D0D0D21 -:1049A0000D050D004030807FC20704D0C043800752 -:1049B00000D1087210BD0C20FEF727FF60690122AC -:1049C0004030817F1143817710BD10B5002A0AD095 -:1049D000002306E0D41A6418203CE47FC4545B1C16 -:1049E000DBB29342F6D310BD7CB51B4C606920301E -:1049F000C17E0020FEF7ECFE0125002802D1207ABE -:104A000028432072207A00281AD16946E069FCF711 -:104A100022FC684600780022C107C90F6846017071 -:104A20006069002902D06030057101E060300271D8 -:104A30006069014640304282857509202031C87680 -:104A40007CBD401A074900B2884201DC00280BDC1B -:104A50000120704790140020C4000020FC3C01009D -:104A6000F4090000FE7F00000020F2E710B5534C6F -:104A700060692030C17E0020FEF7AAFE0028207A5F -:104A800010D000280DD1E069FCF797FB6169CA22BC -:104A90005052098EFFF7D5FF002807D02820FFF7D6 -:104AA0005DFF10BD01210843207210BD6169E069FE -:104AB000CC31FCF77AFB606906212030C17610BD4D -:104AC00010B500F04EF83D4C607940070BD5606999 -:104AD0002030C17E0520FEF77BFE002803D0207A1F -:104AE000082108432072FFF701FA00F018F8FFF7D9 -:104AF00073F8A079C0060FD5207A00280CD1606920 -:104B00002030C17E0B0001F07FFD07070707070774 -:104B1000070507000721C176FEF7F3FF10BD10B5AA -:104B200026488179490715D5017A002912D14069B3 -:104B30003B21095C891E0B0001F066FD07050C0C8A -:104B40000C0D0C0F0C00002256210A54C030807945 -:104B5000FFF704FF10BD012100E00221C0304172C7 -:104B600010BD10B515488179090720D5017A0029B3 -:104B70001DD1406902462032D47EA41E230001F0DC -:104B800043FD13160B1616161616161616161616BF -:104B90001616161616171600562211546030407954 -:104BA000002801D0062000E01620FFF7D7FE10BD38 -:104BB0004030C1768175D17610BD0000C400002060 -:104BC00030B50346002002460DE09C5C2546303D92 -:104BD0000A2D02D30020C04330BD0A256843303877 -:104BE0002018521CD2B28A42EFD330BD70B50D46A8 -:104BF000144608E00A2101F012FB2A193031203A4C -:104C0000641ED177E4B2002CF4D170BD10B500233E -:104C100010E0040A00020443A0B2CC5C4440200629 -:104C2000000F60400407240C44402006C00C604084 -:104C30005B1C9BB29342ECD310BD000010B572B662 -:104C400000F0DCF800280BD0ECF72AFBF8F7EFFDBA -:104C500000F0A5FD6E490020C86288626D490860B9 -:104C600062B6002010BDF3B5002501200007C06A20 -:104C700081B0C0430006000E04D167480068401CA4 -:104C800000D1012572B600F0B9F8002802D062B652 -:104C90000820FEBDECF75AFAECF706FB5F4B604EBE -:104CA00000211A68CA40D2071FD00246CA40D20764 -:104CB00018D14AB2002A07DA1407240F083CA408C6 -:104CC000A400A419E46904E09408564FA400E41970 -:104CD00024689207D20ED4402206920F012A04D0F3 -:104CE000032A02D062B65048FEBD491C2029D8D301 -:104CF0000198030001F088FC14212323232323239C -:104D000023230B0D0F11131F1517191B1D2E002424 -:104D100016E0012414E0022412E0032410E004242D -:104D20000EE008240CE009240AE00A2408E00B2421 -:104D300006E00C2404E0052402E0072400E0062439 -:104D4000F06901210002000AC9070843F061002D43 -:104D500004D009E062B601200003FEBD2C4D3348AB -:104D6000E862ECF7A1FAA8622A49314808603149A3 -:104D700002980860ECF798FA214600F0F7FCF8F783 -:104D80001AFD00F0FDFE00F073FD0198ECF756FAF5 -:104D9000040062B603D0FFF751FF2046FEBD00209D -:104DA000FEBD10B5044600F029F8002800D001200F -:104DB0002070002010BD204908600020704710B509 -:104DC0000C46102808D011280BD012280CD013281C -:104DD0000ED00120086010BD03CC083CFFF743FF54 -:104DE0000AE0FFF72BFF07E02068FFF7DAFF03E098 -:104DF0001149206808600020206010BD05480C495A -:104E00000068884201D101207047002070470000EF -:104E100000050040780000200010001000E100E0D4 -:104E200000ED00E000E400E00110000000190000C7 -:104E3000BEBAFECAE40000200400002010B52038ED -:104E40000C46030001F0E0FB33A6AAAEB2B8BCC02A -:104E5000C5E0DBE41B1F23272C31373C41474D5075 -:104E600054585C606D71656974787C8084888C901E -:104E700094989C9FA2CACFE9F0F3D3D7F80020689A -:104E800000F0DDF8D6E0206800F0E1F8D2E020681C -:104E900000F0F5F8CEE0207840B200F0D7FAC9E093 -:104EA000207840B200F0F5FAC4E02078616840B2A2 -:104EB00000F008FBBEE0207840B200F018FBB9E03B -:104EC000207840B200F023FBB4E02078217940B292 -:104ED00000F02EFBAEE02078616840B200F058FB95 -:104EE000A8E000F064FBA5E0206800F068FBA1E00A -:104EF000207800F07DFB9DE02068F8F72CF899E021 -:104F00002068F8F72CF895E021792068F8F72EF85A -:104F100090E0206800F0E6F98CE0206800F0E7F906 -:104F200088E0207800F0E7F984E000F0F1F981E012 -:104F3000207800F0F3F97DE0207800F005FA79E0C0 -:104F4000206800F01EFA75E0206800F020FA71E099 -:104F5000206800F022FA6DE0206800F023FA69E092 -:104F6000206800F025FA65E0206800F027FA61E08B -:104F7000206800F028FA5DE00846ECF7FFF859E0F9 -:104F8000EDF719FA56E0EDF746FA53E02068EDF731 -:104F90004EFA4FE0206800F0E1F84BE0206800F0A6 -:104FA000E9F847E0206800F0F0F843E02078A268D4 -:104FB000616800F0F5F83DE0207800F006F939E08E -:104FC000207800F017F935E02078616800F027F9C3 -:104FD00030E02078616800F03AF92BE02179207800 -:104FE00000F016FC26E0206800F06BF822E0206854 -:104FF000F8F70CFB1EE02068F8F7F0FA1AE007CC8F -:105000000C3C00F0FFFC15E0206800F052FD11E0C0 -:1050100003CC083C00F07DFD0CE0206800F06EFF42 -:1050200008E009E003E0FFE700F080FF02E020680D -:1050300000F0B8FF206010BD0120086010BD002105 -:105040000170084670470146002008707047EFF372 -:105050001081C907C90F72B60278012A01D0012256 -:1050600000E0002201230370002900D162B6002A6B -:1050700001D000207047012040037047E7E7EFF3BD -:105080001081C907C90F72B600220270002900D131 -:1050900062B600207047F2E710B52848FFF7CFFF4F -:1050A000002803D026A11D2001F0BDF92348401C93 -:1050B000FFF7C5FF002803D021A1212001F0B3F99B -:1050C00010BDF1B5224D6F6801261C48FFF7BFFFE8 -:1050D0001A4C002803D10026601CFFF7D0FF1D4AA0 -:1050E0001D490120506000BF00BF00BF00BF00BFCE -:1050F00000230B604B60009B6B60106000BF00BF23 -:1051000000BF00BF00BF0868002802D1486800281F -:10511000F9D048680028E4D1002E04D06F60601CEC -:10512000FFF795FF07E0601CFFF791FF0028D3D140 -:105130000248FFF7A4FF0020F8BDC2E7E800002006 -:105140007372635C736F635F6563622E630000005C -:1051500000E5004000E0004000E100405A495B4BA0 -:105160000A685B499A42096801D18904890C016087 -:10517000002070475449554B0A6855499A4201D15D -:105180008004800C4860002070474F494F4B0A68EC -:105190004F499A4201D18004800C886000207047FA -:1051A00030B5494B494D1C684A4BAC4202D01028DF -:1051B00002D203E00E2801D3184630BDC300444894 -:1051C000181801614261002030BD3F493F4B0A6819 -:1051D0004049491C9A4202D0042802D203E0022826 -:1051E00001D3084670473C4A0121C0008018016085 -:1051F000002070473449354B0A683649491C9A42A9 -:1052000002D0042802D203E0022801D308467047E6 -:10521000314A0121C000801841600020704770B5FC -:10522000294A2C4B14682D4E284D82005B1C921984 -:10523000AC4203D0042803D2116006E0022801D357 -:10524000184670BD8804800C1060002070BD70B5D9 -:105250001D4A204B1468214E1C4D82005B1C921984 -:10526000AC4203D0042803D2106806E0022801D320 -:10527000184670BD10688004800C0860002070BD66 -:1052800010B5134A164890600E200021C3009B18E9 -:1052900019615961401C1028F8D300200F4A05E01D -:1052A000022803D383009B18196005E083009B1834 -:1052B0001C68A404A40C1C60401C0428F0D310BD7E -:1052C000034907488860704778000020BEBAFECACC -:1052D00000F501400820000000F0014000F8014006 -:1052E00000C0FFFF47490968016000207047454939 -:1052F0000860002070470121434A002803D001289C -:1053000003D042487047916300E0D16300207047AA -:105310003F49012008603D48801C704704223D4BF6 -:105320003B49002805D05A600869012210430861F2 -:1053300008E008694008400008619A60324900208E -:10534000C03188600020704731490622002808D00B -:10535000012809D002280DD003280FD02B48401C6B -:1053600070470869904302E008699043801C086117 -:105370000020704708699043001DF8E70869104352 -:10538000F5E723494A6A02434A62002070472049F0 -:105390004A6A82434A62002070471D49496A016097 -:1053A000002070471A49CA690243CA610020704749 -:1053B0001749CA698243CA61002070471449C96904 -:1053C0000160002070471249024600204031002A47 -:1053D00003D0012A01D0072070478A6370470D4926 -:1053E0000420886008490020C03188600A480168AC -:1053F0008022090A0902114301600849012008605E -:1054000070470000000400404000004004200000FD -:10541000000500400003004000E400E000E100E07F -:105420008107C90E002808DA0007000F0838800835 -:10543000814A80008018C06904E080087F4A8000AB -:1054400080180068C8400006800F704710B50446F9 -:1054500000F0DBF8002813D02046FFF7E1FFC0B2D0 -:1054600000F0E1F800280DD07549E2060B78D20E65 -:1054700001209040002B08D04A681043486006E0A5 -:10548000704810BD6F48401C10BD6F490860002077 -:1054900010BD10B5044600F0B8F800280BD06849DC -:1054A000E2060B78D20E01209040002B05D04A680E -:1054B00082434A6004E0634810BD6349803108605C -:1054C000002010BD70B50D46044600F09EF800287F -:1054D0000BD05E480068E206D20E012191400840E0 -:1054E00000D001202860002070BD564870BD10B566 -:1054F000044600F08AF8002807D0E106C90E012012 -:10550000884052490860002010BD4E4810BD10B5BB -:10551000044600F07AF8002808D0E106C90E012000 -:1055200088404A4980310860002010BD454810BDC0 -:1055300070B50D46044600F068F8002819D02846DA -:1055400000F071F8002816D0A007C10EFF228A4093 -:10555000A807000E8840002C10DA2107090F08392F -:105560008B0835499B005B18D96991430143D96188 -:105570000CE0344870BD3348401C70BDA3082F496F -:105580009B005B181968914301431960002070BDAE -:1055900070B50C46054600F038F8002805D02846BE -:1055A000FFF73EFF2070002070BD264870BDBFF39E -:1055B0004F8F21492648C860BFF34F8FFEE770B573 -:1055C0001F4C05462178012000290ED1207072B6AB -:1055D00000F0F4F81C4E803631688143616000F0C1 -:1055E000EDF8C043306062B600202870002070BD26 -:1055F00013490A78002A06D0002804D1124A4868C4 -:105600001060002008700020704710B50446202864 -:1056100007DA00F0D3F80121A140084201D10120AE -:1056200010BD002010BD012803D0032801D00020A8 -:10563000704701207047000000ED00E000E400E04A -:10564000EC0000200120000000E100E000E200E0AA -:105650000400FA05F8B50446800700250126002855 -:1056600004DA5848C563C66302208443E00404D5C5 -:105670005548C563C66380148443600003D553480E -:10568000456080058443E00504D55148C563C66381 -:1056900080158443A00404D54E48C563C6634014F6 -:1056A000844360042704C00FF90F884203D04AA145 -:1056B000612000F0B8FEB80F0AD04C49CD634C48C9 -:1056C000C563C563CE63C663C6630320800384439A -:1056D00020050AD5474FFD632F20EBF765FDFE63DC -:1056E0002F20EBF761FDF8148443FFF7C9FD424812 -:1056F000044203D038A18D2000F095FEF8BDF0B52E -:1057000000210A46FF230446CC40E4072AD04CB2CD -:10571000E606F60E0125B540384E3560384E356048 -:10572000002C11DA25072D0F083DAE08354DB600C7 -:105730007719FD69A407E60E1C46B440A54314463C -:10574000B4402543FD610DE0A6082F4DB600761943 -:105750003568A407E70E1C46BC40A5431446BC4070 -:1057600025433560491C2029CDD3F0BD70B5274CA9 -:105770000D462060FFF76EFF2068FFF7C0FF284648 -:10578000ECF7EAFEFFF788FCF7F778FBFFF778FD08 -:10579000FFF725FEECF766FD00F06AF870BD10B566 -:1057A0001A4C2068FFF756FF2068FFF7A8FFFFF7A5 -:1057B00067FDECF74BFF0020206010BD1348006828 -:1057C00070470000C01F0040C0CF004000E501400E -:1057D000C08F0040C0DF00407372635C736F635F13 -:1057E000636F6E6669672E6300000000C0EF0040C3 -:1057F000C0FF0040C0BF0040FEFF0FFC80E100E0A2 -:1058000080E200E000ED00E000E400E0F4000020B1 -:1058100070B5002402460D4620462146002A1ED0BF -:10582000012A04D0022A04D0032A1ED103E0012059 -:1058300002E0022013E003202B0000F0E5FE071633 -:105840000507090B0D0F1600012108E0022106E0F3 -:10585000032104E0042102E0052100E00621F8F71D -:1058600058F8002801D0204670BD0724FBE700004F -:10587000B348002101708170704770B5B14D0123AC -:105880006B60B14B1C68002CFCD0002407E00E6854 -:1058900006601E68002EFCD0001D091D641C944289 -:1058A000F5D30020686018680028FCD070BD70B582 -:1058B000A34C0E466178884203D0A4A16F2000F06B -:1058C000B2FD0325330000F09FFE09520624245246 -:1058D0005252524952002078022803D09BA17320D3 -:1058E00000F0A1FD2570A078022802D0012804D084 -:1058F00008E0A06800F0D2FB04E02046083007C8AA -:10590000FFF7BBFF0020A070F7F7A4FF0420207072 -:1059100070BDF8F754F801466068F9F776FA064664 -:105920002078022803D089A1872000F07CFD8B4AD3 -:105930008B498C48964205D86269032A02D2521CD0 -:10594000626102E0864207D84D71801BC8608449BD -:105950006078F8F7B4FC70BD032003E0A07800285D -:10596000FAD10220F7F77EFE00F0E1F870BD77A1D2 -:10597000B12000F058FD70BD70B50546F8F71FF86E -:105980006F4C60602078012803D070A1B82000F02F -:105990004AFD73490220087000220A718D600422BA -:1059A0004A71704ACA6020706078F8F788FC70BD50 -:1059B00010B5634CA078002802D12078002801D0CF -:1059C000112010BD6848F7F78BFF607060780028E1 -:1059D00004D0012020700020606110BD032010BDA4 -:1059E00010B50124020B64040121604BA04202D2D5 -:1059F0009140186802E0203A58689140084000D071 -:105A0000012010BDF8B50E46910005464F19144609 -:105A10003F1F009100F053FB009980028919091F74 -:105A2000B14201D2012200E00022002C03D0FF216C -:105A300001318C4201D90920F8BD4D498D4219D35D -:105A4000AF4217D3854205D2874203D2284630435E -:105A5000800701D01020F8BD8E420BD3002A09D157 -:105A60002846FFF7BDFF002804D13846FFF7B8FFEE -:105A7000002801D00F20F8BD3E483F490068884209 -:105A800005D0224631462846FFF7F7FE0FE0FFF724 -:105A90008FFF0028EFD12A480121C660856004618C -:105AA00081702046302148431830FFF765FF002001 -:105AB000F8BD10B504462E48800A84420BD300F08E -:105AC000FEFAA04201D8102010BDA0020446FFF744 -:105AD00087FF002801D00F2010BD26482649006806 -:105AE000884203D0204600F0D9FA0AE0FFF760FFB1 -:105AF0000028F1D112480221846081701F48FFF70D -:105B00003BFF002010BD1A48010B01208840401EB9 -:105B1000704700B50B460246FFF7F5FF104201D073 -:105B20000F2000BD114802604360002000BD10B589 -:105B3000034C6078F7F728FF00202070A07010BD9C -:105B4000F800002000E5014000E401407372635C4E -:105B5000736F635F666C6173682E6300307500005D -:105B6000E0140020D0FB0100AF5801000006004007 -:105B70000080010078000020BEBAFECA3A5600003C -:105B8000F74805218170002101704170C17081606A -:105B9000704710B5F3490A78022A07D0CA6810186E -:105BA000C860C8689638F9F7E9F810BD8A68101817 -:105BB00088608868F6E70378EB49EC4A002B02D04E -:105BC000012B10D014E00379002B01D0012B0FD151 -:105BD0004379002B01D0012B0AD18368643B8B42AF -:105BE00006D2C06810E00379002B03D0012B01D04E -:105BF000002070474379002B01D0012BF8D1C368F6 -:105C0000643B8B42F4D280689042F1D80120704707 -:105C1000F8B504460226F8F740FD0068002803D0D6 -:105C2000D3A1BD2000F0FFFB0127CD4D002C08D0F3 -:105C30002078002817D0012805D0022811D0032889 -:105C400013D02F710DE06068C82808D3F9F70BF95D -:105C5000002804D06068FFF79CFF012603E00026BF -:105C600001E000F0F9F93046F8BD28780028F8D1B5 -:105C70006068FFF7A0FF0028E3D060680078002884 -:105C800026D0A878042803D0B9A1F72000F0CBFBD8 -:105C9000B44F0020387060680079012800D00020DF -:105CA000387160684079002837D0042078716068C6 -:105CB0008168E868F8F71DF9B8606068C0689630D8 -:105CC000F8600320A870A749E878F8F7F8FAC8E761 -:105CD000A4480221017061680979012919D00021C5 -:105CE000017161684979002915D004214171616809 -:105CF0008968963181606168C968C160C068984CE4 -:105D000014346060F7F75BFE20606F700220A870AB -:105D1000A7E70321E4E70321E8E70320C6E7F8B596 -:105D20008F4C0D46E178884204D0FF2090A11930B5 -:105D300000F079FB28468A4F00250126143703001E -:105D400000F062FC090612375A7C8D97C4A0C4008B -:105D5000A078032807D0A078022804D0FF2084A1CF -:105D60001D3000F060FBF8BDA078032807D0A078B4 -:105D7000022804D0FF207EA1213000F054FB042033 -:105D8000A07025712078002810D1FFF702FFE0787D -:105D9000F8F7D6F8E0607D49886A7D4A02402261C2 -:105DA0007B4AD24310408862002050E000F054F952 -:105DB000F8BDA078032807D0A078022804D0FF20DF -:105DC0006BA1423000F02FFB2078002802D000F0B9 -:105DD0004FF9F8BDA07803281FD104202AE0091A42 -:105DE0006048C1600146E078F8F769FAF8BD042020 -:105DF000F7F738FCA570F8BDA078032807D0A07885 -:105E0000022804D0FF205AA1633000F00CFB207858 -:105E10000028DCD1A07803280BD0F7F7D0FD01468D -:105E20003868F8F7F2FF0028E1DB79688142DEDBB1 -:105E3000D5E70520F7F716FCA670F8BDA078042872 -:105E400004D0FF204AA1843000F0EDFA0220A168BE -:105E50008847FFF7DDFEFF260546BD3642E0A07805 -:105E6000042804D0FF2042A1893000F0DCFA012090 -:105E7000EDE7A078042899D0FF203DA18E3000F0F6 -:105E8000D2FA93E7A07804280AD06078002802D0DC -:105E9000A078022804D0FF2035A1933000F0C3FA87 -:105EA0002078002893D12079002804D00620F7F725 -:105EB000D9FB2571C0E76078002805D02949E07832 -:105EC000F8F7FDF96570F8BD0720B3E7FF2028A1BA -:105ED000AE3046E7002D0AD0012D06D024A1304671 -:105EE00000F0A1FA022DF5D1F8BD042000E0032056 -:105EF000A1688847FFF78CFE0546F3E770B50500FB -:105F000005D0174CA078052803D0112070BD1020B3 -:105F100070BD2048F7F7E4FCE070E078002803D07B -:105F2000A5600020A07070BD032070BD10B50C48A6 -:105F30000178002901D0112010BD817805292BD0CE -:105F4000817801292AD08178002927D00121017088 -:105F50008178012922D0807800281FD020E000001D -:105F600010010020F01400203D860100FF1FA10752 -:105F70007372635C736F635F726164696F5F74698E -:105F80006D65736C6F742E630000000000050040A7 -:105F9000028100001F5D01000F2010BD00F068F8B5 -:105FA000002010BDF8B5394E0446B078002801D065 -:105FB00001280DD1002C0DD02046FFF7FCFD002854 -:105FC0000AD02078324D002808D0B078012823D09C -:105FD0000F20F8BD1020F8BD0720F8BD02272F7054 -:105FE0002079012814D0002028716079002811D070 -:105FF00004206871A0689630A860E068E860E868EE -:10600000224C14346060F7F7DAFC2060B77019E0B6 -:106010000320E9E70320ECE700202870207901281D -:1060200016D0002028716079002813D004206871F0 -:10603000A168F068F7F75DFFA860E0689630E86057 -:106040000320B0701249F078F8F739F90020F8BD54 -:106050000320E7E70320EAE710B50E48816A0E4AFD -:1060600011400A4A126911438162F7F7F3FB10BD30 -:1060700010B5064CE078F7F787FC0820F7F7F2FA3E -:106080000520A07000202070607010BD100100205D -:10609000F014002000050040FD7EFFFF0A4A0221A7 -:1060A00051600A490B68002BFCD0906008680028FA -:1060B000FCD00020506008680028FCD07047012008 -:1060C000000740697047000000E5014000E401401E -:1060D000034610B50B439B070FD1042A0DD308C804 -:1060E00010C9121FA342F8D018BA21BA884201D9A8 -:1060F000012010BD0020C04310BD002A03D0D307EB -:1061000003D0521C07E0002010BD03780C78401C1F -:10611000491C1B1B07D103780C78401C491C1B1B16 -:1061200001D1921EF1D1184610BDF8B5042A2CD326 -:10613000830712D00B78491C0370401C521E830742 -:106140000BD00B78491C0370401C521E830704D0EF -:106150000B78491C0370401C521E8B079B0F05D007 -:10616000C91ADF002023DE1B08C90AE0EBF72CF870 -:10617000F8BD1D4608C9FD401C46B4402C4310C064 -:10618000121F042AF5D2F308C91A521EF0D40B7854 -:10619000491C0370401C521EEAD40B78491C037042 -:1061A000401C012AE4D409780170F8BD01E004C064 -:1061B000091F0429FBD28B0701D50280801CC90767 -:1061C00000D00270704700290BD0C30702D00270C4 -:1061D000401C491E022904D3830702D50280801C7B -:1061E000891EE3E70022EEE70022DFE70378C278AA -:1061F0001946437812061B0219438378C0781B04A2 -:10620000194311430902090A000608437047020AAC -:1062100008704A70020C8A70020ECA707047002221 -:1062200003098B4273D3030A8B4258D3030B8B426F -:106230003CD3030C8B4221D312E003460B437FD4A3 -:10624000002243088B4274D303098B425FD3030AB5 -:106250008B4244D3030B8B4228D3030C8B420DD3C8 -:10626000FF22090212BA030C8B4202D31212090256 -:1062700065D0030B8B4219D300E0090AC30B8B4294 -:1062800001D3CB03C01A5241830B8B4201D38B0342 -:10629000C01A5241430B8B4201D34B03C01A5241E7 -:1062A000030B8B4201D30B03C01A5241C30A8B422A -:1062B00001D3CB02C01A5241830A8B4201D38B0215 -:1062C000C01A5241430A8B4201D34B02C01A5241B9 -:1062D000030A8B4201D30B02C01A5241CDD2C3092B -:1062E0008B4201D3CB01C01A524183098B4201D3A7 -:1062F0008B01C01A524143098B4201D34B01C01A92 -:10630000524103098B4201D30B01C01A5241C30809 -:106310008B4201D3CB00C01A524183088B4201D378 -:106320008B00C01A524143088B4201D34B00C01A64 -:106330005241411A00D201465241104670475DE079 -:10634000CA0F00D04942031000D3404253400022FC -:106350009C4603098B422DD3030A8B4212D3FC22A5 -:10636000890112BA030A8B420CD3890192118B4224 -:1063700008D3890192118B4204D389013AD092113A -:1063800000E08909C3098B4201D3CB01C01A5241F5 -:1063900083098B4201D38B01C01A524143098B42BE -:1063A00001D34B01C01A524103098B4201D30B01A7 -:1063B000C01A5241C3088B4201D3CB00C01A5241CC -:1063C00083088B4201D38B00C01A5241D9D24308B3 -:1063D0008B4201D34B00C01A5241411A00D20146F0 -:1063E000634652415B10104601D34042002B00D55A -:1063F0004942704763465B1000D3404201B500201C -:10640000C046C04602BD70477047704710B500F0E7 -:106410003BF810BD012308CB134B1860134B1960D8 -:10642000134B1A607047134A134B13607246053AB8 -:10643000F0E7114A0F4B1B689A420ED10D4B00201A -:10644000186001980D4B04B598470CBC9E46024657 -:10645000029800990A4B1B68184706980599094B42 -:106460001B68DB6818470000340100203801002059 -:106470003C0100202C010020EFBEADDEC9CD0000A4 -:10648000E4000020040000201D481E497047FFF76B -:10649000FBFFEAF753FE00BD01200007C06AC0B24F -:1064A000FF2804D1184819490968884202D01848C1 -:1064B00018490160184819490968884203D1184AE7 -:1064C00013605B68184700BD20BFFDE71248134901 -:1064D000096888420ED1134B18680B498842F3D0E3 -:1064E00080F308881049884204DD104802680221C0 -:1064F0000A4302600E4880470E4880470E48004716 -:106500000015002000150020FFFFFFFF0010001005 -:106510002C050040080000000010000000000020D2 -:10652000040000200080010000200020240500401D -:10653000DFCD000099640100156401001348704527 -:1065400002D1EFF3098101E0EFF308818869023895 -:106550000078102814DB202810DB2B280BDB0C4ADA -:1065600012680C4B9A4203D1602804DB0A4A104798 -:10657000022008607047094A10470000084A104787 -:10658000084A12682C32126810470000FDFFFFFF16 -:1065900078000020BEBAFECAAD1200003D4E0100D8 -:1065A000BF4D0100040000200D4B0E4908470E4B63 -:1065B0000C4908470D4B0B4908470D4B0949084743 -:1065C0000C4B084908470C4B064908470B4B05493B -:1065D00008470B4B034908470A4B0249084700008C -:1065E00079250000192200009D2B00003F2A0000A1 -:1065F000ED2900009F270000B912000013140000CD -:10660000012B00000F23000030B47446641E25786F -:10661000641CAB4200D21D46635D5B00E31830BCD6 -:10662000184703B5684600784006400E401C884273 -:1066300005D269460878401CC0B208700CBD684697 -:106640000078000601D500200CBD80200CBD414023 -:10665000802901D0002070470120704737B50878A5 -:106660000C4669460978884206D020781146FFF723 -:10667000D8FF207001203EBD00203EBD37B5044646 -:106680000078154669460979FFF7E1FF002801D037 -:1066900000203EBD20782946FFF7C3FF207001206F -:1066A0003EBD0FB568460179007881420AD0684640 -:1066B000007922214006400E4843801818600120CE -:1066C00004B000BD0020FBE77FB5684601791C4699 -:1066D00015460078FFF7BBFF002802D0002004B069 -:1066E00070BD6846007822214006400E484340199C -:1066F00020600120F3E70000FFFFFFFF0000FFFF25 -:106700000100030000000100000000000000000084 -:1067100000000000000000008700000000000000F2 -:10672000000000000000000000000001020304005F -:106730000D0E0F100000000033690000516B0000C7 -:10674000196C0000736C0000C76C00002F6D000016 -:106750008D690000456A0000D16D0000DF790000FE -:10676000100110013A0200001A02000004013C006E -:10677000230044000E0001020408102040805555FB -:1067800055D6BE898E0000007006120DB4130000AD -:1067900014035A06A00900006004F208840DF401F5 -:1067A000FA00960064004B0032001E001400000046 -:1067B000E067010008000020100000000411000044 -:1067C000F0670100180000202801000004110000FB -:1067D0001869010040010020C013000020110000D2 -:1067E0000249022208681042FCD0704700E200E033 -:1067F0000000000000000000000000000000000099 -:106800000000000000000000000000000000000088 -:106810000000000000000000000000000000000078 -:10682000000000000100010054000020FB349B5FC9 -:106830008000008000100000000000000000000048 -:106840000000000000000000000000000000000048 -:106850000000000001000000000000000000000037 -:106860000000000000000000000000000000000028 -:106870000000000000000000000000000000000018 -:106880000000000000000000000000000000000008 -:1068900000000000000000000000000000000000F8 -:1068A00000000000000000000000000000000000E8 -:1068B00000000000000000000000000000000000D8 -:1068C00000000000000000000000000000000000C8 -:1068D00000000000000000000000000000000000B8 -:1068E00000000000000000000000000000000000A8 -:1068F0000000000000000000000000000000000098 -:106900000000000000000000196401000000000009 -:0869100000000000000000007F -:00000001FF diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_licence_agreement.txt b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_licence_agreement.txt deleted file mode 100644 index b01ccf590e..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_licence_agreement.txt +++ /dev/null @@ -1,90 +0,0 @@ -S110/S120/S130 license agreement - -NORDIC SEMICONDUCTOR ASA SOFTDEVICE LICENSE AGREEMENT - -License Agreement for the Nordic Semiconductor ASA ("Nordic") S110, S120 and S130 Bluetooth SoftDevice software packages ("SoftDevice"). -You ("You" "Licensee") must carefully and thoroughly read this License Agreement ("Agreement"), and accept to adhere to this Agreement before -downloading, installing and/or using any software or content in the SoftDevice provided herewith. - -YOU ACCEPT THIS LICENSE AGREEMENT BY (A) CLICKING ACCEPT OR AGREE TO THIS LICENSE AGREEMENT, WHERE THIS -OPTION IS MADE AVAILABLE TO YOU; OR (B) BY ACTUALLY USING THE SOFTDEVICE, IN THIS CASE YOU AGREE THAT THE USE OF -THE SOFTDEVICE CONSTITUTES ACCEPTANCE OF THE LICENSING AGREEMENT FROM THAT POINT ONWARDS. - -IF YOU DO NOT AGREE TO BE BOUND BY THE TERMS OF THIS AGREEMENT, THEN DO NOT DOWNLOAD, INSTALL/COMPLETE -INSTALLATION OF, OR IN ANY OTHER WAY MAKE USE OF THE SOFTDEVICE. - -1. Grant of License -Subject to the terms in this Agreement Nordic grants Licensee a limited, non-exclusive, non-transferable, non-sub licensable, revocable license -("License"): (a) to use the SoftDevice solely in connection with a Nordic integrated circuit, and (b) to distribute the SoftDevice solely as integrated -in Licensee Product. Licensee shall not use the SoftDevice for any purpose other than specifically authorized herein. It is a material breach of this -agreement to use or modify the SoftDevice for use on any wireless connectivity integrated circuit other than a Nordic integrated circuit. - -2. Title -Nordic retains full rights, title, and ownership to the SoftDevice and any and all patents, copyrights, trade secrets, trade names, trademarks, and -other intellectual property rights in and to the SoftDevice. - -3. No Modifications or Reverse Engineering -Licensee shall not, modify, reverse engineer, disassemble, decompile or otherwise attempt to discover the source code of any non-source code -parts of the SoftDevice including, but not limited to pre-compiled hex files, binaries and object code. - -4. Distribution Restrictions -Except as set forward in Section 1 above, the Licensee may not disclose or distribute any or all parts of the SoftDevice to any third party. -Licensee agrees to provide reasonable security precautions to prevent unauthorized access to or use of the SoftDevice as proscribed herein. -Licensee also agrees that use of and access to the SoftDevice will be strictly limited to the employees and subcontractors of the Licensee -necessary for the performance of development, verification and production tasks under this Agreement. The Licensee is responsible for making -such employees and subcontractors comply with the obligations concerning use and non-disclosure of the SoftDevice. - -5. No Other Rights -Licensee shall use the SoftDevice only in compliance with this Agreement and shall refrain from using the SoftDevice in any way that may be -contrary to this Agreement. - -6. Fees -Nordic grants the License to the Licensee free of charge provided that the Licensee undertakes the obligations in the Agreement and warrants to -comply with the Agreement. - -7. DISCLAIMER OF WARRANTY -THE SOFTDEVICE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EXPRESS OR IMPLIED AND NEITHER NORDIC, ITS -LICENSORS OR AFFILIATES NOR THE COPYRIGHT HOLDERS MAKE ANY REPRESENTATIONS OR WARRANTIES, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR -THAT THE SOFTDEVICE WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. THERE -IS NO WARRANTY BY NORDIC OR BY ANY OTHER PARTY THAT THE FUNCTIONS CONTAINED IN THE SOFTDEVICE WILL MEET THE -REQUIREMENTS OF LICENSEE OR THAT THE OPERATION OF THE SOFTDEVICE WILL BE UNINTERRUPTED OR ERROR-FREE. -LICENSEE ASSUMES ALL RESPONSIBILITY AND RISK FOR THE SELECTION OF THE SOFTDEVICE TO ACHIEVE LICENSEE’S -INTENDED RESULTS AND FOR THE INSTALLATION, USE AND RESULTS OBTAINED FROM IT. - -8. No Support -Nordic is not obligated to furnish or make available to Licensee any further information, software, technical information, know-how, show-how, -bug-fixes or support. Nordic reserves the right to make changes to the SoftDevice without further notice. - -9. Limitation of Liability -In no event shall Nordic, its employees or suppliers, licensors or affiliates be liable for any lost profits, revenue, sales, data or costs of -procurement of substitute goods or services, property damage, personal injury, interruption of business, loss of business information or for any -special, direct, indirect, incidental, economic, punitive, special or consequential damages, however caused and whether arising under contract, -tort, negligence, or other theory of liability arising out of the use of or inability to use the SoftDevice, even if Nordic or its employees or suppliers, -licensors or affiliates are advised of the possibility of such damages. Because some countries/states/jurisdictions do not allow the exclusion or -limitation of liability, but may allow liability to be limited, in such cases, Nordic, its employees or licensors or affiliates’ liability shall be limited to -USD 50. - -10. Breach of Contract -Upon a breach of contract by the Licensee, Nordic and its licensor are entitled to damages in respect of any direct loss which can be reasonably -attributed to the breach by the Licensee. If the Licensee has acted with gross negligence or willful misconduct, the Licensee shall cover both -direct and indirect costs for Nordic and its licensors. - -11. Indemnity -Licensee undertakes to indemnify, hold harmless and defend Nordic and its directors, officers, affiliates, shareholders, licensors, employees and -agents from and against any claims or lawsuits, including attorney's fees, that arise or result of the Licensee’s execution of the License and which -is not due to causes for which Nordic is responsible. - -12. Governing Law -This Agreement shall be construed according to the laws of Norway, and hereby submits to the exclusive jurisdiction of the Oslo tingrett. - -13. Assignment -Licensee shall not assign this Agreement or any rights or obligations hereunder without the prior written consent of Nordic. - -14. Termination -Without prejudice to any other rights, Nordic may cancel this Agreement if Licensee does not abide by the terms and conditions of this -Agreement. Upon termination Licensee must promptly cease the use of the License and destroy all copies of the Licensed Technology and any -other material provided by Nordic or its affiliate, or produced by the Licensee in connection with the Agreement or the Licensed Technology. - -15. Third party beneficiaries -Nordic’s licensors are intended third party beneficiaries under this Agreement. \ No newline at end of file diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_softdevice.hex b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_softdevice.hex deleted file mode 100644 index d6fe985b4b..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_softdevice.hex +++ /dev/null @@ -1,6861 +0,0 @@ -:020000040000FA -:10000000C0070000D1060000D1000000B1060000CA -:1000100000000000000000000000000000000000E0 -:100020000000000000000000000000005107000078 -:100030000000000000000000DB000000E500000000 -:10004000EF000000F9000000030100000D010000B6 -:1000500017010000210100002B0100003501000004 -:100060003F01000049010000530100005D01000054 -:1000700067010000710100007B01000085010000A4 -:100080008F01000099010000A3010000AD010000F4 -:10009000B7010000C1010000CB010000D501000044 -:1000A000DF010000E9010000F3010000FD01000094 -:1000B00007020000110200001B02000025020000E0 -:1000C0001FB5C046C04600F0EFFA04B00FB41FBD24 -:1000D00008205A49096809580847382057490968CB -:1000E000095808473C2055490968095808474020E5 -:1000F0005249096809580847442050490968095875 -:10010000084748204D490968095808474C204B4981 -:10011000096809580847502048490968095808479C -:100120005420464909680958084758204349096836 -:10013000095808475C204149096809580847602068 -:100140003E4909680958084764203C49096809582C -:100150000847682039490968095808476C20374919 -:100160000968095808477020344909680958084740 -:100170007420324909680958084778202F490968CE -:10018000095808477C202D490968095808478020EC -:100190002A490968095808478420284909680958E4 -:1001A0000847882025490968095808478C202349B1 -:1001B00009680958084790202049096809580847E4 -:1001C00094201E4909680958084798201B49096866 -:1001D000095808479C201949096809580847A02070 -:1001E0001649096809580847A4201449096809589C -:1001F0000847A8201149096809580847AC200F4949 -:10020000096809580847B0200C4909680958084787 -:10021000B4200A49096809580847B82007490968FD -:1002200009580847BC2005490968095808470000D3 -:1002300003480449024A034B7047000000000020B5 -:10024000C0070000C00700000122D84B5A6000BF61 -:10025000D74A1268002AFBD0016000BFD44A126856 -:10026000002AFBD00022D14B5A6000BFD04A12684E -:10027000002AFBD07047F0B505460E46174600240D -:1002800006E0A200B158A2005019FFF7DDFF641C80 -:10029000BC42F6D30020F0BD0120C043C549086030 -:1002A000401048607047014601229204086890425D -:1002B00001D9102070470020FCE7F0B505460C4638 -:1002C0001646002706E028462168FFF7BDFF2D1DD2 -:1002D000241D7F1CB742F6D3F0BD70B505460C4611 -:1002E0002E460BE0304600F075F9FF2C01D80024B3 -:1002F00001E0FF3C013C012080023618002CF1D1C6 -:1003000070BD0146012212044868904201D90920BB -:100310007047A9484069401C01D10F20F8E7002030 -:10032000F6E7FEB504462068030000F037FA05043E -:100330002B4249598B00201DFFF7E3FF0546002D96 -:1003400001D02846FEBDFFF7A7FF0120C00200F044 -:1003500041F9042221469948FFF78DFF002801D07A -:100360000320EFE708222146944800F06DF90028A9 -:1003700006D1002192480068FFF766FF00F00CF9F3 -:100380000320DFE7A768E6686068019031463846D9 -:10039000FFF7A3FF324638460199FFF78EFFB20000 -:1003A0003846019900F050F9002800D1CAE703202F -:1003B000C8E700F0E3F9834800688349086041E03A -:1003C00060680190E668A0680090B200009901980A -:1003D00000F03AF90746002F00D1B3E70E20B1E74D -:1003E000201DFFF760FF0546002D01D02846A9E734 -:1003F0006068002807D1FFF74FFF0320800200F05C -:10040000E9F800F0C9F8FFF747FF0120C00200F04B -:10041000E1F8042221466948FFF72DFF002801D0AA -:1004200003208FE708222146644800F00DF90028D8 -:1004300006D1002162480068FFF706FF00F0ACF823 -:1004400003207FE700BF00207CE770B505460C461F -:10045000182D04D12068FFF764FF206002E001201E -:10046000206000BF00BF70BDF0B589B05248406940 -:1004700003905248806881000398081802900398FE -:10048000000B01900121090302984018401E000B47 -:1004900000900124002520462946019A00F0C4F866 -:1004A0000022401E91410791069001260027304608 -:1004B0003946009A00F0B8F80022401E914105919B -:1004C0000490049BDB43059AD2430698184307998E -:1004D00011430791069037490698086007984860CD -:1004E00009B0F0BD70B53448446934488568466841 -:1004F000AA003146204600F0A7F8002801D00020CD -:1005000070BD0120FCE72D484068002801D0012083 -:1005100000E000200546FFF7E5FF002807D0FFF7C1 -:10052000BBFE0320800200F055F800F035F8FFF71D -:100530009BFF002D0ED020484669204884684768FC -:1005400021463046FFF7C9FE224639463046FFF7BE -:10055000B4FE00BF00F020F810B5184844681A48EF -:100560000460204600F0DCF810BD15480068006803 -:10057000401C01D100BFFEE710480068002802D0EF -:10058000042806D101E0FFF7BEFFFFF7E5FF00BF3B -:10059000FEE700BF00BFFEE7BFF34F8F0B480C49DB -:1005A000C860BFF34F8F00BFFEE7000000E50140C9 -:1005B00000E40140000600400010001000080000A8 -:1005C000B8070000BC070000000000200400FA0586 -:1005D00000ED00E010B50146104B1A6808460223F2 -:1005E0000F4C636000BF0F4B1B68002BFBD0531CEC -:1005F00004D0904202D20A4B186101E0084B986087 -:1006000000BF084B1B68002BFBD00023044C636029 -:1006100000BF044B1B68002BFBD010BD0010001066 -:1006200000E5014000E4014010B5202A04DB01464A -:10063000203A9140002010BD914020239C1A03468F -:10064000E3401943904010BD034610B50B439B0790 -:100650000FD1042A0DD308C810C9121FA342F8D025 -:1006600018BA21BA884201D9012010BD0020C04328 -:1006700010BD002A03D0D30703D0521C07E000208E -:1006800010BD03780C78401C491C1B1B07D1037854 -:100690000C78401C491C1B1B01D1921EF1D118463D -:1006A00010BD70477047704710B500F007F810BDD7 -:1006B000014B1B68DB6818470000002019481A49E5 -:1006C0007047FFF7FBFFFFF7FBFC00BD20BFFDE716 -:1006D0001649174C24688C420BD1164B1B68994263 -:1006E0000CD1154B154A1360186810498842EDD09B -:1006F0000AE0134880F30888124B18470F4A13602A -:1007000018680A498842E1D080F308880E49884277 -:1007100004DD0E48026802210A4302605B68184744 -:100720000346DFE7C0070000C0070000FFFFFFFF30 -:10073000000C000014100010001000000000002049 -:10074000000400206B05000000200020240500406C -:100750000D48704502D1EFF3098101E0EFF3088104 -:10076000886902380078182802D1C046074A104725 -:10077000074A12682C3212681047000000B5054B7A -:10078000054A9B58984700BDFDFFFFFF4B04000042 -:1007900000000020001000000400000030B4744687 -:1007A000641E2578641CAB4204D3635D5B00E318D0 -:1007B00030BC18471D46F8E7000C00000010000090 -:10100000F0210020FDB101005D22000063B101006C -:1010100000000000000000000000000000000000D0 -:101020000000000000000000000000006DB20100A0 -:1010300000000000000000005D2200005D220000B2 -:10104000D9B20100DFB201005D2200005D22000084 -:101050005D2200005D2200005D2200005D22000094 -:10106000E5B201005D2200005D220000EBB201004C -:101070005D220000F1B20100F7B20100FDB20100F3 -:101080005D2200005D2200005D2200005D22000064 -:101090005D2200005D2200005D2200005D22000054 -:1010A00003B3010009B301005D2200005D220000CE -:1010B0005D2200005D2200005D2200005D22000034 -:1010C00000F002F81AF07BF80CA030C80838241899 -:1010D0002D18A246671EAB4654465D46AC4201D170 -:1010E0001AF06DF87E460F3E0FCCB646012633420D -:1010F00000D0FB1AA246AB46334318477CA301003D -:10110000ACA30100103A02D378C878C1FAD85207CC -:1011100001D330C830C101D504680C6070470000AD -:101120000023002400250026103A01D378C1FBD803 -:10113000520700D330C100D50B6070471FB5C046C1 -:10114000C04619F0DEFF04B00FB41FBDF0B4404636 -:10115000494652465B460FB402A0013001B506482D -:10116000004700BF01BC86460FBC804689469246B8 -:101170009B46F0BC70470000C11000008269024924 -:101180008161024810447047911100000100000085 -:1011900001B41EB400B501F000FF01B40198864609 -:1011A00001BC01B01EBD0000401E00BF00BF00BF5B -:1011B00000BF00BF00BF00BF00BF00BF00BF00BF37 -:1011C00000BFF1D17047000070B505460C461646C9 -:1011D00002E00FCC0FC5103E102EFAD2082E02D31B -:1011E00003CC03C5083E042E07D301CC01C5361F2E -:1011F00003E021782970641C6D1C761EF9D270BD45 -:101200008307FF22DB0E9A408907090E99400028C8 -:101210000BDA0007000F0838830828489B001818CD -:10122000C36993430B43C3617047830824489B0001 -:101230001B181868904308431860704710B504469F -:1012400000210120FFF7DCFF00211820FFF7D8FF65 -:1012500000210B20FFF7D4FF02211920FFF7D0FF58 -:1012600002210D20FFF7CCFF02210E20FFF7C8FF5F -:1012700002210F20FFF7C4FF0221C81FFFF7C0FFA4 -:1012800003211620FFF7BCFF03211520FFF7B8FF4D -:10129000204600F019F8002010BD6721018070473A -:1012A00010B500F020F810BD0648704710B500F0EA -:1012B00022F810BD704770477047000000ED00E055 -:1012C00000E400E003F9004370B505462D4C08200A -:1012D0002070A01CFFF7E1FF5920A080294620467E -:1012E00000F0B3FB70BD10B500F0B8FB254900203D -:1012F000891E087010BDF8B5224E0446B61E30781F -:1013000001270D46002807D0204660380B2808D852 -:10131000204600F059FF2BE0602CF9D01A480860F5 -:10132000F8BD20466C38032803D8204600F08DFF16 -:101330001EE0204670381F2803D8204600F047F9E9 -:1013400016E0204690380F2803D8204600F0EAF82F -:101350000EE02046A0380F2803D8204600F076F88B -:1013600006E02046B0380F2804D8204600F0E2F905 -:10137000286000E02F60602CD2D128680028CFD1EF -:101380003770F8BD1A000020013000000120254907 -:10139000C003086024490020087007202349C005C5 -:1013A0008860704770B5204D04462878A04207D069 -:1013B000002C05D0002803D01DA14D2019F0CBFE34 -:1013C0002878A0420ED000211E4A18482C70002C0C -:1013D0001BD01D4B012C06D0022C0DD014A168206F -:1013E00019F0B9FE70BD1160022111605361032133 -:1013F00009068160416070BD116003211160536175 -:101400000121C9058160416070BD11601160072133 -:10141000C905816070BD10B505A1712019F09BFE52 -:1014200010BD000080E100E02000002000F5014038 -:101430007372635C68616C5F63636D5F6161722E80 -:101440006300000000F500408401002010B5A038C2 -:10145000030019F0A1FF0B070E172028313A414B6A -:10146000525C65004B6808788A68194603F0D9F920 -:1014700010BD88888A6883B20888194680B203F054 -:10148000DFF910BD08884C68CB688A6880B22146B5 -:1014900003F0DAF910BD08884B688A6880B21946F3 -:1014A00003F0EEF910BD88888A6883B2088819466F -:1014B00080B203F0FAF910BD88888A6883B2088880 -:1014C000194680B203F034FA10BD08884A6880B229 -:1014D000114603F073FA10BD088982B2888883B27E -:1014E0000888194680B203F074FA10BD08884A686B -:1014F00080B2114603F091FA10BD08894C6882B29F -:101500000888CB6880B2214603F00AFB10BD08882A -:101510004C68CB688A6880B2214603F01BFC10BD82 -:10152000012010BD10B59038030019F035FF0906F1 -:101530000F161D242C363F464E0088888A6883B2D9 -:101540000888194680B204F01DF910BD08884A6861 -:1015500080B2114604F051F910BD08884A6880B283 -:10156000114604F056F910BD08884A6880B2114649 -:1015700004F05CF910BD08884B688A6880B219468F -:1015800004F067F910BD088982B2888883B20888A0 -:10159000194680B204F066F910BD08894B6882B222 -:1015A0000888194680B204F07CF910BD08884A68A2 -:1015B00080B2114604F087F910BD888882B208888D -:1015C000114680B204F0DBF910BD012010BD10B54A -:1015D0007038030019F0E0FE1B0F15192125282F84 -:1015E000363B4044484C53585F68707881889095EA -:1015F000999CA2A5AC004A680878114607F019FC2E -:1016000010BD086807F066FC10BD0C790B7B8A687A -:101610000868214607F06FFC10BD086807F000FD60 -:1016200010BD07F08CF910BD08884A6880B21146D9 -:1016300007F034FE10BD0A790888114680B207F021 -:10164000C4FE10BD087840B207F0CDFE10BD08887A -:1016500080B207F0E1FE10BD086807F0EFFE10BD94 -:10166000086801F0ECFB10BD086801F016FC10BD25 -:10167000088982B209C9194607F0F8FE10BD05C9EC -:10168000114607F042FF10BD08884A6880B2114633 -:1016900009F0FAF910BD0C790888CB688A6880B225 -:1016A000214609F0CDFA10BD0B7908888A6880B20E -:1016B000194609F07DFC10BD08884B688A6880B225 -:1016C000194609F0EEFC10BD08884C68CB688A68A2 -:1016D00080B2214609F053FD10BD08884A6880B2E7 -:1016E000114609F08CFD10BD0B7908880A7A80B28A -:1016F000194607F02DFF10BD088880B207F02DFFB6 -:1017000010BD086807F030FF10BD07F0FCF810BDF1 -:101710008A6809C9194607F08CFF10BD07F0DCF88C -:1017200010BD08884A6880B2114608F05BF810BD09 -:10173000012010BD10B5B02805D0B12808D0B228BE -:101740000BD0012010BD088880B20AF056F910BDF8 -:10175000088880B20AF070F910BD08884B688A6862 -:1017600080B219460AF079F910BD000010B50300E7 -:1017700019F012FE0A0609060C0C0F0F06060612D7 -:1017800007F005F910BD09F027FF10BD01F042FA7E -:1017900010BD06F075FA10BDFAA1FE4819F0DBFC89 -:1017A00010BD7FB5FC49054603C901900291132085 -:1017B000800169468881F94A0F2310460A2128389A -:1017C0000AF043FE0024F6480AF05DFE641CE4B211 -:1017D0000A2CF8D304200090F04801231A4603A9EC -:1017E000F0300AF05DFA002804D0FF20E5A1533064 -:1017F00019F0B1FC686800F024FC00211E220846A4 -:1018000004F040F907F0C6FA02222421E54801F06D -:101810007FFBE44801222C214C3001F079FBE149A7 -:101820000B20B03901F000FA002804D0FF20D5A128 -:10183000673019F090FC09F09FFE02F075F901ABDA -:1018400000220821D8A007F085F9002804D0FF2045 -:10185000CCA16D3019F07FFC284602F0C2FC0028B4 -:1018600004D0FF20C7A16F3019F075FCDB2189007F -:10187000D04819F045FBCF48012141710221817107 -:101880000621C1717FBD10B5CA4CA078092804D3C8 -:10189000FF20BCA1A73019F05EFC207860214843EE -:1018A000001900210173417BF722C908C900C91C36 -:1018B0001140EF22114041730121E1700C3010BD45 -:1018C00070B50E4600211C4619801546030019F01C -:1018D00063FD0723050B1711231D2300224629460C -:1018E000304609F096FE70BD22462946304606F085 -:1018F00098FE70BD22462946304601F0C2FF70BDF9 -:1019000022462946304603F0C0FD70BD22462946D6 -:10191000304600F010FC70BD9E489AA1D53819F0F1 -:101920001AFC032070BD70B5A24CE078002818D0D6 -:101930002078602148430019407B00254007400F74 -:1019400001190879401E08712078401CC0B220702F -:10195000092800D12570A078401CA0700AF01DFF56 -:10196000E57070BD9348C079002800D08BE77047C0 -:1019700070B5904DA86800280CD0FFF7F3FF002841 -:1019800062D06022A968FFF71FFCFFF7CCFF0020A0 -:10199000A860EFE76879002856D0FFF774FF044687 -:1019A00080484C3001F0C4FA6060002804D1C9209E -:1019B00074A1800019F0CFFB60680AF0EAF80028F3 -:1019C0000DD0204606F011FD6078010703D5C00850 -:1019D000C000401C2BE0734861684C302DE071481A -:1019E00061684C3001F0ADFA00F05AFB00282BD1B1 -:1019F000FFF749FF04466B4801F09AFA606000283F -:101A000004D164485FA16D3019F0A5FB60680AF04D -:101A1000C4F8002814D0606800886080204609F06F -:101A20002BFE6078010706D5C008C000801C6070DE -:101A3000FFF779FF9EE75B48616801F082FA99E75A -:101A40005848616801F07DFA70BD10B55A4CE160EC -:101A5000A0605A4800F034FC607010BD5649002068 -:101A60000870704770B5564E0546706A94B00C46C3 -:101A7000401C04D1B06AC0430004000C0BD0306A93 -:101A8000C007C00F2870706A19F03CFAB06A207164 -:101A9000000A607114E02B206946087009A96846A5 -:101AA0000AF04BF8002804D0972036A1800019F0E6 -:101AB00052FB0120287006220AA9204619F0C1F91C -:101AC0002878002803D06079C0210843607114B0E1 -:101AD00070BDF0B53A4C0646206895B00D463746C5 -:101AE0000837401C08D16068401C05D1A068401C24 -:101AF00002D1E068401C11D02068314619F002FA8A -:101B00006068311D19F0FEF9A068394619F0FAF93C -:101B1000E06831460C3119F0F5F925E02B206946D3 -:101B2000087009A968460AF008F8002804D0194886 -:101B300014A1553819F00FFB08220AA9304619F0F4 -:101B400080F92B206946087009A9684609F0F5FF5D -:101B5000002804D0A3200BA1800019F0FCFA082271 -:101B60000AA9384619F06DF920692E460836401C3E -:101B700029D16069401C26D1A069401C23D1E069AD -:101B8000401C1FE07372635C686F73745F636F72F5 -:101B9000652E6300DA020000B4B30100D801002012 -:101BA0006D170000A40B00206E52463531383232DA -:101BB00000000000880700202400002071190000A8 -:101BC0008000001012D02069294619F09BF9606945 -:101BD000291D19F097F9A069314619F093F9E069C8 -:101BE00029460C3119F08EF915B0F0BD2B2468464A -:101BF000047009A909F0A1FF002803D0F649F748AD -:101C000019F0A9FA082209AF28460AA919F019F90A -:101C10006846047009A909F090FF002804D0EF4835 -:101C2000ED49C01D19F097FA0822391D304619F008 -:101C300008F9D9E770B5EA4C0546A068002804D039 -:101C40000320E549000219F086FAA56070BD10B5C1 -:101C50000146E44801F075F9E1498879401CC0B2B9 -:101C60008871012803D1E048407800F04DFB10BD99 -:101C700070B50446DD4816460D46814204D1D7486A -:101C8000D549CB3019F067FA012E05D0E120D249B1 -:101C9000800019F060FA70BD66202070002020726C -:101CA000A5810120A07370BD70B515460C4606468F -:101CB000FFF758FE00280CD06621017046800121F4 -:101CC000017221680161A18881820573FFF72BFEF3 -:101CD00070BD1321304607F078FB70BDC2494968DA -:101CE000884201D210207047032101700020704704 -:101CF00070B5BD4C05462078002694B0002801D070 -:101D00000820E4E6BA4A6260954201D21020DEE67D -:101D10006868002809D00921D82804D3C31C9B086F -:101D20009B00834205D00846D1E60320400268604C -:101D30000EE0012109074B6B896B4B43AD49511AEA -:101D40000122591AD202891A814201D20421EAE7FA -:101D500000F052FF6178A0680CF04EFBE068401E76 -:101D600007280BD8302269460A70887068460DF043 -:101D700088FF002802D009A80CF0FBFC2846FFF7DA -:101D800010FD012020703046A1E6F8B504469648C3 -:101D90000F464068814208D3002C01D0844204D30E -:101DA000E01C80088000A04201D01020F8BD8C48C3 -:101DB0008178002911D039880091417860225143FF -:101DC0000D18287B0C350007000F3B4600222946E2 -:101DD000FFF776FD060004D015E0002038800520CE -:101DE000F8BD002C13D039880098814201D90C2607 -:101DF0000DE028783B460007000F22462946FFF7F2 -:101E00005FFD060005D00C2E01D000203880304642 -:101E1000F8BD734C6078401CC0B26070092801D1D5 -:101E200000206070A078401EA07068784107490FBC -:101E300001290ED0022906D003291AD066496E481E -:101E400019F089F9E3E7C006E1D46868FFF7FFFEFF -:101E5000DDE7644869684C3001F073F86079401C34 -:101E6000C0B260710128D2D15F48407800F04CFACE -:101E7000CDE7E079401CE071C9E7604A10B59042B7 -:101E800009D3594A0124A4045268A04201D39042C4 -:101E900001D3914201D2102010BD00F0FEFE10BD12 -:101EA000564B10B5994209D34F4B0124A4045B68EB -:101EB000A14201D3994201D39A4201D2102010BD10 -:101EC000022803D0102801D0092010BD00F00BFF1C -:101ED0000028FAD0052010BD484B10B598420DD30C -:101EE000414B0124A4045B68A04201D3984205D36E -:101EF000994203D3002A03D09A4201D2102010BD88 -:101F000000F017FF0028FAD0072010BD10B50446D6 -:101F1000354894B04068844202D2102014B010BDFD -:101F20000F2008A9087369460BA809F006FE0028CF -:101F3000F4D16846007A207068464089608068461F -:101F40008089A0800020E9E710B500290BD0264A3F -:101F50005268914202D30B68934201D2102010BD07 -:101F60008A88002A02D001F037FE10BD092010BD7A -:101F700010B5224A94B091420ED31B4A01239B0410 -:101F80005268994201D3914206D3441E1E2C41D877 -:101F9000994203D3914201D21020BFE7012837D1E3 -:101FA00008780024C007C00F002803D0032069462A -:101FB000887001E06846847038206946087009A975 -:101FC000684609F0BAFD002804D004480CA18B38FB -:101FD00019F0C1F82046A1E7841B0000AA02000006 -:101FE00088070020A40B002024000020FFFF000031 -:101FF00000220020000000202104000000C0010099 -:102000007372635C686F73745F636F72652E6300D5 -:10201000072083E70246203A1F2AF9D806F001FE7E -:102020007CE710B5604A5268914201D2102010BD81 -:102030000246203A1F2A02D806F068FE10BD07208B -:1020400010BD70B50546594C002020702046461939 -:1020500055484660E01C80088000A04204D0FF2064 -:102060005349293019F077F801200007C06AC043AE -:102070000006000E03D14F480068401C03D04E48B4 -:102080004E49301AC862A8B20422214604F00DF964 -:10209000002804D0FF204649393019F05CF870BDA3 -:1020A000F0B595B03B2008A9087369460BA809F064 -:1020B00044FD002804D0FF203D49813019F04BF841 -:1020C0003F4E00246D4630E02F19B87DC10706D081 -:1020D000400704D460004019C08809F0E9FB394882 -:1020E000807900281FD0B87D80071CD5600040197A -:1020F000C0880022062109F0F7FB002813D03C21FC -:1021000008A8017360004019C1886846C185694606 -:102110000BA809F012FD06000BD0FF2024499630D1 -:1021200019F019F805E0641CE4B268460079A04291 -:10213000CAD8304658E5F7B50546007800270009AB -:102140000C463E46062804D0FF201949BF3019F03E -:1021500002F8287A00280ED0012814D0FF20144954 -:10216000E03018F0F8FF0298002C068001D027809C -:1021700066800020FEBD02270926002C10D0A88909 -:10218000A080A87B0AE003271426002C08D06888CA -:10219000A0802869E060A88A2082287B2072E2E77C -:1021A00002980680E5E700002400002000220020BD -:1021B000002000000010001000000020000500407A -:1021C000043000008807002010B56038030019F0C3 -:1021D000E3F80A060A0F13181F252930353A086854 -:1021E000FFF786FD10BD05C91146FFF7CEFD10BDF6 -:1021F0000868FFF773FD10BD05C91146FFF73DFEE6 -:1022000010BD4B6808788A681946FFF749FE10BD73 -:102210008A6809C91946FFF75FFE10BD0868FFF715 -:1022200075FE10BD08884A6880B21146FFF78CFE23 -:1022300010BD05C91146FFF79BFE10BD05C911462B -:10224000FFF7EFFE10BD012010BD01207047000018 -:102250000E4A12680C498A420AD118470B4A126882 -:10226000094B9A4204D101B500F08EFE03BC8E46A4 -:10227000074909680958084706480749054A064BAF -:102280007047000000000000BEBAFECA64000020D3 -:1022900004000020F0210020F021002001203F490F -:1022A000400608603E4908603E490A68FF231B0259 -:1022B0009A4383121A430A6038498039086070478C -:1022C00010B502460420384904E0C3005B181B79AE -:1022D000002B0AD00346401EC0B2002BF5D133A11B -:1022E000432018F038FFFF2010BDC300CA50002261 -:1022F00059184A718A7101220A7110BD2A4A0021B7 -:10230000C00080180171704710B50446042803D33B -:1023100026A1522018F01FFF2348E1000C18207955 -:10232000012803D021A1532018F015FF6079A1796D -:10233000401CC0B2814200D06071012017494006A4 -:102340008031086010BD70B5164804250068164E2F -:102350000004800F1B4C02281AD014A1692018F029 -:10236000FAFE15E02078C10088190279012A07D108 -:10237000427983799A4203D04279827170588047BA -:102380002078401CC0B22070042801D300202070A7 -:1023900028466D1EEDB20028E4D170BD80E100E05A -:1023A00080E200E018E400E0200C00207372635C1F -:1023B000736F635F7369676E616C6C696E672E63C0 -:1023C000000000003400002010B5EFF31080C407B7 -:1023D000E40F72B6D2484178491C41704078012818 -:1023E00001D10AF0FFF9002C00D162B610BD70B522 -:1023F000CB4CE07800280AD10125E570FFF7E4FF17 -:102400000AF0F8F9002804D000200AF0CBF90020E7 -:1024100070BDC44865714560F9E770B5EFF3108091 -:10242000C507ED0F72B6BE4C6078002803D1BEA17F -:102430008F2018F090FE6078401E60706078002851 -:1024400001D10AF0D3F9002D00D162B670BD10B5EC -:10245000B348C178002904D000214171C170FFF751 -:10246000DCFF002010BD10B504460AF0C3F9AC49EA -:10247000C978084000D001202060002010BDF8B5C8 -:102480000246A74C0026A67108200421012510272A -:10249000130018F081FF0D080A0C0E101214161EFE -:1024A000262123252800257122E0022001E0217148 -:1024B0001EE020711CE027711AE02020F9E70126B8 -:1024C00016E0FFF781FF0AF095F90028FBD00226FD -:1024D0000EE02171A5710BE02771FBE7202000E0E1 -:1024E00040202071F6E7FF208FA1763018F033FEF0 -:1024F0000AF08CF9002809D00AF08EF9B04205D113 -:1025000030460AF08CF90028FAD02CE00120800730 -:10251000C560894900224A60884A9661814B02223F -:102520005A60856086480269D243D206D51702698F -:1025300010231A4302610F466D1C00E020BF78682B -:102540000028FBD030460AF06AF90028FAD0002DA6 -:1025500004D17B48026910218A430261714902203B -:10256000886000207860A07900280CD00AF042F939 -:1025700005460AF09FF8734A002D02D0A260E06081 -:1025800001E0E260A060002E01D100F0A5F8F8BDE6 -:1025900010B504460AF034F9002805D0604901203E -:1025A000C8704A78521C4A702046FFF768FF10BD79 -:1025B000F8B5614DA8680026012802D1AE600AF086 -:1025C000F1F86868012800D16E6028680127544C32 -:1025D000012812D12E606079002803D000200AF073 -:1025E000E1F866712078002807D00AF003F9002886 -:1025F00003D0012080070761A770286901282AD12C -:102600002E6100F05FF8012080074761A079002863 -:1026100015D00AF0EFF800900AF04CF80099002964 -:1026200001D0E16800E0A168411A022901DA8A1CA0 -:1026300011DC0099002901D0E06000E0A060FFF704 -:10264000C3FE0AF0D7F8002804D0012080070761F4 -:10265000A77000E02770E868012812D100F032F876 -:1026600000F030F800F02EF8A078002804D1FF2008 -:102670002DA1033018F06FFDEE60A6702670FFF7F5 -:10268000CCFEF8BD10B5264CE078002801D10AF048 -:10269000ADF801208107886100F014F8A0780028C7 -:1026A0000BD0254CE068002803D10AF0B8F80028C8 -:1026B000F8D10020E06000F005F800201949C0437F -:1026C000886010BD08B55020694608806A461088A9 -:1026D000411E1180FAD208BDF8B51248192787604B -:1026E000154900200860C8600AF084F8BE0701247C -:1026F0000B4D002802D03461AC7000E02C70FFF765 -:1027000063FE084847600D4928798863FFF7DAFFC0 -:10271000B461FFF7D7FF0849002008617461F8BD74 -:1027200038000020000300407372635C736F635FC6 -:10273000636C6F636B2E6300000100400005004076 -:1027400000ED00E0FFFFFF7F8107C90E002808DAD7 -:102750000007000F083880082E4A80008018C069E2 -:1027600004E080082C4A800080180068C8400006F9 -:10277000800F704710B50D20FFF7E6FFC4B20420AC -:10278000C043FFF7E1FFC0B2844203D023A11A2067 -:1027900018F0E1FC26490120486010BD0121254ABE -:1027A00048031060244B00221A60244A5160244AD6 -:1027B0001060244A11601F49803908607047012168 -:1027C0001C4A480310601F4A51601B4A00211160D7 -:1027D0001B490860704710B517490868012804D0E4 -:1027E0000EA1572018F0B7FC10BD114880680022D8 -:1027F000C0B20A6009F0BEFC10BD10B50E480168F9 -:102800000029FCD0FFF7E7FF01200D4940030860D5 -:1028100010BD000000ED00E000E400E07372635CB6 -:10282000736F635F68616C5F726E672E6300000098 -:1028300000D5004080E100E000D1004000D300401E -:1028400080E200E000D0004030B40121BC48C90261 -:102850000160CD1005604A030260BA4803681B029C -:102860001B0A036004680023240A24020460B6489B -:102870000468240A24020460B4480124446084608B -:10288000B34C23606360A360B24B19601D601A6093 -:10289000B14B19601A600121016030BC704710B45F -:1028A0000121A748CA0202600B0203600C06046003 -:1028B000A64841608160A94841680029FCD1A4492B -:1028C0000020086048608860A248026003600460DD -:1028D00010BC704701219F48C9020160C910016006 -:1028E0007047002805D0012805D0022805D19C4852 -:1028F00070479C4870479C48704710B59BA18B203F -:1029000018F029FC002010BD70B500219E4C9F4D91 -:102910009F4A8F4B002808D001281DD0022822D0C2 -:1029200092A1B32018F017FC70BD01200004A06034 -:10293000A86011601960974BC2039A60964A906034 -:102940007F4A0012106095480160864801609448F3 -:1029500001609448017070BD01204004A060A8602F -:102960005160596070BD01208004A060A860916032 -:10297000996070BDF8B59446834A8B4F834D00240F -:102980000126002808D0012832D0022840D077A1A3 -:10299000E82018F0E0FBF8BD891E0902090A0120B1 -:1029A000000490603C6468606C4A1164012B1DD087 -:1029B00000217C4A7D4B51706146DC63DE637C4BB9 -:1029C0005C6002249C6004241C61744B3D311960DE -:1029D00073490E605F4B891519606F4B58605E48F4 -:1029E00001606C49C00548601670F8BD0121E0E740 -:1029F0000120704E4004704F012B04D134645060AC -:102A000068603964F8BD9060346468603964F8BD0A -:102A100001206A4E80046A4F012BF4D1EEE74F4843 -:102A20004068704770B54A4D28680026564C01280A -:102A300006D1A068C00303D501200004A0602E6069 -:102A40006868012809D1A068800306D501204004E8 -:102A5000A0606E6001200AF0B9FEA868012809D1C3 -:102A6000A068400306D501208004A060AE6002206B -:102A70000AF0ACFE70BD10B54A490878002818D09D -:102A80000120444AC0079060434AC00B90602C4A22 -:102A900000121060414A00201060324A1060404A23 -:102AA000106008704A78002A02D048700AF08EFE42 -:102AB00010BD0320FAE70120424900060860704774 -:102AC0000120244900060860704701203D49400567 -:102AD0000860704701201F4940050860704733496E -:102AE0000020C86388151B4908607047410A364AB0 -:102AF000C005C00D5043801C5143400A0818704760 -:102B000010B4324C430B63431B0C5C020C602E4C24 -:102B10006343C31A2E485C0258432B4B400D43437A -:102B2000E31A0124DB0324041B191B1613700A6823 -:102B30001018086010BC704710B50AF01BFF10BDDC -:102B400080E100E008E400E018E400E000B00040AC -:102B500040B1004080E200E000E100E000B500404C -:102B600048B100404081004044B100407372635C52 -:102B700072656D5F68616C5F6576656E745F7469C0 -:102B80006D65722E6300000000B3004040B300404A -:102B900040B5004000F50140008300404085004002 -:102BA000008200404800002000B10040C08F00407B -:102BB0000085004004B1004004B5004008B1004069 -:102BC00008B5004000E200E0093D00003786000043 -:102BD0006F0C010010B50AF0B9FE10BD00200449C9 -:102BE000C863012001218140024A116000BF704783 -:102BF000C01F004080E200E010B50DF05DF909F063 -:102C0000F7F9FEF7C3FB0FF0F5FA0DF08FFF0DF0AB -:102C10001BFF10BD70B50C46054603F0A7FA214610 -:102C200028460EF0C2FF70BD70B50D46040012D0EC -:102C3000002D10D02101284618F060F910225449C7 -:102C4000284618F0FEF852480121083801804480D7 -:102C50004560002070BD012070BD70B54C4E002451 -:102C60000546083E11E0716820014018817BAA7B6F -:102C7000914209D1C17BEA7B914205D10C222946C0 -:102C800018F0B2F8002806D0641C30888442EADBD1 -:102C90000020C04370BD204670BD70B50D460600D3 -:102CA0000AD0002D08D03A4C083C20886188401C8E -:102CB000884203D9042070BD102070BD3046FFF754 -:102CC000CCFF002801DB401C0AE02088616800017D -:102CD00040181022314618F0B4F82088401C20809B -:102CE0002870002070BD70B514460D001FD0002C58 -:102CF0001DD00021A170022802D0102817D108E0B1 -:102D0000687829780002084311D00121A170108051 -:102D10000BE02846FFF7A1FF002808DB401CA0704D -:102D2000687B297B000208432080002070BD0120C1 -:102D300070BD70B5054614460E000AD000203070F4 -:102D4000A878012807D004D9114908390A88904287 -:102D50000BD9012070BD002C04D028782070288861 -:102D6000000A50700220087010E0002C0CD0496856 -:102D70000001411810222046103918F062F8287816 -:102D800020732888000A607310203070002070BD06 -:102D9000540000205A4910B5884207D30121890404 -:102DA000884205D357490968884201D2102010BDD6 -:102DB0000146012005F0CBF810BD30B5044693B0B4 -:102DC00000200D46079014210BA818F099F81C213B -:102DD000684618F095F86A46112010770020507761 -:102DE000107802210843107007A80C90012008AA4F -:102DF000907245486A4610850AA80B902088108476 -:102E000060885084A0889084E088D084907FF921E5 -:102E10000840801C4008400090770820908610876A -:102E200008A80F9010AA0BA9684600F05CFF0028C4 -:102E300003D110A800882880002013B030BD3EB513 -:102E400004460820694608802D48844207D30120A3 -:102E50008004844205D32B480068844201D21020AC -:102E60003EBD2146012005F072F80028F8D12088E7 -:102E7000694688806088C880A0880881E088488189 -:102E800005F065FE01AB6A46002101F0BBFB694617 -:102E900009880829E4D003203EBD1FB50446002060 -:102EA000029008206946088115480391844207D39F -:102EB00001208004844206D312480068844202D272 -:102EC000102004B010BD05F042FE014602AA0F48D2 -:102ED00001F02EFD0028F4D169460989082901D0A6 -:102EE0000320EEE7694609882180694649886180A8 -:102EF00069468988A1806946C988E180E1E70000C8 -:102F000000C0010028000020042A0000FFFF00008C -:102F100010B5031D03600020521E04E05C181C6005 -:102F2000401C2346C0B29042F8DB0020186010BD60 -:102F300001460A680020002A02D0104612680A6082 -:102F4000704702680A6001607047000010B50146D2 -:102F50002022094817F075FF07490020C877084666 -:102F600010BD0649012048610548064A01689142A2 -:102F700001D1002101607047B00E00200005004023 -:102F800064000020BEBAFECA0C4908784A78401C8A -:102F9000C0B2904200D008707047094A074820BF6D -:102FA00040BF20BF4178037843701368002B02D1E3 -:102FB00003788B42F3D00020704700006B000020A4 -:102FC00000E200E00A4A022151600A490B68002B26 -:102FD000FCD0906008680028FCD000205060086891 -:102FE0000028FCD0704701200007406970470000AE -:102FF00000E5014000E401407047704770477047AA -:1030000010FFFFFFDBE5B15100C001006700FFFFCB -:1030100003B40148019001BD09000020002803D03D -:103020008178012939D101E0102070470188FE4ADA -:10303000881A914233D01BDCFC4A881A91422ED068 -:103040000BDC00292BD00320C002081A27D001284E -:1030500025D001210903401A07E001281FD00228CA -:103060001DD0FF281BD0FF380138002815D116E0ED -:10307000FF220132811A904211D008DC01280ED0C3 -:1030800002280CD0FE280AD0FF2806D107E001292B -:1030900005D0022903D0032901D0002070470F205A -:1030A000704700B50B2826D009DC030018F074F92E -:1030B0000B1D2125251B25292325271F1B00112832 -:1030C0001BD008DC0C2816D00D281CD00F2814D0DB -:1030D000102808D10FE0822809D084280FD0852835 -:1030E0000FD0872811D0032000BD002000BD05208F -:1030F00000BDCF4800BD072000BD0F2000BD04204B -:1031000000BD062000BD0C2000BD0D20800200BDCA -:1031100070B500290BD0CB1FFA3B81241E46CDB2DF -:10312000112B1BD2012805D0022806D009E000206F -:1031300010701DE0FF20043001E0FF2003308142C9 -:1031400018D0330018F028F9111613131613161699 -:103150001316161613131313161316000846FF380A -:1031600081381F2803D9FF39FE39022902D815708A -:10317000002070BD1470072070BD00B5030018F06A -:103180000BF9060406040C080A0C002000BD1120EF -:1031900000BD072000BD082000BD032000BD007851 -:1031A0000207120F04D0012A05D0022A0AD10EE02C -:1031B000000907D108E00009012805D0022803D042 -:1031C000032801D0072070470870002070470620B0 -:1031D0007047002807D0012807D0022807D003280D -:1031E00007D007207047002004E0112002E02120D2 -:1031F00000E0312008700020704738B50C4605000B -:103200004FD06946FFF7CBFF002822D12088032149 -:1032100089028843694609788907090D0843208097 -:103220006946681CFFF7BBFF002812D121880320E4 -:1032300000038143684600788007800C01432180A9 -:10324000A8784007820F2020012A03D0022A03D049 -:10325000072038BD814300E00143218088B2010589 -:10326000890F08D0012189038843A9780907C90F6C -:1032700089030843208080B28104890F0AD0A9788D -:103280004004C906C90F400CC903084320808004CC -:10329000800F02D12088400403D5208840210843B4 -:1032A0002080002038BD70B50446002008801546F7 -:1032B0006068FFF7A2FF002815D12189A08981420B -:1032C00010D861688978C90708D00121490288426D -:1032D00008D8491C17F01EFE298009E0FF21FF31A4 -:1032E000884201D90C2070BDFF30FF3003302880A8 -:1032F000002070BD10B5137804785B08E4075B000C -:10330000E40F23431370FD2423400478A407E40F43 -:10331000640023431370FB24234004786407E40F04 -:10332000A40023431370F724234004782407E40FF8 -:10333000E40023431370EF2423400478E406E40FF1 -:10334000240123431370DF2423400478A406E40FF0 -:103350006401234313700078BF244006C00F23404C -:10336000800103431370002906D00878C10701D1FA -:10337000800701D5012000E00020C0015906490E58 -:103380000843107010BD30B50A8803239B020488DF -:103390009A4323059D0F02D1A3049C0F01D09B0FDC -:1033A00000E001239B021A4303230A801B039A4374 -:1033B00003889804840F02D11805830F01D0800F71 -:1033C00000E00120000302430A8030BDF3B593B052 -:1033D0000D000FD0139800280FD01221284617F0A7 -:1033E0008DFD03AAFF21012003F0D5F80024264615 -:1033F00037467AE0102015B0F0BD0720FBE768469D -:10340000807D01280BD16846818A0520C002081AF8 -:1034100010D0012810D0022812D0032812D0042C7A -:1034200014D0052C15D113E002290000012800005A -:1034300003300000012400E002246846468A08E0C8 -:10344000032406E068460424478A02E0052400E0DD -:1034500006246846418A1398814246D12C74002E76 -:1034600041D00DAA0EA905200292019100901023CF -:103470000022FF21304603F02FF9002823D16846AF -:10348000808E2A46C0B20EA9FFF72DFC00281AD163 -:10349000AE81002F27D00DA9052008AE0291009023 -:1034A000132300220196FF21384603F015F9002866 -:1034B00009D16846808EF11CC01EC0B22A1DFFF7DC -:1034C00012FC002801D0032095E708A881784278F3 -:1034D00008021043E881062C05D16846807DA87259 -:1034E0006846808A2881002085E703A803F05CF8FD -:1034F000002884D0FFF7D5FD7DE7002805D0FE4ADF -:10350000012903D0022903D003207047518800E02D -:103510009188814201D1002070470720704770B523 -:103520000C4605461C21204617F0E8FC00202080B0 -:10353000002D08D0012D04D0F0A1F54817F00BFEA6 -:1035400070BD062000E00520A07070BD70B592B07F -:103550001546064601206A461071107453740846D9 -:1035600008300395029048889082FEF7FBF904002A -:1035700019D06580172069468883203600940AABED -:103580007178023307AA01A80EF017F90646607891 -:10359000000701D5FEF7C7F9002E0AD03046FFF725 -:1035A000ECFD12B070BD1321284605F00EFF03207C -:1035B000F7E708A800906846838B0422012128467B -:1035C00007F0B3FEEDE770B506468AB000200D4661 -:1035D00007900590069003A90490052402460291E5 -:1035E0000190102300942946304603F075F8002816 -:1035F0000DD108A804A9009102900194684683891E -:1036000000222946304602F083FE002801D0FFF751 -:1036100048FD0AB070BD10B50EF0D5FA10BDF0B57A -:1036200089B000260546059600780C460827030059 -:1036300017F0B2FE0CFD070C390B75759BBEFCD361 -:10364000E3FD68680A38FEF702FB07E1A88800225C -:1036500080B20421009008F067FB0290002C04D097 -:10366000AB48A6A16E3017F076FD0298002804D171 -:10367000A748A2A16F3017F06EFD0298009908309C -:103680000DF0D0FCFEF76EF9040007D060783843E7 -:10369000607000986080FEF746F9E1E01321009821 -:1036A00005F093FEEAE0002C04D1BD2093A1800038 -:1036B00017F051FD60880022042108F035FB0090CE -:1036C000002804D192488DA1883017F044FD00995C -:1036D000002008802A7994461EE0C3005B199B688D -:1036E00007936B469B8B1A0708D5DA0606D560460A -:1036F000C20050194038C08F088006E05B0409D52D -:103700000871C2005019C0884880607838436070E2 -:103710000226A3E0401CC0B28445DED89EE0E888C3 -:10372000694608800090002C04D1794873A1983034 -:1037300017F011FD2878062813D10098C00B10D07F -:1037400060880022042108F0EFFA060004D17048D6 -:103750006AA1A23017F0FFFC00203071A8887080A9 -:1037600039E060783843607078E0002C04D1684814 -:1037700062A1B43017F0EFFC60880022042108F049 -:10378000D3FA0090002804D161485CA1B73017F04B -:10379000E2FC009808300EF068FA0121484002D19E -:1037A000E888C00B5AD0009861880226C180D8E70B -:1037B000002C04D1564851A1D03017F0CCFC6088C1 -:1037C0000022042108F0B0FA002804D150484BA18F -:1037D000D33017F0C0FC0226C3E7002C04D14C48BC -:1037E00046A1DC3017F0B7FC022661880122204692 -:1037F000FEF73EFA01200590B3E7A889002280B2C7 -:103800000421009008F090FA0746002C04D04048AC -:103810003AA1EE3017F09FFC002F04D13C4837A1AD -:10382000EF3017F098FC6868029001E009E010E0C2 -:10383000288969468881012202A90098FEF734FA96 -:103840000CE0002C8DD16D202CA1C00017F083FC62 -:1038500087E72F4829A1FE3017F07DFC002C0DD002 -:10386000607800070AD50598002807D184202070C9 -:103870002046582229460830FDF7A6FC304609B0FC -:10388000F0BDF7B50C460546007A224688B00A32EC -:103890000492921C01920027811E16323E4602922B -:1038A0000B0017F079FD08F405F348488ED0F2F3C9 -:1038B00068880022042108F037FA0190002803D11B -:1038C0000EA1144817F047FC01980088002802D088 -:1038D0005227072600E151271E26002C70D0688849 -:1038E000A0800120A071019804990079C0004019BE -:1038F000C089FFF76BFD0FE0400C00207372635C22 -:1039000067617474735F636F72652E6300000000FB -:103910006F0200008603000000287DD10198007925 -:10392000C0004019C089208101980079C000401969 -:10393000408AA083F0E0698A0091062820D1E889B6 -:10394000C00B1DD008462230512786B2002CC5D0AE -:10395000A8890199FFF73AFD002872D16888A080F4 -:103960000220A071A88920810120A072288AE0830A -:10397000009820846969009A029817F062FACBE0F7 -:1039800008462030502786B2002CA7D0A889049979 -:10399000FFF71CFD002854D16888A080A889E0802A -:1039A000287A06280AD002202072288AA08300984C -:1039B000E083204669692030009ADEE70120F3E7C2 -:1039C0008FE068880022042108F0AEF90690688A2A -:1039D00000900698002803D1FD49FE4817F0BBFB74 -:1039E000069808300EF041F90121484002D1E889DB -:1039F000C00B25D000985127223086B2002C7AD0F7 -:103A00006888A080A8890199FFF7E0FC002818D1F8 -:103A10000220A071A88900E013E020810420A07298 -:103A2000288AE083009820846969009A029817F038 -:103A300008FA0699002008710698A98941806BE070 -:103A400003200BB0F0BD688804F0DDF900906888B1 -:103A50000022042108F068F901900098002804D1A0 -:103A6000DC48DB492C3017F076FB0198002804D1A4 -:103A7000D848D7492D3017F06EFB0198D649C08839 -:103A8000884205D05127222604E01EE03FE035E0C1 -:103A900050272026002C2ED06888A080502F07D0D9 -:103AA0000220A0712146287B0831FFF738FD33E062 -:103AB000287BA11DFFF733FD6A8800230199009838 -:103AC000FFF744FD0028BCD126E0C449A889C98875 -:103AD000814207D154270626002C0CD06888A0808C -:103AE0001AE008E053270826002C04D06888A0803C -:103AF000A889E08010E00A98068013E05527072681 -:103B0000002CF8D0A889A0800020A07104E08D20AE -:103B1000AF49C00017F01FFB0A98002C068001D0A7 -:103B20002780668000208CE7AC4900200870704731 -:103B300030B585B00C4601F0DBF90546FF2804D10D -:103B4000A448A349953017F006FB0020208020717F -:103B50006080401EE0802046294608300DF056FA6D -:103B60006A462946012002F016FD102412E068463C -:103B7000808800070ED56846C0882946FFF723FDD8 -:103B800068468188FF2321438180C0882946019AA5 -:103B900002F02CFE684602F007FD0028E7D005B0D1 -:103BA00030BD0A46014610B5104608300DF042FA05 -:103BB00010BD70B505460022042108F0B5F80400D8 -:103BC00004D184488249B73017F0C5FA2046294607 -:103BD00008300DF027FA70BDF0B591B00C460746DD -:103BE00004F011F9050005D02878222804D2082015 -:103BF00011B0F0BD7A48FBE700220421384608F0F6 -:103C000093F80646002C02D0A08800280CD0012092 -:103C1000694608710220087400204874002C05D001 -:103C2000A0880883206802E00920E1E70883059066 -:103C30003046083003970290FDF794FE040018D038 -:103C40006780172069468883203500940AAB69781D -:103C5000023307AA01A80DF0B0FD05466078000701 -:103C600001D5FDF760FE002D09D02846FFF785FA43 -:103C7000BEE71321384605F0A8FB0320B8E708A8E3 -:103C800000906846838B04220121384607F04DFBE3 -:103C90000021C943F180ABE7FFB585B00E9E778860 -:103CA000384604F0B0F8054600220421384608F0F2 -:103CB0003BF80446002D03D145494A4817F04BFA1A -:103CC000002C04D147484249401C17F044FA0834FC -:103CD000089869460394C1C105A80DC820356978C4 -:103CE0000DF0DAF9CBE5F0B50446002099B00D46A9 -:103CF00001460D9010A88181164601818180374AC6 -:103D000068469180018510A80180684601878185F9 -:103D100081841078012808D0022806D0032804D016 -:103D2000042802D0082019B0F0BD2F4A944273D362 -:103D30002E4F0121890438688C4201D3844278D304 -:103D4000294A954275D3012189048D4201D38542C8 -:103D50006FD36168002913D0234A914269D30122AD -:103D60009204914201D3814263D3608921898842C0 -:103D700003D801225202914201D90C20D3E70D90C1 -:103D800016AA0EA92846FFF78EFA0028CBD168683C -:103D900080784007800F02280AD16846008F80048F -:103DA000800F05D02869002802D03968884240D3A6 -:103DB0000AA92069FFF721FA0028B4D12069002858 -:103DC0001CD0607880076846008D14D580040FE011 -:103DD000FC380000EE030000FFFF0000400C002054 -:103DE000023000000C05000000C001002800002087 -:103DF000800F68D002E08004800F64D16846008D97 -:103E0000810618D58004800F606806D0002812D083 -:103E1000396888420DD302E00BE000280BD0FE4940 -:103E2000884206D301218904884204D33968884234 -:103E300001D2102077E709A96069FFF7DEF90028B1 -:103E40009CD16069002808D06846808C0105890FE4 -:103E5000012938D18004800F35D00BA9A069FFF764 -:103E6000CCF900288AD16846808C80062BD468461D -:103E7000808D810627D4A169002906D00105890F0C -:103E8000012920D18004800F1DD0E068002804D0D3 -:103E90000078002817D01C2815D204AA611C2046DF -:103EA000FFF728FA0121890210A80180012768463E -:103EB0008773DA49818104AA033217A92868FEF7BB -:103EC00038FF002801D007202DE710A8007F15A992 -:103ED000C01CC2B200200C920190FF320090034639 -:103EE0000291FF3203A80332109902F0ACFA0028C5 -:103EF00026D110A9888A0F902A892969C84801917A -:103F00000092029010A90A8B6B8928680E9902F022 -:103F10009AFA01007ED1C2480025001F81886846B8 -:103F20004174090A8174052104A86A4623C210A8B5 -:103F30002A46FF21808A0C9B02F0EAF9002802D071 -:103F4000FFF7AFF8EFE66846007C0322C1090020C6 -:103F5000920290430122920280181490002928D0E6 -:103F6000014610A8018068462921877309028181D2 -:103F7000058608A8007C0023410860784900C00736 -:103F8000C00F014308A80174FD2001406078A54AD4 -:103F90008007C00F4000014308A801740CA902204B -:103FA00001910090029503A8109902F04CFA0100CB -:103FB00030D16068002828D0206900280DD10AA9D6 -:103FC0000EA8FFF7E0F96078800706D46946088DEF -:103FD0000321090388436946088590496846877329 -:103FE000FE3181818F492089891E16F093FF626816 -:103FF0000D9811AB0192009002930A46002303A88A -:104000000A9902F020FA010004D12078C10603D4F5 -:10401000800600E085E02AD56846058660690028AC -:104020000DD109A90EA8FFF7AEF96846818C0320CF -:104030008002814301208002091868468184694614 -:10404000888CC82108436946888474488F73FF3080 -:10405000888112AA0CA902200292019100900023EB -:10406000704A03A8099902F0EEF9010059D12078AD -:10407000C00729D068460586A06900280DD10BA984 -:104080000EA8FFF780F96846818D032080028143E6 -:10409000012080020918684681856846818D40208C -:1040A00001436846818587735F49818113AA0CA902 -:1040B000022002920191009000235A4A03A80B9912 -:1040C00002F0C1F901002CD1E06800282DD010A821 -:1040D00014990180544968468773491C8181E168BD -:1040E00008A80A78027449784174E068412241883E -:1040F00068464186E0680023017908A80175E068F8 -:10410000D200C18808A84175090A81750CA8072149 -:1041100001900091029503A8109902F094F9010012 -:1041200003D00F9800F0E8FEFDE53D480321001F95 -:104130000170002E0AD08088308010A8808870809E -:1041400010A80089B08010A88089F0800020EAE5DE -:1041500030B501248BB015460B46012802D0022849 -:104160001CD104E0684605218473C90203E02B4991 -:1041700068468473891E8181002B12D003210020A0 -:10418000890288430121890240186946888405AA6A -:1041900004A91846FEF7CDFD002804D007200BB077 -:1041A00030BD1020FBE76A46127C1D480092801E3D -:1041B00005A9FF3201910290FF32002303A80332C8 -:1041C000099902F040F9002802D0FEF76AFFE6E7FD -:1041D0001348001F002D01D0418829800470002061 -:1041E000DDE770B592B00446012608A886700F4935 -:1041F0006846018410AA08A93046FFF7A9FF0028E5 -:104200004ED12078064DC00700242D1F002849D02C -:104210001C2168460CE0000000C0010003280000DB -:10422000440C0020030200000329000001180000D4 -:1042300016F066FE6846017820200143684601704A -:1042400008A88670F9496846018411940794817F13 -:10425000F92001406846891C8177002001466846A4 -:104260000177002001466846417704218185C48595 -:10427000018607A80A9011A80D9008A809900EAA17 -:1042800009A96846FFF72FFD002809D16846008F6D -:10429000E8806846808F2881401C68812C7000204F -:1042A00012B070BDEC802C8110A80088F4E7F7B53F -:1042B000DF4900260A789EB0012A04D0022A02D0E3 -:1042C000082021B0F0BD4A88824201D00620F8E7DC -:1042D0001F98824201D10720F3E7012210A98A75B5 -:1042E000D4488882002003239B020146994393020D -:1042F000CB1810A90B8669468A81CF4ACA8118A9B2 -:10430000887110A9888419A904916946CA82069007 -:10431000FF20087503A802F06AF900242546274605 -:1043200008AA052103A802F065F9002810D0822808 -:104330006FD1002C6FD0002D6DD010A88480C58067 -:104340000021017418A8807B11AC012865D06DE0B4 -:1043500008A88079002F21D0012857D16846818C88 -:10436000B44881421CD113AA0DA905206B4607C38E -:104370006846408C10230022FF2102F0ADF900288E -:1043800068D110A88089042801D006284CD168463D -:10439000818E1F98814239D10F2092E7012835D1B3 -:1043A0006846808C0521C902884202D0491C884297 -:1043B0002CD19F4841886846408C814201D1012719 -:1043C00000E00027002C01D0002D10D01F9988425A -:1043D0001CD113AB0DAA05216E460EC60446102350 -:1043E0000022FF2102F078F9002833D101E03546A0 -:1043F0000CE010A88089022801D0102814D1C0B286 -:104400001BAA0DA9FEF76FFC00280DD16846468C4B -:1044100086E71FE0FFE7052053E714A91BA8221D2C -:10442000FEF787FC002801D003204AE710A8007C93 -:104430000023001DC2B210A80274209802900194BB -:10444000009215A81C9901F0FEFF002802D17849BE -:1044500002220A70FEF725FE33E710B50B46401E18 -:1044600086B084B203AA00211846FEF743FF04AACF -:10447000052103A802920191009001230022FF214F -:10448000204601F045FF04466846008A012804D012 -:104490006D206A49000116F05EFE2046FEF701FE1F -:1044A00006B010BDF0B5624F0446387887B00E46AE -:1044B000032804D0042802D0082007B0F0BD04AAC5 -:1044C00003A92046FEF7EFFE0500F6D1606880786C -:1044D0004007800F02280DD1684680898004800F34 -:1044E00008D02069002805D055490968884201D2C2 -:1044F0001020E2E7208905AA6B46216907C36946B7 -:104500000A8A63892068039901F09DFF002802D080 -:10451000FEF7C7FDD1E7002E02D06846808A3080C2 -:10452000042038702846C8E738B50C00054609D085 -:1045300000236A46FF2102F031F9002804D0FEF77B -:10454000B0FD38BD102038BD69462046FEF755FE47 -:104550000028F8D1A078FF21C307DB0F2846009A76 -:1045600002F044F9EBE73EB50C0009D002AB6A4615 -:10457000FF2102F013F9002804D0FEF792FD3EBDA2 -:1045800010203EBD0321204616F0B8FC6846008886 -:1045900001A90005800FFEF71CFE00280BD168461C -:1045A000007920706846008801A98004800FFEF71A -:1045B00010FE002801D003203EBD684600796070DF -:1045C000A278EF20024068460088C10B09010A4327 -:1045D000F7210A404104C90FC9000A43A270F9211A -:1045E0000A40800601D5022000E001204000694613 -:1045F0000243097A50084000C907C90F0843A07058 -:1046000000203EBD7FB514460522019203AD029500 -:1046100000930A462388FF2101F07AFE69468989C2 -:104620002180FEF73EFD04B070BD0000052A0000A9 -:10463000400C002002280000FFFF0000FC380000B2 -:1046400028000020F3B5002799B068460C4607877C -:104650003D4600291DD0E068002806D0A06800284B -:1046600017D001886A4611870780199803F0CBFBA1 -:10467000002811D0007822287ED3199800F038FC49 -:10468000009000220421199807F04EFB060009D182 -:1046900004E010201BB0F0BDFC48FBE7FC49FD48DE -:1046A00016F059FDA078012803D0022801D0072078 -:1046B000F0E72088002808D0401E80B203AA0099A5 -:1046C00001F069FF002859D11DE0F048401CE1E7E6 -:1046D0006946498A228891420BD26846807D00252E -:1046E000012810D16846808AEB4988420BD1012508 -:1046F00009E0914203D1002D2AD06D1C01E0022D6A -:104700000BD0032D04D203A801F04EFF0028DFD008 -:1047100082281BD0002831D11DE06946897D0129FE -:10472000F1D16946DC4B8A8A5B1ED11A9A420FD0BE -:1047300005DCDA48101A0BD00128E4D108E0012981 -:1047400006D0FF390129DED10325E1E7022D15D17D -:104750000D2080029EE7E068002816D00EA90522F1 -:1047600002910192009069460B8FA2882088FF2158 -:1047700001F0CEFD002800E01DE002D0FEF791FC24 -:1047800088E76846A168008F08806846008AC006EE -:1047900001D5C3487EE70798002803D06846008B00 -:1047A000022801D0032075E70798A1780078012935 -:1047B00003D0800710D408206CE7C007FBD000228C -:1047C0000721199807F090F8002802D00725022049 -:1047D00004E0AE48801C5DE70225032008A90870AC -:1047E000218868468185199808360A90099617210C -:1047F0006846818712AB02330FAA052108A80097EB -:104800000CF0DBFF002802D0FEF7B7FC42E710A84F -:1048100000906846838F04222946199806F085FD8A -:1048200038E770B5064615460C460846FEF7F6FB17 -:10483000002804D12A4621463046FFF789FCF3E6DA -:1048400010B5FFF734FD10BD70B51E4614460D00BF -:1048500014D0002C12D0616800290FD00121FEF77E -:104860004CFE002809D12068FEF7D8FB002804D1AF -:10487000324621462846FFF736FAD5E61020D3E621 -:1048800070B515460C000ED00221FEF736FE00284A -:1048900008D12068FEF7C2FB002803D12946204634 -:1048A000FFF700FEC0E61020BEE6F8B506467D48DC -:1048B0000D46016814468A4231D36068002808D04A -:1048C000794A90422BD301229204904201D388422C -:1048D00025D37648864204D0304603F094FA002867 -:1048E0000CD0304600F004FB0646284600F0BDFA26 -:1048F000002804D16068002802D012E06348F8BDA7 -:1049000000236A463146284601F048FF002802D0BD -:10491000FEF7C7FBF8BD68460088800601D410206A -:10492000F8BD6188224628466368FFF76BFEF8BD34 -:10493000F7B55C4E0746306886B01446824202D214 -:10494000102009B0F0BD384600F0D2FA05465748AD -:10495000874201D0FF2D08D0002304AA29460798DA -:1049600001F01CFF002826D101E04848E9E768462D -:10497000008AC00601D54A48E3E703A90020029156 -:104980000527019000976288484B2946079801F057 -:10499000A3FE00280FD161683268914208D30191CB -:1049A00002900097238862882946079801F094FEB8 -:1049B000694689892180FEF774FBC2E7002907D088 -:1049C0003B4B0A881B899A4202D83048401C7047EA -:1049D00038E610B586B004236C46A382344BDC88DD -:1049E000002C07D01B898B4201D2914204D9274861 -:1049F000401C55E5062053E56B4619825A8200217A -:104A0000009101911C800221997005A9029104A9CD -:104A100003916946FFF716FE42E5F3B50C4685B0F3 -:104A2000812069460873002C1AD0059803F0EBF931 -:104A3000070017D03878222868D3059800F058FA74 -:104A4000049000220121059806F04EFF00280BD0AB -:104A500000220421059807F067F905000AD105E056 -:104A600010202AE5094828E5112026E508491148C3 -:104A700016F071FB284608300CF0F6FA064620784E -:104A8000012819D0022838D0072016E5023000008E -:104A9000FC380000E10800000328000000280000A6 -:104AA000013400002800002000C00100FFFF0000CA -:104AB000400C0020840A0000A18803AAFEF728FB0E -:104AC0000028CED1B00721D56846007B00281FD131 -:104AD000A079C0071CD0E068002205216B4607C3FF -:104AE000638922896888049901F012FC6946087379 -:104AF00000280DD0FEF7D5FADFE4A18803AAFEF75F -:104B000007FB0028ADD13420064201D10820D4E4AF -:104B10006846037B29463846059AFEF717FDCCE424 -:104B2000FFB597B0002001901F4615460C460E4673 -:104B3000179803F068F9002804D00078222803D2DF -:104B40000820A7E5F348A5E5B80801D00720A1E5AE -:104B5000032F00D10027179800F0CAF90890002C05 -:104B60001BD0022D77D3EC48006884427CD36119B6 -:104B70000091012902D0491E814275D3AD1EAAB20F -:104B80002146E6480DF0F0F800991E394A7F0B7F68 -:104B900011021943884267D1ADB2E148B90702D585 -:104BA0000189491C00E0012189B20091F90701D077 -:104BB000078900E0D94F03AA0899009801F0EBFC9F -:104BC0000DE0F078B1780002084310284CD8019924 -:104BD000091D401880B20190A84245D82618002E21 -:104BE00060D0707831780002084300998842E8D399 -:104BF00058E06946098A0A0754D5002C3FD0019A2B -:104C0000A618121D92B20992F278B37812021A43D2 -:104C10009446102A28D8099A6244AA4224D8727865 -:104C2000337812021A4390421ED1C8061ED5099845 -:104C30000AAA052120186B4607C370783178000254 -:104C4000084363460022089901F062FB002803D064 -:104C5000FEF727FA1EE507E0F078B1780002084376 -:104C60006946098D884201D00B2013E5F078B178B0 -:104C7000000208430999401880B2019006E0C90675 -:104C800004D50899FEF79FFC0028E3D16946088AFD -:104C90001021884369460882488AFF23049A0899AC -:104CA00001F0A4FD03A801F07FFC002803D16846B1 -:104CB000408AB8429DD900220421179807F034F8A1 -:104CC000040003D19749984816F045FA2088002837 -:104CD000C0D0012108A80170017300264673218805 -:104CE0006846018620460830099017980A90FCF71C -:104CF00039FE05001BD01798688017206946888008 -:104D000010AB023301AA052108A800950CF055FD4F -:104D100007466878000704D583488249223016F098 -:104D20001AFA002F09D03846FEF727FAB2E4132109 -:104D3000179804F04AFB0320ACE40EA800906846E4 -:104D4000838804220121179806F0EFFA00288CD1FD -:104D500026809FE4F0B500248DB01F4615460E4610 -:104D6000002A04D0B90804D007200DB0F0BD1020EF -:104D7000FBE7032F00D1002700F0BAF80390FF28CB -:104D800004D06749B80703D5488902E06148ECE7D9 -:104D90000120FA0702D04989491E00E05F4906AAAE -:104DA0008FB2039901F0F7FB38E06946898B090758 -:104DB00034D504AB05210022029300910192574B98 -:104DC000039901F089FC002821D1002E21D06A46E8 -:104DD000128A2988A2183019121D914234D36946CB -:104DE000CA8B0270120A42700A8A8270120AC2705A -:104DF00004A90522001D0092029101906946C88B0A -:104E00000B8A0022039901F067FC002801D00320DF -:104E1000ABE76846008A2018001D84B206A801F09E -:104E2000C3FB002804D0822806D0FEF73AF99CE79D -:104E30006846C08BB842B8D9002C07D0002E10D0DD -:104E40002988A01C814203D20C208EE705208CE724 -:104E50002246314631480CF087FF31190870000AAC -:104E60004870A41C2C8000207FE700B585B06946FF -:104E7000FEF7ACFA00280AD16846007C030016F061 -:104E80008BFA08052F2F2F2F08080531032005B0B6 -:104E900000BD68468078012807D168460088032154 -:104EA000C902401A1CD001281AD06846807901280E -:104EB00006D16846808815214902401A05280FD975 -:104EC0006846807A012811D16846018929200002AC -:104ED000081A05D0022803D0032801D0042805D1E0 -:104EE0000F20D4E711A1164816F035F90020CEE7BF -:104EF00010B506F00FFF10BD10B50C4601F01EFBFB -:104F0000002803D009A10F4816F025F92046FEF726 -:104F1000C8F810BD0230000028000020FFFF00008C -:104F2000400C0020FC3800003F0B00007372635CF3 -:104F300067617474735F636F72652E6300000000B5 -:104F400022020000BB060000F8B500780C461646A9 -:104F500010340E36069F022809D0032836D00528C3 -:104F60007ED0FF20F6A1E53016F0F5F8F8BDCD892A -:104F70000A2068430E30188031203880002AF5D08E -:104F8000087B9581801FC7B21AE020886168308055 -:104F900048780A7800021043F080C8788A780002C6 -:104FA00010433081B21C3846091DFDF79CFE002FCE -:104FB00001D0002802D000203071708008340A36F9 -:104FC00028466D1EADB20028DFD1F8BDCD890A207C -:104FD00068430E30188032203880002AF5D0087BD4 -:104FE0009581401FC7B243E0616822880878F2804B -:104FF0003279C30752085200DB0F1A43FD231A40CF -:105000008307DB0F5B001A43FB231A404307DB0FC8 -:105010009B001A43F7231A400307DB0FDB001A43F8 -:10502000EF231A40C306DB0F1B011A43DF231A408C -:105030008306DB0F5B011A43BF231A404306DB0FD5 -:105040009B011A433271C00970718A784B78100243 -:105050001843308132463846C91CFDF744FE00E053 -:105060000CE0002802D00020B070308008340A36EE -:1050700028466D1EADB20028B6D1F8BD087BCD899B -:10508000801E86B2304608306843103018803420C5 -:105090003880002AF1D0174695811037E800D68174 -:1050A000C01900900DE02088388000987860324662 -:1050B0006168009815F0C5FE00980834801908371B -:1050C000009028466D1EADB20028ECD1F8BDFFB5AA -:1050D00081B00A9D1E460C46002A05D0607AFF303A -:1050E0000130D080E089108101980E2700780300FC -:1050F00016F052F90B7E0719293541536C787878F0 -:105100007E000092087B082805D0032803D091A1D7 -:10511000954816F020F8378030200FE000990020E5 -:10512000888105B0F0BD0092087B042804D08E4829 -:1051300088A1143016F00FF83780312028800098AD -:105140000028EBD1EDE70092087B042804D09320DF -:1051500080A1800015F0FFFF37803220EEE700923B -:10516000087B022804D080487AA13A3015F0F3FF7A -:1051700037803320E2E7087B1746042804D07A48BA -:1051800074A14C3015F0E7FF1020308034202880C7 -:10519000002FC6D00020B88116E0207B17460528D6 -:1051A00006D0062804D070486AA1603015F0D3FFFD -:1051B0001220308035202880002FB2D0E089B881BD -:1051C0000020388201984088F881AAE70092087B85 -:1051D000072804D064485FA1713015F0BCFF378008 -:1051E0003620ABE733460095019800F00AFC98E7BB -:1051F0002F2053A1000115F0AEFF92E770B50C46C9 -:10520000054602F000FE002804D00078222803D2D0 -:10521000082070BD554870BD00220521284606F0C3 -:1052200083FD2060002801D0002070BD032070BDE8 -:10523000FFB58BB00D4607461720694608850E98C6 -:1052400003261446002805D10EA93846FFF7D6FFDD -:10525000002834D1002D0BD000220321384606F05F -:1052600043FB002834D00E980078002830D108E0A5 -:105270002078092819D00F2823D031A13C4815F0F7 -:105280006AFF0E98A760801D03AA606002320AA917 -:10529000204600F00CFC002827D0030016F07CF814 -:1052A000071A182323211C1E23000726002231463B -:1052B000384606F019FB0028E3D12C48801C0FB0BB -:1052C000F0BD00220321384606F00EFB0028D8D19D -:1052D0001120F4E70020F2E70820F0E72348401C03 -:1052E000EDE70720EBE70320E9E701A80090684617 -:1052F000038D04223146384606F017F80028DED127 -:10530000002DDCD00E990D70D9E730B587B01D4661 -:105310000C46002A11D0042369460B7013888B8138 -:105320005288CA81A2788A7422880A8200236A4637 -:105330002946FFF77DFF07B030BD1020FBE70000D6 -:105340007372635C67617474635F636F72652E630D -:10535000000000007372635C67617474635F636F65 -:1053600072652E630000000025020000023000007C -:105370004F030000F3B581B001980C460078082671 -:10538000030016F009F8125E46461B134A0A0A0A81 -:105390000A0A0A0A0A0A0A0A0A5E002C02D1F64917 -:1053A000F64808E06078304360703BE0002CF9D1AB -:1053B000F248F149083015F0CEFEF3E701980022DB -:1053C0008088052187B2384606F0AEFC0546002CE1 -:1053D00004D07520E849C00015F0BDFE002D04D1B1 -:1053E000E648E549143015F0B6FE3946A81D00F030 -:1053F00055FBFCF7B7FA040006D0607830436070C4 -:105400006780FCF790FA0FE01321384603F0DDFFC8 -:1054100015E0DA48D849283002E0D848D6492D307E -:1054200015F099FE002C0AD06078000707D593206C -:1054300020702046582208300199FBF7C5FE002055 -:10544000FEBDCE48CC493130EAE710B500210170ED -:10545000801D00F020FB10BD0A4610B50146901DCE -:1054600000F024FB10BD70B505460022052106F0B2 -:105470005BFC040004D1F920BF49800015F06BFEED -:105480002946A01D00F00AFB70BDF7B5054684B0A3 -:105490000C4600206946088188806F8802460521F5 -:1054A000384606F041FC060004D1FD20B2498000D8 -:1054B00015F051FE002C03D0A7800020E080208151 -:1054C000297A20461230C91E142700900B0015F0CF -:1054D00063FF0FFDFCFB3809A95E657A2FB2C9E9AD -:1054E0009191FB003078012804D0A3497020143139 -:1054F00015F031FEA9896A46C8000E309080302030 -:105500001081002C13D0A18100200DE0C100327960 -:1055100009190A747288CA8182005319DA894A8289 -:105520001A8A401C8A8280B2A1898142EED8F1E0B9 -:1055300002A8009001AB22462946304600F02AFA24 -:10554000E8E03078042804D08B49BD20143115F0F0 -:1055500002FEA8890622014650436A460E3090801A -:1055600033201081002CE2D0A18100200BE0062125 -:1055700041434F190919FA89CA81BA7C8A743A8A57 -:10558000401C0A8280B2A1898142F0D8C2E0307802 -:1055900006280BD078491431D72005E0307806284A -:1055A00004D07549EB20143115F0D5FDE889694622 -:1055B0001230888035200881002CB8D0A989A181BB -:1055C0007188E18126E03078072804D06A49FF20FD -:1055D000143115F0C0FDA8896A4601460E3090804E -:1055E00036201081002CA2D0A1812046AA890E303D -:1055F000296954E0E8896946123080B238228880EF -:105600000A81002C7ED0A989A181287A102807D090 -:105610000221A173E9892182EA89296900983EE083 -:105620000121F6E702A8009001AB22462946304648 -:10563000FFF78AFC6EE03078082805D04E49FF203D -:105640001431EE3015F087FD6846372187800181DF -:10565000002C5FD0A989A1810020608220820120D6 -:10566000A07357E03078092805D04349FF20143152 -:10567000FF3015F070FD288A694614308880372085 -:105680000881002C46D00421A173A989A181E98950 -:105690002182298A618220462A8A1430696915F09C -:1056A000D0FB37E030780A2804D03349344814312D -:1056B00015F051FD6846372187800181002C29D0E3 -:1056C0000521A173002002E01FE004E00DE0A081AD -:1056D000208260821EE002A8009001AB224629468B -:1056E0003046FFF7F4FC15E00CE00D206946392246 -:1056F00088800A81002C05D00120E08000202081D4 -:10570000207307E00699088019E01C481A49A43064 -:1057100015F021FD6846069980880880002C0ED07F -:10572000684600892080684680886080287A03283F -:1057300005D0102803D0112801D00020307000209F -:1057400007B0F0BDF7B5568815460F4682B0002267 -:105750000521304606F0E8FA040004D1074806495E -:10576000C43015F0F8FCA41D33462A46394600948F -:10577000029800F022FBD4E440530000950300009F -:1057800013020000F7B58CB00D46144607A90C981B -:10579000FFF734FD002812D1B64E0127002C0FD0A0 -:1057A0000321684601701021818208A802460690F4 -:1057B000204605A9FDF7BDFA00280BD007207EE59D -:1057C0000821684601708581C68105218774C90258 -:1057D00001820BE00798A178017121884180684619 -:1057E00005218774C90201828581C6810246012193 -:1057F000079B0C98FFF71CFD61E508B501236A467D -:1058000093709D4B13800A4602236946FFF77DFD86 -:1058100008BD08B501236A469370974B5B1C138043 -:105820000A4603236946FFF770FD08BD00B587B03F -:1058300000290CD002236A4613700B889381498893 -:10584000D18100230421FFF7F3FC07B000BD102035 -:10585000FBE710B5002903D00523FFF756FD10BD67 -:10586000072010BD70B588B00D461446064607A93E -:10587000FFF7C4FC00280DD1002C0DD0062168468E -:1058800001708581C481079B02465C8006213046F9 -:10589000FFF7CEFC08B070BD052168460170858118 -:1058A000F1E710B588B000290BD007246B461C70B7 -:1058B0009A81049100236A462146FFF7B9FC08B09B -:1058C00010BD1020FBE770B50024172288B0002916 -:1058D00014D00D782B0015F05FFD06230505190483 -:1058E0001B231522D21E93B2CA88002A02D08E68CA -:1058F000002E03D09A4203D90C20CBE71020C9E731 -:10590000042D05D08A88002A0AD101E00620C1E7CB -:10591000012D11D0022D05D0042D18D0052D23D036 -:105920000720B7E709236A4613704B889381CB8819 -:10593000D381896804911DE00C236A4613704B885B -:105940009381CB88D38189680824049112E00D23C8 -:105950006A4613704B8893818B88D381CB881382DE -:1059600089680924059105E00E236A461370497879 -:1059700011730A2400232146FFF75AFC8AE700B579 -:1059800087B00F236A461370918100231946FFF7F1 -:105990004FFC5AE7FEB50078089D1C4616460F4698 -:1059A000012803D03549912015F0D5FBF889C000B6 -:1059B0000E30208030202880387B001FC0B201903C -:1059C000002E1DD0F889B081002516E0E80084196A -:1059D000C0190090224641690E320198FDF783F903 -:1059E000002802D000202074E08100986D1C008AFD -:1059F00060820098ADB2408AA082B089A842E5D802 -:105A0000FEBD70B514461425049A1D8037231380FB -:105A1000002C0ED0CA89A281002262820078082858 -:105A200008D0092810D00A2819D01449144815F0B4 -:105A300092FB70BD087B0C2804D011480F490C382C -:105A400015F089FB012008E0087B0D2804D00C48E4 -:105A50000A49083815F07FFB0420A07370BD087B4D -:105A60000E2804D006480549001F15F074FB0520D8 -:105A7000F3E70000FFFF000002280000545300007D -:105A8000BB02000010B5FE4B586019721A80C900A5 -:105A900015F036FA10BD00210180704710B50022C4 -:105AA000D2430280032006F0A8FD10BD7047F0B578 -:105AB0000E460446017801208840F24999B008401A -:105AC0000090616815460888EF4A904206D0009A17 -:105AD000002A06D0EB4A521E104202D0012019B013 -:105AE000F0BD009A10430880002D12D000202870CD -:105AF0002178EA1C0027681C01920B0015F04CFC71 -:105B000010F30E16233A59616F3CB4B08AB8F2F123 -:105B1000F0F320780B28EBD00420E0E70221297075 -:105B2000A1890170090A4170032097E004212970BE -:105B3000A1890170090A41700198E1890170090A7F -:105B4000417005208AE006212970A1890170090AA7 -:105B500041700199E2890A70120A4A70218A017122 -:105B6000090A4171A28AE81DA16915F06AF9A08AA3 -:105B7000C01D73E0082129702178082901D1102166 -:105B80002970A1890170090A41700198E1890170A9 -:105B9000090A41700520308020466A1D02A9103094 -:105BA000FDF7C7F800287DD169463088097A40188A -:105BB00054E00A212970A1890170090A417003206B -:105BC0000BE00C212970A1890170090A417001982C -:105BD000E1890170090A4170052030809CE0A089AC -:105BE00084464000401C81B2308888425AD305293F -:105BF00058D30E202870002008E0236942009B5AE9 -:105C0000521953701B0A401C937080B26045F4D344 -:105C10003180B9E09A48417A002973D0491E417217 -:105C2000217B4068C9004518A988286808224018C7 -:105C30000838216915F005F9022168460171002133 -:105C4000417128680390A98868460181002101A854 -:105C5000FFF790FB0020A880002E00D0308093E05A -:105C60002978802211432970297840221143297014 -:105C700029788909890112312970A1890170090ADD -:105C80004170E289E81C216915F0DBF8E089C01C4D -:105C90003080287841063FD5C00975D0012168467B -:105CA000017200E02CE0002141723188091D8181E0 -:105CB0000495E189019808180590001D0690704828 -:105CC000017A68460177002102A8FFF753FB0746D7 -:105CD00030880C303080022F06D0002F54D065E081 -:105CE0003DE033E01CE05EE065486946097F4268BC -:105CF000CB00D218037A994202D29188002902D0AF -:105D0000042753E02FE0417A491C41721560308826 -:105D100090800020308049E06168A089888033E06D -:105D200029788909890116312970A1890170090A28 -:105D300041700198E1890170090A4170228A681D49 -:105D4000616915F07EF8208A401D46E728788009B1 -:105D5000800118302870207B687002207EE7606820 -:105D60000188090401D4052720E0C088A189884260 -:105D700001D006271AE01E202870012030806068BC -:105D800001884904490C0180009800280ED03C4845 -:105D900000220088A1688300032006F087FB616869 -:105DA0002078887007E00020308003276068009921 -:105DB00002888A430280384691E6FFB59FB0289D4D -:105DC0000E46002805D0172803D82A882E4B9A4261 -:105DD00002D1072023B0F0BD3278530601D4D20996 -:105DE00001D00820F6E700226B461A715A7114465A -:105DF0003278431E1D939BB2189303AB1A939706F8 -:105E0000CB1CBF0E1B93821E711C3B0015F0C4FA05 -:105E1000209011EE66EE74EEB0EED4EEEDEEECEE08 -:105E2000EBEEEAEEE9EEEEEEE8EEE7EEE6EEE5EEBC -:105E300090EE05287CD1042168460171A978017291 -:105E4000F078B2780102114368464181317941719D -:105E500070788006800E0C282ED009DC801E03008E -:105E600015F09AFA0919661C6621662466276600F1 -:105E700012282AD00ADC0E2821D01028DAD121E0FD -:105E80004C0C0020FF710000FFFF000016281FD0FF -:105E90001828CFD11FE02878800701E02878400734 -:105EA000002845DA45E128780007F9E72878C00698 -:105EB000F6E728788006F3E728784006F0E72878A8 -:105EC0000006EDE72888C005EAE72888C004E7E770 -:105ED00028888004E4E728884004E1E72A789207CC -:105EE00026D50328A6D105206A461071487809787E -:105EF0000002084310811CE129784907F0D50628E3 -:105F000016D3717890B2012902D0022992D101E012 -:105F1000022100E01021189106216A46117100212A -:105F2000118102AF189AB11C0237921C1B921AE021 -:105F3000B3E04A780B7812021A433A80801E891C1B -:105F40001790BA1C1A911898FCF7CDFE1A99189858 -:105F5000189A091817986B46801A1A8980B2521C31 -:105F60001A811B9ABF1D8242E3D9002886D1E0E046 -:105F700028780007B4D51D98694682B207200871B9 -:105F800000200881701C0A3111E0437807781B0259 -:105F90003B430B80C37887781B023B434B806F46A3 -:105FA0003B89121F5B1C001D92B23B81091D042A14 -:105FB000EBD2002A71D1BCE02978C9066DD5022840 -:105FC0006BD30820694608710020488170780872F8 -:105FD000844692B2B01C1A9919E089E090E07EE004 -:105FE00067E05BE030E025E019E013E0BCE04378D7 -:105FF00007781B023B430B80831C4B606346D21A1D -:106000006F467B8960445B1C92B27B81083194456A -:10601000EDD9CEE7287880063FD5092203E028781D -:1060200040063AD50A2268460271AA880281189A67 -:10603000428107E0287800062FD50B206A461071B0 -:1060400018981081039174E02988C90525D5022884 -:1060500023D30C20694608710020488170780872AB -:10606000844692B2B01C1A9914E0437807781B0258 -:106070003B430B80C37887781B023B434B80031D57 -:106080004B606346D21A6F467B8960445B1C92B2B8 -:106090007B8108319445E8D98BE763E02988C904FE -:1060A00060D501285ED10D2168460171A988018162 -:1060B0003FE02988890455D5052853D30E22694627 -:1060C0000A71AA880A811B99401F4A78097812022E -:1060D0000A4369464A818881701D049029E0298815 -:1060E00049043FD501283DD10F206946087120E0C1 -:1060F0002A88120436D44A780B7812021A43EA80AE -:1061000003282FD332789206920E1B2A26D0112212 -:106110006B461A712A880123DB031A432A804A78C6 -:10612000097812020A4369460A81C01E48811B98F9 -:10613000039030788006800E1B2809D01D2807D0D8 -:106140000320229906F059FA2888C00BC003288042 -:1061500001A82199FFF70EF920463BE610226B4675 -:106160001A71DCE70724F7E70824F5E700B597B0D4 -:10617000032806D16A461070019100216846FFF796 -:10618000F9F817B000BD000010B58B78002B11D0C6 -:1061900082789A4207D10B88002B0BD003E08B79D1 -:1061A000091D002B08D08B789A42F8D103880C88FF -:1061B000A342F4D1002010BD812010BD052826D0B7 -:1061C000002A02D0012A0DD102E00988090501E068 -:1061D00009888904890F07D0012918D0022909D01C -:1061E00003290ED081207047002A01D00320704778 -:1061F0000220704703280AD0042808D0002804D0C1 -:1062000007E0042803D0022803D0052070470020AF -:1062100070470F20704770B51388054614460B80F1 -:1062200018061DD5FE481022807AA84203D81343D1 -:106230000B80002070BDA06893430078E840C00741 -:10624000C00E03430B802078A1788007800D08439F -:10625000F44914F05FFEA06869430818401C70BD43 -:10626000906870BD37B569468B88138019061BD5B9 -:10627000EB4C0125A47A9168844209D8FE280FD1FD -:10628000D80602D5A5406D1E00E000250D7007E080 -:1062900085400C78DB06DB0FAC4383401C430C705D -:1062A00010881021884310803EBDF8B50746C81CF1 -:1062B00080080E468000B04201D08620F8BD082A32 -:1062C00001D90E20F8BDD64D00202E60AF80288168 -:1062D000AA723446E88016E0E988491CE980810604 -:1062E00010D48007A178800D0843CE4914F012FE27 -:1062F000206800F0BAFA2989401880B22881381A3B -:106300008019A0600C3420884107E5D40020F8BD36 -:10631000FFB589B09F041646139DBF0C01930998E1 -:1063200000F095FA04000AD02078000609D5BC4890 -:10633000817A0A98814204D887200DB0F0BD0120EF -:10634000FBE7224669460A98FFF765FF06900020A2 -:1063500069460872052D14D0012221462846FFF710 -:106360002DFF0028E9D1207840060AD50221684691 -:106370000172099981810188C18106824782129840 -:1063800005900198000404D500273E460125079793 -:1063900009E02078A1788007800D0843A149079083 -:1063A00014F0B8FD0D46019840040AD50798A8429C -:1063B00007D12088E1788005800F00020843B042B1 -:1063C00001D3AE4201D90720B7E7B81980B20190D6 -:1063D000A84201D90D20B0E76846007A002804D011 -:1063E00002A8FDF718F90028A7D10798A8420BD1F9 -:1063F000208803210902884301998905890F090230 -:10640000084320800198E0701498002800D007808D -:106410001298002815D006983A468019129914F05F -:1064200010FD224669460A98FFF7F5FE694608887E -:106430001021884369460880224600990A98FFF790 -:1064400011FF002079E7FFB5754D0C22E888296817 -:10645000504383B00C180D9F7249059814F05AFDF3 -:106460000091049800F001FA29682A898E46611A81 -:106470000C310918944651188AB2A988914202D861 -:10648000842007B0F0BD6A46168A320603D5B206EC -:1064900001D58520F5E7EA88521C92B2EA800E9B6E -:1064A000002B00D01A80B20601D5A76006E0604438 -:1064B00080B22881091A70460818A0602246FE2082 -:1064C0000499FFF7CFFE0598A0700098E07020882F -:1064D0000599800889058000890F08430321090276 -:1064E000884300998905890F09020843042108435C -:1064F000208003988078A07103980088A0800020F5 -:106500002073310601D5AC7A00E00124B10600D534 -:10651000002700260EE0052100200191029000973F -:10652000E88831460C9B069AFFF7F2FE0028A8D1B6 -:10653000761CF6B2A642EED30020A2E7F1B5009891 -:1065400000F085F9060002D00025009C14E001202F -:10655000F8BD204600F07BF90746007831498007F6 -:10656000820DB878104314F0D5FC386800F07DF93E -:106570004019641C85B2A4B22948C188601E8142BA -:10658000E7DC00992648491EC1800189491B018129 -:1065900000203070F8BD002804D0401E108091709B -:1065A000002070470120704710B5044601881C4840 -:1065B000C288914201D3822010BD00680C22514351 -:1065C00042189079A072908820811088D178800537 -:1065D000800F00020843A081A078211DFFF71BFE59 -:1065E00020612088401C2080E080002010BD012117 -:1065F00001827047F7B50546002084B0C043108083 -:1066000068681746817868468170686801886846BE -:10661000018000218171288A2C88A04205D303E0E3 -:10662000580C00200102000004462C8235E0288A24 -:10663000401C2882301D6968FFF7A6FD00282AD17A -:1066400039889248814201D1601E38806888A04212 -:1066500028D33088F1788005800F0002084302902B -:106660006946301DFFF790FD002814D169898748DD -:1066700081421BD0002231460598FFF79FFD00287C -:1066800009D16A890298824205D1E968B06814F09C -:10669000ABFB00280AD0641CA4B2204600F0D7F857 -:1066A0000600C4D1641E2C828220EAE67C80B07988 -:1066B000B871B088B8803078B1788007800D084311 -:1066C00078810298B8813946287A32460831FFF736 -:1066D000A2FD38610020D4E6FFB585B01C460F4608 -:1066E000059800F0B4F8050009D02878000608D510 -:1066F0006748807AB84204D8872009B0F0BD0120ED -:10670000FBE707982A468605B60D69463846FFF727 -:1067100082FD07460E98052816D000222946FFF76D -:106720004DFD0028E9D1287840060DD501216846A5 -:10673000017105990181018841818681C48101A887 -:10674000FCF769FF0028D8D12888AA788107890D2D -:1067500011438005800FEA7800021043079A9642A1 -:1067600007D04C4A914204D3611E814201DD0B20C7 -:10677000C3E7864201D90720BFE7801B82B2A2424D -:1067800000D922461098002800D002800F980028D7 -:1067900002D0B91914F055FB0020AEE7F8B51D463C -:1067A00017460E4600F053F8040008D02078000683 -:1067B00007D53748807AB04203D88720F8BD01203A -:1067C000F8BD224639463046FFF725FD002D0BD097 -:1067D0002078A1788007800D08432E49884201D295 -:1067E000012000E0002028700020F8BDF8B51E460A -:1067F00017460D4600F02BF8040008D0207800065C -:1068000007D52348807AA84203D88720F8BD012005 -:10681000F8BD224639462846FFF724FDFF2E14D046 -:106820002588A178A807800D08431A4914F072FB47 -:10683000002E03D1FF31FF31033189B2A170A808C6 -:1068400080008905890F084320800020F8BD104989 -:10685000CA88824207D3002805D00C220968504319 -:106860000C38081870470020704703B50846694681 -:1068700009888A0607D4090604D50549897A41435F -:10688000491C88B20CBD00200CBD0000FFFF0000B9 -:10689000580C002001020000F8B507780D460446A8 -:1068A000012F19D0072F02D00C2F19D114E0A068A6 -:1068B000216906780B2E0BD0052005F09EFE052ED3 -:1068C0000ED0782300220520216905F0EFFD07E0B6 -:1068D000782300220620F8E70520216905F08DFEC7 -:1068E000002D0ED0002028702946204603F0E2F942 -:1068F000FE482978C05D884201D10320F8BD0220FE -:10690000F8BD0021204603F0D5F90020F8BD70B590 -:106910000E460C462036317901208AB015460029F2 -:1069200009D0012905D12978042902D10520107048 -:1069300000200AB070BD6068019005A802900D218A -:10694000C01C14F0DBFA032205A8A16814F079FA40 -:1069500001203071062069460870206A049029469B -:106960006846FFF799FFE4E770B50C4615462031FD -:106970000A790120062686B0002A2CD0012A28D1C7 -:106980002978042925D169681022A06801F0B5F999 -:106990006868C07B000606D5D44AA0681023103A68 -:1069A000014601F09FF91022A168E06801F0A5F905 -:1069B000A068C07B000606D5CC4AE0681023103AD8 -:1069C000014601F08FF92E70A0686860E068A86049 -:1069D000002006B070BD60680190C4482038029065 -:1069E0000120087168460670206A049029466846AE -:1069F000FFF752FFEDE7027B032A06D00022242393 -:106A00005A540B78092B02D003E0042070470A7611 -:106A1000CA61027B9300521C0273C150032070476D -:106A2000F0B50E4615460C46203602463179012057 -:106A3000072393B000290CD0012924D002292ED09D -:106A4000032904D12978042901D12B70002013B027 -:106A5000F0BD01203071606800280DD0A1690B7075 -:106A600060684860206988606069C860206A086260 -:106A70001046FFF7C0FFEAE706202870206968602B -:106A80006069A86009E029780629E0D10220307108 -:106A9000042028709548203868600320D7E72978BB -:106AA0000429D4D1A08910280AD9103880B2A08135 -:106AB000A1681023091805A86A6801F013F923E0FA -:106AC00010282FD0C2B21020801AA1680DAF1190EB -:106AD000C01914F0B6F911980006000E06D0401E39 -:106AE000C1B280207854384614F008FA6269102345 -:106AF0000DA909A801F0F6F8102309A905A86A68EC -:106B000001F0F0F8032030716068019005A8029050 -:106B1000062069460870206A049029466846FFF7F7 -:106B2000BBFE94E710232269A168E2E7F0B50E46A8 -:106B30000C4620363179012006278FB015460029F2 -:106B40000BD0012932D0022905D12978042902D19C -:106B50000820107000200FB0F0BD217D08A8CA07E2 -:106B6000D20F02718807C10F08A801716846027030 -:106B700041700722801CE16814F063F902A8072223 -:106B80000130216914F05DF9606805900AA806904B -:106B900010236A46A16801F0A5F80120307168460B -:106BA0000774206A0890294604A820E0297804295F -:106BB000D1D1062205A8E16914F043F906A80622FE -:106BC0000230A16914F03DF900200890606801903E -:106BD00009A80290102305AA696801F083F8022031 -:106BE000307168460770206A049029466846FFF7AE -:106BF00053FEB0E770B50D460C46203529790120CB -:106C00008CB01646002909D0012905D13178042914 -:106C100002D10920107000200CB070BD6068019096 -:106C200006A802900822E16814F00BF9082208A8CF -:106C3000A16814F006F90120287106206946087041 -:106C4000206A049031466846FFF726FEE4E770B5F7 -:106C50000D460C462035297901208CB016460029B6 -:106C600008D00129D8D131780429D5D10A20107053 -:106C70000020D1E76068019006A802900822A16870 -:106C800014F0DFF8002008900990012028710620F8 -:106C900069460870206A049031466846FFF7FCFD9B -:106CA000BAE730B50B4620331C7901208BB0002C9D -:106CB00009D0012C05D11178042902D10B201070C4 -:106CC00000200BB030BD4868019005A802908C6888 -:106CD00068462578057564784475CC68257885758F -:106CE0006478C47500200690079001E0E4B30100C9 -:106CF000089001201871062368460370086A049002 -:106D000011466846FFF7C8FDDBE770B50C46203436 -:106D1000034625790120002D0AD0012D14D0022D23 -:106D200005D111780A2902D10C201070002070BD05 -:106D300001202071C868052202704A684260F84A42 -:106D40008260921CC2600BE015780B2DEFD10220FF -:106D50002071C86804240470526842608A688260A6 -:106D6000096A016201461846FFF745FE70BD30B55D -:106D7000011D02463132947803258379ED432C437B -:106D800023408371DB070DD04B79547923404B713D -:106D90000B79127913400B718278C9788A4200D935 -:106DA000817030BD00224A710A71F5E7F7B50C46D3 -:106DB00086B00020694626460870203631790127C2 -:106DC0001E2015461F2977D24B007B449B885B0011 -:106DD0009F441E0017023E025602690288029A0270 -:106DE000D102F5022E03590371037F03AE03C303DF -:106DF000CC03F7031A0464049A04AB04DF04FE0412 -:106E000010052A0565059B05C605830587058B05C5 -:106E10006069002802D0007813287DD0A068059012 -:106E2000002849D0012168460170206A049003219E -:106E3000684601710A214171E069029020790028B9 -:106E4000EFD0059909780029E7D00C2964D20B000E -:106E500014F0A2FA0CFD1A4B90B5E8FCFBFAF9F815 -:106E600007FD022828D16069002802D00078082890 -:106E700052D1022168460170206A04900598417839 -:106E8000684601710021B9E20620216A05F0B5FBD0 -:106E900020790728E6D1606900F051FF02280CD064 -:106EA000606900F04CFF042807D060690028B8D062 -:106EB00000780128D6D103E01BE261690120087047 -:106EC00005980079C11F0A2901D30A2050E06169A1 -:106ED0000722887060690599303013F0B2FF0120F5 -:106EE000307161690320087034E00728BAD1606905 -:106EF000002896D001780929B4D10599C978890765 -:106F000007D1059949790029DFD1059989790029A7 -:106F1000DBD105994A7900E04EE2014620314B7DF4 -:106F20009A43D2D1059A8B7D92799A43CDD1059A15 -:106F30001279D31F0A2BC8D20979914236D8072279 -:106F4000C01C059913F07DFF0120307161690A2092 -:106F50000870032069460870206A04906069313027 -:106F600001906069001D029060691C300390A1E2ED -:106F70002076F2E311288DD1606900F0E0FE04284C -:106F800004D0606900F0DBFE0B2893D1606905999D -:106F900010223730491C13F054FF6069017804292E -:106FA0007CD12421095C8278914201D90620DFE757 -:106FB000052101700320307168460170E2E3112859 -:106FC00094D1606900F0BBFE062804D0606900F02F -:106FD000B6FE0C288AD1E068002813D0206900286A -:106FE00010D060690178062910D00D210170606908 -:106FF000059910225730491C13F023FF6069573060 -:1070000009218CE100206946087072E107210170B6 -:107010006069059910224730491C13F012FF60691E -:107020004730EDE70228F0D1606900F088FE0028C3 -:10703000EBD0606900F083FE0128E6D0606900F0C3 -:107040007EFE05E0B1E08DE06CE02AE00AE0D6E0EB -:107050000828DAD00521684601710598417868460C -:10706000417146E11128D0D160690028CDD0017866 -:107070000E29CAD1C16A4078022810D000201422FB -:1070800050431430085805991022491C13F0D9FEBA -:107090000520216A00F041FE0F205EE0F1E10120B1 -:1070A000EDE70B28B1D160690028AED001780F2937 -:1070B000ABD1C16A4078022826D000201422504368 -:1070C0000C300958059842780A70807848706069D9 -:1070D000C16A4078022819D0002014225043103091 -:1070E000085805990822C91C13F0ABFE0520216A37 -:1070F00000F013FE60694178022909D000220832AD -:10710000825C5208520073E00120D7E70120E4E7D7 -:107110000122F4E7012100E0002108314254BCE3E0 -:10712000BEB3010011289CD16069002899D0017874 -:10713000102996D1C16A4078022811D0002014226B -:1071400050431830085805991022491C13F079FE55 -:107150000520216A00F0E1FD112061690870B4E3A7 -:107160000120ECE7082884D1606900289DD00178CF -:10717000112997D10599C06A49780170606905990C -:10718000C06A0622401C891C13F05BFE0520216AA0 -:1071900000F0C3FD60694178022904D00022083262 -:1071A000825CFD2323E00122F9E71128BBD160694D -:1071B0000028BBD001781229B5D1C16A40780228D5 -:1071C00019D00020142250431C3008580599102271 -:1071D000491C13F036FE0520216A00F09EFD60690F -:1071E0004178022909D000220832825CFB231A4030 -:1071F000022991D18EE70120E4E70122F4E707207C -:10720000B6E6287801288ED16069696814221C309E -:10721000F9F7DAFF6069017F002901D02176ACE33C -:107220000178032901D0032037E00227C770817954 -:107230004907490F8171017A4907490F0172417A63 -:107240004907490F41726069FFF791FD377196E276 -:1072500028780F28E3D1072069460870216A049135 -:10726000916802916946087161690722C91C0298F8 -:1072700013F0E7FD61690420087000203071BBE065 -:1072800028780328CBD1606901780529696807D07F -:107290000822473013F0D5FD0420307105206FE23D -:1072A00008225730F6E728780328B8D160690178BA -:1072B0000529696811D008224F3013F0C2FD05205E -:1072C00030716069006A00280AD00220287000200E -:1072D00028716069006AA860F9E008225F30ECE775 -:1072E00004204DE22878022899D12879002801D07D -:1072F000207642E36069A96801626069002901D1D2 -:10730000F949016206200BE228780F2887D1A86886 -:10731000E0616069017805292BD047300721317180 -:10732000E16802220A706269126A4A6088606069D4 -:107330003030C8606069C01C08616269087D926A6B -:10734000400812784000D207D20F104308756269D6 -:10735000926A521C8A61FD2210406269D26A1278D8 -:10736000D207920F104308756069C06A401CC8615B -:1073700053E25730D2E728780828BAD160690178FB -:1073800005291AD00B210170072069460870206A70 -:107390000490E069029011200871029803210170A5 -:1073A00051681022401C13F04CFD00216846FFF785 -:1073B00073FA00203071E06187E20621E3E7287864 -:1073C0000F2896D1072069460870206A0490A868A3 -:1073D00002901120087102980421017061690A78F5 -:1073E000072A0ED0002232710C220A706169102225 -:1073F000401C473113F025FD00216846FFF74CFA89 -:1074000063E21022401C573113F01BFD0021684637 -:10741000FFF742FA0A203071E168032008706069C2 -:10742000006A486060695730886060694730F3E1FE -:1074300028780828A1D1606969681022373013F0D4 -:10744000D3FC002801D0042092E560690078072869 -:1074500017D00A203071E168032008706069006A63 -:10746000486060695730886060694730C860206A4A -:1074700008620698FFF7BFFA07466069FFF777FCD6 -:107480006BE208207AE1287809289AD10B20307124 -:1074900061696868897810224018511A13F02EFD2E -:1074A000082069460870206A049068680190606945 -:1074B0008078087268E129780D29BBD161698979E2 -:1074C000C90703D00C20307109203EE0307103273A -:1074D00070E228780E28ADD160691422291D1C3075 -:1074E000F9F772FE6069018DC06A4172090A817202 -:1074F00060698178C06AC1716169CA6A081D117AC0 -:10750000C909C90111724379626919438378D26A42 -:107510009B079B0F012B00D0002300799B01C0002B -:1075200003431943117260694078012876D0B4E1B1 -:1075300060694178022901D0012100E00021083171 -:10754000405CC00707D00E20EAE069460870206A58 -:107550001146049019E11320B8E728780F2894D138 -:10756000A868E0610F2030710520EEE72878032835 -:107570008BD16069C16A4078022801D0012000E007 -:10758000002014225043103008580822696813F074 -:1075900058FC10203071E16806202269087060698B -:1075A000406A48606069C36A4078022801D00120BF -:1075B00000E000201427784310301858CA60886013 -:1075C0002BE128780C2886D16069C26A40780228AD -:1075D00001D0012000E00020142148430C30105855 -:1075E00002230932696800F07DFB11203071E168E7 -:1075F000052008706069006A48606069C06A0930E7 -:1076000088603948001F07E128780B28A7D16169F5 -:107610004878CA6A022802D0012001E059E100201E -:1076200014235843143010588A78696813F009FC01 -:1076300060694178C26A022901D0012100E000217D -:107640001423594314315258817850181022511A7A -:1076500013F054FC072069460870206A0490E06922 -:107660000290112008710298062101706169CA6AAE -:107670004978022901D0012100E000211423594357 -:10768000143151581022401C13F0DBFB00216846D6 -:10769000FFF702F90020E06112206FE028780F2840 -:1076A00091D1072168460170206A04909068029089 -:1076B0000B2268460271029801706169CA6A4978B2 -:1076C000022901D0012100E00021142359430C318B -:1076D00051580A784270497881706169CA6A49785C -:1076E000022903D0012102E0C4B3010000211423C8 -:1076F0005943103151580822C01C13F0A2FB00213D -:107700006846FFF7C9F826E760694178022901D089 -:10771000012100E000210831405C800703D51420DE -:1077200030710A2011E71620D0E628780F287AD188 -:10773000A868E061072069460870206A0490E06943 -:107740000290112008710298082101706169CA6ACB -:107750004978022902D0012101E011E1002114231E -:107760005943183151581022401C13F06AFB002174 -:107770006846FFF791F80020E061152030710A207B -:1077800069460870206A049029466846FFF784F825 -:107790002BE028780F2846D1072069460870206A18 -:1077A00004909068029008200871029809210170E5 -:1077B00061690622C969097841706169801CC969DB -:1077C000491C13F03EFB00216846FFF765F8AAE765 -:1077D00060694178022901D0012200E000220832CC -:1077E000805C400703D51720C8E70746B5E00129AC -:1077F00053D070E028780F2815D1A868E0611820D0 -:107800003071E168052008706069006A486060694D -:10781000C06A09308860F848C860206A0862069823 -:10782000FFF7E9F8E1E76FE028780B286CD1606991 -:10783000C16A4078022801D0012000E00020142213 -:1078400050431C3008581022696813F0FAFA0720D8 -:1078500069460870206A0490E0690290112008715E -:1078600002980A2101706169CA6A4978022901D027 -:10787000012100E00021142359431C3151581022EA -:10788000401C13F0DEFA00216846FFF705F80020DF -:10789000E0616069407801281DD1192016E6606911 -:1078A0004278022A09D000210831411809780029BC -:1078B0000DD0CA0703D00E2106E00121F4E78907A5 -:1078C00001D5102100E012210170002772E0012A89 -:1078D00001D00D20FAE51C20F8E51D2030710B20A9 -:1078E00033E62978102948D1F0E56069017801294B -:1078F00043D0082941D00021317100F01AFA0C2040 -:1079000069460870206A049037E028780F2805D06F -:107910001020107003271B2030714BE007216846B0 -:107920000170206A0490A8680290022168460171E3 -:10793000029805210170217E417000216846FEF702 -:10794000ABFF0B2168460170206A04902946684607 -:10795000FEF7A2FF07461B203071012F0DD029E052 -:10796000012168460170206A049004216846017173 -:10797000217E41710020207612E0207E00280FD069 -:107980006169132008701A2030710A206946087056 -:10799000206A049029466846FEF77EFF074609E004 -:1079A0006069002801D01421017068460078002821 -:1079B00000D021E5384609B0F0BDF7B50F462037B5 -:1079C0003879012686B00C46002804D0012828D03A -:1079D00002281CD197E02079012804D0022811D078 -:1079E000032814D10AE0A068407801280ED10620AF -:1079F000216A04F0DCFD00287FD10CE0A16813208F -:107A0000087008E0A0684178022901D0052674E0DA -:107A10000078082871D1012038710A206946087061 -:107A200033E0089800780F2867D107216846017075 -:107A3000206A049008988568029522790220012A1C -:107A400004D0022A29D0032A57D10FE006466846FF -:107A500006710B202870207B00214007400F6870C2 -:107A60006846FEF719FFA068067045E006466846BE -:107A7000067105202870207B687000216846FEF79B -:107A80000BFF3E710B2168460170206A0490684626 -:107A90000899FEF701FF06462FE0684601710120B4 -:107AA0002870207C6870607CC007C00FA870A07C24 -:107AB0004007400FE870E17C2971C0071FD0207D8E -:107AC0004007400F6871607D4007400FA87100219A -:107AD0006846FEF7E1FEA06807222946303013F021 -:107AE000B0F9E068017AA06820300171A1682879B6 -:107AF0008870A16809200870002630465BE70020E6 -:107B0000A8716871E3E7A168142008700121684634 -:107B10000170206A0490042168460171217B417143 -:107B20000021FEF7B9FEE7E7F0B585B00F46054640 -:107B30000124287B800040198038C66F3078411EB0 -:107B40000A290AD22C498000323140188038C36F8C -:107B50003A463146284698470446002C01D0012C6D -:107B600011D1287B401E0006000E287301D003248B -:107B7000DFE70D2069460870306A04900021019605 -:107B80006846FEF789FE032CD3D0204605B0F0BD31 -:107B900070B515460A46044629461046FFF7C4FF4D -:107BA0000646002C0FD0207814280CD1207E002807 -:107BB00006D000202870204629460C30FFF7B4FF7D -:107BC000204600F0B6F8304670BD704710B5012968 -:107BD00003D0022901D0052010BD417000F0A9F8A2 -:107BE000002010BD002809D0027E002A06D00A46D7 -:107BF00001460C31CCE70000C2B301000120704700 -:107C000030B5044687B00D46062004F0F6FC294640 -:107C1000052004F0F2FC2078142805D000206946E5 -:107C200008702046FFF7DEFF07B030BD7FB50E4677 -:107C300000216A4611730178092903D00A2903D06B -:107C4000002407E0446900E08468002C02D0217E13 -:107C5000002912D0154601462846FEF7CCFE03281F -:107C600009D1324629462046FFF792FF6946097B33 -:107C7000002900D0042004B070BD25460C35EAE789 -:107C800000B50023012285B005280CD0062808D1B4 -:107C90006846027004910221017143710021FEF7D0 -:107CA000FBFD05B000BD6846027004910271F4E767 -:107CB00010B590B00C4605216B4619700190234811 -:107CC00002900892001D03900AA96846FFF7AEFFD4 -:107CD000002805D1102220460B9913F0B2F800209D -:107CE00010B010BD30B505E05B1EDBB2CC5CD55CDE -:107CF0006C40C454002BF7D130BD10B5002409E00E -:107D00000B78521E5B00234303700B78401CDC0988 -:107D1000D2B2491C002AF3D110BD70B50C460546FD -:107D200004F06BFC782300222146284604F0BEFBB9 -:107D300070BD4178012900D00821017070470028EA -:107D400001D000787047082070470000BCB30100E4 -:107D500070B5F84D040008D0012C10D0022C07D0CB -:107D6000032C05D0F4A1752007E0F3A16C2004E0FA -:107D70002878012803D0F0A1722013F0ECF92C70C0 -:107D800070BD70B5EB4D044610280AD0112C16D0EA -:107D900028468178122C07D0132C0AD0E6A1A42003 -:107DA0000BE0E5A1992008E0112908D0E2A19E206E -:107DB00003E0112903D0E0A1A12013F0CCF9AC70AD -:107DC00070BD10B5DB4894B0007B002819D0172097 -:107DD00069460870D74900A806220D31023013F019 -:107DE00030F809A9684603F0A8FE0446112805D01A -:107DF000002C03D0D0A1C02013F0ADF9204614B060 -:107E000010BD3220E4E710B50022022103F08CFF00 -:107E100010BDFFB595B01D460E460746FFF7F3FFB0 -:107E200004000AD02078222804D3A07F8006C00F47 -:107E3000A84204D1082019B0F0BDC348FBE73721A0 -:107E4000684601704780002D05D0012101714671FF -:107E50001799817102E000206946087109A96846F6 -:107E600003F06BFEA07FDF21084069010843A07783 -:107E70000020E0E770B50446084620380D460300B0 -:107E800013F08AFA0A060A11232C3342495057612B -:107E9000FF20A9A10D3052E02078202851D1FF20E9 -:107EA000A5A110304BE0A3480178032949D0807880 -:107EB000132846D02078242843D0252841D02328D1 -:107EC0003FD0FF209CA1133039E02078222838D001 -:107ED000232836D8FF2098A11A3030E020782228B5 -:107EE0002FD0FF2094A11E3029E02078222828D00E -:107EF000242826D0262824D0272822D0292820D07C -:107F0000FF208DA121301AE02078252819D0FF20EC -:107F100089A1283013E02078252812D0FF2086A1DF -:107F20002B300CE0207825280BD0FF2082A12E30AA -:107F300005E02078282804D0FF207FA1313013F0FD -:107F40000AF9257070BDFF207BA13430F7E730B50A -:107F50007E4C0B887E4A022801D0934204D09D1F9C -:107F6000A54225D2022802D04D88954203D04D88E3 -:107F7000AD1FA5421CD24C88A34219D88B88FF257F -:107F8000F435AB4214D8022802D0C888904205D0FC -:107F9000C8886E4D0A382D1FA84209D2C888904261 -:107FA00008D0944206D05B1C63438000834201DB0F -:107FB000072030BD002030BDF0B56649884245D36A -:107FC000654A0125AD041368A84201D398423DD308 -:107FD0000279002A06D0082A02D8067B082E05D985 -:107FE0000720F0BD047B002CFAD0F6E7002A06D06B -:107FF00004688C422AD3AC4201D39C4226D3002E83 -:1080000006D084688C4221D3AC4201D39C421DD35C -:1080100000240CE00568A700ED598D4216D3012716 -:10802000BF04BD4201D39D4210D3641CE4B2A242FE -:10803000F0D800220125AD040CE084689700E459D3 -:108040008C4203D3AC4203D39C4201D21020F0BD3A -:10805000521CD2B29642F0D80020F0BD10B5028971 -:108060003E4B111F994213D24189042910D3DB1CC6 -:1080700099420DD891420BD80178890706D54068FE -:10808000002803D0FFF798FF002800D1002010BD82 -:10809000072010BDFFB50022099B002802D099429D -:1080A00005DC6EE0002902D1002004B0F0BD0920FB -:1080B000FBE7845C002C12D087187D78112D59D0F5 -:1080C00010DC2B0013F068F90A561726262C2C2EEC -:1080D0002E4C4C56835C002B46D1521CD2B28A42A5 -:1080E000F8DBE1E71C2D45DA123D2B0013F054F9C3 -:1080F000044242121A42022CD9D1BB78039C072BAE -:10810000237001D25B0701D40A20CEE7029B012431 -:108110001B782CE0E343DB0708E0012C08D029E0C2 -:108120000620C2E70F2523072D075B19002BF4D08B -:108130003046BAE7640C00207372635C6761705F5D -:10814000636F72652E630000023000007B0C00003C -:10815000FFFF000000C0010028000020FD3F0000DC -:10816000029B1B789C0701D50B209EE7022423432A -:10817000029C2370835C521C9A18D2B28A4202DDA0 -:1081800095E7192676028A4293DB8DE710B50478CD -:108190000B46002C08D00121F94A012C07D0022CF3 -:1081A0000BD0032C13D10EE00021197011E01970CF -:1081B0008179890903290AD10BE01970817989092C -:1081C000012904D105E019708179890901D010468F -:1081D00010BD411C0622581C12F033FE002010BDB9 -:1081E00008B51346002806D0E6A00068009048793C -:1081F0006A468009105C18700622581C12F021FE95 -:1082000008BD30B50C46097895B0222902D2082065 -:1082100015B030BD282369460B704880132A03D05F -:108220003B2A01D00720F3E708460A7109A903F0A9 -:1082300084FC050003D121212046FFF71BFE2846C0 -:10824000E6E700B595B0232369460B704880108897 -:1082500088805088C880D088488190880881002014 -:108260008881C88109A9684603F067FC15B000BD84 -:1082700070B50C00064610D0FFF7C5FD050003D110 -:10828000C149C24812F067FFA6802889E08028898A -:10829000208168896081A889A08170BD70B50E4673 -:1082A000050003D00021092004F0A7F90120B84CF3 -:1082B000022E207324D0032E04D0D320B249800094 -:1082C00012F049FFB24806210D3003F02DFFA07CCB -:1082D0008006800EA074FFF774FDA08B00280ED0DE -:1082E000002D0CD0830001220021092004F0DEF8CB -:1082F000092804D0A548A449283012F02CFF70BDED -:10830000A3480321103003F00FFFA07C402180061A -:10831000800E0843A0749E480C3002F04EFBDAE752 -:108320007FB501A9022003F06EFD002851D09748C7 -:108330009549673012F00FFF4BE0029C207821280E -:1083400047D0A07F01072BD52046223000906846F9 -:108350002346628E80882146343301F084FC050078 -:1083600005D011282ED089488749843028E0A07F85 -:10837000F7210840A077E17F480889074000C90F2E -:1083800008432021095D4007400FC9000843E077FA -:108390002078282824D129212046FFF76BFD1FE0F3 -:1083A000400716D568462246808821460E32FFF7E0 -:1083B00048FF050008D0112804D074487249933052 -:1083C00012F0C9FE00250BE0A07FFB210840A0773A -:1083D00006E001A803F025FD0500AED0052D02D072 -:1083E000284604B070BD0020FBE7F8B5040004D1B6 -:1083F00066486549A13012F0AEFE722020706068B8 -:1084000008260178091F0B0012F0C6FF11FD0A466D -:1084100068FC460EFCFC4746464646FD92FD46007B -:108420007B205949C00035E087883846FFF7EBFCD0 -:10843000050004D11F205449400112F08CFE6078E1 -:10844000042130436070524CA07F0843A077212163 -:108450002846FFF70FFDA87F8007800F012801D174 -:10846000801EA080384603F0B1F83846FCF7FBFFC9 -:108470003846FBF79EFB3946022004F0BEF8A87F81 -:10848000EF210840A877FFF74BFF002804D03F48B2 -:108490003D49C93012F05FFEF8BD85882846FFF7D8 -:1084A000B2FC002804D139483749D33012F053FECA -:1084B00060688078012804D034483349D53012F000 -:1084C0004AFE60688179284603F09CF90028E3D0D1 -:1084D0006178314361706168C880F8BD878838462B -:1084E000FFF791FC050004D128482749E63012F037 -:1084F00032FE60783946304360706068C0882881F9 -:1085000060680089688160684089A881022004F061 -:1085100074F80020A875A87F8007800F0228DCD19E -:10852000FFF7FEFE0028D8D0212017494001B1E70F -:1085300080783C2803D00025022814D000E00125D3 -:108540000027002808D03C2806D0022804D00F4875 -:108550000D49FF3012F0FFFD002F06D002263046F5 -:1085600001F06CF9F8BD0127EBE7607830436070EB -:108570000748817F31438177002D0BD00126EEE73C -:10858000023200000302FF01388100002E030000C8 -:10859000640C002060688788384601F07BF9054646 -:1085A00060688079012832D00226A87F06228008E0 -:1085B00080003043A8776068C08A28816068008B9B -:1085C00068816068408BA8816068C079E8756168DF -:1085D00028461830083112F034FC60680622807B8F -:1085E00068706168A81C0F3112F02BFCA87F81070E -:1085F000890F384602F0D4FFA87F8007800F01283A -:10860000ADD101E005E008E0FE488780A7E701263C -:10861000CBE7204601F01EFEF8BD60783043607065 -:10862000F8BDF7B505460078002700090C463E4620 -:1086300001287DD00022F44902287AD0072804D0EE -:108640000A2877D0F149F24839E1686803780D2BA0 -:1086500035D006DC042B6ED0072B3AD00A2B69D11B -:1086600006E0122B3CD0132B44D0142BF7D1BEE0E4 -:1086700011270726002C7CD08088A0806968FB2306 -:108680008979A171DF4905468A7F1A408A770421DA -:1086900003F071FB0521284603F06DFB00212846FD -:1086A00003F069FB0121284603F065FB03212846FE -:1086B00003F061FB0221284603F05DFB01E1012785 -:1086C0000926002CD7D08088A08068688079207225 -:1086D000F7E012270E2680882146FFF7C9FDF0E05B -:1086E0001A270726002CC6D04088A0806868007929 -:1086F000A071E6E081783C293ED010271E26002C90 -:10870000B9D08088A0806868C08A20836868C08AE1 -:10871000E0826868008B60836868408BA08369682A -:10872000607D497F40084000C907C90F084303E046 -:108730006CE097E0BAE029E060756968C007497F9E -:10874000C00F49084900084360756968A21DC879CF -:108750000831FFF745FD69682246887B0D320F31ED -:10876000FFF73EFD68688079002803D0012020755E -:1087700007E076E00220FAE719270726002C70D0E0 -:10878000A271A048F722817F11407DE01B272E2691 -:10879000002C66D0A1806968A21D0879491DFFF7E9 -:1087A0001FFD68682030C07A60736868C07804284C -:1087B000A07B19D040084000A073F92108406968E7 -:1087C0001F22C9788907490F0843A07369684007C9 -:1087D000C97A400FC9000843A073696820460F306A -:1087E0000C3112F02EFB6CE001210843E4E71E2758 -:1087F0000E26002C6DD0A1806868E21D407AA07121 -:1088000069688878C91CFFF7EBFC5AE0287A0128D0 -:1088100005D0022815D07E487C4932384FE01D270C -:108820000E26002C55D06888A080A889E080E889B1 -:108830002081288A6081688AA0817248DF22817F36 -:10884000A2E712270E266888FFF712FD002C40D001 -:1088500068784007400F032833D16A48FD22817FA2 -:1088600092E736E0287A030012F096FD0604101015 -:108870002020202619270726002C2AD0A180614815 -:10888000A271817F4908490081771AE019270726DC -:10889000002C1ED0A180287A012805D00320A071C9 -:1088A0005848EF22817F6FE70220F8E721462846EB -:1088B000029A01F068FEFEBD55485449801F12F02F -:1088C0004AFC0298002C068001D027806680002098 -:1088D000FEBD02980680FAE710B54A4894B0807849 -:1088E000132802D0082014B010BD22206946087059 -:1088F00009A9684603F021F904460021072003F086 -:108900007CFE2046EFE700B53E4895B080781228FF -:1089100001D00820AAE41E21684601700021817060 -:10892000C17009A903F009F90028F3D1002107203B -:1089300003F063FE1120FFF724FA002096E400B54F -:10894000304895B00078022801D0032818D11B21A7 -:1089500008A801730021817369460BA803F0EDF8A4 -:10896000002804D1684640781B2801D003207DE40C -:108970000021084603F041FE68468078002801D0B7 -:10898000082073E40120FFF7E3F900206EE4F8B556 -:108990001C4C030012F000FD0A06791779797979E9 -:1089A00044356779FFF7CBFF00282AD1F8F7DAFFC3 -:1089B000002826D02221017000210172F8F7B3FFB0 -:1089C000A07F01214BE08EB23046FFF71CFA050074 -:1089D00004D10F480D492E3012F0BDFB2878212814 -:1089E0000FD0F8F7BFFF002814D012210170022722 -:1089F000077246800020A875F8F795FFA07F3843DE -:108A0000A077F8BD640C0020FFFF00003881000053 -:108A10005F050000132229463046FFF7F2FBF0E71E -:108A2000A578122D06D0132D07D0F849F84812F07A -:108A300092FBE6E7FFF767FF01E0FFF74DFF002835 -:108A4000DFD1F8F78FFF0028DBD022210170122D33 -:108A500007D002210172F8F766FFA07F10210843BA -:108A6000CEE70121F6E7A07C810901290BD080091E -:108A700004D0E748E549223012F06DFB03210020C5 -:108A8000FFF70CFCBDE70221F9E7E148DF49293097 -:108A9000CDE7F7B514460D0004D1DD48DB49313090 -:108AA00012F059FB28780827012807D002281FD088 -:108AB000D748D649623012F04EFBFEBD0098FFF752 -:108AC000A2F9060004D1D248D049383012F043FB55 -:108AD0000220B0751030207060783843607007CD88 -:108AE000083407C4CB482022817F11438177FEBD23 -:108AF0000098FFF788F9060004D1C548C3494630FD -:108B000012F029FBA988C448814208D1EA88824230 -:108B100005D1132231460098FFF773FBFEBD814259 -:108B200002D1E888002809D01220207060783843EC -:108B3000607007CD083407C4002006E078230022C7 -:108B40000220009903F0B2FC0120B075FEBDB148CF -:108B500040897047FFB591B01498FAF71BF90028C7 -:108B60005DD10124684603218471C90281800022FD -:108B700001A92046FBF7ECFA002850D168461521E0 -:108B800084714902818000261C2102A8009612F0FF -:108B9000B7F90120014668461031017000200146F6 -:108BA000684641708178F9273940891C21438170DA -:108BB000017A02252943017212998186C6861F21F6 -:108BC00001870C9011980F9001A80B9009AA0BA98E -:108BD00002A8FBF788F8002821D168468D4E808CCA -:108BE000F080684684718D498180807809AA384078 -:108BF000801C41084900684681708586058713A856 -:108C00000F900BA902A8FBF76EF8002807D1684661 -:108C1000808C308131460A311498FAF7CEF815B0BD -:108C2000F0BD30B50C467E4995B08C423CD37D49B1 -:108C3000012292040968944201D38C4234D3203833 -:108C400000220125030012F0A7FB06042A44484E27 -:108C5000575F0021082003F0AAFC002802D0112051 -:108C600015B030BD24206946087000A80522A11C5B -:108C7000023012F0E6F809A9684602F05EFF05002E -:108C80002FD1082300221146184603F00FFC0828B4 -:108C900027D05F485D49D63012F05DFA21E0606868 -:108CA000002803D0884201D21020D9E73D21684630 -:108CB0000170218841806188818009A902F03DFF0F -:108CC00005000ED1606800280BD06946098D01802F -:108CD00007E0206801F0B2FE02E0204600F024FE2A -:108CE00005462846BCE73E2007E0857000E082701C -:108CF00009A902F022FFF3E73420694608702078C2 -:108D0000C0076846F3D0F0E70720A9E730B50C4666 -:108D1000444995B009688C4201D21020A0E7203860 -:108D2000030012F039FB05042121232132002088A1 -:108D3000FFF769F8002804D00078222803D2082021 -:108D40008EE739488CE725216846017021884180EB -:108D500009A902F0F2FE050015D10AA90522023187 -:108D6000A01C12F06EF80EE006250CE0206800282A -:108D700005D0884201D2102505E001F055FE2548B6 -:108D80000025808BA08028466AE7072068E72148F5 -:108D90001330704710B520211E4812F0AFF80120A3 -:108DA000FEF7D6FF1120FEF7ECFF00211948C9435A -:108DB000818000218176E1218900818301460C3088 -:108DC0000D310446F8F74EFE1248072221461330B3 -:108DD00012F037F8FEF7F5FF002803D00B491348CF -:108DE00012F0B9F901F0E5F910BD10B504463C21C7 -:108DF00012F084F8A07F80088000A07720202070E7 -:108E00000020A0752034607010BD00003881000083 -:108E1000B5050000640C0020FFFF0000012A0000DF -:108E200000C0010028000020023000001C070000E4 -:108E30007047FEB50546FF480C46814207D3012026 -:108E40008004844205D3FC480068844201D210208B -:108E5000FEBD002D02D0012D32D126E0F7490822B7 -:108E60000F46684611F0EDFF39462046FFF78EF9B0 -:108E70000028EDD1FEF7A5FF060006D007226946BF -:108E8000384611F0DEFF3046FEBD2078002801D0C4 -:108E9000012805D1E94807223946C01D11F0D1FF4C -:108EA0000021092003F0A9FB0FE00978002907D071 -:108EB000012905D0022905D0032903D0E048FEBDD1 -:108EC0000720FEBD0120FFF7E9F9DC480C38857664 -:108ED0000020FEBD10B5D8490968884201D2102093 -:108EE00092E7D64902460C390B7B0D311846FFF745 -:108EF00077F9002088E7FFB599B00546002008A95A -:108F000008746946087108A908730875CA481446A8 -:108F10000121C84A890400681E46002D05D09542EB -:108F20000BD38D4201D3854207D3002C08D0944245 -:108F300003D38C4204D3844202D210201DB0F0BD72 -:108F40002846204318D01F270BAB0CAA00972846B1 -:108F50001A99FFF79FF80028F0D10DAB01AA31460E -:108F600020460097FFF796F80028E7D16846007979 -:108F7000C00703D00A20E1E70720DFE702AF002D9A -:108F80000FD01A20694608721A9888722946F81C70 -:108F90001A9A11F056FF0EA902A802F0CEFD002881 -:108FA000CCD1002C0ED02021684601728672324648 -:108FB0002146F81C11F045FF0EA902A802F0BDFDE4 -:108FC0000028BBD19D4908A8007B0C3948700020BF -:108FD000B4E770B506460A200C46087015461146DF -:108FE000204602F0AAFD002807D139212170204631 -:108FF000294602F0A2FD002804D0082801D190489B -:10900000401C70BD2A462146304600F0B9FC04469B -:10901000082803D18B498C4812F09DF8204670BD7A -:10902000F0B5044689A003C897B0824D002715917A -:109030001490AC4211D380480121890403688C420A -:1090400001D39C4209D32078012809D16268AA4241 -:1090500003D38A4204D39A4202D2102017B0F0BD43 -:1090600076490C390A78012A0CD18A88794B9A42C0 -:1090700003D0002806D0012804D08A7F13079B0F55 -:1090800006D101E00820E9E7D30701D1910701D516 -:109090001120E3E7218A704B0A46203A9A4207D30F -:1090A000012877D1002975D1628A002A72D111E096 -:1090B000022801D0032801D1A0296BD3012809D0AF -:1090C0005E4A0C3A5278D20704D0628A002A61D0F4 -:1090D000B42A5FD8002806D0012808D0022804D07E -:1090E000032857D117E0002518E0022516E00029D3 -:1090F00002D1608A00280CD004256068007800281E -:109100000CD0012809D0022807D0032805D04C48EC -:10911000A4E70125F1E7032500E00127207A0028D4 -:1091200006D0012806D0022806D0032867D105E022 -:10913000002604E0012602E0022600E00326002DBE -:1091400001D0022D16D1002E14D0E068002803D0E3 -:10915000FEF732FF002881D138480C38407880076C -:1091600002D03748401E79E7022D03D1022E46D0A7 -:10917000032E44D0182168460170218A4180218A3B -:10918000818085712D480C38007B002803D0012890 -:109190006FD104E033E000216846C17102E0012094 -:1091A0006946C8716846077221780930012920D0C4 -:1091B000062111F0A3FE69460E74207D8207C107C7 -:1091C000D20F4007C90F5200C00F11438000014366 -:1091D00014A8405C6946C873002810D009A96846E5 -:1091E00002F0ABFC002893D1002D0AD0022D08D04C -:1091F00012E061680622491C11F023FEDBE707201C -:109200002CE7002E08D0E068002805D009AA69469E -:10921000FFF7DFFE0028A6D11B2069460870012059 -:10922000887009A9684602F088FC00289BD108A82C -:10923000407913E000C0010028000020700C0020DD -:1092400002320000388100002708000007060504EC -:1092500003020100FFFF0000E13F00001B2819D1BD -:109260002B0012F099F80504040707040A000320F4 -:1092700001E00FE00220FEF76BFD012D0CD0608AAB -:10928000002809D0002283001146104603F00EF991 -:10929000002801D00320E1E60020DFE6F3B5032635 -:1092A00087B00D4600290AD0FE4885426FD30120C1 -:1092B0008004854203D3FC480068854267D3079841 -:1092C000FEF7A1FD040005D02078222804D2082052 -:1092D00009B0F0BDF548FBE7A07F8707BF0F002D61 -:1092E00005D029463846FEF732FE0600F0D1394651 -:1092F0000027EF48012907D0022931D0ED49EE4877 -:1093000011F029FF3046E3E7A27D2946012A02D069 -:10931000827F920701D51120DAE700291BD10821AD -:109320006A46049711820592418904AAE348FBF733 -:10933000FFFA0028CCD16846008A082801D0032013 -:10934000C6E7684601880181418841818188818121 -:10935000C188C18102A9079802F0E7F90646D1E762 -:10936000A17D022916D1807F800613D4002D04D060 -:10937000A07F40070CD4002100E00121079802F0F3 -:1093800014FA0600BED1A775002DBBD004E01AE088 -:109390001126B7E7002D16D02A4621460798FEF77A -:1093A00050FF06461128ADD1A07F4007AAD4204621 -:1093B000082229460E3011F044FDA07F0421084305 -:1093C000A07700269EE7102082E770B50C46054680 -:1093D000FEF719FD010004D022462846FEF711FFD2 -:1093E00070BDB24870BD00B50146143195B0192961 -:1093F00001D2810707D001461E3104D00A3102D0C4 -:10940000072015B000BD312269460A70887009A98D -:10941000684602F092FBF4E701B582B0022069468B -:109420000880A34802AB00896A460021FBF7EAF8EE -:1094300069460988022900D003200EBD1CB5002111 -:10944000009102216A46118097490190096888427B -:1094500001D210201CBD964801899848FBF768FA94 -:10946000694609880229F5D003201CBDF0B50E46D7 -:109470008C4985B0174605468E4207D38A4801229B -:1094800092040068964204D3864202D2102005B0AE -:10949000F0BD1F2F01D90C20F9E7854C8D4226D352 -:1094A000954201D3854222D3E08803A9FBF75BF8FC -:1094B0000028ECD1287869464873E08803A9FBF7B7 -:1094C00033F80028E3D16946009008780221084368 -:1094D00069460870497B090703D00821084369469B -:1094E0000870E0886946FAF7B8FF0028CFD16946CE -:1094F0008F80E088334601AA0021FBF783F8694694 -:109500008988B942C3D00320C1E71CB50C460021AD -:1095100000910191228869460A8063490190096897 -:10952000002801D0884201D38C4201D210201CBDFA -:10953000002801D0002A09D05D486A46C1885F48EA -:10954000FBF7F6F96946098821801CBD0C201CBD7B -:1095500010B50123FEF75DFC56E4002310B51A4652 -:109560001946FEF756FC4FE470B504464D4894B0DA -:10957000844207D301208004844206D34A4800680D -:10958000844202D2102014B070BD2046FEF766FD62 -:109590000028F8D146488178112901D00820F2E747 -:1095A000817FC90601D51120EDE71D2269460A70A9 -:1095B00021780025CA07D20F69468A7022898A80DD -:1095C0006289CA80217801268907CA0F69464A72D2 -:1095D000007B002803D0012804D00320D3E70846ED -:1095E0000D7201E008460E7209A902F0A6FA0028E1 -:1095F000C9D12078800708D56068002805D009AA5D -:109600006946FFF7E6FC0028BDD11E2168460170BF -:109610008670C57009A902F090FA0028B3D1A0891C -:1096200000F073F90400AED11220FEF7AAFB204629 -:10963000A9E7F0B516461C4A0C4605001948204912 -:10964000126899B005D085420FD38D4201D395425F -:109650000BD3844209D38C4201D3944205D3864272 -:1096600003D38E4204D3964202D2102019B0F0BD2B -:109670000F4FB87FC106890F01D1400701D51120D6 -:10968000F4E72046FEF7EAFC0028EFD120788107B6 -:10969000C90F294303D0800714D5002D12D007200D -:1096A000E4E7000000C001002800002002300000B4 -:1096B000640C002038810000F3090000FFFF000067 -:1096C0000000040031460220FEF741FC0028CDD105 -:1096D000C9488078112803D0122801D00820C5E796 -:1096E0000220002714A9189002F08DFB00280DD04D -:1096F000C2A1C64811F02FFD08E01598807F8107B0 -:109700001898890F814201D17F1CFFB214A802F082 -:1097100088FB0028F1D0032F01D30420A6E7B64828 -:109720008078122803D1FFF7EEF800289ED1207828 -:10973000800708D56068002805D009AA6946FFF7A8 -:1097400048FC002892D1212168460170218941807E -:1097500061898180207800278007C10F6846817168 -:1097600020788007002815DB2878002807D00128FA -:1097700008D0022806D0032804D0A54876E768461A -:10978000C77102E001206946C8710622691C02A85F -:1097900011F057FB9848007B002803D0012804D023 -:1097A000032063E76846877302E0012069468873F7 -:1097B00031886846018271884182B1888182F1884E -:1097C000C1820783478309A902F0B7F9002886D12F -:1097D000A08900F09AF80400A0D11320FEF7D1FA76 -:1097E000204643E730B505468A4895B000680C46E8 -:1097F000814202D2102015B030BD2846FEF703FB8F -:10980000002807D00178222902D3807F800603D464 -:109810000820F0E78048EEE7132168460170458094 -:1098200009A902F08AF90028E5D108AA0A215156AF -:109830007F2901D02170DEE70520DCE710B56E49F5 -:10984000012807D0022815D0FF206CA14D3011F05F -:1098500082FC81E60878032804D0FF2067A143300A -:1098600011F079FC0021084602F0C7FE0120FEF746 -:109870006FFA71E68878132804D0FF205FA1483082 -:1098800011F069FC0021072002F0B7FE1120FEF75D -:1098900078FA61E6F8B504460122022102F044FAA2 -:1098A000074601220321204602F03EFA0646012225 -:1098B0000521204602F038FA0546012204212046FF -:1098C00002F032FA0446002F04D1AF204BA18000F1 -:1098D00011F041FC002E04D14C4848A11A3811F077 -:1098E0003AFC002D04D1494844A1193811F033FC49 -:1098F000002C04D1454841A1183811F02CFC22213C -:109900003846FEF7B7FA3846F8BD10B5002809D03A -:10991000830000221146072002F0C8FD072801D06D -:10992000032019E6002017E610B504460068002859 -:109930000CD03A49884207D301218904884205D3D3 -:1099400034490968884201D2102005E601F060F828 -:10995000A088294CA083A07E01280DD100210920D8 -:1099600002F025FE002800D00120A17C89090129F0 -:1099700004D00321FEF792FC0020EDE50221F9E777 -:10998000F7B500260C4605460B271AE02968B000FB -:1099900009580978002903D0012901D00720FEBD0C -:1099A000A170296806220958E01C491C11F049FAE7 -:1099B00027702046029902F0C0F80028EFD1761CEB -:1099C000F6B22879B042E1D800263A270FE0A8681D -:1099D000B10041581022A01C11F033FA2770204624 -:1099E000029902F0AAF80028D9D1761CF6B2287B99 -:1099F000B042ECD80020FEBD640C00207372635CA2 -:109A00006761705F636F72652E630000D7020000AC -:109A100002320000280000200230000000C00100D7 -:109A200030B5FE4B9A4207D301239B049A4205D3DB -:109A3000FB4B1B689A4201D2102030BD1578EB0613 -:109A40005B0F042B07D85478072C04D39378102B82 -:109A500001D8A34201D2072030BDD3785B0702D4DE -:109A600013795B0701D5062030BDC37FAC075B08C7 -:109A70005B00E40F2343C3770878EF231840137883 -:109A80009B06DB0F1B0118430870F1231840137865 -:109A9000DB065B0F5B0018430870507808730020EA -:109AA00030BD30B500240C70C378DB07DB0F0B70C2 -:109AB000C578AD07ED0F6D002B430B70C5786D07B2 -:109AC000ED0FAD002B430B7014700179C907C90F5E -:109AD000117003799B07DB0F5B001943117000794C -:109AE0004007C00F80000143117030BD70B51446AF -:109AF0000D460646F7F736FF002809D0A22101706F -:109B0000142221460830F7F75FFBF7F70CFF70BD12 -:109B1000132229463046FEF774FB70BD70B514461B -:109B20000E460546F7F71EFF002809D022210170D6 -:109B300045802178017261784172F7F7F4FE70BDBB -:109B4000132231462846FEF75CFB70BD10B5B54CBC -:109B5000207C00280DD12046B34A21461038FEF75C -:109B6000A7F8002803D0B1A1F12011F0F4FA0120E8 -:109B7000207410BDFFB581B00A9D06461C461746ED -:109B80001421284611F0BCF90B9800210160F80758 -:109B90000ED0A34920680968884239D31230286062 -:109BA0002068143068602068A8600B982168016004 -:109BB000B80726D56068002803D09949096888420B -:109BC00026D3029900290AD0FC3600280ED031464F -:109BD0001030FEF7DBFA00281BD1606810E0002887 -:109BE00016D0E86080366068B0670AE0FFF7CFF80B -:109BF00001460722304611F024F9FFF7A7FF8948F4 -:109C0000E860780708D58649A0680968884202D2CA -:109C1000102005B0F0BD28610020FAE770B50546B8 -:109C200011200C460870002161702121495D002936 -:109C300008D003290ED0042910D0FF207BA1523078 -:109C400011F089FA20780009012802D9E87FC008BC -:109C5000607070BD0007000F203002E00007000FA9 -:109C600030302070EEE770B594B015460C462C22CB -:109C70006946189E0A704880002B17D008221946A2 -:109C800001A811F0DEF868468581102231460E30B9 -:109C900011F0D7F809A9684601F04FFF002803D159 -:109CA000A17F10221143A17714B070BD0020019054 -:109CB0000290E8E7F0B50646008A97B080B20D46FC -:109CC0000190FEF7A0F804465648317848385B4FBB -:109CD00009900B0011F060FB0EFEFD43084A7283F1 -:109CE000B8D9FCFBFAF9F8FEA07F8007800F0128A5 -:109CF00007D000210022019802F016F8050007D1D4 -:109D000001E00121F6E7FF2048A1943011F023FA89 -:109D1000387CC00904D049484038406DA86112E041 -:109D20002B20694608720BA902A801F006FF002843 -:109D300004D0FF203DA19F3011F00DFA40490C984E -:109D400011F0E8F8A9617068A862B068E86220784C -:109D5000252804D0FF2035A1A53011F0FCF93246AA -:109D600021460198FFF7C2FE17B0F0BDA07F800723 -:109D7000800F012807D000210022019801F0D4FFB4 -:109D8000060007D101E00121F6E7FF2027A1AF304F -:109D900011F0E1F92078252804D03078012108431A -:109DA0003070E1E702202870B068A860B068002831 -:109DB00002D000202871D7E70120FBE72B2069465D -:109DC0000870184968464C3901F0B7FE002804D0E5 -:109DD000FF2016A1CE3011F0BEF903201BE02A208F -:109DE0006946087000A810220230716811F029F845 -:109DF00004A810220230B16811F023F8094968461E -:109E00004C3901F09AFE002804D0FF2007A1DF3072 -:109E100011F0A1F904202870099813E000C0010096 -:109E200028000020300D0020FFFF00007372635CEB -:109E30006761705F7365632E63000000500E002041 -:109E400040420F0068608FE7B068002804D1FF200F -:109E5000F649EB3011F07FF9E07F400704D5FF2091 -:109E6000F249EC3011F077F9B06806220A38009018 -:109E700033790421019801F058FA002891D0FF208D -:109E8000EA49F13011F067F96EE7002C04D1FF20A8 -:109E9000E649F93011F05FF92046223010220546DC -:109EA000716810F0CEFF28212046FDF7E3FFA07F68 -:109EB0008007800F022814D100231A4621460095FE -:109EC0000198FFF7D0FE06E055E1B6E0ACE089E08E -:109ED0002CE065E069E111280BD029212046FDF72F -:109EE000C9FFE07F317A4007400FC9000843E0779F -:109EF0003AE7A07F000703D5CC49CD4811F02BF9F4 -:109F0000A07F08210843A0770020608620463430D7 -:109F100010F0F4FFE07FFD220146C9071040890FD1 -:109F20000843E077307A203420701DE7A07F800757 -:109F3000800F012807D000210022019801F0F4FED3 -:109F4000040007D101E00121F6E7B948B7491D3007 -:109F500011F001F92B2069460872B64902A801F0F8 -:109F6000ECFD002804D0B248B049223011F0F3F8DB -:109F7000B0488188204621300176090A41760E21B9 -:109F800029702146FC316960017E2974407E687425 -:109F9000A8482C30A860103030346C61E860E3E6EB -:109FA000002C04D1A248A149363011F0D4F8207811 -:109FB00021289DD93079012802D0022808D103E058 -:109FC000E07F04210843E077387C0121084338749E -:109FD000324621460198FFF789FD23212046FDF7EF -:109FE00049FFC1E601220421019801F07DFC00280F -:109FF0009BD0A07F8007800F012807D0002100227E -:10A00000019801F091FE040007D101E00121F6E77B -:10A0100087488649543011F09EF80F202870172089 -:10A0200028716E34AC609FE60421019801F0ABFC0E -:10A030000028B4D11020287096E6A07F8007800FFA -:10A04000012807D000210022019801F06DFE0500D3 -:10A0500007D101E00121F6E7754874496D3011F030 -:10A060007AF82E462036307E41064DD5A17F8F07E7 -:10A07000BF0FC00713D02A468032516F00290ED07F -:10A08000087CF37DC007C00F5B0018430874516F54 -:10A09000E27F40084000D207D20F10430874307EA0 -:10A0A000000713D528468030026F002A0ED0117C9D -:10A0B000F37DC907C90F5B0019431174E27F49089A -:10A0C0004900D207006FD20F11430174307E800720 -:10A0D0000BD5F8204259002A07D0012F05D0294678 -:10A0E000307C31311032FEF77BF8307EC0060BD564 -:10A0F000F8204259002A07D0012F05D12946307C8B -:10A1000031311032FEF76CF8052368460370357E56 -:10A110004570484822226038019902704278D2087E -:10A12000D200D21C4270418003724572F7F782FD63 -:10A130002078252809D021280BD0AD203B4980006C -:10A1400011F009F82078222803D922212046FDF7B2 -:10A1500091FEA07F8007800F01280AD0002101987E -:10A1600001F009FE002800D1FEE5AF202F49800054 -:10A1700088E60121F3E774682E4D207860350928C0 -:10A1800002D00A28F0D10BE0E168002902D028466D -:10A19000F8F7D7FE2169002902D02846F8F7D1FE4A -:10A1A00021462846F8F7CDFEDEE521481F49DC3080 -:10A1B00068E6204810B5072228216030F8F7A8FE8D -:10A1C0001D480024017C4906490E0174403844654D -:10A1D000FDF7FBFC17493C3108461038F7F779FCCE -:10A1E00014484C30047410BD70B50D46FDF70BFEDD -:10A1F000040004D103200D49000210F0ACFFFF2140 -:10A200000531284610F07CFEA07F8007800F0128D2 -:10A2100016D0022128468830FDF7D8FC002803D04C -:10A220000249064810F097FF70BD00002C9E000008 -:10A2300005020000E40C0020500E00200503000081 -:10A240000121E7E70A46014610B510468830FDF7C0 -:10A25000D7FC10BDF0B505464068082601789BB0D4 -:10A2600008290DD00B2903D00C293FD10121817180 -:10A27000686887883846FDF7C6FD040041D13BE099 -:10A2800047883846FDF7BFFD040003D1FD49FE486D -:10A2900010F061FF2078212828D0282828D168686C -:10A2A00002210C3000F0BEFF002821D06868082190 -:10A2B000001D00F0B7FF00281AD02D21684601705C -:10A2C000478021461022223101A810F0BAFD0FA9C3 -:10A2D000684601F032FC002804D0CB20E949800018 -:10A2E00010F039FF29212046FDF7C4FD1BB0F0BD59 -:10A2F000687830436870F9E7E348E2492D3010F0A0 -:10A300002AFFA07F8107890F022902D1EF2108408F -:10A31000A0772078212810D068688179002902D0A0 -:10A320008078002818D0A07F8007800F022864D092 -:10A330000720D449C00110F00EFFA07F8007800FD6 -:10A340000228D3D1FDF7ECFF0028CFD0CE48CD496D -:10A35000733010F000FFC9E7687830436870E07F21 -:10A36000C00701D0042100E00321212001552078FD -:10A37000292818D02428E0D13946062002F03DF9DA -:10A3800022212046FDF776FDA07F8007800F01285F -:10A3900031D00021384601F0EEFC0028CDD0BA487B -:10A3A000B8495830C7E7A07F8007800F012807D041 -:10A3B00000210022384601F0B7FC050007D101E07A -:10A3C0000121F6E71B20AF49400110F0C4FE252112 -:10A3D0002046FDF74FFD0D2008A90871284609A960 -:10A3E0008830FDF7FFFB0228A7D00028A5D0A6489B -:10A3F000A4494D309FE70121CCE76878304368706D -:10A400009BE7F7B58AB00A98FDF7FDFC050056D02A -:10A410002878222853D3232851D0E87F40074ED4F0 -:10A42000A87F8007800F01280ED0002201280DD0C0 -:10A4300000210A9801F078FC064694480290F8F74B -:10A4400077FD040009D103E00122EFE70121F0E7E5 -:10A4500075208C49C00010F07EFE002E0FD088368B -:10A4600066610298F8F764FD07460298F8F760FD08 -:10A4700006462878222807D0242805D008E00020A6 -:10A4800007460646606103E025212846FDF7F2FCF9 -:10A49000092020700A9820620C9820710B98E760C0 -:10A4A0002661A06004A92046FDF7C0FB022806D063 -:10A4B000002804D074487349AF3010F04CFE0DB042 -:10A4C000F0BD30B587B00446FDF79DFC0546807FA2 -:10A4D0008007800F01280BD000210022204601F0C8 -:10A4E00023FC0446287822281ED9002C07D101E03D -:10A4F0000121F2E764486349BB3010F02CFE0F21C4 -:10A50000684601701721017120466E30029069463D -:10A510001A30FDF767FB022806D0002804D05A48FD -:10A520005849C03010F017FE07B030BD30B587B0C5 -:10A530000446FDF768FC0546807F8007800F0128F0 -:10A540000BD000210022204601F0EEFB04462878C3 -:10A550002228E9D9002C07D101E00121F2E74A487D -:10A560004849CD3010F0F7FD1020694608702046AC -:10A570008830FDF737FB0028D6D043484149D0301A -:10A5800010F0E9FDD0E7F7B505460078002700098F -:10A5900082B00C463E4602287CD0072802D00A280A -:10A5A00049D149E068680178082906D00B292FD0E5 -:10A5B0000C292DD03349364865E114271A26002C82 -:10A5C00069D04088A080FDF71EFC0090002804D1CF -:10A5D0002F482C49243810F0BEFD00980099C07D0A -:10A5E000A21D1831FDF7FCFD686808228089E08112 -:10A5F000696820461030091D10F023FC207E0121DF -:10A600000843F9210840207600984021807F50E0DF -:10A6100018270826002CD3D08088A080FDF7F3FBF4 -:10A62000050004D11A481749401F10F094FDA11DE0 -:10A630002846FFF7F3FA28E1002C01D0288BA080F0 -:10A64000287A01287ED0022805D0032838D0104867 -:10A650000C49853017E11C270726002CB0D0A088B4 -:10A66000FDF7D1FB0090002804D1094805491330BB -:10A6700010F071FD287B8007800F0128A0791CD085 -:10A68000400809E02C9E00001A030000440D002041 -:10A6900027040000E9E0E3E04000A071FD2108404C -:10A6A000297B4907C90F49000843A0710098802100 -:10A6B000807F084300998877E7E001210843ECE7B1 -:10A6C00013270B26002CA6D0A088FDF79CFB00903A -:10A6D000807F8007800F012807D00021A0880022FA -:10A6E00001F022FB050006D101E00121F6E7FB495C -:10A6F000FB4810F030FD0098807F8007800F012814 -:10A7000050D0E86A81788907890F0129A1794BD057 -:10A7100049084900A1718278FD255207D20F2940CE -:10A7200052001143A171E322114002785207D20E68 -:10A730001143A171DF2211404278D207920E1143DA -:10A74000A17100E033E00021E171C178217242790A -:10A750000179607AD30740084000DB0F1843930764 -:10A76000DB0F28405B0018435207FB23D20F184031 -:10A77000920010436072A07ACA0740084000D20FCE -:10A7800010438A07D20F2840520049071043C90FCF -:10A79000184089000843A07200980078232874D9D3 -:10A7A0002621C4E0A86AADE701221143B2E7297B64 -:10A7B000CC48022911D017270C26002C50D0012993 -:10A7C00012D003291FD0042920D005291ED09320A0 -:10A7D000C249C00010F0BFFC23E019270726002C57 -:10A7E00053D00121A17105E00121A171E17989080E -:10A7F0008900E171017CCA094906D201890E49002C -:10A800000A4302740DE00220A07106E0687B000795 -:10A81000000F8030A07105291DD0E07980088000EC -:10A82000E071A088FDF7EFFA0546007821282CD0CA -:10A83000232804D0AA48A949573010F08CFCA87FDF -:10A840008007800F01280ED00021A08801F093FA24 -:10A85000222128466CE0E07980088000401CDFE778 -:10A860000498068017E00121EFE7002C01D06888EA -:10A87000A080287A032832D004280FD005285AD087 -:10A8800097489649B03010F066FC0498002C06807A -:10A8900001D027806680002005B0F0BD15270C266A -:10A8A000002CDDD0A088FDF7AEFA807F8007800FF6 -:10A8B000012807D00021A088002201F035FA050008 -:10A8C00007D101E00121F6E785488449763010F090 -:10A8D00042FC0622A11DA86907F036FAD5E7162723 -:10A8E0000726002CBCD0A088FDF78DFA0090807F51 -:10A8F0008007800F012807D00021A088002201F0E6 -:10A9000013FA050007D101E00121F6E77448734905 -:10A91000843010F020FC2878C00601D5022000E029 -:10A920000120A071009800782328AED92721009833 -:10A93000FDF7A0FAA9E717270C26002C90D0A088D5 -:10A94000FDF761FA00906D7A002804D164486349EC -:10A95000973010F000FC0621A01D10F0CFFA002067 -:10A96000A071207A032108432072FB21084000993E -:10A97000C97FC907490F08432072680685D5E07969 -:10A9800004210843E071A07AE90740084000C90F9C -:10A990000843E17A2A0749084900D20F1143FD22F2 -:10A9A000AB07DB0F10405B001843A072E806C00F36 -:10A9B000114040000143E17267E710B50446807919 -:10A9C00090B08009012804D045484449C93010F0AE -:10A9D000C2FBFFF7BBF801206946087042480890A7 -:10A9E00042480190201D0290601C0B900AA9684605 -:10A9F000FDF71CF9002804D039483849D43010F04C -:10AA0000AAFB0322601C0B9910F01BFA10B010BDBA -:10AA100010B5364C002805D001461022204610F013 -:10AA200010FA0120207410BD10B50446FFF78EF80F -:10AA300010222E49204610F004FA10BD70B50025F2 -:10AA4000284C00281CD02A49884207D301218904B8 -:10AA5000884205D327490968884201D210250DE0B4 -:10AA6000062107F05BF9411C07D01E4940394865B3 -:10AA7000207C80210843207400E00725284670BD13 -:10AA8000207C4006400EF6E7F3B5002089B00D4665 -:10AA9000029000290AD0164885421CD30120800468 -:10AAA000854203D313480068854214D30998FDF703 -:10AAB000AAF9060003D03078222826D102E00E48F9 -:10AAC0000BB0F0BD002D19D1B07FC10903D08007B4 -:10AAD000800F022812D01020F2E700002C9E000008 -:10AAE0004D040000500E0020FFFF0000300D00203C -:10AAF00000C001002800002002300000B07FC10625 -:10AB000001D4010703D5002D01D00820D8E7FE4964 -:10AB1000097CC90717D1F17F490701D50D20CFE77F -:10AB20008007800F01280CD000210122099801F034 -:10AB3000FBF8070007D0B07F8007800F022804D001 -:10AB40000DE00121F1E71120BAE7002D07D02A46D8 -:10AB500039463046FEF764FF02900028B0D1EB483A -:10AB6000F8F7E6F9040003D1E949EA4810F0F3FAEE -:10AB70000A2020700998206238468830A060B07F93 -:10AB8000FB218007800F012829D0002D3DD0022015 -:10AB90002071381DE06038780007400F2074387845 -:10ABA000C006C00F6074A07C2A788008D20780009D -:10ABB000D20F1043A0740840F17F01AAC907490FC2 -:10ABC0000843A074A878E07469462846FEF769FF38 -:10ABD00068460079207568460078607519E00120A4 -:10ABE0002071207B2A788008D2078000D20F104382 -:10ABF0002073084029788907C90F8900084320730A -:10AC000024213046FDF736F90BE0032020710520A2 -:10AC1000207325213046FDF72DF9B07F4006400E08 -:10AC2000B07703A92046FDF701F8022806D00028D6 -:10AC300004D0B848B6492B3010F08DFA02983FE79F -:10AC4000FFB5B54A0E4607CA97B002AB07C3002747 -:10AC500001970C971798FDF7D6F8050005D02878CE -:10AC6000262804D008201BB0F0BDAC48FBE7A87F25 -:10AC70008007800F012807D000210022179801F0DB -:10AC800053F8040007D101E00121F6E7A148A049EB -:10AC9000623010F060FAA87F8007800F16900128BC -:10ACA00014D0022824D09B4899497B3010F053FAE5 -:10ACB00001210022852E31D01EDC002E26D0812ECF -:10ACC00026D0822E26D0832E1ED125E0002EEFD155 -:10ACD00021462846199AFEF7A3FE0028C3D11998E9 -:10ACE0008078019019980078C007C00F0C90DFE7BA -:10ACF0001998002808D1DBE7862E11D0882E11D0B4 -:10AD0000892E11D08A2E11D00720ACE710460EE014 -:10AD100008460CE002200AE0032008E0052006E0D7 -:10AD2000062004E0082002E0092000E00A200022BA -:10AD3000227101216A461176211D0791002801D058 -:10AD400020710BE1169801280CD0A66AE06A022255 -:10AD5000012111900020A0602846173002291AD046 -:10AD6000012119E0E66AA06A119003203070207872 -:10AD7000FB23C006C00F7070B07801221840019B01 -:10AD8000F37080080C9B800018430221B0700020F3 -:10AD900070713071DEE70021890009190861681CB3 -:10ADA000022A01D0012100E000218900091908616F -:10ADB000B0788007800F01285ED1119880788007D5 -:10ADC000800F012858D1119800790190119840798D -:10ADD0000090169801281DD0317908A80174717966 -:10ADE000017508A8027C01980099024008A8007D1E -:10ADF0000840149010433FD049491A98884207D31D -:10AE000001218904884215D346490968884211D234 -:10AE1000102028E70CAA0DA91998FEF742FE08A8F1 -:10AE2000007C01990840307108A8007D0099084015 -:10AE30007071D6E720463C3021460090F0311698DC -:10AE40000191022834D000211A9B20460C33FEF7D2 -:10AE500091FE0028DDD12046503021460090F4318B -:10AE600016980191012825D0002120461A9B149A9A -:10AE7000FEF780FE0028CCD111988078400702D4DC -:10AE8000E87FC0072BD0169902A8012914D0119988 -:10AE900009784900405A21780907490F4900C840FC -:10AEA0008707BF0F2AD0012F14D0022F0FD113E034 -:10AEB0000121C9E70121D8E721780907490F490095 -:10AEC000405A119909784900C8408707BF0F032FDE -:10AED00004D004E0022711E001270FE002271698B2 -:10AEE00001280BD1B078FB210840E97FC907490F41 -:10AEF0000843B07020780007400F30702078400879 -:10AF00004000207011990FE0500E0020440D0020E9 -:10AF10002C9E0000A90500001CB4010002300000B6 -:10AF200000C001002800002049781022C907C90E7E -:10AF3000D243114308402070C00622D4022F20D0F3 -:10AF4000012F20D00020A061E061206260622046D5 -:10AF50001830A060E87F40084000E877204606A946 -:10AF60008830FCF73FFE002805D0022803D0B44902 -:10AF7000B44810F0F0F825212846FCF77BFF0020AC -:10AF800071E6032008E020460D211B300FF0B6FFCC -:10AF900020461830A060042069460875E87F01212A -:10AFA0000843E87705AA29461798FEF7B7FDD5E7C5 -:10AFB000F0B587B015460F0004460DD0A248854273 -:10AFC00007D301208004854206D3A048006885424B -:10AFD00002D2102007B0F0BD2046FCF714FF060097 -:10AFE00004D03078272803D00820F3E79848F1E709 -:10AFF000B07F8007800F012807D000210022204663 -:10B0000000F092FE040007D101E00121F6E78D482F -:10B010008B491F3010F09FF80020002F05D0022F21 -:10B0200008D0012F11D00720D4E701216A46117101 -:10B03000A06018E0234618336946A3600871102207 -:10B04000294618460FF0FDFE0DE021461831A1609B -:10B0500069460871A061E0612062606206212846AD -:10B0600006F05CFEA0612078C10714D040084000C3 -:10B070002070022069460870204618300290703017 -:10B08000FCF7B0FD022806D0002804D06D486C49BA -:10B09000423010F060F825213046FCF7EBFE00202E -:10B0A00098E7F8B515460E460746FCF7ACFE0400D7 -:10B0B00004D02078222803D00820F8BD6448F8BDC9 -:10B0C000A07F8007800F022802D06148C01CF8BD15 -:10B0D0005D4886420ED3012189045C4A8E4202D328 -:10B0E00013689E4206D3854204D38D4204D3106870 -:10B0F000854201D21020F8BD00953288B31C21464C -:10B100003846FEF7B0FD112816D00028F3D1E17FB4 -:10B110002A7C4908D2074900D20F1143E1772A7CE3 -:10B1200049079206490FD20ED2001143E177A17F61 -:10B130004906490EA177F8BDA17F0907FBD4204637 -:10B140000822B11C34300FF07CFE30886086204627 -:10B150001022294622300FF074FEE07FFD210840C6 -:10B16000297CC907890F0843E077287C4108202003 -:10B170000155A07F08210843A0770020D7E770B5CC -:10B1800094B00D460646002B02D0072014B070BDC7 -:10B19000FCF739FE040007D02078222802D3A07FD4 -:10B1A000400603D40820F1E72948EFE7002D19D025 -:10B1B0002D216846017046801022294601A80FF013 -:10B1C00040FEE07F297C4008C9074000C90F0843C2 -:10B1D000E077297C40078906400FC90EC900084363 -:10B1E000E07703E02E2168460170468009A9684691 -:10B1F00000F0A3FCA17FBF221140A177C6E710B5E4 -:10B200000C46FCF700FE002805D0104909688C4266 -:10B2100003D2102010BD0E4810BD2146FEF7FEFCE3 -:10B22000002010BD05E00278401C002A01D000205B -:10B2300070470A46491E89B2002AF4D1012070479E -:10B240002C9E0000ED06000000C001002800002038 -:10B250000230000030B50346072903D00620DA7813 -:10B260001C7916E00320FAE707290BD05500ED18EA -:10B270006D79072D01D0401EC0B2521CD2B2092AEE -:10B2800007D105E05500ED186D79072DF3D0F4E7EF -:10B2900000222546641EE4B2002DE5D130BDFFB585 -:10B2A00081B00C461646114620460A9F0B9DFFF7BB -:10B2B000D1FF00280AD02079092803D3FEA1A020BD -:10B2C0000FF049FFA078C00907D019E0072E02D07F -:10B2D000112005B0F0BDFD48FBE701982880381D1E -:10B2E0006880002068712871EF80049828812846C2 -:10B2F00000F04BFC002803D1EFA1AD200FF02BFF95 -:10B30000E07821794018491CC0B22171092801D385 -:10B310000938C0B24000001946718179F12249080C -:10B320004900114081710020D3E7FFB583B0164674 -:10B330000F461C46002203210C9D039800F0F4FCEC -:10B34000010008D033463A46019500940398FFF770 -:10B35000A6FF07B0F0BDDD48801EFAE7F0B5054650 -:10B3600016460F4650888DB00022032100F0DCFC09 -:10B37000040003D1D0A1DF200FF0EDFE00206946CC -:10B380000871A078400603D1CBA1E3200FF0E3FEC3 -:10B39000042F5ED32A78D007C017401C06D16178ED -:10B3A0006B78994255D12178090752D00121142A8E -:10B3B00046DA012A42D0122A02D0132A40D128E0CC -:10B3C0000C2F3DD1A2785206520E012A38D0207897 -:10B3D00000090001401C20706878607068460171A7 -:10B3E00068792A790102114368460181E879AA79CE -:10B3F0000102114368464181687A2A7A01021143A9 -:10B4000068468181E87AAA7A010211436846C181BF -:10B410001AE0062F14D120780009000120707188ED -:10B42000012001F0EAF8022168460171C91E01817C -:10B4300068792A790102114368461FE0062F0AD075 -:10B440006A461279002A1BD07088324601A9FDF79E -:10B4500020FB0DB0F0BD207800090001207071883C -:10B46000012001F0CAF802216846017168792A7941 -:10B4700001021143684601810021C9434181E3E78C -:10B480000028E6D07488684681766978C176022102 -:10B4900081830021C18304A8052200900623114660 -:10B4A0002046FFF742FF0028D3D089A1D6200FF015 -:10B4B00052FECEE7F7B58CB015460C990D98FAF709 -:10B4C00041F9C0B2082850D10020694688856888B3 -:10B4D0000022032100F028FC040004D1FF2076A103 -:10B4E00063300FF038FE01230021E07822790BE071 -:10B4F0004600361976799E4201D1491CC9B2401CDA -:10B50000C0B2092800D100201646521ED2B2002E29 -:10B51000EED1002902D117206946888504AB023399 -:10B520000BAA00950C990D98F8F7B6FB0006000ED3 -:10B5300007D002281BD0032817D0FF205EA1893036 -:10B5400011E06846808D00280FD002A9019100907B -:10B550006888042301222146FFF7A1FE002804D0B9 -:10B56000FF2055A176300FF0F6FD0FB0F0BD6878E2 -:10B57000102108436870F8E700205A49024643004A -:10B58000401CCA520828FAD3704700218170017804 -:10B5900009090901017000214170C17001717047F2 -:10B5A00070B50D460022032100F0BEFB040004D15B -:10B5B000FF2041A1CF300FF0CEFDA0786906C00971 -:10B5C000C001490E0843A07070BD704710B5014618 -:10B5D000012001F012F810BD3EB58DB2002203210A -:10B5E000284600F0A1FB040004D1FF2032A1E43082 -:10B5F0000FF0B1FD2078694600090001207002209B -:10B60000087039488880C88000222846FDF741FA32 -:10B610003EBDF7B505460078002700090C463E46BA -:10B62000012804D0FF2024A1F3300FF094FD287AE4 -:10B6300003280CD0412020A1C0000FF08CFD0298FF -:10B64000002C068001D0278066800020FEBDEA899C -:10B65000702710460A3086B2002C0AD06888A08075 -:10B66000A8892081E28020460A3029690FF0E9FB91 -:10B67000E5E702980680E8E7F8B543680246D9791D -:10B680009C79090221435C7A1E7A25025C88981D08 -:10B690003543241FA14238D11B79022B35D1042D0B -:10B6A00034D0052D3DD0062D34D0402D2DD3061D90 -:10B6B0000F461446284619E07372635C6C3263616E -:10B6C000705F636F72652E6300000000043000003D -:10B6D0007372635C6C326361705F636F72652E635B -:10B6E00000000000680E0020FFFF000000F0E3F9FA -:10B6F00008280AD01120207003202072A581E7813C -:10B7000026616078082108436070F8BD001DFFF7CE -:10B71000D1FEF8BD031D50880A461946FEF771FE9A -:10B72000F8BD001DFFF71AFEF8BD70B50D468CB0D0 -:10B7300006460022032100F0F7FA040031D02078F9 -:10B740000007000F01282ED0122069468874607807 -:10B750000523801CC874082088822888C8826888CD -:10B760000883A8884883E888888302A90C2001916F -:10B7700000901A4621463046FFF791FD00280ED171 -:10B78000F02300223146012000F090FE20780009CD -:10B790000001401C20706078801C607000200CB09C -:10B7A00070BDCB48FBE71120F9E770B50D468CB0B2 -:10B7B00006460022032100F0B7FA040006D02078E4 -:10B7C0000007000F012803D00820E8E7C048E6E79B -:10B7D0001321684681746178C17402218182C58217 -:10B7E00002A906200523019100901A462146304601 -:10B7F000FFF755FD0028D2D1207800090001207004 -:10B800000020CCE7F3B581B00D460022032101985A -:10B8100000F08AFA00260446002803D1AD49AE485C -:10B820000FF099FC2079A8423BD2AB48A949401CB3 -:10B830000FF091FC35E0E07841000F19401C797958 -:10B84000C0B20091E070092801D10020E070207999 -:10B85000401E2071B879C00708D0009801990428CB -:10B8600015D09C49822018310FF075FCB87900077B -:10B87000410F08D0400F019904280CD095498F2022 -:10B8800018310FF068FC009807280AD107E0084635 -:10B89000FEF74CFEEAE70846FEF713FEF3E7761CD8 -:10B8A000F6B228466D1EEDB20028C4D13046FEBD6A -:10B8B00010B50022032100F037FA040004D1B520AE -:10B8C000844980000FF047FCE07821794018C0B22D -:10B8D000E070092801D30938E07000202071A078B9 -:10B8E00080210843A07010BDF8B517460D46002210 -:10B8F000032100F019FA040005D0002D0CD0002F10 -:10B9000007D0062006E0072D01D00620F8BD032051 -:10B91000F8BD0820A84204D86F486E4942300FF0A5 -:10B920001AFC29462046FFF795FC0646002F28D032 -:10B93000002E26D1E07821791CE0420012195379BB -:10B94000072B03D093791B075B0F04D0401CC0B2B8 -:10B9500009280CD00CE0400000198079F123184030 -:10B960006B071B0F1843907100290AD104E00020D7 -:10B97000491EC9B20029E0D1574856495A300FF044 -:10B98000EAFB3046F8BDF8B50D460022032100F071 -:10B99000CBF9040004D150484E4968300FF0DBFB6E -:10B9A000681E052804D34C484A4969300FF0D3FB80 -:10B9B0000921E2782079002310E0560036197779C2 -:10B9C000AF4206D1B17949084900B1715B1CDBB2C5 -:10B9D0001146521CD2B2092A00D100220646401E4E -:10B9E000C0B2002EE9D1092905D248000019817999 -:10B9F0000122114381711846F8BD10B50446402854 -:10BA000001D2072010BD00F056F8082802D03120DE -:10BA1000000210BD0021314802E0491C082903D270 -:10BA20004A00825A002AF8D1082903D0490044521A -:10BA3000002010BD042010BD10B5402801D2072001 -:10BA400010BD00F038F8082805D00021234A400036 -:10BA50001152084610BD052010BDF0B58BB016463A -:10BA60000C00074607D0002E05D06188402904D27B -:10BA700007200BB0F0BD1020FBE72088002801D084 -:10BA8000172801D90C20F4E7084600F014F808281C -:10BA90000FD0258803A82A46314602300FF0D1F98D -:10BAA00001A8009062882B4607213846FFF73DFC2D -:10BAB000DFE70520DDE701460020084A02E0401CE0 -:10BAC000082803D24300D35A8B42F8D170470000B4 -:10BAD00002300000B8B60000AD020000680E002081 -:10BAE00000B51E2827D00FDC0C2820D008DC03006E -:10BAF0000FF052FC0913211521211B1B17192100DE -:10BB0000122818D1072000BD302814DD3A38030070 -:10BB10000FF042FC030F11091100002000BD214865 -:10BB200000BD042000BD0D2000BD0F2000BD082079 -:10BB300000BD112000BD032000BD10B50C4604F06F -:10BB4000A0F800281ED0204602F013FE002816D0D0 -:10BB500022780E2A0DD00F2A0BD0022A09D0032AF0 -:10BB600007D0102A09D010A17E200FF0F4FA00208F -:10BB700010BDA078FFF7B4FF10BD112010BD0AA1C1 -:10BB80008420F2E708A18A20EFE710B502F0A2FCBA -:10BB900010BD10B502F0EDFD10BD10B502F01AFD9C -:10BBA00010BD0000023000007372635C686F737434 -:10BBB0005F6863692E630000F8B5054606ACC1CC2A -:10BBC000E44C21706270A370E070681C4208277119 -:10BBD0005200E14B66710021880000198446026220 -:10BBE000605C40008218002D0AD0002005E0664607 -:10BBF0004700366A401CF353C0B2665C8642F6D8F2 -:10BC0000491CC9B20629E7D30026D21C9708B00008 -:10BC1000BF0000198760304600F02AF9A15D761C4C -:10BC20004843C219F6B2062EEFD3501B80B2F8BDBE -:10BC3000F0B504468C46C7490020A500FF23024604 -:10BC40006D18C54E0C5D0BE02F6A5100795AB14258 -:10BC500004D1401CC0B2FF2B00D11346521CD2B2FB -:10BC60009442F1D8002801D061460B70F0BD70B548 -:10BC7000B84C0023655CA678B54200D10346890024 -:10BC800009199D420AD90C6A5E00A45B844202D164 -:10BC90001370012070BD5B1C9BB2F2E7002070BDE9 -:10BCA000FFB583B00C9C1F460D46060009D0002D41 -:10BCB00007D0F01C80088000B04204D0102007B0EC -:10BCC000F0BD0E20FBE70598A04201D8A74201D99C -:10BCD0000720F4E701460094019423463A460020E9 -:10BCE0000294FFF769FF2988814207D0814201D27F -:10BCF000042100E0092128800846E0E7009401942F -:10BD000023463A46029430460599FFF755FF2880AE -:10BD10000020D4E710B5044600F0B4F8002801D0A4 -:10BD2000E0B210BDFF2010BDF8B505468A481646A2 -:10BD30000C46854201D0062C01D30020F8BD002717 -:10BD400069460F7028466A462146FFF790FF002893 -:10BD50000DD068460178204600F09CF8002EEDD00A -:10BD60000028EBD12146284600F0A0F8F8BD38465F -:10BD7000002EF7D1F8BDF8B505460C460020764EEA -:10BD80006946764F0870B5423BD0062C01D3072098 -:10BD9000F8BD0A4621462846FFF769FF002830D043 -:10BDA00068460178204600F075F823000FF0F4FA99 -:10BDB000060404090C11161B01462846FEF742FA38 -:10BDC00015E0FDF735F812E001462846FFF7FDFBC8 -:10BDD0000DE001462846F7F7E4FE08E00146284654 -:10BDE000F9F73AFB03E05EA17C200FF0B4F9594A61 -:10BDF0006846A10000788918096A40000E520020A8 -:10BE0000F8BD3846F8BD5A4A1268914201D2102056 -:10BE10007047062801D30720704708720020487237 -:10BE20007047F8B5044652480068844201D2102099 -:10BE3000F8BD207A474A83009B18617A464D125C10 -:10BE400011E01E6A4F00F65BAE420AD04A1C6272D5 -:10BE50001A6A4B00D25A228000F01CF86060002061 -:10BE6000F8BD491CC9B28A42EBD861720520F8BD01 -:10BE70000EB5404B40000ECB0091029301926946F3 -:10BE8000085A0EBD33498978814201D90120704793 -:10BE90000020704770B50C460546FFF7E9FF2D4AB4 -:10BEA000A900891889686043401870BDF8B5044638 -:10BEB0000E4600206946087005462046FFF7E2FF5F -:10BEC000002803D126A1F3200FF045F92148214B8A -:10BED000815D8278B000C718914209D1E0B269460D -:10BEE0000870396A4000085A1B49884206D02EE083 -:10BEF00069463046FFF79CFE002828D06846007847 -:10BF0000396A40000C52684601783046FFF7C2FF9C -:10BF1000054633000FF040FA060404090C0F14170D -:10BF200029462046FEF760F911E0FCF75EFF0EE0BF -:10BF3000FFF72BFB0BE029462046F7F7F9FD06E05B -:10BF4000F9F783FA03E006A162200FF004F928460E -:10BF5000F8BD0000780E0020FFFF00000230000056 -:10BF60007372635C686F73745F636D2E63000000AF -:10BF70002800002028B401008107C90E002808DA33 -:10BF80000007000F08388008C24A80008018C06986 -:10BF900004E08008C04A800080180068C84000069D -:10BFA000800F7047BD4948788978884201D3401A8C -:10BFB00002E02122511A0818C0B27047B749233154 -:10BFC00048788978884201D3401A02E02122511A28 -:10BFD0000818C0B27047B14946314878897888421C -:10BFE00001D3401A02E02122511A0818C0B270474A -:10BFF000A94910B50C310868FF22120290430122B2 -:10C00000D20310430860A54900202331487088708E -:10C01000233948708870463148708870A04806F00F -:10C02000BCF89F48401C06F0B8F8F6F7A3FB00F0F8 -:10C0300028F910BD20207047B4E770B50C460546BE -:10C040000026FFF7AFFF9549A04214D30A46203AD5 -:10C0500000232046641EE4B200280BD08878105CD0 -:10C06000287088786D1C401CC0B288702128F0D1DF -:10C070008B70EEE7012600F004F9304670BD2020F9 -:10C0800070479BE770B50C4605460026FFF796FF04 -:10C0900082492331A04214D30A46203A0023204685 -:10C0A000641EE4B200280BD08878105C2870887871 -:10C0B0006D1C401CC0B288702128F0D18B70EEE757 -:10C0C000012600F0DEF8304670BD2021017000200E -:10C0D000704710B50446FFF77EFF2070002010BDAA -:10C0E00070B50C460546FFF776FF6C494631A04215 -:10C0F00015D30A46203A00232046641EE4B20028E5 -:10C100000BD08878105C287088786D1C401CC0B2F9 -:10C1100088702128F0D18B70EEE7002400E0614C9C -:10C1200000F0AFF8204670BD70B50C4605462129D9 -:10C1300004D9FF205CA147300FF00DF85548406846 -:10C14000103840B2FFF718FFC6B20D20FFF714FFFA -:10C15000C0B2864207D2FF2053A14D300EF0FBFF44 -:10C1600001E0F6F74AFB21462846FFF766FF002864 -:10C17000F7D070BDF8B507464948484C401E474EB9 -:10C180000078254646362335002806D1A9786878F8 -:10C19000212200F06BF800280ED0A17860782122CF -:10C1A00000F064F8002814D0B1787078212200F0F3 -:10C1B0005DF8002828D033E038496878C91C0F544E -:10C1C0006878401CC0B26870212829D100206870AE -:10C1D00026E03249607820390F546078401CC0B2A4 -:10C1E0006070212801D1002060702D4F7F1E3878AB -:10C1F000002815D0A1786078212200F037F80028B7 -:10C200000ED0002038700BE02449707826310F548E -:10C210007078401CC0B27070212801D1002070706D -:10C22000A9786878212200F021F800281DD0A17893 -:10C230006078212200F01AF8002816D0B1787078C2 -:10C24000212200F013F800280FD0F6F7B8FA1448AE -:10C2500005F0ABFF01214903884203D016A1C1209C -:10C260000EF079FF0E4805F0B8FFF8BD401C88427B -:10C2700005D0904201D1002901D000207047012053 -:10C28000704710B5064805F090FF002801D1F6F779 -:10C2900085FA10BD00ED00E000E400E0F00E0020A3 -:10C2A00069000020072000007372635C736F635F96 -:10C2B00072616E642E6300007372635C736F635F00 -:10C2C00072616E642E630000FEB5F54C074660682F -:10C2D000FF213E0181552178FF2913D00901083142 -:10C2E00041583246491E083209020192090A805813 -:10C2F00000F0CCF9002802D02478254615E06168CA -:10C30000207888552770FEBDE5484268019811588D -:10C31000280100900830105800F0B8F9002806D124 -:10C32000DF482C46416800980D5CFF2DECD1DC48BD -:10C330002101406885554754FEBD70B5D84A044672 -:10C340000020157A53680AE00201561C9E5DA64241 -:10C3500003D10C329A588A4204D0401CC0B28542A4 -:10C36000F2D8FF2070BDF8B5CD4F3E7801F00AFE3F -:10C370000146FF2E68D034012546786808354059BB -:10C3800000F084F9022802D9786840595AE0C4497B -:10C390004868025D0A70A11C425C002A0CD0521E43 -:10C3A000425441590122D20589180902090A415112 -:10C3B0003046FFF789FF30E0631CC25C0092221D0B -:10C3C00094468258002A10D001239B029A420FD92A -:10C3D0009205920D43595703DB191B021B0A435167 -:10C3E0006346C3589A1A920A09E0FF21C1540AE031 -:10C3F000435952039A181202120A4251002242541F -:10C400003046FFF761FFA6480C344168C2680098C7 -:10C4100009598000125800989047A14C2078FF28B5 -:10C4200012D001F0AFFD01462078626800010830AB -:10C43000105800F02BF9012896D920786168000186 -:10C440000830085801F091FDF8BDF8B51C461546B6 -:10C450000E460746FF2B03D392A1D3200EF07BFE9E -:10C460008F48FF21C7604560047206740170002286 -:10C470004270104604E00201521C401CA954C0B294 -:10C48000A042F8D3F8BD70B5854C06466578207C8F -:10C49000854203D383A1E6200EF05DFEE068A9008B -:10C4A00046506078401C6070284670BDFFB581B072 -:10C4B0001D46FF2401F066FD794F06467978019804 -:10C4C000814203D877A1F4200EF045FE7448002184 -:10C4D000037A406810E00A019446521C825CFF2AED -:10C4E00024D0019FBA4205D162460C328758029A85 -:10C4F00097421DD0491CC9B28B42ECD8FF2C17D0F3 -:10C5000021014B1C019AC2540B33029AC250039B67 -:10C51000634F0022012B0ED00B1DC25001239B0242 -:10C520009D4216D9AA05920D08D008E00C46E1E715 -:10C53000FF2005B0F0BD0B1DC550EFE71A465303B1 -:10C540009B190E461B0208361B0AAA1A8351920A2F -:10C5500009E0002D00D101256B039B191D022D0A56 -:10C560000B460833C550891C42543D463E78204650 -:10C57000FFF7AAFE2878B04217D001F003FD01466C -:10C5800028786A6800010830105800F07FF8012808 -:10C5900007D92878696800010830085801F0E5FCDF -:10C5A00003E001F010F9F5F7AFFE0198C1E770B5AF -:10C5B0000C46054601F0E6FC064621462846FFF7F4 -:10C5C000BCFEFF2817D0364D0401204669680830AC -:10C5D0000858314600F05AF80121090340186968EB -:10C5E000A41C095D400B002901D08902081800280D -:10C5F00000D1012070BD002070BDF3B581B00F46A1 -:10C600000198FFF79AFEFF282AD0254D2E786968F9 -:10C610003246344604E0844205D026462301CC5CF1 -:10C62000FF2CF8D11CE0FF2C1AD0A64221D110011A -:10C63000085C2870FF281AD001F0A4FC2A78014673 -:10C64000120168680832805800F020F8012809D9E2 -:10C650002878696800010830085801F086FC08E075 -:10C660000020FEBD01F0AFF8F5F74EFE01E001F04D -:10C6700084FC39460198FFF79AFF22016968FF237D -:10C68000541C0B558A5C3301CA54FEBD401A00028B -:10C690000121000AC905884200D900207047000026 -:10C6A0003C0F00207372635C736F635F74696D6528 -:10C6B000722E6300F0B500241C4A01211C4B0803B4 -:10C6C000546018601B4B1C601B4C20601B480469A5 -:10C6D000E443E406E617046910252C430461184C72 -:10C6E0006160184D2960761C00E020BF1F68002F94 -:10C6F000FBD0002E03D107691026B743076190686D -:10C700008005906801D5104A10436960A16000213E -:10C7100019600121084A09031160F0BD10B50446F3 -:10C72000FFF7C8FF2060002010BD000000C50040DA -:10C7300080E100E000C1004080E200E000ED00E0A8 -:10C7400000C3004000C0004000FCFFFF70B51F495F -:10C750000A68002A17D000231D4601244A68521C8B -:10C760004A60092A00D34D600E792246B2400E6815 -:10C7700016420AD072B60B6893430B6062B64968E2 -:10C780000160002070BD052070BD5B1C092BE5D346 -:10C790000FA136200EF0DFFCF5E7012010498005DF -:10C7A00008607047EFF31081CA07D20F72B60121FB -:10C7B00081400648036819430160002A00D162B62F -:10C7C000EBE70248002101604160704770000020E3 -:10C7D0007372635C736F635F6576742E6300000031 -:10C7E00000E200E001208107086070470120810716 -:10C7F000486070471048C068C00700D001207047EB -:10C800000D488068C00700D0012070470A48406981 -:10C81000C00700D0012070470748C069704706492B -:10C820008A69D20306D589698907890F814201D1B6 -:10C83000012070470020704700040040F8B5F74C15 -:10C84000207EE17D88421CD00126F54D0027E07D49 -:10C85000215C14200A4642435019037C052B11D059 -:10C86000037C062B1CD0037C072B28D0437C012B98 -:10C8700033D0ECA1EE480EF06EFC207EE17D8842C4 -:10C88000E5D1F8BD0674E07D162807D0E07D401C98 -:10C89000E075491CC8B2AA5802210CE00020F7E755 -:10C8A0000674E07D162808D0E07D401CE075491C28 -:10C8B000C8B2AA5803219047DFE70020F6E70674C4 -:10C8C000E07D162807D0E07D401CE075491CC8B209 -:10C8D000AA580821EFE70020F7E74774E07D162803 -:10C8E00007D0E07D401CE075491CC8B2AA5807215A -:10C8F000E1E70020F7E770B50024CE4E0C207072FF -:10C90000CD4825464473047328300476C475CB485B -:10C9100005F043FCCA480575F572CA49601E886077 -:10C920007571B570F57035717570C748E839057067 -:10C9300045701420604340180574641CE4B20B2C4D -:10C94000F7D30120F5F7E0FF0020F5F7DDFF012028 -:10C95000B071F5F7A3FCBD48F5F7B2FCBC4C2070F4 -:10C96000BC48F5F7ADFC6070F5F76EFF70BD10B513 -:10C97000F5F795FFB64C2078F5F7C0FC6078F5F731 -:10C98000BDFCAC4C207A002803D0F5F746FD002012 -:10C99000207210BD70B5A74CA079002804D0A1A1C9 -:10C9A000AD480EF0D8FB70BDE07A002803D19DA100 -:10C9B000AA480EF0D0FB0126A6710025E572607A28 -:10C9C000042114225043964A801801749D488168BE -:10C9D000491C04D0691E81600120F5F795FF0020F5 -:10C9E000F5F792FFF5F776FF05F018FDF6F777F803 -:10C9F0009B480560056001209A49C0030860F6F76E -:10CA0000EDF891480078022804D0032804D1E0789A -:10CA1000002801D0A67000E0A570F6F74CF870BDB4 -:10CA200003467F490B20142242435218203A127FBA -:10CA3000002A04D0401E0006000EF4D170471422D4 -:10CA4000424351180A46803AD366012220390A77B8 -:10CA50007047012805D0032805D1002903D1002003 -:10CA600070470029FBD010B4724C00236370764AE3 -:10CA7000002890700CD002280AD007291AD208008A -:10CA800078440079001887441505070D0F1113002D -:10CA9000D37003E01B2000E03A20D07001206070CA -:10CAA00010BC70475820F8E77720F6E79620F4E7A7 -:10CAB000B520F2E710BC0020704710B562484078FE -:10CAC000F6F714F880B210BD411E1422504310B581 -:10CAD000534A8418203C0A2902D8207F002803D119 -:10CAE00050A161480EF037FB207F012804D0B3200D -:10CAF0004CA180000EF02FFB0020207710BD70B5F8 -:10CB00004D4C607B217B884201D1012500E000254E -:10CB1000F5F785FFF5F7EAFF617B227B914201D1B2 -:10CB2000012100E00021A942EBD170BDF7B5064616 -:10CB3000481E84468EB0C0B2142205905043384A35 -:10CB400085180495287C2D1D07282AD1334C0027F1 -:10CB5000E07D227E824221D0235C059A934201D15E -:10CB6000012701E0002F04D0162811D0421CA25C3E -:10CB7000225416280ED0401C227EC0B28242EBD135 -:10CB8000002F0BD0207E002806D0207E401E04E01F -:10CB90000022ECE70020EFE716202076049801221F -:10CBA00002746046234C0A2813D8142041431C48C1 -:10CBB00008182038007F00280BD00498007C01283A -:10CBC0000BD00498007C012803D01098807A0128AB -:10CBD00007D014A125480EF0BEFA1098807A0128DB -:10CBE0006DD104980E4B007C022843D00B4C207E64 -:10CBF000162870D0207EE17D401C884203D109A117 -:10CC00001B480EF0A8FA049901204874217E05986B -:10CC10006054207E162862D063E0000038110020A6 -:10CC2000541100207372635C72656D2E6300000006 -:10CC3000D40500005C1200201011002068120020B2 -:10CC4000201100203C1200207A00002067C3000061 -:10CC5000780000203DC800007D0200005E02000058 -:10CC600000F5004080E200E0CB0200001503000068 -:10CC700022030000607A059A0146904206D00146E0 -:10CC800014277843C018807C9042F8D1627A82429F -:10CC900008D1617A14225143C918897C617201213B -:10CCA000A17207E014224243D21814277943927CE0 -:10CCB000C9188A7414220C215043C018817410982A -:10CCC000007A06281DD201007944097949188F4459 -:10CCD0000C161412100EE07D002890D093E700206F -:10CCE00001E0207E401C2076B5E000210FE0B42159 -:10CCF0000DE073210BE0322109E00A2107E0062153 -:10CD000005E0FF20FDA1E0300EF025FA002110988B -:10CD100002910068401A28601099097A002912D0FF -:10CD20000221401A0102090A29601098026840682D -:10CD300010180002000A68601098807A0228109883 -:10CD400003D0007B71E00421EBE7007A002812D0C9 -:10CD500002220298121810984368104610301818D2 -:10CD60000A90E948029B4078984202D9E378002B68 -:10CD700003D00A9805E00422EBE7029BC31A0A9845 -:10CD80001818637A10300C2B1CD0637A14277B435D -:10CD9000DE4FDB195B68994214D0DD4F617ABC46E7 -:10CDA00014235943D94BC9184B6889689B1B891BAD -:10CDB0001B0209021B0A090A984237D8634535D875 -:10CDC000614533D831180A980123081A0002000A75 -:10CDD000286010998018C9680002000A471ACD4AD5 -:10CDE0009B05BC469F4201D2384610E00F1A9F4275 -:10CDF00001D260460BE0944503D9511A0818401C33 -:10CE000005E0974206D9101A4018401C40420028FD -:10CE10005FDC03E0B9A1C0480EF09DF929680A98CB -:10CE200008180002000A686000202872686810274D -:10CE300010300002000A68601098407AA8721098BA -:10CE4000007A687203280ED200280CD0FFF7D2FCBB -:10CE5000002803D007E0002011B0F0BD0298422165 -:10CE60000F1A32200290A8490878012801D003281F -:10CE700009D148780299884205D9E178002902D180 -:10CE80000299401AC7196B6828689B1B801B9C4637 -:10CE900001021B029E4A090A1B0A8F4219D8174633 -:10CEA000914216D8BB4214D8617A0C2915D0677A02 -:10CEB00061460C22039200921422944B7A43D218BA -:10CEC00093689B1B834216D80397977C0C2FF3D152 -:10CED00073E0059801F04CF9BDE70498022205992A -:10CEE0000274627A0C2A00D0627A82746172012024 -:10CEF000A07211B0F0BD0C2F5FD0002238469446CE -:10CF00001422824B4243D21853689B1B8B4225D27A -:10CF1000907BAB7A98421BD804980521059D01743B -:10CF20007E4C207E16280FD0207EE17D401C88425A -:10CF300003D172A17A480EF00EF9207E2554207E8E -:10CF4000162800D0CDE6CAE6E07D0028F1D0F4E74F -:10CF500001208446907C0C28D2D102E06146002951 -:10CF60002AD03D46009014202A46424367480621B5 -:10CF7000161831741C38007E1628684816D0017EB9 -:10CF8000C07D491C814203D15CA166480EF0E3F8E4 -:10CF90006248017E4554017E16290BD0017E491C52 -:10CFA0000176B57C0098A842DDD106E0C07D00285E -:10CFB000EAD0EDE70021F3E7009704990220534DF2 -:10CFC0000874607AB84207D104990098887405986B -:10CFD00060720120A07221E003980C2F0FD00C2862 -:10CFE00003D146A150480EF0B6F8039814225043DE -:10CFF0004019059981740499009888740EE00C28F2 -:10D0000003D13EA149480EF0A6F8039814225043DC -:10D0100040190599817404990C208874012011B07D -:10D02000F0BD70B50D46424A441900210B46101A56 -:10D030008B4103D231A13F480EF08DF83E48854226 -:10D0400003DD2EA13D480EF086F83D48854203DA07 -:10D050002AA13C480EF07FF83B48844205DA002CB8 -:10D0600001DB204670BD384800E03848201870BD0C -:10D07000401E70B5C0B21421484324494418607B57 -:10D08000062813D201007944097949188F44020C0B -:10D090000A080604002067E0B42010E073200EE0C8 -:10D0A00032200CE00A200AE0062008E0FF2013A14D -:10D0B000E0300EF050F8617B0020002954D00221AE -:10D0C0004018616840180002000AF5F70FFD0C25B2 -:10D0D0006557174A441900210B46101A8B4103D299 -:10D0E00006A114480EF037F81348854203DD03A16A -:10D0F00012480EF030F81248854229E07372635CE2 -:10D1000072656D2E630000007A000020541100202B -:10D11000FFFF3F00FFFFFF00130700003811002052 -:10D1200007020000C5030000DD030000E303000068 -:10D13000FF7F841EF50300000020A107F603000016 -:10D1400000E05EF8F70300000080841E00807BE1B1 -:10D1500003DAF749F7480DF0FEFFF748844207DA93 -:10D16000002C03DB204670BD0421A9E7F24800E053 -:10D17000F248201870BDF0B5064683B0F048019023 -:10D18000457A029534687068001B0702ED483F0A33 -:10D19000001B00900C2D2DD0142029464143EA4855 -:10D1A0000122081884464168E64892058646081B15 -:10D1B000904210D3631A93420DD3024670467245D3 -:10D1C00003D900984018401C05E073450ED9411A58 -:10D1D0000819401C404200280CDA60460295857C04 -:10D1E0000198C0790028D5D003B0F0BDD049D74808 -:10D1F0000DF0B1FF0298854226D014214843D24950 -:10D200000123401802908068CE499B058C46011B83 -:10D210008646994210D3221A9A420DD3634661453D -:10D2200003D900997144491C06E0194662452DD97D -:10D23000091A0819401C4142002905DD0298B17AFB -:10D24000807B814200D374460C2D15D0BE4914203A -:10D25000454368184268121B1202120ABA420BD2E6 -:10D26000B37A827B934200D38468857C0198C0792D -:10D270000028B9D10C2DEAD13068A042B4D0E01911 -:10D280000002000A3460706003B0F0BDA849AF48E6 -:10D290000DF061FFD8E7F0B5AD490446486885B0A8 -:10D2A000C005C00D1CD0103840B200280CDA0207AF -:10D2B000120F083A920892005118C9698007C00EEF -:10D2C000C1400806800F09E08108A24A8900891838 -:10D2D00009688007C00EC1400806800F002808D0EA -:10D2E00000272078002806D0012804D0002005B0AF -:10D2F000F0BD0127F5E72079062813D20100794413 -:10D30000097949188F44020C0A080604002018E025 -:10D31000B42010E073200EE032200CE00A200AE076 -:10D32000062008E0FF208249E0300DF014FF21794B -:10D330000020002905D002214618814D002F02D07F -:10D3400003E00421F8E70020E871694602AAA0681A -:10D35000F5F7D6FB694608228A56E06801A98018CD -:10D360000122C01C1F2801DA019209E003AAF5F787 -:10D37000C7FB6846007B002802D00198401C019042 -:10D3800000990198401810300002000A0190881B93 -:10D390000002000A00906079694688720098039044 -:10D3A000F5F73DFB009A019B121A181A6A491202FE -:10D3B0000002120A000A8A4216D8884214D8684627 -:10D3C000FFF7D9FE00990398814205D08819000221 -:10D3D000000AF5F78BFBA0600120E979002986D0CF -:10D3E000002FB0D005B0F0BD0020F6E7F3B58FB048 -:10D3F0005A480C460B9004F0D8FE594A0F99504FEA -:10D400005618584D203E00280BD05748007D002864 -:10D4100003D056A158480DF09EFE207801287CD0FC -:10D420005AE1687B16280CD0687B297B401C884217 -:10D4300003D14EA151480DF08EFE2078012804D072 -:10D440000CE0287B0028F4D0F7E7F07F002803D019 -:10D4500046A14B480DF07FFE0120F077697B0F98C5 -:10D460001422484E5143891908742078022822D08A -:10D47000687B142148438619207930726079707274 -:10D4800032460C323146A068F5F73AFB0C20305694 -:10D490000F2804DD1F3830733068401C30600C21C9 -:10D4A0007156301DE26801905018C01C1F283EDAEA -:10D4B00001200199F7E026494868C005C00D21D038 -:10D4C000103840B200280CDA0207120F083A92080E -:10D4D00092005118C9698007C00EC1400806800F2C -:10D4E00009E081081B4A8900891809688007C00E75 -:10D4F000C1400806800F002804D105201BA10002AE -:10D500000DF029FE687B1421484386190021E0684C -:10D510006A460691117006A900E0D3E0F5F7F0FA2B -:10D520006A46002010560F282EDD01202DE0AEE0C7 -:10D53000FCD00000F70300000080841E00807BE127 -:10D540005C120020FFFFFF005411002013070000B1 -:10D5500000ED00E000E400E0FFFF3F006812002063 -:10D560003012002010110020201100207372635C23 -:10D5700072656D2E6300000011050000EF040000CD -:10D58000F4040000500F0020002006994018079076 -:10D590000220B0722079307260797072A068311DFB -:10D5A000C01C06911F2801DA012009E0F5F7A8FA4E -:10D5B00068460078002804D0069806990068401C48 -:10D5C0000860307A062813D2010079440979491895 -:10D5D0008F44020C0A08060400200FE0B4200DE07E -:10D5E00073200BE0322009E00A2007E0062005E066 -:10D5F000FF20FE49E0300DF0AEFD0020217900292A -:10D6000043D002214018069071681030081807991D -:10D61000089009180698081A0C900020F871F5F780 -:10D62000FEF904463060079820180002000AF060F6 -:10D63000787A0C2825D0797A14204143EC480818D0 -:10D6400040680899029040180002000A0390707A1E -:10D650006946887402A8FFF78EFD0299039A091B98 -:10D66000121B09021202E34B090A120A0C98994292 -:10D6700007D8824205D80299069808180002000AC5 -:10D680003060F8790028C8D110E00421BAE704AA74 -:10D690000199F5F735FA6846007C002804D0019816 -:10D6A00001990068401C08602078B072687B1628D9 -:10D6B00006D0687B401C68730B9804F08EFD47E031 -:10D6C0000020F8E7F07F002804D0A320CAA1C00002 -:10D6D0000DF041FD0120F077CA490F9808742078B9 -:10D6E000022803D1C4A1C8480DF035FDC54E2079EC -:10D6F00030726079707232460C323146A068F5F7AC -:10D70000FFF90C2030560F2804DD1F3830733068C5 -:10D71000401C30600C22B256301DE1680190881820 -:10D72000C01C1F2802DA012001990BE003AA01990D -:10D73000F5F7E6F96846007B002804D001980199C6 -:10D740000068401C08602078B072AE49012008755E -:10D75000687B297B884224D07C7A0C2C23D0F5F777 -:10D760005EF914214C43A24961180A7C042A18D09E -:10D770000A7C032A15D04B6889681B1A081A1B02F9 -:10D7800000029C4A1B0A000A102B0AD3114693423E -:10D7900007D8884205D8687B297B884201D0F5F7F5 -:10D7A0008AF911B0F0BD687B297B8842F7D111B0AE -:10D7B000F0BD10B50020F5F794F810BD10B50120AC -:10D7C000F5F78FF810BD914800787047F1B50098D3 -:10D7D00002281ED08E4C607A0C2803D186A18D4879 -:10D7E0000DF0B9FC0026A6710125E572607A0321CF -:10D7F00014227F4F5043C0190174F5F761F9009866 -:10D8000000280BD001282AD003287AD07AA1824898 -:10D8100045E07E480078F4F777FDF8BD7F48007F4B -:10D82000002804D02B2074A140010DF094FC6571F8 -:10D830007A4D00202E60F5F767F8A968481C04D0DF -:10D84000012300221846F5F795F8607A617A401CAA -:10D85000C0B2142251437A5801219047F8BD0120EB -:10D86000F5F752F8607900280DD06C488068401CAC -:10D8700009D0607A617A401CC0B2142251437A58B0 -:10D8800006219047F8BD6548007F01280AD002288C -:10D8900012D0032822D0042834D057A160480DF0BC -:10D8A0005AFCF8BD2079002803D02671F5F70DF950 -:10D8B000E5705A480677F8BD207A002802D1F4F7BF -:10D8C00083FD2572607A617A401CC0B214225143F4 -:10D8D0007A580021904751480677F8BD4F4F0123F1 -:10D8E000397B78680022411A1846F5F743F8207909 -:10D8F000002803D02671F5F7E8F8E57002203877A4 -:10D90000F8BD19E0454E217870680123411A0022C4 -:10D910001846F5F72FF8207A002802D1F4F754FDC5 -:10D920002572607A617A401CC0B2142251437A5841 -:10D93000002190473577F8BD607A617A401CC0B20B -:10D94000142251437A5805219047F8BD10B5304C48 -:10D95000607A0C2803D128A132480DF0FCFB607AD4 -:10D96000617A401CC0B214225143214A525804210A -:10D97000904710BDF0B583B00C200290F5F74FF83A -:10D98000234C0090617A284801900C2920D0617ABC -:10D990001420414316480918097C042918D0617ADB -:10D9A000142251430818007C032879D0019900986B -:10D9B0000B6849681B1A081A1B0200020D4A1B0A51 -:10D9C000000A102B6CD31146934269D8884267D85D -:10D9D00012488068401C03D007A114480DF0BBFB1F -:10D9E00000206071607A0C282AD121E0FCD0000070 -:10D9F00054110020FFFF3F007372635C72656D2E4F -:10DA000063000000201100201E05000078000020A7 -:10DA10005C12002054050000A70500003C12002005 -:10DA20009B050000AE0500004C120020EA05000036 -:10DA30006078002804D0FE48C17841708178017078 -:10DA4000607A0C2815D0607A1421FA4A484380186D -:10DA5000007C04280DD1607A0290607A01211423A1 -:10DA6000584380180174607A58438018807C607233 -:10DA7000A172F14D687B297BF04F884233D0F04E84 -:10DA8000287B142148438019007CC05D0128287B35 -:10DA900007D048438019007CC05D02282FD044E0A5 -:10DAA000FCE1142148438019807A01280AD0287BA0 -:10DAB0000221142250438019007CC155287B16286E -:10DAC00008D009E0287B0021142250438019007CF3 -:10DAD000C1552AE0002001E0287B401C2873687BA8 -:10DAE000297B8842CCD1D74D287D00284DD0287C79 -:10DAF000C15D012928D0C05D022830D03BE0287BE1 -:10DB0000142148438019807A012803D0CEA1D1483E -:10DB10000DF021FB297B00201422514389198872C2 -:10DB2000297B51438919097CC855287B1421484316 -:10DB30008219287B48438019017C0098FEF7F6FF84 -:10DB4000287B1628C8D1C5E7A97A012904D002216B -:10DB5000C155002028750EE00021C1550BE0A87AC0 -:10DB6000012804D0C520B8A1C0000DF0F4FA0020AF -:10DB7000A872297CC855287D002806D0297CB14A86 -:10DB80000098FEF7D3FF0020287502980C281ED0BD -:10DB900014214843A7494018017C012917D10721C6 -:10DBA0000174AD4D287E16283CD0287EE97D401CAE -:10DBB000884203D1A4A1A9480DF0CDFA297E02988C -:10DBC0006854287E162831D0287E401C2876607A3A -:10DBD0000C287DD0A07A00287BD00020A072617A2A -:10DBE0001420414393480E189D49B56873680A464E -:10DBF000F6687C32CB67966055609A4D697E002945 -:10DC000016D00226617A14228A4851430818407BB4 -:10DC100006281BD201007944097949188F440A1457 -:10DC200012100E0CE87D0028C4D0C7E70020CDE715 -:10DC30000426E7E700210FE0B4210DE073210BE09B -:10DC4000322109E00A2107E0062105E0FF2086498C -:10DC5000E0300DF080FA00212973687E022801D09F -:10DC6000012810D12869009A4018821A1202120A5B -:10DC7000422A08D93238032100026976000A286155 -:10DC80003220287308E0322906D2207A00280AD1EF -:10DC9000F4F79AFB012005E0207A002803D0F4F77E -:10DCA000BCFB00202072624910224878207009785D -:10DCB000012901D0032906D101212171297B884244 -:10DCC00001D9421A1032A378002B00D0921C01E037 -:10DCD0008DE09BE02179002901D1002B5DD0944695 -:10DCE000624A00990092019A176852687F1A511A85 -:10DCF0003F0209023F0A090ABC451BD85B4A97420A -:10DD000018D8009A914215D8297B884223D92B69CB -:10DD1000421A9A1A1202120A101880190002000AF6 -:10DD20002A616860002914D0032028770006000EBD -:10DD30003ED14CE000202071A070297B002925D025 -:10DD40002869401880190002000A686002202877BC -:10DD50002EE00120E9E781420BD92A69511889197F -:10DD60000902090A6960002801D00420DDE70220C9 -:10DD7000DBE7002B03D134A13D480DF0ECF9286915 -:10DD800080190002000A6860002004E029698919EE -:10DD90000902090A6960287719E0287B00280FD05A -:10DDA0002969081880190002000A68600220287793 -:10DDB00028690123811900221846F4F7DBFD09E0E8 -:10DDC000286980190002000A686000202877012075 -:10DDD000F4F79AFD607A1421484316490C22401842 -:10DDE0008256012300206968F4F7C4FD0EE001208B -:10DDF000F4F78AFD0020F4F787FDF4F76BFD207A35 -:10DE0000002803D0F4F709FB00202072A078002836 -:10DE100004D0F4F75AFE0020E070A070607800286B -:10DE200004D00348C178417081780170207921E0E5 -:10DE30007A00002054110020101100202F12002021 -:10DE4000500F0020201100207372635C72656D2EEC -:10DE5000630000000C060000381100203A060000A4 -:10DE6000D01100203C120020FCD00000FFFF3F003A -:10DE70008C060000002806D00020CF49E070097809 -:10DE8000002900D12071CD48017EC07D814203D0A0 -:10DE9000CB484078F4F738FA0120E07103B0F0BDC8 -:10DEA000F0B5C84C0746607A83B00C2803D1C6A1F0 -:10DEB000C8480DF050F9607A1421C74E48438019C4 -:10DEC000007C032804D06F20BFA100010DF043F9AE -:10DED000C24DA868401C03D0BBA1C1480DF03BF95E -:10DEE000607A1421484381190C20085600216A46A3 -:10DEF00000911171C01901AA6946F4F701FE6A4642 -:10DF0000042010560F2801DD012000E000200099B8 -:10DF10004018696840180102090AA9606079002860 -:10DF200004D0012300221846F4F724FD03B0F0BD0D -:10DF300070B5AD4CAB4A0B1AA34214D3451AA54297 -:10DF400011D3934203D9101A43185B1C0BE095427E -:10DF500004D9511A0818401C434204E0A349A448BC -:10DF60000DF0F9F80023184670BD10B501460123E5 -:10DF700000220220F4F7FEFC10BD10B50220F4F7D9 -:10DF8000C3FC10BD10B5F4F74AFD10BDF0B58D4DC2 -:10DF90000446E87A83B0002803D18BA195480DF0A0 -:10DFA000DAF8642C4DD3944900200246091B8241C3 -:10DFB00047D39248417B007B814242D19048007D0B -:10DFC00000283ED1687A1421834F4843834EC519F7 -:10DFD000306801AA00196946F4F792FD69460420E9 -:10DFE0000856002802DD0098401C0090A96800989F -:10DFF0006B680A18D21A1202824B120A9A4220D86F -:10E00000AA7C0C2A08D014235A43D2195268511AF8 -:10E010000902090A814214D3B068401C05D00120CE -:10E02000F4F772FC0020C043B06030680019306023 -:10E03000A868009940180002000A7061012003B02E -:10E04000F0BD002003B0F0BDF8B50646401EC5B2D5 -:10E050001420614968434418207C002803D15AA148 -:10E0600069480DF078F86548017B407B81420CD00F -:10E07000664A14234B439B181B7CB3420CD01629D1 -:10E080000CD0491CC9B28142F3D15D48017D002901 -:10E0900064D0007CB04261D10020F8BD0021F1E7DE -:10E0A000217C052905D0217C062902D0217C072965 -:10E0B00028D101212174C17D0023027E8A4221D012 -:10E0C0000246565CAE4201D1012301E0002B04D090 -:10E0D000162911D04E1C965D565416290ED0491C97 -:10E0E000167EC9B28E42ECD1002B0BD0117E0029D6 -:10E0F00006D0117E491E04E00026ECE70021EFE780 -:10E1000016211176617C00292AD06774C17D002315 -:10E11000027E8A4224D0425CAA4201D1012301E05E -:10E12000002B04D0162912D04A1C825C42541629B6 -:10E130000FD0491C027EC9B28A42ECD1002B0FD00D -:10E14000027E0146002A06D00A7E521E04E000220A -:10E15000EBE70021EEE716220A7601E017480027D8 -:10E16000217C01299CD1617C002999D10120F8BD35 -:10E1700070B505461420184A0521684380180174BB -:10E180000E4C207E162811D0207EE17D401C884256 -:10E1900003D116491E480CF0DEFF207E2554207E58 -:10E1A000162807D0207E401C207670BDE07D002818 -:10E1B000EFD0F2E70020F7E77A00002038110020C6 -:10E1C000780000205C1200207372635C72656D2E13 -:10E1D00063000000EF060000541100203C120020F4 -:10E1E000F1060000FF7F841E0020A107FCD0000084 -:10E1F0001307000032070000FF1FA10710110020C5 -:10E2000020110020FFFF3F006F070000500F00208B -:10E210000702000010B509F063FC042803D009F0E0 -:10E220005FFC052803D106F0D1FE00280BD104F0D5 -:10E2300007F9032803D004F009F9032805D109F0F0 -:10E24000B0FD002801D0012010BD002010BDF0B5A8 -:10E2500085B00746002668460D4606726946384670 -:10E2600005F05CFA00287DD16846007800280BD0C4 -:10E2700009F009FDB84275D00022294638460AF057 -:10E28000CCFE00283ED120E006F077FCB842F2D068 -:10E2900000222946384608F01DF900287DD1019C4E -:10E2A0009020005D2834002804D1607E002801D031 -:10E2B000012000E000200490204660300390807828 -:10E2C00006F08AFB002804D008E0019C2834607E18 -:10E2D000F1E7FF20FDA1DA300CF03DFF20462030B1 -:10E2E000417B00290FD0817B89070CD56E700121FD -:10E2F0002970AE70AF80C17BA971218E2981618E9A -:10E300006981467349E0039802A9807806F030FAE3 -:10E31000002804D1FF20EDA1EE300CF01CFF684670 -:10E32000007A002809D06E700D202870AF806846F2 -:10E33000007AE8800120A8702FE0049800282FD0F0 -:10E3400006F0B5FB00282BD068460078002806D1DF -:10E3500001988030406A4188B94200D10670039824 -:10E36000807800E01CE006F0CAF8002803D1D7A1AD -:10E37000DA480CF0F0FE6E700A202870AE70AF80A4 -:10E38000A07EA8716676684605F07EFA002804D063 -:10E39000D248CEA10E300CF0DEFE012005B0F0BD5B -:10E3A0000020FBE77CB5CEA103C9CF4D002401912D -:10E3B0000090AC7001F067FD2946EC7004204039F4 -:10E3C000088710204887C81DC84AF9304280047168 -:10E3D000C280E03844740C7084730475C0300477D4 -:10E3E0001D300522694604460CF02BFD28462146C7 -:10E3F000BC3008F0F7F97CBDF8B5BD4C0D46606047 -:10E40000217006F057F805F0D1F8FFF7CBFF207820 -:10E4100009F03AF9B4498431084681380F46064676 -:10E4200006F08CFC606808F0D8F8284604F06EFC12 -:10E430003946304609F057FC60680AF08AFE01F060 -:10E4400022FDA9480021C170F8BDFEB50E461D464B -:10E45000144601A905F062F9002839D102988030EC -:10E46000807A06F079F800280CD0684606F087F824 -:10E47000002806D0002C03D006F01DF8A04206D2DA -:10E480000020FEBD91A19B480CF065FEF8E70098C6 -:10E4900005F0AAFB3146009805F0ABFBE2B2294635 -:10E4A000009805F063FD06F08FF8002804D191482C -:10E4B00086A11E300CF04FFE68460079012807D176 -:10E4C00001A801F0E7FC8A48002180688030418281 -:10E4D0000120FEBD30B40179002904D0012907D004 -:10E4E00030BC00207047831D42880488022103E06D -:10E4F00042880488831D0121204630BCA5E7FFB572 -:10E50000794C85B00E460746C0346088694608805D -:10E51000154602A905F002F9002811D0002168462D -:10E5200005F059F9002823D1684602A9008805F0B2 -:10E53000F5F8002804D06F4864A13C300CF00BFEC5 -:10E5400068460088388068460088608066480021F8 -:10E55000C23005F040F9002802D00020C04360809E -:10E5600003988030807A06F037FA002803D007E05D -:10E57000002009B0F0BD5F4854A156300CF0EBFD0F -:10E5800004A806F03CFA0028F3D0049805F068FBD4 -:10E590003070022807D0012805D056484BA17230B0 -:10E5A0000CF0D9FDE4E70899049805F0F6FC288002 -:10E5B000002804D14F4845A165300CF0CCFD06F091 -:10E5C00045FA002804D1E92040A180000CF0C3FDE9 -:10E5D0000120CEE73EB50446831D02AA694601A884 -:10E5E000FFF78DFF002813D068468088208068469A -:10E5F000008960800020607168460078012808D09A -:10E60000022806D03B4831A192380CF0A4FD01202D -:10E610003EBD2071FBE7FEB5040004D135482BA1B7 -:10E620007E380CF098FD304D0026203D687C002897 -:10E6300008D0667010202070A87CA070E87CE07084 -:10E640006E7430E0284F403F3878002808D02C22E4 -:10E65000B91C20460CF0F5FB0E2020703E7022E025 -:10E66000A87B002809D00120E070E87BA070287CFE -:10E6700060700F202070AE7315E01B480221C63079 -:10E68000029005F0A8F8002871D1174FC037F8881C -:10E690000190F888042808D0052831D02146FFF7DA -:10E6A000D6FD002859D00120FEBD0021204606F0ED -:10E6B00019FA0028F7D1287D00284ED06670132063 -:10E6C00020701C21A01C0CF019FC15E07372635C17 -:10E6D0006C6C5F6374726C2E630000000D020000AE -:10E6E000FFFFFFFF1F000000AC120020FFFF000033 -:10E6F00080000020390300000220A0702E75D2E7B0 -:10E700000021204609F098FA002826D02078132806 -:10E71000C9D1A0783C28C6D1A088694604F07CFF06 -:10E72000002803D0FD49FE480CF015FD009880300C -:10E73000807A05F0E4FE002804D1F948F749001D6D -:10E740000CF009FD009804F09FFF0028ABD0F448BE -:10E75000F24908300CF0FFFCA5E70221029805F011 -:10E760003AF8002803D1F9880198814291D100201C -:10E77000FEBD50E710B508F011FF002804D0E848AE -:10E78000E649BE300CF0E7FC07F01FFF06F09AFAEE -:10E7900004F07AFA002804D07920E049C0000CF097 -:10E7A000DAFC0AF0CEFC002804D03D20DB49000151 -:10E7B0000CF0D1FC09F070FA002804D0F520D749FC -:10E7C00080000CF0C8FCFFF7EDFD04F0ABFE002864 -:10E7D00004D0F720D14980000CF0BDFC05F01CFEF0 -:10E7E00001F051FBCF480021C17040380171012177 -:10E7F00041710222C270017010BD10B5C94C403C7D -:10E800002078002804D00A210E2001F002FB10BD60 -:10E81000FFF700FD002801D00C2002E001F033FBDF -:10E8200000202071012060710A21E170207010BD6C -:10E8300070B5BC4C0646403C2078002804D03A21F4 -:10E840000E2001F0E6FA70BDFFF7E4FC002801D0CD -:10E850000C2010E0B34DE87808280BD20001001915 -:10E8600010223146443001F0DEFAE878401CE870AE -:10E87000002000E007202071012060713A21E17042 -:10E88000207070BD70B5A74C0646403C207800282B -:10E8900004D00B210E2001F0BCFA70BD30780028A6 -:10E8A00003D0012801D0122015E09E4D8035287933 -:10E8B000082817D2FFF7AEFC002801D00C200AE090 -:10E8C000984833782979721C883001F098FB2879B0 -:10E8D000401C287100202071012060710B21E17023 -:10E8E000207070BD0720F6E710B58E4C403C2078B4 -:10E8F000002804D039210E2001F08BFA10BDFFF75B -:10E9000089FC002801D00C2002E086490020C87054 -:10E910002071012060713921E170207010BD8148A3 -:10E9200010B540380178002904D00F210E2001F0E5 -:10E9300070FA10BD002101710E2181700F21C1708C -:10E94000FF2181710021C9430181774949680A7813 -:10E9500082728A8882814988C18101214171017056 -:10E9600010BD704910B540390A78002A04D03C2106 -:10E970000E2001F04EFA10BD6A4A0088C032508065 -:10E980000120107100220A7148713C22CA7008707F -:10E9900010BD10B5634C403C2078002804D02B21DA -:10E9A0000E2001F036FA10BD0821A01DFDF7BCFBBA -:10E9B00000202071012060712B21E170207010BDBA -:10E9C00010B5584C403C2078002804D005210E207A -:10E9D00001F01FFA10BD05F06EFDE08005F0C6FEE7 -:10E9E000207200202071012060710521E1702070EB -:10E9F00010BD10B54B4C403C2178002904D031218A -:10EA00000E2001F006FA10BD00214156042911D054 -:10EA100000290FD0081D0DD0001D0BD0001D09D0FE -:10EA2000001D07D0001D05D00A3003D00A3001D0E8 -:10EA3000122003E0084601F033FB00202071312052 -:10EA4000E07001206071207010BD30B5354D044676 -:10EA5000403D28788DB0002805D02A210E2001F0F5 -:10EA6000D8F90DB030BD10222146684601F0DBF91F -:10EA70001022A11804A801F0D6F9684603F00BFC97 -:10EA800010222C46A81D08A901F0CDF90020207104 -:10EA90000E20A0702A20E070012060712070E0E755 -:10EAA000F0B5204C85B0403C2078002804D03B21B4 -:10EAB0000E2001F0AEF971E40020A07119486946FA -:10EAC000C0304088888002A904F028FE002805D0C4 -:10EAD000002101A804F07FFE002865D16846114D91 -:10EAE00081880180283D684602A9008804F016FE4E -:10EAF000002803D009490D480CF02DFB039E04A902 -:10EB000037468837B878283605F04BFE002804D100 -:10EB100006480249401D0CF01EFB09E0CCE600004F -:10EB2000FF020000AC12002080000020140500004D -:10EB3000767EB87805F050FF002803D1FB49FC48E9 -:10EB40000CF009FB05F0B3FF0121484031460143B9 -:10EB50001FD06A461188A279FD2352001219118133 -:10EB6000A2794000515D4908490031435155A279CD -:10EB70001940014351556A46107C002802D00420F8 -:10EB8000014301E0FB200140A0794155A079401CE0 -:10EB9000A0710021684604F01EFE002804D16846DA -:10EBA0000188808881429ED10020207101206071FF -:10EBB0003B21E17020707EE770B5DE4C0546207881 -:10EBC000002804D034210E2001F023F970BD08F094 -:10EBD00087FF052804D0284608F03FFD002000E00C -:10EBE0000C202071012060713421E170207070BD13 -:10EBF00010B5D04C2078002804D00E21084601F032 -:10EC000008F910BD0622CC49A01D0CF01AF900200D -:10EC10002071012060710E21E170207010BD70B56F -:10EC2000C44C06462078251D002804D032210E2031 -:10EC300001F0EFF870BD3146002009F032F928707C -:10EC400000280CD100213246084606F080F92870D1 -:10EC5000002804D106223146B7480CF0F2F8012012 -:10EC600060713221E170207070BD70B5B14C054605 -:10EC70002078002804D030210E2001F0CAF870BDA1 -:10EC800008F073FD002803D104F0DEFA00280DD04F -:10EC9000287804F08AF8287806F0C0F9002020715E -:10ECA000012060713021E170207070BD0C20F6E70A -:10ECB000F8B5A04C06462078251D002804D0172161 -:10ECC0000E2001F0A6F8F8BD3146012009F0E9F860 -:10ECD0000127287000280FD13246012106F037F9AC -:10ECE0002870002808D19348062231463C300CF0A9 -:10ECF000A8F890484030877067711720E07027703F -:10ED0000F8BDFEB58B4C05462034A07B002804D00E -:10ED100028210F2001F07DF8FEBDA8781A2824D004 -:10ED20000EDC03000CF038FB16333333333321335E -:10ED300033333333333333333333333321212133D9 -:10ED40002A2824D00ADC1E3803000CF025FB0C20F6 -:10ED5000202020202020202020200E203A380300D0 -:10ED60000CF01AFB04150315031528887349884213 -:10ED70000DD81F21E173282121740120A073288858 -:10ED8000694604F0CBFC002803D0022014E01220D6 -:10ED900012E068460078019F00280FD0C637019E18 -:10EDA00000280DD0C736684601F05CF8002802D074 -:10EDB0003878002806D00C20E073FEBD9C37EEE7C3 -:10EDC0009D36F0E701203870A87830700020E0739D -:10EDD000684601F05FF8FEBDF0B5564C0746207856 -:10EDE00085B0002804D025210E2001F012F862E63B -:10EDF000388802A904F092FC4E4E00210836002803 -:10EE00000CD00220207131603171E1800E20A070A1 -:10EE10002520E0700120607120704CE6039D28469B -:10EE20000A30483501900020A87505223046019926 -:10EE30000CF007F8A87D0028F5D13888E080E5E7D8 -:10EE4000FEB53C4C06462034A07B002804D010219F -:10EE50000F2000F0DEFFFEBD1F20E07310202074A5 -:10EE60000127A7733088694604F058FC002810D1A8 -:10EE7000684600F0F7FF00280BD06846019D007837 -:10EE800028350028019806D0CA300178002909D118 -:10EE900004E0022007E08030406AF6E72035697B15 -:10EEA000002902D03A20E073FEBDA97B89070DD16D -:10EEB0000621017068460078002804D10198318845 -:10EEC0008030406A4180684600F0E4FF0020E07333 -:10EED0006F73FEBD70B5174D04462878002804D026 -:10EEE00038210E2000F095FF70BD1F2028710120F1 -:10EEF00068713821E97028702078002808D001282E -:10EF000006D0022804D0032802D01220287170BD38 -:10EF1000002606F051F8207807F061FC207808F010 -:10EF2000E6FF20780AF0ABFA2E7170BDCCE6000047 -:10EF30001F0500006C1200208C000020FF0E000056 -:10EF4000F8B5FE4D06462878002804D01D210E2075 -:10EF500000F05FFFF8BD1F202871012068711D219E -:10EF6000E970287008F0BCFD0C27042857D005284C -:10EF700055D0B0791224012801D000281DD1307855 -:10EF8000002801D0012818D1F079002801D00128EB -:10EF900013D17088EA49021F30248A420DD2B28808 -:10EFA000121F8A4209D22887B0886887B079002466 -:10EFB000012804D000280CD016E02C71F8BDDF48E1 -:10EFC0004030807800282AD0DC4A3C3201210846B3 -:10EFD00002E0DC4A0021012005F0B9FF040003D063 -:10EFE000D949DA480CF0B7F8F079012801D00028A7 -:10EFF00002D105F0C8FF0446002C01D01F2011E00B -:10F000003078012802D0002803D00AE00021022035 -:10F0100001E00021012005F0C6FF002801D02F717A -:10F02000F8BD00202871F8BD70B5C44C21780029C6 -:10F0300004D01E210E2000F0ECFE76E71F21217186 -:10F04000012161711E22E270217002781221012AD1 -:10F0500001D0002A04D14078002803D0012801D033 -:10F06000217162E700260C25012A09D008F038FD3D -:10F07000052803D008F042FA002806D0257154E78D -:10F08000618F208F08F083FBF6E726714DE7F0B51E -:10F09000AD490446143103C987B0A84D0591203508 -:10F0A0000490A87B002805D021210F2000F0B1FE9C -:10F0B00007B0F0BD1F20E873212028740126AE732D -:10F0C00022889F4B111F3020994243D261880F1F25 -:10F0D0009F42FAD291423DD8E2899D4B911F9942BD -:10F0E000F3D2218A8F1F9F42EFD28A42F3D8628ADD -:10F0F000FF23F4339A42EED8A28A954F13460A3B77 -:10F100003F1FBB42E1D2C9088A4223D9E18A228B40 -:10F110009142E0D821791220002902D0012919D189 -:10F1200002E061790029F9D1217B002901D0012970 -:10F13000F5D108F0D5FC05280BD008F0D1FC042847 -:10F1400007D0287D002804D105F017FD81498842A9 -:10F1500001D00C20BDE0684604F0AEFA002801D0D2 -:10F160000920B6E001220321009804F0E6FF009F89 -:10F17000042178880F3703903846FCF7D5FF3846CE -:10F18000039905F0C2F874A0009F0068069003215F -:10F1900006A81337FCF751FF002006A90A5C3A5471 -:10F1A000401CC0B20328F9D30098218A8180618A6B -:10F1B000C180A18A01810146002720318F73CF735E -:10F1C0006179002902D0012903D101E0C77600E06E -:10F1D000C6760622A11D1C300BF033FE00980522D6 -:10F1E00004A90A300BF02DFE0098A0300673694682 -:10F1F0000F71012101A8FCF720FF6946087941073A -:10F20000C206490F920F80068918C00F0818694678 -:10F210000871401D009B0928987601D20830987625 -:10F2200001220021184604F088FF00988A3005F07A -:10F2300044F9002804D145484349FC300BF08BFFCA -:10F24000207B002806D0012808D03F4943480BF016 -:10F2500082FF40E000213B4A012008E0374840306F -:10F26000807800280FD0354A01213C32084605F04D -:10F270006EFE00282FD000988030807A05F03FF98C -:10F28000002816D01AE000988030807A05F037F90F -:10F29000002804D131482C490D380BF05CFF009850 -:10F2A00004F0DAFA002800D153E72C48264909383F -:10F2B00041E02A482449C01D0BF04DFF009804F09E -:10F2C000CBFA002804D025481F490B300BF043FF30 -:10F2D0001F20E873ECE62079012801D0002803D133 -:10F2E00005F051FE00280CD10320009905F05BFECB -:10F2F000002806D162882188009808F0F5F90028D6 -:10F3000007D000988030807A05F0F9F8002805D001 -:10F3100009E00098A0300770EF73C9E60F480A496A -:10F3200031300BF018FF009804F096FA0028BBD09B -:10F330000A48054935300BF00EFF0AE76C12002031 -:10F34000FD3F00008C000020CCE600000607000016 -:10F350007B0C0000FFFF0000112233001C0800009E -:10F3600038B5F94C2078002804D022210E2000F076 -:10F3700050FD38BD1F202071012565712220E070ED -:10F38000257008F0ADFB052802D00C20207138BD97 -:10F3900000202071684608F059FA0028F7D100983B -:10F3A0008030807A05F0ABF8002803D1E749E848BF -:10F3B0000BF0D1FE009804F04FFA002804D0E44886 -:10F3C000E249001D0BF0C7FEDF4820300575E1481B -:10F3D0000078F2F799FF38BDF8B5DB4D04462035CB -:10F3E000A87B002804D023210F2000F012FDF8BDD7 -:10F3F0001F20E873232028740120A8736288D64B4D -:10F40000911F302099424CD2A1888E1F9E4248D233 -:10F410008A4246D8E288FF23F4339A4241D82289AF -:10F42000CD4E13460A3B361FB3423AD2C9088A4230 -:10F4300037D96189A289914233D80026208869464C -:10F4400004F05EF9022700280BD1009800F0F8FCC8 -:10F45000002806D000988030416A0A78002A06D138 -:10F4600001E0EF73F8BD826B1278002A01D03A20D8 -:10F4700017E005228A71416A0E81426AA188518192 -:10F48000426AE1889181426A2189D181406A018979 -:10F490004289914204D88179082901D8914202D346 -:10F4A0001220E873F8BD2188418000988030406ABE -:10F4B0000770EE73F8BDFEB5A34C06462078002811 -:10F4C00004D024210E2000F0A4FCFEBD01256571AE -:10F4D0002420E0702570304604F039FF002801D068 -:10F4E000002000E0122020710028EED1964F052266 -:10F4F000E03738463D7731461D300BF0A2FC002640 -:10F500003E77701E69460880684604F031F900288D -:10F5100019D168460788684601A9008804F0F0F808 -:10F52000002804D08A4889498F300BF014FE0198D6 -:10F53000A0300573684604F01BF9002803D1684623 -:10F5400000888742E7D12671FEBD38B57E4C05465E -:10F550002034A07B002804D026210F2000F059FC85 -:10F5600038BD1F20E073262020740120A073288856 -:10F57000694604F0C5F800280BD1009800F060FC43 -:10F58000002806D000988030416A0A78002A06D107 -:10F5900001E002200DE0806B0078002801D03A20C5 -:10F5A00007E007200870009829888030406A418071 -:10F5B0000020E07338BD10B5634C2078002804D0DB -:10F5C00006210E2000F025FC10BD002020710E2029 -:10F5D000A0700620E0700821A01D0BF08FFCA1791F -:10F5E00001200143A1716071207010BD38B5564CE7 -:10F5F00005462034A07B002804D02C210F2000F0E9 -:10F6000008FC38BD1F20E0732C2020740120A0735B -:10F610002888694604F074F800280CD1009800F09E -:10F620000FFC002807D00098014680314B6A1A78F9 -:10F63000002A06D101E0022025E0896B0978002923 -:10F6400001D03A201FE04030007F00281DD0082262 -:10F65000A91C181D0BF0F5FB00986A898030416ADF -:10F660008A81406A294610220C310E300BF0E9FBEA -:10F67000009803218030406A01700098298880300A -:10F68000406A41800020E07338BD0C20FBE770B574 -:10F690002D4E044630780C25002804D018210E2069 -:10F6A00000F0B7FB41E402F0CBFE032865D002F086 -:10F6B000CDFE032861D06079002801D001282DD12A -:10F6C000A079002801D0012828D1A07B002805D0EE -:10F6D000012803D0022801D003281FD1607B002815 -:10F6E0001CD0C0081AD1628801208003824202D84F -:10F6F0002188814203D9207901280FD119E020798E -:10F70000002806D0012814D0022805D0032805D1EE -:10F7100002E0202A0BD30CE0A0290AD22079042889 -:10F7200005D12088202802D36188884201D912257A -:10F7300023E00548217920308175607900280DD0BB -:10F7400001280FD019E000006C120020CCE6000068 -:10F750007F080000800000207B0C0000FA4A002196 -:10F76000204607E0F9488078002806D0F74A0121B2 -:10F77000121F204608F01BFB0546012035717071F1 -:10F780001821F170307058E410B5F04C403C2178ED -:10F79000002904D01A210E2000F03BFB10BD017897 -:10F7A0001F2902D91220207106E000212171027860 -:10F7B000411C104608F09EFB012060711A21E17087 -:10F7C000207010BD10B5E14C403C2178002904D0D8 -:10F7D00020210E2000F01DFB10BD01781F2902D949 -:10F7E0001220207106E0002121710278411C104690 -:10F7F00008F06FFB012060712021E170207010BDC6 -:10F80000F8B5D24C403C2178002904D01B210E20B1 -:10F8100000F0FFFAF8BD012666710C212171007815 -:10F820000025012804D000285CD01220207188E037 -:10F8300002F006FE002835D102F008FE002831D182 -:10F8400008F021FAC24988422CD108F07AFA00283F -:10F8500077D0684603F0C6FEBB4A00990C3A916027 -:10F86000002803D0BB49BC480BF075FC01220321E2 -:10F87000009804F008FC009808F0CDFB00988A304E -:10F8800004F01BFE002804D1B348B24908300BF045 -:10F8900062FC009803F08CFA002851D0AE48AD49C4 -:10F8A0000C301CE002F0CCFD02284AD102F0CEFD63 -:10F8B000002846D1A5482038807D002841D0012865 -:10F8C0003FD004283DD008F03CFA002839D0002071 -:10F8D00003F06EFA002833D09F489E4924300BF085 -:10F8E0003AFC2DE002F0ACFD032804D002F0AEFD9E -:10F8F000032820D025E002F0A6FD0090002003F0B0 -:10F900004FF900281DD1257100988030807A04F0CD -:10F91000F6FD002804D190488E493E300BF01BFCC8 -:10F92000009803F0B1FE00280BD08B488949423083 -:10F930000BF011FC05E0002003F032F9002800D1A3 -:10F9400025711B20E0702670F8BD38B57F4C054648 -:10F95000403C2078002804D02D210E2000F059FAD8 -:10F9600038BD2888694603F057FE002801D00220E0 -:10F970000FE00098CA21095C002909D13321095CF4 -:10F980000F2901D0102903D1FC21095C00290BD0DB -:10F990000C2020710E20A0702D20E0702888E080BF -:10F9A00001206071207038BD1022A91CD8300BF0E6 -:10F9B00048FA00980421C03081720020E9E738B588 -:10F9C000624C0546403C2078002804D02E210E20B1 -:10F9D00000F01FFA38BD2888694603F01DFE002894 -:10F9E00001D002200CE000980146C030827A002A43 -:10F9F00005D12031C97C0F290DD010290BD00C2046 -:10FA000020710E20A0702E20E0702888E080012058 -:10FA10006071207038BD052181720020F0E77CB54F -:10FA20004A4C0546403C2078002804D037210E205F -:10FA300000F0EFF97CBD2888694603F06FFE0028CE -:10FA400007D002202071012060713721E170207001 -:10FA50007CBD01987F22014628300272427200224A -:10FA60008272A87822318870E878C8702879087185 -:10FA70002271E8E71CB5354C403C2178002904D0C0 -:10FA800013210E2000F0C5F91CBD0088694603F063 -:10FA900045FE002801D0022006E001982421095CDF -:10FAA000801C012902D00C20207107E0002201995E -:10FAB00022712831097A21720088E080012060716A -:10FAC0001321E1700E21A17020701CBDF8B51F4CF0 -:10FAD0000546403C2078002804D035210E2000F057 -:10FAE00098F9F8BDA878002801D0012804D1A88889 -:10FAF000FF21F531884201D91220207128886946FA -:10FB000003F08AFD0126002806D0022020716671CC -:10FB10003520E0702670F8BD009800270246C030FE -:10FB20000770AB8801464380104680300677AA787C -:10FB3000012A00D000220A70407F002801D003F083 -:10FB400027FA2771E3E700008C000020AC120020A8 -:10FB5000FFFF0000CCE600002D0A0000F8B5D44EEF -:10FB600004463078002804D03D210E2000F051F9E1 -:10FB7000F8BD2088694603F04FFD002801D002201F -:10FB800027E0009F6488FD883A896800B988401C96 -:10FB9000844217D3C7484143800050430BF0BAF961 -:10FBA000401EFF2180B2F531884200D908468442C8 -:10FBB00000D22046691C401C0BF0ACF96D1C684358 -:10FBC000401E85B2E820C05D002800D17D84F5800C -:10FBD00000203071012070713D21F1703070F8BD4E -:10FBE00070B5B34C05462078002804D033210E2090 -:10FBF00000F00FF956E502F023FC002801D00C209C -:10FC000018E02978002911D00A290FD014290DD025 -:10FC10001E290BD0282909D0322907D04B2905D01D -:10FC2000642903D0FF2901D0122003E0284603F005 -:10FC30004BF900202071012060713321E1702070A8 -:10FC400030E570B59A4C05462078002804D03E2156 -:10FC50000E2000F0DEF825E502F0F2FB002803D1CB -:10FC600002F0F4FB002801D00C2003E0287808F013 -:10FC70004DF900202071012060713E21E17020705B -:10FC800010E510B5017801240B000BF085FB3FBF98 -:10FC9000BF21BFBF4C94BFBFBF2427BFBF464F612A -:10FCA000BFBF59BFBFBF2B97BF9B9FBF797DBFA36E -:10FCB0008185888C6590BF5DBF555275A7ABBF37F6 -:10FCC0002F33BB6DAFBF71423F3B4969B3B7C00033 -:10FCD000FEF750FD9BE0FEF790FD98E0801CFEF7DC -:10FCE000D1FD94E0801CFEF7E3FF90E0801CFEF75E -:10FCF00080FE8CE0801CFEF792FF88E0801CFEF7FF -:10FD0000B4FF84E0801CFEF793FD80E0FEF7ECFD7D -:10FD10007DE0801CFFF7DEF879E0FEF769FF76E012 -:10FD2000FEF7BEFE73E0FEF74BFE70E0FEF7F7FD58 -:10FD30006DE0FEF72EFE6AE0801CFEF786FE66E0B0 -:10FD4000801CFFF797FE62E0801CFEF7DAFF5EE0A2 -:10FD5000801CFFF775F85AE0801CFFF73DF856E06D -:10FD6000801CFEF7FEFD52E0801CFEF725FF4EE0F2 -:10FD7000801CFFF754FE4AE0801CFFF737FC46E08A -:10FD8000801CFFF7DDF842E0801CFFF74DF93EE0F4 -:10FD9000801CFFF77CF93AE0FFF7E2FA37E0801CBD -:10FDA000FFF71AFB33E0801CFFF785FB2FE0801C78 -:10FDB000FFF7CBFB2BE0FFF7FEFB28E0801CFFF7F3 -:10FDC00066FC24E0801CFFF7DFFC20E0801CFFF7CE -:10FDD00017FD1CE0801CFFF7F5FC18E0801CFFF706 -:10FDE000B4FD14E0801CFFF7EAFD10E0801CFFF773 -:10FDF0006DFE0CE0801CFFF7B1FE08E0801CFFF7F1 -:10FE000020FF04E0801CFFF7EBFE00E0002420460A -:10FE100010BD274A2032537C002B03D19074D1743B -:10FE200001205074704730B5134606E0CC18203CD2 -:10FE3000D51AE47F5B1E4455DBB2002BF6D130BDF2 -:10FE4000017800290CD14121095C002908D18030BA -:10FE5000017C002904D0007C042801D001207047D7 -:10FE60000020704701784068002903D001780029FC -:10FE700005D100E0E4E740304078002801D00020C0 -:10FE80007047012070470A4900208031886740315F -:10FE90000871704710B50178012908D14068803099 -:10FEA000417F002903D00021417703F071F810BD94 -:10FEB0006C120020C409000070B5FC4D00246C7069 -:10FEC0002C70AC616C72AC720120E872F84844701E -:10FED000C473AC62F7482C6302F05FF9002804D0C9 -:10FEE000FF20F5A14F300BF036F92C7770BDF8B537 -:10FEF000F54902250D60F5490026CE630127CF6341 -:10FF0000F349C96A09070DD4F24AD36AF2494B6230 -:10FF1000136B8B62536BCB62936B0B63D26BCB0512 -:10FF20001A434A63ED4C002823D0012825D0FF2036 -:10FF3000E1A1A2300BF00FF9E948A063FF200430E3 -:10FF40006063276303202061E64996204860D74913 -:10FF50001C2008560B22D243811A904237D011DC64 -:10FF60001C313AD00A2938D0142934D0182911D19B -:10FF70002FE0DD486061DD4802E0DD486061DD487A -:10FF8000A061D9E708301FD004281BD0082817D05B -:10FF90000C2812D0FF20D8A176300BF0DCF8DB491A -:10FFA000D9488860DB48DA494160DB490160DB48B9 -:10FFB0000560DB4910204860F8BD0420E060EEE7F2 -:10FFC000E660ECE7FC2000E0F820E060E7E7F420E2 -:10FFD000FBE7F020F9E7EC20F7E7D820F5E710B5CC -:10FFE0000C460146CF480BF0B2F9B048047210BD80 -:10FFF000AF4840787047AD4A517010707047F8B5FF -:020000040001F9 -:1000000004460D4650791179000208436900091928 -:100010000884501C01460E78012730464E7836027F -:1000200030438E78C9783604304309060843117886 -:1000300000020843A9006050284608303E4686402A -:10004000002B0CD0012B04D0FF209BA1E9300BF03A -:1000500082F8206B3043AF4038432063F8BD206BFB -:10006000B043F8E770B50D460446082904D9FF20CF -:1000700091A1FA300BF06FF80022002D0CD9AA489C -:100080009100635809180B6053001B191B8C0B62FD -:10009000521CD2B2AA42F3D3206BA449086070BDAF -:1000A00010B504460B22D2430C308C49944223D025 -:1000B00008DC1C3026D00A2824D0142820D0182888 -:1000C00009D11BE02046083014D0042810D008289D -:1000D0000BD00C2807D0FF2087A176300BF03BF81F -:1000E0007248047710BD042000E00020C860F7E7E4 -:1000F000FC20FBE7F820F9E7F420F7E7F020F5E72C -:10010000EC20F3E7D820F1E76948007B704773499A -:10011000C2784A6202461378184653781B02184385 -:100120009378D2781B041843120610430002C8616A -:100130007047252808D0262808D0272808D0410055 -:100140000A2807D8091D06E0022105E01A2103E06C -:10015000502101E0891DC9B2604A9160614948613E -:10016000704752498861704770B5002816D0022246 -:100170004E4C6F4BA27203201860644D6248686059 -:1001800000200126207500290AD001290FD002295C -:100190001DD049A167480AF0DEFF70BD0122E7E7E4 -:1001A0006548012A01D0466070BD066070BD3F48B9 -:1001B000012A006B05D001214905084320636960CD -:1001C00070BD0121090508432063696070BDA06905 -:1001D000002804D1492038A1C0000AF0BCFFA16961 -:1001E000A06A4018554988604A4855498160554978 -:1001F000C1600120216BC0030143216368602C486A -:10020000C67370BDF8B54A4801688F084449BF00FD -:100210004A68D206D60F10228A60002404603B4848 -:10022000394981600C2069460870474D2C6142496C -:10023000012008610BE000BF00BF00BF00BF00BF8E -:1002400000BF00BF00BF69460878401E08706846BE -:100250000078002802D028690028ECD06846007891 -:10026000002804D14D2024A1C0000AF074FF2C61A5 -:100270000E48012144728472C1722D480760002E1D -:1002800002D0274910204860F8BD01460A78104680 -:100290004A78120210438A78C9781204104309067A -:1002A000084300020D49000AC86370477413002018 -:1002B00094130020A81300207372635C68616C5F64 -:1002C0007263732E6300000080E100E0C01F0040F5 -:1002D00080000010C0000010001700400015004012 -:1002E0005B060000401500400601020025000302E5 -:1002F000050103001F0003027372635C68616C5F99 -:100300007263732E630000000040000400F501409A -:100310004080004080F501401011004080E200E084 -:1003200000130040761300200016004040160040E5 -:1003300000120040550200000010004040850040BF -:10034000488100401010004000110040FB4902208D -:100350000860FB4908607047FA490220086070474E -:10036000F9490870704710B5F84801F01EFF0028E1 -:1003700003D0F749F7480AF0EEFE10BD10B5F34878 -:1003800001F02BFF10BDF4494860704770B5F34C85 -:100390000546A06AA84203D3ED49F1480AF0DBFE06 -:1003A00001202073EF49002025614860EE48456038 -:1003B0000120216B800501432163EC49486070BD39 -:1003C000E64802210173C6210161E64A002151601D -:1003D000816AE54AC63151600121026B89050A43F1 -:1003E0000263E248416070470121E048890581606D -:1003F000DA48026B8A430021026301737047DC48CC -:1004000001214160C160D74900204860D649486059 -:10041000D24988627047D74940200862D6490A68A5 -:1004200002430A607047D44801684022914301604A -:10043000D049002008627047CF48016810229143DC -:100440000160CE49012088617047CD490020C86114 -:10045000C94801681022114301607047C849CA6940 -:10046000012A01D000207047C24A92685206520EFB -:10047000524202700020C8610120704770B50C0024 -:10048000054604D1D920B24980000AF064FEE00795 -:1004900005D0012C03D0AE49BA480AF05CFE002D0D -:1004A0000DD00221AD4801294172C472B24808D072 -:1004B00002290BD0A649B4480AF04DFE70BD0121B7 -:1004C000F0E7016804221143016070BD0168082251 -:1004D0001143016070BDF8B5A04C0025E27A910788 -:1004E00001D5410713D4D306A849002B05DA4B7B6D -:1004F000002B02D08B7B002B09D0130702D50B7881 -:10050000002B04D1520703D54978002900D10125D9 -:10051000677A002201239849002F1BD00226304021 -:10052000284348D0084601688E089949B6004D68AE -:10053000ED06ED0F10278F60002101608B4A954872 -:1005400090600C206A4610708D4F39618B490120F4 -:10055000086114E0854D8F48A86008688008800015 -:100560000860A272E372F8BD00BF00BF00BF00BF09 -:1005700000BF00BF00BF00BF1078401E1070107891 -:10058000002802D038690028EED01078002804D165 -:100590004D208149C0000AF0DEFD00203861607204 -:1005A000A0720120E07274480660002DDBD078480C -:1005B00010214160F8BD012F06D0022F0CD06449F4 -:1005C00076480AF0C8FDF8BD08680425A84308600D -:1005D0006272E372A372F8BD08680825A843086038 -:1005E0006272E372A672F8BD5C4908757047F8B58F -:1005F000664D5A49EC7B086B002C58D001245B4AAD -:10060000E4039460A04308635B480768604C1021D2 -:10061000A16000210160001490600C206A461070F7 -:10062000574C21615548012606610AE000BF00BF12 -:1006300000BF00BF00BF00BF00BF00BF1078401E5A -:1006400010701078002802D020690028EED01078B1 -:10065000002804D14D205049C0000AF07CFD002044 -:10066000E060206160606061A061434807603F49CD -:1006700000144860464910204860384CA07A012890 -:100680000FD0022810D0444945480AF064FD0020EC -:10069000E873207D022803D1424801688907FCD510 -:1006A000F8BD36480660F2E734484660EFE72F4A67 -:1006B000906000200863087B2A4E002802D07068F2 -:1006C000012809D000222E4C2069012806D00023E1 -:1006D000887A012804D006E00122F4E74023F7E7F6 -:1006E000E768012F04D000271F43012802D004E04F -:1006F0002027F9E76368012B05D000233B432A4FED -:10070000022802D007E01023F8E73968012902D156 -:10071000E168012904D000211943022802D007E032 -:100720000821F9E73B68002B02D1E368012B3DD09B -:1007300000230B4302283BD03EE0000080E100E0B4 -:1007400080E200E000E100E092000020A813002019 -:10075000B8020100A202000000150040741300203E -:10076000B3020000408100404085004000F5014098 -:100770000080004040150040001200400010004082 -:1007800000110040690300007E0300009413002064 -:100790000013004000400004F8020100CF030000F5 -:1007A0005E03000000E200E0001400400423C0E704 -:1007B000002A01D0022100E000211943022807D1BC -:1007C0006068012804D17068012801D0012700E089 -:1007D000002790480F4301680906090E02D061699D -:1007E000012900D00021297300680006000E02D004 -:1007F000A069012800D0002068738748006A00289B -:1008000003D000F0DCF9012800D00020A8730020FC -:10081000E060206160606061A06180494860804E56 -:100820008049307548683C4670620968B1620B4681 -:10083000B17A022909D17178002906D07A4A526822 -:1008400012780A40317891430ED000212970774FF9 -:10085000E10710D03978032908D0022906D002F028 -:10086000D1FC0121B06A20E00121EFE707F022F975 -:100870000121B06A27E0A0060ED53878032806D0FB -:10088000022804D00221184602F0CBFC0FE002211E -:10089000184607F010F90AE0A00708D538780328B1 -:1008A0000FD002280DD00021184602F0BAFC5E4895 -:1008B00041680622B01C09310AF096FA002805D0DA -:1008C0000DE00021184607F0F6F8F0E75648317AB7 -:1008D00040680078C009814201D1012000E0002079 -:1008E00068702046FFF7F7FD387800280DD0012802 -:1008F0001ED002282FD003284AD04D494D480AF077 -:100900002AFCB07A022856D075E0A00701D507F07E -:10091000C6FC200702D5012007F0FDFC600702D5C8 -:10092000002007F0F8FCA006EBD507F059FCE8E73B -:10093000A00701D508F0E8FF200702D5012008F044 -:100940004DFE600702D5002008F048FEA006D8D56D -:1009500008F098FDD5E7A007BF25002802DA2C4053 -:1009600004F022FF200703D52C40012004F05DFB9A -:10097000600703D52C40002004F057FBA00602D5E9 -:100980002C4004F061FE6006BBD504F04AFBB8E7DA -:10099000A00701D506F0F0F8200702D5012005F0E8 -:1009A000B1FF600702D5002005F0ACFFA006A8D576 -:1009B00005F01CFFA5E7307B00281CD0174900225A -:1009C0004A60022820D0012803D019491A480AF0A9 -:1009D000C2FBB16A3069884203D8154917480AF04A -:1009E000BAFB1048316941600120316B8005014339 -:1009F000316313494860307D012800D050E611482A -:100A000001688907FCD5F8BD3169B06A411805480D -:100A10004160E9E740160040401500404081004039 -:100A20007413002040850040001500409200002013 -:100A3000B8020100FD0400001205000013050000CB -:100A400000F5014000E200E02E48002101704170F5 -:100A5000704770B5064614460D460120F0F7A2FC1B -:100A600028490120284B08709E60DC601D6170BD24 -:100A7000F8B504460120F0F795FC224901200870E2 -:100A800021494C60214900264E600321204D090672 -:100A9000A960204F002C0AD0012C03D01EA14120B8 -:100AA0000AF059FB3E60032000066860F8BD38601C -:100AB00001200006F9E710B51248017800290ED090 -:100AC0000321134A0906916010494A680021002A4F -:100AD00003D0154A1268427000E041700170002096 -:100AE000F0F760FC10BD07480178002907D00748DF -:100AF0004068002802D00C480068C0B270474078B7 -:100B0000704700009300002000F5004000F1004015 -:100B100000F5014000F200407372635C68616C5F35 -:100B200063636D2E6300000000F400403B48002129 -:100B30000170417010218170704770B506461446EF -:100B40000D460220F0F72EFC01203449344A08708B -:100B5000E41E14619660556070BD10B50220F0F778 -:100B600021FC2E49012008702E48002101604160BF -:100B7000816001202C49C005486010BD10B5274890 -:100B80000178002917D00121274AC905916025491C -:100B90000B680022002B05D04B68002B02D089681F -:100BA000002902D04270102103E0012141701F4949 -:100BB0000968817002700020F0F7F4FB10BD17483F -:100BC0000178002912D01748016800290AD001686D -:100BD000002905D04168002902D08068002803D090 -:100BE000002070470220704701207047407870470E -:100BF0000A48017800290FD00A480168002905D069 -:100C00004168002902D08068002801D01020704778 -:100C100006480068C0B27047807870479500002091 -:100C200000F5004000F1004000F5014000F40040F4 -:100C3000FFB593B0044600201D9E049015981C9D9E -:100C40001027082806D0E06901F014F8002809D020 -:100C50003770CCE028880921384328801F98022764 -:100C6000017016E0E169012088710521E269C9027D -:100C70009180E1698872E169F9480881E1690020A1 -:100C80008873288820210843288011211F98042771 -:100C900001701F980225801C0390307810900A2064 -:100CA0003070204618301190F5F7A1FC00206FE05D -:100CB0001598102809D1022D07D06846828A049918 -:100CC0000398401A8270110AC1706846C08A16994A -:100CD000884203D9E349097A149106E0884204D195 -:100CE0001099002901D0317021E003990870000AA1 -:100CF00048701E980088401BC01B83B2FF20C01B99 -:100D0000984200D203460398149AC0190CA9009285 -:100D1000019002912020015D6846C08A0022F5F70B -:100D2000DBFC3070002806D0C0B2832862D0684651 -:100D3000C08A208345E00F98002805D0C948006884 -:100D400000790A2830D33CE06846008EC119C9B248 -:100D50000491022D0FD01F99049A4978914203D132 -:100D60006A46128C824209D0BE480491006801781C -:100D7000032909D027E008461F994870B948006840 -:100D80000178042906D008E000790A281BD2012046 -:100D90000F9009E06946C98A818003990498081870 -:100DA00003900498281885B205AA14991198F5F7AC -:100DB00021FC002805D11E980088401BB84200DBAA -:100DC00076E7022D0ED01598102807D1049A0399C2 -:100DD0006846808A891A8870000AC8701E98058043 -:100DE000002030709F4800680078032802D000205F -:100DF00017B0F0BD0220FBE7F8B50446406B0026B3 -:100E0000134600282BD0491F8DB2618F2A46083225 -:100E1000278F8A18BA4221D89A7840185F78110231 -:100E200039430170090A41701A79DF781102394398 -:100E30008170090AC1700571290A41712A46591D3C -:100E4000801D09F0FEFF608FAD1D401980B26087E4 -:100E5000626B002110180170417000E009263046D5 -:100E6000F8BD30B50B88048F9C4212D9446BE01852 -:100E70004478057824022C430BD044790579240268 -:100E80002C436404640CA41D1B190B80106000200B -:100E900030BD822030BDF7B588B000256846058298 -:100EA00005275DE00398417802780E0216434179E8 -:100EB000027908021043000452D40A9801230680E4 -:100EC00005A802905B02002200970195304609991F -:100ED000F5F702FC04004AD16846018A01830398B1 -:100EE0004179027909021143437802781C021443C4 -:100EF000B4421ED10A041CD44B0401215B0C8903AB -:100F000000950B4301970295C17880780A0202434D -:100F100020460999F5F7FCF9040011D103994879A5 -:100F20000A79000210430122D20310430871000A1B -:100F3000487103AA06A90898FFF793FF0400CED0D2 -:100F400003990095019702954878097800020843B3 -:100F500069468B8A00220999F5F7DAF9822C06D1C5 -:100F600003AA04A90898FFF77CFF04009AD06846FA -:100F7000058209E003984179027909021143490485 -:100F8000490C0171090A417103AA04A90898FFF7E5 -:100F900068FF0028EED0822C02D020460BB0F0BDB6 -:100FA0000020FBE730B50446406B002597B00028D1 -:100FB0000DD00B2268460270228F0281606B039174 -:100FC000019000216846F2F72AFB684605706563C8 -:100FD0006587258717B030BDF8B50F460546696BA4 -:100FE0000020069E144600290FD0012B0DD1324659 -:100FF00039462846FFF74FFF002806D1002C04D0C1 -:1010000032463946284600F044FEF8BD00220280F0 -:10101000C262831D0263C36142634287028720303C -:101020000170704710B50022D24302800420FBF704 -:10103000E4FA10BD10B596B00446FFF7B3FF208E5A -:10104000002808D0012069460870E06A019000215C -:101050006846F2F7E4FA0020E062206316B010BDA3 -:1010600001280000AC1300200146098800200A076F -:1010700000D501200A06120F01D002221043CA0532 -:1010800001D5042210438A0501D5102210434905D9 -:1010900001D5202108437047FFB5A9B00600329D55 -:1010A000359C2B981F46229016D0007841060FD40D -:1010B0008106890E1E2909D021884A05520E0BD1BE -:1010C0003A88172A08D3FE4A914205D0C10906D0B2 -:1010D0008006800E122802D003202DB0F0BD2046DD -:1010E0002C302690F7492A980872002018AA0390FD -:1010F00010726A46107404AA0A60339A4A6020AAE1 -:10110000908090812298007801908106681C1C9044 -:10111000701F1D902B98890EC21C249222462032EB -:101120001B92083A401C02920B000AF035F91FFD91 -:10113000FD11FD1FFD8EFDFCFDFBFDFAFDF9FDFC23 -:10114000FDF8FDFDFDF7FDF6FDFDFDFDFDF5FD00E6 -:10115000032E76D102E018A9087219E30320287043 -:101160001C9917220A7000224A70CFE2052EF0D196 -:101170004178027808021043208320A98880249AAD -:101180005178127809021143618300287ED0884289 -:101190007CD800202072E080401E60840298F5F721 -:1011A00026FA05202870A81C0190022000901BAA96 -:1011B0002A990298F5F71EFA002868D118A8807CB1 -:1011C000012803D002206870102002E0012068701E -:1011D00002202490002225A91CA8F1F7AAFD0028CE -:1011E0002BD120A8007D2499814226D13A880099EC -:1011F000801C511A814220DB10A8C18D019801701A -:10120000090A417001991CA8891C01910099019A51 -:10121000891C009125A9F1F78CFD20A8007D01997A -:101220001BAA091801910099081880B200902A9908 -:101230000298F5F7DFF90028CCD00098022826D0D4 -:1012400064E272E018A9087261E2072E6DD341785A -:101250000346027808021043208320A98880249A3C -:101260005178127809021143618300280ED0884218 -:101270000CD8012020725879197900020843E080C7 -:1012800000202073E06900F0F5FC01E098E0A9E09F -:1012900000280ED1E169012088710521E269C902A7 -:1012A0009180E1698872E16987480881E1690020DD -:1012B0008873F01F60842298C01D60620298F5F761 -:1012C00096F907202870681C0090012001900020EA -:1012D00010A9C8852FE00198012814D0E069807911 -:1012E000012830D000981E38417F007F0902014359 -:1012F00000980170090A41700098801C00900198C4 -:10130000801C80B2019010A8C18D00980170090A5C -:1013100041700098801C09E00AE296E13BE1DFE0C1 -:1013200004E29BE077E036E016E2AFE0009001983F -:10133000801C80B201901BAA2A990298F5F75AF9ED -:10134000002803D007E010A8818DD1E739880198E3 -:10135000081A0428BFDA0198012843D0E06980798F -:10136000012804D010A8818D5548814206D110A8CB -:10137000818D00980170090A417009E000981E38BB -:10138000417F027F0802009910430870000A4870EC -:101390000198801CBAE1072E01D0152E76D1417834 -:1013A000027808021043208320A98880249A51786B -:1013B0001278090211436183002801D0884201D9C3 -:1013C00001203FE7012020720020E0802073052EDD -:1013D0000AD01D982299E269C0B2491DF1F783FC39 -:1013E000002801D00A202DE70020C04360841AA8FD -:1013F000019023A922980297039500910078002379 -:101400008206920E20462A99FFF712FC0390208B49 -:1014100020A988807BE1032EC0D1402220A98A81A7 -:101420004178027808021043208320A988802A99F5 -:101430001EAB1C9A02930192009139880022491E2A -:101440008BB21B990978F5F747F918A9087200289B -:1014500033D10B20287010A8008F3FE0052E9DD1BE -:10146000802220A98A8141780278080210432083D3 -:10147000249984464A78097812020A43628420A992 -:1014800088801248824202D30720DBE6AFE03F208B -:101490008002024362842A981FAB1C990293019137 -:1014A00000903888401E83B21B9801786046F5F79B -:1014B00013F918A9087200280CD08328AAD107E0D4 -:1014C000FFFF0000AC130020012800000102000013 -:1014D0000220B8E00D20287010A8808F401C15E174 -:1014E00001990C22C9095143C91CB14204D9019880 -:1014F00040067CD5002009E14278037810021843A9 -:1015000020AA9080844622980078400609D50520BC -:101510006A46107422980078C00905D00020107423 -:101520001DE106206A46107424981F902A9A0090A4 -:101530000023701A029383B21E9001921B9800221E -:1015400001786046F4F7E4FE18A9087200226946A3 -:101550000A74832801D10220039022980078400663 -:101560000DD52088C00506D520A9208B8988884202 -:1015700001D100206062002018A90872C6E0FF2196 -:10158000013120A88181808820831E9860841F9863 -:1015900060621320B8E0052E29D341780278080252 -:1015A000104320A98880218F002902D0FE4A914251 -:1015B00006D10A216A4611740121C943218702E03C -:1015C00007216A46117422992A9A491D01920091B5 -:1015D00001221D990023D203029311438BB2249957 -:1015E0004A78097812020A431B99097800E0C9E099 -:1015F000F4F78EFE18A90872002269460A740122C7 -:10160000520220A98A81832808D0002809D0218F7E -:10161000E54881427ED10020208778E088882083B9 -:101620004DE7606B002808D031462046229AFFF72C -:10163000E3FB18A90872002869D12B463A463046C8 -:10164000229900F056FB039061E02298022E407828 -:1016500001907DD1002801D0012879D10820694668 -:1016600008740198087521A800901B980022017841 -:101670002046019BFFF7B0FC6946002248758A7539 -:10168000002802D10198012809D0208F002806D017 -:10169000002008740120800220A988810EE004A89F -:1016A0003399F1F7BCFF03900020694608740120CC -:1016B000800220A988810398022807D0BB480068CF -:1016C0008079002805D018A908722BE001982083A2 -:1016D0001DE00398002803D0812018A9087240E07B -:1016E00021A800901B98012201782046019BFFF75A -:1016F00073FC18A9087220463499FFF753FC18A907 -:10170000087A002803D11920287001203880684603 -:10171000007C00E03CE0002804D004A83399F1F7F5 -:101720007EFF0390039800282ED01AE0062012E5D1 -:101730002078000713D5012E11D1092168460174C4 -:10174000A188818204203499FAF757FF082100E02C -:1017500005E020A88181CDE60198400612D503203E -:10176000039020A9208889890843208020A988899E -:101770004005400E04D026992B9808602698868054 -:101780000398AAE40420E6E418A8007A00280ED002 -:101790000120287022980078687020A88088A8709E -:1017A000000AE87018A8007A28710520388020A95E -:1017B0002088898988432080E2E7FFB50746A1B0E9 -:1017C00000201C903A7801209040794A7C681040B3 -:1017D00010AA1087744B22885B1C9A4203D0002801 -:1017E00004D0100702D5012025B0F0BD249E0020B2 -:1017F000307023980025028810A8028518A8057566 -:101800006A4B68461972057404A8186020462C308B -:101810001B902A985860249E94463878721C0521A3 -:10182000039201282DD0022808D003287DD13078DA -:10183000800980011D303070B889A0803878022876 -:1018400004D13078800980011B303070F01C1FAA51 -:1018500001900292009110A8008D0022C01E83B258 -:101860002020015DB889F4F737FF0028DED1039806 -:10187000B9890170090A417010A9888FC01C0885B8 -:1018800028E1787B18AA10753A7B012A02D0022A37 -:10189000CCD1FCE022887F231B011A4010AB1A87B1 -:1018A000802A4AD006DC102A10D0202A0ED0402AE6 -:1018B0000AD124E0FF3A013A65D0FF3A013A79D0E3 -:1018C000FF3AFF3A022A76D00525A2E02078C0062A -:1018D00001D5082000E010201C9004206A461074F6 -:1018E000002090821AA81DAA1EAB039601920290B6 -:1018F00000933B8A20461C9AFFF79AF984E0228BDA -:101900003B8A9646934268D10A221C92002839D11C -:10191000039801906046401E1FAA83B202922020C5 -:101920000091015D0022704600E0BAE0F4F7D4FEB9 -:10193000014618A801750B201AE0228B3B8A9646B7 -:1019400093424AD10C221C92002862D10398019044 -:1019500060461FAA401E0292009183B22020015DC2 -:10196000628C7046F4F7B8FE014618A801750D2088 -:10197000307010A8818F491C0185042168460174CC -:10198000218B818245E0238B3A8A9C469A4224D15E -:1019900012221C9200283CD1606A002813D0002239 -:1019A0006B4607C3638C07E0FEFF0000AC1300200A -:1019B00009F800000DE04BE02020015D6046F4F7DF -:1019C000A7FC18A9087513203070012010A90885FC -:1019D0001FE0398A228B914201D00425B6E01621FE -:1019E0001C91002815D11B98818802682046FFF7BA -:1019F00003FA18A9087500280BD11B983346016813 -:101A000080881AAA00F075F9054602281BD0042D1B -:101A100019D01B988088002811D06846007C0028C7 -:101A200004D004A82A99F1F7FAFD05460120694679 -:101A300008741B981B990068059000208880002D71 -:101A400048D0052D2ED06846007C032878D07DE054 -:101A500018211C91002806D0388A20832046B968B6 -:101A6000FFF7A0FAD5E72046183000902020015D4E -:101A7000237E01222046FFF7AFFA18A90875002837 -:101A8000ECD119203070012010A90885E6E72088E4 -:101A900001214902084010A90887FF38FF380228B1 -:101AA00006D0052510A92088098F884320804DE0A5 -:101AB000208F9849884290D116201C9038690028C0 -:101AC00005D06063B88A20870020608702E000208C -:101AD000C043208710A8008F7F21090102468A4356 -:101AE0000DD0782300220420B968FAF7DFFC38789B -:101AF000A07010A92088098F0843208002E0218867 -:101B0000814321806846007C002805D082484168D6 -:101B100004A8F1F784FD054618A8007D002815D01B -:101B20001C98707001203070208BB070000AF0702B -:101B300018A8007D3071052110A8018506E0FFE797 -:101B40007548416804A8F1F76AFD05467248017AB4 -:101B500020884005400E22D11B98808800281ED086 -:101B6000239A0026138810AA1385249A2A9B6F466D -:101B70004CC71B9A039412681AABFFF78DFA0546FF -:101B800002280CD00120694608741B982A99006825 -:101B9000059004A8F1F743FD05461B98868010A820 -:101BA000018D2398018028461EE600B597B00428D1 -:101BB00007D102206A461070019100216846F1F7B2 -:101BC0002EFD17B000BD10B5534C037800222168DC -:101BD000012B02D0022B42D126E00B78002B01D042 -:101BE000042B03D10A7122680321117021688388B4 -:101BF0000A79D200921D8B5221680A79D2000832EC -:101C00008918C2880A80216803890A79D2000A32B9 -:101C10008B52428920680179C9000C3142522168F7 -:101C20000879401C08711EE00A7482888A80216845 -:101C3000C288CA8022680189118122684189518144 -:101C4000C1682068C1606168F1F7E9FC01460228BB -:101C500007D02068007C002802D1002903D0812011 -:101C600010BD832010BD002010BD406B002800D0A7 -:101C7000012070478178012909D100880521C90216 -:101C8000884202D0491C884201D1002070470520BB -:101C90007047F7B586B00024684615460F46848124 -:101CA00005261AE004984178027809021143298038 -:101CB000811D019602940091417902790B02134330 -:101CC000C178827809020A43417800780902084302 -:101CD0003946F4F71DFB002806D104AA03A906988B -:101CE000FFF7BFF80028DDD0822800D1002009B01E -:101CF000F0BD10B51488844201D2052010BD172410 -:101D00001C701080421E581C491C09F09AF80020D3 -:101D100010BD0000FEFF0000AC13002030B50346EC -:101D2000002002460DE09C5C2546303D0A2D02D382 -:101D30000020C04330BD0A25684330382018521CAB -:101D4000D2B28A42EFD330BD70B50D46144608E0DA -:101D50000A2109F0DFF82A193031203A641ED177C0 -:101D6000E4B2002CF4D170BD10B5002310E0040AD9 -:101D700000020443A0B2CC5C44402006000F604047 -:101D80000407240C44402006C00C60405B1C9BB23E -:101D90009342ECD310BD000010B572B600F0DCF831 -:101DA00000280BD0EFF77CFAFAF7E1FD08F097FB7B -:101DB0006E490020C86288626D49086062B60020E2 -:101DC00010BDF3B5002501200007C06A81B0C043F3 -:101DD0000006000E04D167480068401C00D10125B0 -:101DE00072B600F0B9F8002802D062B60820FEBD35 -:101DF000EFF7ACF9EFF758FA5F4B604E00211A6825 -:101E0000CA40D2071FD00246CA40D20718D14AB2F0 -:101E1000002A07DA1407240F083CA408A400A41918 -:101E2000E46904E09408564FA400E419246892077A -:101E3000D20ED4402206920F012A04D0032A02D0E7 -:101E400062B65048FEBD491C2029D8D30198030032 -:101E500009F0A2FA142123232323232323230B0D88 -:101E60000F11131F1517191B1D2E002416E0012436 -:101E700014E0022412E0032410E004240EE00824FD -:101E80000CE009240AE00A2408E00B2406E00C24F4 -:101E900004E0052402E0072400E00624F0690121A3 -:101EA0000002000AC9070843F061002D04D009E0D0 -:101EB00062B601200003FEBD2C4D3348E862EFF707 -:101EC000F3F9A8622A49314808603149029808604C -:101ED000EFF7EAF9214608F0E9FAFAF70CFD08F005 -:101EE000EFFC08F065FB0198EFF7A8F9040062B673 -:101EF00003D0FFF751FF2046FEBD0020FEBD10B508 -:101F0000044600F029F8002800D0012020700020AD -:101F100010BD204908600020704710B50C461028FD -:101F200008D011280BD012280CD013280ED0012075 -:101F3000086010BD03CC083CFFF743FF0AE0FFF741 -:101F40002BFF07E02068FFF7DAFF03E01149206864 -:101F500008600020206010BD05480C4900688842D8 -:101F600001D10120704700207047000000050040AB -:101F7000640000200010001000E100E000ED00E02F -:101F800000E400E00110000000220000BEBAFECA1A -:101F9000980000200400002010B520380C460300F3 -:101FA00009F0FAF933A6AAAEB2B8BCC0C5E0DBE4CA -:101FB0001B1F23272C31373C41474D5054585C6040 -:101FC0006D71656974787C8084888C9094989C9FEE -:101FD000A2CACFE9F0F3D3D7F800206800F0DDF80B -:101FE000D6E0206800F0E1F8D2E0206800F0F5F8D3 -:101FF000CEE0207840B208F0C9F8C9E0207840B2BD -:1020000008F0E7F8C4E02078616840B208F0FAF818 -:10201000BEE0207840B208F00AF9B9E0207840B27A -:1020200008F015F9B4E02078217940B208F020F9E1 -:10203000AEE02078616840B208F04AF9A8E008F004 -:1020400056F9A5E0206808F05AF9A1E0207808F0D8 -:102050006FF99DE02068FAF738F899E02068FAF700 -:1020600038F895E021792068FAF73AF890E020688E -:1020700007F0D8FF8CE0206807F0D9FF88E02078CF -:1020800007F0D9FF84E007F0E3FF81E0207807F054 -:10209000E5FF7DE0207807F0F7FF79E0206808F0A1 -:1020A00010F875E0206808F012F871E0206808F078 -:1020B00014F86DE0206808F015F869E0206808F071 -:1020C00017F865E0206808F019F861E0206808F06A -:1020D0001AF85DE00846EFF751F859E0F0F787F994 -:1020E00056E0F0F7B4F953E02068F0F7BCF94FE0A0 -:1020F000206800F0E1F84BE0206800F0E9F847E0E4 -:10210000206800F0F0F843E02078A268616800F0F1 -:10211000F5F83DE0207800F006F939E0207800F08D -:1021200017F935E02078616800F027F930E0207871 -:10213000616800F03AF92BE02179207808F008FA7C -:1021400026E0206800F06BF822E02068FAF7FEFA3B -:102150001EE02068FAF7E2FA1AE007CC0C3C08F01F -:10216000F1FA15E0206808F044FB11E003CC083CCC -:1021700008F06FFB0CE0206808F065FD08E009E05E -:1021800003E0FFE708F077FD02E0206808F0AEFD0D -:10219000206010BD0120086010BD002101700846BC -:1021A00070470146002008707047EFF31081C9079F -:1021B000C90F72B60278012A01D0012200E0002284 -:1021C00001230370002900D162B6002A01D000204B -:1021D0007047012040037047E7E7EFF31081C9071C -:1021E000C90F72B600220270002900D162B6002029 -:1021F0007047F2E710B52848FFF7CFFF002803D05B -:1022000026A11D2008F0A7FF2348401CFFF7C5FFAB -:10221000002803D021A1212008F09DFF10BDF1B5B9 -:10222000224D6F6801261C48FFF7BFFF1A4C00289B -:1022300003D10026601CFFF7D0FF1D4A1D49012075 -:10224000506000BF00BF00BF00BF00BF00230B6095 -:102250004B60009B6B60106000BF00BF00BF00BF01 -:1022600000BF0868002802D148680028F9D04868F3 -:102270000028E4D1002E04D06F60601CFFF795FFAA -:1022800007E0601CFFF791FF0028D3D10248FFF759 -:10229000A4FF0020F8BDC2E79C0000207372635CBD -:1022A000736F635F6563622E6300000000E50040AA -:1022B00000E0004000E100405A495B4B0A685B497E -:1022C0009A42096801D18904890C01600020704795 -:1022D0005449554B0A6855499A4201D18004800CF3 -:1022E0004860002070474F494F4B0A684F499A4257 -:1022F00001D18004800C88600020704730B5494BC4 -:10230000494D1C684A4BAC4202D0102802D203E06F -:102310000E2801D3184630BDC30044481818016187 -:102320004261002030BD3F493F4B0A684049491C8B -:102330009A4202D0042802D203E0022801D30846C0 -:1023400070473C4A0121C00080180160002070479E -:102350003449354B0A683649491C9A4202D0042850 -:1023600002D203E0022801D308467047314A012116 -:10237000C000801841600020704770B5294A2C4B7E -:1023800014682D4E284D82005B1C9219AC4203D07C -:10239000042803D2116006E0022801D3184670BD5C -:1023A0008804800C1060002070BD70B51D4A204B61 -:1023B0001468214E1C4D82005B1C9219AC4203D064 -:1023C000042803D2106806E0022801D3184670BD25 -:1023D00010688004800C0860002070BD10B5134A9E -:1023E000164890600E200021C3009B1819615961A6 -:1023F000401C1028F8D300200F4A05E0022803D320 -:1024000083009B18196005E083009B181C68A404D6 -:10241000A40C1C60401C0428F0D310BD03490748DD -:102420008860704764000020BEBAFECA00F5014013 -:102430000820000000F0014000F8014000C0FFFF4C -:10244000FE48C07E7047FE4840687047FD48C07E29 -:102450007047FFB5F94E85B0706A346805686068EA -:102460000190306A0390298D0798401A80B202903B -:102470000898002804D0274638372046483002E024 -:10248000371D2846A0300090032038710598002899 -:102490001FD001287ED0022863D003287BD0EAA178 -:1024A000ED4808F058FE0898002806D0387903282F -:1024B00003D0E5A1E94808F04EFEA16A7069FAF779 -:1024C000B0FDB860216A606A814265D900990860F0 -:1024D00034E1306A002803D1DBA1E14808F03BFE7B -:1024E000288BE0494843421806980021002804D070 -:1024F0005043DD4908F00EFD411CA1610191AA88FD -:10250000D848002142430698002804D05043D649B9 -:1025100008F000FD411CE161306AD24A801CA062D3 -:10252000298BD04B5143019A891AD04A891809182E -:10253000A162AA7D01985A4340008018FF301930EB -:1025400020626062306A081AC949FF38153888422B -:10255000A9D2C84988427DD2BBA1C74808F0FBFD7B -:102560008BE0288BBF4AE16850430A180698002187 -:10257000002804D05043BC4908F0CCFC411CA161A8 -:10258000AA88B848002142430698002808D0504342 -:10259000B54902E03EE073E0CEE008F0BBFC411C30 -:1025A000E161306A002803D1A7A1B44808F0D3FD47 -:1025B000A620405BAB4A0028288BE16821D050431D -:1025C0000818A169401AA0622169A068A54A484379 -:1025D000A1694018A97D400051434018FF301730D1 -:1025E0002062A888E1695043411AA5480818606232 -:1025F000A06A316A401A9E49FF38553888423CD358 -:1026000051E750430818A169401A3168D638496823 -:102610004018D8E7284680300190C08C002802D0AE -:10262000306A002803D188A1964808F094FDA88854 -:102630008C49E3694843C01AA06201999C46CA8C40 -:102640002169A368521A4B43A16959186346534341 -:10265000C91800E011E0AA7D824B49005A4389184D -:10266000FF3117312162864941186162316A401A8F -:102670007F49FF3855388842C2D20120387112E7AD -:102680000898002803D03420005D00287ED1A88857 -:1026900074494843E169401A02994843A0622846B8 -:1026A00080300490C08C0028019825D0002803D0E9 -:1026B00065A1754808F04FFD04986A4AC18C0298DC -:1026C0000818E16948434000FF3017302062A888AD -:1026D0005043411A6A48081860626C4840680028F4 -:1026E00019D0A26A03990120511A614AFF3955395C -:1026F000914285D23871D6E6002802D0039800288E -:1027000003D151A1624808F026FD0198A16AD6388C -:102710000818A062D0E7FAF7F2F97269014610468C -:10272000FBF706FCA16A081A5149FF385038884265 -:10273000A5D2012009B0F0BD00980160009855496C -:1027400000684018F86028468030028A0799511ABC -:1027500009B2002904DD0599022901D0032100E016 -:10276000002179710E99002915D0028F002A1ED000 -:10277000418F4187A0352B7F491C4B4393420AD29E -:102780007979491E002906DD012100E00CE079710C -:10279000418F491C4187089838700898002808D054 -:1027A0003420005D002804D0022009B0F0BD0021D3 -:1027B000DFE708980121484020346075307FF27EC1 -:1027C0003946B37E9A4202D0FAF710FE04E00020A8 -:1027D000F076B07630607062002009B0F0BDF0B5E0 -:1027E0002A4F83B038680568416A2E460C68203647 -:1027F000717D00290AD0698E228D914206D1407ADE -:10280000002803D110A1244808F0A5FCFAF777F9B5 -:102810001E4F39684A6901461046FBF789FB3F683D -:102820000028796A096807D089880E4A51433A68B6 -:10283000D269891A08F06EFB698E2FE0B813002068 -:10284000B8000020E01300207372635C6C6C5F6C56 -:102850006D2E73302E630000310500003A05000034 -:10286000B7040000E204000040420F0033040000FF -:102870005C0800001D030000D4040000DC0400001C -:1028800094FBFFFFF50400001B050000A8000020DA -:1028900014050000FF0B000021060000228D131814 -:1028A000994202DB491C698602E0401C10186886C8 -:1028B000B07D002806D19421688E095B884201D141 -:1028C000401C6886388BFB4E401C388320464030C5 -:1028D0000190C1888088081A218D401E401887B257 -:1028E000C03418E03068F449406A002300794000A1 -:1028F000085A009323795B00C95A081881B2287DD1 -:102900000023FFF7A6FD00280FD001280FD0EB49C8 -:10291000EB4808F020FC6A8EB81A00B20028E1DA11 -:1029200001980821817005F0BDFF03B0F0BD688EED -:10293000401C6886EFE770B5DE4D09292B686A6890 -:102940007BD20C007C4424792419A7440463869626 -:1029500083A5A575A20000201062D17E042956D25D -:102960000B007B441B79DB189F4451510147516A8E -:102970000C68116808701168486010682030407D4C -:10298000002808D1FAF7BBF869680968096CFBF7F9 -:10299000CFFA002817DC6868228D0168498E9142C1 -:1029A00005D123468033998A8A1ADA8204E0891A8B -:1029B000962211530168498E21850268C16811640D -:1029C000C168416111E068680168098E228D8B1A27 -:1029D00022468032D3820168098E218501680B6C02 -:1029E000C3600B6C4361886C1062204606F0C8FB24 -:1029F000002821D0B3A1B74829E0D068506105F084 -:102A000088FA002818D0EF20AEA180001FE0ADA109 -:102A1000B1481CE0D07E042817D20100794409791E -:102A200049188F441212010B06F0E6FC002803D06F -:102A3000A4A1AA4808F08FFB70BD2DE005F09FFB14 -:102A40000028F9D09FA1A64801E09EA1A54808F062 -:102A500082FB70BDFDF7CBFD70BDD87E022806D08D -:102A6000D87E032806D0FF2096A1AB300EE0FFF7FA -:102A7000B6FE70BD00F013FC70BDD87E0228F6D003 -:102A8000D87E0328F6D0FF208EA1B83008F063FB73 -:102A9000F0E7FAF719F870BDFF208AA1C630D6E733 -:102AA000F3B50126834C904D81B00F46092945D2DC -:102AB00008007844007900188744042D38382D40E8 -:102AC000403838000121884800F0D0FB3946019891 -:102AD000FFF731FFE87E022826D160680468406A6B -:102AE0000768F9F7EAFFB988804A5143E269891A11 -:102AF000D639E162B72803D283200001081A02E028 -:102B0000081A7B494018E0627A48E16A814200D89D -:102B10000846E06205E00198FFF70DFFE87E022815 -:102B200002D128682030067503B0F0BD25600198F9 -:102B3000FFF701FF0020206003B0F0BDFF2061A17E -:102B4000623008F008FB03B0F0BD70B506460C46D5 -:102B500009291FD208007844007900188744040D21 -:102B600011110D1A1A1111000121634800F07EFBAA -:102B700021463046FFF7DFFE70BD3046FFF7DBFE33 -:102B800070BD4C4D5C4828603046FFF7D4FE0020F5 -:102B9000286070BDFF204BA1883008F0DCFA70BDC2 -:102BA000F0B5514985B0CA7E0026424C032A03D0B5 -:102BB0002831CA7E032A64D100252160002824D050 -:102BC00001280ED03FA14D4808F0C5FA2068002E1C -:102BD00005604562256054D049484560002005B035 -:102BE000F0BD0320887600E020BF2068C17E002968 -:102BF00003D0C17E827E9142F6D0C17E002902D0F0 -:102C000000268576E2E70126FBE700260327084633 -:102C10008F76C97E032903D0C07E00282DD02DE0F9 -:102C2000007F002803D127A1364808F094FA2068D5 -:102C3000067F684607714771F9F761FF0290FF2030 -:102C4000F530039001216846017069463046FAF775 -:102C5000CDFB2068007FFBF7F7F900280BD0206838 -:102C6000007FF9F731FF20680577C5768576056026 -:102C70000126456202E020BFEBE701262068857649 -:102C8000A4E70C2005B0F0BD10B5174800F04DFBCF -:102C9000194800F04AFB1C49002008751849487083 -:102CA00011494861144A506188769076014948601C -:102CB000086010BDA800002034B4010048280100BD -:102CC0005B0600007372635C6C6C5F6C6D2E73301E -:102CD0002E630000B6030000C3030000D60300000B -:102CE000DB030000E2030000B8130020E204000050 -:102CF00087F8FFFFEC060000E01300201E03000031 -:102D0000B80000207E02000008140020F8B5FF4E35 -:102D100005463068002401270004810FFC48006844 -:102D2000800F814204D0FF20FA49D03008F013FA16 -:102D30003068F94E0004810F30680006800F814230 -:102D400004D0FF20F349D13008F005FAF348C069F8 -:102D50003168800F0904890F884204D0FF20ED49B3 -:102D6000D23008F0F8F9EE480570EE4DEC76AC760E -:102D7000ED4EF476B476ED48077104606C627462CF -:102D80002C60EB4F346028467C6000F0CEFA304671 -:102D900000F0CBFAE74804757C706C617461AC7626 -:102DA000B476E54844600460F8BDE04908717047B6 -:102DB000F8B5DC490546CA7EDB48DF4C002A02D163 -:102DC000C27E002A03D0C97E022907D009E0DB4871 -:102DD0002160F9F725FE216808770AE0C17E002905 -:102DE00001D00C20F8BD2060D548F9F719FE216804 -:102DF0000877CF48456021680860D2484862284675 -:102E00000121BC30F9F790F9A035287F8007800FA9 -:102E1000401C28772068007F002803D1BD49CA489C -:102E200008F099F9F9F749FEC849884200D20846E6 -:102E3000C749401886B221680320C87604F084FF91 -:102E40002168086104F0A8FF01270025002826D08A -:102E500004F0A2FF21684A6A106008680121077027 -:102E60006846F9F7EAF868460078BA49000208F0BF -:102E700051F80F46F9F743FEF119FAF7D2F8216835 -:102E8000C86022680320107250721571107FD37EC3 -:102E9000111D967EB3420ED0FAF7A8FA0FE0F9F7AB -:102EA0002EFE3146FAF7BDF82168C8600868057043 -:102EB00008684770E5E7D576957615605562206815 -:102EC000058300202560F8BD7047F8B5954EF17E6A -:102ED000002903D19449C97E002901D00C20F8BDF6 -:102EE0000221F176914F934D77623560002438606E -:102EF0002C7500943979C0304A00974900798A5A74 -:102F00004000085A2346101881B222462046FFF797 -:102F1000A0FA002803D07F49904808F01CF92C61E2 -:102F20000120AC6028756C862C868D4884753968C4 -:102F3000088D401E088534830020F8BD10B57E48FA -:102F400001244068817E03290CD00168497800295A -:102F500006D0006A8349884202D9002405F03CF972 -:102F6000204610BD0024FBE77348406802681178D2 -:102F7000491C1170016A0068C26A914204D8007D40 -:102F8000012801D0012070470020704700207047C1 -:102F9000F8B5694D63482860416A00270C680068ED -:102FA000342126460F548036B17F002927D1007D79 -:102FB000032824D1F9F7A3FD29684A690146104680 -:102FC000FAF7B6FF00281ADD2D68674B6A6A296890 -:102FD000126892880091C9695A43511A07F09AFF02 -:102FE000218D401C4218009953480A862968B28AEC -:102FF0000B8ED21A12B2002A03DC0760F8BD2F60D4 -:10300000F8BD012220318A7521464031CA8889885D -:10301000514F511A228D491E89188EB20546C0346F -:1030200019E0496A09794900795A00220092028E12 -:103030002379007D5B00FB5A591889B20123FFF701 -:1030400008FA00280ED001280FD002280AD03149F2 -:10305000464808F080F829680868028EB21A12B251 -:10306000002ADEDA00202860F8BD28680068018E9A -:10307000491C0186EFE770B52F4900244D680628EA -:1030800076D202007A441279921897441820020EE0 -:10309000240D002000F08FF9EC76AC762C60002136 -:1030A00008466C6200F0E2F870BD1D480D680078BB -:1030B000EFF72AF9EC76AC762C606C6270BD0120DB -:1030C00000F079F90021084600F0D0F870BD2968B9 -:1030D0000320087570BD686A29680068CA698A603B -:1030E0008188214A51432A68D1600146C0310A8A49 -:1030F00002838A7B82754A8A82808A8AC280C98AD0 -:10310000018129680220087570BD31E000E400E00B -:1031100008E400E0C42C010018E400E000ED00E049 -:10312000A0000020B8130020E0130020B000002011 -:10313000B800002008140020A8000020A12A0100E7 -:103140004B2B0100A4000020C9020000F60500007E -:10315000BB0200001027000034B40100520300003D -:1031600028140020D9821300E204000007060000A2 -:10317000DD49DE4807F0EFFF70BD70B500280BD0C9 -:103180000024DB4D01280ED002282FD0EF20D64995 -:10319000C00007F0E0FF70BD00F06BF900210846A9 -:1031A00000F064F870BD686801684C70C47684767D -:1031B0000460D04E446201220021706800F063FF79 -:1031C00071680846C0318C72CC72FFF77EFE002811 -:1031D00003D0C549C84807F0BEFFF9F7DBFBC74875 -:1031E0006C600078EFF790F86C6070BD00F041F90A -:1031F0006868C4768476046000214462084600F062 -:1032000035F870BDBA494968CA7E022A08D10A68F1 -:103210001378002B04D150600968CA6A1018C8627C -:10322000704710B5B24A002952680BD0012906D068 -:10323000022906D0AC49B24807F08DFF10BD801EB0 -:1032400000E0401F106210BD08B50020C043694671 -:103250000880AC48C07E002801D0002008BD084688 -:1032600000F0F6F90028F9D0012008BD70B5A04C97 -:1032700005466268002908D0002A04D0FF209A4938 -:103280000D3007F068FF656070BD002A04D1FF2093 -:103290009549133007F05FFF0020606070BD38B5BE -:1032A000934C20680168497801291FD001216846A4 -:1032B000F8F7C3FE684600789349000207F02AFE3B -:1032C0002068426AC06812685118F9F7AAFE21689E -:1032D000C8608C4822680321824202D0108B0A28E1 -:1032E00010D2108B401C108351720DE07D21C068FC -:1032F000C900F9F796FE2168C86004F025FD216831 -:103300000861E6E702205072117200231371107FEA -:10331000D47E111D957EAC4202D0FAF767F838BD15 -:10332000D37693761360536238BDF8B5704C05467A -:103330001F27EE7E042E2DD230007844007900182D -:103340008744312801237148854203D0664970487B -:1033500007F001FF02202560A87600E020BF216869 -:10336000C87E002803D0CA7E887E8242F6D0CA7EFC -:10337000002A04D000228A760C27226010E0002266 -:103380008A760A604A6222600DE00120FFF708FC9D -:10339000074603E054495F4807F0DDFE002F02D0E6 -:1033A000E87EB042C5D1E87E002803D04E495A4895 -:1033B00007F0D1FEF8BDF8B54D4D01286A68516A95 -:1033C0000C6846D10879554940000B5A1068077DB2 -:1033D0000126032F06D0027D022A13D0007D01288A -:1033E00024D036E00027076110688760942000969B -:1033F000025BC420005D4000085AC01881B23B4601 -:1034000003201EE022468032D78C07610096C4203C -:10341000005D928A4000085AC01881B20023022041 -:10342000FFF717F8696809680E750CE0942000969C -:10343000025BC420005D4000085AC01881B200231E -:103440000120FFF706F8002803D02749344807F089 -:1034500082FEF9F79FFA29480078EEF755FF696870 -:10346000002008830B68228D5A86096820318875F0 -:10347000F8BDF8B51E4D002168680C46006842781A -:10348000002A01D0447027E00078002809D00121EB -:103490006846F8F7F7FD684600781B49000207F018 -:1034A00039FD6868426AC06812685118F9F7B9FDB9 -:1034B0006A68D060147103205072107FD37E111D92 -:1034C000967EB34202D0F9F791FF03E0D47694766A -:1034D0001460546268680483F9F75CFA074800785E -:1034E000EEF712FFF8BD0000C42C010056070000E3 -:1034F000A8000020B800002003070000A000002062 -:103500009D070000E013002010270000B8130020E2 -:1035100007020000130200001902000034B4010089 -:10352000BC060000F8B50024E948FEF73EFE00287E -:1035300025D1E84FC02026464643F51901462846C6 -:1035400007F0DEFC0120B8556C80E34900200870CC -:10355000E24A4A8080356962E149641C0870A962C8 -:10356000E049E4B208704A80A963032CE2D3D8484A -:10357000FEF733FED648FEF718FE002801D00C20D7 -:10358000F8BDFF211931D84807F0BAFCD64801210F -:1035900001704480D5490020087208750877D44925 -:1035A0008872CB48FEF719FE0020F8BD10B5C84858 -:1035B000FEF7F3FD002803D0CEA1282007F0CBFDB5 -:1035C000C348FEF7EAFD002803D0CAA12D2007F06A -:1035D000C2FDFFF7A7FF002803D0C6A1332007F0E4 -:1035E000BAFD10BD10B50446B948FEF7DEFD00284F -:1035F00001D00C2010BDBC490878002807D000205D -:103600000870B3482160FEF7E8FD002010BDB04807 -:10361000FEF7E3FD1F2010BD70B505460C46AC4813 -:10362000FEF7C3FD002801D00C2070BDAE4A5088C3 -:10363000A84202D11078002804D0A548FEF7CDFD9D -:10364000122070BDA2482260FEF7C7FD002070BDA9 -:1036500010B504469E48FEF7A8FD002801D00C20B6 -:1036600010BDA1480178002907D00020C043208068 -:103670009748FEF7B2FD122010BD40882080944884 -:10368000FEF7ABFD002010BD10B504469048FEF7D4 -:103690008CFD002801D00C2010BD2078002804D01B -:1036A0008B48FEF79AFD0C2010BD01202070884841 -:1036B000FEF793FD002010BD10B504468448FEF7C8 -:1036C00074FD002801D00C2010BD824A0021C020CA -:1036D0004843105C00280AD0C023002059435054AE -:1036E000881820607A48FEF778FD002010BD491C3C -:1036F000C9B20329EBD37648FEF76FFD1F2010BD3A -:10370000032805D2C0225043724A135C002B01D01B -:1037100012207047801808600020704710B5002202 -:103720000C46032809D2C02148436A490B5C002B90 -:1037300014D122704018606018E003280ED164484C -:10374000FEF733FD002809D167484188032902D1DB -:103750000178002904D05E48FEF73FFD122010BD1D -:1037600060605B48FEF739FD01202070002010BD2D -:1037700010B504465648FEF718FD002801D00C206D -:1037800010BD2088534A032804D2C0214843105C4E -:10379000002801D00020208000202188491C89B207 -:1037A0002180032900D300212180C0235943515C8B -:1037B00000290BD0401CC0B20328EED30020C04328 -:1037C00020804348FEF709FD122010BD4048FEF757 -:1037D00004FD002010BD70B505460E463C48FEF7BE -:1037E000E4FC002801D00C2070BD2888341D03287B -:1037F00004D303D0A04201D3002028800020361D2E -:103800001DD0394B33492A88521C92B22A80A242D9 -:1038100000D300222A80042A02D3A24217D301E057 -:10382000032A05D0C02672438A5C002A0FD002E02A -:103830001A78002A0BD0401CC0B2A042E3D300206B -:10384000C04328802248FEF7C8FC122070BD2048E3 -:10385000FEF7C3FC002070BD10B504461C48FEF7FF -:10386000A4FC002801D00C2010BD2078002804D032 -:103870001748FEF7B2FC0C2010BD01202070144840 -:10388000FEF7ABFC002010BD10B504461048FEF753 -:103890008CFC002801D00C2010BD217801200029CB -:1038A00002D0012905D008E061680A78002A09D011 -:1038B00003E061680A78002A04D00548FEF78DFC11 -:1038C0000C2010BD08700248FEF787FC002010BDD8 -:1038D000C00000205814002098160020FFFF0000B0 -:1038E000C1000020C6160020D8160020B8170020FE -:1038F000D81700207372635C6C6C5F64622E630087 -:1039000010B5282107F0FAFA10BD70B50546007809 -:103910000A0700090001120F1043287007290ED270 -:10392000080078440079001887440305030503075D -:103930000300062408E00C2406E0222404E000240E -:10394000F8A1572007F007FC687880098001204320 -:10395000687070BD00780007000F704710B5C01C7C -:1039600007F0F5FC10BD0A4610B5C11C104607F063 -:10397000EEFC10BD10B5093007F0E9FC10BD02786F -:10398000BF23C9071A40490E0A43027070470078E6 -:103990004006C00F704702785206520EC9010A4312 -:1039A0000270704770B50C460546C11C20460930B0 -:1039B00007F0CDFC20784006400E2070297849069B -:1039C000C90FC9010843207070BD70B515460E4679 -:1039D00004461F2A03D9D3A1A82007F0BCFB204628 -:1039E0002A463146093007F02CFA6078AD1D80096F -:1039F0008001A906890E0843607070BD70B5054648 -:103A000040780E468406A40E062C03D2C5A1B82029 -:103A100007F0A1FBA41FE4B21F2C00D91F242946E4 -:103A200022460931304607F00CFA204670BD70B5C9 -:103A300015460E4604461F2A03D9BAA1CC2007F02A -:103A40008AFB20462A463146093007F0FAF96078A9 -:103A5000AD1D80098001A906890E0843607070BD04 -:103A600070B5044640780E468506AD0E062D03D28D -:103A7000ACA1DD2007F06FFBAD1FEDB21F2D03D908 -:103A8000A8A1E12007F067FB21462A46093130460C -:103A900007F0D7F9284670BD0A78C2734A780274D5 -:103AA0008A784274C978817470470A78C2744A78F7 -:103AB00002758978417570474176090A81767047A9 -:103AC000C176090A017770474177090A8177704703 -:103AD000C175090A017670478175704720300279F7 -:103AE000C90652095201C90E0A43027170472030BB -:103AF0000279D206D20E49010A430271704710B50D -:103B00001F3007F019FC10BD417800788906890E36 -:103B10000007000F06D0012808D0022809D0062887 -:103B200010D10AE0891F1F290AD90BE00C2907D000 -:103B300008E0891F1F2903D904E0891F1F2901D824 -:103B400001207047002070474178007889060007FF -:103B5000890E000F042805D1062903D3252901D891 -:103B6000012070470020704770B401780907090FE1 -:103B700003292ED0052931D1411C827E0C46437E7B -:103B800011021943037FC27D1D02037EC67E1B0204 -:103B90001343827D407835438006800E22281DD154 -:103BA00006291BD31920C001814217D8FF26F436FD -:103BB000B54213D8002A11D0082A0FD88A420DD254 -:103BC0008B420BD8617F227F09021143814208D9C1 -:103BD00004E040788006800E0C2802D070BC0020E3 -:103BE000704770BC0120704710B5222107F086F99C -:103BF00010BD10B502788B07920892009B0F1A43F4 -:103C000002704278520952014270012908D00229FB -:103C100006D0032905D0FF2042A1E83007F09BFA27 -:103C200010BD01210A43427010BD10B502788B0708 -:103C3000920892009B0F1A43027042785209520177 -:103C40004270012907D0022905D0032904D035A1EB -:103C5000384807F080FA10BD01210A43427010BDB8 -:103C600000788007800F70470278EF23C9071A4059 -:103C7000C90E0A43027070474178C078C906C90E60 -:103C80000E2835D202007A44127992189744060918 -:103C90000C0F1215181B1E2124272A2D0C2929D0A0 -:103CA0002AE0082926D027E0022923D024E017297A -:103CB00020D021E00D291DD01EE001291AD01BE0E3 -:103CC000012917D018E0022914D015E0092911D0D4 -:103CD00012E009290ED00FE001290BD00CE00129D8 -:103CE00008D009E0062905D006E0022902D003E049 -:103CF0001B2901D8012070470020704770B5054688 -:103D0000C1700E2926D20800784400790018874433 -:103D100006131517191B1B151D1D1B1B1F150C2426 -:103D20001DE000007372635C756C5F7064752E63D8 -:103D30000000000001020000082410E002240EE050 -:103D400017240CE00D240AE0012408E0092406E011 -:103D5000062404E000249A499A4807F0FCF96878A0 -:103D6000400940012043687070BDC0787047C17140 -:103D7000090A01727047017AC2790802104370473C -:103D80004172090A81727047817A427A08021043AF -:103D90007047C172090A01737047017BC27A080239 -:103DA000104370474171090A8171704781794279E6 -:103DB00008021043704701717047007970474173E2 -:103DC000090A81737047817B427B08021043704768 -:103DD00070B4017AC37909021943431C857A1C46E1 -:103DE000467A2B023343657926792C023443C21C70 -:103DF000754E00798D1FB54215D8FF25F435AB42BD -:103E000011D800280FD008280DD888420BD28C4238 -:103E100009D8507A117A00020843B11D884202D8AD -:103E200070BC0120704770BC0020704710B5001DA9 -:103E300007F082FA10BD0A4610B5011D104607F0C2 -:103E40007BFA10BD4172090A81727047817A427A09 -:103E5000080210437047017170470079704710B530 -:103E6000001D07F081FA10BD0A4610B5011D10466D -:103E700007F07AFA10BD0A780273497841737047E7 -:103E8000027B0A70407B4870704710B50E3007F017 -:103E90006BFA10BD0A46014610B50E31104607F008 -:103EA00063FA10BD0A7882754A78C2758A780276FC -:103EB000C97841767047827D0A70C27D4A70027E61 -:103EC0008A70407EC870704710B5001D07F04CFA2C -:103ED00010BD0A4610B5011D104607F045FA10BD89 -:103EE0000A7802734A7842738A788273C978C173F8 -:103EF0007047027B0A70427B4A70827B8A70C07B6B -:103F0000C8707047017170474171090A817170472B -:103F1000C171090A0172704700797047817942794D -:103F2000080210437047017AC279080210437047B3 -:103F300001717047007970470171704710B5001D1D -:103F400007F012FA10BD0A4610B5011D104607F021 -:103F50000BFA10BD10B5001D07F006FA10BD0A4699 -:103F600010B5011D104607F0FFF910BD70B51546DC -:103F70000E4604461B2A03D91149144807F0EBF8F2 -:103F80002A463146E01C06F05CFF6078E9064009ED -:103F90004001C90E0843607070BD70B50546407899 -:103FA0000E46C406E40E1B2C03D90549084807F049 -:103FB000D2F82246E91C304606F043FF204670BD89 -:103FC000243D0100A10200007A0C0000F103000072 -:103FD000FD03000070B504460020A083208C1E461F -:103FE00048431546114606F0A3FF2084F0002946F9 -:103FF00006F090FF401C80B20146192269439202EC -:10400000E083914201DD401EE0837D2029460002CD -:1040100006F080FF401CA08470BD70B50A7BD206FC -:10402000D20E0A73002282758B181B7ADC075B089C -:10403000DD07E40FED0F2C195B08DD07ED0F2C19E0 -:104040005B08DD07ED0F2C195B08DD07ED0F2D195F -:104050005C08E307DB0F5B196508EC07E40FE41865 -:104060006B081B1984186374847D521CE318D2B248 -:104070008375052AD8D3D8B2252803D9E1A18A208F -:1040800007F069F870BD70B504460B462546264614 -:10409000214600202835C0368031032B0AD0002B62 -:1040A0003AD0012B41D0022B03D1A11C2846FFF7A7 -:1040B000B4FF70BD2880A871E871E8722873687336 -:1040C000A873A870E870287168716876A8832B4679 -:1040D00068842033987128859872E8752876E8738B -:1040E0002874D872187398731A752884FF22603563 -:1040F000AA709875088248828882C882088348839B -:104100004877C884A4221055088748872421085579 -:1041100060843070B07170BDC8848877A1882389AD -:104120000A462846FFF756FFBFE7C884F38A728A1B -:10413000A1882846FFF74EFF70BD70B504460346C0 -:1041400028348033054603290AD0002933D00129B9 -:1041500038D0022903D1A91C2046FFF75EFF70BDAD -:1041600000202080A071E071E07220736073A07362 -:10417000A070E070207160716076A0832146608439 -:104180002031887120858872E0752076E073207474 -:10419000C872087388730A752084FF226034A27085 -:1041A00088751883987618742421586148551877B3 -:1041B000A035287370BDA9882B890A462046FFF7D1 -:1041C00009FFC8E7586AA988C38942892046FFF7D2 -:1041D00001FF70BD70B5867D0D460446002E01D0EE -:1041E000252E01D9122070BD002A18D0287EE17D2D -:1041F00050430818252106F08DFEE1750846CA08CF -:104200004907490F834BAA18595C127A914308D089 -:10421000314606F07FFE491CCAB200200AE00020A9 -:1042200070BD2076002070BD002803D02118097CC5 -:10423000511ACAB22118497C91423AD32918097AF5 -:10424000C943CB07DB17D21A521E1206120E35D005 -:104250008B07DB17D21A521E1206120E32D04B07F2 -:10426000DB17D21A521E1206120E30D00B07DB17C4 -:10427000D21A521E1206120E2ED0CB06DB17D21AFD -:10428000521E1206120E2CD08B06DB17D21A521EAB -:104290001206120E2AD04B06DB17D21A521E120635 -:1042A000120E28D00906C917511A491E0A06120E05 -:1042B00026D0401C0528B7DB1F2070BDC00020762B -:1042C000002070BDC000401C2076002070BDC000E2 -:1042D000801C2076002070BDC000C01C207600200D -:1042E00070BDC000001D2076002070BDC000401DC4 -:1042F0002076002070BDC000801D2076002070BD9B -:10430000C000C01D2076002070BD70B50D4604466B -:10431000072904D9FF203BA15D3006F01CFFE0789F -:10432000502108406907490F88300843E070A078A1 -:10433000A72108401830A07060785E210840203026 -:1043400060702078BC2108404030207070BD017939 -:10435000490901D000207047002230B41146445C66 -:10436000491CE3076408E507DB0FED0FEB18640851 -:10437000E507ED0FEB186408E507ED0FEB1864088F -:10438000E507ED0FEB186408E507ED0FEB1864087F -:10439000E507ED0FA407EB18E40FE318D218D2B22B -:1043A0000529DCDB002A02D030BC0120704730BC7C -:1043B0000020704738B505460C466846FCF74EF8B5 -:1043C00000281ED069460020085620720921615637 -:1043D0000022411A00D549422035EB788B420FDC90 -:1043E000FF2B0DD0A17A491CC9B2A1722B79994239 -:1043F00002D8617A7F2903D160720020A072012265 -:10440000104638BD7372635C6C6C5F7574696C2E9A -:104410006300000044B40100F8B50024F74EFF200B -:10442000B470F0702546F64F06E0042D04D3FF204B -:10443000F4A1AB3006F08FFEFF212846A03148439F -:10444000FF213331C0194A1C0C540146FF3114546A -:1044500021310C754C75F178A94202D1B470FF215D -:10446000F170FF219D314A1C6D1C0C54EDB21454A7 -:10447000042DDAD30020FF21A0314143C919FF31B7 -:1044800081318C77401CC0B20428F4D3E048FFF798 -:10449000ABFB0021DE48FFF7E7FB0121DC48FFF71B -:1044A000A8FBDC49FF20087048708870C87008714C -:1044B0004871F8BDB0E71B20704710B4D04A002106 -:1044C000FF23A0334B439B18FF3381339B7F002B8B -:1044D00004D0491CC9B20429F2D30DE004290BD23F -:1044E000FF23A0334B439A180124FF328132947783 -:1044F0000170204610BC704710BC0020704730B4DB -:104500000025042825D2FF220146A0325143BC4A8F -:1045100089180B46FF3381339A7F002A19D0FF2474 -:104520003334621C655455541A46603A15755575F6 -:10453000B24AD478844202D19570FF20D070FF2017 -:104540009D304554FF319E310D709D7730BC012068 -:10455000704730BC0020704704280ED2FF2201466D -:10456000A0325143A64A8918FF318131897F002941 -:1045700003D0A8494871012070470020704710B44B -:10458000A449FF224979A03251439D4A82B089183B -:104590000A46FF322132937C6C462370D27C227112 -:1045A000237822795A40802A0AD022782223520680 -:1045B000520E5A435118016002B010BC01207047DE -:1045C00002B010BC002070479248FF214079A03112 -:1045D00048438B4981B041180846FF303330FF31E2 -:1045E0002131CA7C69460A7003780922097859404A -:1045F00080290ED0037869460B7009784906490E68 -:10460000491C914208D26A461178491CC9B21170FE -:1046100009E0002001B0704769460978090601D514 -:10462000002100E080210170012001B070470428C2 -:104630000ED2FF220146A0325143714A8918FF3140 -:104640008131897F002903D07249087101207047A8 -:104650000020704710B46F49FF220979A0325143FE -:10466000674A82B089180A46FF322132947C6B4631 -:104670001C71D27C1A701C781A7994420AD01A786C -:1046800022235206520E5A435118016002B010BC48 -:104690000120704702B010BC0020704738B55D485B -:1046A0000179FF20A0304143554808180146FF31E9 -:1046B00021318A7C6C4622700922FF303430037825 -:1046C0002478A34223D004786B461C701B785B06C9 -:1046D0005B0E5B1C934205D26B461A78521CD2B219 -:1046E0001A7006E06A461278120601D5002200E030 -:1046F00080220270087D401C0875087D497D884233 -:1047000003D140A1444806F026FD012038BD002019 -:1047100038BD4048FF210079A0314843384940184E -:10472000FF302130C17C807C814201D10120704763 -:10473000002070473748FF210079A03148433049B5 -:104740004018FF302130817CC27C092013464B4049 -:10475000802B0AD049065206490E520E914201D3CF -:10476000881A01E0511A401AC0B2704709207047F8 -:104770000022042813D2FF23A0335843204BC01833 -:10478000FF239F331B5C002B09D0FF300A702130C0 -:10479000027D437DD31A0B704275012070470020C3 -:1047A0007047042811D2FF22A0325043144A8018C7 -:1047B000FF229F32125C002A07D0FF302130027D99 -:1047C000407D101A08700120704700207047104982 -:1047D0000160704704280ED2FF220146A0325143E7 -:1047E000074A8918FF318131897F002903D009499F -:1047F000087001207047002070470000101800204A -:10480000141800207372635C646D5F712E63000086 -:10481000901E0020C70000205A020000AC49CA7850 -:10482000FF2A03D000210160084670478A78A94911 -:10483000012A02D001600120704700207047A6487D -:104840000178012907D001210170A4480178A0480E -:10485000C170012070470020704704280ED2FF224B -:104860000146A03251439E4A8918FF318131897F28 -:10487000002903D0994948700120704700207047F3 -:104880009349964BCA785B789A4206D18A78203948 -:10489000002A02D0016001207047002070478C4838 -:1048A0008E4AC1785278914209D1FF21C170801C93 -:1048B0000178002903D000210170012070470020F9 -:1048C00070478348854AC1785278914204D18078F4 -:1048D000002801D0002070470120704704280ED224 -:1048E000FF220146A03251437D4A8918FF318131B0 -:1048F000897F002903D07949C870012070470020C2 -:10490000704710B47549FF22C978A0325143744AE8 -:1049100082B089180A46FF328132147F6B461C70C0 -:10492000527F1A711C781A79FF3162403731802A20 -:104930000AD01A7822235206520E5A4351180160A7 -:1049400002B010BC0120704702B010BC00207047BC -:104950006248FF21C078A0314843614981B04118C5 -:104960000846FF309D30FF3181314A7F69460A7029 -:10497000037803220978594080290ED003786946CC -:104980000B7009784906490E491C914208D26A46C3 -:104990001178491CC9B2117009E0002001B07047BC -:1049A00069460978090601D5002100E080210170DF -:1049B000012001B070474948FF21C078A031484329 -:1049C00047494018FF308130417F007F814201D14B -:1049D000012070470020704704280ED2FF220146B4 -:1049E000A03251433E4A8918FF318131897F002925 -:1049F00003D03A498870012070470020704710B4F6 -:104A00003649FF228978A0325143354A82B089184D -:104A10000A46FF328132147F6B461C71527F1A7036 -:104A20001A781B79FF3137319A420BD06A461278D7 -:104A300022235206520E5A435118016002B010BC94 -:104A40000120704702B010BC002070472348FF21AE -:104A50008078A0314843224981B04018FF219D3120 -:104A6000095C6B4619700321FF309E3002781B7879 -:104A70009A4219D003786A46137012785206520E81 -:104A8000521C8A4205D26A461178491CC9B211707B -:104A900006E069460978090601D5002100E0802179 -:104AA0000170012001B07047002001B070470B4831 -:104AB000FF218078A031484309494018FF308130F8 -:104AC000417F007F814201D1012070470020704763 -:104AD00010180020F017002012180020C700002036 -:104AE00014180020F8B5FD4F0A46044600207978D6 -:104AF000FB4D0646002902D0012909D00FE0F949F3 -:104B0000497A00290BD0002A08D10120787005E0ED -:104B1000A97F002903D0002A00D17E700120797876 -:104B20002B23594349198B7F034311D0002A22D1EB -:104B30002A22A01C1F3106F084F966700420207020 -:104B40000120A07078782B2148434019867712E025 -:104B50002878012801D00020F8BD002A0BD166700A -:104B6000132020701C22A91CA01C06F06AF9A67153 -:104B70002E70DD48C6770120F8BDD948017800299C -:104B800001D080887047D9487047F8B5D44E0746A1 -:104B9000B07F00282DD13846FEF7DCFE002101252C -:104BA000D34C072824D202007A44127992189744F1 -:104BB0000305081F1F1F0A00217006E025702172DF -:104BC00008E0032000E002202070CA493846FEF7C2 -:104BD00015FF20723846FEF7DAFE6070C649384687 -:104BE000FEF7C1FEBD4CC54F20787F2807D101E0FC -:104BF0002172F8BDFF20C2A1543006F0ACFA207833 -:104C000038707F202070B577032002F0E7FEF8BDF2 -:104C100010B5002002F072FE002812D0FBF79CFBBA -:104C200000210120FBF7A0FABA48FBF7ACFBAE4C21 -:104C3000A06AFBF7ABFB2079032805D0022803D03C -:104C400006E000F0F3FD10BD01210020FBF716FC8B -:104C5000FBF7FBFBB04C6078002803D0FBF77DFF2F -:104C6000FBF7D9FB0320E07010BD70B59E4900280A -:104C7000CA8D08D0FF2A0DD25004000CC885FF2829 -:104C800008D9FF2005E0012A04D95008C88501D1C0 -:104C90000120C88591484268012A01D0002A01D12B -:104CA0000D224260D24317239B4C5A43637B3B2522 -:104CB000DB436B43D2184260C98D900C06F02AF991 -:104CC000617370BDF8B5944CE078022804D0E078A8 -:104CD000012801D00C20F8BD0020814A05462B2177 -:104CE000414389188D77401CC0B20228F7D3157054 -:104CF0006078002804D0FBF796FBFBF73FFF657058 -:104D0000794845778577C5778449257001228A7768 -:104D10000571A570CA760A774A77714E0146324608 -:104D2000736F7432B46FF66FD7688B60CC600E61AE -:104D30004F6112698A6105770020F8BD10B5764A87 -:104D40000023D3701371684B596318630120D0702E -:104D5000FFF7B8FF002803D069A1714806F0FBF9FE -:104D600010BDF1B582B00C2001906B480090C07866 -:104D7000012806D00098C078022802D00C2003B089 -:104D8000F0BDFBF7F0FA0020FBF7B1F8564C207F9E -:104D9000002837D0524920460F4682687437C368CE -:104DA000056946694A678B67CD67FE60806938612F -:104DB00000266677A677594DE87E002805D1287F22 -:104DC000002802D1687F00281AD0009800780028B7 -:104DD00016D02079032802D0022805D008E005214A -:104DE000504800F040FD03E003214E4800F03BFD39 -:104DF000A97E3846FBF7F3F80020019026770CE0F7 -:104E0000267703E00098C078022804D00098C07884 -:104E1000022828D00AE0002001900098C0780128DC -:104E200004D10099087300980221C170606B017869 -:104E3000002903D00178001DFBF714F9206B0178DD -:104E4000002906D0384A401CFBF777FE0099012064 -:104E500048700298A0623548FBF717FAFBF78EFA04 -:104E6000019803B0F0BD00990120C8700C2003B078 -:104E7000F0BD70B5FBF777FA274CE078022803D035 -:104E8000FBF77CFA0C2070BD012017496073C885C0 -:104E90000220FBF765FA2648FBF739F9254E002575 -:104EA000A0780321401C06F035F8A170885D012828 -:104EB00044D06D1CEDB2032DF2D3FFF7A9FE20798B -:104EC000002809D0012807D002283DD003283BD074 -:104ED0000BA1194806F03FF9002070BDD00000205A -:104EE000B41E0020F41E0020341F0020FFFF00002D -:104EF000D41E0020DD1E0020D61E0020FC1E002037 -:104F00007372635C6C6C5F64645F7363616E2E6369 -:104F1000000000006C1F0020541F0020141F002000 -:104F200051030000941F00206F1F00204CB40100AB -:104F300052B401002F1F0020EA030000C8B2FC4950 -:104F4000085CFBF7F6F8B8E7EEF762F8C4E770B56F -:104F5000F84C0125A577E37F002B01D03A2070BDE6 -:104F60000026002802D1A07B884209D1A173667770 -:104F70001146F14806F0EBF96577F04805702577A2 -:104F8000A677002070BD024600200123E949002ACF -:104F900003D0012A03D0122070478B7400E088747C -:104FA0000B774A767047E34A032800D151611076A7 -:104FB0000120107700207047E049012803D0032822 -:104FC00001D0002000E0012008717047D948017F1E -:104FD000002903D0407E002803D170474079002883 -:104FE000FBD00120704710B5FBF709FAFBF7FCF97D -:104FF000FBF708F9FBF7AAF9D04C6078002805D038 -:10500000FBF711FAFBF7BAFD002060700120207356 -:105010000220E070FBF7B2F9002010BDC7494871CB -:10502000704710B500F002FC10BDF0B5C44EC34D82 -:1050300083B0002810D0C348FEF766FD002804D1D5 -:10504000C048FEF781FD002806D0BA4C207903281D -:105050000DD1A07F00280AD0E87805286BD2010086 -:105060007944097949188F44666666F7F600E8784E -:1050700005287AD201007944097949188F44757559 -:105080007502EE00AF48FEF765FCAD498870AE488A -:105090000190807F002803D1FBF736F8002800D06C -:1050A000012000906878002813D00526761EF6B2FD -:1050B000FBF785FD0746022805D1002EF6D1A3494E -:1050C000A34806F048F80098002810D1012F0ED010 -:1050D00000909B4F9F4EB878072871D20100794409 -:1050E000097949188F446DFE056C6C6C280001200D -:1050F000EEE76878002803D0FBF795F9FBF73EFD53 -:105100008F48FBF7ABF9002801D17F203870FBF7FF -:1051100093F9009800280AD02079012801D00228AC -:1051200005D1FBF76FF88748FFF72FFD37E2FBF754 -:1051300069F8FFF76DFD34E26878002803D0FBF7CB -:1051400072F9FBF71BFD7E48FBF788F9002801D1B7 -:105150007F203870FBF770F90098002879D020790B -:10516000022803D001287AD047E221E27548FFF7F0 -:105170000CFD012002F0C2FB00286ED07649714878 -:10518000FEF710FC7448FBF7FEF8607F00280ED095 -:105190006848019902898A824289CA828089088383 -:1051A00031466D48FEF7DAFB00206077A0770121D9 -:1051B0000846FBF763F9FBF703F90520E870F0E117 -:1051C0005BE16878002803D0FBF72DF9FBF7D6FCEC -:1051D0005B48FBF743F9002801D17F203870FBF7CB -:1051E0002BF90098002834D02079022808D0012813 -:1051F00035D0032837D05549584805F0ACFFD0E1E9 -:105200005048FFF7C2FC012002F078FB002824D0B0 -:1052100051494C48FEF7C6FB4F48FBF7B4F8607F96 -:1052200000280ED04348019902898A824289CA82A5 -:105230008089088331464848FEF790FB002060775C -:10524000A07701210846FBF719F9FBF7B9F805200B -:1052500001E10EE103E0BFE1ADE1B3E022E1394855 -:10526000FFF793FC9BE137482168C2780B7F9A4295 -:105270001DD102794B7F9A4219D142798B7F9A4294 -:1052800015D18279CB7F9A4211D10A462032C37957 -:105290001778BB420BD1037A5278934207D100783A -:1052A000CA7E4006C00F904201D1012000E00020DC -:1052B0006279012A30D0002800D138E7022002F0BC -:1052C0001DFB00287ED0012002F088FB22491D48EA -:1052D000FEF768FB2068018B1F48FEF7F9FB20688A -:1052E000817D00E03CE01C48FEF7F6FB1A48FBF726 -:1052F0004AF8607F002866D00E48019902898A82A8 -:105300004289CA828089088331461348FEF726FB0A -:1053100000206077A0779BE00028CFD109481C319E -:10532000FEF721FB0748FEF732FB2168C876C5E788 -:105330004FB40100341F00203C1F0020541F0020E8 -:10534000D00000206C1F0020141F0020004F01001F -:10535000D4040000281F0020941F0020CC0500006A -:105360006878002803D0FBF75EF8FBF707FCF948E4 -:10537000FBF774F8002801D17F203870FBF75CF848 -:105380000098002875D0FAF733FE002871D02079F4 -:105390000328F14804D0FFF7F8FBFAF733FFFEE0EB -:1053A0002168C2780B7F9A4220D102794B7F9A42C2 -:1053B0001CD142798B7F9A4218D18279CB7F9A4255 -:1053C00014D101E056E043E00A462032C379177851 -:1053D000BB420BD1037A5278934207D10078CA7E40 -:1053E0004006C00F904201D1012000E00020627908 -:1053F000012A32D0002800D199E6022002F07EFA7C -:10540000002837D0012002F0E9FAD449D248FEF74B -:10541000C9FA2068018BD148FEF75AFB2068817DCC -:10542000CE48FEF759FBCD48FAF7ADFF607F002864 -:105430000ED0CB4901980A8982824A89C282898921 -:1054400001833146C548FEF789FA00206077A077CE -:105450000120E0770620E870A3E00028CDD1BE4807 -:105460001C31FEF780FABC48FEF791FA2168C87635 -:10547000C3E7C2E000F0DAF993E06878002803D0CF -:10548000FAF7D1FFFBF77AFBB248FAF7E7FF0028FB -:1054900001D17F203870FAF7CFFFFAF7B3FEFFF79C -:1054A000B7FB7EE0AC48FEF755FAB070AA48AB49AE -:1054B000C3784A7A93421CD103798A7A934218D1ED -:1054C0004379CA7A934214D183790A7B934210D1EB -:1054D000C3794A7B93420CD1037A8A7B934208D1E9 -:1054E000007809784006C00FC909884201D101241B -:1054F00000E00024FAF786FEB07804283ED1002CA4 -:105500003CD09448FAF7AAFF002801D17F203070E0 -:10551000FAF792FF287B002802D00020FFF7A5FBB6 -:105520000120904C28738C4F607A002837D10420DA -:10553000E0723846FEF72BFA002801D0012800D18E -:10554000207389493846FEF70EFA88493846FEF737 -:1055500087FAE0741F2801D91F20E0743078844F47 -:105560007F2804D1FF208349543005F0F4FD3078C2 -:1055700038707F2030700120607210E07548FAF7B3 -:105580006DFF002801D17F203070FAF755FF287B8E -:10559000002802D10120FFF768FB00202873FFF7E5 -:1055A00037FBE87802283DD0E87804282DD127E0A1 -:1055B0007049714821E66878002803D0FAF733FF74 -:1055C000FBF7DCFA6348FAF749FF002801D17F2096 -:1055D0003070FAF731FF10E05E48FAF73FFF00281D -:1055E00001D17F203070FAF727FF287B002802D1F5 -:1055F0000120FFF73AFB00202873FAF703FECEE7FD -:1056000037205C49400105F0A6FD2879002809D023 -:1056100001280ED0022807D0032810D0554957483A -:1056200005F099FD03B0F0BDE878032807D003B07A -:10563000F0BDE878062802D0E8780528F7D10120E7 -:10564000FAF7D2FF03B0F0BD70B54D4CE0780728F3 -:105650005FD201007944097949188F445A5A5A5A3D -:105660005A030B003C48FAF78EFEFAF7EEFE0420D0 -:10567000E07053E0FAF7C3FEFAF7B6FEFAF7C2FDA0 -:10568000FAF764FE012626730220E070FAF776FE30 -:105690003C4D2878002803D036493B4805F05BFD97 -:1056A0000020A8702E4800684188A980C17EE97159 -:1056B000818B2981C18B6981018CA9818188E982D3 -:1056C000C188298300896883607928772F48304909 -:1056D000807EA8732F4805F03AFE6078002803D03A -:1056E000FBF76DFA012808D0687F40084000687712 -:1056F0002E70022002F072F910E0687F3043687764 -:10570000FBF776FA697F4000C907C90F0143697743 -:10571000EEE775201749000105F01DFDE07802282D -:1057200016D0E078032806D0E078042803D0114989 -:10573000194805F010FD2079002809D0012807D06C -:1057400002282DD003282BD00A49144805F003FD68 -:1057500070BD0000D00000206C1F0020941F0020AE -:10576000341F0020F41E0020011F0020081F00200D -:10577000271F0020004F01009E060000F5060000D4 -:10578000541F0020B41E002029070000141F002011 -:10579000281F0020C31E00205607000062070000DB -:1057A0000120FAF721FF70BD10B55C4CE0780528A8 -:1057B00020D201007944097949188F441B1B1B1919 -:1057C00002005748FAF74AFE002802D154497F20C8 -:1057D0000870FAF731FE207B002802D10120FFF784 -:1057E00044FA00202073FAF70DFDFFF711FA01E0EB -:1057F00000F01CF8E078022813D0E078032803D0EA -:105800004849494805F0A7FC2079002809D001281B -:1058100007D0022806D0032804D04249434805F0A7 -:105820009AFC10BD0120FAF7DFFE10BD10B5FAF7A3 -:10583000E6FDFAF7D9FDFAF7E5FCFAF787FD374CF4 -:105840006078002805D0FAF7EEFDFBF797F9002005 -:105850006070012020730220E070FAF78FFD0020B5 -:1058600002F0BCF810BD70B5314C054626466036D6 -:105870007434032943D0052940D1FEF741F80521AE -:105880002846FEF742F8B17E2846FEF778F8214612 -:105890002846FEF763F8274C284621680F31FEF7AB -:1058A000FBF8216828461331FEF7FFF82068817D58 -:1058B0002846FEF711F92068018B2846FEF708F903 -:1058C000206881882846FEF7F7F82068C1882846B6 -:1058D000FEF7F6F8206801892846FEF7F5F82168FA -:1058E00028460A31FEF70BF92068817E2846FEF72C -:1058F000F5F80A4841792846FEF7F9F870BDFDF73A -:10590000FFFF03212846FEF700F8B17E2846FEF788 -:1059100036F821462846FEF721F870BD541F0020B6 -:10592000D0000020004F010099070000A5070000EB -:10593000B41E0020341F0020F8B5FEF7FBFE04461D -:10594000FEF7BFFFF74E0546F0682030407B002889 -:1059500026D0012867D0022869D0032871D0FF2003 -:10596000F1A1793005F0F7FB3069F7220178114099 -:105970000170F2682032937BDB071B0F1943FB2376 -:1059800019400170D37BDB075B0F19430170577B14 -:10599000EF23022F60D0012F63D0032F65D06AE080 -:1059A000E548FEF76DFF002827D030690090F168C8 -:1059B000088DC9884018801D87B20098FEF7D5F978 -:1059C000012805D00098FEF7D0F9002808D00FE094 -:1059D000F06839468030C7850098FEF733FA07E053 -:1059E000F06839468030406A87800098FEF7E7F912 -:1059F000F168032020314873B6E7CF48FEF72AFE4E -:105A0000002804D0F0685321095C002907D0CA4857 -:105A1000FEF7DDFEF168012020314873A4E7022182 -:105A200020304173A0E7C448FEF7D1FE9CE7C2488E -:105A3000FEF710FE002897D1FF20BBA16B3008E0D5 -:105A4000FFE7BD48FEF71CFF00288DD1FF20B6A15F -:105A5000733005F080FB87E7012C08D8002D06D0B5 -:105A600009E06D1E2C4302D105E0002C03D0194043 -:105A70001023194300E019400170D17D002915D091 -:105A8000517B012912D0AD48FAF77DFCAC480121C9 -:105A90000176F268116E526E42610161A749326966 -:105AA000FAF7D7FF0020FAF7E3FF03E0FAF76BFC01 -:105AB000FBF701F801210846FAF7E0FC03203070FB -:105AC000F8BD08282FD203007B441B79DB189F44C4 -:105AD00003060B0E11152528002926D023E00229E4 -:105AE00023D0032921D01EE007291ED01BE008295E -:105AF0001BD018E00A390B2917D914E00D2914D04E -:105B00000C2912D0002A04D00D290CD315290CD948 -:105B100009E0112907D3152907D904E0092904D080 -:105B200001E0012901D0002070470120704730B505 -:105B3000054683B08048FEF771FE002803D17AA1A4 -:105B4000804805F008FB774C2069FEF74DF80321EB -:105B50002069FEF76AF82069EF2201781140017090 -:105B60002946FEF7CBF80D2D76D22800784400792F -:105B7000001887441F1606448080840E7280848437 -:105B800060006848C16800698031497FFEF763F9A9 -:105B900075E06448C16800698031497AFEF7CCF944 -:105BA0006DE06048C16800698031896A491CFEF770 -:105BB0003DF964E05B4CE0688030406A817920699F -:105BC000FEF7F9F8E0688030406A01892069FEF745 -:105BD000E9F8E0688030406A41892069FEF7C7F83B -:105BE000E0688030406A81892069FEF7C9F8E06882 -:105BF0008030406AC1892069FEF7CBF83FE0494C0C -:105C0000E0688030416A2069091DFEF728F9E068E4 -:105C10008030416A20690C31FEF72DF9E068803050 -:105C2000416A20691E31FEF730F9E1682069803150 -:105C3000FEF738F923E03B4CA06901782069FEF7B4 -:105C400061F9A06981882069FEF75EF9A069418841 -:105C50002069FEF75DF912E00DE000200090694632 -:105C60000190087801210843694608702D480069B1 -:105C7000FEF764F903E02CA1334805F06CFAFEF757 -:105C8000DEFD002803D128A1304805F064FA0C2D70 -:105C90000ED0072D0ED0012D0AD0002D08D0022DD8 -:105CA00006D020480021C068403041810121817325 -:105CB00003B030BD1B480021C0684030018203B0F2 -:105CC00030BDF0B5174C8DB02079C0077ED060791B -:105CD00000287BD16069C0780E2878D20100794411 -:105CE000097949188F44737306733D5DE25C73FD57 -:105CF0007334FCA5E06854210A5C2030417D01200A -:105D0000FFF7DFFE00284BD16069FEF7A6F8E168D7 -:105D10009E22505402223520425400204031887483 -:105D20008873EFE1D80000207372635C6C6C5F6D68 -:105D300061737465722E6300E8000020E21F00208A -:105D40000820002083060000C7060000CD060000E2 -:105D5000E0682030C17C0A297ED10021C1750D2167 -:105D60001DE0E0683321095C0E2975D1A421095892 -:105D700040884988814203D0FAA1FE4805F0EBF93A -:105D8000E0688030416A60692631FEF7A2F8E16878 -:105D900060698431FEF7ADF8E06811212030C174EC -:105DA000B0E1E1683320405C112855D180318C4648 -:105DB0004B6AF14810260022082168440E33B51AB8 -:105DC000ED18203DEF7F4770AD7F01E0A2E17AE161 -:105DD0008570801C491E921C0029F0D161464B6AD7 -:105DE00003A810260022082103301E33B51AED182F -:105DF000203DEF7F4770AD7F8570801C491E921C4F -:105E00000029F3D16846FCF746FA08AD8DCDE1686C -:105E100000260E664E660D4670318DC10126203576 -:105E2000EE75D64E8DC6D64805F09EFA1320E8745E -:105E300068E1E0683321095C112901D00E293AD1CB -:105E40004030007D002836D16069FEF773F8E168C4 -:105E50000B460A46803300E02DE0187200254031E1 -:105E6000CD748D73586A51884088884203D0BDA193 -:105E7000C44805F070F9E06801468030426A157048 -:105E8000826B1378002B03D0D920B6A1800033E0B9 -:105E90004B88D380836B027A1A71826B1572836B85 -:105EA0000B221A70806B4988418008E1E068332139 -:105EB000095C152902D00220607123E1014600250A -:105EC0004031CD748D73A42109584088498881429E -:105ED00003D0A4A1AC4805F03EF9E068014601E01A -:105EE0002CE094E080314A6A15708A6B1378002B9D -:105EF00005D071209BA1C00005F02DF9DFE003461D -:105F000040331E7D002E0BD01D754388D3808A6BD5 -:105F100015718B6B0C221A70896B40884880CEE01B -:105F20004388D3808A6B15718B6B01221A728B6B3D -:105F30000B221A70896B40884880C0E0E0685421C9 -:105F40000A5C2030017D0020FFF7BBFD00280DD149 -:105F5000E06854210A5C2030C17C0720FFF7B1FDC6 -:105F6000002803D16079012108436071607900281D -:105F70004CD1E0684030807D800715D46069FDF722 -:105F8000CBFFE1684031C8756069FDF7C7FFE16884 -:105F9000403108836069FDF7C6FFE16802224031A5 -:105FA0004883887D10438875E068014640318A7DCA -:105FB000D20716D10A7D2030017D0020FFF781FD38 -:105FC000002803D167A1714805F0C5F8E0680121F8 -:105FD000342211540623A02213544030817400212E -:105FE0000182E06801462031CA7C012A03D10022E7 -:105FF000CA744E210A54A421095840884A88824212 -:1060000004D1087806287DD1002008707AE0E06885 -:1060100054210A5C2030C17C0620FFF752FD002885 -:1060200003D160790121084360716079002869D14A -:1060300069466069FDF793FF68460078C107C90F9C -:106040006846017004D0E06801214030017703E028 -:10605000E068002140300177E06800254E210D54B2 -:10606000A421095840884988814203D03DA148486D -:1060700005F071F8E06802468030416A0D70816B6E -:106080000B78002B04D037A1424805F064F816E0E5 -:106090005388CB80816B6B460D71816B1B880B81A4 -:1060A0006B465B884B816B469B888B816B46DB889C -:1060B000CB81836B06211970806B51884180E06829 -:1060C0002030C5741EE0E06854210A5C2030017D58 -:1060D0000020FFF7F6FC002803D160790121084376 -:1060E0006071607900280DD16069FDF73EFEE168BE -:1060F0008922505405223420425400204031088225 -:1061000001208874E2680023916ED06E491C5841CA -:106110009166D0660DB0F0BDF8B5FAF770F9FAF7F0 -:1061200063F9FAF76FF8FAF711F9FAF7C4FCFAF71E -:1061300025F9194CE06820300079012801D1FAF7DF -:106140007BF9E068012502462032917D002908D1C3 -:10615000E178CB0701D1890703D59575012101F0BD -:10616000F9FB1BE07372635C6C6C5F6D617374654B -:10617000722E630021030000FFFFFFFF08200020B4 -:10618000212000205F03000083030000C303000000 -:10619000F1030000F6030000D8000020E07900269B -:1061A00000284FD100F06DFDF848FEF737FB0028BE -:1061B00048D06079002845D1E06854210A5C20303D -:1061C000417D0120FFF77DFC00283BD1E0680246BD -:1061D0008032117F002901D0022051E00346203394 -:1061E000D97C05292AD0E927FF000C292DD00D29BB -:1061F00029D0132943D01B7D012B4BD0052B42D036 -:10620000526A1378002B61D0528843889A425DD13C -:106210004030027D0020FFF754FC00287FD0E0686A -:10622000A42109580978891E062978D20A007A44DF -:106230001279921897443A3C7373658CD449D548C7 -:1062400004F089FFB6E00B201AE0F5F71AFF0C28DE -:106250007DD3E06808218030406A1E30F5F712FFD8 -:10626000002806D0E06804218030F5F70BFF0028F5 -:1062700003D1C749384604F06EFF032000E0062032 -:10628000FFF755FC96E00720FFF751FCE06820304F -:1062900006758FE00C20FFF74AFCE06801464030AD -:1062A000827D2A43827520310E7583E000200BE049 -:1062B0002030C17D00290AD0007E002803D1B449D6 -:1062C000B54804F048FF0A20FFF731FC27E0F5F756 -:1062D000D8FE0C2823D3E06808218030406A1E30A5 -:1062E000F5F7D0FE002806D0E06804218030F5F7ED -:1062F000C9FE002803D1A649384604F02CFF03202C -:10630000E2E74030807D800709D10C20FFF70FFCC9 -:10631000E068403046818573817D294381759B48C3 -:10632000FEF77CFA002845D0E06854210A5C203052 -:10633000C17C0020FFF7C5FB00283BD0E168AC2002 -:10634000405C002836D0E0690078002802D031E0B7 -:106350000820B9E7088D0A282CD905220A31206ABD -:1063600004F042FD002822D0E0688030816A08787D -:1063700000280CD00522491C206A04F035FD0028B5 -:1063800018D1E0688030806A0078002806D1E06883 -:10639000216A8030806A401C04F0CEFFE0688030C3 -:1063A000806A0178491C01700120FFF7C0FBE0689A -:1063B000A0300673E078C007E06802D040308680E5 -:1063C00003E040308188491C8180E0689C21095CA1 -:1063D000002908D154210A5C2030417D0120FFF7BB -:1063E00070FB002804D0E06840300189491C01811D -:1063F000E0793D21002804D0E0684030817045708C -:106400005AE0207A02280AD001280AD060790028B0 -:106410001AD0420701D4C2060AD51E21ECE7162184 -:10642000EAE7E0689E21095C40308170457043E0F6 -:106430000207E1D4C10705D1800703D45449574866 -:1064400004F089FE2A21D7E7E06802464032917BBA -:10645000002905D05389591C518191898B4213D24F -:10646000917C002905D0118A4B1C13829389994293 -:106470000AD21789D3889F4203D39C21095C002943 -:1064800002D191898F4203D322209070557013E07E -:106490003621095C0029918805D0994209D308204A -:1064A0009070557008E0062903D33E209070557017 -:1064B00002E05178002908D0E06801462031CE740E -:1064C0000E758E752570022101E02570002101F006 -:1064D00041FAF8BDF8B50C4616466946FDF710F9C5 -:1064E000002801D00020F8BD009800250246803029 -:1064F000816B0B78072B1CD0A71C0C2B29D00B2BE6 -:1065000034D0062B4CD01146A031087C0028EAD0AC -:10651000657012202070087C002808D0A2320D740B -:10652000108A6080508AA080087C0028F7D1012062 -:10653000F8BD002EFBD1657007212170816B0A2206 -:10654000A01C091D04F07DFC00988030806B057054 -:10655000EDE7002EEBD165700C212170816B8A88EC -:106560006280C988A180806B0570E0E7002EDED1D3 -:1065700065700B212170816B8A883A80CA887A8085 -:106580000989B980806B0570D1E70000E800002020 -:1065900064610100BE0500007905000032020000C0 -:1065A000002EC4D1657006212170816B8A883A80E3 -:1065B000CA887A800A89BA804A89FA808A893A81A7 -:1065C000CA897A81806B0570B1E7FE48007801289E -:1065D00001D00C2070470020704770B5F94C05467B -:1065E0002078002803D0F849F84804F0B4FD0020D2 -:1065F000A5616072012020702078012803D0F24943 -:10660000F34804F0A8FD70BDF8B5EE4C21780129DF -:1066100001D00C20F8BDE0608030807AFEF707F8EA -:1066200000283AD0E0688030807AFEF757F90028D9 -:1066300033D0E0688030807AFEF7CCF800282CD088 -:10664000E0688030807AFEF708F9002825D0F9F755 -:106650008AFE0026E6710120F9F749FCE068014650 -:1066600040318A7B002A03D04A898B899A4211D211 -:106670008A7C002A03D00A8A8B899A420AD20B8923 -:10668000CA88934206D236231B5C8988002B06D029 -:10669000914206D30120A0703BE01220F8BD0629EC -:1066A000F8D2A6701330F9F7F0FDE0680F30F9F773 -:1066B0002EFD0320F9F754FEE06805462030017EE8 -:1066C000002902D1C07D002809D0294670318EC929 -:1066D000C0488EC02946C048803104F045FE98204D -:1066E000405BA91C401C82B228462830FDF772FD91 -:1066F000002803D0B449B94804F02DFDE0684030CB -:106700000078F9F716FDF9F727FE01210020F9F7C7 -:106710002BFDE67026716671A6712672022020702C -:10672000E06880300683F9F729FE0020F8BD10B537 -:10673000F9F719FEA34C2078022803D0F9F71EFEC2 -:106740000C2010BDA078002802D0FFF7E5FC17E070 -:10675000F9F736FEFFF7F0F8E068203000790128FD -:1067600001D1F9F772FE607A002809D0012809D01A -:10677000022805D0032805D09349994804F0EBFC82 -:10678000002010BDECF744FCFAE770B505468030F8 -:10679000018B2C46491C01834034A188491CA180EF -:1067A000A17B002902D06189491C6181A17C00295B -:1067B00002D0218A491C2182007F002807D1352080 -:1067C000415D227D0120FFF77CF9002802D020895D -:1067D000401C2081284600F0EBF9002070BD79496B -:1067E00048727047774A1162D0617047F8B5754CAE -:1067F0002078032803D074497A4804F0ACFCE1689F -:1068000004272031887A0025002803D08D72207952 -:1068100038432071206901260278D2439207002A6A -:106820001FD1CA7A002A1CD1CE72217902221143CB -:106830002171FDF79AFA062802D00B2811D10AE03F -:10684000E06801462030C27C132A0AD100228A6601 -:10685000CA66067605E0E0682030C17C0D2900D1CB -:1068600005762079400704D5E0682030407D022875 -:1068700005D06079002802D1A079002802D0FFF766 -:106880004BFC2AE05848FEF73CF8002801D0657020 -:1068900002E0667055486061E0682030007E0028A4 -:1068A00011D05348F9F76FFD4A480576E268916EBA -:1068B000D26E426101614E4A6169FAF7CAF801205D -:1068C000FAF7D6F804E06069F9F75DFDFAF7F3F836 -:1068D00002210020F9F7D2FD2770207801280CD082 -:1068E000607A002809D0012807D0022806D00328A2 -:1068F00004D035493F4804F02EFCF8BD0120F9F7DB -:1069000073FEF8BDF8B52F4C05462078042803D057 -:106910002D49394804F01FFC002D71D0FAF7E3F837 -:106920000125002812D1E0682030017E00290DD019 -:1069300061694A78D20609D00978C07B0907C90F76 -:10694000814203D1E571FFF7E7FBACE0E06820305E -:106950000079012811D1F9F76FFDE168881C283111 -:10696000FDF728FD002808D0E068B22142880A52CD -:106970003121095CA030017505746069002600783A -:106980004007C10FE0682030827B914255D0407BA8 -:10699000002852D002280FD1FDF780FE002803D135 -:1069A0000949164804F0D7FBE2680023106E516EC7 -:1069B000401C594151661066E06820304673C17A28 -:1069C00001291EE0D800002064610100EF070000EB -:1069D000FB07000008200020212000203A080000CA -:1069E0007A080000AF080000EC000020C01F002063 -:1069F000E21F0020F3080000FB080000FD05000076 -:106A0000B1E014D1C6722079082108432071FDF746 -:106A100046FF002803D1FE49FE4804F09CFBE268D3 -:106A20000023106E516E401C594151661066E0689B -:106A30002030817B012948D08573606901788C46BC -:106A40000907CF0FE1680A462031CB7B9F420CD16A -:106A50006746BF07BF0F012F4FD0022F4DD0032F26 -:106A600035D06079042108436071E0782843E070F4 -:106A700020690078C00604D460690078C00600D49C -:106A800061E720790028FBD160780028F8D100F078 -:106A900056FF0028F4D060790028F1D1A0790028B1 -:106AA000EED1FEF749FF207801280DD0607A00284A -:106AB0000AD001285CD0022806D0032858D095209F -:106AC000D349000104F047FBF8BD8673B5E7FDF735 -:106AD000D3F800280CD0E068203085722179294352 -:106AE0002171C17B012901D1C673BEE7C573BCE723 -:106AF0006079102108436071B7E74078C7062CD051 -:106B00006378002BB1D1C006C00E1B28F0D84032EC -:106B1000127DC97C0520FEF7D4FF002804D0A0799F -:106B200008210843A071A0E7E07804210843E07041 -:106B3000FDF70EFF002803D1B549B74804F00BFB61 -:106B4000E0680023816EC26E491C5A41C2668166AC -:106B50002030C17B0129C9D1C6E7012B01D0CD73FB -:106B600083E7CE7381E7E07802210843E070EAE62C -:106B70000120F9F739FDF8BD10B5A84800780428C0 -:106B800003D0A349A64804F0E6FAFFF7C5FA10BD02 -:106B900036210A5C40308188091D002A04D0C08853 -:106BA000814203D3012070470629FBD200207047A1 -:106BB000F8B5054606462036F07C2C460027803482 -:106BC000072820D1288DE18D401C884258D1A16A28 -:106BD00028460A30491C04F0AFFB01220221284656 -:106BE000FDF7ABFAF77401215E204155A06A0078E9 -:106BF000002804D1A1208649800004F0ACFAA16AE3 -:106C00000878401E0870F07C082839D1616A288D08 -:106C10008988401C884233D1A06B0178002904D0B8 -:106C20007B49804804F097FA15E06988C180606A62 -:106C3000A16B40890881606AA16B80894881606A84 -:106C4000A16BC0898881A06B0771A16B07200870B8 -:106C5000A16B68884880012211462846FDF76DFA2D -:106C60000321284600F076FE606A698840888842E1 -:106C700003D067496C4804F06EFA606A0770F774D5 -:106C8000F8BDF8B5654C6079002875D120790126EA -:106C900040070025002815DAE0682030C07C022873 -:106CA00002D0052807D102E05949604801E058495F -:106CB0005F4804F050FAE0682030417D022901D19C -:106CC00026724575207908278007002840DA607908 -:106CD00000283DD12069C0780D2875D20100794483 -:106CE000097949188F4449350681FCFCBB1722FC01 -:106CF0005B71CA00E06854210A5C2030417D0120AC -:106D0000FEF7DFFE002823D1E0680321352211546D -:106D100040308573E2E0E06854210A5C2030017D58 -:106D20000020FEF7CEFE002870D1DDE0E06854219F -:106D30000A5C2030C17C0020FEF7C3FE002803D18E -:106D400033493C4804F007FAE06809212030C17457 -:106D5000CAE0E06854210A5C2030C17C0020FEF7C4 -:106D6000B0FE002803D12A49334804F0F4F9E06862 -:106D700007212030C174B7E0FBE0E06854210A5CD1 -:106D80002030C17C0020FEF79CFE002803D1204962 -:106D90002A4804F0E0F9E0682030C774A4E0E06815 -:106DA00054210A5C2030C17C0020FEF78AFE0028B6 -:106DB00003D11749224804F0CEF9E06853210E545C -:106DC0000A212030C1748FE08AE0E0682030C07C66 -:106DD0000D2803D00E491B4804F0BDF9E06854218A -:106DE0000E540C212030C1747EE0E06854210A5C0E -:106DF0002030C17C0020FEF764FE002828D1E06826 -:106E00004030007D002823D101491DE064E00000EE -:106E1000646101000E06000057060000D800002043 -:106E20005809000091020000A50200006A04000059 -:106E30006E040000AC040000B1040000B6040000C1 -:106E4000BB040000C20400009920C00004F083F9D4 -:106E5000E06853210E540E212030C17444E0E068F4 -:106E60002030C07C132804D04D204349000104F099 -:106E700072F9E06815212030C17435E0E068A42182 -:106E8000095843884A889A421CD10978062919D1A1 -:106E900054210A5C2030C17C0020FEF712FE00283D -:106EA00003D13549354804F056F9E06801464031D0 -:106EB0008A7D920702D42030C67403E08D7380303F -:106EC000406A0570E06854210A5C2030017D002092 -:106ED000FEF7F7FD002807D0E0684030857403E036 -:106EE0002549274804F037F9207900070AD5607949 -:106EF000002807D1E0682030417D032902D102211A -:106F000021724575FEF7DDFEA07900072ED5E068F9 -:106F100054210A5C2030C17C0520FEF7D2FD0028F8 -:106F20000BD0607938436071E0688030816B0878FD -:106F30000B2800D10020087018E0E07804210843F5 -:106F4000E070FDF705FD002803D10B490D4804F062 -:106F500002F9E0680023816EC26E491C5A41C26684 -:106F600081662030C17B012904D0C673E068FFF739 -:106F70001FFEF8BDC573F9E764610100DC04000081 -:106F8000F6040000EA020000F7B582B00646039856 -:106F900017468188FE48FE4A41430398039D008BB3 -:106FA00000245043009080352A7C002A0CD0F948F8 -:106FB000012A40683CD0022A1FD0032A38D0F6A10B -:106FC000F94804F0C8F84BE0002F04D17D20F2A16D -:106FD000C00004F0C0F8EF4C6068002803D1EEA1B7 -:106FE000F24804F0B8F86068A168001D0918F04A7A -:106FF000009880180C18012018E0791E084303D16E -:10700000E5A1EC4804F0A7F8EB48016800980C18DB -:10701000002F0AD0DF484168E8480818A04204D988 -:107020008120DDA1C00004F096F80320287415E04B -:107030000C46002F12D0D74F002806D178780028B0 -:1070400003D0D5A1DE4804F086F8DC48796808183A -:10705000A04203D9D0A1DB4804F07DF8002C03D175 -:10706000CDA1D94804F077F821466869F5F7D9FF32 -:10707000686100203070012434716869B060039841 -:10708000FFF786FD002801D0747104E0287C0128F8 -:1070900005D003207071CD48F06005B0F0BD02202E -:1070A000F8E7F0B5054687B00F46012000F01BFD5C -:1070B000C4B20B2000F017FDC0B2844204D0FF2000 -:1070C000B5A14D3004F047F8012000F00CFDC4B22A -:1070D000182000F008FDC0B2844204D0FF20AEA109 -:1070E0004E3004F038F83846B94F6C1E6900CD199F -:1070F0000026403D09287DD20100794409794918CC -:107100008F44044150504CE9E9E9A0000B2C04DB0A -:10711000FF20B0A1213004F01EF8E88F6946FCF78B -:10712000EFFA002804D0FF209BA1563004F013F89A -:107130000B2C04DBFF20A7A1213004F00CF80099F0 -:10714000E88F4988884204D0FF2093A1583004F08A -:1071500002F800988030007C002804D1FF208EA126 -:10716000593003F0F8FF8B484660467086600098FF -:10717000FFF74AFA002804D0FF2087A1603003F00F -:10718000EAFF07B0F0BDFFF7D2FA0028F9D0FF20E0 -:1071900081A1663003F0DFFF07B0F0BDF9F727FAF1 -:1071A00007B0F0BD0420C04300F09DFCC6B219201A -:1071B00000F099FCC0B2864204D0FF2076A1723064 -:1071C00003F0C9FF0B2C04DBFF2082A1213003F068 -:1071D000C2FFE88F6946FCF793FA002804D0FF202D -:1071E0006DA1763003F0B7FF0B2C06DBFF2079A1F1 -:1071F000213000E06FE003F0AEFF0099E88F49888E -:10720000884204D0FF2064A1783003F0A4FF0098E6 -:10721000FFF7BBFA002804D0FF205FA17B3003F00A -:107220009AFF009C0022214602A8FFF7ADFE8034A1 -:10723000A07E02A9F6F7DAF80099088D401C0885AF -:1072400007B0F0BD0B2C04DBFF2062A1213003F05E -:1072500082FFE88F6946FCF753FA002804D0FF202C -:107260004DA1863003F077FF0B2C04DBFF2059A1E2 -:10727000213003F070FF0099E88F4988884204D0DC -:10728000FF2045A1883003F066FF00988030007C25 -:10729000042804D0FF2040A1893003F05CFF009C4B -:1072A00080342674A57E4F4F681E0B2804DBFF2018 -:1072B00048A1273003F04FFF4548690008184038BF -:1072C000C787A07EF5F700FC4748A6760078EBF765 -:1072D0001BF807B0F0BDFF202FA193304FE770B52A -:1072E000424C0646E08B0025401C80B2E0832378A8 -:1072F0000A46002B09D021464968042B0BD0052BE8 -:1073000017D03D2024A1000102E0ED2022A1800041 -:1073100003F021FF14E00A2801D3022000E003203B -:107320007071002A0BD00320226900F0F5FB05469E -:1073300006E002207071002A01D02D4D00E00D46BC -:1073400029462069F5F76DFE002120613170012189 -:107350003171B060A068FF303130F06070BDF0B5C1 -:10736000074685B00E46012000F0BDFBC4B20B20DD -:1073700000F0B9FBC0B2844204D0FF2006A19E30C9 -:1073800003F0E9FE012000F0AEFBC4B2182031E0AA -:10739000E2040000302000207372635C6C6C5F6C50 -:1073A0006D2E6D302E6300001C040000E903000008 -:1073B0005504000003040000000100205F040000E9 -:1073C00016040000170400001F040000F60400006B -:1073D0005C2000207372635C6C6C5F6C6D2E6D3092 -:1073E0002E630000FFFF0000FC0000203C20002076 -:1073F000B80B000000F077FBC0B2844204D0FF203D -:10740000FD499F3003F0A7FE00250120FB4C092E0B -:1074100070D231007944097949188F44041A3737FA -:10742000336B6B18520060732073607800280ED1A4 -:10743000F348456085602573A068C338FDF791FC6B -:10744000002804D0FF20EC49B33003F084FE05B0DF -:10745000F0BD6178002909D0207B002801D1FDF71B -:10746000C2FD6573F5F796FA05B0F0BDA073FDF7A0 -:1074700000FD0028F8D0FF20DF49C73003F06BFE85 -:1074800005B0F0BDF9F7B3F805B0F0BD0420C04376 -:1074900000F029FBC4B2192000F025FBC0B28442E1 -:1074A00004D0FF20D449D53003F055FE012200213D -:1074B0006846FFF714FF69463846F5F797FF05B0B1 -:1074C000F0BD2078052804D0FF20CB49E13003F03F -:1074D00042FE207F002804D1FF20C749E23003F09C -:1074E0003AFE25772570207DF5F7EEFA257505B073 -:1074F000F0BDFFE7FF20C049ED30A6E7F0B5BF4C77 -:1075000087B020780026042805D02078052802D0EE -:107510000C2007B0F0BD01276770607B00250028B4 -:1075200027D072B6607B002808D0A07B002805D049 -:10753000FDF759FD6573A573F5F72CFA62B6207D4A -:10754000F6F782FD002827D0207F002808D0257775 -:107550002078052803D0A849AA4803F0FCFD0C2692 -:1075600065702570207DF5F7AFFA2575304607B0B8 -:10757000F0BD207D00900320694608734873F5F73D -:10758000BEFA04900020C043694605900F7202A91C -:107590000098F5F72BFFD2E720BFD0E7F0B597486A -:1075A00083B00078002801D0FFF7A8FF944F012096 -:1075B0003870FF26944D2D36002405E00B2C03D3A4 -:1075C0009249304603F0C7FD204601A9FCF798F820 -:1075D000002838D101988030007C002833D00B2C53 -:1075E00003D38A49304603F0B6FD2046AC422ED084 -:1075F0006946FCF785F8002803D08449844803F0E5 -:10760000AAFD00988030807EF6F71EFD002822D06B -:107610000098002180300174847E0C2C04D3FF205C -:107620007A49273003F097FD7A48610008184038FE -:10763000C58700988030807EF5F746FA00990020D3 -:1076400080318876B8E7641CE4B2032CB6D30020FE -:10765000387003B0F0BD20BFD3E710B500786E4C92 -:1076600000280FD001280CD068496C4803F073FD46 -:10767000A0686B49884203D364496A4803F06BFDF4 -:1076800010BD6948A060F3E710B55D4900220A709B -:10769000614C207059480270427002770273427345 -:1076A0008273826102752030574B0380052143802D -:1076B0008380001D491EFAD1100004D0002A04D096 -:1076C0005948A06005E0A26003E05049534803F028 -:1076D00042FDA0685249884203D34C49514803F007 -:1076E0003AFDFFF75BFF10BD70B5444C0E462178A4 -:1076F00084B01546002902D00C2004B070BDA061F2 -:107700008030007C002803D03B49484803F023FD2B -:107710004748464345434748ED1C30186660A5601E -:10772000854200D82846A0603549002088600521A0 -:10773000217060702077E0833F48F5F771F920757C -:10774000002803D12C493D4803F005FDF5F7D7F992 -:107750002061002201216846FFF7C1FD207D6946B6 -:10776000F5F744FE002004B070BD08B50020C0430A -:107770006946088021480078002801D0002008BD13 -:107780000846FBF7F5FF0028F9D0012008BD10B529 -:107790001A4C84B02278002A02D00C2004B010BD0C -:1077A000234A51435043C91C224AA160606080189B -:1077B000814200D80846A06000206070042121703A -:1077C000E0831D48F5F72CF92075002803D10A49FC -:1077D0001B4803F0C0FCF5F792F91A49F5F721FCB4 -:1077E0002061002201216846FFF779FD207D69466E -:1077F000F5F7FCFD002027E0987301003C200020F5 -:107800003020002076020000FFFF0000D47301004A -:10781000190300005C200020FC000020510500003E -:107820006A1800005A050000C40900008B0200001D -:1078300071020000B3FBFFFF5F73010097020000BD -:10784000C6020000B80B000004B010BD10B5E14C3A -:10785000A1690160FFF752FE0021A16110BD70B562 -:10786000DC4C84B02078052802D00C2004B070BD18 -:10787000A069002803D1D849D84803F06CFCA0695E -:107880008030007C002803D0D349D54803F063FC46 -:10789000A0698030807E002803D0CF49D14803F012 -:1078A0005AFCD148F5F7BCF8A1699A225054054614 -:1078B0004E88401E0B2804DBFF20C749273003F009 -:1078C0004AFCCA49680040184038C687A069803021 -:1078D000807E002803D1C049C54803F03CFC01224A -:1078E0006846A169FFF750FBA06969468030807E39 -:1078F000F5F77CFD0020A06104B070BD10B5BD4956 -:107900004C68983400280ED001280FD0022811D0DE -:107910003520B949000103F01EFCAE488068A04242 -:107920000BD9012010BDFF347934F6E7B120800077 -:107930002418F2E7FF346134EFE7002010BDAD48B2 -:107940004178002902D10078002801D0002070473A -:107950000120704770B504460422A84E803484B0DC -:1079600000290DD0012923D0022907D0032921D0D5 -:10797000A149A34803F0EFFB04B070BD227410E0EE -:1079800005469C4800780028F8D12946012268461F -:10799000FFF7FAFAA07E6946F5F728FD288D401C0E -:1079A0002885F4F7F7FF3078EAF7AEFC04B070BD35 -:1079B000032010E08188934A5143934A1160616A21 -:1079C0000A8902838A7982754A8982808A89C2807B -:1079D000C98901810220207404B070BDF0B5874EC2 -:1079E0000146307800257B4C85B0002908D001295C -:1079F00016D0022942D0032958D07F49834839E064 -:107A0000E583EAF781FC6078002849D1002211461D -:107A10006846FFF764FC207D6946F5F7E7FC3FE028 -:107A2000744F20697968774B401879494218A069EA -:107A300081884088594300F06FF8B1680546884254 -:107A400005D2A1696F4A88884243551903E06D4900 -:107A500003F060FAA1690883A06905218175008B94 -:107A600068494843281A6B49B860884204D32520E6 -:107A70005949400103F06FFB05B0F0BDE583EAF71B -:107A800043FC01202077A0692169803041610574A1 -:107A9000FFF7E5FE002803D04F495F4803F05BFB8A -:107AA000F4F778FF6573A57305B0F0BDEAF72CFC19 -:107AB00005B0F0BD704710B54E4A00290ED001291F -:107AC00006D0022906D04C49544803F044FB10BDAF -:107AD000401E03E05178491C5170001F506010BDDA -:107AE0003C48007870478107C90E00280BDA000770 -:107AF000000F083880084A4A80008018C069C840D2 -:107B00000006800F70478008464A80008018006891 -:107B1000C8400006800F7047F7B582B00D46064694 -:107B2000414F002406E00B2C04D3FF202A492D30BE -:107B300003F011FB204601A9FBF7E2FD00280ED15E -:107B400001988030007C002809D00B2C04D3FF2042 -:107B500021492D3003F0FFFABC4204D006E0641C3A -:107B6000E4B2032CDFD3002005B0F0BD6946204607 -:107B7000FBF7C6FD002803D017492C4803F0EBFAA9 -:107B8000A64204D1DD201449800003F0E4FA28481D -:107B9000341B44430098803041690498F6F7C8F9D3 -:107BA000041908D5281B66422946401E03F0C0F977 -:107BB0006843841B05E02946204603F0B9F9684371 -:107BC000241AAC4203D904491A4803F0C4FA2046E7 -:107BD00005B0F0BD3C200020D4730100E702000096 -:107BE000E9020000EB020000A37001005C2000200D -:107BF000EE0200003020002098730100FC000020FD -:107C0000ED040000E204000000010020190500005E -:107C10004E0600006A180000B3040000360500009C -:107C200000ED00E000E400E0FFFF00007103000051 -:107C3000770800008903000070B5F84E0446B0795B -:107C40000025012805D0F64E307A01280CD00020FE -:107C500070BD002915D1657014202070F149A01C59 -:107C600003F082FBB5710CE000290AD16570132086 -:107C700020701C22EC49A01C03F0E3F80120A07145 -:107C80003572012070BDE648007A002802D0E7482E -:107C9000808D7047E6487047F8B5E64801780029BE -:107CA00002D00C263046F8BD0026E04D34462E7535 -:107CB0006E75EE752E76AE75DF496E734E73D84FC6 -:107CC0007F217E718170687E002804D0F8F7ABFBBD -:107CD000F8F754FF6C763C72D848FBF711FED84891 -:107CE000FBF70EFEDEE770B5D24A00251570CC4ECC -:107CF000D44B35711966D8651078002805D0FF205F -:107D0000D1A17A3003F027FA70BDC84C257565758E -:107D1000E5752576A575C8486573457375717F202F -:107D20009070607E002804D0F8F77DFBF8F726FFFE -:107D300065763572C148FBF7E3FDC148FBF7E0FD0E -:107D400070BDBA48007D704710B5B849C87B897BC3 -:107D500042078307D20FDB0FC007D218C00F1018DD -:107D60004000052911D20A007A44127992189744EA -:107D7000090509020700B849085A10BDB74810BDE7 -:107D8000B74900E0B749085A10BDFF20AEA19A30AC -:107D900003F0E1F9002010BDA448B349008A48432C -:107DA00070479F488079002800D001207047F8B5BF -:107DB00006469E4C407BE07330790027A073012873 -:107DC00025D0308820829648B37B83719D4DA7488B -:107DD0002970114603F0BBFAB0796873F11DA4480D -:107DE00003F0B5FA607B0126002800D06675924842 -:107DF000407B002800D0A675A07B05284DD201004D -:107E00007944097949188F440409262B09002782EF -:107E1000D9E700218948FBF778FD25E00121874853 -:107E2000FBF773FDE91D8548FBF7A4FD687B00287F -:107E300007D001280AD0FF2083A1E83003F08BF996 -:107E400012E000217D48FBF7A6FD0DE001217B48F3 -:107E5000FBF7A1FD08E006217848FBF756FD03E09B -:107E600002217648FBF751FDE7752776691C7348B8 -:107E7000FBF774FD29787148FBF781FD04217048F8 -:107E8000FBF743FD691C6E48FBF768FD29786C48D9 -:107E9000FBF775FD26750020F8BDFF206AA1F230C2 -:107EA000CCE770B5614C012525765D4A127A002A2F -:107EB00001D03A2070BD634A13780022834205D175 -:107EC000E2756A4803F043FAE57500E02276002087 -:107ED00070BD70B50446554D0020A8752246654812 -:107EE00002F0AFFF544844730120A87570BD4C499F -:107EF0000871704710B54D4C0022627560730246E0 -:107F00005D4802F09EFF0120607510BD4449487134 -:107F10007047F8B5474D287800282CD1434C207D78 -:107F2000002828D0F8F71FFA0026A674E6746E70B1 -:107F30003046F8F715FA0020F7F7D9FF4F48F8F761 -:107F4000E6F84F48F8F7A1F9F8F73AFAE07B01278D -:107F5000C107002902D0A17CC9070ED0810712D524 -:107F6000A17C89070FD42620F8F7E3F8A07C022132 -:107F70000843A07413E00C20F8BD2520F8F7D9F8C9 -:107F8000A07C38430AE0400709D5A07C400706D40E -:107F90002720F8F7CEF8A07C04210843A074F8F756 -:107FA000DBF901210020F8F7DFF80F210520F8F7B1 -:107FB00022F8244D2978681CF8F711F8A07B0128D5 -:107FC0000AD0042808D0607D002805D0627B2A49A9 -:107FD0001A48FBF7FAFC6675A07D002806D0164803 -:107FE0002449427B9830FBF722FDA675286E017864 -:107FF000002903D00178001DF8F734F8E86D017806 -:10800000002904D01F4A401CF8F797FD6776F8F75F -:10801000B5F90020F8BD074948607047F4200020FA -:10802000D4200020FB200020DE200020B4200020EF -:10803000FFFF000008010020942000200421002000 -:108040002C210020742000207372635C6C6C5F61D3 -:1080500064762E630000000066B401009A89130064 -:108060006EB401005EB401007102000075200020B2 -:108070007B20002082200020A220002059B4010093 -:1080800056B4010057210020F8B50126FE4C0546E4 -:10809000002824D0E07B2146C207897C002A01D039 -:1080A000CA070BD082070FD58A070DD42620F8F710 -:1080B00040F8A07C02210843A07410E02520F8F7C6 -:1080C00038F8A07C3043F7E7400708D5480706D4C6 -:1080D0002720F8F72EF8A07C04210843A074E07C48 -:1080E00000280AD0A07B012804D14B20E7490001D9 -:1080F00003F031F800F0BDFAF8BD002D0CD00221DC -:108100000020F8F731F8E2480079032801D001286F -:1081100002D10220F8F768FAE07D002700280AD093 -:10812000DC4DDD48691CFBF719FC691CDB48FBF7DB -:1081300015FCE7752776D848F8F725F9A07B0528C0 -:108140000CD201007944097949188F440202020BCC -:10815000020001210846F8F791F903E0CB49D04825 -:1081600002F0F9FFE07BA17C884303D1A07B0128CA -:1081700003D0E674CB480670F8BDA774FAE710B5D3 -:10818000F8F7F1F8C7480078002816D1BE48007DFE -:10819000002812D00020FFF777FFBD4800790028A3 -:1081A00009D0012815D0022805D0032811D0B749DD -:1081B000BD4802F0D0FF002010BDF8F720F9F8F715 -:1081C00013F9F8F71FF8F8F7C1F8F8F7D7F80C200B -:1081D00010BDEAF71DFFEEE7B24901204870704775 -:1081E000F8B50024FAF7AAFE002822D0FF202D308F -:1081F000F7F7B7FFAB4D2878A54F01281CD0022810 -:1082000001D0032831D0CF20A049800002F0A3FF85 -:10821000287800280CD03879002809D0012807D008 -:10822000022835D0032833D09849A04802F093FFA4 -:10823000F8BD00F01EFAF8BD934EB07B032814D0B1 -:10824000707E002803D0F8F788FCF8F7E4F8984827 -:10825000F8F799F8B07B012812D0042810D0B8792B -:10826000012806D0032804D004E00120FFF70CFF0A -:10827000CEE7102421460E2001430020F8F7FEF837 -:108280007879012801D1F8F7E0F802202870BFE7DB -:1082900028780228CFD10120F8F7A6F9F8BD70B5EB -:1082A0007B48804C4079012808D18248F8F7D6F8FD -:1082B000002801D17F20A070F8F7BEF8724D687ECB -:1082C000002803D0F8F7AFF8F8F758FCFAF736FEB5 -:1082D00000280BD02078022804D0DD206B498000D4 -:1082E00002F039FFA87B012803D006E000F0C1F9B5 -:1082F00070BD99208000F7F734FF0120FFF7C4FE1E -:1083000020780028F4D020780128F1D05F496A480D -:1083100002F021FF70BDF0B5044689B00020069040 -:108320000190F7F7F1FE03905E480078022803D031 -:108330005649624802F00FFF554D6879012809D16E -:108340005C48F8F78BF8002802D156497F208870E6 -:10835000F8F772F85648FBF7FDFA4B4E0746002C2B -:108360006FD05348FBF700FC00286AD0F7F740FEB7 -:10837000002866D0707E00280AD00524641EE4B26E -:10838000F8F71DFC022811D0012800D00020019030 -:10839000474A4B4CD01C0290062F52D238007844EA -:1083A000007900188744B4B4B409B44E002CE5D168 -:1083B00044A1484802F0CFFEE8E7B07B012840D056 -:1083C00004283ED001990398084304D1A8790028D5 -:1083D00001D0022835D1687901281AD1A079002866 -:1083E00017D10120A07110784006C00FE0713A4803 -:1083F000029902F0ACFF2B4C384FA0787F2804D1B3 -:10840000532030A1000102F0A6FEA07838707F2032 -:10841000A0702248F7F7B7FF22480321017028799E -:10842000002877D0012808D0022873D0032804D070 -:1084300024A12B4802F08FFE6CE00120F8F7D4F85D -:1084400068E065E01348D178C07981424AD111488B -:108450001179037A994245D15179437A994241D1B0 -:108460009179837A99423DD1D179C37A994239D1B0 -:10847000117A037B994235D11178407B4906C90FA7 -:1084800081422FD101212EE0B4200020488001003C -:10849000D420002074200020042100202C21002062 -:1084A000DE04000008010020D1020000510300009A -:1084B000542100200A01002083030000C1030000B2 -:1084C000F42000207372635C6C6C5F6164762E63D1 -:1084D00000000000AB030000FC200020022100206F -:1084E000090400000021B07B012801D0042801D13B -:1084F00000290AD100280BD101990398084304D11F -:10850000A879002801D0012802D1307E00281FD090 -:1085100001200690707E002803D0F7F784FFF8F75B -:108520002DFB0698002802D00120FFF7ADFD73480F -:10853000017800290AD00178012907D000780328A2 -:1085400004D049206E49000102F005FE09B0F0BDDB -:108550006A486C4F4068397BC173797B0174B97B81 -:108560004174F97B8174684909784906C90FC1765D -:108570001C30029902F0EBFE6048397C4068C174FF -:10858000797C0175B97C4175F91E897D81750299E7 -:108590004A7D0B7D110219430183F91E8A7E4B7EB1 -:1085A00012021A438280029A537E177E1A023A43BD -:1085B000C2808A7F4B7F11021943018153490A30DF -:1085C00002F0BAFE52480179CA064C49D20E4968F7 -:1085D0008A7600794009C0310871287A002803D0D2 -:1085E00047494C4802F0B7FD0020A87243484B4968 -:1085F00047687888B085F87EE873B88B2882F88B56 -:108600006882388CA88244480078A875444802F0F3 -:108610009EFEB888F087F888208038896080C0374F -:10862000387920710198002860790BD00121084326 -:108630006071F8F7DDFA61794000C907C90F01439D -:10864000617102E0400840006071012028722B4CEB -:1086500000202070F7F7D3FEF7F7C6FEF7F7D2FD3C -:10866000F7F774FEF7F78AFE01206168FAF785FDD7 -:1086700050E7F8B5F7F7C3FEF7F7B6FEF7F7C2FD18 -:10868000F7F764FE274E0027707E002804D0F7F726 -:10869000CAFEF8F773FA7776184D2F70F7F76EFE6B -:1086A000B07B012804D000210846FAF766FDF8BD2A -:1086B00000210220FAF761FD1B4C207A002803D02C -:1086C0000F491A4802F047FD68780028EFD0124899 -:1086D000417BE1730078A0751549164802F037FE1A -:1086E0000E490F4802F033FE3C20A07268684088B3 -:1086F000B085012020726F70F8BD000008010020D5 -:10870000C48401005721002054210020732100203F -:10871000742100203D0400007420002075200020FA -:10872000EB200020B4200020D42000204F020000C5 -:108730007B200020E4200020F8B5FBF7FBFF044677 -:10874000FCF7BFF8FE4E054670692030407B0028DC -:1087500026D0012844D0022846D003284DD0FF203F -:10876000F8A19C3002F0F7FCB069F72201781140C3 -:10877000017072692032937BDB071B0F1943FB23C7 -:1087800019400170D37BDB075B0F19430170577BE6 -:10879000EF23022F3CD0012F3FD0032F41D046E0E2 -:1087A000EC48FCF76DF8002804D0716903202031F3 -:1087B0004873D9E7E748FBF74DFF002804D07069FC -:1087C0005321095C002907D0E248FCF700F87169E1 -:1087D000012020314873C7E7022120304173C3E7ED -:1087E000DC48FBF7F4FFBFE7DA48FBF733FF00286C -:1087F000BAD1FF20D3A18E3007E0D648FCF740F86D -:108800000028B1D1FF20CFA1963002F0A4FCABE745 -:10881000012C08D8002D06D009E06D1E2C4302D192 -:1088200005E0002C03D019401023194300E0194043 -:108830000170D17D002915D0517B012912D0C64885 -:10884000F7F7A1FDC548002101767269116E526EDD -:1088500042610161C049B269F8F7FBF80020F8F7FE -:1088600007F903E0F7F78FFDF8F725F9B06900780D -:10887000C00606D4F0690078C00602D4F07900285A -:1088800006D0B079002803D101210846F7F7F6FD9C -:10889000032030703079002803D1F7F791FD0120D3 -:1088A0003071F8BD10B5A649002348690246203052 -:1088B000C37483750120412398548032927F002A2B -:1088C00003D008700021022001E000210320FAF704 -:1088D000D2FB10BD06281AD202007A4412799218EF -:1088E00097440205090D101000290ED00FE0891ED3 -:1088F00002290AD90BE0891F012906D907E00829B6 -:1089000003D004E00B390B2901D801207047002067 -:10891000704730B5044683B08E48FBF77FFF0028D0 -:1089200004D1F52087A1C00002F015FC844DA86990 -:10893000FBF75AF90321A869FBF777F9A869EF2239 -:108940000178114001702146FBF7D8F90E2C5BD25B -:1089500020007844007900188744565606561F5A5E -:108960005A175642565A312B75485D224169525C5E -:10897000002A04D006218069FBF76DFA48E0C03177 -:10898000C9798069FBF767FA42E06D4841698069FF -:108990008031497AFBF7D0FA3AE0694D6969A869F4 -:1089A000B031FBF791FA6969A8698431FBF798FA4D -:1089B0002EE0634806218069FBF7BAFA28E0604D93 -:1089C00028690178A869FBF79DFA28698188A86958 -:1089D000FBF79AFA28694188A869FBF799FA17E02A -:1089E000002000900190564841694031097F0029DC -:1089F00005D06A461178012211436A461170694612 -:108A00008069FBF7A7FA03E04EA1554802F0A3FBEB -:108A1000FBF715FF002804D17F204AA1000102F0D6 -:108A20009AFB0C2C0AD0072C06D04548002140693F -:108A3000403041810121817303B030BD40480021A5 -:108A400040694030018203B030BDF0B53C4D064670 -:108A500068698DB020300079012801D1F7F7ECFC6E -:108A60000024012E1ED168692030017E002902D128 -:108A7000C07D002801D0F8F71EF8F7F7C0FCF7F723 -:108A8000B3FCF7F7BFFBF7F761FCF7F777FC687902 -:108A9000C006686902D58030048703E08030018F0A -:108AA000491C018768790226C107002901D1800786 -:108AB00013D568692030817D002902D0032907D0B1 -:108AC0000BE00121817500210120FAF7D4FA04E0BE -:108AD000867500210120FAF7CEFA68692030817D81 -:108AE000012903D16979090700D586751448807A70 -:108AF000002861D100F015FF1648FBF78FFE002813 -:108B00005AD00F4D287A002856D16869C621095CD1 -:108B100000290ED02030C17C0120FFF7DBFE0028A9 -:108B200007D168692030C17C0420FFF7D3FE0028FC -:108B300018D06869CB21095C062919D01FE0000014 -:108B4000100100207372635C6C6C5F736C617665FE -:108B50002E6300002801002080210020A821002091 -:108B6000EA070000686940300481447702204DE044 -:108B70002030C17C0420FFF7ADFE002815D06869C5 -:108B80002030C07C801E15287ED2010079440979EE -:108B900049188F449B9B9B1C9B9B9B979B1E9B9B5D -:108BA0009B243E9B9B9B9B9B900068695621095C84 -:108BB000C90702D0C030C472AEE00C20FFF7A9FE96 -:108BC000686901224030817D11438175A4E007204E -:108BD0001CE0FBF7F0FE00286CD00B2016E0F3F74A -:108BE00050FA0C2866D368690821B030F3F74AFAC6 -:108BF000002806D0686904218430F3F743FA00287E -:108C000003D1F4A1F74802F0A6FA0420FFF781FE91 -:108C100082E068698446C030807A042802D0052842 -:108C200039D079E06046E030007D002874D1EE490B -:108C30006046102600230822D8306944F51A2D1802 -:108C4000203DEF7F4F70AD7F8D70891C521E9B1CA5 -:108C5000002AF3D103A86346102608210330A83365 -:108C6000B51AED18203DEF7F4770AD7F8570801CF1 -:108C7000491E921C0029F3D16846F9F70CFB08AF96 -:108C80004ECFDA4D686900E020E070304EC005201C -:108C9000FFF73FFE0BE060464030017D002903D026 -:108CA00001214177022000E00D20FFF732FE6869C4 -:108CB000C030847230E00620FFF72BFE6869403038 -:108CC000847329E00920FFF724FE25E06869CA21A2 -:108CD000095C002920D0062906D02030C17C002064 -:108CE000FFF7F8FD002817D068690146C0318A7A7D -:108CF000072A11D213007B441B79DB189F440C0C0C -:108D00000C0C0C0C03004030807DC20700D154E7EE -:108D1000C043800700D18C72B44D2879002868695F -:108D200002D08030048303E08030018B491C018332 -:108D30006879C007686904D0A4210C54403084804D -:108D400003E040308188491C8180E879002806D002 -:108D50006969A0310879022806D8401C0871686941 -:108D6000A0300079022806D9686901468030048362 -:108D70004483A0310C7168692030C17C0020FFF76A -:108D8000A9FD002804D168692030C07C07284CD197 -:108D900068690146C0318A7A062A46D0C97A06290E -:108DA00043D03621095C02293FD1A0300079002848 -:108DB0003BD1FBF7AEFC002837D0FBF782FD002843 -:108DC00033D06869014680314A8A012A2DD90122AF -:108DD0004A77024640329688D288931E9E4201DB33 -:108DE000012302E0921B521E93B20A8BAE89B2425B -:108DF00001D3012202E0B21A521C92B2934200D96E -:108E00001346012B00D14C77C0300278002A10D0D5 -:108E1000498B4088814201D3012102E0401A401C65 -:108E200081B28B4205D90B4603E06869012380308B -:108E300044776A69118D1646C81883B2104680308F -:108E400083822036B77D002F25D0012F23D0022F1B -:108E50000CD0032F0AD05FA1654802F07CF9687935 -:108E6000C006686919D58030C4841BE0F67C032EE7 -:108E700009D0082E0FD04032D1889288891A891ED5 -:108E800059180182EBE740329688032E03D3D2882B -:108E90008918491CF5E70382E1E78030C18CC28A5A -:108EA0008918C18468690246C0329179002906D0C8 -:108EB0000146403196230E891B5AF3180B81A97A7B -:108EC0000426002913D002463D214032917001460C -:108ED0002031CC748C75012151708030807F002846 -:108EE00070D0297000210220FAF7C5F85EE0014633 -:108EF0002031CB7C042B48D02B7A002B1ED05A0774 -:108F000001D4DA0604D51E2240308270CE743CE0D3 -:108F10001A0704D53D2240308270CE7435E0D80760 -:108F200005D1980703D42BA1324802F014F96869DF -:108F30002A21422211542030C67426E04030837B1F -:108F4000002B05D047897B1C438183899F420FD228 -:108F5000D37A062B02D0927A062A05D1038A5A1CAC -:108F600002828289934203D20389C288934203D347 -:108F700022228270CE7408E08B7D002B23D0838860 -:108F800093423CD308228270CE7468694122014624 -:108F90002031CC748C75012111548030807F0028E1 -:108FA0002AD0297000210220FAF765F8F9F7EEFFC0 -:108FB00000282DD068690146FF300130827A002AEE -:108FC00022D025E018E08288062A18D33E2282703B -:108FD000CE74DAE77372635C6C6C5F736C61766598 -:108FE0002E63000039060000FFFFFFFF1001002084 -:108FF000790800004502000000210320D4E7012089 -:10900000287000210846CFE74988818101218172BB -:109010006869803084770DB0F0BDF8B50C4617460E -:109020006946FAF7F9FA002801D00020F8BD009847 -:109030000146E030027AF74E0025002A17D0002FB3 -:109040007DD1657007212170007A00280DD07169EB -:10905000E8204D8445540A22A01CEA3101F0F1FEBB -:109060000098E030007A0028F1D1A57067E0027D19 -:10907000002A2AD0002F62D1017D0D2920D20A00BA -:109080007A441279921897441B1B1B1B1B1B1B1B3A -:109090001B1B1B0F060065700C212170817DA170C8 -:1090A00071694988A18009E065700B212170817D7B -:1090B000A17071694988A180817EA17105753EE02A -:1090C000D549D64802F047F839E0027F002A15D08A -:1090D000002F34D16570082222707269FF315288E6 -:1090E000628001310A88A2804A88E2808A882281CF -:1090F000CA8862810989A181057720E0FF310131A9 -:10910000887A002808D0002F19D1657011202070AE -:10911000888960808D7212E0887B002886D0002FBD -:109120000DD1657012202070887B002807D08D73C8 -:10913000088A6080488AA080887B0028F7D10120B7 -:10914000F8BDB4480078012801D00C2070470020F9 -:10915000704770B5AF4C05462078002803D0AE4963 -:10916000AF4801F0F8FF00202561E0720120207077 -:109170002078012803D0A849AA4801F0ECFF70BD6F -:10918000F8B5A44D2978012901D00C20F8BD01269D -:10919000686180308677807AFBF749FA00282ED004 -:1091A00068698030807AFBF799FB002827D06869CE -:1091B0008030807AFBF70EFB002820D06869803071 -:1091C000807AFBF74AFB002819D0F7F7CCF86869DA -:1091D00000248030408A002825D09348FBF71EFBEE -:1091E000002820D06869C621095C00291BD02030E6 -:1091F000C17C0120FFF76EFB002802D013E0122093 -:10920000F8BD68692030C17C0420FFF763FB0028AB -:1092100009D168694030048144770220FFF779FB67 -:109220006869803044776869E821095C002905D1C4 -:10923000418CC288914201D9A98101E0C188A981EC -:1092400001468031CA8A521E93B20A8BD21892B25A -:109250000A830F7F002F02D04C830C7702E04F8BE4 -:10926000FF184F8305464035AF88FF18AF804D8A01 -:10927000012D01D86D1C4D82002B01D0A4231C545C -:109280002030C07C634D042817D0487F002816D0BA -:10929000A889824213D2FBF73CFA00280FD06869F4 -:1092A0000146C0310A78002A09D08030408B4988B5 -:1092B000884204D3AC70EE7003E0AE7001E0AC7095 -:1092C000EC7068699D210C543321095C062901D09A -:1092D000072917D1CC21028D095A511A09B2002948 -:1092E00010DB0146CE310A3002F04FF80122022194 -:1092F0006869FAF7C8FE6869CB210C5433210C5415 -:1093000040308677434D962168690A5A01462830D5 -:10931000891CFAF75FFFA87800284DD16869C02141 -:10932000095C002901D0803044830120F6F7DFFD7D -:10933000384D68691330F6F7A8FF68690F30F6F703 -:10934000E6FE0120F7F70CF8686901462030027E3E -:10935000002A02D1C07D002806D07031ACC9334844 -:10936000ACC0334802F000F8F6F7F6FF01210846DA -:10937000F6F7FAFE274D68698030006AF7F706F8BD -:109380002C48FBF7BEFA002801D06C7002E06E702A -:109390002948E86168692030007E002802D068789A -:1093A000002817D0E869F6F7EEFFF7F784FB686945 -:1093B00040300078F6F7BDFE164802214471C471B2 -:1093C000847104724472847204710170F6F7D6FFDE -:1093D0000020F8BD1848F6F7D6FF144806766A69EB -:1093E000916ED26E42610161134AE969F7F731FB70 -:1093F0000120F7F73DFBDAE710B5064C207802288C -:1094000001D00C2010BDA078002817D00020FFF755 -:109410001CFB2FE010010020D48F0100DD080000AC -:109420002D0900003809000028010020A821002093 -:10943000C12100202C01002080210020F6F793FF9D -:1094400001210020F7F71AF804202070606920300D -:109450000079012801D1F6F7F8FFE07A002809D059 -:10946000012807D0022807D0032805D0F949FA4877 -:1094700001F071FE002010BDE9F7CAFDFAE7F749D7 -:10948000C8727047F8B5F54C2078032803D0F1492D -:10949000F34801F060FE616901252031887A0028D7 -:1094A00006D0002088720D73A07904221043A071A9 -:1094B000A0690278D24392072BD1C97A002928D11A -:1094C000FAF753FC04281DD0052802D00B2819D127 -:1094D00011E0606901462030C27C102A12D10022BE -:1094E0008A66CA6605767031CCC9DE48CCC0DE48D3 -:1094F00001F03AFF06E060692030C17C0B2901D100 -:1095000000210176606902212030C572A0790843EC -:10951000A071A0690078C00606D4E0690078C00692 -:1095200002D4E07900280FD0607800280CD1A0790F -:10953000002809D1F9F718FD002805D0207A002865 -:1095400002D1607A002803D00120FFF77EFA1DE0E7 -:10955000C648FBF7D6F9002802D00020607002E070 -:109560006570C348E06160692030007E002802D049 -:10957000607800281CD0E069F6F705FFF7F79BFA42 -:1095800001210020F6F77AFF0420207020780128BE -:109590000DD0E07A00280AD0012808D0022819D07E -:1095A000032817D0A920AB49000101F0D4FDF8BD74 -:1095B000AF48F6F7E8FEAB4805766269916ED26E69 -:1095C00042610161AA4AE169F7F743FA0120F7F71E -:1095D0004FFAD5E70120F7F707F8F8BDF8B59F4C2B -:1095E00005462078042803D09A49A24801F0B3FD2B -:1095F0009A481027417939434171002D7ED0F7F701 -:1096000072FA0125002814D1944842692032117E53 -:1096100000290ED0C1694B78DB060AD00978D27BCD -:109620000907C90F914204D185720120FFF70DFA95 -:1096300054E18A4CE07800281ED0E0694178C906E0 -:109640001AD10078C00617D460692030007901284B -:109650007ED1F6F7F1FE6169881C2831FAF7AAFE7F -:10966000002875D06069C21D4388F932138220300A -:10967000007C907495732BE160692030007901289B -:1096800011D1F6F7D9FE6169881C2831FAF792FEEC -:10969000002808D06069C21D4388F9321382203047 -:1096A000007C90749573E069002600784007C10F34 -:1096B00060692030827B914242D0407B00283BD0C1 -:1096C00002280FD1FAF7EAFF002803D161496A485E -:1096D00001F041FD62690023106E516E401C59413A -:1096E00051661066606920304673017B012903D101 -:1096F0000673A1793943A171C17A00E0D1E0012953 -:1097000014D1C672A07908210843A071FBF7C7F8ED -:10971000002803D14F49594801F01DFD626900231B -:10972000106E516E401C59415166106660692030C0 -:10973000817B01292ED085736079082108436071EF -:109740004649C869496903781A07D40F203100E0F7 -:109750007FE0CA7B94420CD19B07404C9B0F012BAE -:1097600048D0022B46D0032B16D0207A0421084380 -:1097700020723A48417929434171C67181790907BC -:1097800004D541692031C97C032962D0017A0029BE -:109790005FD182E08673CFE76378002BE9D18D72C9 -:1097A000A3792B43A371012A10D0CD73FAF7DDFA08 -:1097B00006280DD00B28DCD1606901462030C27C20 -:1097C0000C2AD6D1C67540310D75D2E7CE73EDE7C0 -:1097D000606901462030C27C122ACAD100220A6682 -:1097E0004A66C57570319CC91E489CC0093001F09D -:1097F000BBFDBEE74078C30649D06278002AB8D1E5 -:10980000C006C00E1B283FD8C97C0520FFF762F8B0 -:10981000002804D0607A082108436072A9E76079C3 -:10982000042108436071FBF793F8002803D109492C -:10983000134801F090FC60690023816EC26E491CE0 -:109840005A41C26681662030C17B01291AD0C57396 -:109850008FE73DE0D48F01000D0A000010010020C9 -:10986000360A0000A8210020C12100202C01002080 -:1098700080210020A80A00000A070000220700003B -:109880007C070000C67374E7207A384370E7012A2A -:1098900001D0CD736DE7CE736BE7407A002817D106 -:1098A0001AE0F948022211434171C179491CC9B239 -:1098B000C17101290CD840692030007E00280BD0EE -:1098C000F2484078C106C90E052905D2C00603D06A -:1098D0000120FFF7BAF801E0FEF72EFFEA48017811 -:1098E00001290CD0C07A002809D0012808D002280C -:1098F00005D0032804D0E649E64801F02CFCF8BD69 -:109900000120F6F771FEF8BD10B5DF480078042895 -:1099100003D0DF49E04801F01EFC0120FFF795F875 -:1099200010BDF8B5D84C0427A07900250007002801 -:109930002FDA207A00282CD160692030C07C801E6C -:10994000132826D201007944097949188F44210946 -:1099500021212121212121212121212121212121F7 -:109960001A006069014640318D734A7F002A04D095 -:1099700006228A702030C7740BE016228A702030CD -:10998000C77406E0606901464031CD748D732030A4 -:10999000C57400F063F9BC4801268279500700289D -:1099A00022DAB948017A00291ED1406901462031E6 -:1099B0000B46C97C891E072916D20C007C442479E9 -:1099C0002419A744031111110B110E000146403157 -:1099D0008D73C030007A8870DF7405E0C030C672C5 -:1099E00002E00221C030C172A74C90074AD5207A0C -:1099F000002847D160692030C17C0120FEF76AFF52 -:109A000000283FD1A069C0780E287DD2010079449A -:109A1000097949188F44A7A706A73747630BA718EA -:109A2000A7279755616903202031C8749FE06069BA -:109A30002030C07C052803D09549984801F08BFB65 -:109A400060692030C57492E060692030C07C0928CC -:109A500003D08F49924801F07EFB60694E210D547E -:109A60002030C57483E060692030C07C0B2803D0AF -:109A700087498C4801F06FFB606953210E540C211B -:109A80002030C17473E060692030C07C0F2803D09F -:109A90007F49854801F05FFB606953210E54102116 -:109AA0002030C17463E060692030C07C102803D08E -:109AB00077497E4801F04FFB606912212030C17464 -:109AC00055E060692030C07C102803D07049784888 -:109AD00001F041FB606914212030C17447E06069E6 -:109AE0002030C07C162803D06949724801F033FB4E -:109AF000606901464030C5748573E031087D0028F7 -:109B000006D063492B2000E02DE0400101F023FB4B -:109B10006069014640310A7D002A08D00D754288EF -:109B2000F8210A520146E0318D750C2207E0418888 -:109B3000F82211520146E0318D758E760B220A759E -:109B40002030C57413E060690146C030827A062A6D -:109B500004D14031897D890700D58572C17A0629F3 -:109B600005D1C57203E04A49534801F0F4FAA079DF -:109B7000C00612D5207A00280FD160692030C17C40 -:109B800007290AD20A007A441279921897440505E7 -:109B90000505050503000721C174607A000727D574 -:109BA00060692030C17C0520FEF794FE002807D0B4 -:109BB000207A0821084320726069E030057517E0BB -:109BC000607938436071FAF7C3FE002803D1304949 -:109BD0003A4801F0C0FA60690023816EC26E491CE8 -:109BE0005A41C26681662030C17B012934D0C673D8 -:109BF00060693321095C08292DD10146028DC031ED -:109C00008B89521C9A4226D1227A002A23D14A8A71 -:109C100083889A4207D18B8AC788BB4203D1CB8AFB -:109C20000789BB4208D043888B85CA858A8A0A8601 -:109C3000CA8A4A86E8210E5401221146FAF723FA0D -:109C400000210420F9F717FA6069CB210D54203068 -:109C5000C57403218175F8BDC573C9E730B50A4CD9 -:109C600083B0A079C0077DD0207A00287AD16069BE -:109C70002030C17C0120FEF72DFE00284AD1E0698A -:109C8000C0780D286FD21BE0100100208021002039 -:109C9000D48F01000E0B0000160B000027050000FA -:109CA0002D050000340500003C05000043050000C0 -:109CB000490500005B050000BD0500009E03000093 -:109CC00001007944097949188F443B1506C14D4D6F -:109CD000FE24FD4D98B2FC00E069FAF7BEF8616918 -:109CE000C82250540222332042540020403148817F -:109CF0000120887385E160692030C17C0020FEF777 -:109D0000E9FD0028207A02D0002803D103E00121D8 -:109D10000843207275E1E069FAF798F86169CC228E -:109D200050520A8D801ABC4A00B290425FDC002873 -:109D30005DDDCE31E069FAF77EF8606906212030FA -:109D400083E060692030C17C0020FEF7C3FD00285D -:109D500003D1207A012108432072207A00284CD1B7 -:109D6000E06901E055E134E1FAF732F800282ED03D -:109D7000E069FAF728F86169CC2250520A8D801AFE -:109D8000A54A00B2904232DC002830DDE069FAF7E3 -:109D900014F86169C0318873E069FAF707F86169FE -:109DA000C0310882E069F9F7E6FF6169C031488295 -:109DB000E069F9F7E9FF6169C0318882E069F9F784 -:109DC000ECFF6169D62250520820203196E060698C -:109DD0002030C17C0020FEF77DFD002803D1207AD1 -:109DE000012108432072207A002806D100E12820B2 -:109DF0004222505404202031C87402E160692030AE -:109E0000C17C0020FEF766FD002803D1207A0121E5 -:109E100008432072207A00285FD160690022014641 -:109E200040304281012282730B202031C874E8E067 -:109E300060692030C17C0C2903D0217A02221143B1 -:109E40002172217A002948D10D21C174D9E06069BD -:109E50002030C17C0020FEF73DFD002808D160695C -:109E60004030007D002803D1207A01210843207270 -:109E7000207A002831D160690022014640304281B9 -:109E800001258573A831E069FAF704F86169E06992 -:109E90008031FAF710F86069E030007F002803D0C5 -:109EA0005E495F4801F057F96169FE204A884252D5 -:109EB000FF310131E069F9F7D7FF6169E069FF31EE -:109EC000093102E01CE056E008E0F9F7D9FF6069CB -:109ED000FC210D540F212030C17492E060690146CD -:109EE0002031CA7C122A03D0227A02231A4322721A -:109EF000227A002A6CD1403082731620C87480E028 -:109F000060690146C031CA7A002A06D0897A0629DA -:109F100003D0217A012211432172217A002970D1C4 -:109F20004030807D800715D4E069F9F7F5FF61695D -:109F30004031C875E069F9F7F1FF61694031088384 -:109F4000E069F9F7F0FF6169022240314883887DBA -:109F50001043887560690146C0318A7A062A01D1AA -:109F600000228A724030827DD2074AD10622CA720C -:109F70000021018245E060692030C17C0020FEF7AD -:109F8000A9FC002803D1207A012108432072207AFD -:109F9000002836D16946E069F9F7D5FF68460078B0 -:109FA000C107C90F6846017004D0606901214030C3 -:109FB000017703E060690021403001776069002289 -:109FC0000146403042810122827309202031C87449 -:109FD00017E060692030C17C0020FEF77BFC002880 -:109FE00003D1207A012108432072207A002808D169 -:109FF000E069F9F7BAFE61698922505405202031E1 -:10A00000C87461690023886ECA6E401C5A41CA66D2 -:10A01000886603B030BD0000FE7F0000D48F0100D1 -:10A020002104000047490968016000207047454944 -:10A030000860002070470121434A002803D001280E -:10A0400003D042487047916300E0D163002070471D -:10A050003F49012008603D48801C704704223D4B69 -:10A060003B49002805D05A60086901221043086165 -:10A0700008E008694008400008619A603249002001 -:10A08000C03188600020704731490622002808D07E -:10A09000012809D002280DD003280FD02B48401CDE -:10A0A00070470869904302E008699043801C08618A -:10A0B0000020704708699043001DF8E708691043C5 -:10A0C000F5E723494A6A02434A6200207047204963 -:10A0D0004A6A82434A62002070471D49496A01600A -:10A0E000002070471A49CA690243CA6100207047BC -:10A0F0001749CA698243CA61002070471449C96977 -:10A100000160002070471249024600204031002AB9 -:10A1100003D0012A01D0072070478A6370470D4998 -:10A120000420886008490020C03188600A4801681E -:10A130008022090A090211430160084901200860D0 -:10A140007047000000040040400000400420000070 -:10A15000000500400003004000E400E000E100E0F2 -:10A160008107C90E002808DA0007000F08388008A8 -:10A17000814A80008018C06904E080087F4A80001E -:10A1800080180068C8400006800F704710B504466C -:10A1900000F0DBF8002813D02046FFF7E1FFC0B243 -:10A1A00000F0E1F800280DD07549E2060B78D20ED8 -:10A1B00001209040002B08D04A681043486006E018 -:10A1C000704810BD6F48401C10BD6F4908600020EA -:10A1D00010BD10B5044600F0B8F800280BD068494F -:10A1E000E2060B78D20E01209040002B05D04A6881 -:10A1F00082434A6004E0634810BD634980310860CF -:10A20000002010BD70B50D46044600F09EF80028F1 -:10A210000BD05E480068E206D20E01219140084052 -:10A2200000D001202860002070BD564870BD10B5D8 -:10A23000044600F08AF8002807D0E106C90E012084 -:10A24000884052490860002010BD4E4810BD10B52E -:10A25000044600F07AF8002808D0E106C90E012073 -:10A2600088404A4980310860002010BD454810BD33 -:10A2700070B50D46044600F068F8002819D028464D -:10A2800000F071F8002816D0A007C10EFF228A4006 -:10A29000A807000E8840002C10DA2107090F0839A2 -:10A2A0008B0835499B005B18D96991430143D961FB -:10A2B0000CE0344870BD3348401C70BDA3082F49E2 -:10A2C0009B005B181968914301431960002070BD21 -:10A2D00070B50C46054600F038F8002805D0284631 -:10A2E000FFF73EFF2070002070BD264870BDBFF311 -:10A2F0004F8F21492648C860BFF34F8FFEE770B5E6 -:10A300001F4C05462178012000290ED1207072B61D -:10A3100000F0F4F81C4E803631688143616000F033 -:10A32000EDF8C043306062B600202870002070BD98 -:10A3300013490A78002A06D0002804D1124A486836 -:10A340001060002008700020704710B504462028D7 -:10A3500007DA00F0D3F80121A140084201D1012021 -:10A3600010BD002010BD012803D0032801D000201B -:10A37000704701207047000000ED00E000E400E0BD -:10A38000300100200120000000E100E000E200E0D8 -:10A390000400FA05F8B504468007002501260028C8 -:10A3A00004DA5848C563C66302208443E00404D538 -:10A3B0005548C563C66380148443600003D5534881 -:10A3C000456080058443E00504D55148C563C663F4 -:10A3D00080158443A00404D54E48C563C663401469 -:10A3E000844360042704C00FF90F884203D04AA1B8 -:10A3F000612000F0B0FEB80F0AD04C49CD634C4844 -:10A40000C563C563CE63C663C6630320800384430C -:10A4100020050AD5474FFD632F20E6F7C5FEFE63F2 -:10A420002F20E6F7C1FEF8148443F7F7D7FF424820 -:10A43000044203D038A18D2000F08DFEF8BDF0B5A8 -:10A4400000210A46FF230446CC40E4072AD04CB240 -:10A45000E606F60E0125B540384E3560384E3560BB -:10A46000002C11DA25072D0F083DAE08354DB6003A -:10A470007719FD69A407E60E1C46B440A5431446AF -:10A48000B4402543FD610DE0A6082F4DB6007619B6 -:10A490003568A407E70E1C46BC40A5431446BC40E3 -:10A4A00025433560491C2029CDD3F0BD70B5274C1C -:10A4B0000D462060FFF76EFF2068FFF7C0FF2846BB -:10A4C000E8F766F8F7F796FEF1F792FDF7F786FFE3 -:10A4D000FFF725FEE7F7E2FE00F06AF870BD10B561 -:10A4E0001A4C2068FFF756FF2068FFF7A8FFF7F720 -:10A4F00075FFE8F7C7F80020206010BD134800681A -:10A5000070470000C01F0040C0CF004000E5014080 -:10A51000C08F0040C0DF00407372635C736F635F85 -:10A52000636F6E6669672E6300000000C0EF004035 -:10A53000C0FF0040C0BF0040FEFF0FFC80E100E014 -:10A5400080E200E000ED00E000E400E038010020DF -:10A5500070B5002402460D4620462146002A1ED032 -:10A56000012A04D0022A04D0032A1ED103E00120CC -:10A5700002E0022013E003202B0000F00DFF07167D -:10A580000507090B0D0F1600012108E0022106E066 -:10A59000032104E0042102E0052100E00621F2F796 -:10A5A00058FA002801D0204670BD0724FBE70000C0 -:10A5B000B348002101708170704770B5B14D01231F -:10A5C0006B60B14B1C68002CFCD0002407E00E68C7 -:10A5D00006601E68002EFCD0001D091D641C9442FC -:10A5E000F5D30020686018680028FCD070BD70B5F5 -:10A5F000A34C0E466178884203D0A4A16F2000F0DE -:10A60000AAFD0325330000F0C7FE09520624245298 -:10A610005252524952002078022803D09BA1732045 -:10A6200000F099FD2570A078022802D0012804D0FE -:10A6300008E0A068E8F7C6FC04E02046083007C838 -:10A64000FFF7BBFF0020A070F2F7A4F904202070F0 -:10A6500070BDF2F754FA01466068F3F769FC0646EC -:10A660002078022803D089A1872000F074FD8B4A4E -:10A670008B498C48964205D86269032A02D2521C43 -:10A68000626102E0864207D84D71801BC860844930 -:10A690006078F2F7ABFE70BD032003E0A0780028DD -:10A6A000FAD10220F2F77EF800F0E1F870BD77A150 -:10A6B000B12000F050FD70BD70B50546F2F71FFAED -:10A6C0006F4C60602078012803D070A1B82000F0A2 -:10A6D00042FD73490220087000220A718D60042235 -:10A6E0004A71704ACA6020706078F2F77FFE70BDD0 -:10A6F00010B5634CA078002802D12078002801D042 -:10A70000112010BD6848F2F78BF96070607800285E -:10A7100004D0012020700020606110BD032010BD16 -:10A7200010B50124020B64040121604BA04202D247 -:10A730009140186802E0203A58689140084000D0E3 -:10A74000012010BDF8B50E46910005464F1914467C -:10A750003F1F0091E8F747FC009980028919091F03 -:10A76000B14201D2012200E00022002C03D0FF21DF -:10A7700001318C4201D90920F8BD4D498D4219D3D0 -:10A78000AF4217D3854205D2874203D228463043D1 -:10A79000800701D01020F8BD8E420BD3002A09D1CA -:10A7A0002846FFF7BDFF002804D13846FFF7B8FF61 -:10A7B000002801D00F20F8BD3E483F49006888427C -:10A7C00005D0224631462846FFF7F7FE0FE0FFF797 -:10A7D0008FFF0028EFD12A480121C66085600461FF -:10A7E00081702046302148431830FFF765FF002074 -:10A7F000F8BD10B504462E48800A84420BD3E8F712 -:10A80000F2FBA04201D8102010BDA0020446FFF7C1 -:10A8100087FF002801D00F2010BD26482649006878 -:10A82000884203D02046E8F7CDFB0AE0FFF760FF3F -:10A830000028F1D112480221846081701F48FFF77F -:10A840003BFF002010BD1A48010B01208840401E2C -:10A85000704700B50B460246FFF7F5FF104201D0E6 -:10A860000F2000BD114802604360002000BD10B5FC -:10A87000034C6078F2F728F900202070A07010BD1A -:10A880003C01002000E5014000E401407372635C7C -:10A89000736F635F666C6173682E630030750000D0 -:10A8A000D0210020D0FB0100EFA5010000060040F0 -:10A8B00000C0010064000020BEBAFECA3A56000083 -:10A8C000F94805218170002101704170C1708160DB -:10A8D000704710B5F5490A78022A07D0CA681018DF -:10A8E000C860C8689638F3F7DBFA10BD8A6810189C -:10A8F00088608868F6E70378ED49EE4A002B02D0BD -:10A90000012B10D014E00379002B01D0012B0FD1C3 -:10A910004379002B01D0012B0AD18368643B8B4221 -:10A9200006D2C06810E00379002B03D0012B01D0C0 -:10A93000002070474379002B01D0012BF8D1C36868 -:10A94000643B8B42F4D280689042F1D8012070477A -:10A95000F8B504460226F2F731FF0068002803D05C -:10A96000D5A1BD2000F0F7FB0127CF4D002C08D06A -:10A970002078002817D0012805D0022811D00328FC -:10A9800013D02F710DE06068C82808D3F3F7FEFAE2 -:10A99000002804D06068FFF79CFF012603E0002632 -:10A9A00001E000F0FDF93046F8BD28780028F8D124 -:10A9B0006068FFF7A0FF0028E3D0606800780028F7 -:10A9C00026D0A878042803D0BBA1F72000F0C3FB51 -:10A9D000B64F0020387060680079012800D0002050 -:10A9E000387160684079002837D004207871606839 -:10A9F0008168E868F2F715FBB8606068C068963057 -:10AA0000F8600320A870A949E878F2F7EFFCC8E7DE -:10AA1000A6480221017061680979012919D0002135 -:10AA2000017161684979002915D00421417161687B -:10AA30008968963181606168C968C160C0689A4C54 -:10AA400014346060F2F75BF820606F700220A87029 -:10AA5000A7E70321E4E70321E8E70320C6E7F8B509 -:10AA6000914C0D46E178884204D0FF2092A11A3023 -:10AA700000F071FB2846002501268C4F030000F0F2 -:10AA80008BFC0906123C5E82939DCAA6CA00A07880 -:10AA9000032807D0A078022804D0FF2086A11E300A -:10AAA00000F059FBF8BDA078032807D0A078022851 -:10AAB00004D0FF2080A1223000F04DFB0420A070C4 -:10AAC00025712078002815D1FFF703FF3878022878 -:10AAD0000CD0B868E0607F49886A7F4A02402261F2 -:10AAE0007D4AD24310408862002055E0E078F2F7BA -:10AAF000BFFAEFE700F054F9F8BDA078032807D0BB -:10AB0000A078022804D0FF206BA14B3000F023FB7B -:10AB10002078002802D000F04FF9F8BDA078032873 -:10AB20001ED104202BE0081AF8606049E078F2F7A3 -:10AB30005DFCF8BD0420F1F735FEA570F8BDA078E6 -:10AB4000032807D0A078022804D0FF205AA16C3037 -:10AB500000F001FB20780028DDD1A07803280DD07B -:10AB6000F1F7CDFF504E014614363068F3F7E0F9A7 -:10AB70000028DFDB71688142DCDBD4E70520F1F7D8 -:10AB800011FEA670F8BDA078042804D0FF204AA1C9 -:10AB90008D3000F0E0FA0220A1688847FFF7D8FE68 -:10ABA000FF260546C63642E0A078042804D0FF20E0 -:10ABB00041A1923000F0CFFA0120EDE7A0780428FF -:10ABC00098D0FF203CA1973000F0C5FA92E7A0781A -:10ABD00004280AD06078002802D0A078022804D087 -:10ABE000FF2035A19C3000F0B6FA2078002892D1E1 -:10ABF0002079002804D00620F1F7D4FD2571C0E7A4 -:10AC00006078002805D02949E078F2F7EFFB6570FD -:10AC1000F8BD0720B3E7FF2027A1B73040E7002D9C -:10AC20000AD0012D06D024A1304600F094FA022D5E -:10AC3000F5D1F8BD042000E00320A1688847FFF7A4 -:10AC400087FE0546F3E770B5050005D0164CA078E1 -:10AC5000052803D0112070BD102070BD1F48F1F7EA -:10AC6000DFFEE070E078002803D0A5600020A0702F -:10AC700070BD032070BD10B50B480178002901D0CC -:10AC8000112010BD817805292AD08178012929D089 -:10AC90008178002926D0012101708178012921D0F5 -:10ACA000807800281ED01FE054010020E021002001 -:10ACB0003D860100FF1FA1077372635C736F635FC2 -:10ACC000726164696F5F74696D65736C6F742E6314 -:10ACD0000000000000050040028100005FAA0100A2 -:10ACE0000F2010BD00F068F8002010BDF8B5394EF7 -:10ACF0000446B078002801D001280DD1002C0DD0D9 -:10AD00002046FFF7F8FD00280AD02078324D0028B1 -:10AD100008D0B078012823D00F20F8BD1020F8BD4E -:10AD20000720F8BD02272F702079012814D00020B9 -:10AD300028716079002811D004206871A0689630CD -:10AD4000A860E068E860E868224C14346060F1F7BD -:10AD5000D6FE2060B77019E00320E9E70320ECE796 -:10AD6000002028702079012816D0002028716079F1 -:10AD7000002813D004206871A168F068F2F751F937 -:10AD8000A860E0689630E8600320B0701249F0785F -:10AD9000F2F72CFB0020F8BD0320E7E70320EAE7E9 -:10ADA00010B50E48816A0E4A11400A4A12691143D1 -:10ADB0008162F1F7EFFD10BD10B5064CE078F1F7B8 -:10ADC00083FE0820F1F7EEFC0520A0700020207023 -:10ADD000607010BD54010020E021002000050040FB -:10ADE000FD7EFFFF70477047034610B50B439B077E -:10ADF0000FD1042A0DD308C810C9121FA342F8D0DE -:10AE000018BA21BA884201D9012010BD0020C043E0 -:10AE100010BD002A03D0D30703D0521C07E0002046 -:10AE200010BD03780C78401C491C1B1B07D103780C -:10AE30000C78401C491C1B1B01D1921EF1D11846F5 -:10AE400010BDF8B5042A2CD3830712D00B78491C07 -:10AE50000370401C521E83070BD00B78491C0370F3 -:10AE6000401C521E830704D00B78491C0370401C01 -:10AE7000521E8B079B0F05D0C91ADF002023DE1B53 -:10AE800008C90AE0E6F7A0F9F8BD1D4608C9FD406B -:10AE90001C46B4402C4310C0121F042AF5D2F308FC -:10AEA000C91A521EF0D40B78491C0370401C521E64 -:10AEB000EAD40B78491C0370401C012AE4D40978B9 -:10AEC0000170F8BD01E004C0091F0429FBD28B0703 -:10AED00001D50280801CC90700D00270704700298C -:10AEE0000BD0C30702D00270401C491E022904D3B4 -:10AEF000830702D50280801C891EE3E70022EEE76B -:10AF00000022DFE7020A08704A70020C8A70020E03 -:10AF1000CA707047002203098B4273D3030A8B4225 -:10AF200058D3030B8B423CD3030C8B4221D312E04A -:10AF300003460B437FD4002243088B4274D303099A -:10AF40008B425FD3030A8B4244D3030B8B4228D33B -:10AF5000030C8B420DD3FF22090212BA030C8B4261 -:10AF600002D31212090265D0030B8B4219D300E001 -:10AF7000090AC30B8B4201D3CB03C01A5241830B86 -:10AF80008B4201D38B03C01A5241430B8B4201D336 -:10AF90004B03C01A5241030B8B4201D30B03C01A5F -:10AFA0005241C30A8B4201D3CB02C01A5241830AD9 -:10AFB0008B4201D38B02C01A5241430A8B4201D308 -:10AFC0004B02C01A5241030A8B4201D30B02C01A32 -:10AFD0005241CDD2C3098B4201D3CB01C01A524199 -:10AFE00083098B4201D38B01C01A524143098B4222 -:10AFF00001D34B01C01A524103098B4201D30B010B -:10B00000C01A5241C3088B4201D3CB00C01A52412F -:10B0100083088B4201D38B00C01A524143088B42F4 -:10B0200001D34B00C01A5241411A00D2014652418D -:10B03000104670475DE0CA0F00D04942031000D3AC -:10B040004042534000229C4603098B422DD3030A01 -:10B050008B4212D3FC22890112BA030A8B420CD311 -:10B06000890192118B4208D3890192118B4204D33A -:10B0700089013AD0921100E08909C3098B4201D3BA -:10B08000CB01C01A524183098B4201D38B01C01AF4 -:10B09000524143098B4201D34B01C01A524103096B -:10B0A0008B4201D30B01C01A5241C3088B4201D31A -:10B0B000CB00C01A524183088B4201D38B00C01AC7 -:10B0C0005241D9D243088B4201D34B00C01A52419E -:10B0D000411A00D20146634652415B10104601D32B -:10B0E0004042002B00D54942704763465B1000D3B5 -:10B0F000404201B50020C046C04602BD70477047BF -:10B10000704710B500F058F810BD30B58C180278B3 -:10B11000401C13071B0F01D10378401C120906D1F4 -:10B120000278401C03E00578401C0D70491C5B1E32 -:10B13000F9D101E00B70491C521EFBD1A142E6D3AC -:10B14000002030BD012308CB134B1860134B19604E -:10B15000134B1A607047134A134B13607246053A3B -:10B16000F0E7114A0F4B1B689A420ED10D4B00209D -:10B17000186001980D4B04B598470CBC9E460246DA -:10B18000029800990A4B1B68184706980599094BC5 -:10B190001B68DB6818470000780100207C01002054 -:10B1A0008001002070010020EFBEADDE4D2F0000B9 -:10B1B00098000020040000201D481E497047FFF73A -:10B1C000FBFFE5F7BBFF00BD01200007C06AC0B26E -:10B1D000FF2804D1184819490968884202D0184844 -:10B1E00018490160184819490968884203D1184A6A -:10B1F00013605B68184700BD20BFFDE71248134984 -:10B20000096888420ED1134B18680B498842F3D065 -:10B2100080F308881049884204DD10480268022142 -:10B220000A4302600E4880470E4880470E48004798 -:10B23000F0210020F0210020FFFFFFFF0010001090 -:10B240002C05004008000000001000000000002055 -:10B250000400002000C00100002000202405004060 -:10B26000632F0000C9B1010045B1010013487045CA -:10B2700002D1EFF3098101E0EFF308818869023818 -:10B280000078102814DB202810DB2B280BDB0C4A5D -:10B2900012680C4B9A4203D1602804DB0A4A10471B -:10B2A000022008607047094A10470000084A10470A -:10B2B000084A12682C32126810470000FDFFFFFF99 -:10B2C00064000020BEBAFECAAD120000991F010042 -:10B2D0001B1F0100040000200D4B0E4908470E4BB8 -:10B2E0000C4908470D4B0B4908470D4B09490847C6 -:10B2F0000C4B084908470C4B064908470B4B0549BE -:10B3000008470B4B034908470A4B0249084700000E -:10B31000B125000051220000D52B0000772A000043 -:10B32000252A0000D7270000B912000017140000DA -:10B33000392B0000472300000A7802704B784370D5 -:10B340008A788270CA78C2700B79037170470A7864 -:10B3500002704B7843708A788270CA78C2700B7919 -:10B3600003714A79427170470A7802704B784370D2 -:10B370008A788270CA78C2700B7903714A794271F7 -:10B380008A798271CB79C37170470A8802804A88B2 -:10B3900042800A790271704730B47446641E257881 -:10B3A000641CAB4200D21D46635D5B00E31830BCF9 -:10B3B00018470000FFFFFFFF0000FFFF0100030030 -:10B3C000000001000000000000000000000000007C -:10B3D00000000000870000000000000000000000E6 -:10B3E0000000000000000001020304000D0E0F1019 -:10B3F000000000000F6900002D6B0000F56B0000DD -:10B400004F6C0000A36C00000B6D00006969000028 -:10B41000216A0000AD6D0000BB7900001001100131 -:10B420003A0200001A020000040104013C00170067 -:10B4300044000E00F401FA00960064004B00320054 -:10B440001E001400010204081020408055555525A7 -:10B450002627D6BE898E555555D6BE898E0000004A -:10B460007006120DB413000014035A06A009000060 -:10B470006004F208840D0000A8B401000800002058 -:10B480001000000004110000B8B4010018000020F2 -:10B490006C0100000AB10100D8B401008401002051 -:10B4A0006C20000020110000024801688907FCD5CB -:10B4B0007047000000E200E0013536010001005451 -:10B4C0003720FB349B5F80B4800010026801337F1B -:08B4D0000102A029E449B101C9 -:00000001FF diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/Lib/s132_nrf52_2_0_0/s132_nrf52_2.0.0_softdevice.hex b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/Lib/s132_nrf52_2_0_0/s132_nrf52_2.0.0_softdevice.hex deleted file mode 100644 index a61b7c914c..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/Lib/s132_nrf52_2_0_0/s132_nrf52_2.0.0_softdevice.hex +++ /dev/null @@ -1,6918 +0,0 @@ -:020000040000FA -:1000000000040020E508000079050000C508000094 -:10001000830500008D05000097050000000000002A -:1000200000000000000000000000000009090000BE -:10003000A105000000000000AB050000B5050000B0 -:10004000BF050000C9050000D3050000DD05000064 -:10005000E7050000F1050000FB05000005060000B3 -:100060000F06000019060000230600002D06000000 -:1000700037060000410600004B0600005506000050 -:100080005F06000069060000730600007D060000A0 -:1000900087060000910600009B060000A5060000F0 -:1000A000AF060000B9060000C3060000CD06000040 -:1000B000D7060000E1060000EB060000F506000090 -:1000C000FF06000009070000130700001D070000DD -:1000D00027070000310700003B070000450700002C -:1000E0004F07000059070000630700006D0700007C -:1000F00077070000810700008B07000095070000CC -:100100009F0700001FB500F003F88DE80F001FBD2A -:1001100000F0DEBB1FB56FF00100009040100390AF -:10012000029001904FF010208069000B420900F00E -:100130001F045DF822300120A04083434DF8223097 -:10014000684600F044F91FBDF0B54FF6FF734FF459 -:10015000B4751A466E1E11E0A94201D3344600E080 -:100160000C46091B30F8027B641E3B441A44F9D14B -:100170009CB204EB134394B204EB12420029EBD17E -:1001800098B200EB134002EB124140EA0140F0BD8F -:10019000DD4992B00446D1E90001CDE91001FF220A -:1001A0004021684600F03AFB94E80F008DE80F000C -:1001B000684610A902E004C841F8042D8842FAD12B -:1001C00010216846FFF7C0FF1090AA208DF8440068 -:1001D000FFF7A0FF00F0F2F84FF01024A069102202 -:1001E0006946803000F001F9A069082210A900F0EA -:1001F000FCF800F0D7F84FF080510A6949690068AF -:100200004A43824201D8102070470020704710B541 -:10021000D0E900214FF0805002EB8103026944696C -:100220006243934209D84FF01022536903EB8103D4 -:100230000169406941438B4201D9092010BD5069D1 -:10024000401C01D0002010BD0F2010BD70B501680A -:100250000446AE4D4FF01020062951D2DFE801F0E0 -:10026000320318283B1DD4E90265646829463046EC -:1002700000F0CDF82A462146304600F0B6F8AA0034 -:100280002146304600F09EFA002800D0032070BDC1 -:1002900000F050FB4FF4805007E0201DFFF7ABFF4C -:1002A0000028F4D100F046FB60682860002070BD93 -:1002B000241D94E80700920000F084FA0028F6D08C -:1002C0000E2070BD8069401C12D0201DFFF79FFFDB -:1002D0000028F6D109E08069401C09D0201DFFF7F5 -:1002E0008AFF0028EDD1606820B12046FFF750FF5B -:1002F000042070BDFFF70EFF00F060F800F052F828 -:10030000072070BD10B50C46182802D001200860E7 -:1003100010BD2068FFF79AFF206010BD4FF0102439 -:10032000A069401C05D0A569A66980353079AA2846 -:1003300008D06069401C2DD060690068401C29D03D -:1003400060692CE010212846FFF7FEFE31688142EB -:100350001CD1A16901F18002C03105E030B108CAA9 -:1003600051F8040D984201D1012000E000208A429A -:10037000F4D158B1286810B1042803D0FEE728460C -:1003800000F057F861496868086008E000F016F866 -:1003900000F008F84FF480500168491C01D000F0CB -:1003A000A3FAFEE7BFF34F8F59480168594A01F499 -:1003B000E06111430160BFF34F8FFEE74FF0102063 -:1003C0008169491C02D0806900F0ADB87047524A7B -:1003D00001681160121D416811604F4A8168103236 -:1003E0001160111DC068086070472DE9F041174683 -:1003F0000D460646002406E03046296800F0A6F8BF -:10040000641C2D1D361DBC42F6D3BDE8F08170B5CD -:100410000C4605464FF4806608E0284600F083F855 -:10042000B44205D3A4F5806405F58055002CF4D1C1 -:1004300070BD4168044609B1012500E000254FF078 -:1004400010267069A268920000F0BCF9C8B120467D -:1004500000F01AF89DB17669A56864684FF4002031 -:1004600084420AD2854208D229463046FFF7CFFFA0 -:100470002A4621463046FFF7B8FFFFF79FFFFFF7F8 -:1004800091FFFFF747FEF8E72DE9FF414FF01024F9 -:10049000616980680D0B01EB800000F6FF70010BB5 -:1004A00000200090019002900246039068460123CC -:1004B0000BE0560902F01F0C50F8267003FA0CFCF2 -:1004C00047EA0C0740F82670521CAA42F1D30AE012 -:1004D0004A0901F01F0650F8225003FA06F6354388 -:1004E00040F82250491C8029F2D3A169090B4A091E -:1004F00001F01F0150F822408B409C4340F82240FD -:10050000FFF765FFBDE8FF815809000000000020EB -:100510000CED00E00400FA050006004014480168F4 -:100520000029FCD07047134A0221116010490B6862 -:10053000002BFCD00F4B1B1D186008680028FCD056 -:100540000020106008680028FCD07047094B10B5E7 -:1005500001221A60064A1468002CFCD00160106861 -:100560000028FCD00020186010680028FCD010BDC6 -:1005700000E4014004E5014008208F49096809585A -:10058000084710208C4909680958084714208A49EF -:100590000968095808471820874909680958084711 -:1005A0003020854909680958084738208249096878 -:1005B000095808473C2080490968095808474020E5 -:1005C0007D4909680958084744207B49096809584A -:1005D0000847482078490968095808474C20764957 -:1005E000096809580847502073490968095808479D -:1005F0005420714909680958084758206E4909680C -:10060000095808475C206C49096809580847602068 -:100610006949096809580847642067490968095801 -:100620000847682064490968095808476C206249EE -:1006300009680958084770205F4909680958084740 -:1006400074205D4909680958084778205A490968A3 -:10065000095808477C2058490968095808478020EC -:1006600055490968095808478420534909680958B9 -:100670000847882050490968095808478C204E4986 -:1006800009680958084790204B49096809580847E4 -:10069000942049490968095808479820464909683B -:1006A000095808479C204449096809580847A02070 -:1006B0004149096809580847A4203F490968095871 -:1006C0000847A8203C49096809580847AC203A491E -:1006D000096809580847B020374909680958084788 -:1006E000B4203549096809580847B82032490968D3 -:1006F00009580847BC203049096809580847C020F4 -:100700002D49096809580847C4202B490968095828 -:100710000847C8202849096809580847CC202649B5 -:10072000096809580847D02023490968095808472B -:10073000D4202149096809580847D8201E4909686A -:1007400009580847DC201C49096809580847E02077 -:100750001949096809580847E420174909680958E0 -:100760000847E8201449096809580847EC2012494D -:10077000096809580847F0200F49096809580847CF -:10078000F4200D49096809580847F8200A49096802 -:1007900009580847FC2008490968095808475FF4C8 -:1007A0008070054909680958084700000348044952 -:1007B000024A034B70470000000000206809000057 -:1007C0006809000040EA010310B59B070FD1042A15 -:1007D0000DD310C808C9121F9C42F8D020BA19BA0C -:1007E000884201D9012010BD4FF0FF3010BD1AB171 -:1007F000D30703D0521C07E0002010BD10F8013BC6 -:1008000011F8014B1B1B07D110F8013B11F8014BEC -:100810001B1B01D1921EF1D1184610BD02F0FF033F -:1008200043EA032242EA024200F005B870477047EB -:1008300070474FF000020429C0F0128010F0030C42 -:1008400000F01B80CCF1040CBCF1020F18BF00F8C3 -:10085000012BA8BF20F8022BA1EB0C0100F00DB872 -:100860005FEAC17C24BF00F8012B00F8012B48BFD0 -:1008700000F8012B70474FF0000200B51346944674 -:100880009646203922BFA0E80C50A0E80C50B1F1E8 -:100890002001BFF4F7AF090728BFA0E80C5048BFFC -:1008A0000CC05DF804EB890028BF40F8042B08BF9A -:1008B000704748BF20F8022B11F0804F18BF00F896 -:1008C000012B7047014B1B68DB68184700000020B4 -:1008D00009480A497047FFF7FBFFFFF713FC00BD0B -:1008E00020BFFDE7064B1847064A1060016881F3F8 -:1008F0000888406800470000680900006809000097 -:100900001D030000000000201EF0040F0CBFEFF3D9 -:100910000881EFF30981886902380078182803D12B -:1009200000E00000074A1047074A12682C3212689C -:100930001047000000B5054B1B68054A9B589847B7 -:1009400000BD000005030000000000205409000065 -:1009500004000000001000000000000000FFFFFF86 -:040960000090D00330 -:10100000881100207DB0010079960000CDAF01006D -:1010100079960000799600007996000000000000A3 -:10102000000000000000000000000000D9B0010036 -:101030007996000000000000799600007996000083 -:1010400041B1010047B10100799600007996000096 -:101050007996000079960000799600007996000054 -:101060004DB10100799600007996000053B101005E -:101070007996000059B101005FB1010065B101002E -:101080007996000079960000799600007996000024 -:101090007996000079960000799600007996000014 -:1010A0006BB1010071B101007996000079960000E2 -:1010B00079960000799600007996000079960000F4 -:1010C00077B10100799600007996000079960000CA -:1010D00079960000799600007996000079960000D4 -:1010E00079960000799600007996000079960000C4 -:1010F00079960000799600007996000079960000B4 -:10110000799600007996000000F002F819F093FF3C -:101110000AA090E8000C82448344AAF10107DA4552 -:1011200001D119F088FFAFF2090EBAE80F0013F0F1 -:10113000010F18BFFB1A43F00103184734A5010043 -:1011400054A501000A4410F8014B14F00F0508BF24 -:1011500010F8015B240908BF10F8014B6D1E05D083 -:1011600010F8013B6D1E01F8013BF9D1641E03D05C -:10117000641E01F8015BFBD19142E4D3704700008B -:101180000023002400250026103A28BF78C1FBD890 -:10119000520728BF30C148BF0B6070471FB500F031 -:1011A0003DF88DE80F001FBD1EF0040F0CBFEFF3DC -:1011B0000880EFF30980014A10470000CB9400003B -:1011C0008269034981614FF00100104470470000BB -:1011D000D511000001B41EB400B510F085F901B4BA -:1011E0000198864601BC01B01EBD0000F0B4404627 -:1011F000494652465B460FB402A0013001B506488D -:10120000004700BF01BC86460FBC80468946924617 -:101210009B46F0BC704700000911000019F008BFA0 -:1012200070B51C4C054608202070A01C00F065F825 -:101230005920A08029462046BDE8704006F067BBD3 -:1012400010B506F06FFB13490020891E087010BD11 -:1012500070B50C460F49891E097829B1A0F16001CB -:10126000532906D3012011E0602802D043F2010087 -:101270000CE020CC084E94E80E0006EB8000A0F5B0 -:101280008050241FD0F8806E2846B047206070BD83 -:10129000012070470A000020BCB1010010B50446CF -:1012A0000021012000F03FF80021182000F03BF859 -:1012B00000210B2000F037F80421192000F033F84A -:1012C00004210D2000F02FF804210E2000F02BF84F -:1012D00004210F2000F027F80421C84300F023F870 -:1012E0000721162000F01FF80721152000F01BF839 -:1012F0002046FFF795FF002010BD81210180704737 -:10130000FFF79EBF10487047104A10B514680F4B86 -:101310000F4A08331A60FFF79BFF0C48001D04605A -:1013200010BD704770474907090E002806DA00F023 -:101330000F0000F1E02080F8141D704700F1E0205C -:1013400080F800147047000003F9004310050240C4 -:101350000100000130B5FB4D044610280AD0112CC5 -:1013600006D02846122C817806D0132C08D0FFDF37 -:10137000AC7030BDFFDFFBE71129F9D0FFDFF7E7E5 -:101380001129F5D0FFDFF3E770B50EF03CF9044604 -:101390000FF072FE201AC4B206200CF0F9FA0546CE -:1013A00006200CF0FDFA2E1A07200CF0F1FA054683 -:1013B00007200CF0F5FAE349281A32188878122829 -:1013C0000DD000231A4413280BD0002002440878C3 -:1013D000022808D000201044201AC0B270BD01239A -:1013E000F0E70120F2E70120F5E7D64810B5C17813 -:1013F00094B0A9B15FF017018DF800104168CDF8E5 -:1014000002100089ADF8060009A968460AF0D1F873 -:101410000446112801D004B1FFDF14B0204610BDEE -:101420003221E9E702210CF008BB2DE9F04194B02C -:101430001D4690460E460746FFF7F4FF04000BD00A -:101440002078222804D3A07FC0F34010A84206D100 -:10145000082014B0BDE8F08143F20200F9E737201C -:101460008DF80000ADF802703DB101208DF8040048 -:101470008DF805608DF8068002E000208DF80400EC -:1014800009A968460AF095F8A07F65F34510A07792 -:101490000020DEE730B50446A1F120000D460A2801 -:1014A0004AD2DFE800F005070C1C2328353A3F44F8 -:1014B000FFDF42E0207820283FD1FFDF3DE0A14858 -:1014C0000178032939D08078132836D02078242851 -:1014D00033D0252831D023282FD0FFDF2DE02078EE -:1014E00022282AD0232828D8FFDF26E020782228A7 -:1014F00023D0FFDF21E0207822281ED024281CD012 -:1015000026281AD0272818D0292816D0FFDF14E063 -:101510002078252811D0FFDF0FE0207825280CD077 -:10152000FFDF0AE02078252807D0FFDF05E02078DC -:10153000282802D0FFDF00E0FFDF257030BD30B586 -:101540000B8840F67B444FF6FF72022801D093428D -:1015500004D09D1FA54224D2022802D04D88954276 -:1015600003D04D88AD1FA5421BD24C88A34218D88A -:101570008B88B3F5FA7F14D2022802D0C888904233 -:1015800005D0C88840F677450A38A84209D2C888ED -:10159000904208D0944206D05B1C6343B3EB800FAB -:1015A00001DB072030BD002030BD70B5044610F0CF -:1015B00003FA60BB207930B1082802D8217B0829C2 -:1015C00005D9072070BD217B0029FAD0F6E718B1B4 -:1015D000206810F0F1F9D0B9207B18B1A06810F0A4 -:1015E000EBF9A0B9002507E0206850F8250010F0BD -:1015F000E3F960B96D1CEDB22079A842F4D800255A -:1016000009E0A06850F8250010F0D6F908B11020C4 -:1016100070BD6D1CEDB2207BA842F2D8002070BDD9 -:1016200010B5028943F6FD73111F994212D2418908 -:1016300004290FD3B1F5804F0CD891420AD8017814 -:10164000890705D5406818B1FFF7AFFF002800D122 -:10165000002010BD072010BDF0B50024059D10B17D -:10166000A94203D851E009B90020F0BD0920F0BD1E -:10167000055D8DB107197E78112E3FD00FDC0A2E43 -:101680003CD2DFE806F03B1624242A2A2C2C3333E4 -:10169000025D72BB641CE4B28C42F9D3E4E71D2EF8 -:1016A0002CDAA6F11206042E28D2DFE806F027274E -:1016B0001018022DDAD1BD781D70072D01D26D07EB -:1016C00001D40A20F0BD157845F0010515E0EE4380 -:1016D000F60707E0012D07D010E00620F0BD2E0729 -:1016E000A6F18056002EF5D06046F0BD1578AE0705 -:1016F00001D50B20F0BD45F002051570055D641C99 -:101700002C44E4B28C4202D9B0E74FF4485C8C42DE -:10171000AED3A9E710B504784CB1012243F20223FD -:10172000012C07D0022C0FD0032C17D112E000227D -:101730000A7015E00A7082790324B4EB921F0DD170 -:101740000EE00000A80100200A708479B2EB941F1B -:1017500004D105E00A708279920901D0184610BDC3 -:1017600050F8012F41F8012F80888880002010BD9B -:1017700008B538B1FEA06B4600680090487903EBCD -:10178000901000781070086842F8010F88889080E7 -:1017900008BD30B50C46097895B0222902D2082040 -:1017A00015B030BD28218DF80010ADF80200132AC5 -:1017B00003D03B2A01D00720F2E78DF8042009A9C5 -:1017C000684609F0F6FE050003D121212046FFF707 -:1017D00061FE2846E4E700B595B023218DF800109E -:1017E000ADF802001088ADF804005088ADF806008E -:1017F000D088ADF80A009088ADF808000020ADF858 -:101800000C00ADF80E0009A9684609F0D2FE15B02B -:1018100000BD70B50E46050003D00021092010F070 -:1018200088F8D44C0120022EE0701CD0032E00D08A -:10183000FFDF0621201D0FF071FD607A20F0C0004F -:1018400084F80900FFF7D1FD608A00280AD0002D36 -:1018500008D083000122002109200FF0CDFF0928C4 -:1018600000D0FFDF70BD0321E01D0FF057FD607A4F -:1018700020F0C00040F040006072E01C02F03BFC31 -:10188000E0E72DE9FF410220BA4E8DF80400002761 -:10189000F08AADF80600B84655E001A80CF037F81C -:1018A000050006D0F08AB0B3A6F81680ADF8068021 -:1018B00047E0039C2078212843D0A07F01072BD547 -:1018C00004F123000090A28EBDF80800214604F127 -:1018D000360301F02BFD050003D011282AD0FFDFCD -:1018E00028E0A07F20F00800A077E07F810861F366 -:1018F0000000C10861F34100E07794F8210000F096 -:101900001F0084F820002078282824D1292120468F -:10191000FFF7C0FD1FE01CE0400712D5BDF808002E -:10192000214604F10E02FFF756FF050004D01128EE -:1019300000D0FFDF00250EE0A07F20F00400A0779C -:1019400009E07F1CFFB202200CF022F8401CB842D4 -:10195000A3D8052D07D0BDF80600F082052D04D0D0 -:10196000284604B076E5A6F816800020F9E72DE9B0 -:10197000F047040000D1FFDF20787E4E20F00F00FA -:10198000801C20F0F0007030207060680178091F22 -:1019900011290BD2DFE801F0F1090A4FF00A0CF02F -:1019A000F0360A0A0A0AF174F100FFDFBDE8F08799 -:1019B00087883846FFF736FD050000D1FFDF6078E5 -:1019C000212140F008006070307D40F00400307547 -:1019D0002846FFF75FFD384606F089FD384603F0DC -:1019E00021FC384604F03BFC394602200FF0A1FFF1 -:1019F000A87F20F01000A877FFF743FF0028D5D07C -:101A0000FFDFD3E785882846FFF70CFD00B9FFDF2D -:101A100060688078012800D0FFDF606881792846FF -:101A200006F0D8FE0028C1D0617841F0080161704D -:101A30006168C880BAE786883046FFF7F3FC050086 -:101A400000D1FFDF6078314640F0080060706068C8 -:101A5000C088288160680089688160684089A881A1 -:101A600002200FF066FF0020A875A87F00F0030099 -:101A700002289BD1FFF705FF002897D0FFDF95E7ED -:101A800080783C2803D0002502280AD000E00125F8 -:101A9000002720B13C2802D0022800D0FFDF17B178 -:101AA0007EE00127F5E7607840F008006070307D47 -:101AB00040F008003075EDBB606802218788384629 -:101AC0000BF0B2FF0546032138460BF0ADFF82460E -:101AD000052138460BF0A8FF8146042138460BF05B -:101AE000A3FF804605B9FFDFBAF1000F00D1FFDF89 -:101AF000B9F1000F00D1FFDFB8F1000F00D1FFDF17 -:101B000022212846FFF7C6FC60688079012837D07B -:101B10004FF00208A87F68F30100A8776068C08AC8 -:101B200028816068008B68816068408BA88160684C -:101B3000C07900E027E0E87560688168A961808964 -:101B4000A8836068807B6870606850F80F1FC5F8D4 -:101B500002108088E880A87F00F00301384606F074 -:101B6000B8FCB8F1010F0ED0B8F1020F18D005E0A3 -:101B70000302FF01A80100201FE023E0FFDF15E7BB -:101B80004FF00108C6E73078032800D0FFDF0021BE -:101B900008460FF0CEFEBDE8F047012000F087BFF9 -:101BA000B078132800D0FFDF002107200FF0C1FE1E -:101BB000BDE8F0471120FFF7CDBB2046BDE8F04758 -:101BC00001F08CBE607840F008006070EEE62DE910 -:101BD000F0470546007800270009DFF894A69146F3 -:101BE0000C463E46012871D0BC464FF6FF710228D4 -:101BF0006DD0072809D00A286AD0FFDFA9F8006055 -:101C00000CB1278066800020D0E6686804F10802E5 -:101C100003780D2B40D006DC042B7DD0072B44D05D -:101C20000A2B7AD106E0122B46D0132B51D0142B5D -:101C3000F7D1C0E011270926002C6FD0B0F804803E -:101C4000A4F804806868807920729AF814104046DD -:101C500021F004018AF8141004210BF000FF052183 -:101C600040460BF0FCFE002140460BF0F8FE01213F -:101C700040460BF0F4FE032140460BF0F0FE02213B -:101C800040460BF0ECFE062140460BF0E8FE072133 -:101C900040460BF0E4FEB1E701270926002CCCD02A -:101CA0008088A080686880790EE0122710268088DE -:101CB000214600F01EFFA1E71C270926002CBCD0FE -:101CC0004088A08068680079207297E78AE0B3E0D6 -:101CD00082E081783C2938D010272026002CACD017 -:101CE0008088A0806868C08A60836868C08A208312 -:101CF0006868008BA0836868408BE0836868417FD8 -:101D0000E07D61F30000E0756968497F490861F38F -:101D10004700E075696802E022E05CE08BE0C8798A -:101D20000831FFF725FD696804F10F0201F10F008A -:101D30008B7B01461846FFF71BFD6868807910B160 -:101D40000120A07507E00220FBE71B270926002CD5 -:101D500071D084F808C09AF8141021F008018CE0C2 -:101D60001D273026002C66D0A1806868411D0079AF -:101D7000FFF7FEFC686890F82B00E0736868C07895 -:101D80000428207C14D020F00100207469681F22F0 -:101D9000C97861F3420020746968C97A61F3C700A9 -:101DA0002074696804F111000C3119F043F825E73B -:101DB00040F00100E9E720271026E4B3A18068681D -:101DC00004F10902407A20726968CB1C88781946B0 -:101DD000FFF7CEFC12E74A4621462846BDE8F04709 -:101DE00001F001BF287E012803D0022813D0FFDFB5 -:101DF00004E71F271026F4B16888A080688B208133 -:101E0000A88B6081E88BA081288CE0819AF814105F -:101E100021F0200131E012271026688800F069FEC9 -:101E20004CB1687800F007000328C0D19AF814106C -:101E300021F0020121E027E0287E062822D2DFE8F7 -:101E400000F0040F0F030303C5E71B270926DCB1CD -:101E5000A18084F808C09AF8141021F001010CE068 -:101E60001B27092684B1A180287E012808D00320E1 -:101E700020729AF8141021F010018AF81410BDE6AF -:101E80000220F5E7FFDFB9E6A9F80060BBE610B570 -:101E9000F74894B08078132802D0082014B010BD01 -:101EA00022208DF8000009A9684609F082FB04464B -:101EB000002107200FF03DFD2046EFE700B5EC487C -:101EC00095B08078122801D00820A0E41E208DF85B -:101ED000000000208DF802008DF8030009A9684673 -:101EE00009F067FB0028F0D1002107200FF021FD49 -:101EF0001120FFF72FFA002089E400B5DC4895B0E7 -:101F00000078022803D0032801D008207FE41B209A -:101F10008DF8000000208DF8020009A9684609F03C -:101F200048FB0028F2D1002108460FF002FD0120F5 -:101F300000F0BDFD00206AE42DE9F0410027CC4C03 -:101F40000A287CD2DFE800F0057B1C7B7B7B7B448E -:101F50003B6AFFF7D2FF002831D105F01FFC0028B3 -:101F60002DD0017821F00F01891C21F0F0012031E2 -:101F70000170077605F0F0FB207D40F001001DE0C8 -:101F80008EB23046FFF74EFA050000D1FFDF287809 -:101F9000212814D005F002FC98B1017821F00F013E -:101FA000891C21F0F0011031017002210176468078 -:101FB000AF7505F0D1FB207D40F002002075BDE833 -:101FC000F08129463046BDE8F0411322FFF7E1BB1E -:101FD000A578122D03D0132D04D0FFDFEFE7FFF714 -:101FE0006DFF01E0FFF753FF0028E8D105F0D6FBB5 -:101FF0000028E4D0017821F00F01891C21F0F001C4 -:1020000020310170122D07D00221017605F0A4FBCA -:10201000207D40F01000D1E70121F6E7607A012130 -:10202000B1EB901F02D1022104E008E0800900D04A -:10203000FFDF0321BDE8F0410020FFF7EABBFFDF2F -:10204000BDE72DE9F04114460D00074600D1FFDF42 -:102050002878012803D0022821D0FFDFAFE73846D7 -:10206000FFF7E0F9060000D1FFDF0220B07520780D -:1020700020F00F00801C20F0F000103020706078FD -:1020800040F0080060702868A0616868E0612889F5 -:1020900020847748017D41F0200101758FE73846A3 -:1020A000FFF7C0F9060000D1FFDF69884FF6FF7027 -:1020B000814209D1AA88824206D131463846BDE81C -:1020C000F0411322FFF765BB814201D1A88898B186 -:1020D000207820F00F00801C20F0F00010302070DD -:1020E000607840F0080060702868A0616868E0616E -:1020F00028892084002006E0782300223946022027 -:102100000FF07AFB0120B07559E730B5054695B060 -:102110000C4608460FF050FC78BB00200121203D02 -:10212000062D5FD2DFE805F0032540444A57002121 -:1021300008200FF0D7FB10B1112015B030BD2420BE -:102140008DF80000D4F80200CDF80200A0798DF8D7 -:10215000060009A9684609F02CFA05002CD10823CD -:102160000022114618460FF047FB082824D0FFDF55 -:1021700022E060680FF062FC08B11020DDE73C202F -:102180008DF800002088ADF802006088ADF80400EA -:1021900009A9684609F00DFA05000DD1606858B12B -:1021A000BDF82810018007E0206801F0E2FF02E09E -:1021B000204600F0B1FC05462846BEE73D220BE074 -:1021C0008DF8021002E000BF8DF8020009A96846F0 -:1021D00009F0EFF9EFE734228DF800202278D207DA -:1021E000F2D0EDE70720A8E730B5054695B00C46DC -:1021F00008460FF005FC70BB203D052D35D2DFE809 -:1022000005F00323232523002088FFF70BF920B1D5 -:102210000078222804D208208FE743F202008CE7DE -:1022200025208DF800002088ADF8020009A9684635 -:1022300009F0BFF9002880D1DDF82A10C4F8021097 -:102240009DF82E10A17178E7062076E7206838B156 -:102250000FF0F4FB08B110206FE7206801F07DFF5C -:102260000348408AA080002067E7072065E7000058 -:10227000A8010020FE487047FD4810B518210A3813 -:1022800018F04FFE012000F012FC1120FFF762F859 -:10229000F74C00200A3C211D60744FF4617060828D -:1022A000E01C05F043FBD4F80300C4F80A00B4F8BE -:1022B0000700E081607A2074FFF797F800B1FFDF34 -:1022C00000F09CFCBDE8104001F0C2BA10B50C460D -:1022D0003E21204618F025FEA07F20F00300A077C5 -:1022E000202020700020A07584F8220010BD7047C7 -:1022F0002DE9FC4105460E4608460FF05DFB10B186 -:102300001020BDE8FC81DA4C0A3C15B1012D38D112 -:102310002CE0D4F803000090B4F80700ADF80400F6 -:102320008046677A8DF80670E11C3046FFF7F2F9B7 -:102330000028E6D1FFF759F830B10099C4F803102E -:10234000A4F807806772DCE7307808B1012808D16B -:10235000D4F80300C4F80A00B4F80700E081607AFA -:102360002074002109200FF0E4FA0FE0317841B128 -:10237000012906D0022906D0032904D043F2022005 -:10238000BFE70720BDE70120FFF743FA657400208F -:10239000B7E710B504460FF033FB08B1102010BDAD -:1023A000B34922460A39C878091DFFF7E1F9002030 -:1023B00010BD2DE9F0419AB0054600208DF85C0073 -:1023C0008DF858008DF828008DF860001E461446E0 -:1023D000884628460FF03BFB18B920460FF037FB24 -:1023E00010B110201AB0EAE555EA040018D01F27F2 -:1023F0000AAB17AA414628460097FFF72DF9002897 -:10240000F0D118AB16AA314620460097FFF724F901 -:102410000028E7D19DF85800C00703D00A20E1E763 -:102420000720DFE701AF7DB11A208DF804008DF899 -:10243000068042462946F81C18F0FCFC0BA901A8AE -:1024400009F0B7F80028CDD17CB120208DF8040028 -:102450008DF8066032462146F81C18F0EBFC0BA9FB -:1024600001A809F0A6F80028BCD181499DF82800F0 -:102470000A3948700020B5E770B506460A200C46B8 -:10248000087015461146204609F093F830B93821F6 -:1024900021702046294609F08CF820B1082801D186 -:1024A00043F2032070BD2A462146304600F05BFB14 -:1024B0000446082800D1FFDF204670BD2DE9F04119 -:1024C0006CA196B00446D1E90001CDE914010027C2 -:1024D00020460FF071FA30B92078012806D16068E3 -:1024E0000FF06AFA10B1102016B068E5604D0A3D91 -:1024F0002878012801D00820F6E707200BF050FAD1 -:1025000018B9207848B1012807D0FEF73DFF30B157 -:10251000287D10F00C0F09D103E01220E4E713200E -:10252000E2E7C10702D1A846800701D51120DBE709 -:10253000208A43F6E172A0F120019142217807D36D -:10254000012942D1002840D1618A00293DD10FE004 -:10255000022901D0032901D1A02836D3012907D0AF -:1025600098F80110C90703D0618A71B3B4292CD837 -:10257000217831B1012908D0022904D0032924D1BE -:1025800015E0002516E0022514E008B9608A60B164 -:1025900004256068007868B101280AD0022808D0B4 -:1025A000032806D043F202209EE70125F1E7032528 -:1025B00000E00127207A30B1012807D0022807D097 -:1025C00003286AD106E0002605E066E0012602E065 -:1025D000022600E003260DB1022D13D196B1E0686A -:1025E00018B1FEF7E2FF002886D198F801008007B5 -:1025F00002D043F2012077E7022D03D1022E4CD006 -:10260000032E4AD018208DF82C00208AADF82E0019 -:10261000208AADF830008DF8325098F80310002071 -:102620004FF0010811B1012968D102E08DF83300A3 -:1026300001E08DF833808DF834702178012925D0A0 -:10264000CDF83500ADF839008DF83C60207DC0F341 -:102650004002014662F35F01C0F3800041EA80005E -:1026600014A9085C8DF83B00B8B169460BA805E0D9 -:10267000B2010020070605040302010008F099FFDB -:10268000002891D15DB1022D09D011E0606850F8A9 -:10269000011FCDF835108088D4E7072024E73EB12C -:1026A000E06828B16A460BA9FFF7E6FE0028A2D130 -:1026B0001B208DF82C008DF82E8069460BA808F0A1 -:1026C00078FF002897D19DF801001B2816D1052D11 -:1026D00009D2DFE805F0030305050300032000E04D -:1026E000022000F0E4F9012D0AD0608A40B10022F6 -:1026F0008300114610460FF07FF808B10320F3E67F -:102700000020F1E62DE9FC4107460D460326084668 -:102710000FF09DF9002863D13846FEF783FE0400D0 -:1027200004D02078222804D20820EAE543F20200EF -:10273000E7E5A07F00F0030C2DB129466046FEF7C7 -:10274000FEFE0600F1D1F948BCF1010F05D0BCF145 -:10275000020F17D0FFDF3046D3E5A27D2946012ABC -:1027600002D0007D800701D51120CAE529B968464D -:1027700000F0FDFA0028D8D16946384605F0A7FFD9 -:102780000646E8E7A17D022914D1007D800611D418 -:1027900025B1A07F40070BD4002100E0012138467D -:1027A00005F0E0FF0600D6D1A075002DD3D002E0E1 -:1027B0001126D0E7A5B12A4621463846FFF70BF887 -:1027C00006461128C7D1A07F4107C4D4296844F820 -:1027D0000E1F6968616040F0040020740026BAE7AB -:1027E00010208EE570B50C460546FEF71BFE010075 -:1027F00005D022462846BDE87040FEF7CABF43F226 -:10280000020070BD00B595B031218DF800108DF833 -:10281000020009A9684608F0CCFE15B000BD0123EE -:10282000FEF703BE00231A461946FEF7FEBD70B53B -:1028300094B004460FF0C0F810B1102014B070BD71 -:102840002046FEF7EDFE0028F8D1B84DA8781128F3 -:1028500001D00820F2E7FEF797FD20B1287DC006E1 -:1028600003D51120EAE71320E8E71D208DF80000CA -:10287000207800F001008DF802002089ADF80400F6 -:102880006089ADF806002078C0F340008DF809009B -:10289000E8780025012618B1012804D00320CDE7EF -:1028A0008DF8085001E08DF8086009A9684608F025 -:1028B00080FE0028C2D12078800707D5606828B143 -:1028C00009AA6946FFF7D8FD0028B7D11E208DF868 -:1028D00000008DF802608DF8035009A9684608F0E1 -:1028E00068FE0028AAD1A08900F0F5F80400A5D15F -:1028F0001220FEF72FFD2046A0E7F0B595B0154653 -:102900000C4607460FF0A3F838B920460FF054F8EC -:1029100018B928460FF050F810B1102015B0F0BDCE -:10292000824E307D10F0180F01D1400701D51120E3 -:10293000F4E72046FEF774FE0028EFD12078C0F3BC -:102940004001394302D0800702D50FB10720E5E7E7 -:1029500029460220FEF7F3FD0028DFD1B0781128C8 -:1029600003D0122801D00820D8E706200BF018F871 -:1029700018B1B078122802D005E01220CEE7FFF798 -:102980009DFA0028CAD1FEF7FFFC022801D21320CD -:10299000C4E72078800707D5606828B109AA69468E -:1029A000FFF76AFD0028B9D121208DF800002089A9 -:1029B000ADF802006089ADF8040020784FF0010105 -:1029C000C0F340008DF80600207882074FF0000029 -:1029D00015D43A7842B1012A09D0022A07D0032A35 -:1029E00005D043F2022099E78DF8070001E08DF849 -:1029F000071057F8012F0292BA88ADF80C20F27830 -:102A00001AB1012A04D0032088E78DF80E0001E0F6 -:102A10008DF80E102988ADF810106988ADF81210E5 -:102A2000A988ADF81410E988ADF81800ADF81610B3 -:102A3000ADF81A0009A9684608F0BBFD002886D148 -:102A4000A08900F048F804008ED11320FEF782FC24 -:102A5000204663E730B5054695B00C4608460EF0B3 -:102A6000CFFF10B1102015B030BD2846FEF7DAFCBC -:102A700038B10178222902D3807F800604D408204F -:102A8000F1E743F20200EEE713208DF80000ADF805 -:102A9000025009A9684608F08CFD0028E3D19DF991 -:102AA0002A107F2901D02170DDE70520DBE730B552 -:102AB0001E4D040008D0012C04D0022C06D0032C9B -:102AC00004D0FFDF2C7030BDFFDFFBE72878012842 -:102AD000F8D0FFDFF6E710B548B1830000221146B9 -:102AE00007200EF089FE072801D0032010BD00202A -:102AF00010BD70B50C0006460DD0FEF793FC050026 -:102B000000D1FFDFA680288920812889608168891B -:102B1000A081A889E08170BD10B50446006840B16D -:102B20000EF095FF20B1102010BD0000A80100207C -:102B3000206801F005FBA0882F4C6082607C012892 -:102B40000FD1002109200EF0CDFE00B10120617AE5 -:102B50000122B2EB911F01D1022100E00321FEF717 -:102B600058FE0020E0E72DE9F047002592460C468C -:102B70000646A8464FF001090B2721E0306850F8BF -:102B80002500007820B1012805D00720BDE8F08796 -:102B900084F8028001E084F80290306850F8250043 -:102BA00050F8011FC4F803108088A4F807002770AC -:102BB0005146204608F0FDFC0028E7D16D1CEDB21F -:102BC0003079A842DAD8002539270FE0B068102202 -:102BD00050F82510A01C18F02DF9277051462046FA -:102BE00008F0E7FC0028D1D16D1CEDB2307BA84283 -:102BF000ECD80020CAE70000A8010020E848002126 -:102C00000160818070472DE9FF41804692B01C46EB -:102C10000E4618460EF0D0FE18B1102016B0BDE8D2 -:102C2000F08121460120FEF78AFC0028F6D101251B -:102C30008DF842504FF4C050ADF84000002210A96A -:102C4000284603F0AAFD0028E8D18DF842504FF441 -:102C50002850ADF8400000271C216846099718F05D -:102C600082F99DF82400ADF8346020F00F00401C7C -:102C700020F0F00010308DF824009DF82500ADF80C -:102C8000367020F0FF008DF825009DF8260007AA79 -:102C900020F00600801C40F001008DF826009DF811 -:102CA00000000BA940F002008DF800001F20ADF8D5 -:102CB000380009A80C9010A80B90CDF83C8068460D -:102CC00003F06EFB0028A9D1B54EBDF81C0007AA81 -:102CD00030808DF8425042F60120ADF840009DF85A -:102CE00026000BA920F00600801C20F001008DF8C2 -:102CF00026000220ADF83400ADF8380014A80F907B -:102D0000684603F04DFB002888D1BDF81C00708098 -:102D1000311D204600F0ECF880E73EB5044608205F -:102D2000ADF8000020460EF047FE08B110203EBD71 -:102D300021460120FEF703FC0028F8D12088ADF8D9 -:102D400004006088ADF80600A088ADF80800E088AF -:102D5000ADF80A00924801AB6A468088002103F072 -:102D600009FFBDF800100829E1D003203EBD1FB5C2 -:102D70000446002002900820ADF80800CDF80CD0E1 -:102D800020460EF019FE10B1102004B010BD84488A -:102D900002AA81884FF6FF7004F07BF80028F4D176 -:102DA000BDF80810082901D00320EEE7BDF8001097 -:102DB0002180BDF802106180BDF80410A180BDF82B -:102DC0000610E180E1E701B582B00220ADF8000015 -:102DD000734802AB6A464088002103F0CBFEBDF881 -:102DE0000010022900D003200EBD1CB50021009167 -:102DF0000221ADF8001001900EF002FE08B1102083 -:102E00001CBD67486A4641884FF6FF7004F041F8E0 -:102E1000BDF800100229F3D003201CBDFEB5074603 -:102E200014460E4608460EF0C7FD08B11020FEBD40 -:102E30001F2C01D90C20FEBD38460EF0BDFD584DAB -:102E400018BB288801A903F021F80028F3D13878AD -:102E50008DF80500288801A903F06DFE0028EAD14D -:102E600000909DF800009DF8051040F002008DF8DC -:102E70000000090703D040F008008DF80000288802 -:102E8000694603F0FBFD0028D5D1ADF8084028883D -:102E9000334602AA002103F06DFEBDF80810A142DE -:102EA000C9D00320FEBD7CB50546002000900190EE -:102EB0000888ADF800000C46284601950EF0BEFDCE -:102EC00018B920460EF09CFD08B110207CBD15B14C -:102ED000BDF8000050B132486A4601884FF6FF70D5 -:102EE00003F0D7FFBDF8001021807CBD0C207CBD15 -:102EF00030B593B0044600200D460090142101A87F -:102F000018F031F81C2108A818F02DF89DF80000E1 -:102F1000CDF808D020F00F00401C20F0F000103059 -:102F20008DF800009DF8010006AA20F0FF008DF842 -:102F300001009DF8200001A940F002008DF820005A -:102F400001208DF8460042F60420ADF8440011A897 -:102F500001902088ADF83C006088ADF83E00A08864 -:102F6000ADF84000E088ADF842009DF8020020F086 -:102F70000600801C20F001008DF802000820ADF84A -:102F80000C00ADF810000FA8059008A803F008FA8F -:102F9000002803D1BDF818002880002013B030BDF0 -:102FA00010000020094810B504680A490848086064 -:102FB0000DF08AFB0848046010BD08490020086035 -:102FC0004FF0E0210220C1F8800270471005024056 -:102FD000010000011805024014050240FC1F0040DA -:102FE00070B50C46054606F0BFFE21462846BDE8F2 -:102FF000704007F09CBE704770477047704770473D -:1030000010FFFFFFDBE5B15100C001008100FFFFB1 -:1030100010B504460EF0D0FC08B1102010BD207889 -:10302000C0F30210042807D86078072804D3A178D9 -:10303000102901D8814201D2072010BDE078410754 -:1030400006D421794A0703D4000701D4080701D523 -:10305000062010BD002010BD10B513785C08C37F9A -:1030600064F30003C3771478A40864F34103C377BF -:103070001078C309887863F34100887013781C09BD -:103080004B7864F347134B701378DB0863F300004D -:1030900088705078487110BD10B5C4780B7864F30F -:1030A00000030B70C478640864F341030B70C478A8 -:1030B000A40864F382030B70C478E40864F3C303C8 -:1030C0000B700379117863F30001117003795B08C9 -:1030D00063F34101117003799B0863F3820111705E -:1030E0000079C00860F3C301117010BD70B51446BB -:1030F0000D46064604F052FB80B10178142221F0FF -:103100000F01891C21F0F001A03100F8181B2146A5 -:1031100017F0D5FEBDE8704004F01EBB29463046CE -:10312000BDE870401322FEF734BB70B514460E465E -:10313000054604F033FB70B1017821F00F01891CC2 -:1031400021F0F00120310170458021688161BDE8E6 -:10315000704004F001BB31462846BDE870401322A0 -:10316000FEF717BB10B5FE4C94F8300000280CD1C8 -:1031700004F120014FF6FF72A1F110000CF0B9F834 -:1031800000B1FFDF012084F8300010BD2DE9F047C9 -:10319000064608A8894690E830041F469046142148 -:1031A000284617F0E0FE0021CAF80010B8F1000F21 -:1031B00003D0B9F1000F03D114E03878C00711D063 -:1031C00020680EF01DFCE8BBB8F1000F07D12068A5 -:1031D000123028602068143068602068A860216878 -:1031E000CAF800103878800727D560680EF026FCF2 -:1031F00040BBB9F1000F2CD0FFF73CF80168C6F8CE -:10320000B4118188A6F8B811807986F8BA01FFF761 -:10321000A9FFDFF84C8308F12008C5F80C8062682C -:103220005AB196F8B40106F2B5111032FEF7A0FAC1 -:1032300010224146606817F0FDFD3878400712D52E -:10324000A06800E002E00EF0DBFB50B11020BDE80A -:10325000F08760680028F9D0E8606068C6F8B001BF -:10326000EBE7A06828610020F1E730B50546087853 -:103270000C4620F00F00401C20F0F00110312170AE -:103280000020607095F8220030B104280FD0052886 -:1032900011D0062814D0FFDF20780121B1EB101FD8 -:1032A00004D295F8200000F01F00607030BD21F0BE -:1032B000F000203002E021F0F00030302070EBE729 -:1032C00021F0F0004030F9E710B510B190F8A940B6 -:1032D00044B1A34890F8354000205CB1086010600C -:1032E000186010BD00F1A8040C6000F1D001F830A6 -:1032F0001160F5E79A4C34340C60F0E700B58BB000 -:103300000823CDE902128DF8013001919449002380 -:1033100064310591099301468DF8103068460BF031 -:10332000C0FF002800D0FFDF0BB000BD30B595B066 -:103330000C462C2518998DF80050ADF80200B3B159 -:103340001868019058680290ADF80C2010220DF119 -:103350000E0017F06FFD09A9684608F02AF9002849 -:1033600003D1A17F41F01001A17715B030BD00203D -:103370000190E8E72DE9F0470646008A8AB080B25E -:103380000D468146FEF74EF80446754F3078283FCB -:10339000DFF8CC814FF0000A122873D2DFE800F08A -:1033A00072E9350936777E98A8F3E7E6E5E4DF5B56 -:1033B000DFDFA07F00F00300012806D0002148468F -:1033C0000AF03BFB050003D101E00121F7E7FFDF35 -:1033D00098F85C10090602D5D8F860000BE00321CC -:1033E00005F121000DF09AFFD5F821005D49B0FBF1 -:1033F000F1F201FB1200C5F8210070686866B06840 -:10340000A8662078252800D0FFDFECE0A07F00F040 -:103410000300012806D0002148460AF00EFB0600F2 -:1034200003D101E00121F7E7FFDF7078810702D5C2 -:103430002178252904D040F0010070700AB006E719 -:103440000220287096F82000287106F121003136FC -:10345000C5E90206F2E7A07F00F00300012806D0CC -:10346000002148460AF0E9FA040003D101E00121F5 -:10347000F7E7FFDF6078C10605D5142028704134D6 -:103480006C60DBE7E2E140F008006070D6E73448AA -:10349000082128380DF042FF032016E02A208DF87D -:1034A000000010220DF10200716817F0C3FC102219 -:1034B0000DF11200B16817F0BDFC294968462C399E -:1034C00008F077F800B1FFDF042028706F60B5E7DF -:1034D000E07FC00600D5FFDFB0680090B388062209 -:1034E0000321484605F063F80028A7D0FFDFA5E7D1 -:1034F00004B9FFDF716821B1102204F1230017F035 -:1035000099FC28212046FDF7C5FFA07F00F00300AD -:1035100002280ED104F12300002300901A46214610 -:103520004846FFF703FF112807D029212046FDF761 -:10353000B1FF307A84F8200080E7A07F000700D533 -:10354000FFDF14F81E0F40F008002070A4F816A04A -:10355000C4F818A0C4F81CA0617808460AE034E05A -:103560005C02002040420F006CE19AE090E062E0D3 -:1035700009E03FE061F38200410861F3C30060703D -:10358000307AE0705AE7A07F00F00300012806D0EF -:10359000002148460AF051FA040003D101E001215C -:1035A000F7E7FFDF022104F175000DF0B7FE1120EF -:1035B000287004F5DA706860B4F875002882FD4858 -:1035C0006C346C61C5E9028038E7A07F00F003002D -:1035D000012805D0002148460AF02FFA18B901E069 -:1035E0000121F8E7FFDF0AB0324621464846BDE830 -:1035F000F0477BE504B9FFDF207821289CD930799A -:10360000012802D002280AD103E0E07F40F0100038 -:10361000E07798F85C1041F0010188F85C103246C0 -:1036200021464846FFF762FD0AB02046BDE8F04754 -:103630002321FDF72FBF327901230321484604F0EF -:10364000B7FD98B1122005F8040B327925F8042B48 -:10365000281DA91E0095CDE901100023032148462D -:1036600004F023FE00288DD0FFDFE7E6A07F00F006 -:103670000300012806D0002148460AF0DEF90400C4 -:1036800003D101E00121F7E7FFDF30792070D5E6B3 -:103690000321484605F02DF9002895D11320287004 -:1036A000CCE6A07F00F00300012806D000214846A8 -:1036B0000AF0C3F9050003D101E00121F7E7FFDFBC -:1036C00095F8740000F00300012878D1A07F00F085 -:1036D0000307E07FC0F3400616B1012F04D02BE0B2 -:1036E00095F89000C0072AD0D5F8AC0118B395F82A -:1036F0007320017C62F387010174E27FD5F8AC018D -:1037000062F341010174D5F8AC0166F30001017464 -:10371000AEB1D5F8AC01102204F12301783517F0D1 -:1037200089FB287E40F001002876287820F00100EF -:1037300005F8780900E016B1022F04D02CE095F8C6 -:103740007800C00726D0D5F8A80118B395F87320E3 -:10375000017C62F387010174E27FD5F8A80162F36E -:1037600041010174D5F8A80166F3000101748EB11E -:10377000D5F8A801102204F12301783517F05AFB7F -:10378000287840F0010005F8180B287820F0010097 -:1037900005F89009022F51D05FF0000000EB4000C7 -:1037A00005EBC00090F87800800708D5D5F8B02167 -:1037B00095F86C0005F16D011032FDF7D9FF052079 -:1037C00060F3070815F8740F00F0030060F30F288A -:1037D000287960F31748287F60F31F687548AC3874 -:1037E000027822F00F02921C22F0F00220320270C6 -:1037F000427822F00702D21C4270A0F80290C0F872 -:10380000188004F033F92078252805D0212807D026 -:10381000FFDF2078222803D922212046FDF73AFE37 -:10382000A07F00F0030001280AD0002148460AF0DA -:1038300016F900283FF40EAEFFDFFFE50120ADE7EB -:103840000121F3E7716881F801A0F7E5FFDFF5E5F5 -:1038500070B5584C0025103C14F85C0F20F0800027 -:10386000207065600BF0E7FC5249A1F1100004F0F4 -:103870008FF804F82C5C072060724E487C30206181 -:103880005030A0611030E06170BD70B50D46FDF79D -:10389000C9FD040000D1FFDF4FF4DE71284617F0A8 -:1038A00062FB44485430686104F123002861A07F22 -:1038B00000F00300012809D05FF0020105F59070C7 -:1038C0000BF0BAFC002800D0FFDF70BD0121F5E746 -:1038D0000A46014602F590700BF0CCBC70B5054667 -:1038E00040689AB0017808290DD00B2903D00C2923 -:1038F00036D101218171686886883046FDF792FDD6 -:10390000040035D133E046883046FDF78BFD0400D6 -:1039100000D1FFDF2078212822D0282822D1686812 -:1039200002210C3001F09CF9E0B168680821001D0B -:1039300001F096F9B0B12D208DF80000ADF80260CD -:10394000102204F1230101A817F074FA09A96846AE -:1039500007F02FFE00B1FFDF29212046FDF79AFD79 -:103960001AB070BD687840F008006870F8E7FFDFB3 -:10397000A07F00F00301022902D120F01000A077FF -:10398000207821280AD06868817909B1807898B1B7 -:10399000A07F00F0030002285BD0FFDFA07F00F0D3 -:1039A00003000228DCD1FDF76CFF0028D8D0FFDF30 -:1039B000D6E700006C020020687840F008006870CC -:1039C000E07FC10720D0800701D5062000E0052058 -:1039D00084F822002078292818D02428DED1314606 -:1039E00006200DF0A6FF22212046FDF753FDA07F03 -:1039F00000F0030001282AD0002130460AF02FF8F9 -:103A00000028CBD0FFDFC9E70420E1E7A07F00F06A -:103A10000300012806D0002130460AF00EF8050008 -:103A200003D101E00121F7E7FFDF25212046FDF763 -:103A300031FD10208DF8500014A905F590700BF0A1 -:103A400010FC0228AAD00028A8D0FFDFA6E7012199 -:103A5000D3E7687840F0080068709FE72DE9F047E9 -:103A60008CB01D46904689460646DDF850A0FDF70D -:103A7000D9FC040052D0207822284FD323284DD0DF -:103A8000E07FC0064AD4A07F00F00300012806D0E2 -:103A90000021304609F0D1FF070002D00BE00121E0 -:103AA000F7E7A07F00F00300012804D10121304690 -:103AB00009F0BAFF074601AB02AA03A93846FFF78F -:103AC00003FC039800B9FFDF4FB1039807F5907727 -:103AD00087612078222806D0242804D007E00399A3 -:103AE0000020886103E025212046FDF7D3FC0398E0 -:103AF0000C2141704662A0F80480C0F80890A0F83C -:103B000006A0C560029901610199416104A90BF009 -:103B1000C8FB022802D0002800D0FFDF0CB0BDE8AF -:103B2000F08730B589B00546FDF77CFC0178222985 -:103B300033D9807F00F00300012806D000212846F9 -:103B400009F07BFF040003D101E00121F7E7FFDF6B -:103B5000227801230321284604F02AFB00281CD0E8 -:103B600012208DF80C00227806A8811F05ABCDE944 -:103B700000310290ADF8102000230321284604F004 -:103B800094FB00B1FFDF03A904F590700BF069FB13 -:103B9000022802D0002800D0FFDF09B030BD10B5E8 -:103BA00086B00446FDF73EFC0178222919D9807FB2 -:103BB00000F00300012806D00021204609F03DFF57 -:103BC000040003D101E00121F7E7FFDF13208DF8A6 -:103BD0000000694604F590700BF043FB002800D00C -:103BE000FFDF06B010BD2DE9F05F05460C4600274B -:103BF0000078904601093E46BB4604F1080A0229B6 -:103C00007ED0072902D00A2909D141E068680178ED -:103C1000082905D00B292BD00C2929D0FFDFC5E1BD -:103C200014271C26002C6CD04088A080FDF7FAFBDE -:103C30005FEA000900D1FFDF99F81700524609F149 -:103C40001801FDF795FD68688089208269684868D9 -:103C5000C4F812008868C4F81600A07E20F00600A0 -:103C600040F00100A07699F81E0040F040014DE0C0 -:103C70001A270A26002CD6D08088A080FDF7D2FB18 -:103C8000050000D1FFDF51462846FFF7EEFA8DE12F -:103C90000CB1288DA080287E0E287CD006DC01285F -:103CA0007AD0022808D0032804D135E0102874D037 -:103CB000112873D0FFDF79E11E270926002CB2D02E -:103CC000A088FDF7AFFB5FEA000900D1FFDF287F86 -:103CD00000F003000128207A1BD020F001002072A0 -:103CE000297F890861F341002072297FC90861F3A7 -:103CF00082002072297F090961F3C300207201E06C -:103D000049E116E199F81E0040F0800189F81E1083 -:103D10004CE140F00100E2E713270D26002CAAD069 -:103D2000A088FDF77FFB8146807F00F0030001281B -:103D300006D00021A08809F080FE050003D101E033 -:103D40000121F7E7FFDF99F81E0000F00302012AC6 -:103D500059D0A86E817801F003010129217A54D04D -:103D600021F00101217283789B0863F341012172E4 -:103D70008378DB0863F38201217283781B0963F384 -:103D8000C3012172037863F306112172437863F350 -:103D9000C711217203E060E0A6E08EE09EE084F8A7 -:103DA00009B0C178A172012A32D04279E17A62F376 -:103DB0000001E1724279520862F34101E1724279F5 -:103DC000920862F38201E1724279D20862F3C30180 -:103DD000E1720279217B62F30001217302795208BA -:103DE00062F3410121730279920862F38201217327 -:103DF0000079C00860F3C301217399F800002328FB -:103E00005AD9262168E0686EA4E741F00101A9E7CC -:103E10000279E17A62F30001E1720279520862F3F9 -:103E20004101E1720279920862F38201E172027942 -:103E3000D20862F3C301E1724279217B62F300018F -:103E400021734279520862F3410121734279920849 -:103E500062F3820121734079CBE718271026002CEA -:103E600067D0A088FDF7DEFA8246807F00F003006D -:103E7000012807D00021A08809F0DFFD5FEA0009D2 -:103E800003D101E00121F6E7FFDFE869A06099F8BE -:103E9000010040F0040189F8011099F80200800740 -:103EA00008D5012020739AF8000023287ED9272105 -:103EB000504663E084F80CB078E015270F26C4B3B1 -:103EC000A088FDF7AFFA814606225146E86907F05F -:103ED000D6FB0120A073AEE048464FE01627092626 -:103EE0003CB3287F207261E0287FFE4902280CD075 -:103EF00019270E26ECB101280DD003281AD004286A -:103F00001BD0052819D0FFDF23E01B270926BCB3EF -:103F10000120207205E001202072607A20F0030069 -:103F2000607211F85C0F4208520062F306000870DC -:103F30000FE02BE00220207207E0697F052801F0E6 -:103F40000F0141F0800121721BD0607A20F0030044 -:103F50006072A088FDF766FA05460078212825D012 -:103F6000232800D0FFDFA87F00F00300012810D035 -:103F70000021A08809F073FD22212846FDF78AFA66 -:103F800014E0607A20F00300401CE1E7A8F800602C -:103F900011E00121EDE70CB16888A080287E03289C -:103FA0002BD004280AD005284BD0FFDFA8F80060EA -:103FB0000CB1278066800020BDE8F09F15270F26F2 -:103FC000002CE3D0A088FDF72DFA807F00F00300DD -:103FD000012806D00021A08809F02FFD050003D19B -:103FE00001E00121F7E7FFDFD5F821000622514665 -:103FF00007F045FB84F80EB0D8E717270926002CF8 -:10400000C4D0A088FDF70EFA8146807F00F003003F -:10401000012806D00021A08809F00FFD050003D17A -:1040200001E00121F7E7FFDFA878800701D5022032 -:1040300000E00120207299F800002328B6D927213A -:104040004AE719270E26002CA0D0A088FDF7EAF930 -:104050005FEA000900D1FFDFC4F808B0A4F80CB093 -:1040600084F808B0A07A40F00300A07299F81F10FD -:1040700061F38200A07299F81F1001EA510161F307 -:10408000C300A072687E00F0030001288ED1607A20 -:1040900040F00400607299F81E0000F0030001284F -:1040A00014D0E97E607B61F300006073AA7E217BFF -:1040B00062F300012173EA7E520862F341006073EB -:1040C000A87E400860F3410121736FE7E87E217B01 -:1040D00060F300012173AA7E607B62F300006073CD -:1040E000EA7E520862F341012173A97E490861F317 -:1040F000410060735AE730B504468079012591B0DC -:10410000B5EB901F00D0FFDFFFF72CF84FF6FF70E4 -:10411000099074488DF8015020300190201D0290C4 -:10412000601C0B900AA968460BF0BBF800B1FFDFDA -:104130000B980188A4F801108078E07011B030BDB0 -:1041400010B5684C30B10146102204F1200016F081 -:1041500071FE012084F8300010BD10B50446FFF751 -:1041600001F8604920461022BDE81040203116F0C9 -:1041700061BE70B55B4C06004FF0000514D00DF029 -:104180001BFC08B110250DE00621304607F05EFA51 -:10419000411C06D0206614F85C0F40F080002070AF -:1041A00000E00725284670BD14F85C0F20F0800061 -:1041B000F5E72DE9F041804688B00D460027084616 -:1041C0000DF045FCA8B94046FDF72CF9040003D0DA -:1041D0002078222815D104E043F2020008B0BDE89F -:1041E000F08145B9A07F010603D500F00300022845 -:1041F00001D01020F2E7A07FC10601D4010702D54B -:104200000DB10820EAE7374991F85C10C90701D0E1 -:104210001120E3E7E17FC90601D50D20DEE700F0BC -:104220000300022805D125B12846FEF7F1FE07005C -:10423000D4D1A07F00F00300012806D00021404621 -:1042400009F0FBFB060002D00CE00121F7E7A07F9C -:1042500000F0030001280BD00021404609F0E4FBE8 -:10426000060007D0A07F00F00300022804D009E078 -:104270000121F2E70420B1E725B12A463146204664 -:10428000FEF7EAFE07AB1A4669463046FFF71CF810 -:10429000009800B9FFDF00990D20487006F5907076 -:1042A000C1F82480486100200881A07F00F003004D -:1042B00001282BD0F5B302200871301D8861707879 -:1042C00040090877B078C0F340004877287800F0BC -:1042D0000102887F62F301008877E27F62F3820047 -:1042E000887701E05C020020E27F520862F3C3009D -:1042F0008877B27862F304108877A878C87701F1DC -:10430000210228462031FEF7C7FE22E00120087175 -:10431000287800F00102087E62F3010008762A780E -:10432000520862F3820008762A78920862F3C3008A -:10433000087600E009E02A78D20862F304100876D3 -:1043400024212046FDF7A6F80BE003200871052084 -:10435000087625212046FDF79DF8A07F20F08000FB -:10436000A07701A900980AF09CFF022801D000B1B3 -:10437000FFDF384632E72DE9FF4FF94A0D4699B085 -:104380009A4607CA14AB002783E807001998FDF77F -:1043900049F8060006D03078262806D008201DB03F -:1043A000BDE8F08F43F20200F9E7B07F00F00309A7 -:1043B000B9F1010F03D0B9F1020F07D008E03DB900 -:1043C0001B98FEF725FE0028E9D101E01B9878BB79 -:1043D000B07F00F00300012806D00021199809F0F1 -:1043E0002CFB040003D101E00121F7E7FFDF852D5D -:1043F00025D007DCD5B1812D1BD0822D1BD0832D7C -:1044000008D11AE0862D1CD0882D1CD0892D1CD0F7 -:104410008A2D1CD00F2020710F281AD001208DF872 -:104420003400201D0E902079A8B158E10020F2E759 -:104430000FE00120EFE70220EDE70320EBE7052086 -:10444000E9E70620E7E70820E5E70920E3E70A2097 -:10445000E1E70720A3E7B9F1010F17D0D4E919501C -:1044600080460220019001200090A87898F8021060 -:10447000C0F3C000C1F3C00108405FEA000B5DD08B -:1044800050460DF099FA00286CD12DE0D4E9198539 -:104490000120019002200090214630461B9AFEF731 -:1044A000DBFD1B98007800F00101A87861F30100A2 -:1044B000A870F17F61F38200A870F17F490861F371 -:1044C000C300A870A17861F30410A8706078400957 -:1044D0002870A078C0F3400068701B988078E8705E -:1044E000002068712871C0E7DAF80C000DF064FA5A -:1044F000C0BBDAF81C000DF05FFA98BBDAF80C00CC -:10450000A060DAF81C00E06098F80100A17800F0E3 -:10451000010041EA4000A07098F80210C0B2C1F357 -:104520000011891E0840A070002084F82000009926 -:1045300006F1170002290BD001210AE098F80110BA -:10454000A07801F00101FD2242EA41010840E2E7C2 -:10455000002104EB810188610199701C022902D0BD -:10456000012101E028E0002104EB81018861A878A5 -:1045700000F00300012849D198F8020000F0030080 -:10458000012843D1B9F1010F04D12A1D691D1B98DF -:10459000FEF782FD297998F8040001408DF82C106F -:1045A000687998F8052010408DF8300001432DD02F -:1045B00050460DF001FA08B11020F0E60AF11000A3 -:1045C00004F5D47104F17C020490B9F1020F3CD0DF -:1045D0000090CDE9012100210BAB5A462046FEF7A1 -:1045E000D5FD0028E9D104F5D67104F19402B9F1A2 -:1045F000010F30D004980090CDE9012100210CABCF -:104600005A462046FEF7C2FD0028D6D1A078800782 -:1046100040D4A87898F80210C0F38000C1F380015C -:10462000084337D0297898F8000014AAB9F1010F8F -:1046300017D032F810204B00DA4012F0030718D0E0 -:10464000012F1ED0022F12D11DE0CDF800A0CDE920 -:1046500001210121C0E7CDF800A0CDE90121012110 -:10466000CDE732F811204300DA4002F00307032FB0 -:1046700007D0BBF1000F0DD0012906D0042904D0CA -:1046800008E00227F5E70127F3E7012801D0042815 -:1046900000D10427F07F40F001006BF34100F07778 -:1046A000A07881074FF003000CD5A071BBF1000F7B -:1046B00015D100BF8DF85C0017AA31461998FEF796 -:1046C00034FD0CE00221022F18D0012F18D0042F46 -:1046D00022D00020A071F07F20F00100F07725218A -:1046E0003046FCF7D7FE0DA904F590700AF0B9FD2D -:1046F00010B1022800D0FFDF002050E6A171D9E7F9 -:10470000A1710D2104F1240016F02DFC607840F019 -:10471000020060700420CDE70120A071DFE72DE9E1 -:10472000F04387B0914688460446FCF77BFE0700BD -:1047300006D03878272806D0082007B0BDE8F083D7 -:1047400043F20200F9E7B87F00F00300012809D026 -:104750000021204609F071F9040006D104E00000B0 -:1047600008B301000121F4E7FFDFA679012E08D08C -:10477000B8F1000F0FD048460DF01EF9B8B1102067 -:10478000DBE7B9F1000F25D1B8F1000F09D0B8F17E -:10479000010F1FD120E0022E05D0032E05D0FFDF30 -:1047A00028E00C2526E0012524E0022522E0B8F1CE -:1047B000020F03D0B8F1010F0AD00BE0032E09D18C -:1047C00000251022494604F1210016F033FB11E0C8 -:1047D000022E01D00720B0E70025102104F12100AE -:1047E00016F09FFB5FEA090004D0062106F02EFFB9 -:1047F000C4F82100607840F002006070C10713D057 -:1048000020F00100607002208DF8000004F121000A -:1048100002908DF804506946FF300AF022FD02280C -:1048200004D018B1FFDF01E084F82050252138467C -:10483000FCF730FE002080E730B587B00D46044617 -:10484000FCF7F0FD88B1807F00F0030001280FD055 -:104850000021204609F0F1F804000ED028460DF0A2 -:10486000ABF838B1102007B030BD43F20200FAE7D0 -:104870000121EEE76078400701D40820F3E72946DC -:1048800004F141002022054616F0D4FA607840F089 -:104890001000607001070FD520F008006070142030 -:1048A0008DF80000694604F5907001950AF0D9FC76 -:1048B000022801D000B1FFDF0020D4E770B594B02A -:1048C0000D460646FCF7AEFD18B10178272944D104 -:1048D00003E043F2020014B070BD807F00F00300DB -:1048E000012806D00021304609F0A7F8040003D1C2 -:1048F00001E00121F7E7FFDFA07902282DD1A078A0 -:10490000C0072AD0002302220321304603F050FCC6 -:1049100028B30D208DF80D0007A80222811FADF8E5 -:10492000142006ABCDE900310C9604F5907402908A -:10493000089400230321304603F0B7FC00B1FFDFE9 -:1049400004208DF810008DF824500DA903A80AF05A -:10495000A8FC00B1FFDF0020BDE70820BBE7112065 -:10496000B9E770B5064686B014460D4608460DF008 -:1049700023F818B920460DF043F810B1102006B006 -:1049800070BDA6F57F40FF380DD03046FCF74AFDDC -:1049900030B14378811C22461846FCF7E9FE07E057 -:1049A00043F20200EBE72046FDF7F3FC0028E6D1D6 -:1049B0001021E01D0CF0B2FCE21D29466846FEF70E -:1049C0009DFC102204F11700019916F033FA002023 -:1049D000D5E72DE9F04104468CB0154688460027FE -:1049E00008460DF034F818B928460DF030F818B123 -:1049F00010200CB0BDE8F0812046FCF713FD060046 -:104A000003D03078272818D102E043F20200F0E703 -:104A1000B07F00F00300012806D00021204609F0F5 -:104A20000CF8040003D101E00121F7E7FFDF607813 -:104A3000400702D5A078800701D40820D9E7B07FCD -:104A400000F00300012818D0D4E91901407800B122 -:104A5000B5B1487810B1B8F1000F11D0C5B1EA1D59 -:104A600006A8E168FEF74AFC102205F11700079935 -:104A700016F0B4F930B104270AE0D4E91910E5E7DB -:104A80000720B6E71022E91D04F1310016F0D2F933 -:104A9000B8F1000F06D0102208F1070104F121003F -:104AA00016F0C8F9607840F002006070C10715D0B8 -:104AB00020F00100607002208DF8000004F1210058 -:104AC0000290103003908DF804706946EF300AF0C0 -:104AD000C8FB022804D018B1FFDF01E084F8207081 -:104AE00025213046FCF7D6FC002082E7F8B51546B4 -:104AF0000E460746FCF796FC040004D020782228D6 -:104B000004D00820F8BD43F20200F8BDA07F00F0F9 -:104B10000300022802D043F20500F8BD30460CF035 -:104B20004BFF18B928460CF047FF08B11020F8BD1C -:104B300000953288B31C21463846FEF7F7FB112852 -:104B400014D00028F3D1297C4A08E17F62F30001E8 -:104B5000E1772A7C62F34101E177297C890884F8B6 -:104B60002010A17F21F08001A177F8BDA17F090766 -:104B7000FBD4D6F80200C4F83600D6F80600C4F814 -:104B80003A003088A0861022294604F1230016F04E -:104B900051F9287C4108E07F61F38200E077297CAD -:104BA00061F3C300E077287C800884F82100A07FAF -:104BB00040F00800A0770020D3E770B594B00D4610 -:104BC00006460BB1072086E6FCF72CFC040007D054 -:104BD0002078222802D3A07F400604D408207AE659 -:104BE00043F2020077E6C5B12D208DF80000ADF844 -:104BF00002601022294601A816F01CF9287C410801 -:104C0000E07F61F30000E077297C61F34100E07709 -:104C1000287C800884F8200004E02E208DF8000015 -:104C2000ADF8026009A9684606F0C3FCA17F21F037 -:104C30004001A1774FE670B50D46FCF7F3FB040089 -:104C400005D028460CF0DCFE20B1102070BD43F2E8 -:104C5000020070BD29462046FEF707FB002070BD0C -:104C600005E000BF10F8012B0AB100207047491E73 -:104C700089B2F7D20120704770B50D4600780499CB -:104C80001446042803D0052832D0FFDF70BDA88B5E -:104C90000E2200EB400002EB400018803320088019 -:104CA000002CF3D0A88BA081002613E0A87F012858 -:104CB00014D006EBC60005EB400106EB460204EB00 -:104CC0004202088CD0811020223110320AF08AFB77 -:104CD000761CB6B2A089B042E8D870BD05EB86015B -:104CE00006EB460204EB4202088CD0810220EBE77F -:104CF000A88B102200EBC00002EB4000188034208B -:104D00000880A87F012808D0022806D0FFDF002CE9 -:104D1000E3D0A88BA081002613E0A073F7E7A87F5B -:104D2000012812D006EBC60005EB400104EB400061 -:104D30000A8C028210221230223116F07BF8761C87 -:104D4000B6B2A089B042EAD870BD05EB860106EB89 -:104D5000C602088C04EB4202223110820220123279 -:104D60000AF040FBEBE72DE9F04105780E20DDF875 -:104D700018C001F1200402F10E074FF00008022DC7 -:104D800006D0032D2DD0062D6AD0FFDFBDE8F081BF -:104D9000CD8B05EB850600EB460018803120ACF882 -:104DA0000000002AF2D0087F9581801FC6B214E06F -:104DB00061682088388031F8020BF88031F8020BE6 -:104DC0003881BA1C30460AF00DFB06B118B187F8DD -:104DD0000480A7F8028008340A376D1EADB2E7D20E -:104DE000D4E7CD8B05EB850600EB4600188032201A -:104DF000ACF80000002AC9D0087F9581401FC6B2D8 -:104E00002AE06168228811F8010BFA803A79430898 -:104E100060F3000263F34102830863F38202C30874 -:104E200063F3C302030963F30412430963F34512F6 -:104E3000830963F386123A71C009787131F8020B65 -:104E400038813A4630460AF0CDFA18B187F8028028 -:104E5000A7F8008008340A376D1EADB2D1D295E7AD -:104E6000087FCD8B801E86B206F1080068431030A3 -:104E700018803520ACF80000002A87D0958102F117 -:104E80001007D68107EBC5080BE020883880C7F8EB -:104E9000048032464046616815F0CCFF0834B044C7 -:104EA00008376D1EADB2F0D270E72DE9F0471D4610 -:104EB000089E0C4681462AB1607E00F58070D08045 -:104EC000E08B108199F800000E274FF000084FF09A -:104ED000100A0C287ED2DFE800F096061521293151 -:104EE0003F4E636B6B6B207F9146082802D00328EE -:104EF00000D0FFDF2F8030200BE000BFA9F80C802E -:104F0000BDE8F087207F9146042800D0FFDF2F8086 -:104F100031203080B9F1000FF0D1F1E7207F9146C8 -:104F2000042800D0FFDF2F803220F2E7207F914657 -:104F3000022800D0FFDF2F803320EAE7207F1746CA -:104F4000022800D0FFDF3420A5F800A03080002F19 -:104F5000D6D0A7F80C80D3E7207F1746042800D0CE -:104F6000FFDF3520A5F800A03080002FC8D04046D4 -:104F7000A7F80C8012E0207F1746052802D00628EB -:104F800000D0FFDF1220288036203080002FB7D0DD -:104F9000E08BB881A7F81080B9F80200F881AFE77C -:104FA000207F9146072800D0FFDF2F803720B0E711 -:104FB0004FF0140018804FF03800170030809FD059 -:104FC000E08BB881A7F8128099F80000092807D073 -:104FD0000A2800E017E009D00B280DD0FFDF8FE78B -:104FE000207F0C2800D0FFDF01200AE0207F0D2861 -:104FF00000D0FFDF042004E0207F0E2800D0FFDF78 -:105000000520B8737CE7FFDF7AE770B50C460546EC -:10501000FCF708FA20B10078222804D2082070BDDD -:1050200043F2020070BD0521284608F006FD20600D -:1050300008B1002070BD032070BDFFB585B00746E4 -:105040001720ADF80C00089814460D46022628B922 -:1050500008A93846FFF7D9FF00283ED15DB10023EB -:10506000BDF80C203146384603F0A2F8B8B30898D2 -:105070000078A0BB05E02078092822D00F282FD087 -:10508000FFDF002004A9CDE9001003460290BDF81F -:105090000C203146384603F008F900281DD1089845 -:1050A00003A9801DC4E901072046049A04F017FBF8 -:1050B00060B3072828D2DFE800F01E1C2727252030 -:1050C000220007260023BDF80C203146384603F0A5 -:1050D0006FF80028D5D143F2040009B0F0BD08E014 -:1050E0000023BDF80C203146384603F061F8002853 -:1050F000C7D11120F1E70020EFE70820EDE743F2E8 -:105100000300EAE70720E8E70320E6E704980090B9 -:10511000BDF80C3004223146384603F048FA002826 -:10512000DBD1002DD9D008990D70D6E710B588B025 -:105130001C46AAB104238DF800301388ADF80C305A -:105140005288ADF80E208A788DF812200988ADF8C3 -:10515000101000236A462146FFF76FFF08B010BD0C -:105160001020FBE72DE9F041074600780C46122895 -:1051700039D2DFE800F0383434141036090909094F -:10518000090909090909090904B9FFDF607840F034 -:105190000800607028E0002CF8D1FFDFF6E7B8883F -:1051A000052186B2304608F048FC054604B1FFDF11 -:1051B00005B9FFDF3146A81D04F08AFA02F0EEFAC5 -:1051C000040007D0607840F008006070668002F04C -:1051D000C3FA0AE013213046FDF704FB16E0FFDFB7 -:1051E00002E0FFDF00E0FFDF84B1607800070DD54B -:1051F0002078582220F00F00C01C20F0F0009030E2 -:105200002070394604F1180015F059FE0020BDE564 -:1052100000200870881D04F058BA0A460146901D07 -:1052200004F05CBA70B50546052108F006FC0400E0 -:1052300000D1FFDF2946A01DBDE8704004F048BA48 -:105240002DE9FE4F4FF00009ADF80890ADF804903D -:1052500047880C46054693460521384608F0EDFB85 -:10526000060000D1FFDF24B1A780A4F80690A4F8BF -:105270000890297E04F112003827C91E4FF001085A -:105280004FF0360A00900F2970D2DFE801F0F9FAEA -:105290006F6108AD6A70812CB6C9E59595003078CC -:1052A000012800D0FFDFA88B0E2101EBC001ADF873 -:1052B00004103021ADF80810002C13D0A08100207C -:1052C0000DE004EBC00132790A747288CA8105EBE3 -:1052D0008002401CD38B4B82128C8A8280B2A189BF -:1052E0008142EED8E8E03078012800D0FFDFE88B7B -:1052F0000E2101EBC001ADF804103021ADF808100B -:10530000297F091FC9B20091002CEBD0A081002792 -:105310001AE000BF05EBC70A04EBC70808F10E024C -:10532000DAF8241000980AF05DF818B188F81090A7 -:10533000A8F80E90BAF82010A8F81210BAF82210A7 -:105340007F1CA8F81410BFB2A089B842E2D8B3E01D -:1053500002A8009001AB224629463046FFF78CFC9C -:10536000AAE03078072806D0FFDF04E0A3E0307819 -:10537000072800D0FFDFE88BADF808A01230ADF8A9 -:105380000400002C38D0A98BA1817188E18123E031 -:105390003078082800D0FFDFA88B00F10E01ADF8AF -:1053A00004103721ADF80810002C25D0A081AA8B5D -:1053B00004F10E00296A4CE0E88B123080B23921EA -:1053C000ADF80400ADF80810F4B3A98BA181287ED4 -:1053D000102807D00221A173E98B2182EA8B296A68 -:1053E000009836E00121F6E702A8009001AB2246C2 -:1053F00029463046FFF7B7FC5EE03078092800D038 -:10540000FFDF1420ADF80400ADF808701CB3A98BC1 -:10541000A181A4F81290A4F8109084F80E804BE0BB -:1054200030780A2800D0FFDF288CADF808701430DF -:10543000ADF804007CB10421A173A98BA181E98B93 -:105440002182298C618200E032E02A8C04F1140070 -:10545000696A15F0EFFC2FE030780B2800D0FFDFF1 -:105460001420ADF80400ADF8087004B30521A17351 -:10547000A4F80C90A4F81090A4F812901CE000E09E -:1054800008E002A8009001AB224629463046FFF70B -:105490000CFD11E00D203A21ADF80400ADF8081024 -:1054A00034B1A4F80680A4F8089084F80C9003E0C6 -:1054B000ABF8000014E0FFDFBDF80400ABF800001B -:1054C00074B1BDF808002080BDF804006080287E1B -:1054D000032805D0102803D0112801D086F80090A9 -:1054E0000020BDE8FE8F2DE9F84356880F46804620 -:1054F00015460521304608F0A0FA040000D1FFDF70 -:10550000A41D33462A4639464046009404F064FA06 -:10551000BDE8F8832DE9F0438DB00D461446814671 -:1055200007A9FFF772FD002814D14FF6FF76012777 -:105530004FF420588CB103208DF800001020ADF8F6 -:10554000140008A802460690204605A909F069FF44 -:1055500078B107200DB0BDE8F0830820ADF80C50FD -:105560008DF812708DF80000ADF80E60ADF8108067 -:105570000CE00798A1780171218841808DF81270A4 -:10558000ADF80C50ADF81080ADF80E606A46012100 -:105590004846079BFFF751FDDCE708B501228DF86F -:1055A000022042F60202ADF800200A4602236946B4 -:1055B000FFF7BCFD08BD08B501228DF8022042F6B8 -:1055C0000302ADF800200A4603236946FFF7AEFD4B -:1055D00008BD00B587B079B102228DF800200A8895 -:1055E000ADF80C204988ADF80E1000236A4604215E -:1055F000FFF723FD07B000BD1020FBE709B106232C -:1056000094E50720704770B588B00D4614460646ED -:1056100007A9FFF7FAFC00280ED17CB10620ADF8EF -:105620000C508DF80000ADF80E40079B6A4607212C -:105630005C803046FFF701FD08B070BD05208DF895 -:105640000000ADF80C50F0E700B587B059B1072362 -:105650008DF80030ADF80C20049100236A46082133 -:10566000FFF7EBFCC6E71020C4E770B5002488B054 -:10567000172391B10A78062A20D2DFE802F01F042E -:10568000041503171523DB1E9DB2CB880BB18E6862 -:105690001EB1AB4203D90C20CEE71020CCE7042A80 -:1056A00004D08B8853B901E00620C5E7012A13D046 -:1056B000022A05D0042A1CD0052A2AD00720BBE7DD -:1056C00009228DF800204A88ADF80C20CA88ADF870 -:1056D0000E208968049123E00C228DF800204A886E -:1056E000ADF80C20CA88ADF80E2089680924049111 -:1056F00016E00D228DF800204A88ADF80C208A882B -:10570000ADF80E20CA88ADF8102089680A240591EA -:1057100006E00E228DF8002049788DF80C100B243D -:1057200000236A462146FFF788FC85E700B587B06D -:105730000F228DF80020ADF80C1000236A461946A0 -:10574000FFF77BFC56E700B587B071B102228DF8F8 -:1057500000200A88ADF80C204988ADF80E1000230F -:105760006A460521FFF769FC44E7102042E7000084 -:1057700018B1817801293CD101E0102070470188DF -:1057800042F60213C81A4FF48072994233D01CDCDF -:1057900042F60103A1EB030099422CD00CDCF9B1D5 -:1057A000B1F5C05F27D06FF4C050081823D0A0F522 -:1057B0007060FF381DD11EE001281CD002281AD0CD -:1057C000FF2818D0904214D115E0904213D008DC85 -:1057D000012810D002280ED0FE280CD0FF2808D1B6 -:1057E00009E0A0F58070013805D0012803D0022817 -:1057F00001D0002070470F2070470B2826D008DC0E -:105800001BD2DFE800F01C2025251A252923252797 -:105810001E0011281CD008DC0C2817D00D281DD024 -:105820000F2815D0102808D110E0822809D084282C -:1058300010D0852810D0872812D003207047002070 -:1058400070470520704743F20300704707207047F8 -:105850000F20704704207047062070470C207047C7 -:105860004FF45050704707280DD2DFE800F00406CF -:10587000040C0C080A000020704711207047072014 -:1058800070470820704703207047007810F00F021F -:1058900004D0012A05D0022A0CD110E0000909D158 -:1058A0000AE00009012807D0022805D0032803D008 -:1058B000042801D007207047087000207047062098 -:1058C000704705282AD2DFE800F003070F171F00F2 -:1058D000087820F0FF001EE0087820F00F00401C40 -:1058E00020F0F000103016E0087820F00F00401C87 -:1058F00020F0F00020300EE0087820F00F00401C6F -:1059000020F0F000303006E0087820F00F00401C56 -:1059100020F0F000403008700020704707207047EA -:1059200038B50C46050041D06946FFF7AEFF0028A8 -:1059300019D19DF80010607861F30200607069462B -:10594000681CFFF7A2FF00280DD19DF800106078B9 -:1059500061F3C5006070A978C1F34101012903D04A -:10596000022905D0072038BD217821F0200102E06E -:10597000217841F020012170410704D0A978C9089D -:1059800061F386106070607810F0380F07D0A97846 -:10599000090961F3C710607010F0380F02D1607808 -:1059A000400603D5207840F040002070002038BD2C -:1059B00070B504460020088015466068FFF7B0FF08 -:1059C000002816D12089A189884211D86068807882 -:1059D000C0070AD0B1F5007F0AD840F20120B1FB20 -:1059E000F0F200FB1210288007E0B1F5FF7F01D92B -:1059F0000C2070BD01F201212980002070BD10B57E -:105A00000478137864F3000313700478640864F373 -:105A1000410313700478A40864F3820313700478BC -:105A2000E40864F3C30313700478240964F30413D3 -:105A300013700478640964F34513137000788009C7 -:105A400060F38613137031B10878C10701D1800764 -:105A500001D5012000E0002060F3C713137010BDD2 -:105A60004278530702D002F0070306E012F0380F25 -:105A700002D0C2F3C20300E001234A7863F30202BA -:105A80004A70407810F0380F02D0C0F3C20005E031 -:105A9000430702D000F0070000E0012060F3C502D8 -:105AA0004A7070472DE9F04792B00D00804613D040 -:105AB000B8F1000F14D01221284615F032FA03AACB -:105AC000FF21012005F0D3FB0024264637464FF482 -:105AD00020596FF4205A6DE0102012B0BDE8F08715 -:105AE0000720FAE79DF8160001280AD1BDF8140036 -:105AF00048450BD010EB0A000AD001280CD0022830 -:105B00000CD0042C0ED0052C0FD10DE0012400E0A8 -:105B10000224BDF8126008E0032406E00424BDF866 -:105B2000127002E0052400E00624BDF81210414581 -:105B300040D12C7486B34FF007090DF134080EAA3A -:105B4000CDF80090CDE9012810230022FF21304636 -:105B500005F029FCF0B9BDF834002A46C0B20EA900 -:105B600009F040FCB0B9AE81B7B108AECDF80090F5 -:105B7000CDE9016813230022FF21384605F013FC0C -:105B800040B9BDF83400F11CC01EC0B22A1D09F096 -:105B900029FC10B10320A0E70AE0BDF82100E8814C -:105BA000062C05D19DF81600A872BDF814002881B6 -:105BB000002092E703A805F062FB002892D0FFF7CF -:105BC0001CFE8AE72DE9F0438BB00E46DDE9129802 -:105BD00005461C461746142103A815F0C4F90120F8 -:105BE0008DF810008DF80C008DF81180ADF8147050 -:105BF00064B1A178C90709D08DF81600E088ADF826 -:105C00001A00A088ADF81800A068079001F0C6FD42 -:105C1000040025D06580002009A9CDE900101722D5 -:105C2000034601460290ADF82020284602F03DFBD5 -:105C3000002812D108368DE8700008AA494603A84A -:105C4000099B04F042FE06466078000701D501F08A -:105C500083FD5EB13046FFF706FE0BB0BDE8F08372 -:105C600013212846FCF7BEFD0320F6E709980090B3 -:105C7000BDF8203004220021284602F098FCECE711 -:105C800070B506468AB000200D46059007240490A2 -:105C9000069003A900940790CDE901010246102364 -:105CA0002946304605F07FFB68B904A9009108A891 -:105CB000CDE90140BDF80C3000222946304605F000 -:105CC00081F9002801D0FFF798FD0AB070BD05F0FA -:105CD0003CB82DE9FC470546002700780C46B8463D -:105CE000B9460C2873D2DFE800F0B8060D2FCE5F5E -:105CF0005F7F96B49AA504B1FFDF288980B201F0D6 -:105D0000BFFEABE0A888042180B2814607F095FE73 -:105D1000064604B1FFDF06B9FFDF494606F1080079 -:105D200004F03CFA01F03AFD040008D0607840F03D -:105D300008006070A4F8029001F00EFD8FE01321BE -:105D40004846FCF74FFD9EE004B9FFDF6088042160 -:105D500007F073FE060000D1FFDFA6F800900020D8 -:105D600029791EE005EBC0029268D3B25FEA037C9A -:105D700007D5DB0605D505EBC10030F8020C3080F5 -:105D800007E0120A52060AD5307105EBC000C08840 -:105D900070806078022740F0080060705EE0401C70 -:105DA000C0B28142DED859E0E888ADF8000004B9FD -:105DB000FFDF9DF80100000604D52878062807D0EB -:105DC00005282AD0607840F00800607046E044E082 -:105DD0006088042107F031FE060000D1FFDF86F85D -:105DE0000490A888708018E004B9FFDF608804215F -:105DF00007F023FE060000D1FFDF06F1080004F0E3 -:105E0000F8FF90F0010F02D1E879000626D56088EE -:105E10000227F080D6E704B9FFDF0227D2E704B9F2 -:105E2000FFDF022761880122204601F06DFE4FF05E -:105E30000108C7E7A88986B204B1FFDF686800904F -:105E40002889ADF8040001226946304601F077FE4A -:105E500004E0002CB6D1FFDFB4E7FFDF9CB160782F -:105E6000000710D5B8F1000F0DD12078582220F08E -:105E70000F00001D20F0F00080302070294604F152 -:105E8000180015F01CF83846BDE8FC873EB50C003C -:105E900008D06B4601AA002105F0F2FA20B1FFF705 -:105EA000ACFC3EBD10203EBD00202080A0709DF8BF -:105EB000050002A900F00700FFF703FD50B99DF8A7 -:105EC000080020709DF8050002A9C0F3C200FFF78A -:105ED000F8FC08B103203EBD9DF8080060709DF8F5 -:105EE0000500C109A07861F30410A0709DF80510A9 -:105EF000890961F3C300A0709DF80410890601D5DB -:105F0000022100E0012161F342009DF8001061F3DD -:105F10000000A07000203EBD70B5144606460D4638 -:105F200051EA040005D075B108460BF087FD78B939 -:105F300001E0072070BD2946304605F0FCFA10B19B -:105F4000BDE8704059E454B120460BF077FD08B12C -:105F5000102070BD21463046BDE8704096E7002015 -:105F600070BD2DE9FE4F05460C46007E0A310091BA -:105F700004F108010027029190460C31821E3E4632 -:105F8000BB464FF0010A0191082A7CD2DFE802F0FB -:105F9000F7047B32327EBCF86888042107F04DFD9F -:105FA0005FEA000900D1FFDFB9F8000010B1522705 -:105FB0000726ECE051271026002C7CD06888A080B2 -:105FC00084F806A099F80400002205EBC0000099AF -:105FD000C08BFFF7A1FF00286ED199F8040005EBF4 -:105FE000C000C08B208199F8040005EBC000408CF4 -:105FF000E081E6E0B5F82290062822D1E87F00068D -:106000001FD5512709F1140086B2002CD5D0A88BDA -:1060100000220099FFF780FF002873D16888A080D4 -:106020000220A071A88B208184F80EA0288C2082E9 -:10603000A4F812904A46696ADDF8040014F0FAFEEA -:10604000BFE0502709F1120086B2002C33D0A88B94 -:1060500000220299FFF760FF002853D16888A080D2 -:10606000A88BE080287E06280ED002202073288C82 -:10607000E081E87F4A46C0096073A4F8109004F1FB -:106080001200696ADAE79BE00120EFE768880421E3 -:1060900007F0D3FCB5F822A05FEA000900D1FFDFCA -:1060A00009F1080004F0A5FE90F0010F02D1E87F8D -:1060B000000626D501E076E024E00AF1140051271D -:1060C00086B2002C70D06888A080A88B002200992E -:1060D000FFF722FF002815D10220A071A88B208194 -:1060E0000420A073288C2082A4F812A05246696A6A -:1060F000019814F09FFE89F804B0A98BA9F802104A -:106100005FE00320BDE8FE8F6888FBF78BF98246CD -:106110006888042107F091FC8146BAF1000F00D194 -:10612000FFDFB9F1000F00D1FFDFB9F80600A0F5DD -:106130007F41FF3902D05127142601E05027122653 -:106140008CB36888A080502F06D00220A071287FD1 -:10615000029901F016F934E0287FA11D01F011F930 -:106160009AF82210CDE9001BB9F8022068880023B4 -:106170004946FFF727FD0028C4D122E000E016E0E1 -:10618000FE49A88BC988814205D15427062654B1FF -:106190006888A08015E05327082624B16888A0806D -:1061A000A88BE0800DE0FFE7A8F800600EE055271F -:1061B0000726002CF8D0A88BA08084F806B000E059 -:1061C000FFDFA8F800600CB127806680002099E707 -:1061D000EA4900200870704730B587B00C4607F0D8 -:1061E000F5FB0546FF2800D1FFDF0020208020714D -:1061F00060804FF6FF70E080294604F1080003F04C -:10620000BFFF02AA2946012005F031F81AE000BFBD -:106210009DF80B00000715D5BDF80E002946FFF7C5 -:106220002FFD9DF80B00FF2340F010008DF80B00B0 -:10623000BDF80B00ADF80400BDF80E002946019A28 -:1062400005F047F902A805F01AF80028E0D007B0D9 -:1062500030BD0A46014602F1080003F0A5BF70B543 -:106260000546042107F0E9FB040000D1FFDF2946C1 -:1062700004F10800BDE8704003F090BF2DE9F04143 -:106280008AB00D468046FBF7CDF8060006D0307880 -:10629000222806D208200AB0BDE8F08143F20200AD -:1062A000F9E70421404607F0C8FB07460DB1A8886E -:1062B00078B101208DF8140002208DF81800002418 -:1062C0008DF819403DB1A888ADF8200028680790E6 -:1062D00004E00920DFE7ADF82040079401F05EFA02 -:1062E000050026D0A5F8028004A8CDE900041722F5 -:1062F0000023ADF80C2019464046029401F0D5FF6A -:106300000028C8D107F108000095CDE9018096F872 -:10631000221003AA05A8049B04F0D7FA0446687863 -:10632000000701D501F018FA4CB12046FFF79BFA9F -:10633000B1E713214046FCF755FA0320ABE7049878 -:106340000090BDF80C3004220021404602F02FF9E5 -:106350004FF6FF71F9809EE72DE9FF5F83460E9EA1 -:106360009846914677888A463846FBF75BF805469B -:106370000421384607F061FB044605B9FFDF04B984 -:10638000FFDF0834CDE90274CDE9008695F82210CC -:106390004B465246584603F037FF04B0BDE8F09F25 -:1063A0002DE9F04F99B004464FF000087348ADF85E -:1063B0004C80ADF82480ADF84880A0F80480ADF89A -:1063C0000C80ADF81080ADF81880ADF8148000781E -:1063D00016460D464746012809D0022807D0032853 -:1063E00005D0042803D0082019B0BDE8F08F20465E -:1063F0000BF0E2FAD0BB28460BF0DEFAB0BB6068C7 -:106400000BF025FB90BB606848B160892189884208 -:1064100002D8B1F5007F01D90C20E5E7804608AA33 -:1064200004A92846FFF7C4FA0028DDD168688078FF -:10643000C0F34100022808D19DF8110010F0380F78 -:1064400003D028690BF0FAFA80B903A92069FFF795 -:1064500067FA0028C8D1206950B1607880079DF89C -:106460000D0000F0380002D5E8B301E011E0D0BB28 -:106470009DF80C0080060ED59DF80D0010F0380F29 -:1064800003D060680BF0DAFA18B960680BF0DFFA35 -:1064900008B11020A8E705A96069FFF741FA0028B4 -:1064A000A2D1606940B19DF8150000F007010129F3 -:1064B0003BD110F0380F38D006A9A069FFF730FAA9 -:1064C000002891D19DF8140080062ED49DF8180064 -:1064D00080062AD4A06950B19DF8190000F0070188 -:1064E000012922D100E020E010F0380F1DD0E06833 -:1064F00018B10078C8B11C2817D20CAA611C20461C -:10650000FFF77DFA0120B94660F30F27BA46074628 -:106510008DF8460042F60300ADF844000DF1330259 -:1065200015A9286808F07DFF08B107205CE79DF8F1 -:10653000540014A9CDF80090C01CCDE9019100F0E1 -:10654000FF0B00230BF20122514611A804F0D7FDE6 -:10655000E8BBBDF850000B9008492A892869091D3D -:106560000092CDE901016B89BDF8202028680499CB -:1065700004F0C5FD01007CD1207801E05803002023 -:10658000C1064FF0020A01D480062BD5ADF81C904D -:10659000606950B905A904A8FFF762FA9DF81500D3 -:1065A00020F00700401C8DF815009DF814008DF8B0 -:1065B000467040F0C8008DF8140042F60210ADF8A5 -:1065C000440009A907AA0023CDF800A000E01CE0C0 -:1065D000CDE9012140F2032211A8059904F08FFDB5 -:1065E000010046D1F8484D464FF007098088ADF8C4 -:1065F00031000CA9CDE900195B4600220295FF216C -:10660000BDF8500004F0DEFC10B1FFF7F6F8EBE641 -:106610009DF83000000625D52946012060F30F21A2 -:106620008DF846704FF42450ADF84400ADF8285072 -:1066300062789DF82800002362F300008DF828009E -:106640006278520862F341008DF828000AAACDF85A -:1066500000A0CDE9012540F2032211A804F04FFD6E -:10666000010006D1606850B3206970B903A904A87D -:1066700000E07DE0FFF7F4F96078800705D49DF82D -:106680000D0020F038008DF80D008DF8467042F6B0 -:106690000110ADF84400208940F20121B0FBF1F275 -:1066A00001FB1202606812ABCDF80080CDE9010356 -:1066B000002311A8039904F022FD010058D120788D -:1066C000C00729D0ADF81C50A06950B906A904A88C -:1066D000FFF7C6F99DF8190020F00700401C8DF85F -:1066E00019009DF818008DF8467040F040008DF8B4 -:1066F000180042F60310ADF8440013A907AACDF81C -:1067000000A0CDE90121002340F2032211A806993F -:1067100004F0F5FC01002BD1E06868B329460120A4 -:1067200060F30F218DF8467042F60410ADF8440076 -:10673000E068002302788DF8582040788DF85900E1 -:10674000E06816AA4088ADF85A00E06800798DF834 -:106750005C00E068C088ADF85D00CDF80090CDE940 -:1067600001254FF4027211A804F0C9FC010003D006 -:106770000B9800F019FE37E693480321017056B1DB -:1067800080883080BDF848007080BDF82400B0805B -:10679000BDF84C00F080002026E670B501258AB0D7 -:1067A00016460B46012802D0022816D104E08DF8C7 -:1067B0000E504FF4205003E08DF80E5042F60100C9 -:1067C000ADF80C0063B10024601C60F30F2404AA30 -:1067D00008A9184608F025FE20B107200AB070BDB0 -:1067E0001020FBE704A99DF820207748CDE900217F -:1067F000801C02900023214603A802F2012204F02B -:106800007EFC10B1FEF7F9FFE8E76F480EB1418852 -:10681000318005700020E1E770B594B00446012690 -:106820008DF83E6041F60100ADF83C0012AA0FA9B8 -:106830003046FFF7B2FF002848D12078624CC007ED -:106840004FF0000544D01C2102A814F08CFB9DF8E9 -:1068500008008DF83E6040F020008DF8080042F6F8 -:106860000520ADF83C000E959DF83A00119520F0FA -:106870000600801C8DF83A009DF838006A4620F02A -:10688000FF008DF838009DF8390009A920F0FF00BD -:106890008DF839000420ADF82C00ADF830000EA8BA -:1068A0000A9011A80D900FA80990ADF82E5002A8DB -:1068B000FFF776FD002809D1BDF80000E080BDF8A3 -:1068C00004002081401C60812570002014B070BD40 -:1068D000E5802581BDF84800F4E72DE9F74F8B46A8 -:1068E000394900269EB00A78012A04D0022A02D033 -:1068F000082021B079E54A88824201D00620F8E7D5 -:1069000089465A4501D10720F3E701214FF00008DD -:106910008DF86610ADF8401042464FF6FF71531CDB -:1069200063F30F220492ADF84210ADF84A10FF2035 -:1069300042F6020A8DF86A801AAA8DF84800ADF86E -:1069400064A0ADF868801192CDF84C8010A804F0D6 -:10695000BDFC0024254627460BAA072110A804F0F9 -:10696000B8FC78B1822857D184B37DB3ADF85C40D0 -:106970009DF85600ADF85E508DF80C8017AC0128DC -:106980005ED065E09DF832000FB3012853D1BDF809 -:10699000301051451DD116AA07A907208DE8070020 -:1069A000BDF82E0010230022FF2104F0FCFC98BB50 -:1069B000BDF85800042801D0062847D1BDF81C10A6 -:1069C000594538D10F2094E75803002036E00128BC -:1069D00031D1BDF83000B0F5205F03D042F601019F -:1069E000884228D1B9F80210BDF82E00814201D1A9 -:1069F000012700E0002704B17DB158451BD116AB3B -:106A000007AA07218DE80E00044610230022FF216B -:106A100004F0C9FC00B902E02DE035460BE0BDF8FA -:106A20005800022801D0102810D1C0B215AA07A919 -:106A300008F0D8FC50B9BDF82E608DE7052058E766 -:106A400003A915A8221D08F0ECFC08B1032050E7AB -:106A50009DF80C000023001DC2B220988DF80C2078 -:106A60000092CDE9014019A8049904F048FB10B93F -:106A7000022289F80020FEF7C0FE3AE710B50B4667 -:106A8000401E86B084B203AA00211846FEF7B7FF65 -:106A900004AA072103A88DE8070001230022FF2193 -:106AA000204604F08FFA0446BDF81000012800D0FB -:106AB000FFDF2046FEF7A1FE06B010BDF0B5FC4F8B -:106AC000044687B038780E46032804D0042802D044 -:106AD000082007B0F0BD04AA03A92046FEF768FF0E -:106AE0000500F6D160688078C0F3410002280AD121 -:106AF0009DF80D0010F0380F05D020690AF09EFFB8 -:106B000008B11020E5E7208905AA21698DE8070072 -:106B10006389BDF810202068039904F0F0FA10B1E1 -:106B2000FEF76BFED5E716B1BDF8140030800420E7 -:106B300038702846CDE738B50C00054609D000234B -:106B40006A46FF2104F09CFC28B100BFFEF755FE09 -:106B500038BD102038BD69462046FEF7E1FE00280A -:106B6000F8D1A078FF2100F001032846009A04F034 -:106B7000B0FCEBE77FB5144603AA07250292CDE9E6 -:106B800000350A462388FF2104F01CFABDF80C10DA -:106B90002180FEF732FE04B070BD2DE9F04192B0C5 -:106BA0004FF000050C000746ADF8105019D0E06812 -:106BB00028B1A068A8B10188ADF81010058038464A -:106BC000FAF730FC88B1007822286AD3384606F0FC -:106BD000FDFE80460421384606F02FFF060008D14E -:106BE00006E0102012B0BDE8F08143F20200F9E7A0 -:106BF000FFDFA078012803D0022801D00720F1E7A9 -:106C0000208838B1401C80B206AA414604F02FFB10 -:106C100038BB02E043F20300E4E706A804F02FFBD0 -:106C20009DF822204FF45051012A09D1BDF82020AF -:106C3000A2F52453023B03D1822801D088B901E098 -:106C40000846CFE7E06898B1072204A9CDE9000221 -:106C50000291A2882088BDF81030FF2104F0B2F91B -:106C600010B1FEF7CAFDBDE7A168BDF810000880AD -:106C70009DF81B00C00602D543F20140B2E70A9816 -:106C800018B1BDF82400022801D00320AAE717227A -:106C90000A98ADF80C20A1780078012903D080076C -:106CA00010D408209EE7C007FBD0002307213846F8 -:106CB00001F07EFA18B14FF00708022005E043F218 -:106CC00004008FE74FF0010803208DF83000208882 -:106CD000ADF834000BA8CDE9000500230295BDF8FE -:106CE0000C204146384601F0E0FA002887D1CDE972 -:106CF00000570836029603AA07210CA80B9B03F045 -:106D0000E4FD10B1FEF7AFFD6CE70B980090BDF805 -:106D10000C3004224146384601F049FC62E770B568 -:106D2000064615460C460846FEF722FD002805D10A -:106D30002A4621463046BDE870402EE570BDCCE5C0 -:106D400070B51E4614460D0009D044B1616831B1DA -:106D500038B157494988814203D0072070BD1020BF -:106D600070BD2068FEF704FD0028F9D132462146A7 -:106D70002846BDE87040FFF713BB70B515460C0000 -:106D800006D038B14A498988814203D0072070BDB6 -:106D9000102070BD2068FEF7EBFC0028F9D12946D1 -:106DA0002046BDE8704089E670B5054686B00E46BF -:106DB000144610460AF024FEF0BB60680AF047FE55 -:106DC000D0BBA5F57F40FF3803D02846FAF72AFB51 -:106DD000A0B1284606F0FAFD054630466946FEF7A2 -:106DE00061FE00280CD19DF810100F20082936D222 -:106DF000DFE801F008060606060A0A0843F2020068 -:106E000006B070BD0320FBE79DF80210012908D1F0 -:106E1000BDF80010B1F5C05FF2D06FF4C052D1429E -:106E2000EED09DF80610012905D1BDF80410A1F59A -:106E300028510529E4D900E022E09DF80A10012933 -:106E40000ED1BDF80810B1F5245FD9D0A1F52451B9 -:106E50000239D5D00129D3D0022901D1D0E7FFDFF3 -:106E6000606878B9002305AA2946304604F008FB7B -:106E700010B1FEF7C2FCC3E79DF81400800601D4F0 -:106E80001020BDE76188224630466368FFF772FE36 -:106E9000B6E72DE9F043074685B08946144610460B -:106EA0000AF0AEFD30B1102005B0BDE8F08300005F -:106EB00058030020384606F089FD4FF6FF76054658 -:106EC000B74201D0FF2D0AD00146002304AA48464C -:106ED00004F0D6FA30B100BFFEF78FFCE4E743F2CE -:106EE0000200E1E79DF81000C00602D543F2014020 -:106EF000DAE74FF0070803A90027CDF80080CDE9B5 -:106F00000171628833462946484604F04CFA06006F -:106F100012D160680AF074FD58B96068CDF800803D -:106F2000CDE90107238862882946484604F03BFAE8 -:106F30000646BDF80C0020803046CDE739B1FD4B48 -:106F40000A881B899A4202D843F20300704724E65C -:106F500010B586B0F74C0423ADF81430E3883BB18C -:106F600024898C4201D2914204D943F20300A3E563 -:106F70000620A1E5ADF81010002100910191ADF8B7 -:106F8000003002218DF8021005A9029104A9039195 -:106F9000ADF812206946FFF700FE8DE52DE9FC47AC -:106FA00081460F4608460AF007FDD0BB4846FAF76F -:106FB00039FA5FEA000811D098F80000222832D38D -:106FC000002317221946484601F0F2F850B1042177 -:106FD000484606F032FD060007D105E043F2020004 -:106FE000BDE8FC871120FBE7FFDF06F1080003F096 -:106FF000F1F805463878012803D0022804D007208C -:10700000EEE7A8070FD502E015F0340F0BD0B879E2 -:107010003C1DC00709D0E08838B1A0680AF0CCFC5C -:1070200018B11020DCE70820DAE73A782088002140 -:1070300028B3A0F201130721112B18D20CD2DFE8DC -:1070400003F00B090D0B1D0B121D100B0B1D1D1D4D -:107050001D0B1D00022A11D10846C1E7012AFBD0F1 -:107060000CE0EA0600E0AA06002AF5DA06E0A0F540 -:10707000C0721F2A02D97D3A022AEDD8C1B298F80F -:107080002200CDE900017288234631464846FEF7CA -:1070900099FDA5E72DE9FF4F89B01E4615460C4620 -:1070A0004FF000080F460998FAF7BCF930B10078A4 -:1070B000222806D208200DB0BDE8F08F43F202006E -:1070C000F9E7B00801D00720F5E7032E00D100262C -:1070D000099806F07BFC83464FF6FF7ACCB1022D6F -:1070E0006AD320460AF0B3FC30B904EB0509A9F1D4 -:1070F00001000AF0ACFC08B11020DCE7AD1EAAB21A -:107100002146504604F0CCFA39F8021C884253D18B -:10711000ADB28848B10702D50189491C00E00121C0 -:107120001FFA81F9F10701D0068900E0564603AA4B -:107130005946484604F09BF84FF0070A0BE0788860 -:10714000102839D808F1040108441FFA80F8A8452E -:1071500032D804EB08078FB339884945EFD34DE0A7 -:107160009DF80F100A0749D54CB304EB080908F144 -:107170000402B9F8023097B2102B1DD8DA19AA42CE -:107180001AD8B9F80020904216D1C80618D5E119CE -:10719000CDE9001A08AA0292B9F800000022594667 -:1071A00003F010FF10B1FEF728FB84E7B9F80200E6 -:1071B000BDF82010884203D00B207CE71EE005E0DC -:1071C000B9F8020038441FFA80F806E0C90604D571 -:1071D0005946FEF755FD00288FD19DF80F00FF237B -:1071E00020F010008DF80F00BDF80F00ADF8000082 -:1071F000BDF812005946009A04F06BF903A804F098 -:107200003EF818B9BDF81200B042A9D90421099876 -:1072100006F013FC040000D1FFDF22885AB10025DC -:10722000CDE900A52B4621460998FEF7CBFC0028A6 -:10723000BBD125803FE700203DE72DE9F04F89B025 -:107240001E4617000D464FF000041BD0B10802D0B7 -:10725000072009B030E7032E00D1002606F0B6FB68 -:107260008046FF2805D07DB128460AF0E7FB48B9E3 -:1072700002E043F20200ECE73988681E08440AF095 -:10728000DDFB08B11020E4E72A49B00701D54889A1 -:1072900000E00120F2074FF6FF7902D04989491E2C -:1072A00000E049468EB204AA414603F0E0FF4FF0E9 -:1072B000070A0DF10C0B33E09DF8131009072FD5C9 -:1072C0000023CDE900A3CDF808B04B46002241468B -:1072D00004F069F8E8B9F5B1BDF80C103A8821441A -:1072E0002819091D8A4231D3BDF8162020F8022B37 -:1072F000BDF80C2020F8022BCDE900A0CDF808B095 -:10730000BDF81600BDF80C300022414604F04BF8E1 -:1073100008B103209DE7BDF80C002044001D84B295 -:1073200004A803F0ACFF38B1822809D0FEF765FA53 -:107330008FE7000058030020BDF81600B042BBD90B -:1073400034B175B13988A01C814203D20C2080E78A -:1073500005207EE722462946484604F0A1F929196E -:107360000880A41C3C80002073E710B504460AF096 -:1073700047FB08B1102010BD114840892080002033 -:1073800010BD70B50C4605460E21204613F0C9FD10 -:10739000002020802DB1012D01D0FFDF70BD06201F -:1073A00000E00520A07170BD10B50C4603F02EFF63 -:1073B00000B1FFDF2046BDE81040FEF71EBA000016 -:1073C000580300204FF0E0224FF400410020C2F8A3 -:1073D000801120490870204990020860704730B53C -:1073E0001C4D04462878A04218BF002C02D000286B -:1073F00018BFFFDF2878A04208BF30BD2C701749A6 -:10740000154A0020ECB1164DDFF858C0131F012CAF -:107410000DD0022C1CBFFFDF30BD086003200860C8 -:10742000CCF800504FF400001060186030BD0860C8 -:1074300002200860CCF800504FF0407010601860D7 -:1074400030BD086008604FF06070106030BD00B55E -:10745000FFDF00BD1600002008F5014000F50040E8 -:107460006403002014F5004010B50446007894B081 -:10747000022805D0012803D043F2050014B010BD46 -:10748000A07828B1032803D8607808B1032801D96F -:107490000720F3E73F208DF800002078022801D074 -:1074A000012000E000208DF80200607800F095FDDA -:1074B000C01D8DF80300A078012800D1022000F043 -:1074C0008CFD8DF80400607800F087FD8DF80500D4 -:1074D000A07800F082FD8DF806002078012804D104 -:1074E0009DF80300401C8DF8030009A9684604F0CC -:1074F00060F800B1FFDF0020C0E72DE9FF4F8DB03D -:10750000FA49DDE91AB90600D1E902010396CDE98D -:107510000901507A117A9A4608441546C7B20DD02F -:107520000024F01D20F00700B04200D0FFDF2888C3 -:107530000399401C1FFA80F814B107E00124F0E71A -:1075400008F0FF0007F0F4FE00B1FFDF03993A46B0 -:1075500001EB0810C01C20F00301D5F81080039146 -:107560003CB9002008701FFA88F003F0F2FC00B16B -:10757000FFDF0399234601EB08000390A87A297ADC -:107580003A460844C1B203A800F071FD0398C01C3C -:1075900020F003000390697A00912B7AAA7A04B153 -:1075A000002001A906F025F900B1FFDFBDF80410A5 -:1075B0000398CDE900B90844C01C20F003001C99D1 -:1075C000CDE902103A4604B10020534605A906F061 -:1075D0009BFA00B1FFDFBDF8141003980844C01DEA -:1075E00020F007000E99821B03900A60002C35D111 -:1075F000C04ABF491160111D401E086001232C22A2 -:107600000BA9BD4806F076F800F0F1FC00211E221F -:10761000084602F053F8FAF72FFE00F034FFFEF7A9 -:10762000D7FD09AB00220521B4A0FBF7ECFA00B1AD -:10763000FFDF05F10C00FFF7EFF800B1FFDF4FF4BB -:107640007F71B04813F08FFCAE48012180F8F91328 -:10765000022180F8FA13062180F8FB1311B0BDE86F -:10766000F08F10B5A74CA078092800D3FFDF207851 -:10767000C0EBC00004EB001010F8041F21F0FF0164 -:107680000170417821F00701C91C21F018014170F7 -:107690000121E17010BD2DE9F04105460C4600279F -:1076A0000078052190463E46B1EB101F00D0FFDF69 -:1076B000287E58B1012810D0FFDF00BFA8F8006075 -:1076C0000CB1278066800020BDE8F08102270926E2 -:1076D0007CB1A88BA080A87F09E00327142644B1C1 -:1076E0006888A080286AE060A88C2082287F2072A9 -:1076F000E4E7A8F80060E6E700B5017895B001F08E -:1077000001018DF80210417801F001018DF803109C -:107710000178C1F340018DF804104178C1F34001B4 -:107720008DF80510017889088DF8061041788908D0 -:107730008DF8071081788DF80810C1788DF8091040 -:1077400000798DF80A003E208DF8000009A96846EE -:1077500003F02FFF15B000BD70B56A4CE07800282B -:107760001BD020780025C0EBC00004EB001040794E -:1077700000F00700011991F8F803401E81F8F803A2 -:107780002078401CC0B22070092800D12570A07854 -:10779000401CA07009F0B1FCE57070BD594890F82C -:1077A000FB03002800D05CE770472DE9F043554DFE -:1077B0009BB00026D5F8F40368B1FFF7EFFF00286F -:1077C00075D07022D5F8F41313F079FBFFF7C4FFDE -:1077D000C5F8F463EEE795F8F903002867D0FFF7E2 -:1077E00040FF0446444805F0B6FF606000B9FFDF83 -:1077F000606803F029FF88B12046FAF7B8F860788E -:10780000010706D520F00700401C6070FFF7A4FFB9 -:10781000D0E73948616805F0A7FFCBE736486168D3 -:1078200005F0A2FF01A800F05BFC00286CD1032149 -:10783000BDF8040006F001F98046BDF8040006F02A -:1078400062FA0746B8F1000F00D1FFDFD8F8040054 -:1078500010B10078FF2857D0FFF703FF04463846E1 -:10786000211D05F0B0FE00B9FFDFD4F8049089F8BF -:107870000060BDF804006080204600F0EAFE384653 -:1078800005F0CDFE00B9FFDF3B208DF81000BDF8FC -:107890000400ADF8120004A805F050FB0EA804F097 -:1078A0003CF96078010703D4C00607D409E02BE057 -:1078B00020F00700801C6070FFF74EFFC8F80490AE -:1078C00078E7D8F8040038B10178491C11F0FF01BD -:1078D00001709DD1FFDF6DE700221146384600F0B0 -:1078E0007AFB002894D1FFDF64E7000014B30100A5 -:1078F0000000002000060240B40700206E5246350A -:1079000078000000B80300201BB0BDE8F08310B57C -:10791000FC4CA0600868E060AFF2711001F031FE2D -:10792000607010BDF74900200870704730B50546FB -:107930004FF080500C46D0F8A41095B0491C05D1EA -:10794000D0F8A810C9430904090C08D050F8A01FAA -:1079500001F0010129704168216080680EE02B2050 -:107960008DF8000009A9684603F023FE00B1FFDF8F -:10797000012028700A982060BDF82C00A08028788B -:10798000002803D0607940F0C000607115B030BDB0 -:10799000F0B54FF080540746D4F8800095B00D46FE -:1079A0002B26401C0BD1D4F88400401C07D1D4F8FE -:1079B0008800401C03D1D4F88C00401C0BD0D4F8B4 -:1079C00080003860D4F884007860D4F88800B8600B -:1079D000D4F88C0016E08DF82C6069460BA803F0F3 -:1079E000E8FD00B1FFDF01983860029878608DF8FB -:1079F0002C6069460BA803F0DCFD00B1FFDF0198A5 -:107A0000B8600298F860D4F89000401C0BD1D4F80C -:107A10009400401C07D1D4F89800401C03D1D4F83E -:107A20009C00401C08D054F8900F28606068686083 -:107A3000A068A860E06816E08DF8006009A96846B3 -:107A400003F0B7FD00B1FFDF0A9828600B9868606B -:107A50008DF8006009A9684603F0ABFD00B1FFDFB7 -:107A60000A98A8600B98E86015B0F0BD30B5A64C38 -:107A70000546D4F8F40300B1FFDFC4F8F45330BD79 -:107A80003EB50546032105F0D8FF0446284606F01A -:107A90003AF9054604B9FFDF606818B10078FF289D -:107AA00000D1FFDF01AA6946284600F094FA60B9C8 -:107AB000FFDF0AE0002202A9284600F08CFA00B994 -:107AC000FFDF9DF8080000B1FFDF9DF80000411EB8 -:107AD0008DF80010EED260680199884201D1002033 -:107AE0006060894C94F8FA03022800D3FFDF94F811 -:107AF000FA03401CC0B284F8FA03012803D181487C -:107B0000407801F05DFD3EBD70B50446A1F57F40B3 -:107B100016460D46FF3800D1FFDF012E01D0FFDFF2 -:107B200070BD207820F00F00401D20F0F000503094 -:107B3000207000202076A5830120A07770BD70B54D -:107B400015460C460646FFF729FE90B1017821F054 -:107B50000F01491D21F0F0015031017046800121D3 -:107B6000017621680162A18881840577BDE87040B3 -:107B7000F2E53046BDE870401321FAF733BE70B528 -:107B800005460C46084609F03BFF08B1102070BDC1 -:107B90002846F9F747FC28B1284600F09DFE2070E2 -:107BA000002070BD43F2020070BD2DE9F04F87B098 -:107BB00005460020059053488946017811B10820F8 -:107BC00007B04CE54F4851494160284609F018FF7D -:107BD000002868D1484609F013FF002863D16F7A66 -:107BE0002B7AF818FF2870D82888FE286DD800B99D -:107BF0000A202880296909B94FF4B06129616A68AF -:107C0000B2B15478907804EB440420441478167987 -:107C100004EB440400EB44005479D27804EB4404B0 -:107C200006EB4606344402EB420204EB420406E053 -:107C300007EB470003EB430200EB42042046C7EB8F -:107C4000C7021044C3EBC3021044184486B206EBCB -:107C5000C60000EB400A04EBC40000EB40000090BB -:107C6000D82901D20920ABE7A87AB8422DD84FF025 -:107C70001208082F0DD8012B0BD807F0C4FC0746BB -:107C800009F0FAF93A1A297A687A521E0B189A42C0 -:107C900001DA404694E76F6883468846BFB13846AC -:107CA00009F0D5FE08B110208AE7B9787878014448 -:107CB00038780A180BEB0800904206D179793A79A6 -:107CC0001144FA781144884201D0072078E70098DF -:107CD0001FFA8AF387B20097CDE901642A4603A907 -:107CE0000020FFF70AFCDFF81C800399D9F8002078 -:107CF000D8F80400014491420AD90420C9F80010C0 -:107D00005EE7000018000020B80300208812002061 -:107D10000097CDE901641FFA8AF32A4604A9FFF708 -:107D2000ECFBDDE90301884200D0FFDF0498D8F8BE -:107D300004100844C8F80400C9F80000FF490120F5 -:107D400088F80000087005983AE72DE9F0470746E3 -:107D50000C46084609F054FE40B9384609F06EFE5C -:107D600020B9F81C20F00300B84202D01020BDE872 -:107D7000F087F3484FF00008817899B14178824646 -:107D8000C1EBC10100EB0115B4F8009015F8040F28 -:107D9000234600F00F000022294600F0F0F906000B -:107DA00004D013E0A4F800800520E0E797B1218813 -:107DB000494501D90C260DE02878234600F00F0034 -:107DC0003A46294600F0DBF9060005D00C2E01D01A -:107DD000A4F800803046CAE79AF801005446401CD7 -:107DE000C0B28AF80100092801D184F80180A07886 -:107DF000401EA070687800F0070101290BD002290D -:107E000003D0032918D0FFDFE4E7C006E2D4688876 -:107E1000FFF736FEDEE7CB48696805F0A5FC94F86D -:107E2000F903401CC0B284F8F9030128D2D1C64836 -:107E3000407801F0C5FBCDE794F8FB03401C8AF8BD -:107E4000FB03C7E770B50D46044609F0B5FD18B948 -:107E5000284609F0D5FD08B1102070BD29462046FE -:107E6000BDE8704007F09BBA70B5044615460E4653 -:107E7000084609F0A1FD18B9284609F0C1FD08B16E -:107E8000102070BD022C03D0102C01D0092070BD31 -:107E90002A463146204607F0A5FA0028F7D00520EB -:107EA00070BD70B514460D46064609F085FD38B91B -:107EB000284609F0A5FD18B9204609F0BFFD08B114 -:107EC000102070BD22462946304607F0AAFA002845 -:107ED000F7D0072070BD10B594B0044609F090FDAE -:107EE00010B1102014B010BD0F208DF8000009A9AA -:107EF000684603F05EFB0028F4D19DF82C0020704A -:107F0000BDF82E006080BDF83000A0800020E9E7B9 -:107F100070B505460C46084609F090FD20B93CB105 -:107F2000206809F06DFD08B1102070BDA08828B14F -:107F300021462846BDE87040FEF7A0B9092070BD73 -:107F400070B504460D46084609F036FD30B9601E8E -:107F50001E2814D8284609F02FFD08B1102070BD46 -:107F6000022C01D9072070BD04B9FFDF774800EB70 -:107F7000840050F8041C2846BDE870400847A4F16E -:107F800020001F28EED829462046BDE87040FAF7A9 -:107F9000BCB870B504460D46084609F031FD30B94D -:107FA000601E1E280DD8284609F006FD08B11020D5 -:107FB00070BD012C01D0022C01D1062070BD07201C -:107FC00070BDA4F120001F28F9D829462046BDE83D -:107FD0007040FAF709B905F099B9032803D00228CF -:107FE00003D001207047062070470320704710B56A -:107FF00094B003F0CFFA54484178806803F0C0FC95 -:10800000514801240C300178012916D130218DF816 -:108010000010C0788DF8020010B1012803D005E0EF -:108020008DF8024002E000208DF80200684604F05E -:1080300085FF10B109A803F070FD02208DF824001F -:108040008DF825008DF8260009A8FFF70DFA00B17C -:10805000FFDF8DF8244003208DF825008DF82600E1 -:1080600009A8FFF701FA002800D0FFDF3AE72DE961 -:10807000F0410646022012B101EB4200401DC7B29A -:108080003068C01C20F0030232601BBB2C483B460A -:108090000A21283809F081FB002408E00A2C11D2BB -:1080A000DFE804F005070509090B0B05050528485D -:1080B00004E0284802E0284800E0284809F08CFB4A -:1080C000054600E0FFDFA54200D0FFDF641CE4B2FC -:1080D0000A2CE3D3306800EB07103060BDE8F08174 -:1080E0002DE9F04395B081463A208DF82C00694681 -:1080F0000BA803F05EFA00B1FFDF43F20406002490 -:108100006D46DFF83C8032E02F19B87DC10706D0FC -:10811000400704D405EB4400C08800F0CEFB98F87B -:10812000FA0310B3B87D80071FD505EB4400C08863 -:1081300000F055FAC8B105EB440011E0080000203A -:10814000B8030020B40700201800002014B3010079 -:10815000391F0000F7840000E12F0000E9F0000063 -:10816000C188A9F80010002605E0641CE4B29DF85F -:108170000400A042C8D815B03046BDE8F0832DE910 -:10818000F041044600201880601E1D4616460F462A -:10819000052800D3FFDF05482A4600EB840031465E -:1081A00050F8043C3846BDE8F041184724B30100BC -:1081B0002DE9F0478A46984615460646032105F004 -:1081C0003CFC0446304605F0B0FD0C35AFB200254E -:1081D00081462E4604B9FFDFB9F1000F00D1FFDF61 -:1081E00004EB8A000189B94200D30125218CB942F0 -:1081F00002D2BAF1060F00D3012638EA050104D0F5 -:10820000817A41F0020181720BE038EA060108D060 -:10821000817A41F00401817214F8220F40F00400C9 -:10822000207005EA0600BDE8F0872DE9F047824698 -:10823000DDE90854174605F10C0099460E461FFA71 -:1082400080F800232A4639465046FFF7B1FF60B157 -:10825000B07800061BD424F8045C24F8029C504635 -:1082600005F063FD040008D106E0072F01D01120BE -:10827000D9E743F20400D6E7FFDF2D1D2046A9B25F -:1082800004F047FF00B9FFDF504603F0E5FA06EBC4 -:108290008700062F0289A2EB0801018103D2318CED -:1082A000A1EB080030840020BDE72DE9F04385B044 -:1082B0001E46DDE90D5491460F46DDF8308005F08D -:1082C00034FD60B309F10402694692B204F0BBFECA -:1082D00050B300980770BDF80800042800D2FFDFF3 -:1082E000002701983A46394607808770019803F0C5 -:1082F00075FB1EB1BDF80800001F3080B8F1000FFB -:1083000003D00198C01DC8F8000015B1BDF81000D9 -:1083100028808CB1288870B1039820600CE043F26B -:10832000020005B0BDE8F083072F01D01120F8E767 -:1083300043F20400F5E727600020F2E72DE9F04F53 -:108340000F46054687B016465088032105F075FB99 -:10835000040000D1FFDF4FF000098DF80C90A078E9 -:10836000400600D1FFDF042F53D3297841F30000EA -:10837000401C06D162786B789A424AD12278120763 -:1083800047D04FF0010B4FF00208142939DA4FF6AD -:10839000FF7A012933D0122902D0132931D11CE0F0 -:1083A0000C2F2ED1A17801F07F01012929D020784E -:1083B00020F00F00401C2070687860708DF80CB0C1 -:1083C000A888ADF80E00E888ADF810002889ADF84F -:1083D00012006889ADF8140016E0062F11D120783C -:1083E00020F00F0020707188012009F0A2FA8DF8AA -:1083F0000C80ADF80EA0A888ADF8100004E0062FA0 -:108400000AD09DF80C10B9B17088324603A9F9F76B -:1084100018FE07B0BDE8F08F207820F00F00207024 -:108420007188012009F085FA8DF80C80A888ADF8D4 -:108430000E00ADF810A0E7E70028EAD0768806A87D -:10844000CDE9000927464C46002306220421304688 -:10845000CDF80890FFF729FF00B1FFDF069805234C -:10846000042280F800B069784170A0F8028084800E -:108470000621CDE9001039463046FFF7D6FE002828 -:10848000C7D0FFDFC5E70020FE49024621F81020D3 -:10849000401C0828FAD3704770B50C46897821F043 -:1084A000FF01A170217821F00F012170012161707D -:1084B0000021616005F039FC050000D1FFDF28468E -:1084C00004F0BFFDF53820852046BDE8704000F07F -:1084D00010BB70B50D46032105F0AFFA040000D1C2 -:1084E000FFDFA07865F30600A07070BD70470146FD -:1084F000012009F01EBA3EB58DB20321284605F0D1 -:108500009CFA040000D1FFDF2078002220F00F0049 -:10851000207002208DF800004FF6FF70ADF80200C9 -:10852000ADF8040069462846F9F78BFD3EBD2DE9FC -:10853000F04705460C4600784FF0000901219246AD -:108540004F46B1EB101F00D0FFDF287E032809D073 -:10855000FFDF00BFAAF8007014B1A4F80090678094 -:10856000002060E6AE8B4FF0700906F10A0087B27A -:10857000D4B16888A080688B2081E680A889A9682A -:10858000001F80B28046024604F10A00C91D12F0A5 -:1085900051FC4645DED904EB0800A6EB08020A3080 -:1085A000296912F047FCD5E7AAF80070D8E72DE951 -:1085B000FC410F461C46164680460321089D05F0E7 -:1085C0003CFA010008D033463A464046CDE9004522 -:1085D000FFF72BFEBDE8FC8143F20200FAE770B51D -:1085E0000546A0F57F4086B0FF3811D0284605F03B -:1085F0008AFB040000D1FFDF2046694604F0E3FF58 -:1086000000B9FFDF019CB4F80500E41C052802D086 -:10861000012006B070BD2E460321284605F00DFA54 -:10862000050000D1FFDF2079122807D120880C280F -:1086300004D1A87800F07F00022806D0002306228B -:1086400004213046FFF7B4FDE3E7002306220521AD -:10865000F7E7F8B5024680689489938A30F8031FDB -:108660001C444588241F8C421ED1042D1DD0052D8D -:1086700029D0062D1ED0402D16D30E46144628466E -:1086800000F0D7F908280FD0207820F00F00401C08 -:1086900020F0F00010302070032020766583A68340 -:1086A000607840F008006070F8BDBDE8F840001D3B -:1086B00000F0CBB90093548813690A46011D204687 -:1086C000FBF7CCF9F8BDBDE8F840001D36E67FB5F4 -:1086D0000D460646032105F0B0F904003DD0207890 -:1086E00000F00F0001283BD0002003A9CDE90010C5 -:1086F000034602900C2205213046FFF7D6FD0028E4 -:1087000029D1039812210523017061781A46891C2A -:10871000417008214180298881806988C180A988A9 -:108720000181E98841810C21CDE9001021463046C4 -:10873000FFF77BFD00B1FFDFF0230022314601206F -:1087400009F05AF8207820F00F00401C2070607863 -:10875000801C6070002004B070BD43F20200FAE794 -:108760001120F8E77FB50D460646032105F065F9AF -:10877000040006D0207800F00F00012804D0082063 -:10878000E9E743F20200E6E7002003A9CDE9001083 -:1087900003460290062205213046FFF786FD002899 -:1087A000D9D103981321052301706178417002210A -:1087B000418085800621CDE900101A4621463046C9 -:1087C000FFF733FD00B1FFDF207820F00F002070AD -:1087D0000020C0E72DE9F84F0F468346032105F03E -:1087E0002CF90546584605F0A0FA80464FF0000ADD -:1087F00005B9FFDFB8F1000F56D1FFDF54E0404666 -:108800006946002204F082FD9DF800408146082C54 -:1088100000D3FFDF05EB840609F108003189062C3F -:108820000144318102D2298C08442884072C03D1C9 -:108830000AF1010000F0FF0AB07AC0070CD021460F -:10884000284600F0DDF838B9B07A032C20F001009A -:10885000B07258462ED0FFDFB07A810706D520F0DF -:108860000200B0722146584600F0DAF8062C1BD8F8 -:1088700095F82200410717D520F0040085F8220062 -:10888000002401E0E407002005EB8401887A420718 -:1088900006D520F0040088722146584600F0C0F842 -:1088A000641CE4B2062CECD37F1EFFB2A7D2504664 -:1088B000BDE8F88FFBF773F9CEE710B5032105F09B -:1088C000BCF8040000D1FFDF204600F012F9A078C8 -:1088D00040F08000A07010BD10B5032105F0ADF888 -:1088E000040000D1FFDF208D2321B0FBF1F0C0B2E6 -:1088F00010BD70B50D46032105F09FF8040000D1AE -:10890000FFDF062D00D9FFDF2946204600F078F86A -:10891000002805D004EB85018A7A42F001028A72B0 -:1089200070BD10B50446402801D2072010BD00F0EC -:1089300080F8082802D04FF4445010BD0021774839 -:1089400002E0491C082903D230F81120002AF8D18E -:10895000082903D020F81140002010BD042010BDCC -:1089600010B5402801D2072010BD00F062F8082899 -:1089700005D06A4A002122F81010084610BD0520D3 -:1089800010BD70B588B015460C00064606D02DB156 -:108990006088402804D2072008B070BD1020FBE793 -:1089A000218849B300F045F8082827D003AA06A972 -:1089B00005A88DE80700228804AB07213046FFF7A1 -:1089C00074FC0028E8D1BDF810202946059812F063 -:1089D00031FA2088BDF81010884204D9421A29447F -:1089E000039812F027FA05980090238862880721DF -:1089F0003046FFF7DCFDCFE70C20CDE70520CBE7C5 -:108A0000072903D0464A32F8112000E0028D00EB1E -:108A100081000089904201D20120704700207047F8 -:108A200010B5032901D0FFDF10BDBDE81040FBF7F2 -:108A300078B801460020394A02E0401C082803D2D9 -:108A400032F810308B42F8D170472DE9F0410F46D3 -:108A50008046014686B014463846FCF744FDC0B255 -:108A600008283CD10025ADF81450039560880321F7 -:108A700004F0E3FF060000D1FFDF00213046FFF7DE -:108A8000BFFF68B91722ADF8142003A8CDE900058F -:108A90000295002360881946FFF707FC00B1FFDF4D -:108AA000009405AA41463846039BFDF755FCC0B229 -:108AB00005281CD2DFE800F0031B13161300BDF8D5 -:108AC000140000280BD003990423CDE9000160882D -:108AD00000223146FFF7A9FB002800D0FFDF06B0D7 -:108AE000BDE8F081607840F010006070F7E7FFDFCC -:108AF000F5E710B504462021083012F034FA084892 -:108B0000002100BF30F8112004EB8103491C1A81B9 -:108B10000629F7D9208DA08410BD0000E4070020AD -:108B20003CB3010030B44FF0E02001234FF4006C5F -:108B30000021C0F880C11D02C0F880511C06C0F899 -:108B40008041E54A82F80014D21E82F80014E34AFC -:108B500082F80014E24A53609360C2F84011C2F8F0 -:108B60004411C2F84811C0F880C2C0F88052C0F861 -:108B70008042C0F800C1C0F80041136030BC7047AB -:108B800070B401204FF0E023C6024FF0000CC3F890 -:108B900080610402C3F880410506C3F88051D04AC1 -:108BA00050609060CF4801680029FCD1C2F840C1F4 -:108BB000C2F844C1C2F848C1C3F88062C3F8804219 -:108BC000C3F8805270BC70474FF0E0204FF4006152 -:108BD000C0F88012C910C0F880127047002804BF86 -:108BE000C1487047012804BFC0487047022804BF2D -:108BF000BF48704700B5FFDF002000BD08B5B84989 -:108C0000002298B101282FD002281CBFFFDF08BD29 -:108C10004FF48020C1F80803C1F84803B54802604A -:108C2000C1F84821B2480068009008BD4FF4803078 -:108C3000C1F80803C1F84803AF4B1A60C1F84021DE -:108C4000AE4BC1031960AE49C1F808034FF0E023F1 -:108C50000012C3F88001AB480260C1F84021C1F89E -:108C60000022A948027008BD4FF40030C1F8080383 -:108C7000C1F84803A5480260C1F844219B48006838 -:108C8000009008BD70B5DFF858C204260024012505 -:108C900058B1012840D002281CBFFFDF70BD9C4A9C -:108CA0004FF48020012B3CD144E0881E20F07F410E -:108CB0004FF48030CCF80803CCF84041CCF84403A2 -:108CC000CCF84015012B14BF002101218E4B5970A7 -:108CD0008B490D61DFF83CC2CCF800408E4C4FF060 -:108CE000020CC4F800C0DFF834C2CCF80060DFF832 -:108CF00014C23D32CCF80020C1F800524FF0E02CF5 -:108D00008A15CCF88022C1F80403CCF800210804AD -:108D1000834908601D7070BD824A4FF40030012BFA -:108D200008D0CCF80803C2F84041CCF84403C2F89C -:108D3000401570BDC2F84041CCF80403CCF84403A0 -:108D4000C2F8401570BD67480068704770B5764836 -:108D50000568774975480860614CD4F840010026E1 -:108D600001280AD1D4F8080310F4803F05D04FF44D -:108D70008030C4F80803C4F84061D4F844010128E5 -:108D80000DD1D4F8080310F4003F08D04FF40030A0 -:108D9000C4F80803C4F84461012007F0BEFBD4F80E -:108DA000480101280DD1D4F8080310F4802F08D011 -:108DB0004FF48020C4F80803C4F84861022007F08B -:108DC000ACFB5C48056070BD574810B50468584955 -:108DD000564808604C490878002808BF03201AD07C -:108DE000464A4FF000401060454AC00BC2F80803E5 -:108DF00003124FF0E02C0020CCF88031414B18607A -:108E0000C2F84001C2F8000208704A78002A1CBF6C -:108E10004870002001D007F080FB4648046010BD78 -:108E20004FF0E0214FF08070C1F8000270474FF022 -:108E3000E0214FF08070C1F8800270474FF0E021D0 -:108E40004FF40010C1F8000270474FF0E0214FF4DA -:108E50000010C1F8800270472949012008614FF0D5 -:108E6000E0210002C1F880027047410A43F609522E -:108E70005143C0F3080010FB02F000F5807001EBD5 -:108E800050207047430B48F2376C03FB0CF31B0C6C -:108E90004FEA432CC1F800C0DFF89CC003FB0C0371 -:108EA00026484CF2F72C5843400D10FB0CFC0CEB01 -:108EB000432303F580735B1213700A681044086043 -:108EC0007047194810B5046819491848086007F038 -:108ED00011FC1848046010BD0BE000E018E000E051 -:108EE00000B0004004B500404081004044B1004063 -:108EF00048B1004048B5004040B5004008F5014089 -:108F000000800040408500402800002044B500401B -:108F100008B00040048500400885004010850040EE -:108F200004F5014004B000401005024001000001BA -:108F30001805024014050240F7C2FFFF6F0C010044 -:108F400010B5EFF3108000F0010472B6EC484178E0 -:108F5000491C41704078012801D108F0EDF8002C3F -:108F600000D162B610BD70B5E54CE07848B9012576 -:108F7000E570FFF7E5FF08F0E7F820B1002008F002 -:108F8000C3F8002070BD4FF080406571C0F80453F5 -:108F9000F7E770B5EFF3108000F0010572B6D84C1A -:108FA000607800B9FFDF6078401E6070607808B9B3 -:108FB00008F0C6F8002D00D162B670BDD04810B5DB -:108FC000C17821B100214171C170FFF7E2FF00209B -:108FD00010BD10B5044608F0B7F8C949C978084073 -:108FE00000D001202060002010BD2DE9F05FDFF8E7 -:108FF00010934278817889F80620002589F80710B7 -:10900000064689F8085000782F4620B101280FD075 -:1090100002280FD0FFDF08F0A4F898B108F0A8F8F4 -:10902000A8420FD1284608F0A7F80028FAD047E058 -:109030000125F0E7FFF784FF08F086F80028FBD051 -:109040000225E8E701208407E060C4F80471AD4917 -:109050000D600107D1F84412AA4AC1F3423124320B -:109060001160A8494FF0020B34310860C4F804B312 -:10907000A060DFF894A2DAF80010C94341F30011B0 -:1090800001F10108DAF8001041F01001CAF80010EF -:1090900000E020BFD4F804010028FAD0284608F0E8 -:1090A0006BF80028FAD0B8F1000F05D1DAF80010FB -:1090B00021F01001CAF80010C4F808B3C4F8047114 -:1090C00099F807004C4670B1307860B908F03CF868 -:1090D000064608F027FA6FF0004116B1C4E9031004 -:1090E00001E0C4E9030115B12771BDE8F09F01203B -:1090F0002071BDE8F05F00F0E1B810B5040000D1C8 -:10910000FFDF4FF080414FF0FF30C1F8080300222D -:10911000C1F80021C1F80421C1F80C21C1F81021C7 -:1091200008F018F828B176490120C8704878401C2A -:1091300048702046BDE8104057E72DE9F041012571 -:10914000AF077D616E4CE079F0B1012803D0217A40 -:10915000401E814218DA07F0F7FF064608F0E2F9F0 -:10916000E179012902D9217A491C21720EB12169C4 -:1091700000E0E168411A022902DA11F1020F0EDC67 -:109180000EB1206100E0E060FFF7DAFE07F0DCFFDF -:1091900010B13D61A57000E0257000202072BDE88F -:1091A000F0812DE9F05F5948D0F800B0574A58498E -:1091B000083211608406D4F8080110B14FF001089C -:1091C00001E04FF00008D4F8000100B10120814611 -:1091D000D4F8040108B1012600E00026D4F80C01FF -:1091E00000B101208246D4F8100108B1012700E047 -:1091F000002748EA090126EA010020EA0A00B843EC -:1092000000D0FFDF0025B8F1000F04D0C4F80851EA -:10921000012007F079FFDFF8E880B9F1000F13D0E3 -:10922000C4F8005198F8050020B188F805500020D6 -:1092300007F06AFF98F8000030B107F085FF18B119 -:10924000012088F8020020610EB1C4F80451BAF17F -:10925000000F0AD0C4F80C5198F80200464600B935 -:10926000FFDFB5703570FFF794FE37B1C4F81051C9 -:1092700098F8040008B1FFF760FF2449091DC1F800 -:1092800000B032E770B51E4DE87808B907F058FF16 -:1092900001208407A061A87858B100BFD4F80C0160 -:1092A00020B9002007F068FF0028F7D10020C4F89B -:1092B0000C014FF0FF30C4F8080370BD2DE9F041F8 -:1092C0001926B507C5F808630124AC610020C5F86C -:1092D0000001C5F80C01C5F8100107F035FF084F73 -:1092E00010B1BC702C6100E03C70FFF729FE05490D -:1092F000B87920310860C5F804636C614FE700005D -:109300002C0000201805004010ED00E01005024080 -:109310000100000110B50D2000F06FF8C4B26FF02D -:10932000040000F06AF8C0B2844200D0FFDF3A497E -:109330000120086010BD70B50D2000F048F8374CD2 -:109340000020C4F800010125C4F804530D2000F0EA -:1093500049F825604FF0E0216014C1F8000170BDAC -:1093600010B50D2000F033F82C4801214160002198 -:10937000C0F80011BDE810400D2000F033B82848B7 -:1093800010B5046826492748083108602349D1F8F8 -:109390000001012804D0FFDF2148001D046010BD3A -:1093A0001D48001D00680022C0B2C1F8002107F06E -:1093B000D4FFF1E710B51948D0F800110029FBD00F -:1093C000FFF7DDFFBDE810400D2000F00BB800F006 -:1093D0001F02012191404009800000F1E020C0F807 -:1093E0008011704700F01F02012191404009800068 -:1093F00000F1E020C0F880127047002806DA00F083 -:109400000F0000F1E02090F8140D03E000F1E020DF -:1094100090F800044009704704D5004000D0004097 -:10942000100502400100000110B5202000F075F881 -:10943000202000F07DF84449202081F800044349B1 -:1094400000060860091D42480860F7F75BFF3F49C6 -:10945000C83108603F48D0F8041341F00101C0F85A -:109460000413D0F8041341F08071C0F80413364996 -:1094700001201C39C1F8000110BD10B5202000F0FA -:109480004CF8324800210160001D01602F4A481E3F -:10949000E83A10602F4AC2F808032C4BC833196011 -:1094A000C2F80001C2F860012B490860BDE8104015 -:1094B000202000F03DB825492848EC390860704765 -:1094C00022492648E8390860704770B51F4A80690C -:1094D000E83A224911601F49D1F800610023204D6C -:1094E0001D4A5C1E1EB1A84206D300210FE0D1F830 -:1094F000606186B1A84209D2C1F80031C1F860317B -:109500001460BDE87040202000F012B81168BDE87A -:10951000704011F05ABDFFDF70BD00F01F02012145 -:1095200091404009800000F1E020C0F880117047B0 -:1095300000F01F02012191404009800000F1E0206D -:10954000C0F880127047000020E000E000060240F2 -:1095500084120020000002400004024001000001CB -:1095600000C001004FF0E0214FF00070C1F8800111 -:10957000C1F88002384B802283F80024C1F8000132 -:10958000704700B502460420344903E001EBC003F4 -:109590001B792BB1401EC0B2F8D2FFDFFF2000BD07 -:1095A00041F8302001EBC00100224A718A7101228A -:1095B0000A7100BD294A002102EBC0000171704709 -:1095C00010B50446042800D3FFDF244800EBC40490 -:1095D0002079012800D0FFDF6079A179401CC0B25A -:1095E000814200D060714FF0E0214FF00070C1F86F -:1095F000000210BD2DE9F0411948056818491948C5 -:10960000083108601448042690F80004134F4009FC -:10961000154C042818D0FFDF16E0217807EBC100B5 -:109620000279012A08D1427983799A4204D0427999 -:10963000827157F8310080472078401CC0B22070FA -:10964000042801D300202070761EF6B2E5D204482B -:10965000001D0560BDE8F08119E000E0F40700207E -:109660001005024001000001400000200F4A12686E -:109670000D498A420CD118470C4A12680A4B9A428B -:1096800006D101B507F022FFFFF715FFBDE8014045 -:10969000074909680958084706480749054A064B1B -:1096A0007047000000000000BEBAFECA980000200B -:1096B000040000208811002088110020F84B586019 -:1096C00019721A80C90011F04EBC00210180704748 -:1096D0004FF6FF720280032008F02BB970472DE986 -:1096E000F04F0E46017804464FF0010A0AFA01F0E5 -:1096F00047F2FF1100EA01086168154697B0088833 -:10970000A0F57F42FF3A06D0B8F1000F07D047F22C -:10971000FE12104203D0012017B0BDE8F08F40EADE -:10972000080008804FF00009A5B185F80090237863 -:109730000027052003220221DFF864B3102B75D225 -:10974000DFE803F0740D131C2F4A515A31A5A1759F -:10975000A9F1F0EF20780B28E9D00420DCE729708C -:10976000A089A5F8010032801DE104212970A1899A -:10977000A5F80110E189A5F8031082E00620287001 -:10978000A089A5F80100E089A5F80300208AA5F8C2 -:109790000500A28AE81DA16911F04CFBA08AC01D3A -:1097A0006FE0082129702178082901D11021297042 -:1097B000A189A5F80110E189A5F8031030806A1D80 -:1097C000694604F1100005F02CFE00287ED1308897 -:1097D0009DF80010084454E00A202870A089A5F8DC -:1097E00001003280AAE00C212970A189A5F801109E -:1097F000E189A5F80310B7E0A2890AEB420081B223 -:109800003088884262D3052960D30E20287000205A -:1098100008E0236905EB400C33F81030401CACF82D -:10982000013080B29042F4D33180BCE0CAE09BF8B2 -:1098300009005A46002873D0401E5072227BDBF884 -:109840000400236900EBC205AA882868D3F800C089 -:109850000244A2F1080042F808CC5A6842608DF830 -:1098600000108DF8019028680290A888ADF80400D7 -:1098700000216846FBF776FCA5F80490002E01D085 -:10988000484630808FE0287840F0800129702878A1 -:1098900040F040012970287820F03F0012302870F5 -:1098A000A189A5F80110E289E81C216911F0C2FA2A -:1098B000E089C01C3080287841063FD5000672D56B -:1098C0008DF800A08DF80190308800E026E0001DA2 -:1098D000ADF804000295E189E81C08440390001DDE -:1098E00004909BF808008DF8140000216846FBF7EF -:1098F00039FC074630880C303080022F01D007B386 -:1099000063E09DF81420DBF804109BF808305846FB -:1099100001EBC2019A4201D28A882AB1042754E09D -:1099200030E02BE022E00DE0427A521C8BF8092057 -:109930000D6030888880A6F8009046E06168A089B4 -:10994000888030E0287820F03F0016302870A08909 -:10995000A5F80100E089A5F80300228A681D616965 -:1099600011F068FA208A401D3080E7E7287820F05F -:109970003F0018302870207B687055E760680188C8 -:10998000090401D4052720E0C088A189884201D0BC -:1099900006271AE01E202870A6F800A0606801883B -:1099A00021F400410180B8F1000F0ED0BBF8000097 -:1099B000002283000320A16807F01EFF6168207861 -:1099C000887007E0A6F8009003276068018821EA04 -:1099D0000801018038469FE62DE9FF4F97B00C46FD -:1099E000249E70B117280CD83288A2F57F43FF3B24 -:1099F00007D02278530601D4120604D508201BB0E4 -:109A00008BE60720FBE74FF000098DF800908DF8FA -:109A100001902278831E02F03F0CA0F1010A611C24 -:109A20004D461FFA8AF702AABCF1200F79D2DFE86F -:109A30000CF089107861786C78AA78CD78F778FC8A -:109A400078F478F378F2787878F178F078EF78EE47 -:109A50007889052876D104208DF80000B0788DF83B -:109A600004006088ADF8060020798DF80100607868 -:109A700000F03F000C282BD00ADCA0F102000928DE -:109A800060D2DFE800F0145F175F1C5F1F5F2200E9 -:109A9000122826D006DC0E281DD01028DAD11DE0B1 -:109AA0001408002016281FD01828D3D11FE03078C2 -:109AB000800701E030784007002843DA37E130784A -:109AC0000007F9E73078C006F6E730788006F3E75C -:109AD00030784006F0E730780006EDE73088C005C2 -:109AE000EAE73088C004E7E730888004E4E730889C -:109AF0004004E1E73178890724D50328AAD105205D -:109B00008DF80000B4F80100D2E031784907F3D5B0 -:109B1000062817D3617898B2012903D0022999D178 -:109B200002E01FE1022700E0102706218DF8001057 -:109B300061788DF80610ADF80490A11C904607F1ED -:109B400002091BE097E000BF31F8022BA0F1020AE6 -:109B5000A8F800208B463A4608F1020011F06AF995 -:109B600008EB070202F10208BDF80420AAEB070087 -:109B7000521C0BEB070180B2ADF804208145E3D9FC -:109B8000002878D1D3E03078000774D507208DF80D -:109B900000001FFA8AF1ADF80490601C0DF1060276 -:109BA0000FE000BF30F8023B22F8023B30F8023BE6 -:109BB00022F8023B091FBDF8043089B25B1CADF8E6 -:109BC00004300429EED2002955D1B0E03178C9061D -:109BD00051D502284FD308208DF80000ADF806902B -:109BE00061789BB28DF80410A01C0CE0078822F865 -:109BF000047B871C80C25B1ABDF8067008447F1C7A -:109C00009BB2ADF806709942F0D9A3BB8FE070E02B -:109C100075E065E04FE042E01DE012E005E0FFE79F -:109C20003078800627D5092003E03078400622D519 -:109C30000A208DF80000B088ADF80400ADF8067079 -:109C400007E03078000616D50B208DF80000ADF83F -:109C5000047002916BE03188C9050CD502287FD3CE -:109C60000C208DF8000099B2ADF8069063788DF85D -:109C70000430A01C10E073E0078822F8027B4788BC -:109C800022F8027B071D80C2C91ABDF8067018446D -:109C90007F1C89B2ADF806708B42EDD993E731880D -:109CA000C9045DD501285BD10D208DF80000B08876 -:109CB000ADF804003BE03188890451D505284FD325 -:109CC0000E218DF80010B188ADF80410B4F803101F -:109CD000401FADF80800601DADF80610039026E0A7 -:109CE000318849043CD501283AD10F208DF8000075 -:109CF0001DE03188090433D4B4F80110F180032841 -:109D00002ED3217801F03F011B2925D011218DF898 -:109D10000010318841F40041A6F80010B4F8011099 -:109D2000ADF80410C01EADF80600E01C02902078CB -:109D300000F03F001B2809D01D2807D003201A99E6 -:109D400007F0F7FD308800F400403080684619992C -:109D5000FBF708FA284652E610218DF80010DDE7DF -:109D60000725F7E70825F5E700B597B0032806D1E2 -:109D70008DF80000019100216846FBF7F3F917B058 -:109D800000BD00002DE9FF4F8DB09346DDE91A5666 -:109D9000DDF8749004464FF0000A082A06D0E06906 -:109DA00001F02CF858B110203070BCE0288809214F -:109DB00040F01000288089F80010022717E0E169C0 -:109DC00001208871E2694FF420519180E169887225 -:109DD000E06942F601010181E16900208873288869 -:109DE00040F020002880112089F8000004273078F6 -:109DF00009900A20307004F1180009F102080225C8 -:109E00000B9001F063FA002066E000BFBBF1100F79 -:109E100006D1022D04D0A8EB0A00BDF80C20428028 -:109E2000BDF80E001099884203D9F649097A0E91BF -:109E300004E003D1099909B131701FE0A8F80000CE -:109E40001C980088A0EB0500A0EB070083B2C7F1C7 -:109E5000FF00984200D203460E980AAA08EB0701B9 -:109E60008DE8070094F82010BDF80E00002201F0E4 -:109E70009AFA307030B1C0B2832858D0BDF80E00C5 -:109E800020833DE0089828B1DE48006800790A2860 -:109E90002BD335E0BDF82800C11901F0FF0A022DCF -:109EA0000ED099F80110514503D1BDF81820824217 -:109EB00008D0D4488A4600680178032908D021E0F8 -:109EC00089F801A0CF4800680178042906D008E08D -:109ED00000790A2816D20120089006E0BDF80E107D -:109EE000818005EB0A00D04485B203AA0E990B9835 -:109EF00001F0EFF920B91C980088401BB84285DAC0 -:109F0000022D0BD0BBF1100F04D1A8EB0A01BDF854 -:109F10000C0048801C98058000203070B94800680B -:109F20000078032803D0002011B0BDE8F08F022094 -:109F3000FAE72DE9F0410546406B1346002758B378 -:109F4000491F8EB2698FA1F57F42FF3A05D04218B2 -:109F500092881144891D8CB200E00024A1192A8F37 -:109F60000831914216D82044B3F8011020F8021BA2 -:109F7000B3F8031020F8021B324620F8026B591D7B -:109F800010F058FF6C87696B00202144B61D3144E6 -:109F9000088002E0092700E083273846BDE8F08109 -:109FA00010B50B88048F9C420CD9446BE0180488D0 -:109FB00044B1848824F40044A41D23440B80106021 -:109FC000002010BD822010BD2DE9F04788B000258B -:109FD000904689468246ADF81050072745E0039821 -:109FE00006888088000440D4A8F8006005A800977F -:109FF000CDE901504FF4007300224946304601F08C -:10A00000D2F9040038D1BDF81000ADF8180003985B -:10A0100004888188B44214D10A0412D4CDE90057CF -:10A0200021F40041029541F480434288494620468C -:10A0300000F0C8FF04000BD10398818841F400416F -:10A04000818003AA06A95046FFF7AAFF0400DED0CC -:10A05000CDE9005703980295BDF81430008800221E -:10A06000494600F0AFFF822C06D103AA04A950464E -:10A07000FFF796FF0400B2D0ADF8105004E003984B -:10A08000818821F40041818003AA04A95046FFF78A -:10A0900087FF0028F3D0822C03D0204608B0BDE80B -:10A0A000F0870020FAE730B50446406B97B00025F2 -:10A0B00070B10B208DF80000208FADF80800606BA8 -:10A0C0000391019000216846FBF703FE8DF80050D4 -:10A0D0004FF6FF7065636087258717B030BD2DE9A7 -:10A0E000F041044686B00E46616B00200C9D174679 -:10A0F00000292AD0012B28D12A4631462046FFF7D5 -:10A1000063FF002821D1002F1FD0A046344600262F -:10A11000ADF8106007270EE00398008828800398A8 -:10A120000296811DCDE90017838842880088214668 -:10A1300000F048FF30B903AA04A94046FFF730FFFA -:10A140000028E9D0822800D1002006B026E72DE9BA -:10A15000F0411546DDE906644A1D378892B2974200 -:10A1600001D206201AE73280172204F8012B0A4692 -:10A17000208065801946201D10F05CFE00200DE750 -:10A1800000220280C262831D0263C36142634FF6F4 -:10A19000FF734387028780F8201070474FF6FF72E5 -:10A1A0000280042007F0C5BB30B597B00D460446C9 -:10A1B000FFF779FF208E48B101208DF80000E06A9A -:10A1C000CDE9010500216846FBF783FD0020E06230 -:10A1D000206382E70146002009880A0700D5012094 -:10A1E00011F0F00F01D040F00200CA0501D540F097 -:10A1F00004008A0501D540F01000490501D540F062 -:10A2000020007047200800202DE9FF4FA7B01F460F -:10A21000349E299D379C5FEA000817D028784106B4 -:10A2200010D400F03F011E290AD0218811F4FE6FDE -:10A230000CD13A88172A09D3A1F57F42FF3A05D0FD -:10A24000010606D500F03F00122802D004202BB0F2 -:10A250006BE6FE4928984FF0000908728DF81090BF -:10A260008DF834900DAA0A60359A4A60ADF81490C2 -:10A27000ADF890902878032200F03F038646711CC9 -:10A2800004F1180CCB464FF0040AA8F10500CDF8F4 -:10A2900098C01F2B7DD2DFE803F07C7C107C1C7CF7 -:10A2A000867CEF7CEE7CED7CEC7CEF7CEB7C7C7C3C -:10A2B000EA7CE97C7C7C7C7CE800B8F1030F02D06E -:10A2C0008DF810A0EFE232701720A6F801003A8056 -:10A2D000BEE2B8F1050FF3D1B5F801002083ADF867 -:10A2E0001400B5F80310618300287DD088427BD824 -:10A2F00084F808B0A4F806B04FF6FF706084269882 -:10A3000000F0E4FF05203070B01C00904FF0020A0E -:10A3100008AA2899269800F0DCFF00287ED19DF835 -:10A320002600012803D002207070102002E00120D6 -:10A33000707002208346002201A909A805F071F877 -:10A3400030BB9DF80400834522D13A88801CA2EBE3 -:10A350000A0181421CDB0098BDF822100AF1020AB2 -:10A360000180009909A8891C0A46009101A905F0FD -:10A3700058F89DF80400009908AA014450441FFAB7 -:10A3800080FA00912899269800F0A3FF0028D2D0E7 -:10A3900000E069E2BAF1020F40D0A7F800A057E24E -:10A3A0008DF8100054E2B8F1070F89D3B5F8010019 -:10A3B0002083ADF81400B5F803106183A0B1884282 -:10A3C00012D84FF0010A84F808A0B5F80500E08023 -:10A3D00000202073E06900F011FD90B9E16981F877 -:10A3E00006A04FF4205100E078E0E26942F6010057 -:10A3F0009180E16981F80AA0E1690881E1690020A2 -:10A400008873A8F107006084E81D6062269800F058 -:10A410005DFF0720307006F1010A00E06FE00020C8 -:10A420004FF0010BADF8220018E000BFBBF1010FA7 -:10A430000CD0E069807901281FD03AF8021C00BFD7 -:10A440000BF102002AF8021B1FFA80FBBDF8221054 -:10A450000BF102002AF8021B1FFA80FB08AA2899B8 -:10A46000269800F036FF58B10FE0DAE16BE10AE11F -:10A47000AEE0D2E17BE05AE01EE0BDF82010DFE75D -:10A480003988A1EB0B000428D0DABBF1010F36D0DC -:10A49000E069807901280CD0BDF82010A1F57F403B -:10A4A000FF3806D03AF8021CAAF800100BF102009F -:10A4B000B1E1BDF82010F7E7B8F1070F03D0B8F10C -:10A4C000150F7FF4FDAEB5F801102183ADF814101F -:10A4D000B5F80320628309B1914201D901205FE7F9 -:10A4E00001212172A4F806B084F80CB0B8F1050F70 -:10A4F00007D0C0B2691DE26904F074FF08B10A20F8 -:10A500004EE74FF6FF70608404A824A9CDE900103F -:10A51000CDE902762878002300F03F0220462899F2 -:10A52000FFF730FC8146208BADF8140090E1B8F1C4 -:10A53000030FC6D14020ADF89000B5F8010020838C -:10A54000ADF81400289ACDE900210AAB02933988AE -:10A550000022491E8BB294F8201000F024FF8DF8E1 -:10A56000100058BB0B203070BDF828002EE0B8F169 -:10A57000050FA6D18020ADF89000B5F8010020832A -:10A58000B5F803206284ADF81400B2F5007F01D95C -:10A59000072005E742F47C426284289BCDE9003124 -:10A5A0000DF12C0CCDF808C03988491E8BB294F8F7 -:10A5B000201000F0F8FE8DF8100018B18328B5D1F6 -:10A5C0000220BEE00D203070BDF82C00401C22E1BE -:10A5D0004FEADE1000EB400002EB8000404505D959 -:10A5E0005FEA4E607FF56CAE584614E1B5F801C0E5 -:10A5F000ADF814C02978490608D505218DF8341026 -:10A600002978090605D58DF834B031E106218DF899 -:10A610003410E91C289BA8EB000ACDE90013CDF803 -:10A6200008B009911FFA8AF394F8201000226046BE -:10A6300000F0C8FC8DF810008DF834B02978490678 -:10A6400010D52088C00509D5208B01E02008002006 -:10A65000BDF81410884201D1C4F824B058468DF8D2 -:10A6600010B0D8E0832801D14FF002094FF4807078 -:10A67000ADF89000BDF814002083A4F822A009983A -:10A6800060621320C5E0B8F1050FFFF419AEB5F80C -:10A6900001C0ADF814C0218F41B3A1F57F42FE3A4D -:10A6A00024D007218DF83410289A6B1DCDE9003293 -:10A6B00080B2CDF808B040F40043DA46B5F8032084 -:10A6C00094F82010604600F07DFC4FF400718DF886 -:10A6D00010008DF834A0ADF89010832810D0E8B1A8 -:10A6E000218FA1F57F40FE3807D0DCE00A218DF8EC -:10A6F00034104FF6FE712187D6E7A4F838A0A7E002 -:10A700002A4641462046FFF714FC8DF8100008B198 -:10A71000832848D1BDF81400208351E72A464146DA -:10A720002046FFF706FC8DF81000E0BB618F606BE0 -:10A73000CDE9007643185A88998833F8060BFFF75D -:10A7400006FD814684E095F801A0B8F1020F7CD1A6 -:10A750005FEA0A0002D0BAF1010F76D108208DF825 -:10A76000340005A800908DF838A094F820105346C6 -:10A7700000222046FFF7B3FC8DF839008DF83AB07F -:10A7800050B9BAF1010F12D0BAF1000F04D1218FE4 -:10A79000A1F57F40FF380AD0208F40B18DF834B04A -:10A7A0004FF4806000E053E0ADF890000DE00DA89C -:10A7B0003599FBF78EFA81464FF480608DF834B0FE -:10A7C000ADF89000B9F1020F06D0FD48006880791D -:10A7D00028B18DF8100043E0A4F818A038E0B9F1D2 -:10A7E000000F03D081208DF8100043E005A80090F1 -:10A7F00094F82010534601222046FFF770FC8DF894 -:10A80000100020463699FFF74EFC9DF81000F8B96D -:10A8100019203070012038801AE006208DF81000D1 -:10A8200041E02078000723D5B8F1010F20D109209D -:10A830008DF83400A088ADF838000420369907F070 -:10A8400078F80820ADF8900000E011E0A7F800B01B -:10A850009DF8340020B10DA83599FBF73AFA8146EE -:10A86000B9F1000F1CD005E05FEA4E607FF528AD1E -:10A870004FF004092088BDF8901008432080BDF8EF -:10A88000900080050AD5218FA1F57F40FE3805D1C3 -:10A890002998E062A4F830804FF003094846D6E4D6 -:10A8A0009DF8100058B10120307028787070BDF804 -:10A8B000140070809DF810003071052038802088C9 -:10A8C000BDF8901088432080E8E72DE9FF4F01781C -:10A8D000A5B080464FF0010B0BFA01F04FF60901CD -:10A8E000349C0840ADF86C0021884FF00009A1F5B8 -:10A8F0007F42FF3A02D028B1080703D5012029B0D2 -:10A90000BDE8F08F289F4FF0000A04A887F800A048 -:10A910002799269A55460988ADF87C10A8498DF8E4 -:10A9200068A00A728DF810A008603298486098F804 -:10A930000000012830D0022809D0032876D13878C9 -:10A9400020F03F001D303870B8F80400A08098F85F -:10A950000000022804D1387820F03F001B30387006 -:10A9600021AAF91C07208DE80700BDF87C0094F8A7 -:10A970002010C01E83B2B8F80400002200F013FDBE -:10A980000028DBD1B8F80400A7F80100BDF8840066 -:10A99000C01CADF87C005FE198F805108DF86810D8 -:10A9A00098F804004FF40079012802D00228C5D19C -:10A9B00033E1208808F1080600F4FE60ADF86C0071 -:10A9C00010F0F00F1BD010F0C00F05D03088228B94 -:10A9D000904201D005257DE189B9B078C0070ED03D -:10A9E000B2680720CDE90020CDF808A0F388B2882E -:10A9F00094F82010308800F0E5FA00286FD12899EB -:10AA0000BDF86C00491C802845D006DC10280ED00B -:10AA100020280CD0402891D122E0B0F5807F5FD073 -:10AA200048457DD0B0F5806F88D1CBE029E1C006E4 -:10AA300001D5082000E0102081460420ADF814A0C4 -:10AA40001BAA8DF8100000921FA81AA90397CDE940 -:10AA5000011033884A4607212046FFF793F992E018 -:10AA60009DF868004FF00A09002894D121AA072018 -:10AA70008DE80700BDF87C0094F82010401E83B2DA -:10AA8000208B002200F08FFC8DF868000B203870BE -:10AA9000BDF8840019E09DF868004FF00C0900280B -:10AAA0001CD123AA07208DE80700BDF87C00628C2A -:10AAB000401E83B294F82010208B00F074FC8DF8B7 -:10AAC00068000D203870BDF88C00401CADF87C008B -:10AAD00004208DF81000208BADF81400BCE057E086 -:10AAE0003188208B814253D19DF868104FF01209B4 -:10AAF000002918D1616A81B1B178C90748D0B3681B -:10AB00000722CDE90032CDF808A0F388B28894F886 -:10AB1000201000F057FA8DF868001320387000E01C -:10AB200002E0ADF87CB097E0B6F800C0208B844519 -:10AB30002ED19DF868004FF016090028606B08D0F0 -:10AB4000E0B34FF6FF7000215646ADF808A0019023 -:10AB500027E060B1B178C9071AD1618F43181FA8E7 -:10AB6000CDE900075A88998833F8060B09E0B078D8 -:10AB7000C0070DD01FA8CDE90007B288F188604654 -:10AB8000B368FFF7E4FA050066D0062D7AD03FE0FF -:10AB900005253DE0019021AA02A92046FFF700FA11 -:10ABA0000146628FBDF80800824201D00029F1D031 -:10ABB000608F616B08440680019860874CE000005C -:10ABC000200800209DF868004FF0180940B1208B44 -:10ABD000C8B13088208320463399FFF764FA3BE000 -:10ABE00004F118000090237E94F8201001222046E2 -:10ABF000FFF775FA8DF868000028ECD1192038703D -:10AC0000ADF87CB0E7E7052520463399FFF74BFA0E -:10AC10009DF81000032857D05CE0208800F40070F5 -:10AC2000ADF86C0048452CD1208FA0F57F41FE394E -:10AC30007FF4D0AED8F808004FF0160948B1606331 -:10AC4000B8F80C1021874FF6FF716187A0F800A0BB -:10AC500002E04FF6FF702087BDF86C0030F4FE6113 -:10AC600016D0782300220420339906F0C5FD98F809 -:10AC70000000A0702088BDF86C10084320800AE016 -:10AC800000E006252088BDF86C108843208021E074 -:10AC90002188814321809DF8100028B15F484168D8 -:10ACA00004A8FBF716F805469DF8680090B187F8F0 -:10ACB000019087F800B0208B78809DF8680038718B -:10ACC0000520ADF87C0005E05448416804A8FBF776 -:10ACD00000F80546208810F4FE6F22D1208E00B3C4 -:10ACE0002799289B01AD0988ADF87C10DDE9321267 -:10ACF000009385E816001FABE26A2699FFF784FAF5 -:10AD0000054603280DD08DF810B0E06A0590339801 -:10AD10000690002104A8FAF7DCFF00B10546A4F86C -:10AD200030A02798BDF87C1001802846E7E500B5E3 -:10AD300097B0042807D102208DF80000019100216E -:10AD40006846FAF7C6FF17B000BD70B5334C0378FC -:10AD500000222168012B02D0022B44D129E00B787C -:10AD60000BB1042B03D10A712268032111702168F1 -:10AD7000062582880B7905EBC303CA522168082394 -:10AD80000A250A7903EBC2021144C2880A802168AD -:10AD900002890B7905EBC303CA52418920680C2351 -:10ADA000027903EBC202815220680179491C0171CA -:10ADB0001DE00A7482888A802168C288CA8022685D -:10ADC00001891181226841895181C1682068C1606F -:10ADD0006168FAF77EFF0146022806D02068007CF1 -:10ADE000002801D119B1812070BD832070BD0020E1 -:10ADF00070BD406B002800D0012070478178012988 -:10AE000009D10088B0F5205F03D042F601018842E5 -:10AE100001D1002070470620704700002008002064 -:10AE200010B58B7883B102789A4205D10B885BB15B -:10AE300002E08B79091D4BB18B789A42F9D1B0F8B9 -:10AE400001300C88A342F4D1002010BD812010BD38 -:10AE500007282BD012B1012A2CD103E0497801F048 -:10AE6000070102E04978C1F3C201052922D2DFE8D7 -:10AE700001F0031D081017000AB1032070470220DB -:10AE80007047042812D0052810D006280ED058B1DB -:10AE90000EE005280AD0062808D0022808D003E0D2 -:10AEA000062803D0032803D00520704700207047F0 -:10AEB0000F2070478120704710B513880B800B78E6 -:10AEC0001C061FD5FE4CA47A844204D843F010001F -:10AED0000870002010BD94682478C44064F3041303 -:10AEE0000B701378D17803F0030341EA032140F299 -:10AEF0000123B1FBF3F403FB1411926800FB012062 -:10AF0000401C10BD906810BD37B5BDF8041011800D -:10AF10009DF8045029061BD5E94901239468897AD4 -:10AF2000814209D8FE280FD1E80602D58B405B1E6E -:10AF300000E00023237007E0217883409943C5F3A4 -:10AF40000013834019432170107820F01000107016 -:10AF50003EBD2DE9F0410746C81C0E4620F0030017 -:10AF6000B04202D08620BDE8F081082A01D90E2027 -:10AF7000F9E7D34D002034462E60AF802881AA72B5 -:10AF8000E8801AE0E988491CE980810614D4E17858 -:10AF900000F0030041EA002040F20121B0FBF1F291 -:10AFA00001FB1201206800F0E3FA2989084480B20D -:10AFB0002881381A3044A0600C3420784107E1D44D -:10AFC0000020D0E72DE9FF4F85B01546DDE912B628 -:10AFD0008046994623F4404700F0BAFA04000BD0AB -:10AFE000207800060AD5B648817A0698814205D8AD -:10AFF000872009B0BDE8F08F0120FAE722466946B4 -:10B000000698FFF759FF824600208DF80400072EAE -:10B0100018D0012221463046FFF71AFF0028E8D158 -:10B02000207840060ED502208DF80400ADF8088087 -:10B03000BDF80000ADF80C50ADF80A00ADF80E7088 -:10B04000CDF810B05FEA094004D500273D46B84668 -:10B0500001260CE02178E07801F0030140EA0120AC -:10B0600040F20121B0FBF1F2804601FB12865FEA5B -:10B07000494009D5B04507D1A178207901F00301F5 -:10B0800040EA0120A84201D3B54201D90720B0E728 -:10B0900078191FFA80F9B14501D90D20A9E79DF86B -:10B0A000040020B101A8FAF712FE0028A1D1B04592 -:10B0B00007D1A0784FEA192161F30100A07084F84C -:10B0C0000490149800B10780BBF1000F15D00AEB73 -:10B0D00005003A4659460FF0ADFE224669460698ED -:10B0E000FFF7EAFE9DF80000224620F010008DF8E0 -:10B0F000000000990698FFF707FF002079E72DE987 -:10B10000FF4FDFF8BC9182461746B9F80610D9F810 -:10B11000000001EB410100EB810440F20120B2FB91 -:10B12000F0F183B000FB11764D46DDF844803146E6 -:10B13000049800F01DFA29682A898B46611A0C319F -:10B1400001441144AB8889B28B4202D8842007B0F5 -:10B1500050E70499CDB2290603D5A90601D585206B -:10B16000F5E7B9F806C00CF1010C1FFA8CFCA9F840 -:10B1700006C0129909B1A1F800C0A90602D5C4F809 -:10B18000088007E0104480B2A9F80800191A01EB02 -:10B190000B00A0602246FE200499FFF7B5FEE77081 -:10B1A00026712078390A61F30100320AA17840F053 -:10B1B000040062F30101A17020709AF8020060712E -:10B1C000BAF80000E08000262673280602D599F818 -:10B1D0000A7000E00127A80601D54FF000084D468F -:10B1E00000244FF007090DE0CDF80080CDE901966D -:10B1F000E8882146109B069AFFF7E4FE0028A6D1B6 -:10B20000641CE4B2BC42EFD30020A0E72DE9F04774 -:10B21000804600F09DF9070005D000264446284DE1 -:10B2200040F2012916E00120BDE8F087204600F039 -:10B230008FF90278C17802F0030241EA0222B2FBE0 -:10B24000F9F309FB1321006800F092F93044641C03 -:10B2500086B2A4B2E988601E8142E7DCA8F1010051 -:10B26000E8802889801B288100203870DCE720B125 -:10B27000401E10809170002070470120704710B56B -:10B280000F4904460088CA88904201D3822010BD2D -:10B29000096800EB400001EB80025079A072D08871 -:10B2A00020819178107901F0030140EA0120A0810A -:10B2B000A078E11CFFF700FE20612088401C01E01F -:10B2C0002C0800202080E080002010BD0121018298 -:10B2D00070472DE9FC474FF6FF780546A2F800803D -:10B2E000406817468A4680788DF8020068680088B2 -:10B2F000ADF8000000208DF80600288A2C88A042B6 -:10B3000000D304462C822DE0288A401C2882701D20 -:10B310006968FFF785FD18BB3988414501D1601E7A -:10B3200038806888A04222D3B178307901F00301D7 -:10B3300040EA01296946701DFFF772FD80B96989ED -:10B34000414519D0002231465046FFF781FD38B9FA -:10B350006A894A4504D1E968B0680FF03FFD58B1E9 -:10B36000641CA4B2204600F0F3F80600CCD1641EA1 -:10B370002C828220BDE8FC877C807079B871F088CF -:10B38000B8803178F07801F0030140EA012078813B -:10B39000A7F80C90287A324607F10801FFF78CFDD8 -:10B3A00038610020E6E72DE9F04F85B01D46904654 -:10B3B0000F468346DDF838A0DDF8409000F0C8F86D -:10B3C000040009D02078000608D57148807AB84278 -:10B3D00004D8872005B00DE60120FBE7C8F3090675 -:10B3E000224669463846FFF767FD07465046BAF1E0 -:10B3F000070F1AD000222146FFF72AFD0028E9D1C5 -:10B400002078400611D501208DF80400ADF808B071 -:10B41000BDF80000ADF80A00ADF80C60ADF80E50B4 -:10B4200001A8FAF754FC0028D4D12178E07801F083 -:10B43000030140EA0121A278207902F0030240EAE8 -:10B440000220464507D0B1F5007F04D9691E81422C -:10B4500001DD0B20BEE7864201D90720BAE7801B39 -:10B4600082B2AA4200D92A46B9F1000F01D0A9F848 -:10B4700000200F9810B1B9190FF0DCFC0020A9E7EB -:10B480002DE9F0411D4617460E4600F061F8040014 -:10B4900008D02078000607D53D48807AB04203D80E -:10B4A000872060E501205EE5224639463046FFF7F9 -:10B4B00003FD65B12178E07801F0030140EA012045 -:10B4C000B0F5007F01D8012000E0002028700020A6 -:10B4D00049E52DE9F0411D4617460E4600F038F8C3 -:10B4E000040008D02078000607D52948807AB042A9 -:10B4F00003D8872037E5012035E522463946304616 -:10B50000FFF702FDFF2D14D02178E07801F003024F -:10B5100040EA022040F20122B0FBF2F302FB1300EA -:10B5200015B900F2012080B2E070000A60F3010159 -:10B530002170002017E510B50C4600F009F828B17D -:10B54000C18821804079A070002010BD012010BD6D -:10B550000F49CA88824209D340B1096800EB400014 -:10B560006FF00B0202EB8000084470470020704728 -:10B57000C0B2820609D4000605D50548807A484342 -:10B58000401C80B27047084670470020704700009A -:10B590002C08002010B506F08BFB05F026FEFBF70B -:10B5A00011FF0EF04FFB06F083FABDE8104006F0E5 -:10B5B0000FBB10B50C4601F0C1FC80B3204600F073 -:10B5C000ACFA68B322780E2A09D00F2A07D0022AD3 -:10B5D00005D0032A03D0102A2ED0FFDF1DE0A0786B -:10B5E0001E282BD00FDC0C2824D008DC092825D2FB -:10B5F000DFE800F013241724241E1E1A1C00122852 -:10B600001CD1072010BD302818DDA0F13A00032816 -:10B6100014D2DFE800F011130B00002010BD11E080 -:10B620000EE043F20200F9E70420F7E70D20F5E70A -:10B630000F20F3E70820F1E71120EFE70320EDE703 -:10B64000FFDFEAE7FFDFE8E700F067BA70B503461F -:10B65000002002466FF02F050EE09C5CA4F130063E -:10B660000A2E02D34FF0FF3070BD00EB800005EBD7 -:10B670004000521C2044D2B28A42EED370BD30B595 -:10B680000A240AE0B0FBF4F304FB13008D183030F9 -:10B6900005F8010C521E1846D2B2002AF2D130BD74 -:10B6A00030B500234FF6FF7510E0040A44EA00208D -:10B6B00084B2C85C6040C0F30314604005EA003403 -:10B6C0004440E0B25B1C84EA40109BB29342ECD34E -:10B6D00030BD000010B509F0DBFB042803D009F0F1 -:10B6E000D7FB052802D108F0D4F950B909F05CFC69 -:10B6F000032803D009F05EFC032804D107F0AEFA5A -:10B7000008B1012010BD002010BD70B50C460546E3 -:10B71000062102F092F9606008B1002006E00721DE -:10B72000284602F08AF9606018B1012020700020DC -:10B7300070BD022070BD2DE9FC470C4606466946E7 -:10B74000FFF7E3FF00287DD19DF8000058B107F016 -:10B75000E7F9B0427ED00022214630460BF0F9FCDA -:10B76000002874D116E007F042FFB04272D00022E8 -:10B77000214630460BF0E0F8002868D1019D95F88D -:10B780009800303518B9687E08B1012000E000202B -:10B79000804603E0019D95F8498030354FF0010A5D -:10B7A00095F82D004FF00009A0B195F82E00800704 -:10B7B00010D584F8019084F800A084F80290A68047 -:10B7C00095F82F10A171298E2181698E618185F8EC -:10B7D0002D903CE0304602F0A8FA070000D1FFDFD0 -:10B7E000384601F049FD10F0FF0008D084F80190C0 -:10B7F0000D212170A680E08084F802A027E0304669 -:10B8000002F081FA070000D1FFDFB8F1000F21D06C -:10B81000384601F0BCFDA8B19DF8000038B9019888 -:10B82000D0F8BC004188B14201D180F80090304688 -:10B8300007F0DBF884F801900A21217084F8029067 -:10B84000A68000E006E0A97EA17185F8199001208C -:10B85000BDE8FC870020FBE71CB56946FFF755FFF4 -:10B8600000B1FFDF684601F0B1FBFD4900208968A7 -:10B87000A1F89A001CBD2DE9FC4104460E460620A5 -:10B8800002F086F80546072002F082F82844C7B285 -:10B890000025A8463E4417E02088401C80B2208046 -:10B8A000B04202D34046A4F8008080B2B84204D32C -:10B8B000B04202D20020BDE8FC816946FFF725FFB7 -:10B8C0000028F8D06D1CEDB2AE42E5D84FF6FF70FF -:10B8D00020801220EFE738B54FF6FF70ADF800007A -:10B8E0000DE00621BDF8000002F0B9F8044607217A -:10B8F000BDF8000002F0B3F80CB100B1FFDF002189 -:10B900006846FFF7B8FF0028EBD038BD2DE9F041BD -:10B91000D4A0D64C06790025076884F8425001F07F -:10B920004EFB84F8435004202087102060874FF698 -:10B93000FF70A4F80A0184F80C51A4F80E0184F8F1 -:10B94000315004F8EE5BC94804F8C05C04F8BA5CF6 -:10B950008030A57340F87D7FC4490671FD31481ED3 -:10B960000BF095F80A20207503206075A075E0752E -:10B970000E20207606206076A076E076BDE8F08185 -:10B980002DE9F041B64C0D466060217007F015F8C6 -:10B99000FFF7A1FFFFF7BAFF207809F01CF8B349C1 -:10B9A000C431A1F181000F46064607F041FF6068EF -:10B9B0000BF038F820780CF0C9FB284609F0C1FEDE -:10B9C0003946304607F0E8F860680BF04DFC01F0AE -:10B9D000F6FAA649002081F84300CFE710B501240C -:10B9E0000AB1002010BD21B1012903D00024204656 -:10B9F00010BD02210DF096FBF9E72DE9F047040098 -:10BA000000D1FFDF994D002695F8310058B16670DE -:10BA10001020207095F83200A07095F83300E07087 -:10BA200085F831606AE0287840B12C22A91C2046B4 -:10BA30000FF000FA0E2020702E705FE095F82E00B7 -:10BA400060B10120E07095F82F00A07095F83000EB -:10BA500060700F20207085F82E604FE0844802212E -:10BA60008246FFF708FF00B1FFDFB5F80E91062010 -:10BA700001F08EFF0746072001F08AFF3844C7B265 -:10BA8000781C00F0FF0800BFB5F80E01B84213D1D2 -:10BA90000021204607F05EFD58BB95F8340080B3C6 -:10BAA0006670132020701C21A01C0FF03AFA0220AF -:10BAB000A07085F8346021E040451BD1002120466C -:10BAC00007F000F8E8B12078132817D1A0783C28B7 -:10BAD00014D1A088072101F0B0FF050000D1FFDFDD -:10BAE000288806F082FFA088072101F0B8FF00B186 -:10BAF000FFDF03E02146FFF71EFE10B10120BDE885 -:10BB0000F087FFE702215046FFF7B5FE18B9B5F8F8 -:10BB10000E114945B8D10020F1E76EE710B508F0E5 -:10BB2000C8FE00B1FFDF0AF07BFF00B1FFDF07F0C6 -:10BB300035FE09F0EFFD00B1FFDF0BF093FB00B124 -:10BB4000FFDF06F0F7FF00B1FFDF0CF0F9FA00B1FC -:10BB5000FFDFFFF7C0FEFFF7D9FE06F017FF02F088 -:10BB6000C1F801F02CFA4148002180F8431001711E -:10BB7000012141710222C270017010BD10B53B4C11 -:10BB8000207828B10A21BDE810400E2001F0E4B968 -:10BB9000FFF7A0FD08B10C2002E001F010FA002030 -:10BBA0002071012060710A21E170207010BD70B514 -:10BBB0002E4C0546207828B1BDE8704039210E2072 -:10BBC00001F0CAB9FFF786FD08B10C2012E094F825 -:10BBD000430008280DD204EB0010102229464430FF -:10BBE00001F0C7F994F84300401C84F8430000209A -:10BBF00000E007202071012060713921E170207080 -:10BC000070BD70B5194C0546207828B1BDE870406C -:10BC10000B210E2001F0A0B9287818B1012801D01D -:10BC2000122016E094F8C400082823D2FFF752FD32 -:10BC300008B10C200DE00E482B7894F8C4106A1C53 -:10BC4000463806F01AF994F8C400401C84F8C40081 -:10BC500000202071012060710B21E170207070BD07 -:10BC600044000020FFFFFFFF1F00000038080020F5 -:10BC7000460900200720ECE710B5FE4C207828B1DB -:10BC80003821BDE810400E2001F066B9FFF722FD13 -:10BC900008B10C2002E0002084F84300207101204C -:10BCA00060713821E170207010BDF248017819B13F -:10BCB0000F210E2001F050B9002101710E21817079 -:10BCC0000F21C170FF2181714FF6FF710181EA4997 -:10BCD00049680A7882728A8882814988C1810121F3 -:10BCE000417101707047E3490A781AB13B210E2077 -:10BCF00001F032B90088A1F80A01012081F80C0195 -:10BD000000220A7148713B22CA700870704710B552 -:10BD1000D84C207828B12B21BDE810400E2001F02E -:10BD20001BB90821A01D05F0F9FA0020207101209F -:10BD300060712B21E170207010BD70B5CD4C217861 -:10BD400029B1BDE8704031210E2001F005B990F90C -:10BD50000000042814D098B1011D11D010F1080F73 -:10BD60000ED010F10C0F0BD010F1100F08D010F105 -:10BD7000140F05D010F1280F02D01220207103E01B -:10BD8000002506F0BBF825713120E07001206071BC -:10BD9000207064E730B5B74D04468DB0287828B1DF -:10BDA0002A210E2001F0D8F80DB030BD1022214616 -:10BDB000684601F0DEF8102204F1100104A801F039 -:10BDC000D8F868460DF0D6FF10222C46A81D08A909 -:10BDD00001F0CFF8002020710E20A0702A20E07022 -:10BDE000012060712070DFE72DE9FF41A14C207830 -:10BDF00028B13A210E2001F0AFF8BDE8FF814FF0E5 -:10BE0000000884F80680B4F80A01ADF8040002A91D -:10BE1000FFF77BFC20B1002101A8FFF72CFDE8BB58 -:10BE2000BDF80400ADF8000002A980B2FFF76DFC78 -:10BE300000B1FFDFBDF8000001F077FF050000D181 -:10BE4000FFDF2846039F01F0A9FA80F0010697F86A -:10BE50004950BDF8000001F056FF070000D1FFDF98 -:10BE6000384601F094FA80F0010255EA020019D038 -:10BE7000A179BDF8000004EB410108817D49A37957 -:10BE80001831585C65F300005854A37962F34100FF -:10BE90005854A27966F38200505400E00DE0A07976 -:10BEA000401CA07100216846FFF7E5FC28B9BDF8E9 -:10BEB0000000BDF804108842B6D1012084F8048047 -:10BEC00060713A21E170207097E770B5694C0546C2 -:10BED000207828B1BDE8704034210E2001F03CB834 -:10BEE00008F0D6FF052804D0284608F061FD0020A0 -:10BEF00000E00C202071012060713421E17020707D -:10BF0000ADE65C48017819B10E21084601F024B86D -:10BF10005949CA68C0F80620098A41810021017187 -:10BF2000012141710E22C2700170704770B5514CF1 -:10BF30000646251D207828B1BDE8704032210E202C -:10BF400001F00AB83146002006F00EFF287058B9FB -:10BF500000213246084607F053FD287020B94648B4 -:10BF60003168C160B1880182012060713221E170C5 -:10BF7000207074E670B53F4C0546207828B1BDE8C6 -:10BF8000704030210E2000F0E7BF08F0C4FD10B96A -:10BF900009F064FE68B1287809F034FC287807F0CD -:10BFA000A7FD00202071012060713021E170207018 -:10BFB00055E60C20F6E72DE9F0412E4C0646251DEE -:10BFC000207828B1BDE8F04117210E2000F0C4BF51 -:10BFD0003146012006F0C8FE2870012768B93246B4 -:10BFE0000121002007F00CFD287030B93068E063B3 -:10BFF000B088A4F8400084F8427067711720E070A0 -:10C000002770BBE438B51B4D0446287828B1BDE83D -:10C01000384030210E2000F09FBF227961798A429A -:10C0200015D0A079E379984211D01F2A0FD81F2983 -:10C030000DD8002211460EF03DF940B90022E079FA -:10C0400011460EF037F910B9207A072801D91220CD -:10C050001BE04FF6FF70ADF8000008F0A5FFD8B95F -:10C0600008F0A8FFC0B908F013FFA8B9002168467E -:10C0700004E000003808002044000020FFF7FBFB2C -:10C0800050B1204605F032FE002028710120687171 -:10C090003E21E970287038BD0C20F6E72DE9FC47F9 -:10C0A000FE4C054694F82E0028B128210F2000F000 -:10C0B00053FFBDE8FC87282084F83000012184F874 -:10C0C0002E10A8784FF000091A2825D00EDC16286B -:10C0D00031D2DFE800F030303030302130303030D5 -:10C0E0003030303030303030302121212A2822D0F9 -:10C0F0000BDCA0F11E000C281DD2DFE800F01C1C98 -:10C100001C1C1C1C1C1C1C1C1C0D3A38042812D2A4 -:10C11000DFE800F0110211022888B0F5706F0AD232 -:10C120001F20884684F82F0028886946FFF7EDFA1B -:10C1300018B1022019E0122017E09DF80000019FBD -:10C14000002806D007F1CE07019E05D106F1B506FD -:10C1500004E007F1B407F7E706F1CF06684600F000 -:10C1600023FF08B1387818B10C2084F82F00A0E71D -:10C1700087F80080A878307084F82F90684600F027 -:10C1800025FF96E77CB5C54C0546207820B12521D2 -:10C190000E2000F0E1FE7CBD28886946FFF7B5FA65 -:10C1A000002168B102202071BC4881600173E180E8 -:10C1B0000E20A0702520E0700120607120707CBDF1 -:10C1C000019A104612F1300282F836108368A3609B -:10C1D000037B237392F83630002BF5D12888E0805A -:10C1E000E6E72DE9FC41AD4C064694F82E0028B157 -:10C1F00010210F2000F0B0FEBDE8FC811F2084F864 -:10C200002F00102084F83000012784F82E70308829 -:10C210006946FFF77AFA70B9684600F0C5FE50B17A -:10C22000019D9DF8000030350028019805D0E230CE -:10C23000017841B904E0022006E0D0F8BC00F7E73D -:10C2400095F82D1019B13A2084F82F00D4E795F80D -:10C250002E1089070CD1042101709DF8000020B92F -:10C2600001993088D1F8BC104880684600F0AEFED5 -:10C27000002084F82F0085F82D70BDE72DE9F047E8 -:10C28000864D0646287828B1BDE8F0471D210E20CE -:10C2900000F062BE4FF01F0985F80490012068711C -:10C2A0001D21E970287008F0F3FD0C2704284ED0FA -:10C2B00005284CD0B0791224012800D0E8B9307894 -:10C2C00008B1012819D1F07908B1012815D1708879 -:10C2D00043F6FD71021F30248A420ED2B288121F2B -:10C2E0008A420AD22887B0886887B0794FF0000860 -:10C2F0004446012803D050B111E02C710CE495F8AC -:10C30000420020B3654A3C320121084602E0644AFB -:10C310000021012007F074FB040000D0FFDFF0795A -:10C32000012800D010B907F093FB044614B185F83A -:10C330000490E3E73078012801D018B109E000212A -:10C34000022001E00021012007F097FB08B12F71C6 -:10C35000D4E785F80480D1E770B5504C217829B135 -:10C36000BDE870401E210E2000F0F6BD1F21217196 -:10C37000012161711E22E270217002781221012ACE -:10C3800000D01AB9407818B1012801D0217166E4B3 -:10C3900000260C25012A08D008F07AFD052802D0D5 -:10C3A00008F034FA30B1257159E4618F208F08F01C -:10C3B000BFFBF7E7267152E42DE9FE4F0546AFF2C9 -:10C3C0005C71D1E90001354E01908A4696F82E0045 -:10C3D00030B103B02121BDE8F04F0F2000F0BCBD0B -:10C3E0001F2086F82F00212086F830004FF001082A -:10C3F00086F82E80298843F6FD730A1F30209A4262 -:10C400007ED26A88141F9C42FAD28A4278D8EA897E -:10C4100040F67B43911F9942F2D2298A8C1F9C429D -:10C42000EED28A42F2D86A8AB2F5FA7FE8D2AA8AB4 -:10C4300040F67744A2F10A03A342E1D2B2EBD10F56 -:10C440005ED9E98A2A8B9142E0D82979122011B16C -:10C45000012955D102E069790029F9D1297B09B177 -:10C460000129F6D108F014FD4FF00C0905286ED013 -:10C4700008F00EFD0428FAD096F83400002866D1A2 -:10C4800007F0B5F8A0F57F41FF39F8D1062102A8E1 -:10C4900001F0A4FA040050D0032103E03808002082 -:10C4A000500000200CF02CFB96F8030100901B229A -:10C4B00096F802312088114601F070FB04283ED026 -:10C4C00000B1FFDF208806F08FFA04F10D07B4F801 -:10C4D00000B00421384604F021FF594638460CF0DC -:10C4E00004FCFDA03F1D006800900321684604F095 -:10C4F000A0FE002069460A5C3A54401CC0B200E02D -:10C500006FE00328F7D3288A6080688AA080A88A11 -:10C51000E08096F8051196F8040108F0C8FA014683 -:10C52000204608F0F0FA002784F8367084F8377057 -:10C53000687968B101280FD10CE0092051E020880A -:10C54000062101F08CFA00B1FFDF072049E071E01D -:10C55000677601E084F81980D5F80600C4F81A005F -:10C560006889E0830198A06084F80CA084F8C480F6 -:10C570008DF800700121684604F05BFE9DF8000014 -:10C5800000F00701C0F3C1021144C0F34010084499 -:10C590008DF80000401D2076092801D20830207651 -:10C5A000002120460CF0ACFA287B18B1012805D0F8 -:10C5B000FFDF24E00021C94A012005E096F842008F -:10C5C00098B10121C64A084607F01AFAB8B1208886 -:10C5D00006F00BFA2088062101F041FA00B1FFDFD6 -:10C5E0001F2086F82F00BDE8FE8F208806F0FDF999 -:10C5F0002088062101F033FAE0B1FFDF1AE0287944 -:10C60000012800D010B907F023FA50B921460320C1 -:10C6100007F033FA28B96A882988204608F005FA15 -:10C6200058B1208806F0E1F92088062101F017FAB8 -:10C6300000B1FFDF86F82F90D5E784F8B87086F850 -:10C640002F70D0E738B5A64C3C3C207820B1222191 -:10C650000E2000F081FC38BD1F202071012565717E -:10C660002220E070257008F013FC052802D00C2071 -:10C67000207138BD00202071684608F090FA00282B -:10C68000F7D10098008806F0B0F9009806210088DC -:10C6900001F0E5F900B1FFDF904884F834500C3820 -:10C6A0000078FCF78DFF38BD2DE9F0418C4D044634 -:10C6B0003C3D95F82E0028B1BDE8F04123210F2024 -:10C6C00000F04ABC1F2085F82F00232085F8300099 -:10C6D000012085F82E00618840F67B438A1F3020B8 -:10C6E0009A4251D2A288961F9E424DD291424BD877 -:10C6F000E188B1F5FA7F47D2218940F67746A1F16A -:10C700000A03B34240D2B1EBD20F3DD96189A2896D -:10C71000914239D84FF000082088062101F08DF9A8 -:10C7200006004FF0020707D000F030FC20B1D6F829 -:10C73000BC00017839B902E085F82F7061E4D6F8C1 -:10C74000D010097809B13A201EE005218171D6F890 -:10C75000BC004146A0F80880D6F8BC20A0885081D3 -:10C76000D6F8BC20E0889081D6F8BC202089D08102 -:10C77000D6F8BC00028943899A4204D88279082AF3 -:10C7800001D89A4203D3122085F82F0039E4228879 -:10C790004280D6F8BC00077085F82F1031E42DE9EF -:10C7A000FE434F4C06463C3C207830B103B0242178 -:10C7B000BDE8F0430E2000F0CFBB012565712420B9 -:10C7C000E070257030460CF0B2FA08B1002000E0AD -:10C7D0001220207100282DD1414884F8FC504430AB -:10C7E000316840F87D1F317901714FF0000884F8FD -:10C7F000FC806946062001F0ACF800B1FFDF684616 -:10C8000001F085F8A0B9BDF8047000BFBDF80400C0 -:10C81000062101F012F9060000D1FFDF86F8C450AE -:10C82000684601F074F818B9BDF80400B842EDD1BB -:10C8300084F80480BDE8FE8370B5294D06463C3D72 -:10C8400095F82E0028B1BDE8704026210F2000F099 -:10C8500083BB1F2085F82F00262085F8300001209B -:10C8600085F82E003088062101F0E7F8040007D093 -:10C8700000F08CFB20B1D4F8BC00017831B901E0A4 -:10C8800002200CE0D4F8D010097809B13A2006E073 -:10C8900005210170D4F8BC1030884880002085F84C -:10C8A0002F0074E50E483C38017819B106210E209E -:10C8B00000F052BB002101710E2282700622C2706C -:10C8C000C0F80610C0F80A10817941F001018171A9 -:10C8D0000121417101707047112233005000002086 -:10C8E0007408002070B5F84E054696F82E0028B161 -:10C8F000BDE870402C210F2000F02EBB1F2086F8D1 -:10C900002F002C2086F83000012086F82E00288881 -:10C91000062101F092F8040007D000F037FB20B1A7 -:10C92000D4F8BC00017831B901E0022020E0D4F84D -:10C93000D010097809B13A201AE094F86410D1B106 -:10C94000D5F802104160D5F80610816054F8BC0F8C -:10C95000698910228181206805F10C010E300EF0EA -:10C9600069FA21680320087021682888488000201F -:10C9700086F82F000BE50C20FAE770B5D24E04467E -:10C980000C25307828B1BDE8704018210E2000F049 -:10C99000E3BA08F009FB032852D008F00BFB032888 -:10C9A0004ED0607908B1012829D1A07908B10128B9 -:10C9B00025D1A07B28B1012803D0022801D003286B -:10C9C0001DD1607BD8B1C00819D162884FF4804076 -:10C9D000824202D82188814203D9207901280ED1D0 -:10C9E00018E0207930B1012814D0022805D003289E -:10C9F00005D102E0202A0BD30CE0A0290AD220792D -:10CA0000042805D12088202802D36188884201D9D2 -:10CA1000122515E0207986F83600607910B10128DA -:10CA200004D00DE0A94A0021204606E096F8420015 -:10CA300030B1A54A01213C32204606F016F90546E0 -:10CA40000120357170711821F17030709FE410B5BC -:10CA50009D4C217829B11A21BDE810400E2000F02C -:10CA60007BBA01781F2902D91220207106E000212B -:10CA700021710278411C104606F0A8F9012060716E -:10CA80001A21E170207010BD10B58F4C217829B1AA -:10CA90002021BDE810400E2000F05EBA01781F2969 -:10CAA00002D91220207106E0002121710278411C78 -:10CAB000104606F07AF9012060712021E1702070A3 -:10CAC00010BD2DE9FC41804C217829B1BDE8FC4125 -:10CAD0001B210E2000F040BA012767710C21217143 -:10CAE00000780026012803D000286AD012205CE0DC -:10CAF00006F085F800287ED094F83600A0B1012811 -:10CB000012D0042810D008F055FA002873D108F08C -:10CB10004BFA18B108F048FA02286CD1002008F04E -:10CB200074FEE0B3FFDF4AE008F03EFA002862D16D -:10CB300008F040FA00285ED105F0F2FFA0F57F4131 -:10CB4000FF3958D1072101A800F048FF5F49054689 -:10CB50000C398860280000D1FFDF032128460BF044 -:10CB60001DFF284606F0FCF994F8091194F8080115 -:10CB700008F023FA0146284608F04BFA94F807011A -:10CB800000901B2294F806312888114601F006F81F -:10CB900068B1042800D0FFDF2888072100E00EE0FC -:10CBA00000F05DFF00B1FFDF0720207123E028883F -:10CBB00005F01AFF284608F028FE00B1FFDF2671B5 -:10CBC00019E008F0F1F9032803D008F0F3F903287D -:10CBD00011D108F0ECF90546002008F027FD50B906 -:10CBE000267145B1288805F000FF2888072100F04C -:10CBF00036FF00B1FFDF1B20E0702770BDE8FC812D -:10CC00002DE9F041304C0646207828B1BDE8F041CE -:10CC10002D210E2000F0A0B93088072100F00DFF73 -:10CC200005004FF0010720D095F8D10040B995F8E4 -:10CC30003C000F2801D0102802D195F8040150B112 -:10CC40000C2020710E20A0702D20E0703088E08034 -:10CC50006771277072E51022B11C05F1D2000EF049 -:10CC6000E9F885F8D1700020EBE70220E9E770B51C -:10CC7000154C0546207828B1BDE870402E210E20C5 -:10CC800000F06AB92888072100F0D7FE022178B1A8 -:10CC900090F8D1202AB990F83C200F2A04D0102A0D -:10CCA00002D00C20207104E080F8D1100020F9E7B8 -:10CCB00021710E20A0702E20E0702888E0800120D5 -:10CCC00060712070EDE50000380800205000002061 -:10CCD0007CB5C54C0546207820B137210E2000F0E8 -:10CCE0003BF97CBD28886946FEF70FFD38B102206C -:10CCF0002071012060713721E17020707CBD0198A6 -:10CD00007F22014680F8382080F83920002280F800 -:10CD10003A20A87801F8280FE878487028798870B8 -:10CD20002271E6E71CB5B04C217821B113210E2009 -:10CD300000F012F91CBD00886946FEF7E6FC08B158 -:10CD4000022005E0019890F82810012902D00C205B -:10CD5000207106E0382100222271095C21720088CE -:10CD6000E080012060711321E1700E21A17020701C -:10CD70001CBD2DE9F0419C4C0546207828B1BDE84A -:10CD8000F04135210E2000F0E7B8A87808B101285D -:10CD900003D1A888B0F5FA7F01D912202071288824 -:10CDA000072100F04AFE0126A0B1002780F8C870D4 -:10CDB000A988A0F8CA1080F8A460A978012900D039 -:10CDC000002180F8C81090F8A50008B108F01CFEFA -:10CDD000277101E00220207166713520E070267015 -:10CDE000ACE42DE9F041804C0546207828B1BDE83F -:10CDF000F0413C210E2000F0AFB82888072100F058 -:10CE00001CFE012358B382886D88C688418803EBD5 -:10CE10004207BD4217D342F210777E43BF107943D9 -:10CE2000B6FBF1F1491E89B24FF4FA76B14200D94E -:10CE300031468D4200D22946491C521CB1FBF2F109 -:10CE40005143491E8AB290F8F01001B90284E28081 -:10CE50000020207163713C20E07023706EE402209A -:10CE6000F7E770B5604C0546207828B1BDE8704002 -:10CE700033210E2000F070B808F096F808B10C20AD -:10CE800017E0297889B10A290FD014290DD01E295D -:10CE90000BD0282909D0322907D04B2905D0642985 -:10CEA00003D0FF2901D0122003E0284608F04FFDEF -:10CEB00000202071012060713321E1702070F0E4C6 -:10CEC00049490A781AB13F210E2000F045B80022E6 -:10CED0000A710278454B4AB1012A0CD01220087120 -:10CEE000012048713F22CA700870F4E4D0F80100B4 -:10CEF000C3F80200F4E7D0F80100C3F80600EFE73A -:10CF000070B5394C0546207828B1BDE870403D2108 -:10CF10000E2000F021B808F047F810B908F04AF8E0 -:10CF200008B10C2003E0287805F060FF0020207194 -:10CF3000012060713D21E1702070B2E410B50178EC -:10CF4000402907D22A4A52F8211019B1801C88477B -:10CF5000012010BD002010BD234A92F83130002B73 -:10CF600006D182F8320082F83310012082F83100B5 -:10CF7000B1E430B5134606E0CC18D51A14F8014CCC -:10CF80005B1E4455DBB2002BF6D130BD90F8491042 -:10CF900041B990F8981029B190F89800042801D070 -:10CFA000012098E4002096E40178406821B190F8CF -:10CFB000490010B100208EE4E8E701208BE40A4824 -:10CFC0000021C0F8F81080F8C41084E40178012929 -:10CFD00009D1406890F8A510002904D0002180F8FC -:10CFE000A51008F011BD76E43808002038090020AB -:10CFF0004CB301003D3070470844C01D424301F16D -:10D000003D00104480B2704770B51C460546A0181C -:10D01000049BC01D00FB03F204F13D00104486B2E6 -:10D02000B14238BFFFDF1C2128460DF07AFFA6F180 -:10D030001C0080B22C752880B0F5004F88BFFFDF40 -:10D0400070BD008870472DE9F04F0E468188044678 -:10D0500000F11C0AC088154620F4004221F4004368 -:10D06000002721F4004820F400499A4208D100F436 -:10D07000004001F4004188421CBF0020BDE8F08F51 -:10D08000C14517D9207DA9EB0801091AC91F8D4296 -:10D0900027DCC11D0AEB08000144C91E71603581FF -:10D0A000F7603782011D3160058047800120A07440 -:10D0B000BDE8F08F2088217DA0EB0800401AB0F178 -:10D0C000070B0ED4BBF11B0FB8BFFFDF5D45D4BF0C -:10D0D00028461FFA8BF0291A0A04120C18BF4A4579 -:10D0E00003DDA7740020BDE8F08F217DCB1D0AEB86 -:10D0F00008010B44DB1E7360308104F11C03F360F4 -:10D1000032820B1D336008804A800120A074BDE884 -:10D11000F08F2DE9F041044600F11C02808820F4D4 -:10D120000043A07C002808BFBDE8F081D018028829 -:10D13000438813448B423CBF0020BDE8F0810027A8 -:10D1400091429CBF0180478013D9891A0D042D0C90 -:10D1500045800ED0A088261D20F40040854288BF5F -:10D16000FFDF30884FF4004121EA0000284330807F -:10D1700008E0217D0088CB1D184481B22288201D43 -:10D1800000F09AFAA7740120BDE8F08130B4B0F83D -:10D1900002C08488034600F11C052CF4004028449A -:10D1A000A44503D10020D88130BC7047B3F80AC031 -:10D1B0000488A44509D34088ACEB040CA0EB0C0018 -:10D1C00084B20CEB0500C01E06E0A4EB0C041D7D30 -:10D1D000A4B2AC446044001DB1F800C0A44588BFAF -:10D1E0000C80B3F80AC0BCF1000F0CBF4FF0010C6B -:10D1F0004FF0000C82F800C00988D98130BC70471C -:10D200002DE9F041044600F11C01408820F4004063 -:10D210004518E089002808BFBDE8F081618908440D -:10D2200080B2608129886A881144814238BFFFDF5B -:10D2300028886D88628941190027914218D175B1FB -:10D240006088A61C20F40040A84238BFFFDF308869 -:10D250004FF4004121EA00002843308007E0217D9F -:10D260002288CB1D184481B2A01C00F025FA6781EA -:10D27000E7810120BDE8F0812DE9F0470189B0F890 -:10D2800002800027044600F11C0A414518BF4FF4F4 -:10D29000004938D021F400400AEB00014E886EB1FD -:10D2A000208904F1080520F40040B04238BFFFDFB8 -:10D2B000288829EA0000304328801FE0207D238948 -:10D2C000C21D088823F4004510442188284480B2F8 -:10D2D00004F1080C88420AD2091A89B21B32914221 -:10D2E0002CBF03F4004129EA030004D204E0401AF1 -:10D2F00080B229EA03010843ACF80000781C2189B8 -:10D3000087B24145C6D13846BDE8F0872DE9F047E0 -:10D31000B0F806800B46044600F11C01B0F80890F6 -:10D32000408828F4004C01EB0C05804504BF002028 -:10D33000BDE8F087002A1CBF281D106023B1227DA4 -:10D34000291D18460DF076FD2F886D8885B1E819E6 -:10D3500087B2E088A61D20F40040A84238BFFFDF56 -:10D3600030884FF4004121EA00002843308007E074 -:10D37000207D2288C31DD81981B2A01D00F09CF920 -:10D38000C84504BFE08820813846BDE8F087418861 -:10D39000808881420CBF0120002070474188C088EE -:10D3A00088420CBF01200020704730B44488828836 -:10D3B00000F11C0324F4004C22F400416344944225 -:10D3C0001BD04289C48915191C885A88A3189D420C -:10D3D00016D312B18A4210D212E0037D0CF1070C71 -:10D3E0001A196244008892B2801A80B2223398429D -:10D3F00001D211B104E08A4202D130BC0020704752 -:10D4000030BC012070472DE9F0078588C48800F101 -:10D410001C06024625F4004C24F4004925F4004A79 -:10D42000002024F4004306EB0C074FF00108D1451F -:10D430000AD104F4004405F40045AC4204D0108243 -:10D44000BDE8F00700207047634506D9147DA3EBC3 -:10D450000C031B1BDD1F002305E01488157DA4EBC6 -:10D460000C04641BE51F002DE9DB94895CB13C884A -:10D470007F8847B1DB1BD0748B42E0DB908930445E -:10D48000001BC01E12E02D1BD0748D4206DB107DE8 -:10D490009389C01D60443344184406E08B42CEDBC0 -:10D4A00082F8138090893044001BC01E1182BDE8B1 -:10D4B000F00770472DE9F05F044600F11C088088F2 -:10D4C000924620F4004B208A894608EB0B0608B1EF -:10D4D000484502D20020BDE8F09FA089002804BF83 -:10D4E00000273D4605D0378875887919884218BFCE -:10D4F000FFDFE07C50EA050101D078B338E0A08975 -:10D5000050B1217D4044C91D59440844B4F8151058 -:10D5100020F8031DE17D8170A18907EB09004944D2 -:10D52000A181308000257580207DBAF1000F09D0DF -:10D53000C31D30882288184481B2201D00F0BCF839 -:10D54000A5813AE0A189C01D58444144084430F8FF -:10D55000031DA4F815108078E0752EE0FFE7A08980 -:10D56000B4F815104044C01B20F8031DE17D817004 -:10D5700005EB090085B2A089BAF1000F4844A081EB -:10D580003780758010D0A088261D20F40040A84266 -:10D5900038BFFFDF30884FF4004121EA0000284304 -:10D5A00030800020A08108E0A0894044C01B30F8F2 -:10D5B000031DA4F815108078E07500202082A07467 -:10D5C0000120BDE8F09F10B4B0F802C0848800F1DB -:10D5D0001C022CF400431344A44504D0B0F80AC044 -:10D5E000BCF1000F02D010BC0020704703F1040C06 -:10D5F000C1F800C0007D00F1070C0CEB0300C01E59 -:10D60000486018880881CA605B880B8220B9D01EE8 -:10D6100048600B810020088210BC0120704770B563 -:10D62000044600F11C018288408820F4004319441C -:10D63000904205D06289002A04BFE289002A01D005 -:10D64000002070BD0A884D8885B1A61C20F40040DA -:10D65000A84238BFFFDF30884FF4004121EA0000C4 -:10D66000284330800020E081012070BD207DC31D53 -:10D67000981881B22288A01C00F01EF8F2E7002161 -:10D680008181C1740182817470478289002A04BF3C -:10D6900000207047828800F11C0322F400421A44E3 -:10D6A000B2F800C0BCF1000F1DBF037D121D1A446B -:10D6B000DA1E4A608089704710B4B0F800C02CF4BC -:10D6C0000044214489B24FF4004491420AD2521AD4 -:10D6D00092B21B339A422CBF0CF4004224EA0C0194 -:10D6E00004D204E0891A89B224EA0C0211430180B1 -:10D6F00010BC70472DE9F04188464FF6FC7102F1ED -:10D7000003021E46040002EA010509D00027E01CBE -:10D7100020F00300A04200D0FFDF201D01210CE01B -:10D720000127F4E7024628442FB9B14201D203464B -:10D7300000E000231360491CC9B2B142F2D9011BB9 -:10D74000C8F80010002F04D10EB1201D00E0002009 -:10D750002060BDE8F081024600201168002902D057 -:10D76000084609681160704702680A6001607047E6 -:10D770004FF6FC73C91C1940101A001F90FBF1F002 -:10D78000C0B270474FF6FC73C91C1940001D01FB65 -:10D7900002007047F8B5D24D04460E46A878A04264 -:10D7A00000D8FFDF05EB8607B86A50F8240000B107 -:10D7B000FFDFB868FFF7CFFF05000DD0B86A062E6F -:10D7C00040F824500AD0082E00D3FFDFC548294670 -:10D7D00050F82620204690472846F8BDC048C24B46 -:10D7E0007A30A0F12E0200902946204609F08FF8E9 -:10D7F000F2E72DE9F84F8046DDF828901E4603EB4E -:10D80000090093468A46C4B25FEA080707D000259C -:10D81000FF2800D9FFDFBAF1000F03D101E0012595 -:10D82000F6E7FFDF08F1030020F00301414500D0D7 -:10D83000FFDFCB4500D9FFDF65B9A94A00204C3294 -:10D840004FF6FF7110705180A74A1070A44A7A32C7 -:10D8500010705180A24880F800B046708470C47087 -:10D860000471447180F80690DFF878B2C671002622 -:10D870000BF1400B8146FF1C27F003000746002DEB -:10D8800002D109EB860188603BF8162019F80630B2 -:10D8900001D04FF000006946FFF72CFF0098761C7E -:10D8A000F6B20744082EE6D3FF1C27F003002346F8 -:10D8B000064675B1002002226946FFF71BFF00985B -:10D8C0003118002003464E46C91C21F003021DB149 -:10D8D00010E0C9F84800EEE706EB80070021BA62C5 -:10D8E00006E000BFD7F828C04CF82130491CC9B267 -:10D8F000A142F7D3401CC0B202EB84010828E3D355 -:10D90000A1EB0800AAF800000020BDE8F88F10B5D0 -:10D91000044604F075F808B1102010BD2078704A54 -:10D92000618802EB800092780EE0836A53F8213020 -:10D9300043B14A1C6280A180806A50F82100A06037 -:10D94000002010BD491C89B28A42EED861800520B2 -:10D9500010BD70B505460C46084604F051F808B1F4 -:10D96000102070BD082D01D3072070BD2570002048 -:10D97000608070BD0EB56946FFF7EBFF00B1FFDFB9 -:10D980006846FFF7C4FF08B100200EBD01200EBDA0 -:10D9900010B50446082800D3FFDF5148005D10BDD4 -:10D9A0003EB5054600246946FFF7D3FF18B1FFDFF7 -:10D9B00001E0641CE4B26846FFF7A9FF0028F8D034 -:10D9C0002846FFF7E5FF001BC0B23EBD44498978F9 -:10D9D000814201D9C0B27047FF2070472DE9F04164 -:10D9E0000C460546062901D0072C10D13C4FB86CD7 -:10D9F000FFF7B1FE02004FF6FF7604D00221B86CAB -:10DA0000FFF7B6FE00E030462880B04202D1002089 -:10DA1000BDE8F0812146FFF7BDFE040002D1288851 -:10DA200000F050F82046F3E7A0F57F42FF3A01D01E -:10DA3000082901D300207047ACE6A0F57F42FF3AE9 -:10DA40000BD0082909D2264A9378834205D902EBE4 -:10DA50008101896A51F820007047002070472DE944 -:10DA6000F04104460D46A4F57F4143F20200FF3920 -:10DA7000CED0082D01D30720CAE719494FF000087E -:10DA80008A78A242C4D901EB85072146BA6A52F8C6 -:10DA90002460002EBCD0134A08462032314652F88A -:10DAA00025209047B96A062D41F8248001D0072D22 -:10DAB00002D1204600F006F83146B868FFF754FE60 -:10DAC0000020A5E710B5064CC2B20221A06CFFF7FA -:10DAD00059FE0146A06CBDE81040FFF745BE0000AE -:10DAE000480900204CB40100560000200146A0481F -:10DAF000002200680260037A00EB830040F80C2FDC -:10DB00008180114600F025B92DE9F05F9846DDF8D7 -:10DB100030B0DDF828A01546894604004FF0000615 -:10DB200025D00027E01C20F00300A04200D0FFDF3A -:10DB30007DB30120FFF75EFA00FB05620AEBCB0024 -:10DB4000104486B20120FFF755FA00FB05620B99DD -:10DB500008EBC100104405EB450100EB4100143017 -:10DB600000EB850000EB850086B217B111E00127BC -:10DB7000D8E7A6EB85000C3887B27D48A900046081 -:10DB8000257204F10C0060600DF0EDF93846FFF7E6 -:10DB9000ADFFA9F800600020BDE8F09F2DE9FF4F20 -:10DBA000734C814681B020689A468B4600B9FFDFEE -:10DBB0002068027A4A4503D9426852F8291021B1F7 -:10DBC00043F2020005B0BDE8F08F006800B9FFDF46 -:10DBD00001210E9A0398FFF70FFAC61C4FF6FC7549 -:10DBE0002E40584601215246FFF706FAC01C00EAB3 -:10DBF000050808EB0600001D85B25D480027006897 -:10DC0000046801E027460446206838B1A188A9428B -:10DC1000F8D13946204600F0A4F813E005F10800D9 -:10DC2000A18880B2814229D33946204600F099F874 -:10DC3000A0880022411B601902608180394600F0F3 -:10DC400088F8A580A08860802680251D0E9F01236E -:10DC5000039A314628460097FFF7D6F920884146B7 -:10DC600028445A460123CDF800A0FFF7CDF94048DB -:10DC700000684168002041F82940A3E70420A1E79B -:10DC800070B53B4C0546206800B9FFDF2068017A7B -:10DC9000A94210D9426852F8250060B1418800239A -:10DCA00042F8253003608180194600F052F821685F -:10DCB00000200A7A08E043F2020070BD4B6853F876 -:10DCC00020306BB9401CC0B28242F7D8002002E07D -:10DCD0008A88104480B209680029F9D1FFF706FF4D -:10DCE000002070BD70B5224D286800280AD000249D -:10DCF00004E02046FFF7C4FF641CE4B22868007A01 -:10DD0000A042F6D870BD70B5194E054600243068A3 -:10DD100000B9FFDF3068017AA94204D9406850F8A1 -:10DD2000250000B1041D204670BD70B5104E05469B -:10DD30000024306800B9FFDF3068017AA94206D9B3 -:10DD4000406850F8251011B131F8040B44182046F2 -:10DD500070BD19B10A68026008607047044909681B -:10DD6000F8E7006809B10860704701490968FAE7F7 -:10DD70005C00002070B5044600780E4601281AD0D9 -:10DD8000072802D00C281AD115E0A068216905786F -:10DD90000B2D0CD0052003F0CCFD052D0FD07823E2 -:10DDA00000220520D4F8101003F026FD07E07823A8 -:10DDB00000220620F8E70520216903F0BAFD31466C -:10DDC0002046BDE8704001F0BDB910B500F1390240 -:10DDD000C3799478411D64F003042340C371DB07C9 -:10DDE0000DD04B79547923404B710B791279134044 -:10DDF0000B718278C9788A4200D9817010BD0022E7 -:10DE00004A710A71F5E74178012900D00C210170AF -:10DE100070472DE9F74F86B000208C698DF800001F -:10DE20000878012617460D464FF0070B4FF01109F1 -:10DE30004FF00A0A2A2878D2DFE810F02A001A03E5 -:10DE400058036D03A703B603D203FF03160440046F -:10DE500068048704A004DD04EE04110519053905E2 -:10DE60005E058905AC05D705F505FF0521063206D7 -:10DE7000440676069806EA0621072F075A077A070E -:10DE80008E079F07D80710083C08F807FC07020810 -:10DE900014B120781D2829D0D5F808805FEA080041 -:10DEA00043D001208DF80000686A049003208DF8AB -:10DEB00004008DF805A0286A0290A8880028EFD0F9 -:10DEC00098F8001091B10F2910D27DD2DFE801F04F -:10DED0007C144BDCFEFDFCFBFAF9F8089EF7F6001B -:10DEE000022822D124B120780C2801D0002676E324 -:10DEF00002208DF80000B7E10620696A03F019FDE1 -:10DF0000A8880728EDD1204601F017F9022809D08A -:10DF1000204601F012F9032808D9204601F00DF936 -:10DF2000072803D20120207005E016E2002CB7D0AC -:10DF300020780128D5D198F80400C11F0A2902D3FE -:10DF400085F81CA093E2A070D8F80010A163B8F87F -:10DF50000410A18798F8060084F83E00012028707C -:10DF60000320207046E00728BBD1002C98D02078F1 -:10DF70000D28B6D198F8031094F83B20C1F3C000E7 -:10DF8000C2F3C002104201D00E2000E00F2089072A -:10DF900007D198F805100142D2D198F80610014235 -:10DFA000CED194F83D2098F8051020EA02021142E3 -:10DFB000C6D194F83E2098F8061090430142BFD194 -:10DFC00098F80400C11F00E04FE20A29B8D2617F2F -:10DFD000814201D90620C9E3D8F800106160B8F881 -:10DFE0000410218198F80600A072012028700E20EC -:10DFF000207003208DF80000686A049004F1390055 -:10E000000190601D029017300390E1E0B5F806B072 -:10E0100041288FD1204601F090F8042802D1E07801 -:10E02000C00704D1204601F088F80F289CD1CBF11D -:10E030004002164608F10101606A0CF0FBFE606ABE -:10E040005A463044E9680CF0F5FE0E208DF80000C9 -:10E05000686A0490606A019000216846FFF78AFEB2 -:10E060002078042808D0A07F48B1012807D00328D1 -:10E0700008D010202070A2E00520207015E284F85E -:10E08000009033E71220F5E71128C2D1204601F0B5 -:10E0900054F8042802D1E078C00719D0204601F0D6 -:10E0A0004CF8062805D1E078C00711D1A07F0228DE -:10E0B0000ED0204601F041F8112808E0B9E089E0CF -:10E0C000A1E178E158E110E1EFE0D5E01DE0A0D159 -:10E0D000102208F1010104F148000CF0ABFE607859 -:10E0E000012809D012202070E078C0076BD0A07FF3 -:10E0F000A0B3012863D066E0607FA17888423FF634 -:10E1000069AF00BF84F800B059E011288ED12046D5 -:10E1100001F013F8082804D0204601F00EF8132867 -:10E1200084D12869D8B16869C8B104F17800102297 -:10E1300008F1010106460CF07DFE2078082812D077 -:10E1400014202070E078C0070FD0A07F022818D0DC -:10E150006178022912D0032831D034E02FE000206A -:10E160008DF80000F9E00920EBE70B202870296901 -:10E1700002204870206CC1E9010695E208B101282F -:10E1800079D10B202870296908204870606A48609E -:10E19000206AC1E902067BE2206CE2780068C2F3E3 -:10E1A0004402521ED04000F0010040F0800000E028 -:10E1B00000200874E06A48617FE20646FEE304201E -:10E1C00028700520EBE185F800A08DF800A0B9E3E8 -:10E1D0003946F4E31128C5D1204600F0AEFF0A28E5 -:10E1E00002D1E078C00704D1204600F0A6FF152830 -:10E1F000B8D1102208F1010104F148000CF01AFE18 -:10E2000020780A2810D01620207012202870296942 -:10E2100004F1580081F801A048602030886010386F -:10E22000C860206C0861AFE30B202070E1E2287029 -:10E23000D4E1022896D1204600F07FFF042804D3C1 -:10E24000204600F07AFF082809D3204600F075FF29 -:10E250000E2887D3204600F070FF12287DD2A07FC1 -:10E260000228B8D18DF80090686A049098F80100EF -:10E270008DF80400FEE367E20228ACD1204600F0EE -:10E280005CFF002869D0204600F057FF0128F9D034 -:10E29000204600F052FF0C28F4D005208DF8040031 -:10E2A00098F801008DF805005CE71128FCD1002CDE -:10E2B000FAD020781728F7D16178E06A022912D0C5 -:10E2C0005FF0000101EB4101182606EBC1011022AD -:10E2D000405808F101010CF0ADFD0520696A00F01D -:10E2E0001FFF267002E60121ECE70B28DCD1002C91 -:10E2F000DAD020781828D7D16178E06A02292DD0A9 -:10E300005FF0000101EB4101102202EBC101415815 -:10E31000B8F8010008806078E16A022821D0002066 -:10E3200000EB4002142000EBC2000958404650F8B0 -:10E33000032F0A60406848600520696A00F0F0FE1B -:10E340006078022810D04FF000002044407A20F07E -:10E3500001010CD14FF001000BE0D3E14FF00101BE -:10E36000D0E74FF00100DBE74FF00100EDE74FF0A1 -:10E3700000002044417281E3112895D1002C93D0F4 -:10E380002078192890D16178E06A022911D0002103 -:10E3900001EB41011C2202EBC1011022405808F19F -:10E3A00001010CF047FD0520696A00F0B9FE1A2052 -:10E3B000E9E00121ECE7082898D1002C98D02078DA -:10E3C0001A2893D1E16A98F801000870E16AD8F838 -:10E3D000022041F8012FB8F8060088800520696AFC -:10E3E00000F09EFE6078022807D04FF00000204425 -:10E3F000407A20F002002CD034E04FF00100F6E724 -:10E40000214448723AE31128B7D1002CB7D02078C4 -:10E410001B28B2D16178E06A02291DD05FF00001AB -:10E4200001EB4101202202EBC1011022405808F10A -:10E4300001010CF0FFFC0520696A00F071FE6078B4 -:10E4400002280CD04FF000002044407A20F0040055 -:10E4500008D14FF00101D3E74FF00101E0E74FF0A1 -:10E460000100F1E74FF00001CAE785F81CB0F4E3C2 -:10E470003878012886D11C2204F11C0079680CF040 -:10E480001EFDE079C10894F83B0001EAD001E07874 -:10E4900061F30000E070217F09B1297732E1217832 -:10E4A00003290AD0C0073FF4E6AD032028708DF899 -:10E4B00000A0686A04904120A7E302262671E17952 -:10E4C000204621F0E001E171617A21F0F0016172F2 -:10E4D000A17A21F0F001A172FFF777FC2E708DF880 -:10E4E00000A0686A04908DF804B071E638781228AC -:10E4F000D4D18DF800B0696A049191680291ADF8A9 -:10E5000004B008466168016021898180A17A817127 -:10E5100004202070AEE23878B7F806801228BDD10A -:10E520008DF800B0686A0490381D01AB07C883E815 -:10E5300007004120ADF8040008460C2100F8011B3B -:10E54000C8F140063246216A0CF074FC206A42464B -:10E550008119F8680CF06EFC00216846FFF70AFC90 -:10E56000E07820F03E00801CE0702078052801D083 -:10E570000F2008E0A07F00283FF4C4AD0128FBD0A5 -:10E58000032870D108202070B0E43878032885D1A2 -:10E5900078680168A1664068E066052028708DF8FB -:10E5A0000000686A049013E638780328A0D17868E0 -:10E5B0000168216740686067206C68B9A07F28B156 -:10E5C000012803D0062028700420E8E785F800B071 -:10E5D000FE482064606401E085F800B00326F0E3A3 -:10E5E0003878022884D13879E0BBA07F02280BD08C -:10E5F0000328F1D1607801280BD0A07994F83A1063 -:10E6000001280AD0F1480BE0B86800287AD02064CD -:10E6100011E0A17994F83A00F2E7B8680028F5D043 -:10E620002064E078C00701D0012901D0E74802E06A -:10E63000F8680028EAD06064CEE78DF800A0696A27 -:10E640000491E1785046C90709D06178022903D1C5 -:10E65000A17F29B1012903D0A17F032900D008207F -:10E66000287046E101E1BFE0387812288FD1B86800 -:10E67000286209202870E0782969C0070DD0082099 -:10E680004870206A4860606A886004F16800C86069 -:10E69000A07F02287FF48CAD7EE502204870206CBC -:10E6A000486004F16800886004F13800C860201DEB -:10E6B0000861206B4861606B88612EE2E1783878F0 -:10E6C000C90701D0072100E00B2188428AD12078B8 -:10E6D000072818D084F800908DF800B0686A04907C -:10E6E000286A0290ADF80490032100F8011B5168DC -:10E6F00010220CF09FFB00216846FFF73BFB002037 -:10E700002862BEE44CE208202070E5E73878122841 -:10E71000ACD18DF800B0686A049090680290ADF8B2 -:10E720000490042100F8011B102204F168010CF090 -:10E7300081FB00216846FFF71DFB2078092801D0E6 -:10E74000132020E784F800A016E0E1783878C907A4 -:10E7500001D0072100E00B21884287D1102204F16B -:10E76000480079680CF03AFB10B104202877B1E337 -:10E77000207809283FF4BFAC0C2058E5E078C107A9 -:10E7800037D0A17F012902D002291BD02EE00D2015 -:10E79000287029690B2048706078012809D0206A08 -:10E7A0004860606A886004F16800C86010300861E1 -:10E7B00000E5606A4860206A886004F17800C860FB -:10E7C0001038F4E7C0F3440114290FD24FF0006170 -:10E7D00001EBB0104FEAB060E0706078012803D020 -:10E7E00010202070042061E10620CCE6607801282A -:10E7F00087D00E201BE538780A2889D185F800A03B -:10E8000010208DF80000686A049050680190002183 -:10E810006846FFF7AFFAE9E7E078C0070AD0A07FC3 -:10E82000012803D10F202870042041E11020287016 -:10E830000F203DE115202870296903204870206CC5 -:10E8400048606078012805D004F1780088601038AD -:10E85000C86062E104F1680088601030F8E7387839 -:10E860000228CAD138790028E0D0287730E33878F8 -:10E870001428FBD185F80090296909204870786830 -:10E880004860607801280DD004F16800886010307D -:10E89000C860206B0861606B486104F158008861B2 -:10E8A000A06A22E004F1780088601038F0E7387838 -:10E8B0000828DBD16078012801D0132043E2A17839 -:10E8C000A06A0844C1F110010CF02BFB1220287043 -:10E8D000296904F1580081F801A04860203088605F -:10E8E0001038C860206C086147E0C861E06A0862BF -:10E8F00013E18DF80490DFE038780928B6D11022B2 -:10E9000004F1480079680CF069FA08B10B202DE792 -:10E9100020780B2812D02046FFF757FAA178A06A7A -:10E920000844C1F110010CF0FCFA162028700820F0 -:10E930008DF80000686A049000206FE013202870B2 -:10E940008DF800A0686A04908DF8049040E438784F -:10E9500012288BD1B868286214202870296904F124 -:10E96000580081F801A04860103088601030C860FD -:10E97000606C08616078012806D004F139004861B4 -:10E98000206B8861606BB0E7601D4861606B8861D7 -:10E99000206BAAE7387809288BD18DF800B0686A17 -:10E9A0000490286A0290ADF804900D2100F8011B34 -:10E9B000102279680CF03EFA002101E077E27CE059 -:10E9C0006846FFF7D7F90020286201E06AB5010028 -:10E9D0006178012901D01520D5E51621297008217B -:10E9E0008DF80010696A049118E038780C2885D1F8 -:10E9F000162028706078022802D12046FFF7E5F93A -:10EA0000A07879680A18C0F1100110460CF089FA54 -:10EA100008208DF80000686A049078680190A0785A -:10EA20008DF8080061E53878102892D1E079C007A8 -:10EA300079D01720287009203AE03878112888D139 -:10EA40001422391D04F11C000CF039FAE16A208D02 -:10EA5000A1F80900E16AA078C871E179E26A01F0E1 -:10EA600003011172E16A627A0A73E16AA07A81F89D -:10EA7000240000E045E26078012876D0B4E16078B7 -:10EA8000022801D0012000E000202044407AC00785 -:10EA900004D0E078C00701D1192054E11E206CE6B3 -:10EAA000387812287CD1B86828621A20287005208E -:10EAB0008DF80000686A049011466846FFF75AF91D -:10EAC000FFF77BBB387803286AD16078E16A0228B7 -:10EAD00001D0012000E0002000EB4002142000EBF8 -:10EAE000C20289587A6813680B6052684A601B2119 -:10EAF0002970D5E9041206234B70636A4B6066786F -:10EB0000E36A022E01D0012600E0002606EB46064D -:10EB100000EBC6001858C1E90202686A486206980C -:10EB200000F027FBCCE788E138780F2838D16078EF -:10EB3000E26A022801D0012000E0002000EB400042 -:10EB4000102101EBC00002231058093279680AF045 -:10EB50006DFC1C202870296905204870206A4860D7 -:10EB6000E06A09308860FA4872E65BE138780E287E -:10EB700016D16178E06A022901D0012100E000216C -:10EB800001EB4101182606EBC101A27840587968D3 -:10EB90000CF050F96178E06A022902D0012101E00D -:10EBA000B8E0002101EB410106EBC1014158A0781A -:10EBB0000A18C0F1100110460CF0B3F98DF800B03E -:10EBC000686A0490286A0290ADF8049006210170EA -:10EBD0006278E16A022A01D0012200E0002202EB01 -:10EBE000420206EBC202401C895810220CF022F9A6 -:10EBF00000216846FFF7BEF8002028621D2028701B -:10EC00008DF800A0686A04900B208DF804006CE475 -:10EC1000387812287ED18DF800B0686A0490906828 -:10EC200002900B20ADF80400029880F800B06278E2 -:10EC3000E16A022A01D0012200E0002202EB420236 -:10EC4000102303EBC20289580988A0F801106178EB -:10EC5000E26A022902D0012101E03BE1002101EB3F -:10EC60004103142101EBC30151580A6840F8032FF6 -:10EC70004968416000216846FFF77CF80EE760783C -:10EC8000022801D0012000E000202044407A8007C3 -:10EC900001D51F2057E021206FE53878122839D19F -:10ECA0008DF800B0686A0490B8680290ADF80490DE -:10ECB000082606706278E16A022A01D0012200E08B -:10ECC000002202EB42021C2303EBC202401C8958C3 -:10ECD00010220CF0AFF800216846FFF74BF8202017 -:10ECE00028708DF800A0686A04908DF804605AE4DA -:10ECF000387812280ED18DF800B0686A04909068B8 -:10ED000002900820ADF80400029809210170E16921 -:10ED1000097800E093E04170E16951F8012FC0F8F3 -:10ED200002208988C18000216846FFF723F8B2E7F6 -:10ED30006078022801D0012100E000212144497AB5 -:10ED4000490706D5222028708DF800A0686A049033 -:10ED5000CFE5012848D067E0387812286FD1B8682D -:10ED6000286223202870296905204870206A48609D -:10ED7000E06A0930886077486AE538780E285ED105 -:10ED80006178E06A022901D0012100E0002101EB55 -:10ED90004101202606EBC1014058516810220CF0B9 -:10EDA00049F88DF800B0686A0490286A0290ADF8BE -:10EDB000049080F800A06278E16A022A02D0012261 -:10EDC00001E0A4E0002202EB420206EBC202401C7A -:10EDD000895810220CF02EF800216846FEF7CAFF71 -:10EDE000002028626078B4E72420C6E46078022816 -:10EDF0000BD000202044407AC10702D0E178C90737 -:10EE000005D0810705D519209BE40120F2E71720E2 -:10EE100097E4400701D51B2093E41C202070607804 -:10EE2000012801D01820A8E42720A6E42820287073 -:10EE30000B203DE6387813284AD129209DE40CE0C8 -:10EE40002078012844D00C2842D02046FEF7DBFF72 -:10EE50000C208DF80000686A049039E038784FF093 -:10EE60002608122805D013201070032685F800808C -:10EE70004DE08DF800B0686A0490B86802900220F6 -:10EE8000ADF80400029805210170297F417000212E -:10EE90006846FEF76FFF0B208DF80000686A04904B -:10EEA00039466846FEF766FF064685F80080012E63 -:10EEB0000ED02CE001208DF80000686A0490042038 -:10EEC0008DF80400287F8DF805000020287712E0D7 -:10EED000287F80B11D202070252028708DF800A08B -:10EEE000686A049002208DF8040039466846FEF7EF -:10EEF00041FF06460BE00CB1FE2020709DF800009B -:10EF000028B100216846FEF735FFFEF7EFBF09B0D4 -:10EF10003046BDE8F08F2DE9F04F0C4601274E69D1 -:10EF2000097885B09046BA464FF00209072021B112 -:10EF300001294FD0022920D1C9E0217901290BD024 -:10EF4000022916D0032911D0042916D11CE0000093 -:10EF500062B501009CB40100707801280CD1062034 -:10EF6000616A02F0BFFC002807D11AE01D20307052 -:10EF700017E07178022901D0052796E031780C2935 -:10EF800027D18DF804000EE03078011F042902D348 -:10EF90000E3803281DD2B07F02281AD120890228FA -:10EFA00017D38DF8049084F800A020899DF80410F0 -:10EFB000884203D20A208DF800003FE01221083475 -:10EFC00088F8001094E80E00C8E901120327C8F879 -:10EFD0000C306AE098F80010122966D18DF8000014 -:10EFE000616A0491D8F80850029521794FF00B0B13 -:10EFF000012906D0022929D0032911D0042954D18E -:10F000005AE0ADF8049085F800B0207E4F4600F03D -:10F010001F00687000216846FEF7ACFE377043E0C1 -:10F02000ADF8049005202870207E68704E460021BF -:10F030006846FEF79FFE26708DF800B0606A049067 -:10F0400041466846FEF796FE07462EE0ADF80400FE -:10F0500085F800A0207F6870607F00F00100A87034 -:10F06000A07F00F01F00E870E17F2971C0071FD06A -:10F0700094F8200000F00F00687194F8210000F06F -:10F080000F00A87100216846FEF774FE2868B0637F -:10F09000A888B087A87986F83E00A0694078707784 -:10F0A0002879B0700D2030700027384605B030E761 -:10F0B0000020A8716871E5E7ADF804900E20287073 -:10F0C000207E687000216846FEF754FEECE7FE20C3 -:10F0D00030708DF800A0606A049004208DF8040060 -:10F0E000207E8DF80500EDE700B50023012285B0F4 -:10F0F00005280FD006280BD102208DF8002004919E -:10F100008DF804008DF8053000216846FEF732FEC8 -:10F1100005B000BD8DF8002004918DF80420F1E7C2 -:10F1200070B50C46054602F004FC21462846BDE8B1 -:10F1300070407823002202F05FBB08B1007870476E -:10F140000C20704770B50C0005784FF000010CD012 -:10F1500021702146F4F70EF973482178405D88420A -:10F1600001D1032070BD022070BDF4F703F9002027 -:10F1700070BD027B032A05D000220A704B780C2B4D -:10F1800002D003E0042070470A770A62027B9300F2 -:10F19000521C0273C15003207047F0B585B00F4672 -:10F1A00005460124287B05EB800050F8046C70783C -:10F1B000411E0D290AD25C493A46123101EB80000A -:10F1C000314650F8043C2846984704460CB1012CBF -:10F1D00011D1287B401E10F0FF00287301D00324BA -:10F1E000E0E70D208DF80000706A04900021019680 -:10F1F0006846FFF7A7FF032CD4D005B02046F0BD2A -:10F2000070B515460A46044629461046FFF7C5FF65 -:10F21000064674B12078FE280BD1207E30B1002044 -:10F220002870294604F10C00FFF7B7FF2046FEF7CF -:10F23000EAFD304670BD704770B50D460446882122 -:10F240000BF091FE012D03D0022D03D0052070BDDF -:10F25000012000E0022060702046FEF7D4FD00206F -:10F2600070BD28B1027E1AB10A4600F10C01C7E751 -:10F270000120704730B5044687B00D46062002F0E5 -:10F2800058FB2946052002F054FB2078FE2806D0C2 -:10F2900000208DF8000069462046FFF7E2FF07B026 -:10F2A00030BD7FB50E4600218DF80C1041780C2939 -:10F2B00003D00D2903D0002405E0846900E04469EF -:10F2C0000CB1217E91B16D4601462846FFF751FFF2 -:10F2D000032809D1324629462046FFF791FF9DF8C1 -:10F2E0000C10002900D0042004B070BD04F10C05FE -:10F2F000EAE710B590B00C4607900B480521801E38 -:10F3000008900A488DF8191009900F92694606A8CE -:10F31000FFF7C7FF002805D11022204601990BF006 -:10F3200089FD002010B010BDA2B4010062B501003B -:10F3300070B50D46040011D085B1210128460BF0AF -:10F34000F0FD10224E4928460BF074FD4C48012177 -:10F350000838018044804560002070BD012070BDE8 -:10F3600070B5474E00240546083E10E07068AA7B41 -:10F3700000EB0410817B914208D1C17BEA7B914272 -:10F3800004D10C2229460BF029FD30B1641C3088D1 -:10F390008442EBDB4FF0FF3070BD204670BD70B58E -:10F3A0000D46060006D02DB1FFF7DAFF002803DB7B -:10F3B000401C14E0102070BD314C083C208862884D -:10F3C000411C914201D9042070BD6168102201EBFB -:10F3D000001031460BF02EFD2088401C2080287044 -:10F3E000002070BD70B514460D0018D0BCB10021CE -:10F3F000A170022802D0102811D105E0288870B130 -:10F400000121A170108008E02846FFF7A9FF00281D -:10F4100005DB401CA070A8892080002070BD012061 -:10F4200070BD70B5054614460E000BD0002030703C -:10F43000A878012808D005D91149A1F108010A8846 -:10F4400090420AD9012070BD24B128782070288804 -:10F45000000A5070022008700FE064B14968102261 -:10F4600001EB0011204610390BF0E4FC28782073E2 -:10F470002888000A607310203070002070BD0000E2 -:10F48000680000202DE9F041FE4C207EE17D88429D -:10F4900008BFBDE8F0810126FB4D0027E07D215C1F -:10F4A00001EB810205EB8200037C052B10D0037C6D -:10F4B000062B1BD0037C072B27D0437C012B18BFC6 -:10F4C000FFDF30D0207EE17D8842E7D1BDE8F081CA -:10F4D0000674E07D16281ABFE07D401C0020E07510 -:10F4E000481CC0B255F8222002210CE00674E07DD1 -:10F4F00016281ABFE07D401C0020E075481C55F816 -:10F500002220C0B203219047DCE70674E07D162874 -:10F510001ABFE07D401C0020E075481CC0B255F8C1 -:10F5200022200821EFE74774E07D16280EBF002057 -:10F53000E07D401CE075481CC0B255F82220072130 -:10F54000E1E770B5D14E00240C2086F82900A6F51D -:10F550003B70254680F8CD4180F8CC4100F5F47031 -:10F560000476C47506F12C000AF0B2FDA6F58E7083 -:10F57000057586F82B50601EB06086F8255086F819 -:10F58000225086F8235086F8245086F82150C0482F -:10F5900005704570A6F1E80004EB840100EB8101E1 -:10F5A0000D74611CCCB20B2CF6D30120F9F726FBAD -:10F5B0000020F9F723FB012086F82600F9F7D2FF97 -:10F5C000B448F9F7DEFFB44C2070B448F9F7D9FF1E -:10F5D0006070BDE87040F9F7A5BA10B5F9F7D0FA38 -:10F5E000AD4C2078F9F7E6FF6078F9F7E3FFA74C18 -:10F5F00094F82800002808BF10BDF9F7CAFC0020C5 -:10F6000084F8280010BD0B20704770B5F9F79BFBFC -:10F610009E4C054694F8260000281CBFFFDF70BDF5 -:10F6200094F82B00002808BFFFDF6FF07F4260696D -:10F630000026291AB1F5800F24BF431BB3F5800FB4 -:10F640000DD38A4203D2101A2844411C07E09A4283 -:10F6500028BFFFDF05D2511B0844401C414200294E -:10F6600000DBFFDF012584F8265084F82B6094F836 -:10F6700029100420844A01EB810102EB8101087406 -:10F68000A068B0F1FF3F04D0A81EA0600120F9F7E8 -:10F69000B5FA0020F9F7B2FAF9F796FA0AF0A6FEE1 -:10F6A000F9F7DAFB7E48066006604FF0E0214FF480 -:10F6B0000040C1F88002F3F780FC7548007802280A -:10F6C00004D0032805D194F8230010B184F8225007 -:10F6D00001E084F82260BDE87040F9F7A1BB034661 -:10F6E00069490B2000EB800201EB820212F8042C26 -:10F6F00022B1401E10F0FF00F4D1704700EB8002F1 -:10F7000001EB8201012241F8143C01F8042C7047FE -:10F71000012804D0032808BF002926D000E021B327 -:10F720005A4B4FF0000C83F821C0594A00289070C2 -:10F7300014BF022882F803C00BD0072915D2DFE8D6 -:10F7400001F01404060C0E1012001B2000E03A20F9 -:10F75000D070012083F8210070475820F8E7772007 -:10F76000F6E79620F4E7B520F2E700207047484816 -:10F7700010B54078F9F779FB80B210BD421E10B584 -:10F78000414900EB800001EB80040A2A02D814F8FA -:10F79000040C00B9FFDF14F8040C012818BFFFDFC8 -:10F7A000002004F8040C10BD70B53E4C94F8CD0157 -:10F7B00094F8CC1188420CBF01250025F9F7C3FA53 -:10F7C000F9F753FB94F8CD1194F8CC2191420CBF7A -:10F7D00001210021A942E9D170BD2DE9F05F8046E9 -:10F7E0004B1E1746DCB2284804EB840200EB82056E -:10F7F0002E1D287CDFF88C9007282DD199F8170052 -:10F80000002299F818C0844524D000BF19F800C020 -:10F81000A44508BF012200D04AB116280CBF4FF002 -:10F82000000C00F1010C19F80CC009F800C01628F2 -:10F830000CBF0020401CC0B299F818C08445E5D127 -:10F8400042B199F818204846002A0EBF1622027EBF -:10F85000521E0276012028740A2B10D80A4801EBA8 -:10F86000810100EB810010F8040C40B1287C0128D4 -:10F8700006D0287C012802D0B87A012816D0FFDFF4 -:10F88000B87A11E0BC0B0020D80B0020C00C00207F -:10F890007A000020A51601007800002085F4000001 -:10F8A00000F50040D409002001284AD1FE49287CF7 -:10F8B000022816D099F8180016284AD099F818008E -:10F8C00099F81710401C884200D1FFDF01206874AE -:10F8D00099F8180009F8004099F8180016283DD04A -:10F8E0003EE0DFF8C8C39CF829000246A04207D0DA -:10F8F000024600EB820001EB8000807CA042F7D141 -:10F900009CF8293083420CD19CF8292002EB82021A -:10F9100001EB8202927C8CF8292001228CF82A20AB -:10F9200009E000EB800301EB830302EB820201EBB1 -:10F9300082029B7C937400EB800001EB80000C2220 -:10F940008274387A062825D2DFE800F012211E1BC7 -:10F95000181599F817000028B8D1B6E7002002E082 -:10F9600099F81800401C89F818000020BDE8F09FA5 -:10F970004FF0000A11E04FF0B40A0EE04FF0730AA6 -:10F980000BE04FF0320A08E04FF00A0A05E04FF0B2 -:10F99000060A02E0FFDF4FF0000A3868A0EB0A0019 -:10F9A0003060397A00290CBF04210221401A20F06E -:10F9B0007F423260D7E90001084420F07F40706048 -:10F9C000B87A022818BF387B7ED1387A00280CBF5D -:10F9D0000420022000EB0A037868591D00EB010B9C -:10F9E000B3484078504503D9B04991F8231011B17C -:10F9F0000BF1060003E0A0EB0A005844801DAB4960 -:10FA000091F829C0BCF10C0F24D08E4691F8291032 -:10FA100001EB810CA44901EB8C0CDCF804C06245BD -:10FA200018D0DFF890C29EF8292002EB820201EB89 -:10FA300082014A688968A2EB080222F07F42A1EBAA -:10FA4000080121F07F41904298BFB2F5800F49D262 -:10FA50008C4547D34044A0EB0B0020F07F41316040 -:10FA60001944F86821F07F410A1A6FF07F43B2F51C -:10FA7000800F24BFA0EB010CBCF5800F0DD3934287 -:10FA800003D2181A0844421C07E0634528BFFFDF71 -:10FA90001FD2591A0844401C4242002A19DD052091 -:10FAA000287499F8180016282DD099F8180099F89C -:10FAB0001710401C884200D1FFDF99F8180009F8A0 -:10FAC000004099F8180000E00BE016287FF448AFDA -:10FAD00044E73068ABF10501084420F07F407060D6 -:10FAE000002030727068401D20F07F407060787A8E -:10FAF000B072387A0627707203280DD260B101F017 -:10FB000023FB28B108E099F817000028D5D1D3E7E6 -:10FB1000CAF138074FF0320A65480178012918BF49 -:10FB200003290AD14078504507D9604991F823103C -:10FB3000002904BFA0EB0A0007445E4B3068A0EB2D -:10FB40000802706822F07F41A0EB080020F07F4C93 -:10FB50008F4298BFB1F5800F1CD263451AD3534929 -:10FB600091F829300C2B32D091F829704FF00C0B02 -:10FB70004FEA0B0A4C4907EB870301EB8303D3F8E9 -:10FB800008C0ACEB080C944531D8BB469F7C0C2FC9 -:10FB9000F0D199E00520287499F81800162811D0A2 -:10FBA00099F8180099F81710401C884200D1FFDF1F -:10FBB00099F8180009F8004099F8180016287FF401 -:10FBC000CFAECBE699F817000028F1D1EFE702207D -:10FBD000287491F829000C2818BF91F82900A874FE -:10FBE00081F82940012081F82A00BDE8F09F0C2F00 -:10FBF0001CBFBA46002267D00AEB8A0301EB8303DD -:10FC0000D3F804C0ACEB080C844528D29A7B96F854 -:10FC10000AC094451CD30520287499F818001628AA -:10FC200011D099F8180099F81710401C884200D19B -:10FC3000FFDF99F8180009F8004099F81800162815 -:10FC40007FF48EAE8AE699F817000028F1D1EFE72D -:10FC500093F812A00122BAF10C0FCDD103E0002AD3 -:10FC600008BFBA4630D03E460F4806EB860200EB8E -:10FC70008208062188F8101099F81800162836D046 -:10FC800099F8180099F81710401C884200D1FFDF3E -:10FC900099F8180009F8006099F8180016280CBFA8 -:10FCA000002099F8180007E0D80B0020C00C0020B5 -:10FCB0007A000020FFFF3F0018BF401C89F81800A1 -:10FCC00098F81260B245CFD10220FE4E287406F19A -:10FCD000E80090F82910B9420ED185F812A080F8FA -:10FCE0002940012180F82A100120BDE8F09F99F8F1 -:10FCF00017000028CCD1CAE70C2F0BD0BBF10C0F9A -:10FD000008BFFFDF0BEB8B0006EB8000847485F8E7 -:10FD100012A0E9E7BBF10C0F08BFFFDF0BEB8B0074 -:10FD200006EB800084740C20A874DDE730B50D4626 -:10FD3000E54A44190021101A71EB010038BFFFDFBA -:10FD4000E2488542C8BFFFDFE1488542B8BFFFDF18 -:10FD5000E0488442A8BFE04804DA002CAABF20464D -:10FD6000DC4830BD201830BD401E70B5C0B200EB7D -:10FD70008001D44800EB8104607B062810D2DFE8C4 -:10FD800000F0030D0B090705002033E0B4200BE061 -:10FD9000732009E0322007E00A2005E0062003E096 -:10FDA000FFDF617B002029B3022108446168084419 -:10FDB00020F07F40F9F759F894F90C50C24A4419E1 -:10FDC0000021101A71EB010038BFFFDFBF488542E8 -:10FDD000C8BFFFDFBE488542B8BFFFDFBD488442D1 -:10FDE000A8BFBD4804DA002CAABF2046B94870BDA0 -:10FDF000201870BD0421D8E72DE9F04F0646B7481A -:10FE000085B00068C005C00D11D0103840B2002880 -:10FE1000B8BF00F00F0000F1E020B4BF90F8140D5F -:10FE200090F80004400908BF4FF0010A01D04FF0DC -:10FE3000000A3078002817BF01283079002005B06B -:10FE400018BFBDE8F08F062810D2DFE800F0030DE0 -:10FE50000B090705002015E0B4200BE0732009E032 -:10FE6000322007E00A2005E0062003E0FFDF3179B9 -:10FE7000002039B15FF0020100EB0109BAF1000F77 -:10FE800006D101E00421F7E79549002081F8270019 -:10FE90006C4602AA2146B068F8F7F4FF9DF90820E5 -:10FEA000F068211D10440122C01C1F28B8BF019218 -:10FEB00008DB03AAF8F7E6FF9DF80C0010B10198E3 -:10FEC000401C0190DDE900100844401D20F07F40F7 -:10FED0000190A1EB090020F07F40009070798DF82F -:10FEE0000A0000980390F8F72EFF0099019B091A69 -:10FEF000181A7C4A21F07F4120F07F40B1F5800F35 -:10FF000010D282420ED3764890F82950009CAB461E -:10FF1000191B21F07F486FF07F41091BA0F1E80712 -:10FF2000049101E0002080E00C2D26D005EB850037 -:10FF300007EB80026FF07F435068011BB1F5800F23 -:10FF400010D3A4EB000CBCF5800F0BD38B4203D273 -:10FF500004990844411C05E063450DD2181A204459 -:10FF6000401C4142002908DA5D48AB46957C90F878 -:10FF700027000028D8D04CE0FFDF5D4525D00BEBF3 -:10FF80008B0007EB80036FF07F429968081BB0F588 -:10FF9000800F12D3A4EB010CBCF5800F0DD382426D -:10FFA00003D204980844401C07E0624528BFFFDFE5 -:10FFB0000BD2521A1019401C4042002805DD9DF852 -:10FFC0000A009A7B904228BF0C460C2D1CBF9DF85E -:10FFD0000A10434A14D000BF05EB850007EB8000F0 -:10FFE00043681B1B23F07F43434509D2837B99421F -:10FFF00028BF8468857C92F8270050B90C2DEBD17E -:020000040001F9 -:100000000098A04205D004EB080020F07F40009447 -:10001000019000990398814206D001EB090020F07D -:100020007F40F8F722FFB06001202D4991F827109A -:10003000002904BF05B0BDE8F08FBAF1000F3FF40E -:1000400023AF05B0BDE8F08F2DE9F04F814687B0B2 -:100050000C4625480AF044F8244901274FF00008CF -:1000600001EB090500287DD0A1F5887898F81400E7 -:10007000002818BFFFDF2078012800F0238200BF8E -:1000800088F810902078022808BFFFDF184E2079EA -:1000900006F10C023072607970723146A068F8F790 -:1000A000F1FE96F90C000F2804DD1F38307330681C -:1000B000401C306096F90C00E168351D0844C01CF6 -:1000C0001F2817E0D80B0020FF7F841E0020A10707 -:1000D00000E05EF80080841E00807BE104ED00E01B -:1000E000C00C0020FFFF3F00EC0C0020B40C0020EF -:1000F000A40B0020B8BF2F6009DB6A462946F8F739 -:10010000C1FE9DF8000010B12868401C28602078CE -:10011000B07288F81470F64D95F8CD0195F8CC11B1 -:10012000884204BF07B0BDE8F08FF24890F829403C -:100130000C2C00F0CF81F8F706FEEF4904EB8402A7 -:1001400001EB82010A7C042A19BF0A7C032A07B04A -:10015000BDE8F08FE94B4A688968121A22F07F42A5 -:10016000081A00E01BE020F07F40062A3CBF07B0E1 -:10017000BDE8F08FB2F5800F24BF07B0BDE8F08F67 -:1001800083423CBF07B0BDE8F08F95F8CD0195F8EC -:10019000CC11884240F0A78107B0BDE8F08FD44E63 -:1001A00096F8CD01162855D096F8CD0196F8CC11C9 -:1001B000401C884200D1FFDF207801284FD0CC4876 -:1001C00090F8CD1101EB810100EB810080F81090D7 -:1001D000207802284BD0C64890F8CD1101EB810160 -:1001E00000EB8105207928726079687205F10C02B4 -:1001F0002946A068F8F746FE95F90C000F2804DDA3 -:100200001F3828732868401C286095F90C00E168A5 -:100210002E1D0844C01C1F28B8BF376009DB6A4682 -:100220003146F8F72FFE9DF8000010B13068401CF1 -:1002300030602078A872AE4991F8CD0116280EBF23 -:10024000002091F8CD01401C81F8CD01AC4809F0A7 -:100250005DFF60E796F8CC010028ADD1ABE715F85B -:10026000010C002818BFFFDF05F8017CA7E7A548AF -:100270000068C005C00D0FD0103840B20028B8BFCC -:1002800000F00F0000F1E020ACBF90F8000490F8FF -:10029000140D400908BFFFDF954890F8CD1101AA61 -:1002A00001EB810100EB8106E068CDF800808DF85C -:1002B00004806946F8F7E6FD9DF904000F28CCBFDD -:1002C000012000200099351D084401900220B072E1 -:1002D0002079307260797072A068C01C1F28B8BF86 -:1002E0002F6009DB6A462946F8F7CCFD9DF800002F -:1002F00010B12868401C2860307A062810D2DFE848 -:1003000000F0030D0B09070500200BE0B42009E005 -:10031000732007E0322005E00A2003E0062001E018 -:10032000FFDF0020217900290CBF042102210844AD -:1003300002907168401D08440199009001440298A0 -:10034000081A05906B4C002084F82700F8F7FBFC96 -:10035000804630600198404420F07F40F06094F87F -:1003600029000C287ED0204690F8291001EB81024C -:10037000A0F1E80101EB82025468009A274622446A -:1003800022F07F42039296F809B090F82950121B90 -:1003900022F07F4A6FF07F42121BA94604920C2D77 -:1003A00027D0554805EB850100EB81036FF07F42B4 -:1003B0005868011BB1F5800F24BFA4EB000CBCF5FD -:1003C000800F0BD38A4203D204990844411C05E0F4 -:1003D00062450DD2111A0819401C4142002908DA61 -:1003E0004448A9469D7C90F827000028D7D04DE0CE -:1003F000FFDF4D4525D0404809EB890100EB810125 -:100400006FF07F438868021B8146B2F5800F24BFDE -:10041000A4EB000CBCF5800F0DD3934203D2049AD9 -:100420001044421C07E0634528BFFFDF09D21A1AB7 -:100430001019401C4242002A03DD887B834528BFF7 -:100440004C460C2D1CBF2B4BA3F1E80116D000BF6E -:1004500005EB850001EB80025068001B20F07F4017 -:10046000504500E026E009D2907B834528BF946880 -:10047000957C93F8270048B90C2DE9D1A74205D007 -:1004800004EB0A0020F07F4027460390039AA7EB75 -:10049000080121F07F41A2EB0802059822F07F427B -:1004A000B1F5800F06D2904204D30298384420F070 -:1004B0007F4030600F4890F8270000287FF442AF5B -:1004C000B9E600BF15F8010C002818BFFFDF05F8DA -:1004D000017CD5E595F8CD0195F8CC11884204BF93 -:1004E00007B0BDE8F08F07B0BDE8F04FF8F798BC53 -:1004F000D4090020C00C0020D80B0020FFFF3F00D3 -:10050000EC0C002004ED00E00020F8F767BB0120B0 -:10051000F8F764BBFD48007870472DE9F0410546C7 -:1005200002282DD0FA4C94F829000C2808BFFFDFD0 -:10053000002784F82670012684F82B6094F829108F -:100540000320DFF8D08301EB810108EB81010874FF -:10055000F8F76DFCD5B1012D39D0032D1CBFFFDF9D -:10056000BDE8F08194F8290094F82910401CC0B22D -:1005700001EB810158F82120BDE8F0410521104729 -:10058000E2480078BDE8F041F9F71AB8207F00286A -:1005900018BFFFDF84F8256000202760F8F72EFBE6 -:1005A000A168B1F1FF3F04D0012300221846F8F7FB -:1005B00069FB94F8290094F82910401CC0B201EBA3 -:1005C000810158F82120BDE8F041012110470120A8 -:1005D000F8F714FB94F8250000281CBFA068B0F1C0 -:1005E000FF3F0DD094F8290094F82910401CC0B2A8 -:1005F00001EB810158F82120BDE8F04106211047A8 -:10060000207F012815D002281FD0032833D00428CA -:100610001CBFFFDFBDE8F08194F820106068012363 -:10062000411A00221846F8F72DFB94F82800B8BBB1 -:1006300037E094F8240028B184F82470F8F7FEFB22 -:1006400084F823602777BDE8F08194F8280018B972 -:10065000F8F776FC84F8286094F8290094F82910BB -:10066000401CC0B201EB810158F8212000219047C5 -:100670002777BDE8F081217B60680123411A0022C1 -:100680001846F8F7FFFA94F8240028B184F824708B -:10069000F8F7D4FB84F8236002202077BDE8F081CE -:1006A00003E0F8F74DFC84F8286094F8290094F8EA -:1006B0002910401CC0B201EB810158F82120002113 -:1006C00090472677BDE8F08110B5914C94F8290049 -:1006D0000C2808BFFFDF94F8290094F82910401C6B -:1006E000C0B28C4A01EB810152F82120BDE81040D4 -:1006F000042110472DE9F05FF8F725FB844C814673 -:100700004FF00C0B94F829000026A4F1E8084FF0F4 -:10071000010A0C282CD094F82910204601EB810105 -:1007200008EB8101097C042922D090F8291001EB03 -:10073000810108EB8101097C032908BFBDE8F09F16 -:10074000754922696069A2EB090222F07F42A0EBA1 -:10075000090020F07F40062A38BFBDE8F09FB2F5BF -:10076000800F28BFBDE8F09F814238BFBDE8F09FF1 -:10077000A068B0F1FF3F18BFFFDF84F8256094F850 -:100780002900664F0C2806D194F8210018B1F8789A -:100790007870B87838705E4890F829000C281ED020 -:1007A0005B4890F8291001EB810108EB8101097C7D -:1007B000042914D190F829B090F8291001EB810197 -:1007C00008EB810181F810A090F8291001EB81015C -:1007D00008EB8101897C80F8291080F82AA0504C10 -:1007E00094F8CD0194F8CC1104F2DF2588424ED064 -:1007F00094F8CC0100EB800004EB8000007C405DAD -:10080000012894F8CC0100EB800004EB800004D0B8 -:10081000007C405D022878D018E0807A01280DD055 -:1008200094F8CC11022001EB810104EB8101097CD9 -:10083000485594F8CC01162820D01BE094F8CC0140 -:1008400000EB800004EB8000007C465594F8CC015E -:1008500000EB800004EB800294F8CC0100EB8000F8 -:1008600004EB8000017C4846FEF7B7FF94F8CC010A -:10087000162803D094F8CC01401C00E0002084F836 -:10088000CC0194F8CD0194F8CC118842B0D1254C1C -:10089000207D70B1207C415D012966D0405D022839 -:1008A0006BD0207D28B1217C1E4A4846FEF795FF7B -:1008B0002675BBF10C0F06D00BEB8B0008EB80000C -:1008C000017C012961D0124C94F829000C2800F019 -:1008D000388194F82A00002800F0428184F82A60C8 -:1008E00094F8290000EB800008EB8003A4F53B702E -:1008F000D3E90112DB68C0F80433C0E9BF12607E9F -:1009000000280CBF042502250EE01CE07800002022 -:10091000C00C0020D80B0020FFFF3F007A00002011 -:10092000D4090020A40B002094F82900C34600EB52 -:10093000800108EB8100407B06284DD2DFE800F003 -:10094000404A4846444294F8CC0100EB800004EB56 -:100950008000807A012818BFFFDF94F8CC0100EBFB -:10096000800004EB8000867268E7A17A01291DBF30 -:10097000022141552675465593E7A07A012818BFF4 -:10098000FFDFA672207C46558BE707210174FE4CE1 -:10099000207E162810D0207EE17D401C884200D1A8 -:1009A000FFDF207E04F800B0207E16280EBF002056 -:1009B000207E401C207686E7E07D0028F1D1EFE71D -:1009C00000200BE0B42009E0732007E0322005E0AE -:1009D0000A2003E0062001E0FFDF00202073617E93 -:1009E000022918BF012911D121690144A1EB090293 -:1009F00022F07F42382A09D903206076A1F1320023 -:100A000020F07F4020613220207309E0322807D295 -:100A100094F8280058B9F8F793FA84F828A006E06B -:100A200094F8280018B1F8F7B4FA84F828607978B7 -:100A300084F8201038780622012818BF032806D130 -:100A400084F824A0207B814284BF081A821D94F878 -:100A50002230002B18BF921C94F82400002808BFF5 -:100A6000002B6AD0D4F810806069A8EB0908DFF881 -:100A70001CC328F07F48A0EB090020F07F404245CE -:100A800098BFB8F5800F41D284453FD3207B884280 -:100A900015D22369A1EB0002A3EB020222F07F42F0 -:100AA0001144294421F07F412261616000280CBF7C -:100AB00001200320207710F0FF0F36D114E00AD96F -:100AC000226900291044284420F07F4060600CBF58 -:100AD00002200420EEE7002B08BFFFDF2069284436 -:100AE00020F07F40606026770120F8F787F800BF8C -:100AF00094F82900012300EB80010BEB8100616871 -:100B000090F90C200020F8F7BDF829E084F8246063 -:100B100084F82260207B0028E0D021690844284422 -:100B200020F07F4060600220207720690123411976 -:100B300000221846F8F7A6F8DAE7207B0028ECD167 -:100B4000CCE70120F8F75AF80020F8F757F8F8F743 -:100B50003BF894F8280018B1F8F71BFA84F82860DD -:100B600094F8220028B1F8F769F984F8236084F832 -:100B7000226094F8210018B1F8787870B87838704D -:100B800094F8240030B184F823603878002808BF36 -:100B900084F824607C48017EC07D814203D07C487B -:100BA0004078F8F70DFD84F827A0BDE8F09F70B5F8 -:100BB000784C054682B094F829000C2808BFFFDF66 -:100BC00094F8290000EB8000734E06EB8000007C57 -:100BD000032818BFFFDFA068B0F1FF3F18BFFFDF99 -:100BE00094F82900002100EB800006EB800001AAA8 -:100BF00090F90C0000918DF8041028446946F8F72C -:100C000041F99DF904000F28CCBF01200020009974 -:100C100008446168084420F07F41A16094F82500F1 -:100C2000002804BF02B070BD012302B00022BDE85D -:100C300070401846F8F726B8584A0B1A02F1010C12 -:100C4000B3EB9C0F3CBF1846704710B5441AB4EB89 -:100C50009C0F3CBF184610BD9A4203D2101A08449C -:100C6000401C10BD94429EBFFFDF002010BD511AF2 -:100C70000844401C404210BD0123002201460220CE -:100C8000F8F700B80220F7F7B9BFF8F75CB8F0B58D -:100C9000404C054683B094F82B00002808BFFFDFC6 -:100CA000642D50D33E490020491B80414BD33D4821 -:100CB00090F8CD1190F8CC01814244D13A48007DA2 -:100CC000002840D194F82900334F00EB800007EB57 -:100CD0008006206801AA28446946F8F7D3F89DF9F0 -:100CE0000400002802DD0098401C0090B2680099C2 -:100CF00073685018C01A20F07F40B0F5800F22D2E0 -:100D0000B07C0C2809D000EB800007EB8000406825 -:100D1000801A20F07F40884215D3A068B0F1FF3FD1 -:100D200005D00120F7F76AFF4FF0FF30A060206880 -:100D300028442060B0680099084420F07F4060613A -:100D400003B00120F0BD03B00020F0BD2DE9F0415B -:100D50000646401EC5B2104805EB850100EB810434 -:100D6000207C002808BFFFDF0E4A92F8CC1192F8D1 -:100D7000CD01814221D000BF01EB810302EB83034F -:100D80001B7CB34220D011E0BC0B0020FFFF3F00D2 -:100D900078000020C00C0020D80B0020FF7F841EAC -:100DA000FF1FA107D4090020A40B002016290CBFA7 -:100DB0000021491CC9B28142DED13A48017D002997 -:100DC00062D0007CB0425FD10020BDE8F081217C80 -:100DD00005291FBF217C0629217C07292CD12774D6 -:100DE000C27D0023017E914218BF014624D000BF7E -:100DF00011F80280A84508BF012300D04BB1162A84 -:100E00000CBF4FF0000802F1010811F8088001F84A -:100E10000280162A0CBF0022521CD2B291F8188010 -:100E20009045E5D143B10A7E002A08BF81F818C079 -:100E300002D00A7E521E0A76617C21B36674C27D9E -:100E40000021037E934224D0835CAB4208BF012182 -:100E500000D029B1162A0CBF0023531CC35C835455 -:100E6000162A0CBF0022521CD2B2037E9342EBD151 -:100E700049B1027E0146002A08BF81F818C008D097 -:100E80000A7E521E0A7604E00127074800264FF02A -:100E9000160C217C012904BF617C002997D1012017 -:100EA000BDE8F081A40B0020BC0B0020F0B5734A14 -:100EB000D2F80032724D002401212E7856B9714EBD -:100EC0003460704F03263F1D3E606E4F04260C3782 -:100ED0003E602970C2F80042D1601160694C48340C -:100EE000D16425688542FBD35160D160C2F80032DD -:100EF000F0BD2DE9F041044680074FF000054FF0AA -:100F0000010604D560480560066024F00204E00490 -:100F10004FF0FF3705D55D484660C0F8087324F4EC -:100F20008054600003D55A48056024F08044E005F1 -:100F30000FD55248C0F80052C0F8087351490D60EF -:100F4000091D0D604F4A04210C321160066124F422 -:100F50008074A00409D54F484660C0F80052C0F81C -:100F600008734D48056024F40054C4F38030C4F382 -:100F7000C031884200D0FFDF14F4404F14D04748FE -:100F80004660C0F8087346488660C0F80052C0F852 -:100F9000087344490D600A1D16608660C0F8087326 -:100FA0000D60166024F4404420050AD53E48466092 -:100FB0008660C0F80873C0F848733C48056024F4A4 -:100FC000006409F0EDF93A48044200D0FFDFBDE8C3 -:100FD000F08170B5202500224FEA020320FA02F1C9 -:100FE000C90719D051B201F01F060124B4404E09BF -:100FF000B60006F1E026C6F88041C6F88042002916 -:1010000006DA01F00F0101F1E02181F8143D03E05F -:1010100001F1E02181F80034521CAA42DED370BDF8 -:1010200070B5174C0D466060FFF763FF6068FFF70F -:10103000D0FF2846F8F761F808F004FE00F0D5F874 -:1010400009F0AEF909F0FBF8F8F78CFABDE870404A -:1010500008F09ABE10B50A4C6068FFF74AFF606856 -:10106000FFF7B7FF09F09CF9F8F70CF90020606072 -:1010700010BD034840687047022070470080004060 -:101080008000002004850040FC1F004000C000409C -:1010900004E5014000D0004004D5004000E00040DD -:1010A00000F0004000F5004000B0004008B50040EE -:1010B000FEFF0FFC70B51F490A68BAB100231D4638 -:1010C00001244A68521C4A60092A00D34D600E79F7 -:1010D00004FA06F20E6816420AD072B60B68934301 -:1010E0000B6062B649680160002070BD052070BDCC -:1010F0005B1C092BE5D3FFDFF8E74FF0E0214FF44D -:101100008000C1F800027047EFF3108111F0010F69 -:1011100072B64FF0010202FA00F20648036842EA92 -:101120000302026000D162B6E7E7024800210160D5 -:1011300041607047880000200120810708607047E7 -:10114000012081074860704712480068C00700D03E -:10115000012070470F48001F0068C00700D0012021 -:1011600070470C4808300068C00700D00120704765 -:10117000084810300068704706490C310A68D203ED -:1011800006D5096801F00301814201D101207047B1 -:10119000002070470C040040C84911F8210F49781D -:1011A000884201D3401A02E0C1F121010844C0B2D3 -:1011B0007047C249233111F8210F4978884201D381 -:1011C000401A02E0C1F121010844C0B27047BB4996 -:1011D000463111F8210F4978884201D3401A02E0C4 -:1011E000C1F121010844C0B27047B54910B5802053 -:1011F00081F80004B1490020233101F8210F487023 -:10120000AE4901F8210F4870AC49463101F8210F71 -:101210004870AC4808F05CFFAA48401C08F058FF32 -:10122000F8F778F8BDE8104000F03DB9202070478D -:10123000B2E770B50C4605460026FFF7ADFF014644 -:101240009E48A14212D30022641EE4B20DD390F84E -:101250002210435C491CC9B205F8013B80F82210FA -:101260002129F1D180F82220EEE7012600F01BF9B8 -:10127000304670BD202070479BE770B50C46054690 -:101280000026FFF796FF01468C482330A14212D377 -:101290000022641EE4B20DD390F82210435C491C76 -:1012A000C9B205F8013B80F822102129F1D180F85C -:1012B0002220EEE7012600F0F6F8304670BD20212E -:1012C00001700020704710B50446FFF780FF2070C2 -:1012D000002010BD70B50C460546FFF778FF0146AB -:1012E00076484630A14213D30022641EE4B20DD3E7 -:1012F00090F82210435C491CC9B205F8013B80F804 -:1013000022102129F1D180F82220EEE7002401E00B -:1013100042F2070400F0C7F8204670BD70B50C46D5 -:101320000546212900D9FFDF67480068103840B220 -:1013300000F0A0F8C6B20D2000F09CF8C0B28642C2 -:1013400004D2FFDF02E000BFF8F734F82146284658 -:10135000FFF76FFF0028F7D070BD2DE9F047DFF8E9 -:101360006481564CA8F101080746233498F8000020 -:10137000DFF84891002604F1230A38B994F82210C6 -:1013800094F82100212200F084F890B14D4699F89C -:10139000221099F82100212200F07BF8B8B15546BF -:1013A0009AF822109AF82100212200F072F848B32E -:1013B00035E094F82100275494F82100401CC0B275 -:1013C00084F8210021282AD184F8216027E095F8AB -:1013D00021002F5495F82100401CC0B285F821004F -:1013E000212801D185F8216098F800004746B0B166 -:1013F00095F8221095F82100212200F04AF870B1EA -:101400003E700CE095F821002F5495F82100401C07 -:10141000C0B285F82100212801D185F8216094F817 -:10142000221094F82100212200F033F800281FD068 -:1014300099F8221099F82100212200F02AF80028BA -:1014400016D09AF822109AF82100212200F021F8F3 -:1014500000280DD0F7F784FF1A4808F041FEB0F5D8 -:10146000005F00D0FFDFBDE8F047164808F04EBE31 -:10147000BDE8F087002806DA00F00F0000F1E02058 -:1014800090F8140D03E000F1E02090F8000440090A -:101490007047401C884204D0904200D109B100201E -:1014A00070470120704710B5064808F019FE002863 -:1014B00003D1BDE81040F7F73EBF10BDF00C00208F -:1014C0000DE000E09100002004ED00E013490878F1 -:1014D0004A78401CC0B2904205D0114B01221A60DC -:1014E000BFF34F8F0870704770B54FF0E0250B4C7D -:1014F000F7F7E6FF20BF40BF20BF6078217861701A -:10150000D5F8001229B9D5F8041211B92178814211 -:10151000EED0F7F7D0FF002070BD00009300002050 -:10152000180502402DE9F041012528034FF0E02184 -:101530000026C1F880011E4CC4F800610C2000F0A8 -:101540002CF81C4801680268C94341F3001142F0BD -:1015500010020260C4F804532560491C00E020BF5B -:10156000D4F80021002AFAD019B9016821F010013D -:101570000160114807686560C4F80853C4F8006149 -:101580000C2000F00AF83846BDE8F08110B504469A -:10159000FFF7C8FF2060002010BD00F01F020121EE -:1015A00091404009800000F1E020C0F880127047AF -:1015B00000C0004010ED00E008C500402DE9F047F4 -:1015C000F84C0646FF21606800EB06121170217886 -:1015D000FF2916D04FF0080909EB011109EB061796 -:1015E0004158C059491E21F07F4100F0DDF918B182 -:1015F00094F80080454614E06168207801EB0611FC -:1016000008702670BDE8F087626809EB0510D159B3 -:10161000105800F0C9F930B96068A84600EB08100E -:101620000578FF2DF0D1606800EB061100EB081083 -:101630000D700670E6E7F0B5DA4B04460020012590 -:101640005A680C261B7A0BE005EB0017D75DA74202 -:1016500004D106EB0017D7598F4204D0401CC0B20A -:101660008342F1D8FF20F0BD70B5FFF70EFBCD4CE3 -:10167000014608252278606805EB0212805800F0C8 -:1016800093F9012808D92178606805EB01114058C9 -:10169000BDE87040FFF7F0BAFEF73CFFBDE87040D0 -:1016A000F7F78EBF2DE9F041BE4C2578FFF7EDFA34 -:1016B0000146FF2D6FD04FF00808626808EB051651 -:1016C000905900F071F90228606801D980595EE0F4 -:1016D00000EB051109782170022101EB0511425C34 -:1016E0005AB1521E4254815901F5000121F07F4147 -:1016F00081512846FFF762FF34E00423012203EB07 -:10170000051302EB051250F803C0875CBCF1000F13 -:1017100010D0BCF5806F10D9CCF3090250F806C088 -:101720000CEB423C2CF07F4C40F806C0C3589A1A90 -:10173000920A09E0FF2181540AE0825902EB4C32FF -:1017400022F07F428251002242542846FFF736FFA2 -:101750000C21606801EB05114158E06850F8272022 -:10176000384690472078FF2815D0FFF78EFA0146BB -:101770002278606808EB02124546805800F014F9A0 -:10178000012891D92178606805EB01114058BDE826 -:10179000F041FFF771BABDE8F081F0B51D4614467F -:1017A0000E460746FF2B00D3FFDFA00700D0FFDF68 -:1017B0007C48FF210022C7604460057206740170F6 -:1017C00042701046012204E002EB0013401CE15479 -:1017D000C0B2A842F8D3F0BD70B5724C0646657829 -:1017E000207C854200D3FFDFE06840F82560607808 -:1017F000401C6070284670BD2DE9FF5F1D468B467A -:101800000746FF24FFF741FADFF89891064699F85A -:101810000100B84200D8FFDF00214FF001084FF06F -:101820000C0A99F80820D9F804000EE008EB01131F -:10183000C35CFF2B27D0BB4205D10AEB011350F844 -:1018400003C0DC4521D0491CC9B28A42EED8FF2C26 -:101850001BD008EB04110AEB0412475440F802B005 -:101860000421029B0022012B01EB041111D04250F4 -:101870004FF4806808234FF0020C454519D9A9059B -:10188000890D08D008E00C46DDE7FF2004B0BDE874 -:10189000F09F4550ECE7414606EB413203EB041361 -:1018A00022F07F42C250691A0CEB0412890A81545B -:1018B0000BE005B9012506EB453103EB041321F0DC -:1018C0007F41C1500CEB0411425499F8005020465E -:1018D000FFF774FE99F80000A84201D0FFF7C4FE9C -:1018E0003846D3E770B50C460546FFF7CEF90646F5 -:1018F00021462846FFF79FFE0446FF2817D0294DB2 -:10190000082101EB041168684058314600F04CF89A -:1019100000F58050400B02216A6801EB0411515C14 -:1019200009B100EB8120002800D1012070BD00200A -:1019300070BD2DE9F0410F468046FFF77CFEFF2881 -:101940001BD0184E357871682A462C4605E0844233 -:1019500006D0254601EB05131C78FF2CF7D10CE0CF -:10196000FF2C0AD0A5420CD101EB02100078307098 -:10197000FF2804D0FFF778FE03E000200BE7FFF715 -:1019800081F939464046FFF7ADFFFF220123716818 -:1019900003EB0413CA5401EB041201EB0511127896 -:1019A0000A70F8E65C0D0020401A20F07F40B0F588 -:1019B000000F00D90020704770B50446A0F5000064 -:1019C0002C4EB0F1786F02D23444A4F500042A48BA -:1019D000844201D2012500E0002500F041F830B139 -:1019E000B4420BD32548006804E0284370BDB442DC -:1019F00004D32348844201D20120F6E70020F4E713 -:101A000010B50446A0F50000B0F1786F03D2194874 -:101A10000444A4F5000400F023F84FF0804130B1F5 -:101A20001648006804E08C4204D2012003E0144808 -:101A30008442F8D2002080F0010010BD10B520B122 -:101A4000FFF7DEFF08B1012010BD002010BD10B56A -:101A500020B1FFF7B1FF08B1012010BD002010BD7B -:101A6000084809490068884201D1012070470020D8 -:101A7000704700000000002000C001001C00002092 -:101A80000800002098000020BEBAFECA0548064A99 -:101A90000168914201D100210160044901200860E0 -:101AA0007047000098000020BEBAFECA40E5014021 -:101AB000404800210170417010218170704770B55D -:101AC000054616460C460220F5F789FC39490120E7 -:101AD00008703949F01E086038480560001F04602E -:101AE00070BD10B50220F5F77AFC3249012008706C -:101AF00033480021C0F80011C0F80411C0F80811E3 -:101B000030494FF40000086010BD2A480178C9B17F -:101B10002D4A4FF4000111602949D1F8003100220B -:101B2000002B1CBFD1F80431002B02D0D1F80811D2 -:101B300011B14270102103E001214170234909686D -:101B4000817002700020F5F74ABC1A48017800291C -:101B500004BF407870471A48D0F80011002904BF2C -:101B600002207047D0F8001100291CBFD0F80411E2 -:101B7000002905D0D0F80801002804BF01207047D3 -:101B8000002070470B480178002904BF8078704717 -:101B90000B48D0F8001100291CBFD0F8041100290F -:101BA00002D0D0F8080108B110207047074800683B -:101BB000C0B270479C00002010F5004008F50040BE -:101BC00000F0004004F5014008F5014000F4004039 -:101BD0003148002101704170704770B506461446C7 -:101BE0000D460120F5F7FBFB2B49012008702B481F -:101BF0000660001D0460001D056070BD2DE9F04108 -:101C000004460120F5F7EBFB234901200870244925 -:101C10000C60244D0026C5F8046123494FF040773D -:101C20000F60A1F1040844B1012C18BFFFDFC5F813 -:101C30000062C8F80070BDE8F081C5F800024FF0FE -:101C40008070C8F80000BDE8F0811348017879B1D0 -:101C5000154A4FF0407111601249D1F8042100215A -:101C6000002A08BF417002D0104A12684270017009 -:101C70000020F5F7B4BB08480178002904BF40787C -:101C800070470848D0F80401002808BF704707488B -:101C90000068C0B2704700009F00002008F50040B7 -:101CA00004F5004000F0004008F5014000F4004059 -:101CB00070B5FE4C002501266570257025626572A1 -:101CC000A572E67284F82950256304F13C00A563EF -:101CD00008F0FEF9002818BFFFDF84F82450F4480C -:101CE00009F062FAF3480660657770BD30B4EF49D9 -:101CF0000268DFF8C8C34A6142688A61007A0877DF -:101D00000A7DED4BACF1040401204AB10A7E00FAD1 -:101D100002F21A608D7D002D0CBF2260CCF80020ED -:101D20004A7D002A04BF30BC70474A7E904018604C -:101D3000C97D00290CBF2060CCF8000030BC704782 -:101D4000DF4900B50A1D40B101281CBFFFDF00BDFF -:101D5000DC480860DC48106000BDDC480860DC48F6 -:101D6000F9E7F0B502264FF0E02701240025C7F877 -:101D70008061D8490D600C60D7490A6822F077026B -:101D800042F0880242F000420A60CD490A1DD0B1FB -:101D9000012818BFFFDF1AD0D04940F25B6008600D -:101DA000091F40F203100860081F0460CC4903209B -:101DB0000860CC4996200860BC4C94F9240010F0CF -:101DC000030F09D033E0C1480860C14802E0BD48B4 -:101DD0000860BD481060DFE780100A300C2826D26A -:101DE000DFE800F021252525251D1915110D0A060E -:101DF000BD49042008601BE0BB48056018E0BA49F3 -:101E0000FC20086014E0B849F820086010E0B649EA -:101E1000F42008600CE0B449F020086008E0B24902 -:101E2000EC20086004E0B049D820086000E0FFDF43 -:101E3000607F002814BF4FF4C020AC48AC49086054 -:101E4000AD49AC480860091FAC480860C7F880621B -:101E5000AB491020C1F80403F0BD944A0368C2F8EE -:101E600002308088D08011727047904890F8290025 -:101E700070478E4A517010707047F0B50D46044699 -:101E800004EB4501908808841078D2F801100127EE -:101E900040EA012044F8250005F1080007FA00F6A1 -:101EA000002B04BF206BB04304D0012B18BFFFDF11 -:101EB000206B304307FA05F108432063F0BD30B5CD -:101EC0000D460446082988BFFFDF0022002D11D9E6 -:101ED00054F82210900000F1804000F58050C0F8C6 -:101EE000001604EB4201098CC0F82016501CC2B247 -:101EF0009542EDD8206B8349086030BD10B504468B -:101F000010F0030F2BD1A0100A300C2827D2DFE8E5 -:101F100000F022262626261E1A16120E0A067249DE -:101F2000042008601CE070490020086018E06E4939 -:101F3000FC20086014E06C49F820086010E06A4951 -:101F4000F42008600CE06849F020086008E0664969 -:101F5000EC20086004E06449D820086000E0FFDF5E -:101F6000524880F8244010BD504890F83400704723 -:101F7000654AC178116000686449000208607047D2 -:101F8000252808BF02210ED0262808BF1A210AD012 -:101F9000272808BF502106D00A2894BF0422062211 -:101FA00002EB4001C9B25A4A11605A4908607047B1 -:101FB0003E49086270473D498A7A012A49D0022A7F -:101FC00018BF70474B7D002B08BF7047DFF848C132 -:101FD000012A42D0CA7D4B7E002A18BF01227D30E3 -:101FE000CCF80000DFF834C10020CCF84C01180216 -:101FF00082F0010240EA025040F00312087F8300A1 -:1020000003F1804303F5C043C3F81025444A02EBB3 -:102010008002887EC30003F1804303F5F833C3F8E0 -:102020001425DFF800C1C3F810C5C97ECB0003F149 -:10203000804303F5F833C3F81425304AC3F810255C -:10204000012202FA00F002FA01F108433649086061 -:1020500070470B7D002BB9D170478A7D0B7E002A1B -:1020600018BF01227E30BBE72DE9F84F00280CBFD6 -:10207000012002200D4C224D0322A072C5F800223F -:10208000627F002A14BF4FF4C022184A264F3A60DC -:102090004FF00108002976D0012973D002291CBF16 -:1020A000FFDFBDE8F88F206A00283FE0700D0020B8 -:1020B000840D0020A0050040180500500C050050BC -:1020C00014150040050103001F0003020601020071 -:1020D00025000302FC1F00403C170040381500405B -:1020E00010150040441500400C1500400000040489 -:1020F00008F5014040800040A4F501401011004067 -:102100000010004040160040241500401C150040FF -:1021100008150040541500404C85004000800040E8 -:10212000006000404C81004004F5014008BFFFDF23 -:10213000216A206B0844FB490860FC49FA480860A2 -:10214000A17AFB4801290EBF0560FA490160A06B26 -:1021500040F40020A063D5F800924FF0100AC5F8B3 -:1021600008A30026C5F80062F3484FF4802BC0F89E -:1021700000B0FF208DF80000C5F81061C5F8108090 -:102180003DE000E01CE0012813D0C5F804800228DF -:1021900018BFBDE8F88F607D002808BFBDE8F88F44 -:1021A000E648C0F84C80E6480068BDE8F84F0A30C1 -:1021B00001E7C5F80080207D0028F1D1BDE8F88F47 -:1021C000E0490128896B07D0022818BFFFDF09D03A -:1021D000BDE8F84F0A20EEE641F48010A0634FF40A -:1021E000801004E041F40010A0634FF40010386048 -:1021F000EEE700BF9DF80000401E8DF800009DF83E -:10220000000018B1D5F810010028F3D09DF80000A7 -:10221000002808BFFFDFC5F80C61C5F81061C5F8DC -:102220000461C5F81461C5F81861C5F82861C6488D -:1022300000680090C5F80092C7F800B0C5F804A384 -:102240004FF400203860216A206BBDE8F84F084445 -:102250000A30B0E62DE9F847BC4CD4F8000220F073 -:102260000309D4F804034FF0100AC0F30018C4F8AF -:1022700008A30026C4F80062B24D687F002814BF8E -:102280004FF4C020B248AC490860A87A0127012861 -:1022900002D0022803D014E0287D10B911E0687D37 -:1022A00078B1A87EEA7E07FA00F007FA02F210433E -:1022B0000860287F800000F1804000F5C040C0F831 -:1022C0001065FF208DF80000C4F81061276104E05C -:1022D0009DF80000401E8DF800009DF8000018B128 -:1022E000D4F810010028F3D09DF80000002808BFA2 -:1022F000FFDFC4F81061C4F828616E72AE72EF722D -:10230000C4F80092B8F1000F18BFC4F804A3BDE8E8 -:10231000F88700688F4920F07F40086070474FF0D1 -:10232000E0200221C0F88011C0F8801270474FF001 -:10233000E0210220C1F8000170478749087070470A -:1023400010B5864807F0CCFE002818BFFFDF10BD8F -:10235000824807F0DBBE82490860704730B5794C8F -:102360000546206BA84228BFFFDF012020732561AE -:10237000607F40B1A81C20617448D0F8001241F081 -:102380004001C0F800126D490020C1F844017549B0 -:1023900020690860A06B744940F48000A0634FF48A -:1023A0008000086030BD674802210173CA210161C5 -:1023B000417F41B1CC2101616449D1F8002242F052 -:1023C0004002C1F800225D4A0021C2F844110269AE -:1023D000016B1144634A1160816B41F48001816398 -:1023E00061494FF4800008607047564901204877E2 -:1023F0005E49022008605F495D480860091F5E4829 -:10240000086070474F490020487770474A494FF4A9 -:10241000800008604B48816B21F4800181630021BA -:1024200001737047454801214160C1600021C0F837 -:1024300044114C480160434801637047414800B56E -:10244000407F002818BFFFDF4020484908603F4810 -:10245000D0F8001241F04001C0F8001200BD394828 -:1024600000B5407F002818BFFFDF3848D0F80012C1 -:1024700021F04001C0F800123C490020086000BD76 -:102480003248D0F8001221F01001C0F800120121EA -:10249000816170472D480021C0F81C11D0F800124E -:1024A00041F01001C0F800127047284981B0D1F8FE -:1024B0001C21012A1EBF002001B070472F4A12685C -:1024C00002F07F02524202700020C1F81C012C4829 -:1024D00000680090012001B0704730B50C0005463F -:1024E00008BFFFDF14F0010F1CBF012CFFDF002D20 -:1024F0000CBF01200220134901284872CC721349F5 -:1025000004BFD1F8000240F0040007D0022807BF42 -:10251000D1F8000240F00800FFDF30BDC1F8000232 -:1025200030BD00004885004048810040A8F50140CA -:10253000ACF501400410004008F501400080004067 -:102540004C850040700D0020181100400010004024 -:10255000000004043C150040A1000020AC0D002048 -:10256000041500404485004004F50140601500401A -:10257000448000409CF5014028110040481500406F -:102580001C11004070B5EB4C0022E17A11F0020FF3 -:1025900018BF10F0040F16D111F0100F1CBF94F8E3 -:1025A0003530002B02D094F8363063B111F0080FAB -:1025B0001CBF94F82830002B05D111F0040F03D074 -:1025C00094F8291001B90122657ADB4900234FF004 -:1025D000010C35B100F00200104314D0BDE870408A -:1025E00038E6607F002814BF4FF4C020D348D44A97 -:1025F0001060D1F8000220F00300C1F80002A372BD -:1026000084F80BC070BD012D14D0022D18BFFFDF60 -:102610001CD0A07A01280CBFCA48CB484FF47A716D -:1026200000F2E730B0FBF1F0216BBDE87040081A12 -:102630008C30C0E4D1F8000220F00400C1F80002A0 -:10264000637284F80BC084F80AC0E2E7D1F8000294 -:1026500020F00800C1F80002637284F80BC0022069 -:10266000A072D6E72DE9F84FB84FD7F84C21B14CFE -:10267000B3494FF00108A07A0026CAB1012802D060 -:10268000022803D014E0227D12B911E0627D7AB1F4 -:10269000A27EE37E08FA02F208FA03F31A430A6004 -:1026A000227F920002F1804202F5C042C2F810651A -:1026B000A26B0A60A663217B19B1D7F844110129E6 -:1026C00000D000219C4DD5F81021012A0CBF4022DA -:1026D0000022012805BFD5F80C31012B002320234F -:1026E0001A43012805BFD5F80431012B002310231C -:1026F0001343974A022804BFD2F800C0BCF1010F6F -:1027000007D1D5F80CC1BCF1010F08BF4FF0080C80 -:1027100001D04FF0000C4CEA0303022804BF1268FA -:10272000002A05D1D5F80C21012A08BF042200D0C7 -:1027300000221A43022803D1002918BF022100D128 -:1027400000211143022804BFD5F80401012805D156 -:10275000D7F84401012818BF012000D1002040EA29 -:1027600001097C48016811F0FF0F03D0D5F814115E -:10277000012900D0002184F83410006810F0FF0F08 -:1027800003D0D5F81801012800D0002084F83500C6 -:102790007148006818B1FFF7D8F9012800D000206F -:1027A00084F83600C5F80C61C5F81061C5F80461FD -:1027B000C5F81461C5F81861C5F828616748006854 -:1027C0000090C7F84461664800684D46DFF8949170 -:1027D0000090D9F80000E062617F00291CBF801ED4 -:1027E000E062614800682063A07ADFF880A10228D7 -:1027F0000CD1607850B1DAF80010097808402178DF -:1028000031EA000008BF84F8288001D084F82860ED -:10281000DFF85C8115F0010F16D098F80010554ACA -:102820004908E06A52F821108847012198F80020F1 -:10283000514B5208206B53F82220904798F8000023 -:1028400010F0010F0BD01FE015F0200F18BF022170 -:10285000ECD115F0020F18BF0021E7D1EEE7DAF84E -:102860000000062200F10901A01C08F0B7FA40B9E7 -:10287000207ADAF800100978B0EBD11F08BF0120E8 -:1028800000D0002084F829002846FFF77BFE15F0D1 -:10289000020F05D0394898F8001050F82100804701 -:1028A00015F00C0F07D0364898F8001050F821109A -:1028B000C5F3C000884715F0200F05D0314898F8BF -:1028C000001050F82100804798F80000022805D138 -:1028D00005F06E00402806D101F00EF998F80000CE -:1028E000042828BFFFDFA07A022818BFBDE8F88FB0 -:1028F000207B002808BFBDE8F88FC7F84461022894 -:1029000014D0012818BFFFDF216B2069884298BFCF -:10291000FFDF2069C9F80000A06B1B4940F480006C -:10292000A0634FF480000860BDE8F88F2169206B38 -:102930000844EFE7700D0020001000400000040480 -:1029400008F50140F0FE0100B0F8010000800040F1 -:10295000001400404016004060150040181100406F -:1029600044810040448500404085004004150040FB -:10297000A1000020E8B40100F0B40100F8B40100A7 -:1029800008B5010018B5010004F5014010B54A482A -:1029900006F0C5FB0021484806F0F6FB0121464839 -:1029A00006F0C0FB4549002081F822004FF6FF7079 -:1029B000888443490880488010BD10B53E4806F021 -:1029C000AEFB00213C4806F0DFFB01213A4806F04F -:1029D000A9FB3A49002081F822004FF6FF70888455 -:1029E00037490880488010BD704734498A8C82423C -:1029F00018BF7047002081F822004FF6FF708884CE -:102A000070472D49016070472D49088070472B4958 -:102A10008A8CA2F57F43FF3B03D00021016008466A -:102A2000704791F822202549012A1ABF0160012030 -:102A300000207047214901F1220091F82220012A4B -:102A400004BF00207047012202701D48008888845E -:102A5000104670471A49488070471849184B8A8CAD -:102A60005B889A4206D191F82220002A1EBF01609D -:102A700001207047002070471048114A818C52880D -:102A8000914209D14FF6FF71818410F8221F19B1CC -:102A90000021017001207047002070470748084A54 -:102AA000818C5288914205D190F8220000281CBFE9 -:102AB0000020704701207047D60D0020B00D002087 -:102AC000A200002070B5FF4E044696F88400002551 -:102AD000012807D096F8660001281CBF002070BDB1 -:102AE000E1B90EE0D1B9657014202070D6F88500E8 -:102AF000C4F80200D6F88900C4F8060086F88450AD -:102B00000CE06570132020701C2206F16801A01CE7 -:102B100008F090F90120A07186F86650012070BD80 -:102B2000E84890F86610002914BFB0F86A004FF624 -:102B3000FF70704770B5E4480178002918BF0C2673 -:102B400001D0304670BDDF4C0026354684F8546015 -:102B500084F8556084F8566084F8576084F85860AB -:102B600084F8596084F84D6084F82D6084F86460BE -:102B70007F21817094F85A0028B1FFF770FCFEF7AE -:102B8000C4FF84F85A5084F86650D04806F074F9AF -:102B9000CF4806F071F9D4E770B5CB4A002515701F -:102BA000C84CC4E91701107800281CBFFFDF70BDB6 -:102BB00084F8545084F8555084F8565084F857508F -:102BC00084F8585084F8595084F84D5084F82D50AA -:102BD00084F864507F20907094F85A0028B1FFF771 -:102BE0003EFCFEF792FF84F85A5084F86650B748CE -:102BF00006F042F9BDE87040B54806F03DB9B1486D -:102C000090F854007047AF4900B591F84F0091F823 -:102C10004E10C0F38002C0F340031A4400F00100DC -:102C20001044052910D2DFE801F00B070B0309005F -:102C3000A84931F8100000BDA74800BDA74900E031 -:102C4000A74931F8100000BDFFDF002000BD9D48FE -:102C500040F27121B0F8500048437047994890F80D -:102C60006500002818BF0120704770B5954C437B64 -:102C7000002584F84F30037984F84E30012B0EBFC5 -:102C8000A4F85050B0F800C0A4F850C090F80EC09E -:102C900084F865C021701168C4F801109188A4F807 -:102CA000051081796173D0F80710C4F80710B0F8E7 -:102CB0000B00A4F80B0094F84D000126002818BF63 -:102CC00084F8556094F82D00002818BF84F85660E9 -:102CD000052B2CD2DFE803F0030821260800002191 -:102CE0007A4806F0CCF823E00121784806F0C7F8CE -:102CF000E11D764806F0F4F8607B20B1012818BF8A -:102D0000FFDF05D014E00021704806F0FDF80FE069 -:102D100001216E4806F0F8F80AE006216B4806F03B -:102D2000AEF805E00221694806F0A9F800E0FFDFEF -:102D300084F8575084F85850611C644806F0C2F873 -:102D40002178624806F0D3F80421614806F097F82C -:102D5000611C5F4806F0B6F821785D4806F0C7F8B8 -:102D600084F85460002070BD564A012382F8583020 -:102D700092F866C0BCF1000F1CBF3A20704710B437 -:102D800014784FF0000C844218BF82F858C009D163 -:102D900082F857C00868C2F801008888A2F80500C8 -:102DA00082F8573010BC0020704770B5454C05467E -:102DB000002084F856002A4604F10E0008F03AF884 -:102DC00084F82D50012084F8560070BD10B53D4C9C -:102DD000002284F8552084F84D00024604F12E00AC -:102DE00008F028F8012084F8550010BD354981F815 -:102DF0006400704770B5344E3078A0BB314C94F805 -:102E0000540080B3FFF79CFA002584F8525084F8F0 -:102E1000535075702846FFF790FA0020FEF7A1FF87 -:102E20003048FFF7A5F83048FFF773FAFFF7BBFA11 -:102E300094F84F0010F0010F04D094F8521011F0E4 -:102E4000010F13D010F0020F04D094F8521011F0BB -:102E5000020F18D010F0040F2CD094F8520010F08C -:102E6000040F1BD026E0FFE70C2070BD2520FFF7E4 -:102E700087F80020FEF764FF94F8520040F001004C -:102E800084F8520016E02620FFF77AF80020FEF7BB -:102E900057FF94F8520040F0020009E02720FFF7A6 -:102EA0006FF80020FEF74CFF94F8520040F0040049 -:102EB00084F85200FFF73BFA01210020FFF7D4F815 -:102EC0000F2113E0F80D0020A8000020880E00203C -:102ED000B00E002038B501009189130040B5010003 -:102EE00030B501002BB5010028B501000520FEF723 -:102EF000C0FF2178601CFEF7B0FF94F84E00012857 -:102F00001EBF042894F85500002808D094F84D20DE -:102F100004F12E01FE4806F012F884F8555094F89A -:102F2000560040B194F82D2004F10E01F94806F046 -:102F300032F884F85650206E017819B110F8041B4D -:102F4000FEF7BDFFE06D017831B1F34A401CFEF79A -:102F5000B6FD012084F85A00FFF7FAF9002070BD91 -:102F6000EE494860704770B5ED4C05003BD02046F7 -:102F700094F84F1090F8520011F0010F02D010F0A9 -:102F8000010F0CD011F0020F02D010F0020F11D07F -:102F900011F0040F27D010F0040F18D023E02520E3 -:102FA000FEF7EEFF0020FEF7CBFE94F8520040F053 -:102FB000010009E02620FEF7E3FF0020FEF7C0FE37 -:102FC00094F8520040F0020084F852000BE02720F1 -:102FD000FEF7D6FF0020FEF7B3FE94F8520040F053 -:102FE000040084F8520094F8530040B194F84E0065 -:102FF000012808BFFFDFBDE8704000F054BA1DB1E2 -:1030000002210020FFF730F894F85700002558B14E -:10301000611CBF4805F056FF611CBE4805F052FF19 -:1030200084F8575084F85850B948FFF794F994F849 -:103030004E00052809D2DFE800F00303030903006E -:1030400001210846FFF749FA00E0FFDF94F84F003E -:1030500094F8521030EA01014FF0010002D0AF495C -:10306000087070BD94F84E10012914BF84F8530005 -:1030700084F85250F3E710B5FFF762F9A7480078DB -:1030800040B9A74890F8540020B10020FFF76BFF2B -:10309000002010BDFFF7C6F9FFF7B8F9FFF7DAF81F -:1030A000FFF73DF9FFF754F90C2010BD9B490120B3 -:1030B000487070479A4981F85900704770B50025EB -:1030C00002F07BFC68B14FF49670FEF771FF934EEF -:1030D0003078012809D0022801D003282ED0FFDF44 -:1030E00070BDBDE8704000F0DEB98D4C94F84E0024 -:1030F000032823D094F85A0018B1FEF7F2FCFFF72A -:103100009DF98848FFF727F994F84E00012818BF69 -:1031100004280AD094F86500012814BF032810255C -:1031200045F00E010020FFF7D8F994F8640001285B -:1031300008BFFFF7AFF90220307070BDBDE87040E6 -:10314000012010E770B5764C744D94F864000128A6 -:1031500020D000BF94F85A0018B1FFF780F9FEF7AD -:10316000D4FC02F02AFCF8B12878022818BFFFDF4F -:1031700094F84E00012804BF4FF41970FEF718FFB1 -:103180000120FFF7F0FE287800281EBF28780128CC -:10319000FFDF70BD6448FFF788F9002804BF7F2077 -:1031A000A870FFF76DF9D5E7BDE8704000F07BB976 -:1031B0002DE9F05F82460027FEF7D6FE574D814687 -:1031C000B8462878022818BFFFDF554C4FF07F0B18 -:1031D00094F86400012825D0524805F06FFE064699 -:1031E000BAF1000F6FD04F4805F065FF00286AD094 -:1031F000FEF73BFE002866D094F85A00002818BF5E -:103200004FF028081ED000BFA8F1010000F0FF0811 -:10321000FEF79BFC02280FD0012808BF4FF00108E1 -:1032200010D00DE04048FFF740F9002808BF85F8AE -:1032300002B0FFF725F9CFE7B8F1000FE4D1FFDFC7 -:103240004FF0000837484FF0010A062E3BD2DFE866 -:1032500006F083838303833B94F84E10012918BF43 -:10326000042979D059EA080105D194F8651000299C -:1032700018BF022970D194F86410012904BF94F892 -:103280008410002905D02348FFF765F80320287033 -:1032900063E084F884A0007804F18C06C0F3801009 -:1032A00084F88500D4F8E300C4F88600B4F8E70099 -:1032B000A4F88A00A8787F2808BFFFDFA8783070BC -:1032C00085F802B0DFE747E0C178E27991421BD18F -:1032D0000179227A914217D14179627A914213D1D0 -:1032E0008179A27A91420FD1C179E27A91420BD1D0 -:1032F000017A227B914207D10178627BC1F3801170 -:10330000914208BF012200D0002294F84E100DE037 -:10331000880E0020B00E0020DB0E0020A800002048 -:10332000F80D0020D80E0020AA000020012918BFA7 -:10333000042900D14AB979B959EA080105D194F8AC -:103340006510002918BF012906D194F8581019B941 -:1033500094F85910A346C9B1012794F85A0018B13E -:10336000FFF77DF8FEF7D1FB002F1CBF0120FFF710 -:10337000FAFD287800281ABF28780128BDE8F09FB8 -:103380002878032818BFFFDFBDE8F09F06466A686B -:10339000DBF8EF10C2F80D1000786B49C0F3801015 -:1033A0005076DBF8E300C2F81A00BBF8E700D083E0 -:1033B000BBF8F300A2F811009BF8F500D074B07DC3 -:1033C0001075B6F81700D082B6F819005080B6F81C -:1033D0001B009080B6F81D00D08002F1080007F0B5 -:1033E000E8FE96F8240000F01F016868017696F860 -:1033F0002410490980F8CC109BF86600002818BFFB -:10340000FFDF00268BF8686068680188ABF86A10F7 -:10341000417E8BF86D10D0F81A10CBF86E10C18B6E -:10342000ABF872109BF800108BF87410DBF80110E9 -:10343000CBF87510BBF80510ABF879104188ABF8E4 -:103440007C108188ABF87E10C188ABF8801090F8B2 -:10345000CC008BF882009BF88300B8F1000F04BF0A -:1034600020F001008BF883000BD040F001008BF8B6 -:103470008300FEF787FB9BF8831060F347018BF80E -:1034800083108BF866A02E70FEF7CCFFFEF7BEFF10 -:10349000FEF7E0FEFEF743FFFEF75AFF01206968E2 -:1034A00002F06AFB59E770B5FEF7BCFFFEF7AEFF0E -:1034B000FEF7D0FEFEF733FF244C002694F85A00A6 -:1034C00028B1FEF7CCFFFEF720FB84F85A60204DB0 -:1034D0002E70FEF73DFF94F84E004FF000010128DA -:1034E00004D0BDE87040002002F046BB022002F08C -:1034F00043FB94F86600002818BFFFDF68780028B7 -:1035000008BF70BD607B84F86D00207884F874007B -:10351000D4F80700C4F86E00B4F80B00A4F87200E9 -:10352000D4F80100C4F87500B4F80500A4F87900D7 -:103530003C2084F8680068680088A4F86A000120CC -:1035400084F866006E7070BDF70E0020F80D002044 -:10355000A80000202DE9F041FF4F044600207A78B2 -:10356000FE4D4FF00108064612B1012A08D00DE0C9 -:1035700095F8492052B1002908BF87F8018004E07E -:10358000AA7F1AB1002908BF7E7001207A782B2308 -:1035900012FB03F22A44937F184312D021BB02F19D -:1035A0001F012A22A01C07F045FC66700420207031 -:1035B00084F8028078782B2110FB01F0284486776C -:1035C00012E0287801281CBF0020BDE8F08159B91D -:1035D0006670132020701C22A91CA01C07F02AFC76 -:1035E000A6712E7085F89F600120BDE8F081DB4850 -:1035F0000178002914BF80884FF6FF7070472DE9CD -:10360000F041D64C0546A07F002818BFBDE8F081E8 -:10361000284605F053FC00210126072834D2DFE8B4 -:1036200000F004070C3333330E0084F8201009E057 -:1036300084F8206084F828100BE0032000E00220CA -:1036400084F8200004F12901284605F08EFC84F856 -:103650002800284605F054FC84F8210004F12201DA -:10366000284605F036FCBC4D04F1480728787F2831 -:1036700008BFFFDF287838707F202870A677BDE864 -:10368000F041032001F023BB84F82810BDE8F0814D -:1036900010B5002001F0ACFAB04CA0B1FEF747FE27 -:1036A00000210120FEF7E0FC04F1B800FEF753FE14 -:1036B000D4F8A800FEF752FE94F88400032818BF3F -:1036C00002281FD022E0FEF7ADFEFEF79FFEFEF7B8 -:1036D000C1FDFEF724FE94F8A10030B1FEF7BFFE55 -:1036E000FEF713FA002084F8A100012084F8AC0052 -:1036F000022084F8A300FEF72BFEBDE81040002056 -:1037000001F0E5BA01210020FEF7E7FEFEF7C2FE58 -:1037100094F8A10018B1FEF7E4F9FEF78FFE03203C -:1037200084F8A30010BD8D490028B1F8AE202CD03C -:10373000FF2A0BD24FF6FF7000EA4200A1F8AE005C -:10374000FF2888BFFF2001D9A1F8AE008248426857 -:10375000012A12BF002A0D224260D243C2EBC203EB -:1037600003EB021291F8AD30DB4303EB830CCCEB9F -:1037700083131A444260900CB1F8AE20B0FBF2F310 -:1037800002FB130081F8AD007047012ADED9500812 -:10379000A1F8AE0008BF0120D8D1D5E770B56F4CB5 -:1037A00094F8A300022819BF94F8A3000128002070 -:1037B00005461CBF0C2070BD2B2101FB00418D77FD -:1037C000401CC0B20228F7D3257094F8A10028B19C -:1037D000FEF745FEFEF799F984F8A15084F89D5054 -:1037E00084F89E5084F89F5084F8A050012084F8FB -:1037F0007E0084F8845084F8A25084F87B0084F81A -:103800007C0084F87D00606FA16FE26FD4F8803097 -:10381000C4F88800C4F88C10C4F89020C4F8943020 -:10382000D4F88400C4F8980084F89C50002070BD3F -:103830004A4A10B5002382F8A330C2E92C010120C6 -:1038400082F8A300FFF7AAFF002818BFFFDF10BD12 -:103850002DE9F047414C81460C2794F8A30001283C -:103860001FBF94F8A30002280C20BDE8F087FEF7E4 -:1038700067FD0020FEF775FA94F89C004FF00108F0 -:10388000002844D0D4F88800D4F88C10D4F89020C4 -:10389000D4F894306067A167E267C4F88030D4F848 -:1038A0009800C4F88400002684F89D6084F89E6027 -:1038B00094F87B00002801BF94F87C00002894F85D -:1038C0007D0000281ABF94F8A000002884F89C60AE -:1038D00023D094F88400032802D0022805D008E001 -:1038E00005211F4800F0F3FC03E003211C4800F011 -:1038F000EEFC94F87A1004F17400FEF7AEFA00279B -:1039000084F89C6094F8A300012815D10FE094F886 -:10391000A300022808BF0027F4D094F8A3000228CF -:1039200002BF84F8A3800C20BDE8F08704E084F88F -:10393000AC80022084F8A300D4F8B400017819B157 -:1039400010F8041BFEF7BBFAD4F8B000017879B187 -:10395000044A401C08E00000B0000020000F0020D6 -:10396000E00F0020BB0F0020FEF7A9F884F8A1802B -:10397000FD48C4F8A890FEF7CCFCFEF7E9FC3846F9 -:10398000BDE8F08770B5FEF7DBFCF84C94F8A300B7 -:10399000022803D0FEF7DCFC0C2070BD012084F867 -:1039A000AD00A4F8AE000220FEF7C7FCF048FEF719 -:1039B000DFFAF04B002004F17B0200BF94F8A21064 -:1039C000491CA3FB015C4FEA5C0CACEB8C0C614422 -:1039D000C9B284F8A210895C012907D0401CC0B28A -:1039E0000328EBD3FFF754FE002070BD94F8A2002B -:1039F000E149085CFEF7C4FA0020FEF7A1F9F1E7FF -:103A0000DA4B10B44FF0010C83F89EC093F89F403E -:103A1000002C1EBF3A2010BC7047002418B993F840 -:103A20008E0088420FD183F88E1083F89D40106875 -:103A3000C3F888009088A3F88C0083F89DC083F8B1 -:103A4000A0C083F89CC083F89E4010BC0020704743 -:103A50000300C6494FF000004FF0010208BF81F893 -:103A6000922005D0012B16BF122081F892007047DA -:103A700081F89C2081F899307047BC4A032808BF20 -:103A8000C2F8941082F89800012082F89C0000206F -:103A90007047B64890F89C1029B190F8990000281A -:103AA00008BF704704E090F88500002808BF704701 -:103AB0000120704710B5FEF7B5FCFEF7A7FCFEF736 -:103AC000C9FBFEF72CFCA94C94F8A10030B1FEF71D -:103AD000C6FCFEF71AF8002084F8A100012084F843 -:103AE000AC00022084F8A300FEF732FC002010BDD9 -:103AF0009E4981F8A400704710B5FEF793FCFEF7CD -:103B000085FCFEF7A7FBFEF70AFC984C94F8A10091 -:103B100030B1FEF7A4FCFDF7F8FF002084F8A10007 -:103B2000012084F8AC00022084F8A300FEF710FC0A -:103B3000BDE81040002001F0CAB82DE9F05F002672 -:103B4000DFF83882894C7F2780B104F1B80005F096 -:103B500082FA20B904F1B80005F09DFA30B194F86A -:103B6000840003280DD194F89E0050B194F8A3006E -:103B7000052828BFBDE8F09FDFE800F0BABABAF523 -:103B8000F40094F8A3007E4D4FF0010A052880F060 -:103B90005D82DFE800F0FBFBFB03FA00784805F0EC -:103BA0008DF97649887094F87E0030B9FEF7DCF91B -:103BB000002808BF4FF0000801D04FF0010894F82A -:103BC000A100002818BF4FF0280915D0A9F1010065 -:103BD00000F0FF09FDF7B9FF8346022803D1B9F1D0 -:103BE000000FF3D1FFDFB8F1000F14D1BBF1010FCB -:103BF00018BF4FF000080ED0DFF880914FF0020B95 -:103C000099F80200072880F08281DFE800F073F75E -:103C100007F6F6F625004FF00108EDE794F8A1004D -:103C200018B1FEF71CFCFDF770FF5448FEF73DFC91 -:103C3000002808BF89F80070FEF722FCB8F1000FD9 -:103C400000F05F8194F88400012818BF022840F03A -:103C50005881FEF7FFFAEBE094F8A10018B1FEF7E7 -:103C6000FEFBFDF752FF4548FEF71FFC002808BF8A -:103C700089F80070FEF704FCB8F1000F00F04181F4 -:103C800094F88400022803D001287DD000F039B9CF -:103C90003B48FFF7B4FC012000F0AAFF58B13949B6 -:103CA000A1F1280005F039F93648FEF754FB94F8E5 -:103CB0009D00A0B190E0FEF7B5FBFEF7A7FBFEF775 -:103CC000C9FAFEF72CFB94F8A100002870D000BFC1 -:103CD000FEF7C5FBFDF719FF84F8A1609DE0012107 -:103CE0000846FEF7FAFBFEF75EFB052084F8A3000A -:103CF000BDE8F09F94F8A10018B1FEF7B0FBFDF706 -:103D000004FF1E48FEF7D1FB002808BF89F80070A9 -:103D1000FEF7B6FBB8F1000F71D094F884000228CA -:103D200047D0012830D003281CBFFFDFBDE8F09F3B -:103D3000E978D4F88000827E914231D12979C27E1F -:103D400091422DD16979027F914229D1A979427F8F -:103D5000914225D1E979827F914221D1297AC27F8E -:103D6000914214E08BE174E148B50100000F00209E -:103D70004EB50100ABAAAAAA4BB50100B0000020C5 -:103D8000B80F0020E00F002052E0CFE05EE107D145 -:103D90002978427EC1F38011914208BF012100D0F1 -:103DA000002194F88520012A48D0002927D0A0E0DE -:103DB00033E0FE48FFF723FC012000F019FFF8B1C3 -:103DC000FB49A1F1280005F0A8F8F948FEF7C3FA6D -:103DD00094F89D00002882D0D4F888006067B4F879 -:103DE0008C00A4F8780004F17401F14805F06AF839 -:103DF00084F89D6084F89E6071E788E02CE07FE0A5 -:103E0000FEF710FBFEF702FBFEF724FAFEF787FA37 -:103E100094F8A10000287FF45BAF84F8ACA084F88C -:103E2000A3B0FEF795FABDE8F05F002000F04FBFA9 -:103E3000DE48FFF7E4FBBDE8F05F29E4F1BB00BF1B -:103E400000F11A01D94805F044F8D84805F058F8AF -:103E5000D4F8801048764CE094F8A10018B1FEF731 -:103E6000FEFAFDF752FED348FEF71FFB002808BFFD -:103E700089F80070FEF704FBB8F1000F41D0FDF7A0 -:103E8000F4FFE8B394F88400032808D0C748FFF78C -:103E9000B6FBFEF7DFF9BDE8F05FFFF7F9BBD4F83A -:103EA0008000E978827E91421DD12979C27E9142BB -:103EB00019D16979027F914215D100E019E0A97901 -:103EC000427F91420FD1E979827F91420BD1297AC9 -:103ED000C27F914207D12978427EC1F3801191427D -:103EE00008BF012100D0002194F88520012A04D0C8 -:103EF00031B1BDE8F05F00F08FB90029F9D19FE73B -:103F0000FFE7FEF7A7F9BDE8F05FFFF7C1BB94F844 -:103F1000A10018B1FEF7A3FAFDF7F7FDA548FEF7DB -:103F2000C4FA002808BF89F80070A0E09F4804F098 -:103F3000C5FF88F802009E48E978427A91421CD178 -:103F40002979827A914218D16979C27A914214D141 -:103F5000A979027B914210D1E979427B91420CD13F -:103F6000297A827B914208D129780078C1F38011A7 -:103F7000B1EBD01F08BF012500D00025FEF76AF97C -:103F800098F8020004284BD1F5B38A48FEF78DFA61 -:103F9000002808BF88F80070FEF772FA94F8AC00A9 -:103FA00000281CBF0020FFF7BEFB84F8ACA07F4DAB -:103FB00094F8490018B1BDE8F05FFFF769BB042031 -:103FC00084F84B00284604F09BFF002808BF84F8C3 -:103FD0004C6003D0012808BF84F84CA004F14D01C7 -:103FE000284604F076FF04F15401284604F0E9FF66 -:103FF00084F853001F2884BF1F2084F8530004F165 -:10400000730598F8000000E00AE07F2808BFFFDF92 -:1040100098F80000287088F8007084F849A0CAE772 -:104020006448FEF742FA002808BF88F80070FEF7DF -:1040300027FA94F8AC00002804BF0120FFF773FBB7 -:1040400084F8AC60BDE8F05FFFF722BBFFDFBDE89E -:10405000F09F94F8A10018B1FEF701FAFDF755FDA5 -:104060005448FEF722FA002808BF88F80070FEF7CF -:1040700007FAFEF7EFF8BDE8F05FFFF709BB4D4820 -:10408000FEF713FA002808BF88F80070FEF7F8F969 -:1040900094F8AC00002804BF0120FFF744FB84F82B -:1040A000AC60FEF7D7F8BDE8F05FFFF7F1BA70B586 -:1040B000414C94F8A30007285ED2DFE800F05D5D74 -:1040C0005D5D5D040D003948FEF745F9FEF7E2F944 -:1040D000042084F8A30070BDFEF7A4F9FEF796F95A -:1040E000FEF7B8F8FEF71BF9012584F8AC50022062 -:1040F00084F8A300FEF72CF92078002818BFFFDF12 -:104100000020A070D4F880000188A180417EE17178 -:10411000D0F81A10A160C18BA1814188E182818809 -:104120002183C088608394F8A400207794F87A00F3 -:10413000A073606FC4F80F00B4F87800A4F81300FF -:1041400094F8A10018B1FDF700FD012809D0607FA7 -:1041500020F0010060772570BDE87040022000F07B -:10416000B6BD607F40F001006077FDF70BFD617F19 -:1041700060F347016177EEE7FFDF70BD70B50E4C6D -:1041800094F8A3000025052828BF70BDDFE800F0E3 -:104190004343432503000748FEF787F910B9054953 -:1041A0007F200870FEF76CF908E00000B80F0020CF -:1041B000E00F0020B0000020000F002094F8AC00B9 -:1041C000002804BF0120FFF7AEFA84F8AC50FEF7D8 -:1041D00041F8BDE87040FFF75BBAFEF723F9FEF740 -:1041E00015F9FEF737F8FEF79AF894F8A10028B110 -:1041F000FEF735F9FDF789FC84F8A150012084F819 -:10420000AC00022084F8A300FEF7A2F8BDE87040DD -:10421000002000F05CBD70BD70B5022000F0E8FC2D -:104220000025604C0126A0B3012000F050FD04F1F0 -:10423000E001A1F1280004F070FED4F88000C18AEA -:1042400004F1E00004F0E9FED4F88000017D04F1FF -:10425000E00004F0E6FE04F1E000FEF77CF894F8DC -:104260009D0080B1D4F888006067B4F88C00A4F891 -:10427000780004F1740104F1E00004F023FE84F8F6 -:104280009D5084F89E5084F89F60062084F8A30017 -:1042900070BDFFE7FEF7C6F8FEF7B8F8FDF7DAFFE6 -:1042A000FEF73DF894F8A10028B1FEF7D8F8FDF725 -:1042B0002CFC84F8A15084F8AC60022084F8A300A0 -:1042C000FEF746F8BDE87040002000F000BD70B574 -:1042D000344C0546032952D0052918BF70BD04F09F -:1042E000CBFD0521284604F0CAFD94F87A10284633 -:1042F00004F0FDFD04F17401284604F0E3FDD4F858 -:10430000800000F10D01284604F071FED4F8800011 -:1043100000F11101284604F06EFED4F88000017D02 -:10432000284604F07EFED4F88000C18A284604F0B6 -:1043300074FED4F880004188284604F062FED4F868 -:1043400080008188284604F060FED4F88000C1888F -:10435000284604F05EFED4F8800000F108012846EB -:1043600004F076FED4F88000017E284604F05BFE5F -:1043700094F8A4102846BDE8704004F05EBE04F036 -:104380007BFD0321284604F07AFD94F87A10284634 -:1043900004F0ADFD04F174012846BDE8704004F05E -:1043A00091BD0000000F00202DE9F047744E054636 -:1043B00084B096F800040C46DFF8C8A140099AF8CA -:1043C00000144909884218BFFFDF96F8000440092D -:1043D0006D4991F800144909884218BFFFDFDFF8E2 -:1043E000AC816E1E08F13809002709EB4505092C40 -:1043F00080F0C280DFE804F005323C3C37C0C0C02A -:1044000070000B2EA8BFFFDF35F8020C0621F9F76C -:1044100014FB040008BFFFDF0B2EA8BFFFDF35F839 -:10442000020C2188884218BFFFDF94F8980000280A -:1044300008BFFFDFC8F8047088F80170C8F80C7076 -:10444000606AB0F5717F88BFA0F237372046C8F8A0 -:10445000087004B0BDE8F04702F0D5B904B0BDE87B -:10446000F04702F02CBA04B0BDE8F047FEF7FAB806 -:104470009AF8140D4649400991F8001449098842F8 -:1044800018BFFFDF0B2EA8BFFFDF35F8020C062197 -:10449000F9F7D3FA040008BFFFDF0B2EA8BFFFDF38 -:1044A00035F8020C2188884218BFFFDF204602F051 -:1044B000BCFA002818BFFFDF00222146684600F042 -:1044C000EAFC94F8A2006946FBF7BEFD208E401C72 -:1044D000208604B0BDE8F0870B2EA8BFFFDF35F8BB -:1044E000020C0621F9F7A9FA040008BFFFDF0B2E22 -:1044F000A8BFFFDF35F8020C2188884218BFFFDF14 -:1045000094F89800042818BFFFDF84F8987094F896 -:10451000A2504FF6FF76681E0B28A8BFFFDF09EBFD -:10452000450020F8026C94F8A200FBF727F984F804 -:10453000A270D4F8A800002804BFD4F8A400C8F8DA -:10454000100008D0D4E92B12114482691144816112 -:10455000D4E92901C860D4F8A400002819BFD4F810 -:10456000A8100161D4F8A80087610A48007804B057 -:10457000BDE8F047F5F724B8FFDF04B0BDE8F087E9 -:1045800001E000E00BE000E018E000E0081000208F -:1045900019E000E0B80000202DE9F047FD4E074685 -:1045A0000024F08B401C80B2F0833278A046002AB1 -:1045B00008BFFFDF09D0F74B042AA3F114095D6897 -:1045C00013D0052A18BFFFDF44D021463069FBF71E -:1045D000ADFB306187F8008001213971B860B068A7 -:1045E00000F22710F860BDE8F0870A282CBF0220EF -:1045F0000320787100297BD0D6F810A0D9F810409C -:1046000034B3A146E468002CFBD1B9F1000F1FD0F0 -:1046100099F80000002808BFFFDFD9F81410D9F876 -:10462000040001445046FCF707FB002807DA291A6A -:104630004A1E92FBF5F202FB0504294604E090FBBA -:10464000F5F202FB150429468C4288BFFFDFBCE768 -:104650004446BAE702207871002953D0D6F818A052 -:10466000BAF1000F08BFFFDF0025DAF8AC20D9F857 -:1046700010402846691E5CB1A069904228BF814263 -:1046800084BF014625462046E468002CF4D105B9D4 -:1046900005460AF19804CAF8A850002D04BFC4F8D2 -:1046A0000C80C9F8104005D0E868EC60E060002894 -:1046B00018BF0461D4F81090C4F81880B9F1000F45 -:1046C0000ED0D9F8180048B1D4F814A0504538BF1E -:1046D000FFDFD9F81800A0EB0A00A061C9F8188024 -:1046E000002D08BFC6F8208009D02878002800E0F7 -:1046F00008E008BFFFDF696968680844306240F677 -:10470000B83462E72C4660E72DE9F041A24C8046C0 -:1047100084B094F800040E46A04F410997F80004B5 -:104720004009814218BFFFDF94F8000440099C490A -:1047300091F800144909884218BFFFDF00250122C3 -:10474000092E944C5ED2DFE806F0051B3636315D4B -:104750005D184C0062732273607800281CBF04B09F -:10476000BDE8F0818F484560C5602573A068CD38ED -:10477000FFF76EF8002818BFFFDF04B0BDE8F08136 -:10478000607850B1207B002808BFFFF793F965736C -:1047900004B0BDE8F041FAF738BFA273FFF7F2F8B2 -:1047A000002818BFFFDF04B0BDE8F08104B0BDE809 -:1047B000F041FDF757BF97F8140D7B49400991F878 -:1047C00000144909884218BFFFDF01220021684612 -:1047D000FFF7E2FE69464046FBF736FC04B0BDE851 -:1047E000F0812078052818BFFFDF207F002808BF50 -:1047F000FFDF25772570207DFAF7C0FF257504B00F -:10480000BDE8F081FFDF04B0BDE8F0812DE9F041A3 -:10481000604C84B00025207804281FBF207805282C -:104820000C2004B018BFBDE8F08101276770607BE1 -:10483000002690B172B6607B00281CBFA07B0028C8 -:1048400005D0FFF737F96673A673FAF7DEFE62B696 -:10485000207DFCF77BFAD0B913E094F81480032094 -:104860008DF804008DF80500FAF79EFF02904FF0D6 -:10487000FF3003908DF8007069464046FBF7E4FB7B -:10488000E6E720BF207DFCF761FA0028F9D0207F01 -:1048900028B126772078052818BFFFDF0C25667021 -:1048A0002670207DFAF76AFF267504B02846BDE819 -:1048B000F0812DE9F047374884B00078002818BF10 -:1048C000FFF7A4FF0120374E307069460620F9F744 -:1048D00040F8002818BFFFDF00254FF6FF7718E0EB -:1048E000029800281CBF90F89810002911D0008869 -:1048F000B84218BFDFF8B48045D00621F9F79DF81B -:10490000040008BFFFDF94F8A200FCF71FFA68B9A3 -:1049100005E06846F8F7FBFF0028E1D033E020BF50 -:1049200094F8A200FCF712FA0028F8D084F8985006 -:1049300094F8A2904FF6FF7AA9F101000B28A8BFC6 -:10494000FFDF08EB490020F802AC94F8A200FAF768 -:1049500015FF84F8A25069460620F8F7FAFF0028F0 -:1049600018BFFFDF0AE0029800281CBF90F89810DB -:10497000002903D00088B842BFD104E06846F8F7A8 -:10498000C6FF0028EFD03570356104B00020BDE8C7 -:10499000F08700001C10002001E000E00BE000E0C8 -:1049A00018E000E00810002019E000E040100020AE -:1049B00010B50078FE4C60B101280CBF40F6C41061 -:1049C000FFDF06D0A06841F66A01884228BFFFDFFA -:1049D00010BDA060F6E710B5F54C00232070F54837 -:1049E00003704370037703734373837383610375A9 -:1049F00024304FF6FF7101800522418020F8041F0A -:104A0000521EFAD1180008BFA36005D0002B0EBFBC -:104A1000FFDF40F6C410A060A06841F66A0188423A -:104A200028BFFFDFBDE8104043E770B5E14C0E46FC -:104A300084B02178154600291EBF0C2004B070BD3B -:104A4000416A01F29731C0F8AC10A06190F898006B -:104A5000002818BFFFDF40F2712006FB00F1684319 -:104A60000A30C4E90110A1F53D71884288BF0846AB -:104A7000A060D1490020C8600521217060702077B6 -:104A8000E083CE48FAF72BFE2075002808BFFFDF31 -:104A9000FAF78AFE2061002201216846FFF77CFDBB -:104AA000207D6946FBF7D0FA04B0002070BD884233 -:104AB00034BF012200220244D2B2814234BF01201D -:104AC00000200844C1B28A4234BF08461046831A07 -:104AD000A0EB010C114401EBC102634402EB411154 -:104AE00003EB83031B0100EB400203EBC10102EB6C -:104AF000001201EBC201C0EBC00202EB401001EB5F -:104B00008000983870474FF44B72B1F54B7F38BF37 -:104B1000114641627047A748007800281CBF00205A -:104B2000704710B50620F8F725FF80F0010010BD92 -:104B300010B5A04C84B02278002A1EBF0C2004B00F -:104B400010BD40F27122424340F2712048430A30C6 -:104B5000C4E90120A2F53D71884298BF01460020BA -:104B6000A160607004212170E0839448FAF7B7FDDA -:104B70002075002808BFFFDFFAF716FE40F6B831AF -:104B8000FBF7D4F82061002201216846FFF704FDFD -:104B9000207D6946FBF758FA04B0002010BD70B5BF -:104BA000844CA1690160FFF731FE002308B1A361C5 -:104BB00070BDA169D1F8A8205AB1D1E92BC5AC4488 -:104BC0009569AC44C2F818C0D1E9292CCCF80C2066 -:104BD00005E0DFF8E4C1D1F8A420CCF81020D1F82A -:104BE000A420D1F8A810002A14BF11618B61DEE760 -:104BF000714910B54968002801F1980408BF04F50F -:104C0000BC7409D0012808BF04F5317404D002280F -:104C100014BFFFDF04F5B07466488068A0428CBF03 -:104C20000120002010BD6448D0E90112914204D255 -:104C30000078002804BF012070470020704730B57D -:104C40005B4D85B0042221B3012908BF03211CD08C -:104C5000022908BF80F8982023D003291EBFFFDF58 -:104C600005B030BD418840F2E2425143544A1160E0 -:104C7000D0F8BC100A89C2828A7902754A894280BA -:104C80008A898280C989C180022180F8981005B084 -:104C900030BD044648480078002818BF84F89820A2 -:104CA00007D0FAF7B2FC287805B0BDE83040F4F739 -:104CB00087BC01222146684600F0EDF894F8A20076 -:104CC0006946FBF7C1F9208E401C2086E9E72DE9F3 -:104CD000F041374F0100374C387884B04FF0000571 -:104CE0000ED001291CD0022976D003291EBFFFDF78 -:104CF00004B0BDE8F08104B0BDE8F041F4F760BC59 -:104D0000E583F4F75DFC6078002875D10022114638 -:104D10006846FFF741FC207D6946FBF795F96BE09B -:104D2000DFF89480206940F2E243D8F80410084488 -:104D3000A16900F251604A88983102FB03F5D8F866 -:104D400010208A4208BF002614D0216AFBF774FFA6 -:104D5000002807DA291A4A1E92FBF5F202FB050623 -:104D6000294604E090FBF5F202FB150629468E4227 -:104D700088BFFFDFB868864208D2A06940F271227E -:104D80004188C1824A4306EB420605E040F2E24018 -:104D9000B6FBF0F0A169C882A06905210175C08A3F -:104DA0006FF41C71484306EB400040F635410AE0C1 -:104DB000B80000201C100020081000200947010046 -:104DC000BC00002008E0C8F80C00B0EB410F28BF81 -:104DD000FFDF04B0BDE8F081E583F4F7F1FB0120CB -:104DE0002077A0692169C0F89C1080F8985021783C -:104DF000052918BFFFDF06D0FAF707FC6573A57316 -:104E000004B0BDE8F081002808BFFFDFA06990F87A -:104E10009800002818BFFFDFA06990F8A2000028C2 -:104E200018BFFFDF5B48FAF75AFCA169064681F814 -:104E3000A2000F88401E0B28A8BFFFDF564800EBDA -:104E4000460020F8027CA06990F8A200002808BF64 -:104E5000FFDF01226846A16900F01DF8A0696946DC -:104E600090F8A200FBF7F0F8A561C5E7704700B520 -:104E70004A4A59B1012908BF401E07D002291CBF68 -:104E8000FFDF00BD5178491C5170C01F506000BD4C -:104E90004348007870472DE9F05F06460C46488885 -:104EA00040F2E24141439046E08A40F2E24200FB98 -:104EB00002FA94F898200025384F4FF0030B4FF07A -:104EC000010952B13846012A40682DD0022A16D075 -:104ED000032A18BFFFDF27D036E0B8F1000F08BF64 -:104EE000FFDF7868002808BFFFDF7868F968C01D19 -:104EF00008440AF25D41451884F8989023E0A8F12F -:104F00000101084308BFFFDF2648B8F1000F006821 -:104F100000EB0A0505D0786800F20F30A84288BF80 -:104F2000FFDF84F898B00EE00D46B8F1000F0AD00C -:104F300018B97878002818BFFFDF786800F20F30C2 -:104F4000A84288BFFFDF05B9FFDF2946D4F89C00DF -:104F5000FAF7ECFEC4F89C000020307086F804904C -:104F6000D4F89C00B060204601F095FD002818BFE1 -:104F700086F8059005D0606A00F5E570F060BDE840 -:104F8000F09F94F89800012806BF0220707186F8FF -:104F900005B0F0E7A94301004010002008100020F0 -:104FA0001C100020BC000020FE48C07E7047FE4858 -:104FB00040687047FD48C07E7047884234BF012278 -:104FC00000220244D2B2814234BF012000200844B2 -:104FD000C1B28A4234BF08461046831AA0EB010CC6 -:104FE000114401EBC102634402EB411103EB830363 -:104FF0001B0100EB400203EBC10102EB001201EBCD -:10500000C201C0EBC00202EB401001EB80009C38F3 -:1050100070474FF44A72B1F54A7F38BF114641627A -:1050200070472DE9FF4FDF4E83B08846706A3468C1 -:105030005FEA03090568D4F804B0306A0190298E4C -:105040000598A0EB010080B2009019BF04F1380769 -:1050500004F1480A371D05F1A80A032038710398A6 -:10506000002832D0012800F0DF8002287DD00328FC -:1050700018BFFFDF00F00C81B9F1000F1EBF3879B7 -:105080000328FFDFA16A7069FAF750FEB860D4E91F -:10509000081081428EBFCAF800000846CAF8001006 -:1050A000696A084400F24F10F860B5F89810059846 -:1050B000081A00B2002840F349810398022818BF5B -:1050C000032040F0448100F041B9306A002808BF55 -:1050D000FFDFE98A40F27120484340F2E24101EBF0 -:1050E00040010020B8F1000F06D0B14808FB01F1E3 -:1050F000B1FBF0F000F10100A061698840F2E242EA -:1051000001FB02F24FF0000106D0A94908FB02F2B0 -:10511000B2FBF1F101F10101E161316A40F2712369 -:1051200001F10101A162EA8A02FB03F2C0EB420233 -:1051300002F237421144A1622A7D40F2E24312FB9F -:1051400003F202EB400000F2151020626062306A48 -:10515000A1EB00009749A0F1010009188CD2B0F52D -:10516000387F98BFFFDF5CE0FFE7E98A40F27122F9 -:10517000E068514300EB41010020B8F1000F06D078 -:105180008B4808FB01F1B1FBF0F000F10100A061D8 -:10519000688840F2E24100FB01F14FF0000006D0C8 -:1051A000834808FB01F1B1FBF0F000F10100E06180 -:1051B000306A002808BFFFDFB5F8AE00E98A002892 -:1051C00040F27122E06801FB02F100EB4100A169AD -:1051D000A0EB010003D13168D33849680844A062CC -:1051E0002269A168A06901FB0200297D40F2E24228 -:1051F00011FB02F101EB400000F2131020626988FC -:105200005210E0695143C0EB4100A0F54770606265 -:10521000A06A316A401AA0F5AA7167484018BFF425 -:105220002BAF0120387127E7B5F8AE00002808BF82 -:10523000FFDF306A002808BFFFDF698840F2712273 -:10524000E0695143C0EB4101A162B5F8AE3022697B -:10525000D4F818C0D4F808809B1A08FB02C203FBDC -:1052600000202A7D40F2E24312FB03F202EB4000F1 -:1052700000F213102062A1F547706062306A081ACC -:10528000A0F5AA714C484018BFF4F6AEC9E700BFBC -:10529000B9F1000F1CBF94F83400002803D007B008 -:1052A0000220BDE8F08F698840F27122E069514325 -:1052B000C0EB410100984843A062B5F8AE0030B39E -:1052C000BBF1000F18BFFFDFB5F8AE100098002249 -:1052D0000844E169484302EB400000F213102062E9 -:1052E000688840F271225043C1EB4000A0F547703E -:1052F000606232484068B0B1A26A01990120511A37 -:10530000A1F5AA722C49891838BF3871B4E6BBF1EF -:10531000000F1ABF01980028FFDFABF1D301A06A8C -:105320000844A062D0E7FAF73FFA726901461046D6 -:10533000FBF782FCA16A081AA0F24F111E48401820 -:105340003EBF012007B0BDE8F08F95E600207871E0 -:105350001098C8B1B5F8C01000290CBF0020B5F8EE -:10536000C200A5F8C20095F8C420401C50438842F2 -:105370000AD27879401E002806DD01207871B5F840 -:10538000C200401CA5F8C20087F80090B9F1000FD8 -:105390001CBF94F83400002881D189F0010084F802 -:1053A00035000DE058100020DC00002080100020A7 -:1053B00040420F00DBF7FFFFF4F8FFFFCC000020B6 -:1053C000307FF27E3946B37E9A4202D0FAF73CFE35 -:1053D00004E00020F076B0763060706207B0002004 -:1053E000BDE8F08F70B5FD4D0929D5E900326FD2C7 -:1053F000DFE801F0055B73816F9494589000002002 -:105400001062D17E04294ED2DFE801F04D4D0245F5 -:10541000516A0C681168087011684860106890F84B -:10542000350040B9FAF7C0F969680968096CFBF7FB -:1054300003FC002818DC686801684A8E218E8A42C5 -:1054400006D1B4F89C20511AA4F89E10228605E0DB -:10545000511AA4F89E100168498E21860268C1681D -:105460001164C168416111E068680168098E228E8B -:10547000891AA4F89E100168098E218601680A6CB9 -:10548000C2600A6C4261886CC4F8A8002046BDE87E -:10549000704002F01DBAD0685061FDF7ABFC0028E7 -:1054A00018BFFFDF70BDFFDF70BDD07E04280DD2B6 -:1054B000DFE800F00C0C0206BDE8704002F0D8BA3C -:1054C000FDF7D9FD002818BFFFDF70BDFFDF70BDFD -:1054D00024E0BDE87040FDF7C5B8D87E022804D0AE -:1054E000D87E032818BFFFDF0CE0BD48007D0128EF -:1054F00008BFFFDF0AE0D87E022807D0D87E032845 -:1055000018BFFFDFBDE8704000F0B5BBBDE87040DC -:1055100000F0FCBBBDE87040FAF730B9FFDF70BDAA -:105520002DE9F047AD4D0024AE4E82460F464FF0B8 -:10553000010809294ED2DFE801F0053B46463B4D04 -:105540004D4646006868DFF89C92002818BFFFDFD0 -:1055500039465046C5F80490FFF744FFF07E022814 -:1055600018BFBDE8F08768680568406A0768FAF701 -:10557000FEF87A8840F27123E9695A43C1EB42018F -:10558000AB39B72898BFB72000F54A70081A796A76 -:10559000A0F20130B1F5717F88BFA1F5717484422A -:1055A00038BF2046E862306880F83480BDE8F08774 -:1055B0005046FFF717FFF07E022804BF306880F8DE -:1055C0003480BDE8F08750462E60FFF70BFF2C605B -:1055D000BDE8F087FFDFBDE8F0872DE9F0417F4CA3 -:1055E00007460D4609291ED2DFE801F00510141404 -:1055F000101D1D14140060687B4E002818BFFFDFCB -:10560000294638466660BDE8F041EBE63846BDE81D -:10561000F041E7E6744820603846FFF7E3FE0020DB -:105620002060BDE8F081FFDFBDE8F081F0B56D4995 -:1056300085B00026CA7E694C032A03D02831CA7E71 -:10564000032A64D10025216000B3012806BF03208E -:105650008876FFDF0AD02068002E0560456225604D -:1056600055D06248456005B00020F0BD2068C17E7D -:1056700029B1C17E827E914208BF20BFF6D0C17E93 -:1056800000290CBF012600268576E4E700260327C3 -:1056900008468F76C97E032904D0C07E002808BF43 -:1056A000012631E00120FDF705FD2068007F00287C -:1056B00008BFFFDF2068067F8DF804708DF8057045 -:1056C000FAF772F802904FF4FA70039001208DF807 -:1056D000000069463046FAF7B7FC2068007FFBF708 -:1056E00035FB30B920BF2068007FFBF72FFB002877 -:1056F000F8D02068007FFAF741F820680577C57672 -:10570000857605600126456220688576A3E705B0A9 -:105710000C20F0BD10B5334800F076FB324800F0A5 -:1057200073FB2F4900200875304948702D494861A6 -:1057300001F1280250618876907628494860086017 -:1057400010BD2DE9F0412A4C064694F80004294D7D -:10575000400995F800144909884218BFFFDF94F802 -:1057600000044009244991F800144909884218BFEF -:10577000FFDF95F8140D4009204991F800144909FC -:10578000884218BFFFDF1E48164D00240670EC76D5 -:10579000AC7605F12806F476B4761030012101715B -:1057A00004606C6274622C6000F108073460284663 -:1057B0007C6000F029FB05F1280000F025FB05F1D5 -:1057C000500004757C706C617461AC76B476A7F19E -:1057D000100044600460BDE8F0810000CC000020AF -:1057E000A81000205810002080100020DC000020AD -:1057F00001E000E00BE000E018E000E019E000E06C -:10580000C4000020F849087170472DE9F843F749B2 -:105810000546CA7EF64C01F12800002A04BFC27E6C -:10582000002A73D0C97E022907BFC17E00290C203F -:10583000BDE8F8832060EF48F9F751FF2168087749 -:10584000ED4845602168086014384862ADB1012117 -:1058500005F1C400FBF762FD0620F8F799F806464B -:105860000720F8F795F895F8C4103044B1FBF0F232 -:1058700000FB1210401C85F8C4002068007F00283F -:1058800008BFFFDFF9F773FFDC49091838BF40F2A2 -:10589000F65000F26B1087B220680326C676FDF73B -:1058A000B2F921680861FDF7D2F94FF0010800252F -:1058B00058B3FDF7CCF921684A6A106008680121E5 -:1058C00080F800806846FBF7B4FC9DF8000042F2C7 -:1058D00010710002B0FBF1F201FB1208F9F764FF4E -:1058E00007EB0801FAF722FA2168C86022681672ED -:1058F00056721571107FD37E111D92F81AC0634540 -:1059000018D0FAF7A1FB19E000E006E0BC482160DE -:10591000F9F7E5FE2168087792E7F9F745FF394680 -:10592000FAF704FA2168C86008680570086880F80A -:105930000180DBE7D5769576156055622068058392 -:105940000020FDF7B7FB00202560BDE8F883704715 -:10595000F8B5A64EF17E19B906F12801C97E09B144 -:105960000C20F8BD0221F1769F4FA64D776235607D -:10597000002438602C750094A3493A7990F8CC0043 -:10598000234631F8122031F81000104481B222462B -:105990002046FFF746FB002818BFFFDF2C610120DF -:1059A000AC6028756C862C8685F836403868018E88 -:1059B000491E018634830020F8BD8D4810B540682B -:1059C0000124817E032908BF002409D00168497899 -:1059D00031B1006A8D49884284BF0024FDF766FB1F -:1059E000204610BD8248406801680A78521C0A703F -:1059F000016A0068C26A914204D8007D01281CBF78 -:105A000001207047002070472DE9F843784C774813 -:105A100000262060416A00680D6880F8346095F8BF -:105A2000A610002904BF007D032850D1F9F7BCFE61 -:105A30002268526901461046FBF7FEF8002846DD51 -:105A4000216840F271274A6A13680A685B88D2F8B5 -:105A50001CC07B43CCEB4303B0FBF3F02B8E401C0C -:105A6000184410860A68B5F89C00118E401A00B2DE -:105A700000282CDD012082F83600B5F84E00B5F87C -:105A80004C10DFF88481401A298E401E084487B2EA -:105A900016E0496A097938F811100096028E95F8D7 -:105AA000CC30007D38F81330194489B20123FFF758 -:105AB000B8FA60B101280DD0022818BFFFDF06D068 -:105AC00021680868028EBA1A12B2002AE1DA26604A -:105AD000BDE8F88320680068018E491C0186EFE765 -:105AE00070B5434E00240628756843D2DFE800F005 -:105AF0001820030E240D002000F0C3F9EC76AC76DC -:105B00002C606C62706888B1746070BD4048356804 -:105B10000078F3F755FDEC76AC762C606C6270BDC6 -:105B2000012000F0AEF970680028EDD1FFDFEBE74F -:105B300029680320087570BD686A29680068CA6909 -:105B40008A60418840F2E24251432A68D160B0F84D -:105B5000E810C18290F8E6100175B0F8EA104180B3 -:105B6000B0F8EC108180B0F8EE10C18029680220F6 -:105B7000087570BDFFDF70BD70B51D4D002470B19C -:105B8000012812D002281CBFFFDF70BD00F0D5F93C -:105B90006868C47684760460446220B93BE000F013 -:105BA000CCF96868B0B36C6070BD686801684C700F -:105BB000C4768476104E046044620021706802F05E -:105BC000EDFE706880F8E24080F8E340FFF7C0FE29 -:105BD000002818BFFFDFF9F718FD0D486C6000784A -:105BE000F3F7EEFC6C6070BDD4000020581000206C -:105BF000CC000020DB550100DC0000200AFAFFFF8A -:105C000021550100A810002052B50100CF821300D9 -:105C1000C4000020FFE7FFDFC5E7E7494968CA7E07 -:105C2000022A18BF70470A681378002B18BF704704 -:105C300050600968CA6A10442838C8627047DE4A52 -:105C400000B5526841B1012908BF401E04D00229A5 -:105C500016BFFFDFC01F00BD106200BDD748C07E69 -:105C600000281CBF0020704710B50720F7F782FE00 -:105C700080F0010010BD38B5CF4C2068016849782C -:105C8000012932D001216846FBF7D3FA9DF80000C4 -:105C900042F210710002B0FBF1F201FB1201206828 -:105CA000426AC06812681144FAF740F82168C86077 -:105CB000C249226803208A4205D0118B0A2924BFD9 -:105CC0000221517203D2118B491C11835072107240 -:105CD00000231371107F92F81BC0111D947EA44500 -:105CE0000FD0BDE83840FAF7AFB9C0684FF47A7109 -:105CF000FAF71CF82168C860FCF785FF2168086185 -:105D0000D6E7D37693761360536238BD2DE9F84316 -:105D1000A94E3068416A04680D6894F8351031B1B5 -:105D2000618E2A8E914202BF407A0028FFDFF9F788 -:105D30003BFD3268526901461046FAF77DFF336831 -:105D40004FF000090028596A096808BF48460AD080 -:105D50001A68498840F2712CD26901FB0CF1C2EB40 -:105D60004101B0FBF1F02A8E618E02EB000C61451F -:105D7000AEBF481C401C1044608694F8360030B911 -:105D8000608EB5F89C10884204BF401C6086188B5A -:105D90008B4F401C1883B5F84E00B5F84C10401AD4 -:105DA000298E401E08441FFA80F818E03068406AC7 -:105DB000007937F81000CDF8009095F8CC1037F83E -:105DC0001110084481B2207D0023FFF72AF9002832 -:105DD00008BFBDE8F883012818BFFFDF10D0628E2E -:105DE000A8EB020000B20028E0DA082085F84A009B -:105DF000012085F849002846BDE8F84301F037BA8C -:105E0000608E401C6086EAE72DE9F047DFF8B48138 -:105E1000694C05464FF01F090027EE7E042E23D261 -:105E2000DFE806F02922021D454518BFFFDF0220EA -:105E30002560A8762168C87E28B1C87E8A7E9042F7 -:105E400008BF20BFF6D0C87E8F7600281CBF4FF059 -:105E50000C0927600CD10F604F6227600BE0012016 -:105E6000FFF7E4FB814600E0FFDFB9F1000F02D04D -:105E7000E87EB042D1D1E87E002818BFFFDFBDE840 -:105E8000F087F8B54C4D002601286A68516A0C6805 -:105E900044D108794A4B33F81010106890F814C0B8 -:105EA0000127BCF1030F06D0027D022A12D0007D2B -:105EB000012823D032E0066110688660009794F8CC -:105EC000CC00B4F89C2033F810000023084481B2C1 -:105ED00003201EE0B4F8AE200261009794F8CC00D5 -:105EE000B4F89C2033F810000023084481B202204B -:105EF000FFF797F8696809680F750CE0009794F848 -:105F0000CC00B4F89C2033F810000023084481B280 -:105F10000120FFF786F8002818BFFFDFF9F775FBAF -:105F200029480078F3F74CFB686806830268218EE5 -:105F30005186006880F83660F8BD38B51E4C0020E8 -:105F40000546616809684A78002A18BF4D702AD151 -:105F5000097861B101216846FBF78FF99DF80000CF -:105F600042F210710002B0FBF1F201FB1200626814 -:105F7000516A09680144D068F9F7D8FE6268D060B8 -:105F8000157103205072107FD37E111D92F81AC034 -:105F9000634502D0FAF758F803E0D5769576156098 -:105FA000556260680583F9F730FB07480078BDE863 -:105FB0003840F3F705BB0000CC0000208010002023 -:105FC00052B5010058100020C400002010B584B064 -:105FD00004466846FCF71BFD002808BFFFDF009859 -:105FE00003F09DF80321009803F0B3F800980178BE -:105FF00021F010010170214603F00EF90D2C7CD226 -:10600000DFE804F03122075CABABAC159AABACAC6B -:106010008100FE48806890F8B510009803F07BF985 -:10602000FCF708FD00281CBF04B010BD81E0F74854 -:10603000806890F89110009803F0BDF9FCF7FAFC25 -:10604000002808BFFFDFA6E0F0488068D0F8C00055 -:10605000411C009803F050F9FCF7ECFC00281CBF31 -:1060600004B010BD65E0E94CA068D0F8BC008179AF -:10607000009803F015F9A068D0F8BC0001890098D9 -:1060800003F007F9A068D0F8BC004189009803F03C -:10609000EBF8A068D0F8BC008189009803F0EBF819 -:1060A000A068D0F8BC00C189009803F0EBF8FCF7B9 -:1060B000C1FC00281CBF04B010BD3AE0D34CA0685E -:1060C000D0F8BC00011D009803F029F9A068D0F8B1 -:1060D000BC0000F10C01009803F02BF9A068D0F887 -:1060E000BC0000F11E01009803F029F9A06800F13E -:1060F0008801009803F031F900E02EE0FCF79AFCEB -:1061000000283CD145E0C14C60690178009803F05B -:106110003CF960698188009803F039F96069418829 -:10612000009803F038F9FCF785FC00281CBF04B088 -:1061300010BDFFDF04B010BD0020029003909DF859 -:10614000080002A940F001008DF80800009803F053 -:1061500034F9FCF76FFC90B91BE0FFDFFCF76AFC39 -:10616000002808BFFFDF0C2C04BF04B010BD072CB3 -:1061700011D0012C19BF002C022C04B010BD00213D -:10618000A2488068A0F85210012180F8561004B08F -:1061900010BDFFDFF3E79D4900208968A1F8580092 -:1061A00004B010BD2DE9F843984D04464FF00006A9 -:1061B0006878084368702846A988806811F0200F25 -:1061C00018BFA0F84C6004D1B0F84C20521CA0F8C5 -:1061D0004C2011F0600F4FF0010707D090F83E10EF -:1061E00021B980F83E700121FEF729FD4FF0080823 -:1061F000002C40F018826878002840F01681287939 -:1062000010F0040F0DD0A86890F83B00052808BFD7 -:10621000FFDFA86890F83D10022904BF2F7080F8B6 -:106220003D60287910F0020F00F0CD8068780028DA -:1062300040F0C980E868C0780D2880F0C380DFE8AE -:1062400000F04333076FC1C1851823C15264900029 -:10625000A8680023012190F83D20303002F0C3FDF2 -:1062600000283FD1A868032180F83D1080F85660CF -:106270008DE0A8680023194690F83C20303002F0E9 -:10628000B2FD00287ED19EE0A8680023194690F850 -:106290003B20303002F0A7FD002808BFFFDF0920B7 -:1062A000A96881F83B008EE0A8680023194690F8A1 -:1062B0003B20303002F097FD002808BFFFDF0720A9 -:1062C000A96881F83B007EE0A8680023194690F891 -:1062D0003B20303002F087FD002808BFFFDFA868B0 -:1062E00080F83B806FE0A8680023194690F83B20B7 -:1062F000303002F078FD002808BFFFDFA8680A21CF -:1063000080F85B7080F83B105DE0A86890F83B0077 -:106310000D2818BFFFDFA8680C2180F85C7012E020 -:10632000A8680023194690F83B20303002F05BFD4E -:1063300028B9A86890F85C00002808BFFFDFA868AB -:106340000E2180F85B7080F83B103CE0A86890F864 -:106350003B00132818BFFFDF1520A96881F83B0018 -:1063600031E0A868D0F8BC1003884A889A4204BF7C -:10637000097804290ED0A8680023194690F83C201B -:10638000303000E002E002F02EFDE0B1A86880F8B5 -:106390005A6018E090F83B2000231946303002F094 -:1063A00022FD002808BFFFDFA86890F85E1011F0FA -:1063B000020F0FBF80F83B7080F85660D0F8BC0029 -:1063C0000670D8E7FFDF287910F0080F0AD0687848 -:1063D00040B9A86890F83D10032903D10221297023 -:1063E00080F83D6000F0E2FBA87810F0080F19D0AB -:1063F000A8680023052190F83B20303002F0F3FC20 -:1064000070B185F80180A86802E00000E400002077 -:10641000D0F8D01008780B2808BF0020087001E0E1 -:1064200002F029F8A86800F046FB6846FCF7EFFA8E -:10643000002800F0F8806878002840F0F480A86810 -:106440000023012190F83D20303002F0CCFC0028E0 -:1064500040F0E980A86890F8B410002918BF022025 -:1064600026D190F83B200C2A0ED00D2A08BF0B2015 -:106470001ED0132A08BF06201AD000230421303072 -:1064800002F0B1FCB8B1CEE0FAF7F6FE0C284DD31D -:10649000A8680821D0F8BC001E30FAF7EEFE28B13B -:1064A000A86804218830FAF7E8FE00B9FFDF03206E -:1064B000FFF78CFDB7E0A86890F83C10012927D0C1 -:1064C000052920D0D0F8BC100A7882B34988028808 -:1064D000914261D190F83B2000231946303002F000 -:1064E00082FC20B3A868D0F8BC100978022908BF44 -:1064F000002026D003291BD004293AD0052908BF43 -:1065000008201ED048E00720FFF760FDA8680BE0D8 -:106510000C20FFF75BFDA868A0F8586090F85E10AB -:1065200041F0010180F85E1080F83C607BE033E0D0 -:1065300090F83F1041B190F84000002808BFFFDFFD -:106540000A20FFF743FD27E0FAF796FE0C2823D335 -:10655000A8680821D0F8BC001E30FAF78EFE28B1DA -:10656000A86804218830FAF788FE00B9FFDF03200D -:10657000E7E790F85E0010F0030F0DD10C20FFF755 -:1065800025FDA868A0F8526080F8567090F85E105B -:1065900041F0010180F85E106846FCF738FAE0B37C -:1065A000A8680023194690F83B20303002F01BFC0D -:1065B00098B3A86890F8C41079B3A969097861BB49 -:1065C000018E0A292FD900F108010522E86904F09B -:1065D00005FC0028A86808BF80F8C46023D0D0F864 -:1065E000C000017851B1411C0522E86904F0F6FBB6 -:1065F00098B9A868D0F8C000007830B9A868E969EF -:10660000D0F8C000401C04F0D4FDA868D0F8C00049 -:106610000178491C0170012000E004E0FFF7D6FC7E -:10662000A86880F8C460A868A14600F1300490F81A -:10663000B40030B9627B00230121204602F0D3FB75 -:1066400010B1208C401C20843D21B9F1000F18D1DD -:106650002878022808BF16200ED0012804BFA86899 -:1066600090F8B60008D06878B0B110F0140F1CBFD5 -:106670001E20A07602D005E0A07603E010F0080FFF -:1066800002D0A17667763AE010F0030F08BFFFDF73 -:106690002A20A076677632E094F8260028B1608C34 -:1066A000411C6184A18C884213D294F82A0028B13D -:1066B000208D411C2185A18C88420AD2208CE18B3F -:1066C000884203D3AA6892F8B42012B9A28C9042EF -:1066D00003D32220A076677611E0A07B0028A08B50 -:1066E00005D0884228BF84F81A80CBD205E006285E -:1066F00003D33E20A076677601E0607E40B1E6726B -:106700002673A673A868BDE8F8430221FEF797BA7E -:10671000A868BDE8F8430021FEF791BAFE494A781F -:106720008B781A430ED101280AD0087910F0040F93 -:1067300004D0886890F83D00022803D001207047FB -:10674000FEF771BA0020704770B5F34C05460E464F -:10675000A0882843A08015F0020F04D015F0010F87 -:1067600018BFFFDFE66015F0010F18BF266115F0B6 -:10677000020F13D0304602F075FD062802D00B2818 -:1067800030D00BE0A06890F83B10132906D100210F -:10679000C0E91C115FF0010180F8401015F0800F76 -:1067A0001CBF0820A07015F4806F08BF70BDA168E1 -:1067B000088E89880844801D85B2304602F052FD5B -:1067C000012817D0304602F04DFD002818BF70BDDB -:1067D000A0682946D0F8BC0085803046BDE87040EE -:1067E00002F062BDA06890F83B100D2908BF00219F -:1067F000D4D1D1E7A0682946A0F8C6503046BDE8FC -:10680000704002F081BDF8B5C34C00260546A0607B -:10681000A6806670A67026700088FCF7F5F8A06860 -:106820000088FCF717F9B5F8A000A168401C82B2F7 -:1068300001F1300002F0FDF9002818BFFFDFA5F8D4 -:10684000A060A06890F8561031B1B0F85210B0F8BE -:106850005420914228BFF8BD90F85A1031B1B0F8D9 -:106860005810B0F85420914228BFF8BDB0F850201D -:10687000B0F84E108A4228BFF8BD90F83E20B0F81C -:106880004C00CAB1884228BFF8BDA4480090A44B70 -:10689000A44A2946304601F066FCA0680023052181 -:1068A00090F83B20303002F09EFA002808BFF8BD77 -:1068B000BDE8F84001F053BC0628E6D3F8BD964881 -:1068C000806890F8561029B1B0F85210B0F85420F2 -:1068D000914219D290F85A1029B1B0F85810B0F876 -:1068E0005420914210D2B0F85020B0F84E108A4295 -:1068F0000AD290F83E20B0F84C001AB1884203D278 -:1069000001F08BBD0628FBD3002001464AE42DE9A7 -:10691000F0410C4607461D461646D8212046DDF8B4 -:10692000188004F020FB2780C4F8D080C4E92F65CC -:10693000BDE8F081F7F7A4B970B50C4615460621FD -:10694000F7F77BF8002808BF70BDD0F8D0100A78A0 -:106950000021072A1ED00C2A2FD00B2A3BD0062A52 -:1069600049D090F8C820002A04BF002070BD617093 -:106970001222227090F8C82052B100BF80F8C810CF -:10698000D0F8CA20C4F8022090F8C820002AF5D117 -:10699000012070BD002DFBD1617007222270D0F85C -:1069A000D0205368C4F802309368C4F80630928946 -:1069B0006281D0F8D0000170EAE7002DE8D1617063 -:1069C0000C222270D0F8D0205268C4F80220D0F8EF -:1069D000D0000170DCE7002DDAD161700B2222704B -:1069E000D0F8D0205368C4F802301289E280D0F881 -:1069F000D0000170CCE7002DCAD161700622227050 -:106A0000D0F8D0205368D2F808C0D268C4F8023059 -:106A1000C4F806C0C4F80A20D0F8D0000170B7E767 -:106A2000002070473C494861704710B50446B0F8F3 -:106A3000A000401CA4F8A000B4F84C00401CA4F82E -:106A40004C0094F8560020B1B4F85200401CA4F851 -:106A5000520094F85A0020B1B4F85800401CA4F831 -:106A6000580094F8B40040B994F83D200023012167 -:106A700004F1300002F0B7F920B1B4F85000401C26 -:106A8000A4F85000204600F016F8002010BD224A5D -:106A9000C2E906017047B0F84C1090F83E20091D7D -:106AA0002AB1B0F84E00814203D301207047062975 -:106AB000FBD20020704770B5044690F83B000025DB -:106AC000072821D1208EB4F8C610401C884218BF78 -:106AD00070BDD4F8C000411C04F1080004F069FB4B -:106AE0000221204602F00CF884F83B50012084F883 -:106AF0006600D4F8C0000078002808BFFFDFD4F893 -:106B0000C0000178491E017094F83B00082818BFA6 -:106B100070BD208E08E00000E4000020A5610100A7 -:106B20001D67010049670100D4F8BC10401C89882A -:106B3000884218BF70BDD4F8D0000178002918BF72 -:106B4000FFDF1ED12188C180D4F8BC00D4F8D0105A -:106B500040890881D4F8BC00D4F8D01080894881DD -:106B6000D4F8BC00D4F8D010C0898881D4F8D00003 -:106B70000571D4F8D01007200870D4F8D010208800 -:106B800048800121204601F0BBFF03212046FEF78B -:106B900056F8D4F8BC0021884088884218BFFFDF2F -:106BA000D4F8BC00057084F83B5070BDF0B5FF4CC4 -:106BB0008DB0207910F0010F04BF0DB0F0BD206939 -:106BC00000230521C578A06890F83B20303002F002 -:106BD0000AF9002818BF022D0CD00B2D18BF042D68 -:106BE00008D0052D1CBF062D0D2D03D0607840F078 -:106BF00008006070607800281CBF0DB0F0BD2069EF -:106C0000C078801E0C2880F0D881DFE800F006FDF7 -:106C10002B4BD2FCFDFBFD21FA96A068002301213D -:106C200090F83D20303002F0DEF8002840F0E3819B -:106C3000206902F072FBA16881F8B600022081F899 -:106C40003D00002081F85A0081F8560000F0D3B9C9 -:106C5000A06890F83B100A2929D1002180F83F1044 -:106C60000D2166E0A06890F83B100E291FD1D0F8E6 -:106C7000BC1000884988814218BFFFDFA068D0F8A7 -:106C8000BC0000F12601206902F074FBA06800F14D -:106C90008C01206902F076FBA168112081F83B008D -:106CA00000F0A9B9A66896F83B00112803D002208D -:106CB000607000F0A0B9D6F8BC10102501F10E0CE0 -:106CC00000210DF1FF3208206B1A6344401E13F8B7 -:106CD000017C577013F8023C02F8023F01F10201F7 -:106CE000F2D1D6F8BC10102601F11E0300210822B3 -:106CF0000DF10F00A6EB010C9C44891C1CF8015CF3 -:106D000045701CF802CC00F802CF521EF2D1684642 -:106D100003F030F808ADA06895E80E1000F1780592 -:106D200085E80E100021C0E91A11012180F83F10FA -:106D3000132180F83B1000F05EB9A16891F83B0088 -:106D4000112812BF0E2891F85C000028AFD12069ED -:106D500002F02FFBA168002581F8900081F85B50BC -:106D600081F85650D1F8BC0009884088884218BF85 -:106D7000FFDFA068D0F8BC100D70D0F8D0100A78F2 -:106D8000002A18BFFFDF40F014810288CA80D0F8C3 -:106D9000D02090F890101171D0F8D0100D72D0F86A -:106DA000D0200B2111700188D0F8D000418000F074 -:106DB00000B9A06890F83B10152918BF022040F0D8 -:106DC0000981002580F85B5080F85650D0F8BC103F -:106DD00000884988814218BFFFDFA068D0F8BC1046 -:106DE0000D70D0F8D0100A78002A18BFFFDF40F0ED -:106DF000E08090F85C20A2B180F85C500288CA80E4 -:106E000003E020E08BE089E0D7E0D0F8D0100D71EE -:106E1000D0F8D0200C2111700188D0F8D00041802A -:106E2000C7E00288CA80D0F8D0100D71D0F8D02009 -:106E300001211172D0F8D0200B2111700188D0F8F7 -:106E4000D0004180B5E0A0680023194690F83C20AE -:106E5000303001F0C8FF48B9A0680023072190F83E -:106E60003B20303001F0BFFF00287DD06078002843 -:106E700054D1A06890F85E0010F0020F17D120697D -:106E800002F08DFAA16881F85F00206902F089FAAA -:106E9000A168A1F86000206902F086FAA168A1F853 -:106EA000620091F85E0040F0020081F85E00A06888 -:106EB00090F85E1011F0010F15D190F83C200023DE -:106EC0001946303001F08FFF002808BFFFDF012195 -:106ED000A068042280F83C1080F8B82080F85A108E -:106EE0000021A0F85810A06890F83B10012904D1A7 -:106EF000002180F83B1080F85610D0F8BC200388A1 -:106F00005188994204BF1178042974D1002111706D -:106F100090F83B20002A08BF80F856106BE0A0686C -:106F20000023062190F83B20303001F05CFFD8B1FF -:106F3000607800285FD16946206902F04DFA9DF81B -:106F4000000010F001008DF8000014BF01200020A7 -:106F5000A168002581F86400A06880F85650D0F838 -:106F6000BC100088498800E033E0814218BFFFDF91 -:106F7000A068D0F8BC100D70D0F8D0100A78002AA4 -:106F800018BFFFDF15D10288CA80D0F8D0100D716C -:106F9000DDE90013D0F8D0209160D360D0F8D02084 -:106FA000062111700188D0F8D00001E0E400002033 -:106FB0004180A06880F83B501DE0A068002319467E -:106FC00090F83C20303001F00EFF10B1607818B11D -:106FD00011E0012060700EE0206902F043F9A16821 -:106FE00081F89100052081F83C000020A1F85800AC -:106FF000012081F85A00A068D0E91C12491C42F116 -:107000000002C0E91C120DB0F0BD000030B585B023 -:1070100004466846FBF7FBFC002808BFFFDF00982A -:1070200002F07DF80321009802F093F800980178AF -:1070300021F010010170214602F0EEF8A01E0C288C -:1070400051D2DFE800F006501E5151165042505107 -:10705000312CFD48C06890F8651021B106210098D8 -:1070600002F059F940E090F8CF10009802F053F97F -:107070003AE0F548C06890F89110009802F09BF94A -:1070800032E0F14DE86800F1B801009802F06DF9C6 -:10709000E86800F18C01009802F071F924E0062103 -:1070A000009802F084F91FE0E74DA8680178009885 -:1070B00002F06BF9A8688188009802F068F9A86866 -:1070C0004188009802F067F90EE0002002900390DA -:1070D0009DF8080002A940F001008DF80800009812 -:1070E00002F075F900E0FFDFFBF7A4FC002808BF01 -:1070F000FFDF0C2C04BF05B030BD072C0DD0022CD7 -:1071000004BF05B030BD0021CF48C068A0F85810BA -:10711000012180F85A1005B030BDCB490020C96864 -:10712000A1F8580005B030BD70B50C4605464FF4C7 -:107130009071204603F017FF2580002084F8F000AE -:1071400084F8FC0084F8040184F8120170BDF6F79D -:1071500097BD70B50C4615460721F6F76EFC002862 -:1071600008BF70BD90F8F0200021DAB1002D77D172 -:1071700061700722227090F8F0208AB1018480F8B3 -:10718000F010D0F8F220C4F80220D0F8F620C4F8AD -:107190000620B0F8FA20628190F8F020002AEDD1A4 -:1071A000A1705DE090F8FC2002B3002D58D190F85A -:1071B000FC200B2A0CD00C2A18BFFFDF50D16170C5 -:1071C0000C22227090F8FE20A2700288A2800AE0B1 -:1071D00061700B22227090F8FE20A2700288A280BB -:1071E00090F80221A27180F8FC1039E090F8042197 -:1071F0008AB17DB961700822227002886280D0F85D -:107200000821D0F80C316260A360B0F81021A2818F -:1072100080F8041124E090F812214AB105BB617096 -:1072200011222270B0F81421628080F8121117E048 -:1072300090F81621002A04BF002070BD85B9617046 -:107240001222227090F8162152B100BF80F8161158 -:10725000D0F81821C4F8022090F81621002AF5D1A0 -:10726000012070BD00207047774988607047002179 -:1072700080F83B1080F83C1080F83E1090F8A60093 -:1072800010B10220FEF72CBC0320FEF729BC2DE92B -:10729000F04F6D4C07468DB0E0680D460088F6F75C -:1072A00044FD5FEA000B08BFFFDF60782843607091 -:1072B000A188E06811F0200F4FF000051CBFA0F876 -:1072C0004C5080F8AC5004D1B0F84C20521CA0F8BF -:1072D0004C2011F0600F4FF002084FF0010613D060 -:1072E000E06890F83E1011B1032907D00CE080F857 -:1072F0003E6000210120FEF7F3FB05E080F83E80B0 -:1073000000210120FEF7ECFBE06890F83E10012917 -:1073100005D1A18811F4807F18BF80F83E80002F2E -:1073200040F09B81A18811F4007F18BFA0F8C050E5 -:1073300004D1B0F8C010491CA0F8C01000F09AFBAE -:107340000CA8FBF764FB002800F0E88060780028B8 -:1073500040F0E480E0680123194690F83D20303089 -:1073600001F041FD002849D1D4F80CC09CF8CE00B2 -:1073700038B1ACF850508CF865500220FFF746FE4B -:10738000CCE09CF83C200B2A08BF0B201AD00ADC6A -:10739000012A7BD0052A08BF072013D0092A08BF7D -:1073A00009200FD005E00F2A0FD0102A20D0162A6E -:1073B0007CD0012304210CF1300001F014FD0028E1 -:1073C0001CD187E0FFF722FEA8E0F9F755FF0C2853 -:1073D00014D3E0680821B830F9F74FFF28B1E0680E -:1073E00004218C30F9F749FF00B9FFDF0420E9E7F9 -:1073F0009CF8D100012802D0022849D08EE09CF8E8 -:10740000FC00002841D100220CF1D2094FF01008F5 -:1074100008210DF1FF3000BFA8EB02034B44491EC9 -:1074200013F801AC80F801A013F8023C00F8023F09 -:1074300002F10202F0D10CF1B00800204FF0100C64 -:107440000DF10F01082201E004010020ACEB000364 -:107450004344801C13F8019C81F8019013F8023C0E -:1074600001F8023F521EEED1684602F083FC0DF196 -:107470002008E06898E80E10783080E80E100520AB -:10748000FFF7C4FDE06880F8D15047E015E00DE05B -:107490009CF85C0000281ABF8CF8656002200D2063 -:1074A000FFF7B4FDE06880F8D15037E00620FFF721 -:1074B000ADFDE06880F85A5030E00C20FFF7A6FDE3 -:1074C000E068A0F8585090F85E1041F0010180F893 -:1074D0005E1023E0E06890F83B2090F8E210E9B1FC -:1074E00001230021303001F07EFCB8B1E06890F853 -:1074F000E210042904BF90F85E0010F0030F0DD1D4 -:107500000C20FFF783FDE068A0F8525080F8566029 -:1075100090F85E1041F0010180F85E1000F0A1FFCC -:107520000028E06818BFA0F8A05004D1B0F8A0105F -:10753000491CA0F8A01000F097FF40B1E06890F857 -:10754000AC1002299CBF491C80F8AC1004D8E0683C -:1075500090F8AC00022806D9E068A0F8A050A0F886 -:10756000A25080F8AC50E0680123002190F83C2044 -:10757000303001F038FC20B9E06890F83C00072872 -:1075800056D1E0680123002190F83B20303001F013 -:107590002AFCE8B3E0680123002190F83D20303058 -:1075A00001F021FCA0B3E06890F83E10022904BF6E -:1075B00090F8AC0000283BD15846F5F7E8FE38B308 -:1075C000FBF76CFA20B3E068B0F89A1001292FD9C4 -:1075D00080F8A560B0F84E10B0F84C208B1E9A428F -:1075E000AFBF0121891A491E89B2B0F8A030E288E4 -:1075F00093422FBF0122D21A521C92B2914288BFED -:107600001146012908BF80F8A55090F8C82000E075 -:107610000EE08AB1B0F8A220B0F8CA0082422FBFB3 -:107620000120801A401C80B2814288BF014603E0DD -:10763000E068012180F8A550E068028E114489B20B -:10764000A0F89C1090F83E30002B18BF012B1DD0E5 -:10765000022B1CBF032BFFDF09D0A088C0F3402002 -:107660000028E06818BFA0F8AE5022D11AE090F8C8 -:107670003D30032B0DD090F83C20082A06D0B0F8FE -:107680004E20B0F84C30D21A921E1144A0F8981037 -:10769000E3E7B0F84C30032BF8D3B0F84E101144A8 -:1076A000491CF3E7B0F8AE10B0F89E201144A0F8E2 -:1076B000AE10E06890F8CE1039B990F83D20012363 -:1076C0001946303001F08FFB38B1E068B0F8501047 -:1076D000B0F89E201144A0F850103D212FB1E06871 -:1076E00080F84A1080F8496069E02078022810D0BC -:1076F00001281AD0607800B310F0140F14BF1E21B7 -:1077000010F0080FEBD110F0030F08BFFFDF2A21A4 -:10771000E5E7E06890F86510002914BF06211621FE -:1077200080F84A1080F8496049E0E06890F8D0108D -:1077300080F84A1080F8496041E0E06890F85610FF -:1077400041B1B0F852104A1CA0F85220B0F85420B1 -:10775000914214D290F85A1041B1B0F858104A1C16 -:10776000A0F85820B0F85420914208D2B0F8502028 -:10777000B0F84E108A4208D390F8CE202AB12221C8 -:1077800080F84A1080F8496019E090F83E204AB12C -:10779000B0F84C208A420FD3082180F84A1080F8B4 -:1077A00049600CE0B0F84C10062905D33E2180F862 -:1077B0004A1080F8496002E090F8490088B1E0681A -:1077C00080F83B5080F83C5080F83E5090F8A6007E -:1077D0004FF00001002814BF02200320FEF780F9BB -:1077E00003E000210846FEF77BF9E06880F8A65028 -:1077F0000DB0BDE8F08FFE494A788B781A430DD161 -:1078000050B1087910F0080F04D0C86890F83D0016 -:10781000032803D001207047FEF7E4B8002070472A -:107820002DE9F041F24C05460E46A0882843A08081 -:1078300015F0020F04D015F0010F18BFFFDF26610D -:1078400015F0010F4FF000084FF001071CD0304633 -:10785000666101F007FD062802D00B280BD013E06B -:10786000E06890F83C1012290ED10021C0E91A11ED -:1078700080F83F7008E0E06890F83C100C2904BFE5 -:1078800080F83F8080F85C7015F0020F19D02069F5 -:1078900001F0E8FC052802D00B280BD011E0E068CD -:1078A00090F83C1010290CD10021C0E91C1180F87F -:1078B000407006E0E06890F83C100B2908BF80F8A3 -:1078C000408015F0800F1CBF0820A070BDE8F0813B -:1078D0002DE9F043C64C83B00127216900250191B1 -:1078E000A5806570A5702570E06067F307080646FF -:1078F00080F8A6700088F6F718FA5FEA000908BF5A -:10790000FFDFE0680088FBF77FF8E0680088FBF79E -:10791000A1F8E068B0F89A00D0B101A8FBF777F8B9 -:10792000B0B1E06890F8CE1091B190F83D200123FD -:107930001946303001F057FA50B9E068A0F85050BD -:1079400080F865500220FFF761FBE06880F8A550E1 -:10795000E26892F8F00028B9108C9188884288BFBC -:10796000E08001D89088E080B2F89E00B2F8A010C4 -:10797000401E80B2014489B2A2F8A01092F8A4304F -:10798000002B1CBFA2F8A25082F8A45004D1B2F878 -:10799000A2300344A2F8A230B2F84C300344A2F85B -:1079A0004C30B2F89A30012B9CBF5B1CA2F89A3085 -:1079B000002818BF82F8AC5092F8A50000281CBF20 -:1079C000E08881420FD24846F5F7E1FC58B1E06803 -:1079D00090F8C81039B1B0F8A210B0F8CA008142CE -:1079E00028BF00F044FDE06880F8A55090F83C10F6 -:1079F000062918BF072916D1018EB0F8E420891A8C -:107A000009B200290FDB00F1E601083003F0D1FBD9 -:107A10000221E06800F0C2FFE06880F8E35080F8DF -:107A20003C5080F86670E16801F13000B1F89E20AA -:107A300001F0FFF8E06890F8C810002918BFA0F81E -:107A4000A2506C4800906C4B6C4A3146404600F0A6 -:107A50008AFBE0680123052190F83C20303001F0DA -:107A6000C2F9002818BF00F07AFB03B0BDE8F0832C -:107A700000F0D3BC2DE9F0415D4C4FF002074FF010 -:107A80000005207910F0080F13D0607888B9E068FD -:107A900090F83C10142905D180F85B5080F85A50BA -:107AA00080F83C5090F83D10032904BF277080F8FF -:107AB0003D5000F043F9A1884FF0010611F0040F8A -:107AC00014D0607890B9E06890F83C20062A08BF8E -:107AD00080F8E36003D0082A08BF80F8E37090F8CC -:107AE0003D20022A04BF267080F83D5011F0020F9D -:107AF0004FF0030754D06078002851D12069C07836 -:107B0000801E0C287CD2DFE800F006B636415718FC -:107B1000B622B6298B4CE0680123194690F83D2027 -:107B2000303001F060F900283AD1E06880F83D700B -:107B300080F8565080F85A509EE0E06890F83C007B -:107B4000052818BFFFDFE06880F83C50F2E7E068E6 -:107B500090F83C00092818BFFFDF6FE0E06890F85C -:107B60003C000B2818BFFFDFE0680C2180F85B6049 -:107B700080F83C1080E0E06890F83C000F2818BFC7 -:107B8000FFDFE068102180F85B60F1E7E06890F8C3 -:107B90003C00102818BFFFDF1220E16881F83C008C -:107BA0006AE0E06890F83C00102818BFFFDF14205E -:107BB000E16881F83C005FE0E06890F83C0016283E -:107BC00018BFFFDFE06880F85B5080F85A5090F8EB -:107BD000FC00002818BFFFDFE06890F85C1091B14E -:107BE00080F85C500188A0F8001180F8FE5008E091 -:107BF000040100208F720100F77701002178010055 -:107C000039E00C2107E00188A0F8001180F8FE504F -:107C100080F802610B2180F8FC1080F83C502BE0CA -:107C2000E06890F8E21004290ED0E06801230721F3 -:107C300090F83C20303001F0D6F8E8B1E06880F8E8 -:107C40005A5080F83C5017E090F83B200123002167 -:107C5000303001F0C8F8002808BFFFDFE06890F876 -:107C60005E1011F0020F0EBF80F83B6080F8565096 -:107C700080F8E250D9E7FFDF207910F0100F09D02B -:107C8000607838B9E06890F83C10062904BF0721F5 -:107C900080F83C10A07810F0080F10D0E0680123A5 -:107CA000052190F83C20303001F09DF828B10820E3 -:107CB0006070E06880F8FC5001E000F0DCFBE068F8 -:107CC00090F83C10082918BFBDE8F081018EB0F88B -:107CD000E420491C914206BF61780029BDE8F0818B -:107CE000B0F8EA104288914209D1B0F8EC208388BC -:107CF0009A4204D1B0F8EE20C3889A420ED002888E -:107D0000A0F8F420A0F8F610B0F8EC10A0F8F810E5 -:107D1000B0F8EE10A0F8FA1080F8F060012100F041 -:107D20003DFE00210420FDF7DBFEE06880F8E35013 -:107D300080F83C5080F83E70BDE8F08130B5FF4CD3 -:107D400083B0207910F0010F04BF03B030BD60692B -:107D500001230521C578E06890F83C20303001F01F -:107D600042F8002818BF022D0BD00A2D18BF0B2D8A -:107D700007D0032D18BF062D03D0607840F008000F -:107D80006070607800281CBF03B030BD6069C078A7 -:107D90000D2880F0AB81DFE800F0462207C8FEFE28 -:107DA000FDDBFCFEA3C0FB00E0680123194690F850 -:107DB0003D20303001F017F8002840F0B4816069B0 -:107DC00001F0ABFAE16881F8D000022081F83D00B3 -:107DD000002081F85A0081F8560000F0A4B9E0684C -:107DE0000123002190F83C20303000F0FCFF0028F7 -:107DF00075D06078002840F09681606901F088FABB -:107E0000E168A1F8E4000A8E801A00B247F6FE721B -:107E10008242A8BF00285ADDE631606901F06FFA9E -:107E20000620E1683FE0E0680123002190F83C2053 -:107E3000303000F0D8FF00285FD06078002840F094 -:107E40007281606901F037FA88B3606901F030FA35 -:107E5000E168A1F8E4000A8E801A00B247F6FE72CB -:107E60008242A8BF002832DD606901F01BFAE16898 -:107E700081F8E600606901F010FAE168A1F8E80015 -:107E8000606901F0F5F9E168A1F8EA00606901F0C4 -:107E9000F6F9E168A1F8EC00606901F0F7F9E16832 -:107EA000A1F8EE00082081F83C0000F03CB9FFE7A3 -:107EB000E0680123002190F83C20303000F093FF6F -:107EC00068B16078002800F01F8100F02CB92820EC -:107ED00081F84A00012081F8490000F024B90CE043 -:107EE000E0680123002190F83C20303000F07BFF57 -:107EF00018B1607828B100F016B90120607000F068 -:107F000012B9E0680021A0F85810012180F85A1039 -:107F10000B2180F83C1000F006B9E06890F83C10A6 -:107F20000C2908BF0D214CD143E0E068012300215A -:107F300090F83C20303000F056FF20B9E06890F80F -:107F40005C0000287ED06078002801D101E06070DC -:107F5000E9E0E06800210125A0F8581080F85A50A7 -:107F600000F1B001606901F0F1F9E06800F1880109 -:107F7000606901F0F6F9E06890F80401002818BF84 -:107F8000FFDFE0680188A0F8061100F5847103E0C6 -:107F90001EE087E010E0A9E0606901F0C5F9E06843 -:107FA00000F58871606901F0C7F9E06880F8045154 -:107FB0000F2180F83C10B6E0E06890F83C101229E0 -:107FC00001D00220C3E7002180F85A101621F0E703 -:107FD000E0680123002190F83C20303000F003FFDE -:107FE00048B9E0680123072190F83B20303000F0C9 -:107FF000FAFE002826D06078002852D1E06890F878 -:108000005E0010F0020F17D1606901F0C8F9E16855 -:1080100081F85F00606901F0C4F9E168A1F86000CF -:10802000606901F0C1F9E168A1F8620091F85E00B1 -:1080300040F0020081F85E00E06890F85E1011F0F8 -:10804000010F00E05EE015D190F83C2001230021F3 -:10805000303000F0C8FE002808BFFFDF0121E068D3 -:10806000042280F83C1080F8E32080F85A100021A8 -:10807000A0F85810E06890F83B10012904D10021C5 -:1080800080F83B1080F8561090F8E21004294AD18D -:10809000002180F8E21090F83B20002A08BF80F809 -:1080A000561040E0E0680123002190F83C20303079 -:1080B00000F099FE30B3607818BB6946606901F042 -:1080C00081F99DF8000010F001008DF8000014BF48 -:1080D00001200020E16881F86400E0680021A0F838 -:1080E0005810012180F85A10092162E7E068012345 -:1080F000002190F83C20303000F075FE10B160781F -:1081000010B110E0012022E7606901F0ABF8E168EE -:1081100081F89100052081F83C000020A1F858006A -:10812000012081F85A00E068D0E91C21521C41F17D -:108130000001C0E91C2103B030BD00000401002093 -:10814000F9480078002818BF0C20704730B5F64C6D -:1081500005462078002818BFFFDF657230BDF24960 -:108160000120087270472DE9F047EF4C8146DDF899 -:10817000208020781E4617460D4628B9002F1CBFC8 -:10818000002EB8F1000F00D1FFDFC4F81C80C4E955 -:108190000C95C4E9057600202072E0712071E07032 -:1081A0006071A071E14EA070608130784FF00108DD -:1081B00005F130072888F5F7B8FDA0622888F5F7A3 -:1081C000A2FDE062FAF7BCF80120F9F7CAFDFAF760 -:1081D0000CF905F11100FAF79CF805F10D00F9F71B -:1081E000C7FE307800280CBF03200120FAF7A5F85D -:1081F000387EF9F7C5FE0120F9F7A2FDFAF797F8E6 -:10820000397CCB48002914BFCA49CB49016030787A -:108210004FF0010170B10120F9F726FF7068D0F826 -:10822000A800FAF79BF800BF84F80080BDE8F0478B -:10823000FAF78EB80020F9F717FFF5E72DE9F047B8 -:10824000DFF8E89282B0484600264068012700F136 -:1082500030041B20ADF8000060794FF00208A9F14E -:10826000300570B301285AD002285CD0032818BF0B -:10827000FFDF62D0286A0823017821F0080101702D -:10828000A27903EAC202114321F004010170E279EC -:10829000042303EA8202114321F01001017094F8D3 -:1082A00005A0A86AF5F781F80646FAF7F7FBBAF1D8 -:1082B000020F49D0BAF1010F49D0BAF1030F49D0EA -:1082C0004BE0FFE79D48FAF7C8FB40B1296AAF7061 -:1082D0006A694FF48060904703206071CAE701AA81 -:1082E0006946A86AF4F752FF286210B194F82B107F -:1082F00021B19248FAF785FB6771BBE79DF804103E -:1083000021B906808670012100F023FFBDF800002E -:10831000C1B2286A01F065F884F80580AAE78748A9 -:10832000FAF76FFBA6E701AA6946A86AF4F72EFFE1 -:108330002862002808BFFFDF9CE78048FAF78DFB22 -:10834000002808BFFFDF95E7B04306D103E0B04344 -:1083500003D100E00EB1012100E00021286A02787B -:1083600042EA01110170E17B00291CBF61790129FA -:1083700026D004F14801724891E80E1000F1480639 -:1083800086E80E10A16DC0F86110E16DC0F86510AF -:108390002230F9F7E0FF99F8000000280CBF012116 -:1083A000002168480176D4E90E12C0E90412A0F158 -:1083B00026012A6AF9F711FC0020F9F71FFC03E0F7 -:1083C000F9F7C9FFF9F741FC99F8000028B1286ACC -:1083D000007810F0100F05D00CE001210846FAF7E4 -:1083E0007CF80AE05848007810F0100F04BF287994 -:1083F000002802D0A8780028EFD06879002804BFB0 -:108400006F71F9F7D0FF286A0188A9818078A87375 -:1084100085F8008002B0BDE8F087434810B50078C9 -:10842000012818BFFFDFF9F78BFF40480178446847 -:1084300011B9FFF703FF01E000F0BCF994F8280040 -:10844000012818BF10BDBDE81040FAF723B8364820 -:1084500010B50078032818BFFFDFBDE8104000F01A -:10846000F4B93148407970472F48007970472E4958 -:108470000120887170472DE9F0412C482A4D0126D2 -:1084800001784068002700F13004686A417801F003 -:108490001F08E96A02F09AF868B1012821D0022881 -:1084A00034D003281CBFFFDFBDE8F081E86ABDE8D7 -:1084B000F041F5F7E4B801224146E86AF4F7FAFF23 -:1084C000D4E91010491C40F10000C4E91010E07913 -:1084D000012814BFE671E771687ABDE8F041F1F751 -:1084E0006FB800224146E86AF4F7E4FFD4E91001CE -:1084F000401C41F10001C4E91001E079012802D1DA -:10850000E771BDE8F081E671BDE8F081E86AF5F752 -:10851000B6F8D4E91010491C40F10000C4E910106D -:10852000E0790128EFD1EBE71C0100204C0100208D -:10853000181500401F0003021B0003023C0100202D -:10854000F8100020401100202B0100202DE9F041FF -:10855000F04F4FF000083846A7F13004406801267C -:1085600000F130052078022818BFFFDFA87850B14D -:1085700085F80280A67062694146042090473878E9 -:10858000002818BF2E71206A0321007831EA00000C -:1085900004BFE878002805D1EE70216AA6706269F0 -:1085A000022090470121002000F072F918B1BDE8C7 -:1085B000F04100F04AB9BDE8F04100F0FBB82DE908 -:1085C000F05FD44E82463046A6F1300540684FF049 -:1085D000000800F1300928780127032818BFFFDFC1 -:1085E0006889BAF1000F40F40070688104BF40F060 -:1085F0004000688100F0CE80F9F73DFB98B999F80A -:10860000100080B1686A417811F01F0F0BD000781C -:1086100099F80710C0F3C000884204D1EF70BDE89C -:10862000F05F00F012B9686A0188A5F80F10807831 -:108630006874688940F02000688185F8048070685B -:1086400000F1300B044690F82800012813D1F9F707 -:1086500017FF5946204600F09BFB60B13078002898 -:1086600070680CBFC83000F58B70218841809BF882 -:10867000081001710770686A99F806100078C0F355 -:108680008000884233D0706800F1300490F83500E3 -:1086900048B3022844D000BF84F80580307838B150 -:1086A0002079414620B12171AF706A69102090474E -:1086B000E07890B184F80380FAF7DEF9002808BF6B -:1086C000FFDF0820AF706A6900219047D4E90E10DF -:1086D000491C40F10000C4E90E10A07901280CBF2C -:1086E00084F80680A771688940F480706881686AA0 -:1086F00099F807300178C1F3C0029A424AD17268F2 -:1087000001F0030102F13004012918BF02292ED023 -:1087100003291CBFE87940F0040012D0E87139E069 -:10872000A86AF4F76DFD002808BFFFDFD4E90E103A -:10873000491C40F10000C4E90E10687AF0F740FFD0 -:10874000AAE700F02AFD70B1A770696AAF706A6984 -:1087500038469047E079012803D100BF84F80780AC -:1087600018E0E77116E0E87940F01000D6E74078AD -:1087700010F01F0F17D0697861B900F01F001B2897 -:10878000F1D8287A20B180206A690021904701E061 -:10879000FFF771FE5146012000F07AF838B1BDE8CC -:1087A000F05F00F052B8E0790128DAD1D6E7BDE8F1 -:1087B000F05F43E570B5584C1B21E06AF4F723FEE7 -:1087C000002101226062002811BF6170627053486D -:1087D0006062504E3078706800F1300590F84000CB -:1087E00038B305F148014D4891E80E1000F1480EEC -:1087F0008EE80E10A96DC0F86110E96DC0F8651023 -:108800002230F9F7A8FD307800280CBF01200020A5 -:1088100080F0010142480176D5E91012C0E9041246 -:10882000A0F12602616AF9F7D8F90120F9F7E6F913 -:1088300004E0606AF9F78FFDF9F707FA01210020DB -:10884000F9F74BFE0320207070BD70B5314900254B -:108850004C68F9F7E7FDF9F7D9FDF9F7FBFCF9F7F3 -:108860005EFDF9F7F2F9F9F7CDFDF9F771FD94F82E -:108870002800012808BFF9F703FE274C0021626990 -:1088800060899047E269E179E0789047257070BD92 -:1088900070B5214C0546002908BF012D05D120796E -:1088A000401CC0B22071012831D8A16928468847F0 -:1088B00000282CD0A1791B4841B1012D01BF41787E -:1088C00011F01F0F017811F0100F20D0E179F1B9EC -:1088D00010490978002918BF002102D0294304D08B -:1088E00013E0012D18BF0121F8D10F49097811F0CB -:1088F000100F04BF007810F0100F08D0A07830B926 -:10890000607810B111F0100F01D0002070BD01206F -:1089100070BD00004C0100201C010020F810002058 -:10892000401100202B0100202801002010B50A7BF7 -:1089300002F01F020A73002282758B181B7A03F063 -:10894000010C5B0803F00104A4445B0803F001047C -:10895000A4445B0803F00104A4445B0803F0010491 -:1089600064444FEA530C0CF0010323444FEA5C0CBF -:108970000CF00104234403EB5C0300EB020C521CDB -:108980008CF8113090F816C0D2B263448375052A72 -:10899000D3D3D8B2252888BFFFDF10BD0A4610B454 -:1089A0000021032A0DD04FF4FA4C002A60D0012A8E -:1089B0007ED0022A1CBF10BC7047014610BC30306C -:1089C000B4E7018680F8361080F8371080F83B1045 -:1089D00080F83C1080F83D1080F83E1080F832108E -:1089E00080F8331080F8341080F8351080F8491082 -:1089F000A0F84C10A0F8521080F85610A0F85810AB -:108A000080F85A1080F8471080F8481080F83F101E -:108A100080F8401080F85B1080F85C1080F85E10E1 -:108A2000012280F86420A0F8501080F86610A0F8A9 -:108A30009810A0F89A10A0F89C10A0F89E10A0F82A -:108A4000A010A0F8A21080F8A510A0F8AE1080F831 -:108A5000AC10A0F8C010A0F8C21080F82810018453 -:108A600080F8C81080F8CE1080F8D11010BC704784 -:108A7000A0F8AE1080F8A6104288C488A0F84C1068 -:108A8000B0F8501000F13003514391FBF2F1A0F81F -:108A90005010E100B1FBF2F1491C89B201FB02F474 -:108AA000A0F84E10B4F5C84FC4BF491ED98300E0EA -:108AB00004E0BCFBF2F1491C99847EE7A0F8AE10FB -:108AC00000F130024488B0F8EA30B0F8EE0091834B -:108AD000118CC0006143B0FBF3F091FBF3F1401C3B -:108AE000118480B200FB03F1D083B1F5C84FC4BF3D -:108AF000401ED083BCFBF3F0401C908410BC704738 -:108B00000A4610B40021032A0DD04FF4FA4C002A73 -:108B10004FD0012A6DD0022A1CBF10BC70470146FD -:108B200010BC303002E7018680F8361080F837102C -:108B300080F83B1080F83C1080F83D1080F83E1023 -:108B400080F8321080F8331080F8341080F8351037 -:108B500080F84910A0F84C10A0F8521080F8561078 -:108B6000A0F8581080F85A1080F8471080F8481084 -:108B700080F83F1080F8401080F85B1080F85C109F -:108B800080F85E10012280F86420A0F8501080F870 -:108B90006610A0F8A01080F8A21080F89810C0F815 -:108BA0009C1080F8281080F8B41080F8C41010BC15 -:108BB00070474288C488A0F84C10B0F8501000F1FB -:108BC0003003514391FBF2F1A0F85010E100B1FBEA -:108BD000F2F1491C89B201FB02F4A0F84E10B4F581 -:108BE000C84FC4BF491ED983BCFBF2F1491C99840C -:108BF00095E7D0F8BC4000F1300243886089E489F1 -:108C00009183118C594391FBF0F11184E100B1FB88 -:108C1000F0F1491C89B201FB00F3D183B3F5C84FD1 -:108C2000C4BF491ED183BCFBF0F0401C908410BC33 -:108C30007047837D0BB1252B01D912207047002A84 -:108C400004BF0020704770B490F817C00C7E894DA7 -:108C500004FB02C22C464FF0000CE2FB054C4FEA2D -:108C60001C1C6FF024040CFB0422D2B201EBD20CCA -:108C7000C27502F007059CF808C0012404FA05F546 -:108C80001CEA050F18BF02762CD1B2FBF3FC03FBE4 -:108C90001C22521CD2B24FF0000C00BF00EB0C03A0 -:108CA0005B7C93423CBFD21AD2B20ED301EB0C05CF -:108CB00000232D7A04FA03F635421CBF521ED2B2AD -:108CC0006AB15B1CDBB2082BF4D30CF1010303F097 -:108CD000FF0CBCF1050FE1D370BC1F20704703EB04 -:108CE000CC01017670BC0020704730B50D460446BB -:108CF000072988BFFFDFE07805F0070100F050008A -:108D0000084340F08800E070A07800F0A70040F031 -:108D10001800A070607800F05E0040F020006070E5 -:108D2000207800F0BC0040F04000207030BD017998 -:108D300031F01F0113BF002000221146704710B40C -:108D4000435C491C03F0010C5B0803F00104A444DC -:108D50005B0803F00104A4445B0803F00104A4448D -:108D60005B0803F00104A4445B0803F001045B0802 -:108D7000A44403F00104A4440CEB53031A44D2B2FC -:108D80000529DDDB012A8CBF0120002010BC7047C3 -:108D900038B505460C466846F9F787FB002808BF3A -:108DA00038BD9DF90020227294F909100020511A53 -:108DB00048BF494295F829308B42C8BF38BDFF2BC8 -:108DC00008BF38BDA17A491CC9B2A17295F82A30F2 -:108DD000994203D8617A7F2918BF38BD627200209A -:108DE000A072012038BD10B4A2F10B0C08293AD2B0 -:108DF000DFE801F004060B10131D333782B332E0B5 -:108E0000022A18BF032A31D02DE0072A18BF062AEC -:108E10002CD028E0082A29D025E01BB1BCF10B0F8B -:108E200024D920E0A2F10A000B281FD91BE01BB1B6 -:108E3000BCF10B0F1AD916E00D2A18BF0C2A15D059 -:108E400090F82C0020B10D2A0DD3152A0ED90AE076 -:108E5000112A08D3152A09D905E0092A06D002E00B -:108E600004E0012A02D010BC0020704710BC012091 -:108E70007047000053E4B36E282102F052B830B5B9 -:108E80000546007801F00F0220F00F001043287013 -:108E900007290BD2DFE801F00406040604080400E9 -:108EA000062405E00C2403E0222401E00024FFDF77 -:108EB000687820F03F002043687030BD007800F0F3 -:108EC0000F0070470A68C0F803208988A0F80710CF -:108ED0007047D0F803200A60B0F807008880704718 -:108EE0000A68C0F809208988A0F80D107047027838 -:108EF000402322F0400203EA8111114301707047C0 -:108F00000078C0F3801070470278802322F080023E -:108F100003EAC111114301707047D0F80320C1F872 -:108F20000920B0F80720A1F80D200A7822F080026D -:108F30000A700078800942EAC0100870704770B566 -:108F400015460E4604461F2A88BFFFDF2A463146D3 -:108F500004F1090001F06EFF6078A91D20F03F00C8 -:108F600001F03F010843607070BD70B50546407860 -:108F70000E4600F03F04062C38BFFFDFA01FC4B22E -:108F80001F2C88BF1F24224605F10901304601F03D -:108F900051FF204670BD70B515460E4604461F2A87 -:108FA00088BFFFDF2A46314604F1090001F042FF85 -:108FB0006078A91D20F03F0001F03F010843607078 -:108FC00070BD70B5054640780E4600F03F04062C93 -:108FD00038BFFFDFA01FC4B21F2C88BFFFDF2246AF -:108FE00005F10901304601F025FF204670BD0968F2 -:108FF000C0F80F1070470A88A0F8132089784175CF -:1090000070474176090A81767047C176090A01776F -:1090100070474177090A81777047C175090A01765F -:1090200070478175704790F8242001F01F0122F0ED -:109030001F02114380F82410704790F82420E02389 -:1090400022F0E00203EA4111114380F82410704736 -:109050001F3002F0AEB84178007801F03F0110F007 -:109060000F0006D0012808D0022809D006280BD00E -:109070000FE0881F1F280AD90BE00C2909D106E050 -:10908000881F1F2803D904E0881F1F2801D801204A -:109090007047002070474178007801F03F0100F0F0 -:1090A0000F00042805D1062903D325299CBF0120E0 -:1090B00070470020704710B4017801F00F010329B8 -:1090C00022D0052925D14478B0F81910B0F81BC07A -:1090D000B0F81730827D04F03F04222C19D1062904 -:1090E00017D3B1F5486F98BFBCF5FA7F11D282B1A2 -:1090F000082A98BF8A420CD28B429CBFB0F81D0050 -:10910000B0F5486F05D807E0407800F03F000C2824 -:1091100002D010BC0020704710BC012070472221F3 -:1091200001F0FFBE00B5027801F0030322F0030254 -:109130001A4302704278012922F01F02427014BFC4 -:10914000022900BD032912BFFFDF42F00101417077 -:1091500000BD01F0030300B5027822F003021A43B8 -:1091600002704278012922F01F02427014BF0229C6 -:1091700000BD032912BFFFDF42F00101417000BDB5 -:10918000007800F0030070470278102322F01002EC -:1091900003EA01111143017070474178C07801F072 -:1091A0001F010E2832D2DFE800F0070A0D10131657 -:1091B000191C1F2225282B2E0C2929D02AE008292A -:1091C00026D027E0022923D024E0172920D021E04F -:1091D0000D291DD01EE001291AD01BE0012917D04E -:1091E00018E0022914D015E0092911D012E009294C -:1091F0000ED00FE001290BD00CE0012908D009E0C6 -:10920000062905D006E0022902D003E01B2901D877 -:10921000012070470020704730B50546C1700E2907 -:1092200018D2DFE801F007090B0D0F11110B131312 -:109230001111150B0C240FE008240DE002240BE0A3 -:10924000172409E00D2407E0012405E0092403E0C8 -:10925000062401E00024FFDF687820F01F0020438F -:10926000687030BDC0787047C171090A01727047DB -:10927000B0F8070070474172090A81727047B0F870 -:1092800009007047C172090A01737047B0F80B00FA -:1092900070474171090A81717047B0F80500704745 -:1092A00001717047007970474173090A81737047F3 -:1092B000B0F80D00704730B4B0F80720504DB0F84A -:1092C00009C0B0F805300179941F2D1998BFBCF57D -:1092D000FA7F0ED269B1082998BF914209D2934210 -:1092E0009FBFB0F80B00B0F5486F012030BC98BFAD -:1092F0007047002030BC7047001D01F05ABF021DAE -:109300000846114601F055BF4172090A8172704743 -:10931000B0F80900704701717047007970470A681A -:10932000426049688160704742680A6080684860AE -:1093300070470988818170478089088070470A6872 -:10934000C0F80E204968C0F812107047D0F80E20FF -:109350000A60D0F81200486070470968C0F816101B -:109360007047D0F81600086070470A684260496884 -:109370008160704742680A60806848607047096889 -:10938000C1607047C06808607047017170474171E3 -:10939000090A81717047C171090A01727047007929 -:1093A0007047B0F805007047B0F8070070470171CA -:1093B000704700797047017170470A6842604968D8 -:1093C0008160704742680A608068486070470A6838 -:1093D000426049688160704742680A6080684860FE -:1093E000704730B50C4605461B2988BFFFDF6878FB -:1093F00004F01F0120F01F000843687030BD00001A -:1094000086F3FFFF70B50446C2F11005281901F07C -:1094100011FD15F0FF0108D0491EC9B2802060542B -:109420002046BDE8704001F07CBD70BD30B505E060 -:109430005B1EDBB2CC5CD55C6C40C454002BF7D116 -:1094400030BD10B5002409E00B78521E44EA4303F6 -:1094500000F8013B11F8013BD2B2DC09002AF3D13C -:1094600010BD30B50C46097889B01546012049B1C8 -:10947000012905D12978042902D105201070002086 -:1094800009B030BD60680590CDF818D00D210DF100 -:10949000030001F046FDA0680188ADF80010807857 -:1094A0008DF802000120207006208DF81000606AFF -:1094B0000890294604A8F5F745FEE1E72DE9F041BB -:1094C0000C46097892B0154601204FF0020CFE4F71 -:1094D00006264FF0040869B101291ED0022946D0A2 -:1094E000032904D12978042901D11670002012B073 -:1094F000BDE8F081606850B1CDE90107012020701E -:109500008DF80060606A04901146684665E084F852 -:1095100000C085F80080576027E029780429E6D14B -:10952000696810222069FFF78CFF6868C07B00061D -:1095300006D5E54A2069102310320146FFF776FF71 -:10954000D4E904101022FFF77CFF2069C07B0006DD -:1095500006D5DD4A6069102310320146FFF766FF29 -:1095600084F800C085F800806F600320BFE7297889 -:109570000429BCD1A08910280CD9A0F1100080B218 -:10958000A081A1684FF01003014468466A68FFF7A4 -:109590004DFF18E004D14FF010032269A16807E0E5 -:1095A000C2B20DA8A168FFF72DFF626910230DA9B3 -:1095B00009A8FFF73BFF102309A968466A68FFF76F -:1095C00035FF0320207060680590CDF818D08DF825 -:1095D0001060606A0890294604A8F5F7B3FD86E795 -:1095E0002DE9F04107460D4601200B7807213BB1DC -:1095F000012B04D11378062B01D11170002077E7DD -:109600006C69012620226170E8686060686A6062A7 -:10961000A168287C0870A681A068A968401C01F098 -:1096200009FCA08920222030A081A068696821302F -:1096300001F000FCA08921462030A0812E70384620 -:10964000BDE8F041F5F795BD2DE9F05F0D46834685 -:1096500001200978174606464FF00708D1B1DFF818 -:1096600068A24FF00009AAF1080A012923D00229B3 -:109670007ED003290CD13978062909D179681022C6 -:10968000E86901F0D7FB08203870183500207D60AC -:10969000BDE8F09F2C6A8C48202284F8018020309D -:1096A00060602020A081686A60626968A06801F03B -:1096B000C1FB2E70D4E039780629E9D12C6A84F8F0 -:1096C0000180686A606251681022E86901F0B2FBAB -:1096D000E8696060A0684F4680F80090A681A068A5 -:1096E0004670A089401C80B2A081A16808446969C5 -:1096F00051F8012F026089888180A089801D80B285 -:10970000A0816969A268097801F001011154A0895A -:10971000401C80B2A081A1680844296951F8012F3A -:10972000026089888180A089801D80B2A08129691A -:10973000A268097801F001011154A0891022401C8F -:1097400080B2A081A1680844E96801F073FBA08998 -:109750001022103080B2A081A1680844A96801F0ED -:1097600069FBA089103080B2A081A168014400E0AB -:109770000DE0DAF804000860A089001D80B2A08125 -:10978000A1680F54A089401CA081022067E03978AD -:10979000062992D151681022A86901F04BFB2C6A6E -:1097A00084F80180E8696060686A6062A16881F895 -:1097B0000090A681A0684670A089401C80B2A0815C -:1097C000A1680844696951F8012F02608988818085 -:1097D000A089801D80B2A0816969A268097801F022 -:1097E00001011154A089401C80B2A081A1680844E5 -:1097F000296951F8012F026089888180A089801D24 -:1098000080B2A0812969A268097801F00101115490 -:10981000A0891022401C80B2A081A1680844E96898 -:1098200001F008FBA0891022103080B2A081A1684D -:109830000844A96801F0FEFAA089103080B2A08126 -:10984000A1680144DAF804000860A089001D80B214 -:10985000A081A1680E54A089401CA081032028701B -:1098600021465846BDE8F05FF5F783BC70B50D465C -:1098700006460978012041B1012905D11178062950 -:1098800002D109201070002070BD2C6A0720607082 -:1098900068686060686A6062E969A06851F8012FD1 -:1098A0000260898881800620A081E869A16800782B -:1098B00000F001008871A089401C80B2A081A168DD -:1098C0000844A96902E000006AB5010051F8012FBF -:1098D000026089888180A089801D80B2A081A969E9 -:1098E000A268097801F001011154A089401C80B2DE -:1098F000A081A168084469690A880280897881701A -:10990000A0891022C01C80B2A081A16808442969E6 -:1099100001F090FAA0891022103080B2A081A168D5 -:109920000844E96801F086FAA0891022103080B25C -:10993000A081A1680844A96801F07CFAA0892146A9 -:109940001030A081012028703046BDE87040F5F746 -:1099500010BC70B50D4606460978012059B10129A1 -:1099600008D11178062905D10A20107050680068C6 -:109970005060002070BD6C69072010226070E8689C -:109980006060686A60622969A06801F053FA10207B -:10999000A081A06820221030A96801F04BFAA089AC -:1099A0002022203080B2A081A1680844696801F0BB -:1099B00041FAA08921462030A0810120287030463C -:1099C000BDE87040F5F7D5BB70B50C4601200978AD -:1099D0008EB01546062659B1012934D0022905D189 -:1099E0002978042902D10B20107000200EB070BD20 -:1099F000606910236A46007800F001008DF80000CD -:109A0000A069007800F001008DF80100E0680168AD -:109A1000CDF802108188ADF8061080798DF8080025 -:109A200020690168CDF809108188ADF80D108079A2 -:109A30008DF80F006068059009A80690A168FFF7EF -:109A4000F5FC01201DE029780429CFD1A06910235D -:109A50006A4650F8011F00918088ADF804006069E3 -:109A600050F8011FCDF806108088ADF80A000020DC -:109A700003906068059009A806906968FFF7D6FC16 -:109A8000022020708DF81060606A0890294604A8B2 -:109A9000F5F758FBAAE700B50B7889B001204BB168 -:109AA000012B05D11178042902D10C20107000205F -:109AB00009B000BD4868019005A80290C868036815 -:109AC000059340680690886803680793406808908B -:109AD0000120087006208DF80000486A04901146A5 -:109AE0006846F5F72FFBE3E700B50B7889B0012056 -:109AF00043B1012BDCD111780429D9D10D2010708C -:109B00000020D5E74868019005A80290886803689E -:109B10000593406806900020079008900120087087 -:109B200006208DF80000486A049011466846F5F753 -:109B300009FBBDE700B50B7889B0012043B1012BCB -:109B4000B6D111780429B3D10E2010700020AFE7F0 -:109B500048680590CDF818D088680088ADF80000F6 -:109B6000C8680088ADF802000020019002900390C0 -:109B70000120087006208DF81000486A08901146F0 -:109B800004A8F5F7DFFA93E730B403460C78012018 -:109B90005CB1012C15D0022C05D111780D2902D110 -:109BA0000F201070002030BC704701200870C8687A -:109BB000052242704A6842600B4A8260921EC2606F -:109BC0000BE014780E2CEED102200870C868042433 -:109BD0004470526842608A688260496A4162014604 -:109BE00030BC1846F5F7C5BA64B501002DE9F0415F -:109BF0000C4611490D68104A104908321160A0F155 -:109C00002001342901D301200CE0482810D040CC99 -:109C10000B4F94E80E0007EB8000241F50F8807C67 -:109C20003046B84720600448001D0560BDE8F0815B -:109C30002046E7F7C5FAF5E71005024001000001EC -:109C40009CB5010010B54C4800F042FA00B1FFDFAE -:109C50004948401C00F03CFA002800D0FFDF10BD4E -:109C60002DE9F05F454D8246D5F800900126424827 -:109C700000F036FA404C18B90026601C00F046FA95 -:109C80003F494FF0000E4FF0010B00BFC1F804B088 -:109C9000C1F800E1C1F804E1C5F800A0C1F800B0C6 -:109CA000384A4FF480434FF0E0274FF0030C1AE09E -:109CB0001068C00617D5C7F88032EFF3108010F097 -:109CC000010072B600D00120C1F804C3D1F80081B0 -:109CD000B8F1000F05D1D1F80481B8F1000F00D11F -:109CE00020BF00B962B6D1F8000118B9D1F804015B -:109CF0000028DDD0D1F804010028C7D12EB1C5F865 -:109D00000090601C00F0ECF907E0601C00F0E8F93E -:109D10000028B2D1184800F0F9F90020BDE8F09F02 -:109D20002DE9F0438DB00D46064600240DF11009D3 -:109D30000DF1200818E000BF04EB4407102255F88D -:109D40002710684601F076F805EB87071022484691 -:109D5000796801F06FF86846FFF782FF10224146EC -:109D6000B86801F067F8641CB442E5DB0DB0002070 -:109D7000BDE8F08374E700005401002004E50040D2 -:109D800000E0004010ED00E0C74800210170817044 -:109D9000704770B5C54D01232B60C54B1C68002C66 -:109DA000FCD0002407E00E6806601E68002EFCD080 -:109DB000001D091D641C9442F5D30020286018681A -:109DC0000028FCD070BD70B5B74E0446B94D307850 -:109DD000022800D0FFDFAC4200D3FFDF7169B64834 -:109DE000012903D847F23052944201DD0322427127 -:109DF000491C7161291BC160AF497078BDE8704092 -:109E0000F6F722B970B5A84C0D466178884200D0AB -:109E1000FFDFA84E092D4FD2DFE805F04E052231B5 -:109E20004E4E4E4E3C002078022800D0FFDF03202B -:109E30002070A078022802D0012804D008E0A06891 -:109E400000F0F4FB04E004F1080007C8FFF7A1FFED -:109E5000052020700020A070BDE87040F5F7D5BB4C -:109E6000F5F7A2FC01466068F6F7E6FEB04202D2C2 -:109E7000616902290BD30320F7F746F912E0F5F7E1 -:109E800093FC01466068F6F7D7FEB042F3D2BDE816 -:109E9000704098E7207802280AD0052806D0FFDF16 -:109EA00004202070BDE8704000F0F4B8022000E00B -:109EB0000320F7F729F9F3E7FFDF70BD70B505461A -:109EC000F5F772FC784C60602078012800D0FFDF45 -:109ED00079490220087000220A718D6004224A71BB -:109EE000744ACA6020706078BDE87040F6F7ACB87C -:109EF00010B56D4CA07808B9207808B1112010BDBC -:109F00006E48F5F7ECFB6070607820B1012020709E -:109F10000020606110BD032010BD0246010B01202E -:109F2000B2F5003F02D2884000F014BFB2F5802F96 -:109F300003D22039884000F015BFB2F5C02F03D2FC -:109F40004039884000F017BFB2F5002F03D26039C6 -:109F5000884000F019BF002070472DE9F0411446F9 -:109F600000EB84070E4605463F1F00F072FB4FF0E2 -:109F700080510A69504306EB8402121FB24201D29B -:109F8000012200E000221CB10969B4EB910F02D953 -:109F90000920BDE8F0814A498D4216D3AF4214D35F -:109FA000854205D2874203D245EA0600800701D0E8 -:109FB0001020EEE78E4208D33AB92846FFF7ADFFEE -:109FC00018B93846FFF7A9FF08B10F20E1E73D486F -:109FD0003D490068884205D0224631462846FFF7B1 -:109FE000D8FE10E0FFF784FF0028D2D12E480121CF -:109FF0008560C0E9036481704FF4A97104FB01F02E -:10A000001830FFF75BFF0020C3E770B54FF08055B5 -:10A01000044628692A49B1FBF0F084420AD300F0D3 -:10A0200018FBA04201D8102070BD28696043FFF7DB -:10A0300074FF08B10F2070BD224823490068884290 -:10A0400004D02869604300F0F1FA0CE0FFF750FFFC -:10A050000028F0D129691448614381600221817090 -:10A060001A48FFF72BFF002070BD1548010B012097 -:10A070008840401E704770B50D460446FFF7F5FF57 -:10A08000204201D00F2070BD29462046BDE8704017 -:10A0900000F083BE10B5044C6078F5F76FFB00202C -:10A0A0002070A07010BD00005801002004E50140A0 -:10A0B00000E40140105C0C0068110020059E0100C6 -:10A0C00000C0010098000020BEBAFECA7C5E0100FC -:10A0D0000021017008467047014600200870704753 -:10A0E000EFF3108101F0010172B60278012A01D06C -:10A0F000012200E000220123037001B962B60AB117 -:10A10000002070474FF400507047E9E7EFF31081EB -:10A1100011F0010F72B64FF00002027000D162B66A -:10A1200000207047F2E700004C49096801600020F8 -:10A1300070474A4908600020704701218A0720B112 -:10A14000012804D042F204007047916700E0D16713 -:10A150000020704742490120086042F20600704723 -:10A1600008B504233E4A1907103230B1C1F8043350 -:10A17000106840F0010010600BE0106820F0010052 -:10A180001060C1F808330020C1F8080135480068A4 -:10A190000090002008BD3249103140B101280AD09A -:10A1A00002280FD0032812D042F205007047086839 -:10A1B00020F01E0003E0086820F01E00801C0860EC -:10A1C00000207047086820F01E00001DF7E70868AF -:10A1D00020F01E00801DF2E7214924310A68024365 -:10A1E0000A60002070471E4924310A6882430A60D1 -:10A1F000002070471A492431096801600020704727 -:10A2000017491C310A6802430A600020704714494C -:10A210001C310A6882430A600020704710491C31D3 -:10A22000096801600020704702000F494FF00000EC -:10A2300003D0012A01D0072070470A6070474FF011 -:10A2400080410020C1F808014FF0E020802180F813 -:10A2500000140121C0F80011704700000004004004 -:10A260000005004008010040780500406249634B4A -:10A270000A6863499A42096801D1C1F3100101607B -:10A28000002070475C495D4B0A685D49091D9A4290 -:10A2900001D1C0F310000860002070475649574BA9 -:10A2A0000A68574908319A4201D1C0F3100008608A -:10A2B0000020704730B5504B504D1C6842F20803E7 -:10A2C000AC4202D0142802D203E0112801D3184670 -:10A2D00030BDC3004B481844C0F81015C0F8142511 -:10A2E000002030BD4449454B0A6842F209019A42B8 -:10A2F00002D0062802D203E0042801D308467047A2 -:10A30000404A012142F83010002070473A493B4B47 -:10A310000A6842F209019A4202D0062802D203E0FA -:10A32000042801D308467047364A012102EBC000D9 -:10A3300041600020704770B52F4A304E314C15688F -:10A3400042F2090304EB8002B54204D0062804D28D -:10A35000C2F8001807E0042801D3184670BDC1F305 -:10A360001000C2F80008002070BD70B5224A234ECC -:10A37000244C156842F2090304EB8002B54204D074 -:10A38000062804D2D2F8000807E0042801D31846B2 -:10A3900070BDD2F80008C0F310000860002070BD46 -:10A3A000174910B50831184808601120154A0021D6 -:10A3B00002EBC003C3F81015C3F81415401C142891 -:10A3C000F6D3002006E0042804D302EB8003C3F890 -:10A3D000001807E002EB8003D3F80048C4F3100430 -:10A3E000C3F80048401C0628EDD310BD04490648B8 -:10A3F000083108607047000098000020BEBAFECA0D -:10A4000000F5014000F001400000FEFF10B572B6FB -:10A4100000F0C2F850B1E6F773FFF5F7DEF8F6F793 -:10A4200019FEEFF72AF861490020086062B60020A3 -:10A4300010BD2DE9F0410F46044672B600F0ACF8AD -:10A4400018B162B60820BDE8F081E6F7CFFEE6F766 -:10A4500059FF064600256909890001F1E02105F050 -:10A460001F00D1F80011C140C80717D0202D03D21A -:10A4700026FA05F0C00716D168B2002806DA00F007 -:10A480000F0000F1E02090F8140D03E000F1E0204F -:10A4900090F80004400900F0E5F820B16D1C642D2F -:10A4A000D9D324B104E062B641F20100CBE7404CBD -:10A4B0002078022803D962B64FF48050C3E73D49A3 -:10A4C000802081F8140DEEF7AFFF20780028607827 -:10A4D00001D058B908E048B1202807D8A078212831 -:10A4E00004D8012802D003E0A07808B10720AAE729 -:10A4F0002E493148086031480760E6F703FF2146DE -:10A50000F6F78EFDF5F71DF800F0F4F9FFF73CFCC7 -:10A510002046E6F7C3FE040062B603D0FFF776FFDD -:10A52000204690E700208EE710B5044600F034F88E -:10A5300000B101202070002010BD214908600020DA -:10A54000704770B50C461F490D681E491E4E0831F4 -:10A550000E60102807D011280CD012280FD0132815 -:10A5600011D0012013E0D4E90001FFF762FF354666 -:10A5700020600DE0FFF74AFF0025206008E020681A -:10A58000FFF7D2FF03E00E4920680860002020603A -:10A590000C48001D056070BD0448074900688842EA -:10A5A00001D1012070470020704700009800002072 -:10A5B0006CB601000BE000E0BEBAFECA70010020DC -:10A5C000040000201005024001000001F0B585B034 -:10A5D0000F460646FEF7D4FD04467078694600F043 -:10A5E0001F053846F3F751F8C0B1012C07BF019998 -:10A5F000B1F80310032005B018BFF0BD091D89B2E2 -:10A600002844884238BF012008BF00209CBF05B005 -:10A61000F0BD00BF05B04FF00200F0BD022CF9D133 -:10A62000042D28BFB6F80310F4D3E7E70B4A022144 -:10A6300011600B490B68002BFCD0084B1B1D1860E8 -:10A6400008680028FCD00020106008680028FCD0B2 -:10A6500070474FF0805040697047000004E50140AA -:10A6600000E40140082808D238B1042805D00128A8 -:10A6700003D0052801D0012070470020704710B595 -:10A68000044600F0F5F880B1204600F0E2F8FFF74C -:10A69000E9FF68B17D4A04F01F010120137888406A -:10A6A0004BB15168084350600BE042F2010010BD0D -:10A6B00042F2020010BD6109890001F1E021C1F8F8 -:10A6C0000001002010BD10B5044600F0D1F850B1D3 -:10A6D0006E4A04F01F0101201378884033B151689D -:10A6E0008143516008E042F2010010BD6109890018 -:10A6F00001F1E021C1F88001002010BD70B50D46C8 -:10A70000044600F0B5F878B16009800000F1E0205F -:10A71000D0F8000204F01F0201219140084000D04F -:10A7200001202860002070BD42F2010070BD10B50C -:10A73000044600F09DF858B104F01F010120884044 -:10A740006109890001F1E021C1F80002002010BD7B -:10A7500042F2010010BD10B5044600F089F858B16E -:10A7600004F01F01012088406109890001F1E02106 -:10A77000C1F88002002010BD42F2010010BD70B58A -:10A780000D46044600F074F870B12846FFF76AFFE2 -:10A7900068B16807000E002C0CDA04F00F0101F11B -:10A7A000E02181F8140D09E042F2010070BD42F28F -:10A7B000020070BD04F1E02484F80004002070BDA4 -:10A7C00070B50C46054600F053F830B1284600F04D -:10A7D00040F8C0B22060002070BD42F2010070BDA0 -:10A7E000BFF34F8F2A4801682A4A01F4E061114300 -:10A7F0000160BFF34F8FFEE770B50546F7F700F92C -:10A8000008B1072070BD214C0120217889B9207042 -:10A8100072B6F6F72EFC4FF0E026D6F8801106F55A -:10A82000C07681436160F6F724FCC043306062B6B5 -:10A8300000202870002070BD14490A783AB130B960 -:10A840004FF0E0224868C2F80001002008700020A4 -:10A850007047002806DA00F00F0000F1E02090F8C1 -:10A86000140D03E000F1E02090F800044009704767 -:10A8700010B50446642807DAF6F7FBFB0121A14076 -:10A88000084201D1012010BD002010BD740100203C -:10A890000CED00E00400FA0510B54FF000040B4683 -:10A8A0000200204621461ED0012A04D0022A04D0EC -:10A8B000032A1DD103E0012002E0022013E003205F -:10A8C000072B15D2DFE803F0140406080A0C0E006B -:10A8D000012108E0022106E0032104E0042102E056 -:10A8E000052100E00621F4F713FF08B1204610BD52 -:10A8F0000724FBE7FE4805218170002101704170AB -:10A90000C17081607047FB490A78022A06D0CA6884 -:10A910001044C860C8683238F6F749B98A681044EC -:10A9200088608868F7E70378F349F44A13B1012B8C -:10A930000ED011E00379012B00D06BB943790BB134 -:10A94000012B09D18368643B8B4205D2C0680EE0BD -:10A950000379012B02D00BB10020704743790BB172 -:10A96000012BF9D1C368643B8B42F5D280689042D9 -:10A97000F2D8012070472DE9F04704460226F5F78A -:10A98000C6FD006800B1FFDFD94D01273CB120783A -:10A99000B0B1012805D0022810D0032813D02F71A0 -:10A9A0000CE06068C82807D3F6F771F920B1606839 -:10A9B000FFF7A9FF012603E0002601E000F0AFF950 -:10A9C0003046BDE8F08728780028F7D16068FFF7A7 -:10A9D000AAFF0028E3D06068DFF81883007810B37E -:10A9E000A878042800D0FFDF0020474688F8000040 -:10A9F00060680079C0B30020387160684079A0B306 -:10AA00000420787160688168E868F5F78FF9B860AC -:10AA10006068C0683230F8600320A870B549E878F3 -:10AA2000F5F712FBCAE74FF00209404688F800909C -:10AA300061680979D1B10021017161684979B9B1C1 -:10AA40000421417161688968323181606168C96837 -:10AA5000C160C068A64C14346060F4F7A5FE2060A5 -:10AA60006F7085F80290A9E704E005E00321E3E7B1 -:10AA70000321E6E70120BFE70320C2E72DE9F04705 -:10AA80009B4C8846E178884200D0FFDFDFF8609277 -:10AA900000250127974E09F11409B8F1090F76D264 -:10AAA000DFE808F0050D2A3D646A769E7E00A078F6 -:10AAB000032886D0A078022883D0FFDF81E7A07822 -:10AAC000032803D0A078022800D0FFDF0420A07064 -:10AAD0002571207800285FD1FFF715FF3078022814 -:10AAE00006D0B068E06000F06CF92061002048E01A -:10AAF000E078F5F739F9F5E7A078032803D0A078D6 -:10AB0000022800D0FFDF207878BBA078032812D17C -:10AB1000042026E00420F6F7F7FAA57051E7A078A4 -:10AB2000032803D0A078022800D0FFDF2078E0B906 -:10AB3000A078032814D0F4F737FE01464F46D9F821 -:10AB40000000F6F779F80028E4DB79688142E1DB60 -:10AB5000081AF0606749E078BDE8F047F5F774BA85 -:10AB60000520F6F7D1FAA7702BE724E0A078042897 -:10AB700000D0FFDF022004E0A078042800D0FFDF2F -:10AB80000120A1688847FFF7F6FE05462EE027E082 -:10AB9000A078042800D0FFDFBDE8F04700F0BFB880 -:10ABA000A078042805D0607810B1A078022800D0E1 -:10ABB000FFDF207818B1BDE8F04700F0B9B8207980 -:10ABC00020B10620F6F7A0FA2571CCE7607828B10D -:10ABD0004849E078F5F738FA6570F2E60720C0E7F3 -:10ABE000FFDFEEE63DB1012D03D0FFDF022DF9D1ED -:10ABF000E7E60420C5E70320C3E770B5050005D0EC -:10AC00003B4CA078052803D0112070BD102070BDEA -:10AC10003B48F4F764FDE070E07818B1A5600020CF -:10AC2000A07070BD032070BD314810B5017809B126 -:10AC3000112010BD817805290CD0817801290BD015 -:10AC4000817849B1012101708178012904D080788F -:10AC500010B103E00F2010BD00F06AF8002010BD15 -:10AC60002DE9F041224E0446B07808B101280AD1FE -:10AC700064B12046FFF757FE50B120781D4D48B112 -:10AC8000B078012822D00F20BDE8F0811020FBE72A -:10AC90000720F9E702272F70207998B1002028714A -:10ACA000607988B104206871A0683230A860E068DB -:10ACB000E860E8680E4C14346060F4F775FD2060BD -:10ACC000B77022E00320EAE70320ECE700202870B9 -:10ACD000207900B3002028716079F0B104206871F8 -:10ACE000A168F068F5F722F8A860E068323009E062 -:10ACF0007C010020781100203D860100FF1FA10784 -:10AD00007DAA0100E8600320B0701049F078F5F7E3 -:10AD10009BF90020B8E70320DDE70320DFE70C48BC -:10AD200010B5006900F045F8BDE81040F4F76DBCBF -:10AD300010B5074CE078F4F721FD0820F6F7E4F9A8 -:10AD40000520A07000202070607010BD78110020D8 -:10AD50007C0100201F490968014201D00120704791 -:10AD6000002070471B49091D0968014201D00120DC -:10AD7000704700207047174910310968014201D01F -:10AD800001207047002070471249143109680142C0 -:10AD900001D0012070470020704710B50D4C206095 -:10ADA000201D01600B4810300260001D0360002070 -:10ADB00010BD09490A6848F202139A4302430A6027 -:10ADC0007047054A116848F2021301EA03009943EB -:10ADD0001160704700060040C806024040EA0103C7 -:10ADE00010B59B070FD1042A0DD310C808C9121F34 -:10ADF0009C42F8D020BA19BA884201D9012010BD6E -:10AE00004FF0FF3010BD1AB1D30703D0521C07E03A -:10AE1000002010BD10F8013B11F8014B1B1B07D19E -:10AE200010F8013B11F8014B1B1B01D1921EF1D10F -:10AE3000184610BD032A40F2308010F0030C00F0D9 -:10AE4000158011F8013BBCF1020F624498BF11F864 -:10AE500001CB00F8013B38BF11F8013BA2F104021D -:10AE600098BF00F801CB38BF00F8013B11F0030395 -:10AE700000F02580083AC0F0088051F8043B083AF9 -:10AE800051F804CBA0E80810F5E7121D5CBF51F89B -:10AE9000043B40F8043BAFF30080D20724BF11F815 -:10AEA000013B11F801CB48BF11F8012B24BF00F87A -:10AEB000013B00F801CB48BF00F8012B704710B5EB -:10AEC000203AC0F00B80B1E81850203AA0E81850A2 -:10AED000B1E81850A0E81850BFF4F5AF5FEA027C63 -:10AEE00024BFB1E81850A0E8185044BF18C918C0D2 -:10AEF000BDE810405FEA827C24BF51F8043B40F873 -:10AF0000043B08BF7047D20728BF31F8023B48BF57 -:10AF100011F8012B28BF20F8023B48BF00F8012B95 -:10AF200070474FF000020429C0F0128010F0030CAB -:10AF300000F01B80CCF1040CBCF1020F18BF00F82C -:10AF4000012BA8BF20F8022BA1EB0C0100F00DB8DB -:10AF50005FEAC17C24BF00F8012B00F8012B48BF39 -:10AF600000F8012B70474FF0000200B513469446DD -:10AF70009646203922BFA0E80C50A0E80C50B1F151 -:10AF80002001BFF4F7AF090728BFA0E80C5048BF65 -:10AF90000CC05DF804EB890028BF40F8042B08BF03 -:10AFA000704748BF20F8022B11F0804F18BF00F8FF -:10AFB000012B70477047704770477047164B1860F9 -:10AFC000164B1960164B1A607047FEDF042071465D -:10AFD00008421BD10699134A914217DC069902399F -:10AFE0004878DF2812D10878FE2808D0FF280DD134 -:10AFF0004FF001004FF000020B4B1B68184741F265 -:10B0000001000099019A084B1B681847069805999A -:10B01000064B1B68DB6818479C010020A00100203C -:10B02000A401002000C001007001002004000020E5 -:10B03000204821497047FFF7FBFFE6F7AFF800BD56 -:10B0400001200007C06AC0B2FF2806D14FF0FF30D0 -:10B050004FF010210968884203D018484FF00801CA -:10B0600001604FF4805016490968884203D1154A9F -:10B0700013605B68184700BD20BFFDE74FF48050A8 -:10B080000F490968884210D10F4B18684FF0FF3103 -:10B090008842F1D080F308884FF02021884204DDF7 -:10B0A0000A48026802210A430260094880470948A9 -:10B0B0008047FFDF88110020881100202C05004008 -:10B0C000000000200400002000C001002405004012 -:10B0D0008D1A010041B0010004207146084202D0DF -:10B0E000EFF3098101E0EFF3088188690238007805 -:10B0F000102813DB20280FDB2B280BDB0A4A1268F1 -:10B100000A4B9A4203D1602804DB094A1047022007 -:10B1100008607047074A1047074A1047074A1268F5 -:10B120002C3212681047000098000020BEBAFECAF8 -:10B1300009130000ED9B010043A50100040000205D -:10B140000E4B0F4908470F4B0D4908470E4B0C4952 -:10B1500008470E4B0A4908470D4B094908470D4B54 -:10B16000074908470C4B064908470C4B0449084758 -:10B170000B4B034908470B4B01490847A3910000BB -:10B180006D960000A52F0000C98D00004D8D0000B8 -:10B190007F930000251300004F740000C38E000051 -:10B1A000F5950000A91100000021016041600172C5 -:10B1B00070470A6802600B7903717047AB7B00002F -:10B1C0004B7D00007F7B0000457E0000697E000013 -:10B1D000A37E0000D77E0000117F0000417F0000A9 -:10B1E000937F000091120000911200009112000064 -:10B1F000911200009112000091120000F122000053 -:10B2000093230000B3230000BD240000FB1E0000B8 -:10B2100005270000E527000005280000C72D0000D5 -:10B22000EB2D00001B2D00006F2D00001D2E0000D7 -:10B23000A72E0000B3410000774300001F47000025 -:10B2400039480000BD48000063490000D3490000B0 -:10B25000ED4A0000BB4B0000374C00001F280000E7 -:10B26000252800002F280000BD1E0000FB2800003C -:10B270008F1E0000552A0000911200001555000095 -:10B280009B550000B7550000D355000047570000FC -:10B29000FD55000007560000495600006B5600009F -:10B2A0002D57000091120000911200009112000031 -:10B2B0009112000091120000911200001F6D000019 -:10B2C0003F6D0000416D00007B6D0000A96D000026 -:10B2D000936E00003D6F0000516F00009D6F0000F5 -:10B2E000957000003B7200006B730000195F000056 -:10B2F00091120000911200009112000023890000B9 -:10B300006189000083890000100110013A020000E9 -:10B310001A02000069740000F9760000FFFFFFFFC9 -:10B320000000FFFF2F850000CF1B000041520000EE -:10B33000635F0000977600000000000023002300F8 -:10B3400046004D0023002300F5000000000000002F -:10B35000000000001DBB0000000000000000000015 -:10B3600000000000A5C80000000000000000000070 -:10B37000000000007DBB000003BC000000000000D6 -:10B380000000000003BF0000ABBC0000E3C10000F0 -:10B39000000000000000000025CD000000000000BB -:10B3A0000000000000000000B7BF00007BC90000E3 -:10B3B000000000004FCA0000C3CA000000000000E7 -:10B3C0007DC2000059C300000000000089CA0000CF -:10B3D000B9C3000045C60000A9C600009FC7000011 -:10B3E00085C1000039C80000000000009DC00000B9 -:10B3F0000000000095BD00000FBD0000E5C8000082 -:10B4000001CC00006FCC00000000000075BF000000 -:10B410003BBD00002DBF000063CE0000CBBE00008E -:10B4200073CD000000000000D1CC000079BC00000A -:10B43000AFBB0000E9BD0000E7BC0000E3CD0000A9 -:10B4400001CF000005C00000C1CE00008B38000015 -:10B450008B380000CD22000099840000D9610000E3 -:10B46000115200000000000029710100D1380000D5 -:10B47000D1380000EF220000ED840000536200008C -:10B480001B520000356901004F710100BC01BC0175 -:10B490003E002C0044000E00D800200101000000F6 -:10B4A000010000000001020304001011121300004B -:10B4B0000014000063940100C9990100979A0100EB -:10B4C000E99A0100359B0100899B0100BD940100B0 -:10B4D000E1950100499601006D9801005399010022 -:10B4E00013DE000017EF00001B5C01006D4E010031 -:10B4F0003F5C01006F4E0100453101004F840100A7 -:10B500007D4101004F840100B1310100BF85010080 -:10B510003B3B0100BF850100BD3001004D850100AE -:10B52000AF4001004D850100555555D6BE898E00AE -:10B5300000006606F30C801300000A033B066C094A -:10B5400000005604D308500D555555252627D6BE64 -:10B55000898EF401FA00960064004B0032001E0050 -:10B56000140000000300656C74620000000000001D -:10B570000000000000000000000087000000000044 -:10B5800000000000000000000000BE83605ADB0BDA -:10B59000376038A5F5AA9183886C00006DA2010080 -:10B5A00085A201009DA20100B5A20100E5A2010053 -:10B5B0000DA3010037A301006BA301000BA0010044 -:10B5C0005B9F010077A00100D1A00100E1A0010074 -:10B5D0000DA101007FA60100C7A60100FDA6010084 -:10B5E0002FA7010057A701007FA70100C1A70100F5 -:10B5F000E1A70100F9A7010039A80100BF1201006D -:10B60000C7120100D51201003BA1010055A10100A4 -:10B6100029A1010033A1010061A1010097A101004E -:10B62000D9A10100E7A10100F5A1010001A20100DB -:10B630000FA201001DA2010029A2010000000000CC -:10B64000678F0000BD8F0000D38F000099A8010014 -:10B65000619C0100219D0100FBAB010029AC0100B0 -:10B6600061AC0100B51001008D1501000010020051 -:10B6700090B6010008000020A00100004411000065 -:10B68000B4B60100A8010020E00F00008011000006 -:10B6900001593601000100683720FB349B5F8004AC -:10B6A0001F800010022001337F0102E429E4BDAFB6 -:04B6B0000100000095 -:00000001FF From 3fe77a5efe05b4e8bac28d9fc37e0272e787821f Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Fri, 17 Jun 2016 11:20:51 +0100 Subject: [PATCH 21/67] Fix known BUG in nrf_svc.h when compiled by GCC. --- .../sdk/softdevice/s130/headers/nrf_svc.h | 30 +++++++++---------- .../sdk/softdevice/s132/headers/nrf_svc.h | 30 +++++++++---------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_svc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_svc.h index 20f7c8d889..31ea671529 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_svc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_svc.h @@ -1,26 +1,26 @@ -/* +/* * 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. - * + * * 4. This software must only be used in a processor manufactured by Nordic * Semiconductor ASA, or in a processor manufactured by a third party that * is used in combination with a processor manufactured by Nordic Semiconductor. - * - * + * + * * 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 @@ -31,9 +31,9 @@ * 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__ #define NRF_SVC__ @@ -42,7 +42,7 @@ #ifdef __cplusplus extern "C" { #endif - + #ifdef SVCALL_AS_NORMAL_FUNCTION #define SVCALL(number, return_type, signature) return_type signature #else @@ -52,9 +52,9 @@ extern "C" { #define SVCALL(number, return_type, signature) return_type __svc(number) signature #elif defined (__GNUC__) #ifdef __cplusplus -#define GCC_CAST_CPP (uint8_t) +#define GCC_CAST_CPP (uint16_t) #else -#define GCC_CAST_CPP +#define GCC_CAST_CPP #endif #define SVCALL(number, return_type, signature) \ _Pragma("GCC diagnostic push") \ @@ -69,14 +69,14 @@ extern "C" { ); \ } \ _Pragma("GCC diagnostic pop") - + #elif defined (__ICCARM__) #define PRAGMA(x) _Pragma(#x) #define SVCALL(number, return_type, signature) \ PRAGMA(swi_number = (number)) \ __swi return_type signature; #else -#define SVCALL(number, return_type, signature) return_type signature +#define SVCALL(number, return_type, signature) return_type signature #endif #endif // SVCALL diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_svc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_svc.h index 20f7c8d889..31ea671529 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_svc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_svc.h @@ -1,26 +1,26 @@ -/* +/* * 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. - * + * * 4. This software must only be used in a processor manufactured by Nordic * Semiconductor ASA, or in a processor manufactured by a third party that * is used in combination with a processor manufactured by Nordic Semiconductor. - * - * + * + * * 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 @@ -31,9 +31,9 @@ * 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__ #define NRF_SVC__ @@ -42,7 +42,7 @@ #ifdef __cplusplus extern "C" { #endif - + #ifdef SVCALL_AS_NORMAL_FUNCTION #define SVCALL(number, return_type, signature) return_type signature #else @@ -52,9 +52,9 @@ extern "C" { #define SVCALL(number, return_type, signature) return_type __svc(number) signature #elif defined (__GNUC__) #ifdef __cplusplus -#define GCC_CAST_CPP (uint8_t) +#define GCC_CAST_CPP (uint16_t) #else -#define GCC_CAST_CPP +#define GCC_CAST_CPP #endif #define SVCALL(number, return_type, signature) \ _Pragma("GCC diagnostic push") \ @@ -69,14 +69,14 @@ extern "C" { ); \ } \ _Pragma("GCC diagnostic pop") - + #elif defined (__ICCARM__) #define PRAGMA(x) _Pragma(#x) #define SVCALL(number, return_type, signature) \ PRAGMA(swi_number = (number)) \ __swi return_type signature; #else -#define SVCALL(number, return_type, signature) return_type signature +#define SVCALL(number, return_type, signature) return_type signature #endif #endif // SVCALL From d1b902a46dff80d7a95050d160a3dbd4b69ad60f Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Fri, 17 Jun 2016 11:22:46 +0100 Subject: [PATCH 22/67] Update NRF51 link and startup sequence. * Update softdevice offset so they match the offset of sd 2.0. * Update RAM initialization sequence. * Import fs_data section in final binary --- .../TARGET_MCU_NORDIC_32K/NRF51822.ld | 13 +++++++++++-- .../TOOLCHAIN_GCC_ARM/startup_NRF51822.S | 13 +++++++++---- .../TOOLCHAIN_GCC_ARM/NRF52832.ld | 1 - 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NORDIC_32K/NRF51822.ld b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NORDIC_32K/NRF51822.ld index 913b210847..d2b7bcfa9f 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NORDIC_32K/NRF51822.ld +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NORDIC_32K/NRF51822.ld @@ -2,8 +2,8 @@ MEMORY { - FLASH (rx) : ORIGIN = 0x0001C000, LENGTH = 0x24000 - RAM (rwx) : ORIGIN = 0x20002800, LENGTH = 0x5800 + FLASH (rx) : ORIGIN = 0x0001B000, LENGTH = 0x25000 + RAM (rwx) : ORIGIN = 0x20002ef8, LENGTH = 0x5108 } OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") @@ -114,6 +114,15 @@ SECTIONS } > RAM + __edata = .; + + .fs_data : + { + PROVIDE(__start_fs_data = .); + KEEP(*(.fs_data)) + PROVIDE(__stop_fs_data = .); + } > RAM + .bss : { . = ALIGN(4); diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/startup_NRF51822.S b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/startup_NRF51822.S index 7fb929dd26..e7f0afa0a3 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/startup_NRF51822.S +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/startup_NRF51822.S @@ -117,8 +117,9 @@ __Vectors: /* Reset Handler */ - .equ NRF_POWER_RAMON_ADDRESS, 0x40000524 - .equ NRF_POWER_RAMON_RAMxON_ONMODE_Msk, 0x3 + .equ NRF_POWER_RAMON_ADDRESS, 0x40000524 + .equ NRF_POWER_RAMONB_ADDRESS, 0x40000554 + .equ NRF_POWER_RAMONx_RAMxON_ONMODE_Msk, 0x3 .text .thumb @@ -129,10 +130,14 @@ __Vectors: Reset_Handler: .fnstart -/* Make sure ALL RAM banks are powered on */ + MOVS R1, #NRF_POWER_RAMONx_RAMxON_ONMODE_Msk LDR R0, =NRF_POWER_RAMON_ADDRESS LDR R2, [R0] - MOVS R1, #NRF_POWER_RAMON_RAMxON_ONMODE_Msk + ORRS R2, R1 + STR R2, [R0] + + LDR R0, =NRF_POWER_RAMONB_ADDRESS + LDR R2, [R0] ORRS R2, R1 STR R2, [R0] diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/NRF52832.ld b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/NRF52832.ld index 833502ee09..e866a7e520 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/NRF52832.ld +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/NRF52832.ld @@ -83,7 +83,6 @@ SECTIONS KEEP(*(.eh_frame*)) } > FLASH - .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) From daf7ef352df8fc846635220dcc0a66eb2a925dc3 Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Fri, 17 Jun 2016 11:24:31 +0100 Subject: [PATCH 23/67] Import assert fix from mbed v3. --- .../sdk/libraries/util/nrf_assert.h | 43 ++++++++++++++++--- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h index 91a6f4b251..b1572cf509 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h @@ -1,9 +1,32 @@ /* - * Copyright (c) 2006 Nordic Semiconductor. All Rights Reserved. + * Copyright (c) Nordic Semiconductor ASA + * All rights reserved. * - * The information contained herein is confidential property of Nordic Semiconductor. The use, - * copying, transfer or disclosure of such information is prohibited except by express written - * agreement with Nordic Semiconductor. + * 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. * */ @@ -18,6 +41,10 @@ #include "nrf.h" #include "app_error.h" +#ifdef __cplusplus +extern "C" { +#endif + #if defined(DEBUG_NRF) || defined(DEBUG_NRF_USER) /** @brief Function for handling assertions. @@ -38,7 +65,7 @@ */ void assert_nrf_callback(uint16_t line_num, const uint8_t *file_name); -/*lint -emacro(506, ASSERT) */ /* Suppress "Constant value Boolean */ +/*lint -emacro(506, ASSERT) */ /* Suppress "Constant value Boolean */ /*lint -emacro(774, ASSERT) */ /* Suppress "Boolean within 'if' always evaluates to True" */ \ /** @brief Function for checking intended for production code. @@ -53,8 +80,14 @@ else \ assert_nrf_callback((uint16_t)__LINE__, (uint8_t *)__FILE__); \ } #else +#ifndef ASSERT #define ASSERT(expr) //!< Assert empty when disabled __WEAK void assert_nrf_callback(uint16_t line_num, const uint8_t *file_name); +#endif #endif /* defined(DEBUG_NRF) || defined(DEBUG_NRF_USER) */ +#ifdef __cplusplus +} +#endif + #endif /* NRF_ASSERT_H_ */ From 05fea6e28674c53d67e59318d985ba945ab666b7 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Tue, 21 Jun 2016 09:13:20 +0200 Subject: [PATCH 24/67] Corection in macros for NRF5x devices Remove duplicated macro "BLE_STACK_SUPPORT_REQD" for MCU_NRF51 add macro "S132" for MCU_NRF52 --- hal/targets.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hal/targets.json b/hal/targets.json index e140916c4e..933574bec4 100644 --- a/hal/targets.json +++ b/hal/targets.json @@ -1105,8 +1105,7 @@ "TARGET_NRF51822", "BLE_STACK_SUPPORT_REQD", "SOFTDEVICE_PRESENT", - "S130", - "BLE_STACK_SUPPORT_REQD" + "S130" ], "MERGE_BOOTLOADER": false, "extra_labels": ["NORDIC", "MCU_NRF51", "MCU_NRF51822", "NRF5"], @@ -1726,7 +1725,7 @@ "MCU_NRF52": { "inherits": ["Target"], "core": "Cortex-M4F", - "macros": ["NRF52", "TARGET_NRF52832", "BLE_STACK_SUPPORT_REQD", "SOFTDEVICE_PRESENT"], + "macros": ["NRF52", "TARGET_NRF52832", "BLE_STACK_SUPPORT_REQD", "SOFTDEVICE_PRESENT", "S132"], "extra_labels": ["NORDIC", "MCU_NRF52", "MCU_NRF52832", "NRF5"], "OUTPUT_EXT": "hex", "is_disk_virtual": true, From 22b5c78191a86fde6e714ab339ba38e09934cae3 Mon Sep 17 00:00:00 2001 From: Brian Daniels Date: Tue, 14 Jun 2016 16:12:32 +0100 Subject: [PATCH 25/67] Fixing test builds for devices with softdevices. Previously, .hex files were not copied when building source as a library. This prevents builds that pre compile source as a library and then includes the build directory as the only source (because there is no softdevice present). This PR copies hex files when compiling source as a library. --- tools/build_api.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/build_api.py b/tools/build_api.py index e34e74d6e6..bf8a567963 100644 --- a/tools/build_api.py +++ b/tools/build_api.py @@ -310,6 +310,9 @@ def build_library(src_paths, build_path, target, toolchain_name, toolchain.copy_files(resource.libraries, build_path, rel_path=resource.base_path) if resource.linker_script: toolchain.copy_files(resource.linker_script, build_path, rel_path=resource.base_path) + + if resource.hex_files: + toolchain.copy_files(resource.hex_files, build_path, rel_path=resource.base_path) # Extend resources collection if not resources: @@ -494,6 +497,7 @@ def build_lib(lib_id, target, toolchain_name, options=None, verbose=False, clean # Copy Headers for resource in resources: toolchain.copy_files(resource.headers, build_path, rel_path=resource.base_path) + dependencies_include_dir.extend(toolchain.scan_resources(build_path).inc_dirs) # Compile Sources From 6c7d15d381a74872b07d0db3b37da815fc250660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C5=82=C4=85bek=2C=20Andrzej?= Date: Wed, 22 Jun 2016 13:55:36 +0200 Subject: [PATCH 26/67] Re-enabled SPI after adjusting HAL implementation to slightly different API. --- hal/targets.json | 4 +- .../hal/TARGET_NORDIC/TARGET_NRF5/i2c_api.c | 10 +++-- .../hal/TARGET_NORDIC/TARGET_NRF5/spi_api.c | 42 ++++++++++--------- 3 files changed, 31 insertions(+), 25 deletions(-) diff --git a/hal/targets.json b/hal/targets.json index 670543d345..b24e975d53 100644 --- a/hal/targets.json +++ b/hal/targets.json @@ -1388,7 +1388,7 @@ "supported_form_factors": ["ARDUINO"], "inherits": ["MCU_NRF51_32K"], "progen": {"target": "nrf51-dk"}, - "device_has": ["ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "SERIAL", "RTC", "SERIAL_ASYNCH", "SLEEP"] + "device_has": ["ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH"] }, "NRF51_DK_BOOT": { "supported_form_factors": ["ARDUINO"], @@ -1764,6 +1764,6 @@ "supported_form_factors": ["ARDUINO"], "inherits": ["MCU_NRF52"], "progen": {"target": "nrf52-dk"}, - "device_has": ["ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP"] + "device_has": ["ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH"] } } diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/i2c_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/i2c_api.c index 5fc4720c5e..7d611490b0 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/i2c_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/i2c_api.c @@ -13,14 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "mbed_assert.h" -#include "mbed_error.h" + #include "i2c_api.h" -#include "nrf_drv_twi.h" -#include "app_util_platform.h" #if DEVICE_I2C +#include "mbed_assert.h" +#include "mbed_error.h" +#include "nrf_drv_twi.h" +#include "app_util_platform.h" + #if DEVICE_I2C_ASYNCH #define TWI_IDX(obj) ((obj)->i2c.twi_idx) #else diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/spi_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/spi_api.c index affd19f4e8..8d75c2dbc3 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/spi_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/spi_api.c @@ -13,9 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -//#include #include "spi_api.h" + +#if DEVICE_SPI + #include "cmsis.h" #include "pinmap.h" #include "mbed_assert.h" @@ -23,8 +25,6 @@ #include "nrf_drv_spi.h" #include "app_util_platform.h" -#if DEVICE_SPI - #define SPI_MESSAGE_SIZE 1 volatile uint8_t m_tx_buf[SPI_MESSAGE_SIZE] = {0}; volatile uint8_t m_rx_buf[SPI_MESSAGE_SIZE] = {0}; @@ -55,15 +55,16 @@ static void master_event_handler(nrf_drv_spi_evt_t const * event) } } -void spi_init(spi_t *obj, PinName mosi, PinName miso, PinName sclk) +void spi_init(spi_t *obj, PinName mosi, PinName miso, PinName sclk, PinName ssel) { - m_config.sck_pin = sclk; - m_config.mosi_pin = mosi; - m_config.miso_pin = miso; - + m_config.sck_pin = (uint8_t)sclk; + m_config.mosi_pin = (mosi != NC) ? (uint8_t)mosi : NRF_DRV_SPI_PIN_NOT_USED; + m_config.miso_pin = (miso != NC) ? (uint8_t)miso : NRF_DRV_SPI_PIN_NOT_USED; + m_config.ss_pin = (ssel != NC) ? (uint8_t)ssel : NRF_DRV_SPI_PIN_NOT_USED; + SPI_S(obj)->busy = false; m_spi_struct = obj; - + SPI_DRV(obj) = &spi1; (void)nrf_drv_spi_init(&spi1, &m_config, master_event_handler); } @@ -122,13 +123,15 @@ static nrf_drv_spi_frequency_t freq_translate(int hz) return frequency; } -void spi_format(spi_t *obj, int bits, int mode, spi_bitorder_t order) +void spi_format(spi_t *obj, int bits, int mode, int slave) { if (bits != 8) { error("Only 8bits SPI supported"); } - - m_config.bit_order = ((order == SPI_MSB) ? NRF_DRV_SPI_BIT_ORDER_MSB_FIRST : NRF_DRV_SPI_BIT_ORDER_LSB_FIRST); + if (slave != 0) { + error("SPI slave mode is not supported"); + } + nrf_drv_spi_mode_t config_mode = mode_translate(mode); if (m_config.mode != config_mode) { @@ -182,14 +185,14 @@ void spi_slave_write(spi_t *obj, int value) #if DEVICE_SPI_ASYNCH - void spi_master_transfer(spi_t *obj, - void *tx, size_t tx_length, - void *rx, size_t rx_length, - uint32_t handler, - uint32_t event, - DMAUsage hint) + const void *tx, size_t tx_length, + void *rx, size_t rx_length, uint8_t bit_width, + uint32_t handler, uint32_t event, DMAUsage hint) { + (void)hint; + (void)bit_width; + m_user_handler = (user_handler_t)handler; m_event = event; @@ -213,6 +216,7 @@ void spi_abort_asynch(spi_t *obj) { nrf_drv_spi_abort(SPI_DRV(obj)); } -#endif + +#endif // DEVICE_SPI_ASYNCH #endif // DEVICE_SPI From 601b96dde2e4695bc649f7b15f7bd46ae2b85c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C5=82=C4=85bek=2C=20Andrzej?= Date: Wed, 22 Jun 2016 14:00:30 +0200 Subject: [PATCH 27/67] Restored alternative method of RTOS tick generation for NRF51, which was undesirably removed when the new us_ticker implementation was introduced. --- .../TARGET_MCU_NRF51822/sdk/nrf_drv_config.h | 2 +- .../TARGET_MCU_NRF52832/sdk/nrf_drv_config.h | 2 +- .../{rtc_common.h => common_rtc.h} | 29 +- .../hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c | 25 +- .../hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c | 329 ++++++++++++++++++ .../hal/TARGET_NORDIC/TARGET_NRF5/rtc_api.c | 12 +- .../sdk/drivers_nrf/rtc/nrf_drv_rtc.c | 290 --------------- .../sdk/drivers_nrf/rtc/nrf_drv_rtc.h | 325 ----------------- .../hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c | 110 +++--- 9 files changed, 435 insertions(+), 689 deletions(-) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{rtc_common.h => common_rtc.h} (51%) create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/rtc/nrf_drv_rtc.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/rtc/nrf_drv_rtc.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h index 31df5d63a5..d3dc577462 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h @@ -138,7 +138,7 @@ #define RTC0_INSTANCE_INDEX 0 #endif -#define RTC1_ENABLED 1 +#define RTC1_ENABLED 0 #if (RTC1_ENABLED == 1) #define RTC1_CONFIG_FREQUENCY 32768 diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h index bdf509e0a5..3fb5149d3c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h @@ -138,7 +138,7 @@ #define RTC0_INSTANCE_INDEX 0 #endif -#define RTC1_ENABLED 1 +#define RTC1_ENABLED 0 #if (RTC1_ENABLED == 1) #define RTC1_CONFIG_FREQUENCY 32768 diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/rtc_common.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/common_rtc.h similarity index 51% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/rtc_common.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/common_rtc.h index 43ec5ff512..789427c692 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/rtc_common.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/common_rtc.h @@ -14,21 +14,26 @@ * limitations under the License. */ -#ifndef RTC_COMMON_H -#define RTC_COMMON_H +#ifndef COMMON_RTC_H +#define COMMON_RTC_H -#include "nrf_drv_rtc.h" +#include "nrf_rtc.h" -#define RTC_COUNTER_BITS 24 +#define RTC_COUNTER_BITS 24u -#define LP_TICKER_CC_CHANNEL 0 -#define US_TICKER_CC_CHANNEL 1 +// Instance 0 is reserved for SoftDevice. +// Instance 1 is used as a common one for us_ticker, lp_ticker and (in case +// of NRF51) as an alternative tick source for RTOS. +#define COMMON_RTC_INSTANCE NRF_RTC1 -extern nrf_drv_rtc_t const m_rtc_common; -extern bool m_rtc_common_enabled; -extern uint32_t volatile m_rtc_common_overflows; +#define US_TICKER_CC_CHANNEL 0 +#define OS_TICK_CC_CHANNEL 1 +#define LP_TICKER_CC_CHANNEL 2 -void rtc_common_init(void); -uint32_t rtc_common_32bit_ticks_get(void); +extern bool m_common_rtc_enabled; +extern uint32_t volatile m_common_rtc_overflows; -#endif // RTC_COMMON_H +void common_rtc_init(void); +uint32_t common_rtc_32bit_ticks_get(void); + +#endif // COMMON_RTC_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c index ca292114ea..4a928b79f4 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c @@ -17,42 +17,37 @@ #if DEVICE_LOWPOWERTIMER -#include "rtc_common.h" +#include "common_rtc.h" #include "sleep_api.h" void lp_ticker_init(void) { - rtc_common_init(); + common_rtc_init(); } uint32_t lp_ticker_read(void) { - return rtc_common_32bit_ticks_get(); + return common_rtc_32bit_ticks_get(); } void lp_ticker_set_interrupt(uint32_t now, uint32_t time) { (void)now; - // The passed 32-bit 'time' value is wrapped properly by the driver, so it - // is usable by the 24-bit counter. - ret_code_t result = nrf_drv_rtc_cc_set(&m_rtc_common, LP_TICKER_CC_CHANNEL, - time, true); - if (result != NRF_SUCCESS) - { - MBED_ASSERT(false); - } + nrf_rtc_cc_set(COMMON_RTC_INSTANCE, LP_TICKER_CC_CHANNEL, RTC_WRAP(time)); + nrf_rtc_event_clear(COMMON_RTC_INSTANCE, NRF_RTC_EVENT_COMPARE_2); + nrf_rtc_event_enable(COMMON_RTC_INSTANCE, NRF_RTC_INT_COMPARE2_MASK); } uint32_t lp_ticker_get_overflows_counter(void) { - // Cut out the part of 'm_rtc_common_overflows' used by - // 'rtc_common_32bit_ticks_get()'. - return (m_rtc_common_overflows >> (32 - RTC_COUNTER_BITS)); + // Cut out the part of 'm_common_rtc_overflows' used by + // 'common_rtc_32bit_ticks_get()'. + return (m_common_rtc_overflows >> (32u - RTC_COUNTER_BITS)); } uint32_t lp_ticker_get_compare_match(void) { - return nrf_rtc_cc_get(m_rtc_common.p_reg, LP_TICKER_CC_CHANNEL); + return nrf_rtc_cc_get(COMMON_RTC_INSTANCE, LP_TICKER_CC_CHANNEL); } void lp_ticker_sleep_until(uint32_t now, uint32_t time) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c new file mode 100644 index 0000000000..3b4a51f25c --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c @@ -0,0 +1,329 @@ +/* mbed Microcontroller Library + * Copyright (c) 2013 Nordic Semiconductor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#if defined(TARGET_MCU_NRF51822) + +#include "common_rtc.h" +#include "toolchain.h" +#include "nrf_delay.h" + + +#define MAX_RTC_COUNTER_VAL ((1uL << RTC_COUNTER_BITS) - 1) + +/** + * The value previously set in the capture compare register of channel 1 + */ +static uint32_t previous_tick_cc_value = 0; + +/* + RTX provide the following definitions which are used by the tick code: + * os_trv: The number (minus 1) of clock cycle between two tick. + * os_clockrate: Time duration between two ticks (in us). + * OS_Tick_Handler: The function which handle a tick event. + This function is special because it never returns. + Those definitions are used by the code which handle the os tick. + To allow compilation of us_ticker programs without RTOS, those symbols are + exported from this module as weak ones. + */ +MBED_WEAK uint32_t const os_trv; +MBED_WEAK uint32_t const os_clockrate; +MBED_WEAK void OS_Tick_Handler() { } + + +#if defined (__CC_ARM) /* ARMCC Compiler */ + +__asm void RTC1_IRQHandler(void) +{ + IMPORT OS_Tick_Handler + IMPORT common_rtc_irq_handler + + /** + * Chanel 1 of RTC1 is used by RTX as a systick. + * If the compare event on channel 1 is set, then branch to OS_Tick_Handler. + * Otherwise, just execute common_rtc_irq_handler. + * This function has to be written in assembly and tagged as naked because OS_Tick_Handler + * will never return. + * A c function would put lr on the stack before calling OS_Tick_Handler and this value + * would never been dequeued. + * + * \code + * void RTC1_IRQHandler(void) { + if(NRF_RTC1->EVENTS_COMPARE[1]) { + // never return... + OS_Tick_Handler(); + } else { + common_rtc_irq_handler(); + } + } + * \endcode + */ + ldr r0,=0x40011144 + ldr r1, [r0, #0] + cmp r1, #0 + beq US_TICKER_HANDLER + bl OS_Tick_Handler +US_TICKER_HANDLER + push {r3, lr} + bl common_rtc_irq_handler + pop {r3, pc} + nop /* padding */ +} + +#elif defined (__GNUC__) /* GNU Compiler */ + +__attribute__((naked)) void RTC1_IRQHandler(void) +{ + /** + * Chanel 1 of RTC1 is used by RTX as a systick. + * If the compare event on channel 1 is set, then branch to OS_Tick_Handler. + * Otherwise, just execute common_rtc_irq_handler. + * This function has to be written in assembly and tagged as naked because OS_Tick_Handler + * will never return. + * A c function would put lr on the stack before calling OS_Tick_Handler and this value + * would never been dequeued. + * + * \code + * void RTC1_IRQHandler(void) { + if(NRF_RTC1->EVENTS_COMPARE[1]) { + // never return... + OS_Tick_Handler(); + } else { + common_rtc_irq_handler(); + } + } + * \endcode + */ + __asm__ ( + "ldr r0,=0x40011144\n" + "ldr r1, [r0, #0]\n" + "cmp r1, #0\n" + "beq US_TICKER_HANDLER\n" + "bl OS_Tick_Handler\n" + "US_TICKER_HANDLER:\n" + "push {r3, lr}\n" + "bl common_rtc_irq_handler\n" + "pop {r3, pc}\n" + "nop" + ); +} + +#else + +#error Compiler not supported. +#error Provide a definition of RTC1_IRQHandler. + +/* + * Chanel 1 of RTC1 is used by RTX as a systick. + * If the compare event on channel 1 is set, then branch to OS_Tick_Handler. + * Otherwise, just execute common_rtc_irq_handler. + * This function has to be written in assembly and tagged as naked because OS_Tick_Handler + * will never return. + * A c function would put lr on the stack before calling OS_Tick_Handler and this value + * will never been dequeued. After a certain time a stack overflow will happen. + * + * \code + * void RTC1_IRQHandler(void) { + if(NRF_RTC1->EVENTS_COMPARE[1]) { + // never return... + OS_Tick_Handler(); + } else { + common_rtc_irq_handler(); + } + } + * \endcode + */ + +#endif + +/** + * Return the next number of clock cycle needed for the next tick. + * @note This function has been carrefuly optimized for a systick occuring every 1000us. + */ +static uint32_t get_next_tick_cc_delta() { + uint32_t delta = 0; + + if (os_clockrate != 1000) { + // In RTX, by default SYSTICK is is used. + // A tick event is generated every os_trv + 1 clock cycles of the system timer. + delta = os_trv + 1; + } else { + // If the clockrate is set to 1000us then 1000 tick should happen every second. + // Unfortunatelly, when clockrate is set to 1000, os_trv is equal to 31. + // If (os_trv + 1) is used as the delta value between two ticks, 1000 ticks will be + // generated in 32000 clock cycle instead of 32768 clock cycles. + // As a result, if a user schedule an OS timer to start in 100s, the timer will start + // instead after 97.656s + // The code below fix this issue, a clock rate of 1000s will generate 1000 ticks in 32768 + // clock cycles. + // The strategy is simple, for 1000 ticks: + // * 768 ticks will occur 33 clock cycles after the previous tick + // * 232 ticks will occur 32 clock cycles after the previous tick + // By default every delta is equal to 33. + // Every five ticks (20%, 200 delta in one second), the delta is equal to 32 + // The remaining (32) deltas equal to 32 are distributed using primes numbers. + static uint32_t counter = 0; + if ((counter % 5) == 0 || (counter % 31) == 0 || (counter % 139) == 0 || (counter == 503)) { + delta = 32; + } else { + delta = 33; + } + ++counter; + if (counter == 1000) { + counter = 0; + } + } + return delta; +} + +static inline void clear_tick_interrupt() { + NRF_RTC1->EVENTS_COMPARE[1] = 0; + NRF_RTC1->EVTENCLR = (1 << 17); +} + +/** + * Indicate if a value is included in a range which can be wrapped. + * @param begin start of the range + * @param end end of the range + * @param val value to check + * @return true if the value is included in the range and false otherwise. + */ +static inline bool is_in_wrapped_range(uint32_t begin, uint32_t end, uint32_t val) { + // regular case, begin < end + // return true if begin <= val < end + if (begin < end) { + if (begin <= val && val < end) { + return true; + } else { + return false; + } + } else { + // In this case end < begin because it has wrap around the limits + // return false if end < val < begin + if (end < val && val < begin) { + return false; + } else { + return true; + } + } + +} + +/** + * Register the next tick. + */ +static void register_next_tick() { + previous_tick_cc_value = NRF_RTC1->CC[1]; + uint32_t delta = get_next_tick_cc_delta(); + uint32_t new_compare_value = (previous_tick_cc_value + delta) & MAX_RTC_COUNTER_VAL; + + // Disable irq directly for few cycles, + // Validation of the new CC value against the COUNTER, + // Setting the new CC value and enabling CC IRQ should be an atomic operation + // Otherwise, there is a possibility to set an invalid CC value because + // the RTC1 keeps running. + // This code is very short 20-38 cycles in the worst case, it shouldn't + // disturb softdevice. + __disable_irq(); + uint32_t current_counter = NRF_RTC1->COUNTER; + + // If an overflow occur, set the next tick in COUNTER + delta clock cycles + if (is_in_wrapped_range(previous_tick_cc_value, new_compare_value, current_counter) == false) { + new_compare_value = current_counter + delta; + } + NRF_RTC1->CC[1] = new_compare_value; + + // set the interrupt of CC channel 1 and reenable IRQs + NRF_RTC1->INTENSET = RTC_INTENSET_COMPARE1_Msk; + __enable_irq(); +} + +/** + * Initialize alternative hardware timer as RTX kernel timer + * This function is directly called by RTX. + * @note this function shouldn't be called directly. + * @return IRQ number of the alternative hardware timer + */ +int os_tick_init (void) +{ + common_rtc_init(); + + NRF_RTC1->CC[1] = 0; + clear_tick_interrupt(); + register_next_tick(); + + return RTC1_IRQn; +} + +/** + * Acknowledge the tick interrupt. + * This function is called by the function OS_Tick_Handler of RTX. + * @note this function shouldn't be called directly. + */ +void os_tick_irqack(void) +{ + clear_tick_interrupt(); + register_next_tick(); +} + +/** + * Returns the overflow flag of the alternative hardware timer. + * @note This function is exposed by RTX kernel. + * @return 1 if the timer has overflowed and 0 otherwise. + */ +uint32_t os_tick_ovf(void) { + uint32_t current_counter = NRF_RTC1->COUNTER; + uint32_t next_tick_cc_value = NRF_RTC1->CC[1]; + + return is_in_wrapped_range(previous_tick_cc_value, next_tick_cc_value, current_counter) ? 0 : 1; +} + +/** + * Return the value of the alternative hardware timer. + * @note The documentation is not very clear about what is expected as a result, + * is it an ascending counter, a descending one ? + * None of this is specified. + * The default systick is a descending counter and this function return values in + * descending order, even if the internal counter used is an ascending one. + * @return the value of the alternative hardware timer. + */ +uint32_t os_tick_val(void) { + uint32_t current_counter = NRF_RTC1->COUNTER; + uint32_t next_tick_cc_value = NRF_RTC1->CC[1]; + + // do not use os_tick_ovf because its counter value can be different + if(is_in_wrapped_range(previous_tick_cc_value, next_tick_cc_value, current_counter)) { + if (next_tick_cc_value > previous_tick_cc_value) { + return next_tick_cc_value - current_counter; + } else if(current_counter <= next_tick_cc_value) { + return next_tick_cc_value - current_counter; + } else { + return next_tick_cc_value + (MAX_RTC_COUNTER_VAL - current_counter); + } + } else { + // use (os_trv + 1) has the base step, can be totally inacurate ... + uint32_t clock_cycles_by_tick = os_trv + 1; + + // if current counter has wrap arround, add the limit to it. + if (current_counter < next_tick_cc_value) { + current_counter = current_counter + MAX_RTC_COUNTER_VAL; + } + + return clock_cycles_by_tick - ((current_counter - next_tick_cc_value) % clock_cycles_by_tick); + } + + return 0; +} + +#endif // defined(TARGET_MCU_NRF51822) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/rtc_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/rtc_api.c index 4792335375..cf37709ee3 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/rtc_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/rtc_api.c @@ -17,7 +17,7 @@ #if DEVICE_RTC -#include "rtc_common.h" +#include "common_rtc.h" #include "nrf_drv_clock.h" #include "app_util_platform.h" @@ -25,7 +25,7 @@ static time_t m_time_base; void rtc_init(void) { - rtc_common_init(); + common_rtc_init(); } void rtc_free(void) @@ -37,16 +37,16 @@ void rtc_free(void) int rtc_isenabled(void) { - return m_rtc_common_enabled; + return m_common_rtc_enabled; } static uint32_t rtc_seconds_get(void) { // Convert current counter value to seconds. - uint32_t seconds = nrf_drv_rtc_counter_get(&m_rtc_common) / RTC_INPUT_FREQ; + uint32_t seconds = nrf_rtc_counter_get(COMMON_RTC_INSTANCE) / RTC_INPUT_FREQ; // Add proper amount of seconds for each registered overflow of the counter. - uint32_t seconds_per_overflow = (1 << RTC_COUNTER_BITS) / RTC_INPUT_FREQ; - return (seconds + (m_rtc_common_overflows * seconds_per_overflow)); + uint32_t seconds_per_overflow = (1uL << RTC_COUNTER_BITS) / RTC_INPUT_FREQ; + return (seconds + (m_common_rtc_overflows * seconds_per_overflow)); } time_t rtc_read(void) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/rtc/nrf_drv_rtc.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/rtc/nrf_drv_rtc.c deleted file mode 100644 index 0af7ad3204..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/rtc/nrf_drv_rtc.c +++ /dev/null @@ -1,290 +0,0 @@ -/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -#include "nrf_drv_rtc.h" -#include "nrf_rtc.h" -#include "nrf_assert.h" -#include "app_util_platform.h" - -/**@brief RTC driver instance control block structure. */ -typedef struct -{ - nrf_drv_state_t state; /**< Instance state. */ - bool reliable; /**< Reliable mode flag. */ - uint8_t tick_latency; /**< Maximum length of interrupt handler in ticks (max 7.7 ms). */ -} nrf_drv_rtc_cb_t; - -// User callbacks local storage. -static nrf_drv_rtc_handler_t m_handlers[RTC_COUNT]; -static nrf_drv_rtc_cb_t m_cb[RTC_COUNT]; - -static const nrf_drv_rtc_config_t m_default_config[] = { -#if RTC0_ENABLED - NRF_DRV_RTC_DEFAULT_CONFIG(0), -#endif -#if RTC1_ENABLED - NRF_DRV_RTC_DEFAULT_CONFIG(1), -#endif -#if RTC2_ENABLED - NRF_DRV_RTC_DEFAULT_CONFIG(2) -#endif -}; - -ret_code_t nrf_drv_rtc_init(nrf_drv_rtc_t const * const p_instance, - nrf_drv_rtc_config_t const * p_config, - nrf_drv_rtc_handler_t handler) -{ - if (handler) - { - m_handlers[p_instance->instance_id] = handler; - } - else - { - return NRF_ERROR_INVALID_PARAM; - } - - if (p_config == NULL) - { - p_config = &m_default_config[p_instance->instance_id]; - } - - if (m_cb[p_instance->instance_id].state != NRF_DRV_STATE_UNINITIALIZED) - { - return NRF_ERROR_INVALID_STATE; - } - - nrf_drv_common_irq_enable(p_instance->irq, p_config->interrupt_priority); - nrf_rtc_prescaler_set(p_instance->p_reg, p_config->prescaler); - m_cb[p_instance->instance_id].reliable = p_config->reliable; - m_cb[p_instance->instance_id].tick_latency = p_config->tick_latency; - m_cb[p_instance->instance_id].state = NRF_DRV_STATE_INITIALIZED; - - return NRF_SUCCESS; -} - -void nrf_drv_rtc_uninit(nrf_drv_rtc_t const * const p_instance) -{ - uint32_t mask = NRF_RTC_INT_TICK_MASK | - NRF_RTC_INT_OVERFLOW_MASK | - NRF_RTC_INT_COMPARE0_MASK | - NRF_RTC_INT_COMPARE1_MASK | - NRF_RTC_INT_COMPARE2_MASK | - NRF_RTC_INT_COMPARE3_MASK; - ASSERT(m_cb[p_instance->instance_id].state != NRF_DRV_STATE_UNINITIALIZED); - - nrf_drv_common_irq_disable(p_instance->irq); - - nrf_rtc_task_trigger(p_instance->p_reg, NRF_RTC_TASK_STOP); - nrf_rtc_event_disable(p_instance->p_reg, mask); - nrf_rtc_int_disable(p_instance->p_reg, mask); - - m_cb[p_instance->instance_id].state = NRF_DRV_STATE_UNINITIALIZED; -} - -void nrf_drv_rtc_enable(nrf_drv_rtc_t const * const p_instance) -{ - ASSERT(m_cb[p_instance->instance_id].state == NRF_DRV_STATE_INITIALIZED); - - nrf_rtc_task_trigger(p_instance->p_reg, NRF_RTC_TASK_START); - m_cb[p_instance->instance_id].state = NRF_DRV_STATE_POWERED_ON; -} - -void nrf_drv_rtc_disable(nrf_drv_rtc_t const * const p_instance) -{ - ASSERT(m_cb[p_instance->instance_id].state == NRF_DRV_STATE_POWERED_ON); - - nrf_rtc_task_trigger(p_instance->p_reg, NRF_RTC_TASK_STOP); - m_cb[p_instance->instance_id].state = NRF_DRV_STATE_INITIALIZED; -} - -ret_code_t nrf_drv_rtc_cc_disable(nrf_drv_rtc_t const * const p_instance, uint32_t channel) -{ - ASSERT(m_cb[p_instance->instance_id].state != NRF_DRV_STATE_UNINITIALIZED); - ASSERT(channelcc_channel_count); - - uint32_t int_mask = RTC_CHANNEL_INT_MASK(channel); - nrf_rtc_event_t event = RTC_CHANNEL_EVENT_ADDR(channel); - - nrf_rtc_event_disable(p_instance->p_reg,int_mask); - if (nrf_rtc_int_is_enabled(p_instance->p_reg,int_mask)) - { - nrf_rtc_int_disable(p_instance->p_reg,int_mask); - if (nrf_rtc_event_pending(p_instance->p_reg,event)) - { - nrf_rtc_event_clear(p_instance->p_reg,event); - return NRF_ERROR_TIMEOUT; - } - } - return NRF_SUCCESS; -} - -ret_code_t nrf_drv_rtc_cc_set(nrf_drv_rtc_t const * const p_instance, - uint32_t channel, - uint32_t val, - bool enable_irq) -{ - ASSERT(m_cb[p_instance->instance_id].state != NRF_DRV_STATE_UNINITIALIZED); - ASSERT(channelcc_channel_count); - - uint32_t int_mask = RTC_CHANNEL_INT_MASK(channel); - nrf_rtc_event_t event = RTC_CHANNEL_EVENT_ADDR(channel); - - nrf_rtc_event_disable(p_instance->p_reg, int_mask); - nrf_rtc_int_disable(p_instance->p_reg, int_mask); - - val = RTC_WRAP(val); - if (m_cb[p_instance->instance_id].reliable) - { - nrf_rtc_cc_set(p_instance->p_reg,channel,val); - uint32_t cnt = nrf_rtc_counter_get(p_instance->p_reg); - int32_t diff = cnt - val; - if (cnt < val) - { - diff += RTC_COUNTER_COUNTER_Msk; - } - if (diff < m_cb[p_instance->instance_id].tick_latency) - { - return NRF_ERROR_TIMEOUT; - } - } - else - { - nrf_rtc_cc_set(p_instance->p_reg,channel,val); - } - - if (enable_irq) - { - nrf_rtc_event_clear(p_instance->p_reg,event); - nrf_rtc_int_enable(p_instance->p_reg, int_mask); - } - nrf_rtc_event_enable(p_instance->p_reg,int_mask); - - return NRF_SUCCESS; -} - -void nrf_drv_rtc_tick_enable(nrf_drv_rtc_t const * const p_instance, bool enable_irq) -{ - nrf_rtc_event_t event = NRF_RTC_EVENT_TICK; - uint32_t mask = NRF_RTC_INT_TICK_MASK; - - nrf_rtc_event_clear(p_instance->p_reg, event); - nrf_rtc_event_enable(p_instance->p_reg, mask); - if (enable_irq) - { - nrf_rtc_int_enable(p_instance->p_reg, mask); - } -} - -void nrf_drv_rtc_tick_disable(nrf_drv_rtc_t const * const p_instance) -{ - uint32_t mask = NRF_RTC_INT_TICK_MASK; - - nrf_rtc_event_disable(p_instance->p_reg, mask); - nrf_rtc_int_disable(p_instance->p_reg, mask); -} - -void nrf_drv_rtc_overflow_enable(nrf_drv_rtc_t const * const p_instance, bool enable_irq) -{ - nrf_rtc_event_t event = NRF_RTC_EVENT_OVERFLOW; - uint32_t mask = NRF_RTC_INT_OVERFLOW_MASK; - - nrf_rtc_event_clear(p_instance->p_reg, event); - nrf_rtc_event_enable(p_instance->p_reg, mask); - if (enable_irq) - { - nrf_rtc_int_enable(p_instance->p_reg, mask); - } -} -void nrf_drv_rtc_overflow_disable(nrf_drv_rtc_t const * const p_instance) -{ - uint32_t mask = NRF_RTC_INT_OVERFLOW_MASK; - nrf_rtc_event_disable(p_instance->p_reg, mask); - nrf_rtc_int_disable(p_instance->p_reg, mask); -} - -uint32_t nrf_drv_rtc_max_ticks_get(nrf_drv_rtc_t const * const p_instance) -{ - ASSERT(m_cb[p_instance->instance_id].reliable); - uint32_t ticks; - if (m_cb[p_instance->instance_id].reliable) - { - ticks = RTC_COUNTER_COUNTER_Msk - m_cb[p_instance->instance_id].tick_latency; - } - else - { - ticks = RTC_COUNTER_COUNTER_Msk; - } - return ticks; -} - -/**@brief Generic function for handling RTC interrupt - * - * @param[in] p_reg Pointer to instance register structure. - * @param[in] instance_id Index of instance. - */ -__STATIC_INLINE void nrf_drv_rtc_int_handler(NRF_RTC_Type * p_reg, - uint32_t instance_id, - uint32_t channel_count) -{ - uint32_t i; - uint32_t int_mask = (uint32_t)NRF_RTC_INT_COMPARE0_MASK; - nrf_rtc_event_t event = NRF_RTC_EVENT_COMPARE_0; - - for (i = 0; i < channel_count; i++) - { - if (nrf_rtc_int_is_enabled(p_reg,int_mask) && nrf_rtc_event_pending(p_reg,event)) - { - nrf_rtc_event_disable(p_reg,int_mask); - nrf_rtc_int_disable(p_reg,int_mask); - nrf_rtc_event_clear(p_reg,event); - m_handlers[instance_id]((nrf_drv_rtc_int_type_t)i); - } - int_mask <<= 1; - event = (nrf_rtc_event_t)((uint32_t)event + sizeof(uint32_t)); - } - event = NRF_RTC_EVENT_TICK; - if (nrf_rtc_int_is_enabled(p_reg,NRF_RTC_INT_TICK_MASK) && - nrf_rtc_event_pending(p_reg, event)) - { - nrf_rtc_event_clear(p_reg, event); - m_handlers[instance_id](NRF_DRV_RTC_INT_TICK); - } - - event = NRF_RTC_EVENT_OVERFLOW; - if (nrf_rtc_int_is_enabled(p_reg,NRF_RTC_INT_OVERFLOW_MASK) && - nrf_rtc_event_pending(p_reg, event)) - { - nrf_rtc_event_clear(p_reg,event); - m_handlers[instance_id](NRF_DRV_RTC_INT_OVERFLOW); - } -} - -#if RTC0_ENABLED -void RTC0_IRQHandler(void) -{ - nrf_drv_rtc_int_handler(NRF_RTC0,RTC0_INSTANCE_INDEX, NRF_RTC_CC_CHANNEL_COUNT(0)); -} -#endif - -#if RTC1_ENABLED -void RTC1_IRQHandler(void) -{ - nrf_drv_rtc_int_handler(NRF_RTC1,RTC1_INSTANCE_INDEX, NRF_RTC_CC_CHANNEL_COUNT(1)); -} -#endif - -#if RTC2_ENABLED -void RTC2_IRQHandler(void) -{ - nrf_drv_rtc_int_handler(NRF_RTC2,RTC2_INSTANCE_INDEX, NRF_RTC_CC_CHANNEL_COUNT(2)); -} -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/rtc/nrf_drv_rtc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/rtc/nrf_drv_rtc.h deleted file mode 100644 index c7148c89c6..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/rtc/nrf_drv_rtc.h +++ /dev/null @@ -1,325 +0,0 @@ -/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. - * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. - * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. - * - */ - -#ifndef NRF_DRV_RTC_H -#define NRF_DRV_RTC_H - - -#include "nordic_common.h" -#include "nrf_drv_config.h" -#include "nrf_drv_common.h" -#include "nrf_rtc.h" -#include "sdk_errors.h" - -/** - * @addtogroup nrf_rtc RTC HAL and driver - * @ingroup nrf_drivers - * @brief Real timer counter (RTC) APIs. - * @details The RTC HAL provides basic APIs for accessing the registers of the real time counter (RTC). - * The RTC driver provides APIs on a higher level. - * - * @defgroup nrf_drv_rtc RTC driver - * @{ - * @ingroup nrf_rtc - * @brief Real timer counter (RTC) driver. - */ - -/**@brief Macro to convert microseconds into ticks. */ -#define RTC_US_TO_TICKS(us,freq) ((us*freq)/1000000) - -/** - * @enum nrf_drv_rtc_int_type_t - * @brief RTC driver interrupt types. - */ -typedef enum -{ - NRF_DRV_RTC_INT_COMPARE0 = 0, /**< Interrupt from COMPARE0 event. */ - NRF_DRV_RTC_INT_COMPARE1 = 1, /**< Interrupt from COMPARE1 event. */ - NRF_DRV_RTC_INT_COMPARE2 = 2, /**< Interrupt from COMPARE2 event. */ - NRF_DRV_RTC_INT_COMPARE3 = 3, /**< Interrupt from COMPARE3 event. */ - NRF_DRV_RTC_INT_TICK = 4, /**< Interrupt from TICK event. */ - NRF_DRV_RTC_INT_OVERFLOW = 5 /**< Interrupt from OVERFLOW event. */ -} nrf_drv_rtc_int_type_t; - -/**@brief RTC driver instance structure. */ -typedef struct -{ - NRF_RTC_Type * p_reg; /**< Pointer to instance register set. */ - IRQn_Type irq; /**< Instance IRQ ID. */ - uint8_t instance_id; /**< Instance index. */ - uint8_t cc_channel_count; /**< Number of capture/compare channels. */ -} nrf_drv_rtc_t; - -/**@brief Macro for creating RTC driver instance.*/ -#define NRF_DRV_RTC_INSTANCE(id) \ -{ \ - .p_reg = CONCAT_2(NRF_RTC, id), \ - .irq = CONCAT_3(RTC, id, _IRQn), \ - .instance_id = CONCAT_3(RTC, id, _INSTANCE_INDEX),\ - .cc_channel_count = NRF_RTC_CC_CHANNEL_COUNT(id), \ -} - -/**@brief RTC driver instance configuration structure. */ -typedef struct -{ - uint16_t prescaler; /**< Prescaler. */ - uint8_t interrupt_priority; /**< Interrupt priority. */ - uint8_t tick_latency; /**< Maximum length of interrupt handler in ticks (max 7.7 ms). */ - bool reliable; /**< Reliable mode flag. */ -} nrf_drv_rtc_config_t; - -/**@brief RTC instance default configuration. */ -#define NRF_DRV_RTC_DEFAULT_CONFIG(id) \ -{ \ - .prescaler = (uint16_t)(RTC_INPUT_FREQ / CONCAT_3(RTC, id, _CONFIG_FREQUENCY))-1, \ - .interrupt_priority = CONCAT_3(RTC, id, _CONFIG_IRQ_PRIORITY), \ - .reliable = CONCAT_3(RTC, id, _CONFIG_RELIABLE), \ - .tick_latency = RTC_US_TO_TICKS(NRF_MAXIMUM_LATENCY_US, CONCAT_3(RTC, id, _CONFIG_FREQUENCY)), \ -} - -/**@brief RTC driver instance handler type. */ -typedef void (*nrf_drv_rtc_handler_t)(nrf_drv_rtc_int_type_t int_type); - -/**@brief Function for initializing the RTC driver instance. - * - * After initialization, the instance is in power off state. - * - * @param[in] p_instance Pointer to the instance. - * @param[in] p_config Initial configuration. Default configuration used if NULL. - * @param[in] handler User's event handler. - * - * @retval NRF_SUCCESS If successfully initialized. - * @retval NRF_ERROR_INVALID_PARAM If no handler was provided. - * @retval NRF_ERROR_INVALID_STATE If the instance is already initialized. - */ -ret_code_t nrf_drv_rtc_init(nrf_drv_rtc_t const * const p_instance, - nrf_drv_rtc_config_t const * p_config, - nrf_drv_rtc_handler_t handler); - -/**@brief Function for uninitializing the RTC driver instance. - * - * After uninitialization, the instance is in idle state. The hardware should return to the state - * before initialization. The function asserts if the instance is in idle state. - * - * @param[in] p_instance Pointer to the instance. - */ -void nrf_drv_rtc_uninit(nrf_drv_rtc_t const * const p_instance); - -/**@brief Function for enabling the RTC driver instance. - * - * @note Function asserts if instance is enabled. - * - * @param[in] p_instance Pointer to the instance. - */ -void nrf_drv_rtc_enable(nrf_drv_rtc_t const * const p_instance); - -/**@brief Function for disabling the RTC driver instance. - * - * @note Function asserts if instance is disabled. - * - * @param[in] p_instance Pointer to instance. - */ -void nrf_drv_rtc_disable(nrf_drv_rtc_t const * const p_instance); - -/**@brief Function for setting a compare channel. - * - * The function asserts if the instance is not initialized or if the channel parameter is - * wrong. The function powers on the instance if the instance was in power off state. - * - * The driver is not entering a critical section when configuring RTC, which means that it can be - * preempted for a certain amount of time. When the driver was preempted and the value to be set - * is short in time, there is a risk that the driver sets a compare value that is - * behind. If RTCn_CONFIG_RELIABLE is 1 for the given instance, the Reliable mode handles that case. - * However, to detect if the requested value is behind, this mode makes the following assumptions: - * - The maximum preemption time in ticks (8-bit value) is known and is less than 7.7 ms - * (for prescaler = 0, RTC frequency 32 kHz). - * - The requested absolute compare value is not bigger than (0x00FFFFFF)-tick_latency. It is - * the user's responsibility to ensure that. - * - * @param[in] p_instance Pointer to the instance. - * @param[in] channel One of the instance's channels. - * @param[in] val Absolute value to be set in the compare register. - * @param[in] enable_irq True to enable the interrupt. False to disable the interrupt. - * - * @retval NRF_SUCCESS If the procedure was successful. - * @retval NRF_ERROR_TIMEOUT If the compare was not set because the request value is behind the current counter - * value. This error can only be reported if RTCn_CONFIG_RELIABLE = 1. - */ -ret_code_t nrf_drv_rtc_cc_set(nrf_drv_rtc_t const * const p_instance, - uint32_t channel, - uint32_t val, - bool enable_irq); - -/**@brief Function for disabling a channel. - * - * This function disables channel events and channel interrupts. The function asserts if the instance is not - * initialized or if the channel parameter is wrong. - * - * @param[in] p_instance Pointer to the instance. - * @param[in] channel One of the instance's channels. - * - * @retval NRF_SUCCESS If the procedure was successful. - * @retval NRF_ERROR_TIMEOUT If an interrupt was pending on the requested channel. - */ -ret_code_t nrf_drv_rtc_cc_disable(nrf_drv_rtc_t const * const p_instance, uint32_t channel); - -/**@brief Function for enabling tick. - * - * This function enables the tick event and optionally the interrupt. The function asserts if the instance is not - * powered on. - * - * @param[in] p_instance Pointer to the instance. - * @param[in] enable_irq True to enable the interrupt. False to disable the interrupt. - */ -void nrf_drv_rtc_tick_enable(nrf_drv_rtc_t const * const p_instance, bool enable_irq); - -/**@brief Function for disabling tick. - * - * This function disables the tick event and interrupt. - * - * @param[in] p_instance Pointer to the instance. - */ -void nrf_drv_rtc_tick_disable(nrf_drv_rtc_t const * const p_instance); - -/**@brief Function for enabling overflow. - * - * This function enables the overflow event and optionally the interrupt. The function asserts if the instance is - * not powered on. - * - * @param[in] p_instance Pointer to the instance. - * @param[in] enable_irq True to enable the interrupt. False to disable the interrupt. - */ -void nrf_drv_rtc_overflow_enable(nrf_drv_rtc_t const * const p_instance, bool enable_irq); - -/**@brief Function for disabling overflow. - * - * This function disables the overflow event and interrupt. - * - * @param[in] p_instance Pointer to the instance. - */ -void nrf_drv_rtc_overflow_disable(nrf_drv_rtc_t const * const p_instance); - -/**@brief Function for getting the maximum relative ticks value that can be set in the compare channel. - * - * When a SoftDevice is used, it occupies the highest level interrupt, so that the application code can be - * interrupted at any moment for a certain period of time. If Reliable mode is enabled, the provided - * maximum latency is taken into account and the return value is smaller than the RTC counter - * resolution. If Reliable mode is disabled, the return value equals the counter resolution. - * - * @param[in] p_instance Pointer to the instance. - * - * @retval ticks Maximum ticks value. - */ -uint32_t nrf_drv_rtc_max_ticks_get(nrf_drv_rtc_t const * const p_instance); - -/**@brief Function for disabling all instance interrupts. - * - * @param[in] p_instance Pointer to the instance. - * @param[in] p_mask Pointer to the location where the mask is filled. - */ -__STATIC_INLINE void nrf_drv_rtc_int_disable(nrf_drv_rtc_t const * const p_instance, - uint32_t * p_mask); - -/**@brief Function for enabling instance interrupts. - * - * @param[in] p_instance Pointer to the instance. - * @param[in] mask Mask of interrupts to enable. - */ -__STATIC_INLINE void nrf_drv_rtc_int_enable(nrf_drv_rtc_t const * const p_instance, uint32_t mask); - -/**@brief Function for retrieving the current counter value. - * - * This function asserts if the instance is not powered on or if p_val is NULL. - * - * @param[in] p_instance Pointer to the instance. - * - * @retval value Counter value. - */ -__STATIC_INLINE uint32_t nrf_drv_rtc_counter_get(nrf_drv_rtc_t const * const p_instance); - -/**@brief Function for clearing the counter value. - * - * This function asserts if the instance is not powered on. - * - * @param[in] p_instance Pointer to the instance. - */ -__STATIC_INLINE void nrf_drv_rtc_counter_clear(nrf_drv_rtc_t const * const p_instance); - -/**@brief Function for returning a requested task address for the RTC driver instance. - * - * This function asserts if the output pointer is NULL. The task address can be used by the PPI module. - * - * @param[in] p_instance Pointer to the instance. - * @param[in] task One of the peripheral tasks. - * - * @retval Address of task register. - */ -__STATIC_INLINE uint32_t nrf_drv_rtc_task_address_get(nrf_drv_rtc_t const * const p_instance, - nrf_rtc_task_t task); - -/**@brief Function for returning a requested event address for the RTC driver instance. - * - * This function asserts if the output pointer is NULL. The event address can be used by the PPI module. - * - * @param[in] p_instance Pointer to the instance. - * @param[in] event One of the peripheral events. - * - * @retval Address of event register. - */ -__STATIC_INLINE uint32_t nrf_drv_rtc_event_address_get(nrf_drv_rtc_t const * const p_instance, - nrf_rtc_event_t event); -#ifndef SUPPRESS_INLINE_IMPLEMENTATION - -__STATIC_INLINE void nrf_drv_rtc_int_disable(nrf_drv_rtc_t const * const p_instance, - uint32_t * p_mask) -{ - *p_mask = nrf_rtc_int_get(p_instance->p_reg); - nrf_rtc_int_disable(p_instance->p_reg, NRF_RTC_INT_TICK_MASK | - NRF_RTC_INT_OVERFLOW_MASK | - NRF_RTC_INT_COMPARE0_MASK | - NRF_RTC_INT_COMPARE1_MASK | - NRF_RTC_INT_COMPARE2_MASK | - NRF_RTC_INT_COMPARE3_MASK); -} - -__STATIC_INLINE void nrf_drv_rtc_int_enable(nrf_drv_rtc_t const * const p_instance, uint32_t mask) -{ - nrf_rtc_int_enable(p_instance->p_reg, mask); -} - -__STATIC_INLINE uint32_t nrf_drv_rtc_counter_get(nrf_drv_rtc_t const * const p_instance) -{ - return nrf_rtc_counter_get(p_instance->p_reg); -} - -__STATIC_INLINE void nrf_drv_rtc_counter_clear(nrf_drv_rtc_t const * const p_instance) -{ - nrf_rtc_task_trigger(p_instance->p_reg,NRF_RTC_TASK_CLEAR); -} - -__STATIC_INLINE uint32_t nrf_drv_rtc_task_address_get(nrf_drv_rtc_t const * const p_instance, - nrf_rtc_task_t task) -{ - return nrf_rtc_task_address_get(p_instance->p_reg, task); -} - -__STATIC_INLINE uint32_t nrf_drv_rtc_event_address_get(nrf_drv_rtc_t const * const p_instance, - nrf_rtc_event_t event) -{ - return nrf_rtc_event_address_get(p_instance->p_reg, event); -} -#endif /* SUPPRESS_INLINE_IMPLEMENTATION */ - -/** - *@} - **/ -#endif /* NRF_DRV_RTC_H */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c index b35670ceae..5b9050bb71 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c @@ -14,63 +14,95 @@ * limitations under the License. */ #include "us_ticker_api.h" -#include "rtc_common.h" +#include "common_rtc.h" #include "app_util.h" //------------------------------------------------------------------------------ -// Common stuff used also by lp_ticker and rtc_api (see "rtc_common.h"). +// Common stuff used also by lp_ticker and rtc_api (see "common_rtc.h"). // #include "nrf_drv_clock.h" #include "app_util_platform.h" -nrf_drv_rtc_t const m_rtc_common = NRF_DRV_RTC_INSTANCE(1); -bool m_rtc_common_enabled = false; -uint32_t volatile m_rtc_common_overflows = 0; +bool m_common_rtc_enabled = false; +uint32_t volatile m_common_rtc_overflows = 0; -static void irq_handler(nrf_drv_rtc_int_type_t int_type) +#if defined(TARGET_MCU_NRF51822) +void common_rtc_irq_handler(void) +#else +void RTC1_IRQHandler(void) +#endif { - if (int_type == (NRF_DRV_RTC_INT_COMPARE0 + US_TICKER_CC_CHANNEL)) { + nrf_rtc_event_t event; + uint32_t int_mask; + + event = NRF_RTC_EVENT_COMPARE_0; + int_mask = NRF_RTC_INT_COMPARE0_MASK; + if (nrf_rtc_event_pending(COMMON_RTC_INSTANCE, event)) + { + nrf_rtc_event_clear(COMMON_RTC_INSTANCE, event); + nrf_rtc_event_disable(COMMON_RTC_INSTANCE, int_mask); us_ticker_irq_handler(); } - else if (int_type == NRF_DRV_RTC_INT_OVERFLOW) { - ++m_rtc_common_overflows; + +#if DEVICE_LOWPOWERTIMER + event = NRF_RTC_EVENT_COMPARE_2; + int_mask = NRF_RTC_INT_COMPARE2_MASK; + if (nrf_rtc_event_pending(COMMON_RTC_INSTANCE, event)) + { + nrf_rtc_event_clear(COMMON_RTC_INSTANCE, event); + nrf_rtc_event_disable(COMMON_RTC_INSTANCE, int_mask); + } +#endif + + event = NRF_RTC_EVENT_OVERFLOW; + if (nrf_rtc_event_pending(COMMON_RTC_INSTANCE, event)) + { + nrf_rtc_event_clear(COMMON_RTC_INSTANCE, event); + ++m_common_rtc_overflows; } } -void rtc_common_init(void) +void common_rtc_init(void) { - if (m_rtc_common_enabled) { + if (m_common_rtc_enabled) { return; } - (void)nrf_drv_clock_init(); // RTC is driven by the low frequency (32.768 kHz) clock, a proper request // must be made to have it running. - nrf_drv_clock_lfclk_request(NULL); + // Currently this clock is started in 'SystemInit' (see "system_nrf51.c" + // or "system_nrf52.c", respectively). - nrf_drv_rtc_config_t const config = { - .prescaler = 0, // no prescaling - .interrupt_priority = APP_IRQ_PRIORITY_LOW, - .reliable = false - }; - if (nrf_drv_rtc_init(&m_rtc_common, &config, irq_handler) != NRF_SUCCESS) { - MBED_ASSERT(false); // initialization failed - return; - } - nrf_drv_rtc_overflow_enable(&m_rtc_common, true); + nrf_rtc_prescaler_set(COMMON_RTC_INSTANCE, 0); - nrf_drv_rtc_enable(&m_rtc_common); - m_rtc_common_enabled = true; + nrf_rtc_event_clear(COMMON_RTC_INSTANCE, NRF_RTC_EVENT_OVERFLOW); + nrf_rtc_event_enable(COMMON_RTC_INSTANCE, NRF_RTC_INT_OVERFLOW_MASK); + nrf_rtc_int_enable(COMMON_RTC_INSTANCE, + NRF_RTC_INT_COMPARE0_MASK | + #if defined(TARGET_MCU_NRF51822) + NRF_RTC_INT_COMPARE1_MASK | + #endif + #if DEVICE_LOWPOWERTIMER + NRF_RTC_INT_COMPARE2_MASK | + #endif + NRF_RTC_INT_OVERFLOW_MASK); + + nrf_drv_common_irq_enable(nrf_drv_get_IRQn(COMMON_RTC_INSTANCE), + APP_IRQ_PRIORITY_LOW); + + nrf_rtc_task_trigger(COMMON_RTC_INSTANCE, NRF_RTC_TASK_START); + + m_common_rtc_enabled = true; } -uint32_t rtc_common_32bit_ticks_get(void) +uint32_t common_rtc_32bit_ticks_get(void) { - uint32_t ticks = nrf_drv_rtc_counter_get(&m_rtc_common); + uint32_t ticks = nrf_rtc_counter_get(COMMON_RTC_INSTANCE); // The counter used for time measurements is less than 32 bit wide, // so its value is complemented with the number of registered overflows // of the counter. - ticks += (m_rtc_common_overflows << RTC_COUNTER_BITS); + ticks += (m_common_rtc_overflows << RTC_COUNTER_BITS); return ticks; } //------------------------------------------------------------------------------ @@ -78,12 +110,12 @@ uint32_t rtc_common_32bit_ticks_get(void) void us_ticker_init(void) { - rtc_common_init(); + common_rtc_init(); } static uint64_t us_ticker_64bit_get(void) { - uint32_t ticks = rtc_common_32bit_ticks_get(); + uint32_t ticks = common_rtc_32bit_ticks_get(); // [ticks -> microseconds] return ROUNDED_DIV(((uint64_t)ticks) * 1000000, RTC_INPUT_FREQ); } @@ -122,24 +154,24 @@ void us_ticker_set_interrupt(timestamp_t timestamp) // difference between the compare value to be set and the current counter // value is 2 ticks. This guarantees that the compare trigger is properly // setup before the compare condition occurs. - uint32_t closest_safe_compare = rtc_common_32bit_ticks_get() + 2; + uint32_t closest_safe_compare = common_rtc_32bit_ticks_get() + 2; if ((int)(compare_value - closest_safe_compare) <= 0) { compare_value = closest_safe_compare; } - ret_code_t result = nrf_drv_rtc_cc_set(&m_rtc_common, US_TICKER_CC_CHANNEL, - compare_value, true); - if (result != NRF_SUCCESS) { - MBED_ASSERT(false); - } + + nrf_rtc_cc_set(COMMON_RTC_INSTANCE, US_TICKER_CC_CHANNEL, + RTC_WRAP(compare_value)); + nrf_rtc_event_clear(COMMON_RTC_INSTANCE, NRF_RTC_EVENT_COMPARE_0); + nrf_rtc_event_enable(COMMON_RTC_INSTANCE, NRF_RTC_INT_COMPARE0_MASK); } void us_ticker_disable_interrupt(void) { - nrf_drv_rtc_cc_disable(&m_rtc_common, US_TICKER_CC_CHANNEL); + nrf_rtc_event_disable(COMMON_RTC_INSTANCE, NRF_RTC_INT_COMPARE0_MASK); } void us_ticker_clear_interrupt(void) { - // No implementation needed. Interrupt flags are cleared by IRQ handler - // in 'nrf_drv_rtc'. + // No implementation needed. The event that triggers the interrupt is + // cleared in 'common_rtc_irq_handler'. } From 3bdbccb5c0ae0a09c03d499e66ce76134fc9f5cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C5=82=C4=85bek=2C=20Andrzej?= Date: Thu, 23 Jun 2016 17:35:19 +0200 Subject: [PATCH 28/67] Corrected serial_api implementation, so 'serial_putc' no longer requires enabled interrupts. --- .../TARGET_NORDIC/TARGET_NRF5/serial_api.c | 44 +++++++++++++------ 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/serial_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/serial_api.c index 311a46f1b3..a0501dbfec 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/serial_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/serial_api.c @@ -21,6 +21,8 @@ #include "app_util_platform.h" #include "nrf_gpio.h" +#if DEVICE_SERIAL + #if DEVICE_SERIAL_ASYNCH #define SERIAL_S(obj) (&obj->serial) #else @@ -211,8 +213,10 @@ void serial_init(serial_t *obj, PinName tx, PinName rx) UART_CB.initialized = true; nrf_drv_uart_rx_enable(); - stdio_uart_inited = 1; - memcpy(&stdio_uart, obj, sizeof(serial_t)); + if (tx == STDIO_UART_TX && rx == STDIO_UART_RX) { + stdio_uart_inited = 1; + memcpy(&stdio_uart, obj, sizeof(serial_t)); + } } else { error("UART init failure."); @@ -225,6 +229,8 @@ void serial_free(serial_t *obj) if (UART_CB.initialized) { nrf_drv_uart_uninit(); UART_CB.initialized = false; + + stdio_uart_inited = 0; } } @@ -240,32 +246,40 @@ int serial_writable(serial_t *obj) int serial_readable(serial_t *obj) { (void)obj; - return nrf_uart_event_check(UART_INSTANCE, NRF_UART_EVENT_RXDRDY); + return (!UART_CB.rx_active && + nrf_uart_event_check(UART_INSTANCE, NRF_UART_EVENT_RXDRDY)); } void serial_putc(serial_t *obj, int c) { (void)obj; - UART_CB.async_mode = false; - UART_CB.tx_active = true; - uint8_t data = c; - nrf_drv_uart_tx(&data, 1); - while (UART_CB.tx_active) { + // Interrupt on the TXDRDY event must be temporarily disabled, otherwise + // the driver would try to handle (and clear) this event in the interrupt + // handler. + nrf_uart_int_disable(UART_INSTANCE, NRF_UART_INT_MASK_TXDRDY); + + nrf_uart_task_trigger(UART_INSTANCE, NRF_UART_TASK_STARTTX); + nrf_uart_txd_set(UART_INSTANCE, (uint8_t)c); + while (!nrf_uart_event_check(UART_INSTANCE, NRF_UART_EVENT_TXDRDY)) { } + nrf_uart_task_trigger(UART_INSTANCE, NRF_UART_TASK_STOPTX); + + nrf_uart_event_clear(UART_INSTANCE, NRF_UART_EVENT_TXDRDY); + nrf_uart_int_enable(UART_INSTANCE, NRF_UART_INT_MASK_TXDRDY); } int serial_getc(serial_t *obj) { (void)obj; - UART_CB.async_mode = false; - UART_CB.rx_active = true; - uint8_t data; - nrf_drv_uart_rx(&data, 1); - while (UART_CB.rx_active) { + nrf_uart_task_trigger(UART_INSTANCE, NRF_UART_TASK_STARTRX); + while (!nrf_uart_event_check(UART_INSTANCE, NRF_UART_EVENT_RXDRDY)) { } - return (int)data; + nrf_uart_task_trigger(UART_INSTANCE, NRF_UART_TASK_STOPRX); + nrf_uart_event_clear(UART_INSTANCE, NRF_UART_EVENT_RXDRDY); + + return nrf_uart_rxd_get(UART_INSTANCE); } void serial_irq_handler(serial_t *obj, uart_irq_handler handler, uint32_t id) @@ -467,3 +481,5 @@ void serial_clear(serial_t *obj) { (void)obj; } + +#endif // DEVICE_SERIAL From ba863f4e3da5d82c182528983749f3c171fe80f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C5=82=C4=85bek=2C=20Andrzej?= Date: Fri, 24 Jun 2016 09:02:29 +0200 Subject: [PATCH 29/67] Enabled I2C_ASYNCH. --- hal/targets.json | 4 ++-- hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/i2c_api.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hal/targets.json b/hal/targets.json index dafc4788fc..5d6e036bdf 100644 --- a/hal/targets.json +++ b/hal/targets.json @@ -1375,7 +1375,7 @@ "supported_form_factors": ["ARDUINO"], "inherits": ["MCU_NRF51_32K"], "progen": {"target": "nrf51-dk"}, - "device_has": ["ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH"] + "device_has": ["ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH"] }, "NRF51_DK_BOOT": { "supported_form_factors": ["ARDUINO"], @@ -1773,6 +1773,6 @@ "NRF52_PAN_62", "NRF52_PAN_63" ], - "device_has": ["ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH"] + "device_has": ["ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH"] } } diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/i2c_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/i2c_api.c index 7d611490b0..ce2e475f74 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/i2c_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/i2c_api.c @@ -122,7 +122,7 @@ void i2c_init(i2c_t *obj, PinName sda, PinName scl) } // No available peripheral - error("No available I2C"); + error("No available I2C peripheral\r\n"); } void i2c_reset(i2c_t *obj) @@ -215,7 +215,7 @@ int i2c_byte_write(i2c_t *obj, int data) #if DEVICE_I2C_ASYNCH -void i2c_transfer_asynch(i2c_t *obj, void *tx, size_t tx_length, +void i2c_transfer_asynch(i2c_t *obj, const void *tx, size_t tx_length, void *rx, size_t rx_length, uint32_t address, uint32_t stop, uint32_t handler, uint32_t event, DMAUsage hint) From 1357fb0ffcda17ceb1202b9563d3cabf7213f20f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C5=82=C4=85bek=2C=20Andrzej?= Date: Thu, 23 Jun 2016 12:27:18 +0200 Subject: [PATCH 30/67] Polished ticker related code. --- .../TARGET_NORDIC/TARGET_NRF5/common_rtc.h | 17 +++++- .../hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c | 3 +- .../hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c | 43 +++++++------- .../hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c | 58 +++++++++++++------ 4 files changed, 78 insertions(+), 43 deletions(-) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/common_rtc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/common_rtc.h index 789427c692..390faf53d3 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/common_rtc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/common_rtc.h @@ -24,12 +24,27 @@ // Instance 0 is reserved for SoftDevice. // Instance 1 is used as a common one for us_ticker, lp_ticker and (in case // of NRF51) as an alternative tick source for RTOS. +// ["os_tick.c" uses hard coded addresses of the 'NRF_RTC1->EVENT_COMPARE[1]' +// register in inline assembly implementations of COMMON_RTC_IRQ_HANDLER, +// please remember to update those in case of doing changes here] #define COMMON_RTC_INSTANCE NRF_RTC1 - +#define COMMON_RTC_IRQ_HANDLER RTC1_IRQHandler #define US_TICKER_CC_CHANNEL 0 #define OS_TICK_CC_CHANNEL 1 #define LP_TICKER_CC_CHANNEL 2 +#define COMMON_RTC_EVENT_COMPARE(channel) \ + CONCAT_2(NRF_RTC_EVENT_COMPARE_, channel) +#define COMMON_RTC_INT_COMPARE_MASK(channel) \ + CONCAT_3(NRF_RTC_INT_COMPARE, channel, _MASK) + +#define US_TICKER_EVENT COMMON_RTC_EVENT_COMPARE(US_TICKER_CC_CHANNEL) +#define US_TICKER_INT_MASK COMMON_RTC_INT_COMPARE_MASK(US_TICKER_CC_CHANNEL) +#define OS_TICK_EVENT COMMON_RTC_EVENT_COMPARE(OS_TICK_CC_CHANNEL) +#define OS_TICK_INT_MASK COMMON_RTC_INT_COMPARE_MASK(OS_TICK_CC_CHANNEL) +#define LP_TICKER_EVENT COMMON_RTC_EVENT_COMPARE(LP_TICKER_CC_CHANNEL) +#define LP_TICKER_INT_MASK COMMON_RTC_INT_COMPARE_MASK(LP_TICKER_CC_CHANNEL) + extern bool m_common_rtc_enabled; extern uint32_t volatile m_common_rtc_overflows; diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c index 4a928b79f4..404c18c259 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c @@ -34,8 +34,7 @@ void lp_ticker_set_interrupt(uint32_t now, uint32_t time) { (void)now; nrf_rtc_cc_set(COMMON_RTC_INSTANCE, LP_TICKER_CC_CHANNEL, RTC_WRAP(time)); - nrf_rtc_event_clear(COMMON_RTC_INSTANCE, NRF_RTC_EVENT_COMPARE_2); - nrf_rtc_event_enable(COMMON_RTC_INSTANCE, NRF_RTC_INT_COMPARE2_MASK); + nrf_rtc_event_enable(COMMON_RTC_INSTANCE, LP_TICKER_INT_MASK); } uint32_t lp_ticker_get_overflows_counter(void) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c index 3b4a51f25c..5655d302e3 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c @@ -17,7 +17,7 @@ #include "common_rtc.h" #include "toolchain.h" -#include "nrf_delay.h" +#include "nrf_drv_common.h" #define MAX_RTC_COUNTER_VAL ((1uL << RTC_COUNTER_BITS) - 1) @@ -44,7 +44,7 @@ MBED_WEAK void OS_Tick_Handler() { } #if defined (__CC_ARM) /* ARMCC Compiler */ -__asm void RTC1_IRQHandler(void) +__asm void COMMON_RTC_IRQ_HANDLER(void) { IMPORT OS_Tick_Handler IMPORT common_rtc_irq_handler @@ -59,7 +59,7 @@ __asm void RTC1_IRQHandler(void) * would never been dequeued. * * \code - * void RTC1_IRQHandler(void) { + * void COMMON_RTC_IRQ_HANDLER(void) { if(NRF_RTC1->EVENTS_COMPARE[1]) { // never return... OS_Tick_Handler(); @@ -83,7 +83,7 @@ US_TICKER_HANDLER #elif defined (__GNUC__) /* GNU Compiler */ -__attribute__((naked)) void RTC1_IRQHandler(void) +__attribute__((naked)) void COMMON_RTC_IRQ_HANDLER(void) { /** * Chanel 1 of RTC1 is used by RTX as a systick. @@ -95,7 +95,7 @@ __attribute__((naked)) void RTC1_IRQHandler(void) * would never been dequeued. * * \code - * void RTC1_IRQHandler(void) { + * void COMMON_RTC_IRQ_HANDLER(void) { if(NRF_RTC1->EVENTS_COMPARE[1]) { // never return... OS_Tick_Handler(); @@ -122,7 +122,7 @@ __attribute__((naked)) void RTC1_IRQHandler(void) #else #error Compiler not supported. -#error Provide a definition of RTC1_IRQHandler. +#error Provide a definition of COMMON_RTC_IRQ_HANDLER. /* * Chanel 1 of RTC1 is used by RTX as a systick. @@ -134,7 +134,7 @@ __attribute__((naked)) void RTC1_IRQHandler(void) * will never been dequeued. After a certain time a stack overflow will happen. * * \code - * void RTC1_IRQHandler(void) { + * void COMMON_RTC_IRQ_HANDLER(void) { if(NRF_RTC1->EVENTS_COMPARE[1]) { // never return... OS_Tick_Handler(); @@ -188,8 +188,8 @@ static uint32_t get_next_tick_cc_delta() { } static inline void clear_tick_interrupt() { - NRF_RTC1->EVENTS_COMPARE[1] = 0; - NRF_RTC1->EVTENCLR = (1 << 17); + nrf_rtc_event_clear(COMMON_RTC_INSTANCE, OS_TICK_EVENT); + nrf_rtc_event_disable(COMMON_RTC_INSTANCE, OS_TICK_INT_MASK); } /** @@ -224,7 +224,7 @@ static inline bool is_in_wrapped_range(uint32_t begin, uint32_t end, uint32_t va * Register the next tick. */ static void register_next_tick() { - previous_tick_cc_value = NRF_RTC1->CC[1]; + previous_tick_cc_value = nrf_rtc_cc_get(COMMON_RTC_INSTANCE, OS_TICK_CC_CHANNEL); uint32_t delta = get_next_tick_cc_delta(); uint32_t new_compare_value = (previous_tick_cc_value + delta) & MAX_RTC_COUNTER_VAL; @@ -236,16 +236,16 @@ static void register_next_tick() { // This code is very short 20-38 cycles in the worst case, it shouldn't // disturb softdevice. __disable_irq(); - uint32_t current_counter = NRF_RTC1->COUNTER; + uint32_t current_counter = nrf_rtc_counter_get(COMMON_RTC_INSTANCE); // If an overflow occur, set the next tick in COUNTER + delta clock cycles if (is_in_wrapped_range(previous_tick_cc_value, new_compare_value, current_counter) == false) { new_compare_value = current_counter + delta; } - NRF_RTC1->CC[1] = new_compare_value; - - // set the interrupt of CC channel 1 and reenable IRQs - NRF_RTC1->INTENSET = RTC_INTENSET_COMPARE1_Msk; + nrf_rtc_cc_set(COMMON_RTC_INSTANCE, OS_TICK_CC_CHANNEL, new_compare_value); + // Enable generation of the compare event for the value set above (this + // event will trigger the interrupt). + nrf_rtc_event_enable(COMMON_RTC_INSTANCE, OS_TICK_INT_MASK); __enable_irq(); } @@ -259,11 +259,10 @@ int os_tick_init (void) { common_rtc_init(); - NRF_RTC1->CC[1] = 0; - clear_tick_interrupt(); + nrf_rtc_cc_set(COMMON_RTC_INSTANCE, OS_TICK_CC_CHANNEL, 0); register_next_tick(); - return RTC1_IRQn; + return nrf_drv_get_IRQn(COMMON_RTC_INSTANCE); } /** @@ -283,8 +282,8 @@ void os_tick_irqack(void) * @return 1 if the timer has overflowed and 0 otherwise. */ uint32_t os_tick_ovf(void) { - uint32_t current_counter = NRF_RTC1->COUNTER; - uint32_t next_tick_cc_value = NRF_RTC1->CC[1]; + uint32_t current_counter = nrf_rtc_counter_get(COMMON_RTC_INSTANCE); + uint32_t next_tick_cc_value = nrf_rtc_cc_get(COMMON_RTC_INSTANCE, OS_TICK_CC_CHANNEL); return is_in_wrapped_range(previous_tick_cc_value, next_tick_cc_value, current_counter) ? 0 : 1; } @@ -299,8 +298,8 @@ uint32_t os_tick_ovf(void) { * @return the value of the alternative hardware timer. */ uint32_t os_tick_val(void) { - uint32_t current_counter = NRF_RTC1->COUNTER; - uint32_t next_tick_cc_value = NRF_RTC1->CC[1]; + uint32_t current_counter = nrf_rtc_counter_get(COMMON_RTC_INSTANCE); + uint32_t next_tick_cc_value = nrf_rtc_cc_get(COMMON_RTC_INSTANCE, OS_TICK_CC_CHANNEL); // do not use os_tick_ovf because its counter value can be different if(is_in_wrapped_range(previous_tick_cc_value, next_tick_cc_value, current_counter)) { diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c index 5b9050bb71..463feeaf9e 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c @@ -30,35 +30,35 @@ uint32_t volatile m_common_rtc_overflows = 0; #if defined(TARGET_MCU_NRF51822) void common_rtc_irq_handler(void) #else -void RTC1_IRQHandler(void) +void COMMON_RTC_IRQ_HANDLER(void) #endif { nrf_rtc_event_t event; uint32_t int_mask; - event = NRF_RTC_EVENT_COMPARE_0; - int_mask = NRF_RTC_INT_COMPARE0_MASK; - if (nrf_rtc_event_pending(COMMON_RTC_INSTANCE, event)) - { + event = US_TICKER_EVENT; + int_mask = US_TICKER_INT_MASK; + if (nrf_rtc_event_pending(COMMON_RTC_INSTANCE, event)) { nrf_rtc_event_clear(COMMON_RTC_INSTANCE, event); nrf_rtc_event_disable(COMMON_RTC_INSTANCE, int_mask); + us_ticker_irq_handler(); } #if DEVICE_LOWPOWERTIMER - event = NRF_RTC_EVENT_COMPARE_2; - int_mask = NRF_RTC_INT_COMPARE2_MASK; - if (nrf_rtc_event_pending(COMMON_RTC_INSTANCE, event)) - { + event = LP_TICKER_EVENT; + int_mask = LP_TICKER_INT_MASK; + if (nrf_rtc_event_pending(COMMON_RTC_INSTANCE, event)) { nrf_rtc_event_clear(COMMON_RTC_INSTANCE, event); nrf_rtc_event_disable(COMMON_RTC_INSTANCE, int_mask); } #endif event = NRF_RTC_EVENT_OVERFLOW; - if (nrf_rtc_event_pending(COMMON_RTC_INSTANCE, event)) - { + if (nrf_rtc_event_pending(COMMON_RTC_INSTANCE, event)) { nrf_rtc_event_clear(COMMON_RTC_INSTANCE, event); + // Don't disable this event. It shall occur periodically. + ++m_common_rtc_overflows; } } @@ -76,18 +76,41 @@ void common_rtc_init(void) nrf_rtc_prescaler_set(COMMON_RTC_INSTANCE, 0); + nrf_rtc_event_clear(COMMON_RTC_INSTANCE, US_TICKER_EVENT); +#if defined(TARGET_MCU_NRF51822) + nrf_rtc_event_clear(COMMON_RTC_INSTANCE, OS_TICK_EVENT); +#endif +#if DEVICE_LOWPOWERTIMER + nrf_rtc_event_clear(COMMON_RTC_INSTANCE, LP_TICKER_EVENT); +#endif nrf_rtc_event_clear(COMMON_RTC_INSTANCE, NRF_RTC_EVENT_OVERFLOW); - nrf_rtc_event_enable(COMMON_RTC_INSTANCE, NRF_RTC_INT_OVERFLOW_MASK); + + // Interrupts on all related events are enabled permanently. Particular + // events will be enabled or disabled as needed (such approach is more + // energy efficient). nrf_rtc_int_enable(COMMON_RTC_INSTANCE, - NRF_RTC_INT_COMPARE0_MASK | #if defined(TARGET_MCU_NRF51822) - NRF_RTC_INT_COMPARE1_MASK | + OS_TICK_INT_MASK | #endif #if DEVICE_LOWPOWERTIMER - NRF_RTC_INT_COMPARE2_MASK | + LP_TICKER_INT_MASK | #endif + US_TICKER_INT_MASK | NRF_RTC_INT_OVERFLOW_MASK); + // This event is enabled permanently, since overflow indications are needed + // continuously. + nrf_rtc_event_enable(COMMON_RTC_INSTANCE, NRF_RTC_INT_OVERFLOW_MASK); + // All other relevant events are initially disabled. + nrf_rtc_event_disable(COMMON_RTC_INSTANCE, + #if defined(TARGET_MCU_NRF51822) + OS_TICK_INT_MASK | + #endif + #if DEVICE_LOWPOWERTIMER + LP_TICKER_INT_MASK | + #endif + US_TICKER_INT_MASK); + nrf_drv_common_irq_enable(nrf_drv_get_IRQn(COMMON_RTC_INSTANCE), APP_IRQ_PRIORITY_LOW); @@ -161,13 +184,12 @@ void us_ticker_set_interrupt(timestamp_t timestamp) nrf_rtc_cc_set(COMMON_RTC_INSTANCE, US_TICKER_CC_CHANNEL, RTC_WRAP(compare_value)); - nrf_rtc_event_clear(COMMON_RTC_INSTANCE, NRF_RTC_EVENT_COMPARE_0); - nrf_rtc_event_enable(COMMON_RTC_INSTANCE, NRF_RTC_INT_COMPARE0_MASK); + nrf_rtc_event_enable(COMMON_RTC_INSTANCE, US_TICKER_INT_MASK); } void us_ticker_disable_interrupt(void) { - nrf_rtc_event_disable(COMMON_RTC_INSTANCE, NRF_RTC_INT_COMPARE0_MASK); + nrf_rtc_event_disable(COMMON_RTC_INSTANCE, US_TICKER_INT_MASK); } void us_ticker_clear_interrupt(void) From a664be0347719f3afab0d41215be71f0e420e96e Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Mon, 27 Jun 2016 12:28:17 +0200 Subject: [PATCH 31/67] Fix AnalogInput fo nRF51. --- hal/targets.json | 2 +- .../TARGET_MCU_NRF51822/analogin_api.c | 58 ++- .../sdk/drivers_nrf/adc/nrf_drv_adc.c | 253 +++++++++++ .../sdk/drivers_nrf/adc/nrf_drv_adc.h | 297 +++++++++++++ .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_adc.c | 78 ++++ .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_adc.h | 416 ++++++++++++++++++ 6 files changed, 1072 insertions(+), 32 deletions(-) create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/drivers_nrf/adc/nrf_drv_adc.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/drivers_nrf/adc/nrf_drv_adc.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_adc.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_adc.h diff --git a/hal/targets.json b/hal/targets.json index dafc4788fc..62facad941 100644 --- a/hal/targets.json +++ b/hal/targets.json @@ -1375,7 +1375,7 @@ "supported_form_factors": ["ARDUINO"], "inherits": ["MCU_NRF51_32K"], "progen": {"target": "nrf51-dk"}, - "device_has": ["ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH"] + "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH"] }, "NRF51_DK_BOOT": { "supported_form_factors": ["ARDUINO"], diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c index 44d5342831..02384a90b2 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c @@ -12,17 +12,18 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + */ #include "mbed_assert.h" #include "analogin_api.h" #include "cmsis.h" #include "pinmap.h" +#include "nrf_drv_adc.h" #ifdef DEVICE_ANALOGIN -#define ANALOGIN_MEDIAN_FILTER 1 -#define ADC_10BIT_RANGE 0x3FF -#define ADC_RANGE ADC_10BIT_RANGE + +#define ADC_10BIT_RANGE 0x3FF +#define ADC_RANGE ADC_10BIT_RANGE static const PinMap PinMap_ADC[] = { {p1, ADC0_0, 4}, @@ -38,47 +39,42 @@ static const PinMap PinMap_ADC[] = { {NC, NC, 0} }; + void analogin_init(analogin_t *obj, PinName pin) { - int analogInputPin = 0; - const PinMap *map = PinMap_ADC; - - obj->adc = (ADCName)pinmap_peripheral(pin, PinMap_ADC); //(NRF_ADC_Type *) + obj->adc = (ADCName)pinmap_peripheral(pin, PinMap_ADC); MBED_ASSERT(obj->adc != (ADCName)NC); - while (map->pin != NC) { - if (map->pin == pin) { - analogInputPin = map->function; - break; - } - map++; - } - obj->adc_pin = (uint8_t)analogInputPin; - - NRF_ADC->ENABLE = ADC_ENABLE_ENABLE_Enabled; - NRF_ADC->CONFIG = (ADC_CONFIG_RES_10bit << ADC_CONFIG_RES_Pos) | - (ADC_CONFIG_INPSEL_AnalogInputOneThirdPrescaling << ADC_CONFIG_INPSEL_Pos) | - (ADC_CONFIG_REFSEL_SupplyOneThirdPrescaling << ADC_CONFIG_REFSEL_Pos) | - (analogInputPin << ADC_CONFIG_PSEL_Pos) | - (ADC_CONFIG_EXTREFSEL_None << ADC_CONFIG_EXTREFSEL_Pos); + uint32_t pinFunc = pinmap_function(pin, PinMap_ADC); + MBED_ASSERT(pinFunc != (uint32_t)NC); + + obj->adc_pin = pinFunc; + + ret_code_t ret_code; + // p_config, event_handler + ret_code = nrf_drv_adc_init(NULL , NULL); // select blocking mode + MBED_ASSERT(ret_code == NRF_SUCCESS); } uint16_t analogin_read_u16(analogin_t *obj) { - NRF_ADC->CONFIG &= ~ADC_CONFIG_PSEL_Msk; - NRF_ADC->CONFIG |= obj->adc_pin << ADC_CONFIG_PSEL_Pos; - NRF_ADC->EVENTS_END = 0; - NRF_ADC->TASKS_START = 1; + nrf_adc_value_t adc_value = 0xFFFF; + + nrf_drv_adc_channel_t adc_channel = NRF_DRV_ADC_DEFAULT_CHANNEL(obj->adc_pin); + - while (!NRF_ADC->EVENTS_END) { - } - - return (uint16_t)NRF_ADC->RESULT; // 10 bit + ret_code_t ret_code; + + ret_code = nrf_drv_adc_sample_convert( &adc_channel, &adc_value); + MBED_ASSERT(ret_code == NRF_SUCCESS); + + return adc_value; } float analogin_read(analogin_t *obj) { uint16_t value = analogin_read_u16(obj); + return (float)value * (1.0f / (float)ADC_RANGE); } diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/drivers_nrf/adc/nrf_drv_adc.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/drivers_nrf/adc/nrf_drv_adc.c new file mode 100644 index 0000000000..1c4a0f163b --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/drivers_nrf/adc/nrf_drv_adc.c @@ -0,0 +1,253 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "nrf_drv_adc.h" +#include "nrf_drv_common.h" +#include "nrf_assert.h" +#include "app_util_platform.h" +#include "app_util.h" + +typedef struct +{ + nrf_drv_adc_event_handler_t event_handler; + nrf_drv_adc_channel_t * p_head; + nrf_drv_adc_channel_t * p_current_conv; + nrf_adc_value_t * p_buffer; + uint8_t size; + uint8_t idx; + nrf_drv_state_t state; +} adc_cb_t; + +static adc_cb_t m_cb; +static const nrf_drv_adc_config_t m_default_config = NRF_DRV_ADC_DEFAULT_CONFIG; + +ret_code_t nrf_drv_adc_init(nrf_drv_adc_config_t const * p_config, + nrf_drv_adc_event_handler_t event_handler) +{ + if (m_cb.state != NRF_DRV_STATE_UNINITIALIZED) + { + return NRF_ERROR_INVALID_STATE; + } + + nrf_adc_event_clear(NRF_ADC_EVENT_END); + if (event_handler) + { + if (!p_config) + { + p_config = (nrf_drv_adc_config_t *)&m_default_config; + } + nrf_drv_common_irq_enable(ADC_IRQn, p_config->interrupt_priority); + } + m_cb.event_handler = event_handler; + m_cb.state = NRF_DRV_STATE_INITIALIZED; + + return NRF_SUCCESS; +} + +void nrf_drv_adc_uninit(void) +{ + m_cb.p_head = NULL; + nrf_drv_common_irq_disable(ADC_IRQn); + nrf_adc_int_disable(NRF_ADC_INT_END_MASK); + nrf_adc_task_trigger(NRF_ADC_TASK_STOP); + + m_cb.state = NRF_DRV_STATE_UNINITIALIZED; +} + +void nrf_drv_adc_channel_enable(nrf_drv_adc_channel_t * const p_channel) +{ + ASSERT(mp_state == NRF_DRV_STATE_INITIALIZED); + ASSERT(!is_address_from_stack(p_channel)); + + p_channel->p_next = NULL; + if (m_cb.p_head == NULL) + { + m_cb.p_head = p_channel; + } + else + { + nrf_drv_adc_channel_t * p_curr_channel = m_cb.p_head; + while (p_curr_channel->p_next != NULL) + { + ASSERT(p_channel != p_curr_channel); + p_curr_channel = p_curr_channel->p_next; + } + p_curr_channel->p_next = p_channel; + } +} + +void nrf_drv_adc_channel_disable(nrf_drv_adc_channel_t * const p_channel) +{ + ASSERT(mp_state == NRF_DRV_STATE_INITIALIZED); + ASSERT(m_cb.p_head); + + nrf_drv_adc_channel_t * p_curr_channel = m_cb.p_head; + nrf_drv_adc_channel_t * p_prev_channel = NULL; + while(p_curr_channel != p_channel) + { + p_prev_channel = p_curr_channel; + p_curr_channel = p_curr_channel->p_next; + ASSERT(p_curr_channel == NULL); + } + if (p_prev_channel) + { + p_prev_channel->p_next = p_curr_channel->p_next; + } + else + { + m_cb.p_head = p_curr_channel->p_next; + } +} + +void nrf_drv_adc_sample(void) +{ + ASSERT(mp_state != NRF_DRV_STATE_UNINITIALIZED); + ASSERT(!nrf_adc_is_busy()); + nrf_adc_start(); +} + +ret_code_t nrf_drv_adc_sample_convert(nrf_drv_adc_channel_t const * const p_channel, + nrf_adc_value_t * p_value) +{ + ASSERT(mp_state != NRF_DRV_STATE_UNINITIALIZED); + if(m_cb.state == NRF_DRV_STATE_POWERED_ON) + { + return NRF_ERROR_BUSY; + } + else + { + m_cb.state = NRF_DRV_STATE_POWERED_ON; + + nrf_adc_config_set(p_channel->config.data); + nrf_adc_enable(); + nrf_adc_int_disable(NRF_ADC_INT_END_MASK); + nrf_adc_start(); + if (p_value) + { + while(!nrf_adc_event_check(NRF_ADC_EVENT_END)) {} + nrf_adc_event_clear(NRF_ADC_EVENT_END); + *p_value = (nrf_adc_value_t)nrf_adc_result_get(); + nrf_adc_disable(); + + m_cb.state = NRF_DRV_STATE_INITIALIZED; + } + else + { + ASSERT(m_cb.event_handler); + m_cb.p_buffer = NULL; + nrf_adc_int_enable(NRF_ADC_INT_END_MASK); + } + return NRF_SUCCESS; + } +} + +static bool adc_sample_process() +{ + nrf_adc_event_clear(NRF_ADC_EVENT_END); + nrf_adc_disable(); + m_cb.p_buffer[m_cb.idx] = (nrf_adc_value_t)nrf_adc_result_get(); + m_cb.idx++; + if (m_cb.idx < m_cb.size) + { + bool task_trigger = false; + if (m_cb.p_current_conv->p_next == NULL) + { + m_cb.p_current_conv = m_cb.p_head; + } + else + { + m_cb.p_current_conv = m_cb.p_current_conv->p_next; + task_trigger = true; + } + nrf_adc_config_set(m_cb.p_current_conv->config.data); + nrf_adc_enable(); + if (task_trigger) + { + //nrf_adc_start(); + nrf_adc_task_trigger(NRF_ADC_TASK_START); + } + return false; + } + else + { + return true; + } +} + +ret_code_t nrf_drv_adc_buffer_convert(nrf_adc_value_t * buffer, uint16_t size) +{ + ASSERT(mp_state != NRF_DRV_STATE_UNINITIALIZED); + if(m_cb.state == NRF_DRV_STATE_POWERED_ON) + { + return NRF_ERROR_BUSY; + } + else + { + m_cb.state = NRF_DRV_STATE_POWERED_ON; + m_cb.p_current_conv = m_cb.p_head; + m_cb.size = size; + m_cb.idx = 0; + m_cb.p_buffer = buffer; + nrf_adc_config_set(m_cb.p_current_conv->config.data); + nrf_adc_event_clear(NRF_ADC_EVENT_END); + nrf_adc_enable(); + if (m_cb.event_handler) + { + nrf_adc_int_enable(NRF_ADC_INT_END_MASK); + } + else + { + while(1) + { + while(!nrf_adc_event_check(NRF_ADC_EVENT_END)){} + + if (adc_sample_process()) + { + m_cb.state = NRF_DRV_STATE_INITIALIZED; + break; + } + } + } + return NRF_SUCCESS; + } +} + +bool nrf_drv_adc_is_busy(void) +{ + ASSERT(mp_state != NRF_DRV_STATE_UNINITIALIZED); + return (m_cb.state == NRF_DRV_STATE_POWERED_ON) ? true : false; +} + +void ADC_IRQHandler(void) +{ + if (m_cb.p_buffer == NULL) + { + nrf_adc_event_clear(NRF_ADC_EVENT_END); + nrf_adc_int_disable(NRF_ADC_INT_END_MASK); + nrf_adc_disable(); + nrf_drv_adc_evt_t evt; + evt.type = NRF_DRV_ADC_EVT_SAMPLE; + evt.data.sample.sample = (nrf_adc_value_t)nrf_adc_result_get(); + m_cb.state = NRF_DRV_STATE_INITIALIZED; + m_cb.event_handler(&evt); + } + else if (adc_sample_process()) + { + nrf_adc_int_disable(NRF_ADC_INT_END_MASK); + nrf_drv_adc_evt_t evt; + evt.type = NRF_DRV_ADC_EVT_DONE; + evt.data.done.p_buffer = m_cb.p_buffer; + evt.data.done.size = m_cb.size; + m_cb.state = NRF_DRV_STATE_INITIALIZED; + m_cb.event_handler(&evt); + } +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/drivers_nrf/adc/nrf_drv_adc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/drivers_nrf/adc/nrf_drv_adc.h new file mode 100644 index 0000000000..fddd43d2f6 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/drivers_nrf/adc/nrf_drv_adc.h @@ -0,0 +1,297 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "nrf_adc.h" +#include "nrf_drv_config.h" +#include "sdk_errors.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @addtogroup nrf_adc ADC HAL and driver + * @ingroup nrf_drivers + * @brief Analog-to-digital converter (ADC) APIs. + * @details The ADC HAL provides basic APIs for accessing the registers of the analog-to-digital converter. + * The ADC driver provides APIs on a higher level. + * + * @defgroup nrf_adc_drv ADC driver + * @{ + * @ingroup nrf_adc + * @brief Analog-to-digital converter (ADC) driver. + */ + + +/** + * @brief Driver event types. + */ +typedef enum +{ + NRF_DRV_ADC_EVT_DONE, ///< Event generated when the buffer is filled with samples. + NRF_DRV_ADC_EVT_SAMPLE, ///< Event generated when the requested channel is sampled. +} nrf_drv_adc_evt_type_t; + +typedef int16_t nrf_adc_value_t; + +/** + * @brief Analog-to-digital converter driver DONE event. + */ +typedef struct +{ + nrf_adc_value_t * p_buffer; ///< Pointer to buffer with converted samples. + uint16_t size; ///< Number of samples in the buffer. +} nrf_drv_adc_done_evt_t; + +/** + * @brief Analog-to-digital converter driver SAMPLE event. + */ +typedef struct +{ + nrf_adc_value_t sample; ///< Converted sample. +} nrf_drv_adc_sample_evt_t; + +/** + * @brief Analog-to-digital converter driver event. + */ +typedef struct +{ + nrf_drv_adc_evt_type_t type; ///< Event type. + union + { + nrf_drv_adc_done_evt_t done; ///< Data for DONE event. + nrf_drv_adc_sample_evt_t sample; ///< Data for SAMPLE event. + } data; +} nrf_drv_adc_evt_t; + +/**@brief Macro for initializing the ADC channel with the default configuration. */ +#define NRF_DRV_ADC_DEFAULT_CHANNEL(analog_input) \ + {{{ \ + .resolution = NRF_ADC_CONFIG_RES_10BIT, \ + .input = NRF_ADC_CONFIG_SCALING_INPUT_FULL_SCALE, \ + .reference = NRF_ADC_CONFIG_REF_VBG, \ + .ain = (analog_input) \ + }}, NULL} + +/** + * @brief ADC channel configuration. + * + * @note The bit fields reflect bit fields in the ADC CONFIG register. + */ +typedef struct +{ + uint32_t resolution :2; ///< 8-10 bit resolution. + uint32_t input :3; ///< Input selection and scaling. + uint32_t reference :2; ///< Reference source. + uint32_t reserved :1; ///< Unused bit fields. + uint32_t ain :8; ///< Analog input. + uint32_t external_reference:2; ///< Eternal reference source. +}nrf_drv_adc_channel_config_t; + +// Forward declaration of the nrf_drv_adc_channel_t type. +typedef struct nrf_drv_adc_channel_s nrf_drv_adc_channel_t; + +/** + * @brief ADC channel. + * + * This structure is defined by the user and used by the driver. Therefore, it should + * not be defined on the stack as a local variable. + */ +struct nrf_drv_adc_channel_s +{ + union + { + nrf_drv_adc_channel_config_t config; ///< Channel configuration. + uint32_t data; ///< Raw value. + } config; + nrf_drv_adc_channel_t * p_next; ///< Pointer to the next enabled channel (for internal use). +}; + +/** + * @brief ADC configuration. + */ +typedef struct +{ + uint8_t interrupt_priority; ///< Priority of ADC interrupt. +} nrf_drv_adc_config_t; + +/** @brief ADC default configuration. */ +#define NRF_DRV_ADC_DEFAULT_CONFIG \ +{ \ + .interrupt_priority = ADC_CONFIG_IRQ_PRIORITY \ +} + +/** + * @brief User event handler prototype. + * + * This function is called when the requested number of samples has been processed. + * + * @param p_event Event. + */ +typedef void (*nrf_drv_adc_event_handler_t)(nrf_drv_adc_evt_t const * p_event); + +/** + * @brief Function for initializing the ADC. + * + * If a valid event handler is provided, the driver is initialized in non-blocking mode. + * If event_handler is NULL, the driver works in blocking mode. + * + * @param[in] p_config Driver configuration. + * @param[in] event_handler Event handler provided by the user. + * + * @retval NRF_SUCCESS If initialization was successful. + * @retval NRF_ERROR_INVALID_STATE If the driver is already initialized. + */ +ret_code_t nrf_drv_adc_init(nrf_drv_adc_config_t const * p_config, + nrf_drv_adc_event_handler_t event_handler); + +/** + * @brief Function for uninitializing the ADC. + * + * This function stops all ongoing conversions and disables all channels. + */ +void nrf_drv_adc_uninit(void); + +/** + * @brief Function for enabling an ADC channel. + * + * This function configures and enables the channel. When @ref nrf_drv_adc_buffer_convert is + * called, all channels that have been enabled with this function are sampled. + * + * @note The channel instance variable @p p_channel is used by the driver as an item + * in a list. Therefore, it cannot be an automatic variable, and an assertion fails if it is + * an automatic variable (if asserts are enabled). + */ +void nrf_drv_adc_channel_enable(nrf_drv_adc_channel_t * const p_channel); + +/** + * @brief Function for disabling an ADC channel. + */ +void nrf_drv_adc_channel_disable(nrf_drv_adc_channel_t * const p_channel); + +/** + * @brief Function for starting ADC sampling. + * + * This function triggers single ADC sampling. If more than one channel is enabled, the driver + * emulates scanning and all channels are sampled in the order they were enabled. + */ +void nrf_drv_adc_sample(void); + +/** + * @brief Function for executing a single ADC conversion. + * + * This function selects the desired input and starts a single conversion. If a valid pointer + * is provided for the result, the function blocks until the conversion is completed. Otherwise, the + * function returns when the conversion is started, and the result is provided in an event (driver + * must be initialized in non-blocking mode otherwise an assertion will fail). The function will fail if + * ADC is busy. The channel does not need to be enabled to perform a single conversion. + * + * @param[in] p_channel Channel. + * @param[out] p_value Pointer to the location where the result should be placed. Unless NULL is + * provided, the function is blocking. + * + * @retval NRF_SUCCESS If conversion was successful. + * @retval NRF_ERROR_BUSY If the ADC driver is busy. + */ +ret_code_t nrf_drv_adc_sample_convert(nrf_drv_adc_channel_t const * const p_channel, + nrf_adc_value_t * p_value); + +/** + * @brief Function for converting data to the buffer. + * + * If the driver is initialized in non-blocking mode, this function returns when the first conversion + * is set up. When the buffer is filled, the application is notified by the event handler. If the + * driver is initialized in blocking mode, the function returns when the buffer is filled. + * + * Conversion is done on all enabled channels, but it is not triggered by this + * function. This function will prepare the ADC for sampling and then + * wait for the SAMPLE task. Sampling can be triggered manually by the @ref + * nrf_drv_adc_sample function or by PPI using the @ref NRF_ADC_TASK_START task. + * + * @note If more than one channel is enabled, the function emulates scanning, and + * a single START task will trigger conversion on all enabled channels. For example: + * If 3 channels are enabled and the user requests 6 samples, the completion event + * handler will be called after 2 START tasks. + * @note The application must adjust the sampling frequency. The maximum frequency + * depends on the sampling timer and the maximum latency of the ADC interrupt. If + * an interrupt is not handled before the next sampling is triggered, the sample + * will be lost. + * + * @param[in] buffer Result buffer. + * @param[in] size Buffer size in samples. + * + * @retval NRF_SUCCESS If conversion was successful. + * @retval NRF_ERROR_BUSY If the driver is busy. + */ +ret_code_t nrf_drv_adc_buffer_convert(nrf_adc_value_t * buffer, uint16_t size); + +/** + * @brief Function for retrieving the ADC state. + * + * @retval true If the ADC is busy. + * @retval false If the ADC is ready. + */ +bool nrf_drv_adc_is_busy(void); + +/** + * @brief Function for getting the address of the ADC START task. + * + * This function is used to get the address of the START task, which can be used to trigger ADC + * conversion. + * + * @return Start task address. + */ +__STATIC_INLINE uint32_t nrf_drv_adc_start_task_get(void); + +/** + * @brief Function for converting a GPIO pin number to an analog input pin mask to be used in + * the ADC channel configuration. + * + * @param[in] pin GPIO pin. + * + * @return Analog input pin mask. The function returns @ref NRF_ADC_CONFIG_INPUT_DISABLED + * if the specified pin is not an analog input. + */ +__STATIC_INLINE nrf_adc_config_input_t nrf_drv_adc_gpio_to_ain(uint32_t pin); + +#ifndef SUPPRESS_INLINE_IMPLEMENTATION + +__STATIC_INLINE uint32_t nrf_drv_adc_start_task_get(void) +{ + return nrf_adc_task_address_get(NRF_ADC_TASK_START); +} + +__STATIC_INLINE nrf_adc_config_input_t nrf_drv_adc_gpio_to_ain(uint32_t pin) +{ + // AIN2 - AIN7 + if (pin >= 1 && pin <= 6) + { + return (nrf_adc_config_input_t)(1 << (pin+1)); + } + // AIN0 - AIN1 + else if (pin >= 26 && pin <= 27) + { + return (nrf_adc_config_input_t)(1 <<(pin - 26)); + } + else + { + return NRF_ADC_CONFIG_INPUT_DISABLED; + } +} + +#ifdef __cplusplus +} +#endif + +#endif +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_adc.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_adc.c new file mode 100644 index 0000000000..e408ca7007 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_adc.c @@ -0,0 +1,78 @@ +/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** + * @file + * @brief ADC HAL implementation + */ + +#include "nrf_adc.h" + +#ifndef NRF52 + +/** + * @brief Function for configuring ADC. + * + * This function powers on ADC and configures it. ADC is in DISABLE state after configuration, + * so it should be enabled before using it. + * + * @param[in] config Requested configuration. + */ +void nrf_adc_configure(nrf_adc_config_t * config) +{ + uint32_t config_reg = 0; + + config_reg |= ((uint32_t)config->resolution << ADC_CONFIG_RES_Pos) & ADC_CONFIG_RES_Msk; + config_reg |= ((uint32_t)config->scaling << ADC_CONFIG_INPSEL_Pos) & ADC_CONFIG_INPSEL_Msk; + config_reg |= ((uint32_t)config->reference << ADC_CONFIG_REFSEL_Pos) & ADC_CONFIG_REFSEL_Msk; + + if (config->reference & ADC_CONFIG_EXTREFSEL_Msk) + { + config_reg |= config->reference & ADC_CONFIG_EXTREFSEL_Msk; + } + + /* select input */ + nrf_adc_input_select(NRF_ADC_CONFIG_INPUT_DISABLED); + + /* set new configuration keeping selected input */ + NRF_ADC->CONFIG = config_reg | (NRF_ADC->CONFIG & ADC_CONFIG_PSEL_Msk); +} + + +/** + * @brief Blocking function for executing single ADC conversion. + * + * This function selects the desired input, starts a single conversion, + * waits for it to finish, and returns the result. + * ADC is left in STOP state, the given input is selected. + * This function does not check if ADC is initialized and powered. + * + * @param[in] input Requested input to be selected. + * + * @return Conversion result + */ +int32_t nrf_adc_convert_single(nrf_adc_config_input_t input) +{ + int32_t val; + + nrf_adc_input_select(input); + nrf_adc_start(); + + while (!nrf_adc_conversion_finished()) + { + } + nrf_adc_conversion_event_clean(); + val = nrf_adc_result_get(); + nrf_adc_stop(); + return val; +} +#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_adc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_adc.h new file mode 100644 index 0000000000..c697a22415 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_adc.h @@ -0,0 +1,416 @@ +/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#ifndef NRF_ADC_H_ +#define NRF_ADC_H_ + +/** + * @defgroup nrf_adc_hal ADC HAL + * @{ + * @ingroup nrf_adc + * @brief @tagAPI51 Hardware access layer for managing the analog-to-digital converter (ADC). + */ + +#include +#include + +#include "nrf.h" + +#ifndef NRF52 +/** + * @enum nrf_adc_config_resolution_t + * @brief Resolution of the analog-to-digital converter. + */ + +/** + * @brief ADC interrupts. + */ +typedef enum +{ + NRF_ADC_INT_END_MASK = ADC_INTENSET_END_Msk, /**< ADC interrupt on END event. */ +} nrf_adc_int_mask_t; + +typedef enum +{ + NRF_ADC_CONFIG_RES_8BIT = ADC_CONFIG_RES_8bit, /**< 8 bit resolution. */ + NRF_ADC_CONFIG_RES_9BIT = ADC_CONFIG_RES_9bit, /**< 9 bit resolution. */ + NRF_ADC_CONFIG_RES_10BIT = ADC_CONFIG_RES_10bit, /**< 10 bit resolution. */ +} nrf_adc_config_resolution_t; + + +/** + * @enum nrf_adc_config_scaling_t + * @brief Scaling factor of the analog-to-digital conversion. + */ +typedef enum +{ + NRF_ADC_CONFIG_SCALING_INPUT_FULL_SCALE = ADC_CONFIG_INPSEL_AnalogInputNoPrescaling, /**< Full scale input. */ + NRF_ADC_CONFIG_SCALING_INPUT_TWO_THIRDS = ADC_CONFIG_INPSEL_AnalogInputTwoThirdsPrescaling, /**< 2/3 scale input. */ + NRF_ADC_CONFIG_SCALING_INPUT_ONE_THIRD = ADC_CONFIG_INPSEL_AnalogInputOneThirdPrescaling, /**< 1/3 scale input. */ + NRF_ADC_CONFIG_SCALING_SUPPLY_TWO_THIRDS = ADC_CONFIG_INPSEL_SupplyTwoThirdsPrescaling, /**< 2/3 of supply. */ + NRF_ADC_CONFIG_SCALING_SUPPLY_ONE_THIRD = ADC_CONFIG_INPSEL_SupplyOneThirdPrescaling /**< 1/3 of supply. */ +} nrf_adc_config_scaling_t; + +/** + * @enum nrf_adc_config_reference_t + * @brief Reference selection of the analog-to-digital converter. + */ +typedef enum +{ + NRF_ADC_CONFIG_REF_VBG = ADC_CONFIG_REFSEL_VBG, /**< 1.2 V reference. */ + NRF_ADC_CONFIG_REF_SUPPLY_ONE_HALF = ADC_CONFIG_REFSEL_SupplyOneHalfPrescaling, /**< 1/2 of power supply. */ + NRF_ADC_CONFIG_REF_SUPPLY_ONE_THIRD = ADC_CONFIG_REFSEL_SupplyOneThirdPrescaling, /**< 1/3 of power supply. */ + NRF_ADC_CONFIG_REF_EXT_REF0 = ADC_CONFIG_REFSEL_External | + ADC_CONFIG_EXTREFSEL_AnalogReference0 << + ADC_CONFIG_EXTREFSEL_Pos, /**< External reference 0. */ + NRF_ADC_CONFIG_REF_EXT_REF1 = ADC_CONFIG_REFSEL_External | + ADC_CONFIG_EXTREFSEL_AnalogReference1 << ADC_CONFIG_EXTREFSEL_Pos, /**< External reference 0. */ +} nrf_adc_config_reference_t; + +/** + * @enum nrf_adc_config_input_t + * @brief Input selection of the analog-to-digital converter. + */ +typedef enum +{ + NRF_ADC_CONFIG_INPUT_DISABLED = ADC_CONFIG_PSEL_Disabled, /**< No input selected. */ + NRF_ADC_CONFIG_INPUT_0 = ADC_CONFIG_PSEL_AnalogInput0, /**< Input 0. */ + NRF_ADC_CONFIG_INPUT_1 = ADC_CONFIG_PSEL_AnalogInput1, /**< Input 1. */ + NRF_ADC_CONFIG_INPUT_2 = ADC_CONFIG_PSEL_AnalogInput2, /**< Input 2. */ + NRF_ADC_CONFIG_INPUT_3 = ADC_CONFIG_PSEL_AnalogInput3, /**< Input 3. */ + NRF_ADC_CONFIG_INPUT_4 = ADC_CONFIG_PSEL_AnalogInput4, /**< Input 4. */ + NRF_ADC_CONFIG_INPUT_5 = ADC_CONFIG_PSEL_AnalogInput5, /**< Input 5. */ + NRF_ADC_CONFIG_INPUT_6 = ADC_CONFIG_PSEL_AnalogInput6, /**< Input 6. */ + NRF_ADC_CONFIG_INPUT_7 = ADC_CONFIG_PSEL_AnalogInput7, /**< Input 7. */ +} nrf_adc_config_input_t; + +/** + * @enum nrf_adc_task_t + * @brief Analog-to-digital converter tasks. + */ +typedef enum +{ + /*lint -save -e30*/ + NRF_ADC_TASK_START = offsetof(NRF_ADC_Type, TASKS_START), /**< ADC start sampling task. */ + NRF_ADC_TASK_STOP = offsetof(NRF_ADC_Type, TASKS_STOP) /**< ADC stop sampling task. */ + /*lint -restore*/ +} nrf_adc_task_t; + +/** + * @enum nrf_adc_event_t + * @brief Analog-to-digital converter events. + */ +typedef enum /*lint -save -e30 -esym(628,__INTADDR__) */ +{ + /*lint -save -e30*/ + NRF_ADC_EVENT_END = offsetof(NRF_ADC_Type, EVENTS_END) /**< End of conversion event. */ + /*lint -restore*/ +} nrf_adc_event_t; + +/**@brief Analog-to-digital converter configuration. */ +typedef struct +{ + nrf_adc_config_resolution_t resolution; /**< ADC resolution. */ + nrf_adc_config_scaling_t scaling; /**< ADC scaling factor. */ + nrf_adc_config_reference_t reference; /**< ADC reference. */ +} nrf_adc_config_t; + +/** Default ADC configuration. */ +#define NRF_ADC_CONFIG_DEFAULT { NRF_ADC_CONFIG_RES_10BIT, \ + NRF_ADC_CONFIG_SCALING_INPUT_ONE_THIRD, \ + NRF_ADC_CONFIG_REF_VBG } + +/** + * @brief Function for configuring ADC. + * + * This function powers on the analog-to-digital converter and configures it. + * After the configuration, the ADC is in DISABLE state and must be + * enabled before using it. + * + * @param[in] config Configuration parameters. + */ +void nrf_adc_configure(nrf_adc_config_t * config); + +/** + * @brief Blocking function for executing a single ADC conversion. + * + * This function selects the desired input, starts a single conversion, + * waits for it to finish, and returns the result. + * After the input is selected, the analog-to-digital converter + * is left in STOP state. + * The function does not check if the ADC is initialized and powered. + * + * @param[in] input Input to be selected. + * + * @return Conversion result. + */ +int32_t nrf_adc_convert_single(nrf_adc_config_input_t input); + +/** + * @brief Function for selecting ADC input. + * + * This function selects the active input of ADC. Ensure that + * the ADC is powered on and in IDLE state before calling this function. + * + * @param[in] input Input to be selected. + */ +__STATIC_INLINE void nrf_adc_input_select(nrf_adc_config_input_t input) +{ + NRF_ADC->CONFIG = + ((uint32_t)input << ADC_CONFIG_PSEL_Pos) | (NRF_ADC->CONFIG & ~ADC_CONFIG_PSEL_Msk); + + if (input != NRF_ADC_CONFIG_INPUT_DISABLED) + { + NRF_ADC->ENABLE = ADC_ENABLE_ENABLE_Enabled << ADC_ENABLE_ENABLE_Pos; + } + else + { + NRF_ADC->ENABLE = ADC_ENABLE_ENABLE_Disabled << ADC_ENABLE_ENABLE_Pos; + } +} + + +/** + * @brief Function for retrieving the ADC conversion result. + * + * This function retrieves and returns the last analog-to-digital conversion result. + * + * @return Last conversion result. + */ +__STATIC_INLINE int32_t nrf_adc_result_get(void) +{ + return (int32_t)NRF_ADC->RESULT; +} + + +/** + * @brief Function for checking whether the ADC is busy. + * + * This function checks whether the analog-to-digital converter is busy with a conversion. + * + * @retval true If the ADC is busy. + * @retval false If the ADC is not busy. + */ +__STATIC_INLINE bool nrf_adc_is_busy(void) +{ + return ( (NRF_ADC->BUSY & ADC_BUSY_BUSY_Msk) == ADC_BUSY_BUSY_Msk); +} + +/** + * @brief Function for getting the ADC's enabled interrupts. + * + * @param[in] mask Mask of interrupts to check. + * + * @return State of the interrupts selected by the mask. + * + * @sa nrf_adc_int_enable() + * @sa nrf_adc_int_disable() + */ +__STATIC_INLINE uint32_t nrf_adc_int_get(uint32_t mask) +{ + return (NRF_ADC->INTENSET & mask); // when read this register will return the value of INTEN. +} + + +/** + * @brief Function for starting conversion. + * + * @sa nrf_adc_stop() + * + */ +__STATIC_INLINE void nrf_adc_start(void) +{ + NRF_ADC->TASKS_START = 1; +} + + +/** + * @brief Function for stopping conversion. + * + * If the analog-to-digital converter is in inactive state, power consumption is reduced. + * + * @sa nrf_adc_start() + * + */ +__STATIC_INLINE void nrf_adc_stop(void) +{ + NRF_ADC->TASKS_STOP = 1; +} + + +/** + * @brief Function for checking if the requested ADC conversion has ended. + * + * @retval true If the task has finished. + * @retval false If the task is still running. + */ +__STATIC_INLINE bool nrf_adc_conversion_finished(void) +{ + return ((bool)NRF_ADC->EVENTS_END); +} + +/** + * @brief Function for clearing the conversion END event. + */ +__STATIC_INLINE void nrf_adc_conversion_event_clean(void) +{ + NRF_ADC->EVENTS_END = 0; +} + +/** + * @brief Function for getting the address of an ADC task register. + * + * @param[in] adc_task ADC task. + * + * @return Address of the specified ADC task. + */ +__STATIC_INLINE uint32_t nrf_adc_task_address_get(nrf_adc_task_t adc_task); + +/** + * @brief Function for getting the address of a specific ADC event register. + * + * @param[in] adc_event ADC event. + * + * @return Address of the specified ADC event. + */ +__STATIC_INLINE uint32_t nrf_adc_event_address_get(nrf_adc_event_t adc_event); + +/** + * @brief Function for setting the CONFIG register in ADC. + * + * @param[in] configuration Value to be written to the CONFIG register. + */ +__STATIC_INLINE void nrf_adc_config_set(uint32_t configuration); + +/** + * @brief Function for clearing an ADC event. + * + * @param[in] event Event to clear. + */ +__STATIC_INLINE void nrf_adc_event_clear(nrf_adc_event_t event); + +/** + * @brief Function for checking state of an ADC event. + * + * @param[in] event Event to check. + * + * @retval true If the event is set. + * @retval false If the event is not set. + */ +__STATIC_INLINE bool nrf_adc_event_check(nrf_adc_event_t event); + +/** + * @brief Function for enabling specified interrupts. + * + * @param[in] int_mask Interrupts to enable. + */ +__STATIC_INLINE void nrf_adc_int_enable(uint32_t int_mask); + +/** + * @brief Function for disabling specified interrupts. + * + * @param[in] int_mask Interrupts to disable. + */ +__STATIC_INLINE void nrf_adc_int_disable(uint32_t int_mask); + +/** + * @brief Function for retrieving the state of a given interrupt. + * + * @param[in] int_mask Interrupt to check. + * + * @retval true If the interrupt is enabled. + * @retval false If the interrupt is not enabled. + */ +__STATIC_INLINE bool nrf_adc_int_enable_check(nrf_adc_int_mask_t int_mask); + +/** + * @brief Function for activating a specific ADC task. + * + * @param[in] task Task to activate. + */ +__STATIC_INLINE void nrf_adc_task_trigger(nrf_adc_task_t task); + +/** + * @brief Function for enabling ADC. + * + */ +__STATIC_INLINE void nrf_adc_enable(void); + +/** + * @brief Function for disabling ADC. + * + */ +__STATIC_INLINE void nrf_adc_disable(void); + +#ifndef SUPPRESS_INLINE_IMPLEMENTATION + +__STATIC_INLINE uint32_t nrf_adc_task_address_get(nrf_adc_task_t adc_task) +{ + return (uint32_t)((uint8_t *)NRF_ADC + adc_task); +} + +__STATIC_INLINE uint32_t nrf_adc_event_address_get(nrf_adc_event_t adc_event) +{ + return (uint32_t)((uint8_t *)NRF_ADC + adc_event); +} + +__STATIC_INLINE void nrf_adc_config_set(uint32_t configuration) +{ + NRF_ADC->CONFIG = configuration; +} + +__STATIC_INLINE void nrf_adc_event_clear(nrf_adc_event_t event) +{ + *((volatile uint32_t *)((uint8_t *)NRF_ADC + (uint32_t)event)) = 0x0UL; +} + +__STATIC_INLINE bool nrf_adc_event_check(nrf_adc_event_t event) +{ + return (bool)*(volatile uint32_t *)((uint8_t *)NRF_ADC + (uint32_t)event); +} + +__STATIC_INLINE void nrf_adc_int_enable(uint32_t int_mask) +{ + NRF_ADC->INTENSET = int_mask; +} + +__STATIC_INLINE void nrf_adc_int_disable(uint32_t int_mask) +{ + NRF_ADC->INTENCLR = int_mask; +} + +__STATIC_INLINE bool nrf_adc_int_enable_check(nrf_adc_int_mask_t int_mask) +{ + return (bool)(NRF_ADC->INTENSET & int_mask); +} + +__STATIC_INLINE void nrf_adc_task_trigger(nrf_adc_task_t task) +{ + *((volatile uint32_t *)((uint8_t *)NRF_ADC + (uint32_t)task)) = 0x1UL; +} + +__STATIC_INLINE void nrf_adc_enable(void) +{ + NRF_ADC->ENABLE = 1; +} + +__STATIC_INLINE void nrf_adc_disable(void) +{ + NRF_ADC->ENABLE = 0; +} +#endif +#endif /* NRF52 */ +/** + *@} + **/ + +#endif /* NRF_ADC_H_ */ From 1c262e34440a98eb70c0de1843a5ebaf634d4eb2 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Tue, 28 Jun 2016 11:58:18 +0200 Subject: [PATCH 32/67] remove unwanted initialization of adc_value --- .../TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c index 02384a90b2..ac349e0d36 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c @@ -58,7 +58,7 @@ void analogin_init(analogin_t *obj, PinName pin) uint16_t analogin_read_u16(analogin_t *obj) { - nrf_adc_value_t adc_value = 0xFFFF; + nrf_adc_value_t adc_value; nrf_drv_adc_channel_t adc_channel = NRF_DRV_ADC_DEFAULT_CHANNEL(obj->adc_pin); From eef471bee4ad0ef86c9e3f1b32cce3d8506638b1 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Tue, 28 Jun 2016 17:31:49 +0200 Subject: [PATCH 33/67] AnalogIn api implenetation for nRF52 --- .../TARGET_MCU_NRF52832/analogin_api.c | 88 ++- .../sdk/driver_nrf/saadc/nrf_drv_saadc.c | 509 ++++++++++++++++ .../sdk/driver_nrf/saadc/nrf_drv_saadc.h | 303 ++++++++++ .../sdk/drivers_nrf/hal/nrf_saadc.c | 31 + .../sdk/drivers_nrf/hal/nrf_saadc.h | 554 ++++++++++++++++++ 5 files changed, 1437 insertions(+), 48 deletions(-) create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/saadc/nrf_drv_saadc.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/saadc/nrf_drv_saadc.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/analogin_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/analogin_api.c index af4929d8ed..b712a3004f 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/analogin_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/analogin_api.c @@ -17,69 +17,61 @@ #include "analogin_api.h" #include "cmsis.h" #include "pinmap.h" +#include "app_util_platform.h" +#include "nrf_drv_saadc.h" #ifdef DEVICE_ANALOGIN -#define ANALOGIN_MEDIAN_FILTER 1 -#define ADC_10BIT_RANGE 0x3FF -#define ADC_RANGE ADC_10BIT_RANGE +#define ADC_12BIT_RANGE 0xFFF +#define ADC_RANGE ADC_12BIT_RANGE -static const PinMap PinMap_ADC[] = { - {p1, ADC0_0, 4}, - {p2, ADC0_0, 8}, - {p3, ADC0_0, 16}, - {p4, ADC0_0, 32}, - {p5, ADC0_0, 64}, - {p6, ADC0_0, 128}, - {NC, NC, 0} +void analog_in_event_handler(nrf_drv_saadc_evt_t const *p_event)// type of nrf_drv_saadc_event_handler_t +{ + (void) p_event; +} + +const nrf_drv_saadc_config_t saadc_config = +{ + .resolution = NRF_SAADC_RESOLUTION_12BIT, + .oversample = NRF_SAADC_OVERSAMPLE_DISABLED, + .interrupt_priority = APP_IRQ_PRIORITY_LOW }; void analogin_init(analogin_t *obj, PinName pin) { - // TODO: usage on nrf52 ? -#if 0 - int analogInputPin = 0; - const PinMap *map = PinMap_ADC; - - obj->adc = (ADCName)pinmap_peripheral(pin, PinMap_ADC); //(NRF_ADC_Type *) - MBED_ASSERT(obj->adc != (ADCName)NC); - - while (map->pin != NC) { - if (map->pin == pin) { - analogInputPin = map->function; - break; - } - map++; - } - obj->adc_pin = (uint8_t)analogInputPin; - - NRF_ADC->ENABLE = ADC_ENABLE_ENABLE_Enabled; - NRF_ADC->CONFIG = (ADC_CONFIG_RES_10bit << ADC_CONFIG_RES_Pos) | - (ADC_CONFIG_INPSEL_AnalogInputOneThirdPrescaling << ADC_CONFIG_INPSEL_Pos) | - (ADC_CONFIG_REFSEL_SupplyOneThirdPrescaling << ADC_CONFIG_REFSEL_Pos) | - (analogInputPin << ADC_CONFIG_PSEL_Pos) | - (ADC_CONFIG_EXTREFSEL_None << ADC_CONFIG_EXTREFSEL_Pos); -#endif + /// @todo check if initialized + ret_code_t ret_code; + + ret_code = nrf_drv_saadc_init(&saadc_config, analog_in_event_handler); + MBED_ASSERT(((ret_code == NRF_SUCCESS) || (ret_code == NRF_ERROR_INVALID_STATE))); //NRF_ERROR_INVALID_STATE expected for multiple channels used. + + uint8_t saadcIn = nrf_drv_saadc_gpio_to_ain(pin); + MBED_ASSERT(saadcIn != NRF_SAADC_INPUT_DISABLED); + + obj->adc = ADC0_0; // only one instance of ADC in nRF52 SoC + obj->adc_pin = saadcIn - 1; + + nrf_saadc_channel_config_t channel_config = + NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(saadcIn); + + ret_code = nrf_drv_saadc_channel_init(obj->adc_pin, &channel_config); + MBED_ASSERT(ret_code == NRF_SUCCESS); } -uint16_t analogin_read_u16(analogin_t *obj) +int16_t analogin_read_i16(analogin_t *obj) { - // TODO: usage on nrf52 ? -#if 0 - NRF_ADC->CONFIG &= ~ADC_CONFIG_PSEL_Msk; - NRF_ADC->CONFIG |= obj->adc_pin << ADC_CONFIG_PSEL_Pos; - NRF_ADC->TASKS_START = 1; - while (((NRF_ADC->BUSY & ADC_BUSY_BUSY_Msk) >> ADC_BUSY_BUSY_Pos) == ADC_BUSY_BUSY_Busy) { - } - - return (uint16_t)NRF_ADC->RESULT; // 10 bit -#endif - return 0; + nrf_saadc_value_t adc_value; + ret_code_t ret_code; + + ret_code = nrf_drv_saadc_sample_convert(obj->adc_pin, &adc_value); + MBED_ASSERT(ret_code == NRF_SUCCESS); + + return adc_value; } float analogin_read(analogin_t *obj) { - uint16_t value = analogin_read_u16(obj); + int16_t value = analogin_read_i16(obj); return (float)value * (1.0f / (float)ADC_RANGE); } diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/saadc/nrf_drv_saadc.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/saadc/nrf_drv_saadc.c new file mode 100644 index 0000000000..9c528ed782 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/saadc/nrf_drv_saadc.c @@ -0,0 +1,509 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "nrf_drv_saadc.h" +#include "nrf_assert.h" +#include "nordic_common.h" +#include "nrf_drv_common.h" +#include "app_util_platform.h" + + +typedef enum +{ + NRF_SAADC_STATE_IDLE = 0, + NRF_SAADC_STATE_BUSY = 1 +} nrf_saadc_state_t; + + +typedef struct +{ + nrf_saadc_input_t pselp; + nrf_saadc_input_t pseln; +} nrf_saadc_psel_buffer; + +static const nrf_drv_saadc_config_t m_default_config = NRF_DRV_SAADC_DEFAULT_CONFIG; + +/** @brief SAADC control block.*/ +typedef struct +{ + nrf_drv_saadc_event_handler_t event_handler; ///< Event handler function pointer. + volatile nrf_saadc_value_t * p_buffer; ///< Sample buffer. + volatile uint16_t buffer_size; ///< Size of the sample buffer. +#ifdef NRF52_PAN_28 + volatile uint16_t buffer_pos; ///< Current sample buffer position. +#endif + volatile nrf_saadc_value_t * p_secondary_buffer; ///< Secondary sample buffer. + uint32_t limits_enabled_flags; ///< Enabled limits flags. + uint16_t secondary_buffer_size; ///< Size of the secondary buffer. + nrf_saadc_psel_buffer psel[NRF_SAADC_CHANNEL_COUNT]; ///< Pin configurations of SAADC channels. + nrf_drv_state_t state; ///< Driver initialization state. + nrf_saadc_state_t adc_state; ///< State of the SAADC. +#ifdef NRF52_PAN_28 + uint8_t scan_pos; ///< Current channel scanning position. +#endif + uint8_t active_channels; ///< Number of enabled SAADC channels. +} nrf_drv_saadc_cb_t; + +static nrf_drv_saadc_cb_t m_cb; + +#define LOW_LIMIT_TO_FLAG(channel) ((2*channel+1)) +#define HIGH_LIMIT_TO_FLAG(channel) ((2*channel)) +#define FLAG_IDX_TO_EVENT(idx) ((nrf_saadc_event_t)((uint32_t)NRF_SAADC_EVENT_CH0_LIMITH+4*idx)) +#define LIMIT_EVENT_TO_CHANNEL(event)(uint8_t)(((uint32_t)event-(uint32_t)NRF_SAADC_EVENT_CH0_LIMITH)/8) +#define LIMIT_EVENT_TO_LIMIT_TYPE(event)((((uint32_t)event-(uint32_t)NRF_SAADC_EVENT_CH0_LIMITH) & 4) ? \ + NRF_SAADC_LIMIT_LOW : NRF_SAADC_LIMIT_HIGH) +#define HW_TIMEOUT 10000 + + +void SAADC_IRQHandler(void) +{ + if (nrf_saadc_event_check(NRF_SAADC_EVENT_END)) + { + nrf_saadc_event_clear(NRF_SAADC_EVENT_END); +#ifdef NRF52_PAN_28 + if (m_cb.active_channels == 1) + { +#endif + nrf_drv_saadc_evt_t evt; + evt.type = NRF_DRV_SAADC_EVT_DONE; + evt.data.done.p_buffer = (nrf_saadc_value_t *)m_cb.p_buffer; + evt.data.done.size = nrf_saadc_amount_get(); + + if (m_cb.p_secondary_buffer == NULL) + { + m_cb.adc_state = NRF_SAADC_STATE_IDLE; + } + else + { + m_cb.p_buffer = m_cb.p_secondary_buffer; + m_cb.buffer_size = m_cb.secondary_buffer_size; + m_cb.p_secondary_buffer = NULL; + nrf_saadc_task_trigger(NRF_SAADC_TASK_START); + } + + m_cb.event_handler(&evt); +#ifdef NRF52_PAN_28 + } + else + { + //PAN-28: scan mode is not working correctly, emulated by interrupts + ++(m_cb.buffer_pos); + uint16_t buffer_pos = m_cb.buffer_pos; + if (buffer_pos == m_cb.buffer_size) + { + nrf_drv_saadc_evt_t evt; + evt.type = NRF_DRV_SAADC_EVT_DONE; + evt.data.done.p_buffer = (nrf_saadc_value_t *)(m_cb.p_buffer); + evt.data.done.size = m_cb.buffer_size; + + m_cb.adc_state = NRF_SAADC_STATE_IDLE; + if (m_cb.p_secondary_buffer == NULL) + { + m_cb.adc_state = NRF_SAADC_STATE_IDLE; + } + else + { + (void)nrf_drv_saadc_buffer_convert((nrf_saadc_value_t *)m_cb.p_secondary_buffer, (uint16_t)m_cb.secondary_buffer_size); + } + m_cb.event_handler(&evt); + } + else + { + uint8_t current_scan_pos = m_cb.scan_pos; + + nrf_saadc_channel_input_set(current_scan_pos, + NRF_SAADC_INPUT_DISABLED, NRF_SAADC_INPUT_DISABLED); + + nrf_saadc_buffer_init((nrf_saadc_value_t *)(m_cb.p_buffer + m_cb.buffer_pos), 1); + // Find the next enabled channel. + for (++m_cb.scan_pos; m_cb.scan_pos < NRF_SAADC_CHANNEL_COUNT; ++m_cb.scan_pos) + { + if (m_cb.psel[m_cb.scan_pos].pselp) + { + nrf_saadc_channel_input_set(m_cb.scan_pos, + m_cb.psel[m_cb.scan_pos].pselp, m_cb.psel[m_cb.scan_pos].pseln); + nrf_saadc_task_trigger(NRF_SAADC_TASK_START); + nrf_saadc_task_trigger(NRF_SAADC_TASK_SAMPLE); + return; + } + } + //if scanning is done prepare for next round. + for (uint8_t i = 0; i < NRF_SAADC_CHANNEL_COUNT; ++i) + { + if (m_cb.psel[i].pselp) + { + m_cb.scan_pos = i; + break; + } + } + nrf_saadc_channel_input_set(m_cb.scan_pos, + m_cb.psel[m_cb.scan_pos].pselp, m_cb.psel[m_cb.scan_pos].pseln); + nrf_saadc_task_trigger(NRF_SAADC_TASK_START); + } + } +#endif + } + if (nrf_saadc_event_check(NRF_SAADC_EVENT_STOPPED)) + { + nrf_saadc_event_clear(NRF_SAADC_EVENT_STOPPED); + m_cb.adc_state = NRF_SAADC_STATE_IDLE; + } + else + { + uint32_t limit_flags = m_cb.limits_enabled_flags; + uint32_t flag_idx; + nrf_saadc_event_t event; + while (limit_flags) + { + flag_idx = __CLZ(limit_flags); + limit_flags &= ~((1UL<<31) >> flag_idx); + event = FLAG_IDX_TO_EVENT(flag_idx); + if (nrf_saadc_event_check(event)) + { + nrf_saadc_event_clear(event); + nrf_drv_saadc_evt_t evt; + evt.type = NRF_DRV_SAADC_EVT_LIMIT; + evt.data.limit.channel = LIMIT_EVENT_TO_CHANNEL(event); + evt.data.limit.limit_type = LIMIT_EVENT_TO_LIMIT_TYPE(event); + m_cb.event_handler(&evt); + } + } + } +} + + +ret_code_t nrf_drv_saadc_init(nrf_drv_saadc_config_t const * p_config, + nrf_drv_saadc_event_handler_t event_handler) +{ + if (m_cb.state != NRF_DRV_STATE_UNINITIALIZED) + { + return NRF_ERROR_INVALID_STATE; + } + if (event_handler == NULL) + { + return NRF_ERROR_INVALID_PARAM; + } + + if (p_config == NULL) + { + p_config = &m_default_config; + } + + m_cb.event_handler = event_handler; + nrf_saadc_resolution_set(p_config->resolution); + nrf_saadc_oversample_set(p_config->oversample); + m_cb.state = NRF_DRV_STATE_INITIALIZED; + m_cb.adc_state = NRF_SAADC_STATE_IDLE; + m_cb.active_channels = 0; + m_cb.limits_enabled_flags = 0; +#ifdef NRF52_PAN_28 + m_cb.buffer_pos = 0; +#endif + + nrf_saadc_int_disable(NRF_SAADC_INT_ALL); + nrf_saadc_event_clear(NRF_SAADC_EVENT_END); + nrf_drv_common_irq_enable(SAADC_IRQn, p_config->interrupt_priority); + nrf_saadc_int_enable(NRF_SAADC_INT_END); + + nrf_saadc_enable(); + + return NRF_SUCCESS; +} + + +void nrf_drv_saadc_uninit(void) +{ + ASSERT(m_cb.state != NRF_DRV_STATE_UNINITIALIZED); + nrf_drv_common_irq_disable(SAADC_IRQn); + nrf_saadc_task_trigger(NRF_SAADC_TASK_STOP); + + // Wait for ADC being stopped. + uint32_t timeout = HW_TIMEOUT; + while (nrf_saadc_event_check(NRF_SAADC_EVENT_STOPPED) == 0 && timeout > 0) + { + --timeout; + } + ASSERT(timeout > 0); + + nrf_saadc_disable(); + nrf_saadc_int_disable(NRF_SAADC_INT_ALL); + + m_cb.adc_state = NRF_SAADC_STATE_IDLE; + + for (uint8_t channel = 0; channel < NRF_SAADC_CHANNEL_COUNT; ++channel) + { + if (m_cb.psel[channel].pselp != NRF_SAADC_INPUT_DISABLED) + { + (void)nrf_drv_saadc_channel_uninit(channel); + } + } + + m_cb.state = NRF_DRV_STATE_UNINITIALIZED; +} + + +ret_code_t nrf_drv_saadc_channel_init(uint8_t channel, + nrf_saadc_channel_config_t const * const p_config) +{ + ASSERT(m_cb.state != NRF_DRV_STATE_UNINITIALIZED); + ASSERT(channel < NRF_SAADC_CHANNEL_COUNT); + //Oversampling can be used only with one channel. + ASSERT((nrf_saadc_oversample_get()==NRF_SAADC_OVERSAMPLE_DISABLED) || (m_cb.active_channels == 0)); + ASSERT((p_config->pin_p <= NRF_SAADC_INPUT_VDD) && (p_config->pin_p > NRF_SAADC_INPUT_DISABLED)); + ASSERT(p_config->pin_n <= NRF_SAADC_INPUT_VDD); + + // A channel can only be initialized if the driver is in the idle state. + if (m_cb.adc_state == NRF_SAADC_STATE_BUSY) + { + return NRF_ERROR_BUSY; + } + + if (!m_cb.psel[channel].pselp) + { + ++m_cb.active_channels; + } + m_cb.psel[channel].pselp = p_config->pin_p; + m_cb.psel[channel].pseln = p_config->pin_n; + nrf_saadc_channel_init(channel, p_config); + +#ifdef NRF52_PAN_28 + nrf_saadc_channel_input_set(channel, NRF_SAADC_INPUT_DISABLED, NRF_SAADC_INPUT_DISABLED); +#else + nrf_saadc_channel_input_set(channel, p_config->pin_p, p_config->pin_n); +#endif + return NRF_SUCCESS; +} + + +ret_code_t nrf_drv_saadc_channel_uninit(uint8_t channel) +{ + ASSERT(channel <= NRF_SAADC_CHANNEL_COUNT) + ASSERT(m_cb.state != NRF_DRV_STATE_UNINITIALIZED); + + // A channel can only be uninitialized if the driver is in the idle state. + if (m_cb.adc_state == NRF_SAADC_STATE_BUSY) + { + return NRF_ERROR_BUSY; + } + + if (m_cb.psel[channel].pselp) + { + --m_cb.active_channels; + } + m_cb.psel[channel].pselp = NRF_SAADC_INPUT_DISABLED; + m_cb.psel[channel].pseln = NRF_SAADC_INPUT_DISABLED; + nrf_saadc_channel_input_set(channel, NRF_SAADC_INPUT_DISABLED, NRF_SAADC_INPUT_DISABLED); + nrf_drv_saadc_limits_set(channel, NRF_DRV_SAADC_LIMITL_DISABLED, NRF_DRV_SAADC_LIMITH_DISABLED); + + return NRF_SUCCESS; +} + +ret_code_t nrf_drv_saadc_sample_convert(uint8_t channel, nrf_saadc_value_t * p_value) +{ + if (m_cb.adc_state != NRF_SAADC_STATE_IDLE) + { + return NRF_ERROR_BUSY; + } + m_cb.adc_state = NRF_SAADC_STATE_BUSY; + nrf_saadc_int_disable(NRF_SAADC_INT_END); + nrf_saadc_buffer_init(p_value, 1); +#ifndef NRF52_PAN_28 + if (m_cb.active_channels > 1) + { + for (uint8_t i = 0; i < NRF_SAADC_CHANNEL_COUNT; ++i) + { + nrf_saadc_channel_input_set(i, NRF_SAADC_INPUT_DISABLED, NRF_SAADC_INPUT_DISABLED); + } + } +#endif + nrf_saadc_channel_input_set(channel, + m_cb.psel[channel].pselp, m_cb.psel[channel].pseln); + nrf_saadc_task_trigger(NRF_SAADC_TASK_START); + nrf_saadc_task_trigger(NRF_SAADC_TASK_SAMPLE); + + uint32_t timeout = HW_TIMEOUT; + while (0 == nrf_saadc_event_check(NRF_SAADC_EVENT_END) && timeout > 0) + { + timeout--; + } + nrf_saadc_event_clear(NRF_SAADC_EVENT_END); + +#ifdef NRF52_PAN_28 + nrf_saadc_channel_input_set(channel, NRF_SAADC_INPUT_DISABLED, NRF_SAADC_INPUT_DISABLED); +#else + if (m_cb.active_channels > 1) + { + for (uint8_t i = 0; i < NRF_SAADC_CHANNEL_COUNT; ++i) + { + nrf_saadc_channel_input_set(i, m_cb.psel[i].pselp, m_cb.psel[i].pseln); + } + } +#endif + + nrf_saadc_int_enable(NRF_SAADC_INT_END); + m_cb.adc_state = NRF_SAADC_STATE_IDLE; + + return NRF_SUCCESS; +} + +ret_code_t nrf_drv_saadc_buffer_convert(nrf_saadc_value_t * p_buffer, uint16_t size) +{ + ASSERT(m_cb.state != NRF_DRV_STATE_UNINITIALIZED); + + nrf_saadc_int_disable(NRF_SAADC_INT_END); + if (m_cb.adc_state == NRF_SAADC_STATE_BUSY) + { + if ( m_cb.p_secondary_buffer) + { + nrf_saadc_int_enable(NRF_SAADC_INT_END); + return NRF_ERROR_BUSY; + } + else + { + m_cb.p_secondary_buffer = p_buffer; + m_cb.secondary_buffer_size = size; +#ifdef NRF52_PAN_28 + if (m_cb.active_channels == 1) +#endif + { + while (nrf_saadc_event_check(NRF_SAADC_EVENT_STARTED) == 0); + nrf_saadc_event_clear(NRF_SAADC_EVENT_STARTED); + nrf_saadc_buffer_init(p_buffer, size); + } + nrf_saadc_int_enable(NRF_SAADC_INT_END); + return NRF_SUCCESS; + } + } + nrf_saadc_int_enable(NRF_SAADC_INT_END); + m_cb.adc_state = NRF_SAADC_STATE_BUSY; + +#ifdef NRF52_PAN_28 + m_cb.scan_pos = NRF_SAADC_CHANNEL_COUNT; + for (uint8_t i = 0; i < NRF_SAADC_CHANNEL_COUNT; ++i) + { + if (m_cb.psel[i].pselp) + { + m_cb.scan_pos = i; + break; + } + } + + // Find the first enabled channel. + if (m_cb.scan_pos >= NRF_SAADC_CHANNEL_COUNT) + { + return NRF_ERROR_INVALID_STATE; + } + + m_cb.buffer_pos = 0; +#endif + m_cb.p_buffer = p_buffer; + m_cb.buffer_size = size; + m_cb.p_secondary_buffer = NULL; + +#ifdef NRF52_PAN_28 + nrf_saadc_channel_input_set(m_cb.scan_pos, + m_cb.psel[m_cb.scan_pos].pselp, m_cb.psel[m_cb.scan_pos].pseln); + + if (m_cb.active_channels == 1) + { + nrf_saadc_buffer_init(p_buffer, size); + } + else + { + nrf_saadc_buffer_init(p_buffer, 1); + } +#else + nrf_saadc_buffer_init(p_buffer, size); +#endif + + nrf_saadc_event_clear(NRF_SAADC_EVENT_STARTED); + nrf_saadc_task_trigger(NRF_SAADC_TASK_START); + + return NRF_SUCCESS; +} + +ret_code_t nrf_drv_saadc_sample() +{ + ASSERT(m_cb.state != NRF_DRV_STATE_UNINITIALIZED); + + ret_code_t err_code = NRF_SUCCESS; + if (m_cb.adc_state == NRF_SAADC_STATE_IDLE) + { + err_code = NRF_ERROR_BUSY; + } + else + { + nrf_saadc_task_trigger(NRF_SAADC_TASK_SAMPLE); + } + + return err_code; +} + + +bool nrf_drv_saadc_is_busy(void) +{ + return (m_cb.adc_state == NRF_SAADC_STATE_BUSY); +} + +void nrf_drv_saadc_abort(void) +{ + if (nrf_drv_saadc_is_busy()) + { + nrf_saadc_event_clear(NRF_SAADC_EVENT_STOPPED); + nrf_saadc_task_trigger(NRF_SAADC_TASK_STOP); + + // Wait for ADC being stopped. + uint32_t timeout = HW_TIMEOUT; + while ((m_cb.adc_state != NRF_SAADC_STATE_IDLE) && (timeout > 0)) + { + --timeout; + } + ASSERT(timeout > 0); + + m_cb.p_buffer = 0; + m_cb.p_secondary_buffer = 0; + } +} + +void nrf_drv_saadc_limits_set(uint8_t channel, int16_t limit_low, int16_t limit_high) +{ + ASSERT(m_cb.state != NRF_DRV_STATE_UNINITIALIZED); + ASSERT(m_cb.event_handler); // only non blocking mode supported + ASSERT(limit_low>=NRF_DRV_SAADC_LIMITL_DISABLED); + ASSERT(limit_high<=NRF_DRV_SAADC_LIMITH_DISABLED); + ASSERT(limit_low> LOW_LIMIT_TO_FLAG(channel)); + nrf_saadc_int_disable(int_mask); + } + else + { + m_cb.limits_enabled_flags |= (0x80000000 >> LOW_LIMIT_TO_FLAG(channel)); + nrf_saadc_int_enable(int_mask); + } + + int_mask = nrf_saadc_limit_int_get(channel, NRF_SAADC_LIMIT_HIGH); + if (limit_high == NRF_DRV_SAADC_LIMITH_DISABLED) + { + m_cb.limits_enabled_flags &= ~(0x80000000 >> HIGH_LIMIT_TO_FLAG(channel)); + nrf_saadc_int_disable(int_mask); + } + else + { + m_cb.limits_enabled_flags |= (0x80000000 >> HIGH_LIMIT_TO_FLAG(channel)); + nrf_saadc_int_enable(int_mask); + } +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/saadc/nrf_drv_saadc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/saadc/nrf_drv_saadc.h new file mode 100644 index 0000000000..61544f30f1 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/saadc/nrf_drv_saadc.h @@ -0,0 +1,303 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** + * @addtogroup nrf_saadc SAADC HAL and driver + * @ingroup nrf_drivers + * @brief @tagAPI52 Successive Approximation Analog-to-Digital Converter (SAADC) APIs. + * @details The SAADC HAL provides basic APIs for accessing the registers of the SAADC peripheral. + * The SAADC driver provides APIs on a higher level. + * + * @defgroup nrf_drv_saadc SAADC driver + * @{ + * @ingroup nrf_saadc + * + * @brief @tagAPI52 Successive Approximation Analog-to-Digital Converter (SAADC) driver. + */ + +#ifndef NRF_DRV_SAADC_H__ +#define NRF_DRV_SAADC_H__ + +#include "nrf_drv_config.h" +#include "nrf_saadc.h" +#include "sdk_errors.h" + +/** + * @brief Value that should be set as high limit to disable limit detection. + */ +#define NRF_DRV_SAADC_LIMITH_DISABLED (2047) +/** + * @brief Value that should be set as low limit to disable limit detection. + */ +#define NRF_DRV_SAADC_LIMITL_DISABLED (-2048) + +/** + * @brief Macro for setting @ref nrf_drv_saadc_config_t to default settings. + */ +#define NRF_DRV_SAADC_DEFAULT_CONFIG \ +{ \ + .resolution = SAADC_CONFIG_RESOLUTION, \ + .oversample = SAADC_CONFIG_OVERSAMPLE, \ + .interrupt_priority = SAADC_CONFIG_IRQ_PRIORITY \ +} + +/** + * @brief Macro for setting @ref nrf_saadc_channel_config_t to default settings + * in single ended mode. + * + * @param PIN_P Analog input. + */ +#define NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(PIN_P) \ +{ \ + .resistor_p = NRF_SAADC_RESISTOR_DISABLED, \ + .resistor_n = NRF_SAADC_RESISTOR_DISABLED, \ + .gain = NRF_SAADC_GAIN1_6, \ + .reference = NRF_SAADC_REFERENCE_INTERNAL, \ + .acq_time = NRF_SAADC_ACQTIME_10US, \ + .mode = NRF_SAADC_MODE_SINGLE_ENDED, \ + .pin_p = (nrf_saadc_input_t)(PIN_P), \ + .pin_n = NRF_SAADC_INPUT_DISABLED \ +} + +/** + * @brief Macro for setting @ref nrf_saadc_channel_config_t to default settings + * in differential mode. + * + * @param PIN_P Positive analog input. + * @param PIN_N Negative analog input. + */ +#define NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_DIFFERENTIAL(PIN_P, PIN_N) \ +{ \ + .resistor_p = NRF_SAADC_RESISTOR_DISABLED, \ + .resistor_n = NRF_SAADC_RESISTOR_DISABLED, \ + .gain = NRF_SAADC_GAIN1_6, \ + .reference = NRF_SAADC_REFERENCE_INTERNAL, \ + .acq_time = NRF_SAADC_ACQTIME_10US, \ + .mode = NRF_SAADC_MODE_DIFFERENTIAL, \ + .pin_p = (nrf_saadc_input_t)(PIN_P), \ + .pin_n = (nrf_saadc_input_t)(PIN_N) \ +} + +/** + * @brief Analog-to-digital converter driver configuration structure. + */ +typedef struct +{ + nrf_saadc_resolution_t resolution; ///< Resolution configuration. + nrf_saadc_oversample_t oversample; ///< Oversampling configuration. + uint8_t interrupt_priority; ///< Interrupt priority. +} nrf_drv_saadc_config_t; + +/** + * @brief Driver event types. + */ +typedef enum +{ + NRF_DRV_SAADC_EVT_DONE, ///< Event generated when the buffer is filled with samples. + NRF_DRV_SAADC_EVT_LIMIT, ///< Event generated after one of the limits is reached. +} nrf_drv_saadc_evt_type_t; + +/** + * @brief Analog-to-digital converter driver done event data. + */ +typedef struct +{ + nrf_saadc_value_t * p_buffer; ///< Pointer to buffer with converted samples. + uint16_t size; ///< Number of samples in the buffer. +} nrf_drv_saadc_done_evt_t; + +/** + * @brief Analog-to-digital converter driver limit event data. + */ +typedef struct +{ + uint8_t channel; ///< Channel on which the limit was detected. + nrf_saadc_limit_t limit_type; ///< Type of limit detected. +} nrf_drv_saadc_limit_evt_t; + +/** + * @brief Analog-to-digital converter driver event structure. + */ +typedef struct +{ + nrf_drv_saadc_evt_type_t type; ///< Event type. + union + { + nrf_drv_saadc_done_evt_t done; ///< Data for @ref NRF_DRV_SAADC_EVT_DONE event. + nrf_drv_saadc_limit_evt_t limit;///< Data for @ref NRF_DRV_SAADC_EVT_LIMIT event. + } data; +} nrf_drv_saadc_evt_t; + +/** + * @brief ADC event handler. + * + * @param[in] p_event Pointer to an ADC event. The event structure is allocated on + * the stack, so it is valid only within the context of + * the event handler. + */ +typedef void (*nrf_drv_saadc_event_handler_t)(nrf_drv_saadc_evt_t const * p_event); + +/** + * @brief Function for initializing the SAADC. + * + * @param[in] p_config Pointer to a configuration structure. If NULL, the default one is used. + * @param[in] event_handler Event handler provided by the user. + * + * @retval NRF_SUCCESS If initialization was successful. + * @retval NRF_ERROR_INVALID_STATE If the driver is already initialized. + * @retval NRF_ERROR_INVALID_PARAM If event_handler is NULL. + */ +ret_code_t nrf_drv_saadc_init(nrf_drv_saadc_config_t const * p_config, + nrf_drv_saadc_event_handler_t event_handler); + +/** + * @brief Function for uninitializing the SAADC. + * + * This function stops all ongoing conversions and disables all channels. + */ +void nrf_drv_saadc_uninit(void); + +/** + * @brief Function for getting the address of a SAMPLE SAADC task. + * + * @return Task address. + */ +__STATIC_INLINE uint32_t nrf_drv_saadc_sample_task_get(void) +{ + return nrf_saadc_task_address_get(NRF_SAADC_TASK_SAMPLE); +} + + +/** + * @brief Function for initializing an SAADC channel. + * + * This function configures and enables the channel. + * + * @retval NRF_SUCCESS If initialization was successful. + * @retval NRF_ERROR_INVALID_STATE If the ADC was not initialized. + * @retval NRF_ERROR_NO_MEM If the specified channel was already allocated. + */ +ret_code_t nrf_drv_saadc_channel_init(uint8_t channel, + nrf_saadc_channel_config_t const * const p_config); + + +/** + * @brief Function for uninitializing an SAADC channel. + * + * @retval NRF_SUCCESS If uninitialization was successful. + * @retval NRF_ERROR_BUSY If the ADC is busy. + */ +ret_code_t nrf_drv_saadc_channel_uninit(uint8_t channel); + +/** + * @brief Function for starting SAADC sampling. + * + * @retval NRF_SUCCESS If ADC sampling was triggered. + * @retval NRF_ERROR_BUSY If ADC is in idle state. + */ +ret_code_t nrf_drv_saadc_sample(void); + +/** + * @brief Blocking function for executing a single ADC conversion. + * + * This function selects the desired input, starts a single conversion, + * waits for it to finish, and returns the result. + * + * The function will fail if ADC is busy. + * + * @param[in] channel Channel. + * @param[out] p_value Pointer to the location where the result should be placed. + * + * @retval NRF_SUCCESS If conversion was successful. + * @retval NRF_ERROR_BUSY If the ADC driver is busy. + */ +ret_code_t nrf_drv_saadc_sample_convert(uint8_t channel, nrf_saadc_value_t * p_value); + +/** + * @brief Function for issuing conversion of data to the buffer. + * + * This function is non-blocking. The application is notified about filling the buffer by the event handler. + * Conversion will be done on all enabled channels. If the ADC is in idle state, the function will set up Easy + * DMA for the conversion. The ADC will be ready for sampling and wait for the SAMPLE task. It can be + * triggered manually by the @ref nrf_drv_saadc_sample function or by PPI using the @ref NRF_SAADC_TASK_SAMPLE + * task. If one buffer is already set and the conversion is ongoing, calling this function will + * result in queuing the given buffer. The driver will start filling the issued buffer when the first one is + * completed. If the function is called again before the first buffer is filled, it will return with error. + * + * @param[in] buffer Result buffer. + * @param[in] size Buffer size in words. + * + * @retval NRF_SUCCESS If conversion was successful. + * @retval NRF_ERROR_BUSY If the driver already has two buffers set. + */ +ret_code_t nrf_drv_saadc_buffer_convert(nrf_saadc_value_t * buffer, uint16_t size); + +/** + * @brief Function for retrieving the SAADC state. + * + * @retval true If the ADC is busy. + * @retval false If the ADC is ready. + */ +bool nrf_drv_saadc_is_busy(void); + +/** + * @brief Function for aborting ongoing and buffered conversions. + * @note @ref NRF_DRV_SAADC_EVT_DONE event will be generated if there is a conversion in progress. + * Event will contain number of words in the sample buffer. + */ +void nrf_drv_saadc_abort(void); + +/** + * @brief Function for setting the SAADC channel limits. + * When limits are enabled and the result exceeds the defined bounds, the limit handler function is called. + * + * @param[in] channel SAADC channel number. + * @param[in] limit_low Lower limit (valid values from @ref NRF_DRV_SAADC_LIMITL_DISABLED to + * @ref NRF_DRV_SAADC_LIMITH_DISABLED). Conversion results below this value will trigger + * the handler function. Set to @ref NRF_DRV_SAADC_LIMITL_DISABLED to disable this limit. + * @param[in] limit_high Upper limit (valid values from @ref NRF_DRV_SAADC_LIMITL_DISABLED to + * @ref NRF_DRV_SAADC_LIMITH_DISABLED). Conversion results above this value will trigger + * the handler function. Set to @ref NRF_DRV_SAADC_LIMITH_DISABLED to disable this limit. + */ +void nrf_drv_saadc_limits_set(uint8_t channel, int16_t limit_low, int16_t limit_high); + +/** + * @brief Function for converting a GPIO pin number to an analog input pin number used in the channel + * configuration. + * + * @param[in] pin GPIO pin. + * + * @return Value representing an analog input pin. The function returns @ref NRF_SAADC_INPUT_DISABLED + * if the specified pin is not an analog input. + */ +__STATIC_INLINE nrf_saadc_input_t nrf_drv_saadc_gpio_to_ain(uint32_t pin) +{ + // AIN0 - AIN3 + if (pin >= 2 && pin <= 5) + { + //0 means "not connected", hence this "+ 1" + return (nrf_saadc_input_t)(pin - 2 + 1); + } + // AIN4 - AIN7 + else if (pin >= 28 && pin <= 31) + { + return (nrf_saadc_input_t)(pin - 24 + 1); + } + else + { + return NRF_SAADC_INPUT_DISABLED; + } +} + +#endif // NRF_DRV_SAADC_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.c new file mode 100644 index 0000000000..b2d5cc871b --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.c @@ -0,0 +1,31 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** + * @file + * @brief SAADC HAL implementation + */ + +#include "nrf_saadc.h" + +void nrf_saadc_channel_init(uint8_t channel, nrf_saadc_channel_config_t const * const config) +{ + NRF_SAADC->CH[channel].CONFIG = + ((config->resistor_p << SAADC_CH_CONFIG_RESP_Pos) & SAADC_CH_CONFIG_RESP_Msk) + | ((config->resistor_n << SAADC_CH_CONFIG_RESN_Pos) & SAADC_CH_CONFIG_RESN_Msk) + | ((config->gain << SAADC_CH_CONFIG_GAIN_Pos) & SAADC_CH_CONFIG_GAIN_Msk) + | ((config->reference << SAADC_CH_CONFIG_REFSEL_Pos) & SAADC_CH_CONFIG_REFSEL_Msk) + | ((config->acq_time << SAADC_CH_CONFIG_TACQ_Pos) & SAADC_CH_CONFIG_TACQ_Msk) + | ((config->mode << SAADC_CH_CONFIG_MODE_Pos) & SAADC_CH_CONFIG_MODE_Msk); + nrf_saadc_channel_input_set(channel, config->pin_p, config->pin_n); + return; +} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.h new file mode 100644 index 0000000000..a3044d8b1c --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.h @@ -0,0 +1,554 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + + +#ifndef NRF_SAADC_H_ +#define NRF_SAADC_H_ + +/** + * @defgroup nrf_saadc_hal SAADC HAL + * @{ + * @ingroup nrf_saadc + * + * @brief @tagAPI52 Hardware access layer for accessing the SAADC peripheral. + */ + +#include +#include +#include "nrf.h" +#include "nrf_assert.h" + +#define NRF_SAADC_CHANNEL_COUNT 8 + +/** + * @brief Resolution of the analog-to-digital converter. + */ +typedef enum +{ + NRF_SAADC_RESOLUTION_8BIT = SAADC_RESOLUTION_VAL_8bit, ///< 8 bit resolution. + NRF_SAADC_RESOLUTION_10BIT = SAADC_RESOLUTION_VAL_10bit, ///< 10 bit resolution. + NRF_SAADC_RESOLUTION_12BIT = SAADC_RESOLUTION_VAL_12bit, ///< 12 bit resolution. + NRF_SAADC_RESOLUTION_14BIT = SAADC_RESOLUTION_VAL_14bit ///< 14 bit resolution. +} nrf_saadc_resolution_t; + + +/** + * @brief Input selection for the analog-to-digital converter. + */ +typedef enum +{ + NRF_SAADC_INPUT_DISABLED = SAADC_CH_PSELP_PSELP_NC, ///< Not connected. + NRF_SAADC_INPUT_AIN0 = SAADC_CH_PSELP_PSELP_AnalogInput0, ///< Analog input 0 (AIN0). + NRF_SAADC_INPUT_AIN1 = SAADC_CH_PSELP_PSELP_AnalogInput1, ///< Analog input 1 (AIN1). + NRF_SAADC_INPUT_AIN2 = SAADC_CH_PSELP_PSELP_AnalogInput2, ///< Analog input 2 (AIN2). + NRF_SAADC_INPUT_AIN3 = SAADC_CH_PSELP_PSELP_AnalogInput3, ///< Analog input 3 (AIN3). + NRF_SAADC_INPUT_AIN4 = SAADC_CH_PSELP_PSELP_AnalogInput4, ///< Analog input 4 (AIN4). + NRF_SAADC_INPUT_AIN5 = SAADC_CH_PSELP_PSELP_AnalogInput5, ///< Analog input 5 (AIN5). + NRF_SAADC_INPUT_AIN6 = SAADC_CH_PSELP_PSELP_AnalogInput6, ///< Analog input 6 (AIN6). + NRF_SAADC_INPUT_AIN7 = SAADC_CH_PSELP_PSELP_AnalogInput7, ///< Analog input 7 (AIN7). + NRF_SAADC_INPUT_VDD = SAADC_CH_PSELP_PSELP_VDD ///< VDD as input. +} nrf_saadc_input_t; + + +/** + * @brief Analog-to-digital converter oversampling mode. + */ +typedef enum +{ + NRF_SAADC_OVERSAMPLE_DISABLED = SAADC_OVERSAMPLE_OVERSAMPLE_Bypass, ///< No oversampling. + NRF_SAADC_OVERSAMPLE_2X = SAADC_OVERSAMPLE_OVERSAMPLE_Over2x, ///< Oversample 2x. + NRF_SAADC_OVERSAMPLE_4X = SAADC_OVERSAMPLE_OVERSAMPLE_Over4x, ///< Oversample 4x. + NRF_SAADC_OVERSAMPLE_8X = SAADC_OVERSAMPLE_OVERSAMPLE_Over8x, ///< Oversample 8x. + NRF_SAADC_OVERSAMPLE_16X = SAADC_OVERSAMPLE_OVERSAMPLE_Over16x, ///< Oversample 16x. + NRF_SAADC_OVERSAMPLE_32X = SAADC_OVERSAMPLE_OVERSAMPLE_Over32x, ///< Oversample 32x. + NRF_SAADC_OVERSAMPLE_64X = SAADC_OVERSAMPLE_OVERSAMPLE_Over64x, ///< Oversample 64x. + NRF_SAADC_OVERSAMPLE_128X = SAADC_OVERSAMPLE_OVERSAMPLE_Over128x, ///< Oversample 128x. + NRF_SAADC_OVERSAMPLE_256X = SAADC_OVERSAMPLE_OVERSAMPLE_Over256x ///< Oversample 256x. +} nrf_saadc_oversample_t; + + +/** + * @brief Analog-to-digital converter channel resistor control. + */ +typedef enum +{ + NRF_SAADC_RESISTOR_DISABLED = SAADC_CH_CONFIG_RESP_Bypass, ///< Bypass resistor ladder. + NRF_SAADC_RESISTOR_PULLDOWN = SAADC_CH_CONFIG_RESP_Pulldown, ///< Pull-down to GND. + NRF_SAADC_RESISTOR_PULLUP = SAADC_CH_CONFIG_RESP_Pullup, ///< Pull-up to VDD. + NRF_SAADC_RESISTOR_VDD1_2 = SAADC_CH_CONFIG_RESP_VDD1_2 ///< Set input at VDD/2. +} nrf_saadc_resistor_t; + + +/** + * @brief Gain factor of the analog-to-digital converter input. + */ +typedef enum +{ + NRF_SAADC_GAIN1_6 = SAADC_CH_CONFIG_GAIN_Gain1_6, ///< Gain factor 1/6. + NRF_SAADC_GAIN1_5 = SAADC_CH_CONFIG_GAIN_Gain1_5, ///< Gain factor 1/5. + NRF_SAADC_GAIN1_4 = SAADC_CH_CONFIG_GAIN_Gain1_4, ///< Gain factor 1/4. + NRF_SAADC_GAIN1_3 = SAADC_CH_CONFIG_GAIN_Gain1_3, ///< Gain factor 1/3. + NRF_SAADC_GAIN1_2 = SAADC_CH_CONFIG_GAIN_Gain1_2, ///< Gain factor 1/2. + NRF_SAADC_GAIN1 = SAADC_CH_CONFIG_GAIN_Gain1, ///< Gain factor 1. + NRF_SAADC_GAIN2 = SAADC_CH_CONFIG_GAIN_Gain2, ///< Gain factor 2. + NRF_SAADC_GAIN4 = SAADC_CH_CONFIG_GAIN_Gain4, ///< Gain factor 4. +} nrf_saadc_gain_t; + + +/** + * @brief Reference selection for the analog-to-digital converter. + */ +typedef enum +{ + NRF_SAADC_REFERENCE_INTERNAL = SAADC_CH_CONFIG_REFSEL_Internal, ///< Internal reference (0.6 V). + NRF_SAADC_REFERENCE_VDD4 = SAADC_CH_CONFIG_REFSEL_VDD1_4 ///< VDD/4 as reference. +} nrf_saadc_reference_t; + + +/** + * @brief Analog-to-digital converter acquisition time. + */ +typedef enum +{ + NRF_SAADC_ACQTIME_3US = SAADC_CH_CONFIG_TACQ_3us, ///< 3 us. + NRF_SAADC_ACQTIME_5US = SAADC_CH_CONFIG_TACQ_5us, ///< 5 us. + NRF_SAADC_ACQTIME_10US = SAADC_CH_CONFIG_TACQ_10us, ///< 10 us. + NRF_SAADC_ACQTIME_15US = SAADC_CH_CONFIG_TACQ_15us, ///< 15 us. + NRF_SAADC_ACQTIME_20US = SAADC_CH_CONFIG_TACQ_20us, ///< 20 us. + NRF_SAADC_ACQTIME_40US = SAADC_CH_CONFIG_TACQ_40us ///< 40 us. +} nrf_saadc_acqtime_t; + + +/** + * @brief Analog-to-digital converter channel mode. + */ +typedef enum +{ + NRF_SAADC_MODE_SINGLE_ENDED = SAADC_CH_CONFIG_MODE_SE, ///< Single ended, PSELN will be ignored, negative input to ADC shorted to GND. + NRF_SAADC_MODE_DIFFERENTIAL = SAADC_CH_CONFIG_MODE_Diff ///< Differential mode. +} nrf_saadc_mode_t; + + +/** + * @brief Analog-to-digital converter tasks. + */ +typedef enum /*lint -save -e30 -esym(628,__INTADDR__) */ +{ + NRF_SAADC_TASK_START = offsetof(NRF_SAADC_Type, TASKS_START), ///< Start the ADC and prepare the result buffer in RAM. + NRF_SAADC_TASK_SAMPLE = offsetof(NRF_SAADC_Type, TASKS_SAMPLE), ///< Take one ADC sample. If scan is enabled, all channels are sampled. + NRF_SAADC_TASK_STOP = offsetof(NRF_SAADC_Type, TASKS_STOP), ///< Stop the ADC and terminate any on-going conversion. + NRF_SAADC_TASK_CALIBRATEOFFSET = offsetof(NRF_SAADC_Type, TASKS_CALIBRATEOFFSET), ///< Starts offset auto-calibration. +} nrf_saadc_task_t; + + +/** + * @brief Analog-to-digital converter events. + */ +typedef enum /*lint -save -e30 -esym(628,__INTADDR__) */ +{ + NRF_SAADC_EVENT_STARTED = offsetof(NRF_SAADC_Type, EVENTS_STARTED), ///< The ADC has started. + NRF_SAADC_EVENT_END = offsetof(NRF_SAADC_Type, EVENTS_END), ///< The ADC has filled up the result buffer. + NRF_SAADC_EVENT_CALIBRATEDONE = offsetof(NRF_SAADC_Type, EVENTS_CALIBRATEDONE), ///< Calibration is complete. + NRF_SAADC_EVENT_STOPPED = offsetof(NRF_SAADC_Type, EVENTS_STOPPED), ///< The ADC has stopped. + NRF_SAADC_EVENT_CH0_LIMITH = offsetof(NRF_SAADC_Type, EVENTS_CH[0].LIMITH), ///< Last result is equal or above CH[0].LIMIT.HIGH. + NRF_SAADC_EVENT_CH0_LIMITL = offsetof(NRF_SAADC_Type, EVENTS_CH[0].LIMITL), ///< Last result is equal or below CH[0].LIMIT.LOW. + NRF_SAADC_EVENT_CH1_LIMITH = offsetof(NRF_SAADC_Type, EVENTS_CH[1].LIMITH), ///< Last result is equal or above CH[1].LIMIT.HIGH. + NRF_SAADC_EVENT_CH1_LIMITL = offsetof(NRF_SAADC_Type, EVENTS_CH[1].LIMITL), ///< Last result is equal or below CH[1].LIMIT.LOW. + NRF_SAADC_EVENT_CH2_LIMITH = offsetof(NRF_SAADC_Type, EVENTS_CH[2].LIMITH), ///< Last result is equal or above CH[2].LIMIT.HIGH. + NRF_SAADC_EVENT_CH2_LIMITL = offsetof(NRF_SAADC_Type, EVENTS_CH[2].LIMITL), ///< Last result is equal or below CH[2].LIMIT.LOW. + NRF_SAADC_EVENT_CH3_LIMITH = offsetof(NRF_SAADC_Type, EVENTS_CH[3].LIMITH), ///< Last result is equal or above CH[3].LIMIT.HIGH. + NRF_SAADC_EVENT_CH3_LIMITL = offsetof(NRF_SAADC_Type, EVENTS_CH[3].LIMITL), ///< Last result is equal or below CH[3].LIMIT.LOW. + NRF_SAADC_EVENT_CH4_LIMITH = offsetof(NRF_SAADC_Type, EVENTS_CH[4].LIMITH), ///< Last result is equal or above CH[4].LIMIT.HIGH. + NRF_SAADC_EVENT_CH4_LIMITL = offsetof(NRF_SAADC_Type, EVENTS_CH[4].LIMITL), ///< Last result is equal or below CH[4].LIMIT.LOW. + NRF_SAADC_EVENT_CH5_LIMITH = offsetof(NRF_SAADC_Type, EVENTS_CH[5].LIMITH), ///< Last result is equal or above CH[5].LIMIT.HIGH. + NRF_SAADC_EVENT_CH5_LIMITL = offsetof(NRF_SAADC_Type, EVENTS_CH[5].LIMITL), ///< Last result is equal or below CH[5].LIMIT.LOW. + NRF_SAADC_EVENT_CH6_LIMITH = offsetof(NRF_SAADC_Type, EVENTS_CH[6].LIMITH), ///< Last result is equal or above CH[6].LIMIT.HIGH. + NRF_SAADC_EVENT_CH6_LIMITL = offsetof(NRF_SAADC_Type, EVENTS_CH[6].LIMITL), ///< Last result is equal or below CH[6].LIMIT.LOW. + NRF_SAADC_EVENT_CH7_LIMITH = offsetof(NRF_SAADC_Type, EVENTS_CH[7].LIMITH), ///< Last result is equal or above CH[7].LIMIT.HIGH. + NRF_SAADC_EVENT_CH7_LIMITL = offsetof(NRF_SAADC_Type, EVENTS_CH[7].LIMITL) ///< Last result is equal or below CH[7].LIMIT.LOW. +} nrf_saadc_event_t; + + +/** + * @brief Analog-to-digital converter interrupt masks. + */ +typedef enum +{ + NRF_SAADC_INT_STARTED = SAADC_INTENSET_STARTED_Msk, ///< Interrupt on EVENTS_STARTED event. + NRF_SAADC_INT_END = SAADC_INTENSET_END_Msk, ///< Interrupt on EVENTS_END event. + NRF_SAADC_INT_STOPPED = SAADC_INTENSET_STOPPED_Msk, ///< Interrupt on EVENTS_STOPPED event. + NRF_SAADC_INT_CH0LIMITH = SAADC_INTENSET_CH0LIMITH_Msk, ///< Interrupt on EVENTS_CH[0].LIMITH event. + NRF_SAADC_INT_CH0LIMITL = SAADC_INTENSET_CH0LIMITL_Msk, ///< Interrupt on EVENTS_CH[0].LIMITL event. + NRF_SAADC_INT_CH1LIMITH = SAADC_INTENSET_CH1LIMITH_Msk, ///< Interrupt on EVENTS_CH[1].LIMITH event. + NRF_SAADC_INT_CH1LIMITL = SAADC_INTENSET_CH1LIMITL_Msk, ///< Interrupt on EVENTS_CH[1].LIMITL event. + NRF_SAADC_INT_CH2LIMITH = SAADC_INTENSET_CH2LIMITH_Msk, ///< Interrupt on EVENTS_CH[2].LIMITH event. + NRF_SAADC_INT_CH2LIMITL = SAADC_INTENSET_CH2LIMITL_Msk, ///< Interrupt on EVENTS_CH[2].LIMITL event. + NRF_SAADC_INT_CH3LIMITH = SAADC_INTENSET_CH3LIMITH_Msk, ///< Interrupt on EVENTS_CH[3].LIMITH event. + NRF_SAADC_INT_CH3LIMITL = SAADC_INTENSET_CH3LIMITL_Msk, ///< Interrupt on EVENTS_CH[3].LIMITL event. + NRF_SAADC_INT_CH4LIMITH = SAADC_INTENSET_CH4LIMITH_Msk, ///< Interrupt on EVENTS_CH[4].LIMITH event. + NRF_SAADC_INT_CH4LIMITL = SAADC_INTENSET_CH4LIMITL_Msk, ///< Interrupt on EVENTS_CH[4].LIMITL event. + NRF_SAADC_INT_CH5LIMITH = SAADC_INTENSET_CH5LIMITH_Msk, ///< Interrupt on EVENTS_CH[5].LIMITH event. + NRF_SAADC_INT_CH5LIMITL = SAADC_INTENSET_CH5LIMITL_Msk, ///< Interrupt on EVENTS_CH[5].LIMITL event. + NRF_SAADC_INT_CH6LIMITH = SAADC_INTENSET_CH6LIMITH_Msk, ///< Interrupt on EVENTS_CH[6].LIMITH event. + NRF_SAADC_INT_CH6LIMITL = SAADC_INTENSET_CH6LIMITL_Msk, ///< Interrupt on EVENTS_CH[6].LIMITL event. + NRF_SAADC_INT_CH7LIMITH = SAADC_INTENSET_CH7LIMITH_Msk, ///< Interrupt on EVENTS_CH[7].LIMITH event. + NRF_SAADC_INT_CH7LIMITL = SAADC_INTENSET_CH7LIMITL_Msk, ///< Interrupt on EVENTS_CH[7].LIMITL event. + NRF_SAADC_INT_ALL = 0x7FFFFFFFUL ///< Mask of all interrupts. +} nrf_saadc_int_mask_t; + + +/** + * @brief Analog-to-digital converter value limit type. + */ +typedef enum +{ + NRF_SAADC_LIMIT_LOW = 0, + NRF_SAADC_LIMIT_HIGH = 1 +} nrf_saadc_limit_t; + + +typedef int16_t nrf_saadc_value_t; ///< Type of a single ADC conversion result. + + +/** + * @brief Analog-to-digital converter configuration structure. + */ +typedef struct +{ + nrf_saadc_resolution_t resolution; + nrf_saadc_oversample_t oversample; + nrf_saadc_value_t * buffer; + uint32_t buffer_size; +} nrf_saadc_config_t; + + +/** + * @brief Analog-to-digital converter channel configuration structure. + */ +typedef struct +{ + nrf_saadc_resistor_t resistor_p; + nrf_saadc_resistor_t resistor_n; + nrf_saadc_gain_t gain; + nrf_saadc_reference_t reference; + nrf_saadc_acqtime_t acq_time; + nrf_saadc_mode_t mode; + nrf_saadc_input_t pin_p; + nrf_saadc_input_t pin_n; +} nrf_saadc_channel_config_t; + + +/** + * @brief Function for triggering a specific SAADC task. + * + * @param[in] saadc_task SAADC task. + */ +__STATIC_INLINE void nrf_saadc_task_trigger(nrf_saadc_task_t saadc_task) +{ + *((volatile uint32_t *)((uint8_t *)NRF_SAADC + (uint32_t)saadc_task)) = 0x1UL; +} + + +/** + * @brief Function for getting the address of a specific SAADC task register. + * + * @param[in] saadc_task SAADC task. + * + * @return Address of the specified SAADC task. + */ +__STATIC_INLINE uint32_t nrf_saadc_task_address_get(nrf_saadc_task_t saadc_task) +{ + return (uint32_t)((uint8_t *)NRF_SAADC + (uint32_t)saadc_task); +} + + +/** + * @brief Function for getting the state of a specific SAADC event. + * + * @param[in] saadc_event SAADC event. + * + * @return State of the specified SAADC event. + */ +__STATIC_INLINE bool nrf_saadc_event_check(nrf_saadc_event_t saadc_event) +{ + return (bool)*(volatile uint32_t *)((uint8_t *)NRF_SAADC + (uint32_t)saadc_event); +} + + +/** + * @brief Function for clearing the specific SAADC event. + * + * @param[in] saadc_event SAADC event. + */ +__STATIC_INLINE void nrf_saadc_event_clear(nrf_saadc_event_t saadc_event) +{ + *((volatile uint32_t *)((uint8_t *)NRF_SAADC + (uint32_t)saadc_event)) = 0x0UL; +} + + +/** + * @brief Function for getting the address of a specific SAADC event register. + * + * @param[in] saadc_event SAADC event. + * + * @return Address of the specified SAADC event. + */ +__STATIC_INLINE volatile uint32_t * nrf_saadc_event_address_get(nrf_saadc_event_t saadc_event) +{ + return (volatile uint32_t *)((uint8_t *)NRF_SAADC + (uint32_t)saadc_event); +} + + +/** + * @brief Function for getting the address of a specific SAADC limit event register. + * + * @param[in] channel Channel number. + * @param[in] limit_type Low limit or high limit. + * + * @return Address of the specified SAADC limit event. + */ +__STATIC_INLINE volatile uint32_t * nrf_saadc_event_limit_address_get(uint8_t channel, nrf_saadc_limit_t limit_type) +{ + ASSERT(channel < NRF_SAADC_CHANNEL_COUNT); + if (limit_type == NRF_SAADC_LIMIT_HIGH) + { + return &NRF_SAADC->EVENTS_CH[channel].LIMITH; + } + else + { + return &NRF_SAADC->EVENTS_CH[channel].LIMITL; + } +} + + +/** + * @brief Function for getting the SAADC channel monitoring limit events. + * + * @param[in] channel Channel number. + * @param[in] limit_type Low limit or high limit. + */ +__STATIC_INLINE nrf_saadc_event_t nrf_saadc_event_limit_get(uint8_t channel, nrf_saadc_limit_t limit_type) +{ + if (limit_type == NRF_SAADC_LIMIT_HIGH) + { + return (nrf_saadc_event_t)( (uint32_t) NRF_SAADC_EVENT_CH0_LIMITH + + (uint32_t) (NRF_SAADC_EVENT_CH1_LIMITH - NRF_SAADC_EVENT_CH0_LIMITH) + * (uint32_t) channel ); + } + else + { + return (nrf_saadc_event_t)( (uint32_t) NRF_SAADC_EVENT_CH0_LIMITL + + (uint32_t) (NRF_SAADC_EVENT_CH1_LIMITL - NRF_SAADC_EVENT_CH0_LIMITL) + * (uint32_t) channel ); + } +} + + +/** + * @brief Function for configuring the input pins for a specific SAADC channel. + * + * @param[in] channel Channel number. + * @param[in] pselp Positive input. + * @param[in] pseln Negative input. Set to NRF_SAADC_INPUT_DISABLED in single ended mode. + */ +__STATIC_INLINE void nrf_saadc_channel_input_set(uint8_t channel, + nrf_saadc_input_t pselp, + nrf_saadc_input_t pseln) +{ + NRF_SAADC->CH[channel].PSELN = pseln; + NRF_SAADC->CH[channel].PSELP = pselp; +} + + +/** + * @brief Function for setting the SAADC channel monitoring limits. + * + * @param[in] channel Channel number. + * @param[in] low Low limit. + * @param[in] high High limit. + */ +__STATIC_INLINE void nrf_saadc_channel_limits_set(uint8_t channel, int16_t low, int16_t high) +{ + NRF_SAADC->CH[channel].LIMIT = ( + (((uint32_t) low << SAADC_CH_LIMIT_LOW_Pos) & SAADC_CH_LIMIT_LOW_Msk) + | (((uint32_t) high << SAADC_CH_LIMIT_HIGH_Pos) & SAADC_CH_LIMIT_HIGH_Msk)); +} + + +/** + * @brief Function for enabling specified SAADC interrupts. + * + * @param[in] saadc_int_mask Interrupt(s) to enable. + */ +__STATIC_INLINE void nrf_saadc_int_enable(uint32_t saadc_int_mask) +{ + NRF_SAADC->INTENSET = saadc_int_mask; +} + + +/** + * @brief Function for retrieving the state of specified SAADC interrupts. + * + * @param[in] saadc_int_mask Interrupt(s) to check. + * + * @retval true If all specified interrupts are enabled. + * @retval false If at least one of the given interrupts is not enabled. + */ +__STATIC_INLINE bool nrf_saadc_int_enable_check(uint32_t saadc_int_mask) +{ + return (bool)(NRF_SAADC->INTENSET & saadc_int_mask); +} + + +/** + * @brief Function for disabling specified interrupts. + * + * @param saadc_int_mask Interrupt(s) to disable. + */ +__STATIC_INLINE void nrf_saadc_int_disable(uint32_t saadc_int_mask) +{ + NRF_SAADC->INTENCLR = saadc_int_mask; +} + + +/** + * @brief Function for generating masks for SAADC channel limit interrupts. + * + * @param[in] channel SAADC channel number. + * @param[in] limit_type Limit type. + * + * @returns Interrupt mask. + */ +__STATIC_INLINE uint32_t nrf_saadc_limit_int_get(uint8_t channel, nrf_saadc_limit_t limit_type) +{ + ASSERT(channel < NRF_SAADC_CHANNEL_COUNT); + uint32_t mask = (limit_type == NRF_SAADC_LIMIT_LOW) ? NRF_SAADC_INT_CH0LIMITL : NRF_SAADC_INT_CH0LIMITH; + return mask << (channel * 2); +} + + +/** + * @brief Function for checking whether the SAADC is busy. + * + * This function checks whether the analog-to-digital converter is busy with a conversion. + * + * @retval true If the SAADC is busy. + * @retval false If the SAADC is not busy. + */ +__STATIC_INLINE bool nrf_saadc_busy_check(void) +{ + //return ((NRF_SAADC->STATUS & SAADC_STATUS_STATUS_Msk) == SAADC_STATUS_STATUS_Msk); + //simplified for performance + return NRF_SAADC->STATUS; +} + + +/** + * @brief Function for enabling the SAADC. + * + * The analog-to-digital converter must be enabled before use. + */ +__STATIC_INLINE void nrf_saadc_enable(void) +{ + NRF_SAADC->ENABLE = (SAADC_ENABLE_ENABLE_Enabled << SAADC_ENABLE_ENABLE_Pos); +} + + +/** + * @brief Function for disabling the SAADC. + */ +__STATIC_INLINE void nrf_saadc_disable(void) +{ + NRF_SAADC->ENABLE = (SAADC_ENABLE_ENABLE_Disabled << SAADC_ENABLE_ENABLE_Pos); +} + + +/** + * @brief Function for checking if the SAADC is enabled. + * + * @retval true If the SAADC is enabled. + * @retval false If the SAADC is not enabled. + */ +__STATIC_INLINE bool nrf_saadc_enable_check(void) +{ + //simplified for performance + return NRF_SAADC->ENABLE; +} + + +/** + * @brief Function for initializing the SAADC result buffer. + * + * @param[in] buffer Pointer to the result buffer. + * @param[in] num Size of buffer in words. + */ +__STATIC_INLINE void nrf_saadc_buffer_init(nrf_saadc_value_t * buffer, uint32_t num) +{ + NRF_SAADC->RESULT.PTR = (uint32_t)buffer; + NRF_SAADC->RESULT.MAXCNT = num; +} + +/** + * @brief Function for getting the number of buffer words transferred since last START operation. + * + * @returns Number of words transferred. + */ +__STATIC_INLINE uint16_t nrf_saadc_amount_get(void) +{ + return NRF_SAADC->RESULT.AMOUNT; +} + + +/** + * @brief Function for setting the SAADC sample resolution. + * + * @param[in] resolution Bit resolution. + */ +__STATIC_INLINE void nrf_saadc_resolution_set(nrf_saadc_resolution_t resolution) +{ + NRF_SAADC->RESOLUTION = resolution; +} + + +/** + * @brief Function for configuring the oversampling feature. + * + * @param[in] oversample Oversampling mode. + */ +__STATIC_INLINE void nrf_saadc_oversample_set(nrf_saadc_oversample_t oversample) +{ + NRF_SAADC->OVERSAMPLE = oversample; +} + +/** + * @brief Function for getting the oversampling feature configuration. + * + * @return Oversampling configuration. + */ +__STATIC_INLINE nrf_saadc_oversample_t nrf_saadc_oversample_get(void) +{ + return (nrf_saadc_oversample_t)NRF_SAADC->OVERSAMPLE; +} + +/** + * @brief Function for initializing the SAADC channel. + * + * @param[in] channel Channel number. + * @param[in] config Pointer to the channel configuration structure. + */ +void nrf_saadc_channel_init(uint8_t channel, nrf_saadc_channel_config_t const * const config); + +/** + *@} + **/ + +#endif /* NRF_SAADC_H_ */ From 44bef4100e179b8ab23693c116ea317c565a0e18 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Wed, 29 Jun 2016 08:04:33 +0200 Subject: [PATCH 34/67] AnalogIn api implenetation for nRF52 - supplement in target descriptor --- hal/targets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hal/targets.json b/hal/targets.json index 035ddb7bb6..66aeb639d4 100644 --- a/hal/targets.json +++ b/hal/targets.json @@ -1773,6 +1773,6 @@ "NRF52_PAN_62", "NRF52_PAN_63" ], - "device_has": ["ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH"] + "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH"] } } From f19efb6a43c4500b551bce3cb08097b25a1e6a3c Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Wed, 29 Jun 2016 12:29:38 +0200 Subject: [PATCH 35/67] AnalogIn for nRF51 Fixes multiinstances was not suported for nrf51 made nrf_saadc SDK hal private for nRF52 --- .../TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c | 2 +- .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.c | 4 ++++ .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.h | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c index ac349e0d36..11a40c22db 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c @@ -53,7 +53,7 @@ void analogin_init(analogin_t *obj, PinName pin) ret_code_t ret_code; // p_config, event_handler ret_code = nrf_drv_adc_init(NULL , NULL); // select blocking mode - MBED_ASSERT(ret_code == NRF_SUCCESS); + MBED_ASSERT((ret_code == NRF_SUCCESS) || (ret_code == NRF_ERROR_INVALID_STATE)); //NRF_ERROR_INVALID_STATE expected for multiple channels used. } uint16_t analogin_read_u16(analogin_t *obj) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.c index b2d5cc871b..bddd186486 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.c @@ -10,6 +10,7 @@ * */ +#ifdef NRF52 /** * @file * @brief SAADC HAL implementation @@ -29,3 +30,6 @@ void nrf_saadc_channel_init(uint8_t channel, nrf_saadc_channel_config_t const * nrf_saadc_channel_input_set(channel, config->pin_p, config->pin_n); return; } + +#endif //NRF52 + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.h index a3044d8b1c..36c318fc00 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.h @@ -14,6 +14,8 @@ #ifndef NRF_SAADC_H_ #define NRF_SAADC_H_ +#ifdef NRF52 + /** * @defgroup nrf_saadc_hal SAADC HAL * @{ @@ -27,6 +29,8 @@ #include "nrf.h" #include "nrf_assert.h" + + #define NRF_SAADC_CHANNEL_COUNT 8 /** @@ -550,5 +554,7 @@ void nrf_saadc_channel_init(uint8_t channel, nrf_saadc_channel_config_t const * /** *@} **/ + +#endif // NRF52 #endif /* NRF_SAADC_H_ */ From 9d137c834c464215bf684da12cca44121650c959 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Wed, 29 Jun 2016 15:23:11 +0200 Subject: [PATCH 36/67] AnalogIn for nRF52 add u16 readout API realization. Polish rest of the code. --- .../TARGET_MCU_NRF52832/analogin_api.c | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/analogin_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/analogin_api.c index b712a3004f..c5d947dea6 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/analogin_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/analogin_api.c @@ -25,12 +25,12 @@ #define ADC_12BIT_RANGE 0xFFF #define ADC_RANGE ADC_12BIT_RANGE -void analog_in_event_handler(nrf_drv_saadc_evt_t const *p_event)// type of nrf_drv_saadc_event_handler_t +static void analog_in_event_handler(nrf_drv_saadc_evt_t const *p_event)// type of nrf_drv_saadc_event_handler_t { (void) p_event; } -const nrf_drv_saadc_config_t saadc_config = +static const nrf_drv_saadc_config_t saadc_config = { .resolution = NRF_SAADC_RESOLUTION_12BIT, .oversample = NRF_SAADC_OVERSAMPLE_DISABLED, @@ -39,7 +39,6 @@ const nrf_drv_saadc_config_t saadc_config = void analogin_init(analogin_t *obj, PinName pin) { - /// @todo check if initialized ret_code_t ret_code; ret_code = nrf_drv_saadc_init(&saadc_config, analog_in_event_handler); @@ -52,13 +51,17 @@ void analogin_init(analogin_t *obj, PinName pin) obj->adc_pin = saadcIn - 1; nrf_saadc_channel_config_t channel_config = - NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(saadcIn); + NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(saadcIn); //Single ended, negative input to ADC shorted to GND. ret_code = nrf_drv_saadc_channel_init(obj->adc_pin, &channel_config); MBED_ASSERT(ret_code == NRF_SUCCESS); } -int16_t analogin_read_i16(analogin_t *obj) +/** + * NRF52 SAR ADC module provides measurement with sign. + * Already mbed API dosn't support readout of signed integer value. + */ +static int16_t analogin_read_i16(analogin_t *obj) { nrf_saadc_value_t adc_value; ret_code_t ret_code; @@ -69,6 +72,23 @@ int16_t analogin_read_i16(analogin_t *obj) return adc_value; } +uint16_t analogin_read_u16(analogin_t *obj) +{ + int16_t adc_value; + + adc_value = analogin_read_i16(obj); + + if (adc_value < 0) + { + // Even in the single ended mode measured value can be {-0}. Saturation for avoid casting to a big integer. + return 0; + } + else + { + return (uint16_t) adc_value; + } +} + float analogin_read(analogin_t *obj) { int16_t value = analogin_read_i16(obj); From adf15c811736ab63588e0ed7b2165e7501e247b1 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Thu, 30 Jun 2016 09:32:48 +0200 Subject: [PATCH 37/67] CR of AnalogIn --- .../TARGET_MCU_NRF52832/analogin_api.c | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/analogin_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/analogin_api.c index c5d947dea6..c527261e86 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/analogin_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/analogin_api.c @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + #include "mbed_assert.h" #include "analogin_api.h" #include "cmsis.h" @@ -57,27 +58,15 @@ void analogin_init(analogin_t *obj, PinName pin) MBED_ASSERT(ret_code == NRF_SUCCESS); } -/** - * NRF52 SAR ADC module provides measurement with sign. - * Already mbed API dosn't support readout of signed integer value. - */ -static int16_t analogin_read_i16(analogin_t *obj) + +uint16_t analogin_read_u16(analogin_t *obj) { - nrf_saadc_value_t adc_value; + int16_t adc_value; ret_code_t ret_code; ret_code = nrf_drv_saadc_sample_convert(obj->adc_pin, &adc_value); MBED_ASSERT(ret_code == NRF_SUCCESS); - return adc_value; -} - -uint16_t analogin_read_u16(analogin_t *obj) -{ - int16_t adc_value; - - adc_value = analogin_read_i16(obj); - if (adc_value < 0) { // Even in the single ended mode measured value can be {-0}. Saturation for avoid casting to a big integer. @@ -91,7 +80,7 @@ uint16_t analogin_read_u16(analogin_t *obj) float analogin_read(analogin_t *obj) { - int16_t value = analogin_read_i16(obj); + uint16_t value = analogin_read_u16(obj); return (float)value * (1.0f / (float)ADC_RANGE); } From f02d431b2d58bf88da9fa580b104e830b2f71144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C5=82=C4=85bek=2C=20Andrzej?= Date: Wed, 29 Jun 2016 06:53:21 +0200 Subject: [PATCH 38/67] Added multi-instance and slave mode support to spi_api. --- hal/targets.json | 4 +- .../TARGET_MCU_NRF51822/sdk/nrf_drv_config.h | 4 +- .../TARGET_MCU_NRF52832/sdk/nrf_drv_config.h | 8 +- .../hal/TARGET_NORDIC/TARGET_NRF5/objects.h | 6 +- .../sdk/drivers_nrf/hal/nrf_spis.h | 512 ++++++++++++++++++ .../sdk/drivers_nrf/spi_slave/nrf_drv_spis.c | 396 ++++++++++++++ .../sdk/drivers_nrf/spi_slave/nrf_drv_spis.h | 223 ++++++++ .../hal/TARGET_NORDIC/TARGET_NRF5/spi_api.c | 458 ++++++++++++---- 8 files changed, 1500 insertions(+), 111 deletions(-) create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spis.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_slave/nrf_drv_spis.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_slave/nrf_drv_spis.h diff --git a/hal/targets.json b/hal/targets.json index 3c48cbfd93..e17ff09327 100644 --- a/hal/targets.json +++ b/hal/targets.json @@ -1375,7 +1375,7 @@ "supported_form_factors": ["ARDUINO"], "inherits": ["MCU_NRF51_32K"], "progen": {"target": "nrf51-dk"}, - "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH"] + "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE"] }, "NRF51_DK_BOOT": { "supported_form_factors": ["ARDUINO"], @@ -1773,6 +1773,6 @@ "NRF52_PAN_62", "NRF52_PAN_63" ], - "device_has": ["ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH"] + "device_has": ["ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE"] } } diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h index d3dc577462..9556c57519 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h @@ -228,7 +228,7 @@ #define PWM_COUNT (PWM0_ENABLED + PWM1_ENABLED + PWM2_ENABLED) /* SPI */ -#define SPI0_ENABLED 1 +#define SPI0_ENABLED 0 #if (SPI0_ENABLED == 1) #define SPI0_USE_EASY_DMA 0 @@ -281,7 +281,7 @@ #define SPIS0_INSTANCE_INDEX 0 #endif -#define SPIS1_ENABLED 0 +#define SPIS1_ENABLED 1 #if (SPIS1_ENABLED == 1) #define SPIS1_CONFIG_SCK_PIN 2 diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h index 3fb5149d3c..0e06e882ae 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h @@ -254,7 +254,7 @@ #define SPI1_INSTANCE_INDEX (SPI0_ENABLED) #endif -#define SPI2_ENABLED 0 +#define SPI2_ENABLED 1 #if (SPI2_ENABLED == 1) #define SPI2_USE_EASY_DMA 0 @@ -270,7 +270,7 @@ #define SPI_COUNT (SPI0_ENABLED + SPI1_ENABLED + SPI2_ENABLED) /* SPIS */ -#define SPIS0_ENABLED 0 +#define SPIS0_ENABLED 1 #if (SPIS0_ENABLED == 1) #define SPIS0_CONFIG_SCK_PIN 2 @@ -281,7 +281,7 @@ #define SPIS0_INSTANCE_INDEX 0 #endif -#define SPIS1_ENABLED 0 +#define SPIS1_ENABLED 1 #if (SPIS1_ENABLED == 1) #define SPIS1_CONFIG_SCK_PIN 2 @@ -292,7 +292,7 @@ #define SPIS1_INSTANCE_INDEX SPIS0_ENABLED #endif -#define SPIS2_ENABLED 0 +#define SPIS2_ENABLED 1 #if (SPIS2_ENABLED == 1) #define SPIS2_CONFIG_SCK_PIN 2 diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/objects.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/objects.h index 88090c3cca..96e5ca1c55 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/objects.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/objects.h @@ -21,8 +21,6 @@ #include "PeripheralNames.h" #include "PinNames.h" -#include "nrf_drv_spi.h" - #ifdef __cplusplus extern "C" { #endif @@ -31,9 +29,7 @@ struct serial_s { }; struct spi_s { - nrf_drv_spi_t *p_spi; - volatile bool busy; - bool async_mode; + uint8_t spi_idx; }; struct port_s { diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spis.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spis.h new file mode 100644 index 0000000000..077eb4155f --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spis.h @@ -0,0 +1,512 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** + * @defgroup nrf_spis_hal SPIS HAL + * @{ + * @ingroup nrf_spis + * + * @brief Hardware access layer for accessing the SPIS peripheral. + */ + +#ifndef NRF_SPIS_H__ +#define NRF_SPIS_H__ + +#include +#include +#include + +#include "nrf.h" + + +/** + * @brief This value can be used as a parameter for the @ref nrf_spis_pins_set + * function to specify that a given SPI signal (SCK, MOSI, or MISO) + * shall not be connected to a physical pin. + */ +#define NRF_SPIS_PIN_NOT_CONNECTED 0xFFFFFFFF + + +/** + * @brief SPIS tasks. + */ +typedef enum +{ + /*lint -save -e30*/ + NRF_SPIS_TASK_ACQUIRE = offsetof(NRF_SPIS_Type, TASKS_ACQUIRE), ///< Acquire SPI semaphore. + NRF_SPIS_TASK_RELEASE = offsetof(NRF_SPIS_Type, TASKS_RELEASE), ///< Release SPI semaphore, enabling the SPI slave to acquire it. + /*lint -restore*/ +} nrf_spis_task_t; + +/** + * @brief SPIS events. + */ +typedef enum +{ + /*lint -save -e30*/ + NRF_SPIS_EVENT_END = offsetof(NRF_SPIS_Type, EVENTS_END), ///< Granted transaction completed. + NRF_SPIS_EVENT_ACQUIRED = offsetof(NRF_SPIS_Type, EVENTS_ACQUIRED) ///< Semaphore acquired. + /*lint -restore*/ +} nrf_spis_event_t; + +/** + * @brief SPIS shortcuts. + */ +typedef enum +{ + NRF_SPIS_SHORT_END_ACQUIRE = SPIS_SHORTS_END_ACQUIRE_Msk ///< Shortcut between END event and ACQUIRE task. +} nrf_spis_short_mask_t; + +/** + * @brief SPIS interrupts. + */ +typedef enum +{ + NRF_SPIS_INT_END_MASK = SPIS_INTENSET_END_Msk, ///< Interrupt on END event. + NRF_SPIS_INT_ACQUIRED_MASK = SPIS_INTENSET_ACQUIRED_Msk ///< Interrupt on ACQUIRED event. +} nrf_spis_int_mask_t; + +/** + * @brief SPI modes. + */ +typedef enum +{ + NRF_SPIS_MODE_0, ///< SCK active high, sample on leading edge of clock. + NRF_SPIS_MODE_1, ///< SCK active high, sample on trailing edge of clock. + NRF_SPIS_MODE_2, ///< SCK active low, sample on leading edge of clock. + NRF_SPIS_MODE_3 ///< SCK active low, sample on trailing edge of clock. +} nrf_spis_mode_t; + +/** + * @brief SPI bit orders. + */ +typedef enum +{ + NRF_SPIS_BIT_ORDER_MSB_FIRST = SPIS_CONFIG_ORDER_MsbFirst, ///< Most significant bit shifted out first. + NRF_SPIS_BIT_ORDER_LSB_FIRST = SPIS_CONFIG_ORDER_LsbFirst ///< Least significant bit shifted out first. +} nrf_spis_bit_order_t; + +/** + * @brief SPI semaphore status. + */ +typedef enum +{ + NRF_SPIS_SEMSTAT_FREE = 0, ///< Semaphore is free. + NRF_SPIS_SEMSTAT_CPU = 1, ///< Semaphore is assigned to the CPU. + NRF_SPIS_SEMSTAT_SPIS = 2, ///< Semaphore is assigned to the SPI slave. + NRF_SPIS_SEMSTAT_CPUPENDING = 3 ///< Semaphore is assigned to the SPI, but a handover to the CPU is pending. +} nrf_spis_semstat_t; + +/** + * @brief SPIS status. + */ +typedef enum +{ + NRF_SPIS_STATUS_OVERREAD = SPIS_STATUS_OVERREAD_Msk, ///< TX buffer over-read detected and prevented. + NRF_SPIS_STATUS_OVERFLOW = SPIS_STATUS_OVERFLOW_Msk ///< RX buffer overflow detected and prevented. +} nrf_spis_status_mask_t; + +/** + * @brief Function for activating a specific SPIS task. + * + * @param[in] p_spis SPIS instance. + * @param[in] spis_task Task to activate. + */ +__STATIC_INLINE void nrf_spis_task_trigger(NRF_SPIS_Type * p_spis, + nrf_spis_task_t spis_task); + +/** + * @brief Function for getting the address of a specific SPIS task register. + * + * @param[in] p_spis SPIS instance. + * @param[in] spis_task Requested task. + * + * @return Address of the specified task register. + */ +__STATIC_INLINE uint32_t nrf_spis_task_address_get(NRF_SPIS_Type const * p_spis, + nrf_spis_task_t spis_task); + +/** + * @brief Function for clearing a specific SPIS event. + * + * @param[in] p_spis SPIS instance. + * @param[in] spis_event Event to clear. + */ +__STATIC_INLINE void nrf_spis_event_clear(NRF_SPIS_Type * p_spis, + nrf_spis_event_t spis_event); + +/** + * @brief Function for checking the state of a specific SPIS event. + * + * @param[in] p_spis SPIS instance. + * @param[in] spis_event Event to check. + * + * @retval true If the event is set. + * @retval false If the event is not set. + */ +__STATIC_INLINE bool nrf_spis_event_check(NRF_SPIS_Type const * p_spis, + nrf_spis_event_t spis_event); + +/** + * @brief Function for getting the address of a specific SPIS event register. + * + * @param[in] p_spis SPIS instance. + * @param[in] spis_event Requested event. + * + * @return Address of the specified event register. + */ +__STATIC_INLINE uint32_t nrf_spis_event_address_get(NRF_SPIS_Type const * p_spis, + nrf_spis_event_t spis_event); + +/** + * @brief Function for enabling specified shortcuts. + * + * @param[in] p_spis SPIS instance. + * @param[in] spis_shorts_mask Shortcuts to enable. + */ +__STATIC_INLINE void nrf_spis_shorts_enable(NRF_SPIS_Type * p_spis, + uint32_t spis_shorts_mask); + +/** + * @brief Function for disabling specified shortcuts. + * + * @param[in] p_spis SPIS instance. + * @param[in] spis_shorts_mask Shortcuts to disable. + */ +__STATIC_INLINE void nrf_spis_shorts_disable(NRF_SPIS_Type * p_spis, + uint32_t spis_shorts_mask); + +/** + * @brief Function for enabling specified interrupts. + * + * @param[in] p_spis SPIS instance. + * @param[in] spis_int_mask Interrupts to enable. + */ +__STATIC_INLINE void nrf_spis_int_enable(NRF_SPIS_Type * p_spis, + uint32_t spis_int_mask); + +/** + * @brief Function for disabling specified interrupts. + * + * @param[in] p_spis SPIS instance. + * @param[in] spis_int_mask Interrupts to disable. + */ +__STATIC_INLINE void nrf_spis_int_disable(NRF_SPIS_Type * p_spis, + uint32_t spis_int_mask); + +/** + * @brief Function for retrieving the state of a given interrupt. + * + * @param[in] p_spis SPIS instance. + * @param[in] spis_int Interrupt to check. + * + * @retval true If the interrupt is enabled. + * @retval false If the interrupt is not enabled. + */ +__STATIC_INLINE bool nrf_spis_int_enable_check(NRF_SPIS_Type const * p_spis, + nrf_spis_int_mask_t spis_int); + +/** + * @brief Function for enabling the SPIS peripheral. + * + * @param[in] p_spis SPIS instance. + */ +__STATIC_INLINE void nrf_spis_enable(NRF_SPIS_Type * p_spis); + +/** + * @brief Function for disabling the SPIS peripheral. + * + * @param[in] p_spis SPIS instance. + */ +__STATIC_INLINE void nrf_spis_disable(NRF_SPIS_Type * p_spis); + +/** + * @brief Function for retrieving the SPIS semaphore status. + * + * @param[in] p_spis SPIS instance. + * + * @returns Current semaphore status. + */ +__STATIC_INLINE nrf_spis_semstat_t nrf_spis_semaphore_status_get(NRF_SPIS_Type * p_spis); + +/** + * @brief Function for retrieving the SPIS status. + * + * @param[in] p_spis SPIS instance. + * + * @returns Current SPIS status. + */ +__STATIC_INLINE nrf_spis_status_mask_t nrf_spis_status_get(NRF_SPIS_Type * p_spis); + +/** + * @brief Function for configuring SPIS pins. + * + * If a given signal is not needed, pass the @ref NRF_SPIS_PIN_NOT_CONNECTED + * value instead of its pin number. + * + * @param[in] p_spis SPIS instance. + * @param[in] sck_pin SCK pin number. + * @param[in] mosi_pin MOSI pin number. + * @param[in] miso_pin MISO pin number. + * @param[in] csn_pin CSN pin number. + */ +__STATIC_INLINE void nrf_spis_pins_set(NRF_SPIS_Type * p_spis, + uint32_t sck_pin, + uint32_t mosi_pin, + uint32_t miso_pin, + uint32_t csn_pin); + +/** + * @brief Function for setting the transmit buffer. + * + * @param[in] p_spis SPIS instance. + * @param[in] p_buffer Pointer to the buffer that contains the data to send. + * @param[in] length Maximum number of data bytes to transmit. + */ +__STATIC_INLINE void nrf_spis_tx_buffer_set(NRF_SPIS_Type * p_spis, + uint8_t const * p_buffer, + uint8_t length); + +/** + * @brief Function for setting the receive buffer. + * + * @param[in] p_spis SPIS instance. + * @param[in] p_buffer Pointer to the buffer for received data. + * @param[in] length Maximum number of data bytes to receive. + */ +__STATIC_INLINE void nrf_spis_rx_buffer_set(NRF_SPIS_Type * p_spis, + uint8_t * p_buffer, + uint8_t length); + +/** + * @brief Function for getting the number of bytes transmitted + * in the last granted transaction. + * + * @param[in] p_spis SPIS instance. + * + * @returns Number of bytes transmitted. + */ +__STATIC_INLINE uint8_t nrf_spis_tx_amount_get(NRF_SPIS_Type const * p_spis); + +/** + * @brief Function for getting the number of bytes received + * in the last granted transaction. + * + * @param[in] p_spis SPIS instance. + * + * @returns Number of bytes received. + */ +__STATIC_INLINE uint8_t nrf_spis_rx_amount_get(NRF_SPIS_Type const * p_spis); + +/** + * @brief Function for setting the SPI configuration. + * + * @param[in] p_spis SPIS instance. + * @param[in] spi_mode SPI mode. + * @param[in] spi_bit_order SPI bit order. + */ +__STATIC_INLINE void nrf_spis_configure(NRF_SPIS_Type * p_spis, + nrf_spis_mode_t spi_mode, + nrf_spis_bit_order_t spi_bit_order); + +/** + * @brief Function for setting the default character. + * + * @param[in] p_spis SPIS instance. + * @param[in] def Default character that is clocked out in case of + * an overflow of the RXD buffer. + */ +__STATIC_INLINE void nrf_spis_def_set(NRF_SPIS_Type * p_spis, + uint8_t def); + +/** + * @brief Function for setting the over-read character. + * + * @param[in] p_spis SPIS instance. + * @param[in] orc Over-read character that is clocked out in case of + * an over-read of the TXD buffer. + */ +__STATIC_INLINE void nrf_spis_orc_set(NRF_SPIS_Type * p_spis, + uint8_t orc); + + +#ifndef SUPPRESS_INLINE_IMPLEMENTATION + +__STATIC_INLINE void nrf_spis_task_trigger(NRF_SPIS_Type * p_spis, + nrf_spis_task_t spis_task) +{ + *((volatile uint32_t *)((uint8_t *)p_spis + (uint32_t)spis_task)) = 0x1UL; +} + +__STATIC_INLINE uint32_t nrf_spis_task_address_get(NRF_SPIS_Type const * p_spis, + nrf_spis_task_t spis_task) +{ + return (uint32_t)p_spis + (uint32_t)spis_task; +} + +__STATIC_INLINE void nrf_spis_event_clear(NRF_SPIS_Type * p_spis, + nrf_spis_event_t spis_event) +{ + *((volatile uint32_t *)((uint8_t *)p_spis + (uint32_t)spis_event)) = 0x0UL; +} + +__STATIC_INLINE bool nrf_spis_event_check(NRF_SPIS_Type const * p_spis, + nrf_spis_event_t spis_event) +{ + return (bool)*(volatile uint32_t *)((uint8_t *)p_spis + (uint32_t)spis_event); +} + +__STATIC_INLINE uint32_t nrf_spis_event_address_get(NRF_SPIS_Type const * p_spis, + nrf_spis_event_t spis_event) +{ + return (uint32_t)p_spis + (uint32_t)spis_event; +} + +__STATIC_INLINE void nrf_spis_shorts_enable(NRF_SPIS_Type * p_spis, + uint32_t spis_shorts_mask) +{ + p_spis->SHORTS |= spis_shorts_mask; +} + +__STATIC_INLINE void nrf_spis_shorts_disable(NRF_SPIS_Type * p_spis, + uint32_t spis_shorts_mask) +{ + p_spis->SHORTS &= ~(spis_shorts_mask); +} + +__STATIC_INLINE void nrf_spis_int_enable(NRF_SPIS_Type * p_spis, + uint32_t spis_int_mask) +{ + p_spis->INTENSET = spis_int_mask; +} + +__STATIC_INLINE void nrf_spis_int_disable(NRF_SPIS_Type * p_spis, + uint32_t spis_int_mask) +{ + p_spis->INTENCLR = spis_int_mask; +} + +__STATIC_INLINE bool nrf_spis_int_enable_check(NRF_SPIS_Type const * p_spis, + nrf_spis_int_mask_t spis_int) +{ + return (bool)(p_spis->INTENSET & spis_int); +} + +__STATIC_INLINE void nrf_spis_enable(NRF_SPIS_Type * p_spis) +{ + p_spis->ENABLE = (SPIS_ENABLE_ENABLE_Enabled << SPIS_ENABLE_ENABLE_Pos); +} + +__STATIC_INLINE void nrf_spis_disable(NRF_SPIS_Type * p_spis) +{ + p_spis->ENABLE = (SPIS_ENABLE_ENABLE_Disabled << SPIS_ENABLE_ENABLE_Pos); +} + +__STATIC_INLINE nrf_spis_semstat_t nrf_spis_semaphore_status_get(NRF_SPIS_Type * p_spis) +{ + return (nrf_spis_semstat_t) ((p_spis->SEMSTAT & SPIS_SEMSTAT_SEMSTAT_Msk) + >> SPIS_SEMSTAT_SEMSTAT_Pos); +} + +__STATIC_INLINE nrf_spis_status_mask_t nrf_spis_status_get(NRF_SPIS_Type * p_spis) +{ + return (nrf_spis_status_mask_t) p_spis->STATUS; +} + +__STATIC_INLINE void nrf_spis_pins_set(NRF_SPIS_Type * p_spis, + uint32_t sck_pin, + uint32_t mosi_pin, + uint32_t miso_pin, + uint32_t csn_pin) +{ + p_spis->PSELSCK = sck_pin; + p_spis->PSELMOSI = mosi_pin; + p_spis->PSELMISO = miso_pin; + p_spis->PSELCSN = csn_pin; +} + +__STATIC_INLINE void nrf_spis_tx_buffer_set(NRF_SPIS_Type * p_spis, + uint8_t const * p_buffer, + uint8_t length) +{ + p_spis->TXDPTR = (uint32_t)p_buffer; + p_spis->MAXTX = length; +} + +__STATIC_INLINE void nrf_spis_rx_buffer_set(NRF_SPIS_Type * p_spis, + uint8_t * p_buffer, + uint8_t length) +{ + p_spis->RXDPTR = (uint32_t)p_buffer; + p_spis->MAXRX = length; +} + +__STATIC_INLINE uint8_t nrf_spis_tx_amount_get(NRF_SPIS_Type const * p_spis) +{ + return (uint8_t) p_spis->AMOUNTRX; +} + +__STATIC_INLINE uint8_t nrf_spis_rx_amount_get(NRF_SPIS_Type const * p_spis) +{ + return (uint8_t) p_spis->AMOUNTTX; +} + +__STATIC_INLINE void nrf_spis_configure(NRF_SPIS_Type * p_spis, + nrf_spis_mode_t spi_mode, + nrf_spis_bit_order_t spi_bit_order) +{ + uint32_t config = (spi_bit_order == NRF_SPIS_BIT_ORDER_MSB_FIRST ? + SPIS_CONFIG_ORDER_MsbFirst : SPIS_CONFIG_ORDER_LsbFirst); + + switch (spi_mode) + { + default: + case NRF_SPIS_MODE_0: + config |= (SPIS_CONFIG_CPOL_ActiveHigh << SPIS_CONFIG_CPOL_Pos) | + (SPIS_CONFIG_CPHA_Leading << SPIS_CONFIG_CPHA_Pos); + break; + + case NRF_SPIS_MODE_1: + config |= (SPIS_CONFIG_CPOL_ActiveHigh << SPIS_CONFIG_CPOL_Pos) | + (SPIS_CONFIG_CPHA_Trailing << SPIS_CONFIG_CPHA_Pos); + break; + + case NRF_SPIS_MODE_2: + config |= (SPIS_CONFIG_CPOL_ActiveLow << SPIS_CONFIG_CPOL_Pos) | + (SPIS_CONFIG_CPHA_Leading << SPIS_CONFIG_CPHA_Pos); + break; + + case NRF_SPIS_MODE_3: + config |= (SPIS_CONFIG_CPOL_ActiveLow << SPIS_CONFIG_CPOL_Pos) | + (SPIS_CONFIG_CPHA_Trailing << SPIS_CONFIG_CPHA_Pos); + break; + } + p_spis->CONFIG = config; +} + +__STATIC_INLINE void nrf_spis_orc_set(NRF_SPIS_Type * p_spis, + uint8_t orc) +{ + p_spis->ORC = orc; +} + +__STATIC_INLINE void nrf_spis_def_set(NRF_SPIS_Type * p_spis, + uint8_t def) +{ + p_spis->DEF = def; +} + +#endif // SUPPRESS_INLINE_IMPLEMENTATION + +#endif // NRF_SPIS_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_slave/nrf_drv_spis.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_slave/nrf_drv_spis.c new file mode 100644 index 0000000000..2706798a22 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_slave/nrf_drv_spis.c @@ -0,0 +1,396 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include "nrf_drv_spis.h" +#include +#include +#include "nrf.h" +#include "nrf_gpio.h" +#include "app_error.h" +#include "app_util_platform.h" +#include "nrf_drv_config.h" +#include "nrf_drv_common.h" +#include "nordic_common.h" +#include "sdk_common.h" +#include "nrf_assert.h" + +#if !SPIS_COUNT + #warning No SPIS instances enabled. +#else + +/**@brief States of the SPI transaction state machine. */ +typedef enum +{ + SPIS_STATE_INIT, /**< Initialization state. In this state the module waits for a call to @ref spi_slave_buffers_set. */ + SPIS_BUFFER_RESOURCE_REQUESTED, /**< State where the configuration of the memory buffers, which are to be used in SPI transaction, has started. */ + SPIS_BUFFER_RESOURCE_CONFIGURED, /**< State where the configuration of the memory buffers, which are to be used in SPI transaction, has completed. */ + SPIS_XFER_COMPLETED /**< State where SPI transaction has been completed. */ +} nrf_drv_spis_state_t; + + +#if PERIPHERAL_RESOURCE_SHARING_ENABLED + #define IRQ_HANDLER_NAME(n) irq_handler_for_instance_##n + #define IRQ_HANDLER(n) static void IRQ_HANDLER_NAME(n)(void) + + #if SPIS0_ENABLED + IRQ_HANDLER(0); + #endif + #if SPIS1_ENABLED + IRQ_HANDLER(1); + #endif + #if SPIS2_ENABLED + IRQ_HANDLER(2); + #endif + static nrf_drv_irq_handler_t const m_irq_handlers[SPIS_COUNT] = { + #if SPIS0_ENABLED + IRQ_HANDLER_NAME(0), + #endif + #if SPIS1_ENABLED + IRQ_HANDLER_NAME(1), + #endif + #if SPIS2_ENABLED + IRQ_HANDLER_NAME(2), + #endif + }; +#else + #define IRQ_HANDLER(n) void SPIS##n##_IRQ_HANDLER(void) +#endif // PERIPHERAL_RESOURCE_SHARING_ENABLED + +#define SPIS_IRQHANDLER_TEMPLATE(NUM) \ + IRQ_HANDLER(NUM) \ + { \ + spis_irq_handler(NRF_SPIS##NUM, &m_cb[SPIS##NUM##_INSTANCE_INDEX]); \ + } + + +/**@brief SPIS control block - driver instance local data. */ +typedef struct +{ + volatile uint32_t tx_buffer_size; //!< SPI slave TX buffer size in bytes. + volatile uint32_t rx_buffer_size; //!< SPI slave RX buffer size in bytes. + nrf_drv_spis_event_handler_t handler; //!< SPI event handler. + volatile const uint8_t * tx_buffer; //!< SPI slave TX buffer. + volatile uint8_t * rx_buffer; //!< SPI slave RX buffer. + nrf_drv_state_t state; //!< driver initialization state. + volatile nrf_drv_spis_state_t spi_state; //!< SPI slave state. +} spis_cb_t; + +static spis_cb_t m_cb[SPIS_COUNT]; + +static nrf_drv_spis_config_t const m_default_config[SPIS_COUNT] = { +#if SPIS0_ENABLED + NRF_DRV_SPIS_DEFAULT_CONFIG(0), +#endif +#if SPIS1_ENABLED + NRF_DRV_SPIS_DEFAULT_CONFIG(1), +#endif +#if SPIS2_ENABLED + NRF_DRV_SPIS_DEFAULT_CONFIG(2), +#endif +}; + + +ret_code_t nrf_drv_spis_init(nrf_drv_spis_t const * const p_instance, + nrf_drv_spis_config_t const * p_config, + nrf_drv_spis_event_handler_t event_handler) +{ + spis_cb_t * p_cb = &m_cb[p_instance->instance_id]; + + NRF_SPIS_Type * p_spis = p_instance->p_reg; + + if (p_cb->state != NRF_DRV_STATE_UNINITIALIZED) + { + return NRF_ERROR_INVALID_STATE; + } + if (p_config == NULL) + { + p_config = &m_default_config[p_instance->instance_id]; + } + if ((uint32_t)p_config->mode > (uint32_t)NRF_DRV_SPIS_MODE_3) + { + return NRF_ERROR_INVALID_PARAM; + } + if (!event_handler) + { + return NRF_ERROR_NULL; + } +#if PERIPHERAL_RESOURCE_SHARING_ENABLED + if (nrf_drv_common_per_res_acquire(p_spis, + m_irq_handlers[p_instance->instance_id]) != NRF_SUCCESS) + { + return NRF_ERROR_BUSY; + } +#endif + + // Configure the SPI pins for input. + uint32_t mosi_pin; + uint32_t miso_pin; + + if (p_config->miso_pin != NRF_DRV_SPIS_PIN_NOT_USED) + { + nrf_gpio_cfg(p_config->miso_pin, + NRF_GPIO_PIN_DIR_INPUT, + NRF_GPIO_PIN_INPUT_CONNECT, + NRF_GPIO_PIN_NOPULL, + p_config->miso_drive, + NRF_GPIO_PIN_NOSENSE); + miso_pin = p_config->miso_pin; + } + else + { + miso_pin = NRF_SPIS_PIN_NOT_CONNECTED; + } + + if (p_config->mosi_pin != NRF_DRV_SPIS_PIN_NOT_USED) + { + nrf_gpio_cfg(p_config->mosi_pin, + NRF_GPIO_PIN_DIR_INPUT, + NRF_GPIO_PIN_INPUT_CONNECT, + NRF_GPIO_PIN_NOPULL, + NRF_GPIO_PIN_S0S1, + NRF_GPIO_PIN_NOSENSE); + mosi_pin = p_config->mosi_pin; + } + else + { + mosi_pin = NRF_SPIS_PIN_NOT_CONNECTED; + } + + nrf_gpio_cfg(p_config->csn_pin, + NRF_GPIO_PIN_DIR_INPUT, + NRF_GPIO_PIN_INPUT_CONNECT, + p_config->csn_pullup, + NRF_GPIO_PIN_S0S1, + NRF_GPIO_PIN_NOSENSE); + + nrf_gpio_cfg(p_config->sck_pin, + NRF_GPIO_PIN_DIR_INPUT, + NRF_GPIO_PIN_INPUT_CONNECT, + NRF_GPIO_PIN_NOPULL, + NRF_GPIO_PIN_S0S1, + NRF_GPIO_PIN_NOSENSE); + + nrf_spis_pins_set(p_spis, p_config->sck_pin, mosi_pin, miso_pin, p_config->csn_pin); + + nrf_spis_rx_buffer_set(p_spis, NULL, 0); + nrf_spis_tx_buffer_set(p_spis, NULL, 0); + + // Configure SPI mode. + nrf_spis_configure(p_spis, (nrf_spis_mode_t) p_config->mode, + (nrf_spis_bit_order_t) p_config->bit_order); + + // Configure DEF and ORC characters. + nrf_spis_def_set(p_spis, p_config->def); + nrf_spis_orc_set(p_spis, p_config->orc); + + // Clear possible pending events. + nrf_spis_event_clear(p_spis, NRF_SPIS_EVENT_END); + nrf_spis_event_clear(p_spis, NRF_SPIS_EVENT_ACQUIRED); + + // Enable END_ACQUIRE shortcut. + nrf_spis_shorts_enable(p_spis, NRF_SPIS_SHORT_END_ACQUIRE); + + m_cb[p_instance->instance_id].spi_state = SPIS_STATE_INIT; + m_cb[p_instance->instance_id].handler = event_handler; + + + // Enable IRQ. + nrf_spis_int_enable(p_spis, NRF_SPIS_INT_ACQUIRED_MASK | NRF_SPIS_INT_END_MASK); + nrf_drv_common_irq_enable(p_instance->irq, p_config->irq_priority); + + p_cb->state = NRF_DRV_STATE_INITIALIZED; + + // Enable SPI slave device. + nrf_spis_enable(p_spis); + + return NRF_SUCCESS; +} + + +void nrf_drv_spis_uninit(nrf_drv_spis_t const * const p_instance) +{ + spis_cb_t * p_cb = &m_cb[p_instance->instance_id]; + ASSERT(p_cb->state != NRF_DRV_STATE_UNINITIALIZED); + + NRF_SPIS_Type * p_spis = p_instance->p_reg; + + #define DISABLE_ALL 0xFFFFFFFF + nrf_spis_disable(p_spis); + nrf_drv_common_irq_disable(p_instance->irq); + nrf_spis_int_disable(p_spis, DISABLE_ALL); + #undef DISABLE_ALL + +#if PERIPHERAL_RESOURCE_SHARING_ENABLED + nrf_drv_common_per_res_release(p_spis); +#endif + + p_cb->state = NRF_DRV_STATE_UNINITIALIZED; +} + + +/**@brief Function for executing the state entry action. */ +static void spis_state_entry_action_execute(NRF_SPIS_Type * p_spis, + spis_cb_t * p_cb) +{ + nrf_drv_spis_event_t event; + + switch (p_cb->spi_state) + { + case SPIS_BUFFER_RESOURCE_REQUESTED: + nrf_spis_task_trigger(p_spis, NRF_SPIS_TASK_ACQUIRE); + break; + + case SPIS_BUFFER_RESOURCE_CONFIGURED: + event.evt_type = NRF_DRV_SPIS_BUFFERS_SET_DONE; + event.rx_amount = 0; + event.tx_amount = 0; + + APP_ERROR_CHECK_BOOL(p_cb->handler != NULL); + p_cb->handler(event); + break; + + case SPIS_XFER_COMPLETED: + event.evt_type = NRF_DRV_SPIS_XFER_DONE; + event.rx_amount = nrf_spis_rx_amount_get(p_spis); + event.tx_amount = nrf_spis_tx_amount_get(p_spis); + APP_ERROR_CHECK_BOOL(p_cb->handler != NULL); + p_cb->handler(event); + break; + + default: + // No implementation required. + break; + } +} + +/**@brief Function for changing the state of the SPI state machine. + * + * @param[in] p_spis SPIS instance register. + * @param[in] p_cb SPIS instance control block. + * @param[in] new_state State where the state machine transits to. + */ +static void spis_state_change(NRF_SPIS_Type * p_spis, + spis_cb_t * p_cb, + nrf_drv_spis_state_t new_state) +{ + p_cb->spi_state = new_state; + spis_state_entry_action_execute(p_spis, p_cb); +} + + +ret_code_t nrf_drv_spis_buffers_set(nrf_drv_spis_t const * const p_instance, + const uint8_t * p_tx_buffer, + uint8_t tx_buffer_length, + uint8_t * p_rx_buffer, + uint8_t rx_buffer_length) +{ + spis_cb_t * p_cb = &m_cb[p_instance->instance_id]; + uint32_t err_code; + + VERIFY_PARAM_NOT_NULL(p_rx_buffer); + VERIFY_PARAM_NOT_NULL(p_tx_buffer); + + // EasyDMA requires that transfer buffers are placed in Data RAM region; + // signal error if they are not. + if ((p_tx_buffer != NULL && !nrf_drv_is_in_RAM(p_tx_buffer)) || + (p_rx_buffer != NULL && !nrf_drv_is_in_RAM(p_rx_buffer))) + { + return NRF_ERROR_INVALID_ADDR; + } + + switch (p_cb->spi_state) + { + case SPIS_STATE_INIT: + case SPIS_XFER_COMPLETED: + case SPIS_BUFFER_RESOURCE_CONFIGURED: + p_cb->tx_buffer = p_tx_buffer; + p_cb->rx_buffer = p_rx_buffer; + p_cb->tx_buffer_size = tx_buffer_length; + p_cb->rx_buffer_size = rx_buffer_length; + err_code = NRF_SUCCESS; + + spis_state_change(p_instance->p_reg, p_cb, SPIS_BUFFER_RESOURCE_REQUESTED); + break; + + case SPIS_BUFFER_RESOURCE_REQUESTED: + err_code = NRF_ERROR_INVALID_STATE; + break; + + default: + // @note: execution of this code path would imply internal error in the design. + err_code = NRF_ERROR_INTERNAL; + break; + } + + return err_code; +} + +static void spis_irq_handler(NRF_SPIS_Type * p_spis, spis_cb_t * p_cb) +{ + // @note: as multiple events can be pending for processing, the correct event processing order + // is as follows: + // - SPI semaphore acquired event. + // - SPI transaction complete event. + + // Check for SPI semaphore acquired event. + if (nrf_spis_event_check(p_spis, NRF_SPIS_EVENT_ACQUIRED)) + { + nrf_spis_event_clear(p_spis, NRF_SPIS_EVENT_ACQUIRED); + + switch (p_cb->spi_state) + { + case SPIS_BUFFER_RESOURCE_REQUESTED: + nrf_spis_tx_buffer_set(p_spis, (uint8_t *)p_cb->tx_buffer, p_cb->tx_buffer_size); + nrf_spis_rx_buffer_set(p_spis, (uint8_t *)p_cb->rx_buffer, p_cb->rx_buffer_size); + + nrf_spis_task_trigger(p_spis, NRF_SPIS_TASK_RELEASE); + + spis_state_change(p_spis, p_cb, SPIS_BUFFER_RESOURCE_CONFIGURED); + break; + + default: + // No implementation required. + break; + } + } + + // Check for SPI transaction complete event. + if (nrf_spis_event_check(p_spis, NRF_SPIS_EVENT_END)) + { + nrf_spis_event_clear(p_spis, NRF_SPIS_EVENT_END); + + switch (p_cb->spi_state) + { + case SPIS_BUFFER_RESOURCE_CONFIGURED: + spis_state_change(p_spis, p_cb, SPIS_XFER_COMPLETED); + break; + + default: + // No implementation required. + break; + } + } +} + +#if SPIS0_ENABLED + SPIS_IRQHANDLER_TEMPLATE(0) +#endif + +#if SPIS1_ENABLED + SPIS_IRQHANDLER_TEMPLATE(1) +#endif + +#if SPIS2_ENABLED + SPIS_IRQHANDLER_TEMPLATE(2) +#endif + +#endif // SPI_COUNT > 0 diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_slave/nrf_drv_spis.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_slave/nrf_drv_spis.h new file mode 100644 index 0000000000..7b2fd6a3cd --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_slave/nrf_drv_spis.h @@ -0,0 +1,223 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/**@file + * @defgroup nrf_spis SPI slave HAL and driver + * @ingroup nrf_spi + * @brief SPI slave API. + * @details The SPIS HAL provides basic APIs for accessing the registers + * of the SPIS. The SPIS driver provides APIs on a higher level. + **/ + +#ifndef SPI_SLAVE_H__ +#define SPI_SLAVE_H__ + +#include +#include "nrf.h" +#include "nrf_error.h" +#include "nrf_drv_config.h" +#include "nrf_spis.h" +#include "nrf_gpio.h" +#include "sdk_common.h" +#include "app_util_platform.h" + +#if defined(NRF52) + #define SPIS2_IRQ SPIM2_SPIS2_SPI2_IRQn + #define SPIS2_IRQ_HANDLER SPIM2_SPIS2_SPI2_IRQHandler + #define SPIS0_IRQ SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQn + #define SPIS0_IRQ_HANDLER SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler + #define SPIS1_IRQ SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQn + #define SPIS1_IRQ_HANDLER SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler +#else + #define SPIS0_IRQ SPI0_TWI0_IRQn + #define SPIS0_IRQ_HANDLER SPI0_TWI0_IRQHandler + #define SPIS1_IRQ SPI1_TWI1_IRQn + #define SPIS1_IRQ_HANDLER SPI1_TWI1_IRQHandler +#endif + +/** + * @defgroup nrf_drv_spi_slave SPI slave driver + * @{ + * @ingroup nrf_spis + * + * @brief Multi-instance SPI slave driver. + */ + +#define NRF_DRV_SPIS_DEFAULT_CSN_PULLUP NRF_GPIO_PIN_NOPULL /**< Default pull-up configuration of the SPI CS. */ +#define NRF_DRV_SPIS_DEFAULT_MISO_DRIVE NRF_GPIO_PIN_S0S1 /**< Default drive configuration of the SPI MISO. */ +#define NRF_DRV_SPIS_DEFAULT_DEF 0xFF /**< Default DEF character. */ +#define NRF_DRV_SPIS_DEFAULT_ORC 0xFF /**< Default ORC character. */ + +/** +* @brief This value can be provided instead of a pin number for the signals MOSI +* and MISO to specify that the given signal is not used and therefore +* does not need to be connected to a pin. +*/ +#define NRF_DRV_SPIS_PIN_NOT_USED 0xFF + +/** @brief SPIS transaction bit order definitions. */ +typedef enum +{ + NRF_DRV_SPIS_BIT_ORDER_LSB_FIRST = NRF_SPIS_BIT_ORDER_LSB_FIRST, /**< Least significant bit shifted out first. */ + NRF_DRV_SPIS_BIT_ORDER_MSB_FIRST = NRF_SPIS_BIT_ORDER_MSB_FIRST /**< Most significant bit shifted out first. */ +} nrf_drv_spis_endian_t; + +/** @brief SPIS mode definitions for clock polarity and phase. */ +typedef enum +{ + NRF_DRV_SPIS_MODE_0 = NRF_SPIS_MODE_0, /**< (CPOL = 0, CPHA = 0). */ + NRF_DRV_SPIS_MODE_1 = NRF_SPIS_MODE_1, /**< (CPOL = 0, CPHA = 1). */ + NRF_DRV_SPIS_MODE_2 = NRF_SPIS_MODE_2, /**< (CPOL = 1, CPHA = 0). */ + NRF_DRV_SPIS_MODE_3 = NRF_SPIS_MODE_3 /**< (CPOL = 1, CPHA = 1). */ +} nrf_drv_spis_mode_t; + +/** @brief Event callback function event definitions. */ +typedef enum +{ + NRF_DRV_SPIS_BUFFERS_SET_DONE, /**< Memory buffer set event. Memory buffers have been set successfully to the SPI slave device, and SPI transactions can be done. */ + NRF_DRV_SPIS_XFER_DONE, /**< SPI transaction event. SPI transaction has been completed. */ + NRF_DRV_SPIS_EVT_TYPE_MAX /**< Enumeration upper bound. */ +} nrf_drv_spis_event_type_t; + +/** @brief Structure containing the event context from the SPI slave driver. */ +typedef struct +{ + nrf_drv_spis_event_type_t evt_type; //!< Type of event. + uint32_t rx_amount; //!< Number of bytes received in last transaction. This parameter is only valid for @ref NRF_DRV_SPIS_XFER_DONE events. + uint32_t tx_amount; //!< Number of bytes transmitted in last transaction. This parameter is only valid for @ref NRF_DRV_SPIS_XFER_DONE events. +} nrf_drv_spis_event_t; + +/** @brief SPI slave driver instance data structure. */ +typedef struct +{ + NRF_SPIS_Type * p_reg; //!< SPIS instance register. + uint8_t instance_id; //!< SPIS instance ID. + IRQn_Type irq; //!< IRQ of the specific instance. +} nrf_drv_spis_t; + +/** @brief Macro for creating an SPI slave driver instance. */ +#define NRF_DRV_SPIS_INSTANCE(id) \ +{ \ + .p_reg = CONCAT_2(NRF_SPIS, id), \ + .irq = CONCAT_3(SPIS, id, _IRQ), \ + .instance_id = CONCAT_3(SPIS, id, _INSTANCE_INDEX), \ +} + +/** @brief SPI slave instance default configuration. */ +#define NRF_DRV_SPIS_DEFAULT_CONFIG(id) \ +{ \ + .sck_pin = CONCAT_3(SPIS, id, _CONFIG_SCK_PIN), \ + .mosi_pin = CONCAT_3(SPIS, id, _CONFIG_MOSI_PIN), \ + .miso_pin = CONCAT_3(SPIS, id, _CONFIG_MISO_PIN), \ + .csn_pin = NRF_DRV_SPIS_PIN_NOT_USED, \ + .miso_drive = NRF_DRV_SPIS_DEFAULT_MISO_DRIVE, \ + .csn_pullup = NRF_DRV_SPIS_DEFAULT_CSN_PULLUP, \ + .orc = NRF_DRV_SPIS_DEFAULT_ORC, \ + .def = NRF_DRV_SPIS_DEFAULT_DEF, \ + .mode = NRF_DRV_SPIS_MODE_0, \ + .bit_order = NRF_DRV_SPIS_BIT_ORDER_MSB_FIRST, \ + .irq_priority = CONCAT_3(SPIS, id, _CONFIG_IRQ_PRIORITY), \ +} + +/** @brief SPI peripheral device configuration data. */ +typedef struct +{ + uint32_t miso_pin; //!< SPI MISO pin (optional). + /**< Set @ref NRF_DRV_SPIS_PIN_NOT_USED + * if this signal is not needed. */ + uint32_t mosi_pin; //!< SPI MOSI pin (optional). + /**< Set @ref NRF_DRV_SPIS_PIN_NOT_USED + * if this signal is not needed. */ + uint32_t sck_pin; //!< SPI SCK pin. + uint32_t csn_pin; //!< SPI CSN pin. + nrf_drv_spis_mode_t mode; //!< SPI mode. + nrf_drv_spis_endian_t bit_order; //!< SPI transaction bit order. + nrf_gpio_pin_pull_t csn_pullup; //!< CSN pin pull-up configuration. + nrf_gpio_pin_drive_t miso_drive; //!< MISO pin drive configuration. + uint8_t def; //!< Character clocked out in case of an ignored transaction. + uint8_t orc; //!< Character clocked out after an over-read of the transmit buffer. + uint8_t irq_priority; //!< Interrupt priority. +} nrf_drv_spis_config_t; + + +/** @brief SPI slave event callback function type. + * + * @param[in] event SPI slave driver event. + */ +typedef void (*nrf_drv_spis_event_handler_t)(nrf_drv_spis_event_t event); + +/** @brief Function for initializing the SPI slave driver instance. + * + * @param[in] p_instance Pointer to the instance structure. + * @param[in] p_config Pointer to the structure with the initial configuration. + * If NULL, the default configuration will be used. + * @param[in] event_handler Function to be called by the SPI slave driver upon event. + * + * @retval NRF_SUCCESS If the initialization was successful. + * @retval NRF_ERROR_INVALID_PARAM If an invalid parameter is supplied. + * @retval NRF_ERROR_BUSY If some other peripheral with the same + * instance ID is already in use. This is + * possible only if PERIPHERAL_RESOURCE_SHARING_ENABLED + * is set to a value other than zero. + */ +ret_code_t nrf_drv_spis_init(nrf_drv_spis_t const * const p_instance, + nrf_drv_spis_config_t const * p_config, + nrf_drv_spis_event_handler_t event_handler); + +/** + * @brief Function for uninitializing the SPI slave driver instance. + * + * @param[in] p_instance Pointer to the instance structure. + */ +void nrf_drv_spis_uninit(nrf_drv_spis_t const * const p_instance); + +/** @brief Function for preparing the SPI slave instance for a single SPI transaction. + * + * This function prepares the SPI slave device to be ready for a single SPI transaction. It configures + * the SPI slave device to use the memory supplied with the function call in SPI transactions. + * + * When either the memory buffer configuration or the SPI transaction has been + * completed, the event callback function will be called with the appropriate event + * @ref nrf_drv_spis_event_type_t. Note that the callback function can be called before returning from + * this function, because it is called from the SPI slave interrupt context. + * + * @note This function can be called from the callback function context. + * + * @note Client applications must call this function after every @ref NRF_DRV_SPIS_XFER_DONE event if + * the SPI slave driver should be prepared for a possible new SPI transaction. + * + * @note Peripherals that are using EasyDMA (for example, SPIS) require the transfer buffers + * to be placed in the Data RAM region. Otherwise, this function will fail + * with the error code NRF_ERROR_INVALID_ADDR. + * + * @param[in] p_instance SPIS instance. + * @param[in] p_tx_buffer Pointer to the TX buffer. + * @param[in] p_rx_buffer Pointer to the RX buffer. + * @param[in] tx_buffer_length Length of the TX buffer in bytes. + * @param[in] rx_buffer_length Length of the RX buffer in bytes. + * + * @retval NRF_SUCCESS If the operation was successful. + * @retval NRF_ERROR_NULL If the operation failed because a NULL pointer was supplied. + * @retval NRF_ERROR_INVALID_STATE If the operation failed because the SPI slave device is in an incorrect state. + * @retval NRF_ERROR_INVALID_ADDR If the provided buffers are not placed in the Data + * RAM region. + * @retval NRF_ERROR_INTERNAL If the operation failed because of an internal error. + */ +ret_code_t nrf_drv_spis_buffers_set(nrf_drv_spis_t const * const p_instance, + const uint8_t * p_tx_buffer, + uint8_t tx_buffer_length, + uint8_t * p_rx_buffer, + uint8_t rx_buffer_length); + +#endif // SPI_SLAVE_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/spi_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/spi_api.c index 8d75c2dbc3..72b209e25c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/spi_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/spi_api.c @@ -23,83 +23,329 @@ #include "mbed_assert.h" #include "mbed_error.h" #include "nrf_drv_spi.h" +#include "nrf_drv_spis.h" #include "app_util_platform.h" -#define SPI_MESSAGE_SIZE 1 -volatile uint8_t m_tx_buf[SPI_MESSAGE_SIZE] = {0}; -volatile uint8_t m_rx_buf[SPI_MESSAGE_SIZE] = {0}; +#if DEVICE_SPI_ASYNCH + #define SPI_IDX(obj) ((obj)->spi.spi_idx) +#else + #define SPI_IDX(obj) ((obj)->spi_idx) +#endif +#define SPI_INFO(obj) (&m_spi_info[SPI_IDX(obj)]) +#define MASTER_INST(obj) (&m_instances[SPI_IDX(obj)].master) +#define SLAVE_INST(obj) (&m_instances[SPI_IDX(obj)].slave) -static nrf_drv_spi_config_t m_config = NRF_DRV_SPI_DEFAULT_CONFIG(1); -static nrf_drv_spi_t spi1 = NRF_DRV_SPI_INSTANCE(1); - -typedef void (*user_handler_t)(void); -static user_handler_t m_user_handler; -static uint32_t m_event; -static spi_t * m_spi_struct; +typedef struct { + bool initialized; + bool master; + uint8_t sck_pin; + uint8_t mosi_pin; + uint8_t miso_pin; + uint8_t ss_pin; + uint8_t spi_mode; + nrf_drv_spi_frequency_t frequency; + volatile union { + bool busy; // master + bool readable; // slave + } flag; + volatile uint8_t tx_buf; + volatile uint8_t rx_buf; #if DEVICE_SPI_ASYNCH - #define SPI_S(obj) (&obj->spi) - #define SPI_DRV(obj) (obj->spi.p_spi) -#else - #define SPI_S(obj) (obj) - #define SPI_DRV(obj) (obj->p_spi) + uint32_t handler; + uint32_t event; #endif +} spi_info_t; +static spi_info_t m_spi_info[SPI_COUNT]; -static void master_event_handler(nrf_drv_spi_evt_t const * event) +typedef struct { + nrf_drv_spi_t master; + nrf_drv_spis_t slave; +} sdk_driver_instances_t; +static sdk_driver_instances_t m_instances[SPI_COUNT] = { + #if SPI0_ENABLED + { + NRF_DRV_SPI_INSTANCE(0), + NRF_DRV_SPIS_INSTANCE(0) + }, + #endif + #if SPI1_ENABLED + { + NRF_DRV_SPI_INSTANCE(1), + NRF_DRV_SPIS_INSTANCE(1) + }, + #endif + #if SPI2_ENABLED + { + NRF_DRV_SPI_INSTANCE(2), + NRF_DRV_SPIS_INSTANCE(2) + }, + #endif +}; + +static void master_event_handler(uint8_t spi_idx, + nrf_drv_spi_evt_t const *p_event) { - if (event->type == NRF_DRV_SPI_EVENT_DONE) { - SPI_S(m_spi_struct)->busy = false; - if (SPI_S(m_spi_struct)->async_mode) { - m_user_handler(); + spi_info_t *p_spi_info = &m_spi_info[spi_idx]; + + if (p_event->type == NRF_DRV_SPI_EVENT_DONE) { + p_spi_info->flag.busy = false; + if (p_spi_info->handler) { + void (*handler)(void) = (void (*)(void))p_spi_info->handler; + p_spi_info->handler = 0; + handler(); } } } +#define MASTER_EVENT_HANDLER(idx) \ + static void master_event_handler_##idx(nrf_drv_spi_evt_t const *p_event) { \ + master_event_handler(SPI##idx##_INSTANCE_INDEX, p_event); \ + } +#if SPI0_ENABLED + MASTER_EVENT_HANDLER(0) +#endif +#if SPI1_ENABLED + MASTER_EVENT_HANDLER(1) +#endif +#if SPI2_ENABLED + MASTER_EVENT_HANDLER(2) +#endif -void spi_init(spi_t *obj, PinName mosi, PinName miso, PinName sclk, PinName ssel) +static nrf_drv_spi_handler_t const m_master_event_handlers[SPI_COUNT] = { +#if SPI0_ENABLED + master_event_handler_0, +#endif +#if SPI1_ENABLED + master_event_handler_1, +#endif +#if SPI2_ENABLED + master_event_handler_2, +#endif +}; + + +static void slave_event_handler(uint8_t spi_idx, + nrf_drv_spis_event_t event) { - m_config.sck_pin = (uint8_t)sclk; - m_config.mosi_pin = (mosi != NC) ? (uint8_t)mosi : NRF_DRV_SPI_PIN_NOT_USED; - m_config.miso_pin = (miso != NC) ? (uint8_t)miso : NRF_DRV_SPI_PIN_NOT_USED; - m_config.ss_pin = (ssel != NC) ? (uint8_t)ssel : NRF_DRV_SPI_PIN_NOT_USED; + spi_info_t *p_spi_info = &m_spi_info[spi_idx]; - SPI_S(obj)->busy = false; - m_spi_struct = obj; + if (event.evt_type == NRF_DRV_SPIS_XFER_DONE) { + // Signal that there is some data received that could be read. + p_spi_info->flag.readable = true; - SPI_DRV(obj) = &spi1; - (void)nrf_drv_spi_init(&spi1, &m_config, master_event_handler); + // And prepare for the next transfer. + // Previous data set in 'spi_slave_write' (if any) has been transmitted, + // now use the default one, until some new is set by 'spi_slave_write'. + p_spi_info->tx_buf = NRF_DRV_SPIS_DEFAULT_ORC; + nrf_drv_spis_buffers_set(&m_instances[spi_idx].slave, + (uint8_t const *)&p_spi_info->tx_buf, 1, + (uint8_t *)&p_spi_info->rx_buf, 1); + } +} +#define SLAVE_EVENT_HANDLER(idx) \ + static void slave_event_handler_##idx(nrf_drv_spis_event_t event) { \ + slave_event_handler(SPIS##idx##_INSTANCE_INDEX, event); \ + } +#if SPIS0_ENABLED + SLAVE_EVENT_HANDLER(0) +#endif +#if SPIS1_ENABLED + SLAVE_EVENT_HANDLER(1) +#endif +#if SPIS2_ENABLED + SLAVE_EVENT_HANDLER(2) +#endif + +static nrf_drv_spis_event_handler_t const m_slave_event_handlers[SPIS_COUNT] = { +#if SPIS0_ENABLED + slave_event_handler_0, +#endif +#if SPIS1_ENABLED + slave_event_handler_1, +#endif +#if SPIS2_ENABLED + slave_event_handler_2, +#endif +}; + +static void prepare_master_config(nrf_drv_spi_config_t *p_config, + spi_info_t const *p_spi_info) +{ + p_config->sck_pin = p_spi_info->sck_pin; + p_config->mosi_pin = p_spi_info->mosi_pin; + p_config->miso_pin = p_spi_info->miso_pin; + p_config->ss_pin = p_spi_info->ss_pin; + p_config->frequency = p_spi_info->frequency; + p_config->mode = (nrf_drv_spi_mode_t)p_spi_info->spi_mode; + + p_config->irq_priority = APP_IRQ_PRIORITY_LOW; + p_config->orc = 0xFF; + p_config->bit_order = NRF_DRV_SPI_BIT_ORDER_MSB_FIRST; +} + +static void prepare_slave_config(nrf_drv_spis_config_t *p_config, + spi_info_t const *p_spi_info) +{ + p_config->sck_pin = p_spi_info->sck_pin; + p_config->mosi_pin = p_spi_info->mosi_pin; + p_config->miso_pin = p_spi_info->miso_pin; + p_config->csn_pin = p_spi_info->ss_pin; + p_config->mode = (nrf_drv_spis_mode_t)p_spi_info->spi_mode; + + p_config->irq_priority = APP_IRQ_PRIORITY_LOW; + p_config->orc = NRF_DRV_SPIS_DEFAULT_ORC; + p_config->def = NRF_DRV_SPIS_DEFAULT_DEF; + p_config->bit_order = NRF_DRV_SPIS_BIT_ORDER_MSB_FIRST; + p_config->csn_pullup = NRF_DRV_SPIS_DEFAULT_CSN_PULLUP; + p_config->miso_drive = NRF_DRV_SPIS_DEFAULT_MISO_DRIVE; +} + +void spi_init(spi_t *obj, + PinName mosi, PinName miso, PinName sclk, PinName ssel) +{ + int i; + for (i = 0; i < SPI_COUNT; ++i) { + spi_info_t *p_spi_info = &m_spi_info[i]; + if (!p_spi_info->initialized) { + p_spi_info->sck_pin = (uint8_t)sclk; + p_spi_info->mosi_pin = (mosi != NC) ? + (uint8_t)mosi : NRF_DRV_SPI_PIN_NOT_USED; + p_spi_info->miso_pin = (miso != NC) ? + (uint8_t)miso : NRF_DRV_SPI_PIN_NOT_USED; + p_spi_info->ss_pin = (ssel != NC) ? + (uint8_t)ssel : NRF_DRV_SPI_PIN_NOT_USED; + p_spi_info->spi_mode = (uint8_t)NRF_DRV_SPI_MODE_0; + p_spi_info->frequency = NRF_DRV_SPI_FREQ_1M; + + // By default each SPI instance is initialized to work as a master. + // Should the slave mode be used, the instance will be reconfigured + // appropriately in 'spi_format'. + nrf_drv_spi_config_t config; + prepare_master_config(&config, p_spi_info); + + nrf_drv_spi_t const *p_spi = &m_instances[i].master; + ret_code_t ret_code = nrf_drv_spi_init(p_spi, + &config, m_master_event_handlers[i]); + if (ret_code == NRF_SUCCESS) { + p_spi_info->initialized = true; + p_spi_info->master = true; + p_spi_info->flag.busy = false; + #if DEVICE_SPI_ASYNCH + p_spi_info->handler = 0; + #endif + SPI_IDX(obj) = i; + + return; + } + } + } + + // No available peripheral + error("No available SPI peripheral\r\n"); } void spi_free(spi_t *obj) { - nrf_drv_spi_uninit(&spi1); + spi_info_t *p_spi_info = SPI_INFO(obj); + if (p_spi_info->master) { + nrf_drv_spi_uninit(MASTER_INST(obj)); + } + else { + nrf_drv_spis_uninit(SLAVE_INST(obj)); + } + p_spi_info->initialized = false; } int spi_busy(spi_t *obj) { - return (int)(SPI_S(obj)->busy); + return (int)(SPI_INFO(obj)->flag.busy); } -static nrf_drv_spi_mode_t mode_translate(int mode) +void spi_format(spi_t *obj, int bits, int mode, int slave) { - nrf_drv_spi_mode_t config_mode = NRF_DRV_SPI_MODE_0; - switch (mode) { - case 0: - config_mode = NRF_DRV_SPI_MODE_0; - break; - case 1: - config_mode = NRF_DRV_SPI_MODE_1; - break; - case 2: - config_mode = NRF_DRV_SPI_MODE_2; - break; - case 3: - config_mode = NRF_DRV_SPI_MODE_3; - break; - default: - error("SPI format error"); - break; + if (bits != 8) { + error("Only 8-bits SPI is supported\r\n"); + } + if (mode > 3) { + error("SPI format error\r\n"); + } + + spi_info_t *p_spi_info = SPI_INFO(obj); + + if (slave) + { + nrf_drv_spis_mode_t spi_modes[4] = { + NRF_DRV_SPIS_MODE_0, + NRF_DRV_SPIS_MODE_1, + NRF_DRV_SPIS_MODE_2, + NRF_DRV_SPIS_MODE_3, + }; + nrf_drv_spis_mode_t new_mode = spi_modes[mode]; + + // If the peripheral is currently working as a master, the SDK driver + // it uses needs to be switched from SPI to SPIS. + if (p_spi_info->master) { + nrf_drv_spi_uninit(MASTER_INST(obj)); + } + // I the SPI mode has to be changed, the SDK's SPIS driver needs to be + // re-initialized (there is no other way to change its configuration). + else if (p_spi_info->spi_mode != (uint8_t)new_mode) { + nrf_drv_spis_uninit(SLAVE_INST(obj)); + } + else { + return; + } + + p_spi_info->spi_mode = (uint8_t)new_mode; + p_spi_info->master = false; + p_spi_info->flag.readable = false; + + // Initialize SDK's SPIS driver with the new configuration. + nrf_drv_spis_config_t config; + prepare_slave_config(&config, p_spi_info); + (void)nrf_drv_spis_init(SLAVE_INST(obj), &config, + m_slave_event_handlers[SPI_IDX(obj)]); + + // Prepare the slave for transfer. + p_spi_info->tx_buf = NRF_DRV_SPIS_DEFAULT_ORC; + nrf_drv_spis_buffers_set(SLAVE_INST(obj), + (uint8_t const *)&p_spi_info->tx_buf, 1, + (uint8_t *)&p_spi_info->rx_buf, 1); + } + else // master + { + nrf_drv_spi_mode_t spi_modes[4] = { + NRF_DRV_SPI_MODE_0, + NRF_DRV_SPI_MODE_1, + NRF_DRV_SPI_MODE_2, + NRF_DRV_SPI_MODE_3, + }; + nrf_drv_spi_mode_t new_mode = spi_modes[mode]; + + // If the peripheral is currently working as a slave, the SDK driver + // it uses needs to be switched from SPIS to SPI. + if (!p_spi_info->master) { + nrf_drv_spis_uninit(SLAVE_INST(obj)); + } + // I the SPI mode has to be changed, the SDK's SPI driver needs to be + // re-initialized (there is no other way to change its configuration). + else if (p_spi_info->spi_mode != (uint8_t)new_mode) { + nrf_drv_spi_uninit(MASTER_INST(obj)); + } + else { + return; + } + + p_spi_info->spi_mode = (uint8_t)new_mode; + p_spi_info->master = true; + p_spi_info->flag.busy = false; + + // Initialize SDK's SPI driver with the new configuration. + nrf_drv_spi_config_t config; + prepare_master_config(&config, p_spi_info); + (void)nrf_drv_spi_init(MASTER_INST(obj), &config, + m_master_event_handlers[SPI_IDX(obj)]); } - return config_mode; } static nrf_drv_spi_frequency_t freq_translate(int hz) @@ -123,64 +369,73 @@ static nrf_drv_spi_frequency_t freq_translate(int hz) return frequency; } -void spi_format(spi_t *obj, int bits, int mode, int slave) -{ - if (bits != 8) { - error("Only 8bits SPI supported"); - } - if (slave != 0) { - error("SPI slave mode is not supported"); - } - - nrf_drv_spi_mode_t config_mode = mode_translate(mode); - - if (m_config.mode != config_mode) { - nrf_drv_spi_uninit(&spi1); - m_config.mode = config_mode; - (void)nrf_drv_spi_init(&spi1, &m_config, master_event_handler); - } - -} - void spi_frequency(spi_t *obj, int hz) { - nrf_drv_spi_frequency_t frequency = freq_translate(hz); + spi_info_t *p_spi_info = SPI_INFO(obj); + nrf_drv_spi_frequency_t new_frequency = freq_translate(hz); - if (frequency != m_config.frequency) { - nrf_drv_spi_uninit(&spi1); - m_config.frequency = frequency; - (void)nrf_drv_spi_init(&spi1, &m_config, master_event_handler); + if (p_spi_info->master) + { + if (p_spi_info->frequency != new_frequency) { + p_spi_info->frequency = new_frequency; + + nrf_drv_spi_config_t config; + prepare_master_config(&config, p_spi_info); + + nrf_drv_spi_t const *p_spi = MASTER_INST(obj); + nrf_drv_spi_uninit(p_spi); + (void)nrf_drv_spi_init(p_spi, &config, + m_master_event_handlers[SPI_IDX(obj)]); + } } + // There is no need to set anything in slaves when it comes to frequency, + // since slaves just synchronize with the clock provided by a master. } int spi_master_write(spi_t *obj, int value) { - while (SPI_S(obj)->busy); - m_tx_buf[0] = value; - SPI_S(obj)->async_mode = false; - SPI_S(obj)->busy = true; - - (void)nrf_drv_spi_transfer(SPI_DRV(obj), (uint8_t const *) m_tx_buf, 1, - (uint8_t *) m_rx_buf, 1); - - while (SPI_S(obj)->busy); - return m_rx_buf[0]; + spi_info_t *p_spi_info = SPI_INFO(obj); + +#if DEVICE_SPI_ASYNCH + while (p_spi_info->flag.busy) { + } +#endif + + p_spi_info->tx_buf = value; + p_spi_info->flag.busy = true; + (void)nrf_drv_spi_transfer(MASTER_INST(obj), + (uint8_t const *)&p_spi_info->tx_buf, 1, + (uint8_t *)&p_spi_info->rx_buf, 1); + while (p_spi_info->flag.busy) { + } + + return p_spi_info->rx_buf; } int spi_slave_receive(spi_t *obj) { - return 0; + spi_info_t *p_spi_info = SPI_INFO(obj); + MBED_ASSERT(!p_spi_info->master); + return p_spi_info->flag.readable; +; } int spi_slave_read(spi_t *obj) { - return 0; + spi_info_t *p_spi_info = SPI_INFO(obj); + MBED_ASSERT(!p_spi_info->master); + while (!p_spi_info->flag.readable) { + } + p_spi_info->flag.readable = false; + return p_spi_info->rx_buf; } void spi_slave_write(spi_t *obj, int value) { - (void) obj; - (void) value; + spi_info_t *p_spi_info = SPI_INFO(obj); + MBED_ASSERT(!p_spi_info->master); + + p_spi_info->tx_buf = (uint8_t)value; } #if DEVICE_SPI_ASYNCH @@ -190,31 +445,38 @@ void spi_master_transfer(spi_t *obj, void *rx, size_t rx_length, uint8_t bit_width, uint32_t handler, uint32_t event, DMAUsage hint) { + spi_info_t *p_spi_info = SPI_INFO(obj); + MBED_ASSERT(p_spi_info->master); (void)hint; (void)bit_width; - m_user_handler = (user_handler_t)handler; - m_event = event; - - SPI_S(obj)->async_mode = true; - SPI_S(obj)->busy = true; - (void)nrf_drv_spi_transfer(SPI_DRV(obj), (uint8_t const *) tx, tx_length, - (uint8_t *) rx, rx_length); + p_spi_info->handler = handler; + p_spi_info->event = event; + + p_spi_info->flag.busy = true; + (void)nrf_drv_spi_transfer(MASTER_INST(obj), + (uint8_t const *)tx, tx_length, + (uint8_t *)rx, rx_length); } uint32_t spi_irq_handler_asynch(spi_t *obj) { - return m_event & SPI_EVENT_COMPLETE; + spi_info_t *p_spi_info = SPI_INFO(obj); + MBED_ASSERT(p_spi_info->master); + return p_spi_info->event & SPI_EVENT_COMPLETE; } uint8_t spi_active(spi_t *obj) { - return SPI_S(obj)->busy; + spi_info_t *p_spi_info = SPI_INFO(obj); + MBED_ASSERT(p_spi_info->master); + return p_spi_info->flag.busy; } void spi_abort_asynch(spi_t *obj) { - nrf_drv_spi_abort(SPI_DRV(obj)); + MBED_ASSERT(SPI_INFO(obj)->master); + nrf_drv_spi_abort(MASTER_INST(obj)); } #endif // DEVICE_SPI_ASYNCH From bf70d5a4dd6a60727bff9a9328c87fc49fa02da6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C5=82=C4=85bek=2C=20Andrzej?= Date: Fri, 1 Jul 2016 15:03:35 +0200 Subject: [PATCH 39/67] Enabled lp_ticker after adjusting its implementation to the new API. --- hal/targets.json | 4 +- .../TARGET_NORDIC/TARGET_NRF5/common_rtc.h | 3 ++ .../hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c | 31 ++++-------- .../hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c | 50 +++++++++++-------- 4 files changed, 45 insertions(+), 43 deletions(-) diff --git a/hal/targets.json b/hal/targets.json index dfaf269e8a..374370dcb2 100644 --- a/hal/targets.json +++ b/hal/targets.json @@ -1375,7 +1375,7 @@ "supported_form_factors": ["ARDUINO"], "inherits": ["MCU_NRF51_32K"], "progen": {"target": "nrf51-dk"}, - "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE"] + "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE"] }, "NRF51_DK_BOOT": { "supported_form_factors": ["ARDUINO"], @@ -1773,6 +1773,6 @@ "NRF52_PAN_62", "NRF52_PAN_63" ], - "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE"] + "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE"] } } diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/common_rtc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/common_rtc.h index 390faf53d3..fc1d99c2a5 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/common_rtc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/common_rtc.h @@ -50,5 +50,8 @@ extern uint32_t volatile m_common_rtc_overflows; void common_rtc_init(void); uint32_t common_rtc_32bit_ticks_get(void); +uint64_t common_rtc_64bit_us_get(void); +void common_rtc_set_interrupt(uint32_t us_timestamp, uint32_t cc_channel, + uint32_t int_mask); #endif // COMMON_RTC_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c index 404c18c259..0f403bc5f0 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c @@ -18,43 +18,32 @@ #if DEVICE_LOWPOWERTIMER #include "common_rtc.h" -#include "sleep_api.h" void lp_ticker_init(void) { common_rtc_init(); } -uint32_t lp_ticker_read(void) +uint32_t lp_ticker_read() { - return common_rtc_32bit_ticks_get(); + return (uint32_t)common_rtc_64bit_us_get(); } -void lp_ticker_set_interrupt(uint32_t now, uint32_t time) +void lp_ticker_set_interrupt(timestamp_t timestamp) { - (void)now; - nrf_rtc_cc_set(COMMON_RTC_INSTANCE, LP_TICKER_CC_CHANNEL, RTC_WRAP(time)); - nrf_rtc_event_enable(COMMON_RTC_INSTANCE, LP_TICKER_INT_MASK); + common_rtc_set_interrupt(timestamp, + LP_TICKER_CC_CHANNEL, LP_TICKER_INT_MASK); } -uint32_t lp_ticker_get_overflows_counter(void) +void lp_ticker_disable_interrupt(void) { - // Cut out the part of 'm_common_rtc_overflows' used by - // 'common_rtc_32bit_ticks_get()'. - return (m_common_rtc_overflows >> (32u - RTC_COUNTER_BITS)); + nrf_rtc_event_disable(COMMON_RTC_INSTANCE, LP_TICKER_INT_MASK); } -uint32_t lp_ticker_get_compare_match(void) +void lp_ticker_clear_interrupt(void) { - return nrf_rtc_cc_get(COMMON_RTC_INSTANCE, LP_TICKER_CC_CHANNEL); -} - -void lp_ticker_sleep_until(uint32_t now, uint32_t time) -{ - lp_ticker_set_interrupt(now, time); - sleep_t sleep_obj; - mbed_enter_sleep(&sleep_obj); - mbed_exit_sleep(&sleep_obj); + // No implementation needed. The event that triggers the interrupt is + // cleared in 'common_rtc_irq_handler'. } #endif // DEVICE_LOWPOWERTIMER diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c index 463feeaf9e..7acebd72e5 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c @@ -16,6 +16,7 @@ #include "us_ticker_api.h" #include "common_rtc.h" #include "app_util.h" +#include "lp_ticker_api.h" //------------------------------------------------------------------------------ @@ -51,6 +52,8 @@ void COMMON_RTC_IRQ_HANDLER(void) if (nrf_rtc_event_pending(COMMON_RTC_INSTANCE, event)) { nrf_rtc_event_clear(COMMON_RTC_INSTANCE, event); nrf_rtc_event_disable(COMMON_RTC_INSTANCE, int_mask); + + lp_ticker_irq_handler(); } #endif @@ -128,27 +131,16 @@ uint32_t common_rtc_32bit_ticks_get(void) ticks += (m_common_rtc_overflows << RTC_COUNTER_BITS); return ticks; } -//------------------------------------------------------------------------------ - -void us_ticker_init(void) -{ - common_rtc_init(); -} - -static uint64_t us_ticker_64bit_get(void) +uint64_t common_rtc_64bit_us_get(void) { uint32_t ticks = common_rtc_32bit_ticks_get(); // [ticks -> microseconds] return ROUNDED_DIV(((uint64_t)ticks) * 1000000, RTC_INPUT_FREQ); } -uint32_t us_ticker_read() -{ - return (uint32_t)us_ticker_64bit_get(); -} - -void us_ticker_set_interrupt(timestamp_t timestamp) +void common_rtc_set_interrupt(uint32_t us_timestamp, uint32_t cc_channel, + uint32_t int_mask) { // The internal counter is clocked with a frequency that cannot be easily // multiplied to 1 MHz, therefore besides the translation of values @@ -159,12 +151,13 @@ void us_ticker_set_interrupt(timestamp_t timestamp) // is then translated to counter ticks. Finally, the lower 24 bits of thus // calculated value is written to the counter compare register to prepare // the interrupt generation. - uint64_t current_time64 = us_ticker_64bit_get(); + uint64_t current_time64 = common_rtc_64bit_us_get(); // [add upper 32 bits from the current time to the timestamp value] - uint64_t timestamp64 = timestamp + (current_time64 & ~(uint64_t)0xFFFFFFFF); + uint64_t timestamp64 = us_timestamp + + (current_time64 & ~(uint64_t)0xFFFFFFFF); // [if the original timestamp value happens to be after the 32 bit counter // of microsends overflows, correct the upper 32 bits accordingly] - if (timestamp < (uint32_t)(current_time64 & 0xFFFFFFFF)) { + if (us_timestamp < (uint32_t)(current_time64 & 0xFFFFFFFF)) { timestamp64 += ((uint64_t)1 << 32); } // [microseconds -> ticks, always round the result up to avoid too early @@ -182,9 +175,26 @@ void us_ticker_set_interrupt(timestamp_t timestamp) compare_value = closest_safe_compare; } - nrf_rtc_cc_set(COMMON_RTC_INSTANCE, US_TICKER_CC_CHANNEL, - RTC_WRAP(compare_value)); - nrf_rtc_event_enable(COMMON_RTC_INSTANCE, US_TICKER_INT_MASK); + nrf_rtc_cc_set(COMMON_RTC_INSTANCE, cc_channel, RTC_WRAP(compare_value)); + nrf_rtc_event_enable(COMMON_RTC_INSTANCE, int_mask); +} +//------------------------------------------------------------------------------ + + +void us_ticker_init(void) +{ + common_rtc_init(); +} + +uint32_t us_ticker_read() +{ + return (uint32_t)common_rtc_64bit_us_get(); +} + +void us_ticker_set_interrupt(timestamp_t timestamp) +{ + common_rtc_set_interrupt(timestamp, + US_TICKER_CC_CHANNEL, US_TICKER_INT_MASK); } void us_ticker_disable_interrupt(void) From 0249ee12e7d910e9002bf0b90eaebbfe26a1d20e Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Fri, 1 Jul 2016 17:01:37 +0200 Subject: [PATCH 40/67] add missing dates in some nordic license disclamer --- .../TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h | 2 +- .../TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h | 2 +- .../sdk/ble/ble_radio_notification/ble_radio_notification.c | 2 +- .../sdk/ble/ble_radio_notification/ble_radio_notification.h | 2 +- .../TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.c | 2 +- .../TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.h | 2 +- .../sdk/drivers_nrf/config/nrf_drv_config_validation.h | 2 +- .../hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.c | 2 +- .../hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.h | 2 +- .../TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpio.h | 2 +- .../TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpiote.h | 2 +- .../TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.c | 2 +- .../TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.h | 2 +- .../hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_pdm.h | 2 +- .../TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_temp.h | 2 +- .../hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_wdt.h | 2 +- .../sdk/drivers_nrf/pstorage/config/pstorage_platform.h | 2 +- .../TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.c | 2 +- .../TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.h | 2 +- .../TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h index d3dc577462..4fdca676ed 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2015 Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h index 3fb5149d3c..3020f3462f 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2015 Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.c index cb719aec98..ecb5e943af 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.c @@ -1,5 +1,5 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2012 Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.h index 3849d183c5..1b61902c40 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.h @@ -1,5 +1,5 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2012 Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.c index 5f59690b16..f5c08413d9 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.c @@ -1,5 +1,5 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2012 Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.h index 52d0024d08..3c93cd5023 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.h @@ -1,5 +1,5 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2012 Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/config/nrf_drv_config_validation.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/config/nrf_drv_config_validation.h index ece8d94904..fdd614899a 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/config/nrf_drv_config_validation.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/config/nrf_drv_config_validation.h @@ -1,5 +1,5 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2015 Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.c index 4a58ee3417..e62b3b7e13 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.c @@ -1,5 +1,5 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2012 Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.h index 85c21ffbb1..9fd9121a81 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.h @@ -1,5 +1,5 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2012 Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpio.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpio.h index 5f95a48912..016ab10ea6 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpio.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpio.h @@ -1,5 +1,5 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2015 Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpiote.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpiote.h index 405559ff0e..0e04d0d72e 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpiote.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpiote.h @@ -1,5 +1,5 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2015 Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.c index f2a53e16cb..d41ea29034 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2012 Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.h index 747ed629b0..40c9f4b20e 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2012 Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_pdm.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_pdm.h index 09af76916a..7ece45320c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_pdm.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_pdm.h @@ -1,5 +1,5 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2015 Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_temp.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_temp.h index bae99f5a32..b07c9c445d 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_temp.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_temp.h @@ -1,5 +1,5 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2012 Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_wdt.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_wdt.h index a3c245b409..2ee124869a 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_wdt.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_wdt.h @@ -1,5 +1,5 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2015 Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/config/pstorage_platform.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/config/pstorage_platform.h index efb2c3b364..6ecf20453c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/config/pstorage_platform.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/config/pstorage_platform.h @@ -1,5 +1,5 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2013 Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.c index f72de0fc6c..4c62cafa62 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.c @@ -1,5 +1,5 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2013 Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.h index 7ecd77b314..79c8fae4a7 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.h @@ -1,5 +1,5 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2013 Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h index b1572cf509..4d6fed9650 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h @@ -1,5 +1,5 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2006 Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, From f7d53d1291e46179c5f5f59f4215d71eef5ca7b1 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Fri, 1 Jul 2016 17:20:37 +0200 Subject: [PATCH 41/67] New Nordic license clause --- .../TOOLCHAIN_GCC_ARM/startup_NRF51822.S | 65 +++++++++++-------- .../TARGET_MCU_NRF51822/system_nrf51.c | 55 +++++++++------- .../TARGET_MCU_NRF51822/system_nrf51.h | 55 +++++++++------- .../TOOLCHAIN_GCC_ARM/startup_NRF52832.S | 65 +++++++++++-------- .../TARGET_MCU_NRF52832/system_nrf52.c | 55 +++++++++------- .../TARGET_MCU_NRF52832/system_nrf52.h | 55 +++++++++------- .../sdk/device/compiler_abstraction.h | 55 +++++++++------- .../TARGET_NRF5/sdk/device/nrf.h | 55 +++++++++------- .../TARGET_NRF5/sdk/device/nrf51_bitfields.h | 55 +++++++++------- .../TARGET_NRF5/sdk/device/nrf51_deprecated.h | 55 +++++++++------- .../TARGET_NRF5/sdk/device/nrf51_to_nrf52.h | 55 +++++++++------- .../TARGET_NRF5/sdk/device/nrf52_bitfields.h | 55 +++++++++------- .../sdk/device/nrf52_name_change.h | 55 +++++++++------- .../TARGET_MCU_NRF51822/PeripheralNames.h | 45 +++++++++---- .../TARGET_MCU_NRF51822/PortNames.h | 45 +++++++++---- .../TARGET_ARCH_BLE/PinNames.h | 45 +++++++++---- .../TARGET_DELTA_DFCM_NNN40/PinNames.h | 45 +++++++++---- .../TARGET_HRM1017/PinNames.h | 45 +++++++++---- .../TARGET_NRF51822_MKIT/PinNames.h | 45 +++++++++---- .../TARGET_NRF51822_SBKIT/PinNames.h | 45 +++++++++---- .../TARGET_NRF51822_Y5_MBUG/PinNames.h | 45 +++++++++---- .../TARGET_NRF51_DK/PinNames.h | 45 +++++++++---- .../TARGET_NRF51_DONGLE/PinNames.h | 45 +++++++++---- .../TARGET_NRF51_MICROBIT/PinNames.h | 45 +++++++++---- .../TARGET_RBLAB_BLENANO/PinNames.h | 45 +++++++++---- .../TARGET_RBLAB_NRF51822/PinNames.h | 45 +++++++++---- .../TARGET_SEEED_TINY_BLE/PinNames.h | 45 +++++++++---- .../TARGET_TY51822R3/PinNames.h | 45 +++++++++---- .../TARGET_WALLBOT_BLE/PinNames.h | 45 +++++++++---- .../TARGET_MCU_NRF51822/pwmout_api.c | 45 +++++++++---- .../sdk/drivers_nrf/adc/nrf_drv_adc.c | 41 ++++++++++-- .../sdk/drivers_nrf/adc/nrf_drv_adc.h | 41 ++++++++++-- .../TARGET_MCU_NRF51822/sdk/nrf_drv_config.h | 31 +++++---- .../softdevice/s130/headers/nrf51/nrf_mbr.h | 37 ++++++----- .../sdk/softdevice/s130/headers/nrf_ble.h | 37 ++++++----- .../sdk/softdevice/s130/headers/nrf_ble_err.h | 35 +++++----- .../sdk/softdevice/s130/headers/nrf_ble_gap.h | 37 ++++++----- .../softdevice/s130/headers/nrf_ble_gatt.h | 37 ++++++----- .../softdevice/s130/headers/nrf_ble_gattc.h | 37 ++++++----- .../softdevice/s130/headers/nrf_ble_gatts.h | 37 ++++++----- .../sdk/softdevice/s130/headers/nrf_ble_hci.h | 37 ++++++----- .../softdevice/s130/headers/nrf_ble_l2cap.h | 37 ++++++----- .../softdevice/s130/headers/nrf_ble_ranges.h | 37 ++++++----- .../softdevice/s130/headers/nrf_ble_types.h | 37 ++++++----- .../sdk/softdevice/s130/headers/nrf_error.h | 37 ++++++----- .../softdevice/s130/headers/nrf_error_sdm.h | 37 ++++++----- .../softdevice/s130/headers/nrf_error_soc.h | 35 +++++----- .../sdk/softdevice/s130/headers/nrf_nvic.h | 37 ++++++----- .../sdk/softdevice/s130/headers/nrf_sd_def.h | 41 ++++++++++-- .../sdk/softdevice/s130/headers/nrf_sdm.h | 37 ++++++----- .../sdk/softdevice/s130/headers/nrf_soc.h | 37 ++++++----- .../sdk/softdevice/s130/headers/nrf_svc.h | 37 ++++++----- .../TARGET_MCU_NRF52832/PeripheralNames.h | 45 +++++++++---- .../TARGET_MCU_NRF52832/PortNames.h | 45 +++++++++---- .../TARGET_NRF52_DK/PinNames.h | 45 +++++++++---- .../TARGET_MCU_NRF52832/pwmout_api.c | 45 +++++++++---- .../sdk/driver_nrf/saadc/nrf_drv_saadc.c | 41 ++++++++++-- .../sdk/driver_nrf/saadc/nrf_drv_saadc.h | 41 ++++++++++-- .../TARGET_MCU_NRF52832/sdk/nrf_drv_config.h | 31 +++++---- .../softdevice/s132/headers/nrf52/nrf_mbr.h | 37 ++++++----- .../sdk/softdevice/s132/headers/nrf_ble.h | 37 ++++++----- .../sdk/softdevice/s132/headers/nrf_ble_err.h | 35 +++++----- .../sdk/softdevice/s132/headers/nrf_ble_gap.h | 37 ++++++----- .../softdevice/s132/headers/nrf_ble_gatt.h | 37 ++++++----- .../softdevice/s132/headers/nrf_ble_gattc.h | 37 ++++++----- .../softdevice/s132/headers/nrf_ble_gatts.h | 37 ++++++----- .../sdk/softdevice/s132/headers/nrf_ble_hci.h | 37 ++++++----- .../softdevice/s132/headers/nrf_ble_l2cap.h | 37 ++++++----- .../softdevice/s132/headers/nrf_ble_ranges.h | 37 ++++++----- .../softdevice/s132/headers/nrf_ble_types.h | 37 ++++++----- .../sdk/softdevice/s132/headers/nrf_error.h | 37 ++++++----- .../softdevice/s132/headers/nrf_error_sdm.h | 37 ++++++----- .../softdevice/s132/headers/nrf_error_soc.h | 35 +++++----- .../sdk/softdevice/s132/headers/nrf_nvic.h | 37 ++++++----- .../sdk/softdevice/s132/headers/nrf_sd_def.h | 41 ++++++++++-- .../sdk/softdevice/s132/headers/nrf_sdm.h | 37 ++++++----- .../sdk/softdevice/s132/headers/nrf_soc.h | 37 ++++++----- .../sdk/softdevice/s132/headers/nrf_svc.h | 37 ++++++----- .../hal/TARGET_NORDIC/TARGET_NRF5/i2c_api.c | 45 +++++++++---- .../hal/TARGET_NORDIC/TARGET_NRF5/objects.h | 45 +++++++++---- .../hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c | 45 +++++++++---- .../hal/TARGET_NORDIC/TARGET_NRF5/port_api.c | 45 +++++++++---- .../hal/TARGET_NORDIC/TARGET_NRF5/rtc_api.c | 45 +++++++++---- .../sdk/ble/ble_advertising/ble_advertising.c | 42 ++++++++++-- .../sdk/ble/ble_advertising/ble_advertising.h | 42 ++++++++++-- .../ble/ble_db_discovery/ble_db_discovery.c | 42 ++++++++++-- .../ble/ble_db_discovery/ble_db_discovery.h | 42 ++++++++++-- .../ble_debug_assert_handler.c | 41 ++++++++++-- .../ble_debug_assert_handler.h | 41 ++++++++++-- .../TARGET_NRF5/sdk/ble/ble_dtm/ble_dtm.c | 41 ++++++++++-- .../TARGET_NRF5/sdk/ble/ble_dtm/ble_dtm.h | 41 ++++++++++-- .../sdk/ble/ble_error_log/ble_error_log.c | 41 ++++++++++-- .../sdk/ble/ble_error_log/ble_error_log.h | 41 ++++++++++-- .../TARGET_NRF5/sdk/ble/ble_racp/ble_racp.c | 42 ++++++++++-- .../TARGET_NRF5/sdk/ble/ble_racp/ble_racp.h | 42 ++++++++++-- .../ble_radio_notification.c | 31 +++++---- .../ble_radio_notification.h | 31 +++++---- .../sdk/ble/ble_services/ble_dfu/ble_dfu.c | 41 ++++++++++-- .../sdk/ble/ble_services/ble_dfu/ble_dfu.h | 41 ++++++++++-- .../TARGET_NRF5/sdk/ble/common/ble_advdata.c | 41 ++++++++++-- .../TARGET_NRF5/sdk/ble/common/ble_advdata.h | 41 ++++++++++-- .../sdk/ble/common/ble_conn_params.c | 41 ++++++++++-- .../sdk/ble/common/ble_conn_params.h | 41 ++++++++++-- .../sdk/ble/common/ble_conn_state.c | 41 ++++++++++-- .../sdk/ble/common/ble_conn_state.h | 41 ++++++++++-- .../sdk/ble/common/ble_date_time.h | 48 +++++++++++--- .../TARGET_NRF5/sdk/ble/common/ble_gatt_db.h | 42 ++++++++++-- .../sdk/ble/common/ble_sensor_location.h | 41 ++++++++++-- .../sdk/ble/common/ble_srv_common.c | 41 ++++++++++-- .../sdk/ble/common/ble_srv_common.h | 41 ++++++++++-- .../config/device_manager_cnfg.h | 40 ++++++++++-- .../sdk/ble/device_manager/device_manager.h | 40 ++++++++++-- .../device_manager_peripheral.c | 40 ++++++++++-- .../sdk/ble/peer_manager/gatt_cache_manager.c | 41 ++++++++++-- .../sdk/ble/peer_manager/gatt_cache_manager.h | 41 ++++++++++-- .../ble/peer_manager/gattc_cache_manager.c | 41 ++++++++++-- .../ble/peer_manager/gattc_cache_manager.h | 41 ++++++++++-- .../ble/peer_manager/gatts_cache_manager.c | 41 ++++++++++-- .../ble/peer_manager/gatts_cache_manager.h | 41 ++++++++++-- .../sdk/ble/peer_manager/id_manager.c | 41 ++++++++++-- .../sdk/ble/peer_manager/id_manager.h | 41 ++++++++++-- .../sdk/ble/peer_manager/peer_data.c | 41 ++++++++++-- .../sdk/ble/peer_manager/peer_data.h | 41 ++++++++++-- .../sdk/ble/peer_manager/peer_data_storage.c | 41 ++++++++++-- .../sdk/ble/peer_manager/peer_data_storage.h | 41 ++++++++++-- .../sdk/ble/peer_manager/peer_database.c | 41 ++++++++++-- .../sdk/ble/peer_manager/peer_database.h | 41 ++++++++++-- .../sdk/ble/peer_manager/peer_id.c | 41 ++++++++++-- .../sdk/ble/peer_manager/peer_id.h | 41 ++++++++++-- .../sdk/ble/peer_manager/peer_manager.c | 41 ++++++++++-- .../sdk/ble/peer_manager/peer_manager.h | 41 ++++++++++-- .../ble/peer_manager/peer_manager_internal.h | 41 ++++++++++-- .../sdk/ble/peer_manager/peer_manager_types.h | 41 ++++++++++-- .../sdk/ble/peer_manager/pm_buffer.c | 41 ++++++++++-- .../sdk/ble/peer_manager/pm_buffer.h | 41 ++++++++++-- .../sdk/ble/peer_manager/pm_mutex.c | 41 ++++++++++-- .../sdk/ble/peer_manager/pm_mutex.h | 41 ++++++++++-- .../ble/peer_manager/security_dispatcher.c | 41 ++++++++++-- .../ble/peer_manager/security_dispatcher.h | 41 ++++++++++-- .../sdk/ble/peer_manager/security_manager.c | 41 ++++++++++-- .../sdk/ble/peer_manager/security_manager.h | 41 ++++++++++-- .../sdk/drivers_nrf/ble_flash/ble_flash.c | 31 +++++---- .../sdk/drivers_nrf/ble_flash/ble_flash.h | 31 +++++---- .../sdk/drivers_nrf/clock/nrf_drv_clock.c | 41 ++++++++++-- .../sdk/drivers_nrf/clock/nrf_drv_clock.h | 41 ++++++++++-- .../sdk/drivers_nrf/common/nrf_drv_common.c | 41 ++++++++++-- .../sdk/drivers_nrf/common/nrf_drv_common.h | 41 ++++++++++-- .../config/nrf_drv_config_validation.h | 31 +++++---- .../sdk/drivers_nrf/delay/nrf_delay.c | 41 ++++++++++-- .../sdk/drivers_nrf/gpiote/nrf_drv_gpiote.c | 41 ++++++++++-- .../sdk/drivers_nrf/gpiote/nrf_drv_gpiote.h | 41 ++++++++++-- .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_adc.c | 41 ++++++++++-- .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_adc.h | 41 ++++++++++-- .../sdk/drivers_nrf/hal/nrf_clock.h | 41 ++++++++++-- .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.c | 33 ++++++---- .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.h | 31 +++++---- .../sdk/drivers_nrf/hal/nrf_gpio.h | 31 +++++---- .../sdk/drivers_nrf/hal/nrf_gpiote.h | 31 +++++---- .../sdk/drivers_nrf/hal/nrf_nvmc.c | 33 ++++++---- .../sdk/drivers_nrf/hal/nrf_nvmc.h | 31 +++++---- .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_pdm.h | 31 +++++---- .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ppi.h | 41 ++++++++++-- .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_rtc.h | 41 ++++++++++-- .../sdk/drivers_nrf/hal/nrf_saadc.c | 41 ++++++++++-- .../sdk/drivers_nrf/hal/nrf_saadc.h | 41 ++++++++++-- .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spi.h | 41 ++++++++++-- .../sdk/drivers_nrf/hal/nrf_spim.h | 41 ++++++++++-- .../sdk/drivers_nrf/hal/nrf_spis.h | 41 ++++++++++-- .../sdk/drivers_nrf/hal/nrf_temp.h | 31 +++++---- .../sdk/drivers_nrf/hal/nrf_timer.h | 41 ++++++++++-- .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_twi.h | 41 ++++++++++-- .../sdk/drivers_nrf/hal/nrf_uart.h | 41 ++++++++++-- .../sdk/drivers_nrf/hal/nrf_uarte.h | 41 ++++++++++-- .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_wdt.h | 31 +++++---- .../sdk/drivers_nrf/ppi/nrf_drv_ppi.c | 41 ++++++++++-- .../sdk/drivers_nrf/ppi/nrf_drv_ppi.h | 41 ++++++++++-- .../pstorage/config/pstorage_platform.h | 31 +++++---- .../sdk/drivers_nrf/pstorage/pstorage.c | 31 +++++---- .../sdk/drivers_nrf/pstorage/pstorage.h | 31 +++++---- .../sdk/drivers_nrf/spi_master/nrf_drv_spi.c | 41 ++++++++++-- .../sdk/drivers_nrf/spi_master/nrf_drv_spi.h | 41 ++++++++++-- .../sdk/drivers_nrf/spi_slave/nrf_drv_spis.c | 41 ++++++++++-- .../sdk/drivers_nrf/spi_slave/nrf_drv_spis.h | 41 ++++++++++-- .../sdk/drivers_nrf/timer/nrf_drv_timer.c | 41 ++++++++++-- .../sdk/drivers_nrf/timer/nrf_drv_timer.h | 41 ++++++++++-- .../sdk/drivers_nrf/twi_master/nrf_drv_twi.c | 41 ++++++++++-- .../sdk/drivers_nrf/twi_master/nrf_drv_twi.h | 41 ++++++++++-- .../sdk/drivers_nrf/uart/nrf_drv_uart.c | 41 ++++++++++-- .../sdk/drivers_nrf/uart/nrf_drv_uart.h | 41 ++++++++++-- .../sdk/libraries/bootloader_dfu/bootloader.c | 41 ++++++++++-- .../sdk/libraries/bootloader_dfu/bootloader.h | 41 ++++++++++-- .../bootloader_dfu/bootloader_settings.c | 41 ++++++++++-- .../bootloader_dfu/bootloader_settings.h | 41 ++++++++++-- .../bootloader_dfu/bootloader_types.h | 41 ++++++++++-- .../bootloader_dfu/bootloader_util.c | 41 ++++++++++-- .../bootloader_dfu/bootloader_util.h | 41 ++++++++++-- .../sdk/libraries/bootloader_dfu/dfu.h | 41 ++++++++++-- .../bootloader_dfu/dfu_app_handler.c | 41 ++++++++++-- .../bootloader_dfu/dfu_app_handler.h | 41 ++++++++++-- .../bootloader_dfu/dfu_bank_internal.h | 41 ++++++++++-- .../libraries/bootloader_dfu/dfu_ble_svc.h | 41 ++++++++++-- .../bootloader_dfu/dfu_ble_svc_internal.h | 41 ++++++++++-- .../sdk/libraries/bootloader_dfu/dfu_init.h | 41 ++++++++++-- .../bootloader_dfu/dfu_init_template.c | 41 ++++++++++-- .../libraries/bootloader_dfu/dfu_transport.h | 41 ++++++++++-- .../sdk/libraries/bootloader_dfu/dfu_types.h | 41 ++++++++++-- .../hci_transport/hci_mem_pool_internal.h | 41 ++++++++++-- .../hci_transport/hci_transport_config.h | 41 ++++++++++-- .../TARGET_NRF5/sdk/libraries/crc16/crc16.c | 41 ++++++++++-- .../TARGET_NRF5/sdk/libraries/crc16/crc16.h | 41 ++++++++++-- .../experimental_section_vars/section_vars.h | 41 ++++++++++-- .../sdk/libraries/fds/config/fds_config.h | 41 ++++++++++-- .../TARGET_NRF5/sdk/libraries/fds/fds.c | 41 ++++++++++-- .../TARGET_NRF5/sdk/libraries/fds/fds.h | 41 ++++++++++-- .../sdk/libraries/fds/fds_internal_defs.h | 41 ++++++++++-- .../fstorage/config/fstorage_config.h | 41 ++++++++++-- .../sdk/libraries/fstorage/fstorage.c | 41 ++++++++++-- .../sdk/libraries/fstorage/fstorage.h | 41 ++++++++++-- .../fstorage/fstorage_internal_defs.h | 41 ++++++++++-- .../hci/config/hci_mem_pool_internal.h | 41 ++++++++++-- .../hci/config/hci_transport_config.h | 41 ++++++++++-- .../sdk/libraries/hci/hci_mem_pool.c | 41 ++++++++++-- .../sdk/libraries/hci/hci_mem_pool.h | 41 ++++++++++-- .../TARGET_NRF5/sdk/libraries/pwm/app_pwm.c | 41 ++++++++++-- .../TARGET_NRF5/sdk/libraries/pwm/app_pwm.h | 41 ++++++++++-- .../sdk/libraries/scheduler/app_scheduler.c | 41 ++++++++++-- .../sdk/libraries/scheduler/app_scheduler.h | 41 ++++++++++-- .../sdk/libraries/timer/app_timer.h | 41 ++++++++++-- .../sdk/libraries/trace/app_trace.c | 41 ++++++++++-- .../sdk/libraries/util/app_error.c | 41 ++++++++++-- .../sdk/libraries/util/app_error.h | 41 ++++++++++-- .../sdk/libraries/util/app_error_weak.c | 41 ++++++++++-- .../sdk/libraries/util/app_error_weak.h | 41 ++++++++++-- .../TARGET_NRF5/sdk/libraries/util/app_util.h | 41 ++++++++++-- .../sdk/libraries/util/app_util_bds.h | 41 ++++++++++-- .../sdk/libraries/util/app_util_platform.c | 41 ++++++++++-- .../sdk/libraries/util/app_util_platform.h | 41 ++++++++++-- .../TARGET_NRF5/sdk/libraries/util/common.h | 41 ++++++++++-- .../sdk/libraries/util/nordic_common.h | 42 ++++++++++-- .../sdk/libraries/util/nrf_assert.c | 41 ++++++++++-- .../sdk/libraries/util/nrf_assert.h | 31 +++++---- .../sdk/libraries/util/sdk_common.h | 41 ++++++++++-- .../sdk/libraries/util/sdk_errors.h | 41 ++++++++++-- .../sdk/libraries/util/sdk_macros.h | 41 ++++++++++-- .../sdk/libraries/util/sdk_mapped_flags.c | 41 ++++++++++-- .../sdk/libraries/util/sdk_mapped_flags.h | 41 ++++++++++-- .../TARGET_NRF5/sdk/libraries/util/sdk_os.h | 41 ++++++++++-- .../sdk/libraries/util/sdk_resources.h | 42 ++++++++++-- .../ant_stack_handler_types.h | 41 ++++++++++-- .../common/softdevice_handler/app_ram_base.h | 41 ++++++++++-- .../ble_stack_handler_types.h | 41 ++++++++++-- .../softdevice_handler/softdevice_handler.c | 41 ++++++++++-- .../softdevice_handler/softdevice_handler.h | 41 ++++++++++-- .../softdevice_handler_appsh.c | 41 ++++++++++-- .../softdevice_handler_appsh.h | 41 ++++++++++-- .../TARGET_NORDIC/TARGET_NRF5/serial_api.c | 45 +++++++++---- .../hal/TARGET_NORDIC/TARGET_NRF5/spi_api.c | 45 +++++++++---- .../hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c | 45 +++++++++---- 258 files changed, 7963 insertions(+), 2598 deletions(-) diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/startup_NRF51822.S b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/startup_NRF51822.S index e7f0afa0a3..03f6daaf53 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/startup_NRF51822.S +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/startup_NRF51822.S @@ -1,32 +1,41 @@ -/* -Copyright (c) 2013, Nordic Semiconductor ASA -All rights reserved. +/* + * Copyright (c) 2013 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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. + * + */ -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. -*/ /* NOTE: Template files (including this one) are application specific and therefore diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c index 165b67f431..dce575ab03 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c @@ -1,33 +1,42 @@ -/* Copyright (c) 2015, Nordic Semiconductor ASA +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: + * 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. * - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. + * 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. * - * * 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. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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. + * */ + /* NOTE: Template files (including this one) are application specific and therefore expected to be copied into the application project folder prior to its use! */ diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.h index 1307b7159a..72398da0d7 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.h +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.h @@ -1,33 +1,42 @@ -/* Copyright (c) 2015, Nordic Semiconductor ASA +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: + * 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. * - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. + * 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. * - * * 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. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 SYSTEM_NRF51_H #define SYSTEM_NRF51_H diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/startup_NRF52832.S b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/startup_NRF52832.S index fa2e4bd3f4..0d02b962e8 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/startup_NRF52832.S +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_GCC_ARM/startup_NRF52832.S @@ -1,32 +1,41 @@ -/* -Copyright (c) 2013, Nordic Semiconductor ASA -All rights reserved. +/* + * Copyright (c) 2013 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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. + * + */ -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. -*/ /* NOTE: Template files (including this one) are application specific and therefore diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.c b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.c index 4b101c519a..604203247c 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.c +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.c @@ -1,33 +1,42 @@ -/* Copyright (c) 2015, Nordic Semiconductor ASA +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: + * 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. * - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. + * 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. * - * * 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. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 #include #include "nrf.h" diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.h index 48b3bbc80c..5ecc271059 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.h +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.h @@ -1,33 +1,42 @@ -/* Copyright (c) 2015, Nordic Semiconductor ASA +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: + * 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. * - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. + * 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. * - * * 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. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 SYSTEM_NRF52_H #define SYSTEM_NRF52_H diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/compiler_abstraction.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/compiler_abstraction.h index a2bb0a0e1a..371d95b65a 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/compiler_abstraction.h +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/compiler_abstraction.h @@ -1,32 +1,41 @@ -/* Copyright (c) 2015, Nordic Semiconductor ASA +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: + * 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. * - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. + * 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. * - * * 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. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 _COMPILER_ABSTRACTION_H #define _COMPILER_ABSTRACTION_H diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf.h index 80fa51fd7a..94df5c648b 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf.h +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf.h @@ -1,33 +1,42 @@ -/* Copyright (c) 2015, Nordic Semiconductor ASA +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: + * 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. * - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. + * 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. * - * * 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. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_H #define NRF_H diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_bitfields.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_bitfields.h index a6684470d1..f9b512fef7 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_bitfields.h +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_bitfields.h @@ -1,32 +1,41 @@ -/* Copyright (c) 2015, Nordic Semiconductor ASA +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: + * 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. * - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. + * 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. * - * * 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. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 __NRF51_BITS_H #define __NRF51_BITS_H diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_deprecated.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_deprecated.h index 2a45aeecae..81bd149663 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_deprecated.h +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_deprecated.h @@ -1,33 +1,42 @@ -/* Copyright (c) 2015, Nordic Semiconductor ASA +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: + * 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. * - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. + * 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. * - * * 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. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 NRF51_DEPRECATED_H #define NRF51_DEPRECATED_H diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_to_nrf52.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_to_nrf52.h index a1d8c61843..a74b165a2b 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_to_nrf52.h +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf51_to_nrf52.h @@ -1,33 +1,42 @@ -/* Copyright (c) 2015, Nordic Semiconductor ASA +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: + * 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. * - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. + * 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. * - * * 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. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 NRF51_TO_NRF52_H #define NRF51_TO_NRF52_H diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf52_bitfields.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf52_bitfields.h index 7d442e2ba1..c7802c46a3 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf52_bitfields.h +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf52_bitfields.h @@ -1,32 +1,41 @@ -/* Copyright (c) 2015, Nordic Semiconductor ASA +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: + * 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. * - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. + * 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. * - * * 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. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 __NRF52_BITS_H #define __NRF52_BITS_H diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf52_name_change.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf52_name_change.h index b3be6f957c..7f362a8fd9 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf52_name_change.h +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/sdk/device/nrf52_name_change.h @@ -1,33 +1,42 @@ -/* Copyright (c) 2015, Nordic Semiconductor ASA +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: + * 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. * - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. + * 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. * - * * 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. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 NRF52_NAME_CHANGE_H #define NRF52_NAME_CHANGE_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/PeripheralNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/PeripheralNames.h index 4a75b2d7a5..65cc930c8c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/PeripheralNames.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/PeripheralNames.h @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 MBED_PERIPHERALNAMES_H #define MBED_PERIPHERALNAMES_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/PortNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/PortNames.h index 9196c20d8a..c63624639b 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/PortNames.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/PortNames.h @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 MBED_PORTNAMES_H #define MBED_PORTNAMES_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_ARCH_BLE/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_ARCH_BLE/PinNames.h index 1db1f94467..ecfb7d18e4 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_ARCH_BLE/PinNames.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_ARCH_BLE/PinNames.h @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 MBED_PINNAMES_H #define MBED_PINNAMES_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/PinNames.h index 9d05900d4a..fa6d01e4bd 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/PinNames.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/PinNames.h @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2015 Nordic Semiconductor +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 MBED_PINNAMES_H #define MBED_PINNAMES_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_HRM1017/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_HRM1017/PinNames.h index 031b2ad26a..5f3c6291d5 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_HRM1017/PinNames.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_HRM1017/PinNames.h @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 MBED_PINNAMES_H #define MBED_PINNAMES_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_MKIT/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_MKIT/PinNames.h index 031b2ad26a..5f3c6291d5 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_MKIT/PinNames.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_MKIT/PinNames.h @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 MBED_PINNAMES_H #define MBED_PINNAMES_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_SBKIT/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_SBKIT/PinNames.h index cc9ad70e58..e5f343bcf2 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_SBKIT/PinNames.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_SBKIT/PinNames.h @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 MBED_PINNAMES_H #define MBED_PINNAMES_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_Y5_MBUG/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_Y5_MBUG/PinNames.h index b43673f016..f92973cc88 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_Y5_MBUG/PinNames.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_Y5_MBUG/PinNames.h @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 MBED_PINNAMES_H #define MBED_PINNAMES_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DK/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DK/PinNames.h index be8ff8b4cf..a7cfe580ab 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DK/PinNames.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DK/PinNames.h @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 MBED_PINNAMES_H #define MBED_PINNAMES_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DONGLE/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DONGLE/PinNames.h index b8187eba8c..baccb586ff 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DONGLE/PinNames.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DONGLE/PinNames.h @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 MBED_PINNAMES_H #define MBED_PINNAMES_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_MICROBIT/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_MICROBIT/PinNames.h index ac930c2ddd..c0de7085d7 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_MICROBIT/PinNames.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_MICROBIT/PinNames.h @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 MBED_PINNAMES_H #define MBED_PINNAMES_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/PinNames.h index 84404bb1e0..ce18be448c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/PinNames.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/PinNames.h @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 MBED_PINNAMES_H #define MBED_PINNAMES_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/PinNames.h index da59a63a0c..f6c1ed99d3 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/PinNames.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/PinNames.h @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 MBED_PINNAMES_H #define MBED_PINNAMES_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_SEEED_TINY_BLE/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_SEEED_TINY_BLE/PinNames.h index 6fbcdc5946..bf45d0e742 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_SEEED_TINY_BLE/PinNames.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_SEEED_TINY_BLE/PinNames.h @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 MBED_PINNAMES_H #define MBED_PINNAMES_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_TY51822R3/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_TY51822R3/PinNames.h index 76e1958aee..c0f40ec754 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_TY51822R3/PinNames.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_TY51822R3/PinNames.h @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2015 Nordic Semiconductor +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 MBED_PINNAMES_H #define MBED_PINNAMES_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_WALLBOT_BLE/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_WALLBOT_BLE/PinNames.h index 498759646e..f5f74ca786 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_WALLBOT_BLE/PinNames.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_WALLBOT_BLE/PinNames.h @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 MBED_PINNAMES_H #define MBED_PINNAMES_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c index 2b4d27f3c6..c4b5b94a76 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "mbed_assert.h" #include "mbed_error.h" #include "pwmout_api.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/drivers_nrf/adc/nrf_drv_adc.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/drivers_nrf/adc/nrf_drv_adc.c index 1c4a0f163b..6bca7511be 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/drivers_nrf/adc/nrf_drv_adc.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/drivers_nrf/adc/nrf_drv_adc.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_drv_adc.h" #include "nrf_drv_common.h" #include "nrf_assert.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/drivers_nrf/adc/nrf_drv_adc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/drivers_nrf/adc/nrf_drv_adc.h index fddd43d2f6..832d4d9941 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/drivers_nrf/adc/nrf_drv_adc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/drivers_nrf/adc/nrf_drv_adc.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_adc.h" #include "nrf_drv_config.h" #include "sdk_errors.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h index 2f83083f6b..cbf187048d 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h @@ -1,22 +1,28 @@ -/* +/* * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * 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. * - * 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. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -27,9 +33,10 @@ * 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_DRV_CONFIG_H #define NRF_DRV_CONFIG_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf51/nrf_mbr.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf51/nrf_mbr.h index 8d4486b4db..09a00582dd 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf51/nrf_mbr.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf51/nrf_mbr.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,8 +33,9 @@ * 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 @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble.h index 3449a01bdb..71e3984776 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,9 +33,10 @@ * 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 BLE_COMMON BLE SoftDevice Common @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_err.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_err.h index 2332267905..7eaf23d125 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_err.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_err.h @@ -1,25 +1,27 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2000 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by 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, 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. * * 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 @@ -34,6 +36,7 @@ * */ + /** @addtogroup BLE_COMMON @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gap.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gap.h index c34ea5c126..926714ed36 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gap.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gap.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,9 +33,10 @@ * 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 BLE_GAP Generic Access Profile (GAP) @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gatt.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gatt.h index 9d100a6f31..c7023502bd 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gatt.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gatt.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,9 +33,10 @@ * 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 BLE_GATT Generic Attribute Profile (GATT) Common @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gattc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gattc.h index e899086eba..5aa20fe430 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gattc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gattc.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,9 +33,10 @@ * 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 BLE_GATTC Generic Attribute Profile (GATT) Client @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gatts.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gatts.h index b86be97de9..147d1a8fbf 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gatts.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gatts.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,9 +33,10 @@ * 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 BLE_GATTS Generic Attribute Profile (GATT) Server @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_hci.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_hci.h index 720a4fdf8f..a709c0a60f 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_hci.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_hci.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,9 +33,10 @@ * 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 BLE_COMMON @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_l2cap.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_l2cap.h index a98feaec64..57d3592969 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_l2cap.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_l2cap.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,9 +33,10 @@ * 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 BLE_L2CAP Logical Link Control and Adaptation Protocol (L2CAP) @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_ranges.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_ranges.h index 3beaaefd35..7476d488c0 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_ranges.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_ranges.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,9 +33,10 @@ * 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 BLE_COMMON @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_types.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_types.h index 95f0f65d80..0ef31dd83a 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_types.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_types.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,9 +33,10 @@ * 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 BLE_COMMON @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error.h index 1035b76d4a..e4f90fd54c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error.h @@ -1,25 +1,27 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2000 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by 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, 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. * * 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 @@ -32,7 +34,8 @@ * (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 @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error_sdm.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error_sdm.h index 412b9b5524..575829c7f9 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error_sdm.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error_sdm.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,8 +33,9 @@ * 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 @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error_soc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error_soc.h index 93958a44d0..28989ee4e1 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error_soc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error_soc.h @@ -1,25 +1,27 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2000 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by 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, 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. * * 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 @@ -33,6 +35,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ + /** @addtogroup nrf_soc_api @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_nvic.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_nvic.h index dae0ca5a53..8b49061c72 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_nvic.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_nvic.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,8 +33,9 @@ * 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_nvic_api SoftDevice NVIC API * @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_sd_def.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_sd_def.h index dc433f9fd2..20aef49626 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_sd_def.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_sd_def.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_SD_DEF_H__ #define NRF_SD_DEF_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_sdm.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_sdm.h index 9b673ea4f7..bb370abffe 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_sdm.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_sdm.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,8 +33,9 @@ * 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 @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_soc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_soc.h index f3c0b0dfa4..e1fbb2236a 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_soc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_soc.h @@ -1,25 +1,27 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2000 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by 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, 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. * * 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 @@ -32,7 +34,8 @@ * (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 * @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_svc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_svc.h index 31ea671529..aa91e5d35e 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_svc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_svc.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,9 +33,10 @@ * 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__ #define NRF_SVC__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/PeripheralNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/PeripheralNames.h index 3058e99f9c..0fe6da592e 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/PeripheralNames.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/PeripheralNames.h @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 MBED_PERIPHERALNAMES_H #define MBED_PERIPHERALNAMES_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/PortNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/PortNames.h index 9196c20d8a..c63624639b 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/PortNames.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/PortNames.h @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 MBED_PORTNAMES_H #define MBED_PORTNAMES_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TARGET_NRF52_DK/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TARGET_NRF52_DK/PinNames.h index 27aa95162a..0ce5babca4 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TARGET_NRF52_DK/PinNames.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TARGET_NRF52_DK/PinNames.h @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2016 Nordic Semiconductor +/* + * Copyright (c) 2016 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 MBED_PINNAMES_H #define MBED_PINNAMES_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c index cf28491102..c58d13a4d9 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "mbed_assert.h" #include "mbed_error.h" #include "pwmout_api.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/saadc/nrf_drv_saadc.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/saadc/nrf_drv_saadc.c index 9c528ed782..0412f1bcdf 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/saadc/nrf_drv_saadc.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/saadc/nrf_drv_saadc.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_drv_saadc.h" #include "nrf_assert.h" #include "nordic_common.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/saadc/nrf_drv_saadc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/saadc/nrf_drv_saadc.h index 61544f30f1..661177c424 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/saadc/nrf_drv_saadc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/saadc/nrf_drv_saadc.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 nrf_saadc SAADC HAL and driver * @ingroup nrf_drivers diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h index 6cc44facc6..404f391325 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h @@ -1,22 +1,28 @@ -/* +/* * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * 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. * - * 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. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -27,9 +33,10 @@ * 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_DRV_CONFIG_H #define NRF_DRV_CONFIG_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf52/nrf_mbr.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf52/nrf_mbr.h index a18403e10d..9506d327d3 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf52/nrf_mbr.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf52/nrf_mbr.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,8 +33,9 @@ * 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 @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble.h index 3449a01bdb..71e3984776 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,9 +33,10 @@ * 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 BLE_COMMON BLE SoftDevice Common @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_err.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_err.h index 2332267905..7eaf23d125 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_err.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_err.h @@ -1,25 +1,27 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2000 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by 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, 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. * * 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 @@ -34,6 +36,7 @@ * */ + /** @addtogroup BLE_COMMON @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gap.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gap.h index c34ea5c126..926714ed36 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gap.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gap.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,9 +33,10 @@ * 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 BLE_GAP Generic Access Profile (GAP) @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gatt.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gatt.h index 9d100a6f31..c7023502bd 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gatt.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gatt.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,9 +33,10 @@ * 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 BLE_GATT Generic Attribute Profile (GATT) Common @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gattc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gattc.h index e899086eba..5aa20fe430 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gattc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gattc.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,9 +33,10 @@ * 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 BLE_GATTC Generic Attribute Profile (GATT) Client @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gatts.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gatts.h index b86be97de9..147d1a8fbf 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gatts.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_gatts.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,9 +33,10 @@ * 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 BLE_GATTS Generic Attribute Profile (GATT) Server @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_hci.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_hci.h index 720a4fdf8f..a709c0a60f 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_hci.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_hci.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,9 +33,10 @@ * 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 BLE_COMMON @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_l2cap.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_l2cap.h index a98feaec64..57d3592969 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_l2cap.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_l2cap.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,9 +33,10 @@ * 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 BLE_L2CAP Logical Link Control and Adaptation Protocol (L2CAP) @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_ranges.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_ranges.h index 3beaaefd35..7476d488c0 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_ranges.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_ranges.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,9 +33,10 @@ * 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 BLE_COMMON @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_types.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_types.h index 95f0f65d80..0ef31dd83a 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_types.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_ble_types.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,9 +33,10 @@ * 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 BLE_COMMON @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error.h index 1035b76d4a..e4f90fd54c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error.h @@ -1,25 +1,27 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2000 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by 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, 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. * * 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 @@ -32,7 +34,8 @@ * (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 @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error_sdm.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error_sdm.h index 412b9b5524..575829c7f9 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error_sdm.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error_sdm.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,8 +33,9 @@ * 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 @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error_soc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error_soc.h index 93958a44d0..28989ee4e1 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error_soc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_error_soc.h @@ -1,25 +1,27 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2000 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by 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, 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. * * 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 @@ -33,6 +35,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ + /** @addtogroup nrf_soc_api @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_nvic.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_nvic.h index dae0ca5a53..8b49061c72 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_nvic.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_nvic.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,8 +33,9 @@ * 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_nvic_api SoftDevice NVIC API * @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_sd_def.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_sd_def.h index 5b58c4f259..1af95f1dc6 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_sd_def.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_sd_def.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_SD_DEF_H__ #define NRF_SD_DEF_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_sdm.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_sdm.h index 9b673ea4f7..bb370abffe 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_sdm.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_sdm.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,8 +33,9 @@ * 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 @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_soc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_soc.h index f3c0b0dfa4..e1fbb2236a 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_soc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_soc.h @@ -1,25 +1,27 @@ /* - * Copyright (c) Nordic Semiconductor ASA + * Copyright (c) 2000 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by 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, 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. * * 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 @@ -32,7 +34,8 @@ * (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 * @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_svc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_svc.h index 31ea671529..aa91e5d35e 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_svc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/nrf_svc.h @@ -1,26 +1,28 @@ -/* - * Copyright (c) Nordic Semiconductor ASA +/* + * Copyright (c) 2000 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. * - * 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. * - * 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. - * - * 4. This software must only be used in a processor manufactured by Nordic - * Semiconductor ASA, or in a processor manufactured by a third party that - * is used in combination with a processor manufactured by Nordic Semiconductor. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -31,9 +33,10 @@ * 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__ #define NRF_SVC__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/i2c_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/i2c_api.c index ce2e475f74..c7221533d7 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/i2c_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/i2c_api.c @@ -1,19 +1,42 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "i2c_api.h" #if DEVICE_I2C diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/objects.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/objects.h index 96e5ca1c55..5f7d4bf266 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/objects.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/objects.h @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 MBED_OBJECTS_H #define MBED_OBJECTS_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c index 5655d302e3..6a306b3031 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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. + * */ + #if defined(TARGET_MCU_NRF51822) #include "common_rtc.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/port_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/port_api.c index 13c1ada97e..ad3be04816 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/port_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/port_api.c @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "port_api.h" #include "pinmap.h" #include "gpio_api.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/rtc_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/rtc_api.c index cf37709ee3..cc4d0f118f 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/rtc_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/rtc_api.c @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "rtc_api.h" #if DEVICE_RTC diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_advertising/ble_advertising.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_advertising/ble_advertising.c index 959ecb10dc..39a60f7d1c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_advertising/ble_advertising.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_advertising/ble_advertising.c @@ -1,15 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_advertising.h" #include "nrf_soc.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_advertising/ble_advertising.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_advertising/ble_advertising.h index b0ed7827de..c806399eb4 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_advertising/ble_advertising.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_advertising/ble_advertising.h @@ -1,15 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup ble_sdk_lib_advertising Advertising Module diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.c index a3eff8d9d2..d2a7b0b213 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.c @@ -1,14 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_db_discovery.h" #include #include "nrf_ble.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.h index adff289653..edca50f3e5 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_db_discovery/ble_db_discovery.h @@ -1,15 +1,43 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup ble_sdk_lib_db_discovery Database Discovery diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_debug_assert_handler/ble_debug_assert_handler.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_debug_assert_handler/ble_debug_assert_handler.c index a47ec5ef81..665393c6fb 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_debug_assert_handler/ble_debug_assert_handler.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_debug_assert_handler/ble_debug_assert_handler.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_debug_assert_handler.h" #include #include "nrf.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_debug_assert_handler/ble_debug_assert_handler.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_debug_assert_handler/ble_debug_assert_handler.h index 051e6a4062..7a4ffa2648 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_debug_assert_handler/ble_debug_assert_handler.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_debug_assert_handler/ble_debug_assert_handler.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup ble_debug_assert_handler Assert handler for debug purposes diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_dtm/ble_dtm.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_dtm/ble_dtm.c index de0ed8d7a3..dad99f352b 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_dtm/ble_dtm.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_dtm/ble_dtm.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2012 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_dtm.h" #include #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_dtm/ble_dtm.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_dtm/ble_dtm.h index 76acb1e4f0..6831a85728 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_dtm/ble_dtm.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_dtm/ble_dtm.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2012 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup ble_sdk_dtmlib_dtm DTM - Direct Test Mode diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_error_log/ble_error_log.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_error_log/ble_error_log.c index 0e2614041b..1c827515b6 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_error_log/ble_error_log.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_error_log/ble_error_log.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2012 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 #include #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_error_log/ble_error_log.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_error_log/ble_error_log.h index 825046fa6a..ab121c2b3c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_error_log/ble_error_log.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_error_log/ble_error_log.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2012 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup ble_error_log_module Error Log Module diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_racp/ble_racp.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_racp/ble_racp.c index 047c85545b..5229f7ca24 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_racp/ble_racp.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_racp/ble_racp.c @@ -1,13 +1,41 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2012 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_racp.h" #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_racp/ble_racp.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_racp/ble_racp.h index c81cda822b..baf11760f1 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_racp/ble_racp.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_racp/ble_racp.h @@ -1,14 +1,42 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2012 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup ble_sdk_lib_racp Record Access Control Point diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.c index ecb5e943af..b460733871 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.c @@ -1,22 +1,28 @@ -/* +/* * Copyright (c) 2012 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. * - * 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. * - * 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. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -27,9 +33,10 @@ * 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 #include "nrf_nvic.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.h index 1b61902c40..02e5b25bf0 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_radio_notification/ble_radio_notification.h @@ -1,22 +1,28 @@ -/* +/* * Copyright (c) 2012 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. * - * 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. * - * 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. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -27,9 +33,10 @@ * 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 * * @defgroup ble_radio_notification Radio Notification Event Handler diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.c index d6e0b6b321..333533af54 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "nrf_ble_types.h" #include "nrf_ble_gatts.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.h index ac7500494c..9ce409ee2f 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_services/ble_dfu/ble_dfu.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup ble_sdk_srv_dfu Device Firmware Update Service diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.c index ee031689fc..2b9eaaa286 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2012 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "nrf_ble_gap.h" #include "ble_srv_common.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.h index 1e9094b13d..75a0d014c9 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_advdata.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2012 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup ble_sdk_lib_advdata Advertising and Scan Response Data Encoder diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.c index 9579ebba1c..6ba9bd011a 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2012 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_conn_params.h" #include #include "nordic_common.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.h index 9c0f38ac95..81bca6eae5 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2012 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup ble_sdk_lib_conn_params Connection Parameters Negotiation diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.c index 8ee0226dc5..060ce77e34 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_conn_state.h" #include #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.h index f74ab85861..d5b48aa9cf 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_state.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_date_time.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_date_time.h index 38b274d85f..7112223857 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_date_time.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_date_time.h @@ -1,13 +1,41 @@ -/* Copyright (c) 2011 Nordic Semiconductor. All Rights Reserved. -* -* The information contained herein is property of Nordic Semiconductor ASA. -* Terms and conditions of usage are described in detail in NORDIC -* SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. -* -* Licensees are granted free, non-transferable use of the information. NO -* WARRANTY of ANY KIND is provided. This heading must NOT be removed from -* the file. -*/ +/* + * Copyright (c) 2011 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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! * To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_gatt_db.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_gatt_db.h index 15c010041a..9e9b0deed4 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_gatt_db.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_gatt_db.h @@ -1,14 +1,42 @@ -/* Copyright (c) 2016 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2016 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup ble_sdk_lib_gatt_db GATT Database Service Structure diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_sensor_location.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_sensor_location.h index 4fdbbf6199..43311a6077 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_sensor_location.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_sensor_location.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2012 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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! * To maintain compliance with Nordic Semiconductor ASA’s Bluetooth profile * qualification listings, this section of source code must not be modified. diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.c index caae48d6b2..42cd2d4f2a 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2012 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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! * To maintain compliance with Nordic Semiconductor ASA�s Bluetooth profile * qualification listings, this section of source code must not be modified. diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.h index 26374ee95e..79a7ad0bfc 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_srv_common.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2012 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup ble_sdk_srv_common Common service definitions diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/config/device_manager_cnfg.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/config/device_manager_cnfg.h index 9aff537f30..394a118874 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/config/device_manager_cnfg.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/config/device_manager_cnfg.h @@ -1,14 +1,42 @@ -/* Copyright (C) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 device_manager_cnfg.h * diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager.h index 99bf9e68d0..0b085abc64 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager.h @@ -1,14 +1,42 @@ -/* Copyright (C) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 device_manager.h * diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager_peripheral.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager_peripheral.c index e6e0b872a5..0302e2ff9e 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager_peripheral.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/device_manager/device_manager_peripheral.c @@ -1,14 +1,42 @@ -/* Copyright (C) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "app_trace.h" #include "pstorage.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.c index 29fcd74a84..ef09362c4c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.c @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "gatt_cache_manager.h" #include "nrf_ble_gap.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.h index eeff17235e..c4b763c358 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatt_cache_manager.h @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 GATT_CACHE_MANAGER_H__ #define GATT_CACHE_MANAGER_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.c index 08e402a3c7..e6b5469b41 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.c @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "gattc_cache_manager.h" #include "nrf_ble_gap.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.h index a9acf0bf3f..abfca986a4 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gattc_cache_manager.h @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 GATTC_CACHE_MANAGER_H__ #define GATTC_CACHE_MANAGER_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.c index 4acb4294c8..8cbca8e3f1 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.c @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "gatts_cache_manager.h" #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.h index bf2f9f1894..6c6b3f8baa 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/gatts_cache_manager.h @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 GATTS_CACHE_MANAGER_H__ #define GATTS_CACHE_MANAGER_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.c index 28ab3bb640..94bc363ef6 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.c @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "id_manager.h" #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.h index da4a909755..27434bff3a 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/id_manager.h @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 PEER_ID_MANAGER_H__ #define PEER_ID_MANAGER_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data.c index 02398bca90..2282cc48d3 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data.c @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "peer_data.h" #include "peer_manager_types.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data.h index 36c8d93758..3c1f373087 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data.h @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 PEER_DATA_H__ #define PEER_DATA_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data_storage.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data_storage.c index 5464d53aa3..1f4e05dd5b 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data_storage.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data_storage.c @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "peer_data_storage.h" #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data_storage.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data_storage.h index 859e143606..42dcacd69c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data_storage.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_data_storage.h @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 PEER_DATA_STORAGE_H__ #define PEER_DATA_STORAGE_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_database.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_database.c index 87ba30ff57..fd6c30193d 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_database.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_database.c @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "peer_database.h" #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_database.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_database.h index 328ab26799..c0eee65774 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_database.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_database.h @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 PEER_DATABASE_H__ #define PEER_DATABASE_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_id.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_id.c index 63d676a888..df7ac58e2b 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_id.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_id.c @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "peer_id.h" #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_id.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_id.h index 1d7de22ba2..ac68851451 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_id.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_id.h @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 PEER_ID_H__ #define PEER_ID_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager.c index 8fc5e092f5..7d11076083 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager.c @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "peer_manager.h" #include #include "app_util.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager.h index 34cb6716a6..5618dbbd56 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager.h @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 peer_manager.h * diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_internal.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_internal.h index a10bb7fcc3..df365e2e94 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_internal.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_internal.h @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 PEER_MANAGER_INTERNAL_H__ #define PEER_MANAGER_INTERNAL_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_types.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_types.h index ac7fe6f656..6a4b11b8df 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_types.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_types.h @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 peer_manager_types.h * diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_buffer.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_buffer.c index 935ddcc3d8..20ea66b521 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_buffer.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_buffer.c @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "pm_buffer.h" #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_buffer.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_buffer.h index de0ef5008d..8093ad4957 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_buffer.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_buffer.h @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 BUFFER_H__ #define BUFFER_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_mutex.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_mutex.c index d448b4118f..1758108d34 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_mutex.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_mutex.c @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "pm_mutex.h" #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_mutex.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_mutex.h index 5dba183245..abc2446921 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_mutex.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/pm_mutex.h @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 MUTEX_H__ #define MUTEX_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.c index 946f388c3c..f35d701e79 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.c @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "security_dispatcher.h" #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.h index 9ffaa8b0d0..037158a9f7 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_dispatcher.h @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 SECURITY_DISPATCHER_H__ #define SECURITY_DISPATCHER_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_manager.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_manager.c index 99e4539288..2bb3dc917d 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_manager.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_manager.c @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "security_manager.h" #include #include "security_dispatcher.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_manager.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_manager.h index d3aedbbcdf..39b0d92ce2 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_manager.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/security_manager.h @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 SECURITY_MANAGER_H__ #define SECURITY_MANAGER_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.c index f5c08413d9..5d5c843f8d 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.c @@ -1,22 +1,28 @@ -/* +/* * Copyright (c) 2012 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. * - * 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. * - * 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. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -27,9 +33,10 @@ * 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 #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.h index 3c93cd5023..c3943438c1 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ble_flash/ble_flash.h @@ -1,22 +1,28 @@ -/* +/* * Copyright (c) 2012 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. * - * 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. * - * 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. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -27,9 +33,10 @@ * 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 * * @defgroup ble_flash_module Flash Manager diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/clock/nrf_drv_clock.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/clock/nrf_drv_clock.c index 2d18431ad0..00265d60b0 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/clock/nrf_drv_clock.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/clock/nrf_drv_clock.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_drv_clock.h" #include "nrf_error.h" #include "nordic_common.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/clock/nrf_drv_clock.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/clock/nrf_drv_clock.h index d0a650cf09..583902e4d8 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/clock/nrf_drv_clock.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/clock/nrf_drv_clock.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_DRV_CLOCK_H__ #define NRF_DRV_CLOCK_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/common/nrf_drv_common.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/common/nrf_drv_common.c index 8aa1ce1e42..43efd35e30 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/common/nrf_drv_common.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/common/nrf_drv_common.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 #include "nrf_drv_common.h" #include "nrf_assert.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/common/nrf_drv_common.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/common/nrf_drv_common.h index 77785d8f54..1d211eaf9b 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/common/nrf_drv_common.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/common/nrf_drv_common.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_DRV_COMMON_H__ #define NRF_DRV_COMMON_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/config/nrf_drv_config_validation.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/config/nrf_drv_config_validation.h index fdd614899a..aab66c7de2 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/config/nrf_drv_config_validation.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/config/nrf_drv_config_validation.h @@ -1,22 +1,28 @@ -/* +/* * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * 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. * - * 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. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -27,9 +33,10 @@ * 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_DRV_CONFIG_VALIDATION_H #define NRF_DRV_CONFIG_VALIDATION_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/delay/nrf_delay.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/delay/nrf_delay.c index e8b561a968..28cfa1322e 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/delay/nrf_delay.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/delay/nrf_delay.c @@ -1,14 +1,41 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2012 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 #include "compiler_abstraction.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/gpiote/nrf_drv_gpiote.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/gpiote/nrf_drv_gpiote.c index 6dfe91a204..752c89c9a7 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/gpiote/nrf_drv_gpiote.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/gpiote/nrf_drv_gpiote.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_drv_gpiote.h" #include "nrf_drv_common.h" #include "nrf_drv_config.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/gpiote/nrf_drv_gpiote.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/gpiote/nrf_drv_gpiote.h index 9a7fc341b1..2af99b056e 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/gpiote/nrf_drv_gpiote.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/gpiote/nrf_drv_gpiote.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_DRV_GPIOTE__ #define NRF_DRV_GPIOTE__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_adc.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_adc.c index e408ca7007..188ac506c8 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_adc.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_adc.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2014 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * @brief ADC HAL implementation diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_adc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_adc.h index c697a22415..ea4e094cfa 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_adc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_adc.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2014 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_ADC_H_ #define NRF_ADC_H_ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_clock.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_clock.h index d61d260387..2471a317f6 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_clock.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_clock.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_CLOCK_H__ #define NRF_CLOCK_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.c index e62b3b7e13..e66f63f07d 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.c @@ -1,22 +1,28 @@ -/* +/* * Copyright (c) 2012 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. * - * 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. * - * 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. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -27,8 +33,9 @@ * 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 diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.h index 9fd9121a81..7b4cbf1e4b 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ecb.h @@ -1,22 +1,28 @@ -/* +/* * Copyright (c) 2012 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. * - * 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. * - * 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. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -27,9 +33,10 @@ * 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 * @brief ECB driver API. diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpio.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpio.h index 016ab10ea6..3127568fb5 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpio.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpio.h @@ -1,22 +1,28 @@ -/* +/* * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * 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. * - * 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. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -27,8 +33,9 @@ * 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__ #define NRF_GPIO_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpiote.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpiote.h index 0e04d0d72e..7ad15e6398 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpiote.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_gpiote.h @@ -1,22 +1,28 @@ -/* +/* * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * 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. * - * 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. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -27,8 +33,9 @@ * 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__ #define NRF_GPIOTE_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.c index d41ea29034..de2a52db8c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.c @@ -1,22 +1,28 @@ -/* +/* * Copyright (c) 2012 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. * - * 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. * - * 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. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -27,8 +33,9 @@ * 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 diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.h index 40c9f4b20e..59b23f1845 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_nvmc.h @@ -1,22 +1,28 @@ -/* +/* * Copyright (c) 2012 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. * - * 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. * - * 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. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -27,9 +33,10 @@ * 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 * @brief NMVC driver API. diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_pdm.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_pdm.h index 7ece45320c..be41fdfae0 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_pdm.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_pdm.h @@ -1,22 +1,28 @@ -/* +/* * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * 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. * - * 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. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -27,10 +33,11 @@ * 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_PDM_H_ #define NRF_PDM_H_ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ppi.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ppi.h index f7fcf47fde..b501240fef 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ppi.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_ppi.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_PPI_H__ #define NRF_PPI_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_rtc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_rtc.h index 32e4d2f178..39e7f57281 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_rtc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_rtc.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2014 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * @brief RTC HAL API. diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.c index bddd186486..c5b88ea077 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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. + * */ + #ifdef NRF52 /** * @file diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.h index 36c318fc00..b3ea9d7ef7 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_saadc.h @@ -1,16 +1,43 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_SAADC_H_ #define NRF_SAADC_H_ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spi.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spi.h index 2d3897d77f..20dba2d598 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spi.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spi.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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. + * */ + /** * @defgroup nrf_spi_hal SPI HAL * @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spim.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spim.h index 279f483df6..495b4dd316 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spim.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spim.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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. + * */ + /** * @defgroup nrf_spim_hal SPIM HAL * @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spis.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spis.h index 077eb4155f..6312ce131c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spis.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_spis.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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. + * */ + /** * @defgroup nrf_spis_hal SPIS HAL * @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_temp.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_temp.h index b07c9c445d..001f7f0bc9 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_temp.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_temp.h @@ -1,22 +1,28 @@ -/* +/* * Copyright (c) 2012 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. * - * 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. * - * 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. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -27,9 +33,10 @@ * 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__ #define NRF_TEMP_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_timer.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_timer.h index 3da5160e78..85d4ac5a1b 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_timer.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_timer.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2014 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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. + * */ + /** * @defgroup nrf_timer_hal Timer HAL * @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_twi.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_twi.h index 8cf448ba9a..bd2198082a 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_twi.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_twi.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_TWI_H__ #define NRF_TWI_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_uart.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_uart.h index 4cac9402b7..1d09fe3846 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_uart.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_uart.h @@ -1,14 +1,41 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_UART_H__ #define NRF_UART_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_uarte.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_uarte.h index 8a4d42e7db..aa0a0f1b38 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_uarte.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_uarte.h @@ -1,14 +1,41 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_UARTE_H__ #define NRF_UARTE_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_wdt.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_wdt.h index 2ee124869a..4b6f9a5609 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_wdt.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_wdt.h @@ -1,22 +1,28 @@ -/* +/* * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * 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. * - * 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. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -27,9 +33,10 @@ * 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_wdt_hal WDT HAL * @{ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ppi/nrf_drv_ppi.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ppi/nrf_drv_ppi.c index e487279de8..12b36d1acb 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ppi/nrf_drv_ppi.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ppi/nrf_drv_ppi.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 #include "nrf.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ppi/nrf_drv_ppi.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ppi/nrf_drv_ppi.h index bd1c743879..55cd93346c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ppi/nrf_drv_ppi.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/ppi/nrf_drv_ppi.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_DRV_PPI_H #define NRF_DRV_PPI_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/config/pstorage_platform.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/config/pstorage_platform.h index 6ecf20453c..113fd637fc 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/config/pstorage_platform.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/config/pstorage_platform.h @@ -1,22 +1,28 @@ -/* +/* * Copyright (c) 2013 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. * - * 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. * - * 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. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -27,9 +33,10 @@ * 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 */ /** @file diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.c index 4c62cafa62..f39fe2c1e7 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.c @@ -1,22 +1,28 @@ -/* +/* * Copyright (c) 2013 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. * - * 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. * - * 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. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -27,9 +33,10 @@ * 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 "pstorage.h" #include #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.h index 79c8fae4a7..0a5884cd52 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/pstorage/pstorage.h @@ -1,22 +1,28 @@ -/* +/* * Copyright (c) 2013 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. * - * 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. * - * 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. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -27,9 +33,10 @@ * 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 * * @defgroup persistent_storage Persistent Storage Interface diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.c index 0ff45aaa40..de1f287232 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_drv_spi.h" #include "nrf_drv_common.h" #include "nrf_gpio.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.h index 15dfdfd6e7..17ae6536f4 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_master/nrf_drv_spi.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * @addtogroup nrf_spi Serial peripheral interface (SPI) * @ingroup nrf_drivers diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_slave/nrf_drv_spis.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_slave/nrf_drv_spis.c index 2706798a22..75d261b69f 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_slave/nrf_drv_spis.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_slave/nrf_drv_spis.c @@ -1,14 +1,41 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_drv_spis.h" #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_slave/nrf_drv_spis.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_slave/nrf_drv_spis.h index 7b2fd6a3cd..a761f66717 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_slave/nrf_drv_spis.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/spi_slave/nrf_drv_spis.h @@ -1,14 +1,41 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * @defgroup nrf_spis SPI slave HAL and driver diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/timer/nrf_drv_timer.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/timer/nrf_drv_timer.c index 41985d2fef..2ffdd36d6c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/timer/nrf_drv_timer.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/timer/nrf_drv_timer.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_drv_timer.h" #include "nrf_drv_common.h" #include "app_util_platform.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/timer/nrf_drv_timer.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/timer/nrf_drv_timer.h index 25d3bf84ba..bc6385c84c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/timer/nrf_drv_timer.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/timer/nrf_drv_timer.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * @addtogroup nrf_timer Timer HAL and driver * @ingroup nrf_drivers diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.c index 60a5b4ec16..a70c39e73d 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_drv_twi.h" #include "nrf_drv_common.h" #include "nrf_gpio.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.h index 0825a288ca..83f37ea4be 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/twi_master/nrf_drv_twi.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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. + * */ + /** * * @defgroup nrf_twi Two-wire interface (TWI) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/uart/nrf_drv_uart.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/uart/nrf_drv_uart.c index a62cff1dd6..8ec60dbd3c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/uart/nrf_drv_uart.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/uart/nrf_drv_uart.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_drv_uart.h" #include "nrf_assert.h" #include "nordic_common.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/uart/nrf_drv_uart.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/uart/nrf_drv_uart.h index 53c9498259..142ed08fc3 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/uart/nrf_drv_uart.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/uart/nrf_drv_uart.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * @addtogroup nrf_uart UART driver and HAL * @ingroup nrf_drivers diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader.c index 82205be837..390c945495 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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.h" #include "bootloader_types.h" #include "bootloader_util.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader.h index aa6125876f..f2f35bee60 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader.h @@ -1,14 +1,41 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.c index 19707ec53c..5fc2223e70 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_settings.h" #include #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.h index 645b7f4e6e..c8964f42dc 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2014 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup nrf_bootloader_settings Bootloader settings API. diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_types.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_types.h index da3ce2c0b7..5d342b0ade 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_types.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_types.h @@ -1,14 +1,41 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_util.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_util.c index 8912805b13..39eb64efbc 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_util.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_util.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_util.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_util.h index 1e09e2d346..a1d3f4e47d 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_util.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_util.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup nrf_bootloader_util Bootloader util API. diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu.h index 9832180902..e0dda11040 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu.h @@ -1,14 +1,41 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_app_handler.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_app_handler.c index 341cd2214b..38b3ca4770 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_app_handler.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_app_handler.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2014 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 #include "bootloader_util.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_app_handler.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_app_handler.h index e923186c99..6f208f1d43 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_app_handler.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_app_handler.h @@ -1,14 +1,41 @@ -/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2014 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_bank_internal.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_bank_internal.h index ac2b520fdb..a2dbb80b09 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_bank_internal.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_bank_internal.h @@ -1,14 +1,41 @@ -/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2014 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_ble_svc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_ble_svc.h index 54bdfa9e51..fe44c98e1a 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_ble_svc.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_ble_svc.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2014 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup nrf_dfu_ble_svc DFU BLE SVC diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_ble_svc_internal.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_ble_svc_internal.h index 6f05fbf886..e737a2ef1e 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_ble_svc_internal.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_ble_svc_internal.h @@ -1,14 +1,41 @@ -/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2014 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_init.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_init.h index 33a85f20d0..a567576d4e 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_init.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_init.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2014 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup nrf_dfu_init Init packet handling in DFU diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_init_template.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_init_template.c index 598340c4d6..cb9e145455 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_init_template.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_init_template.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2014 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup nrf_dfu_init_template Template file with an DFU init packet handling example. diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_transport.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_transport.h index 130beb3800..20fe4c81ba 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_transport.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_transport.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup nrf_dfu_transport DFU transport API. diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_types.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_types.h index 9a4f70585d..7a7421d878 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_types.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/dfu_types.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup nrf_dfu_types Types and definitions. diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/hci_transport/hci_mem_pool_internal.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/hci_transport/hci_mem_pool_internal.h index f5c963822e..8f5d83ba0c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/hci_transport/hci_mem_pool_internal.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/hci_transport/hci_mem_pool_internal.h @@ -1,14 +1,41 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/hci_transport/hci_transport_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/hci_transport/hci_transport_config.h index 748b1ce67d..8b7a4f41c2 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/hci_transport/hci_transport_config.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/hci_transport/hci_transport_config.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup ble_sdk_bootloader_hci_congfig HCI Transport Layer Configuration diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/crc16/crc16.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/crc16/crc16.c index 5e0220a171..76180a86e8 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/crc16/crc16.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/crc16/crc16.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/crc16/crc16.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/crc16/crc16.h index aae81e2e46..d57197ed9c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/crc16/crc16.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/crc16/crc16.h @@ -1,14 +1,41 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/experimental_section_vars/section_vars.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/experimental_section_vars/section_vars.h index f97168176a..abd489b06c 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/experimental_section_vars/section_vars.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/experimental_section_vars/section_vars.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2016 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2016 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 SECTION_VARS_H__ #define SECTION_VARS_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/config/fds_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/config/fds_config.h index 207f326f4c..dbcf872748 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/config/fds_config.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/config/fds_config.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 FDS_CONFIG_H__ #define FDS_CONFIG_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds.c index e3b9b028e3..309a306d0d 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "fds.h" #include "fds_config.h" #include "fds_internal_defs.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds.h index 6795f1c20a..b655566fab 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 FDS_H__ #define FDS_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds_internal_defs.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds_internal_defs.h index 6f96463458..b7c2e3a3d5 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds_internal_defs.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fds/fds_internal_defs.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 FDS_INTERNAL_DEFS_H__ #define FDS_INTERNAL_DEFS_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/config/fstorage_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/config/fstorage_config.h index 71ffcadeb0..9ff7550997 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/config/fstorage_config.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/config/fstorage_config.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 FS_CONFIG_H__ #define FS_CONFIG_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage.c index 071cba50c5..5cf3d8d426 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "fstorage.h" #include "fstorage_config.h" #include "fstorage_internal_defs.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage.h index df186548f4..718406abf0 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 FSTORAGE_H__ #define FSTORAGE_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage_internal_defs.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage_internal_defs.h index fc29693088..8f8e4bbea2 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage_internal_defs.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/fstorage/fstorage_internal_defs.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 FSTORAGE_INTERNAL_DEFS_H__ #define FSTORAGE_INTERNAL_DEFS_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/config/hci_mem_pool_internal.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/config/hci_mem_pool_internal.h index f1fa77fea6..92594915ac 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/config/hci_mem_pool_internal.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/config/hci_mem_pool_internal.h @@ -1,14 +1,41 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/config/hci_transport_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/config/hci_transport_config.h index 86a55e32a9..fdff490056 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/config/hci_transport_config.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/config/hci_transport_config.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @brief Definition of HCI Transport Layer configurable parameters diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/hci_mem_pool.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/hci_mem_pool.c index 5213f327bb..cefb91eb2f 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/hci_mem_pool.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/hci_mem_pool.c @@ -1,14 +1,41 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_internal.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/hci_mem_pool.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/hci_mem_pool.h index bc178d0bac..e4f7358b8f 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/hci_mem_pool.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/hci/hci_mem_pool.h @@ -1,14 +1,41 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/pwm/app_pwm.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/pwm/app_pwm.c index db5c810419..83ad686cbb 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/pwm/app_pwm.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/pwm/app_pwm.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_pwm.h" #include "nrf_drv_timer.h" #include "nrf_drv_ppi.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/pwm/app_pwm.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/pwm/app_pwm.h index 7c619f1951..de9c8e0fad 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/pwm/app_pwm.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/pwm/app_pwm.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup app_pwm Pulse-width modulation (PWM) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/scheduler/app_scheduler.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/scheduler/app_scheduler.c index b6f3e5ba96..d927ead696 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/scheduler/app_scheduler.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/scheduler/app_scheduler.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2012 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/scheduler/app_scheduler.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/scheduler/app_scheduler.h index 079762c20c..82c90b9180 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/scheduler/app_scheduler.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/scheduler/app_scheduler.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2012 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup app_scheduler Scheduler diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/timer/app_timer.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/timer/app_timer.h index 11d38695fe..836f7744aa 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/timer/app_timer.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/timer/app_timer.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2012 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup app_timer Application Timer diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/trace/app_trace.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/trace/app_trace.c index 74e3f5fa97..d4804f5348 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/trace/app_trace.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/trace/app_trace.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2014 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 #include #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error.c index 89a6cb27d9..986e711fbd 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2014 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup app_error Common application error handler diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error.h index 351ae767a0..66cd551d53 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup app_error Common application error handler diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error_weak.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error_weak.c index edb7e652fd..65351d9e65 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error_weak.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error_weak.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2016 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2016 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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_error.h" #ifdef DEBUG diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error_weak.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error_weak.h index e02f9826f7..1bc784acde 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error_weak.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_error_weak.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2016 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2016 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 APP_ERROR_WEAK_H__ #define APP_ERROR_WEAK_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util.h index 56ccb1691d..146bff37a6 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2012 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup app_util Utility Functions and Definitions diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_bds.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_bds.h index aa0d01028a..96467e3d89 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_bds.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_bds.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2012 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup app_util Utility Functions and Definitions diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_platform.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_platform.c index baaa320929..8683b50efc 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_platform.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_platform.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2014 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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" static uint32_t m_in_critical_region = 0; diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_platform.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_platform.h index 4c79be4e73..a01b26d0e7 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_platform.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/app_util_platform.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2014 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup app_util_platform Utility Functions and Definitions (Platform) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/common.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/common.h index 44abd5b131..acd5a9c5df 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/common.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/common.h @@ -1,15 +1,42 @@ - /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. + /* + * Copyright (c) 2009 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 #define COMMON_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nordic_common.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nordic_common.h index bf256e0fa9..f0e725bc06 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nordic_common.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nordic_common.h @@ -1,14 +1,42 @@ -/* Copyright (c) 2008 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2008 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * @brief Common defines and macros for firmware developed by Nordic Semiconductor. */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.c index d84a23935e..23ba8f76cb 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.c @@ -1,14 +1,41 @@ -/* Copyright (c) 2006 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2006 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "app_error.h" #include "nordic_common.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h index 4d6fed9650..8ef5a5d501 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h @@ -1,22 +1,28 @@ -/* +/* * Copyright (c) 2006 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. * - * 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. * - * 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. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * * 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 @@ -27,9 +33,10 @@ * 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 * @brief Utilities for verifying program logic */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_common.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_common.h index 2aa3e69f90..f7e8302973 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_common.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_common.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 */ /**@file * diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_errors.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_errors.h index 757c10f902..dc7ef99ae4 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_errors.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_errors.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup sdk_error SDK Error codes diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_macros.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_macros.h index b662aa53af..166073e579 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_macros.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_macros.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 */ /**@file * diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_mapped_flags.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_mapped_flags.c index efadca2f67..c92dbc973f 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_mapped_flags.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_mapped_flags.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "sdk_mapped_flags.h" #include #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_mapped_flags.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_mapped_flags.h index 6007eb2baf..780a9b61e3 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_mapped_flags.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_mapped_flags.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 SDK_MAPPED_FLAGS_H__ #define SDK_MAPPED_FLAGS_H__ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_os.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_os.h index ff871cfb3b..760822ff35 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_os.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_os.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 */ /**@file * diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_resources.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_resources.h index 9974b3d89e..27b0863856 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_resources.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/sdk_resources.h @@ -1,14 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * @brief Definition file for resource usage by SoftDevice, ESB and Gazell. */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/ant_stack_handler_types.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/ant_stack_handler_types.h index 2a43d8fa4f..a74ed1800d 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/ant_stack_handler_types.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/ant_stack_handler_types.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup ant_stack_handler_types Types definitions for ANT support in SoftDevice handler. diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/app_ram_base.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/app_ram_base.h index fb817cb99d..5722bfd97b 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/app_ram_base.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/app_ram_base.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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. + * */ + // ble_enable param app_ram_base #define APP_RAM_BASE_CENTRAL_LINKS_0_PERIPH_LINKS_0_SEC_COUNT_0_MID_BW 0x20001870 diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/ble_stack_handler_types.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/ble_stack_handler_types.h index f931cffaac..f40e4576e2 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/ble_stack_handler_types.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/ble_stack_handler_types.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup ble_stack_handler_types Types definitions for BLE support in SoftDevice handler. diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.c index 5f9f9aa0ae..5534ae6dae 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2012 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.h index 02932db356..588ce1626a 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2013 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 * * @defgroup softdevice_handler SoftDevice Event Handler diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler_appsh.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler_appsh.c index eacb33d2df..bb4c2f95d4 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler_appsh.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler_appsh.c @@ -1,15 +1,42 @@ -/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. +/* + * 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: + * + * 1. Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "app_scheduler.h" #include diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler_appsh.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler_appsh.h index ec78973987..dcde1c9b96 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler_appsh.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/softdevice/common/softdevice_handler/softdevice_handler_appsh.h @@ -1,15 +1,42 @@ -/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. +/* + * Copyright (c) 2014 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. * - * The information contained herein is property of Nordic Semiconductor ASA. - * Terms and conditions of usage are described in detail in NORDIC - * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * 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. * - * Licensees are granted free, non-transferable use of the information. NO - * WARRANTY of ANY KIND is provided. This heading must NOT be removed from - * the file. + * 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 #define SOFTDEVICE_HANDLER_APPSH_H diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/serial_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/serial_api.c index a0501dbfec..b29189cc40 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/serial_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/serial_api.c @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 #include "mbed_assert.h" #include "mbed_error.h" diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/spi_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/spi_api.c index 72b209e25c..00be918087 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/spi_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/spi_api.c @@ -1,19 +1,42 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "spi_api.h" #if DEVICE_SPI diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c index 463feeaf9e..d95580538a 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c @@ -1,18 +1,41 @@ -/* mbed Microcontroller Library - * Copyright (c) 2013 Nordic Semiconductor +/* + * Copyright (c) 2013 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. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 4. This software, with or without modification, must only be used with a + * Nordic Semiconductor ASA integrated circuit. + * + * 5. Any software provided in binary or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 "us_ticker_api.h" #include "common_rtc.h" #include "app_util.h" From 75ba6b7623308d2e4584b774c125ed63ec62ddd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C5=82=C4=85bek=2C=20Andrzej?= Date: Mon, 4 Jul 2016 09:21:39 +0200 Subject: [PATCH 42/67] Polished tickers implementation - moved interrupt clearing code. --- .../hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c | 3 +-- .../hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c | 24 ++++--------------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c index 0f403bc5f0..ae63c2a1e1 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c @@ -42,8 +42,7 @@ void lp_ticker_disable_interrupt(void) void lp_ticker_clear_interrupt(void) { - // No implementation needed. The event that triggers the interrupt is - // cleared in 'common_rtc_irq_handler'. + nrf_rtc_event_clear(COMMON_RTC_INSTANCE, LP_TICKER_EVENT); } #endif // DEVICE_LOWPOWERTIMER diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c index 7acebd72e5..101c1d3997 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c @@ -34,32 +34,19 @@ void common_rtc_irq_handler(void) void COMMON_RTC_IRQ_HANDLER(void) #endif { - nrf_rtc_event_t event; - uint32_t int_mask; - - event = US_TICKER_EVENT; - int_mask = US_TICKER_INT_MASK; - if (nrf_rtc_event_pending(COMMON_RTC_INSTANCE, event)) { - nrf_rtc_event_clear(COMMON_RTC_INSTANCE, event); - nrf_rtc_event_disable(COMMON_RTC_INSTANCE, int_mask); - + if (nrf_rtc_event_pending(COMMON_RTC_INSTANCE, US_TICKER_EVENT)) { us_ticker_irq_handler(); } #if DEVICE_LOWPOWERTIMER - event = LP_TICKER_EVENT; - int_mask = LP_TICKER_INT_MASK; - if (nrf_rtc_event_pending(COMMON_RTC_INSTANCE, event)) { - nrf_rtc_event_clear(COMMON_RTC_INSTANCE, event); - nrf_rtc_event_disable(COMMON_RTC_INSTANCE, int_mask); + if (nrf_rtc_event_pending(COMMON_RTC_INSTANCE, LP_TICKER_EVENT)) { lp_ticker_irq_handler(); } #endif - event = NRF_RTC_EVENT_OVERFLOW; - if (nrf_rtc_event_pending(COMMON_RTC_INSTANCE, event)) { - nrf_rtc_event_clear(COMMON_RTC_INSTANCE, event); + if (nrf_rtc_event_pending(COMMON_RTC_INSTANCE, NRF_RTC_EVENT_OVERFLOW)) { + nrf_rtc_event_clear(COMMON_RTC_INSTANCE, NRF_RTC_EVENT_OVERFLOW); // Don't disable this event. It shall occur periodically. ++m_common_rtc_overflows; @@ -204,6 +191,5 @@ void us_ticker_disable_interrupt(void) void us_ticker_clear_interrupt(void) { - // No implementation needed. The event that triggers the interrupt is - // cleared in 'common_rtc_irq_handler'. + nrf_rtc_event_clear(COMMON_RTC_INSTANCE, US_TICKER_EVENT); } From a8c27bde693f0a9b59d6d915d3639c62d8f862f7 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Tue, 5 Jul 2016 15:27:57 +0200 Subject: [PATCH 43/67] startup file for nRF52 basing on nRF51 and nordic SDK v11. --- .../TOOLCHAIN_ARM_STD/startup_nrf52832.s | 443 ++++++++++++++++++ .../TOOLCHAIN_ARM_STD/sys.cpp | 31 ++ 2 files changed, 474 insertions(+) create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/startup_nrf52832.s create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/sys.cpp diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/startup_nrf52832.s b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/startup_nrf52832.s new file mode 100644 index 0000000000..dca7388684 --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/startup_nrf52832.s @@ -0,0 +1,443 @@ +;/* Copyright (c) 2012 ARM LIMITED +; +; 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 ARM 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 COPYRIGHT HOLDERS AND 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. +; ---------------------------------------------------------------------------*/ + +__initial_sp EQU 0x20008000 + + PRESERVE8 + THUMB + +; Vector Table Mapped to Address 0 at Reset + + AREA RESET, DATA, READONLY + EXPORT __Vectors + EXPORT __Vectors_End + EXPORT __Vectors_Size + +__Vectors DCD __initial_sp ; Top of Stack + DCD Reset_Handler + DCD NMI_Handler + DCD HardFault_Handler + DCD MemoryManagement_Handler + DCD BusFault_Handler + DCD UsageFault_Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler + DCD DebugMonitor_Handler + DCD 0 ; Reserved + DCD PendSV_Handler + DCD SysTick_Handler + + ; External Interrupts + DCD POWER_CLOCK_IRQHandler + DCD RADIO_IRQHandler + DCD UARTE0_UART0_IRQHandler + DCD SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler + DCD SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler + DCD NFCT_IRQHandler + DCD GPIOTE_IRQHandler + DCD SAADC_IRQHandler + DCD TIMER0_IRQHandler + DCD TIMER1_IRQHandler + DCD TIMER2_IRQHandler + DCD RTC0_IRQHandler + DCD TEMP_IRQHandler + DCD RNG_IRQHandler + DCD ECB_IRQHandler + DCD CCM_AAR_IRQHandler + DCD WDT_IRQHandler + DCD RTC1_IRQHandler + DCD QDEC_IRQHandler + DCD COMP_LPCOMP_IRQHandler + DCD SWI0_EGU0_IRQHandler + DCD SWI1_EGU1_IRQHandler + DCD SWI2_EGU2_IRQHandler + DCD SWI3_EGU3_IRQHandler + DCD SWI4_EGU4_IRQHandler + DCD SWI5_EGU5_IRQHandler + DCD TIMER3_IRQHandler + DCD TIMER4_IRQHandler + DCD PWM0_IRQHandler + DCD PDM_IRQHandler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD MWU_IRQHandler + DCD PWM1_IRQHandler + DCD PWM2_IRQHandler + DCD SPIM2_SPIS2_SPI2_IRQHandler + DCD RTC2_IRQHandler + DCD I2S_IRQHandler + DCD FPU_IRQHandler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + +; Reset Handler + + +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT SystemInit + IMPORT __main + + + LDR R0, =SystemInit + BLX R0 + LDR R0, =__main + BX R0 + ENDP + +; Dummy Exception Handlers (infinite loops which can be modified) + +NMI_Handler PROC + EXPORT NMI_Handler [WEAK] + B . + ENDP +HardFault_Handler\ + PROC + EXPORT HardFault_Handler [WEAK] + B . + ENDP +MemoryManagement_Handler\ + PROC + EXPORT MemoryManagement_Handler [WEAK] + B . + ENDP +BusFault_Handler\ + PROC + EXPORT BusFault_Handler [WEAK] + B . + ENDP +UsageFault_Handler\ + PROC + EXPORT UsageFault_Handler [WEAK] + B . + ENDP +SVC_Handler PROC + EXPORT SVC_Handler [WEAK] + B . + ENDP +DebugMonitor_Handler\ + PROC + EXPORT DebugMonitor_Handler [WEAK] + B . + ENDP +PendSV_Handler PROC + EXPORT PendSV_Handler [WEAK] + B . + ENDP +SysTick_Handler PROC + EXPORT SysTick_Handler [WEAK] + B . + ENDP + +Default_Handler PROC + + EXPORT POWER_CLOCK_IRQHandler [WEAK] + EXPORT RADIO_IRQHandler [WEAK] + EXPORT UARTE0_UART0_IRQHandler [WEAK] + EXPORT SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler [WEAK] + EXPORT SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler [WEAK] + EXPORT NFCT_IRQHandler [WEAK] + EXPORT GPIOTE_IRQHandler [WEAK] + EXPORT SAADC_IRQHandler [WEAK] + EXPORT TIMER0_IRQHandler [WEAK] + EXPORT TIMER1_IRQHandler [WEAK] + EXPORT TIMER2_IRQHandler [WEAK] + EXPORT RTC0_IRQHandler [WEAK] + EXPORT TEMP_IRQHandler [WEAK] + EXPORT RNG_IRQHandler [WEAK] + EXPORT ECB_IRQHandler [WEAK] + EXPORT CCM_AAR_IRQHandler [WEAK] + EXPORT WDT_IRQHandler [WEAK] + EXPORT RTC1_IRQHandler [WEAK] + EXPORT QDEC_IRQHandler [WEAK] + EXPORT COMP_LPCOMP_IRQHandler [WEAK] + EXPORT SWI0_EGU0_IRQHandler [WEAK] + EXPORT SWI1_EGU1_IRQHandler [WEAK] + EXPORT SWI2_EGU2_IRQHandler [WEAK] + EXPORT SWI3_EGU3_IRQHandler [WEAK] + EXPORT SWI4_EGU4_IRQHandler [WEAK] + EXPORT SWI5_EGU5_IRQHandler [WEAK] + EXPORT TIMER3_IRQHandler [WEAK] + EXPORT TIMER4_IRQHandler [WEAK] + EXPORT PWM0_IRQHandler [WEAK] + EXPORT PDM_IRQHandler [WEAK] + EXPORT MWU_IRQHandler [WEAK] + EXPORT PWM1_IRQHandler [WEAK] + EXPORT PWM2_IRQHandler [WEAK] + EXPORT SPIM2_SPIS2_SPI2_IRQHandler [WEAK] + EXPORT RTC2_IRQHandler [WEAK] + EXPORT I2S_IRQHandler [WEAK] + EXPORT FPU_IRQHandler [WEAK] +POWER_CLOCK_IRQHandler +RADIO_IRQHandler +UARTE0_UART0_IRQHandler +SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler +SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler +NFCT_IRQHandler +GPIOTE_IRQHandler +SAADC_IRQHandler +TIMER0_IRQHandler +TIMER1_IRQHandler +TIMER2_IRQHandler +RTC0_IRQHandler +TEMP_IRQHandler +RNG_IRQHandler +ECB_IRQHandler +CCM_AAR_IRQHandler +WDT_IRQHandler +RTC1_IRQHandler +QDEC_IRQHandler +COMP_LPCOMP_IRQHandler +SWI0_EGU0_IRQHandler +SWI1_EGU1_IRQHandler +SWI2_EGU2_IRQHandler +SWI3_EGU3_IRQHandler +SWI4_EGU4_IRQHandler +SWI5_EGU5_IRQHandler +TIMER3_IRQHandler +TIMER4_IRQHandler +PWM0_IRQHandler +PDM_IRQHandler +MWU_IRQHandler +PWM1_IRQHandler +PWM2_IRQHandler +SPIM2_SPIS2_SPI2_IRQHandler +RTC2_IRQHandler +I2S_IRQHandler +FPU_IRQHandler + B . + ENDP + ALIGN + END diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/sys.cpp b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/sys.cpp new file mode 100644 index 0000000000..2f1024ace8 --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/sys.cpp @@ -0,0 +1,31 @@ +/* mbed Microcontroller Library - stackheap + * Copyright (C) 2009-2011 ARM Limited. All rights reserved. + * + * Setup a fixed single stack/heap memory model, + * between the top of the RW/ZI region and the stackpointer + */ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +extern char Image$$RW_IRAM1$$ZI$$Limit[]; + +extern __value_in_regs struct __initial_stackheap __user_setup_stackheap(uint32_t R0, uint32_t R1, uint32_t R2, uint32_t R3) { + uint32_t zi_limit = (uint32_t)Image$$RW_IRAM1$$ZI$$Limit; + uint32_t sp_limit = __current_sp(); + + zi_limit = (zi_limit + 7) & ~0x7; // ensure zi_limit is 8-byte aligned + + struct __initial_stackheap r; + r.heap_base = zi_limit; + r.heap_limit = sp_limit; + return r; +} + +#ifdef __cplusplus +} +#endif From bd8c335c074a3a6e959a1ce347fbb8c0927794f6 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Wed, 6 Jul 2016 09:53:53 +0200 Subject: [PATCH 44/67] add scater files forARM CC and IAR for nRF52 add the startup file for IAR modyfi object.h for strict compiler --- .../TOOLCHAIN_ARM_STD/nRF51822.sct | 24 + .../TOOLCHAIN_IAR/nRF52832.icf | 46 ++ .../TOOLCHAIN_IAR/startup_NRF52832_IAR.s | 578 ++++++++++++++++++ .../hal/TARGET_NORDIC/TARGET_NRF5/objects.h | 5 +- 4 files changed, 650 insertions(+), 3 deletions(-) create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/nRF51822.sct create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_IAR/nRF52832.icf create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_IAR/startup_NRF52832_IAR.s diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/nRF51822.sct b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/nRF51822.sct new file mode 100644 index 0000000000..e93ab78131 --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/nRF51822.sct @@ -0,0 +1,24 @@ +;WITHOUT SOFTDEVICE: +;LR_IROM1 0x00000000 0x00040000 { +; ER_IROM1 0x00000000 0x00040000 { +; *.o (RESET, +First) +; *(InRoot$$Sections) +; .ANY (+RO) +; } +; RW_IRAM1 0x20000000 0x00004000 { +; .ANY (+RW +ZI) +; } +;} +; +;WITH SOFTDEVICE: + +LR_IROM1 0x1C000 0x0064000 { + ER_IROM1 0x1C000 0x0064000 { + *.o (RESET, +First) + *(InRoot$$Sections) + .ANY (+RO) + } + RW_IRAM1 0x20002080 0x0000DF80 { + .ANY (+RW +ZI) + } +} diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_IAR/nRF52832.icf b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_IAR/nRF52832.icf new file mode 100644 index 0000000000..5aa8116de8 --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_IAR/nRF52832.icf @@ -0,0 +1,46 @@ +/*###ICF### Section handled by ICF editor, don't touch! ****/ +/*-Editor annotation file-*/ +/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ +/*-Specials-*/ +define symbol __ICFEDIT_intvec_start__ = 0x1c000; +/*-Memory Regions-*/ +define symbol __ICFEDIT_region_ROM_start__ = 0x1c000; +define symbol __ICFEDIT_region_ROM_end__ = 0x7ffff; +define symbol __ICFEDIT_region_RAM_start__ = 0x20002080; +define symbol __ICFEDIT_region_RAM_end__ = 0x2000ffff; +export symbol __ICFEDIT_region_RAM_start__; +export symbol __ICFEDIT_region_RAM_end__; +/*-Sizes-*/ +/*Heap 1/4 of ram and stack 1/8*/ +define symbol __ICFEDIT_size_cstack__ = 0xc00; +define symbol __ICFEDIT_size_heap__ = 0x1800; +/**** End of ICF editor section. ###ICF###*/ + +define symbol __code_start_soft_device__ = 0x0; + +define memory mem with size = 4G; +define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; +define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; + +define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; +define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +keep { section .intvec }; +place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; +place in ROM_region { readonly }; +place in RAM_region { readwrite, + block CSTACK, + block HEAP }; + +/*This is used for mbed applications build inside the Embedded workbench +Applications build with the python scritps use a hex merge so need to merge it +inside the linker. The linker can only use binary files so the hex merge is not possible +through the linker. That is why a binary is used instead of a hex image for the embedded project. +*/ +if(isdefinedsymbol(SOFT_DEVICE_BIN)) +{ + place at address mem:__code_start_soft_device__ { section .noinit_softdevice }; +} diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_IAR/startup_NRF52832_IAR.s b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_IAR/startup_NRF52832_IAR.s new file mode 100644 index 0000000000..823565d975 --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_IAR/startup_NRF52832_IAR.s @@ -0,0 +1,578 @@ +;/* Copyright (c) 2012 ARM LIMITED +; +; 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 ARM 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 COPYRIGHT HOLDERS AND 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. +; ---------------------------------------------------------------------------*/ + + +; The modules in this file are included in the libraries, and may be replaced +; by any user-defined modules that define the PUBLIC symbol _program_start or +; a user defined start symbol. +; To override the cstartup defined in the library, simply add your modified +; version to the workbench project. +; +; The vector table is normally located at address 0. +; When debugging in RAM, it can be located in RAM, aligned to at least 2^6. +; The name "__vector_table" has special meaning for C-SPY: +; it is where the SP start value is found, and the NVIC vector +; table register (VTOR) is initialized to this address if != 0. + + + + MODULE ?cstartup + + ;; Stack size default : Defined in *.icf (linker file). Can be modified inside EW. + ;; Heap size default : Defined in *.icf (linker file). Can be modified inside EW. + + ;; Forward declaration of sections. + SECTION CSTACK:DATA:NOROOT(3) + + SECTION .intvec:CODE:NOROOT(2) + + EXTERN __iar_program_start + EXTERN SystemInit + PUBLIC __vector_table + PUBLIC __Vectors + PUBLIC __Vectors_End + PUBLIC __Vectors_Size + + DATA + +__vector_table + DCD sfe(CSTACK) + DCD Reset_Handler + DCD NMI_Handler + DCD HardFault_Handler + DCD MemoryManagement_Handler + DCD BusFault_Handler + DCD UsageFault_Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler + DCD DebugMonitor_Handler + DCD 0 ; Reserved + DCD PendSV_Handler + DCD SysTick_Handler + + ; External Interrupts + DCD POWER_CLOCK_IRQHandler + DCD RADIO_IRQHandler + DCD UARTE0_UART0_IRQHandler + DCD SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler + DCD SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler + DCD NFCT_IRQHandler + DCD GPIOTE_IRQHandler + DCD SAADC_IRQHandler + DCD TIMER0_IRQHandler + DCD TIMER1_IRQHandler + DCD TIMER2_IRQHandler + DCD RTC0_IRQHandler + DCD TEMP_IRQHandler + DCD RNG_IRQHandler + DCD ECB_IRQHandler + DCD CCM_AAR_IRQHandler + DCD WDT_IRQHandler + DCD RTC1_IRQHandler + DCD QDEC_IRQHandler + DCD COMP_LPCOMP_IRQHandler + DCD SWI0_EGU0_IRQHandler + DCD SWI1_EGU1_IRQHandler + DCD SWI2_EGU2_IRQHandler + DCD SWI3_EGU3_IRQHandler + DCD SWI4_EGU4_IRQHandler + DCD SWI5_EGU5_IRQHandler + DCD TIMER3_IRQHandler + DCD TIMER4_IRQHandler + DCD PWM0_IRQHandler + DCD PDM_IRQHandler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD MWU_IRQHandler + DCD PWM1_IRQHandler + DCD PWM2_IRQHandler + DCD SPIM2_SPIS2_SPI2_IRQHandler + DCD RTC2_IRQHandler + DCD I2S_IRQHandler + DCD FPU_IRQHandler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + +__Vectors_End +__Vectors EQU __vector_table +__Vectors_Size EQU __Vectors_End - __Vectors + + +; Default handlers. + THUMB + + PUBWEAK Reset_Handler + SECTION .text:CODE:NOROOT(2) +Reset_Handler + + LDR R0, =SystemInit + BLX R0 + LDR R0, =__iar_program_start + BX R0 + + ; Dummy exception handlers + + + PUBWEAK NMI_Handler + SECTION .text:CODE:NOROOT(1) +NMI_Handler + B . + + PUBWEAK HardFault_Handler + SECTION .text:CODE:NOROOT(1) +HardFault_Handler + B . + + PUBWEAK MemoryManagement_Handler + SECTION .text:CODE:NOROOT(1) +MemoryManagement_Handler + B . + + PUBWEAK BusFault_Handler + SECTION .text:CODE:NOROOT(1) +BusFault_Handler + B . + + PUBWEAK UsageFault_Handler + SECTION .text:CODE:NOROOT(1) +UsageFault_Handler + B . + + PUBWEAK SVC_Handler + SECTION .text:CODE:NOROOT(1) +SVC_Handler + B . + + PUBWEAK DebugMonitor_Handler + SECTION .text:CODE:NOROOT(1) +DebugMonitor_Handler + B . + + PUBWEAK PendSV_Handler + SECTION .text:CODE:NOROOT(1) +PendSV_Handler + B . + + PUBWEAK SysTick_Handler + SECTION .text:CODE:NOROOT(1) +SysTick_Handler + B . + + + ; Dummy interrupt handlers + + PUBWEAK POWER_CLOCK_IRQHandler + SECTION .text:CODE:NOROOT(1) +POWER_CLOCK_IRQHandler + B . + + PUBWEAK RADIO_IRQHandler + SECTION .text:CODE:NOROOT(1) +RADIO_IRQHandler + B . + + PUBWEAK UARTE0_UART0_IRQHandler + SECTION .text:CODE:NOROOT(1) +UARTE0_UART0_IRQHandler + B . + + PUBWEAK SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler + SECTION .text:CODE:NOROOT(1) +SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler + B . + + PUBWEAK SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler + SECTION .text:CODE:NOROOT(1) +SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler + B . + + PUBWEAK NFCT_IRQHandler + SECTION .text:CODE:NOROOT(1) +NFCT_IRQHandler + B . + + PUBWEAK GPIOTE_IRQHandler + SECTION .text:CODE:NOROOT(1) +GPIOTE_IRQHandler + B . + + PUBWEAK SAADC_IRQHandler + SECTION .text:CODE:NOROOT(1) +SAADC_IRQHandler + B . + + PUBWEAK TIMER0_IRQHandler + SECTION .text:CODE:NOROOT(1) +TIMER0_IRQHandler + B . + + PUBWEAK TIMER1_IRQHandler + SECTION .text:CODE:NOROOT(1) +TIMER1_IRQHandler + B . + + PUBWEAK TIMER2_IRQHandler + SECTION .text:CODE:NOROOT(1) +TIMER2_IRQHandler + B . + + PUBWEAK RTC0_IRQHandler + SECTION .text:CODE:NOROOT(1) +RTC0_IRQHandler + B . + + PUBWEAK TEMP_IRQHandler + SECTION .text:CODE:NOROOT(1) +TEMP_IRQHandler + B . + + PUBWEAK RNG_IRQHandler + SECTION .text:CODE:NOROOT(1) +RNG_IRQHandler + B . + + PUBWEAK ECB_IRQHandler + SECTION .text:CODE:NOROOT(1) +ECB_IRQHandler + B . + + PUBWEAK CCM_AAR_IRQHandler + SECTION .text:CODE:NOROOT(1) +CCM_AAR_IRQHandler + B . + + PUBWEAK WDT_IRQHandler + SECTION .text:CODE:NOROOT(1) +WDT_IRQHandler + B . + + PUBWEAK RTC1_IRQHandler + SECTION .text:CODE:NOROOT(1) +RTC1_IRQHandler + B . + + PUBWEAK QDEC_IRQHandler + SECTION .text:CODE:NOROOT(1) +QDEC_IRQHandler + B . + + PUBWEAK COMP_LPCOMP_IRQHandler + SECTION .text:CODE:NOROOT(1) +COMP_LPCOMP_IRQHandler + B . + + PUBWEAK SWI0_EGU0_IRQHandler + SECTION .text:CODE:NOROOT(1) +SWI0_EGU0_IRQHandler + B . + + PUBWEAK SWI1_EGU1_IRQHandler + SECTION .text:CODE:NOROOT(1) +SWI1_EGU1_IRQHandler + B . + + PUBWEAK SWI2_EGU2_IRQHandler + SECTION .text:CODE:NOROOT(1) +SWI2_EGU2_IRQHandler + B . + + PUBWEAK SWI3_EGU3_IRQHandler + SECTION .text:CODE:NOROOT(1) +SWI3_EGU3_IRQHandler + B . + + PUBWEAK SWI4_EGU4_IRQHandler + SECTION .text:CODE:NOROOT(1) +SWI4_EGU4_IRQHandler + B . + + PUBWEAK SWI5_EGU5_IRQHandler + SECTION .text:CODE:NOROOT(1) +SWI5_EGU5_IRQHandler + B . + + PUBWEAK TIMER3_IRQHandler + SECTION .text:CODE:NOROOT(1) +TIMER3_IRQHandler + B . + + PUBWEAK TIMER4_IRQHandler + SECTION .text:CODE:NOROOT(1) +TIMER4_IRQHandler + B . + + PUBWEAK PWM0_IRQHandler + SECTION .text:CODE:NOROOT(1) +PWM0_IRQHandler + B . + + PUBWEAK PDM_IRQHandler + SECTION .text:CODE:NOROOT(1) +PDM_IRQHandler + B . + + PUBWEAK MWU_IRQHandler + SECTION .text:CODE:NOROOT(1) +MWU_IRQHandler + B . + + PUBWEAK PWM1_IRQHandler + SECTION .text:CODE:NOROOT(1) +PWM1_IRQHandler + B . + + PUBWEAK PWM2_IRQHandler + SECTION .text:CODE:NOROOT(1) +PWM2_IRQHandler + B . + + PUBWEAK SPIM2_SPIS2_SPI2_IRQHandler + SECTION .text:CODE:NOROOT(1) +SPIM2_SPIS2_SPI2_IRQHandler + B . + + PUBWEAK RTC2_IRQHandler + SECTION .text:CODE:NOROOT(1) +RTC2_IRQHandler + B . + + PUBWEAK I2S_IRQHandler + SECTION .text:CODE:NOROOT(1) +I2S_IRQHandler + B . + + PUBWEAK FPU_IRQHandler + SECTION .text:CODE:NOROOT(1) +FPU_IRQHandler + B . + + + END + + diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/objects.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/objects.h index 5f7d4bf266..209134b7d1 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/objects.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/objects.h @@ -49,7 +49,8 @@ extern "C" { #endif struct serial_s { -}; + uint32_t placeholder; // struct is unused by nRF5x API implementation +}; // but it must be not empty (required by strict compiler - IAR) struct spi_s { uint8_t spi_idx; @@ -83,8 +84,6 @@ struct gpio_irq_s { uint32_t ch; }; -struct sleep_s { -}; #include "gpio_object.h" From 17c72504ca534d4b88b10f6d50f9b025f6f09129 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Thu, 7 Jul 2016 12:16:11 +0200 Subject: [PATCH 45/67] os_tick for iar --- .../TARGET_MCU_NRF51822/analogin_api.c | 9 +++++- .../hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c | 31 ++++++++++++++++++- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c index 11a40c22db..0d7ed9f410 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c @@ -60,7 +60,14 @@ uint16_t analogin_read_u16(analogin_t *obj) { nrf_adc_value_t adc_value; - nrf_drv_adc_channel_t adc_channel = NRF_DRV_ADC_DEFAULT_CHANNEL(obj->adc_pin); + nrf_drv_adc_channel_t adc_channel; + + + adc_channel.config.config.resolution = NRF_ADC_CONFIG_RES_10BIT; + adc_channel.config.config.input = NRF_ADC_CONFIG_SCALING_INPUT_FULL_SCALE; + adc_channel.config.config.reference = NRF_ADC_CONFIG_REF_VBG; + adc_channel.config.config.ain = (obj->adc_pin); + adc_channel.p_next = NULL; ret_code_t ret_code; diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c index 6a306b3031..9ba0e7be4a 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c @@ -142,6 +142,35 @@ __attribute__((naked)) void COMMON_RTC_IRQ_HANDLER(void) ); } +#elif defined (__ICCARM__)//IAR +void common_rtc_irq_handler(void); + +__stackless __task void COMMON_RTC_IRQ_HANDLER(void) +{ + uint32_t temp; + + __asm volatile( + " ldr %[temp], [%[reg2check]] \n" + " cmp %[temp], #0 \n" + " beq 1f \n" + " bl.w OS_Tick_Handler \n" + "1: \n" + " push {r3, lr}\n" + " blx %[rtc_irq] \n" + " pop {r3, pc}\n" + + : /* Outputs */ + [temp] "=&r"(temp) + : /* Inputs */ + [reg2check] "r"(0x40011144), + [rtc_irq] "r"(common_rtc_irq_handler) + : /* Clobbers */ + "cc" + ); + (void)temp; +} + + #else #error Compiler not supported. @@ -345,7 +374,7 @@ uint32_t os_tick_val(void) { return clock_cycles_by_tick - ((current_counter - next_tick_cc_value) % clock_cycles_by_tick); } - return 0; + //return 0; } #endif // defined(TARGET_MCU_NRF51822) From 07ce12fcc5018c689eeee0b672fc9ef80b685439 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Fri, 1 Jul 2016 13:44:08 +0200 Subject: [PATCH 46/67] nrf52 PwmOut in progress. --- hal/targets.json | 2 +- .../TARGET_MCU_NRF52832/pwmout_api.c | 206 +++++- .../sdk/driver_nrf/pwm/nrf_drv_pwm.c | 350 +++++++++ .../sdk/driver_nrf/pwm/nrf_drv_pwm.h | 426 +++++++++++ .../TARGET_MCU_NRF52832/sdk/nrf_drv_config.h | 4 +- .../TARGET_NRF5/sdk/drivers_nrf/hal/nrf_pwm.h | 665 ++++++++++++++++++ 6 files changed, 1647 insertions(+), 6 deletions(-) create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/pwm/nrf_drv_pwm.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/pwm/nrf_drv_pwm.h create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_pwm.h diff --git a/hal/targets.json b/hal/targets.json index 374370dcb2..d9aaa50c6f 100644 --- a/hal/targets.json +++ b/hal/targets.json @@ -1773,6 +1773,6 @@ "NRF52_PAN_62", "NRF52_PAN_63" ], - "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE"] + "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE"] } } diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c index c58d13a4d9..76657a9876 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c @@ -44,49 +44,249 @@ #if DEVICE_PWMOUT -// TODO - provide an implementation. +#include "app_util_platform.h" +#include "nrf_drv_pwm.h" -//#include "nrf_pwm.h" +#define PWM_INSTANCE_COUNT 3 +static nrf_drv_pwm_t m_pwm_driver[PWM_INSTANCE_COUNT] = + { + NRF_DRV_PWM_INSTANCE(0), + NRF_DRV_PWM_INSTANCE(1), + NRF_DRV_PWM_INSTANCE(2) + }; + +typedef struct +{ + uint32_t period_us; + uint32_t duty_us; +} pwm_signal_t; + +typedef struct +{ + nrf_drv_pwm_t * p_pwm_driver; + pwm_signal_t signal; +} pwm_t; + +static pwm_t m_pwm[PWM_INSTANCE_COUNT] = +{ + {.p_pwm_driver = NULL}, + {.p_pwm_driver = NULL}, + {.p_pwm_driver = NULL} +}; + +typedef struct +{ + uint16_t period; + uint16_t duty; + nrf_pwm_clk_t pwm_clk; +} pulsewidth_set_t; + + +static void internal_pwmout_exe(pwmout_t *obj); + void pwmout_init(pwmout_t *obj, PinName pin) { + uint32_t i; + + for (i = 0; PWM_INSTANCE_COUNT; i++) + { + if (m_pwm[i].p_pwm_driver == NULL) // a driver instance not assigned to the obj? + { + obj->pin = pin; + /// @todo obj->pwm_name = + obj->pwm_channel = i; + + m_pwm[i].p_pwm_driver = &m_pwm_driver[i]; + m_pwm[i].signal.period_us = 200000; // 0.02 s + m_pwm[i].signal.duty_us = 100000; + + obj->pwm_struct = &m_pwm[i]; + + internal_pwmout_exe(obj); + break; + } + } + + MBED_ASSERT(i != PWM_INSTANCE_COUNT); // assert if free instance was not found. } void pwmout_free(pwmout_t *obj) { + nrf_drv_pwm_uninit( (nrf_drv_pwm_t*) obj->pwm_struct ); + + m_pwm[obj->pwm_channel].p_pwm_driver = NULL; + /// @todo release gpio } void pwmout_write(pwmout_t *obj, float percent) { + + if (percent < 0) + { + percent = 0; + } + else if (percent > 100) + { + percent = 100; + } + + pwm_signal_t * p_pwm_signal = &(((pwm_t*)obj->pwm_struct)->signal); + + int us = (((int)p_pwm_signal->period_us) * percent) / 100; + + pwmout_pulsewidth_us(obj, us); } float pwmout_read(pwmout_t *obj) { - return 0.0f; + pwm_signal_t * p_pwm_signal = &(((pwm_t*)obj->pwm_struct)->signal); + + return (float)p_pwm_signal->duty_us / (float)p_pwm_signal->period_us * 100; } void pwmout_period(pwmout_t *obj, float seconds) { + // @todo saturation + int us = seconds * 1000000; + + pwmout_period_us(obj, us); } void pwmout_period_ms(pwmout_t *obj, int ms) { + int us = ms * 1000; + + pwmout_period_us(obj, us); } void pwmout_period_us(pwmout_t *obj, int us) { + pwm_signal_t * p_pwm_signal = &(((pwm_t*)obj->pwm_struct)->signal); + + p_pwm_signal->period_us = us; + + internal_pwmout_exe(obj); } void pwmout_pulsewidth(pwmout_t *obj, float seconds) { + // @todo saturation + int us = seconds * 1000000; + + pwmout_pulsewidth_us(obj,us); } void pwmout_pulsewidth_ms(pwmout_t *obj, int ms) { + // @todo saturation + int us = ms * 1000; + + pwmout_pulsewidth_us(obj,us); } void pwmout_pulsewidth_us(pwmout_t *obj, int us) { + // @todo saturation + pwm_signal_t * p_pwm_signal = &(((pwm_t*)obj->pwm_struct)->signal); + + p_pwm_signal->duty_us = us; + + internal_pwmout_exe(obj); +} + + + + + + +static ret_code_t pulsewidth_us_set_get(int period_us, int duty_us, pulsewidth_set_t * const p_settings) +{ + uint16_t div; + nrf_pwm_clk_t pwm_clk = NRF_PWM_CLK_16MHz; + + for(div = 1; div <= 128 ; div <<= 1) + { + if (0xFFFF >= period_us) + { + p_settings->period = period_us; // unit [us * div] + p_settings->duty = duty_us; // unit [us * div] + p_settings->pwm_clk = pwm_clk; + + return NRF_SUCCESS; + } + + period_us >>= 1; + duty_us >>= 1; + pwm_clk++; + } + + return NRF_ERROR_INVALID_PARAM; +} + + static nrf_pwm_values_common_t seq_values[1]; + + static nrf_pwm_sequence_t const seq = + { + .values.p_common = seq_values, + .length = NRF_PWM_VALUES_LENGTH(seq_values), + .repeats = 0, + .end_delay = 0 + }; + +static void internal_pwmout_exe(pwmout_t *obj) +{ + pulsewidth_set_t pulsewidth_set; + pwm_signal_t * p_pwm_signal; + nrf_drv_pwm_t *p_pwm_driver; + ret_code_t ret_code; + + p_pwm_signal = &(((pwm_t*)obj->pwm_struct)->signal); + + if (NRF_SUCCESS == pulsewidth_us_set_get(p_pwm_signal->period_us, + p_pwm_signal->duty_us, + &pulsewidth_set)) + { + //@todo apply pulsewidth_set + p_pwm_driver = (((pwm_t*)obj->pwm_struct)->p_pwm_driver); + + nrf_drv_pwm_config_t config0 = + { + .output_pins = + { + obj->pin, // channel 0 + NRF_DRV_PWM_PIN_NOT_USED, // channel 1 + NRF_DRV_PWM_PIN_NOT_USED, // channel 2 + NRF_DRV_PWM_PIN_NOT_USED, // channel 3 + }, + .irq_priority = APP_IRQ_PRIORITY_LOW, + .base_clock = pulsewidth_set.pwm_clk, + .count_mode = NRF_PWM_MODE_UP, + .top_value = pulsewidth_set.period, + .load_mode = NRF_PWM_LOAD_COMMON, + .step_mode = NRF_PWM_STEP_AUTO + }; + + + //printf("clock = %d, top = %d\r\n", pulsewidth_set.pwm_clk, pulsewidth_set.period); + + nrf_drv_pwm_uninit(p_pwm_driver); + + ret_code = nrf_drv_pwm_init( p_pwm_driver, &config0, NULL); + + MBED_ASSERT(ret_code == NRF_SUCCESS); // assert if free instance was not found. + + seq_values[0] = pulsewidth_set.duty; + + nrf_drv_pwm_simple_playback(p_pwm_driver, &seq, 3, NRF_DRV_PWM_FLAG_LOOP); + + + } + else + { + MBED_ASSERT(0); // force assertion + } + } #endif // DEVICE_PWMOUT diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/pwm/nrf_drv_pwm.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/pwm/nrf_drv_pwm.c new file mode 100644 index 0000000000..df4ec49659 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/pwm/nrf_drv_pwm.c @@ -0,0 +1,350 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +#include +#include "nrf_drv_pwm.h" +#include "nrf_drv_common.h" +#include "nrf_gpio.h" +#include "app_util_platform.h" + +#if (PWM_COUNT == 0) + #error "No PWM instances enabled in the driver configuration file." +#endif + + +// Control block - driver instance local data. +typedef struct +{ + nrf_drv_pwm_handler_t handler; + nrf_drv_state_t volatile state; +} pwm_control_block_t; +static pwm_control_block_t m_cb[PWM_COUNT]; + +static nrf_drv_pwm_config_t const m_default_config[PWM_COUNT] = { +#if PWM0_ENABLED + NRF_DRV_PWM_DEFAULT_CONFIG(0), +#endif +#if PWM1_ENABLED + NRF_DRV_PWM_DEFAULT_CONFIG(1), +#endif +#if PWM2_ENABLED + NRF_DRV_PWM_DEFAULT_CONFIG(2), +#endif +}; + + +static void configure_pins(nrf_drv_pwm_t const * const p_instance, + nrf_drv_pwm_config_t const * p_config) +{ + uint32_t out_pins[NRF_PWM_CHANNEL_COUNT]; + uint8_t i; + + for (i = 0; i < NRF_PWM_CHANNEL_COUNT; ++i) + { + uint8_t output_pin = p_config->output_pins[i]; + if (output_pin != NRF_DRV_PWM_PIN_NOT_USED) + { + bool inverted = output_pin & NRF_DRV_PWM_PIN_INVERTED; + out_pins[i] = output_pin & ~NRF_DRV_PWM_PIN_INVERTED; + + if (inverted) + { + nrf_gpio_pin_set(out_pins[i]); + } + else + { + nrf_gpio_pin_clear(out_pins[i]); + } + + nrf_gpio_cfg_output(out_pins[i]); + } + else + { + out_pins[i] = NRF_PWM_PIN_NOT_CONNECTED; + } + } + + nrf_pwm_pins_set(p_instance->p_registers, out_pins); +} + + +ret_code_t nrf_drv_pwm_init(nrf_drv_pwm_t const * const p_instance, + nrf_drv_pwm_config_t const * p_config, + nrf_drv_pwm_handler_t handler) +{ + pwm_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; + + if (p_cb->state != NRF_DRV_STATE_UNINITIALIZED) + { + return NRF_ERROR_INVALID_STATE; + } + + if (p_config == NULL) + { + p_config = &m_default_config[p_instance->drv_inst_idx]; + } + + p_cb->handler = handler; + + configure_pins(p_instance, p_config); + + nrf_pwm_enable(p_instance->p_registers); + nrf_pwm_configure(p_instance->p_registers, + p_config->base_clock, p_config->count_mode, p_config->top_value); + nrf_pwm_decoder_set(p_instance->p_registers, + p_config->load_mode, p_config->step_mode); + + nrf_pwm_shorts_set(p_instance->p_registers, 0); + nrf_pwm_int_set(p_instance->p_registers, 0); + nrf_pwm_event_clear(p_instance->p_registers, NRF_PWM_EVENT_LOOPSDONE); + nrf_pwm_event_clear(p_instance->p_registers, NRF_PWM_EVENT_SEQEND0); + nrf_pwm_event_clear(p_instance->p_registers, NRF_PWM_EVENT_SEQEND1); + nrf_pwm_event_clear(p_instance->p_registers, NRF_PWM_EVENT_STOPPED); + + if (p_cb->handler) + { + nrf_drv_common_irq_enable(nrf_drv_get_IRQn(p_instance->p_registers), + p_config->irq_priority); + } + + p_cb->state = NRF_DRV_STATE_INITIALIZED; + + return NRF_SUCCESS; +} + + +void nrf_drv_pwm_uninit(nrf_drv_pwm_t const * const p_instance) +{ + pwm_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; + ASSERT(p_cb->state != NRF_DRV_STATE_UNINITIALIZED); + + nrf_drv_common_irq_disable(nrf_drv_get_IRQn(p_instance->p_registers)); + + nrf_pwm_disable(p_instance->p_registers); + + p_cb->state = NRF_DRV_STATE_UNINITIALIZED; +} + + +static void start_playback(nrf_drv_pwm_t const * const p_instance, + pwm_control_block_t * p_cb, + uint8_t flags, + nrf_pwm_task_t starting_task) +{ + p_cb->state = NRF_DRV_STATE_POWERED_ON; + + if (p_cb->handler) + { + // The notification about finished playback is by default enabled, but + // this can be suppressed. The notification that the peripheral has been + // stopped is always enable. + uint32_t int_mask = NRF_PWM_INT_LOOPSDONE_MASK | + NRF_PWM_INT_STOPPED_MASK; + + if (flags & NRF_DRV_PWM_FLAG_SIGNAL_END_SEQ0) + { + int_mask |= NRF_PWM_INT_SEQEND0_MASK; + } + if (flags & NRF_DRV_PWM_FLAG_SIGNAL_END_SEQ1) + { + int_mask |= NRF_PWM_INT_SEQEND1_MASK; + } + if (flags & NRF_DRV_PWM_FLAG_NO_EVT_FINISHED) + { + int_mask &= ~NRF_PWM_INT_LOOPSDONE_MASK; + } + + nrf_pwm_int_set(p_instance->p_registers, int_mask); + } + + nrf_pwm_event_clear(p_instance->p_registers, NRF_PWM_EVENT_STOPPED); + + nrf_pwm_task_trigger(p_instance->p_registers, starting_task); +} + + +void nrf_drv_pwm_simple_playback(nrf_drv_pwm_t const * const p_instance, + nrf_pwm_sequence_t const * p_sequence, + uint16_t playback_count, + uint32_t flags) +{ + pwm_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; + ASSERT(p_cb->state != NRF_DRV_STATE_UNINITIALIZED); + ASSERT(playback_count > 0); + ASSERT(nrf_drv_is_in_RAM(p_sequence->values.p_raw)); + + // To take advantage of the looping mechanism, we need to use both sequences + // (single sequence can be played back only once). + nrf_pwm_sequence_set(p_instance->p_registers, 0, p_sequence); + nrf_pwm_sequence_set(p_instance->p_registers, 1, p_sequence); + bool odd = (playback_count & 1); + nrf_pwm_loop_set(p_instance->p_registers, playback_count/2 + (odd ? 1 : 0)); + + uint32_t shorts_mask; + if (flags & NRF_DRV_PWM_FLAG_STOP) + { + shorts_mask = NRF_PWM_SHORT_LOOPSDONE_STOP_MASK; + } + else if (flags & NRF_DRV_PWM_FLAG_LOOP) + { + shorts_mask = odd ? NRF_PWM_SHORT_LOOPSDONE_SEQSTART1_MASK + : NRF_PWM_SHORT_LOOPSDONE_SEQSTART0_MASK; + } + else + { + shorts_mask = 0; + } + nrf_pwm_shorts_set(p_instance->p_registers, shorts_mask); + + start_playback(p_instance, p_cb, flags, odd ? NRF_PWM_TASK_SEQSTART1 + : NRF_PWM_TASK_SEQSTART0); +} + + +void nrf_drv_pwm_complex_playback(nrf_drv_pwm_t const * const p_instance, + nrf_pwm_sequence_t const * p_sequence_0, + nrf_pwm_sequence_t const * p_sequence_1, + uint16_t playback_count, + uint32_t flags) +{ + pwm_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; + ASSERT(p_cb->state != NRF_DRV_STATE_UNINITIALIZED); + ASSERT(playback_count > 0); + ASSERT(nrf_drv_is_in_RAM(p_sequence_0->values.p_raw)); + ASSERT(nrf_drv_is_in_RAM(p_sequence_1->values.p_raw)); + + nrf_pwm_sequence_set(p_instance->p_registers, 0, p_sequence_0); + nrf_pwm_sequence_set(p_instance->p_registers, 1, p_sequence_1); + nrf_pwm_loop_set(p_instance->p_registers, playback_count); + + uint32_t shorts_mask; + if (flags & NRF_DRV_PWM_FLAG_STOP) + { + shorts_mask = NRF_PWM_SHORT_LOOPSDONE_STOP_MASK; + } + else if (flags & NRF_DRV_PWM_FLAG_LOOP) + { + shorts_mask = NRF_PWM_SHORT_LOOPSDONE_SEQSTART0_MASK; + } + else + { + shorts_mask = 0; + } + nrf_pwm_shorts_set(p_instance->p_registers, shorts_mask); + + start_playback(p_instance, p_cb, flags, NRF_PWM_TASK_SEQSTART0); +} + + +bool nrf_drv_pwm_stop(nrf_drv_pwm_t const * const p_instance, + bool wait_until_stopped) +{ + ASSERT(m_cb[p_instance->drv_inst_idx].state != NRF_DRV_STATE_UNINITIALIZED); + + if (nrf_drv_pwm_is_stopped(p_instance)) + { + return true; + } + + nrf_pwm_task_trigger(p_instance->p_registers, NRF_PWM_TASK_STOP); + + do { + if (nrf_drv_pwm_is_stopped(p_instance)) + { + return true; + } + } while (wait_until_stopped); + + return false; +} + + +bool nrf_drv_pwm_is_stopped(nrf_drv_pwm_t const * const p_instance) +{ + pwm_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; + ASSERT(p_cb->state != NRF_DRV_STATE_UNINITIALIZED); + + // If the event handler is used (interrupts are enabled), the state will + // be changed in interrupt handler when the STOPPED event occurs. + if (p_cb->state != NRF_DRV_STATE_POWERED_ON) + { + return true; + } + // If interrupts are disabled, we must check the STOPPED event here. + if (nrf_pwm_event_check(p_instance->p_registers, NRF_PWM_EVENT_STOPPED)) + { + p_cb->state = NRF_DRV_STATE_INITIALIZED; + return true; + } + + return false; +} + + +static void irq_handler(NRF_PWM_Type * p_pwm, pwm_control_block_t * p_cb) +{ + ASSERT(p_cb->handler); + + // The SEQEND0 and SEQEND1 events are only handled when the user asked for + // it (by setting proper flags when starting the playback). + if (nrf_pwm_int_enable_check(p_pwm, NRF_PWM_INT_SEQEND0_MASK) && + nrf_pwm_event_check(p_pwm, NRF_PWM_EVENT_SEQEND0)) + { + nrf_pwm_event_clear(p_pwm, NRF_PWM_EVENT_SEQEND0); + p_cb->handler(NRF_DRV_PWM_EVT_END_SEQ0); + } + if (nrf_pwm_int_enable_check(p_pwm, NRF_PWM_INT_SEQEND1_MASK) && + nrf_pwm_event_check(p_pwm, NRF_PWM_EVENT_SEQEND1)) + { + nrf_pwm_event_clear(p_pwm, NRF_PWM_EVENT_SEQEND1); + p_cb->handler(NRF_DRV_PWM_EVT_END_SEQ1); + } + + // The LOOPSDONE event is handled by default, but this can be disabled. + if (nrf_pwm_int_enable_check(p_pwm, NRF_PWM_INT_LOOPSDONE_MASK) && + nrf_pwm_event_check(p_pwm, NRF_PWM_EVENT_LOOPSDONE)) + { + nrf_pwm_event_clear(p_pwm, NRF_PWM_EVENT_LOOPSDONE); + p_cb->handler(NRF_DRV_PWM_EVT_FINISHED); + } + + if (nrf_pwm_event_check(p_pwm, NRF_PWM_EVENT_STOPPED)) + { + nrf_pwm_event_clear(p_pwm, NRF_PWM_EVENT_STOPPED); + + p_cb->state = NRF_DRV_STATE_INITIALIZED; + + p_cb->handler(NRF_DRV_PWM_EVT_STOPPED); + } +} + + +#if PWM0_ENABLED +void PWM0_IRQHandler(void) +{ + irq_handler(NRF_PWM0, &m_cb[PWM0_INSTANCE_INDEX]); +} +#endif + +#if PWM1_ENABLED +void PWM1_IRQHandler(void) +{ + irq_handler(NRF_PWM1, &m_cb[PWM1_INSTANCE_INDEX]); +} +#endif + +#if PWM2_ENABLED +void PWM2_IRQHandler(void) +{ + irq_handler(NRF_PWM2, &m_cb[PWM2_INSTANCE_INDEX]); +} +#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/pwm/nrf_drv_pwm.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/pwm/nrf_drv_pwm.h new file mode 100644 index 0000000000..f8b1c1bc97 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/driver_nrf/pwm/nrf_drv_pwm.h @@ -0,0 +1,426 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/**@file + * @addtogroup nrf_pwm PWM HAL and driver + * @ingroup nrf_drivers + * @brief @tagAPI52 Pulse Width Modulation (PWM) module APIs. + * + * @defgroup nrf_drv_pwm PWM driver + * @{ + * @ingroup nrf_pwm + * @brief @tagAPI52 Pulse Width Modulation (PWM) module driver. + */ + + +#ifndef NRF_DRV_PWM_H__ +#define NRF_DRV_PWM_H__ + +#include "nordic_common.h" +#include "nrf_drv_config.h" +#include "nrf_pwm.h" +#include "sdk_errors.h" + + +/** + * @brief PWM driver instance data structure. + */ +typedef struct +{ + NRF_PWM_Type * p_registers; ///< Pointer to the structure with PWM peripheral instance registers. + uint8_t drv_inst_idx; ///< Driver instance index. +} nrf_drv_pwm_t; + +/** + * @brief Macro for creating a PWM driver instance. + */ +#define NRF_DRV_PWM_INSTANCE(id) \ +{ \ + .p_registers = CONCAT_2(NRF_PWM, id), \ + .drv_inst_idx = CONCAT_3(PWM, id, _INSTANCE_INDEX), \ +} + + +/** + * @brief This value can be provided instead of a pin number for any channel + * to specify that its output is not used and therefore does not need + * to be connected to a pin. + */ +#define NRF_DRV_PWM_PIN_NOT_USED 0xFF + +/** + * @brief This value can be added to a pin number to inverse its polarity + * (set idle state = 1). + */ +#define NRF_DRV_PWM_PIN_INVERTED 0x80 + +/** + * @brief PWM driver configuration structure. + */ +typedef struct +{ + uint8_t output_pins[NRF_PWM_CHANNEL_COUNT]; ///< Pin numbers for individual output channels (optional). + /**< Use @ref NRF_DRV_PWM_PIN_NOT_USED + * if a given output channel is not needed. */ + uint8_t irq_priority; ///< Interrupt priority. + nrf_pwm_clk_t base_clock; ///< Base clock frequency. + nrf_pwm_mode_t count_mode; ///< Operating mode of the pulse generator counter. + uint16_t top_value; ///< Value up to which the pulse generator counter counts. + nrf_pwm_dec_load_t load_mode; ///< Mode of loading sequence data from RAM. + nrf_pwm_dec_step_t step_mode; ///< Mode of advancing the active sequence. +} nrf_drv_pwm_config_t; + +/** + * @brief PWM driver default configuration. + */ +#define NRF_DRV_PWM_DEFAULT_CONFIG(id) \ +{ \ + .output_pins = { CONCAT_3(PWM, id, _CONFIG_OUT0_PIN), \ + CONCAT_3(PWM, id, _CONFIG_OUT1_PIN), \ + CONCAT_3(PWM, id, _CONFIG_OUT2_PIN), \ + CONCAT_3(PWM, id, _CONFIG_OUT3_PIN) }, \ + .irq_priority = CONCAT_3(PWM, id, _CONFIG_IRQ_PRIORITY), \ + .base_clock = CONCAT_3(PWM, id, _CONFIG_BASE_CLOCK), \ + .count_mode = CONCAT_3(PWM, id, _CONFIG_COUNT_MODE), \ + .top_value = CONCAT_3(PWM, id, _CONFIG_TOP_VALUE), \ + .load_mode = CONCAT_3(PWM, id, _CONFIG_LOAD_MODE), \ + .step_mode = CONCAT_3(PWM, id, _CONFIG_STEP_MODE), \ +} + + +/** + * @brief PWM flags providing additional playback options. + */ +typedef enum +{ + NRF_DRV_PWM_FLAG_STOP = 0x01, /**< When the requested playback is finished, + the peripheral should be stopped. + @note The STOP task is triggered when + the last value of the final sequence is + loaded from RAM, and the peripheral stops + at the end of the current PWM period. + For sequences with configured repeating + of duty cycle values, this might result in + less than the requested number of repeats + of the last value. */ + NRF_DRV_PWM_FLAG_LOOP = 0x02, /**< When the requested playback is finished, + it should be started from the beginning. + This flag is ignored if used together + with @ref NRF_DRV_PWM_FLAG_STOP. */ + NRF_DRV_PWM_FLAG_SIGNAL_END_SEQ0 = 0x04, /**< The event handler should be + called when the last value + from sequence 0 is loaded. */ + NRF_DRV_PWM_FLAG_SIGNAL_END_SEQ1 = 0x08, /**< The event handler should be + called when the last value + from sequence 1 is loaded. */ + NRF_DRV_PWM_FLAG_NO_EVT_FINISHED = 0x10, /**< The playback finished event + (enabled by default) should be + suppressed. */ +} nrf_drv_pwm_flag_t; + + +/** + * @brief PWM driver event type. + */ +typedef enum +{ + NRF_DRV_PWM_EVT_FINISHED, ///< Sequence playback finished. + NRF_DRV_PWM_EVT_END_SEQ0, /**< End of sequence 0 reached. Its data can be + safely modified now. */ + NRF_DRV_PWM_EVT_END_SEQ1, /**< End of sequence 1 reached. Its data can be + safely modified now. */ + NRF_DRV_PWM_EVT_STOPPED, ///< The PWM peripheral has been stopped. +} nrf_drv_pwm_evt_type_t; + +/** + * @brief PWM driver event handler type. + */ +typedef void (* nrf_drv_pwm_handler_t)(nrf_drv_pwm_evt_type_t event_type); + + +/** + * @brief Function for initializing the PWM driver. + * + * @param[in] p_instance Pointer to the driver instance structure. + * @param[in] p_config Pointer to the structure with initial configuration. + * If NULL, the default configuration is used. + * @param[in] handler Event handler provided by the user. If NULL is passed + * instead, event notifications are not done and PWM + * interrupts are disabled. + * + * @retval NRF_SUCCESS If initialization was successful. + * @retval NRF_ERROR_INVALID_STATE If the driver was already initialized. + */ +ret_code_t nrf_drv_pwm_init(nrf_drv_pwm_t const * const p_instance, + nrf_drv_pwm_config_t const * p_config, + nrf_drv_pwm_handler_t handler); + +/** + * @brief Function for uninitializing the PWM driver. + * + * If any sequence playback is in progress, it is stopped immediately. + * + * @param[in] p_instance Pointer to the driver instance structure. + */ +void nrf_drv_pwm_uninit(nrf_drv_pwm_t const * const p_instance); + +/** + * @brief Function for starting a single sequence playback. + * + * To take advantage of the looping mechanism in the PWM peripheral, both + * sequences must be used (single sequence can be played back only once by + * the peripheral). Therefore, the provided sequence is internally set and + * played back as both sequence 0 and sequence 1. Consequently, if end of + * sequence notifications are required, events for both sequences should be + * used (that means that both the @ref NRF_DRV_PWM_FLAG_SIGNAL_END_SEQ0 flag + * and the @ref NRF_DRV_PWM_FLAG_SIGNAL_END_SEQ1 flag should be specified and + * the @ref NRF_DRV_PWM_EVT_END_SEQ0 event and the @ref NRF_DRV_PWM_EVT_END_SEQ1 + * event should be handled in the same way). + * + * @note The array containing the duty cycle values for the specified sequence + * must be in RAM and cannot be allocated on stack. + * For detailed information, see @ref nrf_pwm_sequence_t. + * + * @param[in] p_instance Pointer to the driver instance structure. + * @param[in] p_sequence Sequence to be played back. + * @param[in] playback_count Number of playbacks to be performed (must not be 0). + * @param[in] flags Additional options. Pass any combination of + * @ref nrf_drv_pwm_flag_t "playback flags", or 0 + * for default settings. + */ +void nrf_drv_pwm_simple_playback(nrf_drv_pwm_t const * const p_instance, + nrf_pwm_sequence_t const * p_sequence, + uint16_t playback_count, + uint32_t flags); + +/** + * @brief Function for starting a two-sequence playback. + * + * @note The array containing the duty cycle values for the specified sequence + * must be in RAM and cannot be allocated on stack. + * For detailed information, see @ref nrf_pwm_sequence_t. + * + * @param[in] p_instance Pointer to the driver instance structure. + * @param[in] p_sequence_0 First sequence to be played back. + * @param[in] p_sequence_1 Second sequence to be played back. + * @param[in] playback_count Number of playbacks to be performed (must not be 0). + * @param[in] flags Additional options. Pass any combination of + * @ref nrf_drv_pwm_flag_t "playback flags", or 0 + * for default settings. + */ +void nrf_drv_pwm_complex_playback(nrf_drv_pwm_t const * const p_instance, + nrf_pwm_sequence_t const * p_sequence_0, + nrf_pwm_sequence_t const * p_sequence_1, + uint16_t playback_count, + uint32_t flags); + +/** + * @brief Function for advancing the active sequence. + * + * This function only applies to @ref NRF_PWM_STEP_TRIGGERED mode. + * + * @param[in] p_instance Pointer to the driver instance structure. + */ +__STATIC_INLINE void nrf_drv_pwm_step(nrf_drv_pwm_t const * const p_instance); + +/** + * @brief Function for stopping the sequence playback. + * + * The playback is stopped at the end of the current PWM period. + * This means that if the active sequence is configured to repeat each duty + * cycle value for a certain number of PWM periods, the last played value + * might appear on the output less times than requested. + * + * @note This function can be instructed to wait until the playback is stopped + * (by setting @p wait_until_stopped to true). Note that, depending on + * the length of the PMW period, this might take a significant amount of + * time. Alternatively, the @ref nrf_drv_pwm_is_stopped function can be + * used to poll the status, or the @ref NRF_DRV_PWM_EVT_STOPPED event can + * be used to get the notification when the playback is stopped, provided + * the event handler is defined. + * + * @param[in] p_instance Pointer to the driver instance structure. + * @param[in] wait_until_stopped If true, the function will not return until + * the playback is stopped. + * + * @retval true If the PWM peripheral is stopped. + * @retval false If the PWM peripheral is not stopped. + */ +bool nrf_drv_pwm_stop(nrf_drv_pwm_t const * const p_instance, + bool wait_until_stopped); + +/** + * @brief Function for checking the status of the PWM peripheral. + * + * @param[in] p_instance Pointer to the driver instance structure. + * + * @retval true If the PWM peripheral is stopped. + * @retval false If the PWM peripheral is not stopped. + */ +bool nrf_drv_pwm_is_stopped(nrf_drv_pwm_t const * const p_instance); + +/** + * @brief Function for updating the sequence data during playback. + * + * @param[in] p_instance Pointer to the driver instance structure. + * @param[in] seq_id Identifier of the sequence (0 or 1). + * @param[in] p_sequence Pointer to the new sequence definition. + */ +__STATIC_INLINE void nrf_drv_pwm_sequence_update( + nrf_drv_pwm_t const * const p_instance, + uint8_t seq_id, + nrf_pwm_sequence_t const * p_sequence); + +/** + * @brief Function for updating the pointer to the duty cycle values + * in the specified sequence during playback. + * + * @param[in] p_instance Pointer to the driver instance structure. + * @param[in] seq_id Identifier of the sequence (0 or 1). + * @param[in] values New pointer to the duty cycle values. + */ +__STATIC_INLINE void nrf_drv_pwm_sequence_values_update( + nrf_drv_pwm_t const * const p_instance, + uint8_t seq_id, + nrf_pwm_values_t values); + +/** + * @brief Function for updating the number of duty cycle values + * in the specified sequence during playback. + * + * @param[in] p_instance Pointer to the driver instance structure. + * @param[in] seq_id Identifier of the sequence (0 or 1). + * @param[in] length New number of the duty cycle values. + */ +__STATIC_INLINE void nrf_drv_pwm_sequence_length_update( + nrf_drv_pwm_t const * const p_instance, + uint8_t seq_id, + uint16_t length); + +/** + * @brief Function for updating the number of repeats for duty cycle values + * in specified sequence during playback. + * + * @param[in] p_instance Pointer to the driver instance structure. + * @param[in] seq_id Identifier of the sequence (0 or 1). + * @param[in] repeats New number of repeats. + */ +__STATIC_INLINE void nrf_drv_pwm_sequence_repeats_update( + nrf_drv_pwm_t const * const p_instance, + uint8_t seq_id, + uint32_t repeats); + +/** + * @brief Function for updating the additional delay after the specified + * sequence during playback. + * + * @param[in] p_instance Pointer to the driver instance structure. + * @param[in] seq_id Identifier of the sequence (0 or 1). + * @param[in] end_delay New end delay value (in PWM periods). + */ +__STATIC_INLINE void nrf_drv_pwm_sequence_end_delay_update( + nrf_drv_pwm_t const * const p_instance, + uint8_t seq_id, + uint32_t end_delay); + +/** + * @brief Function for returning the address of a specified PWM task that can + * be used in PPI module. + * + * @param[in] p_instance Pointer to the driver instance structure. + * @param[in] task Requested task. + * + * @return Task address. + */ +__STATIC_INLINE uint32_t nrf_drv_pwm_task_address_get( + nrf_drv_pwm_t const * const p_instance, + nrf_pwm_task_t task); + +/**@brief Function for returning the address of a specified PWM event that can + * be used in PPI module. + * + * @param[in] p_instance Pointer to the driver instance structure. + * @param[in] event Requested event. + * + * @return Event address. + */ +__STATIC_INLINE uint32_t nrf_drv_pwm_event_address_get( + nrf_drv_pwm_t const * const p_instance, + nrf_pwm_event_t event); + + +#ifndef SUPPRESS_INLINE_IMPLEMENTATION + +__STATIC_INLINE void nrf_drv_pwm_step(nrf_drv_pwm_t const * const p_instance) +{ + nrf_pwm_task_trigger(p_instance->p_registers, NRF_PWM_TASK_NEXTSTEP); +} + +__STATIC_INLINE void nrf_drv_pwm_sequence_update( + nrf_drv_pwm_t const * const p_instance, + uint8_t seq_id, + nrf_pwm_sequence_t const * p_sequence) +{ + nrf_pwm_sequence_set(p_instance->p_registers, seq_id, p_sequence); +} + +__STATIC_INLINE void nrf_drv_pwm_sequence_values_update( + nrf_drv_pwm_t const * const p_instance, + uint8_t seq_id, + nrf_pwm_values_t values) +{ + nrf_pwm_seq_ptr_set(p_instance->p_registers, seq_id, values.p_raw); +} + +__STATIC_INLINE void nrf_drv_pwm_sequence_length_update( + nrf_drv_pwm_t const * const p_instance, + uint8_t seq_id, + uint16_t length) +{ + nrf_pwm_seq_cnt_set(p_instance->p_registers, seq_id, length); +} + +__STATIC_INLINE void nrf_drv_pwm_sequence_repeats_update( + nrf_drv_pwm_t const * const p_instance, + uint8_t seq_id, + uint32_t repeats) +{ + nrf_pwm_seq_refresh_set(p_instance->p_registers, seq_id, repeats); +} + +__STATIC_INLINE void nrf_drv_pwm_sequence_end_delay_update( + nrf_drv_pwm_t const * const p_instance, + uint8_t seq_id, + uint32_t end_delay) +{ + nrf_pwm_seq_end_delay_set(p_instance->p_registers, seq_id, end_delay); +} + +__STATIC_INLINE uint32_t nrf_drv_pwm_task_address_get( + nrf_drv_pwm_t const * const p_instance, + nrf_pwm_task_t task) +{ + return nrf_pwm_task_address_get(p_instance->p_registers, task); +} + +__STATIC_INLINE uint32_t nrf_drv_pwm_event_address_get( + nrf_drv_pwm_t const * const p_instance, + nrf_pwm_event_t event) +{ + return nrf_pwm_event_address_get(p_instance->p_registers, event); +} + +#endif // SUPPRESS_INLINE_IMPLEMENTATION + +#endif // NRF_DRV_PWM_H__ + +/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h index 404f391325..127ef3dbdb 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/nrf_drv_config.h @@ -198,7 +198,7 @@ #define PWM0_INSTANCE_INDEX 0 #endif -#define PWM1_ENABLED 0 +#define PWM1_ENABLED 1 #if (PWM1_ENABLED == 1) #define PWM1_CONFIG_OUT0_PIN 2 @@ -215,7 +215,7 @@ #define PWM1_INSTANCE_INDEX (PWM0_ENABLED) #endif -#define PWM2_ENABLED 0 +#define PWM2_ENABLED 1 #if (PWM2_ENABLED == 1) #define PWM2_CONFIG_OUT0_PIN 2 diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_pwm.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_pwm.h new file mode 100644 index 0000000000..2dce14fd44 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/drivers_nrf/hal/nrf_pwm.h @@ -0,0 +1,665 @@ +/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** + * @defgroup nrf_pwm_hal PWM HAL + * @{ + * @ingroup nrf_pwm + * + * @brief @tagAPI52 Hardware access layer for managing the Pulse Width Modulation (PWM) + * peripheral. + */ + +#ifndef NRF_PWM_H__ +#define NRF_PWM_H__ + +#ifdef NRF52 + +#include +#include +#include + +#include "nrf.h" +#include "nrf_assert.h" + + +/** + * @brief This value can be provided as a parameter for the @ref nrf_pwm_pins_set + * function call to specify that a given output channel shall not be + * connected to a physical pin. + */ +#define NRF_PWM_PIN_NOT_CONNECTED 0xFFFFFFFF + +/** + * @brief Number of channels in each PWM instance. + */ +#define NRF_PWM_CHANNEL_COUNT 4 + + +/** + * @brief PWM tasks. + */ +typedef enum +{ + /*lint -save -e30*/ + NRF_PWM_TASK_STOP = offsetof(NRF_PWM_Type, TASKS_STOP), ///< Stops PWM pulse generation on all channels at the end of the current PWM period, and stops the sequence playback. + NRF_PWM_TASK_SEQSTART0 = offsetof(NRF_PWM_Type, TASKS_SEQSTART[0]), ///< Starts playback of sequence 0. + NRF_PWM_TASK_SEQSTART1 = offsetof(NRF_PWM_Type, TASKS_SEQSTART[1]), ///< Starts playback of sequence 1. + NRF_PWM_TASK_NEXTSTEP = offsetof(NRF_PWM_Type, TASKS_NEXTSTEP) ///< Steps by one value in the current sequence if the decoder is set to @ref NRF_PWM_STEP_TRIGGERED mode. + /*lint -restore*/ +} nrf_pwm_task_t; + +/** + * @brief PWM events. + */ +typedef enum +{ + /*lint -save -e30*/ + NRF_PWM_EVENT_STOPPED = offsetof(NRF_PWM_Type, EVENTS_STOPPED), ///< Response to STOP task, emitted when PWM pulses are no longer generated. + NRF_PWM_EVENT_SEQSTARTED0 = offsetof(NRF_PWM_Type, EVENTS_SEQSTARTED[0]), ///< First PWM period started on sequence 0. + NRF_PWM_EVENT_SEQSTARTED1 = offsetof(NRF_PWM_Type, EVENTS_SEQSTARTED[1]), ///< First PWM period started on sequence 1. + NRF_PWM_EVENT_SEQEND0 = offsetof(NRF_PWM_Type, EVENTS_SEQEND[0]), ///< Emitted at the end of every sequence 0 when its last value has been read from RAM. + NRF_PWM_EVENT_SEQEND1 = offsetof(NRF_PWM_Type, EVENTS_SEQEND[1]), ///< Emitted at the end of every sequence 1 when its last value has been read from RAM. + NRF_PWM_EVENT_PWMPERIODEND = offsetof(NRF_PWM_Type, EVENTS_PWMPERIODEND), ///< Emitted at the end of each PWM period. + NRF_PWM_EVENT_LOOPSDONE = offsetof(NRF_PWM_Type, EVENTS_LOOPSDONE) ///< Concatenated sequences have been played the requested number of times. + /*lint -restore*/ +} nrf_pwm_event_t; + +/** + * @brief PWM interrupts. + */ +typedef enum +{ + NRF_PWM_INT_STOPPED_MASK = PWM_INTENSET_STOPPED_Msk, ///< Interrupt on STOPPED event. + NRF_PWM_INT_SEQSTARTED0_MASK = PWM_INTENSET_SEQSTARTED0_Msk, ///< Interrupt on SEQSTARTED[0] event. + NRF_PWM_INT_SEQSTARTED1_MASK = PWM_INTENSET_SEQSTARTED1_Msk, ///< Interrupt on SEQSTARTED[1] event. + NRF_PWM_INT_SEQEND0_MASK = PWM_INTENSET_SEQEND0_Msk, ///< Interrupt on SEQEND[0] event. + NRF_PWM_INT_SEQEND1_MASK = PWM_INTENSET_SEQEND1_Msk, ///< Interrupt on SEQEND[1] event. + NRF_PWM_INT_PWMPERIODEND_MASK = PWM_INTENSET_PWMPERIODEND_Msk, ///< Interrupt on PWMPERIODEND event. + NRF_PWM_INT_LOOPSDONE_MASK = PWM_INTENSET_LOOPSDONE_Msk ///< Interrupt on LOOPSDONE event. +} nrf_pwm_int_mask_t; + +/** + * @brief PWM shortcuts. + */ +typedef enum +{ + NRF_PWM_SHORT_SEQEND0_STOP_MASK = PWM_SHORTS_SEQEND0_STOP_Msk, ///< Shortcut between SEQEND[0] event and STOP task. + NRF_PWM_SHORT_SEQEND1_STOP_MASK = PWM_SHORTS_SEQEND1_STOP_Msk, ///< Shortcut between SEQEND[1] event and STOP task. + NRF_PWM_SHORT_LOOPSDONE_SEQSTART0_MASK = PWM_SHORTS_LOOPSDONE_SEQSTART0_Msk, ///< Shortcut between LOOPSDONE event and SEQSTART[0] task. + NRF_PWM_SHORT_LOOPSDONE_SEQSTART1_MASK = PWM_SHORTS_LOOPSDONE_SEQSTART1_Msk, ///< Shortcut between LOOPSDONE event and SEQSTART[1] task. + NRF_PWM_SHORT_LOOPSDONE_STOP_MASK = PWM_SHORTS_LOOPSDONE_STOP_Msk ///< Shortcut between LOOPSDONE event and STOP task. +} nrf_pwm_short_mask_t; + +/** + * @brief PWM modes of operation. + */ +typedef enum +{ + NRF_PWM_MODE_UP = PWM_MODE_UPDOWN_Up, ///< Up counter (edge-aligned PWM duty cycle). + NRF_PWM_MODE_UP_AND_DOWN = PWM_MODE_UPDOWN_UpAndDown, ///< Up and down counter (center-aligned PWM duty cycle). +} nrf_pwm_mode_t; + +/** + * @brief PWM base clock frequencies. + */ +typedef enum +{ + NRF_PWM_CLK_16MHz = PWM_PRESCALER_PRESCALER_DIV_1, ///< 16 MHz / 1 = 16 MHz. + NRF_PWM_CLK_8MHz = PWM_PRESCALER_PRESCALER_DIV_2, ///< 16 MHz / 2 = 8 MHz. + NRF_PWM_CLK_4MHz = PWM_PRESCALER_PRESCALER_DIV_4, ///< 16 MHz / 4 = 4 MHz. + NRF_PWM_CLK_2MHz = PWM_PRESCALER_PRESCALER_DIV_8, ///< 16 MHz / 8 = 2 MHz. + NRF_PWM_CLK_1MHz = PWM_PRESCALER_PRESCALER_DIV_16, ///< 16 MHz / 16 = 1 MHz. + NRF_PWM_CLK_500kHz = PWM_PRESCALER_PRESCALER_DIV_32, ///< 16 MHz / 32 = 500 kHz. + NRF_PWM_CLK_250kHz = PWM_PRESCALER_PRESCALER_DIV_64, ///< 16 MHz / 64 = 250 kHz. + NRF_PWM_CLK_125kHz = PWM_PRESCALER_PRESCALER_DIV_128 ///< 16 MHz / 128 = 125 kHz. +} nrf_pwm_clk_t; + +/** + * @brief PWM decoder load modes. + * + * The selected mode determines how the sequence data is read from RAM and + * spread to the compare registers. + */ +typedef enum +{ + NRF_PWM_LOAD_COMMON = PWM_DECODER_LOAD_Common, ///< 1st half word (16-bit) used in all PWM channels (0-3). + NRF_PWM_LOAD_GROUPED = PWM_DECODER_LOAD_Grouped, ///< 1st half word (16-bit) used in channels 0 and 1; 2nd word in channels 2 and 3. + NRF_PWM_LOAD_INDIVIDUAL = PWM_DECODER_LOAD_Individual, ///< 1st half word (16-bit) used in channel 0; 2nd in channel 1; 3rd in channel 2; 4th in channel 3. + NRF_PWM_LOAD_WAVE_FORM = PWM_DECODER_LOAD_WaveForm ///< 1st half word (16-bit) used in channel 0; 2nd in channel 1; ... ; 4th as the top value for the pulse generator counter. +} nrf_pwm_dec_load_t; + +/** + * @brief PWM decoder next step modes. + * + * The selected mode determines when the next value from the active sequence + * is loaded. + */ +typedef enum +{ + NRF_PWM_STEP_AUTO = PWM_DECODER_MODE_RefreshCount, ///< Automatically after the current value is played and repeated the requested number of times. + NRF_PWM_STEP_TRIGGERED = PWM_DECODER_MODE_NextStep ///< When the @ref NRF_PWM_TASK_NEXTSTEP task is triggered. +} nrf_pwm_dec_step_t; + + +/** + * @brief Type used for defining duty cycle values for a sequence + * loaded in @ref NRF_PWM_LOAD_COMMON mode. + */ +typedef uint16_t nrf_pwm_values_common_t; + +/** + * @brief Structure for defining duty cycle values for a sequence + * loaded in @ref NRF_PWM_LOAD_GROUPED mode. + */ +typedef struct { + uint16_t group_0; ///< Duty cycle value for group 0 (channels 0 and 1). + uint16_t group_1; ///< Duty cycle value for group 1 (channels 2 and 3). +} nrf_pwm_values_grouped_t; + +/** + * @brief Structure for defining duty cycle values for a sequence + * loaded in @ref NRF_PWM_LOAD_INDIVIDUAL mode. + */ +typedef struct +{ + uint16_t channel_0; ///< Duty cycle value for channel 0. + uint16_t channel_1; ///< Duty cycle value for channel 1. + uint16_t channel_2; ///< Duty cycle value for channel 2. + uint16_t channel_3; ///< Duty cycle value for channel 3. +} nrf_pwm_values_individual_t; + +/** + * @brief Structure for defining duty cycle values for a sequence + * loaded in @ref NRF_PWM_LOAD_WAVE_FORM mode. + */ +typedef struct { + uint16_t channel_0; ///< Duty cycle value for channel 0. + uint16_t channel_1; ///< Duty cycle value for channel 1. + uint16_t channel_2; ///< Duty cycle value for channel 2. + uint16_t counter_top; ///< Top value for the pulse generator counter. +} nrf_pwm_values_wave_form_t; + +/** + * @brief Union grouping pointers to arrays of duty cycle values applicable to + * various loading modes. + */ +typedef union { + nrf_pwm_values_common_t const * p_common; ///< Pointer to be used in @ref NRF_PWM_LOAD_COMMON mode. + nrf_pwm_values_grouped_t const * p_grouped; ///< Pointer to be used in @ref NRF_PWM_LOAD_GROUPED mode. + nrf_pwm_values_individual_t const * p_individual; ///< Pointer to be used in @ref NRF_PWM_LOAD_INDIVIDUAL mode. + nrf_pwm_values_wave_form_t const * p_wave_form; ///< Pointer to be used in @ref NRF_PWM_LOAD_WAVE_FORM mode. + uint16_t const * p_raw; ///< Pointer providing raw access to the values. +} nrf_pwm_values_t; + +/** + * @brief Structure for defining a sequence of PWM duty cycles. + * + * When the sequence is set (by a call to @ref nrf_pwm_sequence_set), the + * provided duty cycle values are not copied. The @p values pointer is stored + * in the peripheral's internal register, and the values are loaded from RAM + * during the sequence playback. Therefore, you must ensure that the values + * do not change before and during the sequence playback (for example, + * the values cannot be placed in a local variable that is allocated on stack). + * If the sequence is played in a loop and the values should be updated + * before the next iteration, it is safe to modify them when the corresponding + * event signaling the end of sequence occurs (@ref NRF_PWM_EVENT_SEQEND0 + * or @ref NRF_PWM_EVENT_SEQEND1, respectively). + * + * @note The @p repeats and @p end_delay values (which are written to the + * SEQ[n].REFRESH and SEQ[n].ENDDELAY registers in the peripheral, + * respectively) are ignored at the end of a complex sequence + * playback, indicated by the LOOPSDONE event. + * See the @linkProductSpecification52 for more information. + */ +typedef struct +{ + nrf_pwm_values_t values; ///< Pointer to an array with duty cycle values. This array must be in Data RAM. + /**< This field is defined as an union of pointers + * to provide a convenient way to define duty + * cycle values in various loading modes + * (see @ref nrf_pwm_dec_load_t). + * In each value, the most significant bit (15) + * determines the polarity of the output and the + * others (14-0) compose the 15-bit value to be + * compared with the pulse generator counter. */ + uint16_t length; ///< Number of 16-bit values in the array pointed by @p values. + uint32_t repeats; ///< Number of times that each duty cycle should be repeated (after being played once). Ignored in @ref NRF_PWM_STEP_TRIGGERED mode. + uint32_t end_delay; ///< Additional time (in PWM periods) that the last duty cycle is to be kept after the sequence is played. Ignored in @ref NRF_PWM_STEP_TRIGGERED mode. +} nrf_pwm_sequence_t; + +/** + * @brief Helper macro for calculating the number of 16-bit values in specified + * array of duty cycle values. + */ +#define NRF_PWM_VALUES_LENGTH(array) (sizeof(array)/sizeof(uint16_t)) + + +/** + * @brief Function for activating a specific PWM task. + * + * @param[in] p_pwm PWM instance. + * @param[in] task Task to activate. + */ +__STATIC_INLINE void nrf_pwm_task_trigger(NRF_PWM_Type * p_pwm, + nrf_pwm_task_t task); + +/** + * @brief Function for getting the address of a specific PWM task register. + * + * @param[in] p_pwm PWM instance. + * @param[in] task Requested task. + * + * @return Address of the specified task register. + */ +__STATIC_INLINE uint32_t nrf_pwm_task_address_get(NRF_PWM_Type const * p_pwm, + nrf_pwm_task_t task); + +/** + * @brief Function for clearing a specific PWM event. + * + * @param[in] p_pwm PWM instance. + * @param[in] event Event to clear. + */ +__STATIC_INLINE void nrf_pwm_event_clear(NRF_PWM_Type * p_pwm, + nrf_pwm_event_t event); + +/** + * @brief Function for checking the state of a specific PWM event. + * + * @param[in] p_pwm PWM instance. + * @param[in] event Event to check. + * + * @retval true If the event is set. + * @retval false If the event is not set. + */ +__STATIC_INLINE bool nrf_pwm_event_check(NRF_PWM_Type const * p_pwm, + nrf_pwm_event_t event); + +/** + * @brief Function for getting the address of a specific PWM event register. + * + * @param[in] p_pwm PWM instance. + * @param[in] event Requested event. + * + * @return Address of the specified event register. + */ +__STATIC_INLINE uint32_t nrf_pwm_event_address_get(NRF_PWM_Type const * p_pwm, + nrf_pwm_event_t event); + +/** + * @brief Function for enabling specified shortcuts. + * + * @param[in] p_pwm PWM instance. + * @param[in] pwm_shorts_mask Shortcuts to enable. + */ +__STATIC_INLINE void nrf_pwm_shorts_enable(NRF_PWM_Type * p_pwm, + uint32_t pwm_shorts_mask); + +/** + * @brief Function for disabling specified shortcuts. + * + * @param[in] p_pwm PWM instance. + * @param[in] pwm_shorts_mask Shortcuts to disable. + */ +__STATIC_INLINE void nrf_pwm_shorts_disable(NRF_PWM_Type * p_pwm, + uint32_t pwm_shorts_mask); + +/** + * @brief Function for setting the configuration of PWM shortcuts. + * + * @param[in] p_pwm PWM instance. + * @param[in] pwm_shorts_mask Shortcuts configuration to set. + */ +__STATIC_INLINE void nrf_pwm_shorts_set(NRF_PWM_Type * p_pwm, + uint32_t pwm_shorts_mask); + +/** + * @brief Function for enabling specified interrupts. + * + * @param[in] p_pwm PWM instance. + * @param[in] pwm_int_mask Interrupts to enable. + */ +__STATIC_INLINE void nrf_pwm_int_enable(NRF_PWM_Type * p_pwm, + uint32_t pwm_int_mask); + +/** + * @brief Function for disabling specified interrupts. + * + * @param[in] p_pwm PWM instance. + * @param[in] pwm_int_mask Interrupts to disable. + */ +__STATIC_INLINE void nrf_pwm_int_disable(NRF_PWM_Type * p_pwm, + uint32_t pwm_int_mask); + +/** + * @brief Function for setting the configuration of PWM interrupts. + * + * @param[in] p_pwm PWM instance. + * @param[in] pwm_int_mask Interrupts configuration to set. + */ +__STATIC_INLINE void nrf_pwm_int_set(NRF_PWM_Type * p_pwm, + uint32_t pwm_int_mask); + +/** + * @brief Function for retrieving the state of a given interrupt. + * + * @param[in] p_pwm PWM instance. + * @param[in] pwm_int Interrupt to check. + * + * @retval true If the interrupt is enabled. + * @retval false If the interrupt is not enabled. + */ +__STATIC_INLINE bool nrf_pwm_int_enable_check(NRF_PWM_Type const * p_pwm, + nrf_pwm_int_mask_t pwm_int); + +/** + * @brief Function for enabling the PWM peripheral. + * + * @param[in] p_pwm PWM instance. + */ +__STATIC_INLINE void nrf_pwm_enable(NRF_PWM_Type * p_pwm); + +/** + * @brief Function for disabling the PWM peripheral. + * + * @param[in] p_pwm PWM instance. + */ +__STATIC_INLINE void nrf_pwm_disable(NRF_PWM_Type * p_pwm); + +/** + * @brief Function for assigning pins to PWM output channels. + * + * Usage of all PWM output channels is optional. If a given channel is not + * needed, pass the @ref NRF_PWM_PIN_NOT_CONNECTED value instead of its pin + * number. + * + * @param[in] p_pwm PWM instance. + * @param[in] out_pins Array with pin numbers for individual PWM output channels. + */ +__STATIC_INLINE void nrf_pwm_pins_set(NRF_PWM_Type * p_pwm, + uint32_t out_pins[NRF_PWM_CHANNEL_COUNT]); + +/** + * @brief Function for configuring the PWM peripheral. + * + * @param[in] p_pwm PWM instance. + * @param[in] base_clock Base clock frequency. + * @param[in] mode Operating mode of the pulse generator counter. + * @param[in] top_value Value up to which the pulse generator counter counts. + */ +__STATIC_INLINE void nrf_pwm_configure(NRF_PWM_Type * p_pwm, + nrf_pwm_clk_t base_clock, + nrf_pwm_mode_t mode, + uint16_t top_value); + +/** + * @brief Function for defining a sequence of PWM duty cycles. + * + * @param[in] p_pwm PWM instance. + * @param[in] seq_id Identifier of the sequence (0 or 1). + * @param[in] p_seq Pointer to the sequence definition. + */ +__STATIC_INLINE void nrf_pwm_sequence_set(NRF_PWM_Type * p_pwm, + uint8_t seq_id, + nrf_pwm_sequence_t const * p_seq); + +/** + * @brief Function for modifying the pointer to the duty cycle values + * in the specified sequence. + * + * @param[in] p_pwm PWM instance. + * @param[in] seq_id Identifier of the sequence (0 or 1). + * @param[in] p_values Pointer to an array with duty cycle values. + */ +__STATIC_INLINE void nrf_pwm_seq_ptr_set(NRF_PWM_Type * p_pwm, + uint8_t seq_id, + uint16_t const * p_values); + +/** + * @brief Function for modifying the total number of duty cycle values + * in the specified sequence. + * + * @param[in] p_pwm PWM instance. + * @param[in] seq_id Identifier of the sequence (0 or 1). + * @param[in] length Number of duty cycle values. + */ +__STATIC_INLINE void nrf_pwm_seq_cnt_set(NRF_PWM_Type * p_pwm, + uint8_t seq_id, + uint16_t length); + +/** + * @brief Function for modifying the additional number of PWM periods spent + * on each duty cycle value in the specified sequence. + * + * @param[in] p_pwm PWM instance. + * @param[in] seq_id Identifier of the sequence (0 or 1). + * @param[in] refresh Number of additional PWM periods for each duty cycle value. + */ +__STATIC_INLINE void nrf_pwm_seq_refresh_set(NRF_PWM_Type * p_pwm, + uint8_t seq_id, + uint32_t refresh); + +/** + * @brief Function for modifying the additional time added after the sequence + * is played. + * + * @param[in] p_pwm PWM instance. + * @param[in] seq_id Identifier of the sequence (0 or 1). + * @param[in] end_delay Number of PWM periods added at the end of the sequence. + */ +__STATIC_INLINE void nrf_pwm_seq_end_delay_set(NRF_PWM_Type * p_pwm, + uint8_t seq_id, + uint32_t end_delay); + +/** + * @brief Function for setting the mode of loading sequence data from RAM + * and advancing the sequence. + * + * @param[in] p_pwm PWM instance. + * @param[in] dec_load Mode of loading sequence data from RAM. + * @param[in] dec_step Mode of advancing the active sequence. + */ +__STATIC_INLINE void nrf_pwm_decoder_set(NRF_PWM_Type * p_pwm, + nrf_pwm_dec_load_t dec_load, + nrf_pwm_dec_step_t dec_step); + +/** + * @brief Function for setting the number of times the sequence playback + * should be performed. + * + * This function applies to two-sequence playback (concatenated sequence 0 and 1). + * A single sequence can be played back only once. + * + * @param[in] p_pwm PWM instance. + * @param[in] loop_count Number of times to perform the sequence playback. + */ +__STATIC_INLINE void nrf_pwm_loop_set(NRF_PWM_Type * p_pwm, + uint16_t loop_count); + + +#ifndef SUPPRESS_INLINE_IMPLEMENTATION + +__STATIC_INLINE void nrf_pwm_task_trigger(NRF_PWM_Type * p_pwm, + nrf_pwm_task_t task) +{ + *((volatile uint32_t *)((uint8_t *)p_pwm + (uint32_t)task)) = 0x1UL; +} + +__STATIC_INLINE uint32_t nrf_pwm_task_address_get(NRF_PWM_Type const * p_pwm, + nrf_pwm_task_t task) +{ + return ((uint32_t)p_pwm + (uint32_t)task); +} + +__STATIC_INLINE void nrf_pwm_event_clear(NRF_PWM_Type * p_pwm, + nrf_pwm_event_t event) +{ + *((volatile uint32_t *)((uint8_t *)p_pwm + (uint32_t)event)) = 0x0UL; +} + +__STATIC_INLINE bool nrf_pwm_event_check(NRF_PWM_Type const * p_pwm, + nrf_pwm_event_t event) +{ + return (bool)*(volatile uint32_t *)((uint8_t *)p_pwm + (uint32_t)event); +} + +__STATIC_INLINE uint32_t nrf_pwm_event_address_get(NRF_PWM_Type const * p_pwm, + nrf_pwm_event_t event) +{ + return ((uint32_t)p_pwm + (uint32_t)event); +} + +__STATIC_INLINE void nrf_pwm_shorts_enable(NRF_PWM_Type * p_pwm, + uint32_t pwm_shorts_mask) +{ + p_pwm->SHORTS |= pwm_shorts_mask; +} + +__STATIC_INLINE void nrf_pwm_shorts_disable(NRF_PWM_Type * p_pwm, + uint32_t pwm_shorts_mask) +{ + p_pwm->SHORTS &= ~(pwm_shorts_mask); +} + +__STATIC_INLINE void nrf_pwm_shorts_set(NRF_PWM_Type * p_pwm, + uint32_t pwm_shorts_mask) +{ + p_pwm->SHORTS = pwm_shorts_mask; +} + +__STATIC_INLINE void nrf_pwm_int_enable(NRF_PWM_Type * p_pwm, + uint32_t pwm_int_mask) +{ + p_pwm->INTENSET = pwm_int_mask; +} + +__STATIC_INLINE void nrf_pwm_int_disable(NRF_PWM_Type * p_pwm, + uint32_t pwm_int_mask) +{ + p_pwm->INTENCLR = pwm_int_mask; +} + +__STATIC_INLINE void nrf_pwm_int_set(NRF_PWM_Type * p_pwm, + uint32_t pwm_int_mask) +{ + p_pwm->INTEN = pwm_int_mask; +} + +__STATIC_INLINE bool nrf_pwm_int_enable_check(NRF_PWM_Type const * p_pwm, + nrf_pwm_int_mask_t pwm_int) +{ + return (bool)(p_pwm->INTENSET & pwm_int); +} + +__STATIC_INLINE void nrf_pwm_enable(NRF_PWM_Type * p_pwm) +{ + p_pwm->ENABLE = (PWM_ENABLE_ENABLE_Enabled << PWM_ENABLE_ENABLE_Pos); +} + +__STATIC_INLINE void nrf_pwm_disable(NRF_PWM_Type * p_pwm) +{ + p_pwm->ENABLE = (PWM_ENABLE_ENABLE_Disabled << PWM_ENABLE_ENABLE_Pos); +} + +__STATIC_INLINE void nrf_pwm_pins_set(NRF_PWM_Type * p_pwm, + uint32_t out_pins[NRF_PWM_CHANNEL_COUNT]) +{ + uint8_t i; + for (i = 0; i < NRF_PWM_CHANNEL_COUNT; ++i) + { + p_pwm->PSEL.OUT[i] = out_pins[i]; + } +} + +__STATIC_INLINE void nrf_pwm_configure(NRF_PWM_Type * p_pwm, + nrf_pwm_clk_t base_clock, + nrf_pwm_mode_t mode, + uint16_t top_value) +{ + ASSERT(top_value <= PWM_COUNTERTOP_COUNTERTOP_Msk); + + p_pwm->PRESCALER = base_clock; + p_pwm->MODE = mode; + p_pwm->COUNTERTOP = top_value; +} + +__STATIC_INLINE void nrf_pwm_sequence_set(NRF_PWM_Type * p_pwm, + uint8_t seq_id, + nrf_pwm_sequence_t const * p_seq) +{ + ASSERT(p_seq != NULL); + + nrf_pwm_seq_ptr_set( p_pwm, seq_id, p_seq->values.p_raw); + nrf_pwm_seq_cnt_set( p_pwm, seq_id, p_seq->length); + nrf_pwm_seq_refresh_set( p_pwm, seq_id, p_seq->repeats); + nrf_pwm_seq_end_delay_set(p_pwm, seq_id, p_seq->end_delay); +} + +__STATIC_INLINE void nrf_pwm_seq_ptr_set(NRF_PWM_Type * p_pwm, + uint8_t seq_id, + uint16_t const * p_values) +{ + ASSERT(seq_id <= 1); + ASSERT(p_values != NULL); + p_pwm->SEQ[seq_id].PTR = (uint32_t)p_values; +} + +__STATIC_INLINE void nrf_pwm_seq_cnt_set(NRF_PWM_Type * p_pwm, + uint8_t seq_id, + uint16_t length) +{ + ASSERT(seq_id <= 1); + ASSERT(length != 0); + ASSERT(length <= PWM_SEQ_CNT_CNT_Msk); + p_pwm->SEQ[seq_id].CNT = length; +} + +__STATIC_INLINE void nrf_pwm_seq_refresh_set(NRF_PWM_Type * p_pwm, + uint8_t seq_id, + uint32_t refresh) +{ + ASSERT(seq_id <= 1); + ASSERT(refresh <= PWM_SEQ_REFRESH_CNT_Msk); + p_pwm->SEQ[seq_id].REFRESH = refresh; +} + +__STATIC_INLINE void nrf_pwm_seq_end_delay_set(NRF_PWM_Type * p_pwm, + uint8_t seq_id, + uint32_t end_delay) +{ + ASSERT(seq_id <= 1); + ASSERT(end_delay <= PWM_SEQ_ENDDELAY_CNT_Msk); + p_pwm->SEQ[seq_id].ENDDELAY = end_delay; +} + +__STATIC_INLINE void nrf_pwm_decoder_set(NRF_PWM_Type * p_pwm, + nrf_pwm_dec_load_t dec_load, + nrf_pwm_dec_step_t dec_step) +{ + p_pwm->DECODER = ((uint32_t)dec_load << PWM_DECODER_LOAD_Pos) | + ((uint32_t)dec_step << PWM_DECODER_MODE_Pos); +} + +__STATIC_INLINE void nrf_pwm_loop_set(NRF_PWM_Type * p_pwm, + uint16_t loop_count) +{ + p_pwm->LOOP = loop_count; +} + +#endif // SUPPRESS_INLINE_IMPLEMENTATION + +#endif // NRF52 + +#endif // NRF_PWM_H__ + +/** @} */ From 77986517191c87363656543994cc1803b1963862 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Fri, 8 Jul 2016 16:05:25 +0200 Subject: [PATCH 47/67] nRF52 PwmOut implementation debug --- .../TARGET_MCU_NRF52832/pwmout_api.c | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c index 76657a9876..81b30ff003 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c @@ -60,6 +60,7 @@ typedef struct { uint32_t period_us; uint32_t duty_us; + float duty; } pwm_signal_t; typedef struct @@ -98,12 +99,14 @@ void pwmout_init(pwmout_t *obj, PinName pin) obj->pwm_channel = i; m_pwm[i].p_pwm_driver = &m_pwm_driver[i]; - m_pwm[i].signal.period_us = 200000; // 0.02 s - m_pwm[i].signal.duty_us = 100000; + m_pwm[i].signal.period_us = 100000; // 0.02 s + m_pwm[i].signal.duty_us = 50000; + m_pwm[i].signal.duty = (0.5); obj->pwm_struct = &m_pwm[i]; internal_pwmout_exe(obj); + break; } } @@ -133,6 +136,8 @@ void pwmout_write(pwmout_t *obj, float percent) pwm_signal_t * p_pwm_signal = &(((pwm_t*)obj->pwm_struct)->signal); + p_pwm_signal->duty = percent / 100; + int us = (((int)p_pwm_signal->period_us) * percent) / 100; pwmout_pulsewidth_us(obj, us); @@ -164,6 +169,8 @@ void pwmout_period_us(pwmout_t *obj, int us) { pwm_signal_t * p_pwm_signal = &(((pwm_t*)obj->pwm_struct)->signal); + p_pwm_signal->duty_us = (int)((float)us * p_pwm_signal->duty); + p_pwm_signal->period_us = us; internal_pwmout_exe(obj); @@ -207,7 +214,7 @@ static ret_code_t pulsewidth_us_set_get(int period_us, int duty_us, pulsewidth_s for(div = 1; div <= 128 ; div <<= 1) { - if (0xFFFF >= period_us) + if (0x7FFF >= period_us) { p_settings->period = period_us; // unit [us * div] p_settings->duty = duty_us; // unit [us * div] @@ -224,7 +231,7 @@ static ret_code_t pulsewidth_us_set_get(int period_us, int duty_us, pulsewidth_s return NRF_ERROR_INVALID_PARAM; } - static nrf_pwm_values_common_t seq_values[1]; + static volatile nrf_pwm_values_common_t seq_values[1]; static nrf_pwm_sequence_t const seq = { @@ -243,8 +250,8 @@ static void internal_pwmout_exe(pwmout_t *obj) p_pwm_signal = &(((pwm_t*)obj->pwm_struct)->signal); - if (NRF_SUCCESS == pulsewidth_us_set_get(p_pwm_signal->period_us, - p_pwm_signal->duty_us, + if (NRF_SUCCESS == pulsewidth_us_set_get(p_pwm_signal->period_us * 16, + p_pwm_signal->duty_us * 16, &pulsewidth_set)) { //@todo apply pulsewidth_set @@ -278,7 +285,7 @@ static void internal_pwmout_exe(pwmout_t *obj) seq_values[0] = pulsewidth_set.duty; - nrf_drv_pwm_simple_playback(p_pwm_driver, &seq, 3, NRF_DRV_PWM_FLAG_LOOP); + nrf_drv_pwm_simple_playback(p_pwm_driver, &seq, 0, NRF_DRV_PWM_FLAG_LOOP); } From 9f337875bb77c03f632280882471e0d1388f5e26 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Tue, 12 Jul 2016 11:05:19 +0200 Subject: [PATCH 48/67] PWM for nRF52 full debuged. --- .../TARGET_MCU_NRF52832/pwmout_api.c | 192 ++++++++++++------ 1 file changed, 126 insertions(+), 66 deletions(-) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c index 81b30ff003..de13e649bd 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c @@ -47,44 +47,51 @@ #include "app_util_platform.h" #include "nrf_drv_pwm.h" + +#define MAX_PWM_PERIOD_US (0x7FFF << 3) // -> 7FFF (1_us/16) * 128 +#define MAX_PWM_PERIOD_MS ((MAX_PWM_PERIOD_US / 1000) + 1) // approximations advance +#define MAX_PWM_PERIOD_S ((MAX_PWM_PERIOD_US / 1000000) + 1) // approximations advance + #define PWM_INSTANCE_COUNT 3 +///> instances of nRF52 PWM driver static nrf_drv_pwm_t m_pwm_driver[PWM_INSTANCE_COUNT] = - { - NRF_DRV_PWM_INSTANCE(0), - NRF_DRV_PWM_INSTANCE(1), - NRF_DRV_PWM_INSTANCE(2) - }; +{ + NRF_DRV_PWM_INSTANCE(0), + NRF_DRV_PWM_INSTANCE(1), + NRF_DRV_PWM_INSTANCE(2) +}; typedef struct { uint32_t period_us; uint32_t duty_us; float duty; -} pwm_signal_t; +} pwm_signal_t; /// PWM signal description type typedef struct { nrf_drv_pwm_t * p_pwm_driver; pwm_signal_t signal; -} pwm_t; + volatile nrf_pwm_values_common_t seq_values[1]; +} pwm_t; /// internal PWM instance support type static pwm_t m_pwm[PWM_INSTANCE_COUNT] = { {.p_pwm_driver = NULL}, {.p_pwm_driver = NULL}, {.p_pwm_driver = NULL} -}; +}; /// Array of internal PWM instances. typedef struct { - uint16_t period; - uint16_t duty; + uint16_t period_hwu; + uint16_t duty_hwu; nrf_pwm_clk_t pwm_clk; -} pulsewidth_set_t; +} pulsewidth_set_t; /// helper type for timing calculations -static void internal_pwmout_exe(pwmout_t *obj); +static void internal_pwmout_exe(pwmout_t *obj, bool new_period); void pwmout_init(pwmout_t *obj, PinName pin) { @@ -95,17 +102,17 @@ void pwmout_init(pwmout_t *obj, PinName pin) if (m_pwm[i].p_pwm_driver == NULL) // a driver instance not assigned to the obj? { obj->pin = pin; - /// @todo obj->pwm_name = + obj->pwm_channel = i; m_pwm[i].p_pwm_driver = &m_pwm_driver[i]; - m_pwm[i].signal.period_us = 100000; // 0.02 s - m_pwm[i].signal.duty_us = 50000; + m_pwm[i].signal.period_us = 200000; // 0.02 s + m_pwm[i].signal.duty_us = 100000; m_pwm[i].signal.duty = (0.5); obj->pwm_struct = &m_pwm[i]; - internal_pwmout_exe(obj); + internal_pwmout_exe(obj, true); break; } @@ -119,7 +126,6 @@ void pwmout_free(pwmout_t *obj) nrf_drv_pwm_uninit( (nrf_drv_pwm_t*) obj->pwm_struct ); m_pwm[obj->pwm_channel].p_pwm_driver = NULL; - /// @todo release gpio } void pwmout_write(pwmout_t *obj, float percent) @@ -152,7 +158,16 @@ float pwmout_read(pwmout_t *obj) void pwmout_period(pwmout_t *obj, float seconds) { - // @todo saturation + // raught saturation < 0, quasi-max> + if (seconds > MAX_PWM_PERIOD_S) + { + seconds = MAX_PWM_PERIOD_S; + } + else if (seconds < 0) + { + seconds = 0; // f. pwmout_period_us will set period to min. value + } + int us = seconds * 1000000; pwmout_period_us(obj, us); @@ -160,25 +175,55 @@ void pwmout_period(pwmout_t *obj, float seconds) void pwmout_period_ms(pwmout_t *obj, int ms) { + // reught saturation < 0, quasi-max> + if (ms > MAX_PWM_PERIOD_MS) + { + ms = MAX_PWM_PERIOD_MS; + } + else if (ms < 0) + { + ms = 0; // f. pwmout_period_us will set period to min. value + } + int us = ms * 1000; pwmout_period_us(obj, us); } + void pwmout_period_us(pwmout_t *obj, int us) { pwm_signal_t * p_pwm_signal = &(((pwm_t*)obj->pwm_struct)->signal); + // saturation <1, real-max> + if (us > MAX_PWM_PERIOD_US) + { + us = MAX_PWM_PERIOD_US; + } + else if (us < 1) + { + us = 1; + } + p_pwm_signal->duty_us = (int)((float)us * p_pwm_signal->duty); p_pwm_signal->period_us = us; - internal_pwmout_exe(obj); + internal_pwmout_exe(obj, true); } void pwmout_pulsewidth(pwmout_t *obj, float seconds) { - // @todo saturation + // raught saturation < 0, quasi-max> + if (seconds > MAX_PWM_PERIOD_S) + { + seconds = MAX_PWM_PERIOD_S; + } + else if (seconds < 0) + { + seconds = 0; + } + int us = seconds * 1000000; pwmout_pulsewidth_us(obj,us); @@ -186,20 +231,39 @@ void pwmout_pulsewidth(pwmout_t *obj, float seconds) void pwmout_pulsewidth_ms(pwmout_t *obj, int ms) { - // @todo saturation + // raught saturation < 0, quasi-max> + if (ms > MAX_PWM_PERIOD_MS) + { + ms = MAX_PWM_PERIOD_MS; + } + else if (ms < 0) + { + ms = 0; + } + int us = ms * 1000; - pwmout_pulsewidth_us(obj,us); + pwmout_pulsewidth_us(obj, us); } void pwmout_pulsewidth_us(pwmout_t *obj, int us) { - // @todo saturation + // saturation <0, real-max> + if (us > MAX_PWM_PERIOD_US) + { + us = MAX_PWM_PERIOD_US; + } + else if (us < 0) + { + us = 0; + } + pwm_signal_t * p_pwm_signal = &(((pwm_t*)obj->pwm_struct)->signal); p_pwm_signal->duty_us = us; + p_pwm_signal->duty = us / p_pwm_signal->period_us; - internal_pwmout_exe(obj); + internal_pwmout_exe(obj, false); } @@ -209,15 +273,15 @@ void pwmout_pulsewidth_us(pwmout_t *obj, int us) static ret_code_t pulsewidth_us_set_get(int period_us, int duty_us, pulsewidth_set_t * const p_settings) { - uint16_t div; + uint16_t div; nrf_pwm_clk_t pwm_clk = NRF_PWM_CLK_16MHz; for(div = 1; div <= 128 ; div <<= 1) { if (0x7FFF >= period_us) { - p_settings->period = period_us; // unit [us * div] - p_settings->duty = duty_us; // unit [us * div] + p_settings->period_hwu = period_us; // unit [us/16 * div] + p_settings->duty_hwu = duty_us; // unit [us/16 * div] p_settings->pwm_clk = pwm_clk; return NRF_SUCCESS; @@ -231,22 +295,13 @@ static ret_code_t pulsewidth_us_set_get(int period_us, int duty_us, pulsewidth_s return NRF_ERROR_INVALID_PARAM; } - static volatile nrf_pwm_values_common_t seq_values[1]; - - static nrf_pwm_sequence_t const seq = - { - .values.p_common = seq_values, - .length = NRF_PWM_VALUES_LENGTH(seq_values), - .repeats = 0, - .end_delay = 0 - }; -static void internal_pwmout_exe(pwmout_t *obj) +static void internal_pwmout_exe(pwmout_t *obj, bool new_period) { - pulsewidth_set_t pulsewidth_set; - pwm_signal_t * p_pwm_signal; - nrf_drv_pwm_t *p_pwm_driver; - ret_code_t ret_code; + pulsewidth_set_t pulsewidth_set; + pwm_signal_t * p_pwm_signal; + nrf_drv_pwm_t * p_pwm_driver; + ret_code_t ret_code; p_pwm_signal = &(((pwm_t*)obj->pwm_struct)->signal); @@ -254,40 +309,45 @@ static void internal_pwmout_exe(pwmout_t *obj) p_pwm_signal->duty_us * 16, &pulsewidth_set)) { - //@todo apply pulsewidth_set p_pwm_driver = (((pwm_t*)obj->pwm_struct)->p_pwm_driver); - nrf_drv_pwm_config_t config0 = + nrf_pwm_sequence_t seq = { - .output_pins = - { - obj->pin, // channel 0 - NRF_DRV_PWM_PIN_NOT_USED, // channel 1 - NRF_DRV_PWM_PIN_NOT_USED, // channel 2 - NRF_DRV_PWM_PIN_NOT_USED, // channel 3 - }, - .irq_priority = APP_IRQ_PRIORITY_LOW, - .base_clock = pulsewidth_set.pwm_clk, - .count_mode = NRF_PWM_MODE_UP, - .top_value = pulsewidth_set.period, - .load_mode = NRF_PWM_LOAD_COMMON, - .step_mode = NRF_PWM_STEP_AUTO + .values.p_common = (nrf_pwm_values_common_t*) (((pwm_t*)obj->pwm_struct)->seq_values), + .length = 1, + .repeats = 0, + .end_delay = 0 }; + (((pwm_t*)obj->pwm_struct)->seq_values)[0] = pulsewidth_set.duty_hwu | 0x8000; - //printf("clock = %d, top = %d\r\n", pulsewidth_set.pwm_clk, pulsewidth_set.period); + if (new_period) + { + nrf_drv_pwm_config_t config0 = + { + .output_pins = + { + obj->pin | NRF_DRV_PWM_PIN_INVERTED, // channel 0 + NRF_DRV_PWM_PIN_NOT_USED, // channel 1 + NRF_DRV_PWM_PIN_NOT_USED, // channel 2 + NRF_DRV_PWM_PIN_NOT_USED, // channel 3 + }, + .irq_priority = APP_IRQ_PRIORITY_LOW, + .base_clock = pulsewidth_set.pwm_clk, + .count_mode = NRF_PWM_MODE_UP, + .top_value = pulsewidth_set.period_hwu, + .load_mode = NRF_PWM_LOAD_COMMON, + .step_mode = NRF_PWM_STEP_AUTO + }; + + nrf_drv_pwm_uninit(p_pwm_driver); - nrf_drv_pwm_uninit(p_pwm_driver); + ret_code = nrf_drv_pwm_init( p_pwm_driver, &config0, NULL); - ret_code = nrf_drv_pwm_init( p_pwm_driver, &config0, NULL); - - MBED_ASSERT(ret_code == NRF_SUCCESS); // assert if free instance was not found. - - seq_values[0] = pulsewidth_set.duty; - - nrf_drv_pwm_simple_playback(p_pwm_driver, &seq, 0, NRF_DRV_PWM_FLAG_LOOP); + MBED_ASSERT(ret_code == NRF_SUCCESS); // assert if free instance was not found. + } - + nrf_drv_pwm_simple_playback(p_pwm_driver, &seq, 0, NRF_DRV_PWM_FLAG_LOOP); } else { From 3519122760c57bf56b01c5a2499b62057587efdc Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Tue, 12 Jul 2016 15:12:09 +0200 Subject: [PATCH 49/67] cCR changes for nRF52 PwmOut implementation. --- .../TARGET_MCU_NRF52832/pwmout_api.c | 93 +++++++++++++------ 1 file changed, 64 insertions(+), 29 deletions(-) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c index de13e649bd..b37b1221d3 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c @@ -47,19 +47,45 @@ #include "app_util_platform.h" #include "nrf_drv_pwm.h" - -#define MAX_PWM_PERIOD_US (0x7FFF << 3) // -> 7FFF (1_us/16) * 128 +#define MAX_PWM_COUNTERTOP (0x7FFF) // 0x7FFF is the max of COUNTERTOP value for the PWM peripherial of the nRF52. +#define MAX_PWM_PERIOD_US (MAX_PWM_COUNTERTOP * 8) // PWM hw is driven by 16 MHz clock, hence the tick is 1_us/16, + // and 128 is the max prescaler value. #define MAX_PWM_PERIOD_MS ((MAX_PWM_PERIOD_US / 1000) + 1) // approximations advance #define MAX_PWM_PERIOD_S ((MAX_PWM_PERIOD_US / 1000000) + 1) // approximations advance -#define PWM_INSTANCE_COUNT 3 +#ifdef PWM0_ENABLED + #define __PWM0_NUM 1 +#else + #define __PWM0_NUM 0 +#endif + +#ifdef PWM1_ENABLED + #define __PWM1_NUM 1 +#else + #define __PWM1_NUM 0 +#endif + +#ifdef PWM2_ENABLED + #define __PWM2_NUM 1 +#else + #define __PWM2_NUM 0 +#endif + + +#define PWM_INSTANCE_COUNT (__PWM0_NUM + __PWM1_NUM + __PWM2_NUM) ///> instances of nRF52 PWM driver -static nrf_drv_pwm_t m_pwm_driver[PWM_INSTANCE_COUNT] = +static const nrf_drv_pwm_t m_pwm_driver[PWM_INSTANCE_COUNT] = { +#ifdef PWM0_ENABLED NRF_DRV_PWM_INSTANCE(0), +#endif +#ifdef PWM1_ENABLED NRF_DRV_PWM_INSTANCE(1), +#endif +#ifdef PWM2_ENABLED NRF_DRV_PWM_INSTANCE(2) +#endif }; typedef struct @@ -78,20 +104,26 @@ typedef struct static pwm_t m_pwm[PWM_INSTANCE_COUNT] = { +#ifdef PWM0_ENABLED {.p_pwm_driver = NULL}, +#endif +#ifdef PWM0_ENABLED {.p_pwm_driver = NULL}, +#endif +#ifdef PWM0_ENABLED {.p_pwm_driver = NULL} +#endif }; /// Array of internal PWM instances. typedef struct { - uint16_t period_hwu; - uint16_t duty_hwu; + uint16_t period_hwu; // unit related to pwm_clk + uint16_t duty_hwu; // unit related to pwm_clk nrf_pwm_clk_t pwm_clk; } pulsewidth_set_t; /// helper type for timing calculations -static void internal_pwmout_exe(pwmout_t *obj, bool new_period); +static void internal_pwmout_exe(pwmout_t *obj, bool new_period, bool initialization); void pwmout_init(pwmout_t *obj, PinName pin) { @@ -105,14 +137,14 @@ void pwmout_init(pwmout_t *obj, PinName pin) obj->pwm_channel = i; - m_pwm[i].p_pwm_driver = &m_pwm_driver[i]; + m_pwm[i].p_pwm_driver = (nrf_drv_pwm_t *) &m_pwm_driver[i]; m_pwm[i].signal.period_us = 200000; // 0.02 s m_pwm[i].signal.duty_us = 100000; - m_pwm[i].signal.duty = (0.5); + m_pwm[i].signal.duty = 0.5f; obj->pwm_struct = &m_pwm[i]; - internal_pwmout_exe(obj, true); + internal_pwmout_exe(obj, true, true); break; } @@ -135,16 +167,16 @@ void pwmout_write(pwmout_t *obj, float percent) { percent = 0; } - else if (percent > 100) + else if (percent > 1) { - percent = 100; + percent = 1; } pwm_signal_t * p_pwm_signal = &(((pwm_t*)obj->pwm_struct)->signal); - p_pwm_signal->duty = percent / 100; + p_pwm_signal->duty = percent; - int us = (((int)p_pwm_signal->period_us) * percent) / 100; + int us = (((int)p_pwm_signal->period_us) * percent); pwmout_pulsewidth_us(obj, us); } @@ -153,7 +185,7 @@ float pwmout_read(pwmout_t *obj) { pwm_signal_t * p_pwm_signal = &(((pwm_t*)obj->pwm_struct)->signal); - return (float)p_pwm_signal->duty_us / (float)p_pwm_signal->period_us * 100; + return (float)p_pwm_signal->duty_us / (float)p_pwm_signal->period_us; } void pwmout_period(pwmout_t *obj, float seconds) @@ -209,7 +241,7 @@ void pwmout_period_us(pwmout_t *obj, int us) p_pwm_signal->period_us = us; - internal_pwmout_exe(obj, true); + internal_pwmout_exe(obj, true, false); } void pwmout_pulsewidth(pwmout_t *obj, float seconds) @@ -263,7 +295,7 @@ void pwmout_pulsewidth_us(pwmout_t *obj, int us) p_pwm_signal->duty_us = us; p_pwm_signal->duty = us / p_pwm_signal->period_us; - internal_pwmout_exe(obj, false); + internal_pwmout_exe(obj, false, false); } @@ -271,24 +303,24 @@ void pwmout_pulsewidth_us(pwmout_t *obj, int us) -static ret_code_t pulsewidth_us_set_get(int period_us, int duty_us, pulsewidth_set_t * const p_settings) +static ret_code_t pulsewidth_us_set_get(int period_hwu, int duty_hwu, pulsewidth_set_t * p_settings) { uint16_t div; nrf_pwm_clk_t pwm_clk = NRF_PWM_CLK_16MHz; - for(div = 1; div <= 128 ; div <<= 1) + for(div = 1; div <= 128 ; div <<= 1) // 128 is the maximum of clock prescaler for PWM peripherial { - if (0x7FFF >= period_us) + if (MAX_PWM_COUNTERTOP >= period_hwu) { - p_settings->period_hwu = period_us; // unit [us/16 * div] - p_settings->duty_hwu = duty_us; // unit [us/16 * div] + p_settings->period_hwu = period_hwu; // unit [us/16 * div] + p_settings->duty_hwu = duty_hwu; // unit [us/16 * div] p_settings->pwm_clk = pwm_clk; return NRF_SUCCESS; } - period_us >>= 1; - duty_us >>= 1; + period_hwu >>= 1; + duty_hwu >>= 1; pwm_clk++; } @@ -296,7 +328,7 @@ static ret_code_t pulsewidth_us_set_get(int period_us, int duty_us, pulsewidth_s } -static void internal_pwmout_exe(pwmout_t *obj, bool new_period) +static void internal_pwmout_exe(pwmout_t *obj, bool new_period, bool initialization) { pulsewidth_set_t pulsewidth_set; pwm_signal_t * p_pwm_signal; @@ -305,13 +337,13 @@ static void internal_pwmout_exe(pwmout_t *obj, bool new_period) p_pwm_signal = &(((pwm_t*)obj->pwm_struct)->signal); - if (NRF_SUCCESS == pulsewidth_us_set_get(p_pwm_signal->period_us * 16, - p_pwm_signal->duty_us * 16, + if (NRF_SUCCESS == pulsewidth_us_set_get(p_pwm_signal->period_us * 16, // base clk for PWM is 16 MHz + p_pwm_signal->duty_us * 16, // base clk for PWM is 16 MHz &pulsewidth_set)) { p_pwm_driver = (((pwm_t*)obj->pwm_struct)->p_pwm_driver); - nrf_pwm_sequence_t seq = + const nrf_pwm_sequence_t seq = { .values.p_common = (nrf_pwm_values_common_t*) (((pwm_t*)obj->pwm_struct)->seq_values), .length = 1, @@ -340,7 +372,10 @@ static void internal_pwmout_exe(pwmout_t *obj, bool new_period) .step_mode = NRF_PWM_STEP_AUTO }; - nrf_drv_pwm_uninit(p_pwm_driver); + if (!initialization) + { + nrf_drv_pwm_uninit(p_pwm_driver); + } ret_code = nrf_drv_pwm_init( p_pwm_driver, &config0, NULL); From 3c93283dc0fbf049a6281e635225e4f56d32e454 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Tue, 12 Jul 2016 15:23:25 +0200 Subject: [PATCH 50/67] CR changes for PWm nRF52 part 2. --- .../TARGET_MCU_NRF52832/pwmout_api.c | 32 ++++--------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c index b37b1221d3..11509c31c9 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c @@ -53,37 +53,19 @@ #define MAX_PWM_PERIOD_MS ((MAX_PWM_PERIOD_US / 1000) + 1) // approximations advance #define MAX_PWM_PERIOD_S ((MAX_PWM_PERIOD_US / 1000000) + 1) // approximations advance -#ifdef PWM0_ENABLED - #define __PWM0_NUM 1 -#else - #define __PWM0_NUM 0 -#endif -#ifdef PWM1_ENABLED - #define __PWM1_NUM 1 -#else - #define __PWM1_NUM 0 -#endif - -#ifdef PWM2_ENABLED - #define __PWM2_NUM 1 -#else - #define __PWM2_NUM 0 -#endif - - -#define PWM_INSTANCE_COUNT (__PWM0_NUM + __PWM1_NUM + __PWM2_NUM) +#define PWM_INSTANCE_COUNT (PWM_COUNT) // import from the PWM driver header ///> instances of nRF52 PWM driver static const nrf_drv_pwm_t m_pwm_driver[PWM_INSTANCE_COUNT] = { -#ifdef PWM0_ENABLED +#if PWM0_ENABLED NRF_DRV_PWM_INSTANCE(0), #endif -#ifdef PWM1_ENABLED +#if PWM1_ENABLED NRF_DRV_PWM_INSTANCE(1), #endif -#ifdef PWM2_ENABLED +#if PWM2_ENABLED NRF_DRV_PWM_INSTANCE(2) #endif }; @@ -104,13 +86,13 @@ typedef struct static pwm_t m_pwm[PWM_INSTANCE_COUNT] = { -#ifdef PWM0_ENABLED +#if PWM0_ENABLED {.p_pwm_driver = NULL}, #endif -#ifdef PWM0_ENABLED +#if PWM1_ENABLED {.p_pwm_driver = NULL}, #endif -#ifdef PWM0_ENABLED +#if PWM2_ENABLED {.p_pwm_driver = NULL} #endif }; /// Array of internal PWM instances. From 5d5ea9a0508e22d18037317644919cfd81364396 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Tue, 12 Jul 2016 15:30:32 +0200 Subject: [PATCH 51/67] CR changes for PWM of nRF52 part 3. --- .../TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c index 11509c31c9..43cb0cad2d 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/pwmout_api.c @@ -54,7 +54,7 @@ #define MAX_PWM_PERIOD_S ((MAX_PWM_PERIOD_US / 1000000) + 1) // approximations advance -#define PWM_INSTANCE_COUNT (PWM_COUNT) // import from the PWM driver header +#define PWM_INSTANCE_COUNT (PWM_COUNT) // import from the nrf_drv_config.h file ///> instances of nRF52 PWM driver static const nrf_drv_pwm_t m_pwm_driver[PWM_INSTANCE_COUNT] = From 3c8c82b06c372069a26653b9d8fd2979b3a0ae31 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Wed, 13 Jul 2016 13:16:36 +0200 Subject: [PATCH 52/67] make posible IAR compilation IAR dosen't support "flexible array member" in c++ compilation pm_peer_data_local_gatt_db_t::data[] -> pm_peer_data_local_gatt_db_t::data[1] --- .../TARGET_NRF5/sdk/ble/peer_manager/peer_manager_types.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_types.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_types.h index 6a4b11b8df..37a43b316b 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_types.h +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/peer_manager/peer_manager_types.h @@ -175,7 +175,12 @@ typedef struct { uint32_t flags; /**< @brief Flags that describe the database attributes. */ uint16_t len; /**< @brief Size of the attribute array. */ + +#ifdef __ICCARM__ //IAR dosen't support "flexible array member" in c++ compilation + uint8_t data[1]; /**< @brief Array to hold the database attributes. */ +#else uint8_t data[]; /**< @brief Array to hold the database attributes. */ +#endif } pm_peer_data_local_gatt_db_t; From f281ecd4beeb7436f4a4f7873e537e63b6658772 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Thu, 14 Jul 2016 13:01:22 +0200 Subject: [PATCH 53/67] Comand IAR toolchain to provide intel-hex as a build product. --- tools/toolchains/iar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/toolchains/iar.py b/tools/toolchains/iar.py index 15d26b2f9d..26e780aa3a 100644 --- a/tools/toolchains/iar.py +++ b/tools/toolchains/iar.py @@ -198,7 +198,7 @@ class IAR(mbedToolchain): @hook_tool def binary(self, resources, elf, bin): # Build binary command - cmd = [self.elf2bin, "--bin", elf, bin] + cmd = [self.elf2bin, "--ihex", elf, bin] # Call cmdline hook cmd = self.hook.get_cmdline_binary(cmd) From 7861cefb058e5170c0d058790876ad0ec2d30a55 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Thu, 14 Jul 2016 16:37:02 +0200 Subject: [PATCH 54/67] Fix: IAR build for NRF5x produce proper combined intel-hex file. --- hal/targets.json | 4 ++-- .../sdk/libraries/bootloader_dfu/bootloader_settings.c | 4 +++- tools/toolchains/iar.py | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hal/targets.json b/hal/targets.json index 374370dcb2..328aa3b517 100644 --- a/hal/targets.json +++ b/hal/targets.json @@ -1124,7 +1124,7 @@ "detect_code": ["1070"], "post_binary_hook": { "function": "MCU_NRF51Code.binary_hook", - "toolchains": ["ARM_STD", "GCC_ARM"] + "toolchains": ["ARM_STD", "GCC_ARM", "IAR"] }, "program_cycle_s": 6, "features": ["BLE"] @@ -1743,7 +1743,7 @@ ], "post_binary_hook": { "function": "MCU_NRF51Code.binary_hook", - "toolchains": ["ARM_STD", "GCC_ARM"] + "toolchains": ["ARM_STD", "GCC_ARM", "IAR"] }, "MERGE_BOOTLOADER": false, "features": ["BLE"] diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.c index 5fc2223e70..7eef54ea4a 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.c @@ -35,7 +35,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ - +#ifdef NORDIC_BOOTLOADER_SETTINGS // avoid from unwanted commpilation #include "bootloader_settings.h" #include @@ -88,3 +88,5 @@ void bootloader_util_settings_get(const bootloader_settings_t ** pp_bootloader_s *pp_bootloader_settings = p_bootloader_settings; } + +#endif // NORDIC_BOOTLOADER diff --git a/tools/toolchains/iar.py b/tools/toolchains/iar.py index 26e780aa3a..15d26b2f9d 100644 --- a/tools/toolchains/iar.py +++ b/tools/toolchains/iar.py @@ -198,7 +198,7 @@ class IAR(mbedToolchain): @hook_tool def binary(self, resources, elf, bin): # Build binary command - cmd = [self.elf2bin, "--ihex", elf, bin] + cmd = [self.elf2bin, "--bin", elf, bin] # Call cmdline hook cmd = self.hook.get_cmdline_binary(cmd) From 5d7c5cf9c1c97da29ff056f92d5eed42ae132cd7 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Thu, 14 Jul 2016 17:03:06 +0200 Subject: [PATCH 55/67] Corect nRF51 IAR scatre files in order to be compatible with softdevice 130 2.0.0 --- .../TARGET_MCU_NORDIC_16K/nRF51822_QFAA.icf | 6 +++--- .../TARGET_MCU_NORDIC_32K/nRF51822_QFAA.icf | 10 +++++----- .../s110_nrf51822_7.1.0_softdevice.bin | Bin 86540 -> 0 bytes 3 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/s110_nrf51822_7.1.0_softdevice.bin diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/nRF51822_QFAA.icf b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/nRF51822_QFAA.icf index d71c75cb3f..0c77a58bb3 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/nRF51822_QFAA.icf +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/nRF51822_QFAA.icf @@ -2,11 +2,11 @@ /*-Editor annotation file-*/ /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ /*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00016000; +define symbol __ICFEDIT_intvec_start__ = 0x0001b000; /*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x000160c0; +define symbol __ICFEDIT_region_ROM_start__ = 0x0001b0c0; define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20002000; +define symbol __ICFEDIT_region_RAM_start__ = 0x20002ef8; define symbol __ICFEDIT_region_RAM_end__ = 0x20003FFF; /*-Sizes-*/ define symbol __ICFEDIT_size_cstack__ = 0x400; diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/nRF51822_QFAA.icf b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/nRF51822_QFAA.icf index e53b889cc8..70182937a4 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/nRF51822_QFAA.icf +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/nRF51822_QFAA.icf @@ -2,12 +2,12 @@ /*-Editor annotation file-*/ /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ /*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00016000; +define symbol __ICFEDIT_intvec_start__ = 0x0001b000; /*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x000160c0; -define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20002000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; +define symbol __ICFEDIT_region_ROM_start__ = 0x0001b0c0; +define symbol __ICFEDIT_region_ROM_end__ = 0x0003FFFF; +define symbol __ICFEDIT_region_RAM_start__ = 0x20002ef8; +define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF; /*-Sizes-*/ /*Heap 1/4 of ram and stack 1/8*/ define symbol __ICFEDIT_size_cstack__ = 0xc00; diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/s110_nrf51822_7.1.0_softdevice.bin b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/s110_nrf51822_7.1.0_softdevice.bin deleted file mode 100644 index 151801682bba504439ea4361758e0fd3c64855ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 86540 zcmeEvdwdkt+5efn&Tej-gi8`anB62~69R1TLO{Sx)(*2FAfUFWv`zr)M7(SQ;wB*O zhTA6E8t_sOea(8QL9qrTN~_V}?FCEU&Ju00Xq~9I+SWR1HJi(3f8R6NAolJ1{(isz z8$Pph=FGV~=Q+=L&T~6MubGgD2^S&c5bpom-wKo+|2u=kSzKS>8pNe%2uZ^=8J8W` z3|trCx)hfe*A=*ajOzwm4Y)Sr+JWmHT>Ef6hU*zzFW@?c>$kYx!Sw;I&v1Q>D~`*o zBP0{o6kNr)rgiu7y*yFB7&3Ha9GTX`a@Tk*l4TXUxRU!(GPQuaDw%R~E0d|qxaG-| zz%5OtYPluJ)N)Qprmp1pWNH=XNv2kFRmqgdElQ@=aSM_uiJO;9-NemJrhMFm$<#(} zPBP`^W+ziyxS7dRfGbO;wsX#8D#R5hQ+IQP$y7VXB~$lt1uK@;?1 z9H*CDBa&DCSd%4@vSFD)`t4+zI3n6RIr;2ctacmubbc~VicHF*uV<`nL2KKB zwhsvIdUrk($>3s9!hIVZ?Kbe7q$fn3J7hG>sP0T2(j-G2%!CGf~cv3dhUbhlhP-W zC^797d?lY4cq}mocV=H=;OB|Mgr8+%nj?vU%M*IwfT*9vhYMJ*0KKnLU% zUys_|+O-mx)wiz{0#cCZ_p&*F#n*XnSvX5VPu9Q3gL{Hg|isFSxyYRI68)> ztAMAAfT#TlGBaJ~1iqdVwo8j8JMTj26Qd45MpH*dFbMtq*31{os?dA#}%G2{7xpO`3 zZd;F@w{@p@_M0;zhO)Fi_PFgt*0jf}V{*=K?7s*baCX5bn% z{i%L;zBhl$6m#UeG!xlV@MR>2xApiI(|@*ZqMCt42GE_6au(C^<_dXU-{Qo;FmN|K zLVCDY;?YUo$+bn&-PI|PNhrCmIyEwJ$;6s$F-Nj_L)D+lRwY{qe9eZkmgFqX(DJRw z@0V#_I#P!B(*>QRvs*nn@mlnw=Rb&!^SA{5NGc%{DDG{505A{(;no|q6jx*G*5`T_U7wP5AHMYfO@WAppS(1&8pxd~_ShIiC-o>ORj<%N= zXp?9YZPTRd$VPr$L9u^b{?pZlzO_HTmVA`sdMRh|R34lOaL{rTrhota8w3Bwz`rr@ zZw&k!1OLXrzcKLtgMrXg!u4OykbMgYS&aMt_P1jBckgL=di5ahHC*G*|9n4j-n-u? z)9>JZ23P-i@BX>o_;VCxKL20J5mgtZkx~a`Hu~w1nF}fBk!c(?U?N$TmAj$nC+pZUgr(g=>*$lzQuK! z(1}rLV!8@?piCZd^Im=>e=VPJMAyN%m~N9m7L!+)mv-_Q zF9rBkeh+)~T-&8Po%Ga~aoN$~;f6(1(wxsWK6KBewh?!)tmD^aS zu%ArHIbGlGVLhkoe2cfSMOsddM00X5ej7An7<;(Hz9`-qJp=dGaX&sSG0>aP+b7}qCEO?Cel$U~rQ8_R3$C#EOki6ysEOVFM-(}{UzRvu_fRebH>kM2dFlzpYkvDVD!3InD+0bI| z9$HsmF1Ma`*(ILwZTB&%GDI~oOD9p^A93=Gx@~k~mkYhbx(k;X_~#2;ex@Xir}`kr zi$ei z>3Hrq_gpw=!gCj%4X964GUybEGFueOPeq*25`Q0=>x+SA@}L{MaRF$`h56RBqVIm8 z^Eshes?|fb9$UAsQctqgM@A>6W=$$^6qjF6xv=U7-sM-VUU$>R&4C@HMq>S$yk5OG zVe4Tfy*hw_?t-D>rOZKS6lrd>)QTfG}^2*FcZW8<$KomG^vRra z&H~TUD}Q`FS%TSalX7{p`US>w{&>ymur|V4>9-m_?I@%B-nh(aKAuCN-%8s7CB-={ zv*2Iktv+vLX0@F@VXnW!MlvsnKl2!sw0?&hvs#AHv!U@ZnZYy1v0+yKYa|1lT(beF z&%{{u#2~9)1=tyGhPPMGie+BHu|7Rl>J8{Z;7zga=}Qf~)8A2TmPxr$CQiLv7+%U{ ztA!&pH(M_E>5EBWq4ybGzCg-Lj1rijbx zc8F8FnQMNu#xiyHn#o?v)X172VCAQXdhIP^KcNeX*-P$S^T#z+T7HVS19w}uF?>5( zqN5=s&`%T&>zI7QxHmMeT`kq!bluvuH(ys**Enk}SQ`0;xVJEPufoQYN!&t^xbrEW zRVTmXHd|1B*mXabT zU%rWRZEtwJAzKZD%egBJK0I&OzH$4e@{I?5zMj8CZQZH-=iZi3TcA2r6Ci%p$MV+7 z?LJoBHJTVW1Kw-}1$|tj%*o^{=dt_*K3Hi{)tH@EgcNoAh(+Ciy|@wU5!?ve{28pf zShq#>#!oN(L#=h84qTSoLY!MD6%;nT`sbE`S+9fqIY zAkJ%T?GGGlwl@Y_>w>+l9YKcc@J-+J`sLiEN72gFk=KQKKG4dldSJpR*YlF!;&Dgv3A6=@OGD&Yp)>46 zZq_iXev6!Z`5@jV1};t1YwbQExGSq}<|^8@FlA|xCu$bmzNhuoUB|a@K88EGiQ8&} z12jf<7l0cLHEqq>Vx^FArahd0sn2imyklm0r$gby%i$#lTwX?a17rit7H=>=ugieEz+HJ8P&dy3==N@i;I6$)1i-#yoR_+qC zY;stp(U#j|zuLs0w5|JMf!T^ViI6P}T4wA76zaja8QBc}I>vRGBCGml%-~53L=y%N ztEMIx-tJ*xg^YDi1-+*OS4-j)R}xYykkW&@m|?-CeeCCQG&sHjZ~9`SquOw4s*oLC z1?+z|NcOVoj|VGwdS5^I;o(v(@Ip*=sL1Pic!Z*lEm+83X4!V3gr$uIfA66|LT~|wy7=o_0*z{IZDHfiw%^YF`#W7 zXgk53@D`)|0+g@p;Tndc#D483zV6p+jl6pSNBK(Rm_R@?diiDVtAMv;(CKH@D-%wC zirO?xIIe*~oAd1bJ`UW^*Zn;93%d4b&F8e52Kk8atT(4JTeS>6yUZTyY7JHEBNnxP zNQV*XI44?=8Y=Cd`J8CsPR_UKmqNdvb5(5&`1DLJN;$ld2!`Hy5P^lpfRgdN_^ zXyr(3`%>ZwngY!1SZT*(Ex!+d<&9l zBMyjUA)tY@J> zN;uc9#si^4I~aS#rUQPal*q&$Y@92&U2af2gPD0YQPS`cJX#g!U@=E#X|QPX4?mbe zo+&uJPgG{9!=NaO`m51#igKN!DEqnE`ba@?B-4Z`-ZWR1s-PCMEsVqhdImr7yPbx< z93k5~0dFG-C)VKO=!fz;qNFD0>%wzwThFy^j+oCucAo~BNzi%s0vXKAWDr_?Gh0oPbpiWOFBkW;w0x0lIM zTQzuIJU7M*&cX35Xp{37Po-;^Y6{mW?6tdJ?5}-SdRd0<3hsF?0d|H)Em*y_={lz)@`5lg6u?TE8tL*1 zkddr+ij{$8>hlViQ{PVIQk8(2ecQybw?A_pz1==KYZKv=4bwM5#@P_-(ZTm@>we^) zU^YOW*yp_xV?3tKL^|Z54D9L&t^=#O*TV(x7kZ~M{%~V36b`yW3M3}6f%8#$?CyVR zOE2&8{tV-PXq2^gOwE8cGd}hi$+7#o@6;q{IxmnHwV5@@TZJa?Q9uwFy+g3UQ|ziF z>d0_2(%~Eq>2HT`7hIJYYWeVOUYo-;T^=$EaS9vomW?N1lZ?hOIg!(x@OUf5bdiWjF2{~RzX@*tCd))4MBRU|M?Mwq>|3*l0R5iTnV|+$< z;BDPs{x|yjyZ7&)zt!<9_3Cqc#hRo&8?=Uphbb=33Lkq{VO&C-RXszjIz47p-Bee_cMSI)>@4&n0*LSoe!#9FTW|Kj<|6 zV33ar&wC$6z0XHrJ4#C81Kc4E-j7Bo{Zo#P*(-T=8I@>Q^@UNrvp#v>Ao~@T?kJE% z#_k5Z`Q@n2xlmq@H(0CA8)PT;s&$b^1f4zAm9FV4COO02)oRgYsrL*Y3KHdoAmh;6 ze<7IFS)=z0kSm9~TFvU?kf#ihdxW2Re+>v98tG~!c2<2@+d0~Vkhcf9yGKgzlOt9%I#bj2U~4rG5o)}P(fWiD zv1v@gD2;R^Q$>*uXjjk~P@c*@dgqjgxY=#ak=KM6E}(Cz)}6M8f{1e9no<=GwG1d{ zL^-`|P`I+JQ>jWvX~roAaxB+mpxR%EbL#r)LX=<46lQpTjGq5E%!Pd0xF*-_6at;r zTdLx$A$FtUs1fJ1YweEdYs(Si!*H`3q=uZN+~n)d{cpRdUY_X9#Tt7GTE?z;s$GXU z$Oa$W*7{(zGos^r=VaeWW*8!Yt?7U?10%CH=oKSpyPd9U%B^Q%PMjenFwU_Fp*(@g z6pO$EC{Lhr1?3NY2w2c@RAvhP3pnoZ-T^p%3OGDTIGU4iOpBQK-iznlNy@$thef#+ zd&+@)%F})|Xy9DuV4C?on2tns+*jBu8Gi~^{`8TByLMIX+O=vI{w`UBpA}cqHQ2jX7*{yffWd0Fvl?f&V=BJKXOk@?zv)yTytb;-yD_{|z| zX?gN+Ii3y;mugR&hl{oQRl|1eo;EyHyPp}#)$T`!CTjOvhBCE#@lcv}|6AJ8@l&T^>V=eld#BvN@|#*On%BzcZDAK`uVUiH$UHyn~(TCVxI_3 zkvozJ?Omv3Zm+t%7uKCu2Prk%5Q)?W8r?B8@=5B(tF9mXg!QHh-$q^C*}O?PnZqsk z_|A9oF1za5f-{H7jBg{Zo^d*P5_Can#Dl%VYo>as2peUVx?N)As81n9b1s8Tb1X+dYTSxR)GM?nYOBsg=^OAwOK+j~q;-*~d+{_@_w{qB zA*3i)7!DDI+@)T(i4_+iif)nDDkTc1=pOWJ%gXau#Y%5r9t#_yty{+%xJs`w#4TTdC*Z7&JrFb!jV z5`$CUH$A)(H9i_F6#7YO4%bBai9LJ;^4=X3o5Ik}dJhNTp%S4HO$Ky<3Ra|ZHi^cH z83GwpBcB+qNBLueS<7;3^~Ie37zyR-nwTc_f-0GVmc$a^OEH&mtVPD{Q!R?R6XKZ@8uIrkm<-xnaz< zumEe@*8RoTw!rJ=k24yd|ASEF_vTmm+}PI;BdOX4NjZtEd7i@g`&tF^h&93#pT)lW zaUw&_)2N4V8S3XTf>^ub!u1V55C_2}Xp3){KSztN){3a5kGvYb2P3<3Q1rVCL?6wg z?SB&^Gim!i(D4hxF=#CYXlqps$It`3P8xk1_zd-Itjl}C&$@}s(3nHy$1r4R6KT7>H%4zd}iioS}Bbx~h#4 z7vQ2fLvoSAZ~^lh;?F=8E5y5N9;n-~MCZ5$_Te@`UvI2G<2hqGGx^$lTggI?v2NQ^ z*oa@bRU)&8Wimq_G1uD)AMu#${6dRZFVbBp6@Ay%&&nJIWgeV>^=3DAC*Wk1G%L~%uuJq{1St` z_ztmBVy3UIWtOo?3&8E9;TGqqN)7J4gpt|cZ@-7kHW^^CJTvapV* zQjCt4ucMGo1f-K=q&;2Tm>~N|DWqKceRt>{Wn9HG*REy}h0g)*#!xoZ8<5 zH}bYnRY4|fSc4H36gEM~E!ibbroIR9xR|a!n&>ezMQO0!8s#kXy?t$Y-4P#AE(BDo zM_FO9nC5jgh1Mnp{*X9Wml)_vu(WR7O?A}2=f+widg2~mi)(MXb?th(3>myaY$5e` z!nc2?4gO?An1Z_-yvNrv9Agih0jI3GVCggRV@q5jl5u|HEtK1*uhH3z^-d{mYtM{!1Yp`#&jCasP3AUH-?1 z+45N5U%h%RP~q04s!`CCUj8ur3YV!aPZT(G_NZW09~n6-6hMx(xl+{Zp$`SK<3jsJ zmsS1S@CQPz-HHC<@%Ozq@*68yzP6HCm#ElWQMHb-XEy5Fb?Q?wU1zGwj?k8W8}38P zg^Aw_I!BScv(l=*HGC53a{FqeUmrf{P2tkj`5F|xVFhK=5_-sEbC|^Tfg0 zU+-XG*`V#c5RRhE@TikFs$Ot9z5HDGGvs_Vy2E~g^az=1SNuiq;TpnauTIUO-1sAK z<5*uO=3Ed%zT>_-!8MO8GxEM0@9RqC-OxC?ZtV3C14&JhT{rfcdoy5JyfIUKB;Iu+ z*Fdad!vtl9<_WSKkl>B!(sZN*cYin?czAvkws=^+t?&h9LXXjGnX=f_YiB*E*+rwU z_fl;|y1y%ppNsz3xx~pvL_{SUBOUnFMHKvI%A8bz7S_c@sbXrTD#kmcd3atOSCF4t zk*WSDUi>{cZc4(jAv~AP|0oL>T&NKlIUm}qlcnmzi%{x1tyCpSy*$FzLpslAA)f;p zMBf7%`~n*MX31QADN0R^i}j^|CO6(uPobL_SCCJkvBf7s$D9Fcw83XNU{#Bg{ahYi zjecgJAIr1W15VUw9T_i^oh-wL*P=`=%FLTeA@+})hBOI{2)y;R5gOf)uD*i14)+&v z*W>;I?greS!`+Dcvzo`Ns@B$cg++ zca^WChOzI~bkSneqZafE0h}0n>xsjRFQt@3jJ_bAg1&UMCjNwGq0WP3ErL@~uTD<* zJ@nBNzh3l#h9)etFQw-n8YFlMOU<(Ah!1=VpPh^y(kFfyb%GObk~0NL=i-nkj`2-% zcnEFm$1Gdb=fE#35Z^%5OB14hnsOo5zviF3b;HK%*52B9J@}BYf*}UT{Hc%^3SES3 zw-WA%jc~WD}rRZ}uxeJ^PCCY$MCzUDR;@7H9 zACdr5x%`z-3z#M)VcNxg0UbFLo)rqy&46hVVA6x4L_cG;Xe|cNqJ$Qu270n#Tl7P; zN85-G-Vrq@e@;GqJLu~fzzGln9h+EE`9-`5>+`htG*+b}?rf$Q$Nnb2E%bTqz(P)3 zx0jTg0*qV|_-O#VuSZv6nNG^n<<8cQK<8#w(U(lXGi;6ZirCr4wKz9(jUPvKdrg5T zMIIaQkt(0J47!*my|D;Dgm{A3e9S12N^F<_FjS>8xgC8@w*}3PH4+DEU%oyb34zIw9|M`XJnx-H>o?n3caoZq{gI!XPLI zW#J)kDv|ZtNUk0_6FqKv_iYhpOtvT90p<<-4ZV)gOZvbBvBg`zL{9|D? ztPq)M*@&;_TG)V&`F^V5i)(x$7~VkF4XtM&49>$$8~rKPC@g`Er4mzjAQWsdZ6M|J z&8$&h&oWpRnN#%S5v*IlxNq^28bp%-lT6X$2EL}Fn(4#Yq`uu+DY`2zhYnM{#MZqp zS!UsqFy8OO^Q-1<4+K>$0yXPX*+FPBfwd`6#Ti#o3L`{7kwIYw# zPE*%wHK^~B?)AmOeO=pevctwr=%V}agLuoxncP4$gJTb{8|wL#POG{Xd)wb5@S`_ zI)oEV{orJTbY((f0^?YuBZTq~$_wZ}$a93s7q;%An)|wTSEu#S(_D@vz!t`3>btC< zpuFhxZj2E4!3Z9XGS0jR>nBCM*a7Lj%3#k6`4~mwxBKRuxBt1cz1rrz8@uk@VU7<( z&D_?g4yRP6l?|R|)cGT~M_J6&*t{G}zR}^$wvi`L_OU31i^53Z4w_G-V+Tq`zy;WH z1VIFHdg~2v50q(XA|1!+n?MGYifCNhCyCb&8(?`)4D=^@4{wL|We?{8mM^j17<*xj zptp&IONb*+bkwZCWy6&zPEG2UjD3n$Vk+L{LNmw|^Pr8=wkLU6NV^6(J^Vwo_7+;3 zh*ML<(Rx{UzaqjuC%nGm15Oo%kC;FHO-+vFb&GL<)p5vbfR9gp)_L;YY?2UF~Go>warMaXy9PJ#p9Q)`=Rh%z(^Im6;$IS_D5Zu#8fN`7$m&^N96C(8*ru#Qhs;MQp6BWzY5x%2{K-ak0=iNtsR-d>N`9(OPZ&sP&|*^-M`!txFYW)~@xumN!#aty|?OTjEah zcs|Nwiq7bZ3{!HaOv?6IC0hH1qXUbnIS=IfL3TF;>zy}GfM5Yt7rA-x0X7UEt`;FY@vY5E*M z+jxH&$_cbAy`ZOA77{XdCn2|{G9(>m!&1F%)z(PP;uNGUOCH3Y#&oBtuf+8){hS{^ zk82XlUSo}E{0uI6`8T6)<-^7XQyWL)x#?x=j@91RWtUh;Iv2~6IcTmv(ut^;3Z2WQ z8WU81u)yY)2`j!`>aA#PGL>?&xwJrLOY>zzX`XB;&4GV-lAHqHEA_%rKKya`AE5P? zm|Z%`xmTGS`7TR^P5tvICo#$4eVyw;#@Bq;r+0}tC8Zo9@6bw;SASx+S{Mt>CNyY*D5@j zoIjGy&Z}hBc?HU^z?<*D z267$=&vRL{9QdMPw_r8-d|!AW@cengDfJ@i&IjH2{&2PHo9G_z35P{mx%!l8PX@G{ zinhC25Tzcv6Fd)61(jwpsf=O|Ev@sF(s^m7Q9OF=$p&~q6Wq4&dbE2i0XvKZcAIyd zQs52|yo*X`oJ*(ByUWG-{tnx$KD5QVrS`6Bo&4amN2?1?RfpP;zJJ;i)j6l`t)6sx zTj-9WkI7@znWuZQl2I6$hp;@HoI1~y>|)8RIiO$tEZHexm7|6mU7)$sm-XbSg4GJz53 zVCB69t%ph3KO)pp?CUOGO6*SQgr~z5+(wGF-)`qkTpB#BRQpSVj!(72H1%Md#yoBt zr8E9|gQ1a8*Fb`Ibx*3jzsn)@&e_vsC`*-%Wmef)cq5~VlK8@&MCF~8KL=CV|UWxTidD9JbzHt=|794zA0cS&9 z-MhLB1a>>S8L<5%KCqO*7;fa5MuR=mr-#olO}%2MRB}5)n**jmy3G^XAi-jEA0)c8 zNU3CLBk;5nVD~P~H$Yo?V8o1B*K=k-O8_nQ-(nNu;>UZL5&v^7V+Sv2G}$d^zi^0? zf}2}St?9uHiGkTgc0>llQs;So81>3om&sSSjVB zRF_XfWd9f@-W?JBM{1lN(Pxuv#SGtDv7~v1XG!B)>0$qZnM-9I|8S^d&M$6XD+OF< zT2lgRr73Mo@Oy3BU4i?z)k!VuPc&uTRwo74vlSCvCWlSEZp4IH*%g087%n6dZSm)g zx~+L`-KL|CtX20m?`QXudmH%{q1kP6rwffvUZ?hI9_;&sd%Z<~@lSD@CqtGs$kZ=e zf;<^{dUX<{c$3^Fw0cWji~1>jT@jyxm4*}k($7P5tR`m`c$N)Z2OI)+VGHnUg>;gF zdPcOjS!niNg!Ve)qMwes5*Vs#F7;G32F~%Y6!;~LPQ(cgw2ry}NwfC*^BC1yQ{rz% z69adQ>d^PZ_!rSJ4FBJH{RuR$tI_Mt(BlJ5I@JJs*`souztmHQxjY_tC`w20{{lbt z%ie^Rgt$SO+aK<4SK5_{%Gg*$=~#%4hY8e4mewl#dRv2mvDJ8Xn7(6+59d~Kv4bG>5l>@R%3T$zk=D#E2RCuZ@G4L7Y zqS>F6p3sPpfrhodi49 z)L#L@>BF{8<3^YCE7!#K37skGZwCMI3FQU7RfJ5}dukgPelJw zJEbF+WLedUSnbvfrgTLlxW!^x_BONCYsSebJ5J=-!MPg0v;A4rYc>1m2i^~`rq{p< zS0Ry~g<8@bwocu~Gs02F#P*e|*g4g8R$iP_E$(U3`KCw{{JQ{)7J`M~$IWh9*0NmVBg-{D z@(}FW28};70FK3|8gJPlZ1>)Vyo1Qot6#yA_6s>6-08jDl@}dbJ%2h&5E~o{ z+@Xz87kVq83t5AR{0{~~p`dT^KsTt!pNj9RFqW3Cg*;QbQEsH3$o5{BuJl%IKeCqI zB;V-0SxEb^L9+T+PNST8-AIPz@fD9hK6}-w#gF6f`dc3-ZT%O(41+QR1*xq62Gs!SD+?DZiKupFEwhyN1mRg)8EJz10{e*(IsK#SR%> zIY&*)mr|>LY>nHSr^^&#dta%sp;zKL`<2a;k{k1 z*c@(Pnpwvbg=zd;nNX572HW08r&4W$;U`v*I~euhp)Sx6w}pY9W6;jJxs7oR6HK$t zk?HA=PA;iLz5C=jh;+26AH%QL(ZDt9QJQNUM)@y+E9=&k=2IDahz)sEx1qfJM{-AV z+ZH!_%IqemGHjl>!{+X2ylcy_V?V}jbMGfP9{M~moj$wVXYl+*VGhbD%{F)2mQ$v& z7L~@fEiN~GI)(O?#!y>FkmGHR8!FPVLNAR)yd8I1KoxDEij^qQal3V^n_Zdgwc~ac zv4%^Ja~Cds-L>FS>@E)8HD_K0quPgF!#F7>aB7BaCBep5lH(o*hOdv#*{mzek;g`# zDKpK(m=&gxDVr?o%N(+ytWYM(OvP9>O+M^B48HupAfvKF^OEZ=Cb!-d4!|yhm>~KK zD<4+bTNbbB6w{jSC00*$<0nxaaA{I}o2lLraCI~oq3sh+X?PcU{&4hRVZS#OW2_%c zS1O>%q(sKnvQ73Dgt1f8bsGn)RgDH%-;J8}{rUjDzyle_u-6zEgjKQ)dMu~y$cW=a zOqCfslo7kP9&!!?IcIKUikv6)L% z|B!&)6MI{(CSwPh0tI@k1M`s8WXfib$ zyE7?XTT4%Z=pa*=olbd;AbOizypkAr0@6-uWOU%0AqT9*#>UZs)L}Y;Dvchi8ht&Z z1JR)@yrcGJyY!M{jamwR(6V{os*sp(Ygk^ zPECX4{)&8t`xx9hL;X7O>u9LS=zRWNC#)Mf&<7jQD?)R?Ve<%$LNlY?=}x^`>x0Vh z9q+P;I5lww#o~PM-4y5E(-v-Y;Kzyk(2@zbHbA1cBqjQj!du>jt_<~+MEdW3E9mQ9 zg-!KQ(9-C@-v_s7<#RxflTbbl^pYa?3NL$?qx_SJu~lS3TV}MCf*#5d*UzXqF%dL9 z5bYL@c-OfejwZVA?PB0f)!VoGPUxocOaNZPLE@BS^8GRq$jEa*Vq*A7`mLvDx!XlWuy2hiRCwFSz4B zcTBT0JK0Wad-mS6c37p_t!n9D`cswzOec2pgc-dR50cqBxssm@zHraw5f<1-*_}nQ16*sNvOqh5Zbxr*=*@C~RgXja zHbvM2t&qMELkcNf58Hs+Qzsp&9_srwS~-Ak+ug`#{mdHpD!N=yqpY+9TqsM14-cM` zPopM#y86U$RlXTky-vsS^I zA=%8OnwM+)+R=f1@d8c>ip}?6j$JOX(FHAgLWR9uR_kD{Gc`|_b_FIjQf3bE<$V-7FT#}$2xe7$2bmRboJn| zW7eQC8;}XnE2;1?0#on{YzLdhi?-_(n%0+n6mf#DFpZ)s*ie^`6*OYh-Y{ikXVocv_k$vLRGa&#o#<}(@9qO$#=MYILA6ev^W@0WN>ZO@ zo+7_+@_GA42NdYbY9#Gx-Ba3k_0+Z)V7j-u25KW-RN;JY6V}Uis3TsRXcsG^Z$qbz0 zm|>8m<~K~wWY91Ev0TL*;=PcFwx67osU>41#W^5FxX9S;5|Whs=QMaj;eRPwO_bWw)KC7Rc-+48G!*-NzK}H|zt} zZA0w*cBA}WRFBn6`~kB~HVE#5YtB;n z;M}@Lv>1EA&8Ty1gLxz6;%6Zbycn^b^Ha0<{v&Z7j?6zVrw=&?B4j4` z!c4PVt7Iv4SlwRG=-i>xQ8L>jlj(E$LWPmKh-H-p>zw-D4dBGzeq7Jr~~M9xskdA)R?mro*_^1nT-NKDhA>OY<)({JSwKQ0|2RjX`{qv$U& zc*%J+cA>`a#%pXoRQ=iMDcW0{C_-!%Q7(oLo>e!Z)Ndker@Lv2b7o`)q@MZ_qrqS@ z843t?Eah;LkLvMe^@ydwR8U|oU{lizh>kNU7S5m;Ih|sKgiWQ8&xV+psWPQei%cBb zNG5NCtbQFVM)dosTR+CvML+g+@9at?Cf-o~rsDfR7WBW|Iy!D|fTo ztizfzA>NIY8?ZZ%4&c166H)0%T{=wHqYfUPyM@oAb}}WxVtk<%@Y$z(L&m4Tl@ZBH zoF9NA1==8$0fKk2y9YzT;IYuLAk)gURJB&M=n>z>sM5%9qf`Pg!Q*A)-hh0aiql?H z-XH6QfyKnvW9RXW*nuI$`4D`WbAs#su3RT`DrCkfX}-W^zzIej=5-=uU_|P`qB9n^ zQ72SDBd&t9r1J%Vd$aoM#NVP!cT1O!&Pd>DLH9I)ML!UN#S@W=^}Hpd!&z2DsNwvy z4%CquScx@3<$}tdrCvR_{M{%^h1LTpe83BkDnqruUu!Es`gw#-7Z)}!9EWXqx8tn*qn_Lbv_ z#;O>gnUx4Bu+ZwCqV@GOy4U$N)>vyRi#R7e_j#1IXAji#-cTKWTSH;|o(S~^6nvRC zozL-32F8C*p+-!}B;f(&RPMr=8rbe9p zdR}N4&r4u0`UJg`cGjq$1@-+082h^lLb2!)qLm^C)M+`y}MBNIO=8uIq3qL z16tClRTLkszpj1}V;RM~r1Aq^I>VTkzPpoiV-L}}qPf%}r)o2`6xg6%fkWE7+5?q6 zshBAj>VM|l)pd80@7;~appU$FYq+Fdnf|5JXJ~C+i8H2cP1GKjp+1DK7Mrj(4TR(aD1jJg6;xrzO zYoT8PIVzYTBOFEcN|QJPeu zkNQuUR%XDbcKRc~d4{FWHp6_{ffEphK3kdYv?EjiZ=RVuiI|_joCnqqlziRz!1}_b z3pPBkenaym?kD}Pm=YNYa*1aH%@2JYd|>^P{^yz#X6mm=WL)BTu5q}8mV03RE9OMT zD=7I~$yJ*mQPd{zK9wfpGQrOzv7$ApG7T> zXw>RB8zr2sJ=8>XHtJip;z|Mj4Dfm)egHG%jZt6z3!p!`Vy=LcZ*agX(oF4j&~+OL z=LKiFW?34n?mN4BD=f_ucnf3?mb>Zf=)m)_ab9(WuA%DEPO#C3D5kqF4$-(JejaQ5pK>|U-x~W zhICMaAAOHe!-WEkPp;7TIDzerLidfvTg}{;kpAX?`%u34*C?4aRi3F)WV!Sb$6PD% zRq&x4%4a&$)qSJf)?sJ~hqjzBdtq_qHg#=D*xhW$ZDLzX1+1+tW@VOE*C{~{x{KDO zUKca`T%}UHkglCPx3%#o>`tkG&v_0vsRF)w^*y{8lX!uqgpv+eUTi(kE4VS+DwQ)d z-2!7Z;JyCbNY`PcpGDVdJ7lnldi9O)?pJDfs}0};af8q>2GcR@1)oAs{{$59F(9HX z#RvYJ7@w~d!n;v?ApxtEwnIHSDd*b3se*IuJUsFST6itWCwFBNP6Sb{hWff$oZzCe zn!5usPP@>A{lsEhor5UyRr%@amvL6J%V@K!&Fc0MYOA3Uhw*_OgVgSjev);i_r?bv z9NY>jn+ZD&BXNjK%aqHZOOEkns#%sLHA_SgIc~>^)z{z;X6ylK$8F@K10km6*k-0Q zH4@kyKx6~tW>EHjVK>mr`QE8Qy1JOgGHV*l?ijUXK|hhQp!?>@*~wkb*TYFi?U0t5 znNoa(gulI_6z2ri!tOENk6p4koYL(T>FRdP8{HY8ZPIz7d|t0hFyrzel@0aqr6sz9 zUCiEezSlpQw_Th*cgz~+hLnGY{8e}Wa1D=AYvsvSD<^u=T{(e@LhD{qrVo5A3la&n zqX#))3tBec7i^vOyTf^kE7TxW1_ZwqXRmFZSm3z7O-oeVyw|70x_iFTff{ z)NF%4z+P;f%i&AVj~}LT3C?G8$9=Cyzw2>Mvd7=h9*b$8?*t|W+0E{0IH}ftU$9zf zkmiI~|4?9l(`)9H>`HPbBhM2r%yVzkZ1{PeVWd4s?2f@k!TJ1&e6rUHTNqunJ-&tC8^a3` zX73xmwNZBS$<{!@j>Ar#b%`DuaCc#HB==w>_}>A}Veh`6ZLUJz3HIiu0)LeOvez$` z@eLB$n~w7#__EB!>|A#)ta3>#{VlQ{RxBfCEeJb|^*{6^UCl|PJZ7GJLDl6q-}CUp z4?jk@&69an(@qTX4&l!5m7vLqqlSIy92; zl!T53#O8#Ham4~kYh{pdM}u?E)$<8AhJS{7e~pi|Ifwf&O54<-&3a*N_yFF$pL}-# z_qO(q_P0h@9ey3}ejhjNwb_}#g<5}*kN;(VvEZk^mp`HH8Zj0V>aP@P!~LlLEb7C? z9JolU|F?fpUuiuGm@8Wjga(6WwEoSgUo9*M$58*CBy1ORJEPU+m=Io! zSf?BzD_o0K=c84tEcyw~9Nf!sK8|1ICZkl(@jk<)t8a{Sw$}5& zlPd%oWrL*LAxjbinK&9K2_9$-V?NWAW8`p?CD*#~aOkaI3t5@l*Se%7tIeI?))F`z z#`n+ue)^A!u9LJgPmi5JAnM8CFaIgWIP$5Y`c2@j3GSHJ;hLa)zn?>){@`b=_Ljf2 zme!NKGqkewT*~v_1(=bBkxv0<7NERHgHnkcLkUV_o5G6!yBy=1XYb9R(r*Uxn zQ?2Q)(t6PGP(T@LEpWKf5eir_>ZX4x?QFI|chuR#8@_`nUEMRZ6I${=qUVn_F)%5< z8L+Ux>0S5&O1e5_WCHfyP++bG$IbuL@(nE|EwG_(ScEzjz#kB{dUF6j8F9ANLzf$` zx8htqgS`Z&3+P->SW4UKS~$L}ZGx-5es5H#R4VyO5!#|s+|9yz?*(YgScJ99)0A(}#W zO3~JFCPyvsZech&8T~TT*=^Jkr>7EC19(*nqB(eDyWxNnw(%*D|I#2Oo{dr)Is^Zq zIe5ZTg)!~ifG;HmQj|f9{!nH}CF<9zC~yujd!f_59fPdftSdH%8A0jZqz)pL3X)Y!3#;v0zfa z!VXUH|McKb{#%c`(c_tj0X;5nu1A2{wFP;NS(1*-6%?=i}qajtIz`lf!A z4p6QMmd7kmzqxT|@QvUT0ZPf>D#>{_sZHn;-wajf44#c@nlH*hA3JZJX)oF6{hdfO z**DG+k#w2n8_r?-Z-eL0^DDr1Pc$IB7&X&<0c}pU8}2_J(+iVh{Wf;szxDPWY+?U_ z-X4m6-94Gx4Vi`@qRWnNUZkrBhfFh!#yms*jEP)t!H4)xERDE-4FBJYL2kkKMN+x! zB-Rb3M!5sN+f3M>P2AVfOu&0EhDcMH^IJ-A<_3DX8NS9MNVgYZ<$f5wQcz&~GB?zP zm|%aXD%c@muWzSxe#fBMS=v`C1oD3$P1V--cV+bL>B^_z7n!g^r=5EjM*V)QwhqbA zuAffZxE2`tOJ64Ut7y7b%D$Ot{8C#7%(ih3U{Vjknm{S=#@K`BaR8hE1@!d)MY<1F@O8~|Nps?b9v8uf1mexpXd8L4?M4MyFhhV=~Is{qKAi+?Lb4*Uc;^&y#i|p zl5bG9Stwt1Y8Kj%4cSRP=0=uW4<*Lt@)~%iYET~k=&~9pAfF-8tWhaK<6>2h_D-d_z`yZSpq!9%tW&MM@S z#%J%xfdm`&&O!M=56FA?)eZ&rtsU|Hpc)pgnU*Tw6-G4>9E`63yVt);r@NrSo-XCv z)vzY4&DZ7sHTY-$PqsbOlGC-mP~Y)5_>lv)PtQhWuRqf;KGRIf-U8p%CKh{C9zD;L z(cE~M%a(k{f}H;tT6A~EMeN`@=vgR+Gao0wT(fRO2 zkRxf^Gw@8$>l|780=Fz1a2)MxNR#Qu|#4tapjA+xB^wqU9sJ z|Im!8>Nfooj>10;&bAxi&w`X*;Ad2kwtk=~lrq{y3xvig=(@opolA1(`}%;NelyAT zLINGuESf1Yy`0ZdM0aWd{vki~DSA0zh}6+jkP+y`H+lBJjH;Tpj-ms%-qc8dPx&){ z3Z5xOV2PX&J&0Iee*}eo5b^_3iruzxhW!Cx*nw>U%_*eoXYMf#J*nlE&phX{-@n=E zJ+hfK`a56mRD$k#TEG0WCke9OK1rTJ!f3Bc{g|;vjH^^ z%aPpj{IJumE}sEAW@<&Pj}|53nZFaOSzIZVm>Lt zmskGzD^QiX!BeEB^uf#Y59%pN3+kDj?2EM*%iGPO;CS8S} zLUOPhTFx3+BOhO@HIJR5&#AxN_mVqN`y0`#hQsG0p5>WC45a`bzr*jNb)1adoyh!_ z9Wj+yCAp@)JJGX~3G-GKdcGugU*A^Tf0g*Q74b(w&s>9DZ`m_Q=BG`qjegAH_k8fC z4E{DFdc));E8_T2jf=IPYkQ(i#~N#H-#UA1DSLaMx9G~6k~w|wC^)N)omUW6F31;E z3(7<_eys~~PN|E)u|dOt7<36O=0Y}3KrBaXTqFK6rywJA1gtLtKYZul6+~G?<*=im zX>qX}9(N~WmIQs9jQtb8hM{Zgx(>})X7Vx>WnvC+IuAE*@IGF6s##l{+mRNyrDH|l z;g0UWsg99Ab|*7H_N5oAOd8CLF65XNCZ;IxKeYFELQe?eb1${mCY&CU{%q|0@Tp%% z=FV8Awm(xeOA^|QZSa8=zMrFTu#D(;5?q`04oYJn=?w2IOb#;AWbE@vJjL4L8euOB zIttHe_RX`uhBV}zaFspf=fo<@uA#Y(m7o{k`GbRW1*k6#&q|I$ZMouPE$LW?SsK>D zp2oVd@Gu20Y3G78O7Dhfp~b3|we!0ftYRwp zWy6$@(e73}&t9QFNMq5FM>Nr=vDZ=mqIuB4!o!zi0;~3ESQb#cisC^sZ&ajZ3NEFI z1Q?8AKXUq1R5>EtM?eXaQUi1xf(PrkEHPQdRKY(Cq~u8xv)EtI zW6OpNoq^_@uBZfNauRxDe1rX*h4xbceGol)XW@?w>CHx@R$$J|Pv{G|l9GZFv#F%4 z0A9uMJPr7#bm-$Vz|&*_f0Zp|qqjT2-R#1dWH{{t158od)d0Xl*l&cdG(e`@@t z;|~}=NK{YE8N1eBGTZ*A!R&dn;KPktrK&}pg!$tsl9HU#g7|%$!s55(iC3UL?@wmW z$jzORJA?ioSMoK%m{<8}M2K_ArHQ4`Q=XlURpB{2%|me+1U^XJ zk(2Z-#!<@VSjh;feI=JlOZ8GJax;9WCu1i-;Z0#KpfCp605n`WAb@olkfrX#+Ds1{gCWQ@3}>CL@2?7i+tP@Qvw;aXTM3-LZoJ$F4{63Ed2fU6YX;FZ0 zf^CX-SQ82=u-kxkk13?o8~b1Y{-a=l9LdhPp~_2hl% ze{wyOCB;^y_h;~pbtj?sSGjmPhk0_^&ZhMVdz9)rAsjHhMDiH9hur1gU0}kpgy1|ew}RGoP5qwg_-Y>nP$Is65<;|!7~ zf~N+p$N^^y4+dk*0K;jb+Y_Xu4Ble4NYE}52D~ffkr@pnH%|BRSA0AAHtsK>o%nbkBPZpKPY1Pl? zB5f7Y4kE2yPOBamo~@`H9;_(RMF(UJyMlWPHTLhY?a)FBf6=d=uR=<)tsjWg;h-6E zwEYn(e^4WjeXxvrW3nqkC7IO!0Soyg<gWoy41G~YN`>xy zhlbM@hK+7Y4Y_uo#(bKgmOqVb6EWGEOx+#+r@A^il>1Vr4N`nb=FyH*jRIwUIZ4kY zTszf7bInxx0WS{S9ApiYR-YVG+0&%)*wKky(8A~-%g9?Y`;Y0C*~86jmsg55oyzE6{0^ynh{B0Ik+xX~!^GQT#uY<+1P_T(;n2Mogr>|_PH1sPFn`QZkI~9N-8hfJCbMFJ8Z6E0&E#$;?P@f zPBL>pfhJNJ?&NpKTpv5u&cpf(9zch)>;zw<4P@cWu#EQ&Q@=Lwpae>K1NixL)Zoo< z2KOUC=`*4qj2??L@tb5`@m+Y%gH#_LNE6=0{Y!E^8k;!|vrGpjM&efFtO~1$_A&=203SUIhqrXb-l-ylpAA^;{ivI|Xq?urk zg7Pc(4$7k&^y75+Ly?{gQ+0U~Wn_mh)k4XIkhg@q8L3WEN!%{Cn>@z$0y!viWOU@% zGsv%ukx*Ck(Nb{cs~6GyW}s%FMj&?DwUtTe53Z32`FM&)yvNzn(tMeI-~?!(xxEjZ zvw#(a7|MxaX&^{~0h=a#>s&SR&6wi&XG*us)#4sfSNU{I`yoTp!*`HD`VPj5%#VY& z3Bl505=ixoXgCfX;$_~5o{o%SUPDh>#rUiJ)joft-^aF(7E@gwEKQpkr@w<*Do5+~ z9O9PIeNym+8bjEzDFuIG+)xHf=>ysTYtMm|%b}Va#!#b$+*K2O6qd%H!NV4%ZSV5$ zKpveD-5;maN_ply|CVD3?z`e0pab-TQ8O;1szB|};LL^Ev@@`h9OH~;bV#N z%aDNp!KH=FY6iG_9qu@n*%=D-cTnF)lnSMz1q>vvO7V5>CCIolqD$cM4ktc%OoF-L2gd=nQl`#b@@AturB8NyV0+_QOih z2dylx{3-A?Kl}!7_89Odx1H*B?6rMIezpgg#2@o}Y^zQ|KL?I;ALQh3{h&iD+%b3=(Kv#nYIT_LR7!IZbLxvMI>VG_}9^l;Y4~y&Hhv{fg%HYG99D7o? z;w>L|q5DKuqQ4DvpX&CjXP%*Vf(xe+(3=*N1fM|?MP+($eF+z-lyRyQG1D7S4G1Vh zhcfoV%Nmt}VIS?Hd>K=ILzw2aOw!UkomruR;G=5Ru!qa_Nk3eF3Jn zOJwAxQY2nto-G!d3s2r$>nzM!j5tO65zS^?VI&;oBGDggb)L(fv5(nJCGEA4YTs0w zH86cK>`0?(?01xNT~6hmJ8y6d7akpKfE2?}nOqDlRZnuU!p`nf^e7hV2b9>8pGNw* z;Va<-o$O8Pxq`nUSY=u4X6!jj*?r_;X1}7xFrW`K2hqPSP4t0LhHMX)^Zy8BTY#g} zA3@|A@@QpMLmSy!Y1cijiH_lv#A3faJ*tjm_WHIB>&)nxj035Ak>af?NcuVs#?8^j($d1 zCD-DeF*?pEZvWCa`8!ZT7mwW;zu*%BEf;w0LCC>6E;yL|!9tdMrxtxJw{m}>N-pbc zoFN-f&ah@7dQZJ8B$uI)%Xk50_`4OHkM-98KhNqg7yO;{nU$l+F@GnW6~`RfgTX?k z;}~s85o>(CmQ3~J{z8ph#GPh?SQX{?5AT@ZK9)flB7nf1!cg>sy7+?^JL-! zg)y_2EMl58;1;TU7lU4(x$9-0t1Au~`{@VKA*O_${Ha`)TKdciE5XgGjJsM!SQb}5 zaqMbgItV;ke0wD@yVVC(169D%-Y-kkG~6%VH*hb#A6)secj0yB=BmIVJ9mS3H*7t& z6RzB@exB^ltYjWeE|yn<9cyB0H55+G-qv`}`_!@}{-DJ-A2_Sv`&28Ygv>zOzuVIa z8y9AmI=U?hAC}lnBv5)_vSdbc$|UeFFJf^EPeZWRsv zO8-rML=zQZ6}N7;G9zrYU%Hq#aj#gw*2t4eySC;c4f-v7ESbC zdhQBkLOl?(&AxHN=M`6IWG_2-VRULVd=7Y0s zn3fV4w%r;Os@uVoV+(s*04Xip-_BJhC7|EIJUNwSaU^X}?qlsynW$#* z?WC9#9UX+ew{>_D*B}EtY#!#o z9dUJZX(FYQXK+%ZQtYL$rcy^2Lqbe~RKr2-_0prOCMdE_m%JW(`8XnRTDArcW!e9= zJL@nLln1eMBGs2k75O^+IbV#uz=XZP@XcP}w(Gk#1d+<6j_yI-STPZMHz5IIuMj`v z!FL9$eDE*dWVZh$0yzj#*|k8SyHTHyu`-oNeJoK0t!33=H>9PBm>W;yh+OBk9|bRE zM!GM6%f238f_pefzk}CJ`MVbq*WjIFNs(e|A*kYuiXJyjHc~Z~m z{+o!E;kn$)hv_@P^OW~fj4cRqDWF2HhD;}Avrf&CKq0m<&?LC++g2P8uAdz)c+6HLs@`tn4F&mFdpgJv8Ax@LOPQsLu%c8g zWt9DjWiS`#qV(6Wj=`azo{8AsC!de73&vmx@LYuMBDo?)Z-Pn~8ti=mF0lW>zhjns zj)<}9=>JZT1^K97pUd~4)(5%1cNjf=2j3M@N6$@U$}8L#On;um97ew;=r>_}gBXDJ z5h@LNh^{aN*A$_>1kPp~jRBMiT&p`WtQiL-OT^w9gGZfHH-T#WFrqDG;f0(nl@YX? zjo82ZozTVa$v#LW0~rHqwC6r>K6L&@CYMLDNM0`r@RVWJ%TOfSif)KZMe`C4?AY4Uibp*pqyr9H*|s zmIuo-M%-nac8VebmV;~6gJNfe8LUG(yVIuDdt@R(*HZv%<+K4f{9-$mx>G58BW8PY zX!jwsmSn-YL~)QEQ1z;#|3vT6wSRo##0Lg$|zZtI4VT70R@7DggG-7YZ#{#o6dCCL?{wfLn_>^mL+3{)a)6c^J4cWC`!X^ z@1By8C1TdmZuAAU>7%oq!1E0||K?NA&HnYEhu251PL$^xmL6~KZqH`(YXUY~__v^0 z45x;Vm#q@}WL1FCY(7I4REq=o>V3z(-QKH;ve{n^=GO%C`)u>hQhKI7umVv>XR&ED zkJ(J&VRi8tHT-o_S)ID~`TQeZpI6VS53n^nQW3;jqO{`Z7~V#IGe&xe`TDTB_lUQ{ zt7XCebQ@3$7Km?(Rk`%sP~*$rGq_M1R?kN(H3u1c_N~@J-=G0{Om*~;F||wwNU<+y zFhS3bb%mLUJyad-LJ65tT0gaC2?X`sn&)ZhopR~hw=lavlXhnwEXEk6fhMVnKLKU(VTaIAZU9=B5!PBzh+Pdx3cIfj>lM#^ zf$2sEo~z7R(9iqe4<;K=nP54zoZ14akxFTQXl$V@V2NiqX7Fi<|3|nt!P88uMbrtO zqOCysBPq%InTtHK$zBpD1zPq4wd%|{qDADk;qKKwwRERaeP&UZes6SIGSAS_G1N_Uy!Zbue-URO-&x7l&dsn68=>yCJx^=a_LMp(&dI9v+(Q5pW` z;;)+M&6=~iBDKUCRZ;;g+gBSIDOfZz*jBqw@S?6fX34z{`mbkbV_m3;MCXi$whn8o zVl!-hd>X~+d-}YXv$rNfTN!oH86Re63t!*oL$B518Byn+;k*rqmNo;t9F4uWzHgYM zMVBQu@g8T$ZE+^KdIw{nV;F+{(6lqKVuLp}R=SfXb3TbU`J4L+(CQN8W!1piQ}$D) z#r|PNFGAC6wAV4E&X$zMG!HAPK)jW=_1#pJCXwjK*jgU8_H!uCjQZEl=C19tGHHlB z;W@0r_c!6sk2Cc?czh($!7(adQHF2g7Rz<~XwvBpHCXd(j$^`7-sZ4c7{nY(udEid z)2?*T8qY;9zuru}45!mQ+f!L5xQ5lQXBo<#6_!BqJ7Hm*i&rqFS#t`UsL!ka{vRyR zylZC{cpxhP4hM1wH>vnoWSpQUURno_7i1an_{xc-fcqhGsc1&@hcNa)C%buw`T>v6AV;x*mKR z$$`&YAAI0aU%0tQ^B#11IIxxy1tBwtbqi>R(vb3zTjwX%m|W6{$kz_7=NL3rUxAW# zgW@X0FCAZEKGew=o+zI7LbCjsgBOM(AH#crW$CBzt9?vZCj=X`d7t1pK?DH9;SV5} ze#2;~IwC|U)f0RTA3EN!(6|4@TZa3)!^#GPx6yvf(qqEA`0l~TS@|wdABg+~5^sRn z8WNU(;E((j&jZ5t$Y0@U+W?PnjPMt%{D8A1az^gIu>2hIZ($>7eKPjH$v5Pjv@O(| zO)~az@+i_>jyV~w7RZ=a>o_;%&xrAt zh@nZaCr~Rtt1%XN&&6QJBqn`L>KSJmjW}Ht83C{1HG{Qu2i8aiV?2`UV&<{ozvEw| zFHWmTz0nqrMzX=fv*8P=uS^9sPr{2e&0lGXM;h@I>5*6J8EYJk2=D=2E|StG_>3CH zrBmxNS<&f+`~m46xY=;S(q`f!YJ#UB)EZAYZ*w>A!>LLEwC1&Asb?=kH*i5PI-P>k z+2?E&%y#&xED@I7BO3)@(8n;1W=5#o{M0%9}8 zZiVfLuo9zvovUR7Z*w)&6IXwIIqd0m;Q{=s7H?m%9-hn6tZwgt8rYv3D?Jy0A27i7 zcE%)Q>~GLYS9`vS^nv$hfhg^R=7`$$&YWCza~rk2ucUO{f|CdK@2zbvop(eRfHaB$ z1%*BswkRa}oA?d<8)bAY&cI$(0ormMG~(;ThY_iq(y+J2XjtjU(Y-wEoV?3n3fcN)~zY}SZ(<NFbr%Qtlzjfwc?CwPBi{E3b~?{{ z@NcddKpPF{@60fdtJS!|Ea18{&=OQ=-l|1^FeVfAw*cf;ndi7hCmz(OP6y$igwFJS zoG6pA;>l;RugmSBZ9$t1XwQvkBc+`#{4J#VJ5RN|+pA?HEyKlPFC@&M5atzH&wmMT z3q|0B;=m=+H%}%^GM8a=)CoohDO)8djNHl~J0Ng3Q)?$?zCxVcXXVmxj<{Z+l64p8 zdX+$>>(pyn4$okAXF~3rTN`Be2?j^43nxaPa;C$xxD7F>fRhC6iNzYg2WaHfzz4x+ zJnfluYAHJCSx&hWLYx>s@)g?kS*mU1^OR3?x*u%VaId@{kS~e#s;M>_jQ-2o$)b!Z z_=H;ISX8U^ygz%I^HJeD*e?-X4{zor%H?*J({BYDAHeJwp2maoFbtXGn6dC&#}zw< zLA7Cv5l0)aQW#F~%t0L)$>}iwkzkZtqC!gyL(}E9fHKm!W0)@tu$@*feUmA_!RSWy zc%u+A3ndm?*h_-o{5MYZ$fPv2Bk5hv^2Y6=t!a3lm}Z;8VAfU1Udu?SRlWH?33OD>5&%A z#uL{2YVnAs!0O1<*RU8D;FKa8#jUFBM+za6MUMLDXYey_h1X)v zQ|@&Dn>E5{Ye3Xw$xbGC);Sf5bK$-L)EW-HWSI*6>Mw{O^kNZh!vK6gYk`iSU#Nih z$h7ZL|148IUvcuazE|+o9iu;+^ZwwR`Q+T3l5)EVzM(9z9Qsu@NAU^q@{e1{?kVr@dWYDOu2Zw@te1}m*3XoN%dxElQw&nUqTXjmLI_r zW($y!JCDlPBG2;bEl7hW{++g+TA+=PrWI-M6|>{$_S6%9t7o}yyJtCPVcSO3Yjtax z5jtLo9tr-tZCE{w*+t*Mi)5yQj@i^3D@M&Qq%zGx4GX@hA@1cGX5)!vsJgIohu)sg zp4xunj{Vzb0b86~bI;0-?GM1yyWuRU$P~5kqJX#qC%b`}yHv}8BJ5*l!M^|}i9e&> zZoAb{Xeu8+Pv?26MyX#q-%XhBSkc~Y&3^5E@;K~^S&z+2+hOxCz;(0OX%*mClH5&w zPh+kMn3;?bJ|ux*`~Uad)qRKY-Hn%hM=0`8p2_2>8J=}%E?a@jp)))tKi7TpoJ>9c zRDLe^u)HGB8l`GM9O&lr71h-FZo?Tw6&N{Vzhe1I-py_m8zOMcxa~9^IvQGzo_T8kAKU}CZ zA)=Z@2<5L^H~r9aXKRX_ZcT@dhb72w5#kShJBN@XgdBdCbmosB2fAhok?IIEn@kgC z)z+hJsaaLsgqepY{;jsHQ!@`wm}aDDKRWd!r4L1#Hrv!!4CWST!@OHZV1p#I5_bQmNO!&m}rvNs&H! z6udp9WlWI@v`ioUHSYg!jW5;4Fr<~gdhVOAwDMO^;vRb6X6SuUSGHa6v9|LVRhm8% ztKuO!JzdqfmsiCeJfUlR2HyIG*QPWnZStU#`Ow zTH8xKdTBgpUtZR`-;BtZhnmjFk#EuB->cuxoHbv0?p^pA_hF_znlRb_QAlUgSF$udwYq1) zGbP;tDY_ARvPmEPaKdmn@FXEMn4ff>CWf+5I%FJn&Qc2RoWfPsE14d}BAh4|EfASS z^TZXBj7aiHut*a8p$=)c)ZuCgwMZ?Y&C=#jv((JB2rbOxy)8`fyq5kBbEkIm#m++> zS7(3o#b$1cu!T7gKxBGti>1labf{@@%b}M3&IBkEP0K7=D@xtKu|L4}3=?vIwwX#u zFLsav`KIcc{SaN9rEvM!Z1O@9;!_C)?W_@x#Y834Rt~fQIvR zeG-xBz>>S$VaK-6C6+F{`z$HHQ@ozD-tkmBUt`ECHR=(&U2E@awrNJRYqOTEaOZKA zkKL|o>#Dg2C}(}NW5Q8*e2{QziSkk9dBCo=ttmJ@Sf0lhufP3a+cl@SN?qGX%?Zu< znI{X@&dyQiWG)fAFS}bLuDI-Oo|tyo-CXem;@DpLu2}58>~4;@;9Fqw>k1>>;WNm3rw1GFwFtw)ZmSRbU=h73=J zWRh*F6sPF#$pWQR?=8l!q4==^y(bwvCTolDYQp+Fd{i!1nJO3O&(wG)3g}6NT7}Tq^BHz0{7lafo#_4CFezIo zmspPy5pBn7_B<=!Hvuzz!E4Pkdp@LX1Re1l-t1rm)8F`O7~7)J=NkXn_;ZYB9CYL& zPi0Lw#g|!VOr5g7uY}C(x}UfFv*o_lpSLb-HQVoN=Bn(?7q`=On22?Q*75O=ThH;k z8WFi@3ul2OJN_4*$M1vjwn3Bz~w( zXjYp(E0Vwu{yOezXV4!+{AbIrcx#mv@);s7Y`qq|$@;08uImIY)>3M(~Kec8h9_x)!N_s1n(@Q z?{1Di1_?jCx+neb~Yk>DbC(el1UdZYy}X&7p$BPMRydo4mU3%o=Q(v`ucS!yvrRz#vVj&H)Q!7Y=f z#_}0>2Ch$j(0b3RD?PZH2*H~xmF#L^PqAeTGsy^)NwjI~2Ut4{q<|Wc+eyryhgF=g z<(VyWw_yHY?u?7yb*N2HRwYQ8)@7tbU-QyM=;-(9zo zN;{jw*C59b&D8xuEIp@nlaiJutUOnlTZ#k zWCJm*wb!?=wIpJXCO>T9(1%(v4>OOk+uC!M2Jrm1$+A`f&(jdk-Hn-oe3DtX;&F9l z^6u7WTQA;AC2jD|>Lo>qSpHbQe2VJZ=jPOz?}y-B(kaFTS_!(FQBR`J0#gEw0NSwuEjv1zj8!LNbpq?xKPEf4p>Z<|6C zS`Z+_vo}JF#uh4pOvLgKU7b>*%^ z631h|!^$)qJ`AZKJ;gyYhjT80z33~eEZ$e@xFrlM)MR9pd5QQd$N!-1*TgL-MJIk8 zYa6q8fkq2+lyV{h!ym`(&;e{r)I<)h>~B{f7kJ4ZqjZlVAAX1Ss>grE_n-$(j?o@a zPWFE@N1Sax;;7_80m+3LJ&=rDl{_9ni>00DjVDG~&f+oo5MDIp@ zXNnJk`=Q9Vhxi8^^RRwsl-6Wy8jajXR~@uFN-@CihQ)<0dJb}$WNaqnm!A!F97@D) z9Mxd#4@}A$n6j7qxITUK6b!;2`h0qxj7)+Dzh0t^?hYUX>5(-GRzbyy9ziC5Ps!-7n;So4~&z`M{NwQ_&7 z!-gA}#L;!U0@7>Rt2d%ojpNnQcTw6AuUK`oZ67St8M|1iZ&Pf2%r-Mz+g5|$+;CT0 zCw{ZS$J<`RZ(3NtRnZP!F|6}i+o>#3<~Bf`iILWXK}}%WU9JsNeA&Nh1ms-!TDfJ9 z%UG^{^ff%5qbGlqSR%`FAq$uNe-JN4hAu`Vi;5~;)RIgbo`3TKhZnZZPgX8LuXV#u zz17%bA&_Vu&GNeRx0Zs&JzQChciSgTNU1PAU0H>@&69KZYmu^JJ55#S=&982II%qk zwv-+BckNiQgI*o&)bBj8gW`smUAainwR6QzdRM*6;82-fsw_c1YbP@tJ6(q=wQWb$ zRX7`;%p^S>TXby>-H|OJ^mo2Yd%qi&aGj1F9hzN2>4E|DVcUy@L=*&oe&BmSn+X?! zPknC74bnfh&*MpX323^p>6M_R1T5_?>`0+QnVJimL6;h*V+8(FPG3y?-<%lOC}qI5hx5SGQ5+~%@KL}9 zMr)H*@`_)Fb-WUPk7ErdVtS-_3-Y?_r|6ykTk)00YJK0tSB}fqm&aEo@Wew;MPGp1 zeF_qJcu|55G|5H#u0r2h6VC`=$2#IHhgBa3ms6n(C%J$0U5|H*VT~2STOj%Iwh3?F z!|4n}4S$>{hf;Zsbj7K*6H$wwa|JSLsn(%4)9XP4*Nm)lhcjGksksZ5s z^x5E1$esu5qi3O&PR1nEv}))WwDye4f!SChW8c*9PeXO^e{c|12j6Xii**gV*1Fc@ zX`;`KA`YJLTX>XTQb|k!8_<>A)R(`l2`jA$Hljt$PG|xV)nvPI*fl~l(Y^8)L%i1c z_XyMNC}cWWV|7ymehv?=V(jTxc^a0uRIc5JP=_8%gQBM)py~A$_y*Y?E$D$#oNKRw z7fBv|^R9-M$vfe34!)loWn5?ZcF1SffYNOhU*dZEh6#-fOTVgWYl5ayfr!ezye_(D z^4bfQ2ILj~F~7I339D@T0D6#Rf67NEZsXA`r@9Mh)U(K7mjkB)b z2pxIZxsnY9sJFp|V=*JTmyXzc( zck?yFD3Lkvgk9flbU*D{Td<<0&;9+p4fb1VM$jK?@2FX^uBIz*O(qGO>DmvH0`$|+s!u5$1-7tjXw0ACZTr==_9(wSap>@n60__Dq^DE-9= zW$%JorW<}_@-CnbR&uFTm$!*Te?JL7Fk)YWqBqt5#d80XQxhMum?NVf(slu#hmoHF zEJ+!1_DwLoeGR9ow0WWWKLQcmKgrlVZcX%0$-b#EoGs_^x04Jk-)X+OOYJ00ZwEt97{Rf#JJX33X86$7y zmI$qtJFk(^(b=FH1E69T9K>AfTGOC&X~Z1YNcX!dPP)He6D-h0-^ckTK6LKpD@|Tk zbwfJV`r6xRd=JOo`T*o6Ve3|mQuwsvG}cOVTpgW_KJmJ&sJAT%d+lVK>#jhWYhm8H zy@NLP{My2Gdsz4uGUwg4N9(!@UZF{aDs0MSKpI8@MKaz*|wZ+NUXBb!LPhrdQ z6903@HK2_@8*g)IUADc?7t9(Y^Dexl#YuuhGvN6JUZY&qdmV+Dxu zW2XM-j$BX#?}YN!TNU|?>yqFc4kR5tq#2yl;7&`7Eup39ToJO zY|g+Y;cgD6mmf`llN8(eZ4S&jiGByVJ4$E!W`2v~PneTejeiyM0+H2(=;?1%eT}ia zuQrXWb?Kr76Tq)z%}HOdKwGhZBx4VOUX$n@kmOCqeh02g+(CVMh&vScm*F-5Ba|V* zQc~v1av>+A@4uGce=Xkb_yNY3jDLn%pNkyU^WSr1p=V>59bdp(@R~Zdx71F`n7Qd! zD$s9lkL%Qx%a&Ev)GS+8LmW7{(kP-2Pp}6V*qFVTyokKb;gCz|vNot)>gapppLN@6 z*VMe{4i=nRnlvq5e4)Mv9^P%dHV^ZlpxR;0lj^Pfg$BQkoYmT;dT^(9n%DhuUToNm zQPH#}4m0+<1p2%^dA9(RJGa2`JnH%MSOT+HZJ)~n5nZyxQhIY5Y8gZ=(+!6788Zw9 zh)Gb(CG^}2j6Ss-SeL~75a`u+lG}hYNOA>^cahh2oG7D1)4&lpvGXX(_HI7DLt|F} zWiYaXl;0rUAZc;BREBfljq6RMziSNksyksF*oeIg81e_l*`6f#l||9R$bOgHup>}M zCz8`7N+o)@M&d)#&Cp?&ez@Zb^zvWElogy}7Iz*z#x9#ee9Lhj`Mia*#5RG>1xlsbTtJly ze7#r5k+!31a;k@GK;D!WqpGyf+?I(l+=l-kfqI}X{xVF@iziX;3RjvT!C@6q_- z*B~dOvurpy3?3$lQ|#{`=f1sC+dAyvJ--3=kaz0s=EbX>fz3Ue8B_XFy(b`0)CJWr z(9+7sUmr}vZ|V5(;BIg`H2Uchtg&6-_>!>#yv@V!jH$Ol?m1|XbkWvPCG5VFF+JYr zY);uF(+x1pKloJ@CX^d2DlFGp&V)Iy?rclJ?rd#yqrqb-h+F2+7zJ zNzdUPoP9jYA9iS$QfbH+K*~Pg=sZNnMr$`)g7BlyhL7%`xR#L})Ju>`3i3`tEgix9 zW5jfhLT0>Y1XJZY96DU1~~~YJ(gqeT_Cs=;0MWE z2DV7ewTc4;i`Ueo=pBP|5G*{S8(<+xyp7=Ow9&IkW*=;g#+U<*dFtq|C!8+Df@6YF zYyhuDa{@mHPE9k#)BO!=K+~zAJT!NYaOgvIR6kaUS^r=7?wIfce4}+~JUSPH^Y6Qn z_59lrDotCpD*dX@&?aTL(r&J#tBbad%Ar2nyu5D3&9^Vn-ms;9i9kxLgwocfZJec+ ztaJ?T>{s4bUHC zdzc2|I@$osm9u2~?zwv8F=}jJ7^!YC+q%}j4hgQ2dstFd6bvV-U9^C-U{q3xmy1oT(@+p)_O*&Qsq5{Rn_;-24h5G5mcEo`doqvD_37@}4e5XXfw9C5{GN zTP=Ch(Y=n{OSV5^zX4p@S`u7GcUPvk9@MZJeF-}k{ITXVafJIl@O)bMOvPMtv3q}A zkONlE+?Sg@U~FyddP;=S+<#k1}(1=o||b)?veQKswj zE9{GB#E|1@UK@QLQQl@db6htRKPvotN(J|i$Ze*a^##sv=Ru==pBhCCjXAFD*0Zo7 z*jq=8As2QGmkk(WM!d;0N20PF_}K^LRz=TK>qc)tUJt7ip>Iw)u<9IV>><|?K}BhP zQ|er^el+A#b*iv(+T=FhH(7;w#@Ji2U-w|Yw#C&M)0Nu%^g_l+qWy6V&Zw(#&U~7p zKTx+HAdV;2YAlL-#EvmCt#m(s4tLkl-J8+k{7-3_6Y&91L*Oo1vr+sZqLTl?qK%qB zSCX+GPv!AuJmm6$f->S9aEx?adJc!+N1t)6^dw_n#1%M0ZkSL-JCe@`^t-lX$d!ym zfJCD;cnQ8FzmDB9;W=z~1YO5>u)y5wUAbO(Uk$GobgttKhP-3-^yGMbEh*pc!U`(a z;IyR?m+@7O2x@a4{D*Zmk*sqJ^@hVsu!5-6o9YaxwgmeU(q4gad>UoG|}WR^J*y(yDmZZg;IXDgA{3_&!HR>Kg*G3iGwpj z&Y+f59`|xW0Z;05<~fg`5>fx_@!S_iJ)p z=LE(sRjvqh-k`+ zNG14t=s;rA#?+8>b&QR!gr!&8=+t<@X3$)QljlO5_rHQg#1+!#d>*7y>#*LajZT*I zPx=0LGXE#I1q%W1trq_wKP`al%GEeaVqq)yzWgM6Y?}0*eDw^z$b_We-M*JCTIp}{ zvqh95;@Mk$!x)d;M4vlm(s~V6t><9dN$5=tHRC3F_Yv;a;!f+?*!HQ3Mp|R$!LJ(r z(j{i0`YZwBK_l&)eSHl)yo&~_0hS;{qF+*cZ?@=y{47&^mA|zL(K6zP9fJGTrC!TZ z?ny+7MeoFzaiye%KgI{*ld;+3AvXcaN_|?Af7#PiN(8Jm{-qj1#8~GhV&8{nPtL=@ zBVzpULG1a3=%Y_ZpF=OQ7+b-klqgd2DU>KV`*O<`6zgWf?KT?A96yhK98(Tz}lpo&m7Dz z&rqOFfV7K)msu^&Dxef^5fdx1-7A78^U~~W=kOH;@^0PHy)w8qzoV1tyA|Sf&`JC* zzEUuVJm1F>V_d0H|Bx+RQ9@vU_`kJvKuAi*n%#u)v_!;nt zceMLEg|ByJ1P3#mSEDBVApHykz3iC3c&yi&SL6 z8b9mQI(}G|L0*r3)uJxmxZw8TGyvKm1#Dm842#`bUhgkVQX0?-3StE4E01>tyVev0X9our<>ZvY$OhNs zrAeuGU0sR_27#3ok}WXOwI-WSq|MxxA_G&sEy!QxkLQLKx%e6AB~! zyH5ue9Xj``OR*_u8`=A3QU03L;tD-{%vq2ee>H1^_#; z&3925z((xLUM(Te&*6In8J9RW>+R0prJjy&OuY7qf!fM7_ zg_Y@+%XdvGB3;B#^>!u3Uu9kr7AkpAmvXE+zJ=w=B!lUrO6+#gpC+AdgXvhMvY$kM zlBB!fFXB$O_TZ-DS@sk6c(3ld2X@#3-0KM%J9qV_Kfue#hMEnKp;l@)pL6gnD$KSF zteknshj7D{+ASH7l*EU^7_-UP>o^VA#5e0Wlzlz**Hb!dAv;dMY9mejMLXREKL>qR zg@4gbqf~#4Yc*QL%pJB^cdDUbNS6fn?ZynW?M)A?SFt(T65x-hltj z#@}@}aQL@;KE1!;hDA3J!QFsy9?`Jku;nIb1=CT+UlX*y{acsT_?uv3!KvVz^*z)w zF1EJNv%(*!AK9o8XT@Y}J^n?VjXsNCz~0|-bqn=3{3|(!-OwQFXjG%)tU57~!0Cj>3Jm`C%iF9Ock0NR{1zqumcfcW^wQeqazj0`x&Uelx^C?Vh0J zn(z7__MZrx^6P@x9gKZp6&Y`dbyPnbLQ+(r0U$Oo5J0 z|K@ZPyICovt~w;riNfYC_-Vhx_Rmc}W=^fj7r9 z>+7}k3$MLdUq7v$TYFPI%NeCmJN1COmS5?(0;~1J*t5;?!=ZK>`)ei7I~L&CkueuW zVvpyuNT{7gl2{I_vNAj$lAmju(%{RQenUN6KQCLEVE>e&+B;>f|Xp0Ql+ZK^xNIJ!a05g7~A6nY|y57u?$Oy(9Ivn(23g}E^owiowd z=iCfwfPwn=m0SBXWKYWQY@RV8@>dPh1g~t(bT=ue!z@L9wL3`#{HX3!gK`-W6+64e z*p$kBI`+KD*qs?D4n77W(#=yhT>VbpVuf5d3?ndtHstyC3y+n-%dH8Rg;r-6nCJ(DiaX%8@ptf z+iI!dnlNWdf56?eww|-!daRO`{??e&ExGrBn!S%JrAcewSNRIsetZ0XVY9{T(9Wf& zBW62f`QhcQyIa+mF;2G%@eHdw-*ZUrX-g+#p)m

A312TeSIad?q5-({=C`@Bjmt zC+f*_*ufR317ifzGYf{>(85iz%5@ZRPOau zLC3ps@=6Klx#VJLK<@R2k=vzyrj$4flxmMh&jI(+PUG8g7+tPuQ41Xtds8}gY)B)L zxp>bLWHP3Jmup)3b$&#N30e!Q;2nKfBe<1f6XIrDExS7ulGWnx0%y=cc|kR-@r23% zEZ)>-t%U)(pM1Dep1aP!-A{XFcgrhsPrrk+GaG)nU2R^08BW&$R5YG^$mzB=XT3`71V6Tmw%Y#=e68=t0g^9|^vqe*F@WHh~%6~CNRtgq4 z3WI})oN!KSS741Wu+U!F;&j&r40&2V5IN(5JI6E~(k@N(#RNtdn(hnOZS%LkU`M!g=x%A3|xx zP6fe!haPUBt1tl$mYA1`lPg)X0lfj#2EH6~jN?mHyn)W4#XYXD%UbyT>afrwkg~fQ zsb*XmE^F*>10J!azfppAe+DAc^tVw9ycUJyt6_ZY;jPRFVP}p_z(Q+ z@V%&sKAudi3wC4m#{cM2^z<7J2lrbO;q{;N_a8`ZD~S=X;WQ z$5X4OT~EwccIJf+LmhYJO|G!yPUqpu0G%WO%z{8Wn!CgUZyfFNO+ew zrEGpZ+E(pmt}*~ArDy2AI$+_wkd|PVeVE$_`lE?PfC4IWN=>Ep9OMe`U?wZYd-yvY z4vfLM1RZaojz%(J!}Q;jbdP~gUcs4TO0T>P^{$v?=31|OspUH>&4J0-mDmyHiuCG# zab=RPLbxiDuYQfIJW#UlQmR)r93bXWk(c?(19&qBoFe5WY4pSanV0;!#M?c^K(g;CKc18e`_I1MMn$ zHYuMTe#dAF=+>oVgPG^ilO_qMj4xshNyfw)1@}bkY0Ug#i+#(_LA|Skx__eyOTj;U zhV#f|?521K?W{mgaNvEYZ00^c!;QzD0WVu+nTXwiv*HrVcq3%?~Vf(#$eZY zG(L`q3KOxtahm!~lx4kdBGw0-Rt3JWT87)lV|OI)Zv3$E*~YS_XPfSBDr;nM&YXzd z4+#wAq+&9Hh|UCxk)|hZ%B?&*F;kj|HN*)}pR`T{Rd zs_`jzuJ?S+;~Gu)HCdW<#1m?xsJ>96;s3}bWIx96>J$RyR0AP24r)hta9U@&6V^@O zJQjmLlIUx3ihNRwU!eDCJ^vrd-UYs?^85pT&&fT#r57Mg({hpmO-hjf>I(CcCK8gC zyXa7=O9AHzR83lxv_(nEWhsbDL1zlOHD0zBx5+wjZa;N}xe3f|36k%;T)JILC}1tp?lIrKBj+&*&E63klbNS&XV1za9jg?P|i2KJ6B|4F$b zM*JUQhwjY*WygQeutX5>1XPn(WpQeoVG;TJbZU{1N_M6MPj?dm{yi;^D7WPKF>qVV zmfI(IP!FOw(>0}%`RIcMzZ3Z0V7?Gf-qpgwUyN(c7wG)r4l&z>;Dfi~S=y(pm>(7z zD-b+SX3Na-)4lS`^V&JeU|!cvT%Ob6iOX}k0$wkgqj!T((edByyvy}ljQ?4jh^3Od zMB5%P+mj0??sQ3Ux~_Sp*0sRs@~m8QN410tH->N$raAgOJP~k-?bJ6wj%RkOC@&*p zFnCu!)?-?d$cJyrrg24<_)nHas0@ExA&vFgp(n(ZTQ$%fk!u?C&lsupm<#QZ>H+lR z95|)Io4So!?z;E3zqV$b{(R2?+gE+`ssx#@Gfn!wYnLjqR$~?kve=|GT&dwPe0v(- zByo#tK4^H+SXvT)Y~Cvv3$YW?2XSg4M_kIgSzB7G?{iQe!Tp(p_F9ccgLKD^{J>MIf;-Z$nOd`?6QJ z_ozmc+hJ!&W&D@iK9)R$zNMx0RPtZwvj);SysaUpr}Yymf6P}CLgf*9#yPQ_5UODa z^Tv|CF&QM=4{;s|Y_p-trIpLvO;(_VgU4ZnpF^9JfNCg}aSh0OGC~r0;4ZyGkllf{ z1zw6L^W>OZ{3n&mQ5W^|J_hUWO!)h|fRVyL!_JKxU2QEHDEq@PWtI$&F*{3>WrbF? z-k@I7YY99AJ3DN9i~*?q1}i9{3eQw?v;cLe6vbj4x_EB&qb;SVmr$IMg^JrO!&^$m7-Um1XglMsE;8j_R-%s*xE)k(fS~l{-Cu`t-uWDbuD; zpI$Vbl$#3PSyV}{<&H^ma#gu#k-SoZ{2x-hXW^BDmlCgByd-#0jOj0uf5(&4!IScf zB;64j_|ij((B61_&hd z{qW@b!+2*c>DW*HzQ!%z=Qnt$Ei7^L@gvlxDowNwlbI9C*|Pfs_iwp+Tb_{M`w7l? zLIfvqy8^%s_Ac`>Jlh@sidrZ@a1t|=yn38w!F>-tFavR#t?|>Ev+lwzxkd3v#7~ZW8T373Ht&t-_HECZJ5^6fY&&VM%TNZn} zrV!|43|E9&$)U5=Kw%2#o&@F{_9c_o=+{L^nN?5u!TM3nrK~B2@7!|7riITxx9c~b z{`-?l8K!^7q{!RO8qD5k2pJ31RbB~qK#*SX9r@w#`!TPK`yo8_zbSY5cQ{2M#TK&R_CXpndkuc2nTcz@ zTlELLfgbnbFZ$*MUKAd2QF*2jh?veTCwN1X(s+_A)^>+X@ElWCMtMczh9Q=EKOjS9 zmCwXW!rc@nF9;p7Ybd#F43UEYautbL0%5`I55P`hMl`;4^1V&f#^lZWW~MHLF6wEW z1w%rp7cq_|f0f*NrdQP9%vm6quz*1?Wy~#HC(IZ0!fgVu)gHRYpMw8p`8LF4ou)JiG?}s$!c~H2 zn@jK6qU&Iwo(2O1b9a-l)ENyO3(Um`Xpg5}(c{Z=Y;5C;`+0fdw<)g8TI?7wi6{tK ziwS-vbD(?;t2z<0$HXU&IzDa@APoU2SOj)oZb1ejk%_3X93*H7E86vO|O$d>e#q0F@dwvs;mVbPj zly8k60dnG&Gi-SSdaX3H_JF=|mUAqy!7uT3>Zf&N3l6`+e=U21Jv*>lzubMFp_djR!J1P<6fJ@?kYeZm96UBW8C0Zf|$K`juWQwYeNXH?=G{Wvf+f|NRfRes|c zwUNpay8}}X9uLR`BER-bhFE55BphJdJwmT+4tld4y~+HR-sE4=n?L)1DE4c4KwkW9 z{rd3SBY1ANpJB?^#>G6FXmz2m8d(BXo{^O=@5?SlmM{Ev0?3sNeAAJcC$M@t8*~>- z!ZQV{^m^R+UEl>$#Ia&QBE9C#8h^Gpn=_U#2ujN5^cBr5i{+Ny>sa7rW=*g8N@B6E zMdtd9$=ZT}(;lEGb`0;IJ(XI1EA#z{$4fOqIShLQurCdbVm zXt>P|t@r$ZVrCMUxAc6A7*E?3uE&p52auyGE)nNX)kJyKQ1Y+C(}0jj2we-QqishB z$Anc8P1(fK5@5j6{Oy8=N!$r7K^6Os_f^3ZQW+}knm~SpEn~b>g?`wTLOz+{g6AZ* z$$n3$q2H5mDuewvaS1h=LLBx#Qy|xnACaOw?wT3Ecr1Q-SdI9O_n|RM!wf~9W4N*hv4r z^q!X&At7r~Z&7Pcit8;3!|RB3P`pq?Z5aMoDC}brw~ko6^o+K*X9uD)gnitO8w43@ zlE%1t(xf(3^j$0P$jNZ5@MI70>w)*3-@zPo`N4Nl?sNV-TVVe&MOFKqg_TB>`q zTFMw!XSPYycJkw6K!Qac2|FpJh+xN3QUXNx4ri0Pi2xCXF`kydufPZNP#@DR?SkzX zCE}nj^5e_=7bvc!d)f+d_fx4>WUHcCsu7)za!&&(R1T}xH}zSi*38Sb(Ngz8e!UcH zt$zLbKL0ngZs`ei{at$z~5 z7S8a8$YX1p3Y%E=tRJX!>`(n`{R{2WfpL4NxYCZyylC-qA1(MS06~?+fnN*c0w$K@ zl-)(JFC$AAdXtuSrQjLrG35#}<9f%ofc2XC#$Pm=T7Fj#kE+US?Gae8vLJhUU@QIv zya1MEqV!sLCQPN?;pFc}UI<)w*DqQ>X{9pnL``I)7XAlJqb^WcdA9Da1H-V=xkA8V z0*)FG2Xf#A4)2UpGT=bseGlHLw}uPvlp}l!#7Y+|SC{4E)X|?Gkpjwgs-q}uM7+@l z&Si32$he<{O`Pl}a|+Jyk?+qg0g{gK;A+|GY)yQAXj*wzA33-m{sF4^`DMm~hapFw zQpsbqWFB-E2{#)(?Q^!)LuP528K&dZXs3sr^2|3$#M(k*5lKg=ae9X-qI6G>><{S2#B5!%L z3)-?v4p{ZTn@T)3K7D*VcU(6f9v>SY9UmDV#{1Ct_;_;sEBqZF|8ks2Dq7+a$hFgq zo4mw$*ehI+ReTwzD}z$`&ucV?3wPx1Iu44?V_Ey{I|$-O+HEao3Gn@c4NTBg!t5-G z5M;KHp_VRvahT;u*w8_L3xF0Ru_c1GTj@<)c+?4z4E8JJRO5J9lPSs?mGz9_eNKy| zG>pjC?$QXGK&N1VZLe2hbjg6dw%e zNtoXIk8!SB%j+Y3}Aa`v|lL}Zk8FmTe_F$t1tF!=p z&WW#sb?vyP-6u2t(Q}$T7{KR-P(z&{G_~9_X?8 z7hdge?msJJU4X12d{-#B@S<>RAL1rN-RnQgr=QNRVN+mZav`{{Z(v@i7_k&mQ}0`} zbrQd4z%<#uB-XlbmTQkq77u=1n+kcqXrEev6hu0xj}&;Bm-gmZzXBNTQ!4zRp!BRx zt+{eeCH6cgG23@Au@2-$Vz|K%fYW9OHb4gn1{-C-K%WsQ>Of}YVm9%YF=F~XxQN`< zYp1gYACSk0U;A7DsB8Me#2^!S1H~z({2>JdL&Q-!HQi*da@Rxsl8Tq(RwHr)?WVM> zWRouRbBCr|xr^&Yj*-x2J+)gyLrOe0L8*b5Eb$CH4bWX^fgr1RG9EC17Iwpe4H<}K z2b@5;+VK~E8z`gD{$7p7QMgm{oNm{JYKl^!;2!?qapA_&e^wvD)!dzi!({(_w6VHm ze-BA)oNPf7+hO{3oGqK%pCz^wfOo5@pXZ-}pVXJMBi8I37qQBHKz%IguL9}? zed?MnW*5fqx5-VBUP|%h>)#UP^#=NDuj;0llFCsH$hWThA!ObkwwfaHa7l#I1@Y}z zus9+OBW5d6H>?QDBQraC3zcD4iL#6Fv0avq;bh(rI5pKu8_3)upyX)dB%={m0``$*yjcnfK}AdQPX-2p!UiEuzraL9*TMn_?lXPp4Z{9xO z_{5sDqRG-2V-}R_NMYR)9 z6;ShyGdfO7a_xJ1(z|leA;!M0*o`&&<*4}F#ga5z7p0XQRIY(E)*)MKHD)LKAJ^{e47EvTPzes*b1wkgf}9p6<&KLcU+yG(+=!R zhcPd>8+m_`Wuppb#=%B9_d~!ey*&3c9}^uPJ69P4FQ^YR(N<|6IiW^a;=(i8@g0HU z;s?bUnJ4HDGh(fpu`~rs;)S3q25c6#PFU4}yDqk2q-_A1NsDJx`M$B^YNtw(dxk;o zgbZ=?y`c~|8QqhuLrM;7WcMFFpj4c%C0pyEWI9 zSFNU&CgR zjwnz6T7+L2$m$r&!yoH=OImv%mw;b92)@)G|8>X%&f1OLITX@#_v)29=k)uUK;b@% zc(%)${vQ88IOp76Y7G@JtV3(nJg40qFj-^rw>7W~bC@qHGFWf|&5eAUm?3!+{-!F~ z%7Ezl91u>st=COHgh0o~^7a`tf^YB*T4>j}KaKvU?5my_F z_7ig>IH3@y*m*9omX0PfSA7%zj+h29g_CEhe=}b2yHQ+yHj}FIloP^ zm)dZoGX{jIXp@Dmpo)LS6P!e`cj+SYksDQakZ`e9VkW{|Aus+?XdyhWPY=^Na0ZR< zvmM&Q3wZ(*7eu||oJd+RHTDuD#T-bim#N)|74;mV;;HPYY^dZVVZyy6=8u$Bw20*- zu+BXzXfdZaOON@S^V*ml*nRFgH*l|$bubTU=QFTY-!1l?nEp1oqCl5BPYmcpN$u8{ zr5VUoYe_M4Kyy2|u~`=v9Hi1PN?^?2Ng{wELYaR$iHKwW~VRYOkK;5we)YSyj)% z`j~@x19gGxOoRE7f7vpzh1{pSjPt1TbWQgdC!-~GD8weho?KOAuG587f<(E zkLM-Eymx30t3tUujUA+YA+J4bI0Ro0WR9T`6yH1}wu?Tuztg(#w9vxCT!euYm;K;M zdw~@80`@=b1uu@J?FCdv&>UU3RN^N_Lp?CD;Wcqne3p=bvrN$3Z1@oRjP(-u2^#8m zgw#!^$^PQKs}1$^lM+kkct{;E)JxjvclG?et8H!2pphvxbDj;QlsKVN`Zz(o#aJH< zwWH+m5Nvk!Oj~ZySYOq)Drl(hMKn)cJy$=JtOtju=LFD_VF_k|azOdD=9L|I(er{J z&ihqy61p<`7xp>$7Rd0zNlR!aa!trka@q{NR}-+6xb$oFvV?J*-i=%g;#l`$WVx|c zKgC$c2$9(t*iBW%^jBqUFMb`0OG25Ur)^)LX0(YH&fs9dW6W7V$wyF(jKSXkvQR0o zQ|Tx9p+@W})r2ItgT?F1ktkWv{QFWO65e-2)sA3dQDD6<^_ z5bjl0z+0u zPT3BnE>PIz&b(%B$gdc9lOVh6#4DdTGm*`Yw5>ukcL4Zb-lO@Bf$GKDM?=5BT$EDfuu=qnJyPqVk9+475j8HDoc*YsP z*)(t_khzQcKvJwL4)TZ!7~oiyjj~olsH$~$>+7wVkg8z0kt)uRvKt)COy+UK0*F=+ z&L5>dNEq317Za8t{yz)I99F6N3=`?XGvY%1{(vlyLx7Ko+3EWgq+bQsKkyQ)9BjA? z-?F&3XdWr7c;uVLYP<<27jd8!b^%R;=4V$SvnJcoCTq)4p$-5)M+7fyHtwopJ^arr~NwZ<1R@=hFDv~ z<+b$}?Q~=UPYe!&J$te9kWwP#JG9#8@O_7kJ-d?=Z3&UKWmbx|7%&8~I>4)AnQlo( z)O*2;9Pv-KDSs(zBfrcs+a)vSu-*2@WWUUr!od5DWr|AVYhl;_+$ ztRTwR50-5#xfo)?KkG5^S0nSy6g-a!oI#Tgw_SDn9(e|^yZ2;K{ZUz43k^V)7#cOT zS#_r1M*TD3(4Dr6XFtXKRKhEq>Z;ZfCBD(fP`VbEyV%fQ=-ESGD=0hz^R~)Hi# zhX0W4P!2^yt#UuyByD^+bW`w;!8UkzF?DQ!4bnBi7#L*f6?0}IN>Ul%`5Z^k&pU!% zo@eNp4^HrcKGU9xP^XRbNgWlfR|}>+&<9#A#UAW@S*6S?(|erf%{eQ@-`Ov5@qoZ`6Ik6(KkZ9x#-BL zU8-kDPW}|%SW?m2iaFaBIMVcz??~vSfF)EJw1Ap}Sx5Ygy(!2>UJ4%JE9-DRA!g4i zKn6@$D3Li>M!pl1IbW3pnqSPKT!a{CX0TJ}jZC;n2fGdAF{+;#A!k|TnPgMmL-k-Rhv5Y9cWjIzPb{40KJnTVhg~( zW?;9tdXfVH*j1l`@1fC=Ev^JMkVe1g;)8`sP<9BG-1l&zF6M&*a*$|M3Yj4fz`6t- zzYQ%i_7cpR1U6D?kMM$@A^HRF-lJ1#7OBMaAt}j<%?Zs6q^_D8>r!ByW0mKEe_=MS zlH)vt-j$k{nkSjp))V!1fq>{LrE8Sdqi~%HwPFlZtH?B}fMt@*}U;KY_?XNjP)u_zE&7JI2mwL|(QAtnWaHgvb(y$5cDEZ{NP7Y5Ud&I1p4w z;$K8JbF#!QM=zJ?Km`1qcivfe?VT&v+(}^H24#O7eE?++jlRVD_&~kHC`$|vi#sqh z-)rK38?g8@QR+f8h*F_Zfu|C^JSLXjtU>7u!zSS+USlAeWr>9&FY&=mWV71u;|FnP z7VhkeK8iaxkBSna*T-MB9{!H6-n7b}Ct8!7R(f)+bSQ-r(dSWm4WxJ4&W|9OeVLSu z?j0z@dE>F@3-DThiHARS{X|kZ6!j3HpMQy`-p|wokjY*Wdp>#zrAkLB*Fv))(D4$Pc$ncPPNntsd`1dCtfAryp7cU`ZYes6;ifd&KO_$8O*vll2 z0r832!FES2*sr<>nEJJeA_yQ9sJ>LM^>$$*On_I#{|tOoB$i(lXzR22iGPvZad2 zmR3i1;8*_tXvyWY7N=V(K}#K|#Sz_y@+(IU40Q9vydZ{Fd}dg^=Hsl9wsJ%C=eTYi zS>%Mp*3u0g_LCtmRCjpf%5-AdHRIH6X_=;jlP9n-x$skUIssSfuv)m8Yj~&NUL-q@=SnSetxX@ z{Hiv4+=2RDeV6#`5RFf0{o}3+sOjg!W<-vU3e%{(+yEa)Z@}NGG&SufkWzA3JMU=q zj&iKk1RtZ`oB&Dx@=>TYP+gB)ZHe$?Z$EM+QCnbGW`MQme#~n#^F#D}mbE@7EWhy0 z=&nV1N$j7le>r6d&*a#Q6LL`B4(^;QfK_qldQH|o8 zXPwKvjJRNAt3wWfd7GedzzbPsV60NeD|db{3VJbl%W=vk=Bf9#D)eW@jT+EUj(B!E zjnnv?^^}STvck&JHPiDyM3GV7!bRv^a)_c=q>{#QZnEanaau3u#o0A@!%v(6zw!ao z2j9%lv)Fy4vB#Z{xz^zRe;^K7eEtZNmB#bAu-M->hQgC`v2&cx#a`zg*X=0XJ9K$2 z6qt)2qKuXIx_SN!_Ys6k0P7KZlr$D_KIFO!rMrjbZK9Iwn`0N>|EB%B#P+v3?{_t$ z%;RE>x#4s#mWjPs#odd2N0w-t?3+#O!zN_hX~i864dq69$qg%e3(cM?w+j8>(T6S` zPo(WgaD&rQr?Fgq9&?8%AE|ZT?h511I^1cx|Ec$HuO{5X^EI&e(=%aazp07Z$u!=G zu-Yjp&9qqg(K3m5hks@DA>|?RUF!~SO*1JgQk>7RdmoU18J3$Pu(Qh$XFNNW zQ$slE!LxU-M9e|Vt#xd(unx`qmF`e8jZO|VP}=+n*2^{EZCA&LOCkJX6t*wO6O?zX z1P{53>m^cnPR)I zjTrA61Ca6*C(ksx8lBR_L#fvW$Sj%_85q`xUB1_OkBhTN6AdX?gde1Kima|Ll7^JU zLC@sqDPQK-5>1_RuK)YX8UNZFTKVsS!dycchj%JweRt{Rrlub~ahS}eyt^^8ThcY2 zydKsyY3zH>TU=GB-JZI|l@*Z!@nwaRaj$TC_)H7qKFr(POuJI#_zw$vV5j_-k;b#q z_~^yh0jl_@+lmp*9Vr6|NFk%igA5zF;r#Ic?&kv=pX09%^=Le)>NyGy?m9AGXl5Uz=8&Z`J0!W1e9v648TL;HaDZj{bQ~;&bL1uDS&-Be~sI7gL9M*2s*RF}Il;Ff(E}q&;9kU$VwONk&O`u}K zkB*RXAS;v`5QROPMq$Ux{jzcJC?B^QvX2TrY6|naaTfQ`^ULEvH0IqB=;CI-%>0jdXPd^PKBuV+^mGQJyrxv8 zm2_=_4RX!I961;(G72q#GDCDsRGnbYc89>xY2*)ROn*EX(}?~%pjFCrG5lC zl+HyKW@8@aV&4&(6OA!fLRyl=X^+{s3ZqDSW*8pi9jD;!%r=G;$KdnKY+;O&ZW-G9 z_qep1G0L8I7L&xlxWf37z8@`L0Ie&GjK$y~iMPjT4^-%Zrc`z~imT_x>AcFQMFdaU zfO(Ud{}PuQC0+d}|Jt~;OO7=ISv~RUxYQs=D?MTz3b78!VPGdAu01`^R8mWi>D7sD zj7j0xbp*PWxMFT_taozP&Tk4fnNHlJqg+l{f=scz{6`gHeGFI`qVQc z{ci6VU(t6i>jsr+%Q1)tvo{1fkb zeif*Cs*76~bQ`dWj=4`3Gj+^^H#fVKE^;0_Ciu+#tl)ij&AU7M`}iGoOax{YX7hMpY7k&zog&P|CaEo@Vs!p za1!ku_?Gs53h(E9OH~sc^$kLmP$V!yt#AqR-X1@-RB5_i>_P8jj~l+FhKI&gnCFuh zl;(%yuewyG8F5L(<`3~qJ!q-JS}!-Yq3v77h%gO4%9Qr69PjtXf9<60j~l1M%l6I- z7T;%hhQ0CUTxt`%NoMX4LUhLJ(=#^zTiU;2yi=@!?gQ_@OKua^6>EMde#pg`M&q0K zYWEbs68XGq<8rF8cqv^g47onGgPoD-J>_2wjFMB{nkFi@)cE#_?|Xfx6-<1Oui7Vb zsGF?*R(PFl^6m!3=35AI3KFiuYw^)@$W(G-tmc9lzG8ohOHB90mBxp#!;-{1qm&0p zxzGCPwcp0Ku8^2sh$C{|sKl;_NPcMfphdn4IvX-Q!H1d{%swmMr|c&Oh!xUCh?857soVR-RX^Cg*7;s{8*U(!0)DGfD6C zH0={wbpdh5NJn}5Xu5axuqa!6zZLI2 z5SN+S<5#;j@!UcUM|pWhZ9(nR^t6(b&b0XU3=q@j@F%9d#b~@{mkZ;lLY}*zTeI*} z#7wG9ug3qoRa%m^3hW+a%1yUAZ%pUZ7_9zHyh?Yn2PnY_^(ZWd;R4XhG5<-Ru+ykm zHg3f%%iytW@fGz`o_Yyq>XZ|uYsnt_KAuLlX=hxHCmVFPd8~e=SH*RIa6-Yv)Lcr) z;hz5B1lG9*YknKnyvd(~bI~r?`%F!hjTzj?2PQ-neHkBH>fz}MCY$j5M>53`DvZDL zu->QmKHl!m+tliQ2;<8#{VP5wmSsy>5By#dua0DirGX*hjq-c&{8XMFpk$`$RD3`z zx!!L@txt`({ZGNdq|&Y4lpb;W$TxJ8OEpZmi~eN4hW$W|M%={A3Nyqs;>+gb-r1HQfC|K39lQ z=a^P}JrB7U!OPAd??kLI)mkJoP6>Vwc0BJ%Jlz-ZbdS1J#Zrqen`nf%by3$WB=x%Yf6}Q1-Khv~0zEymF8e=bddpvyt zDsss5YEp|&+^Rn*j=X2G?bk+54tPMtlyWt(V~}<4a#Grm!*@M>;;rWDT%h0?S|LNo z7p8Hm-@n5}shqAurT4OJj6MlzEIposBV@)J*z_20+UHSobahQ?Ms34dcVUArK#WpR zF3Vst7aWIFHWb%DL#bXabNHI66qPdjVoX^>b0eS2)M_*5-B#O1RMR)E-Gn%k49E)j?85QC_0hvzadyXd*v-SKRJ%1koIJ6VQa%=P?XSXsNM z>~zhrIQ4zJ^p;*45K)$-HLG9R!}MDP$UG zY@q(dkZ+i*s|)T(RSd^fD1Gyq&tcL3C2+#s%?5|WQO)NH45M^pS~RsvQM%qu9x43s zZ8%{AhllQg=<}?3D{E7xkK;cDg^*@Oa3RkQ?XL0`eijv8) zni2rj)5Dh-doQirl`8(tPOt zbRWLi%No_*K!{T84jg{uIuHYw_;j3;4@cdQ}h!}xAFDihX~obP#~_DpTP^|du*b~0{xv#d8E? znQs4{OF0i(DEf4z?(xwO<1mBQ$V{{1RD10N_55&%=X+a-Tz;myx)Zt)JSWh<*U`Ty zFW~xC*pbrLZPmip*MFO$`d25|-pnjwsH^+ET2s3%W}xxigh%FySQ3pAxkck)tgXC7gXj{g_ROgIl0) zVvGcqV5UM7V=HFHOOPw3(02@+5m^Lzr@PP@(1+Xs{R#9bQ^@pZR^-FqK<7Ko%kXSn zKtK-gVYdcjd~%3&$ONSy$R+VCtQlg|;K|~I9XTR1kez)UDTSXqd~kt{dAjFq6)FE5 z90!XD>xix=FOW^8BoAj5nwWtxAvz{Jt}(80(N9;6uZBmYvXTkh6j8>rN*dF&xKiN#(EM>a4HRnpt_frabR9)es}i+#difS01c;~C z-;7I!{K(m~XRs)CQJYvydM+0TuV!L#9fr zSxDD|B(Z-CWf0>*)b2(N>Y^=tf+=rw0bP~O;}Rb-+|zf)a9_2zhT5wctk8R%-X-lD z;A046f%t|(df$>w@E!opFX+L$L~7(~ejx5Xx4V^yYS!45bxJ|$p|)dX-9dLPJPdm0 zg~Xa`kz;~-a;K3CxD~99ZtE-o)Cg z;p^yKQiIR%&k;X6U9L^(-Y-T@dDebPyw`@$t&^W`be;61OJJo#hi-V0aV!Er4}8@T zs|gM@Cle=#$QaM9f6?;F)837K0uS8-82posPl|u%G`v{6)J^lfAve6+D~WT_H{eCcBMT+s z{*i-?&hj+WW}O$>K<1G6`WGqvd~B_r_lvu5V zSjX^er5qtdMyy1F*Ly@D{Y0QxbB*_H_`dhPt#>sb!1llMQ2g$SJQTnEuRIhlxSa6s z#a_?{w0*%~T%}VYucLR#uUw_`zWqv<%kh6)=@e0!89rsqW81};57<=QPhd2t%Nz2R zE~I~PH~v2EWD}{8AA?fZ#OTOp$=8QTVhZAgIZ(q3*zH71>MY=orXF^6+6wyA4sH=a zY)LxuHzOAEYidp2kpCXNRo~ka@*05Ewb%RU05gju28U=~Fj~{0D{A_2stIHI|6A8z z(se<~qI8NK5UcwkBuAtE4(VQ|k`JUdU`{%1Q~p2qlFT5&+NA{O#A!}NM{6)k&!xDV zqe~FOTQ#=SY2`JQ)}B;SoBDGPMbRrr_4e$xDNd)j>gY0*nLEY^pTQT>AfC$5oIJ@G zMOm>fS2#+q{k7lgH$e7w4_)IZz2>`1sjq6(?-qZ%b%>(abo+Vn+X{Ts#byfgU0(l5 zea;#$Xd4uO87+!q%wDZ9+vWCi3v<>`s_*S_<4QKJxV;&|Oc(E;H7{okFJ9qsh5B{z z-pj2UPeub&<6BPbv*ag31)v3HgfX}z;Lfr9=rOE|-q9TVnhnG?%Clv$ zFk~C*rA40tI3%8g0@pvFl2`n*Eh9f0W6zP( z9QPf^eUjL$XfayaJ6bAI;Y;FghNuC*1%V(jc+|M;KAxGSNBN#%9cEC1e2Z?->mP@U ztBbM1SGvg`zW!gD;jVF$Lz~^2D}Gf%pJ(Gv{2h+bzwaU1NE*A(O=}4aD+Kz!6YciJ zS+w%_FvUeVKEN=OXQ5crcWqctyG_XZSnmQ}{lsda+$8vh;yucXs&ipe&2kjmr__-O z%58MZXx>|f>$FzzQeX(4kgMOM+@}|(o((VNdOGa6b?~7=Ny{tTAFO}i{_xR2woB=+ z7M~&F^s*Q$C>=DTb8Vuz{)#UO+6>4G~djt1(vy0 z|C2j@2HeEV`3Kh`9|N+jQdIZP&SIfrMf`2W4Spt}n}Do#l`nQRGt=ScmDgBrBZ=L^ ztSR#xa#-BPB*w>?gc4=wH{|BQm33!^Bxa>S$d{%7LO^dWc1KsB`;e`?Kt~eNS?}u!uzz;HnLdKdwEf z+pku^xBu80wP3$(wd9~SkIhrtRuQ9Z4Xy8csi&NoS6A`JF?Q8$0g|_tM8ZpGw$T(& zb_oOYZHsa(lXwO_ex9Nx``1G*NY7j``n|i4;#uhtKbq}OI8w7EeLsr6396nt@~|^y zc-_6&Ep3o*0Y@_;JGn!O`CAPx+P$W?r_(lsd%Z_nfh=>EpWC*}Cg}@A2XODuu)uc{ z$4bfr++Gv-YYMp_iXEvLOyZvL2Uf@(O@4U)B5G($^h=Z%hJDaHB+cMrf|_~Mv0C3+ zn<}3fV}AO3NN(#Lne%_RmOc2mtt3V@lfAZ2&Za7~kPNH!%%L4?G8~x;*n`JcN)CO0 z1$2km*|Ch`<16W$K53hJ?l9(58B+?G4q+fA`sig8|7qo=0iEM!$)Un*M-i*Mwn%+g zw__EZXSxS7GdJT(F*`?{fe6h%t!&fV)?Dwn!B0>2Iwws2Benv}t7mdvhsKzMWZX>c zP@v+~Ymr+UXOCW-@G_?5|_s0jx+~8I*|g(&4Oi8hI6EAnuoh?8Db17 ziB;?2pV6!Cux3ym*2XHebOnl%9w_v4%w&$3;o<=5D32MJU*m7!&5lewo1Nf&GaaSO zo3*Kmp}1a1Rp?^RBK}gzXlgCqlxYh3O`kjiBorpm1y5WH?!8P6Q_*KR`urd;u&FN_ z1DSE5*wRl^M#jgdO4sN!ZrM{in>mG5Wz`XuF%b1hSqL6xl+zLt0WZDGL$`SD5#@^n zq<(!hW6;+qC2QPTcTtVrU9^;Q7dfS#_w4V6&}s3-`W**VLl)W^RPfwYwR9()J+V9z%~W%k>t9m4-?&OPrx~c?zZ58 zeU|fiXF_1YIrAByH(|+Z<#y0$>`{@ zX7f|wVb}0t27kbw;a>luD=jC#LiONvde!Xr`*Nb!QvN^m`b$#6jht%trl@vd?9^1TWIUncL8 zEZEI1e^$d;?DA)Yv)AKAI?z3y(-QfaHV^#v(i!D&kN9LD69VCLDc91E6Bb>JnKibI zlnKp-+5%4Pu-R7@O18;>qbHwT6jRJL#q8Ud*$ZM{M89%MfTEMWYal-KihPUEtcC_6 z098t8aOqF<9A3*BGC?iLf%G-ye_WFo!b|=&00i~PtN(eY(r^jak^@V=rB;QZU%ci$ z`oGKM9N+N2PBP=BtHQ{))axo4!Ri@I-U|=$!Q|#~hU@YrlDo!VcP5gLj{kWn=lwH2{b=0n z9ZV7+hiZ-vCd`A51df)1?!GN%_RnPMKSVt53OlB}#W9`A8}P?SguaAh%y!@KZa|&%8u<7X3bt zeoGv?T{5n~XtS@@a*OhSD2u&K)E2&gorC_q3O?Z0MSbfTBezh!6*LC@4tPC~l_0H9 zS}~8tG%qwGzwHL^gUAsU_Chy;B}QS^oz5UFHx)IV*Z%aTDKbS?PHsNw^GbvwjtGmm z7-AvZUd_wiC2P5%fvtGnKL*y%QSP$=&C9f2&CyLxtA8;0^mw30^Ga0-od?a)b=5n8 zbtN^kXSwZEURoRFF^6wWaNDWx-7S}Ku2It%B)zev7bqMb$I0A`7}rAW2OQ#0 zqyjO10vf$Epys$n*+FoCEpEr`rBYMQ*#fT0UWyDwIG4o86o?|HxO9q`CPF>w6|v%| z1!KEwBK_SLmqoNSWE%^~dJ5L4+O!2N^ka=t)P$2@9))=^ z;Be^}$X8}JuEFyQXF)7c^Y|8MW=)z1&YoJf2vWnx0|ag5!*c|uB-))0O~l5#kpX*} zcEHIVwEB@(>f8mKg-c_V_*EuIjUNplNLhzyP|NyedAUBezPX_EcKbUur?sp3c1Qu| zYZM34b8r^f-mCdGet%J0Q68&;gr-u5ZHvwxv{jz%uw8rBqU|lBy`sH#-}JZYlRW+Q zsKcg%oFY@~hY$T}jRROJI+gfY5y=)52RAs@FP5CU4O+HUFBen?*Dscz)9S4FX0;L1 z_urNXFS%X@C0WN!d~acT)PyrN@Vv52X}LTL*5%Spz`1i_ zLuMn33^}^_92=ru91hd?_1@wf-7TP!Y+zl~eT1_t;F!YDI=myl@I(CPXX<596X;D*OlNMyPX*{}(ATH&dxLoK(J0HdV4a)v}fIKei zfOT%mvSse(mk{$J>mZTP7OZA*tOh|6kx=*Ex||DbVZ`StS~DFtB5xPxXe;WhlAOLadL8bl7`qPk6_@zSyyznQQaZM< z+FJ-;Z{5RHOy75qO--~4;M}&r;ItcEi?uwElJl=vwQQzZDVGxN2f_=SMrh=+h51~j zpyt$q9LQfOt|&@ZYI4-mf{0%8&2)7_o+UG^T13^bo?D5Un5)kZCZ8OcRxNjAmRPEy%q)35+5X#e3;6qpPwAaCt z{)N~3c%`=QEcp`ego`S^qVIv7B_z<&KZ-WGMn|g?UyphiqaJ!iYB)SFm|Q)QX+R&1 zR_zxqmF}sk&rVxyG^?B3vE#^~lL;?wW*@tn_wuAj!G7wzQB8_SSUzV?tbj8+s_Y*D z-(3mLQpFEA_se!Wlt8r6^li``ux0hJ4zHsDtC;|G!Kz0*&*JQJRXSy1dM#(Z<%Tc& zu5C=D7xKiJm;{u6)^!$rT|LT1cG+gd=<`74)l#dL4F~wYyAH`7b}&V|9UW-Fs5^)j zHaO~N{T;rWT;LXk;2m?$sl*nlY>4H2hmHKYInWYBG|d)=9GS8I;40u2+j*^x&jZiO zQ~%zUak{5@2l5h=zMcH#zWgpOpYu`N!gtzUhzTN(x!Ub@)BYWC9YO!t(X;SSdfp{< zIFa?PSJs=Qk5O9`_{>`@^2I0@?N{z6tF$LQ0Yz{2F{@G@$WaMF<r<<6!V1p1OhX<2uXwF*f`8WZJSoKVp0P)AF zP4iYJd_v^uBgrv2EWx}I^&W7&kgeb>J)b%^K{_Oq zuf|S@vpJa54tKg44!Ef1-OzWA#L}2FUk!YI^hZZ(otch|Fk&2rZm-ViSh@TbEqDEG zD=0GSS|{}?mBhXmy&X^C#u18o`e5w){r>H0aCrarh1;q8Ac?Pt-i+&W#p}{orceoq zZU>l*d!To=t z4gI&!h9q7bEk$2X4PWjPF$nx7hpaufQF2(;O@y<;U~=2gCPyZxLBHm|!*KJ2-w0Q( zeaaK4%tLtyuR_>OP##AxK}S}7b%HyMo`k+AyCpoR9BEh;1`GaQo2o$h`x=tLJHy_1#ysq zI7mSpq#%w;K{R%OO}JqB17(}-pzA8FydAqe;u4h|z_3CVV5=@OjEE_!;UMp#$*qiV zqC9lb?L})dW8P-^L_Yz~v+^WN`%dKqCd@Ze8m1H)8V4%MK~j_l>ds>?)DU%^I=LAU(`>B#>JXqufSE$wt`8QF8vS21=E3P?J^f z-$SPt zq~>XmiKfJE=J)eOI*qOfEBgso5!SYHwi=fFy_lUaW{0jj=qR{5FGZ!7^!H?(e#ZGH zmq==X^NM&Ye9FhC!J`y$XL>BW)QzVjiHD+(V8m;O2((5<)EXtw8UrgJLt{-QXl9!T zmEb5wgT%Bgb`()hz2qjL6`J9t>N;;X)NG9G?GHEiv4FfxmfN8XoqJ1 zWDyxGG0i~6`fForArUc&VPr|+a6fG3pu)(+``&djbr~63eYz!IUm+K?Yu9m5%oFgqRB=U7HWJAqz8VD-s;b4Sp}rlve4|<9T8Hatk-2 zh1uWQ!Zo<_Kiidwqd{KB$tO@2U4St>p1QIWSG{_z6y>N_%#I^+$jOQ1|Bja~CE>be zlamR{%^dt7sMa^tsnV)IEkNlObt9~lZ4y%pb`Nq;0^Q`0E+EoQ)+FuRE7Hzp(2nP9 zo;cf(%A*D7!L2Ern)oPHlnMnEjL5Gjf4Y(%m4N?H9yMc9m%9b;RA-}lTpd0?f!FhR znehE%yer~v?5@(-g!7oc%8N*QFRgzHo^OF+q}pi@ptn*}R@~jpVq^?gP>Nj7TIH6y zX8KOGyv~NfW&C#Y_Q4e)+k#kPxk=m~0)=E-?;VWEv|SNHE#fy8=xH|z%mvDA0)8 zOJk;O$L?UvrdaPCEYKkqq0~3EOJaYI#xZZdpZKP}P=k5<<$BX)TMJFwX@3|<=o870 zQ?w5!;(r?GZe|cq#~O~^0{!X!ELakb-J%w{&}&KTchQ$o?<258bTydKL)sU4%)G6q zn$~d=&&hN@8a9MoR!(en5V@RhUX`BlIyO}NuG^9huZF*Ft@M~UerqFO=>0d zSv(l)#42fl?9^RMDyXK#FA9j1(Pb~8w>nSoh&Z2a-*GVJ) zt&r4(Hg-y<-e^Ec%NqHj#|rmq*43 z>}Bv-Gdkg?pqkV$5gTkU_{=Tfm*;Fc<$OkH7ox(`z-S<`{d&5?;S_K79kE9pb=9PU z>}L*6<5%ke(9`ld z-c8H}@U1d!B{)65A-)t;#`!wE@V79}jF~*v$&$Pqv4dN$5+IKa1mRy%?pdV;UBbHH zaZ`JnlzV4@<<1WfU}h|UPQ@fz$4#DeD` zEa$Wb3p0^bg230CwCDP;Cqjx(B!i=y98yv0V<7dx4hVb$s&!%|;>mTp>2CJTzSlWI z`{O<0NrjH+Q|QCKG3ud4 z?Ze10jy;sc6KEE5Left+ik}k6Q+Q7teHi&+E@G_M1><|72XObjV;d`$_3f`F2Bjmf zC{(qiFYK(^P9SmE;*W^3{0(s)a}iwOw6`w*Q=x@t4wFJUy1Y>jMu$-B(&JkT5-a3Y(GXk3*{?csd){@tH3b^mP-1fy<6P4!TTe-F3^U4@o?_{=H(d*3E zhU$XS8v7w_(YD{uWOwVv(-NJA9d!%s`ah4Hq@DeI$6}YN31g^ z#PAMG<|Jii@bjO>H*F*3Pv9hho_WG6iH z8eMmv;hpL()RsYQ9}DnGO^+(*8m4QPu1mU(sXc^JCudZl^^Rfc8+2l;625nGNVv{A znNwcPz;X$`ic=`>62v!g)IUg%_Fw(|#3^~T#=8pV`BJAI88EASHZOy3>Hi$cSl}l} zIM$IRJW)Fn`H$3d*gi^AmRHm>dAp^O)2@a;-yYkgJ`3h33!ZCA*l-z~vkurk5p!U0m6;9+ zVG{o{xUrtq z-anoC`-h3o`~HC>GVr*3XXt+g`rbcuT73U<=x+k&hpi&9f8^xkrz0b;;Zq$?fBoag ztCPR>jr?x%(?3UEz$Zf!z5e0Iuf8suKiVbG=!9p*noCEcxB@+A^htb2PTTSSr?qPj zZ=<^McV;AOEWc#g1luw8$gzXtIK+WG9G;4_$dcv65FRb?QO0&)$0^&$B(%=56q%UD z!J#B{$tHx4wM*${zx{Y+u}djVMN{}}x?yFD^vgQiFe%w8Z4=_G8%DMz&;HJ}oYM5) zb)vav?rUc5+xwWH&rXZb)|VvpbSc z@~}0zo#%QY`8W@sOm^__spQ}BFq~}X;nT^7dDxw7;o&pM2X)zZ-l(6sPrqQileibh z(}}x~cER|4q8TBqkS2mWd^*v%%EYh5qIGec16nWfM?B>E!3?vBH(FLkX_F>P;2kR2(m9)<~VjICetJo>jV6IXDzF#3M zl0x()Y8@mmO0@SRC~hg#5Rd;kKREY%9;8DC%<6%Gg!O2Aze5eH0+GXhPTc^ihf{L3 z5UT?Y@+iB`UsNQtcv>hYaGkNGenKzSV1GLT>;H2#P<$1SuT00UXog65ObTu?fM=5`x5PZA8mN>D97LoGtIb#SMC z-YA|vZ@f9((u6siYmxRV_eooMRPs?+G#Wh2mfFV4Y^(F+TLoyaYDyQO>N+T{;UW#W{PR8w(7vou#7vkBK=i}DOKgMmy zolzNW7a*4gj=?5-qb&?J3^MiBK|HTCJ5;-VrT=W}d81+aP-_jm>&WW$0qldQ=Z#yZ zVOwP)3$6A>f=%Qkf%cvj_MbPBurkp)2x}xpGmLk@W)g4|giK%)OVCENi$8}3bfvMj zhCldy%`%Uw6=D4!aqowjqvagr+N=qyW}Ff%6B-khm$y3LX#qHY2NZELTwWxXH>|qvr7X)eJr4 zcMNSo@5YfoGf6+FJ>EsBtf=-ErK~6gWH0)18%nhW!mu(zJ&@zUQRWq1<{RjHzsK)D!aFY-(?!DI#G{Wt*GBLZsiEk(9mL(`}t(^^RB>R|FBBbERaLx(ByEz z0w_FPk18P=ZHYwbhVbeYT9>y)CHyMBzkH<5q0b8f_BsD$n6)_@{TdL4guqANpl4UA zt>X;VHLzRjmLaF2))nZ7nYV;7O!)|Df_{|lHxNB2xH{u~3HTHXo3W5%52 zp6o5sVbO>C3w@mo+^eg7WR_BNzqKq0y8K68=9_aE*vwwh?u;ooI^nJZKc zxa&8pQt8KP^T(@f%ktz~-jG+VA7tMyzSRCBTRgYa_rCizZy}CV-b*bx`j6%1Jav_J zW$G%G_|&l&tu3x?f(|;g-8P#vZX;&3?+fDy?27+-I%PaPWg1S<#}i)|9&nD$+&fuG z6Xo2<^B*!z;6T2BCBeCIUVt7??<7*r+>!sp82%r@9eEz~XUt7=M#6KqZTZ$C?SDH5 zBZ^!=nu*`fnS0jEONPM*E@Pm8d0mNj8Uij0GdXBlfs@sgLBj>|5B#K>vQbGVYhR*L zpu;XZeKAbi0;?@ED<^LO6I`+`x-xXhWr5sR)UCi>WVlkauYvxfV0~l*?`7<5LOO-I zX#O|=Imn`Ks&58MHCCI9vPzqtt7WKV8oLf>@KLg<^dCK!@I}+qBH&(=KqiL<`q6?d zz?w_ZAND_rxA;kl?&SU1%;t=$s%HH8ni=g;NYR)2Lr6cuwZ!`ngS{H8_GG;evx`q) ziKC+ZG&D2G3l*d)p_EZMYf%7I9!eRX0>P;wWh!9>E|Tin+24)2_NR6=l6TA(JsBt5 z3y0P30nqK;zIFA!WQe zyQN80X>Ue~hG4e~Z#%U$fL&nVDeWE4sS@f6HGZrrSfkGx8MuODpsk7O6=7qMS~MS{ zQ}d?`$1Jwp5JNr$=e{8lQZU=E6tgy21eY4@gXf{W?jj9yryIYn&GSYFR&=?(z0B%s zE-v)lR?haqI>QVs{)v!Nl)nw!fxu@@7(G$4AiW#Xm`tp3)(4*R6vy85TpfGHV;$QG z3vkuGI(V^zMH-}j-;)(13$?_*hD=%^l7+5!LBXE^(r@!)_ZeR%YqY|*f@98;vw8TE z?Lm$UqcwiP^^y9FYH8_$KH>_eVD3E>FqF;-~2u`|NuvG&NLEn77VwYtX{)3An$ z&Iqj6D=^HB+)NeN{Cdi9H)Dq1>gs~Fu@G7p`XJP$5+9xfj}~ie(T{;u8CHk2ef6{O zO5qrK7Uw-`kM?C;>V$u?Mxdx+?Zy!;)TQlYsa05-H|kAO_R$^Mrki>_8DkNkW+@## z19=#@_k5nj=uw{MPh-%`@?1PYoSk^LxOmnWnqe4gWS8y;dS!W1xc1n3Rx6X0OdwMU z872ZtA>m8EydwvCk;Bz;Y}R-IEo_O>n0XnE9SeZsztPY zbqQ5c4u$?Da2Dg^+f&2wAK~qi)e>lyE-8k7mC(_m1t2TD3VQbIK=0D_t$;NXZAAM( zjcEIu3RkLX%J?j)s9UgefSTfx3pUkVXCcS?2%cG<2cJ0&K0~&__Vky)0>FWpYTvWX z^mQv-BQdOjU@g$O=Kg_zack?k_`$@JwRpFXO-4UxD~-umjK+ zs_LLNb&Q&ZXzJ))&8DtC8R*&kWTWV=XnCS>%nOS}&}O;=EqV9Ul{I~{|8~^W4BLgY z3k@orqa50sHF{==>i<9$d^%buo&bsgyy(dEYoRM^xxfDr)Kbf9`ETeQNtk=3jJtsV zuE#oUJ9zi$liRf} Bg<5tx1^7M~+9po>QbVzohbk2;Z^lLp0rtzCubFtMIS?vJ_ zoXg?q-;Eqe>?5C#Qykf@yQP0G;{F%5>nO$^RrwRlx7@1!eMtQr`_ioX2crs?&}HDt z4^3BfMBKPbE4a@hi2wqJvKnsF*c<@eQ{#pru0XD9Ps-$bvWCyip7M%E-fx5oh_UoUvw7xyq(Sr^24#CGt#-x0*@PBk_WR4 z8U8IryBul^iP_JF#N3am-U=zR*RwSy*?T=-k4ag*o||J*cCW`3bLx^W%lp))timhz zdbY(V-$Oj#-|&3ZJYP=CtN`NiJt`x{oX$+~;V9Ko9D_$H`%zFr>{n8xWaGLWobKhc zm(xK`Q*I%a#p$EC3*;Aheopst+RN!6r|C|SpVP<2j^eIRLf|Dh-OFh&r-PiPJ4Xpl zAH}mEKjZm1-OFiuMj;mDH1?Fo1mDJW4oI9H)IZK+(SS#Cu$bF(mz!0*?4$aY@s@DL zk`?ee`5xULB8a_{5<(IWFX`6Zb&_u5Ms=k%+NSU|X06OJty&neb?aP|~e9=7a*J z50p*8zEc*cjb$^V{hr@pj$Vg3k+5i?RuC*w3xdV?m0(U&&{z;GP#^PIZ=8tdH|7Nw zYA<co|JnWpe(;}_(e^0*}bBg>kl`~{a8Z}csu=o z88S(xQVZTCgB^jUKQ2R|IUi<;v=8q-iFEAWSI7e_BlW_Ahsg-N-qr(LXP zosR0llS;MYD`GWGi*`T%CID_OK1sEwDI<0rYVRP8J2*;_uO;OuaE5dKKqj}&GxZPEXb~BWvq}1 z409|Tul(D2Wdsu?3os11d5oR7Q($-p3cUhLK4WKbUWD^asOH=Tfn{$L0JvvLb}1r} zE(XL3S#x->vTR_GVVt%-f3JCf9a|zU6;=zl__;O8%*ulgg|~&7LktOLmNg6i2d>3J A-2eap From 7eaef66ba2cf87ce3a3735bdb9e3576b1ddcccc6 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Thu, 14 Jul 2016 17:09:30 +0200 Subject: [PATCH 56/67] rename scater file for nRF52 ARM_5 --- .../TOOLCHAIN_ARM_STD/{nRF51822.sct => nRF52832.sct} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/{nRF51822.sct => nRF52832.sct} (100%) diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/nRF51822.sct b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/nRF52832.sct similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/nRF51822.sct rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/nRF52832.sct From d433b55763432c823ee380a60d704ac7ed3b5f3a Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Fri, 15 Jul 2016 13:10:20 +0200 Subject: [PATCH 57/67] changes from CR of IAR fixes for nRF5x port --- .../TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/nRF52832.sct | 2 +- .../TARGET_MCU_NRF52832/TOOLCHAIN_IAR/nRF52832.icf | 4 ++-- .../TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/nRF52832.sct b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/nRF52832.sct index e93ab78131..70df192ed2 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/nRF52832.sct +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_ARM_STD/nRF52832.sct @@ -18,7 +18,7 @@ LR_IROM1 0x1C000 0x0064000 { *(InRoot$$Sections) .ANY (+RO) } - RW_IRAM1 0x20002080 0x0000DF80 { + RW_IRAM1 0x20002EF8 0x0000D108 { .ANY (+RW +ZI) } } diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_IAR/nRF52832.icf b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_IAR/nRF52832.icf index 5aa8116de8..7b7aaf86b3 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_IAR/nRF52832.icf +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TOOLCHAIN_IAR/nRF52832.icf @@ -6,13 +6,13 @@ define symbol __ICFEDIT_intvec_start__ = 0x1c000; /*-Memory Regions-*/ define symbol __ICFEDIT_region_ROM_start__ = 0x1c000; define symbol __ICFEDIT_region_ROM_end__ = 0x7ffff; -define symbol __ICFEDIT_region_RAM_start__ = 0x20002080; +define symbol __ICFEDIT_region_RAM_start__ = 0x20002ef8; define symbol __ICFEDIT_region_RAM_end__ = 0x2000ffff; export symbol __ICFEDIT_region_RAM_start__; export symbol __ICFEDIT_region_RAM_end__; /*-Sizes-*/ /*Heap 1/4 of ram and stack 1/8*/ -define symbol __ICFEDIT_size_cstack__ = 0xc00; +define symbol __ICFEDIT_size_cstack__ = 0x800; define symbol __ICFEDIT_size_heap__ = 0x1800; /**** End of ICF editor section. ###ICF###*/ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c index 0d7ed9f410..821e2b3bf4 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c @@ -62,7 +62,7 @@ uint16_t analogin_read_u16(analogin_t *obj) nrf_drv_adc_channel_t adc_channel; - + // initialization by assigment because IAR dosen't support variable initializer in declaration statement. adc_channel.config.config.resolution = NRF_ADC_CONFIG_RES_10BIT; adc_channel.config.config.input = NRF_ADC_CONFIG_SCALING_INPUT_FULL_SCALE; adc_channel.config.config.reference = NRF_ADC_CONFIG_REF_VBG; From 62543f1337a4f4fcd4d28f69d1105a5b518818fe Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Fri, 15 Jul 2016 13:16:01 +0200 Subject: [PATCH 58/67] remove unrichable return statment --- hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c index 9ba0e7be4a..df3053398d 100644 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/os_tick.c @@ -374,7 +374,6 @@ uint32_t os_tick_val(void) { return clock_cycles_by_tick - ((current_counter - next_tick_cc_value) % clock_cycles_by_tick); } - //return 0; } #endif // defined(TARGET_MCU_NRF51822) From d99843745bf8a9266653c98697e29a306bd5abb8 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Tue, 19 Jul 2016 09:37:42 +0200 Subject: [PATCH 59/67] lf clock config prove of concept --- .../TARGET_MCU_NRF51822/system_nrf51.c | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c index dce575ab03..323a4e95d6 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c @@ -104,8 +104,32 @@ void SystemInit(void) *(uint32_t volatile *)0x4006EC14 = 0xC0; } + + #define NRF_LF_SRC_XTAL 2 + #define NRF_LF_SRC_SYNTH 3 + #define NRF_LF_SRC_RC 4 + + //MBED_CONF_APP_NORDIC_NRF_LF_CLOCK_SRC + #if MBED_CONF_APP_NORDIC_NRF_LF_CLOCK_SRC == NRF_LF_SRC_SYNTH + #define CLOCK_LFCLKSRC_SRC_TO_USE (CLOCK_LFCLKSRC_SRC_Synth) + #warning synhetic clock + #elif MBED_CONF_APP_NORDIC_NRF_LF_CLOCK_SRC == NRF_LF_SRC_XTAL + #define CLOCK_LFCLKSRC_SRC_TO_USE (CLOCK_LFCLKSRC_SRC_Xtal) + #warning crystal clock + #elif MBED_CONF_APP_NORDIC_NRF_LF_CLOCK_SRC == NRF_LF_SRC_RC // and undefined + #define CLOCK_LFCLKSRC_SRC_TO_USE (CLOCK_LFCLKSRC_SRC_RC) + #warning RC clock + #else + #error Bad LFCLK configuration. Declare proper source through mbed configuration. + #endif + + #undef NRF_LF_SRC_XTAL + #undef NRF_LF_SRC_SYNTH + #undef NRF_LF_SRC_RC + // Start the external 32khz crystal oscillator. - NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos); + //NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos); + NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_TO_USE << CLOCK_LFCLKSRC_SRC_Pos); NRF_CLOCK->EVENTS_LFCLKSTARTED = 0; NRF_CLOCK->TASKS_LFCLKSTART = 1; From be4687540c7d4cd43f5391d01e510f3fedb3696e Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Tue, 19 Jul 2016 10:33:57 +0200 Subject: [PATCH 60/67] startup configuraton of LF oscilator over mbed configuration system. --- .../TARGET_MCU_NRF51822/system_nrf51.c | 27 +------- .../TARGET_MCU_NRF52832/system_nrf52.c | 5 +- .../TARGET_NRF5/nrf5x_lf_clk_helper.h | 66 +++++++++++++++++++ 3 files changed, 71 insertions(+), 27 deletions(-) create mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/nrf5x_lf_clk_helper.h diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c index 323a4e95d6..ead48866be 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c @@ -44,6 +44,7 @@ #include #include "nrf.h" #include "system_nrf51.h" +#include "nrf5x_lf_clk_helper.h" /*lint ++flb "Enter library region" */ @@ -103,32 +104,8 @@ void SystemInit(void) } *(uint32_t volatile *)0x4006EC14 = 0xC0; } - - #define NRF_LF_SRC_XTAL 2 - #define NRF_LF_SRC_SYNTH 3 - #define NRF_LF_SRC_RC 4 - - //MBED_CONF_APP_NORDIC_NRF_LF_CLOCK_SRC - #if MBED_CONF_APP_NORDIC_NRF_LF_CLOCK_SRC == NRF_LF_SRC_SYNTH - #define CLOCK_LFCLKSRC_SRC_TO_USE (CLOCK_LFCLKSRC_SRC_Synth) - #warning synhetic clock - #elif MBED_CONF_APP_NORDIC_NRF_LF_CLOCK_SRC == NRF_LF_SRC_XTAL - #define CLOCK_LFCLKSRC_SRC_TO_USE (CLOCK_LFCLKSRC_SRC_Xtal) - #warning crystal clock - #elif MBED_CONF_APP_NORDIC_NRF_LF_CLOCK_SRC == NRF_LF_SRC_RC // and undefined - #define CLOCK_LFCLKSRC_SRC_TO_USE (CLOCK_LFCLKSRC_SRC_RC) - #warning RC clock - #else - #error Bad LFCLK configuration. Declare proper source through mbed configuration. - #endif - - #undef NRF_LF_SRC_XTAL - #undef NRF_LF_SRC_SYNTH - #undef NRF_LF_SRC_RC - - // Start the external 32khz crystal oscillator. - //NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos); + // Start the LF oscilator according to the mbed configuration (over the nrf5x_lf_clk_helper.h file) NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_TO_USE << CLOCK_LFCLKSRC_SRC_Pos); NRF_CLOCK->EVENTS_LFCLKSTARTED = 0; NRF_CLOCK->TASKS_LFCLKSTART = 1; diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.c b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.c index 604203247c..89d125a37d 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.c +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/system_nrf52.c @@ -41,6 +41,7 @@ #include #include "nrf.h" #include "system_nrf52.h" +#include "nrf5x_lf_clk_helper.h" /*lint ++flb "Enter library region" */ @@ -197,8 +198,8 @@ void SystemInit(void) SystemCoreClockUpdate(); - // Start the external 32khz crystal oscillator. - NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos); + // Start the LF oscilator according to the mbed configuration (over the nrf5x_lf_clk_helper.h file) + NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_TO_USE << CLOCK_LFCLKSRC_SRC_Pos); NRF_CLOCK->EVENTS_LFCLKSTARTED = 0; NRF_CLOCK->TASKS_LFCLKSTART = 1; diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/nrf5x_lf_clk_helper.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/nrf5x_lf_clk_helper.h new file mode 100644 index 0000000000..77bdcec0fb --- /dev/null +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/nrf5x_lf_clk_helper.h @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2016 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 or object form under this license must not be reverse + * engineered, decompiled, modified and/or disassembled. + * + * 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 __NRF5X_LF_CLK_HELPER_H_ + +#ifndef MBED_CONF_APP_NORDIC_NRF_LF_CLOCK_SRC + #define MBED_CONF_APP_NORDIC_NRF_LF_CLOCK_SRC (NRF_LF_SRC_XTAL) + #warning Non of LF clk src configurartion! Sett to LF Xtal. +#endif + + + +#define NRF_LF_SRC_XTAL 2 +#define NRF_LF_SRC_SYNTH 3 +#define NRF_LF_SRC_RC 4 + +#if MBED_CONF_APP_NORDIC_NRF_LF_CLOCK_SRC == NRF_LF_SRC_SYNTH + #define CLOCK_LFCLKSRC_SRC_TO_USE (CLOCK_LFCLKSRC_SRC_Synth) +#elif MBED_CONF_APP_NORDIC_NRF_LF_CLOCK_SRC == NRF_LF_SRC_XTAL + #define CLOCK_LFCLKSRC_SRC_TO_USE (CLOCK_LFCLKSRC_SRC_Xtal) +#elif MBED_CONF_APP_NORDIC_NRF_LF_CLOCK_SRC == NRF_LF_SRC_RC + #define CLOCK_LFCLKSRC_SRC_TO_USE (CLOCK_LFCLKSRC_SRC_RC) +#else + #error Bad LFCLK configuration. Declare proper source through mbed configuration. +#endif + +#undef NRF_LF_SRC_XTAL +#undef NRF_LF_SRC_SYNTH +#undef NRF_LF_SRC_RC + +#endif From fa5937fce8ea3841cce14c7dafc6a352f40ba750 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Tue, 19 Jul 2016 20:29:38 +0200 Subject: [PATCH 61/67] Add configuration of LF clk source in targer.json for targets MCU_NRF51 & MCU_NRF52 Fix typo --- hal/targets.json | 16 ++++++++++++++-- .../TARGET_NRF5/nrf5x_lf_clk_helper.h | 12 ++++++------ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/hal/targets.json b/hal/targets.json index 19da922c0f..2796571595 100644 --- a/hal/targets.json +++ b/hal/targets.json @@ -1107,7 +1107,13 @@ }, "program_cycle_s": 6, "default_build": "small", - "features": ["BLE"] + "features": ["BLE"], + "config":{ + "lf_clock_src": { + "value": "NRF_LF_SRC_XTAL", + "macro_name": "MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC" + } + } }, "MCU_NRF51_16K_BASE": { "inherits": ["MCU_NRF51"], @@ -1721,7 +1727,13 @@ "toolchains": ["ARM_STD", "GCC_ARM"] }, "MERGE_BOOTLOADER": false, - "features": ["BLE"] + "features": ["BLE"], + "config":{ + "lf_clock_src": { + "value": "NRF_LF_SRC_XTAL", + "macro_name": "MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC" + } + } }, "NRF52_DK": { "supported_form_factors": ["ARDUINO"], diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/nrf5x_lf_clk_helper.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/nrf5x_lf_clk_helper.h index 77bdcec0fb..08744be767 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/nrf5x_lf_clk_helper.h +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/nrf5x_lf_clk_helper.h @@ -38,9 +38,9 @@ #ifndef __NRF5X_LF_CLK_HELPER_H_ -#ifndef MBED_CONF_APP_NORDIC_NRF_LF_CLOCK_SRC - #define MBED_CONF_APP_NORDIC_NRF_LF_CLOCK_SRC (NRF_LF_SRC_XTAL) - #warning Non of LF clk src configurartion! Sett to LF Xtal. +#ifndef MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC + #define MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC (NRF_LF_SRC_XTAL) + #warning No configuration for LF clock source. Xtal source will be used as a default configuration. #endif @@ -49,11 +49,11 @@ #define NRF_LF_SRC_SYNTH 3 #define NRF_LF_SRC_RC 4 -#if MBED_CONF_APP_NORDIC_NRF_LF_CLOCK_SRC == NRF_LF_SRC_SYNTH +#if MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC == NRF_LF_SRC_SYNTH #define CLOCK_LFCLKSRC_SRC_TO_USE (CLOCK_LFCLKSRC_SRC_Synth) -#elif MBED_CONF_APP_NORDIC_NRF_LF_CLOCK_SRC == NRF_LF_SRC_XTAL +#elif MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC == NRF_LF_SRC_XTAL #define CLOCK_LFCLKSRC_SRC_TO_USE (CLOCK_LFCLKSRC_SRC_Xtal) -#elif MBED_CONF_APP_NORDIC_NRF_LF_CLOCK_SRC == NRF_LF_SRC_RC +#elif MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC == NRF_LF_SRC_RC #define CLOCK_LFCLKSRC_SRC_TO_USE (CLOCK_LFCLKSRC_SRC_RC) #else #error Bad LFCLK configuration. Declare proper source through mbed configuration. From 6d214eb76a1457685c33272e959f3cb8e1facd9a Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Tue, 19 Jul 2016 22:40:18 +0100 Subject: [PATCH 62/67] ARM cc has difficulties to link binary with undefined symbols, even if those symbols are not used. bootloader and log are not needed in our case, just remove files causing troubles. define app_timer symbols with the RTX implementation. --- .../sdk/ble/ble_error_log/ble_error_log.c | 85 ---- .../sdk/libraries/bootloader_dfu/bootloader.c | 409 ------------------ .../bootloader_dfu/bootloader_settings.c | 92 ---- .../sdk/libraries/timer/app_timer_rtx.c | 239 ++++++++++ 4 files changed, 239 insertions(+), 586 deletions(-) delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_error_log/ble_error_log.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.c create mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/timer/app_timer_rtx.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_error_log/ble_error_log.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_error_log/ble_error_log.c deleted file mode 100644 index 1c827515b6..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/ble_error_log/ble_error_log.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2012 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 or object form under this license must not be reverse - * engineered, decompiled, modified and/or disassembled. - * - * 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 -#include -#include -#include -#include "ble_error_log.h" -#include "app_util.h" -#include "app_error.h" -#include "nrf_gpio.h" -#include "pstorage.h" - - -// Made static to avoid the error_log to go on the stack. -static ble_error_log_data_t m_ble_error_log; /**< . */ -//lint -esym(526,__Vectors) -extern uint32_t * __Vectors; /**< The initialization vector holds the address to __initial_sp that will be used when fetching the stack. */ - -static void fetch_stack(ble_error_log_data_t * error_log) -{ - uint32_t * p_stack; - uint32_t * initial_sp; - uint32_t length; - - initial_sp = (uint32_t *) __Vectors; - p_stack = (uint32_t *) GET_SP(); - - length = ((uint32_t) initial_sp) - ((uint32_t) p_stack); - memcpy(error_log->stack_info, - p_stack, - (length > STACK_DUMP_LENGTH) ? STACK_DUMP_LENGTH : length); -} - -uint32_t ble_error_log_write(uint32_t err_code, const uint8_t * p_message, uint16_t line_number) -{ - m_ble_error_log.failure = true; - m_ble_error_log.err_code = err_code; - m_ble_error_log.line_number = line_number; - - strncpy((char *)m_ble_error_log.message, (const char *)p_message, ERROR_MESSAGE_LENGTH - 1); - m_ble_error_log.message[ERROR_MESSAGE_LENGTH - 1] = '\0'; - - fetch_stack(&m_ble_error_log); - - // Write to flash removed, to be redone. - - return NRF_SUCCESS; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader.c deleted file mode 100644 index 390c945495..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader.c +++ /dev/null @@ -1,409 +0,0 @@ -/* - * Copyright (c) 2013 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 or object form under this license must not be reverse - * engineered, decompiled, modified and/or disassembled. - * - * 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.h" -#include "bootloader_types.h" -#include "bootloader_util.h" -#include "bootloader_settings.h" -#include "dfu.h" -#include "dfu_transport.h" -#include "nrf.h" -#include "app_error.h" -#include "nrf_sdm.h" -#include "nrf_mbr.h" -#include "nordic_common.h" -#include "crc16.h" -#include "pstorage.h" -#include "app_scheduler.h" -#include "nrf_delay.h" -#include "sdk_common.h" - -#define IRQ_ENABLED 0x01 /**< Field identifying if an interrupt is enabled. */ -#define MAX_NUMBER_INTERRUPTS 32 /**< Maximum number of interrupts available. */ - -/**@brief Enumeration for specifying current bootloader status. - */ -typedef enum -{ - BOOTLOADER_UPDATING, /**< Bootloader status for indicating that an update is in progress. */ - BOOTLOADER_SETTINGS_SAVING, /**< Bootloader status for indicating that saving of bootloader settings is in progress. */ - BOOTLOADER_COMPLETE, /**< Bootloader status for indicating that all operations for the update procedure has completed and it is safe to reset the system. */ - BOOTLOADER_TIMEOUT, /**< Bootloader status field for indicating that a timeout has occured and current update process should be aborted. */ - BOOTLOADER_RESET, /**< Bootloader status field for indicating that a reset has been requested and current update process should be aborted. */ -} bootloader_status_t; - -static pstorage_handle_t m_bootsettings_handle; /**< Pstorage handle to use for registration and identifying the bootloader module on subsequent calls to the pstorage module for load and store of bootloader setting in flash. */ -static bootloader_status_t m_update_status; /**< Current update status for the bootloader module to ensure correct behaviour when updating settings and when update completes. */ - -/**@brief Function for handling callbacks from pstorage module. - * - * @details Handles pstorage results for clear and storage operation. For detailed description of - * the parameters provided with the callback, please refer to \ref pstorage_ntf_cb_t. - */ -static void pstorage_callback_handler(pstorage_handle_t * p_handle, - uint8_t op_code, - uint32_t result, - uint8_t * p_data, - uint32_t data_len) -{ - // If we are in BOOTLOADER_SETTINGS_SAVING state and we receive an PSTORAGE_STORE_OP_CODE - // response then settings has been saved and update has completed. - if ((m_update_status == BOOTLOADER_SETTINGS_SAVING) && (op_code == PSTORAGE_STORE_OP_CODE)) - { - m_update_status = BOOTLOADER_COMPLETE; - } - - APP_ERROR_CHECK(result); -} - - -/**@brief Function for waiting for events. - * - * @details This function will place the chip in low power mode while waiting for events from - * the SoftDevice or other peripherals. When interrupted by an event, it will call the - * @ref app_sched_execute function to process the received event. This function will return - * when the final state of the firmware update is reached OR when a tear down is in - * progress. - */ -static void wait_for_events(void) -{ - for (;;) - { - // Wait in low power state for any events. - uint32_t err_code = sd_app_evt_wait(); - APP_ERROR_CHECK(err_code); - - // Event received. Process it from the scheduler. - app_sched_execute(); - - if ((m_update_status == BOOTLOADER_COMPLETE) || - (m_update_status == BOOTLOADER_TIMEOUT) || - (m_update_status == BOOTLOADER_RESET)) - { - // When update has completed or a timeout/reset occured we will return. - return; - } - } -} - - -bool bootloader_app_is_valid(uint32_t app_addr) -{ - const bootloader_settings_t * p_bootloader_settings; - - // There exists an application in CODE region 1. - if (*((uint32_t *)app_addr) == EMPTY_FLASH_MASK) - { - return false; - } - - bool success = false; - - bootloader_util_settings_get(&p_bootloader_settings); - - // The application in CODE region 1 is flagged as valid during update. - if (p_bootloader_settings->bank_0 == BANK_VALID_APP) - { - uint16_t image_crc = 0; - - // A stored crc value of 0 indicates that CRC checking is not used. - if (p_bootloader_settings->bank_0_crc != 0) - { - image_crc = crc16_compute((uint8_t *)DFU_BANK_0_REGION_START, - p_bootloader_settings->bank_0_size, - NULL); - } - - success = (image_crc == p_bootloader_settings->bank_0_crc); - } - - return success; -} - - -static void bootloader_settings_save(bootloader_settings_t * p_settings) -{ - uint32_t err_code = pstorage_clear(&m_bootsettings_handle, sizeof(bootloader_settings_t)); - APP_ERROR_CHECK(err_code); - - err_code = pstorage_store(&m_bootsettings_handle, - (uint8_t *)p_settings, - sizeof(bootloader_settings_t), - 0); - APP_ERROR_CHECK(err_code); -} - - -void bootloader_dfu_update_process(dfu_update_status_t update_status) -{ - static bootloader_settings_t settings; - const bootloader_settings_t * p_bootloader_settings; - - bootloader_util_settings_get(&p_bootloader_settings); - - if (update_status.status_code == DFU_UPDATE_APP_COMPLETE) - { - settings.bank_0_crc = update_status.app_crc; - settings.bank_0_size = update_status.app_size; - settings.bank_0 = BANK_VALID_APP; - settings.bank_1 = BANK_INVALID_APP; - - m_update_status = BOOTLOADER_SETTINGS_SAVING; - bootloader_settings_save(&settings); - } - else if (update_status.status_code == DFU_UPDATE_SD_COMPLETE) - { - settings.bank_0_crc = update_status.app_crc; - settings.bank_0_size = update_status.sd_size + - update_status.bl_size + - update_status.app_size; - settings.bank_0 = BANK_VALID_SD; - settings.bank_1 = BANK_INVALID_APP; - settings.sd_image_size = update_status.sd_size; - settings.bl_image_size = update_status.bl_size; - settings.app_image_size = update_status.app_size; - settings.sd_image_start = update_status.sd_image_start; - - m_update_status = BOOTLOADER_SETTINGS_SAVING; - bootloader_settings_save(&settings); - } - else if (update_status.status_code == DFU_UPDATE_BOOT_COMPLETE) - { - settings.bank_0 = p_bootloader_settings->bank_0; - settings.bank_0_crc = p_bootloader_settings->bank_0_crc; - settings.bank_0_size = p_bootloader_settings->bank_0_size; - settings.bank_1 = BANK_VALID_BOOT; - settings.sd_image_size = update_status.sd_size; - settings.bl_image_size = update_status.bl_size; - settings.app_image_size = update_status.app_size; - - m_update_status = BOOTLOADER_SETTINGS_SAVING; - bootloader_settings_save(&settings); - } - else if (update_status.status_code == DFU_UPDATE_SD_SWAPPED) - { - if (p_bootloader_settings->bank_0 == BANK_VALID_SD) - { - settings.bank_0_crc = 0; - settings.bank_0_size = 0; - settings.bank_0 = BANK_INVALID_APP; - } - // This handles cases where SoftDevice was not updated, hence bank0 keeps its settings. - else - { - settings.bank_0 = p_bootloader_settings->bank_0; - settings.bank_0_crc = p_bootloader_settings->bank_0_crc; - settings.bank_0_size = p_bootloader_settings->bank_0_size; - } - - settings.bank_1 = BANK_INVALID_APP; - settings.sd_image_size = 0; - settings.bl_image_size = 0; - settings.app_image_size = 0; - - m_update_status = BOOTLOADER_SETTINGS_SAVING; - bootloader_settings_save(&settings); - } - else if (update_status.status_code == DFU_TIMEOUT) - { - // Timeout has occurred. Close the connection with the DFU Controller. - uint32_t err_code = dfu_transport_close(); - APP_ERROR_CHECK(err_code); - - m_update_status = BOOTLOADER_TIMEOUT; - } - else if (update_status.status_code == DFU_BANK_0_ERASED) - { - settings.bank_0_crc = 0; - settings.bank_0_size = 0; - settings.bank_0 = BANK_INVALID_APP; - settings.bank_1 = p_bootloader_settings->bank_1; - - bootloader_settings_save(&settings); - } - else if (update_status.status_code == DFU_RESET) - { - m_update_status = BOOTLOADER_RESET; - } - else - { - // No implementation needed. - } -} - - -uint32_t bootloader_init(void) -{ - uint32_t err_code; - pstorage_module_param_t storage_params = {.cb = pstorage_callback_handler}; - - err_code = pstorage_init(); - VERIFY_SUCCESS(err_code); - - m_bootsettings_handle.block_id = BOOTLOADER_SETTINGS_ADDRESS; - err_code = pstorage_register(&storage_params, &m_bootsettings_handle); - - return err_code; -} - - -uint32_t bootloader_dfu_start(void) -{ - uint32_t err_code; - - // Clear swap if banked update is used. - err_code = dfu_init(); - VERIFY_SUCCESS(err_code); - - err_code = dfu_transport_update_start(); - - wait_for_events(); - - return err_code; -} - - -/**@brief Function for disabling all interrupts before jumping from bootloader to application. - */ -static void interrupts_disable(void) -{ - uint32_t interrupt_setting_mask; - uint32_t irq = 0; // We start from first interrupt, i.e. interrupt 0. - - // Fetch the current interrupt settings. - interrupt_setting_mask = NVIC->ISER[0]; - - for (; irq < MAX_NUMBER_INTERRUPTS; irq++) - { - if (interrupt_setting_mask & (IRQ_ENABLED << irq)) - { - // The interrupt was enabled, and hence disable it. - NVIC_DisableIRQ((IRQn_Type)irq); - } - } -} - - -void bootloader_app_start(uint32_t app_addr) -{ - // If the applications CRC has been checked and passed, the magic number will be written and we - // can start the application safely. - uint32_t err_code = sd_softdevice_disable(); - APP_ERROR_CHECK(err_code); - - interrupts_disable(); - - err_code = sd_softdevice_vector_table_base_set(CODE_REGION_1_START); - APP_ERROR_CHECK(err_code); - - bootloader_util_app_start(CODE_REGION_1_START); -} - - -bool bootloader_dfu_sd_in_progress(void) -{ - const bootloader_settings_t * p_bootloader_settings; - - bootloader_util_settings_get(&p_bootloader_settings); - - if (p_bootloader_settings->bank_0 == BANK_VALID_SD || - p_bootloader_settings->bank_1 == BANK_VALID_BOOT) - { - return true; - } - - return false; -} - - -uint32_t bootloader_dfu_sd_update_continue(void) -{ - uint32_t err_code; - - if ((dfu_sd_image_validate() == NRF_SUCCESS) && - (dfu_bl_image_validate() == NRF_SUCCESS)) - { - return NRF_SUCCESS; - } - - // Ensure that flash operations are not executed within the first 100 ms seconds to allow - // a debugger to be attached. - nrf_delay_ms(100); - - err_code = dfu_sd_image_swap(); - APP_ERROR_CHECK(err_code); - - err_code = dfu_sd_image_validate(); - APP_ERROR_CHECK(err_code); - - err_code = dfu_bl_image_swap(); - APP_ERROR_CHECK(err_code); - - return err_code; -} - - -uint32_t bootloader_dfu_sd_update_finalize(void) -{ - dfu_update_status_t update_status = {DFU_UPDATE_SD_SWAPPED, }; - - bootloader_dfu_update_process(update_status); - - wait_for_events(); - - return NRF_SUCCESS; -} - - -void bootloader_settings_get(bootloader_settings_t * const p_settings) -{ - const bootloader_settings_t * p_bootloader_settings; - - bootloader_util_settings_get(&p_bootloader_settings); - - p_settings->bank_0 = p_bootloader_settings->bank_0; - p_settings->bank_0_crc = p_bootloader_settings->bank_0_crc; - p_settings->bank_0_size = p_bootloader_settings->bank_0_size; - p_settings->bank_1 = p_bootloader_settings->bank_1; - p_settings->sd_image_size = p_bootloader_settings->sd_image_size; - p_settings->bl_image_size = p_bootloader_settings->bl_image_size; - p_settings->app_image_size = p_bootloader_settings->app_image_size; - p_settings->sd_image_start = p_bootloader_settings->sd_image_start; -} - diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.c deleted file mode 100644 index 7eef54ea4a..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2013 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 or object form under this license must not be reverse - * engineered, decompiled, modified and/or disassembled. - * - * 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. - * - */ -#ifdef NORDIC_BOOTLOADER_SETTINGS // avoid from unwanted commpilation - -#include "bootloader_settings.h" -#include -#include - -#if defined ( __CC_ARM ) - -uint8_t m_boot_settings[CODE_PAGE_SIZE] __attribute__((at(BOOTLOADER_SETTINGS_ADDRESS))) __attribute__((used)); /**< This variable reserves a codepage for bootloader specific settings, to ensure the compiler doesn't locate any code or variables at his location. */ -uint32_t m_uicr_bootloader_start_address __attribute__((at(NRF_UICR_BOOT_START_ADDRESS))) = BOOTLOADER_REGION_START; /**< This variable makes the linker script write the bootloader start address to the UICR register. This value will be written in the HEX file and thus written to UICR when the bootloader is flashed into the chip. */ - -#elif defined ( __GNUC__ ) - -uint8_t m_boot_settings[CODE_PAGE_SIZE] __attribute__ ((section(".bootloaderSettings"))); /**< This variable reserves a codepage for bootloader specific settings, to ensure the compiler doesn't locate any code or variables at his location. */ -volatile uint32_t m_uicr_bootloader_start_address __attribute__ ((section(".uicrBootStartAddress"))) = BOOTLOADER_REGION_START; /**< This variable ensures that the linker script will write the bootloader start address to the UICR register. This value will be written in the HEX file and thus written to UICR when the bootloader is flashed into the chip. */ - -#elif defined ( __ICCARM__ ) - -__no_init uint8_t m_boot_settings[CODE_PAGE_SIZE] @ BOOTLOADER_SETTINGS_ADDRESS; /**< This variable reserves a codepage for bootloader specific settings, to ensure the compiler doesn't locate any code or variables at his location. */ -__root const uint32_t m_uicr_bootloader_start_address @ NRF_UICR_BOOT_START_ADDRESS = BOOTLOADER_REGION_START; /**< This variable ensures that the linker script will write the bootloader start address to the UICR register. This value will be written in the HEX file and thus written to UICR when the bootloader is flashed into the chip. */ - -#endif - -#if defined ( NRF52 ) -#if defined ( __CC_ARM ) - -uint8_t m_mbr_params_page[CODE_PAGE_SIZE] __attribute__((at(BOOTLOADER_MBR_PARAMS_PAGE_ADDRESS))) __attribute__((used)); /**< This variable reserves a codepage for mbr parameters, to ensure the compiler doesn't locate any code or variables at his location. */ -uint32_t m_uicr_mbr_params_page_address __attribute__((at(NRF_UICR_MBR_PARAMS_PAGE_ADDRESS))) - = BOOTLOADER_MBR_PARAMS_PAGE_ADDRESS; /**< This variable makes the linker script write the mbr parameters page address to the UICR register. This value will be written in the HEX file and thus written to the UICR when the bootloader is flashed into the chip */ - -#elif defined (__GNUC__ ) - -uint8_t m_mbr_params_page[CODE_PAGE_SIZE] __attribute__ ((section(".mbrParamsPage"))); /**< This variable reserves a codepage for mbr parameters, to ensure the compiler doesn't locate any code or variables at his location. */ -volatile uint32_t m_uicr_mbr_params_page_address __attribute__ ((section(".uicrMbrParamsPageAddress"))) - = BOOTLOADER_MBR_PARAMS_PAGE_ADDRESS; /**< This variable makes the linker script write the mbr parameters page address to the UICR register. This value will be written in the HEX file and thus written to the UICR when the bootloader is flashed into the chip */ - -#elif defined (__ICCARM__ ) - -__no_init uint8_t m_mbr_params_page[CODE_PAGE_SIZE] @ BOOTLOADER_MBR_PARAMS_PAGE_ADDRESS; /**< This variable reserves a codepage for bootloader specific settings, to ensure the compiler doesn't locate any code or variables at his location. */ -__root const uint32_t m_uicr_mbr_params_page_address @ NRF_UICR_MBR_PARAMS_PAGE_ADDRESS = BOOTLOADER_MBR_PARAMS_PAGE_ADDRESS; /**< This variable ensures that the linker script will write the bootloader start address to the UICR register. This value will be written in the HEX file and thus written to UICR when the bootloader is flashed into the chip. */ - -#endif -#endif //defined ( NRF52 ) - - -void bootloader_util_settings_get(const bootloader_settings_t ** pp_bootloader_settings) -{ - // Read only pointer to bootloader settings in flash. - bootloader_settings_t const * const p_bootloader_settings = - (bootloader_settings_t *)&m_boot_settings[0]; - - *pp_bootloader_settings = p_bootloader_settings; -} - -#endif // NORDIC_BOOTLOADER diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/timer/app_timer_rtx.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/timer/app_timer_rtx.c new file mode 100644 index 0000000000..da6b9e7cb6 --- /dev/null +++ b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/timer/app_timer_rtx.c @@ -0,0 +1,239 @@ +#include "app_timer.h" +#include +#include "nrf.h" +#include "nrf_soc.h" +#include "app_error.h" +#include "app_util.h" +#include "cmsis_os.h" +#include "app_util_platform.h" + +#define RTC1_IRQ_PRI APP_IRQ_PRIORITY_LOW /**< Priority of the RTC1 interrupt. */ + +#define MAX_RTC_COUNTER_VAL 0x00FFFFFF /**< Maximum value of the RTC counter. */ + +/**@brief This structure keeps information about osTimer.*/ +typedef struct +{ + osTimerDef_t timerDef; + uint32_t buffer[5]; + osTimerId id; +}app_timer_info_t; + +/**@brief Store an array of timers with configuration. */ +typedef struct +{ + uint8_t max_timers; /**< The maximum number of timers*/ + uint32_t prescaler; + app_timer_info_t * app_timers; /**< Pointer to table of timers*/ +}app_timer_control_t; +app_timer_control_t app_timer_control; + +/**@brief This structure is defined by RTX. It keeps information about created osTimers. It is used in app_timer_start(). */ +typedef struct os_timer_cb_ +{ + struct os_timer_cb_ * next; + uint8_t state; + uint8_t type; + uint16_t reserved; + uint16_t tcnt; + uint16_t icnt; + void * arg; + const osTimerDef_t * timer; +} os_timer_cb; + +/**@brief This functions are defined by RTX.*/ +//lint --save -e10 -e19 -e526 +extern osStatus svcTimerStop(osTimerId timer_id); /**< Used in app_timer_stop(). */ +extern osStatus svcTimerStart(osTimerId timer_id, uint32_t millisec); /**< Used in app_timer_start(). */ +// lint --restore +static void * rt_id2obj(void *id) /**< Used in app_timer_start(). This function gives information if osTimerID is valid */ +{ + + if ((uint32_t)id & 3) + return NULL; + +#ifdef OS_SECTIONS_LINK_INFO + + if ((os_section_id$$Base != 0) && (os_section_id$$Limit != 0)) + { + if (id < (void *)os_section_id$$Base) + return NULL; + + if (id >= (void *)os_section_id$$Limit) + return NULL; + } +#endif + + return id; +} + + +uint32_t app_timer_init(uint32_t prescaler, + uint8_t op_queues_size, + void * p_buffer, + app_timer_evt_schedule_func_t evt_schedule_func) +{ + if (p_buffer == NULL) + { + return NRF_ERROR_INVALID_PARAM; + } + + app_timer_control.prescaler = prescaler; + app_timer_control.app_timers = p_buffer; + NVIC_SetPriority(RTC1_IRQn, RTC1_IRQ_PRI); + + return NRF_SUCCESS; +} + + +uint32_t app_timer_create(app_timer_id_t const * p_timer_id, + app_timer_mode_t mode, + app_timer_timeout_handler_t timeout_handler) +{ + + if ((timeout_handler == NULL) || (p_timer_id == NULL)) + { + return NRF_ERROR_INVALID_PARAM; + } + + app_timer_info_t * p_timer_info = (app_timer_info_t *)*p_timer_id; + p_timer_info->timerDef.timer = p_timer_info->buffer; + p_timer_info->timerDef.ptimer = (os_ptimer)timeout_handler; + + p_timer_info->id = osTimerCreate(&(p_timer_info->timerDef), (os_timer_type)mode, NULL); + + if (p_timer_info->id) + return NRF_SUCCESS; + else + { + return NRF_ERROR_INVALID_PARAM; // This error is unspecified by rtx + } +} + +#define osTimerRunning 2 +uint32_t app_timer_start(app_timer_id_t timer_id, uint32_t timeout_ticks, void * p_context) +{ + if ((timeout_ticks < APP_TIMER_MIN_TIMEOUT_TICKS)) + { + return NRF_ERROR_INVALID_PARAM; + } + uint32_t timeout_ms = + ((uint32_t)ROUNDED_DIV(timeout_ticks * 1000 * (app_timer_control.prescaler + 1), + (uint32_t)APP_TIMER_CLOCK_FREQ)); + + app_timer_info_t * p_timer_info = (app_timer_info_t *)timer_id; + if (rt_id2obj((void *)p_timer_info->id) == NULL) + return NRF_ERROR_INVALID_PARAM; + + // Pass p_context to timer_timeout_handler + ((os_timer_cb *)(p_timer_info->id))->arg = p_context; + + if (((os_timer_cb *)(p_timer_info->id))->state == osTimerRunning) + { + return NRF_SUCCESS; + } + // osTimerStart() returns osErrorISR if it is called in interrupt routine. + switch (osTimerStart((osTimerId)p_timer_info->id, timeout_ms) ) + { + case osOK: + return NRF_SUCCESS; + + case osErrorISR: + break; + + case osErrorParameter: + return NRF_ERROR_INVALID_PARAM; + + default: + return NRF_ERROR_INVALID_PARAM; + } + + // Start timer without svcCall + switch (svcTimerStart((osTimerId)p_timer_info->id, timeout_ms)) + { + case osOK: + return NRF_SUCCESS; + + case osErrorISR: + return NRF_ERROR_INVALID_STATE; + + case osErrorParameter: + return NRF_ERROR_INVALID_PARAM; + + default: + return NRF_ERROR_INVALID_PARAM; + } +} + +uint32_t app_timer_stop(app_timer_id_t timer_id) +{ + app_timer_info_t * p_timer_info = (app_timer_info_t *)timer_id; + switch (osTimerStop((osTimerId)p_timer_info->id) ) + { + case osOK: + return NRF_SUCCESS; + + case osErrorISR: + break; + + case osErrorParameter: + return NRF_ERROR_INVALID_PARAM; + + case osErrorResource: + return NRF_SUCCESS; + + default: + return NRF_ERROR_INVALID_PARAM; + } + + // Stop timer without svcCall + switch (svcTimerStop((osTimerId)p_timer_info->id)) + { + case osOK: + return NRF_SUCCESS; + + case osErrorISR: + return NRF_ERROR_INVALID_STATE; + + case osErrorParameter: + return NRF_ERROR_INVALID_PARAM; + + case osErrorResource: + return NRF_SUCCESS; + + default: + return NRF_ERROR_INVALID_PARAM; + } +} + + +uint32_t app_timer_stop_all(void) +{ + for (int i = 0; i < app_timer_control.max_timers; i++) + { + if (app_timer_control.app_timers[i].id) + { + (void)app_timer_stop((app_timer_id_t)app_timer_control.app_timers[i].id); + } + } + return 0; +} + + +extern uint32_t os_tick_val(void); +uint32_t app_timer_cnt_get(uint32_t * p_ticks) +{ + *p_ticks = os_tick_val(); + return NRF_SUCCESS; +} + + +uint32_t app_timer_cnt_diff_compute(uint32_t ticks_to, + uint32_t ticks_from, + uint32_t * p_ticks_diff) +{ + *p_ticks_diff = ((ticks_to - ticks_from) & MAX_RTC_COUNTER_VAL); + return NRF_SUCCESS; +} + + From ea0ae68c6077046ae7523ca13bf7eaa8548ba040 Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Tue, 19 Jul 2016 23:39:52 +0100 Subject: [PATCH 63/67] Update memory layout for nrf51 targets. --- .../TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct | 6 +++--- .../TARGET_MCU_NRF51_16K_S110/nRF51822.sct | 6 +++--- .../TARGET_MCU_NRF51_16K_S130/nRF51822.sct | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct index cbbea83ae7..6396fd84fe 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct @@ -12,13 +12,13 @@ ; ;WITH SOFTDEVICE: -LR_IROM1 0x1C000 0x0024000 { - ER_IROM1 0x1C000 0x0024000 { +LR_IROM1 0x0001B000 0x0025000 { + ER_IROM1 0x0001B000 0x0025000 { *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) } - RW_IRAM1 0x20002800 0x00005800 { + RW_IRAM1 0x20002ef8 0x5108 { .ANY (+RW +ZI) } } diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S110/nRF51822.sct b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S110/nRF51822.sct index 62638400f2..94e85ccb7b 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S110/nRF51822.sct +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S110/nRF51822.sct @@ -12,13 +12,13 @@ ; ;WITH SOFTDEVICE: -LR_IROM1 0x18000 0x0028000 { - ER_IROM1 0x18000 0x0028000 { +LR_IROM1 0x0001B000 0x0025000 { + ER_IROM1 0x0001B000 0x0025000 { *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) } - RW_IRAM1 0x20002000 0x00002000 { + RW_IRAM1 0x20002ef8 0x1108 { .ANY (+RW +ZI) } } diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S130/nRF51822.sct b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S130/nRF51822.sct index 212c545f25..94e85ccb7b 100644 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S130/nRF51822.sct +++ b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S130/nRF51822.sct @@ -12,13 +12,13 @@ ; ;WITH SOFTDEVICE: -LR_IROM1 0x1C000 0x0024000 { - ER_IROM1 0x1C000 0x0024000 { +LR_IROM1 0x0001B000 0x0025000 { + ER_IROM1 0x0001B000 0x0025000 { *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) } - RW_IRAM1 0x20002800 0x00001800 { + RW_IRAM1 0x20002ef8 0x1108 { .ANY (+RW +ZI) } } From 847d0f6764a58edd52f2e71ef9c5a19299ad043a Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Wed, 20 Jul 2016 15:39:12 +0100 Subject: [PATCH 64/67] Remove app_timer and dependencies instead of adding a dependency to RTX. --- .../sdk/ble/common/ble_conn_params.c | 350 ------------------ .../sdk/libraries/timer/app_timer.h | 314 ---------------- .../sdk/libraries/timer/app_timer_rtx.c | 239 ------------ 3 files changed, 903 deletions(-) delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/timer/app_timer.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/timer/app_timer_rtx.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.c deleted file mode 100644 index 6ba9bd011a..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/ble/common/ble_conn_params.c +++ /dev/null @@ -1,350 +0,0 @@ -/* - * Copyright (c) 2012 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 or object form under this license must not be reverse - * engineered, decompiled, modified and/or disassembled. - * - * 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_conn_params.h" -#include -#include "nordic_common.h" -#include "nrf_ble_hci.h" -#include "app_timer.h" -#include "ble_srv_common.h" -#include "app_util.h" - - -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 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 ble_gap_conn_params_t m_current_conn_params; /**< Connection parameters received in the most recent Connect event. */ -APP_TIMER_DEF(m_conn_params_timer_id); /**< Connection parameters timer. */ - -static bool m_change_param = false; - -static bool is_conn_params_ok(ble_gap_conn_params_t * p_conn_params) -{ - // Check if interval is within the acceptable range. - // NOTE: Using max_conn_interval in the received event data because this contains - // the client's connection interval. - if ( - (p_conn_params->max_conn_interval >= m_preferred_conn_params.min_conn_interval) - && - (p_conn_params->max_conn_interval <= m_preferred_conn_params.max_conn_interval) - ) - { - return true; - } - else - { - return false; - } -} - - -static void update_timeout_handler(void * p_context) -{ - UNUSED_PARAMETER(p_context); - - if (m_conn_handle != BLE_CONN_HANDLE_INVALID) - { - // Check if we have reached the maximum number of attempts - m_update_count++; - if (m_update_count <= m_conn_params_config.max_conn_params_update_count) - { - uint32_t err_code; - - // Parameters are not ok, send connection parameters update request. - err_code = sd_ble_gap_conn_param_update(m_conn_handle, &m_preferred_conn_params); - if ((err_code != NRF_SUCCESS) && (m_conn_params_config.error_handler != NULL)) - { - m_conn_params_config.error_handler(err_code); - } - } - else - { - m_update_count = 0; - - // Negotiation failed, disconnect automatically if this has been configured - if (m_conn_params_config.disconnect_on_fail) - { - uint32_t err_code; - - err_code = sd_ble_gap_disconnect(m_conn_handle, BLE_HCI_CONN_INTERVAL_UNACCEPTABLE); - if ((err_code != NRF_SUCCESS) && (m_conn_params_config.error_handler != NULL)) - { - m_conn_params_config.error_handler(err_code); - } - } - - // Notify the application that the procedure has failed - if (m_conn_params_config.evt_handler != NULL) - { - ble_conn_params_evt_t evt; - - evt.evt_type = BLE_CONN_PARAMS_EVT_FAILED; - m_conn_params_config.evt_handler(&evt); - } - } - } -} - - -uint32_t ble_conn_params_init(const ble_conn_params_init_t * p_init) -{ - uint32_t err_code; - - m_conn_params_config = *p_init; - m_change_param = false; - if (p_init->p_conn_params != NULL) - { - m_preferred_conn_params = *p_init->p_conn_params; - - // Set the connection params in stack - err_code = sd_ble_gap_ppcp_set(&m_preferred_conn_params); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - else - { - // Fetch the connection params from stack - err_code = sd_ble_gap_ppcp_get(&m_preferred_conn_params); - if (err_code != NRF_SUCCESS) - { - return err_code; - } - } - - m_conn_handle = BLE_CONN_HANDLE_INVALID; - m_update_count = 0; - - return app_timer_create(&m_conn_params_timer_id, - APP_TIMER_MODE_SINGLE_SHOT, - update_timeout_handler); -} - - -uint32_t ble_conn_params_stop(void) -{ - return app_timer_stop(m_conn_params_timer_id); -} - - -static void conn_params_negotiation(void) -{ - // Start negotiation if the received connection parameters are not acceptable - if (!is_conn_params_ok(&m_current_conn_params)) - { - uint32_t err_code; - uint32_t timeout_ticks; - - if (m_change_param) - { - // Notify the application that the procedure has failed - if (m_conn_params_config.evt_handler != NULL) - { - ble_conn_params_evt_t evt; - - evt.evt_type = BLE_CONN_PARAMS_EVT_FAILED; - m_conn_params_config.evt_handler(&evt); - } - } - else - { - if (m_update_count == 0) - { - // First connection parameter update - timeout_ticks = m_conn_params_config.first_conn_params_update_delay; - } - else - { - timeout_ticks = m_conn_params_config.next_conn_params_update_delay; - } - - 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)) - { - m_conn_params_config.error_handler(err_code); - } - } - } - else - { - // Notify the application that the procedure has succeded - if (m_conn_params_config.evt_handler != NULL) - { - ble_conn_params_evt_t evt; - - evt.evt_type = BLE_CONN_PARAMS_EVT_SUCCEEDED; - m_conn_params_config.evt_handler(&evt); - } - } - m_change_param = false; -} - - -static void on_connect(ble_evt_t * p_ble_evt) -{ - // Save connection parameters - m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle; - m_current_conn_params = p_ble_evt->evt.gap_evt.params.connected.conn_params; - m_update_count = 0; // Connection parameter negotiation should re-start every connection - - // Check if we shall handle negotiation on connect - if (m_conn_params_config.start_on_notify_cccd_handle == BLE_GATT_HANDLE_INVALID) - { - conn_params_negotiation(); - } -} - - -static void on_disconnect(ble_evt_t * p_ble_evt) -{ - uint32_t err_code; - - m_conn_handle = BLE_CONN_HANDLE_INVALID; - - // Stop timer if running - m_update_count = 0; // Connection parameters updates should happen during every connection - - err_code = app_timer_stop(m_conn_params_timer_id); - if ((err_code != NRF_SUCCESS) && (m_conn_params_config.error_handler != NULL)) - { - m_conn_params_config.error_handler(err_code); - } -} - - -static void on_write(ble_evt_t * p_ble_evt) -{ - ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write; - - // Check if this the correct CCCD - if ( - (p_evt_write->handle == m_conn_params_config.start_on_notify_cccd_handle) - && - (p_evt_write->len == 2) - ) - { - // Check if this is a 'start notification' - if (ble_srv_is_notification_enabled(p_evt_write->data)) - { - // Do connection parameter negotiation if necessary - conn_params_negotiation(); - } - else - { - uint32_t err_code; - - // Stop timer if running - err_code = app_timer_stop(m_conn_params_timer_id); - if ((err_code != NRF_SUCCESS) && (m_conn_params_config.error_handler != NULL)) - { - m_conn_params_config.error_handler(err_code); - } - } - } -} - - -static void on_conn_params_update(ble_evt_t * p_ble_evt) -{ - // Copy the parameters - m_current_conn_params = p_ble_evt->evt.gap_evt.params.conn_param_update.conn_params; - - conn_params_negotiation(); -} - - -void ble_conn_params_on_ble_evt(ble_evt_t * p_ble_evt) -{ - switch (p_ble_evt->header.evt_id) - { - case BLE_GAP_EVT_CONNECTED: - on_connect(p_ble_evt); - break; - - case BLE_GAP_EVT_DISCONNECTED: - on_disconnect(p_ble_evt); - break; - - case BLE_GATTS_EVT_WRITE: - on_write(p_ble_evt); - break; - - case BLE_GAP_EVT_CONN_PARAM_UPDATE: - on_conn_params_update(p_ble_evt); - break; - - default: - // No implementation needed. - break; - } -} - - -uint32_t ble_conn_params_change_conn_params(ble_gap_conn_params_t * new_params) -{ - uint32_t err_code; - - m_preferred_conn_params = *new_params; - // Set the connection params in stack - err_code = sd_ble_gap_ppcp_set(&m_preferred_conn_params); - if (err_code == NRF_SUCCESS) - { - if (!is_conn_params_ok(&m_current_conn_params)) - { - m_change_param = true; - err_code = sd_ble_gap_conn_param_update(m_conn_handle, &m_preferred_conn_params); - m_update_count = 1; - } - else - { - // Notify the application that the procedure has succeded - if (m_conn_params_config.evt_handler != NULL) - { - ble_conn_params_evt_t evt; - - evt.evt_type = BLE_CONN_PARAMS_EVT_SUCCEEDED; - m_conn_params_config.evt_handler(&evt); - } - err_code = NRF_SUCCESS; - } - } - return err_code; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/timer/app_timer.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/timer/app_timer.h deleted file mode 100644 index 836f7744aa..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/timer/app_timer.h +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Copyright (c) 2012 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 or object form under this license must not be reverse - * engineered, decompiled, modified and/or disassembled. - * - * 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 - * - * @defgroup app_timer Application Timer - * @{ - * @ingroup app_common - * - * @brief Application timer functionality. - * - * @details This module enables the application to create multiple timer instances based on the RTC1 - * peripheral. Checking for time-outs and invokation of user time-out handlers is performed - * in the RTC1 interrupt handler. List handling is done using a software interrupt (SWI0). - * Both interrupt handlers are running in APP_LOW priority level. - * - * @details When calling app_timer_start() or app_timer_stop(), the timer operation is just queued, - * and the software interrupt is triggered. The actual timer start/stop operation is - * executed by the SWI0 interrupt handler. Since the SWI0 interrupt is running in APP_LOW, - * if the application code calling the timer function is running in APP_LOW or APP_HIGH, - * the timer operation will not be performed until the application handler has returned. - * This will be the case, for example, when stopping a timer from a time-out handler when not using - * the scheduler. - * - * @details Use the USE_SCHEDULER parameter of the APP_TIMER_INIT() macro to select if the - * @ref app_scheduler should be used or not. Even if the scheduler is - * not used, app_timer.h will include app_scheduler.h, so when - * compiling, app_scheduler.h must be available in one of the compiler include paths. - */ - -#ifndef APP_TIMER_H__ -#define APP_TIMER_H__ - -#include -#include -#include -#include "app_error.h" -#include "app_util.h" -#include "compiler_abstraction.h" - -#define APP_TIMER_CLOCK_FREQ 32768 /**< Clock frequency of the RTC timer used to implement the app timer module. */ -#define APP_TIMER_MIN_TIMEOUT_TICKS 5 /**< Minimum value of the timeout_ticks parameter of app_timer_start(). */ - -#define APP_TIMER_NODE_SIZE 32 /**< Size of app_timer.timer_node_t (used to allocate data). */ -#define APP_TIMER_USER_OP_SIZE 24 /**< Size of app_timer.timer_user_op_t (only for use inside APP_TIMER_BUF_SIZE()). */ -#define APP_TIMER_USER_SIZE 8 /**< Size of app_timer.timer_user_t (only for use inside APP_TIMER_BUF_SIZE()). */ -#define APP_TIMER_INT_LEVELS 3 /**< Number of interrupt levels from where timer operations may be initiated (only for use inside APP_TIMER_BUF_SIZE()). */ - -/**@brief Compute number of bytes required to hold the application timer data structures. - * - * @param[in] OP_QUEUE_SIZE Size of queues holding timer operations that are pending execution. - * Note that due to the queue implementation, this size must be one more - * than the size that is actually needed. - * - * @return Required application timer buffer size (in bytes). - */ -#define APP_TIMER_BUF_SIZE(OP_QUEUE_SIZE) \ - ( \ - ( \ - APP_TIMER_INT_LEVELS \ - * \ - (APP_TIMER_USER_SIZE + ((OP_QUEUE_SIZE) + 1) * APP_TIMER_USER_OP_SIZE) \ - ) \ - ) - -/**@brief Convert milliseconds to timer ticks. - * - * This macro uses 64-bit integer arithmetic, but as long as the macro parameters are - * constants (i.e. defines), the computation will be done by the preprocessor. - * - * When using this macro, ensure that the - * values provided as input result in an output value that is supported by the - * @ref app_timer_start function. For example, when the ticks for 1 ms is needed, the - * maximum possible value of PRESCALER must be 6, when @ref APP_TIMER_CLOCK_FREQ is 32768. - * This will result in a ticks value as 5. Any higher value for PRESCALER will result in a - * ticks value that is not supported by this module. - * - * @param[in] MS Milliseconds. - * @param[in] PRESCALER Value of the RTC1 PRESCALER register (must be the same value that was - * passed to APP_TIMER_INIT()). - * - * @return Number of timer ticks. - */ -#define APP_TIMER_TICKS(MS, PRESCALER)\ - ((uint32_t)ROUNDED_DIV((MS) * (uint64_t)APP_TIMER_CLOCK_FREQ, ((PRESCALER) + 1) * 1000)) - -typedef struct app_timer_t { uint32_t data[CEIL_DIV(APP_TIMER_NODE_SIZE, sizeof(uint32_t))]; } app_timer_t; - -/**@brief Timer ID type. - * Never declare a variable of this type, but use the macro @ref APP_TIMER_DEF instead.*/ -typedef app_timer_t * app_timer_id_t; - -/** - * @brief Create a timer identifier and statically allocate memory for the timer. - * - * @param timer_id Name of the timer identifier variable that will be used to control the timer. - */ -#define APP_TIMER_DEF(timer_id) \ - static app_timer_t timer_id##_data = { {0} }; \ - static const app_timer_id_t timer_id = &timer_id##_data - - -/**@brief Application time-out handler type. */ -typedef void (*app_timer_timeout_handler_t)(void * p_context); - -/**@brief Type of function for passing events from the timer module to the scheduler. */ -typedef uint32_t (*app_timer_evt_schedule_func_t) (app_timer_timeout_handler_t timeout_handler, - void * p_context); - -/**@brief Timer modes. */ -typedef enum -{ - APP_TIMER_MODE_SINGLE_SHOT, /**< The timer will expire only once. */ - APP_TIMER_MODE_REPEATED /**< The timer will restart each time it expires. */ -} app_timer_mode_t; - -/**@brief Initialize the application timer module. - * - * @details This macro handles dimensioning and allocation of the memory buffer required by the timer, - * making sure that the buffer is correctly aligned. It will also connect the timer module - * to the scheduler (if specified). - * - * @note This module assumes that the LFCLK is already running. If it is not, the module will - * be non-functional, since the RTC will not run. If you do not use a SoftDevice, you - * must start the LFCLK manually. See the rtc_example's lfclk_config() function - * for an example of how to do this. If you use a SoftDevice, the LFCLK is started on - * SoftDevice init. - * - * - * @param[in] PRESCALER Value of the RTC1 PRESCALER register. This will decide the - * timer tick rate. Set to 0 for no prescaling. - * @param[in] OP_QUEUES_SIZE Size of queues holding timer operations that are pending execution. - * @param[in] SCHEDULER_FUNC Pointer to scheduler event handler - * - * @note Since this macro allocates a buffer, it must only be called once (it is OK to call it - * several times as long as it is from the same location, for example, to do a re-initialization). - */ -/*lint -emacro(506, APP_TIMER_INIT) */ /* Suppress "Constant value Boolean */ -#define APP_TIMER_INIT(PRESCALER, OP_QUEUES_SIZE, SCHEDULER_FUNC) \ - do \ - { \ - static uint32_t APP_TIMER_BUF[CEIL_DIV(APP_TIMER_BUF_SIZE((OP_QUEUES_SIZE) + 1), \ - sizeof(uint32_t))]; \ - uint32_t ERR_CODE = app_timer_init((PRESCALER), \ - (OP_QUEUES_SIZE) + 1, \ - APP_TIMER_BUF, \ - SCHEDULER_FUNC); \ - APP_ERROR_CHECK(ERR_CODE); \ - } while (0) - - - -/**@brief Function for initializing the timer module. - * - * Normally, initialization should be done using the APP_TIMER_INIT() macro, because that macro will both - * allocate the buffers needed by the timer module (including aligning the buffers correctly) - * and take care of connecting the timer module to the scheduler (if specified). - * - * @param[in] prescaler Value of the RTC1 PRESCALER register. Set to 0 for no prescaling. - * @param[in] op_queues_size Size of queues holding timer operations that are pending - * execution. Note that due to the queue implementation, this size must - * be one more than the size that is actually needed. - * @param[in] p_buffer Pointer to memory buffer for internal use in the app_timer - * module. The size of the buffer can be computed using the - * APP_TIMER_BUF_SIZE() macro. The buffer must be aligned to a - * 4 byte boundary. - * @param[in] evt_schedule_func Function for passing time-out events to the scheduler. Point to - * app_timer_evt_schedule() to connect to the scheduler. Set to NULL - * to make the timer module call the time-out handler directly from - * the timer interrupt handler. - * - * @retval NRF_SUCCESS If the module was initialized successfully. - * @retval NRF_ERROR_INVALID_PARAM If a parameter was invalid (buffer not aligned to a 4 byte - * boundary or NULL). - */ -uint32_t app_timer_init(uint32_t prescaler, - uint8_t op_queues_size, - void * p_buffer, - app_timer_evt_schedule_func_t evt_schedule_func); - -/**@brief Function for creating a timer instance. - * - * @param[in] p_timer_id Pointer to timer identifier. - * @param[in] mode Timer mode. - * @param[in] timeout_handler Function to be executed when the timer expires. - * - * @retval NRF_SUCCESS If the timer was successfully created. - * @retval NRF_ERROR_INVALID_PARAM If a parameter was invalid. - * @retval NRF_ERROR_INVALID_STATE If the application timer module has not been initialized or - * the timer is running. - * - * @note This function does the timer allocation in the caller's context. It is also not protected - * by a critical region. Therefore care must be taken not to call it from several interrupt - * levels simultaneously. - * @note The function can be called again on the timer instance and will re-initialize the instance if - * the timer is not running. - * @attention The FreeRTOS and RTX app_timer implementation does not allow app_timer_create to - * be called on the previously initialized instance. - */ -uint32_t app_timer_create(app_timer_id_t const * p_timer_id, - app_timer_mode_t mode, - app_timer_timeout_handler_t timeout_handler); - -/**@brief Function for starting a timer. - * - * @param[in] timer_id Timer identifier. - * @param[in] timeout_ticks Number of ticks (of RTC1, including prescaling) to time-out event - * (minimum 5 ticks). - * @param[in] p_context General purpose pointer. Will be passed to the time-out handler when - * the timer expires. - * - * @retval NRF_SUCCESS If the timer was successfully started. - * @retval NRF_ERROR_INVALID_PARAM If a parameter was invalid. - * @retval NRF_ERROR_INVALID_STATE If the application timer module has not been initialized or the timer - * has not been created. - * @retval NRF_ERROR_NO_MEM If the timer operations queue was full. - * - * @note The minimum timeout_ticks value is 5. - * @note For multiple active timers, time-outs occurring in close proximity to each other (in the - * range of 1 to 3 ticks) will have a positive jitter of maximum 3 ticks. - * @note When calling this method on a timer that is already running, the second start operation - * is ignored. - */ -uint32_t app_timer_start(app_timer_id_t timer_id, uint32_t timeout_ticks, void * p_context); - -/**@brief Function for stopping the specified timer. - * - * @param[in] timer_id Timer identifier. - * - * @retval NRF_SUCCESS If the timer was successfully stopped. - * @retval NRF_ERROR_INVALID_PARAM If a parameter was invalid. - * @retval NRF_ERROR_INVALID_STATE If the application timer module has not been initialized or the timer - * has not been created. - * @retval NRF_ERROR_NO_MEM If the timer operations queue was full. - */ -uint32_t app_timer_stop(app_timer_id_t timer_id); - -/**@brief Function for stopping all running timers. - * - * @retval NRF_SUCCESS If all timers were successfully stopped. - * @retval NRF_ERROR_INVALID_STATE If the application timer module has not been initialized. - * @retval NRF_ERROR_NO_MEM If the timer operations queue was full. - */ -uint32_t app_timer_stop_all(void); - -/**@brief Function for returning the current value of the RTC1 counter. - * - * @param[out] p_ticks Current value of the RTC1 counter. - * - * @retval NRF_SUCCESS If the counter was successfully read. - */ -uint32_t app_timer_cnt_get(uint32_t * p_ticks); - -/**@brief Function for computing the difference between two RTC1 counter values. - * - * @param[in] ticks_to Value returned by app_timer_cnt_get(). - * @param[in] ticks_from Value returned by app_timer_cnt_get(). - * @param[out] p_ticks_diff Number of ticks from ticks_from to ticks_to. - * - * @retval NRF_SUCCESS If the counter difference was successfully computed. - */ -uint32_t app_timer_cnt_diff_compute(uint32_t ticks_to, - uint32_t ticks_from, - uint32_t * p_ticks_diff); - -#ifdef APP_TIMER_WITH_PROFILER -/**@brief Function for getting the maximum observed operation queue utilization. - * - * Function for tuning the module and determining OP_QUEUE_SIZE value and thus module RAM usage. - * - * @return Maximum number of events in queue observed so far. - */ -uint16_t app_timer_op_queue_utilization_get(void); -#endif - -#endif // APP_TIMER_H__ - -/** @} */ diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/timer/app_timer_rtx.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/timer/app_timer_rtx.c deleted file mode 100644 index da6b9e7cb6..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/timer/app_timer_rtx.c +++ /dev/null @@ -1,239 +0,0 @@ -#include "app_timer.h" -#include -#include "nrf.h" -#include "nrf_soc.h" -#include "app_error.h" -#include "app_util.h" -#include "cmsis_os.h" -#include "app_util_platform.h" - -#define RTC1_IRQ_PRI APP_IRQ_PRIORITY_LOW /**< Priority of the RTC1 interrupt. */ - -#define MAX_RTC_COUNTER_VAL 0x00FFFFFF /**< Maximum value of the RTC counter. */ - -/**@brief This structure keeps information about osTimer.*/ -typedef struct -{ - osTimerDef_t timerDef; - uint32_t buffer[5]; - osTimerId id; -}app_timer_info_t; - -/**@brief Store an array of timers with configuration. */ -typedef struct -{ - uint8_t max_timers; /**< The maximum number of timers*/ - uint32_t prescaler; - app_timer_info_t * app_timers; /**< Pointer to table of timers*/ -}app_timer_control_t; -app_timer_control_t app_timer_control; - -/**@brief This structure is defined by RTX. It keeps information about created osTimers. It is used in app_timer_start(). */ -typedef struct os_timer_cb_ -{ - struct os_timer_cb_ * next; - uint8_t state; - uint8_t type; - uint16_t reserved; - uint16_t tcnt; - uint16_t icnt; - void * arg; - const osTimerDef_t * timer; -} os_timer_cb; - -/**@brief This functions are defined by RTX.*/ -//lint --save -e10 -e19 -e526 -extern osStatus svcTimerStop(osTimerId timer_id); /**< Used in app_timer_stop(). */ -extern osStatus svcTimerStart(osTimerId timer_id, uint32_t millisec); /**< Used in app_timer_start(). */ -// lint --restore -static void * rt_id2obj(void *id) /**< Used in app_timer_start(). This function gives information if osTimerID is valid */ -{ - - if ((uint32_t)id & 3) - return NULL; - -#ifdef OS_SECTIONS_LINK_INFO - - if ((os_section_id$$Base != 0) && (os_section_id$$Limit != 0)) - { - if (id < (void *)os_section_id$$Base) - return NULL; - - if (id >= (void *)os_section_id$$Limit) - return NULL; - } -#endif - - return id; -} - - -uint32_t app_timer_init(uint32_t prescaler, - uint8_t op_queues_size, - void * p_buffer, - app_timer_evt_schedule_func_t evt_schedule_func) -{ - if (p_buffer == NULL) - { - return NRF_ERROR_INVALID_PARAM; - } - - app_timer_control.prescaler = prescaler; - app_timer_control.app_timers = p_buffer; - NVIC_SetPriority(RTC1_IRQn, RTC1_IRQ_PRI); - - return NRF_SUCCESS; -} - - -uint32_t app_timer_create(app_timer_id_t const * p_timer_id, - app_timer_mode_t mode, - app_timer_timeout_handler_t timeout_handler) -{ - - if ((timeout_handler == NULL) || (p_timer_id == NULL)) - { - return NRF_ERROR_INVALID_PARAM; - } - - app_timer_info_t * p_timer_info = (app_timer_info_t *)*p_timer_id; - p_timer_info->timerDef.timer = p_timer_info->buffer; - p_timer_info->timerDef.ptimer = (os_ptimer)timeout_handler; - - p_timer_info->id = osTimerCreate(&(p_timer_info->timerDef), (os_timer_type)mode, NULL); - - if (p_timer_info->id) - return NRF_SUCCESS; - else - { - return NRF_ERROR_INVALID_PARAM; // This error is unspecified by rtx - } -} - -#define osTimerRunning 2 -uint32_t app_timer_start(app_timer_id_t timer_id, uint32_t timeout_ticks, void * p_context) -{ - if ((timeout_ticks < APP_TIMER_MIN_TIMEOUT_TICKS)) - { - return NRF_ERROR_INVALID_PARAM; - } - uint32_t timeout_ms = - ((uint32_t)ROUNDED_DIV(timeout_ticks * 1000 * (app_timer_control.prescaler + 1), - (uint32_t)APP_TIMER_CLOCK_FREQ)); - - app_timer_info_t * p_timer_info = (app_timer_info_t *)timer_id; - if (rt_id2obj((void *)p_timer_info->id) == NULL) - return NRF_ERROR_INVALID_PARAM; - - // Pass p_context to timer_timeout_handler - ((os_timer_cb *)(p_timer_info->id))->arg = p_context; - - if (((os_timer_cb *)(p_timer_info->id))->state == osTimerRunning) - { - return NRF_SUCCESS; - } - // osTimerStart() returns osErrorISR if it is called in interrupt routine. - switch (osTimerStart((osTimerId)p_timer_info->id, timeout_ms) ) - { - case osOK: - return NRF_SUCCESS; - - case osErrorISR: - break; - - case osErrorParameter: - return NRF_ERROR_INVALID_PARAM; - - default: - return NRF_ERROR_INVALID_PARAM; - } - - // Start timer without svcCall - switch (svcTimerStart((osTimerId)p_timer_info->id, timeout_ms)) - { - case osOK: - return NRF_SUCCESS; - - case osErrorISR: - return NRF_ERROR_INVALID_STATE; - - case osErrorParameter: - return NRF_ERROR_INVALID_PARAM; - - default: - return NRF_ERROR_INVALID_PARAM; - } -} - -uint32_t app_timer_stop(app_timer_id_t timer_id) -{ - app_timer_info_t * p_timer_info = (app_timer_info_t *)timer_id; - switch (osTimerStop((osTimerId)p_timer_info->id) ) - { - case osOK: - return NRF_SUCCESS; - - case osErrorISR: - break; - - case osErrorParameter: - return NRF_ERROR_INVALID_PARAM; - - case osErrorResource: - return NRF_SUCCESS; - - default: - return NRF_ERROR_INVALID_PARAM; - } - - // Stop timer without svcCall - switch (svcTimerStop((osTimerId)p_timer_info->id)) - { - case osOK: - return NRF_SUCCESS; - - case osErrorISR: - return NRF_ERROR_INVALID_STATE; - - case osErrorParameter: - return NRF_ERROR_INVALID_PARAM; - - case osErrorResource: - return NRF_SUCCESS; - - default: - return NRF_ERROR_INVALID_PARAM; - } -} - - -uint32_t app_timer_stop_all(void) -{ - for (int i = 0; i < app_timer_control.max_timers; i++) - { - if (app_timer_control.app_timers[i].id) - { - (void)app_timer_stop((app_timer_id_t)app_timer_control.app_timers[i].id); - } - } - return 0; -} - - -extern uint32_t os_tick_val(void); -uint32_t app_timer_cnt_get(uint32_t * p_ticks) -{ - *p_ticks = os_tick_val(); - return NRF_SUCCESS; -} - - -uint32_t app_timer_cnt_diff_compute(uint32_t ticks_to, - uint32_t ticks_from, - uint32_t * p_ticks_diff) -{ - *p_ticks_diff = ((ticks_to - ticks_from) & MAX_RTC_COUNTER_VAL); - return NRF_SUCCESS; -} - - From 406ac8f5f4ce5b49cfbd3268945f276a50ae093a Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Thu, 21 Jul 2016 00:02:44 +0100 Subject: [PATCH 65/67] Makes room for old NRF51 implementation. the unified target for NRF51 has been renamed MCU_NRF51_UNIFIED and hal implementation has been moved from TARGET_MCU_NRF51822 to TARGET_MCU_NRF51822_UNIFIED. In the process, the only real taget kept for NRF51 based targets is NRF51_DK. It is too risky at this stage to switch NRF51822 (16K target) to the new softdevice. The overhead of the RTOS is already too huge. --- hal/targets.json | 413 +++------------- .../TARGET_MCU_NRF51822/nrf51_deprecated.h | 440 ------------------ .../TARGET_MCU_NORDIC_16K/startup_nRF51822.S | 0 .../TARGET_MCU_NORDIC_32K/nRF51822.sct | 0 .../TARGET_MCU_NORDIC_32K/startup_nRF51822.S | 0 .../TARGET_MCU_NRF51_16K_S110/nRF51822.sct | 0 .../TARGET_MCU_NRF51_16K_S130/nRF51822.sct | 0 .../TOOLCHAIN_ARM_STD/sys.cpp | 0 .../TARGET_MCU_NORDIC_32K/NRF51822.ld | 0 .../TARGET_MCU_NRF51_16K_S110/NRF51822.ld | 0 .../TARGET_MCU_NRF51_16K_S130/NRF51822.ld | 0 .../TOOLCHAIN_GCC_ARM/startup_NRF51822.S | 0 .../TARGET_MCU_NORDIC_16K/nRF51822_QFAA.icf | 0 .../startup_NRF51822_IAR.S | 0 .../TARGET_MCU_NORDIC_32K/nRF51822_QFAA.icf | 0 .../startup_NRF51822_IAR.S | 0 .../cmsis.h | 0 .../cmsis_nvic.c | 0 .../cmsis_nvic.h | 0 .../system_nrf51.c | 0 .../system_nrf51.h | 0 .../PeripheralNames.h | 0 .../PortNames.h | 0 .../TARGET_ARCH_BLE/PinNames.h | 0 .../TARGET_ARCH_BLE/device.h | 0 .../TARGET_DELTA_DFCM_NNN40/PinNames.h | 0 .../TARGET_DELTA_DFCM_NNN40/device.h | 0 .../TARGET_DELTA_DFCM_NNN40/mbed_overrides.c | 0 .../TARGET_DELTA_DFCM_NNN40/rtc_api.c | 0 .../TARGET_HRM1017/PinNames.h | 0 .../TARGET_HRM1017/device.h | 0 .../TARGET_NRF51822_MKIT/PinNames.h | 0 .../TARGET_NRF51822_MKIT/device.h | 0 .../TARGET_NRF51822_SBKIT/PinNames.h | 0 .../TARGET_NRF51822_SBKIT/device.h | 0 .../TARGET_NRF51822_Y5_MBUG/PinNames.h | 0 .../TARGET_NRF51822_Y5_MBUG/device.h | 0 .../TARGET_NRF51_DK/PinNames.h | 0 .../TARGET_NRF51_DK/device.h | 0 .../TARGET_NRF51_DONGLE/PinNames.h | 0 .../TARGET_NRF51_DONGLE/device.h | 0 .../TARGET_NRF51_MICROBIT/PinNames.h | 0 .../TARGET_NRF51_MICROBIT/device.h | 0 .../TARGET_RBLAB_BLENANO/PinNames.h | 0 .../TARGET_RBLAB_BLENANO/device.h | 0 .../TARGET_RBLAB_NRF51822/PinNames.h | 0 .../TARGET_RBLAB_NRF51822/device.h | 0 .../TARGET_SEEED_TINY_BLE/PinNames.h | 0 .../TARGET_SEEED_TINY_BLE/device.h | 0 .../TARGET_TY51822R3/PinNames.h | 0 .../TARGET_TY51822R3/device.h | 0 .../TARGET_WALLBOT_BLE/PinNames.h | 0 .../TARGET_WALLBOT_BLE/device.h | 0 .../analogin_api.c | 0 .../pwmout_api.c | 0 .../sdk/drivers_nrf/adc/nrf_drv_adc.c | 0 .../sdk/drivers_nrf/adc/nrf_drv_adc.h | 0 .../sdk/nrf_drv_config.h | 0 .../softdevice/s130/headers/nrf51/nrf_mbr.h | 0 .../sdk/softdevice/s130/headers/nrf_ble.h | 0 .../sdk/softdevice/s130/headers/nrf_ble_err.h | 0 .../sdk/softdevice/s130/headers/nrf_ble_gap.h | 0 .../softdevice/s130/headers/nrf_ble_gatt.h | 0 .../softdevice/s130/headers/nrf_ble_gattc.h | 0 .../softdevice/s130/headers/nrf_ble_gatts.h | 0 .../sdk/softdevice/s130/headers/nrf_ble_hci.h | 0 .../softdevice/s130/headers/nrf_ble_l2cap.h | 0 .../softdevice/s130/headers/nrf_ble_ranges.h | 0 .../softdevice/s130/headers/nrf_ble_types.h | 0 .../sdk/softdevice/s130/headers/nrf_error.h | 0 .../softdevice/s130/headers/nrf_error_sdm.h | 0 .../softdevice/s130/headers/nrf_error_soc.h | 0 .../sdk/softdevice/s130/headers/nrf_nvic.h | 0 .../sdk/softdevice/s130/headers/nrf_sd_def.h | 0 .../sdk/softdevice/s130/headers/nrf_sdm.h | 0 .../sdk/softdevice/s130/headers/nrf_soc.h | 0 .../sdk/softdevice/s130/headers/nrf_svc.h | 0 .../s130/hex/s130_nrf51_2.0.0_softdevice.hex | 0 78 files changed, 53 insertions(+), 800 deletions(-) delete mode 100644 hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/nrf51_deprecated.h rename hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_16K/startup_nRF51822.S (100%) rename hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct (100%) rename hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/startup_nRF51822.S (100%) rename hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S110/nRF51822.sct (100%) rename hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S130/nRF51822.sct (100%) rename hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TOOLCHAIN_ARM_STD/sys.cpp (100%) rename hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TOOLCHAIN_GCC_ARM/TARGET_MCU_NORDIC_32K/NRF51822.ld (100%) rename hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S110/NRF51822.ld (100%) rename hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S130/NRF51822.ld (100%) rename hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TOOLCHAIN_GCC_ARM/startup_NRF51822.S (100%) rename hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/nRF51822_QFAA.icf (100%) rename hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/startup_NRF51822_IAR.S (100%) rename hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/nRF51822_QFAA.icf (100%) rename hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/startup_NRF51822_IAR.S (100%) rename hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/cmsis.h (100%) rename hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/cmsis_nvic.c (100%) rename hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/cmsis_nvic.h (100%) rename hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/system_nrf51.c (100%) rename hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/system_nrf51.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/PeripheralNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/PortNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_ARCH_BLE/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_ARCH_BLE/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_DELTA_DFCM_NNN40/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_DELTA_DFCM_NNN40/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_DELTA_DFCM_NNN40/mbed_overrides.c (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_DELTA_DFCM_NNN40/rtc_api.c (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_HRM1017/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_HRM1017/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_NRF51822_MKIT/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_NRF51822_MKIT/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_NRF51822_SBKIT/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_NRF51822_SBKIT/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_NRF51822_Y5_MBUG/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_NRF51822_Y5_MBUG/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_NRF51_DK/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_NRF51_DK/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_NRF51_DONGLE/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_NRF51_DONGLE/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_NRF51_MICROBIT/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_NRF51_MICROBIT/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_RBLAB_BLENANO/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_RBLAB_BLENANO/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_RBLAB_NRF51822/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_RBLAB_NRF51822/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_SEEED_TINY_BLE/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_SEEED_TINY_BLE/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_TY51822R3/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_TY51822R3/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_WALLBOT_BLE/PinNames.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/TARGET_WALLBOT_BLE/device.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/analogin_api.c (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/pwmout_api.c (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/drivers_nrf/adc/nrf_drv_adc.c (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/drivers_nrf/adc/nrf_drv_adc.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/nrf_drv_config.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/softdevice/s130/headers/nrf51/nrf_mbr.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/softdevice/s130/headers/nrf_ble.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/softdevice/s130/headers/nrf_ble_err.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/softdevice/s130/headers/nrf_ble_gap.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/softdevice/s130/headers/nrf_ble_gatt.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/softdevice/s130/headers/nrf_ble_gattc.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/softdevice/s130/headers/nrf_ble_gatts.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/softdevice/s130/headers/nrf_ble_hci.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/softdevice/s130/headers/nrf_ble_l2cap.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/softdevice/s130/headers/nrf_ble_ranges.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/softdevice/s130/headers/nrf_ble_types.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/softdevice/s130/headers/nrf_error.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/softdevice/s130/headers/nrf_error_sdm.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/softdevice/s130/headers/nrf_error_soc.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/softdevice/s130/headers/nrf_nvic.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/softdevice/s130/headers/nrf_sd_def.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/softdevice/s130/headers/nrf_sdm.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/softdevice/s130/headers/nrf_soc.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/softdevice/s130/headers/nrf_svc.h (100%) rename hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/{TARGET_MCU_NRF51822 => TARGET_MCU_NRF51822_UNIFIED}/sdk/softdevice/s130/hex/s130_nrf51_2.0.0_softdevice.hex (100%) diff --git a/hal/targets.json b/hal/targets.json index 1552bcc424..77ef67c47b 100644 --- a/hal/targets.json +++ b/hal/targets.json @@ -1075,366 +1075,6 @@ "device_has": ["ANALOGIN", "ANALOGOUT", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "RTC_LSI", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"], "default_build": "small" }, - "MCU_NRF51": { - "inherits": ["Target"], - "core": "Cortex-M0", - "OVERRIDE_BOOTLOADER_FILENAME": "nrf51822_bootloader.hex", - "macros": [ - "NRF51", - "TARGET_NRF51822", - "BLE_STACK_SUPPORT_REQD", - "SOFTDEVICE_PRESENT", - "S130" - ], - "MERGE_BOOTLOADER": false, - "extra_labels": ["NORDIC", "MCU_NRF51", "MCU_NRF51822", "NRF5"], - "OUTPUT_EXT": "hex", - "is_disk_virtual": true, - "supported_toolchains": ["ARM", "GCC_ARM"], - "public": false, - "MERGE_SOFT_DEVICE": true, - "EXPECTED_SOFTDEVICES_WITH_OFFSETS": [ - { - "boot": "", - "name": "s130_nrf51_2.0.0_softdevice.hex", - "offset": 110592 - } - ], - "detect_code": ["1070"], - "post_binary_hook": { - "function": "MCU_NRF51Code.binary_hook", - "toolchains": ["ARM_STD", "GCC_ARM", "IAR"] - }, - "program_cycle_s": 6, - "default_build": "small", - "features": ["BLE"], - "config":{ - "lf_clock_src": { - "value": "NRF_LF_SRC_XTAL", - "macro_name": "MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC" - } - } - }, - "MCU_NRF51_16K_BASE": { - "inherits": ["MCU_NRF51"], - "extra_labels_add": ["MCU_NORDIC_16K", "MCU_NRF51_16K"], - "macros_add": ["TARGET_MCU_NORDIC_16K", "TARGET_MCU_NRF51_16K"], - "public": false - }, - "MCU_NRF51_16K_BOOT_BASE": { - "inherits": ["MCU_NRF51_16K_BASE"], - "MERGE_BOOTLOADER": true, - "extra_labels_add": ["MCU_NRF51_16K_BOOT"], - "macros_add": ["TARGET_MCU_NRF51_16K_BOOT", "TARGET_OTA_ENABLED"], - "public": false - }, - "MCU_NRF51_16K_OTA_BASE": { - "inherits": ["MCU_NRF51_16K_BASE"], - "public": false, - "extra_labels_add": ["MCU_NRF51_16K_OTA"], - "macros_add": ["TARGET_MCU_NRF51_16K_OTA", "TARGET_OTA_ENABLED"], - "MERGE_SOFT_DEVICE": false - }, - "MCU_NRF51_16K": { - "inherits": ["MCU_NRF51_16K_BASE"], - "extra_labels_add": ["MCU_NRF51_16K_S130"], - "macros_add": ["TARGET_MCU_NRF51_16K_S130"], - "public": false - }, - "MCU_NRF51_S110": { - "extra_labels_add": ["MCU_NRF51_16K_S110"], - "macros_add": ["TARGET_MCU_NRF51_16K_S110"], - "EXPECTED_SOFTDEVICES_WITH_OFFSETS": [ - { - "name": "s110_nrf51822_8.0.0_softdevice.hex", - "boot": "s110_nrf51822_8.0.0_bootloader.hex", - "offset": 98304 - }, - { - "name": "s110_nrf51822_7.1.0_softdevice.hex", - "boot": "s110_nrf51822_7.1.0_bootloader.hex", - "offset": 90112 - } - ], - "public": false - }, - "MCU_NRF51_16K_S110": { - "inherits": ["MCU_NRF51_S110", "MCU_NRF51_16K_BASE"], - "public": false - }, - "MCU_NRF51_16K_BOOT": { - "inherits": ["MCU_NRF51_16K_BOOT_BASE"], - "extra_labels_add": ["MCU_NRF51_16K_S130"], - "macros_add": ["TARGET_MCU_NRF51_16K_S130"], - "public": false - }, - "MCU_NRF51_16K_BOOT_S110": { - "inherits": ["MCU_NRF51_S110", "MCU_NRF51_16K_BOOT_BASE"], - "public": false - }, - "MCU_NRF51_16K_OTA": { - "inherits": ["MCU_NRF51_16K_OTA_BASE"], - "extra_labels_add": ["MCU_NRF51_16K_S130"], - "macros_add": ["TARGET_MCU_NRF51_16K_S130"], - "public": false - }, - "MCU_NRF51_16K_OTA_S110": { - "inherits": ["MCU_NRF51_S110", "MCU_NRF51_16K_OTA_BASE"], - "public": false - }, - "MCU_NRF51_32K": { - "inherits": ["MCU_NRF51"], - "extra_labels_add": ["MCU_NORDIC_32K", "MCU_NRF51_32K"], - "macros_add": ["TARGET_MCU_NORDIC_32K", "TARGET_MCU_NRF51_32K"], - "public": false - }, - "MCU_NRF51_32K_BOOT": { - "inherits": ["MCU_NRF51_32K"], - "MERGE_BOOTLOADER": true, - "extra_labels_add": ["MCU_NRF51_32K_BOOT"], - "macros_add": ["TARGET_MCU_NRF51_32K_BOOT", "TARGET_OTA_ENABLED"], - "public": false - }, - "MCU_NRF51_32K_OTA": { - "inherits": ["MCU_NRF51_32K"], - "public": false, - "extra_labels_add": ["MCU_NRF51_32K_OTA"], - "macros_add": ["TARGET_MCU_NRF51_32K_OTA", "TARGET_OTA_ENABLED"], - "MERGE_SOFT_DEVICE": false - }, - "NRF51822": { - "inherits": ["MCU_NRF51_16K"], - "progen": {"target": "mkit"}, - "extra_labels_add": ["NRF51822", "NRF51822_MKIT"], - "macros_add": ["TARGET_NRF51822_MKIT"], - "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"] - }, - "NRF51822_BOOT": { - "inherits": ["MCU_NRF51_16K_BOOT"], - "extra_labels_add": ["NRF51822", "NRF51822_MKIT"], - "macros_add": ["TARGET_NRF51822_MKIT"], - "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"] - }, - "NRF51822_OTA": { - "inherits": ["MCU_NRF51_16K_OTA"], - "extra_labels_add": ["NRF51822", "NRF51822_MKIT"], - "macros_add": ["TARGET_NRF51822_MKIT"], - "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"] - }, - "ARCH_BLE": { - "supported_form_factors": ["ARDUINO"], - "inherits": ["MCU_NRF51_16K"], - "progen": {"target": "arch-ble"}, - "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"] - }, - "ARCH_BLE_BOOT": { - "supported_form_factors": ["ARDUINO"], - "inherits": ["MCU_NRF51_16K_BOOT"], - "extra_labels_add": ["ARCH_BLE"], - "macros_add": ["TARGET_ARCH_BLE"] - }, - "ARCH_BLE_OTA": { - "supported_form_factors": ["ARDUINO"], - "inherits": ["MCU_NRF51_16K_OTA"], - "extra_labels_add": ["ARCH_BLE"], - "macros_add": ["TARGET_ARCH_BLE"] - }, - "ARCH_LINK": { - "supported_form_factors": ["ARDUINO"], - "inherits": ["MCU_NRF51_16K"], - "extra_labels_add": ["ARCH_BLE"], - "macros_add": ["TARGET_ARCH_BLE"] - }, - "ARCH_LINK_BOOT": { - "supported_form_factors": ["ARDUINO"], - "inherits": ["MCU_NRF51_16K_BOOT"], - "extra_labels_add": ["ARCH_BLE", "ARCH_LINK"], - "macros_add": ["TARGET_ARCH_BLE", "TARGET_ARCH_LINK"] - }, - "ARCH_LINK_OTA": { - "supported_form_factors": ["ARDUINO"], - "inherits": ["MCU_NRF51_16K_OTA"], - "extra_labels_add": ["ARCH_BLE", "ARCH_LINK"], - "macros_add": ["TARGET_ARCH_BLE", "TARGET_ARCH_LINK"] - }, - "SEEED_TINY_BLE": { - "inherits": ["MCU_NRF51_16K"], - "progen": {"target": "seed-tinyble"}, - "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"] - }, - "SEEED_TINY_BLE_BOOT": { - "inherits": ["MCU_NRF51_16K_BOOT"], - "extra_labels_add": ["SEEED_TINY_BLE"], - "macros_add": ["TARGET_SEEED_TINY_BLE"] - }, - "SEEED_TINY_BLE_OTA": { - "inherits": ["MCU_NRF51_16K_OTA"], - "extra_labels_add": ["SEEED_TINY_BLE"], - "macros_add": ["TARGET_SEEED_TINY_BLE"] - }, - "HRM1017": { - "inherits": ["MCU_NRF51_16K"], - "progen": {"target": "hrm1017"}, - "macros_add": ["TARGET_NRF_LFCLK_RC"], - "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"] - }, - "HRM1017_BOOT": { - "inherits": ["MCU_NRF51_16K_BOOT"], - "extra_labels_add": ["HRM1017"], - "macros_add": ["TARGET_HRM1017", "TARGET_NRF_LFCLK_RC"] - }, - "HRM1017_OTA": { - "inherits": ["MCU_NRF51_16K_OTA"], - "extra_labels_add": ["HRM1017"], - "macros_add": ["TARGET_HRM1017", "TARGET_NRF_LFCLK_RC"] - }, - "RBLAB_NRF51822": { - "supported_form_factors": ["ARDUINO"], - "inherits": ["MCU_NRF51_16K"], - "progen": {"target": "rblab-nrf51822"}, - "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"] - }, - "RBLAB_NRF51822_BOOT": { - "supported_form_factors": ["ARDUINO"], - "inherits": ["MCU_NRF51_16K_BOOT"], - "extra_labels_add": ["RBLAB_NRF51822"], - "macros_add": ["TARGET_RBLAB_NRF51822"] - }, - "RBLAB_NRF51822_OTA": { - "supported_form_factors": ["ARDUINO"], - "inherits": ["MCU_NRF51_16K_OTA"], - "extra_labels_add": ["RBLAB_NRF51822"], - "macros_add": ["TARGET_RBLAB_NRF51822"] - }, - "RBLAB_BLENANO": { - "inherits": ["MCU_NRF51_16K"], - "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"] - }, - "RBLAB_BLENANO_BOOT": { - "inherits": ["MCU_NRF51_16K_BOOT"], - "extra_labels_add": ["RBLAB_BLENANO"], - "macros_add": ["TARGET_RBLAB_BLENANO"] - }, - "RBLAB_BLENANO_OTA": { - "inherits": ["MCU_NRF51_16K_OTA"], - "extra_labels_add": ["RBLAB_BLENANO"], - "macros_add": ["TARGET_RBLAB_BLENANO"] - }, - "NRF51822_Y5_MBUG": { - "inherits": ["MCU_NRF51_16K"], - "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"] - }, - "WALLBOT_BLE": { - "inherits": ["MCU_NRF51_16K"], - "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"] - }, - "WALLBOT_BLE_BOOT": { - "inherits": ["MCU_NRF51_16K_BOOT"], - "extra_labels_add": ["WALLBOT_BLE"], - "macros_add": ["TARGET_WALLBOT_BLE"] - }, - "WALLBOT_BLE_OTA": { - "inherits": ["MCU_NRF51_16K_OTA"], - "extra_labels_add": ["WALLBOT_BLE"], - "macros_add": ["TARGET_WALLBOT_BLE"] - }, - "DELTA_DFCM_NNN40": { - "inherits": ["MCU_NRF51_32K"], - "program_cycle_s": 10, - "progen": {"target": "dfcm-nnn40"}, - "macros_add": ["TARGET_NRF_LFCLK_RC"], - "device_has": ["ANALOGIN", "DEBUG_AWARENESS", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SLEEP", "SPI", "SPISLAVE"] - }, - "DELTA_DFCM_NNN40_BOOT": { - "inherits": ["MCU_NRF51_32K_BOOT"], - "program_cycle_s": 10, - "extra_labels_add": ["DELTA_DFCM_NNN40"], - "macros_add": ["TARGET_DELTA_DFCM_NNN40", "TARGET_NRF_LFCLK_RC"] - }, - "DELTA_DFCM_NNN40_OTA": { - "inherits": ["MCU_NRF51_32K_OTA"], - "program_cycle_s": 10, - "extra_labels_add": ["DELTA_DFCM_NNN40"], - "macros_add": ["TARGET_DELTA_DFCM_NNN40", "TARGET_NRF_LFCLK_RC"] - }, - "NRF51_DK": { - "supported_form_factors": ["ARDUINO"], - "inherits": ["MCU_NRF51_32K"], - "progen": {"target": "nrf51-dk"}, - "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE"] - }, - "NRF51_DK_BOOT": { - "supported_form_factors": ["ARDUINO"], - "inherits": ["MCU_NRF51_32K_BOOT"], - "extra_labels_add": ["NRF51_DK"], - "macros_add": ["TARGET_NRF51_DK"] - }, - "NRF51_DK_OTA": { - "supported_form_factors": ["ARDUINO"], - "inherits": ["MCU_NRF51_32K_OTA"], - "extra_labels_add": ["NRF51_DK"], - "macros_add": ["TARGET_NRF51_DK"] - }, - "NRF51_DONGLE": { - "inherits": ["MCU_NRF51_32K"], - "progen": {"target": "nrf51-dongle"}, - "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"] - }, - "NRF51_DONGLE_BOOT": { - "inherits": ["MCU_NRF51_32K_BOOT"], - "extra_labels_add": ["NRF51_DONGLE"], - "macros_add": ["TARGET_NRF51_DONGLE"] - }, - "NRF51_DONGLE_OTA": { - "inherits": ["MCU_NRF51_32K_OTA"], - "extra_labels_add": ["NRF51_DONGLE"], - "macros_add": ["TARGET_NRF51_DONGLE"] - }, - "NRF51_MICROBIT": { - "inherits": ["MCU_NRF51_16K_S110"], - "macros_add": ["TARGET_NRF_LFCLK_RC"], - "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"] - }, - "NRF51_MICROBIT_BOOT": { - "inherits": ["MCU_NRF51_16K_BOOT_S110"], - "extra_labels_add": ["NRF51_MICROBIT"], - "macros_add": ["TARGET_NRF51_MICROBIT", "TARGET_NRF_LFCLK_RC"] - }, - "NRF51_MICROBIT_OTA": { - "inherits": ["MCU_NRF51_16K_OTA_S110"], - "extra_labels_add": ["NRF51_MICROBIT"], - "macros_add": ["TARGET_NRF51_MICROBIT", "TARGET_NRF_LFCLK_RC"] - }, - "NRF51_MICROBIT_B": { - "inherits": ["MCU_NRF51_16K"], - "extra_labels_add": ["NRF51_MICROBIT"], - "macros_add": ["TARGET_NRF51_MICROBIT", "TARGET_NRF_LFCLK_RC"] - }, - "NRF51_MICROBIT_B_BOOT": { - "inherits": ["MCU_NRF51_16K_BOOT"], - "extra_labels_add": ["NRF51_MICROBIT"], - "macros_add": ["TARGET_NRF51_MICROBIT", "TARGET_NRF_LFCLK_RC"] - }, - "NRF51_MICROBIT_B_OTA": { - "inherits": ["MCU_NRF51_16K_OTA"], - "extra_labels_add": ["NRF51_MICROBIT"], - "macros_add": ["TARGET_NRF51_MICROBIT", "TARGET_NRF_LFCLK_RC"] - }, - "TY51822R3": { - "inherits": ["MCU_NRF51_32K"], - "macros_add": ["TARGET_NRF_32MHZ_XTAL"], - "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"] - }, - "TY51822R3_BOOT": { - "inherits": ["MCU_NRF51_32K_BOOT"], - "extra_labels_add": ["TY51822R3"], - "macros_add": ["TARGET_TY51822R3", "TARGET_NRF_32MHZ_XTAL"] - }, - "TY51822R3_OTA": { - "inherits": ["MCU_NRF51_32K_OTA"], - "extra_labels_add": ["NRF51_DK"], - "macros_add": ["TARGET_TY51822R3", "TARGET_NRF_32MHZ_XTAL"] - }, "ARM_MPS2_Target": { "inherits": ["Target"], "public": false, @@ -1703,6 +1343,59 @@ "device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH"], "default_build": "standard" }, + "MCU_NRF51_UNIFIED": { + "inherits": ["Target"], + "core": "Cortex-M0", + "OVERRIDE_BOOTLOADER_FILENAME": "nrf51822_bootloader.hex", + "macros": [ + "NRF51", + "TARGET_NRF51822", + "BLE_STACK_SUPPORT_REQD", + "SOFTDEVICE_PRESENT", + "S130", + "TARGET_MCU_NRF51822" + ], + "MERGE_BOOTLOADER": false, + "extra_labels": ["NORDIC", "MCU_NRF51", "MCU_NRF51822_UNIFIED", "NRF5"], + "OUTPUT_EXT": "hex", + "is_disk_virtual": true, + "supported_toolchains": ["ARM", "GCC_ARM"], + "public": false, + "MERGE_SOFT_DEVICE": true, + "EXPECTED_SOFTDEVICES_WITH_OFFSETS": [ + { + "boot": "", + "name": "s130_nrf51_2.0.0_softdevice.hex", + "offset": 110592 + } + ], + "detect_code": ["1070"], + "post_binary_hook": { + "function": "MCU_NRF51Code.binary_hook", + "toolchains": ["ARM_STD", "GCC_ARM", "IAR"] + }, + "program_cycle_s": 6, + "default_build": "small", + "features": ["BLE"], + "config":{ + "lf_clock_src": { + "value": "NRF_LF_SRC_XTAL", + "macro_name": "MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC" + } + } + }, + "MCU_NRF51_32K_UNIFIED": { + "inherits": ["MCU_NRF51_UNIFIED"], + "extra_labels_add": ["MCU_NORDIC_32K", "MCU_NRF51_32K"], + "macros_add": ["TARGET_MCU_NORDIC_32K", "TARGET_MCU_NRF51_32K"], + "public": false + }, + "NRF51_DK": { + "supported_form_factors": ["ARDUINO"], + "inherits": ["MCU_NRF51_32K_UNIFIED"], + "progen": {"target": "nrf51-dk"}, + "device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE"] + }, "MCU_NRF52": { "inherits": ["Target"], "core": "Cortex-M4F", diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/nrf51_deprecated.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/nrf51_deprecated.h deleted file mode 100644 index 4c60f0b59a..0000000000 --- a/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/nrf51_deprecated.h +++ /dev/null @@ -1,440 +0,0 @@ -/* - * 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 NRF51_DEPRECATED_H -#define NRF51_DEPRECATED_H - -/*lint ++flb "Enter library region */ - -/* This file is given to prevent your SW from not compiling with the updates made to nrf51.h and - * nrf51_bitfields.h. The macros defined in this file were available previously. Do not use these - * macros on purpose. Use the ones defined in nrf51.h and nrf51_bitfields.h instead. - */ - -/* NVMC */ -/* The register ERASEPROTECTEDPAGE is called ERASEPCR0 in the documentation. */ -#define ERASEPROTECTEDPAGE ERASEPCR0 - - -/* LPCOMP */ -/* The interrupt ISR was renamed. Adding old name to the macros. */ -#define LPCOMP_COMP_IRQHandler LPCOMP_IRQHandler -#define LPCOMP_COMP_IRQn LPCOMP_IRQn - - -/* MPU */ -/* The field MPU.PERR0.LPCOMP_COMP was renamed. Added into deprecated in case somebody was using the macros defined for it. */ -#define MPU_PERR0_LPCOMP_COMP_Pos MPU_PERR0_LPCOMP_Pos -#define MPU_PERR0_LPCOMP_COMP_Msk MPU_PERR0_LPCOMP_Msk -#define MPU_PERR0_LPCOMP_COMP_InRegion1 MPU_PERR0_LPCOMP_InRegion1 -#define MPU_PERR0_LPCOMP_COMP_InRegion0 MPU_PERR0_LPCOMP_InRegion0 - - -/* POWER */ -/* The field POWER.RAMON.OFFRAM3 was eliminated. Added into deprecated in case somebody was using the macros defined for it. */ -#define POWER_RAMON_OFFRAM3_Pos (19UL) -#define POWER_RAMON_OFFRAM3_Msk (0x1UL << POWER_RAMON_OFFRAM3_Pos) -#define POWER_RAMON_OFFRAM3_RAM3Off (0UL) -#define POWER_RAMON_OFFRAM3_RAM3On (1UL) -/* The field POWER.RAMON.OFFRAM2 was eliminated. Added into deprecated in case somebody was using the macros defined for it. */ -#define POWER_RAMON_OFFRAM2_Pos (18UL) -#define POWER_RAMON_OFFRAM2_Msk (0x1UL << POWER_RAMON_OFFRAM2_Pos) -#define POWER_RAMON_OFFRAM2_RAM2Off (0UL) -#define POWER_RAMON_OFFRAM2_RAM2On (1UL) -/* The field POWER.RAMON.ONRAM3 was eliminated. Added into deprecated in case somebody was using the macros defined for it. */ -#define POWER_RAMON_ONRAM3_Pos (3UL) -#define POWER_RAMON_ONRAM3_Msk (0x1UL << POWER_RAMON_ONRAM3_Pos) -#define POWER_RAMON_ONRAM3_RAM3Off (0UL) -#define POWER_RAMON_ONRAM3_RAM3On (1UL) -/* The field POWER.RAMON.ONRAM2 was eliminated. Added into deprecated in case somebody was using the macros defined for it. */ -#define POWER_RAMON_ONRAM2_Pos (2UL) -#define POWER_RAMON_ONRAM2_Msk (0x1UL << POWER_RAMON_ONRAM2_Pos) -#define POWER_RAMON_ONRAM2_RAM2Off (0UL) -#define POWER_RAMON_ONRAM2_RAM2On (1UL) - - -/* RADIO */ -/* The enumerated value RADIO.TXPOWER.TXPOWER.Neg40dBm was renamed. Added into deprecated with the new macro name. */ -#define RADIO_TXPOWER_TXPOWER_Neg40dBm RADIO_TXPOWER_TXPOWER_Neg30dBm -/* The name of the field SKIPADDR was corrected. Old macros added for compatibility. */ -#define RADIO_CRCCNF_SKIP_ADDR_Pos RADIO_CRCCNF_SKIPADDR_Pos -#define RADIO_CRCCNF_SKIP_ADDR_Msk RADIO_CRCCNF_SKIPADDR_Msk -#define RADIO_CRCCNF_SKIP_ADDR_Include RADIO_CRCCNF_SKIPADDR_Include -#define RADIO_CRCCNF_SKIP_ADDR_Skip RADIO_CRCCNF_SKIPADDR_Skip -/* The name of the field PLLLOCK was corrected. Old macros added for compatibility. */ -#define RADIO_TEST_PLL_LOCK_Pos RADIO_TEST_PLLLOCK_Pos -#define RADIO_TEST_PLL_LOCK_Msk RADIO_TEST_PLLLOCK_Msk -#define RADIO_TEST_PLL_LOCK_Disabled RADIO_TEST_PLLLOCK_Disabled -#define RADIO_TEST_PLL_LOCK_Enabled RADIO_TEST_PLLLOCK_Enabled -/* The name of the field CONSTCARRIER was corrected. Old macros added for compatibility. */ -#define RADIO_TEST_CONST_CARRIER_Pos RADIO_TEST_CONSTCARRIER_Pos -#define RADIO_TEST_CONST_CARRIER_Msk RADIO_TEST_CONSTCARRIER_Msk -#define RADIO_TEST_CONST_CARRIER_Disabled RADIO_TEST_CONSTCARRIER_Disabled -#define RADIO_TEST_CONST_CARRIER_Enabled RADIO_TEST_CONSTCARRIER_Enabled - - -/* FICR */ -/* The registers FICR.SIZERAMBLOCK0, FICR.SIZERAMBLOCK1, FICR.SIZERAMBLOCK2 and FICR.SIZERAMBLOCK3 were renamed into an array. */ -#define SIZERAMBLOCK0 SIZERAMBLOCKS -#define SIZERAMBLOCK1 SIZERAMBLOCKS -#define SIZERAMBLOCK2 SIZERAMBLOCK[2] /*!< Note that this macro will disapear when SIZERAMBLOCK array is eliminated. SIZERAMBLOCK is a deprecated array. */ -#define SIZERAMBLOCK3 SIZERAMBLOCK[3] /*!< Note that this macro will disapear when SIZERAMBLOCK array is eliminated. SIZERAMBLOCK is a deprecated array. */ -/* The registers FICR.DEVICEID0 and FICR.DEVICEID1 were renamed into an array. */ -#define DEVICEID0 DEVICEID[0] -#define DEVICEID1 DEVICEID[1] -/* The registers FICR.ER0, FICR.ER1, FICR.ER2 and FICR.ER3 were renamed into an array. */ -#define ER0 ER[0] -#define ER1 ER[1] -#define ER2 ER[2] -#define ER3 ER[3] -/* The registers FICR.IR0, FICR.IR1, FICR.IR2 and FICR.IR3 were renamed into an array. */ -#define IR0 IR[0] -#define IR1 IR[1] -#define IR2 IR[2] -#define IR3 IR[3] -/* The registers FICR.DEVICEADDR0 and FICR.DEVICEADDR1 were renamed into an array. */ -#define DEVICEADDR0 DEVICEADDR[0] -#define DEVICEADDR1 DEVICEADDR[1] - - -/* PPI */ -/* The tasks PPI.TASKS_CHGxEN and PPI.TASKS_CHGxDIS were renamed into an array of structs. */ -#define TASKS_CHG0EN TASKS_CHG[0].EN -#define TASKS_CHG0DIS TASKS_CHG[0].DIS -#define TASKS_CHG1EN TASKS_CHG[1].EN -#define TASKS_CHG1DIS TASKS_CHG[1].DIS -#define TASKS_CHG2EN TASKS_CHG[2].EN -#define TASKS_CHG2DIS TASKS_CHG[2].DIS -#define TASKS_CHG3EN TASKS_CHG[3].EN -#define TASKS_CHG3DIS TASKS_CHG[3].DIS -/* The registers PPI.CHx_EEP and PPI.CHx_TEP were renamed into an array of structs. */ -#define CH0_EEP CH[0].EEP -#define CH0_TEP CH[0].TEP -#define CH1_EEP CH[1].EEP -#define CH1_TEP CH[1].TEP -#define CH2_EEP CH[2].EEP -#define CH2_TEP CH[2].TEP -#define CH3_EEP CH[3].EEP -#define CH3_TEP CH[3].TEP -#define CH4_EEP CH[4].EEP -#define CH4_TEP CH[4].TEP -#define CH5_EEP CH[5].EEP -#define CH5_TEP CH[5].TEP -#define CH6_EEP CH[6].EEP -#define CH6_TEP CH[6].TEP -#define CH7_EEP CH[7].EEP -#define CH7_TEP CH[7].TEP -#define CH8_EEP CH[8].EEP -#define CH8_TEP CH[8].TEP -#define CH9_EEP CH[9].EEP -#define CH9_TEP CH[9].TEP -#define CH10_EEP CH[10].EEP -#define CH10_TEP CH[10].TEP -#define CH11_EEP CH[11].EEP -#define CH11_TEP CH[11].TEP -#define CH12_EEP CH[12].EEP -#define CH12_TEP CH[12].TEP -#define CH13_EEP CH[13].EEP -#define CH13_TEP CH[13].TEP -#define CH14_EEP CH[14].EEP -#define CH14_TEP CH[14].TEP -#define CH15_EEP CH[15].EEP -#define CH15_TEP CH[15].TEP -/* The registers PPI.CHG0, PPI.CHG1, PPI.CHG2 and PPI.CHG3 were renamed into an array. */ -#define CHG0 CHG[0] -#define CHG1 CHG[1] -#define CHG2 CHG[2] -#define CHG3 CHG[3] -/* All bitfield macros for the CHGx registers therefore changed name. */ -#define PPI_CHG0_CH15_Pos PPI_CHG_CH15_Pos -#define PPI_CHG0_CH15_Msk PPI_CHG_CH15_Msk -#define PPI_CHG0_CH15_Excluded PPI_CHG_CH15_Excluded -#define PPI_CHG0_CH15_Included PPI_CHG_CH15_Included -#define PPI_CHG0_CH14_Pos PPI_CHG_CH14_Pos -#define PPI_CHG0_CH14_Msk PPI_CHG_CH14_Msk -#define PPI_CHG0_CH14_Excluded PPI_CHG_CH14_Excluded -#define PPI_CHG0_CH14_Included PPI_CHG_CH14_Included -#define PPI_CHG0_CH13_Pos PPI_CHG_CH13_Pos -#define PPI_CHG0_CH13_Msk PPI_CHG_CH13_Msk -#define PPI_CHG0_CH13_Excluded PPI_CHG_CH13_Excluded -#define PPI_CHG0_CH13_Included PPI_CHG_CH13_Included -#define PPI_CHG0_CH12_Pos PPI_CHG_CH12_Pos -#define PPI_CHG0_CH12_Msk PPI_CHG_CH12_Msk -#define PPI_CHG0_CH12_Excluded PPI_CHG_CH12_Excluded -#define PPI_CHG0_CH12_Included PPI_CHG_CH12_Included -#define PPI_CHG0_CH11_Pos PPI_CHG_CH11_Pos -#define PPI_CHG0_CH11_Msk PPI_CHG_CH11_Msk -#define PPI_CHG0_CH11_Excluded PPI_CHG_CH11_Excluded -#define PPI_CHG0_CH11_Included PPI_CHG_CH11_Included -#define PPI_CHG0_CH10_Pos PPI_CHG_CH10_Pos -#define PPI_CHG0_CH10_Msk PPI_CHG_CH10_Msk -#define PPI_CHG0_CH10_Excluded PPI_CHG_CH10_Excluded -#define PPI_CHG0_CH10_Included PPI_CHG_CH10_Included -#define PPI_CHG0_CH9_Pos PPI_CHG_CH9_Pos -#define PPI_CHG0_CH9_Msk PPI_CHG_CH9_Msk -#define PPI_CHG0_CH9_Excluded PPI_CHG_CH9_Excluded -#define PPI_CHG0_CH9_Included PPI_CHG_CH9_Included -#define PPI_CHG0_CH8_Pos PPI_CHG_CH8_Pos -#define PPI_CHG0_CH8_Msk PPI_CHG_CH8_Msk -#define PPI_CHG0_CH8_Excluded PPI_CHG_CH8_Excluded -#define PPI_CHG0_CH8_Included PPI_CHG_CH8_Included -#define PPI_CHG0_CH7_Pos PPI_CHG_CH7_Pos -#define PPI_CHG0_CH7_Msk PPI_CHG_CH7_Msk -#define PPI_CHG0_CH7_Excluded PPI_CHG_CH7_Excluded -#define PPI_CHG0_CH7_Included PPI_CHG_CH7_Included -#define PPI_CHG0_CH6_Pos PPI_CHG_CH6_Pos -#define PPI_CHG0_CH6_Msk PPI_CHG_CH6_Msk -#define PPI_CHG0_CH6_Excluded PPI_CHG_CH6_Excluded -#define PPI_CHG0_CH6_Included PPI_CHG_CH6_Included -#define PPI_CHG0_CH5_Pos PPI_CHG_CH5_Pos -#define PPI_CHG0_CH5_Msk PPI_CHG_CH5_Msk -#define PPI_CHG0_CH5_Excluded PPI_CHG_CH5_Excluded -#define PPI_CHG0_CH5_Included PPI_CHG_CH5_Included -#define PPI_CHG0_CH4_Pos PPI_CHG_CH4_Pos -#define PPI_CHG0_CH4_Msk PPI_CHG_CH4_Msk -#define PPI_CHG0_CH4_Excluded PPI_CHG_CH4_Excluded -#define PPI_CHG0_CH4_Included PPI_CHG_CH4_Included -#define PPI_CHG0_CH3_Pos PPI_CHG_CH3_Pos -#define PPI_CHG0_CH3_Msk PPI_CHG_CH3_Msk -#define PPI_CHG0_CH3_Excluded PPI_CHG_CH3_Excluded -#define PPI_CHG0_CH3_Included PPI_CHG_CH3_Included -#define PPI_CHG0_CH2_Pos PPI_CHG_CH2_Pos -#define PPI_CHG0_CH2_Msk PPI_CHG_CH2_Msk -#define PPI_CHG0_CH2_Excluded PPI_CHG_CH2_Excluded -#define PPI_CHG0_CH2_Included PPI_CHG_CH2_Included -#define PPI_CHG0_CH1_Pos PPI_CHG_CH1_Pos -#define PPI_CHG0_CH1_Msk PPI_CHG_CH1_Msk -#define PPI_CHG0_CH1_Excluded PPI_CHG_CH1_Excluded -#define PPI_CHG0_CH1_Included PPI_CHG_CH1_Included -#define PPI_CHG0_CH0_Pos PPI_CHG_CH0_Pos -#define PPI_CHG0_CH0_Msk PPI_CHG_CH0_Msk -#define PPI_CHG0_CH0_Excluded PPI_CHG_CH0_Excluded -#define PPI_CHG0_CH0_Included PPI_CHG_CH0_Included -#define PPI_CHG1_CH15_Pos PPI_CHG_CH15_Pos -#define PPI_CHG1_CH15_Msk PPI_CHG_CH15_Msk -#define PPI_CHG1_CH15_Excluded PPI_CHG_CH15_Excluded -#define PPI_CHG1_CH15_Included PPI_CHG_CH15_Included -#define PPI_CHG1_CH14_Pos PPI_CHG_CH14_Pos -#define PPI_CHG1_CH14_Msk PPI_CHG_CH14_Msk -#define PPI_CHG1_CH14_Excluded PPI_CHG_CH14_Excluded -#define PPI_CHG1_CH14_Included PPI_CHG_CH14_Included -#define PPI_CHG1_CH13_Pos PPI_CHG_CH13_Pos -#define PPI_CHG1_CH13_Msk PPI_CHG_CH13_Msk -#define PPI_CHG1_CH13_Excluded PPI_CHG_CH13_Excluded -#define PPI_CHG1_CH13_Included PPI_CHG_CH13_Included -#define PPI_CHG1_CH12_Pos PPI_CHG_CH12_Pos -#define PPI_CHG1_CH12_Msk PPI_CHG_CH12_Msk -#define PPI_CHG1_CH12_Excluded PPI_CHG_CH12_Excluded -#define PPI_CHG1_CH12_Included PPI_CHG_CH12_Included -#define PPI_CHG1_CH11_Pos PPI_CHG_CH11_Pos -#define PPI_CHG1_CH11_Msk PPI_CHG_CH11_Msk -#define PPI_CHG1_CH11_Excluded PPI_CHG_CH11_Excluded -#define PPI_CHG1_CH11_Included PPI_CHG_CH11_Included -#define PPI_CHG1_CH10_Pos PPI_CHG_CH10_Pos -#define PPI_CHG1_CH10_Msk PPI_CHG_CH10_Msk -#define PPI_CHG1_CH10_Excluded PPI_CHG_CH10_Excluded -#define PPI_CHG1_CH10_Included PPI_CHG_CH10_Included -#define PPI_CHG1_CH9_Pos PPI_CHG_CH9_Pos -#define PPI_CHG1_CH9_Msk PPI_CHG_CH9_Msk -#define PPI_CHG1_CH9_Excluded PPI_CHG_CH9_Excluded -#define PPI_CHG1_CH9_Included PPI_CHG_CH9_Included -#define PPI_CHG1_CH8_Pos PPI_CHG_CH8_Pos -#define PPI_CHG1_CH8_Msk PPI_CHG_CH8_Msk -#define PPI_CHG1_CH8_Excluded PPI_CHG_CH8_Excluded -#define PPI_CHG1_CH8_Included PPI_CHG_CH8_Included -#define PPI_CHG1_CH7_Pos PPI_CHG_CH7_Pos -#define PPI_CHG1_CH7_Msk PPI_CHG_CH7_Msk -#define PPI_CHG1_CH7_Excluded PPI_CHG_CH7_Excluded -#define PPI_CHG1_CH7_Included PPI_CHG_CH7_Included -#define PPI_CHG1_CH6_Pos PPI_CHG_CH6_Pos -#define PPI_CHG1_CH6_Msk PPI_CHG_CH6_Msk -#define PPI_CHG1_CH6_Excluded PPI_CHG_CH6_Excluded -#define PPI_CHG1_CH6_Included PPI_CHG_CH6_Included -#define PPI_CHG1_CH5_Pos PPI_CHG_CH5_Pos -#define PPI_CHG1_CH5_Msk PPI_CHG_CH5_Msk -#define PPI_CHG1_CH5_Excluded PPI_CHG_CH5_Excluded -#define PPI_CHG1_CH5_Included PPI_CHG_CH5_Included -#define PPI_CHG1_CH4_Pos PPI_CHG_CH4_Pos -#define PPI_CHG1_CH4_Msk PPI_CHG_CH4_Msk -#define PPI_CHG1_CH4_Excluded PPI_CHG_CH4_Excluded -#define PPI_CHG1_CH4_Included PPI_CHG_CH4_Included -#define PPI_CHG1_CH3_Pos PPI_CHG_CH3_Pos -#define PPI_CHG1_CH3_Msk PPI_CHG_CH3_Msk -#define PPI_CHG1_CH3_Excluded PPI_CHG_CH3_Excluded -#define PPI_CHG1_CH3_Included PPI_CHG_CH3_Included -#define PPI_CHG1_CH2_Pos PPI_CHG_CH2_Pos -#define PPI_CHG1_CH2_Msk PPI_CHG_CH2_Msk -#define PPI_CHG1_CH2_Excluded PPI_CHG_CH2_Excluded -#define PPI_CHG1_CH2_Included PPI_CHG_CH2_Included -#define PPI_CHG1_CH1_Pos PPI_CHG_CH1_Pos -#define PPI_CHG1_CH1_Msk PPI_CHG_CH1_Msk -#define PPI_CHG1_CH1_Excluded PPI_CHG_CH1_Excluded -#define PPI_CHG1_CH1_Included PPI_CHG_CH1_Included -#define PPI_CHG1_CH0_Pos PPI_CHG_CH0_Pos -#define PPI_CHG1_CH0_Msk PPI_CHG_CH0_Msk -#define PPI_CHG1_CH0_Excluded PPI_CHG_CH0_Excluded -#define PPI_CHG1_CH0_Included PPI_CHG_CH0_Included -#define PPI_CHG2_CH15_Pos PPI_CHG_CH15_Pos -#define PPI_CHG2_CH15_Msk PPI_CHG_CH15_Msk -#define PPI_CHG2_CH15_Excluded PPI_CHG_CH15_Excluded -#define PPI_CHG2_CH15_Included PPI_CHG_CH15_Included -#define PPI_CHG2_CH14_Pos PPI_CHG_CH14_Pos -#define PPI_CHG2_CH14_Msk PPI_CHG_CH14_Msk -#define PPI_CHG2_CH14_Excluded PPI_CHG_CH14_Excluded -#define PPI_CHG2_CH14_Included PPI_CHG_CH14_Included -#define PPI_CHG2_CH13_Pos PPI_CHG_CH13_Pos -#define PPI_CHG2_CH13_Msk PPI_CHG_CH13_Msk -#define PPI_CHG2_CH13_Excluded PPI_CHG_CH13_Excluded -#define PPI_CHG2_CH13_Included PPI_CHG_CH13_Included -#define PPI_CHG2_CH12_Pos PPI_CHG_CH12_Pos -#define PPI_CHG2_CH12_Msk PPI_CHG_CH12_Msk -#define PPI_CHG2_CH12_Excluded PPI_CHG_CH12_Excluded -#define PPI_CHG2_CH12_Included PPI_CHG_CH12_Included -#define PPI_CHG2_CH11_Pos PPI_CHG_CH11_Pos -#define PPI_CHG2_CH11_Msk PPI_CHG_CH11_Msk -#define PPI_CHG2_CH11_Excluded PPI_CHG_CH11_Excluded -#define PPI_CHG2_CH11_Included PPI_CHG_CH11_Included -#define PPI_CHG2_CH10_Pos PPI_CHG_CH10_Pos -#define PPI_CHG2_CH10_Msk PPI_CHG_CH10_Msk -#define PPI_CHG2_CH10_Excluded PPI_CHG_CH10_Excluded -#define PPI_CHG2_CH10_Included PPI_CHG_CH10_Included -#define PPI_CHG2_CH9_Pos PPI_CHG_CH9_Pos -#define PPI_CHG2_CH9_Msk PPI_CHG_CH9_Msk -#define PPI_CHG2_CH9_Excluded PPI_CHG_CH9_Excluded -#define PPI_CHG2_CH9_Included PPI_CHG_CH9_Included -#define PPI_CHG2_CH8_Pos PPI_CHG_CH8_Pos -#define PPI_CHG2_CH8_Msk PPI_CHG_CH8_Msk -#define PPI_CHG2_CH8_Excluded PPI_CHG_CH8_Excluded -#define PPI_CHG2_CH8_Included PPI_CHG_CH8_Included -#define PPI_CHG2_CH7_Pos PPI_CHG_CH7_Pos -#define PPI_CHG2_CH7_Msk PPI_CHG_CH7_Msk -#define PPI_CHG2_CH7_Excluded PPI_CHG_CH7_Excluded -#define PPI_CHG2_CH7_Included PPI_CHG_CH7_Included -#define PPI_CHG2_CH6_Pos PPI_CHG_CH6_Pos -#define PPI_CHG2_CH6_Msk PPI_CHG_CH6_Msk -#define PPI_CHG2_CH6_Excluded PPI_CHG_CH6_Excluded -#define PPI_CHG2_CH6_Included PPI_CHG_CH6_Included -#define PPI_CHG2_CH5_Pos PPI_CHG_CH5_Pos -#define PPI_CHG2_CH5_Msk PPI_CHG_CH5_Msk -#define PPI_CHG2_CH5_Excluded PPI_CHG_CH5_Excluded -#define PPI_CHG2_CH5_Included PPI_CHG_CH5_Included -#define PPI_CHG2_CH4_Pos PPI_CHG_CH4_Pos -#define PPI_CHG2_CH4_Msk PPI_CHG_CH4_Msk -#define PPI_CHG2_CH4_Excluded PPI_CHG_CH4_Excluded -#define PPI_CHG2_CH4_Included PPI_CHG_CH4_Included -#define PPI_CHG2_CH3_Pos PPI_CHG_CH3_Pos -#define PPI_CHG2_CH3_Msk PPI_CHG_CH3_Msk -#define PPI_CHG2_CH3_Excluded PPI_CHG_CH3_Excluded -#define PPI_CHG2_CH3_Included PPI_CHG_CH3_Included -#define PPI_CHG2_CH2_Pos PPI_CHG_CH2_Pos -#define PPI_CHG2_CH2_Msk PPI_CHG_CH2_Msk -#define PPI_CHG2_CH2_Excluded PPI_CHG_CH2_Excluded -#define PPI_CHG2_CH2_Included PPI_CHG_CH2_Included -#define PPI_CHG2_CH1_Pos PPI_CHG_CH1_Pos -#define PPI_CHG2_CH1_Msk PPI_CHG_CH1_Msk -#define PPI_CHG2_CH1_Excluded PPI_CHG_CH1_Excluded -#define PPI_CHG2_CH1_Included PPI_CHG_CH1_Included -#define PPI_CHG2_CH0_Pos PPI_CHG_CH0_Pos -#define PPI_CHG2_CH0_Msk PPI_CHG_CH0_Msk -#define PPI_CHG2_CH0_Excluded PPI_CHG_CH0_Excluded -#define PPI_CHG2_CH0_Included PPI_CHG_CH0_Included -#define PPI_CHG3_CH15_Pos PPI_CHG_CH15_Pos -#define PPI_CHG3_CH15_Msk PPI_CHG_CH15_Msk -#define PPI_CHG3_CH15_Excluded PPI_CHG_CH15_Excluded -#define PPI_CHG3_CH15_Included PPI_CHG_CH15_Included -#define PPI_CHG3_CH14_Pos PPI_CHG_CH14_Pos -#define PPI_CHG3_CH14_Msk PPI_CHG_CH14_Msk -#define PPI_CHG3_CH14_Excluded PPI_CHG_CH14_Excluded -#define PPI_CHG3_CH14_Included PPI_CHG_CH14_Included -#define PPI_CHG3_CH13_Pos PPI_CHG_CH13_Pos -#define PPI_CHG3_CH13_Msk PPI_CHG_CH13_Msk -#define PPI_CHG3_CH13_Excluded PPI_CHG_CH13_Excluded -#define PPI_CHG3_CH13_Included PPI_CHG_CH13_Included -#define PPI_CHG3_CH12_Pos PPI_CHG_CH12_Pos -#define PPI_CHG3_CH12_Msk PPI_CHG_CH12_Msk -#define PPI_CHG3_CH12_Excluded PPI_CHG_CH12_Excluded -#define PPI_CHG3_CH12_Included PPI_CHG_CH12_Included -#define PPI_CHG3_CH11_Pos PPI_CHG_CH11_Pos -#define PPI_CHG3_CH11_Msk PPI_CHG_CH11_Msk -#define PPI_CHG3_CH11_Excluded PPI_CHG_CH11_Excluded -#define PPI_CHG3_CH11_Included PPI_CHG_CH11_Included -#define PPI_CHG3_CH10_Pos PPI_CHG_CH10_Pos -#define PPI_CHG3_CH10_Msk PPI_CHG_CH10_Msk -#define PPI_CHG3_CH10_Excluded PPI_CHG_CH10_Excluded -#define PPI_CHG3_CH10_Included PPI_CHG_CH10_Included -#define PPI_CHG3_CH9_Pos PPI_CHG_CH9_Pos -#define PPI_CHG3_CH9_Msk PPI_CHG_CH9_Msk -#define PPI_CHG3_CH9_Excluded PPI_CHG_CH9_Excluded -#define PPI_CHG3_CH9_Included PPI_CHG_CH9_Included -#define PPI_CHG3_CH8_Pos PPI_CHG_CH8_Pos -#define PPI_CHG3_CH8_Msk PPI_CHG_CH8_Msk -#define PPI_CHG3_CH8_Excluded PPI_CHG_CH8_Excluded -#define PPI_CHG3_CH8_Included PPI_CHG_CH8_Included -#define PPI_CHG3_CH7_Pos PPI_CHG_CH7_Pos -#define PPI_CHG3_CH7_Msk PPI_CHG_CH7_Msk -#define PPI_CHG3_CH7_Excluded PPI_CHG_CH7_Excluded -#define PPI_CHG3_CH7_Included PPI_CHG_CH7_Included -#define PPI_CHG3_CH6_Pos PPI_CHG_CH6_Pos -#define PPI_CHG3_CH6_Msk PPI_CHG_CH6_Msk -#define PPI_CHG3_CH6_Excluded PPI_CHG_CH6_Excluded -#define PPI_CHG3_CH6_Included PPI_CHG_CH6_Included -#define PPI_CHG3_CH5_Pos PPI_CHG_CH5_Pos -#define PPI_CHG3_CH5_Msk PPI_CHG_CH5_Msk -#define PPI_CHG3_CH5_Excluded PPI_CHG_CH5_Excluded -#define PPI_CHG3_CH5_Included PPI_CHG_CH5_Included -#define PPI_CHG3_CH4_Pos PPI_CHG_CH4_Pos -#define PPI_CHG3_CH4_Msk PPI_CHG_CH4_Msk -#define PPI_CHG3_CH4_Excluded PPI_CHG_CH4_Excluded -#define PPI_CHG3_CH4_Included PPI_CHG_CH4_Included -#define PPI_CHG3_CH3_Pos PPI_CHG_CH3_Pos -#define PPI_CHG3_CH3_Msk PPI_CHG_CH3_Msk -#define PPI_CHG3_CH3_Excluded PPI_CHG_CH3_Excluded -#define PPI_CHG3_CH3_Included PPI_CHG_CH3_Included -#define PPI_CHG3_CH2_Pos PPI_CHG_CH2_Pos -#define PPI_CHG3_CH2_Msk PPI_CHG_CH2_Msk -#define PPI_CHG3_CH2_Excluded PPI_CHG_CH2_Excluded -#define PPI_CHG3_CH2_Included PPI_CHG_CH2_Included -#define PPI_CHG3_CH1_Pos PPI_CHG_CH1_Pos -#define PPI_CHG3_CH1_Msk PPI_CHG_CH1_Msk -#define PPI_CHG3_CH1_Excluded PPI_CHG_CH1_Excluded -#define PPI_CHG3_CH1_Included PPI_CHG_CH1_Included -#define PPI_CHG3_CH0_Pos PPI_CHG_CH0_Pos -#define PPI_CHG3_CH0_Msk PPI_CHG_CH0_Msk -#define PPI_CHG3_CH0_Excluded PPI_CHG_CH0_Excluded -#define PPI_CHG3_CH0_Included PPI_CHG_CH0_Included - - - -/*lint --flb "Leave library region" */ - -#endif /* NRF51_DEPRECATED_H */ - diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_16K/startup_nRF51822.S b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_16K/startup_nRF51822.S similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_16K/startup_nRF51822.S rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_16K/startup_nRF51822.S diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/startup_nRF51822.S b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/startup_nRF51822.S similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/startup_nRF51822.S rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/startup_nRF51822.S diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S110/nRF51822.sct b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S110/nRF51822.sct similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S110/nRF51822.sct rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S110/nRF51822.sct diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S130/nRF51822.sct b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S130/nRF51822.sct similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S130/nRF51822.sct rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S130/nRF51822.sct diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/sys.cpp b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_ARM_STD/sys.cpp similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_ARM_STD/sys.cpp rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_ARM_STD/sys.cpp diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NORDIC_32K/NRF51822.ld b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_GCC_ARM/TARGET_MCU_NORDIC_32K/NRF51822.ld similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NORDIC_32K/NRF51822.ld rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_GCC_ARM/TARGET_MCU_NORDIC_32K/NRF51822.ld diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S110/NRF51822.ld b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S110/NRF51822.ld similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S110/NRF51822.ld rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S110/NRF51822.ld diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S130/NRF51822.ld b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S130/NRF51822.ld similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S130/NRF51822.ld rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S130/NRF51822.ld diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/startup_NRF51822.S b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_GCC_ARM/startup_NRF51822.S similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/startup_NRF51822.S rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_GCC_ARM/startup_NRF51822.S diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/nRF51822_QFAA.icf b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/nRF51822_QFAA.icf similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/nRF51822_QFAA.icf rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/nRF51822_QFAA.icf diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/startup_NRF51822_IAR.S b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/startup_NRF51822_IAR.S similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/startup_NRF51822_IAR.S rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/startup_NRF51822_IAR.S diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/nRF51822_QFAA.icf b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/nRF51822_QFAA.icf similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/nRF51822_QFAA.icf rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/nRF51822_QFAA.icf diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/startup_NRF51822_IAR.S b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/startup_NRF51822_IAR.S similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/startup_NRF51822_IAR.S rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_32K/startup_NRF51822_IAR.S diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/cmsis.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/cmsis.h similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/cmsis.h rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/cmsis.h diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/cmsis_nvic.c b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/cmsis_nvic.c similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/cmsis_nvic.c rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/cmsis_nvic.c diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/cmsis_nvic.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/cmsis_nvic.h similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/cmsis_nvic.h rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/cmsis_nvic.h diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/system_nrf51.c similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.c rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/system_nrf51.c diff --git a/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.h b/hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/system_nrf51.h similarity index 100% rename from hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/system_nrf51.h rename to hal/targets/cmsis/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/system_nrf51.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/PeripheralNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/PeripheralNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/PeripheralNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/PeripheralNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/PortNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/PortNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/PortNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/PortNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_ARCH_BLE/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_ARCH_BLE/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_ARCH_BLE/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_ARCH_BLE/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_ARCH_BLE/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_ARCH_BLE/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_ARCH_BLE/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_ARCH_BLE/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/mbed_overrides.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/mbed_overrides.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/mbed_overrides.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/mbed_overrides.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/rtc_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/rtc_api.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_DELTA_DFCM_NNN40/rtc_api.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/rtc_api.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_HRM1017/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_HRM1017/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_HRM1017/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_HRM1017/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_HRM1017/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_HRM1017/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_HRM1017/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_HRM1017/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_MKIT/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_MKIT/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_MKIT/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_MKIT/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_MKIT/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_MKIT/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_MKIT/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_MKIT/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_SBKIT/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_SBKIT/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_SBKIT/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_SBKIT/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_SBKIT/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_SBKIT/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_SBKIT/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_SBKIT/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_Y5_MBUG/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_Y5_MBUG/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_Y5_MBUG/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_Y5_MBUG/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_Y5_MBUG/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_Y5_MBUG/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51822_Y5_MBUG/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_Y5_MBUG/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DK/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_DK/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DK/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_DK/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DK/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_DK/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DK/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_DK/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DONGLE/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_DONGLE/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DONGLE/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_DONGLE/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DONGLE/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_DONGLE/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_DONGLE/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_DONGLE/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_MICROBIT/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_MICROBIT/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_MICROBIT/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_MICROBIT/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_MICROBIT/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_MICROBIT/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_NRF51_MICROBIT/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_MICROBIT/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_BLENANO/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_BLENANO/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_BLENANO/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_BLENANO/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_NRF51822/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_NRF51822/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_NRF51822/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_NRF51822/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_SEEED_TINY_BLE/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_SEEED_TINY_BLE/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_SEEED_TINY_BLE/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_SEEED_TINY_BLE/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_SEEED_TINY_BLE/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_SEEED_TINY_BLE/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_SEEED_TINY_BLE/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_SEEED_TINY_BLE/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_TY51822R3/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_TY51822R3/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_TY51822R3/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_TY51822R3/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_TY51822R3/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_TY51822R3/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_TY51822R3/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_TY51822R3/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_WALLBOT_BLE/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_WALLBOT_BLE/PinNames.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_WALLBOT_BLE/PinNames.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_WALLBOT_BLE/PinNames.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_WALLBOT_BLE/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_WALLBOT_BLE/device.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/TARGET_WALLBOT_BLE/device.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_WALLBOT_BLE/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/analogin_api.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/analogin_api.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/pwmout_api.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/pwmout_api.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/drivers_nrf/adc/nrf_drv_adc.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/drivers_nrf/adc/nrf_drv_adc.c similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/drivers_nrf/adc/nrf_drv_adc.c rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/drivers_nrf/adc/nrf_drv_adc.c diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/drivers_nrf/adc/nrf_drv_adc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/drivers_nrf/adc/nrf_drv_adc.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/drivers_nrf/adc/nrf_drv_adc.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/drivers_nrf/adc/nrf_drv_adc.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/nrf_drv_config.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/nrf_drv_config.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/nrf_drv_config.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf51/nrf_mbr.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf51/nrf_mbr.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf51/nrf_mbr.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf51/nrf_mbr.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_ble.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_ble.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_err.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_ble_err.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_err.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_ble_err.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gap.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_ble_gap.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gap.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_ble_gap.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gatt.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_ble_gatt.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gatt.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_ble_gatt.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gattc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_ble_gattc.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gattc.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_ble_gattc.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gatts.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_ble_gatts.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gatts.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_ble_gatts.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_hci.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_ble_hci.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_hci.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_ble_hci.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_l2cap.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_ble_l2cap.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_l2cap.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_ble_l2cap.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_ranges.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_ble_ranges.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_ranges.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_ble_ranges.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_types.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_ble_types.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_types.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_ble_types.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_error.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_error.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error_sdm.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_error_sdm.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error_sdm.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_error_sdm.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error_soc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_error_soc.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_error_soc.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_error_soc.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_nvic.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_nvic.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_nvic.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_nvic.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_sd_def.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_sd_def.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_sd_def.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_sd_def.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_sdm.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_sdm.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_sdm.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_sdm.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_soc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_soc.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_soc.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_soc.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_svc.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_svc.h similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_svc.h rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/headers/nrf_svc.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/hex/s130_nrf51_2.0.0_softdevice.hex b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/hex/s130_nrf51_2.0.0_softdevice.hex similarity index 100% rename from hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/hex/s130_nrf51_2.0.0_softdevice.hex rename to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/softdevice/s130/hex/s130_nrf51_2.0.0_softdevice.hex From a81b8b13dd836770e6998ea7b472295e2c3ec384 Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Thu, 21 Jul 2016 00:10:52 +0100 Subject: [PATCH 66/67] Set correct compiler support for NRF51 and NRF52 based targets. --- hal/targets.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hal/targets.json b/hal/targets.json index 77ef67c47b..f2e68e07e6 100644 --- a/hal/targets.json +++ b/hal/targets.json @@ -1359,7 +1359,7 @@ "extra_labels": ["NORDIC", "MCU_NRF51", "MCU_NRF51822_UNIFIED", "NRF5"], "OUTPUT_EXT": "hex", "is_disk_virtual": true, - "supported_toolchains": ["ARM", "GCC_ARM"], + "supported_toolchains": ["ARM", "GCC_ARM", "IAR"], "public": false, "MERGE_SOFT_DEVICE": true, "EXPECTED_SOFTDEVICES_WITH_OFFSETS": [ @@ -1403,7 +1403,7 @@ "extra_labels": ["NORDIC", "MCU_NRF52", "MCU_NRF52832", "NRF5"], "OUTPUT_EXT": "hex", "is_disk_virtual": true, - "supported_toolchains": ["GCC_ARM"], + "supported_toolchains": ["GCC_ARM", "ARM", "IAR"], "public": false, "detect_code": ["1101"], "program_cycle_s": 6, From 478a7fd4cd38126ea0e814aa3842255b022063d4 Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Thu, 21 Jul 2016 13:39:53 +0100 Subject: [PATCH 67/67] Remove files from unused targets. --- .../TARGET_ARCH_BLE/PinNames.h | 200 ---------------- .../TARGET_ARCH_BLE/device.h | 38 --- .../TARGET_DELTA_DFCM_NNN40/PinNames.h | 153 ------------ .../TARGET_DELTA_DFCM_NNN40/device.h | 38 --- .../TARGET_DELTA_DFCM_NNN40/mbed_overrides.c | 128 ---------- .../TARGET_DELTA_DFCM_NNN40/rtc_api.c | 71 ------ .../TARGET_HRM1017/PinNames.h | 176 -------------- .../TARGET_HRM1017/device.h | 38 --- .../TARGET_NRF51822_MKIT/PinNames.h | 176 -------------- .../TARGET_NRF51822_MKIT/device.h | 38 --- .../TARGET_NRF51822_SBKIT/PinNames.h | 129 ---------- .../TARGET_NRF51822_SBKIT/device.h | 57 ----- .../TARGET_NRF51822_Y5_MBUG/PinNames.h | 173 -------------- .../TARGET_NRF51822_Y5_MBUG/device.h | 38 --- .../TARGET_NRF51_DONGLE/PinNames.h | 168 ------------- .../TARGET_NRF51_DONGLE/device.h | 38 --- .../TARGET_NRF51_MICROBIT/PinNames.h | 221 ------------------ .../TARGET_NRF51_MICROBIT/device.h | 38 --- .../TARGET_RBLAB_BLENANO/PinNames.h | 197 ---------------- .../TARGET_RBLAB_BLENANO/device.h | 38 --- .../TARGET_RBLAB_NRF51822/PinNames.h | 216 ----------------- .../TARGET_RBLAB_NRF51822/device.h | 38 --- .../TARGET_SEEED_TINY_BLE/PinNames.h | 166 ------------- .../TARGET_SEEED_TINY_BLE/device.h | 38 --- .../TARGET_TY51822R3/PinNames.h | 201 ---------------- .../TARGET_TY51822R3/device.h | 38 --- .../TARGET_WALLBOT_BLE/PinNames.h | 203 ---------------- .../TARGET_WALLBOT_BLE/device.h | 38 --- 28 files changed, 3091 deletions(-) delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_ARCH_BLE/PinNames.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_ARCH_BLE/device.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/PinNames.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/device.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/mbed_overrides.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/rtc_api.c delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_HRM1017/PinNames.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_HRM1017/device.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_MKIT/PinNames.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_MKIT/device.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_SBKIT/PinNames.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_SBKIT/device.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_Y5_MBUG/PinNames.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_Y5_MBUG/device.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_DONGLE/PinNames.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_DONGLE/device.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_MICROBIT/PinNames.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_MICROBIT/device.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_BLENANO/PinNames.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_BLENANO/device.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_NRF51822/PinNames.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_NRF51822/device.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_SEEED_TINY_BLE/PinNames.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_SEEED_TINY_BLE/device.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_TY51822R3/PinNames.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_TY51822R3/device.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_WALLBOT_BLE/PinNames.h delete mode 100644 hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_WALLBOT_BLE/device.h diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_ARCH_BLE/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_ARCH_BLE/PinNames.h deleted file mode 100644 index ecfb7d18e4..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_ARCH_BLE/PinNames.h +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright (c) 2013 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 or object form under this license must not be reverse - * engineered, decompiled, modified and/or disassembled. - * - * 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 MBED_PINNAMES_H -#define MBED_PINNAMES_H - -#include "cmsis.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - PIN_INPUT, - PIN_OUTPUT -} PinDirection; - -#define PORT_SHIFT 3 - -typedef enum { - p0 = 0, - p1 = 1, - p2 = 2, - p3 = 3, - p4 = 4, - p5 = 5, - p6 = 6, - p7 = 7, - p8 = 8, - p9 = 9, - p10 = 10, - p11 = 11, - p12 = 12, - p13 = 13, - p14 = 14, - p15 = 15, - p16 = 16, - p17 = 17, - p18 = 18, - p19 = 19, - p20 = 20, - p21 = 21, - p22 = 22, - p23 = 23, - p24 = 24, - p25 = 25, - p26 = 26, - p27 = 27, - p28 = 28, - p29 = 29, - p30 = 30, -// p31=31, - - P0_0 = p0, - P0_1 = p1, - P0_2 = p2, - P0_3 = p3, - P0_4 = p4, - P0_5 = p5, - P0_6 = p6, - P0_7 = p7, - - P0_8 = p8, - P0_9 = p9, - P0_10 = p10, - P0_11 = p11, - P0_12 = p12, - P0_13 = p13, - P0_14 = p14, - P0_15 = p15, - - P0_16 = p16, - P0_17 = p17, - P0_18 = p18, - P0_19 = p19, - P0_20 = p20, - P0_21 = p21, - P0_22 = p22, - P0_23 = p23, - - P0_24 = p24, - P0_25 = p25, - P0_26 = p26, - P0_27 = p27, - P0_28 = p28, - P0_29 = p29, - P0_30 = p30, - - LED1 = p30, - LED2 = p14, - LED3 = p15, - LED4 = p16, - - RX_PIN_NUMBER = p7, - TX_PIN_NUMBER = p8, - CTS_PIN_NUMBER = p26, - RTS_PIN_NUMBER = p27, - - // mBed interface Pins - USBTX = TX_PIN_NUMBER, - USBRX = RX_PIN_NUMBER, - - SPI_PSELMOSI0 = p25, - SPI_PSELMISO0 = p28, - SPI_PSELSS0 = p24, - SPI_PSELSCK0 = p29, - - SPI_PSELMOSI1 = p12, - SPI_PSELMISO1 = p13, - SPI_PSELSS1 = p14, - SPI_PSELSCK1 = p15, - - SPIS_PSELMOSI = p12, - SPIS_PSELMISO = p13, - SPIS_PSELSS = p14, - SPIS_PSELSCK = p15, - - I2C_SDA0 = p5, - I2C_SCL0 = p6, - - I2C_SDA1 = p13, - I2C_SCL1 = p15, - - D0 = p7, - D1 = p8, - D2 = p9, - D3 = p10, - D4 = p11, - D5 = p12, - D6 = p13, - D7 = p17, - - D8 = p18, - D9 = p23, - D10 = p24, - D11 = p25, - D12 = p28, - D13 = p29, - - D14 = p5, - D15 = p6, - - A0 = p1, - A1 = p2, - A2 = p3, - A3 = p4, - A4 = p5, - A5 = p6, - - // Not connected - NC = (int)0xFFFFFFFF -} PinName; - -typedef enum { - PullNone = 0, - PullDown = 1, - PullUp = 3, - PullDefault = PullUp -} PinMode; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_ARCH_BLE/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_ARCH_BLE/device.h deleted file mode 100644 index 2427e752ea..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_ARCH_BLE/device.h +++ /dev/null @@ -1,38 +0,0 @@ -// The 'features' section in 'target.json' is now used to create the device's hardware preprocessor switches. -// Check the 'features' section of the target description in 'targets.json' for more details. -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef MBED_DEVICE_H -#define MBED_DEVICE_H - - - - - - - - - - - - - - - - -#include "objects.h" - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/PinNames.h deleted file mode 100644 index fa6d01e4bd..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/PinNames.h +++ /dev/null @@ -1,153 +0,0 @@ -/* - * 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: - * - * 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 or object form under this license must not be reverse - * engineered, decompiled, modified and/or disassembled. - * - * 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 MBED_PINNAMES_H -#define MBED_PINNAMES_H - -#include "cmsis.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - PIN_INPUT, - PIN_OUTPUT -} PinDirection; - -#define PORT_SHIFT 3 - -typedef enum { - NC = (int)0xFFFFFFFF, - p0 = 0, - p1 = 1, - p2 = 2, - p3 = 3, - p4 = 4, - p5 = 5, - p6 = 6, - p7 = 7, - p8 = 8, - p9 = 9, - p10 = 10, - p11 = 11, - p12 = 12, - p13 = 13, - p14 = 14, - p15 = 15, - p16 = 16, - p17 = 17, - p18 = 18, - p19 = 19, - p20 = 20, - p21 = 21, - p22 = 22, - p23 = 23, - p24 = 24, - p25 = 25, - p26 = 26, - p27 = 27, - p28 = 28, - p29 = 29, - p30 = 30, - p31 = 31, - - LED1 = p4, - LED2 = p5, - LED3 = p6, - LED4 = p13, - - BUTTON0 = p16, - BUTTON1 = p17, - - RX_PIN_NUMBER = p23, - TX_PIN_NUMBER = p25, - - // mBed interface Pins - USBTX = TX_PIN_NUMBER, - USBRX = RX_PIN_NUMBER, - - SPI_PSELMOSI0 = p24, - SPI_PSELMISO0 = p29, - SPI_PSELSS0 = p30, - SPI_PSELSCK0 = p21, - - SPIS_PSELMOSI = p24, - SPIS_PSELMISO = p29, - SPIS_PSELSS = p30, - SPIS_PSELSCK = p21, - - I2C_SDA0 = p22, - I2C_SCL0 = p20, - - A0 = p26, - A1 = p27, - A2 = p4, - A3 = p5, - A4 = p6, - - SWIO = p19, - VERF0 = p0, - - // SPI for controlling internal flash, don't use it. - FLASH_SPIMOSI = 15, - FLASH_SPIMISO = 9, - FLASH_SPICS = 28, - FLASH_SPICLK = 11, - // Not connected - CTS_PIN_NUMBER= NC, - RTS_PIN_NUMBER= NC, - SPI_PSELMOSI1 = NC, - SPI_PSELMISO1 = NC, - SPI_PSELSS1 = NC, - SPI_PSELSCK1 = NC, - A5 = NC -} PinName; - -typedef enum { - PullNone = 0, - PullDown = 1, - PullUp = 3, - PullDefault = PullUp -} PinMode; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/device.h deleted file mode 100644 index 3b470c6864..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/device.h +++ /dev/null @@ -1,38 +0,0 @@ -// The 'features' section in 'target.json' is now used to create the device's hardware preprocessor switches. -// Check the 'features' section of the target description in 'targets.json' for more details. -/* mbed Microcontroller Library - * Copyright (c) 2006-2015 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef MBED_DEVICE_H -#define MBED_DEVICE_H - - - - - - - - - - - - - - - - -#include "objects.h" - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/mbed_overrides.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/mbed_overrides.c deleted file mode 100644 index 70293f34fa..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/mbed_overrides.c +++ /dev/null @@ -1,128 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "cmsis.h" - -/* No init flash in this version, 2015/10/27 */ -#if 0 -#define SPIM1_SCK_PIN 11u /**< SPI clock GPIO pin number. */ -#define SPIM1_MOSI_PIN 15u /**< SPI Master Out Slave In GPIO pin number. */ -#define SPIM1_MISO_PIN 9u /**< SPI Master In Slave Out GPIO pin number. */ -#define SPIM1_SS_PIN 28u /**< SPI Slave Select GPIO pin number. */ - -#define CMD_POWER_UP (0xAB) -#define CMD_POWER_DOWN (0xB9) - -void flash_init(void) -{ - NRF_GPIO->PIN_CNF[SPIM1_MOSI_PIN] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos); - NRF_GPIO->PIN_CNF[SPIM1_MISO_PIN] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos); - NRF_GPIO->PIN_CNF[SPIM1_SCK_PIN] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos); - - NRF_GPIO->PIN_CNF[SPIM1_SS_PIN] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) - | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); - //cs = 1; - NRF_GPIO->OUTSET = (GPIO_OUTSET_PIN28_High << GPIO_OUTSET_PIN28_Pos); - - NRF_SPI1->ENABLE = 1; - NRF_SPI1->PSELSCK = SPIM1_SCK_PIN; - NRF_SPI1->PSELMOSI = SPIM1_MISO_PIN; - NRF_SPI1->PSELMISO = SPIM1_MOSI_PIN; - //spi.frequency(1000000); - NRF_SPI1->FREQUENCY = 0x10000000; //1MHz - - //spi.format(8,0); - uint32_t config_mode = 0; - config_mode = (SPI_CONFIG_CPHA_Leading << SPI_CONFIG_CPHA_Pos) | (SPI_CONFIG_CPOL_ActiveHigh << SPI_CONFIG_CPOL_Pos); //mode 0 - NRF_SPI1->CONFIG = (config_mode | (SPI_CONFIG_ORDER_MsbFirst << SPI_CONFIG_ORDER_Pos)); - //cs = 0; - NRF_GPIO->OUTCLR = (GPIO_OUTCLR_PIN28_Clear << GPIO_OUTCLR_PIN28_Pos); - //spi.write(CMD_POWER_UP); - while (!NRF_SPI1->EVENTS_READY == 0) { - } - NRF_SPI1->TXD = (uint32_t)CMD_POWER_UP; - while (!NRF_SPI1->EVENTS_READY == 1) { - } - NRF_SPI1->EVENTS_READY = 0; - NRF_SPI1->RXD; - //wait_ms(30); - // Deselect the device - //cs = 1; - NRF_GPIO->OUTSET = (GPIO_OUTSET_PIN28_High << GPIO_OUTSET_PIN28_Pos); - -} - -void flash_powerDown(void) -{ - NRF_GPIO->OUTCLR = (GPIO_OUTCLR_PIN28_Clear << GPIO_OUTCLR_PIN28_Pos); - //spi.write(CMD_POWER_DOWN); - while (!NRF_SPI1->EVENTS_READY == 0) { - } - NRF_SPI1->TXD = (uint32_t)CMD_POWER_DOWN; - while (!NRF_SPI1->EVENTS_READY == 1) { - } - NRF_SPI1->EVENTS_READY = 0; - NRF_SPI1->RXD; - NRF_GPIO->OUTSET = (GPIO_OUTSET_PIN28_High << GPIO_OUTSET_PIN28_Pos); - - //wait for sleep - //wait_us(3); -} -/* No init flash in this version, 2015/10/27 */ -#endif - -void mbed_sdk_init() -{ - // Default SWIO setting, pull SWIO(p19) to low for turning antenna switch to BLE radiated path - NRF_GPIO->PIN_CNF[19] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) - | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) - | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) - | (GPIO_PIN_CNF_INPUT_Disconnect << GPIO_PIN_CNF_INPUT_Pos) - | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); - - NRF_GPIO->OUTCLR = (GPIO_OUTCLR_PIN19_Clear << GPIO_OUTCLR_PIN19_Pos); - - // Config External Crystal to 32MHz - NRF_CLOCK->XTALFREQ = 0x00; - NRF_CLOCK->EVENTS_HFCLKSTARTED = 0; - NRF_CLOCK->TASKS_HFCLKSTART = 1; - while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0) - {// Do nothing. - } - -/* No init flash in this version, 2015/10/27 */ -// flash_init(); -// -// //nrf_delay_ms(10); -// flash_powerDown(); -/* No init flash in this version, 2015/10/27 */ - -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/rtc_api.c b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/rtc_api.c deleted file mode 100644 index 527d308058..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_DELTA_DFCM_NNN40/rtc_api.c +++ /dev/null @@ -1,71 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "rtc_api.h" - - -#define LFCLK_FREQUENCY (32768UL) -#define RTC0_COUNTER_PRESCALER ((LFCLK_FREQUENCY/8) - 1) -#define COMPARE_COUNTERTIME (691200UL) //86400 x 8 - - -time_t initTime; - -void rtc_init(void) { - - NVIC_EnableIRQ(RTC0_IRQn); // Enable Interrupt for the RTC in the core. - //NRF_RTC0->TASKS_STOP =1; - NRF_RTC0->PRESCALER = RTC0_COUNTER_PRESCALER; // Set prescaler to a TICK of RTC_FREQUENCY. - NRF_RTC0->CC[0] = COMPARE_COUNTERTIME; // Compare0 after approx COMPARE_COUNTERTIME seconds. - - // Enable COMPARE0 event and COMPARE0 interrupt: - NRF_RTC0->EVTENSET = RTC_EVTENSET_COMPARE0_Msk; - NRF_RTC0->INTENSET = RTC_INTENSET_COMPARE0_Msk; - NRF_RTC0->TASKS_START = 1; -} - -void rtc_free(void) { - // [TODO] -} - -/* - * Little check routine to see if the RTC has been enabled - * - * Clock Control Register - * RTC_CCR[0] : 0 = Disabled, 1 = Enabled - * - */ -int rtc_isenabled(void) { - // [TODO] return(((NRF_RTC0->TASKS_START) & 0x01) != 0); -} - -time_t rtc_read(void) { - - time_t t = initTime; - t += (86400*NRF_RTC0->EVENTS_COMPARE[0]); - t += (int)((NRF_RTC0->COUNTER)/8); - return(t); -} - -void rtc_write(time_t t) { - // Convert the time in to a tm - - // Pause clock, and clear counter register (clears us count) - NRF_RTC0->TASKS_STOP = 1; - - initTime = t; - // Restart clock - NRF_RTC0->TASKS_START = 1; -} diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_HRM1017/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_HRM1017/PinNames.h deleted file mode 100644 index 5f3c6291d5..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_HRM1017/PinNames.h +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright (c) 2013 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 or object form under this license must not be reverse - * engineered, decompiled, modified and/or disassembled. - * - * 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 MBED_PINNAMES_H -#define MBED_PINNAMES_H - -#include "cmsis.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - PIN_INPUT, - PIN_OUTPUT -} PinDirection; - -#define PORT_SHIFT 3 - -typedef enum { - p0 = 0, - p1 = 1, - p2 = 2, - p3 = 3, - p4 = 4, - p5 = 5, - p6 = 6, - p7 = 7, - p8 = 8, - p9 = 9, - p10 = 10, - p11 = 11, - p12 = 12, - p13 = 13, - p14 = 14, - p15 = 15, - p16 = 16, - p17 = 17, - p18 = 18, - p19 = 19, - p20 = 20, - p21 = 21, - p22 = 22, - p23 = 23, - p24 = 24, - p25 = 25, - p26 = 26, - p27 = 27, - p28 = 28, - p29 = 29, - p30 = 30, -// p31=31, - - P0_0 = p0, - P0_1 = p1, - P0_2 = p2, - P0_3 = p3, - P0_4 = p4, - P0_5 = p5, - P0_6 = p6, - P0_7 = p7, - - P0_8 = p8, - P0_9 = p9, - P0_10 = p10, - P0_11 = p11, - P0_12 = p12, - P0_13 = p13, - P0_14 = p14, - P0_15 = p15, - - P0_16 = p16, - P0_17 = p17, - P0_18 = p18, - P0_19 = p19, - P0_20 = p20, - P0_21 = p21, - P0_22 = p22, - P0_23 = p23, - - P0_24 = p24, - P0_25 = p25, - P0_26 = p26, - P0_27 = p27, - P0_28 = p28, - P0_29 = p29, - P0_30 = p30, - - LED1 = p18, - LED2 = p19, - LED3 = p18, - LED4 = p19, - - BUTTON1 = p16, - BUTTON2 = p17, - - RX_PIN_NUMBER = p11, - TX_PIN_NUMBER = p9, - CTS_PIN_NUMBER = p10, - RTS_PIN_NUMBER = p8, - - // mBed interface Pins - USBTX = TX_PIN_NUMBER, - USBRX = RX_PIN_NUMBER, - - SPI_PSELMOSI0 = p20, - SPI_PSELMISO0 = p22, - SPI_PSELSS0 = p24, - SPI_PSELSCK0 = p25, - - SPI_PSELMOSI1 = p12, - SPI_PSELMISO1 = p13, - SPI_PSELSS1 = p14, - SPI_PSELSCK1 = p15, - - SPIS_PSELMOSI = p12, - SPIS_PSELMISO = p13, - SPIS_PSELSS = p14, - SPIS_PSELSCK = p15, - - I2C_SDA0 = p22, - I2C_SCL0 = p20, - - I2C_SDA1 = p13, - I2C_SCL1 = p15, - // Not connected - NC = (int)0xFFFFFFFF -} PinName; - -typedef enum { - PullNone = 0, - PullDown = 1, - PullUp = 3, - PullDefault = PullUp -} PinMode; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_HRM1017/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_HRM1017/device.h deleted file mode 100644 index 2427e752ea..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_HRM1017/device.h +++ /dev/null @@ -1,38 +0,0 @@ -// The 'features' section in 'target.json' is now used to create the device's hardware preprocessor switches. -// Check the 'features' section of the target description in 'targets.json' for more details. -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef MBED_DEVICE_H -#define MBED_DEVICE_H - - - - - - - - - - - - - - - - -#include "objects.h" - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_MKIT/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_MKIT/PinNames.h deleted file mode 100644 index 5f3c6291d5..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_MKIT/PinNames.h +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright (c) 2013 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 or object form under this license must not be reverse - * engineered, decompiled, modified and/or disassembled. - * - * 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 MBED_PINNAMES_H -#define MBED_PINNAMES_H - -#include "cmsis.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - PIN_INPUT, - PIN_OUTPUT -} PinDirection; - -#define PORT_SHIFT 3 - -typedef enum { - p0 = 0, - p1 = 1, - p2 = 2, - p3 = 3, - p4 = 4, - p5 = 5, - p6 = 6, - p7 = 7, - p8 = 8, - p9 = 9, - p10 = 10, - p11 = 11, - p12 = 12, - p13 = 13, - p14 = 14, - p15 = 15, - p16 = 16, - p17 = 17, - p18 = 18, - p19 = 19, - p20 = 20, - p21 = 21, - p22 = 22, - p23 = 23, - p24 = 24, - p25 = 25, - p26 = 26, - p27 = 27, - p28 = 28, - p29 = 29, - p30 = 30, -// p31=31, - - P0_0 = p0, - P0_1 = p1, - P0_2 = p2, - P0_3 = p3, - P0_4 = p4, - P0_5 = p5, - P0_6 = p6, - P0_7 = p7, - - P0_8 = p8, - P0_9 = p9, - P0_10 = p10, - P0_11 = p11, - P0_12 = p12, - P0_13 = p13, - P0_14 = p14, - P0_15 = p15, - - P0_16 = p16, - P0_17 = p17, - P0_18 = p18, - P0_19 = p19, - P0_20 = p20, - P0_21 = p21, - P0_22 = p22, - P0_23 = p23, - - P0_24 = p24, - P0_25 = p25, - P0_26 = p26, - P0_27 = p27, - P0_28 = p28, - P0_29 = p29, - P0_30 = p30, - - LED1 = p18, - LED2 = p19, - LED3 = p18, - LED4 = p19, - - BUTTON1 = p16, - BUTTON2 = p17, - - RX_PIN_NUMBER = p11, - TX_PIN_NUMBER = p9, - CTS_PIN_NUMBER = p10, - RTS_PIN_NUMBER = p8, - - // mBed interface Pins - USBTX = TX_PIN_NUMBER, - USBRX = RX_PIN_NUMBER, - - SPI_PSELMOSI0 = p20, - SPI_PSELMISO0 = p22, - SPI_PSELSS0 = p24, - SPI_PSELSCK0 = p25, - - SPI_PSELMOSI1 = p12, - SPI_PSELMISO1 = p13, - SPI_PSELSS1 = p14, - SPI_PSELSCK1 = p15, - - SPIS_PSELMOSI = p12, - SPIS_PSELMISO = p13, - SPIS_PSELSS = p14, - SPIS_PSELSCK = p15, - - I2C_SDA0 = p22, - I2C_SCL0 = p20, - - I2C_SDA1 = p13, - I2C_SCL1 = p15, - // Not connected - NC = (int)0xFFFFFFFF -} PinName; - -typedef enum { - PullNone = 0, - PullDown = 1, - PullUp = 3, - PullDefault = PullUp -} PinMode; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_MKIT/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_MKIT/device.h deleted file mode 100644 index 17cccb19bf..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_MKIT/device.h +++ /dev/null @@ -1,38 +0,0 @@ -// The 'provides' section in 'target.json' is now used to create the device's hardware preprocessor switches. -// Check the 'provides' section of the target description in 'targets.json' for more details. -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef MBED_DEVICE_H -#define MBED_DEVICE_H - - - - - - - - - - - - - - - - -#include "objects.h" - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_SBKIT/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_SBKIT/PinNames.h deleted file mode 100644 index e5f343bcf2..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_SBKIT/PinNames.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2013 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 or object form under this license must not be reverse - * engineered, decompiled, modified and/or disassembled. - * - * 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 MBED_PINNAMES_H -#define MBED_PINNAMES_H - -#include "cmsis.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - PIN_INPUT, - PIN_OUTPUT -} PinDirection; - -#define PORT_SHIFT 3 - -typedef enum { - p0 = 0, - p1 = 1, - p2 = 2, - p3 = 3, - p5 = 5, - p8 = 8, - p9 = 9, - p11 = 11, - p12 = 12, - p15 = 15, - p16 = 16, - p18 = 18, - p20 = 20, - p21 = 21, - p24 = 24, - - P0_0 = p0, - P0_1 = p1, - P0_2 = p2, - P0_3 = p3, - P0_5 = p5, - - P0_8 = p8, - P0_9 = p9, - P0_11 = p11, - P0_12 = p12, - P0_15 = p15, - - P0_16 = p16, - P0_18 = p18, - P0_20 = p20, - P0_21 = p21, - - P0_24 = p24, - - LED1 = p16, - LED2 = p12, - LED3 = p15, - LEDR = LED1, - LEDG = LED2, - LEDB = LED3, - - BUTTON1 = p8, - BUTTON2 = p18, - - RX_PIN_NUMBER = p21, - TX_PIN_NUMBER = p24, - CTS_PIN_NUMBER = p0, - RTS_PIN_NUMBER = p20, - - SPI_PSELMOSI0 = p2, - SPI_PSELMISO0 = p5, - SPI_PSELSS0 = p1, - SPI_PSELSCK0 = p3, - - I2C_SDA0 = p9, - I2C_SCL0 = p11, - - // Not connected - NC = (int)0xFFFFFFFF -} PinName; - -typedef enum { - PullNone = 0, - PullDown = 1, - PullUp = 3, - PullDefault = PullUp -} PinMode; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_SBKIT/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_SBKIT/device.h deleted file mode 100644 index 9d5a5e2109..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_SBKIT/device.h +++ /dev/null @@ -1,57 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef MBED_DEVICE_H -#define MBED_DEVICE_H - -#define DEVICE_PORTIN 1 -#define DEVICE_PORTOUT 1 -#define DEVICE_PORTINOUT 1 - -#define DEVICE_INTERRUPTIN 1 - -#define DEVICE_ANALOGIN 1 -#define DEVICE_ANALOGOUT 0 - -#define DEVICE_SERIAL 1 - -#define DEVICE_I2C 1 -#define DEVICE_I2CSLAVE 0 - -#define DEVICE_SPI 1 -#define DEVICE_SPISLAVE 1 - -#define DEVICE_CAN 0 - -#define DEVICE_RTC 0 - -#define DEVICE_ETHERNET 0 - -#define DEVICE_PWMOUT 1 - -#define DEVICE_SEMIHOST 0 -#define DEVICE_LOCALFILESYSTEM 0 - -#define DEVICE_SLEEP 1 - -#define DEVICE_DEBUG_AWARENESS 0 - -#define DEVICE_STDIO_MESSAGES 0 - -#define DEVICE_ERROR_PATTERN 1 - -#include "objects.h" - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_Y5_MBUG/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_Y5_MBUG/PinNames.h deleted file mode 100644 index f92973cc88..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_Y5_MBUG/PinNames.h +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (c) 2013 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 or object form under this license must not be reverse - * engineered, decompiled, modified and/or disassembled. - * - * 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 MBED_PINNAMES_H -#define MBED_PINNAMES_H - -#include "cmsis.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - PIN_INPUT, - PIN_OUTPUT -} PinDirection; - -#define PORT_SHIFT 3 - -typedef enum { - p0 = 0, - p1 = 1, - p2 = 2, - p3 = 3, - p4 = 4, - p5 = 5, - p6 = 6, - p7 = 7, - p8 = 8, - p9 = 9, - p10 = 10, - p11 = 11, - p12 = 12, - p13 = 13, - p14 = 14, - p15 = 15, - p16 = 16, - p17 = 17, - p18 = 18, - p19 = 19, - p20 = 20, - p21 = 21, - p22 = 22, - p23 = 23, - p24 = 24, - p25 = 25, - p26 = 26, - p27 = 27, - p28 = 28, - p29 = 29, - p30 = 30, - p31 = 31, - p32 = 32, - p33 = 33, - p34 = 34, - p35 = 35, -// p31=31, - - // Not connected - NC = (int)0xFFFFFFFF, - - - P0_0 = p0, - P0_1 = p1, - P0_2 = p2, - P0_3 = p3, - P0_4 = p4, - P0_5 = p5, - P0_6 = p6, - P0_7 = p7, - - P0_8 = p8, - P0_9 = p9, - P0_10 = p10, - P0_11 = p11, - P0_12 = p12, - P0_13 = p13, - P0_14 = p14, - P0_15 = p15, - - P0_16 = p16, - P0_17 = p17, - P0_18 = p18, - P0_19 = p19, - P0_20 = p20, - P0_21 = p21, - P0_22 = p22, - P0_23 = p23, - - P0_24 = p24, - P0_25 = p25, - P0_26 = p26, - P0_27 = p27, - P0_28 = p28, - P0_29 = p29, - P0_30 = p30, - - LED = p30, - LED1 = p30, - LED2 = p0, - LED3 = p8, - LED4 = NC, - - BUTTON1 = p29, - BUTTON2 = p17, - - - RX_PIN_NUMBER = p2, - TX_PIN_NUMBER = p3, - CTS_PIN_NUMBER = p11, - RTS_PIN_NUMBER = p21, - - // mBed interface Pins - USBTX = TX_PIN_NUMBER, - USBRX = RX_PIN_NUMBER, - - SPIS_PSELMOSI = p12, - SPIS_PSELMISO = p6, - SPIS_PSELSCK = p9, - - I2C_SDA0 = p17, - I2C_SCL0 = p18, - - -} PinName; - -typedef enum { - PullNone = 0, - PullDown = 1, - PullUp = 3, - PullDefault = PullUp -} PinMode; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_Y5_MBUG/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_Y5_MBUG/device.h deleted file mode 100644 index 2427e752ea..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51822_Y5_MBUG/device.h +++ /dev/null @@ -1,38 +0,0 @@ -// The 'features' section in 'target.json' is now used to create the device's hardware preprocessor switches. -// Check the 'features' section of the target description in 'targets.json' for more details. -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef MBED_DEVICE_H -#define MBED_DEVICE_H - - - - - - - - - - - - - - - - -#include "objects.h" - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_DONGLE/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_DONGLE/PinNames.h deleted file mode 100644 index baccb586ff..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_DONGLE/PinNames.h +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright (c) 2013 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 or object form under this license must not be reverse - * engineered, decompiled, modified and/or disassembled. - * - * 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 MBED_PINNAMES_H -#define MBED_PINNAMES_H - -#include "cmsis.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - PIN_INPUT, - PIN_OUTPUT -} PinDirection; - -#define PORT_SHIFT 3 - -typedef enum { - p0 = 0, - p1 = 1, - p2 = 2, - p3 = 3, - p4 = 4, - p5 = 5, - p6 = 6, - p7 = 7, - p8 = 8, - p9 = 9, - p10 = 10, - p11 = 11, - p12 = 12, - p13 = 13, - p14 = 14, - p15 = 15, - p16 = 16, - p17 = 17, - p18 = 18, - p19 = 19, - p20 = 20, - p21 = 21, - p22 = 22, - p23 = 23, - p24 = 24, - p25 = 25, - p28 = 28, - p29 = 29, - p30 = 30, - - P0_0 = p0, - P0_1 = p1, - P0_2 = p2, - P0_3 = p3, - P0_4 = p4, - P0_5 = p5, - P0_6 = p6, - P0_7 = p7, - - P0_8 = p8, - P0_9 = p9, - P0_10 = p10, - P0_11 = p11, - P0_12 = p12, - P0_13 = p13, - P0_14 = p14, - P0_15 = p15, - - P0_16 = p16, - P0_17 = p17, - P0_18 = p18, - P0_19 = p19, - P0_20 = p20, - P0_21 = p21, - P0_22 = p22, - P0_23 = p23, - - P0_24 = p24, - P0_25 = p25, - P0_28 = p28, - P0_29 = p29, - - LED1 = p21, - LED2 = p22, - LED3 = p23, - LED4 = p23, - LEDR = LED1, - LEDG = LED2, - LEDB = LED3, - - RX_PIN_NUMBER = p11, - TX_PIN_NUMBER = p9, - CTS_PIN_NUMBER = p10, - RTS_PIN_NUMBER = p8, - - // mBed interface Pins - USBTX = TX_PIN_NUMBER, - USBRX = RX_PIN_NUMBER, - - SPI_PSELMOSI0 = p15, - SPI_PSELMISO0 = p16, - SPI_PSELSS0 = p17, - SPI_PSELSCK0 = p18, - - SPI_PSELMOSI1 = p15, - SPI_PSELMISO1 = p16, - SPI_PSELSS1 = p17, - SPI_PSELSCK1 = p18, - - SPIS_PSELMOSI = p15, - SPIS_PSELMISO = p16, - SPIS_PSELSS = p17, - SPIS_PSELSCK = p18, - - I2C_SDA0 = p19, - I2C_SCL0 = p20, - - // Not connected - NC = (int)0xFFFFFFFF -} PinName; - -typedef enum { - PullNone = 0, - PullDown = 1, - PullUp = 3, - PullDefault = PullUp -} PinMode; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_DONGLE/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_DONGLE/device.h deleted file mode 100644 index 2427e752ea..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_DONGLE/device.h +++ /dev/null @@ -1,38 +0,0 @@ -// The 'features' section in 'target.json' is now used to create the device's hardware preprocessor switches. -// Check the 'features' section of the target description in 'targets.json' for more details. -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef MBED_DEVICE_H -#define MBED_DEVICE_H - - - - - - - - - - - - - - - - -#include "objects.h" - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_MICROBIT/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_MICROBIT/PinNames.h deleted file mode 100644 index c0de7085d7..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_MICROBIT/PinNames.h +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright (c) 2013 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 or object form under this license must not be reverse - * engineered, decompiled, modified and/or disassembled. - * - * 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 MBED_PINNAMES_H -#define MBED_PINNAMES_H - -#include "cmsis.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - PIN_INPUT, - PIN_OUTPUT -} PinDirection; - -#define PORT_SHIFT 3 - -typedef enum { - p0 = 0, - p1 = 1, - p2 = 2, - p3 = 3, - p4 = 4, - p5 = 5, - p6 = 6, - p7 = 7, - p8 = 8, - p9 = 9, - p10 = 10, - p11 = 11, - p12 = 12, - p13 = 13, - p14 = 14, - p15 = 15, - p16 = 16, - p17 = 17, - p18 = 18, - p19 = 19, - p20 = 20, - p21 = 21, - p22 = 22, - p23 = 23, - p24 = 24, - p25 = 25, - p26 = 26, - p27 = 27, - p28 = 28, - p29 = 29, - p30 = 30, - - //NORMAL PINS... - P0_0 = p0, - P0_1 = p1, - P0_2 = p2, - P0_3 = p3, - P0_4 = p4, - P0_5 = p5, - P0_6 = p6, - P0_7 = p7, - - P0_8 = p8, - P0_9 = p9, - P0_10 = p10, - P0_11 = p11, - P0_12 = p12, - P0_13 = p13, - P0_14 = p14, - P0_15 = p15, - - P0_16 = p16, - P0_17 = p17, - P0_18 = p18, - P0_19 = p19, - P0_20 = p20, - P0_21 = p21, - P0_22 = p22, - P0_23 = p23, - - P0_24 = p24, - P0_25 = p25, - P0_26 = p26, - P0_27 = p27, - P0_28 = p28, - P0_29 = p29, - P0_30 = p30, - - //PADS - PAD3 = p1, - PAD2 = p2, - PAD1 = p3, - - - //LED MATRIX COLS - COL1 = p4, - COL2 = p5, - COL3 = p6, - COL4 = p7, - COL5 = p8, - COL6 = p9, - COL7 = p10, - COL8 = p11, - COL9 = p12, - - //LED MATRIX ROWS - ROW1 = p13, - ROW2 = p14, - ROW3 = p15, - - //NORMAL PIN (NO SPECIFIED FUNCTIONALITY) - //PIN_16 - - // BUTTON A - BUTTON_A = p17, - - - //NORMAL PIN (NO SPECIFIED FUNCTIONALITY) - //PIN_18 - - //TARGET RESET - TGT_NRESET = p19, - - //NORMAL PIN (NO SPECIFIED FUNCTIONALITY) - //PIN_20 - - //MASTER OUT SLAVE IN - MOSI = p21, - - //MASTER IN SLAVE OUT - MISO = p22, - - //SERIAL CLOCK - SCK = p23, - - // RX AND TX PINS - TGT_TX = p24, - TGT_RX = p25, - - //BUTTON B - BUTTON_B = p26, - - //ACCEL INTERRUPT PINS (MMA8653FC) - ACCEL_INT2 = p27, - ACCEL_INT1 = p28, - - //MAGENETOMETER INTERRUPT PIN (MAG3110) - MAG_INT1 = p29, - - // Not connected - NC = (int)0xFFFFFFFF, - - RX_PIN_NUMBER = TGT_RX, - TX_PIN_NUMBER = TGT_TX, - CTS_PIN_NUMBER = 31, //unused ** REQUIRES A PROPER FIX ** - RTS_PIN_NUMBER = 31, //unused - - // mBed interface Pins - USBTX = TX_PIN_NUMBER, - USBRX = RX_PIN_NUMBER, - - LED1 = PAD1, - LED2 = PAD2, - LED3 = PAD3, - LED4 = P0_16, - - //SDA (SERIAL DATA LINE) - I2C_SDA0 = p30, - - //SCL (SERIAL CLOCK LINE) - I2C_SCL0 = p0 - -} PinName; - -typedef enum { - PullNone = 0, - PullDown = 1, - PullUp = 3, - PullDefault = PullUp -} PinMode; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_MICROBIT/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_MICROBIT/device.h deleted file mode 100644 index 2427e752ea..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_NRF51_MICROBIT/device.h +++ /dev/null @@ -1,38 +0,0 @@ -// The 'features' section in 'target.json' is now used to create the device's hardware preprocessor switches. -// Check the 'features' section of the target description in 'targets.json' for more details. -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef MBED_DEVICE_H -#define MBED_DEVICE_H - - - - - - - - - - - - - - - - -#include "objects.h" - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_BLENANO/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_BLENANO/PinNames.h deleted file mode 100644 index ce18be448c..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_BLENANO/PinNames.h +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright (c) 2013 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 or object form under this license must not be reverse - * engineered, decompiled, modified and/or disassembled. - * - * 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 MBED_PINNAMES_H -#define MBED_PINNAMES_H - -#include "cmsis.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - PIN_INPUT, - PIN_OUTPUT -} PinDirection; - -#define PORT_SHIFT 3 - -typedef enum { - p0 = 0, - p1 = 1, - p2 = 2, - p3 = 3, - p4 = 4, - p5 = 5, - p6 = 6, - p7 = 7, - p8 = 8, - p9 = 9, - p10 = 10, - p11 = 11, - p12 = 12, - p13 = 13, - p14 = 14, - p15 = 15, - p16 = 16, - p17 = 17, - p18 = 18, - p19 = 19, - p20 = 20, - p21 = 21, - p22 = 22, - p23 = 23, - p24 = 24, - p25 = 25, - p26 = 26, - p27 = 27, - p28 = 28, - p29 = 29, - p30 = 30, -// p31=31, - - P0_0 = p0, - P0_1 = p1, - P0_2 = p2, - P0_3 = p3, - P0_4 = p4, - P0_5 = p5, - P0_6 = p6, - P0_7 = p7, - - P0_8 = p8, - P0_9 = p9, - P0_10 = p10, - P0_11 = p11, - P0_12 = p12, - P0_13 = p13, - P0_14 = p14, - P0_15 = p15, - - P0_16 = p16, - P0_17 = p17, - P0_18 = p18, - P0_19 = p19, - P0_20 = p20, - P0_21 = p21, - P0_22 = p22, - P0_23 = p23, - - P0_24 = p24, - P0_25 = p25, - P0_26 = p26, - P0_27 = p27, - P0_28 = p28, - P0_29 = p29, - P0_30 = p30, - - LED = p19, - LED1 = p19, - LED2 = p19, - LED3 = p19, - LED4 = p19, - - RX_PIN_NUMBER = p11, - TX_PIN_NUMBER = p9, - CTS_PIN_NUMBER = p10, - RTS_PIN_NUMBER = p8, - - // mBed interface Pins - USBTX = TX_PIN_NUMBER, - USBRX = RX_PIN_NUMBER, - - SPI_PSELMOSI0 = p9, - SPI_PSELMISO0 = p11, - SPI_PSELSS0 = p10, - SPI_PSELSCK0 = p8, - - SPI_PSELMOSI1 = p9, - SPI_PSELMISO1 = p11, - SPI_PSELSS1 = p10, - SPI_PSELSCK1 = p8, - - SPIS_PSELMOSI = p9, - SPIS_PSELMISO = p11, - SPIS_PSELSS = p10, - SPIS_PSELSCK = p8, - - I2C_SDA0 = p10, - I2C_SCL0 = p8, - - D0 = p11, - D1 = p9, - D2 = p10, - D3 = p8, - D4 = p28, - D5 = p29, - D6 = p15, - D7 = p7, - - D13 = p19, - - A0 = p1, - A1 = p2, - A2 = p3, - A3 = p4, - A4 = p5, - A5 = p6, - - D19 = A0, - D20 = A1, - D21 = A2, - D22 = A3, - D23 = A4, - D24 = A5, - - // Not connected - NC = (int)0xFFFFFFFF -} PinName; - -typedef enum { - PullNone = 0, - PullDown = 1, - PullUp = 3, - PullDefault = PullUp -} PinMode; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_BLENANO/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_BLENANO/device.h deleted file mode 100644 index 2427e752ea..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_BLENANO/device.h +++ /dev/null @@ -1,38 +0,0 @@ -// The 'features' section in 'target.json' is now used to create the device's hardware preprocessor switches. -// Check the 'features' section of the target description in 'targets.json' for more details. -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef MBED_DEVICE_H -#define MBED_DEVICE_H - - - - - - - - - - - - - - - - -#include "objects.h" - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_NRF51822/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_NRF51822/PinNames.h deleted file mode 100644 index f6c1ed99d3..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_NRF51822/PinNames.h +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright (c) 2013 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 or object form under this license must not be reverse - * engineered, decompiled, modified and/or disassembled. - * - * 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 MBED_PINNAMES_H -#define MBED_PINNAMES_H - -#include "cmsis.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - PIN_INPUT, - PIN_OUTPUT -} PinDirection; - -#define PORT_SHIFT 3 - -typedef enum { - p0 = 0, - p1 = 1, - p2 = 2, - p3 = 3, - p4 = 4, - p5 = 5, - p6 = 6, - p7 = 7, - p8 = 8, - p9 = 9, - p10 = 10, - p11 = 11, - p12 = 12, - p13 = 13, - p14 = 14, - p15 = 15, - p16 = 16, - p17 = 17, - p18 = 18, - p19 = 19, - p20 = 20, - p21 = 21, - p22 = 22, - p23 = 23, - p24 = 24, - p25 = 25, - p26 = 26, - p27 = 27, - p28 = 28, - p29 = 29, - p30 = 30, -// p31=31, - - P0_0 = p0, - P0_1 = p1, - P0_2 = p2, - P0_3 = p3, - P0_4 = p4, - P0_5 = p5, - P0_6 = p6, - P0_7 = p7, - - P0_8 = p8, - P0_9 = p9, - P0_10 = p10, - P0_11 = p11, - P0_12 = p12, - P0_13 = p13, - P0_14 = p14, - P0_15 = p15, - - P0_16 = p16, - P0_17 = p17, - P0_18 = p18, - P0_19 = p19, - P0_20 = p20, - P0_21 = p21, - P0_22 = p22, - P0_23 = p23, - - P0_24 = p24, - P0_25 = p25, - P0_26 = p26, - P0_27 = p27, - P0_28 = p28, - P0_29 = p29, - P0_30 = p30, - - LED1 = p15, - LED2 = p15, - LED3 = p15, - LED4 = p15, - - BUTTON1 = p16, - BUTTON2 = p17, - - RX_PIN_NUMBER = p11, - TX_PIN_NUMBER = p9, - CTS_PIN_NUMBER = p10, - RTS_PIN_NUMBER = p8, - - // mBed interface Pins - USBTX = TX_PIN_NUMBER, - USBRX = RX_PIN_NUMBER, - - SPI_PSELMOSI0 = p20, - SPI_PSELMISO0 = p22, - SPI_PSELSS0 = p14, - SPI_PSELSCK0 = p25, - - SPI_PSELMOSI1 = p20, - SPI_PSELMISO1 = p22, - SPI_PSELSS1 = p14, - SPI_PSELSCK1 = p25, - - SPIS_PSELMOSI = p20, - SPIS_PSELMISO = p22, - SPIS_PSELSS = p14, - SPIS_PSELSCK = p25, - - I2C_SDA0 = p29, - I2C_SCL0 = p28, - -/* - I2C_SDA1 = p13, - I2C_SCL1 = p15, -*/ - - D0 = p11, - D1 = p9, - D2 = p10, - D3 = p8, - D4 = p21, - D5 = p23, - D6 = p16, - D7 = p17, - - D8 = p19, - D9 = p18, - D10 = p14, - D11 = p12, - D12 = p13, - D13 = p15, - - D14 = p29, // I2C - SDA - D15 = p28, // I2C - SCL - - D16 = p25, // SPI - SCK - D17 = p22, // SPI - MISO - D18 = p20, // SPI - MOSI - - A0 = p1, - A1 = p2, - A2 = p3, - A3 = p4, - A4 = p5, - A5 = p6, - - D19 = A0, - D20 = A1, - D21 = A2, - D22 = A3, - D23 = A4, - D24 = A5, - - // Not connected - NC = (int)0xFFFFFFFF -} PinName; - -typedef enum { - PullNone = 0, - PullDown = 1, - PullUp = 3, - PullDefault = PullUp -} PinMode; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_NRF51822/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_NRF51822/device.h deleted file mode 100644 index 2427e752ea..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_RBLAB_NRF51822/device.h +++ /dev/null @@ -1,38 +0,0 @@ -// The 'features' section in 'target.json' is now used to create the device's hardware preprocessor switches. -// Check the 'features' section of the target description in 'targets.json' for more details. -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef MBED_DEVICE_H -#define MBED_DEVICE_H - - - - - - - - - - - - - - - - -#include "objects.h" - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_SEEED_TINY_BLE/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_SEEED_TINY_BLE/PinNames.h deleted file mode 100644 index bf45d0e742..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_SEEED_TINY_BLE/PinNames.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (c) 2013 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 or object form under this license must not be reverse - * engineered, decompiled, modified and/or disassembled. - * - * 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 MBED_PINNAMES_H -#define MBED_PINNAMES_H - -#include "cmsis.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - PIN_INPUT, - PIN_OUTPUT -} PinDirection; - -#define PORT_SHIFT 3 - -typedef enum { - p0 = 0, - p1 = 1, - p2 = 2, - p3 = 3, - p4 = 4, - p5 = 5, - p6 = 6, - p7 = 7, - p8 = 8, - p9 = 9, - p10 = 10, - p11 = 11, - p12 = 12, - p13 = 13, - p14 = 14, - p15 = 15, - p16 = 16, - p17 = 17, - p18 = 18, - p19 = 19, - p20 = 20, - p21 = 21, - p22 = 22, - p23 = 23, - p24 = 24, - p25 = 25, - p26 = 26, - p27 = 27, - p28 = 28, - p29 = 29, - p30 = 30, -// p31=31, - - P0_0 = p0, - P0_1 = p1, - P0_2 = p2, - P0_3 = p3, - P0_4 = p4, - P0_5 = p5, - P0_6 = p6, - P0_7 = p7, - - P0_8 = p8, - P0_9 = p9, - P0_10 = p10, - P0_11 = p11, - P0_12 = p12, - P0_13 = p13, - P0_14 = p14, - P0_15 = p15, - - P0_16 = p16, - P0_17 = p17, - P0_18 = p18, - P0_19 = p19, - P0_20 = p20, - P0_21 = p21, - P0_22 = p22, - P0_23 = p23, - - P0_24 = p24, - P0_25 = p25, - P0_26 = p26, - P0_27 = p27, - P0_28 = p28, - P0_29 = p29, - P0_30 = p30, - - LED1 = p21, - LED2 = p22, - LED3 = p23, - LED4 = p24, - - BUTTON1 = p17, - BUTTON = BUTTON1, - - RX_PIN_NUMBER = p11, - TX_PIN_NUMBER = p9, - CTS_PIN_NUMBER = p10, - RTS_PIN_NUMBER = p8, - - // mbed interface Pins - USBTX = TX_PIN_NUMBER, - USBRX = RX_PIN_NUMBER, - - I2C_SDA0 = p18, - I2C_SCL0 = p19, - - MPU6050_SDA_PIN = p18, - MPU6050_SCL_PIN = p19, - MPU6050_INT_PIN = p20, - - BATTERY_PIN = p1, - VCC_CTRL_PIN = p30, - - // Not connected - NC = (int)0xFFFFFFFF -} PinName; - -typedef enum { - PullNone = 0, - PullDown = 1, - PullUp = 3, - PullDefault = PullUp -} PinMode; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_SEEED_TINY_BLE/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_SEEED_TINY_BLE/device.h deleted file mode 100644 index 2427e752ea..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_SEEED_TINY_BLE/device.h +++ /dev/null @@ -1,38 +0,0 @@ -// The 'features' section in 'target.json' is now used to create the device's hardware preprocessor switches. -// Check the 'features' section of the target description in 'targets.json' for more details. -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef MBED_DEVICE_H -#define MBED_DEVICE_H - - - - - - - - - - - - - - - - -#include "objects.h" - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_TY51822R3/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_TY51822R3/PinNames.h deleted file mode 100644 index c0f40ec754..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_TY51822R3/PinNames.h +++ /dev/null @@ -1,201 +0,0 @@ -/* - * 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: - * - * 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 or object form under this license must not be reverse - * engineered, decompiled, modified and/or disassembled. - * - * 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 MBED_PINNAMES_H -#define MBED_PINNAMES_H - -#include "cmsis.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - PIN_INPUT, - PIN_OUTPUT -} PinDirection; - -#define PORT_SHIFT 3 - -typedef enum { - p0 = 0, - p1 = 1, - p2 = 2, - p3 = 3, - p4 = 4, - p5 = 5, - p6 = 6, - p7 = 7, - p8 = 8, - p9 = 9, - p10 = 10, - p11 = 11, - p12 = 12, - p13 = 13, - p14 = 14, - p15 = 15, - p16 = 16, - p17 = 17, - p18 = 18, - p19 = 19, - p20 = 20, - p21 = 21, - p22 = 22, - p23 = 23, - p24 = 24, - p25 = 25, - p26 = 26, - p27 = 27, - p28 = 28, - p29 = 29, - p30 = 30, - - P0_0 = p0, - P0_1 = p1, - P0_2 = p2, - P0_3 = p3, - P0_4 = p4, - P0_5 = p5, - P0_6 = p6, - P0_7 = p7, - - P0_8 = p8, - P0_9 = p9, - P0_10 = p10, - P0_11 = p11, - P0_12 = p12, - P0_13 = p13, - P0_14 = p14, - P0_15 = p15, - - P0_16 = p16, - P0_17 = p17, - P0_18 = p18, - P0_19 = p19, - P0_20 = p20, - P0_21 = p21, - P0_22 = p22, - P0_23 = p23, - - P0_24 = p24, - P0_25 = p25, - P0_26 = p26, - P0_27 = p27, - P0_28 = p28, - P0_29 = p29, - P0_30 = p30, - - LED1 = p21, - LED2 = p22, - LED3 = p23, - LED4 = p24, - - BUTTON1 = p17, - BUTTON2 = p18, - BUTTON3 = p19, - BUTTON4 = p20, - - RX_PIN_NUMBER = p11, - TX_PIN_NUMBER = p9, - CTS_PIN_NUMBER = p10, - RTS_PIN_NUMBER = p8, - - // mBed interface Pins - USBTX = TX_PIN_NUMBER, - USBRX = RX_PIN_NUMBER, - - SPI_PSELMOSI0 = p25, - SPI_PSELMISO0 = p28, - SPI_PSELSS0 = p24, - SPI_PSELSCK0 = p29, - - SPI_PSELMOSI1 = p13, - SPI_PSELMISO1 = p14, - SPI_PSELSS1 = p12, - SPI_PSELSCK1 = p15, - - SPIS_PSELMOSI = p13, - SPIS_PSELMISO = p14, - SPIS_PSELSS = p12, - SPIS_PSELSCK = p15, - - I2C_SDA0 = p30, - I2C_SCL0 = p7, - - D0 = p12, - D1 = p13, - D2 = p14, - D3 = p15, - D4 = p16, - D5 = p17, - D6 = p18, - D7 = p19, - - D8 = p20, - D9 = p23, - D10 = p24, - D11 = p25, - D12 = p28, - D13 = p29, - - D14 = p30, - D15 = p7, - - A0 = p1, - A1 = p2, - A2 = p3, - A3 = p4, - A4 = p5, - A5 = p6, - - // Not connected - NC = (int)0xFFFFFFFF -} PinName; - -typedef enum { - PullNone = 0, - PullDown = 1, - PullUp = 3, - PullDefault = PullUp -} PinMode; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_TY51822R3/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_TY51822R3/device.h deleted file mode 100644 index 3b470c6864..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_TY51822R3/device.h +++ /dev/null @@ -1,38 +0,0 @@ -// The 'features' section in 'target.json' is now used to create the device's hardware preprocessor switches. -// Check the 'features' section of the target description in 'targets.json' for more details. -/* mbed Microcontroller Library - * Copyright (c) 2006-2015 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef MBED_DEVICE_H -#define MBED_DEVICE_H - - - - - - - - - - - - - - - - -#include "objects.h" - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_WALLBOT_BLE/PinNames.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_WALLBOT_BLE/PinNames.h deleted file mode 100644 index f5f74ca786..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_WALLBOT_BLE/PinNames.h +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Copyright (c) 2013 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 or object form under this license must not be reverse - * engineered, decompiled, modified and/or disassembled. - * - * 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 MBED_PINNAMES_H -#define MBED_PINNAMES_H - -#include "cmsis.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - PIN_INPUT, - PIN_OUTPUT -} PinDirection; - -typedef enum { - p0 = 0, - p1 = 1, - p2 = 2, - p3 = 3, - p4 = 4, - p5 = 5, - p6 = 6, - p7 = 7, - p8 = 8, - p9 = 9, - p10 = 10, - p11 = 11, - p12 = 12, - p13 = 13, - p14 = 14, - p15 = 15, - p16 = 16, - p17 = 17, - p18 = 18, - p19 = 19, - p20 = 20, - p21 = 21, - p22 = 22, - p23 = 23, - p24 = 24, - p25 = 25, - p26 = 26, - p27 = 27, - p28 = 28, - p29 = 29, - p30 = 30, - - P0_0 = p0, - P0_1 = p1, - P0_2 = p2, - P0_3 = p3, - P0_4 = p4, - P0_5 = p5, - P0_6 = p6, - P0_7 = p7, - - P0_8 = p8, - P0_9 = p9, - P0_10 = p10, - P0_11 = p11, - P0_12 = p12, - P0_13 = p13, - P0_14 = p14, - P0_15 = p15, - - P0_16 = p16, - P0_17 = p17, - P0_18 = p18, - P0_19 = p19, - P0_20 = p20, - P0_21 = p21, - P0_22 = p22, - P0_23 = p23, - - P0_24 = p24, - P0_25 = p25, - P0_26 = p26, - P0_27 = p27, - P0_28 = p28, - P0_29 = p29, - P0_30 = p30, - - LED1 = p18, - LED2 = p19, - LED3 = p18, - LED4 = p19, - - BUTTON1 = p16, - BUTTON2 = p17, - - RX_PIN_NUMBER = p11, - TX_PIN_NUMBER = p9, - CTS_PIN_NUMBER = 31, // unused - RTS_PIN_NUMBER = 31, // unused - - // mbed interface pins - USBTX = TX_PIN_NUMBER, - USBRX = RX_PIN_NUMBER, - - SPI_PSELMOSI0 = p20, - SPI_PSELMISO0 = p22, - SPI_PSELSS0 = p24, - SPI_PSELSCK0 = p25, - - SPI_PSELMOSI1 = p12, - SPI_PSELMISO1 = p13, - SPI_PSELSS1 = p14, - SPI_PSELSCK1 = p15, - - SPIS_PSELMOSI = p12, - SPIS_PSELMISO = p13, - SPIS_PSELSS = p14, - SPIS_PSELSCK = p15, - - LED_CONNECT = P0_18, - LED_MODE = P0_19, - OUT_LOW= P0_20, - SW1 = P0_16, - SW2 = P0_17, - - R_PWM = P0_28, - R_IN1 = P0_30, - R_IN2 = P0_0, - L_PWM = P0_29, - L_IN1 = P0_23, - L_IN2 = P0_24, - - MMC_SCK = P0_15, - MMC_CS = P0_14, - MMC_SDO = P0_13, - MMC_SDI = P0_12, - - R_ENC1 = P0_8, - R_ENC2 = P0_10, - L_ENC1 = P0_6, - L_ENC2 = P0_7, - - P1IN = P0_2, - P2IN = P0_3, - P3IN = P0_4, - P4IN = P0_5, - - I2C_SCL = P0_21, - I2C_SDA = P0_22, - - I2C_SCL0 = P0_21, //required definition for the i2c patch - I2C_SDA0 = P0_22, //required definition for the i2c patch - - // Not connected - NC = (int)0xFFFFFFFF - -} PinName; - -typedef enum { - PullNone = 0, - PullDown = 1, - PullUp = 3, - PullDefault = PullUp -} PinMode; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_WALLBOT_BLE/device.h b/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_WALLBOT_BLE/device.h deleted file mode 100644 index 2427e752ea..0000000000 --- a/hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/TARGET_WALLBOT_BLE/device.h +++ /dev/null @@ -1,38 +0,0 @@ -// The 'features' section in 'target.json' is now used to create the device's hardware preprocessor switches. -// Check the 'features' section of the target description in 'targets.json' for more details. -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef MBED_DEVICE_H -#define MBED_DEVICE_H - - - - - - - - - - - - - - - - -#include "objects.h" - -#endif